diff --git a/deployer_build_stats.csv b/deployer_build_stats.csv deleted file mode 100644 index 9960c844..00000000 --- a/deployer_build_stats.csv +++ /dev/null @@ -1,20 +0,0 @@ -date,sha,version,build_size,build_time,platform,mode,is_cache_using,commits_count -2022-02-28T19:06:43Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,68,armv7-android,debug,true,521 -2022-02-28T19:14:56Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,51,armv7-android,debug,true,521 -2022-02-28T19:16:23Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521 -2022-02-28T19:19:46Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521 -2022-02-28T19:22:51Z,3b329f9c25c9672e4030edb039b0225fa46f7ce1,0.8.521,4356,11,armv7-android,debug,true,521 -2022-03-12T10:01:30Z,d0f3d6641a08b0d6b719b13017aa85907d1667e5,0.8.564,2200,44,js-web,release,true,564 -2022-08-29T18:27:58Z,b2643ebd268b15884363efd17724e689279946f1,0.9.589,2316,45,js-web,release,true,589 -2022-08-29T18:46:47Z,13003e472169cbd261e703eca7b133adf64a24f7,0.9.592,2316,40,js-web,release,true,592 -2022-09-09T17:55:42Z,072507cc9e715541bdee7636d2e5eeeb3c22a57d,0.10.603,2340,43,js-web,release,true,603 -2022-09-09T18:00:07Z,072507cc9e715541bdee7636d2e5eeeb3c22a57d,0.10.603,2340,5,js-web,release,true,603 -2023-07-05T20:19:22Z,d0062c2a78e618871ebb4c8ee66b1509b763f069,0.10.671,3292,12,x86_64-linux,headless,true,671 -2023-07-13T18:37:07Z,1cbe57376397a8352bbafcc67de0b6f95ae37b35,0.10.682,2496,53,js-web,release,true,682 -2023-07-13T19:31:47Z,ea185622702e6691275187741b1e2ee0c7f079ec,0.11.686,2452,51,js-web,release,true,686 -2023-07-15T12:56:18Z,556e1a9bae620e2df290b10287fa8d0f64d47293,0.11.690,2468,51,js-web,release,true,690 -2023-08-05T16:02:55Z,628723386eb3875f7190d079a2e7c510d044a311,0.11.692,2456,40,js-web,release,true,692 -2023-08-05T16:31:19Z,37fff52aa59feb20f761ef4d340d9f677743d54b,0.11.693,2456,43,js-web,release,true,693 -2023-08-05T16:41:25Z,d7dd4a86b81d73d345ad7e136de9c2c488bc4d8b,0.11.694,2452,43,js-web,release,true,694 -2023-10-20T08:23:33Z,9132dc477b645d674ec21efbfcf85f48ef0ea8a6,0.11.718,2544,47,js-web,release,true,718 -2024-10-15T16:54:05Z,ea80c874f6c0ea175b317d01ac45c567db9179c7,0.11.0,1840,24,js-web,release,true,796 diff --git a/docs/druid/archive/archive_files.json b/docs/druid/archive/archive_files.json index a396e4d2..04bd6823 100644 --- a/docs/druid/archive/archive_files.json +++ b/docs/druid/archive/archive_files.json @@ -1 +1 @@ -{"content":[{"name":"game.projectc","size":4141,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":23248,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":608384,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":26065,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]} \ No newline at end of file +{"content":[{"name":"game.projectc","size":4491,"pieces":[{"name":"game0.projectc","offset":0}]},{"name":"game.arci","size":11968,"pieces":[{"name":"game0.arci","offset":0}]},{"name":"game.arcd","size":3549174,"pieces":[{"name":"game0.arcd","offset":0},{"name":"game1.arcd","offset":2097152}]},{"name":"game.dmanifest","size":13396,"pieces":[{"name":"game0.dmanifest","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game0.public.der","offset":0}]}],"total_size":3579191} \ No newline at end of file diff --git a/docs/druid/archive/game.arcd0 b/docs/druid/archive/game.arcd0 deleted file mode 100644 index ab429b83..00000000 Binary files a/docs/druid/archive/game.arcd0 and /dev/null differ diff --git a/docs/druid/archive/game.arci0 b/docs/druid/archive/game.arci0 deleted file mode 100644 index 8eb81f50..00000000 Binary files a/docs/druid/archive/game.arci0 and /dev/null differ diff --git a/docs/druid/archive/game.dmanifest0 b/docs/druid/archive/game.dmanifest0 deleted file mode 100644 index ec0feee9..00000000 Binary files a/docs/druid/archive/game.dmanifest0 and /dev/null differ diff --git a/docs/druid/archive/game0.arcd b/docs/druid/archive/game0.arcd new file mode 100644 index 00000000..a9102778 Binary files /dev/null and b/docs/druid/archive/game0.arcd differ diff --git a/docs/druid/archive/game0.arci b/docs/druid/archive/game0.arci new file mode 100644 index 00000000..cd1904ea Binary files /dev/null and b/docs/druid/archive/game0.arci differ diff --git a/docs/druid/archive/game0.dmanifest b/docs/druid/archive/game0.dmanifest new file mode 100644 index 00000000..bbe5defc Binary files /dev/null and b/docs/druid/archive/game0.dmanifest differ diff --git a/docs/druid/archive/game.projectc0 b/docs/druid/archive/game0.projectc similarity index 79% rename from docs/druid/archive/game.projectc0 rename to docs/druid/archive/game0.projectc index beb29f4c..5644cbfd 100644 --- a/docs/druid/archive/game.projectc0 +++ b/docs/druid/archive/game0.projectc @@ -1,24 +1,25 @@ [project] -title = druid -version = 0.11.718 +title = Druid +version = 1.0.0 write_log = 0 compress_archive = 1 publisher = Insality -developer = Insality -commit_sha = 9132dc477b645d674ec21efbfcf85f48ef0ea8a6 -build_date = 2023-10-20T08:23:33Z -title_as_file_name = druid +developer = Maksim Tuprikov +custom_resources = /example/locales +commit_sha = 3579370287f00a1a03e89dbb01a2a5b953e83991 +build_date = 2024-10-16T22:59:05Z +title_as_file_name = Druid [display] -width = 600 -height = 900 +width = 1920 +height = 1080 high_dpi = 1 samples = 0 fullscreen = 0 update_frequency = 0 swap_interval = 1 vsync = 1 -display_profiles = /example/custom.display_profilesc +display_profiles = /builtins/render/default.display_profilesc dynamic_orientation = 1 display_device_info = 0 @@ -51,7 +52,7 @@ velocity_threshold = 1 max_fixed_timesteps = 2 [bootstrap] -main_collection = /example/example.collectionc +main_collection = /example/druid.collectionc render = /builtins/render/default.renderc [graphics] @@ -59,8 +60,9 @@ default_texture_min_filter = linear default_texture_mag_filter = linear max_draw_calls = 128 max_characters = 8192 +max_font_batches = 128 max_debug_vertices = 10000 -texture_profiles = /example/custom.texture_profiles +texture_profiles = /builtins/graphics/default.texture_profiles verify_graphics_calls = 0 memory_size = 512 @@ -84,7 +86,7 @@ max_resources = 1024 repeat_delay = 0.5 repeat_interval = 0.2 gamepads = /builtins/input/default.gamepadsc -game_binding = /input/game.input_bindingc +game_binding = /builtins/input/all.input_bindingc use_accelerometer = 0 [sprite] @@ -123,13 +125,14 @@ pre_renderered_icons = 0 bundle_identifier = example.unnamed bundle_name = infoplist = /builtins/manifests/ios/Info.plist +privacymanifest = /builtins/manifests/ios/PrivacyInfo.xcprivacy default_language = en localizations = en [android] -version_code = 718 +version_code = 806 minimum_sdk_version = 19 -target_sdk_version = 33 +target_sdk_version = 34 package = com.insality.druid gcm_sender_id = manifest = /builtins/manifests/android/AndroidManifest.xml @@ -139,10 +142,12 @@ immersive_mode = 0 display_cutout = 1 debuggable = 0 proguard = +extract_native_libs = 1 [osx] app_icon = infoplist = /builtins/manifests/osx/Info.plist +privacymanifest = /builtins/manifests/osx/PrivacyInfo.xcprivacy bundle_identifier = example.unnamed bundle_name = bundle_version = 1 @@ -156,7 +161,7 @@ app_icon = custom_heap_size = 0 heap_size = 64 htmlfile = /builtins/manifests/web/engine_template.html -cssfile = /example/light_theme.css +cssfile = /builtins/manifests/web/dark_theme.css splash_image = /media/druid_logo.png archive_location_prefix = archive archive_location_suffix = @@ -164,17 +169,14 @@ engine_arguments = --verify-graphics-calls=false wasm_streaming = 0 show_fullscreen_button = 0 show_made_with_defold = 0 -show_console_banner = 1 -scale_mode = fit +show_console_banner = 0 +scale_mode = stretch [particle_fx] max_count = 0 max_emitter_count = 0 max_particle_count = 0 -[iap] -auto_finish_transactions = 1 - [network] http_timeout = 0 ssl_certificates = @@ -198,6 +200,7 @@ sleep_between_server_updates = 0 [liveupdate] settings = /liveupdate.settings enabled = 1 +mount_on_start = 1 [tilemap] max_count = 0 @@ -206,6 +209,7 @@ max_tile_count = 0 [engine] run_while_iconified = 0 fixed_update_frequency = 60 +max_time_step = 0.5 [druid] no_auto_input = 0 @@ -223,5 +227,13 @@ input_scroll_up = mouse_wheel_up input_scroll_down = mouse_wheel_down [native_extension] -app_manifest = /example/game.appmanifest +app_manifest = + +[saver] +autosave_timer = 2 + +[lang] +path = /example/locales +langs = en,ru,es,de,fr,ja,pt,it,kr,zh +default = es diff --git a/docs/druid/archive/game.public.der0 b/docs/druid/archive/game0.public.der similarity index 100% rename from docs/druid/archive/game.public.der0 rename to docs/druid/archive/game0.public.der diff --git a/docs/druid/archive/game1.arcd b/docs/druid/archive/game1.arcd new file mode 100644 index 00000000..be1bca57 Binary files /dev/null and b/docs/druid/archive/game1.arcd differ diff --git a/docs/druid/dmloader.js b/docs/druid/dmloader.js index b35aa338..7701fa2c 100644 --- a/docs/druid/dmloader.js +++ b/docs/druid/dmloader.js @@ -1,3 +1,93 @@ +/* +* 'archive_location_filter': +* Filter function that will run for each archive path. +* +* 'unsupported_webgl_callback': +* Function that is called if WebGL is not supported. +* +* 'engine_arguments': +* List of arguments (strings) that will be passed to the engine. +* +* 'custom_heap_size': +* Number of bytes specifying the memory heap size. +* +* 'disable_context_menu': +* Disables the right-click context menu on the canvas element if true. +* +* 'retry_time': +* Pause before retry file loading after error. +* +* 'retry_count': +* How many attempts we do when trying to download a file. +* +* 'can_not_download_file_callback': +* Function that is called if you can't download file after 'retry_count' attempts. +* +* 'exe_name': +* Executable name which used for find right binary to load +* +* 'resize_window_callback': +* Function that is called when resize/orientationchanges/focus events happened +*/ +var CUSTOM_PARAMETERS = { + archive_location_filter: function( path ) { + return ("archive" + path + ""); + }, + engine_arguments: ["--verify-graphics-calls=false",], + custom_heap_size: 67108864, + full_screen_container: "#canvas-container", + disable_context_menu: true, + retry_time:1.0, + retry_count:10, + unsupported_webgl_callback: function() { + var e = document.getElementById("webgl-not-supported"); + e.style.display = "block"; + }, + resize_window_callback: function() { + var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + var buttonHeight = 0; + var prevInnerWidth = -1; + var prevInnerHeight = -1; + + + // Hack for iOS when exit from Fullscreen mode + if (is_iOS) { + window.scrollTo(0, 0); + } + + var app_container = document.getElementById('app-container'); + var game_canvas = document.getElementById('canvas'); + var innerWidth = window.innerWidth; + var innerHeight = window.innerHeight - buttonHeight; + if (prevInnerWidth == innerWidth && prevInnerHeight == innerHeight) + { + return; + } + prevInnerWidth = innerWidth; + prevInnerHeight = innerHeight; + var width = 1920; + var height = 1080; + var targetRatio = width / height; + var actualRatio = innerWidth / innerHeight; + + + //Stretch + width = innerWidth; + height = innerHeight; + + + + var dpi = 1; + + dpi = window.devicePixelRatio || 1; + + app_container.style.width = width + "px"; + app_container.style.height = height + buttonHeight + "px"; + game_canvas.width = Math.floor(width * dpi); + game_canvas.height = Math.floor(height * dpi); + } +} + // file downloader // wraps XMLHttpRequest and adds retry support and progress updates when the // content is gzipped (gzipped content doesn't report a computable content length @@ -9,31 +99,36 @@ var FileLoader = { }, // do xhr request with retries request: function(url, method, responseType, currentAttempt) { - if (typeof method === 'undefined') throw "No method specified"; - if (typeof method === 'responseType') throw "No responseType specified"; + if (typeof method === 'undefined') throw TypeError("No method specified"); + if (typeof method === 'responseType') throw TypeError("No responseType specified"); if (typeof currentAttempt === 'undefined') currentAttempt = 0; var obj = { send: function() { var onprogress = this.onprogress; var onload = this.onload; var onerror = this.onerror; + var onretry = this.onretry; var xhr = new XMLHttpRequest(); + xhr._loadedSize = 0; xhr.open(method, url, true); xhr.responseType = responseType; - xhr.onprogress = function(e) { - if (onprogress) onprogress(xhr, e); + xhr.onprogress = function(event) { + if (onprogress) onprogress(xhr, event, xhr._loadedSize); + xhr._loadedSize = event.loaded; }; - xhr.onerror = function(e) { + xhr.onerror = function(event) { if (currentAttempt == FileLoader.options.retryCount) { - if (onerror) onerror(xhr, e); + if (onerror) onerror(xhr, event); return; } - currentAttempt = currentAttempt + 1; + if (onretry) onretry(xhr, event, xhr._loadedSize, currentAttempt); + xhr._loadedSize = 0; + currentAttempt += 1; setTimeout(obj.send.bind(obj), FileLoader.options.retryInterval); }; - xhr.onload = function(e) { - if (onload) onload(xhr, e); + xhr.onload = function(event) { + if (onload) onload(xhr, event); }; xhr.send(null); } @@ -60,29 +155,21 @@ var FileLoader = { request.send(); }, // Do HTTP GET request - // onprogress(loaded, total) + // onprogress(loadedDelta) // onerror(error) // onload(response) - load: function(url, responseType, estimatedSize, onprogress, onerror, onload) { + // onretry(loadedSize, currentAttempt) + load: function(url, responseType, onprogress, onerror, onload, onretry) { var request = FileLoader.request(url, "GET", responseType); - request.onprogress = function(xhr, e) { - if (e.lengthComputable) { - onprogress(e.loaded, e.total); - return; - } - var contentLength = xhr.getResponseHeader('content-length'); - var size = contentLength != undefined ? contentLength : estimatedSize; - if (size) { - onprogress(e.loaded, size); - } else { - onprogress(e.loaded, e.loaded); - } + request.onprogress = function(xhr, e, ls) { + var delta = e.loaded - ls; + onprogress(delta); }; request.onerror = function(xhr, e) { onerror("Error loading '" + url + "' (" + e + ")"); }; request.onload = function(xhr, e) { - if (xhr.readyState === 4) { + if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { var res = xhr.response; if (responseType == "json" && typeof res === "string") { @@ -95,113 +182,145 @@ var FileLoader = { } } }; + request.onretry = function(xhr, event, loadedSize, currentAttempt) { + onretry(loadedSize, currentAttempt); + } request.send(); } }; var EngineLoader = { - wasm_size: 2000000, - wasmjs_size: 250000, + wasm_size: 2374239, + wasmjs_size: 340441, asmjs_size: 4000000, + wasm_instantiate_progress: 0, - stream_wasm: false, + stream_wasm: "false" === "true", + + updateWasmInstantiateProgress: function(totalDownloadedSize) { + EngineLoader.wasm_instantiate_progress = totalDownloadedSize * 0.1; + }, - loadAndInstantiateWasmAsync: function(src, fromProgress, toProgress, callback) { - FileLoader.load(src, "arraybuffer", EngineLoader.wasm_size, - function(loaded, total) { Progress.calculateProgress(fromProgress, toProgress, loaded, total); }, + // load and instantiate .wasm file using XMLHttpRequest + loadAndInstantiateWasmAsync: function(src, imports, successCallback) { + FileLoader.load(src, "arraybuffer", + function(delta) { + ProgressUpdater.updateCurrent(delta); + }, function(error) { throw error; }, function(wasm) { - Module.instantiateWasm = function(imports, successCallback) { - var wasmInstantiate = WebAssembly.instantiate(new Uint8Array(wasm), imports).then(function(output) { - successCallback(output.instance); - }).catch(function(e) { - console.log('wasm instantiation failed! ' + e); - throw e; - }); - return {}; // Compiling asynchronously, no exports. + if (wasm.byteLength != EngineLoader.wasm_size) { + throw "Invalid wasm size. Expected: " + EngineLoader.wasm_size + ", actual: " + wasm.byteLength; } - callback(); + var wasmInstantiate = WebAssembly.instantiate(new Uint8Array(wasm), imports).then(function(output) { + successCallback(output.instance); + }).catch(function(e) { + console.log('wasm instantiation failed! ' + e); + throw e; + }); + }, + function(loadedDelta, currentAttempt){ + ProgressUpdater.updateCurrent(-loadedDelta); }); }, - setupWasmStreamAsync: async function(src, fromProgress, toProgress) { + // stream and instantiate .wasm file + streamAndInstantiateWasmAsync: async function(src, imports, successCallback) { // https://stackoverflow.com/a/69179454 var fetchFn = fetch; if (typeof TransformStream === "function" && ReadableStream.prototype.pipeThrough) { async function fetchWithProgress(path) { const response = await fetch(path); - // May be incorrect if compressed - var contentLength = response.headers.get("Content-Length"); - if (!contentLength){ - contentLength = EngineLoader.wasm_size; - } - const total = parseInt(contentLength, 10); - - let bytesLoaded = 0; - const ts = new TransformStream({ - transform (chunk, controller) { - bytesLoaded += chunk.byteLength; - Progress.calculateProgress(fromProgress, toProgress, bytesLoaded, total); - controller.enqueue(chunk) - } - }); + if (response.ok) { + const ts = new TransformStream({ + transform (chunk, controller) { + ProgressUpdater.updateCurrent(chunk.byteLength); + controller.enqueue(chunk); + } + }); - return new Response(response.body.pipeThrough(ts), response); + return new Response(response.body.pipeThrough(ts), response); + } else { + return new Response(null, response); + } } fetchFn = fetchWithProgress; } - Module.instantiateWasm = function(imports, successCallback) { - WebAssembly.instantiateStreaming(fetchFn(src), imports).then(function(output) { - Progress.calculateProgress(fromProgress, toProgress, 1, 1); - successCallback(output.instance); - }).catch(function(e) { - console.log('wasm streaming instantiation failed! ' + e); - throw e; - }); - return {}; // Compiling asynchronously, no exports. - } + WebAssembly.instantiateStreaming(fetchFn(src), imports).then(function(output) { + ProgressUpdater.updateCurrent(EngineLoader.wasm_instantiate_progress); + successCallback(output.instance); + }).catch(function(e) { + console.log('wasm streaming instantiation failed! ' + e); + console.log('Fallback to wasm loading'); + EngineLoader.loadAndInstantiateWasmAsync(src, imports, successCallback); + }); }, // instantiate the .wasm file either by streaming it or first loading and then instantiate it - // https://github.com/emscripten-core/emscripten/blob/master/tests/manual_wasm_instantiate.html#L170 + // https://github.com/emscripten-core/emscripten/blob/main/test/manual_wasm_instantiate.html loadWasmAsync: function(exeName) { - if (EngineLoader.stream_wasm && (typeof WebAssembly.instantiateStreaming === "function")) { - EngineLoader.setupWasmStreamAsync(exeName + ".wasm", 10, 50); - EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js', EngineLoader.wasmjs_size, 0, 10); - } - else { - EngineLoader.loadAndInstantiateWasmAsync(exeName + ".wasm", 0, 40, function() { - EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js', EngineLoader.wasmjs_size, 40, 50); - }); - } + Module.instantiateWasm = function(imports, successCallback) { + if (EngineLoader.stream_wasm && (typeof WebAssembly.instantiateStreaming === "function")) { + EngineLoader.streamAndInstantiateWasmAsync(exeName + ".wasm", imports, successCallback); + } + else { + EngineLoader.loadAndInstantiateWasmAsync(exeName + ".wasm", imports, successCallback); + } + return {}; // Compiling asynchronously, no exports. + }; + EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js'); }, loadAsmJsAsync: function(exeName) { - EngineLoader.loadAndRunScriptAsync(exeName + '_asmjs.js', EngineLoader.asmjs_size, 0, 50); + EngineLoader.loadAndRunScriptAsync(exeName + '_asmjs.js'); }, // load and start engine script (asm.js or wasm.js) - loadAndRunScriptAsync: function(src, estimatedSize, fromProgress, toProgress) { - FileLoader.load(src, "text", estimatedSize, - function(loaded, total) { Progress.calculateProgress(fromProgress, toProgress, loaded, total); }, + loadAndRunScriptAsync: function(src) { + FileLoader.load(src, "text", + function(delta) { + ProgressUpdater.updateCurrent(delta); + }, function(error) { throw error; }, function(response) { var tag = document.createElement("script"); tag.text = response; document.body.appendChild(tag); + }, + function(loadedDelta, currentAttempt){ + ProgressUpdater.updateCurrent(-loadedDelta); }); }, - // load engine (asm.js or wasm.js + wasm) + // left as entrypoint for backward capability + // start loading archive_files.json + // after receiving it - start loading engine and data concurrently load: function(appCanvasId, exeName) { - Progress.addProgress(Module.setupCanvas(appCanvasId)); - if (Module['isWASMSupported']) { - EngineLoader.loadWasmAsync(exeName); - } else { - EngineLoader.loadAsmJsAsync(exeName); - } + ProgressView.addProgress(Module.setupCanvas(appCanvasId)); + CUSTOM_PARAMETERS['exe_name'] = exeName; + + FileLoader.options.retryCount = CUSTOM_PARAMETERS["retry_count"]; + FileLoader.options.retryInterval = CUSTOM_PARAMETERS["retry_time"] * 1000; + if (typeof CUSTOM_PARAMETERS["can_not_download_file_callback"] === "function") { + GameArchiveLoader.addFileDownloadErrorListener(CUSTOM_PARAMETERS["can_not_download_file_callback"]); + } + // Load and assemble archive + GameArchiveLoader.addFileLoadedListener(Module.onArchiveFileLoaded); + GameArchiveLoader.addArchiveLoadedListener(Module.onArchiveLoaded); + GameArchiveLoader.setFileLocationFilter(CUSTOM_PARAMETERS["archive_location_filter"]); + GameArchiveLoader.loadArchiveDescription('/archive_files.json'); + + // move resize callback setup here to make possible to override callback + // from outside of dmloader.js + if (typeof CUSTOM_PARAMETERS["resize_window_callback"] === "function") { + var callback = CUSTOM_PARAMETERS["resize_window_callback"] + callback(); + window.addEventListener('resize', callback, false); + window.addEventListener('orientationchange', callback, false); + window.addEventListener('focus', callback, false); + } } } @@ -232,9 +351,6 @@ var GameArchiveLoader = { _onArchiveLoadedListeners:[], // signature: void _onFileDownloadErrorListeners: [], // signature: name - _currentDownloadBytes: 0, - _totalDownloadBytes: 0, - _archiveLocationFilter: function(path) { return "split" + path; }, cleanUp: function() { @@ -244,13 +360,10 @@ var GameArchiveLoader = { this._onGameArchiveLoaderCompletedListeners = []; this._onAllTargetsBuiltListeners = []; this._onFileDownloadErrorListeners = []; - - this._currentDownloadBytes = 0; - this._totalDownloadBytes = 0; }, addListener: function(list, callback) { - if (typeof callback !== 'function') throw "Invalid callback registration"; + if (typeof callback !== 'function') throw TypeError("Invalid callback registration"); list.push(callback); }, notifyListeners: function(list, data) { @@ -292,22 +405,31 @@ var GameArchiveLoader = { FileLoader.load( this._archiveLocationFilter(descriptionUrl), "json", - undefined, - function (loaded, total) { }, + function (delta) { }, function (error) { GameArchiveLoader.notifyFileDownloadError(descriptionUrl); }, - function (json) { GameArchiveLoader.onReceiveDescription(json); }); + function (json) { GameArchiveLoader.onReceiveDescription(json); }, + function (loadedDelta, currentAttempt) { }); }, onReceiveDescription: function(json) { + var totalSize = json.total_size; + var exeName = CUSTOM_PARAMETERS['exe_name']; this._files = json.content; - this._totalDownloadBytes = 0; - this._currentDownloadBytes = 0; - // calculate total download size of all files - for(var i=0; i start) { - throw "Buffer underflow"; + throw RangeError("Buffer underflow. Start: " + start); } if (end > file.data.length) { - throw "Buffer overflow"; + throw RangeError("Buffer overflow. End : " + end + ", data length: " + file.data.length); } file.data.set(piece.data, piece.offset); } @@ -407,12 +526,11 @@ var GameArchiveLoader = { actualSize += file.pieces[i].dataLength; } if (actualSize != file.size) { - throw "Unexpected data size"; + throw "Unexpected data size: " + file.name + ", expected size: " + file.size + ", actual size: " + actualSize; } // verify the pieces if (file.pieces.length > 1) { - var output = file.data; var pieces = file.pieces; for (i=0; i start) { - throw "Segment underflow"; + throw RangeError("Segment underflow in file: " + file.name + ", offset: " + (previous.offset + previous.dataLength) + " , start: " + start); } } if (pieces.length - 2 > i) { var next = pieces[i + 1]; if (end > next.offset) { - throw "Segment overflow"; + throw RangeError("Segment overflow in file: " + file.name + ", offset: " + next.offset + ", end: " + end); } } } @@ -456,14 +574,42 @@ var GameArchiveLoader = { /* Default splash and progress visualisation */ /* ********************************************************************* */ -var Progress = { +var ProgressView = { progress_id: "defold-progress", bar_id: "defold-progress-bar", + addProgress : function (canvas) { + /* Insert default progress bar below canvas */ + canvas.insertAdjacentHTML('afterend', '
'); + ProgressView.bar = document.getElementById(ProgressView.bar_id); + ProgressView.progress = document.getElementById(ProgressView.progress_id); + }, + + updateProgress: function(percentage) { + if (ProgressView.bar) { + ProgressView.bar.style.transform = "scaleX(" + Math.min(percentage, 100) / 100 + ")"; + } + }, + + removeProgress: function () { + if (ProgressView.progress.parentElement !== null) { + ProgressView.progress.parentElement.removeChild(ProgressView.progress); + + // Remove any background/splash image that was set in runApp(). + // Workaround for Safari bug DEF-3061. + Module.canvas.style.background = ""; + } + } +}; + +var ProgressUpdater = { + current: 0, + total: 1, + listeners: [], addListener: function(callback) { - if (typeof callback !== 'function') throw "Invalid callback registration"; + if (typeof callback !== 'function') throw TypeError("Invalid callback registration"); this.listeners.push(callback); }, @@ -473,32 +619,64 @@ var Progress = { } }, + setupTotal: function (total) { + this.total = total; + }, + + setCurrent: function (current) { + this.current = current; + var percentage = this.calculateProgress(); + ProgressView.updateProgress(percentage); + this.notifyListeners(percentage); + }, + + updateCurrent: function (diff) { + this.current += diff; + var percentage = this.calculateProgress(); + ProgressView.updateProgress(percentage); + this.notifyListeners(percentage); + }, + + resetCurrent: function () { + this.current = 0; + }, + + complete: function () { + this.setCurrent(this.total); + }, + + calculateProgress: function () { + return this.current / this.total * 100; + } +}; + +/* DEPRECATED! +* Use ProgressUpdater and ProgressView instead. +* Left for backward compatability. +*/ +var Progress = { + addListener: function(callback) { + ProgressUpdater.addListener(callback); + }, + + notifyListeners: function(percentage) { + // no-op + }, + addProgress : function (canvas) { - /* Insert default progress bar below canvas */ - canvas.insertAdjacentHTML('afterend', '
'); - Progress.bar = document.getElementById(Progress.bar_id); - Progress.progress = document.getElementById(Progress.progress_id); + ProgressView.addProgress(canvas); }, updateProgress: function(percentage) { - if (Progress.bar) { - Progress.bar.style.width = percentage + "%"; - } - Progress.notifyListeners(percentage); + // no-op }, calculateProgress: function (from, to, current, total) { - this.updateProgress(from + (current / total) * (to - from)); + // no-op }, removeProgress: function () { - if (Progress.progress.parentElement !== null) { - Progress.progress.parentElement.removeChild(Progress.progress); - - // Remove any background/splash image that was set in runApp(). - // Workaround for Safari bug DEF-3061. - Module.canvas.style.background = ""; - } + ProgressView.removeProgress(); } }; @@ -512,7 +690,7 @@ var Module = { _filesToPreload: [], _archiveLoaded: false, _preLoadDone: false, - _waitingForArchive: false, + _isEngineLoaded: false, // Persistent storage persistentStorage: true, @@ -550,7 +728,6 @@ var Module = { var error = errObj || (typeof window.event != "undefined" ? window.event.error : "" ) || err || "Undefined Error"; var message = ""; var stack = ""; - var backtrace = ""; if (typeof error == "object" && typeof error.stack != "undefined" && typeof error.message != "undefined") { stack = String(error.stack); @@ -603,61 +780,14 @@ var Module = { /** * Module.runApp - Starts the application given a canvas element id - * - * 'extra_params' is an optional object that can have the following fields: - * - * 'archive_location_filter': - * Filter function that will run for each archive path. - * - * 'unsupported_webgl_callback': - * Function that is called if WebGL is not supported. - * - * 'engine_arguments': - * List of arguments (strings) that will be passed to the engine. - * - * 'persistent_storage': - * Boolean toggling the usage of persistent storage. - * - * 'custom_heap_size': - * Number of bytes specifying the memory heap size. - * - * 'disable_context_menu': - * Disables the right-click context menu on the canvas element if true. - * - * 'retry_time': - * Pause before retry file loading after error. - * - * 'retry_count': - * How many attempts we do when trying to download a file. - * - * 'can_not_download_file_callback': - * Function that is called if you can't download file after 'retry_count' attempts. **/ - runApp: function(appCanvasId, extra_params) { + runApp: function(appCanvasId, _) { + Module._isEngineLoaded = true; Module.setupCanvas(appCanvasId); - var params = { - archive_location_filter: function(path) { return 'split' + path; }, - unsupported_webgl_callback: undefined, - engine_arguments: [], - persistent_storage: true, - custom_heap_size: undefined, - disable_context_menu: true, - retry_time: 1, - retry_count: 10, - can_not_download_file_callback: undefined, - }; - - for (var k in extra_params) { - if (extra_params.hasOwnProperty(k)) { - params[k] = extra_params[k]; - } - } + Module.arguments = CUSTOM_PARAMETERS["engine_arguments"]; - Module.arguments = params["engine_arguments"]; - Module.persistentStorage = params["persistent_storage"]; - - var fullScreenContainer = params["full_screen_container"]; + var fullScreenContainer = CUSTOM_PARAMETERS["full_screen_container"]; if (typeof fullScreenContainer === "string") { fullScreenContainer = document.querySelector(fullScreenContainer); } @@ -667,31 +797,22 @@ var Module = { Module.canvas.focus(); // Add context menu hide-handler if requested - if (params["disable_context_menu"]) + if (CUSTOM_PARAMETERS["disable_context_menu"]) { Module.canvas.oncontextmenu = function(e) { e.preventDefault(); }; } - - FileLoader.options.retryCount = params["retry_count"]; - FileLoader.options.retryInterval = params["retry_time"] * 1000; - if (typeof params["can_not_download_file_callback"] === "function") { - GameArchiveLoader.addFileDownloadErrorListener(params["can_not_download_file_callback"]); - } - // Load and assemble archive - GameArchiveLoader.addFileLoadedListener(Module.onArchiveFileLoaded); - GameArchiveLoader.addArchiveLoadedListener(Module.onArchiveLoaded); - GameArchiveLoader.setFileLocationFilter(params["archive_location_filter"]); - GameArchiveLoader.loadArchiveDescription('/archive_files.json'); + Module._preloadAndCallMain(); } else { - Progress.updateProgress(100, "Unable to start game, WebGL not supported"); + // "Unable to start game, WebGL not supported" + ProgressUpdater.complete(); Module.setStatus = function(text) { if (text) Module.printErr('[missing WebGL] ' + text); }; - if (typeof params["unsupported_webgl_callback"] === "function") { - params["unsupported_webgl_callback"](); + if (typeof CUSTOM_PARAMETERS["unsupported_webgl_callback"] === "function") { + CUSTOM_PARAMETERS["unsupported_webgl_callback"](); } } }, @@ -703,11 +824,7 @@ var Module = { onArchiveLoaded: function() { GameArchiveLoader.cleanUp(); Module._archiveLoaded = true; - Progress.updateProgress(100, "Starting..."); - - if (Module._waitingForArchive) { - Module._preloadAndCallMain(); - } + Module._preloadAndCallMain(); }, toggleFullscreen: function(element) { @@ -720,7 +837,6 @@ var Module = { preSync: function(done) { if (Module.persistentStorage != true) { - Module._syncInitial = true; done(); return; } @@ -820,26 +936,33 @@ var Module = { postRun: [function() { if(Module._archiveLoaded) { - Progress.removeProgress(); + ProgressView.removeProgress(); } }], _preloadAndCallMain: function() { - // If the archive isn't loaded, - // we will have to wait with calling main. - if (!Module._archiveLoaded) { - Module._waitingForArchive = true; - } else { - Module.preloadAll(); - Progress.removeProgress(); - if (Module.callMain === undefined) { - Module.noInitialRun = false; - } else { - Module.callMain(Module.arguments); + if (Module._syncInitial || Module.persistentStorage != true) { + // If the archive isn't loaded, + // we will have to wait with calling main. + if (Module._archiveLoaded) { + Module.preloadAll(); + if (Module._isEngineLoaded) { + // "Starting...." + ProgressUpdater.complete(); + Module._callMain(); + } } } }, + _callMain: function() { + ProgressView.removeProgress(); + if (Module.callMain === undefined) { + Module.noInitialRun = false; + } else { + Module.callMain(Module.arguments); + } + }, // Wrap IDBFS syncfs call with logic to avoid multiple syncs // running at the same time. _startSyncFS: function() { @@ -864,6 +987,26 @@ var Module = { }, }; +// common engine setup +Module['persistentStorage'] = (typeof window !== 'undefined') && !!(window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB); + +Module['INITIAL_MEMORY'] = CUSTOM_PARAMETERS.custom_heap_size; + +Module['onRuntimeInitialized'] = function() { + Module.runApp("canvas"); +}; + +Module["locateFile"] = function(path, scriptDirectory) +{ + // dmengine*.wasm is hardcoded in the built JS loader for WASM, + // we need to replace it here with the correct project name. + if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") { + path = "Druid.wasm"; + } + return scriptDirectory + path; +}; + + window.onerror = function(err, url, line, column, errObj) { if (typeof Module.ccall !== 'undefined') { var errorObject = Module.prepareErrorObject(err, url, line, column, errObj); diff --git a/docs/druid/druid.wasm b/docs/druid/druid.wasm index 80a6b8b9..f569556d 100644 Binary files a/docs/druid/druid.wasm and b/docs/druid/druid.wasm differ diff --git a/docs/druid/druid_asmjs.js b/docs/druid/druid_asmjs.js deleted file mode 100644 index cbd73f03..00000000 --- a/docs/druid/druid_asmjs.js +++ /dev/null @@ -1,91 +0,0 @@ -var Module=typeof Module!=="undefined"?Module:{};var Promise=function(){function noop(){}function bind(fn,thisArg){return function(){fn.apply(thisArg,arguments)}}function Promise(fn){if(!(this instanceof Promise))throw new TypeError("Promises must be constructed via new");if(typeof fn!=="function")throw new TypeError("not a function");this._state=0;this._handled=false;this._value=undefined;this._deferreds=[];doResolve(fn,this)}function handle(self,deferred){while(self._state===3){self=self._value}if(self._state===0){self._deferreds.push(deferred);return}self._handled=true;Promise._immediateFn(function(){var cb=self._state===1?deferred.onFulfilled:deferred.onRejected;if(cb===null){(self._state===1?resolve:reject)(deferred.promise,self._value);return}var ret;try{ret=cb(self._value)}catch(e){reject(deferred.promise,e);return}resolve(deferred.promise,ret)})}function resolve(self,newValue){try{if(newValue===self)throw new TypeError("A promise cannot be resolved with itself.");if(newValue&&(typeof newValue==="object"||typeof newValue==="function")){var then=newValue.then;if(newValue instanceof Promise){self._state=3;self._value=newValue;finale(self);return}else if(typeof then==="function"){doResolve(bind(then,newValue),self);return}}self._state=1;self._value=newValue;finale(self)}catch(e){reject(self,e)}}function reject(self,newValue){self._state=2;self._value=newValue;finale(self)}function finale(self){if(self._state===2&&self._deferreds.length===0){Promise._immediateFn(function(){if(!self._handled){Promise._unhandledRejectionFn(self._value)}})}for(var i=0,len=self._deferreds.length;i1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}readBinary=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;return Math.ceil(size/factor)*factor}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];var WebAssembly={Memory:function(opts){this.buffer=new ArrayBuffer(opts["initial"]*65536)},Module:function(binary){},Instance:function(module,info){this.exports=( -// EMSCRIPTEN_START_ASM -function instantiate(Tza){function Iza(Uza){Uza.set=(function(c,Vza){this[c]=Vza});Uza.get=(function(c){return this[c]});return Uza}var a;var b=new Uint8Array(123);for(var c=25;c>=0;--c){b[48+c]=52+c;b[65+c]=c;b[97+c]=26+c}b[43]=62;b[47]=63;function Jza(Wza,Xza,Yza){var d,e,c=0,f=Xza,g=Yza.length,h=Xza+(g*3>>2)-(Yza[g-2]=="=")-(Yza[g-1]=="=");for(;c>4;if(f>2;if(f>2]=34;break b}if(c&4){q[a+112>>2]=34;break b}if(c&1){q[a+112>>2]=34;break b}if(q[a+1128>>2]!=1){q[a+112>>2]=34;break b}c:{d:{c=r[a+1132|0];if((c|0)!=30){if((c|0)!=64){break c}e:{f:{c=q[a+44>>2];if(c){b=c+6|0;if(b>>>0<=t[a+52>>2]){break f}q[a+108>>2]=1;break c}if((zl(n+1e3|0,6,1,q[a+32>>2])|0)==1){break e}q[a+108>>2]=1;break c}p[n+1004>>1]=r[c+4|0]|r[c+5|0]<<8;q[n+1e3>>2]=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);q[a+44>>2]=b}if(r[n+1e3|0]!=102|r[n+1001|0]!=105|(r[n+1002|0]!=115|r[n+1003|0]!=104)){break c}if(r[n+1004|0]!=101|r[n+1005|0]!=97){break c}c=q[a+44>>2];if(c){if(c>>>0>=t[a+52>>2]){q[a+108>>2]=1;break c}q[a+44>>2]=c+1;d=r[c|0];break d}d=wj(q[a+32>>2]);if((d|0)!=-1){break d}q[a+108>>2]=1;break c}g:{h:{i:{j:{k:{c=q[a+44>>2];l:{if(c){if(c>>>0>=t[a+52>>2]){break k}q[a+44>>2]=c+1;d=r[c|0];break l}d=wj(q[a+32>>2]);if((d|0)==-1){break k}}if((d&255)!=1){break j}c=q[a+44>>2];if(!c){break i}b=c+6|0;if(b>>>0>t[a+52>>2]){break h}p[n+1004>>1]=r[c+4|0]|r[c+5|0]<<8;q[n+1e3>>2]=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);q[a+44>>2]=b;break g}q[a+108>>2]=1}q[a+112>>2]=34;break b}if((zl(n+1e3|0,6,1,q[a+32>>2])|0)==1){break g}}q[a+108>>2]=1;q[a+112>>2]=10;break b}if(Ej(n+1e3|0,284464,6)){q[a+112>>2]=34;break b}m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{c=q[a+44>>2];x:{y:{z:{if(c){d=q[a+52>>2];if(c>>>0>=d>>>0){break z}b=c+1|0;q[a+44>>2]=b;f=r[c|0];break x}d=wj(q[a+32>>2]);if((d|0)!=-1){break y}}q[a+108>>2]=1;d=0}f=d&255;b=q[a+44>>2];if(!b){break w}d=q[a+52>>2]}if(b>>>0>=d>>>0){break v}h=b+1|0;q[a+44>>2]=h;f=r[b|0]<<8|f;break t}d=wj(q[a+32>>2]);if((d|0)!=-1){break u}}q[a+108>>2]=1;d=0}f=d<<8&65280|f;h=q[a+44>>2];if(!h){break s}d=q[a+52>>2]}if(d>>>0<=h>>>0){break r}b=h+1|0;q[a+44>>2]=b;h=r[h|0]<<16|f;break p}d=wj(q[a+32>>2]);if((d|0)!=-1){break q}}q[a+108>>2]=1;d=0}h=d<<16&16711680|f;b=q[a+44>>2];if(!b){break o}d=q[a+52>>2]}if(b>>>0>=d>>>0){break n}q[a+44>>2]=b+1;d=r[b|0];break m}d=wj(q[a+32>>2]);if((d|0)!=-1){break m}}q[a+108>>2]=1;d=0}if(d<<24|h){q[a+112>>2]=34;break b}A:{B:{C:{c=q[a+44>>2];D:{if(c){if(c>>>0>=t[a+52>>2]){break D}q[a+44>>2]=c+1;d=r[c|0];break C}d=wj(q[a+32>>2]);if((d|0)!=-1){break C}}q[a+4>>2]=0;q[a+108>>2]=1;break B}c=d&255;q[a+4>>2]=c;if(!c){break B}if(c>>>0<17){break A}q[a+112>>2]=5;break b}q[a+112>>2]=34;break b}E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{c=q[a+44>>2];P:{Q:{R:{if(c){d=q[a+52>>2];if(c>>>0>=d>>>0){break R}b=c+1|0;q[a+44>>2]=b;f=r[c|0];break P}d=wj(q[a+32>>2]);if((d|0)!=-1){break Q}}q[a+108>>2]=1;d=0}f=d&255;b=q[a+44>>2];if(!b){break O}d=q[a+52>>2]}if(b>>>0>=d>>>0){break N}h=b+1|0;q[a+44>>2]=h;f=r[b|0]<<8|f;break L}d=wj(q[a+32>>2]);if((d|0)!=-1){break M}}q[a+108>>2]=1;d=0}f=d<<8&65280|f;h=q[a+44>>2];if(!h){break K}d=q[a+52>>2]}if(d>>>0<=h>>>0){break J}b=h+1|0;q[a+44>>2]=b;h=r[h|0]<<16|f;break H}d=wj(q[a+32>>2]);if((d|0)!=-1){break I}}q[a+108>>2]=1;d=0}h=d<<16&16711680|f;b=q[a+44>>2];if(!b){break G}d=q[a+52>>2]}if(b>>>0>=d>>>0){break F}q[a+44>>2]=b+1;d=r[b|0];break E}d=wj(q[a+32>>2]);if((d|0)!=-1){break E}}q[a+108>>2]=1;d=0}c=d<<24|h;q[a>>2]=c;if(!c){q[a+112>>2]=34;break b}S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{na:{oa:{pa:{qa:{ra:{sa:{ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{Ha:{Ia:{Ja:{Ka:{c=q[a+44>>2];La:{Ma:{Na:{if(c){d=q[a+52>>2];if(c>>>0>=d>>>0){break Na}b=c+1|0;q[a+44>>2]=b;break La}if((wj(q[a+32>>2])|0)!=-1){break Ma}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Ka}d=q[a+52>>2]}if(b>>>0>=d>>>0){break Ja}b=b+1|0;q[a+44>>2]=b;break Ha}if((wj(q[a+32>>2])|0)!=-1){break Ia}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Ga}d=q[a+52>>2]}if(b>>>0>=d>>>0){break Fa}b=b+1|0;q[a+44>>2]=b;break Da}if((wj(q[a+32>>2])|0)!=-1){break Ea}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Ca}d=q[a+52>>2]}if(b>>>0>=d>>>0){break Ba}b=b+1|0;q[a+44>>2]=b;break za}if((wj(q[a+32>>2])|0)!=-1){break Aa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break ya}d=q[a+52>>2]}if(b>>>0>=d>>>0){break xa}b=b+1|0;q[a+44>>2]=b;break va}if((wj(q[a+32>>2])|0)!=-1){break wa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break ua}d=q[a+52>>2]}if(b>>>0>=d>>>0){break ta}b=b+1|0;q[a+44>>2]=b;break ra}if((wj(q[a+32>>2])|0)!=-1){break sa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break qa}d=q[a+52>>2]}if(b>>>0>=d>>>0){break pa}b=b+1|0;q[a+44>>2]=b;break na}if((wj(q[a+32>>2])|0)!=-1){break oa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break ma}d=q[a+52>>2]}if(b>>>0>=d>>>0){break la}b=b+1|0;q[a+44>>2]=b;break ja}if((wj(q[a+32>>2])|0)!=-1){break ka}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break ia}d=q[a+52>>2]}if(b>>>0>=d>>>0){break ha}b=b+1|0;q[a+44>>2]=b;break fa}if((wj(q[a+32>>2])|0)!=-1){break ga}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break ea}d=q[a+52>>2]}if(b>>>0>=d>>>0){break da}b=b+1|0;q[a+44>>2]=b;break ba}if((wj(q[a+32>>2])|0)!=-1){break ca}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break aa}d=q[a+52>>2]}if(b>>>0>=d>>>0){break $}b=b+1|0;q[a+44>>2]=b;break Z}if((wj(q[a+32>>2])|0)!=-1){break _}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Y}d=q[a+52>>2]}if(b>>>0>=d>>>0){break X}b=b+1|0;q[a+44>>2]=b;break V}if((wj(q[a+32>>2])|0)!=-1){break W}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break U}d=q[a+52>>2]}if(b>>>0>=d>>>0){break T}q[a+44>>2]=b+1;d=r[b|0];break S}d=wj(q[a+32>>2]);if((d|0)!=-1){break S}}q[a+108>>2]=1;d=0}c=d&15;q[a+124>>2]=1<>>4&15;q[a+128>>2]=1<>>0>=8){q[a+112>>2]=20;break b}if((d<<24)-1610612736>>24<=-1){q[a+112>>2]=20;break b}if(b>>>0>>0){q[a+112>>2]=20;break b}Oa:{Pa:{Qa:{c=q[a+44>>2];Ra:{if(c){if(c>>>0>=t[a+52>>2]){break Qa}q[a+44>>2]=c+1;d=r[c|0];break Ra}d=wj(q[a+32>>2]);if((d|0)==-1){break Qa}}if(!(d&1)){break Pa}if(!$k(a)){break b}m=a+1392|0;while(1){c=q[m>>2];if((c|0)!=-1){break Oa}if(!$k(a)){break b}if(!(o[a+1387|0]&1)){continue}break}q[a+112>>2]=32;break b}q[a+108>>2]=1}q[a+112>>2]=34;break b}q[a+1408>>2]=0;q[a+1412>>2]=0;q[a+1396>>2]=0;o[a+1388|0]=0;d=c+1|0;q[a+1392>>2]=d;b=r[(a+c|0)+1132|0];if((b|0)!=255){q[a+1400>>2]=c;q[a+1396>>2]=1}if((d|0)>=q[a+1128>>2]){q[m>>2]=-1}l=a+1388|0;o[l|0]=b;if(!b){break b}q[a+1412>>2]=1;o[a+1388|0]=b-1;Sa:{Ta:{c=q[a+44>>2];Ua:{if(c){if(c>>>0>=t[a+52>>2]){break Ua}q[a+44>>2]=c+1;b=r[c|0];break Ta}b=wj(q[a+32>>2]);if((b|0)!=-1){break Ta}}q[a+1408>>2]=0;q[a+108>>2]=1;break Sa}q[a+1408>>2]=0;if((b&255)!=3){break Sa}while(1){Va:{Wa:{Xa:{f=r[l|0];if(!f){b=255;if(q[a+1396>>2]){break Va}d=q[m>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break Va}if(!(o[a+1387|0]&1)){break Xa}d=q[m>>2]}c=d+1|0;q[a+1392>>2]=c;f=r[(a+d|0)+1132|0];if((f|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=f;if(!f){break Va}}o[a+1388|0]=f-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>=t[a+52>>2]){break Wa}q[a+44>>2]=c+1;b=r[c|0];break Va}b=wj(q[a+32>>2]);if((b|0)==-1){break Wa}break Va}q[a+112>>2]=32;break Va}q[a+108>>2]=1;b=0}q[a+1408>>2]=0;o[(n+1e3|0)+e|0]=b;e=e+1|0;if((e|0)!=6){continue}break}Ya:{if(Ej(n+1e3|0,284464,6)){q[a+112>>2]=20;break Ya}d=Yy(a);c=d+8&-8;q[a+8>>2]=c+q[a+8>>2];Za:{_a:{b=a;e=q[a+92>>2];$a:{if(e){g=c;c=q[a+100>>2];g=g+c|0;if((g|0)>q[a+104>>2]){break _a}q[a+100>>2]=g;c=c+e|0;break $a}if(!c){break _a}c=Yi(c)}q[b+20>>2]=c;if(!c){break Za}e=0;if((d|0)>0){while(1){ab:{bb:{cb:{f=r[l|0];if(!f){b=255;if(q[a+1396>>2]){break ab}h=q[m>>2];if((h|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break ab}if(!(o[a+1387|0]&1)){break cb}h=q[m>>2]}c=h+1|0;q[a+1392>>2]=c;f=r[(a+h|0)+1132|0];if((f|0)!=255){q[a+1400>>2]=h;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=f;if(!f){break ab}}o[a+1388|0]=f-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>=t[a+52>>2]){break bb}q[a+44>>2]=c+1;b=r[c|0];break ab}b=wj(q[a+32>>2]);if((b|0)==-1){break bb}break ab}q[a+112>>2]=32;break ab}q[a+108>>2]=1;b=0}q[a+1408>>2]=0;o[q[a+20>>2]+e|0]=b;e=e+1|0;if((d|0)!=(e|0)){continue}break}c=q[a+20>>2]}o[c+d|0]=0;c=Yy(a);q[a+28>>2]=0;q[a+24>>2]=c;db:{eb:{fb:{gb:{hb:{ib:{if((c|0)>=1){b=(c<<2)+7&-8;q[a+8>>2]=b+q[a+8>>2];c=a;d=q[a+92>>2];jb:{if(d){e=b;b=q[a+100>>2];e=e+b|0;if((e|0)>q[a+104>>2]){break hb}q[a+100>>2]=e;b=b+d|0;break jb}if(!b){break hb}b=Yi(b)}q[c+28>>2]=b;if(!b){break db}g=0;while(1){d=Yy(a);c=d+8&-8;q[a+8>>2]=c+q[a+8>>2];e=q[a+92>>2];kb:{if(e){b=c;c=q[a+100>>2];i=b+c|0;b=0;if((i|0)>q[a+104>>2]){break kb}q[a+100>>2]=i;b=c+e|0;break kb}b=0;if(!c){break kb}b=Yi(c)}i=g<<2;q[i+q[a+28>>2]>>2]=b;c=q[i+q[a+28>>2]>>2];if(!c){break ib}e=0;if((d|0)>0){while(1){lb:{mb:{nb:{f=r[l|0];if(!f){b=255;if(q[a+1396>>2]){break lb}j=q[m>>2];if((j|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break lb}if(!(o[a+1387|0]&1)){break nb}j=q[m>>2]}c=j+1|0;q[a+1392>>2]=c;f=r[(a+j|0)+1132|0];if((f|0)!=255){q[a+1400>>2]=j;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=f;if(!f){break lb}}o[a+1388|0]=f-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>=t[a+52>>2]){break mb}q[a+44>>2]=c+1;b=r[c|0];break lb}b=wj(q[a+32>>2]);if((b|0)==-1){break mb}break lb}q[a+112>>2]=32;break lb}q[a+108>>2]=1;b=0}q[a+1408>>2]=0;o[q[i+q[a+28>>2]>>2]+e|0]=b;e=e+1|0;if((d|0)!=(e|0)){continue}break}c=q[i+q[a+28>>2]>>2]}o[c+d|0]=0;g=g+1|0;if((g|0)>2]){continue}break}}ob:{pb:{qb:{e=r[l|0];if(!e){if(q[a+1396>>2]){break pb}b=q[m>>2];if((b|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break pb}if(!(o[a+1387|0]&1)){break qb}b=q[m>>2]}c=b+1|0;q[a+1392>>2]=c;e=r[(a+b|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=b;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break ob}o[l|0]=e;if(!e){break pb}}o[a+1388|0]=e-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];rb:{if(c){if(c>>>0>=t[a+52>>2]){break rb}q[a+44>>2]=c+1;e=r[c|0];break gb}e=wj(q[a+32>>2]);if((e|0)!=-1){break gb}}q[a+1408>>2]=0;q[a+108>>2]=1;break fb}q[a+112>>2]=32}q[a+1408>>2]=0;break eb}break a}q[a+112>>2]=3;break Ya}q[a+28>>2]=0;break db}q[a+1408>>2]=0;if(e&1){break eb}}q[a+112>>2]=20;break Ya}c=r[l|0];b=q[a+44>>2];sb:{if(b){c=b+c|0;q[a+44>>2]=c;if(c>>>0>2]){break sb}q[a+108>>2]=1;break sb}b=pm(q[a+32>>2]);Uk(q[a+32>>2],b+c|0,0)}e=0;o[a+1388|0]=0;tb:{if(q[a+1396>>2]){break tb}ub:{vb:{b=q[m>>2];if((b|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break tb}if(!(o[a+1387|0]&1)){break vb}b=q[m>>2]}c=b+1|0;q[a+1392>>2]=c;e=r[(a+b|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=b;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break ub}o[l|0]=e;break tb}q[a+112>>2]=32;break tb}break a}c=q[a+44>>2];wb:{if(c){c=c+e|0;q[a+44>>2]=c;if(c>>>0>2]){break wb}q[a+108>>2]=1;break wb}c=pm(q[a+32>>2]);Uk(q[a+32>>2],c+e|0,0)}o[l|0]=0;if(e){while(1){e=0;xb:{if(q[a+1396>>2]){break xb}yb:{zb:{b=q[m>>2];if((b|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break xb}if(!(o[a+1387|0]&1)){break zb}b=q[m>>2]}c=b+1|0;q[a+1392>>2]=c;e=r[(a+b|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=b;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break yb}o[l|0]=e;break xb}q[a+112>>2]=32;break xb}break a}c=q[a+44>>2];Ab:{if(c){c=c+e|0;q[a+44>>2]=c;if(c>>>0>2]){break Ab}q[a+108>>2]=1;break Ab}c=pm(q[a+32>>2]);Uk(q[a+32>>2],c+e|0,0)}o[l|0]=0;if(e){continue}break}}Bb:{while(1){if(q[m>>2]!=-1){break Bb}e=0;if(!$k(a)){break b}if(!(o[a+1387|0]&1)){continue}break}q[a+112>>2]=32;break b}q[a+1408>>2]=0;q[a+1412>>2]=0;e=0;q[a+1396>>2]=0;o[a+1388|0]=0;Cb:{if(!r[a+60|0]){break Cb}if(E_(a)){break Cb}if(q[a+112>>2]!=21){break b}q[a+112>>2]=20;break b}while(1){c=e<<25;b=(c^e<<24>>31&79764919)<<1;c=(b^c>>31&79764919)<<1;b=(b>>31&79764919^c)<<1;d=b>>31&79764919;b=(b^c>>31&79764919)<<1;c=(d^b)<<1;b=(c^b>>31&79764919)<<1;q[(e<<2)+958864>>2]=b>>31&79764919^(b^c>>31&79764919)<<1;e=e+1|0;if((e|0)!=256){continue}break}Db:{Eb:{e=r[l|0];Fb:{if(!e){if(q[a+1396>>2]){break Fb}b=q[m>>2];if((b|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break Fb}if(!(o[a+1387|0]&1)){break Fb}b=q[m>>2]}c=b+1|0;q[a+1392>>2]=c;e=r[(a+b|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=b;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=e;if(!e){break Fb}}o[a+1388|0]=e-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];Gb:{if(c){if(c>>>0>=t[a+52>>2]){break Gb}q[a+44>>2]=c+1;b=r[c|0];break Eb}b=wj(q[a+32>>2]);if((b|0)!=-1){break Eb}}q[a+108>>2]=1}q[a+1408>>2]=0;break Db}e=0;q[a+1408>>2]=0;if((b&255)!=5){break Db}while(1){Hb:{Ib:{Jb:{f=r[l|0];if(!f){b=255;if(q[a+1396>>2]){break Hb}d=q[m>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break Hb}if(!(o[a+1387|0]&1)){break Jb}d=q[m>>2]}c=d+1|0;q[a+1392>>2]=c;f=r[(a+d|0)+1132|0];if((f|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=f;if(!f){break Hb}}o[a+1388|0]=f-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>=t[a+52>>2]){break Ib}q[a+44>>2]=c+1;b=r[c|0];break Hb}b=wj(q[a+32>>2]);if((b|0)==-1){break Ib}break Hb}q[a+112>>2]=32;break Hb}q[a+108>>2]=1;b=0}q[a+1408>>2]=0;o[(n+1e3|0)+e|0]=b;e=e+1|0;if((e|0)!=6){continue}break}if(Ej(n+1e3|0,284464,6)){q[a+112>>2]=20;break Ya}c=Fj(a,8)+1|0;q[a+132>>2]=c;d=w(c,2096);q[a+8>>2]=d+q[a+8>>2];Kb:{Lb:{Mb:{Nb:{Ob:{Pb:{Qb:{b=a;c=q[a+92>>2];Rb:{if(c){e=q[a+100>>2];g=e+d|0;if((g|0)>q[a+104>>2]){break Qb}q[a+100>>2]=g;c=c+e|0;break Rb}if(!d){break Qb}c=Yi(d)}q[b+136>>2]=c;if(!c){break Kb}Ui(c,0,d);Sb:{if(q[a+132>>2]>=1){while(1){z=q[a+136>>2];if((Fj(a,8)&255)!=66){q[a+112>>2]=20;break Ya}if((Fj(a,8)&255)!=67){q[a+112>>2]=20;break Ya}if((Fj(a,8)&255)!=86){q[a+112>>2]=20;break Ya}c=z+w(B,2096)|0;q[c>>2]=Fj(a,8)&255|Fj(a,8)<<8;b=Fj(a,8);q[c+4>>2]=Fj(a,8)<<8&65280|b&255|Fj(a,8)<<16;e=0;i=Fj(a,1);if(!i){e=Fj(a,1)}o[c+23|0]=e;k=c+4|0;if(!(q[c>>2]|!q[k>>2])){q[a+112>>2]=20;break Ya}d=q[k>>2]+7&-8;Tb:{Ub:{Vb:{if(e&255){e=q[a+92>>2];if(e){b=q[a+104>>2]-d|0;if((b|0)>2]){break Ub}q[a+104>>2]=b;g=b+e|0;break Vb}g=Yi(d);break Vb}q[a+8>>2]=d+q[a+8>>2];b=c;e=q[a+92>>2];Wb:{if(e){g=d;d=q[a+100>>2];h=g+d|0;g=0;if((h|0)>q[a+104>>2]){break Wb}q[a+100>>2]=h;g=d+e|0;break Wb}g=0;if(!d){break Wb}g=Yi(d)}q[b+8>>2]=g}if(g){break Tb}}q[a+112>>2]=3;break Ya}Xb:{if(!i){e=0;j=0;f=q[k>>2];if((f|0)<=0){break Xb}while(1){Yb:{Zb:{if(r[c+23|0]){if(!Fj(a,1)){break Zb}}b=Fj(a,5)+1|0;o[e+g|0]=b;if((b&255)!=32){j=j+1|0;break Yb}q[a+112>>2]=20;break Ya}o[e+g|0]=255}e=e+1|0;f=q[k>>2];if((e|0)<(f|0)){continue}break}break Xb}e=Fj(a,5);j=0;b=0;f=q[k>>2];if((f|0)<1){break Xb}while(1){e=e+1|0;d=a;i=f-b|0;h=0;_b:{if((i|0)<0){break _b}if((i|0)<=16383){h=o[i+211872|0];if((i|0)<=15){break _b}h=o[(i>>>5|0)+211872|0]+5|0;if((i|0)<=511){break _b}h=o[(i>>>10|0)+211872|0]+10|0;break _b}if((i|0)<=16777215){h=o[(i>>>15|0)+211872|0]+15|0;if((i|0)<=524287){break _b}h=o[(i>>>20|0)+211872|0]+20|0;break _b}h=o[(i>>>25|0)+211872|0]+25|0;if((i|0)<=536870911){break _b}h=o[(i>>>30|0)+211872|0]+30|0}i=Fj(d,h);if((e|0)>=32){q[a+112>>2]=20;break Ya}d=b+i|0;if((d|0)>q[k>>2]){q[a+112>>2]=20;break Ya}Ui(b+g|0,e,i);b=d;f=q[k>>2];if((b|0)<(f|0)){continue}break}}$b:{ac:{bc:{cc:{dc:{ec:{if(r[c+23|0]){if(f>>2>(j|0)){break ec}if(q[a+16>>2]<(f|0)){q[a+16>>2]=f}b=f+7&-8;q[a+8>>2]=b+q[a+8>>2];d=c;e=q[a+92>>2];fc:{if(e){i=b;b=q[a+100>>2];i=i+b|0;if((i|0)>q[a+104>>2]){break dc}q[a+100>>2]=i;b=b+e|0;break fc}if(!b){break dc}b=Yi(b)}q[d+8>>2]=b;if(!b){break Lb}Ti(b,g,q[k>>2]);gc:{if(q[a+92>>2]){q[a+104>>2]=q[a+104>>2]+(q[k>>2]+7&-8);break gc}Ni(g)}g=q[c+8>>2];o[c+23|0]=0}e=0;b=0;d=q[k>>2];if((d|0)>=1){while(1){b=((r[e+g|0]-11&255)>>>0<244)+b|0;e=e+1|0;if((d|0)!=(e|0)){continue}break}}q[c+2092>>2]=b;d=(d<<2)+7&-8;q[a+8>>2]=d+q[a+8>>2];hc:{ic:{b=c;e=q[a+92>>2];jc:{if(e){i=d;d=q[a+100>>2];i=i+d|0;if((i|0)>q[a+104>>2]){break ic}q[a+100>>2]=i;d=d+e|0;break jc}if(!d){break ic}d=Yi(d)}q[b+32>>2]=d;if(!d){break hc}v=c+2092|0;j=q[k>>2];h=0;break $b}q[(z+w(B,2096)|0)+32>>2]=0}q[a+112>>2]=3;break Ya}q[c+2092>>2]=j;v=c+2092|0;if(!j){h=0;break ac}e=j+7&-8;q[a+8>>2]=e+q[a+8>>2];b=c;d=q[a+92>>2];kc:{if(d){i=e;e=q[a+100>>2];i=i+e|0;if((i|0)>q[a+104>>2]){break cc}q[a+100>>2]=i;e=d+e|0;break kc}if(!e){break cc}e=Yi(e)}q[b+8>>2]=e;if(!e){break bc}e=(q[v>>2]<<2)+7&-8;lc:{b=c;mc:{nc:{if(d){e=q[a+104>>2]-e|0;if((e|0)>2]){q[(z+w(B,2096)|0)+32>>2]=0;break mc}q[a+104>>2]=e;e=d+e|0;break nc}e=Yi(e)}q[b+32>>2]=e;if(e){break lc}}q[a+112>>2]=3;break Ya}b=(q[v>>2]<<2)+7&-8;oc:{pc:{if(d){b=q[a+104>>2]-b|0;if((b|0)>2]){break oc}q[a+104>>2]=b;h=b+d|0;break pc}h=Yi(b)}if(h){break ac}}q[a+112>>2]=3;break Ya}q[(z+w(B,2096)|0)+8>>2]=0;break Lb}q[(z+w(B,2096)|0)+8>>2]=0}q[a+112>>2]=3;break Ya}j=q[k>>2];b=j+(q[v>>2]<<3)|0;if(b>>>0<=t[a+16>>2]){break $b}q[a+16>>2]=b}b=0;D=Ui(n,0,128);qc:{rc:{sc:{tc:{uc:{vc:{wc:{xc:{yc:{zc:{Ac:{Bc:{Cc:{Dc:{Ec:{if((j|0)<1){break Ec}while(1){if(r[b+g|0]!=255){break Ec}b=b+1|0;if((j|0)!=(b|0)){continue}break}break Dc}if((b|0)!=(j|0)){break Cc}}if(!q[c+2092>>2]){break Bc}J(213226,211687,1094,213249);G()}e=b+g|0;i=r[e|0];if(i>>>0>=32){break Ac}d=q[c+32>>2];Fc:{if(!r[c+23|0]){q[d+(b<<2)>>2]=0;break Fc}q[d>>2]=0;o[q[c+8>>2]]=i;q[h>>2]=b}d=r[e|0];if(d){e=1;d=d>>>0>1?d:1;while(1){q[D+(e<<2)>>2]=1<<32-e;i=(d|0)==(e|0);e=e+1|0;if(!i){continue}break}}d=b+1|0;if((j|0)<=(d|0)){break Bc}i=1;while(1){I=d+g|0;f=r[I|0];Gc:{if((f|0)==255){break Gc}if(f>>>0>31){break zc}Hc:{e=f;if(e){while(1){b=D+(e<<2)|0;E=q[b>>2];if(E){break Hc}b=(e|0)>1;e=e-1|0;if(b){continue}break}}if(!(q[a+92>>2]|!r[c+23|0])){Ni(h)}q[a+112>>2]=20;break Ya}q[b>>2]=0;b=E>>>1&1431655765|E<<1&-1431655766;b=b>>>2&858993459|b<<2&-858993460;b=b>>>4&252645135|b<<4&-252645136;b=Fza(b>>>8&16711935|b<<8&-16711936,16);K=q[c+32>>2];F=K+(d<<2)|0;Ic:{if(!r[c+23|0]){break Ic}F=i<<2;q[F+K>>2]=b;o[q[c+8>>2]+i|0]=f;b=d;F=h+F|0}i=i+1|0;q[F>>2]=b;b=r[I|0];if((e|0)>=(b|0)){break Gc}while(1){f=D+(b<<2)|0;if(q[f>>2]){break yc}q[f>>2]=E+(1<<32-b);b=b-1|0;if((e|0)<(b|0)){continue}break}}d=d+1|0;if((j|0)!=(d|0)){continue}break}}b=q[v>>2];if(!b){break uc}d=(b<<2)+11&-8;i=d+q[a+8>>2]|0;q[a+8>>2]=i;b=c;e=q[a+92>>2];Jc:{if(e){j=d;d=q[a+100>>2];f=j+d|0;if((f|0)>q[a+104>>2]){break xc}q[a+100>>2]=f;d=d+e|0;break Jc}if(!d){break xc}d=Yi(d)}q[b+2084>>2]=d;if(!d){break Mb}b=(q[v>>2]<<2)+11&-8;q[a+8>>2]=b+i;d=c;Kc:{if(e){i=b;b=q[a+100>>2];i=i+b|0;if((i|0)>q[a+104>>2]){break wc}q[a+100>>2]=i;b=b+e|0;break Kc}if(!b){break wc}b=Yi(b)}q[d+2088>>2]=b;if(!b){break Nb}i=c+2084|0;j=c+2088|0;q[j>>2]=b+4;q[b>>2]=-1;if(r[c+23|0]){b=q[c+2092>>2];if((b|0)<1){break vc}d=c+2092|0;f=q[c+32>>2];D=q[i>>2];e=0;while(1){E=e<<2;b=q[E+f>>2];b=b>>>1&1431655765|b<<1&-1431655766;b=b>>>2&858993459|b<<2&-858993460;b=b>>>4&252645135|b<<4&-252645136;q[D+E>>2]=Fza(b>>>8&16711935|b<<8&-16711936,16);b=q[d>>2];e=e+1|0;if((b|0)>(e|0)){continue}break}break vc}f=q[k>>2];Lc:{if((f|0)<1){b=0;break Lc}e=0;b=0;while(1){if((r[e+g|0]-11&255)>>>0<=243){d=q[q[c+32>>2]+(e<<2)>>2];d=d>>>1&1431655765|d<<1&-1431655766;d=d>>>2&858993459|d<<2&-858993460;d=d>>>4&252645135|d<<4&-252645136;q[q[i>>2]+(b<<2)>>2]=Fza(d>>>8&16711935|d<<8&-16711936,16);f=q[k>>2];b=b+1|0}e=e+1|0;if((f|0)>(e|0)){continue}break}}if(q[c+2092>>2]==(b|0)){break vc}J(213304,211687,1191,213327);G()}J(213267,211687,1095,213249);G()}J(213279,211687,1109,213249);G()}J(213286,211687,1124,213249);G()}q[(z+w(B,2096)|0)+2084>>2]=0;break Mb}q[(z+w(B,2096)|0)+2088>>2]=0;break Nb}Yx(q[i>>2],b,4,1599);q[q[i>>2]+(q[c+2092>>2]<<2)>>2]=-1;K=c+2092|0;e=r[c+23|0];L=q[(e?K:k)>>2];if((L|0)<1){break tc}d=0;while(1){M=e&255;Mc:{Nc:{if(M){f=r[q[(d<<2)+h>>2]+g|0];if((f|0)!=255){break Nc}J(213381,211687,1171,213396);G()}f=r[d+g|0];if((f-11&255)>>>0>243){break Mc}}N=d<<2;b=q[N+q[c+32>>2]>>2];b=b>>>1&1431655765|b<<1&-1431655766;b=b>>>2&858993459|b<<2&-858993460;b=b>>>4&252645135|b<<4&-252645136;D=Fza(b>>>8&16711935|b<<8&-16711936,16);E=q[i>>2];e=0;b=q[K>>2];if((b|0)>=2){while(1){F=b>>>1|0;O=F+e|0;I=D>>>0>2];e=I?e:O;b=I?F:b-F|0;if((b|0)>1){continue}break}}b=e<<2;if((D|0)!=q[b+E>>2]){break sc}if(M){q[b+q[j>>2]>>2]=q[h+N>>2];o[q[c+8>>2]+e|0]=f;break Mc}q[b+q[j>>2]>>2]=d}d=d+1|0;if((L|0)==(d|0)){break uc}e=r[c+23|0];continue}}e=r[c+23|0]}if(e&255){Oc:{Pc:{Qc:{Rc:{Sc:{if(q[a+92>>2]){q[a+104>>2]=q[a+104>>2]+((q[v>>2]<<2)+7&-8);e=c+32|0;break Sc}Ni(h);e=c+32|0;if(!q[a+92>>2]){break Rc}}q[a+104>>2]=q[a+104>>2]+((q[v>>2]<<2)+7&-8);break Qc}Ni(q[c+32>>2]);if(!q[a+92>>2]){break Pc}}q[a+104>>2]=q[a+104>>2]+(q[k>>2]+7&-8);break Oc}Ni(g)}q[e>>2]=0;b=r[c+23|0]}else{b=0}Ui(c+36|0,255,2048);e=b&255;b=q[(e?c+2092|0:k)>>2];if((b|0)<1){break qc}b=(b|0)<32767?b:32767;d=(b|0)>1?b:1;g=q[c+8>>2];b=0;if(e){break rc}while(1){i=b+g|0;Tc:{if(r[i|0]>10){break Tc}e=q[q[c+32>>2]+(b<<2)>>2];if(e>>>0>=1024){break Tc}while(1){p[(c+(e<<1)|0)+36>>1]=b;e=(1<>>0<1024){continue}break}}b=b+1|0;if((d|0)!=(b|0)){continue}break}break qc}J(213350,211687,1221,213327);G()}i=c+2084|0;while(1){h=b+g|0;Uc:{if(r[h|0]>10){break Uc}e=q[q[i>>2]+(b<<2)>>2];e=e>>>1&1431655765|e<<1&-1431655766;e=e>>>2&858993459|e<<2&-858993460;e=e>>>4&252645135|e<<4&-252645136;e=Fza(e>>>8&16711935|e<<8&-16711936,16);if(e>>>0>1023){break Uc}while(1){p[(c+(e<<1)|0)+36>>1]=b;e=(1<>>0<1024){continue}break}}b=b+1|0;if((d|0)!=(b|0)){continue}break}}b=Fj(a,4);o[c+21|0]=b;b=b&255;if(b>>>0>=3){q[a+112>>2]=20;break Ya}Vc:{if(!b){break Vc}b=Fj(a,32);A=+((b&2097151)>>>0);u[c+12>>2]=Py(+x((b|0)>-1?A:-A),(b>>>21&1023)-788|0);b=Fj(a,32);A=+((b&2097151)>>>0);u[c+16>>2]=Py(+x((b|0)>-1?A:-A),(b>>>21&1023)-788|0);o[c+20|0]=Fj(a,4)+1;o[c+22|0]=Fj(a,1);e=q[c>>2];d=q[k>>2];Wc:{if(r[c+21|0]==1){A=C(fv(+x(x(vF(+x(d|0)))/x(e|0))));Xc:{if(y(A)<2147483648){b=~~A;break Xc}b=-2147483648}A=+(e|0);P=C(Up(+x(x(b|0)+x(1)),A));Yc:{if(y(P)<2147483648){e=~~P;break Yc}e=-2147483648}e=((e|0)<=(d|0))+b|0;H=x(e|0);Zc:{if(Up(+x(H+x(1)),A)<=+(d|0)){break Zc}g=(e|0)<0;A=C(Up(+H,A));_c:{if(y(A)<2147483648){b=~~A;break _c}b=-2147483648}if(g){break Zc}if((b|0)<=(d|0)){break Wc}}q[a+112>>2]=20;break Ya}e=w(d,e)}q[c+24>>2]=e;if(!e){q[a+112>>2]=20;break Ya}b=(e<<1)+7&-8;d=q[a+92>>2];$c:{if(d){b=q[a+104>>2]-b|0;if((b|0)>2]){break Sb}q[a+104>>2]=b;b=b+d|0;break $c}b=Yi(b)}if(!b){break Sb}e=0;f=q[c+24>>2];if((f|0)>0){while(1){d=Fj(a,r[c+20|0]);if((d|0)==-1){ad:{if(q[a+92>>2]){q[a+104>>2]=q[a+104>>2]+((q[c+24>>2]<<1)+7&-8);break ad}Ni(b)}q[a+112>>2]=20;break Ya}p[b+(e<<1)>>1]=d;e=e+1|0;f=q[c+24>>2];if((e|0)<(f|0)){continue}break}}bd:{if(r[c+21|0]==1){e=c;z=r[c+23|0];cd:{if(z){d=q[v>>2];if(!d){g=q[a+92>>2];break bd}i=(w(d,q[c>>2])<<2)+7&-8;q[a+8>>2]=i+q[a+8>>2];g=q[a+92>>2];if(g){d=i;i=q[a+100>>2];h=d+i|0;d=0;if((h|0)>q[a+104>>2]){break cd}q[a+100>>2]=h;d=g+i|0;break cd}d=0;if(!i){break cd}d=Yi(i);break cd}i=(w(q[k>>2],q[c>>2])<<2)+7&-8;q[a+8>>2]=i+q[a+8>>2];g=q[a+92>>2];if(g){d=i;i=q[a+100>>2];h=d+i|0;d=0;if((h|0)>q[a+104>>2]){break cd}q[a+100>>2]=h;d=g+i|0;break cd}d=0;if(!i){break cd}d=Yi(i)}h=d;q[e+28>>2]=h;if(!h){dd:{if(g){q[a+104>>2]=q[a+104>>2]+((q[c+24>>2]<<1)+7&-8);break dd}Ni(b)}q[a+112>>2]=3;break Ya}D=q[(z?v:k)>>2];if((D|0)>=1){E=c+2088|0;k=q[c>>2];H=x(0);i=0;while(1){d=i;d=z?q[q[E>>2]+(d<<2)>>2]:d;ed:{if((k|0)<1){break ed}v=w(i,k);j=q[c+24>>2];f=1;e=0;if(!r[c+22|0]){while(1){u[h+(e+v<<2)>>2]=H+x(x(u[c+16>>2]*x(s[b+(((d>>>0)/(f>>>0)>>>0)%(j>>>0)<<1)>>1]))+u[c+12>>2]);e=e+1|0;if((k|0)<=(e|0)){break ed}Aza(j,0,f,0);if(Li){break Ob}f=w(f,j);continue}}while(1){H=x(H+x(x(u[c+16>>2]*x(s[b+(((d>>>0)/(f>>>0)>>>0)%(j>>>0)<<1)>>1]))+u[c+12>>2]));u[h+(e+v<<2)>>2]=H;e=e+1|0;if((k|0)>(e|0)){Aza(j,0,f,0);if(Li){break Ob}f=w(f,j)}if((e|0)<(k|0)){continue}break}}i=i+1|0;if((D|0)!=(i|0)){continue}break}}o[c+21|0]=2;break bd}d=(f<<2)+7&-8;q[a+8>>2]=d+q[a+8>>2];fd:{gd:{hd:{e=c;g=q[a+92>>2];id:{if(g){i=d;d=q[a+100>>2];i=i+d|0;if((i|0)>q[a+104>>2]){break hd}q[a+100>>2]=i;d=d+g|0;break id}if(!d){break hd}d=Yi(d)}q[e+28>>2]=d;if(!d){break gd}i=q[c+24>>2];if((i|0)<1){break bd}H=x(0);e=0;if(r[c+22|0]){break fd}while(1){u[d+(e<<2)>>2]=x(x(u[c+16>>2]*x(s[b+(e<<1)>>1]))+u[c+12>>2])+x(0);e=e+1|0;if((i|0)!=(e|0)){continue}break}break bd}q[(z+w(B,2096)|0)+28>>2]=0}jd:{if(g){q[a+104>>2]=q[a+104>>2]+((q[c+24>>2]<<1)+7&-8);break jd}Ni(b)}q[a+112>>2]=3;break Ya}while(1){H=x(H+x(x(u[c+16>>2]*x(s[b+(e<<1)>>1]))+u[c+12>>2]));u[d+(e<<2)>>2]=H;e=e+1|0;if((i|0)!=(e|0)){continue}break}}if(g){q[a+104>>2]=q[a+104>>2]+((q[c+24>>2]<<1)+7&-8);break Vc}Ni(b)}B=B+1|0;if((B|0)>2]){continue}break}}kd:{c=Fj(a,6)+1&255;if(!c){break kd}while(1){if(!Fj(a,16)){Q=Q+1|0;if((c|0)!=(Q|0)){continue}break kd}break}q[a+112>>2]=20;break Ya}d=Fj(a,6)+1|0;q[a+140>>2]=d;b=w(d,1596)+7&-8;q[a+8>>2]=b+q[a+8>>2];ld:{md:{nd:{c=a;e=q[a+92>>2];od:{if(e){g=b;b=q[a+100>>2];g=g+b|0;if((g|0)>q[a+104>>2]){break nd}q[a+100>>2]=g;b=b+e|0;break od}if(!b){break nd}b=Yi(b)}q[c+272>>2]=b;if(!b){break md}if((d|0)>=1){break ld}i=0;break Pb}q[a+272>>2]=0}q[a+112>>2]=3;break Ya}i=0;f=0;pd:while(1){c=Fj(a,16);p[((i<<1)+a|0)+144>>1]=c;c=c&65535;if(c>>>0>=2){q[a+112>>2]=20;break Ya}if(!c){c=q[a+272>>2]+w(i,1596)|0;o[c|0]=Fj(a,8);p[c+2>>1]=Fj(a,16);p[c+4>>1]=Fj(a,16);o[c+6|0]=Fj(a,6);o[c+7|0]=Fj(a,8);b=(Fj(a,4)&255)+1|0;o[c+8|0]=b;if((b|0)==(b&255)){b=c+9|0;e=0;while(1){o[b+e|0]=Fj(a,8);e=e+1|0;if(e>>>0>2]=4;break Ya}c=q[a+272>>2]+w(i,1596)|0;d=Fj(a,5);o[c|0]=d;e=-1;h=0;b=0;qd:{if(d&255){while(1){d=Fj(a,4);o[(b+c|0)+1|0]=d;d=d&255;e=(d|0)>(e|0)?d:e;b=b+1|0;if(b>>>0>2]<=(b&255)){break qd}if(r[d+49|0]==31){break rd}}b=0;while(1){g=Fj(a,8)-1|0;p[((c+(h<<4)|0)+(b<<1)|0)+82>>1]=g;if(q[a+132>>2]<=g<<16>>16){break qd}b=b+1|0;if((b|0)<1<>2]=2;g=0;p[c+338>>1]=0;o[c+1589|0]=b;p[c+340>>1]=1<>2];p[(c+(h<<1)|0)+338>>1]=d;d=h+1|0;q[b>>2]=d;e=e+1|0;if(e>>>0>>0<(h&255)>>>0){continue}break}if((d|0)<1){break sd}}e=0;while(1){g=s[(c+(e<<1)|0)+338>>1];h=(e<<2)+n|0;p[h+2>>1]=e;p[h>>1]=g;e=e+1|0;if((d|0)!=(e|0)){continue}break}}Yx(n,d,4,1600);e=0;d=q[b>>2];g=d-1|0;g=(g|0)>0?g:0;while(1){if((e|0)==(g|0)){e=0;td:{if((d|0)<=0){break td}while(1){o[(c+e|0)+838|0]=r[((e<<2)+n|0)+2|0];e=e+1|0;d=q[b>>2];if((e|0)<(d|0)){continue}break}v=2;if((d|0)<=2){break td}while(1){B=c+(v<<1)|0;z=B;h=-1;j=65536;g=0;d=0;e=0;while(1){k=s[(c+(e<<1)|0)+338>>1];if((k|0)>(h|0)){D=k>>>0>1];h=D?k:h;g=D?e:g}if((j|0)>(k|0)){F=k;k=k>>>0>s[z+338>>1];j=k?F:j;d=k?e:d}e=e+1|0;if((v|0)!=(e|0)){continue}break}o[B+1089|0]=d;o[B+1088|0]=g;d=q[b>>2];v=v+1|0;if((d|0)>(v|0)){continue}break}}f=(d|0)>(f|0)?d:f;i=i+1|0;if((i|0)>2]){continue pd}i=(f<<1)+7&-8;break Pb}h=s[(e<<2)+n>>1];e=e+1|0;if((h|0)!=s[(e<<2)+n>>1]){continue}break}}break}q[a+112>>2]=20;break Ya}q[a+112>>2]=3;break Ya}q[a+136>>2]=0;break Kb}c=Fj(a,6)+1|0;q[a+276>>2]=c;d=w(c,24);q[a+8>>2]=d+q[a+8>>2];ud:{vd:{wd:{xd:{yd:{zd:{Ad:{Bd:{Cd:{b=a;c=q[a+92>>2];Dd:{if(c){e=q[a+100>>2];g=e+d|0;if((g|0)>q[a+104>>2]){break Cd}q[a+100>>2]=g;c=c+e|0;break Dd}if(!d){break Cd}c=Yi(d)}q[b+408>>2]=c;if(!c){break ud}j=0;Ui(c,0,d);Ed:{if(q[a+276>>2]>=1){while(1){h=q[a+408>>2];c=Fj(a,16);p[((j<<1)+a|0)+280>>1]=c;if((c&65535)>>>0>=3){q[a+112>>2]=20;break Ya}c=h+w(j,24)|0;q[c>>2]=Fj(a,24);b=Fj(a,24);q[c+4>>2]=b;if(b>>>0>2]){q[a+112>>2]=20;break Ya}q[c+8>>2]=Fj(a,24)+1;o[c+12|0]=Fj(a,6)+1;b=Fj(a,8);o[c+13|0]=b;Fd:{Gd:{if(q[a+132>>2]>(b&255)){e=0;if(r[c+12|0]){break Gd}b=0;break Fd}q[a+112>>2]=20;break Ya}while(1){d=Fj(a,3);g=e+n|0;if(Fj(a,1)){b=Fj(a,5)}else{b=0}o[g|0]=d+(b<<3);b=r[c+12|0];e=e+1|0;if(b>>>0>e>>>0){continue}break}}f=b<<4;d=f+q[a+8>>2]|0;q[a+8>>2]=d;g=c;e=q[a+92>>2];Hd:{if(e){b=q[a+100>>2];f=b+f|0;if((f|0)>q[a+104>>2]){break xd}q[a+100>>2]=f;b=b+e|0;break Hd}if(!b){break xd}b=Yi(f)}q[g+20>>2]=b;if(!b){break wd}k=a;if(r[c+12|0]){e=0;while(1){d=r[e+n|0];Id:{if(d&1){g=Fj(a,8);b=q[c+20>>2];p[b+(e<<4)>>1]=g;if(q[a+132>>2]>g<<16>>16){break Id}break vd}p[(e<<4)+b>>1]=65535}Jd:{if(d&2){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+2>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Jd}p[((e<<4)+b|0)+2>>1]=65535}Kd:{if(d&4){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+4>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Kd}p[((e<<4)+b|0)+4>>1]=65535}Ld:{if(d&8){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+6>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Ld}p[((e<<4)+b|0)+6>>1]=65535}Md:{if(d&16){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+8>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Md}p[((e<<4)+b|0)+8>>1]=65535}Nd:{if(d&32){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+10>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Nd}p[((e<<4)+b|0)+10>>1]=65535}Od:{if(d&64){g=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+12>>1]=g;if(q[a+132>>2]<=g<<16>>16){break vd}break Od}p[((e<<4)+b|0)+12>>1]=65535}Pd:{if(d&128){d=Fj(a,8);b=q[c+20>>2];p[(b+(e<<4)|0)+14>>1]=d;if(q[a+132>>2]<=d<<16>>16){break vd}break Pd}p[((e<<4)+b|0)+14>>1]=65535}e=e+1|0;if(e>>>0>2];d=q[a+8>>2]}f=q[a+136>>2];b=(q[(f+w(r[c+13|0],2096)|0)+4>>2]<<2)+7&-8;q[k+8>>2]=d+b;d=c;Qd:{if(e){g=b;b=q[a+100>>2];g=g+b|0;if((g|0)>q[a+104>>2]){break Ed}q[a+100>>2]=g;b=b+e|0;break Qd}if(!b){break Ed}b=Yi(b)}q[d+16>>2]=b;if(!b){break yd}g=0;Ui(b,0,q[(f+w(r[c+13|0],2096)|0)+4>>2]<<2);e=q[a+136>>2];b=r[c+13|0];if(q[(e+w(b,2096)|0)+4>>2]>0){while(1){d=q[w(b,2096)+e>>2];e=d+7&-8;q[a+8>>2]=e+q[a+8>>2];h=q[a+92>>2];Rd:{if(h){b=e;e=q[a+100>>2];f=b+e|0;b=0;if((f|0)>q[a+104>>2]){break Rd}q[a+100>>2]=f;b=e+h|0;break Rd}b=0;if(!e){break Rd}b=Yi(e)}h=g<<2;q[h+q[c+16>>2]>>2]=b;Sd:{b=q[h+q[c+16>>2]>>2];if(b){if((d|0)<1){break Sd}e=d-1|0;o[b+e|0]=(g>>>0)%r[c+12|0];b=g;if((d|0)==1){break Sd}while(1){d=e-1|0;f=r[c+12|0];b=(b|0)/(f|0)|0;o[d+q[h+q[c+16>>2]>>2]|0]=(b|0)%(f|0);f=(e|0)>1;e=d;if(f){continue}break}break Sd}q[a+112>>2]=3;break Ya}g=g+1|0;e=q[a+136>>2];b=r[c+13|0];if((g|0)>2]){continue}break}}j=j+1|0;if((j|0)>2]){continue}break}}c=Fj(a,6)+1|0;q[a+412>>2]=c;d=w(c,40);q[a+8>>2]=d+q[a+8>>2];Td:{b=a;c=q[a+92>>2];Ud:{if(c){e=q[a+100>>2];g=e+d|0;if((g|0)>q[a+104>>2]){break Td}q[a+100>>2]=g;c=c+e|0;break Ud}if(!d){break Td}c=Yi(d)}q[b+416>>2]=c;if(!c){break zd}j=0;Ui(c,0,d);if(q[a+412>>2]>=1){g=0;while(1){d=q[a+416>>2];if(Fj(a,16)){q[a+112>>2]=20;break Ya}c=w(q[a+4>>2],3)+7&-8;q[a+8>>2]=c+q[a+8>>2];Vd:{Wd:{Xd:{b=q[a+92>>2];Yd:{if(b){e=c;c=q[a+100>>2];e=e+c|0;if((e|0)>q[a+104>>2]){break Xd}q[a+100>>2]=e;b=b+c|0;break Yd}if(!c){break Xd}b=Yi(c)}c=d+w(g,40)|0;q[c+4>>2]=b;if(!b){break Ad}b=c;if(Fj(a,1)){d=Fj(a,4)+1|0}else{d=1}o[b+8|0]=d;Zd:{if(Fj(a,1)){b=Fj(a,8)+1|0;p[c>>1]=b;_d:{e=q[a+4>>2];b=b&65535;if((e|0)>=(b|0)){d=0;if(b){break _d}break Zd}q[a+112>>2]=20;break Ya}while(1){b=a;f=0;$d:{if((e|0)<1){break $d}h=e-1|0;if((e|0)<=16384){f=o[h+211872|0];if((e|0)<=16){break $d}f=o[(h>>>5|0)+211872|0]+5|0;if((e|0)<=512){break $d}f=o[(h>>>10|0)+211872|0]+10|0;break $d}if((e|0)<=16777216){f=o[(h>>>15|0)+211872|0]+15|0;if((e|0)<=524288){break $d}f=o[(h>>>20|0)+211872|0]+20|0;break $d}f=o[(h>>>25|0)+211872|0]+25|0;if((e|0)<=536870912){break $d}f=o[(h>>>30|0)+211872|0]+30|0}b=Fj(b,f);f=w(d,3);o[f+q[c+4>>2]|0]=b;b=a;h=q[a+4>>2];k=0;ae:{if((h|0)<1){break ae}e=h-1|0;if((h|0)<=16384){k=o[e+211872|0];if((h|0)<=16){break ae}k=o[(e>>>5|0)+211872|0]+5|0;if((h|0)<=512){break ae}k=o[(e>>>10|0)+211872|0]+10|0;break ae}if((h|0)<=16777216){k=o[(e>>>15|0)+211872|0]+15|0;if((h|0)<=524288){break ae}k=o[(e>>>20|0)+211872|0]+20|0;break ae}k=o[(e>>>25|0)+211872|0]+25|0;if((h|0)<=536870912){break ae}k=o[(e>>>30|0)+211872|0]+30|0}b=Fj(b,k);h=f+q[c+4>>2]|0;o[h+1|0]=b;e=q[a+4>>2];h=r[h|0];if((e|0)<=(h|0)){q[a+112>>2]=20;break Ya}b=b&255;if((b|0)>=(e|0)){q[a+112>>2]=20;break Ya}if((b|0)!=(h|0)){d=d+1|0;if(d>>>0>=s[c>>1]){break Zd}continue}break}q[a+112>>2]=20;break Ya}p[c>>1]=0}if(Fj(a,2)){q[a+112>>2]=20;break Ya}b=q[a+4>>2];d=r[c+8|0];if(d>>>0<=1){if((b|0)>=1){h=q[c+4>>2];e=0;while(1){o[(h+w(e,3)|0)+2|0]=0;e=e+1|0;if((b|0)!=(e|0)){continue}break}}if(!d){break Vd}break Wd}e=0;if((b|0)<=0){break Wd}while(1){be:{b=Fj(a,4);o[(q[c+4>>2]+w(e,3)|0)+2|0]=b;if(r[c+8|0]<=(b&255)>>>0){break be}e=e+1|0;if((e|0)>2]){continue}break Wd}break}q[a+112>>2]=20;break Ya}q[(d+w(g,40)|0)+4>>2]=0;break Ad}e=0;while(1){Fj(a,8);d=c+e|0;b=d;o[b+9|0]=Fj(a,8);d=Fj(a,8);o[b+24|0]=d;if(q[a+140>>2]<=r[b+9|0]){q[a+112>>2]=20;break Ya}if(q[a+276>>2]>(d&255)){e=e+1|0;if(e>>>0>=r[c+8|0]){break Vd}continue}break}q[a+112>>2]=20;break Ya}g=g+1|0;if((g|0)>2]){continue}break}}c=Fj(a,6)+1|0;q[a+420>>2]=c;ce:{if((c|0)<=0){break ce}while(1){c=w(j,6)+a|0;o[c+424|0]=Fj(a,1);p[c+426>>1]=Fj(a,16);p[c+428>>1]=Fj(a,16);b=Fj(a,8);o[c+425|0]=b;if(s[c+426>>1]){q[a+112>>2]=20;break Ya}if(s[c+428>>1]){q[a+112>>2]=20;break Ya}if(q[a+412>>2]>(b&255)){j=j+1|0;if((j|0)>=q[a+420>>2]){break ce}continue}break}q[a+112>>2]=20;break Ya}de:{while(1){ee:{e=r[l|0];if(!e){if(q[a+1396>>2]){break de}b=q[m>>2];if((b|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break de}if(!(o[a+1387|0]&1)){break ee}b=q[m>>2]}c=b+1|0;q[a+1392>>2]=c;e=r[(a+b|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=b;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[m>>2]=-1}if(r[l|0]){break a}o[l|0]=e;if(!e){break de}}o[a+1388|0]=e-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>2]){q[a+44>>2]=c+1;continue}q[a+108>>2]=1;continue}if((wj(q[a+32>>2])|0)!=-1){continue}q[a+108>>2]=1;continue}break}q[a+112>>2]=32}e=0;q[a+1004>>2]=0;fe:{if(q[a+4>>2]<1){break fe}b=0;if(!i){while(1){i=q[a+128>>2];j=i<<2;g=j+7&-8;h=g+q[a+8>>2]|0;d=q[a+92>>2];ge:{if(d){c=g;g=q[a+100>>2];f=c+g|0;c=0;if((f|0)>q[a+104>>2]){break ge}q[a+100>>2]=f;c=d+g|0;break ge}c=0;if(!g){break ge}c=Yi(g)}g=(b<<2)+a|0;q[g+812>>2]=c;i=(i<<1)+7&2147483640;h=i+h|0;he:{if(d){f=0;k=i;i=q[a+100>>2];l=k+i|0;if((l|0)<=q[a+104>>2]){q[a+100>>2]=l;f=d+i|0}q[g+940>>2]=f;q[a+8>>2]=h;i=d;d=q[a+100>>2];d=(d|0)>q[a+104>>2]?0:i+d|0;break he}d=0;f=0;if(i){f=Yi(i)}q[g+940>>2]=f;q[a+8>>2]=h}q[g+1008>>2]=d;if(!f|(!c|!d)){break Bd}Ui(c,0,j);b=b+1|0;if((b|0)>2]){continue}break fe}}while(1){f=q[a+128>>2];k=f<<2;d=k+7&-8;j=d+q[a+8>>2]|0;h=q[a+92>>2];ie:{if(h){c=d;d=q[a+100>>2];g=c+d|0;c=0;if((g|0)>q[a+104>>2]){break ie}q[a+100>>2]=g;c=d+h|0;break ie}c=0;if(!d){break ie}c=Yi(d)}g=(b<<2)+a|0;q[g+812>>2]=c;d=j;j=(f<<1)+7&2147483640;l=d+j|0;je:{if(h){f=0;d=0;z=j;j=q[a+100>>2];v=z+j|0;if((v|0)<=q[a+104>>2]){q[a+100>>2]=v;d=h+j|0}q[g+940>>2]=d;q[a+8>>2]=i+l;j=q[a+100>>2];l=j+i|0;if((l|0)>q[a+104>>2]){break je}q[a+100>>2]=l;f=h+j|0;break je}h=g;if(j){d=Yi(j)}else{d=0}q[h+940>>2]=d;q[a+8>>2]=i+l;f=Yi(i)}q[g+1008>>2]=f;if(!d|(!c|!f)){break Bd}Ui(c,0,k);b=b+1|0;if((b|0)>2]){continue}break}}if(!BF(a,0,q[a+124>>2])){break b}if(!BF(a,1,q[a+128>>2])){break b}q[a+116>>2]=q[a+124>>2];b=q[a+128>>2];q[a+120>>2]=b;i=a;g=b<<1&2147483646;z=g;j=q[a+276>>2];c=4;ke:{if((j|0)<1){break ke}b=(b|0)/2|0;l=q[a+408>>2];h=0;f=0;while(1){d=l+w(f,24)|0;k=q[d+4>>2];c=b>>>0>k>>>0?k:b;k=q[d>>2];d=(c-(b>>>0>k>>>0?k:b)>>>0)/t[d+8>>2]|0;h=(d|0)>(h|0)?d:h;f=f+1|0;if((j|0)!=(f|0)){continue}break}c=(h<<2)+4|0}c=w(c,q[a+4>>2]);c=c>>>0>>0?z:c;q[i+12>>2]=c;le:{me:{if(!q[a+92>>2]){break me}b=q[a+104>>2];if((b|0)!=q[a+96>>2]){break le}if(b>>>0>=(c+q[a+100>>2]|0)+1524>>>0){break me}q[a+112>>2]=3;break b}if(q[m>>2]==-1){c=a;b=0;ne:{if(r[a+60|0]){break ne}b=q[a+44>>2];if(b){b=b-q[a+48>>2]|0;break ne}b=pm(q[a+32>>2])-q[a+36>>2]|0}q[c+64>>2]=b;e=1;break b}q[a+64>>2]=0;e=1;break b}J(213156,211687,4187,213212);G()}q[a+416>>2]=0;break zd}q[(h+w(j,24)|0)+16>>2]=0;break yd}q[a+408>>2]=0;break ud}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[(h+w(j,24)|0)+20>>2]=0}q[a+112>>2]=3;break Ya}q[a+112>>2]=20;break Ya}q[a+112>>2]=3;break Ya}oe:{if(g){q[a+104>>2]=q[a+104>>2]+((j<<1)+7&-8);break oe}Ni(b)}q[a+112>>2]=20;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=3;break Ya}q[a+112>>2]=20;break Ya}q[a+112>>2]=3;break Ya}q[a+20>>2]=0}q[a+112>>2]=3}e=0;break b}q[a+112>>2]=20;break b}if((d&255)!=100){break c}pe:{qe:{c=q[a+44>>2];re:{if(c){if(c>>>0>=t[a+52>>2]){break qe}q[a+44>>2]=c+1;d=r[c|0];break re}d=wj(q[a+32>>2]);if((d|0)==-1){break qe}}if(d&255){break c}break pe}q[a+108>>2]=1}q[a+112>>2]=38;break b}q[a+112>>2]=34}Ii=n+1008|0;return e}J(211824,211687,1555,211845);G()}function v_(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;u=Ii-144|0;Ii=u;q[q[a>>2]+8>>2]=0;q[a+18436>>2]=0;e=a+18340|0;q[e>>2]=0;q[e+4>>2]=0;e=a+18268|0;q[e>>2]=0;q[e+4>>2]=0;e=a+18196|0;q[e>>2]=0;q[e+4>>2]=0;e=a+18124|0;q[e>>2]=0;q[e+4>>2]=0;a:{b:{if(!gD(a,0)){break b}E=a+18372|0;e=r[a+18372|0];c:{if((e|0)!=255){o[E|0]=255;break c}h=q[a>>2];e=q[h+172>>2];d:{if(e>>>0>2]){q[h+172>>2]=e+1;f=r[e|0];break d}if(!q[h+32>>2]){e=255;break c}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);i=h;e:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;e=h+41|0;break e}f=r[h+40|0];e=e+g|0}q[i+176>>2]=e;q[h+172>>2]=h+41}e=255;if((f&255)!=255){break c}while(1){h=q[a>>2];e=q[h+172>>2];f:{if(e>>>0>2]){q[h+172>>2]=e+1;e=r[e|0];break f}if(!q[h+32>>2]){e=0;break c}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);g:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;f=h+41|0;e=0;break g}f=e+g|0;e=r[h+40|0]}q[h+176>>2]=f;q[h+172>>2]=h+41}if((e&255)==255){continue}break}}F=a+18376|0;y=a+18364|0;n=a+18368|0;h:while(1){i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{e=e&255;switch(e-217|0){case 3:break q;case 0:break s;case 1:break t;default:break r}}h=q[a>>2];g=q[h+172>>2];i=q[h+176>>2];u:{if(g>>>0>>0){e=g+1|0;q[h+172>>2]=e;f=r[g|0];break u}if(!q[h+32>>2]){f=0;e=g;break u}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);v:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;f=0;break v}i=e+g|0;f=r[h+40|0]}q[h+176>>2]=i;e=h+41|0;q[h+172>>2]=e}w:{if(e>>>0>>0){q[h+172>>2]=e+1;i=r[e|0];break w}if(!q[h+32>>2]){i=0;break w}g=h+40|0;j=Mi[q[h+16>>2]](q[h+28>>2],g,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);e=h;x:{if(!j){i=0;o[h+40|0]=0;q[h+32>>2]=0;g=h+41|0;break x}i=r[h+40|0];g=g+j|0}q[e+176>>2]=g;q[h+172>>2]=h+41}j=q[a>>2];e=q[j+172>>2];y:{z:{A:{if(e>>>0>2]){q[j+172>>2]=e+1;e=r[e|0];break A}if(!q[j+32>>2]){q[a+18416>>2]=0;break z}e=j+40|0;g=Mi[q[j+16>>2]](q[j+28>>2],e,q[j+36>>2])|0;q[j+168>>2]=q[j+168>>2]+(q[j+172>>2]-q[j+180>>2]|0);B:{if(!g){o[j+40|0]=0;q[j+32>>2]=0;h=j+41|0;e=0;break B}h=e+g|0;e=r[j+40|0]}q[j+176>>2]=h;q[j+172>>2]=j+41}g=e&255;q[a+18416>>2]=g;if((e-1&255)>>>0>3){break z}e=q[a>>2];if((g|0)<=q[e+8>>2]){break y}}q[213145]=169269;break b}D=0;if(((g<<1)+6|0)!=(i&255|(f&255)<<8)){q[213145]=169269;break b}while(1){i=q[e+176>>2];f=q[e+172>>2];C:{if(i>>>0>f>>>0){g=f+1|0;q[e+172>>2]=g;v=r[f|0];break C}if(!q[e+32>>2]){v=0;g=f;break C}f=e+40|0;h=Mi[q[e+16>>2]](q[e+28>>2],f,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);g=e;D:{if(!h){v=0;o[e+40|0]=0;q[e+32>>2]=0;h=e+41|0;break D}v=r[e+40|0];h=f+h|0}q[g+176>>2]=h;q[e+172>>2]=e+41;e=q[a>>2];i=q[e+176>>2];g=q[e+172>>2]}E:{if(g>>>0>>0){q[e+172>>2]=g+1;j=r[g|0];break E}if(!q[e+32>>2]){j=0;break E}f=e+40|0;h=Mi[q[e+16>>2]](q[e+28>>2],f,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);g=e;F:{if(!h){j=0;o[e+40|0]=0;q[e+32>>2]=0;h=e+41|0;break F}j=r[e+40|0];h=f+h|0}q[g+176>>2]=h;q[e+172>>2]=e+41;e=q[a>>2]}f=0;m=q[e+8>>2];G:{if((m|0)<1){break G}i=v&255;if((i|0)==q[a+18076>>2]){break G}m=q[e+8>>2];f=(m|0)>1?m:1;h=f-1|0;g=0;while(1){if((g|0)==(h|0)){break G}g=g+1|0;if((i|0)!=q[(w(g,72)+a|0)+18076>>2]){continue}break}f=g}if((f|0)==(m|0)){break b}g=w(f,72)+a|0;h=j&255;q[g+18092>>2]=h>>>4;if(h>>>0>=64){q[213145]=169269;break b}i=g+18096|0;g=h&15;q[i>>2]=g;if(g>>>0>=4){q[213145]=169269;break b}q[((D<<2)+a|0)+18420>>2]=f;D=D+1|0;if((D|0)>2]){continue}break}g=q[e+176>>2];h=q[e+172>>2];H:{if(g>>>0>h>>>0){i=h+1|0;q[e+172>>2]=i;f=r[h|0];break H}if(!q[e+32>>2]){f=0;i=h;break H}g=e+40|0;f=Mi[q[e+16>>2]](q[e+28>>2],g,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);I:{if(!f){o[e+40|0]=0;q[e+32>>2]=0;g=e+41|0;f=0;break I}g=f+g|0;f=r[e+40|0]}q[e+176>>2]=g;q[e+172>>2]=e+41;e=q[a>>2];g=q[e+176>>2];i=q[e+172>>2]}q[a+18384>>2]=f&255;J:{if(g>>>0>i>>>0){h=i+1|0;q[e+172>>2]=h;f=r[i|0];break J}if(!q[e+32>>2]){f=0;h=i;break J}g=e+40|0;f=Mi[q[e+16>>2]](q[e+28>>2],g,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);K:{if(!f){o[e+40|0]=0;q[e+32>>2]=0;g=e+41|0;f=0;break K}g=f+g|0;f=r[e+40|0]}q[e+176>>2]=g;q[e+172>>2]=e+41;e=q[a>>2];g=q[e+176>>2];h=q[e+172>>2]}q[a+18388>>2]=f&255;L:{if(g>>>0>h>>>0){q[e+172>>2]=h+1;g=r[h|0];break L}if(!q[e+32>>2]){g=0;break L}g=e+40|0;f=Mi[q[e+16>>2]](q[e+28>>2],g,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);M:{if(!f){o[e+40|0]=0;q[e+32>>2]=0;i=e+41|0;g=0;break M}i=f+g|0;g=r[e+40|0]}q[e+176>>2]=i;q[e+172>>2]=e+41}h=g&15;q[a+18396>>2]=h;e=g>>>4&15;q[a+18392>>2]=e;i=q[a+18384>>2];f=q[a+18380>>2];N:{if(f){O:{if((i|0)>63){break O}e=q[a+18388>>2];if((e|0)>63|(e|0)<(i|0)|(g&255)>>>0>223){break O}if(h>>>0<14){break N}}q[213145]=169269;break b}if(i){q[213145]=169269;break b}if(e|h){q[213145]=169269;break b}q[a+18388>>2]=63}q[a+18376>>2]=0;q[a+18364>>2]=0;q[a+18368>>2]=0;q[a+18316>>2]=0;q[a+18244>>2]=0;q[a+18172>>2]=0;o[a+18372|0]=255;q[a+18100>>2]=0;q[a+18400>>2]=0;e=q[a+18436>>2];e=e?e:2147483647;q[a+18440>>2]=e;g=q[a+18416>>2];if(!f){if((g|0)==1){I=q[a+18420>>2];g=w(I,72)+a|0;e=q[g+18108>>2];if((e|0)<1){break n}e=e+7>>3;C=(e|0)>1?e:1;J=q[g+18104>>2];e=J+7>>3;K=(e|0)>1?e:1;z=g+18112|0;x=g+18120|0;A=g+18088|0;B=g+18092|0;m=g+18096|0;v=0;while(1){if((J|0)>=1){j=v<<3;D=0;h=0;while(1){e=q[m>>2];if(!fD(a,u+16|0,(w(q[B>>2],1680)+a|0)+4|0,(w(e,1680)+a|0)+6724|0,((e<<10)+a|0)+13956|0,I,((q[A>>2]<<7)+a|0)+13444|0)){break o}e=q[z>>2];Mi[q[a+18444>>2]]((q[x>>2]+w(e,j)|0)+(h<<3)|0,e,u+16|0);e=q[a+18440>>2];q[a+18440>>2]=e-1;if((e|0)<=1){P:{if(q[n>>2]>23){break P}while(1){g=0;Q:{if(q[F>>2]){break Q}f=q[a>>2];e=q[f+172>>2];R:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break R}if(!q[f+32>>2]){break Q}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);S:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;g=0;break S}i=e+g|0;g=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g&255)!=255){break Q}f=q[a>>2];e=q[f+172>>2];T:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break T}if(!q[f+32>>2]){e=0;break T}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);U:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break U}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}while(1){g=255;f=e&255;if((f|0)!=255){if(!f){break Q}o[E|0]=e;q[F>>2]=1;break P}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);V:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break V}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;q[n>>2]=e+8;if((e|0)<17){continue}break}}if((r[E|0]&248)!=208){break n}q[a+18376>>2]=0;q[a+18364>>2]=0;q[a+18368>>2]=0;q[a+18316>>2]=0;q[a+18244>>2]=0;q[a+18172>>2]=0;o[a+18372|0]=255;q[a+18100>>2]=0;q[a+18400>>2]=0;e=q[a+18436>>2];q[a+18440>>2]=e?e:2147483647}h=h+1|0;if((K|0)!=(h|0)){continue}break}}D=1;v=v+1|0;if((C|0)!=(v|0)){continue}break}break o}i=q[a+18064>>2];if((i|0)<1){break n}g=q[a+18060>>2];j=0;while(1){D=0;if((g|0)>=1){while(1){v=0;h=q[a+18416>>2];if((h|0)>=1){while(1){C=q[((v<<2)+a|0)+18420>>2];e=w(C,72)+a|0;J=e+18084|0;i=q[J>>2];if((i|0)>=1){K=e+18112|0;z=e+18120|0;x=e+18088|0;A=e+18092|0;B=e+18096|0;m=e+18080|0;e=q[m>>2];f=0;while(1){g=0;if((e|0)>=1){while(1){h=q[B>>2];if(!fD(a,u+16|0,(w(q[A>>2],1680)+a|0)+4|0,(w(h,1680)+a|0)+6724|0,((h<<10)+a|0)+13956|0,C,((q[x>>2]<<7)+a|0)+13444|0)){break b}h=q[K>>2];Mi[q[a+18444>>2]]((q[z>>2]+(w(h,w(i,j)+f|0)<<3)|0)+(w(e,D)+g<<3)|0,h,u+16|0);i=q[J>>2];e=q[m>>2];g=g+1|0;if((e|0)>(g|0)){continue}break}}f=f+1|0;if((i|0)>(f|0)){continue}break}h=q[a+18416>>2]}v=v+1|0;if((v|0)<(h|0)){continue}break}e=q[a+18440>>2]}h=e-1|0;q[a+18440>>2]=h;if((e|0)<=1){W:{if(q[n>>2]>23){break W}while(1){g=0;X:{if(q[F>>2]){break X}f=q[a>>2];e=q[f+172>>2];Y:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break Y}if(!q[f+32>>2]){break X}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Z:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;g=0;break Z}i=e+g|0;g=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g&255)!=255){break X}f=q[a>>2];e=q[f+172>>2];_:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break _}if(!q[f+32>>2]){e=0;break _}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);$:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break $}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}while(1){g=255;f=e&255;if((f|0)!=255){if(!f){break X}o[E|0]=e;q[F>>2]=1;break W}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);aa:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break aa}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;q[n>>2]=e+8;if((e|0)<17){continue}break}}if((r[E|0]&248)!=208){break n}q[a+18376>>2]=0;q[a+18364>>2]=0;q[a+18368>>2]=0;q[a+18316>>2]=0;q[a+18244>>2]=0;q[a+18172>>2]=0;o[a+18372|0]=255;q[a+18100>>2]=0;q[a+18400>>2]=0;e=q[a+18436>>2];h=e?e:2147483647;q[a+18440>>2]=h}e=h;g=q[a+18060>>2];D=D+1|0;if((g|0)>(D|0)){continue}break}i=q[a+18064>>2]}D=1;j=j+1|0;if((j|0)<(i|0)){continue}break}break o}if((g|0)==1){break p}i=q[a+18064>>2];if((i|0)<1){break n}g=q[a+18060>>2];D=0;while(1){f=0;if((g|0)>=1){while(1){v=0;h=q[a+18416>>2];if((h|0)>=1){while(1){z=q[((v<<2)+a|0)+18420>>2];e=w(z,72)+a|0;x=e+18084|0;i=q[x>>2];if((i|0)>=1){A=e+18092|0;B=e+18140|0;m=e+18136|0;j=e+18080|0;e=q[j>>2];h=0;while(1){g=0;if((e|0)>0){while(1){if(!eD(a,q[m>>2]+((w(e,f)+g|0)+w(q[B>>2],w(i,D)+h|0)<<7)|0,(w(q[A>>2],1680)+a|0)+4|0,z)){break b}i=q[x>>2];e=q[j>>2];g=g+1|0;if((e|0)>(g|0)){continue}break}}h=h+1|0;if((i|0)>(h|0)){continue}break}h=q[a+18416>>2]}v=v+1|0;if((v|0)<(h|0)){continue}break}e=q[a+18440>>2]}h=e-1|0;q[a+18440>>2]=h;if((e|0)<=1){ba:{if(q[n>>2]>23){break ba}while(1){g=0;ca:{if(q[F>>2]){break ca}h=q[a>>2];e=q[h+172>>2];da:{if(e>>>0>2]){q[h+172>>2]=e+1;g=r[e|0];break da}if(!q[h+32>>2]){break ca}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);ea:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;g=0;break ea}i=e+g|0;g=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41}if((g&255)!=255){break ca}h=q[a>>2];e=q[h+172>>2];fa:{if(e>>>0>2]){q[h+172>>2]=e+1;e=r[e|0];break fa}if(!q[h+32>>2]){e=0;break fa}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);ga:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;e=0;break ga}i=e+g|0;e=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41}while(1){g=255;h=e&255;if((h|0)!=255){if(!h){break ca}o[E|0]=e;q[F>>2]=1;break ba}h=q[a>>2];e=q[h+172>>2];if(e>>>0>2]){q[h+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[h+32>>2]){continue}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);ha:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;e=0;break ha}i=e+g|0;e=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;q[n>>2]=e+8;if((e|0)<17){continue}break}}e=r[E|0];if((e&248)!=208){break m}q[a+18376>>2]=0;q[a+18364>>2]=0;q[a+18368>>2]=0;q[a+18316>>2]=0;q[a+18244>>2]=0;q[a+18172>>2]=0;o[a+18372|0]=255;q[a+18100>>2]=0;q[a+18400>>2]=0;e=q[a+18436>>2];h=e?e:2147483647;q[a+18440>>2]=h}e=h;g=q[a+18060>>2];f=f+1|0;if((g|0)>(f|0)){continue}break}i=q[a+18064>>2]}D=D+1|0;if((D|0)<(i|0)){continue}break}break n}ia:{if(!q[a+18380>>2]){break ia}e=q[a>>2];if(q[e+8>>2]<1){break ia}i=0;while(1){h=w(i,72)+a|0;f=q[h+18108>>2];ja:{if((f|0)<1){break ja}g=q[h+18104>>2];if((g|0)<1){break ja}C=h+18112|0;J=h+18120|0;K=h+18088|0;z=h+18140|0;x=h+18136|0;e=f+7>>3;A=(e|0)>1?e:1;e=g+7>>3;B=(e|0)>1?e:1;f=0;while(1){m=f<<3;h=0;while(1){I=q[x>>2]+(w(q[z>>2],f)+h<<7)|0;v=q[K>>2];g=0;while(1){j=g<<1;e=j+I|0;p[e>>1]=w(s[e>>1],s[(j+((v<<7)+a|0)|0)+13444>>1]);g=g+1|0;if((g|0)!=64){continue}break}e=q[C>>2];Mi[q[a+18444>>2]]((q[J>>2]+w(e,m)|0)+(h<<3)|0,e,I);h=h+1|0;if((B|0)!=(h|0)){continue}break}f=f+1|0;if((A|0)!=(f|0)){continue}break}e=q[a>>2]}i=i+1|0;if((i|0)>2]){continue}break}}h=q[a>>2];g=q[h+8>>2];G=(g|0)<3?1:3;e=(g|0)!=3;i=0;ka:{if(e){break ka}i=1;if(q[a+18412>>2]==3){break ka}i=0;if(q[a+18408>>2]){break ka}i=!q[a+18404>>2]}q[u+8>>2]=0;q[u+12>>2]=0;q[u>>2]=0;q[u+4>>2]=0;la:{ma:{I=(G|0)>2?g:e?g:i?g:1;if((I|0)<1){break ma}e=Yi(q[h>>2]+3|0);q[a+18132>>2]=e;if(!e){break la}g=q[a>>2];v=q[a+18056>>2];j=q[a+18052>>2];e=0;while(1){x=(u+16|0)+(e<<5)|0;B=w(e,72)+a|0;m=(j|0)/q[B+18080>>2]|0;q[x+12>>2]=m;A=(v|0)/q[B+18084>>2]|0;q[x+16>>2]=A;q[x+24>>2]=A>>1;f=q[h>>2];q[x+28>>2]=0;h=m-1|0;q[x+20>>2]=(h+f>>>0)/(m>>>0);f=q[B+18120>>2];q[x+4>>2]=f;q[x+8>>2]=f;na:{oa:{pa:{switch(h|0){case 0:h=(A|0)==1?1390:(A|0)==2?1391:1392;break na;case 1:break pa;default:break oa}}h=1393;qa:{switch(A-1|0){case 0:break na;case 1:break qa;default:break oa}}h=q[a+18452>>2];break na}h=1392}q[x>>2]=h;e=e+1|0;if((I|0)==(e|0)){h=g;break ma}f=Yi(q[g>>2]+3|0);q[(w(e,72)+a|0)+18132>>2]=f;h=g;if(f){continue}break}break la}f=0;ra:{e=q[h>>2];if((e|G)<0){break ra}g=q[h+4>>2];if((G|0)>(2147483647/(e|0)|0)?e:0){break ra}e=w(e,G);if((e|g)<0|((e|0)>(2147483647/(g|0)|0)?g:0)){break ra}e=w(e,g);if((e|0)==2147483647){break ra}e=Yi(e+1|0);if(!e){break ra}if(q[h+4>>2]){J=(I|0)<1;K=(G|0)<3;v=0;while(1){B=w(q[h>>2],w(v,G));f=0;if(!J){while(1){x=w(f,72)+a|0;C=(u+16|0)+(f<<5)|0;A=C|4;z=C|8;j=q[C+24>>2];m=q[C+16>>2];g=(j|0)>1;h=Mi[q[C>>2]](q[x+18132>>2],q[(g?A:z)>>2],q[(g?z:A)>>2],q[C+20>>2],q[C+12>>2])|0;g=j+1|0;q[C+24>>2]=g;q[(f<<2)+u>>2]=h;sa:{if((g|0)<(m|0)){break sa}q[C+24>>2]=0;h=q[z>>2];q[A>>2]=h;g=q[C+28>>2]+1|0;q[C+28>>2]=g;if((g|0)>=q[x+18108>>2]){break sa}q[z>>2]=h+q[x+18112>>2]}f=f+1|0;if((I|0)!=(f|0)){continue}break}}g=e+B|0;ta:{if(!K){x=q[u>>2];ua:{va:{wa:{z=q[a>>2];switch(q[z+8>>2]-3|0){case 1:break va;case 0:break wa;default:break ua}}if(i){if(!q[z>>2]){break ta}f=0;m=q[u+8>>2];j=q[u+4>>2];while(1){o[g|0]=r[f+x|0];o[g+1|0]=r[f+j|0];h=r[f+m|0];o[g+3|0]=255;o[g+2|0]=h;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}Mi[q[a+18448>>2]](g,x,q[u+4>>2],q[u+8>>2],q[z>>2],G);break ta}xa:{switch(q[a+18408>>2]){case 0:if(!q[z>>2]){break ta}f=0;B=q[u+8>>2];m=q[u+4>>2];j=q[u+12>>2];while(1){A=r[f+j|0];h=w(A,r[f+x|0])+128|0;o[g|0]=(h>>>8|0)+h>>>8;h=w(A,r[f+m|0])+128|0;o[g+1|0]=(h>>>8|0)+h>>>8;h=r[f+B|0];o[g+3|0]=255;h=w(h,A)+128|0;o[g+2|0]=(h>>>8|0)+h>>>8;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta;case 2:Mi[q[a+18448>>2]](g,x,q[u+4>>2],q[u+8>>2],q[z>>2],G);m=q[a>>2];if(!q[m>>2]){break ta}f=0;j=q[u+12>>2];while(1){B=r[f+j|0];h=w(B,r[g|0]^255)+128|0;o[g|0]=(h>>>8|0)+h>>>8;h=w(B,r[g+1|0]^255)+128|0;o[g+1|0]=(h>>>8|0)+h>>>8;h=w(B,r[g+2|0]^255)+128|0;o[g+2|0]=(h>>>8|0)+h>>>8;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta;default:break xa}}Mi[q[a+18448>>2]](g,x,q[u+4>>2],q[u+8>>2],q[z>>2],G);break ta}f=0;if(!q[z>>2]){break ta}while(1){h=r[f+x|0];o[g+1|0]=h;o[g+2|0]=h;o[g+3|0]=255;o[g|0]=h;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}H=q[a>>2];if(i){f=q[H>>2];if((G|0)!=1){if(!f){break ta}f=0;x=q[u+8>>2];A=q[u+4>>2];B=q[u>>2];while(1){m=r[f+x|0];j=r[f+A|0];h=r[f+B|0];o[g+1|0]=255;o[g|0]=(w(j,150)+w(h,77)|0)+w(m,29)>>>8;g=g+2|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}if(!f){break ta}f=0;m=q[u+8>>2];j=q[u+4>>2];h=q[u>>2];while(1){o[g|0]=(w(r[f+j|0],150)+w(r[f+h|0],77)|0)+w(r[f+m|0],29)>>>8;g=g+1|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}ya:{if(q[H+8>>2]!=4){break ya}za:{switch(q[a+18408>>2]){case 0:if(!q[H>>2]){break ta}f=0;z=q[u+8>>2];x=q[u+4>>2];A=q[u>>2];B=q[u+12>>2];while(1){m=r[f+z|0];h=r[f+x|0];j=r[f+A|0];C=r[f+B|0];o[g+1|0]=255;h=w(h,C)+128|0;L=w((h>>>8|0)+h>>>8|0,150);h=w(j,C)+128|0;j=L+w((h>>>8|0)+h>>>8|0,77)|0;h=w(m,C)+128|0;o[g|0]=j+w((h>>>8|0)+h>>>8|0,29)>>>8;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta;case 2:break za;default:break ya}}if(!q[H>>2]){break ta}f=0;B=q[u+12>>2];m=q[u>>2];while(1){j=r[f+B|0];h=r[f+m|0];o[g+1|0]=255;h=w(j,h^255)+128|0;o[g|0]=(h>>>8|0)+h>>>8;g=g+G|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}h=q[H>>2];j=q[u>>2];if((G|0)!=1){f=0;if(!h){break ta}while(1){h=r[f+j|0];o[g+1|0]=255;o[g|0]=h;g=g+2|0;f=f+1|0;if(f>>>0>2]){continue}break}break ta}f=0;if(!h){break ta}while(1){o[f+g|0]=r[f+j|0];f=f+1|0;if(f>>>0>2]){continue}break}}v=v+1|0;h=q[a>>2];if(v>>>0>2]){continue}break}}i=q[h+8>>2];if((i|0)>=1){f=0;while(1){j=w(f,72)+a|0;h=j+18124|0;g=q[h>>2];if(g){Ni(g);q[h>>2]=0;q[j+18120>>2]=0}h=j+18128|0;g=q[h>>2];if(g){Ni(g);q[h>>2]=0;q[j+18136>>2]=0}h=j+18132|0;g=q[h>>2];if(g){Ni(g);q[h>>2]=0}f=f+1|0;if((i|0)!=(f|0)){continue}break}h=q[a>>2]}q[b>>2]=q[h>>2];q[c>>2]=q[h+4>>2];if(!d){break a}q[d>>2]=q[h+8>>2]<3?1:3;break a}d=q[h+8>>2];if((d|0)>=1){while(1){e=w(f,72)+a|0;c=e+18124|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[e+18120>>2]=0}c=e+18128|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[e+18136>>2]=0}c=e+18132|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0}f=f+1|0;if((d|0)!=(f|0)){continue}break}}q[213145]=169512;e=0;break a}e=0;d=q[h+8>>2];if((d|0)>0){while(1){g=w(e,72)+a|0;c=g+18124|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[g+18120>>2]=0}c=g+18128|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[g+18136>>2]=0}c=g+18132|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0}e=e+1|0;if((d|0)!=(e|0)){continue}break}q[213145]=169512;e=0;break a}q[213145]=169512;break a}if(!dD(a,e)){break b}break l}h=q[a>>2];g=q[h+172>>2];i=q[h+176>>2];Aa:{if(g>>>0>>0){e=g+1|0;q[h+172>>2]=e;f=r[g|0];break Aa}if(!q[h+32>>2]){f=0;e=g;break Aa}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);Ba:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;f=0;break Ba}i=e+g|0;f=r[h+40|0]}q[h+176>>2]=i;e=h+41|0;q[h+172>>2]=e}g=f&255;Ca:{if(e>>>0>>0){q[h+172>>2]=e+1;e=r[e|0];break Ca}if(!q[h+32>>2]){e=0;break Ca}e=h+40|0;f=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);Da:{if(!f){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;e=0;break Da}i=e+f|0;e=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41}j=g<<8;h=e&255;f=q[a>>2];g=q[f+172>>2];i=q[f+176>>2];Ea:{if(g>>>0>>0){e=g+1|0;q[f+172>>2]=e;m=r[g|0];break Ea}if(!q[f+32>>2]){m=0;e=g;break Ea}g=f+40|0;i=Mi[q[f+16>>2]](q[f+28>>2],g,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);e=f;Fa:{if(!i){m=0;o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;break Fa}m=r[f+40|0];i=g+i|0}q[e+176>>2]=i;e=f+41|0;q[f+172>>2]=e}g=h|j;Ga:{if(e>>>0>>0){q[f+172>>2]=e+1;e=r[e|0];break Ga}if(!q[f+32>>2]){e=0;break Ga}e=f+40|0;h=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Ha:{if(!h){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Ha}i=e+h|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g|0)!=4){q[213145]=169269;break b}if(q[q[a>>2]+4>>2]==(e&255|(m&255)<<8)){break l}q[213145]=169269;break b}I=q[a+18420>>2];g=w(I,72)+a|0;e=q[g+18108>>2];if((e|0)<1){break n}e=e+7>>3;C=(e|0)>1?e:1;J=q[g+18104>>2];e=J+7>>3;K=(e|0)>1?e:1;z=g+18092|0;x=g+18096|0;A=g+18140|0;B=g+18136|0;D=0;while(1){L=0;if((J|0)>=1){while(1){N=q[B>>2]+(w(q[A>>2],D)+L<<7)|0;f=q[a+18384>>2];Ia:{if(!f){if(eD(a,N,(w(q[z>>2],1680)+a|0)+4|0,I)){break Ia}break b}m=q[x>>2];G=(w(m,1680)+a|0)+6724|0;H=q[a+18396>>2];if(!q[a+18392>>2]){e=q[a+18400>>2];if(e){q[a+18400>>2]=e-1;break Ia}while(1){Ja:{if(q[n>>2]>15){break Ja}while(1){g=0;Ka:{if(q[F>>2]){break Ka}h=q[a>>2];e=q[h+172>>2];La:{if(e>>>0>2]){q[h+172>>2]=e+1;g=r[e|0];break La}if(!q[h+32>>2]){break Ka}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);Ma:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;g=0;break Ma}i=e+g|0;g=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41}if((g&255)!=255){break Ka}h=q[a>>2];e=q[h+172>>2];Na:{if(e>>>0>2]){q[h+172>>2]=e+1;e=r[e|0];break Na}if(!q[h+32>>2]){e=0;break Na}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);Oa:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;e=0;break Oa}i=e+g|0;e=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41}while(1){g=255;h=e&255;if((h|0)!=255){if(!h){break Ka}o[E|0]=e;q[F>>2]=1;break Ja}h=q[a>>2];e=q[h+172>>2];if(e>>>0>2]){q[h+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[h+32>>2]){continue}e=h+40|0;g=Mi[q[h+16>>2]](q[h+28>>2],e,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);Pa:{if(!g){o[h+40|0]=0;q[h+32>>2]=0;i=h+41|0;e=0;break Pa}i=e+g|0;e=r[h+40|0]}q[h+176>>2]=i;q[h+172>>2]=h+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;q[n>>2]=e+8;if((e|0)<17){continue}break}}e=q[a+18364>>2];g=p[(((m<<10)+a|0)+(e>>>22&1022)|0)+13956>>1];Qa:{if(g){h=e;e=g&15;q[y>>2]=h<>2]=q[n>>2]-e;e=(g>>>4&15)+f|0;p[(r[e+169296|0]<<1)+N>>1]=g>>8<>>4|0;Ra:{k=e&15;if(!k){if((e|0)>239){break Ra}q[a+18400>>2]=1<>2]=0;break Ia}i=q[n>>2];Sa:{if((j|0)<=(i|0)){break Sa}while(1){g=0;Ta:{if(q[F>>2]){break Ta}f=q[a>>2];e=q[f+172>>2];Ua:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break Ua}if(!q[f+32>>2]){break Ta}h=f+40|0;i=Mi[q[f+16>>2]](q[f+28>>2],h,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);e=f;Va:{if(!i){o[f+40|0]=0;q[f+32>>2]=0;h=f+41|0;break Va}g=r[f+40|0];h=h+i|0}q[e+176>>2]=h;q[f+172>>2]=f+41}if((g&255)!=255){break Ta}g=q[a>>2];e=q[g+172>>2];Wa:{if(e>>>0>2]){q[g+172>>2]=e+1;i=r[e|0];break Wa}if(!q[g+32>>2]){i=0;break Wa}f=g+40|0;h=Mi[q[g+16>>2]](q[g+28>>2],f,q[g+36>>2])|0;q[g+168>>2]=q[g+168>>2]+(q[g+172>>2]-q[g+180>>2]|0);e=g;Xa:{if(!h){i=0;o[g+40|0]=0;q[g+32>>2]=0;h=g+41|0;break Xa}i=r[g+40|0];h=f+h|0}q[e+176>>2]=h;q[g+172>>2]=g+41}while(1){g=255;e=i&255;if((e|0)!=255){if(!e){break Ta}o[E|0]=i;q[F>>2]=1;i=q[n>>2];break Sa}g=q[a>>2];e=q[g+172>>2];if(e>>>0>2]){q[g+172>>2]=e+1;i=r[e|0];continue}i=0;if(!q[g+32>>2]){continue}f=g+40|0;h=Mi[q[g+16>>2]](q[g+28>>2],f,q[g+36>>2])|0;q[g+168>>2]=q[g+168>>2]+(q[g+172>>2]-q[g+180>>2]|0);e=g;Ya:{if(!h){o[g+40|0]=0;q[g+32>>2]=0;h=g+41|0;break Ya}i=r[g+40|0];h=f+h|0}q[e+176>>2]=h;q[g+172>>2]=g+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;i=e+8|0;q[n>>2]=i;if((e|0)<17){continue}break}}q[a+18368>>2]=i-j;g=Fza(q[a+18364>>2],j);e=q[(j<<2)+169552>>2];q[a+18364>>2]=g&(e^-1);q[a+18400>>2]=(q[a+18400>>2]+(e&g)|0)-1;break Ia}v=f+j|0;j=r[v+169296|0];e=q[n>>2];Za:{if((k|0)<=(e|0)){break Za}while(1){g=0;_a:{if(q[F>>2]){break _a}f=q[a>>2];e=q[f+172>>2];$a:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break $a}if(!q[f+32>>2]){break _a}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);ab:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;g=0;break ab}i=e+g|0;g=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g&255)!=255){break _a}f=q[a>>2];e=q[f+172>>2];bb:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break bb}if(!q[f+32>>2]){e=0;break bb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);cb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break cb}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}while(1){g=255;f=e&255;if((f|0)!=255){if(!f){break _a}o[E|0]=e;q[F>>2]=1;e=q[n>>2];break Za}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);db:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break db}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;continue}}e=g&255;g=q[n>>2];q[y>>2]=q[y>>2]|e<<24-g;e=g+8|0;q[n>>2]=e;if((g|0)<17){continue}break}}h=q[y>>2];i=Fza(h,k);f=k<<2;g=q[f+169552>>2];q[y>>2]=i&(g^-1);q[n>>2]=e-k;p[(j<<1)+N>>1]=(q[f+169728>>2]&(h>>31^-1))+(g&i)<>2]){continue}break}break Ia}M=1<>2];if(!e){H=M<<16>>16;m=0-H|0;while(1){g=ds(a,G);if((g|0)<=-1){q[213145]=169269;break b}h=g>>>4|0;eb:{fb:{gb:{hb:{switch(g&15){case 0:v=0;e=0;if((g|0)>239){break gb}q[a+18400>>2]=-1<>2];ib:{if((h|0)<=(e|0)){break ib}while(1){g=0;jb:{if(q[F>>2]){break jb}k=q[a>>2];e=q[k+172>>2];kb:{if(e>>>0>2]){q[k+172>>2]=e+1;g=r[e|0];break kb}if(!q[k+32>>2]){break jb}e=k+40|0;g=Mi[q[k+16>>2]](q[k+28>>2],e,q[k+36>>2])|0;q[k+168>>2]=q[k+168>>2]+(q[k+172>>2]-q[k+180>>2]|0);lb:{if(!g){o[k+40|0]=0;q[k+32>>2]=0;i=k+41|0;g=0;break lb}i=e+g|0;g=r[k+40|0]}q[k+176>>2]=i;q[k+172>>2]=k+41}if((g&255)!=255){break jb}k=q[a>>2];e=q[k+172>>2];mb:{if(e>>>0>2]){q[k+172>>2]=e+1;e=r[e|0];break mb}if(!q[k+32>>2]){e=0;break mb}e=k+40|0;g=Mi[q[k+16>>2]](q[k+28>>2],e,q[k+36>>2])|0;q[k+168>>2]=q[k+168>>2]+(q[k+172>>2]-q[k+180>>2]|0);nb:{if(!g){o[k+40|0]=0;q[k+32>>2]=0;i=k+41|0;e=0;break nb}i=e+g|0;e=r[k+40|0]}q[k+176>>2]=i;q[k+172>>2]=k+41}while(1){g=255;i=e&255;if((i|0)!=255){if(!i){break jb}o[E|0]=e;q[F>>2]=1;e=q[n>>2];break ib}k=q[a>>2];e=q[k+172>>2];if(e>>>0>2]){q[k+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[k+32>>2]){continue}e=k+40|0;g=Mi[q[k+16>>2]](q[k+28>>2],e,q[k+36>>2])|0;q[k+168>>2]=q[k+168>>2]+(q[k+172>>2]-q[k+180>>2]|0);ob:{if(!g){o[k+40|0]=0;q[k+32>>2]=0;i=k+41|0;e=0;break ob}i=e+g|0;e=r[k+40|0]}q[k+176>>2]=i;q[k+172>>2]=k+41;continue}}e=g&255;g=q[n>>2];q[y>>2]=q[y>>2]|e<<24-g;e=g+8|0;q[n>>2]=e;if((g|0)<17){continue}break}}q[a+18368>>2]=e-h;g=Fza(q[a+18364>>2],h);e=q[(h<<2)+169552>>2];q[a+18364>>2]=g&(e^-1);q[a+18400>>2]=q[a+18400>>2]+(e&g);break fb;case 1:break hb;default:break eb}}e=q[n>>2];pb:{if((e|0)>0){break pb}while(1){g=0;qb:{if(q[F>>2]){break qb}j=q[a>>2];e=q[j+172>>2];rb:{if(e>>>0>2]){q[j+172>>2]=e+1;g=r[e|0];break rb}if(!q[j+32>>2]){break qb}e=j+40|0;g=Mi[q[j+16>>2]](q[j+28>>2],e,q[j+36>>2])|0;q[j+168>>2]=q[j+168>>2]+(q[j+172>>2]-q[j+180>>2]|0);sb:{if(!g){o[j+40|0]=0;q[j+32>>2]=0;i=j+41|0;g=0;break sb}i=e+g|0;g=r[j+40|0]}q[j+176>>2]=i;q[j+172>>2]=j+41}if((g&255)!=255){break qb}j=q[a>>2];e=q[j+172>>2];tb:{if(e>>>0>2]){q[j+172>>2]=e+1;e=r[e|0];break tb}if(!q[j+32>>2]){e=0;break tb}e=j+40|0;g=Mi[q[j+16>>2]](q[j+28>>2],e,q[j+36>>2])|0;q[j+168>>2]=q[j+168>>2]+(q[j+172>>2]-q[j+180>>2]|0);ub:{if(!g){o[j+40|0]=0;q[j+32>>2]=0;i=j+41|0;e=0;break ub}i=e+g|0;e=r[j+40|0]}q[j+176>>2]=i;q[j+172>>2]=j+41}while(1){g=255;i=e&255;if((i|0)!=255){if(!i){break qb}o[E|0]=e;q[F>>2]=1;e=q[n>>2];break pb}j=q[a>>2];e=q[j+172>>2];if(e>>>0>2]){q[j+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[j+32>>2]){continue}e=j+40|0;g=Mi[q[j+16>>2]](q[j+28>>2],e,q[j+36>>2])|0;q[j+168>>2]=q[j+168>>2]+(q[j+172>>2]-q[j+180>>2]|0);vb:{if(!g){o[j+40|0]=0;q[j+32>>2]=0;i=j+41|0;e=0;break vb}i=e+g|0;e=r[j+40|0]}q[j+176>>2]=i;q[j+172>>2]=j+41;continue}}e=g&255;g=q[n>>2];q[y>>2]=q[y>>2]|e<<24-g;e=g+8|0;q[n>>2]=e;if((g|0)<17){continue}break}}g=q[y>>2];q[y>>2]=g<<1;q[n>>2]=e-1;e=(g|0)>-1?m:H}v=e;j=h}g=q[a+18388>>2];wb:{if((f|0)>(g|0)){break wb}while(1){h=f;f=f+1|0;xb:{yb:{zb:{k=(r[h+169296|0]<<1)+N|0;if(s[k>>1]){i=q[n>>2];if((i|0)>0){break zb}while(1){g=0;Ab:{if(q[F>>2]){break Ab}l=q[a>>2];e=q[l+172>>2];Bb:{if(e>>>0>2]){q[l+172>>2]=e+1;g=r[e|0];break Bb}if(!q[l+32>>2]){break Ab}e=l+40|0;g=Mi[q[l+16>>2]](q[l+28>>2],e,q[l+36>>2])|0;q[l+168>>2]=q[l+168>>2]+(q[l+172>>2]-q[l+180>>2]|0);Cb:{if(!g){o[l+40|0]=0;q[l+32>>2]=0;i=l+41|0;g=0;break Cb}i=e+g|0;g=r[l+40|0]}q[l+176>>2]=i;q[l+172>>2]=l+41}if((g&255)!=255){break Ab}l=q[a>>2];e=q[l+172>>2];Db:{if(e>>>0>2]){q[l+172>>2]=e+1;e=r[e|0];break Db}if(!q[l+32>>2]){e=0;break Db}e=l+40|0;g=Mi[q[l+16>>2]](q[l+28>>2],e,q[l+36>>2])|0;q[l+168>>2]=q[l+168>>2]+(q[l+172>>2]-q[l+180>>2]|0);Eb:{if(!g){o[l+40|0]=0;q[l+32>>2]=0;i=l+41|0;e=0;break Eb}i=e+g|0;e=r[l+40|0]}q[l+176>>2]=i;q[l+172>>2]=l+41}while(1){g=255;i=e&255;if((i|0)!=255){if(!i){break Ab}o[E|0]=e;q[F>>2]=1;i=q[n>>2];break zb}l=q[a>>2];e=q[l+172>>2];if(e>>>0>2]){q[l+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[l+32>>2]){continue}e=l+40|0;g=Mi[q[l+16>>2]](q[l+28>>2],e,q[l+36>>2])|0;q[l+168>>2]=q[l+168>>2]+(q[l+172>>2]-q[l+180>>2]|0);Fb:{if(!g){o[l+40|0]=0;q[l+32>>2]=0;i=l+41|0;e=0;break Fb}i=e+g|0;e=r[l+40|0]}q[l+176>>2]=i;q[l+172>>2]=l+41;continue}}e=g&255;g=q[n>>2];e=q[y>>2]|e<<24-g;q[y>>2]=e;i=g+8|0;q[n>>2]=i;if((g|0)<17){continue}break}break yb}if(!j){p[k>>1]=v;break wb}j=j-1|0;break xb}e=q[y>>2]}q[y>>2]=e<<1;q[n>>2]=i-1;if((e|0)>-1){break xb}e=p[k>>1];if(e&H){break xb}if((e|0)>=1){p[k>>1]=e+M;break xb}p[k>>1]=e-M}g=q[a+18388>>2];if((h|0)<(g|0)){continue}break}}if((f|0)<=(g|0)){continue}break Ia}break}q[213145]=169269;break b}q[a+18400>>2]=e-1;if(q[a+18388>>2]<(f|0)){break Ia}j=M<<16>>16;while(1){h=f;v=(r[f+169296|0]<<1)+N|0;Gb:{if(!s[v>>1]){break Gb}Hb:{Ib:{i=q[n>>2];if((i|0)>0){break Ib}while(1){g=0;Jb:{if(q[F>>2]){break Jb}f=q[a>>2];e=q[f+172>>2];Kb:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break Kb}if(!q[f+32>>2]){break Jb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Lb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;g=0;break Lb}i=e+g|0;g=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g&255)!=255){break Jb}f=q[a>>2];e=q[f+172>>2];Mb:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break Mb}if(!q[f+32>>2]){e=0;break Mb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Nb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Nb}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}while(1){g=255;f=e&255;if((f|0)!=255){if(!f){break Jb}o[E|0]=e;q[F>>2]=1;i=q[n>>2];break Ib}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Ob:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Ob}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;continue}}e=g&255;g=q[n>>2];e=q[y>>2]|e<<24-g;q[y>>2]=e;i=g+8|0;q[n>>2]=i;if((g|0)<17){continue}break}break Hb}e=q[y>>2]}q[y>>2]=e<<1;q[n>>2]=i-1;if((e|0)>-1){break Gb}e=p[v>>1];if(e&j){break Gb}if((e|0)>=1){p[v>>1]=e+M;break Gb}p[v>>1]=e-M}f=h+1|0;if((h|0)>2]){continue}break}}e=q[a+18440>>2];q[a+18440>>2]=e-1;if((e|0)<=1){Pb:{if(q[n>>2]>23){break Pb}while(1){g=0;Qb:{if(q[F>>2]){break Qb}f=q[a>>2];e=q[f+172>>2];Rb:{if(e>>>0>2]){q[f+172>>2]=e+1;g=r[e|0];break Rb}if(!q[f+32>>2]){break Qb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Sb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;g=0;break Sb}i=e+g|0;g=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((g&255)!=255){break Qb}f=q[a>>2];e=q[f+172>>2];Tb:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break Tb}if(!q[f+32>>2]){e=0;break Tb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Ub:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Ub}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}while(1){g=255;f=e&255;if((f|0)!=255){if(!f){break Qb}o[E|0]=e;q[F>>2]=1;break Pb}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Vb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Vb}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;continue}}e=q[n>>2];q[y>>2]=q[y>>2]|(g&255)<<24-e;q[n>>2]=e+8;if((e|0)<17){continue}break}}e=r[E|0];if((e&248)!=208){break m}q[a+18376>>2]=0;q[a+18364>>2]=0;q[a+18368>>2]=0;q[a+18316>>2]=0;q[a+18244>>2]=0;q[a+18172>>2]=0;o[a+18372|0]=255;q[a+18100>>2]=0;q[a+18400>>2]=0;e=q[a+18436>>2];q[a+18440>>2]=e?e:2147483647}L=L+1|0;if((K|0)!=(L|0)){continue}break}}D=D+1|0;if((C|0)!=(D|0)){continue}break}break n}if(!D){break b}}e=r[E|0]}if((e&255)!=255){break j}while(1){e=q[a>>2];Wb:{if(q[e+16>>2]){if(!(Mi[q[e+24>>2]](q[e+28>>2])|0)){break Wb}if(!q[e+32>>2]){break l}}if(t[e+172>>2]>=t[e+176>>2]){break l}}f=q[a>>2];e=q[f+172>>2];Xb:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break Xb}if(!q[f+32>>2]){e=0;break Xb}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Yb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Yb}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((e&255)!=255){continue}break}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];o[E|0]=e;break k}if(!q[f+32>>2]){e=0;o[E|0]=0;break k}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);Zb:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break Zb}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41;o[E|0]=e;break k}e=r[E|0]}if((e&255)==255){break i}}o[E|0]=255;continue}g=q[a>>2];e=q[g+172>>2];_b:{if(e>>>0>2]){q[g+172>>2]=e+1;i=r[e|0];break _b}e=255;if(!q[g+32>>2]){continue}f=g+40|0;h=Mi[q[g+16>>2]](q[g+28>>2],f,q[g+36>>2])|0;q[g+168>>2]=q[g+168>>2]+(q[g+172>>2]-q[g+180>>2]|0);e=g;$b:{if(!h){i=0;o[g+40|0]=0;q[g+32>>2]=0;h=g+41|0;break $b}i=r[g+40|0];h=f+h|0}q[e+176>>2]=h;q[g+172>>2]=g+41}e=255;if((i&255)!=255){continue}while(1){f=q[a>>2];e=q[f+172>>2];ac:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break ac}if(!q[f+32>>2]){e=0;continue h}e=f+40|0;g=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);bc:{if(!g){o[f+40|0]=0;q[f+32>>2]=0;i=f+41|0;e=0;break bc}i=e+g|0;e=r[f+40|0]}q[f+176>>2]=i;q[f+172>>2]=f+41}if((e&255)==255){continue}break}continue}}e=0;d=q[q[a>>2]+8>>2];if((d|0)<1){break a}while(1){g=w(e,72)+a|0;c=g+18124|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[g+18120>>2]=0}c=g+18128|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0;q[g+18136>>2]=0}c=g+18132|0;b=q[c>>2];if(b){Ni(b);q[c>>2]=0}e=e+1|0;if((d|0)!=(e|0)){continue}break}e=0}Ii=u+144|0;return e}function KQ(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0;l=Ii-5120|0;Ii=l;o[l+14|0]=0;p[l+12>>1]=0;q[a+12>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;b=q[a>>2];f=b+41|0;i=b+40|0;a:{b:{c:{c=q[b+176>>2];d=q[b+172>>2];d:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;d=r[d|0];break d}if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;e:{if(!c){d=0;q[b+32>>2]=0;o[i|0]=0;c=f;break e}d=r[b+40|0];c=c+(b+40|0)|0}q[e+176>>2]=c;q[b+172>>2]=f;e=f}if((d&255)!=137){break c}f:{if(c>>>0<=e>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;g:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break g}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;g=f;break f}g=e+1|0;q[b+172>>2]=g;d=r[e|0]}if((d&255)!=80){break c}h:{if(c>>>0<=g>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;i:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break i}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;e=f;break h}e=g+1|0;q[b+172>>2]=e;d=r[g|0]}if((d&255)!=78){break c}j:{if(c>>>0<=e>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;k:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break k}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;g=f;break j}g=e+1|0;q[b+172>>2]=g;d=r[e|0]}if((d&255)!=71){break c}l:{if(c>>>0<=g>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;m:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break m}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;e=f;break l}e=g+1|0;q[b+172>>2]=e;d=r[g|0]}if((d&255)!=13){break c}n:{if(c>>>0<=e>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;o:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break o}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;g=f;break n}g=e+1|0;q[b+172>>2]=g;d=r[e|0]}if((d&255)!=10){break c}p:{if(c>>>0<=g>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;q:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break q}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;h=f;break p}h=g+1|0;q[b+172>>2]=h;d=r[g|0]}if((d&255)!=26){break c}r:{if(c>>>0<=h>>>0){if(!q[b+32>>2]){break c}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;s:{if(c){d=r[b+40|0];c=c+(b+40|0)|0;break s}d=0;q[b+32>>2]=0;o[i|0]=0;c=f}q[e+176>>2]=c;q[b+172>>2]=f;e=f;break r}e=h+1|0;q[b+172>>2]=e;d=r[h|0]}if((d&255)!=10){break c}g=1;while(1){t:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;h=r[e|0];break t}if(!q[b+32>>2]){h=0;d=e;break t}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;u:{if(!c){h=0;q[b+32>>2]=0;o[i|0]=0;c=f;break u}h=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}v:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;j=r[d|0];break v}if(!q[b+32>>2]){j=0;e=d;break v}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;w:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break w}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}x:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;m=r[e|0];break x}if(!q[b+32>>2]){m=0;d=e;break x}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;y:{if(!c){m=0;q[b+32>>2]=0;o[i|0]=0;c=f;break y}m=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}z:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;v=r[d|0];break z}if(!q[b+32>>2]){v=0;e=d;break z}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;A:{if(!c){v=0;q[b+32>>2]=0;o[i|0]=0;c=f;break A}v=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}h=h&255;k=j&255;B:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;j=r[e|0];break B}if(!q[b+32>>2]){j=0;d=e;break B}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;C:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break C}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}h=h<<24;k=k<<16;D:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;z=r[d|0];break D}if(!q[b+32>>2]){z=0;e=d;break D}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;E:{if(!c){z=0;q[b+32>>2]=0;o[i|0]=0;c=f;break E}z=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}C=m<<8;k=h|k;F:{if(c>>>0>e>>>0){h=e+1|0;q[b+172>>2]=h;m=r[e|0];break F}if(!q[b+32>>2]){m=0;h=e;break F}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;G:{if(!c){m=0;q[b+32>>2]=0;o[i|0]=0;c=f;break G}m=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;h=f}e=v&255;k=k|C;H:{if(c>>>0>h>>>0){d=h+1|0;q[b+172>>2]=d;v=r[h|0];break H}if(!q[b+32>>2]){v=0;d=h;break H}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;I:{if(!c){v=0;q[b+32>>2]=0;o[i|0]=0;c=f;break I}v=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}k=e|k;J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{h=j&255;e=v&255|(z<<16|h<<24|m<<8);if((e|0)<=1229472849){if((e|0)==1130840649){break Y}if((e|0)==1229209940){break U}if((e|0)!=1229278788){break S}if(!g){break T}q[213145]=169845;break b}if((e|0)==1229472850){break X}if((e|0)==1347179589){break W}if((e|0)!=1951551059){break S}if(!g){break V}q[213145]=169845;break b}E=1;if(!k){break J}if((k|0)<=-1){q[b+172>>2]=c;break J}Z:{if(!q[b+16>>2]){break Z}e=c-d|0;if((e|0)>=(k|0)){break Z}q[b+172>>2]=c;Mi[q[b+20>>2]](q[b+28>>2],k-e|0);break J}q[b+172>>2]=d+k;break J}if(!g){q[213145]=169845;break b}if((k|0)!=13){q[213145]=169845;break b}_:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;g=r[d|0];break _}if(!q[b+32>>2]){g=0;e=d;break _}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;$:{if(!c){g=0;q[b+32>>2]=0;o[i|0]=0;c=f;break $}g=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}aa:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;h=r[e|0];break aa}if(!q[b+32>>2]){h=0;d=e;break aa}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ba:{if(!c){h=0;q[b+32>>2]=0;o[i|0]=0;c=f;break ba}h=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}g=g&255;h=h&255;ca:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;j=r[d|0];break ca}if(!q[b+32>>2]){j=0;e=d;break ca}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;da:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break da}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}g=g<<24;h=h<<16;j=(j&255)<<8;ea:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;m=r[e|0];break ea}if(!q[b+32>>2]){m=0;d=e;break ea}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;fa:{if(!c){m=0;q[b+32>>2]=0;o[i|0]=0;c=f;break fa}m=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}q[b>>2]=j|(g|h)|m;ga:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;g=r[d|0];break ga}if(!q[b+32>>2]){g=0;e=d;break ga}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ha:{if(!c){g=0;q[b+32>>2]=0;o[i|0]=0;c=f;break ha}g=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}ia:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;h=r[e|0];break ia}if(!q[b+32>>2]){h=0;d=e;break ia}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ja:{if(!c){h=0;q[b+32>>2]=0;o[i|0]=0;c=f;break ja}h=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}g=g&255;h=h&255;ka:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;j=r[d|0];break ka}if(!q[b+32>>2]){j=0;e=d;break ka}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;la:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break la}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}g=g<<24;h=h<<16;j=(j&255)<<8;ma:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;m=r[e|0];break ma}if(!q[b+32>>2]){m=0;d=e;break ma}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;na:{if(!c){m=0;q[b+32>>2]=0;o[i|0]=0;c=f;break na}m=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}e=j|(g|h)|m;q[b+4>>2]=e;if(e>>>0>=16777217){q[213145]=169455;break b}if(t[b>>2]>=16777217){q[213145]=169455;break b}oa:{pa:{qa:{if(c>>>0>d>>>0){q[b+172>>2]=d+1;c=r[d|0];break qa}if(!q[b+32>>2]){q[a+16>>2]=0;break pa}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);ra:{if(!c){q[b+32>>2]=0;o[i|0]=0;d=f;c=0;break ra}d=c+(b+40|0)|0;c=r[b+40|0]}q[b+176>>2]=d;q[b+172>>2]=f}c=c&255;q[a+16>>2]=c;if(c>>>0>16){break pa}if(1<>2];e=q[b+172>>2];sa:{if(d>>>0>e>>>0){c=e+1|0;q[b+172>>2]=c;e=r[e|0];break sa}if(!q[b+32>>2]){A=0;c=e;break K}d=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;ta:{if(!d){e=0;q[b+32>>2]=0;o[i|0]=0;d=f;break ta}e=r[b+40|0];d=d+(b+40|0)|0}q[c+176>>2]=d;q[b+172>>2]=f;c=f}A=e&255;if(A>>>0>=7){q[213145]=169845;break b}if((e&255)==3){A=3;u=3;if(q[a+16>>2]!=16){break K}q[213145]=169845;break b}if(!(A&1)){break K}q[213145]=169845;break b}if(g){q[213145]=169845;break b}if(k>>>0>=769){q[213145]=169845;break b}e=k&65535;y=(e>>>0)/3|0;if((k|0)!=(w(y,3)|0)){break R}g=0;if(e>>>0<3){break J}m=y>>>0>1?y:1;j=0;while(1){ua:{if(c>>>0>d>>>0){g=d+1|0;q[b+172>>2]=g;h=r[d|0];break ua}if(!q[b+32>>2]){h=0;g=d;break ua}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;va:{if(!c){h=0;q[b+32>>2]=0;o[i|0]=0;c=f;break va}h=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;g=f}k=j<<2;o[k+(l+16|0)|0]=h;wa:{if(c>>>0>g>>>0){h=g+1|0;q[b+172>>2]=h;d=r[g|0];break wa}if(!q[b+32>>2]){d=0;h=g;break wa}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;xa:{if(!c){d=0;q[b+32>>2]=0;o[i|0]=0;c=f;break xa}d=r[b+40|0];c=c+(b+40|0)|0}q[e+176>>2]=c;q[b+172>>2]=f;h=f}o[(l+16|0)+(k|1)|0]=d;ya:{if(c>>>0>h>>>0){d=h+1|0;q[b+172>>2]=d;g=r[h|0];break ya}if(!q[b+32>>2]){g=0;d=h;break ya}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;za:{if(!c){g=0;q[b+32>>2]=0;o[i|0]=0;c=f;break za}g=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}o[(l+16|0)+(k|2)|0]=g;o[(l+16|0)+(k|3)|0]=255;j=j+1|0;if((m|0)!=(j|0)){continue}break}g=0;break J}if(q[a+4>>2]){q[213145]=169845;break b}if(u){if(!y){q[213145]=169845;break b}if(k>>>0>y>>>0){break Q}u=4;g=0;e=0;if(!k){break J}while(1){Aa:{if(c>>>0>d>>>0){h=d+1|0;q[b+172>>2]=h;j=r[d|0];d=h;break Aa}if(!q[b+32>>2]){j=0;break Aa}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ba:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break Ba}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}o[(l+16|0)+(e<<2|3)|0]=j;e=e+1|0;if((k|0)!=(e|0)){continue}break}break J}e=q[b+8>>2];if(!(e&1)){q[213145]=169845;break b}if((k|0)!=e<<1){q[213145]=169845;break b}Ca:{if(q[a+16>>2]!=16){g=0;if((e|0)>0){break Ca}D=1;u=0;break J}D=1;g=0;if((e|0)<1){u=0;break J}while(1){Da:{if(c>>>0>d>>>0){e=d+1|0;q[b+172>>2]=e;h=r[d|0];break Da}if(!q[b+32>>2]){h=0;e=d;break Da}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ea:{if(!c){h=0;q[b+32>>2]=0;o[i|0]=0;c=f;break Ea}h=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f}h=h<<8;Fa:{if(c>>>0>e>>>0){d=e+1|0;q[b+172>>2]=d;j=r[e|0];break Fa}if(!q[b+32>>2]){j=0;d=e;break Fa}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ga:{if(!c){j=0;q[b+32>>2]=0;o[i|0]=0;c=f;break Ga}j=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}p[(l+6|0)+(g<<1)>>1]=h|j&255;u=0;g=g+1|0;if((g|0)>2]){continue}break}g=0;break J}while(1){e=b;Ha:{if(c>>>0>d>>>0){d=d+1|0}else{if(!q[b+32>>2]){break Ha}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ia:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break Ia}c=(b+c|0)+40|0}q[d+176>>2]=c;d=f}q[e+172>>2]=d}Ja:{if(c>>>0>d>>>0){h=d+1|0;q[b+172>>2]=h;e=r[d|0];d=h;break Ja}if(!q[b+32>>2]){e=0;break Ja}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ka:{if(!c){e=0;q[b+32>>2]=0;o[i|0]=0;c=f;break Ka}e=r[b+40|0];c=c+(b+40|0)|0}q[d+176>>2]=c;q[b+172>>2]=f;d=f}o[(l+12|0)+g|0]=w(r[q[a+16>>2]+169896|0],e);D=1;u=0;g=g+1|0;if((g|0)>2]){continue}break}g=0;break J}if(g){q[213145]=169845;break b}if(!(!u|y)){q[213145]=169845;break b}d=0;e=k+n|0;if((e|0)<(n|0)){break a}La:{if(e>>>0<=x>>>0){c=q[a+4>>2];break La}c=x?x:k>>>0>4096?k:4096;while(1){x=c;c=c<<1;if(e>>>0>x>>>0){continue}break}c=ul(q[a+4>>2],x);if(!c){q[213145]=169512;break a}q[a+4>>2]=c}g=c+n|0;Ma:{Na:{Oa:{if(!q[b+16>>2]){j=q[b+176>>2];c=q[b+172>>2];break Oa}j=q[b+176>>2];c=q[b+172>>2];h=j-c|0;if((h|0)<(k|0)){break Na}}if(c+k>>>0>j>>>0){break Ma}Ti(g,c,k);q[b+172>>2]=k+q[b+172>>2];g=0;n=e;break J}c=Ti(g,c,h);g=c+h|0;c=k-h|0;h=Mi[q[b+16>>2]](q[b+28>>2],g,c)|0;q[b+172>>2]=q[b+176>>2];g=0;n=e;if((c|0)==(h|0)){break J}}q[213145]=169845;break a}c=q[a+4>>2];if(!c){q[213145]=169845;break b}Pa:{d=q[b+4>>2];d=w(w(d,q[b+8>>2]),w(q[a+16>>2],q[b>>2])+7>>>3|0)+d|0;e=Yi(d);if(e){q[l+1048>>2]=c;q[l+1052>>2]=c+n;if(OQ(l+1048|0,e,d,!E)){break Pa}Ni(q[l+1068>>2])}d=0;q[a+8>>2]=0;break a}d=q[l+1064>>2];c=q[l+1068>>2];q[a+8>>2]=c;if(!c){break b}h=d-c|0;Ni(q[a+4>>2]);v=0;q[a+4>>2]=0;c=q[b+8>>2];d=c+1|0;z=D?d:u?c:d?c:d;q[b+12>>2]=z;k=q[a+16>>2];n=q[a+8>>2];d=q[a>>2];c=q[d+4>>2];g=q[d>>2];Qa:{Ra:{if(B){e=w(z,(k|0)==16?2:1);Sa:{if((c|g)<0|((g|0)>(2147483647/(c|0)|0)?c:0)){break Sa}c=w(c,g);if((c|e)<0|((c|0)>(2147483647/(e|0)|0)?e:0)){break Sa}v=Yi(w(c,e))}y=0;while(1){c=y<<2;F=q[c+169984>>2];B=q[c+170048>>2];x=(q[d+4>>2]+(F^-1)|0)+B|0;m=(x>>>0)/(B>>>0)|0;C=q[c+170016>>2];H=q[c+169952>>2];c=C+(q[d>>2]+(H^-1)|0)|0;g=(c>>>0)/(C>>>0)|0;if(!(c>>>0>>0|x>>>0>>0)){c=q[d+8>>2];if(!hD(a,n,h,z,g,m,k,A)){break P}d=w(m,(w(c,w(g,k))+7>>3)+1|0);Ta:{if(!((m|0)>0?(g|0)>=1:0)){x=q[a+12>>2];break Ta}x=q[a+12>>2];I=q[a>>2];j=0;while(1){K=w(g,j);L=w(e,w(j,B)+F|0);c=0;while(1){Ti((w(q[I>>2],L)+v|0)+w(e,w(c,C)+H|0)|0,w(e,c+K|0)+x|0,e);c=c+1|0;if((g|0)!=(c|0)){continue}break}j=j+1|0;if((m|0)!=(j|0)){continue}break}}Ni(x);n=d+n|0;h=h-d|0}y=y+1|0;if((y|0)==7){break Ra}d=q[a>>2];continue}}if(hD(a,n,h,z,g,c,k,A)){break Qa}break b}q[a+12>>2]=v}Ua:{if(!D){break Ua}if(q[a+16>>2]==16){c=q[a>>2];d=w(q[c+4>>2],q[c>>2]);c=q[a+12>>2];Va:{switch(q[b+12>>2]-2|0){case 2:if(!d){break Ua}h=s[l+6>>1];g=s[l+8>>1];n=s[l+10>>1];e=0;while(1){if(!((h|0)!=s[c>>1]|(g|0)!=s[c+2>>1]|(n|0)!=s[c+4>>1])){p[c+6>>1]=0}c=c+8|0;e=e+1|0;if((d|0)!=(e|0)){continue}break}break Ua;case 0:break Va;default:break O}}if(!d){break Ua}h=s[l+6>>1];e=0;while(1){p[c+2>>1]=(h|0)!=s[c>>1]?-1:0;c=c+4|0;e=e+1|0;if((d|0)!=(e|0)){continue}break}break Ua}c=q[a>>2];d=w(q[c+4>>2],q[c>>2]);c=q[a+12>>2];Wa:{switch(q[b+12>>2]-2|0){case 2:if(!d){break Ua}h=r[l+12|0];g=r[l+13|0];n=r[l+14|0];e=0;while(1){if(!((h|0)!=r[c|0]|(g|0)!=r[c+1|0]|(n|0)!=r[c+2|0])){o[c+3|0]=0}c=c+4|0;e=e+1|0;if((d|0)!=(e|0)){continue}break}break Ua;case 0:break Wa;default:break N}}if(!d){break Ua}h=r[l+12|0];e=0;while(1){o[c+1|0]=(h|0)!=r[c|0]?-1:0;c=c+2|0;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!E|!q[213148]|q[b+12>>2]<3){break L}d=q[a>>2];h=w(q[d+4>>2],q[d>>2]);c=q[a+12>>2];Xa:{switch(q[d+12>>2]-3|0){case 0:if(!h){break L}e=0;while(1){d=r[c+2|0];o[c+2|0]=r[c|0];o[c|0]=d;c=c+3|0;e=e+1|0;if((h|0)!=(e|0)){continue}break}break L;default:J(170258,169198,4909,170276);G();case 1:break Xa}}if(!q[213147]){break M}if(!h){break L}d=0;while(1){g=r[c|0];e=r[c+3|0];Ya:{if(e){n=r[c+2|0];x=w(g,255);g=e>>>1|0;o[c+2|0]=((x+g&65535)>>>0)/(e>>>0);o[c|0]=((g+w(n,255)&65535)>>>0)/(e>>>0);o[c+1|0]=((g+w(r[c+1|0],255)&65535)>>>0)/(e>>>0);break Ya}e=r[c+2|0];o[c+2|0]=g;o[c|0]=e}c=c+4|0;d=d+1|0;if((h|0)!=(d|0)){continue}break}break L}if(g){q[213145]=169845;break b}if(!(h&32)){q[213145]=169905;break b}g=0;if(!k){break J}if((k|0)<=-1){q[b+172>>2]=c;break J}Za:{if(!q[b+16>>2]){break Za}e=c-d|0;if((e|0)>=(k|0)){break Za}q[b+172>>2]=c;Mi[q[b+20>>2]](q[b+28>>2],k-e|0);break J}q[b+172>>2]=d+k;break J}q[213145]=169845;break b}q[213145]=169845;break b}Ni(v);break b}J(170177,169198,4828,170202);G()}J(170177,169198,4803,170231);G()}if(!h){break L}e=0;while(1){d=r[c+2|0];o[c+2|0]=r[c|0];o[c|0]=d;c=c+4|0;e=e+1|0;if((h|0)!=(e|0)){continue}break}}_a:{if(u){q[b+8>>2]=u;q[b+12>>2]=u;d=0;$a:{c=q[a>>2];g=w(q[c+4>>2],q[c>>2]);ab:{if((g|u)<0){break ab}n=q[a+12>>2];if((g|0)>(2147483647/(u|0)|0)?u:0){break ab}h=Yi(w(g,u));if(h){break $a}}q[213145]=169512;break a}bb:{if((u|0)!=3){if(!g){break bb}e=0;c=h;while(1){d=r[e+n|0]<<2;o[c|0]=r[d+(l+16|0)|0];o[c+1|0]=r[(l+16|0)+(d|1)|0];o[c+2|0]=r[(l+16|0)+(d|2)|0];o[c+3|0]=r[(l+16|0)+(d|3)|0];c=c+4|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}break bb}if(!g){break bb}c=h;while(1){e=r[d+n|0]<<2;o[c|0]=r[e+(l+16|0)|0];o[c+1|0]=r[(l+16|0)+(e|1)|0];o[c+2|0]=r[(l+16|0)+(e|2)|0];c=c+3|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}}Ni(n);q[a+12>>2]=h;break _a}if(!D){break _a}q[b+8>>2]=q[b+8>>2]+1}Ni(q[a+8>>2]);q[a+8>>2]=0;d=b;a=q[b+172>>2];c=q[b+176>>2];cb:{db:{if(a>>>0>>0){a=a+1|0;break db}if(!q[b+32>>2]){break cb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);a=b;eb:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break eb}c=(b+c|0)+40|0}q[a+176>>2]=c;a=f}q[d+172>>2]=a}d=b;fb:{if(a>>>0>>0){a=a+1|0}else{if(!q[b+32>>2]){break fb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);a=b;gb:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break gb}c=(b+c|0)+40|0}q[a+176>>2]=c;a=f}q[d+172>>2]=a}d=b;hb:{if(a>>>0>>0){a=a+1|0}else{if(!q[b+32>>2]){break hb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);a=b;ib:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break ib}c=(b+c|0)+40|0}q[a+176>>2]=c;a=f}q[d+172>>2]=a}if(a>>>0>>0){d=1;q[b+172>>2]=a+1;break a}d=1;if(!q[b+32>>2]){break a}a=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;jb:{if(!a){q[b+32>>2]=0;o[i|0]=0;a=f;break jb}a=(a+b|0)+40|0}q[c+176>>2]=a;q[b+172>>2]=f;break a}kb:{lb:{if(c>>>0>>0){h=c+1|0;q[b+172>>2]=h;e=r[c|0];c=h;break lb}if(!q[b+32>>2]){break kb}d=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;mb:{if(!d){e=0;q[b+32>>2]=0;o[i|0]=0;d=f;break mb}e=r[b+40|0];d=d+(b+40|0)|0}q[c+176>>2]=d;q[b+172>>2]=f;c=f}if(!(e&255)){break kb}q[213145]=169845;break b}nb:{ob:{if(c>>>0>>0){h=c+1|0;q[b+172>>2]=h;e=r[c|0];c=h;break ob}if(!q[b+32>>2]){break nb}d=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;pb:{if(!d){e=0;q[b+32>>2]=0;o[i|0]=0;d=f;break pb}e=r[b+40|0];d=d+(b+40|0)|0}q[c+176>>2]=d;q[b+172>>2]=f;c=f}if(!(e&255)){break nb}q[213145]=169845;break b}qb:{rb:{if(c>>>0>>0){q[b+172>>2]=c+1;c=r[c|0];break rb}if(!q[b+32>>2]){B=0;break qb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);sb:{if(!c){q[b+32>>2]=0;o[i|0]=0;d=f;c=0;break sb}d=c+(b+40|0)|0;c=r[b+40|0]}q[b+176>>2]=d;q[b+172>>2]=f}B=c&255;if(B>>>0<2){break qb}q[213145]=169845;break b}tb:{c=q[b>>2];if(c){d=q[b+4>>2];if(d){break tb}}q[213145]=169845;break b}if(!u){e=(A>>>2&1)+(A&2|1)|0;q[b+8>>2]=e;if(d>>>0>(1073741824/(c>>>0)>>>0)/(e>>>0)>>>0){q[213145]=169486;break b}g=0;u=0;break J}q[b+8>>2]=1;g=0;if(d>>>0<=1073741824/(c>>>0)>>>2>>>0){break J}q[213145]=169845;break b}d=b;e=q[b+172>>2];c=q[b+176>>2];ub:{vb:{if(e>>>0>>0){e=e+1|0;break vb}if(!q[b+32>>2]){break ub}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;wb:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break wb}c=(b+c|0)+40|0}q[e+176>>2]=c;e=f}q[d+172>>2]=e}d=b;xb:{if(c>>>0>e>>>0){e=e+1|0}else{if(!q[b+32>>2]){break xb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;yb:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break yb}c=(b+c|0)+40|0}q[e+176>>2]=c;e=f}q[d+172>>2]=e}d=b;zb:{if(c>>>0>e>>>0){e=e+1|0}else{if(!q[b+32>>2]){break zb}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);e=b;Ab:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break Ab}c=(b+c|0)+40|0}q[e+176>>2]=c;e=f}q[d+172>>2]=e}if(c>>>0>e>>>0){e=e+1|0;q[b+172>>2]=e;continue}if(!q[b+32>>2]){continue}c=Mi[q[b+16>>2]](q[b+28>>2],i,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Bb:{if(!c){q[b+32>>2]=0;o[i|0]=0;c=f;break Bb}c=(b+c|0)+40|0}q[d+176>>2]=c;q[b+172>>2]=f;e=f;continue}}q[213145]=169792}d=0}Ii=l+5120|0;return d}function jA(a,b,c,d,e){var f=x(0),g=0,h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=0,p=x(0),s=x(0),v=0,z=0,B=x(0),C=x(0),D=x(0),E=x(0),H=0,I=x(0),K=x(0),L=x(0),M=x(0),N=x(0),O=0,P=x(0),Q=x(0),R=x(0),S=x(0),T=0,U=0,V=x(0),W=x(0),X=x(0),Y=x(0),Z=0,_=x(0),$=x(0),aa=x(0),ba=x(0),ca=x(0),da=x(0),ea=x(0),fa=x(0),ga=x(0),ha=x(0),ia=x(0),ja=x(0),ka=x(0),la=x(0),ma=x(0),na=x(0),oa=x(0),pa=x(0),qa=x(0),ra=x(0),sa=x(0),ta=x(0),ua=x(0),va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=x(0),Ja=x(0),Ka=x(0),La=x(0),Ma=x(0),Na=x(0),Oa=x(0),Pa=x(0),Qa=x(0),Ra=x(0),Sa=x(0),Ta=x(0),Ua=x(0),Va=x(0),Wa=x(0),Xa=x(0),Ya=x(0),Za=x(0);H=Ii+ -64|0;Ii=H;a:{if(!(!q[c+280>>2]|e<=x(0))){q[H+32>>2]=0;b:{c:{d:{e:{g=q[c+60>>2];v=q[c+56>>2];h=g-v|0;if(h){z=(h|0)/160|0;while(1){if((g-v|0)/160>>>0<=n>>>0){break a}h=w(n,160)+v|0;f=x(u[h+64>>2]-e);u[h+64>>2]=f;f:{if(!(f>2]=u[g>>2];u[h+4>>2]=u[g+4>>2];u[h+8>>2]=u[g+8>>2];u[h+16>>2]=u[g+16>>2];u[h+20>>2]=u[g+20>>2];u[h+24>>2]=u[g+24>>2];u[h+28>>2]=u[g+28>>2];u[h+32>>2]=u[g+32>>2];u[h+36>>2]=u[g+36>>2];u[h+40>>2]=u[g+40>>2];u[h+44>>2]=u[g+44>>2];u[h+48>>2]=u[g+48>>2];u[h+52>>2]=u[g+52>>2];u[h+56>>2]=u[g+56>>2];T=q[g+84>>2];v=h- -64|0;q[v+16>>2]=q[g+80>>2];q[v+20>>2]=T;U=q[g+76>>2];q[v+8>>2]=q[g+72>>2];q[v+12>>2]=U;U=q[g+68>>2];q[v>>2]=q[g+64>>2];q[v+4>>2]=U;q[v+24>>2]=q[g+88>>2];u[h+96>>2]=u[g+96>>2];u[h+100>>2]=u[g+100>>2];u[h+104>>2]=u[g+104>>2];u[h+108>>2]=u[g+108>>2];u[h+112>>2]=u[g+112>>2];u[h+116>>2]=u[g+116>>2];u[h+120>>2]=u[g+120>>2];u[h+124>>2]=u[g+124>>2];u[h+128>>2]=u[g+128>>2];u[h+132>>2]=u[g+132>>2];u[h+136>>2]=u[g+136>>2];v=q[g+148>>2];q[h+144>>2]=q[g+144>>2];q[h+148>>2]=v;v=q[g+156>>2];q[h+152>>2]=q[g+152>>2];q[h+156>>2]=v;g=q[c+60>>2]-160|0;q[c+60>>2]=g;v=q[c+56>>2];if(v>>>0>g>>>0){break e}z=z-1|0;break f}n=n+1|0}if(n>>>0>>0){continue}break}}q[H+16>>2]=0;f=u[c+264>>2];z=q[c+280>>2];g:{h:{if((z|0)!=1){p=x(f+e);break h}i=u[c+288>>2];if(!(i<=f)){u[c+264>>2]=f+e;break b}q[c+280>>2]=2;g=q[a+72>>2];if(!g){f=x(x(f-i)+e);s=u[c+284>>2];p=f>2]=p;break g}Mi[q[a+68>>2]](q[a+16>>2],q[c+128>>2],q[c+132>>2],2,g);p=x(x(u[c+264>>2]-u[c+288>>2])+e);u[c+264>>2]=p;z=q[c+280>>2];if((z|0)==1){break b}}s=u[c+284>>2];p=p>2]=p;if((z|0)!=2){break c}}if(!(r[c+296|0]&8|p>=s^1|q[d+4>>2]!=1)){p=x(p-s);u[c+264>>2]=p}l=u[c+268>>2];i=s<=x(0)?x(0):x(p/s);f=x(i*x(64));i:{if(f=x(0)){h=~~f>>>0;break i}h=0}h=w(h>>>0<63?h:63,12)+b|0;f=x(x(u[h+4>>2]+x(u[h+8>>2]*x(i-u[h>>2])))+u[c+292>>2]);f=x(l+x((f>x(0)?f:x(0))*e));j:{if(f=x(0)){g=~~f>>>0;break j}g=0}C=u[h+776>>2];I=u[h+780>>2];K=u[h+772>>2];N=u[h+1548>>2];P=u[h+1552>>2];L=u[h+1544>>2];S=u[h+2320>>2];aa=u[h+2324>>2];_=u[h+2316>>2];$=u[h+3092>>2];fa=u[h+3096>>2];ga=u[h+3088>>2];ha=u[h+3864>>2];ia=u[h+3868>>2];ja=u[h+3860>>2];ka=u[h+4636>>2];ca=u[h+4640>>2];W=u[h+4632>>2];la=u[h+5408>>2];da=u[h+5412>>2];ba=u[h+5404>>2];ma=u[h+6180>>2];na=u[h+6184>>2];oa=u[h+6176>>2];pa=u[h+6952>>2];Ia=u[h+6956>>2];Ja=u[h+6948>>2];qa=u[h+7724>>2];Ka=u[h+7728>>2];La=u[h+7720>>2];ra=u[h+8496>>2];Ma=u[h+8500>>2];Na=u[h+8492>>2];sa=u[h+9268>>2];Oa=u[h+9272>>2];Pa=u[h+9264>>2];ta=u[h+10040>>2];Qa=u[h+10044>>2];Ra=u[h+10036>>2];ua=u[h+10812>>2];Sa=u[h+10816>>2];Ta=u[h+10808>>2];u[c+268>>2]=f-x(g>>>0);h=(q[c- -64>>2]-q[c+60>>2]|0)/160|0;U=g>>>0>h>>>0?h:g;s=u[d+44>>2];p=u[d+40>>2];D=u[d+36>>2];R=u[d+24>>2];ea=u[d+20>>2];E=u[d+32>>2];V=u[d+16>>2];Q=x(1);if(q[d+12>>2]){f=x(0)}else{f=u[a+60>>2];j=u[a+48>>2];k=u[a+52>>2];Ua=x(x(x(s*f)-x(E*j))-x(D*k));m=u[a+56>>2];Va=x(p*m);Wa=x(x(D*j)+x(x(s*m)+x(p*f)));Xa=x(E*k);Ya=x(x(E*m)+x(x(s*k)+x(D*f)));Za=x(p*j);E=x(x(p*k)+x(x(s*j)+x(E*f)));M=x(D*m);Q=u[a+44>>2];l=x(ea*Q);B=x(V*Q);k:{if(o[a+82|0]&1){p=x(R*Q);V=x(x(x(m*B)+x(f*l))-x(j*p));X=x(x(x(f*p)+x(j*l))-x(k*B));Y=x(x(x(f*B)+x(k*p))-x(m*l));R=x(m*p);l=x(x(k*l)+x(j*B));break k}X=x(x(x(R*f)+x(j*l))-x(k*B));V=x(x(x(m*B)+x(f*l))-x(R*j));Y=x(x(x(R*k)+x(f*B))-x(m*l));R=x(R*m);l=x(x(j*B)+x(k*l))}s=x(Ua-Va);p=x(Wa-Xa);D=x(Ya-Za);E=x(E-M);l=x(R+l);R=x(u[a+40>>2]+x(x(j*V)+x(x(x(m*l)+x(f*X))-x(k*Y))));ea=x(u[a+36>>2]+x(x(m*Y)+x(x(x(f*V)+x(k*l))-x(j*X))));V=x(u[a+32>>2]+x(x(k*X)+x(x(x(f*Y)+x(j*l))-x(m*V))));f=u[d+68>>2];X=x(f*u[c+96>>2]);Y=x(f*u[c+100>>2]);f=x(f*u[c+104>>2])}if(!U){break d}B=f;ua=x(x(x(i-Ta)*Sa)+ua);ta=x(x(x(i-Ra)*Qa)+ta);sa=x(x(x(i-Pa)*Oa)+sa);ra=x(x(x(i-Na)*Ma)+ra);qa=x(x(x(i-La)*Ka)+qa);pa=x(x(x(i-Ja)*Ia)+pa);ma=x(x(x(i-oa)*na)+ma);la=x(x(x(i-ba)*da)+la);ka=x(x(x(i-W)*ca)+ka);ha=x(x(x(i-ja)*ia)+ha);fa=x(x(x(i-ga)*fa)+$);ga=x(x(x(i-_)*aa)+S);ia=x(x(x(i-L)*P)+N);ja=x(x(x(i-K)*I)+C);v=0;while(1){_=u[b+11576>>2];aa=u[b+10804>>2];$=u[b+10032>>2];f=u[b+9260>>2];k=u[b+8488>>2];m=u[b+7716>>2];C=u[b+6944>>2];I=u[b+6172>>2];L=u[b+5400>>2];ca=u[b+4628>>2];S=u[b+3856>>2];l=u[b+3084>>2];i=u[b+2312>>2];j=u[b+1540>>2];h=w(q[c+276>>2],-1443076087)+505908858|0;n=w(h,214013)+2531011|0;z=w(n,214013)+2531011|0;T=w(z,214013)+2531011|0;Z=w(T,214013)+2531011|0;va=w(Z,214013)+2531011|0;wa=w(va,214013)+2531011|0;xa=w(wa,214013)+2531011|0;ya=w(xa,214013)+2531011|0;za=w(ya,214013)+2531011|0;Aa=w(za,214013)+2531011|0;Ba=w(Aa,214013)+2531011|0;Ca=w(Ba,214013)+2531011|0;Da=w(Ca,214013)+2531011|0;q[c+276>>2]=Da;q[H+32>>2]=0;Ea=q[c+60>>2];g=q[c+56>>2];Fa=Ea-g|0;Ga=(Fa|0)/160|0;Ha=Ga+1|0;if(Ha>>>0>(q[c+64>>2]-g|0)/160>>>0){J(151260,151192,506,151279);G()}q[c+60>>2]=g+w(Ha,160);if((Fa+160|0)/160>>>0<=Ga>>>0){break a}M=j;j=x(x((h>>>16&32767)>>>0)*x(30518509447574615e-21));j=x(ja+x(M*x(x(j+j)+x(-1))));M=i;i=x(x((n>>>16&32767)>>>0)*x(30518509447574615e-21));i=x(ia+x(M*x(x(i+i)+x(-1))));M=l;l=x(x((z>>>16&32767)>>>0)*x(30518509447574615e-21));W=x(ga+x(M*x(x(l+l)+x(-1))));l=x(x((Z>>>16&32767)>>>0)*x(30518509447574615e-21));M=f;f=x(x((Aa>>>16&32767)>>>0)*x(30518509447574615e-21));da=x(M*x(x(f+f)+x(-1)));K=x(x((Ba>>>16&32767)>>>0)*x(30518509447574615e-21));N=x(x((Ca>>>16&32767)>>>0)*x(30518509447574615e-21));P=x(x((Da>>>16&32767)>>>0)*x(30518509447574615e-21));h=Ui(Ea,0,160);f=x(x((T>>>16&32767)>>>0)*x(30518509447574615e-21));f=x(fa+x(S*x(x(f+f)+x(-1))));u[h+72>>2]=x(1)/f;u[h+68>>2]=f;u[h+64>>2]=f-e;g=w(q[c+276>>2],214013)+2531011|0;q[c+276>>2]=g;f=x(x((za>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+108>>2]=qa+x(k*x(x(f+f)+x(-1)));f=x(x((ya>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+104>>2]=pa+x(m*x(x(f+f)+x(-1)));f=x(x((xa>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+100>>2]=ma+x(C*x(x(f+f)+x(-1)));f=x(x((wa>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+96>>2]=la+x(I*x(x(f+f)+x(-1)));f=x(x((va>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+80>>2]=Q*x(ka+x(L*x(x(f+f)+x(-1))));f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));u[h+76>>2]=x(f+f)+x(-1);l:{m:{n:{o:{p:{q:{r:{s:{n=q[d+76>>2];switch(n|0){case 2:break o;case 1:break p;case 4:break q;case 0:break r;case 3:break s;default:break n}}g=w(g,214013)+2531011|0;n=w(g,214013)+2531011|0;z=w(n,214013)+2531011|0;q[c+276>>2]=z;f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));C=x(x(f+f)+x(-1));m=x(F(x(x(1)-x(C*C))));I=x(x(x(((n>>>16&32767)>>>0)%32767>>>0)*x(30518509447574615e-21))*x(6.2831854820251465));i=x(m*Lk(I));f=x(x(j*x(.5))*x(F(x(x(((z>>>16&32767)>>>0)%32767>>>0)*x(30518509447574615e-21)))));k=x(i*f);I=x(m*Nl(I));m=x(I*f);f=x(C*f);break l}g=w(g,214013)+2531011|0;n=w(g,214013)+2531011|0;q[c+276>>2]=n;C=x(0);j=x(x(j*x(.5))*x(F(x(x(((n>>>16&32767)>>>0)%32767>>>0)*x(30518509447574615e-21)))));f=x(j*x(0));m=x(x(x(((g>>>16&32767)>>>0)%32767>>>0)*x(30518509447574615e-21))*x(6.2831854820251465));i=Lk(m);k=x(i*j);I=Nl(m);m=x(I*j);break l}g=w(g,214013)+2531011|0;n=w(g,214013)+2531011|0;z=w(n,214013)+2531011|0;T=w(z,214013)+2531011|0;q[c+276>>2]=T;I=x(0);f=x(x(x(((g>>>16&32767)>>>0)%32767>>>0)*x(30518509447574615e-21))*x(6.2831854820251465));m=Nl(f);M=Lk(f);k=j;j=x(F(x(x((T>>>16&32767)>>>0)*x(30518509447574615e-21))));f=x(x(x((n>>>16&32767)>>>0)*x(30518509447574615e-21))+x(x((z>>>16&32767)>>>0)*x(30518509447574615e-21)));C=x(k*x(x(j*(x(f+x(-1))>=x(0)?x(x(2)-f):f))*x(.5)));f=x(M*C);k=x(i*j);m=x(m*C);i=x(x(f*f)+x(x(k*k)+x(m*m)));if(i==x(0)){i=x(1);C=x(0);break l}j=x(x(1)/x(F(i)));C=x(f*j);i=x(k*j);I=x(m*j);break l}g=w(g,214013)+2531011|0;n=w(g,214013)+2531011|0;q[c+276>>2]=n;I=x(0);f=x(j*x(.5));j=x(x((n>>>16&32767)>>>0)*x(30518509447574615e-21));M=x(f*j);k=f;f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));m=x(M-x(k*f));f=x(x(i*f)+x(i*j));k=x(i-f)>=x(0)?f:x(x(i+i)-f);i=x(x(x(m*m)+x(k*k))+x(0));if(i==x(0)){C=x(0);i=x(1);break m}f=x(0);j=x(x(1)/x(F(i)));C=x(j*x(0));i=x(k*j);I=x(m*j);break l}while(1){g=w(g,214013)+2531011|0;f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));m=x(x(f+f)+x(-1));g=w(g,214013)+2531011|0;f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));k=x(x(f+f)+x(-1));g=w(g,214013)+2531011|0;f=x(x((g>>>16&32767)>>>0)*x(30518509447574615e-21));f=x(x(f+f)+x(-1));if(x(x(x(m*m)+x(k*k))+x(f*f))==x(0)){continue}break}q[c+276>>2]=g;f=x(x(W*x(.5))*f);k=x(x(i*x(.5))*k);m=x(x(j*x(.5))*m);i=x(1);I=x(0);C=x(0);break l}q[H>>2]=n;Pi(3,150692,151527,H);I=x(0);C=x(0);m=x(0);k=x(0);i=x(0)}f=x(0)}L=x(l+l);S=x(K+K);W=x(N+N);P=x(P+P);da=x(ra+da);z=q[d+64>>2];t:{if((z|0)!=1){K=x(1);j=x(0);N=x(0);l=x(0);break t}j=x(I*x(0));K=x(C*x(0));l=x(x(x(j+i)+K)+x(1));N=x(F(x(l+l)));l=x(x(1)/N);j=x(x(j-K)*l);K=x(N*x(.5));ba=x(i*x(0));N=x(x(ba-I)*l);l=x(x(C-ba)*l)}ba=x(L+x(-1));na=x(S+x(-1));oa=x(P+x(-1));m=x(Q*m);k=x(Q*k);f=x(Q*f);P=x(x(x(p*m)+x(s*k))-x(E*f));L=x(x(p*f)+x(x(E*m)+x(D*k)));S=x(x(x(E*k)+x(s*f))-x(D*m));f=x(x(x(s*m)+x(D*f))-x(p*k));u[h+8>>2]=R+x(x(E*P)+x(x(x(p*L)+x(s*S))-x(D*f)));u[h+4>>2]=ea+x(x(p*f)+x(x(x(s*P)+x(D*L))-x(E*S)));u[h>>2]=V+x(x(D*S)+x(x(x(E*L)+x(s*f))-x(p*P)));P=x(ha+x(ca*ba));S=x(sa+x($*na));aa=x(ta+x(aa*x(W+x(-1))));ca=x(ua+x(_*oa));f=x(x(da*x(.01745329238474369))*x(.5));O=+f*10430.378350470453;u:{if(y(O)<2147483648){g=~~O;break u}g=-2147483648}k=x(x(g&511)*x(.001953125));n=q[70726];k=x(x(x(x(1)-k)*u[n+(g>>>7&508)>>2])+x(k*u[n+(((g>>>9|0)+1&127)<<2)>>2]));O=+x(f+x(-1.5707963705062866))*10430.378350470453;v:{if(y(O)<2147483648){g=~~O;break v}g=-2147483648}f=x(x(g&511)*x(.001953125));m=x(x(x(x(1)-f)*u[n+(g>>>7&508)>>2])+x(f*u[n+(((g>>>9|0)+1&127)<<2)>>2]));L=x(0);w:{if((z|0)==2){K=x(0);f=m;j=k;break w}L=x(x(x(x(s*K)-x(E*l))-x(D*j))-x(p*N));_=x(x(x(D*N)+x(x(s*l)+x(E*K)))-x(p*j));f=x(_*x(0));$=x(x(x(p*l)+x(x(s*j)+x(D*K)))-x(E*N));W=x($*x(0));l=x(x(x(E*j)+x(x(s*N)+x(p*K)))-x(D*l));j=x(x(x(x(L*k)-f)-W)-x(l*m));f=x(x(f+x(x(L*m)+x(l*k)))-W);l=x(l*x(0));N=x(L*x(0));K=x(x(l+x(N+x($*k)))-x(_*m));L=x(x(x($*m)+x(N+x(_*k)))-l)}u[h+148>>2]=S;u[h+84>>2]=S;u[h+32>>2]=L;u[h+16>>2]=L;u[h+156>>2]=ca;u[h+152>>2]=aa;u[h+88>>2]=aa;u[h+44>>2]=j;u[h+40>>2]=f;u[h+36>>2]=K;u[h+28>>2]=j;u[h+24>>2]=f;u[h+20>>2]=K;f=x(Q*x(P*I));i=x(Q*x(P*i));j=x(Q*x(P*C));k=x(x(x(p*f)+x(s*i))-x(E*j));m=x(x(p*j)+x(x(E*f)+x(D*i)));l=x(x(x(E*i)+x(s*j))-x(D*f));f=x(x(x(s*f)+x(D*j))-x(p*i));u[h+56>>2]=B+x(x(E*k)+x(x(x(p*m)+x(s*l))-x(D*f)));u[h+52>>2]=Y+x(x(p*f)+x(x(x(D*m)+x(s*k))-x(E*l)));u[h+48>>2]=X+x(x(D*l)+x(x(x(E*m)+x(s*f))-x(p*k)));v=v+1|0;if((U|0)!=(v|0)){continue}break}break d}J(151477,151192,516,151467);G()}z=r[c+296|0];if(!(u[c+264>>2]>=u[c+284>>2]^1|(q[d+4>>2]==1?!(z&8):0))){g=q[c+280>>2];x:{if(!g){break x}q[c+280>>2]=3;if((g|0)==3){break x}g=q[a+72>>2];if(!g){break x}Mi[q[a+68>>2]](q[a+16>>2],q[c+128>>2],q[c+132>>2],3,g);z=r[c+296|0]}o[c+296|0]=z&247}z=q[c+280>>2]}if((z|0)!=3|q[c+60>>2]!=q[c+56>>2]){break b}q[c+280>>2]=0;g=q[a+72>>2];if(!g){break b}h=q[a+16>>2]-1|0;q[a+16>>2]=h;Mi[q[a+68>>2]](h,q[c+128>>2],q[c+132>>2],0,g)}n=q[c+60>>2];h=q[c+56>>2];v=n-h|0;g=(v|0)/160|0;y:{if(!v){break y}if((h|0)!=(n|0)){i=x(x(1)/u[b+18564>>2]);v=g>>>0>1?g:1;z=0;g=h;while(1){g=w(z,160)+g|0;f=x(x(x(1)-x(i*u[g+64>>2]))*x(65535));f=f=x(0)){n=~~f>>>0;break z}n=0}q[g+144>>2]=(g-h|0)/160&65535|n<<16;z=z+1|0;if((v|0)==(z|0)){break y}g=q[c+56>>2];if((q[c+60>>2]-g|0)/160>>>0>z>>>0){continue}break}}break a}n=0;q[H+32>>2]=0;ix(q[c+56>>2],q[c+60>>2],H+16|0);q[H+56>>2]=0;T=q[c+56>>2];U=q[c+60>>2]-T|0;v=(U|0)/160|0;if(U){Z=v>>>0>1?v:1;while(1){h=T+w(n,160)|0;f=u[h+68>>2]<=x(0)?x(0):x(x(1)-x(u[h+64>>2]*u[h+72>>2]));i=x(f*x(64));A:{if(i=x(0)){g=~~i>>>0;break A}g=0}z=g;g=w(z>>>0<63?z:63,12)+b|0;j=u[g+12356>>2];k=u[g+12360>>2];m=u[g+12352>>2];l=u[g+13128>>2];B=u[g+13132>>2];p=u[g+13124>>2];s=u[g+13900>>2];D=u[g+13904>>2];E=u[g+13896>>2];C=u[g+14672>>2];R=u[g+14676>>2];Q=u[g+14668>>2];I=u[g+16988>>2];K=u[g+16992>>2];V=u[g+16984>>2];X=u[g+16216>>2];Y=u[g+16220>>2];N=u[g+16212>>2];ea=u[h+96>>2];P=u[h+100>>2];L=u[h+104>>2];S=u[h+108>>2];i=x(u[g+11584>>2]+x(u[g+11588>>2]*x(f-u[g+11580>>2])));u[h+136>>2]=i;u[h+132>>2]=i;u[h+128>>2]=i;u[h+148>>2]=x(X+x(Y*x(f-N)))+u[h+84>>2];u[h+152>>2]=x(I+x(K*x(f-V)))+u[h+88>>2];i=x(S*x(C+x(R*x(f-Q))));u[h+124>>2]=i>2]=i>2]=i>2]=f>2]-2|0){default:if(!U){break B}Z=v>>>0>1?v:1;h=q[70726];z=0;while(1){g=T+w(z,160)|0;i=u[g+68>>2]<=x(0)?x(0):x(x(1)-x(u[g+64>>2]*u[g+72>>2]));f=x(i*x(64));D:{if(f=x(0)){v=~~f>>>0;break D}v=0}n=w(v>>>0<63?v:63,12)+b|0;i=x(x(x(u[n+15444>>2]+x(u[n+15448>>2]*x(i-u[n+15440>>2])))*x(.01745329238474369))*x(.5));O=+x(i+x(-1.5707963705062866))*10430.378350470453;E:{if(y(O)<2147483648){n=~~O;break E}n=-2147483648}j=u[g+24>>2];f=x(x(n&511)*x(.001953125));f=x(x(u[h+(((n>>>9|0)+1&127)<<2)>>2]*f)+x(u[h+(n>>>7&508)>>2]*x(x(1)-f)));B=x(j*f);v=g;k=u[g+28>>2];M=k;O=+i*10430.378350470453;F:{if(y(O)<2147483648){n=~~O;break F}n=-2147483648}i=x(x(n&511)*x(.001953125));i=x(x(u[(((n>>>9|0)+1&127)<<2)+h>>2]*i)+x(u[h+(n>>>7&508)>>2]*x(x(1)-i)));m=u[g+16>>2];p=x(m*x(0));l=u[g+20>>2];s=x(l*x(0));u[v+44>>2]=x(x(x(M*i)-p)-s)-B;B=x(j*x(0));D=x(k*x(0));u[g+36>>2]=x(B+x(D+x(l*i)))-x(m*f);u[g+32>>2]=x(x(D+x(m*i))+x(l*f))-B;u[g+40>>2]=x(p+x(x(j*i)+x(k*f)))-s;z=z+1|0;if((Z|0)!=(z|0)){continue}break}break B;case 0:if(!U){break B}Z=v>>>0>1?v:1;h=q[70726];z=0;while(1){g=T+w(z,160)|0;i=u[g+68>>2]<=x(0)?x(0):x(x(1)-x(u[g+64>>2]*u[g+72>>2]));f=x(i*x(64));G:{if(f=x(0)){v=~~f>>>0;break G}v=0}n=w(v>>>0<63?v:63,12)+b|0;i=x(x(x(u[n+15444>>2]+x(u[n+15448>>2]*x(i-u[n+15440>>2])))*x(.01745329238474369))*x(.5));O=+x(i+x(-1.5707963705062866))*10430.378350470453;H:{if(y(O)<2147483648){n=~~O;break H}n=-2147483648}l=u[g+24>>2];f=x(x(n&511)*x(.001953125));k=x(x(u[h+(((n>>>9|0)+1&127)<<2)>>2]*f)+x(u[h+(n>>>7&508)>>2]*x(x(1)-f)));s=x(l*k);v=g;B=u[g+28>>2];M=B;O=+i*10430.378350470453;I:{if(y(O)<2147483648){n=~~O;break I}n=-2147483648}f=x(x(n&511)*x(.001953125));m=x(x(u[(((n>>>9|0)+1&127)<<2)+h>>2]*f)+x(u[h+(n>>>7&508)>>2]*x(x(1)-f)));j=u[g+16>>2];D=x(j*x(0));p=u[g+20>>2];E=x(p*x(0));f=x(x(x(x(M*m)-D)-E)-s);u[v+44>>2]=f;s=x(l*x(0));C=x(B*x(0));i=x(x(s+x(C+x(p*m)))-x(j*k));u[g+36>>2]=i;j=x(x(x(C+x(j*m))+x(p*k))-s);u[g+32>>2]=j;m=x(x(D+x(x(l*m)+x(B*k)))-E);u[g+40>>2]=m;l=u[g+48>>2];B=u[g+52>>2];s=u[g+56>>2];C=x(x(x(l*l)+x(B*B))+x(s*s));if(!(C>x(9999999747378752e-20)^1)){p=x(1);D=x(0);E=x(0);k=x(0);M=s;s=x(x(1)/x(F(C)));C=x(M*s);R=x(C*x(0));B=x(B*s);s=x(l*s);Q=x(s*x(0));l=x(x(R+x(B+Q))+x(1));if(!((l>=x(0)?l:x(-l))>x(9999999747378752e-20)^1)){B=x(B*x(0));l=x(F(x(l+l)));k=x(x(1)/l);p=x(x(B-s)*k);E=x(x(Q-R)*k);D=x(x(C-B)*k);k=x(l*x(.5))}u[g+32>>2]=x(x(i*p)+x(x(f*D)+x(j*k)))-x(m*E);u[g+36>>2]=x(x(m*D)+x(x(f*E)+x(i*k)))-x(j*p);u[g+40>>2]=x(x(j*E)+x(x(f*p)+x(m*k)))-x(i*D);u[g+44>>2]=x(x(x(f*k)-x(j*D))-x(i*E))-x(m*p)}z=z+1|0;if((Z|0)!=(z|0)){continue}break}break B;case 1:break C}}if(!U){break B}v=v>>>0>1?v:1;g=0;while(1){h=T+w(g,160)|0;j=u[h+68>>2]<=x(0)?x(0):x(x(1)-x(u[h+64>>2]*u[h+72>>2]));f=x(j*x(64));J:{if(f=x(0)){n=~~f>>>0;break J}n=0}i=u[h+40>>2];n=w(n>>>0<63?n:63,12)+b|0;j=x(x(x(x(x(u[n+17760>>2]+x(u[n+17764>>2]*x(j-u[n+17756>>2])))*u[h+156>>2])*x(.01745329238474369))*e)*x(.5));f=Lk(j);k=u[h+44>>2];j=Nl(j);m=u[h+32>>2];B=x(m*x(0));l=u[h+36>>2];p=x(l*x(0));u[h+44>>2]=x(x(x(k*j)-B)-p)-x(i*f);u[h+40>>2]=x(B+x(x(k*f)+x(i*j)))-p;i=x(i*x(0));k=x(k*x(0));u[h+36>>2]=x(i+x(k+x(l*j)))-x(m*f);u[h+32>>2]=x(x(l*f)+x(k+x(m*j)))-i;g=g+1|0;if((v|0)!=(g|0)){continue}break}}C=x(1);C=q[d+12>>2]?C:u[a+44>>2];h=q[b+18532>>2];g=q[b+18528>>2];v=h-g|0;n=(v|0)/1544|0;K:{if(!v){break K}L:{if((g|0)!=(h|0)){h=c+56|0;f=u[d+8>>2];f=f<=x(0)?x(0):x(u[c+264>>2]/f);v=n>>>0>1?n:1;z=0;while(1){if(t[d+104>>2]<=z>>>0){break L}n=w(z,1544)+g|0;M:{N:{O:{P:{Q:{g=q[d+100>>2]+(z<<6)|0;switch(q[g>>2]){case 3:break N;case 2:break O;case 1:break P;case 0:break Q;default:break M}}i=u[d+44>>2];j=u[g+44>>2];k=u[g+32>>2];m=u[d+32>>2];l=u[d+36>>2];B=u[g+36>>2];p=u[g+40>>2];s=u[d+40>>2];u[H+44>>2]=x(x(x(i*j)-x(k*m))-x(l*B))-x(p*s);u[H+40>>2]=x(x(x(i*p)+x(j*s))+x(m*B))-x(k*l);u[H+36>>2]=x(x(k*s)+x(x(j*l)+x(i*B)))-x(m*p);u[H+32>>2]=x(x(x(i*k)+x(m*j))+x(l*p))-x(s*B);p9(h,n,H+32|0,C,f,e);break M}i=u[d+44>>2];j=u[g+44>>2];k=u[g+32>>2];m=u[d+32>>2];l=u[d+36>>2];B=u[g+36>>2];p=u[g+40>>2];s=u[d+40>>2];u[H+44>>2]=x(x(x(i*j)-x(k*m))-x(l*B))-x(p*s);u[H+40>>2]=x(x(x(i*p)+x(j*s))+x(m*B))-x(k*l);u[H+36>>2]=x(x(k*s)+x(x(j*l)+x(i*B)))-x(m*p);u[H+32>>2]=x(x(x(i*k)+x(m*j))+x(l*p))-x(s*B);o9(h,n,g,H+32|0,f,e);break M}kI(H+32|0,a,d,g);n9(h,n,H+32|0,C,f,e);break M}kI(H+32|0,a,d,g);i=u[d+44>>2];j=u[g+44>>2];k=u[g+32>>2];m=u[d+32>>2];l=u[d+36>>2];B=u[g+36>>2];p=u[g+40>>2];s=u[d+40>>2];u[H+28>>2]=x(x(x(i*j)-x(k*m))-x(l*B))-x(p*s);u[H+24>>2]=x(x(x(i*p)+x(j*s))+x(m*B))-x(k*l);u[H+20>>2]=x(x(k*s)+x(x(j*l)+x(i*B)))-x(m*p);u[H+16>>2]=x(x(x(i*k)+x(m*j))+x(l*p))-x(s*B);m9(h,n,H+32|0,H+16|0,C,f,e)}z=z+1|0;if((v|0)==(z|0)){break K}g=q[b+18528>>2];if((q[b+18532>>2]-g|0)/1544>>>0>z>>>0){continue}break}}break a}J(151361,151373,241,151403);G()}b=q[c+56>>2];c=q[c+60>>2]-b|0;a=(c|0)/160|0;R:{if(!c){break R}c=a>>>0>1?a:1;g=0;if(!r[d+120|0]){while(1){a=b+w(g,160)|0;u[a>>2]=u[a>>2]+x(u[a+48>>2]*e);f=u[a+128>>2];u[a+128>>2]=f+x(f*u[a+148>>2]);u[a+8>>2]=u[a+8>>2]+x(u[a+56>>2]*e);u[a+4>>2]=u[a+4>>2]+x(u[a+52>>2]*e);f=u[a+132>>2];u[a+132>>2]=f+x(f*u[a+152>>2]);g=g+1|0;if((c|0)!=(g|0)){continue}break R}}while(1){a=b+w(g,160)|0;f=u[a+48>>2];u[a>>2]=u[a>>2]+x(f*e);i=u[a+128>>2];u[a+128>>2]=i+x(i*u[a+148>>2]);i=u[a+56>>2];u[a+8>>2]=u[a+8>>2]+x(i*e);j=u[a+52>>2];u[a+4>>2]=u[a+4>>2]+x(j*e);k=u[a+132>>2];u[a+132>>2]=k+x(x(x(F(x(x(x(f*f)+x(j*j))+x(i*i))))*x(k*u[a+152>>2]))*x(.008333333767950535));g=g+1|0;if((c|0)!=(g|0)){continue}break}}}Ii=H- -64|0;return}J(151947,151192,479,151403);G()}function gF(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,u=0,x=0,y=0,z=0,A=0,B=0,D=0;l=Ii-32|0;Ii=l;z=q[35266];A=q[35264];B=q[35265];a:while(1){f=q[a+12>>2];j=q[a+24>>2];s=q[q[q[a+20>>2]+4>>2]>>2];n=q[q[s+16>>2]+8>>2];while(1){b:{c=j;j=c+4|0;i=q[c>>2];d=r[a+56|0];c:{if(!(d&12)){break c}e=q[a+64>>2]-1|0;q[a+64>>2]=e;d:{if(e){if(!(d&4)){break c}f=q[a+24>>2];q[a+24>>2]=j;break d}f=q[a+24>>2];q[a+24>>2]=j;if(!(d&8)){break d}q[a+64>>2]=q[a+60>>2];sF(a,3,-1)}e:{if(!(d&4)){break e}d=q[q[q[q[a+20>>2]+4>>2]>>2]+16>>2];e=q[d+12>>2];g=(j-e>>2)-1|0;d=q[d+20>>2];f:{if(!d){k=0;if(!g|f>>>0>=j>>>0){break f}break e}k=q[d+(g<<2)>>2];if(!g|f>>>0>=j>>>0){break f}if(q[(d+(f-e|0)|0)-4>>2]==(k|0)){break e}}sF(a,2,k)}if(r[a+6|0]==1){q[a+24>>2]=c;break b}f=q[a+12>>2]}m=i>>>6&255;g=(m<<4)+f|0;g:{h:{i:{switch(i&63){case 0:e=(i>>>19&8176)+f|0;c=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=c;q[((m<<4)+f|0)+8>>2]=q[e+8>>2];continue;case 1:e=(i>>>10&4194288)+n|0;c=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=c;q[((m<<4)+f|0)+8>>2]=q[e+8>>2];continue;case 2:q[g>>2]=i>>>23;q[((m<<4)+f|0)+8>>2]=1;j=i&8372224?c+8|0:j;continue;case 3:d=(i>>>19&8176)+f|0;while(1){q[d+8>>2]=0;d=d-16|0;if(g>>>0<=d>>>0){continue}break}continue;case 4:e=q[q[((i>>>21&2044)+s|0)+20>>2]+8>>2];c=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=c;q[((m<<4)+f|0)+8>>2]=q[e+8>>2];continue;case 5:c=q[s+12>>2];q[l+8>>2]=5;q[l>>2]=c;q[a+24>>2]=j;Ls(a,l,(i>>>10&4194288)+n|0,g);f=q[a+12>>2];continue;case 6:q[a+24>>2]=j;c=i>>>10|0;Ls(a,(i>>>19&8176)+f|0,i&4194304?(c&4080)+n|0:(c&8176)+f|0,g);f=q[a+12>>2];continue;case 7:c=q[s+12>>2];q[l+8>>2]=5;q[l>>2]=c;q[a+24>>2]=j;Ru(a,l,(i>>>10&4194288)+n|0,g);f=q[a+12>>2];continue;case 8:c=q[g+4>>2];d=q[((i>>>21&2044)+s|0)+20>>2];e=q[d+8>>2];q[e>>2]=q[g>>2];q[e+4>>2]=c;c=(m<<4)+f|0;q[e+8>>2]=q[c+8>>2];if(q[c+8>>2]<4){continue}c=q[g>>2];if(!(r[c+5|0]&3)|!(r[d+5|0]&4)){continue}go(a,d,c);continue;case 9:q[a+24>>2]=j;c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=i>>>10|0;Ru(a,g,e,i&4194304?(c&4080)+n|0:(c&8176)+f|0);f=q[a+12>>2];continue;case 10:k=i>>>23|0;d=k>>>3&31;e=i>>>14&511;c=e>>>3&31;q[g>>2]=lp(a,d?(k&7|8)<>2]=5;q[a+24>>2]=j;c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}f=q[a+12>>2];continue;case 11:e=(i>>>19&8176)+f|0;c=q[e+4>>2];q[g+16>>2]=q[e>>2];q[g+20>>2]=c;q[g+24>>2]=q[e+8>>2];q[a+24>>2]=j;c=i>>>10|0;Ls(a,e,i&4194304?(c&4080)+n|0:(c&8176)+f|0,g);f=q[a+12>>2];continue;case 12:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;j:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];k:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break k}v[g>>3]=v[e>>3]+v[h>>3];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break j}if(!Sl(q[e>>2]+16|0,l)){break j}v[l+24>>3]=v[l>>3];c=l+24|0}l:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break j}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break l;default:break j}}v[g>>3]=v[c>>3]+v[h>>3];q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}m:{f=el(a,e,5);if(!q[f+8>>2]){f=el(a,h,5);if(!q[f+8>>2]){break m}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 13:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;n:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];o:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break o}v[g>>3]=v[e>>3]-v[h>>3];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break n}if(!Sl(q[e>>2]+16|0,l)){break n}v[l+24>>3]=v[l>>3];c=l+24|0}p:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break n}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break p;default:break n}}v[g>>3]=v[c>>3]-v[h>>3];q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}q:{f=el(a,e,6);if(!q[f+8>>2]){f=el(a,h,6);if(!q[f+8>>2]){break q}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 14:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;r:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];s:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break s}v[g>>3]=v[e>>3]*v[h>>3];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break r}if(!Sl(q[e>>2]+16|0,l)){break r}v[l+24>>3]=v[l>>3];c=l+24|0}t:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break r}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break t;default:break r}}v[g>>3]=v[c>>3]*v[h>>3];q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}u:{f=el(a,e,7);if(!q[f+8>>2]){f=el(a,h,7);if(!q[f+8>>2]){break u}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 15:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;v:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];w:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break w}v[g>>3]=v[e>>3]/v[h>>3];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break v}if(!Sl(q[e>>2]+16|0,l)){break v}v[l+24>>3]=v[l>>3];c=l+24|0}x:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break v}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break x;default:break v}}v[g>>3]=v[c>>3]/v[h>>3];q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}y:{f=el(a,e,8);if(!q[f+8>>2]){f=el(a,h,8);if(!q[f+8>>2]){break y}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 16:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;z:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];A:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break A}u=v[e>>3];p=v[h>>3];v[g>>3]=u-p*C(u/p);q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break z}if(!Sl(q[e>>2]+16|0,l)){break z}v[l+24>>3]=v[l>>3];c=l+24|0}B:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break z}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break B;default:break z}}u=v[c>>3];p=v[h>>3];v[g>>3]=u-p*C(u/p);q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}C:{f=el(a,e,9);if(!q[f+8>>2]){f=el(a,h,9);if(!q[f+8>>2]){break C}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 17:c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;D:{c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[e+8>>2];E:{if((c|0)==3){if(q[h+8>>2]!=3){q[a+24>>2]=j;c=e;break E}v[g>>3]=Up(v[e>>3],v[h>>3]);q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;if((c|0)!=4){break D}if(!Sl(q[e>>2]+16|0,l)){break D}v[l+24>>3]=v[l>>3];c=l+24|0}F:{switch(q[h+8>>2]-3|0){case 1:if(!Sl(q[h>>2]+16|0,l)){break D}v[l+16>>3]=v[l>>3];h=l+16|0;break;case 0:break F;default:break D}}v[g>>3]=Up(v[c>>3],v[h>>3]);q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}G:{f=el(a,e,10);if(!q[f+8>>2]){f=el(a,h,10);if(!q[f+8>>2]){break G}}k=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[e+4>>2];d=q[a+8>>2];q[d+16>>2]=q[e>>2];q[d+20>>2]=c;q[d+24>>2]=q[e+8>>2];c=q[h+4>>2];e=q[a+8>>2];q[e+32>>2]=q[h>>2];q[e+36>>2]=c;q[e+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-k|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,e,h);f=q[a+12>>2];continue;case 18:k=(i>>>19&8176)+f|0;c=q[k+8>>2];if((c|0)==3){v[g>>3]=-v[k>>3];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;H:{if((c|0)!=4){break H}if(!Sl(q[k>>2]+16|0,l)){break H}v[l+24>>3]=v[l>>3];I:{switch(q[k+8>>2]-3|0){case 1:if(!Sl(q[k>>2]+16|0,l)){break H}break;case 0:break I;default:break H}}v[g>>3]=-v[l+24>>3];q[((m<<4)+f|0)+8>>2]=3;f=q[a+12>>2];continue}J:{f=el(a,k,11);if(!q[f+8>>2]){f=el(a,k,11);if(!q[f+8>>2]){break J}}e=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[k+4>>2];d=q[a+8>>2];q[d+16>>2]=q[k>>2];q[d+20>>2]=c;q[d+24>>2]=q[k+8>>2];c=q[k+4>>2];d=q[a+8>>2];q[d+32>>2]=q[k>>2];q[d+36>>2]=c;q[d+40>>2]=q[k+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-e|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}iq(a,k,k);f=q[a+12>>2];continue;case 19:h=1;K:{L:{M:{c=(i>>>23<<4)+f|0;switch(q[c+8>>2]){case 0:break K;case 1:break M;default:break L}}h=!q[c>>2];break K}h=0}q[g>>2]=h;q[((m<<4)+f|0)+8>>2]=1;continue;case 20:N:{O:{P:{k=(i>>>19&8176)+f|0;switch(q[k+8>>2]-4|0){case 0:break O;case 1:break P;default:break N}}v[g>>3]=nF(q[k>>2])|0;q[((m<<4)+f|0)+8>>2]=3;continue}v[g>>3]=t[q[k>>2]+12>>2];q[((m<<4)+f|0)+8>>2]=3;continue}q[a+24>>2]=j;Q:{f=el(a,k,12);if(!q[f+8>>2]){f=el(a,141056,12);if(!q[f+8>>2]){break Q}}e=q[a+32>>2];c=q[f+4>>2];d=q[a+8>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;q[d+8>>2]=q[f+8>>2];c=q[k+4>>2];d=q[a+8>>2];q[d+16>>2]=q[k>>2];q[d+20>>2]=c;q[d+24>>2]=q[k+8>>2];c=q[a+8>>2];q[c+32>>2]=A;q[c+36>>2]=B;q[c+40>>2]=z;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-e|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];f=q[a+12>>2];continue}_u(a,k,143030);f=q[a+12>>2];continue;case 21:q[a+24>>2]=j;c=i>>>14&511;e=i>>>23|0;Ey(a,(c-e|0)+1|0,c);c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}f=q[a+12>>2];d=f+(m<<4)|0;e=(e<<4)+f|0;c=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=c;q[d+8>>2]=q[e+8>>2];continue;case 22:j=((i>>>12&1048572)+j|0)-524284|0;continue;case 23:q[a+24>>2]=j;c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=i>>>10|0;c=i&4194304?(c&4080)+n|0:(c&8176)+f|0;if(q[e+8>>2]==q[c+8>>2]){c=(cZ(a,e,c)|0)!=0}else{c=0}if((c|0)==(m|0)){j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;f=q[a+12>>2];continue;case 24:q[a+24>>2]=j;c=i>>>19|0;e=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=i>>>10|0;if((fF(a,e,i&4194304?(c&4080)+n|0:(c&8176)+f|0)|0)==(m|0)){j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;f=q[a+12>>2];continue;case 25:q[a+24>>2]=j;R:{S:{c=i>>>10|0;h=i&4194304?(c&4080)+n|0:(c&8176)+f|0;c=i>>>19|0;i=(i|0)>-1?(c&8176)+f|0:(c&4080)+n|0;c=q[i+8>>2];if(q[h+8>>2]!=(c|0)){break S}T:{switch(c-3|0){case 0:d=v[i>>3]<=v[h>>3];break R;case 1:e=q[i>>2];g=e+16|0;c=q[h>>2];k=c+16|0;d=pu(g,k);U:{if(d){break U}h=q[e+12>>2];f=q[c+12>>2];while(1){c=hj(g);if((c|0)==(f|0)){d=(f|0)!=(h|0);break U}if((c|0)==(h|0)){d=-1;break U}c=c+1|0;f=f-c|0;h=h-c|0;g=c+g|0;k=c+k|0;d=pu(g,k);if(!d){continue}break}}d=(d|0)<1;break R;default:break T}}V:{d=el(a,i,14);if(!q[d+8>>2]){break V}if(!hp(d,el(a,h,14))){break V}e=q[a+32>>2];c=q[d+4>>2];g=q[a+8>>2];q[g>>2]=q[d>>2];q[g+4>>2]=c;q[g+8>>2]=q[d+8>>2];c=q[i+4>>2];d=q[a+8>>2];q[d+16>>2]=q[i>>2];q[d+20>>2]=c;q[d+24>>2]=q[i+8>>2];c=q[h+4>>2];d=q[a+8>>2];q[d+32>>2]=q[h>>2];q[d+36>>2]=c;q[d+40>>2]=q[h+8>>2];d=q[a+8>>2];if((q[a+28>>2]-d|0)<=48){Mk(a,3);d=q[a+8>>2]}q[a+8>>2]=d+48;Ul(a,d,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;c=q[d+4>>2];e=q[a+32>>2]+(g-e|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=c;q[e+8>>2]=q[d+8>>2];W:{X:{c=q[a+8>>2];d=q[c+8>>2];switch(d|0){case 0:break R;case 1:break X;default:break W}}d=q[c>>2]!=0;break R}d=1;break R}d=el(a,h,13);if(!q[d+8>>2]){break S}if(!hp(d,el(a,i,13))){break S}e=q[a+32>>2];c=q[d+4>>2];k=q[a+8>>2];q[k>>2]=q[d>>2];q[k+4>>2]=c;q[k+8>>2]=q[d+8>>2];c=q[h+4>>2];d=q[a+8>>2];q[d+16>>2]=q[h>>2];q[d+20>>2]=c;q[d+24>>2]=q[h+8>>2];c=q[i+4>>2];d=q[a+8>>2];q[d+32>>2]=q[i>>2];q[d+36>>2]=c;q[d+40>>2]=q[i+8>>2];g=q[a+8>>2];if((q[a+28>>2]-g|0)<=48){Mk(a,3);g=q[a+8>>2]}q[a+8>>2]=g+48;d=1;Ul(a,g,1);g=q[a+8>>2]-16|0;q[a+8>>2]=g;c=q[g+4>>2];e=q[a+32>>2]+(k-e|0)|0;q[e>>2]=q[g>>2];q[e+4>>2]=c;q[e+8>>2]=q[g+8>>2];Y:{Z:{c=q[a+8>>2];switch(q[c+8>>2]){case 0:break R;case 1:break Z;default:break Y}}d=!q[c>>2];break R}d=0;break R}d=oF(a,i,h)}if((d|0)==(m|0)){j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;f=q[a+12>>2];continue;case 26:h=1;_:{$:{switch(q[((m<<4)+f|0)+8>>2]){case 1:h=!q[g>>2];break _;case 0:break _;default:break $}}h=0}if((i>>>14&511)!=(h|0)){j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;continue;case 27:h=1;aa:{ba:{ca:{d=(i>>>19&8176)+f|0;e=q[d+8>>2];switch(e|0){case 0:break aa;case 1:break ca;default:break ba}}h=!q[d>>2];break aa}h=0}if((i>>>14&511)!=(h|0)){c=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=c;q[((m<<4)+f|0)+8>>2]=e;j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;continue;case 28:d=i>>>14&511;e=d-1|0;c=i>>>23|0;if(c){q[a+8>>2]=(c<<4)+g}q[a+24>>2]=j;c=av(a,g,e);if((c|0)!=1){if(c){break b}b=b+1|0;continue a}if(d){q[a+8>>2]=q[q[a+20>>2]+8>>2]}f=q[a+12>>2];continue;case 29:c=i>>>23|0;if(c){q[a+8>>2]=(c<<4)+g}q[a+24>>2]=j;c=av(a,g,-1);if((c|0)!=1){if(c){break b}h=q[a+20>>2];e=h-24|0;c=q[h+4>>2];j=h-20|0;i=q[j>>2];g=i;d=e;if(q[a+104>>2]){Jo(a,q[e>>2]);g=q[j>>2]}j=g+(q[h>>2]-c|0)|0;q[d>>2]=j;q[a+12>>2]=j;j=0;g=c;if(c>>>0>2]){while(1){e=q[g+4>>2];d=j<<4;k=d+i|0;q[k>>2]=q[g>>2];q[k+4>>2]=e;q[k+8>>2]=q[(c+d|0)+8>>2];j=j+1|0;g=c+(j<<4)|0;if(g>>>0>2]){continue}break}}j=i+(j<<4)|0;q[a+8>>2]=j;q[h-16>>2]=j;q[h-12>>2]=q[a+24>>2];j=h-4|0;q[j>>2]=q[j>>2]+1;q[a+20>>2]=q[a+20>>2]-24;continue a}f=q[a+12>>2];continue;case 30:c=i>>>23|0;if(c){q[a+8>>2]=((c<<4)+g|0)-16}if(q[a+104>>2]){Jo(a,f)}q[a+24>>2]=j;j=Ny(a,g);b=b-1|0;if(!b){break b}if(!j){continue a}q[a+8>>2]=q[q[a+20>>2]+8>>2];continue a;case 31:p=v[g+32>>3];y=p+v[g>>3];u=v[g+16>>3];da:{if(!(p>0^1)){if(u>=y^1){continue}break da}if(u<=y^1){continue}}v[g>>3]=y;q[((m<<4)+f|0)+8>>2]=3;q[g+56>>2]=3;v[g+48>>3]=y;j=((i>>>12&1048572)+j|0)-524284|0;continue;case 32:q[a+24>>2]=j;ea:{e=(m<<4)+f|0;c=q[e+8>>2];if((c|0)!=3){if((c|0)!=4){break ea}if(!Sl(q[g>>2]+16|0,l)){break ea}v[g>>3]=v[l>>3];q[e+8>>2]=3}c=q[g+24>>2];if((c|0)!=3){if((c|0)!=4){break h}if(!Sl(q[g+16>>2]+16|0,l)){break h}p=v[l>>3];q[g+24>>2]=3;v[g+16>>3]=p}c=q[g+40>>2];if((c|0)==3){break g}fa:{if((c|0)!=4){break fa}if(!Sl(q[g+32>>2]+16|0,l)){break fa}p=v[l>>3];q[g+40>>2]=3;v[g+32>>3]=p;break g}Yk(a,143110,0);G()}Yk(a,143044,0);break g;case 33:c=q[g+36>>2];q[g+80>>2]=q[g+32>>2];q[g+84>>2]=c;c=q[g+20>>2];e=g- -64|0;q[e>>2]=q[g+16>>2];q[e+4>>2]=c;c=q[g+4>>2];q[g+48>>2]=q[g>>2];q[g+52>>2]=c;q[g+88>>2]=q[g+40>>2];q[g+72>>2]=q[g+24>>2];c=m<<4;q[g+56>>2]=q[(c+f|0)+8>>2];q[a+24>>2]=j;q[a+8>>2]=g+96;Ul(a,g+48|0,i>>>14&511);q[a+8>>2]=q[q[a+20>>2]+8>>2];f=q[a+12>>2];e=c+f|0;c=q[e+56>>2];if(c){q[e+40>>2]=c;c=q[e+52>>2];q[e+32>>2]=q[e+48>>2];q[e+36>>2]=c;j=((q[j>>2]>>>12&1048572)+j|0)-524284|0}j=j+4|0;continue;case 34:k=i>>>14&511;d=i>>>23|0;if(!d){e=q[a+8>>2];q[a+8>>2]=q[q[a+20>>2]+8>>2];d=(e-g>>4)-1|0}if(!k){k=q[c+4>>2];j=c+8|0}if(q[((m<<4)+f|0)+8>>2]!=5){continue}h=(w(k,50)+d|0)-50|0;i=q[g>>2];if((h|0)>q[i+28>>2]){rZ(a,i,h)}if((d|0)<1){continue}while(1){k=Zu(a,i,h);c=d;d=(c<<4)+g|0;e=q[d+4>>2];q[k>>2]=q[d>>2];q[k+4>>2]=e;q[k+8>>2]=q[d+8>>2];if(!(!(r[i+5|0]&4)|(!(r[q[d>>2]+5|0]&3)|q[d+8>>2]<4))){e=q[a+16>>2];o[i+5|0]=r[i+5|0]&251;q[i+24>>2]=q[e+40>>2];q[e+40>>2]=i}h=h-1|0;d=c-1|0;if((c|0)>1){continue}break}continue;case 35:Jo(a,g);continue;case 36:c=q[q[q[s+16>>2]+16>>2]+(i>>>12&1048572)>>2];h=r[c+72|0];i=qF(a,h,q[s+12>>2]);q[i+16>>2]=c;d=0;if(h){while(1){e=q[j>>2];k=e>>>23|0;x=i+(d<<2)|0;if((e&63)==4){c=q[((k<<2)+s|0)+20>>2]}else{c=BZ(a,(k<<4)+f|0)}q[x+20>>2]=c;j=j+4|0;d=d+1|0;if((h|0)!=(d|0)){continue}break}}q[g>>2]=i;q[((m<<4)+f|0)+8>>2]=6;q[a+24>>2]=j;c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}f=q[a+12>>2];continue;case 37:break i;default:continue}}x=q[a+20>>2];e=(r[q[s+16>>2]+73|0]^-1)+(q[x>>2]-q[x+4>>2]>>4)|0;c=i>>>23|0;ga:{if(c){c=c-1|0;break ga}q[a+24>>2]=j;if((q[a+28>>2]-q[a+8>>2]|0)<=e<<4){Mk(a,e)}f=q[a+12>>2];g=f+(m<<4)|0;q[a+8>>2]=g+(e<<4);c=e}if((c|0)<1){continue}d=0;m=0-e|0;while(1){D=(d<<4)+g|0;if((d|0)<(e|0)){k=d<<4;h=k+(q[x>>2]+(m<<4)|0)|0;i=g+k|0;k=q[h+4>>2];q[i>>2]=q[h>>2];q[i+4>>2]=k;i=q[h+8>>2]}else{i=0}q[D+8>>2]=i;d=d+1|0;if((c|0)!=(d|0)){continue}break}continue}Yk(a,143081,0)}v[g>>3]=v[g>>3]-v[g+32>>3];q[e+8>>2]=3;j=((i>>>12&1048572)+j|0)-524284|0;continue}break}break}Ii=l+32|0}function lwa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=0,l=0,m=0,n=0,t=0;d=Ii-48|0;Ii=d;c=Ui(b,0,96);h=q[a+104>>2];b=r[h+99376|0];a:{b:{c:{d:{e:{f:{g:{h:{switch(h|0){case 0:case 5:case 10:case 12:case 14:case 15:case 18:q[c>>2]=6;e=b<<9;j=x(x(r[(e+302480|0)+(r[a+21|0]<<1)|0])/x(255));u[d+32>>2]=j;i:{if(h-15>>>0<=2){b=e+302480|0;e=r[b+(r[a+22|0]<<1)|0];u[d+36>>2]=j;u[d+40>>2]=j;j=x(x(e>>>0)/x(255));u[d+16>>2]=j;u[d+20>>2]=j;u[d+24>>2]=j;u[d+44>>2]=x(r[b+(r[a+23|0]<<1)|0])/x(255);u[d+28>>2]=x(r[b+(r[a+24|0]<<1)|0])/x(255);e=h-8|0;g=4;break i}g=r[h+99472|0];e=e+302480|0;u[d+36>>2]=x(r[e+(r[a+23|0]<<1)|0])/x(255);u[d+40>>2]=x(r[e+(r[a+25|0]<<1)|0])/x(255);u[d+16>>2]=x(r[e+(r[a+22|0]<<1)|0])/x(255);u[d+20>>2]=x(r[e+(r[a+24|0]<<1)|0])/x(255);u[d+24>>2]=x(r[e+(r[a+26|0]<<1)|0])/x(255);e=h-8|0;if(e>>>0<=6){b=(b<<9)+302480|0;u[d+44>>2]=x(r[b+(r[a+27|0]<<1)|0])/x(255);u[d+28>>2]=x(r[b+(r[a+28|0]<<1)|0])/x(255);break i}q[d+28>>2]=1065353216;q[d+44>>2]=1065353216}Bq(g&255,7,d+32|0,d+16|0,d+4|0,d,d+8|0);q[c+40>>2]=q[d+4>>2];q[c+52>>2]=q[d>>2];if(e>>>0>=10){o[c+55|0]=127;o[c+43|0]=127}q[c+64>>2]=q[d+8>>2];q[c+68>>2]=q[d+12>>2];b=c;j:{k:{switch(h-5|0){case 9:o[c+8|0]=r[r[a+39|0]+103376|0];o[c+9|0]=r[r[a+40|0]+103376|0];o[c+10|0]=r[r[a+41|0]+103376|0];o[c+11|0]=r[r[a+42|0]+103376|0];o[c+12|0]=r[r[a+43|0]+103376|0];o[c+13|0]=r[r[a+44|0]+103376|0];o[c+14|0]=r[r[a+45|0]+103376|0];o[c+15|0]=r[r[a+46|0]+103376|0];o[c+16|0]=r[r[a+47|0]+103376|0];o[c+17|0]=r[r[a+48|0]+103376|0];o[c+18|0]=r[r[a+49|0]+103376|0];o[c+19|0]=r[r[a+50|0]+103376|0];o[c+20|0]=r[r[a+51|0]+103376|0];o[c+21|0]=r[r[a+52|0]+103376|0];o[c+22|0]=r[r[a+53|0]+103376|0];a=r[a+54|0]+103376|0;break j;case 13:o[c+8|0]=r[r[a+39|0]+103344|0];o[c+9|0]=r[r[a+40|0]+103344|0];o[c+10|0]=r[r[a+41|0]+103344|0];o[c+11|0]=r[r[a+42|0]+103344|0];o[c+12|0]=r[r[a+43|0]+103344|0];o[c+13|0]=r[r[a+44|0]+103344|0];o[c+14|0]=r[r[a+45|0]+103344|0];o[c+15|0]=r[r[a+46|0]+103344|0];o[c+16|0]=r[r[a+47|0]+103344|0];o[c+17|0]=r[r[a+48|0]+103344|0];o[c+18|0]=r[r[a+49|0]+103344|0];o[c+19|0]=r[r[a+50|0]+103344|0];o[c+20|0]=r[r[a+51|0]+103344|0];o[c+21|0]=r[r[a+52|0]+103344|0];o[c+22|0]=r[r[a+53|0]+103344|0];a=r[a+54|0]+103344|0;break j;default:o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];a=a+54|0;break j;case 0:case 7:break k}}o[c+8|0]=r[r[a+39|0]+103380|0];o[c+9|0]=r[r[a+40|0]+103380|0];o[c+10|0]=r[r[a+41|0]+103380|0];o[c+11|0]=r[r[a+42|0]+103380|0];o[c+12|0]=r[r[a+43|0]+103380|0];o[c+13|0]=r[r[a+44|0]+103380|0];o[c+14|0]=r[r[a+45|0]+103380|0];o[c+15|0]=r[r[a+46|0]+103380|0];o[c+16|0]=r[r[a+47|0]+103380|0];o[c+17|0]=r[r[a+48|0]+103380|0];o[c+18|0]=r[r[a+49|0]+103380|0];o[c+19|0]=r[r[a+50|0]+103380|0];o[c+20|0]=r[r[a+51|0]+103380|0];o[c+21|0]=r[r[a+52|0]+103380|0];o[c+22|0]=r[r[a+53|0]+103380|0];a=r[a+54|0]+103380|0}o[b+23|0]=r[a|0];break b;case 1:q[c>>2]=3;u[d+32>>2]=x(r[a+21|0])/x(255);u[d+36>>2]=x(r[a+23|0])/x(255);b=r[a+25|0];q[d+44>>2]=1065353216;u[d+40>>2]=x(b>>>0)/x(255);u[d+16>>2]=x(r[a+22|0])/x(255);u[d+20>>2]=x(r[a+24|0])/x(255);b=r[a+26|0];q[d+28>>2]=1065353216;u[d+24>>2]=x(b>>>0)/x(255);q[d+4>>2]=0;q[d>>2]=0;Bq(3,7,d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+42|0]=r[d+6|0];p[c+40>>1]=s[d+4>>1];p[c+44>>1]=s[d+4>>1];o[c+46|0]=r[d+6|0];b=r[d|0];o[c+52|0]=b;o[c+56|0]=b;b=r[d+1|0];o[c+57|0]=b;o[c+53|0]=b;b=r[d+2|0];o[c+58|0]=b;o[c+54|0]=b;b=q[d+8>>2];q[c+64>>2]=b;e=q[d+12>>2];q[c+76>>2]=e;q[c+72>>2]=b;q[c+68>>2]=e;o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break b;case 2:q[c>>2]=1;b=q[a+108>>2];q[c+4>>2]=r[w(b,6)+97520|0];q[d+44>>2]=1065353216;q[d+28>>2]=1065353216;l:{if(43795755>>>b&1){b=r[a+21|0];u[d+32>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+22|0];u[d+16>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+23|0];u[d+36>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+24|0];u[d+20>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+25|0];u[d+40>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+26|0];u[d+24>>2]=x((b<<4|b)>>>0)/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Yw(d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+42|0]=r[d+6|0];p[c+40>>1]=s[d+4>>1];p[c+52>>1]=s[d>>1];o[c+54|0]=r[d+2|0];q[c+64>>2]=q[d+8>>2];b=r[a+27|0];u[d+32>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+28|0];u[d+16>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+29|0];u[d+36>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+30|0];u[d+20>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+31|0];u[d+40>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+32|0];u[d+24>>2]=x((b<<4|b)>>>0)/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Yw(d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+46|0]=r[d+6|0];p[c+44>>1]=s[d+4>>1];p[c+56>>1]=s[d>>1];o[c+58|0]=r[d+2|0];q[c+72>>2]=q[d+8>>2];break l}b=r[a+21|0];u[d+32>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+22|0];u[d+16>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+23|0];u[d+36>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+24|0];u[d+20>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+25|0];u[d+40>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+26|0];u[d+24>>2]=x((b<<4|b)>>>0)/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Yw(d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+44|0]=r[d+4|0];o[c+56|0]=r[d|0];o[c+45|0]=r[d+5|0];o[c+57|0]=r[d+1|0];o[c+46|0]=r[d+6|0];o[c+58|0]=r[d+2|0];q[c+72>>2]=q[d+8>>2];b=r[a+27|0];u[d+32>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+28|0];u[d+16>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+29|0];u[d+36>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+30|0];u[d+20>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+31|0];u[d+40>>2]=x((b<<4|b)>>>0)/x(255);b=r[a+32|0];u[d+24>>2]=x((b<<4|b)>>>0)/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Yw(d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+40|0]=r[d+4|0];o[c+52|0]=r[d|0];o[c+41|0]=r[d+5|0];o[c+53|0]=r[d+1|0];o[c+42|0]=r[d+6|0];o[c+54|0]=r[d+2|0];q[c+64>>2]=q[d+8>>2]}o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break b;case 3:q[c>>2]=2;h=w(q[a+108>>2],6)+97840|0;q[c+4>>2]=r[h|0];e=1;b=(b<<9)+302480|0;l=r[b+(r[a+22|0]<<1)|0];g=c+40|0;h=w(r[h+4|0],3)+97920|0;i=r[h|0]<<2;f=g+i|0;o[f|0]=(w(r[b+(r[a+21|0]<<1)|0],31)+127>>>0)/255;m=i;i=c+52|0;k=m+i|0;o[k|0]=(w(l,31)+127>>>0)/255;l=r[b+(r[a+24|0]<<1)|0];o[f+1|0]=(w(r[b+(r[a+23|0]<<1)|0],31)+127>>>0)/255;o[k+1|0]=(w(l,31)+127>>>0)/255;l=r[b+(r[a+26|0]<<1)|0];o[f+2|0]=(w(r[b+(r[a+25|0]<<1)|0],31)+127>>>0)/255;o[k+2|0]=(w(l,31)+127>>>0)/255;l=r[b+(r[a+28|0]<<1)|0];k=r[h+1|0]<<2;f=k+g|0;o[f|0]=(w(r[b+(r[a+27|0]<<1)|0],31)+127>>>0)/255;k=i+k|0;o[k|0]=(w(l,31)+127>>>0)/255;l=r[b+(r[a+30|0]<<1)|0];o[f+1|0]=(w(r[b+(r[a+29|0]<<1)|0],31)+127>>>0)/255;o[k+1|0]=(w(l,31)+127>>>0)/255;l=r[b+(r[a+32|0]<<1)|0];o[f+2|0]=(w(r[b+(r[a+31|0]<<1)|0],31)+127>>>0)/255;o[k+2|0]=(w(l,31)+127>>>0)/255;f=r[b+(r[a+34|0]<<1)|0];h=r[h+2|0]<<2;g=h+g|0;o[g|0]=(w(r[b+(r[a+33|0]<<1)|0],31)+127>>>0)/255;h=h+i|0;o[h|0]=(w(f,31)+127>>>0)/255;f=r[b+(r[a+36|0]<<1)|0];o[g+1|0]=(w(r[b+(r[a+35|0]<<1)|0],31)+127>>>0)/255;o[h+1|0]=(w(f,31)+127>>>0)/255;f=r[b+(r[a+38|0]<<1)|0];o[g+2|0]=(w(r[b+(r[a+37|0]<<1)|0],31)+127>>>0)/255;o[h+2|0]=(w(f,31)+127>>>0)/255;o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break a;case 4:q[c>>2]=3;e=q[a+108>>2];q[c+4>>2]=r[w(e,6)+97520|0];q[d+44>>2]=1065353216;q[d+28>>2]=1065353216;m:{if(43795755>>>e&1){b=(b<<9)+302480|0;u[d+32>>2]=x(r[b+(r[a+21|0]<<1)|0])/x(255);u[d+16>>2]=x(r[b+(r[a+22|0]<<1)|0])/x(255);u[d+36>>2]=x(r[b+(r[a+23|0]<<1)|0])/x(255);u[d+20>>2]=x(r[b+(r[a+24|0]<<1)|0])/x(255);u[d+40>>2]=x(r[b+(r[a+25|0]<<1)|0])/x(255);u[d+24>>2]=x(r[b+(r[a+26|0]<<1)|0])/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Bq(3,7,d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+42|0]=r[d+6|0];p[c+40>>1]=s[d+4>>1];p[c+52>>1]=s[d>>1];o[c+54|0]=r[d+2|0];o[c+55|0]=127;o[c+43|0]=127;q[c+64>>2]=q[d+8>>2];q[c+68>>2]=q[d+12>>2];u[d+32>>2]=x(r[b+(r[a+27|0]<<1)|0])/x(255);u[d+16>>2]=x(r[b+(r[a+28|0]<<1)|0])/x(255);u[d+36>>2]=x(r[b+(r[a+29|0]<<1)|0])/x(255);u[d+20>>2]=x(r[b+(r[a+30|0]<<1)|0])/x(255);u[d+40>>2]=x(r[b+(r[a+31|0]<<1)|0])/x(255);u[d+24>>2]=x(r[b+(r[a+32|0]<<1)|0])/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Bq(3,7,d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+46|0]=r[d+6|0];p[c+44>>1]=s[d+4>>1];p[c+56>>1]=s[d>>1];o[c+58|0]=r[d+2|0];o[c+59|0]=127;o[c+47|0]=127;q[c+72>>2]=q[d+8>>2];q[c+76>>2]=q[d+12>>2];break m}b=(b<<9)+302480|0;u[d+32>>2]=x(r[b+(r[a+21|0]<<1)|0])/x(255);u[d+16>>2]=x(r[b+(r[a+22|0]<<1)|0])/x(255);u[d+36>>2]=x(r[b+(r[a+23|0]<<1)|0])/x(255);u[d+20>>2]=x(r[b+(r[a+24|0]<<1)|0])/x(255);u[d+40>>2]=x(r[b+(r[a+25|0]<<1)|0])/x(255);u[d+24>>2]=x(r[b+(r[a+26|0]<<1)|0])/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Bq(3,7,d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+44|0]=r[d+4|0];o[c+56|0]=r[d|0];o[c+45|0]=r[d+5|0];o[c+57|0]=r[d+1|0];o[c+46|0]=r[d+6|0];e=r[d+2|0];o[c+59|0]=127;o[c+47|0]=127;o[c+58|0]=e;q[c+72>>2]=q[d+8>>2];q[c+76>>2]=q[d+12>>2];u[d+32>>2]=x(r[b+(r[a+27|0]<<1)|0])/x(255);u[d+16>>2]=x(r[b+(r[a+28|0]<<1)|0])/x(255);u[d+36>>2]=x(r[b+(r[a+29|0]<<1)|0])/x(255);u[d+20>>2]=x(r[b+(r[a+30|0]<<1)|0])/x(255);u[d+40>>2]=x(r[b+(r[a+31|0]<<1)|0])/x(255);u[d+24>>2]=x(r[b+(r[a+32|0]<<1)|0])/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Bq(3,7,d+32|0,d+16|0,d+4|0,d,d+8|0);o[c+40|0]=r[d+4|0];o[c+52|0]=r[d|0];o[c+41|0]=r[d+5|0];o[c+53|0]=r[d+1|0];o[c+42|0]=r[d+6|0];b=r[d+2|0];o[c+55|0]=127;o[c+43|0]=127;o[c+54|0]=b;q[c+64>>2]=q[d+8>>2];q[c+68>>2]=q[d+12>>2]}o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break b;case 6:case 11:case 13:case 17:q[c>>2]=5;e=q[a+16>>2];q[c+92>>2]=e+1&3;if(h-15>>>0<=2){if((e|0)!=3){break f}b=(b<<9)+302480|0;e=(w(r[b+(r[a+21|0]<<1)|0],127)+127>>>0)/255|0;o[c+40|0]=e;g=r[b+(r[a+22|0]<<1)|0];o[c+41|0]=e;o[c+42|0]=e;e=(w(g,127)+127>>>0)/255|0;o[c+53|0]=e;o[c+52|0]=e;o[c+54|0]=e;o[c+43|0]=r[b+(r[a+23|0]<<1)|0];o[c+55|0]=r[b+(r[a+24|0]<<1)|0];break d}i=b<<9;f=i+302480|0;g=r[f+(r[a+21|0]<<1)|0];f=r[f+(r[a+22|0]<<1)|0];if(e){f=(w(f&255,127)+127>>>0)/255|0;g=(w(g&255,127)+127>>>0)/255|0}e=(e?0:3)+c|0;o[e+52|0]=f;o[e+40|0]=g;g=i+302480|0;e=r[g+(r[a+24|0]<<1)|0];g=r[g+(r[a+23|0]<<1)|0];f=q[a+16>>2]==1;i=f?3:1;if(!f){g=(w(g&255,127)+127>>>0)/255|0;e=(w(e&255,127)+127>>>0)/255|0}f=c+i|0;o[f+52|0]=e;o[f+40|0]=g;g=(b<<9)+302480|0;e=r[g+(r[a+26|0]<<1)|0];g=r[g+(r[a+25|0]<<1)|0];f=q[a+16>>2]==2;i=f?3:2;if(!f){g=(w(g&255,127)+127>>>0)/255|0;e=(w(e&255,127)+127>>>0)/255|0}f=c+i|0;o[f+52|0]=e;o[f+40|0]=g;f=q[a+16>>2];e=255;g=255;if(h-8>>>0<=6){b=(b<<9)+302480|0;g=r[b+(r[a+28|0]<<1)|0];e=r[b+(r[a+27|0]<<1)|0]}if(f>>>0<=2){break g}break e;case 7:q[c>>2]=2;h=w(q[a+108>>2],6)+97712|0;q[c+4>>2]=r[h|0];e=1;b=(b<<9)+302480|0;g=a+21|0;h=r[h+4|0];i=w(dC(0,h),6);f=g+i|0;o[c+40|0]=(w(r[b+(r[f|0]<<1)|0],31)+127>>>0)/255;i=g+(i|1)|0;o[c+52|0]=(w(r[b+(r[i|0]<<1)|0],31)+127>>>0)/255;o[c+41|0]=(w(r[b+(r[f+2|0]<<1)|0],31)+127>>>0)/255;o[c+53|0]=(w(r[b+(r[i+2|0]<<1)|0],31)+127>>>0)/255;o[c+42|0]=(w(r[b+(r[f+4|0]<<1)|0],31)+127>>>0)/255;o[c+54|0]=(w(r[b+(r[i+4|0]<<1)|0],31)+127>>>0)/255;i=w(dC(1,h),6);f=i+g|0;o[c+44|0]=(w(r[b+(r[f|0]<<1)|0],31)+127>>>0)/255;i=g+(i|1)|0;o[c+56|0]=(w(r[b+(r[i|0]<<1)|0],31)+127>>>0)/255;o[c+45|0]=(w(r[b+(r[f+2|0]<<1)|0],31)+127>>>0)/255;o[c+57|0]=(w(r[b+(r[i+2|0]<<1)|0],31)+127>>>0)/255;o[c+46|0]=(w(r[b+(r[f+4|0]<<1)|0],31)+127>>>0)/255;o[c+58|0]=(w(r[b+(r[i+4|0]<<1)|0],31)+127>>>0)/255;f=w(dC(2,h),6);h=f+g|0;o[c+48|0]=(w(r[b+(r[h|0]<<1)|0],31)+127>>>0)/255;g=g+(f|1)|0;o[c+60|0]=(w(r[b+(r[g|0]<<1)|0],31)+127>>>0)/255;o[c+49|0]=(w(r[b+(r[h+2|0]<<1)|0],31)+127>>>0)/255;o[c+61|0]=(w(r[b+(r[g+2|0]<<1)|0],31)+127>>>0)/255;o[c+50|0]=(w(r[b+(r[h+4|0]<<1)|0],31)+127>>>0)/255;o[c+62|0]=(w(r[b+(r[g+4|0]<<1)|0],31)+127>>>0)/255;o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break a;case 8:e=(r[a+115|0]<<3)+313232|0;g=(r[a+114|0]<<3)+313232|0;h=(r[a+113|0]<<3)+313232|0;f=(r[a+112|0]<<3)+313232|0;b=s[e+4>>1]+(s[g+4>>1]+(s[h+4>>1]+s[f+4>>1]|0)|0)|0;e=s[e>>1]+(s[g>>1]+(s[h>>1]+s[f>>1]|0)|0)|0;if(!(!e|!b)){q[c>>2]=5;o[c+40|0]=r[((r[a+112|0]<<2)+315280|0)+2|0];o[c+52|0]=r[((r[a+112|0]<<2)+315280|0)+3|0];o[c+41|0]=r[((r[a+113|0]<<2)+315280|0)+2|0];o[c+53|0]=r[((r[a+113|0]<<2)+315280|0)+3|0];o[c+42|0]=r[((r[a+114|0]<<2)+315280|0)+2|0];b=r[((r[a+114|0]<<2)+315280|0)+3|0];q[c+8>>2]=16843009;q[c+12>>2]=16843009;o[c+54|0]=b;q[c+16>>2]=16843009;q[c+20>>2]=16843009;o[c+43|0]=r[a+115|0];o[c+55|0]=r[a+115|0];break b}q[c>>2]=6;e=b>>>0>>0;b=e<<2;o[c+40|0]=r[(b+((r[a+112|0]<<3)+313232|0)|0)+2|0];o[c+52|0]=r[(b+((r[a+112|0]<<3)+313232|0)|0)+3|0];o[c+41|0]=r[(b+((r[a+113|0]<<3)+313232|0)|0)+2|0];o[c+53|0]=r[(b+((r[a+113|0]<<3)+313232|0)|0)+3|0];o[c+42|0]=r[(b+((r[a+114|0]<<3)+313232|0)|0)+2|0];o[c+54|0]=r[(b+((r[a+114|0]<<3)+313232|0)|0)+3|0];o[c+43|0]=r[(b+((r[a+115|0]<<3)+313232|0)|0)+2|0];a=r[(b+((r[a+115|0]<<3)+313232|0)|0)+3|0];q[c+68>>2]=e;q[c+64>>2]=e;o[c+55|0]=a;q[c+8>>2]=84215045;q[c+12>>2]=84215045;q[c+16>>2]=84215045;q[c+20>>2]=84215045;break b;case 9:case 16:break h;default:break a}}q[c>>2]=7;e=q[a+108>>2];q[c+4>>2]=r[w(e,6)+97520|0];l=(43795755>>>e^-1)&1;n=h-15>>>0>2;k=b<<9;h=a+21|0;b=1;while(1){m=d;t=k+302480|0;n:{if(!n){i=k+302480|0;f=g<<2;j=x(x(r[i+(r[f+h|0]<<1)|0])/x(255));u[d+32>>2]=j;e=r[i+(r[h+(f|1)|0]<<1)|0];u[d+36>>2]=j;u[d+40>>2]=j;j=x(x(e>>>0)/x(255));u[d+16>>2]=j;u[d+20>>2]=j;u[d+24>>2]=j;u[d+44>>2]=x(r[i+(r[h+(f|2)|0]<<1)|0])/x(255);e=f|3;break n}i=k+302480|0;f=g<<3;u[d+32>>2]=x(r[i+(r[f+h|0]<<1)|0])/x(255);u[d+36>>2]=x(r[i+(r[h+(f|2)|0]<<1)|0])/x(255);u[d+40>>2]=x(r[i+(r[h+(f|4)|0]<<1)|0])/x(255);u[d+44>>2]=x(r[i+(r[h+(f|6)|0]<<1)|0])/x(255);u[d+16>>2]=x(r[i+(r[h+(f|1)|0]<<1)|0])/x(255);u[d+20>>2]=x(r[i+(r[h+(f|3)|0]<<1)|0])/x(255);u[d+24>>2]=x(r[i+(r[h+(f|5)|0]<<1)|0])/x(255);e=f|7}u[m+28>>2]=x(r[t+(r[(e+a|0)+21|0]<<1)|0])/x(255);q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=0;q[d>>2]=0;Bq(4,5,d+32|0,d+16|0,d+4|0,d,d+8|0);e=g^l;g=(e<<2)+c|0;q[g+40>>2]=q[d+4>>2];q[g+52>>2]=q[d>>2];e=(e<<3)+c|0;q[e- -64>>2]=q[d+8>>2];q[e+68>>2]=q[d+12>>2];e=b;b=0;g=1;if(e){continue}break}o[c+8|0]=r[a+39|0];o[c+9|0]=r[a+40|0];o[c+10|0]=r[a+41|0];o[c+11|0]=r[a+42|0];o[c+12|0]=r[a+43|0];o[c+13|0]=r[a+44|0];o[c+14|0]=r[a+45|0];o[c+15|0]=r[a+46|0];o[c+16|0]=r[a+47|0];o[c+17|0]=r[a+48|0];o[c+18|0]=r[a+49|0];o[c+19|0]=r[a+50|0];o[c+20|0]=r[a+51|0];o[c+21|0]=r[a+52|0];o[c+22|0]=r[a+53|0];o[c+23|0]=r[a+54|0];break b}g=(w(g,127)+127>>>0)/255|0;e=(w(e,127)+127>>>0)/255|0;break e}J(103388,96899,13218,103423);G()}b=c+f|0;o[b+52|0]=g;o[b+40|0]=e;if((h|0)==13){break c}}o[c+8|0]=r[a+39|0];o[c+24|0]=r[a+40|0];o[c+9|0]=r[a+41|0];o[c+25|0]=r[a+42|0];o[c+10|0]=r[a+43|0];o[c+26|0]=r[a+44|0];o[c+11|0]=r[a+45|0];o[c+27|0]=r[a+46|0];o[c+12|0]=r[a+47|0];o[c+28|0]=r[a+48|0];o[c+13|0]=r[a+49|0];o[c+29|0]=r[a+50|0];o[c+14|0]=r[a+51|0];o[c+30|0]=r[a+52|0];o[c+15|0]=r[a+53|0];o[c+31|0]=r[a+54|0];o[c+16|0]=r[a+55|0];o[c+32|0]=r[a+56|0];o[c+17|0]=r[a+57|0];o[c+33|0]=r[a+58|0];o[c+18|0]=r[a+59|0];o[c+34|0]=r[a+60|0];o[c+19|0]=r[a+61|0];o[c+35|0]=r[a+62|0];o[c+20|0]=r[a+63|0];o[c+36|0]=r[a- -64|0];o[c+21|0]=r[a+65|0];o[c+37|0]=r[a+66|0];o[c+22|0]=r[a+67|0];o[c+38|0]=r[a+68|0];o[c+23|0]=r[a+69|0];o[c+39|0]=r[a+70|0];break b}o[c+8|0]=r[a+39|0]?3:0;o[c+24|0]=r[a+40|0]?3:0;o[c+9|0]=r[a+41|0]?3:0;o[c+25|0]=r[a+42|0]?3:0;o[c+10|0]=r[a+43|0]?3:0;o[c+26|0]=r[a+44|0]?3:0;o[c+11|0]=r[a+45|0]?3:0;o[c+27|0]=r[a+46|0]?3:0;o[c+12|0]=r[a+47|0]?3:0;o[c+28|0]=r[a+48|0]?3:0;o[c+13|0]=r[a+49|0]?3:0;o[c+29|0]=r[a+50|0]?3:0;o[c+14|0]=r[a+51|0]?3:0;o[c+30|0]=r[a+52|0]?3:0;o[c+15|0]=r[a+53|0]?3:0;o[c+31|0]=r[a+54|0]?3:0;o[c+16|0]=r[a+55|0]?3:0;o[c+32|0]=r[a+56|0]?3:0;o[c+17|0]=r[a+57|0]?3:0;o[c+33|0]=r[a+58|0]?3:0;o[c+18|0]=r[a+59|0]?3:0;o[c+34|0]=r[a+60|0]?3:0;o[c+19|0]=r[a+61|0]?3:0;o[c+35|0]=r[a+62|0]?3:0;o[c+20|0]=r[a+63|0]?3:0;o[c+36|0]=r[a- -64|0]?3:0;o[c+21|0]=r[a+65|0]?3:0;o[c+37|0]=r[a+66|0]?3:0;o[c+22|0]=r[a+67|0]?3:0;o[c+38|0]=r[a+68|0]?3:0;o[c+23|0]=r[a+69|0]?3:0;o[c+39|0]=r[a+70|0]?3:0}e=1}Ii=d+48|0;return e}function NG(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,y=x(0),z=x(0),A=x(0),B=0,C=x(0),D=0,E=0,F=0,H=0,I=0,K=0,L=0;h=Ii-2048|0;Ii=h;k=e+2|0;m=e+f|0;I=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{c:{if((f|0)<=1){Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+44>>2]=f+2;q[h+40>>2]=b;q[h+36>>2]=m;q[h+32>>2]=k;q[h+48>>2]=h+1392;q[h+28>>2]=c;q[h+24>>2]=g;q[h+20>>2]=0;q[h+16>>2]=131503;sj(h+1536|0,512,131373,h+16|0);q[h>>2]=h+1536;a=Qi(a,131516,h);break c}i=h;if(t[c+4>>2]<=3){n=r[e|0]|r[e+1|0]<<8}else{k=e+4|0;n=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24)}q[i+1312>>2]=n;Y3(b,h+1312|0);if(k>>>0>m>>>0){Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+84>>2]=k;q[h+88>>2]=m;q[h+96>>2]=m-k;q[h+100>>2]=h+1392;q[h+92>>2]=b;q[h+80>>2]=c;sj(h+1536|0,512,131524,h+80|0);q[h+64>>2]=h+1536;a=Qi(a,131516,h- -64|0);break c}vj(a,0,0);if(n){K=g+1|0;while(1){l=k+2|0;if(m>>>0>>0){j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){i=q[b+144>>2];while(1){i=(((i|0)<1?127:-1)+i|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[i+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];q[h+152>>2]=q[b+136>>2];q[h+148>>2]=m;q[h+144>>2]=l;q[h+156>>2]=(m-k|0)+2;q[h+160>>2]=h+1392;q[h+140>>2]=c;q[h+136>>2]=g;q[h+132>>2]=n;q[h+128>>2]=131639;sj(h+1536|0,512,131373,h+128|0);q[h+112>>2]=h+1536;a=Qi(a,131516,h+112|0);break c}L=o[k+1|0];d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{s=o[k|0];i=s&255;switch(i-3|0){case 1:break k;case 0:break l;default:break m}}if((i|0)!=64){break d}}j=q[b+144>>2];q[b+144>>2]=j+1;o[b+j|0]=75;j=q[b+144>>2];if(j>>>0>t[b+140>>2]){q[b+140>>2]=j}j=j&127;q[b+144>>2]=j+1;o[b+j|0]=78;j=q[b+144>>2];if(j>>>0>t[b+140>>2]){q[b+140>>2]=j}q[b+144>>2]=j&127;switch(q[c+4>>2]){case 3:case 4:break h;case 1:case 2:break i;case 0:break j;default:break g}}i=q[b+144>>2];q[b+144>>2]=i+1;o[b+i|0]=75;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=83;i=q[b+140>>2];j=q[b+144>>2];if(i>>>0>>0){q[b+140>>2]=j;i=j}j=j&127;q[b+144>>2]=j;n:{if(t[c+4>>2]<2){B=hj(l)+1|0;p=m-l|0;if((B|0)>(p|0)){k=0;Ui(h+1392|0,0,129);if(i){while(1){j=(((j|0)<1?127:-1)+j|0)%128|0;o[h+1392+((k^-1)+i)|0]=r[j+b|0];k=k+1|0;if((k|0)!=(i|0)){continue}break}}i=q[b+132>>2];k=q[b+136>>2];q[h+1124>>2]=B;q[h+1128>>2]=p;q[h+1132>>2]=i;q[h+1136>>2]=k;q[h+1140>>2]=h+1392;q[h+1120>>2]=n;Qi(a,132448,h+1120|0)}Xi(a,l);break n}F=r[l|0]|r[l+1|0]<<8|(r[l+2|0]<<16|r[l+3|0]<<24);B=F+4|0;H=m-l|0;if((B|0)>(H|0)){p=0;Ui(h+1392|0,0,129);if(i){while(1){j=(((j|0)<1?127:-1)+j|0)%128|0;o[h+1392+((p^-1)+i)|0]=r[j+b|0];p=p+1|0;if((p|0)!=(i|0)){continue}break}}j=q[b+136>>2];i=h+1184|0;q[i>>2]=q[b+132>>2];q[i+4>>2]=j;q[h+1172>>2]=F;q[h+1176>>2]=B;q[h+1180>>2]=H;q[h+1192>>2]=h+1392;q[h+1168>>2]=n;sj(h+1536|0,512,132567,h+1168|0);q[h+1152>>2]=h+1536;Qi(a,131516,h+1152|0)}bj(a,k+6|0,F)}l=l+B|0;if(m>>>0>=l>>>0){break d}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){i=q[b+144>>2];while(1){i=(((i|0)<1?127:-1)+i|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[i+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+1100>>2]=m-l;q[h+1096>>2]=b;q[h+1092>>2]=m;q[h+1088>>2]=l;q[h+1104>>2]=h+1392;q[h+1084>>2]=c;q[h+1080>>2]=g;q[h+1076>>2]=n;q[h+1072>>2]=131654;sj(h+1536|0,512,131373,h+1072|0);q[h+1056>>2]=h+1536;a=Qi(a,131516,h+1056|0);break c}if((s|0)!=3){q[h+1264>>2]=s;Qi(a,132702,h+1264|0)}D=+((r[k+2|0]|r[k+3|0]<<8)>>>0);i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=D;q[a+8>>2]=q[a+8>>2]+16;l=k+4|0;break e}if((s|0)!=3){q[h+1280>>2]=s;Qi(a,132702,h+1280|0)}i=1;j=0;k=0;while(1){o:{p=r[l|0];k=(p&127)<>>0<5)&i;l=l+1|0;if(j>>>0>4){break o}j=j+1|0;if(p){continue}}break}if(!i){break f}i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=k>>>0;q[a+8>>2]=q[a+8>>2]+16;break e}if(!((i|0)==3|(i|0)==64)){q[h+1296>>2]=s;Qi(a,132702,h+1296|0)}D=+((r[k+2|0]|r[k+3|0]<<8|(r[k+4|0]<<16|r[k+5|0]<<24))>>>0);i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=(s|0)==64?-D:D;q[a+8>>2]=q[a+8>>2]+16;l=k+6|0;break e}J(132428,131008,794,132746);G()}Qi(a,132722,0)}if(l>>>0<=m>>>0){break d}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){i=q[b+144>>2];while(1){i=(((i|0)<1?127:-1)+i|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[i+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+1244>>2]=m-l;q[h+1240>>2]=b;q[h+1236>>2]=m;q[h+1232>>2]=l;q[h+1248>>2]=h+1392;q[h+1228>>2]=c;q[h+1224>>2]=g;q[h+1220>>2]=n;q[h+1216>>2]=131665;sj(h+1536|0,512,131373,h+1216|0);q[h+1200>>2]=h+1536;a=Qi(a,131516,h+1200|0);break c}p:{q:{switch(L-1|0){case 0:i=q[b+144>>2];q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=66;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=o[l|0];k=q[a+8>>2];q[k+8>>2]=1;q[k>>2]=(i|0)!=0;q[a+8>>2]=q[a+8>>2]+16;k=l+1|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+236>>2]=m-k;q[h+232>>2]=b;q[h+228>>2]=m;q[h+224>>2]=k;q[h+240>>2]=h+1392;q[h+220>>2]=c;q[h+216>>2]=g;q[h+212>>2]=n;q[h+208>>2]=131676;sj(h+1536|0,512,131373,h+208|0);q[h+192>>2]=h+1536;a=Qi(a,131516,h+192|0);break c;case 2:i=q[b+144>>2];q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=78;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=l-d|0;i=((i+3&-4)-i|0)+l|0;k=r[i+4|0]|r[i+5|0]<<8|(r[i+6|0]<<16|r[i+7|0]<<24);Mza(0,r[i|0]|r[i+1|0]<<8|(r[i+2|0]<<16|r[i+3|0]<<24));Mza(1,k|0);D=+Nza();k=q[a+8>>2];q[k+8>>2]=3;v[k>>3]=D;q[a+8>>2]=q[a+8>>2]+16;k=i+8|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+364>>2]=m-k;q[h+360>>2]=b;q[h+356>>2]=m;q[h+352>>2]=k;q[h+368>>2]=h+1392;q[h+348>>2]=c;q[h+344>>2]=g;q[h+340>>2]=n;q[h+336>>2]=131687;sj(h+1536|0,512,131373,h+336|0);q[h+320>>2]=h+1536;a=Qi(a,131516,h+320|0);break c;case 3:i=q[b+144>>2];q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=83;i=q[b+140>>2];k=q[b+144>>2];if(i>>>0>>0){q[b+140>>2]=k;i=k}j=k&127;q[b+144>>2]=j;r:{if(t[c+4>>2]<2){p=hj(l)+1|0;s=m-l|0;if((p|0)>(s|0)){k=0;Ui(h+1392|0,0,129);if(i){while(1){j=(((j|0)<1?127:-1)+j|0)%128|0;o[h+1392+((k^-1)+i)|0]=r[j+b|0];k=k+1|0;if((k|0)!=(i|0)){continue}break}}i=q[b+132>>2];k=q[b+136>>2];q[h+452>>2]=p;q[h+456>>2]=s;q[h+460>>2]=i;q[h+464>>2]=k;q[h+468>>2]=h+1392;q[h+448>>2]=n;Qi(a,132448,h+448|0)}Xi(a,l);break r}s=r[l|0]|r[l+1|0]<<8|(r[l+2|0]<<16|r[l+3|0]<<24);p=s+4|0;B=m-l|0;if((p|0)>(B|0)){k=0;Ui(h+1392|0,0,129);if(i){while(1){j=(((j|0)<1?127:-1)+j|0)%128|0;o[h+1392+((k^-1)+i)|0]=r[j+b|0];k=k+1|0;if((k|0)!=(i|0)){continue}break}}i=q[b+136>>2];q[h+512>>2]=q[b+132>>2];q[h+516>>2]=i;q[h+500>>2]=s;q[h+504>>2]=p;q[h+508>>2]=B;q[h+520>>2]=h+1392;q[h+496>>2]=n;sj(h+1536|0,512,132567,h+496|0);q[h+480>>2]=h+1536;Qi(a,131516,h+480|0)}bj(a,l+4|0,s)}k=l+p|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+428>>2]=m-k;q[h+424>>2]=b;q[h+420>>2]=m;q[h+416>>2]=k;q[h+432>>2]=h+1392;q[h+412>>2]=c;q[h+408>>2]=g;q[h+404>>2]=n;q[h+400>>2]=131700;sj(h+1536|0,512,131373,h+400|0);q[h+384>>2]=h+1536;a=Qi(a,131516,h+384|0);break c;case 6:i=q[b+144>>2];q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=85;k=q[b+140>>2];i=q[b+144>>2];if(k>>>0>>0){q[b+140>>2]=i;k=i}i=i&127;q[b+144>>2]=i;p=l+1|0;j=p-d|0;j=((j+3&-4)-j|0)+p|0;if(j&3){break b}if(j>>>0>m>>>0){l=0;Ui(h+1392|0,0,129);if(k){while(1){i=(((i|0)<1?127:-1)+i|0)%128|0;o[h+1392+((l^-1)+k)|0]=r[i+b|0];l=l+1|0;if((k|0)!=(l|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+572>>2]=m-j;q[h+568>>2]=b;q[h+564>>2]=m;q[h+560>>2]=j;q[h+576>>2]=h+1392;q[h+556>>2]=c;q[h+552>>2]=g;q[h+548>>2]=n;q[h+544>>2]=131756;sj(h+1536|0,512,131373,h+544|0);q[h+528>>2]=h+1536;a=Qi(a,131516,h+528|0);break c}s:{switch(r[l|0]){case 0:q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=51;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=q[j>>2];k=q[j+4>>2];u[h+1544>>2]=u[j+8>>2];q[h+1536>>2]=i;q[h+1540>>2]=k;Al(a,h+1536|0);k=j+12|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+652>>2]=m-k;q[h+648>>2]=b;q[h+644>>2]=m;q[h+640>>2]=k;q[h+656>>2]=h+1392;q[h+636>>2]=c;q[h+632>>2]=g;q[h+628>>2]=n;q[h+624>>2]=131777;sj(h+1536|0,512,131373,h+624|0);q[h+608>>2]=h+1536;a=Qi(a,131516,h+608|0);break c;case 1:q[b+144>>2]=i+1;o[b+i|0]=86;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=52;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=q[j>>2];k=q[j+4>>2];l=q[j+12>>2];q[h+1544>>2]=q[j+8>>2];q[h+1548>>2]=l;q[h+1536>>2]=i;q[h+1540>>2]=k;lo(a,h+1536|0);k=j+16|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+716>>2]=m-k;q[h+712>>2]=b;q[h+708>>2]=m;q[h+704>>2]=k;q[h+720>>2]=h+1392;q[h+700>>2]=c;q[h+696>>2]=g;q[h+692>>2]=n;q[h+688>>2]=131788;sj(h+1536|0,512,131373,h+688|0);q[h+672>>2]=h+1536;a=Qi(a,131516,h+672|0);break c;case 2:q[b+144>>2]=i+1;o[b+i|0]=81;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=52;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=q[j>>2];k=q[j+4>>2];l=q[j+12>>2];q[h+1544>>2]=q[j+8>>2];q[h+1548>>2]=l;q[h+1536>>2]=i;q[h+1540>>2]=k;hr(a,h+1536|0);k=j+16|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+780>>2]=m-k;q[h+776>>2]=b;q[h+772>>2]=m;q[h+768>>2]=k;q[h+784>>2]=h+1392;q[h+764>>2]=c;q[h+760>>2]=g;q[h+756>>2]=n;q[h+752>>2]=131799;sj(h+1536|0,512,131373,h+752|0);q[h+736>>2]=h+1536;a=Qi(a,131516,h+736|0);break c;case 3:q[b+144>>2]=i+1;o[b+i|0]=77;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=52;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;y=u[j>>2];u[h+1328>>2]=y;z=u[j+4>>2];u[h+1328>>2]=y;u[h+1332>>2]=z;A=u[j+8>>2];u[h+1328>>2]=y;u[h+1332>>2]=z;u[h+1336>>2]=A;C=u[j+12>>2];u[h+1332>>2]=z;u[h+1328>>2]=y;u[h+1336>>2]=A;u[h+1340>>2]=C;y=u[j+16>>2];u[h+1344>>2]=y;z=u[j+20>>2];u[h+1344>>2]=y;u[h+1348>>2]=z;A=u[j+24>>2];u[h+1344>>2]=y;u[h+1348>>2]=z;u[h+1352>>2]=A;C=u[j+28>>2];u[h+1348>>2]=z;u[h+1344>>2]=y;u[h+1352>>2]=A;u[h+1356>>2]=C;y=u[j+32>>2];u[h+1360>>2]=y;z=u[j+36>>2];u[h+1360>>2]=y;u[h+1364>>2]=z;A=u[j+40>>2];u[h+1360>>2]=y;u[h+1364>>2]=z;u[h+1368>>2]=A;C=u[j+44>>2];u[h+1364>>2]=z;u[h+1360>>2]=y;u[h+1368>>2]=A;u[h+1372>>2]=C;y=u[j+48>>2];u[h+1376>>2]=y;z=u[j+52>>2];u[h+1376>>2]=y;u[h+1380>>2]=z;A=u[j+56>>2];u[h+1376>>2]=y;u[h+1380>>2]=z;u[h+1384>>2]=A;C=u[j+60>>2];u[h+1380>>2]=z;u[h+1376>>2]=y;u[h+1384>>2]=A;u[h+1388>>2]=C;ir(a,h+1328|0);k=j- -64|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+844>>2]=m-k;q[h+840>>2]=b;q[h+836>>2]=m;q[h+832>>2]=k;q[h+848>>2]=h+1392;q[h+828>>2]=c;q[h+824>>2]=g;q[h+820>>2]=n;q[h+816>>2]=131810;sj(h+1536|0,512,131373,h+816|0);q[h+800>>2]=h+1536;a=Qi(a,131516,h+800|0);break c;case 4:q[b+144>>2]=i+1;o[b+i|0]=72;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;lk(a,r[j|0]|r[j+1|0]<<8|(r[j+2|0]<<16|r[j+3|0]<<24),r[j+4|0]|r[j+5|0]<<8|(r[j+6|0]<<16|r[j+7|0]<<24));k=j+8|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+908>>2]=m-k;q[h+904>>2]=b;q[h+900>>2]=m;q[h+896>>2]=k;q[h+912>>2]=h+1392;q[h+892>>2]=c;q[h+888>>2]=g;q[h+884>>2]=n;q[h+880>>2]=131821;sj(h+1536|0,512,131373,h+880|0);q[h+864>>2]=h+1536;a=Qi(a,131516,h+864|0);break c;case 5:q[b+144>>2]=i+1;o[b+i|0]=85;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=82;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}i=i&127;q[b+144>>2]=i+1;o[b+i|0]=76;i=q[b+144>>2];if(i>>>0>t[b+140>>2]){q[b+140>>2]=i}q[b+144>>2]=i&127;i=h+1352|0;q[i>>2]=0;q[i+4>>2]=0;l=h+1344|0;k=l;q[k>>2]=0;q[k+4>>2]=0;k=h+1336|0;q[k>>2]=0;q[k+4>>2]=0;q[h+1328>>2]=0;q[h+1332>>2]=0;s=r[j+12|0]|r[j+13|0]<<8|(r[j+14|0]<<16|r[j+15|0]<<24);q[k>>2]=r[j+8|0]|r[j+9|0]<<8|(r[j+10|0]<<16|r[j+11|0]<<24);q[k+4>>2]=s;k=r[j+20|0]|r[j+21|0]<<8|(r[j+22|0]<<16|r[j+23|0]<<24);q[l>>2]=r[j+16|0]|r[j+17|0]<<8|(r[j+18|0]<<16|r[j+19|0]<<24);q[l+4>>2]=k;k=r[j+28|0]|r[j+29|0]<<8|(r[j+30|0]<<16|r[j+31|0]<<24);q[i>>2]=r[j+24|0]|r[j+25|0]<<8|(r[j+26|0]<<16|r[j+27|0]<<24);q[i+4>>2]=k;i=r[j+4|0]|r[j+5|0]<<8|(r[j+6|0]<<16|r[j+7|0]<<24);q[h+1328>>2]=r[j|0]|r[j+1|0]<<8|(r[j+2|0]<<16|r[j+3|0]<<24);q[h+1332>>2]=i;km(a,h+1328|0);k=j+32|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+972>>2]=m-k;q[h+968>>2]=b;q[h+964>>2]=m;q[h+960>>2]=k;q[h+976>>2]=h+1392;q[h+956>>2]=c;q[h+952>>2]=g;q[h+948>>2]=n;q[h+944>>2]=131832;sj(h+1536|0,512,131373,h+944|0);q[h+928>>2]=h+1536;a=Qi(a,131516,h+928|0);break c;default:break s}}b=(s|0)==-1?140583:q[(s<<2)+256832>>2];q[h+600>>2]=j;q[h+596>>2]=E;q[h+592>>2]=b;a=Qi(a,131842,h+592|0);break c;case 4:k=NG(a,b,c,d,l,f,K)+l|0;if(m>>>0>=k>>>0){break p}j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+1036>>2]=m-k;q[h+1032>>2]=b;q[h+1028>>2]=m;q[h+1024>>2]=k;q[h+1040>>2]=h+1392;q[h+1020>>2]=c;q[h+1016>>2]=g;q[h+1012>>2]=n;q[h+1008>>2]=131906;sj(h+1536|0,512,131373,h+1008|0);q[h+992>>2]=h+1536;a=Qi(a,131516,h+992|0);break c;default:break q}}b=(s|0)==-1?140583:q[(s<<2)+256832>>2];q[h+184>>2]=l;q[h+180>>2]=E;q[h+176>>2]=b;a=Qi(a,131912,h+176|0);break c}pj(a,-3);if(k>>>0>m>>>0){j=0;Ui(h+1392|0,0,129);c=q[b+140>>2];if(c){l=q[b+144>>2];while(1){l=(((l|0)<1?127:-1)+l|0)%128|0;o[h+1392+(c+(j^-1))|0]=r[l+b|0];j=j+1|0;if((c|0)!=(j|0)){continue}break}}c=q[b+132>>2];b=q[b+136>>2];q[h+300>>2]=m-k;q[h+296>>2]=b;q[h+292>>2]=m;q[h+288>>2]=k;q[h+304>>2]=h+1392;q[h+284>>2]=c;q[h+280>>2]=g;q[h+276>>2]=n;q[h+272>>2]=131964;sj(h+1536|0,512,131373,h+272|0);q[h+256>>2]=h+1536;a=Qi(a,131516,h+256|0);break c}E=E+1|0;if((E|0)!=(n|0)){continue}break}}if((I+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}a=q[b+144>>2];q[b+144>>2]=a+1;o[a+b|0]=125;a=q[b+144>>2];if(a>>>0>t[b+140>>2]){q[b+140>>2]=a}q[b+144>>2]=a&127;a=k-e|0}Ii=h+2048|0;return a}J(131713,131008,978,131744);G()}J(131973,131008,1067,131744);G()}function pU(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;u=Ii-144|0;Ii=u;a:{b:{c:{if(d>>>0<=e>>>0){j=q[f>>2];S=g&4;P=S?-1:j+((d^-1)+e|0)|0;E=P+1|0;if(!(E&P)){break c}}q[f>>2]=0;q[c>>2]=0;F=-3;break b}L=e+j|0;M=q[a+60>>2];A=q[a+40>>2];m=q[a+36>>2];D=q[a+32>>2];k=q[a+56>>2];j=q[a+4>>2];F=-1;y=e;d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{l=b;x=q[c>>2];C=l+x|0;s:{t:{u:{v:{v=C;w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{na:{oa:{pa:{n=q[a>>2];switch(n|0){case 39:break i;case 40:break j;case 10:break k;case 17:break l;case 21:break m;case 37:break n;case 34:break o;case 35:break r;case 53:break P;case 52:break Q;case 38:break R;case 24:break S;case 9:break T;case 42:break Y;case 41:break Z;case 32:break _;case 27:break $;case 26:break aa;case 25:break ba;case 23:break ca;case 18:break da;case 36:break e;case 16:break ea;case 14:break fa;case 11:break ga;case 51:break ha;case 7:break ia;case 6:break ja;case 5:break ka;case 3:break la;case 2:break ma;case 1:break oa;case 0:break pa;default:break d}}q[a+28>>2]=1;k=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+16>>2]=1;if(!(g&1)){A=0;D=0;j=0;m=0;break t}A=0;m=0;D=0;j=0;if((x|0)>0){break na}break y}if((x|0)<1){break y}q[a+8>>2]=r[b|0];l=b+1|0;break x}q[a+8>>2]=r[b|0];l=b+1|0;break x}if((x|0)<1){break w}break v}if((x|0)<1){break X}h=2;break s}i=1;if((x|0)<1){break A}l=b+1|0;h=r[b|0];break z}B=j;if((x|0)<1){break W}h=5;break s}if((x|0)<1){break V}o[(a+m|0)+10528|0]=r[b|0];l=b+1|0;B=j;break U}B=j;if((x|0)<1){break O}h=10;break s}K=m;if((x|0)<1){break N}h=14;break s}if((x|0)<1){break M}h=16;break s}if((x|0)<1){break L}h=18;break s}if((x|0)<1){break K}h=20;break s}if((x|0)<1){break J}h=22;break s}if((x|0)<1){break I}h=25;break s}if((x|0)<1){break H}h=27;break s}if((x|0)<1){break G}h=29;break s}i=1;if((x|0)<1){break C}l=b+1|0;G=r[b|0];break B}h=j;if((x|0)<1){break F}i=2;break p}if((x|0)<1){break E}l=b+1|0;G=r[b|0];h=j;break D}h=1;break s}h=4;break s}h=6;break s}h=7;break s}h=8;break s}h=23;break s}h=12;break s}h=11;break s}h=30;break s}h=9;break s}h=13;break s}h=15;break s}h=17;break s}h=19;break s}h=21;break s}h=24;break s}h=26;break s}h=28;break s}i=1;break p}i=3;break p}i=4;break p}if(!(g&2)){break B}n=32;F=1;break e}k=G<>2]=0;l=b}if(v>>>0>l>>>0){break v}}n=2;i=1;if(!(g&2)){break u}break g}h=r[l|0];l=l+1|0}q[a+12>>2]=h;i=0;m=q[a+8>>2];h=(((m<<8|h)>>>0)%31|h&32)!=0|(m&15)!=8;qa:{if(!S){m=256<<(m>>>4);if(!(h|(m>>>0>32768|m>>>0>E>>>0))){break qa}break f}if(h){break f}}m=0}h=0}ra:while(1){sa:{ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{Ha:{Ia:{Ja:{Ka:{La:{Ma:{Na:{Oa:{Pa:{Qa:{Ra:{Sa:{Ta:{Ua:{Va:{Wa:{Xa:{Ya:{Za:{_a:{$a:{ab:{bb:{cb:{db:{eb:{fb:{gb:{hb:{ib:{jb:{kb:{lb:{mb:{nb:{ob:{pb:{qb:{rb:{sb:{tb:{ub:{vb:{wb:{xb:{yb:{zb:{Ab:{Bb:{Cb:{Db:{Eb:{Fb:{Gb:{Hb:{Ib:{Jb:{Kb:{Lb:{Mb:{Nb:{Ob:{Pb:{Qb:{switch(h|0){case 0:if(j>>>0>2){break Nb}break Ob;case 1:h=0;if(!(g&2)){break Pb}i=1;n=3;break g;case 29:break Ta;case 28:break Ua;case 27:break Wa;case 26:break Xa;case 25:break Za;case 24:break _a;case 23:break $a;case 22:break bb;case 21:break cb;case 20:break eb;case 19:break fb;case 18:break hb;case 17:break ib;case 16:break kb;case 15:break lb;case 14:break nb;case 13:break ob;case 12:break rb;case 11:break wb;case 10:break yb;case 9:break zb;case 8:break Ab;case 7:break Hb;case 6:break Ib;case 5:break Kb;case 4:break Lb;case 3:break Mb;case 2:break Qb;default:break Ra}}h=r[l|0];l=l+1|0}k=(h&255)<>>0>=3){break Nb}}if(l>>>0>>0){break Qa}h=1;continue}h=k&7;q[a+20>>2]=h;N=1;h=h>>>1|0;q[a+24>>2]=h;j=j-3|0;k=k>>>3|0;K=0;switch(h|0){case 0:break Pa;case 3:break k;case 1:break pb;default:break La}}B=j&-8;k=k>>>(j&7)|0;m=0;break Gb}i=0;if(!(g&2)){break Jb}i=1;n=6;break h}i=r[l|0];l=l+1|0}h=B;B=h+8|0;k=(i&255)<>>0>4294967287){break Fb}break Eb}if(g&2){i=1;n=7;F=1;break e}o[(a+m|0)+10528|0]=0;B=j;break Cb}m=m+1|0}if(m>>>0>3){break Bb}if(!B){break Db}if(B>>>0>7){break Eb}}if(l>>>0>>0){break Oa}h=4;continue}o[(a+m|0)+10528|0]=k;k=k>>>8|0;B=B-8|0;break Cb}j=0;if(l>>>0>=C>>>0){h=6;continue}o[(a+m|0)+10528|0]=r[l|0];l=l+1|0;B=0}h=7;continue}j=B;m=s[a+10528>>1];if((m|0)==(s[a+10530>>1]^65535)){break vb}break i}if(y>>>0>>0){break Ma}F=2;i=1;n=9;break e}i=0;if(!(g&2)){break xb}i=1;n=51;break h}i=r[l|0];l=l+1|0}h=B;B=h+8|0;k=(i&255)<>>0>4294967287){break ub}break tb}if(y>>>0>=L>>>0){break sb}o[y|0]=D;m=m-1|0;y=y+1|0;B=j}if(!(B?m:0)){j=B;break qb}if(B>>>0>7){break tb}}if(l>>>0>>0){break Na}h=9;continue}j=B-8|0;D=k&255;k=k>>>8|0;h=11;continue}F=2;i=1;n=52;break e}if(l>>>0>=C>>>0){if(!(g&2)){break j}i=1;n=38;F=1;break e}h=L-y|0;i=C-l|0;h=h>>>0>>0?h:i;h=h>>>0>>0?h:m;m=m-h|0;y=Ti(y,l,h)+h|0;l=h+l|0}h=0;if(!m){break xa}h=8;continue}q[a+44>>2]=288;q[a+48>>2]=32;h=a+3552|0;q[h>>2]=84215045;q[h+4>>2]=84215045;h=a+3560|0;q[h>>2]=84215045;q[h+4>>2]=84215045;h=a+3568|0;q[h>>2]=84215045;q[h+4>>2]=84215045;h=a+3576|0;q[h>>2]=84215045;q[h+4>>2]=84215045;Ui(a- -64|0,8,144);Ui(a+208|0,9,112);o[a+336|0]=7;o[a+337|0]=7;o[a+338|0]=7;o[a+339|0]=7;o[a+340|0]=7;o[a+341|0]=7;o[a+342|0]=7;o[a+343|0]=7;o[a+328|0]=7;o[a+329|0]=7;o[a+330|0]=7;o[a+331|0]=7;o[a+332|0]=7;o[a+333|0]=7;o[a+334|0]=7;o[a+335|0]=7;o[a+320|0]=7;o[a+321|0]=7;o[a+322|0]=7;o[a+323|0]=7;o[a+324|0]=7;o[a+325|0]=7;o[a+326|0]=7;o[a+327|0]=7;o[a+344|0]=8;o[a+345|0]=8;o[a+346|0]=8;o[a+347|0]=8;o[a+348|0]=8;o[a+349|0]=8;o[a+350|0]=8;o[a+351|0]=8;break Ba}h=0;if(!(g&2)){break mb}i=1;n=11;m=K;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0>>0){break sa}h=1;break Da}h=0;if(!(g&2)){break jb}i=1;n=14;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0<3){break ta}h=1;break Ca}h=0;if(!(g&2)){break gb}i=1;n=16;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0<15){break Ka}break Ja}i=l;h=0;if(!(g&2)){break db}i=1;n=18;break g}i=l+1|0;h=r[l|0]}l=i;k=(h&255)<>>0>j>>>0){break ua}T=D-16|0;h=3;break Aa}h=0;if(!(g&2)){break ab}i=1;n=23;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0<15){break Ia}break Ha}if(y>>>0>=L>>>0){F=2;i=1;n=24;break e}o[y|0]=m;y=y+1|0;break za}h=0;if(!(g&2)){break Ya}i=1;n=25;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0>j>>>0){break va}h=3;break ya}h=0;if(!(g&2)){break Va}i=1;n=26;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0<15){break Ga}break Fa}h=0;if(!(g&2)){break Sa}i=1;n=27;break g}h=r[l|0];l=l+1|0}k=(h&255)<>>0>j>>>0){break wa}h=6;break ya}if(y>>>0>=L>>>0){F=2;i=1;n=53;break e}o[y|0]=r[(M-D&P)+d|0];y=y+1|0;M=M+1|0;break Ea}h=2;continue}h=3;continue}h=5;continue}h=10;continue}h=12;continue}h=0;break Da}h=1;break Aa}h=2;break Aa}h=0;break ya}h=1;break ya}h=4;break ya}h=5;break ya}h=7;break ya}while(1){Rb:{Sb:{Tb:{if(!h){if(K>>>0>2){break Tb}O=o[K+184604|0];if(O>>>0<=j>>>0){break Rb}break sa}h=K<<2;q[(h+a|0)+44>>2]=q[h+184592>>2]+((-1<>>O|0;break Sb}m=0;Ui(a+7040|0,0,288);h=0;break Ca}h=0;continue}h=1;continue}}while(1){Ub:{Vb:{Wb:{if(!h){if(t[a+52>>2]<=m>>>0){break Wb}if(j>>>0>2){break Ub}break ta}o[(r[m+184640|0]+a|0)+7040|0]=k&7;m=m+1|0;j=j-3|0;k=k>>>3|0;break Vb}q[a+52>>2]=19;N=q[a+24>>2];break Ba}h=0;continue}h=1;continue}}h=0}while(1){Xb:{Yb:{Zb:{_b:{$b:{ac:{bc:{cc:{dc:{ec:{fc:{switch(h|0){case 0:h=0;if((N|0)<0){break za}q[u+56>>2]=0;q[u+60>>2]=0;q[u+48>>2]=0;q[u+52>>2]=0;q[u+40>>2]=0;q[u+44>>2]=0;q[u+32>>2]=0;q[u+36>>2]=0;q[u+24>>2]=0;q[u+28>>2]=0;q[u+16>>2]=0;q[u+20>>2]=0;q[u+8>>2]=0;q[u+12>>2]=0;q[u>>2]=0;q[u+4>>2]=0;i=w(N,3488)+a|0;Ui(i+352|0,0,3200);_=q[a+24>>2];Q=q[((_<<2)+a|0)+44>>2];gc:{if(!Q){n=0;H=0;E=0;x=0;I=0;J=0;U=0;V=0;W=0;X=0;Y=0;Z=0;i=0;break gc}while(1){n=(r[(h+i|0)- -64|0]<<2)+u|0;q[n>>2]=q[n>>2]+1;h=h+1|0;if((Q|0)!=(h|0)){continue}break}h=q[u+56>>2];n=q[u+48>>2];H=q[u+44>>2];E=q[u+40>>2];x=q[u+36>>2];I=q[u+28>>2];J=q[u+24>>2];U=q[u+20>>2];V=q[u+16>>2];W=q[u+12>>2];X=q[u+8>>2];Y=q[u+4>>2];Z=q[u+52>>2];i=q[u+32>>2]}q[u+64>>2]=0;q[u+68>>2]=0;v=Y<<1;q[u+72>>2]=v;v=v+X<<1;q[u+76>>2]=v;v=v+W<<1;q[u+80>>2]=v;v=v+V<<1;q[u+84>>2]=v;v=v+U<<1;q[u+88>>2]=v;v=v+J<<1;q[u+92>>2]=v;v=v+I<<1;q[u+96>>2]=v;v=i+v<<1;q[u+100>>2]=v;v=x+v<<1;q[u+104>>2]=v;v=v+E<<1;q[u+108>>2]=v;v=v+H<<1;q[u+112>>2]=v;v=n+v<<1;q[u+116>>2]=v;v=v+Z<<1;q[u+120>>2]=v;v=h+v<<1;q[u+124>>2]=v;R=v;v=q[u+60>>2];R=R+v<<1;q[u+128>>2]=R;if((R|0)!=65536?v+((Z+(((((((((((X+Y|0)+W|0)+V|0)+U|0)+J|0)+I|0)+i|0)+x|0)+E|0)+H|0)+n|0)|0)+h|0)>>>0>=2:0){break r}if(Q){x=-1;I=0;J=w(N,3488)+a|0;while(1){E=r[(I+J|0)- -64|0];hc:{if(!E){break hc}i=(u- -64|0)+(E<<2)|0;h=q[i>>2];q[i>>2]=h+1;i=0;n=E;while(1){H=i;i=h&1|i<<1;h=h>>>1|0;n=n-1|0;if(n){continue}break}if(E>>>0<=10){if(i>>>0>1023){break hc}h=E<<9|I;n=1<>1]=h;i=i+n|0;if(i>>>0<1024){continue}break}break hc}i=J+((i&1023)<<1)|0;h=p[i+352>>1];ic:{if(h){i=x;x=h;break ic}p[i+352>>1]=x;i=x-2|0}h=H>>>8&8388607;if(E>>>0>=12){while(1){h=h>>>1|0;n=(J+((h&1)+(x^-1)<<1)|0)+2400|0;x=p[n>>1];if(!x){p[n>>1]=i;x=i;i=i-2|0}E=E-1|0;if(E>>>0>11){continue}break}}p[(J+((h>>>1&1)+(x^-1)<<1)|0)+2400>>1]=I;x=i}I=I+1|0;if((Q|0)!=(I|0)){continue}break}}h=0;if((_|0)!=2){break _b}break cc;case 1:h=p[(((k&1023)<<1)+a|0)+7328>>1];jc:{if((h|0)>=0){if((h>>9)-1>>>0>=j>>>0){break jc}break bc}if(j>>>0<11){break jc}i=10;while(1){h=p[(((k>>>i&1)+(h^-1)<<1)+a|0)+9376>>1];if((h|0)<=-1){n=i+2|0;i=i+1|0;if(j>>>0>=n>>>0){continue}}break}if((h|0)>-1){break bc}}if(l>>>0>>0){break Zb}h=17;continue ra;case 2:i=p[(((k&1023)<<1)+a|0)+7328>>1];if((i|0)>=0){break ec}h=10;while(1){n=k>>>h|0;h=h+1|0;i=p[(((n&1)+(i^-1)<<1)+a|0)+9376>>1];if((i|0)<0){continue}break}break dc;default:break fc}}h=o[T+184612|0]+((-1<>>A|0;i=a+m|0;Ui(i+10532|0,(D|0)==16?r[i+10531|0]:0,h);h=h+m|0;break cc}h=i>>9;i=i&511}j=j-h|0;k=k>>>h|0;D=i;if(i>>>0>15){break ac}o[(a+m|0)+10532|0]=D;h=m+1|0}i=q[a+48>>2];m=q[a+44>>2];n=i+m|0;if(n>>>0<=h>>>0){break $b}if(j>>>0<=14){if((C-l|0)<=1){m=h;h=1;continue}k=r[l|0]<>>0<=j>>>0){break Xb}break ua}if((h|0)!=(n|0)){m=h;break m}n=a+10532|0;Ti(a- -64|0,n,m);Ti(a+3552|0,m+n|0,i);m=h}N=q[a+24>>2]-1|0;q[a+24>>2]=N;break Yb}h=18;continue ra}h=0;continue}h=3;continue}}z=k;h=2}kc:while(1){lc:{mc:{nc:{oc:{pc:{qc:{rc:{sc:{tc:{uc:{vc:{wc:{xc:{yc:{zc:{Ac:{switch(h|0){case 0:h=p[(((k&1023)<<1)+a|0)+352>>1];Bc:{if((h|0)>=0){if((h>>9)-1>>>0>=j>>>0){break Bc}break lc}if(j>>>0<11){break Bc}i=10;while(1){h=p[(((k>>>i&1)+(h^-1)<<1)+a|0)+2400>>1];if((h|0)<=-1){n=i+2|0;i=i+1|0;if(j>>>0>=n>>>0){continue}}break}if((h|0)>-1){break lc}}if(l>>>0>>0){break zc}h=21;continue ra;case 1:i=p[(((k&1023)<<1)+a|0)+352>>1];if((i|0)>=0){break yc}h=10;while(1){m=k>>>h|0;h=h+1|0;i=p[(((m&1)+(i^-1)<<1)+a|0)+2400>>1];if((i|0)<0){continue}break}m=i;break xc;case 3:break oc;case 4:break pc;case 5:break tc;case 6:break uc;case 2:break Ac;default:break vc}}while(1){h=C-l|0;if(!((L-y|0)>1?(h|0)>=4:0)){if(j>>>0>14){k=z;break lc}if((h|0)<=1){k=z;h=0;continue kc}k=r[l|0]<>>0>14)){z=(r[l|0]|r[l+1|0]<<8)<>1];Cc:{if((m|0)<0){h=10;while(1){k=z>>>h|0;h=h+1|0;m=p[(((k&1)+(m^-1)<<1)+a|0)+2400>>1];if((m|0)<0){continue}break}break Cc}h=m>>9}j=j-h|0;k=z>>>h|0;if(m&256){l=n;break wc}Dc:{if(j>>>0>14){H=j;l=n;break Dc}H=j+16|0;k=(r[n|0]|r[n+1|0]<<8)<>1];Ec:{if((i|0)<0){h=10;while(1){j=k>>>h|0;h=h+1|0;i=p[(((j&1)+(i^-1)<<1)+a|0)+2400>>1];if((i|0)<0){continue}break}break Ec}h=i>>9}o[y|0]=m;j=H-h|0;z=k>>>h|0;if(!(i&256)){o[y+1|0]=i;y=y+2|0;continue}break}y=y+1|0;k=z;m=i;break wc}h=22;continue ra}h=i>>9;m=i&511}j=j-h|0;k=k>>>h|0;if(m>>>0>255){break wc}h=23;continue ra}h=256;i=m&511;if((i|0)==256){break xa}n=(i<<2)-1028|0;m=q[n+184080>>2];A=0;h=k;if(i-265>>>0>19){break nc}A=q[n+184208>>2];if(A>>>0>j>>>0){break va}h=3;continue}if(!m){z=k;m=-1;break rc}m=m-1|0;h=30;continue ra}j=j-A|0;z=k>>>A|0;D=((-1<>1];Fc:{if((i|0)<0){h=10;while(1){n=k>>>h|0;h=h+1|0;i=p[(((n&1)+(i^-1)<<1)+a|0)+5888>>1];if((i|0)<0){continue}break}break Fc}h=i>>9;i=i&511}n=i<<2;D=q[n+184336>>2];j=j-h|0;k=k>>>h|0;A=0;if(i-4>>>0>25){z=k;break sc}A=q[n+184464>>2];if(A>>>0<=j>>>0){break qc}break wa}M=y-d|0;if(!(!S|M>>>0>=D>>>0)){k=z;break n}i=(M-D&P)+d|0;if((i>>>0>>0?y:i)+m>>>0>L>>>0){k=z;h=7;continue}while(1){n=i;h=y;o[h|0]=r[i|0];o[h+1|0]=r[i+1|0];o[h+2|0]=r[i+2|0];i=i+3|0;y=h+3|0;x=m;m=m-3|0;if((m|0)>2){continue}break}if((m|0)<1){break rc}o[y|0]=r[i|0];if((m|0)!=1){o[h+4|0]=r[n+4|0]}y=h+x|0}h=2;continue}h=6;continue}h=p[(((k&1023)<<1)+a|0)+3840>>1];Gc:{if((h|0)>=0){if((h>>9)-1>>>0>=j>>>0){break Gc}break mc}if(j>>>0<11){break Gc}i=10;while(1){h=p[(((k>>>i&1)+(h^-1)<<1)+a|0)+5888>>1];if((h|0)<=-1){n=i+2|0;i=i+1|0;if(j>>>0>=n>>>0){continue}}break}if((h|0)>-1){break mc}}if(l>>>0>=C>>>0){h=26;continue ra}h=27;continue ra}j=j-A|0;m=((-1<>>A|0}k=h;if(j>>>0>14){break mc}if((C-l|0)<=1){h=4;continue}k=k|r[l|0]<>>0>=C>>>0){h=28;continue}h=29;continue}if(l>>>0>=C>>>0){h=24;continue}h=25;continue}if(l>>>0>=C>>>0){h=19;continue}h=20;continue}if(l>>>0>=C>>>0){h=15;continue}h=16;continue}h=l>>>0>=C>>>0?13:14;continue}}n=35;i=0;break e}h=j&-8;k=k>>>(j&7)|0;m=0;i=0}while(1){Ic:{Jc:{Kc:{Lc:{Mc:{Nc:{Oc:{Pc:{Qc:{Rc:{switch(i|0){case 0:if(m>>>0>3){j=h;break o}if(!h){break Nc}if(h>>>0>7){break Oc}break Pc;case 1:G=0;if(!(g&2)){break Qc}i=1;n=41;j=h;F=1;break e;case 3:break Mc;case 2:break Rc;default:break Jc}}G=r[l|0];l=l+1|0}d=h;h=h+8|0;k=(G&255)<>>0<=4294967287){break Oc}}if(l>>>0>>0){break Ic}i=1;continue}G=k&255;k=k>>>8|0;h=h-8|0;break Kc}j=0;if(l>>>0>>0){break Lc}i=3;continue}G=0;h=j;if(!(g&2)){break Kc}i=1;n=42;F=1;break e}G=r[l|0];l=l+1|0;h=0}i=4;continue}q[a+16>>2]=q[a+16>>2]<<8|G;m=m+1|0;i=0;continue}i=2;continue}}F=0;i=1;n=34;G=1;break e}n=37;i=0;break e}n=21;i=0;break e}n=17;i=0;break e}n=10;i=0;break e}n=40;i=0;break e}n=39;i=0;break e}j=B}F=1;break e}m=1;n=36}H=G;q[a>>2]=n;G=i}q[a+56>>2]=k;q[a+4>>2]=j;q[a+60>>2]=M;q[a+40>>2]=A;q[a+36>>2]=m;q[a+32>>2]=D;q[c>>2]=l-b;j=y-e|0;q[f>>2]=j;if(!(g&9)|!G){break b}b=q[a+28>>2];m=b>>>16|0;i=b&65535;if(j){z=(j>>>0)%5552|0;while(1){h=0;if(z>>>0>7){while(1){b=r[e|0]+i|0;c=b+r[e+1|0]|0;d=c+r[e+2|0]|0;f=d+r[e+3|0]|0;k=f+r[e+4|0]|0;B=k+r[e+5|0]|0;l=B+r[e+6|0]|0;i=l+r[e+7|0]|0;m=i+(l+(B+(k+(f+(d+(c+(b+m|0)|0)|0)|0)|0)|0)|0)|0;e=e+8|0;h=h+8|0;if((h|7)>>>0>>0){continue}break}h=z&8184}if(h>>>0>>0){b=z-h|0;k=e;while(1){i=r[k|0]+i|0;m=m+i|0;k=k+1|0;h=h+1|0;if((z|0)!=(h|0)){continue}break}e=b+e|0}j=j-z|0;m=(m>>>0)%65521|0;i=(i>>>0)%65521|0;z=5552;if(j){continue}break}}b=m<<16|i;q[a+28>>2]=b;if(!H){break b}F=0;if(g&1){break a}}Ii=u+144|0;return F}Ii=u+144|0;return q[a+16>>2]==(b|0)?0:-2}function dD(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=Ii+ -64|0;Ii=m;a:{b:{c:{d:{e:{f:{g:{h:{switch(b-196|0){default:if((b|0)!=255){break g}q[213145]=169269;break e;case 25:c=q[a>>2];b=q[c+172>>2];e=q[c+176>>2];i:{if(b>>>0>>0){d=b+1|0;q[c+172>>2]=d;g=r[b|0];break i}if(!q[c+32>>2]){d=b;break i}d=c+40|0;e=Mi[q[c+16>>2]](q[c+28>>2],d,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);b=c;j:{if(!e){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;break j}g=r[c+40|0];e=d+e|0}q[b+176>>2]=e;d=c+41|0;q[c+172>>2]=d}f=(g&255)<<8;k:{if(d>>>0>>0){q[c+172>>2]=d+1;d=r[d|0];break k}if(!q[c+32>>2]){d=0;break k}b=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],b,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);l:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break l}e=b+d|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}if((f|d&255)!=4){q[213145]=169269;break e}c=q[a>>2];b=q[c+172>>2];e=q[c+176>>2];m:{if(b>>>0>>0){d=b+1|0;q[c+172>>2]=d;g=r[b|0];break m}if(!q[c+32>>2]){g=0;d=b;break m}d=c+40|0;e=Mi[q[c+16>>2]](q[c+28>>2],d,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);b=c;n:{if(!e){g=0;o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;break n}g=r[c+40|0];e=d+e|0}q[b+176>>2]=e;d=c+41|0;q[c+172>>2]=d}f=(g&255)<<8;o:{if(d>>>0>>0){q[c+172>>2]=d+1;d=r[d|0];break o}if(!q[c+32>>2]){d=0;break o}b=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],b,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);p:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break p}e=b+d|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}q[a+18436>>2]=f|d&255;a=1;break a;case 23:c=q[a>>2];b=q[c+172>>2];e=q[c+176>>2];q:{if(b>>>0>>0){d=b+1|0;q[c+172>>2]=d;g=r[b|0];break q}if(!q[c+32>>2]){d=b;break q}d=c+40|0;e=Mi[q[c+16>>2]](q[c+28>>2],d,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);b=c;r:{if(!e){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;break r}g=r[c+40|0];e=d+e|0}q[b+176>>2]=e;d=c+41|0;q[c+172>>2]=d}f=(g&255)<<8;s:{if(d>>>0>>0){q[c+172>>2]=d+1;d=r[d|0];break s}if(!q[c+32>>2]){d=0;break s}b=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],b,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);t:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break t}e=b+d|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}h=(f+(d&255)|0)-2|0;if((h|0)>=1){while(1){c=q[a>>2];b=q[c+172>>2];u:{v:{if(b>>>0>2]){q[c+172>>2]=b+1;d=r[b|0];break v}if(!q[c+32>>2]){l=0;f=1;break u}b=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],b,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);w:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break w}e=b+d|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}b=d&255;if(b>>>0>=32){q[213145]=169269;break e}l=d&15;if(l>>>0>3){break f}f=!(b&240)}e=0;while(1){b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];x:{if(!f){y:{if(c>>>0>d>>>0){g=d+1|0;q[b+172>>2]=g;j=r[d|0];break y}if(!q[b+32>>2]){j=0;g=d;break y}c=b+40|0;g=Mi[q[b+16>>2]](q[b+28>>2],c,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;z:{if(!g){j=0;o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;break z}j=r[b+40|0];c=c+g|0}q[d+176>>2]=c;g=b+41|0;q[b+172>>2]=g}i=j<<8;A:{if(c>>>0>g>>>0){q[b+172>>2]=g+1;c=r[g|0];break A}if(!q[b+32>>2]){c=0;break A}g=b+40|0;k=Mi[q[b+16>>2]](q[b+28>>2],g,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;B:{if(!k){o[b+40|0]=0;q[b+32>>2]=0;g=b+41|0;c=0;break B}g=g+k|0;c=r[b+40|0]}q[d+176>>2]=g;q[b+172>>2]=b+41}b=i|c&255;break x}C:{if(c>>>0>d>>>0){q[b+172>>2]=d+1;d=r[d|0];break C}if(!q[b+32>>2]){d=0;break C}d=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],d,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);D:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;d=0;break D}c=c+d|0;d=r[b+40|0]}q[b+176>>2]=c;q[b+172>>2]=b+41}b=d&255}p[(((l<<7)+a|0)+(r[e+169296|0]<<1)|0)+13444>>1]=b;e=e+1|0;if((e|0)!=64){continue}break}h=(f?-65:-129)+h|0;if((h|0)>0){continue}break}}a=!h;break a;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 24:break g;case 0:break h}}c=q[a>>2];b=q[c+172>>2];e=q[c+176>>2];E:{if(b>>>0>>0){d=b+1|0;q[c+172>>2]=d;g=r[b|0];break E}if(!q[c+32>>2]){d=b;break E}d=c+40|0;e=Mi[q[c+16>>2]](q[c+28>>2],d,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);b=c;F:{if(!e){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;break F}g=r[c+40|0];e=d+e|0}q[b+176>>2]=e;d=c+41|0;q[c+172>>2]=d}f=(g&255)<<8;G:{if(d>>>0>>0){q[c+172>>2]=d+1;d=r[d|0];break G}if(!q[c+32>>2]){d=0;break G}b=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],b,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);H:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break H}e=b+d|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}j=(f+(d&255)|0)-2|0;if((j|0)>=1){while(1){d=q[a>>2];b=q[d+172>>2];I:{if(b>>>0>2]){q[d+172>>2]=b+1;c=r[b|0];break I}if(!q[d+32>>2]){c=0;break I}e=d+40|0;f=Mi[q[d+16>>2]](q[d+28>>2],e,q[d+36>>2])|0;q[d+168>>2]=q[d+168>>2]+(q[d+172>>2]-q[d+180>>2]|0);b=d;J:{if(!f){c=0;o[d+40|0]=0;q[d+32>>2]=0;e=d+41|0;break J}c=r[d+40|0];e=e+f|0}q[b+176>>2]=e;q[d+172>>2]=d+41}K:{f=c&255;if(f>>>0<=31){e=0;d=0;k=c&15;if(k>>>0<4){break K}}q[213145]=169269;break e}while(1){g=q[a>>2];b=q[g+172>>2];L:{if(b>>>0>2]){q[g+172>>2]=b+1;c=r[b|0];break L}if(!q[g+32>>2]){c=0;break L}b=g+40|0;c=Mi[q[g+16>>2]](q[g+28>>2],b,q[g+36>>2])|0;q[g+168>>2]=q[g+168>>2]+(q[g+172>>2]-q[g+180>>2]|0);M:{if(!c){o[g+40|0]=0;q[g+32>>2]=0;h=g+41|0;c=0;break M}h=b+c|0;c=r[g+40|0]}q[g+176>>2]=h;q[g+172>>2]=g+41}b=c&255;q[(d<<2)+m>>2]=b;e=b+e|0;d=d+1|0;if((d|0)!=16){continue}break}f=f&240;N:{if(!f){b=w(k,1680)+a|0;if(!iD(b+4|0,m)){break e}b=b+1028|0;break N}b=w(k,1680)+a|0;if(!iD(b+6724|0,m)){break e}b=b+7748|0}d=0;if(e){while(1){i=q[a>>2];c=q[i+172>>2];O:{if(c>>>0>2]){q[i+172>>2]=c+1;c=r[c|0];break O}if(!q[i+32>>2]){c=0;break O}c=i+40|0;g=Mi[q[i+16>>2]](q[i+28>>2],c,q[i+36>>2])|0;q[i+168>>2]=q[i+168>>2]+(q[i+172>>2]-q[i+180>>2]|0);P:{if(!g){o[i+40|0]=0;q[i+32>>2]=0;l=i+41|0;c=0;break P}l=c+g|0;c=r[i+40|0]}q[i+176>>2]=l;q[i+172>>2]=i+41}o[b+d|0]=c;d=d+1|0;if((e|0)!=(d|0)){continue}break}}b=0;if(f){while(1){d=w(k,1680)+a|0;c=r[(d+b|0)+6724|0];g=(((k<<10)+a|0)+(b<<1)|0)+13956|0;p[g>>1]=0;Q:{if((c|0)==255){break Q}d=c+d|0;f=r[d+7748|0];i=f&15;if(!i){break Q}d=r[d+8004|0];c=d+i|0;if(c>>>0>9){break Q}d=(b<>>9-i|0;d=((d|0)<1<>>0>255){break Q}p[g>>1]=(c+(f&240)|0)+(d<<8)}b=b+1|0;if((b|0)!=512){continue}break}}j=(j-17|0)-e|0;if((j|0)>0){continue}break}}a=!j;break a}R:{S:{T:{U:{V:{W:{if(!((b&-16)!=224?(b|0)!=254:0)){f=q[a>>2];d=q[f+172>>2];c=q[f+176>>2];X:{if(d>>>0>>0){e=d+1|0;q[f+172>>2]=e;h=r[d|0];break X}if(!q[f+32>>2]){e=d;break X}e=f+40|0;c=Mi[q[f+16>>2]](q[f+28>>2],e,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);d=f;Y:{if(!c){o[f+40|0]=0;q[f+32>>2]=0;c=f+41|0;break Y}h=r[f+40|0];c=c+e|0}q[d+176>>2]=c;e=f+41|0;q[f+172>>2]=e}g=(h&255)<<8;Z:{if(c>>>0>e>>>0){q[f+172>>2]=e+1;e=r[e|0];break Z}if(!q[f+32>>2]){e=0;break Z}d=f+40|0;e=Mi[q[f+16>>2]](q[f+28>>2],d,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);_:{if(!e){o[f+40|0]=0;q[f+32>>2]=0;c=f+41|0;e=0;break _}c=d+e|0;e=r[f+40|0]}q[f+176>>2]=c;q[f+172>>2]=f+41}i=g|e&255;if(i>>>0<=1){q[213145]=169269;break e}if(!((b|0)!=224|i>>>0<7)){b=q[a>>2];e=q[b+172>>2];c=q[b+176>>2];$:{if(e>>>0>>0){d=e+1|0;q[b+172>>2]=d;h=r[e|0];break $}if(!q[b+32>>2]){h=0;d=e;break $}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;aa:{if(!c){h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0;break aa}h=r[b+40|0];e=c+e|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2]}if(c>>>0>d>>>0){break V}if(q[b+32>>2]){break W}g=0;break U}d=i-2|0;if((b|0)!=238|i>>>0<14){break c}b=q[a>>2];e=q[b+172>>2];c=q[b+176>>2];ba:{if(e>>>0>>0){d=e+1|0;q[b+172>>2]=d;h=r[e|0];break ba}if(!q[b+32>>2]){h=0;d=e;break ba}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ca:{if(!c){h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0;break ca}h=r[b+40|0];e=c+e|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2]}if(c>>>0>d>>>0){break S}if(q[b+32>>2]){break T}g=0;break R}q[213145]=169269;break e}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;da:{if(c){g=r[b+40|0];e=c+e|0;break da}g=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break U}e=d+1|0;q[b+172>>2]=e;g=r[d|0];d=e}f=(g&255)==70&(h&255)==74;ea:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){h=0;break ea}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;fa:{if(c){h=r[b+40|0];e=c+e|0;break fa}h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break ea}e=d+1|0;q[b+172>>2]=e;h=r[d|0];d=e}f=f&(h&255)==73;ga:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){h=0;break ga}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ha:{if(c){h=r[b+40|0];e=c+e|0;break ha}h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break ga}e=d+1|0;q[b+172>>2]=e;h=r[d|0];d=e}f=f&(h&255)==70;ia:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){c=0;break ia}e=b+40|0;g=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ja:{if(g){c=r[b+40|0];e=e+g|0;break ja}c=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;break ia}q[b+172>>2]=d+1;c=r[d|0]}d=i-7|0;if(!(f&!(c&255))){break c}q[a+18404>>2]=1;break c}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ka:{if(c){g=r[b+40|0];e=c+e|0;break ka}g=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break R}e=d+1|0;q[b+172>>2]=e;g=r[d|0];d=e}f=(g&255)==100&(h&255)==65;la:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){h=0;break la}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ma:{if(c){h=r[b+40|0];e=c+e|0;break ma}h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break la}e=d+1|0;q[b+172>>2]=e;h=r[d|0];d=e}f=f&(h&255)==111;na:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){h=0;break na}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;oa:{if(c){h=r[b+40|0];e=c+e|0;break oa}h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break na}e=d+1|0;q[b+172>>2]=e;h=r[d|0];d=e}f=f&(h&255)==98;pa:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){h=0;break pa}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;qa:{if(c){h=r[b+40|0];e=c+e|0;break qa}h=0;o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2];break pa}e=d+1|0;q[b+172>>2]=e;h=r[d|0];d=e}e=f&(h&255)==101;ra:{if(c>>>0<=d>>>0){if(!q[b+32>>2]){d=0;break ra}d=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],d,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);sa:{if(c){c=c+d|0;d=r[b+40|0];break sa}o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;d=0}q[b+176>>2]=c;q[b+172>>2]=b+41;break ra}q[b+172>>2]=d+1;d=r[d|0]}if(e&!(d&255)){break d}d=i-8|0;break b}q[213145]=169269}a=0;break a}b=q[a>>2];d=q[b+172>>2];c=q[b+176>>2];ta:{if(d>>>0>>0){d=d+1|0;q[b+172>>2]=d;break ta}if(!q[b+32>>2]){break ta}e=Mi[q[b+16>>2]](q[b+28>>2],b+40|0,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ua:{if(!e){o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0;break ua}e=(b+e|0)+40|0}q[d+176>>2]=e;q[b+172>>2]=b+41;b=q[a>>2];c=q[b+176>>2];d=q[b+172>>2]}e=b;va:{if(c>>>0>d>>>0){d=d+1|0}else{if(!q[b+32>>2]){break va}c=Mi[q[b+16>>2]](q[b+28>>2],b+40|0,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;wa:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;break wa}c=(b+c|0)+40|0}q[d+176>>2]=c;d=b+41|0}q[e+172>>2]=d}e=b;xa:{if(c>>>0>d>>>0){b=d+1|0}else{if(!q[b+32>>2]){break xa}c=Mi[q[b+16>>2]](q[b+28>>2],b+40|0,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;ya:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;break ya}c=(b+c|0)+40|0}q[d+176>>2]=c;b=b+41|0}q[e+172>>2]=b}b=q[a>>2];d=q[b+172>>2];c=q[b+176>>2];za:{Aa:{if(d>>>0>>0){d=d+1|0;break Aa}if(!q[b+32>>2]){break za}e=Mi[q[b+16>>2]](q[b+28>>2],b+40|0,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Ba:{if(!e){o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;break Ba}c=(b+e|0)+40|0}q[d+176>>2]=c;d=b+41|0}q[b+172>>2]=d}e=b;Ca:{if(c>>>0>d>>>0){b=d+1|0}else{if(!q[b+32>>2]){break Ca}c=Mi[q[b+16>>2]](q[b+28>>2],b+40|0,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);d=b;Da:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;c=b+41|0;break Da}c=(b+c|0)+40|0}q[d+176>>2]=c;b=b+41|0}q[e+172>>2]=b}e=q[a>>2];b=q[e+172>>2];Ea:{if(b>>>0>2]){q[e+172>>2]=b+1;d=r[b|0];break Ea}if(!q[e+32>>2]){d=0;break Ea}b=e+40|0;d=Mi[q[e+16>>2]](q[e+28>>2],b,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);Fa:{if(!d){o[e+40|0]=0;q[e+32>>2]=0;c=e+41|0;d=0;break Fa}c=b+d|0;d=r[e+40|0]}q[e+176>>2]=c;q[e+172>>2]=e+41}q[a+18408>>2]=d&255;d=i-14|0}if(d){break b}a=1;break a}c=q[a>>2];if((d|0)<=-1){q[c+172>>2]=q[c+176>>2];a=1;break a}Ga:{if(!q[c+16>>2]){a=q[c+172>>2];break Ga}e=q[c+176>>2];a=q[c+172>>2];b=e-a|0;if((b|0)>=(d|0)){break Ga}q[c+172>>2]=e;Mi[q[c+20>>2]](q[c+28>>2],d-b|0);a=1;break a}q[c+172>>2]=a+d;a=1}Ii=m- -64|0;return a}function a$(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;u=Ii-16|0;Ii=u;B=-2;a:{if(!a){break a}b=q[a+28>>2];if(!b){break a}v=q[a+12>>2];if(!v){break a}g=q[a>>2];if(q[a+4>>2]?!g:0){break a}c=q[b>>2];if((c|0)==11){q[b>>2]=12;c=12}J=b+88|0;D=b+752|0;G=b+112|0;H=b+84|0;E=b+108|0;C=b+1328|0;d=q[b+60>>2];e=q[b+56>>2];I=q[a+4>>2];h=I;n=q[a+16>>2];A=n;b:{c:{d:while(1){e:{f=-3;j=1;f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{switch(c|0){case 23:j=q[b+72>>2];break x;case 21:j=q[b+72>>2];break z;case 18:j=q[b+104>>2];break N;case 0:f=q[b+8>>2];if(!f){break H}if(d>>>0<16){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<8;d=d+8|0;g=g+1|0;if(c){continue}break}}if(!(!(f&2)|(e|0)!=35615)){e=0;c=vl(0,0,0);q[b+24>>2]=c;o[u+12|0]=31;o[u+13|0]=139;c=vl(c,u+12|0,2);q[b>>2]=1;q[b+24>>2]=c;d=0;c=q[b>>2];continue}q[b+16>>2]=0;c=q[b+32>>2];if(c){q[c+48>>2]=-1}if(!(((e<<8&65280)+(e>>>8|0)>>>0)%31|0?0:f&1)){q[a+24>>2]=193206;q[b>>2]=29;c=q[b>>2];continue}if((e&15)!=8){q[a+24>>2]=193229;q[b>>2]=29;c=q[b>>2];continue}c=e>>>4|0;i=c&15;j=i+8|0;f=q[b+36>>2];if(!f){q[b+36>>2]=j;break f}if(f>>>0>=j>>>0){break f}d=d-4|0;q[a+24>>2]=193256;q[b>>2]=29;e=c;c=q[b>>2];continue;case 1:if(d>>>0<16){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<8;d=d+8|0;g=g+1|0;if(c){continue}break}}q[b+16>>2]=e;if((e&255)!=8){q[a+24>>2]=193229;q[b>>2]=29;c=q[b>>2];continue}if(e&57344){q[a+24>>2]=193276;q[b>>2]=29;c=q[b>>2];continue}c=q[b+32>>2];if(c){q[c>>2]=e>>>8&1}if(e&512){o[u+12|0]=e;o[u+13|0]=e>>>8;q[b+24>>2]=vl(q[b+24>>2],u+12|0,2)}q[b>>2]=2;d=0;e=0;break da;case 28:break h;case 8:break k;case 7:break l;case 6:break m;case 5:break n;case 24:break w;case 22:break y;case 27:break I;case 26:break J;case 25:break K;case 30:break b;case 20:break L;case 19:break M;case 17:break Q;case 16:break R;case 15:break S;case 14:break T;case 13:break U;case 29:break c;case 11:case 12:break V;case 10:break W;case 9:break X;case 4:break _;case 3:break ba;case 2:break ea;default:break a}}if(d>>>0>31){break ca}}c=g;while(1){if(!h){h=0;g=c;f=z;break c}h=h-1|0;e=(r[c|0]<>>0<24;d=d+8|0;g=c+1|0;c=g;if(f){continue}break}}c=q[b+32>>2];if(c){q[c+4>>2]=e}if(r[b+17|0]&2){o[u+12|0]=e;o[u+13|0]=e>>>8;o[u+14|0]=e>>>16;o[u+15|0]=e>>>24;q[b+24>>2]=vl(q[b+24>>2],u+12|0,4)}q[b>>2]=3;d=0;e=0;break aa}if(d>>>0>15){break $}}c=g;while(1){if(!h){h=0;g=c;f=z;break c}h=h-1|0;e=(r[c|0]<>>0<8;d=d+8|0;g=c+1|0;c=g;if(f){continue}break}}c=q[b+32>>2];if(c){q[c+12>>2]=e>>>8;q[c+8>>2]=e&255}if(r[b+17|0]&2){o[u+12|0]=e;o[u+13|0]=e>>>8;q[b+24>>2]=vl(q[b+24>>2],u+12|0,2)}q[b>>2]=4;c=0;d=0;e=0;j=q[b+16>>2];if(j&1024){break Z}break p}j=q[b+16>>2];if(!(j&1024)){c=d;break p}c=e;if(d>>>0>15){break Y}}while(1){if(!h){h=0;e=c;f=z;break c}h=h-1|0;c=(r[g|0]<>>0<8;d=d+8|0;f=g+1|0;g=f;if(i){continue}break}g=f;e=c}q[b+64>>2]=e;c=q[b+32>>2];if(c){q[c+20>>2]=e}d=0;if(j&512){o[u+12|0]=e;o[u+13|0]=e>>>8;q[b+24>>2]=vl(q[b+24>>2],u+12|0,2)}e=0;break o}if(d>>>0<32){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<24;d=d+8|0;g=g+1|0;if(c){continue}break}}c=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);q[b+24>>2]=c;q[a+48>>2]=c;q[b>>2]=10;e=0;d=0}if(!q[b+12>>2]){q[a+16>>2]=n;q[a+12>>2]=v;q[a+4>>2]=h;q[a>>2]=g;q[b+60>>2]=d;q[b+56>>2]=e;B=2;break a}c=Dq(0,0,0);q[b+24>>2]=c;q[a+48>>2]=c;q[b>>2]=11}fa:{ga:{if(!q[b+4>>2]){c=d;f=c;if(c>>>0>2){break fa}if(h){break ga}break j}q[b>>2]=26;e=e>>>(d&7)|0;d=d&-8;c=q[b>>2];continue}h=h-1|0;e=(r[g|0]<>2]=e&1;d=13;ha:{ia:{ja:{switch((e>>>1&3)-1|0){case 0:q[b+84>>2]=9;q[b+88>>2]=5;q[b>>2]=19;q[b+76>>2]=193680;q[b+80>>2]=195728;break ha;case 1:d=16;break ia;case 2:break ja;default:break ia}}q[a+24>>2]=193321;d=29}q[b>>2]=d}d=c-3|0;e=e>>>3|0;c=q[b>>2];continue}e=e>>>(d&7)|0;d=d&-8;if(d>>>0<=31){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<24;d=d+8|0;g=g+1|0;if(c){continue}break}}c=e&65535;if((c|0)!=((e^-1)>>>16|0)){q[a+24>>2]=193340;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=14;q[b+64>>2]=c;e=0;d=0}q[b>>2]=15}c=q[b+64>>2];if(c){c=c>>>0>h>>>0?h:c;f=c>>>0>n>>>0?n:c;if(!f){break i}c=Ti(v,g,f);q[b+64>>2]=q[b+64>>2]-f;v=c+f|0;n=n-f|0;g=g+f|0;h=h-f|0;c=q[b>>2];continue}q[b>>2]=11;c=q[b>>2];continue}if(d>>>0<14){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<6;d=d+8|0;g=g+1|0;if(c){continue}break}}f=e&31;q[b+96>>2]=f+257;c=e>>>5&31;q[b+100>>2]=c+1;i=(e>>>10&15)+4|0;q[b+92>>2]=i;d=d-14|0;e=e>>>14|0;if(!(c>>>0<30?f>>>0<=29:0)){q[a+24>>2]=193369;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=17;c=0;q[b+104>>2]=0;break P}c=q[b+104>>2];i=q[b+92>>2];if(c>>>0>=i>>>0){break O}}f=c;while(1){if(d>>>0<=2){if(!h){break e}h=h-1|0;e=(r[g|0]<>2]=c;p[((s[(f<<1)+193168>>1]<<1)+b|0)+112>>1]=e&7;d=d-3|0;e=e>>>3|0;f=c;if(i>>>0>c>>>0){continue}break}}if(c>>>0<19){while(1){p[((s[(c<<1)+193168>>1]<<1)+b|0)+112>>1]=0;c=c+1|0;if((c|0)!=19){continue}break}q[b+104>>2]=19}q[b+84>>2]=7;q[b+76>>2]=C;q[b+108>>2]=C;j=0;z=Ry(0,G,19,E,H,D);if(z){q[a+24>>2]=193405;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=18;q[b+104>>2]=0;z=0}x=q[b+96>>2];m=x+q[b+100>>2]|0;if(m>>>0>j>>>0){w=-1<>2]^-1;F=q[b+76>>2];while(1){k=d;c=h;f=g;y=e&w;l=r[((y<<2)+F|0)+1|0];ka:{if(l>>>0<=d>>>0){i=d;break ka}while(1){if(!c){break G}l=r[f|0]<>>0>i>>>0){continue}break}}h=s[((y<<2)+F|0)+2>>1];la:{if(h>>>0<=15){g=j+1|0;q[b+104>>2]=g;p[((j<<1)+b|0)+112>>1]=h;d=i-l|0;e=e>>>l|0;j=g;break la}ma:{na:{oa:{switch(h-16|0){case 0:g=l+2|0;if(g>>>0>i>>>0){while(1){if(!c){break q}c=c-1|0;e=(r[f|0]<>>0>i>>>0){continue}break}}d=i-l|0;i=e>>>l|0;if(!j){q[a+24>>2]=193430;q[b>>2]=29;g=f;h=c;e=i;c=q[b>>2];continue d}d=d-2|0;e=i>>>2|0;h=(i&3)+3|0;g=s[((j<<1)+b|0)+110>>1];break ma;case 1:g=l+3|0;if(g>>>0>i>>>0){while(1){if(!c){break q}c=c-1|0;e=(r[f|0]<>>0>i>>>0){continue}break}}d=(i-l|0)-3|0;g=e>>>l|0;e=g>>>3|0;h=(g&7)+3|0;break na;default:break oa}}g=l+7|0;if(g>>>0>i>>>0){while(1){if(!c){break q}c=c-1|0;e=(r[f|0]<>>0>i>>>0){continue}break}}d=(i-l|0)-7|0;g=e>>>l|0;e=g>>>7|0;h=(g&127)+11|0}g=0}if(m>>>0>>0){q[a+24>>2]=193430;q[b>>2]=29;g=f;h=c;c=q[b>>2];continue d}while(1){p[((j<<1)+b|0)+112>>1]=g;j=j+1|0;h=h-1|0;if(h){continue}break}q[b+104>>2]=j}g=f;h=c;if(j>>>0>>0){continue}break}}if(!s[b+624>>1]){q[a+24>>2]=193456;q[b>>2]=29;c=q[b>>2];continue}q[b+84>>2]=9;q[b+76>>2]=C;q[b+108>>2]=C;z=Ry(1,G,x,E,H,D);if(z){q[a+24>>2]=193493;q[b>>2]=29;c=q[b>>2];continue}q[b+88>>2]=6;q[b+80>>2]=q[b+108>>2];z=Ry(2,((q[b+96>>2]<<1)+b|0)+112|0,q[b+100>>2],E,J,D);if(z){q[a+24>>2]=193521;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=19;z=0}q[b>>2]=20}if(!(n>>>0<258|h>>>0<6)){q[a+16>>2]=n;q[a+12>>2]=v;q[a+4>>2]=h;q[a>>2]=g;q[b+60>>2]=d;q[b+56>>2]=e;Z_(a,A);d=q[b+60>>2];e=q[b+56>>2];h=q[a+4>>2];g=q[a>>2];n=q[a+16>>2];v=q[a+12>>2];if(q[b>>2]!=11){break v}q[b+7108>>2]=-1;c=q[b>>2];continue}q[b+7108>>2]=0;j=d;c=h;f=g;w=q[b+76>>2];x=-1<>2]^-1;l=x&e;k=r[(w+(l<<2)|0)+1|0];pa:{if(k>>>0<=d>>>0){i=d;break pa}while(1){if(!c){break E}k=r[f|0]<>>0>i>>>0){continue}break}}d=k;g=w+(l<<2)|0;y=s[g+2>>1];m=r[g|0];if(!m|m&240){break B}h=c;g=f;j=i;x=-1<>>d|0)+y|0;k=r[(w+(m<<2)|0)+1|0];qa:{if(i>>>0>=k+d>>>0){l=i;break qa}while(1){if(!h){break F}k=r[g|0]<>>d|0)+y|0;k=r[(w+(m<<2)|0)+1|0];if(j>>>0>>0){continue}break}}c=w+(m<<2)|0;m=r[c|0];y=s[c+2>>1];q[b+7108>>2]=d;i=l-d|0;e=e>>>d|0;break A}if(!n){break i}o[v|0]=q[b+64>>2];q[b>>2]=20;n=n-1|0;v=v+1|0;c=q[b>>2];continue}if(q[b+8>>2]){if(d>>>0<=31){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<24;d=d+8|0;g=g+1|0;if(c){continue}break}}j=A-n|0;q[a+20>>2]=j+q[a+20>>2];q[b+28>>2]=j+q[b+28>>2];ra:{if(!j){c=q[b+24>>2];break ra}i=v-j|0;f=q[b+24>>2];k=b;sa:{if(q[b+16>>2]){c=vl(f,i,j);break sa}c=Dq(f,i,j)}q[k+24>>2]=c;q[a+48>>2]=c}if(((q[b+16>>2]?e:e<<8&16711680|e<<24|(e>>>8&65280|e>>>24))|0)!=(c|0)){break D}e=0;A=n;d=0}q[b>>2]=27}if(!(!q[b+8>>2]|!q[b+16>>2])){if(d>>>0<=31){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<24;d=d+8|0;g=g+1|0;if(c){continue}break}}if(q[b+28>>2]!=(e|0)){break C}e=0;d=0}q[b>>2]=28;f=1;break c}q[b>>2]=12;break v}g=g+h|0;d=(h<<3)+d|0;break e}g=c+f|0;d=(c<<3)+i|0;break e}g=g+h|0;d=(h<<3)+d|0;break e}q[a+24>>2]=193623;q[b>>2]=29;A=n;c=q[b>>2];continue}q[a+24>>2]=193644;q[b>>2]=29;c=q[b>>2];continue}d=0;g=f;h=c}q[b+64>>2]=y&65535;q[b+7108>>2]=d+k;d=i-k|0;e=e>>>k|0;if(!m){q[b>>2]=25;c=q[b>>2];continue}if(m&32){q[b>>2]=11;q[b+7108>>2]=-1;c=q[b>>2];continue}if(m&64){q[a+24>>2]=193543;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=21;j=m&15;q[b+72>>2]=j}i=g;k=h;ta:{if(!j){f=q[b+64>>2];break ta}f=g;c=d;if(j>>>0>c>>>0){while(1){if(!h){break r}h=h-1|0;e=(r[f|0]<>>0>c>>>0){continue}break}}q[b+7108>>2]=q[b+7108>>2]+j;f=q[b+64>>2]+((-1<>2]=f;d=c-j|0;e=e>>>j|0}q[b>>2]=22;q[b+7112>>2]=f}j=d;c=h;f=g;w=q[b+80>>2];x=-1<>2]^-1;l=x&e;k=r[(w+(l<<2)|0)+1|0];ua:{if(k>>>0<=d>>>0){i=d;break ua}while(1){if(!c){break s}k=r[f|0]<>>0>i>>>0){continue}break}}g=w+(l<<2)|0;y=s[g+2>>1];m=r[g|0];va:{if(m&240){d=q[b+7108>>2];g=f;h=c;j=k;break va}h=c;g=f;d=i;x=-1<>>k|0)+y|0;j=r[(w+(m<<2)|0)+1|0];wa:{if(d>>>0>=k+j>>>0){l=i;break wa}while(1){if(!h){break t}j=r[g|0]<>>k|0)+y|0;j=r[(w+(m<<2)|0)+1|0];if(d>>>0>>0){continue}break}}c=w+(m<<2)|0;m=r[c|0];y=s[c+2>>1];d=q[b+7108>>2]+k|0;q[b+7108>>2]=d;i=l-k|0;e=e>>>k|0}q[b+7108>>2]=d+j;d=i-j|0;e=e>>>j|0;if(m&64){q[a+24>>2]=193571;q[b>>2]=29;c=q[b>>2];continue}q[b>>2]=23;j=m&15;q[b+72>>2]=j;q[b+68>>2]=y&65535}i=g;k=h;if(j){f=g;c=d;if(j>>>0>c>>>0){while(1){if(!h){break u}h=h-1|0;e=(r[f|0]<>>0>c>>>0){continue}break}}q[b+7108>>2]=q[b+7108>>2]+j;q[b+68>>2]=q[b+68>>2]+((-1<>>j|0;d=c-j|0}q[b>>2]=24}if(!n){break i}j=q[b+68>>2];c=A-n|0;xa:{if(j>>>0>c>>>0){c=j-c|0;if(!(!q[b+7104>>2]|c>>>0<=t[b+44>>2])){q[a+24>>2]=193593;q[b>>2]=29;c=q[b>>2];continue}f=q[b+48>>2];ya:{if(f>>>0>>0){c=c-f|0;j=q[b+40>>2]-c|0;break ya}j=f-c|0}i=q[b+64>>2];f=c>>>0>i>>>0?i:c;c=j+q[b+52>>2]|0;break xa}i=q[b+64>>2];f=i;c=v-j|0}j=i;i=f>>>0>n>>>0?n:f;q[b+64>>2]=j-i;f=i;while(1){o[v|0]=r[c|0];v=v+1|0;c=c+1|0;f=f-1|0;if(f){continue}break}n=n-i|0;if(q[b+64>>2]){break v}q[b>>2]=20;c=q[b>>2];continue}c=q[b>>2];continue}g=i+k|0;d=(k<<3)+d|0;break e}g=c+f|0;d=(c<<3)+i|0;break e}g=g+h|0;d=(h<<3)+d|0;break e}g=i+k|0;d=(k<<3)+d|0;break e}h=0;g=f;d=i;f=z;break c}f=q[b+32>>2];if(f){q[f+16>>2]=0}d=c}q[b>>2]=5}j=q[b+16>>2];if(j&1024){c=q[b+64>>2];k=c>>>0>h>>>0?h:c;if(k){i=q[b+32>>2];za:{if(!i){break za}f=q[i+16>>2];if(!f){break za}j=f;f=q[i+20>>2]-c|0;c=q[i+24>>2];Ti(j+f|0,g,c>>>0>>0?c-f|0:k);j=q[b+16>>2]}if(j&512){q[b+24>>2]=vl(q[b+24>>2],g,k)}c=q[b+64>>2]-k|0;q[b+64>>2]=c;h=h-k|0;g=g+k|0}if(c){break i}}q[b>>2]=6;q[b+64>>2]=0}Aa:{if(r[b+17|0]&8){f=0;if(!h){break j}while(1){c=f+1|0;j=r[g+f|0];i=q[b+32>>2];Ba:{if(!i){break Ba}f=q[i+28>>2];if(!f){break Ba}k=q[i+32>>2];i=q[b+64>>2];if(k>>>0<=i>>>0){break Ba}q[b+64>>2]=i+1;o[f+i|0]=j}if(c>>>0>>0){f=c;if(j){continue}}break}if(r[b+17|0]&2){q[b+24>>2]=vl(q[b+24>>2],g,c)}g=c+g|0;h=h-c|0;if(!j){break Aa}break i}c=q[b+32>>2];if(!c){break Aa}q[c+28>>2]=0}q[b>>2]=7;q[b+64>>2]=0}Ca:{if(r[b+17|0]&16){f=0;if(!h){break j}while(1){c=f+1|0;j=r[g+f|0];i=q[b+32>>2];Da:{if(!i){break Da}f=q[i+36>>2];if(!f){break Da}k=q[i+40>>2];i=q[b+64>>2];if(k>>>0<=i>>>0){break Da}q[b+64>>2]=i+1;o[f+i|0]=j}if(c>>>0>>0){f=c;if(j){continue}}break}if(r[b+17|0]&2){q[b+24>>2]=vl(q[b+24>>2],g,c)}g=c+g|0;h=h-c|0;if(!j){break Ca}break i}c=q[b+32>>2];if(!c){break Ca}q[c+36>>2]=0}q[b>>2]=8}f=q[b+16>>2];if(f&512){if(d>>>0<=15){while(1){if(!h){break e}h=h-1|0;e=(r[g|0]<>>0<8;d=d+8|0;g=g+1|0;if(c){continue}break}}if(s[b+24>>1]!=(e|0)){break g}e=0;d=0}c=q[b+32>>2];if(c){q[c+48>>2]=1;q[c+44>>2]=f>>>9&1}c=vl(0,0,0);q[b+24>>2]=c;q[a+48>>2]=c;q[b>>2]=11;c=q[b>>2];continue}h=0}j=z}f=j;break c}q[a+24>>2]=193301;q[b>>2]=29;c=q[b>>2];continue}q[b+20>>2]=256<>2]=c;q[a+48>>2]=c;q[b>>2]=e&8192?9:11;e=0;c=q[b>>2];continue}break}h=0;f=z}q[a+16>>2]=n;q[a+12>>2]=v;q[a+4>>2]=h;q[a>>2]=g;q[b+60>>2]=d;q[b+56>>2]=e;Ea:{if(!((n|0)==(A|0)|t[b>>2]>28?!q[b+40>>2]:0)){if(WP(a,v,A-n|0)){break Ea}n=q[a+16>>2];h=q[a+4>>2]}g=I-h|0;q[a+8>>2]=g+q[a+8>>2];i=A-n|0;q[a+20>>2]=i+q[a+20>>2];q[b+28>>2]=i+q[b+28>>2];if(!(!i|!q[b+8>>2])){d=q[a+12>>2]-i|0;h=q[b+24>>2];c=b;Fa:{if(q[b+16>>2]){h=vl(h,d,i);break Fa}h=Dq(h,d,i)}q[c+24>>2]=h;q[a+48>>2]=h}c=a;a=q[b>>2];q[c+44>>2]=((q[b+60>>2]+((q[b+4>>2]!=0)<<6)|0)+(((a|0)==11)<<7)|0)+((a|0)==19?256:((a|0)==14)<<8);B=f?f:g|i?f:-5;break a}q[b>>2]=30}B=-4}Ii=u+16|0;return B}function Nsa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=0,m=0,n=0,p=0,s=0,t=0,v=0;d=Ii-12128|0;Ii=d;q[d+308>>2]=4183;q[d+304>>2]=4177;Pi(2,1076,1083,d+304|0);q[239665]=a;q[239664]=1;q[d+9048>>2]=4183;q[d+9044>>2]=4177;q[d+9040>>2]=4244;o[d+9052|0]=r[266420];m1(d+9040|0);f=a;e=Jn(1107);if(e){e=r[e|0]==49}else{e=0}o[f+441|0]=e;Ui(d+8016|0,0,1024);Ui(d+6992|0,0,1024);Ui(d+5968|0,0,1024);o[d+5968|0]=46;f=d+4944|0;o[f|0]=0;XH(q[c>>2],f);a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{if((b|0)<2){break j}f=q[((b<<2)+c|0)-4>>2];if(r[f|0]==45){break j}Pj(d+8016|0,f,1024);break i}f=d;e=3834;k:{if(!Jn(3650)){break k}e=Jn(3650)}q[f+288>>2]=e;sj(d+11104|0,1024,4251,d+288|0);q[d+272>>2]=e;sj(d+10080|0,1024,4267,d+272|0);q[d+3604>>2]=d+10080;q[d+3600>>2]=d+11104;yp(d+4944|0,4297,d+9056|0);q[d+3608>>2]=d+9056;if(!bm(d+11104|0)){f=0;e=1;while(1){g=f;f=e;if((e|0)==3){break h}e=f+1|0;h=q[(d+3600|0)+(f<<2)>>2];if(!bm(h)){continue}break}Pj(d+8016|0,h,1024);if(g>>>0<2){break i}break h}Pj(d+8016|0,d+11104|0,1024)}l:{f=fua(d+8016|0,b,c,a+4|0);if(f){if(r[a+442|0]){break l}q[d+244>>2]=f;q[d+240>>2]=d+8016;Pi(5,1076,1122,d+240|0);f=0;break c}XH(d+8016|0,d+5968|0);Pj(d+6992|0,d+5968|0,1024);Pj(d+11104|0,d+5968|0,1024);Zk(d+11104|0,r[d+5968|0]?1161:1177,1024);if(bm(d+11104|0)){Pj(d+6992|0,1192,1024);Zk(d+6992|0,d+11104|0,1024)}yp(d+4944|0,1224,d+11104|0);f=0;e=Rm(q[a+4>>2],1238,0);if(e){yp(d+5968|0,e,d+10080|0);f=d+10080|0}if(bm(d+11104|0)){break g}break f}q[d+260>>2]=f;q[d+256>>2]=d+8016;Pi(4,1076,1122,d+256|0)}f=0;Pi(5,1076,1201,0);break c}if(gv(d+11104|0,d+9056|0)){break f}g=q[d+9056>>2];e=Yi(g);q[d+3600>>2]=0;g=iv(d+11104|0,e,g,d+3600|0);if(g){q[d+228>>2]=g;q[d+224>>2]=d+11104;Pi(4,1076,4311,d+224|0);Ni(e);break f}g=q[d+3600>>2];h=q[d+9056>>2];if((g|0)!=(h|0)){q[d+212>>2]=g;q[d+208>>2]=h;Pi(4,1076,4350,d+208|0);Ni(e);break f}g=YG(e,g);Ni(e);if(!g){break e}}if(!f){break d}if(!bm(f)){break d}if(gv(f,d+9056|0)){break d}g=q[d+9056>>2];e=Yi(g);q[d+3600>>2]=0;g=iv(f,e,g,d+3600|0);if(g){q[d+196>>2]=g;q[d+192>>2]=f;Pi(4,1076,4311,d+192|0);Ni(e);break d}f=q[d+3600>>2];g=q[d+9056>>2];if((f|0)!=(g|0)){q[d+180>>2]=f;q[d+176>>2]=g;Pi(4,1076,4350,d+176|0);Ni(e);break d}f=YG(e,f);Ni(e);if(f){break d}}Pi(2,1076,1263,0)}if((Tj(q[a+4>>2],1288,1)|0)==1){Ba(1314,1742,0)|0}f=r[266420];e=Tj(q[a+4>>2],1743,1);o[d+4936|0]=r[1800];h=q[449];g=d+4928|0;q[g>>2]=q[448];q[g+4>>2]=h;g=q[447];q[d+4920>>2]=q[446];q[d+4924>>2]=g;g=q[445];q[d+4912>>2]=q[444];q[d+4916>>2]=g;g=f&(e|0)!=0;m:{if((b|0)<=0){h=0;break m}h=0;f=0;while(1){e=q[(f<<2)+c>>2];n:{if(!Ik(d+4912|0,e,24)){e=gk(e,61);j=e+1|0;if(!Ik(1861,j,4)){g=1;break n}if(!Ik(1866,j,5)){g=0;break n}q[d+164>>2]=e;q[d+160>>2]=d+4912;Pi(3,1076,1872,d+160|0);break n}if(!Ik(1801,e,11)){l=1;break n}if(!Ik(1824,e,23)){h=1;break n}if(Ik(1848,e,9)){if(Ik(1858,e,2)){break n}}q[69274]=0}f=f+1|0;if((f|0)!=(b|0)){continue}break}}kua();f=d+4904|0;q[f>>2]=0;b=d;if(Tj(q[a+4>>2],1901,1)){Yb();c=0}else{c=16}o[b+4904|0]=c|r[d+4904|0]&239;Ui(d+4640|0,0,264);jv(d+4640|0);b=q[d+4900>>2];if(b){b=qQ(b);o[d+4904|0]=r[d+4904|0]&223|((b|0)!=0)<<5}b=Ui($i(3484),0,3480);q[b+3480>>2]=r[f|0]<<1&126;q[a+412>>2]=b;b=d+4636|0;q[b>>2]=0;q[d+4628>>2]=0;q[d+4632>>2]=0;q[d+4624>>2]=q[a+4>>2];q[d+4628>>2]=0;q[d+4632>>2]=q[a+152>>2];q[b>>2]=q[a+412>>2];b=tsa(d+4624|0);o:{if(b){q[d+144>>2]=b;Pi(5,1076,1933,d+144|0);f=0;break o}b=0;p:{if(!Tj(q[a+4>>2],1970,0)){break p}c=Rm(q[a+4>>2],1996,0);if(c){yp(c,1988,d+9056|0);q[d+360>>2]=d+9056;b=1}if(!(Pj(d+3600|0,183243,1024)>>>0<1024?0:-21)){yp(d+3600|0,1988,d+2576|0);q[(d+360|0)+(b<<2)>>2]=d+2576;b=b+1|0}q:{if(!kv(Rm(q[a+4>>2],2012,2039),d+1552|0)){yp(d+1552|0,1988,d+528|0);q[(d+360|0)+(b<<2)>>2]=d+528;b=b+1|0;break q}if(!b){break p}}f=0;while(1){c=L9(q[(d+360|0)+(f<<2)>>2]);f=f+1|0;if(f>>>0>=b>>>0){break p}if(!c){continue}break}}c=0;j=Rm(q[a+4>>2],2050,0);q[d+520>>2]=0;e=d+504|0;q[e+8>>2]=0;q[e>>2]=5;q[e+4>>2]=2;o[e+12|0]=r[e+12|0]&248;q[e>>2]=dj(Rm(q[a+4>>2],2079,1069),1069)?3:5;q[e+4>>2]=dj(Rm(q[a+4>>2],2115,1069),1069)?1:2;f=r[e+12|0]&-2|g;o[e+12|0]=f;r:{if(!l){b=Tj(q[a+4>>2],2151,0);f=r[e+12|0];if(!b){break r}}c=2}f=f&-3|c;o[e+12|0]=f;b=e;s:{if(!h){c=Tj(q[a+4>>2],2174,0);f=r[e+12|0];g=0;if(!c){break s}}g=4}o[b+12|0]=g|f&251;f=0;q[e+8>>2]=Tj(q[a+4>>2],2204,0)<<20;b=Mi[q[74921]](e)|0;q[a+216>>2]=b;t:{if(!b){Pi(5,1076,2225,0);break t}q[a+468>>2]=Tj(q[a+4>>2],2264,960);q[a+472>>2]=Tj(q[a+4>>2],2278,640);i=+Sm(q[a+4>>2],2293,x(0))*255;u:{if(i<4294967296&i>=0){b=~~i>>>0;break u}b=0}b=b&255;i=+Sm(q[a+4>>2],2316,x(0))*255;v:{if(i<4294967296&i>=0){c=~~i>>>0;break v}c=0}e=b|c<<8&65280;b=a;i=+Sm(q[a+4>>2],2341,x(0))*255;w:{if(i<4294967296&i>=0){c=~~i>>>0;break w}c=0}c=c<<16&16711680|e;i=+Sm(q[a+4>>2],2365,x(0))*255;x:{if(i<4294967296&i>=0){e=~~i>>>0;break x}e=0}c=c|e<<24;q[b+476>>2]=c;b=Rea(d+2576|0);q[b+28>>2]=a;q[b+24>>2]=2;q[b+20>>2]=a;q[b+16>>2]=3;q[b+12>>2]=a;q[b+8>>2]=4;q[b+4>>2]=a;q[b>>2]=5;q[b+32>>2]=q[a+468>>2];q[b+36>>2]=q[a+472>>2];q[b+40>>2]=Tj(q[a+4>>2],2390,0);q[b+44>>2]=Rm(q[a+4>>2],2406,2420);o[b+48|0]=(Tj(q[a+4>>2],2430,0)|0)!=0;o[b+49|0]=(Tj(q[a+4>>2],2449,0)|0)!=0;e=Tj(q[a+4>>2],2477,0);q[b+52>>2]=c;o[b+50|0]=(e|0)!=0;b=Mi[q[74926]](q[a+216>>2],b)|0;if(b){q[d+128>>2]=b;Pi(5,1076,2494,d+128|0);break t}l=Mi[q[74930]](q[a+216>>2])|0;b=Mi[q[74933]](q[a+216>>2])|0;c=Mi[q[74934]](q[a+216>>2])|0;u[a+480>>2]=x(1)/x(b>>>0);u[a+484>>2]=x(1)/x(c>>>0);q[a+464>>2]=Tj(q[a+4>>2],2522,60);q[74607]=c;q[74606]=b;q[a+460>>2]=Tj(q[a+4>>2],2552,0);b=Tj(q[a+4>>2],2577,1);b=(m=Tj(q[a+4>>2],2591,1),n=0,p=b,p?m:n);Mi[q[74941]](q[a+216>>2],(b|0)>0?b:0);b=Tj(q[a+4>>2],q[57741],1024);c=d+1576|0;q[c>>2]=0;q[c+4>>2]=0;c=d+1568|0;q[c>>2]=0;q[c+4>>2]=0;q[d+1560>>2]=0;q[d+1564>>2]=0;P6(d+1552|0);q[d+1556>>2]=0;q[d+1552>>2]=b;y:{if(!r[266420]){break y}q[d+1556>>2]=1;if(!Tj(q[a+4>>2],2613,1)){break y}q[d+1556>>2]=q[d+1556>>2]|4}if(Tj(q[a+4>>2],2633,1)){q[d+1556>>2]=q[d+1556>>2]|8}b=Rm(q[a+4>>2],2652,d+6992|0);q[d+112>>2]=b;Pi(2,1076,2665,d+112|0);b=T6(d+1552|0,b);q[a+288>>2]=b;if(!b){break t}g=a+392|0;q[79288]=0;h=Tj(q[a+4>>2],2687,0);b=yz(q[a+4>>2],q[a+288>>2]);z:{if(h){q[a+272>>2]=b;rv(b);b=q[a+272>>2];q[a+284>>2]=b;q[a+280>>2]=b;q[a+276>>2]=b;if(o[a+404|0]&1){break a}f=a+396|0;Wi(1,4,g,a+400|0,f);e=q[a+396>>2];b=a+272|0;if((e|0)!=q[a+400>>2]){break z}break b}q[a+276>>2]=b;rv(b);b=yz(q[a+4>>2],q[a+288>>2]);q[a+280>>2]=b;rv(b);b=yz(q[a+4>>2],q[a+288>>2]);q[a+284>>2]=b;rv(b);if(o[a+404|0]&1){break a}f=a+396|0;Wi(3,4,g,a+400|0,f);b=q[a+396>>2];if((b|0)==q[a+400>>2]){break b}q[a+396>>2]=b+4;q[b>>2]=q[a+276>>2];b=q[a+396>>2];if((b|0)==q[a+400>>2]){break b}q[a+396>>2]=b+4;q[b>>2]=q[a+280>>2];e=q[a+396>>2];if((e|0)==q[a+400>>2]){break b}b=a+284|0}b=q[b>>2];q[f>>2]=e+4;q[e>>2]=b;N1(d+464|0);o[d+496|0]=0;q[d+464>>2]=2707;A:{if(!S1(q[a+4>>2],d+464|0)){q[d+96>>2]=q[d+464>>2];Pi(2,1076,2715,d+96|0);break A}Pi(3,1076,2745,0)}b=fqa(q[a+152>>2],Tj(q[a+4>>2],q[56652],1024));if(b){q[d+80>>2]=b;Pi(5,1076,2780,d+80|0);f=0;break t}b=q[a+152>>2];c=Tj(q[a+4>>2],q[56653],16);if(!b){J(7178,7192,256,7283);G()}q[b+29104>>2]=c;b=d+528|0;q[b>>2]=0;q[b+4>>2]=0;q[b+40>>2]=1024;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+16>>2]=16;c=Tj(q[a+4>>2],2834,1024);q[b+24>>2]=32;q[b+20>>2]=c;c=Tj(q[a+4>>2],2858,8192);q[b+40>>2]=1024;q[b+36>>2]=c;c=q[a+280>>2];f=0;q[b+44>>2]=0;q[b>>2]=c;q[a+220>>2]=s8(q[a+216>>2],b);xra(q[a+152>>2],q[a+276>>2]);q[a+248>>2]=q[a+288>>2];q[a+252>>2]=q[a+220>>2];q[a+256>>2]=Tj(q[a+4>>2],q[64814],64);q[a+264>>2]=Tj(q[a+4>>2],q[64815],64);b=Tj(q[a+4>>2],q[64816],1024);o[a+268|0]=0;q[a+260>>2]=b;q[d+448>>2]=q[a+412>>2];u[d+452>>2]=Sm(q[a+4>>2],2882,x(.5));u[d+456>>2]=Sm(q[a+4>>2],2901,x(.20000000298023224));b=V9(d+448|0);q[a+416>>2]=b;c=q[a+412>>2];q[c+3468>>2]=b;q[c+3464>>2]=6;Faa(q[a+412>>2]);b=ur(2923,a+296|0);if(b){q[d+68>>2]=b;q[d+64>>2]=2923;Pi(5,1076,2931,d- -64|0);break t}if((Tj(q[a+4>>2],2971,-1)|0)!=-1){Pi(3,1076,2994,0)}rba(d+408|0);b=q[a+284>>2];q[d+424>>2]=7;q[d+420>>2]=8;q[d+416>>2]=9;q[d+412>>2]=10;q[d+408>>2]=b;b=Mi[q[74933]](q[a+216>>2])|0;q[d+432>>2]=Mi[q[74934]](q[a+216>>2]);q[d+428>>2]=b;q[d+436>>2]=q[a+468>>2];b=q[a+472>>2];q[d+444>>2]=l;q[d+440>>2]=b;q[a+292>>2]=Hba(d+408|0);b=W8(d+3600|0);q[b+16>>2]=Tj(q[a+4>>2],3064,4);c=Rm(q[a+4>>2],3084,3097);u[b>>2]=Sm(q[a+4>>2],3100,x(0));u[b+4>>2]=Sm(q[a+4>>2],3118,x(-10));u[b+8>>2]=Sm(q[a+4>>2],3136,x(0));u[b+20>>2]=Sm(q[a+4>>2],3154,x(1));q[b+36>>2]=Tj(q[a+4>>2],3168,64);q[b+40>>2]=Tj(q[a+4>>2],3194,128);q[b+44>>2]=Tj(q[a+4>>2],3220,16);u[b+32>>2]=Sm(q[a+4>>2],3253,x(1));k=u[b+20>>2];B:{if(k>x(1)^1?!(k>2]=0;q[d+60>>2]=1072693248;q[d+48>>2]=1073741824;q[d+52>>2]=1065646817;Pi(3,1076,3280,d+48|0);k=u[b+20>>2];if(!(k>2]=1008981770;break B}if(k>x(1)^1){break B}q[b+20>>2]=1065353216}u[b+24>>2]=Sm(q[a+4>>2],3349,x(0));f=Tj(q[a+4>>2],3379,1);o[b+48|0]=r[b+48|0]&254|(f|0)!=0;C:{if(!tn(c,3412)){o[a+241|0]=1;break C}if(!tn(c,3097)){o[a+241|0]=0;break C}q[d+32>>2]=c;Pi(3,1076,3415,d+32|0);o[a+241|0]=0}q[a+224>>2]=0;q[a+232>>2]=Tj(q[a+4>>2],q[57957],128);q[a+228>>2]=Tj(q[a+4>>2],q[57958],64);q[a+236>>2]=Tj(q[a+4>>2],q[57959],128);f=0;o[a+242|0]=(Tj(q[a+4>>2],q[57960],1)|0)!=0;q[a+244>>2]=Tj(q[a+4>>2],q[57961],2);o[a+240|0]=(Tj(q[a+4>>2],3461,0)|0)!=0;q[a+304>>2]=q[a+220>>2];q[a+308>>2]=Tj(q[a+4>>2],3475,128);b=Tj(q[a+4>>2],3492,1);q[a+348>>2]=q[a+220>>2];q[a+352>>2]=q[a+288>>2];o[a+312|0]=r[a+312|0]&254|b&1;q[a+356>>2]=Tj(q[a+4>>2],3509,128);q[a+360>>2]=q[a+220>>2];q[a+364>>2]=Tj(q[a+4>>2],3525,64);b=Tj(q[a+4>>2],3541,1);q[a+372>>2]=q[a+220>>2];o[a+368|0]=r[a+368|0]&254|b&1;q[a+376>>2]=Tj(q[a+4>>2],3557,16);q[a+380>>2]=Tj(q[a+4>>2],3575,2048);q[a+384>>2]=Tj(q[a+4>>2],3598,32);q[a+388>>2]=Tj(q[a+4>>2],3624,256);q[a+316>>2]=q[a+288>>2];q[a+320>>2]=Tj(q[a+4>>2],q[57956],8);q[a+332>>2]=Tj(q[a+4>>2],q[57962],128);q[a+324>>2]=q[a+288>>2];q[a+344>>2]=Tj(q[a+4>>2],q[57955],128);q[a+336>>2]=q[a+288>>2];b=q[(h?272:276)+a>>2];q[a+328>>2]=b;q[a+340>>2]=b;q[d+392>>2]=0;q[d+396>>2]=0;q[d+400>>2]=0;q[d+404>>2]=0;q[d+384>>2]=0;q[d+388>>2]=0;q[d+396>>2]=-1;q[d+376>>2]=0;q[d+380>>2]=0;HM(a,d+360|0);b=d+336|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;h=Jn(3650);e=Oi(3660);q[d+9056>>2]=q[a+152>>2];c=a+176|0;Em(c,e,Li,d+9056|0);e=Oi(3664);q[d+9056>>2]=q[a+152>>2];Em(c,e,Li,d+9056|0);e=Oi(3676);q[d+9056>>2]=g;Em(c,e,Li,d+9056|0);e=Oi(3681);q[d+9056>>2]=q[a+276>>2];Em(c,e,Li,d+9056|0);if(q[a+292>>2]){e=Oi(3689);q[d+9056>>2]=q[a+284>>2];Em(c,e,Li,d+9056|0);e=Oi(3701);q[d+9056>>2]=q[a+292>>2];Em(c,e,Li,d+9056|0)}D:{if(S6(q[a+288>>2],c)){break D}c=a+224|0;if(Lka(q[a+288>>2],q[a+220>>2],q[a+416>>2],c)){break D}if(Nka(q[a+288>>2],q[a+152>>2],q[a+220>>2],c,a+248|0,a+304|0,a+316|0,a+324|0,a+336|0,a+348|0,a+360|0,a+372|0,a+384|0)){break D}if(Jra(d+360|0)){break D}if(!Lsa(a,q[a+4>>2])){Pi(4,1076,3706,0);break D}q[q[a+292>>2]+172>>2]=q[a+424>>2];Mi[q[74939]](q[a+216>>2]);c=q[a+216>>2];e=Mi[q[74933]](c)|0;n=c,p=0,s=0,t=e,v=Mi[q[74934]](q[a+216>>2])|0,m=q[74985],Mi[m](n|0,p|0,s|0,t|0,v|0);c=q[a+476>>2];Mi[q[74942]](q[a+216>>2],1,c&255,c>>>8&255,c>>>16&255,c>>>24|0,x(1),0);Mi[q[74940]](q[a+216>>2]);Mi[q[74939]](q[a+216>>2]);c=q[a+216>>2];e=Mi[q[74933]](c)|0;v=c,t=0,s=0,p=e,n=Mi[q[74934]](q[a+216>>2])|0,m=q[74985],Mi[m](v|0,t|0,s|0,p|0,n|0);c=q[a+476>>2];Mi[q[74942]](q[a+216>>2],1,c&255,c>>>8&255,c>>>16&255,c>>>24|0,x(1),0);Mi[q[74940]](q[a+216>>2]);Mi[q[74939]](q[a+216>>2]);c=q[a+216>>2];e=Mi[q[74933]](c)|0;n=c,p=0,s=0,t=e,v=Mi[q[74934]](q[a+216>>2])|0,m=q[74985],Mi[m](n|0,p|0,s|0,t|0,v|0);c=q[a+476>>2];Mi[q[74942]](q[a+216>>2],1,c&255,c>>>8&255,c>>>16&255,c>>>24|0,x(1),0);Mi[q[74940]](q[a+216>>2]);E:{c=q[a+428>>2];if(!c){break E}if((Cv(q[c+24>>2],0,0)|0)==1){break E}Pi(5,1076,3737,0);break D}q[b+4>>2]=q[a+288>>2];q[b+8>>2]=q[a+152>>2];q[b+12>>2]=q[a+412>>2];q[b+16>>2]=q[a+216>>2];e=q[a+272>>2];F:{if(e){q[b>>2]=e?q[e+120>>2]:0;if(kB(b)){break F}break D}c=b;g=q[a+276>>2];e=0;G:{if(!g){break G}e=q[g+120>>2]}q[c>>2]=e;if(!kB(b)){break D}c=b;g=q[a+284>>2];e=0;H:{if(!g){break H}e=q[g+120>>2]}q[c>>2]=e;if(!kB(b)){break D}}if(ak(q[a+288>>2],Rm(q[a+4>>2],3777,3803),a+156|0)){break D}Ft(q[a+156>>2]);q[a+208>>2]=0;q[d+16>>2]=h?3827:3834;sj(d+9056|0,512,3835,d+16|0);if(!l1(d+9056|0,d+312|0)){q[a+208>>2]=q[d+328>>2]}if(j){b=Pk(j);f=ko(b,3866,d+9056|0);if(f){e=0;while(1){I:{if(!Vl(q[a+288>>2],f,d+312|0)){cqa(q[a+152>>2],q[d+312>>2],e&65535);e=e+1|0;break I}q[d>>2]=f;Pi(4,1076,3868,d)}f=ko(0,3866,d+9056|0);if(f){continue}break}}Ni(b)}bqa(q[a+152>>2]);q[a+448>>2]=Jk();q[a+452>>2]=Li;f=1}if(o[d+404|0]&1){break t}a=q[d+384>>2];if(a){Ni(a)}a=q[d+376>>2];if(!a){break t}Ni(a)}}a=q[d+4900>>2];if(!a){break c}Ni(a)}Ii=d+12128|0;return f}J(4610,4554,533,4634);G()}J(5088,4554,493,4923);G()}function hN(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,J=0;k=Ii-1776|0;Ii=k;i=Yi(40);q[i>>2]=0;Ui(k+48|0,0,704);q[240588]=0;p=c+1|0;j=ea(1243,p|0)|0;n=q[240588];q[240588]=0;m=962356;g=-1;l=4;a:{if(!n){break a}m=q[240589];if(!m){break a}g=pk(q[n>>2],i,4);if(!g){O(n|0,m|0);G()}L(m|0)}b:{c:{d:{h=M()|0;e:{if((g|0)==1){break e}q[k+32>>2]=j;o[Ti(j,b,c)+c|0]=10;q[240588]=0;q[k+36>>2]=0;q[k+40>>2]=p;q[k+44>>2]=a;q[k+28>>2]=e;q[k+24>>2]=d;x=k+720|0;A=k+728|0;s=k+724|0;ca(1244,128,16,x|0,A|0,s|0);a=q[240588];q[240588]=0;c=-1;f:{if(!a){break f}b=q[240589];if(!b){break f}c=pk(q[a>>2],i,4);if(!c){break d}L(b|0)}E=k+732|0;F=k+24|4;m=k+36|0;y=k+40|0;t=k+32|0;B=k+24|0;h=M()|0;if((c|0)==1){break e}z=k+736|0;g:{h:{i:{j:{D=k+748|0;if(o[D|0]&1){q[240588]=0;P(1245,154810,154885,493,154911);a=q[240588];q[240588]=0;if(!a){break i}b=q[240589];if(!b){break i}if(pk(q[a>>2],i,4)){break j}break d}q[240588]=0;C=k+744|0;u=k+740|0;ca(1244,256,1,z|0,C|0,u|0);a=q[240588];q[240588]=0;c=-1;if(!a){break g}b=q[240589];if(!b){break g}c=pk(q[a>>2],i,4);if(c){break h}break d}L(b|0)}h=M()|0;break e}L(b|0)}h=M()|0;if((c|0)==1){break e}q[k+716>>2]=1;H=k+716|0;i=Vx(k+48|0,1,i,4);l=M()|0;h=0}k:while(1){l:{m:{n:{o:{p:{g=h;if(g){a=q[t>>2];if(!a){break l}q[240588]=0;da(1246,a|0);a=q[240588];q[240588]=0;c=-1;if(!a){break o}b=q[240589];if(!b){break o}c=pk(q[a>>2],i,l);if(c){break p}break d}j=q[y>>2];q[240588]=0;g=-1;n=ea(1243,((j|0)>-1?j:-1)|0)|0;a=q[240588];q[240588]=0;if(!a){break m}b=q[240589];if(!b){break m}g=pk(q[a>>2],i,l);if(g){break n}break d}L(b|0)}h=M()|0;if((c|0)==1){continue}break l}L(b|0)}h=M()|0;if((g|0)==1){continue}a=j-1|0;I=(a|0)>0?a:0;v=k+204|0;while(1){p=q[t>>2];d=1;c=q[m>>2];g=c;b=0;while(1){a=b;e=0;q:{if((g|0)>=(j|0)){break q}c=g+1|0;q[m>>2]=c;b=g+p|0;g=c;e=o[b|0];if((e|0)!=13){break q}while(1){if((c|0)==(j|0)){c=j;g=c;e=0;break q}g=c+1|0;q[m>>2]=g;b=c+p|0;c=g;e=o[b|0];if((e|0)==13){continue}break}}r:{s:{t:{if(d&1){if((e|0)==10){break t}d=0;b=1;if((e|0)==35|(e|0)==59){continue}break s}if((e|0)!=10){break s}}d=1;q[H>>2]=q[H>>2]+1;break r}b=1;d=0;if(a&1){continue}}q[240588]=0;J=ea(1247,e|0)|0;a=q[240588];q[240588]=0;b=-1;u:{if(!a){break u}h=q[240589];if(!h){break u}b=pk(q[a>>2],i,l);if(!b){O(a|0,h|0);G()}L(h|0)}h=M()|0;if((b|0)==1){continue k}b=0;if(J){continue}break}v:{w:{x:{y:{z:{A:{B:{if(!(!e|(c|0)<1)){a=c-1|0;q[m>>2]=a;o[a+p|0]=e;j=q[y>>2];c=q[m>>2]}if((c|0)<(j|0)){a=q[t>>2];q[m>>2]=c+1;b=a+c|0;a=r[b|0];if(!(!a|(c|0)<0)){q[m>>2]=c;o[b|0]=a}if((a|0)==91){q[240588]=0;da(1248,k+24|0);a=q[240588];q[240588]=0;c=-1;if(!a){break v}b=q[240589];if(!b){break v}c=pk(q[a>>2],i,l);if(c){break B}break d}q[240588]=0;a=ea(1249,v|0)|0;b=q[240588];q[240588]=0;g=-1;if(!b){break z}c=q[240589];if(!c){break z}g=pk(q[b>>2],i,l);if(g){break A}break c}q[240588]=0;da(1246,n|0);a=q[240588];q[240588]=0;c=-1;if(!a){break x}b=q[240589];if(!b){break x}c=pk(q[a>>2],i,l);if(c){break y}break d}L(b|0);break v}L(c|0)}h=M()|0;if((g|0)!=1){break w}continue k}L(b|0)}h=M()|0;if((c|0)==1){continue k}C:{if(q[B>>2]<1){break C}g=0;D:{while(1){a=q[q[F>>2]+(g<<2)>>2];q[240588]=0;e=Ca(1250,154774,a|0,9)|0;b=q[240588];q[240588]=0;c=-1;E:{if(!b){break E}d=q[240589];if(!d){break E}c=pk(q[b>>2],i,l);if(!c){break b}L(d|0)}h=M()|0;if((c|0)==1){continue k}F:{G:{if(e){break G}q[240588]=0;e=ra(1251,a|0,61)|0;b=q[240588];q[240588]=0;c=-1;H:{if(!b){break H}d=q[240589];if(!d){break H}c=pk(q[b>>2],i,l);if(!c){break b}L(d|0)}h=M()|0;if((c|0)==1){continue k}q[240588]=0;e=e+1|0;d=ra(1251,e|0,61)|0;b=q[240588];q[240588]=0;c=-1;I:{if(!b){break I}n=q[240589];if(!n){break I}c=pk(q[b>>2],i,l);if(!c){O(b|0,n|0);G()}L(n|0)}h=M()|0;if((c|0)==1){continue k}J:{K:{L:{M:{if(!d){q[240588]=0;q[k+16>>2]=a;P(1252,3,154668,154784,k+16|0);a=q[240588];q[240588]=0;c=-1;if(!a){break L}b=q[240589];if(!b){break L}c=pk(q[a>>2],i,l);if(c){break M}break d}q[240588]=0;p=pb(1253,e|0,d-e|0)|0;n=M()|0;a=q[240588];q[240588]=0;c=-1;if(!a){break J}b=q[240589];if(!b){break J}c=pk(q[a>>2],i,l);if(c){break K}break d}L(b|0)}h=M()|0;if((c|0)==1){continue k}break G}L(b|0)}h=M()|0;if((c|0)==1){continue k}c=q[s>>2];b=q[x>>2];if((c|0)!=(b|0)){if((p|0)==q[b>>2]&(n|0)==q[b+4>>2]){break G}e=1;a=c-b|0;h=(a|0)>-1?a:-1;c=b-c|0;c=w((h|0)<1?h:1,((a|0)<(c|0)?c:a)>>>4|0);c=c>>>0>1?c:1;h=a>>4;while(1){a=e;if((a|0)!=(c|0)){e=a+1|0;j=b+(a<<4)|0;if((p|0)!=q[j>>2]|q[j+4>>2]!=(n|0)){continue}}break}if(a>>>0>>0){break G}}q[240588]=0;d=d+1|0;e=ea(1249,d|0)|0;a=q[240588];q[240588]=0;c=-1;N:{if(!a){break N}b=q[240589];if(!b){break N}c=pk(q[a>>2],i,l);if(!c){break d}L(b|0)}h=M()|0;if((c|0)==1){continue k}b=e+1|0;j=q[C>>2];a=q[u>>2];if(b>>>0>j-a>>>0){O:{P:{Q:{R:{if(o[D|0]&1){q[240588]=0;P(1245,154810,154885,493,154911);a=q[240588];q[240588]=0;if(!a){break Q}b=q[240589];if(!b){break Q}if(pk(q[a>>2],i,l)){break R}break d}a=q[z>>2];q[240588]=0;ca(1244,((b>>>0>1024?b:1024)+j|0)-a|0,1,z|0,C|0,u|0);a=q[240588];q[240588]=0;e=-1;if(!a){break O}c=q[240589];if(!c){break O}e=pk(q[a>>2],i,l);if(e){break P}O(a|0,c|0);G()}L(b|0)}h=M()|0;continue k}L(c|0)}h=M()|0;if((e|0)==1){continue k}j=q[C>>2];a=q[u>>2]}c=a;a=q[z>>2];v=c-a|0;c=v+b|0;S:{T:{U:{V:{W:{X:{Y:{Z:{_:{if(c>>>0>j-a>>>0){q[240588]=0;P(1245,155035,154885,506,155054);a=q[240588];q[240588]=0;if(!a){break Z}b=q[240589];if(!b){break Z}if(pk(q[a>>2],i,l)){break _}break d}q[u>>2]=a+c;if(c>>>0<=v>>>0){q[240588]=0;P(1245,155013,154885,479,155024);a=q[240588];q[240588]=0;if(!a){break X}b=q[240589];if(!b){break X}if(pk(q[a>>2],i,l)){break Y}break d}Ti(a+v|0,d,b);c=q[s>>2];e=q[A>>2];if((c|0)!=(e|0)){break S}if(o[E|0]&1){q[240588]=0;P(1245,154810,154885,493,154911);a=q[240588];q[240588]=0;if(!a){break V}b=q[240589];if(!b){break V}if(pk(q[a>>2],i,l)){break W}break d}a=q[x>>2];q[240588]=0;ca(1244,(e-a>>4)+32|0,16,x|0,A|0,s|0);b=q[240588];q[240588]=0;c=-1;if(!b){break T}d=q[240589];if(!d){break T}c=pk(q[b>>2],i,l);if(c){break U}break b}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(d|0)}h=M()|0;if((c|0)==1){continue k}c=q[s>>2];e=q[A>>2]}if((c|0)==(e|0)){q[240588]=0;P(1245,154984,154885,533,155008);a=q[240588];q[240588]=0;if(!a){break D}b=q[240589];if(!b){break D}if(pk(q[a>>2],i,l)){break F}break d}q[s>>2]=c+16;q[c+8>>2]=v;q[c>>2]=p;q[c+4>>2]=n}g=g+1|0;if((g|0)>2]){continue}break C}break}L(b|0)}h=M()|0;continue k}q[240588]=0;a=ea(1254,32)|0;b=q[240588];q[240588]=0;g=-1;$:{if(!b){break $}c=q[240589];if(!c){break $}g=pk(q[b>>2],i,l);if(!g){break c}L(c|0)}h=M()|0;if((g|0)==1){continue k}q[a>>2]=0;q[a+4>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;b=a+8|0;q[b>>2]=0;q[b+4>>2]=0;aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{na:{oa:{c=q[s>>2]-q[x>>2]|0;if(c){q[240588]=0;ca(1244,c>>4,16,a|0,b|0,a+4|0);b=q[240588];q[240588]=0;g=-1;pa:{if(!b){break pa}c=q[240589];if(!c){break pa}g=pk(q[b>>2],i,l);if(!g){break c}L(c|0)}h=M()|0;if((g|0)==1){continue k}d=q[x>>2];c=q[s>>2]-d|0;e=c>>4;b=q[a>>2];if(e>>>0>q[a+8>>2]-b>>4>>>0){q[240588]=0;P(1245,155035,154885,506,155054);a=q[240588];q[240588]=0;if(!a){break na}b=q[240589];if(!b){break na}if(pk(q[a>>2],i,l)){break oa}break d}q[a+4>>2]=b+(e<<4);if(!c){q[240588]=0;P(1245,155013,154885,479,155024);a=q[240588];q[240588]=0;if(!a){break la}b=q[240589];if(!b){break la}if(pk(q[a>>2],i,l)){break ma}break d}Ti(b,d,c)}b=q[u>>2]-q[z>>2]|0;if(!b){break ga}if(o[a+28|0]&1){q[240588]=0;P(1245,154810,154885,493,154911);a=q[240588];q[240588]=0;if(!a){break ja}b=q[240589];if(!b){break ja}if(pk(q[a>>2],i,l)){break ka}break d}q[240588]=0;ca(1244,b|0,1,a+16|0,a+24|0,a+20|0);b=q[240588];q[240588]=0;e=-1;if(!b){break ha}c=q[240589];if(!c){break ha}e=pk(q[b>>2],i,l);if(e){break ia}break c}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(c|0)}h=M()|0;if((e|0)==1){continue k}d=q[z>>2];b=q[u>>2]-d|0;c=q[a+16>>2];if(b>>>0>q[a+24>>2]-c>>>0){q[240588]=0;P(1245,155035,154885,506,155054);a=q[240588];q[240588]=0;if(!a){break ea}b=q[240589];if(!b){break ea}if(pk(q[a>>2],i,l)){break fa}break d}q[a+20>>2]=b+c;if(!b){q[240588]=0;P(1245,155013,154885,479,155024);a=q[240588];q[240588]=0;if(!a){break ca}b=q[240589];if(!b){break ca}if(pk(q[a>>2],i,l)){break da}break d}Ti(c,d,b)}q[f>>2]=a;a=q[t>>2];if(!a){g=0;break l}g=0;q[240588]=0;da(1246,a|0);a=q[240588];q[240588]=0;c=-1;if(!a){break aa}b=q[240589];if(!b){break aa}c=pk(q[a>>2],i,l);if(c){break ba}break d}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;if((c|0)==1){continue k}break l}Ti(k+752|0,v,a);b=a+(k+752|0)|0;o[b|0]=46;o[b+1|0]=0;q[240588]=0;Pa(1255,k+24|0,b+1|0,1023-a|0);a=q[240588];q[240588]=0;g=-1;qa:{if(!a){break qa}b=q[240589];if(!b){break qa}g=pk(q[a>>2],i,l);if(!g){break d}L(b|0)}h=M()|0;if((g|0)==1){continue k}e=q[m>>2];g=q[y>>2];ra:{sa:{if((e|0)>=(g|0)){break sa}j=q[t>>2];ta:{while(1){c=e+1|0;q[m>>2]=c;e=r[e+j|0];if((e|0)==13){while(1){if((c|0)==(g|0)){c=0;a=g;break ra}a=c+1|0;q[m>>2]=a;b=c+j|0;c=a;e=r[b|0];if((e|0)==13){continue}break}}if((e|0)!=9?(e|0)!=32:0){break ta}e=c;if((c|0)<(g|0)){continue}break}break sa}if((c|0)<1){e=c;break sa}if(!e){e=c;break sa}a=c-1|0;q[m>>2]=a;o[a+j|0]=e;g=q[y>>2];e=q[m>>2]}j=q[t>>2];c=0;if((e|0)>=(g|0)){a=e;break ra}a=e+1|0;q[m>>2]=a;c=o[e+j|0]}ua:{va:{wa:{xa:{ya:{while(1){za:{if((c|0)!=13){if((c|0)==-1){break za}if((c|0)==61){break ya}q[240588]=0;qa(1256,k+24|0,-3);a=q[240588];q[240588]=0;if(!a){break wa}b=q[240589];if(!b){break wa}if(pk(q[a>>2],i,l)){break xa}break d}c=0;if((a|0)>=(g|0)){continue}b=a+1|0;q[m>>2]=b;c=o[a+j|0];a=b;continue}break}q[240588]=0;qa(1256,k+24|0,-4);a=q[240588];q[240588]=0;if(!a){break ua}b=q[240589];if(!b){break ua}if(pk(q[a>>2],i,l)){break va}break d}Aa:{Ba:{Ca:{Da:{Ea:{if((a|0)>=(g|0)){break Ea}Fa:{while(1){c=a+1|0;q[m>>2]=c;e=r[a+j|0];if((e|0)==13){while(1){if((c|0)==(g|0)){a=0;e=g;break Da}a=c+1|0;q[m>>2]=a;b=c+j|0;c=a;e=r[b|0];if((e|0)==13){continue}break}}if((e|0)!=9?(e|0)!=32:0){break Fa}a=c;if((g|0)>(a|0)){continue}break}break Ea}if((c|0)<1){a=c;break Ea}if(!e){a=c;break Ea}a=c-1|0;q[m>>2]=a;o[a+j|0]=e;g=q[y>>2];a=q[m>>2]}j=q[t>>2];if((a|0)>=(g|0)){e=a;a=0;break Da}e=a+1|0;q[m>>2]=e;a=r[a+j|0];if((a|0)==13){while(1){if((e|0)==(g|0)){e=g;a=0;break Da}a=e+1|0;q[m>>2]=a;b=e+j|0;e=a;a=r[b|0];if((a|0)==13){continue}break}}b=0;if((a|0)==10){break Ca}}b=0;while(1){o[b+n|0]=a;if((b|0)==(I|0)){q[240588]=0;qa(1256,k+24|0,-2);a=q[240588];q[240588]=0;if(!a){break Aa}b=q[240589];if(!b){break Aa}if(pk(q[a>>2],i,l)){break Ba}break d}Ga:{if((e|0)>=(g|0)){a=0;break Ga}c=e+1|0;q[m>>2]=c;a=e+j|0;e=c;a=o[a|0];if((a|0)!=13){break Ga}while(1){if((c|0)==(g|0)){e=g;a=0;break Ga}e=c+1|0;q[m>>2]=e;a=c+j|0;c=e;a=o[a|0];if((a|0)==13){continue}break}}b=b+1|0;if((a|0)!=10){continue}break}}if((e|0)>=1){a=e-1|0;q[m>>2]=a;o[a+j|0]=10}c=0;o[b+n|0]=0;d=q[B>>2];a=n;Ha:{if((d|0)<1){break Ha}while(1){a=q[q[F>>2]+(c<<2)>>2];q[240588]=0;j=Ca(1250,154774,a|0,9)|0;b=q[240588];q[240588]=0;g=-1;Ia:{if(!b){break Ia}e=q[240589];if(!e){break Ia}g=pk(q[b>>2],i,l);if(!g){O(b|0,e|0);G()}L(e|0)}h=M()|0;if((g|0)==1){continue k}Ja:{if(j){break Ja}q[240588]=0;j=ra(1251,a|0,61)|0;b=q[240588];q[240588]=0;g=-1;Ka:{if(!b){break Ka}e=q[240589];if(!e){break Ka}g=pk(q[b>>2],i,l);if(!g){O(b|0,e|0);G()}L(e|0)}h=M()|0;if((g|0)==1){continue k}q[240588]=0;j=j+1|0;b=ra(1251,j|0,61)|0;e=q[240588];q[240588]=0;g=-1;La:{if(!e){break La}h=q[240589];if(!h){break La}g=pk(q[e>>2],i,l);if(!g){O(e|0,h|0);G()}L(h|0)}h=M()|0;if((g|0)==1){continue k}Ma:{Na:{Oa:{Pa:{Qa:{Ra:{if(b){q[240588]=0;j=Ca(1250,k+752|0,j|0,b-j|0)|0;a=q[240588];q[240588]=0;g=-1;if(!a){break Qa}e=q[240589];if(!e){break Qa}g=pk(q[a>>2],i,l);if(g){break Ra}O(a|0,e|0);G()}q[240588]=0;q[k>>2]=a;P(1252,3,154668,154784,k|0);a=q[240588];q[240588]=0;g=-1;if(!a){break Oa}b=q[240589];if(!b){break Oa}g=pk(q[a>>2],i,l);if(g){break Pa}break d}L(e|0)}h=M()|0;if((g|0)!=1){break Na}continue k}L(b|0)}h=M()|0;if((g|0)!=1){break Ma}continue k}if(j){break Ja}a=b+1|0;break Ha}d=q[B>>2]}c=c+1|0;if((d|0)>(c|0)){continue}break}a=n}q[240588]=0;Pa(1257,k+24|0,k+752|0,a|0);a=q[240588];q[240588]=0;c=-1;Sa:{if(!a){break Sa}b=q[240589];if(!b){break Sa}c=pk(q[a>>2],i,l);if(!c){break d}L(b|0)}break v}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}L(b|0)}h=M()|0;continue k}h=M()|0;if((c|0)==1){continue k}j=q[y>>2];continue}}Ta:{if(o[D|0]&1){break Ta}a=q[k+736>>2];if(!a){break Ta}q[240588]=0;da(1246,a|0);a=q[240588];q[240588]=0;c=-1;Ua:{if(!a){break Ua}b=q[240589];if(!b){break Ua}c=pk(q[a>>2],i,l);if(!c){break d}L(b|0)}h=M()|0;if((c|0)==1){continue}}Va:{if(o[E|0]&1){break Va}a=q[k+720>>2];if(!a){break Va}q[240588]=0;da(1246,a|0);a=q[240588];q[240588]=0;c=-1;Wa:{if(!a){break Wa}b=q[240589];if(!b){break Wa}c=pk(q[a>>2],i,l);if(!c){break d}L(b|0)}h=M()|0;if((c|0)==1){continue}}break}Ni(i);Ii=k+1776|0;return g}O(a|0,b|0);G()}O(b|0,c|0);G()}O(b|0,d|0);G()}function Tn(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;h=Ii+ -64|0;Ii=h;m=r[a|0]&127;a:{if((m|0)==69){break a}y=r[m+103008|0];q[b+104>>2]=y;m=q[((y<<3)+99152|0)+4>>2];q[h+60>>2]=m;if((y|0)==8){o[b+112|0]=wl(a,h+60|0,8);o[b+113|0]=wl(a,h+60|0,8);o[b+114|0]=wl(a,h+60|0,8);o[b+115|0]=wl(a,h+60|0,8);e=1;if(!d){break a}o[b+118|0]=0;o[b+119|0]=(Xt(a,h+60|0)|0)!=0;c=wl(a,h+60|0,3);q[b+124>>2]=0;q[b+120>>2]=c;q[b+136>>2]=wl(a,h+60|0,2);q[b+140>>2]=wl(a,h+60|0,5);q[b+144>>2]=wl(a,h+60|0,5);a=wl(a,h+60|0,5);q[b+128>>2]=0;q[b+132>>2]=0;q[b+148>>2]=a;break a}b:{if(d){o[b+116|0]=(Xt(a,h+60|0)|0)!=0;d=b;g=7424>>>y&1;if(g){n=0}else{n=(Xt(a,h+60|0)|0)!=0}o[d+117|0]=n;o[b+118|0]=(Xt(a,h+60|0)|0)!=0;o[b+119|0]=(Xt(a,h+60|0)|0)!=0;q[b+120>>2]=wl(a,h+60|0,3);q[b+124>>2]=wl(a,h+60|0,3);d=b;if(g){n=0}else{n=wl(a,h+60|0,5)}q[d+128>>2]=n;if(y-8>>>0<=9){q[b+132>>2]=wl(a,h+60|0,8);break b}q[b+132>>2]=0;break b}q[h+60>>2]=m+r[y+103136|0]}n=1;c:{d:{e:{f:{u=y>>>0>16;m=1;g:{h:{i:{if(u){break i}if(!(1<>2]=d;n=0;break h}q[b+108>>2]=wl(a,h+60|0,5);n=0;m=2}j:{d=0;k:{if(u){break k}if(!(1<>2];if(d>>>0>18){break a}d=w(d,6)+97714|0;break g}d=q[b+108>>2];if(d>>>0>29){break a}d=s[(w(d,6)+97520|0)+2>>1]}e=d;t=1;switch(y-6|0){case 11:break e;case 0:case 5:case 7:break f;default:break c}}d=q[b+108>>2];g=m}if(d>>>0>10){break a}m=g;d=w(d,6)+97842|0}e=s[d>>1];t=1;break c}q[b+16>>2]=wl(a,h+60|0,2);t=2;break d}q[b+16>>2]=3;t=2}C=1}q[b+4>>2]=m;o[b+20|0]=C;q[b+8>>2]=e&65535;q[b+12>>2]=r[y+103168|0];q[b>>2]=r[y+99344|0];A=r[y+99376|0];f=q[w(A,12)+99504>>2];B=r[y+99472|0];v=w(B,m);k=v<<1;l:{m:{n:{o:{g=1497965>>>A&1;p:{if(!g){z=3;e=4;d=5;break p}if(1797559>>>A&1){break o}z=5;e=2;d=3}e=e+k|0;u=(e>>>0)/(d>>>0)|0;l=d>>>0>e>>>0;if(l){break n}i=g?7:8;e=u-1|0;j=k-w(e,d)|0;x=(j|0)==1;if(!g){if(x){g=0;while(1){q[(h+16|0)+(g<<2)>>2]=wl(a,h+60|0,(e|0)==(g|0)?2:i);g=g+1|0;if((u|0)!=(g|0)){continue}break}break n}x=j-2|0;D=(x<<2)+111140|0;g=0;while(1){j=(e|0)==(g|0)?8:i;q[(h+16|0)+(g<<2)>>2]=wl(a,h+60|0,(e|0)!=(g|0)|x>>>0>2?j:q[D>>2]);g=g+1|0;if((u|0)!=(g|0)){continue}break}break n}if(!(1797559>>>A&1)){j=x?3:(j|0)==2?5:7;g=0;while(1){q[(h+16|0)+(g<<2)>>2]=wl(a,h+60|0,(e|0)==(g|0)?j:i);g=g+1|0;if((u|0)!=(g|0)){continue}break}break n}g=0;if((j|0)==1){while(1){q[(h+16|0)+(g<<2)>>2]=wl(a,h+60|0,(e|0)==(g|0)?7:i);g=g+1|0;if((u|0)!=(g|0)){continue}break n}}while(1){q[(h+16|0)+(g<<2)>>2]=wl(a,h+60|0,(e|0)==(g|0)?7:i);g=g+1|0;if((u|0)!=(g|0)){continue}break}break n}if(k){break m}break l}if(!k){break l}if(l){break m}j=v<<1;k=0;e=0;g=0;i=0;while(1){q:{v=wl(a,h+60|0,f);if(!e){if(i>>>0>=u>>>0){break q}k=q[(h+16|0)+(i<<2)>>2];i=i+1|0;e=d}l=k;k=(k>>>0)/(z>>>0)|0;o[(b+g|0)+21|0]=v|l-w(z,k)<>2],h+12|0);r:{if((y|0)==18){o[b+39|0]=Gm(a,h+60|0,i-1|0);o[b+40|0]=Gm(a,h+60|0,i);o[b+41|0]=Gm(a,h+60|0,i);o[b+42|0]=Gm(a,h+60|0,i);o[b+43|0]=Gm(a,h+60|0,i);o[b+44|0]=Gm(a,h+60|0,i);o[b+45|0]=Gm(a,h+60|0,i);o[b+46|0]=Gm(a,h+60|0,i);o[b+47|0]=Gm(a,h+60|0,i);o[b+48|0]=Gm(a,h+60|0,i);o[b+49|0]=Gm(a,h+60|0,i);o[b+50|0]=Gm(a,h+60|0,i);o[b+51|0]=Gm(a,h+60|0,i);o[b+52|0]=Gm(a,h+60|0,i);o[b+53|0]=Gm(a,h+60|0,i);o[b+54|0]=Gm(a,h+60|0,i);break r}d=a;a=128-q[h+60>>2]|0;g=twa(d,h+60|0,(a|0)>64?64:a);a=Li;q[h+60>>2]=0;k=-1<>>0>=32?a>>>n|0:((1<>>n);f=d<<1;d=f&31;o[b+41|0]=k&((f&63)>>>0>=32?a>>>d|0:((1<>>d);f=f+i|0;e=f&31;o[b+42|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+43|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+44|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+45|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+46|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+47|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+48|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+49|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+50|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+51|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+52|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+53|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+54|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+55|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+56|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+57|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+58|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+59|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+60|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+61|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+62|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+63|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b- -64|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+65|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+66|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+67|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+68|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+69|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);e=f+i|0;d=e&31;o[b+70|0]=((e&63)>>>0>=32?a>>>d|0:((1<>>d)&k;q[h+60>>2]=e+i;break r}if(n){if(33793>>>y&1){e=g;o[b+39|0]=e&7;o[b+54|0]=a>>>27&15;o[b+53|0]=a>>>23&15;o[b+52|0]=a>>>19&15;o[b+51|0]=a>>>15&15;o[b+50|0]=a>>>11&15;o[b+49|0]=a>>>7&15;o[b+48|0]=a>>>3&15;o[b+47|0]=((a&2147483647)<<1|e>>>31)&15;o[b+46|0]=e>>>27&15;o[b+45|0]=e>>>23&15;o[b+44|0]=e>>>19&15;o[b+43|0]=e>>>15&15;o[b+42|0]=e>>>11&15;o[b+41|0]=e>>>7&15;o[b+40|0]=e>>>3&15;break r}o[b+39|0]=g&f;f=d&31;o[b+40|0]=k&((d&63)>>>0>=32?a>>>f|0:((1<>>f);f=d+i|0;d=f&31;o[b+41|0]=k&((f&63)>>>0>=32?a>>>d|0:((1<>>d);f=f+i|0;e=f&31;o[b+42|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+43|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+44|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+45|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+46|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+47|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+48|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+49|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+50|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+51|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+52|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);f=f+i|0;e=f&31;o[b+53|0]=k&((f&63)>>>0>=32?a>>>e|0:((1<>>e);e=f+i|0;d=e&31;o[b+54|0]=((e&63)>>>0>=32?a>>>d|0:((1<>>d)&k;q[h+60>>2]=e+i;break r}u=r[e+2|0];n=r[e|0];z=r[e+1|0];j=!u|(!n|!z);o[b+39|0]=(j?f:k)&g;l=j?d:i;j=l&31;v=(n|0)==1|(z|0)==1|(u|0)==1;o[b+40|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==2|(z|0)==2|(u|0)==2;o[b+41|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==3|(z|0)==3|(u|0)==3;o[b+42|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==4|(z|0)==4|(u|0)==4;o[b+43|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==5|(z|0)==5|(u|0)==5;o[b+44|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==6|(z|0)==6|(u|0)==6;o[b+45|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==7|(z|0)==7|(u|0)==7;o[b+46|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==8|(z|0)==8|(u|0)==8;o[b+47|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==9|(z|0)==9|(u|0)==9;o[b+48|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==10|(z|0)==10|(u|0)==10;o[b+49|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==11|(z|0)==11|(u|0)==11;o[b+50|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);l=l+(v?d:i)|0;j=l&31;x=(n|0)==12|(z|0)==12|(u|0)==12;o[b+51|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);l=l+(x?d:i)|0;j=l&31;v=(n|0)==13|(z|0)==13|(u|0)==13;o[b+52|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(v?f:k);v=l+(v?d:i)|0;l=v;j=l&31;x=(n|0)==14|(z|0)==14|(u|0)==14;o[b+53|0]=((l&63)>>>0>=32?a>>>j|0:((1<>>j)&(x?f:k);e=(n|0)==15|(z|0)==15|(u|0)==15;u=g;n=l+(x?d:i)|0;g=n&31;o[b+54|0]=((n&63)>>>0>=32?a>>>g|0:((1<>>g)&(e?f:k);q[h+60>>2]=n+(e?d:i)}s:{if(!c|y-15>>>0<3){break s}c=0;o[h+10|0]=0;p[h+8>>1]=0;e=B>>>0>1?B:1;u=A<<9;d=b+21|0;k=0;t:{while(1){a=u+302480|0;y=w(c,B);f=y<<1;g=f+d|0;if((r[a+(r[g+3|0]<<1)|0]+r[a+(r[d+(f|1)|0]<<1)|0]|0)+r[a+(r[g+5|0]<<1)|0]>>>0>>0){a=0;while(1){g=a+y<<1;Fx(g+d|0,d+(g|1)|0);a=a+1|0;if((e|0)!=(a|0)){continue}break}k=1;o[(h+8|0)+c|0]=1;c=c+1|0;if((m|0)!=(c|0)){continue}break t}c=c+1|0;if((m|0)!=(c|0)){continue}break}if(!(k&1)){break s}}a=-1<>2];d=r[r[c|0]+(h+8|0)|0];if(!C){if(d){o[b+39|0]=a-r[b+39|0]}if(r[r[c+1|0]+(h+8|0)|0]){d=b+t|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+2|0]+(h+8|0)|0]){d=(t<<1)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+3|0]+(h+8|0)|0]){d=w(t,3)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+4|0]+(h+8|0)|0]){d=(t<<2)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+5|0]+(h+8|0)|0]){d=w(t,5)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+6|0]+(h+8|0)|0]){d=w(t,6)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+7|0]+(h+8|0)|0]){d=w(t,7)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+8|0]+(h+8|0)|0]){d=(t<<3)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+9|0]+(h+8|0)|0]){d=w(t,9)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+10|0]+(h+8|0)|0]){d=w(t,10)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+11|0]+(h+8|0)|0]){d=w(t,11)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+12|0]+(h+8|0)|0]){d=w(t,12)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+13|0]+(h+8|0)|0]){d=w(t,13)+b|0;o[d+39|0]=a-r[d+39|0]}if(r[r[c+14|0]+(h+8|0)|0]){d=w(t,14)+b|0;o[d+39|0]=a-r[d+39|0]}if(!r[r[c+15|0]+(h+8|0)|0]){break s}b=w(t,15)+b|0;o[b+39|0]=a-r[b+39|0];break s}if(d){o[b+39|0]=a-r[b+39|0];o[b+40|0]=a-r[b+40|0]}if(r[r[c+1|0]+(h+8|0)|0]){d=b+t|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+2|0]+(h+8|0)|0]){d=b+39|0;m=t<<1;g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+3|0]+(h+8|0)|0]){d=w(t,3)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+4|0]+(h+8|0)|0]){d=b+39|0;m=t<<2;g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+5|0]+(h+8|0)|0]){d=w(t,5)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+6|0]+(h+8|0)|0]){d=b+39|0;m=w(t,6);g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+7|0]+(h+8|0)|0]){d=w(t,7)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+8|0]+(h+8|0)|0]){d=b+39|0;m=t<<3;g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+9|0]+(h+8|0)|0]){d=w(t,9)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+10|0]+(h+8|0)|0]){d=b+39|0;m=w(t,10);g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+11|0]+(h+8|0)|0]){d=w(t,11)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+12|0]+(h+8|0)|0]){d=b+39|0;m=w(t,12);g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(r[r[c+13|0]+(h+8|0)|0]){d=w(t,13)+b|0;o[d+39|0]=a-r[d+39|0];o[d+40|0]=a-r[d+40|0]}if(r[r[c+14|0]+(h+8|0)|0]){d=b+39|0;m=w(t,14);g=d+m|0;o[g|0]=a-r[g|0];d=d+(m|1)|0;o[d|0]=a-r[d|0]}if(!r[r[c+15|0]+(h+8|0)|0]){break s}b=w(t,15)+b|0;o[b+39|0]=a-r[b+39|0];o[b+40|0]=a-r[b+40|0]}e=1}Ii=h- -64|0;return e}function Eka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=x(0),i=0,j=0,k=0,l=x(0),m=x(0),n=x(0),t=0,v=x(0),y=x(0),z=0,A=0,B=x(0),C=x(0),D=0,E=0,F=x(0),H=0,I=0,K=0,L=0,M=0,N=0,O=x(0),P=0,Q=0,R=0,S=x(0),T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=x(0),pa=0,qa=0,ra=0,sa=0;b=Ii-352|0;Ii=b;i=q[a+4>>2];a:{b:{c:{d:{e:{f:{g:{switch(q[a+8>>2]){case 0:q[i+84>>2]=0;q[i+96>>2]=q[i+92>>2];q[i+124>>2]=q[i+120>>2];break f;case 2:c=q[i+92>>2];a=q[i+96>>2]-c|0;if(a){Mi[q[74945]](q[i+88>>2],a,c,1);c=q[i+112>>2];q[73410]=c+q[73410];q[b+56>>2]=c;q[b+60>>2]=0;q[b+24>>2]=c;q[b+28>>2]=0;q[73432]=a+q[73432];q[b+48>>2]=a;q[b+52>>2]=0;q[b+16>>2]=a;q[b+20>>2]=0}c=q[i+120>>2];a=q[i+124>>2]-c|0;if(!a){break f}Mi[q[74950]](q[i+100>>2],a,c,1);q[73454]=a+q[73454];q[b+40>>2]=a;q[b+44>>2]=0;q[b+8>>2]=a;q[b+12>>2]=0;break f;default:J(53753,53126,1249,53813);G();case 1:break g}}$=q[a+20>>2];pa=q[a>>2];aa=q[a+12>>2];M=q[a+16>>2];q[b+168>>2]=0;P=q[(w(q[M>>2],48)+aa|0)+16>>2];Q=q[i>>2];if(P>>>0>=(q[i+4>>2]-Q|0)/240>>>0){break a}if(!(r[(w(P,240)+Q|0)+234|0]&4)){break b}a=w(P,240)+Q|0;V=q[a+188>>2];W=q[a+196>>2];if(!W){W=q[V+4>>2]}a=q[i+84>>2];c=i+60|0;d=q[i+52>>2];if((a|0)==q[c>>2]-d>>2){if(o[i- -64|0]&1){break c}Wi(a+1|0,4,i+52|0,c,i+56|0);c=$i(304);fn(c);a=q[i+56>>2];if((a|0)==q[i+60>>2]){break d}q[i+56>>2]=a+4;q[a>>2]=c;d=q[i+52>>2];a=q[i+84>>2]}q[i+84>>2]=a+1;if(q[i+56>>2]-d>>2>>>0<=a>>>0){break a}z=q[(a<<2)+d>>2];a=q[(w(P,240)+Q|0)+200>>2];if(!a){a=q[V+8>>2]}N=q[a>>2];ba=q[N+16>>2];t=Mi[q[74962]](ba)|0;q[b+192>>2]=q[N+52>>2];q[b+336>>2]=(q[N+56>>2]-q[N+52>>2]|0)/48;a=q[b+336>>2];a=a>>>0<8?a:8;o[b+160|0]=a;if(a){a=0;while(1){c=(b- -64|0)+w(a,12)|0;q[c>>2]=q[b+192>>2]+w(a,48);MH(N,a,c+4|0,c+8|0);a=a+1|0;if(a>>>0>2];j=q[i+96>>2];q[b+296>>2]=0;a=q[i+104>>2];c=r[i+128|0];Ui(b+192|0,0,100);h:{if((M|0)==($|0)){c=T;break h}qa=c&1?2:4;ca=w(t,15);da=w(t,14);ea=w(t,13);fa=w(t,12);ga=w(t,11);ha=w(t,10);ia=w(t,9);ja=t<<3;ka=w(t,7);la=w(t,6);ma=w(t,5);X=t<<2;Y=w(t,3);Z=t<<1;ra=t<<4;c=T;while(1){i:{j:{k:{f=q[(w(q[M>>2],48)+aa|0)+16>>2];a=q[i>>2];if(f>>>0<(q[i+4>>2]-a|0)/240>>>0){d=a+w(f,240)|0;a=q[d+188>>2];E=q[d+184>>2];H=q[d+196>>2];if(!H){H=q[a+4>>2]}k=q[H+64>>2];R=q[k+96>>2];I=q[k+76>>2];K=q[k+4>>2];a=q[a>>2];na=q[a- -64>>2];l:{if(!na){e=b- -64|0;break l}sa=q[a+60>>2];g=r[b+160|0];o[b+288|0]=g;D=0;e=b+192|0;if(!g){break l}while(1){A=w(D,12);f=A+(b- -64|0)|0;a=q[f>>2];U=q[a+8>>2];_=q[a+12>>2];a=0;m:{n:{while(1){L=w(a,48)+sa|0;if((U|0)==q[L+8>>2]&(_|0)==q[L+12>>2]){break n}a=a+1|0;if((na|0)!=(a|0)){continue}break}a=A+(b+192|0)|0;A=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=A;q[a+8>>2]=q[f+8>>2];break m}_=q[f+4>>2];U=A+(b+192|0)|0;A=U;q[A>>2]=q[f>>2];q[A+4>>2]=_;A=A+8|0;q[A>>2]=q[f+8>>2];if((a|0)<0){break m}q[U+4>>2]=q[L+36>>2];q[A>>2]=q[L+40>>2];g=r[b+160|0]}D=D+1|0;if(D>>>0>>0){continue}break}}f=j-q[i+92>>2]|0;a=(f>>>0)/(t>>>0)|0;f=f-w(a,t)|0;j=f?(t-f|0)+j|0:j;f=a+((f|0)!=0)|0;if(q[k+72>>2]){a=K+w(E,40)|0;D=q[I+(q[d+216>>2]+q[a+12>>2]<<2)>>2];H=q[k+64>>2]+(D<<5)|0;E=q[H+12>>2];k=E>>>1|0;if(k){g=s[d+234>>1];I=q[a+28>>2]^g>>>5&1;a=q[a+32>>2]^g>>>6&1;g=(I|0)==(a|0);K=g?2:-2;h=x((a?-1:1)|0);v=x((I?-1:1)|0);I=d+80|0;a=q[H+8>>2];d=(E&-2)<<2;a=g?a:(d+a|0)-8|0;E=q[H+16>>2];d=g?E:(d+E|0)-8|0;y=x(r[R+(D<<2)|0]);g=0;while(1){B=u[a>>2];m=u[a+4>>2];q[b+344>>2]=0;u[b+340>>2]=m*h;u[b+336>>2]=B*v;Kk(j+w(g,t)|0,b+336|0,I,d,y,e);D=K<<2;d=D+d|0;a=a+D|0;g=g+1|0;if((k|0)!=(g|0)){continue}break}}e=q[H+24>>2];d=q[H+28>>2];o:{p:{q:{if(o[i+128|0]&1){if(d){break q}d=0;a=w(k,t);break i}if(d){break p}d=0;a=w(k,t);break i}a=0;while(1){p[(a<<1)+c>>1]=f+q[e+(a<<2)>>2];a=a+1|0;if((d|0)!=(a|0)){continue}break}break o}a=0;while(1){g=a<<2;q[g+c>>2]=f+q[e+g>>2];a=a+1|0;if((d|0)!=(a|0)){continue}break}d=q[H+28>>2]}a=w(k,t);break i}a=K+w(E,40)|0;K=q[a+32>>2];A=s[d+234>>1];L=A>>>6&1;g=(K|0)==(L|0);D=A>>>5&1;E=q[a+28>>2];a=q[d+216>>2]+q[a+12>>2]|0;k=q[k+48>>2]+(a<<5)|0;R=q[R+(q[I+(a<<2)>>2]<<2)>>2];a=d+80|0;r:{s:{if(A&512){h=u[d+64>>2];oa=h>x(.0010000000474974513)?x(x(1)/h):x(0);h=u[d+68>>2];S=h>x(.0010000000474974513)?x(x(1)/h):x(0);I=r[i+128|0];d=q[q[d+188>>2]>>2];l=u[d+28>>2];F=u[d+24>>2];C=u[d+20>>2];n=u[d+16>>2];d=q[H+48>>2];y=x(x(1)/x(Mi[q[75014]](q[d>>2],q[d+4>>2])>>>0));d=q[H+48>>2];B=x(x(1)/x(Mi[q[75015]](q[d>>2],q[d+4>>2])>>>0));h=u[k+12>>2];t:{u:{m=u[k>>2];O=u[k+8>>2];if(m==O){break u}v=u[k+20>>2];if(v==h){break u}g=(D|0)==(E|0);d=(K|0)==(L|0);u[(b+336|(d?0:12))>>2]=m;u[(b+336|(d?4:8))>>2]=x(l*y)+m;u[(b+336|(d?8:4))>>2]=O-x(C*y);u[(b+336|(d?12:0))>>2]=O;d=(D|0)==(E|0);h=u[k+4>>2];u[(b+320|(d?0:12))>>2]=h;u[(b+320|(d?4:8))>>2]=h-x(n*B);y=x(x(F*B)+v);h=v;d=1;break t}d=(D|0)==(E|0);u[(b+336|(d?0:12))>>2]=m;u[(b+336|(d?4:8))>>2]=x(n*y)+m;v=u[k+16>>2];u[(b+336|(d?8:4))>>2]=v-x(F*y);u[(b+336|(d?12:0))>>2]=v;d=(K|0)==(L|0);v=u[k+4>>2];u[(b+320|(d?0:12))>>2]=v;u[(b+320|(d?4:8))>>2]=v+x(l*B);y=x(h-x(C*B));d=0}k=I&1;u[(b+320|(g?8:4))>>2]=y;u[(b+320|(g?12:0))>>2]=h;O=x(S*l);n=x(oa*n);S=x(x(1)-x(S*C));C=x(x(1)-x(oa*F));h=x((R&255)>>>0);if(!d){break s}v=u[b+332>>2];y=u[b+328>>2];B=u[b+324>>2];m=u[b+320>>2];q[b+312>>2]=0;q[b+304>>2]=-1090519040;q[b+308>>2]=-1090519040;u[b+180>>2]=m;l=u[b+336>>2];u[b+176>>2]=l;Kk(j,b+304|0,a,b+176|0,h,e);q[b+308>>2]=-1090519040;q[b+312>>2]=0;F=x(n+x(-.5));u[b+304>>2]=F;u[b+180>>2]=B;u[b+176>>2]=l;Kk(j+t|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=-1090519040;q[b+312>>2]=0;C=x(C+x(-.5));u[b+304>>2]=C;u[b+180>>2]=y;u[b+176>>2]=l;Kk(j+Z|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=1056964608;q[b+308>>2]=-1090519040;u[b+180>>2]=v;u[b+176>>2]=l;Kk(j+Y|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;l=x(O+x(-.5));u[b+308>>2]=l;q[b+304>>2]=-1090519040;u[b+180>>2]=m;n=u[b+340>>2];u[b+176>>2]=n;Kk(j+X|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=F;u[b+180>>2]=B;u[b+176>>2]=n;Kk(j+ma|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=C;u[b+180>>2]=y;u[b+176>>2]=n;Kk(j+la|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;q[b+304>>2]=1056964608;u[b+180>>2]=v;u[b+176>>2]=n;Kk(j+ka|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;l=x(S+x(-.5));u[b+308>>2]=l;q[b+304>>2]=-1090519040;u[b+180>>2]=m;n=u[b+344>>2];u[b+176>>2]=n;Kk(j+ja|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=F;u[b+180>>2]=B;u[b+176>>2]=n;Kk(j+ia|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=C;u[b+180>>2]=y;u[b+176>>2]=n;Kk(j+ha|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;q[b+304>>2]=1056964608;u[b+180>>2]=v;u[b+176>>2]=n;Kk(j+ga|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=-1090519040;q[b+308>>2]=1056964608;u[b+180>>2]=m;m=u[b+348>>2];u[b+176>>2]=m;Kk(j+fa|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=1056964608;q[b+312>>2]=0;u[b+304>>2]=F;u[b+180>>2]=B;u[b+176>>2]=m;Kk(j+ea|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=1056964608;q[b+312>>2]=0;u[b+304>>2]=C;u[b+180>>2]=y;u[b+176>>2]=m;Kk(j+da|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=1056964608;q[b+308>>2]=1056964608;u[b+180>>2]=v;u[b+176>>2]=m;Kk(j+ca|0,b+304|0,a,b+176|0,h,e);if(!k){break r}break k}q[b+344>>2]=0;q[b+336>>2]=-1090519040;q[b+340>>2]=-1090519040;q[b+328>>2]=0;q[b+320>>2]=-1090519040;q[b+324>>2]=1056964608;q[b+312>>2]=0;q[b+304>>2]=1056964608;q[b+308>>2]=1056964608;q[b+184>>2]=0;q[b+176>>2]=1056964608;q[b+180>>2]=-1090519040;d=(D|0)!=(E|0);d=w(g?d:d|2,24)+53952|0;h=x((R&255)>>>0);Kk(j,b+336|0,a,k+(q[d>>2]<<3)|0,h,e);Kk(j+t|0,b+320|0,a,k+(q[d+4>>2]<<3)|0,h,e);Kk(j+Z|0,b+304|0,a,k+(q[d+8>>2]<<3)|0,h,e);Kk(j+Y|0,b+176|0,a,k+(q[d+16>>2]<<3)|0,h,e);v:{if(o[i+128|0]&1){p[c+10>>1]=f;p[c>>1]=f;p[c+8>>1]=f+3;a=f+2|0;p[c+6>>1]=a;p[c+4>>1]=a;p[c+2>>1]=f+1;break v}q[c+20>>2]=f;q[c>>2]=f;q[c+16>>2]=f+3;a=f+2|0;q[c+12>>2]=a;q[c+8>>2]=a;q[c+4>>2]=f+1}d=6;k=4;a=X;break i}v=u[b+348>>2];y=u[b+344>>2];B=u[b+340>>2];m=u[b+336>>2];q[b+312>>2]=0;q[b+304>>2]=-1090519040;q[b+308>>2]=-1090519040;u[b+176>>2]=m;l=u[b+320>>2];u[b+180>>2]=l;Kk(j,b+304|0,a,b+176|0,h,e);q[b+308>>2]=-1090519040;q[b+312>>2]=0;F=x(n+x(-.5));u[b+304>>2]=F;u[b+180>>2]=l;u[b+176>>2]=B;Kk(j+t|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=-1090519040;q[b+312>>2]=0;C=x(C+x(-.5));u[b+304>>2]=C;u[b+180>>2]=l;u[b+176>>2]=y;Kk(j+Z|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=1056964608;q[b+308>>2]=-1090519040;u[b+180>>2]=l;u[b+176>>2]=v;Kk(j+Y|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;l=x(O+x(-.5));u[b+308>>2]=l;q[b+304>>2]=-1090519040;u[b+176>>2]=m;n=u[b+324>>2];u[b+180>>2]=n;Kk(j+X|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=F;u[b+180>>2]=n;u[b+176>>2]=B;Kk(j+ma|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=C;u[b+180>>2]=n;u[b+176>>2]=y;Kk(j+la|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;q[b+304>>2]=1056964608;u[b+180>>2]=n;u[b+176>>2]=v;Kk(j+ka|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;l=x(S+x(-.5));u[b+308>>2]=l;q[b+304>>2]=-1090519040;u[b+176>>2]=m;n=u[b+328>>2];u[b+180>>2]=n;Kk(j+ja|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=F;u[b+180>>2]=n;u[b+176>>2]=B;Kk(j+ia|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;u[b+304>>2]=C;u[b+180>>2]=n;u[b+176>>2]=y;Kk(j+ha|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;u[b+308>>2]=l;q[b+304>>2]=1056964608;u[b+180>>2]=n;u[b+176>>2]=v;Kk(j+ga|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=-1090519040;q[b+308>>2]=1056964608;u[b+176>>2]=m;m=u[b+332>>2];u[b+180>>2]=m;Kk(j+fa|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=1056964608;q[b+312>>2]=0;u[b+304>>2]=F;u[b+180>>2]=m;u[b+176>>2]=B;Kk(j+ea|0,b+304|0,a,b+176|0,h,e);q[b+308>>2]=1056964608;q[b+312>>2]=0;u[b+304>>2]=C;u[b+180>>2]=m;u[b+176>>2]=y;Kk(j+da|0,b+304|0,a,b+176|0,h,e);q[b+312>>2]=0;q[b+304>>2]=1056964608;q[b+308>>2]=1056964608;u[b+180>>2]=m;u[b+176>>2]=v;Kk(j+ca|0,b+304|0,a,b+176|0,h,e);if(k){break k}}q[c>>2]=f;q[c+212>>2]=f+15;d=f+11|0;q[c+208>>2]=d;e=f+14|0;q[c+204>>2]=e;q[c+200>>2]=e;q[c+196>>2]=d;a=f+10|0;q[c+192>>2]=a;q[c+188>>2]=e;q[c+184>>2]=a;g=f+13|0;q[c+180>>2]=g;q[c+176>>2]=g;q[c+172>>2]=a;e=f+9|0;q[c+168>>2]=e;q[c+164>>2]=g;q[c+160>>2]=e;g=f+12|0;q[c+156>>2]=g;q[c+152>>2]=g;q[c+148>>2]=e;g=f+8|0;q[c+144>>2]=g;q[c+140>>2]=d;k=f+7|0;q[c+136>>2]=k;q[c+132>>2]=a;q[c+128>>2]=a;q[c+124>>2]=k;d=f+6|0;q[c+120>>2]=d;q[c+116>>2]=a;q[c+112>>2]=d;q[c+108>>2]=e;q[c+104>>2]=e;q[c+100>>2]=d;a=f+5|0;q[c+96>>2]=a;q[c+92>>2]=e;q[c+88>>2]=a;q[c+84>>2]=g;q[c+80>>2]=g;q[c+76>>2]=a;e=f+4|0;q[c+72>>2]=e;q[c+68>>2]=k;g=f+3|0;q[c+64>>2]=g;q[c+60>>2]=d;q[c+56>>2]=d;q[c+52>>2]=g;g=f+2|0;q[c+48>>2]=g;q[c+44>>2]=d;q[c+40>>2]=g;q[c+36>>2]=a;q[c+32>>2]=a;q[c+28>>2]=g;d=f+1|0;q[c+24>>2]=d;q[c+20>>2]=a;q[c+16>>2]=d;q[c+12>>2]=e;q[c+8>>2]=e;q[c+4>>2]=d;break j}J(53716,53631,486,53341);G()}p[c>>1]=f;p[c+106>>1]=f+15;d=f+11|0;p[c+104>>1]=d;e=f+14|0;p[c+102>>1]=e;p[c+100>>1]=e;p[c+98>>1]=d;a=f+10|0;p[c+96>>1]=a;p[c+94>>1]=e;p[c+92>>1]=a;g=f+13|0;p[c+90>>1]=g;p[c+88>>1]=g;p[c+86>>1]=a;e=f+9|0;p[c+84>>1]=e;p[c+82>>1]=g;p[c+80>>1]=e;g=f+12|0;p[c+78>>1]=g;p[c+76>>1]=g;p[c+74>>1]=e;g=f+8|0;p[c+72>>1]=g;p[c+70>>1]=d;k=f+7|0;p[c+68>>1]=k;p[c+66>>1]=a;p[c+64>>1]=a;p[c+62>>1]=k;d=f+6|0;p[c+60>>1]=d;p[c+58>>1]=a;p[c+56>>1]=d;p[c+54>>1]=e;p[c+52>>1]=e;p[c+50>>1]=d;a=f+5|0;p[c+48>>1]=a;p[c+46>>1]=e;p[c+44>>1]=a;p[c+42>>1]=g;p[c+40>>1]=g;p[c+38>>1]=a;e=f+4|0;p[c+36>>1]=e;p[c+34>>1]=k;g=f+3|0;p[c+32>>1]=g;p[c+30>>1]=d;p[c+28>>1]=d;p[c+26>>1]=g;g=f+2|0;p[c+24>>1]=g;p[c+22>>1]=d;p[c+20>>1]=g;p[c+18>>1]=a;p[c+16>>1]=a;p[c+14>>1]=g;d=f+1|0;p[c+12>>1]=d;p[c+10>>1]=a;p[c+8>>1]=d;p[c+6>>1]=e;p[c+4>>1]=e;p[c+2>>1]=d}d=54;k=16;a=ra}j=a+j|0;c=w(d,qa)+c|0;M=M+4|0;if(($|0)!=(M|0)){continue}break}a=f+k|0}q[i+104>>2]=a;q[i+124>>2]=c;q[i+96>>2]=j;fn(z);q[z+148>>2]=ba;q[z+144>>2]=q[i+88>>2];a=q[i+100>>2];q[z+156>>2]=N;q[z+152>>2]=a;a=q[W+48>>2];c=q[a+4>>2];a=q[a>>2];q[z+224>>2]=1;q[z+160>>2]=a;q[z+164>>2]=c;q[z+228>>2]=o[i+128|0]&1?3:5;a=q[i+124>>2];c=r[i+128|0];q[z+280>>2]=T-q[i+120>>2];q[z+284>>2]=a-T>>>(c&1?1:2);a=q[(w(P,240)+Q|0)+192>>2];if(a){Gr(z,a)}a=q[q[V>>2]+12>>2];if(a>>>0>=5){break e}o[z+288|0]=r[z+288|0]|1;a=a<<2;q[z+236>>2]=q[a+54356>>2];q[z+232>>2]=q[a+54336>>2];po(pa,z)}Ii=b+352|0;return}q[b+32>>2]=a;Pi(4,53024,53879,b+32|0);J(53903,53126,922,53867);G()}J(53905,53631,533,53929);G()}J(53556,53631,493,53687);G()}J(53850,53126,836,53867);G()}J(53716,53631,479,53341);G()}function kx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-16|0;Ii=d;a:while(1){i=b-16|0;b:while(1){g=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-g|0;e=a>>4;switch(e|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}a=b-16|0;c=q[a>>2];b=q[a+4>>2];e=q[g+4>>2];if((b|0)==(e|0)&t[g>>2]<=c>>>0|b>>>0>e>>>0){break d}b=g+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=b;b=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=b;b=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}a=g+16|0;b=b-16|0;c=b;f=q[c>>2];c=q[c+4>>2];e=q[g+20>>2];j=q[g+4>>2];i=q[g+16>>2];if((e|0)==(j|0)&i>>>0>=t[g>>2]|e>>>0>j>>>0){if((c|0)==(e|0)&f>>>0>=i>>>0|c>>>0>e>>>0){break d}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;c=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=c;c=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=c;b=q[g+20>>2];c=q[g+4>>2];if((b|0)==(c|0)&t[g+16>>2]>=t[g>>2]|b>>>0>c>>>0){break d}b=g+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=b;b=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=b;b=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if((c|0)==(e|0)&f>>>0>>0|c>>>0>>0){a=g+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[b+12>>2];q[g+8>>2]=q[b+8>>2];q[g+12>>2]=a;a=q[b+4>>2];q[g>>2]=q[b>>2];q[g+4>>2]=a;a=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=a;a=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=a;break d}c=g+8|0;e=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=e;c=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=c;c=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=c;c=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=c;c=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=c;c=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=c;c=q[b+4>>2];e=q[g+20>>2];if((c|0)==(e|0)&t[b>>2]>=t[g+16>>2]|c>>>0>e>>>0){break d}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=a;a=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=a;break d}c=g+16|0;a=g+32|0;e=g+48|0;bp(g,c,a,e);b=b-16|0;f=b;i=q[f>>2];f=q[f+4>>2];h=q[g+52>>2];if((f|0)==(h|0)&t[g+48>>2]<=i>>>0|f>>>0>h>>>0){break d}f=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=f;f=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=f;f=q[b+12>>2];q[e+8>>2]=q[b+8>>2];q[e+12>>2]=f;f=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=f;f=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=f;f=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=f;b=q[e+4>>2];f=q[a+4>>2];if((b|0)==(f|0)&t[e>>2]>=t[a>>2]|b>>>0>f>>>0){break d}b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[e+12>>2];q[a+8>>2]=q[e+8>>2];q[a+12>>2]=b;b=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=b;b=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=b;b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;b=q[a+4>>2];e=q[c+4>>2];if((b|0)==(e|0)&t[a>>2]>=t[c>>2]|b>>>0>e>>>0){break d}b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b;b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;a=q[g+20>>2];b=q[g+4>>2];if((a|0)==(b|0)&t[g+16>>2]>=t[g>>2]|a>>>0>b>>>0){break d}a=g+8|0;b=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=b;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[c+12>>2];q[g+8>>2]=q[c+8>>2];q[g+12>>2]=a;a=q[c+4>>2];q[g>>2]=q[c>>2];q[g+4>>2]=a;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a;a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}if((a|0)<=495){a=g+16|0;e=g+32|0;i=q[g+32>>2];c=q[g+36>>2];f=q[g+20>>2];h=q[g+4>>2];j=q[g+16>>2];m=q[g>>2];l:{if((f|0)==(h|0)&j>>>0>=m>>>0|f>>>0>h>>>0){if((c|0)==(f|0)&i>>>0>=j>>>0|c>>>0>f>>>0){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;f=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=f;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;c=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=c;c=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=c;c=q[a+4>>2];if((h|0)==(c|0)&m>>>0<=t[a>>2]|c>>>0>h>>>0){break l}c=g+8|0;f=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=f;c=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=c;c=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=c;c=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=c;c=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=c;c=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=c;break l}if((c|0)==(f|0)&i>>>0>>0|c>>>0>>0){a=g+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=e+8|0;c=q[a+4>>2];q[g+8>>2]=q[a>>2];q[g+12>>2]=c;a=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=a;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;break l}f=g+8|0;h=q[f+4>>2];q[d+8>>2]=q[f>>2];q[d+12>>2]=h;f=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=f;f=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=f;f=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=f;f=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=f;f=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=f;f=q[g+20>>2];if((f|0)==(c|0)&t[g+16>>2]<=i>>>0|c>>>0>f>>>0){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;f=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=f;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a}a=g+48|0;if((b|0)==(a|0)){break d}while(1){c=a;i=q[a+4>>2];f=i;j=q[e+4>>2];h=q[a>>2];if((f|0)==(j|0)&h>>>0>2]|f>>>0>>0){j=q[c+8>>2];k=q[c+12>>2];f=c;while(1){m:{a=e;l=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=l;l=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=l;if((a|0)==(g|0)){a=g;break m}f=a;e=a-16|0;m=q[e>>2];l=q[e+4>>2];if((l|0)==(i|0)&h>>>0>>0|i>>>0>>0){continue}}break}q[a+8>>2]=j;q[a+12>>2]=k;q[a>>2]=h;q[a+4>>2]=i}e=c;a=e+16|0;if((b|0)!=(a|0)){continue}break}break d}f=((e|0)/2<<4)+g|0;n:{if((a|0)>=15985){e=(e|0)/4<<4;a=e+g|0;e=e+f|0;j=bp(g,a,f,e);h=q[i+4>>2];k=q[e+4>>2];if((h|0)==(k|0)&t[i>>2]>=t[e>>2]|h>>>0>k>>>0){break n}h=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=h;h=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=h;h=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=h;h=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=h;h=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=h;h=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=h;h=q[e+4>>2];k=q[f+4>>2];if((h|0)==(k|0)&t[e>>2]>=t[f>>2]|h>>>0>k>>>0){j=j+1|0;break n}h=f+8|0;k=q[h+4>>2];q[d+8>>2]=q[h>>2];q[d+12>>2]=k;h=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=h;h=q[e+12>>2];q[f+8>>2]=q[e+8>>2];q[f+12>>2]=h;h=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=h;h=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=h;h=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=h;e=q[f+4>>2];h=q[a+4>>2];if((e|0)==(h|0)&t[f>>2]>=t[a>>2]|e>>>0>h>>>0){j=j+2|0;break n}e=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=e;e=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=e;e=q[f+12>>2];q[a+8>>2]=q[f+8>>2];q[a+12>>2]=e;e=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=e;e=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=e;e=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=e;e=q[a+4>>2];h=q[g+4>>2];if((e|0)==(h|0)&t[a>>2]>=t[g>>2]|e>>>0>h>>>0){j=j+3|0;break n}e=g+8|0;h=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=h;e=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=e;e=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=e;e=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=e;e=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=e;e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;j=j+4|0;break n}a=q[f+4>>2];j=q[g+4>>2];e=q[f>>2];o:{if((a|0)==(j|0)&e>>>0>=t[g>>2]|a>>>0>j>>>0){j=0;h=q[i+4>>2];if((a|0)==(h|0)&e>>>0<=t[i>>2]|a>>>0>>0){break n}a=f+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[i+12>>2];q[f+8>>2]=q[i+8>>2];q[f+12>>2]=a;a=q[i+4>>2];q[f>>2]=q[i>>2];q[f+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;j=1;a=q[f+4>>2];e=q[g+4>>2];if((a|0)==(e|0)&t[f>>2]>=t[g>>2]|a>>>0>e>>>0){break n}a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[f+12>>2];q[g+8>>2]=q[f+8>>2];q[g+12>>2]=a;a=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;break o}h=q[i+4>>2];if((h|0)==(a|0)&t[i>>2]>>0|a>>>0>h>>>0){a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[i+12>>2];q[g+8>>2]=q[i+8>>2];q[g+12>>2]=a;a=q[i+4>>2];q[g>>2]=q[i>>2];q[g+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;j=1;break n}a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=f+8|0;e=q[a+4>>2];q[g+8>>2]=q[a>>2];q[g+12>>2]=e;a=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;j=1;a=q[i+4>>2];e=q[f+4>>2];if((a|0)==(e|0)&t[i>>2]>=t[f>>2]|a>>>0>e>>>0){break n}a=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=a;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[i+12>>2];q[f+8>>2]=q[i+8>>2];q[f+12>>2]=a;a=q[i+4>>2];q[f>>2]=q[i>>2];q[f+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a}j=2}a=i;h=q[g+4>>2];e=q[f+4>>2];k=q[g>>2];n=q[f>>2];if(!((h|0)==(e|0)&k>>>0>>0|h>>>0>>0)){while(1){a=a-16|0;if((g|0)==(a|0)){e=g+16|0;a=q[i+4>>2];if((a|0)==(h|0)&t[i>>2]>k>>>0|a>>>0>h>>>0){break e}if((e|0)==(i|0)){break d}while(1){a=q[e+4>>2];if((h|0)==(a|0)&k>>>0>2]|a>>>0>h>>>0){a=e+8|0;f=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=f;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=a;a=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;e=e+16|0;break e}e=e+16|0;if((i|0)!=(e|0)){continue}break}break d}l=q[a+4>>2];if((e|0)==(l|0)&n>>>0<=t[a>>2]|e>>>0>>0){continue}break}e=g+8|0;h=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=h;e=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=e;e=a+8|0;h=q[e+4>>2];q[g+8>>2]=q[e>>2];q[g+12>>2]=h;e=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=e;e=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=e;e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;j=j+1|0}e=g+16|0;if(e>>>0>=a>>>0){break f}while(1){l=q[f>>2];k=q[f+4>>2];while(1){h=e;e=e+16|0;m=q[h+4>>2];if((k|0)==(m|0)&l>>>0>t[h>>2]|k>>>0>m>>>0){continue}break}while(1){a=a-16|0;n=q[a>>2];m=q[a+4>>2];if((k|0)==(m|0)&l>>>0<=n>>>0|k>>>0>>0){continue}break}if(a>>>0>>0){e=h;break f}else{k=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=k;k=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=k;k=a+8|0;l=q[k+4>>2];q[h+8>>2]=q[k>>2];q[h+12>>2]=l;k=q[a+4>>2];q[h>>2]=q[a>>2];q[h+4>>2]=k;k=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=k;k=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=k;f=(f|0)==(h|0)?a:f;j=j+1|0;continue}}}bp(g,g+16|0,g+32|0,b-16|0);break d}p:{if((e|0)==(f|0)){break p}a=q[f+4>>2];h=q[e+4>>2];if((a|0)==(h|0)&t[f>>2]>=t[e>>2]|a>>>0>h>>>0){break p}a=e+8|0;h=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=h;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=f+8|0;h=q[a+4>>2];q[e+8>>2]=q[a>>2];q[e+12>>2]=h;a=q[f+4>>2];q[e>>2]=q[f>>2];q[e+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;j=j+1|0}if(!j){f=Rw(g,e,c);a=e+16|0;if(Rw(a,b,c)){b=e;a=g;if(!f){continue a}break d}if(f){continue b}}if((e-g|0)<(b-e|0)){kx(g,e,c);a=e+16|0;continue b}kx(e+16|0,b,c);b=e;a=g;continue a}a=i;if((e|0)==(a|0)){break d}while(1){j=q[g>>2];h=q[g+4>>2];while(1){f=e;e=e+16|0;k=q[f+4>>2];if((k|0)==(h|0)&t[f>>2]<=j>>>0|h>>>0>k>>>0){continue}break}while(1){a=a-16|0;l=q[a>>2];k=q[a+4>>2];if((k|0)==(h|0)&j>>>0>>0|h>>>0>>0){continue}break}if(a>>>0<=f>>>0){g=f;continue c}else{h=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=h;h=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=h;h=a+8|0;j=q[h+4>>2];q[f+8>>2]=q[h>>2];q[f+12>>2]=j;h=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=h;f=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=f;f=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=f;continue}}}break}break}break}Ii=d+16|0}function jx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-16|0;Ii=d;a:while(1){i=b-16|0;b:while(1){g=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-g|0;e=a>>4;switch(e|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}a=b-16|0;c=q[a>>2];b=q[a+4>>2];e=q[g+4>>2];if((b|0)==(e|0)&t[g>>2]<=c>>>0|b>>>0>e>>>0){break d}b=g+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=b;b=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=b;b=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}a=g+16|0;b=b-16|0;c=b;f=q[c>>2];c=q[c+4>>2];e=q[g+20>>2];j=q[g+4>>2];i=q[g+16>>2];if((e|0)==(j|0)&i>>>0>=t[g>>2]|e>>>0>j>>>0){if((c|0)==(e|0)&f>>>0>=i>>>0|c>>>0>e>>>0){break d}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;c=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=c;c=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=c;b=q[g+20>>2];c=q[g+4>>2];if((b|0)==(c|0)&t[g+16>>2]>=t[g>>2]|b>>>0>c>>>0){break d}b=g+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=b;b=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=b;b=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if((c|0)==(e|0)&f>>>0>>0|c>>>0>>0){a=g+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[b+12>>2];q[g+8>>2]=q[b+8>>2];q[g+12>>2]=a;a=q[b+4>>2];q[g>>2]=q[b>>2];q[g+4>>2]=a;a=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=a;a=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=a;break d}c=g+8|0;e=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=e;c=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=c;c=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=c;c=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=c;c=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=c;c=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=c;c=q[b+4>>2];e=q[g+20>>2];if((c|0)==(e|0)&t[b>>2]>=t[g+16>>2]|c>>>0>e>>>0){break d}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=a;a=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=a;break d}c=g+16|0;a=g+32|0;e=g+48|0;bp(g,c,a,e);b=b-16|0;f=b;i=q[f>>2];f=q[f+4>>2];h=q[g+52>>2];if((f|0)==(h|0)&t[g+48>>2]<=i>>>0|f>>>0>h>>>0){break d}f=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=f;f=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=f;f=q[b+12>>2];q[e+8>>2]=q[b+8>>2];q[e+12>>2]=f;f=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=f;f=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=f;f=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=f;b=q[e+4>>2];f=q[a+4>>2];if((b|0)==(f|0)&t[e>>2]>=t[a>>2]|b>>>0>f>>>0){break d}b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[e+12>>2];q[a+8>>2]=q[e+8>>2];q[a+12>>2]=b;b=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=b;b=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=b;b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;b=q[a+4>>2];e=q[c+4>>2];if((b|0)==(e|0)&t[a>>2]>=t[c>>2]|b>>>0>e>>>0){break d}b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b;b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;a=q[g+20>>2];b=q[g+4>>2];if((a|0)==(b|0)&t[g+16>>2]>=t[g>>2]|a>>>0>b>>>0){break d}a=g+8|0;b=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=b;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[c+12>>2];q[g+8>>2]=q[c+8>>2];q[g+12>>2]=a;a=q[c+4>>2];q[g>>2]=q[c>>2];q[g+4>>2]=a;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a;a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}if((a|0)<=495){a=g+16|0;e=g+32|0;i=q[g+32>>2];c=q[g+36>>2];f=q[g+20>>2];h=q[g+4>>2];j=q[g+16>>2];m=q[g>>2];l:{if((f|0)==(h|0)&j>>>0>=m>>>0|f>>>0>h>>>0){if((c|0)==(f|0)&i>>>0>=j>>>0|c>>>0>f>>>0){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;f=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=f;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;c=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=c;c=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=c;c=q[a+4>>2];if((h|0)==(c|0)&m>>>0<=t[a>>2]|c>>>0>h>>>0){break l}c=g+8|0;f=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=f;c=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=c;c=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=c;c=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=c;c=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=c;c=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=c;break l}if((c|0)==(f|0)&i>>>0>>0|c>>>0>>0){a=g+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=e+8|0;c=q[a+4>>2];q[g+8>>2]=q[a>>2];q[g+12>>2]=c;a=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=a;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;break l}f=g+8|0;h=q[f+4>>2];q[d+8>>2]=q[f>>2];q[d+12>>2]=h;f=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=f;f=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=f;f=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=f;f=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=f;f=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=f;f=q[g+20>>2];if((f|0)==(c|0)&t[g+16>>2]<=i>>>0|c>>>0>f>>>0){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;f=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=f;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a}a=g+48|0;if((b|0)==(a|0)){break d}while(1){c=a;i=q[a+4>>2];f=i;j=q[e+4>>2];h=q[a>>2];if((f|0)==(j|0)&h>>>0>2]|f>>>0>>0){j=q[c+8>>2];k=q[c+12>>2];f=c;while(1){m:{a=e;l=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=l;l=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=l;if((a|0)==(g|0)){a=g;break m}f=a;e=a-16|0;m=q[e>>2];l=q[e+4>>2];if((l|0)==(i|0)&h>>>0>>0|i>>>0>>0){continue}}break}q[a+8>>2]=j;q[a+12>>2]=k;q[a>>2]=h;q[a+4>>2]=i}e=c;a=e+16|0;if((b|0)!=(a|0)){continue}break}break d}f=((e|0)/2<<4)+g|0;n:{if((a|0)>=15985){e=(e|0)/4<<4;a=e+g|0;e=e+f|0;j=bp(g,a,f,e);h=q[i+4>>2];k=q[e+4>>2];if((h|0)==(k|0)&t[i>>2]>=t[e>>2]|h>>>0>k>>>0){break n}h=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=h;h=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=h;h=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=h;h=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=h;h=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=h;h=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=h;h=q[e+4>>2];k=q[f+4>>2];if((h|0)==(k|0)&t[e>>2]>=t[f>>2]|h>>>0>k>>>0){j=j+1|0;break n}h=f+8|0;k=q[h+4>>2];q[d+8>>2]=q[h>>2];q[d+12>>2]=k;h=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=h;h=q[e+12>>2];q[f+8>>2]=q[e+8>>2];q[f+12>>2]=h;h=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=h;h=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=h;h=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=h;e=q[f+4>>2];h=q[a+4>>2];if((e|0)==(h|0)&t[f>>2]>=t[a>>2]|e>>>0>h>>>0){j=j+2|0;break n}e=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=e;e=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=e;e=q[f+12>>2];q[a+8>>2]=q[f+8>>2];q[a+12>>2]=e;e=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=e;e=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=e;e=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=e;e=q[a+4>>2];h=q[g+4>>2];if((e|0)==(h|0)&t[a>>2]>=t[g>>2]|e>>>0>h>>>0){j=j+3|0;break n}e=g+8|0;h=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=h;e=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=e;e=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=e;e=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=e;e=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=e;e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;j=j+4|0;break n}a=q[f+4>>2];j=q[g+4>>2];e=q[f>>2];o:{if((a|0)==(j|0)&e>>>0>=t[g>>2]|a>>>0>j>>>0){j=0;h=q[i+4>>2];if((a|0)==(h|0)&e>>>0<=t[i>>2]|a>>>0>>0){break n}a=f+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[i+12>>2];q[f+8>>2]=q[i+8>>2];q[f+12>>2]=a;a=q[i+4>>2];q[f>>2]=q[i>>2];q[f+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;j=1;a=q[f+4>>2];e=q[g+4>>2];if((a|0)==(e|0)&t[f>>2]>=t[g>>2]|a>>>0>e>>>0){break n}a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[f+12>>2];q[g+8>>2]=q[f+8>>2];q[g+12>>2]=a;a=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;break o}h=q[i+4>>2];if((h|0)==(a|0)&t[i>>2]>>0|a>>>0>h>>>0){a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=q[i+12>>2];q[g+8>>2]=q[i+8>>2];q[g+12>>2]=a;a=q[i+4>>2];q[g>>2]=q[i>>2];q[g+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;j=1;break n}a=g+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;a=f+8|0;e=q[a+4>>2];q[g+8>>2]=q[a>>2];q[g+12>>2]=e;a=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;j=1;a=q[i+4>>2];e=q[f+4>>2];if((a|0)==(e|0)&t[i>>2]>=t[f>>2]|a>>>0>e>>>0){break n}a=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=a;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[i+12>>2];q[f+8>>2]=q[i+8>>2];q[f+12>>2]=a;a=q[i+4>>2];q[f>>2]=q[i>>2];q[f+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a}j=2}a=i;h=q[g+4>>2];e=q[f+4>>2];k=q[g>>2];n=q[f>>2];if(!((h|0)==(e|0)&k>>>0>>0|h>>>0>>0)){while(1){a=a-16|0;if((g|0)==(a|0)){e=g+16|0;a=q[i+4>>2];if((a|0)==(h|0)&t[i>>2]>k>>>0|a>>>0>h>>>0){break e}if((e|0)==(i|0)){break d}while(1){a=q[e+4>>2];if((h|0)==(a|0)&k>>>0>2]|a>>>0>h>>>0){a=e+8|0;f=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=f;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=a;a=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;e=e+16|0;break e}e=e+16|0;if((i|0)!=(e|0)){continue}break}break d}l=q[a+4>>2];if((e|0)==(l|0)&n>>>0<=t[a>>2]|e>>>0>>0){continue}break}e=g+8|0;h=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=h;e=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=e;e=a+8|0;h=q[e+4>>2];q[g+8>>2]=q[e>>2];q[g+12>>2]=h;e=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=e;e=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=e;e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;j=j+1|0}e=g+16|0;if(e>>>0>=a>>>0){break f}while(1){l=q[f>>2];k=q[f+4>>2];while(1){h=e;e=e+16|0;m=q[h+4>>2];if((k|0)==(m|0)&l>>>0>t[h>>2]|k>>>0>m>>>0){continue}break}while(1){a=a-16|0;n=q[a>>2];m=q[a+4>>2];if((k|0)==(m|0)&l>>>0<=n>>>0|k>>>0>>0){continue}break}if(a>>>0>>0){e=h;break f}else{k=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=k;k=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=k;k=a+8|0;l=q[k+4>>2];q[h+8>>2]=q[k>>2];q[h+12>>2]=l;k=q[a+4>>2];q[h>>2]=q[a>>2];q[h+4>>2]=k;k=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=k;k=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=k;f=(f|0)==(h|0)?a:f;j=j+1|0;continue}}}bp(g,g+16|0,g+32|0,b-16|0);break d}p:{if((e|0)==(f|0)){break p}a=q[f+4>>2];h=q[e+4>>2];if((a|0)==(h|0)&t[f>>2]>=t[e>>2]|a>>>0>h>>>0){break p}a=e+8|0;h=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=h;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=f+8|0;h=q[a+4>>2];q[e+8>>2]=q[a>>2];q[e+12>>2]=h;a=q[f+4>>2];q[e>>2]=q[f>>2];q[e+4>>2]=a;a=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=a;a=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=a;j=j+1|0}if(!j){f=Rw(g,e,c);a=e+16|0;if(Rw(a,b,c)){b=e;a=g;if(!f){continue a}break d}if(f){continue b}}if((e-g|0)<(b-e|0)){jx(g,e,c);a=e+16|0;continue b}jx(e+16|0,b,c);b=e;a=g;continue a}a=i;if((e|0)==(a|0)){break d}while(1){j=q[g>>2];h=q[g+4>>2];while(1){f=e;e=e+16|0;k=q[f+4>>2];if((k|0)==(h|0)&t[f>>2]<=j>>>0|h>>>0>k>>>0){continue}break}while(1){a=a-16|0;l=q[a>>2];k=q[a+4>>2];if((k|0)==(h|0)&j>>>0>>0|h>>>0>>0){continue}break}if(a>>>0<=f>>>0){g=f;continue c}else{h=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=h;h=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=h;h=a+8|0;j=q[h+4>>2];q[f+8>>2]=q[h>>2];q[f+12>>2]=j;h=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=h;f=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=f;f=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=f;continue}}}break}break}break}Ii=d+16|0}function z8(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=0,g=0,h=0,i=0,j=x(0),k=0,l=x(0),m=0,n=0,p=x(0),v=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=0,N=0,O=0,P=0,Q=x(0),R=0,S=x(0),T=0,U=x(0),V=0,W=0,X=x(0),Y=x(0),Z=0,_=0,$=0,aa=0,ba=x(0),ca=x(0),da=x(0),ea=x(0),fa=x(0),ga=x(0),ha=x(0),ia=x(0),ja=x(0),ka=x(0),la=x(0),ma=x(0),na=x(0),oa=x(0),pa=x(0),qa=x(0),ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=x(0),Ba=0,Ca=0,Da=x(0),Ea=0,Fa=0,Ga=0,Ha=0,Ia=x(0),Ja=0,Ka=0,La=0,Ma=x(0);h=Ii-1168|0;Ii=h;k=q[a+4>>2];a:{b:{c:{switch(q[a+8>>2]-1|0){case 1:a=q[k+1952>>2];if((a|0)==q[k+1960>>2]){break b}g=k+1936|0;Mi[q[74945]](q[g>>2],0,0,0);Mi[q[74945]](q[g>>2],w(a,112),q[k+1940>>2],0);a=q[k+1960>>2];g=q[k+1952>>2];q[k+1960>>2]=g;g=g-a|0;a=(g>>>0)/6|0;q[79082]=a+q[79082];q[h+88>>2]=a;q[h+92>>2]=0;q[h+72>>2]=a;q[h+76>>2]=0;a=w(g,112);q[79104]=a+q[79104];q[h+80>>2]=a;q[h+84>>2]=0;q[h+64>>2]=a;q[h+68>>2]=0;break b;case 0:break c;default:break b}}xa=q[a+20>>2];ya=q[a+12>>2];$=q[a+16>>2];q[h+120>>2]=0;a=q[(w(q[$>>2],48)+ya|0)+16>>2];i=q[a+176>>2];g=q[i+8>>2];d=q[i+12>>2];f=d;d:{if(!(d|g)){ca=x(1);da=x(1);e=x(0);break d}e=x(Mi[q[75014]](g,f)>>>0);da=x(x(1)/e);Q=x(Mi[q[75015]](q[i+8>>2],q[i+12>>2])>>>0);ca=x(x(1)/Q);Q=x(x(t[i+144>>2])/Q);e=x(x(t[i+140>>2])/e)}W=q[k+1948>>2];ta=q[k+1904>>2];e:{if(W>>>0>=(q[k+1908>>2]-ta|0)/304>>>0){q[h+48>>2]=W;Pi(3,112261,112831,h+48|0);break e}f:{g:{g=q[k+1920>>2];if(q[k+1924>>2]-g>>2>>>0>W>>>0){Ga=q[k+1940>>2];g=q[g+(W<<2)>>2];q[k+1948>>2]=W+1;m=w(W,304)+ta|0;q[m+232>>2]=q[a+184>>2];q[m+236>>2]=q[a+188>>2];d=r[m+288|0]|1;o[m+288|0]=d;q[m+156>>2]=q[a+180>>2];f=q[i+12>>2];q[m+160>>2]=q[i+8>>2];q[m+164>>2]=f;q[m+280>>2]=q[k+1952>>2];f=q[a+4>>2];q[m+244>>2]=q[a>>2];q[m+248>>2]=f;f=q[a+12>>2];q[m+252>>2]=q[a+8>>2];q[m+256>>2]=f;f=q[a+20>>2];q[m+260>>2]=q[a+16>>2];q[m+264>>2]=f;f=q[a+28>>2];q[m+268>>2]=q[a+24>>2];q[m+272>>2]=f;q[m+276>>2]=q[a+32>>2];o[m+288|0]=r[a+276|0]>>>3&2|d&253;u[h+108>>2]=Q;u[h+104>>2]=e;u[h+100>>2]=ca;u[h+96>>2]=da;gA(g);yH(g,a+112|0,r[a+218|0]);Vz(g,q[79122],q[79123],h+96|0,1,0);q[m>>2]=g;if(($|0)==(xa|0)){break g}za=k+1904|0;while(1){b=q[(w(q[$>>2],48)+ya|0)+16>>2];d=q[b+204>>2];g=q[k+1964>>2];if(d>>>0>2]-g>>>0){f=q[k+1956>>2];M=q[k+1952>>2];l=u[b+228>>2];a=r[b+219|0];Q=u[b+220>>2];e=u[b+232>>2];j=u[i+64>>2];S=u[i+60>>2];q[h+128>>2]=i;X=x(S+j);Aa=x(e*X);u[h+132>>2]=Aa;O=q[h+132>>2];q[h+40>>2]=q[h+128>>2];q[h+44>>2]=O;ua=d+g|0;aa=Ax(ua,a?Q:x(3.4028234663852886e+38),h+144|0,h+140|0,h+40|0,!a);e=u[b+220>>2];Q=x(0);h:{i:{j:{a=r[b+276|0];switch((a&3)-1|0){case 1:break i;case 0:break j;default:break h}}Q=x(e*x(.5));break h}Q=e}S=u[i+60>>2];Y=u[i+64>>2];e=x(S+Y);j=u[b+228>>2];p=u[b+224>>2];k:{l:{switch((a>>>2&3)-1|0){case 0:S=x(x(x(p*x(.5))+x(x(x(x(e*j)*x(aa>>>0))-x(e*x(j+x(-1))))*x(.5)))-S);break k;case 1:S=x(Y+x(x(e*j)*x(aa-1>>>0)));break k;default:break l}}S=x(p-S)}Ha=k;T=r[i+153|0];m:{if(!(T&1)){Pi(4,112261,112962,0);a=0;break m}va=f-M|0;c=q[b+212>>2];N=q[b+208>>2];R=q[b+200>>2];e=u[b- -64>>2];j=u[b+48>>2];p=u[i+68>>2];Y=u[i+80>>2];ea=u[i+76>>2];Ba=T&2;n:{o:{if(!(T&6)){Z=1;g=0;break o}Z=((T>>>2&1)+(Ba>>>1|0)|0)+1|0;a=0;g=0;O=0;if((aa|0)<1){break n}while(1){d=(h+144|0)+(O<<3)|0;q[h+124>>2]=s[d+4>>1]+ua;if(s[d+6>>1]){P=d|6;_=0;while(1){f=Ko(h+124|0);p:{q:{r:{s:{n=q[i+24>>2];t:{if(!n){break t}V=q[i+20>>2];d=q[V+((f>>>0)%(n>>>0)<<2)>>2];if((d|0)!=-1){wa=q[i+28>>2];while(1){d=wa+w(d,80)|0;if((f|0)==q[d>>2]){break s}d=q[d+72>>2];if((d|0)!=-1){continue}break}}d=q[V+(126%(n>>>0)<<2)>>2];if((d|0)==-1){break t}n=q[i+28>>2];while(1){d=n+w(d,80)|0;if(q[d>>2]==126){break r}d=q[d+72>>2];if((d|0)!=-1){continue}break}}q[h+32>>2]=f;Pi(3,112261,113127,h+32|0);break p}d=d+8|0;break q}d=d+8|0}f=a+6|0;if(w(f,Z)>>>0>va>>>0){break o}if(!q[d+4>>2]){break p}n=1;if(!r[d+32|0]){UH(i,za,d,q[i+148>>2]-q[d+16>>2]<<16>>16);n=r[d+32|0]}a=n?f:a;g=((n|0)!=0)+g|0}_=_+1|0;if(_>>>0>1]){continue}break}}O=O+1|0;if((aa|0)!=(O|0)){continue}break}}if((aa|0)<1){a=0;break n}n=w(M,112)+Ga|0;Ia=x(X*l);X=x(x(c>>>24>>>0)/x(255));fa=x(x((c&255)>>>0)/x(255));ga=x(x(N>>>24>>>0)/x(255));ha=x(x((N&255)>>>0)/x(255));ia=x(x(R>>>24>>>0)/x(255));ja=x(x((R&255)>>>0)/x(255));ka=x(x((c>>>16&255)>>>0)/x(255));la=x(x((c>>>8&255)>>>0)/x(255));ma=x(x((N>>>16&255)>>>0)/x(255));na=x(x((N>>>8&255)>>>0)/x(255));oa=x(x((R>>>16&255)>>>0)/x(255));pa=x(x((R>>>8&255)>>>0)/x(255));qa=x(x(.25)/x(p*x(F(x(x(j*j)+x(e*e))))));wa=T&4;a=w(g,6);Ja=w(a,Z-2|0);Ka=w(a,Z-1|0);p=(Z|0)<2?x(1):x(0);a=0;R=0;while(1){g=(h+144|0)+(R<<3)|0;j=u[g>>2];e=x(0);u:{v:{switch((r[b+276|0]&3)-1|0){case 0:e=x(j*x(.5));break u;case 1:break v;default:break u}}e=j}q[h+124>>2]=s[g+4>>1]+ua;w:{Ca=s[g+6>>1];if(Ca){e=x(x(Q-e)+x(.5));x:{if(x(y(e))>2];D:{if(!f){break D}c=q[i+20>>2];d=q[c+((g>>>0)%(f>>>0)<<2)>>2];if((d|0)!=-1){N=q[i+28>>2];while(1){d=N+w(d,80)|0;if((g|0)==q[d>>2]){break C}d=q[d+72>>2];if((d|0)!=-1){continue}break}}d=q[c+(126%(f>>>0)<<2)>>2];if((d|0)==-1){break D}f=q[i+28>>2];while(1){d=f+w(d,80)|0;if(q[d>>2]==126){break B}d=q[d+72>>2];if((d|0)!=-1){continue}break}}q[h>>2]=g;Pi(3,112261,113127,h);break z}f=d+8|0;break A}f=d+8|0}g=a+6|0;if(w(Z,g)>>>0>va>>>0){break w}P=q[f+4>>2];E:{if(!P){g=a;break E}M=q[f+16>>2];d=q[i+148>>2]-M|0;V=q[f+20>>2];F:{if(r[f+32|0]){break F}UH(i,za,f,d<<16>>16);if(r[f+32|0]){break F}g=a;break E}q[f+56>>2]=q[k+2e3>>2];l=u[b+96>>2];v=u[b+80>>2];z=u[b+48>>2];A=u[b+64>>2];B=u[b+100>>2];C=u[b+84>>2];D=u[b+52>>2];E=u[b+68>>2];H=u[b+104>>2];I=u[b+88>>2];K=u[b+56>>2];L=u[b+72>>2];N=a+Ka|0;c=n+w(N,112)|0;ba=x(O<<16>>16);e=x(u[f+12>>2]+ba);ra=V<<16>>16;j=x(T-ra|0);u[c+12>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(u[b+76>>2]*j))+x(u[b+92>>2]*x(0)));u[c+8>>2]=H+x(x(x(e*K)+x(L*j))+x(I*x(0)));u[c+4>>2]=B+x(x(x(e*D)+x(E*j))+x(C*x(0)));u[c>>2]=l+x(x(x(z*e)+x(A*j))+x(v*x(0)));v=u[b+96>>2];z=u[b+80>>2];A=u[b+48>>2];B=u[b+64>>2];C=u[b+100>>2];D=u[b+84>>2];E=u[b+52>>2];H=u[b+68>>2];I=u[b+104>>2];K=u[b+88>>2];L=u[b+56>>2];U=u[b+72>>2];sa=M<<16>>16;l=x(sa+T|0);u[c+124>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(u[b+76>>2]*l))+x(u[b+92>>2]*x(0)));u[c+120>>2]=I+x(x(x(e*L)+x(U*l))+x(K*x(0)));u[c+116>>2]=C+x(x(x(e*E)+x(H*l))+x(D*x(0)));M=c+112|0;u[M>>2]=v+x(x(x(e*A)+x(B*l))+x(z*x(0)));v=u[b+96>>2];z=u[b+80>>2];A=u[b+64>>2];B=u[b+48>>2];C=u[b+100>>2];D=u[b+84>>2];E=u[b+68>>2];H=u[b+52>>2];I=u[b+104>>2];K=u[b+88>>2];L=u[b+72>>2];U=u[b+56>>2];Da=x(P<<16>>16);e=x(e+Da);u[c+236>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(u[b+76>>2]*j))+x(u[b+92>>2]*x(0)));u[c+232>>2]=I+x(x(x(e*U)+x(L*j))+x(K*x(0)));u[c+228>>2]=C+x(x(x(e*H)+x(E*j))+x(D*x(0)));P=c+224|0;u[P>>2]=v+x(x(x(e*B)+x(A*j))+x(z*x(0)));v=u[b+96>>2];z=u[b+80>>2];A=u[b+64>>2];B=u[b+48>>2];C=u[b+100>>2];D=u[b+84>>2];E=u[b+68>>2];H=u[b+52>>2];I=u[b+104>>2];K=u[b+88>>2];L=u[b+72>>2];U=u[b+56>>2];u[c+572>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(u[b+76>>2]*l))+x(u[b+92>>2]*x(0)));u[c+568>>2]=I+x(x(x(e*U)+x(L*l))+x(K*x(0)));u[c+564>>2]=C+x(x(x(e*H)+x(E*l))+x(D*x(0)));V=c+560|0;u[V>>2]=v+x(x(x(e*B)+x(A*l))+x(z*x(0)));Ea=r[i+152|0];Fa=Ea+q[f+24>>2]|0;e=x(da*x(Fa|0));u[c+16>>2]=e;La=q[f+28>>2];u[c+128>>2]=e;d=((d<<16>>16)+Ea|0)+La|0;e=x(ca*x(d|0));u[c+132>>2]=e;v=x(ca*x(d+(ra+sa|0)|0));u[c+20>>2]=v;d=q[f+4>>2];u[c+244>>2]=v;u[c+580>>2]=e;u[c+68>>2]=X;u[c- -64>>2]=ka;u[c+60>>2]=la;u[c+56>>2]=fa;u[c+52>>2]=ga;u[c+48>>2]=ma;u[c+44>>2]=na;q[c+72>>2]=1061158912;u[c+84>>2]=Y;u[c+80>>2]=qa;u[c+76>>2]=ea;u[c+36>>2]=ia;u[c+32>>2]=oa;u[c+28>>2]=pa;u[c+24>>2]=ja;u[c+40>>2]=ha;e=x(da*x(d+Fa>>>0));u[c+240>>2]=e;u[c+576>>2]=e;u[c+180>>2]=X;u[c+176>>2]=ka;u[c+172>>2]=la;u[c+168>>2]=fa;u[c+164>>2]=ga;u[c+160>>2]=ma;u[c+156>>2]=na;u[c+152>>2]=ha;u[c+196>>2]=Y;u[c+192>>2]=qa;u[c+188>>2]=ea;q[c+184>>2]=1061158912;u[c+148>>2]=ia;u[c+144>>2]=oa;u[c+140>>2]=pa;u[c+136>>2]=ja;u[c+264>>2]=ha;u[c+268>>2]=na;u[c+272>>2]=ma;u[c+276>>2]=ga;u[c+280>>2]=fa;u[c+284>>2]=la;u[c+288>>2]=ka;u[c+248>>2]=ja;u[c+252>>2]=pa;u[c+256>>2]=oa;u[c+260>>2]=ia;u[c+300>>2]=ea;u[c+304>>2]=qa;u[c+308>>2]=Y;q[c+296>>2]=1061158912;u[c+292>>2]=X;u[c+628>>2]=X;u[c+624>>2]=ka;u[c+620>>2]=la;u[c+616>>2]=fa;u[c+612>>2]=ga;u[c+608>>2]=ma;u[c+604>>2]=na;u[c+600>>2]=ha;u[c+644>>2]=Y;u[c+640>>2]=qa;u[c+636>>2]=ea;q[c+632>>2]=1061158912;u[c+596>>2]=ia;u[c+592>>2]=oa;u[c+588>>2]=pa;u[c+584>>2]=ja;ra=Ti(c+336|0,P,112);sa=Ti(c+448|0,M,112);if(Ba){d=Ti(n+w(a+Ja|0,112)|0,c,112);Ti(d+112|0,M,112);Ti(d+224|0,P,112);Ti(d+336|0,ra,112);Ti(d+448|0,sa,112);Ti(d+560|0,V,112);q[d+96>>2]=0;q[d+88>>2]=0;q[d+92>>2]=1065353216;q[d+208>>2]=0;q[d+200>>2]=0;q[d+204>>2]=1065353216;q[d+312>>2]=0;q[d+316>>2]=1065353216;q[d+320>>2]=0;q[d+424>>2]=0;q[d+428>>2]=1065353216;q[d+432>>2]=0;q[d+536>>2]=0;q[d+540>>2]=1065353216;q[d+544>>2]=0;q[d+648>>2]=0;q[d+652>>2]=1065353216;q[d+656>>2]=0}if(wa){e=u[i+52>>2];v=u[i+56>>2];a=Ti(n+w(a,112)|0,c,112);d=Ti(a+112|0,M,112);M=Ti(a+224|0,P,112);P=Ti(a+560|0,V,112);z=u[b+96>>2];A=u[b+80>>2];B=u[b+48>>2];C=u[b+64>>2];D=u[b+100>>2];E=u[b+84>>2];H=u[b+52>>2];I=u[b+68>>2];K=u[b+104>>2];L=u[b+88>>2];U=u[b+56>>2];Ma=u[b+72>>2];e=x(e+x(u[f+12>>2]+ba));j=x(v+j);u[a+12>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(j*u[b+76>>2]))+x(u[b+92>>2]*x(0)));u[a+8>>2]=K+x(x(x(e*U)+x(j*Ma))+x(L*x(0)));u[a+4>>2]=D+x(x(x(e*H)+x(j*I))+x(E*x(0)));u[a>>2]=z+x(x(x(B*e)+x(j*C))+x(A*x(0)));z=u[b+96>>2];A=u[b+80>>2];B=u[b+48>>2];C=u[b+64>>2];D=u[b+100>>2];E=u[b+84>>2];H=u[b+52>>2];I=u[b+68>>2];K=u[b+104>>2];L=u[b+88>>2];ba=u[b+56>>2];U=u[b+72>>2];l=x(v+l);u[a+124>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(l*u[b+76>>2]))+x(u[b+92>>2]*x(0)));u[a+120>>2]=K+x(x(x(e*ba)+x(l*U))+x(L*x(0)));u[a+116>>2]=D+x(x(x(e*H)+x(l*I))+x(E*x(0)));u[d>>2]=z+x(x(x(e*B)+x(l*C))+x(A*x(0)));v=u[b+96>>2];z=u[b+80>>2];A=u[b+48>>2];B=u[b+64>>2];C=u[b+100>>2];D=u[b+84>>2];E=u[b+52>>2];H=u[b+68>>2];I=u[b+104>>2];K=u[b+88>>2];L=u[b+56>>2];ba=u[b+72>>2];e=x(e+Da);u[a+236>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(j*u[b+76>>2]))+x(u[b+92>>2]*x(0)));u[a+232>>2]=I+x(x(x(e*L)+x(j*ba))+x(K*x(0)));u[a+228>>2]=C+x(x(x(e*E)+x(j*H))+x(D*x(0)));u[M>>2]=v+x(x(x(e*A)+x(j*B))+x(z*x(0)));j=u[b+96>>2];v=u[b+80>>2];z=u[b+48>>2];A=u[b+64>>2];B=u[b+100>>2];C=u[b+84>>2];D=u[b+52>>2];E=u[b+68>>2];H=u[b+104>>2];I=u[b+88>>2];K=u[b+56>>2];L=u[b+72>>2];u[a+572>>2]=u[b+108>>2]+x(x(x(e*u[b+60>>2])+x(l*u[b+76>>2]))+x(u[b+92>>2]*x(0)));u[a+568>>2]=H+x(x(x(e*K)+x(l*L))+x(I*x(0)));u[a+564>>2]=B+x(x(x(e*D)+x(l*E))+x(C*x(0)));u[P>>2]=j+x(x(x(e*z)+x(l*A))+x(v*x(0)));Ti(a+336|0,M,112);Ti(a+448|0,d,112);q[a+96>>2]=1065353216;q[a+88>>2]=0;q[a+92>>2]=0;q[a+208>>2]=1065353216;q[a+200>>2]=0;q[a+204>>2]=0;q[a+312>>2]=0;q[a+316>>2]=0;q[a+320>>2]=1065353216;q[a+424>>2]=0;q[a+428>>2]=0;q[a+432>>2]=1065353216;q[a+536>>2]=0;q[a+540>>2]=0;q[a+544>>2]=1065353216;q[a+648>>2]=0;q[a+652>>2]=0;q[a+656>>2]=1065353216}q[c+88>>2]=1065353216;u[c+96>>2]=p;u[c+92>>2]=p;a=n+w(N+1|0,112)|0;u[a+96>>2]=p;u[a+92>>2]=p;q[a+88>>2]=1065353216;a=n+w(N+2|0,112)|0;u[a+96>>2]=p;u[a+92>>2]=p;q[a+88>>2]=1065353216;a=n+w(N+3|0,112)|0;u[a+96>>2]=p;u[a+92>>2]=p;q[a+88>>2]=1065353216;a=n+w(N+4|0,112)|0;u[a+96>>2]=p;u[a+92>>2]=p;q[a+88>>2]=1065353216;a=n+w(N+5|0,112)|0;u[a+96>>2]=p;u[a+92>>2]=p;q[a+88>>2]=1065353216}e=x(Aa+u[f+8>>2]);G:{if(x(y(e))>2]=(va>>>0)/6;Pi(3,112261,113014,h+16|0)}a=w(a,Z)}a=a+q[k+1952>>2]|0;q[Ha+1952>>2]=a;$=$+4|0;if((xa|0)!=($|0)){continue}break f}break}break a}break a}a=q[k+1952>>2]}q[(w(W,304)+ta|0)+284>>2]=a-q[m+280>>2];po(k,m)}}Ii=h+1168|0;return}J(112884,112895,479,112951);G()}function Ffa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0;f=Ii-464|0;Ii=f;e=r[c+384|0];d=e&2;if(d){Pi(3,88531,93008,0)}x=e&1;y=b&48;if((y|0)==48){q[f+4>>2]=d?93224:93232;q[f>>2]=x?93224:93232;Pi(3,88531,93095,f)}z=b&32;A=b&16;Ti(f+56|0,c,388);e=r[a+156|0]&4?4:1;j=e>>>0>1?e:1;e=-1;d=-1;a:{b:{c:{d:{e:{f:{g:{h:{i:{while(1){j:{if(!(q[(h<<2)+92992>>2]&b)){break j}i=(f+56|0)+(h<<4)|0;g=s[i+4>>1];i=s[i+6>>1];if((e|0)==-1){d=i;e=g;break j}if((e|0)!=(g|0)|(d|0)!=(i|0)){break i}}h=h+1|0;if((j|0)!=(h|0)){continue}break}if(!y){break h}g=s[f+126>>1];i=s[f+124>>1];if(!z){if((e|0)==-1){break h}if((e|0)!=(i|0)){break i}if((d|0)==(g|0)){break h}break i}h=s[f+142>>1];j=s[f+140>>1];if(!A){if((e|0)==-1){break h}if((e|0)!=(j|0)){break i}if((d|0)==(h|0)){break h}break i}if((e|0)!=-1){if((e|0)!=(i|0)|(d|0)!=(g|0)|((e|0)!=(j|0)|(d|0)!=(h|0))){break i}break h}if((i|0)!=(j|0)){break i}if((g|0)==(h|0)){break h}}Pi(4,88531,93239,0);a=0;b=0;break g}d=Ui($i(456),0,452);q[d+28>>2]=0;q[d+32>>2]=0;q[d+24>>2]=1;q[d+16>>2]=2;q[d+20>>2]=1;q[d+8>>2]=3;q[d+12>>2]=5;q[d+36>>2]=0;q[d+40>>2]=0;o[d+43|0]=0;o[d+44|0]=0;o[d+45|0]=0;o[d+46|0]=0;q[d+92>>2]=0;q[d+96>>2]=0;q[d+88>>2]=1;q[d+80>>2]=2;q[d+84>>2]=1;q[d+72>>2]=3;q[d+76>>2]=5;q[d+64>>2]=0;q[d+68>>2]=0;q[d+100>>2]=0;q[d+104>>2]=0;o[d+107|0]=0;o[d+108|0]=0;o[d+109|0]=0;o[d+110|0]=0;q[d+152>>2]=1;q[d+128>>2]=0;q[d+132>>2]=0;q[d+136>>2]=3;q[d+140>>2]=5;q[d+144>>2]=2;q[d+148>>2]=1;o[d+171|0]=0;o[d+172|0]=0;o[d+173|0]=0;o[d+174|0]=0;q[d+164>>2]=0;q[d+168>>2]=0;q[d+156>>2]=0;q[d+160>>2]=0;q[d+216>>2]=1;q[d+192>>2]=0;q[d+196>>2]=0;q[d+200>>2]=3;q[d+204>>2]=5;q[d+208>>2]=2;q[d+212>>2]=1;q[d+220>>2]=0;q[d+224>>2]=0;q[d+228>>2]=0;q[d+232>>2]=0;o[d+235|0]=0;o[d+236|0]=0;o[d+237|0]=0;o[d+238|0]=0;q[d+280>>2]=1;q[d+256>>2]=0;q[d+260>>2]=0;q[d+264>>2]=3;q[d+268>>2]=5;q[d+272>>2]=2;q[d+276>>2]=1;q[d+284>>2]=0;q[d+288>>2]=0;q[d+292>>2]=0;q[d+296>>2]=0;o[d+299|0]=0;o[d+300|0]=0;o[d+301|0]=0;o[d+302|0]=0;q[d+344>>2]=1;q[d+320>>2]=0;q[d+324>>2]=0;q[d+328>>2]=3;q[d+332>>2]=5;q[d+336>>2]=2;q[d+340>>2]=1;o[d+363|0]=0;o[d+364|0]=0;o[d+365|0]=0;o[d+366|0]=0;q[d+356>>2]=0;q[d+360>>2]=0;q[d+348>>2]=0;q[d+352>>2]=0;q[d+400>>2]=2;q[d+404>>2]=1;q[d+392>>2]=3;q[d+396>>2]=5;q[d+384>>2]=0;q[d+388>>2]=0;q[d+408>>2]=1;o[d+427|0]=0;o[d+428|0]=0;o[d+429|0]=0;o[d+430|0]=0;q[d+420>>2]=0;q[d+424>>2]=0;q[d+412>>2]=0;q[d+416>>2]=0;q[d+452>>2]=b;sc(1,d+448|0);k:{if(!(r[q[75054]+156|0]&64)){break k}e=K()|0;if(!e){break k}lj(e,93302,2557);J(88669,88575,2557,93302);G()}Ia(36160,q[d+448>>2]);if(r[q[75054]+156|0]&64){e=K()|0;if(e){break f}}if(b&1){g=rq(1);e=w(g,48)+c|0;i=q[e+140>>2];q[f+48>>2]=q[e+136>>2];q[f+52>>2]=i;i=q[e+132>>2];k=q[e+128>>2];q[f+40>>2]=k;q[f+44>>2]=i;h=q[e+124>>2];l=q[e+120>>2];q[f+32>>2]=l;q[f+36>>2]=h;j=q[e+116>>2];m=q[e+112>>2];q[f+24>>2]=m;q[f+28>>2]=j;n=q[e+108>>2];t=q[e+104>>2];q[f+16>>2]=t;q[f+20>>2]=n;u=q[e+100>>2];v=q[e+96>>2];q[f+8>>2]=v;q[f+12>>2]=u;e=(g<<4)+c|0;g=q[e+12>>2];q[f+456>>2]=q[e+8>>2];q[f+460>>2]=g;g=q[e+4>>2];q[f+448>>2]=q[e>>2];q[f+452>>2]=g;g=r[f+51|0]|r[f+52|0]<<8|(r[f+53|0]<<16|r[f+54|0]<<24);e=r[f+47|0]|r[f+48|0]<<8|(r[f+49|0]<<16|r[f+50|0]<<24);q[d+56>>2]=2;o[d+39|0]=e;o[d+40|0]=e>>>8;o[d+41|0]=e>>>16;o[d+42|0]=e>>>24;o[d+43|0]=g;o[d+44|0]=g>>>8;o[d+45|0]=g>>>16;o[d+46|0]=g>>>24;q[d+32>>2]=k;q[d+36>>2]=i;q[d+24>>2]=l;q[d+28>>2]=h;q[d+16>>2]=m;q[d+20>>2]=j;q[d+8>>2]=t;q[d+12>>2]=n;q[d>>2]=v;q[d+4>>2]=u;e=Mi[q[75008]](a,f+448|0)|0;q[d>>2]=0;q[d+4>>2]=0;q[d+48>>2]=e;q[d+52>>2]=Li}if(b&2){g=rq(2);e=w(g,48)+c|0;i=q[e+140>>2];q[f+48>>2]=q[e+136>>2];q[f+52>>2]=i;i=q[e+132>>2];k=q[e+128>>2];q[f+40>>2]=k;q[f+44>>2]=i;h=q[e+124>>2];l=q[e+120>>2];q[f+32>>2]=l;q[f+36>>2]=h;j=q[e+116>>2];m=q[e+112>>2];q[f+24>>2]=m;q[f+28>>2]=j;n=q[e+108>>2];t=q[e+104>>2];q[f+16>>2]=t;q[f+20>>2]=n;u=q[e+100>>2];v=q[e+96>>2];q[f+8>>2]=v;q[f+12>>2]=u;e=(g<<4)+c|0;g=q[e+12>>2];q[f+456>>2]=q[e+8>>2];q[f+460>>2]=g;g=q[e+4>>2];q[f+448>>2]=q[e>>2];q[f+452>>2]=g;g=r[f+51|0]|r[f+52|0]<<8|(r[f+53|0]<<16|r[f+54|0]<<24);e=r[f+47|0]|r[f+48|0]<<8|(r[f+49|0]<<16|r[f+50|0]<<24);q[d+120>>2]=2;o[d+103|0]=e;o[d+104|0]=e>>>8;o[d+105|0]=e>>>16;o[d+106|0]=e>>>24;o[d+107|0]=g;o[d+108|0]=g>>>8;o[d+109|0]=g>>>16;o[d+110|0]=g>>>24;q[d+96>>2]=k;q[d+100>>2]=i;q[d+88>>2]=l;q[d+92>>2]=h;q[d+80>>2]=m;q[d+84>>2]=j;q[d+72>>2]=t;q[d+76>>2]=n;q[d+64>>2]=v;q[d+68>>2]=u;e=Mi[q[75008]](a,f+448|0)|0;q[d+64>>2]=0;q[d+68>>2]=0;q[d+112>>2]=e;q[d+116>>2]=Li}if(b&4){g=rq(4);e=w(g,48)+c|0;i=q[e+140>>2];q[f+48>>2]=q[e+136>>2];q[f+52>>2]=i;i=q[e+132>>2];k=q[e+128>>2];q[f+40>>2]=k;q[f+44>>2]=i;h=q[e+124>>2];l=q[e+120>>2];q[f+32>>2]=l;q[f+36>>2]=h;j=q[e+116>>2];m=q[e+112>>2];q[f+24>>2]=m;q[f+28>>2]=j;n=q[e+108>>2];t=q[e+104>>2];q[f+16>>2]=t;q[f+20>>2]=n;u=q[e+100>>2];v=q[e+96>>2];q[f+8>>2]=v;q[f+12>>2]=u;e=(g<<4)+c|0;g=q[e+12>>2];q[f+456>>2]=q[e+8>>2];q[f+460>>2]=g;g=q[e+4>>2];q[f+448>>2]=q[e>>2];q[f+452>>2]=g;g=r[f+51|0]|r[f+52|0]<<8|(r[f+53|0]<<16|r[f+54|0]<<24);e=r[f+47|0]|r[f+48|0]<<8|(r[f+49|0]<<16|r[f+50|0]<<24);q[d+184>>2]=2;o[d+167|0]=e;o[d+168|0]=e>>>8;o[d+169|0]=e>>>16;o[d+170|0]=e>>>24;o[d+171|0]=g;o[d+172|0]=g>>>8;o[d+173|0]=g>>>16;o[d+174|0]=g>>>24;q[d+160>>2]=k;q[d+164>>2]=i;q[d+152>>2]=l;q[d+156>>2]=h;q[d+144>>2]=m;q[d+148>>2]=j;q[d+136>>2]=t;q[d+140>>2]=n;q[d+128>>2]=v;q[d+132>>2]=u;e=Mi[q[75008]](a,f+448|0)|0;q[d+128>>2]=0;q[d+132>>2]=0;q[d+176>>2]=e;q[d+180>>2]=Li}if(b&8){e=rq(8);b=w(e,48)+c|0;g=q[b+140>>2];q[f+48>>2]=q[b+136>>2];q[f+52>>2]=g;g=q[b+132>>2];u=q[b+128>>2];q[f+40>>2]=u;q[f+44>>2]=g;i=q[b+124>>2];k=q[b+120>>2];q[f+32>>2]=k;q[f+36>>2]=i;h=q[b+116>>2];l=q[b+112>>2];q[f+24>>2]=l;q[f+28>>2]=h;j=q[b+108>>2];m=q[b+104>>2];q[f+16>>2]=m;q[f+20>>2]=j;n=q[b+100>>2];t=q[b+96>>2];q[f+8>>2]=t;q[f+12>>2]=n;b=(e<<4)+c|0;e=q[b+12>>2];q[f+456>>2]=q[b+8>>2];q[f+460>>2]=e;e=q[b+4>>2];q[f+448>>2]=q[b>>2];q[f+452>>2]=e;e=r[f+51|0]|r[f+52|0]<<8|(r[f+53|0]<<16|r[f+54|0]<<24);b=r[f+47|0]|r[f+48|0]<<8|(r[f+49|0]<<16|r[f+50|0]<<24);q[d+248>>2]=2;o[d+231|0]=b;o[d+232|0]=b>>>8;o[d+233|0]=b>>>16;o[d+234|0]=b>>>24;o[d+235|0]=e;o[d+236|0]=e>>>8;o[d+237|0]=e>>>16;o[d+238|0]=e>>>24;q[d+224>>2]=u;q[d+228>>2]=g;q[d+216>>2]=k;q[d+220>>2]=i;q[d+208>>2]=l;q[d+212>>2]=h;q[d+200>>2]=m;q[d+204>>2]=j;q[d+192>>2]=t;q[d+196>>2]=n;b=Mi[q[75008]](a,f+448|0)|0;q[d+192>>2]=0;q[d+196>>2]=0;q[d+240>>2]=b;q[d+244>>2]=Li}l:{if(!y){break l}if((y|0)==48){if(x){b=q[c+76>>2];q[f+456>>2]=q[c+72>>2];q[f+460>>2]=b;b=q[c+68>>2];q[f+448>>2]=q[c+64>>2];q[f+452>>2]=b;b=r[c+331|0]|r[c+332|0]<<8|(r[c+333|0]<<16|r[c+334|0]<<24);e=r[c+327|0]|r[c+328|0]<<8|(r[c+329|0]<<16|r[c+330|0]<<24);o[d+423|0]=e;o[d+424|0]=e>>>8;o[d+425|0]=e>>>16;o[d+426|0]=e>>>24;o[d+427|0]=b;o[d+428|0]=b>>>8;o[d+429|0]=b>>>16;o[d+430|0]=b>>>24;b=q[c+324>>2];q[d+416>>2]=q[c+320>>2];q[d+420>>2]=b;b=q[c+316>>2];q[d+408>>2]=q[c+312>>2];q[d+412>>2]=b;b=q[c+308>>2];q[d+400>>2]=q[c+304>>2];q[d+404>>2]=b;b=q[c+300>>2];q[d+392>>2]=q[c+296>>2];q[d+396>>2]=b;b=q[c+292>>2];q[d+384>>2]=q[c+288>>2];q[d+388>>2]=b;q[d+440>>2]=2;b=Mi[q[75008]](a,f+448|0)|0;q[d+384>>2]=0;q[d+388>>2]=0;q[d+432>>2]=b;q[d+436>>2]=Li;break l}if(r[a+156|0]&16){b=q[c+292>>2];q[d+384>>2]=q[c+288>>2];q[d+388>>2]=b;b=r[c+331|0]|r[c+332|0]<<8|(r[c+333|0]<<16|r[c+334|0]<<24);e=r[c+327|0]|r[c+328|0]<<8|(r[c+329|0]<<16|r[c+330|0]<<24);o[d+423|0]=e;o[d+424|0]=e>>>8;o[d+425|0]=e>>>16;o[d+426|0]=e>>>24;o[d+427|0]=b;o[d+428|0]=b>>>8;o[d+429|0]=b>>>16;o[d+430|0]=b>>>24;b=q[c+324>>2];q[d+416>>2]=q[c+320>>2];q[d+420>>2]=b;b=q[c+316>>2];q[d+408>>2]=q[c+312>>2];q[d+412>>2]=b;b=q[c+308>>2];q[d+400>>2]=q[c+304>>2];q[d+404>>2]=b;b=q[c+300>>2];q[d+392>>2]=q[c+296>>2];q[d+396>>2]=b;q[d+440>>2]=1;ma(1,d+432|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}q[d+384>>2]=0;q[d+388>>2]=0;break l}b=q[c+292>>2];q[d+256>>2]=q[c+288>>2];q[d+260>>2]=b;b=r[c+331|0]|r[c+332|0]<<8|(r[c+333|0]<<16|r[c+334|0]<<24);e=r[c+327|0]|r[c+328|0]<<8|(r[c+329|0]<<16|r[c+330|0]<<24);o[d+295|0]=e;o[d+296|0]=e>>>8;o[d+297|0]=e>>>16;o[d+298|0]=e>>>24;o[d+299|0]=b;o[d+300|0]=b>>>8;o[d+301|0]=b>>>16;o[d+302|0]=b>>>24;b=q[c+324>>2];q[d+288>>2]=q[c+320>>2];q[d+292>>2]=b;b=q[c+316>>2];q[d+280>>2]=q[c+312>>2];q[d+284>>2]=b;b=q[c+308>>2];q[d+272>>2]=q[c+304>>2];q[d+276>>2]=b;b=q[c+300>>2];q[d+264>>2]=q[c+296>>2];q[d+268>>2]=b;q[d+312>>2]=1;g=d+304|0;ma(1,g|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}b=q[c+340>>2];q[d+256>>2]=q[c+336>>2];q[d+260>>2]=b;b=r[c+379|0]|r[c+380|0]<<8|(r[c+381|0]<<16|r[c+382|0]<<24);e=r[c+375|0]|r[c+376|0]<<8|(r[c+377|0]<<16|r[c+378|0]<<24);o[d+295|0]=e;o[d+296|0]=e>>>8;o[d+297|0]=e>>>16;o[d+298|0]=e>>>24;o[d+299|0]=b;o[d+300|0]=b>>>8;o[d+301|0]=b>>>16;o[d+302|0]=b>>>24;b=q[c+372>>2];q[d+288>>2]=q[c+368>>2];q[d+292>>2]=b;b=q[c+364>>2];q[d+280>>2]=q[c+360>>2];q[d+284>>2]=b;b=q[c+356>>2];q[d+272>>2]=q[c+352>>2];q[d+276>>2]=b;b=q[c+348>>2];q[d+264>>2]=q[c+344>>2];q[d+268>>2]=b;q[d+312>>2]=1;ma(1,g|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}q[d+256>>2]=0;q[d+260>>2]=0;break l}if(A){b=q[c+76>>2];q[f+456>>2]=q[c+72>>2];q[f+460>>2]=b;b=q[c+68>>2];q[f+448>>2]=q[c+64>>2];q[f+452>>2]=b;b=r[c+331|0]|r[c+332|0]<<8|(r[c+333|0]<<16|r[c+334|0]<<24);e=r[c+327|0]|r[c+328|0]<<8|(r[c+329|0]<<16|r[c+330|0]<<24);o[d+295|0]=e;o[d+296|0]=e>>>8;o[d+297|0]=e>>>16;o[d+298|0]=e>>>24;o[d+299|0]=b;o[d+300|0]=b>>>8;o[d+301|0]=b>>>16;o[d+302|0]=b>>>24;b=q[c+324>>2];q[d+288>>2]=q[c+320>>2];q[d+292>>2]=b;b=q[c+316>>2];q[d+280>>2]=q[c+312>>2];q[d+284>>2]=b;b=q[c+308>>2];q[d+272>>2]=q[c+304>>2];q[d+276>>2]=b;b=q[c+300>>2];q[d+264>>2]=q[c+296>>2];q[d+268>>2]=b;b=q[c+292>>2];q[d+256>>2]=q[c+288>>2];q[d+260>>2]=b;q[d+312>>2]=x?2:1;m:{if(!x){ma(1,d+304|0);if(!(r[q[75054]+156|0]&64)){break m}b=K()|0;if(!b){break m}break a}q[d+304>>2]=Mi[q[75008]](a,f+448|0);q[d+308>>2]=Li}q[d+256>>2]=0;q[d+260>>2]=0;break l}if(!z){break l}b=q[c+340>>2];q[d+320>>2]=q[c+336>>2];q[d+324>>2]=b;b=r[c+379|0]|r[c+380|0]<<8|(r[c+381|0]<<16|r[c+382|0]<<24);e=r[c+375|0]|r[c+376|0]<<8|(r[c+377|0]<<16|r[c+378|0]<<24);o[d+359|0]=e;o[d+360|0]=e>>>8;o[d+361|0]=e>>>16;o[d+362|0]=e>>>24;o[d+363|0]=b;o[d+364|0]=b>>>8;o[d+365|0]=b>>>16;o[d+366|0]=b>>>24;b=q[c+372>>2];q[d+352>>2]=q[c+368>>2];q[d+356>>2]=b;b=q[c+364>>2];q[d+344>>2]=q[c+360>>2];q[d+348>>2]=b;b=q[c+356>>2];q[d+336>>2]=q[c+352>>2];q[d+340>>2]=b;b=q[c+348>>2];q[d+328>>2]=q[c+344>>2];q[d+332>>2]=b;q[d+376>>2]=1;ma(1,d+368|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}q[d+320>>2]=0;q[d+324>>2]=0}PK(a,d);b=za(36160)|0;if((b|0)!=36053){break e}Ia(36160,Ua()|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break d}}b=q[a+32>>2];n:{o:{if(!b){c=q[a+24>>2];h=8;break o}c=q[a+24>>2];h=0;p:{while(1){if(q[(h<<2)+c>>2]){h=h+1|0;if((h|0)!=(b|0)){continue}break p}break}if((h|0)!=-1){break n}}h=b+8|0;if(h>>>0>65535){break c}}q[a+24>>2]=ul(c,h<<2);q[a+28>>2]=ul(q[a+28>>2],h<<1);b=q[a+24>>2]+(q[a+32>>2]<<2)|0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=q[a+28>>2]+(q[a+32>>2]<<1)|0;p[b>>1]=0;p[b+2>>1]=0;p[b+4>>1]=0;p[b+6>>1]=0;p[b+8>>1]=0;p[b+10>>1]=0;p[b+12>>1]=0;p[b+14>>1]=0;b=q[a+32>>2]+8|0;q[a+32>>2]=b}q:{if(b){c=q[a+24>>2];h=0;while(1){e=c+(h<<2)|0;if(!q[e>>2]){break q}h=h+1|0;if((h|0)!=(b|0)){continue}break}}J(93784,91032,238,93815);G()}b=s[a+36>>1];b=b>>>0>65533?1:b+1|0;p[a+36>>1]=b;p[q[a+28>>2]+(h<<1)>>1]=b;q[e>>2]=d;a=s[a+36>>1]<<16|h;if((a|0)==-1){break b}b=2}Ii=f+464|0;Li=b;return a|0}lj(e,93302,2559);J(88669,88575,2559,93302);G()}dw(b);J(93324,88575,2616,93302);G()}lj(b,93302,2618);J(88669,88575,2618,93302);G()}J(93752,91032,200,93775);G()}J(93819,91032,251,93815);G()}lj(b,93330,2367);J(88669,88575,2367,93330);G()}function F5(a,b,c,d,e){var f=0,g=0,h=x(0),i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),p=x(0),v=0,y=x(0),z=x(0),A=0,B=0,C=0,D=0,E=x(0),F=0,H=0,I=0,K=x(0),L=x(0),M=0,N=0,O=x(0),P=0,Q=0,R=0,S=x(0),T=x(0);f=Ii-128|0;Ii=f;a:{b:{c:{d:{if(!(r[b+186|0]&8)|(!c|!q[b+160>>2])){break d}e:{f:{g:{h:{g=q[b+76>>2];if(!g){break h}k=q[g+4>>2];if(!k){break h}l=a+60|0;A=q[a+52>>2];g=q[l>>2]-A>>6;if(g>>>0>>0){if(o[a- -64|0]&1){break a}Wi(k,64,a+52|0,l,a+56|0);A=q[a+52>>2];g=q[a+60>>2]-A>>6}if(g>>>0>>0){break b}g=k<<6;q[a+56>>2]=g+A;l=q[b+112>>2];C=q[b+116>>2]-l|0;k=(C|0)/176|0;if(C){C=0;v=0-g|0;v=((g|0)<(v|0)?v:g)>>>6|0;g=(g|0)>-1?g:-1;v=w(v,(g|0)<1?g:1);D=k>>>0>1?k:1;while(1){if((v|0)==(C|0)){break f}k=l+w(C,176)|0;h=u[k+88>>2];j=u[k+84>>2];L=u[k+72>>2];g=k- -64|0;B=q[g+4>>2];H=q[g>>2];g=(C<<6)+A|0;n=u[k+80>>2];i=u[k+48>>2];p=u[k+52>>2];y=x(p+p);K=x(i*y);z=u[k+60>>2];E=u[k+56>>2];m=x(E+E);O=x(z*m);u[g+4>>2]=n*x(K+O);S=x(i*m);T=x(y*z);u[g+8>>2]=n*x(S-T);u[g+12>>2]=n*x(0);u[g+16>>2]=j*x(K-O);K=i;i=x(i+i);K=x(x(1)-x(K*i));E=x(E*m);u[g+20>>2]=j*x(K-E);m=x(p*m);i=x(i*z);u[g+24>>2]=j*x(m+i);u[g+28>>2]=j*x(0);u[g+32>>2]=h*x(S+T);u[g+36>>2]=h*x(m-i);j=x(p*y);u[g+40>>2]=h*x(K-j);u[g+44>>2]=h*x(0);q[g+48>>2]=H;q[g+52>>2]=B;q[g+60>>2]=1065353216;u[g+56>>2]=L;u[g>>2]=n*x(x(x(1)-j)-E);C=C+1|0;if((D|0)!=(C|0)){continue}break}}g=q[b+68>>2];k=0;while(1){l=q[g>>2];if((q[g+4>>2]-l|0)/80>>>0<=k>>>0){break c}b=(k<<6)+A|0;_k(f- -64|0,b,l+w(k,80)|0);u[b>>2]=u[f+64>>2];u[b+4>>2]=u[f+68>>2];u[b+8>>2]=u[f+72>>2];u[b+12>>2]=u[f+76>>2];u[b+16>>2]=u[f+80>>2];u[b+20>>2]=u[f+84>>2];u[b+24>>2]=u[f+88>>2];u[b+28>>2]=u[f+92>>2];u[b+32>>2]=u[f+96>>2];u[b+36>>2]=u[f+100>>2];u[b+40>>2]=u[f+104>>2];u[b+44>>2]=u[f+108>>2];u[b+48>>2]=u[f+112>>2];u[b+52>>2]=u[f+116>>2];u[b+56>>2]=u[f+120>>2];u[b+60>>2]=u[f+124>>2];k=k+1|0;A=q[a+52>>2];if(k>>>0>2]-A>>6>>>0){continue}break}break g}q[a+56>>2]=q[a+52>>2]}u[f>>2]=u[d>>2];u[f+4>>2]=u[d+4>>2];u[f+8>>2]=u[d+8>>2];u[f+12>>2]=u[d+12>>2];u[f+16>>2]=u[d+16>>2];u[f+20>>2]=u[d+20>>2];u[f+24>>2]=u[d+24>>2];u[f+28>>2]=u[d+28>>2];u[f+32>>2]=u[d+32>>2];u[f+36>>2]=u[d+36>>2];u[f+40>>2]=u[d+40>>2];u[f+44>>2]=u[d+44>>2];u[f+48>>2]=u[d+48>>2];u[f+52>>2]=u[d+52>>2];u[f+56>>2]=u[d+56>>2];u[f+60>>2]=u[d+60>>2];gu(f- -64|0,f);h=u[f+120>>2];u[f+120>>2]=u[f+108>>2];j=u[f+116>>2];u[f+116>>2]=u[f+92>>2];u[f+108>>2]=h;h=u[f+100>>2];u[f+100>>2]=u[f+88>>2];u[f+92>>2]=j;u[f+88>>2]=h;h=u[f+112>>2];u[f+112>>2]=u[f+76>>2];j=u[f+96>>2];u[f+96>>2]=u[f+72>>2];i=u[f+80>>2];u[f+80>>2]=u[f+68>>2];u[f+76>>2]=h;u[f+72>>2]=j;u[f+68>>2]=i;i:{A=a+76|0;k=q[a+68>>2];b=q[A>>2]-k>>4;g=t[c+36>>2]/3|0;if(b>>>0>>0){if(o[a+80|0]&1){break i}Wi(g,16,a+68|0,A,a+72|0);k=q[a+68>>2];b=q[a+76>>2]-k>>4}if(b>>>0>=g>>>0){q[a+72>>2]=(g<<4)+k;j:{A=a+92|0;k=q[a+84>>2];b=q[A>>2]-k>>4;if(b>>>0>>0){if(o[a+96|0]&1){break j}Wi(g,16,a+84|0,A,a+88|0);k=q[a+84>>2];b=q[a+92>>2]-k>>4}if(b>>>0>=g>>>0){q[a+88>>2]=(g<<4)+k;k:{A=a+108|0;k=q[a+100>>2];b=q[A>>2]-k>>4;if(b>>>0>>0){if(o[a+112|0]&1){break k}Wi(g,16,a+100|0,A,a+104|0);k=q[a+100>>2];b=q[a+108>>2]-k>>4}if(b>>>0>=g>>>0){q[a+104>>2]=(g<<4)+k;B=q[c+36>>2];v=(B>>>0)/3|0;A=q[a+84>>2];C=q[a+68>>2];g=q[c+32>>2];l:{m:{n:{N=q[c+112>>2];if(N){H=q[a+52>>2];b=q[a+56>>2]-H|0;if(b){break n}}if(B>>>0<3){break m}D=v>>>0>1?v:1;l=0;b=C;while(1){n=u[d+48>>2];p=u[d+32>>2];m=u[d>>2];y=u[d+16>>2];z=u[d+52>>2];E=u[d+36>>2];L=u[d+4>>2];K=u[d+20>>2];h=u[g>>2];j=u[g+4>>2];i=u[g+8>>2];u[b+8>>2]=u[d+56>>2]+x(x(x(h*u[d+8>>2])+x(j*u[d+24>>2]))+x(i*u[d+40>>2]));u[b+4>>2]=z+x(x(x(h*L)+x(j*K))+x(i*E));u[b>>2]=n+x(x(x(h*m)+x(j*y))+x(i*p));b=b+12|0;g=g+12|0;l=l+1|0;if((D|0)!=(l|0)){continue}break}break m}if(B>>>0<3){break m}I=b>>6;P=q[c+100>>2];Q=q[c+108>>2];R=v>>>0>1?v:1;D=0;l=C;while(1){h=x(0);j=x(0);i=x(0);b=D<<4;F=b+P|0;y=u[F>>2];o:{if(y==x(0)){break o}M=b+Q|0;b=q[M>>2];if(b>>>0>=I>>>0){break l}b=H+(b<<6)|0;n=u[g>>2];p=u[g+4>>2];m=u[g+8>>2];h=x(x(y*x(u[b+48>>2]+x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2]))))+x(0));i=x(x(y*x(u[b+56>>2]+x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2]))))+x(0));j=x(x(y*x(u[b+52>>2]+x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2]))))+x(0));y=u[F+4>>2];if(y==x(0)){break o}b=q[M+4>>2];if(b>>>0>=I>>>0){break c}b=H+(b<<6)|0;h=x(h+x(y*x(u[b+48>>2]+x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2])))));i=x(i+x(y*x(u[b+56>>2]+x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2])))));j=x(j+x(y*x(u[b+52>>2]+x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2])))));y=u[F+8>>2];if(y==x(0)){break o}b=q[M+8>>2];if(b>>>0>=I>>>0){break c}b=H+(b<<6)|0;h=x(h+x(y*x(u[b+48>>2]+x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2])))));i=x(i+x(y*x(u[b+56>>2]+x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2])))));j=x(j+x(y*x(u[b+52>>2]+x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2])))));y=u[F+12>>2];if(y==x(0)){break o}b=q[M+12>>2];if(b>>>0>=I>>>0){break c}b=H+(b<<6)|0;h=x(h+x(y*x(u[b+48>>2]+x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2])))));i=x(i+x(y*x(u[b+56>>2]+x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2])))));j=x(j+x(y*x(u[b+52>>2]+x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2])))))}g=g+12|0;n=u[d+48>>2];p=u[d+32>>2];m=u[d>>2];y=u[d+16>>2];z=u[d+52>>2];E=u[d+36>>2];L=u[d+4>>2];K=u[d+20>>2];u[l+8>>2]=u[d+56>>2]+x(x(x(h*u[d+8>>2])+x(j*u[d+24>>2]))+x(i*u[d+40>>2]));u[l+4>>2]=z+x(x(x(h*L)+x(j*K))+x(i*E));u[l>>2]=n+x(x(x(h*m)+x(j*y))+x(i*p));l=l+12|0;D=D+1|0;if((R|0)!=(D|0)){continue}break}}p:{q:{if(!q[c+44>>2]){break q}M=q[c+52>>2];b=0;r:{if(!M){break r}b=q[c+48>>2]}D=q[c+40>>2];s:{if(N){g=q[a+52>>2];a=q[a+56>>2]-g|0;if(a){break s}}if(B>>>0<3){break q}H=v>>>0>1?v:1;a=0;if(!M){g=A;while(1){n=u[f+96>>2];p=u[f+80>>2];m=u[f+64>>2];y=u[f+100>>2];z=u[f+84>>2];E=u[f+68>>2];b=D+w(a,12)|0;h=u[b>>2];j=u[b+4>>2];i=u[b+8>>2];u[g+8>>2]=x(x(h*u[f+72>>2])+x(j*u[f+88>>2]))+x(i*u[f+104>>2]);u[g+4>>2]=x(x(h*E)+x(j*z))+x(i*y);u[g>>2]=x(x(h*m)+x(j*p))+x(i*n);g=g+12|0;a=a+1|0;if((H|0)!=(a|0)){continue}break}break q}g=A;d=k;while(1){n=u[f+96>>2];p=u[f+80>>2];m=u[f+64>>2];y=u[f+100>>2];z=u[f+84>>2];E=u[f+68>>2];l=w(a,12);h=u[l+D>>2];I=l+4|0;j=u[I+D>>2];F=l+8|0;i=u[F+D>>2];u[g+8>>2]=x(x(h*u[f+72>>2])+x(j*u[f+88>>2]))+x(i*u[f+104>>2]);u[g+4>>2]=x(x(h*E)+x(j*z))+x(i*y);u[g>>2]=x(x(h*m)+x(j*p))+x(i*n);n=u[f+96>>2];p=u[f+64>>2];m=u[f+80>>2];y=u[f+100>>2];z=u[f+68>>2];E=u[f+84>>2];h=u[b+l>>2];j=u[b+I>>2];i=u[b+F>>2];u[d+8>>2]=x(x(h*u[f+72>>2])+x(j*u[f+88>>2]))+x(i*u[f+104>>2]);u[d+4>>2]=x(x(h*z)+x(j*E))+x(i*y);u[d>>2]=x(x(h*p)+x(j*m))+x(i*n);d=d+12|0;g=g+12|0;a=a+1|0;if((H|0)!=(a|0)){continue}break}break q}if(B>>>0<3){break q}H=a>>6;P=q[c+100>>2];Q=q[c+108>>2];R=v>>>0>1?v:1;a=0;d=A;l=k;while(1){h=x(0);j=x(0);i=x(0);y=x(0);b=a<<4;I=b+P|0;z=u[I>>2];t:{if(z==x(0)){break t}F=b+Q|0;b=q[F>>2];if(b>>>0>=H>>>0){break p}N=D+w(a,12)|0;n=u[N>>2];b=g+(b<<6)|0;p=u[N+4>>2];m=u[N+8>>2];h=x(x(z*x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2])))+x(0));y=x(x(z*x(x(x(n*u[b+12>>2])+x(p*u[b+28>>2]))+x(m*u[b+44>>2])))+x(0));i=x(x(z*x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2])))+x(0));j=x(x(z*x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2])))+x(0));z=u[I+4>>2];if(z==x(0)){break t}b=q[F+4>>2];if(b>>>0>=H>>>0){break c}b=g+(b<<6)|0;h=x(h+x(z*x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2]))));y=x(y+x(z*x(x(x(n*u[b+12>>2])+x(p*u[b+28>>2]))+x(m*u[b+44>>2]))));i=x(i+x(z*x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2]))));j=x(j+x(z*x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2]))));z=u[I+8>>2];if(z==x(0)){break t}b=q[F+8>>2];if(b>>>0>=H>>>0){break c}b=g+(b<<6)|0;h=x(h+x(z*x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2]))));y=x(y+x(z*x(x(x(n*u[b+12>>2])+x(p*u[b+28>>2]))+x(m*u[b+44>>2]))));i=x(i+x(z*x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2]))));j=x(j+x(z*x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2]))));z=u[I+12>>2];if(z==x(0)){break t}b=q[F+12>>2];if(b>>>0>=H>>>0){break c}b=g+(b<<6)|0;h=x(h+x(z*x(x(x(n*u[b>>2])+x(p*u[b+16>>2]))+x(m*u[b+32>>2]))));y=x(y+x(z*x(x(x(n*u[b+12>>2])+x(p*u[b+28>>2]))+x(m*u[b+44>>2]))));i=x(i+x(z*x(x(x(n*u[b+8>>2])+x(p*u[b+24>>2]))+x(m*u[b+40>>2]))));j=x(j+x(z*x(x(x(n*u[b+4>>2])+x(p*u[b+20>>2]))+x(m*u[b+36>>2]))))}n=u[f+96>>2];p=u[f+64>>2];m=u[f+80>>2];z=u[f+100>>2];E=u[f+68>>2];L=u[f+84>>2];u[d+8>>2]=x(x(h*u[f+72>>2])+x(j*u[f+88>>2]))+x(i*u[f+104>>2]);u[d+4>>2]=x(x(h*E)+x(j*L))+x(i*z);u[d>>2]=x(x(h*p)+x(j*m))+x(i*n);if(M){n=u[f+112>>2];p=u[f+96>>2];m=u[f+64>>2];z=u[f+80>>2];E=u[f+116>>2];L=u[f+100>>2];K=u[f+68>>2];O=u[f+84>>2];u[l+8>>2]=x(x(x(h*u[f+72>>2])+x(j*u[f+88>>2]))+x(i*u[f+104>>2]))+x(y*u[f+120>>2]);u[l+4>>2]=x(x(x(h*K)+x(j*O))+x(i*L))+x(y*E);u[l>>2]=x(x(x(h*m)+x(j*z))+x(i*p))+x(y*n);l=l+12|0}d=d+12|0;a=a+1|0;if((R|0)!=(a|0)){continue}break}}d=0;b=0;b=q[c+68>>2]?q[c+64>>2]:b;d=q[c+80>>2]?q[c+76>>2]:d;if(q[c+60>>2]){g=q[c+56>>2]}else{g=0}a=q[c+92>>2];if(a){break e}if(B>>>0<3){break d}v=v>>>0>1?v:1;c=0;while(1){u[e>>2]=u[C>>2];u[e+12>>2]=u[A>>2];u[e+24>>2]=u[k>>2];u[e+4>>2]=u[C+4>>2];u[e+16>>2]=u[A+4>>2];u[e+28>>2]=u[k+4>>2];u[e+8>>2]=u[C+8>>2];u[e+20>>2]=u[A+8>>2];u[e+32>>2]=u[k+8>>2];u:{if(!g){q[e+36>>2]=1065353216;q[e+40>>2]=1065353216;q[e+44>>2]=1065353216;h=x(1);g=0;break u}u[e+36>>2]=u[g>>2];u[e+40>>2]=u[g+4>>2];u[e+44>>2]=u[g+8>>2];h=u[g+12>>2];g=g+16|0}u[e+48>>2]=h;h=x(0);a=0;l=0;j=x(0);if(b){j=u[b>>2];l=b+4|0}u[e+52>>2]=j;if(d){h=u[d>>2];a=d+4|0}u[e+60>>2]=h;h=x(0);d=0;b=0;j=x(0);if(l){j=u[l>>2];b=l+4|0}u[e+56>>2]=j;if(a){h=u[a>>2];d=a+4|0}A=A+12|0;u[e- -64>>2]=h;e=e+68|0;k=k+12|0;C=C+12|0;c=c+1|0;if((v|0)!=(c|0)){continue}break}break d}break c}break c}break b}break a}break b}break a}break b}break a}J(152576,152587,479,152554);G()}v:{w:{if(q[c+96>>2]==1){D=a>>>2|0;if(!D){break d}a=0;B=q[c+88>>2];if(B){break v}H=!b;I=!g;c=!d;break w}D=a>>>1|0;if(!D){break d}H=!b;I=!g;a=q[c+88>>2];c=!d}l=0;while(1){F=s[(l<<1)+a>>1];v=w(F,12);u[e>>2]=u[v+C>>2];u[e+12>>2]=u[v+A>>2];u[e+24>>2]=u[k+v>>2];B=v+4|0;u[e+4>>2]=u[B+C>>2];u[e+16>>2]=u[A+B>>2];u[e+28>>2]=u[k+B>>2];v=v+8|0;u[e+8>>2]=u[v+C>>2];u[e+20>>2]=u[v+A>>2];u[e+32>>2]=u[k+v>>2];v=e;x:{if(!I){B=F<<4;u[e+36>>2]=u[B+g>>2];u[e+40>>2]=u[(B|4)+g>>2];u[e+44>>2]=u[(B|8)+g>>2];i=u[(B|12)+g>>2];break x}q[e+36>>2]=1065353216;q[e+40>>2]=1065353216;q[e+44>>2]=1065353216;i=x(1)}u[v+48>>2]=i;B=F<<1;y:{if(!H){F=B<<2;u[e+52>>2]=u[F+b>>2];u[e+60>>2]=c?x(0):u[d+F>>2];v=(B|1)<<2;u[e+56>>2]=u[v+b>>2];u[e- -64>>2]=c?x(0):u[d+v>>2];break y}if(!c){q[e+52>>2]=0;v=B<<2;h=u[v+d>>2];q[e+56>>2]=0;u[e+60>>2]=h;u[e- -64>>2]=u[(v|4)+d>>2];break y}v=e+52|0;q[v>>2]=0;q[v+4>>2]=0;q[e+60>>2]=0;q[e+64>>2]=0}e=e+68|0;l=l+1|0;if((D|0)!=(l|0)){continue}break}break d}while(1){v=q[B+(a<<2)>>2];c=w(v,12);u[e>>2]=u[c+C>>2];u[e+12>>2]=u[c+A>>2];u[e+24>>2]=u[c+k>>2];l=c+4|0;u[e+4>>2]=u[l+C>>2];u[e+16>>2]=u[l+A>>2];u[e+28>>2]=u[l+k>>2];c=c+8|0;u[e+8>>2]=u[c+C>>2];u[e+20>>2]=u[c+A>>2];u[e+32>>2]=u[c+k>>2];c=e;z:{if(g){l=v<<4;u[e+36>>2]=u[l+g>>2];u[e+40>>2]=u[(l|4)+g>>2];u[e+44>>2]=u[(l|8)+g>>2];i=u[(l|12)+g>>2];break z}q[e+36>>2]=1065353216;q[e+40>>2]=1065353216;q[e+44>>2]=1065353216;i=x(1)}u[c+48>>2]=i;l=v<<1;A:{if(b){v=l<<2;u[e+52>>2]=u[v+b>>2];u[e+60>>2]=d?u[d+v>>2]:x(0);c=(l|1)<<2;u[e+56>>2]=u[c+b>>2];u[e- -64>>2]=d?u[c+d>>2]:x(0);break A}if(d){q[e+52>>2]=0;c=l<<2;h=u[c+d>>2];q[e+56>>2]=0;u[e+60>>2]=h;u[e- -64>>2]=u[(c|4)+d>>2];break A}c=e+52|0;q[c>>2]=0;q[c+4>>2]=0;q[e+60>>2]=0;q[e+64>>2]=0}e=e+68|0;a=a+1|0;if((D|0)!=(a|0)){continue}break}}Ii=f+128|0;return e}J(152576,152587,486,152554);G()}J(152730,152587,506,152749);G()}J(152643,152587,493,152718);G()}function Qua(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=-2;a:{b:{c:{if(!a){break c}c=q[a+28>>2];if(!c){break c}d:{if(!(!q[a+12>>2]|(q[a+4>>2]?!q[a>>2]:0))){d=q[c+4>>2];break d}q[a+24>>2]=q[70780];return-2}if(!q[a+16>>2]){break b}q[c>>2]=a;q[c+40>>2]=4;e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{if((d|0)==42){if(q[c+24>>2]==2){q[a+48>>2]=vl(0,0,0);b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=31;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=139;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=8;b=q[c+28>>2];if(!b){b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=0;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=0;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=0;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=0;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=0;d=2;b=q[c+132>>2];if((b|0)!=9){d=(b|0)<2?4:(q[c+136>>2]>1)<<2}b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=d;b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=3;q[c+4>>2]=113;break e}e=q[b+36>>2];f=q[b+28>>2];g=q[b+16>>2];h=q[b+44>>2];b=q[b>>2];i=q[c+20>>2];q[c+20>>2]=i+1;d=2;o[i+q[c+8>>2]|0]=((h|0)!=0)<<1|(b|0)!=0|((g|0)!=0)<<2|((f|0)!=0)<<3|((e|0)!=0)<<4;b=q[q[c+28>>2]+4>>2];e=q[c+20>>2];q[c+20>>2]=e+1;o[e+q[c+8>>2]|0]=b;b=q[q[c+28>>2]+4>>2];e=q[c+20>>2];q[c+20>>2]=e+1;o[e+q[c+8>>2]|0]=b>>>8;b=s[q[c+28>>2]+6>>1];e=q[c+20>>2];q[c+20>>2]=e+1;o[e+q[c+8>>2]|0]=b;b=r[q[c+28>>2]+7|0];e=q[c+20>>2];q[c+20>>2]=e+1;o[e+q[c+8>>2]|0]=b;b=q[c+132>>2];if((b|0)!=9){d=(b|0)<2?4:(q[c+136>>2]>1)<<2}b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=d;b=q[q[c+28>>2]+12>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=q[c+28>>2];if(q[b+16>>2]){b=q[b+20>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=q[q[c+28>>2]+20>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>8;b=q[c+28>>2]}if(q[b+44>>2]){q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2],q[c+20>>2])}q[c+4>>2]=69;q[c+32>>2]=0;break o}e=(q[c+48>>2]<<12)-30720|0;d=0;p:{if(q[c+136>>2]>1){break p}b=q[c+132>>2];if((b|0)<2){break p}d=64;if((b|0)<6){break p}d=(b|0)==6?128:192}q[c+4>>2]=113;b=q[c+20>>2];q[c+20>>2]=b+1;f=b+q[c+8>>2]|0;b=d|e;b=q[c+108>>2]?b|32:b;o[f|0]=b>>>8;d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=(b|(b>>>0)%31)^31;if(q[c+108>>2]){b=q[a+48>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>24;d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>16;b=q[a+48>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>8;d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b}q[a+48>>2]=Dq(0,0,0);d=q[c+4>>2]}if((d|0)!=69){break n}}q:{f=q[c+28>>2];if(q[f+16>>2]){d=q[c+20>>2];e=q[c+32>>2];if(e>>>0>=s[f+20>>1]){break q}b=d;while(1){if(q[c+12>>2]==(d|0)){if(!(!q[f+44>>2]|b>>>0>=d>>>0)){q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+b|0,d-b|0)}b=q[a+28>>2];Gl(b);d=q[a+16>>2];e=q[b+20>>2];d=d>>>0>>0?d:e;r:{if(!d){break r}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];q[a+16>>2]=q[a+16>>2]-d;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break r}q[b+16>>2]=q[b+8>>2]}f=q[c+28>>2];d=q[c+20>>2];if((d|0)==q[c+12>>2]){break q}e=q[c+32>>2];b=d}e=r[q[f+16>>2]+e|0];q[c+20>>2]=d+1;o[q[c+8>>2]+d|0]=e;e=q[c+32>>2]+1|0;q[c+32>>2]=e;f=q[c+28>>2];if(s[f+20>>1]<=e>>>0){d=b;break q}else{d=q[c+20>>2];continue}}}q[c+4>>2]=73;break m}s:{if(!q[f+44>>2]){break s}b=q[c+20>>2];if(b>>>0<=d>>>0){break s}q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+d|0,b-d|0);f=q[c+28>>2]}if(q[c+32>>2]==q[f+20>>2]){q[c+4>>2]=73;q[c+32>>2]=0;break m}d=q[c+4>>2]}if((d|0)!=73){break l}f=q[c+28>>2]}if(!q[f+28>>2]){break j}d=q[c+20>>2];b=d;t:{while(1){u:{if(q[c+12>>2]==(d|0)){if(!(!q[q[c+28>>2]+44>>2]|b>>>0>=d>>>0)){q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+b|0,d-b|0)}b=q[a+28>>2];Gl(b);d=q[a+16>>2];e=q[b+20>>2];d=d>>>0>>0?d:e;v:{if(!d){break v}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];q[a+16>>2]=q[a+16>>2]-d;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break v}q[b+16>>2]=q[b+8>>2]}d=q[c+20>>2];if((d|0)==q[c+12>>2]){break u}b=d}e=1;f=q[q[c+28>>2]+28>>2];g=q[c+32>>2];q[c+32>>2]=g+1;f=r[f+g|0];q[c+20>>2]=d+1;o[q[c+8>>2]+d|0]=f;if(f){d=q[c+20>>2];continue}else{d=b;break t}}break}e=0}w:{if(!q[q[c+28>>2]+44>>2]){break w}b=q[c+20>>2];if(b>>>0<=d>>>0){break w}q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+d|0,b-d|0)}if(e){break k}d=q[c+4>>2]}if((d|0)==91){break i}break h}q[c+32>>2]=0}q[c+4>>2]=91}if(!q[q[c+28>>2]+36>>2]){break g}d=q[c+20>>2];b=d;x:{while(1){y:{if(q[c+12>>2]==(d|0)){if(!(!q[q[c+28>>2]+44>>2]|b>>>0>=d>>>0)){q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+b|0,d-b|0)}b=q[a+28>>2];Gl(b);d=q[a+16>>2];e=q[b+20>>2];d=d>>>0>>0?d:e;z:{if(!d){break z}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];q[a+16>>2]=q[a+16>>2]-d;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break z}q[b+16>>2]=q[b+8>>2]}d=q[c+20>>2];if((d|0)==q[c+12>>2]){break y}b=d}e=1;f=q[q[c+28>>2]+36>>2];g=q[c+32>>2];q[c+32>>2]=g+1;f=r[f+g|0];q[c+20>>2]=d+1;o[q[c+8>>2]+d|0]=f;if(f){d=q[c+20>>2];continue}else{d=b;break x}}break}e=0}A:{if(!q[q[c+28>>2]+44>>2]){break A}b=q[c+20>>2];if(b>>>0<=d>>>0){break A}q[a+48>>2]=vl(q[a+48>>2],q[c+8>>2]+d|0,b-d|0)}if(e){break g}d=q[c+4>>2]}if((d|0)==103){break f}break e}q[c+4>>2]=103}if(q[q[c+28>>2]+44>>2]){B:{if(t[c+12>>2]>=q[c+20>>2]+2>>>0){break B}b=q[a+28>>2];Gl(b);d=q[a+16>>2];e=q[b+20>>2];d=d>>>0>>0?d:e;if(!d){break B}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];q[a+16>>2]=q[a+16>>2]-d;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break B}q[b+16>>2]=q[b+8>>2]}b=q[c+20>>2];if(t[c+12>>2]>>0){break e}d=q[a+48>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=d;b=q[a+48>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>8;q[a+48>>2]=vl(0,0,0);q[c+4>>2]=113;break e}q[c+4>>2]=113}C:{if(q[c+20>>2]){b=q[a+28>>2];Gl(b);e=q[a+16>>2];d=q[b+20>>2];d=d>>>0>e>>>0?e:d;D:{if(!d){break D}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];e=q[a+16>>2]-d|0;q[a+16>>2]=e;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break D}q[b+16>>2]=q[b+8>>2]}if(e){break C}break a}if(q[a+4>>2]){break C}}b=q[a+4>>2];E:{d=q[c+4>>2];F:{G:{if((d|0)==666){if(!b){break G}break b}if(b){break F}}if((d|0)!=666){break F}if(!q[c+116>>2]){break E}}H:{I:{J:{K:{switch(q[c+136>>2]-2|0){case 0:while(1){L:{if(q[c+116>>2]){break L}Vs(c);if(q[c+116>>2]){break L}q[c+5812>>2]=0;b=c;d=q[c+92>>2];if((d|0)>=0){e=d+q[c+56>>2]|0}else{e=0}Tm(b,e,q[c+108>>2]-d|0,1);q[c+92>>2]=q[c+108>>2];b=q[c>>2];d=q[b+28>>2];Gl(d);e=q[b+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;M:{if(!e){break M}Ti(q[b+12>>2],q[d+16>>2],e);q[b+12>>2]=e+q[b+12>>2];q[d+16>>2]=e+q[d+16>>2];q[b+20>>2]=e+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-e;b=q[d+20>>2]-e|0;q[d+20>>2]=b;if(b){break M}q[d+16>>2]=q[d+8>>2]}b=q[q[c>>2]+16>>2]?3:2;break J}q[c+96>>2]=0;b=r[q[c+56>>2]+q[c+108>>2]|0];d=q[c+5792>>2];p[q[c+5796>>2]+(d<<1)>>1]=0;q[c+5792>>2]=d+1;o[d+q[c+5784>>2]|0]=b;b=(b<<2)+c|0;p[b+148>>1]=s[b+148>>1]+1;q[c+116>>2]=q[c+116>>2]-1;f=q[c+108>>2]+1|0;q[c+108>>2]=f;if(q[c+5792>>2]!=(q[c+5788>>2]-1|0)){continue}b=c;d=q[c+92>>2];if((d|0)>=0){e=d+q[c+56>>2]|0}else{e=0}Tm(b,e,f-d|0,0);q[c+92>>2]=q[c+108>>2];b=q[c>>2];d=q[b+28>>2];Gl(d);e=q[b+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;N:{if(!e){break N}Ti(q[b+12>>2],q[d+16>>2],e);q[b+12>>2]=e+q[b+12>>2];q[d+16>>2]=e+q[d+16>>2];q[b+20>>2]=e+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-e;b=q[d+20>>2]-e|0;q[d+20>>2]=b;if(b){break N}q[d+16>>2]=q[d+8>>2]}if(q[q[c>>2]+16>>2]){continue}break}break I;case 1:while(1){O:{P:{Q:{d=q[c+116>>2];if(d>>>0>=259){q[c+96>>2]=0;break Q}Vs(c);d=q[c+116>>2];if(d){q[c+96>>2]=0;if(d>>>0>2){break Q}f=q[c+108>>2];break P}q[c+5812>>2]=0;b=c;d=q[c+92>>2];if((d|0)>=0){e=d+q[c+56>>2]|0}else{e=0}Tm(b,e,q[c+108>>2]-d|0,1);q[c+92>>2]=q[c+108>>2];b=q[c>>2];d=q[b+28>>2];Gl(d);e=q[b+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;R:{if(!e){break R}Ti(q[b+12>>2],q[d+16>>2],e);q[b+12>>2]=e+q[b+12>>2];q[d+16>>2]=e+q[d+16>>2];q[b+20>>2]=e+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-e;b=q[d+20>>2]-e|0;q[d+20>>2]=b;if(b){break R}q[d+16>>2]=q[d+8>>2]}b=q[q[c>>2]+16>>2]?3:2;break J}f=q[c+108>>2];if(!f){f=0;break P}j=q[c+56>>2]+f|0;b=j-1|0;h=r[b|0];if((h|0)!=r[j|0]|(h|0)!=r[b+2|0]|(h|0)!=r[b+3|0]){break P}k=j+258|0;b=-1;S:{T:{U:{V:{W:{X:{while(1){g=b+j|0;if((h|0)==r[g+4|0]){if((h|0)!=r[g+5|0]){break X}if((h|0)!=r[g+6|0]){break W}if((h|0)!=r[g+7|0]){break V}e=b+8|0;i=e+j|0;if((h|0)!=r[i|0]){break S}if((h|0)!=r[g+9|0]){break U}if((h|0)!=r[g+10|0]){break T}i=g+11|0;if((b|0)>246){break S}b=e;if((h|0)==r[i|0]){continue}break S}break}i=g+4|0;break S}i=g+5|0;break S}i=g+6|0;break S}i=g+7|0;break S}i=g+9|0;break S}i=g+10|0}b=(i-k|0)+258|0;b=b>>>0>d>>>0?d:b;q[c+96>>2]=b;if(b>>>0<3){break P}d=q[c+5792>>2];p[q[c+5796>>2]+(d<<1)>>1]=1;q[c+5792>>2]=d+1;b=b-3|0;o[d+q[c+5784>>2]|0]=b;b=((r[(b&255)+196624|0]<<2)+c|0)+1176|0;p[b>>1]=s[b>>1]+1;b=((r[196112]<<2)+c|0)+2440|0;p[b>>1]=s[b>>1]+1;b=q[c+96>>2];q[c+96>>2]=0;q[c+116>>2]=q[c+116>>2]-b;d=b+q[c+108>>2]|0;q[c+108>>2]=d;break O}b=r[q[c+56>>2]+f|0];d=q[c+5792>>2];p[q[c+5796>>2]+(d<<1)>>1]=0;q[c+5792>>2]=d+1;o[d+q[c+5784>>2]|0]=b;b=(b<<2)+c|0;p[b+148>>1]=s[b+148>>1]+1;q[c+116>>2]=q[c+116>>2]-1;d=q[c+108>>2]+1|0;q[c+108>>2]=d}if(q[c+5792>>2]!=(q[c+5788>>2]-1|0)){continue}b=c;e=q[c+92>>2];if((e|0)>=0){f=e+q[c+56>>2]|0}else{f=0}Tm(b,f,d-e|0,0);q[c+92>>2]=q[c+108>>2];b=q[c>>2];d=q[b+28>>2];Gl(d);e=q[b+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;Y:{if(!e){break Y}Ti(q[b+12>>2],q[d+16>>2],e);q[b+12>>2]=e+q[b+12>>2];q[d+16>>2]=e+q[d+16>>2];q[b+20>>2]=e+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-e;b=q[d+20>>2]-e|0;q[d+20>>2]=b;if(b){break Y}q[d+16>>2]=q[d+8>>2]}if(q[q[c>>2]+16>>2]){continue}break}break I;default:break K}}b=Mi[q[(w(q[c+132>>2],12)+282912|0)+8>>2]](c,4)|0}if((b&-2)==2){q[c+4>>2]=666}if(b&-3){break H}}d=0;if(q[a+16>>2]){break c}break a}if((b|0)!=1){break E}eO(c,0,0,0);b=q[a+28>>2];Gl(b);e=q[a+16>>2];d=q[b+20>>2];d=d>>>0>e>>>0?e:d;Z:{if(!d){break Z}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];e=q[a+16>>2]-d|0;q[a+16>>2]=e;d=q[b+20>>2]-d|0;q[b+20>>2]=d;if(d){break Z}q[b+16>>2]=q[b+8>>2]}if(e){break E}break a}d=1;e=q[c+24>>2];if((e|0)<1){break c}b=q[a+48>>2];_:{if((e|0)==2){d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=q[a+48>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>8;b=s[a+50>>1];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=r[a+51|0];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=q[a+8>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;b=q[a+8>>2];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>8;b=s[a+10>>1];d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b;d=r[a+11|0];b=q[c+20>>2];q[c+20>>2]=b+1;b=b+q[c+8>>2]|0;break _}d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>24;d=q[c+20>>2];q[c+20>>2]=d+1;o[d+q[c+8>>2]|0]=b>>>16;d=q[a+48>>2];b=q[c+20>>2];q[c+20>>2]=b+1;o[b+q[c+8>>2]|0]=d>>>8;b=q[c+20>>2];q[c+20>>2]=b+1;b=b+q[c+8>>2]|0}o[b|0]=d;b=q[a+28>>2];Gl(b);d=q[a+16>>2];e=q[b+20>>2];d=d>>>0>>0?d:e;$:{if(!d){break $}Ti(q[a+12>>2],q[b+16>>2],d);q[a+12>>2]=d+q[a+12>>2];q[b+16>>2]=d+q[b+16>>2];q[a+20>>2]=d+q[a+20>>2];q[a+16>>2]=q[a+16>>2]-d;a=q[b+20>>2]-d|0;q[b+20>>2]=a;if(a){break $}q[b+16>>2]=q[b+8>>2]}a=q[c+24>>2];if((a|0)>=1){q[c+24>>2]=0-a}d=!q[c+20>>2]}return d}q[a+24>>2]=q[70783];return-5}q[c+40>>2]=-1;return 0}function k9(a,b){var c=0,d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=0,l=x(0),m=x(0),n=x(0),p=x(0),s=0,v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=0,E=x(0),F=0,H=x(0),I=x(0),K=x(0),L=x(0),M=x(0),N=x(0),O=x(0),P=x(0),Q=0,R=x(0),S=x(0),T=x(0),U=x(0),V=x(0),W=x(0),X=x(0),Y=x(0),Z=x(0),_=x(0),$=x(0),aa=x(0),ba=x(0),ca=x(0),da=0,ea=0,fa=x(0),ga=x(0),ha=x(0),ia=x(0),ja=0,ka=0,la=0,ma=0;c=Ii-864|0;Ii=c;a:{b:{c:{d:{D=q[a+4>>2];F=q[a>>2];k=D-F|0;if(k){D=F-D|0;s=((k|0)<(D|0)?D:k)>>>2|0;k=(k|0)>-1?k:-1;k=w(s,(k|0)<1?k:1);ja=k>>>0>1?k:1;while(1){k=q[a>>2];if(q[a+4>>2]-k>>2>>>0<=da>>>0){break c}e:{D=q[k+(da<<2)>>2];if(!D){break e}s=q[D+4>>2];k=q[D>>2];F=s-k|0;if(!F){break e}F=(F|0)/304|0;if((k|0)!=(s|0)){ka=F>>>0>1?F:1;la=q[D+64>>2];F=0;while(1){s=q[la+16>>2];if(t[s+4>>2]<=F>>>0){break d}s=q[s>>2];q[c+856>>2]=0;q[c+860>>2]=1065353216;q[c+848>>2]=0;q[c+852>>2]=1065353216;k=w(F,304)+k|0;f:{g:{if(!q[k+280>>2]){e=x(1);g=x(0);break g}if(q[(s+w(F,160)|0)+4>>2]==1?!(r[k+296|0]&8):0){break f}e=u[(s+w(F,160)|0)+8>>2];e=e<=x(0)?x(0):x(u[k+264>>2]/e);g=x(x(1)-e)}u[c+856>>2]=e;u[c+852>>2]=g}k=s+w(F,160)|0;e=u[k+44>>2];d=u[D+60>>2];g=u[k+32>>2];v=u[D+48>>2];h=u[k+36>>2];i=u[D+52>>2];H=x(x(x(e*d)-x(g*v))-x(h*i));j=u[k+40>>2];f=u[D+56>>2];I=x(j*f);C=x(x(h*v)+x(x(e*f)+x(j*d)));O=x(g*i);P=x(x(g*f)+x(x(e*i)+x(h*d)));B=x(j*v);j=x(x(j*i)+x(x(e*v)+x(g*d)));E=x(h*f);n=u[D+44>>2];e=x(u[k+16>>2]*n);g=x(u[k+20>>2]*n);h=u[k+24>>2];h:{if(o[D+82|0]&1){h=x(h*n);l=x(x(x(f*e)+x(d*g))-x(v*h));m=x(x(x(d*h)+x(v*g))-x(i*e));p=x(x(x(d*e)+x(i*h))-x(f*g));z=x(x(i*g)+x(v*e));y=x(f*h);break h}m=x(x(x(h*d)+x(v*g))-x(i*e));l=x(x(x(f*e)+x(d*g))-x(h*v));p=x(x(x(h*i)+x(d*e))-x(f*g));z=x(x(v*e)+x(i*g));y=x(h*f)}e=x(H-I);g=x(C-O);h=x(P-B);j=x(j-E);H=x(y+z);y=x(u[D+40>>2]+x(x(v*l)+x(x(x(f*H)+x(d*m))-x(i*p))));z=x(u[D+36>>2]+x(x(f*p)+x(x(x(d*l)+x(i*H))-x(v*m))));v=x(u[D+32>>2]+x(x(i*m)+x(x(x(d*p)+x(v*H))-x(f*l))));i:{j:{switch(q[k+76>>2]-2|0){case 1:if(t[k+88>>2]<=1){break b}k=q[k+84>>2];if(!q[k+24>>2]){break a}d=x(u[q[k+20>>2]+4>>2]*x(.5));k=0;while(1){s=(c+32|0)+w(k,48)|0;q[s+16>>2]=0;q[s+8>>2]=0;q[s+36>>2]=0;f=x(x(x(k>>>0)*x(6.2831854820251465))*x(.0625));i=x(d*Lk(f));u[s+40>>2]=i;f=x(d*Nl(f));u[s+32>>2]=f;u[s+24>>2]=i;u[s+20>>2]=f;u[s+4>>2]=i;u[s>>2]=f;s=1;k=k+1|0;if((k|0)!=17){continue}break}while(1){ma=s-1|0;k=0;while(1){ea=k<<4;Q=ea+((c+32|0)+w(ma,48)|0)|0;d=x(n*u[Q>>2]);i=x(n*u[Q+4>>2]);f=x(n*u[Q+8>>2]);l=x(x(x(g*d)+x(e*i))-x(j*f));m=x(x(g*f)+x(x(j*d)+x(h*i)));p=x(x(x(j*i)+x(e*f))-x(h*d));d=x(x(x(e*d)+x(h*f))-x(g*i));u[c+24>>2]=y+x(x(j*l)+x(x(x(g*m)+x(e*p))-x(h*d)));u[c+20>>2]=z+x(x(g*d)+x(x(x(e*l)+x(h*m))-x(j*p)));u[c+16>>2]=v+x(x(h*p)+x(x(x(j*m)+x(e*d))-x(g*l)));Q=((c+32|0)+w(s,48)|0)+ea|0;d=x(n*u[Q>>2]);i=x(n*u[Q+4>>2]);f=x(n*u[Q+8>>2]);l=x(x(x(g*d)+x(e*i))-x(j*f));m=x(x(g*f)+x(x(j*d)+x(h*i)));p=x(x(x(j*i)+x(e*f))-x(h*d));d=x(x(x(e*d)+x(h*f))-x(g*i));u[c+8>>2]=y+x(x(j*l)+x(x(x(g*m)+x(e*p))-x(h*d)));u[c+4>>2]=z+x(x(g*d)+x(x(x(e*l)+x(h*m))-x(j*p)));u[c>>2]=v+x(x(h*p)+x(x(x(j*m)+x(e*d))-x(g*l)));Mi[231](b,c+16|0,c,c+848|0);k=k+1|0;if((k|0)!=3){continue}break}s=s+1|0;if((s|0)!=17){continue}break}break i;case 2:s=q[k+88>>2];if(s>>>0<=1){break b}k=q[k+84>>2];if(!q[k+24>>2]){break a}if(s>>>0<=2){break b}if(!q[k+40>>2]){break a}d=u[q[k+20>>2]+4>>2];i=u[q[k+36>>2]+4>>2];u[c+40>>2]=y;u[c+36>>2]=z;u[c+32>>2]=v;d=x(d*x(.5));f=x(n*d);N=x(e*f);l=x(n*i);O=x(h*l);m=x(n*x(0));p=x(m*g);P=x(x(N+O)-p);B=x(m*e);S=x(g*f);H=x(j*l);E=x(x(B+S)-H);I=x(m*h);T=x(j*f);C=x(g*l);K=x(x(I+T)+C);m=x(j*m);l=x(e*l);A=x(m+l);U=x(h*f);f=x(A-U);u[c+20>>2]=z+x(x(g*P)+x(x(x(e*E)+x(h*K))-x(j*f)));u[c+24>>2]=y+x(x(j*E)+x(x(x(g*K)+x(e*f))-x(h*P)));u[c+16>>2]=v+x(x(h*f)+x(x(x(j*K)+x(e*P))-x(g*E)));Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=y;u[c+36>>2]=z;u[c+32>>2]=v;P=x(-d);f=x(n*P);L=x(g*f);E=x(x(B+L)-H);M=x(j*f);K=x(x(I+M)+C);V=x(h*f);A=x(A-V);W=x(e*f);f=x(x(W+O)-p);u[c+24>>2]=y+x(x(j*E)+x(x(x(g*K)+x(e*A))-x(h*f)));u[c+20>>2]=z+x(x(g*f)+x(x(x(e*E)+x(h*K))-x(j*A)));u[c+16>>2]=v+x(x(h*A)+x(x(x(j*K)+x(e*f))-x(g*E)));Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=y;u[c+36>>2]=z;u[c+32>>2]=v;f=x(x(p+N)-H);E=x(x(m+U)+C);K=x(x(T+l)-I);B=x(B+O);O=x(B-S);u[c+24>>2]=y+x(x(j*f)+x(x(x(g*E)+x(e*K))-x(h*O)));u[c+20>>2]=z+x(x(g*O)+x(x(x(e*f)+x(h*E))-x(j*K)));u[c+16>>2]=v+x(x(h*K)+x(x(x(j*E)+x(e*O))-x(g*f)));Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=y;u[c+36>>2]=z;u[c+32>>2]=v;f=x(x(p+W)-H);m=x(x(m+V)+C);l=x(x(M+l)-I);p=x(B-L);u[c+24>>2]=y+x(x(j*f)+x(x(x(g*m)+x(e*l))-x(h*p)));u[c+20>>2]=z+x(x(g*p)+x(x(x(e*f)+x(h*m))-x(j*l)));u[c+16>>2]=v+x(x(h*l)+x(x(x(j*m)+x(e*p))-x(g*f)));Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+280>>2]=i;f=x(d*x(-.3826834261417389));u[c+276>>2]=f;u[c+272>>2]=d*x(.9238795638084412);u[c+264>>2]=i;u[c+260>>2]=d*x(-.7071065306663513);u[c+256>>2]=d*x(.7071070075035095);u[c+248>>2]=i;u[c+244>>2]=d*x(-.9238794445991516);u[c+240>>2]=d*x(.3826836049556732);u[c+232>>2]=i;u[c+228>>2]=P;u[c+224>>2]=d*x(1.1924880638503055e-8);u[c+216>>2]=i;u[c+212>>2]=d*x(-.9238796830177307);u[c+208>>2]=d*x(-.382683128118515);u[c+200>>2]=i;u[c+196>>2]=d*x(-.70710688829422);u[c+192>>2]=d*x(-.7071066498756409);u[c+184>>2]=i;u[c+180>>2]=f;u[c+176>>2]=d*x(-.9238795042037964);u[c+168>>2]=i;u[c+164>>2]=d*x(-8.742277657347586e-8);u[c+160>>2]=P;u[c+152>>2]=i;u[c+148>>2]=d*x(.38268327713012695);u[c+144>>2]=d*x(-.9238796234130859);u[c+136>>2]=i;f=x(d*x(.7071067690849304));u[c+132>>2]=f;u[c+128>>2]=d*x(-.7071067690849304);u[c+120>>2]=i;l=x(d*x(.9238795042037964));u[c+116>>2]=l;u[c+112>>2]=d*x(-.38268351554870605);u[c+104>>2]=i;u[c+100>>2]=d;u[c+96>>2]=d*x(-4.371138828673793e-8);u[c+88>>2]=i;u[c+84>>2]=l;u[c+80>>2]=d*x(.3826834261417389);u[c+72>>2]=i;u[c+68>>2]=f;u[c+64>>2]=f;u[c+56>>2]=i;u[c+52>>2]=d*x(.3826834559440613);u[c+48>>2]=l;u[c+40>>2]=i;u[c+36>>2]=d*x(0);u[c+32>>2]=d;k=1;while(1){s=(c+32|0)+(k<<4)|0;Q=s-16|0;d=x(n*u[Q>>2]);i=x(n*u[Q+4>>2]);f=x(n*u[Q+8>>2]);l=x(x(x(g*d)+x(e*i))-x(j*f));m=x(x(g*f)+x(x(j*d)+x(h*i)));p=x(x(x(j*i)+x(e*f))-x(h*d));d=x(x(x(e*d)+x(h*f))-x(g*i));u[c+24>>2]=y+x(x(j*l)+x(x(x(g*m)+x(e*p))-x(h*d)));u[c+20>>2]=z+x(x(g*d)+x(x(x(e*l)+x(h*m))-x(j*p)));u[c+16>>2]=v+x(x(h*p)+x(x(x(j*m)+x(e*d))-x(g*l)));d=x(n*u[s>>2]);i=x(n*u[s+4>>2]);f=x(n*u[s+8>>2]);l=x(x(x(g*d)+x(e*i))-x(j*f));m=x(x(g*f)+x(x(j*d)+x(h*i)));p=x(x(x(j*i)+x(e*f))-x(h*d));d=x(x(x(e*d)+x(h*f))-x(g*i));u[c+8>>2]=y+x(x(j*l)+x(x(x(g*m)+x(e*p))-x(h*d)));u[c+4>>2]=z+x(x(g*d)+x(x(x(e*l)+x(h*m))-x(j*p)));u[c>>2]=v+x(x(h*p)+x(x(x(j*m)+x(e*d))-x(g*l)));Mi[231](b,c+16|0,c,c+848|0);k=k+1|0;if((k|0)!=16){continue}break}d=x(n*u[c+272>>2]);i=x(n*u[c+276>>2]);f=x(n*u[c+280>>2]);l=x(x(x(g*d)+x(e*i))-x(j*f));m=x(x(g*f)+x(x(j*d)+x(h*i)));p=x(x(x(j*i)+x(e*f))-x(h*d));d=x(x(x(e*d)+x(h*f))-x(g*i));u[c+24>>2]=y+x(x(j*l)+x(x(x(g*m)+x(e*p))-x(h*d)));u[c+20>>2]=z+x(x(g*d)+x(x(x(e*l)+x(h*m))-x(j*p)));u[c+16>>2]=v+x(x(h*p)+x(x(x(j*m)+x(e*d))-x(g*l)));R=y;d=x(n*u[c+32>>2]);y=x(n*u[c+36>>2]);n=x(n*u[c+40>>2]);i=x(x(x(g*d)+x(e*y))-x(j*n));f=x(x(g*n)+x(x(j*d)+x(h*y)));l=x(x(x(j*y)+x(e*n))-x(h*d));n=x(x(x(e*d)+x(h*n))-x(g*y));u[c+8>>2]=R+x(x(j*i)+x(x(x(g*f)+x(e*l))-x(h*n)));u[c+4>>2]=z+x(x(g*n)+x(x(x(e*i)+x(h*f))-x(j*l)));u[c>>2]=v+x(x(h*l)+x(x(x(j*f)+x(e*n))-x(g*i)));Mi[231](b,c+16|0,c,c+848|0);break i;case 0:break j;default:break i}}s=q[k+88>>2];if(s>>>0<=1){break b}k=q[k+84>>2];if(!q[k+24>>2]){break a}if(s>>>0<=2){break b}if(!q[k+40>>2]){break a}if(s>>>0<=3){break b}if(!q[k+56>>2]){break a}B=x(u[q[k+20>>2]+4>>2]*x(.5));d=x(n*x(-B));V=x(e*d);L=x(u[q[k+52>>2]+4>>2]*x(.5));i=x(n*x(-L));E=x(h*i);U=x(V+E);A=x(u[q[k+36>>2]+4>>2]*x(.5));f=x(n*x(-A));l=x(g*f);H=x(U-l);M=x(g*d);K=x(e*f);W=x(M+K);m=x(j*i);I=x(W-m);X=x(j*d);N=x(h*f);Y=x(X+N);p=x(g*i);C=x(Y+p);R=x(j*f);S=x(e*i);f=x(R+S);d=x(h*d);i=x(f-d);O=x(z+x(x(g*H)+x(x(x(e*I)+x(h*C))-x(j*i))));u[c+36>>2]=O;P=x(y+x(x(j*I)+x(x(x(g*C)+x(e*i))-x(h*H))));u[c+40>>2]=P;H=x(v+x(x(h*i)+x(x(x(j*C)+x(e*H))-x(g*I))));u[c+32>>2]=H;i=x(n*B);T=x(g*i);Z=x(T+K);I=x(Z-m);_=x(j*i);aa=x(_+N);C=x(aa+p);$=f;f=x(h*i);B=x($-f);fa=x(e*i);N=x(fa+E);i=x(N-l);E=x(y+x(x(j*I)+x(x(x(g*C)+x(e*B))-x(h*i))));u[c+24>>2]=E;K=x(z+x(x(g*i)+x(x(x(e*I)+x(h*C))-x(j*B))));u[c+20>>2]=K;I=x(v+x(x(h*B)+x(x(x(j*C)+x(e*i))-x(g*I))));u[c+16>>2]=I;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=E;u[c+36>>2]=K;u[c+32>>2]=I;i=x(n*A);ba=x(e*i);ga=x(T+ba);C=x(ga-m);$=_;_=x(h*i);ha=x($+_);B=x(ha+p);ia=x(j*i);ca=x(ia+S);A=x(ca-f);i=x(g*i);N=x(N-i);S=x(y+x(x(j*C)+x(x(x(g*B)+x(e*A))-x(h*N))));u[c+24>>2]=S;T=x(z+x(x(g*N)+x(x(x(e*C)+x(h*B))-x(j*A))));u[c+20>>2]=T;C=x(v+x(x(h*A)+x(x(x(j*B)+x(e*N))-x(g*C))));u[c+16>>2]=C;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=S;u[c+36>>2]=T;u[c+32>>2]=C;ba=x(M+ba);m=x(ba-m);_=x(X+_);p=x(_+p);B=x(ca-d);A=x(U-i);N=x(y+x(x(j*m)+x(x(x(g*p)+x(e*B))-x(h*A))));u[c+24>>2]=N;U=x(z+x(x(g*A)+x(x(x(e*m)+x(h*p))-x(j*B))));u[c+20>>2]=U;B=x(v+x(x(h*B)+x(x(x(j*p)+x(e*A))-x(g*m))));u[c+16>>2]=B;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=N;u[c+36>>2]=U;u[c+32>>2]=B;u[c+24>>2]=P;u[c+20>>2]=O;u[c+16>>2]=H;Mi[231](b,c+32|0,c+16|0,c+848|0);n=x(n*L);m=x(j*n);A=x(W-m);p=x(g*n);L=x(Y+p);$=R;R=x(e*n);X=x($+R);M=x(X-d);Y=x(h*n);ca=x(V+Y);n=x(ca-l);V=x(y+x(x(j*A)+x(x(x(g*L)+x(e*M))-x(h*n))));u[c+40>>2]=V;W=x(z+x(x(g*n)+x(x(x(e*A)+x(h*L))-x(j*M))));u[c+36>>2]=W;n=x(v+x(x(h*M)+x(x(x(j*L)+x(e*n))-x(g*A))));u[c+32>>2]=n;A=x(Z-m);L=x(aa+p);M=x(X-f);Z=x(fa+Y);l=x(Z-l);X=x(y+x(x(j*A)+x(x(x(g*L)+x(e*M))-x(h*l))));u[c+24>>2]=X;Y=x(z+x(x(g*l)+x(x(x(e*A)+x(h*L))-x(j*M))));u[c+20>>2]=Y;l=x(v+x(x(h*M)+x(x(x(j*L)+x(e*l))-x(g*A))));u[c+16>>2]=l;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=X;u[c+36>>2]=Y;u[c+32>>2]=l;A=x(ga-m);L=x(ha+p);aa=x(ia+R);f=x(aa-f);M=x(Z-i);R=x(y+x(x(j*A)+x(x(x(g*L)+x(e*f))-x(h*M))));u[c+24>>2]=R;Z=x(z+x(x(g*M)+x(x(x(e*A)+x(h*L))-x(j*f))));u[c+20>>2]=Z;f=x(v+x(x(h*f)+x(x(x(j*L)+x(e*M))-x(g*A))));u[c+16>>2]=f;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=R;u[c+36>>2]=Z;u[c+32>>2]=f;$=y;y=x(ba-m);m=x(_+p);d=x(aa-d);i=x(ca-i);p=x($+x(x(j*y)+x(x(x(g*m)+x(e*d))-x(h*i))));u[c+24>>2]=p;z=x(z+x(x(g*i)+x(x(x(e*y)+x(h*m))-x(j*d))));u[c+20>>2]=z;e=x(v+x(x(h*d)+x(x(x(j*m)+x(e*i))-x(g*y))));u[c+16>>2]=e;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=p;u[c+36>>2]=z;u[c+32>>2]=e;u[c+24>>2]=V;u[c+20>>2]=W;u[c+16>>2]=n;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=P;u[c+36>>2]=O;u[c+32>>2]=H;u[c+24>>2]=V;u[c+20>>2]=W;u[c+16>>2]=n;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=E;u[c+36>>2]=K;u[c+32>>2]=I;u[c+24>>2]=X;u[c+20>>2]=Y;u[c+16>>2]=l;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=S;u[c+36>>2]=T;u[c+32>>2]=C;u[c+24>>2]=R;u[c+20>>2]=Z;u[c+16>>2]=f;Mi[231](b,c+32|0,c+16|0,c+848|0);u[c+40>>2]=N;u[c+36>>2]=U;u[c+32>>2]=B;u[c+24>>2]=p;u[c+20>>2]=z;u[c+16>>2]=e;Mi[231](b,c+32|0,c+16|0,c+848|0)}F=F+1|0;if((ka|0)==(F|0)){break e}k=q[D>>2];if((q[D+4>>2]-k|0)/304>>>0>F>>>0){continue}break}}break c}da=da+1|0;if((ja|0)!=(da|0)){continue}break}}Ii=c+864|0;return}J(151361,151373,270,151403);G()}J(151947,151192,479,151403);G()}J(151361,151373,225,151403);G()}J(151361,151373,180,151403);G()}function Fka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=x(0),n=x(0),p=0,r=x(0),s=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=0,C=0,D=x(0),E=x(0),F=0,H=0,I=x(0),K=x(0),L=0,M=0,N=0,O=0;j=Ii-208|0;Ii=j;f=q[a+4>>2];a:{b:{c:{d:{e:{f:{g:{h:{switch(q[a+8>>2]){case 1:k=q[a+20>>2];F=q[a>>2];p=q[a+12>>2];g=q[a+16>>2];q[j+56>>2]=0;b=q[q[(p+w(q[g>>2],48)|0)+16>>2]+96>>2];a=q[b+216>>2];if(!a){b=q[b+128>>2];a=q[b+28>>2];if((a|0)==q[b+32>>2]){break c}a=q[a+4>>2]}i:{j:{switch(q[q[a>>2]+152>>2]){case 0:q[j+192>>2]=0;k:{if((g|0)==(k|0)){break k}d=p+w(q[g>>2],48)|0;a=q[q[d+16>>2]+100>>2];b=q[a+12>>2];c=q[a+8>>2];a=g+4|0;if((k|0)!=(a|0)){while(1){e=q[q[(p+w(q[a>>2],48)|0)+16>>2]+100>>2];b=q[e+12>>2]+b|0;c=q[e+8>>2]+c|0;a=a+4|0;if((k|0)!=(a|0)){continue}break}}if(!c|!b){break k}H=q[d+36>>2]&15;h=q[f+76>>2]+(H<<4)|0;e=h+4|0;i=h+8|0;b=b>>>0>>0?c:b;c=q[h+8>>2];a=q[h+4>>2];d=(c-a|0)/68|0;if(b>>>0>d>>>0){if(o[h+12|0]&1){break f}Wi((b-d|0)+((c-q[h>>2]|0)/68|0)|0,68,h,i,e);a=q[e>>2]}L=q[f+72>>2];b=a;c=g;while(1){B=q[(p+w(q[c>>2],48)|0)+16>>2];C=q[B+96>>2];if(q[C+132>>2]){M=q[f+96>>2];d=q[B+104>>2];y=u[d+40>>2];n=u[d+36>>2];r=u[d+24>>2];l=u[d>>2];z=u[d+4>>2];s=u[d+12>>2];D=u[d+8>>2];N=q[d+16>>2];O=q[d+20>>2];A=u[d+32>>2];u[j+140>>2]=A*x(0);d=j;q[d+176>>2]=N;q[d+180>>2]=O;q[d+188>>2]=1065353216;u[d+184>>2]=r;u[d+156>>2]=n*x(0);u[d+172>>2]=y*x(0);E=x(z+z);v=x(l*E);r=x(D+D);m=x(s*r);u[d+132>>2]=A*x(v+m);I=x(l*r);K=x(E*s);u[d+136>>2]=A*x(I-K);u[d+144>>2]=n*x(v-m);v=x(z*r);m=s;s=x(l+l);m=x(m*s);u[d+152>>2]=n*x(v+m);u[d+160>>2]=y*x(I+K);u[d+164>>2]=y*x(v-m);m=n;l=x(x(1)-x(l*s));n=x(D*r);u[d+148>>2]=m*x(l-n);m=l;l=x(z*E);u[d+168>>2]=y*x(m-l);u[d+128>>2]=A*x(x(x(1)-l)-n);_k(d- -64|0,C- -64|0,d+128|0);b=F5(M,q[C+132>>2],q[B+108>>2],d- -64|0,b)}c=c+4|0;if((k|0)!=(c|0)){continue}break}c=q[h>>2];if((q[i>>2]-c|0)/68>>>0<(b-c|0)/68>>>0){break b}q[e>>2]=b;i=q[f+52>>2];d=q[f+56>>2]-i|0;c=((d|0)/304|0)+1|0;if(c>>>0>(q[f+60>>2]-i|0)/304>>>0){break b}q[f+56>>2]=i+w(c,304);c=d+304|0;if(!c){break a}d=q[(p+w(q[g>>2],48)|0)+16>>2];e=q[d+96>>2];d=q[d+112>>2];k=((c|0)/304|0)-1|0;c=i+w(k,304)|0;fn(c);q[c+148>>2]=q[f+68>>2];g=q[(H<<2)+L>>2];q[c+224>>2]=1;q[c+144>>2]=g;g=q[h>>2];q[c+284>>2]=(b-a|0)/68;q[c+280>>2]=(a-g|0)/68;g=d&15;a=q[e+216>>2];if(!a){b=q[e+128>>2];a=q[b+28>>2];if(g>>>0>=q[b+32>>2]-a>>4>>>0){break c}a=q[(a+(g<<4)|0)+4>>2]}a=q[a>>2];q[c+16>>2]=1065353216;q[c+156>>2]=a;a=c;q[a+20>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+32>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+36>>2]=1065353216;q[a+48>>2]=0;q[a+52>>2]=0;q[a+60>>2]=0;q[a+64>>2]=0;q[a+56>>2]=1065353216;q[a+68>>2]=0;q[a+72>>2]=0;q[a+76>>2]=1065353216;b=q[e+184>>2];l:{m:{if(b){break m}a=q[e+216>>2];if(a){b=q[a+4>>2];if(b){break m}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|!q[(f+(g<<4)|0)+12>>2])){b=q[a+8>>2];if(b){break m}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break l}b=q[b+4>>2];if(!b){break l}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+160>>2]=a;q[b+164>>2]=d;b=q[e+188>>2];n:{o:{if(b){break o}a=q[e+216>>2];if(a){b=q[a+8>>2];if(b){break o}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<2)){b=q[a+24>>2];if(b){break o}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break n}b=q[b+8>>2];if(!b){break n}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+168>>2]=a;q[b+172>>2]=d;b=q[e+192>>2];p:{q:{if(b){break q}a=q[e+216>>2];if(a){b=q[a+12>>2];if(b){break q}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<3)){b=q[a+40>>2];if(b){break q}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break p}b=q[b+12>>2];if(!b){break p}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+176>>2]=a;q[b+180>>2]=d;b=q[e+196>>2];r:{s:{if(b){break s}a=q[e+216>>2];if(a){b=q[a+16>>2];if(b){break s}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<4)){b=q[a+56>>2];if(b){break s}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break r}b=q[b+16>>2];if(!b){break r}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+184>>2]=a;q[b+188>>2]=d;b=q[e+200>>2];t:{u:{if(b){break u}a=q[e+216>>2];if(a){b=q[a+20>>2];if(b){break u}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<5)){b=q[a+72>>2];if(b){break u}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break t}b=q[b+20>>2];if(!b){break t}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+192>>2]=a;q[b+196>>2]=d;b=q[e+204>>2];v:{w:{if(b){break w}a=q[e+216>>2];if(a){b=q[a+24>>2];if(b){break w}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<6)){b=q[a+88>>2];if(b){break w}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break v}b=q[b+24>>2];if(!b){break v}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+200>>2]=a;q[b+204>>2]=d;b=q[e+208>>2];x:{y:{if(b){break y}a=q[e+216>>2];if(a){b=q[a+28>>2];if(b){break y}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<7)){b=q[a+104>>2];if(b){break y}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break x}b=q[b+28>>2];if(!b){break x}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+208>>2]=a;q[b+212>>2]=d;b=q[e+212>>2];z:{A:{if(b){break A}a=q[e+216>>2];if(a){b=q[a+32>>2];if(b){break A}}a=q[e+128>>2];f=q[a+28>>2];if(g>>>0>=q[a+32>>2]-f>>4>>>0){break a}a=q[(f+(g<<4)|0)+8>>2];if(!(!a|t[(f+(g<<4)|0)+12>>2]<8)){b=q[a+120>>2];if(b){break A}}a=0;d=0;b=q[(f+(g<<4)|0)+4>>2];if(!b){break z}b=q[b+32>>2];if(!b){break z}}a=q[b>>2];d=q[b+4>>2]}b=i+w(k,304)|0;q[b+216>>2]=a;q[b+220>>2]=d;a=q[e+180>>2];if(a){Gr(c,a)}po(F,c)}break i;case 1:break j;default:break d}}q[j+200>>2]=0;if((g|0)!=(k|0)){while(1){b=q[f+56>>2];i=q[f+52>>2];a=((b-i|0)/304|0)+1|0;if(a>>>0>(q[f+60>>2]-i|0)/304>>>0){break b}c=q[(p+w(q[g>>2],48)|0)+16>>2];h=q[c+112>>2];e=q[c+96>>2];d=q[c+100>>2];q[f+56>>2]=i+w(a,304);if(!a){break e}i=h&15;fn(b);q[b+148>>2]=q[f+68>>2];q[b+144>>2]=q[d>>2];a=q[e+216>>2];if(!a){h=q[e+128>>2];a=q[h+28>>2];if(i>>>0>=q[h+32>>2]-a>>4>>>0){break c}a=q[(a+(i<<4)|0)+4>>2]}a=q[a>>2];q[b+280>>2]=0;q[b+224>>2]=1;q[b+156>>2]=a;a=q[d+12>>2];q[b+284>>2]=a;u[b+16>>2]=u[c>>2];u[b+20>>2]=u[c+4>>2];u[b+24>>2]=u[c+8>>2];u[b+28>>2]=u[c+12>>2];u[b+32>>2]=u[c+16>>2];u[b+36>>2]=u[c+20>>2];u[b+40>>2]=u[c+24>>2];u[b+44>>2]=u[c+28>>2];u[b+48>>2]=u[c+32>>2];u[b+52>>2]=u[c+36>>2];u[b+56>>2]=u[c+40>>2];u[b+60>>2]=u[c+44>>2];u[b- -64>>2]=u[c+48>>2];u[b+68>>2]=u[c+52>>2];u[b+72>>2]=u[c+56>>2];u[b+76>>2]=u[c+60>>2];q[b+152>>2]=q[d+4>>2];q[b+228>>2]=q[d+16>>2];q[73254]=a+q[73254];a=q[d+12>>2];q[j+16>>2]=a;q[j+20>>2]=0;q[j+128>>2]=a;q[j+132>>2]=0;q[73276]=q[73276]+q[d+8>>2];a=q[d+8>>2];q[j+8>>2]=a;q[j+12>>2]=0;q[j+64>>2]=a;q[j+68>>2]=0;q[73298]=q[73298]+w(q[d+8>>2],68);a=w(q[d+8>>2],68);q[j>>2]=a;q[j+4>>2]=0;q[j+192>>2]=a;q[j+196>>2]=0;c=q[e+184>>2];B:{C:{if(c){break C}a=q[e+216>>2];if(a){c=q[a+4>>2];if(c){break C}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|!q[h+12>>2])){c=q[a+8>>2];if(c){break C}}a=0;d=0;c=q[h+4>>2];if(!c){break B}c=q[c+4>>2];if(!c){break B}}a=q[c>>2];d=q[c+4>>2]}q[b+160>>2]=a;q[b+164>>2]=d;c=q[e+188>>2];D:{E:{if(c){break E}a=q[e+216>>2];if(a){c=q[a+8>>2];if(c){break E}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<2)){c=q[a+24>>2];if(c){break E}}a=0;d=0;c=q[h+4>>2];if(!c){break D}c=q[c+8>>2];if(!c){break D}}a=q[c>>2];d=q[c+4>>2]}q[b+168>>2]=a;q[b+172>>2]=d;c=q[e+192>>2];F:{G:{if(c){break G}a=q[e+216>>2];if(a){c=q[a+12>>2];if(c){break G}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<3)){c=q[a+40>>2];if(c){break G}}a=0;d=0;c=q[h+4>>2];if(!c){break F}c=q[c+12>>2];if(!c){break F}}a=q[c>>2];d=q[c+4>>2]}q[b+176>>2]=a;q[b+180>>2]=d;c=q[e+196>>2];H:{I:{if(c){break I}a=q[e+216>>2];if(a){c=q[a+16>>2];if(c){break I}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<4)){c=q[a+56>>2];if(c){break I}}a=0;d=0;c=q[h+4>>2];if(!c){break H}c=q[c+16>>2];if(!c){break H}}a=q[c>>2];d=q[c+4>>2]}q[b+184>>2]=a;q[b+188>>2]=d;c=q[e+200>>2];J:{K:{if(c){break K}a=q[e+216>>2];if(a){c=q[a+20>>2];if(c){break K}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<5)){c=q[a+72>>2];if(c){break K}}a=0;d=0;c=q[h+4>>2];if(!c){break J}c=q[c+20>>2];if(!c){break J}}a=q[c>>2];d=q[c+4>>2]}q[b+192>>2]=a;q[b+196>>2]=d;c=q[e+204>>2];L:{M:{if(c){break M}a=q[e+216>>2];if(a){c=q[a+24>>2];if(c){break M}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<6)){c=q[a+88>>2];if(c){break M}}a=0;d=0;c=q[h+4>>2];if(!c){break L}c=q[c+24>>2];if(!c){break L}}a=q[c>>2];d=q[c+4>>2]}q[b+200>>2]=a;q[b+204>>2]=d;c=q[e+208>>2];N:{O:{if(c){break O}a=q[e+216>>2];if(a){c=q[a+28>>2];if(c){break O}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}h=a+(i<<4)|0;a=q[h+8>>2];if(!(!a|t[h+12>>2]<7)){c=q[a+104>>2];if(c){break O}}a=0;d=0;c=q[h+4>>2];if(!c){break N}c=q[c+28>>2];if(!c){break N}}a=q[c>>2];d=q[c+4>>2]}q[b+208>>2]=a;q[b+212>>2]=d;c=q[e+212>>2];P:{Q:{if(c){break Q}a=q[e+216>>2];if(a){c=q[a+32>>2];if(c){break Q}}c=q[e+128>>2];a=q[c+28>>2];if(i>>>0>=q[c+32>>2]-a>>4>>>0){break a}i=a+(i<<4)|0;a=q[i+8>>2];if(!(!a|t[i+12>>2]<8)){c=q[a+120>>2];if(c){break Q}}a=0;d=0;c=q[i+4>>2];if(!c){break P}c=q[c+32>>2];if(!c){break P}}a=q[c>>2];d=q[c+4>>2]}q[b+216>>2]=a;q[b+220>>2]=d;a=q[e+180>>2];if(a){Gr(b,a)}po(F,b);g=g+4|0;if((k|0)!=(g|0)){continue}break}}}break g;case 2:a=0;while(1){c=q[f+76>>2]+(a<<4)|0;g=q[c+4>>2];d=q[c>>2];if((g|0)!=(d|0)){Mi[q[74945]](q[q[f+72>>2]+(a<<2)>>2],g-d|0,d,1);b=((q[c+4>>2]-q[c>>2]|0)/68|0)+b|0}a=a+1|0;if((a|0)!=16){continue}break}q[73276]=q[73276]+b;a=b;q[j+48>>2]=a;q[j+52>>2]=0;q[j+32>>2]=a;q[j+36>>2]=0;a=w(a,68);q[73298]=a+q[73298];q[j+40>>2]=a;q[j+44>>2]=0;q[j+24>>2]=a;q[j+28>>2]=0;break g;default:J(52018,50797,906,52024);G();case 0:break h}}q[f+56>>2]=q[f+52>>2];a=q[f+76>>2];q[a+132>>2]=q[a+128>>2];q[a+116>>2]=q[a+112>>2];q[a+100>>2]=q[a+96>>2];q[a+84>>2]=q[a+80>>2];q[a+68>>2]=q[a+64>>2];q[a+52>>2]=q[a+48>>2];q[a+36>>2]=q[a+32>>2];q[a+20>>2]=q[a+16>>2];q[a+4>>2]=q[a>>2];q[a+148>>2]=q[a+144>>2];q[a+164>>2]=q[a+160>>2];q[a+180>>2]=q[a+176>>2];q[a+196>>2]=q[a+192>>2];q[a+212>>2]=q[a+208>>2];q[a+228>>2]=q[a+224>>2];q[a+244>>2]=q[a+240>>2]}Ii=j+208|0;return}J(51372,51308,493,51447);G()}J(52106,51308,435,52117);G()}J(52018,50797,753,52060);G()}J(51709,51308,486,51547);G()}J(51289,51308,506,51364);G()}J(51709,51308,479,51547);G()}function xF(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-288|0;Ii=g;q[q[a+60>>2]+4>>2]=0;a:{b:{c:{d:{e:while(1){c=287;f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{f=q[a>>2];switch(f+1|0){case 0:break a;case 63:break j;case 61:break k;case 62:break l;case 92:break m;case 46:break n;case 11:case 14:break o;case 47:break d;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 12:case 13:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 36:case 37:case 38:case 39:case 41:case 42:case 43:case 44:case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:break f;case 35:case 40:break i;default:break g}}cv(a);continue}d=q[a+56>>2];f=q[d>>2];q[d>>2]=f-1;c=a;p:{if(f){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;d=r[d|0];break p}d=Hk(d)}q[c>>2]=d;c=45;if((d|0)!=45){break a}d=q[a+56>>2];f=q[d>>2];q[d>>2]=f-1;c=a;q:{if(f){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;f=r[d|0];break q}f=Hk(d)}q[c>>2]=f;if((f|0)==91){c=tu(a);q[q[a+60>>2]+4>>2]=0;if((c|0)>-1){break h}f=q[a>>2]}while(1){c=f+1|0;if(1<>>0<=14:0){continue e}c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;f=r[c|0];q[a>>2]=f}else{f=Hk(c);q[a>>2]=f}continue}}c=tu(a);if((c|0)>=0){PD(a,b,c);c=286;break a}if((c|0)==-1){c=91;break a}gm(a,141615,286)}c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;b=a;r:{if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;d=r[c|0];break r}d=Hk(c)}q[b>>2]=d;c=61;if((d|0)!=61){break a}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;s:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break s}b=Hk(b)}q[a>>2]=b;c=280;break a}c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;b=a;t:{if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;d=r[c|0];break t}d=Hk(c)}q[b>>2]=d;c=60;if((d|0)!=61){break a}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;u:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break u}b=Hk(b)}q[a>>2]=b;c=282;break a}c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;b=a;v:{if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;d=r[c|0];break v}d=Hk(c)}q[b>>2]=d;c=62;if((d|0)!=61){break a}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;w:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break w}b=Hk(b)}q[a>>2]=b;c=281;break a}c=q[a+60>>2];h=q[c+4>>2];d=h+1|0;e=q[c+8>>2];x:{if(d>>>0<=e>>>0){e=q[c>>2];break x}if(e>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[g+152>>2]=141590;q[g+148>>2]=e;q[g+144>>2]=g+208;oj(d,141567,g+144|0);Nj(q[a+52>>2],3);e=q[c+8>>2]}d=q[a+52>>2];i=e<<1;y:{if((i|0)!=-2){e=Cj(d,q[c>>2],e,i);break y}e=mk(d)}q[c+8>>2]=i;q[c>>2]=e;h=q[c+4>>2];d=h+1|0}q[c+4>>2]=d;o[e+h|0]=f;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;z:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break z}c=Hk(c)}q[d>>2]=c;if((c|0)!=(f|0)){while(1){A:{B:{C:{switch(c+1|0){case 0:Xk(g+208|0,q[a+64>>2]+16|0,80);c=q[a+52>>2];d=q[a+4>>2];q[g+72>>2]=141750;q[g+68>>2]=d;q[g+64>>2]=g+208;c=oj(c,141567,g- -64|0);d=q[a+52>>2];q[g+52>>2]=141549;q[g+48>>2]=c;oj(d,141577,g+48|0);Nj(q[a+52>>2],3);c=q[a>>2];break A;case 11:case 14:gm(a,141750,286);c=q[a>>2];break A;default:if((c|0)==92){break B}break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 12:case 13:break C}}e=q[a+60>>2];h=q[e+4>>2];d=h+1|0;i=q[e+8>>2];D:{if(d>>>0<=i>>>0){i=q[e>>2];break D}if(i>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];i=q[a+4>>2];q[g+40>>2]=141590;q[g+36>>2]=i;q[g+32>>2]=g+208;oj(d,141567,g+32|0);Nj(q[a+52>>2],3);i=q[e+8>>2]}d=q[a+52>>2];h=i<<1;E:{if((h|0)!=-2){i=Cj(d,q[e>>2],i,h);break E}i=mk(d)}q[e+8>>2]=h;q[e>>2]=i;h=q[e+4>>2];d=h+1|0}q[e+4>>2]=d;o[h+i|0]=c;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;F:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break F}c=Hk(c)}q[d>>2]=c;break A}c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;G:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break G}c=Hk(c)}q[d>>2]=c;e=7;H:{I:{J:{K:{L:{M:{N:{switch(c-97|0){default:switch(c+1|0){case 0:break L;case 11:case 14:break M;default:break K};case 5:e=12;break I;case 13:e=10;break I;case 17:e=13;break I;case 19:e=9;break I;case 0:break I;case 1:break J;case 2:case 3:case 4:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 14:case 15:case 16:case 18:case 20:break K;case 21:break N}}e=11;break I}c=q[a+60>>2];e=q[c+4>>2];h=e+1|0;d=q[c+8>>2];O:{if(h>>>0<=d>>>0){d=q[c>>2];break O}if(d>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[g+136>>2]=141590;q[g+132>>2]=e;q[g+128>>2]=g+208;oj(d,141567,g+128|0);Nj(q[a+52>>2],3);d=q[c+8>>2]}e=q[a+52>>2];i=d<<1;P:{if((i|0)!=-2){d=Cj(e,q[c>>2],d,i);break P}d=mk(e)}q[c+8>>2]=i;q[c>>2]=d;e=q[c+4>>2];h=e+1|0}q[c+4>>2]=h;o[d+e|0]=10;cv(a)}c=q[a>>2];break A}d=0;if(c-48>>>0>=10){break H}h=0;while(1){e=q[a+56>>2];i=q[e>>2];q[e>>2]=i-1;d=(w(d,10)+c|0)-48|0;j=a;Q:{if(i){c=q[e+4>>2];q[e+4>>2]=c+1;c=r[c|0];break Q}c=Hk(e)}q[j>>2]=c;if((h|0)!=2){h=h+1|0;if(c-48>>>0<10){continue}}break}if((d|0)>=256){gm(a,141768,286)}c=q[a+60>>2];h=q[c+4>>2];i=h+1|0;e=q[c+8>>2];R:{if(i>>>0<=e>>>0){e=q[c>>2];break R}if(e>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];i=q[a+4>>2];q[g+88>>2]=141590;q[g+84>>2]=i;q[g+80>>2]=g+208;oj(e,141567,g+80|0);Nj(q[a+52>>2],3);e=q[c+8>>2]}i=q[a+52>>2];h=e<<1;S:{if((h|0)!=-2){e=Cj(i,q[c>>2],e,h);break S}e=mk(i)}q[c+8>>2]=h;q[c>>2]=e;h=q[c+4>>2];i=h+1|0}q[c+4>>2]=i;o[e+h|0]=d;c=q[a>>2];break A}e=8}c=q[a+60>>2];h=q[c+4>>2];d=h+1|0;i=q[c+8>>2];T:{if(d>>>0<=i>>>0){i=q[c>>2];break T}if(i>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];i=q[a+4>>2];q[g+120>>2]=141590;q[g+116>>2]=i;q[g+112>>2]=g+208;oj(d,141567,g+112|0);Nj(q[a+52>>2],3);i=q[c+8>>2]}d=q[a+52>>2];h=i<<1;U:{if((h|0)!=-2){i=Cj(d,q[c>>2],i,h);break U}i=mk(d)}q[c+8>>2]=h;q[c>>2]=i;h=q[c+4>>2];d=h+1|0}q[c+4>>2]=d;o[h+i|0]=e;c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;q[a>>2]=r[c|0];c=q[a>>2];break A}q[a>>2]=Hk(c);c=q[a>>2];break A}e=q[a+60>>2];h=q[e+4>>2];d=h+1|0;i=q[e+8>>2];V:{if(d>>>0<=i>>>0){i=q[e>>2];break V}if(i>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];i=q[a+4>>2];q[g+104>>2]=141590;q[g+100>>2]=i;q[g+96>>2]=g+208;oj(d,141567,g+96|0);Nj(q[a+52>>2],3);i=q[e+8>>2]}d=q[a+52>>2];h=i<<1;W:{if((h|0)!=-2){i=Cj(d,q[e>>2],i,h);break W}i=mk(d)}q[e+8>>2]=h;q[e>>2]=i;h=q[e+4>>2];d=h+1|0}q[e+4>>2]=d;o[h+i|0]=c;c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;q[a>>2]=r[c|0];c=q[a>>2];break A}q[a>>2]=Hk(c);c=q[a>>2]}if((c|0)!=(f|0)){continue}break}}c=q[a+60>>2];h=q[c+4>>2];d=h+1|0;e=q[c+8>>2];X:{if(d>>>0<=e>>>0){e=q[c>>2];break X}if(e>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[g+24>>2]=141590;q[g+20>>2]=e;q[g+16>>2]=g+208;oj(d,141567,g+16|0);Nj(q[a+52>>2],3);e=q[c+8>>2]}d=q[a+52>>2];i=e<<1;Y:{if((i|0)!=-2){e=Cj(d,q[c>>2],e,i);break Y}e=mk(d)}q[c+8>>2]=i;q[c>>2]=e;h=q[c+4>>2];d=h+1|0}q[c+4>>2]=d;o[e+h|0]=f;d=q[a+56>>2];f=q[d>>2];q[d>>2]=f-1;c=a;Z:{if(f){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;d=r[d|0];break Z}d=Hk(d)}q[c>>2]=d;d=q[a+52>>2];c=q[a+60>>2];c=Yj(d,q[c>>2]+1|0,q[c+4>>2]-2|0);a=Qs(d,q[q[a+48>>2]+4>>2],c);if(!q[a+8>>2]){q[a+8>>2]=1;q[a>>2]=1}q[b>>2]=c;c=286;break a}PD(a,0,c);q[q[a+60>>2]+4>>2]=0;continue}if((f|0)==126){break b}}if((f|0)==32|f-9>>>0<5){c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;q[a>>2]=r[c|0];continue}q[a>>2]=Hk(c);continue}break}if(f-48>>>0<=9){break c}if(!((f|32)-97>>>0<26?0:(f|0)!=95)){while(1){c=q[a+60>>2];e=q[c+4>>2];h=e+1|0;d=q[c+8>>2];_:{if(h>>>0<=d>>>0){d=q[c>>2];break _}if(d>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[g+8>>2]=141590;q[g+4>>2]=e;q[g>>2]=g+208;oj(d,141567,g);Nj(q[a+52>>2],3);d=q[c+8>>2]}e=q[a+52>>2];i=d<<1;$:{if((i|0)!=-2){d=Cj(e,q[c>>2],d,i);break $}d=mk(e)}q[c+8>>2]=i;q[c>>2]=d;e=q[c+4>>2];h=e+1|0}q[c+4>>2]=h;o[d+e|0]=f;d=q[a+56>>2];f=q[d>>2];q[d>>2]=f-1;c=a;aa:{if(f){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;f=r[d|0];break aa}f=Hk(d)}q[c>>2]=f;if((f|0)==95|((f|32)-97>>>0<26?1:f-48>>>0<10)){continue}break}d=q[a+52>>2];c=q[a+60>>2];c=Yj(d,q[c>>2],q[c+4>>2]);a=Qs(d,q[q[a+48>>2]+4>>2],c);if(!q[a+8>>2]){q[a+8>>2]=1;q[a>>2]=1}a=r[c+6|0];if(a){c=a|256;break a}q[b>>2]=c;c=285;break a}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;q[a>>2]=r[b|0];c=f;break a}q[a>>2]=Hk(b);c=f;break a}d=q[a+60>>2];c=q[d+4>>2];e=c+1|0;h=q[d+8>>2];ba:{if(e>>>0<=h>>>0){h=q[d>>2];break ba}if(h>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);c=q[a+52>>2];f=q[a+4>>2];q[g+200>>2]=141590;q[g+196>>2]=f;q[g+192>>2]=g+208;oj(c,141567,g+192|0);Nj(q[a+52>>2],3);h=q[d+8>>2]}c=q[a+52>>2];f=h<<1;ca:{if((f|0)!=-2){h=Cj(c,q[d>>2],h,f);break ca}h=mk(c)}q[d+8>>2]=f;q[d>>2]=h;c=q[d+4>>2];e=c+1|0}q[d+4>>2]=e;o[c+h|0]=46;d=q[a+56>>2];f=q[d>>2];q[d>>2]=f-1;c=a;da:{if(f){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;f=r[d|0];break da}f=Hk(d)}q[c>>2]=f;ea:{c=f&255;if(c>>>0>63){break ea}d=c&31;if((c&63)>>>0>=32){c=1<>>32-d;d=1<>2];e=q[b+4>>2];h=e+1|0;d=q[b+8>>2];fa:{if(h>>>0<=d>>>0){d=q[b>>2];break fa}if(d>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);c=q[a+52>>2];d=q[a+4>>2];q[g+184>>2]=141590;q[g+180>>2]=d;q[g+176>>2]=g+208;oj(c,141567,g+176|0);Nj(q[a+52>>2],3);d=q[b+8>>2]}c=q[a+52>>2];e=d<<1;ga:{if((e|0)!=-2){d=Cj(c,q[b>>2],d,e);break ga}d=mk(c)}q[b+8>>2]=e;q[b>>2]=d;e=q[b+4>>2];h=e+1|0}q[b+4>>2]=h;o[d+e|0]=f;b=q[a+56>>2];d=q[b>>2];q[b>>2]=d-1;c=a;ha:{if(d){d=b;b=q[b+4>>2];q[d+4>>2]=b+1;b=r[b|0];break ha}b=Hk(b)}q[c>>2]=b;c=278;d=b&255;if(d>>>0>63){break a}f=d&31;if((d&63)>>>0>=32){d=1<>>32-f;f=1<>2];e=q[c+4>>2];h=e+1|0;d=q[c+8>>2];ia:{if(h>>>0<=d>>>0){d=q[c>>2];break ia}if(d>>>0>=2147483646){Xk(g+208|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];f=q[a+4>>2];q[g+168>>2]=141590;q[g+164>>2]=f;q[g+160>>2]=g+208;oj(d,141567,g+160|0);Nj(q[a+52>>2],3);d=q[c+8>>2]}f=q[a+52>>2];e=d<<1;ja:{if((e|0)!=-2){d=Cj(f,q[c>>2],d,e);break ja}d=mk(f)}q[c+8>>2]=e;q[c>>2]=d;e=q[c+4>>2];h=e+1|0}q[c+4>>2]=h;o[d+e|0]=b;b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;ka:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break ka}b=Hk(b)}q[a>>2]=b;c=279;break a}c=46;if(f-48>>>0>9){break a}}gT(a,b);c=284;break a}c=q[a+56>>2];d=q[c>>2];q[c>>2]=d-1;b=a;la:{if(d){d=c;c=q[c+4>>2];q[d+4>>2]=c+1;d=r[c|0];break la}d=Hk(c)}q[b>>2]=d;c=126;if((d|0)!=61){break a}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;ma:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break ma}b=Hk(b)}q[a>>2]=b;c=283}Ii=g+288|0;return c}function ju(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-16|0;Ii=d;a:while(1){m=b-8|0;i=b-16|0;b:while(1){f=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-f|0;e=a>>4;switch(e|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}if(q[b-8>>2]<=q[f+8>>2]){break d}a=f+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=b-16|0;b=a+8|0;c=q[b+4>>2];q[f+8>>2]=q[b>>2];q[f+12>>2]=c;b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}c=b-16|0;a=f+16|0;g=b-8|0;b=q[g>>2];e=q[f+24>>2];if((e|0)<=q[f+8>>2]){if((b|0)<=(e|0)){break d}b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;b=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=b;b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;if(q[f+24>>2]<=q[f+8>>2]){break d}b=f+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;b=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=b;b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if((b|0)>(e|0)){a=f+8|0;b=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=b;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[c+12>>2];q[f+8>>2]=q[c+8>>2];q[f+12>>2]=a;a=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=a;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a;a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}b=f+8|0;e=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=e;b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;b=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=b;b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;if(q[g>>2]<=q[f+24>>2]){break d}b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a;a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}a=f+16|0;c=f+32|0;e=f+48|0;Zr(f,a,c,e);if(q[b-8>>2]<=q[f+56>>2]){break d}g=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=g;g=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=g;b=b-16|0;g=b+8|0;i=q[g+4>>2];q[e+8>>2]=q[g>>2];q[e+12>>2]=i;g=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=g;g=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=g;g=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=g;if(q[f+56>>2]<=q[f+40>>2]){break d}b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b;b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[e+12>>2];q[c+8>>2]=q[e+8>>2];q[c+12>>2]=b;b=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=b;b=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=b;b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;if(q[f+40>>2]<=q[f+24>>2]){break d}b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;b=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=b;b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;if(q[f+24>>2]<=q[f+8>>2]){break d}b=f+8|0;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;b=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=b;b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if((a|0)<=495){a=f+16|0;e=f+32|0;c=q[f+40>>2];g=q[f+24>>2];i=q[f+8>>2];l:{if((g|0)<=(i|0)){if((c|0)<=(g|0)){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;g=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=g;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;c=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=c;c=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=c;if((i|0)>=q[f+24>>2]){break l}c=f+8|0;g=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=g;c=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=c;c=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=c;c=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=c;c=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=c;c=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=c;break l}if((c|0)>(g|0)){a=f+8|0;c=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=c;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=e+8|0;c=q[a+4>>2];q[f+8>>2]=q[a>>2];q[f+12>>2]=c;a=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=a;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;break l}g=f+8|0;i=q[g+4>>2];q[d+8>>2]=q[g>>2];q[d+12>>2]=i;g=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=g;g=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=g;g=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=g;g=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=g;g=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=g;if((c|0)<=q[f+24>>2]){break l}c=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=c;c=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=c;c=e+8|0;g=q[c+4>>2];q[a+8>>2]=q[c>>2];q[a+12>>2]=g;c=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=c;a=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=a;a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a}a=f+48|0;if((b|0)==(a|0)){break d}while(1){c=a;i=q[a+8>>2];if((i|0)>q[e+8>>2]){j=q[c+12>>2];h=q[c>>2];k=q[c+4>>2];g=c;while(1){m:{a=e;m=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=m;m=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=m;if((a|0)==(f|0)){a=f;break m}e=a-16|0;g=a;if((i|0)>q[a-8>>2]){continue}}break}q[a+12>>2]=j;q[a+8>>2]=i;q[a>>2]=h;q[a+4>>2]=k}e=c;a=e+16|0;if((b|0)!=(a|0)){continue}break}break d}g=(e|0)/2<<4;h=g+f|0;n:{if((a|0)>=15985){e=(e|0)/4<<4;a=e+f|0;e=e+h|0;k=Zr(f,a,h,e);if(q[m>>2]<=q[e+8>>2]){break n}j=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=j;j=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=j;j=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=j;j=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=j;j=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=j;j=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=j;j=f+g|0;if(q[e+8>>2]<=q[j+8>>2]){k=k+1|0;break n}l=h+8|0;n=q[l+4>>2];q[d+8>>2]=q[l>>2];q[d+12>>2]=n;l=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=l;l=q[e+12>>2];q[h+8>>2]=q[e+8>>2];q[h+12>>2]=l;l=q[e+4>>2];q[h>>2]=q[e>>2];q[h+4>>2]=l;l=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=l;l=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=l;if(q[j+8>>2]<=q[a+8>>2]){k=k+2|0;break n}e=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=e;e=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=e;e=q[h+12>>2];q[a+8>>2]=q[h+8>>2];q[a+12>>2]=e;e=q[h+4>>2];q[a>>2]=q[h>>2];q[a+4>>2]=e;e=q[d+12>>2];q[h+8>>2]=q[d+8>>2];q[h+12>>2]=e;e=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=e;if(q[a+8>>2]<=q[f+8>>2]){k=k+3|0;break n}e=f+8|0;j=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=j;e=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=e;e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=e;e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;k=k+4|0;break n}a=f+g|0;e=q[a+8>>2];o:{if((e|0)<=q[f+8>>2]){k=0;if((e|0)>=q[m>>2]){break n}e=h+8|0;j=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=j;e=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=e;e=q[i+12>>2];q[h+8>>2]=q[i+8>>2];q[h+12>>2]=e;e=q[i+4>>2];q[h>>2]=q[i>>2];q[h+4>>2]=e;e=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=e;e=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=e;k=1;if(q[a+8>>2]<=q[f+8>>2]){break n}a=f+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[h+12>>2];q[f+8>>2]=q[h+8>>2];q[f+12>>2]=a;a=q[h+4>>2];q[f>>2]=q[h>>2];q[f+4>>2]=a;a=q[d+12>>2];q[h+8>>2]=q[d+8>>2];q[h+12>>2]=a;a=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=a;break o}if((e|0)>2]){a=f+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=q[i+12>>2];q[f+8>>2]=q[i+8>>2];q[f+12>>2]=a;a=q[i+4>>2];q[f>>2]=q[i>>2];q[f+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;k=1;break n}e=f+8|0;j=q[e+4>>2];q[d+8>>2]=q[e>>2];q[d+12>>2]=j;e=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=e;e=h+8|0;j=q[e+4>>2];q[f+8>>2]=q[e>>2];q[f+12>>2]=j;e=q[h+4>>2];q[f>>2]=q[h>>2];q[f+4>>2]=e;e=q[d+12>>2];q[h+8>>2]=q[d+8>>2];q[h+12>>2]=e;e=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=e;k=1;if(q[m>>2]<=q[a+8>>2]){break n}a=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=a;a=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=a;a=q[i+12>>2];q[h+8>>2]=q[i+8>>2];q[h+12>>2]=a;a=q[i+4>>2];q[h>>2]=q[i>>2];q[h+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a}k=2}a=i;j=q[f+8>>2];e=q[(f+g|0)+8>>2];p:{if((j|0)>(e|0)){g=i;break p}while(1){g=a-16|0;if((g|0)==(f|0)){e=f+16|0;if((j|0)>q[m>>2]){break e}if((e|0)==(i|0)){break d}while(1){if((j|0)>q[e+8>>2]){a=e+8|0;g=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=g;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=a;a=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=a;a=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=a;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;e=e+16|0;break e}e=e+16|0;if((i|0)!=(e|0)){continue}break}break d}l=a-8|0;a=g;if((e|0)>=q[l>>2]){continue}break}a=f+8|0;e=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=e;a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=g+8|0;e=q[a+4>>2];q[f+8>>2]=q[a>>2];q[f+12>>2]=e;a=q[g+4>>2];q[f>>2]=q[g>>2];q[f+4>>2]=a;a=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=a;a=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=a;k=k+1|0}e=f+16|0;if(e>>>0>=g>>>0){break f}while(1){l=q[h+8>>2];while(1){j=e;e=e+16|0;if((l|0)>2]){continue}break}a=g;while(1){n=a-8|0;g=a-16|0;a=g;if((l|0)>=q[n>>2]){continue}break}if(g>>>0>>0){e=j;break f}else{a=q[j+12>>2];q[d+8>>2]=q[j+8>>2];q[d+12>>2]=a;a=q[j+4>>2];q[d>>2]=q[j>>2];q[d+4>>2]=a;a=g+8|0;l=q[a+4>>2];q[j+8>>2]=q[a>>2];q[j+12>>2]=l;a=q[g+4>>2];q[j>>2]=q[g>>2];q[j+4>>2]=a;a=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=a;a=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=a;h=(h|0)==(j|0)?g:h;k=k+1|0;continue}}}Zr(f,f+16|0,f+32|0,b-16|0);break d}if(!((e|0)==(h|0)|q[h+8>>2]<=q[e+8>>2])){a=e+8|0;g=q[a+4>>2];q[d+8>>2]=q[a>>2];q[d+12>>2]=g;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;a=h+8|0;g=q[a+4>>2];q[e+8>>2]=q[a>>2];q[e+12>>2]=g;a=q[h+4>>2];q[e>>2]=q[h>>2];q[e+4>>2]=a;a=q[d+12>>2];q[h+8>>2]=q[d+8>>2];q[h+12>>2]=a;a=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=a;k=k+1|0}if(!k){g=FN(f,e);a=e+16|0;if(FN(a,b)){b=e;a=f;if(!g){continue a}break d}if(g){continue b}}if((e-f|0)<(b-e|0)){ju(f,e,c);a=e+16|0;continue b}ju(e+16|0,b,c);b=e;a=f;continue a}g=i;if((e|0)==(g|0)){break d}while(1){h=q[f+8>>2];while(1){j=e;e=e+16|0;if((h|0)<=q[j+8>>2]){continue}break}a=g;while(1){k=a-8|0;g=a-16|0;a=g;if((h|0)>q[k>>2]){continue}break}if(g>>>0<=j>>>0){f=j;continue c}else{a=q[j+12>>2];q[d+8>>2]=q[j+8>>2];q[d+12>>2]=a;a=q[j+4>>2];q[d>>2]=q[j>>2];q[d+4>>2]=a;a=g+8|0;h=q[a+4>>2];q[j+8>>2]=q[a>>2];q[j+12>>2]=h;a=q[g+4>>2];q[j>>2]=q[g>>2];q[j+4>>2]=a;a=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=a;a=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=a;continue}}}break}break}break}Ii=d+16|0}function Yi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=Ii-16|0;Ii=m;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{if(a>>>0<=244){g=q[240591];f=a>>>0<11?16:a+11&-8;a=f>>>3|0;b=g>>>a|0;if(b&3){c=a+((b^-1)&1)|0;f=c<<3;b=q[f+962412>>2];a=b+8|0;d=q[b+8>>2];f=f+962404|0;m:{if((d|0)==(f|0)){q[240591]=Fza(-2,c)&g;break m}q[d+12>>2]=f;q[f+8>>2]=d}c=c<<3;q[b+4>>2]=c|3;b=b+c|0;q[b+4>>2]=q[b+4>>2]|1;break a}i=q[240593];if(i>>>0>=f>>>0){break l}if(b){c=2<>>12&16;c=b;a=a>>>b|0;b=a>>>5&8;c=c|b;a=a>>>b|0;b=a>>>2&4;c=c|b;a=a>>>b|0;b=a>>>1&2;c=c|b;a=a>>>b|0;b=a>>>1&1;c=(c|b)+(a>>>b|0)|0;d=c<<3;b=q[d+962412>>2];a=q[b+8>>2];d=d+962404|0;n:{if((a|0)==(d|0)){g=Fza(-2,c)&g;q[240591]=g;break n}q[a+12>>2]=d;q[d+8>>2]=a}a=b+8|0;q[b+4>>2]=f|3;e=b+f|0;c=c<<3;f=c-f|0;q[e+4>>2]=f|1;q[b+c>>2]=f;if(i){c=i>>>3|0;b=(c<<3)+962404|0;d=q[240596];c=1<>2]}q[b+8>>2]=d;q[c+12>>2]=d;q[d+12>>2]=b;q[d+8>>2]=c}q[240596]=e;q[240593]=f;break a}k=q[240592];if(!k){break l}a=(k&0-k)-1|0;b=a>>>12&16;c=b;a=a>>>b|0;b=a>>>5&8;c=c|b;a=a>>>b|0;b=a>>>2&4;c=c|b;a=a>>>b|0;b=a>>>1&2;c=c|b;a=a>>>b|0;b=a>>>1&1;b=q[((c|b)+(a>>>b|0)<<2)+962668>>2];e=(q[b+4>>2]&-8)-f|0;c=b;while(1){p:{a=q[c+16>>2];if(!a){a=q[c+20>>2];if(!a){break p}}d=(q[a+4>>2]&-8)-f|0;c=d>>>0>>0;e=c?d:e;b=c?a:b;c=a;continue}break}l=b+f|0;if(l>>>0<=b>>>0){break k}j=q[b+24>>2];d=q[b+12>>2];if((d|0)!=(b|0)){a=q[b+8>>2];q[a+12>>2]=d;q[d+8>>2]=a;break b}c=b+20|0;a=q[c>>2];if(!a){a=q[b+16>>2];if(!a){break j}c=b+16|0}while(1){h=c;d=a;c=a+20|0;a=q[c>>2];if(a){continue}c=d+16|0;a=q[d+16>>2];if(a){continue}break}q[h>>2]=0;break b}f=-1;if(a>>>0>4294967231){break l}a=a+11|0;f=a&-8;i=q[240592];if(!i){break l}h=31;e=0-f|0;if(f>>>0<=16777215){b=a>>>8|0;a=b+1048320>>>16&8;c=b<>>16&4;g=c<>>16&2;a=(g<>>15|0)-(c|(a|b))|0;h=(a<<1|f>>>a+21&1)+28|0}c=q[(h<<2)+962668>>2];q:{r:{s:{if(!c){a=0;break s}a=0;b=f<<((h|0)==31?0:25-(h>>>1|0)|0);while(1){t:{g=(q[c+4>>2]&-8)-f|0;if(g>>>0>=e>>>0){break t}d=c;e=g;if(e){break t}e=0;a=c;break r}g=q[c+20>>2];c=q[((b>>>29&4)+c|0)+16>>2];a=g?(g|0)==(c|0)?a:g:a;b=b<<1;if(c){continue}break}}if(!(a|d)){a=2<>>12&16;c=b;a=a>>>b|0;b=a>>>5&8;c=c|b;a=a>>>b|0;b=a>>>2&4;c=c|b;a=a>>>b|0;b=a>>>1&2;c=c|b;a=a>>>b|0;b=a>>>1&1;a=q[((c|b)+(a>>>b|0)<<2)+962668>>2]}if(!a){break q}}while(1){c=(q[a+4>>2]&-8)-f|0;b=c>>>0>>0;e=b?c:e;d=b?a:d;b=q[a+16>>2];if(b){a=b}else{a=q[a+20>>2]}if(a){continue}break}}if(!d|q[240593]-f>>>0<=e>>>0){break l}h=d+f|0;if(h>>>0<=d>>>0){break k}j=q[d+24>>2];b=q[d+12>>2];if((d|0)!=(b|0)){a=q[d+8>>2];q[a+12>>2]=b;q[b+8>>2]=a;break c}c=d+20|0;a=q[c>>2];if(!a){a=q[d+16>>2];if(!a){break i}c=d+16|0}while(1){g=c;b=a;c=a+20|0;a=q[c>>2];if(a){continue}c=b+16|0;a=q[b+16>>2];if(a){continue}break}q[g>>2]=0;break c}b=q[240593];if(b>>>0>=f>>>0){a=q[240596];c=b-f|0;u:{if(c>>>0>=16){q[240593]=c;d=a+f|0;q[240596]=d;q[d+4>>2]=c|1;q[a+b>>2]=c;q[a+4>>2]=f|3;break u}q[240596]=0;q[240593]=0;q[a+4>>2]=b|3;b=a+b|0;q[b+4>>2]=q[b+4>>2]|1}a=a+8|0;break a}d=q[240594];if(d>>>0>f>>>0){b=d-f|0;q[240594]=b;a=q[240597];c=a+f|0;q[240597]=c;q[c+4>>2]=b|1;q[a+4>>2]=f|3;a=a+8|0;break a}a=0;e=f+47|0;c=e;if(q[240709]){b=q[240711]}else{q[240712]=-1;q[240713]=-1;q[240710]=4096;q[240711]=4096;q[240709]=m+12&-16^1431655768;q[240714]=0;q[240702]=0;b=4096}g=c+b|0;h=0-b|0;c=g&h;if(c>>>0<=f>>>0){break a}i=q[240701];if(i){j=q[240699];b=j+c|0;if(b>>>0<=j>>>0|b>>>0>i>>>0){break a}}if(r[962808]&4){break f}v:{w:{b=q[240597];if(b){a=962812;while(1){i=q[a>>2];if(b>>>0>2]>>>0?i>>>0<=b>>>0:0){break w}a=q[a+8>>2];if(a){continue}break}}b=Tp(0);if((b|0)==-1){break g}g=c;a=q[240710];d=a-1|0;if(d&b){g=(c-b|0)+(b+d&0-a)|0}if(g>>>0>2147483646|f>>>0>=g>>>0){break g}d=q[240701];if(d){h=q[240699];a=h+g|0;if(a>>>0<=h>>>0|a>>>0>d>>>0){break g}}a=Tp(g);if((b|0)!=(a|0)){break v}break e}g=h&g-d;if(g>>>0>2147483646){break g}b=Tp(g);if((b|0)==(q[a>>2]+q[a+4>>2]|0)){break h}a=b}if(!((a|0)==-1|f+48>>>0<=g>>>0)){b=q[240711];b=b+(e-g|0)&0-b;if(b>>>0>2147483646){b=a;break e}if((Tp(b)|0)!=-1){g=b+g|0;b=a;break e}Tp(0-g|0);break g}b=a;if((a|0)!=-1){break e}break g}G()}d=0;break b}b=0;break c}if((b|0)!=-1){break e}}q[240702]=q[240702]|4}if(c>>>0>2147483646){break d}b=Tp(c);a=Tp(0);if(b>>>0>=a>>>0|(b|0)==-1|(a|0)==-1){break d}g=a-b|0;if(g>>>0<=f+40>>>0){break d}}a=q[240699]+g|0;q[240699]=a;if(a>>>0>t[240700]){q[240700]=a}x:{y:{z:{e=q[240597];if(e){a=962812;while(1){c=q[a>>2];d=q[a+4>>2];if((c+d|0)==(b|0)){break z}a=q[a+8>>2];if(a){continue}break}break y}a=q[240595];if(!(a>>>0<=b>>>0?a:0)){q[240595]=b}a=0;q[240704]=g;q[240703]=b;q[240599]=-1;q[240600]=q[240709];q[240706]=0;while(1){c=a<<3;d=c+962404|0;q[c+962412>>2]=d;q[c+962416>>2]=d;a=a+1|0;if((a|0)!=32){continue}break}a=g-40|0;c=b+8&7?-8-b&7:0;d=a-c|0;q[240594]=d;c=b+c|0;q[240597]=c;q[c+4>>2]=d|1;q[(a+b|0)+4>>2]=40;q[240598]=q[240713];break x}if(r[a+12|0]&8|b>>>0<=e>>>0|c>>>0>e>>>0){break y}q[a+4>>2]=d+g;a=e+8&7?-8-e&7:0;b=a+e|0;q[240597]=b;c=q[240594]+g|0;a=c-a|0;q[240594]=a;q[b+4>>2]=a|1;q[(c+e|0)+4>>2]=40;q[240598]=q[240713];break x}d=q[240595];if(d>>>0>b>>>0){q[240595]=b;d=0}c=b+g|0;a=962812;A:{B:{C:{D:{E:{F:{while(1){if((c|0)!=q[a>>2]){a=q[a+8>>2];if(a){continue}break F}break}if(!(r[a+12|0]&8)){break E}}a=962812;while(1){c=q[a>>2];if(c>>>0<=e>>>0){d=c+q[a+4>>2]|0;if(d>>>0>e>>>0){break D}}a=q[a+8>>2];continue}}q[a>>2]=b;q[a+4>>2]=q[a+4>>2]+g;j=(b+8&7?-8-b&7:0)+b|0;q[j+4>>2]=f|3;b=c+(c+8&7?-8-c&7:0)|0;a=(b-j|0)-f|0;h=f+j|0;if((b|0)==(e|0)){q[240597]=h;a=q[240594]+a|0;q[240594]=a;q[h+4>>2]=a|1;break B}if(q[240596]==(b|0)){q[240596]=h;a=q[240593]+a|0;q[240593]=a;q[h+4>>2]=a|1;q[a+h>>2]=a;break B}c=q[b+4>>2];if((c&3)==1){k=c&-8;G:{if(c>>>0<=255){f=c>>>3|0;c=q[b+8>>2];d=q[b+12>>2];if((d|0)==(c|0)){q[240591]=q[240591]&Fza(-2,f);break G}q[c+12>>2]=d;q[d+8>>2]=c;break G}i=q[b+24>>2];g=q[b+12>>2];H:{if((g|0)!=(b|0)){c=q[b+8>>2];q[c+12>>2]=g;q[g+8>>2]=c;break H}I:{e=b+20|0;f=q[e>>2];if(f){break I}e=b+16|0;f=q[e>>2];if(f){break I}g=0;break H}while(1){c=e;g=f;e=f+20|0;f=q[e>>2];if(f){continue}e=g+16|0;f=q[g+16>>2];if(f){continue}break}q[c>>2]=0}if(!i){break G}c=q[b+28>>2];d=(c<<2)+962668|0;J:{if(q[d>>2]==(b|0)){q[d>>2]=g;if(g){break J}q[240592]=q[240592]&Fza(-2,c);break G}q[i+(q[i+16>>2]==(b|0)?16:20)>>2]=g;if(!g){break G}}q[g+24>>2]=i;c=q[b+16>>2];if(c){q[g+16>>2]=c;q[c+24>>2]=g}c=q[b+20>>2];if(!c){break G}q[g+20>>2]=c;q[c+24>>2]=g}b=b+k|0;a=a+k|0}q[b+4>>2]=q[b+4>>2]&-2;q[h+4>>2]=a|1;q[a+h>>2]=a;if(a>>>0<=255){b=a>>>3|0;a=(b<<3)+962404|0;c=q[240591];b=1<>2]}q[a+8>>2]=h;q[b+12>>2]=h;q[h+12>>2]=a;q[h+8>>2]=b;break B}e=31;if(a>>>0<=16777215){c=a>>>8|0;b=c+1048320>>>16&8;d=c<>>16&4;f=d<>>16&2;b=(f<>>15|0)-(d|(b|c))|0;e=(b<<1|a>>>b+21&1)+28|0}q[h+28>>2]=e;q[h+16>>2]=0;q[h+20>>2]=0;b=(e<<2)+962668|0;c=q[240592];d=1<>2]=h;q[h+24>>2]=b;break L}e=a<<((e|0)==31?0:25-(e>>>1|0)|0);b=q[b>>2];while(1){c=b;if((q[b+4>>2]&-8)==(a|0)){break C}b=e>>>29|0;e=e<<1;d=c+(b&4)|0;b=q[d+16>>2];if(b){continue}break}q[d+16>>2]=h;q[h+24>>2]=c}q[h+12>>2]=h;q[h+8>>2]=h;break B}a=g-40|0;c=b+8&7?-8-b&7:0;h=a-c|0;q[240594]=h;c=b+c|0;q[240597]=c;q[c+4>>2]=h|1;q[(a+b|0)+4>>2]=40;q[240598]=q[240713];a=(d+(d-39&7?39-d&7:0)|0)-47|0;c=a>>>0>>0?e:a;q[c+4>>2]=27;a=q[240706];q[c+16>>2]=q[240705];q[c+20>>2]=a;a=q[240704];q[c+8>>2]=q[240703];q[c+12>>2]=a;q[240705]=c+8;q[240704]=g;q[240703]=b;q[240706]=0;a=c+24|0;while(1){q[a+4>>2]=7;b=a+8|0;a=a+4|0;if(b>>>0>>0){continue}break}if((c|0)==(e|0)){break x}q[c+4>>2]=q[c+4>>2]&-2;d=c-e|0;q[e+4>>2]=d|1;q[c>>2]=d;if(d>>>0<=255){b=d>>>3|0;a=(b<<3)+962404|0;c=q[240591];b=1<>2]}q[a+8>>2]=e;q[b+12>>2]=e;q[e+12>>2]=a;q[e+8>>2]=b;break x}a=31;q[e+16>>2]=0;q[e+20>>2]=0;if(d>>>0<=16777215){b=d>>>8|0;a=b+1048320>>>16&8;c=b<>>16&4;g=c<>>16&2;a=(g<>>15|0)-(c|(a|b))|0;a=(a<<1|d>>>a+21&1)+28|0}q[e+28>>2]=a;b=(a<<2)+962668|0;c=q[240592];g=1<>2]=e;q[e+24>>2]=b;break N}a=d<<((a|0)==31?0:25-(a>>>1|0)|0);b=q[b>>2];while(1){c=b;if((d|0)==(q[b+4>>2]&-8)){break A}b=a>>>29|0;a=a<<1;g=c+(b&4)|0;b=q[g+16>>2];if(b){continue}break}q[g+16>>2]=e;q[e+24>>2]=c}q[e+12>>2]=e;q[e+8>>2]=e;break x}a=q[c+8>>2];q[a+12>>2]=h;q[c+8>>2]=h;q[h+24>>2]=0;q[h+12>>2]=c;q[h+8>>2]=a}a=j+8|0;break a}a=q[c+8>>2];q[a+12>>2]=e;q[c+8>>2]=e;q[e+24>>2]=0;q[e+12>>2]=c;q[e+8>>2]=a}a=q[240594];if(a>>>0<=f>>>0){break d}b=a-f|0;q[240594]=b;a=q[240597];c=a+f|0;q[240597]=c;q[c+4>>2]=b|1;q[a+4>>2]=f|3;a=a+8|0;break a}q[240513]=48;a=0;break a}O:{if(!j){break O}a=q[d+28>>2];c=(a<<2)+962668|0;P:{if(q[c>>2]==(d|0)){q[c>>2]=b;if(b){break P}i=Fza(-2,a)&i;q[240592]=i;break O}q[j+(q[j+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break O}}q[b+24>>2]=j;a=q[d+16>>2];if(a){q[b+16>>2]=a;q[a+24>>2]=b}a=q[d+20>>2];if(!a){break O}q[b+20>>2]=a;q[a+24>>2]=b}Q:{if(e>>>0<=15){a=e+f|0;q[d+4>>2]=a|3;a=a+d|0;q[a+4>>2]=q[a+4>>2]|1;break Q}q[d+4>>2]=f|3;q[h+4>>2]=e|1;q[e+h>>2]=e;if(e>>>0<=255){b=e>>>3|0;a=(b<<3)+962404|0;c=q[240591];b=1<>2]}q[a+8>>2]=h;q[b+12>>2]=h;q[h+12>>2]=a;q[h+8>>2]=b;break Q}a=31;if(e>>>0<=16777215){b=e>>>8|0;a=b+1048320>>>16&8;c=b<>>16&4;f=c<>>16&2;a=(f<>>15|0)-(c|(a|b))|0;a=(a<<1|e>>>a+21&1)+28|0}q[h+28>>2]=a;q[h+16>>2]=0;q[h+20>>2]=0;b=(a<<2)+962668|0;S:{c=1<>2]=h;break T}a=e<<((a|0)==31?0:25-(a>>>1|0)|0);f=q[b>>2];while(1){b=f;if((q[b+4>>2]&-8)==(e|0)){break S}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;f=q[c+16>>2];if(f){continue}break}q[c+16>>2]=h}q[h+24>>2]=b;q[h+12>>2]=h;q[h+8>>2]=h;break Q}a=q[b+8>>2];q[a+12>>2]=h;q[b+8>>2]=h;q[h+24>>2]=0;q[h+12>>2]=b;q[h+8>>2]=a}a=d+8|0;break a}U:{if(!j){break U}a=q[b+28>>2];c=(a<<2)+962668|0;V:{if(q[c>>2]==(b|0)){q[c>>2]=d;if(d){break V}q[240592]=Fza(-2,a)&k;break U}q[j+(q[j+16>>2]==(b|0)?16:20)>>2]=d;if(!d){break U}}q[d+24>>2]=j;a=q[b+16>>2];if(a){q[d+16>>2]=a;q[a+24>>2]=d}a=q[b+20>>2];if(!a){break U}q[d+20>>2]=a;q[a+24>>2]=d}W:{if(e>>>0<=15){a=e+f|0;q[b+4>>2]=a|3;a=a+b|0;q[a+4>>2]=q[a+4>>2]|1;break W}q[b+4>>2]=f|3;q[l+4>>2]=e|1;q[e+l>>2]=e;if(i){c=i>>>3|0;a=(c<<3)+962404|0;d=q[240596];c=1<>2]}q[a+8>>2]=d;q[c+12>>2]=d;q[d+12>>2]=a;q[d+8>>2]=c}q[240596]=l;q[240593]=e}a=b+8|0}Ii=m+16|0;return a|0}function aqa(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=x(0),v=x(0),y=0,z=x(0),A=0,B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=0,M=x(0),N=x(0),O=x(0),P=x(0),Q=x(0),R=x(0),S=0,T=x(0),U=x(0),V=x(0),W=x(0),X=0,Y=0,Z=x(0),_=x(0),$=x(0),aa=0,ba=0,ca=0;h=Ii-304|0;Ii=h;T=u[f+8>>2];U=u[f+4>>2];V=u[f>>2];E=u[e+12>>2];F=u[e+8>>2];H=u[e+4>>2];I=u[e>>2];Z=u[d+8>>2];_=u[d+4>>2];$=u[d>>2];j=q[a>>2];wn(h+192|0,1);Gj(q[j+3232>>2]);a=q[j+3240>>2];q[j+3240>>2]=a+1;Bj(q[j+3232>>2]);q[h+148>>2]=a;q[h+144>>2]=q[56654];sj(h+224|0,32,11155,h+144|0);Cl(h+192|0,h+224|0,hj(h+224|0));pt(g,32,q[b+8>>2]);a=h+184|0;q[a>>2]=0;q[a+4>>2]=0;q[h+176>>2]=0;q[h+180>>2]=0;Wi(q[b+8>>2],4,h+176|0,a,h+176|4);a:{b:{c:{d:{e:{f:{g:{h:{d=q[b+8>>2];i:{if(d){l=j+3144|0;i=1;e=0;while(1){if(d>>>0<=e>>>0){break b}a=q[b+4>>2];q[h+172>>2]=0;f=a+w(e,80)|0;a=q[f+4>>2];j:{if(!a){break j}d=q[j>>2];if(ak(d,a,h+172|0)){break j}a=vw(j,q[h+172>>2],q[f+4>>2]);if(!a){break h}m=q[a+140>>2];q[a+136>>2]=q[a+136>>2]&-2561|q[b+20>>2]<<9&512|2048;q[a+140>>2]=m;K=u[f+72>>2];B=u[f+64>>2];n=u[f+68>>2];if(!(B!=x(0)|n!=x(0)|K!=x(0))){B=u[f+56>>2];n=B;K=n}d=q[f+32>>2];m=q[f+36>>2];k=q[f+40>>2];y=q[f+44>>2];A=q[f+20>>2];L=q[f+16>>2];M=u[f+24>>2];u[a+40>>2]=K;u[a+36>>2]=n;u[a+32>>2]=B;u[a+24>>2]=M;q[a+16>>2]=L;q[a+20>>2]=A;q[a+8>>2]=k;q[a+12>>2]=y;q[a>>2]=d;q[a+4>>2]=m;m=a+104|0;ut(m,h+192|0,1);d=q[f>>2];k=wm(d,o[q[56654]]);k:{if(!k){q[h+128>>2]=d;Pi(4,7319,10403,h+128|0);i=0;break k}Cl(m,d,(k-d|0)+1|0)}ut(h+272|0,h+192|0,1);d=q[f>>2];Cl(h+272|0,d,hj(d));q[h+152>>2]=ro(h+272|0);q[h+156>>2]=Li;d=q[f>>2];Ov(g,Wl(d,hj(d)),Li,h+152|0);d=q[h+180>>2];if((d|0)==q[h+184>>2]){break a}q[h+180>>2]=d+4;q[d>>2]=a;d=q[h+152>>2];m=q[h+156>>2];q[h+268>>2]=a;l:{k=q[j+3148>>2];m:{if(!k){break m}k=q[q[l>>2]+(Cza(d,m,k)<<2)>>2];if((k|0)==-1){break m}y=q[j+3152>>2];while(1){k=y+(k<<4)|0;if((d|0)==q[k>>2]&(m|0)==q[k+4>>2]){break l}k=q[k+12>>2];if((k|0)!=-1){continue}break}}if(q[a+96>>2]!=q[71492]|q[a+100>>2]!=q[71493]){break l}q[a+96>>2]=d;q[a+100>>2]=m;wr(l,d,m,h+268|0);if(t[j+3168>>2]<=s[j+1058>>1]){break j}J(7842,7192,1e3,8106);G()}q[h+116>>2]=q[f>>2];q[h+112>>2]=h+224;Pi(4,7319,10465,h+112|0);i=0}d=q[b+8>>2];e=e+1|0;if(d>>>0>e>>>0){continue}break}yr(h+192|0);if(i){break i}break g}yr(h+192|0)}e=q[b+8>>2];n:{if(!e){e=0;break n}i=1;k=0;while(1){if(e>>>0<=k>>>0){break b}m=q[b+4>>2]+w(k,80)|0;d=Oi(q[m>>2]);f=Li;o:{a=q[g+4>>2];p:{if(!a){break p}e=q[q[g>>2]+(Cza(d,f,a)<<2)>>2];if((e|0)==-1){break p}l=q[g+8>>2];while(1){a=l+w(e,24)|0;if((d|0)==q[a>>2]&(f|0)==q[a+4>>2]){break o}e=q[a+16>>2];if((e|0)!=-1){continue}break}}J(10512,7192,1383,10522);G()}d=q[j+3148>>2];if(!d){break e}f=q[a+8>>2];l=q[a+12>>2];e=q[q[j+3144>>2]+(Cza(f,l,d)<<2)>>2];if((e|0)==-1){break e}d=q[j+3152>>2];while(1){a=d+(e<<4)|0;if(q[a>>2]!=(f|0)|q[a+4>>2]!=(l|0)){e=q[a+12>>2];if((e|0)!=-1){continue}break e}break}l=q[a+8>>2];if(!l){break e}e=q[m+12>>2];if(e){A=l+104|0;f=0;while(1){q:{r:{s:{if(e>>>0>f>>>0){y=f<<2;a=q[y+q[m+8>>2]>>2];d=hj(a);t:{if(r[a|0]==r[q[56654]]){a=Wl(a,d);d=Li;break t}ut(h+272|0,A,0);Cl(h+272|0,a,d);a=ro(h+272|0);d=Li}e=q[g+4>>2];u:{if(!e){break u}e=q[q[g>>2]+(Cza(a,d,e)<<2)>>2];if((e|0)==-1){break u}L=q[g+8>>2];while(1){e=L+w(e,24)|0;if(q[e>>2]!=(a|0)|q[e+4>>2]!=(d|0)){e=q[e+16>>2];if((e|0)!=-1){continue}break u}break}a=q[e+8>>2];d=q[e+12>>2]}e=q[j+3148>>2];if(!e){break s}e=q[q[j+3144>>2]+(Cza(a,d,e)<<2)>>2];if((e|0)==-1){break s}L=q[j+3152>>2];while(1){e=L+(e<<4)|0;if(q[e>>2]!=(a|0)|q[e+4>>2]!=(d|0)){e=q[e+12>>2];if((e|0)!=-1){continue}break s}break}a=q[e+8>>2];if(!a){break s}a=qw(a,l);if(!a){break q}if(t[m+12>>2]<=f>>>0){break d}d=q[y+q[m+8>>2]>>2];e=q[m>>2];q[h+104>>2]=a;q[h+100>>2]=d;q[h+96>>2]=e;Pi(4,7319,10561,h+96|0);break r}break d}if(t[m+12>>2]<=f>>>0){break d}q[h+80>>2]=q[y+q[m+8>>2]>>2];Pi(4,7319,10599,h+80|0)}i=0}e=q[m+12>>2];f=f+1|0;if(e>>>0>f>>>0){continue}break}}e=q[b+8>>2];k=k+1|0;if(e>>>0>k>>>0){continue}break}if(!i){break g}}d=q[h+180>>2];f=q[h+176>>2];a=d-f|0;if(a){d=f-d|0;e=((a|0)<(d|0)?d:a)>>>2|0;d=(a|0)>-1?a:-1;l=w(e,(d|0)<1?d:1);y=a>>2;d=0;while(1){if((d|0)==(l|0)){break c}e=q[f+(d<<2)>>2];m=q[e+136>>2];a=q[e+140>>2];v:{w:{i=m>>>16|0;if((i|0)==32767){break w}A=q[e+80>>2];k=q[A+1036>>2];if(i>>>0>=q[A+1040>>2]-k>>2>>>0){break c}if(!q[k+(i<<2)>>2]){break w}K=u[e+40>>2];B=u[e+36>>2];M=u[e+32>>2];R=u[e+12>>2];N=u[e+8>>2];O=u[e+4>>2];n=u[e>>2];break v}M=x(V*u[e+32>>2]);u[e+32>>2]=M;K=x(T*u[e+40>>2]);u[e+40>>2]=K;B=x(U*u[e+36>>2]);u[e+36>>2]=B;n=u[e+12>>2];v=u[e>>2];z=u[e+4>>2];C=u[e+8>>2];R=x(x(x(x(E*n)-x(I*v))-x(H*z))-x(F*C));u[e+12>>2]=R;N=x(x(x(I*z)+x(x(E*C)+x(F*n)))-x(H*v));u[e+8>>2]=N;O=x(x(x(F*v)+x(x(E*z)+x(H*n)))-x(I*C));u[e+4>>2]=O;n=x(x(x(H*C)+x(x(E*v)+x(I*n)))-x(F*z));u[e>>2]=n;v=x(V*u[e+16>>2]);z=x(U*u[e+20>>2]);C=x(T*u[e+24>>2]);D=x(x(x(F*v)+x(E*z))-x(I*C));P=x(x(F*C)+x(x(I*v)+x(H*z)));Q=x(x(x(I*z)+x(E*C))-x(H*v));v=x(x(x(E*v)+x(H*C))-x(F*z));u[e+24>>2]=Z+x(x(I*D)+x(x(x(F*P)+x(E*Q))-x(H*v)));u[e+20>>2]=_+x(x(F*v)+x(x(x(E*D)+x(H*P))-x(I*Q)));u[e+16>>2]=$+x(x(H*Q)+x(x(x(I*P)+x(E*v))-x(F*D)))}a=a&32767;i=q[j+3128>>2];if(a>>>0>=q[j+3132>>2]-i>>6>>>0){break c}C=u[e+24>>2];m=q[e+16>>2];e=q[e+20>>2];a=i+(a<<6)|0;v=x(N+N);D=x(R*v);z=x(O+O);P=x(n*z);u[a+4>>2]=M*x(D+P);Q=x(v*n);W=x(R*z);u[a+8>>2]=M*x(Q-W);u[a+12>>2]=M*x(0);u[a+16>>2]=B*x(P-D);u[a+32>>2]=K*x(Q+W);q[a+48>>2]=m;q[a+52>>2]=e;D=n;n=x(n+n);D=x(x(1)-x(D*n));N=x(N*v);u[a+20>>2]=B*x(D-N);v=x(O*v);n=x(R*n);u[a+24>>2]=B*x(v+n);u[a+28>>2]=B*x(0);u[a+36>>2]=K*x(v-n);n=x(O*z);u[a+40>>2]=K*x(D-n);u[a+44>>2]=K*x(0);q[a+60>>2]=1065353216;u[a+56>>2]=C;u[a>>2]=M*x(x(x(1)-n)-N);d=d+1|0;if((y|0)!=(d|0)){continue}break}e=q[b+8>>2]}a=h+160|0;q[a>>2]=0;q[a+4>>2]=0;q[h+152>>2]=0;q[h+156>>2]=0;Wi(e,4,h+152|0,a,h+152|4);x:{y:{z:{A:{B:{e=q[b+8>>2];if(e){aa=j+3144|0;m=h+272|4;k=1;A=0;while(1){C:{D:{E:{if(e>>>0>A>>>0){y=q[b+4>>2]+w(A,80)|0;d=Oi(q[y>>2]);f=Li;F:{a=q[g+4>>2];G:{if(!a){break G}e=q[q[g>>2]+(Cza(d,f,a)<<2)>>2];if((e|0)==-1){break G}i=q[g+8>>2];while(1){a=i+w(e,24)|0;if((d|0)==q[a>>2]&(f|0)==q[a+4>>2]){break F}e=q[a+16>>2];if((e|0)!=-1){continue}break}}J(10619,7192,1458,10522);G()}d=0;e=q[j+3148>>2];H:{if(!e){break H}f=q[a+8>>2];i=q[a+12>>2];e=q[q[j+3144>>2]+(Cza(f,i,e)<<2)>>2];if((e|0)==-1){break H}l=q[j+3152>>2];while(1){a=l+(e<<4)|0;if(q[a>>2]!=(f|0)|q[a+4>>2]!=(i|0)){e=q[a+12>>2];if((e|0)!=-1){continue}break H}break}d=q[a+8>>2]}if(!Mt(j,d)){break E}a=q[h+156>>2];if((a|0)!=q[h+160>>2]){q[h+156>>2]=a+4;q[a>>2]=d;a=q[d+84>>2];X=q[a+4>>2];if(!X){break C}ba=q[a>>2];L=0;S=0;while(1){I:{l=w(L,96)+ba|0;a=q[l+16>>2];if(q[a+80>>2]){if(!(o[a+102|0]&1)){a=aj(q[l>>2],q[l+4>>2]);d=q[y>>2];q[h+8>>2]=q[b>>2];q[h+4>>2]=d;q[h>>2]=a;Pi(4,7319,10631,h);break D}J:{f=q[y+52>>2];if(!f){i=0;break J}e=0;while(1){i=q[y+48>>2]+w(e,92)|0;if((Oi(q[i>>2])|0)==q[l>>2]&(Li|0)==q[l+4>>2]){i=HB(i+12|0);if(i){break J}e=aj(q[l>>2],q[l+4>>2]);f=q[y>>2];q[h+72>>2]=q[b>>2];q[h+68>>2]=f;q[h+64>>2]=e;Pi(4,7319,10757,h- -64|0);i=0;k=0;break J}e=e+1|0;if((f|0)==(e|0)){i=0;break J}if(t[y+52>>2]>e>>>0){continue}break}J(9401,9413,160,9454);G()}f=Oi(q[y>>2]);Y=Li;K:{L:{M:{N:{O:{e=q[c+4>>2];P:{if(!e){break P}e=q[q[c>>2]+(Cza(f,Y,e)<<2)>>2];if((e|0)==-1){break P}ca=q[c+8>>2];while(1){e=ca+w(e,24)|0;if((f|0)==q[e>>2]&(Y|0)==q[e+4>>2]){break O}e=q[e+16>>2];if((e|0)!=-1){continue}break}}f=0;if(!(k&1)){break N}e=(i|0)!=0;break L}f=0;Q:{if(dj(q[a+4>>2],10857)){break Q}f=wM(q[a+16>>2],q[e+8>>2],q[e+12>>2]);if(f){break Q}a=aj(q[l>>2],q[l+4>>2]);d=q[y>>2];q[h+40>>2]=q[b>>2];q[h+36>>2]=d;q[h+32>>2]=a;Pi(4,7319,10865,h+32|0);f=0;break N}if(k&1){break M}}Ni(f);Ni(i);break D}e=(i|0)!=0;if(!i|!f){break L}e=tra(i,f);Ni(f);Ni(i);if(e){break K}a=aj(q[l>>2],q[l+4>>2]);d=q[y>>2];q[h+56>>2]=q[b>>2];q[h+52>>2]=d;q[h+48>>2]=a;Pi(4,7319,10971,h+48|0);break D}e=e?i:f}f=m;q[f>>2]=0;q[f+4>>2]=0;q[f+8>>2]=0;q[h+272>>2]=d;if(e){q[h+284>>2]=e;q[h+280>>2]=27;q[h+276>>2]=28}q[h+288>>2]=((S<<2)+d|0)+156;if(Mi[q[a+80>>2]](h+272|0)|0){break I}k=1;a=q[l+16>>2]}S=(p[a+102>>1]&1)+S|0;L=L+1|0;if((X|0)!=(L|0)){continue}break C}break}a=aj(q[l>>2],q[l+4>>2]);d=q[y>>2];q[h+24>>2]=q[b>>2];q[h+20>>2]=d;q[h+16>>2]=a;Pi(4,7319,11071,h+16|0);Ni(e);break D}break a}break b}ZL(j,d);pw(j,d);ww(j,q[d+148>>2]);a=q[d+96>>2];e=q[d+100>>2];if((a|0)!=q[71492]|(e|0)!=q[71493]){xr(aa,a,e);a=q[71493];q[d+96>>2]=q[71492];q[d+100>>2]=a}Ir(j,d)}k=0}e=q[b+8>>2];A=A+1|0;if(e>>>0>A>>>0){continue}break}if(!(k&1)){break B}}d=q[h+152>>2];a=q[h+156>>2]-d|0;if(!a){f=1;break z}f=a>>2;e=0;while(1){if(e>>>0>=f>>>0){break c}if(!AB(j,q[(e<<2)+d>>2])){break B}e=e+1|0;b=q[h+156>>2];d=q[h+152>>2];a=b-d|0;f=a>>2;if((e|0)!=(f|0)){continue}break}break A}d=q[h+152>>2];a=q[h+156>>2]-d|0;if(a){f=a>>2;e=0;while(1){if(e>>>0>=f>>>0){break c}Lt(j,q[(e<<2)+d>>2],0);e=e+1|0;d=q[h+152>>2];f=q[h+156>>2]-d>>2;if((e|0)!=(f|0)){continue}break}}Ui(q[g>>2],255,q[g+4>>2]<<2);q[g+20>>2]=-1;q[g+24>>2]=0;q[g+12>>2]=q[g+8>>2];f=0;break z}if(!a){f=1;break z}b=d-b|0;c=((a|0)<(b|0)?b:a)>>>2|0;b=(a|0)>-1?a:-1;c=w(c,(b|0)<1?b:1);g=a>>2;e=0;while(1){if((c|0)==(e|0)){break c}b=q[(e<<2)+d>>2];f=q[b+148>>2];if(f&32768){break y}i=q[b+140>>2];a=i;if(!(a&32768)){q[b+148>>2]=f|32768;a=a&32767;b=s[j+3266>>1];R:{if((b|0)!=32767){f=q[j+1036>>2];if(b>>>0>=q[j+1040>>2]-f>>2>>>0){break x}p[q[f+(b<<2)>>2]+146>>1]=a;break R}p[j+3264>>1]=a}p[j+3266>>1]=a}f=1;e=e+1|0;if((g|0)!=(e|0)){continue}break}}if(o[h+164|0]&1){break f}a=q[h+152>>2];if(!a){break f}Ni(a);break f}J(11495,7192,1021,11522);G()}break c}cj(d,q[h+172>>2]);yr(h+192|0)}f=q[h+180>>2];d=q[h+176>>2];a=f-d|0;if(a){b=j+3144|0;k=a>>2;e=0;while(1){if(e>>>0>=k>>>0){break c}c=e<<2;a=q[c+d>>2];i=q[a+96>>2];m=q[a+100>>2];if((i|0)!=q[71492]|(m|0)!=q[71493]){xr(b,i,m);d=q[71493];q[a+96>>2]=q[71492];q[a+100>>2]=d;f=q[h+180>>2];d=q[h+176>>2]}if(f-d>>2>>>0<=e>>>0){break c}Ir(j,q[c+d>>2]);e=e+1|0;f=q[h+180>>2];d=q[h+176>>2];k=f-d>>2;if((e|0)!=(k|0)){continue}break}}Ui(q[g>>2],255,q[g+4>>2]<<2);q[g+20>>2]=-1;q[g+24>>2]=0;q[g+12>>2]=q[g+8>>2];f=0}S:{if(o[h+188|0]&1){break S}a=q[h+176>>2];if(!a){break S}Ni(a)}Ii=h+304|0;return f}J(10554,7192,1386,10522);G()}J(9401,9413,151,9454);G()}J(12419,9962,479,9454);G()}J(9401,9413,244,9454);G()}J(12430,9962,533,12454);G()}function gD(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,u=0,v=0,x=0,y=0;q[a+18404>>2]=0;q[a+18408>>2]=-1;o[a+18372|0]=255;c=q[a>>2];d=q[c+172>>2];a:{b:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break b}if(!q[c+32>>2]){break a}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;c:{if(!i){o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break c}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)!=255){break a}while(1){c=q[a>>2];d=q[c+172>>2];d:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break d}if(!q[c+32>>2]){break a}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;e:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break e}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}d=f&255;if((d|0)==255){continue}break}if((d|0)!=216){break a}f=1;f:{if((b|0)==1){break f}f=r[a+18372|0];g:{if((f|0)!=255){o[a+18372|0]=255;break g}g=q[a>>2];d=q[g+172>>2];h:{if(d>>>0>2]){q[g+172>>2]=d+1;c=r[d|0];break h}if(!q[g+32>>2]){f=255;break g}d=g+40|0;c=Mi[q[g+16>>2]](q[g+28>>2],d,q[g+36>>2])|0;q[g+168>>2]=q[g+168>>2]+(q[g+172>>2]-q[g+180>>2]|0);i:{if(!c){o[g+40|0]=0;q[g+32>>2]=0;f=g+41|0;c=0;break i}f=c+d|0;c=r[g+40|0]}q[g+176>>2]=f;q[g+172>>2]=g+41}f=255;if((c&255)!=255){break g}while(1){c=q[a>>2];d=q[c+172>>2];j:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break j}if(!q[c+32>>2]){f=0;break g}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;k:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break k}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)==255){continue}break}}d=f&255;c=(d|0)==194;l:{if(c|(f&254)==192){break l}while(1){f=0;if(!dD(a,d)){break f}f=r[a+18372|0];m:{if((f|0)!=255){o[a+18372|0]=255;break m}c=q[a>>2];d=q[c+172>>2];n:{o:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break o}if(!q[c+32>>2]){break n}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;p:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break p}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)!=255){break n}while(1){c=q[a>>2];d=q[c+172>>2];q:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break q}if(!q[c+32>>2]){f=0;break m}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;r:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break r}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)==255){continue}break}break m}while(1){s:{d=q[a>>2];if(q[d+16>>2]){if(!(Mi[q[d+24>>2]](q[d+28>>2])|0)){break s}if(!q[d+32>>2]){break a}}if(t[d+172>>2]>2]){break s}break a}f=r[a+18372|0];if((f|0)!=255){o[a+18372|0]=255;break m}c=q[a>>2];d=q[c+172>>2];t:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break t}if(!q[c+32>>2]){continue}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;u:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break u}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)!=255){continue}break}while(1){c=q[a>>2];d=q[c+172>>2];v:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break v}if(!q[c+32>>2]){f=0;break m}g=c+40|0;i=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;w:{if(!i){f=0;o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;break w}f=r[c+40|0];g=g+i|0}q[d+176>>2]=g;q[c+172>>2]=c+41}if((f&255)==255){continue}break}}d=f&255;c=(d|0)==194;if(c){break l}if((f&254)!=192){continue}break}}q[a+18380>>2]=c;e=q[a>>2];d=q[e+172>>2];f=q[e+176>>2];x:{if(d>>>0>>0){c=d+1|0;q[e+172>>2]=c;h=r[d|0];break x}if(!q[e+32>>2]){c=d;break x}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);y:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;h=0;break y}f=c+d|0;h=r[e+40|0]}q[e+176>>2]=f;c=e+41|0;q[e+172>>2]=c}g=(h&255)<<8;z:{if(c>>>0>>0){d=c+1|0;q[e+172>>2]=d;h=r[c|0];break z}if(!q[e+32>>2]){h=0;d=c;break z}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);A:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;h=0;break A}f=c+d|0;h=r[e+40|0]}q[e+176>>2]=f;d=e+41|0;q[e+172>>2]=d}l=g|h&255;if(l>>>0<=10){break a}B:{C:{D:{if(d>>>0>>0){c=d+1|0;q[e+172>>2]=c;g=r[d|0];break D}if(!q[e+32>>2]){break C}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);E:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;g=0;break E}f=c+d|0;g=r[e+40|0]}q[e+176>>2]=f;c=e+41|0;q[e+172>>2]=c}if((g&255)==8){break B}}q[213145]=169375;return 0}F:{if(c>>>0>>0){g=c+1|0;q[e+172>>2]=g;d=r[c|0];break F}if(!q[e+32>>2]){d=0;g=c;break F}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);G:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;d=0;break G}f=c+d|0;d=r[e+40|0]}q[e+176>>2]=f;g=e+41|0;q[e+172>>2]=g}h=(d&255)<<8;H:{if(f>>>0>g>>>0){c=g+1|0;q[e+172>>2]=c;j=r[g|0];break H}if(!q[e+32>>2]){c=g;break H}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);I:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;j=0;break I}f=c+d|0;j=r[e+40|0]}q[e+176>>2]=f;c=e+41|0;q[e+172>>2]=c}d=h|j&255;q[e+4>>2]=d;if(!d){q[213145]=169413;return 0}J:{if(c>>>0>>0){g=c+1|0;q[e+172>>2]=g;d=r[c|0];break J}if(!q[e+32>>2]){d=0;g=c;break J}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);K:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;d=0;break K}f=c+d|0;d=r[e+40|0]}q[e+176>>2]=f;g=e+41|0;q[e+172>>2]=g}c=(d&255)<<8;L:{if(f>>>0>g>>>0){i=g+1|0;q[e+172>>2]=i;d=r[g|0];break L}if(!q[e+32>>2]){d=0;i=g;break L}d=e+40|0;h=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);M:{if(!h){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;d=0;break M}f=d+h|0;d=r[e+40|0]}q[e+176>>2]=f;i=e+41|0;q[e+172>>2]=i}d=c|d&255;q[e>>2]=d;if(!d){break a}if(t[e+4>>2]>=16777217){q[213145]=169455;return 0}N:{if(f>>>0>i>>>0){j=i+1|0;q[e+172>>2]=j;d=r[i|0];break N}if(!q[e+32>>2]){break a}d=e+40|0;c=Mi[q[e+16>>2]](q[e+28>>2],d,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);O:{if(!c){o[e+40|0]=0;q[e+32>>2]=0;f=e+41|0;d=0;break O}f=c+d|0;d=r[e+40|0]}q[e+176>>2]=f;j=e+41|0;q[e+172>>2]=j}if(!(1<>>0>4){break a}q[e+8>>2]=d;c=0;while(1){h=w(c,72)+a|0;q[h+18132>>2]=0;q[h+18120>>2]=0;c=c+1|0;if((c|0)!=(d|0)){continue}break}if((l|0)!=(w(d,3)+8|0)){break a}i=0;q[a+18412>>2]=0;if(d){c=e+41|0;m=e+40|0;i=d;g=0;while(1){P:{if(f>>>0>j>>>0){h=j+1|0;q[e+172>>2]=h;d=r[j|0];break P}if(!q[e+32>>2]){d=0;h=j;break P}d=Mi[q[e+16>>2]](q[e+28>>2],m,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);Q:{if(!d){o[e+40|0]=0;q[e+32>>2]=0;f=c;d=0;break Q}f=d+m|0;d=r[e+40|0]}q[e+172>>2]=c;q[e+176>>2]=f;i=q[e+8>>2];h=c}l=w(g,72)+a|0;d=d&255;q[l+18076>>2]=d;if(!((i|0)!=3|(d|0)!=r[g+169483|0])){q[a+18412>>2]=q[a+18412>>2]+1}R:{if(f>>>0>h>>>0){d=h+1|0;q[e+172>>2]=d;j=r[h|0];break R}if(!q[e+32>>2]){j=0;d=h;break R}d=Mi[q[e+16>>2]](q[e+28>>2],m,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);S:{if(!d){o[e+40|0]=0;q[e+32>>2]=0;f=c;j=0;break S}f=d+m|0;j=r[e+40|0]}q[e+172>>2]=c;q[e+176>>2]=f;d=c}j=j&255;h=j>>>4|0;q[l+18080>>2]=h;if(!(h?j>>>0<=79:0)){break a}h=j&15;q[l+18084>>2]=h;if(h-1>>>0>=4){break a}T:{U:{if(d>>>0>>0){j=d+1|0;q[e+172>>2]=j;h=r[d|0];break U}if(!q[e+32>>2]){q[l+18088>>2]=0;j=d;break T}d=Mi[q[e+16>>2]](q[e+28>>2],m,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);V:{if(!d){o[e+40|0]=0;q[e+32>>2]=0;f=c;h=0;break V}f=d+m|0;h=r[e+40|0]}q[e+172>>2]=c;q[e+176>>2]=f;j=c}d=h&255;q[l+18088>>2]=d;if(d>>>0<4){break T}break a}g=g+1|0;i=q[e+8>>2];if((g|0)<(i|0)){continue}break}}f=1;if(b){break f}f=0;W:{j=q[e>>2];h=q[e+4>>2];if((j|h)<0|((2147483647/(h|0)|0)<(j|0)?h:0)){break W}g=0;d=w(h,j);if((d|i)<0){break W}c=1;b=1;X:{if(!i){break X}if((d|0)>(2147483647/(i|0)|0)){break W}if((i|0)<=0){break X}while(1){g=w(f,72)+a|0;d=q[g+18084>>2];b=(b|0)<(d|0)?d:b;d=q[g+18080>>2];c=(c|0)<(d|0)?d:c;g=1;f=f+1|0;if((i|0)!=(f|0)){continue}break}}q[a+18056>>2]=b;q[a+18052>>2]=c;f=b<<3;q[a+18072>>2]=f;d=c<<3;q[a+18068>>2]=d;v=((f+h|0)-1>>>0)/(f>>>0)|0;q[a+18064>>2]=v;x=((d+j|0)-1>>>0)/(d>>>0)|0;q[a+18060>>2]=x;f=1;if(!g){break f}y=b-1|0;m=c-1|0;g=0;while(1){k=w(g,72)+a|0;l=k+18136|0;q[l>>2]=0;s=k+18128|0;q[s>>2]=0;q[s+4>>2]=0;i=q[k+18084>>2];u=w(i,v);n=u<<3;q[k+18116>>2]=n;f=q[k+18080>>2];d=w(f,x);p=d<<3;q[k+18112>>2]=p;q[k+18104>>2]=(m+w(f,j)>>>0)/(c>>>0);q[k+18108>>2]=(w(h,i)+y>>>0)/(b>>>0);Y:{Z:{if(!(!u|(2147483647/(n|0)|0)>=(p|0)?(n|p)>=0:0)){q[(w(g,72)+a|0)+18124>>2]=0;break Z}j=w(n,p);h=Yi(j|15);q[k+18124>>2]=h;if(h){break Y}}q[213145]=169512;c=0;while(1){h=w(c,72)+a|0;d=h+18124|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0;q[h+18120>>2]=0}d=h+18128|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0;q[h+18136>>2]=0}d=h+18132|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0}b=(c|0)==(g|0);f=0;c=c+1|0;if(!b){continue}break}break f}q[k+18120>>2]=h+15&-16;_:{if(q[a+18380>>2]){q[k+18144>>2]=u;q[k+18140>>2]=d;$:{aa:{if(u){if((2147483647/(n|0)|0)<(p|0)|j>>>0>1073741823){break aa}break $}if(j>>>0<1073741824){break $}}q[s>>2]=0;break _}d=Yi(j<<1|15);q[s>>2]=d;if(!d){break _}q[l>>2]=d+15&-16}f=1;g=g+1|0;if((g|0)>=q[e+8>>2]){break f}h=q[e+4>>2];j=q[e>>2];continue}break}q[213145]=169512;c=0;while(1){h=w(c,72)+a|0;d=h+18124|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0;q[h+18120>>2]=0}d=h+18128|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0;q[h+18136>>2]=0}d=h+18132|0;b=q[d>>2];if(b){Ni(b);q[d>>2]=0}b=(c|0)==(g|0);f=0;c=c+1|0;if(!b){continue}break}break f}q[213145]=169486}return f}q[213145]=169269;return 0}function T9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=0,l=0,m=0,n=x(0),v=0,y=0,z=0,B=0;k=Ii-192|0;Ii=k;q[k+184>>2]=0;d=q[a+44>>2];if(d){while(1){c=q[q[a+40>>2]+(e<<2)>>2];if((c|0)!=-1){while(1){d=q[a+48>>2]+w(c,968)|0;u[d+12>>2]=u[d+8>>2];q[d+8>>2]=0;q[d+792>>2]=0;q[d+796>>2]=0;q[d+532>>2]=0;p[d+952>>1]=s[d+952>>1]&64739;c=q[d+960>>2];if((c|0)!=-1){continue}break}d=q[a+44>>2]}e=e+1|0;if(e>>>0>>0){continue}break}}y=q[q[a>>2]+72>>2];q[k+176>>2]=0;q[k+180>>2]=0;q[k+168>>2]=0;q[k+172>>2]=0;q[k+160>>2]=0;q[k+164>>2]=0;q[k+152>>2]=0;q[k+156>>2]=0;q[k+144>>2]=0;q[k+148>>2]=0;f=q[a+4>>2];a:{if(!f){break a}g=f+48|0;if(!zJ(q[f>>2],g)){break a}c=q[f+92>>2];if((c|0)!=q[f+96>>2]){e=0;while(1){c=(e<<4)+c|0;d=0;b:{if(!g){break b}d=q[(q[c>>2]<<2)+842016>>2];d=q[g+((d|0)/32<<2)>>2]>>>d&1}l=q[a+44>>2];c:{if(!l){break c}i=q[c+8>>2];h=q[c+12>>2];c=q[q[a+40>>2]+(Cza(i,h,l)<<2)>>2];if((c|0)==-1){break c}j=d?x(1):x(0);l=q[a+48>>2];while(1){d=l+w(c,968)|0;if(q[d>>2]!=(i|0)|q[d+4>>2]!=(h|0)){c=q[d+960>>2];if((c|0)!=-1){continue}break c}break}n=u[d+8>>2];if(j>(n>=x(0)?n:x(-n))^1){break c}u[d+8>>2]=j}e=e+1|0;c=q[f+92>>2];if(e>>>0>2]-c>>4>>>0){continue}break}}d=q[g+4>>2];q[f+4>>2]=q[g>>2];q[f+8>>2]=d;q[f+44>>2]=q[g+40>>2];d=q[g+36>>2];q[f+36>>2]=q[g+32>>2];q[f+40>>2]=d;d=q[g+28>>2];q[f+28>>2]=q[g+24>>2];q[f+32>>2]=d;d=q[g+20>>2];q[f+20>>2]=q[g+16>>2];q[f+24>>2]=d;d=q[g+12>>2];q[f+12>>2]=q[g+8>>2];q[f+16>>2]=d}e=q[a+36>>2];d:{if(!e){break d}e:{if(!Haa(y,e)){break e}l=q[e+524>>2];i=q[e+528>>2];if((l|0)==(i|0)){break e}g=0;while(1){d=(g<<4)+l|0;f:{if(q[d>>2]){break f}f=q[a+44>>2];if(!f){break f}h=q[d+8>>2];d=q[d+12>>2];c=q[q[a+40>>2]+(Cza(h,d,f)<<2)>>2];if((c|0)==-1){break f}f=q[a+48>>2];while(1){c=f+w(c,968)|0;if(q[c>>2]==(h|0)&q[c+4>>2]==(d|0)){d=0;if(q[e+256>>2]){while(1){o[(d+c|0)+536|0]=r[d+e|0];d=d+1|0;f=q[e+256>>2];if(d>>>0>>0){continue}break}l=q[e+524>>2];i=q[e+528>>2];d=f}q[c+796>>2]=(d|0)!=0;q[c+792>>2]=d;break f}c=q[c+960>>2];if((c|0)!=-1){continue}break}}g=g+1|0;if(g>>>0>4>>>0){continue}break}}if(!Jaa(y,e+260|0)){break d}l=q[e+524>>2];i=q[e+528>>2];if((l|0)==(i|0)){break d}g=0;while(1){d=(g<<4)+l|0;g:{if(q[d>>2]!=1){break g}f=q[a+44>>2];if(!f){break g}h=q[d+8>>2];d=q[d+12>>2];c=q[q[a+40>>2]+(Cza(h,d,f)<<2)>>2];if((c|0)==-1){break g}f=q[a+48>>2];while(1){c=f+w(c,968)|0;if(q[c>>2]==(h|0)&q[c+4>>2]==(d|0)){d=0;if(q[e+516>>2]){while(1){o[(d+c|0)+536|0]=r[(d+e|0)+260|0];d=d+1|0;f=q[e+516>>2];if(d>>>0>>0){continue}break}l=q[e+524>>2];i=q[e+528>>2];d=f}q[c+792>>2]=d;q[c+796>>2]=o[e+520|0]&1|(d|0)!=0;break g}c=q[c+960>>2];if((c|0)!=-1){continue}break}}g=g+1|0;if(g>>>0>4>>>0){continue}break}}d=q[a+8>>2];h:{if(!d){break h}f=d+20|0;if(!Iaa(q[d>>2],f)){break h}c=q[d+20>>2];q[k+152>>2]=c;e=q[d+24>>2];q[k+156>>2]=e;q[k+160>>2]=c-q[d+4>>2];c=q[d+8>>2];B=1;o[k+180|0]=1;q[k+164>>2]=e-c;c=q[d+36>>2];if((c|0)!=q[d+40>>2]){g=0;while(1){i:{j:{k:{l:{c=(g<<4)+c|0;l=q[c>>2];switch(l|0){case 1:break k;case 0:break l;default:break j}}j=x(q[d+28>>2]-q[d+12>>2]|0);break i}j=x(q[d+12>>2]-q[d+28>>2]|0);break i}if(f){e=q[(l<<2)+842528>>2];m=q[(f+((e|0)/32<<2)|0)+12>>2]>>>e&1}else{m=0}j=m?x(1):x(0)}e=q[a+44>>2];m:{if(!e){break m}l=q[c+8>>2];i=q[c+12>>2];c=q[q[a+40>>2]+(Cza(l,i,e)<<2)>>2];if((c|0)==-1){break m}j=j>2];while(1){c=e+w(c,968)|0;if(q[c>>2]!=(l|0)|q[c+4>>2]!=(i|0)){c=q[c+960>>2];if((c|0)!=-1){continue}break m}break}n=u[c+8>>2];if((n>=x(0)?n:x(-n))<(j>=x(0)?j:x(-j))^1){break m}u[c+8>>2]=j}g=g+1|0;c=q[d+36>>2];if(g>>>0>2]-c>>4>>>0){continue}break}}c=q[f+4>>2];q[d+4>>2]=q[f>>2];q[d+8>>2]=c;c=q[f+12>>2];q[d+12>>2]=q[f+8>>2];q[d+16>>2]=c}n:{o:{p:{q:{c=q[a+12>>2];if((c|0)!=q[a+16>>2]){l=0;while(1){e=q[(l<<2)+c>>2];r:{if(!e){break r}d=q[e+312>>2];if(d){g=0;while(1){c=q[q[e+308>>2]+(g<<2)>>2];if((c|0)!=-1){while(1){d=q[e+316>>2]+w(c,968)|0;u[d+12>>2]=u[d+8>>2];q[d+8>>2]=0;q[d+792>>2]=0;q[d+796>>2]=0;q[d+532>>2]=0;p[d+952>>1]=s[d+952>>1]&64739;c=q[d+960>>2];if((c|0)!=-1){continue}break}d=q[e+312>>2]}g=g+1|0;if(g>>>0>>0){continue}break}}h=r[e+345|0];c=h&1;g=c;m=q[e>>2];f=m;d=0;s:{if(!f){break s}d=o[f+147|0]<0}f=d^1;t:{if(!(g|f)){KA(q[q[a>>2]+72>>2],m,k+16|0);q[e+340>>2]=st(k+16|0);f=d;d=r[e+345|0]&-6;o[e+345|0]=f|d;h=d|1;break t}o[e+345|0]=d|h&254;if(f&!c){break r}}u:{v:{w:{d=q[a>>2];f=q[d+12>>2];x:{if(!f){break x}i=q[d+8>>2];g=q[e+340>>2];c=q[i+((g>>>0)%(f>>>0)<<2)>>2];if((c|0)!=-1){v=q[d+16>>2];while(1){c=w(c,184)+v|0;if((g|0)==q[c>>2]){break v}c=q[c+180>>2];if((c|0)!=-1){continue}break}}g=q[210502];c=q[i+((g>>>0)%(f>>>0)<<2)>>2];if((c|0)==-1){break x}f=q[d+16>>2];while(1){d=f+w(c,184)|0;if((g|0)==q[d>>2]){break w}c=q[d+180>>2];if((c|0)!=-1){continue}break}}if(h&4){break r}q[k>>2]=r[e+344|0];Pi(3,149328,149609,k);o[e+345|0]=r[e+345|0]|4;break r}f=d+4|0;break u}f=c+4|0}g=e+148|0;Kaa(m,g);d=s[f+74>>1];c=s[f+92>>1];i=s[f+26>>1];y:{if((i|0)==65535){break y}h=s[f+8>>1];if((h|0)==65535){break y}if(i>>>0>=32){break n}if(h>>>0>=32){break o}h=g+(h<<2)|0;j=u[h>>2];n=x(j*j);i=g+(i<<2)|0;j=u[i>>2];n=x(n+x(j*j));j=u[f+4>>2];if(n<=x(j*j)^1){break y}q[h>>2]=0;q[i>>2]=0}z:{if((c|0)==65535|(d|0)==65535){break z}if(c>>>0>=32){break p}if(d>>>0>=32){break q}d=g+(d<<2)|0;j=u[d>>2];n=x(j*j);c=g+(c<<2)|0;j=u[c>>2];n=x(n+x(j*j));j=u[f+4>>2];if(n<=x(j*j)^1){break z}q[d>>2]=0;q[c>>2]=0}c=q[e+292>>2];if((c|0)!=q[e+296>>2]){d=0;while(1){A:{B:{C:{D:{E:{F:{c=(d<<4)+c|0;h=q[c>>2];switch(h-25|0){case 0:break D;case 2:break E;case 1:break F;default:break C}}i=r[e+288|0];if(!(i&1)){break C}break B}i=q[e+312>>2];if(!i){break A}h=q[c+8>>2];v=q[c+12>>2];c=q[q[e+308>>2]+(Cza(h,v,i)<<2)>>2];if((c|0)==-1){break A}i=q[e+316>>2];while(1){c=i+w(c,968)|0;if(q[c>>2]!=(h|0)|q[c+4>>2]!=(v|0)){c=q[c+960>>2];if((c|0)!=-1){continue}break A}break}Ti(c+808|0,g,144);p[c+952>>1]=s[c+952>>1]|16;break A}i=r[e+288|0];if(i&2){break B}}i=f+w(h,6)|0;h=i+8|0;if(s[h>>1]==65535){break A}j=aaa(g,h);h=q[e+312>>2];if(!h){break A}v=q[c+8>>2];z=q[c+12>>2];c=q[q[e+308>>2]+(Cza(v,z,h)<<2)>>2];if((c|0)==-1){break A}h=q[e+316>>2];while(1){c=h+w(c,968)|0;if(q[c>>2]!=(v|0)|q[c+4>>2]!=(z|0)){c=q[c+960>>2];if((c|0)!=-1){continue}break A}break}n=u[c+8>>2];if(!((n>=x(0)?n:x(-n))<(j>=x(0)?j:x(-j))^1)){u[c+8>>2]=j;n=j}h=s[c+952>>1];p[c+952>>1]=h&64511;if(r[i+12|0]&3|u[c+12>>2]==n){break A}p[c+952>>1]=h|1024;break A}h=q[e+312>>2];if(!h){break A}v=q[c+8>>2];z=q[c+12>>2];c=q[q[e+308>>2]+(Cza(v,z,h)<<2)>>2];if((c|0)==-1){break A}h=q[e+316>>2];while(1){c=h+w(c,968)|0;if(q[c>>2]!=(v|0)|q[c+4>>2]!=(z|0)){c=q[c+960>>2];if((c|0)!=-1){continue}break A}break}i=s[c+952>>1]&-5|i<<2&4;p[c+952>>1]=i;h=i&65527;i=r[e+288|0]<<2&8;p[c+952>>1]=h|i;if(!i){break A}KA(q[q[a>>2]+72>>2],m,k+16|0);q[c+792>>2]=Pj(c+536|0,k+16|0,256)}d=d+1|0;c=q[e+292>>2];if(d>>>0>2]-c>>4>>>0){continue}break}}Ti(e+4|0,g,144)}l=l+1|0;c=q[a+12>>2];if(l>>>0>2]-c>>2>>>0){continue}break}}f=q[a+28>>2];G:{if(!f){break G}l=f+492|0;if(!Gaa(q[f>>2],l)){break G}e=q[f+980>>2];g=q[f+984>>2];if((e|0)!=(g|0)){i=0;while(1){d=q[a+44>>2];H:{if(!d){break H}c=(i<<4)+e|0;h=q[c+8>>2];m=q[c+12>>2];c=q[q[a+40>>2]+(Cza(h,m,d)<<2)>>2];if((c|0)==-1){break H}v=q[a+48>>2];while(1){d=v+w(c,968)|0;if(q[d>>2]!=(h|0)|q[d+4>>2]!=(m|0)){c=q[d+960>>2];if((c|0)!=-1){continue}break H}break}I:{J:{h=q[f+976>>2];if((h|0)<12){q[d+8>>2]=0;if((h|0)<1){break I}q[d+88>>2]=q[f+532>>2];c=q[f+528>>2];q[d+80>>2]=q[f+524>>2];q[d+84>>2]=c;c=q[f+520>>2];e=q[f+516>>2];q[d+72>>2]=e;q[d+76>>2]=c;g=q[f+512>>2];c=d- -64|0;q[c>>2]=q[f+508>>2];q[c+4>>2]=g;c=q[f+504>>2];g=q[f+500>>2];q[d+56>>2]=g;q[d+60>>2]=c;m=q[f+496>>2];q[d+48>>2]=q[f+492>>2];q[d+52>>2]=m;m=q[f+496>>2];q[d+28>>2]=e;q[d+20>>2]=g;q[d+24>>2]=c;q[d+32>>2]=q[d+76>>2];p[d+952>>1]=s[d+952>>1]|256;if(m>>>0<=2){q[d+8>>2]=1065353216}g=1;if((h|0)==1){break J}while(1){c=w(g,44);e=c+d|0;c=c+f|0;q[e+88>>2]=q[c+532>>2];m=q[c+528>>2];q[e+80>>2]=q[c+524>>2];q[e+84>>2]=m;m=q[c+520>>2];q[e+72>>2]=q[c+516>>2];q[e+76>>2]=m;v=q[c+512>>2];m=e- -64|0;q[m>>2]=q[c+508>>2];q[m+4>>2]=v;m=q[c+504>>2];q[e+56>>2]=q[c+500>>2];q[e+60>>2]=m;m=q[c+496>>2];q[e+48>>2]=q[c+492>>2];q[e+52>>2]=m;if(t[c+496>>2]<=2){q[d+8>>2]=1065353216}g=g+1|0;if((h|0)!=(g|0)){continue}break}break J}J(149661,149445,856,149382);G()}e=q[f+980>>2];g=q[f+984>>2];h=q[f+976>>2]}q[d+532>>2]=h}i=i+1|0;if(i>>>0>4>>>0){continue}break}}Ti(f+4|0,l,488)}K:{if(!q[a+32>>2]){break K}o[k+180|0]=B;if(!(q[y+3480>>2]&1)){break K}d=q[a+32>>2];f=d+12|0;if(f){c=q[y+3456>>2];q[f>>2]=q[y+3452>>2];q[f+4>>2]=c;q[f+8>>2]=q[y+3460>>2]}u[k+168>>2]=u[d+12>>2];u[k+172>>2]=u[d+16>>2];j=u[d+20>>2];o[k+180|0]=B|2;u[k+176>>2]=j;q[d+8>>2]=q[d+20>>2];f=q[d+16>>2];q[d>>2]=q[d+12>>2];q[d+4>>2]=f}u[k+144>>2]=b;q[k+148>>2]=q[a>>2];e=q[a+44>>2];if(e){d=0;while(1){c=q[q[a+40>>2]+(d<<2)>>2];if((c|0)!=-1){while(1){f=q[a+48>>2]+w(c,968)|0;rI(k+144|0,f,f+8|0);c=q[f+960>>2];if((c|0)!=-1){continue}break}e=q[a+44>>2]}d=d+1|0;if(e>>>0>d>>>0){continue}break}}c=q[a+12>>2];e=q[a+16>>2];if((c|0)!=(e|0)){l=0;while(1){d=q[(l<<2)+c>>2];L:{if(!d){break L}g=q[d+312>>2];if(!g){break L}e=0;while(1){c=q[q[d+308>>2]+(e<<2)>>2];if((c|0)!=-1){while(1){f=q[d+316>>2]+w(c,968)|0;rI(k+144|0,f,f+8|0);c=q[f+960>>2];if((c|0)!=-1){continue}break}g=q[d+312>>2]}e=e+1|0;if(g>>>0>e>>>0){continue}break}c=q[a+12>>2];e=q[a+16>>2]}l=l+1|0;if(l>>>0>2>>>0){continue}break}}Ii=k+192|0;return}J(149560,149445,759,149382);G()}J(149511,149445,758,149382);G()}J(149462,149445,746,149382);G()}J(149396,149445,745,149382);G()}function Xea(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0;l=Ii-16|0;Ii=l;q[l+8>>2]=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{g=q[c+8>>2];if((g|0)!=7){e=q[q[75054]+108>>2];if(e>>>0>1]){break D}if(e>>>0>1]){break C}m=1;E:{if((g|0)==3){break E}g=g-9|0;F:{if(g>>>0<=12){e=8141>>>g&1;break F}e=0}if(e){break E}e=s[c+40>>1];g=IK(q[c+8>>2])>>>3|0;g=w(e,g?g:1);if(!(g&3)){break E}Xa(3317,(g&1?1:2)|0);m=0;if(!(r[q[75054]+156|0]&64)){break E}g=K()|0;if(g){break B}}if((b|0)==2097152|b>>>0>2097152){break A}d=q[75054];e=a;g=0;G:{if(e+1>>>0<2){break G}f=e&65535;if(f>>>0>=t[d+32>>2]){break z}h=q[q[d+24>>2]+(f<<2)>>2];g=0;if(!h){break G}g=s[q[d+28>>2]+(f<<1)>>1]==(e>>>16|0)?h:0}e=s[g+24>>1];f=(r[c+46|0]&127)+1|0;p[g+24>>1]=e>>>0>f>>>0?e:f;e=q[g>>2];if(e>>>0<=2){n=q[(e<<2)+94580>>2]}i=5121;f=6409;h=6409;H:{I:{switch(q[c+8>>2]){case 4:i=33635;case 2:f=6407;h=6407;break H;case 5:i=32819;case 3:f=6408;h=6408;break H;case 8:h=-1;f=35841;break H;case 9:h=-1;f=35840;break H;case 10:h=-1;f=35843;break H;case 11:h=-1;f=35842;break H;case 12:h=-1;f=36196;break H;case 13:h=-1;f=37488;break H;case 14:h=-1;f=37490;break H;case 15:h=-1;f=37496;break H;case 16:h=-1;f=37808;break H;case 17:h=-1;f=33776;break H;case 18:h=-1;f=33779;break H;case 19:h=-1;f=36283;break H;case 20:h=-1;f=36285;break H;case 21:h=-1;f=36492;break H;case 22:f=6407;h=o[d+157|0]&1?34843:6407;i=5131;break H;case 23:f=6407;h=o[d+157|0]&1?34837:6407;i=5126;break H;case 24:h=34842;i=5131;f=6408;break H;case 25:f=6408;h=o[d+157|0]&1?34836:6408;i=5126;break H;case 26:h=33325;i=5131;f=6403;break H;case 28:h=33326;i=5126;f=6403;break H;case 27:h=33327;i=5131;f=33319;break H;case 29:h=33328;i=5126;f=33319;break H;case 6:h=o[d+157|0]&1?33190:33189;i=5125;f=6402;break H;default:J(88669,88575,3195,94184);G();case 0:break H;case 1:break I}}f=6410;h=6410}e=q[c+4>>2];q[g+28>>2]=q[c>>2];q[g+32>>2]=e;e=r[c+43|0]|r[c+44|0]<<8|(r[c+45|0]<<16|r[c+46|0]<<24);d=r[c+39|0]|r[c+40|0]<<8|(r[c+41|0]<<16|r[c+42|0]<<24);o[g+67|0]=d;o[g+68|0]=d>>>8;o[g+69|0]=d>>>16;o[g+70|0]=d>>>24;o[g+71|0]=e;o[g+72|0]=e>>>8;o[g+73|0]=e>>>16;o[g+74|0]=e>>>24;e=q[c+36>>2];q[g+60>>2]=q[c+32>>2];q[g+64>>2]=e;e=q[c+28>>2];q[g+52>>2]=q[c+24>>2];q[g+56>>2]=e;e=q[c+20>>2];q[g+44>>2]=q[c+16>>2];q[g+48>>2]=e;e=q[c+12>>2];q[g+36>>2]=q[c+8>>2];q[g+40>>2]=e;e=o[c+46|0];J:{if((e|0)<0){break J}if(!e){p[g+14>>1]=s[c+40>>1];p[g+16>>1]=s[c+42>>1];p[g+18>>1]=s[c+44>>1];e=r[c+46|0]}if(e&127){break J}q[g+8>>2]=q[c+4>>2]}if(s[g+12>>1]){while(1){ga(n|0,q[q[g+4>>2]+(k<<2)>>2]);if(r[q[75054]+156|0]&64){e=K()|0;if(e){break y}}if(o[c+46|0]>=0){Mi[q[75012]](a,b,q[c+12>>2],q[c+16>>2],q[c+20>>2],q[c+24>>2],x(1))}K:{L:{e=q[c+8>>2];if(e>>>0>29){break L}M:{N:{O:{P:{e=1<>2];if(!d){break K}switch(q[g>>2]){case 2:break N;case 1:break O;case 0:break P;default:break M}}Q:{switch(q[g>>2]){case 0:e=q[c>>2];d=r[c+46|0];j=d<<24>>24;R:{if((j|0)<=-1){Y(3553,j&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+w(q[c+4>>2],k)|0);break R}U(3553,d|0,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+w(q[c+4>>2],k)|0)}if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3305);J(88669,88575,3305,93973);G();case 1:if(!(r[q[75054]+156|0]&2)){break x}e=r[c+46|0];d=e<<24>>24;S:{if((d|0)<=-1){bc(35866,d&127,q[c+28>>2],q[c+36>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],s[c+44>>1],f|0,i|0,q[c>>2]);break S}dc(35866,e|0,h|0,s[c+40>>1],s[c+42>>1],s[c+44>>1],0,f|0,i|0,q[c>>2])}if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3318);J(88669,88575,3318,93973);G();case 2:if(s[g+12>>1]!=1){break w}e=q[c>>2];d=r[c+46|0];j=d<<24>>24;if((j|0)<=-1){Y(34069,j&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break v}}Y(34070,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+q[c+4>>2]|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break u}}Y(34071,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+(q[c+4>>2]<<1)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break t}}Y(34072,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+w(q[c+4>>2],3)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break s}}Y(34073,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+(q[c+4>>2]<<2)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break r}}Y(34074,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,i|0,e+w(q[c+4>>2],5)|0);if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3337);J(88669,88575,3337,93973);G()}U(34069,d|0,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break q}}U(34070,r[c+46|0]&127,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+q[c+4>>2]|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break p}}U(34071,r[c+46|0]&127,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+(q[c+4>>2]<<1)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break o}}U(34072,r[c+46|0]&127,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+w(q[c+4>>2],3)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break n}}U(34073,r[c+46|0]&127,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+(q[c+4>>2]<<2)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break m}}U(34074,r[c+46|0]&127,h|0,s[c+40>>1],s[c+42>>1],0,f|0,i|0,e+w(q[c+4>>2],5)|0);if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3352);J(88669,88575,3352,93973);G();default:break Q}}J(88669,88575,3357,93973);G()}e=r[c+46|0];j=e<<24>>24;T:{if((j|0)<=-1){_(3553,j&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,q[c>>2]);break T}$(3553,e|0,f|0,s[c+40>>1],s[c+42>>1],0,d|0,q[c>>2])}if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3387);J(88669,88575,3387,93973);G()}e=r[c+46|0];j=e<<24>>24;U:{if((j|0)<=-1){Ic(35866,j&127,q[c+28>>2],q[c+32>>2],q[c+36>>2],s[c+40>>1],s[c+42>>1],s[c+44>>1],f|0,i|0,q[c>>2]);break U}j=e;e=s[c+44>>1];Jc(35866,j|0,f|0,s[c+40>>1],s[c+42>>1],e|0,0,w(e,d)|0,q[c>>2])}if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3399);J(88669,88575,3399,93973);G()}e=q[c>>2];j=r[c+46|0];u=j<<24>>24;if((u|0)<=-1){_(34069,u&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break l}}d=q[c+4>>2];_(34070,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e+d|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break k}}d=q[c+4>>2];_(34071,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e+(d<<1)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break j}}d=q[c+4>>2];_(34072,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e+w(d,3)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break i}}d=q[c+4>>2];_(34074,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e+(d<<2)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break h}}d=q[c+4>>2];_(34073,r[c+46|0]&127,q[c+28>>2],q[c+32>>2],s[c+40>>1],s[c+42>>1],f|0,d|0,e+w(d,5)|0);if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3417);J(88669,88575,3417,93973);G()}$(34069,j|0,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break g}}d=q[c+4>>2];$(34070,r[c+46|0]&127,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e+d|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break f}}d=q[c+4>>2];$(34071,r[c+46|0]&127,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e+(d<<1)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break e}}d=q[c+4>>2];$(34072,r[c+46|0]&127,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e+w(d,3)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break d}}d=q[c+4>>2];$(34074,r[c+46|0]&127,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e+(d<<2)|0);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break c}}d=q[c+4>>2];$(34073,r[c+46|0]&127,f|0,s[c+40>>1],s[c+42>>1],0,d|0,e+w(d,5)|0);if(!(r[q[75054]+156|0]&64)){break K}e=K()|0;if(!e){break K}lj(e,93973,3432);J(88669,88575,3432,93973);G()}J(88669,88575,3437,93973);G()}J(88669,88575,3442,93973);G()}k=k+1|0;if(k>>>0>1]){continue}break}}ga(n|0,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}V:{if(m){break V}Xa(3317,4);if(!(r[q[75054]+156|0]&64)){break V}a=K()|0;if(a){break a}}Ii=l+16|0;return}J(93990,88575,3210,93973);G()}J(94032,88575,3213,93973);G()}J(94078,88575,3214,93973);G()}lj(g,93973,3236);J(88669,88575,3236,93973);G()}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}lj(e,93973,3270);J(88669,88575,3270,93973);G()}J(94125,88575,3309,93973);G()}J(94158,88575,3322,93973);G()}lj(d,93973,3327);J(88669,88575,3327,93973);G()}lj(d,93973,3329);J(88669,88575,3329,93973);G()}lj(d,93973,3331);J(88669,88575,3331,93973);G()}lj(d,93973,3333);J(88669,88575,3333,93973);G()}lj(d,93973,3335);J(88669,88575,3335,93973);G()}lj(d,93973,3342);J(88669,88575,3342,93973);G()}lj(d,93973,3344);J(88669,88575,3344,93973);G()}lj(d,93973,3346);J(88669,88575,3346,93973);G()}lj(d,93973,3348);J(88669,88575,3348,93973);G()}lj(d,93973,3350);J(88669,88575,3350,93973);G()}lj(d,93973,3407);J(88669,88575,3407,93973);G()}lj(d,93973,3409);J(88669,88575,3409,93973);G()}lj(d,93973,3411);J(88669,88575,3411,93973);G()}lj(d,93973,3413);J(88669,88575,3413,93973);G()}lj(d,93973,3415);J(88669,88575,3415,93973);G()}lj(d,93973,3422);J(88669,88575,3422,93973);G()}lj(d,93973,3424);J(88669,88575,3424,93973);G()}lj(d,93973,3426);J(88669,88575,3426,93973);G()}lj(d,93973,3428);J(88669,88575,3428,93973);G()}lj(d,93973,3430);J(88669,88575,3430,93973);G()}lj(a,93973,3448);J(88669,88575,3448,93973);G()}lj(a,93973,3454);J(88669,88575,3454,93973);G()}function qL(a,b,c,d,e,f,g,h){var i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=x(0),v=x(0),w=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=0;m=Ii+ -64|0;Ii=m;q[m+60>>2]=0;q[m+56>>2]=0;q[m+52>>2]=0;q[m+48>>2]=0;a=Ot(a,d,e,m+60|0,m+56|0,m+52|0,m+48|0);a:{if(a){b=aj(d,e);q[m+36>>2]=a;q[m+32>>2]=b;Pi(4,44761,45696,m+32|0);break a}I=q[m+52>>2];if((I&-2)!=2){q[m+16>>2]=aj(d,e);q[m+20>>2]=q[m+52>>2];Pi(4,44761,45773,m+16|0);break a}b:{c:{d:{e:{f:{g:{h:{switch(f|0){case 0:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;d=q[m+48>>2];e=q[m+56>>2];if((I&255)==2){break b}if(!e){break a}h=0;while(1){j=x(r[f|0]);k=x(r[f+1|0]);l=x(r[f+2|0]);n=x(x(x(x(u[c+8>>2]*j)+x(u[c+24>>2]*k))+x(u[c+40>>2]*l))+x(i*u[c+56>>2]));i:{if(n=x(0)){b=~~n>>>0;break i}b=0}z=u[c+48>>2];A=u[c+32>>2];v=u[c>>2];w=u[c+16>>2];n=u[c+52>>2];B=u[c+36>>2];C=u[c+4>>2];E=u[c+20>>2];o[a+2|0]=b;b=a;n=x(x(x(x(C*j)+x(E*k))+x(B*l))+x(i*n));j:{if(n=x(0)){g=~~n>>>0;break j}g=0}o[b+1|0]=g;b=a;j=x(x(x(x(v*j)+x(w*k))+x(A*l))+x(i*z));k:{if(j=x(0)){g=~~j>>>0;break k}g=0}o[b|0]=g;a=a+d|0;f=d+f|0;h=h+1|0;if((e|0)!=(h|0)){continue}break}break a;case 1:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;e=q[m+48>>2];d=q[m+56>>2];if((I&255)==2){break c}if(!d){break a}n=x(i*u[c+48>>2]);z=x(i*u[c+56>>2]);A=x(i*u[c+52>>2]);v=u[c+40>>2];w=u[c+24>>2];B=u[c+36>>2];C=u[c+20>>2];E=u[c+8>>2];F=u[c+4>>2];G=u[c+32>>2];D=u[c+16>>2];H=u[c>>2];c=0;while(1){b=a;i=x(s[f>>1]);j=x(s[f+2>>1]);k=x(s[f+4>>1]);l=x(z+x(x(x(E*i)+x(w*j))+x(v*k)));l:{if(l=x(0)){g=~~l>>>0;break l}g=0}p[b+4>>1]=g;b=a;l=x(A+x(x(x(F*i)+x(C*j))+x(B*k)));m:{if(l=x(0)){g=~~l>>>0;break m}g=0}p[b+2>>1]=g;b=a;i=x(n+x(x(x(H*i)+x(D*j))+x(G*k)));n:{if(i=x(0)){g=~~i>>>0;break n}g=0}p[b>>1]=g;b=e<<1;a=b+a|0;f=b+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a;case 2:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;b=q[m+48>>2];d=q[m+56>>2];if((I&255)==2){break d}if(!d){break a}n=x(i*u[c+48>>2]);z=x(i*u[c+56>>2]);A=x(i*u[c+52>>2]);v=u[c+40>>2];w=u[c+24>>2];B=u[c+36>>2];C=u[c+20>>2];E=u[c+8>>2];F=u[c+4>>2];G=u[c+32>>2];D=u[c+16>>2];H=u[c>>2];c=0;e=b<<2;while(1){b=a;i=x(t[f>>2]);j=x(t[f+4>>2]);k=x(t[f+8>>2]);l=x(z+x(x(x(E*i)+x(w*j))+x(v*k)));o:{if(l=x(0)){g=~~l>>>0;break o}g=0}q[b+8>>2]=g;b=a;l=x(A+x(x(x(F*i)+x(C*j))+x(B*k)));p:{if(l=x(0)){g=~~l>>>0;break p}g=0}q[b+4>>2]=g;b=a;i=x(n+x(x(x(H*i)+x(D*j))+x(G*k)));q:{if(i=x(0)){g=~~i>>>0;break q}g=0}q[b>>2]=g;a=a+e|0;f=e+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a;case 4:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;d=q[m+48>>2];e=q[m+56>>2];if((I&255)==2){break e}if(!e){break a}h=0;while(1){j=x(o[f|0]);k=x(o[f+1|0]);l=x(o[f+2|0]);n=x(x(x(x(u[c+8>>2]*j)+x(u[c+24>>2]*k))+x(u[c+40>>2]*l))+x(i*u[c+56>>2]));r:{if(x(y(n))>2];z=u[c+32>>2];A=u[c>>2];v=u[c+16>>2];w=u[c+52>>2];B=u[c+36>>2];C=u[c+4>>2];E=u[c+20>>2];o[a+2|0]=b;b=a;w=x(x(x(x(C*j)+x(E*k))+x(B*l))+x(i*w));s:{if(x(y(w))>2];a=(f-g|0)+h|0;e=q[m+48>>2];d=q[m+56>>2];if((I&255)==2){break f}if(!d){break a}l=x(i*u[c+48>>2]);n=x(i*u[c+56>>2]);z=x(i*u[c+52>>2]);A=u[c+40>>2];v=u[c+24>>2];w=u[c+36>>2];B=u[c+20>>2];C=u[c+8>>2];E=u[c+4>>2];F=u[c+32>>2];G=u[c+16>>2];D=u[c>>2];c=0;while(1){b=a;i=x(p[f>>1]);j=x(p[f+2>>1]);k=x(p[f+4>>1]);H=x(n+x(x(x(C*i)+x(v*j))+x(A*k)));u:{if(x(y(H))>1]=g;b=a;H=x(z+x(x(x(E*i)+x(B*j))+x(w*k)));v:{if(x(y(H))>1]=g;b=a;i=x(l+x(x(x(D*i)+x(G*j))+x(F*k)));w:{if(x(y(i))>1]=g;b=e<<1;a=b+a|0;f=b+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a;case 6:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;b=q[m+48>>2];d=q[m+56>>2];if((I&255)==2){break g}if(!d){break a}l=x(i*u[c+48>>2]);n=x(i*u[c+56>>2]);z=x(i*u[c+52>>2]);A=u[c+40>>2];v=u[c+24>>2];w=u[c+36>>2];B=u[c+20>>2];C=u[c+8>>2];E=u[c+4>>2];F=u[c+32>>2];G=u[c+16>>2];D=u[c>>2];c=0;e=b<<2;while(1){b=a;i=x(q[f>>2]);j=x(q[f+4>>2]);k=x(q[f+8>>2]);H=x(n+x(x(x(C*i)+x(v*j))+x(A*k)));x:{if(x(y(H))>2]=g;b=a;H=x(z+x(x(x(E*i)+x(B*j))+x(w*k)));y:{if(x(y(H))>2]=g;b=a;i=x(l+x(x(x(D*i)+x(G*j))+x(F*k)));z:{if(x(y(i))>2]=g;a=a+e|0;f=e+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a;case 8:i=b?x(1):x(0);f=q[m+60>>2];a=(f-g|0)+h|0;d=q[m+48>>2];b=q[m+56>>2];if((I&255)!=2){if(!b){break a}g=0;d=d<<2;while(1){n=u[c+48>>2];z=u[c+32>>2];A=u[c>>2];v=u[c+16>>2];w=u[c+52>>2];B=u[c+36>>2];C=u[c+4>>2];E=u[c+20>>2];j=u[f>>2];k=u[f+4>>2];l=u[f+8>>2];u[a+8>>2]=x(x(x(j*u[c+8>>2])+x(k*u[c+24>>2]))+x(l*u[c+40>>2]))+x(i*u[c+56>>2]);u[a+4>>2]=x(x(x(j*C)+x(k*E))+x(l*B))+x(i*w);u[a>>2]=x(x(x(j*A)+x(k*v))+x(l*z))+x(i*n);a=a+d|0;f=d+f|0;g=g+1|0;if((b|0)!=(g|0)){continue}break}break a}if(!b){break a}g=0;d=d<<2;while(1){l=u[c+48>>2];n=u[c+32>>2];z=u[c>>2];A=u[c+16>>2];v=u[c+52>>2];w=u[c+36>>2];B=u[c+4>>2];C=u[c+20>>2];j=u[f>>2];k=u[f+4>>2];u[a+8>>2]=x(x(x(j*u[c+8>>2])+x(k*u[c+24>>2]))+x(u[c+40>>2]*x(0)))+x(i*u[c+56>>2]);u[a+4>>2]=x(x(x(j*B)+x(k*C))+x(w*x(0)))+x(i*v);u[a>>2]=x(x(x(j*z)+x(k*A))+x(n*x(0)))+x(i*l);a=a+d|0;f=d+f|0;g=g+1|0;if((b|0)!=(g|0)){continue}break}break a;default:break h}}q[m+4>>2]=aj(d,e);q[m>>2]=f;Pi(4,44761,45890,m);break a}if(!d){break a}k=x(i*u[c+48>>2]);l=x(u[c+32>>2]*x(0));n=x(i*u[c+56>>2]);z=x(u[c+40>>2]*x(0));A=x(i*u[c+52>>2]);v=x(u[c+36>>2]*x(0));w=u[c+24>>2];B=u[c+20>>2];C=u[c+8>>2];E=u[c+4>>2];F=u[c+16>>2];G=u[c>>2];c=0;e=b<<2;while(1){b=a;i=x(q[f>>2]);j=x(q[f+4>>2]);D=x(n+x(z+x(x(C*i)+x(w*j))));A:{if(x(y(D))>2]=g;b=a;D=x(A+x(v+x(x(E*i)+x(B*j))));B:{if(x(y(D))>2]=g;b=a;i=x(k+x(l+x(x(G*i)+x(F*j))));C:{if(x(y(i))>2]=g;a=a+e|0;f=e+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a}if(!d){break a}k=x(i*u[c+48>>2]);l=x(u[c+32>>2]*x(0));n=x(i*u[c+56>>2]);z=x(u[c+40>>2]*x(0));A=x(i*u[c+52>>2]);v=x(u[c+36>>2]*x(0));w=u[c+24>>2];B=u[c+20>>2];C=u[c+8>>2];E=u[c+4>>2];F=u[c+16>>2];G=u[c>>2];c=0;while(1){b=a;i=x(p[f>>1]);j=x(p[f+2>>1]);D=x(n+x(z+x(x(C*i)+x(w*j))));D:{if(x(y(D))>1]=g;b=a;D=x(A+x(v+x(x(E*i)+x(B*j))));E:{if(x(y(D))>1]=g;b=a;i=x(k+x(l+x(x(G*i)+x(F*j))));F:{if(x(y(i))>1]=g;b=e<<1;a=b+a|0;f=b+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a}if(!e){break a}h=0;while(1){j=x(o[f|0]);k=x(o[f+1|0]);l=x(x(x(x(u[c+8>>2]*j)+x(u[c+24>>2]*k))+x(u[c+40>>2]*x(0)))+x(i*u[c+56>>2]));G:{if(x(y(l))>2];n=u[c+32>>2];z=u[c>>2];A=u[c+16>>2];v=u[c+52>>2];w=u[c+36>>2];B=u[c+4>>2];C=u[c+20>>2];o[a+2|0]=b;b=a;v=x(x(x(x(B*j)+x(C*k))+x(w*x(0)))+x(i*v));H:{if(x(y(v))>2]);n=x(u[c+32>>2]*x(0));z=x(i*u[c+56>>2]);A=x(u[c+40>>2]*x(0));v=x(i*u[c+52>>2]);w=x(u[c+36>>2]*x(0));B=u[c+24>>2];C=u[c+20>>2];E=u[c+8>>2];F=u[c+4>>2];G=u[c+16>>2];D=u[c>>2];c=0;e=b<<2;while(1){b=a;i=x(t[f>>2]);j=x(t[f+4>>2]);k=x(z+x(A+x(x(E*i)+x(B*j))));J:{if(k=x(0)){g=~~k>>>0;break J}g=0}q[b+8>>2]=g;b=a;k=x(v+x(w+x(x(F*i)+x(C*j))));K:{if(k=x(0)){g=~~k>>>0;break K}g=0}q[b+4>>2]=g;b=a;i=x(l+x(n+x(x(D*i)+x(G*j))));L:{if(i=x(0)){g=~~i>>>0;break L}g=0}q[b>>2]=g;a=a+e|0;f=e+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a}if(!d){break a}l=x(i*u[c+48>>2]);n=x(u[c+32>>2]*x(0));z=x(i*u[c+56>>2]);A=x(u[c+40>>2]*x(0));v=x(i*u[c+52>>2]);w=x(u[c+36>>2]*x(0));B=u[c+24>>2];C=u[c+20>>2];E=u[c+8>>2];F=u[c+4>>2];G=u[c+16>>2];D=u[c>>2];c=0;while(1){b=a;i=x(s[f>>1]);j=x(s[f+2>>1]);k=x(z+x(A+x(x(E*i)+x(B*j))));M:{if(k=x(0)){g=~~k>>>0;break M}g=0}p[b+4>>1]=g;b=a;k=x(v+x(w+x(x(F*i)+x(C*j))));N:{if(k=x(0)){g=~~k>>>0;break N}g=0}p[b+2>>1]=g;b=a;i=x(l+x(n+x(x(D*i)+x(G*j))));O:{if(i=x(0)){g=~~i>>>0;break O}g=0}p[b>>1]=g;b=e<<1;a=b+a|0;f=b+f|0;c=c+1|0;if((d|0)!=(c|0)){continue}break}break a}if(!e){break a}h=0;while(1){j=x(r[f|0]);k=x(r[f+1|0]);l=x(x(x(x(u[c+8>>2]*j)+x(u[c+24>>2]*k))+x(u[c+40>>2]*x(0)))+x(i*u[c+56>>2]));P:{if(l=x(0)){b=~~l>>>0;break P}b=0}n=u[c+48>>2];z=u[c+32>>2];A=u[c>>2];v=u[c+16>>2];l=u[c+52>>2];w=u[c+36>>2];B=u[c+4>>2];C=u[c+20>>2];o[a+2|0]=b;b=a;l=x(x(x(x(B*j)+x(C*k))+x(w*x(0)))+x(i*l));Q:{if(l=x(0)){g=~~l>>>0;break Q}g=0}o[b+1|0]=g;b=a;j=x(x(x(x(A*j)+x(v*k))+x(z*x(0)))+x(i*n));R:{if(j=x(0)){g=~~j>>>0;break R}g=0}o[b|0]=g;a=a+d|0;f=d+f|0;h=h+1|0;if((e|0)!=(h|0)){continue}break}}Ii=m- -64|0}function gL(a,b,c,d,e,f,g){var h=0,i=x(0),j=0,k=x(0),l=0,m=0,n=0,s=x(0),v=0,y=x(0),z=x(0),A=0,B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=0,K=0,L=x(0),M=x(0),N=x(0),O=0,P=x(0),Q=x(0),R=x(0),S=x(0),T=x(0),U=x(0),V=0,W=0,X=0,Y=x(0),Z=x(0),_=x(0),$=x(0),aa=0,ba=0,ca=0,da=x(0),ea=x(0),fa=x(0),ga=0,ha=0,ia=0,ja=x(0),ka=x(0),la=x(0),ma=x(0),na=x(0),oa=x(0),pa=x(0),qa=x(0),ra=x(0),sa=x(0),ta=x(0);h=Ii-432|0;Ii=h;v=q[g+8>>2];a:{b:{X=q[b+8>>2];if(!Ap(a,X)){l=q[v+4>>2];j=q[v>>2];ca=l-j|0;m=(ca|0)/320|0;n=m+1|0;if(n>>>0<=(q[v+8>>2]-j|0)/320>>>0){q[v+4>>2]=j+w(n,320);if(m>>>0<(ca+320|0)/320>>>0){j=q[g+12>>2];q[g+12>>2]=j+1;q[l+304>>2]=j;fn(l);j=q[e>>2];o[l+288|0]=r[l+288|0]|2;c:{d:{if(j){q[l+244>>2]=5;q[l+248>>2]=0;q[l+252>>2]=2;q[l+256>>2]=2;o[l+276|0]=r[j|0];o[l+277|0]=r[j+1|0];o[l+278|0]=r[j+2|0];e=l+279|0;o[e|0]=r[l+279|0]&208|r[j+3|0]&15;if(!r[g+16|0]){break c}o[g+16|0]=0;j=r[l+279|0]|16;break d}q[l+244>>2]=7;q[l+248>>2]=0;o[l+278|0]=255;p[l+276>>1]=65280;q[l+252>>2]=0;q[l+256>>2]=0;e=l+279|0;j=r[e|0]&-48|15}o[e|0]=j}e=wt(a,X);if(e>>>0<5){o[l+288|0]=r[l+288|0]|1;e=e<<2;q[l+236>>2]=q[e+44292>>2];q[l+232>>2]=q[e+44272>>2];q[l+148>>2]=q[v+48>>2];e=q[v+52>>2];q[l+224>>2]=1;q[l+144>>2]=e;m=v+60|0;q[l+280>>2]=(q[m>>2]-q[v+56>>2]|0)/36;e=To(a,X);q[l+156>>2]=q[(e?e:g+4|0)>>2];e=vt(a,X,h+16|0);e:{f:{if(q[h+16>>2]==2){if(!e){break e}g=q[e+48>>2];e=q[g>>2];g=q[g+4>>2];break f}g=0}X=e;ca=g;if(!(g|e)){g=q[v+76>>2];e=q[v+72>>2]}q[l+160>>2]=e;q[l+164>>2]=g;g:{j=w(f,54);K=v- -64|0;n=q[K>>2];if(j>>>0>(n-q[v+60>>2]|0)/36>>>0){if(o[v+68|0]&1){break g}e=v+56|0;Wi(((n-q[e>>2]|0)/36|0)+(j>>>0>128?j:128)|0,36,e,K,m);e=q[l+160>>2];g=q[l+164>>2]}e=Mi[q[75017]](e,g)|0;g=Mi[q[75018]](q[l+160>>2],q[l+164>>2])|0;if(!(!e|!g)){if(!f){v=0;break b}da=x(x(1)/x(g>>>0));ea=x(x(1)/x(e>>>0));v=0;while(1){n=q[((V<<4)+b|0)+8>>2];Xl(h+416|0,a,n,3);P=u[(V<<2)+d>>2];Q=u[h+424>>2];R=u[h+420>>2];S=u[h+416>>2];q[h+400>>2]=0;q[h+396>>2]=0;q[h+392>>2]=0;q[h+388>>2]=1065353216;q[h+384>>2]=1065353216;q[h+380>>2]=1065353216;j=iK(a,n);jea(h+352|0,a,n);h:{i:{if(X|ca){i=x(x(x(u[h+352>>2]+u[h+356>>2])+u[h+360>>2])+u[h+364>>2]);if(!(!j&i==x(0))){break i}}g=q[m>>2];if((g|0)==q[K>>2]){break a}e=(V<<6)+c|0;z=u[e+16>>2];B=u[e>>2];D=u[e+32>>2];i=u[e+48>>2];C=u[e+8>>2];E=u[e+24>>2];H=u[e+40>>2];k=u[e+56>>2];y=u[e+4>>2];N=u[e+20>>2];F=u[e+36>>2];s=u[e+52>>2];q[m>>2]=g+36;u[g+32>>2]=P;u[g+28>>2]=Q;u[g+24>>2]=R;u[g+20>>2]=S;q[g+12>>2]=0;q[g+16>>2]=0;L=x(C*x(0));M=x(E*x(0));H=x(H*x(0));T=x(k+x(x(L+M)+H));u[g+8>>2]=T;U=x(y*x(0));Y=x(N*x(0));F=x(F*x(0));Z=x(s+x(x(U+Y)+F));u[g+4>>2]=Z;_=x(B*x(0));$=x(z*x(0));D=x(D*x(0));fa=x(i+x(x(_+$)+D));u[g>>2]=fa;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;q[e+12>>2]=1065353216;q[e+16>>2]=0;u[e+8>>2]=k+x(x(C+M)+H);u[e+4>>2]=s+x(x(y+Y)+F);u[e>>2]=i+x(x(B+$)+D);e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;q[e+12>>2]=1065353216;q[e+16>>2]=1065353216;C=x(k+x(x(C+E)+H));u[e+8>>2]=C;y=x(s+x(x(y+N)+F));u[e+4>>2]=y;B=x(i+x(x(B+z)+D));u[e>>2]=B;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;q[e+12>>2]=0;q[e+16>>2]=0;u[e+8>>2]=T;u[e+4>>2]=Z;u[e>>2]=fa;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;q[e+12>>2]=1065353216;q[e+16>>2]=1065353216;u[e+8>>2]=C;u[e+4>>2]=y;u[e>>2]=B;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;q[e+12>>2]=0;q[e+16>>2]=1065353216;u[e+8>>2]=k+x(x(L+E)+H);u[e+4>>2]=s+x(x(U+N)+F);u[e>>2]=i+x(x(_+z)+D);v=v+6|0;break h}j:{k:{e=hea(a,n);if(!e){break k}e=q[e+16>>2];if(!e){break k}g=q[e+68>>2]!=0;break j}e=0;g=0}o[h+351|0]=0;o[h+350|0]=0;if(j){jK(a,n,h+351|0,h+350|0)}l:{m:{n:{if(!(g^1|i!=x(0))){g=tea(a,n);if(g>>>0>=t[e+80>>2]){break n}n=q[e+64>>2]+(q[q[e+76>>2]+(g<<2)>>2]<<5)|0;W=q[n+28>>2];if(!W){break l}A=q[n+16>>2];ga=q[n+8>>2];e=(V<<6)+c|0;ha=e;j=0;aa=r[h+351|0];ba=r[h+350|0];if((aa|0)==(ba|0)){break m}O=q[n+12>>2];while(1){g=q[m>>2];if((g|0)==q[K>>2]){break a}I=(O+((q[q[n+24>>2]+(j<<2)>>2]^-1)<<1)&1073741822)<<2;ia=I+ga|0;i=u[ia+4>>2];k=u[ia>>2];s=u[e+48>>2];z=u[ha+32>>2];B=u[e>>2];C=u[e+16>>2];E=u[e+52>>2];y=u[e+36>>2];N=u[e+4>>2];H=u[e+20>>2];F=u[e+56>>2];D=u[e+40>>2];L=u[e+8>>2];M=u[e+24>>2];I=A+I|0;ia=q[I+4>>2];I=q[I>>2];q[m>>2]=g+36;u[g+32>>2]=P;u[g+28>>2]=Q;u[g+24>>2]=R;u[g+20>>2]=S;q[g+12>>2]=I;q[g+16>>2]=ia;k=x((aa?x(-k):k)+x(.5));i=x((ba?x(-i):i)+x(.5));u[g+8>>2]=F+x(x(x(L*k)+x(M*i))+x(D*x(0)));u[g+4>>2]=E+x(x(x(k*N)+x(i*H))+x(y*x(0)));u[g>>2]=s+x(x(x(k*B)+x(i*C))+x(z*x(0)));j=j+1|0;if((W|0)!=(j|0)){continue}break}break l}q[h+300>>2]=1065353216;q[h+288>>2]=0;bK(h+272|0,a,n);i=u[h+276>>2];B=i>x(.0010000000474974513)?x(x(1)/i):x(0);i=u[h+272>>2];C=i>x(.0010000000474974513)?x(x(1)/i):x(0);n=h+304|0;o:{p:{i=u[(j?j:h+400|0)>>2];k=u[(j?j+8|0:h+392|0)>>2];if(i==k){break p}s=u[(j?j+20|0:h+380|0)>>2];if(s==u[(j?j+12|0:h+388|0)>>2]){break p}e=r[h+350|0];u[(h+320|(e?12:0))>>2]=i;g=r[h+351|0];z=i;i=u[h+364>>2];u[(h+320|(e?8:4))>>2]=z+x(ea*i);E=u[h+356>>2];u[(h+320|(e?4:8))>>2]=k-x(ea*E);u[(h+320|(e?0:12))>>2]=k;k=u[(j?j+4|0:h+396|0)>>2];u[(h+304|(g?12:0))>>2]=k;y=u[h+352>>2];u[(h+304|(g?8:4))>>2]=k-x(da*y);k=u[h+360>>2];z=x(s+x(da*k));W=1;e=!g;break o}W=0;e=r[h+351|0];u[(h+320|(e?12:0))>>2]=i;g=r[h+350|0];y=u[h+352>>2];u[(h+320|(e?8:4))>>2]=i+x(ea*y);i=u[(j?j+16|0:h+384|0)>>2];k=u[h+360>>2];u[(h+320|(e?4:8))>>2]=i-x(ea*k);u[(h+320|(e?0:12))>>2]=i;i=u[(j?j+4|0:h+396|0)>>2];u[(h+304|(g?12:0))>>2]=i;s=i;i=u[h+364>>2];u[(h+304|(g?8:4))>>2]=s+x(da*i);s=u[(j?j+12|0:h+388|0)>>2];E=u[h+356>>2];z=x(s-x(da*E));e=!g}u[(n|(e?8:4))>>2]=z;g=0;u[(h+304|(e?12:0))>>2]=s;u[h+292>>2]=B*i;u[h+296>>2]=x(1)-x(B*E);i=x(x(1)-x(C*k));e=(V<<6)+c|0;H=u[e+12>>2];Y=x(i*H);F=u[e+8>>2];Z=x(i*F);D=u[e+4>>2];_=x(i*D);L=u[e>>2];$=x(i*L);i=x(C*y);fa=x(i*H);ja=x(i*F);ka=x(i*D);la=x(i*L);k=x(0);ma=x(H*x(0));na=x(F*x(0));oa=x(D*x(0));pa=x(L*x(0));i=x(u[e+44>>2]*x(0));s=x(u[e+40>>2]*x(0));z=x(u[e+36>>2]*x(0));B=x(u[e+32>>2]*x(0));C=u[e+60>>2];qa=u[e+28>>2];E=u[e+56>>2];ra=u[e+24>>2];y=u[e+52>>2];sa=u[e+20>>2];N=u[e+48>>2];ta=u[e+16>>2];j=0;while(1){e=(h+16|0)+(j<<6)|0;M=x(k*qa);u[e+60>>2]=C+x(x(H+M)+i);T=x(k*ra);u[e+56>>2]=E+x(x(F+T)+s);U=x(k*sa);u[e+52>>2]=y+x(x(D+U)+z);k=x(k*ta);u[e+48>>2]=N+x(x(L+k)+B);u[e+44>>2]=C+x(x(Y+M)+i);u[e+40>>2]=E+x(x(Z+T)+s);u[e+36>>2]=y+x(x(_+U)+z);u[e+32>>2]=N+x(x($+k)+B);u[e+28>>2]=C+x(x(fa+M)+i);u[e+24>>2]=E+x(x(ja+T)+s);u[e+20>>2]=y+x(x(ka+U)+z);u[e+16>>2]=N+x(x(la+k)+B);u[e+12>>2]=C+x(x(ma+M)+i);u[e+8>>2]=E+x(x(na+T)+s);u[e+4>>2]=y+x(x(oa+U)+z);u[e>>2]=N+x(x(pa+k)+B);j=j+1|0;if((j|0)!=4){k=u[(h+288|0)+(j<<2)>>2];continue}break}while(1){e=g<<2;ga=e+(h+320|0)|0;ha=e+(h+304|0)|0;n=g+1|0;e=n<<2;aa=e+(h+320|0)|0;ba=e+(h+304|0)|0;e=0;q:{while(1){O=(h+16|0)+(n<<6)|0;j=e+1|0;I=j<<4;A=O+I|0;B=u[A+8>>2];C=u[A+4>>2];E=u[A>>2];A=O;O=e<<4;A=A+O|0;T=u[A+8>>2];U=u[A+4>>2];Y=u[A>>2];A=I;I=(h+16|0)+(g<<6)|0;A=A+I|0;Z=u[A+8>>2];_=u[A+4>>2];$=u[A>>2];A=I+O|0;y=u[A+8>>2];N=u[A+4>>2];H=u[A>>2];r:{if(W){z=u[(h+304|0)+(j<<2)>>2];F=z;D=u[ga>>2];s=D;L=u[(h+304|0)+(e<<2)>>2];k=L;M=u[aa>>2];i=M;break r}L=u[ba>>2];z=L;M=u[(h+320|0)+(e<<2)>>2];s=M;F=u[ha>>2];k=F;D=u[(h+320|0)+(j<<2)>>2];i=D}e=q[m>>2];if((e|0)!=q[K>>2]){q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=k;u[e+12>>2]=s;u[e+8>>2]=y;u[e+4>>2]=N;u[e>>2]=H;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=F;u[e+12>>2]=D;u[e+8>>2]=Z;u[e+4>>2]=_;u[e>>2]=$;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=z;u[e+12>>2]=i;u[e+8>>2]=B;u[e+4>>2]=C;u[e>>2]=E;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=k;u[e+12>>2]=s;u[e+8>>2]=y;u[e+4>>2]=N;u[e>>2]=H;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=z;u[e+12>>2]=i;u[e+8>>2]=B;u[e+4>>2]=C;u[e>>2]=E;e=q[m>>2];if((e|0)==q[K>>2]){break a}q[m>>2]=e+36;u[e+32>>2]=P;u[e+28>>2]=Q;u[e+24>>2]=R;u[e+20>>2]=S;u[e+16>>2]=L;u[e+12>>2]=M;u[e+8>>2]=T;u[e+4>>2]=U;u[e>>2]=Y;e=j;if((e|0)==3){break q}continue}break}break a}g=n;if((g|0)!=3){continue}break}v=v+54|0;break h}J(41214,41226,147,41006);G()}while(1){g=q[m>>2];if((g|0)==q[K>>2]){break a}O=q[q[n+24>>2]+(j<<2)>>2]<<3;I=O+ga|0;i=u[I+4>>2];k=u[I>>2];s=u[e+48>>2];z=u[ha+32>>2];B=u[e>>2];C=u[e+16>>2];E=u[e+52>>2];y=u[e+36>>2];N=u[e+4>>2];H=u[e+20>>2];F=u[e+56>>2];D=u[e+40>>2];L=u[e+8>>2];M=u[e+24>>2];O=A+O|0;I=q[O+4>>2];O=q[O>>2];q[m>>2]=g+36;u[g+32>>2]=P;u[g+28>>2]=Q;u[g+24>>2]=R;u[g+20>>2]=S;q[g+12>>2]=O;q[g+16>>2]=I;k=x((aa?x(-k):k)+x(.5));i=x((ba?x(-i):i)+x(.5));u[g+8>>2]=F+x(x(x(L*k)+x(M*i))+x(D*x(0)));u[g+4>>2]=E+x(x(x(k*N)+x(i*H))+x(y*x(0)));u[g>>2]=s+x(x(x(k*B)+x(i*C))+x(z*x(0)));j=j+1|0;if((W|0)!=(j|0)){continue}break}}v=v+W|0}V=V+1|0;if((V|0)!=(f|0)){continue}break}break b}J(42473,41161,1368,42458);G()}J(40670,40745,493,40801);G()}J(42342,41161,949,42358);G()}q[h>>2]=e;Pi(4,40439,42505,h);J(42529,41161,893,42531);G()}J(40995,40745,479,41006);G()}J(40968,40745,506,40987);G()}J(42424,41161,1326,42458);G()}q[l+284>>2]=v;Ii=h+432|0;return}J(40939,40745,533,40963);G()}function uO(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;m=Ii-192|0;Ii=m;y=h;F=i&65535;n=d;o=e&65535;G=(e^i)&-2147483648;l=i>>>16&32767;a:{t=e>>>16&32767;b:{c:{if(l-1>>>0<32766?t-1>>>0<=32765:0){break c}H=e&2147483647;k=H;j=d;if(!(!j&(k|0)==2147418112?!(b|c):k>>>0<2147418112)){J=d;G=e|32768;break b}H=i&2147483647;e=H;d=h;if(!(!d&(e|0)==2147418112?!(f|g):e>>>0<2147418112)){J=h;G=i|32768;b=f;c=g;break b}if(!(b|j|(k^2147418112|c))){if(!(d|f|(e^2147418112|g))){b=0;c=0;G=2147450880;break b}G=G|2147418112;b=0;c=0;break b}if(!(d|f|(e^2147418112|g))){b=0;c=0;break b}if(!(b|j|(c|k))){break a}if(!(d|f|(e|g))){G=G|2147418112;b=0;c=0;break b}if((k|0)==65535|k>>>0<65535){i=b;d=!(o|n);h=d<<6;j=z(d?b:n)+32|0;b=z(d?c:o);b=h+((b|0)==32?j:b)|0;vm(m+176|0,i,c,n,o,b-15|0);I=16-b|0;n=q[m+184>>2];o=q[m+188>>2];c=q[m+180>>2];b=q[m+176>>2]}if(e>>>0>65535){break c}d=!(y|F);e=d<<6;h=z(d?f:y)+32|0;d=z(d?g:F);d=e+((d|0)==32?h:d)|0;vm(m+160|0,f,g,y,F,d-15|0);I=(d+I|0)-16|0;y=q[m+168>>2];F=q[m+172>>2];f=q[m+160>>2];g=q[m+164>>2]}e=F|65536;H=e;N=y;d=y;k=e<<15|d>>>17;d=d<<15|g>>>17;h=-102865788-d|0;e=k;j=k;i=1963258675-(j+(d>>>0>4192101508)|0)|0;Vn(m+144|0,d,j,h,i);j=q[m+152>>2];Vn(m+128|0,0-j|0,0-(q[m+156>>2]+((j|0)!=0)|0)|0,h,i);h=q[m+136>>2];i=h<<1|q[m+132>>2]>>>31;h=q[m+140>>2]<<1|h>>>31;Vn(m+112|0,i,h,d,k);j=h;h=q[m+120>>2];Vn(m+96|0,i,j,0-h|0,0-(q[m+124>>2]+((h|0)!=0)|0)|0);h=q[m+104>>2];i=h<<1|q[m+100>>2]>>>31;h=q[m+108>>2]<<1|h>>>31;Vn(m+80|0,i,h,d,k);j=h;h=q[m+88>>2];Vn(m- -64|0,i,j,0-h|0,0-(q[m+92>>2]+((h|0)!=0)|0)|0);h=q[m+72>>2];i=h<<1|q[m+68>>2]>>>31;h=q[m+76>>2]<<1|h>>>31;Vn(m+48|0,i,h,d,k);j=h;h=q[m+56>>2];Vn(m+32|0,i,j,0-h|0,0-(q[m+60>>2]+((h|0)!=0)|0)|0);h=q[m+40>>2];i=h<<1|q[m+36>>2]>>>31;h=q[m+44>>2]<<1|h>>>31;Vn(m+16|0,i,h,d,k);j=h;h=q[m+24>>2];Vn(m,i,j,0-h|0,0-(q[m+28>>2]+((h|0)!=0)|0)|0);I=(t-l|0)+I|0;h=q[m+8>>2];j=q[m+12>>2]<<1|h>>>31;k=h<<1|q[m+4>>2]>>>31;h=k-1|0;k=j-(k>>>0<1)|0;j=0;C=j;i=h;p=e;e=0;r=Aza(h,j,p,e);j=Li;u=j;x=k;l=0;t=d;h=Aza(k,l,d,0);d=h+r|0;j=Li+j|0;j=d>>>0>>0?j+1|0:j;h=d;d=j;j=0;k=(d|0)==(u|0)&h>>>0>>0|d>>>0>>0;r=Aza(x,l,p,e);e=r+d|0;k=Li+(j|k)|0;j=e;e=j>>>0>>0?k+1|0:k;p=j;k=h;r=0;h=Aza(i,C,t,s);d=r+h|0;j=Li+k|0;j=d>>>0>>0?j+1|0:j;h=j;t=(k|0)==(j|0)&r>>>0>d>>>0|j>>>0>>0;k=p+t|0;j=e;A=k;e=k>>>0>>0?j+1|0:j;p=d;r=d;t=h;d=g;B=(d&131071)<<15|f>>>17;u=Aza(i,C,B,0);d=Li;s=d;j=f;k=j<<15&-32768;w=0;D=Aza(x,l,k,w);h=D+u|0;j=Li+d|0;j=h>>>0>>0?j+1|0:j;d=j;D=0;E=Aza(i,C,k,w);w=D+E|0;k=h;j=k+Li|0;j=w>>>0>>0?j+1|0:j;v=(j|0)==(k|0)&w>>>0>>0|j>>>0>>0;j=(d|0)==(s|0)&k>>>0>>0|d>>>0>>0;h=d;d=Aza(x,l,B,K)+d|0;k=j+Li|0;k=d>>>0>>0?k+1|0:k;h=d;d=v+d|0;j=k;j=d>>>0>>0?j+1|0:j;h=d;d=d+r|0;j=j+t|0;j=d>>>0>>0?j+1|0:j;r=d;u=j;h=(j|0)==(t|0)&d>>>0

>>0|j>>>0>>0;d=h+A|0;j=e;j=d>>>0>>0?j+1|0:j;e=(r|0)!=0|(u|0)!=0;d=e+d|0;k=d>>>0>>0?j+1|0:j;h=d;s=0-d|0;A=0;t=Aza(s,A,i,C);d=Li;w=d;e=t;p=d;A=Aza(x,l,s,A);d=Li;v=d;B=0-(((h|0)!=0)+k|0)|0;s=0;k=Aza(i,C,B,s);h=k+A|0;j=Li+d|0;j=h>>>0>>0?j+1|0:j;d=j;k=h+p|0;e=0+e|0;p=e;j=e;k=j>>>0>>0?k+1|0:k;e=k;k=(w|0)==(k|0)&j>>>0>>0|k>>>0>>0;j=(d|0)==(v|0)&h>>>0>>0|d>>>0>>0;h=d;d=Aza(x,l,B,s)+d|0;j=j+Li|0;j=d>>>0>>0?j+1|0:j;h=d;d=k+d|0;v=d;h=d>>>0>>0?j+1|0:j;d=0-r|0;B=0-(((r|0)!=0)+u|0)|0;r=0;A=Aza(B,r,i,C);w=Li;u=d;k=Aza(d,0,x,l);d=k+A|0;j=Li+w|0;j=d>>>0>>0?j+1|0:j;k=d;d=j;C=Aza(i,C,u,K);u=0+C|0;j=k+Li|0;j=u>>>0>>0?j+1|0:j;u=(k|0)==(j|0)&u>>>0>>0|k>>>0>j>>>0;i=(d|0)==(w|0)&k>>>0>>0|d>>>0>>0;k=d;d=Aza(x,l,B,r)+k|0;j=i+Li|0;j=d>>>0>>0?j+1|0:j;i=d;d=d+u|0;k=d>>>0>>0?j+1|0:j;i=d;d=d+p|0;j=k+e|0;j=d>>>0>>0?j+1|0:j;i=d;k=d;d=j;k=(e|0)==(j|0)&k>>>0

>>0|e>>>0>j>>>0;e=k+v|0;j=h;j=e>>>0>>0?j+1|0:j;k=e;e=i;u=e-2|0;h=u;r=d-(e>>>0<2)|0;e=r;e=(d|0)==(e|0)&h>>>0>>0|d>>>0>e>>>0;d=k+e|0;j=d>>>0>>0?j+1|0:j;e=d;d=d-1|0;h=j-(e>>>0<1)|0;e=0;w=e;l=d;i=n;v=i<<2|c>>>30;B=0;p=Aza(d,e,v,B);e=Li;s=e;k=e;e=c;K=(e&1073741823)<<2|b>>>30;t=0;D=h;i=0;e=Aza(K,t,h,i);d=e+p|0;k=Li+k|0;k=d>>>0>>0?k+1|0:k;j=(k|0)==(s|0)&d>>>0

>>0|k>>>0>>0;p=d;h=k;A=r;k=0;r=k;c=j;E=((o&1073741823)<<2|n>>>30)&-262145|262144;k=Aza(A,k,E,0);d=k+d|0;j=Li+h|0;j=d>>>0>>0?j+1|0:j;o=d;e=j;h=(j|0)==(h|0)&d>>>0

>>0|h>>>0>j>>>0;d=c+h|0;j=0;j=d>>>0>>0?1:j;h=Aza(D,i,E,M);d=h+d|0;k=Li+j|0;k=d>>>0>>0?k+1|0:k;n=Aza(l,w,E,M);h=Li;c=d;s=Aza(v,B,D,i);d=s+n|0;j=Li+h|0;j=d>>>0>>0?j+1|0:j;s=d;d=j;j=(h|0)==(j|0)&n>>>0>s>>>0|h>>>0>j>>>0;n=c+d|0;j=j+k|0;k=n;h=k>>>0>>0?j+1|0:j;p=o;c=k;o=0;d=p+o|0;n=e;k=s+e|0;k=d>>>0>>0?k+1|0:k;j=d;e=k;o=(k|0)==(n|0)&j>>>0

>>0|k>>>0>>0;k=c+o|0;j=h;C=k;h=k>>>0>>0?j+1|0:j;n=d;o=e;p=Aza(K,t,A,r);e=Li;s=Aza(u,0,v,B);d=s+p|0;k=Li+e|0;k=d>>>0>>0?k+1|0:k;s=d;p=(e|0)==(k|0)&p>>>0>d>>>0|e>>>0>k>>>0;e=k;x=p;j=b;L=j<<2&-4;c=0;j=Aza(l,w,L,c);d=j+d|0;k=Li+k|0;k=d>>>0>>0?k+1|0:k;p=d;j=d;d=k;k=(k|0)==(e|0)&j>>>0>>0|e>>>0>k>>>0;e=x+k|0;j=0;j=e>>>0>>0?1:j;k=e;e=n+k|0;j=j+o|0;j=e>>>0>>0?j+1|0:j;s=e;k=e;e=j;o=(j|0)==(o|0)&k>>>0>>0|j>>>0>>0;j=o+C|0;k=h;C=j;o=j>>>0>>0?k+1|0:k;x=Aza(D,i,L,c);D=Li;i=Aza(E,M,u,O);h=i+x|0;j=Li+D|0;j=h>>>0>>0?j+1|0:j;E=h;k=Aza(v,B,A,r);h=h+k|0;i=j;j=j+Li|0;j=h>>>0>>0?j+1|0:j;v=h;n=Aza(l,w,K,t);h=h+n|0;k=j+Li|0;k=h>>>0>>0?k+1|0:k;n=h;h=k;w=0;l=(k|0)==(j|0)&n>>>0>>0|k>>>0>>0;k=(i|0)==(j|0)&v>>>0>>0|i>>>0>j>>>0;i=k+((i|0)==(D|0)&E>>>0>>0|i>>>0>>0)|0;j=0;i=l+i|0;j=i;k=h|0;i=k+s|0;j=(j|w)+e|0;j=i>>>0>>0?j+1|0:j;k=j;l=(e|0)==(j|0)&i>>>0>>0|e>>>0>j>>>0;e=l+C|0;j=o;v=e;e=e>>>0>>0?j+1|0:j;s=i;o=k;A=Aza(A,r,L,c);r=Li;j=Aza(K,t,u,O);i=j+A|0;k=Li+r|0;k=i>>>0>>0?k+1|0:k;l=k;k=0;j=(l|0)==(r|0)&i>>>0>>0|l>>>0>>0;i=l+p|0;j=(j|k)+d|0;j=i>>>0>>0?j+1|0:j;l=i;k=i;i=j;k=(d|0)==(j|0)&k>>>0

>>0|d>>>0>j>>>0;d=j;p=k;j=n;n=0;h=n+l|0;k=d+j|0;d=h;k=d>>>0>>0?k+1|0:k;h=(i|0)==(k|0)&d>>>0>>0|i>>>0>k>>>0;d=p+h|0;k=0;k=d>>>0>>0?1:k;h=d;d=d+s|0;j=k+o|0;j=d>>>0>>0?j+1|0:j;h=d;i=j;j=(j|0)==(o|0)&d>>>0>>0|j>>>0>>0;d=j+v|0;k=e;k=d>>>0>>0?k+1|0:k;e=k;d:{if((k|0)==131071|k>>>0<131071){x=0;l=f;w=0;j=Aza(h,x,l,w);n=Li;k=b<<17;b=0;c=(j|0)!=0|(n|0)!=0;t=b-c|0;D=k-(b>>>0>>0)|0;b=0-(((j|0)!=0)+n|0)|0;r=0-j|0;u=b;c=0;v=Aza(i,c,l,w);b=Li;B=b;n=0;p=Aza(h,x,g,n);j=p+v|0;k=Li+b|0;k=j>>>0

>>0?k+1|0:k;b=j;p=0;s=j;j=(j|0)==(u|0)&r>>>0

>>0|j>>>0>u>>>0;C=t-j|0;t=D-(j>>>0>t>>>0)|0;j=Aza(d,0,l,w);l=Li;x=Aza(h,x,y,0);o=x+j|0;j=Li+l|0;j=o>>>0>>0?j+1|0:j;l=Aza(g,n,i,c);o=l+o|0;j=Li+j|0;j=((k|0)==(B|0)&b>>>0>>0|k>>>0>>0)+(l>>>0>o>>>0?j+1|0:j)|0;b=k+o|0;o=b;b=b>>>0>>0?j+1|0:j;j=Aza(h,i,H,0);l=Li;v=o;o=Aza(f,g,e,0);j=o+j|0;k=Li+l|0;k=j>>>0>>0?k+1|0:k;l=Aza(d,e,g,n);o=l+j|0;k=Aza(i,c,y,F);c=k+o|0;k=c;y=0;c=v+y|0;j=b+k|0;j=c>>>0>>0?j+1|0:j;b=c;y=C-b|0;F=t-((b>>>0>C>>>0)+j|0)|0;I=I-1|0;o=r-p|0;b=u-((r>>>0

>>0)+s|0)|0;break d}r=i>>>1|0;k=0;n=b<<16;h=(i&1)<<31|h>>>1;i=d<<31|i>>>1;v=0;l=f;B=0;b=Aza(h,v,l,B);j=Li;t=j;j=(b|0)!=0|(j|0)!=0;u=0-j|0;E=n-(c>>>0>>0)|0;p=0-b|0;s=0-(((b|0)!=0)+t|0)|0;n=0;t=Aza(h,v,g,n);b=Li;D=b;j=e<<31|d>>>1;r=r|d<<31;O=j|k;C=r;L=0;k=Aza(r,L,l,B);c=k+t|0;j=Li+b|0;j=c>>>0>>0?j+1|0:j;b=j;k=c;w=k;x=0;j=(k|0)==(s|0)&x>>>0>p>>>0|k>>>0>s>>>0;A=u-j|0;u=E-(j>>>0>u>>>0)|0;j=Aza(h,i,H,0);E=Li;M=Aza(l,g,e>>>1|0,0);k=M+j|0;j=Li+E|0;E=k;k=k>>>0>>0?j+1|0:j;j=E;d=(e&1)<<31|d>>>1;e=e>>>1|0;E=Aza(d,e,g,n);j=j+E|0;k=Li+k|0;F=Aza(r,O,y,F);j=F+j|0;r=0;F=j;j=Aza(g,n,C,L);n=Li;l=Aza(d,0,l,B);k=l+j|0;j=Li+n|0;j=k>>>0>>0?j+1|0:j;y=Aza(h,v,y,0);k=y+k|0;j=Li+j|0;o=k;k=k>>>0>>0?j+1|0:j;y=(b|0)==(D|0)&c>>>0>>0|b>>>0>>0;c=b;b=b+o|0;k=k+y|0;k=b>>>0>>0?k+1|0:k;c=b;b=b+r|0;k=k+F|0;k=b>>>0>>0?k+1|0:k;y=A-b|0;F=u-((b>>>0>A>>>0)+k|0)|0;o=p-x|0;b=s-((p>>>0>>0)+w|0)|0}if((I|0)>=16384){G=G|2147418112;b=0;c=0;break b}l=I+16383|0;if((I|0)<=-16383){e:{if(l){break e}l=o;j=b<<1|l>>>31;l=l<<1;c=(g|0)==(j|0)&f>>>0>>0|g>>>0>>0;f=y;j=F<<1|f>>>31;g=f<<1|b>>>31;k=g;f=(k|0)==(N|0)&(j|0)==(H|0)?c:(H|0)==(j|0)&k>>>0>N>>>0|j>>>0>H>>>0;b=f+h|0;j=i;j=b>>>0>>0?j+1|0:j;c=j;f=d+((i|0)==(j|0)&b>>>0>>0|i>>>0>j>>>0)|0;k=e&65535;e=f;k=d>>>0>e>>>0?k+1|0:k;d=k;if(!(k&65536)){break e}J=e|J;G=d|G;break b}b=0;c=0;break b}n=o;k=b<<1|n>>>31;n=n<<1;c=(g|0)==(k|0)&f>>>0<=n>>>0|g>>>0>>0;f=y;k=F<<1|f>>>31;f=f<<1|b>>>31;f=(f|0)==(N|0)&(k|0)==(H|0)?c:(H|0)==(k|0)&f>>>0>=N>>>0|k>>>0>H>>>0;b=f+h|0;j=i;j=b>>>0>>0?j+1|0:j;c=j;f=d+((i|0)==(j|0)&b>>>0>>0|i>>>0>j>>>0)|0;k=e&65535;k=d>>>0>f>>>0?k+1|0:k;e=0;d=e+f|0;j=(l<<16)+k|0;J=d|J;G=G|(d>>>0>>0?j+1|0:j)}q[a>>2]=b;q[a+4>>2]=c;q[a+8>>2]=J;q[a+12>>2]=G;Ii=m+192|0;return}q[a>>2]=0;q[a+4>>2]=0;b=!(d|f|(e|g));q[a+8>>2]=b?0:J;q[a+12>>2]=b?2147450880:G;Ii=m+192|0}function zfa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-304|0;Ii=f;a:{b:{c:{d:{e:{f:{if(a){if(!b){break f}c=1;g:{if(r[a+156|0]&32){break g}if(r[b+50|0]){Da(131097,1)}Da(131098,196609);Da(131091,q[b+40>>2]);c=-2;if(!(Gb(q[b+32>>2],q[b+36>>2],8,8,8,8,32,8,(r[b+48|0]?65538:65537)|0)|0)){break g}yb(q[b+52>>2]);ub(752);xb(753);wb(754);vb(755);Qa(1);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break e}}q[a+40>>2]=q[b>>2];q[a+44>>2]=q[b+4>>2];q[a+48>>2]=q[b+8>>2];q[a+52>>2]=q[b+12>>2];q[a+56>>2]=q[b+16>>2];q[a+60>>2]=q[b+20>>2];q[a+64>>2]=q[b+24>>2];q[a+68>>2]=q[b+28>>2];p[a+156>>1]=s[a+156>>1]|32;q[a+88>>2]=q[b+32>>2];q[a+92>>2]=q[b+36>>2];Ta(f+172|0,f+168|0);q[a+96>>2]=q[f+172>>2];c=q[f+168>>2];q[a+104>>2]=0;q[a+100>>2]=c;p[a+156>>1]=s[a+156>>1]|256;p[f+232>>1]=s[f+232>>1]&59392|512;c=q[f+228>>2]&-1073741824|2097148;q[f+224>>2]=29361471;q[f+228>>2]=c;c=q[f+236>>2];q[a+80>>2]=q[f+232>>2];q[a+84>>2]=c;c=q[f+228>>2];q[a+72>>2]=q[f+224>>2];q[a+76>>2]=c;p[a+156>>1]=s[a+156>>1]|512;c=V(7938)|0;p[a+156>>1]=s[a+156>>1]&65279|!an(c,88671)<<8;c=Sc()|0;if(!c){break d}N(c|0,88751)|0;N(c|0,88774)|0;N(c|0,88791)|0;N(c|0,88814)|0;N(c|0,88842)|0;N(c|0,88867)|0;N(c|0,88883)|0;N(c|0,88898)|0;N(c|0,88921)|0;N(c|0,88930)|0;N(c|0,88959)|0;N(c|0,88988)|0;N(c|0,89019)|0;N(c|0,89038)|0;N(c|0,89066)|0;N(c|0,89089)|0;N(c|0,89111)|0;N(c|0,89136)|0;N(c|0,89154)|0;N(c|0,89179)|0;N(c|0,89202)|0;N(c|0,89232)|0;N(c|0,89256)|0;N(c|0,89271)|0;N(c|0,89296)|0;N(c|0,89326)|0;N(c|0,89355)|0;N(c|0,89385)|0;N(c|0,89416)|0;N(c|0,89446)|0;N(c|0,89481)|0;N(c|0,89507)|0;N(c|0,89527)|0;N(c|0,89547)|0;N(c|0,89566)|0;N(c|0,89585)|0;if(r[b+49|0]){Pi(2,88531,89602,0);q[f+144>>2]=V(7937);Pi(2,88531,89617,f+144|0);q[f+128>>2]=V(7938);Pi(2,88531,89630,f+128|0);q[f+112>>2]=V(7936);Pi(2,88531,89642,f+112|0)}c=V(7939)|0;if(!c){break c}c=Pk(c);q[a+20>>2]=c;q[f+224>>2]=0;h=ko(c,90425,f+224|0);if(h){g=a+12|0;d=a+8|0;e=a+4|0;while(1){c=q[d>>2];i=q[g>>2];if((c|0)==(i|0)){if(o[a+16|0]&1){break b}Wi((c-q[e>>2]>>2)+4|0,4,e,g,d);i=q[g>>2];c=q[d>>2]}if((c|0)==(i|0)){break a}q[d>>2]=c+4;q[c>>2]=h;h=ko(0,90425,f+224|0);if(h){continue}break}}if(!q[75052]){q[75052]=LK(89664,89685,a)}if(!q[75053]){q[75053]=LK(89705,89719,a)}c=q[a+8>>2];g=q[a+4>>2];d=c-g|0;h:{if(!d){break h}c=g-c|0;h=(c|0)>(d|0)?c:d;c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;i:{j:{while(1){if(!dj(89732,q[g+(c<<2)>>2])){break j}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89385,q[g+(c<<2)>>2])){break j}c=c+1|0;if((e|0)!=(c|0)){continue}break}break i}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|3840;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;k:{l:{while(1){if(!dj(89765,q[g+(c<<2)>>2])){break l}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89326,q[g+(c<<2)>>2])){break l}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89355,q[g+(c<<2)>>2])){break l}c=c+1|0;if((e|0)!=(c|0)){continue}break}break k}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|4096;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;m:{n:{while(1){if(!dj(89801,q[g+(c<<2)>>2])){break n}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89416,q[g+(c<<2)>>2])){break n}c=c+1|0;if((e|0)!=(c|0)){continue}break}break m}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|393216;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;o:{p:{while(1){if(!dj(89833,q[g+(c<<2)>>2])){break p}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89865,q[g+(c<<2)>>2])){break p}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(88959,q[g+(c<<2)>>2])){break p}c=c+1|0;if((e|0)!=(c|0)){continue}break}break o}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|1572864;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;q:{r:{while(1){if(!dj(89897,q[g+(c<<2)>>2])){break r}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(89929,q[g+(c<<2)>>2])){break r}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(88930,q[g+(c<<2)>>2])){break r}c=c+1|0;if((e|0)!=(c|0)){continue}break}break q}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|2097152;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;s:{while(1){if(dj(89961,q[g+(c<<2)>>2])){c=c+1|0;if((e|0)!=(c|0)){continue}break s}break}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|32768;q[a+140>>2]=c}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;t:{while(1){if(!dj(89986,q[g+(c<<2)>>2])){break t}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(90022,q[g+(c<<2)>>2])){break t}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){if(!dj(90054,q[g+(c<<2)>>2])){break t}c=c+1|0;if((e|0)!=(c|0)){continue}break}if(!d){break h}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);d=c>>>0>1?c:1;c=0;while(1){if(!dj(89296,q[g+(c<<2)>>2])){break t}c=c+1|0;if((d|0)!=(c|0)){continue}break}break h}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|65536;q[a+140>>2]=c}if(o[a+157|0]&1){c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|1069547520;q[a+140>>2]=c}q[f+164>>2]=0;la(34466,f+164|0);c=q[f+164>>2];if((c|0)>=1){g=$i((c|0)!=(c&1073741823)?-1:c<<2);la(34467,g|0);h=q[f+164>>2];if((h|0)>=1){c=0;while(1){d=32768;u:{v:{w:{x:{y:{e=q[g+(c<<2)>>2];switch(e-37488|0){case 1:case 3:case 4:case 5:case 6:case 7:break u;case 8:break v;case 2:break x;case 0:break y;default:break w}}d=8192;break v}d=16384;break v}if((e|0)!=37808){break u}d=65536}e=q[a+140>>2];q[a+136>>2]=d|q[a+136>>2];q[a+140>>2]=e}c=c+1|0;if((h|0)!=(c|0)){continue}break}}Ni(g)}q[a+144>>2]=16;p[a+156>>1]=s[a+156>>1]|16;q[f+160>>2]=1024;la(3379,f+160|0);q[a+108>>2]=q[f+160>>2];z:{if(!(r[q[75054]+156|0]&64)){break z}if(!(K()|0)){break z}while(1){if(K()|0){continue}break}}q[f+156>>2]=65536;c=a;e=c;g=s[c+156>>1]&256;if(g){la(33e3,f+156|0);d=q[f+156>>2];c=(d|0)>65536?d:65536}else{c=65536}q[e+120>>2]=c;A:{if(!(r[q[75054]+156|0]&64)){break A}if(!(K()|0)){break A}while(1){if(K()|0){continue}break}}q[f+152>>2]=65536;c=a;if(g){la(33001,f+152|0);d=q[f+152>>2];e=(d|0)>65536?d:65536}else{e=65536}q[c+124>>2]=e;B:{if(!(r[q[75054]+156|0]&64)){break B}if(!(K()|0)){break B}while(1){if(K()|0){continue}break}}c=q[a+8>>2];g=q[a+4>>2];d=c-g|0;C:{if(!d){break C}c=g-c|0;h=(c|0)>(d|0)?c:d;c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;D:{while(1){if(dj(89765,q[g+(c<<2)>>2])){c=c+1|0;if((e|0)!=(c|0)){continue}break D}break}c=q[a+140>>2];q[a+136>>2]=q[a+136>>2]|4096;q[a+140>>2]=c}if(!d){break C}c=(d|0)>-1?d:-1;c=w(h>>>2|0,(c|0)<1?c:1);d=c>>>0>1?c:1;c=0;while(1){if(dj(90083,q[g+(c<<2)>>2])){c=c+1|0;if((d|0)!=(c|0)){continue}break C}break}p[a+156>>1]=s[a+156>>1]|1;nc(34047,a+152|0)}h=q[a+8>>2];g=q[a+4>>2];d=h-g|0;E:{F:{G:{e=s[a+156>>1];if(e&256){break G}if(!d){break E}c=g-h|0;i=((c|0)>(d|0)?c:d)>>>2|0;c=(d|0)>-1?d:-1;c=w(i,(c|0)<1?c:1);i=c>>>0>1?c:1;c=0;while(1){if(!dj(90117,q[g+(c<<2)>>2])){break G}c=c+1|0;if((i|0)!=(c|0)){continue}break}break F}p[a+156>>1]=e|6}if(!d){break E}c=g-h|0;e=((c|0)>(d|0)?c:d)>>>2|0;c=(d|0)>-1?d:-1;c=w(e,(c|0)<1?c:1);d=c>>>0>1?c:1;c=0;while(1){if(dj(90138,q[g+(c<<2)>>2])){c=c+1|0;if((d|0)!=(c|0)){continue}break E}break}q[a+132>>2]=q[a+132>>2]|2}H:{if(!r[b+49|0]){break H}c=0;Pi(2,88531,89602,0);q[f+96>>2]=V(7937);Pi(2,88531,89617,f+96|0);q[f+80>>2]=V(7938);Pi(2,88531,89630,f+80|0);q[f+64>>2]=V(7936);Pi(2,88531,89642,f- -64|0);Pi(2,88531,90635,0);b=q[a+4>>2];if((b|0)!=q[a+8>>2]){while(1){q[f+48>>2]=q[(c<<2)+b>>2];Pi(2,88531,90647,f+48|0);c=c+1|0;b=q[a+4>>2];if(c>>>0>2]-b>>2>>>0){continue}break}}Pi(2,88531,90652,0);if(Mi[q[75033]](a,0)|0){q[f+32>>2]=90670;Pi(2,88531,90647,f+32|0)}if(!(Mi[q[75033]](a,1)|0)){break H}q[f+16>>2]=90709;Pi(2,88531,90647,f+16|0)}Pi(0,95335,95344,0);c=0}Ii=f+304|0;return c|0}J(88636,88575,779,88645);G()}J(88662,88575,780,88645);G()}lj(c,88645,948);J(88669,88575,948,88645);G()}J(88684,88575,995,88645);G()}J(89653,88575,1093,88645);G()}J(90427,90502,493,90558);G()}J(90570,90502,533,90594);G()}function Cs(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;d=r[b+52|0]|r[b+53|0]<<8|(r[b+54|0]<<16|r[b+55|0]<<24);d=d<<24|d<<8&16711680|(d>>>8&65280|d>>>24);e=r[b+16|0]|r[b+17|0]<<8|(r[b+18|0]<<16|r[b+19|0]<<24);B=e<<24|e<<8&16711680|(e>>>8&65280|e>>>24);e=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);l=e<<24|e<<8&16711680|(e>>>8&65280|e>>>24);e=r[b+40|0]|r[b+41|0]<<8|(r[b+42|0]<<16|r[b+43|0]<<24);t=e<<24|e<<8&16711680|(e>>>8&65280|e>>>24);e=r[b+60|0]|r[b+61|0]<<8|(r[b+62|0]<<16|r[b+63|0]<<24);i=e<<24|e<<8&16711680|(e>>>8&65280|e>>>24);e=Fza(B^l^t^i,1);f=r[b+28|0]|r[b+29|0]<<8|(r[b+30|0]<<16|r[b+31|0]<<24);ra=f<<24|f<<8&16711680|(f>>>8&65280|f>>>24);f=r[b+20|0]|r[b+21|0]<<8|(r[b+22|0]<<16|r[b+23|0]<<24);sa=f<<24|f<<8&16711680|(f>>>8&65280|f>>>24);f=Fza(e^(d^(ra^sa)),1);c=r[b+48|0]|r[b+49|0]<<8|(r[b+50|0]<<16|r[b+51|0]<<24);m=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);c=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);w=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);j=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);c=r[b+36|0]|r[b+37|0]<<8|(r[b+38|0]<<16|r[b+39|0]<<24);u=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);c=r[b+56|0]|r[b+57|0]<<8|(r[b+58|0]<<16|r[b+59|0]<<24);s=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);c=Fza(w^j^u^s,1);g=r[b+24|0]|r[b+25|0]<<8|(r[b+26|0]<<16|r[b+27|0]<<24);ta=g<<24|g<<8&16711680|(g>>>8&65280|g>>>24);C=Fza(c^(m^(B^ta)),1);D=Fza(C^(i^(u^ra)),1);E=Fza(D^(e^(m^t)),1);g=Fza(E^(f^(d^i)),1);h=r[b+44|0]|r[b+45|0]<<8|(r[b+46|0]<<16|r[b+47|0]<<24);ma=h<<24|h<<8&16711680|(h>>>8&65280|h>>>24);h=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);z=h<<24|h<<8&16711680|(h>>>8&65280|h>>>24);b=r[b+32|0]|r[b+33|0]<<8|(r[b+34|0]<<16|r[b+35|0]<<24);A=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);y=Fza(d^(z^l^A),1);b=Fza(ma^(w^sa)^y,1);F=Fza(b^(s^(A^ta)),1);G=Fza(F^(c^(u^ma)),1);H=Fza(G^(C^(m^s)),1);I=Fza(H^(D^(c^i)),1);J=Fza(I^(E^(e^C)),1);h=Fza(J^(f^D^g),1);K=Fza(f^(y^(t^A)),1);L=Fza(K^(b^(d^ma)),1);M=Fza(L^(s^y^F),1);N=Fza(M^(b^c^G),1);O=Fza(N^(C^F^H),1);P=Fza(O^(D^G^I),1);Q=Fza(P^(E^H^J),1);p=Fza(Q^(g^I^h),1);R=Fza(e^y^K^g,1);k=Fza(R^(b^f^L),1);S=Fza(E^K^R^h,1);x=Fza(S^(g^L^k),1);T=Fza(J^R^S^p,1);U=Fza(T^(h^k^x),1);V=Fza(F^K^M^k,1);W=Fza(V^(G^L^N),1);X=Fza(W^(H^M^O),1);Y=Fza(X^(I^N^P),1);Z=Fza(Y^(J^O^Q),1);_=Fza(Z^(h^P^p),1);$=Fza(_^(Q^S^T),1);aa=Fza($^(p^x^U),1);ba=Fza(M^R^V^x,1);ca=Fza(ba^(k^N^W),1);da=Fza(ca^(O^V^X),1);ea=Fza(da^(P^W^Y),1);fa=Fza(ea^(Q^X^Z),1);ga=Fza(fa^(p^Y^_),1);na=Fza(ga^(T^Z^$),1);ua=Fza(na^(U^_^aa),1);ha=Fza(S^V^ba^U,1);ia=Fza(ha^(x^W^ca),1);ja=Fza(ia^(X^ba^da),1);ka=Fza(ja^(Y^ca^ea),1);va=Fza(ka^(Z^da^fa),1);wa=Fza(va^(_^ea^ga),1);za=Fza(wa^($^fa^na),1);Aa=Fza(za^(aa^ga^ua),1);la=Fza(T^ba^ha^aa,1);xa=Fza(la^($^ha)^ua,1);oa=Fza(U^ca^ia^la,1);Ba=q[a+24>>2];pa=q[a+8>>2];n=Ba+(Fza(pa,5)+z|0)|0;qa=q[a+20>>2];ya=q[a+12>>2];z=q[a+16>>2];v=(n+(qa^ya&(z^qa))|0)+1518500249|0;n=Fza(v,30);o=j+qa|0;j=Fza(ya,30);o=((o+(z^(j^z)&pa)|0)+Fza(v,5)|0)+1518500249|0;Ca=l+z|0;l=Fza(pa,30);v=((Ca+(j^v&(l^j))|0)+Fza(o,5)|0)+1518500249|0;w=(Fza(v,5)+((j+w|0)+(l^o&(n^l))|0)|0)+1518500249|0;j=Fza(v,30);o=Fza(o,30);l=(((l+B|0)+(n^v&(o^n))|0)+Fza(w,5)|0)+1518500249|0;B=(Fza(l,5)+((n+sa|0)+(o^(j^o)&w)|0)|0)+1518500249|0;n=Fza(B,30);v=o+ta|0;o=Fza(w,30);v=((v+(j^l&(o^j))|0)+Fza(B,5)|0)+1518500249|0;l=Fza(l,30);w=(((j+ra|0)+(o^B&(l^o))|0)+Fza(v,5)|0)+1518500249|0;A=(Fza(w,5)+((o+A|0)+(l^v&(n^l))|0)|0)+1518500249|0;j=Fza(w,30);l=l+u|0;u=Fza(v,30);o=((l+(n^w&(u^n))|0)+Fza(A,5)|0)+1518500249|0;l=(Fza(o,5)+((n+t|0)+(u^A&(j^u))|0)|0)+1518500249|0;n=Fza(l,30);t=Fza(A,30);u=(((u+ma|0)+(j^o&(t^j))|0)+Fza(l,5)|0)+1518500249|0;j=j+m|0;m=Fza(o,30);j=((j+(t^l&(m^t))|0)+Fza(u,5)|0)+1518500249|0;t=(Fza(j,5)+((d+t|0)+(m^u&(n^m))|0)|0)+1518500249|0;d=Fza(j,30);m=m+s|0;s=Fza(u,30);j=((m+(n^j&(s^n))|0)+Fza(t,5)|0)+1518500249|0;n=(Fza(j,5)+((i+n|0)+(s^t&(d^s))|0)|0)+1518500249|0;i=Fza(n,30);m=Fza(j,30);l=s+y|0;s=Fza(t,30);y=((l+(d^j&(s^d))|0)+Fza(n,5)|0)+1518500249|0;c=(Fza(y,5)+((c+d|0)+(s^n&(m^s))|0)|0)+1518500249|0;d=Fza(c,30);n=Fza(y,30);b=(b+m|0)+(i^c&(n^i))|0;m=(Fza(c,5)+((e+s|0)+(m^y&(i^m))|0)|0)+1518500249|0;b=(b+Fza(m,5)|0)+1518500249|0;i=(Fza(b,5)+((i+C|0)+(m^(d^n))|0)|0)+1859775393|0;e=Fza(i,30);c=Fza(b,30);j=f+n|0;f=Fza(m,30);b=((j+(b^(f^d))|0)+Fza(i,5)|0)+1859775393|0;i=(Fza(b,5)+((d+F|0)+(i^(c^f))|0)|0)+1859775393|0;d=Fza(i,30);m=Fza(b,30);j=(c+K|0)+(i^(m^e))|0;c=(Fza(i,5)+((f+D|0)+(b^(c^e))|0)|0)+1859775393|0;b=(j+Fza(c,5)|0)+1859775393|0;i=(Fza(b,5)+((e+G|0)+(c^(d^m))|0)|0)+1859775393|0;e=Fza(i,30);f=Fza(b,30);c=Fza(c,30);b=(((m+E|0)+(b^(c^d))|0)+Fza(i,5)|0)+1859775393|0;i=(Fza(b,5)+((d+L|0)+(i^(c^f))|0)|0)+1859775393|0;d=Fza(i,30);j=f+g|0;g=Fza(b,30);c=(Fza(i,5)+((c+H|0)+(b^(e^f))|0)|0)+1859775393|0;b=((j+(i^(g^e))|0)+Fza(c,5)|0)+1859775393|0;i=(Fza(b,5)+((e+M|0)+(c^(d^g))|0)|0)+1859775393|0;e=Fza(i,30);f=Fza(b,30);c=Fza(c,30);b=(((g+I|0)+(b^(c^d))|0)+Fza(i,5)|0)+1859775393|0;g=(Fza(b,5)+((d+R|0)+(i^(c^f))|0)|0)+1859775393|0;d=Fza(g,30);i=Fza(b,30);c=(Fza(g,5)+((c+N|0)+(b^(e^f))|0)|0)+1859775393|0;b=(((f+J|0)+(g^(i^e))|0)+Fza(c,5)|0)+1859775393|0;g=(Fza(b,5)+((e+k|0)+(c^(d^i))|0)|0)+1859775393|0;f=Fza(g,30);k=Fza(c,30);e=(((i+O|0)+(b^(k^d))|0)+Fza(g,5)|0)+1859775393|0;c=d+h|0;h=Fza(b,30);c=((c+(g^(h^k))|0)+Fza(e,5)|0)+1859775393|0;b=(Fza(c,5)+((k+V|0)+(e^(f^h))|0)|0)+1859775393|0;d=Fza(c,30);k=h+P|0;h=Fza(e,30);e=((k+(c^(h^f))|0)+Fza(b,5)|0)+1859775393|0;c=(Fza(e,5)+((f+S|0)+(h&(b|d)|b&d)|0)|0)-1894007588|0;f=Fza(c,30);b=Fza(b,30);g=Fza(e,30);k=(d+Q|0)+(b&(g|c)|c&g)|0;c=(Fza(c,5)+((h+W|0)+(d&(b|e)|b&e)|0)|0)-1894007588|0;d=(k+Fza(c,5)|0)-1894007588|0;b=(Fza(d,5)+((b+x|0)+(g&(c|f)|c&f)|0)|0)-1894007588|0;e=Fza(d,30);c=Fza(c,30);d=(((g+X|0)+(f&(c|d)|c&d)|0)+Fza(b,5)|0)-1894007588|0;g=(Fza(d,5)+((f+p|0)+(c&(b|e)|b&e)|0)|0)-1894007588|0;f=Fza(g,30);b=Fza(b,30);h=Fza(d,30);c=(Fza(g,5)+((c+ba|0)+(e&(b|d)|b&d)|0)|0)-1894007588|0;d=(((e+Y|0)+(b&(h|g)|g&h)|0)+Fza(c,5)|0)-1894007588|0;b=(Fza(d,5)+((b+T|0)+(h&(c|f)|c&f)|0)|0)-1894007588|0;e=Fza(d,30);c=Fza(c,30);d=(((h+ca|0)+(f&(c|d)|c&d)|0)+Fza(b,5)|0)-1894007588|0;g=(Fza(d,5)+((f+Z|0)+(c&(b|e)|b&e)|0)|0)-1894007588|0;f=Fza(g,30);b=Fza(b,30);h=Fza(d,30);c=(Fza(g,5)+((c+U|0)+(e&(b|d)|b&d)|0)|0)-1894007588|0;d=(((e+da|0)+(b&(h|g)|g&h)|0)+Fza(c,5)|0)-1894007588|0;b=(Fza(d,5)+((b+_|0)+(h&(c|f)|c&f)|0)|0)-1894007588|0;e=Fza(d,30);c=Fza(c,30);d=(((h+ha|0)+(f&(c|d)|c&d)|0)+Fza(b,5)|0)-1894007588|0;g=(Fza(d,5)+((f+ea|0)+(c&(b|e)|b&e)|0)|0)-1894007588|0;f=Fza(g,30);b=Fza(b,30);h=Fza(d,30);d=(Fza(g,5)+((c+$|0)+(e&(b|d)|b&d)|0)|0)-1894007588|0;e=(((e+ia|0)+(b&(h|g)|g&h)|0)+Fza(d,5)|0)-1894007588|0;c=Fza(e,30);g=Fza(d,30);k=(h+aa|0)+(f&(g|e)|e&g)|0;h=(Fza(e,5)+((b+fa|0)+(h&(d|f)|d&f)|0)|0)-1894007588|0;b=(k+Fza(h,5)|0)-1894007588|0;f=(Fza(b,5)+((f+ja|0)+(h^(c^g))|0)|0)-899497514|0;d=Fza(f,30);e=Fza(b,30);k=g+ga|0;g=Fza(h,30);b=((k+(b^(g^c))|0)+Fza(f,5)|0)-899497514|0;c=(Fza(b,5)+((c+la|0)+(f^(e^g))|0)|0)-899497514|0;f=Fza(c,30);h=Fza(b,30);k=(e+na|0)+(c^(h^d))|0;c=(Fza(c,5)+((g+ka|0)+(b^(d^e))|0)|0)-899497514|0;b=(k+Fza(c,5)|0)-899497514|0;g=(Fza(b,5)+((d+oa|0)+(c^(f^h))|0)|0)-899497514|0;d=Fza(g,30);e=Fza(b,30);c=Fza(c,30);b=(((h+va|0)+(b^(c^f))|0)+Fza(g,5)|0)-899497514|0;g=(Fza(b,5)+((f+ua|0)+(g^(c^e))|0)|0)-899497514|0;f=Fza(g,30);h=Fza(b,30);p=(e+wa|0)+(g^(h^d))|0;k=c;c=Fza(da^ha^ja^oa,1);e=(((k+c|0)+(b^(d^e))|0)+Fza(g,5)|0)-899497514|0;b=(p+Fza(e,5)|0)-899497514|0;d=(Fza(b,5)+((d+xa|0)+(e^(f^h))|0)|0)-899497514|0;g=Fza(d,30);p=Fza(b,30);e=Fza(e,30);k=h;h=Fza(c^(ea^ia^ka),1);b=(((k+h|0)+(b^(e^f))|0)+Fza(d,5)|0)-899497514|0;d=(((f+za|0)+(d^(p^e))|0)+Fza(b,5)|0)-899497514|0;f=Fza(d,30);k=Fza(b,30);x=Fza(aa^ia^oa^xa,1);b=(((x+e|0)+(b^(g^p))|0)+Fza(d,5)|0)-899497514|0;i=p;p=Fza(h^(fa^ja^va),1);d=(((i+p|0)+(d^(g^k))|0)+Fza(b,5)|0)-899497514|0;e=(((g+Aa|0)+(f^k^b)|0)+Fza(d,5)|0)-899497514|0;g=Fza(e,30);q[a+24>>2]=g+Ba;i=k;k=Fza(x^(c^(ja^la)),1);b=Fza(b,30);c=(((i+k|0)+(d^(b^f))|0)+Fza(e,5)|0)-899497514|0;x=Fza(c,30);q[a+20>>2]=x+qa;p=Fza(p^(ga^ka^wa),1)+f|0;d=Fza(d,30);e=((p+(e^(d^b))|0)+Fza(c,5)|0)-899497514|0;q[a+16>>2]=Fza(e,30)+z;b=(((Fza(la^na^xa^Aa,1)+b|0)+(c^(d^g))|0)+Fza(e,5)|0)-899497514|0;q[a+12>>2]=b+ya;q[a+8>>2]=(((d+(Fza(k^(h^(ka^oa)),1)+pa|0)|0)+(e^(g^x))|0)+Fza(b,5)|0)-899497514;return 0}function Ur(a,b,c,d,e,f,g,h,i,j,k,l,m,n,u){var v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;v=Ii-80|0;Ii=v;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{if(r[300417]){P=g-21>>>0<9;M=P|!n;F=a+176|0;A=n?n:l;n:{if(n|P){break n}M=0;A=c;if((g|0)!=15){break n}A=l+7>>>3|0}Q=w(c,d);o:{if(!i){break o}l=0;if(k>>>0>15){break a}R=((w(j,192)+F|0)+w(k,12)|0)+24|0;if(t[R+4>>2]>=Q>>>0){break o}Tt(R,Q)}C=v+56|0;q[C>>2]=0;q[C+4>>2]=0;q[C+16>>2]=0;q[C+20>>2]=0;q[C+8>>2]=0;q[C+12>>2]=0;if(!Zw(C,e,f)){break b}f=q[a+172>>2];K=v+40|0;e=K;q[e+8>>2]=0;q[e>>2]=0;q[e+4>>2]=0;Tt(e,f);q[e+12>>2]=f>>>1;q[v+32>>2]=0;q[v+36>>2]=0;o[v+35|0]=r[v+35|0]&254;o[v+35|0]=r[v+35|0]&253|2;p:{if((g&-2)!=6){break p}V=Yi(w(Q,12));if(V){break p}break c}if(t[F+4>>2]>>0){ON(F,c);ON(F+12|0,c)}e=q[a>>2];e=e?e:a;N=e+4|0;if(!q[N+4>>2]){break c}H=e+16|0;if(!q[H+4>>2]){break c}e=q[H+4>>2];if(d){$=u?u:M?m:u;aa=e+q[a+172>>2]|0;S=A<<2;T=A<<1;ba=a+136|0;ca=a+100|0;da=a- -64|0;ea=a+28|0;X=F+12|0;m=v+16|12;P=v+16|14;fa=(g|0)==24;u=0;M=0;j=0;while(1){if(c){Y=w(A,E);Z=w(c,E);e=E<<2;B=$-e|0;I=w(e,A);W=E&1;ga=w(W,12)+F|0;_=w(W^1,12)+F|0;k=0;while(1){q:{if(k&1){break q}if(!W){r:{if(O){O=O-1|0}else{O=0;u=kn(C,ea);if((u|0)!=256){break r}O=VN(C,4)+2|0}u=M}o[El(X,k)+2|0]=u>>>4;M=u;break q}u=r[El(X,k)+2|0]}s:{t:{u:{v:{w:{e=u&3;switch(e|0){case 2:break u;case 1:break v;case 0:break w;default:break t}}n=0;if(k){break s}break e}if(!E){break e}j=s[El(_,k)>>1];n=0;break s}if(i){f=q[El(R,k+Z|0)>>2];j=f&65535;n=f>>>16|0;break s}if(!E|!k){break e}j=s[El(_,k-1|0)>>1];n=0;break s}n=0;j=kn(C,da)+j|0;if(j>>>0>2]){break s}j=j-q[N+4>>2]|0}p[El(ga,k)>>1]=j;x:{if((e|0)==2&i){break x}y:{if(U){U=U-1|0}else{U=0;n=kn(C,ca);if((aa|0)!=(n|0)){break y}n=kn(C,ba);if((n|0)==63){n=VN(C,7)}if(n+3>>>0>Q>>>0){break e}U=n+2|0}n=q[H+4>>2]}e=q[a+172>>2];if(q[H+4>>2]<=(n|0)){if(!e){break m}e=n-q[H+4>>2]|0;if((e|0)>=q[K+4>>2]){break e}n=q[El(K,e)>>2];if(!e){break x}jxa(K,e);break x}if(!e){break x}kxa(K,n)}if(t[N+4>>2]<=j>>>0|t[H+4>>2]<=n>>>0){break e}if(i){q[El(R,k+Z|0)>>2]=n<<16|j}e=awa(N,j);D=_va(H,n);z:{A:{switch(g|0){case 2:J(96993,96899,8162,96945);G();case 4:J(96993,96899,8172,96945);G();case 6:J(96993,96899,8207,96945);G();case 7:J(96993,96899,8258,96945);G();case 8:case 9:J(96993,96899,8270,96945);G();case 10:J(96993,96899,8280,96945);G();case 11:J(96993,96899,8290,96945);G();case 12:J(96993,96899,8300,96945);G();case 13:J(96993,96899,8310,96945);G();case 15:J(96993,96899,8325,96945);G();case 20:e=w(k+Y|0,h)+b|0;p[e+2>>1]=n;p[e>>1]=j;break z;case 23:if((h|0)!=4){break l}n=k<<2;f=A-n|0;l=(f|0)>4?4:f;f=(B|0)>4?4:B;Swa(v+16|0,e,r[e+4|0]);x=(n+I<<2)+b|0;if((l|0)!=4){if(!f){break z}e=0;if(!l){break z}while(1){z=r[e+D|0];n=0;while(1){o[(n<<2|3)+x|0]=q[(v+16|(z>>>(n<<1)&3)<<2)>>2];n=n+1|0;if((l|0)!=(n|0)){continue}break}x=x+S|0;e=e+1|0;if((f|0)!=(e|0)){continue}break}break z}l=0;if(!f){break z}while(1){e=r[l+D|0];o[x+3|0]=q[(v+16|(e&3)<<2)>>2];o[x+7|0]=q[(v+16|e&12)>>2];o[x+11|0]=q[(v+16|e>>>2&12)>>2];o[x+15|0]=q[(v+16|e>>>4&12)>>2];x=x+S|0;l=l+1|0;if((f|0)!=(l|0)){continue}break}break z;case 21:if((h|0)!=4){break k}Tr(v+16|0,e,r[e+4|0]);z=(B|0)>4?4:B;if(!z){break z}e=k<<2;f=A-e|0;y=(f|0)>4?4:f;if(!y){break z}x=(e+I<<2)+b|0;e=0;while(1){L=r[e+D|0];n=0;while(1){f=n<<2;l=v+16|(L>>>(n<<1)&3)<<2;o[f+x|0]=r[l|0];o[(f|1)+x|0]=r[l+1|0];o[(f|2)+x|0]=r[l+2|0];n=n+1|0;if((y|0)!=(n|0)){continue}break}x=x+S|0;e=e+1|0;if((z|0)!=(e|0)){continue}break}break z;case 22:if((h|0)!=4){break j}Tr(v+16|0,e,r[e+4|0]);z=(B|0)>4?4:B;if(!z){break z}e=k<<2;f=A-e|0;y=(f|0)>4?4:f;if(!y){break z}n=(e+I<<2)+b|0;e=0;while(1){L=r[e+D|0];x=0;while(1){f=x<<2;l=v+16|(L>>>(x<<1)&3)<<2;o[f+n|0]=r[l|0];o[(f|1)+n|0]=r[l+1|0];o[(f|2)+n|0]=r[l+2|0];o[(f|3)+n|0]=255;x=x+1|0;if((y|0)!=(x|0)){continue}break}n=n+S|0;e=e+1|0;if((z|0)!=(e|0)){continue}break}break z;case 24:case 25:if((h|0)!=2){break i}x=(B|0)>4?4:B;Tr(v+16|0,e,r[e+4|0]);f=v;B:{if(!fa){e=w(r[v+17|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+18|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+16|0],31)+128|0;p[v+8>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+21|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+22|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+20|0],31)+128|0;p[v+10>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+25|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+26|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+24|0],31)+128|0;p[v+12>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+29|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+30|0],31)+128|0;n=l|(e>>>8|0)+e>>>8<<11;e=m;break B}e=w(r[v+17|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+16|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+18|0],31)+128|0;p[v+8>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+21|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+20|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+22|0],31)+128|0;p[v+10>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+25|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+24|0],31)+128|0;l=l|(e>>>8|0)+e>>>8<<11;e=w(r[v+26|0],31)+128|0;p[v+12>>1]=l|(e>>>8|0)+e>>>8;e=w(r[v+29|0],63)+128|0;l=(e>>>8|0)+e>>>8<<5;e=w(r[v+28|0],31)+128|0;n=l|(e>>>8|0)+e>>>8<<11;e=P}e=w(r[e|0],31)+128|0;p[f+14>>1]=(e>>>8|0)+e>>>8|n;if(!x){break z}e=k<<2;f=A-e|0;z=(f|0)>4?4:f;if(!z){break z}l=(e+I<<1)+b|0;f=0;while(1){e=r[f+D|0];n=0;while(1){y=n<<1;p[y+l>>1]=s[(v+8|0)+((e>>>y&3)<<1)>>1];n=n+1|0;if((z|0)!=(n|0)){continue}break}l=l+T|0;f=f+1|0;if((x|0)!=(f|0)){continue}break}break z;case 26:if((h|0)!=2){break h}Tr(v+16|0,e,r[e+4|0]);e=w(r[v+17|0],15)+128|0;f=(e>>>8|0)+e>>>8<<8;e=w(r[v+16|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<12;e=w(r[v+18|0],15)+128|0;p[v+8>>1]=f|(e>>>8|0)+e>>>8<<4;e=w(r[v+21|0],15)+128|0;f=(e>>>8|0)+e>>>8<<8;e=w(r[v+20|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<12;e=w(r[v+22|0],15)+128|0;p[v+10>>1]=f|(e>>>8|0)+e>>>8<<4;e=w(r[v+25|0],15)+128|0;f=(e>>>8|0)+e>>>8<<8;e=w(r[v+24|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<12;e=w(r[v+26|0],15)+128|0;p[v+12>>1]=f|(e>>>8|0)+e>>>8<<4;e=w(r[v+29|0],15)+128|0;f=(e>>>8|0)+e>>>8<<8;e=w(r[v+28|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<12;e=w(r[v+30|0],15)+128|0;p[v+14>>1]=f|(e>>>8|0)+e>>>8<<4;l=(B|0)>4?4:B;if(!l){break z}e=k<<2;f=A-e|0;x=(f|0)>4?4:f;if(!x){break z}f=(e+I<<1)+b|0;e=0;while(1){z=r[e+D|0];n=0;while(1){y=n<<1;L=y+f|0;p[L>>1]=s[(v+8|0)+((z>>>y&3)<<1)>>1]|s[L>>1]&15;n=n+1|0;if((x|0)!=(n|0)){continue}break}f=f+T|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}break z;case 28:if((h|0)!=2){break g}Tr(v+16|0,e,r[e+4|0]);e=w(r[v+16|0],15)+128|0;f=(e>>>8|0)+e>>>8<<12;e=w(r[v+17|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<8;e=w(r[v+18|0],15)+128|0;p[v+8>>1]=f|(e>>>8|0)+e>>>8<<4|15;e=w(r[v+20|0],15)+128|0;f=(e>>>8|0)+e>>>8<<12;e=w(r[v+21|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<8;e=w(r[v+22|0],15)+128|0;p[v+10>>1]=f|(e>>>8|0)+e>>>8<<4|15;e=w(r[v+24|0],15)+128|0;f=(e>>>8|0)+e>>>8<<12;e=w(r[v+25|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<8;e=w(r[v+26|0],15)+128|0;p[v+12>>1]=f|(e>>>8|0)+e>>>8<<4|15;e=w(r[v+28|0],15)+128|0;f=(e>>>8|0)+e>>>8<<12;e=w(r[v+29|0],15)+128|0;f=f|(e>>>8|0)+e>>>8<<8;e=w(r[v+30|0],15)+128|0;p[v+14>>1]=f|(e>>>8|0)+e>>>8<<4|15;e=(B|0)>4?4:B;if(!e){break z}f=k<<2;l=A-f|0;x=(l|0)>4?4:l;if(!x){break z}l=(f+I<<1)+b|0;f=0;while(1){z=r[f+D|0];n=0;while(1){y=n<<1;p[y+l>>1]=s[(v+8|0)+((z>>>y&3)<<1)>>1];n=n+1|0;if((x|0)!=(n|0)){continue}break}l=l+T|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}break z;case 27:if((h|0)!=2){break f}Tr(v+16|0,e,r[e+4|0]);e=w(r[v+17|0],15)+128|0;p[v+8>>1]=(e>>>8|0)+e>>>8;e=w(r[v+21|0],15)+128|0;p[v+10>>1]=(e>>>8|0)+e>>>8;e=w(r[v+25|0],15)+128|0;p[v+12>>1]=(e>>>8|0)+e>>>8;e=w(r[v+29|0],15)+128|0;p[v+14>>1]=(e>>>8|0)+e>>>8;e=(B|0)>4?4:B;if(!e){break z}f=k<<2;l=A-f|0;x=(l|0)>4?4:l;if(!x){break z}l=(f+I<<1)+b|0;f=0;while(1){z=r[f+D|0];n=0;while(1){y=n<<1;p[y+l>>1]=s[(v+8|0)+((z>>>y&3)<<1)>>1];n=n+1|0;if((x|0)!=(n|0)){continue}break}l=l+T|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}break z;case 18:J(96993,96899,8608,96945);G();default:J(96993,96899,8614,96945);G();case 16:case 17:break z;case 0:break A}}Nwa(v+32|0,Owa(r[e|0],r[e+1|0],r[e+2|0]));UN(v+32|0,0,r[e+4|0]);UN(v+32|0,1,r[e+4|0]);e=w(k+Y|0,h)+b|0;q[e>>2]=q[v+32>>2];f=r[D+4|0];l=r[D+5|0];n=r[D+6|0];o[e+7|0]=r[D+7|0];o[e+6|0]=n;o[e+5|0]=l;o[e+4|0]=f}u=u>>>2|0;k=k+1|0;if((k|0)!=(c|0)){continue}break}}E=E+1|0;if((E|0)!=(d|0)){continue}break}x=0;if(O){break c}}x=1;break d}J(96874,96899,7830,96945);G()}J(96961,96899,8082,96945);G()}J(96995,96899,8357,96945);G()}J(96995,96899,8397,96945);G()}J(96995,96899,8426,96945);G()}J(97053,96899,8457,96945);G()}J(97053,96899,8500,96945);G()}J(97053,96899,8540,96945);G()}J(97053,96899,8571,96945);G()}x=0}if(!V){break c}Ni(V)}zq(K)}l=x}Ii=v+80|0;return l}function Sua(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;h=Ii-8976|0;Ii=h;z=d+e|0;F=0-z|0;a:{b:{while(1){c:{if((c|0)!=48){if((c|0)!=46){break a}c=q[b+4>>2];if(c>>>0>=t[b+104>>2]){break c}q[b+4>>2]=c+1;c=r[c|0];break b}c=q[b+4>>2];if(c>>>0>2]){j=1;q[b+4>>2]=c+1;c=r[c|0]}else{j=1;c=Fk(b)}continue}break}c=Fk(b)}k=1;if((c|0)!=48){break a}while(1){n=l;l=l-1|0;m=m-(n>>>0<1)|0;c=q[b+4>>2];d:{if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break d}c=Fk(b)}if((c|0)==48){continue}break}j=1}q[h+784>>2]=0;e:{f:{p=(c|0)==46;n=c-48|0;g:{h:{i:{j:{if(p|n>>>0<=9){while(1){k:{if(p&1){if(!k){l=o;m=i;k=1;break k}j=!j;break j}o=o+1|0;i=o>>>0<1?i+1|0:i;if((u|0)<=2044){y=(c|0)==48?y:o;j=(h+784|0)+(u<<2)|0;p=j;if(s){n=(w(q[j>>2],10)+c|0)-48|0}q[p>>2]=n;j=1;n=s+1|0;c=(n|0)==9;s=c?0:n;u=c+u|0;break k}if((c|0)==48){break k}q[h+8960>>2]=q[h+8960>>2]|1;y=18396}c=q[b+4>>2];l:{if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break l}c=Fk(b)}p=(c|0)==46;n=c-48|0;if(p|n>>>0<10){continue}break}}l=k?l:o;m=k?m:i;if(!(!j|(c&-33)!=69)){k=LD(b,g);c=Li;p=c;m:{if(k|(c|0)!=-2147483648){break m}if(!g){break g}k=0;p=0;if(!q[b+104>>2]){break m}q[b+4>>2]=q[b+4>>2]-1}if(!j){break h}m=m+p|0;b=k+l|0;m=b>>>0>>0?m+1|0:m;l=b;break f}j=!j;if((c|0)<0){break i}}if(!q[b+104>>2]){break i}q[b+4>>2]=q[b+4>>2]-1}if(!j){break f}}q[240513]=28}o=0;i=0;Cn(b,0,0);c=0;b=0;break e}b=q[h+784>>2];if(!b){yo(h,+(f|0)*0);o=q[h>>2];i=q[h+4>>2];c=q[h+12>>2];b=q[h+8>>2];break e}if(!((l|0)!=(o|0)|(i|0)!=(m|0)|((i|0)>0?1:(i|0)>=0?o>>>0>9:0)|(b>>>d|0?(d|0)<=30:0))){$m(h+48|0,f);Yr(h+32|0,b);Qk(h+16|0,q[h+48>>2],q[h+52>>2],q[h+56>>2],q[h+60>>2],q[h+32>>2],q[h+36>>2],q[h+40>>2],q[h+44>>2]);o=q[h+16>>2];i=q[h+20>>2];c=q[h+28>>2];b=q[h+24>>2];break e}if((m|0)>0?1:(m|0)>=0?l>>>0>(e|0)/-2>>>0:0){q[240513]=68;$m(h+96|0,f);Qk(h+80|0,q[h+96>>2],q[h+100>>2],q[h+104>>2],q[h+108>>2],-1,-1,-1,2147418111);Qk(h- -64|0,q[h+80>>2],q[h+84>>2],q[h+88>>2],q[h+92>>2],-1,-1,-1,2147418111);o=q[h+64>>2];i=q[h+68>>2];c=q[h+76>>2];b=q[h+72>>2];break e}b=e-226|0;c=l>>>0>>0;b=b>>31;if((b|0)>(m|0)?1:(m|0)<=(b|0)?c:0){q[240513]=68;$m(h+144|0,f);Qk(h+128|0,q[h+144>>2],q[h+148>>2],q[h+152>>2],q[h+156>>2],0,0,0,65536);Qk(h+112|0,q[h+128>>2],q[h+132>>2],q[h+136>>2],q[h+140>>2],0,0,0,65536);o=q[h+112>>2];i=q[h+116>>2];c=q[h+124>>2];b=q[h+120>>2];break e}if(s){if((s|0)<=8){c=(h+784|0)+(u<<2)|0;b=q[c>>2];while(1){b=w(b,10);s=s+1|0;if((s|0)!=9){continue}break}q[c>>2]=b}u=u+1|0}n:{k=l;if((y|0)>(k|0)|(y|0)>=9|(k|0)>17){break n}if((k|0)==9){$m(h+192|0,f);Yr(h+176|0,q[h+784>>2]);Qk(h+160|0,q[h+192>>2],q[h+196>>2],q[h+200>>2],q[h+204>>2],q[h+176>>2],q[h+180>>2],q[h+184>>2],q[h+188>>2]);o=q[h+160>>2];i=q[h+164>>2];c=q[h+172>>2];b=q[h+168>>2];break e}if((k|0)<=8){$m(h+272|0,f);Yr(h+256|0,q[h+784>>2]);Qk(h+240|0,q[h+272>>2],q[h+276>>2],q[h+280>>2],q[h+284>>2],q[h+256>>2],q[h+260>>2],q[h+264>>2],q[h+268>>2]);$m(h+224|0,q[(0-k<<2)+220944>>2]);uO(h+208|0,q[h+240>>2],q[h+244>>2],q[h+248>>2],q[h+252>>2],q[h+224>>2],q[h+228>>2],q[h+232>>2],q[h+236>>2]);o=q[h+208>>2];i=q[h+212>>2];c=q[h+220>>2];b=q[h+216>>2];break e}b=(w(k,-3)+d|0)+27|0;c=q[h+784>>2];if(c>>>b|0?(b|0)<=30:0){break n}$m(h+352|0,f);Yr(h+336|0,c);Qk(h+320|0,q[h+352>>2],q[h+356>>2],q[h+360>>2],q[h+364>>2],q[h+336>>2],q[h+340>>2],q[h+344>>2],q[h+348>>2]);$m(h+304|0,q[(k<<2)+220872>>2]);Qk(h+288|0,q[h+320>>2],q[h+324>>2],q[h+328>>2],q[h+332>>2],q[h+304>>2],q[h+308>>2],q[h+312>>2],q[h+316>>2]);o=q[h+288>>2];i=q[h+292>>2];c=q[h+300>>2];b=q[h+296>>2];break e}while(1){c=u;u=c-1|0;if(!q[(h+784|0)+(u<<2)>>2]){continue}break}s=0;b=(k|0)%9|0;o:{if(!b){j=0;break o}g=(k|0)>-1?b:b+9|0;p:{if(!c){j=0;c=0;break p}l=q[(0-g<<2)+220944>>2];m=1e9/(l|0)|0;p=0;b=0;j=0;while(1){n=p;i=(h+784|0)+(b<<2)|0;o=q[i>>2];p=(o>>>0)/(l>>>0)|0;n=n+p|0;q[i>>2]=n;n=!n&(b|0)==(j|0);j=n?j+1&2047:j;k=n?k-9|0:k;p=w(m,o-w(l,p)|0);b=b+1|0;if((c|0)!=(b|0)){continue}break}if(!p){break p}q[(h+784|0)+(c<<2)>>2]=p;c=c+1|0}k=(k-g|0)+9|0}while(1){o=(h+784|0)+(j<<2)|0;q:{while(1){if((k|0)!=36|t[o>>2]>=10384593?(k|0)>=36:0){break q}u=c+2047|0;p=0;n=c;while(1){c=n;i=u&2047;n=(h+784|0)+(i<<2)|0;b=q[n>>2];m=b>>>3|0;g=b<<29;b=g+p|0;m=b>>>0>>0?m+1|0:m;l=b;g=0;r:{if(!m&b>>>0<1000000001){break r}g=Bza(b,m,1e9);l=l-Aza(g,Li,1e9,0)|0}p=g;q[n>>2]=l;n=(i|0)!=(c-1&2047)?c:(i|0)==(j|0)?c:l?c:i;u=i-1|0;if((i|0)!=(j|0)){continue}break}s=s-29|0;if(!p){continue}break}j=j-1&2047;if((n|0)==(j|0)){b=(h+784|0)+((n+2046&2047)<<2)|0;c=n-1&2047;q[b>>2]=q[b>>2]|q[(h+784|0)+(c<<2)>>2]}k=k+9|0;q[(h+784|0)+(j<<2)>>2]=p;continue}break}s:{t:while(1){g=c+1&2047;m=(h+784|0)+((c-1&2047)<<2)|0;while(1){l=(k|0)>45?9:1;u:{while(1){n=j;b=0;v:{while(1){w:{j=b+n&2047;if((j|0)==(c|0)){break w}j=q[(h+784|0)+(j<<2)>>2];i=q[(b<<2)+220896>>2];if(j>>>0>>0){break w}if(i>>>0>>0){break v}b=b+1|0;if((b|0)!=4){continue}}break}if((k|0)!=36){break v}l=0;m=0;b=0;o=0;i=0;while(1){g=b+n&2047;if((g|0)==(c|0)){c=c+1&2047;q[((c<<2)+h|0)+780>>2]=0}Qk(h+768|0,l,m,o,i,0,0,1342177280,1075633366);Yr(h+752|0,q[(h+784|0)+(g<<2)>>2]);Um(h+736|0,q[h+768>>2],q[h+772>>2],q[h+776>>2],q[h+780>>2],q[h+752>>2],q[h+756>>2],q[h+760>>2],q[h+764>>2]);o=q[h+744>>2];i=q[h+748>>2];l=q[h+736>>2];m=q[h+740>>2];b=b+1|0;if((b|0)!=4){continue}break}$m(h+720|0,f);Qk(h+704|0,l,m,o,i,q[h+720>>2],q[h+724>>2],q[h+728>>2],q[h+732>>2]);o=q[h+712>>2];i=q[h+716>>2];l=0;m=0;k=q[h+704>>2];p=q[h+708>>2];j=s+113|0;e=j-e|0;g=(e|0)<(d|0);d=g?(e|0)>0?e:0:d;if((d|0)<=112){break u}break s}s=l+s|0;j=c;if((c|0)==(n|0)){continue}break}i=1e9>>>l|0;o=-1<>2];b=(u>>>l|0)+b|0;q[p>>2]=b;b=!b&(j|0)==(n|0);j=b?j+1&2047:j;k=b?k-9|0:k;b=w(i,o&u);n=n+1&2047;if((n|0)!=(c|0)){continue}break}if(!b){continue}if((g|0)!=(j|0)){q[(h+784|0)+(c<<2)>>2]=b;c=g;continue t}q[m>>2]=q[m>>2]|1;j=g;continue}break}break}yo(h+656|0,Zn(1,225-d|0));rN(h+688|0,q[h+656>>2],q[h+660>>2],q[h+664>>2],q[h+668>>2],k,p,o,i);A=q[h+696>>2];B=q[h+700>>2];C=q[h+688>>2];D=q[h+692>>2];yo(h+640|0,Zn(1,113-d|0));VF(h+672|0,k,p,o,i,q[h+640>>2],q[h+644>>2],q[h+648>>2],q[h+652>>2]);l=q[h+672>>2];m=q[h+676>>2];v=q[h+680>>2];x=q[h+684>>2];oC(h+624|0,k,p,o,i,l,m,v,x);Um(h+608|0,C,D,A,B,q[h+624>>2],q[h+628>>2],q[h+632>>2],q[h+636>>2]);o=q[h+616>>2];i=q[h+620>>2];k=q[h+608>>2];p=q[h+612>>2]}b=n+4&2047;x:{if((b|0)==(c|0)){break x}b=q[(h+784|0)+(b<<2)>>2];y:{if(b>>>0<=499999999){if((n+5&2047)==(c|0)?!b:0){break y}yo(h+496|0,+(f|0)*.25);Um(h+480|0,l,m,v,x,q[h+496>>2],q[h+500>>2],q[h+504>>2],q[h+508>>2]);v=q[h+488>>2];x=q[h+492>>2];l=q[h+480>>2];m=q[h+484>>2];break y}if((b|0)!=5e8){yo(h+592|0,+(f|0)*.75);Um(h+576|0,l,m,v,x,q[h+592>>2],q[h+596>>2],q[h+600>>2],q[h+604>>2]);v=q[h+584>>2];x=q[h+588>>2];l=q[h+576>>2];m=q[h+580>>2];break y}E=+(f|0);if((n+5&2047)==(c|0)){yo(h+528|0,E*.5);Um(h+512|0,l,m,v,x,q[h+528>>2],q[h+532>>2],q[h+536>>2],q[h+540>>2]);v=q[h+520>>2];x=q[h+524>>2];l=q[h+512>>2];m=q[h+516>>2];break y}yo(h+560|0,E*.75);Um(h+544|0,l,m,v,x,q[h+560>>2],q[h+564>>2],q[h+568>>2],q[h+572>>2]);v=q[h+552>>2];x=q[h+556>>2];l=q[h+544>>2];m=q[h+548>>2]}if((d|0)>111){break x}VF(h+464|0,l,m,v,x,0,0,0,1073676288);if(Eq(q[h+464>>2],q[h+468>>2],q[h+472>>2],q[h+476>>2],0,0,0,0)){break x}Um(h+448|0,l,m,v,x,0,0,0,1073676288);v=q[h+456>>2];x=q[h+460>>2];l=q[h+448>>2];m=q[h+452>>2]}Um(h+432|0,k,p,o,i,l,m,v,x);oC(h+416|0,q[h+432>>2],q[h+436>>2],q[h+440>>2],q[h+444>>2],C,D,A,B);o=q[h+424>>2];i=q[h+428>>2];k=q[h+416>>2];p=q[h+420>>2];z:{if((-2-z|0)>=(j&2147483647)){break z}q[h+408>>2]=o;q[h+412>>2]=i&2147483647;q[h+400>>2]=k;q[h+404>>2]=p;Qk(h+384|0,k,p,o,i,0,0,0,1073610752);c=nO(q[h+400>>2],q[h+404>>2],q[h+408>>2],q[h+412>>2],1081081856);b=(c|0)<0;o=b?o:q[h+392>>2];i=b?i:q[h+396>>2];k=b?k:q[h+384>>2];p=b?p:q[h+388>>2];s=((c|0)>-1)+s|0;if(G=!(g&(b|(d|0)!=(e|0))&(Eq(l,m,v,x,0,0,0,0)|0)!=0),H=0,I=(s+110|0)<=(F|0),I?G:H){break z}q[240513]=68}MD(h+368|0,k,p,o,i,s);o=q[h+368>>2];i=q[h+372>>2];c=q[h+380>>2];b=q[h+376>>2]}q[a>>2]=o;q[a+4>>2]=i;q[a+8>>2]=b;q[a+12>>2]=c;Ii=h+8976|0}function aC(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=0,l=0,m=0,n=0,p=0,t=x(0),v=x(0),z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=x(0),M=x(0),N=0,O=0,P=0,Q=x(0),R=x(0),S=x(0),T=x(0),U=x(0),V=0,W=x(0);h=Ii-48|0;Ii=h;a:{b:{c:{d:{if(c&4){d=r[a+4|0];e=r[a+5|0];f=r[a+6|0];g=r[a+7|0];o[h+47|0]=r[(g>>>6|0)+106385|0];o[h+44|0]=r[(g&3)+106385|0];o[h+43|0]=r[(f>>>6|0)+106385|0];o[h+40|0]=r[(f&3)+106385|0];o[h+39|0]=r[(e>>>6|0)+106385|0];o[h+36|0]=r[(e&3)+106385|0];o[h+35|0]=r[(d>>>6|0)+106385|0];o[h+32|0]=r[(d&3)+106385|0];o[h+46|0]=r[(g>>>4&3)+106385|0];o[h+45|0]=r[(g>>>2&3)+106385|0];o[h+42|0]=r[(f>>>4&3)+106385|0];o[h+41|0]=r[(f>>>2&3)+106385|0];o[h+38|0]=r[(e>>>4&3)+106385|0];o[h+37|0]=r[(e>>>2&3)+106385|0];o[h+34|0]=r[(d>>>4&3)+106385|0];o[h+33|0]=r[(d>>>2&3)+106385|0];K=-1;break d}e=r[b+2|0];e:{d=r[b|0];i=r[b+4|0];f=r[b+1|0];if((d|0)!=(i|0)|(f|0)!=r[b+5|0]|(r[b+6|0]!=(e|0)|r[b+8|0]!=(d|0))){break e}if(r[b+9|0]!=(f|0)|r[b+10|0]!=(e|0)|(r[b+12|0]!=(d|0)|r[b+13|0]!=(f|0))){break e}if(r[b+14|0]!=(e|0)|r[b+16|0]!=(d|0)|(r[b+17|0]!=(f|0)|r[b+18|0]!=(e|0))){break e}if(r[b+20|0]!=(d|0)|r[b+21|0]!=(f|0)|(r[b+22|0]!=(e|0)|r[b+24|0]!=(d|0))){break e}if(r[b+25|0]!=(f|0)|r[b+26|0]!=(e|0)|(r[b+28|0]!=(d|0)|r[b+29|0]!=(f|0))){break e}if(r[b+30|0]!=(e|0)|r[b+32|0]!=(d|0)|(r[b+33|0]!=(f|0)|r[b+34|0]!=(e|0))){break e}if(r[b+36|0]!=(d|0)|r[b+37|0]!=(f|0)|(r[b+38|0]!=(e|0)|r[b+40|0]!=(d|0))){break e}if(r[b+41|0]!=(f|0)|r[b+42|0]!=(e|0)|(r[b+44|0]!=(d|0)|r[b+45|0]!=(f|0))){break e}if(r[b+46|0]!=(e|0)|r[b+48|0]!=(d|0)|(r[b+49|0]!=(f|0)|r[b+50|0]!=(e|0))){break e}if(r[b+52|0]!=(d|0)|r[b+53|0]!=(f|0)|(r[b+54|0]!=(e|0)|r[b+56|0]!=(d|0))){break e}if(r[b+57|0]!=(f|0)|r[b+58|0]!=(e|0)|(r[b+60|0]!=(d|0)|r[b+61|0]!=(f|0))){break e}if(r[b+62|0]!=(e|0)){break e}$B(a,d,f,e);break c}g=1;A=d;z=d;n=e;K=e;p=f;H=f;while(1){i=i&255;d=i+d|0;I=(g<<2)+b|0;l=r[I+2|0];K=l+K|0;I=r[I+1|0];H=I+H|0;z=(i|0)<(z|0)?z:i;p=(p|0)>(I|0)?p:I;n=(l|0)<(n|0)?n:l;A=(i|0)>(A|0)?A:i;f=(f|0)<(I|0)?f:I;e=(e|0)<(l|0)?e:l;g=g+1|0;if((g|0)!=16){i=r[(g<<2)+b|0];continue}break}I=K+8>>>4|0;H=H+8>>>4|0;K=d+8>>>4|0;d=0;i=0;g=0;l=0;while(1){m=(l<<2)+b|0;B=r[m+2|0]-I|0;C=r[m+1|0]-H|0;i=w(B,C)+i|0;m=r[m|0]-K|0;D=w(m,B)+D|0;E=w(m,C)+E|0;d=w(B,B)+d|0;g=w(C,C)+g|0;F=w(m,m)+F|0;l=l+1|0;if((l|0)!=16){continue}break}Q=x(x(F|0)*x(.003921568859368563));R=x(z-A|0);j=x(x(E|0)*x(.003921568859368563));t=x(p-f|0);v=x(x(D|0)*x(.003921568859368563));M=x(n-e|0);T=x(x(x(Q*R)+x(j*t))+x(v*M));U=x(x(g|0)*x(.003921568859368563));L=x(x(i|0)*x(.003921568859368563));S=x(x(x(j*R)+x(U*t))+x(L*M));t=x(x(v*R)+x(L*t));R=x(x(d|0)*x(.003921568859368563));t=x(t+x(R*M));M=x(x(x(T*Q)+x(S*j))+x(t*v));W=x(x(x(T*j)+x(S*U))+x(t*L));t=x(x(x(T*v)+x(S*L))+x(t*R));T=x(x(x(M*Q)+x(W*j))+x(t*v));S=x(T*Q);Q=x(x(x(M*j)+x(W*U))+x(t*L));t=x(x(x(M*v)+x(W*L))+x(t*R));M=x(x(S+x(Q*j))+x(t*v));S=x(y(M));U=x(x(x(T*j)+x(Q*U))+x(t*L));j=x(y(U));j=jL?j:L;f:{if(j>=x(2)^1){g=117;i=601;d=306;break f}j=x(x(1024)/j);v=x(v*j);g:{if(x(y(v))(f|0);k=f?e:k;e=(k|0)<(A|0);P=g+(g>>>8|0)>>>8|0;g=w(r[d+1|0],63)+128|0;d=w(r[d+2|0],31)+128|0;V=(d>>>8|0)+d>>>8|0;f=e?2:f;d=e?A:k;e=(d|0)<(z|0);f=e?3:f;d=e?z:d;e=(d|0)<(n|0);f=e?4:f;d=e?n:d;e=(d|0)<(p|0);f=e?5:f;d=e?p:d;e=(d|0)<(l|0);f=e?6:f;d=e?l:d;e=(d|0)<(B|0);f=e?7:f;d=e?B:d;e=(d|0)<(C|0);f=e?8:f;d=e?C:d;e=(d|0)<(m|0);f=e?9:f;d=e?m:d;e=(d|0)<(D|0);f=e?10:f;d=e?D:d;e=(d|0)<(E|0);f=e?11:f;d=e?E:d;e=(d|0)<(F|0);f=e?12:f;d=e?F:d;e=(d|0)<(N|0);f=e?13:f;d=e?N:d;e=(d|0)<(O|0);d=(((i|0)>((e?O:d)|0)?15:e?14:f)<<2)+b|0;e=w(r[d|0],31)+128|0;f=(e>>>8|0)+e>>>8|0;e=w(r[d+1|0],63)+128|0;d=w(r[d+2|0],31)+128|0;WN(b,P,(g>>>8|0)+g>>>8|0,V,f,(e>>>8|0)+e>>>8|0,(d>>>8|0)+d>>>8|0,h+32|0)}c=c&2?3:c&1?2:1;z=c>>>0>1?c:1;g=0;while(1){i:{if(!Vwa(b,h+32|0,h+16|0,h)){if((K|0)<=-1){I=(r[b+62|0]+(r[b+58|0]+(r[b+54|0]+(r[b+50|0]+(r[b+46|0]+(r[b+42|0]+(r[b+38|0]+(r[b+34|0]+(r[b+30|0]+(r[b+26|0]+(r[b+22|0]+(r[b+18|0]+(r[b+14|0]+(r[b+10|0]+(r[b+2|0]+r[b+6|0]|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)+8>>>4|0;H=(r[b+61|0]+(r[b+57|0]+(r[b+53|0]+(r[b+49|0]+(r[b+45|0]+(r[b+41|0]+(r[b+37|0]+(r[b+33|0]+(r[b+29|0]+(r[b+25|0]+(r[b+21|0]+(r[b+17|0]+(r[b+13|0]+(r[b+9|0]+(r[b+1|0]+r[b+5|0]|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)+8>>>4|0;K=(r[b+60|0]+(r[b+56|0]+(r[b+52|0]+(r[b+48|0]+(r[b+44|0]+(r[b+40|0]+(r[b+36|0]+(r[b+32|0]+(r[b+28|0]+(r[b+24|0]+(r[b+20|0]+(r[b+16|0]+(r[b+12|0]+(r[b+8|0]+(r[b|0]+r[b+4|0]|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)+8>>>4|0}c=(I<<1)+300432|0;i=r[c+1|0];d=(H<<1)+301456|0;A=r[d+1|0];n=(K<<1)+300432|0;l=r[n+1|0];f=r[c|0];e=r[d|0];d=r[n|0];break i}j=x(x(u[h+16>>2]*x(.12156862765550613))+x(.5));j:{if(x(y(j))31?31:c;j=x(x(u[h+20>>2]*x(.24705882370471954))+x(.5));k:{if(x(y(j))63?63:c;j=x(x(u[h+24>>2]*x(.12156862765550613))+x(.5));l:{if(x(y(j))31?31:c;j=x(x(u[h>>2]*x(.12156862765550613))+x(.5));m:{if(x(y(j))31?31:c;j=x(x(u[h+4>>2]*x(.24705882370471954))+x(.5));n:{if(x(y(j))63?63:c;j=x(x(u[h+8>>2]*x(.12156862765550613))+x(.5));o:{if(x(y(j))31?31:c}WN(b,d,e,f,l,A,i,h+32|0);g=g+1|0;if((z|0)!=(g|0)){continue}break}b=(d<<11|f|e<<5)&65535;q[h+16>>2]=b;g=(l<<11|i|A<<5)&65535;q[h>>2]=g;if((b|0)==(g|0)){p:{if(!b){g=0;b=1;i=85;break p}i=0;g=g-1|0;if(g>>>0>=b>>>0){break b}}o[a|0]=b;o[a+1|0]=b>>>8;o[a+2|0]=g;o[a+3|0]=g>>>8;b=w(i,16843009);o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;break c}i=0;if(b>>>0>>0){Hl(h+16|0,h);i=85;g=q[h>>2];b=q[h+16>>2]}if(b>>>0<=g>>>0){break a}o[a|0]=b;o[a+1|0]=b>>>8;b=s[h>>1];o[a+2|0]=b;o[a+3|0]=b>>>8;b=r[h+47|0];c=r[h+46|0];d=r[h+45|0];e=r[h+44|0];f=r[h+43|0];g=r[h+42|0];K=r[h+41|0];A=r[h+40|0];H=r[h+39|0];z=r[h+38|0];n=r[h+37|0];p=r[h+36|0];l=r[r[h+32|0]+106389|0]|r[r[h+33|0]+106389|0]<<2|r[r[h+34|0]+106389|0]<<4|r[r[h+35|0]+106389|0]<<6;o[a+4|0]=l^i;H=l|r[p+106389|0]<<8|r[n+106389|0]<<10|r[z+106389|0]<<12|r[H+106389|0]<<14;o[a+5|0]=H>>>8^i;f=H|r[A+106389|0]<<16|r[K+106389|0]<<18|r[g+106389|0]<<20|r[f+106389|0]<<22;o[a+6|0]=f>>>16^i;o[a+7|0]=(f|r[e+106389|0]<<24|r[d+106389|0]<<26|r[c+106389|0]<<28|r[b+106389|0]<<30)>>>24^i}Ii=h+48|0;return}J(106373,96899,15141,106362);G()}J(106373,96899,15159,106362);G()}function Bra(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=0,n=x(0),r=x(0),s=x(0),t=x(0),v=x(0),y=x(0),z=x(0),A=0,B=x(0),C=0;c=Ii-416|0;Ii=c;g=q[b>>2];a:{b:{c:{d:{d=q[a+72>>2];e:{if(!d|(q[a>>2]!=q[a+32>>2]|q[a+4>>2]!=q[a+36>>2])){break e}e=q[a+16>>2];f=q[a+20>>2];if((e|0)!=q[a+48>>2]|(f|0)!=q[a+52>>2]){break e}if(q[d+96>>2]==(e|0)&q[d+100>>2]==(f|0)){break d}}e=q[g+3148>>2];f:{if(!e){break f}f=q[a+48>>2];h=q[a+52>>2];d=q[q[g+3144>>2]+(Cza(f,h,e)<<2)>>2];if((d|0)==-1){break f}e=q[g+3152>>2];while(1){m=e+(d<<4)|0;if(q[m>>2]!=(f|0)|q[m+4>>2]!=(h|0)){d=q[m+12>>2];if((d|0)!=-1){continue}break f}break}d=q[(e+(d<<4)|0)+8>>2];if(d){break d}}e=sm(q[a>>2],q[a+4>>2]);f=aj(q[a+16>>2],q[a+20>>2]);d=aj(q[a+24>>2],q[a+28>>2]);g=aj(q[a+48>>2],q[a+52>>2]);a=aj(q[a+64>>2],q[a+68>>2]);q[c+16>>2]=d;q[c+12>>2]=f;q[c+8>>2]=e;q[c+4>>2]=a;q[c>>2]=g;Pi(4,7319,8378,c);o[b+4|0]=0;break c}g:{h:{i:{j:{e=q[a+80>>2];if(!e){break j}if((e|0)==q[57199]){nsa(g,d);break c}if((e|0)==q[57200]){i=q[g+3180>>2];a=q[g+3176>>2];b=i-a|0;if(!b){break c}h=b>>2;e=0;b=0;while(1){f=e;e=e+1|0;m=(f<<2)+a|0;b=q[m>>2]==(d|0)|b;if(!(!(b&1)|f>>>0>=h-1>>>0)){if(e>>>0>=h>>>0){break a}q[m>>2]=q[(e<<2)+a>>2];i=q[g+3180>>2];a=q[g+3176>>2]}h=i-a>>2;if(h>>>0>e>>>0){continue}break}if(!(b&1)){break c}if((a|0)==(i|0)){break i}q[g+3180>>2]=i-4;break c}if((e|0)==q[57201]){b=q[d+20>>2];e=q[d+16>>2];u[c+296>>2]=u[d+24>>2];q[c+288>>2]=e;q[c+292>>2]=b;b=q[d>>2];e=q[d+4>>2];f=q[d+12>>2];q[c+312>>2]=q[d+8>>2];q[c+316>>2]=f;q[c+304>>2]=b;q[c+308>>2]=e;j=u[d+40>>2];l=u[d+32>>2];r=u[d+36>>2];u[c+372>>2]=r;u[c+376>>2]=j;u[c+368>>2]=l;l=l>2]=j>2];b=q[e+3128>>2];m=q[e+3132>>2]-b>>6;e=q[d+140>>2]&32767;if(m>>>0<=e>>>0){break a}b=b+(e<<6)|0;e=q[b+52>>2];f=q[b+48>>2];u[c+328>>2]=u[b+56>>2];q[c+320>>2]=f;q[c+324>>2]=e;Ht(c+224|0,d);b=q[c+236>>2];q[c+344>>2]=q[c+232>>2];q[c+348>>2]=b;b=q[c+228>>2];q[c+336>>2]=q[c+224>>2];q[c+340>>2]=b;Lr(c+224|0,d);j=u[c+224>>2];l=u[c+228>>2];r=u[c+232>>2];l=l>r?l:r;u[c+384>>2]=j>l?j:l;Lr(c+224|0,d);b=q[c+232>>2];q[c+404>>2]=q[c+228>>2];q[c+408>>2]=b;u[c+400>>2]=u[c+224>>2];b=q[57264];f=q[b+8>>2];e=q[b+12>>2];if(!Po(q[a>>2],q[a+4>>2])){break c}a=vk(a+32|0,a,f,e,q[a+72>>2],b,c+288|0,128);if(!a){break c}q[c+64>>2]=q[q[57264]+4>>2];q[c+68>>2]=a;Pi(4,7319,8460,c- -64|0);break c}if((e|0)!=q[57288]){break j}e=0;b=q[a+96>>2];f=q[a+100>>2];k:{if(!(b|f)){break k}e=q[g+3148>>2];l:{if(!e){break l}e=q[q[g+3144>>2]+(Cza(b,f,e)<<2)>>2];if((e|0)==-1){break l}h=q[g+3152>>2];while(1){i=h+(e<<4)|0;if(q[i>>2]!=(b|0)|q[i+4>>2]!=(f|0)){e=q[i+12>>2];if((e|0)!=-1){continue}break l}break}e=q[(h+(e<<4)|0)+8>>2];if(e){break k}}q[c+96>>2]=aj(b,f);Pi(3,7319,8503,c+96|0);e=0}q[c+312>>2]=0;q[c+316>>2]=0;q[c+308>>2]=1065353216;q[c+320>>2]=0;q[c+324>>2]=0;q[c+332>>2]=0;q[c+336>>2]=0;q[c+328>>2]=1065353216;q[c+340>>2]=0;q[c+344>>2]=0;q[c+348>>2]=1065353216;q[c+292>>2]=0;q[c+296>>2]=0;q[c+288>>2]=1065353216;q[c+300>>2]=0;q[c+304>>2]=0;if(e){f=q[e+140>>2]&32767;b=q[g+3128>>2];if(f>>>0>=q[g+3132>>2]-b>>6>>>0){break a}b=b+(f<<6)|0;u[c+288>>2]=u[b>>2];u[c+292>>2]=u[b+4>>2];u[c+296>>2]=u[b+8>>2];u[c+300>>2]=u[b+12>>2];u[c+304>>2]=u[b+16>>2];u[c+308>>2]=u[b+20>>2];u[c+312>>2]=u[b+24>>2];u[c+316>>2]=u[b+28>>2];u[c+320>>2]=u[b+32>>2];u[c+324>>2]=u[b+36>>2];u[c+328>>2]=u[b+40>>2];u[c+332>>2]=u[b+44>>2];u[c+336>>2]=u[b+48>>2];u[c+340>>2]=u[b+52>>2];u[c+344>>2]=u[b+56>>2];u[c+348>>2]=u[b+60>>2]}f=q[d+136>>2];b=q[d+140>>2];m:{if(!q[a+104>>2]){b=b&32767;m=q[g+3132>>2];g=q[g+3128>>2];if(b>>>0>=m-g>>6>>>0){break a}h=g+(b<<6)|0;if(f&512){l=u[d+40>>2];r=u[d+36>>2];t=u[d+24>>2];z=u[d+32>>2];f=q[d+20>>2];i=q[d+16>>2];k=u[d+4>>2];v=u[d+8>>2];B=u[d+12>>2];j=u[d>>2];q[c+220>>2]=1065353216;u[c+216>>2]=t;u[c+188>>2]=r*x(0);u[c+204>>2]=l*x(0);t=x(v+v);n=x(k*t);y=x(j+j);s=x(B*y);u[c+184>>2]=r*x(n+s);u[c+196>>2]=l*x(n-s);n=x(x(1)-x(j*y));v=x(v*t);u[c+180>>2]=r*x(n-v);s=n;n=k;k=x(k+k);n=x(n*k);u[c+200>>2]=l*x(s-n);q[c+208>>2]=i;q[c+212>>2]=f;u[c+172>>2]=z*x(0);y=x(j*k);s=x(B*t);u[c+164>>2]=z*x(y+s);j=x(j*t);k=x(k*B);u[c+168>>2]=z*x(j-k);u[c+176>>2]=r*x(y-s);u[c+192>>2]=l*x(j+k);u[c+160>>2]=z*x(x(x(1)-n)-v);_k(c+224|0,c+288|0,c+160|0);u[h>>2]=u[c+224>>2];b=g+(b<<6)|0;u[b+4>>2]=u[c+228>>2];u[b+8>>2]=u[c+232>>2];u[b+12>>2]=u[c+236>>2];u[b+16>>2]=u[c+240>>2];u[b+20>>2]=u[c+244>>2];u[b+24>>2]=u[c+248>>2];u[b+28>>2]=u[c+252>>2];u[b+32>>2]=u[c+256>>2];u[b+36>>2]=u[c+260>>2];u[b+40>>2]=u[c+264>>2];u[b+44>>2]=u[c+268>>2];u[b+48>>2]=u[c+272>>2];u[b+52>>2]=u[c+276>>2];u[b+56>>2]=u[c+280>>2];u[b+60>>2]=u[c+284>>2];break m}l=u[d+40>>2];r=u[d+36>>2];t=u[d+24>>2];z=u[d+32>>2];f=q[d+20>>2];i=q[d+16>>2];k=u[d+4>>2];v=u[d+8>>2];B=u[d+12>>2];j=u[d>>2];q[c+220>>2]=1065353216;u[c+216>>2]=t;u[c+188>>2]=r*x(0);u[c+204>>2]=l*x(0);t=x(v+v);n=x(k*t);y=x(j+j);s=x(B*y);u[c+184>>2]=r*x(n+s);u[c+196>>2]=l*x(n-s);n=x(x(1)-x(j*y));v=x(v*t);u[c+180>>2]=r*x(n-v);s=n;n=k;k=x(k+k);n=x(n*k);u[c+200>>2]=l*x(s-n);q[c+208>>2]=i;q[c+212>>2]=f;u[c+172>>2]=z*x(0);y=x(j*k);s=x(B*t);u[c+164>>2]=z*x(y+s);j=x(j*t);k=x(k*B);u[c+168>>2]=z*x(j-k);u[c+176>>2]=r*x(y-s);u[c+192>>2]=l*x(j+k);u[c+160>>2]=z*x(x(x(1)-n)-v);jo(c+224|0,c+288|0,c+160|0);u[h>>2]=u[c+224>>2];b=g+(b<<6)|0;u[b+4>>2]=u[c+228>>2];u[b+8>>2]=u[c+232>>2];u[b+12>>2]=u[c+236>>2];u[b+16>>2]=u[c+240>>2];u[b+20>>2]=u[c+244>>2];u[b+24>>2]=u[c+248>>2];u[b+28>>2]=u[c+252>>2];u[b+32>>2]=u[c+256>>2];u[b+36>>2]=u[c+260>>2];u[b+40>>2]=u[c+264>>2];u[b+44>>2]=u[c+268>>2];u[b+48>>2]=u[c+272>>2];u[b+52>>2]=u[c+276>>2];u[b+56>>2]=u[c+280>>2];u[b+60>>2]=u[c+284>>2];break m}if(f&512){gu(c+160|0,c+288|0);f=q[d+140>>2]&32767;b=q[g+3128>>2];if(f>>>0>=q[g+3132>>2]-b>>6>>>0){break a}_k(c+224|0,c+160|0,b+(f<<6)|0);op(c+112|0,c+224|0);u[d>>2]=u[c+112>>2];u[d+4>>2]=u[c+116>>2];u[d+8>>2]=u[c+120>>2];u[d+12>>2]=u[c+124>>2];u[d+16>>2]=u[c+128>>2];u[d+20>>2]=u[c+132>>2];u[d+24>>2]=u[c+136>>2];u[d+32>>2]=u[c+144>>2];u[d+36>>2]=u[c+148>>2];u[d+40>>2]=u[c+152>>2];break m}gu(c+160|0,c+288|0);f=q[d+140>>2]&32767;b=q[g+3128>>2];if(f>>>0>=q[g+3132>>2]-b>>6>>>0){break a}jo(c+224|0,c+160|0,b+(f<<6)|0);op(c+160|0,c+224|0);u[d>>2]=u[c+160>>2];u[d+4>>2]=u[c+164>>2];u[d+8>>2]=u[c+168>>2];u[d+12>>2]=u[c+172>>2];u[d+16>>2]=u[c+176>>2];u[d+20>>2]=u[c+180>>2];u[d+24>>2]=u[c+184>>2];u[d+32>>2]=u[c+192>>2];u[d+36>>2]=u[c+196>>2];u[d+40>>2]=u[c+200>>2]}b=qw(d,e);if(!b){break c}e=aj(q[d+96>>2],q[d+100>>2]);a=aj(q[a+96>>2],q[a+100>>2]);q[c+88>>2]=b;q[c+84>>2]=a;q[c+80>>2]=e;Pi(3,7319,8548,c+80|0);break c}m=q[d+84>>2];h=q[m+4>>2];A=q[a+56>>2];C=q[a+60>>2];if(A|C){break g}if(!h){break c}e=0;while(1){C=q[m>>2]+w(e,96)|0;f=q[C+16>>2];if(!f){break h}A=q[f+100>>2];n:{if(q[f+68>>2]){q[c+224>>2]=0;q[c+288>>2]=d;q[c+292>>2]=q[(g+(q[C+20>>2]<<2)|0)+12>>2];h=q[f+16>>2];q[c+304>>2]=a;q[c+300>>2]=((i<<2)+d|0)+156&A<<15>>31;q[c+296>>2]=h;if(Mi[q[f+68>>2]](c+288|0)|0){o[b+4|0]=0}h=q[m+4>>2];A=(A&65536)>>>16|0;break n}A=A>>>16&1}i=A+i|0;e=e+1|0;if(h>>>0>e>>>0){continue}break}break c}J(12613,9962,548,12466);G()}J(8003,7192,2356,8688);G()}o:{if(h){f=q[m>>2];e=0;while(1){i=f+w(e,96)|0;if((A|0)==q[i>>2]&(C|0)==q[i+4>>2]){break o}e=e+1|0;if((h|0)!=(e|0)){continue}break}}e=sm(q[a>>2],q[a+4>>2]);f=aj(q[a+16>>2],q[a+20>>2]);d=aj(q[a+24>>2],q[a+28>>2]);g=aj(q[a+48>>2],q[a+52>>2]);h=aj(q[a+56>>2],q[a+60>>2]);a=aj(q[a+64>>2],q[a+68>>2]);q[c+52>>2]=d;q[c+48>>2]=f;q[c+44>>2]=e;q[c+40>>2]=a;q[c+36>>2]=h;q[c+32>>2]=g;Pi(4,7319,8602,c+32|0);o[b+4|0]=0;break c}m=e&65535;i=q[(f+w(m,96)|0)+16>>2];if(!i){break b}if(q[i+68>>2]){h=0;if(m){e=0;while(1){h=(p[q[(f+w(e,96)|0)+16>>2]+102>>1]&1)+h|0;e=e+1|0;if((m|0)!=(e|0)){continue}break}}e=q[i+100>>2];q[c+224>>2]=0;q[c+288>>2]=d;q[c+292>>2]=q[(g+(q[(f+w(m,96)|0)+20>>2]<<2)|0)+12>>2];f=q[i+16>>2];q[c+304>>2]=a;q[c+300>>2]=((h<<2)+d|0)+156&e<<15>>31;q[c+296>>2]=f;if(Mi[q[i+68>>2]](c+288|0)|0){o[b+4|0]=0}break c}Pi(3,7319,8731,0)}Ii=c+416|0;return}J(8003,7192,2309,8688);G()}J(12419,9962,479,9454);G()}function gx(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,v=0,y=0,z=0,A=x(0),B=0,C=x(0),D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=x(0),S=0,T=0,U=0;j=Ii-2384|0;Ii=j;a:{b:{e=0;c:{if(!wP(a,c,j+8|0,d,j+4|0,j+12|0)){break c}M=q[d>>2];D=q[c>>2];L=q[j+4>>2];d=w(q[j+12>>2],6)+a|0;T=d;N=q[((r[d+424|0]<<2)+a|0)+116>>2];E=r[d+425|0];B=q[a+416>>2];f=q[a+4>>2];if((f|0)>=1){F=B+w(E,40)|0;Q=F;while(1){d=r[(q[Q+4>>2]+w(n,3)|0)+2|0];H=(j+1360|0)+(n<<2)|0;q[H>>2]=0;d=r[(d+F|0)+9|0];if(!s[((d<<1)+a|0)+144>>1]){q[a+112>>2]=21;e=0;break c}e=q[a+272>>2];d:{e:{if(Fj(a,1)){f=2;v=q[((n<<2)+a|0)+1008>>2];l=e+w(d,1596)|0;O=q[(r[l+1588|0]<<2)+211884>>2];d=o[(O>>>5|0)+211872|0]+4|0;p[v>>1]=Fj(a,d);p[v+2>>1]=Fj(a,d);h=0;if(r[l|0]){while(1){I=r[(h+l|0)+1|0];d=I+l|0;i=r[d+33|0];g=0;m=r[d+49|0];f:{if(!m){break f}g=r[d+65|0];k=q[a+136>>2];d=q[a+1408>>2];g:{if((d|0)>9){break g}if(!d){q[a+1404>>2]=0}while(1){d=r[a+1388|0];h:{i:{j:{k:{if(q[a+1396>>2]){if(d&255){break k}break g}if(d&255){break k}e=q[a+1392>>2];if((e|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break g}if(!(o[a+1387|0]&1)){break j}e=q[a+1392>>2]}z=e+1|0;q[a+1392>>2]=z;d=r[(a+e|0)+1132|0];if((d|0)!=255){q[a+1400>>2]=e;q[a+1396>>2]=1}if((z|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=d;if(!d){break g}}o[a+1388|0]=d-1;q[a+1412>>2]=q[a+1412>>2]+1;d=q[a+44>>2];l:{if(d){if(d>>>0>=t[a+52>>2]){break i}q[a+44>>2]=d+1;d=r[d|0];break l}d=wj(q[a+32>>2]);if((d|0)==-1){break i}}d=d&255;break h}q[a+112>>2]=32;break g}q[a+108>>2]=1;d=0}e=q[a+1408>>2];q[a+1408>>2]=e+8;q[a+1404>>2]=q[a+1404>>2]+(d<>2];e=p[(d+((z&1023)<<1)|0)+36>>1];m:{if((e|0)>=0){g=r[e+q[d+8>>2]|0];q[a+1404>>2]=z>>>g;k=q[a+1408>>2]-g|0;g=(k|0)<0;q[a+1408>>2]=g?0:k;g=g?-1:e;break m}g=yq(a,d)}if(!r[d+23|0]){break f}g=q[q[d+2088>>2]+(g<<2)>>2]}if(i){z=-1<>1];n:{if((k|0)<0){break n}K=q[a+136>>2];d=q[a+1408>>2];o:{if((d|0)>9){break o}if(!d){q[a+1404>>2]=0}while(1){d=r[a+1388|0];p:{q:{r:{s:{if(q[a+1396>>2]){if(d&255){break s}break o}if(d&255){break s}e=q[a+1392>>2];if((e|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break o}if(!(o[a+1387|0]&1)){break r}e=q[a+1392>>2]}y=e+1|0;q[a+1392>>2]=y;d=r[(a+e|0)+1132|0];if((d|0)!=255){q[a+1400>>2]=e;q[a+1396>>2]=1}if((y|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=d;if(!d){break o}}o[a+1388|0]=d-1;q[a+1412>>2]=q[a+1412>>2]+1;d=q[a+44>>2];t:{if(d){if(d>>>0>=t[a+52>>2]){break q}q[a+44>>2]=d+1;d=r[d|0];break t}d=wj(q[a+32>>2]);if((d|0)==-1){break q}}d=d&255;break p}q[a+112>>2]=32;break o}q[a+108>>2]=1;d=0}e=q[a+1408>>2];q[a+1408>>2]=e+8;q[a+1404>>2]=q[a+1404>>2]+(d<>2];d=p[(e+((y&1023)<<1)|0)+36>>1];u:{if((d|0)>=0){k=r[d+q[e+8>>2]|0];q[a+1404>>2]=y>>>k;K=q[a+1408>>2]-k|0;k=(K|0)<0;q[a+1408>>2]=k?0:K;d=k?-1:d;break u}d=yq(a,e)}if(!r[e+23|0]){break n}d=q[q[e+2088>>2]+(d<<2)>>2]}g=g>>m;p[v+(f<<1)>>1]=d;f=f+1|0;if((i|0)!=(f|0)){continue}break}f=i}h=h+1|0;if(h>>>0>2]!=-1){break e}}q[H>>2]=1;break d}p[j+336>>1]=257;e=2;g=q[l+1592>>2];if((g|0)>2){while(1){f=e<<1;d=f+l|0;k=r[d+1089|0];H=k<<1;I=r[d+1088|0];h=I<<1;z=p[h+v>>1];d=p[H+v>>1]-z|0;i=d>>31;m=h;h=l+338|0;m=s[m+h>>1];i=(w(s[f+h>>1]-m|0,i^d+i)|0)/(s[h+H>>1]-m|0)|0;d=z+((d|0)<0?0-i|0:i)|0;h=f+v|0;f=p[h>>1];v:{w:{if(f){o[k+(j+336|0)|0]=1;o[I+(j+336|0)|0]=1;o[(j+336|0)+e|0]=1;i=O-d|0;if((f|0)>=((d|0)>(i|0)?i:d)<<1){if((d|0)<(i|0)){break v}d=(i+(d-f|0)|0)-1|0;break w}if(f&1){d=d-(f+1>>>1|0)|0;break w}d=(f>>1)+d|0;break w}o[(j+336|0)+e|0]=0}p[h>>1]=d}e=e+1|0;if((g|0)!=(e|0)){continue}break}}d=0;if((g|0)<=0){break d}while(1){if(!r[(j+336|0)+d|0]){p[v+(d<<1)>>1]=65535}d=d+1|0;if((g|0)!=(d|0)){continue}break}}f=q[a+4>>2];n=n+1|0;if((f|0)>(n|0)){continue}break}}x:{y:{z:{e=q[a+92>>2];if(!(q[a+96>>2]!=q[a+104>>2]?e:0)){Ti(j+336|0,j+1360|0,f<<2);i=B+w(E,40)|0;d=s[i>>1];if(d){n=d>>>0>1?d:1;l=q[i+4>>2];d=0;while(1){h=l+w(d,3)|0;g=r[h+1|0];h=(j+1360|0)+(r[h|0]<<2)|0;if(!(q[(j+1360|0)+(g<<2)>>2]?q[h>>2]:0)){q[(j+1360|0)+(g<<2)>>2]=0;q[h>>2]=0}d=d+1|0;if((n|0)!=(d|0)){continue}break}}l=N>>1;if(r[i+8|0]){v=B+w(E,40)|0;m=v;g=0;while(1){e=0;if((f|0)>=1){k=q[m+4>>2];d=0;while(1){if(r[(k+w(d,3)|0)+2|0]==(g|0)){F=(j+16|0)+e|0;n=d<<2;A:{if(q[n+(j+1360|0)>>2]){h=1;n=0;break A}h=0;n=q[(a+n|0)+812>>2]}o[F|0]=h;q[(j+272|0)+(e<<2)>>2]=n;e=e+1|0}d=d+1|0;if((f|0)!=(d|0)){continue}break}}Rua(a,j+272|0,e,l,r[(g+v|0)+24|0],j+16|0);g=g+1|0;if(g>>>0>2];continue}break}e=q[a+92>>2]}if(q[a+96>>2]!=q[a+104>>2]?e:0){break z}e=s[i>>1];if(!(!e|(N|0)<2)){i=q[(B+w(E,40)|0)+4>>2];n=(l|0)>1?l:1;g=a+812|0;while(1){f=e-1|0;d=i+w(f,3)|0;h=q[g+(r[d+1|0]<<2)>>2];v=q[g+(r[d|0]<<2)>>2];d=0;while(1){m=d<<2;k=m+h|0;A=u[k>>2];m=v+m|0;C=u[m>>2];B:{C:{if(!(C>x(0))){if(!(A>x(0))){R=x(C-A);A=C;break B}A=x(C+A);break C}if(!(A>x(0))){R=x(C+A);A=C;break B}A=x(C-A)}R=C}u[m>>2]=R;u[k>>2]=A;d=d+1|0;if((n|0)!=(d|0)){continue}break}d=(e|0)>1;e=f;if(d){continue}break}}n=q[a+4>>2];if((n|0)<1){break x}Q=l<<2;H=B+w(E,40)|0;O=H;v=0;while(1){e=v<<2;f=e+a|0;d=f;D:{if(q[e+(j+336|0)>>2]){Ui(q[d+812>>2],0,Q);n=q[a+4>>2];break D}e=r[(H+r[(q[O+4>>2]+w(v,3)|0)+2|0]|0)+9|0];if(!s[((e<<1)+a|0)+144>>1]){q[a+112>>2]=21;break D}E=q[d+812>>2];B=q[a+272>>2]+w(e,1596)|0;z=r[B+1588|0];I=q[f+1008>>2];e=w(z,p[I>>1]);h=1;d=0;K=q[B+1592>>2];if((K|0)>=2){while(1){f=r[(h+B|0)+838|0]<<1;g=p[f+I>>1];if((g|0)>=0){i=w(z,g&65535);g=s[(f+B|0)+338>>1];if((g|0)!=(d|0)){f=i-e|0;m=g-d|0;k=(f|0)/(m|0)|0;F=(g|0)>(l|0)?l:g;E:{if((F|0)<=(d|0)){break E}y=E+(d<<2)|0;u[y>>2]=u[((e&255)<<2)+212096>>2]*u[y>>2];d=d+1|0;if((F|0)<=(d|0)){break E}y=k>>31;P=w(m,y-(k^y)|0);y=f>>31;y=P+(y+f^y)|0;U=(f|0)<0?-1:1;f=0;while(1){P=E+(d<<2)|0;f=f+y|0;S=(f|0)<(m|0);e=(e+k|0)+(S?0:U)|0;u[P>>2]=u[((e&255)<<2)+212096>>2]*u[P>>2];f=f-(S?0:m)|0;d=d+1|0;if((F|0)!=(d|0)){continue}break}}d=g}e=i}h=h+1|0;if((K|0)!=(h|0)){continue}break}}if((d|0)>=(l|0)){break D}C=u[(e<<2)+212096>>2];while(1){e=E+(d<<2)|0;u[e>>2]=C*u[e>>2];d=d+1|0;if((l|0)!=(d|0)){continue}break}}v=v+1|0;if((v|0)<(n|0)){continue}break}break y}J(211718,211687,3293,211904);G()}J(211718,211687,3326,211904);G()}d=0;if((n|0)<=0){break x}while(1){X_(q[((d<<2)+a|0)+812>>2],N,a,r[T+424|0]);d=d+1|0;if((d|0)>2]){continue}break}}f=0-l|0;F:{while(1){G:{d=r[a+1388|0];if(!d){if(q[a+1396>>2]){break F}e=q[a+1392>>2];if((e|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break F}if(!(o[a+1387|0]&1)){break G}e=q[a+1392>>2]}g=e+1|0;q[a+1392>>2]=g;d=r[(a+e|0)+1132|0];if((d|0)!=255){q[a+1400>>2]=e;q[a+1396>>2]=1}if((g|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=d;if(!d){break F}}o[a+1388|0]=d-1;q[a+1412>>2]=q[a+1412>>2]+1;d=q[a+44>>2];if(d){if(d>>>0>=t[a+52>>2]){q[a+108>>2]=1;continue}q[a+44>>2]=d+1;continue}if((wj(q[a+32>>2])|0)!=-1){continue}q[a+108>>2]=1;continue}break}q[a+112>>2]=32}H:{if(r[a+1389|0]){q[a+1072>>2]=f;o[a+1389|0]=0;q[a+1076>>2]=1;q[a+1424>>2]=N-L;break H}d=q[a+1424>>2];if(!d){break H}e=M-D|0;if((e|0)<=(d|0)){q[a+1424>>2]=d-e;q[c>>2]=M;D=M;break H}D=d+D|0;q[c>>2]=D;q[a+1424>>2]=0}d=q[a+1076>>2];c=a;I:{J:{K:{if(q[a+1400>>2]==q[a+1416>>2]){L:{if(!d|!(r[a+1387|0]&4)){break L}d=q[a+1420>>2];e=q[a+1072>>2];if(d>>>0>=e+(L-D|0)>>>0){break L}c=b;b=d-e|0;b=(b>>>0>d>>>0?0:b)+D|0;b=(b|0)>(L|0)?L:b;q[c>>2]=b;q[a+1072>>2]=b+q[a+1072>>2];break I}q[a+1076>>2]=1;d=q[a+1420>>2]+(D-l|0)|0;break K}if(!d){break J}d=q[a+1072>>2]}q[c+1072>>2]=d+(M-D|0)}if(q[a+96>>2]!=q[a+104>>2]?q[a+92>>2]:0){break b}q[b>>2]=L}e=1}Ii=j+2384|0;return e}J(211718,211687,3442,211904);G()}J(211824,211687,1555,211845);G()}function hD(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;y=q[q[a>>2]+8>>2];O=y+1|0;a:{b:{c:{D=(d|0)==(y|0);if(!((d|0)!=(O|0)?!D:0)){d:{e:{f:{g:{if((e|f)<0|((2147483647/(f|0)|0)<(e|0)?f:0)){break g}k=(g|0)==16?2:1;n=w(k,d);m=w(e,f);if((n|m)<0){break g}if(!n|(m|0)<=(2147483647/(n|0)|0)){break f}}q[a+12>>2]=0;break e}i=Yi(w(m,n));q[a+12>>2]=i;if(i){break d}}q[213145]=169512;return 0}if((e|y)<0|((2147483647/(e|0)|0)<(y|0)?e:0)){break a}B=w(e,y);if((B|g)<0|((2147483647/(g|0)|0)<(B|0)?g:0)){break a}m=w(g,B);if((m|0)>=2147483641){break a}E=m+7>>>3|0;if(w(E+1|0,f)>>>0>c>>>0){break b}L=w(d,e);h:{i:{j:{k:{if(f){c=r[b|0];if(c>>>0<=4){j=w(k,y);R=(g|0)<8|D;m=e-1|0;M=w(k,L);S=0-M|0;T=L-E|0;U=(g|0)>7;V=(g|0)!=8;P=(g|0)!=16;A=e;while(1){if(!U){if(e>>>0>>0){break a}j=1;A=E;i=i+T|0}l=c&255;l=C?l:r[l+170144|0];k=b+1|0;s=i+S|0;l:{if((j|0)<1){break l}c=0;m:{switch(l|0){case 0:while(1){o[c+i|0]=r[c+k|0];c=c+1|0;if((j|0)!=(c|0)){continue}break}break l;case 1:while(1){o[c+i|0]=r[c+k|0];c=c+1|0;if((j|0)!=(c|0)){continue}break}break l;default:break m}}while(1){z=c+i|0;n:{o:{p:{switch(l-2|0){case 0:t=r[c+s|0]+r[c+k|0]|0;break o;case 1:t=r[c+k|0]+(r[c+s|0]>>>1|0)|0;break o;case 2:t=r[c+s|0]+r[c+k|0]|0;break o;case 3:t=r[c+k|0];break o;case 4:break p;default:break n}}t=r[c+k|0]}o[z|0]=t}c=c+1|0;if((j|0)!=(c|0)){continue}break}}q:{if(!V){if(!D){o[i+y|0]=255}c=d;b=k+y|0;break q}if(!P){if(!D){b=i+j|0;o[b|0]=255;o[b+1|0]=255}c=n;b=j+k|0;break q}c=1;b=b+2|0}k=c+s|0;c=c+i|0;r:{s:{t:{if(R){i=w(A-1|0,j);u:{v:{switch(l|0){case 0:Ti(c,b,i);b=b+i|0;break t;case 1:k=0;if((i|0)<=0){break u}while(1){o[c+k|0]=r[(k-j|0)+c|0]+r[b+k|0];k=k+1|0;if((i|0)!=(k|0)){continue}break}break u;case 2:l=0;if((i|0)<=0){break u}while(1){o[c+l|0]=r[k+l|0]+r[b+l|0];l=l+1|0;if((i|0)!=(l|0)){continue}break}break u;case 3:l=0;if((i|0)<=0){break u}while(1){o[c+l|0]=r[b+l|0]+(r[(l-j|0)+c|0]+r[k+l|0]>>>1|0);l=l+1|0;if((i|0)!=(l|0)){continue}break}break u;case 4:l=0;if((i|0)<=0){break u}while(1){u=l-j|0;t=r[u+k|0];s=r[k+l|0];u=r[c+u|0];v=(s+u|0)-t|0;F=v-s|0;x=F>>31;H=v-t|0;I=H>>31;K=v-u|0;v=K>>31;z=t;N=s;t=x^x+F;s=I^I+H;x=(t|0)>(s|0)?z:N;z=s;s=v^v+K;o[c+l|0]=r[b+l|0]+((s|0)>(t|0)?x:(z|0)<(s|0)?x:u);l=l+1|0;if((i|0)!=(l|0)){continue}break}break u;case 5:k=0;if((i|0)<=0){break u}while(1){o[c+k|0]=r[b+k|0]+(r[(k-j|0)+c|0]>>>1|0);k=k+1|0;if((i|0)!=(k|0)){continue}break}break u;case 6:break v;default:break u}}k=0;if((i|0)<=0){break u}while(1){o[c+k|0]=r[(k-j|0)+c|0]+r[b+k|0];k=k+1|0;if((i|0)!=(k|0)){continue}break}}b=b+i|0;break t}if((d|0)!=(O|0)){break c}w:{x:{y:{z:{A:{B:{C:{D:{switch(l|0){case 6:if(!m){break w}if((j|0)<=0){break x}k=m;while(1){i=0;while(1){o[c+i|0]=r[(i-n|0)+c|0]+r[b+i|0];i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;c=c+n|0;b=b+j|0;k=k-1|0;if(k){continue}break}break w;case 5:if(!m){break w}if((j|0)<=0){break y}k=m;while(1){i=0;while(1){o[c+i|0]=r[b+i|0]+(r[(i-n|0)+c|0]>>>1|0);i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;c=c+n|0;b=b+j|0;k=k-1|0;if(k){continue}break}break w;case 4:if(!m){break w}if((j|0)<=0){break z}l=m;while(1){i=0;while(1){u=i-n|0;t=r[u+k|0];s=r[i+k|0];u=r[c+u|0];v=(s+u|0)-t|0;F=v-s|0;x=F>>31;H=v-t|0;I=H>>31;K=v-u|0;v=K>>31;z=t;N=s;t=x^x+F;s=I^I+H;x=(t|0)>(s|0)?z:N;z=s;s=v^v+K;o[c+i|0]=r[b+i|0]+((s|0)>(t|0)?x:(z|0)<(s|0)?x:u);i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;k=k+n|0;c=c+n|0;b=b+j|0;l=l-1|0;if(l){continue}break}break w;case 3:if(!m){break w}if((j|0)<=0){break A}l=m;while(1){i=0;while(1){o[c+i|0]=r[b+i|0]+(r[(i-n|0)+c|0]+r[i+k|0]>>>1|0);i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;k=k+n|0;c=c+n|0;b=b+j|0;l=l-1|0;if(l){continue}break}break w;case 2:if(!m){break w}if((j|0)<=0){break B}l=m;while(1){i=0;while(1){o[c+i|0]=r[i+k|0]+r[b+i|0];i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;k=k+n|0;c=c+n|0;b=b+j|0;l=l-1|0;if(l){continue}break}break w;case 1:if(!m){break w}if((j|0)<=0){break C}k=m;while(1){i=0;while(1){o[c+i|0]=r[(i-n|0)+c|0]+r[b+i|0];i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;c=c+n|0;b=b+j|0;k=k-1|0;if(k){continue}break}break w;case 0:break D;default:break w}}if(!m){break w}if((j|0)>0){k=m;while(1){i=0;while(1){o[c+i|0]=r[b+i|0];i=i+1|0;if((j|0)!=(i|0)){continue}break}o[c+j|0]=255;c=c+n|0;b=b+j|0;k=k-1|0;if(k){continue}break}break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0;break w}k=w(j,m);i=m;while(1){o[c+j|0]=255;c=c+n|0;i=i-1|0;if(i){continue}break}b=b+k|0}if(P){break t}if(!e){break s}k=j+1|0;c=q[a+12>>2]+Q|0;i=0;while(1){o[c+k|0]=255;c=c+n|0;i=i+1|0;if((i|0)!=(e|0)){continue}break}}C=C+1|0;if((C|0)!=(f|0)){break r}if((g|0)>=8){break j}if(f){break k}return 1}C=C+1|0;if((C|0)==(f|0)){break i}}Q=w(C,M);i=Q+q[a+12>>2]|0;c=r[b|0];if(c>>>0<=4){continue}break}}break a}if((g|0)<8){break h}if((g|0)==16){break i}break h}m=e-1|0;k=0-E|0;l=(B|0)>7;e=0;while(1){i=w(e,M);c=i+q[a+12>>2]|0;b=L+c|0;j=1;j=h?j:r[g+169896|0];b=b+k|0;E:{F:{switch(g-1|0){case 3:d=B;if((d|0)>=2){while(1){o[c|0]=w(r[b|0]>>>4|0,j);o[c+1|0]=w(r[b|0]&15,j);b=b+1|0;c=c+2|0;A=(d|0)>3;d=d-2|0;if(A){continue}break}}if((d|0)!=1){break E}o[c|0]=w(r[b|0]>>>4|0,j);break E;case 1:d=B;if((d|0)>3){while(1){o[c|0]=w(r[b|0]>>>6|0,j);o[c+1|0]=w(r[b|0]>>>4&3,j);o[c+2|0]=w(r[b|0]>>>2&3,j);o[c+3|0]=w(r[b|0]&3,j);b=b+1|0;c=c+4|0;A=(d|0)>7;d=d-4|0;if(A){continue}break}}if((d|0)<1){break E}o[c|0]=w(r[b|0]>>>6|0,j);if((d|0)==1){break E}o[c+1|0]=w(r[b|0]>>>4&3,j);if((d|0)<3){break E}o[c+2|0]=w(r[b|0]>>>2&3,j);break E;case 0:break F;default:break E}}d=B;if(l){while(1){o[c|0]=o[b|0]>>>7&j;o[c+1|0]=w(r[b|0]>>>6&1,j);o[c+2|0]=w(r[b|0]>>>5&1,j);o[c+3|0]=w(r[b|0]>>>4&1,j);o[c+4|0]=w(r[b|0]>>>3&1,j);o[c+5|0]=w(r[b|0]>>>2&1,j);o[c+6|0]=w(r[b|0]>>>1&1,j);o[c+7|0]=w(o[b|0]&1,j);b=b+1|0;c=c+8|0;A=(d|0)>15;d=d-8|0;if(A){continue}break}}if((d|0)<1){break E}o[c|0]=o[b|0]>>>7&j;if((d|0)==1){break E}o[c+1|0]=w(r[b|0]>>>6&1,j);if((d|0)<3){break E}o[c+2|0]=w(r[b|0]>>>5&1,j);if((d|0)==3){break E}o[c+3|0]=w(r[b|0]>>>4&1,j);if((d|0)<5){break E}o[c+4|0]=w(r[b|0]>>>3&1,j);if((d|0)==5){break E}o[c+5|0]=w(r[b|0]>>>2&1,j);if((d|0)<7){break E}o[c+6|0]=w(r[b|0]>>>1&1,j)}G:{if(D){break G}c=i+q[a+12>>2]|0;H:{switch(y-1|0){case 0:b=m;if((b|0)<0){break G}while(1){d=b<<1;o[c+(d|1)|0]=255;o[c+d|0]=r[b+c|0];d=(b|0)>0;b=b-1|0;if(d){continue}break}break G;default:J(170166,169198,4725,170117);G();case 2:break H}}b=m;if((b|0)<=-1){break G}while(1){d=b<<2;o[c+(d|3)|0]=255;i=c+w(b,3)|0;o[c+(d|2)|0]=r[i+2|0];o[c+(d|1)|0]=r[i+1|0];o[c+d|0]=r[i|0];d=(b|0)>0;b=b-1|0;if(d){continue}break}}e=e+1|0;if((f|0)!=(e|0)){continue}break}break h}if((g|0)!=16){break h}}d=w(f,L);if(!d){return 1}c=q[a+12>>2];b=0;while(1){a=r[c|0]|r[c+1|0]<<8;p[c>>1]=(a<<24|a<<8&16711680)>>>16;c=c+2|0;b=b+1|0;if((d|0)!=(b|0)){continue}break}}return 1}J(170076,169198,4552,170117);G()}J(170149,169198,4636,170117);G()}q[213145]=169845;return 0}q[213145]=169845;return 0}function KO(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-640|0;Ii=c;h=q[a>>2];d=s[h+52>>1]+1|0;p[h+52>>1]=d;if((d&65535)>>>0>=201){d=q[a+12>>2];q[c+628>>2]=142913;q[c+624>>2]=d;oj(h,142885,c+624|0);Nj(q[a>>2],3);h=q[a>>2]}h=Ly(h);d=q[q[a>>2]+8>>2];q[d+8>>2]=9;q[d>>2]=h;e=q[a>>2];f=q[e+8>>2];if((q[e+28>>2]-f|0)<=16){Mk(e,1);e=q[a>>2];f=q[e+8>>2]}q[e+8>>2]=f+16;if(cl(q[a+4>>2],c+632|0,4)){g=q[a>>2];d=q[a+12>>2];q[c+612>>2]=142870;q[c+608>>2]=d;oj(g,142885,c+608|0);Nj(q[a>>2],3)}d=h;g=q[c+632>>2];i=0;a:{if(!g){break a}j=Ks(q[a>>2],q[a+8>>2],g);if(cl(q[a+4>>2],j,q[c+632>>2])){i=q[a>>2];g=q[a+12>>2];q[c+596>>2]=142870;q[c+592>>2]=g;oj(i,142885,c+592|0);Nj(q[a>>2],3)}i=Yj(q[a>>2],j,q[c+632>>2]-1|0)}q[d+32>>2]=i?i:b;if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+580>>2]=142870;q[c+576>>2]=b;oj(d,142885,c+576|0);Nj(q[a>>2],3)}d=h;b=q[c+632>>2];if((b|0)<=-1){g=q[a>>2];b=q[a+12>>2];q[c+564>>2]=142936;q[c+560>>2]=b;oj(g,142885,c+560|0);Nj(q[a>>2],3);b=q[c+632>>2]}q[d+60>>2]=b;if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+548>>2]=142870;q[c+544>>2]=b;oj(d,142885,c+544|0);Nj(q[a>>2],3)}d=h;b=q[c+632>>2];if((b|0)<=-1){g=q[a>>2];b=q[a+12>>2];q[c+532>>2]=142936;q[c+528>>2]=b;oj(g,142885,c+528|0);Nj(q[a>>2],3);b=q[c+632>>2]}q[d+64>>2]=b;if(cl(q[a+4>>2],c+632|0,1)){d=q[a>>2];b=q[a+12>>2];q[c+516>>2]=142870;q[c+512>>2]=b;oj(d,142885,c+512|0);Nj(q[a>>2],3)}o[h+72|0]=r[c+632|0];if(cl(q[a+4>>2],c+632|0,1)){d=q[a>>2];b=q[a+12>>2];q[c+500>>2]=142870;q[c+496>>2]=b;oj(d,142885,c+496|0);Nj(q[a>>2],3)}o[h+73|0]=r[c+632|0];if(cl(q[a+4>>2],c+632|0,1)){d=q[a>>2];b=q[a+12>>2];q[c+484>>2]=142870;q[c+480>>2]=b;oj(d,142885,c+480|0);Nj(q[a>>2],3)}o[h+74|0]=r[c+632|0];if(cl(q[a+4>>2],c+632|0,1)){d=q[a>>2];b=q[a+12>>2];q[c+468>>2]=142870;q[c+464>>2]=b;oj(d,142885,c+464|0);Nj(q[a>>2],3)}o[h+75|0]=r[c+632|0];if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+452>>2]=142870;q[c+448>>2]=b;oj(d,142885,c+448|0);Nj(q[a>>2],3)}f=q[c+632>>2];if((f|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+436>>2]=142936;q[c+432>>2]=b;oj(d,142885,c+432|0);Nj(q[a>>2],3);f=q[c+632>>2]}b=q[a>>2];b:{if(f+1>>>0<=1073741823){e=f<<2;b=Cj(b,0,0,e);break b}e=f<<2;b=mk(b)}q[h+44>>2]=f;q[h+12>>2]=b;if(cl(q[a+4>>2],b,e)){d=q[a>>2];b=q[a+12>>2];q[c+420>>2]=142870;q[c+416>>2]=b;oj(d,142885,c+416|0);Nj(q[a>>2],3)}if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+404>>2]=142870;q[c+400>>2]=b;oj(d,142885,c+400|0);Nj(q[a>>2],3)}e=q[c+632>>2];if((e|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+388>>2]=142936;q[c+384>>2]=b;oj(d,142885,c+384|0);Nj(q[a>>2],3);e=q[c+632>>2]}b=q[a>>2];c:{if(e+1>>>0<=268435455){b=Cj(b,0,0,e<<4);break c}b=mk(b)}q[h+40>>2]=e;q[h+8>>2]=b;f=0;d:{if((e|0)<=0){break d}while(1){q[((f<<4)+b|0)+8>>2]=0;f=f+1|0;if((f|0)!=(e|0)){continue}break}if((e|0)<1){break d}f=0;while(1){if(cl(q[a+4>>2],c+632|0,1)){g=q[a>>2];d=q[a+12>>2];q[c+372>>2]=142870;q[c+368>>2]=d;oj(g,142885,c+368|0);Nj(q[a>>2],3)}d=(f<<4)+b|0;e:{f:{switch(o[c+632|0]){case 0:q[d+8>>2]=0;break e;case 1:if(cl(q[a+4>>2],c+632|0,1)){g=q[a>>2];b=q[a+12>>2];q[c+308>>2]=142870;q[c+304>>2]=b;oj(g,142885,c+304|0);Nj(q[a>>2],3)}q[d>>2]=r[c+632|0]!=0;q[d+8>>2]=1;break e;case 3:if(cl(q[a+4>>2],c+632|0,8)){g=q[a>>2];b=q[a+12>>2];q[c+324>>2]=142870;q[c+320>>2]=b;oj(g,142885,c+320|0);Nj(q[a>>2],3)}v[d>>3]=v[c+632>>3];q[d+8>>2]=3;break e;case 4:if(cl(q[a+4>>2],c+632|0,4)){g=q[a>>2];b=q[a+12>>2];q[c+356>>2]=142870;q[c+352>>2]=b;oj(g,142885,c+352|0);Nj(q[a>>2],3)}b=d;g=q[c+632>>2];i=0;g:{if(!g){break g}j=Ks(q[a>>2],q[a+8>>2],g);if(cl(q[a+4>>2],j,q[c+632>>2])){i=q[a>>2];g=q[a+12>>2];q[c+340>>2]=142870;q[c+336>>2]=g;oj(i,142885,c+336|0);Nj(q[a>>2],3)}i=Yj(q[a>>2],j,q[c+632>>2]-1|0)}q[b>>2]=i;q[d+8>>2]=4;break e;default:break f}}d=q[a>>2];b=q[a+12>>2];q[c+292>>2]=142948;q[c+288>>2]=b;oj(d,142885,c+288|0);Nj(q[a>>2],3)}f=f+1|0;if((f|0)==(e|0)){break d}b=q[h+8>>2];continue}}if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+276>>2]=142870;q[c+272>>2]=b;oj(d,142885,c+272|0);Nj(q[a>>2],3)}e=q[c+632>>2];if((e|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+260>>2]=142936;q[c+256>>2]=b;oj(d,142885,c+256|0);Nj(q[a>>2],3);e=q[c+632>>2]}b=q[a>>2];h:{if(e+1>>>0<=1073741823){d=Cj(b,0,0,e<<2);break h}d=mk(b)}q[h+52>>2]=e;q[h+16>>2]=d;b=1;i:{if((e|0)<1){break i}f=0;q[d>>2]=0;if((e|0)!=1){while(1){q[q[h+16>>2]+(b<<2)>>2]=0;b=b+1|0;if((e|0)!=(b|0)){continue}break}}if((e|0)<=0){break i}while(1){b=KO(a,q[h+32>>2]);q[q[h+16>>2]+(f<<2)>>2]=b;f=f+1|0;if((f|0)!=(e|0)){continue}break}}if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+244>>2]=142870;q[c+240>>2]=b;oj(d,142885,c+240|0);Nj(q[a>>2],3)}f=q[c+632>>2];if((f|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+228>>2]=142936;q[c+224>>2]=b;oj(d,142885,c+224|0);Nj(q[a>>2],3);f=q[c+632>>2]}b=q[a>>2];j:{if(f+1>>>0<=1073741823){e=f<<2;b=Cj(b,0,0,e);break j}e=f<<2;b=mk(b)}q[h+48>>2]=f;q[h+20>>2]=b;if(cl(q[a+4>>2],b,e)){d=q[a>>2];b=q[a+12>>2];q[c+212>>2]=142870;q[c+208>>2]=b;oj(d,142885,c+208|0);Nj(q[a>>2],3)}if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+196>>2]=142870;q[c+192>>2]=b;oj(d,142885,c+192|0);Nj(q[a>>2],3)}b=q[c+632>>2];if((b|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+180>>2]=142936;q[c+176>>2]=b;oj(d,142885,c+176|0);Nj(q[a>>2],3);b=q[c+632>>2]}d=q[a>>2];k:{if(b+1>>>0<=357913941){d=Cj(d,0,0,w(b,12));break k}d=mk(d)}q[h+56>>2]=b;q[h+24>>2]=d;f=0;if((b|0)>0){while(1){q[d+w(f,12)>>2]=0;f=f+1|0;if((f|0)!=(b|0)){continue}break}f=0;while(1){if(cl(q[a+4>>2],c+632|0,4)){g=q[a>>2];d=q[a+12>>2];q[c+164>>2]=142870;q[c+160>>2]=d;oj(g,142885,c+160|0);Nj(q[a>>2],3)}d=q[c+632>>2];g=0;l:{if(!d){break l}i=Ks(q[a>>2],q[a+8>>2],d);if(cl(q[a+4>>2],i,q[c+632>>2])){g=q[a>>2];d=q[a+12>>2];q[c+148>>2]=142870;q[c+144>>2]=d;oj(g,142885,c+144|0);Nj(q[a>>2],3)}g=Yj(q[a>>2],i,q[c+632>>2]-1|0)}i=w(f,12);q[i+q[h+24>>2]>>2]=g;if(cl(q[a+4>>2],c+632|0,4)){g=q[a>>2];d=q[a+12>>2];q[c+132>>2]=142870;q[c+128>>2]=d;oj(g,142885,c+128|0);Nj(q[a>>2],3)}e=q[c+632>>2];if((e|0)<=-1){g=q[a>>2];d=q[a+12>>2];q[c+116>>2]=142936;q[c+112>>2]=d;oj(g,142885,c+112|0);Nj(q[a>>2],3);e=q[c+632>>2]}q[(i+q[h+24>>2]|0)+4>>2]=e;if(cl(q[a+4>>2],c+632|0,4)){g=q[a>>2];d=q[a+12>>2];q[c+100>>2]=142870;q[c+96>>2]=d;oj(g,142885,c+96|0);Nj(q[a>>2],3)}e=q[c+632>>2];if((e|0)<=-1){g=q[a>>2];d=q[a+12>>2];q[c+84>>2]=142936;q[c+80>>2]=d;oj(g,142885,c+80|0);Nj(q[a>>2],3);e=q[c+632>>2]}q[(i+q[h+24>>2]|0)+8>>2]=e;f=f+1|0;if((f|0)!=(b|0)){continue}break}}if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+68>>2]=142870;q[c+64>>2]=b;oj(d,142885,c- -64|0);Nj(q[a>>2],3)}e=q[c+632>>2];if((e|0)<=-1){d=q[a>>2];b=q[a+12>>2];q[c+52>>2]=142936;q[c+48>>2]=b;oj(d,142885,c+48|0);Nj(q[a>>2],3);e=q[c+632>>2]}b=q[a>>2];m:{if(e+1>>>0<=1073741823){d=Cj(b,0,0,e<<2);break m}d=mk(b)}q[h+36>>2]=e;q[h+28>>2]=d;b=1;if((e|0)>=1){f=0;q[d>>2]=0;if((e|0)!=1){while(1){q[q[h+28>>2]+(b<<2)>>2]=0;b=b+1|0;if((e|0)!=(b|0)){continue}break}}while(1){if(cl(q[a+4>>2],c+632|0,4)){d=q[a>>2];b=q[a+12>>2];q[c+36>>2]=142870;q[c+32>>2]=b;oj(d,142885,c+32|0);Nj(q[a>>2],3)}b=q[c+632>>2];d=0;n:{if(!b){break n}g=Ks(q[a>>2],q[a+8>>2],b);if(cl(q[a+4>>2],g,q[c+632>>2])){d=q[a>>2];b=q[a+12>>2];q[c+20>>2]=142870;q[c+16>>2]=b;oj(d,142885,c+16|0);Nj(q[a>>2],3)}d=Yj(q[a>>2],g,q[c+632>>2]-1|0)}q[q[h+28>>2]+(f<<2)>>2]=d;f=f+1|0;if((f|0)!=(e|0)){continue}break}}if(!XC(h,q[h+44>>2],255)){d=q[a>>2];b=q[a+12>>2];q[c+4>>2]=142927;q[c>>2]=b;oj(d,142885,c);Nj(q[a>>2],3)}a=q[a>>2];q[a+8>>2]=q[a+8>>2]-16;p[a+52>>1]=s[a+52>>1]-1;Ii=c+640|0;return h}function qu(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-208|0;Ii=c;k=q[a+4>>2];a:{b:{c:{switch(q[a+16>>2]-258|0){case 8:d=q[a+48>>2];q[c+176>>2]=-1;e=UC(a);while(1){b=q[a+16>>2];if((b|0)!=261){d:{if((b|0)==260){Ps(d,c+176|0,kp(d));dn(d,e);Vj(a);St(a);break d}Ps(d,c+176|0,e)}dn(d,q[c+176>>2]);Yo(a,262,266,k);break b}else{Ps(d,c+176|0,kp(d));dn(d,e);e=UC(a);continue}};default:b=q[a+48>>2];_x(a,c+184|0);if(q[c+184>>2]==13){a=q[q[b>>2]+12>>2]+(q[c+192>>2]<<2)|0;q[a>>2]=q[a>>2]&-8372225|16384;break b}q[c+176>>2]=0;dO(a,c+176|0,1);break b;case 0:Vj(a);f=q[a+48>>2];b=q[f+20>>2];e:{if(b){while(1){if(r[b+10|0]){d=b;break e}e=r[b+9|0]|e;b=q[b>>2];if(b){continue}break}}Sj(a,142481)}if(e){Bm(f,35,r[d+8|0],0,0)}Ps(f,d+4|0,kp(f));b=1;break a;case 15:f=q[a+48>>2];Vj(a);d=q[a+16>>2];b=d-260|0;f:{if(!(b>>>0>27|!(1<>2]==44){b=1;while(1){Vj(a);Mm(q[a+48>>2],c+176|0);pl(a,c+176|0,0);b=b+1|0;if(q[a+16>>2]==44){continue}break}if(q[c+176>>2]-13>>>0>=2){break h}a=b;break j}a=1;if(q[c+176>>2]-13>>>0>1){break i}}b=-1;Vu(f,c+176|0,-1);if((a|0)!=1|q[c+176>>2]!=13){break g}a=q[q[f>>2]+12>>2]+(q[c+184>>2]<<2)|0;q[a>>2]=q[a>>2]&-64|29;break g}b=1;j=rn(f,c+176|0);break f}Mm(f,c+176|0)}j=r[f+50|0]}kF(f,j,b);b=1;break a;case 10:Vj(a);e=q[a+16>>2];if((e|0)==265){Vj(a);e=q[a+48>>2];if(q[a+16>>2]!=285){b=q[a+52>>2];q[c+112>>2]=tl(a,285);Sj(a,oj(b,141919,c+112|0))}d=q[a+24>>2];Vj(a);Vm(a,d,0);d=q[e+36>>2];q[c+192>>2]=-1;q[c+196>>2]=-1;q[c+184>>2]=d;q[c+176>>2]=6;hq(e,1);f=q[a+48>>2];d=r[f+50|0]+1|0;o[f+50|0]=d;q[(q[q[f>>2]+24>>2]+w(s[(f+((d&255)<<1)|0)+170>>1],12)|0)+4>>2]=q[f+24>>2];ZB(a,c+152|0,0,q[a+4>>2]);Iy(e,c+176|0,c+152|0);q[(q[q[e>>2]+24>>2]+w(s[(e+(r[e+50|0]<<1)|0)+170>>1],12)|0)+4>>2]=q[e+24>>2];b=0;break a}while(1){if((e|0)!=285){d=q[a+52>>2];q[c+128>>2]=tl(a,285);Sj(a,oj(d,141919,c+128|0))}d=q[a+24>>2];Vj(a);Vm(a,d,b);b=b+1|0;d=q[a+16>>2];if((d|0)==44){Vj(a);e=q[a+16>>2];continue}break}k:{if((d|0)==61){Vj(a);pl(a,c+176|0,0);e=1;if(q[a+16>>2]!=44){break k}while(1){Vj(a);Mm(q[a+48>>2],c+176|0);pl(a,c+176|0,0);e=e+1|0;if(q[a+16>>2]==44){continue}break}break k}e=0;q[c+176>>2]=0}jC(q[a+48>>2],b,e,c+176|0);e=q[a+48>>2];a=r[e+50|0]+b|0;o[e+50|0]=a;f=a&255;d=q[e+24>>2];a=q[q[e>>2]+24>>2];while(1){q[(a+w(s[(e+(f-b<<1)|0)+172>>1],12)|0)+4>>2]=d;b=b-1|0;if(b){continue}break}break b;case 7:Vj(a);if(q[a+16>>2]!=285){b=q[a+52>>2];q[c+96>>2]=tl(a,285);Sj(a,oj(b,141919,c+96|0))}d=q[a+24>>2];Vj(a);b=q[a+48>>2];if((Px(b,d,c+176|0,1)|0)==8){q[c+184>>2]=gq(b,d)}while(1){f=q[a+16>>2];if((f|0)!=46){b=a;e=c+152|0;if((f|0)==58){bz(a,c+176|0);d=1}else{d=0}ZB(b,e,d,k);Iy(q[a+48>>2],c+176|0,c+152|0);a=q[a+48>>2];q[(q[q[a>>2]+20>>2]+(q[a+24>>2]<<2)|0)-4>>2]=k;break b}else{bz(a,c+176|0);continue}};case 14:i=q[a+48>>2];f=q[i+24>>2];q[i+28>>2]=f;q[c+156>>2]=-1;o[c+162|0]=1;d=r[i+50|0];o[c+161|0]=0;o[c+160|0]=d;b=q[i+20>>2];q[c+140>>2]=-1;q[c+152>>2]=b;o[c+145|0]=0;o[c+146|0]=0;o[c+144|0]=d;q[c+136>>2]=c+152;q[i+20>>2]=c+136;Vj(a);b=q[a+52>>2];d=s[b+52>>1]+1|0;p[b+52>>1]=d;if((d&65535)>>>0>=201){gm(a,141933,0)}while(1){b=q[a+16>>2]-260|0;if(!(1<>>0<=27:0)){d=qu(a);if(q[a+16>>2]==59){Vj(a)}b=q[a+48>>2];q[b+36>>2]=r[b+50|0];if(!d){continue}}break}b=q[a+52>>2];p[b+52>>1]=s[b+52>>1]-1;Yo(a,276,272,k);pl(a,c+176|0,0);if(q[c+176>>2]==1){q[c+176>>2]=3}Xu(q[a+48>>2],c+176|0);j=q[c+196>>2];l:{if(!r[c+145|0]){k=q[i+20>>2];q[i+20>>2]=q[k>>2];g=q[q[i+12>>2]+48>>2];b=r[g+50|0];h=r[k+8|0];if(b>>>0>h>>>0){e=q[g+24>>2];d=q[q[g>>2]+24>>2];while(1){b=b-1|0;q[(w(s[(g+(b<<1)|0)+172>>1],12)+d|0)+8>>2]=e;if(b>>>0>h>>>0){continue}break}o[g+50|0]=b}if(r[k+9|0]){Bm(i,35,h,0,0)}q[i+36>>2]=r[i+50|0];dn(i,q[k+4>>2]);Wu(q[a+48>>2],j,f);break l}d=0;h=q[a+48>>2];b=q[h+20>>2];m:{if(b){while(1){if(r[b+10|0]){d=b;break m}e=r[b+9|0]|e;b=q[b>>2];if(b){continue}break}}Sj(a,142481)}if(e){Bm(h,35,r[d+8|0],0,0)}Ps(h,d+4|0,kp(h));dn(q[a+48>>2],j);j=q[i+20>>2];q[i+20>>2]=q[j>>2];k=q[q[i+12>>2]+48>>2];b=r[k+50|0];h=r[j+8|0];if(b>>>0>h>>>0){e=q[k+24>>2];d=q[q[k>>2]+24>>2];while(1){b=b-1|0;q[(d+w(s[(k+(b<<1)|0)+172>>1],12)|0)+8>>2]=e;if(b>>>0>h>>>0){continue}break}o[k+50|0]=b}if(r[j+9|0]){Bm(i,35,h,0,0)}q[i+36>>2]=r[i+50|0];dn(i,q[j+4>>2]);Wu(q[a+48>>2],kp(i),f)}e=q[i+20>>2];q[i+20>>2]=q[e>>2];h=q[q[i+12>>2]+48>>2];a=r[h+50|0];f=r[e+8|0];if(a>>>0>f>>>0){d=q[h+24>>2];b=q[q[h>>2]+24>>2];while(1){a=a-1|0;q[(b+w(s[(h+(a<<1)|0)+172>>1],12)|0)+8>>2]=d;if(a>>>0>f>>>0){continue}break}o[h+50|0]=a}if(r[e+9|0]){Bm(i,35,f,0,0)}q[i+36>>2]=r[i+50|0];dn(i,q[e+4>>2]);break b;case 6:g=q[a+48>>2];o[c+162|0]=1;q[c+156>>2]=-1;b=r[g+50|0];o[c+161|0]=0;o[c+160|0]=b;q[c+152>>2]=q[g+20>>2];q[g+20>>2]=c+152;Vj(a);if(q[a+16>>2]!=285){b=q[a+52>>2];q[c+80>>2]=tl(a,285);Sj(a,oj(b,141919,c+80|0))}j=q[a+24>>2];Vj(a);n:{o:{p:{q:{r:{b=q[a+16>>2];switch(b-44|0){case 0:break o;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:break p;case 17:break r;default:break q}}f=q[a+48>>2];d=q[f+36>>2];Vm(a,Go(a,142404,11),0);Vm(a,Go(a,142416,11),1);Vm(a,Go(a,142428,10),2);Vm(a,j,3);if(q[a+16>>2]!=61){b=q[a+52>>2];q[c+32>>2]=tl(a,61);Sj(a,oj(b,141919,c+32|0))}Vj(a);pl(a,c+176|0,0);Mm(q[a+48>>2],c+176|0);if(q[a+16>>2]!=44){b=q[a+52>>2];q[c+16>>2]=tl(a,44);Sj(a,oj(b,141919,c+16|0))}Vj(a);pl(a,c+176|0,0);Mm(q[a+48>>2],c+176|0);s:{if(q[a+16>>2]==44){Vj(a);pl(a,c+176|0,0);Mm(q[a+48>>2],c+176|0);break s}Yu(f,1,q[f+36>>2],mZ(f));hq(f,1)}UF(a,d,k,1,1);break n}if((b|0)==267){break o}}Sj(a,142383);break n}h=q[a+48>>2];f=q[h+36>>2];Vm(a,Go(a,142439,15),0);e=1;Vm(a,Go(a,142455,11),1);Vm(a,Go(a,142467,13),2);Vm(a,j,3);j=q[a+16>>2];if((j|0)==44){e=4;while(1){b=e;Vj(a);if(q[a+16>>2]!=285){d=q[a+52>>2];q[c+64>>2]=tl(a,285);Sj(a,oj(d,141919,c- -64|0))}d=q[a+24>>2];Vj(a);Vm(a,d,b);e=b+1|0;j=q[a+16>>2];if((j|0)==44){continue}break}e=b-2|0}if((j|0)!=267){b=q[a+52>>2];q[c+48>>2]=tl(a,267);Sj(a,oj(b,141919,c+48|0))}Vj(a);d=q[a+4>>2];pl(a,c+176|0,0);b=1;if(q[a+16>>2]==44){while(1){Vj(a);Mm(q[a+48>>2],c+176|0);pl(a,c+176|0,0);b=b+1|0;if(q[a+16>>2]==44){continue}break}}jC(q[a+48>>2],3,b,c+176|0);qZ(h);UF(a,f,d,e,0)}Yo(a,262,264,k);e=q[g+20>>2];q[g+20>>2]=q[e>>2];h=q[q[g+12>>2]+48>>2];a=r[h+50|0];f=r[e+8|0];if(a>>>0>f>>>0){d=q[h+24>>2];b=q[q[h>>2]+24>>2];while(1){a=a-1|0;q[(b+w(s[(h+(a<<1)|0)+172>>1],12)|0)+8>>2]=d;if(a>>>0>f>>>0){continue}break}o[h+50|0]=a}if(r[e+9|0]){Bm(g,35,f,0,0)}q[g+36>>2]=r[g+50|0];dn(g,q[e+4>>2]);break b;case 1:Vj(a);St(a);Yo(a,262,259,k);break b;case 19:break c}}g=q[a+48>>2];Vj(a);d=q[g+24>>2];q[g+28>>2]=d;pl(a,c+176|0,0);if(q[c+176>>2]==1){q[c+176>>2]=3}Xu(q[a+48>>2],c+176|0);o[c+162|0]=1;q[c+156>>2]=-1;f=q[c+196>>2];b=r[g+50|0];o[c+161|0]=0;o[c+160|0]=b;q[c+152>>2]=q[g+20>>2];q[g+20>>2]=c+152;if(q[a+16>>2]!=259){b=q[a+52>>2];q[c>>2]=tl(a,259);Sj(a,oj(b,141919,c))}Vj(a);St(a);Wu(g,kp(g),d);Yo(a,262,277,k);h=q[g+20>>2];q[g+20>>2]=q[h>>2];j=q[q[g+12>>2]+48>>2];a=r[j+50|0];e=r[h+8|0];if(a>>>0>e>>>0){d=q[j+24>>2];b=q[q[j>>2]+24>>2];while(1){a=a-1|0;q[(b+w(s[(j+(a<<1)|0)+172>>1],12)|0)+8>>2]=d;if(a>>>0>e>>>0){continue}break}o[j+50|0]=a}if(r[h+9|0]){Bm(g,35,e,0,0)}q[g+36>>2]=r[g+50|0];dn(g,q[h+4>>2]);dn(g,f)}b=0}Ii=c+208|0;return b}function Rua(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,v=0,y=0,z=0,A=0,B=0,C=0,D=0,E=x(0),F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;h=Ii-16|0;v=h;Ii=h;y=q[a+408>>2];l=y+w(e,24)|0;j=q[l+4>>2];F=s[((e<<1)+a|0)+280>>1];g=d<<((F|0)==2);z=g>>>0>j>>>0?j:g;j=q[l>>2];A=(z-(g>>>0>j>>>0?j:g)>>>0)/t[l+8>>2]|0;z=A<<2;j=q[a+4>>2];g=w(z+4|0,j);H=q[q[a+136>>2]+w(r[l+13|0],2096)>>2];N=q[a+104>>2];i=q[a+92>>2];a:{if(i){g=N-(g+7&-8)|0;if((g|0)>2]){break a}q[a+104>>2]=g;C=g+i|0;break a}C=h-(g+15&-16)|0;Ii=C}if((j|0)>=1){g=(j<<2)+C|0;h=0;while(1){q[(h<<2)+C>>2]=g;g=g+z|0;h=h+1|0;if((j|0)!=(h|0)){continue}break}}b:{c:{d:{e:{if((c|0)>=1){h=d<<2;g=0;while(1){if(!r[f+g|0]){Ui(q[(g<<2)+b>>2],0,h)}g=g+1|0;if((g|0)!=(c|0)){continue}break}if((c|0)==1|(F|0)!=2){break e}g=0;if((c|0)<1){break d}while(1){if(!r[f+g|0]){break d}g=g+1|0;if((g|0)!=(c|0)){continue}break}break c}g=0;if((F|0)==2){break d}}O=y+w(e,24)|0;Q=O;R=(A|0)<1;y=0;while(1){if(!R){z=0;P=(c|0)<1;S=P|(y|0)!=0;j=0;while(1){e=0;if(!S){while(1){if(!r[e+f|0]){i=r[l+13|0];m=q[a+136>>2];d=q[a+1408>>2];f:{if((d|0)>9){break f}if(!d){q[a+1404>>2]=0}while(1){g=r[a+1388|0];g:{h:{i:{j:{if(q[a+1396>>2]){if(g&255){break j}break f}if(g&255){break j}h=q[a+1392>>2];if((h|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break f}if(!(o[a+1387|0]&1)){break i}h=q[a+1392>>2]}d=h+1|0;q[a+1392>>2]=d;g=r[(a+h|0)+1132|0];if((g|0)!=255){q[a+1400>>2]=h;q[a+1396>>2]=1}if((d|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break b}o[a+1388|0]=g;if(!g){break f}}o[a+1388|0]=g-1;q[a+1412>>2]=q[a+1412>>2]+1;d=q[a+44>>2];k:{if(d){if(d>>>0>=t[a+52>>2]){break h}q[a+44>>2]=d+1;g=r[d|0];break k}g=wj(q[a+32>>2]);if((g|0)==-1){break h}}d=g&255;break g}q[a+112>>2]=32;break f}q[a+108>>2]=1;d=0}g=q[a+1408>>2];q[a+1408>>2]=g+8;q[a+1404>>2]=q[a+1404>>2]+(d<>2];g=p[(d+((h&1023)<<1)|0)+36>>1];l:{if((g|0)>=0){i=h;h=r[g+q[d+8>>2]|0];q[a+1404>>2]=i>>>h;i=q[a+1408>>2]-h|0;h=(i|0)<0;q[a+1408>>2]=h?0:i;g=h?-1:g;break l}g=yq(a,d)}g=r[d+23|0]?q[q[d+2088>>2]+(g<<2)>>2]:g;if((g|0)==-1){break c}q[q[(e<<2)+C>>2]+(z<<2)>>2]=q[q[O+16>>2]+(g<<2)>>2]}e=e+1|0;if((e|0)!=(c|0)){continue}break}}m:{if((j|0)>=(A|0)){break m}n=0;if((H|0)<1){break m}while(1){i=0;if(!P){while(1){n:{if(r[f+i|0]){break n}g=i<<2;d=p[(q[Q+20>>2]+(r[q[q[g+C>>2]+(z<<2)>>2]+n|0]<<4)|0)+(y<<1)>>1];if((d|0)<0){break n}d=q[a+136>>2]+w(d&65535,2096)|0;e=q[l+8>>2];h=q[l>>2]+w(e,j)|0;I=q[b+g>>2];if(F){if((e|0)<1){break n}k=0;while(1){g=vN(a,d);if((g|0)<0){break c}L=I+(h<<2)|0;m=q[d>>2];B=e-k|0;B=(m|0)<(B|0)?m:B;M=w(g,m);o:{if(r[d+22|0]){if((B|0)<1){break o}D=q[d+28>>2];g=0;E=x(0);while(1){K=L+(g<<2)|0;E=x(E+u[D+(g+M<<2)>>2]);u[K>>2]=u[K>>2]+E;E=x(E+u[d+12>>2]);g=g+1|0;if((B|0)!=(g|0)){continue}break}break o}if((B|0)<1){break o}D=q[d+28>>2];g=0;while(1){K=L+(g<<2)|0;u[K>>2]=u[K>>2]+x(u[D+(g+M<<2)>>2]+x(0));g=g+1|0;if((B|0)!=(g|0)){continue}break}}h=h+m|0;k=k+m|0;if((e|0)>(k|0)){continue}break}break n}m=(e|0)/q[d>>2]|0;if((m|0)<1){break n}L=I+(h<<2)|0;M=e-h|0;e=0;while(1){k=vN(a,d);if((k|0)<0){break c}g=q[d>>2];h=M-e|0;h=(g|0)<(h|0)?g:h;p:{if((h|0)<1){break p}B=L+(e<<2)|0;k=w(g,k);I=q[d+28>>2];E=x(0);g=0;if(!r[d+22|0]){while(1){D=B+(w(g,m)<<2)|0;u[D>>2]=u[D>>2]+x(u[I+(g+k<<2)>>2]+x(0));g=g+1|0;if((h|0)!=(g|0)){continue}break p}}while(1){D=B+(w(g,m)<<2)|0;E=x(E+u[I+(g+k<<2)>>2]);u[D>>2]=u[D>>2]+E;g=g+1|0;if((h|0)!=(g|0)){continue}break}}e=e+1|0;if((m|0)!=(e|0)){continue}break}}i=i+1|0;if((i|0)!=(c|0)){continue}break}}j=j+1|0;if((A|0)<=(j|0)){break m}n=n+1|0;if((H|0)>(n|0)){continue}break}}z=z+1|0;if((j|0)<(A|0)){continue}break}}y=y+1|0;if((y|0)!=8){continue}break}break c}if((c|0)==(g|0)){break c}m=(A|0)<1;B=m|(c|0)<3;y=y+w(e,24)|0;z=y;F=(c|0)!=2;j=0;while(1){q:{if(!F){if(m){break q}h=0;f=0;while(1){e=q[l>>2]+w(q[l+8>>2],h)|0;q[v+12>>2]=e&1;q[v+8>>2]=e>>1;if(!j){i=r[l+13|0];n=q[a+136>>2];e=q[a+1408>>2];r:{if((e|0)>9){break r}if(!e){q[a+1404>>2]=0}while(1){g=r[a+1388|0];s:{t:{u:{v:{if(q[a+1396>>2]){if(g&255){break v}break r}if(g&255){break v}e=q[a+1392>>2];if((e|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break r}if(!(o[a+1387|0]&1)){break u}e=q[a+1392>>2]}k=e+1|0;q[a+1392>>2]=k;g=r[(a+e|0)+1132|0];if((g|0)!=255){q[a+1400>>2]=e;q[a+1396>>2]=1}if((k|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break b}o[a+1388|0]=g;if(!g){break r}}o[a+1388|0]=g-1;q[a+1412>>2]=q[a+1412>>2]+1;e=q[a+44>>2];w:{if(e){if(e>>>0>=t[a+52>>2]){break t}q[a+44>>2]=e+1;g=r[e|0];break w}g=wj(q[a+32>>2]);if((g|0)==-1){break t}}e=g&255;break s}q[a+112>>2]=32;break r}q[a+108>>2]=1;e=0}g=q[a+1408>>2];q[a+1408>>2]=g+8;q[a+1404>>2]=q[a+1404>>2]+(e<>2];g=p[(e+((k&1023)<<1)|0)+36>>1];x:{if((g|0)>=0){i=r[g+q[e+8>>2]|0];q[a+1404>>2]=k>>>i;n=q[a+1408>>2]-i|0;i=(n|0)<0;q[a+1408>>2]=i?0:n;g=i?-1:g;break x}g=yq(a,e)}g=r[e+23|0]?q[q[e+2088>>2]+(g<<2)>>2]:g;if((g|0)==-1){break c}q[q[C>>2]+(f<<2)>>2]=q[q[y+16>>2]+(g<<2)>>2]}y:{if((h|0)>=(A|0)){break y}g=0;if((H|0)<1){break y}while(1){e=q[l+8>>2];i=p[(q[z+20>>2]+(r[q[q[C>>2]+(f<<2)>>2]+g|0]<<4)|0)+(j<<1)>>1];z:{if((i|0)>=0){if(wN(a,q[a+136>>2]+w(i&65535,2096)|0,b,2,v+12|0,v+8|0,d,e)){break z}break c}e=q[l>>2]+(e+w(e,h)|0)|0;q[v+8>>2]=e>>1;q[v+12>>2]=e&1}h=h+1|0;if((A|0)<=(h|0)){break y}g=g+1|0;if((H|0)>(g|0)){continue}break}}f=f+1|0;if((h|0)<(A|0)){continue}break}break q}if(B){break q}h=0;f=0;while(1){g=q[l>>2]+w(q[l+8>>2],h)|0;e=(g|0)/(c|0)|0;q[v+12>>2]=g-w(c,e);q[v+8>>2]=e;if(!j){i=r[l+13|0];n=q[a+136>>2];e=q[a+1408>>2];A:{if((e|0)>9){break A}if(!e){q[a+1404>>2]=0}while(1){g=r[a+1388|0];B:{C:{D:{E:{if(q[a+1396>>2]){if(g&255){break E}break A}if(g&255){break E}e=q[a+1392>>2];if((e|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break A}if(!(o[a+1387|0]&1)){break D}e=q[a+1392>>2]}k=e+1|0;q[a+1392>>2]=k;g=r[(a+e|0)+1132|0];if((g|0)!=255){q[a+1400>>2]=e;q[a+1396>>2]=1}if((k|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break b}o[a+1388|0]=g;if(!g){break A}}o[a+1388|0]=g-1;q[a+1412>>2]=q[a+1412>>2]+1;e=q[a+44>>2];F:{if(e){if(e>>>0>=t[a+52>>2]){break C}q[a+44>>2]=e+1;g=r[e|0];break F}g=wj(q[a+32>>2]);if((g|0)==-1){break C}}e=g&255;break B}q[a+112>>2]=32;break A}q[a+108>>2]=1;e=0}g=q[a+1408>>2];q[a+1408>>2]=g+8;q[a+1404>>2]=q[a+1404>>2]+(e<>2];g=p[(e+((k&1023)<<1)|0)+36>>1];G:{if((g|0)>=0){i=r[g+q[e+8>>2]|0];q[a+1404>>2]=k>>>i;n=q[a+1408>>2]-i|0;i=(n|0)<0;q[a+1408>>2]=i?0:n;g=i?-1:g;break G}g=yq(a,e)}g=r[e+23|0]?q[q[e+2088>>2]+(g<<2)>>2]:g;if((g|0)==-1){break c}q[q[C>>2]+(f<<2)>>2]=q[q[y+16>>2]+(g<<2)>>2]}H:{if((h|0)>=(A|0)){break H}g=0;if((H|0)<1){break H}while(1){e=q[l+8>>2];i=p[(q[z+20>>2]+(r[q[q[C>>2]+(f<<2)>>2]+g|0]<<4)|0)+(j<<1)>>1];I:{if((i|0)>=0){if(wN(a,q[a+136>>2]+w(i&65535,2096)|0,b,c,v+12|0,v+8|0,d,e)){break I}break c}e=q[l>>2]+(e+w(e,h)|0)|0;i=(e|0)/(c|0)|0;q[v+8>>2]=i;q[v+12>>2]=e-w(c,i)}h=h+1|0;if((A|0)<=(h|0)){break H}g=g+1|0;if((H|0)>(g|0)){continue}break}}f=f+1|0;if((h|0)<(A|0)){continue}break}}j=j+1|0;if((j|0)!=8){continue}break}}q[a+104>>2]=N;Ii=v+16|0;return}J(211824,211687,1555,211845);G()}function lx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-16|0;Ii=d;a:while(1){l=b-4|0;j=b-12|0;b:while(1){f=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{e=b-f|0;switch((e|0)/12|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}if(t[q[b-4>>2]+116>>2]>=t[q[f+8>>2]+116>>2]){break d}q[d+8>>2]=q[f+8>>2];a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;a=b-12|0;q[f+8>>2]=q[a+8>>2];b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;q[a+8>>2]=q[d+8>>2];b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}c=b-12|0;a=f+12|0;g=b-4|0;b=q[q[g>>2]+116>>2];e=q[q[f+20>>2]+116>>2];if(e>>>0>=t[q[f+8>>2]+116>>2]){if(b>>>0>=e>>>0){break d}q[d+8>>2]=q[a+8>>2];b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;q[a+8>>2]=q[c+8>>2];b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;q[c+8>>2]=q[d+8>>2];b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;if(t[q[f+20>>2]+116>>2]>=t[q[f+8>>2]+116>>2]){break d}q[d+8>>2]=q[f+8>>2];b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;q[f+8>>2]=q[a+8>>2];b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;q[a+8>>2]=q[d+8>>2];b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if(b>>>0>>0){q[d+8>>2]=q[f+8>>2];a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;q[f+8>>2]=q[c+8>>2];a=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=a;q[c+8>>2]=q[d+8>>2];a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}q[d+8>>2]=q[f+8>>2];b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;q[f+8>>2]=q[a+8>>2];b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;q[a+8>>2]=q[d+8>>2];b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;if(t[q[g>>2]+116>>2]>=t[q[f+20>>2]+116>>2]){break d}q[d+8>>2]=q[a+8>>2];b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;q[a+8>>2]=q[c+8>>2];b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;q[c+8>>2]=q[d+8>>2];a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;break d}a=f+12|0;c=f+24|0;e=f+36|0;_r(f,a,c,e);if(t[q[b-4>>2]+116>>2]>=t[q[f+44>>2]+116>>2]){break d}q[d+8>>2]=q[e+8>>2];g=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=g;b=b-12|0;q[e+8>>2]=q[b+8>>2];g=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=g;q[b+8>>2]=q[d+8>>2];g=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=g;if(t[q[f+44>>2]+116>>2]>=t[q[f+32>>2]+116>>2]){break d}q[d+8>>2]=q[c+8>>2];b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;q[c+8>>2]=q[e+8>>2];b=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=b;q[e+8>>2]=q[d+8>>2];b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;if(t[q[f+32>>2]+116>>2]>=t[q[f+20>>2]+116>>2]){break d}q[d+8>>2]=q[a+8>>2];b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;q[a+8>>2]=q[c+8>>2];b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;q[c+8>>2]=q[d+8>>2];b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;if(t[q[f+20>>2]+116>>2]>=t[q[f+8>>2]+116>>2]){break d}q[d+8>>2]=q[f+8>>2];b=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=b;q[f+8>>2]=q[a+8>>2];b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;q[a+8>>2]=q[d+8>>2];b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;break d}if((e|0)<=371){BP(f,b);break d}l:{if((e|0)>=11989){g=w((e>>>0)/48|0,12);a=g+f|0;i=w((e>>>0)/24|0,12);h=i+f|0;e=g+h|0;k=_r(f,a,h,e);if(t[q[l>>2]+116>>2]>=t[q[e+8>>2]+116>>2]){break l}q[d+8>>2]=q[e+8>>2];g=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=g;q[e+8>>2]=q[j+8>>2];g=q[j+4>>2];q[e>>2]=q[j>>2];q[e+4>>2]=g;q[j+8>>2]=q[d+8>>2];g=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=g;g=f+i|0;if(t[q[e+8>>2]+116>>2]>=t[q[g+8>>2]+116>>2]){k=k+1|0;break l}q[d+8>>2]=q[h+8>>2];i=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=i;q[h+8>>2]=q[e+8>>2];i=q[e+4>>2];q[h>>2]=q[e>>2];q[h+4>>2]=i;q[e+8>>2]=q[d+8>>2];i=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=i;if(t[q[g+8>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){k=k+2|0;break l}q[d+8>>2]=q[a+8>>2];e=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=e;q[a+8>>2]=q[h+8>>2];e=q[h+4>>2];q[a>>2]=q[h>>2];q[a+4>>2]=e;q[h+8>>2]=q[d+8>>2];e=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=e;if(t[q[a+8>>2]+116>>2]>=t[q[f+8>>2]+116>>2]){k=k+3|0;break l}q[d+8>>2]=q[f+8>>2];e=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=e;q[f+8>>2]=q[a+8>>2];e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;q[a+8>>2]=q[d+8>>2];e=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=e;k=k+4|0;break l}h=w(((e&65535)>>>0)/24|0,12)+f|0;a=h;e=q[q[a+8>>2]+116>>2];m:{if(e>>>0>=t[q[f+8>>2]+116>>2]){k=0;if(e>>>0<=t[q[l>>2]+116>>2]){break l}q[d+8>>2]=q[a+8>>2];e=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=e;q[a+8>>2]=q[j+8>>2];e=q[j+4>>2];q[h>>2]=q[j>>2];q[h+4>>2]=e;q[j+8>>2]=q[d+8>>2];e=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=e;k=1;if(t[q[a+8>>2]+116>>2]>=t[q[f+8>>2]+116>>2]){break l}q[d+8>>2]=q[f+8>>2];e=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=e;q[f+8>>2]=q[a+8>>2];e=q[h+4>>2];q[f>>2]=q[h>>2];q[f+4>>2]=e;q[a+8>>2]=q[d+8>>2];a=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=a;break m}if(e>>>0>t[q[l>>2]+116>>2]){q[d+8>>2]=q[f+8>>2];a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;q[f+8>>2]=q[j+8>>2];a=q[j+4>>2];q[f>>2]=q[j>>2];q[f+4>>2]=a;q[j+8>>2]=q[d+8>>2];a=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=a;k=1;break l}q[d+8>>2]=q[f+8>>2];e=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=e;q[f+8>>2]=q[a+8>>2];e=q[h+4>>2];q[f>>2]=q[h>>2];q[f+4>>2]=e;q[a+8>>2]=q[d+8>>2];e=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=e;k=1;if(t[q[l>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){break l}q[d+8>>2]=q[a+8>>2];e=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=e;q[a+8>>2]=q[j+8>>2];a=q[j+4>>2];q[h>>2]=q[j>>2];q[h+4>>2]=a;q[j+8>>2]=q[d+8>>2];a=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=a}k=2}a=j;g=q[q[f+8>>2]+116>>2];i=q[q[h+8>>2]+116>>2];n:{if(g>>>0>>0){e=j;break n}while(1){e=a-12|0;if((e|0)==(f|0)){i=f+12|0;if(g>>>0>2]+116>>2]){break e}if((i|0)==(j|0)){break d}while(1){if(g>>>0>2]+116>>2]){q[d+8>>2]=q[i+8>>2];a=q[i+4>>2];q[d>>2]=q[i>>2];q[d+4>>2]=a;q[i+8>>2]=q[j+8>>2];a=q[j+4>>2];q[i>>2]=q[j>>2];q[i+4>>2]=a;q[j+8>>2]=q[d+8>>2];a=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=a;i=i+12|0;break e}i=i+12|0;if((j|0)!=(i|0)){continue}break}break d}m=a-4|0;a=e;if(i>>>0<=t[q[m>>2]+116>>2]){continue}break}q[d+8>>2]=q[f+8>>2];a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;q[f+8>>2]=q[e+8>>2];a=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=a;q[e+8>>2]=q[d+8>>2];a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;k=k+1|0}g=f+12|0;if(g>>>0>=e>>>0){break f}while(1){m=q[q[h+8>>2]+116>>2];while(1){i=g;g=g+12|0;if(m>>>0>t[q[i+8>>2]+116>>2]){continue}break}a=e;while(1){n=a-4|0;e=a-12|0;a=e;if(m>>>0<=t[q[n>>2]+116>>2]){continue}break}if(e>>>0>>0){g=i;break f}else{q[d+8>>2]=q[i+8>>2];a=q[i+4>>2];q[d>>2]=q[i>>2];q[d+4>>2]=a;q[i+8>>2]=q[e+8>>2];a=q[e+4>>2];q[i>>2]=q[e>>2];q[i+4>>2]=a;q[e+8>>2]=q[d+8>>2];a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;h=(h|0)==(i|0)?e:h;k=k+1|0;continue}}}_r(f,f+12|0,f+24|0,b-12|0);break d}if(!((g|0)==(h|0)|t[q[h+8>>2]+116>>2]>=t[q[g+8>>2]+116>>2])){q[d+8>>2]=q[g+8>>2];a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;q[g+8>>2]=q[h+8>>2];a=q[h+4>>2];q[g>>2]=q[h>>2];q[g+4>>2]=a;q[h+8>>2]=q[d+8>>2];a=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=a;k=k+1|0}if(!k){e=HN(f,g);a=g+12|0;if(HN(a,b)){b=g;a=f;if(!e){continue a}break d}if(e){continue b}}if(((g-f|0)/12|0)<((b-g|0)/12|0)){lx(f,g,c);a=g+12|0;continue b}lx(g+12|0,b,c);b=g;a=f;continue a}e=j;if((i|0)==(e|0)){break d}while(1){h=q[q[f+8>>2]+116>>2];while(1){g=i;i=g+12|0;if(h>>>0>=t[q[g+8>>2]+116>>2]){continue}break}a=e;while(1){k=a-4|0;e=a-12|0;a=e;if(h>>>0>2]+116>>2]){continue}break}if(e>>>0<=g>>>0){f=g;continue c}else{q[d+8>>2]=q[g+8>>2];a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;q[g+8>>2]=q[e+8>>2];a=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=a;q[e+8>>2]=q[d+8>>2];a=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=a;continue}}}break}break}break}Ii=d+16|0}function lG(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=0,k=0,l=0,m=0,n=x(0),v=0,z=x(0),C=x(0),E=x(0),F=x(0),H=0,I=0,K=0,L=0,M=x(0),N=0,O=0,P=0,Q=0,R=0,S=0,T=0;h=Ii-96|0;Ii=h;q[h+56>>2]=0;a:{b:{if(!q[a+8>>2]){break b}c=q[q[239672]+16>>2];c:{if(!c){b=s[a+42>>1];break c}Gj(c);b=s[a+42>>1];Bj(c)}d:{c=r[a+33955|0];if(c){o[a+33955|0]=0;if(b){break d}R=-14;break b}if(c){break b}if(b){break d}R=-14;break b}if(!r[a+33954|0]){Mi[q[q[a+4>>2]+24>>2]](q[a+8>>2]);o[a+33954|0]=1}O=q[q[239672]+16>>2];if(O){Gj(O)}P=Mi[q[q[a+4>>2]+16>>2]](q[a+8>>2])|0;if(P){c=q[239672];while(1){b=c+w(d,1056)|0;if(q[b+132>>2]){L=q[b+128>>2];q[b+120>>2]=q[b+124>>2];q[b+124>>2]=L}d=d+1|0;if((d|0)!=32){continue}break}d=q[c+24>>2];c=q[c+20>>2];b=d-c|0;if(b){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>6|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;while(1){b=c+(k<<6)|0;if(!(q[b+44>>2]?0:!(r[b+60|0]&4))){L=q[b+24>>2];q[b+16>>2]=q[b+20>>2];q[b+20>>2]=L;i=u[b+32>>2];u[b+32>>2]=u[b+36>>2];u[b+28>>2]=i}k=k+1|0;if((d|0)!=(k|0)){continue}break}}L=P;while(1){q[h+52>>2]=P;q[h+48>>2]=S;q[h+64>>2]=0;K=q[239672];k=0;while(1){b=K+w(k,1056)|0;c=q[b+132>>2];if(c){g=q[K+33920>>2];e:{if(!g){n=x(0);i=x(0);M=x(0);E=x(0);break e}z=u[b+124>>2];d=0;E=x(0);M=x(0);i=x(0);n=x(0);while(1){f=d<<3;F=x(z*u[f+c>>2]);F=x(F*F);i=i>F?i:F;C=x(z*u[c+(f|4)>>2]);C=x(C*C);n=n>C?n:C;E=x(E+F);M=x(M+C);d=d+1|0;if((g|0)!=(d|0)){continue}break}}f=b+136|0;l=b+1160|0;j=q[l>>2];d=j<<3;u[f+d>>2]=E;e=f;f=d|4;u[e+f>>2]=M;b=b+648|0;u[b+d>>2]=i;u[b+f>>2]=n;q[l>>2]=j+1&63;Ui(c,0,g<<3)}k=k+1|0;if((k|0)!=32){continue}break}f:{g:{h:{i:{j:{k:{c=q[K+24>>2];d=q[K+20>>2];b=c-d|0;if(!b){break k}if((c|0)!=(d|0)){c=d-c|0;c=((b|0)<(c|0)?c:b)>>>6|0;b=(b|0)>-1?b:-1;b=w(c,(b|0)<1?b:1);T=b>>>0>1?b:1;k=0;while(1){b=(k<<6)+d|0;v=b;e=r[b+60|0];if(!(q[b+44>>2]?0:!(e&4))){d=q[239672];q[h+84>>2]=0;D1(q[b>>2],h+72|0);l:{m:{n:{o:{m=r[h+81|0];switch(m-8|0){case 0:case 8:break o;default:break n}}H=r[h+80|0];if((H-1&255)>>>0<2){break m}}c=q[d+48>>2];e=q[d+52>>2]-c>>5;d=s[b+58>>1];if(e>>>0<=d>>>0){break a}c=c+(d<<5)|0;q[h>>2]=aj(q[c>>2],q[c+4>>2]);q[h+4>>2]=r[h+81|0];q[h+8>>2]=r[h+80|0];Pi(4,209937,210475,h);o[v+60|0]=r[v+60|0]&251;break l}c=q[h+72>>2];g=q[d+33916>>2];if(c>>>0>g>>>0){f=s[b+58>>1];e=q[d+52>>2];d=q[d+48>>2];if(f>>>0>=e-d>>5>>>0){break a}d=d+(f<<5)|0;q[h+24>>2]=aj(q[d>>2],q[d+4>>2]);q[h+20>>2]=g;q[h+16>>2]=c;Pi(4,209937,210550,h+16|0);o[v+60|0]=r[v+60|0]&251;break l}l=1;i=u[b+40>>2];p:{if(!(q[b+24>>2]|(q[b+16>>2]|q[b+20>>2]))|i==x(0)){break p}g=q[239672];c=q[g+80>>2];q:{if(!c){break q}j=q[g+76>>2];I=q[b+8>>2];N=q[b+12>>2];e=q[j+(Cza(I,N,c)<<2)>>2];r:{if((e|0)==-1){break r}Q=q[g+84>>2];while(1){f=Q+(e<<4)|0;if(q[f>>2]!=(I|0)|q[f+4>>2]!=(N|0)){e=q[f+12>>2];if((e|0)!=-1){continue}break r}break}f=g+w(q[f+8>>2],1056)|0;if(!(q[f+124>>2]|q[f+120>>2]|q[f+128>>2])){break p}}f=q[239670];I=q[239671];e=q[j+(Cza(f,I,c)<<2)>>2];if((e|0)==-1){break q}j=q[g+84>>2];while(1){c=j+(e<<4)|0;if(q[c>>2]!=(f|0)|q[c+4>>2]!=(I|0)){e=q[c+12>>2];if((e|0)!=-1){continue}break q}break}c=g+w(q[c+8>>2],1056)|0;if(!(q[c+124>>2]|q[c+120>>2]|q[c+128>>2])){break p}}l=0}s:{f=!(r[v+60|0]&4);e=q[b+44>>2];g=e;i=x(D(x(x(B(i,x(1)))*x(t[d+33920>>2]))));t:{if(i=x(0)){c=~~i>>>0;break t}c=0}if(f|g>>>0>=c>>>0){break s}f=c-e|0;g=w(H,m>>>3|0);j=q[b>>2];m=q[d>>2];u:{if(!l){f=jG(j,q[b+4>>2]+w(e,g)|0,w(f,g),h+84|0);break u}e=j;j=w(f,g);f=iG(m,e,j,h+84|0);Ui(q[b+4>>2]+w(g,q[b+44>>2])|0,0,j)}e=q[h+84>>2];j=(e>>>0)/(g>>>0)|0;if(e-w(g,j)|0){break j}e=j+q[b+44>>2]|0;q[b+44>>2]=e;v:{if(c>>>0<=e>>>0){break v}j=r[v+60|0];if(!(!(j&1)|!r[b+61|0])){fr(q[b>>2]);f=o[b+61|0];if((f|0)>=1){o[b+61|0]=f-1}j=q[b+44>>2];c=c-j|0;f=q[b>>2];e=q[d>>2];w:{if(!l){f=jG(f,q[b+4>>2]+w(g,j)|0,w(c,g),h+84|0);break w}c=w(c,g);f=iG(e,f,c,h+84|0);Ui(q[b+4>>2]+w(g,q[b+44>>2])|0,0,c)}l=q[h+84>>2];c=(l>>>0)/(g>>>0)|0;if(l-w(c,g)|0){break i}e=c+q[b+44>>2]|0;q[b+44>>2]=e;break v}if(!(u[b+40>>2]>x(e>>>0)^1)){q[b+44>>2]=0;e=0}o[v+60|0]=j|2}if(!f){break s}c=q[d+48>>2];e=q[d+52>>2]-c>>5;d=s[b+58>>1];if(e>>>0<=d>>>0){break a}c=c+(d<<5)|0;c=aj(q[c>>2],q[c+4>>2]);q[h+36>>2]=f;q[h+32>>2]=c;Pi(3,209937,210660,h+32|0);o[v+60|0]=r[v+60|0]&251;break l}if(e){q[h+88>>2]=0;c=q[b+44>>2];d=c>>>1|0;i=x(+(c<<31>>>0)+ +(d>>>0)*4294967296);n=u[b+40>>2];c=q[h+72>>2];g=c>>>1|0;m=q[239672];d=q[m+33916>>2];i=x(i/x(n*x(+(Bza(c<<31,g,d)>>>0)+0)));x:{if(i=x(0)){g=~~i>>>0;break x}g=0}y:{z:{f=q[m+80>>2];A:{if(!f){break A}l=q[b+8>>2];j=q[b+12>>2];e=q[q[m+76>>2]+(Cza(l,j,f)<<2)>>2];if((e|0)==-1){break A}f=q[m+33920>>2];g=f>>>0>g>>>0?g:f;f=q[m+84>>2];while(1){H=f+(e<<4)|0;e=H;if((l|0)==q[e>>2]&(j|0)==q[e+4>>2]){break z}e=q[H+12>>2];if((e|0)!=-1){continue}break}}Pi(4,209937,210702,0);break y}if(c>>>0>d>>>0){break h}e=0;I=r[h+80|0];N=r[h+81|0];Q=h+48|0;f=b;j=c;l=d;H=q[(m+w(q[H+8>>2],1056)|0)+132>>2];B:{if(!((c|0)!=(d|0)|n!=x(1))){while(1){c=w(e,12);if((N|0)!=q[(c+958752|0)+4>>2]|(I|0)!=q[c+958752>>2]){e=e+1|0;continue}else{c=c+958760|0;break B}}}while(1){c=w(e,12);if(!((I|0)==q[c+958704>>2]?(N|0)==q[(c+958704|0)+4>>2]:0)){e=e+1|0;continue}break}c=c+958712|0}Mi[q[c>>2]](Q,f,j,l,H,g)}if(t[b+44>>2]>1){break l}}if(!(r[v+60|0]&2)){break l}q[b+44>>2]=0}e=r[v+60|0]}if(!(q[b+44>>2]|!(e&2))){o[v+60|0]=e&251}k=k+1|0;if((T|0)==(k|0)){break k}d=q[K+20>>2];if(q[K+24>>2]-d>>6>>>0>k>>>0){continue}break}}break a}q[h+72>>2]=0;g=q[239672];c=((s[g+33952>>1]<<2)+g|0)+33928|0;b=q[g+84>>2];j=q[239670];e=q[239671];k=q[q[g+76>>2]+(Cza(j,e,q[g+80>>2])<<2)>>2];d=b+(k<<4)|0;if(q[d>>2]!=(j|0)|(e|0)!=q[d+4>>2]){while(1){k=q[(b+(k<<4)|0)+12>>2];d=b+(k<<4)|0;if((j|0)!=q[d>>2]|(e|0)!=q[d+4>>2]){continue}break}}v=q[c>>2];f=q[g+33920>>2];b=g+w(q[(b+(k<<4)|0)+8>>2],1056)|0;i=u[b+124>>2];n=u[b+120>>2];if(!(q[b+128>>2]|(q[b+124>>2]|q[b+120>>2]))){break g}c=b;l=q[b+132>>2];M=x(x(1)/x(f>>>0));if(f){n=x(t[h+48>>2]);E=x(t[h+52>>2]);k=0;while(1){d=g+w(k,1056)|0;K=q[d+132>>2];C:{if(!K|(j|0)==q[d+112>>2]&(e|0)==q[d+116>>2]){break C}z=u[d+124>>2];i=u[d+120>>2];if(!(q[d+128>>2]|(q[d+124>>2]|q[d+120>>2]))){break C}z=x(x(z-i)/E);i=x(x(z*n)+i);z=x(x(z+i)-i);d=0;while(1){m=d<<3;H=m|4;F=u[H+K>>2];I=l+m|0;C=x(i+x(z*x(M*x(d|0))));C=C>2]=u[I>>2]+x(u[m+K>>2]*C);m=l+H|0;u[m>>2]=u[m>>2]+x(F*C);d=d+1|0;if((f|0)!=(d|0)){continue}break}}k=k+1|0;if((k|0)!=32){continue}break}i=u[c+124>>2];n=u[b+120>>2]}if(!f){break f}i=x(x(i-n)/x(t[h+52>>2]));z=i;i=x(n+x(i*x(t[h+48>>2])));n=x(x(z+i)-i);d=0;while(1){c=d<<1|1;E=u[l+(c<<2)>>2];e=v+(d<<2)|0;z=x(i+x(n*x(M*x(d|0))));F=x(B(x(A(x(u[l+(d<<3)>>2]*z),x(32767))),x(-32768)));D:{if(x(y(F))>1]=b;b=v+(c<<1)|0;E=x(B(x(A(x(E*z),x(32767))),x(-32768)));E:{if(x(y(E))>1]=c;d=d+1|0;if((f|0)!=(d|0)){continue}break}break f}J(210626,210166,1196,210648);G()}J(210626,210166,1222,210648);G()}J(210724,210166,1073,210741);G()}Ui(v,0,f<<2)}Mi[q[q[a+4>>2]+12>>2]](q[a+8>>2],q[((s[a+33952>>1]<<2)+a|0)+33928>>2],q[a+33920>>2])|0;p[a+33952>>1]=(s[a+33952>>1]+1>>>0)%6;S=S+1|0;L=L-1|0;if(L){continue}break}}if(!O){break b}Bj(O)}Ii=h+96|0;return R}J(211004,210835,479,211015);G()}function OQ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;i=Ii-2512|0;Ii=i;q[a+28>>2]=1;q[a+16>>2]=b;q[a+20>>2]=b;q[a+24>>2]=b+c;a:{b:{c:{if(!d){break c}c=q[a>>2];f=q[a+4>>2];d:{if(c>>>0>=f>>>0){d=c;c=0;break d}d=c+1|0;q[a>>2]=d;c=r[c|0]}e:{if(d>>>0>=f>>>0){e=d;break e}e=d+1|0;q[a>>2]=e;g=r[d|0]}if(e>>>0>=f>>>0){q[213145]=169845;break b}if(((c<<8|g)>>>0)%31|0){q[213145]=169845;break b}if(g&32){q[213145]=169845;break b}if((c&15)==8){break c}q[213145]=169845;break b}q[a+8>>2]=0;q[a+12>>2]=0;m=a+2052|0;n=a+32|0;d=0;while(1){l=q[a+12>>2];c=d;f:{if((d|0)>0){break f}while(1){if(l>>>d|0){q[a>>2]=q[a+4>>2];c=d;break f}c=a;e=q[a>>2];if(e>>>0>2]){q[a>>2]=e+1;e=r[e|0]}else{e=0}l=e<>2]=l;c=d+8|0;q[a+8>>2]=c;e=(d|0)<17;d=c;if(e){continue}break}}e=l>>>1|0;q[a+12>>2]=e;d=c-1|0;q[a+8>>2]=d;g=d;g:{if((c|0)>2){break g}while(1){if(e>>>d|0){q[a>>2]=q[a+4>>2];g=d;break g}c=a;f=q[a>>2];if(f>>>0>2]){q[a>>2]=f+1;f=r[f|0]}else{f=0}e=f<>2]=e;g=d+8|0;q[a+8>>2]=g;c=(d|0)<17;d=g;if(c){continue}break}}f=e>>>2|0;q[a+12>>2]=f;c=g-2|0;q[a+8>>2]=c;j=0;h:{i:{j:{switch(e&3){case 0:e=c&7;if(e){d=c;k:{if((e|0)<=(d|0)){break k}while(1){if(f>>>c|0){q[a>>2]=q[a+4>>2];d=c;break k}d=a;g=q[a>>2];if(g>>>0>2]){q[a>>2]=g+1;g=r[g|0]}else{g=0}f=g<>2]=f;d=c+8|0;q[a+8>>2]=d;g=(c|0)<17;c=d;if(g){continue}break}}f=f>>>e|0;q[a+12>>2]=f;c=d-e|0;q[a+8>>2]=c}d=0;l:{m:{n:{o:{p:{q:{if((c|0)>=1){while(1){g=d;o[(i+488|0)+d|0]=f;e=c;c=c-8|0;f=f>>>8|0;d=d+1|0;if((e|0)>8){continue}break}q[a+12>>2]=f;q[a+8>>2]=c;if((e|0)==8){break q}d=169845;break n}if((c|0)>=0){break p}d=169845;break n}if(g>>>0>2){break o}}g=q[a+4>>2];c=q[a>>2];while(1){f=0;if(c>>>0>>0){e=c+1|0;q[a>>2]=e;f=r[c|0];c=e}o[(i+488|0)+d|0]=f;d=d+1|0;if((d|0)!=4){continue}break}}e=r[i+488|0]|r[i+489|0]<<8;d=169845;if((r[i+490|0]|r[i+491|0]<<8)!=(e^65535)){break n}c=q[a>>2];d=169845;if(t[a+4>>2]>>0){break n}g=q[a+24>>2];if(g>>>0>=b+e>>>0){break l}d=169845;if(!q[a+28>>2]){break n}c=q[a+20>>2];f=b-c|0;d=169512;if(e>>>0>(f^-1)>>>0){break n}b=g-c|0;g=e+f|0;if(b>>>0>>0){while(1){d=169512;if((b|0)<0){break n}b=b<<1;if(g>>>0>b>>>0){continue}break}}c=ul(c,b);if(c){break m}d=169512}q[213145]=d;break b}q[a+20>>2]=c;q[a+24>>2]=b+c;b=c+f|0;q[a+16>>2]=b;c=q[a>>2]}Ti(b,c,e);q[a>>2]=e+q[a>>2];b=e+q[a+16>>2]|0;break h;case 1:if(!cs(n,170352,288)){break b}if(!cs(m,170640,32)){break b}break i;case 3:break a;default:break j}}e=c;r:{if((g|0)>6){break r}while(1){if(f>>>c|0){q[a>>2]=q[a+4>>2];e=c;break r}b=a;d=q[a>>2];if(d>>>0>2]){q[a>>2]=d+1;d=r[d|0]}else{d=0}f=d<>2]=f;e=c+8|0;q[a+8>>2]=e;b=(c|0)<17;c=e;if(b){continue}break}}d=f>>>5|0;q[a+12>>2]=d;b=e-5|0;q[a+8>>2]=b;g=b;s:{if((e|0)>9){break s}while(1){if(d>>>b|0){q[a>>2]=q[a+4>>2];g=b;break s}c=a;e=q[a>>2];if(e>>>0>2]){q[a>>2]=e+1;e=r[e|0]}else{e=0}d=e<>2]=d;g=b+8|0;q[a+8>>2]=g;c=(b|0)<17;b=g;if(c){continue}break}}f=f&31;c=d>>>5|0;q[a+12>>2]=c;b=g-5|0;q[a+8>>2]=b;j=d&31;d=b;t:{if((g|0)>8){break t}while(1){if(c>>>b|0){q[a>>2]=q[a+4>>2];d=b;break t}d=a;e=q[a>>2];if(e>>>0>2]){q[a>>2]=e+1;e=r[e|0]}else{e=0}c=e<>2]=c;d=b+8|0;q[a+8>>2]=d;e=(b|0)<17;b=d;if(e){continue}break}}k=f+257|0;p=j+1|0;f=c>>>4|0;q[a+12>>2]=f;b=d-4|0;q[a+8>>2]=b;d=0;o[i+15|0]=0;o[i+16|0]=0;o[i+17|0]=0;o[i+18|0]=0;q[i+8>>2]=0;q[i+12>>2]=0;q[i>>2]=0;q[i+4>>2]=0;g=(c&15)+3|0;while(1){e=d;d=f;c=b;u:{if((b|0)>2){break u}while(1){if(d>>>b|0){q[a>>2]=q[a+4>>2];c=b;break u}c=a;f=q[a>>2];if(f>>>0>2]){q[a>>2]=f+1;f=r[f|0]}else{f=0}d=f<>2]=d;c=b+8|0;q[a+8>>2]=c;f=(b|0)<17;b=c;if(f){continue}break}}f=d>>>3|0;q[a+12>>2]=f;b=c-3|0;q[a+8>>2]=b;o[r[e+170672|0]+i|0]=d&7;d=e+1|0;if((e|0)!=(g|0)){continue}break}j=0;b=0;v:{if(!cs(i+488|0,i,19)){break v}e=k+p|0;c=0;while(1){b=Gx(a,i+488|0);if(b>>>0>=19){q[213145]=169845;b=0;break v}g=e;w:{if((b|0)<=15){o[(i+32|0)+c|0]=b;c=c+1|0;break w}x:{y:{z:{switch(b-16|0){case 0:d=q[a+12>>2];b=q[a+8>>2];f=b;A:{if((b|0)>1){break A}while(1){if(d>>>b|0){q[a>>2]=q[a+4>>2];f=b;break A}f=a;h=q[a>>2];if(h>>>0>2]){q[a>>2]=h+1;h=r[h|0]}else{h=0}d=h<>2]=d;f=b+8|0;q[a+8>>2]=f;h=(b|0)<17;b=f;if(h){continue}break}}q[a+12>>2]=d>>>2;q[a+8>>2]=f-2;if(!c){q[213145]=169845;b=0;break v}b=(d&3)+3|0;d=r[(c+i|0)+31|0];break x;case 1:d=q[a+12>>2];b=q[a+8>>2];f=b;B:{if((b|0)>2){break B}while(1){if(d>>>b|0){q[a>>2]=q[a+4>>2];f=b;break B}f=a;h=q[a>>2];if(h>>>0>2]){q[a>>2]=h+1;h=r[h|0]}else{h=0}d=h<>2]=d;f=b+8|0;q[a+8>>2]=f;h=(b|0)<17;b=f;if(h){continue}break}}q[a+12>>2]=d>>>3;q[a+8>>2]=f-3;b=(d&7)+3|0;break y;default:break z}}d=q[a+12>>2];b=q[a+8>>2];f=b;C:{if((b|0)>6){break C}while(1){if(d>>>b|0){q[a>>2]=q[a+4>>2];f=b;break C}f=a;h=q[a>>2];if(h>>>0>2]){q[a>>2]=h+1;h=r[h|0]}else{h=0}d=h<>2]=d;f=b+8|0;q[a+8>>2]=f;h=(b|0)<17;b=f;if(h){continue}break}}q[a+12>>2]=d>>>7;q[a+8>>2]=f-7;b=(d&127)+11|0}d=0}if((e-c|0)<(b|0)){q[213145]=169845;b=0;break v}Ui((i+32|0)+c|0,d,b);c=b+c|0}if((g|0)>(c|0)){continue}break}if((c|0)!=(e|0)){q[213145]=169845;b=0;break v}b=0;if(!cs(n,i+32|0,k)){break v}b=(cs(m,k+(i+32|0)|0,p)|0)!=0}if(!b){break a}}b=q[a+16>>2];D:{while(1){E:{d=Gx(a,n);if((d|0)<=255){if((d|0)<=-1){q[213145]=169845;break b}f=q[a+24>>2];if(f>>>0<=b>>>0){q[a+16>>2]=b;if(!q[a+28>>2]){q[213145]=169845;break b}e=q[a+20>>2];c=b-e|0;if((c|0)==-1){break E}b=f-e|0;if(c>>>0>=b>>>0){while(1){if((b|0)<=-1){q[213145]=169512;break b}b=b<<1;if(c>>>0>=b>>>0){continue}break}}e=ul(e,b);if(!e){q[213145]=169512;break b}q[a+20>>2]=e;q[a+24>>2]=b+e;b=c+e|0;q[a+16>>2]=b}o[b|0]=d;b=b+1|0;continue}if((d|0)==256){break h}g=d-257<<2;c=q[g+170704>>2];if(d-265>>>0<=19){f=q[a+12>>2];d=q[a+8>>2];e=d;g=q[g+170832>>2];F:{if((g|0)<=(d|0)){break F}while(1){if(f>>>d|0){q[a>>2]=q[a+4>>2];e=d;break F}e=a;j=q[a>>2];if(j>>>0>2]){q[a>>2]=j+1;j=r[j|0]}else{j=0}f=j<>2]=f;e=d+8|0;q[a+8>>2]=e;j=(d|0)<17;d=e;if(j){continue}break}}q[a+12>>2]=f>>>g;q[a+8>>2]=e-g;c=((-1<>2];if(d-4>>>0<=25){f=q[a+12>>2];d=q[a+8>>2];e=d;g=q[g+171088>>2];G:{if((g|0)<=(d|0)){break G}while(1){if(f>>>d|0){q[a>>2]=q[a+4>>2];e=d;break G}e=a;k=q[a>>2];if(k>>>0>2]){q[a>>2]=k+1;h=r[k|0]}else{h=0}f=h<>2]=f;e=d+8|0;q[a+8>>2]=e;k=(d|0)<17;d=e;if(k){continue}break}}q[a+12>>2]=f>>>g;q[a+8>>2]=e-g;j=((-1<>2];d=b-e|0;if((d|0)<(j|0)){q[213145]=169845;break b}f=q[a+24>>2];if(f>>>0>>0){q[a+16>>2]=b;if(!q[a+28>>2]){q[213145]=169845;break b}if((d^-1)>>>0>>0){break D}b=f-e|0;f=c+d|0;if(b>>>0>>0){while(1){if((b|0)<=-1){q[213145]=169512;break b}b=b<<1;if(f>>>0>b>>>0){continue}break}}e=ul(e,b);if(!e){q[213145]=169512;break b}q[a+20>>2]=e;q[a+24>>2]=b+e;b=d+e|0;q[a+16>>2]=b}d=b-j|0;if((j|0)==1){if(!c){continue}b=Ui(b,r[d|0],c)+c|0;continue}if(!c){continue}while(1){o[b|0]=r[d|0];b=b+1|0;d=d+1|0;c=c-1|0;if(c){continue}break}continue}break}q[213145]=169512;break b}q[213145]=169512;break b}q[a+16>>2]=b;if(!(l&1)){d=q[a+8>>2];continue}break}j=1;break a}j=0}Ii=i+2512|0;return j}function _J(a){var b=0,c=0;a=a?q[a+120>>2]:0;c=q[a+8>>2]-q[a+12>>2]>>4;jm(a,202598,202608,283184);q[213927]=jm(a,202616,202636,283216);q[213928]=jm(a,202300,202644,283296);Ak(a,202652,283344);bj(a,202656,8);Si(a,-2,202665);bj(a,202679,8);Si(a,-2,202688);bj(a,202702,5);Si(a,-2,202708);bj(a,202719,5);Si(a,-2,202725);bj(a,202736,7);Si(a,-2,202744);bj(a,202757,6);Si(a,-2,202764);bj(a,202776,4);Si(a,-2,202781);bj(a,202791,10);Si(a,-2,202802);bj(a,202818,12);Si(a,-2,202831);bj(a,202849,6);Si(a,-2,202856);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202868);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202880);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202890);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202901);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202914);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202928);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202942);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202957);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202974);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,202991);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203006);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203022);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=8;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203040);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=9;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203058);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=10;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203073);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=11;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203089);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=12;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203107);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=13;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203125);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=14;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203140);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=15;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203156);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=16;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203174);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=17;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203192);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=18;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203206);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=19;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203221);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=20;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203238);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=21;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203255);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=22;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203269);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=23;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203284);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=24;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203301);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=25;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203318);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=26;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203332);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=27;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203347);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=28;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203364);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=29;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203381);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=30;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203398);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=31;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203416);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=32;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203436);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=33;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203456);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=34;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203470);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=35;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203485);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=36;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203502);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=37;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203519);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=38;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203535);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=39;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203552);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=40;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203571);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203590);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203602);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203612);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203628);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203639);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203658);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203680);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203702);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203727);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203747);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203770);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203782);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203794);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203807);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203818);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203832);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203845);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203853);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203862);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203870);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203879);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203887);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203896);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=8;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203904);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203913);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203924);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203936);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203951);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203973);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,203996);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204019);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204041);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204064);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204087);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204107);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=-6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204125);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=-4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204155);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=-9;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204179);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204197);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,204214);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){J(204229,202233,4953,204250);G()}return a}function PE(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0;d=Ii-128|0;Ii=d;q[d+80>>2]=0;q[d+84>>2]=0;q[d+88>>2]=0;q[d+92>>2]=0;q[d+96>>2]=0;q[d+100>>2]=0;q[d+104>>2]=0;q[d+108>>2]=0;q[d+112>>2]=0;q[d+116>>2]=0;q[d+120>>2]=0;q[d+124>>2]=0;q[d+64>>2]=0;q[d+68>>2]=0;q[d+72>>2]=0;q[d+76>>2]=0;Ui(a+4|0,0,272);i=d- -64|0;a:{b:{if(!((c|0)==256|(c|0)==192)){e=-36;if((c|0)!=128){break a}q[a>>2]=3;v=1;e=16;break b}q[a>>2]=4;k=1;e=c>>>3|0}Ti(i,b,e);e=r[d+80|0];c:{if((c|0)!=192){i=r[d+83|0];l=r[d+82|0];j=r[d+81|0];break c}o[d+88|0]=e^-1;j=r[d+81|0];o[d+89|0]=j^-1;l=r[d+82|0];o[d+90|0]=l^-1;i=r[d+83|0];o[d+91|0]=i^-1;o[d+92|0]=r[d+84|0]^-1;o[d+93|0]=r[d+85|0]^-1;o[d+94|0]=r[d+86|0]^-1;o[d+95|0]=r[d+87|0]^-1}m=d+56|0;q[m>>2]=0;q[m+4>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;b=q[d+64>>2];q[d>>2]=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);b=q[d+68>>2];q[d+4>>2]=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);b=q[d+88>>2];f=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);q[d+24>>2]=f;b=q[d+72>>2];g=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);q[d+8>>2]=g;b=q[d+84>>2];h=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);q[d+20>>2]=h;b=q[d+76>>2];s=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);q[d+12>>2]=s;b=q[d+92>>2];b=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);q[d+28>>2]=b;e=i&255|((j&255)<<16|e<<24|(l&255)<<8);q[d+16>>2]=e;q[d+40>>2]=f^g;q[d+44>>2]=b^s;b=e^q[d>>2];q[d+32>>2]=b;e=h^q[d+4>>2];q[d+36>>2]=e;i=b;b=d+40|0;zn(i,e,-1600231809,1003262091,b);e=d+32|0;zn(q[d+40>>2],q[d+44>>2],-1233459112,1286239154,e);i=q[d+32>>2]^q[d>>2];q[d+32>>2]=i;l=q[d+36>>2]^q[d+4>>2];q[d+36>>2]=l;q[d+40>>2]=q[d+40>>2]^q[d+8>>2];q[d+44>>2]=q[d+44>>2]^q[d+12>>2];zn(i,l,-957401297,-380665154,b);zn(q[d+40>>2],q[d+44>>2],1426019237,-237801700,e);if(c>>>0>=129){b=q[d+32>>2]^q[d+16>>2];q[d+48>>2]=b;e=q[d+36>>2]^q[d+20>>2];q[d+52>>2]=e;q[d+56>>2]=q[d+40>>2]^q[d+24>>2];q[d+60>>2]=q[d+44>>2]^q[d+28>>2];zn(b,e,283453434,-563598051,m);zn(q[d+56>>2],q[d+60>>2],-1336506174,-1276722691,d+48|0)}e=q[d+12>>2];f=q[d>>2];m=e<<15|f>>>17;g=q[d+8>>2];l=g<<15|e>>>17;h=q[d+4>>2];j=h<<15|g>>>17;if(!k){x=h<<30|g>>>2;y=f<<30|h>>>2;t=e<<30|f>>>2;n=g<<30|e>>>2}b=a+4|0;p=w(k,80);i=p+163504|0;q[b+(o[i|0]<<2)>>2]=f;q[b+(o[i+1|0]<<2)>>2]=h;q[b+(o[i+2|0]<<2)>>2]=g;q[b+(o[i+3|0]<<2)>>2]=e;q[b+(o[i+4|0]<<2)>>2]=f<<15|h>>>17;q[b+(o[i+5|0]<<2)>>2]=j;q[b+(o[i+6|0]<<2)>>2]=l;q[b+(o[i+7|0]<<2)>>2]=m;u=f<<28|h>>>4;m=e<<13|f>>>19;s=g<<13|e>>>19;l=h<<13|g>>>19;i=f<<13|h>>>19;if(!k){j=p+163504|0;q[b+(o[j+8|0]<<2)>>2]=y;q[b+(o[j+9|0]<<2)>>2]=x;q[b+(o[j+10|0]<<2)>>2]=n;q[b+(o[j+11|0]<<2)>>2]=t}j=e<<28|f>>>4;t=g<<28|e>>>4;n=h<<28|g>>>4;e=p+163504|0;q[b+(o[e+12|0]<<2)>>2]=i;q[b+(o[e+13|0]<<2)>>2]=l;q[b+(o[e+14|0]<<2)>>2]=s;q[b+(o[e+15|0]<<2)>>2]=m;q[b+(o[e+16|0]<<2)>>2]=u;if(!v){e=a+4|0;b=w(k,80)+163504|0;q[e+(o[b+17|0]<<2)>>2]=n;q[e+(o[b+18|0]<<2)>>2]=t}q[((o[(w(k,80)+163504|0)+19|0]<<2)+a|0)+4>>2]=j;if(!(v|c>>>0<=128)){b=q[d+28>>2];e=q[d+24>>2];f=q[d+20>>2];g=q[d+16>>2];h=k|v;if(!h){m=b<<13|g>>>19;s=e<<13|b>>>19;l=f<<13|e>>>19;i=g<<13|f>>>19}if(!h){q[((o[(w(k,80)+163504|0)+20|0]<<2)+a|0)+4>>2]=g}if(!h){q[((o[w(k,80)+163525|0]<<2)+a|0)+4>>2]=f}if(!h){q[((o[w(k,80)+163526|0]<<2)+a|0)+4>>2]=e}if(!h){q[((o[w(k,80)+163527|0]<<2)+a|0)+4>>2]=b}n=a+4|0;t=w(k,80);j=t+163504|0;q[n+(o[j+24|0]<<2)>>2]=g<<15|f>>>17;q[n+(o[j+25|0]<<2)>>2]=f<<15|e>>>17;q[n+(o[j+26|0]<<2)>>2]=e<<15|b>>>17;q[n+(o[j+27|0]<<2)>>2]=b<<15|g>>>17;q[n+(o[j+28|0]<<2)>>2]=g<<30|f>>>2;q[n+(o[j+29|0]<<2)>>2]=f<<30|e>>>2;q[n+(o[j+30|0]<<2)>>2]=e<<30|b>>>2;q[n+(o[j+31|0]<<2)>>2]=b<<30|g>>>2;if(!h){q[((o[t+163536|0]<<2)+a|0)+4>>2]=i}if(!h){q[((o[w(k,80)+163537|0]<<2)+a|0)+4>>2]=l}if(!h){q[((o[w(k,80)+163538|0]<<2)+a|0)+4>>2]=s}j=b<<28|g>>>4;t=e<<28|b>>>4;n=f<<28|e>>>4;u=g<<28|f>>>4;if(!h){q[((o[w(k,80)+163539|0]<<2)+a|0)+4>>2]=m}e=a+4|0;b=w(k,80)+163504|0;q[e+(o[b+36|0]<<2)>>2]=u;q[e+(o[b+37|0]<<2)>>2]=n;q[e+(o[b+38|0]<<2)>>2]=t;q[e+(o[b+39|0]<<2)>>2]=j}e=q[d+32>>2];m=e>>>19|0;f=q[d+44>>2];l=f<<13;g=q[d+40>>2];s=g<<13;h=q[d+36>>2];p=h<<13;if(!k){i=a+4|0;b=w(k,80)+163504|0;q[i+(o[b+40|0]<<2)>>2]=e;q[i+(o[b+41|0]<<2)>>2]=h;q[i+(o[b+42|0]<<2)>>2]=g;q[i+(o[b+43|0]<<2)>>2]=f;t=g<<28|f>>>4;n=h<<28|g>>>4;u=e<<28|h>>>4;j=f<<28|e>>>4}m=l|m;i=s|f>>>19;l=p|g>>>19;s=e<<13|h>>>19;b=a+4|0;x=w(k,80);p=x+163504|0;q[b+(o[p+44|0]<<2)>>2]=e<<15|h>>>17;q[b+(o[p+45|0]<<2)>>2]=h<<15|g>>>17;q[b+(o[p+46|0]<<2)>>2]=g<<15|f>>>17;q[b+(o[p+47|0]<<2)>>2]=f<<15|e>>>17;q[b+(o[p+48|0]<<2)>>2]=e<<30|h>>>2;q[b+(o[p+49|0]<<2)>>2]=h<<30|g>>>2;q[b+(o[p+50|0]<<2)>>2]=g<<30|f>>>2;q[b+(o[p+51|0]<<2)>>2]=f<<30|e>>>2;d:{if(!v){e=x+163504|0;q[b+(o[e+52|0]<<2)>>2]=s;q[b+(o[e+53|0]<<2)>>2]=l;q[b+(o[e+54|0]<<2)>>2]=i;b=e+55|0;e=m;break d}b=x+163504|0;q[((o[b+53|0]<<2)+a|0)+4>>2]=l;b=b+54|0;e=i}q[((o[b|0]<<2)+a|0)+4>>2]=e;if(!k){e=a+4|0;b=w(k,80)+163504|0;q[e+(o[b+56|0]<<2)>>2]=u;q[e+(o[b+57|0]<<2)>>2]=n;q[e+(o[b+58|0]<<2)>>2]=t;q[e+(o[b+59|0]<<2)>>2]=j}if(!(v|c>>>0<=128)){e=q[d+60>>2];f=q[d+48>>2];n=e<<30|f>>>2;g=q[d+56>>2];t=g<<30|e>>>2;j=q[d+52>>2];p=j<<30|g>>>2;h=k|v;if(!h){m=e<<13|f>>>19;l=j<<13|g>>>19;s=f<<13|j>>>19;i=g<<13|e>>>19}c=a+4|0;u=w(k,80);b=u+163504|0;q[c+(o[b+60|0]<<2)>>2]=f;q[c+(o[b+61|0]<<2)>>2]=j;q[c+(o[b+62|0]<<2)>>2]=g;q[c+(o[b+63|0]<<2)>>2]=e;q[c+(o[b- -64|0]<<2)>>2]=f<<15|j>>>17;q[c+(o[b+65|0]<<2)>>2]=j<<15|g>>>17;q[c+(o[b+66|0]<<2)>>2]=g<<15|e>>>17;q[c+(o[b+67|0]<<2)>>2]=e<<15|f>>>17;q[c+(o[b+68|0]<<2)>>2]=f<<30|j>>>2;q[c+(o[b+69|0]<<2)>>2]=p;q[c+(o[b+70|0]<<2)>>2]=t;q[c+(o[b+71|0]<<2)>>2]=n;if(!h){q[((o[u+163576|0]<<2)+a|0)+4>>2]=s}if(!h){q[((o[w(k,80)+163577|0]<<2)+a|0)+4>>2]=l}if(!h){q[((o[w(k,80)+163578|0]<<2)+a|0)+4>>2]=i}if(!h){q[((o[w(k,80)+163579|0]<<2)+a|0)+4>>2]=m}c=a+4|0;b=w(k,80)+163504|0;q[c+(o[b+76|0]<<2)>>2]=f<<28|j>>>4;q[c+(o[b+77|0]<<2)>>2]=j<<28|g>>>4;q[c+(o[b+78|0]<<2)>>2]=g<<28|e>>>4;q[c+(o[b+79|0]<<2)>>2]=e<<28|f>>>4}b=a+4|0;m=w(k,12);l=m|32;c=b+(l<<2)|0;i=w(k,20);e=i+163664|0;q[c>>2]=q[b+(o[e|0]<<2)>>2];m=m<<2;q[b+(m|132)>>2]=q[b+(o[e+1|0]<<2)>>2];q[b+(m|136)>>2]=q[b+(o[e+2|0]<<2)>>2];q[b+(m|140)>>2]=q[b+(o[e+3|0]<<2)>>2];if(!v){e=i+163664|0;q[c+16>>2]=q[b+(o[e+4|0]<<2)>>2];q[c+20>>2]=q[b+(o[e+5|0]<<2)>>2];q[c+24>>2]=q[b+(o[e+6|0]<<2)>>2];q[c+28>>2]=q[b+(o[e+7|0]<<2)>>2]}e=i+163664|0;q[c+32>>2]=q[b+(o[e+8|0]<<2)>>2];q[c+36>>2]=q[b+(o[e+9|0]<<2)>>2];q[c+40>>2]=q[b+(o[e+10|0]<<2)>>2];q[c+44>>2]=q[b+(o[e+11|0]<<2)>>2];e=0;if(k){break a}a=a+4|0;b=a+(l<<2)|0;c=w(k,20)+163664|0;q[b+48>>2]=q[a+(o[c+12|0]<<2)>>2];q[b+52>>2]=q[a+(o[c+13|0]<<2)>>2];q[b+56>>2]=q[a+(o[c+14|0]<<2)>>2];q[b+60>>2]=q[a+(o[c+15|0]<<2)>>2];q[b- -64>>2]=q[a+(o[c+16|0]<<2)>>2];q[b+68>>2]=q[a+(o[c+17|0]<<2)>>2];q[b+72>>2]=q[a+(o[c+18|0]<<2)>>2];q[b+76>>2]=q[a+(o[c+19|0]<<2)>>2]}Ii=d+128|0;return e}function QG(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,v=0,x=0,y=0;k=Ii-336|0;Ii=k;y=q[a+8>>2]-q[a+12>>2]>>4;Dj(a,f,5);v=Ou(a,f);x=g+4|0;l=q[x>>2];s=q[g>>2];i=l-s|0;t=i>>2;a:{b:{c:{d:{e:{f:{g:{if(!i){break g}if(q[s>>2]!=(v|0)){h=1;j=s-l|0;m=((i|0)<(j|0)?j:i)>>>2|0;j=(i|0)>-1?i:-1;j=w(m,(j|0)<1?j:1);i=j>>>0>1?j:1;while(1){j=h;if((h|0)!=(i|0)){h=j+1|0;if(q[s+(j<<2)>>2]!=(v|0)){continue}}break}if(j>>>0>=t>>>0){break g}}a=Qi(a,130873,0);break f}j=q[g+8>>2];if((j|0)==(l|0)){if(o[g+12|0]&1){break e}Wi(t+8|0,4,g,g+8|0,x);l=q[g+4>>2];j=q[g+8>>2]}if((j|0)==(l|0)){break d}q[x>>2]=l+4;q[l>>2]=v;ej(a,f);f=q[a+8>>2];q[f+8>>2]=0;q[a+8>>2]=f+16;if(e>>>0<=3){Qi(a,131049,0)}j=d+4|0;h:{if(!Hj(a,-2)){l=0;break h}n=d+e|0;l=0;while(1){if((l|0)==-1){q[k+320>>2]=-1;Qi(a,131065,k+320|0)}m=Vi(a,-2);s=Vi(a,-1);h=m-3|0;if(h>>>0>=2){q[k+304>>2]=(m|0)==-1?140583:q[(m<<2)+256832>>2];Qi(a,130898,k+304|0)}l=l+1|0;if((n-j|0)<=1){q[k+292>>2]=l;q[k+288>>2]=e;Qi(a,131101,k+288|0)}i:{j:{switch(h|0){case 1:o[j+1|0]=s;o[j|0]=4;q[k+332>>2]=0;t=uj(a,-2,k+332|0);h=q[k+332>>2];f=h+4|0;i=j+2|0;if((f|0)>(n-i|0)){q[k+232>>2]=l;q[k+228>>2]=t;q[k+224>>2]=e;Qi(a,132325,k+224|0);h=q[k+332>>2]}o[j+2|0]=h;o[j+3|0]=h>>>8;o[j+4|0]=h>>>16;o[j+5|0]=h>>>24;Ti(j+6|0,t,h);j=f+i|0;break i;case 0:break j;default:break i}}p=Mj(a,-2);o[j+1|0]=s;o[j|0]=p>=0?3:64;h=j+2|0;k:{l:{switch(q[b+4>>2]){case 0:if((n-h|0)<=1){Qi(a,131049,0)}if(!(p>65535^1)){q[k+240>>2]=65535;Qi(a,132397,k+240|0)}f=j;i=j;if(p<4294967296&p>=0){h=~~p>>>0}else{h=0}o[i+2|0]=h;o[f+3|0]=h>>>8;j=j+4|0;break i;case 1:case 2:if(!(p>4294967295^1)){q[k+256>>2]=-1;Qi(a,132397,k+256|0)}if(p<4294967296&p>=0){j=~~p>>>0}else{j=0}f=j;m:{if(j>>>0<128){break m}while(1){if(h>>>0>=n>>>0){f=j;break m}o[h|0]=j|128;h=h+1|0;i=j>>>0>16383;f=j>>>7|0;j=f;if(i){continue}break}}if(h>>>0>=n>>>0){break k}o[h|0]=f&127;j=h+1|0;break i;case 3:case 4:if((n-h|0)<=3){Qi(a,131049,0)}p=p<0?-p:p;if(!(p>4294967295^1)){q[k+272>>2]=-1;Qi(a,132397,k+272|0)}f=j;i=j;if(p<4294967296&p>=0){h=~~p>>>0}else{h=0}o[i+2|0]=h;o[f+3|0]=h>>>8;o[f+4|0]=h>>>16;o[f+5|0]=h>>>24;j=j+6|0;break i;default:break l}}J(132428,131008,234,132430);G()}Qi(a,131049,0);j=h}n:{o:{switch(s-1|0){case 0:if((n-j|0)<=0){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+24>>2]=l;q[k+20>>2]=f;q[k+16>>2]=e;Qi(a,131172,k+16|0)}o[j|0]=Uj(a,-1);j=j+1|0;break n;case 2:f=j-c|0;h=(f+3&-4)-f|0;if((h|0)>(n-j|0)){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+56>>2]=l;q[k+52>>2]=f;q[k+48>>2]=e;Qi(a,131172,k+48|0)}i=Ui(j,0,h)+h|0;f=n-i|0;if(!((f|0)>=(h|0)?(f|0)>=8:0)){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+40>>2]=l;q[k+36>>2]=f;q[k+32>>2]=e;Qi(a,131172,k+32|0)}Oza(+Mj(a,-1));j=Lza(1)|0;f=Lza(0)|0;o[i|0]=f;o[i+1|0]=f>>>8;o[i+2|0]=f>>>16;o[i+3|0]=f>>>24;o[i+4|0]=j;o[i+5|0]=j>>>8;o[i+6|0]=j>>>16;o[i+7|0]=j>>>24;j=i+8|0;break n;case 3:q[k+332>>2]=0;i=uj(a,-1,k+332|0);h=q[k+332>>2];f=h+4|0;if((f|0)>(n-j|0)){q[k+72>>2]=l;q[k+68>>2]=i;q[k+64>>2]=e;Qi(a,132325,k- -64|0);h=q[k+332>>2]}o[j|0]=h;o[j+1|0]=h>>>8;o[j+2|0]=h>>>16;o[j+3|0]=h>>>24;Ti(j+4|0,i,h);j=f+j|0;break n;case 6:if((n-j|0)<=0){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+216>>2]=l;q[k+212>>2]=f;q[k+208>>2]=e;Qi(a,131172,k+208|0)}h=j+1|0;f=h-c|0;i=(f+3&-4)-f|0;if((i|0)>(n-h|0)){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+200>>2]=l;q[k+196>>2]=f;q[k+192>>2]=e;Qi(a,131172,k+192|0)}i=Ui(h,0,i)+i|0;h=Om(a,-1);if(h){if((n-i|0)<=11){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+184>>2]=l;q[k+180>>2]=f;q[k+176>>2]=e;Qi(a,131172,k+176|0)}o[j|0]=0;u[i>>2]=u[h>>2];u[i+4>>2]=u[h+4>>2];u[i+8>>2]=u[h+8>>2];j=i+12|0;break n}h=Nn(a,-1);if(h){if((n-i|0)<=15){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+168>>2]=l;q[k+164>>2]=f;q[k+160>>2]=e;Qi(a,131172,k+160|0)}o[j|0]=1;u[i>>2]=u[h>>2];u[i+4>>2]=u[h+4>>2];u[i+8>>2]=u[h+8>>2];u[i+12>>2]=u[h+12>>2];j=i+16|0;break n}h=pz(a,-1);if(h){if((n-i|0)<=15){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+152>>2]=l;q[k+148>>2]=f;q[k+144>>2]=e;Qi(a,131172,k+144|0)}o[j|0]=2;u[i>>2]=u[h>>2];u[i+4>>2]=u[h+4>>2];u[i+8>>2]=u[h+8>>2];u[i+12>>2]=u[h+12>>2];j=i+16|0;break n}h=qz(a,-1);if(h){if((n-i|0)<=63){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+136>>2]=l;q[k+132>>2]=f;q[k+128>>2]=e;Qi(a,131172,k+128|0)}o[j|0]=3;u[i>>2]=u[h>>2];u[i+4>>2]=u[h+4>>2];u[i+8>>2]=u[h+8>>2];u[i+12>>2]=u[h+12>>2];u[i+16>>2]=u[h+16>>2];u[i+20>>2]=u[h+20>>2];u[i+24>>2]=u[h+24>>2];u[i+28>>2]=u[h+28>>2];u[i+32>>2]=u[h+32>>2];u[i+36>>2]=u[h+36>>2];u[i+40>>2]=u[h+40>>2];u[i+44>>2]=u[h+44>>2];u[i+48>>2]=u[h+48>>2];u[i+52>>2]=u[h+52>>2];u[i+56>>2]=u[h+56>>2];u[i+60>>2]=u[h+60>>2];j=i- -64|0;break n}if(On(a,-1)){f=qj(a,-1);h=q[f>>2];f=q[f+4>>2];if((n-i|0)<=7){t=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+88>>2]=l;q[k+84>>2]=t;q[k+80>>2]=e;Qi(a,131172,k+80|0)}o[j|0]=4;o[i|0]=h;o[i+1|0]=h>>>8;o[i+2|0]=h>>>16;o[i+3|0]=h>>>24;o[i+4|0]=f;o[i+5|0]=f>>>8;o[i+6|0]=f>>>16;o[i+7|0]=f>>>24;j=i+8|0;break n}if(qv(a,-1)){h=qj(a,-1);if((n-i|0)<=31){f=(m|0)==-1?140583:q[(m<<2)+256832>>2];q[k+104>>2]=l;q[k+100>>2]=f;q[k+96>>2]=e;Qi(a,131172,k+96|0)}o[j|0]=5;j=r[h+28|0]|r[h+29|0]<<8|(r[h+30|0]<<16|r[h+31|0]<<24);f=r[h+24|0]|r[h+25|0]<<8|(r[h+26|0]<<16|r[h+27|0]<<24);o[i+24|0]=f;o[i+25|0]=f>>>8;o[i+26|0]=f>>>16;o[i+27|0]=f>>>24;o[i+28|0]=j;o[i+29|0]=j>>>8;o[i+30|0]=j>>>16;o[i+31|0]=j>>>24;j=r[h+20|0]|r[h+21|0]<<8|(r[h+22|0]<<16|r[h+23|0]<<24);f=r[h+16|0]|r[h+17|0]<<8|(r[h+18|0]<<16|r[h+19|0]<<24);o[i+16|0]=f;o[i+17|0]=f>>>8;o[i+18|0]=f>>>16;o[i+19|0]=f>>>24;o[i+20|0]=j;o[i+21|0]=j>>>8;o[i+22|0]=j>>>16;o[i+23|0]=j>>>24;j=r[h+12|0]|r[h+13|0]<<8|(r[h+14|0]<<16|r[h+15|0]<<24);f=r[h+8|0]|r[h+9|0]<<8|(r[h+10|0]<<16|r[h+11|0]<<24);o[i+8|0]=f;o[i+9|0]=f>>>8;o[i+10|0]=f>>>16;o[i+11|0]=f>>>24;o[i+12|0]=j;o[i+13|0]=j>>>8;o[i+14|0]=j>>>16;o[i+15|0]=j>>>24;j=r[h+4|0]|r[h+5|0]<<8|(r[h+6|0]<<16|r[h+7|0]<<24);f=r[h|0]|r[h+1|0]<<8|(r[h+2|0]<<16|r[h+3|0]<<24);o[i|0]=f;o[i+1|0]=f>>>8;o[i+2|0]=f>>>16;o[i+3|0]=f>>>24;o[i+4|0]=j;o[i+5|0]=j>>>8;o[i+6|0]=j>>>16;o[i+7|0]=j>>>24;j=i+32|0;break n}q[k+112>>2]=q[64215];Qi(a,130956,k+112|0);j=i;break n;case 4:j=QG(a,b,c,j,n-j|0,-1,g)+j|0;break n;default:break o}}q[k>>2]=(s|0)==-1?140583:q[(s<<2)+256832>>2];Qi(a,130956,k)}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);b=q[g+4>>2];if((b|0)==q[g>>2]){break c}c=b-4|0;b=q[c>>2];q[x>>2]=c;if((b|0)!=(v|0)){break b}o[d|0]=l;o[d+1|0]=l>>>8;o[d+2|0]=l>>>16;o[d+3|0]=l>>>24;if(q[a+8>>2]-q[a+12>>2]>>4!=(y|0)){break a}a=j-d|0}Ii=k+336|0;return a}J(132193,132137,493,132268);G()}J(132280,132137,533,132304);G()}J(132309,132137,435,132320);G()}J(130992,131008,707,131250);G()}J(131263,131008,711,131250);G()}function Nka(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=0,o=0,r=0;o=Ii-416|0;Ii=o;n=_m(o+296|0);r=Vl(a,57665,o+412|0);a:{if(r){q[o+180>>2]=r;q[o+176>>2]=57665;Pi(3,57682,57925,o+176|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57665;r=q[o+412>>2];q[n+60>>2]=367;q[n+48>>2]=0;q[n+44>>2]=368;q[n+40>>2]=369;q[n+36>>2]=0;q[n+32>>2]=370;q[n+28>>2]=371;q[n+24>>2]=372;q[n+20>>2]=373;q[n+16>>2]=g;q[n>>2]=r;q[n+96>>2]=0;q[n+92>>2]=374;q[n+84>>2]=0;q[n+88>>2]=0;q[n+76>>2]=0;q[n+72>>2]=375;q[n+68>>2]=376;q[n+64>>2]=377;q[n+56>>2]=0;q[n+52>>2]=378;p[n+104>>1]=100;q[n+100>>2]=q[n+100>>2]&-196609|65536;g=hn(b,n);if(g){break a}g=Vl(a,57411,o+412|0);if(g){q[o+164>>2]=g;q[o+160>>2]=57411;Pi(3,57682,57925,o+160|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57411;g=q[o+412>>2];q[n+60>>2]=0;q[n+48>>2]=0;q[n+44>>2]=379;q[n+40>>2]=380;q[n+36>>2]=0;q[n+32>>2]=381;q[n+28>>2]=382;q[n+24>>2]=383;q[n+20>>2]=384;q[n+16>>2]=d;q[n>>2]=g;q[n+96>>2]=385;q[n+92>>2]=0;q[n+88>>2]=386;q[n+84>>2]=387;q[n+76>>2]=388;q[n+72>>2]=0;q[n+68>>2]=389;q[n+64>>2]=390;q[n+56>>2]=391;q[n+52>>2]=392;p[n+104>>1]=400;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}d=Vl(a,57800,o+412|0);if(d){q[o+148>>2]=d;q[o+144>>2]=57800;Pi(3,57682,57925,o+144|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57800;d=q[o+412>>2];q[n+48>>2]=0;q[n+44>>2]=393;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=394;q[n+28>>2]=395;q[n+24>>2]=396;q[n+20>>2]=397;q[n+16>>2]=c;q[n>>2]=d;q[n+92>>2]=0;q[n+96>>2]=0;q[n+88>>2]=398;q[n+84>>2]=399;q[n+76>>2]=400;q[n+72>>2]=0;q[n+68>>2]=401;q[n+64>>2]=0;q[n+56>>2]=0;q[n+60>>2]=0;q[n+52>>2]=402;p[n+104>>1]=500;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}d=Vl(a,57793,o+412|0);if(d){q[o+132>>2]=d;q[o+128>>2]=57793;Pi(3,57682,57925,o+128|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57793;d=q[o+412>>2];q[n+48>>2]=0;q[n+44>>2]=403;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=404;q[n+28>>2]=405;q[n+24>>2]=406;q[n+20>>2]=407;q[n+16>>2]=m;q[n>>2]=d;q[n+92>>2]=0;q[n+96>>2]=0;q[n+88>>2]=408;q[n+84>>2]=409;q[n+72>>2]=0;q[n+76>>2]=0;q[n+68>>2]=410;q[n+64>>2]=0;q[n+56>>2]=0;q[n+60>>2]=0;q[n+52>>2]=411;p[n+104>>1]=600;q[n+100>>2]=q[n+100>>2]&-196609|65536;g=hn(b,n);if(g){break a}d=Vl(a,57461,o+412|0);if(d){q[o+116>>2]=d;q[o+112>>2]=57461;Pi(3,57682,57925,o+112|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57461;d=q[o+412>>2];q[n+60>>2]=412;q[n+48>>2]=0;q[n+44>>2]=413;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=414;q[n+28>>2]=415;q[n+24>>2]=416;q[n+20>>2]=417;q[n+16>>2]=j;q[n>>2]=d;q[n+96>>2]=418;q[n+92>>2]=0;q[n+88>>2]=419;q[n+84>>2]=420;q[n+72>>2]=0;q[n+76>>2]=0;q[n+68>>2]=421;q[n+64>>2]=0;q[n+56>>2]=0;q[n+52>>2]=422;p[n+104>>1]=700;q[n+100>>2]=q[n+100>>2]&-196609|65536;g=hn(b,n);if(g){break a}d=Vl(a,57745,o+412|0);if(d){q[o+100>>2]=d;q[o+96>>2]=57745;Pi(3,57682,57925,o+96|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57745;d=q[o+412>>2];q[n+60>>2]=423;q[n+48>>2]=0;q[n+44>>2]=424;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=425;q[n+28>>2]=426;q[n+24>>2]=427;q[n+20>>2]=428;q[n+16>>2]=e;q[n>>2]=d;q[n+76>>2]=429;q[n+72>>2]=0;q[n+68>>2]=430;q[n+64>>2]=0;q[n+56>>2]=0;q[n+52>>2]=431;d=n+84|0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;p[n+104>>1]=800;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}e=Vl(a,57428,o+412|0);if(e){q[o+84>>2]=e;q[o+80>>2]=57428;Pi(3,57682,57925,o+80|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57428;e=q[o+412>>2];q[n+48>>2]=0;q[n+44>>2]=432;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=433;q[n+28>>2]=434;q[n+24>>2]=435;q[n+20>>2]=436;q[n+16>>2]=h;q[n>>2]=e;q[n+96>>2]=0;q[n+88>>2]=0;q[n+92>>2]=0;q[n+84>>2]=437;q[n+72>>2]=0;q[n+76>>2]=0;q[n+68>>2]=438;q[n+64>>2]=0;q[n+56>>2]=0;q[n+60>>2]=0;q[n+52>>2]=439;p[n+104>>1]=900;q[n+100>>2]=q[n+100>>2]&-196609|65536;g=hn(b,n);if(g){break a}e=Vl(a,57392,o+412|0);if(e){q[o+68>>2]=e;q[o+64>>2]=57392;Pi(3,57682,57925,o- -64|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57392;e=q[o+412>>2];q[n+48>>2]=0;q[n+44>>2]=440;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=441;q[n+28>>2]=442;q[n+24>>2]=443;q[n+20>>2]=444;q[n+16>>2]=i;q[n>>2]=e;q[n+56>>2]=0;q[n+60>>2]=0;q[n+52>>2]=445;e=n- -64|0;q[e+8>>2]=0;q[e+12>>2]=0;q[e>>2]=0;q[e+4>>2]=0;q[n+96>>2]=0;q[n+88>>2]=0;q[n+92>>2]=0;q[n+84>>2]=446;p[n+104>>1]=950;q[n+100>>2]=q[n+100>>2]&-196609|65536;g=hn(b,n);if(g){break a}e=Vl(a,57840,o+412|0);if(e){q[o+52>>2]=e;q[o+48>>2]=57840;Pi(3,57682,57925,o+48|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57840;e=q[o+412>>2];q[n+48>>2]=0;q[n+44>>2]=447;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=448;q[n+28>>2]=449;q[n+24>>2]=450;q[n+20>>2]=451;q[n+16>>2]=c;q[n>>2]=e;q[n+72>>2]=0;q[n+76>>2]=0;q[n+68>>2]=452;q[n+64>>2]=0;q[n+56>>2]=0;q[n+60>>2]=0;q[n+52>>2]=453;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;p[n+104>>1]=1e3;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}c=Vl(a,57870,o+412|0);if(c){q[o+36>>2]=c;q[o+32>>2]=57870;Pi(3,57682,57925,o+32|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57870;c=q[o+412>>2];q[n+60>>2]=454;q[n+48>>2]=0;q[n+44>>2]=455;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=456;q[n+28>>2]=457;q[n+24>>2]=458;q[n+20>>2]=459;q[n+16>>2]=f;q[n>>2]=c;q[n+96>>2]=460;q[n+92>>2]=0;q[n+88>>2]=461;q[n+84>>2]=462;q[n+76>>2]=463;q[n+72>>2]=0;q[n+68>>2]=464;q[n+64>>2]=0;q[n+56>>2]=0;q[n+52>>2]=465;p[n+104>>1]=1100;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}c=Vl(a,57489,o+412|0);if(c){q[o+20>>2]=c;q[o+16>>2]=57489;Pi(3,57682,57925,o+16|0);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57489;c=q[o+412>>2];q[n+60>>2]=466;q[n+48>>2]=0;q[n+44>>2]=467;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=468;q[n+28>>2]=469;q[n+24>>2]=470;q[n+20>>2]=471;q[n+16>>2]=l;q[n>>2]=c;q[n+96>>2]=472;q[n+92>>2]=0;q[n+88>>2]=473;q[n+84>>2]=474;q[n+76>>2]=475;q[n+72>>2]=0;q[n+68>>2]=476;q[n+64>>2]=0;q[n+56>>2]=0;q[n+52>>2]=477;p[n+104>>1]=1200;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n);if(g){break a}a=Vl(a,57833,o+412|0);if(a){q[o+4>>2]=a;q[o>>2]=57833;Pi(3,57682,57925,o);g=-1e3;break a}_m(o+184|0);Ti(o+296|0,o+184|0,104);q[n+4>>2]=57833;a=q[o+412>>2];q[n+60>>2]=478;q[n+48>>2]=479;q[n+44>>2]=480;q[n+36>>2]=0;q[n+40>>2]=0;q[n+32>>2]=481;q[n+28>>2]=482;q[n+24>>2]=483;q[n+20>>2]=484;q[n+16>>2]=k;q[n>>2]=a;q[n+96>>2]=485;q[n+92>>2]=0;q[n+88>>2]=486;q[n+84>>2]=487;q[n+76>>2]=488;q[n+72>>2]=0;q[n+68>>2]=489;q[n+64>>2]=0;q[n+56>>2]=0;q[n+52>>2]=490;p[n+104>>1]=1400;q[n+100>>2]=q[n+100>>2]|196608;g=hn(b,n)}Ii=o+416|0;return g}function Nma(a){a=a|0;var b=0,c=x(0),d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=0,v=0,z=0,A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=0,H=x(0),I=0,K=0,L=0,M=x(0),N=x(0);b=Ii-224|0;Ii=b;L=q[a+8>>2];g=q[a+4>>2];q[g+104>>2]=0;n=r[L+8|0];q[b+216>>2]=0;e=q[g>>2];a=q[g+4>>2]-e|0;i=(a|0)/240|0;a:{b:{if(!a){break b}c:{if((r[q[q[q[q[e>>2]+80>>2]+8>>2]>>2]+3272|0]&4)>>>2|0){z=i>>>0>1?i:1;while(1){a=q[g>>2];if((q[g+4>>2]-a|0)/240>>>0<=h>>>0){break a}d=a+w(h,240)|0;j=u[d+32>>2];A=u[d+36>>2];E=u[d+44>>2];k=u[d+40>>2];c=u[d+24>>2];e=q[d+16>>2];a=q[d+20>>2];q[b+156>>2]=0;q[b+172>>2]=0;q[b+188>>2]=0;q[b+192>>2]=e;q[b+196>>2]=a;q[b+204>>2]=1065353216;u[b+200>>2]=c;m=x(A+A);l=x(j*m);B=x(k+k);c=x(E*B);u[b+148>>2]=l+c;C=x(j*B);D=x(m*E);u[b+152>>2]=C-D;u[b+160>>2]=l-c;c=x(j+j);j=x(x(1)-x(j*c));k=x(k*B);u[b+164>>2]=j-k;l=x(A*B);c=x(c*E);u[b+168>>2]=l+c;u[b+176>>2]=C+D;u[b+180>>2]=l-c;c=x(A*m);u[b+184>>2]=j-c;u[b+144>>2]=x(x(1)-c)-k;a=Jp(q[d>>2]);u[b+80>>2]=u[a>>2];u[b+84>>2]=u[a+4>>2];u[b+88>>2]=u[a+8>>2];u[b+92>>2]=u[a+12>>2];u[b+96>>2]=u[a+16>>2];u[b+100>>2]=u[a+20>>2];u[b+104>>2]=u[a+24>>2];u[b+108>>2]=u[a+28>>2];u[b+112>>2]=u[a+32>>2];u[b+116>>2]=u[a+36>>2];u[b+120>>2]=u[a+40>>2];u[b+124>>2]=u[a+44>>2];u[b+128>>2]=u[a+48>>2];u[b+132>>2]=u[a+52>>2];u[b+136>>2]=u[a+56>>2];u[b+140>>2]=u[a+60>>2];N=u[d+48>>2];M=u[d+64>>2];C=u[d+52>>2];D=u[d+68>>2];_k(b+16|0,b+80|0,b+144|0);A=u[b+16>>2];E=u[b+20>>2];B=u[b+24>>2];m=u[b+28>>2];j=u[b+32>>2];k=u[b+36>>2];l=u[b+40>>2];c=u[b+44>>2];I=q[b+48>>2];v=q[b+52>>2];K=q[b+56>>2];F=q[b+60>>2];f=q[b+64>>2];e=q[b+68>>2];a=q[b+76>>2];q[d+136>>2]=q[b+72>>2];q[d+140>>2]=a;q[d+128>>2]=f;q[d+132>>2]=e;q[d+120>>2]=K;q[d+124>>2]=F;q[d+112>>2]=I;q[d+116>>2]=v;H=c;c=x(D*C);u[d+108>>2]=H*c;C=x(c*l);u[d+104>>2]=C;D=x(c*k);u[d+100>>2]=D;j=x(c*j);u[d+96>>2]=j;c=x(M*N);u[d+92>>2]=m*c;k=x(c*B);u[d+88>>2]=k;l=x(c*E);u[d+84>>2]=l;c=x(c*A);u[d+80>>2]=c;a=q[g+68>>2];if(q[g+72>>2]-a>>2>>>0<=h>>>0){break a}c=x(x(c+j)*x(.5));H=x(c*c);c=x(x(l+D)*x(.5));H=x(H+x(c*c));c=x(x(k+C)*x(.5));u[a+(h<<2)>>2]=H+x(c*c);h=h+1|0;if((z|0)!=(h|0)){continue}break}break c}z=i>>>0>1?i:1;while(1){a=q[g>>2];if((q[g+4>>2]-a|0)/240>>>0<=h>>>0){break a}d=a+w(h,240)|0;j=u[d+32>>2];A=u[d+36>>2];E=u[d+44>>2];k=u[d+40>>2];c=u[d+24>>2];e=q[d+16>>2];a=q[d+20>>2];q[b+156>>2]=0;q[b+172>>2]=0;q[b+188>>2]=0;q[b+192>>2]=e;q[b+196>>2]=a;q[b+204>>2]=1065353216;u[b+200>>2]=c;m=x(A+A);l=x(j*m);B=x(k+k);c=x(E*B);u[b+148>>2]=l+c;C=x(j*B);D=x(m*E);u[b+152>>2]=C-D;u[b+160>>2]=l-c;c=x(j+j);j=x(x(1)-x(j*c));k=x(k*B);u[b+164>>2]=j-k;l=x(A*B);c=x(c*E);u[b+168>>2]=l+c;u[b+176>>2]=C+D;u[b+180>>2]=l-c;c=x(A*m);u[b+184>>2]=j-c;u[b+144>>2]=x(x(1)-c)-k;a=Jp(q[d>>2]);u[b+80>>2]=u[a>>2];u[b+84>>2]=u[a+4>>2];u[b+88>>2]=u[a+8>>2];u[b+92>>2]=u[a+12>>2];u[b+96>>2]=u[a+16>>2];u[b+100>>2]=u[a+20>>2];u[b+104>>2]=u[a+24>>2];u[b+108>>2]=u[a+28>>2];u[b+112>>2]=u[a+32>>2];u[b+116>>2]=u[a+36>>2];u[b+120>>2]=u[a+40>>2];u[b+124>>2]=u[a+44>>2];u[b+128>>2]=u[a+48>>2];u[b+132>>2]=u[a+52>>2];u[b+136>>2]=u[a+56>>2];u[b+140>>2]=u[a+60>>2];jo(b+16|0,b+80|0,b+144|0);M=u[b+44>>2];A=u[b+40>>2];E=u[b+36>>2];B=u[b+32>>2];m=u[b+28>>2];k=u[b+24>>2];l=u[b+20>>2];c=u[b+16>>2];I=q[b+72>>2];v=q[b+76>>2];K=q[b+64>>2];F=q[b+68>>2];f=q[b+56>>2];e=q[b+60>>2];a=q[b+52>>2];q[d+112>>2]=q[b+48>>2];q[d+116>>2]=a;q[d+120>>2]=f;q[d+124>>2]=e;q[d+128>>2]=K;q[d+132>>2]=F;q[d+136>>2]=I;q[d+140>>2]=v;H=c;c=x(u[d+64>>2]*u[d+48>>2]);C=x(H*c);u[d+80>>2]=C;D=x(c*l);u[d+84>>2]=D;j=x(c*k);u[d+88>>2]=j;u[d+92>>2]=c*m;m=x(u[d+68>>2]*u[d+52>>2]);c=x(B*m);u[d+96>>2]=c;k=x(m*E);u[d+100>>2]=k;l=x(m*A);u[d+104>>2]=l;u[d+108>>2]=m*M;a=q[g+68>>2];if(q[g+72>>2]-a>>2>>>0<=h>>>0){break a}c=x(x(C+c)*x(.5));H=x(c*c);c=x(x(D+k)*x(.5));H=x(H+x(c*c));c=x(x(j+l)*x(.5));u[a+(h<<2)>>2]=H+x(c*c);h=h+1|0;if((z|0)!=(h|0)){continue}break}}if(n&1){break b}K=i>>>0>1?i:1;F=q[g>>2];h=(q[g+4>>2]-F|0)/240|0;a=0;while(1){if((a|0)==(h|0)){break a}f=F+w(a,240)|0;e=f;c=u[e+132>>2];d:{if(x(y(c))>2]=v|0;e=f;f=e;c=u[e+128>>2];e:{if(x(y(c))>2]=e|0;a=a+1|0;if((K|0)!=(a|0)){continue}break}}q[b+144>>2]=0;f=q[g+4>>2];e=q[g>>2];a=f-e|0;h=(a|0)/240|0;f:{g:{if(!a){I=0;z=0;h=0;break g}h:{if((e|0)!=(f|0)){K=h>>>0>1?h:1;a=0;h=0;z=0;I=0;while(1){i=w(a,240)+e|0;if((s[i+234>>1]&132)==132){n=q[i+196>>2];if(!n){n=q[q[i+188>>2]+4>>2]}f=h;e=q[i+200>>2];if(!e){e=q[q[i+188>>2]+8>>2]}v=Mi[q[74962]](q[q[e>>2]+16>>2])|0;F=(f>>>0)%(v>>>0)|0;e=q[n+64>>2];i:{if(q[e+72>>2]){f=q[e+64>>2]+(q[q[e+76>>2]+(q[i+216>>2]+q[(q[e+4>>2]+w(q[i+184>>2],40)|0)+12>>2]<<2)>>2]<<5)|0;e=q[f+12>>2]>>>1|0;n=w(v,e);f=q[f+28>>2];break i}if(r[i+235|0]&2){n=v<<4;e=16;f=54;break i}n=v<<2;e=4;f=6}z=f+z|0;I=e+I|0;h=((h+v|0)-F|0)+n|0}a=a+1|0;if((K|0)==(a|0)){break h}e=q[g>>2];if((q[g+4>>2]-e|0)/240>>>0>a>>>0){continue}break}}break a}a=2;if(t[g+108>>2]>>0){break f}}a=(t[g+116>>2]>>0)<<1}q[g+116>>2]=z;q[g+112>>2]=I;q[g+108>>2]=h;o[g+128|0]=a|r[g+128|0]&253;a=q[g+4>>2]-q[g>>2]|0;f=(a|0)/240|0;if(a){L=q[L>>2];if(r[g+128|0]&2){a=q[g+88>>2];if(a){Mi[q[74944]](a);q[g+88>>2]=0}q[g+88>>2]=Mi[q[74943]](q[L+2384>>2],0,0,1);q[g+92>>2]=ul(q[g+92>>2],q[g+108>>2]);a=t[g+112>>2]<65537;o[g+128|0]=a|r[g+128|0]&254;e=w(q[g+116>>2],a?2:4);q[g+120>>2]=ul(q[g+120>>2],e);a=q[g+100>>2];if(a){Mi[q[74949]](a);q[g+100>>2]=0}q[g+100>>2]=Mi[q[74948]](q[L+2384>>2],e,q[g+120>>2],1);o[g+128|0]=r[g+128|0]&253}F=vp(L,f);I=Dv(L,241,242,g)<<6;v=f>>>0>1?f:1;n=0;a=0;e=F;while(1){f=q[g>>2];if(!a&(q[g+4>>2]-f|0)/240>>>0<=n>>>0|a){break a}i=f+w(n,240)|0;f=s[i+234>>1];if((f&132)==132){j:{if(!(f&256)){f=q[i+192>>2];if(!f|!r[f+52|0]){break j}}z=q[i+188>>2];K=q[z>>2];h=b;f=q[i+200>>2];if(!f){f=q[z+8>>2]}q[h+80>>2]=q[f>>2];f=q[i+196>>2];if(!f){f=q[z+4>>2]}q[h+16>>2]=f;q[b+144>>2]=0;q[b+148>>2]=0;q[b+160>>2]=0;q[b+152>>2]=0;q[b+156>>2]=0;kk(b+144|0,b+80|0,4);kk(b+144|0,b+16|0,4);kk(b+144|0,K+12|0,4);f=q[i+192>>2];if(f){At(f,b+144|0)}q[i+144>>2]=Rn(b+144|0);p[i+234>>1]=s[i+234>>1]&65279}h=q[i+128>>2];f=q[i+132>>2];c=u[i+136>>2];q[e+16>>2]=n;q[e+20>>2]=a;u[e+8>>2]=c;q[e>>2]=h;q[e+4>>2]=f;q[e+28>>2]=q[i+144>>2];h=e;f=q[i+200>>2];if(!f){f=q[q[i+188>>2]+8>>2]}q[h+32>>2]=q[q[f>>2]+132>>2];q[e+36>>2]=I|q[e+36>>2]&-16384|16;q[73388]=q[73388]+1;q[b+8>>2]=1;q[b+12>>2]=0;q[b>>2]=1;q[b+4>>2]=0;e=e+48|0}f=n+1|0;a=f>>>0<1?a+1|0:a;n=f;if((v|0)!=(f|0)|a){continue}break}up(L,F,e)}Ii=b+224|0;return 0}J(53716,53631,479,53341);G()}function F8(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,t=0,u=0,v=0,y=0,z=0,A=0,B=0,C=0;m=Ii-320|0;Ii=m;if(a){k=q[a+2384>>2];t=q[a+2388>>2];if(t){Mi[q[74974]](k,q[t+4>>2])}Mi[q[75032]](m+304|0,k);i=q[a+2020>>2];h=q[a+2024>>2];if((i|0)!=(h|0)){B=m+48|0;l=t;while(1){j=q[(v<<2)+i>>2];if(q[j+284>>2]){KH(a,q[q[j+156>>2]+132>>2],m+40|0);a:{if(b){if(!EH(q[m+40>>2],B,q[b+256>>2],b)){break a}}b:{if(t){break b}d=q[j+156>>2];if((d|0)==(l|0)){break b}Mi[q[74974]](k,q[d+4>>2]);l=d}P8(a,l,j);d=q[j>>2];if(d){TH(a,l,d)}if(c){TH(a,l,c)}f=q[a+2384>>2];Mi[q[75032]](m+24|0,k);y=q[m+24>>2];z=q[m+28>>2];A=s[m+32>>1];i=A;g=r[j+288|0];i=g&1?s[j+236>>1]<<4&240|(s[j+232>>1]&15|i&-256):i;i=g&4?s[j+240>>1]<<11&2048|i&-2049:i;C=f;e=y;d=z;c:{if(!(g&2)){break c}d:{if(!(r[j+279|0]&16)){break d}d=r[a+2400|0];if(d&2){o[a+2400|0]=d&253;break d}Mi[q[74993]](f,255);Mi[q[74942]](f,32,0,0,0,0,x(1),0)}e=r[j+278|0]<<5;g=r[j+276|0]<<21;n=r[j+279|0];d=n&15|y&-33546256;f=g|(e|z&-536870881);e=r[j+277|0]<<13;f=e|f;g=d;h=q[j+244>>2]&7;d=h;e=d>>>10|0;d=g|d<<22;g=e|f;f=d;d=q[j+248>>2]&7;e=d>>>19|0;f=f|d<<13;p=e|g;g=q[j+252>>2]&7;e=g>>>13|0;f=f|g<<19;p=e|p;u=f;f=q[j+256>>2]&7;e=f>>>16|0;u=u|f<<16;e=e|p;if(n&32){d=q[j+272>>2];n=d<<28&1879048192;d=q[j+264>>2];f=d<<25&234881024|u&33554431;d=e&-32|(q[j+260>>2]&7)<<2;e=q[j+268>>2]&7;g=e>>>1|0;e=e<<31|f|n;d=d|g;break c}p=e&-32;e=d>>>7|0;n=d<<25;d=h<<2;h=n|0;d=d|e;e=g>>>1|0;g=g<<31|h;d=d|e;e=u&33554431|(f<<28|g);d=f>>>4|d|p}CH(C,e,d,i,y,z,A);e=q[a>>2];d=q[a+4>>2];f=!(e|d);g=f?q[j+160>>2]:e;d=f?q[j+164>>2]:d;f=d;e:{if(!(d|g)){i=0;break e}h=0;i=0;if(!(Mi[q[75031]](g,f)|0)){break e}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+8>>2];d=q[a+12>>2];f=!(e|d);g=f?q[j+168>>2]:e;d=f?q[j+172>>2]:d;f=d;f:{if(!(d|g)){break f}h=0;if(!(Mi[q[75031]](g,f)|0)){break f}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+16>>2];d=q[a+20>>2];f=!(e|d);g=f?q[j+176>>2]:e;d=f?q[j+180>>2]:d;f=d;g:{if(!(d|g)){break g}h=0;if(!(Mi[q[75031]](g,f)|0)){break g}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+24>>2];d=q[a+28>>2];f=!(e|d);g=f?q[j+184>>2]:e;d=f?q[j+188>>2]:d;f=d;h:{if(!(d|g)){break h}h=0;if(!(Mi[q[75031]](g,f)|0)){break h}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+32>>2];d=q[a+36>>2];f=!(e|d);g=f?q[j+192>>2]:e;d=f?q[j+196>>2]:d;f=d;i:{if(!(d|g)){break i}h=0;if(!(Mi[q[75031]](g,f)|0)){break i}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+40>>2];d=q[a+44>>2];f=!(e|d);g=f?q[j+200>>2]:e;d=f?q[j+204>>2]:d;f=d;j:{if(!(d|g)){break j}h=0;if(!(Mi[q[75031]](g,f)|0)){break j}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+48>>2];d=q[a+52>>2];f=!(e|d);g=f?q[j+208>>2]:e;d=f?q[j+212>>2]:d;f=d;k:{if(!(d|g)){break k}h=0;if(!(Mi[q[75031]](g,f)|0)){break k}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}e=q[a+56>>2];d=q[a+60>>2];f=!(e|d);g=f?q[j+216>>2]:e;d=f?q[j+220>>2]:d;f=d;l:{if(!(d|g)){break l}h=0;if(!(Mi[q[75031]](g,f)|0)){break l}while(1){d=q[l+116>>2];e=i&255;d=e>>>0<(q[l+120>>2]-d|0)/40>>>0?d+w(e,40)|0:0;Mi[q[75021]](k,e,h&255,g,f);xp(a,d,e,g,f);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,f)>>>0>h>>>0){continue}break}}Mi[q[74959]](k,q[j+148>>2],q[j+144>>2],q[l+4>>2]);g=q[j+284>>2];f=q[j+280>>2];e=q[j+224>>2];d=q[j+152>>2];m:{if(!d){Mi[q[74964]](k,e,f,g);break m}Mi[q[74963]](k,e,f,g,q[j+228>>2],d)}Mi[q[74960]](k,q[j+148>>2]);e=q[a>>2];d=q[a+4>>2];f=!(e|d);g=f?q[j+160>>2]:e;d=f?q[j+164>>2]:d;e=d;n:{if(!(d|g)){i=0;break n}h=0;i=0;if(!(Mi[q[75031]](g,e)|0)){break n}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+8>>2];d=q[a+12>>2];f=!(e|d);g=f?q[j+168>>2]:e;d=f?q[j+172>>2]:d;e=d;o:{if(!(d|g)){break o}h=0;if(!(Mi[q[75031]](g,e)|0)){break o}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+16>>2];d=q[a+20>>2];f=!(e|d);g=f?q[j+176>>2]:e;d=f?q[j+180>>2]:d;e=d;p:{if(!(d|g)){break p}h=0;if(!(Mi[q[75031]](g,e)|0)){break p}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+24>>2];d=q[a+28>>2];f=!(e|d);g=f?q[j+184>>2]:e;d=f?q[j+188>>2]:d;e=d;q:{if(!(d|g)){break q}h=0;if(!(Mi[q[75031]](g,e)|0)){break q}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+32>>2];d=q[a+36>>2];f=!(e|d);g=f?q[j+192>>2]:e;d=f?q[j+196>>2]:d;e=d;r:{if(!(d|g)){break r}h=0;if(!(Mi[q[75031]](g,e)|0)){break r}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+40>>2];d=q[a+44>>2];f=!(e|d);g=f?q[j+200>>2]:e;d=f?q[j+204>>2]:d;e=d;s:{if(!(d|g)){break s}h=0;if(!(Mi[q[75031]](g,e)|0)){break s}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+48>>2];d=q[a+52>>2];f=!(e|d);g=f?q[j+208>>2]:e;d=f?q[j+212>>2]:d;e=d;t:{if(!(d|g)){break t}h=0;if(!(Mi[q[75031]](g,e)|0)){break t}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}e=q[a+56>>2];d=q[a+60>>2];f=!(e|d);g=f?q[j+216>>2]:e;d=f?q[j+220>>2]:d;e=d;if(!(d|g)){break a}h=0;if(!(Mi[q[75031]](g,e)|0)){break a}while(1){Mi[q[75022]](k,i&255,g,e);i=i+1|0;h=h+1|0;if(Mi[q[75031]](g,e)>>>0>h>>>0){continue}break}}i=q[a+2020>>2];h=q[a+2024>>2]}v=v+1|0;if(v>>>0>2>>>0){continue}break}}c=s[m+312>>1];b=q[m+304>>2];a=q[m+308>>2];Mi[q[75032]](m+8|0,k);CH(k,b,a,c,q[m+8>>2],q[m+12>>2],s[m+16>>1])}Ii=m+320|0}function Ar(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;i=Ii-192|0;Ii=i;q[i+184>>2]=0;a:{b:{c:{d:{if(!q[a+16>>2]){break d}e=q[q[a+12>>2]>>2];l=q[e+8>>2]-q[e+12>>2]>>4;g=(c|0)==-2;k=g?q[q[a+16>>2]+(b<<2)>>2]:c;if((k|0)!=-2){rj(e,-1e4,q[a>>2]);yk(e);e:{if(!g){FG(e,c);if((Vi(e,-1)|0)!=6){Ri(e,-2);a=q[e+8>>2];q[a+8>>2]=0;q[e+8>>2]=a+16;yk(e);Pi(3,199633,199941,0);break d}zG(e,c);break e}rj(e,-1e4,k)}if((Vi(e,-1)|0)!=6){break c}rj(e,-1e4,q[a>>2]);c=1;f:{g:{switch(b-2|0){case 0:f=+u[d>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;c=2;break f;case 1:lk(e,q[d+64>>2],q[d+68>>2]);a=q[d+80>>2];h:{if(a){uz(e,a,d+96|0);break h}a=q[d+84>>2];if(a){gr(e,d+96|0,a);break h}vj(e,0,0)}km(e,d);c=4;break f;case 2:break g;default:break f}}g=q[d>>2];a=q[g+4>>2];k=q[g>>2];c=a;i:{if(a|k){lk(e,k,c);break i}a=q[e+8>>2];q[a+8>>2]=0;q[e+8>>2]=a+16}vj(e,0,0);c=s[g+956>>1];if(c&1){f=+t[g+804>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Si(e,-2,200035);a=q[g+808>>2];c=q[e+8>>2];q[c+8>>2]=3;v[c>>3]=a|0;q[e+8>>2]=q[e+8>>2]+16;Si(e,-2,200043);a=s[g+956>>1]>>>1&1;c=q[e+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[e+8>>2]=q[e+8>>2]+16;Si(e,-2,200050);c=s[g+956>>1]}if(c&8){bj(e,g+544|0,q[g+800>>2]);Si(e,-2,200066);c=s[g+956>>1]}if(c&16){Ti(i+32|0,g+812|0,144);bj(e,200079,12);c=0;vj(e,32,0);while(1){a=q[e+8>>2];q[a+8>>2]=3;k=a;a=c+1|0;v[k>>3]=a|0;q[e+8>>2]=q[e+8>>2]+16;f=+u[(i+32|0)+(c<<2)>>2];c=q[e+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);c=a;if((a|0)!=32){continue}break}pj(e,-3);bj(e,200092,15);c=0;vj(e,32,0);while(1){a=q[e+8>>2];q[a+8>>2]=3;k=a;a=c+1|0;v[k>>3]=a|0;q[e+8>>2]=q[e+8>>2]+16;h=i+32|0;k=0;j:{if(!h){break j}k=q[(h+(c>>>3&536870908)|0)+128>>2]>>>c&1}c=q[e+8>>2];q[c+8>>2]=3;v[c>>3]=k>>>0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);c=a;if((a|0)!=32){continue}break}pj(e,-3);bj(e,200108,12);vj(e,4,0);a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[e+8>>2]=q[e+8>>2]+16;a=i+32|0;if(a){o[i+24|0]=r[a+136|0]}f=a?+r[i+24|0]:0;a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[e+8>>2]=q[e+8>>2]+16;a=i+32|0;if(a){o[i+24|0]=r[a+137|0]}f=a?+r[i+24|0]:0;a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[e+8>>2]=q[e+8>>2]+16;a=i+32|0;if(a){o[i+24|0]=r[a+138|0]}f=a?+r[i+24|0]:0;a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[e+8>>2]=q[e+8>>2]+16;a=i+32|0;if(a){o[i+24|0]=r[a+139|0]}f=a?+r[i+24|0]:0;a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);pj(e,-3)}if(q[g>>2]|q[g+4>>2]){Xi(e,200121);f=+u[g+8>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200127);a=s[g+956>>1]>>>6&1;c=q[e+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200135);a=s[g+956>>1]>>>7&1;c=q[e+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200144);a=o[g+957|0]&1;c=q[e+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3)}a=s[g+956>>1];if(a&512){Xi(e,200153);f=+u[g+12>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200155);f=+u[g+16>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200157);f=+u[g+20>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200160);f=+u[g+24>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200163);f=+u[g+28>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200172);f=+u[g+32>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200181);f=+u[g+36>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200191);f=+u[g+40>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);a=s[g+956>>1]}if(a&1024){Xi(e,200201);f=+u[g+44>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200207);f=+u[g+48>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200213);f=+u[g+52>>2];a=q[e+8>>2];q[a+8>>2]=3;v[a>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3)}k=q[g+540>>2];if((k|0)>=1){bj(e,200219,5);vj(e,k,0);c=0;while(1){a=q[e+8>>2];q[a+8>>2]=3;h=a;a=c+1|0;v[h>>3]=a|0;q[e+8>>2]=q[e+8>>2]+16;vj(e,0,6);bj(e,200225,2);c=g+w(c,44)|0;h=q[c+96>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200228,9);h=q[c+56>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200127,7);h=!q[c+60>>2];j=q[e+8>>2];q[j+8>>2]=1;q[j>>2]=h;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200135,8);h=q[c+60>>2]-3>>>0<2;j=q[e+8>>2];q[j+8>>2]=1;q[j>>2]=h;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200153,1);h=q[c- -64>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200155,1);h=q[c+68>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);Xi(e,200163);f=+q[c+72>>2];h=q[e+8>>2];q[h+8>>2]=3;v[h>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200172);f=+q[c+76>>2];h=q[e+8>>2];q[h+8>>2]=3;v[h>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);bj(e,200157,2);h=q[c+80>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);bj(e,200160,2);h=q[c+84>>2];j=q[e+8>>2];q[j+8>>2]=3;v[j>>3]=h|0;q[e+8>>2]=q[e+8>>2]+16;pj(e,-3);Xi(e,200181);f=+q[c+88>>2];h=q[e+8>>2];q[h+8>>2]=3;v[h>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);Xi(e,200191);f=+q[c+92>>2];c=q[e+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[e+8>>2]=q[e+8>>2]+16;Ij(e,-3);pj(e,-3);c=a;if((k|0)!=(a|0)){continue}break}pj(e,-3)}c=3;if(!(r[g+956|0]&32)){break f}bj(e,200238,4);a=q[g+800>>2];k:{if(!a){Xi(e,198902);break k}bj(e,g+544|0,a)}pj(e,-3)}a=q[(b<<2)+283152>>2];g=Ii-128|0;Ii=g;Ii=g+128|0;q[i+24>>2]=0;c=Pm(e,c,-1);if(c){m=-2;if(q[e+8>>2]-q[e+12>>2]>>4!=(l|0)){break b}}l:{if(c){break l}c=q[e+8>>2]-q[e+12>>2]>>4;m:{if((b|0)==4){n:{o:{m=c-l|0;switch(m|0){case 0:break l;case 1:break o;default:break n}}if((Vi(e,-1)|0)!=1){break n}m=0;o[d+4|0]=(Uj(e,-1)|0)!=0;Ri(e,-2);break l}q[i>>2]=a;Pi(4,199633,200243,i);break m}m=0;if((c|0)==(l|0)){break l}q[i+20>>2]=0;q[i+16>>2]=a;Pi(4,199633,200310,i+16|0)}Ri(e,l);m=-2}a=q[e+8>>2];q[a+8>>2]=0;q[e+8>>2]=a+16;yk(e);if(q[e+8>>2]-q[e+12>>2]>>4==(l|0)){break d}J(199603,199542,2098,199931);G()}if(q[e+8>>2]-q[e+12>>2]>>4!=(l|0)){break a}}Ii=i+192|0;return m}J(200013,199542,1774,199931);G()}J(199603,199542,2059,199931);G()}J(199603,199542,2101,199931);G()}function As(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;A=Ii-640|0;Ii=A;while(1){k=C<<3;h=k+A|0;t=r[(k|3)+b|0]|(r[(k|1)+b|0]<<16|r[b+k|0]<<24|r[(k|2)+b|0]<<8);e=r[(k|4)+b|0];c=e>>>8|0;e=e<<24;i=c|t;g=e;e=r[(k|5)+b|0];c=e>>>16|0;e=g|e<<16;i=c|i;g=e;e=r[(k|6)+b|0];c=e>>>24|0;q[h>>2]=r[(k|7)+b|0]|(g|e<<8);q[h+4>>2]=c|i;C=C+1|0;if((C|0)!=16){continue}break}b=16;y=q[A>>2];h=q[A+4>>2];while(1){l=(b<<3)+A|0;e=l;k=h;c=e-56|0;h=q[c>>2];t=q[c+4>>2];i=e-16|0;c=q[i+4>>2];i=q[i>>2];j=Gza(i,c,45);n=Li;g=h;l=Gza(i,c,3)^j;h=c;c=c>>>6|0;i=l^((h&63)<<26|i>>>6);h=g+i|0;c=(c^(Li^n))+t|0;c=h>>>0>>0?c+1|0:c;i=h;h=i+y|0;c=c+k|0;c=h>>>0>>0?c+1|0:c;i=h;k=c;c=e-120|0;h=q[c+4>>2];y=q[c>>2];c=Gza(y,h,63);l=Li;c=Gza(y,h,56)^c;t=Li^l;l=e;f=i;g=c;e=h;c=e>>>7|0;i=g^((e&127)<<25|y>>>7);e=f+i|0;c=(c^t)+k|0;q[l>>2]=e;q[l+4>>2]=e>>>0>>0?c+1|0:c;b=b+1|0;if((b|0)!=80){continue}break}C=0;c=a;b=q[c+20>>2];E=q[c+16>>2];i=E;N=b;t=b;h=q[c+28>>2];O=h;F=q[c+24>>2];y=F;k=q[c+36>>2];P=k;G=q[c+32>>2];j=G;l=q[c+44>>2];Q=l;H=q[c+40>>2];n=H;b=q[c+52>>2];R=b;I=q[c+48>>2];s=I;e=q[c+60>>2];S=e;J=q[c+56>>2];u=J;m=c- -64|0;p=q[m+4>>2];K=q[m>>2];m=K;T=p;L=q[c+72>>2];f=L;M=q[c+76>>2];w=M;while(1){B=C<<3;c=B+156224|0;g=q[c>>2];d=q[c+4>>2];c=Gza(s,b,50);x=Li;c=Gza(s,b,46)^c;x=Li^x;v=g;g=f;f=Gza(s,b,23)^c;g=g+f|0;c=(Li^x)+w|0;c=f>>>0>g>>>0?c+1|0:c;w=v+g|0;c=c+d|0;c=g>>>0>w>>>0?c+1|0:c;g=m^s&(m^u);w=g+w|0;c=(p^b&(e^p))+c|0;c=g>>>0>w>>>0?c+1|0:c;g=A+B|0;d=q[g>>2];w=d+w|0;c=q[g+4>>2]+c|0;x=w;c=d>>>0>w>>>0?c+1|0:c;d=c;c=Gza(i,t,36);g=Li;c=Gza(i,t,30)^c;f=Li^g;o=Gza(i,t,25)^c;g=o+((i|y)&j|i&y)|0;c=((h|t)&k|h&t)+(Li^f)|0;c=g>>>0>>0?c+1|0:c;f=g;g=f+x|0;c=c+d|0;w=g;c=f>>>0>g>>>0?c+1|0:c;g=Gza(g,c,36);f=Li;v=g;g=c;o=v^Gza(w,c,30);v=Li^f;f=Gza(w,c,25)^o;o=y&(i|w)|i&w;f=f+o|0;c=(h&(c|t)|c&t)+(Li^v)|0;v=f;f=f>>>0>>0?c+1|0:c;z=B|8;c=z+156224|0;o=m+q[c>>2]|0;c=p+q[c+4>>2]|0;c=m>>>0>o>>>0?c+1|0:c;m=o;p=A+z|0;o=q[p>>2];m=m+o|0;c=q[p+4>>2]+c|0;p=m;m=m>>>0>>0?c+1|0:c;o=p;c=d+l|0;p=n+x|0;c=p>>>0>>0?c+1|0:c;l=p;d=u^p&(s^u);p=o+d|0;n=c;c=(e^c&(b^e))+m|0;c=d>>>0>p>>>0?c+1|0:c;m=p;p=Gza(l,n,50);d=Li;p=Gza(l,n,46)^p;d=Li^d;p=Gza(l,n,23)^p;m=p+m|0;c=(Li^d)+c|0;c=m>>>0

>>0?c+1|0:c;o=m;p=m;m=m+v|0;d=c;c=c+f|0;c=m>>>0

>>0?c+1|0:c;p=Gza(m,c,36);f=Li;v=p;p=c;x=v^Gza(m,c,30);v=Li^f;f=Gza(m,c,25)^x;x=i&(m|w)|m&w;f=f+x|0;c=(t&(c|g)|c&g)+(Li^v)|0;v=f;f=f>>>0>>0?c+1|0:c;z=B|16;c=z+156224|0;x=u+q[c>>2]|0;c=e+q[c+4>>2]|0;c=u>>>0>x>>>0?c+1|0:c;e=x;u=A+z|0;x=q[u>>2];e=e+x|0;c=q[u+4>>2]+c|0;c=e>>>0>>0?c+1|0:c;u=c;x=e;c=d+k|0;e=j+o|0;c=e>>>0>>0?c+1|0:c;d=s^e&(l^s);j=x+d|0;k=c;c=(b^c&(b^n))+u|0;c=d>>>0>j>>>0?c+1|0:c;u=Gza(e,k,50);d=Li;u=Gza(e,k,46)^u;d=Li^d;u=Gza(e,k,23)^u;j=u+j|0;c=(Li^d)+c|0;c=j>>>0>>0?c+1|0:c;u=j+v|0;d=c;c=c+f|0;c=u>>>0>>0?c+1|0:c;x=u;u=Gza(u,c,36);f=Li;v=u;u=c;o=v^Gza(x,c,30);v=Li^f;f=Gza(x,c,25)^o;o=w&(m|x)|m&x;f=f+o|0;c=(g&(c|p)|c&p)+(Li^v)|0;v=f;f=f>>>0>>0?c+1|0:c;z=B|24;c=z+156224|0;o=s+q[c>>2]|0;c=b+q[c+4>>2]|0;c=s>>>0>o>>>0?c+1|0:c;b=o;s=A+z|0;o=q[s>>2];b=b+o|0;c=q[s+4>>2]+c|0;c=b>>>0>>0?c+1|0:c;s=c;o=b;c=d+h|0;b=j+y|0;c=b>>>0>>0?c+1|0:c;d=l^b&(e^l);j=o+d|0;h=c;c=(n^c&(k^n))+s|0;c=d>>>0>j>>>0?c+1|0:c;s=Gza(b,h,50);d=Li;s=Gza(b,h,46)^s;d=Li^d;s=Gza(b,h,23)^s;j=s+j|0;c=(Li^d)+c|0;c=j>>>0>>0?c+1|0:c;y=j;d=j;s=d+v|0;j=c;c=c+f|0;o=s;c=d>>>0>s>>>0?c+1|0:c;s=Gza(s,c,36);d=Li;f=s;s=c;f=f^Gza(o,c,30);v=Li^d;d=Gza(o,c,25)^f;f=m&(o|x)|o&x;d=d+f|0;c=(p&(c|u)|c&u)+(Li^v)|0;v=d;d=d>>>0>>0?c+1|0:c;z=B|32;c=z+156224|0;f=l+q[c>>2]|0;c=n+q[c+4>>2]|0;c=f>>>0>>0?c+1|0:c;l=f;n=A+z|0;f=q[n>>2];l=l+f|0;c=q[n+4>>2]+c|0;n=l;l=f>>>0>n>>>0?c+1|0:c;f=n;c=j+t|0;n=i+y|0;c=n>>>0>>0?c+1|0:c;i=n;n=e^i&(b^e);j=f+n|0;t=c;c=(k^c&(h^k))+l|0;c=j>>>0>>0?c+1|0:c;l=j;j=Gza(i,t,50);n=Li;j=Gza(i,t,46)^j;n=Li^n;j=Gza(i,t,23)^j;l=j+l|0;c=(Li^n)+c|0;c=j>>>0>l>>>0?c+1|0:c;y=l;n=l;l=n+v|0;j=c;c=c+d|0;c=l>>>0>>0?c+1|0:c;n=l;l=Gza(n,c,36);d=Li;f=l;l=c;f=f^Gza(n,c,30);v=Li^d;d=Gza(n,c,25)^f;f=x&(n|o)|n&o;d=d+f|0;c=(u&(c|s)|c&s)+(Li^v)|0;v=d;d=d>>>0>>0?c+1|0:c;c=B|40;z=c+A|0;c=c+156224|0;D=q[c>>2];f=q[z>>2]+D|0;c=q[z+4>>2]+q[c+4>>2]|0;c=f>>>0>>0?c+1|0:c;f=e+f|0;c=c+k|0;e=e>>>0>f>>>0?c+1|0:c;D=f;c=j+g|0;k=w+y|0;c=k>>>0>>0?c+1|0:c;f=k;j=b^f&(b^i);k=D+j|0;w=c;c=(h^c&(h^t))+e|0;c=j>>>0>k>>>0?c+1|0:c;e=k;k=Gza(f,w,50);j=Li;k=Gza(f,w,46)^k;j=Li^j;k=Gza(f,w,23)^k;e=k+e|0;c=(Li^j)+c|0;c=e>>>0>>0?c+1|0:c;y=e;j=e;k=e+v|0;e=c;c=c+d|0;c=j>>>0>k>>>0?c+1|0:c;j=k;k=Gza(j,c,36);g=Li;d=k;k=c;d=d^Gza(j,c,30);v=Li^g;g=Gza(j,c,25)^d;d=o&(j|n)|j&n;g=g+d|0;c=(s&(c|l)|c&l)+(Li^v)|0;v=g;g=d>>>0>g>>>0?c+1|0:c;c=B|48;z=c+A|0;c=c+156224|0;D=q[c>>2];d=q[z>>2]+D|0;c=q[z+4>>2]+q[c+4>>2]|0;c=d>>>0>>0?c+1|0:c;d=b+d|0;c=c+h|0;b=b>>>0>d>>>0?c+1|0:c;c=e+p|0;h=m+y|0;c=h>>>0>>0?c+1|0:c;m=h;e=i^h&(f^i);h=d+e|0;p=c;c=(t^c&(t^w))+b|0;c=e>>>0>h>>>0?c+1|0:c;b=h;h=Gza(m,p,50);e=Li;h=Gza(m,p,46)^h;e=Li^e;h=Gza(m,p,23)^h;b=h+b|0;c=(Li^e)+c|0;c=b>>>0>>0?c+1|0:c;h=b+v|0;e=c;c=c+g|0;y=h;c=b>>>0>h>>>0?c+1|0:c;h=Gza(h,c,36);g=Li;d=h;h=c;d=d^Gza(y,c,30);v=Li^g;g=Gza(y,c,25)^d;d=n&(j|y)|j&y;g=g+d|0;c=(l&(c|k)|c&k)+(Li^v)|0;v=g;g=d>>>0>g>>>0?c+1|0:c;c=B|56;B=c+A|0;c=c+156224|0;z=q[c>>2];d=q[B>>2]+z|0;c=q[B+4>>2]+q[c+4>>2]|0;c=d>>>0>>0?c+1|0:c;d=d+i|0;c=c+t|0;i=d>>>0>>0?c+1|0:c;c=e+u|0;t=b+x|0;c=t>>>0>>0?c+1|0:c;u=t;t=f^t&(f^m);b=d+t|0;e=c;c=(w^c&(p^w))+i|0;c=b>>>0>>0?c+1|0:c;i=Gza(u,e,50);t=Li;i=Gza(u,e,46)^i;t=Li^t;i=Gza(u,e,23)^i;b=i+b|0;c=(Li^t)+c|0;c=b>>>0>>0?c+1|0:c;i=b+v|0;d=g;g=c;c=d+c|0;c=i>>>0>>0?c+1|0:c;t=c;c=g+s|0;d=b+o|0;c=d>>>0>>0?c+1|0:c;s=d;b=c;c=C>>>0<72;C=C+8|0;if(c){continue}break}c=w+M|0;d=f+L|0;c=d>>>0>>0?c+1|0:c;g=a;q[g+72>>2]=d;q[g+76>>2]=c;c=p+T|0;m=m+K|0;c=m>>>0>>0?c+1|0:c;q[g+64>>2]=m;q[g+68>>2]=c;c=e+S|0;u=u+J|0;c=u>>>0>>0?c+1|0:c;q[g+56>>2]=u;q[g+60>>2]=c;c=b+R|0;s=s+I|0;c=s>>>0>>0?c+1|0:c;e=g;q[e+48>>2]=s;q[e+52>>2]=c;c=l+Q|0;e=n+H|0;c=e>>>0>>0?c+1|0:c;b=g;q[b+40>>2]=e;q[b+44>>2]=c;c=k+P|0;e=j+G|0;c=e>>>0>>0?c+1|0:c;q[b+32>>2]=e;q[b+36>>2]=c;c=h+O|0;e=y+F|0;c=e>>>0>>0?c+1|0:c;q[b+24>>2]=e;q[b+28>>2]=c;c=t+N|0;b=i+E|0;c=b>>>0>>0?c+1|0:c;q[g+16>>2]=b;q[g+20>>2]=c;Ii=A+640|0;return 0}function Hwa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;c=Ii-128|0;Ii=c;l=q[b>>2];h=r[l+102496|0];n=l-4|0;f=100240;a:{if(n>>>0<3){break a}e=q[b+4>>2]<<4;f=e+100256|0;if(138>>>l&1){break a}f=e+101280|0}e=q[b+12>>2];q[c+112>>2]=q[b+8>>2];q[c+116>>2]=e;e=q[b+20>>2];q[c+120>>2]=q[b+16>>2];q[c+124>>2]=e;e=q[b+36>>2];q[c+104>>2]=q[b+32>>2];q[c+108>>2]=e;e=q[b+28>>2];q[c+96>>2]=q[b+24>>2];q[c+100>>2]=e;q[c+88>>2]=r[b+48|0]|r[b+49|0]<<8|(r[b+50|0]<<16|r[b+51|0]<<24);e=r[b+44|0]|r[b+45|0]<<8|(r[b+46|0]<<16|r[b+47|0]<<24);q[c+80>>2]=r[b+40|0]|r[b+41|0]<<8|(r[b+42|0]<<16|r[b+43|0]<<24);q[c+84>>2]=e;q[c+72>>2]=r[b+60|0]|r[b+61|0]<<8|(r[b+62|0]<<16|r[b+63|0]<<24);e=r[b+56|0]|r[b+57|0]<<8|(r[b+58|0]<<16|r[b+59|0]<<24);q[c+64>>2]=r[b+52|0]|r[b+53|0]<<8|(r[b+54|0]<<16|r[b+55|0]<<24);q[c+68>>2]=e;e=q[b+84>>2];q[c+48>>2]=q[b+80>>2];q[c+52>>2]=e;e=q[b+76>>2];q[c+40>>2]=q[b+72>>2];q[c+44>>2]=e;e=q[b+68>>2];q[c+32>>2]=q[b+64>>2];q[c+36>>2]=e;q[c+24>>2]=-1;q[c+16>>2]=-1;q[c+20>>2]=-1;s=h>>>0>1?h:1;p=l&-3;while(1){j=d<<2;g=j+(c+16|0)|0;if(d){k=q[b+4>>2]+102368|0;b:{if(!((d|0)!=1|p)){break b}e=q[b+4>>2];k=e+102432|0;if(!((d|0)!=2|p)){break b}k=e+102304|0}e=r[k|0]}else{e=0}q[g>>2]=e;g=1<>2]+r[l+102504|0];c:{if(!(r[(c+112|0)+e|0]&g>>>1)){break c}if(r[f|0]==(d|0)){o[c+112|0]=g+(r[c+112|0]^-1)}if(r[f+1|0]==(d|0)){o[c+113|0]=g+(r[c+113|0]^-1)}if(r[f+2|0]==(d|0)){o[c+114|0]=g+(r[c+114|0]^-1)}if(r[f+3|0]==(d|0)){o[c+115|0]=g+(r[c+115|0]^-1)}if(r[f+4|0]==(d|0)){o[c+116|0]=g+(r[c+116|0]^-1)}if(r[f+5|0]==(d|0)){o[c+117|0]=g+(r[c+117|0]^-1)}if(r[f+6|0]==(d|0)){o[c+118|0]=g+(r[c+118|0]^-1)}if(r[f+7|0]==(d|0)){o[c+119|0]=g+(r[c+119|0]^-1)}if(r[f+8|0]==(d|0)){o[c+120|0]=g+(r[c+120|0]^-1)}if(r[f+9|0]==(d|0)){o[c+121|0]=g+(r[c+121|0]^-1)}if(r[f+10|0]==(d|0)){o[c+122|0]=g+(r[c+122|0]^-1)}if(r[f+11|0]==(d|0)){o[c+123|0]=g+(r[c+123|0]^-1)}if(r[f+12|0]==(d|0)){o[c+124|0]=g+(r[c+124|0]^-1)}if(r[f+13|0]==(d|0)){o[c+125|0]=g+(r[c+125|0]^-1)}if(r[f+14|0]==(d|0)){o[c+126|0]=g+(r[c+126|0]^-1)}if(r[f+15|0]==(d|0)){o[c+127|0]=g+(r[c+127|0]^-1)}d:{if((l&-2)!=4){g=j+(c+80|0)|0;i=r[g|0]|r[g+1|0]<<8|(r[g+2|0]<<16|r[g+3|0]<<24);k=j+(c- -64|0)|0;m=r[k|0]|r[k+1|0]<<8|(r[k+2|0]<<16|r[k+3|0]<<24);o[g|0]=m;o[g+1|0]=m>>>8;o[g+2|0]=m>>>16;o[g+3|0]=m>>>24;o[k|0]=i;o[k+1|0]=i>>>8;o[k+2|0]=i>>>16;o[k+3|0]=i>>>24;break d}g=j+(c+80|0)|0;i=r[g|0];k=j+(c- -64|0)|0;o[g|0]=r[k|0];o[k|0]=i;i=r[g+1|0]|r[g+2|0]<<8;m=r[k+1|0]|r[k+2|0]<<8;o[g+1|0]=m;o[g+2|0]=m>>>8;o[k+1|0]=i;o[k+2|0]=i>>>8}if((l|0)==1){break c}g=(c+32|0)+(d<<3)|0;q[g>>2]=Gza(q[g>>2],q[g+4>>2],32);q[g+4>>2]=Li}e:{if((l&-2)!=4){break e}k=r[(c+96|0)+e|0];e=1<>2];if(!(k&e>>>1)){break e}if(r[f|0]==(d|0)){o[c+96|0]=e+(r[c+96|0]^-1)}if(r[f+1|0]==(d|0)){o[c+97|0]=e+(r[c+97|0]^-1)}if(r[f+2|0]==(d|0)){o[c+98|0]=e+(r[c+98|0]^-1)}if(r[f+3|0]==(d|0)){o[c+99|0]=e+(r[c+99|0]^-1)}if(r[f+4|0]==(d|0)){o[c+100|0]=e+(r[c+100|0]^-1)}if(r[f+5|0]==(d|0)){o[c+101|0]=e+(r[c+101|0]^-1)}if(r[f+6|0]==(d|0)){o[c+102|0]=e+(r[c+102|0]^-1)}if(r[f+7|0]==(d|0)){o[c+103|0]=e+(r[c+103|0]^-1)}if(r[f+8|0]==(d|0)){o[c+104|0]=e+(r[c+104|0]^-1)}if(r[f+9|0]==(d|0)){o[c+105|0]=e+(r[c+105|0]^-1)}if(r[f+10|0]==(d|0)){o[c+106|0]=e+(r[c+106|0]^-1)}if(r[f+11|0]==(d|0)){o[c+107|0]=e+(r[c+107|0]^-1)}if(r[f+12|0]==(d|0)){o[c+108|0]=e+(r[c+108|0]^-1)}if(r[f+13|0]==(d|0)){o[c+109|0]=e+(r[c+109|0]^-1)}if(r[f+14|0]==(d|0)){o[c+110|0]=e+(r[c+110|0]^-1)}if(r[f+15|0]==(d|0)){o[c+111|0]=e+(r[c+111|0]^-1)}e=j+(c+80|0)|0;g=r[e+3|0];k=e;e=j+(c- -64|0)|0;o[k+3|0]=r[e+3|0];o[e+3|0]=g}d=d+1|0;if((s|0)!=(d|0)){continue}break}o[a|0]=0;o[a+1|0]=0;o[a+2|0]=0;o[a+3|0]=0;o[a+4|0]=0;o[a+5|0]=0;o[a+6|0]=0;o[a+7|0]=0;o[a+8|0]=0;o[a+9|0]=0;o[a+10|0]=0;o[a+11|0]=0;o[a+12|0]=0;o[a+13|0]=0;o[a+14|0]=0;o[a+15|0]=0;q[c+12>>2]=0;dm(a,1<>2],2,c+12|0)}if((l|0)==4){dm(a,q[b+88>>2],1,c+12|0)}if(n>>>0>=3){dm(a,q[b+4>>2],142>>>l&1?6:4,c+12|0)}e=h>>>0>1?h:1;k=l>>>0>3?4:3;f=0;while(1){f:{if((f|0)!=3){g=r[l+102512|0];d=0;while(1){j=d<<2;dm(a,r[(j+(c+80|0)|0)+f|0],g,c+12|0);dm(a,r[(j+(c- -64|0)|0)+f|0],g,c+12|0);d=d+1|0;if((e|0)!=(d|0)){continue}break}break f}g=o[l+102520|0];d=0;while(1){j=d<<2;dm(a,r[(j+(c+80|0)|0)+3|0],g,c+12|0);dm(a,r[(j+(c- -64|0)|0)+3|0],g,c+12|0);d=d+1|0;if((e|0)!=(d|0)){continue}break}}f=f+1|0;if((k|0)!=(f|0)){continue}break}g:{if(52>>>l&1){break g}d=0;if((l|0)==1){while(1){dm(a,q[(c+32|0)+(d<<3)>>2],1,c+12|0);d=d+1|0;if((e|0)!=(d|0)){continue}break g}}while(1){f=(c+32|0)+(d<<3)|0;dm(a,q[f>>2],1,c+12|0);dm(a,q[f+4>>2],1,c+12|0);d=d+1|0;if((e|0)!=(d|0)){continue}break}}e=q[c+24>>2];d=q[c+20>>2];g=q[c+16>>2];k=0;while(1){f=a;j=k<<2;i=r[j+(q[b+88>>2]?c+96|0:c+112|0)|0];h=q[b+88>>2];h:{if(h){h=r[l+102528|0]-h|0;break h}h=r[l+102504|0]}dm(f,i,h-((g|0)==(j|0)|(d|0)==(j|0)|(e|0)==(j|0))|0,c+12|0);f=a;h=j|1;m=r[h+(q[b+88>>2]?c+96|0:c+112|0)|0];i=q[b+88>>2];i:{if(i){i=r[l+102528|0]-i|0;break i}i=r[l+102504|0]}dm(f,m,i-((g|0)==(h|0)|(d|0)==(h|0)|(e|0)==(h|0))|0,c+12|0);f=a;h=j|2;m=r[h+(q[b+88>>2]?c+96|0:c+112|0)|0];i=q[b+88>>2];j:{if(i){i=r[l+102528|0]-i|0;break j}i=r[l+102504|0]}dm(f,m,i-((g|0)==(h|0)|(d|0)==(h|0)|(e|0)==(h|0))|0,c+12|0);f=a;j=j|3;i=r[j+(q[b+88>>2]?c+96|0:c+112|0)|0];h=q[b+88>>2];k:{if(h){h=r[l+102528|0]-h|0;break k}h=r[l+102504|0]}dm(f,i,h-((g|0)==(j|0)|(d|0)==(j|0)|(e|0)==(j|0))|0,c+12|0);k=k+1|0;if((k|0)!=4){continue}break}if((l&-2)==4){k=0;while(1){f=a;j=k<<2;i=r[j+(q[b+88>>2]?c+112|0:c+96|0)|0];h=q[b+88>>2];l:{if(h){h=h+r[l+102504|0]|0;break l}h=r[l+102528|0]}dm(f,i,h-((g|0)==(j|0)|(d|0)==(j|0)|(e|0)==(j|0))|0,c+12|0);f=a;h=j|1;m=r[h+(q[b+88>>2]?c+112|0:c+96|0)|0];i=q[b+88>>2];m:{if(i){i=i+r[l+102504|0]|0;break m}i=r[l+102528|0]}dm(f,m,i-((g|0)==(h|0)|(d|0)==(h|0)|(e|0)==(h|0))|0,c+12|0);f=a;h=j|2;m=r[h+(q[b+88>>2]?c+112|0:c+96|0)|0];i=q[b+88>>2];n:{if(i){i=i+r[l+102504|0]|0;break n}i=r[l+102528|0]}dm(f,m,i-((g|0)==(h|0)|(d|0)==(h|0)|(e|0)==(h|0))|0,c+12|0);f=a;j=j|3;i=r[j+(q[b+88>>2]?c+112|0:c+96|0)|0];h=q[b+88>>2];o:{if(h){h=h+r[l+102504|0]|0;break o}h=r[l+102528|0]}dm(f,i,h-((g|0)==(j|0)|(d|0)==(j|0)|(e|0)==(j|0))|0,c+12|0);k=k+1|0;if((k|0)!=4){continue}break}}if(q[c+12>>2]==128){Ii=c+128|0;return}J(102536,96899,11725,102555);G()}function uq(a,b,c,d,e,f,g){var h=0,i=x(0),j=0,k=x(0),l=x(0),m=0,n=0,r=x(0),s=0,t=0,y=0,z=0,A=0;h=Ii-160|0;Ii=h;a:{if(!a){m=-6;break a}p[g+108>>1]=p[g+108>>1]&1;b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{if(!(b|c)){q[g+104>>2]=0;if(q[71526]==(d|0)&q[71527]==(e|0)){j=a+32|0;q[g+104>>2]=j;b=q[71529];q[g>>2]=q[71528];q[g+4>>2]=b;b=q[71531];q[g+8>>2]=q[71530];q[g+12>>2]=b;b=q[71533];q[g+16>>2]=q[71532];q[g+20>>2]=b;b=q[a+32>>2];c=q[a+36>>2];u[g+48>>2]=u[a+40>>2];q[g+40>>2]=b;q[g+44>>2]=c;q[g+32>>2]=3;break b}if(q[71528]==(d|0)&q[71529]==(e|0)){j=a+32|0;q[g+104>>2]=j;i=u[a+32>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71530]==(d|0)&q[71531]==(e|0)){j=a+36|0;q[g+104>>2]=j;i=u[j>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71532]==(d|0)&q[71533]==(e|0)){j=a+40|0;q[g+104>>2]=j;i=u[j>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71500]==(d|0)&q[71501]==(e|0)){j=a+16|0;q[g+104>>2]=j;b=q[71503];q[g>>2]=q[71502];q[g+4>>2]=b;b=q[71505];q[g+8>>2]=q[71504];q[g+12>>2]=b;b=q[71507];q[g+16>>2]=q[71506];q[g+20>>2]=b;b=q[a+16>>2];c=q[a+20>>2];u[g+48>>2]=u[a+24>>2];q[g+40>>2]=b;q[g+44>>2]=c;q[g+32>>2]=3;break b}if(q[71502]==(d|0)&q[71503]==(e|0)){j=a+16|0;q[g+104>>2]=j;i=u[a+16>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71504]==(d|0)&q[71505]==(e|0)){j=a+20|0;q[g+104>>2]=j;i=u[j>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71506]==(d|0)&q[71507]==(e|0)){j=a+24|0;q[g+104>>2]=j;i=u[j>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}if(q[71508]==(d|0)&q[71509]==(e|0)){b=q[a+48>>2];if((b|0)!=q[a+64>>2]){i=u[a+52>>2];break d}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break d}l=u[a+12>>2];r=u[a+8>>2];k=u[a+4>>2];i=u[a>>2];break c}if(q[71510]==(d|0)&q[71511]==(e|0)){b=q[a+48>>2];if((b|0)!=q[a+64>>2]){i=u[a+52>>2];break f}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break f}i=u[a>>2];break e}if(q[71512]==(d|0)&q[71513]==(e|0)){b=q[a+48>>2];if((b|0)!=q[a+64>>2]){i=u[a+52>>2];break h}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break h}i=u[a+4>>2];break g}if(q[71514]==(d|0)&q[71515]==(e|0)){b=q[a+48>>2];if((b|0)!=q[a+64>>2]){i=u[a+52>>2];break j}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break j}i=u[a+8>>2];break i}if(q[71516]==(d|0)&q[71517]==(e|0)){b=q[a+48>>2];if((b|0)!=q[a+64>>2]){i=u[a+52>>2];break l}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break l}i=u[a+12>>2];break k}if(q[71518]==(d|0)&q[71519]==(e|0)){j=a+48|0;i=u[a+48>>2];m:{if(q[a+64>>2]!=q[a+48>>2]){k=u[a+52>>2];break m}k=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break m}Xs(h,u[a>>2],u[a+4>>2],u[a+8>>2],u[a+12>>2]);i=u[h>>2];u[a+48>>2]=i;k=u[h+4>>2];u[a+52>>2]=k;l=u[h+8>>2];u[a+56>>2]=l;u[a+72>>2]=l;u[a+68>>2]=k;u[a+64>>2]=i}q[g+104>>2]=j;b=q[71521];q[g>>2]=q[71520];q[g+4>>2]=b;b=q[71523];q[g+8>>2]=q[71522];q[g+12>>2]=b;b=q[71525];q[g+16>>2]=q[71524];q[g+20>>2]=b;u[g+48>>2]=u[a+56>>2];u[g+44>>2]=k;u[g+40>>2]=i;q[g+32>>2]=3;break b}if(q[71520]==(d|0)&q[71521]==(e|0)){i=u[a+48>>2];if(!(q[a+64>>2]!=q[a+48>>2]|q[a+52>>2]!=q[a+68>>2]|q[a+56>>2]!=q[a+72>>2])){Xs(h,u[a>>2],u[a+4>>2],u[a+8>>2],u[a+12>>2]);i=u[h>>2];u[a+48>>2]=i;k=u[h+4>>2];u[a+52>>2]=k;l=u[h+8>>2];u[a+56>>2]=l;u[a+72>>2]=l;u[a+68>>2]=k;u[a+64>>2]=i}q[g+32>>2]=0;v[g+40>>3]=i;j=a+48|0;q[g+104>>2]=j;break b}if(q[71522]==(d|0)&q[71523]==(e|0)){n:{if(q[a+48>>2]!=q[a+64>>2]){i=u[a+52>>2];break n}i=u[a+52>>2];if(q[a+68>>2]!=q[a+52>>2]|q[a+56>>2]!=q[a+72>>2]){break n}Xs(h,u[a>>2],u[a+4>>2],u[a+8>>2],u[a+12>>2]);k=u[h>>2];u[a+48>>2]=k;i=u[h+4>>2];u[a+52>>2]=i;l=u[h+8>>2];u[a+56>>2]=l;u[a+72>>2]=l;u[a+68>>2]=i;u[a+64>>2]=k}q[g+32>>2]=0;v[g+40>>3]=i;j=a+52|0;q[g+104>>2]=j;break b}if((d|0)!=q[71524]|(e|0)!=q[71525]){break b}if(!(q[a+48>>2]!=q[a+64>>2]|q[a+52>>2]!=q[a+68>>2]|q[a+56>>2]!=q[a+72>>2])){Xs(h,u[a>>2],u[a+4>>2],u[a+8>>2],u[a+12>>2]);i=u[h>>2];u[a+48>>2]=i;k=u[h+4>>2];u[a+52>>2]=k;l=u[h+8>>2];u[a+56>>2]=l;u[a+72>>2]=l;u[a+68>>2]=k;u[a+64>>2]=i}j=a+56|0;q[g+104>>2]=j;i=u[j>>2];q[g+32>>2]=0;v[g+40>>3]=i;break b}m=-5;j=q[a+84>>2];s=q[j+4>>2];if(!s){break a}n=q[j>>2];j=0;while(1){t=w(j,96)+n|0;if(q[t>>2]!=(b|0)|q[t+4>>2]!=(c|0)){j=j+1|0;if((s|0)!=(j|0)){continue}break a}break}b=j&65535;c=q[(w(b,96)+n|0)+16>>2];if(!q[c+84>>2]){m=-1;break a}j=0;if(o[c+102|0]&1){o:{if(!b){m=0;break o}m=0;while(1){m=(p[q[(w(j,96)+n|0)+16>>2]+102>>1]&1)+m|0;j=j+1|0;if((b|0)!=(j|0)){continue}break}}j=((m<<2)+a|0)+156|0}q[h+112>>2]=q[c+16>>2];b=q[(q[a+80>>2]+(q[(w(b,96)+n|0)+20>>2]<<2)|0)+12>>2];q[h+128>>2]=d;q[h+132>>2]=e;q[h+120>>2]=a;q[h+116>>2]=b;a=q[f+12>>2];q[h+152>>2]=q[f+8>>2];q[h+156>>2]=a;a=q[f+4>>2];q[h+144>>2]=q[f>>2];q[h+148>>2]=a;q[h+136>>2]=j;m=(z=h+112|0,A=Hp(h),y=q[c+84>>2],Mi[y](z|0,A|0)|0);if(m){break a}Ti(g,h,110);break a}u[a+68>>2]=i;q[a+64>>2]=b;k=u[a+56>>2];u[a+72>>2]=k;u[h+120>>2]=k;u[h+116>>2]=i;q[h+112>>2]=b;en(h,h+112|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];i=u[h+12>>2];u[a+12>>2]=i}q[g+32>>2]=0;v[g+40>>3]=i;j=a+12|0;q[g+104>>2]=j;break b}u[a+68>>2]=i;q[a+64>>2]=b;k=u[a+56>>2];u[a+72>>2]=k;u[h+120>>2]=k;u[h+116>>2]=i;q[h+112>>2]=b;en(h,h+112|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];i=u[h+8>>2];u[a+8>>2]=i;u[a+12>>2]=u[h+12>>2]}q[g+32>>2]=0;v[g+40>>3]=i;j=a+8|0;q[g+104>>2]=j;break b}u[a+68>>2]=i;q[a+64>>2]=b;k=u[a+56>>2];u[a+72>>2]=k;u[h+120>>2]=k;u[h+116>>2]=i;q[h+112>>2]=b;en(h,h+112|0);u[a>>2]=u[h>>2];i=u[h+4>>2];u[a+4>>2]=i;u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2]}q[g+32>>2]=0;v[g+40>>3]=i;j=a+4|0;q[g+104>>2]=j;break b}u[a+68>>2]=i;q[a+64>>2]=b;k=u[a+56>>2];u[a+72>>2]=k;u[h+120>>2]=k;u[h+116>>2]=i;q[h+112>>2]=b;en(h,h+112|0);i=u[h>>2];u[a>>2]=i;u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2]}q[g+32>>2]=0;q[g+104>>2]=a;v[g+40>>3]=i;j=a;break b}u[a+68>>2]=i;q[a+64>>2]=b;k=u[a+56>>2];u[a+72>>2]=k;u[h+120>>2]=k;u[h+116>>2]=i;q[h+112>>2]=b;en(h,h+112|0);i=u[h>>2];u[a>>2]=i;k=u[h+4>>2];u[a+4>>2]=k;r=u[h+8>>2];u[a+8>>2]=r;l=u[h+12>>2];u[a+12>>2]=l}q[g+104>>2]=a;b=q[71511];q[g>>2]=q[71510];q[g+4>>2]=b;b=q[71513];q[g+8>>2]=q[71512];q[g+12>>2]=b;b=q[71515];q[g+16>>2]=q[71514];q[g+20>>2]=b;b=q[71516];c=q[71517];u[g+52>>2]=l;u[g+48>>2]=r;u[g+44>>2]=k;u[g+40>>2]=i;q[g+32>>2]=5;q[g+24>>2]=b;q[g+28>>2]=c;j=a}Ii=h+160|0;return j?0:-1}Ii=h+160|0;return m}function vba(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=0,n=0,t=0,v=0,z=0,A=0,B=0,C=x(0),D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=x(0),Q=0,R=x(0);h=Ii-96|0;Ii=h;k=a+360|0;q[k>>2]=q[a+356>>2];e=q[a+12>>2];a:{b:{c:{d:{f=q[a+164>>2];e:{if(!f){break e}m=a+364|0;t=a+356|0;while(1){g=q[q[a+160>>2]+(j<<2)>>2];if((g|0)!=-1){while(1){d=q[a+168>>2]+w(g,40)|0;g=d;f=q[d+8>>2];f:{if(r[d+12|0]&2){if(f){C=u[213692];f=q[d+28>>2];g:{if(f>>>0<=2){z=q[(f<<2)+171240>>2];break g}z=0}l=x(+(w(z,w(q[d+16>>2],q[d+20>>2]))>>>0)*.0009765625*.0009765625);u[213692]=C-l;u[h+32>>2]=-l;f=q[h+36>>2];q[h+16>>2]=q[h+32>>2];q[h+20>>2]=f;Mi[q[b+8>>2]](a,q[g+8>>2],c)}f=q[k>>2];i=q[m>>2];if((f|0)==(i|0)){if(o[a+368|0]&1){break d}Wi((f-q[t>>2]>>3)+16|0,8,t,m,k);i=q[m>>2];f=q[k>>2]}if((f|0)==(i|0)){break c}g=q[d>>2];i=q[d+4>>2];q[k>>2]=f+8;q[f>>2]=g;q[f+4>>2]=i;break f}i=q[d+24>>2];if(!f){if(!i){break f}z=h;i=q[d+28>>2];h:{if(i>>>0<=2){f=q[(i<<2)+171240>>2];break h}f=0}l=x(+(w(f,w(q[d+20>>2],q[d+16>>2]))>>>0)*.0009765625*.0009765625);u[z+32>>2]=l;u[213692]=u[213692]+l;f=q[h+36>>2];q[h>>2]=q[h+32>>2];q[h+4>>2]=f;q[g+8>>2]=Mi[q[b+4>>2]](a,q[d+16>>2],q[d+20>>2],q[d+28>>2],q[d+24>>2],c);Ni(q[d+24>>2]);q[d+24>>2]=0;n=n+1|0;break f}if(!i){break f}z=h;i=q[d+28>>2];i:{if(i>>>0<=2){f=q[(i<<2)+171240>>2];break i}f=0}l=x(+(w(f,w(q[d+20>>2],q[d+16>>2]))>>>0)*.0009765625*.0009765625);u[z+32>>2]=l;u[213692]=u[213692]+l;f=q[h+36>>2];q[h+8>>2]=q[h+32>>2];q[h+12>>2]=f;Mi[q[b+12>>2]](a,q[g+8>>2],q[d+16>>2],q[d+20>>2],q[d+28>>2],q[d+24>>2],c);Ni(q[d+24>>2]);q[d+24>>2]=0}g=q[d+32>>2];if((g|0)!=-1){continue}break}f=q[a+164>>2]}j=j+1|0;if(j>>>0>>0){continue}break}if((n|0)<1){break e}j=q[a+32>>2];d=q[a+36>>2]-j|0;if(!d|!f){break e}d=(d|0)/592|0;k=d>>>0>1?d:1;m=q[a+160>>2];i=0;while(1){d=j+w(i,592)|0;t=q[d+424>>2];n=q[d+428>>2];g=q[m+(Cza(t,n,f)<<2)>>2];j:{if((g|0)==-1){break j}B=q[a+168>>2];while(1){g=B+w(g,40)|0;if(q[g>>2]!=(t|0)|q[g+4>>2]!=(n|0)){g=q[g+32>>2];if((g|0)!=-1){continue}break j}break}g=q[g+8>>2];q[d+436>>2]=3;q[d+432>>2]=g}i=i+1|0;if((k|0)!=(i|0)){continue}break}}g=q[a+356>>2];if((g|0)!=q[a+360>>2]){i=a+160|0;f=0;while(1){g=(f<<3)+g|0;d=q[g+4>>2];k=q[g>>2];waa(i,k,d);m=q[a+32>>2];j=q[a+36>>2]-m|0;g=(j|0)/592|0;if(j){t=g>>>0>1?g:1;g=0;while(1){j=m+w(g,592)|0;if(q[j+424>>2]==(k|0)&q[j+428>>2]==(d|0)){q[j+432>>2]=0;q[j+436>>2]=0}g=g+1|0;if((t|0)!=(g|0)){continue}break}}f=f+1|0;g=q[a+356>>2];if(f>>>0>2]-g>>3>>>0){continue}break}}i=e+60|0;f=q[e+56>>2];q[i>>2]=f;B=e+76|0;q[B>>2]=q[e+72>>2];E=e+92|0;q[E>>2]=q[e+88>>2];F=e+108|0;q[F>>2]=q[e+104>>2];g=e+124|0;q[g>>2]=q[e+120>>2];d=e+140|0;q[d>>2]=q[e+136>>2];j=e+144|0;n=e+136|0;k=e+128|0;I=e+120|0;D=e+112|0;t=e+104|0;K=e+96|0;L=e+88|0;M=e+80|0;N=e+72|0;m=e+56|0;O=e- -64|0;z=q[O>>2]-f>>4;f=s[a+26>>1]<<1;if(z>>>0>>0){if(o[e+68|0]&1){break d}Wi(f,16,m,O,i);if(o[e+84|0]&1){break d}Wi(f,64,N,M,B);if(o[e+100|0]&1){break d}Wi(f,4,L,K,E);if(o[e+188|0]&1){break d}Wi(f,80,e+176|0,e+184|0,e+180|0);v=q[e+176>>2];if(f>>>0>(q[e+184>>2]-v|0)/80>>>0){break b}q[e+180>>2]=v+w(f,80);if(o[e+116|0]&1){break d}Wi(f,24,t,D,F);if(o[e+132|0]&1){break d}Wi(f,4,I,k,g);if(o[e+148|0]&1){break d}Wi(f,2,n,j,d)}p[e+192>>1]=0;f=s[e+194>>1]+1|0;p[e+194>>1]=(f&65535)==65535?0:f;pK(a,s[a+380>>1],0,0,t,65535);_A(a,s[a+380>>1],0,t,m);v=q[e+56>>2];A=q[e+60>>2];jx(v,A,h+32|0);f=q[e+64>>2]-q[e+56>>2]>>4;if(f>>>0>q[e+80>>2]-q[e+72>>2]>>6>>>0){if(o[e+84|0]&1){break d}Wi(f,64,N,M,B);if(o[e+100|0]&1){break d}Wi(f,4,L,K,E);if(o[e+188|0]&1){break d}Wi(f,80,e+176|0,e+184|0,e+180|0);H=q[e+176>>2];if(f>>>0>(q[e+184>>2]-H|0)/80>>>0){break b}q[e+180>>2]=H+w(f,80);if(o[e+116|0]&1){break d}Wi(f,24,t,D,F);if(o[e+132|0]&1){break d}Wi(f,4,I,k,g);if(o[e+148|0]&1){break d}Wi(f,2,n,j,d)}f=A-v|0;k:{if(!f){break k}d=v-A|0;d=((d|0)>(f|0)?d:f)>>>4|0;f=(f|0)>-1?f:-1;f=w(d,(f|0)<1?f:1);H=f>>>0>1?f:1;j=0;f=0;while(1){d=q[m>>2];if(q[i>>2]-d>>4>>>0<=f>>>0){break a}n=d+(f<<4)|0;D=s[n+8>>1];e=q[a+32>>2];if(D>>>0>=(q[a+36>>2]-e|0)/592>>>0){break a}q[h+24>>2]=1065353216;e=e+w(D,592)|0;z=e;d=q[e+412>>2];l:{if(!(d&262144)|(d>>>4&15)-5>>>0<2|q[e+436>>2]!=2){break l}Q=q[e+452>>2];if(!Q){break l}d=q[e+440>>2];v=d&8191;A=(d>>>13&8191)-v|0;l=x(u[e+472>>2]*x(A|0));m:{if(x(y(l))>2];n:{P=u[d>>2];C=u[d+8>>2];if(P==C){break n}R=u[d+20>>2];if(l==R){break n}u[e+64>>2]=x(u[d+4>>2]-R)*x(s[e+446>>1]);u[e+68>>2]=x(C-P)*x(s[e+444>>1]);break l}C=u[d+4>>2];u[e+64>>2]=x(u[d+16>>2]-P)*x(s[e+444>>1]);u[e+68>>2]=x(l-C)*x(s[e+446>>1])}Mea(a,e,h+32|0,h+24|0);o:{p:{if((q[z+412>>2]&270532608)==2097152){e=s[e+586>>1];if((e|0)!=65535|u[h+24>>2]!=x(0)){break p}}q[n+8>>2]=0;q[n>>2]=-1;q[n+4>>2]=-1;j=j+1|0;break o}d=q[B>>2];if((d|0)==q[M>>2]){break c}q[B>>2]=d- -64;u[d>>2]=u[h+32>>2];u[d+4>>2]=u[h+36>>2];u[d+8>>2]=u[h+40>>2];u[d+12>>2]=u[h+44>>2];u[d+16>>2]=u[h+48>>2];u[d+20>>2]=u[h+52>>2];u[d+24>>2]=u[h+56>>2];u[d+28>>2]=u[h+60>>2];u[d+32>>2]=u[h+64>>2];u[d+36>>2]=u[h+68>>2];u[d+40>>2]=u[h+72>>2];u[d+44>>2]=u[h+76>>2];u[d+48>>2]=u[h+80>>2];u[d+52>>2]=u[h+84>>2];u[d+56>>2]=u[h+88>>2];u[d+60>>2]=u[h+92>>2];d=q[E>>2];if((d|0)==q[K>>2]){break c}l=u[h+24>>2];q[E>>2]=d+4;u[d>>2]=l;if((e|0)!=65535){v=q[t>>2];A=(q[F>>2]-v|0)/24|0;if(A>>>0<=e>>>0){break a}d=v+w(e,24)|0;if((D|0)==s[d+20>>1]){if(q[d+8>>2]==q[n>>2]&q[d+12>>2]==q[n+4>>2]){d=s[d+16>>1];e=0;q:{if((d|0)==65535){break q}if(d>>>0>=A>>>0){break a}e=(v+w(d,24)|0)+4|0}d=q[g>>2];if((d|0)==q[k>>2]){break c}q[g>>2]=d+4;q[d>>2]=e;break o}e=q[g>>2];if((e|0)==q[k>>2]){break c}q[g>>2]=e+4;q[e>>2]=d;break o}e=q[g>>2];if((e|0)==q[k>>2]){break c}q[g>>2]=e+4;q[e>>2]=d+4;break o}d=q[g>>2];if((d|0)==q[k>>2]){break c}q[g>>2]=d+4;q[d>>2]=0}f=f+1|0;if((H|0)!=(f|0)){continue}break}if(!j){break k}kx(q[m>>2],q[i>>2],h+24|0);f=q[m>>2];d=(q[i>>2]-f>>4)-j|0;if(d>>>0>q[O>>2]-f>>4>>>0){break b}q[i>>2]=f+(d<<4)}o[a+390|0]=r[a+390|0]&254;d=a;a=q[m>>2];Mi[q[b>>2]](d,a,q[N>>2],q[L>>2],q[I>>2],q[i>>2]-a>>4,c);Ii=h+96|0;return}J(202045,201514,493,201251);G()}J(201636,201514,533,201660);G()}J(202185,201514,506,202204);G()}J(201665,201514,479,201676);G()}function X_(a,b,c,d){var e=x(0),f=0,g=x(0),h=0,i=0,j=0,k=x(0),l=x(0),m=0,n=0,p=x(0),r=0,t=0,v=x(0),y=x(0),z=0,A=x(0),B=0,C=0,D=0,E=0,F=0,G=x(0),H=x(0),I=0,J=0,K=0,L=0,M=x(0),N=x(0),O=0,P=0,Q=0,R=0,S=x(0),T=0,U=0,V=0,W=0,X=x(0),Y=x(0),Z=x(0),_=x(0),$=x(0),aa=x(0),ba=x(0),ca=x(0),da=x(0),ea=x(0),fa=x(0),ga=x(0),ha=x(0),ia=0,ja=0,ka=0,la=0,ma=x(0);m=Ii;ia=m;F=b>>1;i=F<<2;U=q[c+104>>2];h=q[c+92>>2];a:{if(h){m=U-(i+7&-8)|0;if((m|0)>2]){break a}q[c+104>>2]=m;z=h+m|0;break a}z=m-(i+15&-16)|0;Ii=z}h=F<<2;I=h+a|0;j=(h+z|0)-8|0;m=q[((d<<2)+c|0)+1080>>2];b:{if(!F){f=m;break b}i=a;f=m;while(1){u[j+4>>2]=x(u[i>>2]*u[f>>2])-x(u[i+8>>2]*u[f+4>>2]);u[j>>2]=x(u[i>>2]*u[f+4>>2])+x(u[i+8>>2]*u[f>>2]);f=f+8|0;j=j-8|0;i=i+16|0;if((I|0)!=(i|0)){continue}break}}if(j>>>0>=z>>>0){i=((F<<2)+a|0)-12|0;while(1){u[j+4>>2]=x(u[i>>2]*u[f+4>>2])-x(u[i+8>>2]*u[f>>2]);u[j>>2]=x(u[f>>2]*x(-u[i>>2]))-x(u[i+8>>2]*u[f+4>>2]);i=i-16|0;f=f+8|0;j=j-8|0;if(z>>>0<=j>>>0){continue}break}}T=b>>2;if((b|0)>=16){h=T<<2;j=h+z|0;r=a+h|0;f=(m+(F<<2)|0)-32|0;h=a;i=z;while(1){k=u[i>>2];l=u[j>>2];g=u[j+4>>2];e=u[i+4>>2];u[r+4>>2]=g+e;u[r>>2]=u[j>>2]+u[i>>2];g=x(g-e);e=x(l-k);u[h+4>>2]=x(g*u[f+16>>2])-x(e*u[f+20>>2]);u[h>>2]=x(e*u[f+16>>2])+x(g*u[f+20>>2]);k=u[i+8>>2];l=u[j+8>>2];g=u[j+12>>2];e=u[i+12>>2];u[r+12>>2]=g+e;u[r+8>>2]=u[j+8>>2]+u[i+8>>2];g=x(g-e);e=x(l-k);u[h+12>>2]=x(g*u[f>>2])-x(e*u[f+4>>2]);u[h+8>>2]=x(e*u[f>>2])+x(g*u[f+4>>2]);i=i+16|0;j=j+16|0;h=h+16|0;r=r+16|0;f=f-32|0;if(m>>>0<=f>>>0){continue}break}}J=b>>3;h=0;c:{if((b|0)<0){break c}if((b|0)<=16383){h=o[b+211872|0];if((b|0)<=15){break c}h=o[(b>>>5|0)+211872|0]+5|0;if((b|0)<=511){break c}h=o[(b>>>10|0)+211872|0]+10|0;break c}if((b|0)<=16777215){h=o[(b>>>15|0)+211872|0]+15|0;if((b|0)<=524287){break c}h=o[(b>>>20|0)+211872|0]+20|0;break c}h=o[(b>>>25|0)+211872|0]+25|0;if((b|0)<=536870911){break c}h=o[(b>>>30|0)+211872|0]+30|0}j=b>>4;B=F-1|0;i=0-J|0;JF(j,a,B,i,m);JF(j,a,B-T|0,i,m);K=b>>5;i=0-j|0;Ss(K,a,B,i,m,16);Ss(K,a,B-J|0,i,m,16);Ss(K,a,B-(J<<1)|0,i,m,16);Ss(K,a,B+w(J,-3)|0,i,m,16);C=2;if((h|0)>=10){i=h-4>>1;C=(i|0)>3?i:3;j=2;while(1){i=j;j=i+1|0;t=2<=1){n=8<>i+2;r=0-(D>>1)|0;i=b>>i+4;while(1){Ss(i,a,B-w(f,D)|0,r,m,n);f=f+1|0;if((t|0)!=(f|0)){continue}break}}if((j|0)!=(C|0)){continue}break}}V=h-7|0;if((V|0)>(C|0)){while(1){h=C;C=h+1|0;O=b>>h+6;if((O|0)>=1){r=2<>h+2;ja=0-h|0;ka=i+1|0;la=0-(h>>1)|0;P=w(i,3);Q=P+1|0;L=i<<1;R=L|1;h=m;D=B;while(1){if((r|0)>=1){M=u[(Q<<2)+h>>2];N=u[(P<<2)+h>>2];G=u[(R<<2)+h>>2];H=u[(L<<2)+h>>2];A=u[(ka<<2)+h>>2];v=u[h+W>>2];y=u[h+4>>2];p=u[h>>2];f=(D<<2)+a|0;j=f+(la<<2)|0;i=r;while(1){t=j-4|0;l=u[t>>2];g=u[f>>2];e=u[j>>2];u[f>>2]=g+e;n=f-4|0;k=u[n>>2];u[n>>2]=k+u[t>>2];g=x(g-e);e=x(k-l);u[t>>2]=x(y*g)+x(p*e);u[j>>2]=x(p*g)-x(y*e);E=j-12|0;l=u[E>>2];n=f-8|0;g=u[n>>2];t=j-8|0;e=u[t>>2];u[n>>2]=g+e;n=f-12|0;k=u[n>>2];u[n>>2]=k+u[E>>2];g=x(g-e);e=x(k-l);u[E>>2]=x(A*g)+x(v*e);u[t>>2]=x(v*g)-x(A*e);E=j-20|0;l=u[E>>2];n=f-16|0;g=u[n>>2];t=j-16|0;e=u[t>>2];u[n>>2]=g+e;n=f-20|0;k=u[n>>2];u[n>>2]=k+u[E>>2];g=x(g-e);e=x(k-l);u[E>>2]=x(G*g)+x(H*e);u[t>>2]=x(H*g)-x(G*e);E=j-28|0;l=u[E>>2];n=f-24|0;g=u[n>>2];t=j-24|0;e=u[t>>2];u[n>>2]=g+e;n=f-28|0;k=u[n>>2];u[n>>2]=k+u[E>>2];g=x(g-e);e=x(k-l);u[E>>2]=x(M*g)+x(N*e);u[t>>2]=x(N*g)-x(M*e);n=ja<<2;j=n+j|0;f=f+n|0;n=(i|0)>1;i=i-1|0;if(n){continue}break}}D=D-8|0;h=(W<<2)+h|0;i=(O|0)>1;O=O-1|0;if(i){continue}break}}if((C|0)!=(V|0)){continue}break}}if((b|0)>=32){f=(B<<2)+a|0;P=f-(K<<6)|0;S=u[m+(J<<2)>>2];ma=x(-S);while(1){X=u[f>>2];Q=f-32|0;Y=u[Q>>2];k=x(X+Y);m=f-16|0;Z=u[m>>2];L=f-48|0;_=u[L>>2];l=x(Z+_);g=x(k+l);h=f-8|0;$=u[h>>2];R=f-40|0;aa=u[R>>2];ba=x($+aa);t=f-24|0;ca=u[t>>2];n=f-56|0;da=u[n>>2];ea=x(ca+da);e=x(ba+ea);u[f>>2]=g+e;u[h>>2]=g-e;G=x(k-l);B=f-12|0;fa=u[B>>2];C=f-44|0;H=u[C>>2];v=x(fa+H);D=f-28|0;ga=u[D>>2];r=f-60|0;A=u[r>>2];e=x(ga+A);y=x(v-e);u[m>>2]=G+y;j=f-4|0;M=u[j>>2];i=f-36|0;N=u[i>>2];p=x(M+N);m=f-20|0;k=u[m>>2];h=f-52|0;l=u[h>>2];g=x(k+l);ha=x(p+g);e=x(v+e);u[j>>2]=ha+e;u[t>>2]=G-y;u[B>>2]=ha-e;g=x(p-g);e=x(ba-ea);u[m>>2]=g-e;u[D>>2]=g+e;G=x(X-Y);v=x(k-l);y=x(G+v);p=x($-aa);k=x(fa-H);H=x(S*x(p+k));l=x(ga-A);g=x(ca-da);A=x(S*x(l-g));e=x(H+A);u[Q>>2]=y+e;u[R>>2]=y-e;v=x(G-v);y=x(S*x(k-p));e=x(x(g+l)*ma);p=x(y-e);u[L>>2]=v+p;k=x(M-N);l=x(Z-_);g=x(k-l);e=x(y+e);u[i>>2]=g+e;u[n>>2]=v-p;u[C>>2]=g-e;g=x(k+l);e=x(H-A);u[h>>2]=g-e;u[r>>2]=g+e;f=f+ -64|0;if(P>>>0>>0){continue}break}}C=F-4|0;f=((T<<2)+z|0)-16|0;if(z>>>0<=f>>>0){j=(C<<2)+z|0;i=q[((d<<2)+c|0)+1112>>2];while(1){h=(s[i>>1]<<2)+a|0;u[j+12>>2]=u[h>>2];u[j+8>>2]=u[h+4>>2];u[f+12>>2]=u[h+8>>2];u[f+8>>2]=u[h+12>>2];h=(s[i+2>>1]<<2)+a|0;u[j+4>>2]=u[h>>2];u[j>>2]=u[h+4>>2];u[f+4>>2]=u[h+8>>2];u[f>>2]=u[h+12>>2];i=i+4|0;j=j-16|0;f=f-16|0;if(z>>>0<=f>>>0){continue}break}}j=(F<<2)+z|0;h=j-16|0;if(z>>>0>>0){i=q[((d<<2)+c|0)+1096>>2];r=j;f=z;while(1){g=u[f+4>>2];D=r-4|0;e=u[D>>2];A=x(g-e);v=u[i+4>>2];y=x(g+e);p=u[f>>2];m=r-8|0;g=u[m>>2];k=x(p-g);e=u[i>>2];l=x(x(v*y)-x(k*e));u[f+4>>2]=A+l;g=x(p+g);e=x(x(k*v)+x(y*e));u[f>>2]=g+e;u[D>>2]=l-A;u[m>>2]=g-e;g=u[f+12>>2];m=r-12|0;e=u[m>>2];A=x(g-e);v=u[i+12>>2];y=x(g+e);p=u[f+8>>2];g=u[h>>2];k=x(p-g);e=u[i+8>>2];l=x(x(v*y)-x(k*e));u[f+12>>2]=A+l;g=x(p+g);e=x(x(k*v)+x(y*e));u[f+8>>2]=g+e;u[h>>2]=g-e;u[m>>2]=l-A;i=i+16|0;r=h;f=f+16|0;h=h-16|0;if(f>>>0>>0){continue}break}}h=j-32|0;if(z>>>0<=h>>>0){f=q[((d<<2)+c|0)+1088>>2]+(F<<2)|0;i=(C<<2)+a|0;r=((b<<2)+a|0)-16|0;while(1){p=u[j-8>>2];k=u[f-4>>2];l=u[j-4>>2];g=u[f-8>>2];e=x(x(p*k)-x(l*g));u[a>>2]=e;u[i+12>>2]=-e;e=x(x(g*x(-p))-x(k*l));u[I>>2]=e;u[r+12>>2]=e;p=u[j-16>>2];k=u[f-12>>2];l=u[j-12>>2];g=u[f-16>>2];e=x(x(p*k)-x(l*g));u[a+4>>2]=e;u[i+8>>2]=-e;e=x(x(g*x(-p))-x(k*l));u[I+4>>2]=e;u[r+8>>2]=e;p=u[j-24>>2];k=u[f-20>>2];l=u[j-20>>2];g=u[f-24>>2];e=x(x(p*k)-x(l*g));u[a+8>>2]=e;u[i+4>>2]=-e;e=x(x(g*x(-p))-x(k*l));u[I+8>>2]=e;u[r+4>>2]=e;p=u[h>>2];k=u[f-28>>2];l=u[j-28>>2];f=f-32|0;g=u[f>>2];e=x(x(p*k)-x(l*g));u[a+12>>2]=e;u[i>>2]=-e;e=x(x(g*x(-p))-x(k*l));u[I+12>>2]=e;u[r>>2]=e;r=r-16|0;i=i-16|0;I=I+16|0;a=a+16|0;j=h;h=h-32|0;if(z>>>0<=h>>>0){continue}break}}q[c+104>>2]=U;Ii=ia}function fI(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=x(0),m=x(0),n=x(0),p=x(0),v=x(0),y=0,z=x(0),A=x(0),B=0,C=x(0),D=0,E=x(0),H=x(0),I=0,K=0,L=0,M=0,N=x(0),O=x(0),P=x(0),Q=0,R=x(0),S=x(0),T=x(0),U=x(0),V=0,W=x(0),X=x(0),Y=x(0),Z=0,_=0,$=x(0),aa=x(0),ba=x(0),ca=0,da=0,ea=0,fa=x(0),ga=x(0),ha=x(0),ia=x(0),ja=0,ka=0,la=0,ma=x(0),na=x(0),oa=0,pa=0,qa=0,ra=0,sa=x(0),ta=0,ua=0,va=0,wa=x(0),xa=x(0),ya=x(0),za=0,Aa=x(0),Ba=0,Ca=x(0),Da=x(0),Ea=x(0),Fa=x(0),Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0;k=Ii-176|0;Ii=k;a:{b:{c:{d:{e:{f:{g:{if(q[e+200>>2]==208){if(!q[e+192>>2]){break g}q[k+8>>2]=0;if(!c){pa=1;break b}D=c&65535;j=q[a>>2];if(D>>>0>=q[a+4>>2]-j>>2>>>0){break a}I=q[j+(D<<2)>>2];if(s[I+80>>1]!=(c>>>16|0)){Pi(4,150692,151414,0);break b}_=q[I>>2];c=q[I+4>>2]-_|0;if(!c){break b}y=(c|0)/304|0;if(!q[_+280>>2]){c=1;j=y>>>0>1?y:1;while(1){D=c;if((c|0)!=(j|0)){c=D+1|0;if(!q[(w(D,304)+_|0)+280>>2]){continue}}break}if(y>>>0<=D>>>0){break b}}ja=q[e+192>>2];if(d>>>0>=y>>>0){break a}j=q[q[I+64>>2]+16>>2];if(t[j+4>>2]<=d>>>0){break f}c=0;if(!g|!h){break c}D=q[i>>2];y=(D>>>0)/(ja>>>0)|0;j=q[j>>2];q[k+168>>2]=0;ka=q[e+192>>2];K=w(d,304)+_|0;q[K+260>>2]=0;D=y+((D|0)!=(w(y,ja)|0))|0;q[K+256>>2]=D;la=1;ca=q[K+32>>2];ea=q[K+36>>2]-ca|0;V=ea>>>0>1;da=q[K+20>>2];L=(da|0)!=0;qa=q[K+8>>2];B=(qa|0)!=0;M=j+w(d,160)|0;y=q[M+108>>2]==1;Q=q[e+196>>2];h:{if(!Q){la=0;break h}while(1){j=w(c,24)+e|0;if(q[j+12>>2]==2?q[j+8>>2]==2:0){break h}c=c+1|0;la=Q>>>0>c>>>0;if((c|0)!=(Q|0)){continue}break}}ra=L&V;c=y&B;i:{if(q[M+12>>2]!=1){Y=x(1);P=x(1);sa=x(0);break i}P=u[I+60>>2];R=u[I+56>>2];S=u[I+52>>2];T=u[I+48>>2];Y=u[I+44>>2];xa=u[I+36>>2];ya=u[I+32>>2];sa=u[I+40>>2]}I=c&ra;Q=w(d,304)+_|0;L=q[Q+60>>2];c=q[Q+56>>2];V=L-c|0;ta=(h>>>0)/(ka>>>0)|0;h=q[Q+24>>2];j=q[Q+28>>2];j:{if(h>>>0>j>>>0){U=x(x(j>>>0)/x(h>>>0));l=x(1);break j}U=x(1);l=x(1);if(!j){break j}l=x(x(h>>>0)/x(j>>>0))}ma=x(1);na=x(1);if(!I){ma=x(U*x(.5));na=h>>>0>j>>>0?x(.5):j?x(l*x(.5)):x(.5)}B=(V|0)!=0;h=D+6|0;if(!V|ta>>>0>>0){break d}n=u[M+132>>2];p=u[M+128>>2];m=u[M+136>>2];M=q[K+4>>2];B=q[K+48>>2];y=q[K+44>>2];ua=q[K+16>>2];za=q[K+12>>2];j=q[K+40>>2];ka=Q;V=(V|0)/160|0;if((c|0)!=(L|0)){va=M?ca:0;fa=x(j>>>0);oa=(ea<<1)-2|0;j=da-5>>>0<2?oa?oa:1:ea;fa=x(fa/x(j>>>0));Aa=x(b*x(.5));Ba=M?M:259280;wa=x(F(x(x(x(p*p)+x(n*n))+x(m*m))));L=wa>x(0);Ca=L?x(n*U):x(0);Da=L?x(p*l):x(0);Ea=L?m:x(0);L=M?j:1;Fa=x(L>>>0);M=da>>>0>6;Ga=da-2|0;j=(y|0)!=0;j=w(B?j|2:j,24)+151808|0;Ha=q[j+20>>2]<<3;Ia=q[j+16>>2]<<3;Ja=q[j+12>>2]<<3;Ka=q[j+8>>2]<<3;La=q[j+4>>2]<<3;Ma=q[j>>2]<<3;while(1){k:{if(ra){y=w(Z,160)+c|0;l=x(x(u[y+68>>2]-u[y+64>>2])-Aa);b=fa;l:{if(M){break l}b=fa;if(!(1<>2]}b=x(x(l*b)*Fa);m:{if(b=x(0)){j=~~b>>>0;break m}j=0}j=(j>>>0)%(L>>>0)|0;B=j>>>0>>0?j:oa-j|0;n:{switch(Ga|0){case 0:case 2:B=L+(B^-1)|0;break;default:break n}}m=u[y+128>>2];E=u[y+136>>2];H=u[y+132>>2];if(I){j=(B+va<<3)+qa|0;ma=x(u[j+4>>2]*x(.5));na=x(u[j>>2]*x(.5));break k}b=u[y+80>>2];E=x(E*b);H=x(H*b);m=x(m*b);break k}j=w(Z,160)+c|0;b=u[j+80>>2];m=x(u[j+128>>2]*b);E=x(u[j+136>>2]*b);H=x(u[j+132>>2]*b);B=0}c=w(Z,160)+c|0;C=x(Y*u[c>>2]);v=x(Y*u[c+4>>2]);b=x(Y*u[c+8>>2]);n=x(x(x(R*C)+x(P*v))-x(T*b));p=x(x(R*b)+x(x(T*C)+x(S*v)));l=x(x(x(T*v)+x(P*b))-x(S*C));b=x(x(x(P*C)+x(S*b))-x(R*v));U=x(sa+x(x(T*n)+x(x(x(R*p)+x(P*l))-x(S*b))));$=x(xa+x(x(R*b)+x(x(x(P*n)+x(S*p))-x(T*l))));aa=x(ya+x(x(S*l)+x(x(x(T*p)+x(P*b))-x(R*n))));C=u[c+44>>2];v=u[c+32>>2];n=u[c+36>>2];p=u[c+40>>2];l=x(x(x(x(P*C)-x(T*v))-x(S*n))-x(R*p));b=x(x(x(T*n)+x(x(P*p)+x(R*C)))-x(S*v));z=x(x(x(R*v)+x(x(P*n)+x(S*C)))-x(T*p));A=x(x(x(S*p)+x(x(P*v)+x(T*C)))-x(R*n));C=x(Y*E);W=x(Y*H);X=x(Y*m);o:{if(wa>x(0)^1){m=l;break o}E=x(Da*X);H=x(Ca*W);m=x(Ea*C);v=x(x(x(E*b)+x(H*l))-x(m*A));n=x(x(m*b)+x(x(E*A)+x(H*z)));p=x(x(x(H*A)+x(m*l))-x(E*z));m=x(x(x(E*l)+x(m*z))-x(H*b));U=x(U+x(x(A*v)+x(x(x(b*n)+x(l*p))-x(z*m))));$=x($+x(x(b*m)+x(x(x(l*v)+x(z*n))-x(A*p))));aa=x(aa+x(x(z*p)+x(x(x(A*n)+x(l*m))-x(b*v))));v=x(A*x(0));n=x(z*x(0));p=x(b*x(0));m=x(x(x(l-v)-n)-p);l=x(l*x(0));b=x(x(v+x(b+l))-n);z=x(x(p+x(z+l))-v);A=x(x(n+x(A+l))-p)}N=x(X*na);O=x(W*x(0));l=x(C*x(0));v=x(l*A);ba=x(x(x(N*b)+x(O*m))-v);n=x(l*b);E=x(n+x(x(N*A)+x(O*z)));p=x(l*m);H=x(x(x(O*A)+p)-x(N*z));l=x(l*z);C=x(x(l+x(N*m))-x(O*b));ga=x(x(A*ba)+x(x(x(b*E)+x(m*H))-x(z*C)));N=x(X*x(0));O=x(W*ma);v=x(x(x(N*b)+x(O*m))-v);n=x(n+x(x(N*A)+x(O*z)));p=x(x(x(O*A)+p)-x(N*z));l=x(x(l+x(N*m))-x(O*b));ha=x(x(A*v)+x(x(x(b*n)+x(m*p))-x(z*l)));N=x(x(-ga)-ha);u[k+152>>2]=U+N;ia=x(x(b*C)+x(x(x(z*E)+x(m*ba))-x(A*H)));W=x(x(b*l)+x(x(x(z*n)+x(m*v))-x(A*p)));O=x(x(-ia)-W);u[k+148>>2]=$+O;X=x(x(z*H)+x(x(x(A*E)+x(m*C))-x(b*ba)));b=x(x(z*p)+x(x(x(A*n)+x(m*l))-x(b*v)));ba=x(x(-X)-b);u[k+144>>2]=aa+ba;E=x(ha-ga);u[k+136>>2]=U+E;H=x(W-ia);u[k+132>>2]=$+H;C=x(b-X);u[k+128>>2]=aa+C;v=x(ga-ha);u[k+120>>2]=U+v;n=x(ia-W);u[k+116>>2]=$+n;p=x(X-b);u[k+112>>2]=aa+p;m=x(ga+ha);u[k+104>>2]=U+m;l=x(ia+W);u[k+100>>2]=$+l;b=x(X+b);u[k+96>>2]=aa+b;if(la){u[k+88>>2]=N;u[k+84>>2]=O;u[k+80>>2]=ba;u[k+72>>2]=E;u[k+68>>2]=H;u[k+64>>2]=C;u[k+56>>2]=v;u[k+52>>2]=n;u[k+48>>2]=p;u[k+40>>2]=m;u[k+36>>2]=l;u[k+32>>2]=b}v=u[c+116>>2];n=u[c+120>>2];p=u[c+124>>2];m=u[f+4>>2];l=u[f+8>>2];b=u[f+12>>2];u[k+16>>2]=u[c+112>>2]*u[f>>2];u[k+28>>2]=p*b;u[k+24>>2]=n*l;u[k+20>>2]=v*m;y=e;j=y;c=j;ca=B+va|0;B=Ba+(ca<<5)|0;b=ua?x(t[(q[ua+(ca<<2)>>2]<<2)+za>>2]):x(0);sr(c,sr(c,sr(c,sr(c,sr(c,sr(c,w(q[c+192>>2],D)+g|0,k+144|0,k+80|0,k+16|0,B+Ma|0,b),k+128|0,k- -64|0,k+16|0,B+La|0,b),k+96|0,k+32|0,k+16|0,B+Ka|0,b),k+96|0,k+32|0,k+16|0,B+Ja|0,b),k+112|0,k+48|0,k+16|0,B+Ia|0,b),k+144|0,k+80|0,k+16|0,B+Ha|0,b);Z=Z+1|0;B=V>>>0>Z>>>0;c=h+6|0;if(V>>>0<=Z>>>0|c>>>0>ta>>>0){break e}D=h;h=c;c=q[Q+56>>2];if((q[ka+60>>2]-c|0)/160>>>0>Z>>>0){continue}break}}break a}J(150847,150916,647,150936);G()}J(150955,150916,648,150936);G()}J(151361,151373,270,151403);G()}D=h}p:{if(!B){break p}d=w(d,304)+_|0;c=r[d+296|0];if(c&1){break p}o[d+296|0]=c|1;pa=2}c=D-q[K+256>>2]|0;q[K+260>>2]=c;c=w(c,q[e+192>>2]);q[i>>2]=c+q[i>>2]}q[a+56>>2]=((c>>>0)/(ja>>>0)>>>0)/6}Ii=k+176|0;return pa}J(151947,151192,479,151403);G()}function fD(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0;a:{if(q[a+18368>>2]>15){break a}while(1){i=0;b:{if(q[a+18376>>2]){break b}h=q[a>>2];j=q[h+172>>2];c:{if(j>>>0>2]){q[h+172>>2]=j+1;i=r[j|0];break c}if(!q[h+32>>2]){break b}j=h+40|0;i=Mi[q[h+16>>2]](q[h+28>>2],j,q[h+36>>2])|0;q[h+168>>2]=q[h+168>>2]+(q[h+172>>2]-q[h+180>>2]|0);d:{if(!i){o[h+40|0]=0;q[h+32>>2]=0;j=h+41|0;i=0;break d}j=i+j|0;i=r[h+40|0]}q[h+176>>2]=j;q[h+172>>2]=h+41}if((i|0)!=255){break b}i=q[a>>2];h=q[i+172>>2];e:{if(h>>>0>2]){q[i+172>>2]=h+1;h=r[h|0];break e}if(!q[i+32>>2]){h=0;break e}j=i+40|0;h=Mi[q[i+16>>2]](q[i+28>>2],j,q[i+36>>2])|0;q[i+168>>2]=q[i+168>>2]+(q[i+172>>2]-q[i+180>>2]|0);f:{if(!h){o[i+40|0]=0;q[i+32>>2]=0;j=i+41|0;h=0;break f}j=h+j|0;h=r[i+40|0]}q[i+176>>2]=j;q[i+172>>2]=i+41}while(1){i=255;if((h|0)!=255){if(!h){break b}q[a+18376>>2]=1;o[a+18372|0]=h;break a}i=q[a>>2];h=q[i+172>>2];if(h>>>0>2]){q[i+172>>2]=h+1;h=r[h|0];continue}h=0;if(!q[i+32>>2]){continue}j=i+40|0;h=Mi[q[i+16>>2]](q[i+28>>2],j,q[i+36>>2])|0;q[i+168>>2]=q[i+168>>2]+(q[i+172>>2]-q[i+180>>2]|0);g:{if(!h){o[i+40|0]=0;q[i+32>>2]=0;j=i+41|0;h=0;break g}j=h+j|0;h=r[i+40|0]}q[i+176>>2]=j;q[i+172>>2]=i+41;continue}}h=q[a+18368>>2];q[a+18368>>2]=h+8;q[a+18364>>2]=q[a+18364>>2]|i<<24-h;if((h|0)<17){continue}break}}h:{k=ds(a,c);if((k|0)<=-1){break h}l=Ui(b,0,128);i:{if(!k){break i}j:{if((k|0)<=q[a+18368>>2]){break j}while(1){i=0;k:{if(q[a+18376>>2]){break k}b=q[a>>2];c=q[b+172>>2];l:{if(c>>>0>2]){q[b+172>>2]=c+1;i=r[c|0];break l}if(!q[b+32>>2]){break k}j=b+40|0;h=Mi[q[b+16>>2]](q[b+28>>2],j,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;m:{if(!h){o[b+40|0]=0;q[b+32>>2]=0;h=b+41|0;break m}i=r[b+40|0];h=h+j|0}q[c+176>>2]=h;q[b+172>>2]=b+41}if((i|0)!=255){break k}b=q[a>>2];c=q[b+172>>2];n:{if(c>>>0>2]){q[b+172>>2]=c+1;h=r[c|0];break n}if(!q[b+32>>2]){h=0;break n}h=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);o:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break o}j=c+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41}while(1){i=255;if((h|0)!=255){if(!h){break k}q[a+18376>>2]=1;o[a+18372|0]=h;break j}b=q[a>>2];c=q[b+172>>2];if(c>>>0>2]){q[b+172>>2]=c+1;h=r[c|0];continue}h=0;if(!q[b+32>>2]){continue}h=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);p:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break p}j=c+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41;continue}}b=q[a+18368>>2];q[a+18368>>2]=b+8;q[a+18364>>2]=q[a+18364>>2]|i<<24-b;if((b|0)<17){continue}break}}if(k>>>0>16){break i}b=q[a+18364>>2];q[a+18368>>2]=q[a+18368>>2]-k;c=Fza(b,k);h=k<<2;i=q[h+169552>>2];q[a+18364>>2]=c&(i^-1);m=(q[h+169728>>2]&(b>>31^-1))+(c&i)|0}c=(w(f,72)+a|0)+18100|0;b=q[c>>2]+m|0;q[c>>2]=b;p[l>>1]=w(b,s[g>>1]);c=1;while(1){q:{if(q[a+18368>>2]>15){break q}while(1){i=0;r:{if(q[a+18376>>2]){break r}b=q[a>>2];f=q[b+172>>2];s:{if(f>>>0>2]){q[b+172>>2]=f+1;i=r[f|0];break s}if(!q[b+32>>2]){break r}j=b+40|0;h=Mi[q[b+16>>2]](q[b+28>>2],j,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);f=b;t:{if(!h){o[b+40|0]=0;q[b+32>>2]=0;h=b+41|0;break t}i=r[b+40|0];h=h+j|0}q[f+176>>2]=h;q[b+172>>2]=b+41}if((i|0)!=255){break r}b=q[a>>2];f=q[b+172>>2];u:{if(f>>>0>2]){q[b+172>>2]=f+1;h=r[f|0];break u}if(!q[b+32>>2]){h=0;break u}h=b+40|0;f=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);v:{if(!f){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break v}j=f+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41}while(1){i=255;if((h|0)!=255){if(!h){break r}q[a+18376>>2]=1;o[a+18372|0]=h;break q}b=q[a>>2];f=q[b+172>>2];if(f>>>0>2]){q[b+172>>2]=f+1;h=r[f|0];continue}h=0;if(!q[b+32>>2]){continue}h=b+40|0;f=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);w:{if(!f){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break w}j=f+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41;continue}}b=q[a+18368>>2];q[a+18368>>2]=b+8;q[a+18364>>2]=q[a+18364>>2]|i<<24-b;if((b|0)<17){continue}break}}f=q[a+18364>>2];b=s[(f>>>22&1022)+e>>1];x:{y:{if(b){h=f;f=b&15;q[a+18364>>2]=h<>2]=q[a+18368>>2]-f;c=(b>>>4&15)+c|0;f=r[c+169296|0]<<1;p[f+l>>1]=w(s[f+g>>1],b<<16>>16>>>8|0);c=c+1|0;break y}b=ds(a,d);if((b|0)<=-1){break h}f=b&15;if(!f){if((b|0)!=240){break x}c=c+16|0;break y}k=(b>>>4|0)+c|0;m=r[k+169296|0];j=q[a+18368>>2];z:{if((f|0)<=(j|0)){break z}while(1){i=0;A:{if(q[a+18376>>2]){break A}b=q[a>>2];c=q[b+172>>2];B:{if(c>>>0>2]){q[b+172>>2]=c+1;i=r[c|0];break B}if(!q[b+32>>2]){break A}j=b+40|0;h=Mi[q[b+16>>2]](q[b+28>>2],j,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;C:{if(!h){o[b+40|0]=0;q[b+32>>2]=0;h=b+41|0;break C}i=r[b+40|0];h=h+j|0}q[c+176>>2]=h;q[b+172>>2]=b+41}if((i|0)!=255){break A}b=q[a>>2];c=q[b+172>>2];D:{if(c>>>0>2]){q[b+172>>2]=c+1;h=r[c|0];break D}if(!q[b+32>>2]){h=0;break D}h=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);E:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break E}j=c+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41}while(1){i=255;if((h|0)!=255){if(!h){break A}q[a+18376>>2]=1;o[a+18372|0]=h;j=q[a+18368>>2];break z}b=q[a>>2];c=q[b+172>>2];if(c>>>0>2]){q[b+172>>2]=c+1;h=r[c|0];continue}h=0;if(!q[b+32>>2]){continue}h=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],h,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);F:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;j=b+41|0;h=0;break F}j=c+h|0;h=r[b+40|0]}q[b+176>>2]=j;q[b+172>>2]=b+41;continue}}b=q[a+18368>>2];j=b+8|0;q[a+18368>>2]=j;q[a+18364>>2]=q[a+18364>>2]|i<<24-b;if((b|0)<17){continue}break}}q[a+18368>>2]=j-f;c=q[a+18364>>2];b=Fza(c,f);f=f<<2;h=q[f+169552>>2];q[a+18364>>2]=b&(h^-1);i=m<<1;p[i+l>>1]=w(s[g+i>>1],(q[f+169728>>2]&(c>>31^-1))+(b&h)|0);c=k+1|0}if((c|0)<64){continue}}break}return 1}q[213145]=169269;return 0}function Rw(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-16|0;Ii=e;g=1;a:{b:{switch(b-a>>4){case 2:b=b-16|0;c=b;d=q[c>>2];c=q[c+4>>2];f=q[a+4>>2];if((c|0)==(f|0)&t[a>>2]<=d>>>0|c>>>0>f>>>0){break a}c=q[a+12>>2];q[e+8>>2]=q[a+8>>2];q[e+12>>2]=c;c=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[e+12>>2];q[b+8>>2]=q[e+8>>2];q[b+12>>2]=a;a=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=a;break a;case 3:c=a+16|0;b=b-16|0;h=q[b>>2];d=q[b+4>>2];f=q[a+20>>2];j=q[a+4>>2];i=q[a+16>>2];if((f|0)==(j|0)&i>>>0>=t[a>>2]|f>>>0>j>>>0){if((d|0)==(f|0)&h>>>0>=i>>>0|d>>>0>f>>>0){break a}d=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=d;d=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=d;d=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=d;d=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;d=q[e+12>>2];q[b+8>>2]=q[e+8>>2];q[b+12>>2]=d;d=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=d;b=q[a+20>>2];d=q[a+4>>2];if((b|0)==(d|0)&t[a+16>>2]>=t[a>>2]|b>>>0>d>>>0){break a}b=q[a+12>>2];q[e+8>>2]=q[a+8>>2];q[e+12>>2]=b;b=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;a=q[e+12>>2];q[c+8>>2]=q[e+8>>2];q[c+12>>2]=a;a=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=a;break a}if((d|0)==(f|0)&h>>>0>>0|d>>>0>>0){c=q[a+12>>2];q[e+8>>2]=q[a+8>>2];q[e+12>>2]=c;c=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[e+12>>2];q[b+8>>2]=q[e+8>>2];q[b+12>>2]=a;a=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=a;break a}d=q[a+12>>2];q[e+8>>2]=q[a+8>>2];q[e+12>>2]=d;d=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=d;d=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=d;d=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=d;d=q[e+12>>2];q[c+8>>2]=q[e+8>>2];q[c+12>>2]=d;d=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=d;d=q[b+4>>2];f=q[a+20>>2];if((d|0)==(f|0)&t[b>>2]>=t[a+16>>2]|d>>>0>f>>>0){break a}a=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=a;a=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=a;a=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=a;a=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=a;a=q[e+12>>2];q[b+8>>2]=q[e+8>>2];q[b+12>>2]=a;a=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=a;break a;case 4:bp(a,a+16|0,a+32|0,b-16|0);break a;case 5:d=a+16|0;c=a+32|0;f=a+48|0;bp(a,d,c,f);b=b-16|0;i=q[b>>2];h=q[b+4>>2];k=q[a+52>>2];if((h|0)==(k|0)&t[a+48>>2]<=i>>>0|h>>>0>k>>>0){break a}h=q[f+12>>2];q[e+8>>2]=q[f+8>>2];q[e+12>>2]=h;h=q[f+4>>2];q[e>>2]=q[f>>2];q[e+4>>2]=h;h=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=h;h=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=h;h=q[e+12>>2];q[b+8>>2]=q[e+8>>2];q[b+12>>2]=h;h=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=h;b=q[f+4>>2];h=q[c+4>>2];if((b|0)==(h|0)&t[f>>2]>=t[c>>2]|b>>>0>h>>>0){break a}b=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=b;b=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=b;b=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=b;b=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=b;b=q[e+12>>2];q[f+8>>2]=q[e+8>>2];q[f+12>>2]=b;b=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=b;b=q[c+4>>2];f=q[d+4>>2];if((b|0)==(f|0)&t[c>>2]>=t[d>>2]|b>>>0>f>>>0){break a}b=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=b;b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b;b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[e+12>>2];q[c+8>>2]=q[e+8>>2];q[c+12>>2]=b;b=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=b;b=q[a+20>>2];c=q[a+4>>2];if((b|0)==(c|0)&t[a+16>>2]>=t[a>>2]|b>>>0>c>>>0){break a}b=q[a+12>>2];q[e+8>>2]=q[a+8>>2];q[e+12>>2]=b;b=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;a=q[e+12>>2];q[d+8>>2]=q[e+8>>2];q[d+12>>2]=a;a=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=a;break a;case 0:case 1:break a;default:break b}}g=a+16|0;f=a+32|0;i=q[a+32>>2];d=q[a+36>>2];h=q[a+20>>2];k=q[a+4>>2];j=q[a+16>>2];l=q[a>>2];c:{if((h|0)==(k|0)&j>>>0>=l>>>0|h>>>0>k>>>0){if((d|0)==(h|0)&i>>>0>=j>>>0|d>>>0>h>>>0){break c}h=q[g+12>>2];c=e+8|0;q[c>>2]=q[g+8>>2];q[c+4>>2]=h;d=q[g+4>>2];q[e>>2]=q[g>>2];q[e+4>>2]=d;d=f+8|0;h=q[d+4>>2];q[g+8>>2]=q[d>>2];q[g+12>>2]=h;d=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=d;d=q[c+4>>2];q[f+8>>2]=q[c>>2];q[f+12>>2]=d;d=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=d;d=q[g+4>>2];if((k|0)==(d|0)&l>>>0<=t[g>>2]|d>>>0>k>>>0){break c}d=q[a+12>>2];q[c>>2]=q[a+8>>2];q[c+4>>2]=d;d=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=d;d=q[g+12>>2];q[a+8>>2]=q[g+8>>2];q[a+12>>2]=d;d=q[g+4>>2];q[a>>2]=q[g>>2];q[a+4>>2]=d;d=q[c+4>>2];q[g+8>>2]=q[c>>2];q[g+12>>2]=d;d=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=d;break c}if((d|0)==(h|0)&i>>>0>>0|d>>>0>>0){c=a+8|0;d=q[c+4>>2];q[e+8>>2]=q[c>>2];q[e+12>>2]=d;g=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=g;g=f+8|0;d=q[g+4>>2];q[c>>2]=q[g>>2];q[c+4>>2]=d;g=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=g;g=q[e+12>>2];q[f+8>>2]=q[e+8>>2];q[f+12>>2]=g;g=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=g;break c}k=q[a+12>>2];c=e+8|0;q[c>>2]=q[a+8>>2];q[c+4>>2]=k;h=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=h;h=q[g+12>>2];q[a+8>>2]=q[g+8>>2];q[a+12>>2]=h;h=q[g+4>>2];q[a>>2]=q[g>>2];q[a+4>>2]=h;h=q[c+4>>2];q[g+8>>2]=q[c>>2];q[g+12>>2]=h;h=q[e+4>>2];q[g>>2]=q[e>>2];q[g+4>>2]=h;h=q[a+20>>2];if((h|0)==(d|0)&t[a+16>>2]<=i>>>0|d>>>0>h>>>0){break c}d=q[g+12>>2];q[c>>2]=q[g+8>>2];q[c+4>>2]=d;d=q[g+4>>2];q[e>>2]=q[g>>2];q[e+4>>2]=d;d=f+8|0;h=q[d+4>>2];q[g+8>>2]=q[d>>2];q[g+12>>2]=h;d=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=d;g=q[c+4>>2];q[f+8>>2]=q[c>>2];q[f+12>>2]=g;g=q[e+4>>2];q[f>>2]=q[e>>2];q[f+4>>2]=g}d:{e:{g=a+48|0;if((g|0)==(b|0)){break e}while(1){f:{d=g;h=q[d+4>>2];j=q[f+4>>2];i=q[d>>2];if((h|0)==(j|0)&i>>>0>2]|h>>>0>>0){k=q[d+8>>2];j=q[d+12>>2];c=d;while(1){g:{g=f;l=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=l;l=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=l;if((a|0)==(f|0)){g=a;break g}c=g;f=c-16|0;l=q[f+4>>2];if((l|0)==(h|0)&i>>>0>2]|h>>>0>>0){continue}}break}q[g+8>>2]=k;q[g+12>>2]=j;q[g>>2]=i;q[g+4>>2]=h;m=m+1|0;if((m|0)==8){break f}}f=d;g=d+16|0;if((g|0)!=(b|0)){continue}break e}break}c=(d+16|0)==(b|0);a=0;break d}a=1}g=a|c}Ii=e+16|0;return g&1}function Sra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=Ii-176|0;Ii=i;q[i+168>>2]=0;a:{f=q[q[a+12>>2]>>2];g=q[q[f>>2]+24>>2];if((g|0)==-2){break a}c=q[a+8>>2];b=0;b:{if(!c){break b}b=q[c+120>>2]}j=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[f+12>>2]);yk(b);rj(b,-1e4,g);rj(b,-1e4,q[f+12>>2]);f=a;c=q[a+4>>2];a=q[c+4>>2];g=q[c>>2];c=a;c:{if(a|g){lk(b,g,c);break c}a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16}vj(b,0,16);g=q[b+8>>2]-q[b+12>>2]>>4;a=q[f+4>>2];c=s[a+956>>1];if(c&1){d=+t[a+804>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;Si(b,g,12889);a=q[q[f+4>>2]+808>>2];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=a|0;q[b+8>>2]=q[b+8>>2]+16;Si(b,g,12897);a=s[q[f+4>>2]+956>>1]>>>1&1;c=q[b+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[b+8>>2]=q[b+8>>2]+16;Si(b,g,12904);a=q[f+4>>2];c=s[a+956>>1]}if(c&8){bj(b,a+544|0,q[a+800>>2]);Si(b,g,12920);a=q[f+4>>2];c=s[a+956>>1]}if(c&16){Ti(i+16|0,a+812|0,144);bj(b,12933,12);a=0;vj(b,32,0);while(1){c=q[b+8>>2];q[c+8>>2]=3;e=c;c=a+1|0;v[e>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;d=+u[(i+16|0)+(a<<2)>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);a=c;if((a|0)!=32){continue}break}pj(b,-3);bj(b,12946,15);a=0;vj(b,32,0);while(1){c=q[b+8>>2];q[c+8>>2]=3;e=c;c=a+1|0;v[e>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;h=i+16|0;e=0;d:{if(!h){break d}e=q[(h+(a>>>3&536870908)|0)+128>>2]>>>a&1}a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=e>>>0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);a=c;if((a|0)!=32){continue}break}pj(b,-3);bj(b,12962,12);vj(b,4,0);a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[b+8>>2]=q[b+8>>2]+16;a=i+16|0;if(a){o[i+8|0]=r[a+136|0]}d=a?+r[i+8|0]:0;a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[b+8>>2]=q[b+8>>2]+16;a=i+16|0;if(a){o[i+8|0]=r[a+137|0]}d=a?+r[i+8|0]:0;a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[b+8>>2]=q[b+8>>2]+16;a=i+16|0;if(a){o[i+8|0]=r[a+138|0]}d=a?+r[i+8|0]:0;a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[b+8>>2]=q[b+8>>2]+16;a=i+16|0;if(a){o[i+8|0]=r[a+139|0]}d=a?+r[i+8|0]:0;a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);pj(b,-3);a=q[f+4>>2]}if(q[a>>2]|q[a+4>>2]){bj(b,12975,5);d=+u[q[f+4>>2]+8>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,12981,7);a=s[q[f+4>>2]+956>>1]>>>6&1;c=q[b+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,12989,8);a=s[q[f+4>>2]+956>>1]>>>7&1;c=q[b+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,12998,8);a=o[q[f+4>>2]+957|0]&1;c=q[b+8>>2];q[c+8>>2]=1;q[c>>2]=a;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);a=q[f+4>>2]}c=s[a+956>>1];if(c&512){bj(b,13007,1);d=+u[q[f+4>>2]+12>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13009,1);d=+u[q[f+4>>2]+16>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13011,2);d=+u[q[f+4>>2]+20>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13014,2);d=+u[q[f+4>>2]+24>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13017,8);d=+u[q[f+4>>2]+28>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13026,8);d=+u[q[f+4>>2]+32>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13035,9);d=+u[q[f+4>>2]+36>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13045,9);d=+u[q[f+4>>2]+40>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);a=q[f+4>>2];c=s[a+956>>1]}if(c&1024){bj(b,13055,5);d=+u[q[f+4>>2]+44>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13061,5);d=+u[q[f+4>>2]+48>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);bj(b,13067,5);d=+u[q[f+4>>2]+52>>2];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,g);a=q[f+4>>2]}g=q[a+540>>2];if((g|0)>=1){bj(b,13073,5);vj(b,g,0);c=0;while(1){e=q[f+4>>2];a=q[b+8>>2];q[a+8>>2]=3;h=a;a=c+1|0;v[h>>3]=a|0;q[b+8>>2]=q[b+8>>2]+16;vj(b,0,6);bj(b,13079,2);c=e+w(c,44)|0;e=q[c+96>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13082,9);e=q[c+56>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,12981,7);e=!q[c+60>>2];h=q[b+8>>2];q[h+8>>2]=1;q[h>>2]=e;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,12989,8);e=q[c+60>>2]-3>>>0<2;h=q[b+8>>2];q[h+8>>2]=1;q[h>>2]=e;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13007,1);e=q[c- -64>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13009,1);e=q[c+68>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13017,8);d=+q[c+72>>2];e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13026,8);d=+q[c+76>>2];e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=d;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13011,2);e=q[c+80>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);bj(b,13014,2);e=q[c+84>>2];h=q[b+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;pj(b,-3);Xi(b,13035);d=+q[c+88>>2];e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=d;q[b+8>>2]=q[b+8>>2]+16;Ij(b,-3);Xi(b,13045);d=+q[c+92>>2];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[b+8>>2]=q[b+8>>2]+16;Ij(b,-3);pj(b,-3);c=a;if((a|0)!=(g|0)){continue}break}pj(b,-3);a=q[f+4>>2]}if(r[a+956|0]&32){a=q[a+800>>2];bj(b,13092,4);e:{if(!a){Xi(b,13097);break e}bj(b,q[f+4>>2]+544|0,a)}pj(b,-3)}a=q[b+8>>2]-q[b+12>>2]>>4;c=Ii-128|0;Ii=c;Ii=c+128|0;q[i+8>>2]=0;c=-1e3;f:{if(Pm(b,3,-1)){break f}c=0;a=((q[b+8>>2]-q[b+12>>2]>>4)-a|0)+3|0;if((a|0)<0){break f}c=q[56661];g:{h:{if(a){break h}if((Vi(b,-1)|0)!=1){break h}c=(Uj(b,-1)|0)!=0;break g}q[i>>2]=c;Pi(4,12654,13098,i);c=-1e3}Ri(b,-2-a|0)}a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16;yk(b);if(q[b+8>>2]-q[b+12>>2]>>4==(j|0)){break a}J(12728,12749,720,13170);G()}Ii=i+176|0;return c|0}function mx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0;h=Ii-16|0;Ii=h;a:{b:while(1){k=b-16|0;c:while(1){i=a;d:while(1){e:{f:{g:{h:{i:{j:{k:{a=b-i|0;f=a>>4;switch(f|0){case 0:case 1:break a;case 4:break j;case 2:break k;case 3:break g;case 5:break i;default:break h}}a=q[c>>2];c=q[a+12>>2];if(!c){break a}b=b-16|0;k=q[b>>2];f=q[a+8>>2];a=0;l:{while(1){if(!dj(k,q[f+(a<<2)>>2])){break l}a=a+1|0;if((c|0)!=(a|0)){continue}break}a=-1}k=q[i>>2];e=0;m:{while(1){if(!dj(k,q[f+(e<<2)>>2])){break m}e=e+1|0;if((c|0)!=(e|0)){continue}break}e=-1}if((a|0)>=(e|0)){break a}a=i+8|0;c=q[a+4>>2];q[h+8>>2]=q[a>>2];q[h+12>>2]=c;a=q[i+4>>2];q[h>>2]=q[i>>2];q[h+4>>2]=a;a=q[b+12>>2];q[i+8>>2]=q[b+8>>2];q[i+12>>2]=a;a=q[b+4>>2];q[i>>2]=q[b>>2];q[i+4>>2]=a;a=q[h+12>>2];q[b+8>>2]=q[h+8>>2];q[b+12>>2]=a;a=q[h+4>>2];q[b>>2]=q[h>>2];q[b+4>>2]=a;break a}zx(i,i+16|0,i+32|0,b-16|0,c);break a}vx(i,i+16|0,i+32|0,i+48|0,b-16|0,c);break a}if((a|0)<=495){CP(i,b,c);break a}l=((f|0)/2<<4)+i|0;n:{if((a|0)>=15985){a=(f|0)/4<<4;m=vx(i,a+i|0,l,a+l|0,k,c);break n}m=Jq(i,l,k,c)}j=q[c>>2];d=j;f=d+8|0;n=q[i>>2];o:{p:{a=q[d+12>>2];if(a){f=q[d+8>>2];e=0;q:{while(1){if(!dj(n,q[f+(e<<2)>>2])){break q}e=e+1|0;if((a|0)!=(e|0)){continue}break}e=-1}d=q[l>>2];g=0;r:{while(1){if(!dj(d,q[f+(g<<2)>>2])){break r}g=g+1|0;if((a|0)!=(g|0)){continue}break}g=-1}if((e|0)<(g|0)){d=k;break o}f=j+8|0;d=k;if(a){break p}}e=k;while(1){e=e-16|0;if((i|0)!=(e|0)){continue}break}break e}while(1){d=d-16|0;if((d|0)==(i|0)){break e}o=q[j+8>>2];g=q[d>>2];e=0;s:{while(1){if(!dj(g,q[o+(e<<2)>>2])){break s}e=e+1|0;if((a|0)!=(e|0)){continue}break}e=-1}p=q[l>>2];g=0;t:{while(1){if(!dj(p,q[o+(g<<2)>>2])){break t}g=g+1|0;if((a|0)!=(g|0)){continue}break}g=-1}if((e|0)>=(g|0)){continue}break}a=i+8|0;f=q[a+4>>2];q[h+8>>2]=q[a>>2];q[h+12>>2]=f;a=q[i+4>>2];q[h>>2]=q[i>>2];q[h+4>>2]=a;a=d+8|0;f=q[a+4>>2];q[i+8>>2]=q[a>>2];q[i+12>>2]=f;a=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=a;a=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=a;a=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=a;m=m+1|0}f=i+16|0;if(d>>>0<=f>>>0){break f}n=q[c>>2];a=q[n+12>>2];u:{if(!a){break u}o=!a;while(1){r=q[l>>2];p=q[n+8>>2];while(1){j=f;f=q[f>>2];e=0;v:{while(1){if(!dj(f,q[p+(e<<2)>>2])){break v}e=e+1|0;if((e|0)!=(a|0)){continue}break}e=-1}g=0;w:{while(1){if(!dj(r,q[p+(g<<2)>>2])){break w}g=g+1|0;if((g|0)!=(a|0)){continue}break}g=-1}f=j+16|0;if((e|0)<(g|0)){continue}break}if(o){break u}o=q[l>>2];f=q[n+8>>2];while(1){d=d-16|0;g=q[d>>2];e=0;x:{while(1){if(!dj(g,q[f+(e<<2)>>2])){break x}e=e+1|0;if((e|0)!=(a|0)){continue}break}e=-1}g=0;y:{while(1){if(!dj(o,q[f+(g<<2)>>2])){break y}g=g+1|0;if((g|0)!=(a|0)){continue}break}g=-1}if((e|0)>=(g|0)){continue}break}if(d>>>0>>0){f=j;break f}a=q[j+12>>2];q[h+8>>2]=q[j+8>>2];q[h+12>>2]=a;a=q[j+4>>2];q[h>>2]=q[j>>2];q[h+4>>2]=a;a=d+8|0;f=q[a+4>>2];q[j+8>>2]=q[a>>2];q[j+12>>2]=f;a=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=a;a=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=a;a=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=a;l=(j|0)==(l|0)?d:l;f=j+16|0;m=m+1|0;n=q[c>>2];a=q[n+12>>2];o=!a;if(a){continue}break}}while(1)continue}Jq(i,i+16|0,b-16|0,c);break a}z:{if((f|0)==(l|0)){break z}a=q[c>>2];d=q[a+12>>2];if(!d){break z}e=q[l>>2];j=q[a+8>>2];a=0;A:{while(1){if(!dj(e,q[j+(a<<2)>>2])){break A}a=a+1|0;if((d|0)!=(a|0)){continue}break}a=-1}g=q[f>>2];e=0;B:{while(1){if(!dj(g,q[j+(e<<2)>>2])){break B}e=e+1|0;if((d|0)!=(e|0)){continue}break}e=-1}if((a|0)>=(e|0)){break z}a=f+8|0;d=q[a+4>>2];q[h+8>>2]=q[a>>2];q[h+12>>2]=d;a=q[f+4>>2];q[h>>2]=q[f>>2];q[h+4>>2]=a;a=l+8|0;d=q[a+4>>2];q[f+8>>2]=q[a>>2];q[f+12>>2]=d;a=q[l+4>>2];q[f>>2]=q[l>>2];q[f+4>>2]=a;a=q[h+12>>2];q[l+8>>2]=q[h+8>>2];q[l+12>>2]=a;a=q[h+4>>2];q[l>>2]=q[h>>2];q[l+4>>2]=a;m=m+1|0}if(!m){d=IN(i,f,c);a=f+16|0;if(IN(a,b,c)){b=f;a=i;if(!d){continue b}break a}if(d){continue c}}if((f-i|0)<(b-f|0)){mx(i,f,c);a=f+16|0;continue c}mx(f+16|0,b,c);b=f;a=i;continue b}if(!a){break a}d=i+16|0;j=q[f>>2];e=0;C:{while(1){if(!dj(n,q[j+(e<<2)>>2])){break C}e=e+1|0;if((a|0)!=(e|0)){continue}break}e=-1}m=q[k>>2];g=0;D:{while(1){if(!dj(m,q[j+(g<<2)>>2])){break D}g=g+1|0;if((a|0)!=(g|0)){continue}break}g=-1}E:{if((e|0)<(g|0)){break E}if(!a|(d|0)==(k|0)){break a}f=q[f>>2];while(1){e=0;F:{while(1){if(!dj(n,q[f+(e<<2)>>2])){break F}e=e+1|0;if((a|0)!=(e|0)){continue}break}e=-1}j=q[d>>2];g=0;G:{while(1){if(!dj(j,q[f+(g<<2)>>2])){break G}g=g+1|0;if((a|0)!=(g|0)){continue}break}g=-1}if((e|0)<(g|0)){a=d+8|0;f=q[a+4>>2];q[h+8>>2]=q[a>>2];q[h+12>>2]=f;a=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=a;a=q[k+12>>2];q[d+8>>2]=q[k+8>>2];q[d+12>>2]=a;a=q[k+4>>2];q[d>>2]=q[k>>2];q[d+4>>2]=a;a=q[h+12>>2];q[k+8>>2]=q[h+8>>2];q[k+12>>2]=a;a=q[h+4>>2];q[k>>2]=q[h>>2];q[k+4>>2]=a;d=d+16|0;break E}d=d+16|0;if((k|0)!=(d|0)){continue}break}break a}if((d|0)==(k|0)){break a}f=k;a=q[c>>2];e=q[a+12>>2];if(e){while(1){m=q[a+8>>2];l=q[i>>2];while(1){a=d;g=0;H:{while(1){if(!dj(l,q[m+(g<<2)>>2])){break H}g=g+1|0;if((g|0)!=(e|0)){continue}break}g=-1}d=q[a>>2];j=0;I:{while(1){if(!dj(d,q[m+(j<<2)>>2])){break I}j=j+1|0;if((j|0)!=(e|0)){continue}break}j=-1}d=a+16|0;if((g|0)>=(j|0)){continue}break}while(1){f=f-16|0;g=0;J:{while(1){if(!dj(l,q[m+(g<<2)>>2])){break J}g=g+1|0;if((g|0)!=(e|0)){continue}break}g=-1}d=q[f>>2];j=0;K:{while(1){if(!dj(d,q[m+(j<<2)>>2])){break K}j=j+1|0;if((j|0)!=(e|0)){continue}break}j=-1}if((g|0)<(j|0)){continue}break}if(a>>>0>=f>>>0){i=a;continue d}d=q[a+12>>2];q[h+8>>2]=q[a+8>>2];q[h+12>>2]=d;d=q[a+4>>2];q[h>>2]=q[a>>2];q[h+4>>2]=d;d=f+8|0;j=q[d+4>>2];q[a+8>>2]=q[d>>2];q[a+12>>2]=j;d=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=d;d=q[h+12>>2];q[f+8>>2]=q[h+8>>2];q[f+12>>2]=d;d=q[h+4>>2];q[f>>2]=q[h>>2];q[f+4>>2]=d;d=a+16|0;a=q[c>>2];e=q[a+12>>2];if(e){continue}break}}break}break}break}while(1)continue}Ii=h+16|0}function wI(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;e=Ii-288|0;Ii=e;k=a+2208|0;i=a+4|0;p=e+188|0;l=e+116|0;m=1;a:{b:{while(1){o[e+116|0]=0;q[e+112>>2]=-1;q[e+100>>2]=0;q[e+92>>2]=0;q[e+96>>2]=0;q[e+88>>2]=a;q[e+104>>2]=-1;q[e+108>>2]=0;o[e+180|0]=g&252;q[e+200>>2]=0;q[e+204>>2]=0;q[e+192>>2]=0;q[e+196>>2]=0;q[e+184>>2]=0;q[e+188>>2]=0;q[a+2128>>2]=0;q[a+2176>>2]=q[a+2176>>2]+1;g=0;d=-1;c:{if(eaa(e+88|0,q[a>>2],s[a+2198>>1],r[a+2196|0],q[a+2160>>2])){break c}f=q[a+2204>>2];if(f){d=0;if(q[f>>2]){break c}}if(q[a+2160>>2]){f=Jk();d=0;h=q[a+2168>>2];if(q[a+2160>>2]<=(f-h|0)){break c}}d=Dm(e+88|0,c,hj(c));d:{e:{if(d){q[a+2128>>2]=d;break e}d=Dm(e+88|0,168488,1);if(d){q[a+2128>>2]=d;break e}d=Dm(e+88|0,b,hj(b));if(d){q[a+2128>>2]=d;break e}d=Dm(e+88|0,168490,11);if(d){q[a+2128>>2]=d;break e}d=Dm(e+88|0,168502,6);if(d){q[a+2128>>2]=d;break e}d=q[a>>2];d=Dm(e+88|0,d,hj(d));if(d){q[a+2128>>2]=d;break e}d=Dm(e+88|0,168162,2);if(d){q[a+2128>>2]=d;break e}f:{g:{d=q[a+2152>>2];h:{if(d){if(Mi[d|0](e+88|0,q[a+2132>>2])|0){break h}}i:{if(o[a+2200|0]&1){break i}d=q[a+2192>>2];if(!d){break i}if(zI(d,i,e+208|0)){break i}d=Dm(e+88|0,168509,15);j:{if(d){break j}d=Dm(e+88|0,e+208|0,hj(e+208|0));if(d){break j}d=Dm(e+88|0,168162,2);if(!d){break i}}q[a+2128>>2]=d;break h}k:{l:{m:{if(!dj(c,167921)){break m}if(!dj(c,168525)){break m}if(!dj(c,168529)){break m}d=0;break l}d=Mi[q[a+2144>>2]](e+88|0,q[a+2132>>2])|0;if(!(d>>>0<16385|!r[a+2196|0]|!(r[a+2200|0]&2))){f=Dm(e+88|0,168535,28);if(f){break f}f=0;break k}q[e+80>>2]=d;sj(e+208|0,64,168564,e+80|0);f=Dm(e+88|0,e+208|0,hj(e+208|0));if(f){break g}}f=1}g=Dm(e+88|0,168162,2);if(g){q[a+2128>>2]=g;break e}n:{if(!dj(c,167921)){break n}if(!dj(c,168525)){break n}if(dj(c,168529)){break h}}if(!f){g=0;if(d){while(1){f=d-g|0;f=f>>>0<16384?f:16384;q[e+64>>2]=f;sj(e+208|0,64,168585,e- -64|0);o:{h=Dm(e+88|0,e+208|0,hj(e+208|0));if(!h){if(Mi[q[a+2148>>2]](e+88|0,g,f,q[a+2132>>2])|0){break h}h=Dm(e+88|0,168162,2);if(!h){break o}}q[a+2128>>2]=h;break h}g=f+g|0;if(g>>>0>>0){continue}break}}d=Dm(e+88|0,168590,5);if(!d){break h}q[a+2128>>2]=d;break e}Mi[q[a+2148>>2]](e+88|0,0,d,q[a+2132>>2])|0}d=-1;if(q[a+2128>>2]){break d}d=0;q[e+108>>2]=0;p:{while(1){q[e+208>>2]=0;f=65536-d|0;d=(a+d|0)+2208|0;q:{r:{g=q[e+204>>2];s:{if(g){d=uv(g,d,f,e+208|0);break s}d=mv(q[e+200>>2],d,f,e+208|0)}d=(d|0)==-3?-101:d;t:{if((d|0)!=-101?d:0){break t}f=q[a+2204>>2];if(!(!f|!q[f>>2])){d=-3;break t}u:{if(!q[a+2160>>2]){break u}f=Jk();g=q[a+2168>>2];if(q[a+2160>>2]>(f-g|0)){break u}d=-3;break t}if((d|0)==-101){break q}if(!d){break r}}q[a+2128>>2]=d;d=-1;break p}d=q[e+208>>2];f=d+q[e+108>>2]|0;q[e+108>>2]=f;o[(a+f|0)+2208|0]=0;v:{w:{x:{y:{z:{f=haa(k,e+88|0,!d);if((f|0)!=1){d=-2;if((f|0)==-1){break p}d=q[e+100>>2];if((d|0)==204){q[e+112>>2]=0}f=r[e+180|0];if(f&1|(d|0)==304|q[e+112>>2]!=-1){break z}o[e+180|0]=f|2;break y}if(q[e+208>>2]){break q}Pi(3,167836,168596,0);d=-7;break p}if((d|0)!=304){break y}d=q[e+112>>2];if(d+1>>>0<=1){q[a+2180>>2]=q[a+2180>>2]+1;d=0;A:{if(o[a+2200|0]&1){break A}d=q[a+2192>>2];if(!d){Pi(3,167836,168720,0);d=0;break A}o[e+208|0]=0;if(zI(d,i,e+208|0)){Pi(3,167836,168778,0);d=0;break A}B:{if(!r[e+116|0]){break B}if(!dj(e+208|0,l)){break B}q[e+36>>2]=l;q[e+32>>2]=e+208;Pi(5,167836,168862,e+32|0);d=-8;break A}q[e+284>>2]=0;d=-8;if(yI(q[a+2192>>2],i,e+208|0,e+284|0,e+272|0)){break A}while(1){d=zl(k,1,65536,q[e+284>>2]);o[(d+a|0)+2208|0]=0;Mi[q[a+2136>>2]](e+88|0,q[a+2132>>2],q[e+100>>2],k,d);if(d){continue}break}xI(q[a+2192>>2],i,e+208|0,q[e+284>>2]);kaa(q[a+2192>>2],i);d=0}q[e+108>>2]=0;break v}q[e+16>>2]=d;Pi(3,167836,168340,e+16|0);d=-3;break x}C:{if(o[a+2200|0]&1|(d|0)!=200){break C}f=q[a+2192>>2];if(!f){break C}paa(f,i,l,q[e+184>>2],p);d=q[e+100>>2]}Mi[q[a+2136>>2]](e+88|0,q[a+2132>>2],d,0,0);D:{if(!dj(c,168887)){d=Lv(a,e+88|0,0,q[a+2136>>2],1);break D}d=q[e+104>>2];if(o[e+180|0]&1){f=(a+d|0)+2208|0;d=q[e+108>>2]-d|0;f=bl(k,f,d);q[e+104>>2]=0;q[e+108>>2]=d;while(1){E:{q[e+208>>2]=0;g=(a+d|0)+2208|0;o[g|0]=0;h=an(f,168162);F:{if(h){q[e+48>>2]=e+208;ru(f,168892,e+48|0);q[e+104>>2]=(h-f|0)+2;d=Lv(a,e+88|0,q[e+208>>2],q[a+2136>>2],1);if(d){break D}d=Lv(a,e+88|0,2,1385,0);if(d){break D}if(q[e+208>>2]){break F}d=0;break D}if((d|0)>=65536){d=-2;break D}d=65536-d|0;h=q[e+204>>2];G:{if(h){d=uv(h,g,d,e+272|0);break G}d=mv(q[e+200>>2],g,d,e+272|0)}g=(d|0)==-3?-101:d;if((g|0)!=-101?g:0){break E}d=q[a+2204>>2];if(q[d>>2]?d:0){break E}if(q[a+2160>>2]){d=Jk();h=q[a+2168>>2];if(q[a+2160>>2]<=(d-h|0)){break E}}if((g|0)==-101){break F}if(g){break E}q[e+108>>2]=q[e+108>>2]+q[e+272>>2]}d=q[e+108>>2];continue}break}d=-1;break D}if((d|0)==-1){break w}d=Lv(a,e+88|0,q[e+112>>2],q[a+2136>>2],1)}g=q[e+188>>2];if(!g){break x}if(d){o[g+58|0]=r[g+58|0]|1;g=q[e+188>>2]}naa(q[a+2192>>2],g);q[e+188>>2]=0}f=q[e+108>>2];if(!f){break v}q[e>>2]=f;q[e+4>>2]=c;q[e+8>>2]=q[e+100>>2];Pi(4,167836,168402,e);d=-3;break d}J(168895,168212,897,168927);G()}g=0;H:{switch(d|0){case 1:break c;case 0:break H;default:break d}}d=q[e+100>>2]!=200;break c}d=q[e+108>>2];if((d|0)<=65535){continue}break}d=-2}o[e+180|0]=r[e+180|0]|2;break d}q[a+2128>>2]=f;break e}q[a+2128>>2]=f}d=-1}o[e+180|0]=r[e+180|0]|2;f=q[a+2204>>2];if(!(!f|!q[f>>2])){g=0;break c}I:{if(!q[a+2160>>2]){break I}f=Jk();g=q[a+2168>>2];if(q[a+2160>>2]>(f-g|0)){break I}g=0;break c}if(!aua(q[e+192>>2],q[e+196>>2])){g=0;break c}g=0;if(q[e+108>>2]){break c}g=1;q[a+2188>>2]=q[a+2188>>2]+1;d=j}j=q[e+196>>2];J:{if(!j){break J}if(!(q[q[e+88>>2]+2128>>2]?0:!(r[e+180|0]&2))){eN(q[e+192>>2],j);break J}bN(q[e+192>>2],j)}if(g){f=n+1|0;if((f|0)==33){break b}m=n>>>0<32;g=r[e+180|0];j=d;n=f;continue}break}if(m){break a}}Pi(3,167836,168248,0);d=-1e3}Ii=e+288|0;return d}function w8(a,b,c,d){q[a+4>>2]=d;c=c?q[c+120>>2]:0;q[a>>2]=c;d=q[c+8>>2]-q[c+12>>2]>>4;jm(c,118014,118028,248592);q[79180]=jm(c,118036,118060,248624);q[79181]=jm(c,115413,118068,248704);q[79182]=jm(c,117793,118076,248752);jm(c,118084,118068,248784);Ak(c,115561,248816);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118116);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118133);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118152);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118169);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=5;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118181);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118197);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118223);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118240);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118252);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=7;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118265);if(Mi[q[75007]](b,2)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118280)}if(Mi[q[75007]](b,22)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=22;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118291)}if(Mi[q[75007]](b,23)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=23;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118305)}if(Mi[q[75007]](b,24)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=24;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118319)}if(Mi[q[75007]](b,25)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=25;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118334)}if(Mi[q[75007]](b,26)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=26;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118349)}if(Mi[q[75007]](b,27)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=27;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118361)}if(Mi[q[75007]](b,28)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=28;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118374)}if(Mi[q[75007]](b,29)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=29;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118386)}a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118399);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118413);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118428);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118449);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118468);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118489);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118501);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118512);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118522);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118538);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118564);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=5;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118580);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118606);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=7;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118622);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=8;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118648);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=9;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118664);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=10;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118690);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=11;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118715);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=12;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118736);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=13;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118767);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=14;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118788);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118819);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118838);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118856);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118876);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118897);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=5;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118917);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118936);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=7;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118958);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118978);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,118994);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119010);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=3;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119029);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119045);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=5;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119066);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119082);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=7;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119103);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=0;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119121);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119132);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119142);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119162);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119179);if(Mi[q[75033]](b,0)|0){a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=2;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119197);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119215);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=8;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119233)}a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=16;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119251);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=32;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119268);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=4;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119287);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=6;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119308);a=q[c+8>>2];q[a+8>>2]=3;v[a>>3]=1;q[c+8>>2]=q[c+8>>2]+16;Si(c,-2,119327);Ri(c,-2);if((d|0)!=q[c+8>>2]-q[c+12>>2]>>4){J(115568,115465,3130,119339);G()}}function XB(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;m=Ii-32|0;c=q[b+8>>2];h=q[c>>2];i=q[c+12>>2];k=q[b>>2];q[a+5200>>2]=0;q[a+5204>>2]=573;t=-1;a:{if((i|0)>0){while(1){c=(g<<2)+k|0;b:{if(s[c>>1]){c=q[a+5200>>2]+1|0;q[a+5200>>2]=c;q[((c<<2)+a|0)+2908>>2]=g;o[(a+g|0)+5208|0]=0;t=g;break b}p[c+2>>1]=0}g=g+1|0;if((i|0)!=(g|0)){continue}break}g=q[a+5200>>2];if((g|0)>1){break a}}if(!h){while(1){c=g+1|0;q[a+5200>>2]=c;f=((c<<2)+a|0)+2908|0;e=t+1|0;c=(t|0)<2;d=c?e:0;q[f>>2]=d;p[(d<<2)+k>>1]=1;o[(a+d|0)+5208|0]=0;q[a+5800>>2]=q[a+5800>>2]-1;t=c?e:t;g=q[a+5200>>2];if((g|0)<2){continue}break a}}while(1){c=g+1|0;q[a+5200>>2]=c;d=t+1|0;e=(t|0)<2;f=e?d:0;q[((c<<2)+a|0)+2908>>2]=f;c=f<<2;p[c+k>>1]=1;o[(a+f|0)+5208|0]=0;q[a+5800>>2]=q[a+5800>>2]-1;q[a+5804>>2]=q[a+5804>>2]-s[(c+h|0)+2>>1];t=e?d:t;g=q[a+5200>>2];if((g|0)<2){continue}break}}q[b+4>>2]=t;f=g>>>1|0;while(1){j=q[((f<<2)+a|0)+2908>>2];c=f;d=c<<1;c:{if((g|0)<(d|0)){break c}n=(a+j|0)+5208|0;u=(j<<2)+k|0;e=f;while(1){d:{if((d|0)>=(g|0)){c=d;break d}c=a+2908|0;h=d|1;v=q[c+(h<<2)>>2];l=s[(v<<2)+k>>1];g=q[c+(d<<2)>>2];c=s[(g<<2)+k>>1];if(l>>>0>=c>>>0){if((c|0)!=(l|0)){c=d;break d}c=d;d=a+5208|0;if(r[d+v|0]>r[d+g|0]){break d}}c=h}h=s[u>>1];g=q[((c<<2)+a|0)+2908>>2];d=s[(g<<2)+k>>1];if(h>>>0>>0){c=e;break c}if(!((d|0)!=(h|0)|r[n|0]>r[(a+g|0)+5208|0])){c=e;break c}q[((e<<2)+a|0)+2908>>2]=g;e=c;d=c<<1;g=q[a+5200>>2];if((d|0)<=(g|0)){continue}break}}q[((c<<2)+a|0)+2908>>2]=j;if((f|0)>=2){f=f-1|0;g=q[a+5200>>2];continue}break}d=q[a+5200>>2];while(1){h=i;g=d-1|0;q[a+5200>>2]=g;j=q[a+2912>>2];n=q[((d<<2)+a|0)+2908>>2];q[a+2912>>2]=n;c=1;e:{if((d|0)<3){break e}u=(a+n|0)+5208|0;d=2;v=(n<<2)+k|0;e=1;while(1){f:{if((d|0)>=(g|0)){c=d;break f}c=a+2908|0;f=d|1;l=q[c+(f<<2)>>2];g=s[(l<<2)+k>>1];i=q[c+(d<<2)>>2];c=s[(i<<2)+k>>1];if(g>>>0>=c>>>0){if((c|0)!=(g|0)){c=d;break f}c=d;d=a+5208|0;if(r[d+l|0]>r[d+i|0]){break f}}c=f}f=s[v>>1];i=q[((c<<2)+a|0)+2908>>2];d=s[(i<<2)+k>>1];if(f>>>0>>0){c=e;break e}if(!((d|0)!=(f|0)|r[u|0]>r[(a+i|0)+5208|0])){c=e;break e}q[((e<<2)+a|0)+2908>>2]=i;e=c;d=c<<1;g=q[a+5200>>2];if((d|0)<=(g|0)){continue}break}}d=2;x=a+2908|0;q[x+(c<<2)>>2]=n;c=q[a+5204>>2]-1|0;q[a+5204>>2]=c;e=q[a+2912>>2];q[x+(c<<2)>>2]=j;c=q[a+5204>>2]-1|0;q[a+5204>>2]=c;q[x+(c<<2)>>2]=e;n=(h<<2)+k|0;i=(e<<2)+k|0;f=(j<<2)+k|0;p[n>>1]=s[i>>1]+s[f>>1];y=a+5208|0;u=y+h|0;e=r[e+y|0];c=r[j+y|0];o[u|0]=(c>>>0>>0?e:c)+1;p[i+2>>1]=h;p[f+2>>1]=h;q[a+2912>>2]=h;e=1;c=1;g=q[a+5200>>2];g:{if((g|0)<2){break g}while(1){c=d;j=c;h:{if((c|0)>=(g|0)){break h}f=d|1;v=q[x+(f<<2)>>2];l=s[(v<<2)+k>>1];g=q[x+(d<<2)>>2];i=s[(g<<2)+k>>1];if(l>>>0>=i>>>0){j=d;if((i|0)!=(l|0)){break h}j=d;if(r[v+y|0]>r[g+y|0]){break h}}j=f}c=j;f=s[n>>1];i=q[((c<<2)+a|0)+2908>>2];d=s[(i<<2)+k>>1];if(f>>>0>>0){c=e;break g}if(!((d|0)!=(f|0)|r[u|0]>r[(a+i|0)+5208|0])){c=e;break g}q[((e<<2)+a|0)+2908>>2]=i;e=c;d=c<<1;g=q[a+5200>>2];if((d|0)<=(g|0)){continue}break}}i=h+1|0;q[((c<<2)+a|0)+2908>>2]=h;d=q[a+5200>>2];if((d|0)>1){continue}break}c=q[a+5204>>2]-1|0;q[a+5204>>2]=c;e=c<<2;c=a+2908|0;q[e+c>>2]=q[a+2912>>2];n=q[b+4>>2];e=q[b+8>>2];f=q[e+16>>2];C=q[e+8>>2];g=q[e+4>>2];i=q[e>>2];A=q[b>>2];B=a+2900|0;p[B>>1]=0;p[B+2>>1]=0;p[B+4>>1]=0;p[B+6>>1]=0;x=a+2892|0;p[x>>1]=0;p[x+2>>1]=0;p[x+4>>1]=0;p[x+6>>1]=0;y=a+2884|0;p[y>>1]=0;p[y+2>>1]=0;p[y+4>>1]=0;p[y+6>>1]=0;j=a+2876|0;p[j>>1]=0;p[j+2>>1]=0;p[j+4>>1]=0;p[j+6>>1]=0;p[((q[c+(q[a+5204>>2]<<2)>>2]<<2)+A|0)+2>>1]=0;i:{b=q[a+5204>>2];if((b|0)>571){break i}c=b+1|0;j:{if(!i){while(1){h=q[((c<<2)+a|0)+2908>>2];e=(h<<2)+A|0;i=s[((s[e+2>>1]<<2)+A|0)+2>>1];l=(f|0)>(i|0)?i+1|0:f;p[e+2>>1]=l;if((h|0)<=(n|0)){b=((l<<1)+a|0)+2876|0;p[b>>1]=s[b>>1]+1;q[a+5800>>2]=q[a+5800>>2]+w(s[e>>1],l+((h|0)>=(C|0)?q[g+(h-C<<2)>>2]:0)|0)}z=((f|0)<=(i|0))+z|0;c=c+1|0;if((c|0)!=573){continue}break j}}while(1){u=q[((c<<2)+a|0)+2908>>2];e=u<<2;h=e+A|0;d=s[((s[h+2>>1]<<2)+A|0)+2>>1];v=(d|0)<(f|0)?d+1|0:f;p[h+2>>1]=v;if((n|0)>=(u|0)){b=((v<<1)+a|0)+2876|0;p[b>>1]=s[b>>1]+1;l=0;b=s[h>>1];l=(u|0)>=(C|0)?q[g+(u-C<<2)>>2]:l;q[a+5800>>2]=q[a+5800>>2]+w(b,v+l|0);q[a+5804>>2]=q[a+5804>>2]+w(b,s[(e+i|0)+2>>1]+l|0)}z=((d|0)>=(f|0))+z|0;c=c+1|0;if((c|0)!=573){continue}break}}if(!z){break i}h=((f<<1)+a|0)+2876|0;while(1){c=f;while(1){b=c;c=c-1|0;d=((c<<1)+a|0)+2876|0;e=s[d>>1];if(!e){continue}break}p[d>>1]=e-1;b=((b<<1)+a|0)+2876|0;p[b>>1]=s[b>>1]+2;d=s[h>>1]-1|0;p[h>>1]=d;b=(z|0)>2;z=z-2|0;if(b){continue}break}if(!f){break i}c=573;while(1){e=d&65535;if(e){while(1){c=c-1|0;b=q[((c<<2)+a|0)+2908>>2];if((b|0)>(n|0)){continue}d=(b<<2)+A|0;b=s[d+2>>1];if((b|0)!=(f|0)){q[a+5800>>2]=q[a+5800>>2]+w(s[d>>1],f-b|0);p[d+2>>1]=f}e=e-1|0;if(e){continue}break}}f=f-1|0;if(!f){break i}d=s[((f<<1)+a|0)+2876>>1];continue}}b=s[j>>1]<<1;p[m+2>>1]=b;b=s[a+2878>>1]+(b&65534)<<1;p[m+4>>1]=b;b=s[a+2880>>1]+(b&65534)<<1;p[m+6>>1]=b;b=s[a+2882>>1]+(b&65534)<<1;p[m+8>>1]=b;b=s[y>>1]+(b&65534)<<1;p[m+10>>1]=b;b=s[a+2886>>1]+(b&65534)<<1;p[m+12>>1]=b;b=s[a+2888>>1]+(b&65534)<<1;p[m+14>>1]=b;b=s[a+2890>>1]+(b&65534)<<1;p[m+16>>1]=b;b=s[x>>1]+(b&65534)<<1;p[m+18>>1]=b;b=s[a+2894>>1]+(b&65534)<<1;p[m+20>>1]=b;b=s[a+2896>>1]+(b&65534)<<1;p[m+22>>1]=b;b=b+s[a+2898>>1]<<1;p[m+24>>1]=b;b=b+s[B>>1]<<1;p[m+26>>1]=b;b=b+s[a+2902>>1]<<1;p[m+28>>1]=b;p[m+30>>1]=b+s[a+2904>>1]<<1;if((t|0)>=0){while(1){f=(D<<2)+k|0;c=s[f+2>>1];if(c){b=(c<<1)+m|0;a=s[b>>1];p[b>>1]=a+1;d=0;while(1){e=a&1|d;d=e<<1;b=(c|0)>1;a=a>>>1|0;c=c-1|0;if(b){continue}break}p[f>>1]=e}a=(t|0)!=(D|0);D=D+1|0;if(a){continue}break}}}function NC(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,x=0,y=0,z=0,A=0,B=0;g=Ii-304|0;Ii=g;e=r[b|0];a:{if(!e){break a}b:{c:{d:{while(1){e:{e=e&255;f:{if((e|0)==32|e-9>>>0<5){while(1){e=b;b=b+1|0;d=r[e+1|0];if((d|0)==32|d-9>>>0<5){continue}break}Cn(a,0,0);while(1){b=q[a+4>>2];g:{if(b>>>0>2]){q[a+4>>2]=b+1;b=r[b|0];break g}b=Fk(a)}if((b|0)==32|b-9>>>0<5){continue}break}b=q[a+4>>2];if(q[a+104>>2]){b=b-1|0;q[a+4>>2]=b}d=b-q[a+8>>2]|0;b=d;d=d>>31;f=b;h=h+q[a+124>>2]|0;b=k+q[a+120>>2]|0;h=b>>>0>>0?h+1|0:h;k=f+b|0;h=d+h|0;h=b>>>0>k>>>0?h+1|0:h;break f}h:{i:{j:{e=r[b|0];if((e|0)==37){d=r[b+1|0];if((d|0)==42){break j}if((d|0)!=37){break i}}Cn(a,0,0);e=((e|0)==37)+b|0;b=q[a+4>>2];k:{if(b>>>0>2]){q[a+4>>2]=b+1;b=r[b|0];break k}b=Fk(a)}if((b|0)!=r[e|0]){if(q[a+104>>2]){q[a+4>>2]=q[a+4>>2]-1}z=0;if((b|0)>=0){break a}break c}b=k+1|0;h=b>>>0<1?h+1|0:h;k=b;break f}j=0;e=b+2|0;break h}if(!(r[b+2|0]!=36|d-48>>>0>=10)){j=rxa(c,r[b+1|0]-48|0);e=b+3|0;break h}j=q[c>>2];c=c+4|0;e=b+1|0}z=0;b=0;if(r[e|0]-48>>>0<10){while(1){b=(r[e|0]+w(b,10)|0)-48|0;d=r[e+1|0];e=e+1|0;if(d-48>>>0<10){continue}break}}d=e;f=r[d|0];l:{if((f|0)!=109){break l}m=0;z=(j|0)!=0;f=r[e+1|0];n=0;d=e+1|0}e=d+1|0;i=3;m:{n:{switch(f-65|0){case 39:f=d+2|0;d=r[d+1|0]==104;e=d?f:e;i=d?-2:-1;break m;case 43:f=d+2|0;d=r[d+1|0]==108;e=d?f:e;i=d?3:1;break m;case 51:case 57:i=1;break m;case 11:i=2;break m;case 41:break m;case 0:case 2:case 4:case 5:case 6:case 18:case 23:case 26:case 32:case 34:case 35:case 36:case 37:case 38:case 40:case 45:case 46:case 47:case 50:case 52:case 55:break n;default:break c}}i=0;e=d}f=r[e|0];d=(f&47)==3;y=d?1:i;s=d?f|32:f;o:{if((s|0)==91){break o}p:{if((s|0)!=110){if((s|0)!=99){break p}b=(b|0)>1?b:1;break o}cD(j,y,k,h);break f}Cn(a,0,0);while(1){d=q[a+4>>2];q:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break q}d=Fk(a)}if((d|0)==32|d-9>>>0<5){continue}break}d=q[a+4>>2];if(q[a+104>>2]){d=d-1|0;q[a+4>>2]=d}d=d-q[a+8>>2]|0;f=d;d=d>>31;l=f;x=h+q[a+124>>2]|0;f=k+q[a+120>>2]|0;x=f>>>0>>0?x+1|0:x;k=l+f|0;d=d+x|0;d=f>>>0>k>>>0?d+1|0:d;h=d}x=b;B=b>>31;Cn(a,b,B);d=q[a+104>>2];f=q[a+4>>2];r:{if(d>>>0>f>>>0){q[a+4>>2]=f+1;break r}if((Fk(a)|0)<0){break c}d=q[a+104>>2]}if(d){q[a+4>>2]=q[a+4>>2]-1}d=16;s:{t:{u:{v:{w:{x:{y:{switch(s-88|0){default:b=s-65|0;if(b>>>0>6|!(1<>2]-q[a+8>>2]|0;if(q[a+120>>2]==(0-d|0)&q[a+124>>2]==(0-((d>>31)+((d|0)!=0)|0)|0)){break b}if(!j){break s}x=q[g+8>>2];f=q[g+12>>2];d=q[g>>2];b=q[g+4>>2];switch(y|0){case 2:break u;case 1:break v;case 0:break w;default:break s};case 3:case 11:case 27:if((s&239)==99){Ui(g+32|0,-1,257);o[g+32|0]=0;if((s|0)!=115){break t}o[g+65|0]=0;o[g+46|0]=0;p[g+42>>1]=0;p[g+44>>1]=0;break t}l=r[e+1|0];f=(l|0)==94;Ui(g+32|0,f,257);o[g+32|0]=0;d=f?e+2|0:e+1|0;z:{A:{B:{e=r[(f?2:1)+e|0];if((e|0)!=45){if((e|0)==93){break B}i=(l|0)!=94;break z}i=(l|0)!=94;o[g+78|0]=i;break A}i=(l|0)!=94;o[g+126|0]=i}d=d+1|0}e=d;while(1){d=r[e|0];C:{if((d|0)!=45){if(!d){break c}if((d|0)!=93){break C}break t}d=45;l=r[e+1|0];if(!l|(l|0)==93){break C}f=e+1|0;e=r[e-1|0];D:{if(l>>>0<=e>>>0){d=l;break D}while(1){e=e+1|0;o[e+(g+32|0)|0]=i;d=r[f|0];if(e>>>0>>0){continue}break}}e=f}o[(d+g|0)+33|0]=i;e=e+1|0;continue};case 23:d=8;break x;case 12:case 29:d=10;break x;case 1:case 2:case 4:case 5:case 6:case 7:case 8:case 10:case 16:case 18:case 19:case 20:case 21:case 22:case 25:case 26:case 28:case 30:case 31:break s;case 0:case 24:case 32:break x;case 17:break y}}d=0}x=mO(a,d,0,-1,-1);f=Li;d=q[a+4>>2]-q[a+8>>2]|0;if(q[a+120>>2]==(0-d|0)&q[a+124>>2]==(0-((d>>31)+((d|0)!=0)|0)|0)){break b}if(!(!j|(s|0)!=112)){q[j>>2]=x;break s}cD(j,y,x,f);break s}u[j>>2]=Kxa(d,b,x,f);break s}v[j>>3]=mC(d,b,x,f);break s}q[j>>2]=d;q[j+4>>2]=b;q[j+8>>2]=x;q[j+12>>2]=f;break s}s=(s|0)==99;i=s?b+1|0:31;l=(y|0)!=1;E:{if(!l){d=j;if(z){d=Yi(i<<2);if(!d){break d}}q[g+296>>2]=0;q[g+300>>2]=0;b=0;while(1){n=d;F:{while(1){d=q[a+4>>2];G:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break G}d=Fk(a)}if(!r[(d+g|0)+33|0]){break F}o[g+27|0]=d;d=lV(g+28|0,g+27|0,g+296|0);if((d|0)==-2){continue}if((d|0)==-1){break e}if(n){q[(b<<2)+n>>2]=q[g+28>>2];b=b+1|0}if(z^1|(b|0)!=(i|0)){continue}break}i=i<<1|1;d=ul(n,i<<2);if(d){continue}break e}break}d=g+296|0;f=1;H:{if(!d){break H}f=!q[d>>2]}if(!f){break e}m=0;break E}if(z){b=0;d=Yi(i);if(!d){break d}while(1){m=d;while(1){d=q[a+4>>2];I:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break I}d=Fk(a)}if(!r[(d+g|0)+33|0]){n=0;break E}o[b+m|0]=d;b=b+1|0;if((i|0)!=(b|0)){continue}break}n=0;i=i<<1|1;d=ul(m,i);if(d){continue}break}break c}b=0;if(j){while(1){d=q[a+4>>2];J:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break J}d=Fk(a)}if(r[(d+g|0)+33|0]){o[b+j|0]=d;b=b+1|0;continue}else{n=0;m=j;break E}}}while(1){b=q[a+4>>2];K:{if(b>>>0>2]){q[a+4>>2]=b+1;b=r[b|0];break K}b=Fk(a)}if(r[(b+g|0)+33|0]){continue}break}m=0;n=0;b=0}d=q[a+4>>2];if(q[a+104>>2]){d=d-1|0;q[a+4>>2]=d}d=d-q[a+8>>2]|0;f=d;y=d+q[a+120>>2]|0;d=q[a+124>>2]+(d>>31)|0;d=f>>>0>y>>>0?d+1|0:d;if(!(d|y)|(s?(x|0)!=(y|0)|(d|0)!=(B|0):0)){break b}L:{if(!z){break L}if(!l){q[j>>2]=n;break L}q[j>>2]=m}if(s){break s}if(n){q[(b<<2)+n>>2]=0}if(!m){m=0;break s}o[b+m|0]=0}d=q[a+4>>2]-q[a+8>>2]|0;b=d;d=d>>31;f=b;h=h+q[a+124>>2]|0;b=k+q[a+120>>2]|0;h=b>>>0>>0?h+1|0:h;k=f+b|0;h=d+h|0;h=b>>>0>k>>>0?h+1|0:h;A=((j|0)!=0)+A|0}b=e+1|0;e=r[e+1|0];if(e){continue}break a}break}m=0;break c}m=0;n=0}A=A?A:-1}if(!z){break a}Ni(m);Ni(n)}Ii=g+304|0;return A}function zwa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=x(0),K=0,L=x(0),M=0,N=0,O=x(0),P=0,Q=x(0),R=0,S=0,T=0,U=0,V=0,W=0,X=0;D=Ii-96|0;Ii=D;a:{M=w(c,15)+b|0;d=r[M|0];j=w(c,14)+b|0;k=r[j|0];E=w(c,13)+b|0;e=r[E|0];N=w(c,12)+b|0;h=r[N|0];g=w(c,11)+b|0;m=r[g|0];P=w(c,10)+b|0;n=r[P|0];u=w(c,9)+b|0;t=r[u|0];R=(c<<3)+b|0;i=r[R|0];S=w(c,7)+b|0;A=r[S|0];T=w(c,6)+b|0;B=r[T|0];U=w(c,5)+b|0;C=r[U|0];V=(c<<2)+b|0;z=r[V|0];W=w(c,3)+b|0;F=r[W|0];X=(c<<1)+b|0;l=r[X|0];v=b+c|0;H=r[v|0];K=r[b|0];f=H>>>0>K>>>0?H:K;f=f>>>0>>0?l:f;f=f>>>0>>0?F:f;f=f>>>0>>0?z:f;f=f>>>0>>0?C:f;f=f>>>0>>0?B:f;f=f>>>0>>0?A:f;f=i>>>0>f>>>0?i:f;f=f>>>0>>0?t:f;f=f>>>0>>0?n:f;f=f>>>0>>0?m:f;f=h>>>0>f>>>0?h:f;f=e>>>0>f>>>0?e:f;f=f>>>0>>0?k:f;f=d>>>0>f>>>0?d:f;H=H>>>0>>0?H:K;l=l>>>0>>0?l:H;F=l>>>0>F>>>0?F:l;z=z>>>0>>0?z:F;C=C>>>0>>0?C:z;B=B>>>0>>0?B:C;A=A>>>0>>0?A:B;i=i>>>0>>0?i:A;t=i>>>0>t>>>0?t:i;n=n>>>0>>0?n:t;m=m>>>0>>0?m:n;h=h>>>0>>0?h:m;e=e>>>0>>0?e:h;k=e>>>0>k>>>0?k:e;d=d>>>0>>0?d:k;b:{if((f|0)==(d|0)){p[a>>1]=d&255|3328;b=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[a+2|0]=b;o[a+3|0]=b>>>8;o[a+4|0]=b>>>16;o[a+5|0]=b>>>24;b=r[105960]|r[105961]<<8;o[a+6|0]=b;o[a+7|0]=b>>>8;break b}h=f-d|0;if(h>>>0<=5){c=f-2|0;c=(c>>>0<256?c:c>>31^-1)&255;p[a>>1]=c|7424;d=r[b|0];b=3-c|0;d=d+b|0;if(d>>>0>=6){break a}c=b+r[v|0]|0;if(c>>>0>=6){break a}k=b+r[X|0]|0;if(k>>>0>5){break a}e=b+r[W|0]|0;if(e>>>0>5){break a}h=b+r[V|0]|0;if(h>>>0>5){break a}m=b+r[U|0]|0;if(m>>>0>5){break a}n=b+r[T|0]|0;if(n>>>0>5){break a}t=b+r[S|0]|0;if(t>>>0>5){break a}i=b+r[R|0]|0;if(i>>>0>5){break a}A=b+r[u|0]|0;if(A>>>0>5){break a}B=b+r[P|0]|0;if(B>>>0>5){break a}C=b+r[g|0]|0;if(C>>>0>5){break a}z=b+r[N|0]|0;if(z>>>0>5){break a}F=b+r[E|0]|0;if(F>>>0>5){break a}l=b+r[j|0]|0;if(l>>>0>5){break a}H=b+r[M|0]|0;if(H>>>0>5){break a}b=a;c=r[c+107935|0]<<1;a=r[d+107935|0]<<13;d=0;K=a|c;c=r[k+107935|0];a=c>>>11|0;c=c<<21|d;d=a|K;v=c;c=r[e+107935|0];a=c>>>23|0;c=v|c<<9;d=a|d|r[h+107935|0]<<10;e=c;c=r[m+107935|0];a=c>>>2|0;c=e|c<<30;d=a|d;e=c;c=r[n+107935|0];a=c>>>14|0;c=e|c<<18;d=a|d;e=c;c=r[t+107935|0];a=c>>>26|0;c=e|c<<6;d=a|d|r[i+107935|0]<<7;e=c;c=r[A+107935|0];a=c>>>5|0;c=e|c<<27;d=a|d;e=c;c=r[B+107935|0];a=c>>>17|0;c=e|c<<15;d=a|d;e=c;c=r[C+107935|0];a=c>>>29|0;c=e|c<<3;d=a|d|r[z+107935|0]<<4;e=c;c=r[F+107935|0];a=c>>>8|0;c=e|c<<24;d=a|d;e=b;b=r[l+107935|0];a=b>>>20|0;Yt(e,r[H+107935|0]|(b<<12|c),a|d);break b}e=D;Q=x(f>>>0);L=x(d>>>0);I=L;I=Ao(x(x(x(Q-I)*x(.5199999809265137))+I));c:{if(x(y(I))>>0<256?d:d>>31^-1)&255;q[e+80>>2]=H;e=D;I=x(h>>>0);O=Ao(x(I/x(25)));d:{if(x(y(O))15?15:d;if((d|0)<1){k=1}q[e+64>>2]=k;e=D;O=Ao(x(x(x(Q-L)*x(.5263158082962036))+L));e:{if(x(y(O))>>0<256?d:d>>31^-1)&255;q[e+84>>2]=K;h=D;I=Ao(x(I/x(19)));f:{if(x(y(I))15?15:d;if((d|0)<1){e=1}d=e;q[h+68>>2]=d;I=Ao(x(x(x(Q-L)*x(.5263158082962036))+L));g:{if(x(y(I))>2]=d;f=(e>>>0<256?e:e>>31^-1)&255;q[D+88>>2]=f;L=Ao(x(x(x(Q-L)*x(.5263158082962036))+L));h:{if(x(y(L))>2]=d;M=(e>>>0<256?e:e>>31^-1)&255;q[D+92>>2]=M;F=0;P=(d|k)!=1;A=0;B=0;C=0;z=0;while(1){h=-1;m=-1;n=-1;t=-1;e=0;i=r[w(c,z)+b|0];i:{if((i-7&255)>>>0>=242){while(1){l=e+106016|0;j=H+w(k,o[l+16|0])|0;E=((j>>>0<256?j:j>>31^-1)&255)-i|0;j=E>>31;j=(j^j+E)<<3|e;h=h>>>0>>0?h:j;j=K+w(d,o[l- -64|0])|0;E=((j>>>0<256?j:j>>31^-1)&255)-i|0;j=E>>31;j=(j^j+E)<<3|e;m=j>>>0>m>>>0?m:j;j=f+w(d,o[l+88|0])|0;E=((j>>>0<256?j:j>>31^-1)&255)-i|0;j=E>>31;j=(j^j+E)<<3|e;n=j>>>0>n>>>0?n:j;l=M+w(d,o[l+104|0])|0;j=((l>>>0<256?l:l>>31^-1)&255)-i|0;l=j>>31;l=(l^j+l)<<3|e;t=l>>>0>t>>>0?t:l;e=e+1|0;if((e|0)!=8){continue}break i}}l=M-i|0;j=f-i|0;E=K-i|0;N=H-i|0;if(!P){while(1){i=e+106016|0;u=N+o[i+16|0]|0;g=u>>31;g=(g^g+u)<<3|e;h=h>>>0>>0?h:g;u=E+o[i- -64|0]|0;g=u>>31;g=(g^g+u)<<3|e;m=g>>>0>m>>>0?m:g;u=j+o[i+88|0]|0;g=u>>31;g=(g^g+u)<<3|e;n=g>>>0>n>>>0?n:g;g=l+o[i+104|0]|0;i=g>>31;i=(i^g+i)<<3|e;t=i>>>0>t>>>0?t:i;e=e+1|0;if((e|0)!=8){continue}break i}}while(1){i=e+106016|0;u=N+w(k,o[i+16|0])|0;g=u>>31;g=(g^g+u)<<3|e;h=h>>>0>>0?h:g;u=E+w(d,o[i- -64|0])|0;g=u>>31;g=(g^g+u)<<3|e;m=g>>>0>m>>>0?m:g;u=j+w(d,o[i+88|0])|0;g=u>>31;g=(g^g+u)<<3|e;n=g>>>0>n>>>0?n:g;g=l+w(d,o[i+104|0])|0;i=g>>31;i=(i^g+i)<<3|e;t=i>>>0>t>>>0?t:i;e=e+1|0;if((e|0)!=8){continue}break}}e=D+z|0;o[e|0]=h&7;o[e+16|0]=m&7;o[e+32|0]=n&7;o[e+48|0]=t&7;e=h>>>3|0;C=w(e,e)+C|0;e=m>>>3|0;B=w(e,e)+B|0;e=n>>>3|0;A=w(e,e)+A|0;e=t>>>3|0;F=w(e,e)+F|0;z=z+1|0;if((z|0)!=16){continue}break}c=B>>>0>>0;d=c?B:C;b=d>>>0>A>>>0;c=(b?A:d)>>>0>F>>>0?3:b?2:c;b=c<<2;p[a>>1]=s[(b|D- -64)>>1]<<12|r[b|D+80]|(r[c+107950|0]&15)<<8;b=a;k=(c<<4)+D|0;c=r[k+14|0];a=c>>>20|0;e=c<<12;c=a;m=r[k+1|0]<<1|r[k|0]<<13;d=r[k+2|0];a=d>>>11|0;d=d<<21;h=a|m;v=d;d=r[k+3|0];a=d>>>23|0;d=v|d<<9;h=a|h|r[k+4|0]<<10;v=d;d=r[k+5|0];a=d>>>2|0;d=v|d<<30;h=a|h;v=d;d=r[k+6|0];a=d>>>14|0;d=v|d<<18;h=a|h;v=d;d=r[k+7|0];a=d>>>26|0;d=v|d<<6;h=a|h|r[k+8|0]<<7;v=d;d=r[k+9|0];a=d>>>5|0;d=v|d<<27;h=a|h;v=d;d=r[k+10|0];a=d>>>17|0;d=v|d<<15;h=a|h;v=d;d=r[k+11|0];a=d>>>29|0;d=v|d<<3;h=a|h|r[k+12|0]<<4;v=b;b=r[k+13|0];a=b>>>8|0;Yt(v,r[k+15|0]|(b<<24|d|e),a|h|c)}Ii=D+96|0;return}J(107892,96899,15816,107941);G()}function ywa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0,v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=x(0),O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=x(0),X=x(0),Y=x(0),Z=x(0);h=Ii-448|0;Ii=h;a:{E=w(c,15)+b|0;d=r[E|0];F=w(c,14)+b|0;e=r[F|0];H=w(c,13)+b|0;k=r[H|0];I=w(c,12)+b|0;j=r[I|0];K=w(c,11)+b|0;f=r[K|0];L=w(c,10)+b|0;l=r[L|0];M=w(c,9)+b|0;B=r[M|0];O=(c<<3)+b|0;i=r[O|0];P=w(c,7)+b|0;C=r[P|0];Q=w(c,6)+b|0;m=r[Q|0];R=w(c,5)+b|0;n=r[R|0];S=(c<<2)+b|0;u=r[S|0];T=w(c,3)+b|0;v=r[T|0];U=(c<<1)+b|0;z=r[U|0];V=b+c|0;A=r[V|0];D=r[b|0];g=A>>>0>D>>>0?A:D;g=g>>>0>>0?z:g;g=g>>>0>>0?v:g;g=g>>>0>>0?u:g;g=g>>>0>>0?n:g;g=g>>>0>>0?m:g;g=g>>>0>>0?C:g;g=g>>>0>>0?i:g;g=g>>>0>>0?B:g;g=g>>>0>>0?l:g;g=g>>>0>>0?f:g;g=j>>>0>g>>>0?j:g;g=g>>>0>>0?k:g;g=e>>>0>g>>>0?e:g;g=d>>>0>g>>>0?d:g;A=A>>>0>>0?A:D;z=z>>>0>>0?z:A;v=v>>>0>>0?v:z;u=u>>>0>>0?u:v;n=n>>>0>>0?n:u;m=m>>>0>>0?m:n;C=m>>>0>C>>>0?C:m;i=i>>>0>>0?i:C;B=i>>>0>B>>>0?B:i;l=l>>>0>>0?l:B;f=f>>>0>>0?f:l;j=j>>>0>>0?j:f;k=j>>>0>k>>>0?k:j;e=e>>>0>>0?e:k;d=d>>>0>>0?d:e;b:{if((g|0)==(d|0)){p[a>>1]=d&255|3328;b=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[a+2|0]=b;o[a+3|0]=b>>>8;o[a+4|0]=b>>>16;o[a+5|0]=b>>>24;b=r[105960]|r[105961]<<8;o[a+6|0]=b;o[a+7|0]=b>>>8;break b}e=g-d|0;if(e>>>0<=5){c=g-2|0;c=(c>>>0<256?c:c>>31^-1)&255;p[a>>1]=c|7424;d=r[b|0];b=3-c|0;d=d+b|0;if(d>>>0>=6){break a}c=b+r[V|0]|0;if(c>>>0>=6){break a}e=b+r[U|0]|0;if(e>>>0>5){break a}k=b+r[T|0]|0;if(k>>>0>5){break a}j=b+r[S|0]|0;if(j>>>0>5){break a}f=b+r[R|0]|0;if(f>>>0>5){break a}l=b+r[Q|0]|0;if(l>>>0>5){break a}B=b+r[P|0]|0;if(B>>>0>5){break a}i=b+r[O|0]|0;if(i>>>0>5){break a}C=b+r[M|0]|0;if(C>>>0>5){break a}m=b+r[L|0]|0;if(m>>>0>5){break a}n=b+r[K|0]|0;if(n>>>0>5){break a}u=b+r[I|0]|0;if(u>>>0>5){break a}v=b+r[H|0]|0;if(v>>>0>5){break a}z=b+r[F|0]|0;if(z>>>0>5){break a}A=b+r[E|0]|0;if(A>>>0>5){break a}b=a;c=r[c+107935|0]<<1;a=r[d+107935|0]<<13;d=0;D=a|c;c=r[e+107935|0];a=c>>>11|0;c=c<<21|d;d=a|D;e=c;c=r[k+107935|0];a=c>>>23|0;c=e|c<<9;d=a|d|r[j+107935|0]<<10;e=c;c=r[f+107935|0];a=c>>>2|0;c=e|c<<30;d=a|d;e=c;c=r[l+107935|0];a=c>>>14|0;c=e|c<<18;d=a|d;e=c;c=r[B+107935|0];a=c>>>26|0;c=e|c<<6;d=a|d|r[i+107935|0]<<7;e=c;c=r[C+107935|0];a=c>>>5|0;c=e|c<<27;d=a|d;e=c;c=r[m+107935|0];a=c>>>17|0;c=e|c<<15;d=a|d;e=c;c=r[n+107935|0];a=c>>>29|0;c=e|c<<3;d=a|d|r[u+107935|0]<<4;e=c;c=r[v+107935|0];a=c>>>8|0;c=e|c<<24;d=a|d;e=b;b=r[z+107935|0];a=b>>>20|0;Yt(e,r[A+107935|0]|(b<<12|c),a|d);break b}Y=x(e>>>0);Z=x(g>>>0);W=x(d>>>0);e=0;while(1){d=(e<<3)+106016|0;k=o[d+3|0];N=x(o[d+7|0]-k|0);X=Ao(x(x(x(Z-W)*x(x(0-k|0)/N))+W));c:{if(x(y(X))>2]=(d>>>0<256?d:d>>31^-1)&255;j=k+(h+320|0)|0;N=Ao(x(Y/N));d:{if(x(y(N))15?15:d;if((d|0)<1){k=1}q[j>>2]=k;e=e+1|0;if((e|0)!=16){continue}break}q[h+312>>2]=0;q[h+316>>2]=0;q[h+304>>2]=0;q[h+308>>2]=0;q[h+296>>2]=0;q[h+300>>2]=0;q[h+288>>2]=0;q[h+292>>2]=0;q[h+280>>2]=0;q[h+284>>2]=0;q[h+272>>2]=0;q[h+276>>2]=0;q[h+264>>2]=0;q[h+268>>2]=0;q[h+256>>2]=0;q[h+260>>2]=0;l=0;while(1){f=(l<<3)+106016|0;D=f;d=l<<2;C=d+(h+256|0)|0;k=q[d+(h+384|0)>>2];j=q[d+(h+320|0)>>2];e=-1;B=0;i=0;while(1){d=r[w(c,B)+b|0];if((d|0)!=(e|0)){e=k+w(j,o[f|0])|0;g=((e>>>0<256?e:e>>31^-1)&255)-d|0;e=g>>31;i=k+w(j,o[f+1|0])|0;E=((i>>>0<256?i:i>>31^-1)&255)-d|0;i=E>>31;m=k+w(j,o[f+2|0])|0;F=((m>>>0<256?m:m>>31^-1)&255)-d|0;m=F>>31;n=k+w(j,o[f+3|0])|0;H=((n>>>0<256?n:n>>31^-1)&255)-d|0;n=H>>31;u=k+w(j,o[f+4|0])|0;I=((u>>>0<256?u:u>>31^-1)&255)-d|0;u=I>>31;v=k+w(j,o[f+5|0])|0;K=((v>>>0<256?v:v>>31^-1)&255)-d|0;v=K>>31;z=k+w(j,o[f+6|0])|0;L=((z>>>0<256?z:z>>31^-1)&255)-d|0;z=L>>31;A=k+w(j,o[D+7|0])|0;M=((A>>>0<256?A:A>>31^-1)&255)-d|0;A=M>>31;e=(e^e+g)<<3;i=(i^i+E)<<3|1;e=e>>>0>>0?e:i;i=(m^m+F)<<3|2;e=e>>>0>>0?e:i;i=(n^n+H)<<3|3;e=e>>>0>>0?e:i;i=(u^u+I)<<3|4;e=e>>>0>>0?e:i;i=(v^v+K)<<3|5;e=e>>>0>>0?e:i;i=(z^z+L)<<3|6;e=e>>>0>>0?e:i;i=(A^A+M)<<3|7;i=e>>>0>>0?e:i;e=d}o[((l<<4)+h|0)+B|0]=i&7;d=i>>>3|0;q[C>>2]=q[C>>2]+w(d,d);B=B+1|0;if((B|0)!=16){continue}break}l=l+1|0;if((l|0)!=16){continue}break}b=q[h+260>>2];c=q[h+256>>2];d=b>>>0>>0;e=q[h+264>>2];b=d?b:c;c=e>>>0>>0;f=c?2:d;d=q[h+268>>2];b=c?e:b;c=d>>>0>>0;f=c?3:f;e=q[h+272>>2];b=c?d:b;c=e>>>0>>0;f=c?4:f;d=q[h+276>>2];b=c?e:b;c=d>>>0>>0;f=c?5:f;e=q[h+280>>2];b=c?d:b;c=e>>>0>>0;f=c?6:f;d=q[h+284>>2];b=c?e:b;c=d>>>0>>0;f=c?7:f;e=q[h+288>>2];b=c?d:b;c=e>>>0>>0;f=c?8:f;d=q[h+292>>2];b=c?e:b;c=d>>>0>>0;f=c?9:f;e=q[h+296>>2];b=c?d:b;c=e>>>0>>0;f=c?10:f;d=q[h+300>>2];b=c?e:b;c=d>>>0>>0;f=c?11:f;e=q[h+304>>2];b=c?d:b;c=e>>>0>>0;f=c?12:f;d=q[h+308>>2];b=c?e:b;c=d>>>0>>0;f=c?13:f;e=q[h+312>>2];b=c?d:b;c=e>>>0>>0;c=t[h+316>>2]<(c?e:b)>>>0?15:c?14:f;b=c<<2;p[a>>1]=r[b+(h+384|0)|0]|c<<8&3840|s[b+(h+320|0)>>1]<<12;b=a;e=(c<<4)+h|0;c=r[e+14|0];a=c>>>20|0;k=c<<12;c=a;f=r[e+1|0]<<1|r[e|0]<<13;d=r[e+2|0];a=d>>>11|0;d=d<<21;j=a|f;f=d;d=r[e+3|0];a=d>>>23|0;d=f|d<<9;j=a|j|r[e+4|0]<<10;f=d;d=r[e+5|0];a=d>>>2|0;d=f|d<<30;j=a|j;f=d;d=r[e+6|0];a=d>>>14|0;d=f|d<<18;j=a|j;f=d;d=r[e+7|0];a=d>>>26|0;d=f|d<<6;j=a|j|r[e+8|0]<<7;f=d;d=r[e+9|0];a=d>>>5|0;d=f|d<<27;j=a|j;f=d;d=r[e+10|0];a=d>>>17|0;d=f|d<<15;j=a|j;f=d;d=r[e+11|0];a=d>>>29|0;d=f|d<<3;j=a|j|r[e+12|0]<<4;f=b;b=r[e+13|0];a=b>>>8|0;Yt(f,r[e+15|0]|(b<<24|d|k),a|j|c)}Ii=h+448|0;return}J(107892,96899,15973,107913);G()}function Uo(a){var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=0,k=x(0),l=x(0),m=x(0),n=0,p=x(0),t=x(0),v=x(0),y=x(0),z=0,A=0,B=x(0),C=x(0),D=0,E=0,F=0,H=0,I=x(0);c=Ii-144|0;Ii=c;q[c+136>>2]=0;a:{b:{e=q[a+1084>>2];b=q[a+1080>>2];d=e-b|0;if(!d){break b}if((b|0)!=(e|0)){e=b-e|0;e=((d|0)<(e|0)?e:d)>>>1|0;d=(d|0)>-1?d:-1;d=w(e,(d|0)<1?d:1);j=d>>>0>1?d:1;while(1){c:{d=s[(n<<1)+b>>1];e=q[a+1036>>2];if(d>>>0>2]-e>>2>>>0){b=q[e+(d<<2)>>2];e=q[b+48>>2];d:{e:{if((e|0)!=q[b+64>>2]){f=u[b+52>>2];break e}f=u[b+52>>2];if(q[b+68>>2]!=q[b+52>>2]){break e}if(q[b+56>>2]==q[b+72>>2]){break d}}u[b+68>>2]=f;q[b+64>>2]=e;i=u[b+56>>2];u[b+72>>2]=i;u[c+8>>2]=i;u[c+4>>2]=f;q[c>>2]=e;en(c- -64|0,c);u[b>>2]=u[c+64>>2];u[b+4>>2]=u[c+68>>2];u[b+8>>2]=u[c+72>>2];u[b+12>>2]=u[c+76>>2]}e=q[a+3128>>2];if(d>>>0>=q[a+3132>>2]-e>>6>>>0){break a}f=u[b+40>>2];i=u[b+36>>2];v=u[b+24>>2];z=q[b+20>>2];D=q[b+16>>2];d=e+(d<<6)|0;p=u[b+32>>2];g=u[b>>2];k=u[b+4>>2];y=x(k+k);h=x(g*y);l=u[b+12>>2];t=u[b+8>>2];m=x(t+t);B=x(l*m);u[d+4>>2]=p*x(h+B);C=x(g*m);I=x(y*l);u[d+8>>2]=p*x(C-I);u[d+12>>2]=p*x(0);u[d+16>>2]=i*x(h-B);u[d+32>>2]=f*x(C+I);q[d+48>>2]=D;q[d+52>>2]=z;h=g;g=x(g+g);h=x(x(1)-x(h*g));t=x(t*m);u[d+20>>2]=i*x(h-t);m=x(k*m);g=x(g*l);u[d+24>>2]=i*x(m+g);u[d+28>>2]=i*x(0);u[d+36>>2]=f*x(m-g);i=x(k*y);u[d+40>>2]=f*x(h-i);u[d+44>>2]=f*x(0);q[d+60>>2]=1065353216;u[d+56>>2]=v;u[d>>2]=p*x(x(x(1)-i)-t);b=s[b+138>>1];d=b>>>16|0;if(!(d|b<<16^2147418112)){break c}J(8793,7192,2467,8776);G()}break a}n=n+1|0;if((j|0)==(n|0)){break b}b=q[a+1080>>2];if(q[a+1084>>2]-b>>1>>>0>n>>>0){continue}break}}break a}f:{if(r[a+3272|0]&4){n=1;g:{h:{while(1){i:{j:{b=(n<<4)+a|0;D=b+1084|0;e=q[D>>2];E=b+1080|0;b=q[E>>2];d=e-b|0;if(!d){break j}if((b|0)!=(e|0)){e=b-e|0;e=((d|0)<(e|0)?e:d)>>>1|0;d=(d|0)>-1?d:-1;d=w(e,(d|0)<1?d:1);F=d>>>0>1?d:1;d=0;while(1){e=s[(d<<1)+b>>1];j=q[a+1036>>2];if(e>>>0>=q[a+1040>>2]-j>>2>>>0){break i}b=q[j+(e<<2)>>2];j=q[b+48>>2];k:{l:{if((j|0)!=q[b+64>>2]){f=u[b+52>>2];break l}f=u[b+52>>2];if(q[b+68>>2]!=q[b+52>>2]){break l}if(q[b+56>>2]==q[b+72>>2]){break k}}u[b+68>>2]=f;q[b+64>>2]=j;i=u[b+56>>2];u[b+72>>2]=i;u[c+8>>2]=i;u[c+4>>2]=f;q[c>>2]=j;en(c- -64|0,c);u[b>>2]=u[c+64>>2];u[b+4>>2]=u[c+68>>2];u[b+8>>2]=u[c+72>>2];u[b+12>>2]=u[c+76>>2]}j=q[a+3128>>2];A=q[a+3132>>2]-j>>6;if(A>>>0<=e>>>0){break a}z=s[b+138>>1];if((z|0)==32767){break h}if(z>>>0>=A>>>0){break g}i=u[b+40>>2];g=u[b+36>>2];l=u[b+24>>2];f=u[b>>2];p=u[b+4>>2];k=u[b+12>>2];m=u[b+8>>2];A=q[b+20>>2];H=q[b+16>>2];y=u[b+32>>2];u[c+76>>2]=y*x(0);q[c+112>>2]=H;q[c+116>>2]=A;q[c+124>>2]=1065353216;u[c+120>>2]=l;u[c+92>>2]=g*x(0);u[c+108>>2]=i*x(0);t=x(p+p);v=x(f*t);l=x(m+m);h=x(k*l);u[c+68>>2]=y*x(v+h);B=x(f*l);C=x(t*k);u[c+72>>2]=y*x(B-C);u[c+80>>2]=g*x(v-h);v=x(p*l);h=k;k=x(f+f);h=x(h*k);u[c+88>>2]=g*x(v+h);u[c+96>>2]=i*x(B+C);u[c+100>>2]=i*x(v-h);h=g;f=x(x(1)-x(f*k));g=x(m*l);u[c+84>>2]=h*x(f-g);k=f;f=x(p*t);u[c+104>>2]=i*x(k-f);u[c+64>>2]=y*x(x(x(1)-f)-g);_k(c,j+(z<<6)|0,c- -64|0);b=j+(e<<6)|0;u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];u[b+16>>2]=u[c+16>>2];u[b+20>>2]=u[c+20>>2];u[b+24>>2]=u[c+24>>2];u[b+28>>2]=u[c+28>>2];u[b+32>>2]=u[c+32>>2];u[b+36>>2]=u[c+36>>2];u[b+40>>2]=u[c+40>>2];u[b+44>>2]=u[c+44>>2];u[b+48>>2]=u[c+48>>2];u[b+52>>2]=u[c+52>>2];u[b+56>>2]=u[c+56>>2];u[b+60>>2]=u[c+60>>2];d=d+1|0;if((F|0)==(d|0)){break j}b=q[E>>2];if(q[D>>2]-b>>1>>>0>d>>>0){continue}break}}break a}n=n+1|0;if((n|0)!=128){continue}break f}break}break a}J(8832,7192,2484,8776);G()}break a}n=1;while(1){m:{b=(n<<4)+a|0;D=b+1084|0;e=q[D>>2];E=b+1080|0;b=q[E>>2];d=e-b|0;if(!d){break m}n:{o:{if((b|0)!=(e|0)){e=b-e|0;e=((d|0)<(e|0)?e:d)>>>1|0;d=(d|0)>-1?d:-1;d=w(e,(d|0)<1?d:1);F=d>>>0>1?d:1;d=0;while(1){e=s[(d<<1)+b>>1];j=q[a+1036>>2];if(e>>>0>=q[a+1040>>2]-j>>2>>>0){break a}b=q[j+(e<<2)>>2];j=q[b+48>>2];p:{q:{if((j|0)!=q[b+64>>2]){f=u[b+52>>2];break q}f=u[b+52>>2];if(q[b+68>>2]!=q[b+52>>2]){break q}if(q[b+56>>2]==q[b+72>>2]){break p}}u[b+68>>2]=f;q[b+64>>2]=j;i=u[b+56>>2];u[b+72>>2]=i;u[c+8>>2]=i;u[c+4>>2]=f;q[c>>2]=j;en(c- -64|0,c);u[b>>2]=u[c+64>>2];u[b+4>>2]=u[c+68>>2];u[b+8>>2]=u[c+72>>2];u[b+12>>2]=u[c+76>>2]}j=q[a+3128>>2];A=q[a+3132>>2]-j>>6;if(A>>>0<=e>>>0){break a}z=s[b+138>>1];if((z|0)==32767){break o}if(z>>>0>=A>>>0){break n}i=u[b+40>>2];g=u[b+36>>2];l=u[b+24>>2];f=u[b>>2];p=u[b+4>>2];k=u[b+12>>2];m=u[b+8>>2];A=q[b+20>>2];H=q[b+16>>2];y=u[b+32>>2];u[c+76>>2]=y*x(0);q[c+112>>2]=H;q[c+116>>2]=A;q[c+124>>2]=1065353216;u[c+120>>2]=l;u[c+92>>2]=g*x(0);u[c+108>>2]=i*x(0);t=x(p+p);v=x(f*t);l=x(m+m);h=x(k*l);u[c+68>>2]=y*x(v+h);B=x(f*l);C=x(t*k);u[c+72>>2]=y*x(B-C);u[c+80>>2]=g*x(v-h);v=x(p*l);h=k;k=x(f+f);h=x(h*k);u[c+88>>2]=g*x(v+h);u[c+96>>2]=i*x(B+C);u[c+100>>2]=i*x(v-h);h=g;f=x(x(1)-x(f*k));g=x(m*l);u[c+84>>2]=h*x(f-g);k=f;f=x(p*t);u[c+104>>2]=i*x(k-f);u[c+64>>2]=y*x(x(x(1)-f)-g);jo(c,j+(z<<6)|0,c- -64|0);b=j+(e<<6)|0;u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];u[b+16>>2]=u[c+16>>2];u[b+20>>2]=u[c+20>>2];u[b+24>>2]=u[c+24>>2];u[b+28>>2]=u[c+28>>2];u[b+32>>2]=u[c+32>>2];u[b+36>>2]=u[c+36>>2];u[b+40>>2]=u[c+40>>2];u[b+44>>2]=u[c+44>>2];u[b+48>>2]=u[c+48>>2];u[b+52>>2]=u[c+52>>2];u[b+56>>2]=u[c+56>>2];u[b+60>>2]=u[c+60>>2];d=d+1|0;if((F|0)==(d|0)){break m}b=q[E>>2];if(q[D>>2]-b>>1>>>0>d>>>0){continue}break}}break a}J(8832,7192,2504,8776);G()}break a}n=n+1|0;if((n|0)!=128){continue}break}}o[a+3272|0]=r[a+3272|0]&247;Ii=c+144|0;return}J(12419,9962,479,9454);G()}function Gv(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0),n=x(0),p=0,r=0,s=0,t=x(0),v=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=x(0),H=x(0);g=Ii-304|0;Ii=g;q[g>>2]=0;C8(a);if(q[a+2124>>2]==q[a+2120>>2]){q[g+8>>2]=0;e=q[a+2040>>2];if((e|0)!=q[a+2044>>2]){h=q[a+2108>>2];i=q[a+2104>>2];q[g+32>>2]=e;e=h-i|0;f=e>>2;a:{b:{if((e|0)>=513){e=(f|0)<536870911?f:536870911;while(1){j=$i(e<<2);if(j){break b}e=e>>>1|0;if(e){continue}break}Pp(i,h,g+32|0,f,0,0);break a}Pp(i,h,g+32|0,f,0,0);break a}Pp(i,h,g+32|0,f,j,e);Ni(j)}e=q[a+2040>>2];q[g+32>>2]=e;f=q[a+2104>>2];PH(f,0,q[a+2108>>2]-f>>2,e,g+32|0,a,765)}}c:{d:{e:{if(!d){if(!(q[a+2136>>2]|q[a+2140>>2])){break e}q[a+2136>>2]=0;q[a+2140>>2]=0;d=q[a+2040>>2];e=q[a+2044>>2]-d|0;if(!e){break e}f=(e|0)/48|0;e=0;while(1){h=d+w(e,48)|0;q[h+36>>2]=q[h+36>>2]|16384;e=e+1|0;if((f|0)!=(e|0)){continue}break}break e}e=Wl(d,64);f=Li;if((e|0)==q[a+2136>>2]&(f|0)==q[a+2140>>2]){break e}q[a+2136>>2]=e;q[a+2140>>2]=f;R9(d,q[d+64>>2],g+32|0);q[g+24>>2]=0;f:{d=q[a+2040>>2];i=q[a+2044>>2];if((d|0)==(i|0)){break f}while(1){f=d;e=d;while(1){g:{if(e>>>0>=i>>>0){d=e;break g}d=e+48|0;if(i>>>0<=d>>>0){break g}h=e;j=q[e+36>>2];e=d;if(!((j^q[h+84>>2])&16320)){continue}}break}if(f>>>0>=i>>>0){break f}j=q[f+36>>2];h=j>>>6&255;e=q[a+2056>>2];if(h>>>0>=(q[a+2060>>2]-e|0)/12>>>0){break d}e=e+w(h,12)|0;h=q[e+4>>2];if(h){q[g+8>>2]=g+32;q[g+12>>2]=q[e+8>>2];q[g+16>>2]=f;q[g+20>>2]=(d-f|0)/48;Mi[h|0](g+8|0)}else{h=d-f|0;if(!h){continue}q[f+36>>2]=j|16384;e=1;if((h|0)==48){continue}h=(h|0)/48|0;while(1){j=f+w(e,48)|0;q[j+36>>2]=q[j+36>>2]|16384;e=e+1|0;if((h|0)!=(e|0)){continue}break}}continue}}}p=b?q[b+256>>2]:p;q[g+8>>2]=0;if(o[a+2100|0]&1){break c}d=q[a+2112>>2]-q[a+2104>>2]>>2;y=a+2088|0;A=a+2096|0;j=a+2092|0;Wi(d,4,y,A,j);q[j>>2]=q[a+2088>>2];if(o[a+2084|0]&1){break c}e=d;B=a+2072|0;d=a+2080|0;Wi(e,8,B,d,a+2076|0);h:{i:{s=q[a+2072>>2];e=q[d>>2]-s>>3;d=q[a+2108>>2]-q[a+2104>>2]>>2;if(e>>>0>=d>>>0){q[a+2076>>2]=s+(d<<3);z=q[a+2120>>2];e=q[a+2124>>2]-z|0;d=(e|0)/12|0;if(e){C=q[a+2040>>2];D=d>>>0>1?d:1;v=g+40|0;n=x(-3.4028234663852886e+38);t=x(3.4028234663852886e+38);while(1){i=w(k,12)+z|0;KH(a,q[i>>2],g+32|0);f=q[i+8>>2]&2147483647;q[i+8>>2]=f;j:{k:{if(p){d=EH(q[g+32>>2],v,p,b);f=q[i+8>>2];if(!d){break k}}l=0;h=q[i+4>>2];d=f&2147483647;if(h>>>0>>0){e=h;while(1){d=q[a+2104>>2];if(q[a+2108>>2]-d>>2>>>0<=e>>>0){break d}r=q[d+(e<<2)>>2];d=w(r,48)+C|0;E=q[d+36>>2];l:{if(!(E&16384)){l=l+1|0;break l}if((E&48)!=16){break l}m=u[d>>2];F=u[d+4>>2];H=u[d+8>>2];m=x(x(u[a+2376>>2]+x(x(x(m*u[a+2328>>2])+x(F*u[a+2344>>2]))+x(H*u[a+2360>>2])))/x(u[a+2380>>2]+x(x(x(m*u[a+2332>>2])+x(F*u[a+2348>>2]))+x(H*u[a+2364>>2]))));u[s+(r<<3)>>2]=m;n=n>2];h=q[i+4>>2]}e=e+1|0;d=f&2147483647;if(e>>>0>>0){continue}break}}if((d|0)!=(l|0)){break j}}q[i+8>>2]=f|-2147483648}k=k+1|0;if((D|0)!=(k|0)){continue}break}m=x(0);m=n>t?x(x(x(1)/x(n-t))*x(16777200)):m;k=0;while(1){p=w(k,12)+z|0;h=q[p+8>>2];m:{if((h|0)<0){break m}d=q[p+4>>2];if(d>>>0>=d+h>>>0){break m}e=d;while(1){f=q[a+2104>>2];if(q[a+2108>>2]-f>>2>>>0<=e>>>0){break d}v=q[f+(e<<2)>>2];l=w(v,48)+C|0;i=q[l+36>>2];if(i&16384){d=s+(v<<3)|0;r=q[d+4>>2]&-251658241;n=u[d>>2];f=(i>>>4&3)<<24;i=q[d>>2];q[d>>2]=i;f=f|r;q[d+4>>2]=f;h=d;r=f&-218103808;n:{if((q[l+36>>2]&48)==16){n=x(x(16777208)-x(m*x(n-t)));if(n=x(0)){f=~~n>>>0;break n}f=0;break n}f=q[l+24>>2]}q[h>>2]=i;f=f&16777215|r;q[h+4>>2]=f;r=f&67108863;h=q[l+36>>2]<<28;q[d>>2]=i;f=h|r;q[d+4>>2]=f;h=i&-16777216|q[l+28>>2]&16777215;q[d>>2]=h;f=f&-201326593;q[d+4>>2]=f;i=f&-201326593;f=q[l+36>>2];q[d>>2]=h&16777215|f<<18&-16777216;q[d+4>>2]=i;d=q[j>>2];if((d|0)==q[A>>2]){break i}q[j>>2]=d+4;q[d>>2]=v;h=q[p+8>>2];d=q[p+4>>2]}e=e+1|0;if(e>>>0<(h&2147483647)+d>>>0){continue}break}}k=k+1|0;if((D|0)!=(k|0)){continue}break}}if(q[j>>2]!=q[y>>2]){q[g+8>>2]=0;f=q[j>>2];h=q[y>>2];q[g+32>>2]=q[B>>2];e=f-h|0;d=e>>2;o:{p:{if((e|0)>=513){e=(d|0)<536870911?d:536870911;while(1){i=$i(e<<2);if(i){break p}e=e>>>1|0;if(e){continue}break}Op(h,f,g+32|0,d,0,0);break o}Op(h,f,g+32|0,d,0,0);break o}Op(h,f,g+32|0,d,i,e);Ni(i)}q[a+2024>>2]=q[a+2020>>2];e=0;q[g+52>>2]=0;q[g+44>>2]=0;q[g+48>>2]=0;q[g+36>>2]=0;q[g+40>>2]=0;q[g+32>>2]=a;q[g+8>>2]=0;d=q[a+2056>>2];f=q[a+2060>>2]-d|0;if(f){f=(f|0)/12|0;while(1){if(e>>>0>=f>>>0){break d}d=w(e,12)+d|0;q[g+36>>2]=q[d+8>>2];Mi[q[d>>2]](g+32|0);e=e+1|0;d=q[a+2056>>2];f=(q[a+2060>>2]-d|0)/12|0;if((e|0)!=(f|0)){continue}break}}q[g+40>>2]=1;h=q[a+2040>>2];q[g+44>>2]=h;d=q[a+2092>>2];f=q[a+2088>>2];q[g+8>>2]=0;d=d-f|0;if(d){i=d>>2;e=1;while(1){d=q[y>>2]+(e<<2)|0;j=h+w(q[f>>2],48)|0;k=q[j+36>>2];q:{r:{if(e>>>0>=i>>>0){break r}l=h+w(q[d>>2],48)|0;s=k^q[l+36>>2];if(s&16320|s&15){break r}if(q[j+28>>2]==q[l+28>>2]){break q}}k=k>>>6&255;if((k|0)!=255){j=q[a+2056>>2];if(k>>>0>=(q[a+2060>>2]-j|0)/12>>>0){break h}k=j+w(k,12)|0;j=q[k+8>>2];q[g+52>>2]=d;q[g+48>>2]=f;q[g+36>>2]=j;Mi[q[k>>2]](g+32|0)}f=d}e=e+1|0;if(i>>>0>=e>>>0){continue}break}}q[g+48>>2]=0;q[g+52>>2]=0;q[g+40>>2]=2;q[g+44>>2]=0;q[g+8>>2]=0;d=q[a+2056>>2];e=q[a+2060>>2]-d|0;if(e){f=(e|0)/12|0;e=0;while(1){if(e>>>0>=f>>>0){break d}d=w(e,12)+d|0;q[g+36>>2]=q[d+8>>2];Mi[q[d>>2]](g+32|0);e=e+1|0;d=q[a+2056>>2];f=(q[a+2060>>2]-d|0)/12|0;if((e|0)!=(f|0)){continue}break}}F8(a,b,c)}Ii=g+304|0;return}J(115295,115168,506,115314);G()}J(115236,115168,533,115260);G()}J(115003,114567,760,114938);G()}J(115322,115168,479,115333);G()}J(115093,115168,493,115224);G()}function Qya(){var a=0;q[213506]=0;q[213507]=0;q[213504]=0;q[213502]=198902;q[213501]=198893;q[213500]=0;q[213498]=0;q[213496]=0;q[213494]=0;q[213492]=1;q[213490]=0;q[213491]=3;q[213528]=853960;q[213526]=0;q[213524]=198902;q[213523]=198903;q[213522]=0;q[213520]=0;q[213518]=0;q[213516]=0;q[213514]=1;q[213512]=0;q[213513]=3;q[213508]=0;q[213509]=0;q[213510]=0;q[213511]=0;q[213533]=0;q[213531]=0;q[213532]=0;q[213529]=0;q[213530]=0;q[213536]=1;q[213538]=0;q[213540]=0;q[213542]=0;q[213544]=0;q[213545]=198922;q[213546]=198902;q[213548]=0;q[213550]=853960;q[213534]=0;q[213535]=3;q[213551]=0;q[213552]=0;q[213553]=0;q[213554]=0;q[213555]=0;q[213558]=1;q[213560]=0;q[213562]=0;q[213564]=0;q[213566]=0;q[213567]=198947;q[213568]=198902;q[213570]=0;q[213572]=853960;q[213556]=0;q[213557]=3;q[213577]=0;q[213575]=0;q[213576]=0;q[213573]=0;q[213574]=0;q[213594]=853960;q[213592]=0;q[213590]=198902;q[213589]=198961;q[213588]=0;q[213586]=0;q[213584]=0;q[213582]=0;q[213580]=1;q[213578]=0;q[213579]=3;q[213599]=0;q[213597]=0;q[213598]=0;q[213595]=0;q[213596]=0;q[213616]=853960;q[213614]=0;q[213612]=198902;q[213611]=198981;q[213610]=0;q[213608]=0;q[213606]=0;q[213604]=0;q[213602]=1;q[213600]=0;q[213601]=3;q[213621]=0;q[213619]=0;q[213620]=0;q[213617]=0;q[213618]=0;q[213638]=853960;q[213636]=0;q[213634]=198902;q[213633]=199004;q[213632]=0;q[213630]=0;q[213628]=0;q[213626]=0;q[213624]=1;q[213622]=0;q[213623]=3;q[213643]=0;q[213641]=0;q[213642]=0;q[213639]=0;q[213640]=0;q[213660]=853960;q[213658]=0;q[213656]=198902;q[213655]=199028;q[213654]=0;q[213652]=0;q[213650]=0;q[213648]=0;q[213646]=1;q[213644]=0;q[213645]=3;q[213665]=0;q[213663]=0;q[213664]=0;q[213661]=0;q[213662]=0;q[213682]=853960;q[213680]=0;q[213678]=198902;q[213677]=199045;q[213676]=0;q[213674]=0;q[213672]=0;q[213670]=0;q[213668]=1;q[213666]=0;q[213667]=3;q[213687]=0;q[213685]=0;q[213686]=0;q[213683]=0;q[213684]=0;q[213704]=853960;q[213702]=0;q[213700]=199094;q[213699]=199064;q[213698]=0;q[213696]=0;q[213694]=0;q[213692]=0;q[213690]=0;q[213688]=0;q[213689]=4;q[213709]=0;q[213707]=0;q[213708]=0;q[213705]=0;q[213706]=0;q[213710]=Oi(198902);q[213711]=Li;q[213712]=Oi(198902);q[213713]=Li;a=Oi(199122);o[854876]=255;q[213718]=0;q[213716]=a;q[213717]=Li;a=Oi(199131);o[854892]=0;q[213722]=0;q[213720]=a;q[213721]=Li;a=Oi(199142);o[854908]=1;q[213726]=0;q[213724]=a;q[213725]=Li;a=Oi(199153);o[854924]=2;q[213730]=0;q[213728]=a;q[213729]=Li;a=Oi(199164);o[854940]=3;q[213734]=0;q[213732]=a;q[213733]=Li;a=Oi(199175);o[854956]=255;q[213738]=1;q[213736]=a;q[213737]=Li;a=Oi(199184);o[854972]=0;q[213742]=1;q[213740]=a;q[213741]=Li;a=Oi(199195);o[854988]=1;q[213746]=1;q[213744]=a;q[213745]=Li;a=Oi(199206);o[855004]=2;q[213750]=1;q[213748]=a;q[213749]=Li;a=Oi(199217);o[855020]=3;q[213754]=1;q[213752]=a;q[213753]=Li;a=Oi(199228);o[855036]=255;q[213758]=2;q[213756]=a;q[213757]=Li;a=Oi(199234);o[855052]=0;q[213762]=2;q[213760]=a;q[213761]=Li;a=Oi(199242);o[855068]=1;q[213766]=2;q[213764]=a;q[213765]=Li;a=Oi(199250);o[855084]=2;q[213770]=2;q[213768]=a;q[213769]=Li;a=Oi(199258);o[855100]=3;q[213774]=2;q[213772]=a;q[213773]=Li;a=Oi(199266);o[855116]=255;q[213778]=3;q[213776]=a;q[213777]=Li;a=Oi(199272);o[855132]=0;q[213782]=3;q[213780]=a;q[213781]=Li;a=Oi(199280);o[855148]=1;q[213786]=3;q[213784]=a;q[213785]=Li;a=Oi(199288);o[855164]=2;q[213790]=3;q[213788]=a;q[213789]=Li;a=Oi(199296);o[855180]=3;q[213794]=3;q[213792]=a;q[213793]=Li;a=Oi(199304);o[855196]=255;q[213798]=4;q[213796]=a;q[213797]=Li;a=Oi(199309);o[855212]=0;q[213802]=4;q[213800]=a;q[213801]=Li;a=Oi(199316);o[855228]=1;q[213806]=4;q[213804]=a;q[213805]=Li;a=Oi(199323);o[855244]=2;q[213810]=4;q[213808]=a;q[213809]=Li;a=Oi(199330);o[855260]=3;q[213814]=4;q[213812]=a;q[213813]=Li;a=Oi(199337);o[855276]=255;q[213818]=5;q[213816]=a;q[213817]=Li;a=Oi(199345);o[855292]=0;q[213822]=5;q[213820]=a;q[213821]=Li;a=Oi(199355);o[855308]=1;q[213826]=5;q[213824]=a;q[213825]=Li;a=Oi(199365);o[855324]=2;q[213830]=5;q[213828]=a;q[213829]=Li;a=Oi(199375);o[855340]=3;q[213834]=5;q[213832]=a;q[213833]=Li;a=Oi(199385);o[855356]=255;q[213838]=6;q[213836]=a;q[213837]=Li;a=Oi(199392);o[855372]=0;q[213842]=6;q[213840]=a;q[213841]=Li;a=Oi(199401);o[855388]=1;q[213846]=6;q[213844]=a;q[213845]=Li;a=Oi(199410);o[855404]=2;q[213850]=6;q[213848]=a;q[213849]=Li;a=Oi(199419);o[855420]=3;q[213854]=6;q[213852]=a;q[213853]=Li;a=Oi(199428);o[855436]=255;q[213858]=7;q[213856]=a;q[213857]=Li;a=Oi(199435);o[855452]=0;q[213862]=7;q[213860]=a;q[213861]=Li;a=Oi(199444);o[855468]=1;q[213866]=7;q[213864]=a;q[213865]=Li;a=Oi(199453);o[855484]=2;q[213870]=7;q[213868]=a;q[213869]=Li;a=Oi(199462);o[855500]=3;q[213874]=7;q[213872]=a;q[213873]=Li;a=Oi(199471);o[855516]=0;q[213878]=8;q[213876]=a;q[213877]=Li;a=Oi(199484);o[855532]=1;q[213882]=8;q[213880]=a;q[213881]=Li;a=Oi(199495);o[855548]=0;q[213886]=9;q[213884]=a;q[213885]=Li;a=Oi(199503);o[855564]=1;q[213890]=9;q[213888]=a;q[213889]=Li;a=Oi(199122);o[855580]=255;q[213894]=0;q[213892]=a;q[213893]=Li;a=Oi(199175);o[855596]=255;q[213898]=1;q[213896]=a;q[213897]=Li;a=Oi(199228);o[855612]=255;q[213902]=2;q[213900]=a;q[213901]=Li;a=Oi(199266);o[855628]=255;q[213906]=3;q[213904]=a;q[213905]=Li;a=Oi(199304);o[855644]=255;q[213910]=4;q[213908]=a;q[213909]=Li;a=Oi(199337);o[855660]=255;q[213914]=5;q[213912]=a;q[213913]=Li;a=Oi(199385);o[855676]=255;q[213918]=6;q[213916]=a;q[213917]=Li;a=Oi(199512);o[855692]=255;q[213922]=7;q[213920]=a;q[213921]=Li}function cA(a,b,c,d,e){var f=0,g=x(0),h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),t=x(0),v=0,w=x(0),y=0,z=x(0),A=0,B=0,C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=x(0),N=x(0);f=Ii-1376|0;Ii=f;q[f+328>>2]=c;q[f+332>>2]=b;q[f+320>>2]=0;a:{b:{c:{b=q[a+1984>>2];d:{if((b|0)==q[a+1988>>2]){q[f>>2]=(b-q[a+1980>>2]|0)/288;Pi(3,112261,112468,f);break d}if(!d){wn(f+352|0,0);Cl(f+352|0,f+332|0,4);Cl(f+352|0,e+188|0,2);if(o[e+256|0]&1){Cl(f+352|0,e+220|0,36);c=q[f+328>>2]}if(c){Cl(f+352|0,f+328|0,4)}d=ro(f+352|0);v=Li}h=q[a+1972>>2];y=q[a+1964>>2];A=h-y|0;B=q[e+112>>2];b=hj(B);c=q[a+1968>>2];y=c-y|0;if(A>>>0<(b+y|0)+1>>>0){q[f+16>>2]=A;Pi(3,112261,112499,f+16|0);break d}if(b>>>0>h-c>>>0){break c}Ti(c,B,b);b=b+q[a+1968>>2]|0;q[a+1968>>2]=b;if((b|0)==q[a+1972>>2]){break a}q[a+1968>>2]=b+1;o[b|0]=0;c=f;b=q[f+328>>2];if(!b){b=q[q[f+332>>2]+16>>2]}q[c+328>>2]=b;vH(f+32|0);u[f+80>>2]=u[e>>2];u[f+84>>2]=u[e+4>>2];u[f+88>>2]=u[e+8>>2];u[f+92>>2]=u[e+12>>2];u[f+96>>2]=u[e+16>>2];u[f+100>>2]=u[e+20>>2];u[f+104>>2]=u[e+24>>2];u[f+108>>2]=u[e+28>>2];u[f+112>>2]=u[e+32>>2];u[f+116>>2]=u[e+36>>2];u[f+120>>2]=u[e+40>>2];u[f+124>>2]=u[e+44>>2];u[f+128>>2]=u[e+48>>2];u[f+132>>2]=u[e+52>>2];u[f+136>>2]=u[e+56>>2];u[f+140>>2]=u[e+60>>2];q[f+236>>2]=y;b=q[f+332>>2];q[f+208>>2]=b;q[f+268>>2]=-1;q[f+272>>2]=-1;q[f+224>>2]=d;q[f+228>>2]=v;q[f+212>>2]=q[f+328>>2];g=x(u[e+68>>2]*x(255));e:{if(g=x(0)){c=~~g>>>0;break e}c=0}c=c<<8;d=f;g=x(u[e+64>>2]*x(255));f:{if(g=x(0)){h=~~g>>>0;break f}h=0}h=h|c;g=x(u[e+72>>2]*x(255));g:{if(g=x(0)){c=~~g>>>0;break g}c=0}h=h|c<<16;g=x(x(u[e+76>>2]*u[b+84>>2])*x(255));h:{if(g=x(0)){c=~~g>>>0;break h}c=0}q[d+232>>2]=h|c<<24;g=x(u[e+84>>2]*x(255));i:{if(g=x(0)){c=~~g>>>0;break i}c=0}c=c<<8;d=f;g=x(u[e+80>>2]*x(255));j:{if(g=x(0)){h=~~g>>>0;break j}h=0}h=h|c;g=x(u[e+88>>2]*x(255));k:{if(g=x(0)){c=~~g>>>0;break k}c=0}h=h|c<<16;g=x(x(u[e+92>>2]*u[b+88>>2])*x(255));l:{if(g=x(0)){c=~~g>>>0;break l}c=0}q[d+240>>2]=h|c<<24;g=x(u[e+100>>2]*x(255));m:{if(g=x(0)){c=~~g>>>0;break m}c=0}c=c<<8;d=f;g=x(u[e+96>>2]*x(255));n:{if(g=x(0)){h=~~g>>>0;break n}h=0}h=h|c;g=x(u[e+104>>2]*x(255));o:{if(g=x(0)){c=~~g>>>0;break o}c=0}h=h|c<<16;g=x(x(u[e+108>>2]*u[b+92>>2])*x(255));p:{if(g=x(0)){c=~~g>>>0;break p}c=0}q[d+244>>2]=h|c<<24;p[f+248>>1]=s[e+188>>1];k=u[e+192>>2];u[f+252>>2]=k;u[f+256>>2]=u[e+196>>2];g=u[e+200>>2];u[f+260>>2]=g;i=u[e+204>>2];u[f+264>>2]=i;c=r[e+208|0];o[f+251|0]=c;d=r[e+216|0];v=r[e+212|0];h=q[e+240>>2];q[f+48>>2]=q[e+236>>2];q[f+52>>2]=h;h=q[e+248>>2];q[f+56>>2]=q[e+244>>2];q[f+60>>2]=h;q[f- -64>>2]=q[e+252>>2];h=q[e+224>>2];q[f+32>>2]=q[e+220>>2];q[f+36>>2]=h;h=q[e+232>>2];q[f+40>>2]=q[e+228>>2];q[f+44>>2]=h;o[f+308|0]=r[e+256|0]<<4&16|(d<<2&12|(r[f+308|0]&224|v&3));q[f+216>>2]=q[e+180>>2];q[f+220>>2]=q[e+184>>2];d=q[e+112>>2];l=u[b+64>>2];j=u[b+60>>2];q[f+336>>2]=b;n=i;i=x(j+l);u[f+340>>2]=n*i;b=q[f+340>>2];q[f+24>>2]=q[f+336>>2];q[f+28>>2]=b;l=x(g+x(-1));c=Ax(d,c?k:x(3.4028234663852886e+38),f+352|0,f+348|0,f+24|0,!c);j=x(c>>>0);m=x(g*i);g=x(0);k=u[f+252>>2];b=q[f+332>>2];q:{r:{s:{d=r[f+308|0];v=d&3;switch(v-1|0){case 1:break r;case 0:break s;default:break q}}g=x(k*x(.5));break q}g=k}w=x(l*i);z=x(m*j);k=u[b+60>>2];t=u[b+64>>2];i=x(k+t);l=u[f+260>>2];m=u[f+256>>2];t:{u:{switch((d>>>2&3)-1|0){case 0:j=x(x(x(m*x(.5))+x(x(x(x(i*l)*j)-x(i*x(l+x(-1))))*x(.5)))-k);break t;case 1:j=x(t+x(x(i*l)*x(c-1>>>0)));break t;default:break u}}j=x(m-k)}i=x(z-w);l=u[f+348>>2];v:{w:{switch(v|0){case 0:g=x(x(l*x(.5))+g);break v;case 2:break w;default:break v}}g=x(g+x(i*x(-.5)))}m=u[f+136>>2];w=u[f+88>>2];k=x(k+j);j=x(i*x(.5));k=x(k-j);z=u[f+104>>2];t=x(u[f+120>>2]*x(0));C=x(m+x(x(x(g*w)+x(k*z))+t));u[f+296>>2]=C;D=u[f+132>>2];E=u[f+84>>2];F=u[f+100>>2];H=x(u[f+116>>2]*x(0));I=x(D+x(x(x(g*E)+x(k*F))+H));u[f+292>>2]=I;i=u[f+128>>2];K=u[f+80>>2];L=u[f+96>>2];M=x(u[f+112>>2]*x(0));N=x(i+x(x(x(g*K)+x(k*L))+M));u[f+288>>2]=N;n=i;i=x(x(l*x(.5))+g);l=x(j+k);j=x(x(n+x(x(x(K*i)+x(L*l))+M))-N);n=x(j*j);j=x(x(D+x(x(x(i*E)+x(l*F))+H))-I);n=x(n+x(j*j));j=x(x(m+x(x(x(i*w)+x(l*z))+t))-C);w=x(n+x(j*j));j=u[f+140>>2];n=i;i=u[f+92>>2];t=l;l=u[f+108>>2];m=x(u[f+124>>2]*x(0));g=x(x(j+x(x(x(n*i)+x(t*l))+m))-x(j+x(x(x(g*i)+x(k*l))+m)));u[f+304>>2]=w+x(g*g);b=r[e+190|0];if(b>>>0>=17){break b}o[f+250|0]=b;c=Ti(f+144|0,e+116|0,b<<2);b=q[a+1984>>2];if((b|0)==q[a+1988>>2]){break a}q[a+1984>>2]=b+288;q[b+32>>2]=q[f- -64>>2];a=q[f+60>>2];q[b+24>>2]=q[f+56>>2];q[b+28>>2]=a;a=q[f+52>>2];q[b+16>>2]=q[f+48>>2];q[b+20>>2]=a;a=q[f+44>>2];q[b+8>>2]=q[f+40>>2];q[b+12>>2]=a;a=q[f+36>>2];q[b>>2]=q[f+32>>2];q[b+4>>2]=a;u[b+48>>2]=u[f+80>>2];u[b+52>>2]=u[f+84>>2];u[b+56>>2]=u[f+88>>2];u[b+60>>2]=u[f+92>>2];u[b- -64>>2]=u[f+96>>2];u[b+68>>2]=u[f+100>>2];u[b+72>>2]=u[f+104>>2];u[b+76>>2]=u[f+108>>2];u[b+80>>2]=u[f+112>>2];u[b+84>>2]=u[f+116>>2];u[b+88>>2]=u[f+120>>2];u[b+92>>2]=u[f+124>>2];u[b+96>>2]=u[f+128>>2];u[b+100>>2]=u[f+132>>2];u[b+104>>2]=u[f+136>>2];u[b+108>>2]=u[f+140>>2];Ti(b+112|0,c,132);u[b+256>>2]=u[f+288>>2];u[b+260>>2]=u[f+292>>2];u[b+264>>2]=u[f+296>>2];q[b+272>>2]=q[f+304>>2];o[b+276|0]=r[f+308|0]}Ii=f+1376|0;return}J(113538,112895,540,113567);G()}J(112581,112648,611,112459);G()}J(113509,112895,533,113533);G()}function FN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=Ii-16|0;Ii=c;d=1;a:{b:{switch(b-a>>4){case 2:if(q[b-8>>2]<=q[a+8>>2]){break a}e=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=e;e=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=e;b=b-16|0;f=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=f;f=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=f;a=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=a;a=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=a;break a;case 3:e=b-16|0;g=b-8|0;b=q[g>>2];f=q[a+24>>2];if((f|0)<=q[a+8>>2]){if((b|0)<=(f|0)){break a}b=q[a+28>>2];q[c+8>>2]=q[a+24>>2];q[c+12>>2]=b;b=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=b;b=q[e+12>>2];q[a+24>>2]=q[e+8>>2];q[a+28>>2]=b;b=q[e+4>>2];q[a+16>>2]=q[e>>2];q[a+20>>2]=b;b=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=b;b=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=b;if(q[a+24>>2]<=q[a+8>>2]){break a}b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[a+28>>2];q[a+8>>2]=q[a+24>>2];q[a+12>>2]=b;b=q[a+20>>2];q[a>>2]=q[a+16>>2];q[a+4>>2]=b;b=q[c+12>>2];q[a+24>>2]=q[c+8>>2];q[a+28>>2]=b;b=q[c+4>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=b;break a}if((b|0)>(f|0)){b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[e+12>>2];q[a+8>>2]=q[e+8>>2];q[a+12>>2]=b;b=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=b;a=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=a;a=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=a;break a}b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[a+28>>2];q[a+8>>2]=q[a+24>>2];q[a+12>>2]=b;b=q[a+20>>2];q[a>>2]=q[a+16>>2];q[a+4>>2]=b;b=q[c+12>>2];q[a+24>>2]=q[c+8>>2];q[a+28>>2]=b;b=q[c+4>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=b;if(q[g>>2]<=q[a+24>>2]){break a}b=q[a+28>>2];q[c+8>>2]=q[a+24>>2];q[c+12>>2]=b;b=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=b;b=q[e+12>>2];q[a+24>>2]=q[e+8>>2];q[a+28>>2]=b;b=q[e+4>>2];q[a+16>>2]=q[e>>2];q[a+20>>2]=b;a=q[c+12>>2];q[e+8>>2]=q[c+8>>2];q[e+12>>2]=a;a=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=a;break a;case 4:Zr(a,a+16|0,a+32|0,b-16|0);break a;case 5:Zr(a,a+16|0,a+32|0,a+48|0);if(q[b-8>>2]<=q[a+56>>2]){break a}e=q[a+60>>2];q[c+8>>2]=q[a+56>>2];q[c+12>>2]=e;e=q[a+52>>2];q[c>>2]=q[a+48>>2];q[c+4>>2]=e;b=b-16|0;f=q[b+12>>2];q[a+56>>2]=q[b+8>>2];q[a+60>>2]=f;f=q[b+4>>2];q[a+48>>2]=q[b>>2];q[a+52>>2]=f;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;if(q[a+56>>2]<=q[a+40>>2]){break a}b=q[a+44>>2];q[c+8>>2]=q[a+40>>2];q[c+12>>2]=b;b=q[a+36>>2];q[c>>2]=q[a+32>>2];q[c+4>>2]=b;b=q[a+60>>2];q[a+40>>2]=q[a+56>>2];q[a+44>>2]=b;b=q[a+52>>2];q[a+32>>2]=q[a+48>>2];q[a+36>>2]=b;b=q[c+12>>2];q[a+56>>2]=q[c+8>>2];q[a+60>>2]=b;b=q[c+4>>2];q[a+48>>2]=q[c>>2];q[a+52>>2]=b;if(q[a+40>>2]<=q[a+24>>2]){break a}b=q[a+28>>2];q[c+8>>2]=q[a+24>>2];q[c+12>>2]=b;b=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=b;b=q[a+44>>2];q[a+24>>2]=q[a+40>>2];q[a+28>>2]=b;b=q[a+36>>2];q[a+16>>2]=q[a+32>>2];q[a+20>>2]=b;b=q[c+12>>2];q[a+40>>2]=q[c+8>>2];q[a+44>>2]=b;b=q[c+4>>2];q[a+32>>2]=q[c>>2];q[a+36>>2]=b;if(q[a+24>>2]<=q[a+8>>2]){break a}b=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=q[a+28>>2];q[a+8>>2]=q[a+24>>2];q[a+12>>2]=b;b=q[a+20>>2];q[a>>2]=q[a+16>>2];q[a+4>>2]=b;b=q[c+12>>2];q[a+24>>2]=q[c+8>>2];q[a+28>>2]=b;b=q[c+4>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=b;break a;case 0:case 1:break a;default:break b}}f=a+32|0;g=q[a+40>>2];d=q[a+24>>2];e=q[a+8>>2];c:{if((d|0)<=(e|0)){if((d|0)>=(g|0)){break c}h=q[a+28>>2];g=c+8|0;d=g;q[d>>2]=q[a+24>>2];q[d+4>>2]=h;d=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=d;d=q[f+12>>2];q[a+24>>2]=q[f+8>>2];q[a+28>>2]=d;d=q[f+4>>2];q[a+16>>2]=q[f>>2];q[a+20>>2]=d;d=q[g+4>>2];q[f+8>>2]=q[g>>2];q[f+12>>2]=d;d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d;if((e|0)>=q[a+24>>2]){break c}d=q[a+12>>2];q[g>>2]=q[a+8>>2];q[g+4>>2]=d;d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;d=q[a+28>>2];q[a+8>>2]=q[a+24>>2];q[a+12>>2]=d;d=q[a+20>>2];q[a>>2]=q[a+16>>2];q[a+4>>2]=d;d=q[g+4>>2];q[a+24>>2]=q[g>>2];q[a+28>>2]=d;d=q[c+4>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=d;break c}if((d|0)<(g|0)){g=a+8|0;d=g;e=q[d+4>>2];q[c+8>>2]=q[d>>2];q[c+12>>2]=e;d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;d=q[f+12>>2];q[g>>2]=q[f+8>>2];q[g+4>>2]=d;d=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=d;d=q[c+12>>2];q[f+8>>2]=q[c+8>>2];q[f+12>>2]=d;d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d;break c}d=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=d;d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;d=q[a+28>>2];q[a+8>>2]=q[a+24>>2];q[a+12>>2]=d;d=q[a+20>>2];q[a>>2]=q[a+16>>2];q[a+4>>2]=d;d=q[c+12>>2];q[a+24>>2]=q[c+8>>2];q[a+28>>2]=d;d=q[c+4>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=d;if(q[a+24>>2]>=(g|0)){break c}d=q[a+28>>2];q[c+8>>2]=q[a+24>>2];q[c+12>>2]=d;d=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=d;g=f+8|0;d=g;e=q[d+4>>2];q[a+24>>2]=q[d>>2];q[a+28>>2]=e;d=q[f+4>>2];q[a+16>>2]=q[f>>2];q[a+20>>2]=d;d=q[c+12>>2];q[g>>2]=q[c+8>>2];q[g+4>>2]=d;d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d}d:{e:{d=a+48|0;if((d|0)==(b|0)){break e}while(1){f:{e=d;h=q[d+8>>2];if((h|0)>q[f+8>>2]){j=q[e+12>>2];k=q[e>>2];l=q[e+4>>2];g=e;while(1){g:{d=f;f=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=f;f=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=f;if((a|0)==(d|0)){d=a;break g}f=d-16|0;g=d;if(q[d-8>>2]<(h|0)){continue}}break}q[d+12>>2]=j;q[d+8>>2]=h;q[d>>2]=k;q[d+4>>2]=l;i=i+1|0;if((i|0)==8){break f}}f=e;d=e+16|0;if((d|0)!=(b|0)){continue}break e}break}g=(e+16|0)==(b|0);a=0;break d}a=1}d=a|g}Ii=c+16|0;return d&1}function Fwa(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,t=0,u=0,v=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0;g=Ii+ -64|0;Ii=g;W=d-1|0;k=W;k=k?32-z(k)|0:0;X=e-1|0;j=X;j=j?32-z(j)|0:0;aa=j>>>0>k>>>0?k:j;if((e|0)>=1){ba=aa<<1;Xa=-1<>2];D=Bn(j);H=An(j);j=q[Y>>2];I=Bn(j);f=An(j);j=q[ca+Y>>2];Bn(j);An(j);Z=(w(o&X,d)<<2)+b|0;j=q[k+Z>>2];u=Bn(j);v=An(j);j=q[Z>>2];l=Bn(j);h=An(j);j=q[ca+Z>>2];Bn(j);An(j);oa=o+1|0;_=(w(oa&X,d)<<2)+b|0;k=q[k+_>>2];p=Bn(k);n=An(k);k=q[_>>2];A=Bn(k);E=An(k);k=q[ca+_>>2];Bn(k);An(k);if((d|0)>=1){Ya=s[((o&255)<<1)+109104>>1]|s[(o>>>7&33554430)+109104>>1]<<16;Za=o>>>aa<>>0)/31|0;D=(w(H,255)>>>0)/31|0;t=(w(I,255)>>>0)/31|0;y=(w(f,255)>>>0)/31|0;o=(w(u,255)>>>0)/31|0;k=(w(v,255)>>>0)/31|0;v=(w(l,255)>>>0)/31|0;l=(w(h,255)>>>0)/31|0;H=(w(p,255)>>>0)/31|0;I=(w(n,255)>>>0)/31|0;p=(w(A,255)>>>0)/31|0;n=(w(E,255)>>>0)/31|0;E=0;while(1){h=j;j=t;f=o;o=v;v=D;D=y;u=k;k=l;A=H;H=p;p=I;I=n;Aq((da<<4)+a|0,g);y=s[(E>>>7&33554430)+109104>>1]<<17|Ya|s[((E&255)<<1)+109104>>1]<<1;n=y;a:{if((d|0)==(e|0)){break a}y=y&Xa;n=y|E>>>aa<>>0>e>>>0){break a}n=y|Za}pa=(n<<3)+c|0;q[pa+4>>2]=q[(da<<2)+b>>2];E=E+1|0;l=(W&E)<<2;t=q[l+Y>>2];y=Bn(t);n=An(t);t=q[l+Z>>2];U=Bn(t);x=An(t);l=q[l+_>>2];V=Bn(l);$=An(l);l=w(o,6);M=l+w(j,6)|0;B=M+(f+h<<1)|0;t=(r[g+6|0]+(r[g+5|0]+r[g+4|0]|0)<<4)-B<<4;C=0-t|0;i=t;t=w(k,6);F=t+w(D,6)|0;qa=F+(u+v<<1)|0;ra=(qa|0)<(B|0);m=ra?C:i;J=f+o|0;N=h+j|0;ea=J+N<<2;O=(r[g+2|0]+(r[g+1|0]+r[g|0]|0)<<4)-ea<<4;K=k+u|0;P=v+D|0;sa=K+P<<2;ta=(sa|0)<(ea|0);O=ta?0-O|0:O;fa=l+(w(f,6)+(N<<1)|0)|0;l=(r[g+18|0]+(r[g+17|0]+r[g+16|0]|0)<<4)-fa<<4;ua=t+(w(u,6)+(P<<1)|0)|0;va=(ua|0)<(fa|0);N=va?0-l|0:l;G=w(j,3);L=w(o,9);Q=L+w(f,3)|0;ga=G+(Q+h|0)|0;l=(r[g+22|0]+(r[g+21|0]+r[g+20|0]|0)<<4)-ga<<4;R=w(D,3);S=w(k,9);T=S+w(u,3)|0;wa=R+(T+v|0)|0;xa=(wa|0)<(ga|0);h=xa?0-l|0:l;ha=j+o<<3;v=(r[g+10|0]+(r[g+9|0]+r[g+8|0]|0)<<4)-ha<<4;ya=k+D<<3;za=(ya|0)<(ha|0);P=za?0-v|0:v;t=(w(y,255)>>>0)/31|0;v=(w(U,255)>>>0)/31|0;ia=(M+(t<<1)|0)+(v<<1)|0;l=(r[g+14|0]+(r[g+13|0]+r[g+12|0]|0)<<4)-ia<<4;C=0-l|0;i=l;y=(w(n,255)>>>0)/31|0;l=(w(x,255)>>>0)/31|0;Aa=(F+(y<<1)|0)+(l<<1)|0;Ba=(Aa|0)<(ia|0);U=Ba?C:i;n=w(o,12);ja=n+(j<<2)|0;x=(r[g+26|0]+(r[g+25|0]+r[g+24|0]|0)<<4)-ja<<4;C=0-x|0;i=x;x=w(k,12);Ca=x+(D<<2)|0;Da=Ca>>>0>>0;M=Da?C:i;C=w(v,3);ka=C+((G+L|0)+t|0)|0;F=(r[g+30|0]+(r[g+29|0]+r[g+28|0]|0)<<4)-ka<<4;Ea=w(l,3);Fa=Ea+((S+R|0)+y|0)|0;Ga=(Fa|0)<(ka|0);F=Ga?0-F|0:F;R=J<<3;G=(r[g+34|0]+(r[g+33|0]+r[g+32|0]|0)<<4)-R<<4;Ha=K<<3;Ia=(Ha|0)<(R|0);G=Ia?0-G|0:G;la=n+(f<<2)|0;f=(r[g+38|0]+(r[g+37|0]+r[g+36|0]|0)<<4)-la<<4;Ja=x+(u<<2)|0;Ka=(Ja|0)<(la|0);f=Ka?0-f|0:f;ma=(w(J,6)+(A<<1)|0)+(H<<1)|0;u=(r[g+50|0]+(r[g+49|0]+r[g+48|0]|0)<<4)-ma<<4;La=(w(K,6)+(p<<1)|0)+(I<<1)|0;Ma=(La|0)<(ma|0);u=Ma?0-u|0:u;i=w(H,3);Q=i+(A+Q|0)|0;A=(r[g+54|0]+(r[g+53|0]+r[g+52|0]|0)<<4)-Q<<4;Na=w(I,3);Oa=Na+(p+T|0)|0;Pa=(Oa|0)<(Q|0);A=Pa?0-A|0:A;p=r[g+42|0]+(r[g+41|0]+(r[g+40|0]-o|0)|0)<<8;Qa=k<<4;Ra=o<<4;Sa=Qa>>>0>>0;J=Sa?0-p|0:p;T=n+(v<<2)|0;p=(r[g+46|0]+(r[g+45|0]+r[g+44|0]|0)<<4)-T<<4;Ta=x+(l<<2)|0;Ua=Ta>>>0>>0;K=Ua?0-p|0:p;na=n+(H<<2)|0;p=(r[g+58|0]+(r[g+57|0]+r[g+56|0]|0)<<4)-na<<4;Va=x+(I<<2)|0;Wa=Va>>>0>>0;x=Wa?0-p|0:p;p=(w(V,255)>>>0)/31|0;V=i+(p+(L+C|0)|0)|0;n=(r[g+62|0]+(r[g+61|0]+r[g+60|0]|0)<<4)-V<<4;C=0-n|0;i=n;n=(w($,255)>>>0)/31|0;S=Na+(n+(S+Ea|0)|0)|0;$=(S|0)<(V|0);L=$?C:i;B=qa-B|0;B=ra?0-B|0:B;i=(m|0)>(w(B,13)|0)?12:(m|0)>B<<3?8:((m|0)>(w(B,3)|0))<<2;m=sa-ea|0;m=ta?0-m|0:m;i=i|((O|0)>(w(m,13)|0)?3:(O|0)>m<<3?2:(O|0)>(w(m,3)|0));m=ua-fa|0;m=va?0-m|0:m;i=i|((N|0)>(w(m,13)|0)?768:(N|0)>m<<3?512:((N|0)>(w(m,3)|0))<<8);m=wa-ga|0;m=xa?0-m|0:m;i=i|((h|0)>(w(m,13)|0)?3072:(h|0)>m<<3?2048:((h|0)>(w(m,3)|0))<<10);h=ya-ha|0;h=za?0-h|0:h;i=i|((P|0)>(w(h,13)|0)?48:(P|0)>h<<3?32:((P|0)>(w(h,3)|0))<<4);h=Aa-ia|0;h=Ba?0-h|0:h;i=i|((U|0)>(w(h,13)|0)?192:(U|0)>h<<3?128:((U|0)>(w(h,3)|0))<<6);h=Ca-ja|0;h=Da?0-h|0:h;i=i|((M|0)>(w(h,13)|0)?12288:(M|0)>h<<3?8192:((M|0)>(w(h,3)|0))<<12);h=Fa-ka|0;h=Ga?0-h|0:h;i=i|((F|0)>(w(h,13)|0)?49152:(F|0)>h<<3?32768:((F|0)>(w(h,3)|0))<<14);h=Ha-R|0;h=Ia?0-h|0:h;i=i|((G|0)>(w(h,13)|0)?196608:(G|0)>h<<3?131072:((G|0)>(w(h,3)|0))<<16);h=Ja-la|0;h=Ka?0-h|0:h;i=i|((f|0)>(w(h,13)|0)?786432:(f|0)>h<<3?524288:((f|0)>(w(h,3)|0))<<18);f=La-ma|0;f=Ma?0-f|0:f;i=i|((u|0)>(w(f,13)|0)?50331648:(u|0)>f<<3?33554432:((u|0)>(w(f,3)|0))<<24);f=Oa-Q|0;f=Pa?0-f|0:f;i=i|((A|0)>(w(f,13)|0)?201326592:(A|0)>f<<3?134217728:((A|0)>(w(f,3)|0))<<26);f=Qa-Ra|0;f=Sa?0-f|0:f;i=i|((J|0)>(w(f,13)|0)?3145728:(J|0)>f<<3?2097152:((J|0)>(w(f,3)|0))<<20);f=Ta-T|0;f=Ua?0-f|0:f;i=i|((K|0)>(w(f,13)|0)?12582912:(K|0)>f<<3?8388608:((K|0)>(w(f,3)|0))<<22);f=Va-na|0;f=Wa?0-f|0:f;i=i|((x|0)>(w(f,13)|0)?805306368:(x|0)>f<<3?536870912:((x|0)>(w(f,3)|0))<<28);f=S-V|0;f=$?0-f|0:f;q[pa>>2]=i|((L|0)>(w(f,13)|0)?-1073741824:(L|0)>f<<3?-2147483648:((L|0)>(w(f,3)|0))<<30);da=da+1|0;if((d|0)!=(E|0)){continue}break}}o=oa;if((o|0)!=(e|0)){continue}break}}Ii=g- -64|0}function TK(a,b,c,d){var e=0,f=0,g=0,h=0,i=x(0),j=x(0);e=Ii-464|0;Ii=e;h=nj(e+440|0,a,0,73366,565);i=x(1);a:{b:{switch(b-1|0){case 0:i=x(0);break a;case 1:o[e+429|0]=0;o[e+430|0]=0;o[e+431|0]=0;o[e+432|0]=0;o[e+433|0]=0;o[e+434|0]=0;o[e+435|0]=0;o[e+436|0]=0;q[e+424>>2]=0;q[e+428>>2]=0;break a;case 2:o[e+429|0]=0;o[e+430|0]=0;o[e+431|0]=0;o[e+432|0]=0;o[e+433|0]=0;o[e+434|0]=0;o[e+435|0]=0;o[e+436|0]=0;q[e+424>>2]=0;q[e+428>>2]=0;q[e+412>>2]=0;o[e+415|0]=0;o[e+416|0]=0;o[e+417|0]=0;o[e+418|0]=0;j=x(1);break a;case 3:break b;default:break a}}i=x(0)}o[d|0]=0;f=r[e+437|0]|r[e+438|0]<<8;o[d+1|0]=f;o[d+2|0]=f>>>8;o[d+3|0]=r[e+439|0];u[d+12>>2]=j;q[d+8>>2]=0;u[d+4>>2]=i;f=q[e+428>>2];q[d+16>>2]=q[e+424>>2];q[d+20>>2]=f;f=r[e+433|0]|r[e+434|0]<<8|(r[e+435|0]<<16|r[e+436|0]<<24);g=r[e+429|0]|r[e+430|0]<<8|(r[e+431|0]<<16|r[e+432|0]<<24);o[d+21|0]=g;o[d+22|0]=g>>>8;o[d+23|0]=g>>>16;o[d+24|0]=g>>>24;o[d+25|0]=f;o[d+26|0]=f>>>8;o[d+27|0]=f>>>16;o[d+28|0]=f>>>24;o[d+33|0]=0;o[d+29|0]=0;o[d+30|0]=0;o[d+31|0]=0;o[d+32|0]=0;f=q[e+416>>2];g=q[e+412>>2];p[d+34>>1]=g;p[d+36>>1]=g>>>16;p[d+38>>1]=f;p[d+40>>1]=f>>>16;p[d+42>>1]=s[e+420>>1];q[d+44>>2]=0;q[d+48>>2]=0;f=Vi(a,c);c:{if(f+1>>>0<2){break c}if((f|0)!=5){q[e+400>>2]=c;Kj(h,74411,e+400|0);break c}Zi(a,c,74477);f=Vi(a,-1);d:{if(f+1>>>0>=2){if((f|0)!=1){q[e+388>>2]=q[64209];q[e+384>>2]=74477;if(!Qi(a,74890,e+384|0)){break d}}o[d|0]=(Uj(a,-1)|0)!=0}Ri(a,-2)}e:{switch(b|0){case 0:Zi(a,c,74495);b=Vi(a,-1);f:{if(b+1>>>0>=2){if((b|0)!=3){q[e+52>>2]=q[64211];q[e+48>>2]=74495;if(!Qi(a,74890,e+48|0)){break f}}u[d+4>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74502);b=Vi(a,-1);g:{if(b+1>>>0>=2){if((b|0)!=3){q[e+36>>2]=q[64211];q[e+32>>2]=74502;if(!Qi(a,74890,e+32|0)){break g}}u[d+8>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74512);b=Vi(a,-1);if(b+1>>>0<=1){Ri(a,-2);break c}if((b|0)!=3){q[e+20>>2]=q[64211];q[e+16>>2]=74512;if(!Qi(a,74890,e+16|0)){break c}}u[d+12>>2]=Mj(a,-1);Ri(a,-2);break c;case 1:Zi(a,c,74520);b=Vi(a,-1);if(b+1>>>0<=1){Ri(a,-2);break c}if((b|0)!=3){q[e+68>>2]=q[64211];q[e+64>>2]=74520;if(!Qi(a,74890,e- -64|0)){break c}}u[d+4>>2]=Mj(a,-1);Ri(a,-2);break c;case 2:Zi(a,c,74531);b=Vi(a,-1);h:{if(b+1>>>0>=2){if((b|0)!=3){q[e+180>>2]=q[64211];q[e+176>>2]=74531;if(!Qi(a,74890,e+176|0)){break h}}u[d+12>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74547);b=Vi(a,-1);i:{if(b+1>>>0>=2){if((b|0)!=3){q[e+164>>2]=q[64211];q[e+160>>2]=74547;if(!Qi(a,74890,e+160|0)){break i}}u[d+16>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74559);b=Vi(a,-1);j:{if(b+1>>>0>=2){if((b|0)!=3){q[e+148>>2]=q[64211];q[e+144>>2]=74559;if(!Qi(a,74890,e+144|0)){break j}}u[d+20>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74571);b=Vi(a,-1);k:{if(b+1>>>0>=2){if((b|0)!=3){q[e+132>>2]=q[64211];q[e+128>>2]=74571;if(!Qi(a,74890,e+128|0)){break k}}u[d+24>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74588);b=Vi(a,-1);l:{if(b+1>>>0>=2){if((b|0)!=3){q[e+116>>2]=q[64211];q[e+112>>2]=74588;if(!Qi(a,74890,e+112|0)){break l}}u[d+28>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74600);b=Vi(a,-1);m:{if(b+1>>>0>=2){if((b|0)!=1){q[e+100>>2]=q[64209];q[e+96>>2]=74600;if(!Qi(a,74890,e+96|0)){break m}}o[d+32|0]=(Uj(a,-1)|0)!=0}Ri(a,-2)}Zi(a,c,74613);b=Vi(a,-1);n:{if(b+1>>>0>=2){if((b|0)!=1){q[e+84>>2]=q[64209];q[e+80>>2]=74613;if(!Qi(a,74890,e+80|0)){break n}}o[d+33|0]=(Uj(a,-1)|0)!=0}Ri(a,-2)}if(u[d+16>>2]>u[d+20>>2]^1){break c}Qi(a,74626,0);break c;case 3:Zi(a,c,74695);b=Vi(a,-1);o:{if(b+1>>>0<=1){Ri(a,-2);break o}if((b|0)!=7){q[e+324>>2]=q[64215];q[e+320>>2]=74695;if(!Qi(a,74890,e+320|0)){break o}}b=Om(a,-1);if(!b){Ri(a,-2);q[e+304>>2]=74695;Qi(a,74940,e+304|0);break o}u[d+12>>2]=u[b>>2];u[d+16>>2]=u[b+4>>2];u[d+20>>2]=u[b+8>>2];Ri(a,-2)}Zi(a,c,74531);b=Vi(a,-1);p:{if(b+1>>>0>=2){if((b|0)!=3){q[e+292>>2]=q[64211];q[e+288>>2]=74531;if(!Qi(a,74890,e+288|0)){break p}}u[d+24>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74600);b=Vi(a,-1);q:{if(b+1>>>0>=2){if((b|0)!=1){q[e+276>>2]=q[64209];q[e+272>>2]=74600;if(!Qi(a,74890,e+272|0)){break q}}o[d+28|0]=(Uj(a,-1)|0)!=0}Ri(a,-2)}Zi(a,c,74708);b=Vi(a,-1);r:{if(b+1>>>0>=2){if((b|0)!=3){q[e+260>>2]=q[64211];q[e+256>>2]=74708;if(!Qi(a,74890,e+256|0)){break r}}u[d+32>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74726);b=Vi(a,-1);s:{if(b+1>>>0>=2){if((b|0)!=3){q[e+244>>2]=q[64211];q[e+240>>2]=74726;if(!Qi(a,74890,e+240|0)){break s}}u[d+36>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74613);b=Vi(a,-1);t:{if(b+1>>>0>=2){if((b|0)!=1){q[e+228>>2]=q[64209];q[e+224>>2]=74613;if(!Qi(a,74890,e+224|0)){break t}}o[d+40|0]=(Uj(a,-1)|0)!=0}Ri(a,-2)}Zi(a,c,74744);b=Vi(a,-1);u:{if(b+1>>>0>=2){if((b|0)!=3){q[e+212>>2]=q[64211];q[e+208>>2]=74744;if(!Qi(a,74890,e+208|0)){break u}}u[d+44>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74588);b=Vi(a,-1);v:{if(b+1>>>0>=2){if((b|0)!=3){q[e+196>>2]=q[64211];q[e+192>>2]=74588;if(!Qi(a,74890,e+192|0)){break v}}u[d+48>>2]=Mj(a,-1)}Ri(a,-2)}if(u[d+32>>2]>u[d+36>>2]^1){break c}Qi(a,74760,0);break c;case 4:Zi(a,c,74531);b=Vi(a,-1);w:{if(b+1>>>0>=2){if((b|0)!=3){q[e+372>>2]=q[64211];q[e+368>>2]=74531;if(!Qi(a,74890,e+368|0)){break w}}u[d+4>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74502);b=Vi(a,-1);x:{if(b+1>>>0>=2){if((b|0)!=3){q[e+356>>2]=q[64211];q[e+352>>2]=74502;if(!Qi(a,74890,e+352|0)){break x}}u[d+8>>2]=Mj(a,-1)}Ri(a,-2)}Zi(a,c,74512);b=Vi(a,-1);if(b+1>>>0<=1){Ri(a,-2);break c}if((b|0)!=3){q[e+340>>2]=q[64211];q[e+336>>2]=74512;if(!Qi(a,74890,e+336|0)){break c}}u[d+12>>2]=Mj(a,-1);Ri(a,-2);break c;default:break e}}q[e>>2]=b;Kj(h,74841,e)}mj(h);Ii=e+464|0}function Z$(a,b,c,d,e,f){a=a|0;b=+b;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;l=Ii-560|0;Ii=l;q[l+44>>2]=0;Oza(+b);g=Lza(1)|0;Lza(0)|0;a:{if((g|0)<-1?1:(g|0)<=-1){B=1;b=-b;Oza(+b);g=Lza(1)|0;Lza(0)|0;u=214752;break a}B=1;u=214755;if(e&2048){break a}u=214758;if(e&1){break a}B=0;A=1;u=214753}b:{if((g&2146435072)==2146435072){k=B+3|0;xm(a,32,c,k,e&-65537);_l(a,u,B);d=f&32;_l(a,b!=b?d?214779:214783:d?214771:214775,3);break b}v=l+16|0;c:{d:{e:{b=Zy(b,l+44|0);b=b+b;if(b!=0){g=q[l+44>>2];q[l+44>>2]=g-1;C=f|32;if((C|0)!=97){break e}break c}C=f|32;if((C|0)==97){break c}k=q[l+44>>2];m=(d|0)<0?6:d;break d}k=g-29|0;q[l+44>>2]=k;b=b*268435456;m=(d|0)<0?6:d}n=(k|0)<0?l+48|0:l+336|0;j=n;while(1){d=j;if(b<4294967296&b>=0){g=~~b>>>0}else{g=0}q[d>>2]=g;j=j+4|0;b=(b- +(g>>>0))*1e9;if(b!=0){continue}break}f:{if((k|0)<1){d=k;g=j;h=n;break f}h=n;d=k;while(1){p=(d|0)<29?d:29;g=j-4|0;g:{if(h>>>0>g>>>0){break g}d=p;i=0;while(1){t=g;D=i;E=q[g>>2];s=d&31;if((d&63)>>>0>=32){i=E<>>32-s;E=E<>>0>>0?i+1|0:i;i=Bza(s,i,1e9);D=t;t=Aza(i,Li,1e9,0);q[D>>2]=s-t;g=g-4|0;if(h>>>0<=g>>>0){continue}break}if(!i){break g}h=h-4|0;q[h>>2]=i}while(1){g=j;if(h>>>0>>0){j=g-4|0;if(!q[j>>2]){continue}}break}d=q[l+44>>2]-p|0;q[l+44>>2]=d;j=g;if((d|0)>0){continue}break}}if((d|0)<=-1){x=((m+25|0)/9|0)+1|0;p=(C|0)==102;while(1){i=(d|0)<-9?9:0-d|0;h:{if(g>>>0<=h>>>0){h=q[h>>2]?h:h+4|0;break h}t=1e9>>>i|0;s=-1<>2];q[j>>2]=D+(d>>>i|0);d=w(t,d&s);j=j+4|0;if(j>>>0>>0){continue}break}h=q[h>>2]?h:h+4|0;if(!d){break h}q[g>>2]=d;g=g+4|0}d=q[l+44>>2]+i|0;q[l+44>>2]=d;j=p?n:h;g=g-j>>2>(x|0)?j+(x<<2)|0:g;if((d|0)<0){continue}break}}j=0;i:{if(g>>>0<=h>>>0){break i}j=w(n-h>>2,9);d=10;i=q[h>>2];if(i>>>0<10){break i}while(1){j=j+1|0;d=w(d,10);if(i>>>0>=d>>>0){continue}break}}d=(m-((C|0)==102?0:j)|0)-((C|0)==103&(m|0)!=0)|0;if((d|0)<(w(g-n>>2,9)-9|0)){i=d+9216|0;p=(i|0)/9|0;k=((p<<2)+((k|0)<0?l+48|4:l+340|0)|0)-4096|0;d=10;i=i-w(p,9)|0;if((i|0)<=7){while(1){d=w(d,10);i=i+1|0;if((i|0)!=8){continue}break}}p=q[k>>2];t=(p>>>0)/(d>>>0)|0;x=k+4|0;i=p-w(d,t)|0;j:{if(i?0:(x|0)==(g|0)){break j}s=d>>>1|0;z=i>>>0>>0?.5:(g|0)==(x|0)?(s|0)==(i|0)?1:1.5:1.5;b=t&1?9007199254740994:9007199254740992;if(!(r[u|0]!=45|A)){z=-z;b=-b}i=p-i|0;q[k>>2]=i;if(b+z==b){break j}d=d+i|0;q[k>>2]=d;if(d>>>0>=1e9){while(1){q[k>>2]=0;k=k-4|0;if(k>>>0>>0){h=h-4|0;q[h>>2]=0}d=q[k>>2]+1|0;q[k>>2]=d;if(d>>>0>999999999){continue}break}}j=w(n-h>>2,9);d=10;i=q[h>>2];if(i>>>0<10){break j}while(1){j=j+1|0;d=w(d,10);if(i>>>0>=d>>>0){continue}break}}d=k+4|0;g=d>>>0>>0?d:g}while(1){d=g;k=g>>>0<=h>>>0;if(!k){g=d-4|0;if(!q[g>>2]){continue}}break}k:{if((C|0)!=103){A=e&8;break k}g=m?m:1;i=(g|0)>(j|0)&(j|0)>-5;m=(i?j^-1:-1)+g|0;f=(i?-1:-2)+f|0;A=e&8;if(A){break k}g=-9;l:{if(k){break l}p=q[d-4>>2];if(!p){break l}i=10;g=0;if((p>>>0)%10|0){break l}while(1){k=g;g=g+1|0;i=w(i,10);if(!((p>>>0)%(i>>>0)|0)){continue}break}g=k^-1}k=w(d-n>>2,9);if((f&-33)==70){A=0;g=(g+k|0)-9|0;g=(g|0)>0?g:0;m=(g|0)>(m|0)?m:g;break k}A=0;g=((j+k|0)+g|0)-9|0;g=(g|0)>0?g:0;m=(g|0)>(m|0)?m:g}p=m|A;t=(p|0)!=0;D=a;i=c;s=f&-33;g=(j|0)>0?j:0;m:{if((s|0)==70){break m}g=j>>31;g=cr(g+j^g,0,v);if((v-g|0)<=1){while(1){g=g-1|0;o[g|0]=48;if((v-g|0)<2){continue}break}}x=g-2|0;o[x|0]=f;o[g-1|0]=(j|0)<0?45:43;g=v-x|0}k=(g+(t+(m+B|0)|0)|0)+1|0;xm(D,32,i,k,e);_l(a,u,B);xm(a,48,c,k,e^65536);n:{o:{p:{if((s|0)==70){f=l+16|8;j=l+16|9;i=h>>>0>n>>>0?n:h;h=i;while(1){g=cr(q[h>>2],0,j);q:{if((h|0)!=(i|0)){if(l+16>>>0>=g>>>0){break q}while(1){g=g-1|0;o[g|0]=48;if(l+16>>>0>>0){continue}break}break q}if((g|0)!=(j|0)){break q}o[l+24|0]=48;g=f}_l(a,g,j-g|0);h=h+4|0;if(n>>>0>=h>>>0){continue}break}if(p){_l(a,214787,1)}if((m|0)<1|d>>>0<=h>>>0){break p}while(1){g=cr(q[h>>2],0,j);if(g>>>0>l+16>>>0){while(1){g=g-1|0;o[g|0]=48;if(l+16>>>0>>0){continue}break}}_l(a,g,(m|0)<9?m:9);g=m-9|0;h=h+4|0;if(d>>>0<=h>>>0){break o}f=(m|0)>9;m=g;if(f){continue}break}break o}r:{if((m|0)<0){break r}n=d>>>0>h>>>0?d:h+4|0;d=l+16|8;f=l+16|9;j=h;while(1){g=cr(q[j>>2],0,f);if((f|0)==(g|0)){o[l+24|0]=48;g=d}s:{if((h|0)!=(j|0)){if(l+16>>>0>=g>>>0){break s}while(1){g=g-1|0;o[g|0]=48;if(l+16>>>0>>0){continue}break}break s}_l(a,g,1);g=g+1|0;if((m|0)<1?!A:0){break s}_l(a,214787,1)}t=g;g=f-g|0;_l(a,t,(g|0)<(m|0)?g:m);m=m-g|0;j=j+4|0;if(n>>>0<=j>>>0){break r}if((m|0)>-1){continue}break}}xm(a,48,m+18|0,18,0);_l(a,x,v-x|0);break n}g=m}xm(a,48,g+9|0,9,0)}break b}m=f&32;i=m?u+9|0:u;t:{if(d>>>0>11){break t}g=12-d|0;if(!g){break t}z=8;while(1){z=z*16;g=g-1|0;if(g){continue}break}if(r[i|0]==45){b=-(z+(-b-z));break t}b=b+z-z}h=q[l+44>>2];g=h>>31;g=cr(g^g+h,0,v);if((v|0)==(g|0)){o[l+15|0]=48;g=l+15|0}j=B|2;h=q[l+44>>2];n=g-2|0;o[n|0]=f+15;o[g-1|0]=(h|0)<0?45:43;k=e&8;h=l+16|0;while(1){f=h;t=h;h=m;if(y(b)<2147483648){g=~~b}else{g=-2147483648}o[t|0]=h|r[g+214736|0];b=(b- +(g|0))*16;h=f+1|0;if(!((h-(l+16|0)|0)!=1|(b==0?!((d|0)>0|k):0))){o[f+1|0]=46;h=f+2|0}if(b!=0){continue}break}g=a;f=c;if(!d|((h-l|0)-18|0)>=(d|0)){m=((v-(l+16|0)|0)-n|0)+h|0}else{m=((d+v|0)-n|0)+2|0}d=m;k=d+j|0;xm(g,32,f,k,e);_l(a,i,j);xm(a,48,c,k,e^65536);f=h-(l+16|0)|0;_l(a,l+16|0,f);d=v-n|0;xm(a,48,m-(d+f|0)|0,0,0);_l(a,n,d)}xm(a,32,c,k,e^8192);Ii=l+560|0;return((c|0)>(k|0)?c:k)|0}function CN(a,b,c,d,e,f,g,h,i,j,k){var l=0,m=0,n=0,s=0,t=0,u=0,v=0;l=Ii+ -64|0;Ii=l;s=-13;a:{if(g>>>0>65280|e-7>>>0>6|((k|0)==2|k>>>0>16)){break a}if(k&1){break a}v=14-e|0;o[l+32|0]=(k<<2)+248&248|(v|((g|0)!=0)<<6);Ti(l+32|1,d,e);u=15-e|0;m=c;while(1){o[(l-n|0)+47|0]=m;m=m>>>8|0;t=t+1|0;n=t&255;if(u>>>0>n>>>0){continue}break}if(m){break a}o[l+16|0]=r[l+32|0];m=r[l+33|0]|r[l+34|0]<<8|(r[l+35|0]<<16|r[l+36|0]<<24);o[l+17|0]=m;o[l+18|0]=m>>>8;o[l+19|0]=m>>>16;o[l+20|0]=m>>>24;m=r[l+41|0]|r[l+42|0]<<8|(r[l+43|0]<<16|r[l+44|0]<<24);n=r[l+37|0]|r[l+38|0]<<8|(r[l+39|0]<<16|r[l+40|0]<<24);o[l+21|0]=n;o[l+22|0]=n>>>8;o[l+23|0]=n>>>16;o[l+24|0]=n>>>24;o[l+25|0]=m;o[l+26|0]=m>>>8;o[l+27|0]=m>>>16;o[l+28|0]=m>>>24;m=r[l+45|0]|r[l+46|0]<<8;o[l+29|0]=m;o[l+30|0]=m>>>8;o[l+31|0]=r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}b:{if(!g){break b}q[l+32>>2]=0;q[l+36>>2]=0;q[l+40>>2]=0;q[l+44>>2]=0;p[l+32>>1]=(g<<8&16711680|g<<24)>>>16;m=g>>>0<14?g:14;Ti(l+32|2,f,m);o[l+16|0]=r[l+16|0]^g>>>8;o[l+17|0]=r[l+17|0]^g;o[l+18|0]=r[l+18|0]^r[l+34|0];o[l+19|0]=r[l+19|0]^r[l+35|0];o[l+20|0]=r[l+20|0]^r[l+36|0];o[l+21|0]=r[l+21|0]^r[l+37|0];o[l+22|0]=r[l+22|0]^r[l+38|0];o[l+23|0]=r[l+23|0]^r[l+39|0];o[l+24|0]=r[l+24|0]^r[l+40|0];o[l+25|0]=r[l+25|0]^r[l+41|0];o[l+26|0]=r[l+26|0]^r[l+42|0];o[l+27|0]=r[l+27|0]^r[l+43|0];o[l+28|0]=r[l+28|0]^r[l+44|0];o[l+29|0]=r[l+29|0]^r[l+45|0];o[l+30|0]=r[l+30|0]^r[l+46|0];o[l+31|0]=r[l+31|0]^r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}n=g-m|0;if(!n){break b}t=f+m|0;while(1){f=n>>>0<16?n:16;Ui(f+(l+32|0)|0,0,f>>>0>15?0:16-f|0);Ti(l+32|0,t,f);o[l+16|0]=r[l+16|0]^r[l+32|0];o[l+17|0]=r[l+17|0]^r[l+33|0];o[l+18|0]=r[l+18|0]^r[l+34|0];o[l+19|0]=r[l+19|0]^r[l+35|0];o[l+20|0]=r[l+20|0]^r[l+36|0];o[l+21|0]=r[l+21|0]^r[l+37|0];o[l+22|0]=r[l+22|0]^r[l+38|0];o[l+23|0]=r[l+23|0]^r[l+39|0];o[l+24|0]=r[l+24|0]^r[l+40|0];o[l+25|0]=r[l+25|0]^r[l+41|0];o[l+26|0]=r[l+26|0]^r[l+42|0];o[l+27|0]=r[l+27|0]^r[l+43|0];o[l+28|0]=r[l+28|0]^r[l+44|0];o[l+29|0]=r[l+29|0]^r[l+45|0];o[l+30|0]=r[l+30|0]^r[l+46|0];o[l+31|0]=r[l+31|0]^r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}t=f+t|0;n=n-f|0;if(n){continue}break}}o[l|0]=v;Ui(Ti(l|1,d,e)+e|0,0,u);o[l+15|0]=1;c:{if(!c){break c}if(!b){while(1){d=c>>>0<16?c:16;e=d>>>0>15?0:16-d|0;f=Ui(d+(l+32|0)|0,0,e);Ti(l+32|0,h,d);o[l+16|0]=r[l+16|0]^r[l+32|0];o[l+17|0]=r[l+17|0]^r[l+33|0];o[l+18|0]=r[l+18|0]^r[l+34|0];o[l+19|0]=r[l+19|0]^r[l+35|0];o[l+20|0]=r[l+20|0]^r[l+36|0];o[l+21|0]=r[l+21|0]^r[l+37|0];o[l+22|0]=r[l+22|0]^r[l+38|0];o[l+23|0]=r[l+23|0]^r[l+39|0];o[l+24|0]=r[l+24|0]^r[l+40|0];o[l+25|0]=r[l+25|0]^r[l+41|0];o[l+26|0]=r[l+26|0]^r[l+42|0];o[l+27|0]=r[l+27|0]^r[l+43|0];o[l+28|0]=r[l+28|0]^r[l+44|0];o[l+29|0]=r[l+29|0]^r[l+45|0];o[l+30|0]=r[l+30|0]^r[l+46|0];o[l+31|0]=r[l+31|0]^r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}m=0;n=0;s=cn(a,l,16,l+32|0,l+60|0);if(s){break a}while(1){o[i+m|0]=r[(l+32|0)+m|0]^r[h+m|0];n=n+1|0;m=n&255;if(d>>>0>m>>>0){continue}break}if((b|0)==1){Ui(f,0,e);Ti(l+32|0,i,d);o[l+16|0]=r[l+16|0]^r[l+32|0];o[l+17|0]=r[l+17|0]^r[l+33|0];o[l+18|0]=r[l+18|0]^r[l+34|0];o[l+19|0]=r[l+19|0]^r[l+35|0];o[l+20|0]=r[l+20|0]^r[l+36|0];o[l+21|0]=r[l+21|0]^r[l+37|0];o[l+22|0]=r[l+22|0]^r[l+38|0];o[l+23|0]=r[l+23|0]^r[l+39|0];o[l+24|0]=r[l+24|0]^r[l+40|0];o[l+25|0]=r[l+25|0]^r[l+41|0];o[l+26|0]=r[l+26|0]^r[l+42|0];o[l+27|0]=r[l+27|0]^r[l+43|0];o[l+28|0]=r[l+28|0]^r[l+44|0];o[l+29|0]=r[l+29|0]^r[l+45|0];o[l+30|0]=r[l+30|0]^r[l+46|0];o[l+31|0]=r[l+31|0]^r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}}c=c-d|0;h=d+h|0;i=d+i|0;m=0;n=0;while(1){d:{e=l-m|0;d=r[e+15|0]+1|0;o[e+15|0]=d;if((d|0)==(d&255)){break d}n=n+1|0;m=n&255;if(u>>>0>m>>>0){continue}}break}if(c){continue}break c}}while(1){s=cn(a,l,16,l+32|0,l+60|0);if(s){break a}d=c>>>0<16?c:16;m=0;n=0;while(1){o[i+m|0]=r[(l+32|0)+m|0]^r[h+m|0];n=n+1|0;m=n&255;if(d>>>0>m>>>0){continue}break}if((b|0)==1){Ui(d+(l+32|0)|0,0,d>>>0>15?0:16-d|0);Ti(l+32|0,i,d);o[l+16|0]=r[l+16|0]^r[l+32|0];o[l+17|0]=r[l+17|0]^r[l+33|0];o[l+18|0]=r[l+18|0]^r[l+34|0];o[l+19|0]=r[l+19|0]^r[l+35|0];o[l+20|0]=r[l+20|0]^r[l+36|0];o[l+21|0]=r[l+21|0]^r[l+37|0];o[l+22|0]=r[l+22|0]^r[l+38|0];o[l+23|0]=r[l+23|0]^r[l+39|0];o[l+24|0]=r[l+24|0]^r[l+40|0];o[l+25|0]=r[l+25|0]^r[l+41|0];o[l+26|0]=r[l+26|0]^r[l+42|0];o[l+27|0]=r[l+27|0]^r[l+43|0];o[l+28|0]=r[l+28|0]^r[l+44|0];o[l+29|0]=r[l+29|0]^r[l+45|0];o[l+30|0]=r[l+30|0]^r[l+46|0];o[l+31|0]=r[l+31|0]^r[l+47|0];s=cn(a,l+16|0,16,l+16|0,l+60|0);if(s){break a}}c=c-d|0;h=d+h|0;i=d+i|0;m=0;n=0;while(1){e:{e=l-m|0;d=r[e+15|0]+1|0;o[e+15|0]=d;if((d|0)==(d&255)){break e}n=n+1|0;m=n&255;if(u>>>0>m>>>0){continue}}break}if(c){continue}break}}m=0;n=0;while(1){o[(l-m|0)+15|0]=0;n=n+1|0;m=n&255;if(u>>>0>m>>>0){continue}break}s=cn(a,l,16,l+32|0,l+60|0);if(s){break a}o[l+16|0]=r[l+32|0]^r[l+16|0];o[l+17|0]=r[l+33|0]^r[l+17|0];o[l+18|0]=r[l+34|0]^r[l+18|0];o[l+19|0]=r[l+35|0]^r[l+19|0];o[l+20|0]=r[l+36|0]^r[l+20|0];o[l+21|0]=r[l+37|0]^r[l+21|0];o[l+22|0]=r[l+38|0]^r[l+22|0];o[l+23|0]=r[l+39|0]^r[l+23|0];o[l+24|0]=r[l+40|0]^r[l+24|0];o[l+25|0]=r[l+41|0]^r[l+25|0];o[l+26|0]=r[l+42|0]^r[l+26|0];o[l+27|0]=r[l+43|0]^r[l+27|0];o[l+28|0]=r[l+44|0]^r[l+28|0];o[l+29|0]=r[l+45|0]^r[l+29|0];o[l+30|0]=r[l+46|0]^r[l+30|0];o[l+31|0]=r[l+47|0]^r[l+31|0];Ti(j,l+16|0,k);s=0}Ii=l- -64|0;return s}function dL(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=x(0),l=x(0),m=0,n=0,s=x(0),t=0,v=0,z=0,B=0,D=x(0),E=x(0),F=0,H=0,I=x(0),K=x(0),L=x(0),M=0,N=x(0),O=0,P=0,Q=x(0),R=0,S=x(0),T=x(0),U=x(0),V=x(0),W=x(0),X=x(0),Y=x(0),Z=x(0),_=x(0),$=x(0),aa=x(0),ba=x(0),ca=x(0),da=0,ea=0,fa=x(0),ga=x(0),ha=0,ia=x(0),ja=x(0),ka=x(0),la=x(0),ma=x(0),na=x(0),oa=x(0),pa=x(0),qa=x(0),ra=x(0),sa=x(0),ta=x(0),ua=x(0);m=Ii-48|0;Ii=m;j=q[g+8>>2];a:{F=q[b+8>>2];if((Ap(a,F)|0)==2){h=q[j+4>>2];H=q[j>>2];v=h-H|0;i=(v|0)/320|0;z=i+1|0;if(z>>>0<=(q[j+8>>2]-H|0)/320>>>0){q[j+4>>2]=H+w(z,320);if(i>>>0<(v+320|0)/320>>>0){i=q[g+12>>2];q[g+12>>2]=i+1;q[h+304>>2]=i;fn(h);i=q[e>>2];o[h+288|0]=r[h+288|0]|2;b:{c:{if(i){q[h+244>>2]=5;q[h+248>>2]=0;q[h+252>>2]=2;q[h+256>>2]=2;o[h+276|0]=r[i|0];o[h+277|0]=r[i+1|0];o[h+278|0]=r[i+2|0];e=h+279|0;o[e|0]=r[h+279|0]&208|r[i+3|0]&15;if(!r[g+16|0]){break b}o[g+16|0]=0;i=r[h+279|0]|16;break c}q[h+244>>2]=7;q[h+248>>2]=0;o[h+278|0]=255;p[h+276>>1]=65280;q[h+252>>2]=0;q[h+256>>2]=0;e=h+279|0;i=r[e|0]&-48|15}o[e|0]=i}e=wt(a,F);if(e>>>0<5){o[h+288|0]=r[h+288|0]|1;e=e<<2;q[h+236>>2]=q[e+44292>>2];q[h+232>>2]=q[e+44272>>2];q[h+148>>2]=q[j+48>>2];e=q[j+52>>2];q[h+224>>2]=2;q[h+144>>2]=e;t=j+60|0;i=q[t>>2];e=q[j+56>>2];q[h+284>>2]=0;q[h+280>>2]=(i-e|0)/36;e=To(a,F);q[h+156>>2]=q[(e?e:g+4|0)>>2];g=vt(a,F,m+32|0);i=h;d:{e:{if(q[m+32>>2]==2){if(!g){break d}e=q[g+48>>2];g=q[e>>2];e=q[e+4>>2];break e}e=0}if(!(e|g)){g=q[j+72>>2];e=q[j+76>>2]}q[i+160>>2]=g;q[i+164>>2]=e;if(f){g=0;while(1){e=Zv(a,q[((g<<4)+b|0)+8>>2]);n=(((e>>>0>4?e:4)<<1)+n|0)+12|0;g=g+1|0;if((g|0)!=(f|0)){continue}break}}O=j+56|0;f:{M=j- -64|0;e=q[M>>2];if((e-q[j+60>>2]|0)/36>>>0>>0){if(o[j+68|0]&1){break f}Wi(((e-q[O>>2]|0)/36|0)+(n>>>0>128?n:128)|0,36,O,M,t)}if(f){while(1){da=(P<<4)+b|0;g=q[da+8>>2];bK(m+32|0,a,g);g:{s=u[m+32>>2];if((s>=x(0)?s:x(-s))>2];X=u[m+24>>2];Y=u[m+20>>2];Z=u[m+16>>2];e=Zv(a,g);k=fK(a,g);l=u[m+32>>2];I=x(0);ea=dK(a,g);_=x(1);$=cK(a,g);fa=x(x(x(A($>>0>4?e:4)>>>0));s=x(x(C(x(x(fa/ga)+x(.9990000128746033))))+x(1));h:{if(s=x(0)){F=~~s>>>0;break h}F=0}j=iK(a,g);i:{if(!j){e=0;Q=x(1);K=x(-1);break i}jK(a,g,m+15|0,m+14|0);j:{k:{I=u[j>>2];l:{if(I==u[j+8>>2]){g=1;e=0;i=o[m+14|0]&1;n=i;v=0;if(o[m+15|0]&1){break l}break k}g=o[m+15|0]&1;H=o[m+14|0]&1;if(u[j+12>>2]!=u[j+20>>2]){n=0;e=1;i=1;v=g;if(!H){break k}break l}z=g;g=1;e=0;i=H;n=i;v=0;if(!z){break k}}s=x(u[j+16>>2]-I);I=x(I+s);_=x(-s);break j}i=n;g=v;_=x(u[j+16>>2]-I)}z=e?5:1;v=e?1:3;if(((e?g:i)|0)==1){s=u[j+(v<<2)>>2];K=x(u[j+(z<<2)>>2]-s);Q=x(s+K);K=x(-K);break i}Q=u[j+(v<<2)>>2];K=x(u[j+(z<<2)>>2]-Q)}g=q[t>>2]-q[O>>2]|0;j=(g|0)/-36|0;if(F){s=x(k/l);ha=F-1|0;B=(P<<6)+c|0;H=B;ba=x(0);N=x(.7853981852531433);v=1;n=0;m:{while(1){k=(n|0)==(ha|0)?fa:x(ga*x(n>>>0));ca=x(.5);l=s;z=q[70726];i=z;if(!ea){g=N>ba^1|k>=N^1;ba=g?k:N;N=g?N:x(N+x(1.5707963705062866));n=n-(g^1)|0;k=ba}D=$>>9|0)+1&127)<<2)>>2]*k)+x(u[z+(g>>>7&508)>>2]*x(x(1)-k)));T=x(x(l*S)+x(.5));k=_;l=s;R=+x(D+x(-1.5707963705062866))*10430.378350470453;o:{if(y(R)<2147483648){i=~~R;break o}i=-2147483648}D=x(x(i&511)*x(.001953125));U=x(x(u[(((i>>>9|0)+1&127)<<2)+z>>2]*D)+x(u[z+(i>>>7&508)>>2]*x(x(1)-D)));V=x(x(l*U)+x(.5));E=x(k*(e?V:T));ia=u[B+8>>2];ja=u[B+24>>2];ka=x(u[B+40>>2]*x(0));L=x(x(x(T*ia)+x(V*ja))+ka);la=u[H+56>>2];ma=x(u[B+36>>2]*x(0));na=u[B+4>>2];oa=u[B+20>>2];aa=x(ma+x(x(na*T)+x(oa*V)));pa=u[B+52>>2];qa=x(u[B+32>>2]*x(0));ra=u[B>>2];sa=u[B+16>>2];D=x(qa+x(x(ra*T)+x(sa*V)));ta=u[B+48>>2];if(!ea){k=U>=x(0)?U:x(-U);l=S>=x(0)?S:x(-S);ca=x(x(.5)/(k>l?k:l))}ua=x(I+E);E=x(Q+x(K*(e?T:x(x(1)-V))));L=x(la+L);k=x(pa+aa);l=x(ta+D);p:{if(v&1){g=q[t>>2];if((g|0)==q[M>>2]){break p}q[t>>2]=g+36;u[g+32>>2]=W;u[g+28>>2]=X;u[g+24>>2]=Y;u[g+20>>2]=Z;u[g+16>>2]=E;u[g+12>>2]=ua;u[g+8>>2]=L;u[g+4>>2]=k;u[g>>2]=l}g=q[t>>2];if((g|0)==q[M>>2]){break a}q[t>>2]=g+36;u[g+32>>2]=W;u[g+28>>2]=X;u[g+24>>2]=Y;u[g+20>>2]=Z;u[g+16>>2]=E;u[g+12>>2]=ua;u[g+8>>2]=L;u[g+4>>2]=k;u[g>>2]=l;g=q[t>>2];if((g|0)==q[M>>2]){break a}q[t>>2]=g+36;u[g+32>>2]=W;u[g+28>>2]=X;u[g+24>>2]=Y;u[g+20>>2]=Z;E=x(x(S*ca)+x(.5));l=x(x(U*ca)+x(.5));L=x(Q+x(K*(e?E:x(x(1)-l))));u[g+16>>2]=L;aa=x(I+x(_*(e?l:E)));u[g+12>>2]=aa;D=x(la+x(ka+x(x(ia*E)+x(ja*l))));u[g+8>>2]=D;k=x(pa+x(ma+x(x(na*E)+x(oa*l))));u[g+4>>2]=k;l=x(ta+x(qa+x(x(ra*E)+x(sa*l))));u[g>>2]=l;if((n|0)==(ha|0)){g=q[t>>2];if((g|0)==q[M>>2]){break a}q[t>>2]=g+36;u[g+32>>2]=W;u[g+28>>2]=X;u[g+24>>2]=Y;u[g+20>>2]=Z;u[g+16>>2]=L;u[g+12>>2]=aa;u[g+8>>2]=D;u[g+4>>2]=k;u[g>>2]=l}v=0;n=n+1|0;if((F|0)==(n|0)){break m}continue}break}break a}g=q[t>>2]-q[O>>2]|0}e=Zv(a,q[da+8>>2]);if(((g|0)/36|0)+j>>>0<=((e>>>0>4?e:4)<<1)+12>>>0){break g}J(42593,41161,1811,42578);G()}P=P+1|0;if((P|0)!=(f|0)){continue}break}}q[h+284>>2]=((q[t>>2]-q[O>>2]|0)/36|0)-q[h+280>>2];Ii=m+48|0;return}J(40670,40745,493,40801);G()}J(42342,41161,949,42358);G()}q[m>>2]=e;Pi(4,40439,42505,m);J(42529,41161,893,42531);G()}J(40995,40745,479,41006);G()}J(40968,40745,506,40987);G()}J(42544,41161,1630,42578);G()}J(40939,40745,533,40963);G()}function sI(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-960|0;Ii=j;Ui(q[a+40>>2],255,q[a+44>>2]<<2);q[a+60>>2]=-1;q[a+64>>2]=0;q[a+52>>2]=q[a+48>>2];Ui(j+8|0,0,952);k=a+40|0;qo(k,0,0,j+8|0);c=q[a+4>>2];a:{b:{c:{d:{e:{f:{g:{if(q[b+4>>2]){h:{if(!c){d=$i(108);q[a+4>>2]=d;Ui(d,0,108);c=q[a+4>>2];q[c>>2]=q[q[a>>2]+72>>2]+2368;break h}q[c+96>>2]=q[c+92>>2]}if(o[c+104|0]&1){break b}Wi(q[b+4>>2],16,c+92|0,c+100|0,c+96|0);e=q[b+4>>2];if(!e){break g}c=0;while(1){if(c>>>0>=e>>>0){break f}d=q[b>>2]+(c<<3)|0;i=Oi(q[d+4>>2]);e=Li;f=q[a+4>>2];g=q[f+96>>2];if((g|0)==q[f+100>>2]){break a}d=q[d>>2];q[f+96>>2]=g+16;q[g+8>>2]=i;q[g+12>>2]=e;q[g>>2]=d;qo(k,i,e,j+8|0);c=c+1|0;e=q[b+4>>2];if(c>>>0>>0){continue}break}break g}if(!c){break g}i:{if(o[c+104|0]&1){break i}d=q[c+92>>2];if(!d){break i}Ni(d)}Ni(c);q[a+4>>2]=0}c=q[a+8>>2];j:{if(q[b+12>>2]){k:{if(!c){d=$i(52);q[a+8>>2]=d;q[d+48>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;c=q[a+8>>2];q[c>>2]=q[q[a>>2]+72>>2]+2416;break k}q[c+40>>2]=q[c+36>>2]}if(o[c+48|0]&1){break b}Wi(q[b+12>>2],16,c+36|0,c+44|0,c+40|0);e=q[b+12>>2];if(e){c=0;while(1){if(c>>>0>=e>>>0){break e}d=q[b+8>>2]+(c<<3)|0;i=Oi(q[d+4>>2]);e=Li;f=q[a+8>>2];g=q[f+40>>2];if((g|0)==q[f+44>>2]){break a}d=q[d>>2];q[f+40>>2]=g+16;q[g+8>>2]=i;q[g+12>>2]=e;q[g>>2]=d;qo(k,i,e,j+8|0);c=c+1|0;e=q[b+12>>2];if(c>>>0>>0){continue}break}}qo(k,0,0,j+8|0);break j}if(!c){break j}l:{if(o[c+48|0]&1){break l}d=q[c+36>>2];if(!d){break l}Ni(d)}Ni(c);q[a+8>>2]=0}e=q[a+88>>2];if(e){f=q[a+92>>2];if(f){c=0;while(1){d=q[(e+(c<<3)|0)+4>>2];if(d){Ni(d)}c=c+1|0;if((f|0)!=(c|0)){continue}break}}Ni(e)}q[a+88>>2]=0;l=q[b+20>>2];q[a+92>>2]=l;if(!l){break c}i=q[b+16>>2];h=$i((l&536870911)!=(l|0)?-1:l<<3);c=0;while(1){d=c<<3;f=d+h|0;d=d+i|0;q[f>>2]=q[d>>2];m=f;e=q[d+4>>2];f=hj(e);d=f+1|0;g=$i(d);q[m+4>>2]=g;Pj(g,e,d);o[f+g|0]=0;c=c+1|0;if((l|0)!=(c|0)){continue}break}q[a+88>>2]=h;c=q[a+12>>2];d=q[a+16>>2];if((c|0)==(d|0)){c=d;break d}e=0;while(1){f=q[(e<<2)+c>>2];if(f){m:{if(o[f+336|0]&1){break m}d=q[f+316>>2];if(d){Ni(d)}d=q[f+308>>2];if(!d){break m}Ni(d)}n:{if(o[f+304|0]&1){break n}d=q[f+292>>2];if(!d){break n}Ni(d)}Ni(f);c=q[a+12>>2];d=q[a+16>>2]}e=e+1|0;if(e>>>0>2>>>0){continue}break}break d}J(149732,149744,350,149768);G()}J(149732,149744,358,149768);G()}q[a+16>>2]=c;d=lm(a,0);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,1);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,2);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,3);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,4);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,5);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,6);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,7);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,8);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,9);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,10);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,11);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,12);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,13);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,14);if(d){c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}d=lm(a,15);if(!d){break c}c=q[a+16>>2];if((c|0)==q[a+20>>2]){break a}q[a+16>>2]=c+4;q[c>>2]=d}c=q[a+28>>2];o:{p:{q:{f=q[b+28>>2];r:{if(f){s:{if(!c){d=$i(996);q[a+28>>2]=d;Ui(d,0,996);c=q[a+28>>2];q[c>>2]=q[q[a>>2]+72>>2]+2436;break s}q[c+984>>2]=q[c+980>>2]}if(o[c+992|0]&1){break b}Wi(f,16,c+980|0,c+988|0,c+984|0);f=f>>>0>1?f:1;c=0;while(1){if(t[b+28>>2]<=c>>>0){break q}d=q[b+24>>2]+(c<<3)|0;g=Oi(q[d+4>>2]);i=Li;e=q[a+28>>2];h=q[e+984>>2];if((h|0)==q[e+988>>2]){break a}d=q[d>>2];q[e+984>>2]=h+16;q[h+8>>2]=g;q[h+12>>2]=i;q[h>>2]=d;qo(k,g,i,j+8|0);c=c+1|0;if((f|0)!=(c|0)){continue}break}qo(k,0,0,j+8|0);break r}if(!c){break r}t:{if(o[c+992|0]&1){break t}d=q[c+980>>2];if(!d){break t}Ni(d)}Ni(c);q[a+28>>2]=0}c=q[a+36>>2];d=q[b+36>>2];u:{if(d){v:{if(!c){c=$i(540);q[a+36>>2]=c;Ui(c,0,540);break v}q[c+528>>2]=q[c+524>>2]}if(o[c+536|0]&1){break b}Wi(d,16,c+524|0,c+532|0,c+528|0);f=d>>>0>1?d:1;c=0;while(1){if(t[b+36>>2]<=c>>>0){break p}d=q[b+32>>2]+(c<<3)|0;g=Oi(q[d+4>>2]);i=Li;e=q[a+36>>2];h=q[e+528>>2];if((h|0)==q[e+532>>2]){break o}d=q[d>>2];q[e+528>>2]=h+16;q[h+8>>2]=g;q[h+12>>2]=i;q[h>>2]=d;qo(k,g,i,j+8|0);c=c+1|0;if((f|0)!=(c|0)){continue}break}qo(k,0,0,j+8|0);break u}if(!c){break u}w:{if(o[c+536|0]&1){break w}b=q[c+524>>2];if(!b){break w}Ni(b)}Ni(c);q[a+36>>2]=0}if(!q[a+32>>2]){b=a;a=$i(24);q[b+32>>2]=a;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0}Ii=j+960|0;return}J(149732,149744,374,149768);G()}J(149732,149744,382,149768);G()}break a}J(149962,149779,493,150037);G()}J(150049,149779,533,150073);G()}function Ewa(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,t=0,u=0,v=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0;g=Ii+ -64|0;Ii=g;P=d-1|0;i=P;p=i?32-z(i)|0:0;Q=e-1|0;i=Q;i=i?32-z(i)|0:0;Y=i>>>0>p>>>0?p:i;if((e|0)>=1){Z=Y<<1;Ya=-1<>2];C=ol(i,0);D=ol(i,1);i=q[R>>2];S=ol(i,0);T=ol(i,1);i=q[_+R>>2];ol(i,0);ol(i,1);U=(w(f&Q,d)<<2)+b|0;i=q[p+U>>2];t=ol(i,0);u=ol(i,1);i=q[U>>2];J=ol(i,0);K=ol(i,1);i=q[_+U>>2];ol(i,0);ol(i,1);Da=f+1|0;V=(w(Da&Q,d)<<2)+b|0;i=q[p+V>>2];p=ol(i,0);i=ol(i,1);l=q[V>>2];o=ol(l,0);l=ol(l,1);m=q[_+V>>2];ol(m,0);ol(m,1);if((d|0)>=1){Za=s[((f&255)<<1)+109104>>1]|s[(f>>>7&33554430)+109104>>1]<<16;_a=f>>>Y<>>7&33554430)+109104>>1]<<17|Za|s[((E&255)<<1)+109104>>1]<<1;h=o;a:{if((d|0)==(e|0)){break a}o=o&Ya;h=o|E>>>Y<>>0>e>>>0){break a}h=o|_a}Ea=(h<<3)+c|0;q[Ea+4>>2]=q[($<<2)+b>>2];E=E+1|0;o=(P&E)<<2;l=q[o+R>>2];S=ol(l,0);T=ol(l,1);l=q[o+U>>2];J=ol(l,0);K=ol(l,1);l=q[o+V>>2];o=ol(l,0);l=ol(l,1);L=w(t,6);M=L+w(C,6)|0;aa=M+(k+v<<1)|0;n=(r[g+7|0]+(r[g+6|0]+(r[g+5|0]+r[g+4|0]|0)|0)<<4)-aa<<4;N=w(u,6);O=N+w(D,6)|0;Fa=O+(j+x<<1)|0;Ga=(Fa|0)<(aa|0);ba=Ga?0-n|0:n;F=t+v|0;y=k+C|0;ca=F+y<<2;n=(r[g+3|0]+(r[g+2|0]+(r[g+1|0]+r[g|0]|0)|0)<<4)-ca<<4;G=u+x|0;A=j+D|0;Ha=G+A<<2;Ia=(Ha|0)<(ca|0);da=Ia?0-n|0:n;ea=L+(w(v,6)+(y<<1)|0)|0;n=(r[g+19|0]+(r[g+18|0]+(r[g+17|0]+r[g+16|0]|0)|0)<<4)-ea<<4;Ja=N+(w(x,6)+(A<<1)|0)|0;Ka=(Ja|0)<(ea|0);fa=Ka?0-n|0:n;A=w(C,3);ga=w(t,9);y=ga+w(v,3)|0;ha=A+(y+k|0)|0;k=(r[g+23|0]+(r[g+22|0]+(r[g+21|0]+r[g+20|0]|0)|0)<<4)-ha<<4;W=0-k|0;h=k;k=w(D,3);ia=w(u,9);n=ia+w(x,3)|0;La=k+(n+j|0)|0;Ma=(La|0)<(ha|0);ja=Ma?W:h;ka=t+C<<3;j=(r[g+11|0]+(r[g+10|0]+(r[g+9|0]+r[g+8|0]|0)|0)<<4)-ka<<4;Na=u+D<<3;Oa=(Na|0)<(ka|0);la=Oa?0-j|0:j;ma=(M+(S<<1)|0)+(J<<1)|0;j=(r[g+15|0]+(r[g+14|0]+(r[g+13|0]+r[g+12|0]|0)|0)<<4)-ma<<4;Pa=(O+(T<<1)|0)+(K<<1)|0;Qa=(Pa|0)<(ma|0);na=Qa?0-j|0:j;X=w(t,12);oa=X+(C<<2)|0;j=(r[g+27|0]+(r[g+26|0]+(r[g+25|0]+r[g+24|0]|0)|0)<<4)-oa<<4;B=w(u,12);Ra=B+(D<<2)|0;Sa=(Ra|0)<(oa|0);pa=Sa?0-j|0:j;H=w(J,3);qa=H+((A+ga|0)+S|0)|0;j=(r[g+31|0]+(r[g+30|0]+(r[g+29|0]+r[g+28|0]|0)|0)<<4)-qa<<4;I=w(K,3);Ta=I+((k+ia|0)+T|0)|0;Ua=(Ta|0)<(qa|0);ra=Ua?0-j|0:j;sa=F<<3;j=(r[g+35|0]+(r[g+34|0]+(r[g+33|0]+r[g+32|0]|0)|0)<<4)-sa<<4;Va=G<<3;Wa=(Va|0)<(sa|0);ta=Wa?0-j|0:j;ua=X+(v<<2)|0;j=(r[g+39|0]+(r[g+38|0]+(r[g+37|0]+r[g+36|0]|0)|0)<<4)-ua<<4;Xa=B+(x<<2)|0;W=(Xa|0)<(ua|0);va=W?0-j|0:j;wa=(w(F,6)+(m<<1)|0)+(p<<1)|0;j=(r[g+51|0]+(r[g+50|0]+(r[g+49|0]+r[g+48|0]|0)|0)<<4)-wa<<4;G=(w(G,6)+(f<<1)|0)+(i<<1)|0;L=(G|0)<(wa|0);xa=L?0-j|0:j;j=w(p,3);ya=j+(m+y|0)|0;m=(r[g+55|0]+(r[g+54|0]+(r[g+53|0]+r[g+52|0]|0)|0)<<4)-ya<<4;h=0-m|0;k=m;m=w(i,3);M=m+(f+n|0)|0;N=(M|0)<(ya|0);za=N?h:k;f=r[g+43|0]+(r[g+42|0]+(r[g+41|0]+(r[g+40|0]-t|0)|0)|0)<<8;O=u<<4;y=t<<4;A=(O|0)<(y|0);Aa=A?0-f|0:f;Ba=X+(J<<2)|0;f=(r[g+47|0]+(r[g+46|0]+(r[g+45|0]+r[g+44|0]|0)|0)<<4)-Ba<<4;n=B+(K<<2)|0;v=(n|0)<(Ba|0);Ca=v?0-f|0:f;F=X+(p<<2)|0;f=(r[g+59|0]+(r[g+58|0]+(r[g+57|0]+r[g+56|0]|0)|0)<<4)-F<<4;x=B+(i<<2)|0;k=(x|0)<(F|0);B=k?0-f|0:f;H=j+((H+ga|0)+o|0)|0;f=(r[g+63|0]+(r[g+62|0]+(r[g+61|0]+r[g+60|0]|0)|0)<<4)-H<<4;j=m+((I+ia|0)+l|0)|0;m=(j|0)<(H|0);I=m?0-f|0:f;f=Fa-aa|0;f=Ga?0-f|0:f;h=(ba|0)>(w(f,13)|0)?12:(ba|0)>f<<3?8:((ba|0)>(w(f,3)|0))<<2;f=Ha-ca|0;f=Ia?0-f|0:f;h=h|((da|0)>(w(f,13)|0)?3:(da|0)>f<<3?2:(da|0)>(w(f,3)|0));f=Ja-ea|0;f=Ka?0-f|0:f;h=h|((fa|0)>(w(f,13)|0)?768:(fa|0)>f<<3?512:((fa|0)>(w(f,3)|0))<<8);f=La-ha|0;f=Ma?0-f|0:f;h=h|((ja|0)>(w(f,13)|0)?3072:(ja|0)>f<<3?2048:((ja|0)>(w(f,3)|0))<<10);f=Na-ka|0;f=Oa?0-f|0:f;h=h|((la|0)>(w(f,13)|0)?48:(la|0)>f<<3?32:((la|0)>(w(f,3)|0))<<4);f=Pa-ma|0;f=Qa?0-f|0:f;h=h|((na|0)>(w(f,13)|0)?192:(na|0)>f<<3?128:((na|0)>(w(f,3)|0))<<6);f=Ra-oa|0;f=Sa?0-f|0:f;h=h|((pa|0)>(w(f,13)|0)?12288:(pa|0)>f<<3?8192:((pa|0)>(w(f,3)|0))<<12);f=Ta-qa|0;f=Ua?0-f|0:f;h=h|((ra|0)>(w(f,13)|0)?49152:(ra|0)>f<<3?32768:((ra|0)>(w(f,3)|0))<<14);f=Va-sa|0;f=Wa?0-f|0:f;h=h|((ta|0)>(w(f,13)|0)?196608:(ta|0)>f<<3?131072:((ta|0)>(w(f,3)|0))<<16);f=Xa-ua|0;f=W?0-f|0:f;h=h|((va|0)>(w(f,13)|0)?786432:(va|0)>f<<3?524288:((va|0)>(w(f,3)|0))<<18);f=G-wa|0;f=L?0-f|0:f;h=h|((xa|0)>(w(f,13)|0)?50331648:(xa|0)>f<<3?33554432:((xa|0)>(w(f,3)|0))<<24);f=M-ya|0;f=N?0-f|0:f;h=h|((za|0)>(w(f,13)|0)?201326592:(za|0)>f<<3?134217728:((za|0)>(w(f,3)|0))<<26);f=O-y|0;f=A?0-f|0:f;h=h|((Aa|0)>(w(f,13)|0)?3145728:(Aa|0)>f<<3?2097152:((Aa|0)>(w(f,3)|0))<<20);f=n-Ba|0;f=v?0-f|0:f;h=h|((Ca|0)>(w(f,13)|0)?12582912:(Ca|0)>f<<3?8388608:((Ca|0)>(w(f,3)|0))<<22);f=x-F|0;f=k?0-f|0:f;k=h|((B|0)>(w(f,13)|0)?805306368:(B|0)>f<<3?536870912:((B|0)>(w(f,3)|0))<<28);f=j-H|0;f=m?0-f|0:f;q[Ea>>2]=k|((I|0)>(w(f,13)|0)?-1073741824:(I|0)>f<<3?-2147483648:((I|0)>(w(f,3)|0))<<30);$=$+1|0;if((d|0)!=(E|0)){continue}break}}f=Da;if((f|0)!=(e|0)){continue}break}}Ii=g- -64|0}function br(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii+ -64|0;Ii=g;a:{b:{switch(Vi(a,-1)|0){case 4:zF(a,d,-1);break a;case 3:AF(a,b,d,-1);break a;case 1:c=Uj(a,-1);a=q[d+8>>2];b=q[d+4>>2]+(a^-1)|0;if(c){if((b|0)<=3){Vk(d,a+4|0);a=q[d+8>>2]}a=q[d>>2]+a|0;o[a|0]=116;o[a+1|0]=114;o[a+2|0]=117;o[a+3|0]=101;q[d+8>>2]=q[d+8>>2]+4;break a}if((b|0)<=4){Vk(d,a+5|0);a=q[d+8>>2]}a=q[d>>2]+a|0;b=r[139041]|r[139042]<<8|(r[139043]<<16|r[139044]<<24);o[a|0]=b;o[a+1|0]=b>>>8;o[a+2|0]=b>>>16;o[a+3|0]=b>>>24;o[a+4|0]=r[139045];q[d+8>>2]=q[d+8>>2]+5;break a;case 5:h=c+1|0;c:{if(q[b+1320>>2]>(c|0)){if(fq(a,3)){break c}}if(!q[b+1332>>2]){Im(d)}q[g+48>>2]=h;Qi(a,139333,g+48|0)}d:{j=$l(a,-1);if(!j){break d}c=q[a+8>>2];q[c+8>>2]=2;q[c>>2]=841764;q[a+8>>2]=q[a+8>>2]+16;jl(a,-1e4);c=Is(a,-1,-2);Ri(a,-3);if(!c){break d}f=al(a,-1);c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=91;e:{if((f|0)<1){break e}rj(a,-1,1);br(a,b,h,d);Ri(a,-2);if((f|0)==1){break e}c=2;while(1){e=q[d+8>>2];if((q[d+4>>2]+(e^-1)|0)<=0){Vk(d,e+1|0);e=q[d+8>>2]}q[d+8>>2]=e+1;o[q[d>>2]+e|0]=44;rj(a,-1,c);br(a,b,h,d);Ri(a,-2);e=(c|0)!=(f|0);c=c+1|0;if(e){continue}break}}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=93;break a}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;f:{g:{h:{if(!Hj(a,-2)){c=0;break h}c=0;while(1){if((Vi(a,-2)|0)!=3){break g}i=Mj(a,-2);if(i==0|i>=1^1|C(i)!=i){break g}Ri(a,-2);f=+(c|0)>2];if(!((f|0)<1|(w(e,f)|0)>=(c|0)|q[b+1316>>2]>=(c|0))){if(q[b+1308>>2]){break f}if(!q[b+1332>>2]){Im(d)}e=Vi(a,-1);c=140583;i:{if((e|0)==-1){break i}c=q[(e<<2)+256832>>2]}q[g+36>>2]=139374;q[g+32>>2]=c;Qi(a,139522,g+32|0);break f}if((c|0)>=1){e=q[d+8>>2];if((q[d+4>>2]+(e^-1)|0)<=0){Vk(d,e+1|0);e=q[d+8>>2]}q[d+8>>2]=e+1;o[q[d>>2]+e|0]=91;rj(a,-1,1);br(a,b,h,d);Ri(a,-2);if((c|0)!=1){e=2;while(1){f=q[d+8>>2];if((q[d+4>>2]+(f^-1)|0)<=0){Vk(d,f+1|0);f=q[d+8>>2]}q[d+8>>2]=f+1;o[q[d>>2]+f|0]=44;rj(a,-1,e);br(a,b,h,d);Ri(a,-2);f=(c|0)!=(e|0);e=e+1|0;if(f){continue}break}}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=93;break a}if(q[b+1336>>2]|c){break f}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=91;c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=93;break a}Ri(a,-3)}j:{if(!j){break j}$l(a,-1);c=q[a+8>>2];q[c+8>>2]=2;q[c>>2]=841768;q[a+8>>2]=q[a+8>>2]+16;jl(a,-1e4);c=Is(a,-1,-2);Ri(a,-3);if(!c){break j}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=91;c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=93;break a}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=123;c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;k:{if(!Hj(a,-2)){break k}f=b+1332|0;while(1){l:{m:{switch(Vi(a,-2)-3|0){case 0:e=q[d+8>>2];if((q[d+4>>2]+(e^-1)|0)<=0){Vk(d,e+1|0);e=q[d+8>>2]}q[d+8>>2]=e+1;o[q[d>>2]+e|0]=34;AF(a,b,d,-2);c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=1){Vk(d,c+2|0);c=q[d+8>>2]}c=q[d>>2]+c|0;o[c|0]=34;o[c+1|0]=58;q[d+8>>2]=q[d+8>>2]+2;break l;case 1:zF(a,d,-2);e=q[d+8>>2];if((q[d+4>>2]+(e^-1)|0)<=0){Vk(d,e+1|0);e=q[d+8>>2]}q[d+8>>2]=e+1;o[q[d>>2]+e|0]=58;break l;default:break m}}if(!q[f>>2]){Im(d)}e=Vi(a,-2);c=140583;n:{if((e|0)==-1){break n}c=q[(e<<2)+256832>>2]}q[g+20>>2]=139399;q[g+16>>2]=c;Qi(a,139522,g+16|0)}br(a,b,h,d);Ri(a,-2);if(!Hj(a,-2)){break k}e=q[d+8>>2];if((q[d+4>>2]+(e^-1)|0)<=0){Vk(d,e+1|0);e=q[d+8>>2]}q[d+8>>2]=e+1;o[q[d>>2]+e|0]=44;continue}}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=125;break a;case 0:a=q[d+8>>2];if((q[d+4>>2]+(a^-1)|0)<=3){Vk(d,a+4|0);a=q[d+8>>2]}a=q[d>>2]+a|0;o[a|0]=110;o[a+1|0]=117;o[a+2|0]=108;o[a+3|0]=108;q[d+8>>2]=q[d+8>>2]+4;break a;case 2:if(!qj(a,-1)){a=q[d+8>>2];if((q[d+4>>2]+(a^-1)|0)<=3){Vk(d,a+4|0);a=q[d+8>>2]}a=q[d>>2]+a|0;o[a|0]=110;o[a+1|0]=117;o[a+2|0]=108;o[a+3|0]=108;q[d+8>>2]=q[d+8>>2]+4;break a}if((qj(a,-1)|0)!=841764){break a}c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=91;c=q[d+8>>2];if((q[d+4>>2]+(c^-1)|0)<=0){Vk(d,c+1|0);c=q[d+8>>2]}q[d+8>>2]=c+1;o[q[d>>2]+c|0]=93;break a;case 6:case 7:case 8:e=q[a+8>>2]-q[a+12>>2]>>4;ej(a,-1);Zi(a,-10002,139436);ej(a,-2);c=0;dq(a,1,1,0);h=uj(a,-1,g+60|0);f=w(q[g+60>>2],6)+2|0;b=q[d+8>>2];if((f|0)>(q[d+4>>2]+(b^-1)|0)){Vk(d,b+f|0);b=q[d+8>>2]}q[d+8>>2]=b+1;o[q[d>>2]+b|0]=34;if(q[g+60>>2]){while(1){b=r[c+h|0];f=q[(b<<2)+254448>>2];o:{if(f){aD(d,f);break o}f=q[d+8>>2];q[d+8>>2]=f+1;o[f+q[d>>2]|0]=b}c=c+1|0;if(c>>>0>2]){continue}break}}b=q[d+8>>2];q[d+8>>2]=b+1;o[b+q[d>>2]|0]=34;Ri(a,-3);if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(139445,139466,619,139494);G();default:break b}}if(!q[b+1332>>2]){Im(d)}c=Vi(a,-1);b=140583;p:{if((c|0)==-1){break p}b=q[(c<<2)+256832>>2]}q[g+4>>2]=139052;q[g>>2]=b;Qi(a,139522,g)}Ii=g- -64|0}function jD(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;if(!(r[a+60|0]|!r[a+1389|0])){d=a;b=q[a+44>>2];a:{if(b){b=b-q[a+48>>2]|0;break a}b=pm(q[a+32>>2])-q[a+36>>2]|0}q[d+68>>2]=b-4}b:{c:{f=q[a+44>>2];d:{if(f){if(f>>>0>=t[a+52>>2]){break c}q[a+44>>2]=f+1;c=r[f|0];break d}c=wj(q[a+32>>2]);if((c|0)==-1){break c}}if(!(c&255)){break b}q[a+112>>2]=31;return 0}q[a+108>>2]=1}e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{Y:{Z:{_:{$:{aa:{ba:{ca:{da:{ea:{fa:{ga:{ha:{ia:{ja:{ka:{la:{ma:{f=q[a+44>>2];na:{oa:{pa:{if(f){c=q[a+52>>2];if(f>>>0>=c>>>0){break pa}b=f+1|0;q[a+44>>2]=b;o[a+1387|0]=r[f|0];break na}c=wj(q[a+32>>2]);if((c|0)!=-1){break oa}}q[a+108>>2]=1;c=0}o[a+1387|0]=c;b=q[a+44>>2];if(!b){break ma}c=q[a+52>>2]}if(c>>>0<=b>>>0){break la}d=b+1|0;q[a+44>>2]=d;e=r[b|0];break ja}c=wj(q[a+32>>2]);if((c|0)!=-1){break ka}}q[a+108>>2]=1;c=0}e=c&255;d=q[a+44>>2];if(!d){break ia}c=q[a+52>>2]}if(c>>>0<=d>>>0){break ha}b=d+1|0;q[a+44>>2]=b;e=r[d|0]<<8|e;break fa}c=wj(q[a+32>>2]);if((c|0)!=-1){break ga}}q[a+108>>2]=1;c=0}e=c<<8&65280|e;b=q[a+44>>2];if(!b){break ea}c=q[a+52>>2]}if(c>>>0<=b>>>0){break da}d=b+1|0;q[a+44>>2]=d;e=r[b|0]<<16|e;break ba}c=wj(q[a+32>>2]);if((c|0)!=-1){break ca}}q[a+108>>2]=1;c=0}e=c<<16&16711680|e;d=q[a+44>>2];if(!d){break aa}c=q[a+52>>2]}if(c>>>0<=d>>>0){break $}b=d+1|0;q[a+44>>2]=b;g=r[d|0]<<24|e;break Z}c=wj(q[a+32>>2]);if((c|0)!=-1){break _}}q[a+108>>2]=1;c=0}g=c<<24|e;b=q[a+44>>2];if(!b){break Y}c=q[a+52>>2]}if(c>>>0<=b>>>0){break X}d=b+1|0;q[a+44>>2]=d;e=r[b|0];break V}c=wj(q[a+32>>2]);if((c|0)!=-1){break W}}q[a+108>>2]=1;c=0}e=c&255;d=q[a+44>>2];if(!d){break U}c=q[a+52>>2]}if(c>>>0<=d>>>0){break T}b=d+1|0;q[a+44>>2]=b;e=r[d|0]<<8|e;break R}c=wj(q[a+32>>2]);if((c|0)!=-1){break S}}q[a+108>>2]=1;c=0}e=c<<8&65280|e;b=q[a+44>>2];if(!b){break Q}c=q[a+52>>2]}if(c>>>0<=b>>>0){break P}d=b+1|0;q[a+44>>2]=d;e=r[b|0]<<16|e;break N}c=wj(q[a+32>>2]);if((c|0)!=-1){break O}}q[a+108>>2]=1;c=0}e=c<<16&16711680|e;d=q[a+44>>2];if(!d){break M}c=q[a+52>>2]}if(c>>>0<=d>>>0){break L}b=d+1|0;q[a+44>>2]=b;i=r[d|0]<<24|e;break J}c=wj(q[a+32>>2]);if((c|0)!=-1){break K}}q[a+108>>2]=1;c=0}i=c<<24|e;b=q[a+44>>2];if(!b){break I}c=q[a+52>>2]}if(c>>>0<=b>>>0){break H}b=b+1|0;q[a+44>>2]=b;break F}if((wj(q[a+32>>2])|0)!=-1){break G}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break E}c=q[a+52>>2]}if(c>>>0<=b>>>0){break D}b=b+1|0;q[a+44>>2]=b;break B}if((wj(q[a+32>>2])|0)!=-1){break C}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break A}}c=q[a+52>>2];if(b>>>0>=c>>>0){break z}b=b+1|0;q[a+44>>2]=b;break x}if((wj(q[a+32>>2])|0)!=-1){break y}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break w}c=q[a+52>>2]}if(c>>>0<=b>>>0){break v}b=b+1|0;q[a+44>>2]=b;break t}if((wj(q[a+32>>2])|0)!=-1){break u}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break s}c=q[a+52>>2]}if(c>>>0<=b>>>0){break r}d=b+1|0;q[a+44>>2]=d;e=r[b|0];break p}c=wj(q[a+32>>2]);if((c|0)!=-1){break q}}q[a+108>>2]=1;c=0}e=c&255;d=q[a+44>>2];if(!d){break o}c=q[a+52>>2]}if(c>>>0<=d>>>0){break n}b=d+1|0;q[a+44>>2]=b;e=r[d|0]<<8|e;break l}c=wj(q[a+32>>2]);if((c|0)!=-1){break m}}q[a+108>>2]=1;c=0}e=c<<8&65280|e;b=q[a+44>>2];if(!b){break k}c=q[a+52>>2]}if(c>>>0<=b>>>0){break j}d=b+1|0;q[a+44>>2]=d;b=r[b|0]<<16|e;break h}c=wj(q[a+32>>2]);if((c|0)!=-1){break i}}q[a+108>>2]=1;c=0}b=c<<16&16711680|e;d=q[a+44>>2];if(!d){break g}c=q[a+52>>2]}if(c>>>0<=d>>>0){break f}q[a+44>>2]=d+1;c=r[d|0];break e}c=wj(q[a+32>>2]);if((c|0)!=-1){break e}}q[a+108>>2]=1;c=0}q[a+1124>>2]=c<<24|b;qa:{ra:{sa:{d=a;ta:{ua:{va:{wa:{xa:{ya:{za:{Aa:{Ba:{Ca:{Da:{Ea:{Fa:{Ga:{Ha:{b=q[a+44>>2];Ia:{Ja:{Ka:{if(b){c=q[a+52>>2];if(b>>>0>=c>>>0){break Ka}b=b+1|0;q[a+44>>2]=b;break Ia}if((wj(q[a+32>>2])|0)!=-1){break Ja}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Ha}c=q[a+52>>2]}if(c>>>0<=b>>>0){break Ga}b=b+1|0;q[a+44>>2]=b;break Ea}if((wj(q[a+32>>2])|0)!=-1){break Fa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break Da}c=q[a+52>>2]}if(c>>>0<=b>>>0){break Ca}b=b+1|0;q[a+44>>2]=b;break Aa}if((wj(q[a+32>>2])|0)!=-1){break Ba}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break za}c=q[a+52>>2]}if(c>>>0<=b>>>0){break ya}b=b+1|0;q[a+44>>2]=b;break wa}if((wj(q[a+32>>2])|0)!=-1){break xa}}q[a+108>>2]=1}b=q[a+44>>2];if(!b){break va}c=q[a+52>>2]}if(c>>>0<=b>>>0){q[a+108>>2]=1;b=0;break ua}d=b+1|0;q[a+44>>2]=d;b=r[b|0];q[a+1128>>2]=b;e=a+1132|0;h=a+1128|0;break ta}b=wj(q[a+32>>2]);if((b|0)==-1){q[a+108>>2]=1;b=0;break ua}b=b&255}q[d+1128>>2]=b;e=a+1132|0;h=a+1128|0;d=q[a+44>>2];if(!d){break sa}c=q[a+52>>2]}f=b+d|0;if(f>>>0>c>>>0){break ra}Ti(e,d,b);q[a+44>>2]=f;break qa}if((zl(e,b,1,q[a+32>>2])|0)==1){break qa}}q[a+108>>2]=1;q[a+112>>2]=10;return 0}q[a+1416>>2]=-2;La:{if((g&i)==-1){break La}b=q[h>>2];while(1){if((b|0)<1){break La}b=b-1|0;if(r[(b+a|0)+1132|0]==255){continue}break}q[a+1420>>2]=g;q[a+1416>>2]=b}if(r[a+1389|0]){f=q[h>>2];b=27;Ma:{if((f|0)<1){break Ma}c=0;b=0;while(1){c=r[(a+b|0)+1132|0]+c|0;b=b+1|0;if((f|0)!=(b|0)){continue}break}b=c+27|0}q[a+76>>2]=g;q[a+72>>2]=q[a+68>>2]+(b+f|0)}q[a+1392>>2]=0;return 1}function dwa(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0;f=Ii-416|0;Ii=f;a:{if((a|0)==8){q[e>>2]=q[c>>2];q[e+4>>2]=q[c>>2];q[e+8>>2]=q[c>>2];q[e+12>>2]=q[c>>2];q[e+16>>2]=q[c>>2];q[e+20>>2]=q[c>>2];q[e+24>>2]=q[c>>2];q[e+28>>2]=q[c>>2];q[e+32>>2]=q[c>>2];q[e+36>>2]=q[c>>2];q[e+40>>2]=q[c>>2];q[e+44>>2]=q[c>>2];q[e+48>>2]=q[c>>2];q[e+52>>2]=q[c>>2];q[e+56>>2]=q[c>>2];q[e+60>>2]=q[c>>2];break a}v=r[a+99408|0];x=v>>>0>1?v:1;s=r[a+99312|0];g=1<>>0>4?4:c;b:{if((k|0)==2){h=h<<9;m=d+21|0;while(1){t=h+302480|0;n=j<<2;c=r[t+(r[m+(n|3)|0]<<1)|0];l=r[t+(r[m+(n|1)|0]<<1)|0];i=r[t+(r[m+n|0]<<1)|0];p=(f+384|0)+(j<<3)|0;o[p+3|0]=r[t+(r[m+(n|2)|0]<<1)|0];o[p+2|0]=i;o[p+1|0]=i;o[p|0]=i;i=p|4;o[i+3|0]=c;o[i+2|0]=l;o[i+1|0]=l;o[i|0]=l;j=j+1|0;if((x|0)!=(j|0)){continue}break}break b}u=k>>>0>3;m=h<<9;y=d+21|0;while(1){if(k){p=w(j,k);n=(f+384|0)+(j<<3)|0;t=n|4;c=0;while(1){i=m+302480|0;l=c+p<<1;h=r[i+(r[l+y|0]<<1)|0];o[Zj(n,c)|0]=h;h=r[i+(r[y+(l|1)|0]<<1)|0];o[Zj(t,c)|0]=h;c=c+1|0;if((k|0)!=(c|0)){continue}break}}if(!u){i=(f+384|0)+(j<<3)|0;h=i|4;c=k;while(1){o[Zj(i,c)|0]=255;o[Zj(h,c)|0]=255;c=c+1|0;if((c|0)!=4){continue}break}}j=j+1|0;if((x|0)!=(j|0)){continue}break}}p=q[(s<<2)+248496>>2];t=v>>>0>1?v:1;n=g>>>0>1?g:1;j=0;while(1){u=(f+384|0)+(j<<3)|0;m=u|4;c=0;s=0;c:{if((k|0)==2){while(1){h=c<<2;l=h+((j<<7)+f|0)|0;h=h+p|0;i=fC(r[Zj(u,0)|0],r[Zj(m,0)|0],q[h>>2])&255;o[l+3|0]=fC(r[Zj(u,3)|0],r[Zj(m,3)|0],q[h>>2]);o[l+2|0]=i;o[l+1|0]=i;o[l|0]=i;c=c+1|0;if((n|0)!=(c|0)){continue}break c}}while(1){d:{e:{if(!k){c=0;break e}c=s<<2;l=c+((j<<7)+f|0)|0;i=c+p|0;c=0;while(1){h=fC(r[Zj(u,c)|0],r[Zj(m,c)|0],q[i>>2]);o[Zj(l,c)|0]=h;c=c+1|0;if((k|0)!=(c|0)){continue}break}c=k;if(c>>>0>3){break d}}h=((j<<7)+f|0)+(s<<2)|0;while(1){o[Zj(h,c)|0]=255;c=c+1|0;if((c|0)!=4){continue}break}}s=s+1|0;if((n|0)!=(s|0)){continue}break}}j=j+1|0;if((t|0)!=(j|0)){continue}break}c=102992;f:{if(!(66204>>>a&1)){break f}g:{switch(a-3|0){case 0:c=(b<<4)+98464|0;break f;case 4:c=(b<<4)+98640|0;break f;default:break g}}c=(b<<4)+97984|0}b=457827>>>a&1;h:{i:{j:{k:{l:{if(382655>>>a&1){a=r[d+39|0];if(b){if(a>>>0>=g>>>0){break l}q[e>>2]=q[(a<<2)+f>>2];a=r[d+40|0];if(a>>>0>=g>>>0){break l}q[e+4>>2]=q[(a<<2)+f>>2];a=r[d+41|0];if(a>>>0>=g>>>0){break l}q[e+8>>2]=q[(a<<2)+f>>2];a=r[d+42|0];if(a>>>0>=g>>>0){break l}q[e+12>>2]=q[(a<<2)+f>>2];a=r[d+43|0];if(a>>>0>=g>>>0){break l}q[e+16>>2]=q[(a<<2)+f>>2];a=r[d+44|0];if(a>>>0>=g>>>0){break l}q[e+20>>2]=q[(a<<2)+f>>2];a=r[d+45|0];if(a>>>0>=g>>>0){break l}q[e+24>>2]=q[(a<<2)+f>>2];a=r[d+46|0];if(a>>>0>=g>>>0){break l}q[e+28>>2]=q[(a<<2)+f>>2];a=r[d+47|0];if(a>>>0>=g>>>0){break l}q[e+32>>2]=q[(a<<2)+f>>2];a=r[d+48|0];if(a>>>0>=g>>>0){break l}q[e+36>>2]=q[(a<<2)+f>>2];a=r[d+49|0];if(a>>>0>=g>>>0){break l}q[e+40>>2]=q[(a<<2)+f>>2];a=r[d+50|0];if(a>>>0>=g>>>0){break l}q[e+44>>2]=q[(a<<2)+f>>2];a=r[d+51|0];if(a>>>0>=g>>>0){break l}q[e+48>>2]=q[(a<<2)+f>>2];a=r[d+52|0];if(a>>>0>=g>>>0){break l}q[e+52>>2]=q[(a<<2)+f>>2];a=r[d+53|0];if(a>>>0>=g>>>0){break l}q[e+56>>2]=q[(a<<2)+f>>2];a=r[d+54|0];if(a>>>0>=g>>>0){break l}c=(a<<2)+f|0;break h}if(a>>>0>=g>>>0){break k}q[e>>2]=q[((r[c|0]<<7)+f|0)+(a<<2)>>2];a=r[d+40|0];if(a>>>0>=g>>>0){break k}q[e+4>>2]=q[((r[c+1|0]<<7)+f|0)+(a<<2)>>2];a=r[d+41|0];if(a>>>0>=g>>>0){break k}q[e+8>>2]=q[((r[c+2|0]<<7)+f|0)+(a<<2)>>2];a=r[d+42|0];if(a>>>0>=g>>>0){break k}q[e+12>>2]=q[((r[c+3|0]<<7)+f|0)+(a<<2)>>2];a=r[d+43|0];if(a>>>0>=g>>>0){break k}q[e+16>>2]=q[((r[c+4|0]<<7)+f|0)+(a<<2)>>2];a=r[d+44|0];if(a>>>0>=g>>>0){break k}q[e+20>>2]=q[((r[c+5|0]<<7)+f|0)+(a<<2)>>2];a=r[d+45|0];if(a>>>0>=g>>>0){break k}q[e+24>>2]=q[((r[c+6|0]<<7)+f|0)+(a<<2)>>2];a=r[d+46|0];if(a>>>0>=g>>>0){break k}q[e+28>>2]=q[((r[c+7|0]<<7)+f|0)+(a<<2)>>2];a=r[d+47|0];if(a>>>0>=g>>>0){break k}q[e+32>>2]=q[((r[c+8|0]<<7)+f|0)+(a<<2)>>2];a=r[d+48|0];if(a>>>0>=g>>>0){break k}q[e+36>>2]=q[((r[c+9|0]<<7)+f|0)+(a<<2)>>2];a=r[d+49|0];if(a>>>0>=g>>>0){break k}q[e+40>>2]=q[((r[c+10|0]<<7)+f|0)+(a<<2)>>2];a=r[d+50|0];if(a>>>0>=g>>>0){break k}q[e+44>>2]=q[((r[c+11|0]<<7)+f|0)+(a<<2)>>2];a=r[d+51|0];if(a>>>0>=g>>>0){break k}q[e+48>>2]=q[((r[c+12|0]<<7)+f|0)+(a<<2)>>2];a=r[d+52|0];if(a>>>0>=g>>>0){break k}q[e+52>>2]=q[((r[c+13|0]<<7)+f|0)+(a<<2)>>2];a=r[d+53|0];if(a>>>0>=g>>>0){break k}q[e+56>>2]=q[((r[c+14|0]<<7)+f|0)+(a<<2)>>2];a=r[d+54|0];if(a>>>0>=g>>>0){break k}c=((r[c+15|0]<<7)+f|0)+(a<<2)|0;break h}if(!b){break j}k=d+39|0;c=0;while(1){a=c<<1;b=r[a+k|0];if(b>>>0>=g>>>0){break i}a=r[k+(a|1)|0];if(a>>>0>=g>>>0){break i}i=(b<<2)+f|0;h=(a<<2)+f|0;a=r[Zj(q[d+16>>2]?i:h,0)|0];b=(c<<2)+e|0;o[Zj(b,0)|0]=a;a=r[Zj(q[d+16>>2]==1?h:i,1)|0];o[Zj(b,1)|0]=a;a=r[Zj(q[d+16>>2]==2?h:i,2)|0];o[Zj(b,2)|0]=a;a=r[Zj(q[d+16>>2]==3?h:i,3)|0];o[Zj(b,3)|0]=a;c=c+1|0;if((c|0)!=16){continue}break}break a}J(103226,96899,12740,103213);G()}J(103226,96899,12748,103213);G()}J(103260,96899,12755,103213);G()}J(103279,96899,12764,103213);G()}q[e+60>>2]=q[c>>2]}Ii=f+416|0}function Hka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=0,m=0,n=0,p=0,r=x(0),s=x(0),v=x(0),y=0,z=0,A=0,B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=0,M=x(0),N=x(0),O=x(0),P=0,Q=0;b=Ii-160|0;Ii=b;c=q[a+4>>2];a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{switch(q[a+8>>2]){case 0:q[c+60>>2]=q[c+56>>2];i=c+112|0;e=q[c+104>>2];f=q[i>>2]-e>>2;g=q[c+120>>2];d=q[c+124>>2]-g|0;a=d>>2;l=c+108|0;h=q[l>>2];e=h-e>>2;if(f>>>0>>0){if(o[c+116|0]&1){break a}Wi(a+f|0,4,c+104|0,i,l);h=q[c+108>>2];a=q[c+104>>2];e=h-a>>2;f=q[c+112>>2]-a>>2;g=q[c+120>>2];d=q[c+124>>2]-g|0;a=d>>2}if(f-e>>>0>>0){break f}Ti(h,g,d);q[c+124>>2]=q[c+120>>2];q[c+108>>2]=q[c+108>>2]+(a<<2);break c;case 1:l=q[a+20>>2];P=q[a>>2];y=q[a+12>>2];h=q[a+16>>2];q[b+48>>2]=0;d=q[(y+w(q[h>>2],48)|0)+16>>2];a=q[d+192>>2];if(!a){a=q[q[d+152>>2]+8>>2]}k:{l:{a=q[a>>2];switch(q[a+152>>2]){case 0:break l;case 1:break e;default:break k}}q[b+152>>2]=a;q[b+136>>2]=0;d=q[c+108>>2];a=q[c+104>>2];m:{if((d|0)!=(a|0)){d=d-a|0;if(!d){break g}d=(d>>2)-1|0;if(d>>>0>q[c+112>>2]-a>>2>>>0){break b}a=a+(d<<2)|0;e=q[a>>2];q[c+108>>2]=a;break m}e=Mi[q[74943]](q[c+136>>2],0,0,1)|0}q[b+132>>2]=e;if(!e){break h}d=c+124|0;a=q[d>>2];g=c+128|0;f=q[g>>2];if((a|0)==(f|0)){if(o[c+132|0]&1){break a}f=a;a=c+120|0;Wi((f-q[a>>2]>>2)+2|0,4,a,g,d);f=q[g>>2];a=q[d>>2]}if((a|0)==(f|0)){break i}q[c+124>>2]=a+4;q[a>>2]=e;z=q[c+60>>2];a=q[c+56>>2];d=((z-a|0)/304|0)+1|0;if(d>>>0>(q[c- -64>>2]-a|0)/304>>>0){break b}q[c+60>>2]=a+w(d,304);f=q[(y+w(q[h>>2],48)|0)+16>>2];Q=f;n=q[f+152>>2];a=q[f+156>>2];if(!a){a=q[n+4>>2]}q[b+128>>2]=q[n+112>>2];i=q[a+20>>2];d=0;if((h|0)==(l|0)){break d}a=h;while(1){g=d;d=q[f+156>>2];if(!d){d=q[q[f+152>>2]+4>>2]}d=q[d+16>>2]+g|0;a=a+4|0;if((l|0)==(a|0)){break d}f=q[(y+w(q[a>>2],48)|0)+16>>2];continue}}J(45495,44699,789,45563);G();case 2:break c;default:break j}}J(45495,44699,864,45501);G()}J(45343,45367,533,45423);G()}J(45592,44699,654,45604);G()}J(46069,45367,479,46080);G()}J(46261,45367,540,46290);G()}q[b+56>>2]=a;q[b+152>>2]=0;n:{if((h|0)!=(l|0)){while(1){n=q[c+60>>2];a=q[c+56>>2];d=((n-a|0)/304|0)+1|0;if(d>>>0>(q[c+64>>2]-a|0)/304>>>0){break n}q[c+60>>2]=a+w(d,304);f=q[(y+w(q[h>>2],48)|0)+16>>2];e=q[f+152>>2];g=q[f+156>>2];if(!g){g=q[e+4>>2]}o:{a=q[c+76>>2];p:{if(!a){break p}d=q[g+8>>2];m=q[g+12>>2];a=q[q[c+72>>2]+(Cza(d,m,a)<<2)>>2];if((a|0)==-1){break p}z=q[c+80>>2];while(1){i=z+w(a,24)|0;if((d|0)==q[i>>2]&q[i+4>>2]==(m|0)){break o}a=q[i+20>>2];if((a|0)!=-1){continue}break}}J(44689,44699,758,45949);G()}q[72766]=q[72766]+q[g+16>>2];a=q[g+16>>2];q[b+40>>2]=a;q[b+44>>2]=0;q[b+64>>2]=a;q[b+68>>2]=0;a=q[g+20>>2];q[72788]=q[72788]+w(a,q[g+16>>2]);a=w(a,q[g+16>>2]);q[b+32>>2]=a;q[b+36>>2]=0;q[b+144>>2]=a;q[b+148>>2]=0;d=b;a=q[f+196>>2];if(!a){a=q[q[f+152>>2]+112>>2]}q[d+136>>2]=a;pL(n,e+120|0,b+56|0,e+12|0,f+160|0,b+136|0,i+8|0,q[g+16>>2],f+80|0,q[f+148>>2]);po(P,n);h=h+4|0;if((l|0)!=(h|0)){continue}break}}break c}break b}a=w(d,i);if(a>>>0>t[c+144>>2]){q[c+144>>2]=a;q[c+140>>2]=ul(q[c+140>>2],a)}if((h|0)!=(l|0)){m=q[c+140>>2];f=h;while(1){e=q[(y+w(q[f>>2],48)|0)+16>>2];i=q[e+152>>2];g=q[e+156>>2];if(!g){g=q[i+4>>2]}q:{if(!q[g+16>>2]){break q}q[b+144>>2]=0;q[b+56>>2]=0;p=Wo(q[g+4>>2],b+144|0,b+56|0);if(p){q[b+16>>2]=p;Pi(4,44761,45623,b+16|0);break q}m=Ti(m,q[b+144>>2],q[b+56>>2]);p=q[i+132>>2];L=p;A=q[i+128>>2];if(p|A){qL(q[g+4>>2],1,e+80|0,A,L,q[i+136>>2],q[b+144>>2],m)}p=q[i+148>>2];L=p;A=q[i+144>>2];if(p|A){M=u[e+132>>2];N=u[e+136>>2];O=u[e+128>>2];B=u[e+120>>2];C=u[e+116>>2];F=u[e+96>>2];r=u[e+112>>2];H=u[e+104>>2];k=u[e+84>>2];I=u[e+100>>2];v=u[e+88>>2];K=u[e+80>>2];q[b+120>>2]=0;q[b+124>>2]=1065353216;q[b+112>>2]=0;q[b+116>>2]=0;s=x(x(K*I)-x(k*F));D=x(x(k*H)-x(v*I));E=x(x(v*F)-x(K*H));j=x(x(1)/x(x(B*s)+x(x(r*D)+x(C*E))));D=x(D*j);u[b+96>>2]=D;s=x(s*j);u[b+104>>2]=s;E=x(E*j);u[b+100>>2]=E;u[b+108>>2]=-x(x(O*D)+x(x(M*E)+x(N*s)));s=x(x(x(v*C)-x(k*B))*j);u[b+80>>2]=s;k=x(x(x(k*r)-x(K*C))*j);u[b+88>>2]=k;v=x(x(x(K*B)-x(v*r))*j);u[b+84>>2]=v;u[b+92>>2]=-x(x(O*s)+x(x(M*v)+x(N*k)));k=x(x(x(F*C)-x(I*r))*j);u[b+72>>2]=k;r=x(x(x(H*r)-x(F*B))*j);u[b+68>>2]=r;j=x(x(x(I*B)-x(H*C))*j);u[b+64>>2]=j;u[b+76>>2]=-x(x(O*j)+x(x(M*r)+x(N*k)));qL(q[g+4>>2],0,b- -64|0,A,L,q[i+152>>2],q[b+144>>2],m)}m=m+q[b+56>>2]|0}f=f+4|0;if((l|0)!=(f|0)){continue}break}e=q[b+132>>2]}q[72766]=q[72766]+d;q[b+144>>2]=d;q[b+148>>2]=0;q[b+8>>2]=d;q[b+12>>2]=0;q[72788]=a+q[72788];q[b+56>>2]=a;q[b+60>>2]=0;q[b>>2]=a;q[b+4>>2]=0;h=q[(y+w(q[h>>2],48)|0)+16>>2];q[b+88>>2]=0;q[b+92>>2]=0;q[b+84>>2]=1065353216;q[b+96>>2]=0;q[b+100>>2]=0;q[b+108>>2]=0;q[b+112>>2]=0;q[b+104>>2]=1065353216;q[b+116>>2]=0;q[b+120>>2]=0;q[b+124>>2]=1065353216;q[b+68>>2]=0;q[b+72>>2]=0;q[b+64>>2]=1065353216;q[b+76>>2]=0;q[b+80>>2]=0;pL(z,n+120|0,b+152|0,n+12|0,h+160|0,b+128|0,b+132|0,d,b- -64|0,q[Q+148>>2]);Mi[q[74945]](e,a,q[c+140>>2],1);po(P,z)}Ii=b+160|0;return}J(45520,45367,506,45539);G()}J(46186,45367,493,45053);G()}function dN(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,u=0,v=0,x=0,y=0,z=0,A=0;j=Ii-160|0;Ii=j;k=-4;a:{b:{if(!(o[a+32|0]&1)){break b}m=j- -64|0;k=m;q[k>>2]=0;q[k+4>>2]=0;q[k+16>>2]=0;q[k+8>>2]=0;q[k+12>>2]=0;k=Jk();h=wG(b,m,e,h,i);c:{if((e|0)<1){break c}e=(k-Jk()|0)+e|0;if((e|0)>=1){break c}k=-2;break b}i=q[j+76>>2];q[j+128>>2]=q[j+72>>2];q[j+132>>2]=i;q[j+136>>2]=q[j+80>>2];i=q[j+68>>2];q[j+120>>2]=q[j+64>>2];q[j+124>>2]=i;p[j+144>>1]=c;o[j+60|0]=d;wn(j+88|0,0);Cl(j+88|0,j+120|0,20);Cl(j+88|0,j+144|0,2);Cl(j+88|0,j+60|0,1);x=ro(j+88|0);y=Li;d:{e:{f:{if(!h){u=q[a+28>>2];Gj(u);i=q[a+12>>2];k=q[a+8>>2];l=Jk();v=Li;h=i-k|0;if(h){i=k-i|0;i=((h|0)<(i|0)?i:h)>>>6|0;h=(h|0)>-1?h:-1;h=w(i,(h|0)<1?h:1);i=h>>>0>1?h:1;k=0;while(1){h=q[a+8>>2];if(q[a+12>>2]-h>>6>>>0<=k>>>0){break a}h=h+(k<<6)|0;g:{if(q[h+48>>2]!=1){break g}n=q[h+36>>2];if((n|0)==(v|0)&t[h+32>>2]>l>>>0|v>>>0>>0){break g}n=q[h+40>>2];if(n){ht(n);q[h+40>>2]=0}n=q[h+44>>2];if((n|0)!=-1){qp(n);Cm(q[h+44>>2])}q[h>>2]=0;q[h+4>>2]=0;q[h+56>>2]=0;q[h+60>>2]=0;q[h+48>>2]=0;q[h+52>>2]=0;q[h+40>>2]=0;q[h+44>>2]=0;q[h+32>>2]=0;q[h+36>>2]=0;q[h+24>>2]=0;q[h+28>>2]=0;q[h+16>>2]=0;q[h+20>>2]=0;q[h+8>>2]=0;q[h+12>>2]=0;q[h+44>>2]=-1;q[h+40>>2]=0;q[h+48>>2]=0}k=k+1|0;if((i|0)!=(k|0)){continue}break}}i=q[a+12>>2];k=q[a+8>>2];h=i-k|0;if(!h){break e}h:{switch(q[m>>2]-1|0){case 1:if((i|0)==(k|0)){break a}i=k-i|0;i=((h|0)<(i|0)?i:h)>>>6|0;h=(h|0)>-1?h:-1;h=w(i,(h|0)<1?h:1);m=h>>>0>1?h:1;i=0;while(1){i:{h=(i<<6)+k|0;if(q[h+48>>2]!=1|((x|0)!=q[h+24>>2]|(y|0)!=q[h+28>>2])){break i}if(!lz(q[h+44>>2])){break i}break d}i=i+1|0;if((m|0)==(i|0)){break e}k=q[a+8>>2];if(q[a+12>>2]-k>>6>>>0>i>>>0){continue}break}break a;case 0:break f;default:break h}}i=k-i|0;i=((h|0)<(i|0)?i:h)>>>6|0;h=(h|0)>-1?h:-1;h=w(i,(h|0)<1?h:1);if((h>>>0>1?h:1)-1>>>0>=h>>>0){break a}break e}q[g>>2]=-100;k=-2;break b}if((i|0)==(k|0)){break a}i=k-i|0;i=((h|0)<(i|0)?i:h)>>>6|0;h=(h|0)>-1?h:-1;h=w(i,(h|0)<1?h:1);m=h>>>0>1?h:1;i=0;while(1){j:{h=(i<<6)+k|0;if(q[h+48>>2]!=1|((x|0)!=q[h+24>>2]|(y|0)!=q[h+28>>2])){break j}if(!mz(q[h+44>>2])){break j}break d}i=i+1|0;if((m|0)==(i|0)){break e}k=q[a+8>>2];if(q[a+12>>2]-k>>6>>>0>i>>>0){continue}break}break a}k:{i=q[a+12>>2];m=q[a+8>>2];h=i-m|0;if(h){i=m-i|0;i=((h|0)<(i|0)?i:h)>>>6|0;h=(h|0)>-1?h:-1;h=w(i,(h|0)<1?h:1);h=h>>>0>1?h:1;i=0;while(1){v=m+(i<<6)|0;if(!q[v+48>>2]){break k}i=i+1|0;if((h|0)!=(i|0)){continue}break}}k=-1;Bj(u);break b}q[v+48>>2]=2;Bj(u);q[j+60>>2]=-1;u=0;q[j+56>>2]=0;q[j+136>>2]=q[j+80>>2];h=q[j+76>>2];q[j+128>>2]=q[j+72>>2];q[j+132>>2]=h;h=q[j+68>>2];q[j+120>>2]=q[j+64>>2];q[j+124>>2]=h;h=Jk();n=Li;q[j+104>>2]=q[j+136>>2];k=q[j+132>>2];q[j+96>>2]=q[j+128>>2];q[j+100>>2]=k;k=q[j+124>>2];l=q[j+120>>2];q[j+88>>2]=l;q[j+92>>2]=k;k=$1(l,j+60|0);q[g>>2]=k;A=i<<6;l:{m:{n:{o:{if(k){break o}k=q[j+60>>2];if((e|0)>=1){l=rG(k,0);q[g>>2]=l;k=q[j+60>>2];if(l){Cm(k);break o}q[j+24>>2]=q[j+104>>2];l=q[j+100>>2];q[j+16>>2]=q[j+96>>2];q[j+20>>2]=l;l=q[j+92>>2];q[j+8>>2]=q[j+88>>2];q[j+12>>2]=l;k=xG(k,j+8|0,c);q[g>>2]=k;if(k){Cm(q[j+60>>2]);break o}k=tG(j+144|0);DM(k);sG(k,1,q[j+60>>2]);z=uG(k,e);q[g>>2]=z;l=q[j+60>>2];if((z|0)==-3){Cm(l);if(o[k+12|0]&1){break o}b=q[k>>2];if(!b){break o}Ni(b);break o}l=rG(l,1);q[g>>2]=l;if(l){Cm(q[j+60>>2]);if(o[k+12|0]&1){break o}b=q[k>>2];if(!b){break o}Ni(b);break o}p:{if(o[k+12|0]&1){break p}k=q[k>>2];if(!k){break p}Ni(k)}k=Jk();l=k-h|0;if((Li|0)==((h>>>0>k>>>0)+n|0)&e>>>0>=l>>>0){break m}Cm(q[j+60>>2]);q[j+60>>2]=-1;k=-2;break l}q[j+48>>2]=q[j+104>>2];h=q[j+100>>2];q[j+40>>2]=q[j+96>>2];q[j+44>>2]=h;h=q[j+92>>2];q[j+32>>2]=q[j+88>>2];q[j+36>>2]=h;h=xG(k,j+32|0,c);q[g>>2]=h;if(!h){break n}Cm(q[j+60>>2])}q[j+60>>2]=-1;k=-2;break l}Jk()}k=0;u=1;if(!d){break l}b=x5(q[j+60>>2],b,e,e>>31,j+56|0);if(!b){break l}u=0;q[j+56>>2]=0;k=-3;q[g>>2]=(b|0)==-2002?-3:-1e3}d=m+A|0;g=q[a+28>>2];Gj(g);q:{if(u){b=s[a+24>>1];e=b?b:1;p[a+24>>1]=e+1;b=m+(i<<6)|0;p[b+54>>1]=e;q[f>>2]=i&65535|e<<16;q[b+44>>2]=q[j+60>>2];e=q[j+56>>2];p[b+56>>1]=0;q[b+24>>2]=x;q[b+28>>2]=y;q[b+40>>2]=e;q[v+48>>2]=2;e=Aza(q[a>>2],q[a+4>>2],1e6,0);h=Li;i=Jk();f=i+e|0;e=Li+h|0;a=b;q[a+32>>2]=f;q[a+36>>2]=f>>>0>>0?e+1|0:e;q[d+16>>2]=q[j+80>>2];a=q[j+76>>2];q[d+8>>2]=q[j+72>>2];q[d+12>>2]=a;a=q[j+68>>2];q[d>>2]=q[j+64>>2];q[d+4>>2]=a;p[b+52>>1]=c;o[b+58|0]=r[b+58|0]&254;break q}q[v+48>>2]=0;b=m+(i<<6)|0;c=b;a=q[b+40>>2];if(a){ht(a);q[c+40>>2]=0}a=q[b+44>>2];if((a|0)!=-1){qp(a);Cm(q[b+44>>2])}a=d;q[a>>2]=0;q[a+4>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[b+44>>2]=-1;q[c+40>>2]=0;q[v+48>>2]=0}Bj(g);break b}q[h+48>>2]=2;b=(i<<6)+k|0;p[b+56>>1]=s[b+56>>1]+1;c=a;a=s[a+24>>1];a=a?a:1;p[c+24>>1]=a+1;p[b+54>>1]=a;q[f>>2]=i&65535|a<<16;k=0;Bj(u)}Ii=j+160|0;return k}J(167814,167666,479,167825);G()}function qU(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,u=0;g=Ii-4192|0;Ii=g;a:{d=q[a+4>>2];b=q[a>>2];b:{if(!d&b>>>0<=21){q[a+28>>2]=8;break b}c:{i=(d|0)>0?1:(d|0)>=0?b>>>0>4096:0;j=i?b-4096|0:0;e=j;k=i?d-(b>>>0<4096)|0:0;f=d-(k+(b>>>0>>0)|0)|0;b=b-e|0;h=!f&b>>>0<4096?b:4096;if((h|0)!=(Mi[q[a+56>>2]](q[a+68>>2],e,k,g+96|0,h)|0)){break c}d:{while(1){if(h>>>0>=4){e=h-4|0;f=0;while(1){b=(g+96|0)+e|0;if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))==101010256){i=q[a>>2];m=q[a+4>>2];d=j;l=d+e|0;b=f+k|0;b=d>>>0>l>>>0?b+1|0:b;d=l;m=m-((d>>>0>i>>>0)+b|0)|0;i=i-d|0;if(!m&i>>>0>21|m){break d}}d=(f|0)>0?1:(f|0)>=0?!!e:0;b=e;e=b-1|0;f=f-(b>>>0<1)|0;if(d){continue}break}}if(j|k){e=q[a+4>>2];b=q[a>>2];f=j;d=e-((b>>>0>>0)+k|0)|0;f=b-f|0;if(!d&f>>>0>65556|d){break c}d=!k&j>>>0>4093|(k|0)!=0;i=d?j:4093;j=i-4093|0;f=j;k=(d?k:0)-(i>>>0<4093)|0;d=e-(k+(b>>>0>>0)|0)|0;b=b-f|0;h=!d&b>>>0<4096?b:4096;if((h|0)==(Mi[q[a+56>>2]](q[a+68>>2],f,k,g+96|0,h)|0)){continue}break c}break}if(a){break c}h=0;break b}if((Mi[q[a+56>>2]](q[a+68>>2],d,b,g+96|0,22)|0)!=22){q[a+28>>2]=20;h=0;break b}if(q[g+96>>2]!=101010256){q[a+28>>2]=8;h=0;break b}e:{if((b|0)<0?1:(b|0)<=0?d>>>0<76:0){break e}if((Mi[q[a+56>>2]](q[a+68>>2],d-20|0,b-(d>>>0<20)|0,g- -64|0,20)|0)!=20|q[g+64>>2]!=117853008){break e}b=q[a>>2];f=b-56|0;j=q[g+76>>2];d=j;b=q[a+4>>2]-(b>>>0<56)|0;e=q[g+72>>2];if((d|0)==(b|0)&f>>>0>>0|b>>>0>>0){q[a+28>>2]=8;h=0;break b}if((Mi[q[a+56>>2]](q[a+68>>2],e,j,g,56)|0)!=56|q[g>>2]!=101075792){break e}q[q[a+72>>2]+52>>2]=1}c=s[g+106>>1];q[a+16>>2]=c;n=q[a+72>>2];f:{if(!q[n+52>>2]){e=q[g+112>>2];f=0;d=q[g+108>>2];o=s[g+100>>1];h=s[g+104>>1];b=s[g+102>>1];break f}if(!q[g+8>>2]&t[g+4>>2]<=43){q[a+28>>2]=9;h=0;break b}if(q[g+80>>2]!=1){q[a+28>>2]=10;h=0;break b}if(r[g+36|0]|r[g+37|0]<<8|r[g+38|0]<<16|r[g+39|0]<<24){q[a+28>>2]=2;h=0;break b}f=r[g+44|0];j=r[g+45|0];e=r[g+46|0];i=r[g+47|0];l=r[g+28|0];b=r[g+29|0];k=r[g+30|0];m=r[g+31|0];d=q[g+40>>2];h=q[g+24>>2];c=q[g+32>>2];q[a+16>>2]=c;o=b<<8;b=l;if(b|o|k<<16|m<<24){q[a+28>>2]=2;h=0;break b}j=j<<8;b=f;if(b|j|e<<16|i<<24){q[a+28>>2]=15;h=0;break b}e=q[g+48>>2];f=q[g+52>>2];o=q[g+16>>2];b=q[g+20>>2]}if((c|0)!=(h|0)){q[a+28>>2]=10;h=0;break b}if(!(!(b|o)|((o|0)==1?(b|0)==1:0))){q[a+28>>2]=10;h=0;break b}if(w(c,46)>>>0>d>>>0){q[a+28>>2]=9;h=0;break b}k=q[a>>2];i=q[a+4>>2];b=f;l=d+e|0;b=l>>>0>>0?b+1|0:b;j=l;if((b|0)==(i|0)&j>>>0>k>>>0|b>>>0>i>>>0){q[a+28>>2]=9;h=0;break b}q[a+8>>2]=e;q[a+12>>2]=f;h=1;if(!c){break b}g:{if(t[n+8>>2]>>0){b=q[n+12>>2];if(!b){break a}b=Mi[q[a+48>>2]](q[a+52>>2],q[n>>2],b,d)|0;if(!b){break g}q[n+8>>2]=d;q[n>>2]=b;c=q[a+16>>2]}q[n+4>>2]=d;b=q[a+72>>2];if(t[b+24>>2]>>0){j=q[b+28>>2];if(!j){break a}j=Mi[q[a+48>>2]](q[a+52>>2],q[b+16>>2],j,c)|0;if(!j){break g}q[b+24>>2]=c;q[b+16>>2]=j}q[b+20>>2]=c;if((Mi[q[a+56>>2]](q[a+68>>2],e,f,q[q[a+72>>2]>>2],d)|0)!=(d|0)){q[a+28>>2]=20;h=0;break b}if(q[a+16>>2]){b=f;f=e+46|0;b=f>>>0<46?b+1|0:b;u=f;j=b;c=q[q[a+72>>2]>>2];while(1){if(!((r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24))==33639248?d>>>0>=46:0)){q[a+28>>2]=9;h=0;break b}b=q[a+72>>2];q[q[b+16>>2]+(p<<2)>>2]=c-q[b>>2];m=r[c+24|0]|r[c+25|0]<<8|(r[c+26|0]<<16|r[c+27|0]<<24);k=r[c+20|0]|r[c+21|0]<<8|(r[c+22|0]<<16|r[c+23|0]<<24);h:{if(q[b+56>>2]){break h}l=r[c+30|0]|r[c+31|0]<<8;if(!l){break h}b=0;e=k>>>0>m>>>0?k:m;i=r[c+42|0]|r[c+43|0]<<8|(r[c+44|0]<<16|r[c+45|0]<<24);f=!b&e>>>0>i>>>0|(b|0)!=0;if(((f?e:i)|0)!=-1|(f?b:0)){break h}b=r[c+28|0]|r[c+29|0]<<8;i:{if((b+l|0)+46>>>0>d>>>0){e=Yi(l);if(!e){q[a+28>>2]=16;h=0;break b}f=e;i=b;n=b+u|0;b=j;if((Mi[q[a+56>>2]](q[a+68>>2],n,i>>>0>n>>>0?b+1|0:b,e,l)|0)==(l|0)){break i}Ni(e);q[a+28>>2]=20;h=0;break b}e=(b+c|0)+46|0;f=0}while(1){if(l>>>0<=3){Ni(f);h=0;if(!a){break b}q[a+28>>2]=9;break b}b=r[e+2|0]|r[e+3|0]<<8;i=b+4|0;if(i>>>0>l>>>0){Ni(f);h=0;if(!a){break b}q[a+28>>2]=9;break b}j:{if((r[e|0]|r[e+1|0]<<8)==1){b=q[a+72>>2];q[b+52>>2]=1;q[b+56>>2]=1;break j}e=e+i|0;l=(l-b|0)-4|0;if(l){continue}}break}Ni(f)}f=(k|0)==-1;if(!(f|(m|0)==-1|(!m|k?!(r[c+10|0]|r[c+11|0]<<8|(r[c+12|0]<<16|r[c+13|0]<<24)?0:(k|0)!=(m|0)):0))){h=0;if(!a){break b}q[a+28>>2]=9;break b}b=r[c+34|0]|r[c+35|0]<<8;if(!((b|0)==(o|0)|(b|0)==1?(b|0)!=65535:0)){h=0;if(!a){break b}q[a+28>>2]=10;break b}k:{if(f){break k}i=q[a>>2];f=q[a+4>>2];l=r[c+42|0]|r[c+43|0]<<8|(r[c+44|0]<<16|r[c+45|0]<<24);e=l+k|0;b=0;b=e>>>0>>0?1:b;e=e+30|0;if(e>>>0<30){b=b+1|0}if((b|0)==(f|0)&e>>>0<=i>>>0|b>>>0>>0){break k}q[a+28>>2]=9;h=0;break b}if(r[c+9|0]&32){h=0;if(!a){break b}q[a+28>>2]=5;break b}b=(((r[c+28|0]|r[c+29|0]<<8)+(r[c+30|0]|r[c+31|0]<<8)|0)+(r[c+32|0]|r[c+33|0]<<8)|0)+46|0;if(b>>>0>d>>>0){h=0;if(!a){break b}q[a+28>>2]=9;break b}c=b+c|0;d=d-b|0;p=p+1|0;if(p>>>0>2]){continue}break}}break b}q[a+28>>2]=16;h=0;break b}q[a+28>>2]=7;h=0}Ii=g+4192|0;return h}J(184659,184616,4362,184682);G()}function ro(a){var b=0,c=0,d=0,e=0,f=0;b=Aza(q[a+8>>2],q[a+12>>2],1540483477,-962287725);e=Li;c=Aza(b^e>>>15,e,1540483477,-962287725);q[a+8>>2]=c;d=Li;q[a+12>>2]=d;c=Aza(Aza(q[a>>2],q[a+4>>2],1540483477,-962287725)^c,Li^d,1540483477,-962287725);e=Li;d=Aza(q[a+20>>2],0,1540483477,-962287725);f=Li;d=Aza(d^f>>>15,f,1540483477,-962287725)^c;e=Li^e;d=Aza(d^e>>>15,e,1540483477,-962287725);e=Li;q[a>>2]=d^e>>>15;q[a+4>>2]=e;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b:{c:{d:{e:{if(!(!r[852468]|!q[a+24>>2]|t[a+20>>2]>1024)){f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}e=q[213116];Gj(e);g:{if(o[852568]&1){break g}if(!fk(852568)){break g}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b=q[a>>2];d=q[a+4>>2];h:{i:{c=q[213127];j:{if(!c){break j}c=q[q[213126]+(Cza(b,d,c)<<2)>>2];if((c|0)==-1){break j}f=q[213128];while(1){c=f+w(c,24)|0;if((b|0)==q[c>>2]&(d|0)==q[c+4>>2]){break i}c=q[c+16>>2];if((c|0)!=-1){continue}break}}if(q[213132]==((q[213130]-q[213128]|0)/24|0)){k:{if(o[852568]&1){break k}if(!fk(852568)){break k}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b=(q[213130]-q[213128]|0)/24|0;l:{if(o[852568]&1){break l}if(!fk(852568)){break l}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;d=Wj();o[852468]=0;q[213116]=d;ek(852568)}Sv(852504,1024,b+256|0);d=q[a+4>>2];b=q[a>>2]}m:{if(o[852568]&1){break m}if(!fk(852568)){break m}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}f=q[a+24>>2];c=q[213134];if(f>>>0>=q[213135]-c>>3>>>0){break b}CA(852504,b,d,c+(f<<3)|0);break h}n:{if(o[852568]&1){break n}if(!fk(852568)){break n}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}d=q[a+24>>2];b=q[213134];if(d>>>0>=q[213135]-b>>3>>>0){break b}Ni(q[b+(d<<3)>>2])}o:{if(o[852568]&1){break o}if(!fk(852568)){break o}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}d=q[a+24>>2];if(!d){break e}c=q[213138];if(!c){break d}b=q[213140]-1|0;if(b>>>0>=t[213139]){break c}q[213140]=b;q[(b<<2)+c>>2]=d;q[a+24>>2]=0;Bj(e)}Li=q[a+4>>2];return q[a>>2]}J(165779,165430,131,165795);G()}J(165646,165621,140,165677);G()}J(165682,165621,141,165677);G()}J(165931,165533,479,165942);G()}function XK(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=0,n=0,p=0;d=Ii-176|0;Ii=d;g=q[b>>2];q[a+16>>2]=q[b+4>>2];q[a+352>>2]=q[g+76>>2];a:{b:{c:{d:{e:{f:{g:{h:{i:{if(q[b+12>>2]!=q[b+8>>2]){while(1){if(t[g+8>>2]<=c>>>0){break i}e=c<<3;f=q[e+q[g+4>>2]>>2];i=Oi(f);h=Li;j=q[b+8>>2];if(q[b+12>>2]-j>>2>>>0<=c>>>0){break b}k=q[b+24>>2];if(q[b+28>>2]-k>>3>>>0<=c>>>0){break b}e=e+k|0;e=zK(a,i,h,q[j+(c<<2)>>2],q[e>>2],q[e+4>>2]);if(e){break e}c=c+1|0;if(c>>>0>2]-q[b+8>>2]>>2>>>0){continue}break}}e=q[b+56>>2];if((e|0)!=q[b+60>>2]){c=0;while(1){f=q[q[g+92>>2]+(c<<3)>>2];e=Oea(a,f,q[(c<<2)+e>>2]);if(e){q[d+116>>2]=e;q[d+112>>2]=f;Pi(4,40439,41893,d+112|0);f=0;break d}c=c+1|0;e=q[b+56>>2];if(c>>>0>2]-e>>2>>>0){continue}break}}j:{k:{if(q[b+76>>2]==q[b+72>>2]){break k}c=0;while(1){if(t[g+112>>2]<=c>>>0){break j}e=q[q[g+108>>2]+(c<<3)>>2];f=Oi(e);i=Li;h=q[b+72>>2];if(q[b+76>>2]-h>>2>>>0<=c>>>0){break b}f=yK(a,f,i,q[h+(c<<2)>>2]);if(!f){c=c+1|0;if(c>>>0>=q[b+76>>2]-q[b+72>>2]>>2>>>0){break k}continue}break}q[d+100>>2]=f;q[d+96>>2]=e;Pi(4,40439,41941,d+96|0);f=0;break d}vK(a);l:{m:{c=q[b+40>>2];if((c|0)==q[b+44>>2]){break m}e=0;while(1){if(t[g+16>>2]<=e>>>0){break l}h=e<<3;f=h+c|0;c=q[f>>2];i=q[f+4>>2];f=q[i>>2];i=q[i+4>>2];h=q[h+q[g+12>>2]>>2];c=xK(a,Oi(h),Li,c?c:f,c?2:1,Mi[q[75017]](f,i)|0,Mi[q[75018]](f,i)|0);if(!c){e=e+1|0;c=q[b+40>>2];if(e>>>0>=q[b+44>>2]-c>>3>>>0){break m}continue}break}q[d+84>>2]=c;q[d+80>>2]=h;Pi(4,40439,41987,d+80|0);f=0;break d}n:{o:{c=q[g+60>>2];if(!c){break o}b=0;while(1){e=q[q[g+56>>2]+(b<<2)>>2];f=Qea(a,e);if(!f){b=b+1|0;if((c|0)==(b|0)){break o}if(t[g+60>>2]>b>>>0){continue}break n}break}q[d+68>>2]=f;q[d+64>>2]=e;Pi(4,40439,42028,d- -64|0);f=0;break d}p:{q:{i=q[g+72>>2];if(!i){break q}Nea(a,q[g+52>>2],i);b=0;while(1){if(t[g+72>>2]<=b>>>0){break p}c=q[q[g+68>>2]+w(b,12)>>2];e=Pea(a,c);if(!e){b=b+1|0;if((i|0)==(b|0)){break q}continue}break}q[d+52>>2]=e;q[d+48>>2]=c;Pi(4,40439,42067,d+48|0);f=0;break d}b=q[g+52>>2];if(!b){f=1;break f}c=0;e=1;if(i){break h}while(1){if(b>>>0<=c>>>0){break a}b=q[g+48>>2]+w(c,304)|0;f=q[b+292>>2];h=q[b+80>>2];j=q[b+48>>2];k=q[b+52>>2];l=u[b+56>>2];m=q[b+4>>2];n=q[b>>2];u[d+168>>2]=u[b+8>>2];q[d+160>>2]=n;q[d+164>>2]=m;u[d+152>>2]=l;q[d+144>>2]=j;q[d+148>>2]=k;r:{f=Wv(a,d+160|0,d+144|0,h,f);if(!f){e=0;break r}h=q[b+100>>2];if(h){SJ(a,f,h)}if(dB(a,f,b)){break r}f=0;break d}b=q[g+52>>2];c=c+1|0;if(b>>>0>c>>>0){continue}break}break g}break c}J(41214,42215,280,41006);G()}J(41214,42215,263,41006);G()}J(41214,42215,323,41006);G()}J(41214,42215,255,41006);G()}h=i&65535;while(1){if(b>>>0<=c>>>0){break a}b=q[g+48>>2]+w(c,304)|0;f=q[b+292>>2];j=q[b+80>>2];k=q[b+48>>2];m=q[b+52>>2];l=u[b+56>>2];n=q[b+4>>2];p=q[b>>2];u[d+168>>2]=u[b+8>>2];q[d+160>>2]=p;q[d+164>>2]=n;u[d+152>>2]=l;q[d+144>>2]=k;q[d+148>>2]=m;f=Wv(a,d+160|0,d+144|0,j,f);s:{if(!f){e=0;break s}j=q[b+100>>2];if(j){SJ(a,f,j)}if(!dB(a,f,b)){f=0;break d}PJ(a,f,b,0,h)}b=q[g+52>>2];c=c+1|0;if(b>>>0>c>>>0){continue}break}}f=0;if(!e){break f}f=1;if(!b){break f}c=0;while(1){if(b>>>0<=c>>>0){break a}e=q[g+48>>2]+w(c,304)|0;j=aw(a,q[e+100>>2]);b=0;h=q[e+168>>2];t:{if(!h|!r[h|0]){break t}b=aw(a,h);if(b){break t}q[d+32>>2]=q[e+168>>2];Pi(4,40439,42107,d+32|0);b=0;f=0}zr(a,j,b,0);b=q[g+52>>2];c=c+1|0;if(b>>>0>c>>>0){continue}break}}if(!i){break d}h=q[g+72>>2];c=0;u:{while(1){if(c>>>0>>0){j=w(c,12);k=yea(a,Oi(q[j+q[g+68>>2]>>2]),Li);h=q[g+72>>2];if(h>>>0<=c>>>0){break c}b=0;e=q[g+68>>2];if(q[(j+e|0)+8>>2]){while(1){e=q[(e+j|0)+4>>2]+w(b,304)|0;h=aw(a,q[e+100>>2]);v:{if(h){PJ(a,h,e,k,k);break v}q[d+16>>2]=q[e+100>>2];Pi(4,40439,42156,d+16|0)}h=q[g+72>>2];if(h>>>0<=c>>>0){break c}b=b+1|0;e=q[g+68>>2];if(b>>>0>2]){continue}break}}c=c+1|0;if((i|0)!=(c|0)){continue}break u}break}break c}b=d+168|0;q[b>>2]=0;q[b+4>>2]=0;q[d+160>>2]=0;q[d+164>>2]=0;g=i+1|0;Wi(g,8,d+160|0,b,d+160|4);w:{if(g>>>0>>0){break w}b=0;while(1){x:{c=lK(a,b&65535,d+144|0);if(!c){c=q[d+164>>2];if((c|0)!=q[d+168>>2]){break x}J(40939,40745,533,40963);G()}q[d>>2]=c;Pi(4,40439,41432,d);break w}q[d+164>>2]=c+8;e=q[d+148>>2];q[c>>2]=q[d+144>>2];q[c+4>>2]=e;b=b+1|0;if(g>>>0>(b&65535)>>>0){continue}break}}b=q[a+12>>2];q[d+140>>2]=q[b+20>>2];q[d+136>>2]=q[b+24>>2];g=q[q[a+12>>2]+172>>2];b=IH(g,q[d+140>>2],q[d+136>>2],0,d+160|0);c=Li;if((b|0)!=q[213712]|(c|0)!=q[213713]){OH(g,b,c,d+144|0);g=q[d+144>>2];q[a+396>>2]=q[d+148>>2];q[a+392>>2]=g;o[a+390|0]=r[a+390|0]|1;WJ(a,b,c)}if(o[d+172|0]&1){break d}a=q[d+160>>2];if(!a){break d}Ni(a);break d}q[d+132>>2]=e;q[d+128>>2]=f;Pi(4,40439,41855,d+128|0);f=0}Ii=d+176|0;return f}J(41214,42215,289,41006);G()}J(40995,40745,479,41006);G()}J(41214,42215,272,41006);G()}function Zx(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,t=0,u=0,x=0,y=0,z=0,A=0,B=0;h=Ii-80|0;Ii=h;q[h+76>>2]=b;B=h+55|0;y=h+56|0;b=0;a:{b:while(1){c:{if((t|0)<0){break c}if((2147483647-t|0)<(b|0)){q[240513]=61;t=-1;break c}t=b+t|0}d:{e:{f:{k=q[h+76>>2];b=k;i=r[b|0];if(i){while(1){g:{i=i&255;h:{if(!i){i=b;break h}if((i|0)!=37){break g}i=b;while(1){if(r[b+1|0]!=37){break h}j=b+2|0;q[h+76>>2]=j;i=i+1|0;l=r[b+2|0];b=j;if((l|0)==37){continue}break}}b=i-k|0;if(a){_l(a,k,b)}if(b){continue b}i=h;b=q[h+76>>2];i:{if(!(r[b+2|0]!=36|o[q[h+76>>2]+1|0]-48>>>0>=10)){x=o[b+1|0]-48|0;z=1;b=b+3|0;break i}x=-1;b=b+1|0}q[i+76>>2]=b;m=0;u=o[b|0];j=u-32|0;j:{if(j>>>0>31){i=b;break j}i=b;j=1<>2]=i;m=j|m;u=o[b+1|0];j=u-32|0;if(j>>>0>=32){break j}b=i;j=1<>>0>=10){break m}b=q[h+76>>2];if(r[b+2|0]!=36){break m}q[((o[b+1|0]<<2)+e|0)-192>>2]=10;n=q[((o[b+1|0]<<3)+d|0)-384>>2];z=1;b=b+3|0;break l}if(z){break f}z=0;n=0;if(a){b=q[c>>2];q[c>>2]=b+4;n=q[b>>2]}b=q[h+76>>2]+1|0}q[j+76>>2]=b;if((n|0)>-1){break k}n=0-n|0;m=m|8192;break k}n=LF(h+76|0);if((n|0)<0){break f}b=q[h+76>>2]}l=-1;n:{if(r[b|0]!=46){break n}if(r[b+1|0]==42){o:{if(o[b+2|0]-48>>>0>=10){break o}b=q[h+76>>2];if(r[b+3|0]!=36){break o}q[((o[b+2|0]<<2)+e|0)-192>>2]=10;l=q[((o[b+2|0]<<3)+d|0)-384>>2];b=b+4|0;q[h+76>>2]=b;break n}if(z){break f}if(a){b=q[c>>2];q[c>>2]=b+4;l=q[b>>2]}else{l=0}b=q[h+76>>2]+2|0;q[h+76>>2]=b;break n}q[h+76>>2]=b+1;l=LF(h+76|0);b=q[h+76>>2]}i=0;while(1){A=i;s=-1;if(o[b|0]-65>>>0>57){break a}u=b+1|0;q[h+76>>2]=u;i=o[b|0];b=u;i=r[(i+w(A,58)|0)+214207|0];if(i-1>>>0<8){continue}break}p:{q:{if((i|0)!=19){if(!i){break a}if((x|0)>=0){q[(x<<2)+e>>2]=i;b=(x<<3)+d|0;i=q[b+4>>2];q[h+64>>2]=q[b>>2];q[h+68>>2]=i;break q}if(!a){break d}QD(h- -64|0,i,c,g);u=q[h+76>>2];break p}if((x|0)>-1){break a}}b=0;if(!a){continue b}}j=m&-65537;i=m&8192?j:m;s=0;x=214247;m=y;r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{b=o[u-1|0];b=A?(b&15)==3?b&-33:b:b;switch(b-88|0){case 11:break r;case 9:case 13:case 14:case 15:break s;case 27:break x;case 12:case 17:break A;case 23:break B;case 0:case 32:break C;case 24:break D;case 22:break E;case 29:break F;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 10:case 16:case 18:case 19:case 20:case 21:case 25:case 26:case 28:case 30:case 31:break e;default:break G}}H:{switch(b-65|0){case 0:case 4:case 5:case 6:break s;case 2:break v;case 1:case 3:break e;default:break H}}if((b|0)==83){break w}break e}b=q[h+64>>2];k=q[h+68>>2];x=214247;break z}b=0;I:{switch(A&255){case 0:q[q[h+64>>2]>>2]=t;continue b;case 1:q[q[h+64>>2]>>2]=t;continue b;case 2:i=q[h+64>>2];q[i>>2]=t;q[i+4>>2]=t>>31;continue b;case 3:p[q[h+64>>2]>>1]=t;continue b;case 4:o[q[h+64>>2]]=t;continue b;case 6:q[q[h+64>>2]>>2]=t;continue b;case 7:break I;default:continue b}}i=q[h+64>>2];q[i>>2]=t;q[i+4>>2]=t>>31;continue b}l=l>>>0>8?l:8;i=i|8;b=120}k=X$(q[h+64>>2],q[h+68>>2],y,b&32);if(!(i&8)|!(q[h+64>>2]|q[h+68>>2])){break y}x=(b>>>4|0)+214247|0;s=2;break y}k=Y$(q[h+64>>2],q[h+68>>2],y);if(!(i&8)){break y}b=y-k|0;l=(b|0)<(l|0)?l:b+1|0;break y}j=q[h+68>>2];k=j;b=q[h+64>>2];if((j|0)<-1?1:(j|0)<=-1){k=0-(k+((b|0)!=0)|0)|0;b=0-b|0;q[h+64>>2]=b;q[h+68>>2]=k;s=1;x=214247;break z}if(i&2048){s=1;x=214248;break z}s=i&1;x=s?214249:214247}k=cr(b,k,y)}i=(l|0)>-1?i&-65537:i;b=q[h+64>>2];j=q[h+68>>2];if(!(!!(b|j)|l)){l=0;k=y;break e}b=!(b|j)+(y-k|0)|0;l=(b|0)<(l|0)?l:b;break e}b=q[h+64>>2];k=b?b:214257;b=Oq(k,0,l);m=b?b:l+k|0;i=j;l=b?b-k|0:l;break e}j=q[h+64>>2];if(l){break u}b=0;xm(a,32,n,0,i);break t}q[h+12>>2]=0;q[h+8>>2]=q[h+64>>2];q[h+64>>2]=h+8;l=-1;j=h+8|0}b=0;J:{while(1){k=q[j>>2];if(!k){break J}k=EC(h+4|0,k);m=(k|0)<0;if(!(m|k>>>0>l-b>>>0)){j=j+4|0;b=b+k|0;if(l>>>0>b>>>0){continue}break J}break}s=-1;if(m){break a}}xm(a,32,n,b,i);if(!b){b=0;break t}u=0;j=q[h+64>>2];while(1){k=q[j>>2];if(!k){break t}k=EC(h+4|0,k);u=k+u|0;if((u|0)>(b|0)){break t}_l(a,h+4|0,k);j=j+4|0;if(b>>>0>u>>>0){continue}break}}xm(a,32,n,b,i^8192);b=(b|0)<(n|0)?n:b;continue b}b=Mi[f|0](a,v[h+64>>3],n,l,i,b)|0;continue b}o[h+55|0]=q[h+64>>2];l=1;k=B;i=j;break e}j=b+1|0;q[h+76>>2]=j;i=r[b+1|0];b=j;continue}}s=t;if(a){break a}if(!z){break d}b=1;while(1){a=q[(b<<2)+e>>2];if(a){QD((b<<3)+d|0,a,c,g);s=1;b=b+1|0;if((b|0)!=10){continue}break a}break}s=1;if(b>>>0>=10){break a}while(1){if(q[(b<<2)+e>>2]){break f}b=b+1|0;if((b|0)!=10){continue}break}break a}s=-1;break a}m=m-k|0;l=(l|0)<(m|0)?m:l;j=l+s|0;b=(j|0)>(n|0)?j:n;xm(a,32,b,j,i);_l(a,x,s);xm(a,48,b,j,i^65536);xm(a,48,l,m,0);_l(a,k,m);xm(a,32,b,j,i^8192);continue}break}s=0}Ii=h+80|0;return s}function Fn(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;a:{b:while(1){n=b+1|0;s=b-1|0;while(1){c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{f=c;d=r[c|0];if((d|0)!=37){m:{n:{o:{c=d<<24>>24;switch(c-36|0){case 1:case 2:case 3:break k;case 0:break l;case 5:break m;case 4:break n;default:break o}}if(c){break k}return b}if(r[f+1|0]==41){c=q[a+12>>2];if((c|0)>=32){Qi(q[a+8>>2],146427,0)}d=(c<<3)+a|0;q[d+20>>2]=-2;q[d+16>>2]=b;q[a+12>>2]=c+1;h=Fn(a,b,f+2|0);if(h){break c}break a}c=q[a+12>>2];if((c|0)>=32){Qi(q[a+8>>2],146427,0)}d=(c<<3)+a|0;q[d+20>>2]=-1;q[d+16>>2]=b;q[a+12>>2]=c+1;h=Fn(a,b,f+1|0);if(h){break c}break a}g=f+1|0;d=q[a+12>>2];p:{while(1){if((d|0)>=1){d=d-1|0;if(q[((d<<3)+a|0)+20>>2]!=-1){continue}break p}break}d=Qi(q[a+8>>2],146445,0)}c=(d<<3)+a|0;q[c+20>>2]=b-q[c+16>>2];h=Fn(a,b,g);if(h){break c}q[c+20>>2]=-1;return 0}q:{d=o[f+1|0];c=d&255;if((c|0)!=102){if((d|0)!=98){break q}d=r[f+2|0];if(!(r[f+3|0]?d:0)){Qi(q[a+8>>2],146469,0);d=r[f+2|0]}h=0;c=d&255;if((c|0)!=r[b|0]){break c}e=1;d=b+1|0;g=q[a+4>>2];if(d>>>0>=g>>>0){break c}i=r[f+3|0];while(1){j=r[b+1|0];r:{if((j|0)==(i|0)){e=e-1|0;if(e){break r}c=f+4|0;b=b+2|0;continue b}e=((c|0)==(j|0))+e|0}b=d;d=d+1|0;if((g|0)!=(d|0)){continue}break}break c}if(r[f+2|0]==91){i=f+3|0;break e}Qi(q[a+8>>2],146392,0);i=f+3|0;d=o[f+2|0];if((d|0)==91){break e}c=i;if((d|0)!=37){break d}if(!r[i|0]){Qi(q[a+8>>2],146488,0)}c=f+4|0;break d}if(c-48>>>0>=10){if(!d){Qi(q[a+8>>2],146488,0)}i=f+1|0;c=f+2|0;break j}s:{t:{if(c>>>0<49){break t}e=c-49|0;if((e|0)>=q[a+12>>2]){break t}d=q[((e<<3)+a|0)+20>>2];if((d|0)!=-1){break s}}e=Qi(q[a+8>>2],146555,0);d=q[((e<<3)+a|0)+20>>2]}h=0;if(q[a+4>>2]-b>>>0>>0){break c}if(Ej(q[((e<<3)+a|0)+16>>2],b,d)|!b){break c}c=f+2|0;b=b+d|0;continue b}if(!r[f+1|0]){break i}i=f+1|0;c=i;break j}i=f+1|0;c=i;if((d|0)!=91){break j}c=r[f+1|0]==94;d=c?f+2|0:i;e=r[f+(c?2:1)|0];while(1){c=d+1|0;if(!(e&255)){Qi(q[a+8>>2],146523,0);e=r[d|0]}if(!((e&255)!=37)){c=r[d+1|0]?d+2|0:c}d=c;e=r[d|0];if((e|0)!=93){continue}break}c=d+1|0}d=0;if(t[a+4>>2]<=b>>>0){break f}h=r[b|0];g=1;u:{v:{w:{d=o[f|0];switch(d-37|0){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break u;case 0:break w;case 9:break g;default:break v}}g=fp(h,r[i|0]);break g}if((d|0)==91){break h}}g=(h|0)==(d&255);break g}h=q[a+4>>2]==(b|0)?b:0;break c}j=r[f+1|0];g=(j|0)==94;d=g?i:f;e=d+1|0;l=c-1|0;if(e>>>0>=l>>>0){break g}j=(j|0)!=94;while(1){k=r[d+2|0];x:{y:{m=r[d+1|0];if((m|0)==37){if(!fp(h,k)){break y}g=j;break g}z:{if((k|0)!=45){break z}d=d+3|0;if(l>>>0<=d>>>0){break z}if(h>>>0>>0|h>>>0>r[d|0]){break x}g=j;break g}d=e;if((h|0)!=(m|0)){break x}g=j;break g}d=d+2|0}e=d+1|0;if(l>>>0>e>>>0){continue}break}}d=(g|0)!=0}g=o[c|0];if((g|0)!=63){A:{switch(g-42|0){case 3:m=c+1|0;h=Fn(a,b,m);if(h){break c}n=c-1|0;while(1){h=0;if(t[a+4>>2]<=b>>>0){break c}e=r[b|0];B:{C:{D:{E:{F:{G:{c=o[f|0];switch(c-37|0){case 9:break B;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break E;case 0:break G;default:break F}}c=fp(e,r[i|0]);break C}if((c|0)==91){break D}}c=(e|0)==(c&255);break C}g=r[f+1|0];c=(g|0)==94;d=c?i:f;j=d+1|0;if(n>>>0<=j>>>0){break C}g=(g|0)!=94;while(1){l=r[d+2|0];H:{I:{k=r[d+1|0];if((k|0)==37){if(!fp(e,l)){break I}c=g;break C}J:{if((l|0)!=45){break J}d=d+3|0;if(n>>>0<=d>>>0){break J}if(e>>>0>>0|e>>>0>r[d|0]){break H}c=g;break C}d=j;if((e|0)!=(k|0)){break H}c=g;break C}d=d+2|0}j=d+1|0;if(n>>>0>j>>>0){continue}break}}if(!c){break c}}b=b+1|0;h=Fn(a,b,m);if(!h){continue}break}break c;default:if(!d){return 0}b=n;continue b;case 1:h=0;if(!d){break c}return YE(a,b+1|0,f,c);case 0:break A}}return YE(a,b,f,c)}if(d){h=Fn(a,n,c+1|0);if(h){break c}}c=c+1|0;continue}c=r[f+3|0]==94;d=c?f+4|0:i;e=r[f+(c?4:3)|0];while(1){c=d+1|0;if(!(e&255)){Qi(q[a+8>>2],146523,0);e=r[d|0]}if(!((e&255)!=37)){c=r[d+1|0]?d+2|0:c}d=c;e=r[d|0];if((e|0)!=93){continue}break}c=d+1|0}h=0;d=0;d=q[a>>2]!=(b|0)?r[s|0]:d;j=f+2|0;g=r[i|0];f=(g|0)==94;e=f?i:j;i=e+1|0;l=c-1|0;if(i>>>0>=l>>>0){break c}k=d&255;g=(g|0)!=94;j=i;d=e;K:{while(1){m=r[d+2|0];L:{M:{p=r[d+1|0];if((p|0)==37){if(!fp(k,m)){break M}d=g;break K}N:{if((m|0)!=45){break N}d=d+3|0;if(l>>>0<=d>>>0){break N}if(k>>>0

>>0|k>>>0>r[d|0]){break L}d=g;break K}d=j;if((k|0)!=(p|0)){break L}d=g;break K}d=d+2|0}j=d+1|0;if(l>>>0>j>>>0){continue}break}d=f}if(d){break c}d=r[b|0];O:{while(1){j=r[e+2|0];k=r[e+1|0];P:{if((k|0)==37){if(fp(d,j)){break O}e=e+2|0;break P}Q:{if((j|0)!=45){break Q}e=e+3|0;if(l>>>0<=e>>>0){break Q}if(d>>>0>>0|d>>>0>r[e|0]){break P}break O}e=i;if((d|0)==(k|0)){break O}}i=e+1|0;if(l>>>0>i>>>0){continue}break}g=f}if(g){continue}}break}break}return h}q[a+12>>2]=q[a+12>>2]-1;return 0}function Dva(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-800|0;Ii=d;g=-56;a:{if(c>>>0>384){break a}g=0;Ui(d+384|0,0,416);Hs(d+8|0);o[d+407|0]=48;o[d+403|0]=c;o[d+402|0]=c>>>8;p[d+400>>1]=0;o[Ti(d+408|0,b,c)+c|0]=128;q[d+328>>2]=454695192;q[d+332>>2]=522067228;q[d+320>>2]=319951120;q[d+324>>2]=387323156;q[d+312>>2]=185207048;q[d+316>>2]=252579084;q[d+304>>2]=50462976;q[d+308>>2]=117835012;e=Yq(d+8|0,d+304|0,256);b:{if(e){break b}q[d+296>>2]=0;q[d+300>>2]=0;q[d+288>>2]=0;q[d+292>>2]=0;b=d+384|0;f=c+25|0;c=f;while(1){if(c){o[d+288|0]=r[d+288|0]^r[b|0];o[d+289|0]=r[d+289|0]^r[b+1|0];o[d+290|0]=r[d+290|0]^r[b+2|0];o[d+291|0]=r[d+291|0]^r[b+3|0];o[d+292|0]=r[d+292|0]^r[b+4|0];o[d+293|0]=r[d+293|0]^r[b+5|0];o[d+294|0]=r[d+294|0]^r[b+6|0];o[d+295|0]=r[d+295|0]^r[b+7|0];o[d+296|0]=r[d+296|0]^r[b+8|0];o[d+297|0]=r[d+297|0]^r[b+9|0];o[d+298|0]=r[d+298|0]^r[b+10|0];o[d+299|0]=r[d+299|0]^r[b+11|0];o[d+300|0]=r[d+300|0]^r[b+12|0];o[d+301|0]=r[d+301|0]^r[b+13|0];o[d+302|0]=r[d+302|0]^r[b+14|0];o[d+303|0]=r[d+303|0]^r[b+15|0];e=c-16|0;c=c>>>0>>0?0:e;b=b+16|0;e=Km(d+8|0,1,d+288|0,d+288|0);if(!e){continue}break b}break}b=q[d+300>>2];q[d+344>>2]=q[d+296>>2];q[d+348>>2]=b;b=q[d+292>>2];q[d+336>>2]=q[d+288>>2];q[d+340>>2]=b;q[d+288>>2]=0;q[d+292>>2]=0;q[d+296>>2]=0;q[d+300>>2]=0;o[d+387|0]=r[d+387|0]+1;b=d+384|0;c=f;while(1){if(c){o[d+288|0]=r[d+288|0]^r[b|0];o[d+289|0]=r[d+289|0]^r[b+1|0];o[d+290|0]=r[d+290|0]^r[b+2|0];o[d+291|0]=r[d+291|0]^r[b+3|0];o[d+292|0]=r[d+292|0]^r[b+4|0];o[d+293|0]=r[d+293|0]^r[b+5|0];o[d+294|0]=r[d+294|0]^r[b+6|0];o[d+295|0]=r[d+295|0]^r[b+7|0];o[d+296|0]=r[d+296|0]^r[b+8|0];o[d+297|0]=r[d+297|0]^r[b+9|0];o[d+298|0]=r[d+298|0]^r[b+10|0];o[d+299|0]=r[d+299|0]^r[b+11|0];o[d+300|0]=r[d+300|0]^r[b+12|0];o[d+301|0]=r[d+301|0]^r[b+13|0];o[d+302|0]=r[d+302|0]^r[b+14|0];o[d+303|0]=r[d+303|0]^r[b+15|0];e=c-16|0;c=c>>>0>>0?0:e;b=b+16|0;e=Km(d+8|0,1,d+288|0,d+288|0);if(!e){continue}break b}break}b=q[d+300>>2];q[d+360>>2]=q[d+296>>2];q[d+364>>2]=b;b=q[d+292>>2];q[d+352>>2]=q[d+288>>2];q[d+356>>2]=b;q[d+288>>2]=0;q[d+292>>2]=0;q[d+296>>2]=0;q[d+300>>2]=0;o[d+387|0]=r[d+387|0]+1;b=d+384|0;while(1){if(f){o[d+288|0]=r[d+288|0]^r[b|0];o[d+289|0]=r[d+289|0]^r[b+1|0];o[d+290|0]=r[d+290|0]^r[b+2|0];o[d+291|0]=r[d+291|0]^r[b+3|0];o[d+292|0]=r[d+292|0]^r[b+4|0];o[d+293|0]=r[d+293|0]^r[b+5|0];o[d+294|0]=r[d+294|0]^r[b+6|0];o[d+295|0]=r[d+295|0]^r[b+7|0];o[d+296|0]=r[d+296|0]^r[b+8|0];o[d+297|0]=r[d+297|0]^r[b+9|0];o[d+298|0]=r[d+298|0]^r[b+10|0];o[d+299|0]=r[d+299|0]^r[b+11|0];o[d+300|0]=r[d+300|0]^r[b+12|0];o[d+301|0]=r[d+301|0]^r[b+13|0];o[d+302|0]=r[d+302|0]^r[b+14|0];o[d+303|0]=r[d+303|0]^r[b+15|0];c=f-16|0;f=c>>>0>f>>>0?0:c;b=b+16|0;e=Km(d+8|0,1,d+288|0,d+288|0);if(!e){continue}break b}break}b=q[d+300>>2];q[d+376>>2]=q[d+296>>2];q[d+380>>2]=b;b=q[d+292>>2];q[d+368>>2]=q[d+288>>2];q[d+372>>2]=b;o[d+387|0]=r[d+387|0]+1;e=Yq(d+8|0,d+336|0,256);if(e){break b}b=d+368|0;e=Km(d+8|0,1,b,b);if(e){break b}c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);e=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);o[a|0]=e;o[a+1|0]=e>>>8;o[a+2|0]=e>>>16;o[a+3|0]=e>>>24;o[a+4|0]=c;o[a+5|0]=c>>>8;o[a+6|0]=c>>>16;o[a+7|0]=c>>>24;c=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);e=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);o[a+8|0]=e;o[a+9|0]=e>>>8;o[a+10|0]=e>>>16;o[a+11|0]=e>>>24;o[a+12|0]=c;o[a+13|0]=c>>>8;o[a+14|0]=c>>>16;o[a+15|0]=c>>>24;e=Km(d+8|0,1,b,b);if(e){break b}c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);e=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);o[a+16|0]=e;o[a+17|0]=e>>>8;o[a+18|0]=e>>>16;o[a+19|0]=e>>>24;o[a+20|0]=c;o[a+21|0]=c>>>8;o[a+22|0]=c>>>16;o[a+23|0]=c>>>24;c=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);e=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);o[a+24|0]=e;o[a+25|0]=e>>>8;o[a+26|0]=e>>>16;o[a+27|0]=e>>>24;o[a+28|0]=c;o[a+29|0]=c>>>8;o[a+30|0]=c>>>16;o[a+31|0]=c>>>24;e=Km(d+8|0,1,b,b);if(e){break b}c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);e=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);o[a+32|0]=e;o[a+33|0]=e>>>8;o[a+34|0]=e>>>16;o[a+35|0]=e>>>24;o[a+36|0]=c;o[a+37|0]=c>>>8;o[a+38|0]=c>>>16;o[a+39|0]=c>>>24;c=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);b=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);o[a+40|0]=b;o[a+41|0]=b>>>8;o[a+42|0]=b>>>16;o[a+43|0]=b>>>24;o[a+44|0]=c;o[a+45|0]=c>>>8;o[a+46|0]=c>>>16;o[a+47|0]=c>>>24;e=0}b=d+8|0;if(b){Mi[q[65677]](b,0,280)|0}Mi[q[65677]](d+384|0,0,416)|0;Mi[q[65677]](d+336|0,0,48)|0;Mi[q[65677]](d+304|0,0,32)|0;Mi[q[65677]](d+288|0,0,16)|0;if(!e){break a}Mi[q[65677]](a,0,48)|0;g=e}Ii=d+800|0;return g}function dsa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=x(0),h=0,i=0,j=0,k=0,l=x(0),m=0,n=0,t=0,y=0,z=0,B=0,C=0;h=Ii-224|0;Ii=h;q[h+216>>2]=0;f=q[a+8>>2];o[f+108|0]=r[f+108|0]|1;C=q[f+4>>2]-q[f>>2]|0;k=(C|0)/104|0;q[71406]=k+q[71406];d=k;q[h+56>>2]=d;q[h+60>>2]=0;q[h+208>>2]=d;q[h+212>>2]=0;a:{b:{c:{d:{e:{f:{if(!C){break f}m=k>>>0>1?k:1;g:{while(1){d=q[f>>2];if((q[f+4>>2]-d|0)/104>>>0>c>>>0){d=d+w(c,104)|0;e=r[d+96|0];h:{if(!(e&1)|!(e&16)|u[d+60>>2]>u[q[a+4>>2]+4>>2]){break h}o[d+96|0]=e&239;i:{if(e&4){break i}e=q[d+48>>2];if(e){u[d+52>>2]=u[e>>2];break i}e=Hp(h+96|0);i=q[d+16>>2];j=q[d+20>>2];n=q[d+8>>2];z=q[d+12>>2];B=q[d>>2];y=q[h+92>>2];q[h+48>>2]=q[h+88>>2];q[h+52>>2]=y;q[h+80>>2]=0;y=q[h+84>>2];q[h+40>>2]=q[h+80>>2];q[h+44>>2]=y;uq(B,n,z,i,j,h+40|0,e);u[d+52>>2]=v[h+136>>3]}e=q[f+48>>2];if(!e){break h}j=q[d>>2];i=q[q[f+44>>2]+((j>>>0)%(e>>>0)<<2)>>2];if((i|0)==-1){break h}n=q[f+52>>2];while(1){e=n+w(i,12)|0;if((j|0)!=q[e>>2]){i=q[e+8>>2];if((i|0)!=-1){continue}break h}break}i=s[e+4>>1];if((i|0)==65535){break h}while(1){i=i&65535;e=q[f+16>>2];if(i>>>0>=q[f+20>>2]-e>>1>>>0){break a}i=s[e+(i<<1)>>1];j=q[f>>2];if(i>>>0>=(q[f+4>>2]-j|0)/104>>>0){break a}j:{if((c|0)==(i|0)){break j}e=j+w(i,104)|0;n=r[e+96|0];if(n&16|(q[e+8>>2]!=q[d+8>>2]|q[e+12>>2]!=q[d+12>>2])|(q[e+16>>2]!=q[d+16>>2]|q[e+20>>2]!=q[d+20>>2]|u[e+60>>2]<=x(0)^1)){break j}o[e+96|0]=n&252}i=s[(j+w(i,104)|0)+94>>1];if((i|0)!=65535){continue}break}}c=c+1|0;if((m|0)!=(c|0)){continue}break g}break}break a}if(!C){break f}n=k>>>0>1?k:1;i=0;k:{while(1){c=q[f>>2];if((q[f+4>>2]-c|0)/104>>>0>i>>>0){c=c+w(i,104)|0;e=r[c+96|0];l:{if(!(e&1)){break l}g=u[c+60>>2];l=u[q[a+4>>2]+4>>2];if(!(g>l^1)){u[c+60>>2]=g-l;break l}j=0;q[c+60>>2]=0;m=q[c+24>>2];m:{if(!m){break m}g=x(x(l-g)+u[c+64>>2]);u[c+64>>2]=g;d=c- -64|0;n:{switch(m-1|0){case 0:case 1:case 2:l=g;g=u[c+68>>2];if(l>=g^1){break m}u[d>>2]=g;j=1;break m;case 3:case 4:l=u[c+68>>2];if(l>x(0)^1|g>=l^1){break m}while(1){g=x(g-l);if(!(l<=g^1)){continue}break}u[d>>2]=g;break m;case 5:break n;default:break m}}l=u[c+68>>2];if(l>x(0)^1|g>=l^1){break m}while(1){e=e^8;g=x(g-l);if(!(l<=g^1)){continue}break}u[d>>2]=g;o[c+96|0]=e}o:{if(e&4){break o}g=x(1);l=u[c+64>>2];if(!(l>2]^1)){g=x(l*u[c+72>>2]);g=gx(1)^1){break p}g=x(x(2)-g)}q[h+32>>2]=q[c+44>>2];d=q[c+40>>2];q[h+24>>2]=q[c+36>>2];q[h+28>>2]=d;d=q[c+32>>2];q[h+16>>2]=q[c+28>>2];q[h+20>>2]=d;g=JM(h+16|0,g);l=u[c+52>>2];g=x(l+x(g*x(u[c+56>>2]-l)));d=q[c+48>>2];if(d){u[d>>2]=g;break o}e=q[c+16>>2];m=q[c+20>>2];z=q[c+8>>2];B=q[c+12>>2];y=q[c>>2];q[h+64>>2]=0;d=h+96|0;q[d>>2]=0;v[d+8>>3]=g;t=q[h+76>>2];q[h+8>>2]=q[h+72>>2];q[h+12>>2]=t;t=q[h+68>>2];q[h>>2]=q[h+64>>2];q[h+4>>2]=t;sB(y,z,B,e,m,h,d)}if(!j){break l}o[c+96|0]=r[c+96|0]&252|2}i=i+1|0;if((n|0)!=(i|0)){continue}break k}break}break a}if(!C){break f}n=f+44|0;c=q[f>>2];i=q[f+4>>2];e=0;while(1){if((i-c|0)/104>>>0<=e>>>0){break a}m=w(e,104);j=m+c|0;d=r[j+96|0];r:{if(!(d&1)){a=c+m|0;c=q[a+76>>2];s:{if(!c){d=k;break s}Mi[c|0](q[j>>2],q[a+8>>2],q[a+12>>2],q[a+16>>2],q[a+20>>2],(d&2)>>>1|0,q[a+80>>2],q[a+84>>2]);a=f;c=q[f>>2];d=(q[f+4>>2]-c|0)/104|0;if((k|0)!=(d|0)){if(d>>>0<=e>>>0){break a}j=c+m|0}$L(a,j);a=q[j+36>>2];if(!a){break s}Mi[a|0](j+28|0)}i=q[j>>2];a=q[f+48>>2];t:{u:{if(!a){break u}c=q[q[n>>2]+((i>>>0)%(a>>>0)<<2)>>2];if((c|0)==-1){break u}k=q[f+52>>2];while(1){c=w(c,12);a=c+k|0;if(q[a>>2]==(i|0)){break t}c=q[(c+k|0)+8>>2];if((c|0)!=-1){continue}break}}a=0}k=a?a+4|0:0;a=s[k>>1];v:{if((a|0)!=65535){z=s[j+92>>1];w:{if((z|0)!=(a|0)){B=q[f+16>>2];y=q[f+20>>2]-B>>1;c=a;while(1){c=c&65535;if(c>>>0>=y>>>0){break a}c=s[B+(c<<1)>>1];t=q[f>>2];if(c>>>0>=(q[f+4>>2]-t|0)/104>>>0){break a}t=t+w(c,104)|0;c=s[t+94>>1];if((c|0)==65535){break w}if((c|0)!=(z|0)){continue}break}a=t+94|0}else{a=k}p[a>>1]=s[j+94>>1];c=q[f+32>>2];if(!c){break e}a=s[f+38>>1];if(!a|a>>>0>s[f+36>>1]){break d}j=s[j+92>>1];a=a-1|0;p[f+38>>1]=a;p[c+((a&65535)<<1)>>1]=j;a=s[k>>1]}if((a|0)!=65535){break v}}Nv(n,i)}a=q[f+4>>2];k=q[f>>2];if((a-k|0)/104>>>0<=e>>>0){break c}Ti(k+m|0,a-104|0,97);i=q[f+4>>2]-104|0;q[f+4>>2]=i;c=q[f>>2];if(i>>>0>>0){break b}k=d-1|0;if(e>>>0>=k>>>0){break r}d=s[(c+m|0)+92>>1];a=q[f+16>>2];if(d>>>0>=q[f+20>>2]-a>>1>>>0){break a}p[a+(d<<1)>>1]=e;break r}e=e+1|0}if(e>>>0>>0){continue}break}}o[f+108|0]=r[f+108|0]&254;o[b|0]=(C|0)!=0;Ii=h+224|0;return 0}J(6137,6144,140,6662);G()}J(6667,6144,141,6662);G()}J(6790,6386,513,6805);G()}J(6815,6386,516,6805);G()}J(6640,6386,479,6651);G()}function z7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,x=0,y=0,z=0,A=0;b=Ii-912|0;Ii=b;j=q[a+8>>2]-q[a+12>>2]>>4;d=q[a+8>>2]-q[a+12>>2]>>4;gj(a);n=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((d|0)==q[a+8>>2]-q[a+12>>2]>>4){d=Vi(a,1);k=Mi[q[75023]](q[q[n+304>>2]+2384>>2])|0;l=(d|0)==5?1:2;Dj(a,l,5);q[b+640>>2]=1;q[b+632>>2]=2;q[b+636>>2]=1;q[b+624>>2]=3;q[b+628>>2]=5;o[b+614|0]=1;p[b+612>>1]=0;q[b+608>>2]=1;o[b+598|0]=1;p[b+596>>1]=0;q[b+592>>2]=1;o[b+582|0]=1;p[b+580>>1]=0;q[b+576>>2]=1;o[b+566|0]=1;p[b+564>>1]=0;q[b+560>>2]=1;o[b+550|0]=1;p[b+548>>1]=0;q[b+544>>2]=1;q[b+616>>2]=0;q[b+620>>2]=0;q[b+600>>2]=0;q[b+604>>2]=0;q[b+584>>2]=0;q[b+588>>2]=0;q[b+568>>2]=0;q[b+572>>2]=0;q[b+552>>2]=0;q[b+556>>2]=0;q[b+536>>2]=0;q[b+540>>2]=0;o[b+534|0]=1;p[b+532>>1]=0;q[b+528>>2]=1;q[b+520>>2]=0;q[b+524>>2]=0;o[b+659|0]=0;o[b+660|0]=0;o[b+661|0]=0;o[b+662|0]=0;q[b+652>>2]=0;q[b+656>>2]=0;q[b+644>>2]=0;q[b+648>>2]=0;q[b+688>>2]=1;q[b+664>>2]=0;q[b+668>>2]=0;q[b+672>>2]=3;q[b+676>>2]=5;q[b+680>>2]=2;q[b+684>>2]=1;q[b+692>>2]=0;q[b+696>>2]=0;q[b+700>>2]=0;q[b+704>>2]=0;o[b+707|0]=0;o[b+708|0]=0;o[b+709|0]=0;o[b+710|0]=0;q[b+736>>2]=1;q[b+712>>2]=0;q[b+716>>2]=0;q[b+720>>2]=3;q[b+724>>2]=5;q[b+728>>2]=2;q[b+732>>2]=1;q[b+740>>2]=0;q[b+744>>2]=0;q[b+748>>2]=0;q[b+752>>2]=0;o[b+755|0]=0;o[b+756|0]=0;o[b+757|0]=0;o[b+758|0]=0;q[b+784>>2]=1;q[b+760>>2]=0;q[b+764>>2]=0;q[b+768>>2]=3;q[b+772>>2]=5;q[b+776>>2]=2;q[b+780>>2]=1;o[b+803|0]=0;o[b+804|0]=0;o[b+805|0]=0;o[b+806|0]=0;q[b+796>>2]=0;q[b+800>>2]=0;q[b+788>>2]=0;q[b+792>>2]=0;q[b+824>>2]=2;q[b+828>>2]=1;q[b+816>>2]=3;q[b+820>>2]=5;q[b+832>>2]=1;o[b+851|0]=0;o[b+852|0]=0;o[b+853|0]=0;o[b+854|0]=0;q[b+844>>2]=0;q[b+848>>2]=0;q[b+836>>2]=0;q[b+840>>2]=0;q[b+872>>2]=2;q[b+876>>2]=1;q[b+864>>2]=3;q[b+868>>2]=5;q[b+880>>2]=1;o[b+899|0]=0;o[b+900|0]=0;o[b+901|0]=0;o[b+902|0]=0;q[b+892>>2]=0;q[b+896>>2]=0;q[b+884>>2]=0;q[b+888>>2]=0;q[b+808>>2]=0;q[b+812>>2]=0;q[b+856>>2]=0;q[b+860>>2]=0;o[b+904|0]=r[b+904|0]&252;d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;c:{d:{e:{f:{if(Hj(a,l)){h=b+856|0;u=b+808|0;x=b+600|0;y=b+584|0;while(1){g:{h:{f=jj(a,-2);d=f-1|0;if(!(1<>>0<=31:0)){q[b+512>>2]=f;f=Qi(a,119660,b+512|0)}c=f-1|0;if(c>>>0<=31){if(1<>2]=f;q[b+400>>2]=115561;e=Qi(a,115726,b+400|0);break a}d=rq(f);e=(w(d,48)+b|0)+616|0;d=(b+520|0)+(d<<4)|0}Dj(a,-1,5);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;c=0;if(!Hj(a,-2)){break b}t=f|t;g=0;m=0;while(1){i=kj(a,-2,0);z=Ik(i,115706,6);A=Ik(i,115713,5);i=Ik(i,115719,6);Ri(a,-2);c=z?c:1;g=A?g:1;m=i?m:1;if(Hj(a,-2)){continue}break}if(!(c&255)){c=0;break b}if(!(g&255)){c=1;break b}if(!(m&255)){c=2;break b}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){c=kj(a,-2,0);if(!Vi(a,-1)){q[b+452>>2]=c;q[b+448>>2]=115561;e=Qi(a,115820,b+448|0);break a}i:{if(!Ik(c,115706,6)){c=jj(a,-1);q[e+8>>2]=c;if(!((c|0)==6|(f|0)!=16)){e=Qi(a,115864,0);break a}if((c|0)==7|(f|0)!=32){break i}e=Qi(a,115921,0);break a}if(!Ik(c,115713,5)){c=jj(a,-1);p[e+40>>1]=c;p[d+4>>1]=c;break i}if(!Ik(c,115719,6)){c=jj(a,-1);p[e+42>>1]=c;p[d+6>>1]=c;break i}if(!Ik(c,115982,10)){q[e+12>>2]=jj(a,-1);break i}if(!Ik(c,115993,10)){q[e+16>>2]=jj(a,-1);break i}if(!Ik(c,116004,6)){q[e+20>>2]=jj(a,-1);break i}if(!Ik(c,116011,6)){q[e+24>>2]=jj(a,-1);break i}j:{if(!Ik(c,116018,5)){c=jj(a,-1);g=f-16|0;if(!g){break j}if(!(c&1)|(g|0)!=16){break i}Pi(3,116024,116031,0);break i}Ri(a,-3);if(q[a+8>>2]-q[a+12>>2]>>4!=(j|0)){break f}q[b+500>>2]=116018;q[b+496>>2]=116011;q[b+492>>2]=116004;q[b+488>>2]=115993;q[b+484>>2]=115982;q[b+480>>2]=115719;q[b+468>>2]=c;q[b+476>>2]=115713;q[b+472>>2]=115706;q[b+464>>2]=115561;e=Qi(a,116173,b+464|0);break a}o[b+904|0]=r[b+904|0]&254|c&1}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);if(!(s[d+6>>1]<=k>>>0?s[d+4>>1]<=k>>>0:0)){Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(j|0)){break e}e=MK(f);h=s[d+4>>1];d=s[d+6>>1];q[b+444>>2]=k;q[b+440>>2]=d;q[b+436>>2]=h;q[b+432>>2]=e;e=Qi(a,116270,b+432|0);break a}if(Hj(a,l)){continue}break}}d=q[q[n+304>>2]+2384>>2];Ti(b+12|0,b+520|0,388);d=Xga(d,t,b+12|0);e=Li;h=e;if((e|0)!=2){break d}e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=+(d>>>0)+ +(h>>>0)*4294967296;q[a+8>>2]=q[a+8>>2]+16;e=1;if((j+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break c}break a}J(115568,115465,1116,116147);G()}J(115568,115465,1135,116147);G()}J(116385,115465,1142,116147);G()}J(115440,115465,1151,116147);G()}J(115568,115465,478,119531);G()}q[b+416>>2]=q[(c<<2)+248576>>2];e=Qi(a,115781,b+416|0)}Ii=b+912|0;return e|0}function s8(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii+ -64|0;Ii=e;f=$i(2416);Ui(f- -64|0,0,304);c=f;q[c+84>>2]=0;q[c+88>>2]=0;q[c+80>>2]=1065353216;q[c+92>>2]=0;q[c+96>>2]=0;q[c+104>>2]=0;q[c+108>>2]=0;q[c+100>>2]=1065353216;q[c+112>>2]=0;q[c+116>>2]=0;q[c+124>>2]=0;q[c+128>>2]=0;q[c+120>>2]=1065353216;q[c+132>>2]=0;q[c+136>>2]=0;q[c+148>>2]=0;q[c+152>>2]=0;q[c+140>>2]=1065353216;q[c+144>>2]=1065353216;q[c+156>>2]=0;q[c+160>>2]=0;q[c+168>>2]=0;q[c+172>>2]=0;q[c+164>>2]=1065353216;q[c+176>>2]=0;q[c+180>>2]=0;q[c+184>>2]=1065353216;q[c+188>>2]=0;q[c+192>>2]=0;q[c+196>>2]=0;q[c+200>>2]=0;q[c+204>>2]=1065353216;Ui(c+384|0,0,304);q[c+404>>2]=0;q[c+408>>2]=0;q[c+400>>2]=1065353216;q[c+412>>2]=0;q[c+416>>2]=0;q[c+424>>2]=0;q[c+428>>2]=0;q[c+420>>2]=1065353216;q[c+432>>2]=0;q[c+436>>2]=0;q[c+444>>2]=0;q[c+448>>2]=0;q[c+440>>2]=1065353216;q[c+452>>2]=0;q[c+456>>2]=0;q[c+468>>2]=0;q[c+472>>2]=0;q[c+460>>2]=1065353216;q[c+464>>2]=1065353216;q[c+476>>2]=0;q[c+480>>2]=0;q[c+488>>2]=0;q[c+492>>2]=0;q[c+484>>2]=1065353216;q[c+496>>2]=0;q[c+500>>2]=0;q[c+504>>2]=1065353216;q[c+508>>2]=0;q[c+512>>2]=0;q[c+516>>2]=0;q[c+520>>2]=0;q[c+524>>2]=1065353216;Ui(c+704|0,0,304);q[c+724>>2]=0;q[c+728>>2]=0;q[c+720>>2]=1065353216;q[c+732>>2]=0;q[c+736>>2]=0;q[c+744>>2]=0;q[c+748>>2]=0;q[c+740>>2]=1065353216;q[c+752>>2]=0;q[c+756>>2]=0;q[c+764>>2]=0;q[c+768>>2]=0;q[c+760>>2]=1065353216;q[c+772>>2]=0;q[c+776>>2]=0;q[c+788>>2]=0;q[c+792>>2]=0;q[c+780>>2]=1065353216;q[c+784>>2]=1065353216;q[c+796>>2]=0;q[c+800>>2]=0;q[c+808>>2]=0;q[c+812>>2]=0;q[c+804>>2]=1065353216;q[c+816>>2]=0;q[c+820>>2]=0;q[c+824>>2]=1065353216;q[c+828>>2]=0;q[c+832>>2]=0;q[c+836>>2]=0;q[c+840>>2]=0;q[c+844>>2]=1065353216;Ui(c+1024|0,0,304);q[c+1044>>2]=0;q[c+1048>>2]=0;q[c+1040>>2]=1065353216;d=c+1052|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1064>>2]=0;q[c+1068>>2]=0;q[c+1060>>2]=1065353216;d=c+1072|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1084>>2]=0;q[c+1088>>2]=0;q[c+1080>>2]=1065353216;d=c+1092|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1108>>2]=0;q[c+1112>>2]=0;q[c+1100>>2]=1065353216;q[c+1104>>2]=1065353216;d=c+1116|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1128>>2]=0;q[c+1132>>2]=0;q[c+1124>>2]=1065353216;d=c+1136|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1144>>2]=1065353216;q[c+1148>>2]=0;q[c+1152>>2]=0;d=c+1156|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1904>>2]=0;q[c+1908>>2]=0;q[c+1164>>2]=1065353216;d=c+1912|0;q[d>>2]=0;q[d+4>>2]=0;d=c+1920|0;q[d>>2]=0;q[d+4>>2]=0;d=c+1928|0;q[d>>2]=0;q[d+4>>2]=0;q[c+1964>>2]=0;q[c+1968>>2]=0;d=c+1972|0;q[d>>2]=0;q[d+4>>2]=0;d=c+1980|0;q[d>>2]=0;q[d+4>>2]=0;d=c+1988|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2144>>2]=0;q[c+2148>>2]=0;d=c+2152|0;q[d>>2]=0;q[d+4>>2]=0;d=c+2160|0;q[d>>2]=0;q[d+4>>2]=0;d=c+2168|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2012>>2]=0;q[c+2016>>2]=0;d=c+2020|0;q[d>>2]=0;q[d+4>>2]=0;g=c+2028|0;q[g>>2]=0;q[g+4>>2]=0;Ui(c+2040|0,0,96);q[c+2164>>2]=-1;Wi(q[b+20>>2],4,d,g,c+2024|0);q[c+2384>>2]=a;q[c+2024>>2]=q[d>>2];q[c+2176>>2]=q[b+4>>2];q[c+2276>>2]=1065353216;d=c+2268|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2260>>2]=0;q[c+2264>>2]=0;q[c+2252>>2]=1065353216;q[c+2256>>2]=1065353216;q[c+2280>>2]=0;q[c+2284>>2]=0;d=c+2288|0;q[d>>2]=0;q[d+4>>2]=0;d=c+2244|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2236>>2]=0;q[c+2240>>2]=0;q[c+2296>>2]=1065353216;q[c+2232>>2]=1065353216;d=c+2224|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2216>>2]=0;q[c+2220>>2]=0;d=c+2308|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2300>>2]=0;q[c+2304>>2]=0;q[c+2212>>2]=1065353216;d=c+2204|0;q[d>>2]=0;q[d+4>>2]=0;q[c+2196>>2]=0;q[c+2200>>2]=0;q[c+2192>>2]=1065353216;q[c+2388>>2]=0;q[c+2316>>2]=1065353216;_k(e,c+2256|0,c+2192|0);u[c+2320>>2]=u[e>>2];u[c+2324>>2]=u[e+4>>2];u[c+2328>>2]=u[e+8>>2];u[c+2332>>2]=u[e+12>>2];u[c+2336>>2]=u[e+16>>2];u[c+2340>>2]=u[e+20>>2];u[c+2344>>2]=u[e+24>>2];u[c+2348>>2]=u[e+28>>2];u[c+2352>>2]=u[e+32>>2];u[c+2356>>2]=u[e+36>>2];u[c+2360>>2]=u[e+40>>2];u[c+2364>>2]=u[e+44>>2];u[c+2368>>2]=u[e+48>>2];u[c+2372>>2]=u[e+52>>2];u[c+2376>>2]=u[e+56>>2];u[c+2380>>2]=u[e+60>>2];d=q[b>>2];q[c+2008>>2]=d;w8(c+2012|0,a,d,q[b+40>>2]);a=xz(q[c+2008>>2]);q[c+1872>>2]=0;q[c+2036>>2]=a;a=q[b+8>>2];a:{if(!a){break a}c=q[b+28>>2];if(!c){break a}d=q[b+12>>2];if(!d){break a}g=q[b+32>>2];if(!g){break a}x8(f,q[b+44>>2],a,c,d,g)}a=f;q[a>>2]=0;q[a+4>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;v8(a,q[b+36>>2]);o[a+2400|0]=r[a+2400|0]&252;b:{if(!(o[a+2068|0]&1)){Wi(255,12,f+2056|0,f+2064|0,f+2060|0);if(ur(q[62138],f+2392|0)){break b}Ii=e- -64|0;return f}J(115093,115168,493,115224);G()}J(114541,114567,138,114592);G()}function Qk(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;l=Ii-96|0;Ii=l;p=c;v=(g&131071)<<15|f>>>17;j=i&65535;t=j;k=h;D=k<<15|g>>>17;n=(e^i)&-2147483648;o=e&65535;x=o;m=d;y=o;o=0;E=(j&131071)<<15|k>>>17;F=i>>>16&32767;M=e>>>16&32767;a:{b:{if(M-1>>>0<=32765){j=0;if(F-1>>>0<32766){break b}}r=e&2147483647;w=r;j=d;if(!(!j&(r|0)==2147418112?!(b|c):r>>>0<2147418112)){A=d;n=e|32768;break a}e=i&2147483647;r=e;d=h;if(!(!d&(e|0)==2147418112?!(f|g):e>>>0<2147418112)){A=h;n=i|32768;b=f;c=g;break a}if(!(b|j|(w^2147418112|c))){if(!(d|f|(g|r))){n=2147450880;b=0;c=0;break a}n=n|2147418112;b=0;c=0;break a}if(!(d|f|(r^2147418112|g))){d=b|j;e=c|w;b=0;c=0;if(!(d|e)){n=2147450880;break a}n=n|2147418112;break a}if(!(b|j|(c|w))){b=0;c=0;break a}if(!(d|f|(g|r))){b=0;c=0;break a}if((w|0)==65535|w>>>0<65535){h=b;i=c;d=!(m|x);e=d<<6;j=z(d?b:m)+32|0;b=z(d?c:x);b=e+((b|0)==32?j:b)|0;vm(l+80|0,h,i,m,x,b-15|0);m=q[l+88>>2];p=q[l+84>>2];y=q[l+92>>2];u=16-b|0;b=q[l+80>>2]}j=u;if(r>>>0>65535){break b}c=!(k|t);d=c<<6;e=z(c?f:k)+32|0;c=z(c?g:t);c=d+((c|0)==32?e:c)|0;i=c;vm(l- -64|0,f,g,k,t,c-15|0);e=q[l+76>>2];c=e;h=q[l+72>>2];d=h;d=d<<15;e=q[l+68>>2];D=e>>>17|d;d=0;f=q[l+64>>2];v=d|((e&131071)<<15|f>>>17);E=(c&131071)<<15|h>>>17;j=(u-i|0)+16|0}u=j;d=v;c=b;t=0;r=Aza(d,0,b,t);b=Li;G=b;e=f;B=e<<15&-32768;k=p;g=Aza(B,0,k,0);f=g+r|0;e=Li+b|0;e=f>>>0>>0?e+1|0:e;h=f;j=f;i=0;g=Aza(c,t,B,C);f=i+g|0;b=j;j=j+Li|0;j=f>>>0>>0?j+1|0:j;v=f;g=j;J=(b|0)==(j|0)&f>>>0>>0|b>>>0>j>>>0;N=Aza(d,s,k,H);K=Li;p=m;f=Aza(B,C,m,0);b=f+N|0;j=Li+K|0;O=b;m=Aza(D,0,c,t);i=b+m|0;b=b>>>0>>0?j+1|0:j;f=b+Li|0;w=i;f=i>>>0>>0?f+1|0:f;x=f;j=f;f=(e|0)==(G|0)&h>>>0>>0|e>>>0>>0;h=e+w|0;j=f+j|0;r=h;j=h>>>0>>0?j+1|0:j;m=j;e=h;h=j;Q=Aza(d,s,p,P);G=Li;f=B;I=y|65536;B=o;i=Aza(f,C,I,o);f=i+Q|0;j=Li+G|0;j=f>>>0>>0?j+1|0:j;R=f;C=Aza(D,S,k,H);i=f+C|0;o=j;f=j+Li|0;f=i>>>0>>0?f+1|0:f;L=i;E=E&2147483647|-2147483648;i=Aza(c,t,E,0);c=L+i|0;t=f;j=f+Li|0;C=c;c=c>>>0>>0?j+1|0:j;y=J;i=0;f=i+e|0;j=h+C|0;J=f;h=f;e=y+f|0;y=f>>>0>>0?j+1|0:j;f=y;f=e>>>0>>0?f+1|0:f;h=e;i=f;u=(u+(F+M|0)|0)-16383|0;f=Aza(p,P,D,S);e=Li;s=Aza(d,s,I,B);d=s+f|0;j=Li+e|0;j=d>>>0>>0?j+1|0:j;s=d;f=(e|0)==(j|0)&f>>>0>d>>>0|e>>>0>j>>>0;e=j;F=f;f=Aza(E,T,k,H);d=f+d|0;j=Li+j|0;j=d>>>0>>0?j+1|0:j;f=d;d=j;k=(j|0)==(e|0)&f>>>0>>0|e>>>0>j>>>0;j=F+k|0;e=0;e=j>>>0>>0?1:e;s=f;k=d;F=j;f=(b|0)==(x|0)&w>>>0>>0|b>>>0>x>>>0;b=f+((b|0)==(K|0)&N>>>0>O>>>0|b>>>0>>0)|0;j=0;j=b>>>0>>0?1:j;f=b;b=s+f|0;j=d+j|0;j=b>>>0>>0?j+1|0:j;H=b;d=j;j=(j|0)==(k|0)&b>>>0>>0|j>>>0>>0;b=F+j|0;f=e;f=b>>>0>>0?f+1|0:f;e=Aza(E,T,I,B);b=e+b|0;j=Li+f|0;s=b;e=b>>>0>>0?j+1|0:j;k=Aza(E,T,p,P);f=Li;p=Aza(D,S,I,B);b=p+k|0;j=Li+f|0;j=b>>>0

>>0?j+1|0:j;p=b;b=j;j=(f|0)==(j|0)&k>>>0>p>>>0|f>>>0>j>>>0;k=b+s|0;e=e+j|0;e=k>>>0>>0?e+1|0:e;s=k;k=0;b=k+H|0;j=d+p|0;j=b>>>0>>0?j+1|0:j;f=j;k=(d|0)==(j|0)&b>>>0>>0|d>>>0>j>>>0;d=s+k|0;j=e;D=d;d=d>>>0>>0?j+1|0:j;p=b;k=f;f=(o|0)==(t|0)&R>>>0>L>>>0|o>>>0>t>>>0;e=f+((o|0)==(G|0)&Q>>>0>R>>>0|o>>>0>>0)|0;f=e;e=f+((c|0)==(t|0)&C>>>0>>0|c>>>0>>0)|0;f=e;b=c+b|0;e=f+k|0;e=b>>>0>>0?e+1|0:e;o=b;c=b;b=e;e=(e|0)==(k|0)&c>>>0

>>0|e>>>0>>0;c=e+D|0;j=d;j=c>>>0>>0?j+1|0:j;d=c;k=d;e=(m|0)==(y|0)&r>>>0>J>>>0|m>>>0>y>>>0;d=e+((m|0)==(x|0)&r>>>0>>0|m>>>0>>0)|0;f=0;f=d>>>0>>0?1:f;m=d;d=d+o|0;e=b+f|0;e=d>>>0>>0?e+1|0:e;c=(b|0)==(e|0)&d>>>0>>0|b>>>0>e>>>0;b=k+c|0;j=b>>>0>>0?j+1|0:j;c=j;c:{if(j&65536){u=u+1|0;break c}m=g>>>31|0;j=c<<1|b>>>31;b=b<<1|e>>>31;c=j;j=e<<1|d>>>31;d=d<<1|i>>>31;e=j;o=v;j=g<<1|o>>>31;v=o<<1;g=j;j=i<<1|h>>>31;h=h<<1|m;i=j}if((u|0)>=32767){n=n|2147418112;b=0;c=0;break a}d:{if((u|0)<=0){f=1-u|0;if(f>>>0>=128){b=0;c=0;break a}j=u+127|0;vm(l+48|0,v,g,h,i,j);vm(l+32|0,d,e,b,c,j);Xr(l+16|0,v,g,h,i,f);Xr(l,d,e,b,c,f);v=(q[l+48>>2]|q[l+56>>2])!=0|(q[l+52>>2]|q[l+60>>2])!=0|(q[l+32>>2]|q[l+16>>2]);g=q[l+36>>2]|q[l+20>>2];h=q[l+40>>2]|q[l+24>>2];i=q[l+44>>2]|q[l+28>>2];d=q[l>>2];e=q[l+4>>2];c=q[l+12>>2];b=q[l+8>>2];break d}c=c&65535|u<<16}A=b|A;n=c|n;if(!(!h&(i|0)==-2147483648?!(g|v):(i|0)>-1)){j=e;b=d+1|0;j=b>>>0<1?j+1|0:j;f=b;c=j;f=(e|0)==(j|0)&d>>>0>f>>>0|e>>>0>j>>>0;d=f+A|0;e=n;A=d;n=d>>>0>>0?e+1|0:e;break a}if(h|v|(i^-2147483648|g)){b=d;c=e;break a}c=d&1;b=c+d|0;j=e;j=b>>>0>>0?j+1|0:j;f=b;c=j;e=(e|0)==(j|0)&d>>>0>f>>>0|e>>>0>j>>>0;d=e+A|0;j=n;A=d;n=d>>>0>>0?j+1|0:j}q[a>>2]=b;q[a+4>>2]=c;q[a+8>>2]=A;q[a+12>>2]=n;Ii=l+96|0}function Yaa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,v=0,y=0;f=Ii-112|0;Ii=f;u[f+108>>2]=b;Ar(a,2,-2,f+108|0);j=q[a+32>>2];e=q[a+36>>2]-j|0;c=(e|0)/592|0;a:{b:{if(!(!r[266420]|!e)){n=c>>>0>1?c:1;while(1){e=j+w(g,592)|0;c:{if(o[e+588|0]&1){break c}c=q[e+468>>2];k=c;h=q[e+464>>2];if(!(c|h)|q[e+436>>2]!=2){break c}c=e+440|0;d:{d=q[a+432>>2];e:{if(!d){Pi(4,199633,201957,0);break e}i=q[e+440>>2];l=r[e+448|0];m=s[e+446>>1];v=s[e+444>>1];if(!(Mi[d|0](q[e+432>>2],h,k,c)|0)){break d}}q[c>>2]=0;q[c+4>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;c=s[e+570>>1];d=q[a+32>>2];if(c>>>0>=(q[a+36>>2]-d|0)/592>>>0){break b}i=s[e+568>>1];if((i|0)!=s[(d+w(c,592)|0)+568>>1]){break a}l=q[a+48>>2];m=q[a+52>>2]-l|0;d=(m|0)/72|0;f:{if(!m){break f}i=c|i<<16;e=e+472|0;m=d>>>0>1?d:1;d=0;while(1){c=l+w(d,72)|0;if(!((e|0)==q[c+4>>2]?(i|0)==q[c>>2]:0)){d=d+1|0;if((m|0)!=(d|0)){continue}break f}break}o[c+68|0]=r[c+68|0]|4}q[f+48>>2]=aj(h,k);Pi(3,199633,201924,f+48|0);break c}y=q[c>>2];c=y^i;if(!(c&67108863|(v|0)!=s[e+444>>1]|(c&1006632960|(m|0)!=s[e+446>>1]))){if((l|0)==r[e+448|0]){break c}}q[e+472>>2]=0;c=s[e+570>>1];d=s[e+568>>1];k=c|d<<16;e=e+472|0;h=q[a+32>>2];i=(q[a+36>>2]-h|0)/592|0;if((y&1006632960)==402653184){if(c>>>0>=i>>>0){break b}if((d|0)!=s[(h+w(c,592)|0)+568>>1]){break a}h=q[a+48>>2];c=q[a+52>>2]-h|0;if(!c){break c}c=(c|0)/72|0;i=c>>>0>1?c:1;d=0;while(1){c=h+w(d,72)|0;if(!((e|0)==q[c+4>>2]?(k|0)==q[c>>2]:0)){d=d+1|0;if((i|0)!=(d|0)){continue}break c}break}o[c+68|0]=r[c+68|0]|4;break c}if(c>>>0>=i>>>0){break b}if((d|0)!=s[(h+w(c,592)|0)+568>>1]){break a}h=q[a+48>>2];d=q[a+52>>2]-h|0;c=(d|0)/72|0;g:{if(!d){break g}i=c>>>0>1?c:1;d=0;while(1){c=h+w(d,72)|0;if(!((e|0)==q[c+4>>2]?(k|0)==q[c>>2]:0)){d=d+1|0;if((i|0)!=(d|0)){continue}break g}break}if(r[c+68|0]&4){break g}aB(a,k,x(0),x(1),q[c+56>>2],q[c+60>>2],q[c+64>>2]);break c}aB(a,k,x(0),x(1),0,0,0)}g=g+1|0;if((n|0)!=(g|0)){continue}break}}Zaa(a,u[f+108>>2]);h=q[a+32>>2];c=q[a+36>>2]-h|0;h:{if(!c){c=0;e=0;break h}g=(c|0)/592|0;e=0;c=0;k=0;while(1){d=h+w(k,592)|0;i:{if(o[d+588|0]&1){ZA(a,s[d+570>>1]|s[d+568>>1]<<16,0);p[d+588>>1]=s[d+588>>1]&65534;g=(q[a+36>>2]-q[a+32>>2]|0)/592|0;break i}i=s[d+570>>1];if((i|0)==65535){break i}e=e+1|0;c=(q[d+412>>2]>>>20&1)+c|0;j=q[d+416>>2];if(!j){break i}Mi[q[a+416>>2]](q[a+420>>2],a,i|s[d+568>>1]<<16,j,q[d+512>>2],u[f+108>>2])}k=k+1|0;if(g>>>0>k>>>0){continue}break}}j:{k:{l:{m:{n:{o:{p:{q:{k=q[a+264>>2];d=q[a+260>>2];g=k-d|0;if(!g){break q}if((d|0)!=(k|0)){k=(g|0)/12|0;h=0;while(1){n=w(h,12);i=n+d|0;r:{if(dI(q[a+224>>2],q[i>>2])){j=q[i+8>>2];s:{if(!j){break s}d=j&65535;g=q[a+32>>2];if(d>>>0>=(q[a+36>>2]-g|0)/592>>>0){break b}g=g+w(d,592)|0;if(s[g+568>>1]!=(j>>>16|0)){break p}if((d|0)!=s[g+570>>1]){break o}if(q[g+548>>2]==q[i>>2]){q[g+548>>2]=0}if(!(r[g+415|0]&32)){break s}if(k){l=q[a+260>>2];m=(q[a+264>>2]-l|0)/12|0;d=0;while(1){if((d|0)==(m|0)){break b}v=l+w(d,12)|0;if((j|0)==q[v+8>>2]){q[v+8>>2]=0}d=d+1|0;if((k|0)!=(d|0)){continue}break}}Br(a,g);l=q[a+20>>2];if(!l){break n}j=s[a+26>>1];if(!j|j>>>0>s[a+24>>1]){break m}d=s[g+570>>1];j=j-1|0;p[a+26>>1]=j;p[l+((j&65535)<<1)>>1]=d;j=q[a+32>>2];if((d+1|0)==((q[a+36>>2]-j|0)/592|0)){if(d>>>0>(q[a+40>>2]-j|0)/592>>>0){break l}q[a+36>>2]=j+w(d,592)}d=q[g+420>>2];if(d){Ni(d)}Ui(g,0,592);p[g+570>>1]=65535}nt(q[a+224>>2],q[i>>2]);g=q[a+264>>2];d=q[a+260>>2];if((g-d|0)/12>>>0<=h>>>0){break k}g=g-12|0;i=q[g+4>>2];d=d+n|0;q[d>>2]=q[g>>2];q[d+4>>2]=i;q[d+8>>2]=q[g+8>>2];d=q[a+264>>2]-12|0;q[a+264>>2]=d;if(d>>>0>2]){break j}k=k-1|0;break r}h=h+1|0}if(k>>>0<=h>>>0){break q}d=q[a+260>>2];if((q[a+264>>2]-d|0)/12>>>0>h>>>0){continue}break}}break b}q[213560]=q[213560]+e;q[f+96>>2]=e;q[f+100>>2]=0;q[f+40>>2]=e;q[f+44>>2]=0;q[213582]=q[213582]+c;q[f+88>>2]=c;q[f+92>>2]=0;q[f+32>>2]=c;q[f+36>>2]=0;c=q[a+152>>2];q[213604]=c+q[213604];q[f+80>>2]=c;q[f+84>>2]=0;q[f+24>>2]=c;q[f+28>>2]=0;c=q[a+184>>2];q[213626]=c+q[213626];q[f+72>>2]=c;q[f+76>>2]=0;q[f+16>>2]=c;q[f+20>>2]=0;c=q[a+184>>2]+q[a+152>>2]|0;q[213648]=c+q[213648];q[f+64>>2]=c;q[f+68>>2]=0;q[f+8>>2]=c;q[f+12>>2]=0;a=(q[a+264>>2]-q[a+260>>2]|0)/12|0;q[213670]=a+q[213670];q[f+56>>2]=a;q[f+60>>2]=0;q[f>>2]=a;q[f+4>>2]=0;Ii=f+112|0;return}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201735,201742,140,201660);G()}J(201817,201742,141,201660);G()}J(202185,201514,506,202204);G()}J(202143,201514,513,202158);G()}J(202168,201514,516,202158);G()}J(201665,201514,479,201676);G()}J(199518,199542,3728,201902);G()}function EL(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,r=0,s=0;e=Ii-32|0;Ii=e;g=q[a>>2];n=q[g+4>>2];r=Yi(w(n,24));d=a;a:{if(n){l=q[g+4>>2];b:{c:{while(1){if((b|0)!=(l|0)){h=q[g>>2]+(b<<6)|0;j=q[h+60>>2];k=w(b,24)+r|0;q[k>>2]=q[h+56>>2];q[k+4>>2]=j;j=q[h+4>>2];q[k+8>>2]=j;f=k;k=q[h+8>>2];o[f+12|0]=k;k=k&255;if(!k){break c}m=!i;d:{e:{switch(j|0){case 3:f=h+32|0;break d;case 4:case 5:case 6:f=h+24|0;break d;case 7:f=h+40|0;break d;case 8:f=h+48|0;break d;default:J(59321,59091,75,59386);G();case 0:case 1:case 2:break e}}f=h+16|0}k=t[f>>2]/(k>>>0)|0;h=m&k>>>0>c>>>0;c=h?k:c;i=h?0:i;b=b+1|0;if((n|0)!=(b|0)){continue}break b}break}break a}J(59063,59091,125,59131);G()}}q[d+16>>2]=c;c=Lw(c,r,n&255,a+4|0);f:{if(!c){g:{h:{i:{if(n){k=0;while(1){c=q[a>>2];if(t[c+4>>2]<=k>>>0){break a}c=q[c>>2];q[e+28>>2]=0;q[e+24>>2]=0;q[e+20>>2]=0;q[e+16>>2]=0;d=w(k,24)+r|0;if(Ot(q[a+4>>2],q[d>>2],q[d+4>>2],e+28|0,e+24|0,e+20|0,e+16|0)){break h}j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{h=c+(k<<6)|0;switch(q[h+4>>2]){case 8:break k;case 7:break l;case 6:break m;case 5:break n;case 4:break o;case 3:break p;case 2:break q;case 1:break r;case 0:break s;default:break i}}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;t:{if(f>>>0>=t[h+16>>2]){o[b+c|0]=0;Pi(4,59143,59400,0);break t}o[b+c|0]=q[q[h+12>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=c+l|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;u:{if(f>>>0>=t[h+16>>2]){p[(b<<1)+c>>1]=0;Pi(4,59143,59400,0);break u}p[(b<<1)+c>>1]=q[q[h+12>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<1)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;v:{if(f>>>0>=t[h+16>>2]){q[(b<<2)+c>>2]=0;Pi(4,59143,59400,0);break v}q[(b<<2)+c>>2]=q[q[h+12>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<2)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;w:{if(f>>>0>=t[h+32>>2]){f=(b<<3)+c|0;q[f>>2]=0;q[f+4>>2]=0;Pi(4,59143,59400,0);break w}f=q[h+28>>2]+(f<<3)|0;s=q[f+4>>2];m=(b<<3)+c|0;q[m>>2]=q[f>>2];q[m+4>>2]=s}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<3)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;x:{if(f>>>0>=t[h+24>>2]){o[b+c|0]=0;Pi(4,59143,59400,0);break x}o[b+c|0]=q[q[h+20>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=c+l|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;y:{if(f>>>0>=t[h+24>>2]){p[(b<<1)+c>>1]=0;Pi(4,59143,59400,0);break y}p[(b<<1)+c>>1]=q[q[h+20>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<1)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;z:{if(f>>>0>=t[h+24>>2]){q[(b<<2)+c>>2]=0;Pi(4,59143,59400,0);break z}q[(b<<2)+c>>2]=q[q[h+20>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<2)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;A:{if(f>>>0>=t[h+40>>2]){f=(b<<3)+c|0;q[f>>2]=0;q[f+4>>2]=0;Pi(4,59143,59400,0);break A}f=q[h+36>>2]+(f<<3)|0;s=q[f+4>>2];m=(b<<3)+c|0;q[m>>2]=q[f>>2];q[m+4>>2]=s}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<3)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}break j}i=q[e+24>>2];if(!i){break j}g=q[e+20>>2];if(!g){break j}l=q[e+16>>2];d=0;c=q[e+28>>2];while(1){j=w(d,g);b=0;while(1){f=b+j|0;B:{if(f>>>0>=t[h+48>>2]){q[(b<<2)+c>>2]=0;Pi(4,59143,59400,0);break B}u[(b<<2)+c>>2]=u[q[h+44>>2]+(f<<2)>>2]}b=b+1|0;if((g|0)!=(b|0)){continue}break}c=(l<<2)+c|0;d=d+1|0;if((i|0)!=(d|0)){continue}break}}k=k+1|0;if((n|0)!=(k|0)){continue}break}}Ni(r);q[a+20>>2]=Kw(q[a+4>>2]);b=1;break f}Pi(4,59143,59180,0);b=0;break g}Pi(4,59143,59225,0);b=0}Ni(r);break f}q[e>>2]=c;Pi(4,59143,59151,e);Ni(r);b=0}Ii=e+32|0;return b}J(59271,59283,100,59310);G()}function Tm(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,x=0;x=!b;a:{b:{c:{d:{if(q[a+132>>2]>=1){f=q[a>>2];if(q[f+44>>2]!=2){break b}if(s[a+148>>1]|s[a+152>>1]|(s[a+156>>1]|s[a+160>>1])){break c}if(s[a+164>>1]|s[a+168>>1]|(s[a+172>>1]|s[a+204>>1])){break c}if(s[a+208>>1]|s[a+212>>1]|(s[a+216>>1]|s[a+220>>1])){break c}if(s[a+224>>1]|s[a+228>>1]|(s[a+232>>1]|s[a+236>>1])){break c}if(s[a+240>>1]|s[a+244>>1]|(s[a+248>>1]|s[a+260>>1])){break c}if(s[a+272>>1]|(s[a+264>>1]|s[a+268>>1])){break c}e=1;if(!s[a+184>>1]){break d}break c}e=c+5|0;f=e;break a}if(s[a+188>>1]|s[a+200>>1]){break c}g=32;while(1){if(s[((g<<2)+a|0)+148>>1]){break c}g=g+1|0;if((g|0)!=256){continue}break}e=0}q[f+44>>2]=e}XB(a,a+2840|0);XB(a,a+2852|0);f=s[a+150>>1];l=q[a+2844>>2];p[((l<<2)+a|0)+154>>1]=65535;e=0;if((l|0)>=0){k=f?7:138;m=f?4:3;n=a+2752|0;t=a+2756|0;u=a+2748|0;g=-1;while(1){h=f;v=j;j=j+1|0;f=s[((j<<2)+a|0)+150>>1];i=e+1|0;e:{if(!((h|0)!=(f|0)|(i|0)>=(k|0))){e=i;break e}f:{if((i|0)<(m|0)){e=((h<<2)+a|0)+2684|0;g=i+s[e>>1]|0;break f}if(h){if((g|0)!=(h|0)){e=((h<<2)+a|0)+2684|0;p[e>>1]=s[e>>1]+1}e=u;g=s[e>>1]+1|0;break f}if((e|0)<=9){e=n;g=s[e>>1]+1|0;break f}e=t;g=s[e>>1]+1|0}p[e>>1]=g;e=0;g:{if(!f){m=3;k=138;break g}g=(f|0)==(h|0);m=g?3:4;k=g?6:7}g=h}if((l|0)!=(v|0)){continue}break}}f=s[a+2442>>1];l=q[a+2856>>2];p[((l<<2)+a|0)+2446>>1]=65535;e=0;if((l|0)>=0){k=f?7:138;m=f?4:3;n=a+2752|0;t=a+2756|0;u=a+2748|0;g=-1;j=0;while(1){h=f;v=j;j=j+1|0;f=s[((j<<2)+a|0)+2442>>1];i=e+1|0;h:{if(!((h|0)!=(f|0)|(i|0)>=(k|0))){e=i;break h}i:{if((i|0)<(m|0)){e=((h<<2)+a|0)+2684|0;g=i+s[e>>1]|0;break i}if(h){if((g|0)!=(h|0)){e=((h<<2)+a|0)+2684|0;p[e>>1]=s[e>>1]+1}e=u;g=s[e>>1]+1|0;break i}if((e|0)<=9){e=n;g=s[e>>1]+1|0;break i}e=t;g=s[e>>1]+1|0}p[e>>1]=g;e=0;j:{if(!f){m=3;k=138;break j}g=(f|0)==(h|0);m=g?3:4;k=g?6:7}g=h}if((l|0)!=(v|0)){continue}break}}XB(a,a+2864|0);g=a;h=q[a+5800>>2];e=18;k:{if(s[a+2746>>1]){break k}e=17;if(s[a+2690>>1]){break k}e=16;if(s[a+2742>>1]){break k}e=15;if(s[a+2694>>1]){break k}e=14;if(s[a+2738>>1]){break k}e=13;if(s[a+2698>>1]){break k}e=12;if(s[a+2734>>1]){break k}e=11;if(s[a+2702>>1]){break k}e=10;if(s[a+2730>>1]){break k}e=9;if(s[a+2706>>1]){break k}e=8;if(s[a+2726>>1]){break k}e=7;if(s[a+2710>>1]){break k}e=6;if(s[a+2722>>1]){break k}e=5;if(s[a+2714>>1]){break k}e=4;if(s[a+2718>>1]){break k}e=s[a+2686>>1]?3:2}j=e;e=h+w(e,3)|0;q[g+5800>>2]=e+17;f=e+27>>>3|0;e=q[a+5804>>2]+10>>>3|0;f=e>>>0>f>>>0?f:e}l:{if(!(x|f>>>0>>0)){eO(a,b,c,d);break l}c=q[a+5820>>2];if(!(q[a+136>>2]!=4?(e|0)!=(f|0):0)){e=d+2&65535;f=s[a+5816>>1]|e<>1]=f;b=a;m:{if((c|0)>=14){c=q[a+20>>2];q[a+20>>2]=c+1;o[c+q[a+8>>2]|0]=f;c=q[a+20>>2];q[a+20>>2]=c+1;o[c+q[a+8>>2]|0]=r[a+5817|0];c=q[a+5820>>2];p[a+5816>>1]=e>>>16-c;c=c-13|0;break m}c=c+3|0}q[b+5820>>2]=c;tN(a,196880,198032);break l}b=d+4&65535;e=s[a+5816>>1]|b<=14){p[a+5816>>1]=e;c=q[a+20>>2];q[a+20>>2]=c+1;o[c+q[a+8>>2]|0]=e;c=q[a+20>>2];q[a+20>>2]=c+1;o[c+q[a+8>>2]|0]=r[a+5817|0];c=q[a+5820>>2];f=c-13|0;e=b>>>16-c|0;break n}f=c+3|0}q[a+5820>>2]=f;h=q[a+2844>>2];g=h+65280&65535;b=g<>2];o:{if((f|0)>=12){b=b|e;p[a+5816>>1]=b;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=b;b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5817|0];b=q[a+5820>>2];f=b-11|0;b=g>>>16-b|0;break o}f=f+5|0;b=b|e}q[a+5820>>2]=f;g=c&65535;e=g<=12){b=b|e;p[a+5816>>1]=b;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=b;b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5817|0];b=q[a+5820>>2];f=b-11|0;b=g>>>16-b|0;break p}f=f+5|0;b=b|e}q[a+5820>>2]=f;g=j+65533&65535;e=g<=13){b=b|e;p[a+5816>>1]=b;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=b;b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5817|0];b=q[a+5820>>2];f=b-12|0;g=g>>>16-b|0;break q}f=f+4|0;g=b|e}q[a+5820>>2]=f;e=0;k=a+5817|0;while(1){i=s[((r[e+198496|0]<<2)+a|0)+2686>>1];g=i<>1]=g;b=a;r:{if((f|0)>=14){f=q[a+20>>2];q[a+20>>2]=f+1;o[f+q[a+8>>2]|0]=g;f=q[a+20>>2];q[a+20>>2]=f+1;o[f+q[a+8>>2]|0]=r[k|0];f=q[a+5820>>2];g=i>>>16-f|0;p[a+5816>>1]=g;f=f-13|0;break r}f=f+3|0}q[b+5820>>2]=f;b=(e|0)!=(j|0);e=e+1|0;if(b){continue}break}b=a+148|0;KD(a,b,h);e=a+2440|0;KD(a,e,c);tN(a,b,e)}CF(a);if(d){b=q[a+5820>>2];s:{t:{if((b|0)>=9){b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5816|0];b=q[a+20>>2];q[a+20>>2]=b+1;f=b+q[a+8>>2]|0;b=r[a+5817|0];break t}if((b|0)<1){break s}b=q[a+20>>2];q[a+20>>2]=b+1;f=b+q[a+8>>2]|0;b=r[a+5816|0]}o[f|0]=b}q[a+5820>>2]=0;p[a+5816>>1]=0}}function Rn(a){var b=0,c=0,d=0,e=0;b=w(q[a+4>>2],1540483477);b=w(b>>>24^b,1540483477);q[a+4>>2]=b;c=w(b^w(q[a>>2],1540483477),1540483477);b=w(q[a+12>>2],1540483477);b=c^w(b>>>24^b,1540483477);b=w(b>>>13^b,1540483477);q[a>>2]=b>>>15^b;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b:{c:{d:{e:{if(!(!r[852468]|!q[a+16>>2]|t[a+12>>2]>1024)){f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}e=q[213116];Gj(e);g:{if(o[852568]&1){break g}if(!fk(852568)){break g}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b=q[a>>2];h:{i:{c=q[213119];j:{if(!c){break j}c=q[q[213118]+((b>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break j}d=q[213120];while(1){c=d+(c<<4)|0;if(q[c>>2]==(b|0)){break i}c=q[c+12>>2];if((c|0)!=-1){continue}break}}if(q[213124]==q[213122]-q[213120]>>4){k:{if(o[852568]&1){break k}if(!fk(852568)){break k}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b=q[213122]-q[213120]>>4;l:{if(o[852568]&1){break l}if(!fk(852568)){break l}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}Tv(852472,1024,b+256|0);b=q[a>>2]}m:{if(o[852568]&1){break m}if(!fk(852568)){break m}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}d=q[a+16>>2];c=q[213134];if(d>>>0>=q[213135]-c>>3>>>0){break b}HA(852472,b,c+(d<<3)|0);break h}n:{if(o[852568]&1){break n}if(!fk(852568)){break n}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}c=q[a+16>>2];b=q[213134];if(c>>>0>=q[213135]-b>>3>>>0){break b}Ni(q[b+(c<<3)>>2])}o:{if(o[852568]&1){break o}if(!fk(852568)){break o}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}c=q[a+16>>2];if(!c){break e}d=q[213138];if(!d){break d}b=q[213140]-1|0;if(b>>>0>=t[213139]){break c}q[213140]=b;q[d+(b<<2)>>2]=c;q[a+16>>2]=0;Bj(e)}return q[a>>2]}J(165779,165430,131,165795);G()}J(165646,165621,140,165677);G()}J(165682,165621,141,165677);G()}J(165931,165533,479,165942);G()}function rna(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),p=0,s=0,t=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=0,E=0,F=0,H=0,I=x(0),K=x(0),L=x(0),M=0,N=0,O=0,P=0;b=Ii-272|0;Ii=b;H=q[q[a+8>>2]>>2];l=q[a+4>>2];q[b+72>>2]=0;c=q[l+4>>2];d=q[l>>2];a=c-d|0;a:{if(a){c=d-c|0;c=((a|0)<(c|0)?c:a)>>>2|0;a=(a|0)>-1?a:-1;a=w(c,(a|0)<1?a:1);g=a>>>0>1?a:1;while(1){a=q[l>>2];if(q[l+4>>2]-a>>2>>>0<=p>>>0){break a}c=q[a+(p<<2)>>2];if((r[c+254|0]&5)==5){a=Jp(q[c>>2]);t=u[c+20>>2];i=u[c+28>>2];z=u[c+24>>2];v=u[c+56>>2];j=u[c+52>>2];y=u[c+48>>2];m=u[c+40>>2];f=u[c+16>>2];d=q[c+36>>2];q[b+48>>2]=q[c+32>>2];q[b+52>>2]=d;q[b+60>>2]=1065353216;u[b+56>>2]=m;u[b+12>>2]=y*x(0);u[b+28>>2]=j*x(0);u[b+44>>2]=v*x(0);A=x(t+t);n=x(f*A);m=x(z+z);h=x(i*m);u[b+4>>2]=y*x(n+h);B=x(f*m);C=x(A*i);u[b+8>>2]=y*x(B-C);u[b+16>>2]=j*x(n-h);n=x(t*m);h=i;i=x(f+f);h=x(h*i);u[b+24>>2]=j*x(n+h);u[b+32>>2]=v*x(B+C);u[b+36>>2]=v*x(n-h);h=j;f=x(x(1)-x(f*i));j=x(z*m);u[b+20>>2]=h*x(f-j);i=f;f=x(t*A);u[b+40>>2]=v*x(i-f);u[b>>2]=y*x(x(x(1)-f)-j);b:{if((q[q[c>>2]+136>>2]&512)>>>9|0){_k(b+208|0,a,b);break b}jo(b+208|0,a,b)}A=u[b+208>>2];u[c+64>>2]=A;n=u[b+212>>2];u[c+68>>2]=n;h=u[b+216>>2];u[c+72>>2]=h;B=u[b+220>>2];u[c+76>>2]=B;C=u[b+224>>2];u[c+80>>2]=C;I=u[b+228>>2];u[c+84>>2]=I;K=u[b+232>>2];u[c+88>>2]=K;f=u[b+264>>2];t=u[b+260>>2];v=u[b+256>>2];j=u[b+252>>2];y=u[b+248>>2];i=u[b+244>>2];z=u[b+240>>2];m=u[b+236>>2];L=u[b+268>>2];u[c+124>>2]=L;u[c+120>>2]=f;u[c+116>>2]=t;u[c+112>>2]=v;u[c+108>>2]=j;u[c+104>>2]=y;u[c+100>>2]=i;u[c+96>>2]=z;u[c+92>>2]=m;u[b+268>>2]=L;u[b+264>>2]=f;u[b+260>>2]=t;u[b+256>>2]=v;u[b+252>>2]=j;u[b+248>>2]=y;u[b+244>>2]=i;u[b+240>>2]=z;u[b+236>>2]=m;u[b+232>>2]=K;u[b+228>>2]=I;u[b+224>>2]=C;u[b+220>>2]=B;u[b+216>>2]=h;u[b+212>>2]=n;u[b+208>>2]=A;d=0;e=0;a=q[c+236>>2];if((a|0)!=q[c+240>>2]){while(1){a=(d<<7)+a|0;e=q[a+104>>2];f=u[e>>2];t=u[e+4>>2];i=u[e+12>>2];z=u[e+8>>2];v=u[e+40>>2];j=u[e+36>>2];y=u[e+32>>2];m=u[e+24>>2];E=q[e+20>>2];q[b+128>>2]=q[e+16>>2];q[b+132>>2]=E;q[b+140>>2]=1065353216;u[b+136>>2]=m;u[b+92>>2]=y*x(0);u[b+108>>2]=j*x(0);u[b+124>>2]=v*x(0);A=x(t+t);n=x(f*A);m=x(z+z);h=x(i*m);u[b+84>>2]=y*x(n+h);B=x(f*m);C=x(A*i);u[b+88>>2]=y*x(B-C);u[b+96>>2]=j*x(n-h);n=x(t*m);h=i;i=x(f+f);h=x(h*i);u[b+104>>2]=j*x(n+h);u[b+112>>2]=v*x(B+C);u[b+116>>2]=v*x(n-h);h=j;f=x(x(1)-x(f*i));j=x(z*m);u[b+100>>2]=h*x(f-j);i=f;f=x(t*A);u[b+120>>2]=v*x(i-f);u[b+80>>2]=y*x(x(x(1)-f)-j);_k(b+144|0,b+208|0,b+80|0);u[a>>2]=u[b+144>>2];u[a+4>>2]=u[b+148>>2];u[a+8>>2]=u[b+152>>2];u[a+12>>2]=u[b+156>>2];u[a+16>>2]=u[b+160>>2];u[a+20>>2]=u[b+164>>2];u[a+24>>2]=u[b+168>>2];u[a+28>>2]=u[b+172>>2];u[a+32>>2]=u[b+176>>2];u[a+36>>2]=u[b+180>>2];u[a+40>>2]=u[b+184>>2];u[a+44>>2]=u[b+188>>2];u[a+48>>2]=u[b+192>>2];u[a+52>>2]=u[b+196>>2];u[a+56>>2]=u[b+200>>2];u[a+60>>2]=u[b+204>>2];d=d+1|0;a=q[c+236>>2];e=q[c+240>>2]-a>>7;if(d>>>0>>0){continue}break}}k=e+k|0}p=p+1|0;if((g|0)!=(p|0)){continue}break}}c:{d:{if((q[l+60>>2]-q[l+52>>2]|0)/304>>>0>>0){if(o[l+64|0]&1){break d}Wi(k,304,l+52|0,l+60|0,l+56|0)}k=q[l+4>>2];p=q[l>>2];e=k-p|0;if(!e){d=0;break c}a=p-k|0;c=((a|0)>(e|0)?a:e)>>>2|0;a=(e|0)>-1?e:-1;a=w(c,(a|0)<1?a:1);g=a>>>0>1?a:1;d=0;a=0;while(1){c=q[p+(a<<2)>>2];if(r[c+254|0]&2){d=(q[c+240>>2]-q[c+236>>2]>>7)+d|0}a=a+1|0;if((g|0)!=(a|0)){continue}break}break c}J(51372,51308,493,51447);G()}c=vp(H,d);d=Dv(H,236,237,l);a=c;e:{if(e){M=q[l+100>>2];a=p-k|0;k=((a|0)>(e|0)?a:e)>>>2|0;a=(e|0)>-1?e:-1;a=w(k,(a|0)<1?a:1);N=a>>>0>1?a:1;O=d<<6;a=c;E=0;p=0;k=0;while(1){d=q[l>>2];if(q[l+4>>2]-d>>2>>>0<=E>>>0){break e}f:{e=q[d+(E<<2)>>2];if(!(r[e+254|0]&2)){break f}s=q[e+240>>2];g=q[e+236>>2];d=s-g|0;if(!d){break f}if((g|0)!=(s|0)){s=g-s|0;s=((d|0)<(s|0)?s:d)>>>7|0;d=(d|0)>-1?d:-1;d=w(s,(d|0)<1?d:1);P=d>>>0>1?d:1;d=0;while(1){g=(d<<7)+g|0;s=q[q[g+100>>2]+8>>2];D=q[g+48>>2];F=q[g+52>>2];f=u[g+56>>2];q[a+16>>2]=g;q[a+20>>2]=0;u[a+8>>2]=f;q[a>>2]=D;q[a+4>>2]=F;q[a+28>>2]=q[e+136>>2];D=q[e+216>>2];if(!D){F=q[e+128>>2];D=q[F+28>>2];g=q[g+112>>2]&15;if(g>>>0>=q[F+32>>2]-D>>4>>>0){break e}D=q[(D+(g<<4)|0)+4>>2]}g=p+s>>>0>>0;p=s+(g?p:0)|0;q[a+32>>2]=q[q[D>>2]+132>>2];s=k;k=k+1|0;k=g?s:k>>>0<15?k:15;q[a+36>>2]=q[a+36>>2]&-16384|(k&15|O)|16;a=a+48|0;d=d+1|0;if((P|0)==(d|0)){break f}g=q[e+236>>2];if(q[e+240>>2]-g>>7>>>0>d>>>0){continue}break}}J(51709,51308,479,51547);G()}E=E+1|0;if((N|0)!=(E|0)){continue}break}}up(H,c,a);Ii=b+272|0;return 0}}J(51709,51308,486,51547);G()}function eD(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{if(q[a+18388>>2]){break a}b:{if(q[a+18368>>2]>15){break b}while(1){f=0;c:{if(q[a+18376>>2]){break c}e=q[a>>2];g=q[e+172>>2];d:{if(g>>>0>2]){q[e+172>>2]=g+1;f=r[g|0];break d}if(!q[e+32>>2]){break c}g=e+40|0;f=Mi[q[e+16>>2]](q[e+28>>2],g,q[e+36>>2])|0;q[e+168>>2]=q[e+168>>2]+(q[e+172>>2]-q[e+180>>2]|0);e:{if(!f){o[e+40|0]=0;q[e+32>>2]=0;g=e+41|0;f=0;break e}g=f+g|0;f=r[e+40|0]}q[e+176>>2]=g;q[e+172>>2]=e+41}if((f&255)!=255){break c}f=q[a>>2];e=q[f+172>>2];f:{if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];break f}if(!q[f+32>>2]){e=0;break f}g=f+40|0;e=Mi[q[f+16>>2]](q[f+28>>2],g,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);g:{if(!e){o[f+40|0]=0;q[f+32>>2]=0;g=f+41|0;e=0;break g}g=e+g|0;e=r[f+40|0]}q[f+176>>2]=g;q[f+172>>2]=f+41}while(1){f=255;if((e|0)!=255){if(!e){break c}q[a+18376>>2]=1;o[a+18372|0]=e;break b}f=q[a>>2];e=q[f+172>>2];if(e>>>0>2]){q[f+172>>2]=e+1;e=r[e|0];continue}e=0;if(!q[f+32>>2]){continue}g=f+40|0;e=Mi[q[f+16>>2]](q[f+28>>2],g,q[f+36>>2])|0;q[f+168>>2]=q[f+168>>2]+(q[f+172>>2]-q[f+180>>2]|0);h:{if(!e){o[f+40|0]=0;q[f+32>>2]=0;g=f+41|0;e=0;break h}g=e+g|0;e=r[f+40|0]}q[f+176>>2]=g;q[f+172>>2]=f+41;continue}}e=q[a+18368>>2];q[a+18368>>2]=e+8;q[a+18364>>2]=q[a+18364>>2]|(f&255)<<24-e;if((e|0)<17){continue}break}}if(!q[a+18392>>2]){i=Ui(b,0,128);h=ds(a,c);f=h;i:{j:{switch(f+1|0){case 0:break a;case 1:break i;default:break j}}k:{if((h|0)<=q[a+18368>>2]){break k}while(1){f=0;l:{if(q[a+18376>>2]){break l}b=q[a>>2];c=q[b+172>>2];m:{if(c>>>0>2]){q[b+172>>2]=c+1;f=r[c|0];break m}if(!q[b+32>>2]){break l}g=b+40|0;e=Mi[q[b+16>>2]](q[b+28>>2],g,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);c=b;n:{if(!e){o[b+40|0]=0;q[b+32>>2]=0;e=b+41|0;break n}f=r[b+40|0];e=e+g|0}q[c+176>>2]=e;q[b+172>>2]=b+41}if((f&255)!=255){break l}b=q[a>>2];c=q[b+172>>2];o:{if(c>>>0>2]){q[b+172>>2]=c+1;e=r[c|0];break o}if(!q[b+32>>2]){e=0;break o}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);p:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;g=b+41|0;e=0;break p}g=c+e|0;e=r[b+40|0]}q[b+176>>2]=g;q[b+172>>2]=b+41}while(1){f=255;if((e|0)!=255){if(!e){break l}q[a+18376>>2]=1;o[a+18372|0]=e;break k}b=q[a>>2];c=q[b+172>>2];if(c>>>0>2]){q[b+172>>2]=c+1;e=r[c|0];continue}e=0;if(!q[b+32>>2]){continue}e=b+40|0;c=Mi[q[b+16>>2]](q[b+28>>2],e,q[b+36>>2])|0;q[b+168>>2]=q[b+168>>2]+(q[b+172>>2]-q[b+180>>2]|0);q:{if(!c){o[b+40|0]=0;q[b+32>>2]=0;g=b+41|0;e=0;break q}g=c+e|0;e=r[b+40|0]}q[b+176>>2]=g;q[b+172>>2]=b+41;continue}}b=q[a+18368>>2];q[a+18368>>2]=b+8;q[a+18364>>2]=q[a+18364>>2]|(f&255)<<24-b;if((b|0)<17){continue}break}}f=0;if(h>>>0>16){break i}b=q[a+18364>>2];q[a+18368>>2]=q[a+18368>>2]-h;c=Fza(b,h);e=h<<2;f=q[e+169552>>2];q[a+18364>>2]=c&(f^-1);f=(q[e+169728>>2]&(b>>31^-1))+(c&f)|0}c=(w(d,72)+a|0)+18100|0;b=q[c>>2]+f|0;q[c>>2]=b;p[i>>1]=b<>2];return 1}g=q[a+18368>>2];r:{if((g|0)>0){break r}while(1){f=0;s:{if(q[a+18376>>2]){break s}c=q[a>>2];d=q[c+172>>2];t:{if(d>>>0>2]){q[c+172>>2]=d+1;f=r[d|0];break t}if(!q[c+32>>2]){break s}g=c+40|0;e=Mi[q[c+16>>2]](q[c+28>>2],g,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);d=c;u:{if(!e){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;break u}f=r[c+40|0];e=e+g|0}q[d+176>>2]=e;q[c+172>>2]=c+41}if((f&255)!=255){break s}c=q[a>>2];d=q[c+172>>2];v:{if(d>>>0>2]){q[c+172>>2]=d+1;e=r[d|0];break v}if(!q[c+32>>2]){e=0;break v}e=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],e,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);w:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;e=0;break w}g=d+e|0;e=r[c+40|0]}q[c+176>>2]=g;q[c+172>>2]=c+41}while(1){f=255;if((e|0)!=255){if(!e){break s}q[a+18376>>2]=1;o[a+18372|0]=e;g=q[a+18368>>2];break r}c=q[a>>2];d=q[c+172>>2];if(d>>>0>2]){q[c+172>>2]=d+1;e=r[d|0];continue}e=0;if(!q[c+32>>2]){continue}e=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],e,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);x:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;g=c+41|0;e=0;break x}g=d+e|0;e=r[c+40|0]}q[c+176>>2]=g;q[c+172>>2]=c+41;continue}}c=q[a+18368>>2];g=c+8|0;q[a+18368>>2]=g;q[a+18364>>2]=q[a+18364>>2]|(f&255)<<24-c;if((c|0)<17){continue}break}}q[a+18368>>2]=g-1;c=q[a+18364>>2];q[a+18364>>2]=c<<1;if((c|0)<=-1){p[b>>1]=s[b>>1]+(65536<>2]>>>16|0)}return 1}q[213145]=169269;return 0}function HN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=Ii-16|0;Ii=c;d=1;a:{b:{switch((b-a|0)/12|0){case 2:if(t[q[b-4>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){break a}q[c+8>>2]=q[a+8>>2];e=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=e;b=b-12|0;q[a+8>>2]=q[b+8>>2];e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;q[b+8>>2]=q[c+8>>2];a=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=a;break a;case 3:e=b-12|0;g=b-4|0;b=q[q[g>>2]+116>>2];f=q[q[a+20>>2]+116>>2];if(f>>>0>=t[q[a+8>>2]+116>>2]){if(b>>>0>=f>>>0){break a}q[c+8>>2]=q[a+20>>2];b=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=b;q[a+20>>2]=q[e+8>>2];b=q[e+4>>2];q[a+12>>2]=q[e>>2];q[a+16>>2]=b;q[e+8>>2]=q[c+8>>2];b=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=b;if(t[q[a+20>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){break a}q[c+8>>2]=q[a+8>>2];b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;q[a+8>>2]=q[a+20>>2];b=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=b;q[a+20>>2]=q[c+8>>2];b=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=b;break a}if(b>>>0>>0){q[c+8>>2]=q[a+8>>2];b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;q[a+8>>2]=q[e+8>>2];b=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=b;q[e+8>>2]=q[c+8>>2];a=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=a;break a}q[c+8>>2]=q[a+8>>2];b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;q[a+8>>2]=q[a+20>>2];b=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=b;q[a+20>>2]=q[c+8>>2];b=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=b;if(t[q[g>>2]+116>>2]>=t[q[a+20>>2]+116>>2]){break a}q[c+8>>2]=q[a+20>>2];b=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=b;q[a+20>>2]=q[e+8>>2];b=q[e+4>>2];q[a+12>>2]=q[e>>2];q[a+16>>2]=b;q[e+8>>2]=q[c+8>>2];a=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=a;break a;case 4:_r(a,a+12|0,a+24|0,b-12|0);break a;case 5:_r(a,a+12|0,a+24|0,a+36|0);if(t[q[b-4>>2]+116>>2]>=t[q[a+44>>2]+116>>2]){break a}q[c+8>>2]=q[a+44>>2];e=q[a+40>>2];q[c>>2]=q[a+36>>2];q[c+4>>2]=e;b=b-12|0;q[a+44>>2]=q[b+8>>2];e=q[b+4>>2];q[a+36>>2]=q[b>>2];q[a+40>>2]=e;q[b+8>>2]=q[c+8>>2];e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;if(t[q[a+44>>2]+116>>2]>=t[q[a+32>>2]+116>>2]){break a}q[c+8>>2]=q[a+32>>2];b=q[a+28>>2];q[c>>2]=q[a+24>>2];q[c+4>>2]=b;q[a+32>>2]=q[a+44>>2];b=q[a+40>>2];q[a+24>>2]=q[a+36>>2];q[a+28>>2]=b;q[a+44>>2]=q[c+8>>2];b=q[c+4>>2];q[a+36>>2]=q[c>>2];q[a+40>>2]=b;if(t[q[a+32>>2]+116>>2]>=t[q[a+20>>2]+116>>2]){break a}q[c+8>>2]=q[a+20>>2];b=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=b;q[a+20>>2]=q[a+32>>2];b=q[a+28>>2];q[a+12>>2]=q[a+24>>2];q[a+16>>2]=b;q[a+32>>2]=q[c+8>>2];b=q[c+4>>2];q[a+24>>2]=q[c>>2];q[a+28>>2]=b;if(t[q[a+20>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){break a}q[c+8>>2]=q[a+8>>2];b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;q[a+8>>2]=q[a+20>>2];b=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=b;q[a+20>>2]=q[c+8>>2];b=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=b;break a;case 0:case 1:break a;default:break b}}f=a+24|0;e=q[a+32>>2];g=q[e+116>>2];d=q[q[a+20>>2]+116>>2];h=q[a+8>>2];c:{if(d>>>0>=t[h+116>>2]){if(d>>>0<=g>>>0){break c}g=c+8|0;q[g>>2]=q[a+20>>2];d=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=d;q[a+20>>2]=q[f+8>>2];d=q[f+4>>2];q[a+12>>2]=q[f>>2];q[a+16>>2]=d;q[f+8>>2]=q[g>>2];d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d;if(t[q[a+20>>2]+116>>2]>=t[h+116>>2]){break c}q[g>>2]=q[a+8>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[a+8>>2]=q[a+20>>2];d=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=d;q[a+20>>2]=q[g>>2];d=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=d;break c}if(d>>>0>g>>>0){g=a+8|0;q[c+8>>2]=q[g>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[g>>2]=q[f+8>>2];d=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=d;q[f+8>>2]=q[c+8>>2];d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d;break c}g=c+8|0;q[g>>2]=q[a+8>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[a+8>>2]=q[a+20>>2];d=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=d;q[a+20>>2]=q[g>>2];d=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=d;if(t[e+116>>2]>=t[q[a+20>>2]+116>>2]){break c}q[g>>2]=q[a+20>>2];d=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=d;q[a+20>>2]=q[f+8>>2];d=q[f+4>>2];q[a+12>>2]=q[f>>2];q[a+16>>2]=d;q[f+8>>2]=q[g>>2];d=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=d}d:{e:{d=a+36|0;if((d|0)==(b|0)){break e}h=0;while(1){f:{e=d;i=q[e+8>>2];if(t[i+116>>2]>2]+116>>2]){j=q[e>>2];k=q[e+4>>2];g=e;while(1){g:{d=f;l=q[f+4>>2];q[g>>2]=q[f>>2];q[g+4>>2]=l;q[g+8>>2]=q[f+8>>2];if((a|0)==(f|0)){d=a;break g}f=d-12|0;g=d;if(t[i+116>>2]>2]+116>>2]){continue}}break}q[d+8>>2]=i;q[d>>2]=j;q[d+4>>2]=k;h=h+1|0;if((h|0)==8){break f}}f=e;d=e+12|0;if((d|0)!=(b|0)){continue}break e}break}g=(e+12|0)==(b|0);a=0;break d}a=1}d=a|g}Ii=c+16|0;return d&1} - - - -function Ds(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;l=r[b+16|0]|r[b+17|0]<<8|(r[b+18|0]<<16|r[b+19|0]<<24);i=r[b+32|0]|r[b+33|0]<<8|(r[b+34|0]<<16|r[b+35|0]<<24);m=r[b+48|0]|r[b+49|0]<<8|(r[b+50|0]<<16|r[b+51|0]<<24);n=r[b+36|0]|r[b+37|0]<<8|(r[b+38|0]<<16|r[b+39|0]<<24);o=r[b+52|0]|r[b+53|0]<<8|(r[b+54|0]<<16|r[b+55|0]<<24);p=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);g=r[b+20|0]|r[b+21|0]<<8|(r[b+22|0]<<16|r[b+23|0]<<24);h=q[a+12>>2];j=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);C=q[a+8>>2];s=q[a+20>>2];k=q[a+16>>2];c=h+Fza(((j+C|0)+(s^(s^k)&h)|0)-680876936|0,7)|0;t=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);u=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);e=Fza(((p+s|0)+(c&(h^k)^k)|0)-389564586|0,12)+c|0;d=Fza(((u+k|0)+(e&(c^h)^h)|0)+606105819|0,17)+e|0;f=Fza(((h+t|0)+(c^d&(c^e))|0)-1044525330|0,22)+d|0;c=Fza(((c+l|0)+(e^f&(d^e))|0)-176418897|0,7)+f|0;v=r[b+28|0]|r[b+29|0]<<8|(r[b+30|0]<<16|r[b+31|0]<<24);w=r[b+24|0]|r[b+25|0]<<8|(r[b+26|0]<<16|r[b+27|0]<<24);e=Fza(((e+g|0)+(d^c&(d^f))|0)+1200080426|0,12)+c|0;d=Fza(((d+w|0)+(f^e&(c^f))|0)-1473231341|0,17)+e|0;f=Fza(((f+v|0)+(c^d&(c^e))|0)-45705983|0,22)+d|0;c=Fza(((c+i|0)+(e^f&(d^e))|0)+1770035416|0,7)+f|0;x=r[b+44|0]|r[b+45|0]<<8|(r[b+46|0]<<16|r[b+47|0]<<24);y=r[b+40|0]|r[b+41|0]<<8|(r[b+42|0]<<16|r[b+43|0]<<24);e=Fza(((e+n|0)+(d^c&(d^f))|0)-1958414417|0,12)+c|0;d=Fza(((y+d|0)+(f^e&(c^f))|0)-42063|0,17)+e|0;f=Fza(((f+x|0)+(c^d&(c^e))|0)-1990404162|0,22)+d|0;c=Fza(((c+m|0)+(e^f&(d^e))|0)+1804603682|0,7)+f|0;z=r[b+60|0]|r[b+61|0]<<8|(r[b+62|0]<<16|r[b+63|0]<<24);B=c+p|0;A=r[b+56|0]|r[b+57|0]<<8|(r[b+58|0]<<16|r[b+59|0]<<24);e=Fza(((e+o|0)+(d^c&(d^f))|0)-40341101|0,12)+c|0;b=Fza(((A+d|0)+(f^e&(c^f))|0)-1502002290|0,17)+e|0;c=Fza(((f+z|0)+(c^b&(c^e))|0)+1236535329|0,22)+b|0;d=Fza((B+((b^c)&e^b)|0)-165796510|0,5)+c|0;f=b+x|0;b=Fza(((e+w|0)+(c^b&(c^d))|0)-1069501632|0,9)+d|0;e=Fza((f+(d^c&(b^d))|0)+643717713|0,14)+b|0;c=Fza(((c+j|0)+(b^d&(b^e))|0)-373897302|0,20)+e|0;d=Fza(((d+g|0)+((e^c)&b^e)|0)-701558691|0,5)+c|0;b=Fza(((b+y|0)+(c^e&(c^d))|0)+38016083|0,9)+d|0;e=Fza(((e+z|0)+(d^c&(b^d))|0)-660478335|0,14)+b|0;c=Fza(((c+l|0)+(b^d&(b^e))|0)-405537848|0,20)+e|0;d=Fza(((d+n|0)+((e^c)&b^e)|0)+568446438|0,5)+c|0;f=e+t|0;e=Fza(((b+A|0)+(c^e&(c^d))|0)-1019803690|0,9)+d|0;f=Fza((f+(d^(e^d)&c)|0)-187363961|0,14)+e|0;c=Fza(((c+i|0)+(e^(e^f)&d)|0)+1163531501|0,20)+f|0;b=Fza(((d+o|0)+((f^c)&e^f)|0)-1444681467|0,5)+c|0;d=Fza(((e+u|0)+(c^f&(b^c))|0)-51403784|0,9)+b|0;e=Fza(((f+v|0)+(b^c&(d^b))|0)+1735328473|0,14)+d|0;B=d+i|0;f=d^e;c=Fza(((c+m|0)+(d^f&b)|0)-1926607734|0,20)+e|0;d=Fza(((b+g|0)+(c^f)|0)-378558|0,4)+c|0;b=Fza((B+(c^e^d)|0)-2022574463|0,11)+d|0;e=Fza(((e+x|0)+(b^(c^d))|0)+1839030562|0,16)+b|0;c=Fza(((c+A|0)+(e^(b^d))|0)-35309556|0,23)+e|0;d=Fza(((d+p|0)+(c^(b^e))|0)-1530992060|0,4)+c|0;b=Fza(((b+l|0)+(d^(c^e))|0)+1272893353|0,11)+d|0;e=Fza(((e+v|0)+(b^(c^d))|0)-155497632|0,16)+b|0;c=Fza(((c+y|0)+(e^(b^d))|0)-1094730640|0,23)+e|0;d=Fza(((d+o|0)+(c^(b^e))|0)+681279174|0,4)+c|0;b=Fza(((b+j|0)+(d^(c^e))|0)-358537222|0,11)+d|0;e=Fza(((e+t|0)+(b^(c^d))|0)-722521979|0,16)+b|0;c=Fza(((c+w|0)+(e^(b^d))|0)+76029189|0,23)+e|0;d=Fza(((d+n|0)+(c^(b^e))|0)-640364487|0,4)+c|0;b=Fza(((b+m|0)+(d^(c^e))|0)-421815835|0,11)+d|0;f=d+j|0;j=b^d;d=Fza(((e+z|0)+(b^(c^d))|0)+530742520|0,16)+b|0;e=Fza(((c+u|0)+(j^d)|0)-995338651|0,23)+d|0;c=Fza((f+((e|b^-1)^d)|0)-198630844|0,6)+e|0;f=e+g|0;g=d+A|0;d=Fza(((b+v|0)+(e^(c|d^-1))|0)+1126891415|0,10)+c|0;e=Fza((g+(c^(d|e^-1))|0)-1416354905|0,15)+d|0;b=Fza((f+((e|c^-1)^d)|0)-57434055|0,21)+e|0;f=e+y|0;g=d+t|0;d=Fza(((c+m|0)+(e^(b|d^-1))|0)+1700485571|0,6)+b|0;e=Fza((g+(b^(d|e^-1))|0)-1894986606|0,10)+d|0;c=Fza((f+((e|b^-1)^d)|0)-1051523|0,15)+e|0;f=e+z|0;i=d+i|0;d=Fza(((b+p|0)+(e^(c|d^-1))|0)-2054922799|0,21)+c|0;e=Fza((i+(c^(d|e^-1))|0)+1873313359|0,6)+d|0;b=Fza((f+((e|c^-1)^d)|0)-30611744|0,10)+e|0;c=Fza(((c+w|0)+(e^(b|d^-1))|0)-1560198380|0,15)+b|0;d=Fza(((d+o|0)+(b^(c|e^-1))|0)+1309151649|0,21)+c|0;e=Fza(((e+l|0)+((d|b^-1)^c)|0)-145523070|0,6)+d|0;q[a+8>>2]=e+C;b=Fza(((b+x|0)+(d^(e|c^-1))|0)-1120210379|0,10)+e|0;q[a+20>>2]=b+s;c=Fza(((c+u|0)+(e^(b|d^-1))|0)+718787259|0,15)+b|0;q[a+16>>2]=c+k;q[a+12>>2]=Fza(((d+n|0)+(b^(c|e^-1))|0)-343485551|0,21)+(c+h|0);return 0}function Pqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=Ii-48|0;Ii=g;h=q[a>>2];D=h+3144|0;a:{while(1){b:{b=(o<<4)+h|0;v=b+1084|0;d=q[v>>2];x=b+1080|0;c=q[x>>2];b=d-c|0;if(!b){break b}c:{d:{e:{f:{g:{if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>1|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);E=b>>>0>1?b:1;n=0;while(1){l=s[(n<<1)+c>>1];b=q[h+1036>>2];if(l>>>0>=q[h+1040>>2]-b>>2>>>0){break a}y=l<<2;e=q[b+y>>2];d=q[e+84>>2];b=q[a+4>>2];h:{if((d|0)!=q[b+8>>2]){if(!q[d+4>>2]){break h}f=0;l=0;while(1){m=q[d>>2]+w(f,96)|0;c=q[m+16>>2];i:{if(q[m+8>>2]!=q[b>>2]|q[m+12>>2]!=q[b+4>>2]){break i}j=q[c+76>>2];if(!j){break i}d=q[c+100>>2];q[g+24>>2]=e;q[g+28>>2]=q[b+8>>2];q[g+32>>2]=q[((q[m+20>>2]<<2)+h|0)+12>>2];b=q[c+16>>2];q[g+40>>2]=((l<<2)+e|0)+156&d<<15>>31;q[g+36>>2]=b;Mi[j|0](g+24|0);d=q[e+84>>2]}f=f+1|0;if(f>>>0>=t[d+4>>2]){break h}l=(p[c+102>>1]&1)+l|0;b=q[a+4>>2];continue}}if(r[e+149|0]&128){break g}if(q[e+140>>2]&32768){break f}m=q[b+12>>2];b=q[d+4>>2];j:{if(!b){f=0;break j}j=q[a+8>>2];i=q[d>>2];f=0;c=0;while(1){k=q[(i+w(c,96)|0)+16>>2];if(!k){break e}f=(p[k+102>>1]&1)+f|0;c=c+1|0;if((b|0)!=(c|0)){continue}break}}b=$i((f<<2)+160|0);q[b+88>>2]=-1;q[b+84>>2]=d;q[b+72>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;q[b+56>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=1065353216;q[b+32>>2]=1065353216;q[b+36>>2]=1065353216;q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=1065353216;q[b>>2]=0;q[b+4>>2]=0;q[b+80>>2]=0;d=q[71493];q[b+96>>2]=q[71492];q[b+100>>2]=d;j=b+104|0;wn(j,0);q[b+144>>2]=2147450879;q[b+152>>2]=f;d=q[b+140>>2]&-2147483648;c=d;f=q[b+136>>2]&61440;q[b+136>>2]=f|2147418112;q[b+140>>2]=c|2147450879;i=q[b+148>>2]&-2147483648;q[b+148>>2]=i|2147450879;q[g+20>>2]=b;q[b+80>>2]=q[e+80>>2];d=q[e+140>>2];p[b+144>>1]=32767;d=c|d&32767;c=d;q[b+136>>2]=f|2147418112;q[b+140>>2]=c|2147418112;d=q[e+140>>2];p[b+144>>1]=32767;c=d&2147418112|c;d=c;f=f|2147418112;q[b+136>>2]=f;q[b+140>>2]=c;c=r[e+136|0];p[b+144>>1]=32767;c=c|f;q[b+136>>2]=c;q[b+140>>2]=d;f=q[e+136>>2];p[b+144>>1]=32767;f=c|f&1024;q[b+136>>2]=f;q[b+140>>2]=d;c=s[e+138>>1];p[b+144>>1]=32767;k=f&62719;f=c>>>16|0;c=k|c<<16;f=f|d&-32769;q[b+136>>2]=c;q[b+140>>2]=f;d=i|q[e+148>>2]&2147418112;q[b+148>>2]=d|32767;q[b+148>>2]=d|q[e+148>>2]&32767;u[b>>2]=u[e>>2];u[b+4>>2]=u[e+4>>2];u[b+8>>2]=u[e+8>>2];u[b+12>>2]=u[e+12>>2];u[b+16>>2]=u[e+16>>2];u[b+20>>2]=u[e+20>>2];u[b+24>>2]=u[e+24>>2];u[b+32>>2]=u[e+32>>2];u[b+36>>2]=u[e+36>>2];u[b+40>>2]=u[e+40>>2];u[b+48>>2]=u[e+48>>2];u[b+52>>2]=u[e+52>>2];u[b+56>>2]=u[e+56>>2];u[b+64>>2]=u[e+64>>2];u[b+68>>2]=u[e+68>>2];u[b+72>>2]=u[e+72>>2];d=q[e+136>>2];p[b+144>>1]=32767;q[b+136>>2]=c|d&512;q[b+140>>2]=f;d=q[e+100>>2];q[b+96>>2]=q[e+96>>2];q[b+100>>2]=d;q[b+88>>2]=q[e+88>>2];z=e+104|0;ut(j,z,1);c=q[g+20>>2];b=c;d=q[b+136>>2]&-2049;b=q[b+140>>2];q[c+136>>2]=q[e+136>>2]&2048|d;q[c+140>>2]=b;if(!Mt(q[q[h+8>>2]>>2],c)){yr(c+104|0);Ni(Ui(c,204,160));break h}k:{if(!(q[e+136>>2]&256)){q[e+84>>2]=m;break k}j=q[c+84>>2];i=q[j+4>>2];if(i){d=0;f=0;while(1){A=q[j>>2]+w(f,96)|0;k=q[A+16>>2];B=q[k+100>>2];b=((B&65536)>>>16|0)+d|0;if(b>>>0>t[c+152>>2]){break d}C=q[k+36>>2];l:{if(C){i=q[h+8>>2];q[g+28>>2]=c;q[g+24>>2]=i;q[g+32>>2]=q[((q[A+20>>2]<<2)+h|0)+12>>2];i=q[k+16>>2];q[g+40>>2]=((d<<2)+c|0)+156&B<<15>>31;q[g+36>>2]=i;if(Mi[C|0](g+24|0)|0){break l}i=q[j+4>>2]}d=b;f=f+1|0;if(i>>>0>f>>>0){continue}}break}c=q[g+20>>2]}b=q[c+140>>2];q[c+136>>2]=q[c+136>>2]|256;q[c+140>>2]=b;q[e+84>>2]=m;if(!(q[e+136>>2]&256)){break k}DB(h,e)}rM(h,e);yr(z);b=q[h+1036>>2];if(l>>>0>=q[h+1040>>2]-b>>2>>>0){break c}q[b+y>>2]=q[g+20>>2];b=q[g+20>>2];wr(D,q[b+96>>2],q[b+100>>2],g+20|0);c=q[h+3180>>2];d=q[h+3176>>2];b=c-d|0;m:{if(!b){break m}c=d-c|0;c=((b|0)<(c|0)?c:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(c,(b|0)<1?b:1);b=b>>>0>1?b:1;c=0;while(1){f=d+(c<<2)|0;if(q[f>>2]!=(e|0)){c=c+1|0;if((b|0)!=(c|0)){continue}break m}break}q[f>>2]=q[g+20>>2]}Ni(Ui(e,204,160));EB(h,q[g+20>>2])}n=n+1|0;if((E|0)==(n|0)){break b}c=q[x>>2];if(q[v>>2]-c>>1>>>0>n>>>0){continue}break}}break a}J(11495,7192,3639,12299);G()}J(12316,7192,3640,12299);G()}q[g+4>>2]=j;q[g>>2]=c;Pi(4,7319,10113,g);J(10168,7192,720,10174);G()}J(8018,7192,1683,11480);G()}break a}o=o+1|0;if((o|0)!=128){continue}break}Ii=g+48|0;return}J(12419,9962,479,9454);G()}function l$(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=Ii-432|0;Ii=g;h=q[b+4>>2];a:{if(h>>>0>2]){q[b+4>>2]=h+1;i=r[h|0];break a}i=Fk(b)}b:{c:{while(1){d:{if((i|0)!=48){if((i|0)!=46){break b}h=q[b+4>>2];if(h>>>0>=t[b+104>>2]){break d}q[b+4>>2]=h+1;i=r[h|0];break c}h=q[b+4>>2];if(h>>>0>2]){z=1;q[b+4>>2]=h+1;i=r[h|0]}else{z=1;i=Fk(b)}continue}break}i=Fk(b)}y=1;if((i|0)!=48){break b}while(1){h=q[b+4>>2];e:{if(h>>>0>2]){q[b+4>>2]=h+1;i=r[h|0];break e}i=Fk(b)}h=u;u=h-1|0;v=v-(h>>>0<1)|0;if((i|0)==48){continue}break}z=1}h=1073676288;while(1){f:{A=i|32;g:{h:{B=i-48|0;if(B>>>0<10){break h}if(A-97>>>0>5?(i|0)!=46:0){break f}if((i|0)!=46){break h}if(y){break f}y=1;u=m;v=j;break g}i=(i|0)>57?A-87|0:B;i:{if((j|0)<0?1:(j|0)<=0?m>>>0<=7:0){o=i+(o<<4)|0;break i}if((j|0)<0?1:(j|0)<=0?m>>>0<=28:0){$m(g+48|0,i);Qk(g+32|0,w,x,n,h,0,0,0,1073414144);w=q[g+32>>2];x=q[g+36>>2];n=q[g+40>>2];h=q[g+44>>2];Qk(g+16|0,w,x,n,h,q[g+48>>2],q[g+52>>2],q[g+56>>2],q[g+60>>2]);Um(g,k,l,p,s,q[g+16>>2],q[g+20>>2],q[g+24>>2],q[g+28>>2]);p=q[g+8>>2];s=q[g+12>>2];k=q[g>>2];l=q[g+4>>2];break i}if(!i|E){break i}Qk(g+80|0,w,x,n,h,0,0,0,1073610752);Um(g- -64|0,k,l,p,s,q[g+80>>2],q[g+84>>2],q[g+88>>2],q[g+92>>2]);p=q[g+72>>2];s=q[g+76>>2];E=1;k=q[g+64>>2];l=q[g+68>>2]}m=m+1|0;j=m>>>0<1?j+1|0:j;z=1}i=q[b+4>>2];if(i>>>0>2]){q[b+4>>2]=i+1;i=r[i|0]}else{i=Fk(b)}continue}break}j:{k:{l:{if(!z){if(!q[b+104>>2]){if(f){break k}break l}c=q[b+4>>2];q[b+4>>2]=c-1;if(!f){break l}q[b+4>>2]=c-2;if(!y){break k}q[b+4>>2]=c-3;break k}if((j|0)<0?1:(j|0)<=0?m>>>0<=7:0){n=m;h=j;while(1){o=o<<4;n=n+1|0;h=n>>>0<1?h+1|0:h;if((n|0)!=8|h){continue}break}}m:{if((i&-33)==80){n=LD(b,f);i=Li;h=i;if(n|(h|0)!=-2147483648){break m}if(f){n=0;h=0;if(!q[b+104>>2]){break m}q[b+4>>2]=q[b+4>>2]-1;break m}k=0;l=0;Cn(b,0,0);c=0;b=0;break j}n=0;h=0;if(!q[b+104>>2]){break m}q[b+4>>2]=q[b+4>>2]-1}if(!o){yo(g+112|0,+(e|0)*0);k=q[g+112>>2];l=q[g+116>>2];c=q[g+120>>2];b=q[g+124>>2];break j}f=y?u:m;b=(y?v:j)<<2|f>>>30;f=n+(f<<2)|0;j=b+h|0;b=f;m=b-32|0;j=(b>>>0>>0?j+1|0:j)-(b>>>0<32)|0;b=j;if((b|0)>0?1:(b|0)>=0?m>>>0>0-d>>>0:0){q[240513]=68;$m(g+160|0,e);Qk(g+144|0,q[g+160>>2],q[g+164>>2],q[g+168>>2],q[g+172>>2],-1,-1,-1,2147418111);Qk(g+128|0,q[g+144>>2],q[g+148>>2],q[g+152>>2],q[g+156>>2],-1,-1,-1,2147418111);k=q[g+128>>2];l=q[g+132>>2];c=q[g+136>>2];b=q[g+140>>2];break j}b=d-226|0;f=m>>>0>=b>>>0;b=b>>31;if((b|0)<(j|0)?1:(j|0)>=(b|0)?f:0){if((o|0)>-1){while(1){Um(g+416|0,k,l,p,s,0,0,0,-1073807360);h=nO(k,l,p,s,1073610752);f=(h|0)<0;b=f;Um(g+400|0,k,l,p,s,b?k:q[g+416>>2],b?l:q[g+420>>2],b?p:q[g+424>>2],b?s:q[g+428>>2]);b=m;m=b-1|0;j=j-(b>>>0<1)|0;p=q[g+408>>2];s=q[g+412>>2];k=q[g+400>>2];l=q[g+404>>2];o=o<<1|(h|0)>-1;if((o|0)>-1){continue}break}}b=d;h=(m-b|0)+32|0;j=j-((b>>31)+(b>>>0>m>>>0)|0)|0;b=h;j=b>>>0<32?j+1|0:j;c=((j|0)<0?1:(j|0)<=0?c>>>0>b>>>0:0)?(b|0)>0?b:0:c;n:{if((c|0)>=113){$m(g+384|0,e);u=q[g+392>>2];v=q[g+396>>2];w=q[g+384>>2];x=q[g+388>>2];d=0;b=0;break n}yo(g+352|0,Zn(1,144-c|0));$m(g+336|0,e);w=q[g+336>>2];x=q[g+340>>2];u=q[g+344>>2];v=q[g+348>>2];rN(g+368|0,q[g+352>>2],q[g+356>>2],q[g+360>>2],q[g+364>>2],w,x,u,v);C=q[g+376>>2];D=q[g+380>>2];d=q[g+372>>2];b=q[g+368>>2]}c=!(o&1)&((Eq(k,l,p,s,0,0,0,0)|0)!=0&(c|0)<32);Yr(g+320|0,c+o|0);Qk(g+304|0,w,x,u,v,q[g+320>>2],q[g+324>>2],q[g+328>>2],q[g+332>>2]);Um(g+272|0,q[g+304>>2],q[g+308>>2],q[g+312>>2],q[g+316>>2],b,d,C,D);Qk(g+288|0,c?0:k,c?0:l,c?0:p,c?0:s,w,x,u,v);Um(g+256|0,q[g+288>>2],q[g+292>>2],q[g+296>>2],q[g+300>>2],q[g+272>>2],q[g+276>>2],q[g+280>>2],q[g+284>>2]);oC(g+240|0,q[g+256>>2],q[g+260>>2],q[g+264>>2],q[g+268>>2],b,d,C,D);e=q[g+240>>2];d=q[g+244>>2];c=q[g+248>>2];b=q[g+252>>2];if(!Eq(e,d,c,b,0,0,0,0)){q[240513]=68}MD(g+224|0,e,d,c,b,m);k=q[g+224>>2];l=q[g+228>>2];c=q[g+232>>2];b=q[g+236>>2];break j}q[240513]=68;$m(g+208|0,e);Qk(g+192|0,q[g+208>>2],q[g+212>>2],q[g+216>>2],q[g+220>>2],0,0,0,65536);Qk(g+176|0,q[g+192>>2],q[g+196>>2],q[g+200>>2],q[g+204>>2],0,0,0,65536);k=q[g+176>>2];l=q[g+180>>2];c=q[g+184>>2];b=q[g+188>>2];break j}Cn(b,0,0)}yo(g+96|0,+(e|0)*0);k=q[g+96>>2];l=q[g+100>>2];c=q[g+104>>2];b=q[g+108>>2]}q[a>>2]=k;q[a+4>>2]=l;q[a+8>>2]=c;q[a+12>>2]=b;Ii=g+432|0}function kta(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;a:{b:{c:{d:{h=q[c+4>>2]>>>22&63;g=h-1|0;if(!(g>>>0>=14|!(15871>>>g&1))){f=2;e:{if(q[(g<<2)+24020>>2]!=(b|0)){break e}f:{switch(h-1|0){case 1:if(!yta(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}a=q[a+4>>2]+q[c+12>>2]|0;b=(q[a+4>>2]<<2)+q[a>>2]|0;c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;q[a+4>>2]=q[a+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+8>>2];o[b|0]=a;o[b+1|0]=a>>>8;o[b+2|0]=a>>>16;o[b+3|0]=a>>>24;break e;case 0:if(!Bta(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}b=q[e+12>>2];c=q[a+4>>2]+q[c+12>>2]|0;a=(q[c+4>>2]<<3)+q[c>>2]|0;d=q[e+8>>2];o[a|0]=d;o[a+1|0]=d>>>8;o[a+2|0]=d>>>16;o[a+3|0]=d>>>24;o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;q[c+4>>2]=q[c+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+12>>2];c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;o[b+4|0]=a;o[b+5|0]=a>>>8;o[b+6|0]=a>>>16;o[b+7|0]=a>>>24;break e;case 4:if(!PB(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}a=q[a+4>>2]+q[c+12>>2]|0;b=(q[a+4>>2]<<2)+q[a>>2]|0;c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;q[a+4>>2]=q[a+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+8>>2];o[b|0]=a;o[b+1|0]=a>>>8;o[b+2|0]=a>>>16;o[b+3|0]=a>>>24;break e;case 12:if(!PB(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}a=q[a+4>>2]+q[c+12>>2]|0;b=(q[a+4>>2]<<2)+q[a>>2]|0;c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;q[a+4>>2]=q[a+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+8>>2];o[b|0]=a;o[b+1|0]=a>>>8;o[b+2|0]=a>>>16;o[b+3|0]=a>>>24;break e;case 2:if(!TM(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}b=q[e+12>>2];c=q[a+4>>2]+q[c+12>>2]|0;a=(q[c+4>>2]<<3)+q[c>>2]|0;d=q[e+8>>2];o[a|0]=d;o[a+1|0]=d>>>8;o[a+2|0]=d>>>16;o[a+3|0]=d>>>24;o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;q[c+4>>2]=q[c+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+12>>2];c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;o[b+4|0]=a;o[b+5|0]=a>>>8;o[b+6|0]=a>>>16;o[b+7|0]=a>>>24;break e;case 3:if(!TM(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}b=q[e+12>>2];c=q[a+4>>2]+q[c+12>>2]|0;a=(q[c+4>>2]<<3)+q[c>>2]|0;d=q[e+8>>2];o[a|0]=d;o[a+1|0]=d>>>8;o[a+2|0]=d>>>16;o[a+3|0]=d>>>24;o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;q[c+4>>2]=q[c+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+12>>2];c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;o[b+4|0]=a;o[b+5|0]=a>>>8;o[b+6|0]=a>>>16;o[b+7|0]=a>>>24;break e;case 13:if(!PB(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}a=q[a+4>>2]+q[c+12>>2]|0;b=(q[a+4>>2]<<2)+q[a>>2]|0;c=q[e+8>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;q[a+4>>2]=q[a+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}a=q[e+8>>2];o[b|0]=a;o[b+1|0]=a>>>8;o[b+2|0]=a>>>16;o[b+3|0]=a>>>24;break e;case 7:break f;default:break d}}if(!Cta(d,e+8|0)){break e}b=q[c+8>>2];if((q[c+4>>2]&-268435456)==805306368){if(b){break c}f=0;if(r[a+12|0]){break e}a=q[a+4>>2]+q[c+12>>2]|0;o[q[a+4>>2]+q[a>>2]|0]=r[e+8|0];q[a+4>>2]=q[a+4>>2]+1;break e}if(b){break b}b=q[c+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}f=0;if(r[a+12|0]){break e}o[b|0]=r[e+8|0]}Ii=e+16|0;return f}J(23352,23972,83,23994);G()}J(23352,23354,72,23381);G()}J(23654,23354,241,23776);G()}J(23654,23354,229,23644);G()}J(23686,23354,231,23644);G()}function ina(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),t=0,v=0,y=0,z=0,A=0,B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=x(0),N=x(0),O=x(0),P=0,Q=x(0),R=x(0);e=Ii-144|0;Ii=e;g=q[a+4>>2];a:{b:{c:{c=q[a+16>>2];b=q[c+64>>2];f=q[58902];d=q[c+68>>2];d:{if((b|0)==q[f+8>>2]&(d|0)==q[f+12>>2]){f=q[g+84>>2];d=q[q[a+12>>2]>>2];q[e+140>>2]=0;if(q[c+84>>2]==20){b=Yi(16);q[e+140>>2]=b;q[e+136>>2]=q[c+96>>2];h=r[c+112|0]|r[c+113|0]<<8|(r[c+114|0]<<16|r[c+115|0]<<24);i=r[c+108|0]|r[c+109|0]<<8|(r[c+110|0]<<16|r[c+111|0]<<24);o[b+8|0]=i;o[b+9|0]=i>>>8;o[b+10|0]=i>>>16;o[b+11|0]=i>>>24;o[b+12|0]=h;o[b+13|0]=h>>>8;o[b+14|0]=h>>>16;o[b+15|0]=h>>>24;h=r[c+104|0]|r[c+105|0]<<8|(r[c+106|0]<<16|r[c+107|0]<<24);i=r[c+100|0]|r[c+101|0]<<8|(r[c+102|0]<<16|r[c+103|0]<<24);o[b|0]=i;o[b+1|0]=i>>>8;o[b+2|0]=i>>>16;o[b+3|0]=i>>>24;o[b+4|0]=h;o[b+5|0]=h>>>8;o[b+6|0]=h>>>16;o[b+7|0]=h>>>24}h=g+4|0;t=q[c+56>>2];v=q[c+60>>2];y=q[a>>2];b=q[g+4>>2];c=q[g+8>>2];if((b|0)==(c|0)){if(o[g+12|0]&1){break c}Wi(((b-q[g>>2]|0)/40|0)+4|0,40,g,g+8|0,h);c=q[g+8>>2];b=q[g+4>>2]}i=q[g>>2];z=b-i|0;P=(z|0)/40|0;A=P+1|0;if(A>>>0>(c-i|0)/40>>>0){break b}q[h>>2]=i+w(A,40);if((z+40|0)/40>>>0<=P>>>0){break a}q[b+8>>2]=t;q[b+12>>2]=v;q[b>>2]=y;q[b+28>>2]=(d-q[g+48>>2]|0)/48;tp(q[q[g+80>>2]>>2],q[d+32>>2]);q[b+16>>2]=iI(q[g+84>>2],q[d+32>>2],e+136|0);c=q[d+32>>2];q[b+24>>2]=g;q[b+20>>2]=c;p[b+32>>1]=s[b+32>>1]&65534|p[d+36>>1]&1;q[g+112>>2]=q[g+112>>2]+((q[c+4>>2]-q[c>>2]|0)/18568|0);B=u[d+24>>2];C=u[d+20>>2];D=u[d+28>>2];E=u[d+16>>2];b=q[b+16>>2];k=u[d>>2];l=u[d+4>>2];m=u[d+8>>2];Aw(e+80|0,q[a>>2]);Q=u[e+100>>2];R=u[e+96>>2];j=u[e+88>>2];I=u[e+112>>2];n=x(k*I);k=u[e+92>>2];K=u[e+116>>2];F=x(l*K);l=u[e+80>>2];L=u[e+120>>2];H=x(m*L);M=x(x(x(j*n)+x(k*F))-x(l*H));m=u[e+84>>2];N=x(x(j*H)+x(x(l*n)+x(m*F)));O=x(x(x(l*F)+x(k*H))-x(m*n));n=x(x(x(k*n)+x(m*H))-x(j*F));u[e+88>>2]=u[e+104>>2]+x(x(l*M)+x(x(x(j*N)+x(k*O))-x(m*n)));u[e+84>>2]=Q+x(x(j*n)+x(x(x(k*M)+x(m*N))-x(l*O)));u[e+80>>2]=R+x(x(m*O)+x(x(x(l*N)+x(k*n))-x(j*M)));Kv(f,b,e+80|0);u[e+92>>2]=x(x(x(D*k)-x(E*l))-x(C*m))-x(B*j);u[e+88>>2]=x(x(C*l)+x(x(D*j)+x(B*k)))-x(E*m);u[e+84>>2]=x(x(E*j)+x(x(D*m)+x(C*k)))-x(B*l);u[e+80>>2]=x(x(B*m)+x(x(D*l)+x(E*k)))-x(C*j);Jv(f,b,e+80|0);j=IL?L:j);$H(f,b,(q[q[a>>2]+136>>2]&512)>>>9|0);if(!(o[d+36|0]&1)){break d}lA(f,b);break d}f=q[58918];if((b|0)==q[f+8>>2]&(d|0)==q[f+12>>2]){f=q[g+4>>2];d=q[g>>2];b=f-d|0;if(!b){break d}b=(b|0)/40|0;if((d|0)!=(f|0)){f=b>>>0>1?b:1;b=0;while(1){d=w(b,40)+d|0;e:{if(q[d>>2]!=q[a>>2]){break e}h=q[a+16>>2];if(q[d+8>>2]!=q[h+56>>2]|q[d+12>>2]!=q[h+60>>2]){break e}kA(q[g+84>>2],q[d+16>>2],r[c+96|0])}b=b+1|0;if((f|0)==(b|0)){break d}d=q[g>>2];if((q[g+4>>2]-d|0)/40>>>0>b>>>0){continue}break}}break a}f=q[58952];if((b|0)==q[f+8>>2]&(d|0)==q[f+12>>2]){f=q[g+4>>2];d=q[g>>2];h=f-d|0;b=(h|0)/40|0;if(h){f:{if((d|0)!=(f|0)){z=b>>>0>1?b:1;b=0;f=0;while(1){d=w(b,40)+d|0;if(q[d>>2]==q[a>>2]){d=q[d+16>>2];j=u[c+112>>2];h=q[c+104>>2];i=q[c+108>>2];t=q[c+96>>2];v=q[c+100>>2];y=q[g+84>>2];g:{if(r[c+176|0]){u[e+16>>2]=j;u[e+20>>2]=u[c+116>>2];u[e+24>>2]=u[c+120>>2];u[e+28>>2]=u[c+124>>2];u[e+32>>2]=u[c+128>>2];u[e+36>>2]=u[c+132>>2];u[e+40>>2]=u[c+136>>2];u[e+44>>2]=u[c+140>>2];u[e+48>>2]=u[c+144>>2];u[e+52>>2]=u[c+148>>2];u[e+56>>2]=u[c+152>>2];u[e+60>>2]=u[c+156>>2];u[e+64>>2]=u[c+160>>2];u[e+68>>2]=u[c+164>>2];u[e+72>>2]=u[c+168>>2];u[e+76>>2]=u[c+172>>2];Z8(y,d,t,v,h,i,e+16|0);break g}u[e>>2]=j;u[e+4>>2]=u[c+116>>2];u[e+8>>2]=u[c+120>>2];u[e+12>>2]=u[c+124>>2];Y8(y,d,t,v,h,i,e)}f=f+1|0}b=b+1|0;if((z|0)==(b|0)){break f}d=q[g>>2];if((q[g+4>>2]-d|0)/40>>>0>b>>>0){continue}break}}break a}if(f){break d}}Pi(3,46815,46952,0);break d}A=b;b=q[58976];if((A|0)!=q[b+8>>2]|q[b+12>>2]!=(d|0)){break d}f=q[g+4>>2];d=q[g>>2];h=f-d|0;b=(h|0)/40|0;if(h){h:{if((d|0)!=(f|0)){h=b>>>0>1?b:1;f=0;b=0;while(1){d=w(b,40)+d|0;if(q[d>>2]==q[a>>2]){$8(q[g+84>>2],q[d+16>>2],q[c+96>>2],q[c+100>>2],q[c+104>>2],q[c+108>>2]);f=f+1|0}b=b+1|0;if((h|0)==(b|0)){break h}d=q[g>>2];if((q[g+4>>2]-d|0)/40>>>0>b>>>0){continue}break}}break a}if(f){break d}}Pi(3,46815,47059,0)}Ii=e+144|0;return 0}J(47496,47132,493,47571);G()}J(47113,47132,506,47188);G()}J(47406,47132,479,47417);G()}function FL(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=x(0),j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0,v=0,y=0,z=0,A=0,B=0,C=x(0),D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0;g=Ii-16|0;Ii=g;a:{b:{c:{d:{j=ak(b,q[q[c>>2]>>2],c+8|0);e:{if(j){break e}f:{g:{h:{i:{A=q[q[q[c+8>>2]+24>>2]>>2];d=q[A+4>>2];if(d){k=c+16|0;l=c+20|0;f=c+12|0;while(1){if(d>>>0<=m>>>0){break h}n=q[A>>2]+(m<<6)|0;h=n;d=q[h+60>>2];e=q[l>>2];j=(e-q[k>>2]|0)/12|0;if(d>>>0>j>>>0){if(o[c+24|0]&1){break b}Wi((d-j|0)+((e-q[f>>2]|0)/12|0)|0,12,f,l,k);d=q[h+60>>2]}if(d){e=0;while(1){if(d>>>0<=e>>>0){break i}d=q[k>>2];if((d|0)==q[l>>2]){break a}j=q[n+56>>2];q[k>>2]=d+12;q[d+8>>2]=j+(e<<7);q[d+4>>2]=n;q[d>>2]=0;d=q[h+60>>2];e=e+1|0;if(d>>>0>e>>>0){continue}break}}d=q[A+4>>2];m=m+1|0;if(d>>>0>m>>>0){continue}break}}lx(q[c+12>>2],q[c+16>>2],g);E=g+8|0;d=E;q[d>>2]=0;q[d+4>>2]=0;q[g>>2]=0;q[g+4>>2]=0;d=q[c+12>>2];if((d|0)==q[c+16>>2]){break f}M=g|4;while(1){F=w(D,12)+d|0;f=q[F+8>>2];s=$i(20);d=s;q[d>>2]=0;q[d+4>>2]=0;q[d+16>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;B=t[f+36>>2]/3|0;e=Mi[q[74952]](a,1)|0;d=q[f+92>>2];H=q[f+88>>2];j:{k:{I=q[f+96>>2];l:{if((I|0)!=1){K=3;n=d>>>1|0;break l}if(!e){break k}K=5;n=d>>>2|0}m:{l=q[g>>2];d=(q[g+8>>2]-l|0)/68|0;if(d>>>0>>0){if(o[g+12|0]&1){break m}Wi(B,68,g,E,M);l=q[g>>2];d=(q[g+8>>2]-l|0)/68|0}if(d>>>0>=B>>>0){L=w(B,68);q[g+4>>2]=L+l;d=q[f+36>>2];h=(d>>>0)/3|0;j=0;v=0;v=d?q[f+32>>2]:v;j=q[f+44>>2]?q[f+40>>2]:j;e=0;k=0;k=q[f+52>>2]?q[f+48>>2]:k;e=q[f+60>>2]?q[f+56>>2]:e;y=0;z=0;z=q[f+68>>2]?q[f+64>>2]:z;y=q[f+80>>2]?q[f+76>>2]:y;if(d>>>0>=3){N=h>>>0>1?h:1;f=0;d=l;while(1){u[d>>2]=u[v>>2];h=0;p=d;if(j){h=j+4|0;i=u[j>>2]}else{i=x(0)}u[p+12>>2]=i;r=0;m=0;p=d;if(k){m=k+4|0;i=u[k>>2]}else{i=x(0)}u[p+24>>2]=i;u[d+4>>2]=u[v+4>>2];k=d;if(h){r=h+4|0;i=u[h>>2]}else{i=x(0)}u[k+16>>2]=i;j=0;h=0;k=d;if(m){h=m+4|0;i=u[m>>2]}else{i=x(0)}u[k+28>>2]=i;u[d+8>>2]=u[v+8>>2];k=d;if(r){j=r+4|0;i=u[r>>2]}else{i=x(0)}u[k+20>>2]=i;if(h){C=u[h>>2];k=h+4|0}else{k=0}u[d+32>>2]=C;n:{if(!e){q[d+36>>2]=1065353216;q[d+40>>2]=1065353216;q[d+44>>2]=1065353216;C=x(1);e=0;break n}u[d+36>>2]=u[e>>2];u[d+40>>2]=u[e+4>>2];u[d+44>>2]=u[e+8>>2];C=u[e+12>>2];e=e+16|0}u[d+48>>2]=C;C=x(0);h=0;r=0;p=d;if(z){r=z+4|0;i=u[z>>2]}else{i=x(0)}u[p+52>>2]=i;p=d;if(y){h=y+4|0;i=u[y>>2]}else{i=x(0)}u[p+60>>2]=i;y=0;z=0;p=d;if(r){z=r+4|0;i=u[r>>2]}else{i=x(0)}u[p+56>>2]=i;v=v+12|0;p=d- -64|0;if(h){y=h+4|0;i=u[h>>2]}else{i=x(0)}u[p>>2]=i;d=d+68|0;f=f+1|0;if((N|0)!=(f|0)){continue}break}}d=Mi[q[74943]](a,L,l,2)|0;q[s+8>>2]=B;q[s>>2]=d;q[s+12>>2]=0;q[s+4>>2]=0;if(!H){break j}d=Mi[q[74948]](a,w((I|0)==1?4:2,n),H,2)|0;q[s+16>>2]=K;q[s+4>>2]=d;q[s+12>>2]=n;break j}J(63109,62918,506,63128);G()}break b}Pi(4,62656,63015,0)}q[F>>2]=s;D=D+1|0;d=q[c+12>>2];if(D>>>0<(q[c+16>>2]-d|0)/12>>>0){continue}break}break g}J(62773,62785,311,62832);G()}J(62773,62785,326,62832);G()}if(o[g+12|0]&1){break f}a=q[g>>2];if(!a){break f}Ni(a)}if(o[c+40|0]&1){break b}a=q[q[c>>2]+12>>2];d=q[A+12>>2];n=a>>>0>d>>>0?a:d;k=c+28|0;l=c+36|0;a=c+32|0;Wi(n,16,k,l,a);if(n){r=g|4;h=0;while(1){e=q[c>>2];f=q[e+12>>2];d=f>>>0>h>>>0?h:0;if(d>>>0>=f>>>0){break d}e=q[e+8>>2];q[g+8>>2]=0;q[g+12>>2]=0;q[g>>2]=0;q[g+4>>2]=0;e=e+(d<<4)|0;j=ak(b,q[e+4>>2],r);if(j){break e}q[g>>2]=Pk(q[e>>2]);d=q[e+12>>2];q[g+12>>2]=d;f=d<<4;j=$i((d|0)!=(d&268435455)?-1:f);q[g+8>>2]=j;Ui(j,0,f);if(d){d=0;while(1){if(t[e+12>>2]<=d>>>0){break c}m=q[e+8>>2]+(d<<3)|0;f=q[g+8>>2]+(d<<4)|0;j=ak(b,q[m+4>>2],f+8|0);if(j){break e}q[f>>2]=Oi(q[m>>2]);q[f+4>>2]=Li;d=d+1|0;if(d>>>0>2]){continue}break}}d=q[a>>2];e=q[l>>2];if((d|0)==(e|0)){if(o[c+40|0]&1){break b}Wi((d-q[k>>2]>>4)+1|0,16,k,l,a);e=q[l>>2];d=q[a>>2]}if((d|0)==(e|0)){break a}q[a>>2]=d+16;e=q[g+12>>2];q[d+8>>2]=q[g+8>>2];q[d+12>>2]=e;e=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=e;h=h+1|0;if((n|0)!=(h|0)){continue}break}}a=q[a>>2];b=q[k>>2];q[g>>2]=A;mx(b,a,g);a=q[c+8>>2];if(!(q[a+28>>2]|q[a+20>>2])){j=0;break e}j=0;e=q[c+28>>2];if((e|0)==q[c+32>>2]){break e}d=0;while(1){if(q[q[q[((d<<4)+e|0)+4>>2]>>2]+152>>2]!=1){d=d+1|0;e=q[c+28>>2];if(d>>>0>2]-e>>4>>>0){continue}break e}break}Pi(4,62656,62664,0);j=-15}Ii=g+16|0;return j}J(62773,63136,92,62832);G()}J(62773,63136,47,62832);G()}J(62843,62918,493,62974);G()}J(62986,62918,533,63010);G()}function y$(a,b){var c=0,d=0,e=0;a:{if(!q[213408]){break a}c=q[213403];q[a>>2]=q[213402];q[a+4>>2]=c;c=q[213409];q[a+24>>2]=q[213408];q[a+28>>2]=c;c=q[213407];q[a+16>>2]=q[213406];q[a+20>>2]=c;c=q[213405];q[a+8>>2]=q[213404];q[a+12>>2]=c;e=1;d=q[213403];b:{if(d-3>>>0<=1){q[213408]=0;c=6;break b}c=2;c:{switch(d|0){case 0:break b;case 5:break c;default:break a}}q[a+4>>2]=0;c=3}q[213403]=c}if(q[213416]){d=q[213411];c=(e<<5)+a|0;q[c>>2]=q[213410];q[c+4>>2]=d;d=q[213417];q[c+24>>2]=q[213416];q[c+28>>2]=d;d=q[213415];q[c+16>>2]=q[213414];q[c+20>>2]=d;d=q[213413];q[c+8>>2]=q[213412];q[c+12>>2]=d;c=2;d=q[213411];d:{e:{if(d-3>>>0>=2){f:{switch(d|0){case 0:break e;case 5:break f;default:break d}}q[((e<<5)+a|0)+4>>2]=0;c=3;break e}q[213416]=0;c=6}q[213411]=c}e=e+1|0}if(q[213424]){d=q[213419];c=(e<<5)+a|0;q[c>>2]=q[213418];q[c+4>>2]=d;d=q[213425];q[c+24>>2]=q[213424];q[c+28>>2]=d;d=q[213423];q[c+16>>2]=q[213422];q[c+20>>2]=d;d=q[213421];q[c+8>>2]=q[213420];q[c+12>>2]=d;c=2;d=q[213419];g:{h:{if(d-3>>>0>=2){i:{switch(d|0){case 0:break h;case 5:break i;default:break g}}q[((e<<5)+a|0)+4>>2]=0;c=3;break h}q[213424]=0;c=6}q[213419]=c}e=e+1|0}if(q[213432]){d=q[213427];c=(e<<5)+a|0;q[c>>2]=q[213426];q[c+4>>2]=d;d=q[213433];q[c+24>>2]=q[213432];q[c+28>>2]=d;d=q[213431];q[c+16>>2]=q[213430];q[c+20>>2]=d;d=q[213429];q[c+8>>2]=q[213428];q[c+12>>2]=d;c=2;d=q[213427];j:{k:{if(d-3>>>0>=2){l:{switch(d|0){case 0:break k;case 5:break l;default:break j}}q[((e<<5)+a|0)+4>>2]=0;c=3;break k}q[213432]=0;c=6}q[213427]=c}e=e+1|0}if(q[213440]){d=q[213435];c=(e<<5)+a|0;q[c>>2]=q[213434];q[c+4>>2]=d;d=q[213441];q[c+24>>2]=q[213440];q[c+28>>2]=d;d=q[213439];q[c+16>>2]=q[213438];q[c+20>>2]=d;d=q[213437];q[c+8>>2]=q[213436];q[c+12>>2]=d;c=2;d=q[213435];m:{n:{if(d-3>>>0>=2){o:{switch(d|0){case 0:break n;case 5:break o;default:break m}}q[((e<<5)+a|0)+4>>2]=0;c=3;break n}q[213440]=0;c=6}q[213435]=c}e=e+1|0}if(q[213448]){d=q[213443];c=(e<<5)+a|0;q[c>>2]=q[213442];q[c+4>>2]=d;d=q[213449];q[c+24>>2]=q[213448];q[c+28>>2]=d;d=q[213447];q[c+16>>2]=q[213446];q[c+20>>2]=d;d=q[213445];q[c+8>>2]=q[213444];q[c+12>>2]=d;c=2;d=q[213443];p:{q:{if(d-3>>>0>=2){r:{switch(d|0){case 0:break q;case 5:break r;default:break p}}q[((e<<5)+a|0)+4>>2]=0;c=3;break q}q[213448]=0;c=6}q[213443]=c}e=e+1|0}if(q[213456]){d=q[213451];c=(e<<5)+a|0;q[c>>2]=q[213450];q[c+4>>2]=d;d=q[213457];q[c+24>>2]=q[213456];q[c+28>>2]=d;d=q[213455];q[c+16>>2]=q[213454];q[c+20>>2]=d;d=q[213453];q[c+8>>2]=q[213452];q[c+12>>2]=d;c=2;d=q[213451];s:{t:{if(d-3>>>0>=2){u:{switch(d|0){case 0:break t;case 5:break u;default:break s}}q[((e<<5)+a|0)+4>>2]=0;c=3;break t}q[213456]=0;c=6}q[213451]=c}e=e+1|0}if(q[213464]){d=q[213459];c=(e<<5)+a|0;q[c>>2]=q[213458];q[c+4>>2]=d;d=q[213465];q[c+24>>2]=q[213464];q[c+28>>2]=d;d=q[213463];q[c+16>>2]=q[213462];q[c+20>>2]=d;d=q[213461];q[c+8>>2]=q[213460];q[c+12>>2]=d;c=2;d=q[213459];v:{w:{if(d-3>>>0>=2){x:{switch(d|0){case 0:break w;case 5:break x;default:break v}}q[((e<<5)+a|0)+4>>2]=0;c=3;break w}q[213464]=0;c=6}q[213459]=c}e=e+1|0}if(q[213472]){d=q[213467];c=(e<<5)+a|0;q[c>>2]=q[213466];q[c+4>>2]=d;d=q[213473];q[c+24>>2]=q[213472];q[c+28>>2]=d;d=q[213471];q[c+16>>2]=q[213470];q[c+20>>2]=d;d=q[213469];q[c+8>>2]=q[213468];q[c+12>>2]=d;c=2;d=q[213467];y:{z:{if(d-3>>>0>=2){A:{switch(d|0){case 0:break z;case 5:break A;default:break y}}q[((e<<5)+a|0)+4>>2]=0;c=3;break z}q[213472]=0;c=6}q[213467]=c}e=e+1|0}if(q[213480]){d=q[213475];c=(e<<5)+a|0;q[c>>2]=q[213474];q[c+4>>2]=d;d=q[213481];q[c+24>>2]=q[213480];q[c+28>>2]=d;d=q[213479];q[c+16>>2]=q[213478];q[c+20>>2]=d;d=q[213477];q[c+8>>2]=q[213476];q[c+12>>2]=d;c=2;d=q[213475];B:{C:{if(d-3>>>0>=2){D:{switch(d|0){case 0:break C;case 5:break D;default:break B}}q[((e<<5)+a|0)+4>>2]=0;c=3;break C}q[213480]=0;c=6}q[213475]=c}e=e+1|0}if(q[213488]){d=q[213483];c=(e<<5)+a|0;q[c>>2]=q[213482];q[c+4>>2]=d;d=q[213489];q[c+24>>2]=q[213488];q[c+28>>2]=d;d=q[213487];q[c+16>>2]=q[213486];q[c+20>>2]=d;d=q[213485];q[c+8>>2]=q[213484];q[c+12>>2]=d;c=2;d=q[213483];E:{F:{if(d-3>>>0>=2){G:{switch(d|0){case 0:break F;case 5:break G;default:break E}}q[((e<<5)+a|0)+4>>2]=0;c=3;break F}q[213488]=0;c=6}q[213483]=c}e=e+1|0}q[b>>2]=(e|0)>11?11:e;return 1}function kL(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=x(0),m=x(0),n=0,o=0,p=x(0),r=0,s=0,z=x(0),A=0,B=x(0),C=x(0),D=0,E=0,F=x(0),H=x(0);D=q[a+8>>2]-q[a+12>>2]>>4;q[i+88>>2]=b;q[i+92>>2]=c;q[i>>2]=0;k=Mi[q[75014]](d,e)|0;d=Mi[q[75015]](d,e)|0;s=f<<5;b=$i((f&134217727)!=(f|0)?-1:s);q[i+68>>2]=f;q[i+64>>2]=b;Ui(b,0,s);c=w(g,40);b=$i(c);q[i+8>>2]=g;q[i+4>>2]=b;Ui(b,0,c);b=h<<5;c=$i(b);q[i+52>>2]=b;q[i+48>>2]=c;E=Ui(c,0,b);o=f<<3;c=$i((o&1073741816)!=(o|0)?-1:s);a:{b:{c:{d:{if(f){Zi(a,-1,77255);F=x(x(1)/x(d>>>0));H=x(x(1)/x(k>>>0));h=c;while(1){b=q[a+8>>2];q[b+8>>2]=3;d=j+1|0;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-2);e:{if(t[i+68>>2]>j>>>0){b=q[i+64>>2]+(j<<5)|0;r=b;KC(a,77266,b+8|0,b+12|0);KC(a,77330,b+16|0,b+20|0);Zi(a,-1,77334);e=al(a,-1);j=$i((e|0)!=(e&1073741823)?-1:e<<2);k=q[a+8>>2];q[k+8>>2]=0;q[a+8>>2]=k+16;if(Hj(a,-2)){while(1){k=j;A=Mj(a,-2);f:{if(y(A)<2147483648){n=~~A;break f}n=-2147483648}n=(k+(n<<2)|0)-4|0;A=Mj(a,-1);g:{if(y(A)<2147483648){k=~~A;break g}k=-2147483648}q[n>>2]=k;Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);q[b+24>>2]=j;q[b+28>>2]=e;Ri(a,-2);l=x(0);m=x(0);k=q[b+12>>2];if(k){e=q[r+8>>2];j=0;while(1){n=j<<2;p=u[n+e>>2];m=m>p?m:p;p=u[e+(n|4)>>2];l=l>p?l:p;j=j+2|0;if(k>>>0>j>>>0){continue}break}}e=b;if(l=x(0)){j=~~l>>>0}else{j=0}q[e+4>>2]=j;e=b;if(m=x(0)){j=~~m>>>0}else{j=0}q[e>>2]=j;j=0;if(!k){break e}while(1){if(j>>>0>=k>>>0){break d}e=q[r+8>>2];n=e+(j<<2)|0;u[n>>2]=x(u[n>>2]/m)+x(-.5);n=j|1;if(n>>>0>=k>>>0){break d}e=e+(n<<2)|0;u[e>>2]=1- +x(u[e>>2]/l)+ -.5;j=j+2|0;if(k>>>0>j>>>0){continue}break}break e}J(77919,77931,138,77963);G()}h:{e=q[b+20>>2];if(!e){l=x(-3.4028234663852886e+38);m=x(3.4028234663852886e+38);p=x(3.4028234663852886e+38);B=x(-3.4028234663852886e+38);break h}p=x(3.4028234663852886e+38);B=x(-3.4028234663852886e+38);j=0;l=x(-3.4028234663852886e+38);m=x(3.4028234663852886e+38);i:{while(1){if(e>>>0>j>>>0){k=j|1;if(k>>>0>=e>>>0){break i}r=k<<2;k=q[b+16>>2];r=r+k|0;z=u[r>>2];k=k+(j<<2)|0;C=x(H*u[k>>2]);u[k>>2]=C;z=x(F*z);u[r>>2]=x(1)-z;B=z>B?z:B;p=p>z?z:p;l=lC?C:m;j=j+2|0;if(e>>>0>j>>>0){continue}break h}break}break c}break c}u[h+24>>2]=l;u[h+16>>2]=l;u[h+8>>2]=m;u[h>>2]=m;l=x(x(1)-B);u[h+28>>2]=l;m=x(x(1)-p);u[h+20>>2]=m;u[h+12>>2]=m;u[h+4>>2]=l;h=h+32|0;j=d;if((j|0)!=(f|0)){continue}break}Ri(a,-2)}h=f;j:{k:{if(g){Zi(a,-1,77342);e=f-1|0;j=0;while(1){b=q[a+8>>2];q[b+8>>2]=3;d=b;b=j+1|0;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-2);if(t[i+8>>2]<=j>>>0){break b}d=q[i+4>>2]+w(j,40)|0;q[d+20>>2]=30;q[d+24>>2]=1;Zi(a,-1,77353);q[d>>2]=uj(a,-1,0);Ri(a,-2);Zi(a,-1,77433);q[d+4>>2]=hl(a,-1);Ri(a,-2);Zi(a,-1,77439);q[d+8>>2]=hl(a,-1);Ri(a,-2);Zi(a,-1,77446);j=hl(a,-1);Ri(a,-2);Zi(a,-1,77458);k=hl(a,-1);Ri(a,-2);Zi(a,-1,77468);if(Oj(a,-1)){r=hl(a,-1);if(r>>>0>=7){break k}q[d+24>>2]=q[(r<<2)+79600>>2]}Ri(a,-2);Zi(a,-1,77477);if(Oj(a,-1)){q[d+20>>2]=hl(a,-1)}Ri(a,-2);Zi(a,-1,77481);if((Vi(a,-1)|0)==1){q[d+32>>2]=Uj(a,-1)}Ri(a,-2);Zi(a,-1,77495);if((Vi(a,-1)|0)==1){q[d+28>>2]=Uj(a,-1)}Ri(a,-2);Ri(a,-2);q[d+16>>2]=e+k;q[d+12>>2]=e+j;h=k+(h-j|0)|0;j=b;if((j|0)!=(g|0)){continue}break}Ri(a,-2)}q[i+72>>2]=1;d=h<<2;b=$i((h&1073741823)!=(h|0)?-1:d);q[i+80>>2]=h;q[i+76>>2]=b;j=0;b=Ui(b,0,d);d=Ti(E,c,s);if(!f){break j}while(1){if(h>>>0<=j>>>0){break a}q[b+(j<<2)>>2]=j;j=j+1|0;if((j|0)!=(f|0)){continue}break}break j}J(77974,76581,1309,77976);G()}h=q[i+8>>2];if(h){j=d+(o<<2)|0;g=0;b=f;while(1){if(g>>>0>=h>>>0){break b}e=q[i+4>>2]+w(g,40)|0;d=q[e+12>>2];e=q[e+16>>2]-d|0;if(e){k=d-f|0;h=0;while(1){s=h+k|0;d=c+(s<<5)|0;o=q[d+4>>2];q[j>>2]=q[d>>2];q[j+4>>2]=o;o=q[d+28>>2];q[j+24>>2]=q[d+24>>2];q[j+28>>2]=o;o=q[d+20>>2];q[j+16>>2]=q[d+16>>2];q[j+20>>2]=o;o=q[d+12>>2];q[j+8>>2]=q[d+8>>2];q[j+12>>2]=o;if(t[i+80>>2]<=b>>>0){break a}q[q[i+76>>2]+(b<<2)>>2]=s;j=j+32|0;b=b+1|0;h=h+1|0;if((e|0)!=(h|0)){continue}break}h=q[i+8>>2]}g=g+1|0;if(h>>>0>g>>>0){continue}break}}Ni(c);if(q[a+8>>2]-q[a+12>>2]>>4==(D|0)){return}J(76560,76581,1661,77897);G()}J(77919,77931,56,77963);G()}J(77919,77931,64,77963);G()}J(77919,77931,88,77963);G()}J(77919,77931,147,77963);G()}function Sea(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0;j=Ii-112|0;Ii=j;q[j+96>>2]=0;a:{b:{c:{d:{e:{f:{if(c){if(!r[300416]){o[300416]=1;Ywa()}l=13;n=1;g:{h:{i:{switch(d|0){case 5:l=16;break h;case 9:l=8;break h;case 11:l=9;break h;case 12:n=0;l=0;break g;case 13:l=20;break h;case 14:l=21;break h;case 15:l=1;break h;case 16:l=10;break h;case 17:l=2;break h;case 18:l=3;break h;case 19:l=4;break h;case 20:l=5;break h;case 21:l=6;break h;default:q[j+8>>2]=a;q[j>>2]=d;Pi(4,96133,96142,j);break b;case 4:break i;case 0:case 1:case 2:case 3:break g}}l=14}n=0}A=q[g>>2];i=w(c,644);B=$i(i+4|0);q[B>>2]=c;x=B+4|0;i=i+x|0;h=x;while(1){exa(h);o[h+585|0]=0;q[h+632>>2]=0;q[h+636>>2]=0;h=h+644|0;if((i|0)!=(h|0)){continue}break}i=d>>>0>21?95863:q[(d<<2)+248140>>2];q[j+72>>2]=l;q[j+80>>2]=q[(l<<2)+248228>>2];q[j+76>>2]=i;q[j+68>>2]=d;q[j+64>>2]=a;Pi(2,96133,96211,j- -64|0);D=c>>>0>1?c:1;y=(l&30)!=8;j:{while(1){if(t[b+60>>2]<=u>>>0){break j}k=w(u,644)+x|0;s=q[b+36>>2]+C|0;p=q[q[b+56>>2]+(u<<2)>>2];if(!Zwa(k,s,p)){q[j+48>>2]=a;Pi(4,96133,96401,j+48|0);break b}$wa(s,p,k+588|0);_wa(k,s,p);q[k+640>>2]=p;q[k+636>>2]=s;h=q[k+592>>2];q[k+632>>2]=$i((E=-1,F=Aza(h,0,20,0),H=Li,H?E:F));k:{if(!h){break k}h=0;if(!y){while(1){if(!XN(s,p,h,j+108|0,j+104|0,j+100|0)){break d}m=w(h,20);i=m+q[k+632>>2]|0;q[i>>2]=q[j+108>>2];q[i+4>>2]=q[j+104>>2];q[i+8>>2]=q[j+100>>2];l:{if(l-13>>>0>=4){v=Zt(l);i=q[j+104>>2]+3&-4;z=i>>>0>8?i:8;i=q[j+108>>2]+3&-4;i=w(z,i>>>0>8?i:8)>>>1&536870904;if(i>>>0>2])>>>0){break c}q[(m+q[k+632>>2]|0)+16>>2]=v;break l}z=q[j+104>>2];i=l-13|0;m:{if(i>>>0<=3){i=q[(i<<2)+111124>>2];break m}i=0}i=w(z,w(i,q[j+108>>2]))}q[(m+q[k+632>>2]|0)+12>>2]=i;h=h+1|0;if(h>>>0>2]){continue}break k}}while(1){if(!XN(s,p,h,j+108|0,j+104|0,j+100|0)){break d}i=w(h,20);m=i+q[k+632>>2]|0;q[m>>2]=q[j+108>>2];q[m+4>>2]=q[j+104>>2];q[m+8>>2]=q[j+100>>2];n:{if(l-13>>>0<4){z=q[j+104>>2];m=l-13|0;o:{if(m>>>0<=3){m=q[(m<<2)+111124>>2];break o}m=0}m=w(z,w(m,q[j+108>>2]));break n}m=Zt(l);v=q[j+100>>2];q[(i+q[k+632>>2]|0)+16>>2]=m;m=w(m,v)}q[(i+q[k+632>>2]|0)+12>>2]=m;h=h+1|0;if(h>>>0>2]){continue}break}}C=p+C|0;u=u+1|0;if((D|0)!=(u|0)){continue}break}C=0;m=0;b=q[B+596>>2];u=b>>>0>>0?b:A;if(u){D=(d|0)!=3&n;m=1;s=0;while(1){b=s<<2;A=q[(q[B+636>>2]+w(s,20)|0)+12>>2];i=$i(w(A,c));q[b+e>>2]=i;q[b+f>>2]=A;p=s&255;v=0;k=0;p:{q:{if(D){while(1){b=w(v,644)+x|0;if((u|0)!=q[b+592>>2]){break q}h=q[b+632>>2];n=q[b+640>>2];k=q[b+636>>2];r:{if(l-13>>>0>=4){y=b;b=h+w(p,20)|0;n=$w(y,k,n,p,i,t[b+12>>2]/t[b+16>>2]|0,l,0,0);break r}y=k;z=n;k=h;h=w(p,20);n=k+h|0;k=q[n+4>>2];n=q[n>>2];if(!$w(b,y,z,p,i,w(k,n),l,n,k)){i=i+A|0;break f}n=1;if(d>>>0>2){break r}b=q[(h+q[b+632>>2]|0)+12>>2];if((b|0)<1){break r}y=b+i|0;k=i;b=i;while(1){h=0;while(1){o[k|0]=r[b+h|0];k=k+1|0;z=(d|0)!=(h|0);h=h+1|0;if(z){continue}break}b=b+4|0;if(y>>>0>b>>>0){continue}break}}i=i+A|0;if(!n){break p}v=v+1|0;if(v>>>0>>0){continue}break p}}while(1){b=w(k,644)+x|0;if((u|0)!=q[b+592>>2]){break q}h=q[b+632>>2];n=q[b+640>>2];v=q[b+636>>2];s:{if(l-13>>>0<4){y=b;b=h+w(p,20)|0;h=q[b+4>>2];b=q[b>>2];n=$w(y,v,n,p,i,w(h,b),l,b,h);break s}y=b;b=h+w(p,20)|0;n=$w(y,v,n,p,i,t[b+12>>2]/t[b+16>>2]|0,l,0,0)}i=i+A|0;if(!n){break p}k=k+1|0;if(k>>>0>>0){continue}break}break p}J(96252,96084,345,96058);G()}if(!n){break f}s=s+1|0;m=u>>>0>s>>>0;if((s|0)!=(u|0)){continue}break}}q[g>>2]=u;while(1){a=q[(w(C,644)+x|0)+632>>2];if(a){Ni(a)}C=C+1|0;if((C|0)!=(c|0)){continue}break}a=q[B>>2];if(!a){break e}h=w(a,644)+x|0;while(1){h=h-644|0;YN(h);if((h|0)!=(x|0)){continue}break}break e}J(96348,96360,217,96390);G()}J(96068,96084,295,96058);G()}q[j+20>>2]=a;q[j+16>>2]=s;Pi(4,96133,96309,j+16|0);if(i){Ni(i)}h=0;while(1){a=q[(w(h,644)+x|0)+632>>2];if(a){Ni(a)}h=h+1|0;if((h|0)!=(c|0)){continue}break}a=q[B>>2];if(!a){break e}h=w(a,644)+x|0;while(1){h=h-644|0;YN(h);if((h|0)!=(x|0)){continue}break}}Ni(B);a=m^1;break a}q[j+36>>2]=a;q[j+32>>2]=h;Pi(4,96133,96449,j+32|0);break b}J(96514,96084,207,96562);G()}a=0}Ii=j+112|0;return a&1}function QQ(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;a:{if(r[a+60|0]){q[a+112>>2]=2;a=0;break a}c=q[a+808>>2];if(!c){d=q[a+44>>2];b:{if(d){i=d-q[a+48>>2]|0;break b}i=pm(q[a+32>>2])-q[a+36>>2]|0}d=q[a+56>>2];c:{d:{if(d>>>0<=65535){c=q[a+64>>2];break d}c=q[a+64>>2];d=d-65536|0;if(c>>>0<=d>>>0){break c}}d=c}e:{if(r[a+60|0]){break e}q[a+108>>2]=0;if(q[a+44>>2]){c=q[a+52>>2];f:{if((d|0)>=0){d=q[a+48>>2]+d|0;if(d>>>0>>0){break f}}q[a+108>>2]=1;q[a+44>>2]=c;break e}q[a+44>>2]=d;break e}g:{if((d|0)>=0){c=q[a+36>>2];d=c+d|0;if(d>>>0>=c>>>0){break g}}q[a+108>>2]=1;d=2147483647}if(!Uk(q[a+32>>2],d,0)){break e}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}h:{if(!FC(a,g+12|0,g+8|0)){q[a+808>>2]=-1;q[a+112>>2]=36;break h}d=0;i:{if(r[a+60|0]){break i}d=q[a+44>>2];if(d){d=d-q[a+48>>2]|0;break i}d=pm(q[a+32>>2])-q[a+36>>2]|0}j:{if(q[g+8>>2]){break j}while(1){k:{if(r[a+60|0]){break k}c=q[g+12>>2];q[a+108>>2]=0;if(q[a+44>>2]){b=q[a+52>>2];l:{if((c|0)>=0){c=c+q[a+48>>2]|0;if(c>>>0>>0){break l}}q[a+108>>2]=1;q[a+44>>2]=b;break k}q[a+44>>2]=c;break k}m:{if((c|0)>=0){b=c;c=q[a+36>>2];b=b+c|0;if(b>>>0>=c>>>0){break m}}q[a+108>>2]=1;b=2147483647}if(!Uk(q[a+32>>2],b,0)){break k}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}if(!FC(a,g+12|0,g+8|0)){break j}d=0;n:{if(r[a+60|0]){break n}d=q[a+44>>2];if(d){d=d-q[a+48>>2]|0;break n}d=pm(q[a+32>>2])-q[a+36>>2]|0}if(!q[g+8>>2]){continue}break}}o:{p:{if(r[a+60|0]){break p}q[a+108>>2]=0;if(q[a+44>>2]){c=q[a+52>>2];q:{if((d|0)>=0){b=q[a+48>>2]+d|0;if(b>>>0>>0){break q}}q[a+108>>2]=1;q[a+44>>2]=c;break o}q[a+44>>2]=b;c=b;break o}r:{if((d|0)>=0){c=q[a+36>>2];b=c+d|0;if(b>>>0>=c>>>0){break r}}q[a+108>>2]=1;b=2147483647}if(!Uk(q[a+32>>2],b,0)){break p}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}c=q[a+44>>2]}s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{Q:{R:{S:{T:{U:{V:{W:{X:{if(c){b=q[a+52>>2];e=c+6|0;if(b>>>0>>0){break X}p[g+4>>1]=r[c+4|0]|r[c+5|0]<<8;q[g>>2]=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);q[a+44>>2]=e;break V}if((zl(g,6,1,q[a+32>>2])|0)==1){break W}}q[a+108>>2]=1}e=q[a+44>>2];if(!e){break U}b=q[a+52>>2]}if(b>>>0<=e>>>0){break T}f=e+1|0;q[a+44>>2]=f;e=r[e|0];break R}b=wj(q[a+32>>2]);if((b|0)!=-1){break S}}q[a+108>>2]=1;b=0}e=b&255;f=q[a+44>>2];if(!f){break Q}b=q[a+52>>2]}if(b>>>0<=f>>>0){break P}c=f+1|0;q[a+44>>2]=c;f=r[f|0]<<8|e;break N}b=wj(q[a+32>>2]);if((b|0)!=-1){break O}}q[a+108>>2]=1;b=0}f=b<<8&65280|e;c=q[a+44>>2];if(!c){break M}b=q[a+52>>2]}if(b>>>0<=c>>>0){break L}e=c+1|0;q[a+44>>2]=e;c=r[c|0]<<16|f;break J}b=wj(q[a+32>>2]);if((b|0)!=-1){break K}}q[a+108>>2]=1;b=0}c=b<<16&16711680|f;e=q[a+44>>2];if(!e){break I}b=q[a+52>>2]}if(b>>>0<=e>>>0){break H}f=e+1|0;q[a+44>>2]=f;c=r[e|0]<<24|c;break F}b=wj(q[a+32>>2]);if((b|0)!=-1){break G}}q[a+108>>2]=1;b=0}c=b<<24|c;f=q[a+44>>2];if(!f){break E}b=q[a+52>>2]}if(b>>>0<=f>>>0){break D}e=f+1|0;q[a+44>>2]=e;h=r[f|0];break B}b=wj(q[a+32>>2]);if((b|0)!=-1){break C}}q[a+108>>2]=1;b=0}h=b&255;e=q[a+44>>2];if(!e){break A}b=q[a+52>>2]}if(b>>>0<=e>>>0){q[a+108>>2]=1;b=0;break z}f=e+1|0;q[a+44>>2]=f;h=r[e|0]<<8|h;break y}b=wj(q[a+32>>2]);if((b|0)==-1){q[a+108>>2]=1;b=0;break z}b=b<<8&65280}h=b|h;f=q[a+44>>2];if(!f){break x}b=q[a+52>>2]}if(b>>>0<=f>>>0){q[a+108>>2]=1;b=0;break w}e=f+1|0;q[a+44>>2]=e;f=r[f|0]<<16|h;break v}b=wj(q[a+32>>2]);if((b|0)==-1){q[a+108>>2]=1;b=0;break w}b=b<<16&16711680}f=b|h;e=q[a+44>>2];if(!e){break u}b=q[a+52>>2]}if(b>>>0<=e>>>0){break t}q[a+44>>2]=e+1;b=r[e|0];break s}b=wj(q[a+32>>2]);if((b|0)!=-1){break s}}q[a+108>>2]=1;b=0}b=b<<24|f;if((b&c)==-1){q[a+808>>2]=-1;q[a+112>>2]=36;break h}q[a+80>>2]=d;d=b?-2:c;q[a+808>>2]=d;c=q[g+12>>2];q[a+88>>2]=d;q[a+84>>2]=c}Y:{if(r[a+60|0]){break Y}q[a+108>>2]=0;if(q[a+44>>2]){d=q[a+52>>2];Z:{if((i|0)>=0){c=q[a+48>>2]+i|0;if(c>>>0>>0){break Z}}q[a+108>>2]=1;q[a+44>>2]=d;break Y}q[a+44>>2]=c;break Y}_:{if((i|0)>=0){d=q[a+36>>2];c=d+i|0;if(c>>>0>=d>>>0){break _}}q[a+108>>2]=1;c=2147483647}if(!Uk(q[a+32>>2],c,0)){break Y}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}c=q[a+808>>2]}a=(c|0)==-1?0:c}Ii=g+16|0;return a}function Ww(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0;l=r[b|0];d=l;c=r[b+16|0];d=c>>>0>d>>>0?d:c;m=r[b+32|0];e=m;e=e>>>0>d>>>0?d:e;d=r[b+48|0];i=e>>>0>>0?e:d;t=r[b+4|0];e=t;p=r[b+20|0];h=p;h=e>>>0>>0?e:h;e=r[b+36|0];g=e>>>0>h>>>0?h:e;h=r[b+52|0];g=g>>>0>>0?g:h;j=g>>>0>i>>>0?i:g;i=r[b+8|0];u=r[b+24|0];g=u;g=g>>>0>i>>>0?i:g;s=r[b+40|0];f=s;f=f>>>0>g>>>0?g:f;g=r[b+56|0];f=f>>>0>>0?f:g;k=f>>>0>j>>>0?j:f;j=r[b+12|0];v=r[b+28|0];f=v;f=f>>>0>j>>>0?j:f;x=r[b+44|0];n=x;n=f>>>0>>0?f:n;f=r[b+60|0];n=f>>>0>n>>>0?n:f;k=k>>>0>>0?k:n;o[a+1|0]=k;c=c>>>0>>0?l:c;c=c>>>0>m>>>0?c:m;c=c>>>0>d>>>0?c:d;d=p>>>0>>0?t:p;d=e>>>0>>0?d:e;d=d>>>0>h>>>0?d:h;c=c>>>0>d>>>0?c:d;d=i>>>0>u>>>0?i:u;d=d>>>0>s>>>0?d:s;d=d>>>0>g>>>0?d:g;c=c>>>0>d>>>0?c:d;d=j>>>0>v>>>0?j:v;d=d>>>0>x>>>0?d:x;d=d>>>0>f>>>0?d:f;d=c>>>0>d>>>0?c:d;o[a|0]=d;if((d|0)==(k|0)){o[a+2|0]=0;o[a+3|0]=0;o[a+4|0]=0;o[a+5|0]=0;o[a+6|0]=0;o[a+7|0]=0;return}t=r[b+60|0];p=r[b+56|0];u=r[b+52|0];s=r[b+48|0];v=r[b+44|0];x=r[b+40|0];n=r[b+36|0];m=r[b+32|0];h=w(k,-14)+4|0;c=h+w(r[b+20|0],14)|0;e=d-k|0;i=w(e,13);g=w(e,11);j=w(e,9);f=w(e,7);k=w(e,5);l=w(e,3);d=q[((((((((c|0)>=(i|0))+((g|0)<=(c|0))|0)+((j|0)<=(c|0))|0)+((f|0)<=(c|0))|0)+((k|0)<=(c|0))|0)+((l|0)<=(c|0))|0)+((c|0)>=(e|0))<<2)+106240>>2]<<12;c=h+w(r[b+4|0],14)|0;d=d|q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106240>>2];c=h+w(r[b|0],14)|0;y=q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106208>>2];c=h+w(r[b+16|0],14)|0;d=d|(y|q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106208>>2]<<12);c=h+w(r[b+8|0],14)|0;y=q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106272>>2];c=h+w(r[b+24|0],14)|0;d=d|(y|q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106272>>2]<<12);c=h+w(r[b+12|0],14)|0;b=h+w(r[b+28|0],14)|0;b=d|(q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106304>>2]|q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106304>>2]<<12);o[a+2|0]=b;o[a+4|0]=b>>>16;o[a+3|0]=b>>>8;c=h+w(m,14)|0;m=q[((((((((c|0)>=(i|0))+((c|0)>=(g|0))|0)+((c|0)>=(j|0))|0)+((c|0)>=(f|0))|0)+((c|0)>=(k|0))|0)+((c|0)>=(l|0))|0)+((c|0)>=(e|0))<<2)+106208>>2];c=m>>>8|0;d=b|m<<24;b=h+w(n,14)|0;b=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106240>>2];m=b>>>8|0;b=d|b<<24;m=c|m;d=b;b=h+w(x,14)|0;b=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106272>>2];c=b>>>8|0;b=d|b<<24;c=c|m;d=b;b=h+w(v,14)|0;b=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106304>>2];m=b>>>8|0;b=d|b<<24;m=c|m;c=m;o[a+5|0]=(c&16777215)<<8|b>>>24;b=h+w(s,14)|0;s=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106208>>2]<<4|c;b=h+w(u,14)|0;c=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106240>>2]<<4;b=h+w(p,14)|0;p=c|s|q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106272>>2]<<4;b=h+w(t,14)|0;c=q[((((((((b|0)>=(i|0))+((b|0)>=(g|0))|0)+((b|0)>=(j|0))|0)+((b|0)>=(f|0))|0)+((b|0)>=(k|0))|0)+((b|0)>=(l|0))|0)+((b|0)>=(e|0))<<2)+106304>>2]<<4;e=c|p;c=e;d=a;o[d+7|0]=c>>>8;o[d+6|0]=c}function iO(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,x=0,z=0,A=0,B=0,D=0;h=Ii-560|0;Ii=h;g=c;c=(c-3|0)/24|0;t=(c|0)>0?c:0;l=g+w(t,-24)|0;n=q[(e<<2)+215024>>2];j=d-1|0;if((n+j|0)>=0){g=d+n|0;c=t-j|0;while(1){v[(h+320|0)+(i<<3)>>3]=(c|0)<0?0:+q[(c<<2)+215040>>2];c=c+1|0;i=i+1|0;if((g|0)!=(i|0)){continue}break}}p=l-24|0;g=0;i=(n|0)>0?n:0;m=(d|0)<1;while(1){a:{if(m){f=0;break a}k=g+j|0;c=0;f=0;while(1){f=f+v[(c<<3)+a>>3]*v[(h+320|0)+(k-c<<3)>>3];c=c+1|0;if((d|0)!=(c|0)){continue}break}}v[(g<<3)+h>>3]=f;c=(g|0)==(i|0);g=g+1|0;if(!c){continue}break}B=47-l|0;u=48-l|0;D=l-25|0;g=n;b:{while(1){f=v[(g<<3)+h>>3];c=0;i=g;k=(g|0)<1;if(!k){while(1){m=(h+480|0)+(c<<2)|0;o=f;f=f*5.960464477539063e-8;c:{if(y(f)<2147483648){j=~~f;break c}j=-2147483648}f=+(j|0);o=o+f*-16777216;d:{if(y(o)<2147483648){j=~~o;break d}j=-2147483648}q[m>>2]=j;i=i-1|0;f=v[(i<<3)+h>>3]+f;c=c+1|0;if((g|0)!=(c|0)){continue}break}}f=Zn(f,p);f=f+C(f*.125)*-8;e:{if(y(f)<2147483648){m=~~f;break e}m=-2147483648}f=f- +(m|0);f:{g:{h:{x=(p|0)<1;i:{if(!x){i=(g<<2)+h|0;j=q[i+476>>2];c=j>>u;s=i;i=j-(c<>2]=i;m=c+m|0;j=i>>B;break i}if(p){break h}j=q[((g<<2)+h|0)+476>>2]>>23}if((j|0)<1){break f}break g}j=2;if(!(f>=.5^1)){break g}j=0;break f}c=0;i=0;if(!k){while(1){s=(h+480|0)+(c<<2)|0;z=q[s>>2];k=16777215;j:{k:{if(i){break k}k=16777216;if(z){break k}i=0;break j}q[s>>2]=k-z;i=1}c=c+1|0;if((g|0)!=(c|0)){continue}break}}l:{if(x){break l}m:{switch(D|0){case 0:c=(g<<2)+h|0;q[c+476>>2]=q[c+476>>2]&8388607;break l;case 1:break m;default:break l}}c=(g<<2)+h|0;q[c+476>>2]=q[c+476>>2]&4194303}m=m+1|0;if((j|0)!=2){break f}f=1-f;j=2;if(!i){break f}f=f-Zn(1,p)}if(f==0){i=0;n:{c=g;if((n|0)>=(c|0)){break n}while(1){c=c-1|0;i=q[(h+480|0)+(c<<2)>>2]|i;if((c|0)>(n|0)){continue}break}if(!i){break n}l=p;while(1){l=l-24|0;g=g-1|0;if(!q[(h+480|0)+(g<<2)>>2]){continue}break}break b}c=1;while(1){i=c;c=c+1|0;if(!q[(h+480|0)+(n-i<<2)>>2]){continue}break}i=g+i|0;while(1){j=d+g|0;g=g+1|0;v[(h+320|0)+(j<<3)>>3]=q[(t+g<<2)+215040>>2];c=0;f=0;if((d|0)>=1){while(1){f=f+v[(c<<3)+a>>3]*v[(h+320|0)+(j-c<<3)>>3];c=c+1|0;if((d|0)!=(c|0)){continue}break}}v[(g<<3)+h>>3]=f;if((g|0)<(i|0)){continue}break}g=i;continue}break}f=Zn(f,24-l|0);o:{if(!(f>=16777216^1)){d=(h+480|0)+(g<<2)|0;o=f;f=f*5.960464477539063e-8;p:{if(y(f)<2147483648){c=~~f;break p}c=-2147483648}f=o+ +(c|0)*-16777216;q:{if(y(f)<2147483648){a=~~f;break q}a=-2147483648}q[d>>2]=a;g=g+1|0;break o}if(y(f)<2147483648){c=~~f}else{c=-2147483648}l=p}q[(h+480|0)+(g<<2)>>2]=c}f=Zn(1,l);r:{if((g|0)<=-1){break r}c=g;while(1){v[(c<<3)+h>>3]=f*+q[(h+480|0)+(c<<2)>>2];f=f*5.960464477539063e-8;a=(c|0)>0;c=c-1|0;if(a){continue}break}k=0;if((g|0)<0){break r}a=(n|0)>0?n:0;i=g;while(1){d=a>>>0>>0?a:k;l=g-i|0;c=0;f=0;while(1){f=f+v[(c<<3)+217808>>3]*v[(c+i<<3)+h>>3];p=(c|0)!=(d|0);c=c+1|0;if(p){continue}break}v[(h+160|0)+(l<<3)>>3]=f;i=i-1|0;c=(g|0)!=(k|0);k=k+1|0;if(c){continue}break}}s:{t:{u:{switch(e|0){case 3:v:{if((g|0)<1){break v}f=v[(h+160|0)+(g<<3)>>3];c=g;while(1){o=f;a=c-1|0;d=(h+160|0)+(a<<3)|0;A=v[d>>3];f=A+f;v[(h+160|0)+(c<<3)>>3]=o+(A-f);v[d>>3]=f;d=(c|0)>1;c=a;if(d){continue}break}if((g|0)<2){break v}f=v[(h+160|0)+(g<<3)>>3];c=g;while(1){o=f;a=c-1|0;d=(h+160|0)+(a<<3)|0;r=v[d>>3];f=r+f;v[(h+160|0)+(c<<3)>>3]=o+(r-f);v[d>>3]=f;d=(c|0)>2;c=a;if(d){continue}break}r=0;if((g|0)<=1){break v}while(1){r=r+v[(h+160|0)+(g<<3)>>3];a=(g|0)>2;g=g-1|0;if(a){continue}break}}f=v[h+160>>3];if(j){break t}v[b>>3]=f;f=v[h+168>>3];v[b+16>>3]=r;v[b+8>>3]=f;break s;case 0:f=0;if((g|0)>=0){while(1){f=f+v[(h+160|0)+(g<<3)>>3];a=(g|0)>0;g=g-1|0;if(a){continue}break}}v[b>>3]=j?-f:f;break s;case 1:case 2:break u;default:break s}}f=0;if((g|0)>=0){c=g;while(1){f=f+v[(h+160|0)+(c<<3)>>3];a=(c|0)>0;c=c-1|0;if(a){continue}break}}v[b>>3]=j?-f:f;f=v[h+160>>3]-f;c=1;if((g|0)>=1){while(1){f=f+v[(h+160|0)+(c<<3)>>3];a=(c|0)!=(g|0);c=c+1|0;if(a){continue}break}}v[b+8>>3]=j?-f:f;break s}v[b>>3]=-f;f=v[h+168>>3];v[b+16>>3]=-r;v[b+8>>3]=-f}Ii=h+560|0;return m&7}function $ma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=0,m=x(0),n=0,p=0,s=x(0),v=x(0),y=x(0),z=x(0);f=Ii+ -64|0;Ii=f;d=q[a+4>>2];b=q[d+32>>2];a:{b:{c:{d:{e:{e=q[q[a+12>>2]>>2];if(e>>>0>2]-b>>3>>>0){j=q[b+(e<<3)>>2];h=q[d+16>>2];if(j>>>0>=q[d+20>>2]-h>>4>>>0){break a}b=h+(j<<4)|0;f:{g:{h:{g=q[a+16>>2];c=q[g+80>>2];if((c|0)==q[58810]){c=q[d+72>>2];e=q[d+76>>2];if((c|0)==(e|0)){break h}l=q[d+68>>2];if(!l){break e}if(c>>>0<=e>>>0){break d}i=q[b>>2];n=q[q[i+8>>2]>>2];q[d+76>>2]=e+1;l=q[l+(e<<2)>>2];b=q[d>>2];if(l>>>0>=(q[d+4>>2]-b|0)/104>>>0){break a}c=0;e=q[q[q[a>>2]+80>>2]+8>>2];i:{if(!e){break i}e=q[e>>2];if(!e){break i}c=q[e>>2]}b=b+w(l,104)|0;q[b+4>>2]=i;q[b>>2]=c;o[b+96|0]=r[b+96|0]&248;q[b+80>>2]=q[a>>2];e=q[a+16>>2];c=q[e+36>>2];q[b+48>>2]=q[e+32>>2];q[b+52>>2]=c;c=q[e+60>>2];q[b+72>>2]=q[e+56>>2];q[b+76>>2]=c;p=q[e+52>>2];c=b- -64|0;q[c>>2]=q[e+48>>2];q[c+4>>2]=p;c=q[e+44>>2];q[b+56>>2]=q[e+40>>2];q[b+60>>2]=c;u[b+88>>2]=u[g+96>>2];q[b+92>>2]=q[g+112>>2];o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+40|0]=0;o[b+41|0]=0;o[b+42|0]=0;o[b+43|0]=0;o[b+44|0]=0;o[b+45|0]=0;o[b+46|0]=0;o[b+47|0]=0;o[b+32|0]=0;o[b+33|0]=0;o[b+34|0]=0;o[b+35|0]=0;o[b+36|0]=0;o[b+37|0]=0;o[b+38|0]=0;o[b+39|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;q[b+84>>2]=0;e=Q1(n,b+8|0);if(!e){d=q[b+4>>2];d=L1(q[b+8>>2],q[d>>2],q[d+4>>2]);if(d){q[f+16>>2]=d;Pi(4,49438,49525,f+16|0)}k=u[g+108>>2];d=h+(j<<4)|0;m=u[d+12>>2];s=u[g+104>>2];v=u[d+4>>2];y=u[g+100>>2];z=u[d+8>>2];d=q[b+8>>2];e=0;q[f+60>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;u[f+48>>2]=y*z;pp(d,0,f+48|0);d=q[b+8>>2];q[f+60>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;u[f+48>>2]=s+v;pp(d,1,f+48|0);d=q[b+8>>2];q[f+60>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;u[f+48>>2]=k*m;pp(d,2,f+48|0);c=o[i+25|0]&1;d=r[i+24|0];K1(q[b+8>>2],c,(c?d?d:-1:d)<<24>>24);d=q[a+16>>2];c=q[d+4>>2];q[b+16>>2]=q[d>>2];q[b+20>>2]=c;c=q[d+28>>2];q[b+40>>2]=q[d+24>>2];q[b+44>>2]=c;c=q[d+20>>2];q[b+32>>2]=q[d+16>>2];q[b+36>>2]=c;c=q[d+12>>2];q[b+24>>2]=q[d+8>>2];q[b+28>>2]=c;q[b+84>>2]=q[q[a+16>>2]+76>>2];break f}c=q[d+68>>2];if(!c){break c}b=q[d+76>>2];if(!b|b>>>0>t[d+72>>2]){break b}b=b-1|0;q[d+76>>2]=b;q[c+(b<<2)>>2]=l;a=q[a+16>>2];q[f+32>>2]=e;gn(a,49556,f+32|0);break g}if((c|0)==q[58811]){c=q[d>>2];h=q[d+4>>2];if((c|0)==(h|0)){break g}e=0;while(1){g=w(e,104)+c|0;if(!(!q[g+8>>2]|q[g+4>>2]!=q[b>>2]|q[g+80>>2]!=q[a>>2])){o[g+96|0]=r[g+96|0]|1;c=q[d>>2];h=q[d+4>>2]}e=e+1|0;if(e>>>0<(h-c|0)/104>>>0){continue}break}break g}if((c|0)==q[58830]){c=q[d>>2];h=q[d+4>>2];if((c|0)==(h|0)){break g}j=r[g+96|0]<<2;e=0;while(1){g=w(e,104)+c|0;if(!(!q[g+8>>2]|q[g+4>>2]!=q[b>>2]|q[g+80>>2]!=q[a>>2])){o[g+96|0]=j|r[g+96|0]&249|2;c=q[d>>2];h=q[d+4>>2]}e=e+1|0;if(e>>>0<(h-c|0)/104>>>0){continue}break}break g}if((c|0)==q[58866]){i=q[a>>2];k=u[g+96>>2];u[(h+(j<<4)|0)+8>>2]=k;e=q[d+4>>2];c=q[d>>2];a=e-c|0;if(!a){break g}a=(a|0)/104|0;if((c|0)!=(e|0)){b=q[b>>2];g=a>>>0>1?a:1;e=0;while(1){j:{a=w(e,104)+c|0;c=q[a+8>>2];if(!c|(b|0)!=q[a+4>>2]|(i|0)!=q[a+80>>2]){break j}m=u[b+12>>2];q[f+60>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;u[f+48>>2]=k*m;if(!pp(c,0,f+48|0)){break j}e=-1e3;break f}e=e+1|0;if((g|0)==(e|0)){break g}c=q[d>>2];if((q[d+4>>2]-c|0)/104>>>0>e>>>0){continue}break}}break a}e=0;if((c|0)!=q[58882]){break f}i=q[a>>2];k=u[g+96>>2];u[(h+(j<<4)|0)+4>>2]=k;g=q[d+4>>2];c=q[d>>2];a=g-c|0;if(!a){break f}a=(a|0)/104|0;if((c|0)!=(g|0)){b=q[b>>2];g=a>>>0>1?a:1;while(1){k:{a=w(e,104)+c|0;c=q[a+8>>2];if(!c|(b|0)!=q[a+4>>2]|(i|0)!=q[a+80>>2]){break k}m=u[b+16>>2];q[f+60>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;u[f+48>>2]=k+m;if(!pp(c,1,f+48|0)){break k}e=-1e3;break f}e=e+1|0;if((g|0)==(e|0)){break g}c=q[d>>2];if((q[d+4>>2]-c|0)/104>>>0>e>>>0){continue}break}}break a}q[f>>2]=c;gn(g,49596,f)}e=0}Ii=f- -64|0;return e|0}break a}J(50222,49986,151,50270);G()}J(50274,49986,152,50270);G()}J(50222,49986,140,50229);G()}J(50234,49986,141,50229);G()}J(50132,49868,479,50143);G()}function FC(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-32|0;Ii=e;a:{if(q[a+108>>2]){break a}while(1){b:{c:{g=q[a+44>>2];if(g){if(g>>>0>=t[a+52>>2]){q[a+108>>2]=1;break b}q[a+44>>2]=g+1;d=r[g|0];break c}d=wj(q[a+32>>2]);if((d|0)!=-1){break c}q[a+108>>2]=1;break b}d:{if((d&255)!=79){break d}f=0;g=0;e:{if(r[a+60|0]){break e}g=q[a+44>>2];if(g){g=g-q[a+48>>2]|0;break e}g=pm(q[a+32>>2])-q[a+36>>2]|0}if(t[a+56>>2]>>0){break a}d=q[a+44>>2];f:{g:{if(d){if(d>>>0>=t[a+52>>2]){break g}q[a+44>>2]=d+1;d=r[d|0];break f}d=wj(q[a+32>>2]);if((d|0)!=-1){break f}}q[a+108>>2]=1;d=0}h:{i:{if(r[284461]!=(d&255)){break i}d=q[a+44>>2];j:{k:{if(d){if(d>>>0>=t[a+52>>2]){break k}q[a+44>>2]=d+1;d=r[d|0];break j}d=wj(q[a+32>>2]);if((d|0)!=-1){break j}}q[a+108>>2]=1;d=0}if(r[284462]!=(d&255)){break i}d=q[a+44>>2];l:{m:{if(d){if(d>>>0>=t[a+52>>2]){break m}q[a+44>>2]=d+1;d=r[d|0];break l}d=wj(q[a+32>>2]);if((d|0)!=-1){break l}}q[a+108>>2]=1;d=0}if(r[284463]!=(d&255)){break i}if(q[a+108>>2]){break a}q[e>>2]=q[71115];d=4;while(1){f=q[a+44>>2];n:{o:{if(f){if(f>>>0>=t[a+52>>2]){break o}q[a+44>>2]=f+1;f=r[f|0];break n}f=wj(q[a+32>>2]);if((f|0)!=-1){break n}}q[a+108>>2]=1;f=0}o[d+e|0]=f;d=d+1|0;if((d|0)!=27){continue}break}if(q[a+108>>2]){break b}if(r[e+4|0]){break h}j=s[e+22>>1]|s[e+24>>1]<<16;p[e+22>>1]=0;p[e+24>>1]=0;f=r[e+26|0];d=q[(r[e|0]<<2)+958864>>2];d=q[((r[e+1|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+2|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+3|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[(d>>>22&1020)+958864>>2]^d<<8;d=q[((r[e+5|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+6|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+7|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+8|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+9|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+10|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+11|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+12|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+13|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+14|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+15|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+16|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+17|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+18|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+19|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+20|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+21|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[(d>>>22&1020)+958864>>2]^d<<8;d=q[((r[e+23|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+24|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((r[e+25|0]^d>>>24)<<2)+958864>>2]^d<<8;d=q[((f^d>>>24)<<2)+958864>>2]^d<<8;p:{if(!f){break p}k=f>>>0>1?f:1;i=0;h=0;while(1){f=q[a+44>>2];q:{r:{if(f){if(f>>>0>=t[a+52>>2]){break r}q[a+44>>2]=f+1;f=r[f|0];break q}f=wj(q[a+32>>2]);if((f|0)!=-1){break q}}q[a+108>>2]=1;f=0}f=f&255;d=q[((f^d>>>24)<<2)+958864>>2]^d<<8;i=f+i|0;h=h+1|0;if((k|0)!=(h|0)){continue}break}if(!i){break p}f=0;if(q[a+108>>2]){break a}while(1){h=q[a+44>>2];s:{t:{if(h){if(h>>>0>=t[a+52>>2]){break t}q[a+44>>2]=h+1;h=r[h|0];break s}h=wj(q[a+32>>2]);if((h|0)!=-1){break s}}q[a+108>>2]=1;h=0}d=q[((h&255^d>>>24)<<2)+958864>>2]^d<<8;f=f+1|0;if((i|0)!=(f|0)){continue}break}}if((d|0)!=(j|0)){break h}if(b){d=0;u:{if(r[a+60|0]){break u}d=q[a+44>>2];if(d){d=d-q[a+48>>2]|0;break u}d=pm(q[a+32>>2])-q[a+36>>2]|0}q[b>>2]=d}if(c){q[c>>2]=r[e+5|0]>>>2&1}f=1;if(r[a+60|0]){break a}b=g-1|0;q[a+108>>2]=0;if(q[a+44>>2]){c=q[a+52>>2];v:{if((b|0)>=0){b=b+q[a+48>>2]|0;if(b>>>0>>0){break v}}q[a+44>>2]=c;q[a+108>>2]=1;break a}q[a+44>>2]=b;break a}w:{if((b|0)>=0){c=q[a+36>>2];b=c+b|0;if(b>>>0>=c>>>0){break w}}q[a+108>>2]=1;b=2147483647}if(!Uk(q[a+32>>2],b,0)){break a}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2);break a}if(q[a+108>>2]){break a}}if(r[a+60|0]){break d}q[a+108>>2]=0;if(q[a+44>>2]){d=q[a+52>>2];x:{if((g|0)>=0){g=q[a+48>>2]+g|0;if(g>>>0>>0){break x}}q[a+44>>2]=d;q[a+108>>2]=1;break b}q[a+44>>2]=g;break d}y:{if((g|0)>=0){d=g;g=q[a+36>>2];d=d+g|0;if(d>>>0>=g>>>0){break y}}q[a+108>>2]=1;d=2147483647}if(!Uk(q[a+32>>2],d,0)){break d}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}if(!q[a+108>>2]){continue}}break}f=0}Ii=e+32|0;return f}function TL(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,u=0,v=0,w=0,x=0,y=0,z=0;j=Ii-176|0;Ii=j;q[j+168>>2]=0;a:{b:{c:{k=q[c>>2];l=q[k+4>>2];d:{e:{if(l){w=c- -64|0;x=c+4|0;while(1){f:{g:{h:{if(l>>>0>m>>>0){k=q[k>>2];n=k+(m<<6)|0;l=q[n+16>>2];if(l>>>0>=26){break h}q[j+164>>2]=q[n+24>>2];l=q[(l<<2)+64872>>2];i:{if(q[n+44>>2]-3>>>0<2){q[j+164>>2]=15;l=Zga(b,l,q[n>>2],q[n+4>>2]);if(Sea(a,n,r[q[c>>2]+12|0],l,x,w,j+164|0)){break i}q[j+80>>2]=a;Pi(4,64293,64301,j+80|0);break f}if(!(Mi[q[75007]](b,l)|0)){break f}}q[j+148>>2]=0;q[j+152>>2]=0;o[j+155|0]=0;o[j+156|0]=0;o[j+157|0]=0;o[j+158|0]=0;q[j+140>>2]=0;q[j+144>>2]=0;q[j+128>>2]=2;q[j+132>>2]=1;q[j+120>>2]=3;q[j+124>>2]=5;q[j+112>>2]=0;q[j+116>>2]=0;q[j+136>>2]=1;Mi[q[74938]](b,j+124|0,j+128|0);q[j+120>>2]=l;p[j+152>>1]=q[n>>2];l=k+(m<<6)|0;p[j+154>>1]=q[l+4>>2];a=q[c>>2];v=q[a+12>>2];o[j+158|0]=f<<26>>24>>>7&f&31|f<<1&128;q[j+144>>2]=e&65535;q[j+140>>2]=d&65535;p[j+156>>1]=v;e=f&32;if(!(g|h)){o[j+110|0]=1;p[j+108>>1]=0;q[j+104>>2]=1;q[j+96>>2]=0;q[j+100>>2]=0;j:{k:{switch(q[a+8>>2]-1|0){case 2:q[j+96>>2]=1;break j;case 1:q[j+96>>2]=2;break j;default:J(64324,64326,155,64367);G();case 0:break k}}q[j+96>>2]=0}p[j+100>>1]=q[n>>2];p[j+102>>1]=q[l+4>>2];p[j+104>>1]=q[a+12>>2];a=k+(m<<6)|0;p[j+106>>1]=q[a+8>>2];p[j+108>>1]=q[a+12>>2];o[j+110|0]=q[j+164>>2];g=Mi[q[75008]](b,j+96|0)|0;h=Li;break g}a=Mi[q[75014]](g,h)|0;d=Mi[q[75015]](g,h)|0;f=JK(a,r[j+158|0]&127);v=JK(d,r[j+158|0]&127);d=KK(a>>>0>d>>>0?a:d);a=o[j+158|0];l:{if(!e){break l}u=a&127;if(u>>>0<=d>>>0){break l}q[j+68>>2]=d;q[j+64>>2]=u;Pi(4,64293,64384,j- -64|0);a=-1;break d}if((a|0)>-1){break g}y=q[j+140>>2];z=s[j+152>>1];m:{if(f>>>0>>0){d=s[j+154>>1];u=q[j+144>>2];break m}d=s[j+154>>1];u=q[j+144>>2];if(v>>>0>=d+u>>>0){break g}}q[j+56>>2]=a&127;q[j+52>>2]=v;q[j+48>>2]=f;q[j+44>>2]=u;q[j+40>>2]=y;q[j+36>>2]=d;q[j+32>>2]=z;Pi(4,64293,64441,j+32|0);a=-1;break d}J(64734,64746,230,64803);G()}J(64324,64326,68,64814);G()}n:{if(t[n+24>>2]>1){break n}o:{switch(q[j+124>>2]-3|0){case 2:q[j+124>>2]=2;break n;case 0:break o;default:break n}}q[j+124>>2]=1}a=Mi[q[75023]](b)|0;b=s[j+152>>1];d=s[j+154>>1];if(!(d>>>0<=a>>>0?a>>>0>=b>>>0:0)){q[j+28>>2]=a;q[j+24>>2]=a;q[j+20>>2]=d;q[j+16>>2]=b;Pi(4,64293,64534,j+16|0);q[j+152>>2]=65537;q[j+116>>2]=4;q[j+120>>2]=3;q[j+112>>2]=64848;o[j+158|0]=r[j+158|0]&128;Mi[q[75011]](g,h,j+112|0);break e}p:{a=q[n+24>>2];if(a>>>0<16){if(e){break p}if(!q[j+164>>2]){break e}b=k+(m<<6)|0;e=b;k=0;while(1){a=j;d=k<<2;f=d+c|0;m=q[f+4>>2];q:{if(!m){if(t[n+24>>2]<=k>>>0){break c}f=q[d+q[l+20>>2]>>2];if(f>>>0>=t[b+40>>2]){break b}q[j+112>>2]=f+q[b+36>>2];if(t[b+32>>2]<=k>>>0){break a}d=d+q[e+28>>2]|0;break q}q[j+112>>2]=m;d=f- -64|0}q[a+116>>2]=q[d>>2];o[j+158|0]=r[j+158|0]&128|k&127;Mi[q[75011]](g,h,j+112|0);a=s[j+152>>1]>>>1|0;p[j+152>>1]=a;d=s[j+154>>1]>>>1|0;p[j+154>>1]=d;if(!a){p[j+152>>1]=1}if(!d){p[j+154>>1]=1}k=k+1|0;if(k>>>0>2]){continue}break}break e}J(64622,64326,208,64367);G()}r:{b=q[x>>2];s:{if(!b){if(!a){break c}b=q[q[l+20>>2]>>2];a=k+(m<<6)|0;if(b>>>0>=t[a+40>>2]){break b}q[j+112>>2]=b+q[a+36>>2];if(!q[a+32>>2]){break r}w=q[(k+(m<<6)|0)+28>>2];break s}q[j+112>>2]=b}q[j+116>>2]=q[w>>2];Mi[q[75011]](g,h,j+112|0);break e}break a}k=q[c>>2];l=q[k+4>>2];m=m+1|0;if(l>>>0>m>>>0){continue}break}}q[j>>2]=a;Pi(4,64293,64672,j);t:{if(g|h){break t}o[j+126|0]=1;p[j+124>>1]=1;q[j+120>>2]=65537;q[j+112>>2]=0;q[j+116>>2]=65537;g=Mi[q[75008]](b,j+112|0)|0;a=Li;h=a;if(a|g){break t}a=-13;break d}q[j+148>>2]=0;q[j+152>>2]=0;o[j+155|0]=0;o[j+156|0]=0;o[j+157|0]=0;o[j+158|0]=0;q[j+140>>2]=0;q[j+144>>2]=0;q[j+136>>2]=1;q[j+128>>2]=2;q[j+132>>2]=1;q[j+120>>2]=3;q[j+124>>2]=5;q[j+112>>2]=0;q[j+116>>2]=0;Mi[q[74938]](b,j+124|0,j+128|0);q[j+152>>2]=65537;q[j+116>>2]=4;q[j+120>>2]=3;q[j+112>>2]=64848;o[j+158|0]=r[j+158|0]&128;Mi[q[75011]](g,h,j+112|0)}q[i>>2]=g;q[i+4>>2]=h;a=0}Ii=j+176|0;return a}J(64734,64746,191,64803);G()}J(64734,64746,207,64803);G()}J(64734,64746,199,64803);G()}function bM(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{e=c<<2;switch(q[e+q[b+12>>2]>>2]){case 2:break i;case 1:break j;case 0:break k;case 7:break d;case 6:break e;case 5:break f;case 4:break g;case 3:break h;default:break b}}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}g=q[q[b+8>>2]+(c<<2)>>2];c=q[b+4>>2]+(c<<3)|0;h=q[c+4>>2];c=q[c>>2];e=1;b=q[b+20>>2];q[a+4>>2]=f+1;i=q[d+4>>2]+(f<<3)|0;q[i>>2]=c;q[i+4>>2]=h;c=f<<2;q[c+q[d+12>>2]>>2]=0;f=c+q[d+8>>2]|0;c=q[a+8>>2];q[f>>2]=c;u[q[d+20>>2]+(c<<2)>>2]=u[b+(g<<2)>>2];a=a+8|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}e=q[b+16>>2]+(q[q[b+8>>2]+(c<<2)>>2]<<3)|0;g=q[e>>2];h=q[e+4>>2];b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];e=1;q[a+4>>2]=f+1;i=q[d+4>>2]+(f<<3)|0;q[i>>2]=b;q[i+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=1;c=b+q[d+8>>2]|0;b=q[a+12>>2];q[c>>2]=b;b=q[d+16>>2]+(b<<3)|0;q[b>>2]=g;q[b+4>>2]=h;a=a+12|0;break c}d=q[a+4>>2];e=q[a>>2];if(d>>>0>=t[e>>2]){break a}f=q[q[b+8>>2]+(c<<2)>>2];c=q[b+4>>2]+(c<<3)|0;g=q[c+4>>2];c=q[c>>2];h=q[b+24>>2];q[a+4>>2]=d+1;b=q[e+4>>2]+(d<<3)|0;q[b>>2]=c;q[b+4>>2]=g;b=d<<2;q[b+q[e+12>>2]>>2]=2;c=b+q[e+8>>2]|0;b=q[a+20>>2];q[c>>2]=b;b=b+q[e+24>>2]|0;c=f+h|0;e=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);d=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[b|0]=d;o[b+1|0]=d>>>8;o[b+2|0]=d>>>16;o[b+3|0]=d>>>24;o[b+4|0]=e;o[b+5|0]=e>>>8;o[b+6|0]=e>>>16;o[b+7|0]=e>>>24;e=r[c+28|0]|r[c+29|0]<<8|(r[c+30|0]<<16|r[c+31|0]<<24);d=r[c+24|0]|r[c+25|0]<<8|(r[c+26|0]<<16|r[c+27|0]<<24);o[b+24|0]=d;o[b+25|0]=d>>>8;o[b+26|0]=d>>>16;o[b+27|0]=d>>>24;o[b+28|0]=e;o[b+29|0]=e>>>8;o[b+30|0]=e>>>16;o[b+31|0]=e>>>24;e=r[c+20|0]|r[c+21|0]<<8|(r[c+22|0]<<16|r[c+23|0]<<24);d=r[c+16|0]|r[c+17|0]<<8|(r[c+18|0]<<16|r[c+19|0]<<24);o[b+16|0]=d;o[b+17|0]=d>>>8;o[b+18|0]=d>>>16;o[b+19|0]=d>>>24;o[b+20|0]=e;o[b+21|0]=e>>>8;o[b+22|0]=e>>>16;o[b+23|0]=e>>>24;e=r[c+12|0]|r[c+13|0]<<8|(r[c+14|0]<<16|r[c+15|0]<<24);c=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);o[b+8|0]=c;o[b+9|0]=c>>>8;o[b+10|0]=c>>>16;o[b+11|0]=c>>>24;o[b+12|0]=e;o[b+13|0]=e>>>8;o[b+14|0]=e>>>16;o[b+15|0]=e>>>24;e=32;a=a+20|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}g=q[e+q[b+8>>2]>>2];h=q[b+20>>2];e=3;b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];q[a+4>>2]=f+1;i=q[d+4>>2]+(f<<3)|0;q[i>>2]=b;q[i+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=3;c=b+q[d+8>>2]|0;b=q[a+8>>2];q[c>>2]=b;b=q[d+20>>2]+(b<<2)|0;c=h+(g<<2)|0;u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];a=a+8|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}g=q[e+q[b+8>>2]>>2];h=q[b+20>>2];b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];q[a+4>>2]=f+1;e=q[d+4>>2]+(f<<3)|0;q[e>>2]=b;q[e+4>>2]=c;e=4;b=f<<2;q[b+q[d+12>>2]>>2]=4;c=b+q[d+8>>2]|0;b=q[a+8>>2];q[c>>2]=b;b=q[d+20>>2]+(b<<2)|0;c=h+(g<<2)|0;u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];a=a+8|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}e=q[e+q[b+8>>2]>>2];g=q[b+20>>2];b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];q[a+4>>2]=f+1;h=q[d+4>>2]+(f<<3)|0;q[h>>2]=b;q[h+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=5;c=b+q[d+8>>2]|0;b=q[a+8>>2];q[c>>2]=b;b=q[d+20>>2]+(b<<2)|0;c=g+(e<<2)|0;u[b>>2]=u[c>>2];e=4;u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];a=a+8|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}g=r[q[b+28>>2]+q[q[b+8>>2]+(c<<2)>>2]|0];b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];e=1;q[a+4>>2]=f+1;h=q[d+4>>2]+(f<<3)|0;q[h>>2]=b;q[h+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=6;c=b+q[d+8>>2]|0;b=q[a+16>>2];q[c>>2]=b;o[b+q[d+28>>2]|0]=(g|0)!=0;a=a+16|0;break c}f=q[a+4>>2];d=q[a>>2];if(f>>>0>=t[d>>2]){break a}e=q[b+28>>2]+q[e+q[b+8>>2]>>2]|0;b=q[b+4>>2]+(c<<3)|0;c=q[b+4>>2];b=q[b>>2];q[a+4>>2]=f+1;g=q[d+4>>2]+(f<<3)|0;q[g>>2]=b;q[g+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=7;c=b+q[d+8>>2]|0;b=q[a+16>>2];q[c>>2]=b;c=b+q[d+28>>2]|0;b=e;e=hj(e)+1|0;Ti(c,b,e);a=a+16|0}q[a>>2]=q[a>>2]+e;return}J(13883,13768,420,14074);G()}J(13986,13768,256,14049);G()}function er(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;Nw(a,b,c);a:{if(q[b>>2]!=10){break a}i=q[b+8>>2];if((i|0)==-1){break a}d=q[b+16>>2];if((d|0)!=-1){h=q[q[a>>2]+12>>2];while(1){f=d;e=h+(d<<2)|0;g=q[e>>2];d=(g>>>14|0)-131071|0;d=(d|0)==-1?-1:(f+d|0)+1|0;if((d|0)!=-1){continue}break}f=i+(f^-1)|0;d=f>>31;h=e;if((d^d+f)>=131072){Sj(q[a+12>>2],141849);g=q[e>>2]}q[h>>2]=(g&16383|f<<14)+2147467264;break a}q[b+16>>2]=i}d=q[b+16>>2];g=q[b+20>>2];b:{if((d|0)==(g|0)){break b}m=-1;c:{d:{if((d|0)!=-1){h=q[q[a>>2]+12>>2];while(1){e=h+(d<<2)|0;e:{if((d|0)>=1){f=q[e-4>>2];if(o[(f&63)+141360|0]<0){break e}}f=q[e>>2]}if((f&63)!=27){break d}f=d;d=(q[e>>2]>>>14|0)-131071|0;d=(d|0)==-1?-1:(f+d|0)+1|0;if((d|0)!=-1){continue}break}}j=-1;if((g|0)==-1){break c}e=q[q[a>>2]+12>>2];while(1){d=e+(g<<2)|0;f:{if((g|0)>=1){f=q[d-4>>2];if(o[(f&63)+141360|0]<0){break f}}f=q[d>>2]}if((f&63)!=27){break d}d=(q[d>>2]>>>14|0)-131071|0;g=(d|0)==-1?-1:(d+g|0)+1|0;if((g|0)!=-1){continue}break}break c}e=-1;g:{if(q[b>>2]==10){break g}f=q[a+32>>2];q[a+32>>2]=-1;e=fl(a,2147450902,q[q[a+12>>2]+8>>2]);if((f|0)==-1){break g}if((e|0)==-1){e=f;break g}k=q[q[a>>2]+12>>2];d=e;while(1){h=d;g=k+(d<<2)|0;i=q[g>>2];d=(i>>>14|0)-131071|0;d=(d|0)==-1?-1:(h+d|0)+1|0;if((d|0)!=-1){continue}break}f=f+(h^-1)|0;d=f>>31;h=g;if((d^d+f)>=131072){Sj(q[a+12>>2],141849);i=q[g>>2]}q[h>>2]=(i&16383|f<<14)+2147467264}q[a+28>>2]=q[a+24>>2];d=c<<6;j=fl(a,d|16386,q[q[a+12>>2]+8>>2]);q[a+28>>2]=q[a+24>>2];m=fl(a,d|8388610,q[q[a+12>>2]+8>>2]);q[a+28>>2]=q[a+24>>2];if((e|0)==-1){break c}d=q[a+32>>2];if((d|0)!=-1){i=q[q[a>>2]+12>>2];while(1){g=d;f=i+(d<<2)|0;h=q[f>>2];d=(h>>>14|0)-131071|0;d=(d|0)==-1?-1:(g+d|0)+1|0;if((d|0)!=-1){continue}break}e=(g^-1)+e|0;d=e>>31;g=f;if((d^d+e)>=131072){Sj(q[a+12>>2],141849);h=q[f>>2]}q[g>>2]=(h&16383|e<<14)+2147467264;break c}q[a+32>>2]=e}k=q[a+24>>2];q[a+28>>2]=k;d=q[b+20>>2];h:{if((d|0)==-1){break h}if((c|0)==255){while(1){h=q[q[a>>2]+12>>2]+(d<<2)|0;g=q[h>>2];e=(g>>>14|0)-131071|0;i=(e|0)==-1;l=(d+e|0)+1|0;i:{if((d|0)>=1){e=h-4|0;f=q[e>>2];if(o[(f&63)+141360|0]<0){break i}}f=g;e=h}i=i?-1:l;j:{k:{l:{if((f&63)!=27){d=(d^-1)+j|0;e=d>>31;if((e^d+e)>131071){break l}break j}q[e>>2]=f&8372224|f>>>17&32704|26;d=(d^-1)+k|0;e=d>>31;if((e^d+e)<131072){break k}}Sj(q[a+12>>2],141849)}g=q[h>>2]}q[h>>2]=(g&16383|d<<14)+2147467264;d=i;if((d|0)!=-1){continue}break h}}l=c<<6&16320;while(1){h=q[q[a>>2]+12>>2]+(d<<2)|0;g=q[h>>2];e=(g>>>14|0)-131071|0;i=(e|0)==-1;n=(d+e|0)+1|0;m:{if((d|0)>=1){e=h-4|0;f=q[e>>2];if(o[(f&63)+141360|0]<0){break m}}f=g;e=h}i=i?-1:n;n:{o:{p:{if((f&63)==27){q[e>>2]=(f>>>23|0)!=(c|0)?l|f&-16321:f&8372224|f>>>17&32704|26;d=(d^-1)+k|0;e=d>>31;if((e^d+e)>131071){break p}break o}d=(d^-1)+j|0;e=d>>31;if((e^d+e)<131072){break n}}Sj(q[a+12>>2],141849)}g=q[h>>2]}q[h>>2]=(g&16383|d<<14)+2147467264;d=i;if((d|0)!=-1){continue}break}}d=q[b+16>>2];if((d|0)==-1){break b}if((c|0)==255){while(1){h=q[q[a>>2]+12>>2]+(d<<2)|0;g=q[h>>2];e=(g>>>14|0)-131071|0;i=(e|0)==-1;j=(d+e|0)+1|0;q:{if((d|0)>=1){e=h-4|0;f=q[e>>2];if(o[(f&63)+141360|0]<0){break q}}f=g;e=h}i=i?-1:j;r:{s:{t:{if((f&63)!=27){d=(d^-1)+m|0;e=d>>31;if((e^d+e)>131071){break t}break r}q[e>>2]=f&8372224|f>>>17&32704|26;d=(d^-1)+k|0;e=d>>31;if((e^d+e)<131072){break s}}Sj(q[a+12>>2],141849)}g=q[h>>2]}q[h>>2]=(g&16383|d<<14)+2147467264;d=i;if((d|0)!=-1){continue}break b}}j=c<<6&16320;while(1){h=q[q[a>>2]+12>>2]+(d<<2)|0;g=q[h>>2];e=(g>>>14|0)-131071|0;i=(e|0)==-1;l=(d+e|0)+1|0;u:{if((d|0)>=1){e=h-4|0;f=q[e>>2];if(o[(f&63)+141360|0]<0){break u}}f=g;e=h}i=i?-1:l;v:{w:{x:{if((f&63)==27){q[e>>2]=(f>>>23|0)!=(c|0)?j|f&-16321:f&8372224|f>>>17&32704|26;d=(d^-1)+k|0;e=d>>31;if((e^d+e)>131071){break x}break w}d=(d^-1)+m|0;e=d>>31;if((e^d+e)<131072){break v}}Sj(q[a+12>>2],141849)}g=q[h>>2]}q[h>>2]=(g&16383|d<<14)+2147467264;d=i;if((d|0)!=-1){continue}break}}q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=c;q[b>>2]=12}function tza(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,w=0;f=-1;a:{if(!a|(d|0)<0){break a}if(!d){if((c|0)!=1){break a}return r[a|0]?-1:0}if(!c){break a}k=b+d|0;t=k-32|0;l=a+c|0;u=l-16|0;v=k-5|0;m=k-7|0;n=l-5|0;w=l-8|0;p=k-12|0;s=l-15|0;h=a;d=b;b:{while(1){c:{c=h+1|0;j=r[h|0];f=j>>>4|0;d:{e:{f:{if((f|0)!=15){if(d>>>0>t>>>0|c>>>0>=u>>>0){break f}h=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);e=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[d|0]=e;o[d+1|0]=e>>>8;o[d+2|0]=e>>>16;o[d+3|0]=e>>>24;o[d+4|0]=h;o[d+5|0]=h>>>8;o[d+6|0]=h>>>16;o[d+7|0]=h>>>24;h=r[c+12|0]|r[c+13|0]<<8|(r[c+14|0]<<16|r[c+15|0]<<24);e=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);o[d+8|0]=e;o[d+9|0]=e>>>8;o[d+10|0]=e>>>16;o[d+11|0]=e>>>24;o[d+12|0]=h;o[d+13|0]=h>>>8;o[d+14|0]=h>>>16;o[d+15|0]=h>>>24;e=d+f|0;c=c+f|0;i=r[c|0]|r[c+1|0]<<8;g=e-i|0;h=c+2|0;f=j&15;d=h;if((f|0)==15){break e}d=h;if(i>>>0<8){break e}if(b>>>0>g>>>0){break d}c=r[g+4|0]|r[g+5|0]<<8|(r[g+6|0]<<16|r[g+7|0]<<24);d=r[g|0]|r[g+1|0]<<8|(r[g+2|0]<<16|r[g+3|0]<<24);o[e|0]=d;o[e+1|0]=d>>>8;o[e+2|0]=d>>>16;o[e+3|0]=d>>>24;o[e+4|0]=c;o[e+5|0]=c>>>8;o[e+6|0]=c>>>16;o[e+7|0]=c>>>24;c=r[g+12|0]|r[g+13|0]<<8|(r[g+14|0]<<16|r[g+15|0]<<24);d=r[g+8|0]|r[g+9|0]<<8|(r[g+10|0]<<16|r[g+11|0]<<24);o[e+8|0]=d;o[e+9|0]=d>>>8;o[e+10|0]=d>>>16;o[e+11|0]=d>>>24;o[e+12|0]=c;o[e+13|0]=c>>>8;o[e+14|0]=c>>>16;o[e+15|0]=c>>>24;c=r[g+16|0]|r[g+17|0]<<8;o[e+16|0]=c;o[e+17|0]=c>>>8;d=(e+f|0)+4|0;continue}f=0;if(c>>>0>=s>>>0){break b}while(1){g:{h=r[c|0];f=h+f|0;c=c+1|0;if(s>>>0<=c>>>0){break g}if((h|0)==255){continue}}break}f=f+15|0;if(f>>>0>(d^-1)>>>0|(c^-1)>>>0>>0){break b}}e=d+f|0;h=c+f|0;if(!(h>>>0<=w>>>0?p>>>0>=e>>>0:0)){if((h|0)!=(l|0)|e>>>0>k>>>0){break b}bl(d,c,f);f=e-b|0;break a}while(1){f=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);g=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[d|0]=g;o[d+1|0]=g>>>8;o[d+2|0]=g>>>16;o[d+3|0]=g>>>24;o[d+4|0]=f;o[d+5|0]=f>>>8;o[d+6|0]=f>>>16;o[d+7|0]=f>>>24;c=c+8|0;d=d+8|0;if(e>>>0>d>>>0){continue}break}f=j&15;i=r[h|0]|r[h+1|0]<<8;g=e-i|0;d=h+2|0}if((f|0)!=15){h=d;break d}c=d>>>0>n>>>0?d:n;f=0;while(1){h=d+1|0;if((c|0)==(d|0)){break c}j=r[d|0];f=j+f|0;d=h;if((j|0)==255){continue}break}c=d;f=f+15|0;if(f>>>0>(e^-1)>>>0){break b}}if(b>>>0>g>>>0){break c}j=f+4|0;d=j+e|0;h:{if(i>>>0<=7){o[e|0]=0;o[e+1|0]=0;o[e+2|0]=0;o[e+3|0]=0;o[e|0]=r[g|0];o[e+1|0]=r[g+1|0];o[e+2|0]=r[g+2|0];o[e+3|0]=r[g+3|0];c=g;g=i<<2;c=c+q[g+184832>>2]|0;f=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[e+4|0]=f;o[e+5|0]=f>>>8;o[e+6|0]=f>>>16;o[e+7|0]=f>>>24;c=c-q[g+184864>>2]|0;break h}c=r[g+4|0]|r[g+5|0]<<8|(r[g+6|0]<<16|r[g+7|0]<<24);f=r[g|0]|r[g+1|0]<<8|(r[g+2|0]<<16|r[g+3|0]<<24);o[e|0]=f;o[e+1|0]=f>>>8;o[e+2|0]=f>>>16;o[e+3|0]=f>>>24;o[e+4|0]=c;o[e+5|0]=c>>>8;o[e+6|0]=c>>>16;o[e+7|0]=c>>>24;c=g+8|0}f=e+8|0;if(d>>>0>p>>>0){if(d>>>0>v>>>0){break c}e=c;g=f;if(m>>>0>g>>>0){while(1){i=r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24);j=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24);o[g|0]=j;o[g+1|0]=j>>>8;o[g+2|0]=j>>>16;o[g+3|0]=j>>>24;o[g+4|0]=i;o[g+5|0]=i>>>8;o[g+6|0]=i>>>16;o[g+7|0]=i>>>24;e=e+8|0;g=g+8|0;if(m>>>0>g>>>0){continue}break}c=(m-f|0)+c|0;f=m}if(d>>>0<=f>>>0){continue}while(1){o[f|0]=r[c|0];c=c+1|0;f=f+1|0;if((f|0)!=(d|0)){continue}break}continue}g=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);i=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[f|0]=i;o[f+1|0]=i>>>8;o[f+2|0]=i>>>16;o[f+3|0]=i>>>24;o[f+4|0]=g;o[f+5|0]=g>>>8;o[f+6|0]=g>>>16;o[f+7|0]=g>>>24;if(j>>>0<17){continue}f=e+16|0;while(1){e=r[c+12|0]|r[c+13|0]<<8|(r[c+14|0]<<16|r[c+15|0]<<24);g=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);o[f|0]=g;o[f+1|0]=g>>>8;o[f+2|0]=g>>>16;o[f+3|0]=g>>>24;o[f+4|0]=e;o[f+5|0]=e>>>8;o[f+6|0]=e>>>16;o[f+7|0]=e>>>24;c=c+8|0;f=f+8|0;if(f>>>0>>0){continue}break}continue}break}c=h}return(c^-1)+a|0}return f}function ho(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=Ii-16|0;Ii=f;a:{b:{c:{c=q[a+8>>2];if(c>>>0>2]){j=q[a+16>>2];g=r[c|0];d=q[j+(g<<2)>>2];q[b>>2]=d;if((d|0)==11){break c}e=c;break b}q[b>>2]=10;break a}while(1){e=c+1|0;q[a+8>>2]=e;g=r[c+1|0];d=q[(g<<2)+j>>2];q[b>>2]=d;c=e;if((d|0)==11){continue}break}}h=e-q[a>>2]|0;q[b+4>>2]=h;d:{switch(d-10|0){case 2:q[b+4>>2]=h;q[b>>2]=12;q[b+8>>2]=139546;break a;default:q[a+8>>2]=e+1;break a;case 0:break a;case 3:break d}}e:{f:{g:{h:{i:{switch(g-34|0){case 0:if(r[e|0]!=34){break g}c=e+1|0;q[a+8>>2]=c;q[q[a+12>>2]+8>>2]=0;while(1){j:{d=r[c|0];k:{if((d|0)!=92){if((d|0)==34){break j}if(d){break k}a=q[a>>2];q[b+8>>2]=139616;q[b>>2]=12;q[b+4>>2]=c-a;break a}l:{d=r[(r[c+1|0]+j|0)+1024|0];if((d|0)!=117){if(d){break l}a=q[a>>2];q[b+8>>2]=139669;q[b>>2]=12;q[b+4>>2]=c-a;break a}i=-48;m:{d=r[c+2|0];n:{if((d-48&255)>>>0<10){k=-48;break n}k=-87;d=d|32;if((d-97&255)>>>0>5){break m}}e=r[c+3|0];if((e-48&255)>>>0>=10){i=-87;e=e|32;if((e-97&255)>>>0>5){break m}}l=-48;g=r[c+4|0];o:{if((g-48&255)>>>0<10){m=-48;break o}m=-87;g=g|32;if((g-97&255)>>>0>5){break m}}h=r[c+5|0];if((h-48&255)>>>0>=10){l=-87;h=h|32;if((h-97&255)>>>0>5){break m}}n=6;d=(((e&255)+i<<8)+((d&255)+k<<12)|0)+((g&255)+m<<4)+((h&255)+l)|0;if((d&63488)==55296){if(d&1024|r[c+6|0]!=92|r[c+7|0]!=117){break m}l=-48;e=r[c+8|0];p:{if((e-48&255)>>>0<10){k=-48;break p}k=-87;e=e|32;if((e-97&255)>>>0>5){break m}}g=r[c+9|0];if((g-48&255)>>>0>=10){l=-87;g=g|32;if((g-97&255)>>>0>5){break m}}n=-48;h=r[c+10|0];q:{if((h-48&255)>>>0<10){m=-48;break q}m=-87;h=h|32;if((h-97&255)>>>0>5){break m}}i=r[c+11|0];if((i-48&255)>>>0>=10){n=-87;i=i|32;if((i-97&255)>>>0>5){break m}}e=(((g&255)+l<<8)+((e&255)+k<<12)|0)+((h&255)+m<<4)+((i&255)+n)|0;if((e&64512)!=56320){break m}n=12;d=(d<<10&1047552|e&1023)+65536|0}r:{if((d|0)<=127){o[f+8|0]=d;c=1;break r}if((d|0)<=2047){o[f+9|0]=d&63|128;o[f+8|0]=d>>>6|192;c=2;break r}if((d|0)<=65535){o[f+10|0]=d&63|128;o[f+8|0]=d>>>12|224;o[f+9|0]=d>>>6&63|128;c=3;break r}if((d|0)>2097151){break m}o[f+11|0]=d&63|128;o[f+8|0]=d>>>18|240;o[f+10|0]=d>>>6&63|128;o[f+9|0]=d>>>12&63|128;c=4}e=q[a+12>>2];Ti(q[e>>2]+q[e+8>>2]|0,f+8|0,c);q[e+8>>2]=c+q[e+8>>2];c=q[a+8>>2]+n|0;q[a+8>>2]=c;continue}a=q[a>>2];q[b+8>>2]=139641;q[b>>2]=12;q[b+4>>2]=c-a;break a}q[a+8>>2]=c+1}c=q[a+12>>2];e=q[c+8>>2];q[c+8>>2]=e+1;o[e+q[c>>2]|0]=d;c=q[a+8>>2]+1|0;q[a+8>>2]=c;continue}break}q[a+8>>2]=c+1;c=q[a+12>>2];o[q[c>>2]+q[c+8>>2]|0]=0;q[b>>2]=4;a=q[a+12>>2];q[b+16>>2]=q[a+8>>2];q[b+8>>2]=q[a>>2];break a;default:if((g-48&255)>>>0>9){break h}break;case 11:break i}}if(q[j+1344>>2]){break e}s:{t:{u:{c=e;d=r[c|0];switch(d-43|0){case 0:break s;case 2:break u;default:break t}}c=e+1|0;d=r[e+1|0]}if((d&255)!=48){if(d<<24>>24<58){break e}if(!bs(c,139689,3)){break s}if(!bs(c,139693,3)){break s}break e}c=r[c+1|0];if((c&223)==88){break s}if((c-48&255)>>>0>9){break e}}q[b+4>>2]=h;q[b>>2]=12;q[b+8>>2]=139560;break a}if(!Ik(e,139036,4)){q[b+8>>2]=1;q[b>>2]=6;q[a+8>>2]=q[a+8>>2]+4;break a}if(!Ik(e,139041,5)){q[b+8>>2]=0;q[b>>2]=6;q[a+8>>2]=q[a+8>>2]+5;break a}if(!Ik(e,139047,4)){q[b>>2]=7;q[a+8>>2]=e+4;break a}if(!q[j+1344>>2]){break f}v:{w:{x:{c=e;d=r[c|0];switch(d-43|0){case 0:break v;case 2:break x;default:break w}}c=e+1|0;d=r[e+1|0]}if((d&255)!=48){if(d<<24>>24<58){break f}if(!bs(c,139689,3)){break v}if(!bs(c,139693,3)){break v}break f}c=r[c+1|0];if((c&223)==88){break v}if((c-48&255)>>>0>9){break f}}q[b>>2]=5;v[b+8>>3]=TF(e,f+4|0);c=q[a+8>>2];e=q[f+4>>2];if((c|0)==(e|0)){a=q[a>>2];q[b+8>>2]=139560;q[b>>2]=12;q[b+4>>2]=c-a;break a}q[a+8>>2]=e;break a}J(139575,139466,1127,139593);G()}q[b+4>>2]=h;q[b>>2]=12;q[b+8>>2]=139546;break a}q[b>>2]=5;v[b+8>>3]=TF(e,f+12|0);c=q[a+8>>2];e=q[f+12>>2];if((c|0)==(e|0)){a=q[a>>2];q[b+8>>2]=139560;q[b>>2]=12;q[b+4>>2]=c-a;break a}q[a+8>>2]=e}Ii=f+16|0}function Mua(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;while(1){a:{b:{c:{if(t[a+116>>2]>261){break c}Vs(a);c=q[a+116>>2];if(!(c>>>0>=262|b)){return 0}if(!c){break a}if(c>>>0>2){break c}c=q[a+96>>2];q[a+120>>2]=c;q[a+100>>2]=q[a+112>>2];e=2;q[a+96>>2]=2;break b}e=2;c=q[a+108>>2];d=q[a+84>>2]&(r[(c+q[a+56>>2]|0)+2|0]^q[a+72>>2]<>2]);q[a+72>>2]=d;f=q[a+68>>2]+(d<<1)|0;d=s[f>>1];p[q[a+64>>2]+((c&q[a+52>>2])<<1)>>1]=d;p[f>>1]=c;c=q[a+96>>2];q[a+120>>2]=c;q[a+100>>2]=q[a+112>>2];q[a+96>>2]=2;if(!d){break b}d:{if(q[a+44>>2]-262>>>0>2]-d>>>0|t[a+128>>2]<=c>>>0){break d}e=uF(a,d);q[a+96>>2]=e;if(e>>>0>5){break d}if(q[a+136>>2]!=1){if((e|0)!=3){break d}e=3;if(q[a+108>>2]-q[a+112>>2]>>>0<4097){break d}}e=2;q[a+96>>2]=2}c=q[a+120>>2]}if(!(c>>>0<3|c>>>0>>0)){f=q[a+116>>2];d=q[a+5792>>2];h=q[a+108>>2];e=h+(q[a+100>>2]^-1)|0;p[q[a+5796>>2]+(d<<1)>>1]=e;q[a+5792>>2]=d+1;c=c-3|0;o[d+q[a+5784>>2]|0]=c;c=((r[(c&255)+196624|0]<<2)+a|0)+1176|0;p[c>>1]=s[c>>1]+1;c=e-1&65535;c=((r[(c>>>0<256?c:(c>>>7|0)+256|0)+196112|0]<<2)+a|0)+2440|0;p[c>>1]=s[c>>1]+1;c=q[a+120>>2];e=c-2|0;q[a+120>>2]=e;q[a+116>>2]=(q[a+116>>2]-c|0)+1;f=(f+h|0)-3|0;h=q[a+5788>>2]-1|0;c=q[a+108>>2];i=q[a+5792>>2];while(1){d=c;c=c+1|0;q[a+108>>2]=c;if(c>>>0<=f>>>0){g=q[a+84>>2]&(r[(d+q[a+56>>2]|0)+3|0]^q[a+72>>2]<>2]);q[a+72>>2]=g;g=q[a+68>>2]+(g<<1)|0;p[q[a+64>>2]+((q[a+52>>2]&c)<<1)>>1]=s[g>>1];p[g>>1]=c}e=e-1|0;q[a+120>>2]=e;if(e){continue}break}q[a+96>>2]=2;q[a+104>>2]=0;f=d+2|0;q[a+108>>2]=f;if((h|0)!=(i|0)){continue}c=a;d=q[a+92>>2];if((d|0)>=0){e=d+q[a+56>>2]|0}else{e=0}Tm(c,e,f-d|0,0);q[a+92>>2]=q[a+108>>2];c=q[a>>2];d=q[c+28>>2];Gl(d);e=q[c+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;e:{if(!e){break e}Ti(q[c+12>>2],q[d+16>>2],e);q[c+12>>2]=e+q[c+12>>2];q[d+16>>2]=e+q[d+16>>2];q[c+20>>2]=e+q[c+20>>2];q[c+16>>2]=q[c+16>>2]-e;c=q[d+20>>2]-e|0;q[d+20>>2]=c;if(c){break e}q[d+16>>2]=q[d+8>>2]}if(q[q[a>>2]+16>>2]){continue}return 0}if(q[a+104>>2]){c=r[(q[a+108>>2]+q[a+56>>2]|0)-1|0];d=q[a+5792>>2];p[q[a+5796>>2]+(d<<1)>>1]=0;q[a+5792>>2]=d+1;o[d+q[a+5784>>2]|0]=c;c=(c<<2)+a|0;p[c+148>>1]=s[c+148>>1]+1;f:{if(q[a+5792>>2]!=(q[a+5788>>2]-1|0)){break f}c=a;d=q[a+92>>2];if((d|0)>=0){e=d+q[a+56>>2]|0}else{e=0}Tm(c,e,q[a+108>>2]-d|0,0);q[a+92>>2]=q[a+108>>2];c=q[a>>2];d=q[c+28>>2];Gl(d);e=q[c+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;if(!e){break f}Ti(q[c+12>>2],q[d+16>>2],e);q[c+12>>2]=e+q[c+12>>2];q[d+16>>2]=e+q[d+16>>2];q[c+20>>2]=e+q[c+20>>2];q[c+16>>2]=q[c+16>>2]-e;c=q[d+20>>2]-e|0;q[d+20>>2]=c;if(c){break f}q[d+16>>2]=q[d+8>>2]}q[a+108>>2]=q[a+108>>2]+1;q[a+116>>2]=q[a+116>>2]-1;if(q[q[a>>2]+16>>2]){continue}return 0}else{q[a+104>>2]=1;q[a+108>>2]=q[a+108>>2]+1;q[a+116>>2]=q[a+116>>2]-1;continue}}break}if(q[a+104>>2]){c=r[(q[a+108>>2]+q[a+56>>2]|0)-1|0];d=q[a+5792>>2];p[q[a+5796>>2]+(d<<1)>>1]=0;q[a+5792>>2]=d+1;o[d+q[a+5784>>2]|0]=c;c=(c<<2)+a|0;p[c+148>>1]=s[c+148>>1]+1;q[a+104>>2]=0}c=q[a+108>>2];q[a+5812>>2]=c>>>0<2?c:2;if((b|0)==4){b=a;d=q[a+92>>2];if((d|0)>=0){e=d+q[a+56>>2]|0}else{e=0}Tm(b,e,c-d|0,1);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;g:{if(!d){break g}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break g}q[c+16>>2]=q[c+8>>2]}return(q[q[a>>2]+16>>2]?3:2)|0}h:{if(!q[a+5792>>2]){break h}b=a;d=q[a+92>>2];if((d|0)>=0){e=d+q[a+56>>2]|0}else{e=0}Tm(b,e,c-d|0,0);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;i:{if(!d){break i}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break i}q[c+16>>2]=q[c+8>>2]}if(q[q[a>>2]+16>>2]){break h}return 0}return 1}function nx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:while(1){k=b-2|0;b:while(1){f=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-f|0;d=a>>1;switch(d|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}c=q[c>>2]+8|0;a=b-2|0;b=s[a>>1];d=s[f>>1];if(s[(c+w(b,112)|0)+104>>1]>=s[(c+w(d,112)|0)+104>>1]){break d}p[f>>1]=b;p[a>>1]=d;return}c=q[c>>2];g=c+8|0;a=b-2|0;d=s[a>>1];e=s[(g+w(d,112)|0)+104>>1];b=s[f>>1];h=g+w(b,112)|0;k=s[f+2>>1];g=s[(g+w(k,112)|0)+104>>1];if(s[h+104>>1]<=g>>>0){if(e>>>0>=g>>>0){break d}p[f+2>>1]=d;p[a>>1]=k;b=c+8|0;a=s[f+2>>1];c=s[f>>1];if(s[(b+w(a,112)|0)+104>>1]>=s[(b+w(c,112)|0)+104>>1]){break d}p[f+2>>1]=c;p[f>>1]=a;return}if(e>>>0>>0){p[f>>1]=d;p[a>>1]=b;return}p[f+2>>1]=b;p[f>>1]=k;d=s[a>>1];if(s[(c+w(d,112)|0)+112>>1]>=s[h+104>>1]){break d}p[f+2>>1]=d;p[a>>1]=b;return}a=f;$r(f,f+2|0,f+4|0,f+6|0,c);g=q[c>>2];c=g+8|0;b=b-2|0;d=s[b>>1];e=s[f+6>>1];if(s[(c+w(d,112)|0)+104>>1]>=s[(c+w(e,112)|0)+104>>1]){break d}p[a+6>>1]=d;p[b>>1]=e;d=s[a+6>>1];e=c+w(d,112)|0;b=f;k=s[f+4>>1];if(s[e+104>>1]>=s[(c+w(k,112)|0)+104>>1]){break d}p[b+4>>1]=d;p[a+6>>1]=k;b=s[f+2>>1];if(s[e+104>>1]>=s[(g+w(b,112)|0)+112>>1]){break d}p[a+4>>1]=b;p[a+2>>1]=d;b=s[a>>1];if(s[e+104>>1]>=s[(g+w(b,112)|0)+112>>1]){break d}p[a+2>>1]=b;p[a>>1]=d;return}if((a|0)<=61){DP(f,b,c);return}h=((d|0)/2<<1)+f|0;l:{if((a|0)>=1999){a=(d|0)/4<<1;g=a+f|0;e=a+h|0;i=$r(f,g,h,e,c);a=q[c>>2];d=a+8|0;j=s[k>>1];l=s[e>>1];if(s[(d+w(j,112)|0)+104>>1]>=s[(d+w(l,112)|0)+104>>1]){break l}p[e>>1]=j;p[k>>1]=l;j=s[e>>1];l=s[h>>1];if(s[(d+w(j,112)|0)+104>>1]>=s[(d+w(l,112)|0)+104>>1]){i=i+1|0;break l}p[h>>1]=j;p[e>>1]=l;e=s[h>>1];j=s[g>>1];if(s[(d+w(e,112)|0)+104>>1]>=s[(d+w(j,112)|0)+104>>1]){i=i+2|0;break l}p[g>>1]=e;p[h>>1]=j;e=s[g>>1];j=s[f>>1];if(s[(d+w(e,112)|0)+104>>1]>=s[(d+w(j,112)|0)+104>>1]){i=i+3|0;break l}p[f>>1]=e;p[g>>1]=j;i=i+4|0;break l}a=q[c>>2];d=a+8|0;e=s[k>>1];j=s[(d+w(e,112)|0)+104>>1];l=s[h>>1];m=s[(d+w(l,112)|0)+104>>1];g=s[f>>1];n=d+w(g,112)|0;m:{if(m>>>0>=s[n+104>>1]){i=0;if(j>>>0>=m>>>0){break l}p[h>>1]=e;p[k>>1]=l;i=1;g=s[h>>1];e=s[f>>1];if(s[(d+w(g,112)|0)+104>>1]>=s[(d+w(e,112)|0)+104>>1]){break l}p[f>>1]=g;p[h>>1]=e;break m}if(j>>>0>>0){p[f>>1]=e;p[k>>1]=g;i=1;break l}p[f>>1]=l;p[h>>1]=g;i=1;d=s[k>>1];if(s[(w(d,112)+a|0)+112>>1]>=s[n+104>>1]){break l}p[h>>1]=d;p[k>>1]=g}i=2}e=k;j=a+8|0;d=s[f>>1];g=s[(j+w(d,112)|0)+104>>1];l=s[(j+w(s[h>>1],112)|0)+104>>1];if(g>>>0>=l>>>0){while(1){e=e-2|0;if((e|0)==(f|0)){d=f+2|0;e=s[k>>1];if(g>>>0>1]){break e}if((d|0)==(k|0)){break d}while(1){h=s[d>>1];if(g>>>0>1]){p[d>>1]=e;p[k>>1]=h;d=d+2|0;break e}d=d+2|0;if((k|0)!=(d|0)){continue}break}break d}m=s[e>>1];if(l>>>0<=s[(w(m,112)+a|0)+112>>1]){continue}break}p[f>>1]=m;p[e>>1]=d;i=i+1|0}d=f+2|0;if(e>>>0<=d>>>0){break f}while(1){l=s[(w(s[h>>1],112)+a|0)+112>>1];while(1){g=d;d=d+2|0;m=s[g>>1];if(l>>>0>s[(w(m,112)+a|0)+112>>1]){continue}break}while(1){e=e-2|0;n=s[e>>1];if(l>>>0<=s[(w(n,112)+a|0)+112>>1]){continue}break}if(e>>>0>>0){d=g;break f}else{p[g>>1]=n;p[e>>1]=m;h=(g|0)==(h|0)?e:h;i=i+1|0;continue}}}$r(f,f+2|0,f+4|0,b-2|0,c);break d}n:{if((d|0)==(h|0)){break n}a=s[h>>1];g=s[d>>1];if(s[(j+w(a,112)|0)+104>>1]>=s[(j+w(g,112)|0)+104>>1]){break n}p[d>>1]=a;p[h>>1]=g;i=i+1|0}if(!i){g=JN(f,d,c);a=d+2|0;if(JN(a,b,c)){b=d;a=f;if(!g){continue a}break d}if(g){continue b}}if((d-f|0)<(b-d|0)){nx(f,d,c);a=d+2|0;continue b}nx(d+2|0,b,c);b=d;a=f;continue a}e=k;if((e|0)==(d|0)){break d}while(1){h=s[(w(s[f>>1],112)+a|0)+112>>1];while(1){g=d;d=d+2|0;i=s[g>>1];if(h>>>0>=s[(w(i,112)+a|0)+112>>1]){continue}break}while(1){e=e-2|0;j=s[e>>1];if(h>>>0>1]){continue}break}if(e>>>0<=g>>>0){f=g;continue c}else{p[g>>1]=j;p[e>>1]=i;continue}}}break}break}break}}function yR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=_n(a);a:{if(b){break a}if(q[a+128>>2]!=22){if(q[a+8>>2]==1){c=q[a+12>>2];q[a+12>>2]=c+1;d=q[q[a>>2]+160>>2];if((d|0)>=0){b=-30464;if((c|0)>=(d|0)){break a}}q[a+176>>2]=1;return-27392}Xj(a,2,10);return-30464}c=q[a+120>>2];b=q[a>>2];if(r[b+184|0]&2){if(r[c|0]==3){return FR(a)}Ni(q[q[a+68>>2]+480>>2]);b=q[a+68>>2];o[b+484|0]=0;q[b+480>>2]=0;b=q[a>>2]}d=r[b+184|0]&2?12:4;b:{if(!(r[c|0]==2?t[a+168>>2]>=d+38>>>0:0)){Xj(a,2,50);break b}e=q[b+184>>2]>>>1&1;b=c+d|0;ky(a+16|0,a+20|0,e,b);c:{d=q[a+16>>2];c=q[a>>2];d:{if((d|0)>2];if((e|0)r[c+180|0]){break d}if((e|0)<=r[c+181|0]){break c}}Xj(a,2,70);return-28288}d=r[b+30|0]|r[b+31|0]<<8|(r[b+32|0]<<16|r[b+33|0]<<24);e=q[a+68>>2];c=e+1184|0;f=r[b+26|0]|r[b+27|0]<<8|(r[b+28|0]<<16|r[b+29|0]<<24);o[c|0]=f;o[c+1|0]=f>>>8;o[c+2|0]=f>>>16;o[c+3|0]=f>>>24;o[c+4|0]=d;o[c+5|0]=d>>>8;o[c+6|0]=d>>>16;o[c+7|0]=d>>>24;d=r[b+22|0]|r[b+23|0]<<8|(r[b+24|0]<<16|r[b+25|0]<<24);c=e+1176|0;f=r[b+18|0]|r[b+19|0]<<8|(r[b+20|0]<<16|r[b+21|0]<<24);o[c|0]=f;o[c+1|0]=f>>>8;o[c+2|0]=f>>>16;o[c+3|0]=f>>>24;o[c+4|0]=d;o[c+5|0]=d>>>8;o[c+6|0]=d>>>16;o[c+7|0]=d>>>24;d=r[b+14|0]|r[b+15|0]<<8|(r[b+16|0]<<16|r[b+17|0]<<24);c=e+1168|0;f=r[b+10|0]|r[b+11|0]<<8|(r[b+12|0]<<16|r[b+13|0]<<24);o[c|0]=f;o[c+1|0]=f>>>8;o[c+2|0]=f>>>16;o[c+3|0]=f>>>24;o[c+4|0]=d;o[c+5|0]=d>>>8;o[c+6|0]=d>>>16;o[c+7|0]=d>>>24;c=e+1160|0;d=r[b+6|0]|r[b+7|0]<<8|(r[b+8|0]<<16|r[b+9|0]<<24);e=r[b+2|0]|r[b+3|0]<<8|(r[b+4|0]<<16|r[b+5|0]<<24);o[c|0]=e;o[c+1|0]=e>>>8;o[c+2|0]=e>>>16;o[c+3|0]=e>>>24;o[c+4|0]=d;o[c+5|0]=d>>>8;o[c+6|0]=d>>>16;o[c+7|0]=d>>>24;c=r[b+34|0];if(c>>>0>=33){Xj(a,2,50);break b}e:{f=q[a+168>>2];e=c+(r[q[a>>2]+184|0]&2?12:4)|0;if(f>>>0>e+39>>>0){d=b+c|0;d=r[d+38|0]<<8|r[d+39|0];if((f|0)==((d+e|0)+40|0)?d-1>>>0>=3:0){break e}Xj(a,2,50);break b}d=0;if((f|0)==(e+38|0)){break e}Xj(a,2,50);break b}f=b+c|0;if(r[f+37|0]){Xj(a,2,47);return-28800}g=r[f+36|0]|r[f+35|0]<<8;e=Au(g);q[q[a+68>>2]+1120>>2]=e;if(!e){Xj(a,2,80);return-28928}MV(a,e);f:{g:{h=q[a+68>>2];h:{if(q[a+8>>2]|(!c|!q[h+2252>>2])){break h}e=q[a+64>>2];if((g|0)!=q[e+4>>2]|q[e+8>>2]|(c|0)!=q[e+12>>2]){break h}if(!Ej(e+16|0,b+35|0,c)){break g}}q[a+4>>2]=q[a+4>>2]+1;q[h+2252>>2]=0;h=ba(0)|0;e=q[a+64>>2];q[e+12>>2]=c;q[e+8>>2]=0;q[e+4>>2]=g;q[e>>2]=h;Ti(e+16|0,b+35|0,c);break f}q[a+4>>2]=12;b=gE(a);if(!b){break f}Xj(a,2,80);return b}e=q[q[a>>2]+(q[a+20>>2]<<2)>>2];b=0;while(1){c=q[e+(b<<2)>>2];if(!c){Xj(a,2,47);break b}b=b+1|0;if((c|0)!=q[q[a+64>>2]+4>>2]){continue}break}c=Au(c);b=q[a+20>>2];if(lD(c,a,b,b)){Xj(a,2,47);break b}e=0;q[q[a+64>>2]+8>>2]=0;c=f+40|0;while(1){if(d){b=r[c+3|0]|r[c+2|0]<<8;f=b+4|0;if(f>>>0>d>>>0){Xj(a,2,50);break b}i:{j:{k:{l:{m:{n:{o:{p:{q:{g=r[c|0]|r[c+1|0]<<8;g=(g<<24|g<<8&16711680)>>>16|0;switch(g-1|0){case 1:case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 16:case 17:case 18:case 19:case 20:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:break i;case 15:break j;case 10:break k;case 34:break l;case 22:break m;case 21:break n;case 3:break o;case 0:break p;default:break q}}if((g|0)!=65281){break i}e=1;b=BR(a,c+4|0,b);if(!b){break i}break a}b=ER(a,c+4|0,b);if(!b){break i}break a}b=rR(a,b);if(!b){break i}break a}b=HR(a,b);if(!b){break i}break a}b=GR(a,b);if(!b){break i}break a}b=uR(a,b);if(!b){break i}break a}b=sR(a,c+4|0,b);if(!b){break i}break a}b=LR(a,c+4|0,b);if(b){break a}}c=c+f|0;b=-31104;d=d-f|0;if(d-1>>>0>=3){continue}break a}break}c=q[a+244>>2];r:{if((q[q[a>>2]+184>>2]&48)==32?!c:0){break r}b=0;if(q[a+8>>2]!=1){break a}if((c|0)==1?!e:0){break r}if(c){break a}if(e){break r}if(q[q[a>>2]+184>>2]&48){break a}}Xj(a,2,40)}b=-31104}return b}function xra(a,b){var c=0;q[71660]=a;a=b?q[b+120>>2]:0;b=q[a+8>>2]-q[a+12>>2]>>4;q[71662]=jm(a,17096,17108,226656);q[71661]=jm(a,14479,17116,226688);Ak(a,17124,226768);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17127);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17141);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17163);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17186);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17209);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17231);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17254);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17277);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17291);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17305);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17320);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17337);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17354);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17369);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17385);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=8;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17403);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=9;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17421);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=10;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17436);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=11;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17452);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=12;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17470);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=13;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17488);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=14;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17503);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=15;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17519);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=16;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17537);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=17;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17555);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=18;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17569);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=19;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17584);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=20;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17601);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=21;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17618);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=22;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17632);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=23;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17647);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=24;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17664);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=25;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17681);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=26;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17695);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=27;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17710);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=28;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17727);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=29;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17744);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=30;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17761);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=31;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17779);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=32;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17799);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=33;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17819);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=34;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17833);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=35;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17848);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=36;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17865);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=37;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17882);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=38;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17898);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=39;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17915);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=40;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,17934);Ri(a,-2);if((b|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(15852,15159,2391,17953);G()}}function ks(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=q[a+36>>2];o[c+5|0]=r[c+5|0]|4;a:{b:{c:{d:{switch(r[c+4|0]-5|0){case 0:q[a+36>>2]=q[c+24>>2];b=q[c+8>>2];e:{if(!b){break e}if(r[b+5|0]&3){Ok(a,b);b=q[c+8>>2];if(!b){break e}}if(r[b+6|0]&8){break e}b=eo(b,3,q[a+200>>2]);if(!b|q[b+8>>2]!=4){break e}b=q[b>>2]+16|0;d=gk(b,107);b=gk(b,118);if(d|b){o[c+5|0]=r[c+5|0]&231|(((b|0)!=0)<<4|((d|0)!=0)<<3);q[c+24>>2]=q[a+44>>2];q[a+44>>2]=c}if(b?d:0){break b}if(b){break c}f=(d|0)!=0}b=q[c+28>>2];if(b){while(1){b=b-1|0;d=q[c+12>>2]+(b<<4)|0;f:{if(q[d+8>>2]<4){break f}d=q[d>>2];if(!(r[d+5|0]&3)){break f}Ok(a,d)}if(b){continue}break}}b=-1<>2]+(b<<5)|0;e=q[b+8>>2];h:{if(e){if((e|0)<4){break h}b=q[b>>2];if(!(r[b+5|0]&3)){break h}Ok(a,b);break h}if(q[b+24>>2]<4){break h}q[b+24>>2]=11}b=d-1|0;if(d){continue}break g}}while(1){e=b;b=q[c+16>>2]+(b<<5)|0;g=b;h=q[b+24>>2];d=q[b+8>>2];i:{if(!d){if((h|0)<4){break i}q[g+24>>2]=11;break i}j:{if((h|0)<4){break j}g=q[b+16>>2];if(!(r[g+5|0]&3)){break j}Ok(a,g);d=q[b+8>>2]}if((d|0)<4){break i}b=q[b>>2];if(!(r[b+5|0]&3)){break i}Ok(a,b)}b=e-1|0;if(e){continue}break}}if(!f){break a}break b;case 1:q[a+36>>2]=q[c+8>>2];b=q[c+12>>2];if(r[b+5|0]&3){Ok(a,b)}k:{if(r[c+6|0]){b=0;e=r[c+7|0];if(!e){e=0;break k}while(1){d=(b<<4)+c|0;l:{if(q[d+32>>2]<4){break l}d=q[d+24>>2];if(!(r[d+5|0]&3)){break l}Ok(a,d);e=r[c+7|0]}b=b+1|0;if(b>>>0<(e&255)>>>0){continue}break}break k}b=q[c+16>>2];if(r[b+5|0]&3){Ok(a,b)}b=0;e=r[c+7|0];if(!e){e=0;break k}while(1){d=q[((b<<2)+c|0)+20>>2];if(r[d+5|0]&3){Ok(a,d);e=r[c+7|0]}b=b+1|0;if(b>>>0<(e&255)>>>0){continue}break}}a=e&255;if(r[c+6|0]){return(a<<4)+24|0}return(a<<2)+20|0;case 3:q[a+36>>2]=q[c+108>>2];q[c+108>>2]=q[a+40>>2];q[a+40>>2]=c;o[c+5|0]=r[c+5|0]&251;m:{if(q[c+80>>2]<4){break m}b=q[c+72>>2];if(!(r[b+5|0]&3)){break m}Ok(a,b)}d=q[c+8>>2];e=d;b=q[c+40>>2];f=q[c+20>>2];if(b>>>0<=f>>>0){e=d;while(1){g=q[b+8>>2];e=e>>>0>>0?g:e;b=b+24|0;if(f>>>0>=b>>>0){continue}break}}b=q[c+32>>2];if(d>>>0>b>>>0){while(1){n:{if(q[b+8>>2]<4){break n}f=q[b>>2];if(!(r[f+5|0]&3)){break n}Ok(a,f);d=q[c+8>>2]}b=b+16|0;if(d>>>0>b>>>0){continue}break}}if(b>>>0<=e>>>0){while(1){q[b+8>>2]=0;b=b+16|0;if(e>>>0>=b>>>0){continue}break}}a=q[c+48>>2];o:{if((a|0)>2e4){break o}b=e-q[c+32>>2]|0;if(!((a|0)<17|(a|0)<=(q[c+20>>2]-q[c+40>>2]|0)/24<<2)){EZ(c,a>>>1|0)}a=q[c+44>>2];if((a|0)<=b>>2|(a|0)<91){break o}sn(c,a>>>1|0)}return(w(q[c+48>>2],24)+(q[c+44>>2]<<4)|0)+120|0;case 4:q[a+36>>2]=q[c+68>>2];b=q[c+32>>2];if(b){o[b+5|0]=r[b+5|0]&252}d=q[c+40>>2];if((d|0)>=1){b=0;while(1){e=q[c+8>>2]+(b<<4)|0;p:{if(q[e+8>>2]<4){break p}e=q[e>>2];if(!(r[e+5|0]&3)){break p}Ok(a,e);d=q[c+40>>2]}b=b+1|0;if((d|0)>(b|0)){continue}break}}d=q[c+36>>2];if((d|0)>=1){b=0;while(1){e=q[q[c+28>>2]+(b<<2)>>2];if(e){o[e+5|0]=r[e+5|0]&252;d=q[c+36>>2]}b=b+1|0;if((d|0)>(b|0)){continue}break}}d=q[c+52>>2];if((d|0)>=1){b=0;while(1){e=q[q[c+16>>2]+(b<<2)>>2];if(!(!e|!(r[e+5|0]&3))){Ok(a,e);d=q[c+52>>2]}b=b+1|0;if((d|0)>(b|0)){continue}break}}a=q[c+56>>2];if((a|0)>=1){b=0;while(1){d=q[q[c+24>>2]+w(b,12)>>2];if(d){o[d+5|0]=r[d+5|0]&252;a=q[c+56>>2]}b=b+1|0;if((b|0)<(a|0)){continue}break}d=q[c+52>>2]}b=((w(a,12)+(q[c+40>>2]<<4)|0)+(q[c+36>>2]+(q[c+48>>2]+(q[c+44>>2]+d|0)|0)<<2)|0)+76|0;break;default:break d}}return b}b=-1<>2]+(b<<5)|0;if(!(q[b+8>>2]|q[b+24>>2]<4)){q[b+24>>2]=11}b=a-1|0;if(a){continue}break b}}while(1){d=b;f=q[c+16>>2]+(b<<5)|0;b=f;e=q[b+24>>2];q:{if(q[b+8>>2]){if((e|0)<4){break q}b=q[f+16>>2];if(!(r[b+5|0]&3)){break q}Ok(a,b);break q}if((e|0)<4){break q}q[b+24>>2]=11}b=d-1|0;if(d){continue}break}}o[c+5|0]=r[c+5|0]&251}return((q[c+28>>2]<<4)+(32<>2]=0;d=q[a+8>>2];t=q[d>>2];h=q[a+4>>2];j=q[h+4>>2];l=q[h>>2];i=j-l|0;a=i>>8;q[73712]=a+q[73712];q[b+288>>2]=a;q[b+292>>2]=0;q[b+8>>2]=a;q[b+12>>2]=0;a:{b:{if(i){g=r[d+8|0];q[b+440>>2]=0;c:{c=q[h+4>>2];a=q[h>>2];d=c-a|0;if(!d){break c}if((a|0)!=(c|0)){g=g&1;c=a-c|0;n=((c|0)>(d|0)?c:d)>>>8|0;d=(d|0)>-1?d:-1;d=w(n,(d|0)<1?d:1);n=d>>>0>1?d:1;c=0;while(1){a=(c<<8)+a|0;if((s[a+246>>1]&3)==3){f=a- -64|0;foa(b+16|0,a+16|0,a+32|0,f,a+48|0,q[a+192>>2]);d=Jp(q[a>>2]);u[b+368>>2]=u[d>>2];u[b+372>>2]=u[d+4>>2];u[b+376>>2]=u[d+8>>2];u[b+380>>2]=u[d+12>>2];u[b+384>>2]=u[d+16>>2];u[b+388>>2]=u[d+20>>2];u[b+392>>2]=u[d+24>>2];u[b+396>>2]=u[d+28>>2];u[b+400>>2]=u[d+32>>2];u[b+404>>2]=u[d+36>>2];u[b+408>>2]=u[d+40>>2];u[b+412>>2]=u[d+44>>2];u[b+416>>2]=u[d+48>>2];u[b+420>>2]=u[d+52>>2];u[b+424>>2]=u[d+56>>2];u[b+428>>2]=u[d+60>>2];d:{if((q[q[a>>2]+136>>2]&512)>>>9|0){_k(b+304|0,b+368|0,b+16|0);break d}jo(b+304|0,b+368|0,b+16|0)}z=u[b+364>>2];k=u[b+360>>2];e=u[b+356>>2];v=u[b+352>>2];A=u[b+348>>2];B=u[b+344>>2];C=u[b+340>>2];D=u[b+336>>2];E=u[b+332>>2];F=u[b+328>>2];H=u[b+324>>2];I=u[b+320>>2];K=u[b+316>>2];L=u[b+312>>2];M=u[b+308>>2];m=u[f>>2];u[a+128>>2]=u[b+304>>2]*m;u[a+188>>2]=z;u[a+184>>2]=k;d=a;k=e;if(x(y(e))>2]=g?k:x(f|0);d=a;e=v;k=e;if(x(y(e))>2]=g?k:x(f|0);u[a+140>>2]=K*m;u[a+136>>2]=L*m;u[a+132>>2]=M*m;e=u[a+72>>2];u[a+172>>2]=A*e;u[a+168>>2]=B*e;u[a+164>>2]=C*e;u[a+160>>2]=D*e;e=u[a+68>>2];u[a+156>>2]=E*e;u[a+152>>2]=F*e;u[a+148>>2]=H*e;u[a+144>>2]=I*e}c=c+1|0;if((n|0)==(c|0)){break c}a=q[h>>2];if(q[h+4>>2]-a>>8>>>0>c>>>0){continue}break}}break a}a=l-j|0;d=((a|0)>(i|0)?a:i)>>>8|0;a=(i|0)>-1?i:-1;a=w(d,(a|0)<1?a:1);l=a>>>0>1?a:1;g=0;while(1){a=q[h>>2];if(q[h+4>>2]-a>>8>>>0<=g>>>0){break a}c=a+(g<<8)|0;a=s[c+246>>1];if((a&3)==3){e:{if(!(a&8)){a=q[c+220>>2];if(!a|!r[a+52|0]){break e}}Oka(c)}f=dA(b+16|0);a=q[q[c+216>>2]>>2];u[b+80>>2]=u[c+80>>2];u[b+84>>2]=u[c+84>>2];u[b+88>>2]=u[c+88>>2];u[b+92>>2]=u[c+92>>2];u[b+96>>2]=u[c+96>>2];u[b+100>>2]=u[c+100>>2];u[b+104>>2]=u[c+104>>2];u[b+108>>2]=u[c+108>>2];u[b+112>>2]=u[c+112>>2];u[b+116>>2]=u[c+116>>2];u[b+120>>2]=u[c+120>>2];u[b+124>>2]=u[c+124>>2];q[b+128>>2]=q[c+240>>2];u[b+16>>2]=u[c+128>>2];u[b+20>>2]=u[c+132>>2];u[b+24>>2]=u[c+136>>2];u[b+28>>2]=u[c+140>>2];u[b+32>>2]=u[c+144>>2];u[b+36>>2]=u[c+148>>2];u[b+40>>2]=u[c+152>>2];u[b+44>>2]=u[c+156>>2];u[b+48>>2]=u[c+160>>2];u[b+52>>2]=u[c+164>>2];u[b+56>>2]=u[c+168>>2];u[b+60>>2]=u[c+172>>2];u[b+64>>2]=u[c+176>>2];u[b+68>>2]=u[c+180>>2];u[b+72>>2]=u[c+184>>2];e=u[c+188>>2];p[b+204>>1]=0;u[b+76>>2]=e;o[b+224|0]=r[c+246|0]>>>4&1;u[b+216>>2]=u[c+232>>2];u[b+220>>2]=u[c+236>>2];u[b+208>>2]=u[c+48>>2];u[b+212>>2]=u[c+52>>2];o[b+272|0]=r[b+272|0]&254;d=q[a+88>>2];if(d>>>0<=8){d=d<<2;q[b+232>>2]=q[d+57316>>2];q[b+228>>2]=q[d+57280>>2]}a=q[a+92>>2];if(a>>>0>=5|!(27>>>a&1)){break b}a=a<<2;q[b+200>>2]=q[a+57372>>2];q[b+196>>2]=q[a+57352>>2];a=q[c+220>>2];if(a){a=q[a+4>>2]-q[a>>2]>>2;d=a>>>0<16?a:16;if(d){a=0;while(1){q[(f+(a<<2)|0)+116>>2]=Pla(q[c+220>>2],a);a=a+1|0;if((d|0)!=(a|0)){continue}break}}o[b+206|0]=d}j=q[c+216>>2];d=t;a=q[c+228>>2];if(!a){a=q[j+8>>2]}i=a;a=q[c+224>>2];if(!a){a=q[j+4>>2]}cA(d,i,q[a>>2],q[c+196>>2],f)}g=g+1|0;if((l|0)!=(g|0)){continue}break}bA(t,1,0)}Ii=b+448|0;return 0}q[b>>2]=a;Pi(4,56778,56786,b);J(56817,56669,440,56819);G()}J(57189,57106,479,57200);G()}function av(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=Ii-112|0;Ii=i;if(q[b+8>>2]!=6){g=el(a,b,16);h=q[a+32>>2];if(q[g+8>>2]!=6){_u(a,b,140994)}d=q[a+8>>2];if(d>>>0>b>>>0){while(1){e=d-16|0;f=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=f;q[d+8>>2]=q[e+8>>2];d=e;if(d>>>0>b>>>0){continue}break}d=q[a+8>>2]}if((q[a+28>>2]-d|0)<=16){e=q[a+44>>2];sn(a,(e|0)<1?e+1|0:e<<1)}q[a+8>>2]=q[a+8>>2]+16;e=q[g+4>>2];b=q[a+32>>2]+(b-h|0)|0;q[b>>2]=q[g>>2];q[b+4>>2]=e;q[b+8>>2]=q[g+8>>2]}d=q[b>>2];e=q[a+32>>2];q[q[a+20>>2]+12>>2]=q[a+24>>2];n=b-e|0;a:{b:{c:{if(!r[d+6|0]){l=q[d+16>>2];e=r[l+75|0];if((q[a+28>>2]-q[a+8>>2]|0)<=e<<4){b=q[a+44>>2];sn(a,(b|0)<(e|0)?b+e|0:b<<1)}e=q[a+32>>2]+n|0;f=r[l+74|0];d:{if(!f){d=e+16|0;b=d+(r[l+73|0]<<4)|0;if(b>>>0>=t[a+8>>2]){break d}q[a+8>>2]=b;break d}d=q[a+8>>2];b=d-e>>4;e=b-1|0;j=b;b=r[l+73|0];if((j|0)<=(b|0)){while(1){q[d+8>>2]=0;d=d+16|0;e=e+1|0;if((b|0)!=(e|0)){continue}break}q[a+8>>2]=d;e=b}if(f&4){d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}j=e-b|0;m=lp(a,j,1);if((j|0)>=1){d=0;g=0-j<<4;while(1){h=d<<4;f=q[a+8>>2];d=d+1|0;k=Zu(a,m,d);h=h+(f+g|0)|0;f=q[h+4>>2];q[k>>2]=q[h>>2];q[k+4>>2]=f;q[k+8>>2]=q[h+8>>2];if((d|0)!=(j|0)){continue}break}}d=Qs(a,m,Yj(a,140999,1));q[d+8>>2]=3;v[d>>3]=j|0;d=q[a+8>>2]}e:{if(!b){break e}q[a+8>>2]=d+16;h=d-(e<<4)|0;f=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=f;e=(0-e<<4)+d|0;q[d+8>>2]=q[e+8>>2];q[e+8>>2]=0;e=1;if((b|0)==1){break e}while(1){k=q[a+8>>2];q[a+8>>2]=k+16;g=h+(e<<4)|0;f=q[g+4>>2];q[k>>2]=q[g>>2];q[k+4>>2]=f;q[k+8>>2]=q[g+8>>2];q[g+8>>2]=0;e=e+1|0;if((b|0)!=(e|0)){continue}break}}if(m){b=q[a+8>>2];q[a+8>>2]=b+16;q[b+8>>2]=5;q[b>>2]=m}e=q[a+32>>2]+n|0}b=q[a+20>>2];f:{if((b|0)!=q[a+36>>2]){break f}g=q[a+48>>2];if((g|0)>=20001){break b}h=q[a+40>>2];f=g<<1;g:{if((f|1)>>>0<=178956970){b=Cj(a,h,w(g,24),w(g,48));break g}b=mk(a)}q[a+48>>2]=f;q[a+40>>2]=b;q[a+36>>2]=(b+w(f,24)|0)-24;b=b+w((q[a+20>>2]-h|0)/24|0,24)|0;q[a+20>>2]=b;if((g|0)<10001){break f}Yk(a,141001,0);b=q[a+20>>2]}f=b+24|0;q[a+20>>2]=f;q[b+24>>2]=d;q[b+28>>2]=e;q[a+12>>2]=d;g=(r[l+75|0]<<4)+d|0;q[b+32>>2]=g;e=q[l+12>>2];q[a+24>>2]=e;q[b+40>>2]=c;h=0;q[b+44>>2]=0;d=q[a+8>>2];if(g>>>0>d>>>0){while(1){q[d+8>>2]=0;d=d+16|0;if(g>>>0>d>>>0){continue}break}}q[a+8>>2]=g;if(!(o[a+56|0]&1)){break c}d=e+4|0;q[a+24>>2]=d;j=a;c=q[a+68>>2];if(!(!c|!r[a+57|0])){b=q[a+32>>2];q[i+28>>2]=-1;q[i+8>>2]=0;q[i+104>>2]=(f-q[a+40>>2]|0)/24;if((q[a+28>>2]-g|0)<=320){e=q[a+44>>2];sn(a,(e|0)<20?e+20|0:e<<1)}q[q[a+20>>2]+8>>2]=q[a+8>>2]+320;o[a+57|0]=0;Mi[c|0](a,i+8|0);o[a+57|0]=1;b=q[a+32>>2]+(g-b|0)|0;q[q[a+20>>2]+8>>2]=b;q[a+8>>2]=b;d=q[a+24>>2]}q[j+24>>2]=d-4;break c}if((q[a+28>>2]-q[a+8>>2]|0)<=320){b=q[a+44>>2];sn(a,(b|0)<20?b+20|0:b<<1)}d=q[a+20>>2];h:{if((d|0)!=q[a+36>>2]){break h}f=q[a+48>>2];if((f|0)>=20001){break a}d=q[a+40>>2];e=f<<1;i:{if((e|1)>>>0<=178956970){b=Cj(a,d,w(f,24),w(f,48));break i}b=mk(a)}q[a+48>>2]=e;q[a+40>>2]=b;q[a+36>>2]=(b+w(e,24)|0)-24;d=b+w((q[a+20>>2]-d|0)/24|0,24)|0;q[a+20>>2]=d;if((f|0)<10001){break h}Yk(a,141001,0);d=q[a+20>>2]}e=d+24|0;q[a+20>>2]=e;f=q[a+32>>2];b=f+n|0;q[d+28>>2]=b;b=b+16|0;q[d+24>>2]=b;q[a+12>>2]=b;h=q[a+8>>2];q[d+40>>2]=c;c=h+320|0;q[d+32>>2]=c;j:{if(!(o[a+56|0]&1)){break j}b=q[a+68>>2];if(!b|!r[a+57|0]){break j}q[i+28>>2]=-1;q[i+8>>2]=0;q[i+104>>2]=(e-q[a+40>>2]|0)/24;if((q[a+28>>2]-h|0)<=320){e=q[a+44>>2];sn(a,(e|0)<20?e+20|0:e<<1)}q[q[a+20>>2]+8>>2]=q[a+8>>2]+320;o[a+57|0]=0;Mi[b|0](a,i+8|0);o[a+57|0]=1;e=q[a+20>>2];b=q[a+32>>2];q[e+8>>2]=b+(c-f|0);q[a+8>>2]=b+(h-f|0)}b=Mi[q[q[q[e+4>>2]>>2]+16>>2]](a)|0;if((b|0)<0){h=2;break c}Ny(a,q[a+8>>2]-(b<<4)|0);h=1}Ii=i+112|0;return h}Nj(a,5);G()}Nj(a,5);G()}function Gk(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-192|0;Ii=e;a:{if(Ck(a,b,q[79321])){b=qj(a,b);f=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=f;f=q[b+28>>2];q[c+24>>2]=q[b+24>>2];q[c+28>>2]=f;f=q[b+20>>2];q[c+16>>2]=q[b+16>>2];q[c+20>>2]=f;f=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=f;if(!d){break a}o[d|0]=0;o[d+1|0]=0;o[d+2|0]=0;o[d+3|0]=0;o[d+4|0]=0;o[d+5|0]=0;o[d+6|0]=0;o[d+7|0]=0;o[d+24|0]=0;o[d+25|0]=0;o[d+26|0]=0;o[d+27|0]=0;o[d+28|0]=0;o[d+29|0]=0;o[d+30|0]=0;o[d+31|0]=0;o[d+16|0]=0;o[d+17|0]=0;o[d+18|0]=0;o[d+19|0]=0;o[d+20|0]=0;o[d+21|0]=0;o[d+22|0]=0;o[d+23|0]=0;o[d+8|0]=0;o[d+9|0]=0;o[d+10|0]=0;o[d+11|0]=0;o[d+12|0]=0;o[d+13|0]=0;o[d+14|0]=0;o[d+15|0]=0;jr(a,d);break a}q[e+184>>2]=0;q[e+188>>2]=0;q[e+176>>2]=0;q[e+180>>2]=0;q[e+168>>2]=0;q[e+172>>2]=0;b:{if(!uk(a,b)){break b}g=uj(a,b,0);h=lI(g,e+168|0);f=h?0:g;i=(f|0)!=0;k=!h;if(!f|h){break b}h=0;k=1;j=q[e+172>>2];if(!(!j|!q[e+180>>2])){i=1;f=g;if(r[q[e+176>>2]]!=47){break b}if(j>>>0>63){break a}Pj(e+96|0,q[e+168>>2],j+1|0);c:{d:{e:{b=vn(e+96|0,e+88|0);switch(b+6|0){case 2:break d;case 0:case 6:break e;default:break c}}b=q[e+92>>2];q[c>>2]=q[e+88>>2];q[c+4>>2]=b;q[c+16>>2]=Wl(q[e+176>>2],q[e+180>>2]);q[c+20>>2]=Li;q[c+24>>2]=Wl(q[e+184>>2],q[e+188>>2]);q[c+28>>2]=Li;if(!d){break a}o[d|0]=0;o[d+1|0]=0;o[d+2|0]=0;o[d+3|0]=0;o[d+4|0]=0;o[d+5|0]=0;o[d+6|0]=0;o[d+7|0]=0;o[d+24|0]=0;o[d+25|0]=0;o[d+26|0]=0;o[d+27|0]=0;o[d+28|0]=0;o[d+29|0]=0;o[d+30|0]=0;o[d+31|0]=0;o[d+16|0]=0;o[d+17|0]=0;o[d+18|0]=0;o[d+19|0]=0;o[d+20|0]=0;o[d+21|0]=0;o[d+22|0]=0;o[d+23|0]=0;o[d+8|0]=0;o[d+9|0]=0;o[d+10|0]=0;o[d+11|0]=0;o[d+12|0]=0;o[d+13|0]=0;o[d+14|0]=0;o[d+15|0]=0;jr(a,d);break a}q[e+80>>2]=e+96;Qi(a,128265,e+80|0);break a}q[e+68>>2]=b;q[e+64>>2]=e+96;Qi(a,128805,e- -64|0);break a}i=1;f=g}q[e+120>>2]=0;q[e+124>>2]=0;q[e+112>>2]=0;q[e+116>>2]=0;q[e+104>>2]=0;q[e+108>>2]=0;q[e+96>>2]=0;q[e+100>>2]=0;o[e+96|0]=0;o[e+97|0]=0;o[e+98|0]=0;o[e+99|0]=0;o[e+100|0]=0;o[e+101|0]=0;o[e+102|0]=0;o[e+103|0]=0;o[e+120|0]=0;o[e+121|0]=0;o[e+122|0]=0;o[e+123|0]=0;o[e+124|0]=0;o[e+125|0]=0;o[e+126|0]=0;o[e+127|0]=0;o[e+112|0]=0;o[e+113|0]=0;o[e+114|0]=0;o[e+115|0]=0;o[e+116|0]=0;o[e+117|0]=0;o[e+118|0]=0;o[e+119|0]=0;o[e+104|0]=0;o[e+105|0]=0;o[e+106|0]=0;o[e+107|0]=0;o[e+108|0]=0;o[e+109|0]=0;o[e+110|0]=0;o[e+111|0]=0;jr(a,e+96|0);if(d){g=q[e+100>>2];q[d>>2]=q[e+96>>2];q[d+4>>2]=g;g=q[e+124>>2];q[d+24>>2]=q[e+120>>2];q[d+28>>2]=g;g=q[e+116>>2];q[d+16>>2]=q[e+112>>2];q[d+20>>2]=g;g=q[e+108>>2];q[d+8>>2]=q[e+104>>2];q[d+12>>2]=g}f:{if(q[a+8>>2]-q[a+12>>2]>>4>=(b|0)){if(Vi(a,b)){break f}}a=q[e+100>>2];q[c>>2]=q[e+96>>2];q[c+4>>2]=a;a=q[e+124>>2];q[c+24>>2]=q[e+120>>2];q[c+28>>2]=a;a=q[e+116>>2];q[c+16>>2]=q[e+112>>2];q[c+20>>2]=a;a=q[e+108>>2];q[c+8>>2]=q[e+104>>2];q[c+12>>2]=a;break a}g:{h:{if(i){b=c;o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;o[b+15|0]=0;if(k){h=sz(a,f,c,e+96|0)}i:{switch(h+5|0){case 1:q[e+32>>2]=f;Qi(a,128930,e+32|0);break a;case 3:q[e+48>>2]=f;Qi(a,128966,e+48|0);break a;case 5:break a;case 0:break h;default:break i}}q[e+4>>2]=h;q[e>>2]=f;Qi(a,129005,e);break a}if(!On(a,b)){break g}d=q[e+100>>2];q[c>>2]=q[e+96>>2];q[c+4>>2]=d;a=qj(a,b);b=q[a>>2];a=q[a+4>>2];q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=b;q[c+20>>2]=a;break a}q[e+16>>2]=f;Qi(a,128842,e+16|0);break a}Nk(a,b,128488)}Ii=e+192|0}function Up(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;c=1;Oza(+b);e=Lza(1)|0;d=Lza(0)|0;l=e;a:{b:{g=e;h=g&2147483647;c:{if(!(d|h)){break c}Oza(+a);j=Lza(1)|0;r=Lza(0)|0;o=j;if((j|0)==1072693248?!r:0){break c}d:{j=o&2147483647;if(!(j>>>0>2146435072|(j|0)==2146435072&(r|0)!=0|h>>>0>2146435072)){if(!d|(h|0)!=2146435072){break d}}return a+b}e:{f:{g:{h:{if((o|0)>-1){break h}p=2;if(h>>>0>1128267775){break g}if(h>>>0<1072693248){break h}e=h>>>20|0;if(h>>>0>=1094713344){f=1075-e|0;e=d>>>f|0;p=0;if((d|0)!=e<>>d|0;if((h|0)!=e<>>0>=1072693248){return(g|0)>-1?b:0}return(g|0)>-1?0:-b}if((h|0)==1072693248){if((g|0)>-1){return a}return 1/a}if((g|0)==1073741824){return a*a}if((g|0)!=1071644672|(o|0)<0){break e}return F(a)}c=y(a);if(!((j?(o&1073741823)!=1072693248:0)|r)){c=(g|0)<0?1/c:c;if((o|0)>-1){break c}if(!(j-1072693248|f)){a=c-c;return a/a}return(f|0)==1?-c:c}m=1;i:{if((o|0)>-1){break i}j:{switch(f|0){case 0:a=a-a;return a/a;case 1:break j;default:break i}}m=-1}k:{if(h>>>0>=1105199105){if(h>>>0>=1139802113){if(j>>>0<=1072693247){return(g|0)<0?I:0}return(g|0)>0?I:0}if(j>>>0<=1072693246){return(g|0)<0?m*1e+300*1e+300:m*1e-300*1e-300}if(j>>>0>=1072693249){return(g|0)>0?m*1e+300*1e+300:m*1e-300*1e-300}a=c+ -1;c=a*1.4426950216293335;k=a*1.9259629911266175e-8+a*a*(.5-a*(a*-.25+.3333333333333333))*-1.4426950408889634;Oza(+(c+k));d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();i=a-c;break k}a=c*9007199254740992;d=j>>>0<1048576;c=d?a:c;Oza(+a);e=Lza(1)|0;Lza(0)|0;f=d?e:j;g=f&1048575;e=g|1072693248;h=(f>>20)+(d?-1076:-1023)|0;f=0;l:{if(g>>>0<235663){break l}if(g>>>0<767610){f=1;break l}e=e+ -1048576|0;h=h+1|0}g=f<<3;q=v[g+218032>>3];Oza(+c);Lza(1)|0;Mza(0,Lza(0)|0);Mza(1,e|0);k=+Nza();i=v[g+218e3>>3];n=k-i;s=1/(i+k);c=n*s;Oza(+c);d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();u=a;t=a*a;w=n;Mza(0,0);Mza(1,((e>>1|536870912)+(f<<18)|0)+524288|0);n=+Nza();k=s*(w-a*n-a*(k-(n-i)));i=(c+a)*k;a=c*c;i=i+a*a*(a*(a*(a*(a*(a*.20697501780033842+.23066074577556175)+.272728123808534)+.33333332981837743)+.4285714285785502)+.5999999999999946);Oza(+(t+3+i));d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();n=u*a;c=k*a+c*(i-(a+ -3-t));Oza(+(n+c));d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();i=a*.9617967009544373;k=v[g+218016>>3]+((c-(a-n))*.9617966939259756+a*-7.028461650952758e-9);c=+(h|0);Oza(+(q+(i+k)+c));d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();i=a-c-q-i}Mza(0,0);Mza(1,l|0);q=+Nza();c=a*q;a=(k-i)*b+(b-q)*a;b=c+a;Oza(+b);f=Lza(1)|0;d=Lza(0)|0;e=f;l=d;m:{d=e;if((d|0)>=1083179008){if(l|d-1083179008){break b}if(a+8.008566259537294e-17>b-c^1){break m}break b}if((d&2147482624)>>>0<1083231232){break m}if(l|d+1064252416){break a}if(a<=b-c^1){break m}break a}f=0;l=d&2147483647;if(l>>>0>=1071644673){e=d+(1048576>>>(l>>>20|0)-1022|0)|0;l=e>>>20&2047;f=(e&1048575|1048576)>>>1043-l|0;f=(d|0)<0?0-f|0:f;Mza(0,0);Mza(1,e&-1048576>>l-1023);c=c- +Nza();Oza(+(a+c));d=Lza(1)|0;Lza(0)|0}Mza(0,0);Mza(1,d|0);b=+Nza();k=b*.6931471824645996;c=(a-(b-c))*.6931471805599453+b*-1.904654299957768e-9;a=k+c;b=a*a;b=a-b*(b*(b*(b*(b*4.1381367970572385e-8+ -16533902205465252e-22)+6613756321437934e-20)+ -.0027777777777015593)+.16666666666666602);i=a*b/(b+ -2);b=c-(a-k);a=a-(i-(b+a*b))+1;Oza(+a);d=Lza(1)|0;e=Lza(0)|0;d=(f<<20)+d|0;n:{if((d|0)<=1048575){a=Zn(a,f);break n}Mza(0,e|0);Mza(1,d|0);a=+Nza()}c=m*a}return c}return m*1e+300*1e+300}return m*1e-300*1e-300}function AB(a,b){var c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=0,o=0,r=x(0),v=x(0),y=x(0),z=0,A=0,B=0,C=x(0),D=x(0),E=0,F=0;c=Ii-128|0;Ii=c;z=1;a:{b:{c:{d:{if(!b){break d}d=q[b+140>>2];m=q[b+136>>2];e:{if(m&256){Pi(3,7319,11398,0);n=q[b+136>>2];d=q[b+140>>2];break e}p[b+144>>1]=s[b+144>>1];n=m|256;q[b+136>>2]=n;q[b+140>>2]=d}d=d&32767;m=q[a+1036>>2];if(d>>>0>=q[a+1040>>2]-m>>2>>>0){break a}if(q[m+(d<<2)>>2]!=(b|0)){break c}m=q[a+3128>>2];A=q[a+3132>>2]-m>>6;if(A>>>0<=d>>>0){break a}B=m+(d<<6)|0;o=n>>>16|0;f:{if((o|0)==32767){j=u[b+36>>2];k=u[b+40>>2];e=u[b+24>>2];f=u[b+12>>2];g=u[b>>2];n=q[b+16>>2];o=q[b+20>>2];i=u[b+4>>2];y=x(i+i);h=u[b+8>>2];r=x(h+h);l=x(i*y);v=x(h*r);h=u[b+32>>2];u[B>>2]=x(x(x(1)-l)-v)*h;d=m+(d<<6)|0;q[d+60>>2]=1065353216;u[d+56>>2]=e;q[d+48>>2]=n;q[d+52>>2]=o;u[d+44>>2]=k*x(0);e=x(g+g);D=x(x(1)-x(g*e));u[d+40>>2]=k*x(D-l);i=x(i*r);e=x(e*f);u[d+36>>2]=k*x(i-e);C=k;k=x(g*r);l=x(y*f);u[d+32>>2]=C*x(k+l);u[d+28>>2]=j*x(0);u[d+24>>2]=j*x(i+e);u[d+20>>2]=j*x(D-v);e=j;g=x(g*y);j=x(f*r);u[d+16>>2]=e*x(g-j);u[d+12>>2]=h*x(0);u[d+8>>2]=h*x(k-l);u[d+4>>2]=h*x(g+j);break f}if(o>>>0>=A>>>0){break a}o=m+(o<<6)|0;if(n&512){j=u[b+40>>2];k=u[b+36>>2];h=u[b+24>>2];r=u[b+32>>2];n=q[b+16>>2];A=q[b+20>>2];f=u[b+4>>2];i=u[b+8>>2];y=u[b+12>>2];g=u[b>>2];q[c+60>>2]=1065353216;u[c+56>>2]=h;u[c+28>>2]=k*x(0);u[c+44>>2]=j*x(0);h=x(i+i);e=x(f*h);l=x(g+g);v=x(y*l);u[c+24>>2]=k*x(e+v);u[c+36>>2]=j*x(e-v);e=x(x(1)-x(g*l));i=x(i*h);u[c+20>>2]=k*x(e-i);C=e;e=f;f=x(f+f);e=x(e*f);u[c+40>>2]=j*x(C-e);q[c+48>>2]=n;q[c+52>>2]=A;u[c+12>>2]=r*x(0);l=x(g*f);v=x(y*h);u[c+4>>2]=r*x(l+v);g=x(g*h);f=x(f*y);u[c+8>>2]=r*x(g-f);u[c+16>>2]=k*x(l-v);u[c+32>>2]=j*x(g+f);u[c>>2]=r*x(x(x(1)-e)-i);_k(c- -64|0,o,c);u[B>>2]=u[c+64>>2];d=m+(d<<6)|0;u[d+4>>2]=u[c+68>>2];u[d+8>>2]=u[c+72>>2];u[d+12>>2]=u[c+76>>2];u[d+16>>2]=u[c+80>>2];u[d+20>>2]=u[c+84>>2];u[d+24>>2]=u[c+88>>2];u[d+28>>2]=u[c+92>>2];u[d+32>>2]=u[c+96>>2];u[d+36>>2]=u[c+100>>2];u[d+40>>2]=u[c+104>>2];u[d+44>>2]=u[c+108>>2];u[d+48>>2]=u[c+112>>2];u[d+52>>2]=u[c+116>>2];u[d+56>>2]=u[c+120>>2];u[d+60>>2]=u[c+124>>2];break f}j=u[b+40>>2];k=u[b+36>>2];h=u[b+24>>2];r=u[b+32>>2];n=q[b+16>>2];A=q[b+20>>2];f=u[b+4>>2];i=u[b+8>>2];y=u[b+12>>2];g=u[b>>2];q[c+60>>2]=1065353216;u[c+56>>2]=h;u[c+28>>2]=k*x(0);u[c+44>>2]=j*x(0);h=x(i+i);e=x(f*h);l=x(g+g);v=x(y*l);u[c+24>>2]=k*x(e+v);u[c+36>>2]=j*x(e-v);e=x(x(1)-x(g*l));i=x(i*h);u[c+20>>2]=k*x(e-i);C=e;e=f;f=x(f+f);e=x(e*f);u[c+40>>2]=j*x(C-e);q[c+48>>2]=n;q[c+52>>2]=A;u[c+12>>2]=r*x(0);l=x(g*f);v=x(y*h);u[c+4>>2]=r*x(l+v);g=x(g*h);f=x(f*y);u[c+8>>2]=r*x(g-f);u[c+16>>2]=k*x(l-v);u[c+32>>2]=j*x(g+f);u[c>>2]=r*x(x(x(1)-e)-i);jo(c- -64|0,o,c);u[B>>2]=u[c+64>>2];d=m+(d<<6)|0;u[d+4>>2]=u[c+68>>2];u[d+8>>2]=u[c+72>>2];u[d+12>>2]=u[c+76>>2];u[d+16>>2]=u[c+80>>2];u[d+20>>2]=u[c+84>>2];u[d+24>>2]=u[c+88>>2];u[d+28>>2]=u[c+92>>2];u[d+32>>2]=u[c+96>>2];u[d+36>>2]=u[c+100>>2];u[d+40>>2]=u[c+104>>2];u[d+44>>2]=u[c+108>>2];u[d+48>>2]=u[c+112>>2];u[d+52>>2]=u[c+116>>2];u[d+56>>2]=u[c+120>>2];u[d+60>>2]=u[c+124>>2]}B=q[b+84>>2];o=q[B+4>>2];if(!o){break d}d=0;n=0;while(1){A=q[B>>2]+w(n,96)|0;z=q[A+16>>2];E=q[z+100>>2];m=((E&65536)>>>16|0)+d|0;if(m>>>0>t[b+152>>2]){break b}F=q[z+36>>2];if(F){o=q[a+8>>2];q[c+68>>2]=b;q[c+64>>2]=o;q[c+72>>2]=q[((q[A+20>>2]<<2)+a|0)+12>>2];z=q[z+16>>2];q[c+80>>2]=((d<<2)+b|0)+156&E<<15>>31;q[c+76>>2]=z;if(Mi[F|0](c- -64|0)|0){z=0;break d}o=q[B+4>>2]}z=1;d=m;n=n+1|0;if(n>>>0>>0){continue}break}}Ii=c+128|0;return z}J(8193,7192,1716,11467);G()}J(8018,7192,1683,11480);G()}J(12419,9962,479,9454);G()}function Gka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,v=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=x(0);b=Ii-320|0;Ii=b;d=q[a+4>>2];a:{b:{c:{d:{e:{f:{switch(q[a+8>>2]){case 0:Mi[q[74945]](q[d+88>>2],0,0,0);q[d+96>>2]=q[d+92>>2];q[d+20>>2]=q[d+16>>2];break c;case 1:n=q[a+20>>2];A=q[a>>2];t=q[a+12>>2];f=q[a+16>>2];q[b+312>>2]=0;B=q[d+84>>2];v=q[d+80>>2];i=q[(w(q[f>>2],48)+t|0)+16>>2];p=q[i+64>>2];a=Mi[q[74962]](q[q[p>>2]+16>>2])|0;y=d+92|0;e=w(w(a,q[v+12>>2]),6);l=d+100|0;c=q[d+92>>2];if(e>>>0>q[l>>2]-c>>>0){if(o[d+104|0]&1){break e}Wi(e,1,y,l,d+96|0);c=q[d+92>>2]}e=q[d+96>>2];h=e-c|0;j=(h>>>0)/(a>>>0)|0;g=h-w(a,j)|0;if(g){q[d+108>>2]=q[d+108>>2]+1;j=j+1|0;h=(e+(a-g|0)|0)-c|0}q[b+308>>2]=h;m=q[l>>2];q[b+296>>2]=208;k=q[p>>2];a=k;q[b+80>>2]=q[a+52>>2];q[b+316>>2]=(q[a+56>>2]-q[a+52>>2]|0)/48;a=q[b+316>>2];q[b+292>>2]=a>>>0<8?a:8;q[b+288>>2]=Mi[q[74962]](q[k+16>>2]);a=0;g:{if(!q[b+292>>2]){e=0;break g}while(1){g=q[b+80>>2]+w(a,48)|0;s=q[g+12>>2];e=(b+96|0)+w(a,24)|0;q[e>>2]=q[g+8>>2];q[e+4>>2]=s;q[e+8>>2]=q[g+16>>2];q[e+12>>2]=q[g+32>>2];MH(k,a,e+16|0,e+20|0);a=a+1|0;e=q[b+292>>2];if(a>>>0>>0){continue}break}}if((f|0)==(n|0)){break d}s=m-c|0;while(1){g=q[(w(q[f>>2],48)+t|0)+16>>2];h:{if(!e){break h}z=q[g+80>>2];if(!z){break h}C=q[g+76>>2];c=0;while(1){k=(b+96|0)+w(c,24)|0;a=k;D=q[a>>2];E=q[a+4>>2];a=0;i:{while(1){m=w(a,48)+C|0;if(q[m+8>>2]!=(D|0)|q[m+12>>2]!=(E|0)){a=a+1|0;if((z|0)!=(a|0)){continue}break i}break}if((a|0)<0){break i}q[k+16>>2]=q[m+36>>2];q[k+20>>2]=q[m+40>>2];e=q[b+292>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}a=q[g+96>>2];c=q[g+92>>2];F=u[d+116>>2];q[b+88>>2]=1065353216;q[b+92>>2]=1065353216;q[b+80>>2]=1065353216;q[b+84>>2]=1065353216;j:{k:{switch(fI(B,F,c,a,b+96|0,b+80|0,q[d+92>>2],s,b+308|0)-1|0){case 1:q[b+32>>2]=q[v+12>>2];q[b+36>>2]=q[64816];Pi(3,46815,47216,b+32|0);break j;case 0:break k;default:break j}}q[b+16>>2]=q[f>>2];Pi(3,46815,47323,b+16|0)}f=f+4|0;if((n|0)==(f|0)){break d}e=q[b+292>>2];continue};case 2:break f;default:break c}}a=q[d+92>>2];Mi[q[74945]](q[d+88>>2],q[d+96>>2]-a|0,a,0);a=q[d+108>>2];q[72934]=a+q[72934];q[b+72>>2]=a;q[b+76>>2]=0;q[b+56>>2]=a;q[b+60>>2]=0;a=q[d+96>>2]-q[d+92>>2]|0;q[72956]=a+q[72956];q[b+64>>2]=a;q[b+68>>2]=0;q[b+48>>2]=a;q[b+52>>2]=0;break c}J(47496,47132,493,47571);G()}a=q[b+308>>2];c=q[y>>2];if(a>>>0>q[l>>2]-c>>>0){break b}l=q[b+288>>2];q[d+96>>2]=a+c;c=q[d+20>>2];f=q[d+16>>2];n=c-f|0;e=(n|0)/304|0;g=e+1|0;if(g>>>0>(q[d+24>>2]-f|0)/304>>>0){break b}q[d+20>>2]=f+w(g,304);if(e>>>0>=(n+304|0)/304>>>0){break a}fn(c);f=q[p>>2];q[c+156>>2]=f;q[c+148>>2]=q[f+16>>2];f=q[i+72>>2];h=(a-h>>>0)/(l>>>0)|0;q[c+284>>2]=h;q[c+280>>2]=j;q[c+160>>2]=f;q[c+164>>2]=0;a=q[d+88>>2];q[c+224>>2]=1;q[c+144>>2]=a;o[c+288|0]=r[c+288|0]|1;l:{m:{n:{o:{p:{q:{a=q[i+68>>2];switch(a|0){case 4:break n;case 3:break o;case 1:case 2:break p;case 0:break q;default:break m}}q[c+232>>2]=1;q[c+236>>2]=7;break l}q[c+232>>2]=1;q[c+236>>2]=1;break l}q[c+232>>2]=4;q[c+236>>2]=7;break l}q[c+232>>2]=5;q[c+236>>2]=1;break l}q[b>>2]=a;Pi(4,46815,47428,b)}f=q[d+32>>2];a=q[d+36>>2]-f>>2;if(a>>>0<=e>>>0){break a}if(!q[(e<<2)+f>>2]){a=Fv();f=q[d+32>>2];if(e>>>0>=q[d+36>>2]-f>>2>>>0){break a}q[f+(e<<2)>>2]=a;f=q[d+32>>2];a=q[d+36>>2]-f>>2}if(a>>>0<=e>>>0){break a}a=q[(e<<2)+f>>2];q[c>>2]=a;gA(a);j=q[i+88>>2];if(j){i=q[i+84>>2];g=q[c>>2];a=0;while(1){f=i+w(a,96)|0;e=r[f+80|0];Vz(g,q[f>>2],q[f+4>>2],f+16|0,e?4:1,e?9:0);a=a+1|0;if((j|0)!=(a|0)){continue}break}}po(A,c);q[d+108>>2]=h+q[d+108>>2]}Ii=b+320|0;return}J(47113,47132,506,47188);G()}J(47406,47132,479,47417);G()}function sB(a,b,c,d,e,f,g){var h=0,i=0,j=x(0),k=0,l=x(0),m=x(0),n=0,r=0,s=0;h=Ii-144|0;Ii=h;a:{if(!a){i=-6;break a}if(!(b|c)){if(q[71500]==(d|0)&q[71501]==(e|0)){i=-4;if(q[g>>2]!=3){break a}u[a+16>>2]=u[g+8>>2];u[a+20>>2]=u[g+12>>2];u[a+24>>2]=u[g+16>>2];i=0;break a}if(q[71502]==(d|0)&q[71503]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+16>>2]=v[g+8>>3];i=0;break a}if(q[71504]==(d|0)&q[71505]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+20>>2]=v[g+8>>3];i=0;break a}if(q[71506]==(d|0)&q[71507]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+24>>2]=v[g+8>>3];i=0;break a}if(q[71526]==(d|0)&q[71527]==(e|0)){i=-4;b:{switch(q[g>>2]){case 0:j=x(v[g+8>>3]);u[a+40>>2]=j;u[a+36>>2]=j;u[a+32>>2]=j;i=0;break a;case 3:break b;default:break a}}u[a+32>>2]=u[g+8>>2];u[a+36>>2]=u[g+12>>2];u[a+40>>2]=u[g+16>>2];i=0;break a}if(q[71528]==(d|0)&q[71529]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+32>>2]=v[g+8>>3];i=0;break a}if(q[71530]==(d|0)&q[71531]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+36>>2]=v[g+8>>3];i=0;break a}if(q[71532]==(d|0)&q[71533]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+40>>2]=v[g+8>>3];i=0;break a}if(q[71508]==(d|0)&q[71509]==(e|0)){i=-4;if(q[g>>2]!=5){break a}u[a>>2]=u[g+8>>2];u[a+4>>2]=u[g+12>>2];u[a+8>>2]=u[g+16>>2];u[a+12>>2]=u[g+20>>2];i=0;break a}if(q[71510]==(d|0)&q[71511]==(e|0)){i=-4;if(q[g>>2]){break a}u[a>>2]=v[g+8>>3];i=0;break a}if(q[71512]==(d|0)&q[71513]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+4>>2]=v[g+8>>3];i=0;break a}if(q[71514]==(d|0)&q[71515]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+8>>2]=v[g+8>>3];i=0;break a}if(q[71516]==(d|0)&q[71517]==(e|0)){i=-4;if(q[g>>2]){break a}u[a+12>>2]=v[g+8>>3];i=0;break a}if(q[71518]==(d|0)&q[71519]==(e|0)){i=-4;if(q[g>>2]!=3){break a}j=u[g+12>>2];l=u[g+8>>2];m=u[g+16>>2];u[a+56>>2]=m;u[a+52>>2]=j;u[a+48>>2]=l;u[a+72>>2]=m;u[a+68>>2]=j;u[a+64>>2]=l;u[h+136>>2]=m;u[h+132>>2]=j;u[h+128>>2]=l;en(h,h+128|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2];i=0;break a}if(q[71520]==(d|0)&q[71521]==(e|0)){i=-4;if(q[g>>2]){break a}j=x(v[g+8>>3]);u[a+48>>2]=j;u[a+64>>2]=j;l=u[a+52>>2];u[a+68>>2]=l;m=u[a+56>>2];u[a+72>>2]=m;u[h+136>>2]=m;u[h+132>>2]=l;u[h+128>>2]=j;en(h,h+128|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2];i=0;break a}if(q[71522]==(d|0)&q[71523]==(e|0)){i=-4;if(q[g>>2]){break a}j=x(v[g+8>>3]);u[a+52>>2]=j;u[a+68>>2]=j;l=u[a+48>>2];u[a+64>>2]=l;m=u[a+56>>2];u[a+72>>2]=m;u[h+136>>2]=m;u[h+132>>2]=j;u[h+128>>2]=l;en(h,h+128|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2];i=0;break a}i=-1;if((d|0)!=q[71524]|(e|0)!=q[71525]){break a}i=-4;if(q[g>>2]){break a}j=x(v[g+8>>3]);u[a+56>>2]=j;u[a+72>>2]=j;l=u[a+48>>2];u[a+64>>2]=l;m=u[a+52>>2];u[a+68>>2]=m;u[h+136>>2]=j;u[h+132>>2]=m;u[h+128>>2]=l;en(h,h+128|0);u[a>>2]=u[h>>2];u[a+4>>2]=u[h+4>>2];u[a+8>>2]=u[h+8>>2];u[a+12>>2]=u[h+12>>2];i=0;break a}i=-5;k=q[a+84>>2];r=q[k+4>>2];if(!r){break a}n=q[k>>2];k=0;while(1){s=n+w(k,96)|0;if(q[s>>2]!=(b|0)|q[s+4>>2]!=(c|0)){k=k+1|0;if((r|0)!=(k|0)){continue}break a}break}b=k&65535;c=q[(n+w(b,96)|0)+16>>2];if(!q[c+88>>2]){i=-1;break a}k=0;if(o[c+102|0]&1){c:{if(!b){i=0;break c}i=0;while(1){i=(p[q[(n+w(k,96)|0)+16>>2]+102>>1]&1)+i|0;k=k+1|0;if((b|0)!=(k|0)){continue}break}}k=((i<<2)+a|0)+156|0}i=Ui(h+32|0,0,72);q[h>>2]=q[c+16>>2];b=q[(q[a+80>>2]+(q[(n+w(b,96)|0)+20>>2]<<2)|0)+12>>2];q[h+24>>2]=k;q[h+16>>2]=d;q[h+20>>2]=e;q[h+8>>2]=a;q[h+4>>2]=b;Ti(i,g,72);a=q[f+12>>2];q[h+112>>2]=q[f+8>>2];q[h+116>>2]=a;a=q[f+4>>2];q[h+104>>2]=q[f>>2];q[h+108>>2]=a;i=Mi[q[c+88>>2]](h)|0}Ii=h+144|0;return i}function PD(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;h=Ii-192|0;Ii=h;i=q[a>>2];f=q[a+60>>2];d=q[f+4>>2];g=d+1|0;e=q[f+8>>2];a:{if(g>>>0<=e>>>0){e=q[f>>2];break a}if(e>>>0>=2147483646){Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+104>>2]=141590;q[h+100>>2]=d;q[h+96>>2]=h+112;oj(e,141567,h+96|0);Nj(q[a+52>>2],3);e=q[f+8>>2]}d=q[a+52>>2];g=e<<1;b:{if((g|0)!=-2){e=Cj(d,q[f>>2],e,g);break b}e=mk(d)}q[f+8>>2]=g;q[f>>2]=e;d=q[f+4>>2];g=d+1|0}q[f+4>>2]=g;o[d+e|0]=i;d=q[a+56>>2];g=q[d>>2];q[d>>2]=g-1;e=a;c:{if(g){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;d=r[d|0];break c}d=Hk(d)}q[e>>2]=d;d:{switch(d-10|0){case 0:case 3:cv(a);break;default:break d}}j=b?141670:141693;while(1){e:{f:{g:{h:{i:{j:{i=q[a>>2];switch(i+1|0){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 12:case 13:break e;case 11:case 14:break f;case 0:break i;default:break j}}switch(i-91|0){case 2:break g;case 0:break h;default:break e}}Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+40>>2]=j;q[h+36>>2]=d;q[h+32>>2]=h+112;e=oj(e,141567,h+32|0);d=q[a+52>>2];q[h+20>>2]=141549;q[h+16>>2]=e;oj(d,141577,h+16|0);Nj(q[a+52>>2],3);continue}if((tu(a)|0)!=(c|0)){continue}i=q[a>>2];f=q[a+60>>2];d=q[f+4>>2];g=d+1|0;e=q[f+8>>2];k:{if(g>>>0<=e>>>0){e=q[f>>2];break k}if(e>>>0>=2147483646){Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+56>>2]=141590;q[h+52>>2]=d;q[h+48>>2]=h+112;oj(e,141567,h+48|0);Nj(q[a+52>>2],3);e=q[f+8>>2]}d=q[a+52>>2];g=e<<1;l:{if((g|0)!=-2){e=Cj(d,q[f>>2],e,g);break l}e=mk(d)}q[f+8>>2]=g;q[f>>2]=e;d=q[f+4>>2];g=d+1|0}q[f+4>>2]=g;o[d+e|0]=i;d=q[a+56>>2];g=q[d>>2];q[d>>2]=g-1;e=a;m:{if(g){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;d=r[d|0];break m}d=Hk(d)}q[e>>2]=d;if(c){continue}gm(a,141717,91);continue}if((tu(a)|0)!=(c|0)){continue}i=q[a>>2];f=q[a+60>>2];d=q[f+4>>2];g=d+1|0;e=q[f+8>>2];n:{if(g>>>0<=e>>>0){e=q[f>>2];break n}if(e>>>0>=2147483646){Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+72>>2]=141590;q[h+68>>2]=d;q[h+64>>2]=h+112;oj(e,141567,h- -64|0);Nj(q[a+52>>2],3);e=q[f+8>>2]}d=q[a+52>>2];g=e<<1;o:{if((g|0)!=-2){e=Cj(d,q[f>>2],e,g);break o}e=mk(d)}q[f+8>>2]=g;q[f>>2]=e;d=q[f+4>>2];g=d+1|0}q[f+4>>2]=g;o[d+e|0]=i;d=q[a+56>>2];g=q[d>>2];q[d>>2]=g-1;e=a;p:{if(g){f=d;d=q[d+4>>2];q[f+4>>2]=d+1;d=r[d|0];break p}d=Hk(d)}q[e>>2]=d;if(b){e=q[a+52>>2];c=c+2|0;d=q[a+60>>2];c=Yj(e,c+q[d>>2]|0,q[d+4>>2]-(c<<1)|0);a=Qs(e,q[q[a+48>>2]+4>>2],c);if(!q[a+8>>2]){q[a+8>>2]=1;q[a>>2]=1}q[b>>2]=c}Ii=h+192|0;return}f=q[a+60>>2];d=q[f+4>>2];g=d+1|0;e=q[f+8>>2];q:{if(g>>>0<=e>>>0){e=q[f>>2];break q}if(e>>>0>=2147483646){Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+88>>2]=141590;q[h+84>>2]=d;q[h+80>>2]=h+112;oj(e,141567,h+80|0);Nj(q[a+52>>2],3);e=q[f+8>>2]}d=q[a+52>>2];g=e<<1;r:{if((g|0)!=-2){e=Cj(d,q[f>>2],e,g);break r}e=mk(d)}q[f+8>>2]=g;q[f>>2]=e;d=q[f+4>>2];g=d+1|0}q[f+4>>2]=g;o[d+e|0]=10;cv(a);if(b){continue}q[q[a+60>>2]+4>>2]=0;continue}if(b){f=q[a+60>>2];g=q[f+4>>2];e=g+1|0;d=q[f+8>>2];s:{if(e>>>0<=d>>>0){d=q[f>>2];break s}if(d>>>0>=2147483646){Xk(h+112|0,q[a+64>>2]+16|0,80);e=q[a+52>>2];d=q[a+4>>2];q[h+8>>2]=141590;q[h+4>>2]=d;q[h>>2]=h+112;oj(e,141567,h);Nj(q[a+52>>2],3);d=q[f+8>>2]}e=q[a+52>>2];g=d<<1;t:{if((g|0)!=-2){d=Cj(e,q[f>>2],d,g);break t}d=mk(e)}q[f+8>>2]=g;q[f>>2]=d;g=q[f+4>>2];e=g+1|0}q[f+4>>2]=e;o[d+g|0]=i;e=q[a+56>>2];d=q[e>>2];q[e>>2]=d-1;if(d){d=e;e=q[e+4>>2];q[d+4>>2]=e+1;q[a>>2]=r[e|0];continue}q[a>>2]=Hk(e);continue}e=q[a+56>>2];d=q[e>>2];q[e>>2]=d-1;if(d){d=e;e=q[e+4>>2];q[d+4>>2]=e+1;q[a>>2]=r[e|0]}else{q[a>>2]=Hk(e)}continue}}function NO(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-16|0;Ii=d;e=c;f=q[a+32>>2];a:{b:{if(!(q[c+12>>2]?0:!((f|0)==(b|0)|!f))){q[d+8>>2]=0;b=q[c+16>>2];if(b){break a}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;break b}q[d+8>>2]=q[f+12>>2]+1;b=q[c+16>>2];if(b){break a}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(b){break a}b=Mi[q[c+4>>2]](q[c>>2],f+16|0,q[d+8>>2],q[c+8>>2])|0}q[e+16>>2]=b}q[d+8>>2]=q[a+60>>2];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}q[d+8>>2]=q[a+64>>2];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}o[d+8|0]=r[a+72|0];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;q[c+16>>2]=b}o[d+8|0]=r[a+73|0];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;q[c+16>>2]=b}o[d+8|0]=r[a+74|0];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;q[c+16>>2]=b}o[d+8|0]=r[a+75|0];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;q[c+16>>2]=b}e=q[a+12>>2];f=q[a+44>>2];q[d+8>>2]=f;c:{d:{if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(!b){break d}}h=q[a+40>>2];q[d+8>>2]=h;break c}b=Mi[q[c+4>>2]](q[c>>2],e,f<<2,q[c+8>>2])|0;q[c+16>>2]=b;h=q[a+40>>2];q[d+8>>2]=h;if(b){break c}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}if((h|0)>=1){while(1){i=q[a+8>>2]+(g<<4)|0;e=q[i+8>>2];o[d+8|0]=e;f=c;if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;q[c+16>>2]=b;e=q[i+8>>2]}e:{f:{g:{switch(e-1|0){case 0:o[d+8|0]=q[i>>2];if(b){break e}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,1,q[c+8>>2])|0;break f;case 2:v[d+8>>3]=v[i>>3];if(b){break e}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,8,q[c+8>>2])|0;break f;case 3:break g;default:break e}}e=q[i>>2];if(!e){q[d+8>>2]=0;if(b){break e}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;break f}q[d+8>>2]=q[e+12>>2]+1;if(b){break e}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(b){break e}b=Mi[q[c+4>>2]](q[c>>2],e+16|0,q[d+8>>2],q[c+8>>2])|0}q[f+16>>2]=b}g=g+1|0;if((h|0)!=(g|0)){continue}break}}e=q[a+52>>2];q[d+8>>2]=e;if(!b){q[c+16>>2]=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])}if((e|0)>=1){b=0;while(1){NO(q[q[a+16>>2]+(b<<2)>>2],q[a+32>>2],c);b=b+1|0;if((e|0)!=(b|0)){continue}break}}g=0;e=q[a+20>>2];g=q[c+12>>2]?g:q[a+48>>2];q[d+8>>2]=g;b=q[c+16>>2];h:{if(b){break h}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(b){break h}b=Mi[q[c+4>>2]](q[c>>2],e,g<<2,q[c+8>>2])|0;q[c+16>>2]=b}h=0;h=q[c+12>>2]?h:q[a+56>>2];q[d+8>>2]=h;if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}if((h|0)>=1){g=0;while(1){e=c;i=w(g,12);f=q[i+q[a+24>>2]>>2];i:{j:{if(!f){q[d+8>>2]=0;if(b){break i}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;break j}q[d+8>>2]=q[f+12>>2]+1;if(b){break i}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(b){break i}b=Mi[q[c+4>>2]](q[c>>2],f+16|0,q[d+8>>2],q[c+8>>2])|0}q[e+16>>2]=b}e=q[a+24>>2];q[d+8>>2]=q[(e+i|0)+4>>2];f=d;if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;e=q[a+24>>2]}q[f+8>>2]=q[(e+i|0)+8>>2];if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}g=g+1|0;if((h|0)!=(g|0)){continue}break}}f=0;f=q[c+12>>2]?f:q[a+36>>2];q[d+8>>2]=f;if(!b){b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b}if((f|0)>=1){g=0;while(1){e=c;h=q[q[a+28>>2]+(g<<2)>>2];k:{l:{if(!h){q[d+8>>2]=0;if(b){break k}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;break l}q[d+8>>2]=q[h+12>>2]+1;if(b){break k}b=Mi[q[c+4>>2]](q[c>>2],d+8|0,4,q[c+8>>2])|0;q[c+16>>2]=b;if(b){break k}b=Mi[q[c+4>>2]](q[c>>2],h+16|0,q[d+8>>2],q[c+8>>2])|0}q[e+16>>2]=b}g=g+1|0;if((f|0)!=(g|0)){continue}break}}Ii=d+16|0}function gE(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=Ii-368|0;Ii=d;f=q[a+68>>2];h=q[a+84>>2];p=q[a+64>>2];q[h+76>>2]=q[p+124>>2];q[h+208>>2]=q[a+20>>2];c=-28928;s=q[f+1120>>2];l=EX(q[s+8>>2]);a:{if(!l){break a}b=q[s+12>>2]-3|0;b:{if(b>>>0<=5){g=q[(b<<2)+263e3>>2];break b}g=0}if(!g){break a}b=f;k=q[a+20>>2];c:{if((k|0)<=2){q[f+1116>>2]=1398;c=1400;k=1399;break c}c=-27648;if((k|0)!=3){break a}if(q[s+12>>2]==7){q[f+1116>>2]=1401;c=1403;k=1402;break c}q[f+1116>>2]=1404;c=1406;k=1405}q[b+1112>>2]=k;q[f+1108>>2]=c;if(!q[f+2252>>2]){b=q[a+68>>2];d:{if(q[b+2272>>2]!=1){b=f+1128|0;c=64;k=181200;break d}Mi[q[b+1108>>2]](a,d);b=d;if(q[a+20>>2]!=3){c=36;k=181214;break d}c=q[s+12>>2]==7?48:32;k=181214}e=f+1192|0;c=Mi[q[f+1116>>2]](e,q[f+1124>>2],k,b,c,p+48|0,48)|0;if(c){break a}Mi[q[65677]](e,0,1060)|0}m=f+1184|0;b=m;c=q[b+4>>2];w=q[b>>2];q[d+360>>2]=w;q[d+364>>2]=c;e=f+1176|0;i=q[e+4>>2];x=q[e>>2];q[d+352>>2]=x;q[d+356>>2]=i;j=f+1168|0;b=j;t=q[b+4>>2];y=q[b>>2];q[d+344>>2]=y;q[d+348>>2]=t;k=f+1160|0;b=k;z=q[b+4>>2];A=q[b>>2];q[d+336>>2]=A;q[d+340>>2]=z;u=f+1152|0;b=u;n=q[b+4>>2];q[d+328>>2]=q[b>>2];q[d+332>>2]=n;n=f+1144|0;b=n;v=q[b+4>>2];q[d+320>>2]=q[b>>2];q[d+324>>2]=v;b=q[f+1132>>2];q[d+304>>2]=q[f+1128>>2];q[d+308>>2]=b;b=f+1136|0;v=q[b+4>>2];q[d+312>>2]=q[b>>2];q[d+316>>2]=v;q[f+1128>>2]=A;q[f+1132>>2]=z;q[b>>2]=y;q[b+4>>2]=t;q[n>>2]=x;q[n+4>>2]=i;q[u>>2]=w;q[u+4>>2]=c;c=q[d+308>>2];b=k;i=q[d+304>>2];o[b|0]=i;o[b+1|0]=i>>>8;o[b+2|0]=i>>>16;o[b+3|0]=i>>>24;o[b+4|0]=c;o[b+5|0]=c>>>8;o[b+6|0]=c>>>16;o[b+7|0]=c>>>24;b=j;j=q[d+316>>2];c=q[d+312>>2];o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=c>>>16;o[b+3|0]=c>>>24;o[b+4|0]=j;o[b+5|0]=j>>>8;o[b+6|0]=j>>>16;o[b+7|0]=j>>>24;b=e;e=q[d+324>>2];j=q[d+320>>2];o[b|0]=j;o[b+1|0]=j>>>8;o[b+2|0]=j>>>16;o[b+3|0]=j>>>24;o[b+4|0]=e;o[b+5|0]=e>>>8;o[b+6|0]=e>>>16;o[b+7|0]=e>>>24;b=m;e=q[d+332>>2];m=q[d+328>>2];o[b|0]=m;o[b+1|0]=m>>>8;o[b+2|0]=m>>>16;o[b+3|0]=m>>>24;o[b+4|0]=e;o[b+5|0]=e>>>8;o[b+6|0]=e>>>16;o[b+7|0]=e>>>24;Mi[q[65677]](d+304|0,0,64)|0;m=p+48|0;j=f+1128|0;c=Mi[q[f+1116>>2]](m,48,181237,j,64,d+48|0,256)|0;if(c){break a}c=-27648;e=q[l+4>>2];if(e>>>0>10){break a}t=q[l+8>>2];b=1<>2]:0)&255;e=q[p+120>>2]==1?10:b;q[h+12>>2]=e;i=q[l+16>>2];q[h+4>>2]=i;if(q[l+4>>2]==7){q[h>>2]=e;break f}c=q[l+24>>2];g=c+e|0;g=q[p+124>>2]!=1?g-((e>>>0)%(c>>>0)|0)|0:g;q[h>>2]=g;c=-27648;g:{switch(q[a+20>>2]){case 0:case 1:break f;case 2:case 3:break g;default:break e}}q[h>>2]=g+i;break f}b=0;q[h+12>>2]=0;i=12;g=r[s+36|0];e=(e|0)==10?12:4;q[h+8>>2]=e;q[h+4>>2]=12;g=g&2?8:16;q[h+16>>2]=g;q[h>>2]=(g-e|0)+12}c=-27648;if(o[q[a>>2]+184|0]&1){break e}s=(d+48|0)+(b<<1)|0;e=t>>>3|0;p=s+e|0;t=e+p|0;g=q[h+8>>2];g=g?g:i;Ti(h+20|0,t,g);Ti(h+36|0,g+t|0,g);if(q[a+20>>2]<1){break e}if(b){ep(h+52|0,d+48|0,b);ep(h- -64|0,(d+48|0)+b|0,b)}c=q[a>>2];i=q[c+68>>2];if(i){Mi[i|0](q[c+76>>2],m,d+48|0,b,e,g)|0;c=q[a>>2]}i=q[c+72>>2];if(i){u=q[c+76>>2];c=d+48|0;a=j;f=q[f+1116>>2];n=2;h:{if((f|0)==1398){break h}n=3;if((f|0)==1401){break h}n=((f|0)==1404)<<2}Mi[i|0](u,m,c,b,e,g,k,a,n)|0}a=h+80|0;c=Ku(a,l);if(c){break e}b=h+144|0;c=Ku(b,l);if(c){break e}c=Lu(a,s,q[l+8>>2],1);if(c){break e}c=Lu(b,p,q[l+8>>2],0);if(c){break e}c=0;if(q[l+4>>2]!=2){break e}c=zy(a,4);if(c){break e}c=zy(b,4)}Mi[q[65677]](d+48|0,0,256)|0;Mi[q[65677]](j,0,64)|0}Ii=d+368|0;return c}function T6(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-1216|0;Ii=c;q[c+1208>>2]=0;q[c+1212>>2]=0;d=ur(24704,c+1208|0);a:{if(d){q[c+164>>2]=d;q[c+160>>2]=24704;Pi(5,24640,24714,c+160|0);break a}j=$i(7400);f=Ui(j,0,7400);d=q[c+1212>>2];q[f+5168>>2]=q[c+1208>>2];q[f+5172>>2]=d;e=f+5176|0;if(iz(b,e)){q[c+144>>2]=b;Pi(4,24640,24756,c+144|0);Qo(q[c+1208>>2],q[c+1212>>2]);b:{if(o[f+7380|0]&1){break b}a=q[f+7368>>2];if(!a){break b}Ni(a)}c:{if(o[f+5160|0]&1){break c}a=q[f+5148>>2];if(!a){break c}Ni(a)}Ni(f);j=0;break a}q[f+7384>>2]=0;h=f+5316|0;i=f+5184|0;d:{e:{f:{if(Ej(e,24780,5)){break f}d=kq(Oi(24780),Li);if(!d){break f}if(!(Mi[q[d+8>>2]](e)|0)){break f}d=or(d,e,0,c+1204|0);if(!d){break e}q[c+140>>2]=h;q[c+136>>2]=i;q[c+132>>2]=e;q[c+128>>2]=d;Pi(4,24640,24811,c+128|0)}g:{if(Ej(e,24785,6)){break g}d=kq(Oi(24780),Li);if(!d){break g}if(!(Mi[q[d+8>>2]](e)|0)){break g}d=or(d,e,0,c+1204|0);if(!d){break e}q[c+124>>2]=h;q[c+120>>2]=i;q[c+116>>2]=e;q[c+112>>2]=d;Pi(4,24640,24811,c+112|0)}h:{if((r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))!=1751347809|(r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24))!=6649449){break h}d=kq(Oi(24791),Li);if(!d){break h}if(!(Mi[q[d+8>>2]](e)|0)){break h}d=or(d,e,0,c+1204|0);g=24791;if(!d){break d}q[c+108>>2]=h;q[c+104>>2]=i;q[c+100>>2]=e;q[c+96>>2]=d;Pi(4,24640,24811,c+96|0)}i:{if(Ej(e,24799,7)){break i}d=kq(Oi(24791),Li);if(!d){break i}if(!(Mi[q[d+8>>2]](e)|0)){break i}d=or(d,e,0,c+1204|0);g=24791;if(!d){break d}q[c+92>>2]=h;q[c+88>>2]=i;q[c+84>>2]=e;q[c+80>>2]=d;Pi(4,24640,24811,c+80|0)}j:{if(Ej(e,24806,5)){break j}d=kq(Oi(24806),Li);if(!d){break j}if(!(Mi[q[d+8>>2]](e)|0)){break j}d=or(d,e,0,c+1204|0);g=24806;if(!d){break d}q[c+76>>2]=h;q[c+72>>2]=i;q[c+68>>2]=e;q[c+64>>2]=d;Pi(4,24640,24811,c- -64|0)}q[c>>2]=b;Pi(3,24640,24870,c);tH(f);Qo(q[c+1208>>2],q[c+1212>>2]);j=0;break a}k=1;g=24780}d=g;e=q[f+7384>>2];if(!e){e=B6(q[c+1204>>2]);q[f+7384>>2]=e}Nz(e,24864,q[c+1204>>2],-10,0);if(!dj(24791,d)){q[f+7392>>2]=q[c+1204>>2]}k:{if(k){break k}e=hj(h);d=c-(e+16&-16)|0;Ii=d;Pj(d,h,e+1|0);e=wm(d,47);l:{if(e){o[e|0]=0;break l}o[d|0]=0}yp(d,q[57740],c+176|0);if(!bm(c+176|0)){break k}q[f+7364>>2]=Pk(c+176|0)}d=q[f+7392>>2];m:{if(!d){break m}h=q[q[d>>2]+20>>2];g=-1;n:{if(!h){break n}g=Mi[h|0](q[d+4>>2],c+1204|0)|0}if(g){break m}if($6(q[c+1204>>2],c+176|0)){break m}w6(q[f+7384>>2],c+176|0)}q[c+48>>2]=b;Pi(0,24640,24922,c+48|0);q[f+5136>>2]=0;d=q[a>>2];b=$i(32);q[b+16>>2]=0;q[b+20>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+20>>2]=-1;q[f>>2]=b;g=b;b=w(d,3)>>>2|0;e=b?b:1;OI(g,e,d);b=$i(32);q[b+16>>2]=0;q[b+20>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+20>>2]=-1;q[f+4>>2]=b;rA(b,e,q[a>>2]);o:{if(o[a+4|0]&1){b=$i(32);q[b+16>>2]=0;q[b+20>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+20>>2]=-1;q[f+8>>2]=b;jJ(b,e,q[a>>2]);b=$i(16);q[b>>2]=0;q[b+4>>2]=0;d=b+8|0;q[d>>2]=0;q[d+4>>2]=0;q[f+12>>2]=b;Wi(256,8,b,d,b+4|0);break o}q[f+8>>2]=0;q[f+12>>2]=0}q[f+7388>>2]=0;b=q[a+28>>2];p:{if(!b){break p}d=q[a+12>>2];if(!d){break p}e=q[a+20>>2];if(!e){break p}q[c+176>>2]=0;a=r6(q[a+24>>2],b,q[a+8>>2],d,q[a+16>>2],e,c+176|0);if(a){q[c+32>>2]=a;q[c+176>>2]=0;Pi(4,24640,26180,c+32|0);break p}a=f+7388|0;b=s6(kq(Oi(24791),Li),q[c+176>>2],a);if(b){q[a>>2]=0;q[c+16>>2]=b;Pi(4,24640,26240,c+16|0);break p}Nz(q[f+7384>>2],26276,q[f+7388>>2],-5,0)}q[f+5140>>2]=Wj()}Ii=c+1216|0;return j}function Ama(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=0,h=0,i=x(0),j=x(0),k=0,l=x(0),m=x(0),n=x(0),v=x(0),z=x(0),A=x(0),B=x(0),D=x(0),E=0,F=x(0),H=0,I=x(0),K=0,L=x(0),M=x(0);c=Ii-160|0;Ii=c;e=q[q[a+12>>2]>>2];a:{b:{g=q[a+16>>2];d=g;b=q[d+64>>2];k=q[61414];d=q[d+68>>2];c:{if((b|0)==q[k+8>>2]&(d|0)==q[k+12>>2]){b=q[g+96>>2];d=q[g+100>>2];d:{h=q[q[e+156>>2]+4>>2];k=q[h+8>>2];e:{if(!k){break e}E=q[h+4>>2];h=0;while(1){H=E+(h<<5)|0;if(q[H+16>>2]!=(b|0)|q[H+20>>2]!=(d|0)){h=h+1|0;if((k|0)!=(h|0)){continue}break e}break}if((h|0)!=-1){break d}}a=aj(b,d);b=q[q[61414]+4>>2];q[c>>2]=a;q[c+4>>2]=b;Pi(4,55056,55167,c);h=-1e3;break c}b=q[e+96>>2];Aw(c+48|0,b);B=u[c+80>>2];if(B==x(0)){break b}m=u[c+84>>2];if(m==x(0)){break b}F=u[c+88>>2];if(F==x(0)){break b}z=u[c+56>>2];l=u[c+64>>2];f=u[c+60>>2];D=u[c+68>>2];i=u[c+48>>2];n=u[c+72>>2];v=x(x(x(z*l)-x(f*D))-x(i*n));j=u[c+52>>2];A=x(x(z*n)+x(x(i*l)+x(j*D)));m=x(x(1)/m);I=x(x(x(i*D)-x(f*n))-x(j*l));l=x(x(x(j*n)-x(f*l))-x(z*D));M=x(m*x(x(x(x(f*v)-x(j*A))+x(i*I))-x(z*l)));I=x(x(x(z*v)+x(x(f*l)-x(i*A)))-x(j*I));D=x(x(1)/B);l=u[g+120>>2];n=u[g+116>>2];v=u[g+112>>2];A=x(-j);f:{if((q[b+136>>2]&512)>>>9|0){n=x(m*n);v=x(D*v);l=x(x(x(1)/F)*l);m=x(x(x(f*n)-x(z*v))+x(i*l));B=x(x(x(n*A)-x(i*v))-x(z*l));A=x(x(f*m)-x(j*B));L=x(z*m);m=x(x(z*n)+x(x(f*v)-x(j*l)));F=j;j=x(x(j*v)+x(x(f*l)-x(i*n)));f=x(x(L+x(x(f*m)-x(i*B)))-x(F*j));B=x(i*j);break f}n=x(m*n);v=x(D*v);m=x(x(i*l)+x(x(f*n)-x(z*v)));A=x(x(x(n*A)-x(i*v))-x(z*l));B=x(x(f*m)-x(j*A));L=x(z*m);m=x(x(z*n)+x(x(f*v)-x(j*l)));F=j;j=x(x(j*v)+x(x(f*l)-x(i*n)));f=x(x(L+x(x(f*m)-x(i*A)))-x(F*j));A=x(i*j)}f=x(x(D*I)+f);E=q[g+136>>2];d=q[e+156>>2];H=q[d+40>>2];i=x(M+x(x(A+B)-x(z*m)));b=q[e+152>>2];if(!b){b=q[d>>2]}k=q[b+64>>2];i=x(C(x(i*x(x(1)/x(t[k+24>>2])))));g:{if(x(y(i))>2])))));i:{if(x(y(f))>2]-q[d+36>>2]|0)|0;j:{if((k|0)<0){break j}b=(E-H|0)+b|0;if((b|0)<0){break j}E=q[d+28>>2];if((E|0)<=(k|0)){break j}d=q[d+32>>2]&2147483647;if((d|0)>(b|0)){break h}}Pi(4,55056,55217,0);h=-1e3;break c}d=k+w(E,b+w(d,h)|0)|0;g=q[g+128>>2]-1|0;p[q[e+100>>2]+(d<<1)>>1]=g;d=d+q[e+104>>2]|0;o[d|0]=r[d|0]&248;d=q[e+108>>2];K=q[e+112>>2]-d|0;e=w(s[e+160>>1],b>>>5|0)+(k>>>5|0)|0;if(K>>>0<=e>>>0){break a}e=d+e|0;o[e|0]=r[e|0]|1;q[c+136>>2]=k;q[c+128>>2]=h;q[c+140>>2]=g;q[c+132>>2]=b;e=q[60558];b=e;g=q[b+8>>2];d=q[b+12>>2];b=q[a+16>>2];k=q[b+52>>2];h=c- -64|0;q[h>>2]=q[b+48>>2];q[h+4>>2]=k;h=q[b+44>>2];q[c+56>>2]=q[b+40>>2];q[c+60>>2]=h;h=q[b+36>>2];q[c+48>>2]=q[b+32>>2];q[c+52>>2]=h;q[c+72>>2]=0;q[c+76>>2]=0;h=0;b=vk(b+32|0,c+48|0,g,d,0,e,c+128|0,28);if(!b){break c}a=q[a+16>>2];q[c+16>>2]=q[q[60558]+4>>2];q[c+20>>2]=b;gn(a,55282,c+16|0);h=-1e3;break c}a=q[61436];if((b|0)==q[a+8>>2]&(d|0)==q[a+12>>2]){a=q[e+144>>2];if(!a){a=sq();q[e+144>>2]=a}d=q[g+96>>2];k=q[g+100>>2];b=q[e+148>>2];if(!b){b=q[q[e+156>>2]+24>>2]}b=q[b>>2];u[c+32>>2]=u[g+112>>2];u[c+36>>2]=u[g+116>>2];u[c+40>>2]=u[g+120>>2];u[c+44>>2]=u[g+124>>2];Fr(a,b,d,k,0,0,Gp(c+48|0,c+32|0));lw(e);break c}a=q[61454];if((b|0)==q[a+8>>2]&(d|0)==q[a+12>>2]){a=q[e+144>>2];if(!a){break c}ow(a,q[g+96>>2],q[g+100>>2]);break c}a=q[57289];if((b|0)==q[a+8>>2]&(d|0)==q[a+12>>2]){o[e+166|0]=r[e+166|0]|1;break c}a=q[57290];if(q[a+8>>2]!=(b|0)|q[a+12>>2]!=(d|0)){break c}o[e+166|0]=r[e+166|0]&254}Ii=c+160|0;return h|0}J(55814,55927,281,55987);G()}J(55728,55585,479,55717);G()}function Hm(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=0,p=0,q=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0;t=Ii+ -64|0;Ii=t;if(r[300417]){u=f-21>>>0<9;a:{if(j){s=u^1;break a}if(u){j=h;break a}s=1;if((f|0)!=15){j=b;break a}j=h+7>>>3|0}b:{if(w(b,c)<<4>>>0>e>>>0){break b}c:{if((f&-2)!=6){if(c){break c}n=1;break b}if((f|0)==7){fwa(d,a,b,c);n=1;break b}gwa(d,a,b,c);n=1;break b}F=k?k:s?k:i;H=j<<2;C=j<<1;I=w(g,j);while(1){d:{if(!b){break d}e=A<<2;u=F-e|0;B=w(e,j);h=w(A,I)+a|0;s=0;D=1;e:{while(1){f:{g:{h:{i:{j:{k:{l:{m:{switch(f|0){case 30:e=r[d+4|0]|r[d+5|0]<<8|(r[d+6|0]<<16|r[d+7|0]<<24);i=r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24);o[h|0]=i;o[h+1|0]=i>>>8;o[h+2|0]=i>>>16;o[h+3|0]=i>>>24;o[h+4|0]=e;o[h+5|0]=e>>>8;o[h+6|0]=e>>>16;o[h+7|0]=e>>>24;e=r[d+12|0]|r[d+13|0]<<8|(r[d+14|0]<<16|r[d+15|0]<<24);i=r[d+8|0]|r[d+9|0]<<8|(r[d+10|0]<<16|r[d+11|0]<<24);o[h+8|0]=i;o[h+9|0]=i>>>8;o[h+10|0]=i>>>16;o[h+11|0]=i>>>24;o[h+12|0]=e;o[h+13|0]=e>>>8;o[h+14|0]=e>>>16;o[h+15|0]=e>>>24;break g;case 2:if(rwa(d,h)){break g}break f;case 3:if(qwa(d,h)){break g}break f;case 4:l=(l|0)>0?l:0;if(pwa(d,h,l)){break g}break f;case 5:l=(l|0)>0?l:0;m=(m|0)<0?3:m;if(owa(d,h,l,m)){break g}break f;case 8:case 9:if(mwa(d,h)){break g}break f;case 12:if(swa(d,h)){break g}break f;case 18:l=(l|0)>0?l:0;if(jwa(d,h,l)){break g}break f;case 19:l=(l|0)>0?l:0;m=(m|0)<0?3:m;if(iwa(d,h,l,m)){break g}break f;case 22:z=Aq(d,t);if((g|0)!=4){break l}y=(u|0)>4?4:u;e=s<<2;i=j-e|0;q=(i|0)>4?4:i;if(!(!y|!q)){e=(e+B<<2)+a|0;k=0;while(1){i=0;while(1){n=i<<2;p=n+((k<<4)+t|0)|0;o[e+n|0]=r[p|0];o[(n|1)+e|0]=r[p+1|0];o[(n|2)+e|0]=r[p+2|0];o[(n|3)+e|0]=r[p+3|0];i=i+1|0;if((q|0)!=(i|0)){continue}break}e=e+H|0;k=k+1|0;if((y|0)!=(k|0)){continue}break}}if(z){break g}break f;case 29:break h;case 0:break j;case 1:break k;case 24:case 25:break m;default:break i}}z=Aq(d,t);if((g|0)==2){e=s<<2;i=j-e|0;k=(i|0)>4?4:i;y=(u|0)>4?4:u;if(y){e=(e+B<<1)+a|0;i=0;while(1){n:{if(!k){break n}n=0;if((f|0)==24){while(1){p=((i<<4)+t|0)+(n<<2)|0;q=w(r[p|0],31)+128|0;v=n<<1;x=w(r[p+2|0],31)+128|0;p=w(r[p+1|0],63)+128|0;p=((p>>>8|0)+p>>>8&255)<<5;o[v+e|0]=(x>>>8|0)+x>>>8&255|p;o[(v|1)+e|0]=(p|(q+(q>>>8|0)>>>8&255)<<11)>>>8;n=n+1|0;if((k|0)!=(n|0)){continue}break n}}while(1){p=((i<<4)+t|0)+(n<<2)|0;q=w(r[p+2|0],31)+128|0;v=n<<1;x=w(r[p|0],31)+128|0;p=w(r[p+1|0],63)+128|0;p=((p>>>8|0)+p>>>8&255)<<5;o[v+e|0]=(x>>>8|0)+x>>>8&255|p;o[(v|1)+e|0]=(p|(q+(q>>>8|0)>>>8&255)<<11)>>>8;n=n+1|0;if((k|0)!=(n|0)){continue}break}}e=e+C|0;i=i+1|0;if((y|0)!=(i|0)){continue}break}}if(z){break g}break f}J(97053,96899,9463,96945);G()}J(96995,96899,9434,96945);G()}if(hwa(d,h)){break g}break f}if(!kwa(d,h)){break f}break g}J(96993,96899,9515,96945);G()}y=Aq(d,t);if((g|0)!=2){break e}v=(u|0)>4?4:u;e=s<<2;i=j-e|0;p=(i|0)>4?4:i;if(!(!v|!p)){e=(e+B<<1)+a|0;i=0;while(1){n=0;while(1){k=((i<<4)+t|0)+(n<<2)|0;q=w(r[k|0],15)+128|0;z=w(r[k+1|0],15)+128|0;x=n<<1;E=w(r[k+3|0],15)+128|0;k=w(r[k+2|0],15)+128|0;k=((k>>>8|0)+k>>>8&255)<<4;o[x+e|0]=E+(E>>>8|0)>>>8|k;o[(x|1)+e|0]=(k|((z+(z>>>8|0)>>>8&255)<<8|(q+(q>>>8|0)>>>8&255)<<12))>>>8;n=n+1|0;if((p|0)!=(n|0)){continue}break}e=e+C|0;i=i+1|0;if((v|0)!=(i|0)){continue}break}}if(!y){break f}}h=g+h|0;d=d+16|0;s=s+1|0;D=s>>>0>>0;if((b|0)!=(s|0)){continue}break d}break}if(!D){break d}n=0;break b}J(97053,96899,9492,96945);G()}n=1;A=A+1|0;if((A|0)!=(c|0)){continue}break}}Ii=t- -64|0;return n}J(96874,96899,9298,96945);G()}function Ry(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=Ii+ -64|0;q[h+48>>2]=0;q[h+52>>2]=0;q[h+56>>2]=0;q[h+60>>2]=0;q[h+32>>2]=0;q[h+36>>2]=0;q[h+40>>2]=0;q[h+44>>2]=0;a:{b:{c:{d:{e:{if(c){while(1){j=(h+32|0)+(s[(k<<1)+b>>1]<<1)|0;p[j>>1]=s[j>>1]+1;k=k+1|0;if((k|0)!=(c|0)){continue}break}k=q[e>>2];l=15;v=s[h+62>>1];if(v){break d}break e}k=q[e>>2]}l=14;v=0;if(s[h+60>>1]){break d}l=13;if(s[h+58>>1]){break d}l=12;if(s[h+56>>1]){break d}l=11;if(s[h+54>>1]){break d}l=10;if(s[h+52>>1]){break d}l=9;if(s[h+50>>1]){break d}l=8;if(s[h+48>>1]){break d}l=7;if(s[h+46>>1]){break d}l=6;if(s[h+44>>1]){break d}l=5;if(s[h+42>>1]){break d}l=4;if(s[h+40>>1]){break d}l=3;if(s[h+38>>1]){break d}l=2;if(s[h+36>>1]){break d}if(!s[h+34>>1]){a=q[d>>2];q[d>>2]=a+4;p[a>>1]=320;p[a+2>>1]=0;a=q[d>>2];q[d>>2]=a+4;p[a>>1]=320;p[a+2>>1]=0;q[e>>2]=1;break b}m=(k|0)!=0;l=1;k=1;break c}m=k>>>0>l>>>0?l:k;g=1;k=1;while(1){if(s[(h+32|0)+(k<<1)>>1]){break c}k=k+1|0;if((l|0)!=(k|0)){continue}break}k=l}j=-1;t=s[h+34>>1];if(t>>>0>2){break a}u=s[h+36>>1];i=4-(u+(t<<1)|0)|0;if((i|0)<0){break a}w=s[h+38>>1];i=(i<<1)-w|0;if((i|0)<0){break a}x=s[h+40>>1];i=(i<<1)-x|0;if((i|0)<0){break a}z=s[h+42>>1];i=(i<<1)-z|0;if((i|0)<0){break a}A=s[h+44>>1];i=(i<<1)-A|0;if((i|0)<0){break a}D=s[h+46>>1];i=(i<<1)-D|0;if((i|0)<0){break a}E=s[h+48>>1];i=(i<<1)-E|0;if((i|0)<0){break a}B=s[h+50>>1];i=(i<<1)-B|0;if((i|0)<0){break a}G=s[h+52>>1];i=(i<<1)-G|0;if((i|0)<0){break a}H=s[h+54>>1];i=(i<<1)-H|0;if((i|0)<0){break a}n=s[h+56>>1];i=(i<<1)-n|0;if((i|0)<0){break a}C=s[h+58>>1];i=(i<<1)-C|0;if((i|0)<0){break a}F=s[h+60>>1];i=(i<<1)-F|0;if((i|0)<0){break a}i=(i<<1)-v|0;if((i|0)<0|(!a|g?i:0)){break a}j=0;p[h+2>>1]=0;p[h+4>>1]=t;g=t+u|0;p[h+6>>1]=g;g=g+w|0;p[h+8>>1]=g;g=g+x|0;p[h+10>>1]=g;g=g+z|0;p[h+12>>1]=g;g=g+A|0;p[h+14>>1]=g;g=g+D|0;p[h+16>>1]=g;g=g+E|0;p[h+18>>1]=g;g=g+B|0;p[h+20>>1]=g;g=g+G|0;p[h+22>>1]=g;g=g+H|0;p[h+24>>1]=g;g=g+n|0;p[h+26>>1]=g;g=g+C|0;p[h+28>>1]=g;p[h+30>>1]=g+F;if(c){while(1){g=s[(j<<1)+b>>1];if(g){g=(g<<1)+h|0;i=s[g>>1];p[g>>1]=i+1;p[(i<<1)+f>>1]=j}j=j+1|0;if((j|0)!=(c|0)){continue}break}}n=k>>>0>m>>>0?k:m;t=19;D=0;C=f;z=f;E=0;f:{g:{switch(a|0){case 1:j=1;if(n>>>0>9){break a}z=195406;C=195342;t=256;E=1;break f;case 0:break f;default:break g}}z=196048;C=195984;D=(a|0)==2;t=-1;if((a|0)!=2){break f}j=1;if(n>>>0>9){break a}}u=1<>2];x=0;g=n;m=0;i=-1;while(1){F=1<>1];a=0;i:{if((t|0)>(g|0)){break i}if((g|0)<=(t|0)){g=0;a=96;break i}a=g<<1;g=s[a+C>>1];a=r[a+z|0]}H=m>>>y|0;j=-1<>1]=g;o[B+1|0]=A;o[B|0]=a;if(c){continue}break}j=1<>>1|0;if(a&m){continue}break}c=(h+32|0)+(k<<1)|0;g=s[c>>1]-1|0;p[c>>1]=g;m=a?a+(a-1&m)|0:0;x=x+1|0;if(!(g&65535)){if((k|0)==(l|0)){break h}k=s[(s[(x<<1)+f>>1]<<1)+b>>1]}if(k>>>0<=n>>>0){continue}a=m&G;if((a|0)==(i|0)){continue}break}y=y?y:n;g=k-y|0;v=1<>>0>>0){c=l-y|0;j=k;j:{while(1){j=v-s[(h+32|0)+(j<<1)>>1]|0;if((j|0)<1){break j}v=j<<1;g=g+1|0;j=y+g|0;if(l>>>0>j>>>0){continue}break}g=c}v=1<>>0>852&E|u>>>0>592&D){break a}c=q[d>>2];j=c+(a<<2)|0;o[j+1|0]=n;o[j|0]=g;w=(F<<2)+w|0;p[j+2>>1]=w-c>>>2;i=a;continue}break}if(m){a=(m<<2)+w|0;p[a+2>>1]=0;o[a+1|0]=A;o[a|0]=64}q[d>>2]=q[d>>2]+(u<<2);q[e>>2]=n}j=0}return j}function OG(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,v=0,x=0,y=0;m=Ii-48|0;Ii=m;Dj(a,f,5);if(r[b+24|0]){while(1){j=q[b+20>>2]+w(x,24)|0;Xi(a,q[j>>2]);jl(a,f);a:{if(!Vi(a,-1)){h=q[j+4>>2];if((h&-268435456)==268435456){i=q[j+16>>2];if(i){SG(a,j,c,d,e,i,g);break a}if((h&264241152)==46137344){h=q[j+8>>2];i=r[h+24|0];if(!i){break a}j=q[j+12>>2]+c|0;n=0;while(1){k=q[h+20>>2]+w(n,24)|0;p=q[k+16>>2];if(p){SG(a,k,j,d,e,p,j);i=r[h+24|0]}n=n+1|0;if(i>>>0>n>>>0){continue}break}break a}b:{c:{d:{e:{f:{g:{h:{i:{h=h>>>22&63;switch(h-2|0){case 12:break c;case 7:break d;case 0:break e;case 6:break f;case 2:break g;case 11:break h;case 3:break i;default:break b}}q[q[j+12>>2]+c>>2]=0;break a}q[q[j+12>>2]+c>>2]=0;break a}h=q[j+12>>2]+c|0;q[h>>2]=0;q[h+4>>2]=0;break a}o[q[j+12>>2]+c|0]=0;break a}q[q[j+12>>2]+c>>2]=0;break a}h=q[d>>2];j:{if(t[e>>2]>>0){Qi(a,124686,0);break j}o[h|0]=0;q[q[j+12>>2]+c>>2]=q[d>>2]-g}q[d>>2]=q[d>>2]+1;break a}q[q[j+12>>2]+c>>2]=0;break a}q[m+4>>2]=q[j>>2];q[m>>2]=h;Qi(a,124762,m);break a}q[m+16>>2]=q[j>>2];Qi(a,124654,m+16|0);break a}i=q[j+12>>2]+c|0;k=Vi(a,-1);n=0;s=1;y=(q[j+4>>2]&-268435456)!=805306368;k:{if(y){h=i;p=0;break k}Dj(a,-1,5);p=4;l:{m:{switch((q[j+4>>2]>>>22&63)-2|0){case 6:p=1;break l;case 9:p=q[q[j+8>>2]+16>>2];break l;default:J(124810,124816,215,124838);G();case 0:case 3:case 7:case 11:case 12:break l;case 2:break m}}p=8}s=al(a,-1);h=q[d>>2]+15&-16;q[d>>2]=h;l=w(p,s)+h|0;if(l>>>0>t[e>>2]){Qi(a,124852,0);break a}q[i+4>>2]=s;q[i>>2]=h-c;q[d>>2]=l;if(!s){break a}}while(1){if(!y){rj(a,-1,n+1|0)}n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{i=q[j+4>>2]>>>22&63;switch(i-2|0){case 9:break q;case 12:break r;case 7:break s;case 0:break t;case 6:break u;case 2:break v;case 11:break w;case 3:break x;default:break p}}if(!k){q[h>>2]=0;break n}q[h>>2]=jj(a,-1);break n}if(!k){q[h>>2]=0;break n}q[h>>2]=jj(a,-1);break n}if(!k){q[h>>2]=0;q[h+4>>2]=0;break n}q[h>>2]=nl(a,-1);q[h+4>>2]=Li;break n}if(!k){o[h|0]=0;break n}o[h|0]=(Uj(a,-1)|0)!=0;break n}if(!k){q[h>>2]=0;break n}u[h>>2]=fj(a,-1);break n}if(k){i=kj(a,-1,0)}else{i=124761}v=q[d>>2];l=hj(i)+1|0;y:{if(v+l>>>0>t[e>>2]){Qi(a,124686,0);break y}Ti(v,i,l);q[h>>2]=q[d>>2]-g}q[d>>2]=l+q[d>>2];break n}if(!k){q[h>>2]=0;break n}q[h>>2]=jj(a,-1);break n}if(!k){break n}l=q[j+8>>2];i=q[l+4>>2];if(!Ik(i,124545,8)){break o}if(!Ik(i,124553,7)){i=Bl(a,-1);l=q[i+4>>2];v=q[i>>2];u[h+8>>2]=u[i+8>>2];q[h>>2]=v;q[h+4>>2]=l;break n}if(!Ik(i,124560,8)){i=rm(a,-1);u[h>>2]=u[i>>2];u[h+4>>2]=u[i+4>>2];u[h+8>>2]=u[i+8>>2];u[h+12>>2]=u[i+12>>2];break n}if(!Ik(i,124568,5)){i=kr(a,-1);u[h>>2]=u[i>>2];u[h+4>>2]=u[i+4>>2];u[h+8>>2]=u[i+8>>2];u[h+12>>2]=u[i+12>>2];break n}if(!Ik(i,124573,8)){i=Ym(a,-1);u[h>>2]=u[i>>2];u[h+4>>2]=u[i+4>>2];u[h+8>>2]=u[i+8>>2];u[h+12>>2]=u[i+12>>2];u[h+16>>2]=u[i+16>>2];u[h+20>>2]=u[i+20>>2];u[h+24>>2]=u[i+24>>2];u[h+28>>2]=u[i+28>>2];u[h+32>>2]=u[i+32>>2];u[h+36>>2]=u[i+36>>2];u[h+40>>2]=u[i+40>>2];u[h+44>>2]=u[i+44>>2];u[h+48>>2]=u[i+48>>2];u[h+52>>2]=u[i+52>>2];u[h+56>>2]=u[i+56>>2];u[h+60>>2]=u[i+60>>2];break n}OG(a,l,h,d,e,q[a+8>>2]-q[a+12>>2]>>4,g);break n}q[m+36>>2]=q[j>>2];q[m+32>>2]=i;Qi(a,124589,m+32|0);break n}i=Bl(a,-1);u[h>>2]=u[i>>2];u[h+4>>2]=u[i+4>>2];u[h+8>>2]=u[i+8>>2]}if(!y){Ri(a,-2);h=h+p|0}n=n+1|0;if((s|0)!=(n|0)){continue}break}}Ri(a,-2);x=x+1|0;if(x>>>0>2];while(1){g=q[a+60>>2];f=q[g+4>>2];e=f+1|0;d=q[g+8>>2];a:{if(e>>>0<=d>>>0){d=q[g>>2];break a}if(d>>>0>=2147483646){Xk(h+80|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[h+72>>2]=141590;q[h+68>>2]=e;q[h+64>>2]=h+80;oj(d,141567,h- -64|0);Nj(q[a+52>>2],3);d=q[g+8>>2]}e=q[a+52>>2];f=d<<1;b:{if((f|0)!=-2){d=Cj(e,q[g>>2],d,f);break b}d=mk(e)}q[g+8>>2]=f;q[g>>2]=d;f=q[g+4>>2];e=f+1|0}q[g+4>>2]=e;o[d+f|0]=c;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;c:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break c}c=Hk(c)}q[d>>2]=c;if((c|0)==46|c-48>>>0<10){continue}break}d:{if(!Oq(141794,c,3)){break d}g=q[a+60>>2];f=q[g+4>>2];e=f+1|0;d=q[g+8>>2];e:{if(e>>>0<=d>>>0){d=q[g>>2];break e}if(d>>>0>=2147483646){Xk(h+80|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[h+56>>2]=141590;q[h+52>>2]=e;q[h+48>>2]=h+80;oj(d,141567,h+48|0);Nj(q[a+52>>2],3);d=q[g+8>>2]}e=q[a+52>>2];f=d<<1;f:{if((f|0)!=-2){d=Cj(e,q[g>>2],d,f);break f}d=mk(e)}q[g+8>>2]=f;q[g>>2]=d;f=q[g+4>>2];e=f+1|0}q[g+4>>2]=e;o[d+f|0]=c;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;g:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break g}c=Hk(c)}q[d>>2]=c;d=c&255;if(d>>>0>63){break d}e=d&31;if((d&63)>>>0>=32){d=1<>>32-e;e=1<>2];f=q[g+4>>2];e=f+1|0;d=q[g+8>>2];h:{if(e>>>0<=d>>>0){d=q[g>>2];break h}if(d>>>0>=2147483646){Xk(h+80|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[h+40>>2]=141590;q[h+36>>2]=e;q[h+32>>2]=h+80;oj(d,141567,h+32|0);Nj(q[a+52>>2],3);d=q[g+8>>2]}e=q[a+52>>2];f=d<<1;i:{if((f|0)!=-2){d=Cj(e,q[g>>2],d,f);break i}d=mk(e)}q[g+8>>2]=f;q[g>>2]=d;f=q[g+4>>2];e=f+1|0}q[g+4>>2]=e;o[d+f|0]=c;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;j:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break j}c=Hk(c)}q[d>>2]=c}if(!(((c|32)-97>>>0<26?1:c-48>>>0<10)?0:(c|0)!=95)){while(1){g=q[a+60>>2];f=q[g+4>>2];e=f+1|0;d=q[g+8>>2];k:{if(e>>>0<=d>>>0){d=q[g>>2];break k}if(d>>>0>=2147483646){Xk(h+80|0,q[a+64>>2]+16|0,80);d=q[a+52>>2];e=q[a+4>>2];q[h+24>>2]=141590;q[h+20>>2]=e;q[h+16>>2]=h+80;oj(d,141567,h+16|0);Nj(q[a+52>>2],3);d=q[g+8>>2]}e=q[a+52>>2];f=d<<1;l:{if((f|0)!=-2){d=Cj(e,q[g>>2],d,f);break l}d=mk(e)}q[g+8>>2]=f;q[g>>2]=d;f=q[g+4>>2];e=f+1|0}q[g+4>>2]=e;o[d+f|0]=c;c=q[a+56>>2];e=q[c>>2];q[c>>2]=e-1;d=a;m:{if(e){e=c;c=q[c+4>>2];q[e+4>>2]=c+1;c=r[c|0];break m}c=Hk(c)}q[d>>2]=c;if((c|0)==95|((c|32)-97>>>0<26?1:c-48>>>0<10)){continue}break}}d=q[a+60>>2];c=q[d+4>>2];f=c+1|0;e=q[d+8>>2];n:{if(f>>>0<=e>>>0){e=q[d>>2];break n}if(e>>>0>=2147483646){Xk(h+80|0,q[a+64>>2]+16|0,80);c=q[a+52>>2];e=q[a+4>>2];q[h+8>>2]=141590;q[h+4>>2]=e;q[h>>2]=h+80;oj(c,141567,h);Nj(q[a+52>>2],3);e=q[d+8>>2]}c=q[a+52>>2];f=e<<1;o:{if((f|0)!=-2){e=Cj(c,q[d>>2],e,f);break o}e=mk(c)}q[d+8>>2]=f;q[d>>2]=e;c=q[d+4>>2];f=c+1|0}q[d+4>>2]=f;o[c+e|0]=0;c=q[a+60>>2];d=q[c>>2];c=q[c+4>>2];if(c){e=r[a+68|0];while(1){c=c-1|0;f=d+c|0;if(r[f|0]==46){o[f|0]=e}if(c){continue}break}d=q[q[a+60>>2]>>2]}p:{if(Sl(d,b)){break p}e=r[a+68|0];f=r[q[55091]];o[a+68|0]=f;c=q[a+60>>2];d=q[c>>2];c=q[c+4>>2];if(c){while(1){c=c-1|0;g=d+c|0;if((e|0)==r[g|0]){o[g|0]=f}if(c){continue}break}d=q[q[a+60>>2]>>2]}if(Sl(d,b)){break p}b=q[a+60>>2];c=q[b+4>>2];if(c){b=q[b>>2];d=r[a+68|0];while(1){c=c-1|0;e=b+c|0;if((d|0)==r[e|0]){o[e|0]=46}if(c){continue}break}}gm(a,141797,284)}Ii=h+160|0}function Gwa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,q=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;j=Ii-16|0;Ii=j;C=j|12;D=j|8;E=j|4;while(1){Rwa(a,j,A);f=r[Zj(j,0)|0];h=r[Zj(j,1)|0];i=r[Zj(j,2)|0];d=r[Zj(E,0)|0];f=(w(h,183)+w(f,54)|0)+w(i,19)|0;h=(w(r[Zj(E,1)|0],183)+w(d,54)|0)+w(r[Zj(E,2)|0],19)|0;f=f+h|0;i=r[Zj(D,0)|0];i=(w(r[Zj(D,1)|0],183)+w(i,54)|0)+w(r[Zj(D,2)|0],19)|0;h=i+h|0;d=r[Zj(C,0)|0];i=i+((w(r[Zj(C,1)|0],183)+w(d,54)|0)+w(r[Zj(C,2)|0],19)|0)|0;d=A<<1;a:{if(!(o[a+3|0]&1)){e=d<<2;d=e+b|0;z=zj(d,0);k=zj(d,1);l=zj(d,2);g=d+16|0;m=zj(g,0);n=zj(g,1);q=zj(g,2);g=d+32|0;s=zj(g,0);t=zj(g,1);u=zj(g,2);d=d+48|0;v=zj(d,0);x=zj(d,1);y=zj(d,2);d=(e|4)+b|0;F=zj(d,0);G=zj(d,1);H=zj(d,2);g=d+16|0;I=zj(g,0);J=zj(g,1);K=zj(g,2);g=d+32|0;L=zj(g,0);M=zj(g,1);N=zj(g,2);g=d+48|0;O=zj(g,0);d=A<<3;e=d|1;P=c;c=(w(k,366)+w(z,108)|0)+w(l,38)|0;z=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];c=(w(n,366)+w(m,108)|0)+w(q,38)|0;k=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];c=(w(t,366)+w(s,108)|0)+w(u,38)|0;l=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];m=d|2;c=(w(x,366)+w(v,108)|0)+w(y,38)|0;n=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];q=d|3;c=(w(G,366)+w(F,108)|0)+w(H,38)|0;s=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];t=d|4;c=(w(J,366)+w(I,108)|0)+w(K,38)|0;u=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];v=d|5;c=(w(M,366)+w(L,108)|0)+w(N,38)|0;x=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];y=d|6;c=f;f=(w(zj(g,1),366)+w(O,108)|0)+w(zj(g,2),38)|0;f=r[(((c>>>0>f>>>0)+(f>>>0>>0)|0)+(f>>>0>>0)|0)+107790|0];h=d|7;c=P|z>>>1<>>1<>>1<>>1<>>1<>>1<>>1<>>1<>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];c=(w(q,366)+w(n,108)|0)+w(s,38)|0;l=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];m=d+4|0;c=(w(u,366)+w(t,108)|0)+w(v,38)|0;n=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];q=d+8|0;c=(w(y,366)+w(x,108)|0)+w(F,38)|0;s=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];t=d+12|0;c=(w(H,366)+w(G,108)|0)+w(I,38)|0;u=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];c=(w(K,366)+w(J,108)|0)+w(L,38)|0;v=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];c=(w(N,366)+w(M,108)|0)+w(O,38)|0;x=r[(((c>>>0>>0)+(c>>>0>>0)|0)+(c>>>0>>0)|0)+107790|0];y=g+8|0;c=f;f=(w(zj(e,1),366)+w(Q,108)|0)+w(zj(e,2),38)|0;f=r[(((c>>>0>f>>>0)+(f>>>0>>0)|0)+(f>>>0>>0)|0)+107790|0];h=g+12|0;c=P|k>>>1<>>1<>>1<>>1<>>1<>>1<>>1<>>1<>>8;p[a+6>>1]=(B<<8&16711680|B<<24)>>>16;Ii=j+16|0}function SL(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=x(0),l=0,m=0,n=0;h=Ii-112|0;Ii=h;a:{b:{c:{if(Qj(c,d,q[60188],e+164|0)){break c}q[e+128>>2]=Oi(q[q[e+164>>2]+20>>2]);q[e+132>>2]=Li;d:{e:{f:{d=q[q[e+164>>2]+28>>2];g:{h:{if(d>>>0>=17){q[h+80>>2]=f;Pi(3,59801,59809,h+80|0);d=16;break h}if(!d){break g}}while(1){c=q[e+164>>2];if(t[c+28>>2]<=g>>>0){break f}f=(g<<3)+e|0;q[f>>2]=Oi(q[q[c+24>>2]+(g<<2)>>2]);q[f+4>>2]=Li;g=g+1|0;if((g|0)!=(d|0)){continue}break}}c=q[e+164>>2];i=q[c+36>>2];n=q[c+32>>2];d=q[c>>2];if(!d|!r[d|0]){break d}if(ak(b,d,h+96|0)){break d}if(Vl(b,59914,h+92|0)){break d}if(xv(b,q[h+96>>2],h+88|0)|q[h+88>>2]!=q[h+92>>2]){break d}g=q[h+96>>2];q[e+136>>2]=g;d=q[e+160>>2]|-2147483648;q[e+160>>2]=d;l=q[g+12>>2];m=q[g+8>>2];b=l-m|0;j=b>>2;f=j+i|0;q[e+144>>2]=Yi(f<<2);f=f<<4;q[e+148>>2]=Yi(f);q[e+152>>2]=Yi(f);if(!b){break e}f=q[g+8>>2];if((f|0)!=q[g+12>>2]){d=m-l|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;g=0;while(1){b=g<<2;q[b+q[e+144>>2]>>2]=q[b+f>>2];f=g<<4;b=f+q[e+148>>2]|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=f+q[e+152>>2]|0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;g=g+1|0;if((d|0)==(g|0)){d=q[e+160>>2];break e}b=q[e+136>>2];f=q[b+8>>2];if(q[b+12>>2]-f>>2>>>0>g>>>0){continue}break}}J(60137,60148,479,59999);G()}J(59959,59971,116,59999);G()}q[e+156>>2]=j;q[e+160>>2]=d&-2147483648|j&2147483647}i:{if(!n){c=q[e+160>>2];break i}g=r[a+17|0];j:{if(g){q[e+140>>2]=Yi(i<<2);a=i<<4;q[e+148>>2]=Yi(a);q[e+152>>2]=Yi(a);f=q[e+160>>2];break j}f=q[e+160>>2];if((f|0)<0){break j}q[e+144>>2]=Yi(i<<2);a=i<<4;q[e+148>>2]=Yi(a);q[e+152>>2]=Yi(a)}d=f&2147483647;if(i){f=0;if(g&255){if(t[c+36>>2]<=f>>>0){break b}a=q[c+44>>2];g=q[c+40>>2];k:{l:{m:{n:{o:{p:{q:{b=q[c+32>>2]+(f<<6)|0;c=q[b>>2];switch(c|0){case 3:break n;case 2:break o;case 1:break p;case 0:break q;default:break m}}if(a>>>0>2]+1>>>0){break l}break k}b=q[b+48>>2];if(a>>>0>>0){break l}a=g+(b<<2)|0;k=u[a+8>>2];b=q[a+4>>2];q[h+96>>2]=q[a>>2];q[h+100>>2]=b;u[h+104>>2]=k;break k}if(a>>>0>2]+2>>>0){break l}break k}c=q[b+52>>2];b=q[b+48>>2];if(a>>>0>>0){break l}if(a>>>0<=b>>>0){break a}break k}q[h+48>>2]=c;Pi(4,59801,60010,h+48|0);break k}q[h+64>>2]=f;Pi(4,59801,60048,h- -64|0)}q[e+160>>2]=q[e+160>>2]&-2147483648|d&2147483647;g=0;break c}if(t[c+36>>2]<=f>>>0){break b}b=q[c+44>>2];i=q[c+40>>2];r:{s:{t:{u:{v:{w:{x:{a=q[c+32>>2]+(f<<6)|0;c=q[a>>2];switch(c|0){case 3:break u;case 2:break v;case 1:break w;case 0:break x;default:break t}}if(b>>>0>2]+1>>>0){break s}break r}a=q[a+48>>2];if(b>>>0>>0){break s}a=i+(a<<2)|0;k=u[a+8>>2];b=q[a+4>>2];q[h+96>>2]=q[a>>2];q[h+100>>2]=b;u[h+104>>2]=k;break r}q[h+32>>2]=60103;Pi(4,59801,60100,h+32|0);break r}c=q[a+52>>2];if(b>>>0>2]>>>0){break s}g=c<<1;c=(g>>>0)/3|0;f=$i((c|0)!=(c&1073741823)?-1:c<<2);if(g>>>0>=3){c=c>>>0>1?c:1;a=q[a+48>>2];g=0;while(1){j=(a+(g&1)|0)+w(g>>>1|0,3)|0;if(j>>>0>=b>>>0){break a}u[f+(g<<2)>>2]=u[i+(j<<2)>>2];g=g+1|0;if((c|0)!=(g|0)){continue}break}}Ni(f);break r}q[h>>2]=c;Pi(4,59801,60010,h);break r}q[h+16>>2]=f;Pi(4,59801,60048,h+16|0)}q[e+160>>2]=q[e+160>>2]&-2147483648|d&2147483647;g=0;break c}c=q[e+160>>2]&-2147483648|d&2147483647;q[e+160>>2]=c}g=1;if(c&2147483647){break c}g=0;Pi(4,59801,59923,0)}Ii=h+112|0;return g}J(59959,59971,87,59999);G()}J(59959,59971,95,59999);G()}function lZ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{switch(b|0){case 13:Nm(a,d);i=q[c+20>>2];if((i|0)==-1){break a}b=q[d+20>>2];if((b|0)==-1){break d}h=q[q[a>>2]+12>>2];while(1){e=b;g=h+(b<<2)|0;f=q[g>>2];b=(f>>>14|0)-131071|0;b=(b|0)==-1?-1:(e+b|0)+1|0;if((b|0)!=-1){continue}break}b=g;h=i+(e^-1)|0;e=h>>31;if((e^e+h)>=131072){Sj(q[a+12>>2],141849);f=q[g>>2]}q[b>>2]=(f&16383|h<<14)+2147467264;break a;case 14:Nm(a,d);i=q[c+16>>2];if((i|0)==-1){break a}b=q[d+16>>2];if((b|0)==-1){break c}h=q[q[a>>2]+12>>2];while(1){e=b;g=h+(b<<2)|0;f=q[g>>2];b=(f>>>14|0)-131071|0;b=(b|0)==-1?-1:(e+b|0)+1|0;if((b|0)!=-1){continue}break}b=g;h=i+(e^-1)|0;e=h>>31;if((e^e+h)>=131072){Sj(q[a+12>>2],141849);f=q[g>>2]}q[b>>2]=(f&16383|h<<14)+2147467264;break a;case 6:f:{if(q[d+16>>2]!=q[d+20>>2]){rn(a,d);break f}Nm(a,d)}g:{if(q[d>>2]!=11){break g}f=q[q[a>>2]+12>>2];e=q[d+8>>2];g=q[f+(e<<2)>>2];if((g&63)!=21){break g}h:{if(q[c>>2]!=12){break h}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1;e=q[d+8>>2];g=q[f+(e<<2)>>2]}q[f+(e<<2)>>2]=g&8388607|q[c+8>>2]<<23;q[c>>2]=11;q[c+8>>2]=q[d+8>>2];return}Nm(a,d);i:{if(q[d>>2]!=12){break i}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}e=q[a+36>>2];f=e+1|0;g=q[a>>2];j:{if((e|0)=249){Sj(q[a+12>>2],141814);g=q[a>>2];b=q[a+36>>2]+1|0}o[g+75|0]=f}q[a+36>>2]=b;er(a,d,b-1|0);Xo(a,21,c,d);return;case 0:Xo(a,12,c,d);return;case 1:Xo(a,13,c,d);return;case 2:Xo(a,14,c,d);return;case 3:Xo(a,15,c,d);return;case 4:Xo(a,16,c,d);return;case 5:Xo(a,17,c,d);return;case 8:e=Il(a,c);f=Il(a,d);k:{if(q[d>>2]!=12){break k}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}l:{if(q[c>>2]!=12){break l}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,23,1,e,f);break b;case 7:e=Il(a,c);f=Il(a,d);m:{if(q[d>>2]!=12){break m}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}n:{if(q[c>>2]!=12){break n}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,23,0,e,f);break b;case 9:e=Il(a,c);f=Il(a,d);o:{if(q[d>>2]!=12){break o}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}p:{if(q[c>>2]!=12){break p}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,24,1,e,f);break b;case 10:e=Il(a,c);f=Il(a,d);q:{if(q[d>>2]!=12){break q}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}r:{if(q[c>>2]!=12){break r}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,25,1,e,f);break b;case 11:e=Il(a,c);f=Il(a,d);s:{if(q[d>>2]!=12){break s}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}t:{if(q[c>>2]!=12){break t}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,24,1,f,e);break b;case 12:e=Il(a,c);f=Il(a,d);u:{if(q[d>>2]!=12){break u}b=q[d+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}v:{if(q[c>>2]!=12){break v}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}a=uo(a,25,1,f,e);q[c>>2]=10;q[c+8>>2]=a;break;default:break e}}return}q[d+20>>2]=i;break a}q[d+16>>2]=i;break a}q[c>>2]=10;q[c+8>>2]=a;return}a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;a=q[d+20>>2];q[c+16>>2]=q[d+16>>2];q[c+20>>2]=a;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a}function GN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=x(0),J=x(0),K=x(0),L=x(0);g=Ii-48|0;Ii=g;e=1;a:{b:{switch((b-a|0)/160|0){case 2:if(t[b-16>>2]>=t[a+144>>2]){break a}sk(a,b-160|0);break a;case 3:d=b-160|0;h=a+160|0;b=b-16|0;f=q[b>>2];c=q[a+304>>2];if(c>>>0>=t[a+144>>2]){if(c>>>0<=f>>>0){break a}sk(h,d);if(t[a+304>>2]>=t[a+144>>2]){break a}sk(a,h);break a}if(c>>>0>f>>>0){sk(a,d);break a}sk(a,h);if(t[b>>2]>=t[a+304>>2]){break a}sk(h,d);break a;case 4:yx(a,a+160|0,a+320|0,b-160|0);break a;case 5:ux(a,a+160|0,a+320|0,a+480|0,b-160|0);break a;case 0:case 1:break a;default:break b}}e=a+160|0;f=a+320|0;d=q[a+464>>2];c=q[a+304>>2];c:{if(c>>>0>=t[a+144>>2]){if(c>>>0<=d>>>0){break c}sk(e,f);if(t[a+304>>2]>=t[a+144>>2]){break c}sk(a,e);break c}if(c>>>0>d>>>0){sk(a,f);break c}sk(a,e);if(t[a+464>>2]>=t[a+304>>2]){break c}sk(e,f)}d:{e:{e=a+480|0;if((e|0)==(b|0)){break e}while(1){f:{i=q[e+144>>2];if(i>>>0>2]){j=u[e+56>>2];k=u[e+52>>2];l=u[e+44>>2];m=u[e+40>>2];n=u[e+36>>2];o=u[e+28>>2];p=u[e+24>>2];r=u[e+20>>2];s=u[e+48>>2];v=u[e+32>>2];w=u[e+16>>2];y=u[e+8>>2];z=u[e+4>>2];A=u[e>>2];q[g+44>>2]=q[e+88>>2];c=q[e+84>>2];q[g+36>>2]=q[e+80>>2];q[g+40>>2]=c;c=q[e+76>>2];q[g+28>>2]=q[e+72>>2];q[g+32>>2]=c;c=q[e+68>>2];q[g+20>>2]=q[e+64>>2];q[g+24>>2]=c;B=u[e+136>>2];C=u[e+132>>2];D=u[e+124>>2];E=u[e+120>>2];F=u[e+116>>2];G=u[e+108>>2];H=u[e+104>>2];I=u[e+100>>2];J=u[e+128>>2];K=u[e+112>>2];L=u[e+96>>2];q[g+8>>2]=q[e+156>>2];c=q[e+152>>2];q[g>>2]=q[e+148>>2];q[g+4>>2]=c;c=e;while(1){g:{d=f;u[c>>2]=u[d>>2];u[c+4>>2]=u[d+4>>2];u[c+8>>2]=u[d+8>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+28>>2]=u[d+28>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];f=q[d+68>>2];q[c+64>>2]=q[d+64>>2];q[c+68>>2]=f;f=q[d+76>>2];q[c+72>>2]=q[d+72>>2];q[c+76>>2]=f;f=q[d+84>>2];q[c+80>>2]=q[d+80>>2];q[c+84>>2]=f;q[c+88>>2]=q[d+88>>2];u[c+96>>2]=u[d+96>>2];u[c+100>>2]=u[d+100>>2];u[c+104>>2]=u[d+104>>2];u[c+108>>2]=u[d+108>>2];u[c+112>>2]=u[d+112>>2];u[c+116>>2]=u[d+116>>2];u[c+120>>2]=u[d+120>>2];u[c+124>>2]=u[d+124>>2];u[c+128>>2]=u[d+128>>2];u[c+132>>2]=u[d+132>>2];u[c+136>>2]=u[d+136>>2];f=q[d+148>>2];q[c+144>>2]=q[d+144>>2];q[c+148>>2]=f;f=q[d+156>>2];q[c+152>>2]=q[d+152>>2];q[c+156>>2]=f;if((a|0)==(d|0)){c=a;break g}f=d-160|0;c=d;if(t[c-16>>2]>i>>>0){continue}}break}u[c+48>>2]=s;u[c+32>>2]=v;u[c+16>>2]=w;u[c+8>>2]=y;u[c+4>>2]=z;u[c>>2]=A;u[c+56>>2]=j;u[c+52>>2]=k;u[c+44>>2]=l;u[c+40>>2]=m;u[c+36>>2]=n;u[c+28>>2]=o;u[c+24>>2]=p;u[c+20>>2]=r;d=d- -64|0;q[d+24>>2]=q[g+44>>2];f=q[g+40>>2];q[d+16>>2]=q[g+36>>2];q[d+20>>2]=f;f=q[g+32>>2];q[d+8>>2]=q[g+28>>2];q[d+12>>2]=f;f=q[g+24>>2];q[d>>2]=q[g+20>>2];q[d+4>>2]=f;q[c+144>>2]=i;u[c+136>>2]=B;u[c+132>>2]=C;u[c+128>>2]=J;u[c+124>>2]=D;u[c+120>>2]=E;u[c+116>>2]=F;u[c+112>>2]=K;u[c+108>>2]=G;u[c+104>>2]=H;u[c+100>>2]=I;u[c+96>>2]=L;f=q[g+4>>2];q[c+148>>2]=q[g>>2];q[c+152>>2]=f;q[c+156>>2]=q[g+8>>2];h=h+1|0;if((h|0)==8){break f}}f=e;e=e+160|0;if((e|0)!=(b|0)){continue}break e}break}c=(e+160|0)==(b|0);a=0;break d}a=1}e=a|c}Ii=g+48|0;return e&1}function Um(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0;k=Ii-112|0;Ii=k;l=h;o=i&2147483647;m=c-(b>>>0<1)|0;j=b-1|0;r=(j|0)==-1&(m|0)==-1;s=d;p=(c|0)==(m|0)&b>>>0>j>>>0|c>>>0>m>>>0;n=d+p|0;m=e&2147483647;j=m;j=n>>>0

>>0?j+1|0:j;p=n-1|0;a:{b:{j=j-(n>>>0<1)|0;if(!((p|0)==-1&(j|0)==2147418111?r:j>>>0>2147418111)){j=f;n=g-(j>>>0<1)|0;j=j-1|0;r=(j|0)!=-1|(n|0)!=-1;p=(g|0)==(n|0)&f>>>0>j>>>0|g>>>0>n>>>0;n=p+l|0;j=o;j=n>>>0

>>0?j+1|0:j;p=n;n=n-1|0;j=j-(p>>>0<1)|0;if((n|0)==-1&(j|0)==2147418111?r:(j|0)==2147418111&(n|0)!=-1|j>>>0<2147418111){break b}}if(!(!s&(m|0)==2147418112?!(b|c):m>>>0<2147418112)){h=d;i=e|32768;f=b;g=c;break a}if(!(!l&(o|0)==2147418112?!(f|g):o>>>0<2147418112)){i=i|32768;break a}if(!(b|s|(m^2147418112|c))){j=d;d=!(b^f|d^h|(c^g|e^i^-2147483648));h=d?0:j;i=d?2147450880:e;f=d?0:b;g=d?0:c;break a}if(!(f|l|(o^2147418112|g))){break a}if(!(b|s|(c|m))){if(f|l|(g|o)){break a}f=b&f;g=c&g;h=d&h;i=e&i;break a}if(f|l|(g|o)){break b}f=b;g=c;h=d;i=e;break a}r=(l|0)==(s|0)&(m|0)==(o|0)?(c|0)==(g|0)&b>>>0>>0|c>>>0>>0:(m|0)==(o|0)&l>>>0>s>>>0|m>>>0>>0;j=r;n=j?f:b;o=j?g:c;l=j?i:e;s=l;m=j?h:d;j=l&65535;i=r?e:i;e=i;h=r?d:h;p=i>>>16&32767;l=l>>>16&32767;if(!l){d=!(j|m);i=d<<6;l=z(d?n:m)+32|0;d=z(d?o:j);d=i+((d|0)==32?l:d)|0;vm(k+96|0,n,o,m,j,d-15|0);m=q[k+104>>2];n=q[k+96>>2];o=q[k+100>>2];l=16-d|0;j=q[k+108>>2]}f=r?b:f;g=r?c:g;i=e&65535;if(!p){b=!(h|i);c=b<<6;d=z(b?f:h)+32|0;b=z(b?g:i);b=c+((b|0)==32?d:b)|0;vm(k+80|0,f,g,h,i,b-15|0);p=16-b|0;h=q[k+88>>2];i=q[k+92>>2];g=q[k+84>>2];f=q[k+80>>2]}b=h;c=i<<3|b>>>29;h=b<<3|g>>>29;i=c|524288;b=m;d=j<<3|b>>>29;m=b<<3|o>>>29;t=d;r=e^s;b=f;j=g<<3|b>>>29;b=b<<3;c=j;d=l-p|0;e=b;c:{if(!d){break c}if(d>>>0>127){h=0;i=0;j=0;e=1;break c}vm(k- -64|0,b,c,h,i,128-d|0);Xr(k+48|0,b,c,h,i,d);h=q[k+56>>2];i=q[k+60>>2];j=q[k+52>>2];e=q[k+48>>2]|((q[k+64>>2]|q[k+72>>2])!=0|(q[k+68>>2]|q[k+76>>2])!=0)}f=j;d=m;p=t|524288;b=n;j=o<<3|b>>>29;c=b<<3;d:{if((r|0)<-1?1:(r|0)<=-1){o=e;b=c-e|0;m=h;n=d-h|0;e=(f|0)==(j|0)&c>>>0>>0|f>>>0>j>>>0;h=n-e|0;c=j-((c>>>0>>0)+f|0)|0;i=(p-((d>>>0>>0)+i|0)|0)-(e>>>0>n>>>0)|0;if(!(b|h|(c|i))){f=0;g=0;h=0;i=0;break a}if(i>>>0>524287){break d}f=b;d=!(h|i);e=d<<6;g=z(d?b:h)+32|0;b=z(d?c:i);b=e+((b|0)==32?g:b)|0;b=b-12|0;vm(k+32|0,f,c,h,i,b);l=l-b|0;h=q[k+40>>2];i=q[k+44>>2];b=q[k+32>>2];c=q[k+36>>2];break d}b=c;g=b+e|0;c=f+j|0;c=b>>>0>g>>>0?c+1|0:c;b=g;g=(c|0)==(f|0)&e>>>0>b>>>0|c>>>0>>0;e=d;f=d+h|0;d=i+p|0;d=e>>>0>f>>>0?d+1|0:d;e=g+f|0;h=e;i=h>>>0>>0?d+1|0:d;if(!(i&1048576)){break d}b=b&1|((c&1)<<31|b>>>1);c=h<<31|c>>>1;l=l+1|0;h=(i&1)<<31|h>>>1;i=i>>>1|0}j=0;o=s&-2147483648;if((l|0)>=32767){h=j;i=o|2147418112;f=0;g=0;break a}e=0;e:{if((l|0)>0){e=l;break e}vm(k+16|0,b,c,h,i,l+127|0);Xr(k,b,c,h,i,1-l|0);b=q[k>>2]|((q[k+16>>2]|q[k+24>>2])!=0|(q[k+20>>2]|q[k+28>>2])!=0);c=q[k+4>>2];h=q[k+8>>2];i=q[k+12>>2]}s=(c&7)<<29|b>>>3;g=s;l=b&7;b=g+(l>>>0>4)|0;d=h<<29|c>>>3;c=b>>>0>>0?d+1|0:d;f=b;g=c;b=(d|0)==(c|0)&b>>>0>>0|c>>>0>>0;d=(i&7)<<29|h>>>3|j;b=b+d|0;j=o|i>>>3&65535|e<<16;h=b;i=b>>>0>>0?j+1|0:j;f:{if((l|0)==4){j=i;c=0;d=g+c|0;e=f&1;b=f+e|0;d=b>>>0>>0?d+1|0:d;f=b;g=d;c=(c|0)==(d|0)&b>>>0>>0|c>>>0>d>>>0;b=c+h|0;h=b;i=b>>>0>>0?j+1|0:j;break f}if(!l){break a}}}q[a>>2]=f;q[a+4>>2]=g;q[a+8>>2]=h;q[a+12>>2]=i;Ii=k+112|0}function LQ(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=Ii-32|0;Ii=k;q[e+8>>2]=0;q[e>>2]=8;q[e+4>>2]=0;g=Yi(18456);q[g+18452>>2]=1387;q[g+18448>>2]=1388;q[g+18444>>2]=1389;q[g>>2]=a;f=gD(g,1);j=q[a+184>>2];q[a+172>>2]=q[a+180>>2];q[a+176>>2]=j;Ni(g);a:{if(f){e=Yi(18456);q[e+18452>>2]=1387;q[e+18448>>2]=1388;q[e+18444>>2]=1389;q[e>>2]=a;a=v_(e,b,c,d);Ni(e);break a}g=a+41|0;l=a+40|0;b:{c:{f=q[a+176>>2];i=q[a+172>>2];d:{if(f>>>0<=i>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);e:{if(!f){o[a+40|0]=0;q[a+32>>2]=0;f=g;break e}h=r[a+40|0];f=f+(a+40|0)|0}q[a+172>>2]=g;q[a+176>>2]=f;j=g;break d}j=i+1|0;q[a+172>>2]=j;h=r[i|0]}if((h|0)!=137){break c}f:{if(f>>>0<=j>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);g:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break g}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;i=g;break f}i=j+1|0;q[a+172>>2]=i;h=r[j|0]}if((h|0)!=80){break c}h:{if(f>>>0<=i>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);i:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break i}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;j=g;break h}j=i+1|0;q[a+172>>2]=j;h=r[i|0]}if((h|0)!=78){break c}j:{if(f>>>0<=j>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);k:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break k}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;i=g;break j}i=j+1|0;q[a+172>>2]=i;h=r[j|0]}if((h|0)!=71){break c}l:{if(f>>>0<=i>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);m:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break m}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;j=g;break l}j=i+1|0;q[a+172>>2]=j;h=r[i|0]}if((h|0)!=13){break c}n:{if(f>>>0<=j>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);o:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break o}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;i=g;break n}i=j+1|0;q[a+172>>2]=i;h=r[j|0]}if((h|0)!=10){break c}p:{if(f>>>0<=i>>>0){if(!q[a+32>>2]){break c}f=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);q:{if(f){h=r[a+40|0];f=f+(a+40|0)|0;break q}h=0;o[a+40|0]=0;q[a+32>>2]=0;f=g}q[a+172>>2]=g;q[a+176>>2]=f;break p}g=i+1|0;q[a+172>>2]=g;h=r[i|0]}if((h|0)!=26){break c}r:{if(f>>>0<=g>>>0){if(!q[a+32>>2]){break c}g=Mi[q[a+16>>2]](q[a+28>>2],l,q[a+36>>2])|0;q[a+168>>2]=q[a+168>>2]+(q[a+172>>2]-q[a+180>>2]|0);if(g){break r}o[a+40|0]=0;q[a+32>>2]=0;break c}q[a+172>>2]=g+1;l=g}if(r[l|0]!=10){break c}g=q[a+184>>2];q[a+172>>2]=q[a+180>>2];q[a+176>>2]=g;q[k+8>>2]=a;a=0;s:{if(!KQ(k+8|0)){f=q[k+20>>2];break s}a=8;t:{g=q[k+24>>2];if((g|0)<9){break t}a=16;if((g|0)==16){break t}q[213145]=169802;break b}q[e>>2]=a;a=q[k+20>>2];e=b;b=q[k+8>>2];q[e>>2]=q[b>>2];q[c>>2]=q[b+4>>2];f=0;if(!d){break s}q[d>>2]=q[b+8>>2]}Ni(f);Ni(q[k+16>>2]);Ni(q[k+12>>2]);break a}b=q[a+184>>2];q[a+172>>2]=q[a+180>>2];q[a+176>>2]=b;q[213145]=169229}a=0}Ii=k+32|0;return a}function aH(a,b){var c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=0,k=x(0),l=x(0),m=0,n=x(0),p=0,s=x(0),t=x(0),v=x(0),y=0,z=0,A=0,B=0,C=x(0),D=x(0),E=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=x(0);a:{b:{c:{c=r[a+186|0];d:{if(!(c&4)){break d}B=c&1;m=(B<<5)+a|0;if(!(o[m+28|0]&1)|!q[m>>2]){break d}y=a+112|0;z=q[y>>2];d=q[a+116>>2]-z|0;c=(d|0)/176|0;j=q[a+76>>2];if(d){A=c>>>0>1?c:1;p=q[j+4>>2];d=0;while(1){if((d|0)==(p|0)){break c}c=z+w(d,176)|0;e=q[j>>2]+w(d,192)|0;u[c>>2]=u[e+32>>2];u[c+4>>2]=u[e+36>>2];u[c+8>>2]=u[e+40>>2];u[c+12>>2]=u[e+44>>2];u[c+16>>2]=u[e+48>>2];u[c+20>>2]=u[e+52>>2];u[c+24>>2]=u[e+56>>2];u[c+32>>2]=u[e- -64>>2];u[c+36>>2]=u[e+68>>2];f=u[e+72>>2];q[c+88>>2]=1065353216;q[c+80>>2]=1065353216;q[c+84>>2]=1065353216;q[c+72>>2]=0;e=c- -64|0;q[e>>2]=0;q[e+4>>2]=0;q[c+56>>2]=0;q[c+60>>2]=1065353216;q[c+48>>2]=0;q[c+52>>2]=0;u[c+40>>2]=f;d=d+1|0;if((A|0)!=(d|0)){continue}break}}e=q[a+132>>2];d=q[a+128>>2];c=e-d|0;if(c){e=d-e|0;p=((c|0)<(e|0)?e:c)>>>3|0;c=(c|0)>-1?c:-1;c=w(p,(c|0)<1?c:1);e=c>>>0>1?c:1;z=q[j+12>>2];c=0;while(1){if((c|0)==(z|0)){break b}A=d+(c<<3)|0;p=q[j+8>>2]+(c<<5)|0;u[A>>2]=u[p+24>>2];o[A+4|0]=r[p+20|0];c=c+1|0;if((e|0)!=(c|0)){continue}break}}d=r[a+186|0];e:{if(!(d&2)){c=d;break e}f=x(u[a+180>>2]+b);u[a+180>>2]=f;if(f>=u[a+176>>2]^1){c=d;break e}c=d&253;o[a+186|0]=c;d=(((d^-1)&1)<<5)+a|0;o[d+28|0]=r[d+28|0]&254}f:{if(c&2){f=x(u[a+180>>2]/u[a+176>>2]);h=x(x(1)-f);Jz(a,a,b,B?h:f);Kz(a,a,y,x(1));c=a+32|0;t=b;b=B?f:h;Jz(a,c,t,b);Kz(a,c,y,b);break f}Jz(a,m,b,x(1));Kz(a,m,y,x(1))}g:{if(r[a+186|0]&2){j=q[a+112>>2];a=q[a+116>>2]-j|0;e=(a|0)/176|0;if(!a){break d}d=e>>>0>1?e:1;c=0;while(1){a=w(c,176)+j|0;m=a;f=u[a>>2];b=u[a+4>>2];h=u[a+8>>2];i=u[a+12>>2];g=x(x(x(x(f*f)+x(b*b))+x(h*h))+x(i*i));if(!(g>x(.0010000000474974513)^1)){g=x(x(1)/x(F(g)));i=x(i*g);h=x(h*g);f=x(f*g);b=x(b*g)}u[a>>2]=f;u[a+4>>2]=b;u[a+8>>2]=h;u[m+12>>2]=i;c=c+1|0;if((d|0)!=(c|0)){continue}break}break g}j=q[a+112>>2];a=q[a+116>>2]-j|0;e=(a|0)/176|0;if(!a){break d}}m=e>>>0>1?e:1;d=0;while(1){a=w(d,176)+j|0;c=q[a+160>>2];h:{if((c|0)!=-1){if(c>>>0>=e>>>0){break a}E=u[a+40>>2];c=w(c,176)+j|0;H=u[c- -64>>2];I=u[c+68>>2];v=u[c+72>>2];K=u[a+16>>2];L=u[a+20>>2];C=u[c+88>>2];M=u[a+24>>2];g=u[a+8>>2];b=u[c+56>>2];f=u[c+48>>2];k=u[a+12>>2];h=u[c+60>>2];l=u[a+4>>2];i=u[c+52>>2];t=u[a+32>>2];s=u[c+80>>2];n=u[a>>2];D=u[c+84>>2];u[a+84>>2]=D*u[a+36>>2];u[a+80>>2]=s*t;u[a+60>>2]=x(x(x(h*k)-x(f*n))-x(i*l))-x(b*g);u[a+56>>2]=x(x(f*l)+x(x(h*g)+x(b*k)))-x(i*n);u[a+52>>2]=x(x(b*n)+x(x(h*l)+x(i*k)))-x(f*g);u[a+48>>2]=x(x(i*g)+x(x(h*n)+x(f*k)))-x(b*l);t=v;g=x(K*s);k=x(L*D);l=x(M*C);n=x(x(x(b*g)+x(h*k))-x(f*l));s=x(x(b*l)+x(x(f*g)+x(i*k)));v=x(x(x(f*k)+x(h*l))-x(i*g));g=x(x(x(h*g)+x(i*l))-x(b*k));u[a+72>>2]=t+x(x(f*n)+x(x(x(b*s)+x(h*v))-x(i*g)));u[a+68>>2]=I+x(x(b*g)+x(x(x(h*n)+x(i*s))-x(f*v)));u[a- -64>>2]=H+x(x(i*v)+x(x(x(f*s)+x(h*g))-x(b*n)));b=x(C*E);break h}u[a+48>>2]=u[a>>2];c=q[a+8>>2];q[a+52>>2]=q[a+4>>2];q[a+56>>2]=c;c=q[a+16>>2];q[a+60>>2]=q[a+12>>2];q[a+64>>2]=c;c=q[a+36>>2];q[a+80>>2]=q[a+32>>2];q[a+84>>2]=c;c=q[a+24>>2];q[a+68>>2]=q[a+20>>2];q[a+72>>2]=c;b=u[a+40>>2]}u[a+88>>2]=b;d=d+1|0;if((m|0)!=(d|0)){continue}break}}return}J(152522,152534,68,152554);G()}J(152522,152534,76,152554);G()}J(152576,152587,479,152554);G()}function Dsa(a){var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=0,i=0,j=x(0),k=0,l=0,m=0,n=0,p=0,s=0,v=0,y=0,z=0;d=Ii-96|0;Ii=d;i=1;o[a+148|0]=1;q[a+140>>2]=0;q[a+144>>2]=0;c=Jk();b=q[a+448>>2];h=q[a+452>>2];q[a+448>>2]=c;e=Li;q[a+452>>2]=e;f=x(A(x((+(c-b>>>0)+ +(e-(h+(b>>>0>c>>>0)|0)>>>0)*4294967296)/1e6),x(.5)));b=q[a+460>>2];a:{if(b){j=x(f+u[a+456>>2]);g=x(x(1)/x(b>>>0));f=f>g?f:g;g=x(j/f);b:{if(g=x(0)){b=~~g>>>0;break b}b=0}i=b;u[a+456>>2]=j-x(f*x(b>>>0));if(!b){break a}}g=x(x(1)/f);c:{if(g=x(0)){break c}}l=q[53736];m=q[53735];while(1){q[d+8>>2]=0;b=Mi[q[74929]](q[a+216>>2],131075)|0;c=r[a+440|0];d:{e:{if(b){if(!c){o[a+440|0]=1;if(r[a+443|0]){break e}b=q[239672];if(!(!b|!q[b+12>>2])){q[b+33908>>2]=1}}if(r[a+443|0]){break e}xJ(q[a+412>>2]);Xn(1e5);break d}if(!c){break e}o[a+440|0]=0;b=q[239672];if(!(!b|!q[b+12>>2])){q[b+33908>>2]=0}}q[d+88>>2]=0;q[d+80>>2]=0;q[d+32>>2]=0;N6(q[a+288>>2]);q[d+32>>2]=0;xJ(q[a+412>>2]);f:{g:{if(r[a+443|0]){break g}if(!(Mi[q[74929]](q[a+216>>2],131075)|0)){break g}break f}q[d+32>>2]=0;b=q[a+272>>2];h:{if(!b){b=q[a+276>>2];if(b){nz(b)}b=q[a+280>>2];if(b){nz(b)}b=q[a+284>>2];if(!b){break h}}nz(b)}kG();i:{j:{if(r[a+441|0]){zJ(q[a+412>>2]+2368|0,d+32|0);b=d+32|0;c=0;k:{if(!b){break k}c=q[b+32>>2]>>>1&1}if(c){break j}}if(Mi[q[74929]](q[a+216>>2],131073)|0){break i}}o[a+148|0]=0;break f}S9(q[a+416>>2]);T9(q[a+420>>2],f);q[a+164>>2]=q[a+160>>2];Z9(q[a+420>>2],a);b=q[a+160>>2];Yx(b,(q[a+164>>2]-b|0)/960|0,960,13);c=q[a+160>>2];b=q[a+164>>2]-c|0;if(b){pM(q[a+156>>2],c,(b|0)/960|0)}u[d+36>>2]=f;q[d+32>>2]=1065353216;q[d+44>>2]=q[a+464>>2];u[d+40>>2]=u[a+456>>2];UL(q[a+156>>2],d+32|0);l:{if(Mi[q[74929]](q[a+216>>2],131075)|0){break l}e=d+16|0;q[e>>2]=0;q[e+4>>2]=0;q[e+8>>2]=0;q[d+16>>2]=q[a+4>>2];q[d+20>>2]=q[a+288>>2];c=d;b=q[a+272>>2];m:{if(b){b=b?q[b+120>>2]:0;break m}h=q[a+276>>2];b=0;n:{if(!h){break n}b=q[h+120>>2]}}q[c+24>>2]=b;rsa(e);l8(q[a+220>>2]);_L(q[a+156>>2]);b=q[a+428>>2];if(b){G8(q[b+24>>2])}bA(q[a+220>>2],2,16777215);Mi[q[74939]](q[a+216>>2]);b=q[a+428>>2];if(b){h7(q[b+24>>2],f);break l}c=q[a+216>>2];b=Mi[q[74933]](c)|0;p=c,s=0,v=0,y=b,z=Mi[q[74934]](q[a+216>>2])|0,n=q[74985],Mi[n](p|0,s|0,v|0,y|0,z|0);b=q[a+476>>2];Mi[q[74942]](q[a+216>>2],49,b&255,b>>>8&255,b>>>16&255,b>>>24|0,x(1),0);Gv(q[a+220>>2],0,0,0)}fM(q[a+156>>2]);eM(q[a+152>>2]);N8(q[a+220>>2]);oq(q[a+296>>2],q[a+300>>2],14,a);q[71322]=q[79288];b=q[a+272>>2];o:{if(b){b=Bz(b?q[b+120>>2]:0);break o}b=q[a+276>>2];c=0;p:{if(!b){break p}c=q[b+120>>2]}e=Bz(c);b=q[a+284>>2];c=0;q:{if(!b){break q}c=q[b+120>>2]}b=e+Bz(c)|0}q[71300]=b;if(r[266420]){Kn(m);Kn(l)}if(!(Mi[q[74929]](q[a+216>>2],131075)|0)){e=d+32|0;q[e>>2]=0;q[e+4>>2]=0;q[e+8>>2]=0;q[d+32>>2]=q[a+4>>2];q[d+36>>2]=q[a+288>>2];c=d;b=q[a+272>>2];r:{if(b){b=b?q[b+120>>2]:0;break r}h=q[a+276>>2];b=0;s:{if(!h){break s}b=q[h+120>>2]}}q[c+40>>2]=b;ssa(e)}Mi[q[74940]](q[a+216>>2]);if(q[a+488>>2]){if(!(t[a+496>>2]%t[a+500>>2]|0)){c=Mi[q[74931]](q[a+216>>2])|0;b=Mi[q[74932]](q[a+216>>2])|0;Mi[q[75025]](q[a+216>>2],q[a+492>>2],w(b,c)<<2);q[d>>2]=-3;Pi(4,1076,4522,d)}q[a+496>>2]=q[a+496>>2]+1}q[a+432>>2]=q[a+432>>2]+1;u[a+436>>2]=f+u[a+436>>2]}}if(!r[a+148|0]){break a}k=k+1|0;if(k>>>0>>0){continue}break}}Ii=d+96|0}function _la(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=x(0),p=0,r=0,s=x(0),y=0;m=Ii-32|0;Ii=m;r=nj(m+8|0,a,1,76581,2031);b=$j(a,1);a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{b=Cp(a,q[74445],b,Li,78755);g=q[b+64>>2];if(g){f=q[b+48>>2];h=Mi[q[75014]](q[f>>2],q[f+4>>2])|0;b=q[b+48>>2];c=Mi[q[75015]](q[b>>2],q[b+4>>2])|0;vj(a,0,0);b=q[g+92>>2];f=b;l=q[g+88>>2];k:{if(b|l){lk(a,l,f);break k}Xi(a,q[g>>2])}Si(a,-2,76992);bj(a,77342,10);vj(a,0,0);l=q[g+68>>2];b=q[g+8>>2];if(b){while(1){if(b>>>0<=d>>>0){break j}b=q[g+4>>2]+w(d,40)|0;f=q[b+12>>2];if(f>>>0>=t[g+80>>2]){break i}j=q[b+16>>2];k=q[q[g+76>>2]+(f<<2)>>2];e=q[a+8>>2];q[e+8>>2]=3;d=d+1|0;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;vj(a,0,0);Xi(a,q[b>>2]);Si(a,-2,77353);e=q[b+4>>2];i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77433);e=q[b+8>>2];i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77439);e=q[b+20>>2];i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77477);e=q[b+24>>2];if(e>>>0>=7){break h}e=q[(e<<2)+79440>>2];i=q[a+8>>2];q[i+8>>2]=3;v[i>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77468);e=q[a+8>>2];q[e+8>>2]=3;k=k+1|0;v[e>>3]=k|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77446);e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=j+(k-f|0)|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77458);f=q[b+28>>2];j=q[a+8>>2];q[j+8>>2]=1;q[j>>2]=(f|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77495);b=q[b+32>>2];f=q[a+8>>2];q[f+8>>2]=1;q[f>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77481);Ij(a,-3);b=q[g+8>>2];if(d>>>0>>0){continue}break}}Ij(a,-3);bj(a,77255,10);vj(a,0,0);if(l){s=x(h>>>0);y=+(c>>>0);b=0;while(1){if(t[g+68>>2]<=b>>>0){break g}d=q[g+64>>2];f=q[a+8>>2];q[f+8>>2]=3;c=f;f=b+1|0;v[c>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;vj(a,0,0);d=d+(b<<5)|0;if(o[d+12|0]&1){break f}if(o[d+20|0]&1){break e}if(t[d+28>>2]%3|0){break d}bj(a,77266,8);vj(a,0,0);h=d;c=q[d+12>>2];if(c){b=0;while(1){if(b>>>0>=c>>>0){break b}e=c;c=b|1;if(e>>>0<=c>>>0){break b}j=q[d+8>>2];n=u[j+(c<<2)>>2];k=q[d+4>>2];p=+x((+u[j+(b<<2)>>2]+.5)*+t[d>>2]);j=q[a+8>>2];q[j+8>>2]=3;v[j>>3]=p;q[a+8>>2]=q[a+8>>2]+16;nk(a,-2,c);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=x((.5- +n)*+(k>>>0));q[a+8>>2]=q[a+8>>2]+16;b=b+2|0;nk(a,-2,b);c=q[h+12>>2];if(c>>>0>b>>>0){continue}break}}Ij(a,-3);bj(a,77330,3);vj(a,0,0);c=q[d+20>>2];if(c){b=0;while(1){if(b>>>0>=c>>>0){break a}h=b|1;if(h>>>0>=c>>>0){break a}c=q[d+16>>2];n=u[c+(h<<2)>>2];p=+x(u[c+(b<<2)>>2]*s);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=p;q[a+8>>2]=q[a+8>>2]+16;nk(a,-2,h);h=q[a+8>>2];q[h+8>>2]=3;v[h>>3]=x((1- +n)*y);q[a+8>>2]=q[a+8>>2]+16;b=b+2|0;nk(a,-2,b);c=q[d+20>>2];if(c>>>0>b>>>0){continue}break}}Ij(a,-3);bj(a,77334,7);vj(a,0,0);c=q[d+28>>2];if(c){b=0;while(1){if(b>>>0>=c>>>0){break c}h=q[q[d+24>>2]+(b<<2)>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=h|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);c=q[d+28>>2];if(c>>>0>b>>>0){continue}break}}Ij(a,-3);Ij(a,-3);b=f;if((l|0)!=(b|0)){continue}break}}Ij(a,-3);mj(r);Ii=m+32|0;return 1}J(78776,76581,2037,78788);G()}J(77919,77931,88,77963);G()}J(77919,77931,147,77963);G()}J(77974,76581,1292,78890);G()}J(77919,77931,138,77963);G()}J(78797,76581,2112,78788);G()}J(78830,76581,2113,78788);G()}J(78858,76581,2114,78788);G()}J(77919,77931,72,77963);G()}J(77919,77931,56,77963);G()}J(77919,77931,64,77963);G()}function wL(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{c:{switch(q[a+40>>2]){case 0:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;i=q[a+32>>2];a=q[a+16>>2]+w(i,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+w(c,b)|0;while(1){o[a+g|0]=r[b+d|0];h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:b+c|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:a+i|0;e=e-1|0;if(e){continue}break}break b;case 1:if(!e){break a}f=q[a+36>>2];i=(b>>>0)/(f>>>0)|0;g=b-w(f,i)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;h=1;j=i;i=q[a+32>>2];a=q[a+16>>2]+(w(j,i)<<1)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<1)|0;while(1){p[(g<<1)+a>>1]=s[(d<<1)+b>>1];d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<1)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<1)+a|0;e=e-1|0;if(e){continue}break}break b;case 2:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;i=q[a+32>>2];a=q[a+16>>2]+(w(i,h)<<2)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<2)|0;while(1){q[(g<<2)+a>>2]=q[(d<<2)+b>>2];h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<2)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<2)+a|0;e=e-1|0;if(e){continue}break}break b;case 3:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;i=q[a+32>>2];a=q[a+16>>2]+(w(i,h)<<3)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<3)|0;while(1){j=(d<<3)+b|0;k=q[j+4>>2];h=(g<<3)+a|0;q[h>>2]=q[j>>2];q[h+4>>2]=k;h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<3)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<3)+a|0;e=e-1|0;if(e){continue}break}break b;case 4:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;i=q[a+32>>2];a=q[a+16>>2]+w(i,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+w(c,b)|0;while(1){o[a+g|0]=r[b+d|0];h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:b+c|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:a+i|0;e=e-1|0;if(e){continue}break}break b;case 5:if(!e){break a}f=q[a+36>>2];i=(b>>>0)/(f>>>0)|0;g=b-w(f,i)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;h=1;j=i;i=q[a+32>>2];a=q[a+16>>2]+(w(j,i)<<1)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<1)|0;while(1){p[(g<<1)+a>>1]=s[(d<<1)+b>>1];d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<1)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<1)+a|0;e=e-1|0;if(e){continue}break}break b;case 6:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;i=q[a+32>>2];a=q[a+16>>2]+(w(i,h)<<2)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<2)|0;while(1){q[(g<<2)+a>>2]=q[(d<<2)+b>>2];h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<2)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<2)+a|0;e=e-1|0;if(e){continue}break}break b;case 7:if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;i=q[a+32>>2];a=q[a+16>>2]+(w(i,h)<<3)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<3)|0;while(1){j=(d<<3)+b|0;k=q[j+4>>2];h=(g<<3)+a|0;q[h>>2]=q[j>>2];q[h+4>>2]=k;h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<3)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<3)+a|0;e=e-1|0;if(e){continue}break}break b;case 8:break c;default:break b}}if(!e){break a}f=q[a+36>>2];h=(b>>>0)/(f>>>0)|0;g=b-w(f,h)|0;b=(d>>>0)/(f>>>0)|0;d=d-w(b,f)|0;i=q[a+32>>2];a=q[a+16>>2]+(w(i,h)<<2)|0;j=q[c+16>>2];c=q[c+32>>2];b=j+(w(c,b)<<2)|0;while(1){u[(g<<2)+a>>2]=u[(d<<2)+b>>2];h=1;d=(d+1>>>0)%(f>>>0)|0;b=d?b:(c<<2)+b|0;g=(g+1>>>0)%(f>>>0)|0;a=g?a:(i<<2)+a|0;e=e-1|0;if(e){continue}break}}return h}return 1}function fL(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,s=0,t=0,v=0,y=0,z=x(0),A=0,B=0,C=0,D=0,E=x(0),F=x(0),H=0,I=0,K=0,L=0,M=0,N=x(0),O=x(0),P=x(0),Q=x(0),R=x(0),S=x(0),T=x(0),U=x(0);j=Ii-160|0;Ii=j;t=q[i+8>>2];a:{b:{c:{d:{e:{f:{A=q[d+8>>2];if((Ap(a,A)|0)==6){if(!b){break f}k=q[i+8>>2];m=q[k>>2];l=q[k+4>>2];n=l-m|0;s=(n|0)/320|0;v=s+1|0;if(v>>>0>(q[k+8>>2]-m|0)/320>>>0){break a}q[k+4>>2]=m+w(v,320);if(s>>>0>=(n+320|0)/320>>>0){break e}k=q[i+12>>2];q[i+12>>2]=k+1;q[l+304>>2]=k;y=t+60|0;I=q[y>>2];K=q[t+56>>2];k=Oi(40414);q[j+96>>2]=0;q[j+100>>2]=0;o[j+92|0]=3;q[j+88>>2]=8;q[j+80>>2]=k;q[j+84>>2]=Li;k=Oi(40423);q[j+120>>2]=0;q[j+124>>2]=0;o[j+116|0]=2;q[j+112>>2]=8;q[j+104>>2]=k;q[j+108>>2]=Li;k=Oi(40433);q[j+144>>2]=0;q[j+148>>2]=0;o[j+140|0]=4;q[j+136>>2]=8;q[j+128>>2]=k;q[j+132>>2]=Li;q[j+76>>2]=0;nua(j+80|0,j+76|0);if(h){C=t+56|0;D=t- -64|0;v=0;while(1){k=q[((v<<4)+d|0)+8>>2];m=kK(a,k);q[j+68>>2]=k;q[j+64>>2]=a;n=q[c+4>>2];q[j+72>>2]=b;q[j+56>>2]=m;q[j+60>>2]=n;q[j+48>>2]=0;q[j+52>>2]=0;q[j+40>>2]=0;q[j+44>>2]=0;Mi[q[c+24>>2]](j+56|0,3,j+80|0,q[j+76>>2],j+40|0);z=u[(v<<2)+f>>2];m=q[j+76>>2];n=q[j+40>>2];s=q[j+44>>2];Xl(j+16|0,a,k,3);u[j+28>>2]=z;k=s-n|0;s=(k>>>0)/(m>>>0)|0;if(k>>>0>=m>>>0){B=q[j+40>>2];L=s>>>0>1?s:1;m=(v<<6)+e|0;M=m;n=0;while(1){N=u[m+48>>2];O=u[m+32>>2];P=u[m>>2];Q=u[m+16>>2];R=u[m+52>>2];S=u[m+36>>2];T=u[m+4>>2];U=u[m+20>>2];k=w(n,36)+B|0;z=u[k>>2];E=u[k+4>>2];F=u[k+8>>2];u[k+8>>2]=u[M+56>>2]+x(x(x(z*u[m+8>>2])+x(E*u[m+24>>2]))+x(F*u[m+40>>2]));u[k+4>>2]=R+x(x(x(z*T)+x(E*U))+x(F*S));u[k>>2]=N+x(x(x(z*P)+x(E*Q))+x(F*O));u[k+20>>2]=u[j+16>>2]*u[k+20>>2];u[k+24>>2]=u[j+20>>2]*u[k+24>>2];u[k+28>>2]=u[j+24>>2]*u[k+28>>2];u[k+32>>2]=u[j+28>>2]*u[k+32>>2];n=n+1|0;if((L|0)!=(n|0)){continue}break}}n=q[D>>2];k=q[y>>2];if(s>>>0>(n-k|0)/36>>>0){if(o[t+68|0]&1){break b}Wi(((n-q[C>>2]|0)/36|0)+(s>>>0>128?s:128)|0,36,C,D,y);n=q[D>>2];k=q[y>>2]}m=q[C>>2];B=s+((k-m|0)/36|0)|0;if(B>>>0>(n-m|0)/36>>>0){break a}q[y>>2]=m+w(B,36);Ti(k,q[j+40>>2],w(s,36));g:{if(o[j+52|0]&1){break g}k=q[j+40>>2];if(!k){break g}Ni(k)}H=s+H|0;v=v+1|0;if((v|0)!=(h|0)){continue}break}}fn(l);q[l+148>>2]=q[t+48>>2];b=q[t+52>>2];q[l+284>>2]=H;q[l+280>>2]=(I-K|0)/36;q[l+224>>2]=1;q[l+144>>2]=b;b=To(a,A);q[l+156>>2]=q[(b?b:i+4|0)>>2];b=wt(a,A);if(b>>>0>=5){break d}c=r[l+288|0];o[l+288|0]=c|1;b=b<<2;q[l+236>>2]=q[b+44292>>2];q[l+232>>2]=q[b+44272>>2];b=q[g>>2];o[l+288|0]=c|3;h:{i:{if(b){q[l+244>>2]=5;q[l+248>>2]=0;q[l+252>>2]=2;q[l+256>>2]=2;o[l+276|0]=r[b|0];o[l+277|0]=r[b+1|0];o[l+278|0]=r[b+2|0];n=l+279|0;o[n|0]=r[l+279|0]&208|r[b+3|0]&15;if(!r[i+16|0]){break h}o[i+16|0]=0;b=r[l+279|0]|16;break i}q[l+244>>2]=7;q[l+248>>2]=0;o[l+278|0]=255;p[l+276>>1]=65280;q[l+252>>2]=0;q[l+256>>2]=0;n=l+279|0;b=r[n|0]&-48|15}o[n|0]=b}a=vt(a,A,j+56|0);j:{if(q[j+56>>2]==2){if(!a){break c}b=q[a+48>>2];a=q[b>>2];c=q[b+4>>2];break j}c=0}b=c;if(!(a|b)){a=q[t+72>>2];b=q[t+76>>2]}q[l+160>>2]=a;q[l+164>>2]=b;Ii=j+160|0;return}J(43011,41161,1218,43048);G()}J(43066,41161,1219,43048);G()}J(40995,40745,479,41006);G()}q[j>>2]=b;Pi(4,40439,42505,j);J(42529,41161,893,42531);G()}J(42342,41161,949,42358);G()}J(40670,40745,493,40801);G()}J(40968,40745,506,40987);G()}function mO(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Ii-16|0;Ii=l;a:{b:{c:{d:{e:{f:{if(b>>>0<=36){while(1){f=q[a+4>>2];g:{if(f>>>0>2]){q[a+4>>2]=f+1;f=r[f|0];break g}f=Fk(a)}if((f|0)==32|f-9>>>0<5){continue}break}h:{i:{switch(f-43|0){case 0:case 2:break i;default:break h}}m=(f|0)==45?-1:0;f=q[a+4>>2];if(f>>>0>2]){q[a+4>>2]=f+1;f=r[f|0];break h}f=Fk(a)}j:{if(!(b&-17|(f|0)!=48)){f=q[a+4>>2];k:{if(f>>>0>2]){q[a+4>>2]=f+1;f=r[f|0];break k}f=Fk(a)}if((f&-33)==88){b=q[a+4>>2];l:{if(b>>>0>2]){q[a+4>>2]=b+1;f=r[b|0];break l}f=Fk(a)}b=16;if(r[f+220609|0]<16){break e}if(!q[a+104>>2]){d=0;e=0;if(c){break a}break b}b=q[a+4>>2];q[a+4>>2]=b-1;if(!c){break b}q[a+4>>2]=b-2;d=0;e=0;break a}if(b){break j}b=8;break e}b=b?b:10;if(b>>>0>r[f+220609|0]){break j}if(q[a+104>>2]){q[a+4>>2]=q[a+4>>2]-1}d=0;e=0;Cn(a,0,0);q[240513]=28;break a}if((b|0)!=10){break e}c=f-48|0;if(c>>>0<=9){b=0;while(1){h=w(b,10);b=q[a+4>>2];m:{if(b>>>0>2]){q[a+4>>2]=b+1;f=r[b|0];break m}f=Fk(a)}b=c+h|0;c=f-48|0;if(b>>>0<429496729?c>>>0<=9:0){continue}break}g=b;h=0}if(c>>>0>9){break f}i=Aza(g,0,10,0);b=Li;while(1){f=q[a+4>>2];n:{if(f>>>0>2]){q[a+4>>2]=f+1;f=r[f|0];break n}f=Fk(a)}g=c+i|0;h=g>>>0>>0?b+1|0:b;c=f-48|0;if((h|0)==429496729&g>>>0>=2576980378|h>>>0>429496729|c>>>0>9){break f}i=Aza(g,h,10,0);b=Li;if((b|0)==-1&(c^-1)>>>0>=i>>>0|(b|0)!=-1){continue}break}b=10;break d}q[240513]=28;d=0;e=0;break a}b=10;if(c>>>0<=9){break d}break c}if(b-1&b){c=r[f+220609|0];if(c>>>0>>0){while(1){i=w(b,i)+c|0;g=i>>>0<=119304646;c=q[a+4>>2];o:{if(c>>>0>2]){q[a+4>>2]=c+1;f=r[c|0];break o}f=Fk(a)}c=r[f+220609|0];if(c>>>0>>0?g:0){continue}break}g=i}if(b>>>0<=c>>>0){break d}i=b;while(1){j=Aza(g,h,i,0);k=Li;c=c&255;if((k|0)==-1&(c^-1)>>>0>>0){break d}f=q[a+4>>2];p:{if(f>>>0>2]){q[a+4>>2]=f+1;f=r[f|0];break p}f=Fk(a)}h=k;g=c+j|0;h=g>>>0>>0?h+1|0:h;c=r[f+220609|0];if(c>>>0>=b>>>0){break d}Vn(l,i,0,g,h);if(!(q[l+8>>2]|q[l+12>>2])){continue}break}break d}k=o[(w(b,23)>>>5&7)+220865|0];c=r[f+220609|0];if(c>>>0>>0){while(1){i=i<>>0<=134217727;c=q[a+4>>2];q:{if(c>>>0>2]){q[a+4>>2]=c+1;f=r[c|0];break q}f=Fk(a)}c=r[f+220609|0];if(c>>>0>>0?g:0){continue}break}g=i}i=k;j=i&31;if((i&63)>>>0>=32){k=0;j=-1>>>j|0}else{k=-1>>>j|0;j=(1<>>j}if(!k&g>>>0>j>>>0|b>>>0<=c>>>0){break d}while(1){n=c&255;c=i;f=c&31;if((c&63)>>>0>=32){h=g<>>32-f|h<>2];r:{if(c>>>0>2]){q[a+4>>2]=c+1;f=r[c|0];break r}f=Fk(a)}if((h|0)==(k|0)&g>>>0>j>>>0|h>>>0>k>>>0){break d}c=r[f+220609|0];if(c>>>0>>0){continue}break}}if(r[f+220609|0]>=b>>>0){break c}while(1){f=q[a+4>>2];s:{if(f>>>0>2]){q[a+4>>2]=f+1;c=r[f|0];break s}c=Fk(a)}if(r[c+220609|0]>>0){continue}break}q[240513]=68;m=d&1?0:m;g=d;h=e}if(q[a+104>>2]){q[a+4>>2]=q[a+4>>2]-1}t:{if((e|0)==(h|0)&d>>>0>g>>>0|e>>>0>h>>>0){break t}if(!(m|d&1)){q[240513]=68;a=d;d=a-1|0;e=e-(a>>>0<1)|0;break a}if((e|0)==(h|0)&d>>>0>=g>>>0|e>>>0>h>>>0){break t}q[240513]=68;break a}a=m;b=a^g;d=b-a|0;c=a>>31;e=(c^h)-((a>>>0>b>>>0)+c|0)|0;break a}d=0;e=0;Cn(a,0,0)}Ii=l+16|0;Li=e;return d}function N2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-160|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;q[b+152>>2]=0;q[b+156>>2]=0;q[b+144>>2]=0;q[b+148>>2]=0;q[b+136>>2]=0;q[b+140>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;o[b+128|0]=0;o[b+129|0]=0;o[b+130|0]=0;o[b+131|0]=0;o[b+132|0]=0;o[b+133|0]=0;o[b+134|0]=0;o[b+135|0]=0;o[b+152|0]=0;o[b+153|0]=0;o[b+154|0]=0;o[b+155|0]=0;o[b+156|0]=0;o[b+157|0]=0;o[b+158|0]=0;o[b+159|0]=0;o[b+144|0]=0;o[b+145|0]=0;o[b+146|0]=0;o[b+147|0]=0;o[b+148|0]=0;o[b+149|0]=0;o[b+150|0]=0;o[b+151|0]=0;o[b+136|0]=0;o[b+137|0]=0;o[b+138|0]=0;o[b+139|0]=0;o[b+140|0]=0;o[b+141|0]=0;o[b+142|0]=0;o[b+143|0]=0;a:{b:{c:{if((e|0)<=1){Gk(a,1,b+128|0,0);break c}if((e|0)==3){q[b+120>>2]=0;q[b+124>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;if(!Vi(a,1)){o[b+96|0]=0;o[b+97|0]=0;o[b+98|0]=0;o[b+99|0]=0;o[b+100|0]=0;o[b+101|0]=0;o[b+102|0]=0;o[b+103|0]=0;o[b+120|0]=0;o[b+121|0]=0;o[b+122|0]=0;o[b+123|0]=0;o[b+124|0]=0;o[b+125|0]=0;o[b+126|0]=0;o[b+127|0]=0;o[b+112|0]=0;o[b+113|0]=0;o[b+114|0]=0;o[b+115|0]=0;o[b+116|0]=0;o[b+117|0]=0;o[b+118|0]=0;o[b+119|0]=0;o[b+104|0]=0;o[b+105|0]=0;o[b+106|0]=0;o[b+107|0]=0;o[b+108|0]=0;o[b+109|0]=0;o[b+110|0]=0;o[b+111|0]=0;jr(a,b+96|0)}d:{if(Vi(a,1)){if(On(a,1)){c=qj(a,1);d=q[c+4>>2];q[b+128>>2]=q[c>>2];q[b+132>>2]=d;break d}e:{c=uj(a,1,0);d=vn(c,b+128|0);switch(d+6|0){case 2:break b;case 0:case 6:break d;default:break e}}q[b+4>>2]=d;q[b>>2]=c;c=Qi(a,128298,b);break a}c=q[b+100>>2];q[b+128>>2]=q[b+96>>2];q[b+132>>2]=c}f:{g:{if(Vi(a,2)){if(uk(a,2)){c=uj(a,2,0);h:{if(Vi(a,1)){if(!uk(a,1)){break h}if(r[uj(a,1,0)|0]){break h}}d=hj(c);if(!d){break g}EG(a,c,d,b+144|0);break f}q[b+144>>2]=Oi(c);q[b+148>>2]=Li;break f}q[b+144>>2]=nl(a,2);q[b+148>>2]=Li;break f}if(!Vi(a,1)){c=q[b+116>>2];q[b+144>>2]=q[b+112>>2];q[b+148>>2]=c;break f}if(!Vi(a,3)){break f}c=Qi(a,128334,0);break a}q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;c=b- -64|0;o[c|0]=0;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;o[c+4|0]=0;o[c+5|0]=0;o[c+6|0]=0;o[c+7|0]=0;o[c+24|0]=0;o[c+25|0]=0;o[c+26|0]=0;o[c+27|0]=0;o[c+28|0]=0;o[c+29|0]=0;o[c+30|0]=0;o[c+31|0]=0;o[c+16|0]=0;o[c+17|0]=0;o[c+18|0]=0;o[c+19|0]=0;o[c+20|0]=0;o[c+21|0]=0;o[c+22|0]=0;o[c+23|0]=0;o[c+8|0]=0;o[c+9|0]=0;o[c+10|0]=0;o[c+11|0]=0;o[c+12|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0;jr(a,b- -64|0);c=q[b+84>>2];q[b+144>>2]=q[b+80>>2];q[b+148>>2]=c}if(Vi(a,3)){if(uk(a,3)){q[b+152>>2]=Oi(uj(a,3,0));q[b+156>>2]=Li;break c}q[b+152>>2]=nl(a,3);q[b+156>>2]=Li;break c}i:{if(Vi(a,1)){break i}if(Vi(a,2)){break i}f=q[b+120>>2];g=q[b+124>>2]}q[b+152>>2]=f;q[b+156>>2]=g;break c}q[b+52>>2]=128488;q[b+48>>2]=128484;q[b+44>>2]=128488;q[b+40>>2]=128484;q[b+36>>2]=128488;q[b+32>>2]=128484;Qi(a,128387,b+32|0)}c=yj(a,32);f=q[b+156>>2];q[c+24>>2]=q[b+152>>2];q[c+28>>2]=f;d=q[b+148>>2];q[c+16>>2]=q[b+144>>2];q[c+20>>2]=d;d=q[b+140>>2];q[c+8>>2]=q[b+136>>2];q[c+12>>2]=d;d=q[b+132>>2];q[c>>2]=q[b+128>>2];q[c+4>>2]=d;Zi(a,-1e4,128488);xj(a,-2);c=1;if((e+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(128492,128517,445,128539);G()}q[b+16>>2]=c;c=Qi(a,128265,b+16|0)}Ii=b+160|0;return c|0}function Yq(a,b,c){var d=0,e=0,f=0,g=0;d=a;e=10;a:{b:{if((c|0)==128){break b}if((c|0)!=256){f=-32;if((c|0)!=192){break a}e=12;break b}e=14}q[d>>2]=e;if(!r[843696]){uxa();o[843696]=1}d=a+8|0;q[a+4>>2]=d;f=c>>>5|0;c=0;while(1){e=c<<2;q[(e+a|0)+8>>2]=r[b+e|0]|r[(e|1)+b|0]<<8|r[(e|2)+b|0]<<16|r[(e|3)+b|0]<<24;c=c+1|0;if((f|0)!=(c|0)){continue}break}f=0;c:{switch(q[a>>2]-10|0){case 0:b=q[d>>2];c=0;while(1){a=q[d+12>>2];b=r[(a>>>8&255)+843760|0]^(q[(c<<2)+843712>>2]^b)^r[(a>>>16&255)+843760|0]<<8^r[(a>>>24|0)+843760|0]<<16^r[(a&255)+843760|0]<<24;q[d+16>>2]=b;e=q[d+4>>2]^b;q[d+20>>2]=e;e=e^q[d+8>>2];q[d+24>>2]=e;q[d+28>>2]=a^e;d=d+16|0;c=c+1|0;if((c|0)!=10){continue}break}break a;case 2:b=q[a+28>>2];c=r[(b>>>8&255)+843760|0]^(q[210928]^q[a+8>>2])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+32>>2]=c;d=c^q[a+12>>2];q[a+36>>2]=d;e=d^q[a+16>>2];q[a+40>>2]=e;f=e^q[a+20>>2];q[a+44>>2]=f;g=f^q[a+24>>2];q[a+48>>2]=g;b=b^g;q[a+52>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210929])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+56>>2]=c;d=c^d;q[a+60>>2]=d;e=d^e;q[a- -64>>2]=e;f=e^f;q[a+68>>2]=f;g=f^g;q[a+72>>2]=g;b=b^g;q[a+76>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210930])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+80>>2]=c;d=c^d;q[a+84>>2]=d;e=d^e;q[a+88>>2]=e;f=e^f;q[a+92>>2]=f;g=f^g;q[a+96>>2]=g;b=b^g;q[a+100>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210931])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+104>>2]=c;d=c^d;q[a+108>>2]=d;e=d^e;q[a+112>>2]=e;f=e^f;q[a+116>>2]=f;g=f^g;q[a+120>>2]=g;b=b^g;q[a+124>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210932])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+128>>2]=c;d=c^d;q[a+132>>2]=d;e=d^e;q[a+136>>2]=e;f=e^f;q[a+140>>2]=f;g=f^g;q[a+144>>2]=g;b=b^g;q[a+148>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210933])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+152>>2]=c;d=c^d;q[a+156>>2]=d;e=d^e;q[a+160>>2]=e;f=e^f;q[a+164>>2]=f;g=f^g;q[a+168>>2]=g;b=b^g;q[a+172>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210934])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+176>>2]=c;d=c^d;q[a+180>>2]=d;e=d^e;q[a+184>>2]=e;f=e^f;q[a+188>>2]=f;g=f^g;q[a+192>>2]=g;b=b^g;q[a+196>>2]=b;c=r[(b>>>8&255)+843760|0]^(c^q[210935])^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[a+200>>2]=c;c=c^d;q[a+204>>2]=c;c=c^e;q[a+208>>2]=c;c=c^f;q[a+212>>2]=c;c=c^g;q[a+216>>2]=c;q[a+220>>2]=b^c;return 0;case 4:break c;default:break a}}a=q[d>>2];e=0;while(1){b=q[d+28>>2];a=r[(b>>>8&255)+843760|0]^(q[(e<<2)+843712>>2]^a)^r[(b>>>16&255)+843760|0]<<8^r[(b>>>24|0)+843760|0]<<16^r[(b&255)+843760|0]<<24;q[d+32>>2]=a;c=q[d+4>>2]^a;q[d+36>>2]=c;c=c^q[d+8>>2];q[d+40>>2]=c;c=c^q[d+12>>2];q[d+44>>2]=c;c=q[d+16>>2]^r[(c&255)+843760|0]^r[(c>>>8&255)+843760|0]<<8^r[(c>>>16&255)+843760|0]<<16^r[(c>>>24|0)+843760|0]<<24;q[d+48>>2]=c;c=c^q[d+20>>2];q[d+52>>2]=c;c=c^q[d+24>>2];q[d+56>>2]=c;q[d+60>>2]=b^c;d=d+32|0;e=e+1|0;if((e|0)!=7){continue}break}}return f}function jR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-16|0;Ii=g;b=q[a>>2];a:{if(!q[b+24>>2]){f=-29696;break a}if(!q[a+8>>2]){q[a+16>>2]=r[b+182|0];q[a+20>>2]=r[b+183|0]}c=r[b+180|0];if(!c){f=-28928;break a}d=q[a+204>>2];ls(c,r[b+181|0],q[b+184>>2]>>>1&1,d+4|0);f=RR(a);if(f){break a}b=q[a+68>>2];c=r[b+1132|0]|r[b+1133|0]<<8|(r[b+1134|0]<<16|r[b+1135|0]<<24);e=r[b+1128|0]|r[b+1129|0]<<8|(r[b+1130|0]<<16|r[b+1131|0]<<24);o[d+6|0]=e;o[d+7|0]=e>>>8;o[d+8|0]=e>>>16;o[d+9|0]=e>>>24;o[d+10|0]=c;o[d+11|0]=c>>>8;o[d+12|0]=c>>>16;o[d+13|0]=c>>>24;c=b+1152|0;e=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);c=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[d+30|0]=c;o[d+31|0]=c>>>8;o[d+32|0]=c>>>16;o[d+33|0]=c>>>24;o[d+34|0]=e;o[d+35|0]=e>>>8;o[d+36|0]=e>>>16;o[d+37|0]=e>>>24;c=b+1144|0;e=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);c=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[d+22|0]=c;o[d+23|0]=c>>>8;o[d+24|0]=c>>>16;o[d+25|0]=c>>>24;o[d+26|0]=e;o[d+27|0]=e>>>8;o[d+28|0]=e>>>16;o[d+29|0]=e>>>24;b=b+1136|0;c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);b=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);o[d+14|0]=b;o[d+15|0]=b>>>8;o[d+16|0]=b>>>16;o[d+17|0]=b>>>24;o[d+18|0]=c;o[d+19|0]=c>>>8;o[d+20|0]=c>>>16;o[d+21|0]=c>>>24;b=q[a+8>>2];b:{c:{d:{e:{c=q[a+64>>2];e=q[c+12>>2];f:{if(e-16>>>0<=16){if(b){break e}b=q[q[a+68>>2]+2252>>2]?e:0;break f}if(b){break e}b=0}if(!q[c+104>>2]|!q[c+108>>2]){break d}b=32;e=q[a>>2];f=Mi[q[e+24>>2]](q[e+28>>2],c+16|0,32)|0;if(f){break a}q[q[a+64>>2]+12>>2]=32;o[d+38|0]=32;i=d+39|0;break c}o[d+38|0]=0;i=d+39|0;break b}o[d+38|0]=b;i=d+39|0;if(!b){break b}}f=0;while(1){o[i|0]=r[(q[a+64>>2]+f|0)+16|0];i=i+1|0;f=f+1|0;if((b|0)!=(f|0)){continue}break}}g:{if(!(r[q[a>>2]+184|0]&2)){break g}b=q[a+68>>2];if(!q[b+480>>2]){o[i|0]=0;i=i+1|0;break g}o[i|0]=r[b+484|0];b=q[a+68>>2];i=Ti(i+1|0,q[b+480>>2],r[b+484|0])+r[q[a+68>>2]+484|0]|0}h=i+2|0;e=q[q[a>>2]+(q[a+20>>2]<<2)>>2];f=q[e>>2];if(f){c=e;b=0;while(1){f=Au(f);k=q[a>>2];if(!lD(f,a,r[k+183|0],r[k+181|0])){f=q[f+16>>2]-3|0;h:{if(f>>>0<=8){f=q[(f<<2)+181124>>2];break h}f=0}o[h|0]=q[c>>2]>>>8;o[h+1|0]=q[c>>2];j=j+1|0;l=f|l;h=h+2|0}b=b+1|0;c=e+(b<<2)|0;f=q[c>>2];if(f){continue}break}}if(!q[a+8>>2]){o[h|0]=0;o[h+1|0]=255;j=j+1|0;h=h+2|0}if(o[q[a>>2]+186|0]&1){o[h|0]=86;o[h+1|0]=0;j=j+1|0;h=h+2|0}o[i+1|0]=j<<1;o[i|0]=j>>>7;o[h|0]=1;o[h+1|0]=0;e=h+4|0;fR(a,e,g+12|0);b=q[g+12>>2];dR(a,b+e|0,g+12|0);b=b+q[g+12>>2]|0;bR(q[a>>2],q[a+204>>2],b+e|0,g+12|0);b=b+q[g+12>>2]|0;c=a;if(l){$Q(a,b+e|0,g+12|0);b=q[g+12>>2]+b|0;_Q(q[a+204>>2],b+e|0,g+12|0);b=b+q[g+12>>2]|0}eR(c,b+e|0,g+12|0);b=q[g+12>>2]+b|0;ZQ(q[a>>2],q[a+204>>2],b+e|0,g+12|0);b=b+q[g+12>>2]|0;hR(q[a>>2],q[a+204>>2],b+e|0,g+12|0);b=b+q[g+12>>2]|0;gR(q[a>>2],q[a+204>>2],b+e|0,g+12|0);b=b+q[g+12>>2]|0;lR(a,b+e|0,g+12|0);b=b+q[g+12>>2]|0;cR(a,b+e|0,g+12|0);b=b+q[g+12>>2]|0;c=h+2|0;i:{if(!b){break i}c=(b<<8&16711680|b<<24)>>>16|0;o[h+2|0]=c;o[h+3|0]=c>>>8;c=b+e|0}q[a+208>>2]=22;q[a+212>>2]=c-d;o[q[a+204>>2]]=1;q[a+4>>2]=q[a+4>>2]+1;if(r[q[a>>2]+184|0]&2){dE(a)}f=Pq(a);if(f){break a}if(r[q[a>>2]+184|0]&2){f=Qq(a);if(f){break a}}f=0}Ii=g+16|0;return f}function AM(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,v=0,y=x(0),z=0,A=0,B=x(0),C=x(0),D=0,E=0,F=0,H=0,I=x(0),K=0;g=Ii-128|0;Ii=g;if(!b){J(7178,7192,250,7254);G()}a:{b:{c:{z=sra(q[c>>2],a,b,q[b+29100>>2],c);d:{if(!z){Pi(4,19954,19965,0);h=-11;break d}j=q[z>>2];o[j+3272|0]=r[c+20|0]<<2&4|r[j+3272|0]&251;e:{f:{D=j+1064|0;h=yw(a,q[c+32>>2],q[c+36>>2],D);if(h){break f}o[j+3272|0]=r[c+20|0]<<2&4|r[j+3272|0]&251;b=q[c+8>>2];g:{if(!b){h=0;Uo(j);break g}h:{while(1){if(b>>>0<=s>>>0){break b}b=q[c+4>>2];q[g+104>>2]=0;f=b+w(s,80)|0;h=f;i:{b=q[f+4>>2];j:{if(!b){break j}if(ak(a,b,g+104|0)){break j}b=vw(j,q[g+104>>2],q[h+4>>2]);if(b){break i}cj(a,q[g+104>>2])}q[g+64>>2]=q[h+4>>2];Pi(4,19954,20123,g- -64|0);h=-13;b=-13;if(s){break h}Uo(j);break g}m=q[b+140>>2];q[b+136>>2]=q[b+136>>2]&-513|q[c+20>>2]<<9&512;q[b+140>>2]=m;B=u[f+72>>2];y=u[f+64>>2];C=u[f+68>>2];if(!(y!=x(0)|C!=x(0)|B!=x(0))){y=u[f+56>>2];C=y;B=y}h=q[f+32>>2];m=q[f+36>>2];l=q[f+40>>2];i=q[f+44>>2];k=q[f+20>>2];n=q[f+16>>2];I=u[f+24>>2];u[b+40>>2]=B;u[b+36>>2]=C;u[b+32>>2]=y;u[b+24>>2]=I;q[b+16>>2]=n;q[b+20>>2]=k;q[b+8>>2]=l;q[b+12>>2]=i;q[b>>2]=h;q[b+4>>2]=m;m=b+104|0;wn(m,1);h=q[f>>2];l=wm(h,o[q[56654]]);k:{if(!l){q[g+96>>2]=h;Pi(4,19954,20020,g+96|0);break k}Cl(m,h,(l-h|0)+1|0)}if(eqa(j,b,q[f>>2])){q[g+80>>2]=q[f>>2];Pi(4,19954,20082,g+80|0)}b=q[c+8>>2];s=s+1|0;if(b>>>0>s>>>0){continue}break}b=0}h=b;l=0;while(1){l:{if(t[c+8>>2]>l>>>0){f=q[c+4>>2]+w(l,80)|0;m=CB(j,Oi(q[f>>2]),Li);if(!m){break c}i=q[f+12>>2];if(!i){break l}b=0;while(1){if(b>>>0>=i>>>0){break a}i=b<<2;k=q[i+q[f+8>>2]>>2];k=CB(j,It(m,k,hj(k)),Li);m:{if(k){k=qw(k,m);if(!k){break m}if(t[f+12>>2]<=b>>>0){break a}i=q[i+q[f+8>>2]>>2];n=q[f>>2];q[g+56>>2]=k;q[g+52>>2]=i;q[g+48>>2]=n;Pi(4,19954,20200,g+48|0);break m}if(t[f+12>>2]<=b>>>0){break a}q[g+32>>2]=q[i+q[f+8>>2]>>2];Pi(4,19954,20238,g+32|0)}b=b+1|0;i=q[f+12>>2];if(b>>>0>>0){continue}break}break l}break b}l=l+1|0;if((s|0)!=(l|0)){continue}break}Uo(j);m=g+104|4;i=0;while(1){n:{o:{if(t[c+8>>2]>i>>>0){k=q[c+4>>2]+w(i,80)|0;n=CB(j,Oi(q[k>>2]),Li);if(!Mt(j,n)){break o}b=q[n+84>>2];E=q[b+4>>2];if(!E){break n}K=q[b>>2];A=0;l=0;while(1){v=w(A,96)+K|0;f=q[v+16>>2];if(q[f+80>>2]){p:{q:{if(!(o[f+102|0]&1)){b=aj(q[v>>2],q[v+4>>2]);q[g+4>>2]=q[k>>2];q[g>>2]=b;Pi(4,19954,20258,g);break q}b=m;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[g+104>>2]=n;F=q[k+52>>2];if(!F){break p}b=0;r:{while(1){H=q[k+48>>2]+w(b,92)|0;if((Oi(q[H>>2])|0)==q[v>>2]&(Li|0)==q[v+4>>2]){b=HB(H+12|0);q[g+116>>2]=b;if(!b){break r}q[g+112>>2]=27;q[g+108>>2]=28;break p}b=b+1|0;if((F|0)==(b|0)){break p}if(t[k+52>>2]>b>>>0){continue}break}J(20476,20488,160,20529);G()}b=q[k>>2];q[g+20>>2]=d;q[g+16>>2]=b;Pi(4,19954,20365,g+16|0)}h=-13;break f}q[g+120>>2]=(n+(l<<2)|0)+156;Mi[q[f+80>>2]](g+104|0)|0;f=q[v+16>>2]}l=(p[f+102>>1]&1)+l|0;A=A+1|0;if((E|0)!=(A|0)){continue}break}break n}break b}dra(j,n);Ir(j,n);h=-13}i=i+1|0;if((s|0)!=(i|0)){continue}break}}if(q[c+16>>2]){Pi(4,19954,20429,0)}if(h){break f}h=0;break e}Dp(a,D);Nr(j);z=0}q[e>>2]=z}Ii=g+128|0;return h}J(20176,19886,113,20183);G()}J(20476,20488,244,20529);G()}J(20476,20488,151,20529);G()}function ZV(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;e=Ii-256|0;Ii=e;a:{if(!a){c=-27648;break a}if(!b){c=-27648;break a}c=q[b+12>>2];if(!c){c=-27648;break a}d=q[b+16>>2];j=q[b+20>>2];if(d>>>0>>0){c=-27648;break a}f=q[b+24>>2];if(f>>>0>d-j>>>0){c=-27648;break a}l=a+144|0;h=c+j|0;c=-27648;b:{c:{d:{e:{d=q[a+144>>2];g=0;f:{if(!d){break f}g=q[d+4>>2]}switch(g-2|0){case 4:case 6:case 8:break e;case 0:break d;default:break a}}c=-29056;d=q[a+4>>2];n=q[a+8>>2];k=d-n|0;i=k+q[a+16>>2]|0;if(i>>>0>f>>>0){break a}d=(d|0)!=12;g:{if(!(d|(n|0)!=4)){q[e>>2]=q[a+36>>2];d=r[h+4|0]|r[h+5|0]<<8|(r[h+6|0]<<16|r[h+7|0]<<24);q[e+4>>2]=r[h|0]|r[h+1|0]<<8|(r[h+2|0]<<16|r[h+3|0]<<24);q[e+8>>2]=d;break g}c=-27648;if((n|0)!=12|d){break a}q[e+8>>2]=q[a+44>>2];d=q[a+40>>2];q[e>>2]=q[a+36>>2];q[e+4>>2]=d;o[e+4|0]=r[e+4|0]^r[b|0];o[e+5|0]=r[e+5|0]^r[b+1|0];o[e+6|0]=r[e+6|0]^r[b+2|0];o[e+7|0]=r[e+7|0]^r[b+3|0];o[e+8|0]=r[e+8|0]^r[b+4|0];o[e+9|0]=r[e+9|0]^r[b+5|0];o[e+10|0]=r[e+10|0]^r[b+6|0];o[e+11|0]=r[e+11|0]^r[b+7|0]}q[b+24>>2]=f-i;q[b+20>>2]=k+j;Lq(e+192|0,e+188|0,b);Ti((q[a+8>>2]+a|0)+36|0,h,k);c=-29056;i=h+k|0;d=q[b+24>>2];a=HX(l,e,q[a+4>>2],e+192|0,q[e+188>>2],i,d,i,e+252|0,d+i|0,q[a+16>>2]);if((a|0)==-25344){break a}if(a){c=a;break a}c=-27648;if(q[e+252>>2]==q[b+24>>2]){break c}break a}c=q[a+4>>2];d=q[a+208>>2]>1?c:0;if(c+d>>>0>f>>>0){c=-29056;break a}g=d;d=q[a+12>>2];if((g+d|0)+1>>>0>f>>>0){c=-29056;break a}k=q[a+76>>2];if((k|0)==1){q[b+24>>2]=f-d;Lq(e+192|0,e+188|0,b);d=a- -64|0;il(d,e+192|0,q[e+188>>2]);il(d,h,q[b+24>>2]);em(d,e);bn(d);if(os(q[b+24>>2]+h|0,e,q[a+12>>2])){c=-29056;break a}f=q[b+24>>2];c=q[a+4>>2]}if((f>>>0)%(c>>>0)|0){c=-29056;break a}d=a+36|0;g=d;j=c;if(q[a+208>>2]>=2){Ti(a+36|0,h,c);q[b+20>>2]=q[b+20>>2]+c;f=q[b+24>>2]-c|0;q[b+24>>2]=f;h=c+h|0}c=LE(l,g,j,h,f,h,e+252|0);if(c){break a}g=q[b+24>>2];if((g|0)!=q[e+252>>2]){c=-27648;break a}if(q[a+208>>2]<=1){Ti(d,a+184|0,q[a+4>>2]);g=q[b+24>>2]}c=r[(h+g|0)-1|0];d=(k|0)==1?c>>>0>>0:(c+q[a+12>>2]|0)+1>>>0<=g>>>0;if(q[a+208>>2]<1){c=-27648;break a}l=d?c:0;m=l+1|0;c=g-256|0;c=c>>>0>g>>>0?0:c;h:{if(g>>>0<=c>>>0){f=0;break h}n=g-m|0;f=0;while(1){i=c>>>0>=n>>>0|i;f=((l|0)==r[c+h|0]?i:0)+f|0;c=c+1|0;if((g|0)!=(c|0)){continue}break}}j=d&(f|0)==(m|0);m=m&(j?511:0);d=g-m|0;q[b+24>>2]=d;if((k|0)!=1){q[b+24>>2]=d-q[a+12>>2];Lq(e+192|0,e+188|0,b);if(q[a+208>>2]<1){break b}c=q[b+24>>2];p=Ui(e,0,128);i:{j:{k:{d=q[a+64>>2];i=0;l:{if(!d){break l}i=q[d>>2]}switch(i-3|0){case 4:break j;case 0:case 1:case 3:break k;default:break b}}g=q[p+188>>2];d=(g+q[b+24>>2]|0)+8|0;k=d>>>6|0;i=d+m>>>6|0;break i}g=q[p+188>>2];d=(g+q[b+24>>2]|0)+16|0;k=d>>>7|0;i=d+m>>>7|0}l=c+m|0;d=l-256|0;n=d>>>0>l>>>0?0:d;f=a- -64|0;il(f,p+192|0,g);il(f,h,q[b+24>>2]);pD(q[b+24>>2]+h|0,m);em(f,p+128|0);c=0;i=i-k&(j?255:0);while(1){m:{if(!f){break m}d=q[f>>2];if(!d){break m}Mi[q[d+44>>2]](q[f+4>>2],p)|0}d=(c|0)==(i|0);c=c+1|0;if(!d){continue}break}bn(f);pD(h+n|0,q[a+12>>2]+(l-n|0)|0);if(os(q[b+24>>2]+h|0,p+128|0,q[a+12>>2])){c=-29056;break a}c=-29056;if(!(j^1)){break c}break a}c=-29056;if(!j){break a}}c=0;break a}c=-27648}Ii=e+256|0;return c}function Uv(a,b){var c=0,d=x(0),e=x(0),f=x(0),g=0,h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),v=0,y=x(0),z=x(0),A=x(0),B=x(0),C=0,D=x(0),E=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=0,N=0;c=Ii-160|0;Ii=c;q[b+384>>2]=1065353216;q[b+388>>2]=1065353216;q[b+392>>2]=1065353216;q[b+396>>2]=1065353216;r=u[b+40>>2];l=u[b+36>>2];A=u[b+32>>2];i=u[b+8>>2];j=u[b+4>>2];m=u[b>>2];a:{g=q[a+352>>2];b:{if((g|0)==2){o=x(1);p=x(1);break b}c:{d:{if(!g){break d}h=s[b+576>>1];if((h|0)==65535){break d}v=q[a+32>>2];if(h>>>0>=(q[a+36>>2]-v|0)/592>>>0){break a}h=v+w(h,592)|0;o=u[h+384>>2];p=u[h+388>>2];break c}h=q[a+12>>2];p=x(x(t[h+24>>2])/x(t[a+396>>2]));o=x(x(t[h+20>>2])/x(t[a+392>>2]));if(g){break c}if(s[b+576>>1]!=65535){break b}}d=o;e=p;e:{f:{g:{h:{v=q[b+412>>2];switch(v>>>16&3){case 1:break g;case 0:break h;default:break e}}d=op?o:p}e=d}C=q[a+12>>2];i:{j:{k:{l:{if(!g){break l}h=s[b+576>>1];if((h|0)==65535){break l}g=(q[a+36>>2]-q[a+32>>2]|0)/592|0;if(h>>>0>>0){break k}break a}M=q[a+396>>2];N=q[a+392>>2];if(!g){break j}h=s[b+576>>1];if((h|0)==65535){break j}g=(q[a+36>>2]-q[a+32>>2]|0)/592|0}f=x(0);if(g>>>0>h>>>0){break i}break a}k=x(x(x(t[C+20>>2])-x(d*x(N>>>0)))*x(.5));f=x(x(x(t[C+24>>2])-x(e*x(M>>>0)))*x(.5))}u[b+388>>2]=e;u[b+384>>2]=d;g=(v>>>10&3)-1>>>0<2;j=x(x(j*(g?p:e))+(g?x(0):f));g=(v>>>8&3)-1>>>0<2;m=x(x(m*(g?o:d))+(g?x(0):k));i=x(i+x(0))}g=q[b+20>>2];h=q[b+16>>2];u[c+136>>2]=u[b+24>>2];q[c+128>>2]=h;q[c+132>>2]=g;en(c+144|0,c+128|0);n=u[c+144>>2];e=u[c+148>>2];f=u[c+152>>2];k=u[c+156>>2];d=x(x(1)/x(F(x(x(x(x(n*n)+x(e*e))+x(f*f))+x(k*k)))));e=x(e*d);u[c+148>>2]=e;f=x(f*d);u[c+152>>2]=f;k=x(k*d);u[c+156>>2]=k;d=x(n*d);u[c+144>>2]=d;u[b+376>>2]=i;u[b+372>>2]=j;u[b+368>>2]=m;i=x(f+f);y=x(d*i);j=x(e+e);B=x(k*j);D=x(y-B);n=x(D*x(0));E=x(e*i);z=x(d+d);H=x(k*z);I=x(E+H);K=x(I*x(0));m=x(r*u[b+392>>2]);r=x(x(1)-x(d*z));z=x(e*j);L=x(r-z);u[b+360>>2]=x(n+K)+x(m*L);e=x(l*u[b+388>>2]);l=x(L*x(0));u[b+344>>2]=x(n+x(e*I))+l;n=x(A*u[b+384>>2]);u[b+328>>2]=x(x(n*D)+K)+l;l=x(E-H);d=x(d*j);j=x(k*i);k=x(d+j);A=x(k*x(0));i=x(f*i);f=x(r-i);r=x(f*x(0));u[b+356>>2]=x(l*m)+x(A+r);y=x(y+B);B=x(y*m);d=x(d-j);j=x(d*x(0));i=x(x(x(1)-z)-i);m=x(i*x(0));u[b+352>>2]=B+x(j+m);l=x(l*x(0));u[b+340>>2]=l+x(A+x(e*f));f=x(y*x(0));u[b+336>>2]=f+x(x(e*d)+m);u[b+324>>2]=l+x(x(n*k)+r);u[b+320>>2]=f+x(j+x(n*i));if(!(s[b+576>>1]==65535|q[a+352>>2]!=1)){q[c+24>>2]=0;q[c+28>>2]=0;u[c+20>>2]=x(1)/p;q[c+32>>2]=0;q[c+36>>2]=0;q[c+44>>2]=0;q[c+48>>2]=0;q[c+40>>2]=1065353216;q[c+52>>2]=0;q[c+56>>2]=0;q[c+60>>2]=1065353216;q[c+4>>2]=0;q[c+8>>2]=0;u[c>>2]=x(1)/o;q[c+12>>2]=0;q[c+16>>2]=0;_k(c- -64|0,c,b+320|0);u[b+320>>2]=u[c+64>>2];u[b+324>>2]=u[c+68>>2];u[b+328>>2]=u[c+72>>2];u[b+332>>2]=u[c+76>>2];u[b+336>>2]=u[c+80>>2];u[b+340>>2]=u[c+84>>2];u[b+344>>2]=u[c+88>>2];u[b+348>>2]=u[c+92>>2];u[b+352>>2]=u[c+96>>2];u[b+356>>2]=u[c+100>>2];u[b+360>>2]=u[c+104>>2];u[b+364>>2]=u[c+108>>2];u[b+368>>2]=u[c+112>>2];u[b+372>>2]=u[c+116>>2];u[b+376>>2]=u[c+120>>2];u[b+380>>2]=u[c+124>>2]}q[b+412>>2]=q[b+412>>2]&-4194305;Ii=c+160|0;return}J(201665,201514,479,201676);G()}function BQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=Ii-1680|0;Ii=b;l=1;f=kj(a,1,b+1672|0);d=q[b+1672>>2];c=b+632|0;q[c+4>>2]=0;q[c+8>>2]=a;q[c>>2]=c+12;a:{if((d|0)>=1){m=f+d|0;n=b+608|1;j=b+1668|0;g=1;while(1){c=r[f|0];b:{if((c|0)!=37){e=q[b+632>>2];if(j>>>0<=e>>>0){ml(b+632|0);e=q[b+632>>2];c=r[f|0]}q[b+632>>2]=e+1;o[e|0]=c;f=f+1|0;break b}h=f+1|0;c=r[f+1|0];if((c|0)==37){e=37;c=q[b+632>>2];if(j>>>0<=c>>>0){ml(b+632|0);e=r[h|0];c=q[b+632>>2]}q[b+632>>2]=c+1;o[c|0]=e;f=f+2|0;break b}d=0;f=h;c:{if(!c){break c}while(1){if((c&255)>>>0>63){d=c;break c}k=c&31;if((c&63)>>>0>=32){e=1<>>32-k;k=1<>>0>=6){Qi(a,146630,0);d=r[f|0]}c=(d&255)-48>>>0<10?e:c;c=r[c|0]-48>>>0<10?c+1|0:c;f=r[c|0];if((f|0)==46){f=r[c+1|0]-48>>>0<10;d=f?c+2|0:c+1|0;c=r[(f?2:1)+c|0]-48>>>0<10?d+1|0:d;f=r[c|0]}if((f&255)-48>>>0<=9){Qi(a,146662,0)}g=g+1|0;o[b+608|0]=37;f=(c-h|0)+1|0;o[Dx(n,h,f)+f|0]=0;f=c+1|0;d:{e:{f:{g:{h:{i:{j:{k:{c=o[c|0];switch(c-69|0){case 0:case 2:case 32:case 33:case 34:break e;case 46:break g;case 44:break h;case 19:case 42:case 48:case 51:break i;case 31:case 36:break j;case 30:break k;default:break f}}c=b;i=fj(a,g);l:{if(y(i)<2147483648){d=~~i;break l}d=-2147483648}q[c+16>>2]=d;mn(b+96|0,b+608|0,b+16|0);break d}c=hj(b+608|0)+(b+608|0)|0;d=c-1|0;h=r[d|0];o[d|0]=108;o[d+1|0]=0;o[c+1|0]=0;o[c|0]=h;c=b;i=fj(a,g);m:{if(y(i)<2147483648){d=~~i;break m}d=-2147483648}q[c+32>>2]=d;mn(b+96|0,b+608|0,b+32|0);break d}c=hj(b+608|0)+(b+608|0)|0;d=c-1|0;h=r[d|0];o[d|0]=108;o[d+1|0]=0;o[c+1|0]=0;o[c|0]=h;c=b;i=fj(a,g);n:{if(i<4294967296&i>=0){d=~~i>>>0;break n}d=0}q[c+48>>2]=d;mn(b+96|0,b+608|0,b+48|0);break d}c=kj(a,g,b+1676|0);e=q[b+632>>2];if(j>>>0<=e>>>0){ml(b+632|0);e=q[b+632>>2]}q[b+632>>2]=e+1;o[e|0]=34;d=q[b+1676>>2];q[b+1676>>2]=d-1;if(d){while(1){o:{p:{q:{r:{s:{t:{e=o[c|0];switch(e|0){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 11:case 12:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:break p;case 0:break q;case 13:break r;case 10:case 34:break s;default:break t}}if((e|0)!=92){break p}}e=q[b+632>>2];if(j>>>0<=e>>>0){ml(b+632|0);e=q[b+632>>2]}q[b+632>>2]=e+1;o[e|0]=92;e=q[b+632>>2];if(j>>>0<=e>>>0){ml(b+632|0);e=q[b+632>>2]}d=r[c|0];q[b+632>>2]=e+1;o[e|0]=d;break o}qn(b+632|0,146707,2);break o}qn(b+632|0,146710,4);break o}d=q[b+632>>2];if(j>>>0<=d>>>0){ml(b+632|0);e=r[c|0];d=q[b+632>>2]}q[b+632>>2]=d+1;o[d|0]=e}d=q[b+1676>>2];q[b+1676>>2]=d-1;c=c+1|0;if(d){continue}break}}c=q[b+632>>2];if(j>>>0<=c>>>0){ml(b+632|0);c=q[b+632>>2]}q[b+632>>2]=c+1;o[c|0]=34;break b}c=kj(a,g,b+1676|0);if(!(gk(b+608|0,46)|t[b+1676>>2]<100)){ej(a,g);Os(b+632|0);break b}q[b+80>>2]=c;mn(b+96|0,b+608|0,b+80|0);break d}q[b>>2]=c;l=Qi(a,146596,b);break a}v[b+64>>3]=fj(a,g);cu(b+96|0,b+608|0,b- -64|0)}qn(b+632|0,b+96|0,hj(b+96|0))}if(f>>>0>>0){continue}break}}zm(b+632|0)}Ii=b+1680|0;return l|0}function XC(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0;a:{i=r[a+75|0];b:{if(i>>>0>250){break b}e=r[a+74|0];if((e&5)==4|r[a+73|0]+(e&1)>>>0>i>>>0){break b}u=r[a+72|0];if((u|0)>2]){break b}l=q[a+44>>2];if((l|0)<1){break b}d=q[a+48>>2];if(!(!d|(d|0)==(l|0))){break b}m=q[a+12>>2];p=l-1|0;d=q[m+(p<<2)>>2];if((d&63)!=30){break b}h=d;if((b|0)<1){break b}w=(e&6)!=2;k=p;while(1){n=(g<<2)+m|0;h=q[n>>2];s=h&63;if(s>>>0>37){break a}j=h>>>6&255;if(j>>>0>=i>>>0){break a}e=r[s+141360|0];t=e<<24>>24;d=0;f=0;c:{d:{switch(e&3){case 0:f=h>>>23|0;e:{f:{switch(e>>>4&3){case 0:if(!f){break e}break a;case 2:if(f>>>0>>0){break e}break a;case 3:break f;default:break e}}if((h|0)<=-1){if(q[a+40>>2]>(f&255)){break e}break a}if(f>>>0>>0){break e}break a}o=h>>>14|0;e=o&511;d=e;g:{switch(t>>>2&3){case 0:d=0;h=0;if(!e){break c}break b;case 2:d=e;if(d>>>0>>0){break c}break a;case 3:break g;default:break c}}if(h&4194304){d=e;if(q[a+40>>2]>(o&255)){break c}break a}d=e;if(d>>>0>>0){break c}break a;case 1:f=h>>>14|0;if((e&48)!=48){break c}h=0;if(q[a+40>>2]>(f|0)){break c}break b;case 2:break d;default:break c}}o=h>>>14|0;f=o-131071|0;if((e&48)!=32){break c}h=0;v=f+g|0;d=v+1|0;if((d|0)<0|(d|0)>=(l|0)){break b}if((d|0)<1){d=0;break c}d=(g+o|0)-131070|0;e=0;h:{while(1){if((q[(v-e<<2)+m>>2]&8372287)!=34){break h}e=e+1|0;if((d|0)!=(e|0)){continue}break}e=d}d=0;if(e&1){break b}}if((t|0)<=-1){h=0;if((q[n+4>>2]&63)!=22|(g+2|0)>=(l|0)){break b}}k=(c|0)==(j|0)?(t&64)>>>6|0?g:k:k;i:{j:{k:{l:{m:{n:{o:{p:{q:{switch(s-2|0){case 0:if((d|0)!=1){break i}h=0;if((g+2|0)>=(l|0)){break b}if((q[n+4>>2]&8372287)!=34){break i}break b;case 1:k=(c|0)<(j|0)?k:(c|0)>(f|0)?k:g;break i;case 2:case 6:if((f|0)<(u|0)){break i}break a;case 3:case 5:if(q[(q[a+8>>2]+(f<<4)|0)+8>>2]==4){break i}break a;case 9:d=j+1|0;if(d>>>0>=i>>>0){break a}k=(c|0)==(d|0)?g:k;break i;case 19:if((d|0)>(f|0)){break i}break a;case 31:h=0;if(!d){break b}e=d;d=j+2|0;if(e+d>>>0>=i>>>0){break b}k=(c|0)<(d|0)?k:g;break i;case 35:break k;case 34:break l;case 32:break m;case 28:break n;case 26:case 27:break o;case 20:break p;case 29:case 30:break q;default:break i}}if(j+3>>>0>>0){break p}break a}d=(f+g|0)+1|0;g=((b|0)<(d|0)?0:(c|0)==255?0:(d|0)<=(g|0)?0:f)+g|0;break i}h=0;if((f+j|0)>(i|0)?f:0){break b}r:{if(!d){d=q[n+4>>2];e=d&63;if((e|0)!=34?e-28>>>0>=3:0){break b}if(d>>>0<=8388607){break r}break b}d=d-1|0;if(!d){break r}if((d+j|0)>(i|0)){break b}}k=(c|0)<(j|0)?k:g;break i}if((f|0)<2|((f+j|0)-1|0)<=(i|0)){break i}break a}h=0;if((f+j|0)>=(i|0)?(f|0)>=1:0){break b}if(d){break i}g=g+1|0;if((p|0)>(g|0)){break i}break b}h=0;if(q[a+52>>2]<=(f|0)){break b}d=r[q[q[a+16>>2]+(f<<2)>>2]+72|0];f=d+g|0;if((f|0)>=(l|0)){break b}e=1;if(!d){break j}while(1){if(r[(e+g<<2)+m|0]&59){break b}j=(d|0)==(e|0);e=e+1|0;if(!j){continue}break}break j}h=0;if(w){break b}if(!f){d=q[n+4>>2];e=d&63;if(((e|0)!=34?e-28>>>0>=3:0)|d>>>0>8388607){break b}}if(((f+j|0)-1|0)>(i|0)){break b}break i}g=(c|0)==255?g:f}g=g+1|0;if((g|0)<(b|0)){continue}break}h=q[(k<<2)+m>>2]}return h}return 0}function b9(a,b){var c=0,d=0,e=0,f=0,g=0,h=x(0),i=0,j=0,k=0,l=0,m=0,n=x(0),v=0,y=0,z=x(0),A=x(0),B=x(0),C=x(0),D=0,E=x(0),F=x(0),H=0,I=0,K=0,L=0;a:{b:{c:{d:{if(b){d=b&65535;c=q[a>>2];if(d>>>0>=q[a+4>>2]-c>>2>>>0){break c}e=q[c+(d<<2)>>2];if(s[e+80>>1]==(b>>>16|0)){break d}Pi(4,150692,151414,0)}return}c=q[e+72>>2];if(c){Ni(c);q[e+16>>2]=0;q[e+72>>2]=0}m=q[e+64>>2];i=q[m+16>>2];e:{f:{g:{d=(q[m+4>>2]-q[m>>2]|0)/18568|0;g=q[e>>2];c=q[e+4>>2]-g|0;f=(c|0)/304|0;h:{if((d|0)==(f|0)){break h}i:{if(d>>>0>=f>>>0){break i}if(d>>>0<(c|0)/304>>>0){c=d;while(1){g=w(c,304)+g|0;if(o[g+68|0]&1){break b}Wi(0,160,g+56|0,g- -64|0,g+60|0);c=c+1|0;if((f|0)==(c|0)){break i}g=q[e>>2];if((q[e+4>>2]-g|0)/304>>>0>c>>>0){continue}break}}break c}if(o[e+12|0]&1){break b}Wi(d,304,e,e+8|0,e+4|0);c=q[e>>2];if(d>>>0>(q[e+8>>2]-c|0)/304>>>0){break g}q[e+4>>2]=c+w(d,304);if(d>>>0<=f>>>0){break h}Ui(c+w(f,304)|0,0,w(d-f|0,304));g=Jk();c=f;while(1){k=q[e>>2];if((q[e+4>>2]-k|0)/304>>>0<=c>>>0){break c}j=s[a+54>>1];p[a+54>>1]=j+1;if(t[i+4>>2]<=c>>>0){break a}k=k+w(c,304)|0;j=j+(c+g|0)|0;nA(k,q[i>>2]+w(c,160)|0,j);q[k+276>>2]=j;c=c+1|0;if((d|0)!=(c|0)){continue}break}}d=d>>>0>f>>>0?f:d;if(d){c=0;while(1){f=q[e>>2];if((q[e+4>>2]-f|0)/304>>>0<=c>>>0){break c}if(t[i+4>>2]<=c>>>0){break a}f=f+w(c,304)|0;nA(f,q[i>>2]+w(c,160)|0,q[f+272>>2]);c=c+1|0;if((d|0)!=(c|0)){continue}break}}k=q[e+4>>2];d=q[e>>2];i=k-d|0;f=(i|0)/304|0;if(!i){q[e+76>>2]=0;break e}c=0;j=f>>>0>1?f:1;v=q[m>>2];y=j-1>>>0<(q[m+4>>2]-v|0)/18568>>>0;while(1){if(!y){break c}E=n;h=u[e+76>>2];g=w(c,304)+d|0;z=u[g+288>>2];A=u[g+284>>2];B=u[(v+w(c,18568)|0)+18564>>2];if(!(h>x(z+x(A+B))^1)){C=x(x(1)/A);h=x(C*x(h-z));j:{if(h=x(0)){l=~~h>>>0;break j}l=0}g=l;F=x(h-x(g>>>0));h=x(C*B);k:{if(h=x(0)){l=~~h>>>0;break k}l=0}h=x(z+x(A*x(F+x(l+1>>>0))))}n=h>2]=n;if(!i){break e}l:{if((d|0)!=(k|0)){k=f>>>0>1?f:1;f=0;while(1){j=q[m>>2];if((q[m+4>>2]-j|0)/18568>>>0<=f>>>0){break c}c=q[m+16>>2];if(t[c+4>>2]<=f>>>0){break l}d=w(f,304)+d|0;i=q[d+56>>2];v=q[c>>2];q[d+56>>2]=0;y=r[d+68|0];o[d+68|0]=y&254;g=q[d+272>>2];H=q[d+284>>2];I=q[d+288>>2];n=u[d+292>>2];K=q[d+132>>2];L=q[d+128>>2];D=d- -64|0;l=q[D>>2];c=Ui(d,0,304);q[D>>2]=l;q[c+128>>2]=L;q[c+132>>2]=K;u[c+292>>2]=n;q[c+284>>2]=H;q[c+288>>2]=I;q[c+276>>2]=g;q[c+272>>2]=g;q[c+60>>2]=i;g=q[c+56>>2];q[c+56>>2]=i;l=d;d=r[d+68|0];o[l+68|0]=d&254|y&1;if(!(!g|d&1)){Ni(g)}d=q[c+280>>2];n=u[e+76>>2];q[c+280>>2]=1;m:{if((d|0)==1){break m}d=q[e+72>>2];if(!d){break m}i=q[e+16>>2]+1|0;q[e+16>>2]=i;Mi[q[e+68>>2]](i,q[c+128>>2],q[c+132>>2],1,d)}o[c+296|0]=r[c+296|0]&247;h=x(0);if(!(n>x(0)^1)){d=j+w(f,18568)|0;i=v+w(f,160)|0;while(1){jA(e,d,c,i,x(.01666666753590107));h=x(h+x(.01666666753590107));if(n>h){continue}break}}f=f+1|0;if((k|0)==(f|0)){break e}d=q[e>>2];if((q[e+4>>2]-d|0)/304>>>0>f>>>0){continue}break}}break c}break a}c9(a,b);return}J(151947,151192,479,151403);G()}J(151117,151192,493,151248);G()}J(151361,151373,270,151403);G()}function dia(a){var b=0,c=0,d=0,e=0;d=q[a+16>>2];b=q[a>>2];e=q[b+8>>2]-q[b+12>>2]>>4;Ak(b,75835,232784);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75844);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75860);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75882);a:{if(!d){break a}if(Mi[q[75007]](d,0)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75904)}if(Mi[q[75007]](d,2)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75929)}if(Mi[q[75007]](d,3)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75948)}if(Mi[q[75007]](d,6)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=6;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75968)}if(Mi[q[75007]](d,7)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=7;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,75989)}if(Mi[q[75007]](d,8)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=8;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76012)}if(Mi[q[75007]](d,9)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=9;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76044)}if(Mi[q[75007]](d,10)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=10;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76076)}if(Mi[q[75007]](d,11)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=11;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76109)}if(Mi[q[75007]](d,12)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=12;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76142)}if(Mi[q[75007]](d,15)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=15;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76166)}if(Mi[q[75007]](d,16)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=16;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76191)}if(Mi[q[75007]](d,17)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=17;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76220)}if(Mi[q[75007]](d,18)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=18;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76243)}if(Mi[q[75007]](d,19)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=19;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76267)}if(Mi[q[75007]](d,20)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=20;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76288)}if(Mi[q[75007]](d,21)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=21;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76310)}if(Mi[q[75007]](d,22)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=22;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76334)}if(Mi[q[75007]](d,23)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=23;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76356)}if(Mi[q[75007]](d,24)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=24;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76378)}if(Mi[q[75007]](d,25)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=25;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76401)}if(Mi[q[75007]](d,26)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=26;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76424)}if(Mi[q[75007]](d,27)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=27;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76444)}if(Mi[q[75007]](d,28)|0){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=28;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76465)}if(!(Mi[q[75007]](d,29)|0)){break a}d=q[b+8>>2];q[d+8>>2]=3;v[d>>3]=29;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76485)}d=q[b+8>>2];q[d+8>>2]=3;v[d>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76506);d=q[b+8>>2];q[d+8>>2]=3;v[d>>3]=3;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,76531);Ri(b,-2);if(q[b+8>>2]-q[b+12>>2]>>4!=(e|0)){J(76560,76581,2908,76624);G()}q[74445]=q[a+4>>2];q[74446]=q[a+16>>2]}function Ni(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;a:{if(!a){break a}d=a-8|0;b=q[a-4>>2];a=b&-8;f=d+a|0;b:{if(b&1){break b}if(!(b&3)){break a}b=q[d>>2];d=d-b|0;if(d>>>0>>0<=255){e=q[d+8>>2];b=b>>>3|0;c=q[d+12>>2];if((c|0)==(e|0)){q[240591]=q[240591]&Fza(-2,b);break b}q[e+12>>2]=c;q[c+8>>2]=e;break b}h=q[d+24>>2];b=q[d+12>>2];c:{if((d|0)!=(b|0)){c=q[d+8>>2];q[c+12>>2]=b;q[b+8>>2]=c;break c}d:{e=d+20|0;c=q[e>>2];if(c){break d}e=d+16|0;c=q[e>>2];if(c){break d}b=0;break c}while(1){g=e;b=c;e=b+20|0;c=q[e>>2];if(c){continue}e=b+16|0;c=q[b+16>>2];if(c){continue}break}q[g>>2]=0}if(!h){break b}e=q[d+28>>2];c=(e<<2)+962668|0;e:{if(q[c>>2]==(d|0)){q[c>>2]=b;if(b){break e}q[240592]=q[240592]&Fza(-2,e);break b}q[h+(q[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break b}}q[b+24>>2]=h;c=q[d+16>>2];if(c){q[b+16>>2]=c;q[c+24>>2]=b}c=q[d+20>>2];if(!c){break b}q[b+20>>2]=c;q[c+24>>2]=b;break b}b=q[f+4>>2];if((b&3)!=3){break b}q[240593]=a;q[f+4>>2]=b&-2;q[d+4>>2]=a|1;q[a+d>>2]=a;return}if(d>>>0>=f>>>0){break a}b=q[f+4>>2];if(!(b&1)){break a}f:{if(!(b&2)){if(q[240597]==(f|0)){q[240597]=d;a=q[240594]+a|0;q[240594]=a;q[d+4>>2]=a|1;if(q[240596]!=(d|0)){break a}q[240593]=0;q[240596]=0;return}if(q[240596]==(f|0)){q[240596]=d;a=q[240593]+a|0;q[240593]=a;q[d+4>>2]=a|1;q[a+d>>2]=a;return}a=(b&-8)+a|0;g:{if(b>>>0<=255){c=q[f+8>>2];b=b>>>3|0;e=q[f+12>>2];if((c|0)==(e|0)){q[240591]=q[240591]&Fza(-2,b);break g}q[c+12>>2]=e;q[e+8>>2]=c;break g}h=q[f+24>>2];b=q[f+12>>2];h:{if((f|0)!=(b|0)){c=q[f+8>>2];q[c+12>>2]=b;q[b+8>>2]=c;break h}i:{e=f+20|0;c=q[e>>2];if(c){break i}e=f+16|0;c=q[e>>2];if(c){break i}b=0;break h}while(1){g=e;b=c;e=b+20|0;c=q[e>>2];if(c){continue}e=b+16|0;c=q[b+16>>2];if(c){continue}break}q[g>>2]=0}if(!h){break g}e=q[f+28>>2];c=(e<<2)+962668|0;j:{if(q[c>>2]==(f|0)){q[c>>2]=b;if(b){break j}q[240592]=q[240592]&Fza(-2,e);break g}q[h+(q[h+16>>2]==(f|0)?16:20)>>2]=b;if(!b){break g}}q[b+24>>2]=h;c=q[f+16>>2];if(c){q[b+16>>2]=c;q[c+24>>2]=b}c=q[f+20>>2];if(!c){break g}q[b+20>>2]=c;q[c+24>>2]=b}q[d+4>>2]=a|1;q[a+d>>2]=a;if(q[240596]!=(d|0)){break f}q[240593]=a;return}q[f+4>>2]=b&-2;q[d+4>>2]=a|1;q[a+d>>2]=a}if(a>>>0<=255){a=a>>>3|0;b=(a<<3)+962404|0;c=q[240591];a=1<>2]}q[b+8>>2]=d;q[a+12>>2]=d;q[d+12>>2]=b;q[d+8>>2]=a;return}e=31;q[d+16>>2]=0;q[d+20>>2]=0;if(a>>>0<=16777215){b=a>>>8|0;g=b+1048320>>>16&8;b=b<>>16&4;b=b<>>16&2;b=(b<>>15|0)-(c|(e|g))|0;e=(b<<1|a>>>b+21&1)+28|0}q[d+28>>2]=e;g=(e<<2)+962668|0;l:{m:{c=q[240592];b=1<>2]=d;q[d+24>>2]=g;break n}e=a<<((e|0)==31?0:25-(e>>>1|0)|0);b=q[g>>2];while(1){c=b;if((q[b+4>>2]&-8)==(a|0)){break m}b=e>>>29|0;e=e<<1;g=c+(b&4)|0;b=q[g+16>>2];if(b){continue}break}q[g+16>>2]=d;q[d+24>>2]=c}q[d+12>>2]=d;q[d+8>>2]=d;break l}a=q[c+8>>2];q[a+12>>2]=d;q[c+8>>2]=d;q[d+24>>2]=0;q[d+12>>2]=c;q[d+8>>2]=a}a=q[240599]-1|0;q[240599]=a;if(a){break a}d=962820;while(1){a=q[d>>2];d=a+8|0;if(a){continue}break}q[240599]=-1}}function nma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0;b=Ii-432|0;Ii=b;p=q[a+8>>2]-q[a+12>>2]>>4;l=kj(a,1,0);jB(a,l,78130,b+168|0);x=q[q[jk(a)+80>>2]+8>>2];Dj(a,2,5);h=np(a,78140);i=np(a,78145);d=np(a,77433);e=np(a,77439);Xi(a,78152);ik(a,2);f=mp(a,78152,0);Ri(a,-2);a:{b:{c:{if(h&-3){f=b;if(h>>>0<=2){c=q[(h<<2)+245820>>2]}else{c=86458}q[f+128>>2]=c;g=Qi(a,78164,b+128|0);break c}Xi(a,78221);ik(a,2);k=mp(a,78221,0);Ri(a,-2);if((Ll(a,3)|0)==q[74077]){c=gt(a,3);if(q[c+4>>2]==2){c=q[c>>2]+4|0}m=q[c>>2]}c=KK((d>>>0>e>>>0?d:e)&65535);d:{if(f>>>0<=c>>>0){c=f;break d}q[b+112>>2]=c;q[b+108>>2]=e;q[b+104>>2]=d;q[b+100>>2]=l;q[b+96>>2]=f;Pi(3,78238,78246,b+96|0)}if(!(m|!k)){q[b+84>>2]=l;q[b+80>>2]=k;Pi(3,78238,78337,b+80|0);k=0}f=IK(i);e:{f:{g:{if(h>>>0<3){n=-1;n=i>>>0<=29?q[(i<<2)+79480>>2]:n;q[b+160>>2]=0;q[b+164>>2]=0;q[b+152>>2]=0;q[b+156>>2]=0;if(!(Mi[q[75007]](q[74446],i)|0)){f=b;if(i>>>0<=29){c=q[(i<<2)+245844>>2]}else{c=87439}q[f+64>>2]=c;g=Qi(a,78473,b- -64|0);break c}if(!(!k|h-1>>>0>1)){f=b;if(h>>>0<=2){c=q[(h<<2)+245820>>2]}else{c=86458}q[f+8>>2]=c;q[b+4>>2]=l;q[b>>2]=k;g=Qi(a,78529,b);break c}i=(c?c:1)&255;c=i<<2;r=$i(c);s=$i(c);u=$i(4);if(!i){break g}c=h<<2;y=q[c+79468>>2];h=q[c+79428>>2];z=w(h,f&255);f=e;c=d;while(1){v=j<<2;A=c;B=f;c=c&65535;f=f&65535;q[v+r>>2]=(c>>>0>f>>>0?A:B)&65535;q[s+v>>2]=g>>>3;g=w(c,w(f,z))+g|0;f=f>>>1|0;c=c>>>1|0;j=j+1|0;if((i|0)!=(j|0)){continue}break}if(!g){break g}h:{if(m){q[b+176>>2]=0;q[b+136>>2]=0;Wo(m,b+176|0,b+136|0);j=q[b+136>>2];f=q[b+176>>2];break h}j=w(g,h)>>>3|0;f=$i(j)}q[u>>2]=j;c=$i(64);q[b+164>>2]=h;q[b+160>>2]=y;q[b+156>>2]=1;q[b+152>>2]=c;q[c+48>>2]=0;q[c+52>>2]=0;q[c+44>>2]=k;q[c+16>>2]=n;e=e&65535;q[c+12>>2]=e;d=d&65535;q[c+8>>2]=d;q[c+4>>2]=e;q[c>>2]=d;q[c+40>>2]=j;q[c+36>>2]=f;q[c+60>>2]=1;q[c+56>>2]=u;q[c+32>>2]=i;q[c+28>>2]=r;q[c+24>>2]=i;q[c+20>>2]=s;q[b+144>>2]=0;q[b+148>>2]=0;q[b+136>>2]=0;q[b+140>>2]=0;if(Nt(b+152|0,q[61786],b+136|0)){break f}g=0;q[b+132>>2]=0;c=q[b+136>>2];c=Uz(q[74445],l,c,q[b+140>>2]-c|0,b+132|0);if(!q[b+156>>2]){break e}if(!m){while(1){d=q[b+152>>2]+(g<<6)|0;e=q[d+20>>2];if(e){Ni(e)}e=q[d+28>>2];if(e){Ni(e)}e=q[d+56>>2];if(e){Ni(e)}d=q[d+36>>2];if(d){Ni(d)}g=g+1|0;if(g>>>0>2]){continue}break e}}while(1){d=q[b+152>>2]+(g<<6)|0;e=q[d+20>>2];if(e){Ni(e)}e=q[d+28>>2];if(e){Ni(e)}d=q[d+56>>2];if(d){Ni(d)}g=g+1|0;if(g>>>0>2]){continue}break}break e}J(77974,76581,550,78666);G()}J(78697,76581,577,78711);G()}J(77e3,76581,848,78627);G()}d=q[b+152>>2];if(d){Ni(d)}i:{if(c){if(q[a+8>>2]-q[a+12>>2]>>4!=(p|0)){break b}d=q[b+168>>2];e=q[b+172>>2];q[b+48>>2]=aj(d,e);q[b+40>>2]=d;q[b+44>>2]=e;q[b+32>>2]=c;sj(b+176|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+32|0);q[b+16>>2]=b+176;g=Qi(a,75832,b+16|0);break i}c=q[b+168>>2];d=q[b+172>>2];KB(x,c,d);lk(a,c,d);g=1;if((p+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}}if(o[b+148|0]&1){break c}a=q[b+136>>2];if(!a){break c}Ni(a)}Ii=b+432|0;return g|0}J(76560,76581,857,78627);G()}J(78641,76581,864,78627);G()}function Wp(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,u=0,w=0;s=Ii-112|0;Ii=s;a:{b:{switch(q[c+8>>2]-1|0){case 2:j=v[c>>3];if(j==0){f=q[b+16>>2];d=f;break a}f=q[b+16>>2];Oza(+j);e=Lza(1)|0;d=Lza(0)|0;e=d+e|0;d=f+((e>>>0)%((-1<>>0)<<5)|0;break a;case 3:f=q[b+16>>2];d=f+((q[q[c>>2]+8>>2]&(-1<>2];d=f+((q[c>>2]&(-1<>2];d=f+(t[c>>2]%((-1<>>0)<<5)|0;break a;default:break b}}f=q[b+16>>2];d=f+(t[c>>2]%((-1<>>0)<<5)|0}c:{d:{if(q[d+8>>2]?0:(d|0)!=142616){break d}e=q[b+20>>2];e:{f:{g:{h:{i:{j:{k:{while(1){i=e;e=e-32|0;q[b+20>>2]=e;if(f>>>0>=i>>>0){break k}if(q[i-8>>2]){continue}break}switch(q[d+24>>2]-1|0){case 1:break g;case 0:break h;case 3:break i;case 2:break j;default:break f}}n=Ui(s,0,108);d=q[b+28>>2];h=1;i=1;while(1){l:{g=i;if((d|0)<(g|0)){g=d;if((d|0)<(h|0)){break l}}e=0;if((g|0)>=(h|0)){m=q[b+12>>2];while(1){e=(q[(m+(h<<4)|0)-8>>2]!=0)+e|0;p=(g|0)!=(h|0);h=h+1|0;if(p){continue}break}h=g+1|0}g=(k<<2)+n|0;q[g>>2]=q[g>>2]+e;i=i<<1;u=e+u|0;k=k+1|0;if((k|0)!=27){continue}}break}h=-1<>2]){d=0;m:{if(q[e+24>>2]!=3){break m}j=v[e+16>>3];n:{if(y(j)<2147483648){e=~~j;break n}e=-2147483648}if(+(e|0)!=j){break m}e=e-1|0;if(e>>>0>67108863){break m}d=1;e=(Gy(e)<<2)+n|0;q[e+4>>2]=q[e+4>>2]+1}i=d+i|0;g=g+1|0}if(h){h=h-1|0;f=q[b+16>>2];continue}break}i=i+u|0;d=0;e=0;o:{if(q[c+8>>2]!=3){break o}j=v[c>>3];p:{if(y(j)<2147483648){f=~~j;break p}f=-2147483648}if(+(f|0)!=j){break o}f=f-1|0;if(f>>>0>67108863){break o}e=1;f=(Gy(f)<<2)+n|0;q[f+4>>2]=q[f+4>>2]+1}h=1;m=e+i|0;q:{if((m|0)<1){i=0;k=0;break q}k=0;i=0;e=0;f=0;while(1){w=k;k=q[(f<<2)+n>>2];p=(k|0)>0;l=d;d=e+k|0;l=p&(l|0)<(d|0);k=l?h:w;i=l?d:i;e=p?d:e;if((m|0)==(e|0)){break q}f=f+1|0;d=h&2147483647;h=h<<1;if((d|0)<(m|0)){continue}break}}Wx(a,b,k,((g+u|0)-i|0)+1|0);d=Rs(b,c);o[b+6|0]=0;if((d|0)!=141056){break c}r:{s:{switch(q[c+8>>2]){case 0:Yk(a,142553,0);d=Wp(a,b,c);break c;case 3:break s;default:break r}}j=v[c>>3];if(j==j){break r}Yk(a,142572,0)}d=Wp(a,b,c);break c}j=v[d+16>>3];if(j==0){break e}l=f;Oza(+j);h=Lza(1)|0;g=Lza(0)|0;f=g+h|0;f=l+((f>>>0)%((-1<>>0)<<5)|0;break e}f=((q[q[d+16>>2]+8>>2]&(-1<>2]&(-1<>2]%((-1<>>0)<<5)+f|0;break e}f=(t[d+16>>2]%((-1<>>0)<<5)+f|0}if((d|0)!=(f|0)){while(1){g=f;f=q[f+28>>2];if((f|0)!=(d|0)){continue}break}q[g+28>>2]=e;g=q[d+28>>2];q[e+24>>2]=q[d+24>>2];q[e+28>>2]=g;g=q[d+20>>2];q[e+16>>2]=q[d+16>>2];q[e+20>>2]=g;g=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=g;g=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=g;q[d+28>>2]=0;q[d+8>>2]=0;break d}q[i-4>>2]=q[d+28>>2];q[d+28>>2]=e;d=e}e=q[c+4>>2];q[d+16>>2]=q[c>>2];q[d+20>>2]=e;q[d+24>>2]=q[c+8>>2];if(!(r[b+5|0]&4)|(!(r[q[c>>2]+5|0]&3)|q[c+8>>2]<4)){break c}a=q[a+16>>2];o[b+5|0]=r[b+5|0]&251;q[b+24>>2]=q[a+40>>2];q[a+40>>2]=b}Ii=s+112|0;return d}function pq(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=Ii-16|0;Ii=g;c=a;d=b;if(d>>>0>=4){while(1){h=f;f=w(r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24),1540483477);f=w(h^w(f>>>24^f,1540483477),1540483477);c=c+4|0;d=d-4|0;if(d>>>0>3){continue}break}}a:{switch(d-1|0){case 2:e=r[c+2|0]<<16;case 1:e=r[c+1|0]<<8|e;case 0:e=w(r[c|0]^e,1540483477);break;default:break a}}c=w(b,1540483477);c=w(w(e>>>24^e,1540483477)^f,1540483477)^w(c>>>24^c,1540483477);c=w(c>>>13^c,1540483477);d=c>>>15|0;b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;e=Wj();o[852468]=0;q[213116]=e;ek(852568)}d=c^d;if(!(!r[852468]|b>>>0>1024)){c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}e=q[213116];Gj(e);d:{if(o[852568]&1){break d}if(!fk(852568)){break d}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213119];e:{f:{if(!c){break f}c=q[q[213118]+((d>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break f}f=q[213120];while(1){c=f+(c<<4)|0;if((d|0)==q[c>>2]){break e}c=q[c+12>>2];if((c|0)!=-1){continue}break}}if(q[213124]==q[213122]-q[213120]>>4){g:{if(o[852568]&1){break g}if(!fk(852568)){break g}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213122]-q[213120]>>4;h:{if(o[852568]&1){break h}if(!fk(852568)){break h}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;f=Wj();o[852468]=0;q[213116]=f;ek(852568)}Tv(852472,1024,c+256|0)}a=Ti(Yi(b+1|0),a,b);o[a+b|0]=0;p[g+12>>1]=b;q[g+8>>2]=a;HA(852472,d,g+8|0)}Bj(e)}Ii=g+16|0;return d}function zka(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;k=Ii+ -64|0;Ii=k;q[k+56>>2]=0;a:{if(f){s=q[g+8>>2];q[s+304>>2]=0;o[g+16|0]=1;l=q[b+8>>2];C=wt(a,l);t=Ap(a,l);z=$v(a,l);j=vt(a,l,k+60|0);b:{if(q[k+60>>2]==2){if(!j){break a}m=q[j+48>>2];j=q[m>>2];n=q[m+4>>2];break b}n=0}i=(t|0)==6;p=0;h=t;m=i?h:0;u=YA(a,l);D=q[e>>2];c:{d:{switch(h-1|0){case 0:i=To(a,l);if(i){i=q[i>>2];break c}i=0;if(!u){break c}i=q[u+16>>2];break c;case 4:A=q[q[b+12>>2]+104>>2];break;default:break d}}i=To(a,l);i=q[(i?i:g+4|0)>>2]}l=h|p;F=f>>>0>1?f:1;H=g+4|0;p=0;f=0;while(1){h=f;I=i;K=A;L=D;M=u;N=j;O=n;P=l;v=m;B=z;E=t;x=C;i=(p<<4)+b|0;y=q[i+8>>2];C=wt(a,y);t=Ap(a,y);z=$v(a,y);j=vt(a,y,k+60|0);e:{if(q[k+60>>2]==2){if(!j){break a}f=q[j+48>>2];j=q[f>>2];n=q[f+4>>2];break e}n=0}m=(t|0)==6;Q=0;l=t;f=l;m=m?f:0;u=YA(a,y);D=q[(p<<2)+e>>2];A=0;f:{g:{switch(f-1|0){case 0:f=To(a,y);if(f){i=q[f>>2];break f}i=0;if(!u){break f}i=q[u+16>>2];break f;case 4:A=q[q[i+12>>2]+104>>2];break;default:break g}}f=To(a,y);i=q[(f?f:H)>>2]}l=l|Q;h:{if(!p){f=h;break h}if(!((l|0)!=(P|0)|(m|0)!=(v|0)|(x|0)!=(C|0)|((j|0)!=(N|0)|(n|0)!=(O|0))|(i|0)!=(I|0)|(u|0)!=(M|0)|(D|0)!=(L|0)|(A|0)!=(K|0))){f=h;break h}v=p-h|0;f=p;i:{j:{switch(E|0){case 1:f=h<<2;cL(a,(h<<4)+b|0,(h<<6)+c|0,f+d|0,e+f|0,v,g);break i;case 0:f=h<<2;gL(a,(h<<4)+b|0,(h<<6)+c|0,f+d|0,e+f|0,v,g);break i;case 2:f=h<<2;dL(a,(h<<4)+b|0,(h<<6)+c|0,f+d|0,e+f|0,v,g);break i;case 5:f=h<<2;eL(a,(h<<4)+b|0,(h<<6)+c|0,f+d|0,e+f|0,v,g);break i;case 6:break j;default:break h}}k:{l:{x=q[s+320>>2];f=q[x+20>>2];m:{if(!f){break m}f=q[q[x+16>>2]+((B>>>0)%(f>>>0)<<2)>>2];if((f|0)==-1){break m}x=q[x+24>>2];while(1){f=x+w(f,12)|0;if(q[f>>2]==(B|0)){break l}f=q[f+8>>2];if((f|0)!=-1){continue}break}}f=0;if(r[290720]){break k}o[290720]=1;q[k+32>>2]=B;Pi(4,40439,41258,k+32|0);break k}f=q[f+4>>2]}E=f;f=h<<2;fL(a,B,E,(h<<4)+b|0,(h<<6)+c|0,f+d|0,e+f|0,v,g)}f=p}p=p+1|0;if((F|0)!=(p|0)){continue}break}j=F-f|0;n:{if(!j){break n}o:{switch(t|0){case 1:h=a;a=f<<2;cL(h,(f<<4)+b|0,(f<<6)+c|0,a+d|0,a+e|0,j,g);break n;case 0:h=a;a=f<<2;gL(h,(f<<4)+b|0,(f<<6)+c|0,a+d|0,a+e|0,j,g);break n;case 2:h=a;a=f<<2;dL(h,(f<<4)+b|0,(f<<6)+c|0,a+d|0,a+e|0,j,g);break n;case 5:h=a;a=f<<2;eL(h,(f<<4)+b|0,(f<<6)+c|0,a+d|0,a+e|0,j,g);break n;case 6:break o;default:break n}}p:{q:{n=q[s+320>>2];m=q[n+20>>2];r:{if(!m){break r}i=q[q[n+16>>2]+((z>>>0)%(m>>>0)<<2)>>2];if((i|0)==-1){break r}n=q[n+24>>2];while(1){m=n+w(i,12)|0;if(q[m>>2]==(z|0)){break q}i=q[m+8>>2];if((i|0)!=-1){continue}break}}i=0;if(r[290720]){break p}o[290720]=1;q[k+16>>2]=z;Pi(4,40439,41258,k+16|0);break p}i=q[(n+w(i,12)|0)+4>>2]}h=a;a=f<<2;fL(h,z,i,(f<<4)+b|0,(f<<6)+c|0,a+d|0,a+e|0,j,g)}a=q[s+56>>2];Mi[q[74945]](q[s+52>>2],q[s+60>>2]-a|0,a,0);a=(q[s+60>>2]-q[s+56>>2]|0)/36|0;q[72612]=a+q[72612];q[k+48>>2]=a;q[k+52>>2]=0;q[k+8>>2]=a;q[k+12>>2]=0}Ii=k- -64|0;return}J(42342,41161,949,42358);G()}function eL(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,v=0,y=0,z=0,A=0,B=0,C=0,D=x(0),E=x(0);h=Ii-112|0;Ii=h;z=q[b+12>>2];j=q[g+8>>2];a:{b:{c:{n=q[b+8>>2];if((Ap(a,n)|0)==5){i=q[j+4>>2];k=q[j>>2];s=i-k|0;A=(s|0)/320|0;m=A+1|0;if(m>>>0>(q[j+8>>2]-k|0)/320>>>0){break b}B=q[j+300>>2];v=q[j+304>>2];q[j+4>>2]=k+w(m,320);if((s+320|0)/320>>>0<=A>>>0){break a}m=w(B,216)-v|0;k=q[g+12>>2];q[g+12>>2]=k+1;q[i+304>>2]=k;fn(i);q[i+148>>2]=q[j+48>>2];k=q[j+52>>2];q[i+224>>2]=1;q[i+144>>2]=k;B=j+60|0;q[i+280>>2]=(q[B>>2]-q[j+56>>2]|0)/36;k=To(a,n);q[i+156>>2]=q[(k?k:g+4|0)>>2];q[i+160>>2]=q[z+72>>2];q[i+164>>2]=0;n=0;if(!f){break c}k=0;while(1){s=q[((k<<4)+b|0)+12>>2];v=j9(q[j+80>>2],q[s+92>>2],q[s+96>>2]);op(h- -64|0,(k<<6)+c|0);l=q[s+92>>2];C=q[j+80>>2];u[h+56>>2]=u[h+88>>2];y=q[h+84>>2];q[h+48>>2]=q[h+80>>2];q[h+52>>2]=y;Kv(C,l,h+48|0);l=q[s+92>>2];C=q[j+80>>2];y=q[h+68>>2];q[h+48>>2]=q[h+64>>2];q[h+52>>2]=y;y=q[h+76>>2];q[h+56>>2]=q[h+72>>2];q[h+60>>2]=y;Jv(C,l,h+48|0);D=u[h+96>>2];E=u[h+100>>2];Iv(q[j+80>>2],q[s+92>>2],D>>0)/36|0;c=c>>>0>n>>>0?n:c;v=j- -64|0;l=q[v>>2];k=q[j+60>>2];if(c>>>0>(l-k|0)/36>>>0){if(o[j+68|0]&1){break e}Wi(((l-q[s>>2]|0)/36|0)+(c>>>0>128?c:128)|0,36,s,v,B);k=q[B>>2]}if(!f){n=0;break d}C=j+88|0;n=0;c=0;while(1){l=(c<<4)+b|0;Xl(h- -64|0,a,q[l+8>>2],3);u[h+60>>2]=u[(c<<2)+d>>2];u[h+56>>2]=u[h+72>>2];y=q[h+68>>2];q[h+48>>2]=q[h+64>>2];q[h+52>>2]=y;l=q[l+12>>2];q[h+44>>2]=0;f:{g:{switch(fI(q[j+80>>2],u[j+312>>2],q[l+92>>2],q[l+96>>2],C,h+48|0,k,m,h+44|0)-1|0){case 1:q[h+32>>2]=q[j+300>>2];Pi(3,40439,42796,h+32|0);break f;case 0:break g;default:break f}}q[h+16>>2]=c;Pi(3,40439,42927,h+16|0)}l=q[h+44>>2];m=m-l|0;l=(l>>>0)/36|0;n=l+n|0;k=w(l,36)+k|0;c=c+1|0;if((f|0)!=(c|0)){continue}break}break d}J(40670,40745,493,40801);G()}q[j+304>>2]=q[j+304>>2]+w(n,36);q[i+284>>2]=n;h:{a=q[(q[z+68>>2]<<2)+290572>>2];if(a>>>0<5){o[i+288|0]=r[i+288|0]|1;a=a<<2;q[i+236>>2]=q[a+44292>>2];q[i+232>>2]=q[a+44272>>2];a=q[j+16>>2];if(q[j+20>>2]-a>>2>>>0<=A>>>0){break a}m=q[a+(A<<2)>>2];c=q[z+88>>2];if(!(m|!c)){m=sq();a=q[j+16>>2];if(q[j+20>>2]-a>>2>>>0<=A>>>0){break a}q[a+(A<<2)>>2]=m;c=q[z+88>>2]}if(c){a=0;while(1){b=q[z+84>>2]+w(a,96)|0;Oha(m,q[b>>2],q[b+4>>2],b+16|0,r[b+80|0]?4:1);a=a+1|0;if(a>>>0>2]){continue}break}}if(m){Gr(i,m)}a=q[e>>2];o[i+288|0]=r[i+288|0]|2;i:{j:{if(a){q[i+244>>2]=5;q[i+248>>2]=0;q[i+252>>2]=2;q[i+256>>2]=2;o[i+276|0]=r[a|0];o[i+277|0]=r[a+1|0];o[i+278|0]=r[a+2|0];c=i+279|0;o[c|0]=r[i+279|0]&208|r[a+3|0]&15;if(!r[g+16|0]){break i}o[g+16|0]=0;a=r[i+279|0]|16;break j}q[i+244>>2]=7;q[i+248>>2]=0;o[i+278|0]=255;p[i+276>>1]=65280;q[i+252>>2]=0;q[i+256>>2]=0;c=i+279|0;a=r[c|0]&-48|15}o[c|0]=a}a=q[s>>2];if((q[v>>2]-a|0)/36>>>0<(k-a|0)/36>>>0){break h}q[B>>2]=k;Ii=h+112|0;return}q[h>>2]=a;Pi(4,40439,42505,h);J(42529,41161,893,42531);G()}}J(40968,40745,506,40987);G()}J(40995,40745,479,41006);G()}function dla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-128|0;Ii=c;g=nj(c+104|0,a,1,73366,748);b=$j(a,2);e=Li;f=q[q[jk(a)+80>>2]+8>>2];q[c+100>>2]=0;q[c+96>>2]=0;h=c- -64|0;q[h>>2]=0;q[h+4>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;Ml(a,1,f,73150,c+100|0,c+40|0,c+96|0);f=Ula(q[c+96>>2],q[c+100>>2],b,e,c+92|0);a:{if(f){q[c>>2]=aj(b,e);q[c+8>>2]=f;q[c+4>>2]=q[(f<<2)+232752>>2];i=Kj(g,75149,c);break a}vj(a,0,0);b=r[c+40|0];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74477);b:{c:{switch(q[c+92>>2]){case 0:d=+u[c+44>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74495);d=+u[c+48>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74502);d=+u[c+52>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74512);break b;case 1:d=+u[c+44>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74520);break b;case 2:d=+u[c+52>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74531);d=+u[c+56>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74547);d=+u[c+60>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74559);d=+u[c- -64>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74571);d=+u[c+68>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74588);b=r[c+72|0];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74600);b=r[c+73|0];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74613);d=+u[c+44>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,75196);d=+u[c+48>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,75208);break b;case 3:u[c+24>>2]=u[c+60>>2];b=q[c+56>>2];q[c+16>>2]=q[c+52>>2];q[c+20>>2]=b;Al(a,c+16|0);Si(a,-2,74695);d=+u[c- -64>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74531);b=r[c+68|0];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74600);d=+u[c+72>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74708);d=+u[c+76>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74726);b=r[c+80|0];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74613);d=+u[c+84>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74744);d=+u[c+88>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74588);d=+u[c+44>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,75220);d=+u[c+48>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,75208);break b;case 4:break c;default:break a}}d=+u[c+44>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74531);d=+u[c+48>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74502);d=+u[c+52>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,74512)}i=1}mj(g);Ii=c+128|0;return i|0}function dy(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(a>>>0>=16){i=d;while(1){f=Aza(q[b>>2],0,i,0);g=Li;f=e+f|0;j=f+q[c>>2]|0;q[c>>2]=j;h=Aza(q[b+4>>2],0,i,0);k=Li;f=((e>>>0>f>>>0)+g|0)+(f>>>0>j>>>0)|0;e=f+h|0;g=e+q[c+4>>2]|0;q[c+4>>2]=g;h=Aza(q[b+8>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+8>>2]|0;q[c+8>>2]=g;h=Aza(q[b+12>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+12>>2]|0;q[c+12>>2]=g;h=Aza(q[b+16>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+16>>2]|0;q[c+16>>2]=g;h=Aza(q[b+20>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+20>>2]|0;q[c+20>>2]=g;h=Aza(q[b+24>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+24>>2]|0;q[c+24>>2]=g;h=Aza(q[b+28>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+28>>2]|0;q[c+28>>2]=g;h=Aza(q[b+32>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+32>>2]|0;q[c+32>>2]=g;h=Aza(q[b+36>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+36>>2]|0;q[c+36>>2]=g;h=Aza(q[b+40>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+40>>2]|0;q[c+40>>2]=g;h=Aza(q[b+44>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+44>>2]|0;q[c+44>>2]=g;h=Aza(q[b+48>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+48>>2]|0;q[c+48>>2]=g;h=Aza(q[b+52>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+52>>2]|0;q[c+52>>2]=g;h=Aza(q[b+56>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+56>>2]|0;q[c+56>>2]=g;e=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;h=Aza(q[b+60>>2],0,i,0)+e|0;f=h+q[c+60>>2]|0;q[c+60>>2]=f;e=(Li+(e>>>0>h>>>0)|0)+(f>>>0>>0)|0;c=c- -64|0;b=b- -64|0;a=a-16|0;if(a>>>0>15){continue}break}}if(a>>>0>=8){i=d;while(1){f=Aza(q[b>>2],0,i,0);g=Li;f=e+f|0;j=f+q[c>>2]|0;q[c>>2]=j;h=Aza(q[b+4>>2],0,i,0);k=Li;f=((e>>>0>f>>>0)+g|0)+(f>>>0>j>>>0)|0;e=f+h|0;g=e+q[c+4>>2]|0;q[c+4>>2]=g;h=Aza(q[b+8>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+8>>2]|0;q[c+8>>2]=g;h=Aza(q[b+12>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+12>>2]|0;q[c+12>>2]=g;h=Aza(q[b+16>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+16>>2]|0;q[c+16>>2]=g;h=Aza(q[b+20>>2],0,i,0);k=Li;f=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+20>>2]|0;q[c+20>>2]=g;h=Aza(q[b+24>>2],0,i,0);j=Li;f=((e>>>0>>0)+k|0)+(e>>>0>g>>>0)|0;e=f+h|0;g=e+q[c+24>>2]|0;q[c+24>>2]=g;e=((e>>>0>>0)+j|0)+(e>>>0>g>>>0)|0;h=Aza(q[b+28>>2],0,i,0)+e|0;f=h+q[c+28>>2]|0;q[c+28>>2]=f;e=(Li+(e>>>0>h>>>0)|0)+(f>>>0>>0)|0;c=c+32|0;b=b+32|0;a=a-8|0;if(a>>>0>7){continue}break}}if(a){while(1){f=Aza(q[b>>2],0,d,0)+e|0;h=f+q[c>>2]|0;q[c>>2]=h;e=(Li+(e>>>0>f>>>0)|0)+(f>>>0>h>>>0)|0;c=c+4|0;b=b+4|0;a=a-1|0;if(a){continue}break}}a=q[c>>2];b=a+e|0;q[c>>2]=b;if(a>>>0>b>>>0){while(1){a=q[c+4>>2];b=a+1|0;q[c+4>>2]=b;c=c+4|0;if(a>>>0>b>>>0){continue}break}}}function Nua(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0;a:{while(1){b:{c:{if(t[a+116>>2]<=261){Vs(a);c=q[a+116>>2];if(!(c>>>0>=262|b)){return 0}if(!c){break a}if(c>>>0<3){break c}}c=q[a+108>>2];d=q[a+84>>2]&(r[(c+q[a+56>>2]|0)+2|0]^q[a+72>>2]<>2]);q[a+72>>2]=d;e=q[a+68>>2]+(d<<1)|0;d=s[e>>1];p[q[a+64>>2]+((c&q[a+52>>2])<<1)>>1]=d;p[e>>1]=c;if(!d|q[a+44>>2]-262>>>0>>0){break c}c=uF(a,d);q[a+96>>2]=c;break b}c=q[a+96>>2]}d:{if(c>>>0>=3){d=q[a+5792>>2];e=q[a+108>>2]-q[a+112>>2]|0;p[q[a+5796>>2]+(d<<1)>>1]=e;q[a+5792>>2]=d+1;c=c-3|0;o[d+q[a+5784>>2]|0]=c;c=((r[(c&255)+196624|0]<<2)+a|0)+1176|0;p[c>>1]=s[c>>1]+1;c=e-1&65535;c=((r[(c>>>0<256?c:(c>>>7|0)+256|0)+196112|0]<<2)+a|0)+2440|0;p[c>>1]=s[c>>1]+1;c=q[a+96>>2];d=q[a+116>>2]-c|0;q[a+116>>2]=d;h=q[a+5788>>2]-1|0;i=q[a+5792>>2];if(!(d>>>0<3|c>>>0>t[a+128>>2])){e=c-1|0;q[a+96>>2]=e;g=q[a+72>>2];c=q[a+108>>2];k=q[a+52>>2];l=q[a+64>>2];m=q[a+68>>2];n=q[a+84>>2];u=q[a+56>>2];f=q[a+88>>2];while(1){d=c;c=c+1|0;q[a+108>>2]=c;g=(r[(d+u|0)+3|0]^g<>2]=g;j=(g<<1)+m|0;p[((c&k)<<1)+l>>1]=s[j>>1];p[j>>1]=c;e=e-1|0;q[a+96>>2]=e;if(e){continue}break}c=d+2|0;q[a+108>>2]=c;if((h|0)!=(i|0)){continue}break d}q[a+96>>2]=0;c=c+q[a+108>>2]|0;q[a+108>>2]=c;d=q[a+56>>2]+c|0;e=r[d|0];q[a+72>>2]=e;q[a+72>>2]=q[a+84>>2]&(r[d+1|0]^e<>2]);if((h|0)!=(i|0)){continue}break d}c=r[q[a+56>>2]+q[a+108>>2]|0];d=q[a+5792>>2];p[q[a+5796>>2]+(d<<1)>>1]=0;q[a+5792>>2]=d+1;o[d+q[a+5784>>2]|0]=c;c=(c<<2)+a|0;p[c+148>>1]=s[c+148>>1]+1;q[a+116>>2]=q[a+116>>2]-1;c=q[a+108>>2]+1|0;q[a+108>>2]=c;if(q[a+5792>>2]!=(q[a+5788>>2]-1|0)){continue}}d=a;e=q[a+92>>2];if((e|0)>=0){f=e+q[a+56>>2]|0}else{f=0}Tm(d,f,c-e|0,0);q[a+92>>2]=q[a+108>>2];c=q[a>>2];d=q[c+28>>2];Gl(d);e=q[c+16>>2];g=q[d+20>>2];e=e>>>0>>0?e:g;e:{if(!e){break e}Ti(q[c+12>>2],q[d+16>>2],e);q[c+12>>2]=e+q[c+12>>2];q[d+16>>2]=e+q[d+16>>2];q[c+20>>2]=e+q[c+20>>2];q[c+16>>2]=q[c+16>>2]-e;c=q[d+20>>2]-e|0;q[d+20>>2]=c;if(c){break e}q[d+16>>2]=q[d+8>>2]}if(q[q[a>>2]+16>>2]){continue}break}return 0}c=q[a+108>>2];q[a+5812>>2]=c>>>0<2?c:2;if((b|0)==4){b=a;d=q[a+92>>2];if((d|0)>=0){f=d+q[a+56>>2]|0}else{f=0}Tm(b,f,c-d|0,1);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;f:{if(!d){break f}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break f}q[c+16>>2]=q[c+8>>2]}return(q[q[a>>2]+16>>2]?3:2)|0}g:{if(!q[a+5792>>2]){break g}b=a;d=q[a+92>>2];if((d|0)>=0){f=d+q[a+56>>2]|0}else{f=0}Tm(b,f,c-d|0,0);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;h:{if(!d){break h}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break h}q[c+16>>2]=q[c+8>>2]}if(q[q[a>>2]+16>>2]){break g}return 0}return 1}function Kma(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=0,m=x(0),n=x(0),r=0,v=0;b=Ii-112|0;Ii=b;n=u[q[a+4>>2]+4>>2];j=q[a+8>>2];a=0;q[b+80>>2]=0;c=q[j+4>>2];f=q[j>>2];g=c-f|0;d=(g|0)/240|0;a:{b:{c:{if(!g){break c}if((c|0)!=(f|0)){g=d>>>0>1?d:1;while(1){d=w(a,240)+f|0;f=s[d+234>>1];d:{if(!(f&4)){break d}if((f&136)==136){i=q[d+184>>2];e=i;c=q[d+196>>2];if(!c){c=q[q[d+188>>2]+4>>2]}c=q[c+64>>2];if(t[c+8>>2]<=e>>>0){break a}e=q[c+4>>2];k=x(u[d+224>>2]+x(x(n*u[d+220>>2])*u[d+228>>2]));u[d+224>>2]=k;if(!(k>=x(1)^1)){l=d;i=q[(e+w(i,40)|0)+24>>2];e:{if(i>>>0<=6){m=x(1);if(1<>2]=m}f=f|16;p[d+234>>1]=f}if(!(f&16)){break d}p[d+234>>1]=f&65519;RK(d)}a=a+1|0;if((g|0)==(a|0)){break c}f=q[j>>2];if((q[j+4>>2]-f|0)/240>>>0>a>>>0){continue}break}}break b}f=0;q[b+72>>2]=0;c=q[j+4>>2];a=q[j>>2];g=c-a|0;d=(g|0)/240|0;f:{if(!g){break f}if((a|0)!=(c|0)){r=d>>>0>1?d:1;v=b+80|4;d=b+88|0;i=b+104|0;g=b- -64|0;while(1){c=w(f,240)+a|0;e=s[c+234>>1];g:{if((e&12)!=12){break g}h=q[c+184>>2];l=h;a=q[c+196>>2];if(!a){a=q[q[c+188>>2]+4>>2]}a=q[a+64>>2];if(t[a+8>>2]<=l>>>0){break a}a=q[(q[a+4>>2]+w(h,40)|0)+24>>2];if(a>>>0>6|!(1<>2]>=x(1)^1){break g}p[c+234>>1]=e&65527;if(!(q[c+176>>2]|q[c+180>>2])){break g}q[g>>2]=0;q[g+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;a=d;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;a=0;e=0;h=q[q[q[c>>2]+80>>2]+8>>2];h:{if(!h){break h}h=q[h>>2];if(!h){break h}a=q[h+3216>>2];e=q[h+3220>>2]}q[b+80>>2]=a;q[b+84>>2]=e;i:{if(Po(a,e)){if(!to(q[c>>2],s[c+232>>1],i)){break i}}Pi(4,53024,53373,0);break f}a=c+152|0;e=q[c>>2];h=q[e+100>>2];q[b+56>>2]=q[e+96>>2];q[b+60>>2]=h;e=q[d+4>>2];q[b+48>>2]=q[d>>2];q[b+52>>2]=e;e=q[i+4>>2];q[g>>2]=q[i>>2];q[g+4>>2]=e;e=q[b+84>>2];q[b+40>>2]=q[b+80>>2];q[b+44>>2]=e;if(!jn(q[q[q[c>>2]+80>>2]+8>>2],q[c+168>>2],q[c+172>>2])){a=aj(q[a>>2],q[a+4>>2]);d=aj(q[c+168>>2],q[c+172>>2]);q[b+8>>2]=aj(q[c+176>>2],q[c+180>>2]);q[b+4>>2]=d;q[b>>2]=a;Pi(4,53024,53440,b);break f}q[b+24>>2]=q[c+216>>2]+1;e=q[c+212>>2];q[b+32>>2]=q[c+208>>2];q[b+36>>2]=e;c=q[c+148>>2];q[d>>2]=0;q[d+4>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;Wi(16,1,b+80|0,d,v);Nt(b+24|0,q[60776],b+80|0);e=q[b+80>>2];c=mra(q[60776],e,q[b+84>>2]-e|0,b+40|0,a,c);j:{if(o[b+92|0]&1){break j}e=q[b+80>>2];if(!e){break j}Ni(e)}o[a|0]=0;o[a+1|0]=0;o[a+2|0]=0;o[a+3|0]=0;o[a+4|0]=0;o[a+5|0]=0;o[a+6|0]=0;o[a+7|0]=0;o[a+24|0]=0;o[a+25|0]=0;o[a+26|0]=0;o[a+27|0]=0;o[a+28|0]=0;o[a+29|0]=0;o[a+30|0]=0;o[a+31|0]=0;o[a+16|0]=0;o[a+17|0]=0;o[a+18|0]=0;o[a+19|0]=0;o[a+20|0]=0;o[a+21|0]=0;o[a+22|0]=0;o[a+23|0]=0;o[a+8|0]=0;o[a+9|0]=0;o[a+10|0]=0;o[a+11|0]=0;o[a+12|0]=0;o[a+13|0]=0;o[a+14|0]=0;o[a+15|0]=0;if(!c){break g}Pi(4,53024,53492,0)}f=f+1|0;if((r|0)==(f|0)){break f}a=q[j>>2];if((q[j+4>>2]-a|0)/240>>>0>f>>>0){continue}break}}break b}Ii=b+112|0;return 0}J(53716,53631,479,53341);G()}J(53297,53309,88,53341);G()}function P8(a,b,c){var d=0,e=0,f=0,g=x(0),h=0,i=x(0),j=0,k=x(0),l=x(0),m=0,n=x(0),o=x(0),p=x(0),r=x(0),t=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=0,C=x(0),D=x(0),E=x(0),F=0,H=0,I=0;d=Ii-192|0;Ii=d;e=q[a+2384>>2];j=q[b+104>>2];h=q[b+100>>2];m=j-h|0;f=(m|0)/40|0;a:{if(!m){break a}if((h|0)!=(j|0)){H=f>>>0>1?f:1;m=a+2320|0;j=c+16|0;I=c+80|0;B=a+2192|0;F=a+2256|0;f=d+128|4;a=0;while(1){h=q[w(a,40)+h>>2];c=q[h+20>>2];b:{c:{switch(q[h+16>>2]){case 0:q[d+128>>2]=s[h+24>>1];Mi[q[74982]](e,q[h>>2],q[d+128>>2],c);break b;case 9:q[d+128>>2]=s[h+24>>1];Mi[q[74983]](e,q[h>>2],q[d+128>>2]>>>2|0,c);break b;case 1:if((Mi[q[74973]](e)|0)==5){q[d+128>>2]=1065353216;q[f+8>>2]=0;q[f+12>>2]=0;q[f>>2]=0;q[f+4>>2]=0;q[d+148>>2]=1065353216;q[d+160>>2]=0;q[d+164>>2]=0;q[d+152>>2]=0;q[d+156>>2]=0;q[d+180>>2]=0;q[d+172>>2]=0;q[d+176>>2]=0;q[d+168>>2]=1056964608;q[d+184>>2]=1056964608;q[d+188>>2]=1065353216;_k(d- -64|0,d+128|0,m);Mi[q[74983]](e,d- -64|0,1,c);break b}Mi[q[74983]](e,m,1,c);break b;case 2:Mi[q[74983]](e,j,1,c);break b;case 3:Mi[q[74983]](e,I,1,c);break b;case 4:Mi[q[74983]](e,B,1,c);break b;case 5:if((Mi[q[74973]](e)|0)==5){q[d+128>>2]=1065353216;q[f+8>>2]=0;q[f+12>>2]=0;q[f>>2]=0;q[f+4>>2]=0;q[d+148>>2]=1065353216;q[d+160>>2]=0;q[d+164>>2]=0;q[d+152>>2]=0;q[d+156>>2]=0;q[d+180>>2]=0;q[d+172>>2]=0;q[d+176>>2]=0;q[d+168>>2]=1056964608;q[d+184>>2]=1056964608;q[d+188>>2]=1065353216;_k(d- -64|0,d+128|0,F);Mi[q[74983]](e,d- -64|0,1,c);break b}Mi[q[74983]](e,F,1,c);break b;case 6:_k(d+128|0,B,j);q[d+188>>2]=1065353216;C=u[d+180>>2];D=u[d+184>>2];q[d+180>>2]=0;q[d+184>>2]=0;E=u[d+176>>2];q[d+176>>2]=0;i=u[d+128>>2];t=u[d+148>>2];n=u[d+132>>2];v=u[d+144>>2];g=x(x(i*t)-x(n*v));y=g;o=u[d+168>>2];k=u[d+160>>2];z=u[d+152>>2];A=u[d+136>>2];l=x(x(n*z)-x(A*t));p=u[d+164>>2];r=x(x(A*v)-x(i*z));g=x(x(1)/x(x(g*o)+x(x(k*l)+x(p*r))));y=x(y*g);u[d+168>>2]=y;r=x(r*g);u[d+164>>2]=r;l=x(l*g);u[d+160>>2]=l;u[d+172>>2]=-x(x(E*l)+x(x(C*r)+x(D*y)));l=x(x(x(n*k)-x(i*p))*g);u[d+152>>2]=l;i=x(x(x(i*o)-x(A*k))*g);u[d+148>>2]=i;n=x(x(x(A*p)-x(n*o))*g);u[d+144>>2]=n;u[d+156>>2]=-x(x(E*n)+x(x(C*i)+x(D*l)));i=x(x(x(v*p)-x(t*k))*g);u[d+136>>2]=i;k=x(x(x(z*k)-x(v*o))*g);u[d+132>>2]=k;g=x(x(x(t*o)-x(z*p))*g);u[d+128>>2]=g;u[d+140>>2]=-x(x(E*g)+x(x(C*k)+x(D*i)));Mi[q[74983]](e,d+128|0,1,c);break b;case 7:_k(d+128|0,B,j);Mi[q[74983]](e,d+128|0,1,c);break b;case 8:break c;default:break b}}if((Mi[q[74973]](e)|0)==5){q[d+128>>2]=1065353216;q[f+8>>2]=0;q[f+12>>2]=0;q[f>>2]=0;q[f+4>>2]=0;q[d+148>>2]=1065353216;q[d+160>>2]=0;q[d+164>>2]=0;q[d+152>>2]=0;q[d+156>>2]=0;q[d+180>>2]=0;q[d+172>>2]=0;q[d+176>>2]=0;q[d+168>>2]=1056964608;q[d+184>>2]=1056964608;q[d+188>>2]=1065353216;_k(d,d+128|0,m);_k(d- -64|0,d,j);Mi[q[74983]](e,d- -64|0,1,c);break b}_k(d+128|0,m,j);Mi[q[74983]](e,d+128|0,1,c)}a=a+1|0;if((H|0)==(a|0)){break a}h=q[b+100>>2];if((q[b+104>>2]-h|0)/40>>>0>a>>>0){continue}break}}J(114155,114013,486,114166);G()}Ii=d+192|0}function F4(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=0,o=0;c=Ii-288|0;Ii=c;d=Ll(a,2);a:{if((d|0)==q[210436]){break a}b=1;if((d|0)==q[210437]){break a}b=2;if((d|0)==q[210438]){break a}b=3;if((d|0)==q[210439]){break a}b=(d|0)==q[210440]?4:5}d=Ll(a,3);b:{if((d|0)==q[210436]){break b}n=1;if((d|0)==q[210437]){break b}n=2;if((d|0)==q[210438]){break b}n=3;if((d|0)==q[210439]){break b}n=(d|0)==q[210440]?4:5}i=x(fj(a,1));c:{d:{if(!((b|0)==5|(b|0)!=(n|0))){e:{switch(b|0){case 0:b=_i(a,2,q[210436],0);f=u[b>>2];g=u[b+4>>2];f:{if(!(f!=f|g!=g)){e=u[b+8>>2];if(e==e){break f}}e=u[b+8>>2];v[c+80>>3]=g;v[c+88>>3]=e;v[c+72>>3]=f;q[c+64>>2]=2;Qi(a,134131,c- -64|0)}d=_i(a,3,q[210436],0);f=u[d>>2];g=u[d+4>>2];g:{if(!(f!=f|g!=g)){e=u[d+8>>2];if(e==e){break g}}e=u[d+8>>2];v[c+48>>3]=g;v[c+56>>3]=e;v[c+40>>3]=f;q[c+32>>2]=3;Qi(a,134131,c+32|0);e=u[d+8>>2];g=u[d+4>>2];f=u[d>>2]}h=u[b+8>>2];j=u[b>>2];k=u[b+4>>2];b=yj(a,16);u[b+8>>2]=h+x(x(e-h)*i);u[b+4>>2]=k+x(x(g-k)*i);u[b>>2]=j+x(x(f-j)*i);Zi(a,-1e4,134e3);xj(a,-2);a=1;break c;case 1:b=_i(a,2,q[210437],0);f=u[b>>2];g=u[b+4>>2];h:{i:{if(f!=f|g!=g){break i}e=u[b+8>>2];if(e!=e){break i}e=u[b+12>>2];if(e==e){break h}}e=u[b+8>>2];h=u[b+12>>2];v[c+160>>3]=g;v[c+176>>3]=h;v[c+168>>3]=e;v[c+152>>3]=f;q[c+144>>2]=2;Qi(a,134221,c+144|0)}d=_i(a,3,q[210437],0);f=u[d>>2];g=u[d+4>>2];j:{k:{if(f!=f|g!=g){break k}e=u[d+8>>2];if(e!=e){break k}h=u[d+12>>2];if(h==h){break j}}e=u[d+8>>2];h=u[d+12>>2];v[c+112>>3]=g;v[c+128>>3]=h;v[c+120>>3]=e;v[c+104>>3]=f;q[c+96>>2]=3;Qi(a,134221,c+96|0);h=u[d+12>>2];e=u[d+8>>2];g=u[d+4>>2];f=u[d>>2]}j=u[b+12>>2];k=u[b>>2];l=u[b+4>>2];m=u[b+8>>2];b=yj(a,16);u[b+12>>2]=j+x(x(h-j)*i);u[b+8>>2]=m+x(x(e-m)*i);u[b+4>>2]=l+x(x(g-l)*i);u[b>>2]=k+x(x(f-k)*i);Zi(a,-1e4,134016);xj(a,-2);a=1;break c;case 2:break e;default:break d}}b=_i(a,2,q[210438],0);f=u[b>>2];g=u[b+4>>2];l:{m:{if(f!=f|g!=g){break m}e=u[b+8>>2];if(e!=e){break m}e=u[b+12>>2];if(e==e){break l}}e=u[b+8>>2];h=u[b+12>>2];v[c+256>>3]=g;v[c+272>>3]=h;v[c+264>>3]=e;v[c+248>>3]=f;q[c+240>>2]=2;Qi(a,134315,c+240|0)}d=_i(a,3,q[210438],0);f=u[d>>2];g=u[d+4>>2];n:{o:{if(f!=f|g!=g){break o}e=u[d+8>>2];if(e!=e){break o}h=u[d+12>>2];if(h==h){break n}}e=u[d+8>>2];h=u[d+12>>2];v[c+208>>3]=g;v[c+224>>3]=h;v[c+216>>3]=e;v[c+200>>3]=f;q[c+192>>2]=3;Qi(a,134315,c+192|0);h=u[d+12>>2];e=u[d+8>>2];g=u[d+4>>2];f=u[d>>2]}j=u[b+12>>2];k=u[b>>2];l=u[b+4>>2];m=u[b+8>>2];b=yj(a,16);u[b+12>>2]=j+x(x(h-j)*i);u[b+8>>2]=m+x(x(e-m)*i);u[b+4>>2]=l+x(x(g-l)*i);u[b>>2]=k+x(x(f-k)*i);Zi(a,-1e4,134032);xj(a,-2);a=1;break c}if(!Oj(a,2)){break d}if(!Oj(a,3)){break d}o=+x(fj(a,2));o=(+x(fj(a,3))-o)*+i+o;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=o;q[a+8>>2]=q[a+8>>2]+16;a=1;break c}q[c+28>>2]=134032;q[c+24>>2]=134064;q[c+20>>2]=134016;q[c+16>>2]=134064;q[c+12>>2]=134e3;q[c+8>>2]=134064;q[c+4>>2]=135621;q[c>>2]=134064;a=Qi(a,136005,c)}Ii=c+288|0;return a|0}function dM(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-256|0;Ii=e;h=q[a+44>>2];f=Jr(e+184|0);a:{b:{c:{i=q[h- -64>>2];if(!i){break c}a=0;while(1){g=q[h+60>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]){q[e+96>>2]=d;q[e+100>>2]=19587;Pi(4,14825,18009,e+96|0);break b}Xi(c,d);k=v[f+8>>3];d=q[c+8>>2];q[d+8>>2]=3;v[d>>3]=k;q[c+8>>2]=q[c+8>>2]+16;pj(c,-3);a=a+1|0;if((i|0)==(a|0)){break c}if(t[h+64>>2]>a>>>0){continue}break}J(19530,19542,53,19576);G()}d:{i=q[h+72>>2];if(!i){break d}a=0;while(1){g=q[h+68>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]!=1){q[e+80>>2]=d;q[e+84>>2]=19594;Pi(4,14825,18009,e+80|0);break b}Xi(c,d);lk(c,q[f+8>>2],q[f+12>>2]);pj(c,-3);a=a+1|0;if((i|0)==(a|0)){break d}if(t[h+72>>2]>a>>>0){continue}break}J(19530,19542,61,19576);G()}e:{i=q[h+80>>2];if(i){g=f+8|0;a=0;while(1){Jr(e+112|0);Ti(e+184|0,e+112|0,72);if(t[h+80>>2]<=a>>>0){break e}j=q[h+76>>2]+(a<<5)|0;d=j;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[j>>2];if(q[f>>2]!=2){q[e+64>>2]=d;q[e+68>>2]=19599;Pi(4,14825,18009,e- -64|0);break b}Xi(c,d);km(c,g);pj(c,-3);a=a+1|0;if((i|0)!=(a|0)){continue}break}}f:{i=q[h+88>>2];if(!i){break f}a=0;while(1){g=q[h+84>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]!=3){q[e+48>>2]=d;q[e+52>>2]=19607;Pi(4,14825,18009,e+48|0);break b}Xi(c,d);d=q[f+12>>2];g=q[f+8>>2];u[e+120>>2]=u[f+16>>2];q[e+112>>2]=g;q[e+116>>2]=d;Al(c,e+112|0);pj(c,-3);a=a+1|0;if((i|0)==(a|0)){break f}if(t[h+88>>2]>a>>>0){continue}break}J(19530,19542,77,19576);G()}g:{i=q[h+96>>2];if(!i){break g}a=0;while(1){g=q[h+92>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]!=4){q[e+32>>2]=d;q[e+36>>2]=19621;Pi(4,14825,18009,e+32|0);break b}Xi(c,d);d=q[f+8>>2];g=q[f+12>>2];j=q[f+20>>2];q[e+120>>2]=q[f+16>>2];q[e+124>>2]=j;q[e+112>>2]=d;q[e+116>>2]=g;lo(c,e+112|0);pj(c,-3);a=a+1|0;if((i|0)==(a|0)){break g}if(t[h+96>>2]>a>>>0){continue}break}J(19530,19542,85,19576);G()}h:{i=q[h+104>>2];if(!i){break h}a=0;while(1){g=q[h+100>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]!=5){q[e+16>>2]=d;q[e+20>>2]=19635;Pi(4,14825,18009,e+16|0);break b}Xi(c,d);d=q[f+8>>2];g=q[f+12>>2];j=q[f+20>>2];q[e+120>>2]=q[f+16>>2];q[e+124>>2]=j;q[e+112>>2]=d;q[e+116>>2]=g;hr(c,e+112|0);pj(c,-3);a=a+1|0;if((i|0)==(a|0)){break h}if(t[h+104>>2]>a>>>0){continue}break}J(19530,19542,93,19576);G()}i=q[h+112>>2];if(!i){d=0;break a}a=0;while(1){g=q[h+108>>2]+(a<<5)|0;d=g;d=tq(b,q[d+8>>2],q[d+12>>2],f);if(d){break a}d=q[g>>2];if(q[f>>2]!=6){q[e>>2]=d;q[e+4>>2]=19646;Pi(4,14825,18009,e);break b}Xi(c,d);d=r[f+8|0];g=q[c+8>>2];q[g+8>>2]=1;q[g>>2]=(d|0)!=0;q[c+8>>2]=q[c+8>>2]+16;pj(c,-3);a=a+1|0;if((i|0)==(a|0)){d=0;break a}if(t[h+112>>2]>a>>>0){continue}break}J(19530,19542,101,19576);G()}J(19530,19542,69,19576);G()}d=-4}Ii=e+256|0;return d}function K5(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;d=Ii-2352|0;Ii=d;a:{if(dj(a,33481)){b=-1;e=wm(a+140|0,46);if(!e){break a}if(dj(e,33485)){break a}}b=$i(2228);e=b+2220|0;q[e>>2]=0;q[e+4>>2]=0;e=b+2212|0;q[e>>2]=0;q[e+4>>2]=0;e=b+2204|0;q[e>>2]=0;q[e+4>>2]=0;j=b+2196|0;e=j;q[e>>2]=0;q[e+4>>2]=0;f=b+2188|0;e=f;q[e>>2]=0;q[e+4>>2]=0;i=Ti(b,a,2188);q[d+96>>2]=a+140;sj(d+112|0,1024,33490,d+96|0);X8(d+112|0,d+112|0);a=TO(d+112|0);q[e>>2]=a;if(!a){q[d+80>>2]=d+112;Pi(4,33493,33502,d+80|0);a=q[i+2192>>2];if(a){No(a)}a=q[f>>2];if(a){cG(a)}b:{if(o[i+2224|0]&1){break b}a=q[i+2204>>2];if(a){Ni(a)}a=q[j>>2];if(!a){break b}Ni(a)}Ni(i);b=-2;break a}a=q[f>>2];e=q[57768];if(VO(a,e)){q[d+64>>2]=e;Pi(4,33493,33531,d- -64|0);b=-2;break a}q[d+1296>>2]=a?q[a+96>>2]:0;h=q[d+1296>>2];b=$i(h);hz(a,b,h);bx(a);l=i+2192|0;if(Sz(b,q[d+1296>>2],l)){q[d+48>>2]=e;Pi(4,33493,33557,d+48|0);Ni(b);b=-4;break a}Ni(b);b=q[f>>2];a=b;e=-1;c:{if(!a){break c}e=q[a+16>>2]}a=d+2336|0;q[a>>2]=0;q[a+4>>2]=0;a=d+2344|0;q[a>>2]=0;q[a+4>>2]=0;a=d+2328|0;q[a>>2]=0;q[a+4>>2]=0;q[d+2320>>2]=0;q[d+2324>>2]=0;q[d+2340>>2]=-1;a=e<<1;wA(d+2320|0,a>>>0<3?1:(a>>>0)/3|0,e);if(e){m=i+140|0;n=i+8|0;p=d+1160|0;h=d+1152|4;a=0;while(1){d:{if(bG(b,a)){q[d+36>>2]=m;q[d+32>>2]=n;Pi(4,33493,33599,d+32|0);break d}f=b;g=0;e:{if(!b){break e}g=q[f+92>>2]}k=r[g|0];q[d+20>>2]=g;q[d+16>>2]=(k|0)==47?33644:33642;sj(d+1296|0,1024,33637,d+16|0);g=IA(d+1296|0,hj(d+1296|0));k=Li;q[d+1152>>2]=0;q[h>>2]=f?q[f+96>>2]:0;f=f?q[b+88>>2]:-1;if((f|0)>=0){q[p>>2]=f}bx(b);Qv(d+2320|0,g,k,d+1152|0)}a=a+1|0;if((e|0)!=(a|0)){continue}break}}k=q[(q[q[q[l>>2]+8>>2]>>2]<<2)+30880>>2]>>>3|0;f=q[q[q[l>>2]+8>>2]+32>>2];a=f+e|0;b=a<<1;wA(j,b>>>0<3?1:(b>>>0)/3|0,a);if(f){e=0;while(1){b=q[q[q[l>>2]+8>>2]+28>>2]+w(e,48)|0;Av(q[b>>2],k,d+1296|0,129);q[d>>2]=r[d+1296|0]==47?33644:33642;q[d+4>>2]=d+1296;sj(d+1152|0,128,33637,d);o[d+1280|0]=0;h=IA(d+1152|0,hj(d+1152|0));g=Li;a=q[d+2324>>2];f:{if(!a){break f}a=q[q[d+2320>>2]+(Cza(h,g,a)<<2)>>2];if((a|0)==-1){break f}m=q[d+2328>>2];while(1){a=m+w(a,24)|0;if(q[a>>2]!=(h|0)|q[a+4>>2]!=(g|0)){a=q[a+20>>2];if((a|0)!=-1){continue}break f}break}q[a+8>>2]=b;q[d+1136>>2]=b;q[d+1140>>2]=q[b+24>>2];q[d+1144>>2]=q[a+16>>2];Qv(j,q[b+16>>2],q[b+20>>2],d+1136|0)}e=e+1|0;if((f|0)!=(e|0)){continue}break}}b=0;h=d+1304|0;e=-1;a=0;while(1){g:{h:{e=b?q[b+20>>2]:e;if((e|0)!=-1){break h}f=q[d+2324>>2];if(f>>>0<=a>>>0){break g}g=q[d+2320>>2];while(1){b=a+1|0;e=q[g+(a<<2)>>2];if((e|0)!=-1){a=b;break h}a=b;if((f|0)!=(a|0)){continue}break}break g}f=q[d+2328>>2];if(!f){break g}g=w(e,24);b=g+f|0;f=f+g|0;q[h>>2]=q[f+16>>2];g=q[f+12>>2];f=q[f+8>>2];q[d+1296>>2]=f;q[d+1300>>2]=g;if(f){continue}Qv(j,q[b>>2],q[b+4>>2],d+1296|0);continue}break}i:{if(o[d+2348|0]&1){break i}a=q[d+2328>>2];if(a){Ni(a)}a=q[d+2320>>2];if(!a){break i}Ni(a)}q[c>>2]=i;b=0}Ii=d+2352|0;return b|0}function npa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-176|0;Ii=e;g=q[a+8>>2];b=q[q[a+12>>2]>>2];f=q[a+16>>2];d=f;c=q[d+64>>2];d=q[d+68>>2];h=q[72384];i=q[72385];a:{if(!((h|0)!=(c|0)|(i|0)!=(d|0)?(c|0)!=q[72382]|(d|0)!=q[72383]:0)){if(!q[b+36>>2]){if(q[b+60>>2]){q[e+32>>2]=q[q[q[b+32>>2]>>2]>>2];Pi(3,35807,35923,e+32|0);c=0;break a}q[b+56>>2]=q[b+56>>2]&-524289;c=q[a+16>>2];d=q[c+4>>2];q[b+64>>2]=q[c>>2];q[b+68>>2]=d;d=q[c+28>>2];q[b+88>>2]=q[c+24>>2];q[b+92>>2]=d;d=q[c+20>>2];q[b+80>>2]=q[c+16>>2];q[b+84>>2]=d;d=q[c+12>>2];q[b+72>>2]=q[c+8>>2];q[b+76>>2]=d;c=q[a+16>>2];d=q[c+36>>2];q[b+96>>2]=q[c+32>>2];q[b+100>>2]=d;d=q[c+60>>2];q[b+120>>2]=q[c+56>>2];q[b+124>>2]=d;d=q[c+52>>2];q[b+112>>2]=q[c+48>>2];q[b+116>>2]=d;d=q[c+44>>2];q[b+104>>2]=q[c+40>>2];q[b+108>>2]=d;c=q[g>>2];d=q[q[q[b+32>>2]>>2]>>2];a=q[a+16>>2];if(q[a+64>>2]==(h|0)&q[a+68>>2]==(i|0)){q[b+60>>2]=mH(c,d);c=0;break a}if(ak(c,d,b+36|0)){q[e+16>>2]=q[q[q[b+32>>2]>>2]>>2];Pi(4,35807,36596,e+16|0);c=-1e3;break a}c=0;a=b- -64|0;if(!Po(q[a>>2],q[a+4>>2])){break a}a=vk(b+96|0,a,Oi(35794),Li,0,0,0,0);if(!a){break a}q[e>>2]=a;Pi(3,35807,35815,e);break a}q[e+48>>2]=q[q[q[b+32>>2]>>2]>>2];gn(f,35966,e+48|0);c=0;break a}if((c|0)==q[72386]&(d|0)==q[72387]){c=q[b+60>>2];if(c){Pn(c);q[b+60>>2]=0}c=q[b+36>>2];if(c){cj(q[g>>2],c);c=0;q[b+36>>2]=0;q[b+56>>2]=q[b+56>>2]&-983041|524288;a=q[a+16>>2];d=q[a+4>>2];q[b>>2]=q[a>>2];q[b+4>>2]=d;d=q[a+28>>2];q[b+24>>2]=q[a+24>>2];q[b+28>>2]=d;d=q[a+20>>2];q[b+16>>2]=q[a+16>>2];q[b+20>>2]=d;d=q[a+12>>2];q[b+8>>2]=q[a+8>>2];q[b+12>>2]=d;break a}a=q[a+16>>2];q[e+64>>2]=q[q[q[b+32>>2]>>2]>>2];gn(a,36026,e- -64|0);c=0;break a}if((c|0)==q[72388]&(d|0)==q[72389]){a=q[b+36>>2];if(a){if(!(o[b+58|0]&1)){Ft(a);q[b+56>>2]=q[b+56>>2]|65536;c=0;break a}q[e+96>>2]=q[q[q[b+32>>2]>>2]>>2];gn(f,36093,e+96|0);c=0;break a}q[e+80>>2]=q[q[q[b+32>>2]>>2]>>2];gn(f,36163,e+80|0);c=0;break a}if((Oi(36236)|0)==(c|0)&(d|0)==(Li|0)){b:{if(!(o[b+58|0]&1)){break b}c=q[b+36>>2];if(!c){break b}Jt(c);q[b+56>>2]=q[b+56>>2]&-65537;c=0;break a}a=q[a+16>>2];q[e+112>>2]=q[q[q[b+32>>2]>>2]>>2];gn(a,36242,e+112|0);c=0;break a}a=q[a+16>>2];d=q[a+64>>2];g=q[57289];f=q[a+68>>2];if((d|0)==q[g+8>>2]&(f|0)==q[g+12>>2]){f=q[b+36>>2];if(f){d=q[b+56>>2];if(!(d&393216)){q[b+56>>2]=d|262144;c=0;if(d&65536){break a}Ft(f);q[b+56>>2]=q[b+56>>2]|65536;break a}q[e+144>>2]=q[q[q[b+32>>2]>>2]>>2];gn(a,36315,e+144|0);c=0;break a}q[e+128>>2]=q[q[q[b+32>>2]>>2]>>2];gn(a,36163,e+128|0);c=0;break a}c=q[57290];if((d|0)==q[c+8>>2]&(f|0)==q[c+12>>2]){c=q[b+56>>2];if((c&393216)==393216){q[b+56>>2]=c&-262145;c=0;break a}q[e+160>>2]=q[q[q[b+32>>2]>>2]>>2];gn(a,36375,e+160|0);c=0;break a}if(q[a+80>>2]==q[58640]){u[b+48>>2]=u[a+96>>2];q[b+44>>2]=q[a+100>>2];c=0;break a}c=0;if((Oi(36440)|0)!=(d|0)|(f|0)!=(Li|0)){break a}q[b+44>>2]=0;q[b+48>>2]=1065353216}Ii=e+176|0;return c|0}function uL(a,b){var c=0,d=0,e=0,f=x(0),g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=0,n=0,p=x(0),r=x(0),s=x(0),v=x(0),y=x(0),z=x(0),A=0,B=0,C=0,D=0,E=0,F=x(0),H=x(0),I=x(0),K=0,L=0,M=0,N=x(0),O=0,P=x(0);d=Ii-48|0;Ii=d;c=1;a:{b:{c:{d:{if(q[q[q[b+128>>2]+8>>2]+20>>2]){m=b+220|0;K=q[b>>2];B=q[q[K+80>>2]+8>>2];n=b+224|0;c=q[b+220>>2];L=q[n>>2]-c>>2;A=b+228|0;h=q[A>>2]-c>>2;C=q[q[q[q[b+128>>2]+8>>2]+20>>2]>>2];g=q[C+4>>2];if(h>>>0>>0){if(o[b+232|0]&1){break c}Wi((g-L|0)+h|0,4,m,A,n);c=q[m>>2];h=q[A>>2]-c>>2}if(h>>>0>>0){break b}q[n>>2]=(g<<2)+c;M=a+80|0;e:{f:{D=a+88|0;c=q[a+80>>2];if(q[D>>2]-c>>2>>>0>>0){if(o[a+92|0]&1){break c}h=a+84|0;Wi(g,4,M,D,h);q[a+84>>2]=q[a+80>>2];break f}h=a+84|0;q[h>>2]=c;if(g){break f}break e}e=1;a=0;g:{h:{while(1){i:{j:{if(a>>>0>>0){c=q[m>>2];if(q[n>>2]-c>>2>>>0<=a>>>0){break i}c=q[c+(a<<2)>>2];break j}c=nra(B);if(!c){b=q[m>>2];if(q[A>>2]-b>>2>>>0>>0){break b}q[n>>2]=b+(a<<2);break e}i=LB(B);if((i|0)==-1){Ew(B,c,0);b=q[m>>2];if(q[A>>2]-b>>2>>>0>>0){break b}q[n>>2]=b+(a<<2);break e}E=IB(i);O=Li;if(c){q[c+88>>2]=i}if(dqa(B,c,E,O)){Ew(B,c,0);b=q[m>>2];if(q[A>>2]-b>>2>>>0>>0){break b}q[n>>2]=b+(a<<2);break e}e=q[c+140>>2];q[c+136>>2]=q[c+136>>2]&-1025|1024;q[c+140>>2]=e;e=q[m>>2];if(q[n>>2]-e>>2>>>0<=a>>>0){break a}q[e+(a<<2)>>2]=c}k:{if(a){j=x(1);k=x(0);r=x(0);s=x(0);N=x(0);F=x(1);H=x(1);I=x(1);l=x(0);f=x(0);break k}f=u[b+24>>2];F=u[b+48>>2];j=x(F*x(0));k=u[b+28>>2];H=u[b+52>>2];r=x(H*x(0));l=u[b+16>>2];I=u[b+56>>2];s=x(I*x(0));v=x(x(x(f*j)+x(k*r))-x(l*s));p=u[b+20>>2];y=x(x(f*s)+x(x(l*j)+x(p*r)));z=x(x(x(l*r)+x(k*s))-x(p*j));j=x(x(x(k*j)+x(p*s))-x(f*r));N=x(u[b+40>>2]+x(x(l*v)+x(x(x(f*y)+x(k*z))-x(p*j))));s=x(u[b+36>>2]+x(x(f*j)+x(x(x(k*v)+x(p*y))-x(l*z))));r=x(u[b+32>>2]+x(x(p*z)+x(x(x(l*y)+x(k*j))-x(f*v))));v=x(l*x(0));y=x(p*x(0));z=x(f*x(0));j=x(x(x(k-v)-y)-z);P=f;f=x(k*x(0));k=x(x(v+x(P+f))-y);l=x(x(y+x(l+f))-z);f=x(x(z+x(p+f))-v)}u[d+40>>2]=N;u[d+36>>2]=s;u[d+32>>2]=r;e=q[d+32>>2];i=q[d+36>>2];u[c+24>>2]=u[d+40>>2];q[c+16>>2]=e;q[c+20>>2]=i;u[d+28>>2]=j;u[d+24>>2]=k;u[d+20>>2]=f;u[d+16>>2]=l;e=q[d+16>>2];i=q[d+20>>2];E=q[d+28>>2];q[c+8>>2]=q[d+24>>2];q[c+12>>2]=E;q[c>>2]=e;q[c+4>>2]=i;u[d+8>>2]=I;u[d+4>>2]=H;u[d>>2]=F;e=q[d>>2];i=q[d+4>>2];u[c+40>>2]=u[d+8>>2];q[c+32>>2]=e;q[c+36>>2]=i;e=q[h>>2];if((e|0)==q[D>>2]){break h}q[h>>2]=e+4;q[e>>2]=c;a=a+1|0;e=g>>>0>a>>>0;if((a|0)!=(g|0)){continue}break g}break}break a}J(51459,51308,533,51483);G()}if(!g){break e}c=0;while(1){b=q[M>>2];m=q[h>>2]-b>>2;a=(c^-1)+g|0;if(m>>>0<=a>>>0){break a}i=q[b+(a<<2)>>2];if(a){if(a>>>0>=t[C+4>>2]){break d}a=q[q[C>>2]+w(a,192)>>2];if(a>>>0>=m>>>0){break a}a=q[b+(a<<2)>>2]}else{a=K}qw(i,a);c=c+1|0;if((g|0)!=(c|0)){continue}break}}c=e^1}Ii=d+48|0;return c&1}J(51488,51500,68,51547);G()}J(51372,51308,493,51447);G()}J(51289,51308,506,51364);G()}J(51709,51308,479,51547);G()}function ox(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0,w=0;a:{if(!f){break a}while(1){b:{c:{if(!((f|0)<=(h|0)|(e|0)<=(h|0))){if(!e){break a}i=q[d>>2];t=q[b>>2];j=i+(t<<3)|0;l=q[j>>2];j=q[j+4>>2];while(1){k=q[a>>2];m=i+(k<<3)|0;n=q[m>>2];m=q[m+4>>2];if((m|0)==(j|0)&l>>>0>>0|j>>>0>>0){break c}a=a+4|0;e=e-1|0;if(e){continue}break}break a}if((e|0)>(f|0)){break b}if((a|0)==(b|0)){break a}i=g;j=a;while(1){q[i>>2]=q[j>>2];i=i+4|0;j=j+4|0;if((j|0)!=(b|0)){continue}break}if((g|0)==(i|0)){break a}d=q[d>>2];while(1){if((b|0)==(c|0)){b=i-g|0;if(!b){break a}bl(a,g,b);return}e=q[b>>2];f=d+(e<<3)|0;h=q[f>>2];j=q[g>>2];l=d+(j<<3)|0;k=q[l>>2];f=q[f+4>>2];l=q[l+4>>2];d:{if((f|0)==(l|0)&h>>>0>>0|f>>>0>>0){q[a>>2]=e;b=b+4|0;break d}q[a>>2]=j;g=g+4|0}a=a+4|0;if((g|0)!=(i|0)){continue}break}break a}e:{if((e|0)<(f|0)){n=(f|0)/2|0;l=(n<<2)+b|0;j=b-a|0;f:{if(!j){k=a;break f}j=j>>2;k=i+(q[l>>2]<<3)|0;r=q[k>>2];m=q[k+4>>2];k=a;while(1){p=j>>>1|0;o=(p<<2)+k|0;s=i+(q[o>>2]<<3)|0;u=q[s>>2];v=k;w=o+4|0;k=q[s+4>>2];o=(k|0)==(m|0)&r>>>0>>0|k>>>0>m>>>0;k=o?v:w;j=o?p:(p^-1)+j|0;if(j){continue}break}}p=k-a>>2;break e}if((e|0)==1){q[a>>2]=t;q[b>>2]=k;return}p=(e|0)/2|0;k=(p<<2)+a|0;j=c-b|0;g:{if(!j){l=b;break g}j=j>>2;l=i+(q[k>>2]<<3)|0;r=q[l>>2];m=q[l+4>>2];l=b;while(1){n=j>>>1|0;o=(n<<2)+l|0;s=i+(q[o>>2]<<3)|0;u=q[s>>2];w=o+4|0;v=l;l=q[s+4>>2];o=(m|0)==(l|0)&r>>>0>u>>>0|l>>>0>>0;l=o?w:v;j=o?(n^-1)+j|0:n;if(j){continue}break}}n=l-b>>2}f=f-n|0;e=e-p|0;i=l;h:{if((b|0)==(k|0)){break h}i=k;if((b|0)==(l|0)){break h}m=k+4|0;if((m|0)==(b|0)){j=q[k>>2];i=l-b|0;if(i){bl(k,b,i)}i=i+k|0;q[i>>2]=j;break h}if((b+4|0)==(l|0)){b=l-4|0;j=q[b>>2];i=l;b=b-k|0;if(b){i=l-b|0;bl(i,k,b)}q[k>>2]=j;break h}o=l-b>>2;i=o;r=b-k>>2;j=r;if((i|0)==(j|0)){i=q[k>>2];q[k>>2]=t;q[b>>2]=i;i=b;if((b|0)==(m|0)){break h}while(1){j=q[m>>2];q[m>>2]=q[i+4>>2];q[i+4>>2]=j;i=i+4|0;m=m+4|0;if((m|0)!=(b|0)){continue}break}i=b;break h}while(1){b=j;j=i;i=(b|0)%(i|0)|0;if(i){continue}break}if(j){b=(j<<2)+k|0;while(1){b=b-4|0;t=r<<2;m=b+t|0;s=q[b>>2];j=b;while(1){i=m;q[j>>2]=q[i>>2];j=i;m=l-i>>2;m=(m|0)>(r|0)?i+t|0:(r-m<<2)+k|0;if((m|0)!=(b|0)){continue}break}q[i>>2]=s;if((b|0)!=(k|0)){continue}break}}i=(o<<2)+k|0}i:{if((n+p|0)<(e+f|0)){ox(a,k,i,d,p,n,g,h);a=i;b=l;break i}ox(i,l,c,d,e,f,g,h);f=n;e=p;c=i;b=k}if(f){continue}break a}break}if((b|0)==(c|0)){break a}j=b;i=g;while(1){q[i>>2]=q[j>>2];i=i+4|0;j=j+4|0;if((j|0)!=(c|0)){continue}break}if((g|0)==(i|0)){break a}f=q[d>>2];while(1){if((a|0)==(b|0)){if((g|0)==(i|0)){break a}while(1){c=c-4|0;i=i-4|0;q[c>>2]=q[i>>2];if((g|0)!=(i|0)){continue}break}break a}d=i-4|0;e=q[d>>2];h=f+(e<<3)|0;l=q[h>>2];j=b-4|0;m=q[j>>2];k=f+(m<<3)|0;n=q[k>>2];h=q[h+4>>2];k=q[k+4>>2];if((h|0)==(k|0)&l>>>0>=n>>>0|h>>>0>k>>>0){m=e;j=b;i=d}c=c-4|0;q[c>>2]=m;b=j;if((g|0)!=(i|0)){continue}break}}}function PN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;e=Ii-16|0;Ii=e;a:{if(q[a+104>>2]==8){b=q[a+120>>2];o[c+3|0]=b<<5|r[a+119|0]<<1|b<<2;d=q[a+140>>2];b=c;b:{if(r[a+119|0]){o[c|0]=d<<3;o[c+1|0]=r[a+144|0]<<3;d=r[a+148|0]<<3;break b}o[c|0]=d|d<<4;d=q[a+144>>2];o[c+1|0]=d<<4|d;d=q[a+148>>2];d=d<<4|d}o[b+2|0]=d;a=q[(q[a+136>>2]<<2)+103488>>2];o[c+4|0]=a;o[c+5|0]=a>>>8;o[c+6|0]=a>>>16;o[c+7|0]=a>>>24;break a}d=r[a+118|0];p=r[a+119|0];o[c+3|0]=d|p<<1|q[a+120>>2]<<5|q[a+124>>2]<<2;g=e+8|4;n=d<<5;d=n+103504|0;f=((r[d+3|0]<<4)+b|0)+(r[d+2|0]<<2)|0;s=r[f|0];h=((r[d+1|0]<<4)+b|0)+(r[d|0]<<2)|0;t=r[h|0];i=((r[d+5|0]<<4)+b|0)+(r[d+4|0]<<2)|0;u=r[i|0];j=((r[d+7|0]<<4)+b|0)+(r[d+6|0]<<2)|0;v=r[j|0];k=((r[d+9|0]<<4)+b|0)+(r[d+8|0]<<2)|0;x=r[k|0];l=((r[d+11|0]<<4)+b|0)+(r[d+10|0]<<2)|0;y=r[l|0];m=((r[d+13|0]<<4)+b|0)+(r[d+12|0]<<2)|0;z=r[m|0];d=((r[d+15|0]<<4)+b|0)+(r[d+14|0]<<2)|0;A=r[d|0];B=r[d+2|0];C=r[m+2|0];D=r[l+2|0];E=r[k+2|0];F=r[j+2|0];G=r[i+2|0];H=r[f+2|0];I=r[h+2|0];J=r[d+1|0];m=r[m+1|0];l=r[l+1|0];k=r[k+1|0];j=r[j+1|0];i=r[i+1|0];K=r[f+1|0];h=r[h+1|0];d=e+8|0;f=p?31:15;o[Zj(d,0)|0]=((w(f,A+(z+(y+(x+(v+(u+(s+t|0)|0)|0)|0)|0)|0)|0)+1020&65535)>>>0)/2040;o[Zj(d,1)|0]=((w(f,(m+(l+(k+(j+(i+(h+K|0)|0)|0)|0)|0)|0)+J|0)+1020&65535)>>>0)/2040;o[Zj(d,2)|0]=((w(f,B+(C+(D+(E+(F+(G+(H+I|0)|0)|0)|0)|0)|0)|0)+1020&65535)>>>0)/2040;o[Zj(d,3)|0]=0;if(!(7424>>>q[a+104>>2]&1)){aO(e,d,q[a+128>>2],f,0);q[e+8>>2]=q[e>>2]}d=n+103504|0;h=((r[d+19|0]<<4)+b|0)+(r[d+18|0]<<2)|0;s=r[h|0];i=((r[d+17|0]<<4)+b|0)+(r[d+16|0]<<2)|0;t=r[i|0];j=((r[d+21|0]<<4)+b|0)+(r[d+20|0]<<2)|0;u=r[j|0];k=((r[d+23|0]<<4)+b|0)+(r[d+22|0]<<2)|0;v=r[k|0];l=((r[d+25|0]<<4)+b|0)+(r[d+24|0]<<2)|0;x=r[l|0];m=((r[d+27|0]<<4)+b|0)+(r[d+26|0]<<2)|0;y=r[m|0];n=((r[d+29|0]<<4)+b|0)+(r[d+28|0]<<2)|0;z=r[n|0];d=((r[d+31|0]<<4)+b|0)+(r[d+30|0]<<2)|0;A=r[d|0];B=r[d+2|0];C=r[n+2|0];D=r[m+2|0];E=r[l+2|0];F=r[k+2|0];G=r[j+2|0];H=r[h+2|0];I=r[i+2|0];d=r[d+1|0];n=r[n+1|0];m=r[m+1|0];l=r[l+1|0];k=r[k+1|0];j=r[j+1|0];h=r[h+1|0];i=r[i+1|0];o[Zj(g,0)|0]=((w(f,A+(z+(y+(x+(v+(u+(s+t|0)|0)|0)|0)|0)|0)|0)+1020&65535)>>>0)/2040;o[Zj(g,1)|0]=((w(f,d+(n+(m+(l+(k+(j+(h+i|0)|0)|0)|0)|0)|0)|0)+1020&65535)>>>0)/2040;o[Zj(g,2)|0]=((w(f,B+(C+(D+(E+(F+(G+(H+I|0)|0)|0)|0)|0)|0)|0)+1020&65535)>>>0)/2040;o[Zj(g,3)|0]=0;if(!(7424>>>q[a+104>>2]&1)){aO(e,g,q[a+128>>2],f,1);q[e+12>>2]=q[e>>2]}g=r[e+12|0];d=c;c:{if(!p){o[c|0]=g|r[e+8|0]<<4;f=r[e+14|0]|r[e+10|0]<<4;a=r[e+13|0]|r[e+9|0]<<4;break c}a=r[e+13|0]-r[e+9|0]|0;a=(a|0)<-4?-4:(a|0)>3?3:a;f=r[e+14|0]-r[e+10|0]|0;f=(f|0)<-4?-4:(f|0)>3?3:f;g=g-r[e+8|0]|0;g=(g|0)<-4?-4:(g|0)>3?3:g;o[c|0]=r[e+8|0]<<3|((g|0)<0?g+8|0:g);f=r[e+10|0]<<3|((f|0)<0?f+8|0:f);a=r[e+9|0]<<3|((a|0)<0?a+8|0:a)}o[d+2|0]=f;o[c+1|0]=a;Gwa(c,b)}Ii=e+16|0}function xB(a,b,c,d,e,f,g,h,i,j,k,l,m,n,t,v){var y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0;A=Ii-48|0;Ii=A;B=q[a+4>>2];K=q[a>>2];H=B-K|0;C=(H|0)/104|0;a:{b:{c:{d:{e:{f:{g:{h:{if((H|0)==676e4){q[A>>2]=65e3;Pi(4,5925,5936,A);b=0;break h}z=q[a+32>>2];if(!z){break g}y=s[a+38>>1];if(y>>>0>=s[a+36>>1]){break f}I=a+4|0;p[a+38>>1]=y+1;z=s[z+(y<<1)>>1];p[A+46>>1]=z;D=a+44|0;i:{j:{y=q[a+48>>2];k:{if(!y){break k}y=q[q[D>>2]+((b>>>0)%(y>>>0)<<2)>>2];if((y|0)==-1){break k}E=q[a+52>>2];while(1){F=E+w(y,12)|0;if(q[F>>2]==(b|0)){break j}y=q[F+8>>2];if((y|0)!=-1){continue}break}}y=q[a+68>>2];if((y|0)==((q[a+60>>2]-q[a+52>>2]|0)/12|0)){q[A+16>>2]=y;Pi(4,5925,5997,A+16|0);c=q[a+32>>2];if(!c){break e}b=s[a+38>>1];if(!b|b>>>0>s[a+36>>1]){break d}d=a;a=b-1|0;p[d+38>>1]=a;p[c+((a&65535)<<1)>>1]=z;b=0;break h}Mv(D,b,A+46|0);B=q[I>>2];break i}D=q[a+16>>2];F=q[a+20>>2]-D>>1;y=s[(E+w(y,12)|0)+4>>1];if(F>>>0<=y>>>0){break a}y=s[D+(y<<1)>>1];if(C>>>0<=y>>>0){break a}l:{while(1){E=w(y,104)+K|0;y=s[E+94>>1];if((y|0)==65535){break l}if(y>>>0>=F>>>0){break a}y=s[D+(y<<1)>>1];if(C>>>0>y>>>0){continue}break}break a}p[E+94>>1]=z}z=q[a+8>>2];if((B|0)==(z|0)){if(o[a+12|0]&1){break c}y=(B-q[a>>2]|0)/104|0;z=(y>>>1|0)+2048>>>1|0;y=(z>>>0<2048?z:2048)+y|0;Wi(y>>>0<65e3?y:65e3,104,a,a+8|0,I);B=q[a+8>>2]}else{B=z}y=q[a>>2];z=C+1|0;if((B-y|0)/104>>>0>>0){break b}q[I>>2]=y+w(z,104);if((H+104|0)/104>>>0<=C>>>0){break a}y=Ui(y+w(C,104)|0,0,104);B=s[A+46>>1];z=q[a+16>>2];if(B>>>0>=q[a+20>>2]-z>>1>>>0){break a}p[z+(B<<1)>>1]=C;p[y+92>>1]=s[A+46>>1];q[y>>2]=b;q[y+24>>2]=g;q[y+16>>2]=e;q[y+20>>2]=f;q[y+8>>2]=c;q[y+12>>2]=d;b=q[k+4>>2];q[y+28>>2]=q[k>>2];q[y+32>>2]=b;b=q[k+12>>2];q[y+36>>2]=q[k+8>>2];q[y+40>>2]=b;q[y+44>>2]=q[k+16>>2];p[y+94>>1]=65535;q[y+88>>2]=-1;q[y+84>>2]=0;q[y+80>>2]=t;q[y+76>>2]=n;b=l>x(0);u[y+72>>2]=b?x(x(1)/l):x(0);u[y+68>>2]=b?l:x(0);u[y+60>>2]=m>x(0)?m:x(0);u[y+56>>2]=j;u[y+52>>2]=i;q[y+48>>2]=h;b=r[y+96|0]&-6|(v?4:0);z=b|1;o[y+96|0]=z;m:{switch(g-2|0){case 0:case 3:z=b|9;o[y+96|0]=z;break;default:break m}}o[y+96|0]=z|16;b=1;if(!n){break h}c=a+76|0;n:{o:{d=q[a+80>>2];p:{if(!d){break p}z=q[q[c>>2]+((t>>>0)%(d>>>0)<<2)>>2];if((z|0)==-1){break p}d=q[a+84>>2];while(1){e=d+w(z,12)|0;if(q[e>>2]==(t|0)){break o}z=q[e+8>>2];if((z|0)!=-1){continue}break}}d=(q[a+92>>2]-q[a+84>>2]|0)/12|0;a=q[a+100>>2];if((d|0)!=(a|0)){break n}q[A+32>>2]=a;Pi(4,5925,6067,A+32|0);b=0;break h}d=s[(d+w(z,12)|0)+4>>1];e=q[a+16>>2];if(d>>>0>=q[a+20>>2]-e>>1>>>0){break a}d=s[e+(d<<1)>>1];e=q[a+4>>2];a=q[a>>2];if(d>>>0>=(e-a|0)/104>>>0){break a}a=a+w(d,104)|0;p[y+90>>1]=s[a+92>>1];p[a+88>>1]=s[A+46>>1]}Mv(c,t,A+46|0)}Ii=A+48|0;return b}J(6137,6144,151,6195);G()}J(6199,6144,152,6195);G()}J(6137,6144,140,6662);G()}J(6667,6144,141,6662);G()}J(6450,6386,493,6525);G()}J(6367,6386,506,6442);G()}J(6640,6386,479,6651);G()}function Mw(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;f=a+b|0;a:{b:{c=q[a+4>>2];if(c&1){break b}if(!(c&3)){break a}c=q[a>>2];b=c+b|0;a=a-c|0;if((a|0)!=q[240596]){if(c>>>0<=255){e=c>>>3|0;c=q[a+8>>2];d=q[a+12>>2];if((d|0)==(c|0)){q[240591]=q[240591]&Fza(-2,e);break b}q[c+12>>2]=d;q[d+8>>2]=c;break b}h=q[a+24>>2];c=q[a+12>>2];c:{if((c|0)!=(a|0)){d=q[a+8>>2];q[d+12>>2]=c;q[c+8>>2]=d;break c}d:{d=a+20|0;e=q[d>>2];if(e){break d}d=a+16|0;e=q[d>>2];if(e){break d}c=0;break c}while(1){g=d;c=e;d=c+20|0;e=q[d>>2];if(e){continue}d=c+16|0;e=q[c+16>>2];if(e){continue}break}q[g>>2]=0}if(!h){break b}d=q[a+28>>2];e=(d<<2)+962668|0;e:{if(q[e>>2]==(a|0)){q[e>>2]=c;if(c){break e}q[240592]=q[240592]&Fza(-2,d);break b}q[h+(q[h+16>>2]==(a|0)?16:20)>>2]=c;if(!c){break b}}q[c+24>>2]=h;d=q[a+16>>2];if(d){q[c+16>>2]=d;q[d+24>>2]=c}d=q[a+20>>2];if(!d){break b}q[c+20>>2]=d;q[d+24>>2]=c;break b}c=q[f+4>>2];if((c&3)!=3){break b}q[240593]=b;q[f+4>>2]=c&-2;q[a+4>>2]=b|1;q[f>>2]=b;return}c=q[f+4>>2];f:{if(!(c&2)){if(q[240597]==(f|0)){q[240597]=a;b=q[240594]+b|0;q[240594]=b;q[a+4>>2]=b|1;if(q[240596]!=(a|0)){break a}q[240593]=0;q[240596]=0;return}if(q[240596]==(f|0)){q[240596]=a;b=q[240593]+b|0;q[240593]=b;q[a+4>>2]=b|1;q[a+b>>2]=b;return}b=(c&-8)+b|0;g:{if(c>>>0<=255){e=c>>>3|0;c=q[f+8>>2];d=q[f+12>>2];if((d|0)==(c|0)){q[240591]=q[240591]&Fza(-2,e);break g}q[c+12>>2]=d;q[d+8>>2]=c;break g}h=q[f+24>>2];c=q[f+12>>2];h:{if((f|0)!=(c|0)){d=q[f+8>>2];q[d+12>>2]=c;q[c+8>>2]=d;break h}i:{d=f+20|0;e=q[d>>2];if(e){break i}d=f+16|0;e=q[d>>2];if(e){break i}c=0;break h}while(1){g=d;c=e;d=c+20|0;e=q[d>>2];if(e){continue}d=c+16|0;e=q[c+16>>2];if(e){continue}break}q[g>>2]=0}if(!h){break g}d=q[f+28>>2];e=(d<<2)+962668|0;j:{if(q[e>>2]==(f|0)){q[e>>2]=c;if(c){break j}q[240592]=q[240592]&Fza(-2,d);break g}q[h+(q[h+16>>2]==(f|0)?16:20)>>2]=c;if(!c){break g}}q[c+24>>2]=h;d=q[f+16>>2];if(d){q[c+16>>2]=d;q[d+24>>2]=c}d=q[f+20>>2];if(!d){break g}q[c+20>>2]=d;q[d+24>>2]=c}q[a+4>>2]=b|1;q[a+b>>2]=b;if(q[240596]!=(a|0)){break f}q[240593]=b;return}q[f+4>>2]=c&-2;q[a+4>>2]=b|1;q[a+b>>2]=b}if(b>>>0<=255){c=b>>>3|0;b=(c<<3)+962404|0;d=q[240591];c=1<>2]}q[b+8>>2]=a;q[c+12>>2]=a;q[a+12>>2]=b;q[a+8>>2]=c;return}d=31;q[a+16>>2]=0;q[a+20>>2]=0;if(b>>>0<=16777215){d=b>>>8|0;c=d+1048320>>>16&8;e=d<>>16&4;g=e<>>16&2;c=(g<>>15|0)-(e|(c|d))|0;d=(c<<1|b>>>c+21&1)+28|0}q[a+28>>2]=d;c=(d<<2)+962668|0;l:{e=q[240592];g=1<>2]=a;q[a+24>>2]=c;break m}d=b<<((d|0)==31?0:25-(d>>>1|0)|0);c=q[c>>2];while(1){e=c;if((q[c+4>>2]&-8)==(b|0)){break l}c=d>>>29|0;d=d<<1;g=e+(c&4)|0;c=q[g+16>>2];if(c){continue}break}q[g+16>>2]=a;q[a+24>>2]=e}q[a+12>>2]=a;q[a+8>>2]=a;return}b=q[e+8>>2];q[b+12>>2]=a;q[e+8>>2]=a;q[a+24>>2]=0;q[a+12>>2]=e;q[a+8>>2]=b}}function z3(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=0;d=Ii-192|0;Ii=d;b=Ll(a,2);a:{if((b|0)==q[210436]){break a}g=1;if((b|0)==q[210437]){break a}g=2;if((b|0)==q[210438]){break a}g=3;if((b|0)==q[210439]){break a}g=(b|0)==q[210440]?4:5}b=Ll(a,3);b:{if((b|0)==q[210436]){break b}r=1;if((b|0)==q[210437]){break b}r=2;if((b|0)==q[210438]){break b}r=3;if((b|0)==q[210439]){break b}r=(b|0)==q[210440]?4:5}c:{d:{if((g|0)!=(r|0)){break d}h=x(fj(a,1));e:{switch(g|0){case 2:b=qj(a,2);g=qj(a,3);e=u[b>>2];l=u[g>>2];f=u[b+4>>2];m=u[g+4>>2];i=u[b+8>>2];o=u[g+8>>2];j=u[b+12>>2];p=u[g+12>>2];c=x(x(x(x(e*l)+x(f*m))+x(i*o))+x(j*p));if(!(c>2]=x(p*c)+x(j*h);u[b+8>>2]=x(o*c)+x(i*h);u[b+4>>2]=x(m*c)+x(f*h);u[b>>2]=x(l*c)+x(e*h);Zi(a,-1e4,134032);xj(a,-2);a=1;break c;case 1:b=_i(a,2,q[210437],0);c=u[b>>2];f=u[b+4>>2];g:{h:{if(c!=c|f!=f){break h}e=u[b+8>>2];if(e!=e){break h}e=u[b+12>>2];if(e==e){break g}}e=u[b+8>>2];i=u[b+12>>2];v[d+96>>3]=f;v[d+112>>3]=i;v[d+104>>3]=e;v[d+88>>3]=c;q[d+80>>2]=2;Qi(a,134221,d+80|0)}g=_i(a,3,q[210437],0);e=u[g>>2];f=u[g+4>>2];i:{j:{if(e!=e|f!=f){break j}i=u[g+8>>2];if(i!=i){break j}j=u[g+12>>2];if(j==j){break i}}c=u[g+8>>2];i=u[g+12>>2];v[d+48>>3]=f;v[d- -64>>3]=i;v[d+56>>3]=c;v[d+40>>3]=e;q[d+32>>2]=3;Qi(a,134221,d+32|0);j=u[g+12>>2];i=u[g+8>>2];f=u[g+4>>2];e=u[g>>2]}l=u[b>>2];m=u[b+4>>2];o=u[b+8>>2];p=u[b+12>>2];c=x(x(x(x(l*e)+x(m*f))+x(o*i))+x(p*j));k:{if(!(c>2]=x(j*c)+x(p*h);u[b+8>>2]=x(i*c)+x(o*h);u[b+4>>2]=x(f*c)+x(m*h);u[b>>2]=x(e*c)+x(l*h);Zi(a,-1e4,134016);xj(a,-2);a=1;break c;case 0:break e;default:break d}}b=_i(a,2,q[210436],0);c=u[b>>2];f=u[b+4>>2];l:{if(!(c!=c|f!=f)){e=u[b+8>>2];if(e==e){break l}}e=u[b+8>>2];v[d+176>>3]=f;v[d+184>>3]=e;v[d+168>>3]=c;q[d+160>>2]=2;Qi(a,134131,d+160|0)}g=_i(a,3,q[210436],0);c=u[g>>2];i=u[g+4>>2];m:{if(!(c!=c|i!=i)){e=u[g+8>>2];if(e==e){break m}}f=u[g+8>>2];v[d+144>>3]=i;v[d+152>>3]=f;v[d+136>>3]=c;q[d+128>>2]=3;Qi(a,134131,d+128|0);e=u[g+8>>2];i=u[g+4>>2];c=u[g>>2]}n=u[b>>2];l=u[b+4>>2];m=u[b+8>>2];f=x(x(x(n*c)+x(l*i))+x(m*e));n:{if(!(f>2]=x(e*f)+x(m*h);u[b+4>>2]=x(i*f)+x(l*h);u[b>>2]=x(c*f)+x(n*h);Zi(a,-1e4,134e3);xj(a,-2);a=1;break c}q[d+20>>2]=134032;q[d+16>>2]=134064;q[d+12>>2]=134e3;q[d+8>>2]=134064;q[d+4>>2]=135626;q[d>>2]=134064;a=Qi(a,136097,d)}Ii=d+192|0;return a|0}function zra(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=Ii-32|0;Ii=j;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{f=q[b+44>>2];g=q[f- -64>>2];if(g){h=q[f+60>>2];b=0;while(1){if((b|0)==(g|0)){break k}i=h+(b<<5)|0;if(q[i+8>>2]==(c|0)&q[i+12>>2]==(d|0)){a=0;q[e>>2]=0;b=q[(h+(b<<5)|0)+16>>2];if(b>>>0>=t[f+120>>2]){break a}v[e+8>>3]=u[q[f+116>>2]+(b<<2)>>2];break b}b=b+1|0;if((g|0)!=(b|0)){continue}break}}g=q[f+72>>2];if(g){h=q[f+68>>2];b=0;while(1){if((b|0)==(g|0)){break j}i=h+(b<<5)|0;if(q[i+8>>2]==(c|0)&q[i+12>>2]==(d|0)){q[e>>2]=1;a=q[(h+(b<<5)|0)+16>>2];if(a>>>0>=t[f+128>>2]){break i}a=q[f+124>>2]+(a<<3)|0;b=q[a+4>>2];q[e+8>>2]=q[a>>2];q[e+12>>2]=b;a=0;break b}b=b+1|0;if((g|0)!=(b|0)){continue}break}}g=q[f+80>>2];if(g){h=q[f+76>>2];b=0;while(1){if((b|0)==(g|0)){break h}i=h+(b<<5)|0;if(q[i+8>>2]==(c|0)&q[i+12>>2]==(d|0)){q[e>>2]=2;c=j;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=q[a+40>>2];Mi[q[a+44>>2]](d,c);a=q[(h+(b<<5)|0)+16>>2];if(a>>>0>=t[f+136>>2]){break g}a=sz(d,q[q[f+132>>2]+(a<<2)>>2],e+8|0,j)?-2:0;break b}b=b+1|0;if((g|0)!=(b|0)){continue}break}}a=q[f+88>>2];if(a){g=q[f+84>>2];b=0;while(1){if((a|0)==(b|0)){break f}h=g+(b<<5)|0;if(q[h+8>>2]==(c|0)&q[h+12>>2]==(d|0)){q[e>>2]=3;a=q[(g+(b<<5)|0)+16>>2];if(a>>>0>=t[f+120>>2]){break a}a=q[f+116>>2]+(a<<2)|0;u[e+8>>2]=u[a>>2];u[e+12>>2]=u[a+4>>2];u[e+16>>2]=u[a+8>>2];a=0;break b}b=b+1|0;if((a|0)!=(b|0)){continue}break}}a=q[f+96>>2];if(a){g=q[f+92>>2];b=0;while(1){if((a|0)==(b|0)){break e}h=g+(b<<5)|0;if(q[h+8>>2]==(c|0)&q[h+12>>2]==(d|0)){q[e>>2]=4;a=q[(g+(b<<5)|0)+16>>2];if(a>>>0>=t[f+120>>2]){break a}a=q[f+116>>2]+(a<<2)|0;u[e+8>>2]=u[a>>2];u[e+12>>2]=u[a+4>>2];u[e+16>>2]=u[a+8>>2];u[e+20>>2]=u[a+12>>2];a=0;break b}b=b+1|0;if((a|0)!=(b|0)){continue}break}}a=q[f+104>>2];if(a){g=q[f+100>>2];b=0;while(1){if((a|0)==(b|0)){break d}h=g+(b<<5)|0;if(q[h+8>>2]==(c|0)&q[h+12>>2]==(d|0)){q[e>>2]=5;a=q[(g+(b<<5)|0)+16>>2];if(a>>>0>=t[f+120>>2]){break a}a=q[f+116>>2]+(a<<2)|0;u[e+8>>2]=u[a>>2];u[e+12>>2]=u[a+4>>2];u[e+16>>2]=u[a+8>>2];u[e+20>>2]=u[a+12>>2];a=0;break b}b=b+1|0;if((a|0)!=(b|0)){continue}break}}a=q[f+112>>2];l:{if(!a){g=0;break l}h=q[f+108>>2];b=0;g=1;while(1){if((a|0)==(b|0)){break c}i=h+(b<<5)|0;if(q[i+8>>2]==(c|0)&q[i+12>>2]==(d|0)){q[e>>2]=6;a=q[(h+(b<<5)|0)+16>>2];if(a>>>0>=t[f+120>>2]){break a}o[e+8|0]=u[q[f+116>>2]+(a<<2)>>2]!=x(0);break l}b=b+1|0;g=a>>>0>b>>>0;if((a|0)!=(b|0)){continue}break}}Ii=j+32|0;return g-1|0}J(19530,19542,53,19576);G()}J(19530,19542,61,19576);G()}J(19530,19542,117,19576);G()}J(19530,19542,69,19576);G()}J(19530,19542,125,19576);G()}J(19530,19542,77,19576);G()}J(19530,19542,85,19576);G()}J(19530,19542,93,19576);G()}J(19530,19542,101,19576);G()}Ii=j+32|0;return a|0}J(19530,19542,109,19576);G()}function lH(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=Ii-32|0;Ii=h;c=$i(173536);q[c>>2]=0;q[c+4>>2]=0;q[c+40>>2]=0;q[c+44>>2]=1;q[c+36>>2]=-1;q[c+20>>2]=509;q[c+8>>2]=0;q[c+12>>2]=0;d=c+48|0;q[c+16>>2]=d;Ui(d,255,2036);q[c+155732>>2]=0;q[c+155736>>2]=1;d=0;q[c+88100>>2]=0;q[c+32>>2]=c+26660;e=c+2084|0;q[c+28>>2]=e;q[c+24>>2]=e;q[c+155728>>2]=-1;q[c+155712>>2]=341;e=c+155740|0;q[c+155708>>2]=e;Ui(e,255,1364);q[c+173500>>2]=0;q[c+173504>>2]=0;q[c+155724>>2]=c+173488;e=c+157104|0;q[c+155720>>2]=e;q[c+155716>>2]=e;e=c+173508|0;q[e>>2]=0;q[e+4>>2]=0;q[c+173520>>2]=0;q[c+173524>>2]=0;e=c+173528|0;q[e>>2]=0;q[e+4>>2]=0;e=c+153648|0;i=c+173520|0;g=c+173500|0;while(1){p[e+(d<<1)>>1]=1023-d;d=d+1|0;if((d|0)!=1023){continue}break}q[c+155704>>2]=a;q[c+155696>>2]=1023;a=P9(a);q[c+88104>>2]=0;q[c+155700>>2]=a;p[c+173516>>1]=0;a:{b:{c:{if(!(o[c+173532|0]&1)){Wi(q[b+4>>2]-q[b>>2]>>2,4,i,c+173528|0,c+173524|0);a=c+88168|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88160|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88152|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88144|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88136|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88128|0;q[a>>2]=0;q[a+4>>2]=0;a=c+88120|0;q[a>>2]=0;q[a+4>>2]=0;q[c+88112>>2]=0;q[c+88116>>2]=0;a=q[b>>2];if((a|0)==q[b+4>>2]){break c}a=Rz(c,q[a>>2],c+88112|0);p[c+88148>>1]=65535;q[c+88144>>2]=-1;q[c+88168>>2]=a;p[c+173516>>1]=s[c+173516>>1]+1;if(o[c+173512|0]&1){break a}Wi(128,56,g,c+173508|0,c+173504|0);q[c+173496>>2]=0;p[c+173492>>1]=0;q[c+173488>>2]=qua();if(!q[c+88168>>2]){q[c+88168>>2]=-17}d=q[b>>2];if(q[b+4>>2]-d>>2>>>0>=2){i=1;while(1){d:{if(Rz(c,q[(i<<2)+d>>2],h)){break d}d=s[c+88146>>1];if((d|0)!=65535){a=q[h+16>>2];e=q[h+20>>2];while(1){d=(d<<16>>16<<6)+c|0;g=d+88128|0;if((a|0)==q[g>>2]&(e|0)==q[g+4>>2]){break d}d=s[d+88148>>1];if((d|0)!=65535){continue}break}}a=q[c+155696>>2];if(!a){break d}a=a-1|0;q[c+155696>>2]=a;j=p[((a<<1)+c|0)+153648>>1];e=(j<<6)+c|0;g=e+88168|0;a=g;q[a>>2]=0;q[a+4>>2]=0;a=e+88160|0;q[a>>2]=0;q[a+4>>2]=0;a=e+88152|0;q[a>>2]=0;q[a+4>>2]=0;k=e+88144|0;a=k;q[a>>2]=0;q[a+4>>2]=0;a=h;f=q[a+4>>2];d=e+88112|0;q[d>>2]=q[a>>2];q[d+4>>2]=f;f=q[a+12>>2];d=e+88120|0;q[d>>2]=q[a+8>>2];q[d+4>>2]=f;f=q[a+20>>2];d=e+88128|0;q[d>>2]=q[a+16>>2];q[d+4>>2]=f;f=q[a+28>>2];d=e+88136|0;q[d>>2]=q[a+24>>2];q[d+4>>2]=f;q[g>>2]=-17;p[e+88146>>1]=65535;f=s[c+88146>>1];d=0;p[k>>1]=0;p[e+88148>>1]=f;p[c+88146>>1]=j;e=s[c+88150>>1];j=e+1|0;p[c+88150>>1]=j;k=q[a+24>>2];a=q[a+28>>2];while(1){e:{d=(d<<16>>16<<6)+c|0;f=d+88136|0;if(q[f>>2]==(k|0)&q[f+4>>2]==(a|0)){q[g>>2]=-16;if(!(j&65535)){break b}p[c+88150>>1]=e;break e}d=s[d+88144>>1];if((d|0)!=65535){continue}}break}p[c+173516>>1]=s[c+173516>>1]+1}i=i+1|0;d=q[b>>2];if(i>>>0>2]-d>>2>>>0){continue}break}}Ii=h+32|0;return c}break a}J(29783,29794,486,29850);G()}J(29730,29446,360,29708);G()}J(30765,29794,493,30840);G()}function dxa(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0;l=Ii-240|0;Ii=l;if(!q[a>>2]){i=l+216|0;q[i>>2]=0;q[i+4>>2]=0;q[i+16>>2]=0;q[i+20>>2]=0;q[i+8>>2]=0;q[i+12>>2]=0;n=xo(l+176|0);p=xo(l+136|0);s=xo(l+96|0);t=xo(l+56|0);a:{if(!Zw(i,c,d)){break a}if(!$o(i,n)){break a}if(!$o(i,p)){break a}if(!$o(i,s)){break a}if(!$o(i,t)|!q[n+4>>2]|(!q[p+4>>2]|!q[s+4>>2])){break a}if(!q[t+4>>2]){break a}c=Yl(i,1);k=a+4|0;$va(k,b);d=l+48|0;o[d+3|0]=0;o[d+2|0]=16;o[d+1|0]=16;o[d|0]=16;b:{if(!b){break b}v=c?1:3;if(!c){c=0;while(1){h=kn(i,t);o[wo(k,c)+4|0]=h+u&7;u=r[wo(k,c)+4|0];h=0;while(1){j=i;if(r[Zj(d,h)|0]>=10){m=r[Zj(d,h)|0]<22?p:s}else{m=n}j=kn(j,m)+r[Zj(d,h)|0]&31;o[Zj(wo(k,c),h)|0]=j;o[Zj(d,h)|0]=j;h=h+1|0;if((v|0)!=(h|0)){continue}break}c=c+1|0;if((c|0)!=(b|0)){continue}break}break b}c=0;while(1){h=kn(i,t);o[wo(k,c)+4|0]=h+u&7;u=r[wo(k,c)+4|0];h=0;while(1){j=i;if(r[Zj(d,h)|0]>=10){m=r[Zj(d,h)|0]<22?p:s}else{m=n}j=kn(j,m)+r[Zj(d,h)|0]&31;o[Zj(wo(k,c),h)|0]=j;o[Zj(d,h)|0]=j;h=h+1|0;if((v|0)!=(h|0)){continue}break}h=r[Zj(wo(k,c),0)|0];o[Zj(wo(k,c),1)|0]=h;h=r[Zj(wo(k,c),0)|0];o[Zj(wo(k,c),2)|0]=h;c=c+1|0;if((c|0)!=(b|0)){continue}break}}h=0;a=a+16|0;Zva(a,e);if(!Zw(i,f,g)){break a}j=xo(l+8|0);c:{if((Yl(i,1)|0)==1){break c}if((Yl(i,1)|0)==1){break c}d:{if((Yl(i,1)|0)==1){if(!e){break d}while(1){b=Yl(i,8);tk(ok(a,h),0,0,b&3);tk(ok(a,h),1,0,b>>>2&3);tk(ok(a,h),2,0,b>>>4&3);tk(ok(a,h),3,0,b>>>6&3);b=Yl(i,8);tk(ok(a,h),0,1,b&3);tk(ok(a,h),1,1,b>>>2&3);tk(ok(a,h),2,1,b>>>4&3);tk(ok(a,h),3,1,b>>>6&3);b=Yl(i,8);tk(ok(a,h),0,2,b&3);tk(ok(a,h),1,2,b>>>2&3);tk(ok(a,h),2,2,b>>>4&3);tk(ok(a,h),3,2,b>>>6&3);b=Yl(i,8);tk(ok(a,h),0,3,b&3);tk(ok(a,h),1,3,b>>>2&3);tk(ok(a,h),2,3,b>>>4&3);tk(ok(a,h),3,3,b>>>6&3);SN(ok(a,h));h=h+1|0;if((h|0)!=(e|0)){continue}break}break d}if(!$o(i,j)){break c}e:{if(e>>>0>=2){if(q[j+4>>2]){break e}break c}if(!e){break d}}d=0;b=0;f=0;g=0;while(1){m=a;f:{if(h){g=kn(i,j)^g&255;tk(ok(a,h),0,0,g&3);tk(ok(a,h),1,0,g>>>2&3);tk(ok(a,h),2,0,g>>>4&3);tk(ok(a,h),3,0,g>>>6&3);f=kn(i,j)^f&255;tk(ok(a,h),0,1,f&3);tk(ok(a,h),1,1,f>>>2&3);tk(ok(a,h),2,1,f>>>4&3);tk(ok(a,h),3,1,f>>>6&3);b=kn(i,j)^b&255;tk(ok(a,h),0,2,b&3);tk(ok(a,h),1,2,b>>>2&3);tk(ok(a,h),2,2,b>>>4&3);tk(ok(a,h),3,2,b>>>6&3);d=kn(i,j)^d&255;c=h;break f}g=Yl(i,8);tk(ok(a,0),0,0,g&3);tk(ok(a,0),1,0,g>>>2&3);tk(ok(a,0),2,0,g>>>4&3);tk(ok(a,0),3,0,g>>>6&3);f=Yl(i,8);tk(ok(a,0),0,1,f&3);tk(ok(a,0),1,1,f>>>2&3);tk(ok(a,0),2,1,f>>>4&3);tk(ok(a,0),3,1,f>>>6&3);b=Yl(i,8);tk(ok(a,0),0,2,b&3);tk(ok(a,0),1,2,b>>>2&3);tk(ok(a,0),2,2,b>>>4&3);tk(ok(a,0),3,2,b>>>6&3);d=Yl(i,8);c=0}tk(ok(m,c),0,3,d&3);tk(ok(a,c),1,3,d>>>2&3);tk(ok(a,c),2,3,d>>>4&3);tk(ok(a,c),3,3,d>>>6&3);SN(ok(a,c));h=h+1|0;if((h|0)!=(e|0)){continue}break}}h=1}Rr(j)}Rr(t);Rr(s);Rr(p);Rr(n)}Ii=l+240|0;return h}function bp(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-16|0;j=q[c>>2];g=q[c+4>>2];h=q[b+4>>2];e=h;k=q[a+4>>2];i=q[b>>2];a:{b:{if((e|0)==(k|0)&i>>>0>=t[a>>2]|e>>>0>k>>>0){e=0;if((g|0)==(h|0)&j>>>0>=i>>>0|g>>>0>h>>>0){break a}e=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=e;e=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e;g=q[b+4>>2];h=q[a+4>>2];e=1;if((g|0)==(h|0)&t[b>>2]>=t[a>>2]|g>>>0>h>>>0){break a}e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=e;e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;e=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=e;e=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=e;break b}if((g|0)==(h|0)&j>>>0>>0|g>>>0>>0){e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=e;e=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e;e=1;break a}e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=e;e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;e=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=e;e=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=e;g=q[c+4>>2];h=q[b+4>>2];e=1;if((g|0)==(h|0)&t[c>>2]>=t[b>>2]|g>>>0>h>>>0){break a}e=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=e;e=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e}e=2}g=q[d+4>>2];h=q[c+4>>2];if((g|0)==(h|0)&t[d>>2]>2]|g>>>0>>0){g=q[c+12>>2];q[f+8>>2]=q[c+8>>2];q[f+12>>2]=g;g=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=g;g=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=g;g=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=g;g=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=g;g=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=g;d=q[c+4>>2];g=q[b+4>>2];if((d|0)==(g|0)&t[c>>2]>=t[b>>2]|d>>>0>g>>>0){return e+1|0}d=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=d;d=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;d=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=d;d=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=d;c=q[b+4>>2];d=q[a+4>>2];if((c|0)==(d|0)&t[b>>2]>=t[a>>2]|c>>>0>d>>>0){return e+2|0}c=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=c;c=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=a;a=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=a;e=e+3|0}return e}function Kz(a,b,c,d){var e=x(0),f=x(0),g=x(0),h=0,i=x(0),j=0,k=x(0),l=x(0),m=x(0),n=x(0),o=0,p=x(0),s=x(0),t=x(0),v=x(0),y=0,z=0,A=0,B=x(0),C=x(0),D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0;a:{h=q[b>>2];b:{if(!h){break b}e=u[h+8>>2];j=q[b+24>>2]==3;f=j?x(e+e):e;e=u[b+16>>2];e=r[b+28|0]&2?x(f-e):e;e=x(u[h+12>>2]*(j?e>x(f*x(.5))?x(f-e):e:e));c:{if(e=x(0)){b=~~e>>>0;break c}b=0}z=q[h+20>>2];if(!z){break b}B=x(x(1)-d);k=x(e-x(b>>>0));C=x(x(1)-k);j=w(b,3);D=j+5|0;E=j+4|0;F=j+2|0;H=j+1|0;I=j+3|0;y=q[c>>2];M=(q[c+4>>2]-y|0)/176|0;N=q[h+16>>2];A=q[a+72>>2];K=q[A+4>>2];O=K;c=0;h=b<<2;P=h+5<<2;Q=(h|1)<<2;R=h+4<<2;S=h+6<<2;T=(h|2)<<2;U=h+7<<2;V=(h|3)<<2;while(1){if((c|0)==(z|0)){break a}d:{if(!K){break d}a=(c<<5)+N|0;o=q[a>>2];L=q[a+4>>2];b=q[q[A>>2]+(Cza(o,L,O)<<2)>>2];if((b|0)==-1){break d}W=q[A+8>>2];while(1){b=W+(b<<4)|0;if((o|0)!=q[b>>2]|q[b+4>>2]!=(L|0)){b=q[b+12>>2];if((b|0)!=-1){continue}break d}break}o=q[b+8>>2];if(o>>>0>=M>>>0){break d}e:{f:{g:{switch(q[a+12>>2]){case 3:b=q[a+8>>2];e=u[b+8>>2];g=u[b+4>>2];f=u[b>>2];break f;case 0:break e;default:break g}}b=q[a+8>>2];e=u[b+(F<<2)>>2];e=x(e+x(k*x(u[b+(D<<2)>>2]-e)));f=u[b+(H<<2)>>2];g=x(f+x(k*x(u[b+(E<<2)>>2]-f)));f=u[b+(j<<2)>>2];f=x(f+x(k*x(u[b+(I<<2)>>2]-f)))}b=w(o,176)+y|0;i=u[b+16>>2];u[b+16>>2]=i+x(x(f-i)*d);f=u[b+24>>2];u[b+24>>2]=f+x(x(e-f)*d);e=u[b+20>>2];u[b+20>>2]=e+x(x(g-e)*d)}h:{i:{j:{switch(q[a+20>>2]){case 4:b=q[a+16>>2];l=u[b+12>>2];m=u[b+4>>2];n=u[b>>2];i=u[b+8>>2];break i;case 0:break h;default:break j}}f=k;e=C;b=q[a+16>>2];n=u[b+(h<<2)>>2];p=u[b+R>>2];m=u[b+Q>>2];s=u[b+P>>2];i=u[b+T>>2];t=u[b+S>>2];l=u[b+V>>2];v=u[b+U>>2];g=x(x(x(x(n*p)+x(m*s))+x(i*t))+x(l*v));if(!(g>2];s=u[b+4>>2];t=u[b+8>>2];v=u[b+12>>2];g=x(x(x(x(n*p)+x(m*s))+x(i*t))+x(l*v));if(!(g>2]=x(n*f)+x(p*e);u[b+4>>2]=x(m*f)+x(s*e);u[b+8>>2]=x(i*f)+x(t*e);u[b+12>>2]=x(l*f)+x(v*e)}k:{l:{switch(q[a+28>>2]){case 3:a=q[a+24>>2];e=u[a+8>>2];g=u[a+4>>2];f=u[a>>2];break k;case 0:break d;default:break l}}a=q[a+24>>2];e=u[a+(F<<2)>>2];e=x(e+x(k*x(u[a+(D<<2)>>2]-e)));f=u[a+(H<<2)>>2];g=x(f+x(k*x(u[a+(E<<2)>>2]-f)));f=u[a+(j<<2)>>2];f=x(f+x(k*x(u[a+(I<<2)>>2]-f)))}a=w(o,176)+y|0;i=u[a+32>>2];u[a+32>>2]=i+x(x(f-i)*d);f=u[a+40>>2];u[a+40>>2]=f+x(x(e-f)*d);e=u[a+36>>2];u[a+36>>2]=e+x(x(g-e)*d)}c=c+1|0;if((z|0)!=(c|0)){continue}break}}return}J(152522,152534,153,152554);G()}function ZA(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0,v=0;a:{b:{c:{d:{e:{f:{h=b&65535;i=q[a+32>>2];if(h>>>0<(q[a+36>>2]-i|0)/592>>>0){l=b>>>16|0;if((l|0)!=s[(w(h,592)+i|0)+568>>1]){break c}k=w(h,592)+i|0;t=s[k+570>>1];if((t|0)!=(b&65535)){break b}d=q[k+416>>2];if(d){Mi[q[a+408>>2]](q[a+420>>2],a,b,d,q[(w(h,592)+i|0)+512>>2])}j=w(h,592)+i|0;n=j;g=q[a+264>>2];d=q[a+260>>2];e=g-d|0;f=(e|0)/12|0;if(!e|(q[j+412>>2]&240)!=80){break e}if(!c){break f}u=w(h,592);v=u+i|0;e=0;g:{h:{while(1){if((g-d|0)/12>>>0<=e>>>0){break d}i:{m=w(e,12);j:{if(q[(m+d|0)+8>>2]!=(b|0)){e=e+1|0;break j}d=q[a+32>>2];if((q[a+36>>2]-d|0)/592>>>0<=h>>>0){break i}d=d+u|0;if((l|0)!=s[d+568>>1]){break c}if(s[d+570>>1]!=(t|0)){break b}nt(q[a+224>>2],q[d+548>>2]);q[v+548>>2]=0;g=q[a+264>>2];d=q[a+260>>2];if((g-d|0)/12>>>0<=e>>>0){break h}d=d+m|0;g=g-12|0;m=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=m;q[d+8>>2]=q[g+8>>2];g=q[a+264>>2]-12|0;q[a+264>>2]=g;d=q[a+260>>2];if(g>>>0>>0){break g}f=f-1|0}if(e>>>0>>0){continue}break e}break}break d}J(202143,201514,513,202158);G()}J(202168,201514,516,202158);G()}break d}if((d|0)==(g|0)){break d}g=f>>>0>1?f:1;e=0;while(1){d=w(e,12)+d|0;if(q[d+8>>2]==(b|0)){kA(q[a+224>>2],q[d>>2],0);q[n+412>>2]=q[n+412>>2]|536870912}e=e+1|0;if((g|0)==(e|0)){break e}d=q[a+260>>2];if((q[a+264>>2]-d|0)/12>>>0>e>>>0){continue}break}break d}d=s[j+578>>1];if((d|0)!=65535){while(1){d=d&65535;e=q[a+32>>2];if(d>>>0>=(q[a+36>>2]-e|0)/592>>>0){break d}e=e+w(d,592)|0;d=s[e+574>>1];ZA(a,s[e+570>>1]|s[e+568>>1]<<16,c);if((d|0)!=65535){continue}break}}j=q[a+52>>2];e=q[a+48>>2];d=j-e|0;if(d){g=(d|0)/72|0;d=0;while(1){if((j-e|0)/72>>>0<=d>>>0){break d}l=w(d,72);f=l+e|0;if(q[f>>2]==(b|0)){e=r[f+68|0];k:{if(e&2){break k}o[f+68|0]=e|2;e=q[f+40>>2];if(e){Mi[e|0](f+32|0)}e=q[f+56>>2];if(!e){break k}Mi[e|0](a,q[f>>2],0,q[f+60>>2],q[f+64>>2])}f=q[a+52>>2];e=q[a+48>>2];if((f-e|0)/72>>>0<=d>>>0){break d}e=e+l|0;bl(e,e+72|0,(f-e|0)-72|0);e=q[a+48>>2];f=((q[a+52>>2]-e|0)/72|0)-1|0;if(f>>>0>(q[a+56>>2]-e|0)/72>>>0){break a}j=w(f,72)+e|0;q[a+52>>2]=j;g=g-1|0;d=d-1|0}d=d+1|0;if(d>>>0>>0){continue}break}}l:{m:{n:{o:{if(!(!(r[n+415|0]&32)|c)){Br(a,k);a=w(h,592)+i|0;p[a+572>>1]=65535;p[a+576>>1]=65535;f=a+574|0;break o}Br(a,k);d=q[a+20>>2];if(!d){break n}c=s[a+26>>1];if(!c|c>>>0>s[a+24>>1]){break m}f=k+570|0;b=s[f>>1];c=c-1|0;p[a+26>>1]=c;p[d+((c&65535)<<1)>>1]=b;c=q[a+32>>2];if((b+1|0)==((q[a+36>>2]-c|0)/592|0)){if(b>>>0>(q[a+40>>2]-c|0)/592>>>0){break l}q[a+36>>2]=c+w(b,592)}a=q[(w(h,592)+i|0)+420>>2];if(a){Ni(a)}Ui(k,0,592)}p[f>>1]=65535;return}J(201735,201742,140,201660);G()}J(201817,201742,141,201660);G()}break a}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(202185,201514,506,202204);G()}function Qx(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f:{c=q[a+16>>2];switch(r[c+21|0]){case 4:break b;case 3:break c;case 2:break d;case 1:break e;case 0:break f;default:break a}}ZE(a);return 0}if(q[c+36>>2]){return ks(c)}b=q[c+140>>2];d=c+120|0;g:{if((b|0)==(d|0)){break g}while(1){h:{if(r[b+5|0]&7){break h}e=q[b+8>>2];if(q[e+8>>2]<4){break h}e=q[e>>2];if(!(r[e+5|0]&3)){break h}Ok(c,e)}b=q[b+20>>2];if((d|0)!=(b|0)){continue}break}if(!q[c+36>>2]){break g}while(1){ks(c);if(q[c+36>>2]){continue}break}}b=q[c+44>>2];q[c+44>>2]=0;q[c+36>>2]=b;if(r[a+5|0]&3){Ok(c,a)}_E(c);if(q[c+36>>2]){while(1){ks(c);if(q[c+36>>2]){continue}break}}b=q[c+40>>2];q[c+40>>2]=0;q[c+36>>2]=b;if(b){while(1){ks(c);if(q[c+36>>2]){continue}break}}g=q[a+16>>2];d=q[g+112>>2];b=q[d>>2];if(b){while(1){e=r[b+5|0];i:{if(!(e&3?!(e&8):0)){d=b;break i}j:{h=b;f=q[b+8>>2];if(!(!f|r[f+6|0]&4)){if(eo(f,2,q[q[a+16>>2]+196>>2])){break j}e=r[b+5|0]}o[h+5|0]=e|8;d=b;break i}o[b+5|0]=r[b+5|0]|8;e=q[b+16>>2];q[d>>2]=q[b>>2];i=(e+i|0)+32|0;e=q[g+48>>2];k:{if(!e){q[b>>2]=b;break k}q[b>>2]=q[e>>2];q[q[g+48>>2]>>2]=b}q[g+48>>2]=b}b=q[d>>2];if(b){continue}break}}b=q[c+48>>2];if(b){while(1){b=q[b>>2];o[b+5|0]=r[c+20|0]&3|r[b+5|0]&248;Ok(c,b);if(q[c+48>>2]!=(b|0)){continue}break}}g=0;if(q[c+36>>2]){while(1){g=ks(c)+g|0;if(q[c+36>>2]){continue}break}}d=q[c+44>>2];if(d){while(1){b=q[d+28>>2];if(!(!b|!(r[d+5|0]&16))){while(1){b=b-1|0;a=q[d+12>>2]+(b<<4)|0;e=q[a+8>>2];l:{if((e|0)<4){break l}if((e|0)==4){a=q[a>>2];o[a+5|0]=r[a+5|0]&252;break l}f=r[q[a>>2]+5|0];if(!(f&8)|(e|0)!=7?!(f&3):0){break l}q[a+8>>2]=0}if(b){continue}break}}a=-1<>2]+(b<<5)|0;e=q[a+8>>2];m:{if(!e){break m}f=q[a+24>>2];n:{o:{if((f|0)<4){break o}if((f|0)==4){e=q[a+16>>2];o[e+5|0]=r[e+5|0]&252;e=q[a+8>>2];break o}if(r[q[a+16>>2]+5|0]&3){break n}}if((e|0)<4){break m}if((e|0)==4){a=q[a>>2];o[a+5|0]=r[a+5|0]&252;break m}f=r[q[a>>2]+5|0];if(f&3){break n}if(!(f&8)|(e|0)!=7){break m}}q[a+8>>2]=0;if(q[a+24>>2]<4){break m}q[a+24>>2]=11}a=b-1|0;if(b){continue}break}d=q[d+24>>2];if(d){continue}break}}q[c+24>>2]=0;o[c+21|0]=2;q[c+32>>2]=c+28;o[c+20|0]=r[c+20|0]^3;q[c+72>>2]=q[c+68>>2]-(g+i|0);return 0}b=q[c+24>>2];q[c+24>>2]=b+1;d=q[c+68>>2];as(a,q[c>>2]+(b<<2)|0,-3);if(q[c+24>>2]>=q[c+8>>2]){o[c+21|0]=3}q[c+72>>2]=q[c+72>>2]+(q[c+68>>2]-d|0);return 10}e=q[c+68>>2];b=as(a,q[c+32>>2],40);q[c+32>>2]=b;if(!q[b>>2]){b=q[a+16>>2];d=q[b+8>>2];g=(d|0)/4|0;if(!((d|0)<65|g>>>0<=t[b+4>>2])){Fy(a,d>>>1|0)}d=q[b+60>>2];if(d>>>0>=65){h=a;a=d>>>1|0;d=Cj(h,q[b+52>>2],d,a);q[b+60>>2]=a;q[b+52>>2]=d}o[c+21|0]=4}q[c+72>>2]=q[c+72>>2]+(q[c+68>>2]-e|0);return 400}if(q[c+48>>2]){LO(a);b=100;a=q[c+72>>2];if(a>>>0<101){break a}q[c+72>>2]=a-100;return 100}q[c+76>>2]=0;o[c+21|0]=0}return b}function LL(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-32|0;Ii=g;q[d>>2]=c;a:{b:{c:{d:{e:{f:{e=ak(a,q[c+64>>2],d+96|0);g:{if(e){break g}if(q[q[q[d+96>>2]>>2]+152>>2]){Pi(4,60694,60702,0);e=-15;break g}e=q[d>>2];c=q[e>>2];if(!(!c|!r[c|0])){e=ak(a,c,d+4|0);if(e){break g}e=q[d>>2]}h=d+100|0;c=q[e+104>>2];e=c>>>0<3?1:(c>>>0)/3|0;So(h,e,c);i=d+132|0;pt(i,e,q[q[d>>2]+104>>2]);e=q[d>>2];f=q[e+104>>2];if(f){c=0;while(1){q[g+28>>2]=0;if(c>>>0>=f>>>0){break c}f=c<<3;e=ak(a,q[(f+q[e+100>>2]|0)+4>>2],g+28|0);if(e){break g}e=q[d>>2];if(t[e+104>>2]<=c>>>0){break c}e=f+q[e+100>>2]|0;j=wm(q[e+4>>2],46);e=Oi(q[e>>2]);f=Li;q[g+16>>2]=Oi(j);q[g+20>>2]=Li;Em(h,e,f,g+28|0);Ov(i,e,f,g+16|0);c=c+1|0;e=q[d>>2];f=q[e+104>>2];if(c>>>0>>0){continue}break}}if(o[d+68|0]&1){break b}f=d- -64|0;Wi(q[e+96>>2],4,d+56|0,f,d+60|0);q[d+60>>2]=q[d+56>>2];e=q[d>>2];if(q[e+96>>2]){c=0;while(1){q[g+16>>2]=0;e=ak(a,q[(q[e+92>>2]+(c<<3)|0)+4>>2],g+16|0);if(e){break g}e=q[d+60>>2];if((e|0)==q[f>>2]){break a}h=q[g+16>>2];q[d+60>>2]=e+4;q[e>>2]=h;c=c+1|0;e=q[d>>2];if(c>>>0>2]){continue}break}}if(o[d+20|0]&1){break b}Wi(q[e+8>>2],4,d+8|0,d+16|0,d+12|0);c=q[d+8>>2];q[d+12>>2]=c;if(o[d+36|0]&1){break b}Wi(q[d+16>>2]-c>>2,8,d+24|0,d+32|0,d+28|0);q[d+28>>2]=q[d+24>>2];e=q[d>>2];f=q[e+8>>2];if(f){c=0;while(1){if(c>>>0>=f>>>0){break f}e=ak(a,q[(q[e+4>>2]+(c<<3)|0)+4>>2],g+28|0);if(e){break g}e=q[d+12>>2];if((e|0)==q[d+16>>2]){break a}f=q[g+28>>2];q[d+12>>2]=e+4;q[e>>2]=f;q[g+16>>2]=0;q[g+20>>2]=0;qr(a,q[g+28>>2],g+16|0);e=q[d+28>>2];if((e|0)==q[d+32>>2]){break a}f=q[g+16>>2];h=q[g+20>>2];q[d+28>>2]=e+8;q[e>>2]=f;q[e+4>>2]=h;c=c+1|0;e=q[d>>2];f=q[e+8>>2];if(c>>>0>>0){continue}break}}if(o[d+84|0]&1){break b}Wi(q[e+112>>2],4,d+72|0,d+80|0,d+76|0);q[d+76>>2]=q[d+72>>2];e=q[d>>2];f=q[e+112>>2];if(f){c=0;while(1){if(c>>>0>=f>>>0){break e}e=ak(a,q[(q[e+108>>2]+(c<<3)|0)+4>>2],g+16|0);if(e){break g}e=q[d+76>>2];if((e|0)==q[d+80>>2]){break a}f=q[g+16>>2];q[d+76>>2]=e+4;q[e>>2]=f;c=c+1|0;e=q[d>>2];f=q[e+112>>2];if(c>>>0>>0){continue}break}}Vl(a,60832,g+16|0);if(o[d+52|0]&1){break b}Wi(q[q[d>>2]+16>>2],8,d+40|0,d+48|0,d+44|0);q[d+44>>2]=q[d+40>>2];e=q[d>>2];f=q[e+16>>2];if(f){c=0;while(1){if(c>>>0>=f>>>0){break d}e=ak(a,q[(q[e+12>>2]+(c<<3)|0)+4>>2],g+28|0);if(e){break g}e=xv(a,q[g+28>>2],g+12|0);if(e){break g}e=q[d+44>>2];if((e|0)==q[d+48>>2]){break a}f=q[g+28>>2];h=q[g+12>>2]==q[g+16>>2];i=q[(h?f+48|0:g+28|0)>>2];q[d+44>>2]=e+8;q[e+4>>2]=i;q[e>>2]=h?f:0;c=c+1|0;e=q[d>>2];f=q[e+16>>2];if(c>>>0>>0){continue}break}}a=Pk(q[e>>2]);q[d+92>>2]=b;q[d+88>>2]=a;e=0}Ii=g+32|0;return e}J(60849,60861,255,60885);G()}J(60849,60861,323,60885);G()}J(60849,60861,263,60885);G()}J(60849,60861,315,60885);G()}J(60978,61053,493,60966);G()}J(61109,61053,533,61133);G()}function jH(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=Ii-48|0;Ii=f;q[f+8>>2]=0;a:{b:{c:{d:{if((b|0)<0){break d}k=a+155708|0;while(1){e:{f:{g:{j=b&65535;b=(j<<6)+a|0;c=b+88168|0;switch(q[c>>2]+17|0){case 1:break f;case 0:break g;default:break e}}q[f+40>>2]=0;i=b+88172|0;if(q[i>>2]){break c}l=b+88120|0;if(!q[l>>2]){q[c>>2]=-7;c=s[b+88144>>1];if((c|0)!=65535){h=((c<<16>>16<<6)+a|0)+88150|0;g=s[h>>1];if(!g){break a}p[h>>1]=g-1}if(!wv(a,c)){break e}c=1;break d}g=b+88112|0;h=b+88152|0;e=q[h>>2];if(e){if((O9(q[a+155700>>2],e,f+36|0,f+32|0,f+16|0)|0)==-1){break e}o[a+173492|0]=0;e=q[f+32>>2];j=q[f+36>>2];kH(a);h:{i:{d=q[f+16>>2];if(d){break i}d=q[f+20>>2];if(d){break i}d=q[c>>2];break h}q[c>>2]=d}j:{if((d|0)==-17){break j}Qz(a,g);d=p[b+88144>>1];if((d|0)==-1){break j}d=((d<<6)+a|0)+88150|0;i=s[d>>1];if(!i){break a}p[d>>1]=i-1}q[b+88164>>2]=q[f+24>>2];if(s[b+88146>>1]==65535){d=q[c>>2];if((d|0)==-17){uH(a,g,j,e)}k:{c=q[a+155712>>2];l:{if(!c){break l}e=b+88136|0;g=q[e>>2];e=q[e+4>>2];c=q[q[k>>2]+(Cza(g,e,c)<<2)>>2];if((c|0)==-1){break l}j=q[a+155716>>2];while(1){c=j+(c<<4)|0;if((g|0)==q[c>>2]&(e|0)==q[c+4>>2]){break k}c=q[c+12>>2];if((c|0)!=-1){continue}break}}J(30261,29446,299,30307);G()}nJ(k,g,e);c=q[h>>2];q[q[a+155700>>2]+28>>2]=0;q[c>>2]=0;q[c+4>>2]=0;q[h>>2]=0;wv(a,s[b+88144>>1]);if((d|0)!=-17){break e}c=1;break d}c=rua(q[a+173488>>2],e);q[b+88156>>2]=c;Ti(c,j,e);q[b+88160>>2]=e;c=q[h>>2];q[q[a+155700>>2]+28>>2]=0;q[c>>2]=0;q[c+4>>2]=0;q[h>>2]=0;break e}if(q[b+88156>>2]){if(!jH(a,p[b+88146>>1])){break e}c=1;break d}e=b+88136|0;d=e;d=nq(q[a+155704>>2],q[d>>2],q[d+4>>2]);if(d){q[d+28>>2]=q[d+28>>2]+1;q[i>>2]=q[d+8>>2];q[c>>2]=0;Qz(a,g);c=s[b+88144>>1];if((c|0)!=65535){h=((c<<16>>16<<6)+a|0)+88150|0;g=s[h>>1];if(!g){break a}p[h>>1]=g-1}if(!wv(a,c)){break e}c=1;break d}m:{if(r[a+173492|0]){break m}c=q[a+155712>>2];n:{if(!c){break n}d=q[e>>2];i=q[e+4>>2];c=q[q[a+155708>>2]+(Cza(d,i,c)<<2)>>2];if((c|0)==-1){break n}m=q[a+155716>>2];while(1){c=m+(c<<4)|0;if((d|0)==q[c>>2]&(i|0)==q[c+4>>2]){break m}c=q[c+12>>2];if((c|0)!=-1){continue}break}}q[f+20>>2]=a;q[f+24>>2]=j;c=q[l>>2];q[f+16>>2]=q[c+16>>2];q[f+28>>2]=q[c+12>>2];d=Q9(q[a+155700>>2],q[g>>2],q[b+88116>>2],f+16|0);q[h>>2]=d;o:{if(d){h=q[e>>2];g=q[e+4>>2];c=q[a+155712>>2];p:{if(!c){break p}c=q[q[k>>2]+(Cza(h,g,c)<<2)>>2];if((c|0)==-1){break p}e=q[a+155716>>2];while(1){c=e+(c<<4)|0;if((h|0)==q[c>>2]&(g|0)==q[c+4>>2]){break b}c=q[c+12>>2];if((c|0)!=-1){continue}break}}o[f+36|0]=1;BA(k,h,g,f+36|0);break o}o[a+173492|0]=1}if(!d){break e}c=1;break d}break e}if(!wv(a,s[b+88144>>1])){break e}c=1;break d}b=p[b+88148>>1];if((b|0)>-1){continue}break}c=0}Ii=f+48|0;return c}J(29935,29446,784,29911);G()}J(30583,29446,292,30629);G()}J(29952,29446,316,30012);G()}function cI(a,b){var c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=0,j=0,k=0,l=x(0),m=0,n=0,p=0,r=x(0),s=0,v=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;p=Ii-48|0;Ii=p;z=q[b+4>>2];c=q[a+16>>2];if(c){Aj(c)}q[a+16>>2]=b;a:{b:{c:{if(!(o[a+12|0]&1)){Wi(z,18568,a,a+8|0,a+4|0);c=q[a>>2];if((q[a+8>>2]-c|0)/18568>>>0>=z>>>0){d=w(z,18568);q[a+4>>2]=d+c;Ui(c,0,d);if(z){while(1){d:{if(t[b+4>>2]>s>>>0){k=q[b>>2]+w(s,160)|0;d=k;if(q[d+60>>2]==2){q[d+60>>2]=1}c=q[a>>2];if((q[a+4>>2]-c|0)/18568>>>0<=s>>>0){break c}c=c+w(s,18568)|0;q[c+18544>>2]=Oi(q[k+52>>2]);q[c+18548>>2]=Li;q[c+18560>>2]=q[d+60>>2];c=Ui(c,0,18528);m=q[k+88>>2];if(!m){break d}e=0;while(1){d=q[k+84>>2]+(e<<4)|0;i=q[d>>2];e:{if((i|0)<=14){f=0;h=x(0);n=q[d+4>>2];v=q[d+8>>2];g=tr(n,v,x(0));while(1){y=c+w(i,772)|0;j=y+w(f,12)|0;l=x(h+x(.015625));r=tr(n,v,l);u[j+8>>2]=x(r-g)*x(64);u[j+4>>2]=g;u[j>>2]=h;h=l;g=r;f=f+1|0;if((f|0)!=64){continue}break}u[y+768>>2]=u[d+12>>2];break e}q[p+32>>2]=i;Pi(3,150692,150998,p+32|0)}e=e+1|0;if((m|0)==(e|0)){break d}if(t[k+88>>2]>e>>>0){continue}break}J(151361,151373,225,151403);G()}J(151361,151373,270,151403);G()}f=0;h=x(0);while(1){d=c+w(f,12)|0;g=u[d+3096>>2];l=u[d+3092>>2];g=g>=x(0)?x(g+l):l;h=h>2]=h;f:{j=q[k+96>>2];if(!j){break f}e=0;while(1){d=q[k+92>>2]+w(e,12)|0;i=q[d>>2];g:{if((i|0)<=8){f=0;h=x(0);m=q[d+4>>2];n=q[d+8>>2];g=tr(m,n,x(0));while(1){d=(c+w(i,772)|0)+w(f,12)|0;l=x(h+x(.015625));r=tr(m,n,l);u[d+11588>>2]=x(r-g)*x(64);u[d+11584>>2]=g;u[d+11580>>2]=h;h=l;g=r;f=f+1|0;if((f|0)!=64){continue}break}break g}q[p+16>>2]=i;Pi(3,150692,151037,p+16|0)}e=e+1|0;if((j|0)==(e|0)){break f}if(t[k+96>>2]>e>>>0){continue}break}J(151361,151373,233,151403);G()}h:{if(!(o[c+18540|0]&1)){i=q[k+104>>2];n=c+18528|0;d=c+18536|0;v=c+18532|0;Wi(i,1544,n,d,v);c=q[n>>2];if(i>>>0<=(q[d>>2]-c|0)/1544>>>0){d=w(i,1544);q[v>>2]=d+c;Ui(c,0,d);if(!i){break h}e=0;while(1){i:{j:{B=q[n>>2];if((q[v>>2]-B|0)/1544>>>0>e>>>0){if(t[k+104>>2]<=e>>>0){break j}c=q[k+100>>2]+(e<<6)|0;C=q[c+52>>2];if(!C){break i}d=c;j=0;while(1){m=q[c+48>>2]+(j<<4)|0;y=q[m>>2];k:{if((y|0)<=1){f=0;h=x(0);D=q[m+4>>2];E=q[m+8>>2];g=tr(D,E,x(0));while(1){F=(B+w(e,1544)|0)+w(y,772)|0;A=F+w(f,12)|0;l=x(h+x(.015625));r=tr(D,E,l);u[A+8>>2]=x(r-g)*x(64);u[A+4>>2]=g;u[A>>2]=h;h=l;g=r;f=f+1|0;if((f|0)!=64){continue}break}u[F+768>>2]=u[m+12>>2];break k}q[p>>2]=y;Pi(3,150692,151077,p)}j=j+1|0;if((C|0)==(j|0)){break i}if(t[d+52>>2]>j>>>0){continue}break}J(151361,151373,161,151403);G()}break c}J(151361,151373,241,151403);G()}e=e+1|0;if((i|0)!=(e|0)){continue}break}break h}break b}break a}s=s+1|0;if((z|0)!=(s|0)){continue}break}}Ii=p+48|0;return}break b}break a}J(151947,151192,479,151403);G()}J(151260,151192,506,151279);G()}J(151117,151192,493,151248);G()}function ry(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0;f=Ii-80|0;Ii=f;a:{if(!Jj(d,0)){d=-12;break a}e=f- -64|0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;q[f+56>>2]=0;q[f+48>>2]=1;q[f+52>>2]=0;q[f+40>>2]=0;q[f+32>>2]=1;q[f+36>>2]=0;q[f+24>>2]=0;q[f+16>>2]=1;q[f+20>>2]=0;q[f+8>>2]=0;q[f>>2]=1;q[f+4>>2]=0;b:{if((xs(c,d)|0)<=-1){if(a){e=Bk(a,0);if(e){break b}}d=0;if(!b){break a}e=wk(b,c);if(e){break b}break a}e=wk(f- -64|0,c);if(e){break b}e=wk(f+48|0,d);if(e){break b}q[f+64>>2]=1;q[f+48>>2]=1;e=rl(f+32|0,q[c+4>>2]+2|0);if(e){break b}e=Bk(f+32|0,0);if(e){break b}e=rl(f+16|0,2);if(e){break b}e=rl(f,3);if(e){break b}e=Ql(f+48|0)&31;if((e|0)!=31){o=e^31;e=on(f- -64|0,o);if(e){break b}e=on(f+48|0,o);if(e){break b}}h=q[f+68>>2]-1|0;m=q[f+52>>2];k=m-1|0;i=h-k|0;g=i<<5;e=on(f+48|0,g);if(e){break b}i=i<<2;while(1){if((_j(f- -64|0,f+48|0)|0)>=0){e=i+q[f+40>>2]|0;q[e>>2]=q[e>>2]+1;e=yl(f- -64|0,f- -64|0,f+48|0);if(!e){continue}break b}break}e=kl(f+48|0,g);if(e){break b}if(h>>>0>k>>>0){s=m-2<<2;while(1){p=h<<2;e=q[f+72>>2];i=q[p+e>>2];r=k<<2;j=q[r+q[f+56>>2]>>2];c:{if(i>>>0>=j>>>0){e=-1;g=q[f+40>>2];l=h-m|0;q[g+(l<<2)>>2]=-1;i=h-1|0;break c}g=q[f+40>>2];l=h-m|0;n=i;i=h-1|0;e=QW(n,q[e+(i<<2)>>2],j);q[g+(l<<2)>>2]=e}j=l<<2;q[j+g>>2]=e;n=h-2|0;e=Bk(f+16|0,0);d:{if(k){if(e){break b}while(1){e=q[f+24>>2];g=q[f+56>>2];q[e>>2]=q[g+s>>2];q[e+4>>2]=q[g+r>>2];e=Tq(f+16|0,f+16|0,q[j+q[f+40>>2]>>2]);if(e){break b}e=Bk(f,0);if(e){break b}e:{if(h>>>0>=2){e=q[f+8>>2];g=q[f+72>>2];q[e>>2]=q[g+(n<<2)>>2];break e}e=q[f+8>>2];q[e>>2]=0;g=q[f+72>>2]}q[e+4>>2]=q[(i<<2)+g>>2];q[e+8>>2]=q[g+p>>2];if((_j(f+16|0,f)|0)<1){break d}e=j+q[f+40>>2]|0;q[e>>2]=q[e>>2]-1;e=Bk(f+16|0,0);if(!e){continue}break}break b}if(e){break b}while(1){e=q[f+24>>2];q[e>>2]=0;q[e+4>>2]=q[q[f+56>>2]>>2];e=Tq(f+16|0,f+16|0,q[j+q[f+40>>2]>>2]);if(e){break b}e=Bk(f,0);if(e){break b}f:{if(h>>>0>=2){e=q[f+8>>2];g=q[f+72>>2];q[e>>2]=q[g+(n<<2)>>2];break f}e=q[f+8>>2];q[e>>2]=0;g=q[f+72>>2]}q[e+4>>2]=q[(i<<2)+g>>2];q[e+8>>2]=q[g+p>>2];if((_j(f+16|0,f)|0)<1){break d}e=j+q[f+40>>2]|0;q[e>>2]=q[e>>2]-1;e=Bk(f+16|0,0);if(!e){continue}break}break b}e=Tq(f+16|0,f+48|0,q[j+q[f+40>>2]>>2]);if(e){break b}h=l<<5;e=on(f+16|0,h);if(e){break b}e=yl(f- -64|0,f- -64|0,f+16|0);if(e){break b}if((Jj(f- -64|0,0)|0)<=-1){e=wk(f+16|0,f+48|0);if(e){break b}e=on(f+16|0,h);if(e){break b}e=Rl(f- -64|0,f- -64|0,f+16|0);if(e){break b}e=j+q[f+40>>2]|0;q[e>>2]=q[e>>2]-1}h=i;if(k>>>0>>0){continue}break}}if(a){e=wk(a,f+32|0);if(e){break b}q[a>>2]=w(q[d>>2],q[c>>2])}if(!b){e=0;break b}e=kl(f- -64|0,o);if(e){break b}q[f+64>>2]=q[c>>2];e=wk(b,f- -64|0);if(e){break b}e=0;if(Jj(b,0)){break b}q[b>>2]=1}ij(f- -64|0);ij(f+48|0);ij(f+32|0);ij(f+16|0);ij(f);d=e}Ii=f+80|0;return d}function PW(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0;e=q[a+4>>2];d=e+16|0;f=q[e+12>>2]^(r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24));g=q[e+8>>2]^(r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24));h=q[e+4>>2]^(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24));b=q[e>>2]^(r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24));a=q[a>>2];if((a|0)>=4){a=a>>>1|0;while(1){e=q[(h>>>22&1020)+847088>>2]^(q[(g>>>14&1020)+846064>>2]^(q[(f>>>6&1020)+845040>>2]^(q[((b&255)<<2)+844016>>2]^q[d>>2])));i=q[(g>>>22&1020)+847088>>2]^(q[(f>>>14&1020)+846064>>2]^(q[(b>>>6&1020)+845040>>2]^(q[((h&255)<<2)+844016>>2]^q[d+4>>2])));j=q[(f>>>22&1020)+847088>>2]^(q[(b>>>14&1020)+846064>>2]^(q[(h>>>6&1020)+845040>>2]^(q[((g&255)<<2)+844016>>2]^q[d+8>>2])));b=q[(b>>>22&1020)+847088>>2]^(q[(h>>>14&1020)+846064>>2]^(q[(g>>>6&1020)+845040>>2]^(q[((f&255)<<2)+844016>>2]^q[d+12>>2])));f=q[(e>>>22&1020)+847088>>2]^(q[(i>>>14&1020)+846064>>2]^(q[(j>>>6&1020)+845040>>2]^(q[((b&255)<<2)+844016>>2]^q[d+28>>2])));g=q[(b>>>22&1020)+847088>>2]^(q[(e>>>14&1020)+846064>>2]^(q[(i>>>6&1020)+845040>>2]^(q[((j&255)<<2)+844016>>2]^q[d+24>>2])));h=q[(j>>>22&1020)+847088>>2]^(q[(b>>>14&1020)+846064>>2]^(q[(e>>>6&1020)+845040>>2]^(q[((i&255)<<2)+844016>>2]^q[d+20>>2])));b=q[(i>>>22&1020)+847088>>2]^(q[(j>>>14&1020)+846064>>2]^(q[(b>>>6&1020)+845040>>2]^(q[((e&255)<<2)+844016>>2]^q[d+16>>2])));d=d+32|0;e=(a|0)>2;a=a-1|0;if(e){continue}break}}e=q[(b>>>22&1020)+847088>>2]^(q[(h>>>14&1020)+846064>>2]^(q[(g>>>6&1020)+845040>>2]^(q[((f&255)<<2)+844016>>2]^q[d+12>>2])));j=r[(e>>>8&255)+852208|0];a=q[(f>>>22&1020)+847088>>2]^(q[(b>>>14&1020)+846064>>2]^(q[(h>>>6&1020)+845040>>2]^(q[((g&255)<<2)+844016>>2]^q[d+8>>2])));k=r[(a>>>16&255)+852208|0];i=q[(h>>>22&1020)+847088>>2]^(q[(g>>>14&1020)+846064>>2]^(q[(f>>>6&1020)+845040>>2]^(q[((b&255)<<2)+844016>>2]^q[d>>2])));l=r[(i>>>8&255)+852208|0];m=r[(e>>>16&255)+852208|0];b=q[(g>>>22&1020)+847088>>2]^(q[(f>>>14&1020)+846064>>2]^(q[(b>>>6&1020)+845040>>2]^(q[((h&255)<<2)+844016>>2]^q[d+4>>2])));g=r[(b>>>8&255)+852208|0];h=r[(i>>>16&255)+852208|0];n=r[(a>>>8&255)+852208|0];p=r[(b>>>16&255)+852208|0];s=r[(b>>>24|0)+852208|0];t=r[(a>>>24|0)+852208|0];u=r[(e>>>24|0)+852208|0];v=r[(i>>>24|0)+852208|0];i=r[(i&255)+852208|0];w=r[(b&255)+852208|0];x=r[(a&255)+852208|0];a=q[d+16>>2];b=q[d+20>>2];f=q[d+24>>2];d=q[d+28>>2];o[c+12|0]=d^r[(e&255)+852208|0];o[c+8|0]=f^x;o[c+4|0]=b^w;o[c|0]=a^i;o[c+15|0]=(d^v<<24)>>>24;o[c+11|0]=(f^u<<24)>>>24;o[c+7|0]=(b^t<<24)>>>24;o[c+3|0]=(a^s<<24)>>>24;o[c+14|0]=(d^p<<16)>>>16;o[c+13|0]=(d^n<<8)>>>8;o[c+10|0]=(f^h<<16)>>>16;o[c+9|0]=(f^g<<8)>>>8;o[c+6|0]=(b^m<<16)>>>16;o[c+5|0]=(b^l<<8)>>>8;o[c+2|0]=(a^k<<16)>>>16;o[c+1|0]=(a^j<<8)>>>8}function OW(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0;e=q[a+4>>2];d=e+16|0;f=q[e+12>>2]^(r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24));g=q[e+8>>2]^(r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24));h=q[e+4>>2]^(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24));b=q[e>>2]^(r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24));a=q[a>>2];if((a|0)>=4){a=a>>>1|0;while(1){e=q[(h>>>22&1020)+851184>>2]^(q[(b>>>14&1020)+850160>>2]^(q[(f>>>6&1020)+849136>>2]^(q[((g&255)<<2)+848112>>2]^q[d+8>>2])));i=q[(b>>>22&1020)+851184>>2]^(q[(f>>>14&1020)+850160>>2]^(q[(g>>>6&1020)+849136>>2]^(q[((h&255)<<2)+848112>>2]^q[d+4>>2])));j=q[(f>>>22&1020)+851184>>2]^(q[(g>>>14&1020)+850160>>2]^(q[(h>>>6&1020)+849136>>2]^(q[((b&255)<<2)+848112>>2]^q[d>>2])));b=q[(g>>>22&1020)+851184>>2]^(q[(h>>>14&1020)+850160>>2]^(q[(b>>>6&1020)+849136>>2]^(q[((f&255)<<2)+848112>>2]^q[d+12>>2])));f=q[(e>>>22&1020)+851184>>2]^(q[(i>>>14&1020)+850160>>2]^(q[(j>>>6&1020)+849136>>2]^(q[((b&255)<<2)+848112>>2]^q[d+28>>2])));g=q[(i>>>22&1020)+851184>>2]^(q[(j>>>14&1020)+850160>>2]^(q[(b>>>6&1020)+849136>>2]^(q[((e&255)<<2)+848112>>2]^q[d+24>>2])));h=q[(j>>>22&1020)+851184>>2]^(q[(b>>>14&1020)+850160>>2]^(q[(e>>>6&1020)+849136>>2]^(q[((i&255)<<2)+848112>>2]^q[d+20>>2])));b=q[(b>>>22&1020)+851184>>2]^(q[(e>>>14&1020)+850160>>2]^(q[(i>>>6&1020)+849136>>2]^(q[((j&255)<<2)+848112>>2]^q[d+16>>2])));d=d+32|0;e=(a|0)>2;a=a-1|0;if(e){continue}break}}a=q[(b>>>22&1020)+851184>>2]^(q[(f>>>14&1020)+850160>>2]^(q[(g>>>6&1020)+849136>>2]^(q[((h&255)<<2)+848112>>2]^q[d+4>>2])));j=r[(a>>>8&255)+843760|0];e=q[(h>>>22&1020)+851184>>2]^(q[(b>>>14&1020)+850160>>2]^(q[(f>>>6&1020)+849136>>2]^(q[((g&255)<<2)+848112>>2]^q[d+8>>2])));k=r[(e>>>16&255)+843760|0];l=r[(e>>>8&255)+843760|0];i=q[(g>>>22&1020)+851184>>2]^(q[(h>>>14&1020)+850160>>2]^(q[(b>>>6&1020)+849136>>2]^(q[((f&255)<<2)+848112>>2]^q[d+12>>2])));m=r[(i>>>16&255)+843760|0];n=r[(i>>>8&255)+843760|0];b=q[(f>>>22&1020)+851184>>2]^(q[(g>>>14&1020)+850160>>2]^(q[(h>>>6&1020)+849136>>2]^(q[((b&255)<<2)+848112>>2]^q[d>>2])));g=r[(b>>>16&255)+843760|0];h=r[(b>>>8&255)+843760|0];p=r[(a>>>16&255)+843760|0];s=r[(i>>>24|0)+843760|0];t=r[(b>>>24|0)+843760|0];u=r[(a>>>24|0)+843760|0];v=r[(e>>>24|0)+843760|0];w=r[(b&255)+843760|0];x=r[(a&255)+843760|0];e=r[(e&255)+843760|0];a=q[d+16>>2];b=q[d+20>>2];f=q[d+24>>2];d=q[d+28>>2];o[c+12|0]=d^r[(i&255)+843760|0];o[c+8|0]=e^f;o[c+4|0]=b^x;o[c|0]=a^w;o[c+15|0]=(d^v<<24)>>>24;o[c+11|0]=(f^u<<24)>>>24;o[c+7|0]=(b^t<<24)>>>24;o[c+3|0]=(a^s<<24)>>>24;o[c+14|0]=(d^p<<16)>>>16;o[c+13|0]=(d^h<<8)>>>8;o[c+10|0]=(f^g<<16)>>>16;o[c+9|0]=(f^n<<8)>>>8;o[c+6|0]=(b^m<<16)>>>16;o[c+5|0]=(b^l<<8)>>>8;o[c+2|0]=(a^k<<16)>>>16;o[c+1|0]=(a^j<<8)>>>8}function Tw(a,b,c){var d=0,e=0,f=0,g=0,h=x(0),i=0,j=0,k=0,l=0,m=0,n=0,s=0,t=0,u=0,v=0,z=0,A=0,B=0,C=0,D=0,E=x(0),F=0,H=0,I=0,K=0,L=0,M=0,N=0,O=0;a:{b:{d=q[a+104>>2];if(!((d|0)==8|d-8>>>0>9)){d=r[b+3|0];e=d>>>0>255?255:d;d=r[b+7|0];e=d>>>0>e>>>0?e:d;d=r[b+11|0];e=d>>>0>e>>>0?e:d;d=r[b+15|0];e=d>>>0>e>>>0?e:d;d=r[b+19|0];e=d>>>0>e>>>0?e:d;d=r[b+23|0];e=d>>>0>e>>>0?e:d;d=r[b+27|0];e=d>>>0>e>>>0?e:d;d=r[b+31|0];e=d>>>0>e>>>0?e:d;d=r[b+35|0];e=d>>>0>e>>>0?e:d;d=r[b+39|0];e=d>>>0>e>>>0?e:d;d=r[b+43|0];e=d>>>0>e>>>0?e:d;d=r[b+47|0];e=d>>>0>e>>>0?e:d;d=r[b+51|0];e=d>>>0>e>>>0?e:d;d=r[b+55|0];e=d>>>0>e>>>0?e:d;d=r[b+59|0];e=d>>>0>e>>>0?e:d;d=r[b+63|0];g=d>>>0>e>>>0?e:d;e=r[b+3|0];d=r[b+7|0];e=d>>>0>>0?e:d;d=r[b+11|0];e=d>>>0>>0?e:d;d=r[b+15|0];e=d>>>0>>0?e:d;d=r[b+19|0];e=d>>>0>>0?e:d;d=r[b+23|0];e=d>>>0>>0?e:d;d=r[b+27|0];e=d>>>0>>0?e:d;d=r[b+31|0];e=d>>>0>>0?e:d;d=r[b+35|0];e=d>>>0>>0?e:d;d=r[b+39|0];e=d>>>0>>0?e:d;d=r[b+43|0];e=d>>>0>>0?e:d;d=r[b+47|0];e=d>>>0>>0?e:d;d=r[b+51|0];e=d>>>0>>0?e:d;d=r[b+55|0];e=d>>>0>>0?e:d;d=r[b+59|0];e=d>>>0>>0?e:d;d=r[b+63|0];d=d>>>0>>0?e:d;if((g|0)!=(d|0)){break b}p[c>>1]=g&255|7424;break a}b=c;if((d|0)==8){a=r[Zj(a+112|0,3)|0]|7424}else{a=7679}p[b>>1]=a;break a}e=q[a+132>>2];f=e>>>4|0;if(f){o[c+1|0]=(e<<8&3840|f<<12)>>>8;a=c;h=x(g>>>0);E=x(x(d>>>0)-h);e=((e&15)<<3)+106016|0;d=o[e+3|0];h=Ao(x(x(E*x(x(0-d|0)/x(o[e+7|0]-d|0)))+h));c:{if(x(y(h))>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+1|0])|0;H=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+2|0])|0;I=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+3|0])|0;K=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+4|0])|0;L=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+5|0])|0;M=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+6|0])|0;N=(a>>>0<256?a:a>>31^-1)&255;a=d+w(f,o[e+7|0])|0;O=(a>>>0<256?a:a>>31^-1)&255;while(1){a=j;e=r[((((a&3)<<4)+b|0)+(a&-4)|0)+3|0];d=F-e|0;k=d>>31;a=H-e|0;l=a>>31;m=I-e|0;n=m>>31;s=K-e|0;t=s>>31;u=L-e|0;v=u>>31;f=M-e|0;z=f>>31;g=N-e|0;A=g>>31;e=O-e|0;B=e>>31;d=(k^d+k)<<3;a=(l^a+l)<<3|1;d=a>>>0>d>>>0?d:a;a=(n^n+m)<<3|2;d=a>>>0>d>>>0?d:a;a=(t^t+s)<<3|3;d=a>>>0>d>>>0?d:a;a=(v^v+u)<<3|4;d=a>>>0>d>>>0?d:a;a=(z^f+z)<<3|5;d=a>>>0>d>>>0?d:a;a=(A^g+A)<<3|6;d=a>>>0>d>>>0?d:a;a=(B^e+B)<<3|7;e=(a>>>0>d>>>0?d:a)&7;d=Aza(j,i,-3,-1)+45|0;a=d;d=d&31;if((a&63)>>>0>=32){a=e<>>32-d;d=e<>>0<1?i+1|0:i;j=a;if((a|0)!=16|i){continue}break}Yt(c,C,D);return}J(105962,96899,14563,105978);G()}a=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[c+2|0]=a;o[c+3|0]=a>>>8;o[c+4|0]=a>>>16;o[c+5|0]=a>>>24;a=r[105960]|r[105961]<<8;o[c+6|0]=a;o[c+7|0]=a>>>8}function Jq(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=Ii-16|0;Ii=f;e=q[d>>2];i=q[e+12>>2];g=0;a:{if(!i){break a}k=q[b>>2];g=q[e+8>>2];e=0;b:{while(1){if(!dj(k,q[(e<<2)+g>>2])){break b}e=e+1|0;if((i|0)!=(e|0)){continue}break}e=-1}h=q[a>>2];c:{while(1){if(!dj(h,q[(j<<2)+g>>2])){break c}j=j+1|0;if((i|0)!=(j|0)){continue}break}j=-1}l=q[c>>2];h=0;d:{e:{if((e|0)<(j|0)){f:{while(1){if(!dj(l,q[(h<<2)+g>>2])){break f}h=h+1|0;if((i|0)!=(h|0)){continue}break}h=-1}e=0;g:{while(1){if(!dj(k,q[(e<<2)+g>>2])){break g}e=e+1|0;if((i|0)!=(e|0)){continue}break}e=-1}if((e|0)<=(h|0)){break e}b=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=b;b=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;a=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=a;a=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=a;g=1;break a}h:{while(1){if(!dj(l,q[(h<<2)+g>>2])){break h}h=h+1|0;if((i|0)!=(h|0)){continue}break}h=-1}e=0;i:{while(1){if(!dj(k,q[(e<<2)+g>>2])){break i}e=e+1|0;if((i|0)!=(e|0)){continue}break}e=-1}g=0;if((e|0)<=(h|0)){break a}e=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=e;e=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e;d=q[d>>2];c=q[d+12>>2];g=1;if(!c){break a}e=q[b>>2];h=q[d+8>>2];d=0;j:{while(1){if(!dj(e,q[h+(d<<2)>>2])){break j}d=d+1|0;if((c|0)!=(d|0)){continue}break}d=-1}g=q[a>>2];e=0;k:{while(1){if(!dj(g,q[h+(e<<2)>>2])){break k}e=e+1|0;if((c|0)!=(e|0)){continue}break}e=-1}g=1;if((d|0)>=(e|0)){break a}c=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=c;c=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=a;a=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=a;break d}e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=e;e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;a=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=a;a=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=a;d=q[d>>2];a=q[d+12>>2];g=1;if(!a){break a}e=q[c>>2];h=q[d+8>>2];d=0;l:{while(1){if(!dj(e,q[h+(d<<2)>>2])){break l}d=d+1|0;if((a|0)!=(d|0)){continue}break}d=-1}g=q[b>>2];e=0;m:{while(1){if(!dj(g,q[h+(e<<2)>>2])){break m}e=e+1|0;if((a|0)!=(e|0)){continue}break}e=-1}g=1;if((d|0)>=(e|0)){break a}a=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=a;a=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=a;a=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=a;a=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=a;a=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=a;a=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=a}g=2}Ii=f+16|0;return g}function VL(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=x(0),n=x(0),o=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=0,M=0,N=0,O=0;l=Ii-80|0;Ii=l;a:{b:{if(!b){a=0;Pi(4,7319,8120,0);break b}k=q[a>>2];c:{if(r[k+3272|0]&2){Pi(3,7319,11534,0);break c}a=vw(k,b,c);if(!a){break c}tp(q[k>>2],b);o=u[h>>2];v=u[h+4>>2];E=u[h+8>>2];u[a+24>>2]=E;u[a+20>>2]=v;u[a+16>>2]=o;m=u[i>>2];n=u[i+4>>2];C=u[i+8>>2];D=u[i+12>>2];u[a+12>>2]=D;u[a+8>>2]=C;u[a+4>>2]=n;u[a>>2]=m;z=u[j>>2];A=u[j+4>>2];B=u[j+8>>2];u[a+40>>2]=B;u[a+36>>2]=A;u[a+32>>2]=z;d:{e:{h=q[a+140>>2]&32767;b=q[k+3128>>2];if(h>>>0>2]-b>>6>>>0){b=b+(h<<6)|0;u[b+48>>2]=o;o=x(C+C);F=x(m*o);y=x(n+n);H=x(y*D);u[b+32>>2]=x(F+H)*B;I=x(m*y);K=x(D*o);u[b+16>>2]=x(I-K)*A;u[b+12>>2]=z*x(0);u[b+8>>2]=x(F-H)*z;u[b+4>>2]=x(I+K)*z;q[b+60>>2]=1065353216;u[b+56>>2]=E;u[b+52>>2]=v;u[b+44>>2]=B*x(0);v=m;m=x(m+m);v=x(x(1)-x(v*m));y=x(n*y);u[b+40>>2]=x(v-y)*B;n=x(n*o);m=x(m*D);u[b+36>>2]=x(n-m)*B;u[b+28>>2]=A*x(0);u[b+24>>2]=x(n+m)*A;m=x(C*o);u[b+20>>2]=x(v-m)*A;u[b>>2]=x(x(x(1)-y)-m)*z;b=a+104|0;wn(b,1);h=b;b=q[56654];Cl(h,b,hj(b));q[l+56>>2]=a;h=k+3144|0;f:{g:{b=q[k+3148>>2];h:{if(!b){break h}b=q[q[h>>2]+(Cza(d,e,b)<<2)>>2];if((b|0)==-1){break h}i=q[k+3152>>2];while(1){b=i+(b<<4)|0;if((d|0)==q[b>>2]&(e|0)==q[b+4>>2]){break g}b=q[b+12>>2];if((b|0)!=-1){continue}break}}if(q[a+96>>2]!=q[71492]|q[a+100>>2]!=q[71493]){break f}q[a+96>>2]=d;q[a+100>>2]=e;wr(h,d,e,l+56|0);if(t[k+3168>>2]<=s[k+1058>>1]){break f}J(7842,7192,1e3,8106);G()}q[l+48>>2]=aj(d,e);Pi(4,7319,11596,l+48|0);Ir(k,a);break c}if(!Mt(k,a)){b=q[a+96>>2];d=q[a+100>>2];if((b|0)!=q[71492]|(d|0)!=q[71493]){xr(h,b,d);b=q[71493];q[a+96>>2]=q[71492];q[a+100>>2]=b}Ir(k,a);break c}b=q[a+84>>2];j=q[b+4>>2];i:{if(!j){break i}O=q[b>>2];e=l+56|4;h=0;L=1;b=0;while(1){M=w(b,96)+O|0;i=q[M+16>>2];N=q[i+100>>2];j:{if(dj(q[i+4>>2],10857)|!q[i+80>>2]){break j}d=e;q[d>>2]=0;q[d+4>>2]=0;q[d+8>>2]=0;q[l+72>>2]=((h<<2)+a|0)+156&N<<15>>31;q[l+56>>2]=a;d=wM(q[i+16>>2],f,g);q[l+68>>2]=d;if(d){q[l+64>>2]=27;q[l+60>>2]=28;if(!(Mi[q[q[M+16>>2]+80>>2]](l+56|0)|0)){break j}b=11731}else{b=11674}q[l+32>>2]=c;Pi(4,7319,b,l+32|0);if(!L){break i}break d}h=((N&65536)>>>16|0)+h|0;b=b+1|0;L=j>>>0>b>>>0;if((b|0)!=(j|0)){continue}break}}if(!AB(k,a)){q[l+16>>2]=c;Pi(4,7319,11635,l+16|0);break d}c=q[a+148>>2];if(c&32768){break e}d=q[a+140>>2];b=d;if(b&32768){break b}q[a+148>>2]=c|32768;b=b&32767;c=s[k+3266>>1];k:{if((c|0)!=32767){d=q[k+1036>>2];if(c>>>0>=q[k+1040>>2]-d>>2>>>0){break a}p[q[d+(c<<2)>>2]+146>>1]=b;break k}p[k+3264>>1]=b}p[k+3266>>1]=b;break b}break a}J(11495,7192,1021,11522);G()}Lt(k,a,0)}q[l>>2]=c;Pi(4,7319,8148,l);a=0}Ii=l+80|0;return a}J(12419,9962,479,9454);G()}function Yy(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{b=r[a+1388|0];if(b){break p}h=-1;if(q[a+1396>>2]){break n}d=q[a+1392>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break n}if(!(o[a+1387|0]&1)){break o}d=q[a+1392>>2]}c=d+1|0;q[a+1392>>2]=c;b=r[(a+d|0)+1132|0];if((b|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=b;if(b){break p}q[a+1408>>2]=0;g=a+1408|0;break m}o[a+1388|0]=b-1;q[a+1412>>2]=q[a+1412>>2]+1;b=q[a+44>>2];q:{r:{if(b){if(b>>>0>=t[a+52>>2]){break r}q[a+44>>2]=b+1;b=r[b|0];break q}b=wj(q[a+32>>2]);if((b|0)!=-1){break q}}q[a+108>>2]=1;b=0}h=b&255;break n}q[a+112>>2]=32}q[a+1408>>2]=0;g=a+1408|0;b=r[a+1388|0];if(b){break l}}d=-1;if(q[a+1396>>2]){break j}d=q[a+1392>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;d=-1;break j}if(!(o[a+1387|0]&1)){break k}d=q[a+1392>>2]}c=d+1|0;q[a+1392>>2]=c;b=r[(a+d|0)+1132|0];if((b|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if((c|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=b;if(b){break l}q[g>>2]=0;d=-1;break i}o[a+1388|0]=b-1;q[a+1412>>2]=q[a+1412>>2]+1;b=q[a+44>>2];s:{t:{if(b){if(b>>>0>=t[a+52>>2]){break t}q[a+44>>2]=b+1;b=r[b|0];break s}b=wj(q[a+32>>2]);if((b|0)!=-1){break s}}q[a+108>>2]=1;b=0}d=b&255;break j}q[a+112>>2]=32;d=-1}q[a+1408>>2]=0;b=r[a+1388|0];if(b){break h}}b=-1;if(q[a+1396>>2]){break f}c=q[a+1392>>2];if((c|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break f}if(!(o[a+1387|0]&1)){break g}c=q[a+1392>>2]}e=c+1|0;q[a+1392>>2]=e;b=r[(a+c|0)+1132|0];if((b|0)!=255){q[a+1400>>2]=c;q[a+1396>>2]=1}if((e|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=b;if(b){break h}q[g>>2]=0;b=-1;break e}o[a+1388|0]=b-1;q[a+1412>>2]=q[a+1412>>2]+1;b=q[a+44>>2];u:{v:{if(b){if(b>>>0>=t[a+52>>2]){break v}q[a+44>>2]=b+1;b=r[b|0];break u}b=wj(q[a+32>>2]);if((b|0)!=-1){break u}}q[a+108>>2]=1;b=0}b=b&255;break f}q[a+112>>2]=32}q[a+1408>>2]=0;e=r[a+1388|0];if(e){break d}}c=-16777216;if(q[a+1396>>2]){break b}f=q[a+1392>>2];if((f|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break b}if(!(o[a+1387|0]&1)){break c}f=q[a+1392>>2]}i=f+1|0;q[a+1392>>2]=i;e=r[(a+f|0)+1132|0];if((e|0)!=255){q[a+1400>>2]=f;q[a+1396>>2]=1}if(q[a+1128>>2]<=(i|0)){q[a+1392>>2]=-1}if(r[a+1388|0]){break a}o[a+1388|0]=e;if(!e){break b}}o[a+1388|0]=e-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];w:{x:{if(c){if(c>>>0>=t[a+52>>2]){break x}q[a+44>>2]=c+1;c=r[c|0];break w}c=wj(q[a+32>>2]);if((c|0)!=-1){break w}}q[a+108>>2]=1;c=0}c=c<<24;break b}q[a+112>>2]=32}q[g>>2]=0;return(((d<<8)+h|0)+(b<<16)|0)+c|0}J(211824,211687,1555,211845);G()}function qs(a,b){var c=0,d=0,e=0,f=0,g=0;c=q[a+4>>2];g=a+80|0;f=q[a>>2];d=f&127;o[g+d|0]=128;e=d+1|0;a:{if(d>>>0<=111){Ui((a+e|0)+80|0,0,111-d|0);break a}Ui((a+e|0)+80|0,0,d^127);As(a,g);Ui(g,0,112);f=q[a>>2];c=q[a+4>>2]}o[a+206|0]=(c&31)<<27|f>>>5;o[a+205|0]=(c&8191)<<19|f>>>13;o[a+204|0]=(c&2097151)<<11|f>>>21;o[a+203|0]=(c&536870911)<<3|f>>>29;o[a+202|0]=c>>>5;o[a+201|0]=c>>>13;o[a+200|0]=c>>>21;o[a+207|0]=f<<3;e=q[a+12>>2];d=e;e=q[a+8>>2];o[a+198|0]=(d&31)<<27|e>>>5;o[a+197|0]=(d&8191)<<19|e>>>13;o[a+196|0]=(d&2097151)<<11|e>>>21;o[a+195|0]=(d&536870911)<<3|e>>>29;o[a+194|0]=d>>>5;o[a+193|0]=d>>>13;o[a+192|0]=d>>>21;o[a+199|0]=e<<3|c>>>29;As(a,g);o[b|0]=r[a+23|0];o[b+1|0]=s[a+22>>1];o[b+2|0]=q[a+20>>2]>>>8;o[b+3|0]=q[a+20>>2];o[b+4|0]=(q[a+20>>2]&16777215)<<8|q[a+16>>2]>>>24;o[b+5|0]=(q[a+20>>2]&65535)<<16|q[a+16>>2]>>>16;o[b+6|0]=(q[a+20>>2]&255)<<24|q[a+16>>2]>>>8;o[b+7|0]=q[a+16>>2];o[b+8|0]=r[a+31|0];o[b+9|0]=s[a+30>>1];o[b+10|0]=q[a+28>>2]>>>8;o[b+11|0]=q[a+28>>2];o[b+12|0]=(q[a+28>>2]&16777215)<<8|q[a+24>>2]>>>24;o[b+13|0]=(q[a+28>>2]&65535)<<16|q[a+24>>2]>>>16;o[b+14|0]=(q[a+28>>2]&255)<<24|q[a+24>>2]>>>8;o[b+15|0]=q[a+24>>2];o[b+16|0]=r[a+39|0];o[b+17|0]=s[a+38>>1];o[b+18|0]=q[a+36>>2]>>>8;o[b+19|0]=q[a+36>>2];o[b+20|0]=(q[a+36>>2]&16777215)<<8|q[a+32>>2]>>>24;o[b+21|0]=(q[a+36>>2]&65535)<<16|q[a+32>>2]>>>16;o[b+22|0]=(q[a+36>>2]&255)<<24|q[a+32>>2]>>>8;o[b+23|0]=q[a+32>>2];o[b+24|0]=r[a+47|0];o[b+25|0]=s[a+46>>1];o[b+26|0]=q[a+44>>2]>>>8;o[b+27|0]=q[a+44>>2];o[b+28|0]=(q[a+44>>2]&16777215)<<8|q[a+40>>2]>>>24;o[b+29|0]=(q[a+44>>2]&65535)<<16|q[a+40>>2]>>>16;o[b+30|0]=(q[a+44>>2]&255)<<24|q[a+40>>2]>>>8;o[b+31|0]=q[a+40>>2];o[b+32|0]=r[a+55|0];o[b+33|0]=s[a+54>>1];o[b+34|0]=q[a+52>>2]>>>8;o[b+35|0]=q[a+52>>2];o[b+36|0]=(q[a+52>>2]&16777215)<<8|q[a+48>>2]>>>24;o[b+37|0]=(q[a+52>>2]&65535)<<16|q[a+48>>2]>>>16;o[b+38|0]=(q[a+52>>2]&255)<<24|q[a+48>>2]>>>8;o[b+39|0]=q[a+48>>2];o[b+40|0]=r[a+63|0];o[b+41|0]=s[a+62>>1];o[b+42|0]=q[a+60>>2]>>>8;o[b+43|0]=q[a+60>>2];o[b+44|0]=(q[a+60>>2]&16777215)<<8|q[a+56>>2]>>>24;o[b+45|0]=(q[a+60>>2]&65535)<<16|q[a+56>>2]>>>16;o[b+46|0]=(q[a+60>>2]&255)<<24|q[a+56>>2]>>>8;o[b+47|0]=q[a+56>>2];if(!q[a+208>>2]){o[b+48|0]=r[a+71|0];o[b+49|0]=s[a+70>>1];c=a- -64|0;e=q[c+4>>2];o[b+50|0]=e>>>8;o[b+51|0]=q[a+68>>2];o[b+52|0]=(q[c+4>>2]&16777215)<<8|q[c>>2]>>>24;o[b+53|0]=(q[c+4>>2]&65535)<<16|q[c>>2]>>>16;o[b+54|0]=(q[c+4>>2]&255)<<24|q[c>>2]>>>8;o[b+55|0]=q[c>>2];o[b+56|0]=r[a+79|0];o[b+57|0]=s[a+78>>1];o[b+58|0]=q[a+76>>2]>>>8;o[b+59|0]=q[a+76>>2];o[b+60|0]=(q[a+76>>2]&16777215)<<8|q[a+72>>2]>>>24;o[b+61|0]=(q[a+76>>2]&65535)<<16|q[a+72>>2]>>>16;o[b+62|0]=(q[a+76>>2]&255)<<24|q[a+72>>2]>>>8;o[b+63|0]=q[a+72>>2]}return 0}function AP(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=x(0),J=x(0),K=x(0);g=Ii-48|0;Ii=g;e=a+160|0;f=a+320|0;d=q[a+464>>2];c=q[a+304>>2];a:{if(c>>>0>=t[a+144>>2]){if(c>>>0<=d>>>0){break a}sk(e,f);if(t[a+304>>2]>=t[a+144>>2]){break a}sk(a,e);break a}if(c>>>0>d>>>0){sk(a,f);break a}sk(a,e);if(t[a+464>>2]>=t[a+304>>2]){break a}sk(e,f)}e=a+480|0;if((e|0)!=(b|0)){while(1){h=q[e+144>>2];if(h>>>0>2]){i=u[e+56>>2];j=u[e+52>>2];k=u[e+44>>2];l=u[e+40>>2];m=u[e+36>>2];n=u[e+28>>2];o=u[e+24>>2];p=u[e+20>>2];r=u[e+48>>2];s=u[e+32>>2];v=u[e+16>>2];w=u[e+8>>2];y=u[e+4>>2];z=u[e>>2];q[g+44>>2]=q[e+88>>2];c=q[e+84>>2];q[g+36>>2]=q[e+80>>2];q[g+40>>2]=c;c=q[e+76>>2];q[g+28>>2]=q[e+72>>2];q[g+32>>2]=c;c=q[e+68>>2];q[g+20>>2]=q[e+64>>2];q[g+24>>2]=c;A=u[e+136>>2];B=u[e+132>>2];C=u[e+124>>2];D=u[e+120>>2];E=u[e+116>>2];F=u[e+108>>2];G=u[e+104>>2];H=u[e+100>>2];I=u[e+128>>2];J=u[e+112>>2];K=u[e+96>>2];q[g+8>>2]=q[e+156>>2];c=q[e+152>>2];q[g>>2]=q[e+148>>2];q[g+4>>2]=c;c=e;while(1){b:{d=f;u[c>>2]=u[d>>2];u[c+4>>2]=u[d+4>>2];u[c+8>>2]=u[d+8>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+28>>2]=u[d+28>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];f=q[d+68>>2];q[c+64>>2]=q[d+64>>2];q[c+68>>2]=f;f=q[d+76>>2];q[c+72>>2]=q[d+72>>2];q[c+76>>2]=f;f=q[d+84>>2];q[c+80>>2]=q[d+80>>2];q[c+84>>2]=f;q[c+88>>2]=q[d+88>>2];u[c+96>>2]=u[d+96>>2];u[c+100>>2]=u[d+100>>2];u[c+104>>2]=u[d+104>>2];u[c+108>>2]=u[d+108>>2];u[c+112>>2]=u[d+112>>2];u[c+116>>2]=u[d+116>>2];u[c+120>>2]=u[d+120>>2];u[c+124>>2]=u[d+124>>2];u[c+128>>2]=u[d+128>>2];u[c+132>>2]=u[d+132>>2];u[c+136>>2]=u[d+136>>2];f=q[d+148>>2];q[c+144>>2]=q[d+144>>2];q[c+148>>2]=f;f=q[d+156>>2];q[c+152>>2]=q[d+152>>2];q[c+156>>2]=f;if((a|0)==(d|0)){c=a;break b}f=d-160|0;c=d;if(t[c-16>>2]>h>>>0){continue}}break}u[c+48>>2]=r;u[c+32>>2]=s;u[c+16>>2]=v;u[c+8>>2]=w;u[c+4>>2]=y;u[c>>2]=z;u[c+56>>2]=i;u[c+52>>2]=j;u[c+44>>2]=k;u[c+40>>2]=l;u[c+36>>2]=m;u[c+28>>2]=n;u[c+24>>2]=o;u[c+20>>2]=p;d=d- -64|0;q[d+24>>2]=q[g+44>>2];f=q[g+40>>2];q[d+16>>2]=q[g+36>>2];q[d+20>>2]=f;f=q[g+32>>2];q[d+8>>2]=q[g+28>>2];q[d+12>>2]=f;f=q[g+24>>2];q[d>>2]=q[g+20>>2];q[d+4>>2]=f;q[c+144>>2]=h;u[c+136>>2]=A;u[c+132>>2]=B;u[c+128>>2]=I;u[c+124>>2]=C;u[c+120>>2]=D;u[c+116>>2]=E;u[c+112>>2]=J;u[c+108>>2]=F;u[c+104>>2]=G;u[c+100>>2]=H;u[c+96>>2]=K;f=q[g+4>>2];q[c+148>>2]=q[g>>2];q[c+152>>2]=f;q[c+156>>2]=q[g+8>>2]}f=e;e=e+160|0;if((e|0)!=(b|0)){continue}break}}Ii=g+48|0}function Z_(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;f=q[a+12>>2]-1|0;c=q[a+16>>2];w=f+(c-b|0)|0;j=q[a+28>>2];k=q[j+48>>2];n=q[j+40>>2];x=k+n|0;m=q[j+52>>2]-1|0;y=-1<>2]^-1;z=-1<>2]^-1;p=(c+f|0)-257|0;i=q[a>>2]-1|0;t=(i+q[a+4>>2]|0)-5|0;u=q[j+80>>2];v=q[j+76>>2];g=q[j+60>>2];b=q[j+56>>2];A=q[j+44>>2];while(1){if(g>>>0<=14){b=((r[i+1|0]<>>c|0;h=s[e+2>>1];a:{b:{c:{d=r[e|0];if(!d){break c}d:{e:{f:{B=j;C=a;g:{h:{i:{while(1){e=d&255;if(d&16){h=h&65535;e=e&15;j:{if(!e){c=i;break j}if(e>>>0<=g>>>0){c=i}else{b=(r[i+1|0]<>>e|0}d=b;if(g>>>0<=14){d=((r[c+1|0]<>>b|0;e=s[i+2>>1];d=r[i|0];if(d&16){break i}while(1){if(!(d&64)){d=(((-1<>>i|0;e=s[d+2>>1];d=r[d|0];if(!(d&16)){continue}break i}break}i=c;c=193118;break h}if(!(e&64)){e=(((-1<>>c|0;h=s[e+2>>1];d=r[e|0];if(!d){break c}continue}break}c=11;if(e&32){break g}c=193140;break h}l=e&65535;d=d&15;k:{if(d>>>0<=g>>>0){e=g;i=c;break k}b=(r[c+1|0]<>>0<=e>>>0){break k}b=(r[c+2|0]<>>d|0;l=c+l|0;c=f-w|0;if(l>>>0<=c>>>0){break e}c=l-c|0;if(!q[j+7104>>2]|c>>>0<=A>>>0){break f}c=193088}q[C+24>>2]=c;c=29}q[B>>2]=c;break a}l:{m:{if(!k){d=(n-c|0)+m|0;break m}if(c>>>0>k>>>0){d=(x-c|0)+m|0;c=c-k|0;e=c;if(h>>>0<=c>>>0){break l}while(1){o[f+1|0]=r[d+1|0];f=f+1|0;d=d+1|0;e=e-1|0;if(e){continue}break}d=m;e=k;h=h-c|0;if(e>>>0>=h>>>0){break l}while(1){o[f+1|0]=r[d+1|0];f=f+1|0;d=d+1|0;e=e-1|0;if(e){continue}break}d=f-l|0;h=h-k|0;break l}d=(k-c|0)+m|0}e=c;if(h>>>0<=c>>>0){break l}while(1){o[f+1|0]=r[d+1|0];f=f+1|0;d=d+1|0;e=e-1|0;if(e){continue}break}d=f-l|0;h=h-c|0}if(h>>>0>=3){while(1){o[f+1|0]=r[d+1|0];o[f+2|0]=r[d+2|0];o[f+3|0]=r[d+3|0];f=f+3|0;d=d+3|0;h=h-3|0;if(h>>>0>2){continue}break}}if(!h){break b}o[f+1|0]=r[d+1|0];if((h|0)!=1){break d}f=f+1|0;break b}c=f-l|0;while(1){d=f;e=c;o[d+1|0]=r[c+1|0];o[d+2|0]=r[c+2|0];o[d+3|0]=r[c+3|0];f=d+3|0;c=c+3|0;h=h-3|0;if(h>>>0>2){continue}break}if(!h){break b}o[d+4|0]=r[e+4|0];if((h|0)==1){f=d+4|0;break b}o[d+5|0]=r[e+5|0];f=d+5|0;break b}o[f+2|0]=r[d+2|0];f=f+2|0;break b}o[f+1|0]=h;f=f+1|0}if(f>>>0>=p>>>0){break a}if(i>>>0>>0){continue}}break}q[a+12>>2]=f+1;q[a+16>>2]=(p-f|0)+257;c=i-(g>>>3|0)|0;q[a>>2]=c+1;q[a+4>>2]=(t-c|0)+5;a=g&7;q[j+60>>2]=a;q[j+56>>2]=(-1<>>0>1024)){b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}h=q[213116];Gj(h);c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213127];d:{e:{if(!c){break e}c=q[q[213126]+(Cza(e,f,c)<<2)>>2];if((c|0)==-1){break e}g=q[213128];while(1){c=g+w(c,24)|0;if(q[c>>2]==(e|0)&(f|0)==q[c+4>>2]){break d}c=q[c+16>>2];if((c|0)!=-1){continue}break}}if(q[213132]==((q[213130]-q[213128]|0)/24|0)){f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=(q[213130]-q[213128]|0)/24|0;g:{if(o[852568]&1){break g}if(!fk(852568)){break g}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;g=Wj();o[852468]=0;q[213116]=g;ek(852568)}Sv(852504,1024,c+256|0)}a=Ti(Yi(b+1|0),a,b);o[a+b|0]=0;p[d+12>>1]=b;q[d+8>>2]=a;CA(852504,e,f,d+8|0)}Bj(h)}Ii=d+16|0;Li=f;return e|0}function TN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;e=Ii-256|0;Ii=e;a:{if(!b){Sr(a);d=1;break a}MN(a,b);Ti(Ut(a,0),c,b);k=a+12|0;Tt(k,0);Tt(k,1024);i=a+24|0;Sw(i,0);Sw(i,b<<1);qx(e+128|0);a=0;while(1){f=r[a+c|0];if(f>>>0>31){break a}f=(e+128|0)+(f<<2)|0;q[f>>2]=q[f>>2]+1;a=a+1|0;if((b|0)!=(a|0)){continue}break}q[e>>2]=0;q[e+4>>2]=0;a=q[e+132>>2];f=a<<1;q[e+8>>2]=f;d=f;f=q[e+136>>2];d=d+f<<1;q[e+12>>2]=d;h=q[e+140>>2];d=h+d<<1;q[e+16>>2]=d;g=q[e+144>>2];d=g+d<<1;q[e+20>>2]=d;j=q[e+148>>2];d=j+d<<1;q[e+24>>2]=d;l=q[e+152>>2];d=l+d<<1;q[e+28>>2]=d;m=q[e+156>>2];d=d+m<<1;q[e+32>>2]=d;n=q[e+160>>2];d=d+n<<1;q[e+36>>2]=d;o=q[e+164>>2];d=d+o<<1;q[e+40>>2]=d;t=q[e+168>>2];d=d+t<<1;q[e+44>>2]=d;u=q[e+172>>2];d=d+u<<1;q[e+48>>2]=d;v=q[e+176>>2];d=d+v<<1;q[e+52>>2]=d;w=q[e+180>>2];d=d+w<<1;q[e+56>>2]=d;x=q[e+184>>2];d=d+x<<1;q[e+60>>2]=d;y=q[e+188>>2];d=d+y<<1;q[e+64>>2]=d;z=q[e+192>>2];d=d+z<<1;q[e+68>>2]=d;A=q[e+196>>2];d=d+A<<1;q[e+72>>2]=d;B=q[e+200>>2];d=d+B<<1;q[e+76>>2]=d;C=q[e+204>>2];d=d+C<<1;q[e+80>>2]=d;D=q[e+208>>2];d=d+D<<1;q[e+84>>2]=d;E=q[e+212>>2];d=d+E<<1;q[e+88>>2]=d;F=q[e+216>>2];d=d+F<<1;q[e+92>>2]=d;G=q[e+220>>2];d=d+G<<1;q[e+96>>2]=d;H=q[e+224>>2];d=d+H<<1;q[e+100>>2]=d;I=q[e+228>>2];d=d+I<<1;q[e+104>>2]=d;J=q[e+232>>2];d=d+J<<1;q[e+108>>2]=d;K=q[e+236>>2];d=d+K<<1;q[e+112>>2]=d;L=q[e+240>>2];d=d+L<<1;q[e+116>>2]=d;M=q[e+244>>2];d=d+M<<1;q[e+120>>2]=d;N=q[e+248>>2];d=d+N<<1;q[e+124>>2]=d;if((d|0)!=-2147483648){d=0;if((((((((((((((((((((((((((l+(j+(g+(h+(a+f|0)|0)|0)|0)|0)+m|0)+n|0)+o|0)+t|0)+u|0)+v|0)+w|0)+x|0)+y|0)+z|0)+A|0)+B|0)+C|0)+D|0)+E|0)+F|0)+G|0)+H|0)+I|0)+J|0)+K|0)+L|0)+M|0)+N|0)!=1){break a}}d=1;if((b|0)<1){break a}j=0;f=-1;while(1){h=r[c+j|0];b:{if(!h){break b}d=(h<<2)+e|0;a=q[d>>2];q[d>>2]=a+1;g=0;d=h;while(1){g=a&1|g<<1;a=a>>>1|0;d=d-1|0;if(d){continue}break}if(h>>>0<=10){if(g>>>0>=1024){break b}a=h<<16|j;d=1<>2]){d=0;break a}q[El(k,g)>>2]=a;g=d+g|0;if(g>>>0<1024){continue}break}break b}a=g&1023;d=q[El(k,a)>>2];c:{if(d){a=f;f=d;break c}if(q[El(k,a)>>2]){d=0;break a}q[El(k,a)>>2]=f;a=f-2|0}if((f|0)>-1){d=0;break a}g=g>>>9|0;if((h|0)>11){while(1){d=0;g=g>>>1|0;l=f-(g&1)|0;if((l|0)>-1){break a}f=l^-1;if((f|0)>=q[i+4>>2]){Sw(i,0-l|0)}d:{if(!s[Vt(i,f)>>1]){p[Vt(i,f)>>1]=a;f=a;a=f-2|0;break d}f=p[Vt(i,f)>>1];if((f|0)>-1){break a}}h=h-1|0;if((h|0)>11){continue}break}}f=(g>>>1&1)-f|0;if((f|0)<1){d=0;break a}if((f|0)>q[i+4>>2]){Sw(i,f)}d=0;f=f-1|0;if(s[Vt(i,f)>>1]){break a}p[Vt(i,f)>>1]=j;f=a}d=1;j=j+1|0;if((j|0)!=(b|0)){continue}break}}Ii=e+256|0;return d}function gva(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,s=0,t=0,v=x(0),y=0,z=0;y=Ii-128|0;Ii=y;a:{if(!((c|0)>6|(a|0)>2|(a|0)==(c|0))){if((a|0)==2){if((f|0)<=0){break a}g=16;while(1){m=Ui(y,0,128);k=g+i|0;o=(k|0)>(f|0);g=o?f-i|0:g;if(!((c|0)<1|(g|0)<1)){s=e+i|0;a=0;while(1){b:{c:{switch((r[(w(c,6)+213424|0)+a|0]&6)-2|0){case 4:t=q[(a<<2)+d>>2];h=0;while(1){j=h<<3;l=j+m|0;v=u[t+(h+s<<2)>>2];u[l>>2]=v+u[l>>2];j=m+(j|4)|0;u[j>>2]=v+u[j>>2];h=h+1|0;if((h|0)<(g|0)){continue}break}break b;case 2:t=q[(a<<2)+d>>2];h=0;while(1){j=m+(h<<3|4)|0;u[j>>2]=u[t+(h+s<<2)>>2]+u[j>>2];h=h+1|0;if((h|0)<(g|0)){continue}break}break b;case 0:break c;default:break b}}t=q[(a<<2)+d>>2];h=0;while(1){j=m+(h<<3)|0;u[j>>2]=u[t+(h+s<<2)>>2]+u[j>>2];h=h+1|0;if((h|0)<(g|0)){continue}break}}a=a+1|0;if((c|0)!=(a|0)){continue}break}}if(g<<1>=1){a=i<<1;s=(o?f:k)+n<<1;h=0;while(1){k=(Pza(x(u[m+(h<<2)>>2]+x(384))),Lza(2));k=(k|0)>1136623616?k:1136623616;p[(a+h<<1)+b>>1]=(k|0)<1136689151?k:1136689151;h=h+1|0;if((s|0)!=(h|0)){continue}break}}n=n-16|0;i=i+16|0;if((i|0)<(f|0)){continue}break}s=0;if((f|0)<=0){break a}a=16;n=0;while(1){h=Ui(m,0,128);o=a+n|0;t=(o|0)>(f|0);a=t?f-n|0:a;if(!((c|0)<1|(a|0)<1)){k=e+n|0;i=0;while(1){d:{e:{switch((r[(w(c,6)+213424|0)+i|0]&6)-2|0){case 2:j=q[(i<<2)+d>>2];g=0;while(1){l=h+(g<<3|4)|0;u[l>>2]=u[j+(g+k<<2)>>2]+u[l>>2];g=g+1|0;if((g|0)<(a|0)){continue}break}break d;case 0:j=q[(i<<2)+d>>2];g=0;while(1){l=h+(g<<3)|0;u[l>>2]=u[j+(g+k<<2)>>2]+u[l>>2];g=g+1|0;if((g|0)<(a|0)){continue}break}break d;case 4:break e;default:break d}}j=q[(i<<2)+d>>2];g=0;while(1){l=g<<3;z=l+h|0;v=u[j+(g+k<<2)>>2];u[z>>2]=v+u[z>>2];l=h+(l|4)|0;u[l>>2]=v+u[l>>2];g=g+1|0;if((g|0)<(a|0)){continue}break}}i=i+1|0;if((i|0)!=(c|0)){continue}break}}if(a<<1>=1){i=n<<1;k=(t?f:o)+s<<1;g=0;while(1){o=(Pza(x(u[h+(g<<2)>>2]+x(384))),Lza(2));o=(o|0)>1136623616?o:1136623616;p[(g+i<<1)+b>>1]=(o|0)<1136689151?o:1136689151;g=g+1|0;if((k|0)!=(g|0)){continue}break}}s=s-16|0;n=n+16|0;if((n|0)<(f|0)){continue}break}break a}J(213466,211687,5275,213477);G()}if((f|0)<1){break a}g=(a|0)<(c|0)?a:c;if((g|0)<=0){c=(a|0)<1;g=0;while(1){h=0;if(!c){while(1){if(b){p[b>>1]=0;b=b+2|0}else{b=0}h=h+1|0;if((h|0)!=(a|0)){continue}break}}g=g+1|0;if((g|0)!=(f|0)){continue}break}break a}while(1){n=e+h|0;i=0;while(1){if(b){m=(Pza(x(u[q[(i<<2)+d>>2]+(n<<2)>>2]+x(384))),Lza(2));m=(m|0)>1136623616?m:1136623616;p[b>>1]=(m|0)<1136689151?m:1136689151;b=b+2|0}else{b=0}i=i+1|0;if((g|0)!=(i|0)){continue}break}i=g;if((a|0)>(c|0)){while(1){if(b){p[b>>1]=0;b=b+2|0}else{b=0}i=i+1|0;if((i|0)!=(a|0)){continue}break}}h=h+1|0;if((h|0)!=(f|0)){continue}break}}Ii=y+128|0}function mma(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=x(0),m=0,n=x(0),o=x(0),p=x(0),v=0,y=0,z=x(0),A=0,B=0,C=x(0),D=x(0),E=0,F=x(0),H=x(0),I=x(0),K=x(0),L=x(0),M=x(0),N=x(0),O=x(0),P=x(0),Q=x(0),R=x(0),S=0,T=x(0),U=x(0),V=0,W=x(0),X=x(0),Y=x(0),Z=x(0),_=x(0),$=x(0),aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=x(0),ha=x(0);E=Ii-16|0;Ii=E;q[E+8>>2]=0;a:{b:{c:{if((e|0)==(f|0)){break c}c=q[c+64>>2];aa=q[c+48>>2];S=q[a+4>>2];ba=q[a+8>>2]-S>>2;T=x(t[c+24>>2]);U=x(t[c+20>>2]);while(1){c=w(q[e>>2],48)+d|0;v=q[c+16>>2];A=q[c+20>>2];c=v;m=c&65535;if(m>>>0>=ba>>>0){break b}B=c>>>16|0;j=q[(m<<2)+S>>2];y=q[j+156>>2];h=q[y+4>>2];if(B>>>0>=t[h+8>>2]){break a}i=q[y+40>>2];c=i+(A>>>11&2097120)|0;m=c+32|0;d:{g=i;i=q[y+32>>2]&2147483647;k=g+i|0;m=(k|0)>(m|0)?m:k;if((m|0)>(c|0)){k=q[y+36>>2];A=k+(((A&134217727)<<5|v>>>27)&2097120)|0;v=A+32|0;V=q[y+28>>2];k=k+V|0;k=(k|0)>(v|0)?v:k;P=u[(q[h+4>>2]+(B<<5)|0)+4>>2];ca=w(i,B);while(1){v=m;if((k|0)<=(A|0)){c=c+1|0}else{Q=x(T*x(c|0));B=c+1|0;R=x(T*x(B|0));da=w((c+ca|0)-q[y+40>>2]|0,V);ea=q[j+100>>2];fa=q[y+36>>2];c=A;while(1){h=(c-fa|0)+da|0;i=s[(h<<1)+ea>>1];e:{if((i|0)==65535){c=c+1|0;break e}g=q[a+48>>2];if(g>>>0<=b>>>0){break d}g=r[h+q[j+104>>2]|0];C=u[j+80>>2];K=u[j+64>>2];F=u[j+32>>2];l=u[j+48>>2];L=u[j+84>>2];D=u[j+68>>2];H=u[j+36>>2];n=u[j+52>>2];M=u[j+88>>2];o=x(U*x(c|0));I=u[j+40>>2];p=x(o*I);z=u[j+56>>2];W=x(Q*z);N=x(P*u[j+72>>2]);X=x(M+x(x(p+W)+N));u[b+8>>2]=X;O=x(o*H);Y=x(Q*n);D=x(P*D);Z=x(L+x(x(O+Y)+D));u[b+4>>2]=Z;_=x(o*F);$=x(Q*l);o=x(P*K);K=x(C+x(x(_+$)+o));u[b>>2]=K;h=(i<<5)+aa|0;i=w(g&7,24)+54864|0;g=q[i>>2]<<3;u[b+12>>2]=u[h+g>>2];ga=u[h+(g|4)>>2];ha=p;p=x(R*z);u[b+28>>2]=M+x(x(ha+p)+N);n=x(R*n);u[b+24>>2]=L+x(x(O+n)+D);z=x(R*l);u[b+20>>2]=C+x(x(_+z)+o);u[b+16>>2]=ga;g=q[i+4>>2]<<3;u[b+32>>2]=u[g+h>>2];O=u[h+(g|4)>>2];c=c+1|0;l=x(U*x(c|0));I=x(I*l);p=x(M+x(x(I+p)+N));u[b+48>>2]=p;H=x(l*H);n=x(L+x(x(H+n)+D));u[b+44>>2]=n;F=x(l*F);l=x(C+x(x(F+z)+o));u[b+40>>2]=l;u[b+36>>2]=O;g=q[i+8>>2]<<3;u[b+52>>2]=u[g+h>>2];z=u[h+(g|4)>>2];u[b+68>>2]=p;u[b- -64>>2]=n;u[b+60>>2]=l;u[b+56>>2]=z;g=q[i+12>>2]<<3;u[b+72>>2]=u[g+h>>2];l=u[h+(g|4)>>2];u[b+88>>2]=M+x(x(I+W)+N);u[b+84>>2]=L+x(x(H+Y)+D);u[b+80>>2]=C+x(x(F+$)+o);u[b+76>>2]=l;g=q[i+16>>2]<<3;u[b+92>>2]=u[g+h>>2];C=u[h+(g|4)>>2];u[b+108>>2]=X;u[b+104>>2]=Z;u[b+100>>2]=K;u[b+96>>2]=C;i=q[i+20>>2]<<3;u[b+112>>2]=u[i+h>>2];u[b+116>>2]=u[h+(i|4)>>2];b=b+120|0}if((c|0)<(k|0)){continue}break}c=B}if((v|0)>(c|0)){continue}break}}e=e+4|0;if((f|0)!=(e|0)){continue}break c}break}q[E>>2]=(g-q[a+44>>2]|0)/120;Pi(4,55056,55064,E);b=q[a+48>>2]}Ii=E+16|0;return b}J(55728,55585,479,55717);G()}J(55680,55692,189,55717);G()}function dB(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii-640|0;Ii=d;f=q[c+4>>2];e=q[c>>2];u[d+120>>2]=u[c+8>>2];q[d+112>>2]=e;q[d+116>>2]=f;cba(a,b,d+112|0);f=1;zp(a,b,1,c+16|0);zp(a,b,2,c+32|0);e=q[c+68>>2];g=q[c+64>>2];u[d+632>>2]=u[c+72>>2];q[d+624>>2]=g;q[d+628>>2]=e;u[d+636>>2]=u[c+232>>2];zp(a,b,3,d+624|0);zp(a,b,4,c+48|0);e=q[c+132>>2];g=q[c+128>>2];u[d+632>>2]=u[c+136>>2];q[d+624>>2]=g;q[d+628>>2]=e;u[d+636>>2]=u[c+236>>2];zp(a,b,5,d+624|0);e=q[c+148>>2];g=q[c+144>>2];u[d+632>>2]=u[c+152>>2];q[d+624>>2]=g;q[d+628>>2]=e;u[d+636>>2]=u[c+240>>2];zp(a,b,6,d+624|0);zp(a,b,7,c+192|0);KJ(a,b,q[c+268>>2]);e=q[c+92>>2];a:{if(!(!e|!r[e|0])){g=hj(e);f=g+1|0;if(f>>>0>=513){f=q[c+100>>2];q[d+60>>2]=512;q[d+56>>2]=511-g;q[d+48>>2]=e;q[d+52>>2]=f?f:41587;Pi(4,40439,41490,d+48|0);f=0;break a}Pj(d+112|0,e,f);f=gk(d+112|0,47);e=0;b:{if(!f){break b}o[f|0]=0;e=f+1|0}g=LA(a,b,d+112|0);f=1;c:{if(!g){break c}f=q[c+100>>2];q[d+88>>2]=g;q[d+84>>2]=f?f:41587;q[d+80>>2]=d+112;Pi(4,40439,41595,d+80|0);f=0}if(!e){break a}g=Vv(a,b,Oi(e),Li,x(0),x(1),0,0,0);if(g){f=q[c+100>>2];q[d+76>>2]=g;q[d+64>>2]=e;q[d+72>>2]=f?f:41587;q[d+68>>2]=d+112;Pi(4,40439,41651,d- -64|0);f=0}if((uea(a,b)|0)!=1){break a}cw(a,b,1);break a}LA(a,b,41733)}e=q[c+172>>2];d:{if(!(!e|!r[e|0])){g=OA(a,b,e);if(!g){break d}e=q[c+100>>2];h=q[c+172>>2];q[d+40>>2]=g;q[d+32>>2]=h;q[d+36>>2]=e?e:41587;Pi(4,40439,41734,d+32|0)}OA(a,b,41733)}e=q[c+84>>2];mba(a,b,(e|0)==2?1:e);LJ(a,b,q[c+112>>2]);EJ(a,b,q[c+104>>2]);DJ(a,b,q[c+108>>2]);oba(a,b,q[c+160>>2]);fba(a,b,r[c+176|0]);kba(a,b,q[c+224>>2]);jba(a,b,r[c+228|0]);lba(a,b,r[c+229|0]);if(r[c+284|0]){eba(a,b)}VJ(a,b,r[c+296|0]);FJ(a,b,r[c+297|0]);NA(a,b,Oi(q[c+300>>2]),Li);e:{f:{switch(q[c+80>>2]-1|0){case 0:HJ(a,b,q[c+88>>2]);UJ(a,b,q[c+96>>2]);dba(a,b,r[c+164|0]);JJ(a,b,u[c+260>>2]);IJ(a,b,u[c+264>>2]);break e;case 1:NJ(a,b,q[c+216>>2]);RJ(a,b,u[c+212>>2]);OJ(a,b,q[c+208>>2]);MJ(a,b,u[c+220>>2]);break e;case 4:MA(a,b,Oi(q[c+288>>2]),Li);break e;case 2:c=q[c+100>>2];q[d+4>>2]=-7;q[d>>2]=c?c:41587;Pi(4,40439,41792,d);f=0;break e;case 5:break f;default:break e}}e=q[a+376>>2];g=$v(a,b);j=kK(a,b);g:{h:{h=q[q[e>>2]+320>>2];e=q[h+20>>2];i:{if(!e){break i}e=q[q[h+16>>2]+((g>>>0)%(e>>>0)<<2)>>2];if((e|0)==-1){break i}h=q[h+24>>2];while(1){i=h+w(e,12)|0;if((g|0)==q[i>>2]){break h}e=q[i+8>>2];if((e|0)!=-1){continue}break}}e=0;if(r[290720]){break g}o[290720]=1;q[d+16>>2]=g;Pi(4,40439,41258,d+16|0);break g}e=q[(h+w(e,12)|0)+4>>2]}h=q[e+28>>2];if(!h){break e}q[d+124>>2]=b;q[d+120>>2]=a;e=q[e+4>>2];q[d+128>>2]=g;q[d+112>>2]=j;q[d+116>>2]=e;Mi[h|0](d+104|0,d+112|0,c)}bba(a,b);Ii=d+640|0;return f}function KD(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0;if((c|0)>=0){k=s[b+2>>1];i=k?4:3;e=k?7:138;j=a+5817|0;g=-1;while(1){u=n;l=k;n=n+1|0;k=s[((n<<2)+b|0)+2>>1];d=f+1|0;a:{if(!((l|0)!=(k|0)|(e|0)<=(d|0))){f=d;break a}b:{if((d|0)<(i|0)){f=(l<<2)+a|0;g=f+2684|0;h=f+2686|0;f=q[a+5820>>2];while(1){i=s[h>>1];m=s[g>>1];e=s[a+5816>>1]|m<>1]=e;t=a;c:{if((16-i|0)<(f|0)){f=q[a+20>>2];q[a+20>>2]=f+1;o[f+q[a+8>>2]|0]=e;f=q[a+20>>2];q[a+20>>2]=f+1;o[f+q[a+8>>2]|0]=r[j|0];f=q[a+5820>>2];p[a+5816>>1]=m>>>16-f;f=(f+i|0)-16|0;break c}f=f+i|0}q[t+5820>>2]=f;d=d-1|0;if(d){continue}break}break b}t=a;d:{if(l){e:{if((g|0)==(l|0)){e=q[a+5820>>2];f=d;break e}d=(l<<2)+a|0;e=s[d+2686>>1];h=s[d+2684>>1];g=q[a+5820>>2];m=s[a+5816>>1]|h<>1]=m;d=a;f:{if((g|0)>(16-e|0)){g=q[a+20>>2];q[a+20>>2]=g+1;o[g+q[a+8>>2]|0]=m;g=q[a+20>>2];q[a+20>>2]=g+1;o[g+q[a+8>>2]|0]=r[j|0];g=q[a+5820>>2];p[a+5816>>1]=h>>>16-g;i=(e+g|0)-16|0;break f}i=e+g|0}e=i;q[d+5820>>2]=e}h=s[a+2748>>1];d=s[a+5816>>1]|h<>1];g:{if((16-g|0)<(e|0)){p[a+5816>>1]=d;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=q[a+5820>>2];e=(d+g|0)-16|0;d=h>>>16-d|0;break g}e=e+g|0}q[a+5820>>2]=e;f=f+65533&65535;d=f<>1]=d;if((e|0)>=15){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=f;f=q[a+5820>>2];p[a+5816>>1]=d>>>16-f;f=f-14|0;break d}f=e+2|0;break d}if((f|0)<=9){h=s[a+2752>>1];e=q[a+5820>>2];d=s[a+5816>>1]|h<>1];h:{if((e|0)>(16-g|0)){p[a+5816>>1]=d;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=q[a+5820>>2];e=(d+g|0)-16|0;d=h>>>16-d|0;break h}e=e+g|0}q[a+5820>>2]=e;f=f+65534&65535;d=f<>1]=d;if((e|0)>=14){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=f;f=q[a+5820>>2];p[a+5816>>1]=d>>>16-f;f=f-13|0;break d}f=e+3|0;break d}h=s[a+2756>>1];e=q[a+5820>>2];d=s[a+5816>>1]|h<>1];i:{if((e|0)>(16-g|0)){p[a+5816>>1]=d;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=q[a+5820>>2];e=(d+g|0)-16|0;d=h>>>16-d|0;break i}e=e+g|0}q[a+5820>>2]=e;f=f+65526&65535;d=f<>1]=d;if((e|0)>=10){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[j|0];d=f;f=q[a+5820>>2];p[a+5816>>1]=d>>>16-f;f=f-9|0;break d}f=e+7|0}q[t+5820>>2]=f}f=0;j:{if(!k){e=138;d=3;break j}d=(l|0)==(k|0);e=d?6:7;d=d?3:4}i=d;g=l}if((c|0)!=(u|0)){continue}break}}}function soa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=Ii-80|0;Ii=h;d=$i(80);c=d;q[c+32>>2]=0;q[c+36>>2]=0;q[c>>2]=0;q[c+4>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c+36>>2]=-1;q[c+48>>2]=q[a+4>>2];g=Oi(40485);e=q[a+24>>2];i=Li;c=q[q[a+16>>2]+(Cza(g,i,q[a+20>>2])<<2)>>2];f=e+(c<<4)|0;if(q[f>>2]!=(g|0)|q[f+4>>2]!=(i|0)){while(1){c=q[(e+(c<<4)|0)+12>>2];f=e+(c<<4)|0;if((g|0)!=q[f>>2]|(i|0)!=q[f+4>>2]){continue}break}}q[d+52>>2]=q[(e+(c<<4)|0)+8>>2];g=Oi(40480);e=q[a+24>>2];i=Li;c=q[q[a+16>>2]+(Cza(g,i,q[a+20>>2])<<2)>>2];f=e+(c<<4)|0;if(q[f>>2]!=(g|0)|q[f+4>>2]!=(i|0)){while(1){c=q[(e+(c<<4)|0)+12>>2];f=e+(c<<4)|0;if((g|0)!=q[f>>2]|(i|0)!=q[f+4>>2]){continue}break}}q[d+56>>2]=q[(e+(c<<4)|0)+8>>2];g=Oi(40492);e=q[a+24>>2];i=Li;c=q[q[a+16>>2]+(Cza(g,i,q[a+20>>2])<<2)>>2];f=e+(c<<4)|0;if(q[f>>2]!=(g|0)|q[f+4>>2]!=(i|0)){while(1){c=q[(e+(c<<4)|0)+12>>2];f=e+(c<<4)|0;if((g|0)!=q[f>>2]|(i|0)!=q[f+4>>2]){continue}break}}q[d+60>>2]=q[(e+(c<<4)|0)+8>>2];q[d+64>>2]=Tj(q[a>>2],40504,64);q[d+68>>2]=Tj(q[a>>2],40518,64);q[d+72>>2]=Tj(q[a>>2],40543,1024);q[d+76>>2]=Tj(q[a>>2],40566,1024);Wi(Tj(q[a>>2],40590,128),4,d,d+8|0,d+4|0);_J(q[d+60>>2]);p[b+104>>1]=300;q[b+16>>2]=d;q[b+100>>2]=q[b+100>>2]&-65537|65536;e=0;q[b+100>>2]=q[b+100>>2]&-131073;q[b+20>>2]=178;q[b+24>>2]=179;q[b+28>>2]=180;q[b+32>>2]=181;q[b+36>>2]=182;q[b+40>>2]=183;q[b+44>>2]=184;q[b+52>>2]=185;q[b+60>>2]=186;q[b+68>>2]=187;q[b+72>>2]=188;q[b+76>>2]=189;q[b+84>>2]=190;q[b+88>>2]=191;q[b+92>>2]=192;q[b+96>>2]=193;q[b+48>>2]=194;b=h;q[b+60>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;q[b+72>>2]=0;q[b+52>>2]=0;q[b+56>>2]=0;q[b- -64>>2]=-1;q[b+44>>2]=0;q[b+48>>2]=0;q[b+24>>2]=q[a>>2];q[b+32>>2]=q[d+52>>2];q[b+28>>2]=q[d+48>>2];q[b+36>>2]=q[d+56>>2];q[b+40>>2]=q[d+60>>2];g=b+44|0;So(g,7,q[a+32>>2]-q[a+24>>2]>>4);b=q[a+20>>2];if(b){while(1){c=q[q[a+16>>2]+(e<<2)>>2];if((c|0)!=-1){while(1){b=q[a+24>>2]+(c<<4)|0;Em(g,q[b>>2],q[b+4>>2],b+8|0);c=q[b+12>>2];if((c|0)!=-1){continue}break}b=q[a+20>>2]}e=e+1|0;if(e>>>0>>0){continue}break}}a:{if(r[290744]){break a}b:{c=q[72687];if(c){b=d+16|0;while(1){a=$i(32);q[h+76>>2]=a;q[a>>2]=c;q[c+12>>2]=a;a=Mi[q[c+4>>2]](h+24|0,a)|0;if(a){break b}a=q[d+40>>2];if((a|0)==((q[d+32>>2]-q[d+24>>2]|0)/12|0)){a=a+4|0;sJ(b,a>>>0<3?1:(a>>>0)/3|0,a)}tJ(b,q[c+20>>2],h+76|0);c=q[c>>2];if(c){continue}break}}o[290744]=1;break a}q[h+16>>2]=q[c+16>>2];Pi(4,40439,44095,h+16|0);q[h>>2]=a;Pi(4,40439,40613,h)}c:{if(o[h+72|0]&1){break c}a=q[h+52>>2];if(a){Ni(a)}a=q[h+44>>2];if(!a){break c}Ni(a)}Ii=h+80|0;return 0}function mM(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0;o[g|0]=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l=q[a+52>>2];if(l){j=q[a+48>>2];while(1){k=j+(i<<5)|0;if((b|0)==q[k+8>>2]&(c|0)==q[k+12>>2]){break k}i=i+1|0;if((l|0)!=(i|0)){continue}break}}l=q[a+4>>2];if(l){j=q[a>>2];i=0;while(1){k=j+(i<<5)|0;if((b|0)==q[k+8>>2]&(c|0)==q[k+12>>2]){break j}i=i+1|0;if((l|0)!=(i|0)){continue}break}}l=q[a+12>>2];if(l){j=q[a+8>>2];i=0;while(1){k=j+(i<<5)|0;if((b|0)==q[k+8>>2]&(c|0)==q[k+12>>2]){break i}i=i+1|0;if((l|0)!=(i|0)){continue}break}}l=q[a+20>>2];if(l){j=q[a+16>>2];i=0;while(1){k=j+(i<<5)|0;if((b|0)==q[k+8>>2]&(c|0)==q[k+12>>2]){break h}i=i+1|0;if((l|0)!=(i|0)){continue}break}}m=q[a+28>>2];l:{if(!m){break l}k=q[a+24>>2];i=0;while(1){j=k+(i<<5)|0;if((b|0)==q[j+8>>2]&(c|0)==q[j+12>>2]){break g}l=1;i=i+1|0;if((m|0)!=(i|0)){continue}break}j=0;while(1){m:{i=k+(j<<5)|0;n=q[i+24>>2];if(n){r=q[i+20>>2];i=0;while(1){p=r+(i<<3)|0;if((b|0)==q[p>>2]&(c|0)==q[p+4>>2]){break m}i=i+1|0;if((n|0)!=(i|0)){continue}break}}j=j+1|0;l=m>>>0>j>>>0;if((j|0)!=(m|0)){continue}break l}break}q[d>>2]=q[k+(j<<5)>>2];q[h>>2]=i;if(l){break a}}m=q[a+36>>2];n:{if(!m){break n}k=q[a+32>>2];i=0;while(1){j=k+(i<<5)|0;if((b|0)==q[j+8>>2]&(c|0)==q[j+12>>2]){break f}l=1;i=i+1|0;if((m|0)!=(i|0)){continue}break}j=0;while(1){o:{i=k+(j<<5)|0;n=q[i+24>>2];if(n){r=q[i+20>>2];i=0;while(1){p=r+(i<<3)|0;if((b|0)==q[p>>2]&(c|0)==q[p+4>>2]){break o}i=i+1|0;if((n|0)!=(i|0)){continue}break}}j=j+1|0;l=m>>>0>j>>>0;if((j|0)!=(m|0)){continue}break n}break}q[d>>2]=q[k+(j<<5)>>2];q[h>>2]=i;if(l){break b}}i=0;l=q[a+44>>2];if(!l){break c}j=q[a+40>>2];while(1){a=j+(i<<5)|0;if((b|0)==q[a+8>>2]&q[a+12>>2]==(c|0)){break e}a=1;i=i+1|0;if((l|0)!=(i|0)){continue}break}f=0;while(1){p:{i=j+(f<<5)|0;k=q[i+24>>2];if(k){m=q[i+20>>2];i=0;while(1){n=m+(i<<3)|0;if((b|0)==q[n>>2]&q[n+4>>2]==(c|0)){break p}i=i+1|0;if((k|0)!=(i|0)){continue}break}}f=f+1|0;a=l>>>0>f>>>0;i=0;if((f|0)!=(l|0)){continue}break c}break}q[d>>2]=q[j+(f<<5)>>2];q[h>>2]=i;i=0;if(!(a&1)){break c}q[e>>2]=0;o[g|0]=1;break d}a=j+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=6;break d}a=j+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=0;break d}a=j+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=1;return 1}a=j+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=2;break d}a=k+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=3;break d}a=k+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=4;break d}a=j+(i<<5)|0;q[d>>2]=q[a>>2];q[f>>2]=q[a+20>>2];q[e>>2]=5}i=1}return i}q[e>>2]=0;o[g|0]=1;return 1}q[e>>2]=0;o[g|0]=1;return 1}function $x(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;o=q[a+48>>2];j=q[a+44>>2];i=q[a+40>>2];n=q[a+36>>2];e=q[a+32>>2];if(b){A=q[a+12>>2];s=A+(A>>>2|0)|0;x=q[a+8>>2];y=x+(x>>>2|0)|0;t=q[a+4>>2];B=t+(t>>>2|0)|0;u=q[a>>2];while(1){k=e;f=r[(l|1)+c|0];e=f>>>24|0;g=r[c+l|0]|f<<8;h=r[(l|2)+c|0];f=h>>>16|0;h=g|h<<16;m=e|f;g=k;f=r[(l|3)+c|0];e=f>>>8|0;k=f<<24|h;f=g+k|0;g=e|m;g=f>>>0>>0?g+1|0:g;p=f;F=Aza(u,0,f,0);G=Li;h=g;g=g+n|0;f=0;f=g>>>0>>0?f+1|0:f;n=g;e=r[(l|5)+c|0];g=e>>>24|0;k=r[(l|4)+c|0]|e<<8;h=r[(l|6)+c|0];e=h>>>16|0;h=k|h<<16;m=e|g;e=r[(l|7)+c|0];g=e>>>8|0;h=e<<24|h;k=h+n|0;e=(g|m)+f|0;e=h>>>0>k>>>0?e+1|0:e;v=k;k=Aza(s,0,k,0);H=Li;g=i;i=e;e=g+e|0;f=0;f=e>>>0>>0?f+1|0:f;n=e;g=r[(l|9)+c|0];e=g>>>24|0;h=r[(l|8)+c|0]|g<<8;i=r[(l|10)+c|0];g=i>>>16|0;i=h|i<<16;m=e|g;g=r[(l|11)+c|0];e=g>>>8|0;h=g<<24|i;g=h+n|0;f=(e|m)+f|0;f=g>>>0>>0?f+1|0:f;C=g;I=Aza(y,0,g,0);h=Li;g=j;e=0;j=f;f=g+f|0;n=f;j=f>>>0>>0?e+1|0:e;e=r[(l|13)+c|0];f=e>>>24|0;g=r[(l|12)+c|0]|e<<8;i=r[(l|14)+c|0];e=i>>>16|0;i=g|i<<16;m=e|f;e=r[(l|15)+c|0];f=e>>>8|0;g=e<<24|i;e=g+n|0;f=(f|m)+j|0;f=e>>>0>>0?f+1|0:f;D=e;J=Aza(B,0,e,0);j=Li;z=(d+o|0)+f|0;i=Aza(B,0,z,0);n=Li;e=Aza(A,0,p,0);f=Li;o=Aza(x,0,v,0);e=o+e|0;g=Li+f|0;g=e>>>0>>0?g+1|0:g;o=Aza(t,0,C,0);f=o+e|0;e=Li+g|0;K=f;o=f>>>0>>0?e+1|0:e;e=Aza(x,0,p,0);g=Li;m=Aza(t,0,v,0);f=m+e|0;e=Li+g|0;e=f>>>0>>0?e+1|0:e;m=Aza(u,0,C,0);g=m+f|0;f=Li+e|0;L=g;m=g>>>0>>0?f+1|0:f;e=Aza(t,0,p,0);f=Li;g=Aza(u,0,v,0);e=g+e|0;f=Li+f|0;f=e>>>0>>0?f+1|0:f;p=e;g=G+H|0;e=k+F|0;g=e>>>0>>0?g+1|0:g;v=e;k=e+I|0;e=g+h|0;e=k>>>0>>0?e+1|0:e;g=k+J|0;e=e+j|0;e=g>>>0>>0?e+1|0:e;k=g;h=e;e=e+p|0;f=e>>>0>>0?f+1|0:f;g=Aza(s,0,C,0);e=g+e|0;f=Li+f|0;f=e>>>0>>0?f+1|0:f;h=Aza(y,0,D,0);g=h+e|0;e=Li+f|0;e=g>>>0>>0?e+1|0:e;f=g+i|0;e=e+n|0;h=f;j=f>>>0>>0?e+1|0:e;e=j+L|0;g=m;g=e>>>0>>0?g+1|0:g;j=Aza(s,0,D,0);e=j+e|0;f=Li+g|0;f=e>>>0>>0?f+1|0:f;j=Aza(y,0,z,0);g=j+e|0;e=Li+f|0;e=g>>>0>>0?e+1|0:e;j=g;i=e;f=e+K|0;e=o;e=f>>>0>>0?e+1|0:e;i=Aza(u,0,D,0);g=i+f|0;f=Li+e|0;f=g>>>0>>0?f+1|0:f;e=g;g=Aza(s,0,z,0);e=e+g|0;f=Li+f|0;f=e>>>0>>0?f+1|0:f;f=w(u,z)+f|0;n=f&3;i=e;m=0;p=0;g=f&-4;e=0;f=k+(f>>>2|0)|0;e=f>>>0>>0?e+1|0:e;k=f;f=g+f|0;g=f>>>0>>0?e+1|0:e;k=f;f=p;e=g+h|0;h=e;p=j;j=e>>>0>>0?f+1|0:f;f=p+j|0;e=m;g=f;p=i;i=f>>>0>>0?e+1|0:e;j=p+i|0;f=j;o=(i>>>0>f>>>0?e+1|0:e)+n|0;e=k;n=h;i=g;l=l+16|0;E=E+1|0;if((E|0)!=(b|0)){continue}break}}q[a+48>>2]=o;q[a+44>>2]=j;q[a+40>>2]=i;q[a+36>>2]=n;q[a+32>>2]=e}function S1(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0);g=Ii-48|0;Ii=g;q[g+44>>2]=0;q[g+32>>2]=6;q[g+36>>2]=q[b+24>>2];e=q[b>>2];i=-11;a:{b:{d=q[239673];c:{if(!d){break c}while(1){if(dj(q[d>>2],e)){d=q[d+32>>2];if(d){continue}break c}break}i=Mi[q[d+4>>2]](g+32|0,g+44|0)|0;if(!i){break b}e=q[b>>2]}q[g>>2]=e;Pi(4,209937,209943,g);q[g+24>>2]=44100;break a}Mi[q[d+20>>2]](q[g+44>>2],g+24|0);i=0;f=d}k=u[b+4>>2];c=Ui($i(33960),0,33960);J1(c);q[239672]=c;o[c+33956|0]=1;p[c+33954>>1]=0;q[c+4>>2]=f;q[c+8>>2]=q[g+44>>2];q[g+16>>2]=q[b+28>>2];q[c>>2]=B1(g+16|0);f=q[b+28>>2];h=q[b+8>>2];if(a){d=q[b+12>>2];e=q[b+16>>2];k=Sm(a,209970,x(1));h=Tj(a,209981,h);Tj(a,210002,e);Tj(a,210026,d);f=Tj(a,210050,f)}d:{e:{f:{g:{if(o[c+32|0]&1){break g}Wi(f,64,c+20|0,c+28|0,c+24|0);a=q[c+20>>2];if(q[c+28>>2]-a>>6>>>0>>0){break f}q[c+24>>2]=a+(f<<6);d=s[c+40>>1];a=f&65535;if(d>>>0>a>>>0){break e}e=q[c+36>>2];j=Yi(a<<1);q[c+36>>2]=j;j=Ti(j,e,d<<1);p[c+40>>1]=f;if(a>>>0>d>>>0){while(1){p[j+(d<<1)>>1]=d;d=d+1|0;if((a|0)!=(d|0)){continue}break}}Ni(e);if(f){e=0;while(1){a=q[c+20>>2];if(q[c+24>>2]-a>>6>>>0<=e>>>0){break d}a=a+(e<<6)|0;q[a+56>>2]=0;q[a+60>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+56>>2]=-1;q[a+4>>2]=Yi(w(q[b+24>>2],20)+4|0);q[a+40>>2]=1065353216;q[a+44>>2]=0;e=e+1|0;if((f|0)!=(e|0)){continue}break}}if(o[c+60|0]&1){break g}Wi(h,32,c+48|0,c+56|0,c+52|0);a=q[c+48>>2];if(q[c+56>>2]-a>>5>>>0>>0){break f}q[c+52>>2]=a+(h<<5);d=s[c+68>>1];a=h&65535;if(d>>>0>a>>>0){break e}f=q[c+64>>2];e=Yi(a<<1);q[c+64>>2]=e;e=Ti(e,f,d<<1);p[c+68>>1]=h;if(a>>>0>d>>>0){while(1){p[e+(d<<1)>>1]=d;d=d+1|0;if((a|0)!=(d|0)){continue}break}}Ni(f);if(h){d=q[c+52>>2];f=q[c+48>>2];a=d-f|0;e=(a|0)>-1?a:-1;d=f-d|0;a=w((e|0)<1?e:1,((a|0)<(d|0)?d:a)>>>5|0);d=0;while(1){if((a|0)==(d|0)){break d}p[(f+(d<<5)|0)+16>>1]=65535;d=d+1|0;if((h|0)!=(d|0)){continue}break}}q[c+33916>>2]=q[g+24>>2];a=q[b+24>>2];q[c+33920>>2]=a;a=a<<2;q[c+33928>>2]=Yi(a);q[c+33932>>2]=Yi(a);q[c+33936>>2]=Yi(a);q[c+33940>>2]=Yi(a);q[c+33944>>2]=Yi(a);a=Yi(a);p[c+33952>>1]=0;q[c+33948>>2]=a;qt(c+76|0,65,32);a=Ui(c+112|0,0,33792)+w(jz(209922),1056)|0;q[a+8>>2]=0;u[a+16>>2]=k;u[a+12>>2]=k;q[c+33904>>2]=1;q[c+33908>>2]=0;q[c+33912>>2]=-14;q[c+12>>2]=0;q[c+16>>2]=0;if(r[b+32|0]){q[c+16>>2]=Wj();q[c+12>>2]=k1(c)}Ii=g+48|0;return i}J(210760,210835,493,210891);G()}J(210903,210835,506,210922);G()}J(210930,210953,112,210891);G()}J(211004,210835,479,211015);G()}function U9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=x(0);c=Ii-368|0;Ii=c;e=q[b+4>>2];a:{if(e){g=q[b>>2];while(1){if((d|0)==(e|0)){break a}f=!dj(150078,q[(g+w(d,20)|0)+4>>2])+f|0;d=d+1|0;if(e>>>0>d>>>0){continue}break}}l=a+8|0;e=f+1|0;g=(e>>>0)/3|0;rJ(l,g>>>0>1?g:1,e);q[c+196>>2]=0;e=q[210502];q[c+192>>2]=e;Ui(c+200|0,0,168);p[c+362>>1]=65535;p[c+356>>1]=65535;p[c+350>>1]=65535;p[c+344>>1]=65535;p[c+338>>1]=65535;p[c+332>>1]=65535;p[c+326>>1]=65535;p[c+320>>1]=65535;p[c+314>>1]=65535;p[c+308>>1]=65535;p[c+302>>1]=65535;p[c+296>>1]=65535;p[c+290>>1]=65535;p[c+284>>1]=65535;p[c+278>>1]=65535;p[c+272>>1]=65535;p[c+266>>1]=65535;p[c+260>>1]=65535;p[c+254>>1]=65535;p[c+248>>1]=65535;p[c+242>>1]=65535;p[c+236>>1]=65535;p[c+230>>1]=65535;p[c+224>>1]=65535;p[c+218>>1]=65535;p[c+212>>1]=65535;p[c+206>>1]=65535;p[c+200>>1]=65535;GA(l,e,c+192|0);b:{c:{if(!f){break c}d=q[b+4>>2];if(!d){break c}n=c+24|0;while(1){d:{e:{if(d>>>0>j>>>0){f=w(j,20);i=f+q[b>>2]|0;if(dj(150078,q[i+4>>2])){break d}m=st(q[i>>2]);e=q[a+12>>2];f:{if(!e){break f}d=q[q[l>>2]+((m>>>0)%(e>>>0)<<2)>>2];if((d|0)==-1){break f}e=q[a+16>>2];while(1){g=e+w(d,184)|0;if(q[g>>2]==(m|0)){break e}d=q[g+180>>2];if((d|0)!=-1){continue}break}}s=u[i+8>>2];q[c+16>>2]=m;u[c+20>>2]=s;Ui(n,0,168);p[c+186>>1]=65535;p[c+180>>1]=65535;p[c+174>>1]=65535;p[c+168>>1]=65535;p[c+162>>1]=65535;p[c+156>>1]=65535;p[c+150>>1]=65535;p[c+144>>1]=65535;p[c+138>>1]=65535;p[c+132>>1]=65535;p[c+126>>1]=65535;p[c+120>>1]=65535;p[c+114>>1]=65535;p[c+108>>1]=65535;p[c+102>>1]=65535;p[c+96>>1]=65535;p[c+90>>1]=65535;p[c+84>>1]=65535;p[c+78>>1]=65535;p[c+72>>1]=65535;p[c+66>>1]=65535;p[c+60>>1]=65535;p[c+54>>1]=65535;p[c+48>>1]=65535;p[c+42>>1]=65535;p[c+36>>1]=65535;p[c+30>>1]=65535;p[c+24>>1]=65535;d=q[i+16>>2];if(d){k=0;while(1){g:{h:{if(d>>>0>k>>>0){h=q[i+12>>2]+w(k,24)|0;e=(c+16|0)+w(q[h>>2],6)|0;p[e+8>>1]=q[h+8>>2];f=r[e+12|0]&-4|r[h+4|0]&3;o[e+12|0]=f;if(q[h+4>>2]==2){p[e+10>>1]=q[h+20>>2]}g=q[h+16>>2];if(!g){break g}d=0;while(1){if(d>>>0>=g>>>0){break h}g=e;i:{j:{k:{switch(q[q[h+12>>2]+(d<<2)>>2]){case 2:f=f|16;break j;case 0:f=f|4;break j;case 1:break k;default:break i}}f=f|8}o[g+12|0]=f}d=d+1|0;g=q[h+16>>2];if(d>>>0>>0){continue}break}break g}J(149732,149744,274,149768);G()}J(149732,149744,255,149768);G()}d=q[i+16>>2];k=k+1|0;if(d>>>0>k>>>0){continue}break}}GA(l,m,c+16|0);break d}break a}if(t[b+4>>2]<=j>>>0){break b}q[c>>2]=q[f+q[b>>2]>>2];Pi(3,149328,149334,c)}d=q[b+4>>2];j=j+1|0;if(d>>>0>j>>>0){continue}break}}Ii=c+368|0;return}}J(149732,149744,289,149768);G()}function k4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=0,y=x(0),z=x(0),A=x(0),B=0;c=Ii-144|0;Ii=c;B=1;a:{if(Oj(a,1)){w=Mj(a,1);b=Ym(a,2);e=u[b>>2];u[c+80>>2]=e;f=u[b+4>>2];u[c+84>>2]=f;g=u[b+8>>2];u[c+88>>2]=g;h=u[b+12>>2];u[c+92>>2]=h;i=u[b+16>>2];u[c+96>>2]=i;j=u[b+20>>2];u[c+100>>2]=j;k=u[b+24>>2];u[c+104>>2]=k;l=u[b+28>>2];u[c+108>>2]=l;m=u[b+32>>2];u[c+112>>2]=m;n=u[b+36>>2];u[c+116>>2]=n;o=u[b+40>>2];u[c+120>>2]=o;p=u[b+44>>2];u[c+124>>2]=p;r=u[b+48>>2];u[c+128>>2]=r;s=u[b+52>>2];u[c+132>>2]=s;t=u[b+56>>2];u[c+136>>2]=t;d=u[b+60>>2];u[c+140>>2]=d;b=yj(a,64);v=d;d=x(w);u[b+60>>2]=v*d;u[b+56>>2]=t*d;u[b+52>>2]=s*d;u[b+48>>2]=r*d;u[b+44>>2]=p*d;u[b+40>>2]=o*d;u[b+36>>2]=n*d;u[b+32>>2]=m*d;u[b+28>>2]=l*d;u[b+24>>2]=k*d;u[b+20>>2]=j*d;u[b+16>>2]=i*d;u[b+12>>2]=h*d;u[b+8>>2]=g*d;u[b+4>>2]=f*d;u[b>>2]=e*d;Zi(a,-1e4,134048);xj(a,-2);break a}b=Ym(a,1);h=u[b>>2];u[c+80>>2]=h;i=u[b+4>>2];u[c+84>>2]=i;j=u[b+8>>2];u[c+88>>2]=j;k=u[b+12>>2];u[c+92>>2]=k;l=u[b+16>>2];u[c+96>>2]=l;m=u[b+20>>2];u[c+100>>2]=m;n=u[b+24>>2];u[c+104>>2]=n;o=u[b+28>>2];u[c+108>>2]=o;p=u[b+32>>2];u[c+112>>2]=p;r=u[b+36>>2];u[c+116>>2]=r;s=u[b+40>>2];u[c+120>>2]=s;t=u[b+44>>2];u[c+124>>2]=t;v=u[b+48>>2];u[c+128>>2]=v;y=u[b+52>>2];u[c+132>>2]=y;z=u[b+56>>2];u[c+136>>2]=z;A=u[b+60>>2];u[c+140>>2]=A;b=Ck(a,2,q[210439]);if(b){_k(c+16|0,c+80|0,b);b=yj(a,64);u[b>>2]=u[c+16>>2];u[b+4>>2]=u[c+20>>2];u[b+8>>2]=u[c+24>>2];u[b+12>>2]=u[c+28>>2];u[b+16>>2]=u[c+32>>2];u[b+20>>2]=u[c+36>>2];u[b+24>>2]=u[c+40>>2];u[b+28>>2]=u[c+44>>2];u[b+32>>2]=u[c+48>>2];u[b+36>>2]=u[c+52>>2];u[b+40>>2]=u[c+56>>2];u[b+44>>2]=u[c+60>>2];u[b+48>>2]=u[c+64>>2];u[b+52>>2]=u[c+68>>2];u[b+56>>2]=u[c+72>>2];u[b+60>>2]=u[c+76>>2];Zi(a,-1e4,134048);xj(a,-2);break a}b=Ck(a,2,q[210437]);if(b){d=u[b+4>>2];e=u[b>>2];f=u[b+8>>2];g=u[b+12>>2];b=yj(a,16);u[b+12>>2]=x(x(x(e*k)+x(d*o))+x(f*t))+x(g*A);u[b+8>>2]=x(x(x(e*j)+x(d*n))+x(f*s))+x(g*z);u[b+4>>2]=x(x(x(e*i)+x(d*m))+x(f*r))+x(g*y);u[b>>2]=x(x(x(h*e)+x(l*d))+x(p*f))+x(v*g);Zi(a,-1e4,134016);xj(a,-2);break a}if(Oj(a,2)){w=fj(a,2);b=yj(a,64);d=x(w);u[b+60>>2]=A*d;u[b+56>>2]=z*d;u[b+52>>2]=y*d;u[b+48>>2]=v*d;u[b+44>>2]=t*d;u[b+40>>2]=s*d;u[b+36>>2]=r*d;u[b+32>>2]=p*d;u[b+28>>2]=o*d;u[b+24>>2]=n*d;u[b+20>>2]=m*d;u[b+16>>2]=l*d;u[b+12>>2]=k*d;u[b+8>>2]=j*d;u[b+4>>2]=i*d;u[b>>2]=h*d;Zi(a,-1e4,134048);xj(a,-2);break a}q[c+12>>2]=134016;q[c+8>>2]=134048;q[c+4>>2]=134048;q[c>>2]=134064;B=Qi(a,135116,c)}Ii=c+144|0;return B|0}function px(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,u=0;a:{if(!f){break a}while(1){b:{c:{if(!((f|0)<=(h|0)|(e|0)<=(h|0))){if(!e){break a}i=q[d>>2];s=q[b>>2];j=q[(i+w(s,48)|0)+32>>2];while(1){m=q[a>>2];if(j>>>0>2]){break c}a=a+4|0;e=e-1|0;if(e){continue}break}break a}if((e|0)>(f|0)){break b}if((a|0)==(b|0)){break a}i=g;j=a;while(1){q[i>>2]=q[j>>2];i=i+4|0;j=j+4|0;if((j|0)!=(b|0)){continue}break}if((g|0)==(i|0)){break a}d=q[d>>2];while(1){if((b|0)==(c|0)){b=i-g|0;if(!b){break a}bl(a,g,b);return}e=q[b>>2];f=q[g>>2];d:{if(t[(d+w(e,48)|0)+32>>2]>2]){q[a>>2]=e;b=b+4|0;break d}q[a>>2]=f;g=g+4|0}a=a+4|0;if((g|0)!=(i|0)){continue}break}break a}e:{if((e|0)<(f|0)){n=(f|0)/2|0;m=(n<<2)+b|0;j=b-a|0;f:{if(!j){l=a;break f}j=j>>2;p=q[(i+w(q[m>>2],48)|0)+32>>2];l=a;while(1){k=j>>>1|0;r=(k<<2)+l|0;o=p>>>0>2],48)|0)+32>>2];l=o?l:r+4|0;j=o?k:(k^-1)+j|0;if(j){continue}break}}o=l-a>>2;break e}if((e|0)==1){q[a>>2]=s;q[b>>2]=m;return}o=(e|0)/2|0;l=(o<<2)+a|0;j=c-b|0;g:{if(!j){m=b;break g}j=j>>2;p=q[(i+w(q[l>>2],48)|0)+32>>2];m=b;while(1){k=j>>>1|0;r=(k<<2)+m|0;n=p>>>0>t[(i+w(q[r>>2],48)|0)+32>>2];m=n?r+4|0:m;j=n?(k^-1)+j|0:k;if(j){continue}break}}n=m-b>>2}f=f-n|0;e=e-o|0;i=m;h:{if((b|0)==(l|0)){break h}i=l;if((b|0)==(m|0)){break h}k=l+4|0;if((k|0)==(b|0)){j=q[l>>2];i=m-b|0;if(i){bl(l,b,i)}i=i+l|0;q[i>>2]=j;break h}if((b+4|0)==(m|0)){b=m-4|0;j=q[b>>2];i=m;b=b-l|0;if(b){i=m-b|0;bl(i,l,b)}q[l>>2]=j;break h}r=m-b>>2;i=r;p=b-l>>2;j=p;if((i|0)==(j|0)){i=q[l>>2];q[l>>2]=s;q[b>>2]=i;i=b;if((b|0)==(k|0)){break h}while(1){j=q[k>>2];q[k>>2]=q[i+4>>2];q[i+4>>2]=j;i=i+4|0;k=k+4|0;if((k|0)!=(b|0)){continue}break}i=b;break h}while(1){b=j;j=i;i=(b|0)%(i|0)|0;if(i){continue}break}if(j){b=(j<<2)+l|0;while(1){b=b-4|0;s=p<<2;k=b+s|0;u=q[b>>2];j=b;while(1){i=k;q[j>>2]=q[i>>2];j=i;k=m-i>>2;k=(k|0)>(p|0)?i+s|0:(p-k<<2)+l|0;if((k|0)!=(b|0)){continue}break}q[i>>2]=u;if((b|0)!=(l|0)){continue}break}}i=(r<<2)+l|0}i:{if((n+o|0)<(e+f|0)){px(a,l,i,d,o,n,g,h);a=i;b=m;break i}px(i,m,c,d,e,f,g,h);f=n;e=o;c=i;b=l}if(f){continue}break a}break}if((b|0)==(c|0)){break a}j=b;i=g;while(1){q[i>>2]=q[j>>2];i=i+4|0;j=j+4|0;if((j|0)!=(c|0)){continue}break}if((g|0)==(i|0)){break a}f=q[d>>2];while(1){if((a|0)==(b|0)){if((g|0)==(i|0)){break a}while(1){c=c-4|0;i=i-4|0;q[c>>2]=q[i>>2];if((g|0)!=(i|0)){continue}break}break a}d=i-4|0;e=q[d>>2];j=b-4|0;k=q[j>>2];if(t[(f+w(e,48)|0)+32>>2]>=t[(f+w(k,48)|0)+32>>2]){k=e;j=b;i=d}c=c-4|0;q[c>>2]=k;b=j;if((g|0)!=(i|0)){continue}break}}}function Cl(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;q[a+20>>2]=q[a+20>>2]+c;a:{if(!c){break a}g=b;h=c;while(1){e=q[a+16>>2];if(!(e?0:(h|0)>=8)){d=r[g|0];i=e+1|0;q[a+16>>2]=i;j=a;k=q[a+12>>2];f=e<<3;e=f&31;if((f&63)>>>0>=32){f=d<>>32-e;d=d<>2];e=f|k;f=e;q[j+8>>2]=d;q[j+12>>2]=e;h=h-1|0;if((i|0)==8){q[a+16>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;e=Aza(q[a>>2],q[a+4>>2],1540483477,-962287725);i=Li;d=Aza(d,f,1540483477,-962287725);f=Li;q[a>>2]=Aza(d^f>>>15,f,1540483477,-962287725)^e;q[a+4>>2]=Li^i}g=g+1|0;if(h){continue}break a}break}f=q[a>>2];i=q[a+4>>2];while(1){d=g;d=Aza(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24),r[d+4|0]|r[d+5|0]<<8|(r[d+6|0]<<16|r[d+7|0]<<24),1540483477,-962287725);k=Li;d=Aza(d^k>>>15,k,1540483477,-962287725);e=Li;f=Aza(f,i,1540483477,-962287725)^d;d=Li^e;i=d;q[a>>2]=f;q[a+4>>2]=d;g=g+8|0;d=(h|0)>15;j=h-8|0;h=j;if(d){continue}break}if(!j){break a}while(1){e=q[a+16>>2];if(e?0:(j|0)>=8){break a}h=r[g|0];i=e+1|0;q[a+16>>2]=i;d=a;k=q[a+12>>2];e=e<<3;f=e&31;if((e&63)>>>0>=32){e=h<>>32-f;f=h<>2];e=e|k;f=e;q[d+8>>2]=h;q[d+12>>2]=e;j=j-1|0;if((i|0)==8){q[a+16>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;e=Aza(q[a>>2],q[a+4>>2],1540483477,-962287725);i=Li;h=Aza(h,f,1540483477,-962287725);k=Li;q[a>>2]=Aza(h^k>>>15,k,1540483477,-962287725)^e;q[a+4>>2]=Li^i}g=g+1|0;if(j){continue}break}}b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;g=Wj();o[852468]=0;q[213116]=g;ek(852568)}c:{d:{if(!(!r[852468]|!q[a+24>>2]|t[a+20>>2]>1024)){e:{if(o[852568]&1){break e}if(!fk(852568)){break e}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;g=Wj();o[852468]=0;q[213116]=g;ek(852568)}a=q[a+24>>2];if(!a){break d}g=q[213134];if(a>>>0>=q[213135]-g>>3>>>0){break c}a=g+(a<<3)|0;g=s[a+4>>1]+c|0;h=ul(q[a>>2],g+32&-16);q[a>>2]=h;Ti(h+s[a+4>>1]|0,b,c);o[g+h|0]=0;p[a+4>>1]=g}return}J(165718,165430,150,165757);G()}J(165931,165533,479,165942);G()}function J1(a){var b=0;q[a+92>>2]=0;q[a+96>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+76>>2]=0;q[a+80>>2]=0;q[a+36>>2]=0;q[a+40>>2]=0;q[a+28>>2]=0;q[a+32>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;b=a- -64|0;q[b>>2]=0;q[b+4>>2]=0;q[a+84>>2]=0;q[a+88>>2]=0;q[a+100>>2]=0;q[a+104>>2]=0;q[a+120>>2]=0;q[a+124>>2]=1065353216;b=a+1176|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+2232|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+3288|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+4344|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+5400|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+6456|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+7512|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+8568|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+9624|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+10680|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+11736|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+12792|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+13848|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+14904|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+15960|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+17016|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+18072|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+19128|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+20184|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+21240|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+22296|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+23352|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+24408|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+25464|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+26520|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+27576|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+28632|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+29688|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+30744|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+31800|0;q[b>>2]=0;q[b+4>>2]=1065353216;b=a+32856|0;q[b>>2]=0;q[b+4>>2]=1065353216;q[a+32864>>2]=1065353216;q[a+31808>>2]=1065353216;q[a+30752>>2]=1065353216;q[a+29696>>2]=1065353216;q[a+28640>>2]=1065353216;q[a+27584>>2]=1065353216;q[a+26528>>2]=1065353216;q[a+25472>>2]=1065353216;q[a+24416>>2]=1065353216;q[a+23360>>2]=1065353216;q[a+22304>>2]=1065353216;q[a+21248>>2]=1065353216;q[a+20192>>2]=1065353216;q[a+19136>>2]=1065353216;q[a+18080>>2]=1065353216;q[a+17024>>2]=1065353216;q[a+15968>>2]=1065353216;q[a+14912>>2]=1065353216;q[a+13856>>2]=1065353216;q[a+12800>>2]=1065353216;q[a+11744>>2]=1065353216;q[a+10688>>2]=1065353216;q[a+9632>>2]=1065353216;q[a+8576>>2]=1065353216;q[a+7520>>2]=1065353216;q[a+6464>>2]=1065353216;q[a+5408>>2]=1065353216;q[a+4352>>2]=1065353216;q[a+3296>>2]=1065353216;q[a+2240>>2]=1065353216;q[a+1184>>2]=1065353216;q[a+128>>2]=1065353216;q[a+96>>2]=-1;o[a+44|0]=r[a+44|0]&254;o[a+72|0]=r[a+72|0]&254}function Gpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;c=Ii-240|0;Ii=c;g=q[a+8>>2];q[73032]=q[73032]+((q[g+4>>2]-q[g>>2]|0)/176|0);b=(q[g+4>>2]-q[g>>2]|0)/176|0;q[c+8>>2]=b;q[c+12>>2]=0;q[c+232>>2]=b;q[c+236>>2]=0;f=q[g+20>>2];d=q[g+16>>2];b=f-d|0;e=0;a:{if(!b){break a}i=q[a+12>>2];b:{j=b>>2;a=j-1|0;if(a>>>0>>0){f=d-f|0;e=((b|0)<(f|0)?f:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(e,(b|0)<1?b:1);l=b>>>0>1?b:1;f=c+40|0;b=q[58762];m=q[b+8>>2];n=q[b+12>>2];b=0;k=c- -64|0;while(1){a=q[(a<<2)+d>>2];if(r[a+160|0]&2){qB(a,i);u[c+96>>2]=u[a+32>>2];u[c+100>>2]=u[a+36>>2];u[c+104>>2]=u[a+40>>2];u[c+108>>2]=u[a+44>>2];u[c+112>>2]=u[a+48>>2];u[c+116>>2]=u[a+52>>2];u[c+120>>2]=u[a+56>>2];u[c+124>>2]=u[a+60>>2];u[c+128>>2]=u[a- -64>>2];u[c+132>>2]=u[a+68>>2];u[c+136>>2]=u[a+72>>2];u[c+140>>2]=u[a+76>>2];u[c+144>>2]=u[a+80>>2];u[c+148>>2]=u[a+84>>2];u[c+152>>2]=u[a+88>>2];u[c+156>>2]=u[a+92>>2];u[c+160>>2]=u[a+96>>2];u[c+164>>2]=u[a+100>>2];u[c+168>>2]=u[a+104>>2];u[c+172>>2]=u[a+108>>2];u[c+176>>2]=u[a+112>>2];u[c+180>>2]=u[a+116>>2];u[c+184>>2]=u[a+120>>2];u[c+188>>2]=u[a+124>>2];u[c+192>>2]=u[a+128>>2];u[c+196>>2]=u[a+132>>2];u[c+200>>2]=u[a+136>>2];u[c+204>>2]=u[a+140>>2];u[c+208>>2]=u[a+144>>2];u[c+212>>2]=u[a+148>>2];u[c+216>>2]=u[a+152>>2];u[c+220>>2]=u[a+156>>2];if(to(q[a>>2],s[a+162>>1],c+80|0)){Pi(4,48644,48689,0);e=0;break a}q[c+72>>2]=0;q[c+76>>2]=0;q[k>>2]=0;q[k+4>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;o[c+48|0]=0;o[c+49|0]=0;o[c+50|0]=0;o[c+51|0]=0;o[c+52|0]=0;o[c+53|0]=0;o[c+54|0]=0;o[c+55|0]=0;o[c+72|0]=0;o[c+73|0]=0;o[c+74|0]=0;o[c+75|0]=0;o[c+76|0]=0;o[c+77|0]=0;o[c+78|0]=0;o[c+79|0]=0;o[c+64|0]=0;o[c+65|0]=0;o[c+66|0]=0;o[c+67|0]=0;o[c+68|0]=0;o[c+69|0]=0;o[c+70|0]=0;o[c+71|0]=0;o[c+56|0]=0;o[c+57|0]=0;o[c+58|0]=0;o[c+59|0]=0;o[c+60|0]=0;o[c+61|0]=0;o[c+62|0]=0;o[c+63|0]=0;if(vn(q[62138],c+48|0)){break b}q[f>>2]=0;q[f+4>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;d=0;h=0;e=q[q[q[a>>2]+80>>2]+8>>2];c:{if(!e){break c}e=q[e>>2];if(!e){break c}d=q[e+3216>>2];h=q[e+3220>>2]}q[c+16>>2]=d;q[c+20>>2]=h;d=q[a>>2];h=q[d+100>>2];q[c+32>>2]=q[d+96>>2];q[c+36>>2]=h;to(q[a>>2],s[a+162>>1],f);vk(c+16|0,c+48|0,m,n,0,q[58762],c+80|0,144);if(!p){xH(i,a+96|0);wH(i,a+32|0)}p=1}a=b+1|0;e=0;if((a|0)==(l|0)){break a}d=j-b|0;b=a;a=d-2|0;d=q[g+16>>2];if(a>>>0>2]-d>>2>>>0){continue}break}}J(49027,48930,479,49038);G()}q[c>>2]=q[62138];Pi(4,48644,48757,c);e=-1e3}d=e;Ii=c+240|0;return d|0}function hL(a){var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-48|0;Ii=d;g=q[a+152>>2];q[d+24>>2]=0;q[d+28>>2]=0;q[d+40>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;b=d;c=q[a+192>>2];if(!c){c=q[g+8>>2]}q[b+20>>2]=q[c>>2];kk(d+24|0,g+120|0,4);kk(d+24|0,d+20|0,4);b=q[a+160>>2];a:{b:{if(b){break b}c=q[a+192>>2];if(c){b=q[c+4>>2];if(b){break b}}c=q[a+152>>2];b=q[c+12>>2];if(b){break b}c=q[c+8>>2];if(!c){break a}b=q[c+4>>2];if(!b){break a}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+164>>2];c:{d:{if(b){break d}c=q[a+192>>2];if(c){b=q[c+8>>2];if(b){break d}}c=q[a+152>>2];b=q[c+16>>2];if(b){break d}e=0;f=0;c=q[c+8>>2];if(!c){break c}b=q[c+8>>2];if(!b){break c}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+168>>2];e:{f:{if(b){break f}c=q[a+192>>2];if(c){b=q[c+12>>2];if(b){break f}}c=q[a+152>>2];b=q[c+20>>2];if(b){break f}e=0;f=0;c=q[c+8>>2];if(!c){break e}b=q[c+12>>2];if(!b){break e}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+172>>2];g:{h:{if(b){break h}c=q[a+192>>2];if(c){b=q[c+16>>2];if(b){break h}}c=q[a+152>>2];b=q[c+24>>2];if(b){break h}e=0;f=0;c=q[c+8>>2];if(!c){break g}b=q[c+16>>2];if(!b){break g}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+176>>2];i:{j:{if(b){break j}c=q[a+192>>2];if(c){b=q[c+20>>2];if(b){break j}}c=q[a+152>>2];b=q[c+28>>2];if(b){break j}e=0;f=0;c=q[c+8>>2];if(!c){break i}b=q[c+20>>2];if(!b){break i}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+180>>2];k:{l:{if(b){break l}c=q[a+192>>2];if(c){b=q[c+24>>2];if(b){break l}}c=q[a+152>>2];b=q[c+32>>2];if(b){break l}e=0;f=0;c=q[c+8>>2];if(!c){break k}b=q[c+24>>2];if(!b){break k}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+184>>2];m:{n:{if(b){break n}c=q[a+192>>2];if(c){b=q[c+28>>2];if(b){break n}}c=q[a+152>>2];b=q[c+36>>2];if(b){break n}e=0;f=0;c=q[c+8>>2];if(!c){break m}b=q[c+28>>2];if(!b){break m}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=q[a+188>>2];o:{p:{if(b){break p}c=q[a+192>>2];if(c){b=q[c+32>>2];if(b){break p}}c=q[a+152>>2];b=q[c+40>>2];if(b){break p}e=0;f=0;c=q[c+8>>2];if(!c){break o}b=q[c+32>>2];if(!b){break o}}e=q[b>>2];f=q[b+4>>2]}q[d+8>>2]=e;q[d+12>>2]=f;kk(d+24|0,d+8|0,8);b=d+24|0;c=q[a+156>>2];if(!c){c=q[g+4>>2]}kk(b,c+8|0,8);b=q[a+196>>2];q:{if(!b){b=q[q[a+152>>2]+112>>2];if(!b){break q}}Mi[q[74961]](d+24|0,b)}c=q[a+148>>2];if(c){At(c,d+24|0)}q[a+144>>2]=Rn(d+24|0);o[a+204|0]=r[a+204|0]&251;Ii=d+48|0}function aO(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=e?0:-1;l=e?-1:1;i=e?-1:0;f=-2;j=(e|0)!=0;k=!e;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{switch(c-2|0){case 0:x:{y:{c=zj(b,0);if(c){if((c|0)==(d|0)){break y}e=c-g|0;c=c+g|0;c=(c|0)<0?e:(c|0)>(d|0)?e:c;break x}c=(e|0)!=0;break x}c=d+g|0;if((c|0)<1){break d}c=c-1|0}if((c|0)>(d|0)){break b}o[Zj(a,0)|0]=c;c=1;e=zj(b,1);if(!e){break u}c=e;if((e|0)!=(d|0)){break u}c=d-1|0;break t;case 3:case 4:f=0;break v;case 5:f=k;break v;case 9:case 13:f=0;break v;case 16:f=i;break v;case 17:case 18:f=0;break v;case 19:f=j;break v;case 6:case 22:f=0;break v;case 25:f=g;break v;case 26:f=l;break v;case 27:f=j;break v;case 28:f=i;break v;case 29:f=k;break v;case 8:break v;default:break w}}f=((c>>>0)%3|0)-1|0}h=zj(b,0);z:{A:{if(!h){e=3;if((f|0)==-2){break z}e=f+1|0;break A}e=(d+f|0)-1|0;if((d|0)==(h|0)){break A}e=h-f|0;m=e;e=f+h|0;e=(e|0)<0?m:(d|0)<(e|0)?m:e}if((e|0)<=-1){break d}}if((d|0)<(e|0)){break b}o[Zj(a,0)|0]=e;f=-2;switch(c-5|0){case 6:break j;case 10:case 13:break k;case 14:break l;case 15:case 16:break m;case 19:break n;case 3:break o;case 22:break p;case 23:break q;case 24:break r;case 25:break s;case 5:break e;case 26:break g;case 0:break h;case 1:case 2:break i;default:break f}}if((c|0)>(d|0)){break b}}e=1;o[Zj(a,1)|0]=c;b=zj(b,2);if(!b){break c}e=b;if((e|0)!=(d|0)){break c}e=d-1|0;break a}f=i;break e}f=j;break e}f=l;break e}f=g;break e}f=0;break e}f=j;break e}f=0;break e}f=i;break e}f=0;break e}f=k;break e}f=0;break e}f=g;break e}f=k;break e}f=(((c>>>0)/3>>>0)%3|0)-1|0}e=zj(b,1);B:{C:{if(e){if((d|0)!=(e|0)){h=e-f|0;e=e+f|0;e=(e|0)<0?h:(d|0)<(e|0)?h:e;break C}e=(d+f|0)-1|0;break C}e=3;if((f|0)==-2){break B}e=f+1|0}if((e|0)<0){break d}}if((d|0)<(e|0)){break b}o[Zj(a,1)|0]=e;f=-2;D:{E:{switch(c-5|0){case 25:f=i;break D;case 24:f=j;break D;case 23:f=l;break D;case 22:f=g;break D;case 3:f=j;break D;case 16:case 19:f=0;break D;case 15:f=i;break D;case 13:case 14:f=0;break D;case 10:f=k;break D;case 2:case 6:f=0;break D;case 1:f=g;break D;case 0:f=0;break D;case 26:f=k;break D;case 5:break D;default:break E}}f=(((c>>>0)/9>>>0)%3|0)-1|0}b=zj(b,2);F:{G:{if(b){if((b|0)!=(d|0)){c=b-f|0;b=b+f|0;e=(b|0)<0?c:(b|0)>(d|0)?c:b;break G}e=(d+f|0)-1|0;break G}e=3;if((f|0)==-2){break F}e=f+1|0}if((e|0)<0){break d}}if((d|0)>=(e|0)){break a}break b}J(103446,96899,13503,103453);G()}if((d|0)>=(e|0)){break a}}J(103469,96899,13504,103453);G()}o[Zj(a,2)|0]=e}function tU(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,u=0,v=0,w=0,x=0;f=Ii-11616|0;Ii=f;a:{if(!(!d|c)){b=0;break a}if(!ey(a,b,f+11040|0)){b=0;break a}if(!(q[f+11064>>2]|q[f+11068>>2])){b=1;break a}b:{if(!a){break b}e=q[a+72>>2];if(!e|t[a+16>>2]<=b>>>0|q[a+20>>2]!=1){break b}g=q[e>>2];if(!g){break b}e=g+q[q[e+16>>2]+(b<<2)>>2]|0;g=r[e+28|0]|r[e+29|0]<<8;if(g){b=1;if(r[(e+g|0)+45|0]==47){break a}}b=1;if(r[e+38|0]&16){break a}}if(r[f+11052|0]&33){b=0;break a}b=0;c:{switch(s[f+11054>>1]){case 0:case 8:break c;default:break a}}j=q[f+11076>>2];e=j;g=q[f+11072>>2];if(!e&d>>>0>>0|e){break a}h=q[f+11088>>2];e=q[f+11092>>2];if((Mi[q[a+56>>2]](q[a+68>>2],h,e,f+11008|0,30)|0)!=30|q[f+11008>>2]!=67324752){break a}x=q[a>>2];d=q[a+4>>2];i=s[f+11034>>1];h=i+h|0;e=h>>>0>>0?e+1|0:e;i=h;h=h+s[f+11036>>1]|0;e=h>>>0>>0?e+1|0:e;h=h+30|0;if(h>>>0<30){e=e+1|0}n=h;i=q[f+11064>>2];k=h+i|0;h=e;m=q[f+11068>>2];e=e+m|0;e=k>>>0>>0?e+1|0:e;if((d|0)==(e|0)&k>>>0>x>>>0|d>>>0>>0){break a}if(!s[f+11054>>1]){a=Mi[q[a+56>>2]](q[a+68>>2],n,h,c,g)|0;b=!j&(a|0)==(g|0);if((a|0)!=(g|0)|j){break a}b=0;d:{if(!c){break d}a=q[f+11072>>2];if(!a){break d}b=-1;while(1){d=r[c|0];b=q[(((d^b)&15)<<2)+184016>>2]^b>>>4;b=b>>>4^q[((b&15^d>>>4)<<2)+184016>>2];c=c+1|0;a=a-1|0;if(a){continue}break}b=b^-1}b=q[f+11056>>2]==(b|0);break a}q[f+16>>2]=0;b=q[q[a+72>>2]+72>>2];e:{if(b){d=b+n|0;g=i;j=m;break e}b=!m&i>>>0<65536;i=b?i:65536;m=b?m:0;d=Mi[q[a+40>>2]](q[a+52>>2],1,i)|0;if(!d){b=0;break a}p=q[f+11064>>2];o=q[f+11068>>2];g=0;j=0}f:{g:{while(1){e=q[f+11072>>2];b=l;q[f+8>>2]=e-b;h:{if(g|j){break h}g=0;j=0;if(q[q[a+72>>2]+72>>2]){break h}b=(m|0)==(o|0)&i>>>0

>>0|m>>>0>>0;g=b?i:p;j=b?m:o;if((Mi[q[a+56>>2]](q[a+68>>2],n,h,d,g)|0)!=(g|0)|j){break g}b=p;e=g;p=b-e|0;o=o-((b>>>0>>0)+j|0)|0;e=h+j|0;b=g+n|0;e=b>>>0>>0?e+1|0:e;n=b;h=e;u=0;v=0}q[f+12>>2]=g;b=pU(f+16|0,d+u|0,f+12|0,c,c+l|0,f+8|0,o|p?6:4);k=q[f+8>>2];l=k+l|0;e=w;e=l>>>0>>0?e+1|0:e;w=e;k=q[f+12>>2];u=k+u|0;e=v;e=u>>>0>>0?e+1|0:e;v=e;e=g;g=e-k|0;j=j-(e>>>0>>0)|0;if((b|0)==1){continue}break}if(b){break f}if(q[f+11072>>2]!=(l|0)|q[f+11076>>2]!=(w|0)){break g}b=0;e=0;i:{if(!c){break i}e=0;if(!l){break i}e=-1;while(1){g=r[c|0];e=q[(((g^e)&15)<<2)+184016>>2]^e>>>4;e=e>>>4^q[((e&15^g>>>4)<<2)+184016>>2];c=c+1|0;l=l-1|0;if(l){continue}break}e=e^-1}if((e|0)==q[f+11056>>2]){break f}}b=-1}if(!q[q[a+72>>2]+72>>2]){Mi[q[a+44>>2]](q[a+52>>2],d)}b=!b}Ii=f+11616|0;return b}function yy(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);d=d<<24|d<<8&16711680|(d>>>8&65280|d>>>24);b=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);b=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);e=(d>>>4^b)&252645135;d=e<<4^d;e=b^e;b=d>>>16^e&65535;e=b^e;b=d^b<<16;d=(e>>>2^b)&858993459;e=d<<2^e;b=b^d;d=(e>>>8^b)&16711935;e=Fza(d<<8^e,1);b=b^d;d=(b^e)&-1431655766;e=e^d;b=Fza(b^d,1);d=a;while(1){i=e;h=q[d+4>>2]^Fza(e,28);f=b;b=q[d>>2]^e;b=q[((h&63)<<2)+162192>>2]^(f^q[((b&63)<<2)+161168>>2]^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2])^q[(h>>>6&252)+162448>>2]^q[(h>>>14&252)+162704>>2]^q[(h>>>22&252)+162960>>2];e=b^q[d+8>>2];f=i^q[((e&63)<<2)+161168>>2]^q[(e>>>6&252)+161424>>2]^q[(e>>>14&252)+161680>>2]^q[(e>>>22&252)+161936>>2];e=q[d+12>>2]^Fza(b,28);e=f^q[((e&63)<<2)+162192>>2]^q[(e>>>6&252)+162448>>2]^q[(e>>>14&252)+162704>>2]^q[(e>>>22&252)+162960>>2];d=d+16|0;g=g+1|0;if((g|0)!=8){continue}break}d=a+128|0;g=0;while(1){f=b;h=q[d+4>>2]^Fza(b,28);b=q[d>>2]^b;e=q[((h&63)<<2)+162192>>2]^(q[((b&63)<<2)+161168>>2]^e^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2])^q[(h>>>6&252)+162448>>2]^q[(h>>>14&252)+162704>>2]^q[(h>>>22&252)+162960>>2];b=e^q[d+8>>2];f=f^q[((b&63)<<2)+161168>>2]^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2];b=q[d+12>>2]^Fza(e,28);b=f^q[((b&63)<<2)+162192>>2]^q[(b>>>6&252)+162448>>2]^q[(b>>>14&252)+162704>>2]^q[(b>>>22&252)+162960>>2];d=d+16|0;g=g+1|0;if((g|0)!=8){continue}break}d=a+256|0;g=0;while(1){a=q[d+4>>2]^Fza(e,28);f=b;b=q[d>>2]^e;b=q[((a&63)<<2)+162192>>2]^(f^q[((b&63)<<2)+161168>>2]^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2])^q[(a>>>6&252)+162448>>2]^q[(a>>>14&252)+162704>>2]^q[(a>>>22&252)+162960>>2];a=b^q[d+8>>2];f=q[((a&63)<<2)+161168>>2]^e^q[(a>>>6&252)+161424>>2]^q[(a>>>14&252)+161680>>2]^q[(a>>>22&252)+161936>>2];a=q[d+12>>2]^Fza(b,28);e=f^q[((a&63)<<2)+162192>>2]^q[(a>>>6&252)+162448>>2]^q[(a>>>14&252)+162704>>2]^q[(a>>>22&252)+162960>>2];d=d+16|0;g=g+1|0;if((g|0)!=8){continue}break}i=b<<31;f=b;a=Fza(e,31);b=(a^b)&-1431655766;d=i|(f^b)>>>1;a=a^b;b=(d>>>8^a)&16711935;d=b<<8^d;a=a^b;b=(d>>>2^a)&858993459;d=b<<2^d;a=a^b;b=d&65535^a>>>16;e=b<<16^a;a=b^d;b=(e>>>4^a)&252645135;a=a^b;o[c+7|0]=a;o[c+6|0]=a>>>8;o[c+5|0]=a>>>16;o[c+4|0]=a>>>24;a=e^b<<4;o[c+3|0]=a;o[c+2|0]=a>>>8;o[c+1|0]=a>>>16;o[c|0]=a>>>24;return 0}function pl(a,b,c){var d=0,e=0,f=0,g=0;g=Ii-32|0;Ii=g;d=1;f=q[a+52>>2];e=s[f+52>>1]+1|0;p[f+52>>1]=e;if((e&65535)>>>0>=201){gm(a,141933,0)}a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{e=q[a+16>>2];switch(e-263|0){case 0:break i;case 12:break j;case 6:break k;case 23:break l;case 7:break m;case 21:break d;case 1:case 3:case 4:case 5:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 17:case 18:case 19:case 20:case 22:break e;case 2:break g;case 16:break h;default:break n}}o:{switch(e-35|0){case 10:d=0;break m;case 0:break o;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:break e;default:break f}}d=2}Vj(a);pl(a,b,8);kZ(q[a+48>>2],d,b);break a}d=gq(q[a+48>>2],q[a+24>>2]);q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=d;q[b>>2]=4;break c}q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=0;q[b>>2]=1;break c}q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=0;q[b>>2]=2;break c}q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=0;q[b>>2]=3;break c}f=q[a+48>>2];d=q[f>>2];e=r[d+74|0];if(!e){Sj(a,141998);d=q[f>>2];e=r[d+74|0]}o[d+74|0]=e&251;d=Bm(f,37,0,1,0);q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=d;q[b>>2]=14;break c}Vj(a);ZB(a,b,0,q[a+4>>2]);break a}if((e|0)==123){break b}}_x(a,b);break a}q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=0;q[b>>2]=5;v[b+8>>3]=v[a+24>>3]}Vj(a);break a}sN(a,b)}d=0;e=15;p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{f=q[a+16>>2];switch(f-37|0){case 1:case 2:case 3:case 4:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 24:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:break p;case 6:break q;case 25:break u;case 23:break w;case 57:break A;case 0:break B;case 10:break C;case 5:break D;case 8:break E;default:break F}}switch(f-257|0){case 14:break r;case 0:break s;case 24:break t;case 25:break v;case 23:break x;case 26:break y;case 21:break z;default:break p}}d=1;break q}d=2;break q}d=3;break q}d=4;break q}d=5;break q}d=6;break q}d=7;break q}d=8;break q}d=9;break q}d=10;break q}d=11;break q}d=12;break q}d=13;break q}d=14}while(1){e=d<<1;if(r[e+141968|0]<=c>>>0){e=d;break p}Vj(a);oZ(q[a+48>>2],d,b);f=pl(a,g+8|0,r[(e+141968|0)+1|0]);lZ(q[a+48>>2],d,b,g+8|0);e=15;d=f;if((d|0)!=15){continue}break}}a=q[a+52>>2];p[a+52>>1]=s[a+52>>1]-1;Ii=g+32|0;return e}function Zaa(a,b){var c=0,d=0,e=x(0),f=0,g=0,h=0,i=x(0),j=x(0),k=0,l=0,m=0,n=0,p=0,t=0;l=Ii+ -64|0;Ii=l;a:{b:{c:{c=q[a+48>>2];if((c|0)==q[a+52>>2]){break c}d:{while(1){e:{d=w(h,72)+c|0;e=u[d+20>>2];i=u[d+24>>2];f:{if(e>i){break f}f=r[d+68|0];if(f&4){break f}g=q[d+52>>2];k=g-3|0;m=i==x(0);if(k>>>0>2?!(m|e!=i):0){break f}n=q[a+32>>2];p=(q[a+36>>2]-n|0)/592|0;c=q[d>>2];while(1){c=c&65535;if(c>>>0>=p>>>0){break e}c=n+w(c,592)|0;if(!(r[c+414|0]&16)){break f}c=s[c+576>>1];if((c|0)!=65535){continue}break}t=t+1|0;j=u[d+16>>2];if(!(j>2]=u[q[d+4>>2]>>2];f=f&254;o[d+68|0]=f;e=x(-j);u[d+20>>2]=e;q[d+16>>2]=0}j=e;e=x(u[d+28>>2]*b);j=x(j+e);e=x(x(j+x(e*x(.5)))-i)>=x(0)?i:j;u[d+20>>2]=e;i=m?x(1):x(i-e)>=x(0)?x(e/i):x(1);g:{h:{switch(g-1|0){default:e=i;if(!(f&8)){break g}break;case 0:case 3:break h}}e=x(x(1)-i)}i:{j:{switch(g-2|0){case 0:case 3:break j;default:break i}}e=x(e+e);if(e>x(1)^1){break i}e=x(x(2)-e)}q[l+40>>2]=q[d+48>>2];c=q[d+44>>2];q[l+32>>2]=q[d+40>>2];q[l+36>>2]=c;c=q[d+36>>2];q[l+24>>2]=q[d+32>>2];q[l+28>>2]=c;e=JM(l+24|0,e);j=u[d+8>>2];u[q[d+4>>2]>>2]=j+x(e*x(u[d+12>>2]-j));f=s[d>>1];c=q[a+32>>2];if(f>>>0>=(q[a+36>>2]-c|0)/592>>>0){break a}c=c+w(f,592)|0;q[c+412>>2]=q[c+412>>2]|4194304;if(i>=x(1)^1){break f}if(k>>>0<=2){u[d+20>>2]=u[d+20>>2]-u[d+24>>2];if((g|0)!=5){break f}o[d+68|0]=r[d+68|0]^8;break f}c=r[d+68|0];if(c&2){break f}o[d+68|0]=c|2;c=q[d+40>>2];if(c){Mi[c|0](d+32|0)}c=q[d+56>>2];if(!c){break f}Mi[c|0](a,q[d>>2],1,q[d+60>>2],q[d+64>>2]);break f}u[d+16>>2]=j-b}h=h+1|0;k=q[a+52>>2];c=q[a+48>>2];f=k-c|0;d=(f|0)/72|0;if(h>>>0>>0){continue}break d}break}break a}if(!f){break c}h=0;k:{while(1){m=(k-c|0)/72|0;if(m>>>0>h>>>0){n=w(h,72);g=n+c|0;l:{m:{if(!(u[g+20>>2]>=u[g+24>>2]^1|u[g+16>>2]!=x(0))){f=r[g+68|0];break m}f=r[g+68|0];if(!(f&4)){break l}}n:{if(f&2){break n}p=q[g+56>>2];if(!p){break n}o[g+68|0]=f|2;Mi[p|0](a,q[g>>2],!(f&4),q[g+60>>2],q[g+64>>2]);k=q[a+52>>2];c=q[a+48>>2];m=(k-c|0)/72|0}if(h>>>0>=m>>>0){break a}c=c+n|0;bl(c,c+72|0,(k-c|0)-72|0);c=q[a+48>>2];f=((q[a+52>>2]-c|0)/72|0)-1|0;if(f>>>0>(q[a+56>>2]-c|0)/72>>>0){break k}k=w(f,72)+c|0;q[a+52>>2]=k;d=d-1|0;h=h-1|0}h=h+1|0;if(d>>>0>h>>>0){continue}break b}break}break a}J(202185,201514,506,202204);G()}d=0}q[213516]=q[213516]+d;a=l;q[a+56>>2]=d;q[a+60>>2]=0;q[a+16>>2]=d;q[a+20>>2]=0;q[213538]=q[213538]+t;q[a+48>>2]=t;q[a+52>>2]=0;q[a+8>>2]=t;q[a+12>>2]=0;Ii=a- -64|0;return}J(201665,201514,479,201676);G()}function Zr(a,b,c,d){var e=0,f=0,g=0,h=0;f=Ii-16|0;g=q[c+8>>2];e=q[b+8>>2];a:{b:{if((e|0)<=q[a+8>>2]){h=0;if((e|0)>=(g|0)){break a}e=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=e;e=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e;h=1;if(q[b+8>>2]<=q[a+8>>2]){break a}e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=e;e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;e=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=e;e=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=e;break b}if((e|0)<(g|0)){e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=e;e=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e;h=1;break a}e=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=e;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;e=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=e;e=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=e;e=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=e;e=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=e;h=1;if(q[c+8>>2]<=q[b+8>>2]){break a}e=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=e;e=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;e=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=e;e=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=e}h=2}e=h;if(q[d+8>>2]>q[c+8>>2]){g=q[c+12>>2];q[f+8>>2]=q[c+8>>2];q[f+12>>2]=g;g=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=g;g=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=g;g=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=g;g=q[f+12>>2];q[d+8>>2]=q[f+8>>2];q[d+12>>2]=g;g=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=g;if(q[c+8>>2]<=q[b+8>>2]){return e+1|0}d=q[b+12>>2];q[f+8>>2]=q[b+8>>2];q[f+12>>2]=d;d=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;d=q[f+12>>2];q[c+8>>2]=q[f+8>>2];q[c+12>>2]=d;d=q[f+4>>2];q[c>>2]=q[f>>2];q[c+4>>2]=d;if(q[b+8>>2]<=q[a+8>>2]){return e+2|0}c=q[a+12>>2];q[f+8>>2]=q[a+8>>2];q[f+12>>2]=c;c=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[f+12>>2];q[b+8>>2]=q[f+8>>2];q[b+12>>2]=a;a=q[f+4>>2];q[b>>2]=q[f>>2];q[b+4>>2]=a;e=e+3|0}return e}function Jxa(){var a=0;aya();aza();$ya();MO();pza();Zya();eza();SO();PO();EO();CO();BO();yO();xO();Yya();q[57365]=q[71906];q[71906]=229432;q[57399]=q[71906];q[71906]=229568;q[57467]=q[71906];q[71906]=229840;q[71911]=0;q[71912]=0;q[71907]=0;q[71908]=0;q[71913]=0;q[71914]=0;q[71909]=0;q[71910]=0;q[71912]=-1;q[57499]=q[71906];q[71906]=229968;q[57531]=q[71906];q[71906]=230096;q[57563]=q[71906];q[71906]=230224;q[57599]=q[71906];q[71906]=230368;q[57625]=q[71906];q[71906]=230472;q[57739]=q[71906];q[71906]=230928;Fya();JO();IO();HO();GO();FO();q[57785]=q[71906];q[71906]=231112;q[57823]=q[71906];q[71906]=231264;q[57873]=q[71906];q[71906]=231464;q[57901]=q[71906];q[71906]=231576;q[57935]=q[71906];q[71906]=231712;q[57953]=q[71906];q[71906]=231784;nza();mza();lza();kza();RO();jza();QO();hza();fza();oza();dza();gza();cza();bza();iza();Xya();Vya();Uya();DO();AO();zO();Cya();Bya();Aya();zya();yya();xya();wya();vya();uya();tya();q[58365]=q[71906];q[71906]=233432;q[58381]=q[71906];q[71906]=233496;qza();Wya();Pya();q[59721]=q[71906];q[71906]=238856;q[59737]=q[71906];q[71906]=238920;q[59787]=q[71906];q[71906]=239120;Kya();Iya();q[60637]=q[71906];q[71906]=242520;q[60723]=q[71906];q[71906]=242864;q[60753]=q[71906];q[71906]=242984;q[60775]=q[71906];q[71906]=243072;q[60793]=q[71906];q[71906]=243144;q[60809]=q[71906];q[71906]=243208;q[60883]=q[71906];q[71906]=243504;q[60921]=q[71906];q[71906]=243656;q[61027]=q[71906];q[71906]=244080;pya();Tya();a=q[74920];q[75038]=634;q[75036]=a;o[300160]=1;q[75037]=635;q[74920]=300144;Rya();Sya();_ya();Mya();Hya();q[62393]=q[71906];q[71906]=249544;q[62463]=q[71906];q[71906]=249824;q[62571]=q[71906];q[71906]=250256;q[62639]=q[71906];q[71906]=250528;q[62669]=q[71906];q[71906]=250648;q[62733]=q[71906];q[71906]=250904;q[62809]=q[71906];q[71906]=251208;Gya();Dya();q[79294]=0;q[79295]=0;q[79290]=0;q[79291]=0;q[79296]=0;q[79297]=0;q[79292]=0;q[79293]=0;q[79295]=-1;sya();Oya();q[64043]=q[71906];q[71906]=256144;qya();q[210502]=st(149302);Nya();Jya();q[64859]=q[71906];q[71906]=259408;q[64885]=q[71906];q[71906]=259512;q[64925]=q[71906];q[71906]=259672;q[64953]=q[71906];q[71906]=259784;q[64975]=q[71906];q[71906]=259872;q[65137]=q[71906];q[71906]=260520;q[65159]=q[71906];q[71906]=260608;q[210882]=Oi(152442);q[210883]=Li;Eya();q[213143]=0;q[213144]=Wj();Lya();Qya();OO();rya();q[71103]=q[239666];q[239666]=284372;q[71114]=q[239666];q[239666]=284416;q[71126]=q[239673];q[239673]=284472}function WV(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;e=Ii-128|0;Ii=e;a:{if(!a){f=-27648;break a}if(!b){f=-27648;break a}i=q[b+12>>2];if(!i){f=-27648;break a}f=q[b+16>>2];g=q[b+20>>2];if(f>>>0>>0){f=-27648;break a}l=q[b+24>>2];j=f-g|0;if(l>>>0>j>>>0){f=-27648;break a}f=-28928;k=q[a+80>>2];h=0;b:{if(!k){break b}h=q[k+4>>2]}if(l>>>0>16384){break a}k=b+24|0;p=a+80|0;g=g+i|0;i=j-l|0;n=1;c:{d:{e:{f:{g:{h=h-2|0;switch(h|0){case 5:break f;case 0:break g;default:break e}}if(q[a+76>>2]){break d}}f=-27136;if(t[a+12>>2]>i>>>0){break a}if(q[a+208>>2]<1){f=-27648;break a}Lq(e+80|0,e+76|0,b);f=a+52|0;il(f,e+80|0,q[e+76>>2]);il(f,g,q[b+24>>2]);em(f,e+16|0);bn(f);Ti(q[b+24>>2]+g|0,e+16|0,q[a+12>>2]);f=q[a+12>>2];l=f+q[b+24>>2]|0;q[b+24>>2]=l;i=i-f|0;n=0}f=-27648;h:{switch(h|0){case 4:case 6:case 8:break h;case 0:break d;default:break a}}f=-27136;if(t[a+16>>2]>i>>>0){break a}i=q[a+4>>2];d=q[a+8>>2];c=i-d|0;if(c>>>0>t[b+20>>2]){break a}i=(i|0)!=12;i:{if(!(i|(d|0)!=4)){q[e+16>>2]=q[a+20>>2];Ti(e+16|4,b,c);Ti(g-c|0,b,c);break i}f=-27648;if((d|0)!=12|i){break a}q[e+24>>2]=q[a+28>>2];d=q[a+24>>2];q[e+16>>2]=q[a+20>>2];q[e+20>>2]=d;o[e+20|0]=r[e+20|0]^r[b|0];o[e+21|0]=r[e+21|0]^r[b+1|0];o[e+22|0]=r[e+22|0]^r[b+2|0];o[e+23|0]=r[e+23|0]^r[b+3|0];o[e+24|0]=r[e+24|0]^r[b+4|0];o[e+25|0]=r[e+25|0]^r[b+5|0];o[e+26|0]=r[e+26|0]^r[b+6|0];o[e+27|0]=r[e+27|0]^r[b+7|0]}Lq(e+80|0,e+76|0,b);d=q[b+24>>2];f=GX(p,e+16|0,q[a+4>>2],e+80|0,q[e+76>>2],g,d,g,k,d+g|0,q[a+16>>2]);if(f){break a}a=q[a+16>>2];q[b+20>>2]=q[b+20>>2]-c;q[b+24>>2]=q[b+24>>2]+(a+c|0);f=-27648;if(n){break c}break a}h=1;f=-27136;m=q[a+4>>2];j=(l+1>>>0)%(m>>>0)|0;j=j?m-j|0:0;m=j+1|0;if(m>>>0>i>>>0){break a}o[g+l|0]=j;if(j){while(1){o[(q[k>>2]+h|0)+g|0]=j;h=h+1|0;if(j>>>0>=h>>>0){continue}break}}h=q[k>>2]+m|0;q[k>>2]=h;if(q[a+208>>2]>=2){if(!c){f=-27648;break a}h=q[a+4>>2];if(h>>>0>t[b+20>>2]){break a}f=d;d=a+20|0;f=Mi[c|0](f,d,h)|0;if(f){break a}c=q[a+4>>2];Ti(g-c|0,d,c);h=q[k>>2]}c=a+20|0;f=LE(p,c,q[a+4>>2],g,h,g,e+12|0);if(f){break a}f=-27648;d=q[k>>2];if((d|0)!=q[e+12>>2]){break a}j:{if(q[a+208>>2]<=1){Ti(c,a+120|0,q[a+4>>2]);break j}c=q[a+4>>2];q[b+24>>2]=c+d;q[b+20>>2]=q[b+20>>2]-c;g=g-c|0}if(!n){break c}if(t[a+12>>2]>i-m>>>0){f=-27136;break a}Lq(e+80|0,e+76|0,b);c=a+52|0;il(c,e+80|0,q[e+76>>2]);il(c,g,q[b+24>>2]);em(c,e+16|0);bn(c);Ti(q[b+24>>2]+g|0,e+16|0,q[a+12>>2]);q[b+24>>2]=q[b+24>>2]+q[a+12>>2]}f=0}Ii=e+128|0;return f}function m3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-2688|0;Ii=c;g=q[a+8>>2]-q[a+12>>2]>>4;b=c+260|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+420|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+580|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+740|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+900|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1060|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1220|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1380|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1540|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1700|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+1860|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+2020|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+2180|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+2340|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+2500|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=c+2660|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[c+124>>2]=0;q[c+124>>2]=0;vj(a,q[c+124>>2],0);if(q[c+124>>2]){while(1){vj(a,0,0);b=(c+128|0)+w(f,160)|0;Xi(a,b);Si(a,-2,130490);a:{if(r[b+128|0]&4){q[c+40>>2]=q[b+148>>2];d=q[b+144>>2];q[c+32>>2]=q[b+140>>2];q[c+36>>2]=d;d=q[b+136>>2];q[c+24>>2]=q[b+132>>2];q[c+28>>2]=d;d=b2(c+24|0);if(d){Xi(a,d);Ni(d);break a}e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;Ni(d);break a}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16}Si(a,-2,130495);b:{c:{switch(q[b+132>>2]-1|0){case 0:Xi(a,130503);break b;case 1:Xi(a,130508);break b;default:break c}}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16}Si(a,-2,130513);d:{if(r[b+128|0]&8){d=r[b+152|0];e=r[b+153|0];h=r[b+154|0];i=r[b+155|0];j=r[b+156|0];q[c+20>>2]=r[b+157|0];q[c+16>>2]=j;q[c+12>>2]=i;q[c+8>>2]=h;q[c+4>>2]=e;q[c>>2]=d;sj(c+48|0,64,130520,c);Xi(a,c+48|0);break d}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16}Si(a,-2,130550);d=q[b+128>>2]&1;e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=d;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,130554);b=q[b+128>>2]>>>1&1;d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=b;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,130557);f=f+1|0;nk(a,-2,f);if(t[c+124>>2]>f>>>0){continue}break}}if((g+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(130179,129431,1003,130565);G()}Ii=c+2688|0;return 1}function tra(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0;d=Ii-48|0;Ii=d;q[d+40>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;a:{m=q[b>>2];if(m){e=q[b+12>>2];while(1){b:{c:{d:{e:{f:{g:{h:{i:{j:{p=c<<2;switch(q[p+e>>2]){case 3:break h;case 2:break i;case 1:break j;case 0:break c;case 7:break d;case 6:break e;case 5:break f;case 4:break g;default:break a}}f=f+1|0;break b}h=h+1|0;break b}g=g+1|0;break b}j=j+1|0;break b}k=k+1|0;break b}l=l+1|0;break b}i=i+1|0;n=(hj(q[b+28>>2]+q[p+q[b+8>>2]>>2]|0)+n|0)+1|0;break b}o=o+1|0}c=c+1|0;if(m>>>0>c>>>0){continue}break}q[d+40>>2]=l;q[d+16>>2]=i;q[d+20>>2]=n;q[d+36>>2]=k;q[d+32>>2]=j;q[d+28>>2]=g;q[d+24>>2]=h;q[d+12>>2]=f;q[d+8>>2]=o}p=q[a>>2];if(p){k:{if(m){s=q[a+4>>2];t=q[b+4>>2];e=0;while(1){c=(e<<3)+s|0;u=q[c>>2];v=q[c+4>>2];c=0;l:{while(1){r=(c<<3)+t|0;if((u|0)==q[r>>2]&(v|0)==q[r+4>>2]){break l}c=c+1|0;if((m|0)!=(c|0)){continue}break}m:{n:{o:{p:{q:{r:{s:{t:{c=e<<2;switch(q[c+q[a+12>>2]>>2]){case 0:break m;case 7:break n;case 6:break o;case 5:break p;case 4:break q;case 3:break r;case 2:break s;case 1:break t;default:break a}}f=f+1|0;break l}h=h+1|0;break l}g=g+1|0;break l}j=j+1|0;break l}k=k+1|0;break l}l=l+1|0;break l}i=i+1|0;n=(hj(q[a+28>>2]+q[c+q[a+8>>2]>>2]|0)+n|0)+1|0;break l}o=o+1|0}e=e+1|0;if(p>>>0>e>>>0){continue}break}break k}e=q[a+12>>2];c=0;while(1){u:{v:{w:{x:{y:{z:{A:{B:{C:{m=c<<2;switch(q[m+e>>2]){case 0:break v;case 1:break w;case 2:break x;case 3:break y;case 4:break z;case 5:break A;case 6:break B;case 7:break C;default:break a}}i=i+1|0;n=(hj(q[a+28>>2]+q[m+q[a+8>>2]>>2]|0)+n|0)+1|0;break u}l=l+1|0;break u}k=k+1|0;break u}j=j+1|0;break u}g=g+1|0;break u}h=h+1|0;break u}f=f+1|0;break u}o=o+1|0}c=c+1|0;if(p>>>0>c>>>0){continue}break}}q[d+40>>2]=l;q[d+16>>2]=i;q[d+20>>2]=n;q[d+36>>2]=k;q[d+32>>2]=j;q[d+28>>2]=g;q[d+24>>2]=h;q[d+12>>2]=f;q[d+8>>2]=o}g=Fw(d+8|0);c=0;D:{if(!q[b>>2]){f=0;break D}while(1){bM(g,b,c);c=c+1|0;f=q[b>>2];if(c>>>0>>0){continue}break}}E:{h=q[a>>2];if(!h){break E}e=0;while(1){F:{if(f){c=q[a+4>>2]+(e<<3)|0;j=q[c>>2];k=q[c+4>>2];l=q[b+4>>2];c=0;while(1){i=l+(c<<3)|0;if((j|0)==q[i>>2]&(k|0)==q[i+4>>2]){break F}c=c+1|0;if((f|0)!=(c|0)){continue}break}}bM(g,a,e);h=q[a>>2]}e=e+1|0;if(h>>>0<=e>>>0){break E}f=q[b>>2];continue}}a=q[g>>2];Ni(g);Ii=d+48|0;return a}J(13883,13768,386,14063);G()}function BF(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,r=0,s=0,t=0,v=x(0);j=(c<<1&-4)+7&-8;i=q[a+8>>2];r=c&-4;l=((b<<2)+a|0)+1080|0;h=q[a+92>>2];a:{if(h){e=q[a+100>>2];d=e+j|0;g=0;if((d|0)>q[a+104>>2]){break a}q[a+100>>2]=d;g=e+h|0;break a}g=0;if(!j){break a}g=Yi(j)}q[l>>2]=g;n=i+(j<<1)|0;l=((b<<2)+a|0)+1088|0;i=q[a+92>>2];b:{if(i){h=q[a+100>>2];d=h+j|0;e=0;if((d|0)>q[a+104>>2]){break b}q[a+100>>2]=d;e=h+i|0;break b}e=0;if(!j){break b}e=Yi(j)}q[l>>2]=e;h=r+7&-8;r=h+n|0;q[a+8>>2]=r;n=((b<<2)+a|0)+1096|0;l=q[a+92>>2];c:{if(l){i=q[a+100>>2];h=i+h|0;d=0;if((h|0)>q[a+104>>2]){break c}q[a+100>>2]=h;d=i+l|0;break c}d=0;if(!h){break c}d=Yi(h)}q[n>>2]=d;if(!(e?!(!g|!d):0)){q[a+112>>2]=3;return 0}s=c>>2;d:{if((c|0)<4){break d}n=(s|0)>1?s:1;t=+(c|0);while(1){l=f<<2;k=+(m<<2)*3.141592653589793/t;u[g+l>>2]=Pw(k);i=f|1;h=i<<2;u[g+h>>2]=-x(Mq(k));k=+(i|0)*3.141592653589793/t*.5;u[e+l>>2]=x(Pw(k))*x(.5);u[e+h>>2]=x(Mq(k))*x(.5);f=f+2|0;m=m+1|0;if((n|0)!=(m|0)){continue}break}if((c|0)<8){break d}e=c>>3;g=(e|0)>1?e:1;f=0;m=0;while(1){e=f|1;k=+(e<<1)*3.141592653589793/t;u[d+(f<<2)>>2]=Pw(k);u[d+(e<<2)>>2]=-x(Mq(k));f=f+2|0;m=m+1|0;if((g|0)!=(m|0)){continue}break}}i=j+r|0;q[a+8>>2]=i;e:{f:{g:{h:{f=((b<<2)+a|0)+1104|0;g=q[a+92>>2];i:{if(g){e=q[a+100>>2];d=e+j|0;if((d|0)>q[a+104>>2]){break h}q[a+100>>2]=d;d=e+g|0;break i}if(!j){break h}d=Yi(j)}q[f>>2]=d;if(!d){break e}if((c|0)>=2){g=c>>1;e=(g|0)>1?g:1;k=+(g|0);f=0;while(1){v=x(Mq((+(f|0)+.5)/k*.5*3.141592653589793));u[d+(f<<2)>>2]=Mq(+x(v*v)*1.5707963267948966);f=f+1|0;if((e|0)!=(f|0)){continue}break}}d=(s&-2)+7&-8;q[a+8>>2]=d+i;f=((b<<2)+a|0)+1112|0;g=q[a+92>>2];j:{if(g){e=q[a+100>>2];d=e+d|0;if((d|0)>q[a+104>>2]){break g}q[a+100>>2]=d;b=e+g|0;break j}if(!d){break g}b=Yi(d)}q[f>>2]=b;if(!b){break f}k:{if((c|0)<0){break k}a=c;e=a;l:{m:{n:{o:{if((a|0)<=16383){if((c|0)<16){break o}d=(c|0)<512?5:10;break m}if((c|0)>16777215){break n}d=(c|0)<524288?15:20;break m}if((c|0)<=7){break k}d=o[c+211872|0];break l}d=(c|0)<536870912?25:30}d=o[(e>>>d|0)+211872|0]+d|0}a=c>>>3|0;e=a>>>0>1?a:1;d=36-d|0;f=0;while(1){c=f<<1;a=f>>>1&357913941|c&-1431655766;a=a>>>2&590558003|a<<2&-858993460;a=a>>>4&235867919|a<<4&-252645136;p[b+c>>1]=Fza(a>>>8&16646399|a<<8&-16711936,16)>>>d<<2;f=f+1|0;if((e|0)!=(f|0)){continue}break}}return 1}q[((b<<2)+a|0)+1104>>2]=0;break e}q[((b<<2)+a|0)+1112>>2]=0}q[a+112>>2]=3;return 0}q[a+112>>2]=3;return 0}function D5(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0;k=Ii-16|0;Ii=k;a:{b:{c:{d:{g=q[a+8>>2];e:{if((g|0)==q[a+4>>2]){q[k>>2]=g-q[a>>2]>>2;Pi(4,152453,152457,k);b=2;break e}d=Ui($i(192),0,192);h=s9(a);q[d+64>>2]=h;i=q[a+16>>2];if(h>>>0>=q[a+20>>2]-i>>3>>>0){break c}g=q[a>>2];m=q[a+4>>2]-g>>2;a=q[i+(h<<3)>>2];if(m>>>0<=a>>>0){break c}q[g+(a<<2)>>2]=d;n=q[b>>2];s=q[b+4>>2];q[d+88>>2]=q[b+36>>2];q[d+92>>2]=q[b+40>>2];q[d+96>>2]=q[b+44>>2];q[d+100>>2]=q[b+48>>2];q[d+104>>2]=q[b+52>>2];q[d+108>>2]=q[b+56>>2];q[d+68>>2]=q[b+16>>2];q[d+72>>2]=q[b+20>>2];j=q[b+24>>2];q[d+76>>2]=j;l=q[b+28>>2];q[d+80>>2]=l;q[d+84>>2]=q[b+32>>2];e=r[d+186|0];f=e|4;o[d+186|0]=f;m=d;h=q[l+4>>2];f:{if(h){g=q[l>>2];a=0;while(1){i=g+(a<<6)|0;if(q[i+48>>2]==(n|0)&q[i+52>>2]==(s|0)){q[d+168>>2]=n;q[d+172>>2]=s;q[d+160>>2]=g+(a<<6);a=e|12;break f}a=a+1|0;if((h|0)!=(a|0)){continue}break}}q[d+168>>2]=0;q[d+172>>2]=0;q[d+160>>2]=0;a=f&247}o[m+186|0]=a;a=q[l+24>>2];g:{if(!j){p[d+184>>1]=a;break g}h=q[j+4>>2];p[d+184>>1]=a>>>0>h>>>0?a:h;if(o[d+124|0]&1){break b}Wi(h,176,d+112|0,d+120|0,d+116|0);g=q[d+112>>2];if(h>>>0>(q[d+120>>2]-g|0)/176>>>0){break a}q[d+116>>2]=g+w(h,176);if(h){a=q[j+4>>2];i=0;while(1){if((a|0)==(i|0)){break d}e=g+w(i,176)|0;f=q[j>>2]+w(i,192)|0;u[e+164>>2]=u[f+176>>2];q[e+160>>2]=q[f>>2];u[e>>2]=u[f+32>>2];u[e+4>>2]=u[f+36>>2];u[e+8>>2]=u[f+40>>2];u[e+12>>2]=u[f+44>>2];u[e+16>>2]=u[f+48>>2];u[e+20>>2]=u[f+52>>2];u[e+24>>2]=u[f+56>>2];u[e+32>>2]=u[f- -64>>2];u[e+36>>2]=u[f+68>>2];u[e+40>>2]=u[f+72>>2];u[e+48>>2]=u[f+80>>2];u[e+52>>2]=u[f+84>>2];u[e+56>>2]=u[f+88>>2];u[e+60>>2]=u[f+92>>2];u[e- -64>>2]=u[f+96>>2];u[e+68>>2]=u[f+100>>2];u[e+72>>2]=u[f+104>>2];u[e+80>>2]=u[f+112>>2];u[e+84>>2]=u[f+116>>2];u[e+88>>2]=u[f+120>>2];i=i+1|0;if((h|0)!=(i|0)){continue}break}}if(o[d+156|0]&1){break b}Wi(q[j+12>>2],48,d+144|0,d+152|0,d+148|0);a=q[j+12>>2];g=q[d+144>>2];if(a>>>0>(q[d+152>>2]-g|0)/48>>>0){break a}a=w(a,48);q[d+148>>2]=a+g;Ui(g,0,a);if(o[d+140|0]&1){break b}Wi(q[j+12>>2],8,d+128|0,d+136|0,d+132|0);a=q[j+12>>2];g=q[d+128>>2];if(a>>>0>q[d+136>>2]-g>>3>>>0){break a}q[d+132>>2]=g+(a<<3)}g=q[b+8>>2];a=q[b+12>>2];if((g|0)!=q[210882]|(a|0)!=q[210883]){_G(d,g,a,4,x(0),x(0),x(1))}if(r[b+60|0]){aH(d,x(0))}q[c>>2]=d;b=0}Ii=k+16|0;return b}J(152522,152534,68,152554);G()}J(152576,152587,479,152554);G()}J(152643,152587,493,152718);G()}J(152730,152587,506,152749);G()}function rC(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-48|0;Ii=g;Oza(+a);d=Lza(1)|0;f=Lza(0)|0;a:{b:{e=d;d=e;h=e&2147483647;c:{if(h>>>0<=1074752122){if((d&1048575)==598523){break c}if(h>>>0<=1073928572){if((e|0)>0?1:(e|0)>=0){a=a+ -1.5707963267341256;c=a+ -6.077100506506192e-11;v[b>>3]=c;v[b+8>>3]=a-c+ -6.077100506506192e-11;d=1;break a}a=a+1.5707963267341256;c=a+6.077100506506192e-11;v[b>>3]=c;v[b+8>>3]=a-c+6.077100506506192e-11;d=-1;break a}if((e|0)>0?1:(e|0)>=0){a=a+ -3.1415926534682512;c=a+ -1.2154201013012384e-10;v[b>>3]=c;v[b+8>>3]=a-c+ -1.2154201013012384e-10;d=2;break a}a=a+3.1415926534682512;c=a+1.2154201013012384e-10;v[b>>3]=c;v[b+8>>3]=a-c+1.2154201013012384e-10;d=-2;break a}if(h>>>0<=1075594811){if(h>>>0<=1075183036){if((h|0)==1074977148){break c}if((e|0)>0?1:(e|0)>=0){a=a+ -4.712388980202377;c=a+ -1.8231301519518578e-10;v[b>>3]=c;v[b+8>>3]=a-c+ -1.8231301519518578e-10;d=3;break a}a=a+4.712388980202377;c=a+1.8231301519518578e-10;v[b>>3]=c;v[b+8>>3]=a-c+1.8231301519518578e-10;d=-3;break a}if((h|0)==1075388923){break c}if((e|0)>0?1:(e|0)>=0){a=a+ -6.2831853069365025;c=a+ -2.430840202602477e-10;v[b>>3]=c;v[b+8>>3]=a-c+ -2.430840202602477e-10;d=4;break a}a=a+6.2831853069365025;c=a+2.430840202602477e-10;v[b>>3]=c;v[b+8>>3]=a-c+2.430840202602477e-10;d=-4;break a}if(h>>>0>1094263290){break b}}j=a*.6366197723675814+6755399441055744+ -6755399441055744;c=a+j*-1.5707963267341256;i=j*6.077100506506192e-11;a=c-i;v[b>>3]=a;Oza(+a);d=Lza(1)|0;Lza(0)|0;e=h>>>20|0;f=(e-(d>>>20&2047)|0)<17;if(y(j)<2147483648){d=~~j}else{d=-2147483648}d:{if(f){break d}i=c;a=j*6.077100506303966e-11;c=c-a;i=j*2.0222662487959506e-21-(i-c-a);a=c-i;v[b>>3]=a;f=e;Oza(+a);e=Lza(1)|0;Lza(0)|0;if((f-(e>>>20&2047)|0)<50){break d}i=c;a=j*2.0222662487111665e-21;c=c-a;i=j*8.4784276603689e-32-(i-c-a);a=c-i;v[b>>3]=a}v[b+8>>3]=c-a-i;break a}if(h>>>0>=2146435072){a=a-a;v[b>>3]=a;v[b+8>>3]=a;d=0;break a}Mza(0,f|0);Mza(1,e&1048575|1096810496);a=+Nza();d=0;f=1;while(1){k=(g+16|0)+(d<<3)|0;if(y(a)<2147483648){d=~~a}else{d=-2147483648}c=+(d|0);v[k>>3]=c;a=(a-c)*16777216;d=1;k=f&1;f=0;if(k){continue}break}v[g+32>>3]=a;e:{if(a!=0){d=2;break e}f=1;while(1){d=f;f=d-1|0;if(v[(g+16|0)+(d<<3)>>3]==0){continue}break}}d=iO(g+16|0,g,(h>>>20|0)-1046|0,d+1|0,1);a=v[g>>3];if((e|0)<-1?1:(e|0)<=-1){v[b>>3]=-a;v[b+8>>3]=-v[g+8>>3];d=0-d|0;break a}v[b>>3]=a;v[b+8>>3]=v[g+8>>3]}Ii=g+48|0;return d}function Dba(a,b){u[a>>2]=u[b>>2];u[a+4>>2]=u[b+4>>2];u[a+8>>2]=u[b+8>>2];u[a+12>>2]=u[b+12>>2];u[a+16>>2]=u[b+16>>2];u[a+20>>2]=u[b+20>>2];u[a+24>>2]=u[b+24>>2];u[a+28>>2]=u[b+28>>2];u[a+32>>2]=u[b+32>>2];u[a+36>>2]=u[b+36>>2];u[a+40>>2]=u[b+40>>2];u[a+44>>2]=u[b+44>>2];u[a+48>>2]=u[b+48>>2];u[a+52>>2]=u[b+52>>2];u[a+56>>2]=u[b+56>>2];u[a+60>>2]=u[b+60>>2];u[a+64>>2]=u[b+64>>2];u[a+68>>2]=u[b+68>>2];u[a+72>>2]=u[b+72>>2];u[a+76>>2]=u[b+76>>2];u[a+80>>2]=u[b+80>>2];u[a+84>>2]=u[b+84>>2];u[a+88>>2]=u[b+88>>2];u[a+92>>2]=u[b+92>>2];u[a+96>>2]=u[b+96>>2];u[a+100>>2]=u[b+100>>2];u[a+104>>2]=u[b+104>>2];u[a+108>>2]=u[b+108>>2];u[a+112>>2]=u[b+112>>2];u[a+116>>2]=u[b+116>>2];u[a+120>>2]=u[b+120>>2];u[a+124>>2]=u[b+124>>2];u[a+128>>2]=u[b+128>>2];u[a+132>>2]=u[b+132>>2];u[a+136>>2]=u[b+136>>2];u[a+140>>2]=u[b+140>>2];u[a+144>>2]=u[b+144>>2];u[a+148>>2]=u[b+148>>2];u[a+152>>2]=u[b+152>>2];u[a+156>>2]=u[b+156>>2];u[a+160>>2]=u[b+160>>2];u[a+164>>2]=u[b+164>>2];u[a+168>>2]=u[b+168>>2];u[a+172>>2]=u[b+172>>2];u[a+176>>2]=u[b+176>>2];u[a+180>>2]=u[b+180>>2];u[a+184>>2]=u[b+184>>2];u[a+188>>2]=u[b+188>>2];u[a+192>>2]=u[b+192>>2];u[a+196>>2]=u[b+196>>2];u[a+200>>2]=u[b+200>>2];u[a+204>>2]=u[b+204>>2];u[a+208>>2]=u[b+208>>2];u[a+212>>2]=u[b+212>>2];u[a+216>>2]=u[b+216>>2];u[a+220>>2]=u[b+220>>2];u[a+224>>2]=u[b+224>>2];u[a+228>>2]=u[b+228>>2];u[a+232>>2]=u[b+232>>2];u[a+236>>2]=u[b+236>>2];u[a+240>>2]=u[b+240>>2];u[a+244>>2]=u[b+244>>2];u[a+248>>2]=u[b+248>>2];u[a+252>>2]=u[b+252>>2];u[a+256>>2]=u[b+256>>2];u[a+260>>2]=u[b+260>>2];u[a+264>>2]=u[b+264>>2];u[a+268>>2]=u[b+268>>2];u[a+272>>2]=u[b+272>>2];u[a+276>>2]=u[b+276>>2];u[a+280>>2]=u[b+280>>2];u[a+284>>2]=u[b+284>>2];u[a+288>>2]=u[b+288>>2];u[a+292>>2]=u[b+292>>2];u[a+296>>2]=u[b+296>>2];u[a+300>>2]=u[b+300>>2];u[a+304>>2]=u[b+304>>2];u[a+308>>2]=u[b+308>>2];u[a+312>>2]=u[b+312>>2];u[a+316>>2]=u[b+316>>2];u[a+320>>2]=u[b+320>>2];u[a+324>>2]=u[b+324>>2];u[a+328>>2]=u[b+328>>2];u[a+332>>2]=u[b+332>>2];u[a+336>>2]=u[b+336>>2];u[a+340>>2]=u[b+340>>2];u[a+344>>2]=u[b+344>>2];u[a+348>>2]=u[b+348>>2];u[a+352>>2]=u[b+352>>2];u[a+356>>2]=u[b+356>>2];u[a+360>>2]=u[b+360>>2];u[a+364>>2]=u[b+364>>2];u[a+368>>2]=u[b+368>>2];u[a+372>>2]=u[b+372>>2];u[a+376>>2]=u[b+376>>2];u[a+380>>2]=u[b+380>>2];u[a+384>>2]=u[b+384>>2];u[a+388>>2]=u[b+388>>2];u[a+392>>2]=u[b+392>>2];u[a+396>>2]=u[b+396>>2];Ti(a+400|0,b+400|0,152)}function fna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=x(0),h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=0,r=0,v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0),I=x(0),K=x(0),L=0,M=0,N=x(0),O=x(0);b=Ii-48|0;Ii=b;g=u[q[a+4>>2]+4>>2];f=q[a+8>>2];q[f+108>>2]=0;u[f+116>>2]=g;a:{b:{d=q[f>>2];h=q[f+4>>2];c=(d|0)==(h|0);if(c){break b}e=h-d|0;r=(e|0)/40|0;h=q[f+84>>2];if(!e){iA(h,g);break b}if(!c){M=r>>>0>1?r:1;while(1){d=w(m,40)+d|0;n=q[d>>2];c:{if(!n){break c}L=q[d+28>>2];c=q[f+48>>2];if(L>>>0>=(q[f+52>>2]-c|0)/48>>>0){break a}c=w(L,48)+c|0;v=u[c+24>>2];y=u[c+20>>2];z=u[c+28>>2];A=u[c+16>>2];i=u[c>>2];j=u[c+4>>2];k=u[c+8>>2];Aw(b,n);N=u[b+16>>2];O=u[b+20>>2];n=q[d+16>>2];g=u[b+8>>2];D=u[b+32>>2];l=x(i*D);i=u[b+12>>2];E=u[b+36>>2];B=x(j*E);j=u[b>>2];F=u[b+40>>2];C=x(k*F);H=x(x(x(g*l)+x(i*B))-x(j*C));k=u[b+4>>2];I=x(x(g*C)+x(x(j*l)+x(k*B)));K=x(x(x(j*B)+x(i*C))-x(k*l));l=x(x(x(i*l)+x(k*C))-x(g*B));u[b+8>>2]=u[b+24>>2]+x(x(j*H)+x(x(x(g*I)+x(i*K))-x(k*l)));u[b+4>>2]=O+x(x(g*l)+x(x(x(i*H)+x(k*I))-x(j*K)));u[b>>2]=N+x(x(k*K)+x(x(x(j*I)+x(i*l))-x(g*H)));Kv(h,n,b);n=q[d+16>>2];u[b+12>>2]=x(x(x(z*i)-x(A*j))-x(y*k))-x(v*g);u[b+8>>2]=x(x(y*j)+x(x(z*g)+x(v*i)))-x(A*k);u[b+4>>2]=x(x(A*g)+x(x(z*k)+x(y*i)))-x(v*j);u[b>>2]=x(x(v*k)+x(x(z*j)+x(A*i)))-x(y*g);Jv(h,n,b);g=D>2],g>F?F:g);$H(h,q[d+16>>2],(q[q[d>>2]+136>>2]&512)>>>9|0);if(!(o[c+36|0]&1)|o[d+32|0]&1){break c}lA(h,q[d+16>>2]);p[d+32>>1]=s[d+32>>1]|1}m=m+1|0;if((M|0)==(m|0)){m=q[a+12>>2];iA(h,u[q[a+4>>2]+4>>2]);if(!e){break b}d=0;d:{e:{while(1){a=q[f>>2];if((q[f+4>>2]-a|0)/40>>>0<=d>>>0){break a}f:{g:{c=w(d,40);a=c+a|0;if(q[a>>2]?!(o[a+32|0]&1):0){break g}if(!dI(h,q[a+16>>2])){break g}e=q[a+20>>2];q[f+112>>2]=q[f+112>>2]-((q[e+4>>2]-q[e>>2]|0)/18568|0);cj(q[m>>2],q[a+20>>2]);nt(h,q[a+16>>2]);e=q[f+4>>2];a=q[f>>2];if((e-a|0)/40>>>0<=d>>>0){break e}a=a+c|0;c=e-40|0;e=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=e;e=q[c+36>>2];q[a+32>>2]=q[c+32>>2];q[a+36>>2]=e;e=q[c+28>>2];q[a+24>>2]=q[c+24>>2];q[a+28>>2]=e;e=q[c+20>>2];q[a+16>>2]=q[c+16>>2];q[a+20>>2]=e;e=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=e;a=q[f+4>>2]-40|0;q[f+4>>2]=a;if(a>>>0>2]){break d}r=r-1|0;break f}d=d+1|0}if(d>>>0>>0){continue}break}break b}J(47729,47132,513,47744);G()}J(47754,47132,516,47744);G()}d=q[f>>2];if((q[f+4>>2]-d|0)/40>>>0>m>>>0){continue}break}}break a}Ii=b+48|0;return 0}J(47406,47132,479,47417);G()}function _A(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,t=0,u=0,v=0,x=0,y=0,z=0;v=Ii-16|0;Ii=v;a:{b:{c:{if((b|0)!=65535){l=e+8|0;i=e+4|0;while(1){p=q[a+32>>2];g=(q[a+36>>2]-p|0)/592|0;b=b&65535;if(g>>>0<=b>>>0){break c}y=w(b,592);m=y+p|0;k=q[m+412>>2];d:{if(!(k&1048576)){break d}j=p+y|0;n=s[j+568>>1];t=s[j+570>>1];f=m;x=q[j+496>>2];u=q[j+500>>2];e:{if((x|0)!=q[213710]|(u|0)!=q[213711]){break e}while(1){h=s[f+576>>1];if((h|0)==65535){break e}if(h>>>0>=g>>>0){break c}f=w(h,592)+p|0;if((x|0)==q[f+496>>2]&(u|0)==q[f+500>>2]){continue}break}}n=t|n<<16;h=s[f+504>>1];f:{g=s[j+586>>1];if((g|0)==65535){break f}f=q[d>>2];if(g>>>0>=(q[d+4>>2]-f|0)/24>>>0){break c}f=f+w(g,24)|0;if(s[f+20>>1]!=(b|0)){break f}g=_A(a,s[j+578>>1],c+2&65535,d,e);k=h<<24;j=k|c+1&65535;b=h>>>8|0;h=b;t=b;q[f+8>>2]=j;q[f+12>>2]=b;b=q[e+4>>2];f=q[e+8>>2];if((b|0)==(f|0)){if(o[e+12|0]&1){break b}Wi((b-q[e>>2]>>4)+16|0,16,e,l,i);f=q[e+8>>2];b=q[e+4>>2]}if((b|0)==(f|0)){break a}q[i>>2]=b+16;q[b+12>>2]=0;q[b+8>>2]=n;q[b>>2]=c&65535|k;q[b+4>>2]=h;if(!(r[m+415|0]&4)){c=g;break d}b=q[i>>2];f=q[l>>2];if((b|0)==(f|0)){if(o[e+12|0]&1){break b}Wi((b-q[e>>2]>>4)+16|0,16,e,l,i);f=q[e+8>>2];b=q[e+4>>2]}if((b|0)==(f|0)){break a}q[i>>2]=b+16;q[b+12>>2]=0;q[b+8>>2]=n;q[b>>2]=j;q[b+4>>2]=t;c=g;break d}g:{if((k&240)==80){f=q[a+264>>2];b=q[a+260>>2];g=f-b|0;if(!g){break g}g=(g|0)/12|0;if((b|0)!=(f|0)){t=g>>>0>1?g:1;g=h>>>8|0;x=h<<24;h=0;while(1){m=w(h,12)+b|0;h:{if((n|0)!=q[m+8>>2]){break h}f=0;u=i9(q[a+224>>2],q[m>>2]);if(!u){break h}while(1){eI(q[a+224>>2],q[m>>2],f,v+12|0);z=q[v+12>>2];if(z){b=q[i>>2];k=q[l>>2];if((b|0)==(k|0)){if(o[e+12|0]&1){break b}Wi((b-q[e>>2]>>4)+16|0,16,e,l,i);k=q[e+8>>2];b=q[e+4>>2]}if((b|0)==(k|0)){break a}q[i>>2]=b+16;q[b+12>>2]=z;q[b+8>>2]=n;q[b>>2]=c&65535|x;q[b+4>>2]=g;c=c+1|0}f=f+1|0;if((u|0)!=(f|0)){continue}break}}h=h+1|0;if((t|0)==(h|0)){break g}b=q[a+260>>2];if((q[a+264>>2]-b|0)/12>>>0>h>>>0){continue}break}}break c}b=q[i>>2];f=q[l>>2];if((b|0)==(f|0)){if(o[e+12|0]&1){break b}Wi((b-q[e>>2]>>4)+16|0,16,e,l,i);f=q[e+8>>2];b=q[e+4>>2]}if((b|0)==(f|0)){break a}g=c;c=g+1|0;q[i>>2]=b+16;q[b+12>>2]=0;q[b+8>>2]=n;q[b>>2]=g&65535|h<<24;q[b+4>>2]=h>>>8}c=_A(a,s[j+578>>1],c&65535,d,e)}b=s[(p+y|0)+574>>1];if((b|0)!=65535){continue}break}}Ii=v+16|0;return c&65535}J(201665,201514,479,201676);G()}J(202045,201514,493,201251);G()}J(201636,201514,533,201660);G()}function Vv(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,p=0,t=x(0),v=0,z=0,A=x(0);m=Ii-32|0;Ii=m;a:{b:{c:{d:{k=b&65535;l=q[a+32>>2];if(k>>>0<(q[a+36>>2]-l|0)/592>>>0){n=b>>>16|0;if((n|0)!=s[(w(k,592)+l|0)+568>>1]){break d}j=w(k,592)+l|0;if(s[j+570>>1]!=(b&65535)){break c}q[j+464>>2]=0;q[j+468>>2]=0;q[j+472>>2]=0;e:{if(!(c|d)){Pi(4,199633,200858,0);a=-7;break e}z=w(k,592)+l|0;if(q[z+436>>2]!=2){Pi(4,199633,200910,0);a=-7;break e}v=j+472|0;q[j+464>>2]=c;q[j+468>>2]=d;f:{j=q[a+432>>2];g:{if(!j){Pi(4,199633,201957,0);j=-2;break g}p=w(k,592)+l|0;j=Mi[j|0](q[p+432>>2],c,d,p+440|0)|0;if(!j){break f}}g=q[a+32>>2];if((q[a+36>>2]-g|0)/592>>>0<=k>>>0){break b}if((n|0)!=s[(g+w(k,592)|0)+568>>1]){break a}g=q[a+48>>2];h=q[a+52>>2]-g|0;a=(h|0)/72|0;h:{if(!h){break h}h=a>>>0>1?a:1;a=0;while(1){i=g+w(a,72)|0;if(!(q[i+4>>2]==(v|0)?q[i>>2]==(b|0):0)){a=a+1|0;if((h|0)!=(a|0)){continue}break h}break}a=g+w(a,72)|0;o[a+68|0]=r[a+68|0]|4}a=w(k,592)+l|0;q[a+440>>2]=0;q[a+444>>2]=0;q[a+464>>2]=0;q[a+468>>2]=0;q[a+456>>2]=0;q[a+460>>2]=0;q[a+448>>2]=0;q[a+452>>2]=0;a=aj(c,d);if((j|0)==-1){q[m>>2]=a;Pi(3,199633,200974,m);a=-5;break e}q[m+20>>2]=j;q[m+16>>2]=a;Pi(3,199633,201013,m+16|0);a=-5;break e}i:{if((q[p+440>>2]&1006632960)==402653184){c=q[a+32>>2];if((q[a+36>>2]-c|0)/592>>>0<=k>>>0){break b}if((n|0)!=s[(c+w(k,592)|0)+568>>1]){break a}c=q[a+48>>2];j=q[a+52>>2]-c|0;d=(j|0)/72|0;j:{if(!j){break j}d=d>>>0>1?d:1;j=0;while(1){n=c+w(j,72)|0;if(!(q[n+4>>2]==(v|0)?q[n>>2]==(b|0):0)){j=j+1|0;if((d|0)!=(j|0)){continue}break j}break}c=c+w(j,72)|0;o[c+68|0]=r[c+68|0]|4}if(!g){break i}Mi[g|0](a,b,1,h,i);break i}aB(a,b,e,f,g,h,i)}a=0;b=q[(w(k,592)+l|0)+412>>2];if(!(b&262144)|(b>>>4&15)-5>>>0<2|q[z+436>>2]!=2){break e}g=q[(w(k,592)+l|0)+452>>2];if(!g){break e}a=q[p+440>>2];c=a&8191;d=(a>>>13&8191)-c|0;e=x(u[v>>2]*x(d|0));k:{if(x(y(e))>2];l:{f=u[b>>2];t=u[b+8>>2];if(f==t){break l}A=u[b+20>>2];if(e==A){break l}c=w(k,592)+l|0;u[c+64>>2]=x(u[b+4>>2]-A)*x(s[c+446>>1]);u[c+68>>2]=x(t-f)*x(s[c+444>>1]);break e}t=u[b+4>>2];c=w(k,592)+l|0;u[c+64>>2]=x(u[b+16>>2]-f)*x(s[c+444>>1]);u[c+68>>2]=x(e-t)*x(s[c+446>>1])}Ii=m+32|0;return a}break b}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}J(199518,199542,3728,201902);G()}function Do(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0;g=Ii-1584|0;Ii=g;f=-4;a:{if((Jj(d,0)|0)<1){break a}h=q[q[d+8>>2]>>2];if(!(h&1)){break a}if((Jj(c,0)|0)<0){break a}mU(g+1580|0,h);h=g+1568|0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;h=g+1552|0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;Ui(g+16|0,0,1536);h=Ql(c);i=6;b:{if(h>>>0>671){break b}i=5;if(h>>>0>239){break b}i=4;if(h>>>0>79){break b}i=h>>>0>23?3:1}h=q[d+4>>2]+1|0;f=rl(a,h);c:{if(f){break c}m=g+16|12;f=rl(m,h);if(f){break c}f=rl(g+1552|0,h<<1);if(f){break c}r=q[b>>2];if((r|0)==-1){f=wk(g,b);if(f){break c}q[g>>2]=1;b=g}d:{e:{if(!(q[e+8>>2]?e:0)){f=Bk(g+1568|0,1);if(f){break c}f=on(g+1568|0,q[d+4>>2]<<6);if(f){break c}f=gl(g+1568|0,g+1568|0,d);if(f){break c}if(!e){break d}f=g+1568|0;h=e;break e}f=e;h=g+1568|0}j=q[f+4>>2];q[h>>2]=q[f>>2];q[h+4>>2]=j;q[h+8>>2]=q[f+8>>2]}f:{if((_j(b,d)|0)>=0){f=gl(m,b,d);if(!f){break f}break c}f=wk(m,b);if(f){break c}}k=q[g+1580>>2];f=Bo(m,g+1568|0,d,k,g+1552|0);if(f){break c}f=wk(a,g+1568|0);if(f){break c}f=WD(a,d,k,g+1552|0);if(f){break c}g:{if(i>>>0<2){break g}l=i-1|0;j=1<>2]+1|0);if(f){break c}f=wk(b,m);if(f){break c}h=0;while(1){f=Bo(b,b,d,k,g+1552|0);if(f){break c}h=h+1|0;if((l|0)!=(h|0)){continue}break}while(1){b=j+1|0;if(b>>>i|0){break g}h=(g+16|0)+w(b,12)|0;f=rl(h,q[d+4>>2]+1|0);if(f){break c}f=wk(h,(g+16|0)+w(j,12)|0);if(f){break c}j=b;f=Bo(h,m,d,k,g+1552|0);if(!f){continue}break}break c}p=q[c+4>>2];l=0;b=0;h=0;while(1){if(!b){if(!p){if(n){h=1<>2]|!(o[q[c+8>>2]]&1)){break c}q[a>>2]=-1;f=Rl(a,d,a);break c}p=p-1|0;b=32}f=h;h=0;b=b-1|0;j=q[q[c+8>>2]+(p<<2)>>2]>>>b&1;if(!(j|f)){continue}if(!(j|(f|0)!=1)){h=1;f=Bo(a,a,d,k,g+1552|0);if(!f){continue}break c}n=n+1|0;l=j<>>i|0)){while(1){ij((g+16|0)+w(d,12)|0);d=d+1|0;if(!(d>>>i|0)){continue}break}}ij(g+16|12);ij(g+1552|0);ij(g);if(q[e+8>>2]?e:0){break a}ij(g+1568|0)}Ii=g+1584|0;return f}function vO(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f:{g:{if(r[852468]!=(a|0)){g=q[213116];Gj(g);o[852468]=a;h:{if(a){if(q[213122]-q[213120]>>4>>>0<=511){Tv(852472,1024,512)}Ui(q[213118],255,q[213119]<<2);q[213123]=-1;q[213124]=0;q[213121]=q[213120];if((q[213130]-q[213128]|0)/24>>>0<=511){Sv(852504,1024,512)}Ui(q[213126],255,q[213127]<<2);q[213131]=-1;q[213132]=0;q[213129]=q[213128];if(o[852548]&1){break g}Wi(512,8,852536,852544,852540);a=q[213134];if(q[213136]-a>>3>>>0<=511){break f}q[213135]=a+4096;a=q[213139];if(a>>>0>=513){break e}b=q[213138];c=Yi(2048);q[213138]=c;c=Ti(c,b,a<<2);q[213139]=512;if((a|0)!=512){while(1){q[c+(a<<2)>>2]=a;a=a+1|0;if((a|0)!=512){continue}break}}Ni(b);a=0;q[213140]=0;b=q[213138];i:{if(q[213139]){while(1){q[b+(a<<2)>>2]=a;a=a+1|0;c=q[213139];if(a>>>0>>0){continue}break}a=q[213140];if(a>>>0>>0){break i}break a}if(b){break a}J(165646,165621,151,165653);G()}q[213140]=a+1;if(!q[b+(a<<2)>>2]){break h}J(165412,165430,94,165451);G()}a=q[213119];if(a){b=a;while(1){a=q[q[213118]+(d<<2)>>2];if((a|0)!=-1){while(1){a=q[213120]+(a<<4)|0;Ni(q[a+4>>2]);a=q[a+12>>2];if((a|0)!=-1){continue}break}b=q[213119]}d=d+1|0;if(d>>>0>>0){continue}break}}Ui(q[213118],255,b<<2);q[213123]=-1;q[213124]=0;q[213121]=q[213120];a=q[213127];if(a){d=0;c=a;while(1){a=q[q[213126]+(d<<2)>>2];if((a|0)!=-1){while(1){a=q[213128]+w(a,24)|0;Ni(q[a+8>>2]);a=q[a+16>>2];if((a|0)!=-1){continue}break}c=q[213127]}d=d+1|0;if(d>>>0>>0){continue}break}}Ui(q[213126],255,c<<2);q[213131]=-1;q[213132]=0;q[213129]=q[213128];a=q[213140];if(!a){break h}f=q[213138];if(!f){break d}if(a>>>0>t[213139]){break c}b=a-1|0;q[213140]=b;a=0;q[(b<<2)+f>>2]=0;b=q[213135];d=q[213134];c=q[213140];e=q[213139];if(c>>>0>>0){i=b-d>>3;while(1){h=q[(c<<2)+f>>2];if(h>>>0>=i>>>0){break b}q[(h<<3)+d>>2]=0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}if((b|0)!=(d|0)){while(1){c=q[(a<<3)+d>>2];if(c){Ni(c);b=q[213135]}a=a+1|0;d=q[213134];if(a>>>0>3>>>0){continue}break}e=q[213139]}a=0;q[213140]=0;if(!e){break h}b=q[213138];while(1){q[b+(a<<2)>>2]=a;a=a+1|0;if(a>>>0>1];g=f;a:{b:{c:{d:{h=s[a+26>>1];e:{if((h|0)==(f|0)){break e}g=q[a+20>>2];if(!g){break d}if(f>>>0<=h>>>0){break c}p[a+26>>1]=h+1;g=s[g+(h<<1)>>1];h=q[a+32>>2];if(g>>>0<(q[a+36>>2]-h|0)/592>>>0){break e}if((q[a+40>>2]-h|0)/592>>>0<=g>>>0){break b}q[a+36>>2]=(h+w(g,592)|0)+592}f:{if((f|0)==(g|0)){q[i>>2]=f;Pi(4,199633,200391,i);b=0;break f}h=q[a+32>>2];if((q[a+36>>2]-h|0)/592>>>0<=g>>>0){break a}k=s[a+384>>1];f=Ui(h+w(g,592)|0,0,592);j=u[b+8>>2];q[f+24>>2]=0;q[f+28>>2]=0;l=q[b+4>>2];q[f>>2]=q[b>>2];q[f+4>>2]=l;q[f+16>>2]=0;q[f+20>>2]=0;q[f+12>>2]=1065353216;u[f+8>>2]=j;q[f+104>>2]=0;q[f+108>>2]=1065353216;q[f+96>>2]=0;q[f+100>>2]=0;q[f+88>>2]=0;q[f+92>>2]=1065353216;q[f+80>>2]=0;q[f+84>>2]=0;q[f+56>>2]=1065353216;q[f+60>>2]=1065353216;q[f+48>>2]=1065353216;q[f+52>>2]=1065353216;q[f+40>>2]=1065353216;q[f+44>>2]=0;q[f+32>>2]=1065353216;q[f+36>>2]=1065353216;j=u[c+8>>2];b=q[c>>2];c=q[c+4>>2];q[f+112>>2]=0;q[f+116>>2]=0;q[f+76>>2]=0;q[f+128>>2]=0;q[f+324>>2]=0;q[f+328>>2]=0;q[f+320>>2]=1065353216;q[f+156>>2]=0;q[f+148>>2]=0;q[f+152>>2]=0;q[f+140>>2]=0;q[f+144>>2]=1065353216;q[f+132>>2]=1135869952;q[f+136>>2]=0;q[f+332>>2]=0;q[f+336>>2]=0;q[f+340>>2]=1065353216;q[f+352>>2]=0;q[f+356>>2]=0;q[f+344>>2]=0;q[f+348>>2]=0;q[f+360>>2]=1065353216;q[f+120>>2]=0;q[f+124>>2]=0;q[f+64>>2]=b;q[f+68>>2]=c;u[f+72>>2]=j;q[f+372>>2]=0;q[f+376>>2]=0;q[f+364>>2]=0;q[f+368>>2]=0;q[f+404>>2]=64;q[f+408>>2]=1;q[f+380>>2]=1065353216;q[f+384>>2]=1065353216;q[f+388>>2]=1065353216;q[f+392>>2]=1065353216;q[f+396>>2]=1065353216;q[f+416>>2]=e;q[f+480>>2]=0;q[f+484>>2]=0;q[f+488>>2]=0;q[f+424>>2]=0;q[f+428>>2]=0;q[f+432>>2]=0;q[f+436>>2]=0;q[f+440>>2]=0;q[f+444>>2]=0;q[f+448>>2]=0;q[f+452>>2]=0;q[f+456>>2]=0;q[f+460>>2]=0;q[f+464>>2]=0;q[f+468>>2]=0;q[f+472>>2]=0;q[f+412>>2]=q[f+412>>2]&-805306368|d<<4&240|74448896;c=q[213710];d=q[213711];q[f+584>>2]=-1;p[f+570>>1]=g;b=k?k:1;p[f+568>>1]=b;q[f+508>>2]=0;p[f+504>>1]=0;q[f+496>>2]=c;q[f+500>>2]=d;q[f+572>>2]=-1;q[f+576>>2]=-1;p[f+580>>1]=65535;p[a+384>>1]=(b+1>>>0)%65535;b=b<<16|g;if(e){q[(h+w(g,592)|0)+512>>2]=Mi[q[a+404>>2]](q[a+420>>2],a,b,e)}Xv(a,b,0)}Ii=i+16|0;return b}J(201735,201742,151,201793);G()}J(201797,201742,152,201793);G()}J(202185,201514,506,202204);G()}J(201665,201514,479,201676);G()}function uH(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-80|0;Ii=e;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{if(q[b+56>>2]==-17){if(s[b+38>>1]){break l}g=q[b+8>>2];if(!g){break k}f=e- -64|0;q[f>>2]=0;q[f+4>>2]=0;q[e+56>>2]=0;q[e+60>>2]=0;f=q[b+28>>2];h=q[b+24>>2];q[e+76>>2]=1;q[e+48>>2]=h;q[e+52>>2]=f;q[e+72>>2]=g;q[e+16>>2]=q[a+155704>>2];q[e+20>>2]=q[g+12>>2];q[e+36>>2]=q[b+52>>2];q[e+40>>2]=e+48;q[e+24>>2]=q[b>>2];m:{if(!c){c=q[b+44>>2];if(!c){break j}d=q[b+48>>2];q[e+32>>2]=d;q[e+28>>2]=c;q[e+68>>2]=d;q[b+56>>2]=Mi[q[g+20>>2]](e+16|0);oua(q[a+173488>>2],q[b+44>>2],q[b+48>>2]);q[b+44>>2]=0;c=q[b+56>>2];break m}q[e+32>>2]=d;q[e+28>>2]=c;q[e+68>>2]=d;c=Mi[q[g+20>>2]](e+16|0)|0;q[b+56>>2]=c}if(!(!q[g+24>>2]|c)){d=a+173500|0;f=a+173504|0;c=q[f>>2];h=a+173508|0;i=q[h>>2];if((c|0)==(i|0)){if(o[a+173512|0]&1){break i}Wi(((c-q[d>>2]|0)/56|0)+128|0,56,d,h,f);i=q[h>>2];c=q[f>>2]}h=q[d>>2];d=((c-h|0)/56|0)+1|0;if(d>>>0>(i-h|0)/56>>>0){break h}q[f>>2]=h+w(d,56);if(!d){break g}o[c+48|0]=0;q[c>>2]=q[a+155704>>2];q[c+4>>2]=q[g+12>>2];d=q[b+52>>2];q[c+12>>2]=0;q[c+8>>2]=d;d=q[e+52>>2];q[c+16>>2]=q[e+48>>2];q[c+20>>2]=d;d=q[e+60>>2];q[c+24>>2]=q[e+56>>2];q[c+28>>2]=d;d=e- -64|0;f=q[d+4>>2];q[c+32>>2]=q[d>>2];q[c+36>>2]=f;d=q[e+76>>2];q[c+40>>2]=q[e+72>>2];q[c+44>>2]=d}if(q[b+44>>2]){break f}q[b+52>>2]=0;c=p[b+32>>1];if((c|0)!=-1){c=((c<<6)+a|0)+88150|0;d=s[c>>1];if(!d){break e}p[c>>1]=d-1}Qz(a,b);if(q[b+56>>2]){break b}if(!q[e+56>>2]){break d}c=nq(q[a+155704>>2],q[b+24>>2],q[b+28>>2]);if(c){q[c+28>>2]=q[c+28>>2]+1;q[b+60>>2]=q[c+8>>2];break c}c=pH(q[a+155704>>2],q[b>>2],q[b+24>>2],q[b+28>>2],e+48|0);q[b+56>>2]=c;if(c){break c}q[b+60>>2]=q[e+56>>2];break b}J(30041,29446,516,30077);G()}J(30092,29446,517,30077);G()}J(30122,29446,519,30077);G()}J(30159,29446,540,30077);G()}J(30765,29794,493,30840);G()}J(29861,29794,506,29880);G()}J(30245,29794,435,30256);G()}J(30173,29446,577,30077);G()}J(29952,29446,316,30012);G()}J(30192,29446,593,30077);G()}d=q[e+56>>2];if(!d){break a}n:{if(!q[g+24>>2]){break n}b=q[a+173496>>2];c=q[a+173500>>2];f=(q[a+173504>>2]-c|0)/56|0;if(b>>>0>=f>>>0){break n}while(1){if((d|0)==q[(c+w(b,56)|0)+24>>2]){o[(c+w(b,56)|0)+48|0]=1;break b}b=b+1|0;if(f>>>0>b>>>0){continue}break}}q[e>>2]=q[a+155704>>2];q[e+4>>2]=q[g+12>>2];q[e+8>>2]=e+48;Mi[q[g+28>>2]](e)|0}Ii=e+80|0;return}J(30216,29446,623,30077);G()}function vx(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;i=Ii-16|0;Ii=i;l=zx(a,b,c,d,f);g=q[f>>2];j=q[g+12>>2];a:{if(!j){e=l;break a}h=q[e>>2];k=q[g+8>>2];g=0;b:{while(1){if(!dj(h,q[k+(g<<2)>>2])){break b}g=g+1|0;if((j|0)!=(g|0)){continue}break}g=-1}m=q[d>>2];h=0;c:{while(1){if(!dj(m,q[k+(h<<2)>>2])){break c}h=h+1|0;if((j|0)!=(h|0)){continue}break}h=-1}if((g|0)>=(h|0)){e=l;break a}g=q[d+12>>2];q[i+8>>2]=q[d+8>>2];q[i+12>>2]=g;g=q[d+4>>2];q[i>>2]=q[d>>2];q[i+4>>2]=g;g=e+8|0;h=q[g+4>>2];q[d+8>>2]=q[g>>2];q[d+12>>2]=h;g=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=g;g=q[i+12>>2];q[e+8>>2]=q[i+8>>2];q[e+12>>2]=g;g=q[i+4>>2];q[e>>2]=q[i>>2];q[e+4>>2]=g;e=l+1|0;g=q[f>>2];j=q[g+12>>2];if(!j){break a}h=q[d>>2];k=q[g+8>>2];g=0;d:{while(1){if(!dj(h,q[k+(g<<2)>>2])){break d}g=g+1|0;if((j|0)!=(g|0)){continue}break}g=-1}m=q[c>>2];h=0;e:{while(1){if(!dj(m,q[k+(h<<2)>>2])){break e}h=h+1|0;if((j|0)!=(h|0)){continue}break}h=-1}if((g|0)>=(h|0)){break a}e=q[c+12>>2];q[i+8>>2]=q[c+8>>2];q[i+12>>2]=e;e=q[c+4>>2];q[i>>2]=q[c>>2];q[i+4>>2]=e;e=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=e;e=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=e;e=q[i+12>>2];q[d+8>>2]=q[i+8>>2];q[d+12>>2]=e;e=q[i+4>>2];q[d>>2]=q[i>>2];q[d+4>>2]=e;e=l+2|0;g=q[f>>2];d=q[g+12>>2];if(!d){break a}h=q[c>>2];j=q[g+8>>2];g=0;f:{while(1){if(!dj(h,q[j+(g<<2)>>2])){break f}g=g+1|0;if((d|0)!=(g|0)){continue}break}g=-1}k=q[b>>2];h=0;g:{while(1){if(!dj(k,q[j+(h<<2)>>2])){break g}h=h+1|0;if((d|0)!=(h|0)){continue}break}h=-1}if((g|0)>=(h|0)){break a}d=q[b+12>>2];q[i+8>>2]=q[b+8>>2];q[i+12>>2]=d;d=q[b+4>>2];q[i>>2]=q[b>>2];q[i+4>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;d=q[i+12>>2];q[c+8>>2]=q[i+8>>2];q[c+12>>2]=d;d=q[i+4>>2];q[c>>2]=q[i>>2];q[c+4>>2]=d;e=l+3|0;d=q[f>>2];c=q[d+12>>2];if(!c){break a}f=q[b>>2];d=q[d+8>>2];g=0;h:{while(1){if(!dj(f,q[d+(g<<2)>>2])){break h}g=g+1|0;if((c|0)!=(g|0)){continue}break}g=-1}f=q[a>>2];h=0;i:{while(1){if(!dj(f,q[d+(h<<2)>>2])){break i}h=h+1|0;if((c|0)!=(h|0)){continue}break}h=-1}if((g|0)>=(h|0)){break a}c=q[a+12>>2];q[i+8>>2]=q[a+8>>2];q[i+12>>2]=c;c=q[a+4>>2];q[i>>2]=q[a>>2];q[i+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[i+12>>2];q[b+8>>2]=q[i+8>>2];q[b+12>>2]=a;a=q[i+4>>2];q[b>>2]=q[i>>2];q[b+4>>2]=a;e=l+4|0}Ii=i+16|0;return e}function Wpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=0;b=Ii-4224|0;Ii=b;h=q[a+8>>2]-q[a+12>>2]>>4;i=jk(a);g=q[q[i+80>>2]+8>>2];mo(a,68198,b+4220|0,b+4216|0,0);a:{b:{if((h|0)<2){break b}if(!Vi(a,2)){break b}d=Bl(a,2);f=q[d+4>>2];c=q[d>>2];u[b+4200>>2]=u[d+8>>2];q[b+4192>>2]=c;q[b+4196>>2]=f;break a}Ip(b+80|0,i);u[b+4192>>2]=u[b+80>>2];c=q[b+88>>2];q[b+4196>>2]=q[b+84>>2];q[b+4200>>2]=c}c:{d:{if((h|0)<3){break d}if(!Vi(a,3)){break d}c=kr(a,3);u[b+4176>>2]=u[c>>2];u[b+4180>>2]=u[c+4>>2];u[b+4184>>2]=u[c+8>>2];u[b+4188>>2]=u[c+12>>2];break c}Ht(b+80|0,i);c=q[b+84>>2];q[b+4176>>2]=q[b+80>>2];q[b+4180>>2]=c;c=q[b+92>>2];q[b+4184>>2]=q[b+88>>2];q[b+4188>>2]=c}c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+68>>2]=-1;eJ(b+48|0,8,32);e:{f:{g:{h:{i:{if((h|0)<=3){break i}if(Vi(a,4)){if((Vi(a,4)|0)!=5){break g}ej(a,4);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){l=nl(a,-2);d=Li;f=(b+80|0)+e|0;c=4096-e|0;j=ft(a,f,c,-1);if(c>>>0>>0){a=Qi(a,68540,0);break e}q[b>>2]=f;q[b+4>>2]=j;fJ(b+48|0,l,d,b);Ri(a,-2);e=j+(e|15)&-16;if(Hj(a,-2)){continue}break}}Ri(a,-2)}if((h|0)<5){break i}if(!Vi(a,5)){break i}c=Om(a,5);if(c){u[b+32>>2]=u[c>>2];u[b+36>>2]=u[c+4>>2];u[b+40>>2]=u[c+8>>2];break h}k=x(fj(a,5));u[b+40>>2]=k;u[b+36>>2]=k;u[b+32>>2]=k;break h}Lr(b,i);u[b+32>>2]=u[b>>2];c=q[b+8>>2];q[b+36>>2]=q[b+4>>2];q[b+40>>2]=c}gj(a);d=zk(a,-1e4);q[b+16>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+20>>2]=-1;f=q[b+4216>>2];c=q[f+4>>2];if(!c){c=q[f>>2]}c=aqa(g,q[c+8>>2],b+48|0,b+4192|0,b+4176|0,b+32|0,b);rj(a,-1e4,d);yk(a);Rj(a,-1e4,d);vj(a,0,0);j:{if(!c){break j}vj(a,0,1);qk(a,544,0);Si(a,-2,68746);xj(a,-2);c=q[b+4>>2];if(!c){break j}g=0;while(1){e=q[q[b>>2]+(g<<2)>>2];if((e|0)!=-1){while(1){c=q[b+8>>2]+w(e,24)|0;lk(a,q[c>>2],q[c+4>>2]);lk(a,q[c+8>>2],q[c+12>>2]);Ij(a,-3);e=q[c+16>>2];if((e|0)!=-1){continue}break}c=q[b+4>>2]}g=g+1|0;if(c>>>0>g>>>0){continue}break}}if((h+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break f}k:{if(o[b+28|0]&1){break k}a=q[b+8>>2];if(a){Ni(a)}a=q[b>>2];if(!a){break k}Ni(a)}a=1;break e}a=Qi(a,68688,0);break e}J(68754,68606,403,68659);G()}l:{if(o[b+76|0]&1){break l}c=q[b+56>>2];if(c){Ni(c)}c=q[b+48>>2];if(!c){break l}Ni(c)}Ii=b+4224|0;return a|0}function Yv(a,b){a:{if(q[213716]!=(a|0)|q[213717]!=(b|0)){if((a|0)!=q[213720]|(b|0)!=q[213721]){break a}a=854880}else{a=854864}return a}if(q[213724]==(a|0)&q[213725]==(b|0)){return 854896}if(q[213728]==(a|0)&q[213729]==(b|0)){return 854912}if(q[213732]==(a|0)&q[213733]==(b|0)){return 854928}if(q[213736]==(a|0)&q[213737]==(b|0)){return 854944}if(q[213740]==(a|0)&q[213741]==(b|0)){return 854960}if(q[213744]==(a|0)&q[213745]==(b|0)){return 854976}if(q[213748]==(a|0)&q[213749]==(b|0)){return 854992}if(q[213752]==(a|0)&q[213753]==(b|0)){return 855008}if(q[213756]==(a|0)&q[213757]==(b|0)){return 855024}if(q[213760]==(a|0)&q[213761]==(b|0)){return 855040}if(q[213764]==(a|0)&q[213765]==(b|0)){return 855056}if(q[213768]==(a|0)&q[213769]==(b|0)){return 855072}if(q[213772]==(a|0)&q[213773]==(b|0)){return 855088}if(q[213776]==(a|0)&q[213777]==(b|0)){return 855104}if(q[213780]==(a|0)&q[213781]==(b|0)){return 855120}if(q[213784]==(a|0)&q[213785]==(b|0)){return 855136}if(q[213788]==(a|0)&q[213789]==(b|0)){return 855152}if(q[213792]==(a|0)&q[213793]==(b|0)){return 855168}if(q[213796]==(a|0)&q[213797]==(b|0)){return 855184}if(q[213800]==(a|0)&q[213801]==(b|0)){return 855200}if(q[213804]==(a|0)&q[213805]==(b|0)){return 855216}if(q[213808]==(a|0)&q[213809]==(b|0)){return 855232}if(q[213812]==(a|0)&q[213813]==(b|0)){return 855248}if(q[213816]==(a|0)&q[213817]==(b|0)){return 855264}if(q[213820]==(a|0)&q[213821]==(b|0)){return 855280}if(q[213824]==(a|0)&q[213825]==(b|0)){return 855296}if(q[213828]==(a|0)&q[213829]==(b|0)){return 855312}if(q[213832]==(a|0)&q[213833]==(b|0)){return 855328}if(q[213836]==(a|0)&q[213837]==(b|0)){return 855344}if(q[213840]==(a|0)&q[213841]==(b|0)){return 855360}if(q[213844]==(a|0)&q[213845]==(b|0)){return 855376}if(q[213848]==(a|0)&q[213849]==(b|0)){return 855392}if(q[213852]==(a|0)&q[213853]==(b|0)){return 855408}if(q[213856]==(a|0)&q[213857]==(b|0)){return 855424}if(q[213860]==(a|0)&q[213861]==(b|0)){return 855440}if(q[213864]==(a|0)&q[213865]==(b|0)){return 855456}if(q[213868]==(a|0)&q[213869]==(b|0)){return 855472}if(q[213872]==(a|0)&q[213873]==(b|0)){return 855488}if(q[213876]==(a|0)&q[213877]==(b|0)){return 855504}if(q[213880]==(a|0)&q[213881]==(b|0)){return 855520}if(q[213884]==(a|0)&q[213885]==(b|0)){return 855536}return(a|0)==q[213888]&(b|0)==q[213889]?855552:0}function Ct(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=x(0);i=Ii-288|0;Ii=i;q[i+280>>2]=0;q[i+284>>2]=0;q[i+276>>2]=0;k=-1;q[i+272>>2]=-1;p[i+270>>1]=0;a:{if(!LH(a,b,c,i+280|0,i+276|0,i+272|0,i+270|0)){break a}if(Mi[g|0](h,q[i+280>>2],q[i+284>>2],i+260|0)|0){h=q[i+260>>2];q[i+264>>2]=s[h+24>>1];k=-11;g=q[q[i+260>>2]+16>>2]==9;d=g?d<<2:d;if(d>>>0>=t[i+264>>2]){break a}j=q[h>>2]+(d<<4)|0}p[e+108>>1]=p[e+108>>1]&1|s[i+270>>1]<<2;b:{h=q[i+280>>2];k=q[i+284>>2];if((h|0)==(b|0)&(k|0)==(c|0)){h=q[i+276>>2];if(h){k=q[h+4>>2];q[e>>2]=q[h>>2];q[e+4>>2]=k;k=q[h+12>>2];q[e+8>>2]=q[h+8>>2];q[e+12>>2]=k;k=q[h+20>>2];q[e+16>>2]=q[h+16>>2];q[e+20>>2]=k;k=q[h+28>>2];q[e+24>>2]=q[h+24>>2];q[e+28>>2]=k}if(j){c:{if(g&1){u[i+112>>2]=u[j>>2];u[i+116>>2]=u[j+4>>2];u[i+120>>2]=u[j+8>>2];u[i+124>>2]=u[j+12>>2];u[i+128>>2]=u[j+16>>2];u[i+132>>2]=u[j+20>>2];u[i+136>>2]=u[j+24>>2];u[i+140>>2]=u[j+28>>2];u[i+144>>2]=u[j+32>>2];u[i+148>>2]=u[j+36>>2];u[i+152>>2]=u[j+40>>2];u[i+156>>2]=u[j+44>>2];u[i+160>>2]=u[j+48>>2];u[i+164>>2]=u[j+52>>2];u[i+168>>2]=u[j+56>>2];u[i+172>>2]=u[j+60>>2];uw(i+184|0,i+112|0);break c}u[i+96>>2]=u[j>>2];u[i+100>>2]=u[j+4>>2];u[i+104>>2]=u[j+8>>2];u[i+108>>2]=u[j+12>>2];Gp(i+184|0,i+96|0)}Ti(e+32|0,i+184|0,72);k=0;if(!f){break a}q[e+104>>2]=j;break a}$z(a,b,c,i+92|0);a=q[q[i+92>>2]+16>>2];c=q[i+92>>2];q[i+264>>2]=s[c+24>>1];b=(a|0)==9?d<<2:d;if(b>>>0>=t[i+264>>2]){break b}c=q[c>>2];if((a|0)==9){a=c+(b<<4)|0;u[i+16>>2]=u[a>>2];u[i+20>>2]=u[a+4>>2];u[i+24>>2]=u[a+8>>2];u[i+28>>2]=u[a+12>>2];u[i+32>>2]=u[a+16>>2];u[i+36>>2]=u[a+20>>2];u[i+40>>2]=u[a+24>>2];u[i+44>>2]=u[a+28>>2];u[i+48>>2]=u[a+32>>2];u[i+52>>2]=u[a+36>>2];u[i+56>>2]=u[a+40>>2];u[i+60>>2]=u[a+44>>2];u[i+64>>2]=u[a+48>>2];u[i+68>>2]=u[a+52>>2];u[i+72>>2]=u[a+56>>2];u[i+76>>2]=u[a+60>>2];uw(i+184|0,i+16|0);Ti(e+32|0,i+184|0,72);k=0;break a}a=c+(b<<4)|0;u[i>>2]=u[a>>2];u[i+4>>2]=u[a+4>>2];u[i+8>>2]=u[a+8>>2];u[i+12>>2]=u[a+12>>2];Gp(i+184|0,i);Ti(e+32|0,i+184|0,72);k=0;break a}if(j){a=(q[i+272>>2]<<2)+j|0;l=u[a>>2];b=i+184|0;q[b>>2]=0;v[b+8>>3]=l;Ti(e+32|0,i+184|0,72);k=0;if(!f){break a}q[e+104>>2]=a;break a}$z(a,h,k,i+92|0);a=q[i+92>>2];q[i+264>>2]=s[a+24>>1];if(t[i+264>>2]<=d>>>0){break b}l=u[(q[a>>2]+(d<<4)|0)+(q[i+272>>2]<<2)>>2];a=i+184|0;q[a>>2]=0;v[a+8>>3]=l;Ti(e+32|0,i+184|0,72);k=0;break a}k=-11}Ii=i+288|0;return k}function Bva(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;e=Ii-1056|0;Ii=e;n=q[a+8>>2]-q[a+12>>2]>>4;d=Tl(a,3,136889,e+12|0);Yn(q[b+20>>2]);c=e+16|0;q[c+4>>2]=0;q[c+8>>2]=a;q[c>>2]=c+12;qn(e+16|0,d,q[e+12>>2]);a:{b:{c:{d:{e:{if(!Oj(a,2)){d=Tl(a,2,136890,0);if(r[d|0]!=42){break c}f:{switch(r[d+1|0]-97|0){case 11:p=b+32|0;f=q[b+28>>2];c=q[b+24>>2];l=e+1052|0;while(1){g=0;h=0;if(c>>>0>=f>>>0){d=q[b+16>>2];h=Mi[q[d+8>>2]](q[d>>2],p,8192,e+1052|0,q[b+20>>2])|0;q[b+24>>2]=0;f=q[e+1052>>2];q[b+28>>2]=f;c=0}d=b;g:{j=f-c|0;if(j){k=(b+c|0)+32|0;while(1){h:{i:{i=g+k|0;c=r[i|0];switch(c-10|0){case 0:break g;case 3:break h;default:break i}}f=q[e+16>>2];if(l>>>0<=f>>>0){ml(e+16|0);f=q[e+16>>2];c=r[i|0]}q[e+16>>2]=f+1;o[f|0]=c}g=g+1|0;if((j|0)!=(g|0)){continue}break}f=q[b+28>>2];c=q[b+24>>2]}c=c+j|0;q[d+24>>2]=c;q[b+12>>2]=j+q[b+12>>2];if(c>>>0>=f>>>0){q[b+24>>2]=0;q[b+28>>2]=0;f=0;c=0}if(!h){continue}break d}break}d=g+1|0;q[b+12>>2]=d+q[b+12>>2];d=d+q[b+24>>2]|0;q[b+24>>2]=d;if(d>>>0>2]){break e}q[b+24>>2]=0;q[b+28>>2]=0;break e;case 0:break f;default:break c}}k=b+32|0;while(1){if(h){if((h|0)!=-2){break e}h=-2;if(!f){break d}break b}h=0;i=e+16|0;c=q[b+28>>2];g=q[b+24>>2];if(c>>>0<=g>>>0){d=q[b+16>>2];h=Mi[q[d+8>>2]](q[d>>2],k,8192,e+1052|0,q[b+20>>2])|0;q[b+24>>2]=0;c=q[e+1052>>2];q[b+28>>2]=c;g=0}c=c-g|0;qn(i,(b+g|0)+32|0,c);q[b+12>>2]=c+q[b+12>>2];d=c+q[b+24>>2]|0;q[b+24>>2]=d;f=c+f|0;if(d>>>0>2]){continue}q[b+24>>2]=0;q[b+28>>2]=0;continue}}m=Mj(a,2);c=m>=0;d=~~m>>>0;j:{if(c&m<4294967296){break j}d=0}if(!c){dk(a,2,136893)}c=q[e+12>>2];if(c>>>0>=d>>>0?c:0){break b}k=b+32|0;l=d-c|0;c=0;while(1){if(h){break d}h=0;j=e+16|0;f=q[b+28>>2];g=q[b+24>>2];if(f>>>0<=g>>>0){d=q[b+16>>2];h=Mi[q[d+8>>2]](q[d>>2],k,8192,e+1052|0,q[b+20>>2])|0;q[b+24>>2]=0;f=q[e+1052>>2];q[b+28>>2]=f;g=0}i=f-g|0;d=l-c|0;i=d>>>0>i>>>0?i:d;qn(j,(b+g|0)+32|0,i);q[b+12>>2]=i+q[b+12>>2];d=i+q[b+24>>2]|0;q[b+24>>2]=d;if(d>>>0>=t[b+28>>2]){q[b+24>>2]=0;q[b+28>>2]=0}c=c+i|0;if(l>>>0>c>>>0){continue}break}}if(!h){break b}}zm(e+16|0);b=q[b+16>>2];Xi(a,Mi[q[b+12>>2]](q[b>>2],h)|0);ej(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Zq(a,-4);break a}dk(a,2,136893)}zm(e+16|0);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}Ii=e+1056|0;return(q[a+8>>2]-q[a+12>>2]>>4)-n|0}function lra(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=x(0),h=0,i=0,j=0,k=0,l=0;i=Ii-32|0;Ii=i;f=-1;a:{if(!b){break a}j=q[b>>2];if(!j){break a}l=q[b+4>>2];while(1){k=(h<<3)+l|0;if(q[k>>2]!=(c|0)|q[k+4>>2]!=(d|0)){h=h+1|0;if((j|0)!=(h|0)){continue}break a}break}d=h<<2;c=q[d+q[b+8>>2]>>2];b:{switch(q[d+q[b+12>>2]>>2]){case 1:a=q[b+16>>2]+(c<<3)|0;b=q[a+4>>2];a=q[a>>2];q[e>>2]=1;q[e+8>>2]=a;q[e+12>>2]=b;f=0;break a;case 7:d=q[b+28>>2];b=i;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Mi[q[a+44>>2]](q[a+40>>2],b);f=-2;if(sz(q[a+40>>2],c+d|0,e+8|0,b)){break a}q[e>>2]=2;f=0;break a;case 2:a=c+q[b+24>>2]|0;b=r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24);c=r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24);o[e+8|0]=c;o[e+9|0]=c>>>8;o[e+10|0]=c>>>16;o[e+11|0]=c>>>24;o[e+12|0]=b;o[e+13|0]=b>>>8;o[e+14|0]=b>>>16;o[e+15|0]=b>>>24;b=r[a+28|0]|r[a+29|0]<<8|(r[a+30|0]<<16|r[a+31|0]<<24);c=r[a+24|0]|r[a+25|0]<<8|(r[a+26|0]<<16|r[a+27|0]<<24);o[e+32|0]=c;o[e+33|0]=c>>>8;o[e+34|0]=c>>>16;o[e+35|0]=c>>>24;o[e+36|0]=b;o[e+37|0]=b>>>8;o[e+38|0]=b>>>16;o[e+39|0]=b>>>24;b=r[a+20|0]|r[a+21|0]<<8|(r[a+22|0]<<16|r[a+23|0]<<24);c=r[a+16|0]|r[a+17|0]<<8|(r[a+18|0]<<16|r[a+19|0]<<24);o[e+24|0]=c;o[e+25|0]=c>>>8;o[e+26|0]=c>>>16;o[e+27|0]=c>>>24;o[e+28|0]=b;o[e+29|0]=b>>>8;o[e+30|0]=b>>>16;o[e+31|0]=b>>>24;b=r[a+12|0]|r[a+13|0]<<8|(r[a+14|0]<<16|r[a+15|0]<<24);a=r[a+8|0]|r[a+9|0]<<8|(r[a+10|0]<<16|r[a+11|0]<<24);o[e+16|0]=a;o[e+17|0]=a>>>8;o[e+18|0]=a>>>16;o[e+19|0]=a>>>24;o[e+20|0]=b;o[e+21|0]=b>>>8;o[e+22|0]=b>>>16;o[e+23|0]=b>>>24;q[e>>2]=2;f=0;break a;case 3:a=c<<2;u[e+8>>2]=u[a+q[b+20>>2]>>2];u[e+12>>2]=u[(a+q[b+20>>2]|0)+4>>2];g=u[(a+q[b+20>>2]|0)+8>>2];q[e>>2]=3;u[e+16>>2]=g;f=0;break a;case 4:a=c<<2;u[e+8>>2]=u[a+q[b+20>>2]>>2];u[e+12>>2]=u[(a+q[b+20>>2]|0)+4>>2];u[e+16>>2]=u[(a+q[b+20>>2]|0)+8>>2];g=u[(a+q[b+20>>2]|0)+12>>2];q[e>>2]=4;u[e+20>>2]=g;f=0;break a;case 5:a=c<<2;u[e+8>>2]=u[a+q[b+20>>2]>>2];u[e+12>>2]=u[(a+q[b+20>>2]|0)+4>>2];u[e+16>>2]=u[(a+q[b+20>>2]|0)+8>>2];g=u[(a+q[b+20>>2]|0)+12>>2];q[e>>2]=5;u[e+20>>2]=g;f=0;break a;case 6:a=r[c+q[b+28>>2]|0];q[e>>2]=6;f=0;o[e+8|0]=(a|0)!=0;break a;default:J(13883,13768,532,13903);G();case 0:break b}}g=u[q[b+20>>2]+(c<<2)>>2];f=0;q[e>>2]=0;v[e+8>>3]=g}Ii=i+32|0;return f|0}function yma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0),n=0,p=0,v=0,y=0,z=x(0),A=x(0),B=0,C=0,D=0,E=0,F=0,H=0,I=0,K=0,L=0,M=x(0),N=x(0),O=x(0),P=x(0),Q=x(0),R=x(0),S=x(0),T=x(0),U=x(0),V=x(0),W=x(0),X=x(0);a:{b:{c:{g=q[a+4>>2];l=q[g+8>>2];j=q[g+4>>2];c=l-j|0;if(c){e=c>>2;k=q[a+8>>2];while(1){d=q[j+(i<<2)>>2];d:{if((r[d+166|0]&3)!=3|!s[d+164>>1]){break d}b=q[d+124>>2];h=q[d+128>>2]-b|0;if(!h){break d}a=0;while(1){f=o[a+b|0]&1?w(s[d+160>>1],s[d+162>>1])+f|0:f;a=a+1|0;if((h|0)!=(a|0)){continue}break}}i=i+1|0;if((e|0)!=(i|0)){continue}break}if((q[g+28>>2]-q[g+20>>2]|0)/304>>>0>>0){if(o[g+32|0]&1){break b}Wi(f,304,g+20|0,g+28|0,g+24|0)}a=j-l|0;e=((a|0)>(c|0)?a:c)>>>2|0;a=(c|0)>-1?c:-1;a=w(e,(a|0)<1?a:1);C=a>>>0>1?a:1;v=q[k>>2];l=vp(v,f);D=Ev(v,246,g)<<6;i=0;a=l;while(1){c=q[g+4>>2];if(q[g+8>>2]-c>>2>>>0<=i>>>0){break a}b=q[c+(i<<2)>>2];e:{if((r[b+166|0]&3)!=3|!s[b+164>>1]){break e}c=q[b+144>>2];if(!(!c|!r[c+52|0])){lw(b)}c=q[b+156>>2];d=q[b+152>>2];if(!d){d=q[c>>2]}y=q[c+4>>2];B=q[y+8>>2];if(!B){break e}c=q[d+64>>2];E=q[c+24>>2];F=q[c+20>>2];H=i&65535;h=0;while(1){c=q[b+124>>2];if(q[b+128>>2]-c>>>0<=h>>>0){break a}f:{if(!(o[c+h|0]&1)){break f}if(t[y+8>>2]<=h>>>0){break c}j=s[b+162>>1];if(!j){break f}I=q[y+4>>2]+(h<<5)|0;K=h<<16|H;n=0;p=0;c=0;f=s[b+160>>1];d=f;while(1){if(d&65535){j=p<<16;L=K;z=x(w(p,E)>>>0);k=0;d=0;g:{while(1){e=q[b+108>>2];if(q[b+112>>2]-e>>>0>n>>>0){if(r[e+n|0]&2){M=u[b+80>>2];N=u[b+64>>2];O=u[b+32>>2];P=u[b+48>>2];Q=u[b+84>>2];R=u[b+68>>2];S=u[b+36>>2];T=u[b+52>>2];m=u[b+88>>2];U=u[b+72>>2];A=u[I+4>>2];V=u[b+40>>2];W=u[b+56>>2];e=a;q[a+16>>2]=L;q[a+20>>2]=j|k;X=m;m=x(w(k,F)>>>0);u[a+8>>2]=X+x(x(x(V*m)+x(W*z))+x(A*U));u[a+4>>2]=Q+x(x(x(S*m)+x(T*z))+x(A*R));u[a>>2]=M+x(x(x(O*m)+x(P*z))+x(A*N));f=q[b+148>>2];if(!f){f=q[q[b+156>>2]+24>>2]}q[e+32>>2]=q[q[f>>2]+132>>2];q[a+28>>2]=q[b+140>>2];q[a+36>>2]=q[a+36>>2]&-16384|D|16;f=s[b+160>>1];a=a+48|0}n=n+1|0;e=k+1|0;d=e>>>0<1?d+1|0:d;k=e;if(!d&(f&65535)>>>0>e>>>0){continue}break g}break}break a}j=s[b+162>>1];d=f}else{d=0}e=p+1|0;c=e>>>0<1?c+1|0:c;p=e;if(!c&(j&65535)>>>0>e>>>0){continue}break}}h=h+1|0;if((B|0)!=(h|0)){continue}break}}i=i+1|0;if((C|0)!=(i|0)){continue}break}up(v,l,a)}return 0}J(55680,55692,189,55717);G()}J(55510,55585,493,55641);G()}J(55728,55585,479,55717);G()}function M$(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0;t=Ii-32|0;Ii=t;b=t;q[b+16>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+12>>2]=0;b=cn(a,b+16|0,16,b+16|0,b+12|0);if(!b){c=t;g=r[c+31|0];v=r[c+30|0];l=r[c+27|0];m=r[c+26|0];n=r[c+25|0];p=r[c+24|0];o=r[c+29|0];k=r[c+28|0];j=r[c+23|0];i=r[c+22|0];h=r[c+19|0];s=r[c+18|0];f=r[c+17|0];d=r[c+16|0];b=r[c+21|0];e=r[c+20|0];q[a+192>>2]=0;q[a+196>>2]=0;q[a+64>>2]=0;q[a+68>>2]=0;c=b;b=b>>>16|0;c=c<<16|e<<24;u=e>>>8|b;f=f<<16|d<<24;b=s<<8|f|h;b=b|u|i>>>24;d=b;u=i<<8|c|j;q[a+256>>2]=u;q[a+260>>2]=b;c=o>>>16|0;b=k>>>8|0;k=o<<16|k<<24;i=b|c;h=n<<16|p<<24;b=m<<8|h|l;e=k;c=b|i;i=v<<8|e|g;b=v>>>24|c;e=b;q[a+128>>2]=i;q[a+132>>2]=b;h=(d&1)<<31|u>>>1;m=Aza(g&1,0,0,-520093696)^h;b=Li^d>>>1;s=b;q[a+224>>2]=m;q[a+228>>2]=b;b=j<<31|e>>>1;f=b;l=(e&1)<<31|i>>>1;q[a+96>>2]=l;q[a+100>>2]=b;n=(b&1)<<31|l>>>1;b=h<<31|b>>>1;d=b;q[a+80>>2]=n;q[a+84>>2]=b;c=s;b=c>>>1|0;h=(c&1)<<31|m>>>1;p=Aza(l&1,0,0,-520093696)^h;c=Li^b;g=c;q[a+208>>2]=p;q[a+212>>2]=c;q[a+112>>2]=n^l;q[a+116>>2]=d^f;c=h<<31;o=(d&1)<<31|n>>>1;b=d>>>1|c;i=b;q[a+72>>2]=o;q[a+76>>2]=b;q[a+240>>2]=m^p;q[a+244>>2]=g^s;c=g;b=c>>>1|0;k=Aza(n&1,0,0,-520093696)^((c&1)<<31|p>>>1);b=b^Li;h=b;q[a+200>>2]=k;q[a+204>>2]=b;b=d^i;d=b;e=n^o;q[a+88>>2]=e;q[a+92>>2]=b;q[a+104>>2]=l^o;q[a+108>>2]=f^i;j=c^h;c=j;b=k^p;q[a+216>>2]=b;q[a+220>>2]=c;q[a+232>>2]=k^m;q[a+236>>2]=h^s;q[a+120>>2]=e^l;q[a+124>>2]=d^f;q[a+248>>2]=b^m;q[a+252>>2]=c^s;f=q[a+260>>2];g=q[a+256>>2];q[a+264>>2]=g^k;q[a+268>>2]=f^h;d=q[a+132>>2];e=q[a+128>>2];q[a+136>>2]=e^o;q[a+140>>2]=d^i;b=q[a+212>>2]^f;q[a+272>>2]=q[a+208>>2]^g;q[a+276>>2]=b;b=q[a+84>>2]^d;q[a+144>>2]=q[a+80>>2]^e;q[a+148>>2]=b;b=q[a+220>>2]^f;q[a+280>>2]=q[a+216>>2]^g;q[a+284>>2]=b;b=q[a+92>>2]^d;q[a+152>>2]=q[a+88>>2]^e;q[a+156>>2]=b;b=q[a+228>>2]^f;q[a+288>>2]=q[a+224>>2]^g;q[a+292>>2]=b;b=q[a+100>>2]^d;q[a+160>>2]=q[a+96>>2]^e;q[a+164>>2]=b;j=q[a+104>>2];c=q[a+108>>2];b=q[a+236>>2]^f;q[a+296>>2]=q[a+232>>2]^g;q[a+300>>2]=b;q[a+168>>2]=e^j;q[a+172>>2]=c^d;j=q[a+112>>2];c=q[a+116>>2];b=q[a+244>>2]^f;q[a+304>>2]=q[a+240>>2]^g;q[a+308>>2]=b;q[a+176>>2]=e^j;q[a+180>>2]=c^d;j=q[a+120>>2];c=q[a+124>>2];b=q[a+252>>2]^f;q[a+312>>2]=q[a+248>>2]^g;q[a+316>>2]=b;q[a+184>>2]=e^j;q[a+188>>2]=c^d;b=0}Ii=t+32|0;return b}function ut(a,b,c){var d=0,e=0;d=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=d;d=q[b+28>>2];q[a+24>>2]=q[b+24>>2];q[a+28>>2]=d;d=q[b+20>>2];q[a+16>>2]=q[b+16>>2];q[a+20>>2]=d;d=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=d;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;d=Wj();o[852468]=0;q[213116]=d;ek(852568)}b:{c:{if(!(!r[852468]|!q[b+24>>2])){if(c){d:{if(o[852568]&1){break d}if(!fk(852568)){break d}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}d=q[213116];Gj(d);e:{if(o[852568]&1){break e}if(!fk(852568)){break e}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=a;a=wO();q[c+24>>2]=a;f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}if(!a){break c}c=q[213134];e=q[213135]-c>>3;if(e>>>0<=a>>>0){break b}b=q[b+24>>2];if(e>>>0<=b>>>0){break b}e=c+(a<<3)|0;b=c+(b<<3)|0;a=s[b+4>>1];c=Yi(a+16&131056);q[e>>2]=c;o[Ti(c,q[b>>2],a)+a|0]=0;p[e+4>>1]=a;Bj(d);return}q[a+24>>2]=0}return}J(165718,165430,137,165735);G()}J(165931,165533,479,165942);G()}function tia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{i=q[a>>2];c=q[i+8>>2];b=q[i+4>>2];d=c-b|0;if(!d){break a}if((b|0)!=(c|0)){c=b-c|0;g=((c|0)>(d|0)?c:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(g,(d|0)<1?d:1);k=d>>>0>1?d:1;while(1){h=q[(j<<2)+b>>2];f=q[h+152>>2];b:{if(!f){break b}g=q[h+192>>2];b=g;b=b?b:q[f+8>>2];d=q[h+156>>2];if(!d){d=q[f+4>>2]}c:{d:{c=d;d=q[q[a+4>>2]+8>>2];if(!((c|0)==(d|0)|(d|0)==(f|0)|(d|0)==q[b>>2])){b=q[h+160>>2];e:{f:{if(b){break f}if(g){b=q[g+4>>2];if(b){break f}}b=q[f+12>>2];if(b){break f}c=0;e=0;b=q[f+8>>2];if(!b){break e}b=q[b+4>>2];if(!b){break e}}c=q[b>>2];e=q[b+4>>2]}if((c|0)!=(d|0)|e){break d}break c}o[h+204|0]=r[h+204|0]|4;break b}b=q[h+164>>2];g:{h:{if(b){break h}if(g){b=q[g+8>>2];if(b){break h}}b=q[f+16>>2];if(b){break h}c=0;e=0;b=q[f+8>>2];if(!b){break g}b=q[b+8>>2];if(!b){break g}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+168>>2];i:{j:{if(b){break j}if(g){b=q[g+12>>2];if(b){break j}}b=q[f+20>>2];if(b){break j}c=0;e=0;b=q[f+8>>2];if(!b){break i}b=q[b+12>>2];if(!b){break i}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+172>>2];k:{l:{if(b){break l}if(g){b=q[g+16>>2];if(b){break l}}b=q[f+24>>2];if(b){break l}c=0;e=0;b=q[f+8>>2];if(!b){break k}b=q[b+16>>2];if(!b){break k}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+176>>2];m:{n:{if(b){break n}if(g){b=q[g+20>>2];if(b){break n}}b=q[f+28>>2];if(b){break n}c=0;e=0;b=q[f+8>>2];if(!b){break m}b=q[b+20>>2];if(!b){break m}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+180>>2];o:{p:{if(b){break p}if(g){b=q[g+24>>2];if(b){break p}}b=q[f+32>>2];if(b){break p}c=0;e=0;b=q[f+8>>2];if(!b){break o}b=q[b+24>>2];if(!b){break o}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+184>>2];q:{r:{if(b){break r}if(g){b=q[g+28>>2];if(b){break r}}b=q[f+36>>2];if(b){break r}c=0;e=0;b=q[f+8>>2];if(!b){break q}b=q[b+28>>2];if(!b){break q}}c=q[b>>2];e=q[b+4>>2]}if(!e&(c|0)==(d|0)){break c}b=q[h+188>>2];s:{t:{if(b){break t}if(g){b=q[g+32>>2];if(b){break t}}b=q[f+40>>2];if(b){break t}c=0;e=0;b=q[f+8>>2];if(!b){break s}b=q[b+32>>2];if(!b){break s}}c=q[b>>2];e=q[b+4>>2]}if((c|0)!=(d|0)|e){break b}}o[h+204|0]=r[h+204|0]|4}j=j+1|0;if((k|0)==(j|0)){break a}b=q[i+4>>2];if(q[i+8>>2]-b>>2>>>0>j>>>0){continue}break}}J(46069,45367,486,46080);G()}}function K8(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,u=0;c=Ii-160|0;Ii=c;i=Mi[q[74980]](q[a+4>>2])|0;q[c+24>>2]=0;if(i){while(1){q[c+28>>2]=-1;Mi[q[74979]](q[a+4>>2],b,c+32|0,128,c+28|0,c+24|0)|0;e=q[c+28>>2];a:{if(e-7>>>0<=1){d=d+1|0;break a}if(e-9>>>0<=2){f=f+1|0;break a}q[c+4>>2]=e;q[c>>2]=c+32;Pi(3,113613,113620,c)}b=b+1|0;if((i|0)!=(b|0)){continue}break}}b:{c:{b=d+f|0;if(b){qt(a+20|0,b,b<<1);if(o[a+112|0]&1){break c}Wi(d,40,a+100|0,a+108|0,a+104|0)}if(f){if(o[a+128|0]&1){break c}Wi(f,40,a+116|0,a+124|0,a+120|0);d=0;while(1){b=q[a+120>>2];if((b|0)==q[a+124>>2]){break b}q[a+120>>2]=b+40;q[b+32>>2]=16777215;q[b+24>>2]=1;q[b+28>>2]=1065353216;q[b+16>>2]=2;q[b+20>>2]=1;q[b+8>>2]=0;q[b+12>>2]=5;q[b>>2]=0;q[b+4>>2]=0;d=d+1|0;if((f|0)!=(d|0)){continue}break}}d:{e:{f:{if(!i){break f}k=a+20|0;e=0;f=0;while(1){d=Mi[q[74979]](q[a+4>>2],f,c+32|0,128,c+28|0,c+24|0)|0;b=Mi[q[74981]](q[a+4>>2],c+32|0)|0;q[c+20>>2]=b;g:{if((b|0)==-1){break g}b=0;if(!d){J(113662,113682,213,113709);G()}h:{while(1){g=(c+32|0)+b|0;if(r[g|0]!=91){b=b+1|0;if((d|0)!=(b|0)){continue}break h}break}o[g|0]=0}d=Oi(c+32|0);b=Li;g=q[c+28>>2];if(g-7>>>0<=1){rt(k,d,b,c+20|0);g=Zz(d,b);q[g+20>>2]=q[c+20>>2];if(q[c+28>>2]==8){q[c+24>>2]=q[c+24>>2]<<2;q[g+16>>2]=9}d=q[c+24>>2];i:{if(e>>>0>=d>>>0){b=d;d=e;break i}b=d;if(h){Ni(h);b=q[c+24>>2]}e=d<<4;h=$i((d&268435455)!=(d|0)?-1:e);Ui(h,0,e)}mt(g,h,b);e=0;l=0;m=0;n=0;p=0;s=0;t=0;u=0;if(q[c+28>>2]==7){b=hj(c+32|0);Zk(c+32|0,113725,128);m=Oi(c+32|0);n=Li;b=b+(c+32|0)|0;o[b|0]=0;Zk(c+32|0,113728,128);e=Oi(c+32|0);l=Li;o[b|0]=0;Zk(c+32|0,113731,128);p=Oi(c+32|0);s=Li;o[b|0]=0;Zk(c+32|0,113734,128);t=Oi(c+32|0);o[b|0]=0;u=Li}b=q[a+104>>2];if((b|0)==q[a+108>>2]){break b}q[a+104>>2]=b+40;q[b+32>>2]=t;q[b+36>>2]=u;q[b+24>>2]=p;q[b+28>>2]=s;q[b+16>>2]=e;q[b+20>>2]=l;q[b+8>>2]=m;q[b+12>>2]=n;q[b>>2]=g;e=d;break g}if(g-9>>>0>2){break g}rt(k,d,b,c+20|0);d=q[a+116>>2];if((q[a+120>>2]-d|0)/40>>>0<=j>>>0){break e}d=d+w(j,40)|0;o[d+35|0]=r[c+24|0];b=q[c+28>>2]-9|0;if(b>>>0>=3){break d}q[d+8>>2]=q[(b<<2)+114436>>2];j=j+1|0}f=f+1|0;if((i|0)!=(f|0)){continue}break}if(!h){break f}Ni(h)}Ii=c+160|0;return}J(114155,114013,479,114166);G()}J(113737,113682,296,113709);G()}J(113938,114013,493,114069);G()}J(114317,114013,533,114341);G()}function Hn(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{if(r[b|0]==62){d=q[a+8>>2]-16|0;f=q[d>>2];q[a+8>>2]=d;b=b+1|0;break j}d=q[c+96>>2];if(!d){break i}g=q[a+40>>2]+w(d,24)|0;f=q[q[g+4>>2]>>2]}if(!f){break i}e=r[b|0];k:{if(!e){j=1;break k}n=c+36|0;k=g-12|0;o=g-20|0;l=g-24|0;p=c+4|0;j=1;d=b;while(1){m=d;l:{m:{switch((e<<24>>24)-76|0){case 7:n:{if(r[f+6|0]){q[c+28>>2]=-1;d=140784;q[c+16>>2]=140784;h=140789;e=-1;break n}d=q[q[f+16>>2]+32>>2]+16|0;q[c+16>>2]=d;e=q[q[f+16>>2]+60>>2];q[c+28>>2]=e;h=e?140796:140791;e=q[q[f+16>>2]+64>>2]}q[c+12>>2]=h;q[c+32>>2]=e;Xk(n,d,60);break l;case 32:e=-1;o:{if(!g){break o}d=q[g+4>>2];if(q[d+8>>2]!=6){break o}h=q[d>>2];if(r[h+6|0]){break o}p:{if(q[a+20>>2]!=(g|0)){i=q[g+12>>2];break p}i=q[a+24>>2];q[g+12>>2]=i;h=q[d>>2]}d=q[h+16>>2];h=i-q[d+12>>2]|0;if((h|0)<4){break o}d=q[d+20>>2];if(!d){q[c+20>>2]=0;break l}e=q[d+((h>>2)-1<<2)>>2]}q[c+20>>2]=e;break l;case 41:q[c+24>>2]=r[f+7|0];break l;case 34:q:{if(!g){break q}d=q[g+4>>2];if(q[g+20>>2]>0?!(q[d+8>>2]!=6|r[q[d>>2]+6|0]):0){break q}e=q[o>>2];if(q[e+8>>2]!=6){break q}d=q[e>>2];if(r[d+6|0]){break q}h=q[q[d+16>>2]+12>>2];r:{if(q[a+20>>2]!=(l|0)){i=q[k>>2];break r}i=q[a+24>>2];q[k>>2]=i;d=q[e>>2]}d=q[(h+(i-q[q[d+16>>2]+12>>2]|0)|0)-4>>2];e=(d&63)-28|0;if(e>>>0>5|!(1<>>6&255,p);q[c+8>>2]=d;if(d){break l}}q[c+4>>2]=0;q[c+8>>2]=140765;break l;case 0:case 26:break l;default:break m}}j=0}d=m+1|0;e=r[m+1|0];if(e){continue}break}}if(!gk(b,102)){break f}c=q[a+8>>2];q[c+8>>2]=6;q[c>>2]=f;c=q[a+8>>2];e=0;break h}q[c+28>>2]=-1;q[c+32>>2]=-1;q[c+20>>2]=-1;q[c+12>>2]=140766;q[c+4>>2]=140765;q[c+8>>2]=140765;q[c+16>>2]=140771;Xk(c+36|0,140771,60);f=0;q[c+24>>2]=0;if(!gk(b,102)){j=1;e=1;break g}c=q[a+8>>2];q[c+8>>2]=0;j=1;e=1}d=a;if((q[d+28>>2]-c|0)<=16){Mk(a,1);c=q[a+8>>2]}q[d+8>>2]=c+16}if(!gk(b,76)){break a}if(e){break d}break e}if(!gk(b,76)){break a}}if(!r[f+6|0]){break c}}c=q[a+8>>2];q[c+8>>2]=0;break b}c=0;b=lp(a,0,0);d=q[f+16>>2];if(q[d+48>>2]>=1){d=q[d+20>>2];while(1){e=Zu(a,b,q[d+(c<<2)>>2]);q[e+8>>2]=1;q[e>>2]=1;c=c+1|0;if((c|0)>2]+48>>2]){continue}break}}c=q[a+8>>2];q[c+8>>2]=5;q[c>>2]=b;c=q[a+8>>2]}b=a;if((q[a+28>>2]-c|0)<=16){Mk(a,1);c=q[a+8>>2]}q[b+8>>2]=c+16}return j}function Bq(a,b,c,d,e,f,g){var h=0,i=x(0),j=x(0),k=0,l=0,m=0,n=0,p=0,s=0,t=0,v=0,w=0,z=0,A=x(0),B=0,C=0,D=0,E=0,F=x(0),G=x(0),H=0,I=x(0),J=0;n=Ii-16|0;Ii=n;z=7-b|0;v=b+1|0;b=-1<>2]*A)-j)*x(.5))+x(.5));a:{if(x(y(i))(p|0)?h:b;p=b;b=C;if((p|0)<(b|0)){h=b}C=h;h=k;p=b;i=x(x(x(x(u[d>>2]*A)-j)*x(.5))+x(.5));b:{if(x(y(i))(p|0)){h=b}p=h;t=C&255;h=k;l=b;i=x(x(x(x(u[c+4>>2]*A)-j)*x(.5))+x(.5));c:{if(x(y(i))(D|0)){h=b}D=h;l=t<>2]*A)-j)*x(.5))+x(.5));d:{if(x(y(i))(t|0)){h=b}t=h;m=l&255;h=k;B=b;i=x(x(x(x(u[c+8>>2]*A)-j)*x(.5))+x(.5));e:{if(x(y(i))(B|0)){h=b}B=h;s=m>>>v|0;h=k;m=b;i=x(x(x(x(u[d+8>>2]*A)-j)*x(.5))+x(.5));f:{if(x(y(i))(m|0)){h=b}m=h;E=l|s;h=k;l=b;i=x(x(x(x(u[c+12>>2]*A)-j)*x(.5))+x(.5));g:{if(x(y(i))(l|0)){h=b}l=h;j=x(x(x(x(u[d+12>>2]*A)-j)*x(.5))+x(.5));h:{if(x(y(j))>>v|h;h=(B&255)<>>v|h;h=(l&255)<>>v|h;h=(p&255)<>>v|h;h=(t&255)<>>v|h;h=(m&255)<>>v|h;s=n;h=b;w=b|w<<1;k=(k|0)<(w|0)?k:w;if((b|0)>(w|0)){k=h}b=(k&255)<>>v|b;b=0;i=x(0);j=x(0);F=x(0);if(a){while(1){s=b<<2;j=x(x((E&255)>>>0)-x(u[s+c>>2]*x(255)));i=x(i+x(j*j));j=x(x(r[b+n|0])-x(u[d+s>>2]*x(255)));F=x(F+x(j*j));b=b+1|0;if((b|0)!=(a|0)){E=r[(n+8|0)+b|0];continue}break}j=F}if(i>2]=h;o[e+3|0]=(l&254)>>>1;o[e+2|0]=(B&254)>>>1;o[e+1|0]=(D&254)>>>1;o[e|0]=(C&254)>>>1;I=i}if(!(j>2]=h;o[f+3|0]=(k&254)>>>1;o[f+2|0]=(m&254)>>>1;o[f+1|0]=(t&254)>>>1;o[f|0]=(p&254)>>>1;G=j}C=1;b=H;H=0;if(b){continue}break}Ii=n+16|0}function YK(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=x(0);i=Ii-288|0;Ii=i;a:{b:{c:{d:{e:{f:{g:{e=q[d+8>>2];if(e>>>0>=33){q[i+4>>2]=a;e=32;q[i>>2]=32;Pi(4,61636,61726,i);break g}if(e){break g}e=0;break f}a=0;while(1){if(t[d+8>>2]<=a>>>0){break e}f=(i+16|0)+(a<<3)|0;q[f>>2]=Oi(q[q[d+4>>2]+(a<<2)>>2]);q[f+4>>2]=Li;a=a+1|0;if((e|0)!=(a|0)){continue}break}}iu(i+16|0,(i+16|0)+(e<<3)|0,i+280|0);f=q[b>>2];Xz(f,e,i+16|0);q[f+152>>2]=q[d+20>>2];h=q[d+28>>2];l=q[d+24>>2];g=q[d+36>>2];if(g){m=q[d+32>>2];e=0;while(1){a=m+(e<<4)|0;j=Oi(q[a>>2]);k=Li;Bv(f,j,k,q[a+4>>2]);AH(f,j,k,q[a+8>>2],q[a+12>>2]);e=e+1|0;if((g|0)!=(e|0)){continue}break}}if(h){e=0;while(1){a=l+(e<<4)|0;g=Oi(q[a>>2]);m=Li;Bv(f,g,m,q[a+4>>2]);AH(f,g,m,q[a+8>>2],q[a+12>>2]);e=e+1|0;if((h|0)!=(e|0)){continue}break}}j7(f,q[d+60>>2],q[d- -64>>2]);if(q[d+52>>2]){m=q[d+48>>2];e=0;l=0;while(1){h=m+w(l,48)|0;a=Oi(q[h>>2]);g=Li;j=q[h+4>>2];if((j|0)>=3){break a}k=q[h+8>>2];if((k|0)>=3){break a}n=q[h+12>>2];if((n|0)>=6){break d}o=q[h+16>>2];if((o|0)>=2){break c}j=q[(j<<2)+61960>>2];k=q[(k<<2)+61960>>2];n=q[(n<<2)+62080>>2];o=q[(o<<2)+62080>>2];p=u[h+20>>2];e=zH(f,a,g,e,j,k,n,o,p)+e|0;g=q[h+28>>2];if(g){a=0;while(1){if(a>>>0>=g>>>0){break b}g=q[h+24>>2]+(a<<3)|0;e=zH(f,q[g>>2],q[g+4>>2],e,j,k,n,o,p)+e|0;a=a+1|0;g=q[h+28>>2];if(a>>>0>>0){continue}break}}l=l+1|0;if(l>>>0>2]){continue}break}}q[b+4>>2]=0;q[b+8>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;a=wp(f,q[c+40>>2],q[c+44>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+8>>2]}a=wp(f,q[c+48>>2],q[c+52>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+12>>2]}a=wp(f,q[c+56>>2],q[c+60>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+16>>2]}a=c- -64|0;a=wp(f,q[a>>2],q[a+4>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+20>>2]}a=wp(f,q[c+72>>2],q[c+76>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+24>>2]}a=wp(f,q[c+80>>2],q[c+84>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+28>>2]}a=wp(f,q[c+88>>2],q[c+92>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+32>>2]}a=wp(f,q[c+96>>2],q[c+100>>2]);if((a|0)!=-1){q[((a<<2)+b|0)+4>>2]=q[c+36>>2]}Ii=i+288|0;return}J(61803,61815,120,61870);G()}J(61972,61576,53,62050);G()}J(62104,61576,59,62168);G()}J(61803,61815,105,61870);G()}J(61881,61576,47,61945);G()}function g6(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Ii-5360|0;Ii=d;Ti(d+80|0,a,2188);e=d+220|0;a=wm(e,46);a:{if(!a){break a}if(!dj(a,32486)){o[a|0]=0;a=wm(e,46);if(!a){break a}}if(dj(a,32491)){if(dj(a,32497)){break a}}o[a|0]=0}b:{if(q[d+80>>2]!=1635022189|q[d+84>>2]!=6646882){a=-1;if(Ej(d+80|0,32479,7)){break b}}q[d+76>>2]=0;e=q[q[b>>2]+20>>2];a=-1;c:{if(!e){break c}a=Mi[e|0](q[b+4>>2],d+76|0)|0}if(a){Pi(4,32178,32503,0)}e=q[d+76>>2];nr(d+80|0,d+4320|0);nr(d+80|0,d+3296|0);Zk(d+3296|0,32486,1024);d:{e:{if(!bm(d+3296|0)){break e}a=hv(d+4320|0,d+3296|0);if(a){break d}q[d+52>>2]=d+4320;q[d+48>>2]=d+3296;Pi(2,32178,32679,d+48|0);if(!bm(d+3296|0)){break e}Mn(d+3296|0)}b=$i(2232);q[b+28>>2]=0;q[b+32>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+32>>2]=-1;q[c>>2]=b;q[b>>2]=0;qH(Ti(b+44|0,d+80|0,2188),d+2272|0);f:{g:{h:{if(!bm(d+2272|0)){break h}c=oH(d+80|0,b);if(!c){break h}a=d;c=c+21|0;i:{if(c>>>0<=21){c=q[(c<<2)+230968>>2];break i}c=26012}q[a+36>>2]=c;q[d+32>>2]=d+2272;Pi(4,32178,32544,d+32|0);q[d+16>>2]=d+2272;Pi(4,32178,32577,d+16|0);Mn(d+2272|0);q[b>>2]=0;break g}if(q[b>>2]){break f}}a=$i(44);q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;c=a+8|0;q[c>>2]=0;q[c+4>>2]=0;Jw(q[e+4>>2],q[57936],a+4|0);Jw(q[e+8>>2],q[57902],c);q[b>>2]=a}q[b+4>>2]=e;Lz(b);nr(d+80|0,d+4320|0);if(bm(d+4320|0)){vv(d+80|0,d+4320|0);a=0;if(!bm(d+4320|0)){break b}nr(d+80|0,d+4320|0);vv(d+80|0,d+3296|0);q[d+5356>>2]=0;j:{a=-5;c=b+8|0;e=nH(d+4320|0,d+3296|0,c,d+5356|0)+19|0;f=a;k:{if(!e){break k}if((e|0)==19){e=q[c>>2];if(e){break j}}f=-1e3}a=f;e=q[b>>2];if(e){No(e)}if(q[c>>2]){pr(c)}l:{if(o[b+40|0]&1){break l}c=q[b+20>>2];if(c){Ni(c)}c=q[b+12>>2];if(!c){break l}Ni(c)}Ni(b);break b}q[e+12>>2]=q[d+5356>>2];e=q[q[e+4>>2]>>2];e=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);if((e|0)!=5){q[d+4>>2]=e;q[d>>2]=5;Pi(4,32178,32591,d);e=q[b>>2];if(e){No(e)}if(q[c>>2]){pr(c)}m:{if(o[b+40|0]&1){break m}c=q[b+20>>2];if(c){Ni(c)}c=q[b+12>>2];if(!c){break m}Ni(c)}Ni(b);break b}Lz(b);a6(q[b+8>>2]);q[q[b>>2]>>2]=q[b+8>>2]}a=0;break b}q[d+72>>2]=a;q[d+68>>2]=d+4320;q[d+64>>2]=d+3296;Pi(4,32178,32643,d- -64|0);a=-3}Ii=d+5360|0;return a|0}function Lma(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=q[a+4>>2];b=q[c+16>>2];d=q[q[a+24>>2]>>2];if(d>>>0>2]-b>>3>>>0){f=q[b+(d<<3)>>2];h=q[c+4>>2];c=q[c>>2];if(f>>>0<(h-c|0)/240>>>0){a:{b=q[a+16>>2];d=q[a+20>>2];if(!((b|0)==q[73472]&(d|0)==q[73473]|(b|0)==q[73474]&(d|0)==q[73475]|(b|0)==q[73476]&(d|0)==q[73477])){if((b|0)!=q[73478]|(d|0)!=q[73479]){break a}}return fw(b,d,a+32|0,(c+w(f,240)|0)+48|0,293888)|0}b:{c:{if(!((b|0)==q[73486]&(d|0)==q[73487]|((b|0)==q[73482]&(d|0)==q[73483]|(b|0)==q[73484]&(d|0)==q[73485]))){if((b|0)!=q[73488]|(d|0)!=q[73489]){break c}}g=-9;c=c+w(f,240)|0;if(q[q[q[c+188>>2]>>2]+48>>2]==1){break b}return fw(b,d,a+32|0,c- -64|0,293928)|0}if((b|0)==q[73492]&(d|0)==q[73493]){g=-4;if(q[a+32>>2]){break b}m=v[a+40>>3];c=c+w(f,240)|0;a=s[c+234>>1];p[c+234>>1]=a|16;e=x(m);e=e>2]=a&2?x(x(1)-e):e;return 0}if((b|0)==q[73494]&(d|0)==q[73495]){g=-4;if(q[a+32>>2]){break b}u[(c+w(f,240)|0)+228>>2]=v[a+40>>3];return 0}if((b|0)==q[73360]&(d|0)==q[73361]){h=q[q[q[a+8>>2]+80>>2]>>2];b=a+32|0;a=c+w(f,240)|0;c=Qm(h,b,q[73342],q[73343],a+200|0);h=a;a=s[a+234>>1];p[h+234>>1]=(c?a&256:256)|a&65279;return c|0}k=c+w(f,240)|0;if((b|0)==q[73358]&(d|0)==q[73359]){b=q[q[q[a+8>>2]+80>>2]>>2];d=a+32|0;h=c+w(f,240)|0;a=h;g=Qm(b,d,q[73350],q[73351],a+196|0);i=s[a+234>>1];l=(g?i&256:256)|i&65279;p[a+234>>1]=l;if(g){break b}b=c+w(f,240)|0;d=q[a+196>>2];if(!d){d=q[q[(c+w(f,240)|0)+188>>2]+4>>2]}d:{a=q[d+20>>2];e:{if(!a){break e}g=q[b+208>>2];j=q[b+212>>2];a=q[q[d+16>>2]+(Cza(g,j,a)<<2)>>2];if((a|0)==-1){break e}n=q[d+24>>2];while(1){a=n+(a<<4)|0;if((g|0)==q[a>>2]&(j|0)==q[a+4>>2]){break d}a=q[a+12>>2];if((a|0)!=-1){continue}break}}p[h+234>>1]=l&65527;q[b+208>>2]=0;q[b+212>>2]=0;g=0;q[b+216>>2]=0;if(t[q[d+64>>2]+8>>2]>t[b+184>>2]){break b}q[b+184>>2]=0;return 0}a=c+w(f,240)|0;e=u[a+224>>2];e=i&2?x(x(1)-e):e;f:{if(!(i&1)){break f}e=x(e+e);if(e>x(1)^1){break f}e=x(x(2)-e)}mw(k,g,j,e,u[a+228>>2]);return 0}g=-13;if(q[73498]==(b|0)&q[73499]==(d|0)|q[73496]==(b|0)&q[73497]==(d|0)){break b}f=c+w(f,240)|0;c=q[f+200>>2];if(!c){c=q[q[f+188>>2]+8>>2]}g=Bp(q[c>>2],b,d,a+32|0,q[a+104>>2],243,k)}return g|0}}J(53716,53631,479,53341);G()}function en(a,b){var c=0,d=x(0),e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=0,l=x(0),m=0,n=x(0),o=x(0),p=x(0);a:{b:{c:{e=u[b+4>>2];f=u[b+8>>2];g=(e!=x(0))<<1|(f!=x(0))<<2;d=u[b>>2];switch(g|d!=x(0)){case 1:case 2:case 4:break b;case 0:break c;default:break a}}q[a+8>>2]=0;q[a+12>>2]=1065353216;q[a>>2]=0;q[a+4>>2]=0;return}k=q[70726];m=k;e=x(x(f+x(e+d))*x(.008726646192371845));c=+e*10430.378350470453;d:{if(y(c)<2147483648){b=~~c;break d}b=-2147483648}f=u[m+(((b>>>9|0)+1&127)<<2)>>2];d=u[k+(b>>>7&508)>>2];q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;n=d;d=x(x(b&511)*x(.001953125));u[a+12>>2]=x(n*x(x(1)-d))+x(d*f);b=(g<<1)+a|0;c=+x(e+x(-1.5707963705062866))*10430.378350470453;e:{if(y(c)<2147483648){a=~~c;break e}a=-2147483648}e=x(x(a&511)*x(.001953125));u[b>>2]=x(x(x(1)-e)*u[k+(a>>>7&508)>>2])+x(e*u[k+(((a>>>9|0)+1&127)<<2)>>2]);return}i=x(f*x(.008726646192371845));c=+i*10430.378350470453;f:{if(y(c)<2147483648){b=~~c;break f}b=-2147483648}f=x(x(b&511)*x(.001953125));h=x(x(1)-f);g=q[70726];j=u[g+(b>>>7&508)>>2];l=u[g+(((b>>>9|0)+1&127)<<2)>>2];o=x(e*x(.008726646192371845));c=+o*10430.378350470453;g:{if(y(c)<2147483648){b=~~c;break g}b=-2147483648}e=x(h*j);h=x(x(b&511)*x(.001953125));h=x(x(x(x(1)-h)*u[g+(b>>>7&508)>>2])+x(h*u[g+(((b>>>9|0)+1&127)<<2)>>2]));j=x(e+x(f*l));l=x(h*j);d=x(d*x(.008726646192371845));c=+d*10430.378350470453;h:{if(y(c)<2147483648){b=~~c;break h}b=-2147483648}e=x(x(b&511)*x(.001953125));e=x(x(x(x(1)-e)*u[g+(b>>>7&508)>>2])+x(e*u[g+(((b>>>9|0)+1&127)<<2)>>2]));c=+x(d+x(-1.5707963705062866))*10430.378350470453;i:{if(y(c)<2147483648){b=~~c;break i}b=-2147483648}f=x(x(b&511)*x(.001953125));f=x(x(x(x(1)-f)*u[g+(b>>>7&508)>>2])+x(f*u[g+(((b>>>9|0)+1&127)<<2)>>2]));c=+x(i+x(-1.5707963705062866))*10430.378350470453;j:{if(y(c)<2147483648){b=~~c;break j}b=-2147483648}d=x(x(b&511)*x(.001953125));i=x(x(x(x(1)-d)*u[g+(b>>>7&508)>>2])+x(d*u[g+(((b>>>9|0)+1&127)<<2)>>2]));p=x(i*f);m=a;n=x(l*e);c=+x(o+x(-1.5707963705062866))*10430.378350470453;k:{if(y(c)<2147483648){b=~~c;break k}b=-2147483648}d=x(x(b&511)*x(.001953125));d=x(x(x(x(1)-d)*u[g+(b>>>7&508)>>2])+x(d*u[g+(((b>>>9|0)+1&127)<<2)>>2]));u[m+12>>2]=n-x(d*p);u[a+8>>2]=x(x(h*i)*e)-x(j*x(f*d));u[a+4>>2]=x(x(d*j)*e)+x(h*p);u[a>>2]=x(x(d*i)*e)+x(l*f)}function iD(a,b){var c=0,d=0,e=0,f=0;if(q[b>>2]>=1){while(1){o[(a+d|0)+1280|0]=1;d=d+1|0;e=e+1|0;if((e|0)>2]){continue}break}}if(q[b+4>>2]>0){while(1){o[(a+d|0)+1280|0]=2;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+8>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=3;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+12>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=4;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+16>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=5;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+20>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=6;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+24>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=7;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+28>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=8;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+32>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=9;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+36>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=10;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+40>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=11;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+44>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=12;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+48>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=13;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+52>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=14;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+56>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=15;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}if(q[b+60>>2]>=1){c=0;while(1){o[(a+d|0)+1280|0]=16;d=d+1|0;c=c+1|0;if((c|0)>2]){continue}break}}b=0;o[(a+d|0)+1280|0]=0;e=1;d=0;while(1){f=(e<<2)+a|0;q[f+1612>>2]=d-b;a:{if(r[(a+d|0)+1280|0]!=(e|0)){break a}while(1){c=b;p[((d<<1)+a|0)+512>>1]=b;b=b+1|0;d=d+1|0;if(r[(d+a|0)+1280|0]==(e|0)){continue}break}if(!(c>>>e|0)){break a}q[213145]=169269;return 0}q[f+1540>>2]=b<<16-e;b=b<<1;e=e+1|0;if((e|0)!=17){continue}break}q[a+1608>>2]=-1;b=Ui(a,255,512);if((d|0)>=1){a=0;while(1){c=r[(a+b|0)+1280|0];if(c>>>0<=9){e=9-c|0;c=1<>1]<1?c:1)}a=a+1|0;if((d|0)!=(a|0)){continue}break}}return 1}function qB(a,b){var c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=0,o=x(0),p=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=0,z=0,A=0,B=x(0);n=Ii-32|0;Ii=n;y=Mi[q[74933]](q[b+2384>>2])|0;z=Mi[q[74934]](q[b+2384>>2])|0;A=r[a+160|0];j=u[a+8>>2];Ip(n+16|0,q[a>>2]);c=x(y>>>0);d=x(z>>>0);a:{if(r[a+160|0]&4){f=x(1);k=x(Mi[q[74935]](q[b+2384>>2]));h=u[a+24>>2];d=x(x(d/k)/h);e=x(d*x(.5));j=x(d*x(-.5));d=x(x(1)/x(e-j));e=x(d*x(-x(j+e)));c=x(x(c/k)/h);h=x(c*x(.5));c=x(c*x(-.5));k=x(x(1)/x(h-c));h=x(k*x(-x(c+h)));j=u[a+16>>2];g=u[a+20>>2];c=x(x(1)/x(j-g));j=x(x(j+g)*c);g=x(d+d);d=x(k+k);k=x(c+c);c=x(0);break a}f=u[a+16>>2];e=u[a+20>>2];h=x(x(1)/x(f-e));k=x(x(f+e)*h);g=WC(x(x(u[a+12>>2]*x(-.5))+x(1.5707963705062866)));d=x(g/(A&1?x(c/d):j));c=x(x(f*e)*h);j=x(c+c);h=x(0);e=x(0);f=x(0);c=x(-1)}u[a+96>>2]=d;q[a+100>>2]=0;q[a+104>>2]=0;q[a+108>>2]=0;q[a+112>>2]=0;q[a+120>>2]=0;q[a+124>>2]=0;u[a+116>>2]=g;q[a+128>>2]=0;q[a+132>>2]=0;u[a+156>>2]=f;u[a+152>>2]=j;u[a+148>>2]=e;u[a+144>>2]=h;u[a+140>>2]=c;u[a+136>>2]=k;Ht(n,q[a>>2]);k=u[n+24>>2];h=u[n+16>>2];j=u[n+20>>2];c=u[n+4>>2];d=u[n>>2];f=u[n+8>>2];e=u[n+12>>2];q[a+92>>2]=1065353216;q[a+76>>2]=0;q[a+60>>2]=0;q[a+44>>2]=0;o=x(f*x(0));p=x(e*x(0));g=x(d+x(o+p));s=x(d*x(0));t=x(c*x(0));l=x(x(s+t)-f);i=x(x(s-e)-t);v=x(x(p-c)-o);m=x(k-x(k+x(x(d*g)+x(x(x(f*l)+x(e*i))-x(c*v)))));w=m;B=x(m*m);m=x(h-x(h+x(x(c*i)+x(x(x(d*l)+x(e*v))-x(f*g)))));l=x(j-x(j+x(x(f*v)+x(x(x(c*l)+x(e*g))-x(d*i)))));i=x(x(1)/x(F(x(B+x(x(m*m)+x(l*l))))));g=x(w*i);u[a+72>>2]=g;l=x(l*i);u[a+56>>2]=l;i=x(m*i);u[a+40>>2]=i;u[a+88>>2]=-x(x(h*i)+x(x(j*l)+x(k*g)));v=x(x(d+p)-t);m=x(x(c+s)+o);p=x(x(t+p)-f);o=x(x(o+e)-s);s=x(x(c*v)+x(x(x(d*m)+x(e*p))-x(f*o)));t=x(x(d*o)+x(x(x(f*m)+x(e*v))-x(c*p)));c=x(x(f*p)+x(x(x(c*m)+x(e*o))-x(d*v)));d=x(x(1)/x(F(x(x(t*t)+x(x(c*c)+x(s*s))))));e=x(s*d);f=x(c*d);c=x(x(e*l)-x(f*i));m=c;w=x(c*c);c=x(t*d);f=x(x(f*g)-x(c*l));d=x(x(c*i)-x(e*g));e=x(x(1)/x(F(x(w+x(x(f*f)+x(d*d))))));c=x(m*e);u[a- -64>>2]=c;d=x(d*e);u[a+48>>2]=d;f=x(f*e);u[a+32>>2]=f;e=x(x(i*d)-x(l*f));u[a+68>>2]=e;i=x(x(g*f)-x(i*c));u[a+52>>2]=i;g=x(x(l*c)-x(g*d));u[a+36>>2]=g;u[a+80>>2]=-x(x(h*f)+x(x(j*d)+x(k*c)));u[a+84>>2]=-x(x(h*g)+x(x(j*i)+x(k*e)));Ii=n+32|0}function BN(a,b){var c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;d=q[a+60>>2];q[c+56>>2]=q[a+56>>2];q[c+60>>2]=d;d=q[a+52>>2];q[c+48>>2]=q[a+48>>2];q[c+52>>2]=d;d=q[a+44>>2];q[c+40>>2]=q[a+40>>2];q[c+44>>2]=d;d=q[a+36>>2];q[c+32>>2]=q[a+32>>2];q[c+36>>2]=d;d=q[a+28>>2];q[c+24>>2]=q[a+24>>2];q[c+28>>2]=d;d=q[a+20>>2];q[c+16>>2]=q[a+16>>2];q[c+20>>2]=d;d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;d=q[a+12>>2];q[c+8>>2]=q[a+8>>2];q[c+12>>2]=d;vo(c);vo(c);vo(c);vo(c);vo(c);vo(c);vo(c);vo(c);vo(c);vo(c);d=q[c>>2]+q[a>>2]|0;q[c>>2]=d;e=q[c+4>>2]+q[a+4>>2]|0;q[c+4>>2]=e;q[c+8>>2]=q[c+8>>2]+q[a+8>>2];q[c+12>>2]=q[c+12>>2]+q[a+12>>2];q[c+16>>2]=q[c+16>>2]+q[a+16>>2];q[c+20>>2]=q[c+20>>2]+q[a+20>>2];q[c+24>>2]=q[c+24>>2]+q[a+24>>2];q[c+28>>2]=q[c+28>>2]+q[a+28>>2];q[c+32>>2]=q[c+32>>2]+q[a+32>>2];q[c+36>>2]=q[c+36>>2]+q[a+36>>2];q[c+40>>2]=q[c+40>>2]+q[a+40>>2];q[c+44>>2]=q[c+44>>2]+q[a+44>>2];q[c+48>>2]=q[c+48>>2]+q[a+48>>2];q[c+52>>2]=q[c+52>>2]+q[a+52>>2];q[c+56>>2]=q[c+56>>2]+q[a+56>>2];q[c+60>>2]=q[c+60>>2]+q[a+60>>2];o[b+7|0]=e>>>24;o[b+6|0]=e>>>16;o[b+5|0]=e>>>8;o[b+4|0]=e;o[b+3|0]=d>>>24;o[b+2|0]=d>>>16;o[b+1|0]=d>>>8;o[b|0]=d;a=q[c+8>>2];o[b+8|0]=a;o[b+9|0]=a>>>8;o[b+10|0]=a>>>16;o[b+11|0]=a>>>24;a=q[c+12>>2];o[b+12|0]=a;o[b+13|0]=a>>>8;o[b+14|0]=a>>>16;o[b+15|0]=a>>>24;a=q[c+16>>2];o[b+16|0]=a;o[b+17|0]=a>>>8;o[b+18|0]=a>>>16;o[b+19|0]=a>>>24;a=q[c+20>>2];o[b+20|0]=a;o[b+21|0]=a>>>8;o[b+22|0]=a>>>16;o[b+23|0]=a>>>24;a=q[c+24>>2];o[b+24|0]=a;o[b+25|0]=a>>>8;o[b+26|0]=a>>>16;o[b+27|0]=a>>>24;a=q[c+28>>2];o[b+28|0]=a;o[b+29|0]=a>>>8;o[b+30|0]=a>>>16;o[b+31|0]=a>>>24;a=q[c+32>>2];o[b+32|0]=a;o[b+33|0]=a>>>8;o[b+34|0]=a>>>16;o[b+35|0]=a>>>24;a=q[c+36>>2];o[b+36|0]=a;o[b+37|0]=a>>>8;o[b+38|0]=a>>>16;o[b+39|0]=a>>>24;a=q[c+40>>2];o[b+40|0]=a;o[b+41|0]=a>>>8;o[b+42|0]=a>>>16;o[b+43|0]=a>>>24;a=q[c+44>>2];o[b+44|0]=a;o[b+45|0]=a>>>8;o[b+46|0]=a>>>16;o[b+47|0]=a>>>24;a=q[c+48>>2];o[b+48|0]=a;o[b+49|0]=a>>>8;o[b+50|0]=a>>>16;o[b+51|0]=a>>>24;a=q[c+52>>2];o[b+52|0]=a;o[b+53|0]=a>>>8;o[b+54|0]=a>>>16;o[b+55|0]=a>>>24;a=q[c+56>>2];o[b+56|0]=a;o[b+57|0]=a>>>8;o[b+58|0]=a>>>16;o[b+59|0]=a>>>24;a=q[c+60>>2];o[b+60|0]=a;o[b+61|0]=a>>>8;o[b+62|0]=a>>>16;o[b+63|0]=a>>>24;Mi[q[65677]](c,0,64)|0;Ii=c- -64|0}function I6(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=q[b+4>>2];d=q[c+16>>2];g=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);h=g<<6;i=g<<4;d=$i((h+i|0)+128|0);q[a>>2]=d;a:{if(!(o[b+20|0]&1)){e=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);f=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[d|0]=f;o[d+1|0]=f>>>8;o[d+2|0]=f>>>16;o[d+3|0]=f>>>24;o[d+4|0]=e;o[d+5|0]=e>>>8;o[d+6|0]=e>>>16;o[d+7|0]=e>>>24;e=r[c+44|0]|r[c+45|0]<<8|(r[c+46|0]<<16|r[c+47|0]<<24);f=r[c+40|0]|r[c+41|0]<<8|(r[c+42|0]<<16|r[c+43|0]<<24);o[d+40|0]=f;o[d+41|0]=f>>>8;o[d+42|0]=f>>>16;o[d+43|0]=f>>>24;o[d+44|0]=e;o[d+45|0]=e>>>8;o[d+46|0]=e>>>16;o[d+47|0]=e>>>24;e=r[c+36|0]|r[c+37|0]<<8|(r[c+38|0]<<16|r[c+39|0]<<24);f=r[c+32|0]|r[c+33|0]<<8|(r[c+34|0]<<16|r[c+35|0]<<24);o[d+32|0]=f;o[d+33|0]=f>>>8;o[d+34|0]=f>>>16;o[d+35|0]=f>>>24;o[d+36|0]=e;o[d+37|0]=e>>>8;o[d+38|0]=e>>>16;o[d+39|0]=e>>>24;e=r[c+28|0]|r[c+29|0]<<8|(r[c+30|0]<<16|r[c+31|0]<<24);f=r[c+24|0]|r[c+25|0]<<8|(r[c+26|0]<<16|r[c+27|0]<<24);o[d+24|0]=f;o[d+25|0]=f>>>8;o[d+26|0]=f>>>16;o[d+27|0]=f>>>24;o[d+28|0]=e;o[d+29|0]=e>>>8;o[d+30|0]=e>>>16;o[d+31|0]=e>>>24;e=r[c+20|0]|r[c+21|0]<<8|(r[c+22|0]<<16|r[c+23|0]<<24);f=r[c+16|0]|r[c+17|0]<<8|(r[c+18|0]<<16|r[c+19|0]<<24);o[d+16|0]=f;o[d+17|0]=f>>>8;o[d+18|0]=f>>>16;o[d+19|0]=f>>>24;o[d+20|0]=e;o[d+21|0]=e>>>8;o[d+22|0]=e>>>16;o[d+23|0]=e>>>24;e=r[c+12|0]|r[c+13|0]<<8|(r[c+14|0]<<16|r[c+15|0]<<24);c=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);o[d+8|0]=c;o[d+9|0]=c>>>8;o[d+10|0]=c>>>16;o[d+11|0]=c>>>24;o[d+12|0]=e;o[d+13|0]=e>>>8;o[d+14|0]=e>>>16;o[d+15|0]=e>>>24;Ti(Ti(d+48|0,q[q[b+8>>2]+1024>>2],h)+(g+1<<6)|0,q[q[b+8>>2]+1028>>2],i);break a}b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[c+44>>2];q[d+40>>2]=q[c+40>>2];q[d+44>>2]=b;b=q[c+36>>2];q[d+32>>2]=q[c+32>>2];q[d+36>>2]=b;b=q[c+28>>2];q[d+24>>2]=q[c+24>>2];q[d+28>>2]=b;b=q[c+20>>2];q[d+16>>2]=q[c+16>>2];q[d+20>>2]=b;b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b;b=q[c+24>>2];d=Ti(d+48|0,c+(b<<8&16711680|b<<24|(b>>>8&65280|b>>>24))|0,h)+(g+1<<6)|0;b=q[c+20>>2];Ti(d,c+(b<<8&16711680|b<<24|(b>>>8&65280|b>>>24))|0,i)}b=q[a>>2];a=q[b+20>>2];a=(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))- -64|0;q[b+20>>2]=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24)}function paa(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0,u=0;g=Ii-224|0;Ii=g;u=q[a+48>>2];Gj(u);q[e>>2]=0;a:{b:{c:{d:{e:{f:{if(r[c|0]?0:!d){break f}i=Oi(b);j=Li;wn(g+192|0,0);Cl(g+192|0,b,hj(b));Cl(g+192|0,c,hj(c));l=a+16|0;m=ro(g+192|0);n=Li;g:{h:{h=q[a+20>>2];i:{if(!h){break i}f=q[q[l>>2]+(Cza(i,j,h)<<2)>>2];if((f|0)==-1){break i}k=q[a+24>>2];while(1){t=k+w(f,136)|0;if((i|0)==q[t>>2]&(j|0)==q[t+4>>2]){break h}f=q[t+128>>2];if((f|0)!=-1){continue}break}}Ui(g+72|0,0,120);f=q[a+40>>2];if((f|0)==((q[a+32>>2]-q[a+24>>2]|0)/136|0)){f=f+128|0;h=f<<1;XI(l,h>>>0<3?1:(h>>>0)/3|0,f)}YI(l,i,j,g+72|0);h=q[a+20>>2];break g}f=k+w(f,136)|0;if(!(!r[c|0]|((m|0)!=q[f+80>>2]|(n|0)!=q[f+84>>2]))){q[g+68>>2]=c;q[g+64>>2]=b;Pi(3,166128,166243,g- -64|0);break f}f=s[f+120>>1];if(f&255){q[g+52>>2]=c;q[g+48>>2]=b;Pi(3,166128,166312,g+48|0);break f}if(!(f&256)){break g}q[g+36>>2]=c;q[g+32>>2]=b;Pi(3,166128,166380,g+32|0);break f}k=0;j:{if(!h){break j}f=q[q[l>>2]+(Cza(i,j,h)<<2)>>2];if((f|0)==-1){break j}l=q[a+24>>2];while(1){f=w(f,136);k=f+l|0;h=k;if((i|0)==q[h>>2]&(j|0)==q[h+4>>2]){break j}f=q[(f+l|0)+128>>2];if((f|0)!=-1){continue}break}k=0}f=k?k+8|0:0;Pj(f,c,64);c=S8(q[a+84>>2],b);q[f+72>>2]=m;q[f+76>>2]=n;q[f+64>>2]=c;q[f+80>>2]=Jk();q[f+84>>2]=Li;i=f;h=f;if(d){j=w(d,1e6);d=Jk()+j|0;c=Li;c=d>>>0>>0?c+1|0:c}else{c=0;d=0}q[h+88>>2]=d;q[i+92>>2]=c;p[f+112>>1]=s[f+112>>1]|256;d=s[a+56>>1];c=s[a+58>>1];if((d|0)==(c|0)){break f}f=q[a+52>>2];if(!f){break e}if(c>>>0>=d>>>0){break d}p[a+58>>1]=c+1;c=s[f+(c<<1)>>1];f=q[a>>2];i=hj(f)+10|0;d=Yi(i);q[g+20>>2]=c;q[g+16>>2]=f;sj(d,i,166452,g+16|0);f=dl(d,166176);if(!f){q[g>>2]=d;Pi(4,166128,166464,g);Ni(d);d=q[a+52>>2];if(!d){break c}b=s[a+58>>1];if(!b|b>>>0>s[a+56>>1]){break b}e=a;a=b-1|0;p[e+58>>1]=a;p[d+((a&65535)<<1)>>1]=c;break f}h=q[a+68>>2];a=q[a+64>>2];if(c>>>0>=h-a>>6>>>0){break a}a=a+(c<<6)|0;p[a+56>>1]=c;wn(a+8|0,0);q[a+40>>2]=m;q[a+44>>2]=n;q[a>>2]=d;q[a+4>>2]=f;q[a+48>>2]=Oi(b);q[a+52>>2]=Li;o[a+58|0]=r[a+58|0]&254;q[e>>2]=a}Bj(u);Ii=g+224|0;return}J(167324,167163,151,167331);G()}J(167335,167163,152,167331);G()}J(167324,167163,140,167355);G()}J(167360,167163,141,167355);G()}J(167214,167188,479,167225);G()}function Qy(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-128|0;Ii=d;a:{b:{switch(q[c>>2]){case 4:bj(a,q[c+8>>2],q[c+16>>2]);break a;case 5:g=v[c+8>>3];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=g;q[a+8>>2]=q[a+8>>2]+16;break a;case 6:b=q[c+8>>2];c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;break a;case 0:c=q[b+20>>2];q[b+20>>2]=c+1;c:{if((c|0)>2]+1348>>2]){if(fq(a,3)){break c}}Im(q[b+12>>2]);c=q[b>>2];e=q[b+8>>2];q[d+64>>2]=q[b+20>>2];q[d+68>>2]=e-c;Qi(a,139747,d- -64|0)}vj(a,0,0);ho(b,d+104|0);d:{c=q[d+104>>2];if((c|0)==1){break d}e=d+112|0;while(1){if((c|0)!=4){Im(q[b+12>>2]);c=q[d+104>>2];c=q[((c|0)==12?e:(c<<2)+255472|0)>>2];q[d+48>>2]=139703;q[d+52>>2]=c;q[d+56>>2]=q[d+108>>2]+1;Qi(a,139825,d+48|0)}bj(a,q[d+112>>2],q[d+120>>2]);ho(b,d+104|0);if(q[d+104>>2]!=8){Im(q[b+12>>2]);c=q[d+104>>2];c=q[((c|0)==12?e:(c<<2)+255472|0)>>2];q[d+32>>2]=139721;q[d+36>>2]=c;q[d+40>>2]=q[d+108>>2]+1;Qi(a,139825,d+32|0)}ho(b,d+104|0);Qy(a,b,d+104|0);Ij(a,-3);ho(b,d+104|0);e:{switch(q[d+104>>2]-1|0){default:Im(q[b+12>>2]);c=q[d+104>>2];c=q[((c|0)==12?e:(c<<2)+255472|0)>>2];q[d+16>>2]=139727;q[d+20>>2]=c;q[d+24>>2]=q[d+108>>2]+1;Qi(a,139825,d+16|0);break;case 0:break d;case 8:break e}}ho(b,d+104|0);c=q[d+104>>2];continue}}q[b+20>>2]=q[b+20>>2]-1;break a;case 2:c=q[b+20>>2];q[b+20>>2]=c+1;f:{if((c|0)>2]+1348>>2]){if(fq(a,2)){break f}}Im(q[b+12>>2]);c=q[b>>2];e=q[b+8>>2];q[d+96>>2]=q[b+20>>2];q[d+100>>2]=e-c;Qi(a,139747,d+96|0)}vj(a,0,0);if(q[q[b+16>>2]+1352>>2]){c=q[a+8>>2];q[c+8>>2]=2;q[c>>2]=841764;q[a+8>>2]=q[a+8>>2]+16;jl(a,-1e4);xj(a,-2)}ho(b,d+104|0);g:{if(q[d+104>>2]==3){break g}e=d+112|0;c=1;while(1){Qy(a,b,d+104|0);nk(a,-2,c);ho(b,d+104|0);h:{switch(q[d+104>>2]-3|0){default:Im(q[b+12>>2]);f=q[d+104>>2];f=q[((f|0)==12?e:(f<<2)+255472|0)>>2];q[d+80>>2]=139806;q[d+84>>2]=f;q[d+88>>2]=q[d+108>>2]+1;Qi(a,139825,d+80|0);break;case 0:break g;case 6:break h}}ho(b,d+104|0);c=c+1|0;continue}}q[b+20>>2]=q[b+20>>2]-1;break a;case 7:b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;break a;default:break b}}Im(q[b+12>>2]);b=q[c>>2];b=q[((b|0)==12?c+8|0:(b<<2)+255472|0)>>2];q[d+8>>2]=q[c+4>>2]+1;q[d+4>>2]=b;q[d>>2]=139697;Qi(a,139825,d)}Ii=d+128|0}function sk(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,v=x(0),w=0,y=0,z=x(0),A=0,B=0,C=0,D=0,E=0,F=0;g=q[a+40>>2];h=q[a+44>>2];i=q[a+24>>2];j=q[a+28>>2];k=u[a+56>>2];l=q[a>>2];m=q[a+4>>2];n=q[a+16>>2];o=q[a+20>>2];p=q[a+32>>2];r=q[a+36>>2];s=q[a+48>>2];t=q[a+52>>2];v=u[a+8>>2];f=q[a+76>>2];c=Ii+ -64|0;e=c+44|0;q[e>>2]=q[a+72>>2];q[e+4>>2]=f;e=q[a+84>>2];q[c+52>>2]=q[a+80>>2];q[c+56>>2]=e;q[c+60>>2]=q[a+88>>2];e=q[a+68>>2];q[c+36>>2]=q[a+64>>2];q[c+40>>2]=e;e=q[a+104>>2];f=q[a+108>>2];w=q[a+120>>2];y=q[a+124>>2];z=u[a+136>>2];A=q[a+96>>2];B=q[a+100>>2];C=q[a+112>>2];D=q[a+116>>2];E=q[a+128>>2];F=q[a+132>>2];d=q[a+156>>2];q[c+24>>2]=q[a+152>>2];q[c+28>>2]=d;d=q[a+148>>2];q[c+16>>2]=q[a+144>>2];q[c+20>>2]=d;u[a>>2]=u[b>>2];u[a+4>>2]=u[b+4>>2];u[a+8>>2]=u[b+8>>2];u[a+16>>2]=u[b+16>>2];u[a+20>>2]=u[b+20>>2];u[a+24>>2]=u[b+24>>2];u[a+28>>2]=u[b+28>>2];u[a+32>>2]=u[b+32>>2];u[a+36>>2]=u[b+36>>2];u[a+40>>2]=u[b+40>>2];u[a+44>>2]=u[b+44>>2];u[a+48>>2]=u[b+48>>2];u[a+52>>2]=u[b+52>>2];u[a+56>>2]=u[b+56>>2];d=q[b+68>>2];q[a+64>>2]=q[b+64>>2];q[a+68>>2]=d;d=q[b+76>>2];q[a+72>>2]=q[b+72>>2];q[a+76>>2]=d;d=q[b+84>>2];q[a+80>>2]=q[b+80>>2];q[a+84>>2]=d;q[a+88>>2]=q[b+88>>2];u[a+96>>2]=u[b+96>>2];u[a+100>>2]=u[b+100>>2];u[a+104>>2]=u[b+104>>2];u[a+108>>2]=u[b+108>>2];u[a+112>>2]=u[b+112>>2];u[a+116>>2]=u[b+116>>2];u[a+120>>2]=u[b+120>>2];u[a+124>>2]=u[b+124>>2];u[a+128>>2]=u[b+128>>2];u[a+132>>2]=u[b+132>>2];u[a+136>>2]=u[b+136>>2];d=q[b+156>>2];q[a+152>>2]=q[b+152>>2];q[a+156>>2]=d;d=q[b+148>>2];q[a+144>>2]=q[b+144>>2];q[a+148>>2]=d;u[b+56>>2]=k;u[b+8>>2]=v;q[b+24>>2]=i;q[b+28>>2]=j;q[b+48>>2]=s;q[b+52>>2]=t;q[b+32>>2]=p;q[b+36>>2]=r;q[b+16>>2]=n;q[b+20>>2]=o;q[b>>2]=l;q[b+4>>2]=m;q[b+40>>2]=g;q[b+44>>2]=h;q[b+88>>2]=q[c+60>>2];a=q[c+56>>2];q[b+80>>2]=q[c+52>>2];q[b+84>>2]=a;a=q[c+48>>2];q[b+72>>2]=q[c+44>>2];q[b+76>>2]=a;a=q[c+40>>2];q[b+64>>2]=q[c+36>>2];q[b+68>>2]=a;u[b+136>>2]=z;q[b+128>>2]=E;q[b+132>>2]=F;q[b+120>>2]=w;q[b+124>>2]=y;q[b+112>>2]=C;q[b+116>>2]=D;q[b+104>>2]=e;q[b+108>>2]=f;q[b+96>>2]=A;q[b+100>>2]=B;a=q[c+28>>2];q[b+152>>2]=q[c+24>>2];q[b+156>>2]=a;a=q[c+20>>2];q[b+144>>2]=q[c+16>>2];q[b+148>>2]=a}function fma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=0,i=0,j=x(0),k=x(0),l=0,m=0,n=0,o=0,p=0;b=Ii-640|0;Ii=b;i=q[a+8>>2]-q[a+12>>2]>>4;f=jk(a);d=q[q[f+80>>2]+8>>2];q[b+624>>2]=0;q[b+628>>2]=0;q[b+616>>2]=0;q[b+620>>2]=0;q[b+608>>2]=0;q[b+612>>2]=0;q[b+600>>2]=0;q[b+604>>2]=0;mo(a,70062,0,b+636|0,b+600|0);a:{b:{if((i|0)<2){break b}if(!Vi(a,2)){break b}c=Bl(a,2);e=q[c+4>>2];h=q[c>>2];u[b+584>>2]=u[c+8>>2];q[b+576>>2]=h;q[b+580>>2]=e;break a}Ip(b+48|0,f);u[b+576>>2]=u[b+48>>2];c=q[b+56>>2];q[b+580>>2]=q[b+52>>2];q[b+584>>2]=c}c:{d:{if((i|0)<3){break d}if(!Vi(a,3)){break d}c=kr(a,3);u[b+560>>2]=u[c>>2];u[b+564>>2]=u[c+4>>2];u[b+568>>2]=u[c+8>>2];u[b+572>>2]=u[c+12>>2];break c}Ht(b+48|0,f);c=q[b+52>>2];q[b+560>>2]=q[b+48>>2];q[b+564>>2]=c;c=q[b+60>>2];q[b+568>>2]=q[b+56>>2];q[b+572>>2]=c}c=Bw(a);e:{f:{g:{if((i|0)<=3){break g}h:{if(!Vi(a,4)){break h}e=c?512:432;m=ft(a,c?b+48|0:b+128|0,e,4);if(m>>>0<=e>>>0){break h}d=Qi(a,70358,0);break e}if((i|0)<5){break g}if(!Vi(a,5)){break g}e=Om(a,5);if(e){j=u[e>>2];u[b+32>>2]=j;k=u[e+4>>2];u[b+36>>2]=k;g=u[e+8>>2];u[b+40>>2]=g;break f}g=x(fj(a,5));u[b+40>>2]=g;u[b+36>>2]=g;u[b+32>>2]=g;k=g;j=g;break f}Lr(b,f);j=u[b>>2];u[b+32>>2]=j;k=u[b+4>>2];u[b+36>>2]=k;g=u[b+8>>2];u[b+40>>2]=g}i:{e=LB(d);j:{k:{if((e|0)!=-1){h=IB(e);l=Li;if(!c){q[b+112>>2]=e;q[b+80>>2]=h;q[b+84>>2]=l;u[b+48>>2]=u[b+576>>2];c=q[b+584>>2];q[b+52>>2]=q[b+580>>2];q[b+56>>2]=c;c=q[b+564>>2];q[b+64>>2]=q[b+560>>2];q[b+68>>2]=c;u[b+104>>2]=g;u[b+100>>2]=k;u[b+96>>2]=j;c=q[b+572>>2];q[b+72>>2]=q[b+568>>2];q[b+76>>2]=c;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;if(!qm(a,b)){break i}d=q[58592];vk(b,b+600|0,q[d+8>>2],q[d+12>>2],f,d,b+48|0,m+80|0);lk(a,h,l);break j}gj(a);n=zk(a,-1e4);c=d;p=Roa(c,q[b+636>>2]);o=q[b+636>>2];f=q[o+4>>2];if(!f){f=q[o>>2]}f=VL(c,p,q[f+4>>2],h,l,b+48|0,m,b+576|0,b+560|0,b+32|0);l:{if(f){if(f){q[f+88>>2]=e}break l}vB(e,d)}rj(a,-1e4,n);yk(a);Rj(a,-1e4,n);if(!f){break k}lk(a,h,l);break j}Pi(4,70469,70477,0)}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16}d=1;if((i+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break e}J(70544,70569,362,70611);G()}vB(e,d);d=Qi(a,70414,0)}Ii=b+640|0;return d|0}function oZ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{switch(b|0){case 13:Xu(a,c);return;case 14:Nm(a,c);e:{f:{g:{h:{i:{j:{switch(q[c>>2]-1|0){case 1:g=q[a+32>>2];q[a+32>>2]=-1;d=fl(a,2147450902,q[q[a+12>>2]+8>>2]);if((g|0)==-1){break f}if((d|0)==-1){d=g;break e}i=q[q[a>>2]+12>>2];b=d;while(1){e=b;h=(b<<2)+i|0;f=q[h>>2];b=(f>>>14|0)-131071|0;b=(b|0)==-1?-1:(e+b|0)+1|0;if((b|0)!=-1){continue}break}b=h;g=g+(e^-1)|0;e=g>>31;if((e^e+g)>=131072){Sj(q[a+12>>2],141849);f=q[h>>2]}q[b>>2]=(f&16383|g<<14)+2147467264;break f;case 9:d=q[c+8>>2];break f;case 10:b=q[a>>2];d=q[q[b+12>>2]+(q[c+8>>2]<<2)>>2];if((d&63)!=19){break i}q[a+24>>2]=q[a+24>>2]-1;d=uo(a,26,d>>>23|0,0,0);break f;case 0:case 2:break a;case 11:break h;default:break j}}b=q[a>>2]}e=q[a+36>>2];f=e+1|0;k:{if((e|0)=249){Sj(q[a+12>>2],141814);d=q[a+36>>2]+1|0;b=q[a>>2]}o[b+75|0]=f}q[a+36>>2]=d;Nw(a,c,d-1|0);if(q[c>>2]!=12){break g}}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}d=uo(a,27,255,q[c+8>>2],1)}if((d|0)==-1){break a}}b=q[c+16>>2];if((b|0)==-1){break b}g=q[q[a>>2]+12>>2];while(1){e=b;h=g+(b<<2)|0;f=q[h>>2];b=(f>>>14|0)-131071|0;b=(b|0)==-1?-1:(e+b|0)+1|0;if((b|0)!=-1){continue}break}b=h;e=(e^-1)+d|0;d=e>>31;if((d^d+e)>=131072){Sj(q[a+12>>2],141849);f=q[h>>2]}q[b>>2]=(f&16383|e<<14)+2147467264;break a;case 6:Nm(a,c);l:{if(q[c>>2]!=12){break l}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}e=q[a+36>>2];d=e+1|0;f=q[a>>2];m:{if((e|0)=249){Sj(q[a+12>>2],141814);f=q[a>>2];b=q[a+36>>2]+1|0}o[f+75|0]=d}q[a+36>>2]=b;er(a,c,b-1|0);return;case 0:case 1:case 2:case 3:case 4:case 5:if(q[c+20>>2]==-1?!(q[c>>2]!=5|q[c+16>>2]!=-1):0){break c}Il(a,c);return;default:break d}}Il(a,c)}return}q[c+16>>2]=d}g=q[c+20>>2];q[a+28>>2]=q[a+24>>2];n:{if((g|0)==-1){break n}b=q[a+32>>2];if((b|0)!=-1){h=q[q[a>>2]+12>>2];while(1){f=b;e=h+(b<<2)|0;d=q[e>>2];b=(d>>>14|0)-131071|0;b=(b|0)==-1?-1:(f+b|0)+1|0;if((b|0)!=-1){continue}break}b=e;h=g+(f^-1)|0;f=h>>31;if((f^f+h)>=131072){Sj(q[a+12>>2],141849);d=q[e>>2]}q[b>>2]=(d&16383|h<<14)+2147467264;break n}q[a+32>>2]=g}q[c+20>>2]=-1}function _X(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;h=Ii-16|0;Ii=h;j=-34;a:{if(c&15){break a}if(b){j=0;if(!c){break a}while(1){o[f|0]=r[d|0]^r[e|0];o[f+1|0]=r[d+1|0]^r[e+1|0];o[f+2|0]=r[d+2|0]^r[e+2|0];o[f+3|0]=r[d+3|0]^r[e+3|0];o[f+4|0]=r[d+4|0]^r[e+4|0];o[f+5|0]=r[d+5|0]^r[e+5|0];o[f+6|0]=r[d+6|0]^r[e+6|0];o[f+7|0]=r[d+7|0]^r[e+7|0];o[f+8|0]=r[d+8|0]^r[e+8|0];o[f+9|0]=r[d+9|0]^r[e+9|0];o[f+10|0]=r[d+10|0]^r[e+10|0];o[f+11|0]=r[d+11|0]^r[e+11|0];o[f+12|0]=r[d+12|0]^r[e+12|0];o[f+13|0]=r[d+13|0]^r[e+13|0];o[f+14|0]=r[d+14|0]^r[e+14|0];o[f+15|0]=r[d+15|0]^r[e+15|0];Km(a,b,f,f);g=r[f+12|0]|r[f+13|0]<<8|(r[f+14|0]<<16|r[f+15|0]<<24);i=r[f+8|0]|r[f+9|0]<<8|(r[f+10|0]<<16|r[f+11|0]<<24);o[d+8|0]=i;o[d+9|0]=i>>>8;o[d+10|0]=i>>>16;o[d+11|0]=i>>>24;o[d+12|0]=g;o[d+13|0]=g>>>8;o[d+14|0]=g>>>16;o[d+15|0]=g>>>24;g=r[f+4|0]|r[f+5|0]<<8|(r[f+6|0]<<16|r[f+7|0]<<24);i=r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24);o[d|0]=i;o[d+1|0]=i>>>8;o[d+2|0]=i>>>16;o[d+3|0]=i>>>24;o[d+4|0]=g;o[d+5|0]=g>>>8;o[d+6|0]=g>>>16;o[d+7|0]=g>>>24;f=f+16|0;e=e+16|0;c=c-16|0;if(c){continue}break}break a}if(!c){j=0;break a}while(1){b=r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24);q[h>>2]=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24);q[h+4>>2]=b;b=r[e+12|0]|r[e+13|0]<<8|(r[e+14|0]<<16|r[e+15|0]<<24);q[h+8>>2]=r[e+8|0]|r[e+9|0]<<8|(r[e+10|0]<<16|r[e+11|0]<<24);q[h+12>>2]=b;j=0;Km(a,0,e,f);o[f|0]=r[d|0]^r[f|0];o[f+1|0]=r[d+1|0]^r[f+1|0];o[f+2|0]=r[d+2|0]^r[f+2|0];o[f+3|0]=r[d+3|0]^r[f+3|0];o[f+4|0]=r[d+4|0]^r[f+4|0];o[f+5|0]=r[d+5|0]^r[f+5|0];o[f+6|0]=r[d+6|0]^r[f+6|0];o[f+7|0]=r[d+7|0]^r[f+7|0];o[f+8|0]=r[d+8|0]^r[f+8|0];o[f+9|0]=r[d+9|0]^r[f+9|0];o[f+10|0]=r[d+10|0]^r[f+10|0];o[f+11|0]=r[d+11|0]^r[f+11|0];o[f+12|0]=r[d+12|0]^r[f+12|0];o[f+13|0]=r[d+13|0]^r[f+13|0];o[f+14|0]=r[d+14|0]^r[f+14|0];o[f+15|0]=r[d+15|0]^r[f+15|0];b=q[h+12>>2];g=q[h+8>>2];o[d+8|0]=g;o[d+9|0]=g>>>8;o[d+10|0]=g>>>16;o[d+11|0]=g>>>24;o[d+12|0]=b;o[d+13|0]=b>>>8;o[d+14|0]=b>>>16;o[d+15|0]=b>>>24;b=q[h+4>>2];g=q[h>>2];o[d|0]=g;o[d+1|0]=g>>>8;o[d+2|0]=g>>>16;o[d+3|0]=g>>>24;o[d+4|0]=b;o[d+5|0]=b>>>8;o[d+6|0]=b>>>16;o[d+7|0]=b>>>24;f=f+16|0;e=e+16|0;c=c-16|0;if(c){continue}break}}Ii=h+16|0;return j}function ix(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:while(1){k=b-16|0;j=b-160|0;b:while(1){d=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-d|0;switch((a|0)/160|0){case 3:break j;case 2:break k;case 0:case 1:break d;case 4:break g;case 5:break i;default:break h}}if(t[b-16>>2]>=t[d+144>>2]){break d}sk(d,b-160|0);return}c=b-160|0;a=d+160|0;e=b-16|0;b=q[e>>2];f=q[d+304>>2];if(f>>>0>=t[d+144>>2]){if(b>>>0>=f>>>0){break d}sk(a,c);if(t[d+304>>2]>=t[d+144>>2]){break d}sk(d,a);return}if(b>>>0>>0){sk(d,c);return}sk(d,a);if(t[e>>2]>=t[d+304>>2]){break d}sk(a,c);return}ux(d,d+160|0,d+320|0,d+480|0,b-160|0);return}if((a|0)<=1119){AP(d,b);return}f=w((a>>>0)/320|0,160);i=f+d|0;l:{if((a|0)>=159841){a=w((a>>>0)/640|0,160);h=ux(d,a+d|0,i,a+i|0,j);break l}e=d+f|0;a=e;e=q[e+144>>2];m:{if(e>>>0>=t[d+144>>2]){h=0;if(e>>>0<=t[k>>2]){break l}sk(i,j);h=1;if(t[a+144>>2]>=t[d+144>>2]){break l}sk(d,i);break m}if(e>>>0>t[k>>2]){sk(d,j);h=1;break l}sk(d,i);h=1;if(t[k>>2]>=t[a+144>>2]){break l}sk(i,j)}h=2}a=j;e=q[d+144>>2];g=q[(d+f|0)+144>>2];n:{if(e>>>0>>0){f=j;break n}while(1){f=a-160|0;if((f|0)==(d|0)){g=d+160|0;if(e>>>0>2]){break e}if((g|0)==(j|0)){break d}while(1){if(e>>>0>2]){sk(g,j);g=g+160|0;break e}g=g+160|0;if((j|0)!=(g|0)){continue}break}break d}l=a-16|0;a=f;if(g>>>0<=t[l>>2]){continue}break}sk(d,f);h=h+1|0}e=d+160|0;if(f>>>0<=e>>>0){break f}while(1){l=q[i+144>>2];while(1){g=e;e=e+160|0;if(l>>>0>t[g+144>>2]){continue}break}a=f;while(1){m=a-16|0;f=a-160|0;a=f;if(l>>>0<=t[m>>2]){continue}break}if(f>>>0>>0){e=g;break f}else{sk(g,f);i=(g|0)==(i|0)?f:i;h=h+1|0;continue}}}yx(d,d+160|0,d+320|0,b-160|0);break d}if(!((e|0)==(i|0)|t[i+144>>2]>=t[e+144>>2])){sk(e,i);h=h+1|0}if(!h){f=GN(d,e);a=e+160|0;if(GN(a,b)){b=e;a=d;if(!f){continue a}break d}if(f){continue b}}if(((e-d|0)/160|0)<((b-e|0)/160|0)){ix(d,e,c);a=e+160|0;continue b}ix(e+160|0,b,c);b=e;a=d;continue a}f=j;if((g|0)==(f|0)){break d}while(1){h=q[d+144>>2];while(1){e=g;g=e+160|0;if(h>>>0>=t[e+144>>2]){continue}break}a=f;while(1){i=a-16|0;f=a-160|0;a=f;if(h>>>0>2]){continue}break}if(e>>>0>=f>>>0){d=e;continue c}else{sk(e,f);continue}}}break}break}break}} - - - -function IH(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,y=0,z=0,A=0,B=0,C=x(0),D=x(0),E=x(0),F=0;h=Ii-304|0;Ii=h;Ui(h+40|0,0,264);jv(h+40|0);i=q[27987];q[h+24>>2]=q[27986];q[h+28>>2]=i;i=q[27985];q[h+16>>2]=q[27984];q[h+20>>2]=i;q[h+8>>2]=0;q[h+12>>2]=0;q[h>>2]=0;q[h+4>>2]=0;y=q[a>>2];i=q[a+4>>2];if((y|0)!=(i|0)){j=x(b>>>0);k=x(c>>>0);C=c?x(j/k):x(0);D=x(j*k);E=x(d>>>0);a=i-y|0;l=(a|0)>-1?a:-1;i=y-i|0;a=w((l|0)<1?l:1,((a|0)<(i|0)?i:a)>>>4|0);F=a>>>0>1?a:1;while(1){i=(z<<4)+y|0;a:{if(e){g=q[e>>2];a=q[e+4>>2]-g|0;l=a>>3;b:{if(!a){a=0;break b}m=q[i>>2];p=q[i+4>>2];a=0;while(1){r=g+(a<<3)|0;if(q[r>>2]==(m|0)&q[r+4>>2]==(p|0)){break b}a=a+1|0;if(l>>>0>a>>>0){continue}break}}if((a|0)==(l|0)){break a}}p=q[i+8>>2];if(!p){break a}r=q[i+12>>2];l=0;if(!d){while(1){m=w(l,20)+r|0;o=q[m+12>>2];c:{if(o){A=hj(h+40|0);B=q[m+16>>2];a=0;g=1;while(1){d:{s=q[B+(a<<2)>>2];t=hj(s);if(t>>>0<=A>>>0){if(!Ik(s,h+40|0,t)){break d}}a=a+1|0;g=o>>>0>a>>>0;if((a|0)!=(o|0)){continue}}break}if(!g){break c}}j=u[m>>2];k=u[m+4>>2];f=1- +x(D/x(j*k));n=f>=0?f:-f;f=1- +x(C/x(j/k));f=n+(f>=0?f:-f)+0;n=f;if(k=x(0)){a=~~k>>>0}else{a=0}if(j=x(0)){g=~~j>>>0}else{g=0}a=(a>>>0>=g>>>0)<<3;g=a|h+16;if(n>3]^1){break c}v[g>>3]=f;g=q[i+4>>2];a=a|h;q[a>>2]=q[i>>2];q[a+4>>2]=g}l=l+1|0;if((p|0)!=(l|0)){continue}break a}}while(1){m=w(l,20)+r|0;o=q[m+12>>2];e:{if(o){A=hj(h+40|0);B=q[m+16>>2];a=0;g=1;while(1){f:{s=q[B+(a<<2)>>2];t=hj(s);if(t>>>0<=A>>>0){if(!Ik(s,h+40|0,t)){break f}}a=a+1|0;g=o>>>0>a>>>0;if((a|0)!=(o|0)){continue}}break}if(!g){break e}}j=u[m>>2];k=u[m+4>>2];f=1- +x(D/x(j*k));n=f>=0?f:-f;f=1- +x(C/x(j/k));n=n+(f>=0?f:-f);f=1- +x(u[m+8>>2]/E);f=n+(f>=0?f:-f);n=f;if(k=x(0)){a=~~k>>>0}else{a=0}if(j=x(0)){g=~~j>>>0}else{g=0}a=(a>>>0>=g>>>0)<<3;g=a|h+16;if(n>3]^1){break e}v[g>>3]=f;g=q[i+4>>2];a=a|h;q[a>>2]=q[i>>2];q[a+4>>2]=g}l=l+1|0;if((p|0)!=(l|0)){continue}break}}z=z+1|0;if((F|0)!=(z|0)){continue}break}}d=b>>>0<=c>>>0;b=d<<3|h;a=q[b+4>>2];c=q[b>>2];b=a;if(!(a|c)){a=(d^1)<<3|h;c=q[a>>2];b=q[a+4>>2]}a=q[h+300>>2];if(a){Ni(a)}Ii=h+304|0;Li=b;return c}function VX(a,b,c,d,e,f){var g=0,h=0,i=0;h=Ii-16|0;Ii=h;i=-38;a:{if(c&15){break a}if(b){i=0;if(!c){break a}while(1){o[f|0]=r[d|0]^r[e|0];o[f+1|0]=r[d+1|0]^r[e+1|0];o[f+2|0]=r[d+2|0]^r[e+2|0];o[f+3|0]=r[d+3|0]^r[e+3|0];o[f+4|0]=r[d+4|0]^r[e+4|0];o[f+5|0]=r[d+5|0]^r[e+5|0];o[f+6|0]=r[d+6|0]^r[e+6|0];o[f+7|0]=r[d+7|0]^r[e+7|0];o[f+8|0]=r[d+8|0]^r[e+8|0];o[f+9|0]=r[d+9|0]^r[e+9|0];o[f+10|0]=r[d+10|0]^r[e+10|0];o[f+11|0]=r[d+11|0]^r[e+11|0];o[f+12|0]=r[d+12|0]^r[e+12|0];o[f+13|0]=r[d+13|0]^r[e+13|0];o[f+14|0]=r[d+14|0]^r[e+14|0];o[f+15|0]=r[d+15|0]^r[e+15|0];Gs(a,f,f);b=r[f+12|0]|r[f+13|0]<<8|(r[f+14|0]<<16|r[f+15|0]<<24);g=r[f+8|0]|r[f+9|0]<<8|(r[f+10|0]<<16|r[f+11|0]<<24);o[d+8|0]=g;o[d+9|0]=g>>>8;o[d+10|0]=g>>>16;o[d+11|0]=g>>>24;o[d+12|0]=b;o[d+13|0]=b>>>8;o[d+14|0]=b>>>16;o[d+15|0]=b>>>24;b=r[f+4|0]|r[f+5|0]<<8|(r[f+6|0]<<16|r[f+7|0]<<24);g=r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24);o[d|0]=g;o[d+1|0]=g>>>8;o[d+2|0]=g>>>16;o[d+3|0]=g>>>24;o[d+4|0]=b;o[d+5|0]=b>>>8;o[d+6|0]=b>>>16;o[d+7|0]=b>>>24;f=f+16|0;e=e+16|0;c=c-16|0;if(c){continue}break}break a}i=0;if(!c){break a}while(1){b=r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24);q[h>>2]=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24);q[h+4>>2]=b;b=r[e+12|0]|r[e+13|0]<<8|(r[e+14|0]<<16|r[e+15|0]<<24);q[h+8>>2]=r[e+8|0]|r[e+9|0]<<8|(r[e+10|0]<<16|r[e+11|0]<<24);q[h+12>>2]=b;Gs(a,e,f);o[f|0]=r[d|0]^r[f|0];o[f+1|0]=r[d+1|0]^r[f+1|0];o[f+2|0]=r[d+2|0]^r[f+2|0];o[f+3|0]=r[d+3|0]^r[f+3|0];o[f+4|0]=r[d+4|0]^r[f+4|0];o[f+5|0]=r[d+5|0]^r[f+5|0];o[f+6|0]=r[d+6|0]^r[f+6|0];o[f+7|0]=r[d+7|0]^r[f+7|0];o[f+8|0]=r[d+8|0]^r[f+8|0];o[f+9|0]=r[d+9|0]^r[f+9|0];o[f+10|0]=r[d+10|0]^r[f+10|0];o[f+11|0]=r[d+11|0]^r[f+11|0];o[f+12|0]=r[d+12|0]^r[f+12|0];o[f+13|0]=r[d+13|0]^r[f+13|0];o[f+14|0]=r[d+14|0]^r[f+14|0];o[f+15|0]=r[d+15|0]^r[f+15|0];b=q[h+12>>2];g=q[h+8>>2];o[d+8|0]=g;o[d+9|0]=g>>>8;o[d+10|0]=g>>>16;o[d+11|0]=g>>>24;o[d+12|0]=b;o[d+13|0]=b>>>8;o[d+14|0]=b>>>16;o[d+15|0]=b>>>24;b=q[h+4>>2];g=q[h>>2];o[d|0]=g;o[d+1|0]=g>>>8;o[d+2|0]=g>>>16;o[d+3|0]=g>>>24;o[d+4|0]=b;o[d+5|0]=b>>>8;o[d+6|0]=b>>>16;o[d+7|0]=b>>>24;f=f+16|0;e=e+16|0;c=c-16|0;if(c){continue}break}}Ii=h+16|0;return i}function t8(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii+ -64|0;Ii=d;c=$i(160);q[c+16>>2]=0;q[c+20>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+52>>2]=0;q[c+56>>2]=0;q[c+96>>2]=0;q[c+100>>2]=0;q[c+128>>2]=0;q[c+132>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+48>>2]=0;q[c+60>>2]=0;q[c+64>>2]=0;q[c+104>>2]=0;q[c+108>>2]=0;q[c+112>>2]=0;q[c+136>>2]=0;q[c+140>>2]=0;q[c+144>>2]=0;q[c+148>>2]=0;p[c+152>>1]=256;q[c+16>>2]=0;q[c+40>>2]=-1;f=c+20|0;e=q[b+4>>2]-q[b>>2]>>6;EA(f,w(e,3)>>>1|0,e);e=q[b>>2];if((e|0)!=q[b+4>>2]){while(1){e=(g<<6)+e|0;FA(f,q[e>>2],e);g=g+1|0;e=q[b>>2];if(g>>>0>2]-e>>6>>>0){continue}break}}u[c+52>>2]=u[b+16>>2];u[c+56>>2]=u[b+20>>2];u[c+60>>2]=u[b+24>>2];u[c+64>>2]=u[b+28>>2];u[c+68>>2]=u[b+32>>2];u[c+72>>2]=u[b+36>>2];u[c+76>>2]=u[b+40>>2];u[c+80>>2]=u[b+44>>2];u[c+84>>2]=u[b+48>>2];u[c+88>>2]=u[b+52>>2];u[c+92>>2]=u[b+56>>2];o[c+153|0]=r[b+89|0];g=q[b+60>>2];q[c+96>>2]=g;e=q[b+64>>2];q[c+100>>2]=e;q[c+104>>2]=q[b+72>>2];f=q[b+76>>2];q[c+140>>2]=f;h=q[b+80>>2];q[c+144>>2]=h;q[c+148>>2]=q[b+84>>2];k=r[b+88|0];i=(e>>>0)/(h>>>0)|0;q[c+132>>2]=i;j=(g>>>0)/(f>>>0)|0;q[c+128>>2]=j;o[c+152|0]=k;q[c+136>>2]=Yi(w(f,h)<<2);f=0;a:{b:{c:{switch(r[b+68|0]-1|0){case 3:f=3;break b;default:Pi(4,112261,112268,0);aA(c);Ni(c);c=0;break a;case 0:break b;case 2:break c}}f=2}q[c+116>>2]=f;d:{if(!q[b+92>>2]){Mi[q[74938]](a,c+120|0,c+124|0);g=1;e:{f:{g:{e=q[c+120>>2];switch(e-3|0){case 0:break e;case 2:break g;default:break f}}g=2;break e}g=e}q[c+120>>2]=g;e=s[b+64>>1];g=s[b+60>>1];break d}q[c+120>>2]=2;q[c+124>>2]=2}f=w(i,j)<<2;h=Yi(f);q[c+108>>2]=h;Ui(h,0,f);o[d+62|0]=1;p[d+56>>1]=1;q[d+48>>2]=0;q[d+52>>2]=0;q[d+36>>2]=0;q[d+40>>2]=0;o[d+43|0]=0;o[d+44|0]=0;o[d+45|0]=0;o[d+46|0]=0;p[d+60>>1]=e;p[d+58>>1]=g;p[d+54>>1]=e;p[d+52>>1]=g;q[d+28>>2]=0;q[d+32>>2]=0;q[d+20>>2]=1;q[d+24>>2]=1;f=q[c+116>>2];q[d>>2]=0;q[d+4>>2]=0;p[d+42>>1]=e;q[d+12>>2]=2;q[d+16>>2]=2;p[d+40>>1]=g;q[d+8>>2]=f;f=Mi[q[75008]](a,d+48|0)|0;q[c+8>>2]=f;h=Li;q[c+12>>2]=h;a=w(w(r[b+68|0],g&65535),e&65535);b=Yi(a);q[d+4>>2]=a;q[d>>2]=b;Ui(b,0,a);Mi[q[75010]](f,h,d);Ni(q[d>>2])}Ii=d- -64|0;return c}function rO(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-48|0;Ii=f;a:{if(c>>>0<=2){c=c<<2;h=q[c+220956>>2];k=q[c+220944>>2];while(1){c=q[b+4>>2];b:{if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break b}c=Fk(b)}if((c|0)==32|c-9>>>0<5){continue}break}g=1;c:{d:{switch(c-43|0){case 0:case 2:break d;default:break c}}g=(c|0)==45?-1:1;c=q[b+4>>2];if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break c}c=Fk(b)}e:{f:{while(1){if(o[e+220874|0]==(c|32)){g:{if(e>>>0>6){break g}c=q[b+4>>2];if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break g}c=Fk(b)}e=e+1|0;if((e|0)!=8){continue}break f}break}if((e|0)!=3){if((e|0)==8){break f}if(!d|e>>>0<4){break e}if((e|0)==8){break f}}c=q[b+104>>2];if(c){q[b+4>>2]=q[b+4>>2]-1}if(!d|e>>>0<4){break f}while(1){if(c){q[b+4>>2]=q[b+4>>2]-1}e=e-1|0;if(e>>>0>3){continue}break}}Zxa(f,x(x(g|0)*x(I)));g=q[f+8>>2];h=q[f+12>>2];i=q[f>>2];j=q[f+4>>2];break a}h:{i:{j:{if(e){break j}e=0;while(1){if(o[e+220883|0]!=(c|32)){break j}k:{if(e>>>0>1){break k}c=q[b+4>>2];if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break k}c=Fk(b)}e=e+1|0;if((e|0)!=3){continue}break}break i}l:{switch(e|0){case 0:m:{if((c|0)!=48){break m}e=q[b+4>>2];n:{if(e>>>0>2]){q[b+4>>2]=e+1;e=r[e|0];break n}e=Fk(b)}if((e&-33)==88){l$(f+16|0,b,k,h,g,d);g=q[f+24>>2];h=q[f+28>>2];i=q[f+16>>2];j=q[f+20>>2];break a}if(!q[b+104>>2]){break m}q[b+4>>2]=q[b+4>>2]-1}Sua(f+32|0,b,c,k,h,g,d);g=q[f+40>>2];h=q[f+44>>2];i=q[f+32>>2];j=q[f+36>>2];break a;case 3:break i;default:break l}}if(q[b+104>>2]){q[b+4>>2]=q[b+4>>2]-1}break h}o:{c=q[b+4>>2];p:{if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break p}c=Fk(b)}if((c|0)==40){e=1;break o}g=0;h=2147450880;if(!q[b+104>>2]){break a}q[b+4>>2]=q[b+4>>2]-1;break a}while(1){q:{c=q[b+4>>2];r:{if(c>>>0>2]){q[b+4>>2]=c+1;c=r[c|0];break r}c=Fk(b)}if(!(c-48>>>0<10|c-65>>>0<26|(c|0)==95)){if(c-97>>>0>=26){break q}}e=e+1|0;continue}break}g=0;h=2147450880;if((c|0)==41){break a}c=q[b+104>>2];if(c){q[b+4>>2]=q[b+4>>2]-1}if(d){if(!e){break a}while(1){e=e-1|0;if(c){q[b+4>>2]=q[b+4>>2]-1}if(e){continue}break}break a}}q[240513]=28;Cn(b,0,0)}g=0;h=0}q[a>>2]=i;q[a+4>>2]=j;q[a+8>>2]=g;q[a+12>>2]=h;Ii=f+48|0}function Cqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=x(0),r=x(0),s=0;b=Ii-272|0;Ii=b;h=q[a+8>>2]-q[a+12>>2]>>4;gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);c=q[c+4>>2];q[b+264>>2]=0;q[b+268>>2]=0;q[b+256>>2]=0;q[b+260>>2]=0;q[b+248>>2]=0;q[b+252>>2]=0;q[b+240>>2]=0;q[b+244>>2]=0;qm(a,b+240|0);q[b+232>>2]=0;q[b+236>>2]=0;q[b+224>>2]=0;q[b+228>>2]=0;q[b+216>>2]=0;q[b+220>>2]=0;q[b+208>>2]=0;q[b+212>>2]=0;Gk(a,1,b+208|0,b+240|0);g=q[q[c+80>>2]+8>>2];a:{if(!g){break a}c=q[g>>2];if(!c){break a}d=q[c+3216>>2];e=q[c+3220>>2]}if((d|0)!=q[b+208>>2]|(e|0)!=q[b+212>>2]){Qi(a,15889,0)}b:{if(uk(a,2)){d=Oi(uj(a,2,0));e=Li;break b}d=nl(a,2);e=Li}j=jn(g,q[b+224>>2],q[b+228>>2]);c:{if(!j){q[b>>2]=aj(q[b+224>>2],q[b+228>>2]);c=Qi(a,14935,b);break c}k=jj(a,3);if((k|0)>=7){c=Qi(a,15955,0);break c}l=Jr(b+136|0);if(Et(a,4,l)){c=Qi(a,16004,0);break c}d:{e:{f:{if(Oj(a,5)){i=jj(a,5);if((i|0)>=42){break e}c=0;break f}if(!IG(a,5)){break d}n=UG(a,5);ej(a,5);o=54;i=41;m=zk(a,-1e4);c=a}p=x(fj(a,6));f=0;g:{if((h|0)<7){break g}r=x(fj(a,7));f=0;if((h|0)==7){break g}f=0;if((Vi(a,8)|0)!=6){break g}s=55;f=rp(a,8)}q[b+120>>2]=o;q[b+128>>2]=m;q[b+104>>2]=m;q[b+124>>2]=c;c=q[b+124>>2];q[b+96>>2]=q[b+120>>2];q[b+100>>2]=c;q[b+116>>2]=n;q[b+112>>2]=i;c=q[b+116>>2];q[b+88>>2]=q[b+112>>2];q[b+92>>2]=c;h:{i:{j:{k:{l:{m:{c=lsa(g,j,q[b+232>>2],q[b+236>>2],d,e,k,l,b+88|0,p,r,s,f);switch(c+9|0){case 9:break h;case 0:break j;case 4:break k;case 5:case 6:break l;case 8:break m;default:break i}}bj(a,16151,0);km(a,b+208|0);fm(a,2);c=uj(a,-1,0);Ri(a,-2);q[b+36>>2]=aj(d,e);q[b+32>>2]=c;c=Qi(a,16152,b+32|0);break c}bj(a,16151,0);km(a,b+208|0);fm(a,2);c=uj(a,-1,0);Ri(a,-2);d=aj(d,e);q[b+52>>2]=c;q[b+48>>2]=d;c=Qi(a,16196,b+48|0);break c}c=aj(q[b+232>>2],q[b+236>>2]);q[b+68>>2]=uj(a,1,0);q[b+64>>2]=c;c=Qi(a,16241,b- -64|0);break c}bj(a,16151,0);km(a,b+208|0);fm(a,2);c=uj(a,-1,0);Ri(a,-2);d=aj(d,e);q[b+84>>2]=c;q[b+80>>2]=d;c=Qi(a,16291,b+80|0);break c}q[b+16>>2]=c;c=Qi(a,16345,b+16|0);break c}c=0;if((h|0)==q[a+8>>2]-q[a+12>>2]>>4){break c}J(16382,15159,1850,16403);G()}c=Qi(a,16069,0);break c}c=Qi(a,16093,0)}Ii=b+272|0;return c|0}function yr(a){var b=0,c=0,d=0,e=0;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b:{c:{d:{e:{if(!(!r[852468]|!q[a+24>>2])){f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}d=q[213116];Gj(d);g:{if(o[852568]&1){break g}if(!fk(852568)){break g}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}c=q[a+24>>2];b=q[213134];if(c>>>0>=q[213135]-b>>3>>>0){break e}Ni(q[b+(c<<3)>>2]);h:{if(o[852568]&1){break h}if(!fk(852568)){break h}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}c=q[a+24>>2];if(!c){break d}e=q[213138];if(!e){break c}b=q[213140]-1|0;if(b>>>0>=t[213139]){break b}q[213140]=b;q[(b<<2)+e>>2]=c;q[a+24>>2]=0;Bj(d)}return}J(165931,165533,479,165942);G()}J(165779,165430,131,165795);G()}J(165646,165621,140,165677);G()}J(165682,165621,141,165677);G()}function aoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=q[a+4>>2];b=q[d+16>>2];a:{c=q[q[a+24>>2]>>2];if(c>>>0>2]-b>>3>>>0){e=q[b+(c<<3)>>2];f=q[d>>2];if(e>>>0>2]-f>>8>>>0){b:{b=q[a+16>>2];c=q[a+20>>2];if(!((b|0)==q[73730]&(c|0)==q[73731]|(b|0)==q[73732]&(c|0)==q[73733]|(b|0)==q[73734]&(c|0)==q[73735])){if((b|0)!=q[73736]|(c|0)!=q[73737]){break b}}return fw(b,c,a+32|0,(f+(e<<8)|0)- -64|0,294920)|0}c:{if(!((b|0)==q[73744]&(c|0)==q[73745]|((b|0)==q[73740]&(c|0)==q[73741]|(b|0)==q[73742]&(c|0)==q[73743]))){if((b|0)!=q[73746]|(c|0)!=q[73747]){break c}}return fw(b,c,a+32|0,(f+(e<<8)|0)+48|0,294960)|0}d:{if(!((b|0)==q[73750]&(c|0)==q[73751]|(b|0)==q[73752]&(c|0)==q[73753]|((b|0)==q[73754]&(c|0)==q[73755]|(b|0)==q[73756]&(c|0)==q[73757]))){if((b|0)!=q[73758]|(c|0)!=q[73759]){break d}}return cB(b,c,a+32|0,(f+(e<<8)|0)+80|0,295e3)|0}e:{if(!((b|0)==q[73762]&(c|0)==q[73763]|(b|0)==q[73764]&(c|0)==q[73765]|((b|0)==q[73766]&(c|0)==q[73767]|(b|0)==q[73768]&(c|0)==q[73769]))){if((b|0)!=q[73770]|(c|0)!=q[73771]){break e}}return cB(b,c,a+32|0,(f+(e<<8)|0)+96|0,295048)|0}f:{if(!((b|0)==q[73774]&(c|0)==q[73775]|(b|0)==q[73776]&(c|0)==q[73777]|((b|0)==q[73778]&(c|0)==q[73779]|(b|0)==q[73780]&(c|0)==q[73781]))){if((b|0)!=q[73782]|(c|0)!=q[73783]){break f}}return cB(b,c,a+32|0,(f+(e<<8)|0)+112|0,295096)|0}if((b|0)==q[73682]&(c|0)==q[73683]){b=q[q[q[a+8>>2]+80>>2]>>2];c=a+32|0;a=f+(e<<8)|0;d=Qm(b,c,q[73664],q[73665],a+224|0);break a}if((b|0)==q[73676]&(c|0)==q[73677]){b=q[q[q[a+8>>2]+80>>2]>>2];c=a+32|0;a=f+(e<<8)|0;d=Qm(b,c,q[73662],q[73663],a+228|0);break a}g:{if((b|0)==q[73786]&(c|0)==q[73787]){b=-4;if(q[a+32>>2]){break g}u[(f+(e<<8)|0)+232>>2]=v[a+40>>3];return 0}if((b|0)==q[73788]&(c|0)==q[73789]){b=-4;if(q[a+32>>2]){break g}u[(f+(e<<8)|0)+236>>2]=v[a+40>>3];return 0}if((b|0)==q[73790]&(c|0)==q[73791]){b=-4;if(q[a+32>>2]!=6){break g}d=f+(e<<8)|0;p[d+246>>1]=s[d+246>>1]&65519|r[a+40|0]<<4&240;return 0}g=f+(e<<8)|0;d=q[g+224>>2];if(!d){d=q[q[g+216>>2]+4>>2]}b=Bp(q[d>>2],b,c,a+32|0,q[a+104>>2],251,f+(e<<8)|0)}return b|0}}J(57189,57106,479,57200);G()}b=a;a=s[a+246>>1];p[b+246>>1]=(d?a&8:8)|a&65527;return d|0}function joa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=0;h=Ii-80|0;Ii=h;g=q[a+4>>2];c=q[g+16>>2];d=q[q[a+24>>2]>>2];if(d>>>0>2]-c>>3>>>0){e=q[c+(d<<3)>>2];f=q[g>>2];if(e>>>0>2]-f>>8>>>0){a:{b:{c=q[a+16>>2];d=q[a+20>>2];if(!((c|0)==q[73730]&(d|0)==q[73731]|(c|0)==q[73732]&(d|0)==q[73733]|(c|0)==q[73734]&(d|0)==q[73735])){if((c|0)!=q[73736]|(d|0)!=q[73737]){break b}}a=nw(b,c,d,(f+(e<<8)|0)- -64|0,294920);break a}c:{if(!((c|0)==q[73744]&(d|0)==q[73745]|((c|0)==q[73740]&(d|0)==q[73741]|(c|0)==q[73742]&(d|0)==q[73743]))){if((c|0)!=q[73746]|(d|0)!=q[73747]){break c}}a=nw(b,c,d,(f+(e<<8)|0)+48|0,294960);break a}d:{if(!((c|0)==q[73750]&(d|0)==q[73751]|(c|0)==q[73752]&(d|0)==q[73753]|((c|0)==q[73754]&(d|0)==q[73755]|(c|0)==q[73756]&(d|0)==q[73757]))){if((c|0)!=q[73758]|(d|0)!=q[73759]){break d}}a=nB(b,c,d,(f+(e<<8)|0)+80|0,295e3);break a}e:{if(!((c|0)==q[73762]&(d|0)==q[73763]|(c|0)==q[73764]&(d|0)==q[73765]|((c|0)==q[73766]&(d|0)==q[73767]|(c|0)==q[73768]&(d|0)==q[73769]))){if((c|0)!=q[73770]|(d|0)!=q[73771]){break e}}a=nB(b,c,d,(f+(e<<8)|0)+96|0,295048);break a}f:{if(!((c|0)==q[73774]&(d|0)==q[73775]|(c|0)==q[73776]&(d|0)==q[73777]|((c|0)==q[73778]&(d|0)==q[73779]|(c|0)==q[73780]&(d|0)==q[73781]))){if((c|0)!=q[73782]|(d|0)!=q[73783]){break f}}a=nB(b,c,d,(f+(e<<8)|0)+112|0,295096);break a}if((c|0)==q[73682]&(d|0)==q[73683]){g=q[q[q[a+8>>2]+80>>2]>>2];c=f+(e<<8)|0;a=q[c+224>>2];if(!a){a=q[q[c+216>>2]+4>>2]}a=cm(g,a,b);break a}if((c|0)==q[73676]&(d|0)==q[73677]){g=q[q[q[a+8>>2]+80>>2]>>2];c=f+(e<<8)|0;a=q[c+228>>2];if(!a){a=q[q[c+216>>2]+8>>2]}a=cm(g,a,b);break a}if((c|0)==q[73786]&(d|0)==q[73787]){i=u[(f+(e<<8)|0)+232>>2];a=h+8|0;q[a>>2]=0;v[a+8>>3]=i;Ti(b+32|0,h+8|0,72);a=0;break a}if((c|0)==q[73788]&q[73789]==(d|0)){i=u[(f+(e<<8)|0)+236>>2];a=h+8|0;q[a>>2]=0;v[a+8>>3]=i;Ti(b+32|0,h+8|0,72);a=0;break a}if((c|0)==q[73790]&q[73791]==(d|0)){o[h+16|0]=(s[(f+(e<<8)|0)+246>>1]&16)>>>4;q[h+8>>2]=6;Ti(b+32|0,h+8|0,72);a=0;break a}j=f+(e<<8)|0;g=q[j+224>>2];if(!g){g=q[q[j+216>>2]+4>>2]}a=Ct(q[g>>2],c,d,q[a+32>>2],b,0,250,f+(e<<8)|0)}Ii=h+80|0;return a|0}}J(57189,57106,479,57200);G()}function zM(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=Ii-176|0;Ii=f;a:{b:{c:{d:{g=d+8|0;i=yw(a,q[c+16>>2],q[c+20>>2],g);e:{if(i){if(q[d+4>>2]){while(1){b=q[d>>2]+w(h,96)|0;cj(a,q[b+24>>2]);um(q[b+88>>2]);h=h+1|0;if(h>>>0>2]){continue}break}}Dp(a,g);Aj(c);break e}q[d>>2]=0;q[d+4>>2]=0;h=q[c+4>>2];if(!h){i=0;break e}q[d>>2]=Yi(w(h,96));j=f+112|0;f:{while(1){if(h>>>0<=k>>>0){break d}g=q[c>>2]+w(k,160)|0;m=q[g+4>>2];i=ak(a,m,f+172|0);if(i){break e}n=Oi(q[g>>2]);o=Li;h=0;i=0;g:{l=q[d+4>>2];if(!l){break g}while(1){p=q[d>>2]+w(h,96)|0;if(q[p>>2]==(n|0)&q[p+4>>2]==(o|0)){i=q[g>>2];q[f+20>>2]=e;q[f+16>>2]=i;Pi(4,20720,20731,f+16|0);l=q[d+4>>2];i=1}h=h+1|0;if(l>>>0>h>>>0){continue}break}if(!(i&1)){break g}cj(a,q[f+172>>2]);break f}if(xv(a,q[f+172>>2],f+168|0)){break c}h=Cw(b,q[f+168>>2],f+164|0);if(!h){break b}if(lt(a,m,f+128|0)){break a}q[f+60>>2]=q[f+168>>2];q[f+56>>2]=q[f+172>>2];q[f+52>>2]=q[f+164>>2];q[f+48>>2]=h;h=q[f+132>>2];q[f+40>>2]=q[f+128>>2];q[f+44>>2]=h;q[f+32>>2]=n;q[f+36>>2]=o;u[f+64>>2]=u[g+16>>2];u[f+68>>2]=u[g+20>>2];u[f+72>>2]=u[g+24>>2];u[f+80>>2]=u[g+32>>2];u[f+84>>2]=u[g+36>>2];u[f+88>>2]=u[g+40>>2];u[f+92>>2]=u[g+44>>2];u[f+96>>2]=u[g+144>>2];u[f+100>>2]=u[g+148>>2];u[f+104>>2]=u[g+152>>2];q[j>>2]=0;q[j+4>>2]=0;q[j+8>>2]=0;q[f+112>>2]=28;h=HB(g+56|0);q[f+120>>2]=h;if(h){g=q[d+4>>2];q[d+4>>2]=g+1;i=q[f+60>>2];g=q[d>>2]+w(g,96)|0;q[g+24>>2]=q[f+56>>2];q[g+28>>2]=i;i=q[f+52>>2];q[g+16>>2]=q[f+48>>2];q[g+20>>2]=i;i=q[f+44>>2];q[g+8>>2]=q[f+40>>2];q[g+12>>2]=i;i=q[f+36>>2];q[g>>2]=q[f+32>>2];q[g+4>>2]=i;u[g+32>>2]=u[f+64>>2];u[g+36>>2]=u[f+68>>2];u[g+40>>2]=u[f+72>>2];u[g+48>>2]=u[f+80>>2];u[g+52>>2]=u[f+84>>2];u[g+56>>2]=u[f+88>>2];u[g+60>>2]=u[f+92>>2];u[g+64>>2]=u[f+96>>2];u[g+68>>2]=u[f+100>>2];u[g+72>>2]=u[f+104>>2];i=q[j+4>>2];q[g+80>>2]=q[j>>2];q[g+84>>2]=i;q[g+88>>2]=q[j+8>>2]}if(!h){break f}h=q[c+4>>2];k=k+1|0;if(h>>>0>k>>>0){continue}break}i=0;break e}i=-13}Ii=f+176|0;return i}J(20656,20668,94,20709);G()}J(20786,20588,95,20818);G()}a=q[g>>2];q[f+4>>2]=q[g+4>>2];q[f>>2]=a;Pi(4,20720,20835,f);J(20879,20588,101,20818);G()}J(20786,20588,104,20818);G()}function tK(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=Ii-144|0;Ii=f;i=s[e+18>>1];k=s[b+584>>1];a:{if((i|0)!=(k|0)){p[b+584>>1]=i;g=s[e+16>>1];p[e+16>>1]=g+1;p[b+582>>1]=g;break a}g=s[b+582>>1]}b:{c:{d:{h=q[e>>2];if((q[e+4>>2]-h|0)/80>>>0>g>>>0){j=s[b+576>>1];if((j|0)!=65535){l=q[a+32>>2];if((q[a+36>>2]-l|0)/592>>>0<=j>>>0){break b}tK(a,w(j,592)+l|0,f+80|0,f+76|0,e)}e=w(g,80)+h|0;if(!(!(o[a+390|0]&1)|q[a+352>>2]==2?!(r[b+414|0]&64):0)){Uv(a,b);break d}if((i|0)!=(k|0)){break d}u[c>>2]=u[e>>2];a=w(g,80)+h|0;u[c+4>>2]=u[a+4>>2];u[c+8>>2]=u[a+8>>2];u[c+12>>2]=u[a+12>>2];u[c+16>>2]=u[a+16>>2];u[c+20>>2]=u[a+20>>2];u[c+24>>2]=u[a+24>>2];u[c+28>>2]=u[a+28>>2];u[c+32>>2]=u[a+32>>2];u[c+36>>2]=u[a+36>>2];u[c+40>>2]=u[a+40>>2];u[c+44>>2]=u[a+44>>2];u[c+48>>2]=u[a+48>>2];u[c+52>>2]=u[a+52>>2];u[c+56>>2]=u[a+56>>2];u[c+60>>2]=u[a+60>>2];u[d>>2]=u[a+64>>2];break c}break b}u[c>>2]=u[b+320>>2];u[c+4>>2]=u[b+324>>2];u[c+8>>2]=u[b+328>>2];u[c+12>>2]=u[b+332>>2];u[c+16>>2]=u[b+336>>2];u[c+20>>2]=u[b+340>>2];u[c+24>>2]=u[b+344>>2];u[c+28>>2]=u[b+348>>2];u[c+32>>2]=u[b+352>>2];u[c+36>>2]=u[b+356>>2];u[c+40>>2]=u[b+360>>2];u[c+44>>2]=u[b+364>>2];u[c+48>>2]=u[b+368>>2];u[c+52>>2]=u[b+372>>2];u[c+56>>2]=u[b+376>>2];u[c+60>>2]=u[b+380>>2];u[d>>2]=u[b+60>>2];e:{if(s[b+576>>1]==65535){break e}_k(f,f+80|0,c);u[c>>2]=u[f>>2];u[c+4>>2]=u[f+4>>2];u[c+8>>2]=u[f+8>>2];u[c+12>>2]=u[f+12>>2];u[c+16>>2]=u[f+16>>2];u[c+20>>2]=u[f+20>>2];u[c+24>>2]=u[f+24>>2];u[c+28>>2]=u[f+28>>2];u[c+32>>2]=u[f+32>>2];u[c+36>>2]=u[f+36>>2];u[c+40>>2]=u[f+40>>2];u[c+44>>2]=u[f+44>>2];u[c+48>>2]=u[f+48>>2];u[c+52>>2]=u[f+52>>2];u[c+56>>2]=u[f+56>>2];u[c+60>>2]=u[f+60>>2];if(!(r[b+414|0]&128)){break e}u[d>>2]=u[f+76>>2]*u[d>>2]}u[e>>2]=u[c>>2];a=w(g,80)+h|0;u[a+4>>2]=u[c+4>>2];u[a+8>>2]=u[c+8>>2];u[a+12>>2]=u[c+12>>2];u[a+16>>2]=u[c+16>>2];u[a+20>>2]=u[c+20>>2];u[a+24>>2]=u[c+24>>2];u[a+28>>2]=u[c+28>>2];u[a+32>>2]=u[c+32>>2];u[a+36>>2]=u[c+36>>2];u[a+40>>2]=u[c+40>>2];u[a+44>>2]=u[c+44>>2];u[a+48>>2]=u[c+48>>2];u[a+52>>2]=u[c+52>>2];u[a+56>>2]=u[c+56>>2];u[a+60>>2]=u[c+60>>2];u[a+64>>2]=u[d>>2]}Ii=f+144|0;return}J(201665,201514,479,201676);G()}function UL(a,b){var c=0,d=0,e=0,f=x(0),g=0,h=x(0),i=0,j=0,k=0,l=0,m=x(0),n=0;c=Ii-96|0;Ii=c;d=q[a>>2];q[c+88>>2]=0;a=s[d+1058>>1];q[71452]=a+q[71452];q[c+80>>2]=a;q[c+84>>2]=0;q[c+8>>2]=a;q[c+12>>2]=0;a:{b:{c:{if(o[d+3272|0]&1){Pi(4,7319,12065,0);break c}e=s[d+3264>>1];if((e|0)!=32767){while(1){e=e&65535;a=q[d+1036>>2];if(e>>>0>=q[d+1040>>2]-a>>2>>>0){break b}a=q[a+(e<<2)>>2];EB(d,a);e=s[a+146>>1];p[a+146>>1]=32767;if((e|0)!=32767){continue}break}}q[d+3264>>2]=2147450879}e=1;o[d+3272|0]=r[d+3272|0]|1;a=q[b+12>>2];q[c+72>>2]=q[b+8>>2];q[c+76>>2]=a;a=q[b+4>>2];q[c+64>>2]=q[b>>2];q[c+68>>2]=a;f=u[d+3268>>2];h=u[b>>2];u[c+72>>2]=h>x(.0010000000474974513)?x(f/h):f;a=q[d+4>>2];l=q[a>>2];if(!l){break a}i=d+3216|0;while(1){j=s[((g<<1)+a|0)+28568>>1];a=w(j,112)+a|0;if(!(!(r[a+110|0]&2)|!(r[d+3272|0]&8))){Uo(d)}if(q[a+60>>2]){q[c+24>>2]=0;q[c+48>>2]=q[d+8>>2];q[c+52>>2]=c- -64;q[c+56>>2]=q[(d+(j<<2)|0)+12>>2];q[c+60>>2]=q[a+24>>2];o[c+40|0]=0;a=Mi[q[a+60>>2]](c+48|0,c+40|0)|0;j=r[d+3272|0];o[d+3272|0]=j&8|r[c+40|0]<<3|j&247;e=!a&e}e=e&Mr(d,i,1);g=g+1|0;if((l|0)==(g|0)){break a}a=q[d+4>>2];continue}}J(12419,9962,479,9454);G()}a=q[b+12>>2];d:{if(!a){break d}f=u[b>>2];if(f>x(.0010000000474974513)^1){break d}g=r[d+3272|0];h=u[d+3268>>2];e:{if(!(g&32)){break e}o[d+3272|0]=g&223;a=q[b+12>>2];f=u[b>>2];h=x(u[b+8>>2]*f)}m=x(h+u[b+4>>2]);f=x(f*x(x(1)/x(a>>>0)));h=x(m/f);f:{if(h=x(0)){a=~~h>>>0;break f}a=0}u[d+3268>>2]=m-x(f*x(a>>>0));if(!a){break d}b=q[c+76>>2];q[c+56>>2]=q[c+72>>2];q[c+60>>2]=b;b=q[c+68>>2];q[c+48>>2]=q[c+64>>2];q[c+52>>2]=b;u[c+52>>2]=f;if(!l){break d}j=d+3216|0;b=0;while(1){g=0;while(1){i=q[d+4>>2];k=s[(i+(g<<1)|0)+28568>>1];i=w(k,112)+i|0;if(!(!(r[i+110|0]&2)|!(r[d+3272|0]&8))){Uo(d)}n=i- -64|0;if(q[n>>2]){q[c+40>>2]=0;q[c+24>>2]=q[d+8>>2];q[c+28>>2]=c+48;q[c+32>>2]=q[(d+(k<<2)|0)+12>>2];q[c+36>>2]=q[i+24>>2];o[c+16|0]=0;i=Mi[q[n>>2]](c+24|0,c+16|0)|0;k=r[d+3272|0];o[d+3272|0]=k&8|r[c+16|0]<<3|k&247;e=!i&e}e=e&Mr(d,j,1);g=g+1|0;if((l|0)!=(g|0)){continue}break}b=b+1|0;if((a|0)!=(b|0)){continue}break}}a=r[d+3272|0];o[d+3272|0]=a&254;if(a&8){Uo(d)}Ii=c+96|0;return e}function JN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=1;a:{b:{c:{switch(b-a>>1){case 2:c=q[c>>2]+8|0;b=b-2|0;d=s[b>>1];f=s[a>>1];if(s[(c+w(d,112)|0)+104>>1]>=s[(c+w(f,112)|0)+104>>1]){break b}p[a>>1]=d;p[b>>1]=f;return 1;case 3:c=q[c>>2];e=c+8|0;b=b-2|0;d=s[b>>1];f=s[(e+w(d,112)|0)+104>>1];j=s[a+2>>1];h=s[(e+w(j,112)|0)+104>>1];g=s[a>>1];i=e+w(g,112)|0;if(h>>>0>=s[i+104>>1]){e=1;if(f>>>0>=h>>>0){break b}p[a+2>>1]=d;p[b>>1]=j;c=c+8|0;b=s[a+2>>1];d=s[a>>1];if(s[(c+w(b,112)|0)+104>>1]>=s[(c+w(d,112)|0)+104>>1]){break b}p[a+2>>1]=d;p[a>>1]=b;return 1}if(f>>>0>>0){p[a>>1]=d;break a}p[a+2>>1]=g;p[a>>1]=j;e=1;d=s[b>>1];if(s[(c+w(d,112)|0)+112>>1]>=s[i+104>>1]){break b}p[a+2>>1]=d;break a;case 4:$r(a,a+2|0,a+4|0,b-2|0,c);return 1;case 5:$r(a,a+2|0,a+4|0,a+6|0,c);f=b-2|0;g=s[f>>1];d=q[c>>2];b=d+8|0;c=s[a+6>>1];if(s[(w(g,112)+b|0)+104>>1]>=s[(b+w(c,112)|0)+104>>1]){break b}p[a+6>>1]=g;p[f>>1]=c;c=s[a+6>>1];f=b+w(c,112)|0;g=s[a+4>>1];if(s[f+104>>1]>=s[(b+w(g,112)|0)+104>>1]){break b}p[a+4>>1]=c;p[a+6>>1]=g;b=s[a+2>>1];if(s[f+104>>1]>=s[(d+w(b,112)|0)+112>>1]){break b}p[a+4>>1]=b;p[a+2>>1]=c;b=s[a>>1];if(s[f+104>>1]>=s[(d+w(b,112)|0)+112>>1]){break b}p[a+2>>1]=b;p[a>>1]=c;return 1;case 0:case 1:break b;default:break c}}j=q[c>>2];f=j+8|0;e=s[a+4>>1];c=f+w(e,112)|0;g=c;h=s[c+104>>1];d=s[a>>1];i=f+w(d,112)|0;c=s[a+2>>1];f=s[(f+w(c,112)|0)+104>>1];d:{if(s[i+104>>1]<=f>>>0){if(f>>>0<=h>>>0){c=e;break d}p[a+4>>1]=c;p[a+2>>1]=e;if(s[g+104>>1]>=s[i+104>>1]){break d}p[a+2>>1]=d;p[a>>1]=e;break d}e:{if(f>>>0>h>>>0){p[a+4>>1]=d;p[a>>1]=e;break e}p[a+2>>1]=d;p[a>>1]=c;if(s[g+104>>1]>=s[i+104>>1]){c=e;break d}p[a+4>>1]=d;p[a+2>>1]=e}c=d}f:{g:{e=a+6|0;if((e|0)==(b|0)){break g}f=a+4|0;h=0;i=j+8|0;while(1){h:{d=e;k=s[d>>1];l=i+w(k,112)|0;if(s[l+104>>1]>1]){g=d;while(1){i:{p[g>>1]=c;e=f;if((e|0)==(a|0)){e=a;break i}g=e;f=e-2|0;c=s[f>>1];if(s[l+104>>1]>1]){continue}}break}p[e>>1]=k;h=h+1|0;if((h|0)==8){break h}}e=d+2|0;if((e|0)==(b|0)){break g}c=s[d>>1];f=d;continue}break}c=(d+2|0)==(b|0);a=0;break f}a=1}e=a|c}return e&1}p[b>>1]=g;return 1}function oM(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-16|0;Ii=j;q[j+8>>2]=0;i=q[a+8>>2];jsa(i,b);a:{b:{c:{d:{e:{f:{g:{h:{if(r[b+149|0]&128){d=s[a+3266>>1];h=q[b+140>>2]&32767;if(s[b+146>>1]==32767?(d|0)!=(h|0):0){break h}k=a+3264|0;g=k;e=s[a+3264>>1];if((h|0)!=(e|0)){l=q[a+1036>>2];m=q[a+1040>>2]-l>>2;c=e;while(1){if(e>>>0>=m>>>0){break c}e=q[(e<<2)+l>>2];g=e+146|0;f=h;e=s[e+146>>1];if((e|0)==(d&65535)){p[a+3266>>1]=c;d=c;e=s[g>>1]}c=e;e=c&65535;if((f|0)!=(e|0)){continue}break}}c=s[b+146>>1];p[g>>1]=c;if(!((g|0)!=(k|0)|(c|0)!=32767)){p[a+3266>>1]=32767}p[b+146>>1]=32767;q[b+148>>2]=q[b+148>>2]&-32769}e=q[b+84>>2];h=q[a>>2];rM(a,b);yr(b+104|0);if(q[b+136>>2]&2048){zaa(q[b+96>>2],q[b+100>>2])}f=q[b+88>>2];if(f>>>0>2]){c=q[i>>2];Gj(q[c+3232>>2]);g=q[c+3244>>2];if(!g){break b}d=q[c+3252>>2];if(!d|d>>>0>t[c+3248>>2]){break a}d=d-1|0;q[c+3252>>2]=d;q[g+(d<<2)>>2]=f;Bj(q[c+3232>>2])}c=q[b+96>>2];d=q[b+100>>2];if((c|0)!=q[71492]|(d|0)!=q[71493]){xr(a+3144|0,c,d);c=q[71493];q[b+96>>2]=q[71492];q[b+100>>2]=c}c=q[b+140>>2];f=((q[b+136>>2]&255)<<4)+a|0;f=q[f+1084>>2]-q[f+1080>>2]|0;if(!f){break g}if((c>>>16&32767)>>>0>=f>>1>>>0){break f}ZL(a,b);pw(a,b);Kt(a,b);ww(a,q[b+148>>2]);if((e|0)!=285976){cj(h,e)}e=q[a+1052>>2];if(!e){break b}c=s[a+1058>>1];if(!c|c>>>0>s[a+1056>>1]){break a}d=q[b+140>>2];c=c-1|0;p[a+1058>>1]=c;p[e+((c&65535)<<1)>>1]=d&32767;d=q[b+140>>2]&32767;c=q[a+1036>>2];if(d>>>0>=q[a+1040>>2]-c>>2>>>0){break c}e=0;q[c+(d<<2)>>2]=0;f=q[a+3180>>2];c=q[a+3176>>2];d=f-c|0;i:{if(!d){break i}g=d>>2;d=0;while(1){h=e;e=e+1|0;i=(h<<2)+c|0;d=q[i>>2]==(b|0)|d;if(!(!(d&1)|h>>>0>=g-1>>>0)){if(e>>>0>=g>>>0){break c}q[i>>2]=q[(e<<2)+c>>2];f=q[a+3180>>2];c=q[a+3176>>2]}g=f-c>>2;if(g>>>0>e>>>0){continue}break}if(!(d&1)){break i}if((c|0)==(f|0)){break e}q[a+3180>>2]=f-4}Ni(Ui(b,204,160));if(t[a+3168>>2]>s[a+1058>>1]){break d}Ii=j+16|0;return}J(9664,7192,1911,9757);G()}J(9529,7192,1954,9512);G()}J(9586,7192,1955,9512);G()}J(12613,9962,548,12466);G()}J(7842,7192,1992,9512);G()}J(12419,9962,479,9454);G()}J(12459,12368,140,12454);G()}J(12490,12368,141,12454);G()}function Yw(a,b,c,d,e){var f=0,g=0,h=x(0),i=0,j=x(0),k=x(0),l=0,m=0,n=0,p=0,r=0,s=0,t=0,v=x(0),w=x(0),z=0,A=0,B=0,C=x(0),D=x(0);v=x(1e9);A=1;while(1){C=u[b+12>>2];D=u[a+12>>2];i=g|126;t=i;f=i;w=x(g|0);h=x(x(x(x(u[a>>2]*x(127))-w)*x(.5))+x(.5));a:{if(x(y(h))(m|0)){f=g}m=f;h=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[a>>2]);h=x(h*h);f=i;t=g;j=x(x(x(x(u[b>>2]*x(127))-w)*x(.5))+x(.5));b:{if(x(y(j))(t|0)){f=g}k=h;t=f;h=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[b>>2]);h=x(x(k+x(h*h))+x(0));f=i;n=g;j=x(x(x(x(u[a+4>>2]*x(127))-w)*x(.5))+x(.5));c:{if(x(y(j))(n|0)){f=g}n=f;j=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[a+4>>2]);j=x(j*j);f=i;p=g;k=x(x(x(x(u[b+4>>2]*x(127))-w)*x(.5))+x(.5));d:{if(x(y(k))(p|0)){f=g}k=h;p=f;h=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[b+4>>2]);h=x(k+x(j+x(h*h)));f=i;r=g;j=x(x(x(x(u[a+8>>2]*x(127))-w)*x(.5))+x(.5));e:{if(x(y(j))(r|0)){f=g}r=f;j=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[a+8>>2]);j=x(j*j);f=i;s=g;k=x(x(x(x(u[b+8>>2]*x(127))-w)*x(.5))+x(.5));f:{if(x(y(k))(s|0)){f=g}k=h;s=f;h=x(x(x(((f>>>6&1|f<<1)&255)>>>0)/x(255))-u[b+8>>2]);h=x(k+x(j+x(h*h)));if(!(h(l|0)){f=g}q[e+4>>2]=g;q[e>>2]=g;o[c|0]=(m&254)>>>1;o[d|0]=(t&254)>>>1;o[c+1|0]=(n&254)>>>1;o[d+1|0]=(p&254)>>>1;o[c+2|0]=(r&254)>>>1;o[d+2|0]=(s&254)>>>1;m=c;if((g|0)<=(z|0)){g=(i|0)<(z|0)?i:z}o[m+3|0]=(g&254)>>>1;o[d+3|0]=(f&254)>>>1;v=h}g=1;i=A;A=0;if(i){continue}break}}function Fba(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;i=Ii-16|0;Ii=i;f=q[a>>2];c=f;j=q[c+8>>2]-q[c+12>>2]>>4;c=Ui(yj(c,440),0,440);q[c+8>>2]=-2;q[c>>2]=-2;q[c+4>>2]=-2;a:{b:{e=a+44|0;d=q[e>>2];h=a+48|0;g=q[h>>2];if((d|0)==(g|0)){if(o[a+52|0]&1){break b}g=d;d=a+40|0;Wi((g-q[d>>2]>>2)+32|0,4,d,h,e);g=q[h>>2];d=q[e>>2]}if((d|0)==(g|0)){break a}q[a+44>>2]=d+4;q[d>>2]=c;ej(f,-1);q[c>>2]=zk(f,-1e4);vj(f,0,0);q[c+8>>2]=zk(f,-1e4);vj(f,0,0);d=zk(f,-1e4);q[c+16>>2]=0;q[c+12>>2]=a;q[c+4>>2]=d;q[c+224>>2]=q[b+32>>2];if(o[c+44|0]&1){break b}Wi(q[b>>2],592,c+32|0,c+40|0,c+36|0);c:{d=s[c+24>>1];e=s[b>>1];if(d>>>0<=e>>>0){h=q[c+20>>2];g=Yi(e<<1);q[c+20>>2]=g;g=Ti(g,h,d<<1);p[c+24>>1]=e;if(d>>>0>>0){while(1){p[g+(d<<1)>>1]=d;d=d+1|0;if((e|0)!=(d|0)){continue}break}}Ni(h);if(o[c+60|0]&1){break b}Wi(q[b+4>>2],72,c+48|0,c+56|0,c+52|0);d=q[b+8>>2];_I(c+128|0,d<<1,d);d=q[b+8>>2];aJ(c+160|0,d<<1,d);d=q[b+12>>2];So(c+192|0,d<<1,d);d=q[b+16>>2];So(c+96|0,d<<1,d);d=q[b+20>>2];TI(c+228|0,d<<1,d);if(o[c+272|0]&1){break b}Wi(q[b+24>>2],12,c+260|0,c+268|0,c+264|0);d=c+276|0;e=q[b+28>>2];II(d,e<<1,e);if(o[c+320|0]&1){break b}Wi(1,8,c+308|0,c+316|0,c+312|0);e=q[b+76>>2];q[c+372>>2]=0;q[c+352>>2]=e;e=q[b+36>>2];q[c+380>>2]=-1;q[c+384>>2]=0;q[c+376>>2]=e;q[c+392>>2]=q[a+28>>2];q[c+396>>2]=q[a+32>>2];q[c+432>>2]=q[b+68>>2];q[c+404>>2]=q[b+40>>2];q[c+408>>2]=q[b+44>>2];q[c+412>>2]=q[b+48>>2];q[c+416>>2]=q[b+52>>2];q[c+420>>2]=q[b+56>>2];q[c+424>>2]=q[b+60>>2];q[c+428>>2]=q[b+64>>2];q[c+436>>2]=q[b+72>>2];q[c+400>>2]=q[b+80>>2];a=q[213710];b=q[213711];e=s[c+388>>1];p[c+388>>1]=e+1;p[i+14>>1]=e;tA(d,a,b,i+14|0);a=q[213713];b=a;d=q[213712];q[c+344>>2]=d;q[c+348>>2]=b;a=q[c+308>>2];q[c+312>>2]=a;if((a|0)==q[c+316>>2]){break a}q[c+312>>2]=a+8;q[a>>2]=d;q[a+4>>2]=b;if(o[c+336|0]&1){break b}Wi(0,4,c+324|0,c+332|0,c+328|0);Zi(f,-1e4,199585);xj(f,-2);yk(f);Az(q[c+400>>2]);a=q[f+8>>2];q[a+8>>2]=0;q[f+8>>2]=a+16;yk(f);if(q[f+8>>2]-q[f+12>>2]>>4!=(j|0)){break c}Ii=i+16|0;return c}J(202120,201742,112,201251);G()}J(199603,199542,383,199624);G()}J(202045,201514,493,201251);G()}J(201636,201514,533,201660);G()}function Nga(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;a:{b:{c:{d:{if(b>>>0<2097152){f=a+1|0;e:{if(f>>>0<2){break e}d=a&65535;b=q[75054];if(d>>>0>=t[b+32>>2]){break a}e=q[q[b+24>>2]+(d<<2)>>2];if(!e){break e}c=s[q[b+28>>2]+(d<<1)>>1]==(a>>>16|0)?e:0}Gc(1,c+448|0);f:{g:{switch(q[c+56>>2]-1|0){case 0:if(!q[c+48>>2]){break f}Z(1,c+48|0);q[c+48>>2]=0;break f;case 1:break g;default:break f}}b=q[c+52>>2];d=b;e=q[c+48>>2];if(!(b|e)){break f}Mi[q[75009]](e,d);q[c+48>>2]=0;q[c+52>>2]=0}h:{i:{switch(q[c+120>>2]-1|0){case 1:b=q[c+116>>2];d=b;e=q[c+112>>2];if(!(b|e)){break h}Mi[q[75009]](e,d);q[c+112>>2]=0;q[c+116>>2]=0;break h;case 0:break i;default:break h}}b=c+112|0;if(!q[b>>2]){break h}Z(1,b|0);q[b>>2]=0}j:{k:{switch(q[c+184>>2]-1|0){case 1:b=q[c+180>>2];d=b;e=q[c+176>>2];if(!(b|e)){break j}Mi[q[75009]](e,d);q[c+176>>2]=0;q[c+180>>2]=0;break j;case 0:break k;default:break j}}b=c+176|0;if(!q[b>>2]){break j}Z(1,b|0);q[b>>2]=0}l:{m:{switch(q[c+248>>2]-1|0){case 1:b=q[c+244>>2];d=b;e=q[c+240>>2];if(!(b|e)){break l}Mi[q[75009]](e,d);q[c+240>>2]=0;q[c+244>>2]=0;break l;case 0:break m;default:break l}}b=c+240|0;if(!q[b>>2]){break l}Z(1,b|0);q[b>>2]=0}switch(q[c+440>>2]-1|0){case 0:break c;case 1:break d;default:break b}}J(91172,91211,73,91247);G()}b=q[c+436>>2];d=b;e=q[c+432>>2];if(!(b|e)){break b}Mi[q[75009]](e,d);q[c+432>>2]=0;q[c+436>>2]=0;break b}b=c+432|0;if(!q[b>>2]){break b}Z(1,b|0);q[b>>2]=0}n:{o:{switch(q[c+312>>2]-1|0){case 0:b=c+304|0;if(!q[b>>2]){break n}Z(1,b|0);q[b>>2]=0;break n;case 1:break o;default:break n}}b=q[c+308>>2];d=b;e=q[c+304>>2];if(!(b|e)){break n}Mi[q[75009]](e,d);q[c+304>>2]=0;q[c+308>>2]=0}p:{q:{switch(q[c+376>>2]-1|0){case 0:b=c+368|0;if(!q[b>>2]){break p}Z(1,b|0);q[b>>2]=0;break p;case 1:break q;default:break p}}b=q[c+372>>2];d=b;e=q[c+368>>2];if(!(b|e)){break p}Mi[q[75009]](e,d);q[c+368>>2]=0;q[c+372>>2]=0}r:{s:{if(f>>>0<2){break s}d=a&65535;b=q[75054];if(d>>>0>=t[b+32>>2]){break r}f=q[b+24>>2]+(d<<2)|0;if(!q[f>>2]){break s}d=d<<1;if(s[d+q[b+28>>2]>>1]!=(a>>>16|0)){break s}q[f>>2]=0;p[d+q[b+28>>2]>>1]=0}Ni(c);return}}J(91017,91032,144,91096);G()}function Vwa(a,b,c,d){var e=0,f=0,g=0,h=0,i=x(0),j=x(0),k=x(0),l=0,m=0,n=x(0),o=x(0),p=0,s=0,t=0,v=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=x(0),S=0,T=0,U=x(0),V=0,W=0,X=0,Y=0,Z=0,_=0;while(1){m=r[b+h|0];l=(h<<2)+a|0;J=r[l+2|0];K=w(m,J)+K|0;L=r[l+1|0];M=w(L,m)+M|0;l=r[l|0];N=w(l,m)+N|0;e=q[(m<<2)+107872>>2]+e|0;O=O+J|0;P=P+L|0;Q=l+Q|0;h=h+1|0;if((h|0)!=16){continue}break}o=x((e&255)>>>0);R=x((e>>>16&255)>>>0);i=x((e>>>8&255)>>>0);j=x(x(o*R)-x(i*i));m=x(y(j))>>0);k=x(x(x(Q>>>0)*x(3))-n);j=x(x(3)/j);o=x(j*o);i=x(j*x(-i));u[c>>2]=x(o*n)+x(i*k);U=x(i*n);n=x(j*R);u[d>>2]=U+x(n*k);k=x(M>>>0);j=x(x(x(P>>>0)*x(3))-k);u[c+4>>2]=x(o*k)+x(j*i);u[d+4>>2]=x(i*k)+x(j*n);k=x(K>>>0);j=x(x(x(O>>>0)*x(3))-k);u[c+8>>2]=x(o*k)+x(j*i);u[d+8>>2]=x(i*k)+x(j*n);K=a+60|0;l=a+56|0;M=a+52|0;N=a+48|0;O=a+44|0;P=a+40|0;Q=a+36|0;J=a+32|0;L=a+28|0;V=a+24|0;W=a+20|0;X=a+16|0;Y=a+12|0;Z=a+8|0;_=a+4|0;h=0;while(1){b=h<<2;S=b+c|0;a:{if(u[b+d>>2]>x(255)^1?!(u[S>>2]>>0

>>0?e:p;p=h+Z|0;s=r[p|0];e=e>>>0>>0?e:s;s=h+Y|0;t=r[s|0];e=e>>>0>>0?e:t;t=h+X|0;v=r[t|0];e=e>>>0>>0?e:v;v=h+W|0;z=r[v|0];e=e>>>0>>0?e:z;z=h+V|0;A=r[z|0];e=e>>>0>>0?e:A;A=h+L|0;B=r[A|0];e=e>>>0>>0?e:B;B=h+J|0;C=r[B|0];e=e>>>0>>0?e:C;C=h+Q|0;D=r[C|0];e=e>>>0>>0?e:D;D=h+P|0;E=r[D|0];e=e>>>0>>0?e:E;E=h+O|0;F=r[E|0];e=e>>>0>>0?e:F;F=h+N|0;G=r[F|0];e=e>>>0>>0?e:G;G=h+M|0;H=r[G|0];e=e>>>0>>0?e:H;H=h+l|0;I=r[H|0];e=e>>>0>>0?e:I;I=h+K|0;T=r[I|0];e=e>>>0>>0?e:T;f=r[f|0];g=r[g|0];f=f>>>0>g>>>0?f:g;g=r[p|0];f=f>>>0>g>>>0?f:g;g=r[s|0];f=f>>>0>g>>>0?f:g;g=r[t|0];f=f>>>0>g>>>0?f:g;g=r[v|0];f=f>>>0>g>>>0?f:g;g=r[z|0];f=f>>>0>g>>>0?f:g;g=r[A|0];f=f>>>0>g>>>0?f:g;g=r[B|0];f=f>>>0>g>>>0?f:g;g=r[C|0];f=f>>>0>g>>>0?f:g;g=r[D|0];f=f>>>0>g>>>0?f:g;g=r[E|0];f=f>>>0>g>>>0?f:g;g=r[F|0];f=f>>>0>g>>>0?f:g;g=r[G|0];f=f>>>0>g>>>0?f:g;g=r[H|0];f=f>>>0>g>>>0?f:g;g=r[I|0];if((e|0)!=((f>>>0>g>>>0?f:g)|0)){break a}i=x(e>>>0);u[S>>2]=i;u[b+d>>2]=i}h=h+1|0;if((h|0)!=3){continue}break}}return m^1}function G9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+16>>2];if(q[a+20>>2]-g>>3>>>0>b>>>0){d=q[a>>2];e=q[a+4>>2]-d>>8;h=e-1|0;c=q[a+32>>2];if(h>>>0>=q[a+36>>2]-c>>2>>>0){break a}f=(b<<3)+g|0;i=q[f>>2];if(e>>>0<=i>>>0){break d}c=q[(h<<2)+c>>2];Ui(d+(i<<8)|0,0,256);d=q[a+16>>2];if(c>>>0>=q[a+20>>2]-d>>3>>>0){break a}q[d+(c<<3)>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];d=q[a+4>>2];c=q[a>>2];if(e>>>0>=d-c>>8>>>0){break c}c=c+(e<<8)|0;d=d-256|0;q[c>>2]=q[d>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];u[c+64>>2]=u[d+64>>2];u[c+68>>2]=u[d+68>>2];u[c+72>>2]=u[d+72>>2];u[c+80>>2]=u[d+80>>2];u[c+84>>2]=u[d+84>>2];u[c+88>>2]=u[d+88>>2];u[c+92>>2]=u[d+92>>2];u[c+96>>2]=u[d+96>>2];u[c+100>>2]=u[d+100>>2];u[c+104>>2]=u[d+104>>2];u[c+108>>2]=u[d+108>>2];u[c+112>>2]=u[d+112>>2];u[c+116>>2]=u[d+116>>2];u[c+120>>2]=u[d+120>>2];u[c+124>>2]=u[d+124>>2];u[c+128>>2]=u[d+128>>2];u[c+132>>2]=u[d+132>>2];u[c+136>>2]=u[d+136>>2];u[c+140>>2]=u[d+140>>2];u[c+144>>2]=u[d+144>>2];u[c+148>>2]=u[d+148>>2];u[c+152>>2]=u[d+152>>2];u[c+156>>2]=u[d+156>>2];u[c+160>>2]=u[d+160>>2];u[c+164>>2]=u[d+164>>2];u[c+168>>2]=u[d+168>>2];u[c+172>>2]=u[d+172>>2];u[c+176>>2]=u[d+176>>2];u[c+180>>2]=u[d+180>>2];u[c+184>>2]=u[d+184>>2];u[c+188>>2]=u[d+188>>2];e=q[d+196>>2];q[c+192>>2]=q[d+192>>2];q[c+196>>2]=e;e=q[d+204>>2];q[c+200>>2]=q[d+200>>2];q[c+204>>2]=e;e=q[d+212>>2];q[c+208>>2]=q[d+208>>2];q[c+212>>2]=e;e=q[d+220>>2];q[c+216>>2]=q[d+216>>2];q[c+220>>2]=e;e=q[d+228>>2];q[c+224>>2]=q[d+224>>2];q[c+228>>2]=e;e=q[d+236>>2];q[c+232>>2]=q[d+232>>2];q[c+236>>2]=e;e=q[d+244>>2];q[c+240>>2]=q[d+240>>2];q[c+244>>2]=e;c=q[a+4>>2]-256|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(57211,56957,152,57232);G()}J(57237,57106,513,57252);G()}J(57262,57106,516,57252);G()}J(57189,57106,479,57200);G()}function Rla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0);c=Ii+ -64|0;Ii=c;h=2;i=nj(c+40|0,a,2,65882,1056);a:{b:{c:{d:{b=kN(oo(a,1,1,0),$j(a,2),Li,c+28|0,c+36|0,c+32|0);switch(b|0){case 0:break b;case 11:break d;default:break c}}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break a}a=c;if(b>>>0<=11){b=q[(b<<2)+262624>>2]}else{b=153853}q[a>>2]=b;h=Kj(i,68048,c);break a}vj(a,0,0);e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{b=q[c+32>>2];switch(b|0){case 6:break h;case 5:break i;case 4:break j;case 2:break k;case 1:break l;case 0:break m;case 8:break n;case 3:case 7:break f;default:break e}}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){j=u[g+(b<<2)>>2];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=j;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=r[b+g|0];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=s[g+(b<<1)>>1];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=q[g+(b<<2)>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=o[b+g|0];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=p[g+(b<<1)>>1];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}break g}d=q[c+36>>2];if(!d){break g}b=0;g=q[c+28>>2];while(1){f=q[g+(b<<2)>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=b+1|0;nk(a,-2,b);if((b|0)!=(d|0)){continue}break}}b=q[c+32>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;break a}h=Kj(i,68086,0);break a}q[c+16>>2]=b;h=Kj(i,68138,c+16|0)}mj(i);Ii=c- -64|0;return h|0}function tna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=Ii-128|0;Ii=e;c=q[a+4>>2];b=q[c+16>>2];a:{b:{d=q[q[a+12>>2]>>2];if(d>>>0>2]-b>>3>>>0){b=q[b+(d<<3)>>2];g=q[c+4>>2];c=q[c>>2];if(b>>>0>=g-c>>2>>>0){break a}c=q[c+(b<<2)>>2];b=q[a+16>>2];d=q[b+64>>2];f=q[57289];g=q[b+68>>2];c:{if((d|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){o[c+254|0]=r[c+254|0]|1;a=q[c+132>>2];o[a+186|0]=r[a+186|0]&251|4;break c}f=q[57290];if((d|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){o[c+254|0]=r[c+254|0]&254;a=q[c+132>>2];o[a+186|0]=r[a+186|0]&251;break c}if(!q[b+80>>2]){break c}f=q[59998];if((d|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){d:{switch(_G(q[c+132>>2],q[b+96>>2],q[b+100>>2],q[b+104>>2],u[b+108>>2],u[b+112>>2],u[b+116>>2])|0){case 0:b=q[a+16>>2];d=q[b+4>>2];q[c+144>>2]=q[b>>2];q[c+148>>2]=d;d=q[b+28>>2];q[c+168>>2]=q[b+24>>2];q[c+172>>2]=d;d=q[b+20>>2];q[c+160>>2]=q[b+16>>2];q[c+164>>2]=d;d=q[b+12>>2];q[c+152>>2]=q[b+8>>2];q[c+156>>2]=d;q[c+176>>2]=q[q[a+16>>2]+76>>2];break c;case 3:break d;default:break c}}a=q[a+16>>2];c=sm(q[a+32>>2],q[a+36>>2]);d=aj(q[a+48>>2],q[a+52>>2]);a=aj(q[a+56>>2],q[a+60>>2]);q[e+12>>2]=aj(q[b+96>>2],q[b+100>>2]);q[e+8>>2]=a;q[e+4>>2]=d;q[e>>2]=c;Pi(4,50700,50983,e);break c}f=q[59999];if((d|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){a=q[c+132>>2];a=((o[a+186|0]&1)<<5)+a|0;o[a+28|0]=r[a+28|0]&254;break c}f=q[59006];if((d|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){d=q[c+216>>2];if(!d){g=q[c+128>>2];d=q[g+28>>2];if((d|0)==q[g+32>>2]){break b}d=q[d+4>>2]}g=q[b+100>>2];f=q[b+96>>2];d=q[d>>2];u[e+32>>2]=u[b+112>>2];u[e+36>>2]=u[b+116>>2];u[e+40>>2]=u[b+120>>2];u[e+44>>2]=u[b+124>>2];if((Bp(d,f,g,Gp(e+56|0,e+32|0),q[b+128>>2],238,c)|0)!=-1){break c}a=q[a+16>>2];c=sm(q[a+32>>2],q[a+36>>2]);d=aj(q[a+48>>2],q[a+52>>2]);a=aj(q[a+56>>2],q[a+60>>2]);q[e+28>>2]=aj(q[b+96>>2],q[b+100>>2]);q[e+24>>2]=a;q[e+20>>2]=d;q[e+16>>2]=c;Pi(4,50700,51022,e+16|0);break c}a=q[59022];if(q[a+8>>2]!=(d|0)|q[a+12>>2]!=(g|0)){break c}a=q[c+180>>2];if(!a){break c}if(!ow(a,q[b+96>>2],q[b+100>>2])){break c}o[c+254|0]=r[c+254|0]|8}Ii=e+128|0;return 0}break a}J(51709,51308,486,51547);G()}J(51709,51308,479,51547);G()}function a5(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;b=Ii+ -64|0;Ii=b;i=q[a+8>>2]-q[a+12>>2]>>4;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;a:{b:{c:{d:{e:{f:{if(qm(a,b+32|0)){l=kj(a,1,0);m=kj(a,2,0);Dj(a,3,6);ej(a,3);n=$s(a);d=b+24|0;c=d;q[c>>2]=0;q[c+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;j=b+16|4;Wi(4096,1,b+16|0,c,j);g:{if((i|0)<4){break g}if(!Vi(a,4)){break g}Dj(a,4,5);ej(a,4);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){c=uj(a,-2,0);f=uj(a,-1,0);p=q[b+16>>2];k=q[b+24>>2];e=q[b+20>>2];g=k-e|0;h=(hj(c)+hj(f)|0)+2|0;if(g>>>0>>0){if(o[b+28|0]&1){break e}Wi((k-p|0)+(h>>>0>1024?h:1024)|0,1,b+16|0,d,j);e=q[b+20>>2];h=q[b+24>>2]-e|0}else{h=g}g=hj(c);if(h>>>0>>0){break b}Ti(e,c,g);c=g+q[b+20>>2]|0;q[b+20>>2]=c;if((c|0)==q[b+24>>2]){break a}q[b+20>>2]=c+1;o[c|0]=58;e=q[b+20>>2];g=q[b+24>>2]-e|0;c=hj(f);if(g>>>0>>0){break b}Ti(e,f,c);c=c+q[b+20>>2]|0;q[b+20>>2]=c;if((c|0)==q[b+24>>2]){break a}q[b+20>>2]=c+1;o[c|0]=10;Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2)}c=q[b+20>>2];if((c|0)==q[b+24>>2]){break a}d=n+2|0;q[b+20>>2]=c+1;e=0;o[c|0]=0;f=0;h:{if((i|0)<5){break h}if(Vi(a,5)){Dj(a,5,4);c=kj(a,5,b+12|0);f=q[b+12>>2];e=Yi(f);Ti(e,c,f)}if((i|0)<6){break h}if(!Vi(a,6)){break h}Dj(a,6,5);ej(a,6);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){if(!dj(uj(a,-2,0),127049)){fj(a,-1)}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2)}c=$i(40);q[c+32>>2]=d;d=q[b+36>>2];q[c>>2]=q[b+32>>2];q[c+4>>2]=d;d=q[b+44>>2];q[c+8>>2]=q[b+40>>2];q[c+12>>2]=d;d=q[b+52>>2];q[c+16>>2]=q[b+48>>2];q[c+20>>2]=d;d=q[b+60>>2];q[c+24>>2]=q[b+56>>2];q[c+28>>2]=d;di(m|0,l|0,q[b+16>>2],c|0,841,842,e|0,f|0,q[79310]);if(q[a+8>>2]-q[a+12>>2]>>4!=(i|0)){break d}i:{if(o[b+28|0]&1){break i}a=q[b+16>>2];if(!a){break i}Ni(a)}a=0;break f}if(q[a+8>>2]-q[a+12>>2]>>4!=(i|0)){break c}a=Qi(a,127117,0)}Ii=b- -64|0;return a|0}J(127355,127430,493,127486);G()}J(127057,127078,180,127104);G()}J(127057,127078,183,127104);G()}J(127498,127430,540,127527);G()}J(127537,127430,533,127561);G()}function Fr(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=x(0);i=Ii-112|0;Ii=i;a:{b:{c:{d:{e:{h=q[a+4>>2];j=q[a>>2];k=h-j|0;if((k|0)<1){break e}f:{if((h|0)!=(j|0)){h=j-h|0;h=((h|0)>(k|0)?h:k)>>>2|0;k=h>>>0>1?h:1;h=0;while(1){j=q[(h<<2)+j>>2];if(q[j+8>>2]==(c|0)&q[j+12>>2]==(d|0)){break f}h=h+1|0;if((k|0)==(h|0)){break e}j=q[a>>2];if(q[a+4>>2]-j>>2>>>0>h>>>0){continue}break}}break a}b=q[a>>2];if(q[a+4>>2]-b>>2>>>0<=h>>>0){break a}h=q[b+(h<<2)>>2];break d}k=a+4|0;j=Zz(c,d);h=q[a+4>>2];l=q[a+8>>2];if((h|0)==(l|0)){if(o[a+12|0]&1){break c}Wi((h-q[a>>2]>>2)+4|0,4,a,a+8|0,k);l=q[a+8>>2];h=q[a+4>>2]}if((h|0)==(l|0)){break b}q[k>>2]=h+4;q[h>>2]=j;h=0;if(!$z(b,c,d,i+108|0)){break d}h=q[i+108>>2];q[i+104>>2]=s[h+24>>1];b=q[q[i+108>>2]+16>>2];h=q[h>>2];g:{if(h){mt(j,h,q[i+104>>2]);q[j+16>>2]=b;break g}if((b|0)==9){q[i+88>>2]=0;q[i+92>>2]=0;q[i+80>>2]=0;q[i+84>>2]=0;q[i+72>>2]=0;q[i+76>>2]=0;b=i- -64|0;q[b>>2]=0;q[b+4>>2]=0;q[i+56>>2]=0;q[i+60>>2]=0;q[i+48>>2]=0;q[i+52>>2]=0;q[i+40>>2]=0;q[i+44>>2]=0;q[i+32>>2]=0;q[i+36>>2]=0;mt(j,i+32|0,4);break g}q[i+40>>2]=0;q[i+44>>2]=0;q[i+32>>2]=0;q[i+36>>2]=0;mt(j,i+32|0,1)}h=j}q[i+32>>2]=0;q[i+32>>2]=s[h+24>>1];j=q[h>>2];h=q[h+16>>2];e=(h|0)==9?e<<2:e;k=q[i+32>>2];h:{if(e>>>0>=k>>>0){q[i+16>>2]=aj(c,d);q[i+24>>2]=e;q[i+20>>2]=q[i+32>>2];Pi(4,47771,47779,i+16|0);break h}b=j+(e<<4)|0;i:{if((h|0)==9){if(f){a=aj(c,d);q[i+4>>2]=e;q[i>>2]=a;Pi(4,47771,47840,i);break h}e=q[g+12>>2];q[b>>2]=q[g+8>>2];q[b+4>>2]=e;e=g- -64|0;f=q[e+4>>2];q[b+56>>2]=q[e>>2];q[b+60>>2]=f;e=q[g+60>>2];q[b+48>>2]=q[g+56>>2];q[b+52>>2]=e;e=q[g+52>>2];q[b+40>>2]=q[g+48>>2];q[b+44>>2]=e;e=q[g+44>>2];q[b+32>>2]=q[g+40>>2];q[b+36>>2]=e;e=q[g+36>>2];q[b+24>>2]=q[g+32>>2];q[b+28>>2]=e;e=q[g+28>>2];q[b+16>>2]=q[g+24>>2];q[b+20>>2]=e;e=q[g+20>>2];q[b+8>>2]=q[g+16>>2];q[b+12>>2]=e;break i}if(!f){f=q[g+16>>2];h=q[g+12>>2];m=u[g+20>>2];u[b>>2]=u[g+8>>2];b=j+(e<<4)|0;u[b+12>>2]=m;q[b+4>>2]=h;q[b+8>>2]=f;break i}u[b+(q[f>>2]<<2)>>2]=v[g+8>>3]}SK(a,c,d,j,k)}Ii=i+112|0;return}J(48075,47954,493,48150);G()}J(47930,47954,533,48010);G()}J(48162,47954,479,48173);G()}function x5(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=Ii-608|0;Ii=g;l=Jk();i=Yi(48);f=i;q[f>>2]=0;q[f+4>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+32>>2]=0;q[f+36>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;q[f+16>>2]=0;q[f+20>>2]=0;q[f+8>>2]=0;q[f+12>>2]=0;k=bk(1,188);q[f+8>>2]=k;j=bk(1,320);q[f+4>>2]=j;n=bk(1,632);q[f>>2]=n;h=bk(1,280);q[f+12>>2]=h;m=bk(1,16);q[f+16>>2]=m;Ui(k,0,188);Ui(j,0,320);ZW(n);f=yX(j,n);a:{if(f){q[g+84>>2]=f;q[g+80>>2]=lr(f);q[g+88>>2]=(f|0)<0?45:32;a=f>>31;q[g+92>>2]=a+f^a;Pi(4,181404,181478,g+80|0);b=-2e3;break a}f=$V(k);if(f){q[g+68>>2]=f;q[g+64>>2]=lr(f);q[g+72>>2]=(f|0)<0?45:32;a=f>>31;q[g+76>>2]=a+f^a;Pi(4,181404,181527,g- -64|0);b=-2e3;break a}q[k+28>>2]=j;q[k+24>>2]=1412;q[k+184>>2]=q[k+184>>2]&-13;f=c;j=f>>31;pG(a,f,j);qG(a,f,j);j=!(f|d);if(!j){q[k+156>>2]=(((f|0)>5e5?c:5e5)>>>0)/1e3;q[k+152>>2]=1;m=q[i+16>>2];h=q[i+12>>2]}q[m+8>>2]=c;q[m+12>>2]=d;Hs(h);if(q[213382]){f=q[i+8>>2];q[f+184>>2]=q[f+184>>2]&-13|8;f=q[213382];h=q[i+8>>2];q[h+92>>2]=0;q[h+88>>2]=f;h=q[i+12>>2]}f=CV(h,q[i+8>>2]);if(f){q[g+52>>2]=f;q[g+48>>2]=lr(f);q[g+56>>2]=(f|0)<0?45:32;a=f>>31;q[g+60>>2]=a+f^a;Pi(4,181404,181582,g+48|0);b=-2001;break a}b=DV(h,b);if(b){q[g+36>>2]=b;q[g+32>>2]=lr(b);q[g+40>>2]=(b|0)<0?45:32;a=b>>31;q[g+44>>2]=a+b^a;Pi(4,181404,181627,g+32|0);b=-2001;break a}b=q[i+16>>2];q[b>>2]=-1;q[b>>2]=a;q[h+44>>2]=1414;q[h+40>>2]=0;q[h+36>>2]=1413;q[h+48>>2]=b;q[h+96>>2]=1416;q[h+92>>2]=1415;q[h+88>>2]=i;a=q[h+92>>2];if(a){Mi[a|0](q[h+88>>2],0,0)}while(1){b=ps(q[i+12>>2]);if((b&-129)==-26880){continue}break}f=Jk();b:{c:{if(!j){a=-26624;f=f-l|0;l=f>>31;if((d|0)==(l|0)&c>>>0>>0|d>>>0>>0){break c}}a=b;if(!a){break b}}Ui(g+96|0,0,512);o[g+96|0]=0;q[g+16>>2]=a;q[g+20>>2]=g+96;Pi(4,181404,181679,g+16|0);d:{if((a|0)==-9984){b=-2003;a=181720;break d}b=-2001;if((a|0)!=-26624){break a}b=-2002;a=181763}Pi(4,181404,a,0);break a}e:{f:{b=q[i+12>>2];a=q[b+60>>2];if(a){break f}a=q[b+64>>2];if(a){break f}a=-1;break e}a=q[a+100>>2]}if(a){sV(g+96|0,a);q[g>>2]=g+96;Pi(4,181404,181790,g);b=-2001;break a}q[e>>2]=i;b=0}Ii=g+608|0;return b}function gqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-272|0;Ii=b;j=nj(b+248|0,a,0,15159,917);gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);d=q[c+4>>2];q[b+240>>2]=0;q[b+244>>2]=0;q[b+232>>2]=0;q[b+236>>2]=0;q[b+224>>2]=0;q[b+228>>2]=0;q[b+216>>2]=0;q[b+220>>2]=0;qm(a,b+216|0);q[b+208>>2]=0;q[b+212>>2]=0;q[b+200>>2]=0;q[b+204>>2]=0;q[b+192>>2]=0;q[b+196>>2]=0;q[b+184>>2]=0;q[b+188>>2]=0;Gk(a,1,b+184|0,b+216|0);c=q[q[q[c+4>>2]+80>>2]+8>>2];a:{if(!c){break a}c=q[c>>2];if(!c){break a}f=q[c+3216>>2];g=q[c+3220>>2]}if((f|0)!=q[b+184>>2]|(g|0)!=q[b+188>>2]){Qi(a,15199,0)}b:{if(uk(a,2)){c=Oi(uj(a,2,0));f=Li;break b}c=nl(a,2);f=Li}g=jn(q[q[d+80>>2]+8>>2],q[b+200>>2],q[b+204>>2]);c:{if(!g){q[b>>2]=aj(q[b+200>>2],q[b+204>>2]);a=Qi(a,15260,b);break c}o[b+176|0]=0;q[b+168>>2]=0;d=Vi(a,3);if(q[a+8>>2]-q[a+12>>2]>>4>=4){Dj(a,4,5);ej(a,4);Zi(a,-1,14977);e=Vi(a,-1);if(e){h=$j(a,-1);o[b+176|0]=255;q[b+168>>2]=h;q[b+172>>2]=Li}Ri(a,-2);Zi(a,-1,14981);d:{if(!Vi(a,-1)){break d}if(e){a=Qi(a,14987,0);break c}if(!Oj(a,-1)){a=Qi(a,15040,0);break c}if((d|0)==5){Pi(3,14825,15302,0)}e=jj(a,-1);h=e-1|0;q[b+168>>2]=h;if((e|0)>0){break d}c=aj(c,f);q[b+84>>2]=h;q[b+80>>2]=c;a=Qi(a,15396,b+80|0);break c}Ri(a,-2);Ri(a,-2)}if((d|0)==5){ej(a,3);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;if(Hj(a,-2)){while(1){if(!Oj(a,-2)){q[b+16>>2]=aj(c,f);a=Qi(a,15456,b+16|0);break c}i=Mj(a,-2);e:{if(y(i)<2147483648){d=~~i;break e}d=-2147483648}if((d|0)<=0){c=aj(c,f);q[b+36>>2]=d;q[b+32>>2]=c;a=Qi(a,15523,b+32|0);break c}e=Jr(b+96|0);h=Et(a,-1,e);q[b+168>>2]=d-1;f:{if(h){break f}d=q[b+180>>2];q[b+56>>2]=q[b+176>>2];q[b+60>>2]=d;d=q[b+172>>2];q[b+48>>2]=q[b+168>>2];q[b+52>>2]=d;d=sB(g,q[b+208>>2],q[b+212>>2],c,f,b+48|0,e);if(!d){break f}a=jM(a,d,c,f,g,b+184|0,b+168|0);break c}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);a=0;break c}d=a;e=Jr(b+96|0);a=Et(a,3,e);if(!a){a=q[b+180>>2];q[b+72>>2]=q[b+176>>2];q[b+76>>2]=a;a=q[b+172>>2];q[b+64>>2]=q[b+168>>2];q[b+68>>2]=a;a=sB(g,q[b+208>>2],q[b+212>>2],c,f,b- -64|0,e)}a=jM(d,a,c,f,g,b+184|0,b+168|0)}mj(j);Ii=b+272|0;return a|0}function iza(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;q[73656]=Oi(56112);q[73657]=Li;q[73658]=Oi(56131);q[73659]=Li;q[73660]=Oi(56148);q[73661]=Li;q[73662]=Oi(56157);q[73663]=Li;q[73664]=Oi(56163);q[73665]=Li;q[73666]=Oi(56173);q[73667]=Li;q[73668]=Oi(56181);q[73669]=Li;q[73670]=Oi(56188);q[73671]=Li;q[73672]=Oi(56197);q[73673]=Li;q[73674]=Oi(56209);q[73675]=Li;q[73676]=Oi(56218);q[73677]=Li;q[73678]=Oi(56223);q[73679]=Li;q[73680]=Oi(56229);q[73681]=Li;q[73682]=Oi(56235);q[73683]=Li;q[73684]=Oi(56244);q[73685]=Li;q[73688]=Oi(56254);q[73689]=Li;q[73690]=Oi(56263);q[73691]=Li;q[73692]=Oi(56272);q[73693]=Li;q[73694]=Oi(56281);q[73695]=Li;q[73696]=Oi(56290);q[73697]=Li;q[73698]=Oi(56299);q[73699]=Li;q[73700]=Oi(56308);q[73701]=Li;q[73702]=Oi(56317);q[73703]=Li;q[73704]=Oi(56326);q[73705]=Li;a=Oi(56335);q[73725]=0;q[73726]=0;q[73724]=295392;q[73722]=0;q[73720]=56358;q[73719]=56347;q[73718]=0;q[73716]=0;q[73714]=0;q[73712]=0;q[73710]=1;q[73708]=0;q[73709]=3;q[73706]=a;q[73707]=Li;q[73727]=0;q[73728]=0;q[73729]=0;a=Oi(56371);b=Li;c=Oi(56377);d=Li;e=Oi(56385);f=Li;g=Oi(56393);o[294952]=0;q[73736]=g;q[73737]=Li;q[73734]=e;q[73735]=f;q[73732]=c;q[73733]=d;q[73730]=a;q[73731]=b;a=Oi(56401);b=Li;c=Oi(56406);d=Li;e=Oi(56413);f=Li;g=Oi(56420);o[294992]=0;q[73746]=g;q[73747]=Li;q[73744]=e;q[73745]=f;q[73742]=c;q[73743]=d;q[73740]=a;q[73741]=b;a=Oi(56427);b=Li;c=Oi(56433);d=Li;e=Oi(56441);f=Li;g=Oi(56449);h=Li;i=Oi(56457);o[295040]=0;q[73758]=i;q[73759]=Li;q[73756]=g;q[73757]=h;q[73754]=e;q[73755]=f;q[73752]=c;q[73753]=d;q[73750]=a;q[73751]=b;a=Oi(56465);b=Li;c=Oi(56473);d=Li;e=Oi(56483);f=Li;g=Oi(56493);h=Li;i=Oi(56503);o[295088]=0;q[73770]=i;q[73771]=Li;q[73768]=g;q[73769]=h;q[73766]=e;q[73767]=f;q[73764]=c;q[73765]=d;q[73762]=a;q[73763]=b;a=Oi(56513);b=Li;c=Oi(56520);d=Li;e=Oi(56529);f=Li;g=Oi(56538);h=Li;i=Oi(56547);o[295136]=0;q[73782]=i;q[73783]=Li;q[73780]=g;q[73781]=h;q[73778]=e;q[73779]=f;q[73776]=c;q[73777]=d;q[73774]=a;q[73775]=b;q[73786]=Oi(56556);q[73787]=Li;q[73788]=Oi(56564);q[73789]=Li;q[73790]=Oi(56573);q[73791]=Li}function tN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,u=0;a:{if(!q[a+5792>>2]){d=q[a+5820>>2];break a}l=a+5817|0;while(1){n=e+1|0;f=r[q[a+5784>>2]+e|0];u=a;k=s[q[a+5796>>2]+(e<<1)>>1];b:{c:{if(!k){d=(f<<2)+b|0;e=s[d+2>>1];h=s[d>>1];d=q[a+5820>>2];f=s[a+5816>>1]|h<>1]=f;if((d|0)>(16-e|0)){d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=f;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[l|0];d=q[a+5820>>2];p[a+5816>>1]=h>>>16-d;d=(d+e|0)-16|0;break c}d=d+e|0;break c}m=r[f+196624|0];i=m<<2;d=(i|1024)+b|0;e=s[d+6>>1];h=s[d+4>>1];g=q[a+5820>>2];d=s[a+5816>>1]|h<>1]=d;j=a;d:{if((g|0)>(16-e|0)){g=q[a+20>>2];q[a+20>>2]=g+1;o[g+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[l|0];g=q[a+5820>>2];d=h>>>16-g|0;p[a+5816>>1]=d;e=(e+g|0)-16|0;break d}e=e+g|0}q[j+5820>>2]=e;if(m-8>>>0<=19){g=f-q[i+198528>>2]&65535;d=g<>1]=d;j=a;f=q[i+198160>>2];e:{if((16-f|0)<(e|0)){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=r[l|0];e=q[a+5820>>2];d=g>>>16-e|0;p[a+5816>>1]=d;e=(e+f|0)-16|0;break e}e=e+f|0}q[j+5820>>2]=e}f=k-1|0;m=r[(f>>>0<256?f:(f>>>7|0)+256|0)+196112|0];k=m<<2;h=k+c|0;i=s[h+2>>1];j=d;d=s[h>>1];g=j|d<>1]=g;j=a;f:{if((16-i|0)<(e|0)){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=g;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=r[l|0];e=q[a+5820>>2];g=d>>>16-e|0;p[a+5816>>1]=g;d=(e+i|0)-16|0;break f}d=e+i|0}q[j+5820>>2]=d;if(m>>>0<4){break b}h=f-q[k+198656>>2]&65535;f=h<>1]=f;e=q[k+198288>>2];if((16-e|0)<(d|0)){d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=f;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[l|0];d=q[a+5820>>2];p[a+5816>>1]=h>>>16-d;d=(d+e|0)-16|0;break c}d=d+e|0}q[u+5820>>2]=d}e=n;if(e>>>0>2]){continue}break}}c=s[b+1026>>1];b=s[b+1024>>1];e=s[a+5816>>1]|b<>1]=e;if((16-c|0)<(d|0)){d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=e;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=r[a+5817|0];d=b;b=q[a+5820>>2];p[a+5816>>1]=d>>>16-b;q[a+5820>>2]=(b+c|0)-16;return}q[a+5820>>2]=c+d}function Tma(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=x(0),g=0,h=0,i=0,j=0;g=Ii-80|0;Ii=g;d=q[a+4>>2];c=q[d+16>>2];a:{b:{e=q[q[a+24>>2]>>2];if(e>>>0>2]-c>>3>>>0){h=q[c+(e<<3)>>2];i=q[d>>2];if(h>>>0>=(q[d+4>>2]-i|0)/240>>>0){break a}c:{d:{c=q[a+16>>2];e=q[a+20>>2];if(!((c|0)==q[73472]&(e|0)==q[73473]|(c|0)==q[73474]&(e|0)==q[73475]|(c|0)==q[73476]&(e|0)==q[73477])){if((c|0)!=q[73478]|(e|0)!=q[73479]){break d}}a=nw(b,c,e,(i+w(h,240)|0)+48|0,293888);break c}e:{if(!((c|0)==q[73486]&(e|0)==q[73487]|((c|0)==q[73482]&(e|0)==q[73483]|(c|0)==q[73484]&(e|0)==q[73485]))){if((c|0)!=q[73488]|(e|0)!=q[73489]){break e}}a=nw(b,c,e,(i+w(h,240)|0)- -64|0,293928);break c}if((c|0)==q[73492]&(e|0)==q[73493]){a=i+w(h,240)|0;f=u[a+224>>2];a=s[a+234>>1];f=a&2?x(x(1)-f):f;f:{if(!(a&1)){break f}f=x(f+f);if(f>x(1)^1){break f}f=x(x(2)-f)}a=g+8|0;q[a>>2]=0;v[a+8>>3]=f;Ti(b+32|0,g+8|0,72);a=0;break c}if((c|0)==q[73494]&(e|0)==q[73495]){f=u[(i+w(h,240)|0)+228>>2];a=g+8|0;q[a>>2]=0;v[a+8>>3]=f;Ti(b+32|0,g+8|0,72);a=0;break c}if((c|0)==q[73360]&(e|0)==q[73361]){d=q[q[q[a+8>>2]+80>>2]>>2];c=i+w(h,240)|0;a=q[c+200>>2];if(!a){a=q[q[c+188>>2]+8>>2]}a=cm(d,a,b);break c}if((c|0)==q[73358]&(e|0)==q[73359]){d=q[q[q[a+8>>2]+80>>2]>>2];c=i+w(h,240)|0;a=q[c+196>>2];if(!a){a=q[q[c+188>>2]+4>>2]}a=cm(d,a,b);break c}if((c|0)==q[73364]&(e|0)==q[73365]){d=q[q[q[a+8>>2]+80>>2]>>2];c=i+w(h,240)|0;a=q[c+196>>2];if(!a){a=q[q[c+188>>2]+4>>2]}a=cm(d,q[a+48>>2],b);break c}if((c|0)==q[73496]&(e|0)==q[73497]){a=i+w(h,240)|0;d=q[a+212>>2];q[g+16>>2]=q[a+208>>2];q[g+20>>2]=d;q[g+8>>2]=1;Ti(b+32|0,g+8|0,72);a=0;break c}if((c|0)==q[73498]&(e|0)==q[73499]){a=i+w(h,240)|0;d=q[a+196>>2];if(!d){d=q[q[a+188>>2]+4>>2]}d=q[d+64>>2];a=q[a+184>>2];if(t[d+8>>2]<=a>>>0){break b}a=q[d+4>>2]+w(a,40)|0;f=x(q[a+16>>2]-q[a+12>>2]>>>0);a=g+8|0;q[a>>2]=0;v[a+8>>3]=f;Ti(b+32|0,g+8|0,72);a=0;break c}j=i+w(h,240)|0;d=q[j+200>>2];if(!d){d=q[q[j+188>>2]+8>>2]}a=Ct(q[d>>2],c,e,q[a+32>>2],b,0,244,i+w(h,240)|0)}Ii=g+80|0;return a|0}break a}J(53297,53309,88,53341);G()}J(53716,53631,479,53341);G()}function v8(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-320|0;Ii=c;q[a+2004>>2]=-1;q[a+1960>>2]=0;q[a+1952>>2]=0;d=a+1940|0;q[d>>2]=0;q[a+1956>>2]=w(b,6);e=a+1996|0;q[e>>2]=0;q[e+4>>2]=0;a:{b:{e=w(b,672);d=Ro(d,16,e);c:{if(d){q[c+4>>2]=d;q[c>>2]=e;Pi(4,112261,112306,c);break c}d=qq(q[a+2384>>2]);tm(d,112361,4,0);tm(d,112370,2,0);tm(d,112380,4,1);tm(d,112391,4,1);tm(d,112405,4,1);tm(d,112418,4,0);tm(d,112429,3,0);q[a+1944>>2]=Mi[q[74955]](q[a+2384>>2],d,112);q[a+1936>>2]=Mi[q[74943]](q[a+2384>>2],e,0,0);um(d);if(o[a+1932|0]&1){break b}f=a+1928|0;d=a+1924|0;Wi(128,4,a+1920|0,f,d);if(o[a+1916|0]&1){break b}g=a+1904|0;h=a+1912|0;i=a+1908|0;Wi(128,304,g,h,i);q[a+1948>>2]=0;if(o[a+1976|0]&1){break b}Wi(b,1,a+1964|0,a+1972|0,a+1968|0);if(o[a+1992|0]&1){break b}Wi(b>>>3|0,288,a+1980|0,a+1988|0,a+1984|0);if(q[a+1912>>2]==q[a+1904>>2]){break c}j=c+160|0;e=0;while(1){fn(c+16|0);q[c+248>>2]=6;q[c+252>>2]=7;o[c+304|0]=r[c+304|0]|1;q[c+160>>2]=q[a+1936>>2];b=q[a+1944>>2];q[c+240>>2]=1;q[c+164>>2]=b;b=q[a+1908>>2];if((b|0)==q[a+1912>>2]){break a}q[i>>2]=b+304;q[b>>2]=q[c+16>>2];u[b+16>>2]=u[c+32>>2];u[b+20>>2]=u[c+36>>2];u[b+24>>2]=u[c+40>>2];u[b+28>>2]=u[c+44>>2];u[b+32>>2]=u[c+48>>2];u[b+36>>2]=u[c+52>>2];u[b+40>>2]=u[c+56>>2];u[b+44>>2]=u[c+60>>2];u[b+48>>2]=u[c+64>>2];u[b+52>>2]=u[c+68>>2];u[b+56>>2]=u[c+72>>2];u[b+60>>2]=u[c+76>>2];u[b- -64>>2]=u[c+80>>2];u[b+68>>2]=u[c+84>>2];u[b+72>>2]=u[c+88>>2];u[b+76>>2]=u[c+92>>2];u[b+80>>2]=u[c+96>>2];u[b+84>>2]=u[c+100>>2];u[b+88>>2]=u[c+104>>2];u[b+92>>2]=u[c+108>>2];u[b+96>>2]=u[c+112>>2];u[b+100>>2]=u[c+116>>2];u[b+104>>2]=u[c+120>>2];u[b+108>>2]=u[c+124>>2];u[b+112>>2]=u[c+128>>2];u[b+116>>2]=u[c+132>>2];u[b+120>>2]=u[c+136>>2];u[b+124>>2]=u[c+140>>2];u[b+128>>2]=u[c+144>>2];u[b+132>>2]=u[c+148>>2];u[b+136>>2]=u[c+152>>2];u[b+140>>2]=u[c+156>>2];Ti(b+144|0,j,145);k=Fv();b=q[d>>2];if((b|0)==q[f>>2]){break a}q[d>>2]=b+4;q[b>>2]=k;e=e+1|0;if(e>>>0<(q[h>>2]-q[g>>2]|0)/304>>>0){continue}break}}Ii=c+320|0;return}J(113434,112895,493,113269);G()}J(113509,112895,533,113533);G()}function Oo(a,b,c,d,e,f,g,h,i,j){var k=0,l=0,m=0,n=0,p=0,r=0,s=0,t=0,u=0,v=0;t=Ii-16|0;Ii=t;q[t+8>>2]=0;l=-2;a:{b:{c:{if(q[213234]|!b){break c}k=q[b>>2];r=q[b+4>>2];while(1){m=q[213233];q[213233]=m?m:1;if(m){continue}break}d:{n=q[213232];m=q[n+4>>2];e:{if(!m){break e}m=q[q[n>>2]+(Cza(k,r,m)<<2)>>2];if((m|0)==-1){break e}n=q[n+8>>2];while(1){p=(m<<6)+n|0;if((k|0)==q[p>>2]&(r|0)==q[p+4>>2]){break d}m=q[p+56>>2];if((m|0)!=-1){continue}break}}q[213233]=0;break c}r=(m<<6)+n|0;k=q[r+8>>2];if(!k){break a}p=r+8|0;q[p>>2]=k+1;q[213233]=0;Gj(q[r+36>>2]);u=i+111&-16;if(u>>>0>=4097){break b}s=(m<<6)+n|0;v=s;k=q[s+44>>2];f:{if(k){l=q[k+4096>>2];if(4096-l>>>0>=u>>>0){break f}l=(m<<6)+n|0;q[k+4100>>2]=q[l+52>>2];q[l+52>>2]=k}k=q[s+48>>2];g:{if(k){q[s+48>>2]=q[k+4100>>2];break g}k=$i(4104)}q[k+4096>>2]=0;q[k+4100>>2]=0;q[v+44>>2]=k;l=0}q[k+4096>>2]=l+u;k=k+l|0;h:{if(a){l=q[a+4>>2];q[k>>2]=q[a>>2];q[k+4>>2]=l;l=q[a+28>>2];q[k+24>>2]=q[a+24>>2];q[k+28>>2]=l;l=q[a+20>>2];q[k+16>>2]=q[a+16>>2];q[k+20>>2]=l;l=q[a+12>>2];q[k+8>>2]=q[a+8>>2];q[k+12>>2]=l;break h}o[k|0]=0;o[k+1|0]=0;o[k+2|0]=0;o[k+3|0]=0;o[k+4|0]=0;o[k+5|0]=0;o[k+6|0]=0;o[k+7|0]=0;o[k+24|0]=0;o[k+25|0]=0;o[k+26|0]=0;o[k+27|0]=0;o[k+28|0]=0;o[k+29|0]=0;o[k+30|0]=0;o[k+31|0]=0;o[k+16|0]=0;o[k+17|0]=0;o[k+18|0]=0;o[k+19|0]=0;o[k+20|0]=0;o[k+21|0]=0;o[k+22|0]=0;o[k+23|0]=0;o[k+8|0]=0;o[k+9|0]=0;o[k+10|0]=0;o[k+11|0]=0;o[k+12|0]=0;o[k+13|0]=0;o[k+14|0]=0;o[k+15|0]=0}a=q[b+4>>2];q[k+32>>2]=q[b>>2];q[k+36>>2]=a;a=q[b+28>>2];q[k+56>>2]=q[b+24>>2];q[k+60>>2]=a;a=q[b+20>>2];q[k+48>>2]=q[b+16>>2];q[k+52>>2]=a;a=q[b+12>>2];q[k+40>>2]=q[b+8>>2];q[k+44>>2]=a;q[k+92>>2]=j;q[k+88>>2]=0;q[k+84>>2]=i;q[k+80>>2]=g;q[k+76>>2]=f;q[k+72>>2]=e;q[k+64>>2]=c;q[k+68>>2]=d;Ti(k+96|0,h,i);a=(m<<6)+n|0;b=a;i:{if(q[a+24>>2]){q[q[a+28>>2]+88>>2]=k;break i}q[b+24>>2]=k}q[a+28>>2]=k;Bj(q[r+36>>2]);while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}a=q[p>>2]-1|0;q[p>>2]=a;l=0;q[213233]=0;if(a){break c}ot(p)}Ii=t+16|0;return l}J(172338,172300,102,172367);G()}J(172281,172300,289,172324);G()}function xna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=x(0),i=0;f=Ii-80|0;Ii=f;a:{b:{c=q[a+4>>2];d=q[c+16>>2];c:{d:{e:{f:{e=q[q[a+24>>2]>>2];if(e>>>0>2]-d>>3>>>0){d=q[d+(e<<3)>>2];e=q[c+4>>2];c=q[c>>2];if(d>>>0>=e-c>>2>>>0){break b}g=q[c+(d<<2)>>2];d=q[a+16>>2];e=q[a+20>>2];if((d|0)==q[73316]&(e|0)==q[73317]){a=q[g+132>>2];c=q[a+172>>2];q[f+16>>2]=q[a+168>>2];q[f+20>>2]=c;q[f+8>>2]=1;Ti(b+32|0,f+8|0,72);a=0;break c}if((d|0)==q[73318]&(e|0)==q[73319]){a=q[g+132>>2];a=((o[a+186|0]&1)<<5)+a|0;c=q[a+12>>2];q[f+16>>2]=q[a+8>>2];q[f+20>>2]=c;q[f+8>>2]=1;Ti(b+32|0,f+8|0,72);a=0;break c}if((d|0)==q[73320]&(e|0)==q[73321]){h=E5(q[g+132>>2]);a=f+8|0;q[a>>2]=0;v[a+8>>3]=h;Ti(b+32|0,f+8|0,72);a=0;break c}if((d|0)==q[73322]&(e|0)==q[73323]){a=f+8|0;c=q[g+132>>2];c=((o[c+186|0]&1)<<5)+c|0;h=x(1);g:{if(!q[c>>2]){break g}h=u[c+20>>2]}q[a>>2]=0;v[a+8>>3]=h;Ti(b+32|0,f+8|0,72);a=0;break c}h:{if((d|0)!=q[73202]|(e|0)!=q[73203]){c=0;if(q[73208]!=(d|0)|q[73209]!=(e|0)){break h}break d}c=q[q[q[a+8>>2]+80>>2]>>2];a=q[g+216>>2];if(!a){d=q[g+128>>2];a=q[d+28>>2];if((a|0)==q[d+32>>2]){break a}a=q[a+4>>2]}a=cm(c,a,b);break c}c=1;if(q[73210]==(d|0)&q[73211]==(e|0)){break d}c=2;if(q[73212]==(d|0)&q[73213]==(e|0)){break d}c=3;if(q[73214]==(d|0)&q[73215]==(e|0)){break d}c=4;if(q[73216]==(d|0)&q[73217]==(e|0)){break d}c=5;if(q[73218]==(d|0)&q[73219]==(e|0)){break d}c=6;if(q[73220]==(d|0)&q[73221]==(e|0)){break d}c=7;if(q[73222]==(d|0)&q[73223]==(e|0)){break d}c=q[g+216>>2];if(!c){break f}break e}break b}i=q[g+128>>2];c=q[i+28>>2];if((c|0)==q[i+32>>2]){break a}c=q[c+4>>2]}a=Ct(q[c>>2],d,e,q[a+32>>2],b,1,239,g);break c}e=q[q[q[a+8>>2]+80>>2]>>2];a=q[(g+(c<<2)|0)+184>>2];i:{if(a){break i}a=q[g+216>>2];if(a){a=q[(a+(c<<2)|0)+4>>2];if(a){break i}}a=q[g+128>>2];d=q[a+28>>2];if((d|0)==q[a+32>>2]){break b}a=q[d+8>>2];if(!(!a|t[d+12>>2]<=c>>>0)){a=q[(a+(c<<4)|0)+8>>2];if(a){break i}}a=q[d+4>>2];if(!a){a=cm(e,0,b);break c}a=q[(a+(c<<2)|0)+4>>2]}a=cm(e,a,b)}Ii=f+80|0;return a|0}J(51709,51308,479,51547);G()}J(51709,51308,486,51547);G()}function cza(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0;q[73334]=Oi(52513);q[73335]=Li;q[73336]=Oi(52532);q[73337]=Li;q[73338]=Oi(52549);q[73339]=Li;q[73340]=Oi(52558);q[73341]=Li;q[73342]=Oi(52564);q[73343]=Li;q[73344]=Oi(52574);q[73345]=Li;q[73346]=Oi(52582);q[73347]=Li;q[73348]=Oi(52589);q[73349]=Li;q[73350]=Oi(52598);q[73351]=Li;q[73352]=Oi(52610);q[73353]=Li;q[73354]=Oi(52619);q[73355]=Li;q[73356]=Oi(52624);q[73357]=Li;q[73358]=Oi(52630);q[73359]=Li;q[73360]=Oi(52636);q[73361]=Li;q[73362]=Oi(52645);q[73363]=Li;q[73364]=Oi(52655);q[73365]=Li;q[73366]=Oi(52664);q[73367]=Li;q[73368]=Oi(52673);q[73369]=Li;q[73370]=Oi(52682);q[73371]=Li;q[73372]=Oi(52691);q[73373]=Li;q[73374]=Oi(52700);q[73375]=Li;q[73376]=Oi(52709);q[73377]=Li;q[73378]=Oi(52718);q[73379]=Li;q[73380]=Oi(52727);q[73381]=Li;a=Oi(52736);q[73401]=0;q[73402]=0;q[73400]=295392;q[73398]=0;q[73396]=52760;q[73395]=52748;q[73394]=0;q[73392]=0;q[73390]=0;q[73388]=0;q[73386]=1;q[73384]=0;q[73385]=3;q[73382]=a;q[73383]=Li;q[73403]=0;q[73404]=0;q[73405]=0;q[73422]=293536;q[73420]=0;q[73418]=52796;q[73417]=52773;q[73416]=0;q[73414]=0;q[73412]=0;q[73410]=0;q[73408]=1;q[73406]=0;q[73407]=3;q[73427]=0;q[73425]=0;q[73426]=0;q[73423]=0;q[73424]=0;q[73430]=1;q[73432]=0;q[73434]=0;q[73436]=0;q[73438]=0;q[73439]=52807;q[73440]=52829;q[73442]=0;q[73444]=293536;q[73428]=0;q[73429]=3;q[73445]=0;q[73446]=0;q[73447]=0;q[73448]=0;q[73449]=0;q[73452]=1;q[73454]=0;q[73456]=0;q[73458]=0;q[73460]=0;q[73461]=52855;q[73462]=52876;q[73464]=0;q[73466]=293536;q[73450]=0;q[73451]=3;q[73471]=0;q[73469]=0;q[73470]=0;q[73467]=0;q[73468]=0;a=Oi(52901);b=Li;c=Oi(52907);d=Li;e=Oi(52915);f=Li;g=Oi(52923);o[293920]=0;q[73478]=g;q[73479]=Li;q[73476]=e;q[73477]=f;q[73474]=c;q[73475]=d;q[73472]=a;q[73473]=b;a=Oi(52931);b=Li;c=Oi(52936);d=Li;e=Oi(52943);f=Li;g=Oi(52950);o[293960]=0;q[73488]=g;q[73489]=Li;q[73486]=e;q[73487]=f;q[73484]=c;q[73485]=d;q[73482]=a;q[73483]=b;q[73492]=Oi(52957);q[73493]=Li;q[73494]=Oi(52964);q[73495]=Li;q[73496]=Oi(52978);q[73497]=Li;q[73498]=Oi(52988);q[73499]=Li}function Jna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;h=Ii-32|0;Ii=h;f=q[a+4>>2];c=q[f+20>>2];a:{b:{c:{d:{e:{f:{b=q[q[a+24>>2]>>2];if(b>>>0>2]-c>>3>>>0){b=q[c+(b<<3)>>2];e=q[f+4>>2];if(b>>>0>=q[f+8>>2]-e>>2>>>0){break a}d=q[e+(b<<2)>>2];e=q[a+16>>2];b=q[a+20>>2];if((e|0)==q[72806]&(b|0)==q[72807]){c=d+156|0;e=q[c>>2];g=e?e:q[q[d+152>>2]+4>>2];a=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[72698],q[72699],c);b=r[d+204|0];o[d+204|0]=(a?b&4:4)|b&251;if(a){break b}c=q[c>>2];if(!c){c=q[q[d+152>>2]+4>>2]}a=h;q[a+8>>2]=0;q[a+12>>2]=0;q[a+24>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;xq(q[c+4>>2],a+4|0);kk(a+8|0,c+4|0,4);kk(a+8|0,a+4|0,4);q[d+200>>2]=Rn(a+8|0);a=q[d+156>>2];if(!(e?(a|0)==(g|0):0)){if(!DL(a,h+8|0)){break f}a=q[d+196>>2];if(a){Mi[q[74957]](a)}q[d+196>>2]=q[h+8>>2]}a=0;b=q[d+192>>2];if(!b){b=q[q[d+152>>2]+8>>2]}if(q[q[b>>2]+152>>2]!=1){break b}sL(f,c,q[d+200>>2]);pB(f,q[g+8>>2],q[g+12>>2]);break b}g:{if((e|0)!=q[72714]|(b|0)!=q[72715]){c=0;if(q[72720]!=(e|0)|q[72721]!=(b|0)){break g}break c}g=d+192|0;b=q[g>>2];if(!b){b=q[q[d+152>>2]+8>>2]}c=q[q[b>>2]+152>>2];a=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[72696],q[72697],g);b=r[d+204|0];o[d+204|0]=(a?b&4:4)|b&251;e=(c|0)==1;b=q[g>>2];if(!b){b=q[q[d+152>>2]+8>>2]}if(a|q[q[b>>2]+152>>2]!=1^e|(c|0)!=1){break b}b=q[d+156>>2];if(!b){b=q[q[d+152>>2]+4>>2]}pB(f,q[b+8>>2],q[b+12>>2]);break b}c=1;if(q[72722]==(e|0)&q[72723]==(b|0)){break c}c=2;if(q[72724]==(e|0)&q[72725]==(b|0)){break c}c=3;if(q[72726]==(e|0)&q[72727]==(b|0)){break c}c=4;if(q[72728]==(e|0)&q[72729]==(b|0)){break c}c=5;if(q[72730]==(e|0)&q[72731]==(b|0)){break c}c=6;if(q[72732]==(e|0)&q[72733]==(b|0)){break c}c=7;if(q[72734]==(e|0)&q[72735]==(b|0)){break c}c=q[d+192>>2];if(!c){break e}break d}break a}Pi(4,44761,44807,0);a=-8;break b}c=q[q[d+152>>2]+8>>2]}a=Bp(q[c>>2],e,b,a+32|0,q[a+104>>2],215,d);b=r[d+204|0];o[d+204|0]=(a?b&4:4)|b&251;break b}a=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[72702],q[72703],(d+(c<<2)|0)+160|0);b=r[d+204|0];o[d+204|0]=(a?b&4:4)|b&251}Ii=h+32|0;return a|0}J(46069,45367,479,46080);G()}function CJ(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii-112|0;Ii=e;c=q[q[a+24>>2]>>2];f=q[c+8>>2]-q[c+12>>2]>>4;a:{if(pv(c,b)){q[e+96>>2]=uj(c,-1,0);Pi(4,199633,201065,e+96|0);Ri(c,-2);d=-1;break a}rj(c,-1e4,q[a+32>>2]);yk(c);g=Pm(c,0,0);d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;yk(c);d=-2;if(g){break a}d=q[a>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a>>2]=-2}Zi(c,-10002,201687);b:{if((Vi(c,-1)|0)==6){q[a>>2]=zk(c,-1e4);break b}if(Vi(c,-1)){q[e+84>>2]=q[b+8>>2];q[e+80>>2]=201687;Pi(3,199633,201092,e+80|0)}Ri(c,-2)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201687);d=q[a+4>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a+4>>2]=-2}Zi(c,-10002,201692);c:{if((Vi(c,-1)|0)!=6){if(Vi(c,-1)){q[e+68>>2]=q[b+8>>2];q[e+64>>2]=201692;Pi(3,199633,201092,e- -64|0)}Ri(c,-2);break c}q[a+4>>2]=zk(c,-1e4)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201692);d=q[a+8>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a+8>>2]=-2}Zi(c,-10002,201698);d:{if((Vi(c,-1)|0)!=6){if(Vi(c,-1)){q[e+52>>2]=q[b+8>>2];q[e+48>>2]=201698;Pi(3,199633,201092,e+48|0)}Ri(c,-2);break d}q[a+8>>2]=zk(c,-1e4)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201698);d=q[a+12>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a+12>>2]=-2}Zi(c,-10002,201705);e:{if((Vi(c,-1)|0)!=6){if(Vi(c,-1)){q[e+36>>2]=q[b+8>>2];q[e+32>>2]=201705;Pi(3,199633,201092,e+32|0)}Ri(c,-2);break e}q[a+12>>2]=zk(c,-1e4)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201705);d=q[a+16>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a+16>>2]=-2}Zi(c,-10002,201716);f:{if((Vi(c,-1)|0)!=6){if(Vi(c,-1)){q[e+20>>2]=q[b+8>>2];q[e+16>>2]=201716;Pi(3,199633,201092,e+16|0)}Ri(c,-2);break f}q[a+16>>2]=zk(c,-1e4)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201716);d=q[a+20>>2];if((d|0)!=-2){Rj(c,-1e4,d);q[a+20>>2]=-2}Zi(c,-10002,201725);g:{if((Vi(c,-1)|0)!=6){if(Vi(c,-1)){q[e+4>>2]=q[b+8>>2];q[e>>2]=201725;Pi(3,199633,201092,e)}Ri(c,-2);break g}q[a+20>>2]=zk(c,-1e4)}d=q[c+8>>2];q[d+8>>2]=0;q[c+8>>2]=d+16;Si(c,-10002,201725);q[a+28>>2]=Pk(q[b+8>>2]);d=0}if(q[c+8>>2]-q[c+12>>2]>>4==(f|0)){Ii=e+112|0;return d}J(199603,199542,4406,201120);G()}function toa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-48|0;Ii=d;f=q[q[a+24>>2]>>2];a:{b:{c=q[a+16>>2];e=q[a+20>>2];c:{if((c|0)==q[72582]&(e|0)==q[72583]){b=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[72564],q[72565],f+16|0);break c}d:{if((c|0)==q[72578]&(e|0)==q[72579]){b=-12;if(!(o[a+112|0]&1)){break c}c=q[q[q[a+8>>2]+80>>2]>>2];q[d+44>>2]=0;b=Qm(c,a+32|0,q[72562],q[72563],d+44|0);if(b){break c}if(!zK(q[f+8>>2],q[a+104>>2],q[a+108>>2],q[d+44>>2],q[a+40>>2],q[a+44>>2])){c=f+28|0;a=q[c>>2];e=f+32|0;b=q[e>>2];if((a|0)==(b|0)){if(o[f+36|0]&1){break b}b=a;a=f+24|0;Wi((b-q[a>>2]>>2)+1|0,4,a,e,c);b=q[e>>2];a=q[c>>2]}if((a|0)==(b|0)){break a}b=q[d+44>>2];q[c>>2]=a+4;q[a>>2]=b;b=0;break c}a=aj(q[a+104>>2],q[a+108>>2]);q[d+4>>2]=q[q[f+4>>2]+88>>2];q[d>>2]=a;Pi(4,40439,43218,d);cj(c,q[d+44>>2]);break d}if((c|0)==q[72604]&(e|0)==q[72605]){b=-12;if(!(o[a+112|0]&1)){break c}b=q[q[q[a+8>>2]+80>>2]>>2];q[d+44>>2]=0;b=Qm(b,a+32|0,q[72572],q[72573],d+44|0);if(b){break c}e=q[d+44>>2];c=q[e+48>>2];b=q[c+4>>2];c=q[c>>2];b=xK(q[f+8>>2],q[a+104>>2],q[a+108>>2],e,2,Mi[q[75017]](c,b)|0,Mi[q[75018]](c,b)|0);if(!b){c=f+28|0;a=q[c>>2];e=f+32|0;b=q[e>>2];if((a|0)==(b|0)){if(o[f+36|0]&1){break b}b=a;a=f+24|0;Wi((b-q[a>>2]>>2)+1|0,4,a,e,c);b=q[e>>2];a=q[c>>2]}if((a|0)==(b|0)){break a}b=q[d+44>>2];q[c>>2]=a+4;q[a>>2]=b;b=0;break c}a=aj(q[a+104>>2],q[a+108>>2]);q[d+20>>2]=b;q[d+16>>2]=a;Pi(4,40439,41987,d+16|0);break d}b=-1;if(q[72584]!=(c|0)|q[72585]!=(e|0)){break c}b=-12;if(!(o[a+112|0]&1)){break c}b=q[q[q[a+8>>2]+80>>2]>>2];q[d+44>>2]=0;b=Qm(b,a+32|0,q[72564],q[72565],d+44|0);if(b){break c}b=yK(q[f+8>>2],q[a+104>>2],q[a+108>>2],q[d+44>>2]);if(!b){vK(q[f+8>>2]);c=f+28|0;a=q[c>>2];e=f+32|0;b=q[e>>2];if((a|0)==(b|0)){if(o[f+36|0]&1){break b}b=a;a=f+24|0;Wi((b-q[a>>2]>>2)+1|0,4,a,e,c);b=q[e>>2];a=q[c>>2]}if((a|0)==(b|0)){break a}b=q[d+44>>2];q[c>>2]=a+4;q[a>>2]=b;b=0;break c}a=aj(q[a+104>>2],q[a+108>>2]);q[d+36>>2]=b;q[d+32>>2]=a;Pi(4,40439,43269,d+32|0)}b=-7}Ii=d+48|0;return b|0}J(40670,40745,493,40801);G()}J(40939,40745,533,40963);G()}function Iw(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;j=Ii-16|0;Ii=j;e=j+8|0;q[e+4>>2]=c;q[e>>2]=d;a:{if(r[b+24|0]){while(1){i=q[b+20>>2]+w(n,24)|0;h=q[i+4>>2];b:{f=o[i+20|0];if(f&127?(f|0)>=0:0){break b}k=4;c:{d:{e:{f:{f=h>>>22&63;switch(f-9|0){case 0:break c;case 3:break e;case 2:break f;default:break d}}k=q[q[i+8>>2]+16>>2];break c}k=8;break c}k=MB(f);h=q[i+4>>2]}l=q[i+12>>2]+a|0;p=1;if((h&-268435456)==805306368){p=q[l+4>>2];if(!p){break b}l=q[l>>2]}m=0;g:{h:{i:{j:{while(1){k:{f=w(k,m)+l|0;l:{m:{switch((h>>>22&63)-1|0){case 0:g=3;if(!Sn(e,h&4194303,1)){break a}if(eta(e,v[f>>3])){break l}break a;case 1:g=3;if(!Sn(e,h&4194303,5)){break a}if(dta(e,u[f>>2])){break l}break a;case 2:g=3;if(!Sn(e,h&4194303,0)){break a}if(NM(e,q[f>>2],q[f+4>>2])){break l}break a;case 3:g=3;if(!Sn(e,h&4194303,0)){break a}if(NM(e,q[f>>2],q[f+4>>2])){break l}break a;case 4:g=3;if(!Sn(e,h&4194303,0)){break a}if(bta(e,q[f>>2])){break l}break a;case 5:J(23067,23073,102,23097);G();case 6:J(23067,23073,106,23097);G();case 7:g=3;if(!Sn(e,h&4194303,0)){break a}if(fta(e,r[f|0])){break l}break a;case 8:g=3;if(!Sn(e,h&4194303,2)){break a}if(cta(e,q[f>>2])){break l}break a;case 9:J(23067,23073,116,23097);G();case 10:q[j+4>>2]=0;g=LM(f,q[i+8>>2],j+4|0,122);if(g){break a}g=3;if(!Sn(e,q[i+4>>2]&4194303,2)){break a}if(!Gw(e,q[j+4>>2])){break a}g=LM(f,q[i+8>>2],c,d);if(!g){break l}break a;case 11:g=3;if(!Sn(e,h&4194303,2)){break a}if(!Gw(e,q[f+4>>2])){break a}if(Mi[q[e>>2]](q[e+4>>2],q[f>>2],q[f+4>>2])|0){break l}break a;case 12:g=3;if(!Sn(e,h&4194303,0)){break a}if(Gw(e,q[f>>2])){break l}break a;case 17:break h;case 16:break i;case 15:break j;case 14:break k;case 13:break m;default:break g}}g=3;if(!Sn(e,h&4194303,0)){break a}if(!Gw(e,q[f>>2])){break a}}m=m+1|0;if((p|0)==(m|0)){break b}h=q[i+4>>2];continue}break}J(23067,23073,155,23097);G()}J(23067,23073,159,23097);G()}J(23067,23073,163,23097);G()}J(23067,23073,167,23097);G()}J(23067,23073,171,23097);G()}n=n+1|0;if(n>>>0>2]-5|0;g=c>>>0<65535?c:65535;a:{while(1){c=q[a+116>>2];if(c>>>0<=1){Vs(a);c=q[a+116>>2];if(!(c|b)){return 0}if(!c){break a}}q[a+116>>2]=0;c=q[a+108>>2]+c|0;q[a+108>>2]=c;d=q[a+92>>2];e=g+d|0;if(!(e>>>0>c>>>0?c:0)){q[a+108>>2]=e;q[a+116>>2]=c-e;Tm(a,(d|0)>=0?q[a+56>>2]+d|0:0,g,0);q[a+92>>2]=q[a+108>>2];c=q[a>>2];d=q[c+28>>2];Gl(d);e=q[c+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;b:{if(!e){break b}Ti(q[c+12>>2],q[d+16>>2],e);q[c+12>>2]=e+q[c+12>>2];q[d+16>>2]=e+q[d+16>>2];q[c+20>>2]=e+q[c+20>>2];q[c+16>>2]=q[c+16>>2]-e;c=q[d+20>>2]-e|0;q[d+20>>2]=c;if(c){break b}q[d+16>>2]=q[d+8>>2]}if(!q[q[a>>2]+16>>2]){return 0}d=q[a+92>>2];c=q[a+108>>2]}e=c-d|0;if(e>>>0>2]-262>>>0){continue}Tm(a,(d|0)>=0?q[a+56>>2]+d|0:0,e,0);q[a+92>>2]=q[a+108>>2];c=q[a>>2];d=q[c+28>>2];Gl(d);e=q[c+16>>2];f=q[d+20>>2];e=e>>>0>>0?e:f;c:{if(!e){break c}Ti(q[c+12>>2],q[d+16>>2],e);q[c+12>>2]=e+q[c+12>>2];q[d+16>>2]=e+q[d+16>>2];q[c+20>>2]=e+q[c+20>>2];q[c+16>>2]=q[c+16>>2]-e;c=q[d+20>>2]-e|0;q[d+20>>2]=c;if(c){break c}q[d+16>>2]=q[d+8>>2]}if(q[q[a>>2]+16>>2]){continue}break}return 0}q[a+5812>>2]=0;if((b|0)==4){b=a;c=q[a+92>>2];if((c|0)>=0){d=c+q[a+56>>2]|0}else{d=0}Tm(b,d,q[a+108>>2]-c|0,1);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;d:{if(!d){break d}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break d}q[c+16>>2]=q[c+8>>2]}return(q[q[a>>2]+16>>2]?3:2)|0}e:{e=q[a+108>>2];c=q[a+92>>2];if((e|0)<=(c|0)){break e}Tm(a,(c|0)>=0?c+q[a+56>>2]|0:0,e-c|0,0);q[a+92>>2]=q[a+108>>2];b=q[a>>2];c=q[b+28>>2];Gl(c);d=q[b+16>>2];e=q[c+20>>2];d=d>>>0>>0?d:e;f:{if(!d){break f}Ti(q[b+12>>2],q[c+16>>2],d);q[b+12>>2]=d+q[b+12>>2];q[c+16>>2]=d+q[c+16>>2];q[b+20>>2]=d+q[b+20>>2];q[b+16>>2]=q[b+16>>2]-d;b=q[c+20>>2]-d|0;q[c+20>>2]=b;if(b){break f}q[c+16>>2]=q[c+8>>2]}if(q[q[a>>2]+16>>2]){break e}return 0}return 1}function wn(a,b){var c=0;c=a;q[c>>2]=0;q[c+4>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;a:{b:{if(!b){break b}c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}if(!r[852468]){break b}d:{if(o[852568]&1){break d}if(!fk(852568)){break d}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}b=q[213116];Gj(b);e:{if(o[852568]&1){break e}if(!fk(852568)){break e}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=a;a=wO();q[c+24>>2]=a;f:{if(o[852568]&1){break f}if(!fk(852568)){break f}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213134];if(a>>>0>=q[213135]-c>>3>>>0){break a}a=c+(a<<3)|0;q[a>>2]=0;q[a+4>>2]=0;Bj(b)}return}J(165931,165533,479,165942);G()}function GC(a){var b=0,c=0,d=0,e=0,f=0;if(!q[a+92>>2]){Ni(q[a+20>>2])}c=q[a+24>>2];if((c|0)>=1){while(1){if(!q[a+92>>2]){Ni(q[q[a+28>>2]+(b<<2)>>2]);c=q[a+24>>2]}b=b+1|0;if((c|0)>(b|0)){continue}break}}if(!q[a+92>>2]){Ni(q[a+28>>2])}a:{b=q[a+408>>2];if(!b|q[a+276>>2]<1){break a}while(1){e=w(f,24)+b|0;b:{if(q[e+16>>2]){c=q[a+136>>2];d=r[e+13|0];if(q[(c+w(d,2096)|0)+4>>2]>=1){b=0;while(1){if(!q[a+92>>2]){Ni(q[q[e+16>>2]+(b<<2)>>2]);d=r[e+13|0];c=q[a+136>>2]}b=b+1|0;if((b|0)>2]){continue}break}}if(q[a+92>>2]){break b}Ni(q[e+16>>2])}if(q[a+92>>2]){break b}Ni(q[e+20>>2])}f=f+1|0;if((f|0)>=q[a+276>>2]){break a}b=q[a+408>>2];continue}}d=q[a+136>>2];c:{if(d){d:{if(q[a+132>>2]<1){break d}b=0;while(1){e:{if(q[a+92>>2]){break e}c=w(b,2096)+d|0;Ni(q[c+8>>2]);if(q[a+92>>2]){break e}Ni(q[c+28>>2]);if(q[a+92>>2]){break e}Ni(q[c+32>>2]);if(q[a+92>>2]){break e}Ni(q[c+2084>>2]);if(q[a+92>>2]){break e}c=q[c+2088>>2];Ni(c?c-4|0:0)}b=b+1|0;if((b|0)>=q[a+132>>2]){break d}d=q[a+136>>2];continue}}if(q[a+92>>2]){break c}Ni(q[a+136>>2])}if(q[a+92>>2]){break c}Ni(q[a+272>>2]);if(q[a+92>>2]){break c}Ni(q[a+408>>2])}f:{if(!q[a+416>>2]){break f}c=q[a+412>>2];if((c|0)>=1){b=0;while(1){if(!q[a+92>>2]){Ni(q[(q[a+416>>2]+w(b,40)|0)+4>>2]);c=q[a+412>>2]}b=b+1|0;if((c|0)>(b|0)){continue}break}}if(q[a+92>>2]){break f}Ni(q[a+416>>2])}b=0;g:{if(q[a+4>>2]<=0){break g}while(1){h:{if(q[a+92>>2]){break h}c=(b<<2)+a|0;Ni(q[c+812>>2]);if(q[a+92>>2]){break h}Ni(q[c+940>>2]);if(q[a+92>>2]){break h}Ni(q[c+1008>>2])}if(b>>>0>14){break g}b=b+1|0;if((b|0)>2]){continue}break}}i:{if(q[a+92>>2]){break i}Ni(q[a+1080>>2]);if(q[a+92>>2]){break i}Ni(q[a+1088>>2]);if(q[a+92>>2]){break i}Ni(q[a+1096>>2]);if(q[a+92>>2]){break i}Ni(q[a+1104>>2]);if(q[a+92>>2]){break i}Ni(q[a+1112>>2]);if(q[a+92>>2]){break i}Ni(q[a+1084>>2]);if(q[a+92>>2]){break i}Ni(q[a+1092>>2]);if(q[a+92>>2]){break i}Ni(q[a+1100>>2]);if(q[a+92>>2]){break i}Ni(q[a+1108>>2]);if(q[a+92>>2]){break i}Ni(q[a+1116>>2])}if(q[a+40>>2]){rk(q[a+32>>2])}}function x8(a,b,c,d,e,f){var g=0,h=0;g=Ii-384|0;Ii=g;q[a+1872>>2]=a;q[a+1884>>2]=b;q[a+1876>>2]=Mi[q[74943]](q[a+2384>>2],b<<7,0,0);h=qq(q[a+2384>>2]);tm(h,111659,4,0);tm(h,111668,4,0);q[a+1880>>2]=Mi[q[74954]](q[a+2384>>2],h);um(h);h=-1;a:{if(!d){d=-1;break a}c=Qj(c,d,248104,g+380|0);if(c){q[g+16>>2]=c;Pi(3,111674,111681,g+16|0);d=-1;break a}c=Er(q[a+2384>>2],q[g+380>>2]);d=Mi[q[74965]](q[a+2384>>2],c)|0;Aj(q[g+380>>2]);if(!f|(d|0)==-1){break a}c=Qj(e,f,248104,g+380|0);if(c){q[g>>2]=c;Pi(3,111674,111731,g);break a}c=Er(q[a+2384>>2],q[g+380>>2]);h=Mi[q[74966]](q[a+2384>>2],c)|0;Aj(q[g+380>>2])}e=b<<5;b=Yz(a,d,h);Bv(b,Oi(111783),Li,1);q[g+368>>2]=Oi(111793);q[g+372>>2]=Li;Xz(b,1,g+368|0);c=Yz(a,d,h);Bv(c,Oi(111783),Li,1);q[g+360>>2]=Oi(111802);q[g+364>>2]=Li;Xz(c,1,g+360|0);q[g+348>>2]=c;q[g+344>>2]=c;q[g+340>>2]=b;q[g+336>>2]=b;d=g+176|0;c=0;while(1){fn(g+32|0);b=c<<2;q[g+256>>2]=q[b+111824>>2];q[g+188>>2]=q[b+(g+336|0)>>2];q[g+176>>2]=q[a+1876>>2];q[g+180>>2]=q[a+1880>>2];q[g+316>>2]=0;b=w(c,320)+a|0;q[b- -64>>2]=q[g+32>>2];u[b+80>>2]=u[g+48>>2];u[b+84>>2]=u[g+52>>2];u[b+88>>2]=u[g+56>>2];u[b+92>>2]=u[g+60>>2];u[b+96>>2]=u[g+64>>2];u[b+100>>2]=u[g+68>>2];u[b+104>>2]=u[g+72>>2];u[b+108>>2]=u[g+76>>2];u[b+112>>2]=u[g+80>>2];u[b+116>>2]=u[g+84>>2];u[b+120>>2]=u[g+88>>2];u[b+124>>2]=u[g+92>>2];u[b+128>>2]=u[g+96>>2];u[b+132>>2]=u[g+100>>2];u[b+136>>2]=u[g+104>>2];u[b+140>>2]=u[g+108>>2];u[b+144>>2]=u[g+112>>2];u[b+148>>2]=u[g+116>>2];u[b+152>>2]=u[g+120>>2];u[b+156>>2]=u[g+124>>2];u[b+160>>2]=u[g+128>>2];u[b+164>>2]=u[g+132>>2];u[b+168>>2]=u[g+136>>2];u[b+172>>2]=u[g+140>>2];u[b+176>>2]=u[g+144>>2];u[b+180>>2]=u[g+148>>2];u[b+184>>2]=u[g+152>>2];u[b+188>>2]=u[g+156>>2];u[b+192>>2]=u[g+160>>2];u[b+196>>2]=u[g+164>>2];u[b+200>>2]=u[g+168>>2];u[b+204>>2]=u[g+172>>2];Ti(b+208|0,d,145);q[b+368>>2]=$i(e);c=c+1|0;if((c|0)!=4){continue}break}b=Oi(111793);q[a+1600>>2]=1;c=a+1344|0;q[c>>2]=b;q[c+4>>2]=Li;b=Oi(111802);q[a+1888>>2]=0;q[a+1864>>2]=1;a=a+1608|0;q[a>>2]=b;q[a+4>>2]=Li;Ii=g+384|0}function AQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;b=Ii-1328|0;Ii=b;f=kj(a,1,b+1320|0);d=kj(a,2,0);c=d+1|0;g=Vi(a,3);l=Am(a,4,q[b+1320>>2]+1|0);e=r[d|0];i=(e|0)==94;if(g-3>>>0>=4){dk(a,3,146761)}m=i?c:d;d=b+8|0;q[d+4>>2]=0;q[d+8>>2]=a;q[d>>2]=d+12;q[b+1056>>2]=a;q[b+1048>>2]=f;q[b+1052>>2]=q[b+1320>>2]+f;k=b+1044|0;n=(e|0)!=94;i=0;while(1){a:{if((i|0)>=(l|0)){d=f;break a}q[b+1060>>2]=0;d=Fn(b+1048|0,f,m);b:{if(!d){break b}i=i+1|0;c:{d:{e:{f:{g=q[b+1056>>2];switch(Vi(g,3)-3|0){case 2:break d;case 3:break e;case 0:case 1:break f;default:break c}}h=uj(q[b+1056>>2],3,b+1324|0);if(!q[b+1324>>2]){break b}p=d-f|0;c=0;while(1){j=c+h|0;g=r[j|0];g:{if((g|0)!=37){e=q[b+8>>2];if(k>>>0<=e>>>0){ml(b+8|0);e=q[b+8>>2];g=r[j|0]}q[b+8>>2]=e+1;o[e|0]=g;break g}c=c+1|0;j=h+c|0;g=r[j|0];if(g-48>>>0>=10){e=q[b+8>>2];if(k>>>0<=e>>>0){ml(b+8|0);e=q[b+8>>2];g=r[j|0]}q[b+8>>2]=e+1;o[e|0]=g;break g}if((g|0)==48){qn(b+8|0,f,p);break g}js(b+1048|0,(g<<24>>24)-49|0,f,d);Os(b+8|0)}c=c+1|0;if(c>>>0>2]){continue}break}break b}ej(g,3);c=q[b+1060>>2];e=f?c?c:1:c;jp(q[b+1056>>2],e,146427);c=0;if((e|0)>=1){while(1){js(b+1048|0,c,f,d);c=c+1|0;if((e|0)!=(c|0)){continue}break}}Rk(g,e,1);break c}h:{if(q[b+1060>>2]<=0){bj(q[b+1056>>2],f,d-f|0);break h}i:{j:{k:{c=q[b+1068>>2];switch(c+2|0){case 1:break j;case 0:break k;default:break i}}e=(q[b+1064>>2]-q[b+1048>>2]|0)+1|0;c=q[b+1056>>2];h=q[c+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[c+8>>2]=q[c+8>>2]+16;break h}Qi(q[b+1056>>2],146577,0)}bj(q[b+1056>>2],q[b+1064>>2],c)}ik(g,3)}l:{if(!Uj(g,-1)){Ri(g,-2);bj(g,f,d-f|0);break l}if(uk(g,-1)){break l}c=b;h=Vi(g,-1);e=140583;m:{if((h|0)==-1){break m}e=q[(h<<2)+256832>>2]}q[c>>2]=e;Qi(g,146792,b)}Os(b+8|0)}if(f>>>0>=d>>>0){if(t[b+1052>>2]<=f>>>0){d=f;break a}c=q[b+8>>2];if(k>>>0<=c>>>0){ml(b+8|0);c=q[b+8>>2]}d=r[f|0];q[b+8>>2]=c+1;o[c|0]=d;d=f+1|0}f=d;if(n){continue}}break}qn(b+8|0,d,q[b+1052>>2]-d|0);zm(b+8|0);f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=i|0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+1328|0;return 2}function Lw(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=Ii-16|0;m=e;Ii=e;a:{b:{c:{g=q[210908];if(g){h=2;d:{if(!b|!d){break d}h=5;if(!c){break d}n=e-((c<<2)+15&2032)|0;Ii=n;e=1;while(1){j=w(f,24)+b|0;l=r[j+12|0];if(!l){break d}j=q[j+8>>2];if(j>>>0>=9){break c}k=i;i=q[(j<<2)+154632>>2];j=(k+i|0)-1&0-i;q[(f<<2)+n>>2]=j;e=e>>>0>>0?i:e;i=j+w(i,l)|0;f=f+1|0;if((f|0)!=(c|0)){continue}break}i=(e+i|0)-1&0-e;if(!i){break d}h=4;e=c<<4;j=e+36|0;l=w(a,i);k=(l+(e+51&8176)|0)+16|0;if((j|0)==(k|0)){break d}h=q[g+8>>2];e:{f:{if(!h){f=q[g>>2];e=64;break f}f=q[g>>2];e=0;g:{while(1){if(q[(e<<2)+f>>2]){e=e+1|0;if((h|0)!=(e|0)){continue}break g}break}if((e|0)!=-1){break e}}e=h- -64|0;if(e>>>0>65535){break b}}h=2;q[g>>2]=ul(f,e<<2);q[g+4>>2]=ul(q[g+4>>2],e<<1);Ui(q[g>>2]+(q[g+8>>2]<<2)|0,0,256);Ui(q[g+4>>2]+(q[g+8>>2]<<1)|0,0,128);q[g+8>>2]=q[g+8>>2]- -64;if(!q[g>>2]|!q[g+4>>2]){break d}}e=0;q[m+12>>2]=0;h=2;if(Ro(m+12|0,16,k)){break d}f=q[m+12>>2];o[f+34|0]=c;q[f+28>>2]=a;p[f+32>>1]=0;q[f+24>>2]=i;q[f+8>>2]=0;q[f+12>>2]=0;i=f+36|0;q[f+4>>2]=i;j=f+j|0;q[f>>2]=j;q[f+16>>2]=0;q[f+20>>2]=0;while(1){h=w(e,24)+b|0;k=q[h+4>>2];a=i+(e<<4)|0;q[a>>2]=q[h>>2];q[a+4>>2]=k;o[a+12|0]=q[h+8>>2];o[a+13|0]=r[h+12|0];q[a+8>>2]=q[(e<<2)+n>>2];e=e+1|0;if((e|0)!=(c|0)){continue}break}b=q[38569];a=j+l|0;c=q[38568];o[a|0]=c;o[a+1|0]=c>>>8;o[a+2|0]=c>>>16;o[a+3|0]=c>>>24;o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;b=q[38571];c=q[38570];o[a+8|0]=c;o[a+9|0]=c>>>8;o[a+10|0]=c>>>16;o[a+11|0]=c>>>24;o[a+12|0]=b;o[a+13|0]=b>>>8;o[a+14|0]=b>>>16;o[a+15|0]=b>>>24;h:{a=q[g+8>>2];if(a){b=q[g>>2];e=0;while(1){c=b+(e<<2)|0;if(!q[c>>2]){break h}e=e+1|0;if((a|0)!=(e|0)){continue}break}}J(154445,154364,238,154476);G()}a=s[g+12>>1];a=a>>>0>65533?1:a+1|0;p[g+12>>1]=a;p[q[g+4>>2]+(e<<1)>>1]=a;q[c>>2]=f;a=s[g+12>>1]<<16|e;if((a|0)==-1){break a}q[d>>2]=a;h=0}Ii=m+16|0;return h}J(154068,153556,301,154108);G()}J(153529,153556,157,153579);G()}J(154413,154364,200,154436);G()}J(154480,154364,251,154476);G()}function zaa(a,b){var c=0,d=0,e=0,f=0;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}if(r[852468]){b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}e=q[213116];Gj(e);c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213127];d:{if(!c){break d}c=q[q[213126]+(Cza(a,b,c)<<2)>>2];if((c|0)==-1){break d}f=q[213128];while(1){d=w(c,24)+f|0;if((a|0)!=q[d>>2]|q[d+4>>2]!=(b|0)){c=q[d+16>>2];if((c|0)!=-1){continue}break d}break}Ni(q[(w(c,24)+f|0)+8>>2]);e:{if(o[852568]&1){break e}if(!fk(852568)){break e}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}yaa(a,b)}Bj(e)}}function qI(a,b,c,d){var e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=x(0),J=x(0),K=x(0),L=x(0),M=0,N=0,O=0,P=x(0),Q=x(0),R=x(0),S=x(0),T=x(0),U=x(0),V=x(0),W=x(0),X=x(0),Y=x(0);N=1;O=q[a+96>>2];a:{if((O|0)<1){N=0;break a}e=u[b+48>>2];h=u[d>>2];i=u[b>>2];k=x(h*i);n=u[d+4>>2];j=u[b+16>>2];l=x(n*j);f=x(k+l);o=u[d+8>>2];D=u[b+32>>2];g=x(o*D);P=x(e+x(f+g));m=f;p=u[c+8>>2];f=x(p*D);D=x(e+x(m+f));m=k;k=u[c+4>>2];E=x(k*j);j=x(m+E);Q=x(e+x(j+g));R=x(e+x(j+f));j=u[c>>2];i=x(j*i);l=x(i+l);S=x(e+x(l+g));T=x(e+x(l+f));i=x(i+E);E=x(e+x(i+g));U=x(e+x(i+f));e=u[b+60>>2];r=u[b+12>>2];m=x(h*r);t=u[b+28>>2];v=x(n*t);F=x(m+v);G=u[b+44>>2];i=x(o*G);V=x(e+x(F+i));g=u[b+56>>2];B=u[b+8>>2];C=x(h*B);w=u[b+24>>2];y=x(n*w);H=x(C+y);I=u[b+40>>2];l=x(o*I);W=x(g+x(H+l));f=u[b+52>>2];z=u[b+4>>2];A=x(h*z);J=u[b+20>>2];K=x(n*J);s=x(A+K);L=u[b+36>>2];h=x(o*L);X=x(f+x(s+h));n=x(p*G);F=x(e+x(F+n));o=x(p*I);G=x(g+x(H+o));p=x(p*L);H=x(f+x(s+p));s=m;m=x(k*t);t=x(s+m);I=x(e+x(t+i));s=C;C=x(k*w);w=x(s+C);s=x(g+x(w+l));k=x(k*J);A=x(A+k);J=x(f+x(A+h));t=x(e+x(t+n));w=x(g+x(w+o));A=x(f+x(A+p));r=x(j*r);v=x(r+v);L=x(e+x(v+i));B=x(j*B);y=x(B+y);Y=x(g+x(y+l));j=x(j*z);z=x(j+K);K=x(f+x(z+h));v=x(e+x(v+n));y=x(g+x(y+o));z=x(f+x(z+p));r=x(r+m);i=x(e+x(r+i));m=x(B+C);l=x(g+x(m+l));k=x(j+k);j=x(f+x(k+h));n=x(e+x(r+n));o=x(g+x(m+o));p=x(f+x(k+p));while(1){b=(M<<4)+a|0;e=u[b>>2];g=u[b+4>>2];f=u[b+8>>2];h=u[b+12>>2];b:{if(x(x(x(x(e*U)+x(g*p))+x(f*o))+x(h*n))>=x(0)|!(x(x(x(x(e*E)+x(g*j))+x(f*l))+x(h*i))>=x(0)^1)|(x(x(x(x(e*T)+x(g*z))+x(f*y))+x(h*v))>=x(0)|x(x(x(x(e*S)+x(g*K))+x(f*Y))+x(h*L))>=x(0))){break b}if(x(x(x(x(e*R)+x(g*A))+x(f*w))+x(h*t))>=x(0)|x(x(x(x(e*Q)+x(g*J))+x(f*s))+x(h*I))>=x(0)|x(x(x(x(e*D)+x(g*H))+x(f*G))+x(h*F))>=x(0)){break b}if(x(x(x(x(e*P)+x(g*X))+x(f*W))+x(h*V))>=x(0)^1){break a}}M=M+1|0;N=(O|0)>(M|0);if((M|0)!=(O|0)){continue}break}}return(N^-1)&1}function p8(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;e=q[a+2384>>2];if(c){while(1){a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{d=w(h,40)+b|0;f=q[d>>2];switch(f|0){case 17:break h;case 16:break i;case 15:break j;case 14:break k;case 13:break l;case 12:break m;case 11:break n;case 10:break o;case 9:break p;case 8:break q;case 7:break r;case 6:break s;case 5:break t;case 3:break u;case 2:break v;case 4:break w;case 1:break x;case 0:break y;case 22:break c;case 21:break d;case 20:break e;case 19:break f;case 18:break g;default:break b}}Mi[q[74986]](e,q[d+8>>2]);break a}Mi[q[74987]](e,q[d+8>>2]);break a}Mi[q[75003]](e,q[d+8>>2],q[d+12>>2],q[d+16>>2]);break a}i=q[d+20>>2];f=(q[d+8>>2]<<3)+a|0;q[f>>2]=q[d+16>>2];q[f+4>>2]=i;break a}d=(q[d+8>>2]<<3)+a|0;q[d>>2]=0;q[d+4>>2]=0;break a}f=q[d+16>>2];Mi[q[74942]](e,q[d+8>>2],f&255,f>>>8&255,f>>>16&255,f>>>24|0,u[d+24>>2],q[d+32>>2]);o[a+2400|0]=r[d+8|0]>>>4&2|r[a+2400|0]&253;break a}Mi[q[74985]](e,q[d+8>>2],q[d+16>>2],q[d+24>>2],q[d+32>>2]);break a}d=q[d+8>>2];wH(a,d);Ni(d);break a}d=q[d+8>>2];xH(a,d);Ni(d);break a}Mi[q[74988]](e,q[d+8>>2],q[d+16>>2]);break a}Mi[q[74989]](e,q[d+8>>2]!=0|q[d+12>>2]!=0,q[d+16>>2]!=0|q[d+20>>2]!=0,q[d+24>>2]!=0|q[d+28>>2]!=0,q[d+32>>2]!=0|q[d+36>>2]!=0);break a}Mi[q[74990]](e,q[d+8>>2]!=0|q[d+12>>2]!=0);break a}Mi[q[74991]](e,q[d+8>>2]);break a}Mi[q[74993]](e,q[d+8>>2]);break a}Mi[q[74994]](e,q[d+8>>2],q[d+16>>2],q[d+24>>2]);break a}Mi[q[74996]](e,q[d+8>>2],q[d+16>>2],q[d+24>>2]);break a}Mi[q[74998]](e,q[d+8>>2]);break a}Mi[q[75e3]](e,x(+t[d+8>>2]+ +t[d+12>>2]*4294967296),x(+t[d+16>>2]+ +t[d+20>>2]*4294967296));break a}i=q[d+8>>2];f=q[d+16>>2];d=q[d+24>>2];Gv(a,i,f,d);if(!d){break a}Ni(d);break a}d=q[d+8>>2];f=d;if(q[a+1872>>2]){Gv(a,a+1344|0,0,f)}if(!d){break a}Ni(d);break a}if(q[a+1872>>2]){Gv(a,a+1608|0,0,0)}break a}q[a+2388>>2]=q[d+8>>2];break a}q[a+2388>>2]=0;break a}q[g>>2]=f;Pi(4,115344,115351,g)}h=h+1|0;if((h|0)!=(c|0)){continue}break}}Ii=g+16|0}function Pma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-112|0;Ii=e;c=q[a+4>>2];b=q[c+16>>2];d=q[q[a+12>>2]>>2];if(d>>>0>2]-b>>3>>>0){d=q[b+(d<<3)>>2];f=q[c+4>>2];c=q[c>>2];if(d>>>0<(f-c|0)/240>>>0){b=q[a+16>>2];g=q[b+64>>2];i=q[57289];f=q[b+68>>2];a:{if((g|0)==q[i+8>>2]&(f|0)==q[i+12>>2]){a=c+w(d,240)|0;p[a+234>>1]=s[a+234>>1]|4;break a}i=q[57290];if((g|0)==q[i+8>>2]&(f|0)==q[i+12>>2]){a=c+w(d,240)|0;p[a+234>>1]=s[a+234>>1]&65531;break a}if(!q[b+80>>2]){break a}i=c+w(d,240)|0;h=q[60754];if((g|0)==q[h+8>>2]&(f|0)==q[h+12>>2]){if(!mw(i,q[b+96>>2],q[b+100>>2],u[b+104>>2],u[b+108>>2])){break a}b=q[a+16>>2];g=q[b+4>>2];c=c+w(d,240)|0;q[c+152>>2]=q[b>>2];q[c+156>>2]=g;d=q[b+28>>2];q[c+176>>2]=q[b+24>>2];q[c+180>>2]=d;d=q[b+20>>2];q[c+168>>2]=q[b+16>>2];q[c+172>>2]=d;d=q[b+12>>2];q[c+160>>2]=q[b+8>>2];q[c+164>>2]=d;q[c+148>>2]=q[q[a+16>>2]+76>>2];break a}h=q[60794];if((g|0)==q[h+8>>2]&(f|0)==q[h+12>>2]){a=c+w(d,240)|0;p[a+234>>1]=s[a+234>>1]&65503|(q[b+96>>2]!=0)<<5;break a}h=q[60810];if((g|0)==q[h+8>>2]&(f|0)==q[h+12>>2]){a=c+w(d,240)|0;p[a+234>>1]=s[a+234>>1]&65471|(q[b+96>>2]!=0)<<6;break a}h=q[59006];if((g|0)==q[h+8>>2]&(f|0)==q[h+12>>2]){g=q[b+96>>2];f=q[b+100>>2];d=c+w(d,240)|0;c=q[d+200>>2];if(!c){c=q[q[d+188>>2]+8>>2]}c=q[c>>2];u[e+16>>2]=u[b+112>>2];u[e+20>>2]=u[b+116>>2];u[e+24>>2]=u[b+120>>2];u[e+28>>2]=u[b+124>>2];if((Bp(c,g,f,Gp(e+40|0,e+16|0),q[b+128>>2],243,i)|0)!=-1){break a}a=q[a+16>>2];c=sm(q[a+32>>2],q[a+36>>2]);d=aj(q[a+48>>2],q[a+52>>2]);a=aj(q[a+56>>2],q[a+60>>2]);q[e+12>>2]=aj(q[b+96>>2],q[b+100>>2]);q[e+8>>2]=a;q[e+4>>2]=d;q[e>>2]=c;Pi(4,53024,53032,e);break a}a=q[59022];if((g|0)==q[a+8>>2]&(f|0)==q[a+12>>2]){a=q[(c+w(d,240)|0)+192>>2];if(!a){break a}if(!ow(a,q[b+96>>2],q[b+100>>2])){break a}a=c+w(d,240)|0;p[a+234>>1]=s[a+234>>1]|256;break a}a=q[59038];if(q[a+8>>2]!=(g|0)|q[a+12>>2]!=(f|0)){break a}a=c+w(d,240)|0;u[a+48>>2]=u[b+96>>2];u[a+52>>2]=u[b+100>>2];u[a+56>>2]=u[b+104>>2]}Ii=e+112|0;return 0}}J(53716,53631,479,53341);G()}function nP(a,b,c){var d=0,e=0,f=0;d=Ii+ -64|0;Ii=d;q[d+48>>2]=0;q[d+32>>2]=0;q[d+16>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;e=-10240;a:{if(!a|!b){break a}q[d+56>>2]=b;q[d+60>>2]=c;if(hk(d+56|0,b+c|0,d+60|0,48)){xl(a);e=-8576;break a}f=q[d+60>>2];c=(f+q[d+56>>2]|0)-b|0;q[a+8>>2]=c;e=bk(1,c);q[a+12>>2]=e;if(!e){e=-10368;break a}b=Ti(e,b,c);q[a>>2]=1;e=b+(c-f|0)|0;q[d+56>>2]=e;q[a+24>>2]=e;f=b+c|0;b=hk(d+56|0,f,d+60|0,48);if(b){xl(a);e=b-8576|0;break a}c=q[d+56>>2]+q[d+60>>2]|0;q[a+20>>2]=c-q[a+24>>2];b:{e=ZO(d+56|0,c,a+28|0);c:{if(e){break c}e=pV(d+56|0,c,a+32|0);if(e){break c}b=a+44|0;e=hy(d+56|0,c,b,d+40|0);if(!e){break b}}xl(a);break a}e=q[a+28>>2];if(e>>>0>=3){xl(a);e=-9600;break a}q[a+28>>2]=e+1;e=nV(b,d+40|0,a+328|0,a+332|0,a+336|0);if(e){xl(a);break a}q[a- -64>>2]=q[d+56>>2];b=hk(d+56|0,c,d+60|0,48);if(b){xl(a);e=b-8576|0;break a}e=aE(d+56|0,q[d+56>>2]+q[d+60>>2]|0,a+80|0);if(e){xl(a);break a}q[a+60>>2]=q[d+56>>2]-q[a+64>>2];e=eP(d+56|0,c,a+144|0,a+168|0);if(e){xl(a);break a}q[a+76>>2]=q[d+56>>2];b=hk(d+56|0,c,d+60|0,48);if(b){xl(a);e=b-8576|0;break a}d:{b=q[d+60>>2];if(!b){break d}e=aE(d+56|0,b+q[d+56>>2]|0,a+112|0);if(!e){break d}xl(a);break a}b=q[d+56>>2];q[a+200>>2]=b;q[a+72>>2]=b-q[a+76>>2];e=EW(d+56|0,c,a+204|0);if(e){xl(a);break a}q[a+196>>2]=q[d+56>>2]-q[a+200>>2];e:{b=q[a+28>>2];if((b&-2)==2){e=wC(d+56|0,c,a+212|0,1);if(e){break e}b=q[a+28>>2]}f:{if((b&-2)!=2){break f}e=wC(d+56|0,c,a+224|0,2);if(e){xl(a);break a}if(q[a+28>>2]!=3){break f}e=fP(d+56|0,c,a);if(!e){break f}xl(a);break a}g:{if((c|0)!=q[d+56>>2]){break g}e=hy(d+56|0,f,d+8|0,d+24|0);if(e){xl(a);break a}h:{b=q[a+48>>2];i:{if((b|0)!=q[d+12>>2]){break i}if(Ej(q[a+52>>2],q[d+16>>2],b)){break i}b=q[d+44>>2];if((b|0)!=q[d+28>>2]){break i}if(!b){break h}if(!Ej(q[d+48>>2],q[d+32>>2],b)){break h}}xl(a);e=-9856;break a}e=oV(d+56|0,f,a+316|0);if(e){xl(a);break a}if((f|0)!=q[d+56>>2]){break g}e=0;break a}xl(a);e=-8678;break a}xl(a)}Ii=d- -64|0;return e}function Lka(a,b,c,d){var e=0,f=0,g=0,h=0;h=Ii-16|0;Ii=h;g=q[b+2384>>2];f=57665;e=Dk(a,57665,0,0,255,0,254,253);a:{b:{if(e){break b}f=57411;e=Dk(a,57411,d,0,258,0,257,256);if(e){break b}f=57732;e=Dk(a,57732,d,0,261,0,260,259);if(e){break b}f=57745;e=Dk(a,57745,0,265,264,0,263,262);if(e){break b}f=57468;e=Dk(a,57468,g,270,269,268,267,266);if(e){break b}f=57757;e=Dk(a,57757,g,274,273,0,272,271);if(e){break b}f=57761;e=Dk(a,57761,g,278,277,0,276,275);if(e){break b}f=57437;e=Dk(a,57437,b,282,281,0,280,279);if(e){break b}f=57453;e=Dk(a,57453,g,286,285,0,284,283);if(e){break b}f=57765;e=Dk(a,57765,g,290,289,0,288,287);if(e){break b}f=57461;e=Dk(a,57461,g,294,293,0,292,291);if(e){break b}f=57443;e=Dk(a,57443,b,298,297,0,296,295);if(e){break b}f=57771;e=Dk(a,57771,0,302,301,0,300,299);if(e){break b}f=57783;e=Dk(a,57783,0,0,305,0,304,303);if(e){break b}f=57788;e=Dk(a,57788,0,0,305,0,304,303);if(e){break b}f=57793;e=Dk(a,57793,0,309,308,0,307,306);if(e){break b}f=57800;e=Dk(a,57800,0,0,312,0,311,310);if(e){break b}f=57808;e=Dk(a,57808,c,0,315,0,314,313);if(e){break b}f=57823;e=Dk(a,57823,0,0,318,0,317,316);if(e){break b}f=57428;e=Dk(a,57428,0,322,321,0,320,319);if(e){break b}f=57392;e=Dk(a,57392,0,326,325,0,324,323);if(e){break b}f=57833;e=Dk(a,57833,0,330,329,0,328,327);if(e){break b}f=57840;e=Dk(a,57840,0,0,333,0,332,331);if(e){break b}f=57847;e=Dk(a,57847,b,0,336,0,335,334);if(e){break b}f=57862;e=Dk(a,57862,b,0,339,0,338,337);if(e){break b}f=57870;e=Dk(a,57870,0,343,342,0,341,340);if(e){break b}f=57477;e=Dk(a,57477,d,347,346,0,345,344);if(e){break b}f=57489;e=Dk(a,57489,d,351,350,0,349,348);if(e){break b}f=57878;e=Dk(a,57878,0,355,354,0,353,352);if(e){break b}f=57887;e=Dk(a,57887,0,359,358,0,357,356);if(e){break b}f=57897;e=Dk(a,57897,0,363,362,0,361,360);if(e){break b}f=57907;e=Dk(a,57907,b,0,366,0,365,364);c=0;if(!e){break a}}a=h;b=e+21|0;c:{if(b>>>0<=21){b=q[(b<<2)+230968>>2];break c}b=26012}q[a+4>>2]=b;q[h>>2]=f;Pi(5,57682,57690,h);c=e}Ii=h+16|0;return c}function yla(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-96|0;Ii=e;a:{if(o[292680]&1){break a}if(!fk(292680)){break a}q[73168]=Oi(49723);q[73169]=Li;ek(292680)}b:{if(o[292696]&1){break b}if(!fk(292696)){break b}q[73172]=Oi(49734);q[73173]=Li;ek(292696)}g=oG(q[b+8>>2]);q[b+8>>2]=0;c:{d=q[a+68>>2];if(d){f=q[a+76>>2];if(!f|t[a+72>>2]>>0){break c}h=a;a=f-1|0;q[h+76>>2]=a;q[d+(a<<2)>>2]=c;d:{if(g){q[e+16>>2]=g;Pi(4,49438,49498,e+16|0);a=-1e3;break d}a=0;if(!(q[b+40>>2]|q[b+44>>2])|q[b+92>>2]==-1){break d}c=o[b+96|0]&1?292688:292672;h=q[c>>2];i=q[c+4>>2];c=q[b+44>>2];q[e+80>>2]=q[b+40>>2];q[e+84>>2]=c;c=q[b+36>>2];q[e+72>>2]=q[b+32>>2];q[e+76>>2]=c;c=q[b+28>>2];d=e- -64|0;q[d>>2]=q[b+24>>2];q[d+4>>2]=c;c=q[b+20>>2];q[e+56>>2]=q[b+16>>2];q[e+60>>2]=c;c=q[b+76>>2];q[e+48>>2]=q[b+72>>2];q[e+52>>2]=c;d=b- -64|0;c=q[d+4>>2];q[e+40>>2]=q[d>>2];q[e+44>>2]=c;c=q[b+60>>2];q[e+32>>2]=q[b+56>>2];q[e+36>>2]=c;g=q[b+52>>2];f=q[b+48>>2];q[e+24>>2]=f;q[e+28>>2]=g;d=b+48|0;c=b+16|0;e:{if(!Po(f,g)){break e}if(!Po(q[e+56>>2],q[e+60>>2])){break e}q[e+88>>2]=q[b+92>>2];if(!Oo(e+24|0,e+56|0,h,i,0,q[b+84>>2],q[58846],e+88|0,4,0)){break e}q[e>>2]=aj(h,i);Pi(4,49438,49748,e)}o[d|0]=0;o[d+1|0]=0;o[d+2|0]=0;o[d+3|0]=0;o[d+4|0]=0;o[d+5|0]=0;o[d+6|0]=0;o[d+7|0]=0;o[d+24|0]=0;o[d+25|0]=0;o[d+26|0]=0;o[d+27|0]=0;o[d+28|0]=0;o[d+29|0]=0;o[d+30|0]=0;o[d+31|0]=0;o[d+16|0]=0;o[d+17|0]=0;o[d+18|0]=0;o[d+19|0]=0;o[d+20|0]=0;o[d+21|0]=0;o[d+22|0]=0;o[d+23|0]=0;o[d+8|0]=0;o[d+9|0]=0;o[d+10|0]=0;o[d+11|0]=0;o[d+12|0]=0;o[d+13|0]=0;o[d+14|0]=0;o[d+15|0]=0;o[c|0]=0;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;o[c+4|0]=0;o[c+5|0]=0;o[c+6|0]=0;o[c+7|0]=0;o[c+24|0]=0;o[c+25|0]=0;o[c+26|0]=0;o[c+27|0]=0;o[c+28|0]=0;o[c+29|0]=0;o[c+30|0]=0;o[c+31|0]=0;o[c+16|0]=0;o[c+17|0]=0;o[c+18|0]=0;o[c+19|0]=0;o[c+20|0]=0;o[c+21|0]=0;o[c+22|0]=0;o[c+23|0]=0;o[c+8|0]=0;o[c+9|0]=0;o[c+10|0]=0;o[c+11|0]=0;o[c+12|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0}Ii=e+96|0;return a}J(50222,49986,140,50229);G()}J(50234,49986,141,50229);G()}function Lv(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Ii-16|0;Ii=h;l=e^1;j=a+2208|0;e=0;a:{b:{c:{d:{e:{if((c|0)==-1){while(1){f=q[b+16>>2];g=q[b+20>>2]-f|0;Mi[d|0](b,q[a+2132>>2],q[b+12>>2],(a+f|0)+2208|0,g);f=q[b+100>>2];if(!(!f|l)){CI(f,(q[b+16>>2]+a|0)+2208|0,g)}f=g+q[b+16>>2]|0;q[b+16>>2]=f;e=e+g|0;if((e|0)==-1){e=-1;break b}if(q[b+20>>2]!=(f|0)){break c}q[b+16>>2]=0;q[b+20>>2]=0;f:{g:{f=q[b+116>>2];h:{if(f){f=uv(f,j,65536,h+12|0);break h}f=mv(q[b+112>>2],j,65536,h+12|0)}g=(f|0)==-3?-101:f;i=g+5|0;switch(i|0){case 0:break a;case 5:break f;case 1:case 2:case 3:case 4:break e;default:break g}}if((g|0)!=-101){break e}}f=q[a+2204>>2];if(q[f>>2]?f:0){break e}if(q[a+2160>>2]){f=Jk();k=q[a+2168>>2];if(q[a+2160>>2]<=(f-k|0)){break e}}i:{switch(i|0){case 5:f=q[h+12>>2];if(!f){break a}q[b+20>>2]=f;continue;case 0:break a;case 1:case 2:case 3:case 4:break e;default:break i}}if((g|0)==-101){continue}break e}}while(1){f=c-e|0;g=q[b+16>>2];i=q[b+20>>2]-g|0;f=(f|0)<(i|0)?f:i;Mi[d|0](b,q[a+2132>>2],q[b+12>>2],(a+g|0)+2208|0,f);g=q[b+100>>2];if(!(!g|l)){CI(g,(q[b+16>>2]+a|0)+2208|0,f)}e=e+f|0;if((e|0)>(c|0)){break d}f=f+q[b+16>>2]|0;q[b+16>>2]=f;if((c|0)==(e|0)){e=c;break b}if(q[b+20>>2]!=(f|0)){break c}q[b+16>>2]=0;q[b+20>>2]=0;j:{k:{f=q[b+116>>2];l:{if(f){f=uv(f,j,65536,h+12|0);break l}f=mv(q[b+112>>2],j,65536,h+12|0)}g=(f|0)==-3?-101:f;i=g+5|0;switch(i|0){case 0:break a;case 5:break j;case 1:case 2:case 3:case 4:break e;default:break k}}if((g|0)!=-101){break e}}f=q[a+2204>>2];if(q[f>>2]?f:0){break e}if(q[a+2160>>2]){f=Jk();k=q[a+2168>>2];if(q[a+2160>>2]<=(f-k|0)){break e}}m:{switch(i|0){case 5:f=q[h+12>>2];if(!f){break a}q[b+20>>2]=f;continue;case 0:break a;case 1:case 2:case 3:case 4:break e;default:break m}}if((g|0)==-101){continue}break}}Ii=h+16|0;return-1}J(168942,168212,664,168996);G()}J(169007,168212,676,168996);G()}bl(j,(a+f|0)+2208|0,q[b+20>>2]-f|0);a=q[b+16>>2];q[b+16>>2]=0;q[b+20>>2]=q[b+20>>2]-a}Ii=h+16|0;return(c|0)!=-1?(c|0)!=(e|0)?-4:0:0}function ZB(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-608|0;Ii=g;fU(a,g+32|0);q[q[g+32>>2]+60>>2]=d;if(q[a+16>>2]!=40){e=q[a+52>>2];q[g+16>>2]=tl(a,40);Sj(a,oj(e,141919,g+16|0))}Vj(a);a:{if(!c){f=q[a+48>>2];i=q[f>>2];break a}Vm(a,Go(a,142138,4),0);f=q[a+48>>2];c=r[f+50|0]+1|0;o[f+50|0]=c;i=q[f>>2];q[(q[i+24>>2]+w(s[(((c&255)<<1)+f|0)+170>>1],12)|0)+4>>2]=q[f+24>>2]}o[i+74|0]=0;c=0;h=q[a+16>>2];e=0;b:{if((h|0)==41){break b}while(1){c:{d:{switch(h-279|0){case 6:e=q[a+24>>2];Vj(a);Vm(a,e,c);c=c+1|0;break c;case 0:Vj(a);Vm(a,Go(a,142184,3),c);o[i+74|0]=7;c=c+1|0;e=1;break b;default:break d}}Sj(a,142188)}e=r[i+74|0];if(!(e|q[a+16>>2]!=44)){Vj(a);h=q[a+16>>2];continue}break}e=e&1}h=q[a+48>>2];j=r[h+50|0]+c|0;o[h+50|0]=j;if(c){j=j&255;k=q[h+24>>2];l=q[q[h>>2]+24>>2];while(1){q[(w(s[(h+(j-c<<1)|0)+172>>1],12)+l|0)+4>>2]=k;c=c-1|0;if(c){continue}break}}c=r[f+50|0];o[i+73|0]=c-e;hq(f,c);if(q[a+16>>2]!=41){c=q[a+52>>2];q[g>>2]=tl(a,41);Sj(a,oj(c,141919,g))}Vj(a);e=q[a+52>>2];c=s[e+52>>1]+1|0;p[e+52>>1]=c;if((c&65535)>>>0>=201){gm(a,141933,0)}while(1){c=q[a+16>>2]-260|0;if(!(1<>>0<=27:0)){c=qu(a);if(q[a+16>>2]==59){Vj(a)}e=q[a+48>>2];q[e+36>>2]=r[e+50|0];if(!c){continue}}break}c=q[a+52>>2];p[c+52>>1]=s[c+52>>1]-1;q[q[g+32>>2]+64>>2]=q[a+4>>2];Yo(a,262,265,d);xN(a);e=q[a+48>>2];d=q[e>>2];c=q[d+52>>2];e:{if((c|0)>q[e+44>>2]){break e}i=_q(q[a+52>>2],q[d+16>>2],d+52|0,4,262143,142213);q[d+16>>2]=i;f=q[d+52>>2];if((f|0)<=(c|0)){break e}q[i+(c<<2)>>2]=0;c=c+1|0;if((f|0)==(c|0)){break e}while(1){q[q[d+16>>2]+(c<<2)>>2]=0;c=c+1|0;if((f|0)!=(c|0)){continue}break}}f=q[d+16>>2];i=q[g+32>>2];h=q[e+44>>2];c=h+1|0;q[e+44>>2]=c;q[f+(h<<2)>>2]=i;f=q[g+32>>2];if(!(!(r[f+5|0]&3)|!(r[d+5|0]&4))){go(q[a+52>>2],d,f);c=q[e+44>>2]}a=0;c=Yu(e,36,0,c-1|0);q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=c;q[b>>2]=11;if(r[q[g+32>>2]+72|0]){while(1){b=(g+32|0)+(a<<1)|0;Bm(e,(r[b+51|0]!=6)<<2,0,r[b+52|0],0);a=a+1|0;if(a>>>0>2]+72|0]){continue}break}}Ii=g+608|0}function Una(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=0,j=x(0),k=x(0),l=x(0),m=0,n=x(0),p=x(0),s=x(0),t=x(0),v=0;c=Ii-80|0;Ii=c;i=q[a+80>>2];d=i+4|0;a:{b=q[i+12>>2];b:{if((b|0)==q[i+8>>2]){xn(44662,44667,b-q[d>>2]>>2);a=-1e3;break b}m=E9(d);b=Ui($i(208),0,208);d=q[i+20>>2];if(q[i+24>>2]-d>>3>>>0<=m>>>0){break a}d=q[d+(m<<3)>>2];e=q[i+4>>2];if(d>>>0>=q[i+8>>2]-e>>2>>>0){break a}q[e+(d<<2)>>2]=b;e=q[a>>2];q[b>>2]=e;l=u[a+36>>2];g=u[a+44>>2];n=u[a+40>>2];j=u[a+24>>2];f=u[a+32>>2];d=q[a+20>>2];v=q[a+16>>2];q[b+28>>2]=0;q[b+44>>2]=0;q[b+60>>2]=0;q[b+64>>2]=v;q[b+68>>2]=d;q[b+76>>2]=1065353216;u[b+72>>2]=j;p=x(l+l);k=x(f*p);j=x(n+n);h=x(g*j);u[b+20>>2]=k+h;s=x(f*j);t=x(p*g);u[b+24>>2]=s-t;u[b+32>>2]=k-h;k=x(l*j);h=g;g=x(f+f);h=x(h*g);u[b+40>>2]=k+h;u[b+48>>2]=s+t;u[b+52>>2]=k-h;f=x(x(1)-x(f*g));g=x(n*j);u[b+36>>2]=f-g;h=f;f=x(l*p);u[b+56>>2]=h-f;u[b+16>>2]=x(x(1)-f)-g;q[b+152>>2]=q[a+76>>2];q[b+80>>2]=1065353216;q[b+84>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+96>>2]=0;q[b+100>>2]=1065353216;q[b+104>>2]=0;q[b+108>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+120>>2]=1065353216;q[b+124>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;q[b+136>>2]=0;q[b+140>>2]=1065353216;q[b+200>>2]=0;o[b+204|0]=r[b+204|0]|1;d=b+16|0;e=Jp(e);c:{if((q[q[b>>2]+136>>2]&512)>>>9|0){_k(c,e,d);break c}jo(c,e,d)}u[b+80>>2]=u[c>>2];u[b+84>>2]=u[c+4>>2];u[b+88>>2]=u[c+8>>2];u[b+92>>2]=u[c+12>>2];u[b+96>>2]=u[c+16>>2];u[b+100>>2]=u[c+20>>2];u[b+104>>2]=u[c+24>>2];u[b+108>>2]=u[c+28>>2];u[b+112>>2]=u[c+32>>2];u[b+116>>2]=u[c+36>>2];u[b+120>>2]=u[c+40>>2];u[b+124>>2]=u[c+44>>2];u[b+128>>2]=u[c+48>>2];u[b+132>>2]=u[c+52>>2];u[b+136>>2]=u[c+56>>2];u[b+140>>2]=u[c+60>>2];d=q[b+192>>2];if(!d){d=q[q[b+152>>2]+8>>2]}if(q[q[d>>2]+152>>2]==1){d=q[b+156>>2];if(!d){d=q[q[b+152>>2]+4>>2]}q[c>>2]=0;q[c+4>>2]=0;q[c+16>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;xq(q[d+4>>2],c+76|0);kk(c,d+4|0,4);kk(c,c+76|0,4);e=Rn(c);q[b+200>>2]=e;sL(i,d,e)}hL(b);q[q[a+88>>2]>>2]=m;a=0}Ii=c+80|0;return a|0}J(46069,45367,479,46080);G()}function Rra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-176|0;Ii=f;q[f+32>>2]=0;j=q[q[a+12>>2]>>2];q[f+28>>2]=0;d=1;a:{b:{c:{d:{e:{f:{g:{h:{c=q[a+16>>2];if(!q[c+80>>2]){break h}g=q[57324];if(q[c+64>>2]!=q[g+8>>2]|q[c+68>>2]!=q[g+12>>2]){break h}q[f+48>>2]=0;h=UM(q[c+96>>2],q[c+100>>2]);if(!h){q[f>>2]=aj(q[c+96>>2],q[c+100>>2]);Pi(3,12654,12799,f);break c}if(NB(q[a+16>>2]+120|0,q[c+104>>2],h,f+28|0,f+48|0)){q[f+16>>2]=q[h+4>>2];Pi(3,12654,12852,f+16|0);break c}i=q[f+48>>2];b=Yi(i+96|0);g=q[a+16>>2];d=g;e=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=e;e=q[d+28>>2];q[b+24>>2]=q[d+24>>2];q[b+28>>2]=e;e=q[d+20>>2];q[b+16>>2]=q[d+16>>2];q[b+20>>2]=e;e=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=e;e=q[d+60>>2];q[b+56>>2]=q[d+56>>2];q[b+60>>2]=e;e=q[d+52>>2];q[b+48>>2]=q[d+48>>2];q[b+52>>2]=e;e=q[d+44>>2];q[b+40>>2]=q[d+40>>2];q[b+44>>2]=e;e=q[d+36>>2];q[b+32>>2]=q[d+32>>2];q[b+36>>2]=e;d=q[h+12>>2];q[b+64>>2]=q[h+8>>2];q[b+68>>2]=d;d=0;q[b+88>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+80>>2]=h;q[b+84>>2]=i;e=q[f+28>>2];Ti(b+96|0,e,i);h=q[c+108>>2];i:{if(h){d=r[c+112|0]!=0;c=h-2|0;break i}c=q[q[j>>2]+20>>2]}h=(h|0)!=0;if(!e){break g}g=b;break f}g=c}b=q[g+76>>2];if(b){c=b-2|0;h=1;break e}c=q[q[j>>2]+20>>2]}b=0;if((c|0)==-2){break d}}a=q[a+8>>2];b=0;j:{if(!a){break j}b=q[a+120>>2]}a=b;b=q[a+8>>2];i=q[a+12>>2];rj(a,-1e4,q[j+12>>2]);yk(a);k:{if(h){FG(a,c);if((Vi(a,-1)|0)!=6){Ri(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;yk(a);Pi(3,12654,13407,0);b=0;break d}if(!d){break k}zG(a,c);break k}rj(a,-1e4,c)}if((Vi(a,-1)|0)!=6){break b}b=b-i>>4;rj(a,-1e4,q[j+12>>2]);lk(a,q[g+64>>2],q[g+68>>2]);c=q[g+80>>2];l:{if(c){uz(a,c,g+96|0);break l}c=q[g+84>>2];if(c){gr(a,g+96|0,c);break l}vj(a,0,0)}km(a,g);c=Ii-128|0;Ii=c;Ii=c+128|0;q[f+40>>2]=0;c=Pm(a,4,0);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;yk(a);if((b|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}b=c?-1e3:0}a=q[f+28>>2];if(!a){break c}Aj(a);Ni(g)}Ii=f+176|0;return b|0}J(13479,12749,300,13501);G()}J(12728,12749,344,13501);G()}function VF(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0;j=Ii-128|0;Ii=j;a:{b:{c:{if(!Eq(f,g,h,i,0,0,0,0)){break c}l=Yxa(f,g,h,i);s=e>>>16|0;n=s&32767;if((n|0)==32767){break c}if(l){break b}}Qk(j+16|0,b,c,d,e,f,g,h,i);e=q[j+16>>2];d=q[j+20>>2];c=q[j+24>>2];b=q[j+28>>2];uO(j,e,d,c,b,e,d,c,b);d=q[j+8>>2];e=q[j+12>>2];h=q[j>>2];i=q[j+4>>2];break a}l=n<<16;o=d;r=l|e&65535;m=r;p=h;r=i>>>16&32767;k=i&65535|r<<16;if((Eq(b,c,o,m,f,g,h,k)|0)<=0){if(Eq(b,c,o,m,f,g,p,k)){h=b;i=c;break a}Qk(j+112|0,b,c,d,e,0,0,0,0);d=q[j+120>>2];e=q[j+124>>2];h=q[j+112>>2];i=q[j+116>>2];break a}if(n){i=c;h=b}else{Qk(j+96|0,b,c,o,m,0,0,0,1081540608);h=q[j+108>>2];m=h;o=q[j+104>>2];n=(h>>>16|0)-120|0;i=q[j+100>>2];h=q[j+96>>2]}if(!r){Qk(j+80|0,f,g,p,k,0,0,0,1081540608);f=q[j+92>>2];k=f;p=q[j+88>>2];r=(k>>>16|0)-120|0;g=q[j+84>>2];f=q[j+80>>2]}t=k&65535|65536;m=m&65535|65536;if((n|0)>(r|0)){while(1){k=o;l=p;u=k-l|0;l=m-((k>>>0>>0)+t|0)|0;k=(g|0)==(i|0)&f>>>0>h>>>0|g>>>0>i>>>0;l=l-(k>>>0>u>>>0)|0;k=u-k|0;d:{if((l|0)>0?1:(l|0)>=0){m=h;h=h-f|0;i=i-((f>>>0>m>>>0)+g|0)|0;if(!(h|k|(i|l))){Qk(j+32|0,b,c,d,e,0,0,0,0);d=q[j+40>>2];e=q[j+44>>2];h=q[j+32>>2];i=q[j+36>>2];break a}l=l<<1|k>>>31;o=k<<1|i>>>31;break d}l=m<<1|o>>>31;o=o<<1|i>>>31}m=l;l=i<<1|h>>>31;h=h<<1;i=l;n=n-1|0;if((r|0)<(n|0)){continue}break}n=r}l=o;r=l-p|0;k=m-((l>>>0

>>0)+t|0)|0;l=(g|0)==(i|0)&f>>>0>h>>>0|g>>>0>i>>>0;k=k-(l>>>0>r>>>0)|0;p=r-l|0;e:{if((k|0)<0){p=o;k=m;break e}o=h;h=h-f|0;i=i-((f>>>0>o>>>0)+g|0)|0;if(h|p|(i|k)){break e}Qk(j+48|0,b,c,d,e,0,0,0,0);d=q[j+56>>2];e=q[j+60>>2];h=q[j+48>>2];i=q[j+52>>2];break a}if((k|0)==65535|k>>>0<65535){while(1){b=i>>>31|0;n=n-1|0;m=i<<1|h>>>31;h=h<<1;i=m;c=b;b=p;k=k<<1|b>>>31;p=c|b<<1;if(k>>>0<65536){continue}break}}b=s&32768;if((n|0)<=0){Qk(j- -64|0,h,i,p,k&65535|(b|n+120)<<16,0,0,0,1065811968);d=q[j+72>>2];e=q[j+76>>2];h=q[j+64>>2];i=q[j+68>>2];break a}d=p;e=k&65535|(b|n)<<16}q[a>>2]=h;q[a+4>>2]=i;q[a+8>>2]=d;q[a+12>>2]=e;Ii=j+128|0}function kk(a,b,c){var d=0,e=0,f=0,g=0,h=0;q[a+12>>2]=q[a+12>>2]+c;a:{if(!c){break a}d=b;e=c;while(1){f=q[a+8>>2];if(!(f?0:(e|0)>=4)){g=r[d|0];h=f+1|0;q[a+8>>2]=h;f=q[a+4>>2]|g<<(f<<3);q[a+4>>2]=f;e=e-1|0;if((h|0)==4){q[a+4>>2]=0;q[a+8>>2]=0;f=w(f,1540483477);q[a>>2]=w(q[a>>2],1540483477)^w(f>>>24^f,1540483477)}d=d+1|0;if(e){continue}break a}break}g=q[a>>2];while(1){f=w(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24),1540483477);g=w(f>>>24^f,1540483477)^w(g,1540483477);q[a>>2]=g;d=d+4|0;h=(e|0)>7;f=e-4|0;e=f;if(h){continue}break}if(!f){break a}while(1){e=q[a+8>>2];if(e?0:(f|0)>=4){break a}g=r[d|0];h=e+1|0;q[a+8>>2]=h;e=q[a+4>>2]|g<<(e<<3);q[a+4>>2]=e;f=f-1|0;if((h|0)==4){q[a+4>>2]=0;q[a+8>>2]=0;e=w(e,1540483477);q[a>>2]=w(q[a>>2],1540483477)^w(e>>>24^e,1540483477)}d=d+1|0;if(f){continue}break}}b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;d=Wj();o[852468]=0;q[213116]=d;ek(852568)}c:{d:{if(!(!r[852468]|!q[a+16>>2]|t[a+12>>2]>1024)){e:{if(o[852568]&1){break e}if(!fk(852568)){break e}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;d=Wj();o[852468]=0;q[213116]=d;ek(852568)}a=q[a+16>>2];if(!a){break d}d=q[213134];if(a>>>0>=q[213135]-d>>3>>>0){break c}a=d+(a<<3)|0;d=s[a+4>>1]+c|0;e=ul(q[a>>2],d+32&-16);q[a>>2]=e;Ti(e+s[a+4>>1]|0,b,c);o[d+e|0]=0;p[a+4>>1]=d}return}J(165718,165430,150,165757);G()}J(165931,165533,479,165942);G()}function iu(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:while(1){j=b-8|0;b:while(1){e=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{d=b-e|0;a=d>>3;switch(a|0){case 4:break j;case 2:break k;case 0:case 1:break d;case 3:break g;case 5:break i;default:break h}}d=b-8|0;c=q[d>>2];b=q[d+4>>2];a=q[e+4>>2];if((b|0)==(a|0)&t[e>>2]<=c>>>0|a>>>0>>0){break d}Zl(e,d);return}wx(e,e+8|0,e+16|0,b-8|0);return}sx(e,e+8|0,e+16|0,e+24|0,b-8|0);return}if((d|0)<=247){yP(e,b);return}g=((a|0)/2<<3)+e|0;l:{if((d|0)>=7993){a=(a|0)/4<<3;h=sx(e,a+e|0,g,a+g|0,j);break l}h=Hq(e,g,j)}a=j;f=q[e+4>>2];d=q[g+4>>2];if((f|0)==(d|0)&t[e>>2]>=t[g>>2]|d>>>0>>0){while(1){a=a-8|0;if((e|0)==(a|0)){f=e+8|0;d=q[e+4>>2];a=q[j+4>>2];if((d|0)==(a|0)&t[e>>2]>2]|a>>>0>d>>>0){break e}while(1){if((f|0)==(j|0)){break d}d=q[e+4>>2];a=q[f+4>>2];if((d|0)==(a|0)&t[e>>2]>2]|a>>>0>d>>>0){Zl(f,j);f=f+8|0;break e}else{f=f+8|0;continue}}}f=q[a+4>>2];d=q[g+4>>2];if((f|0)==(d|0)&t[a>>2]>=t[g>>2]|d>>>0>>0){continue}break}Zl(e,a);h=h+1|0}d=e+8|0;if(d>>>0>=a>>>0){break f}while(1){f=d;d=d+8|0;k=q[f+4>>2];i=q[g+4>>2];if((k|0)==(i|0)&t[f>>2]>2]|i>>>0>k>>>0){continue}while(1){a=a-8|0;k=q[a+4>>2];i=q[g+4>>2];if((k|0)==(i|0)&t[g>>2]<=t[a>>2]|i>>>0>>0){continue}break}if(a>>>0>>0){d=f;break f}else{Zl(f,a);g=(f|0)==(g|0)?a:g;h=h+1|0;continue}}}Hq(e,e+8|0,b-8|0);break d}m:{if((d|0)==(g|0)){break m}f=q[g+4>>2];a=q[d+4>>2];if((f|0)==(a|0)&t[g>>2]>=t[d>>2]|a>>>0>>0){break m}Zl(d,g);h=h+1|0}if(!h){f=DN(e,d);a=d+8|0;if(DN(a,b)){b=d;a=e;if(!f){continue a}break d}if(f){continue b}}if((d-e|0)<(b-d|0)){iu(e,d,c);a=d+8|0;continue b}iu(d+8|0,b,c);b=d;a=e;continue a}a=j;if((f|0)==(a|0)){break d}while(1){d=f;f=d+8|0;i=q[e+4>>2];h=q[d+4>>2];if((i|0)==(h|0)&t[e>>2]>=t[d>>2]|h>>>0>>0){continue}while(1){a=a-8|0;k=q[a>>2];i=q[e+4>>2];h=q[a+4>>2];if((i|0)==(h|0)&k>>>0>t[e>>2]|h>>>0>i>>>0){continue}break}if(a>>>0<=d>>>0){e=d;continue c}else{Zl(d,a);continue}}}break}break}break}}function kt(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii-1216|0;Ii=d;j=q[a+5140>>2];Gj(j);Mo(b,d+192|0);e=Wl(d+192|0,hj(d+192|0));g=Li;i=q[a>>2];h=q[i+4>>2];a:{if(!h){break a}h=q[q[i>>2]+(Cza(e,g,h)<<2)>>2];if((h|0)==-1){break a}i=q[i+8>>2];while(1){h=w(h,48);f=h+i|0;if((e|0)==q[f>>2]&(g|0)==q[f+4>>2]){break a}h=q[(h+i|0)+40>>2];if((h|0)!=-1){continue}break}f=0}g=f?f+8|0:0;if(c){q[c>>2]=g}b:{c:{d:{e:{f:{if(!f){break f}i=q[g+24>>2];if(!q[i+32>>2]){break e}f=a+7368|0;h=a+7372|0;k=a+7376|0;e=q[a+7368>>2];if((q[k>>2]-e|0)!=1048576){if(o[a+7380|0]&1){break b}Wi(1048576,1,f,k,a+7372|0);e=q[a+7368>>2]}q[h>>2]=e;e=zv(a,d+192|0,d+188|0,f);g:{if(e){break g}e=q[a+7368>>2];q[d+144>>2]=a;f=q[i+12>>2];q[d+172>>2]=0;q[d+148>>2]=f;q[d+164>>2]=e;q[d+176>>2]=g;f=q[d+188>>2];q[d+168>>2]=f;q[d+160>>2]=b;q[g+12>>2]=0;e=Mi[q[i+32>>2]](d+144|0)|0;if(e){break g}q[q[d+176>>2]+20>>2]=f;e=q[a+12>>2];h:{if(!e){break h}f=q[e>>2];if((f|0)==q[e+4>>2]){break h}e=0;while(1){f=(e<<3)+f|0;h=q[f+4>>2];q[d+120>>2]=b;q[d+116>>2]=g;q[d+112>>2]=h;Mi[q[f>>2]](d+112|0);h=q[a+12>>2];f=q[h>>2];e=e+1|0;if(e>>>0>2]-f>>3>>>0){continue}break}}if(!q[g+12>>2]){e=0;break g}e=q[g+28>>2];q[d+136>>2]=q[g+24>>2];q[d+140>>2]=e;e=q[g+20>>2];q[d+128>>2]=q[g+16>>2];q[d+132>>2]=e;e=q[g+12>>2];q[d+120>>2]=q[g+8>>2];q[d+124>>2]=e;e=q[g+4>>2];q[d+112>>2]=q[g>>2];q[d+116>>2]=e;q[d+120>>2]=q[g+12>>2];q[d+96>>2]=a;q[d+100>>2]=q[i+12>>2];q[d+104>>2]=d+112;e=Mi[q[i+28>>2]](d+96|0)|0;q[g+12>>2]=0}i:{switch(e+15|0){case 15:q[d+48>>2]=b;Pi(2,24640,25312,d+48|0);e=0;break c;case 7:q[d+64>>2]=b;Pi(4,24640,25342,d- -64|0);e=-8;break c;case 1:case 2:break i;case 0:break e;case 12:break f;default:break d}}q[d+80>>2]=b;Pi(4,24640,25374,d+80|0);break c}q[d>>2]=b;Pi(4,24640,25423,d);e=-3;break c}q[d+16>>2]=q[q[q[c>>2]+24>>2]+8>>2];Pi(3,24640,25482,d+16|0);e=-15;break c}q[d+36>>2]=e;q[d+32>>2]=b;Pi(3,24640,25527,d+32|0)}Bj(j);Ii=d+1216|0;return e}J(26803,26878,493,26726);G()}function Bwa(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=Ii-16|0;Ii=g;a:{b:{c:{d:{e:{f:{if(c>>>0<19){e=r[b+20|0];o[a+2|0]=0;o[a+3|0]=0;o[a+4|0]=0;o[a+5|0]=0;o[a+6|0]=0;o[a+7|0]=0;o[a+8|0]=0;o[a+9|0]=0;o[a+8|0]=0;o[a+9|0]=0;o[a+10|0]=0;o[a+11|0]=0;o[a+12|0]=0;o[a+13|0]=0;o[a+14|0]=0;o[a+15|0]=0;f=q[(c<<2)+102624>>2];o[a|0]=f;o[a+1|0]=f>>>8;q[g+12>>2]=11;f=q[b>>2];if(!(1497965>>>f&1)|!(1797559>>>f&1)){break f}_t(a,g+12|0,q[b+4>>2]-1|0,2);d=w(f,12)+99504|0;g:{if(q[b+4>>2]==1){_t(a,g+12|0,q[b+12>>2],4);break g}Mp(a,g+12|0,q[b+8>>2],10);_t(a,g+12|0,q[b+12>>2]<<2&60,6)}f=e?32:16;e=q[d>>2];if(r[b+20|0]){d=w(e,f);if(d-24>>>0>=73){break e}q[g+8>>2]=126-d;_t(a,g+8|0,q[b+16>>2],2)}d=w(q[b+4>>2],(q[b+12>>2]>>2)+1|0);if((d|0)>=10){break d}fxa(a,b+21|0,q[g+12>>2],d<<1,r[c+99376|0]);c=0;h:{i:{switch(e-1|0){case 1:while(1){e=126-(c<<1)|0;d=(e>>>3|0)+a|0;o[d|0]=r[d|0]|r[r[(b+c|0)+39|0]+102881|0]<<(e&6);c=c+1|0;if((f|0)!=(c|0)){continue}break}break h;case 2:while(1){if((c|0)==42){break c}d=w(c,-3)+125|0;e=(d>>>3|0)+a|0;h=r[r[(b+c|0)+39|0]+102885|0]<<(d&7);o[e|0]=h|r[e|0];if(d>>>0<=119){o[e+1|0]=r[e+1|0]|h>>>8}c=c+1|0;if((f|0)!=(c|0)){continue}break}break h;case 3:while(1){if((c|0)==32){break b}e=124-(c<<2)|0;d=(e>>>3|0)+a|0;o[d|0]=r[d|0]|r[r[(b+c|0)+39|0]+102912|0]<<(e&4);c=c+1|0;if((f|0)!=(c|0)){continue}break}break h;case 4:while(1){if((c|0)==25){break a}d=w(c,-5)+123|0;e=(d>>>3|0)+a|0;h=r[r[(b+c|0)+39|0]+102960|0]<<(d&7);o[e|0]=h|r[e|0];if(d>>>0<=119){o[e+1|0]=r[e+1|0]|h>>>8}c=c+1|0;if((f|0)!=(c|0)){continue}break}break h;default:J(96993,96899,12057,102603);G();case 0:break i}}while(1){e=127-c|0;d=(e>>>3|0)+a|0;o[d|0]=r[d|0]|r[(b+c|0)+39|0]<<(e&7);c=c+1|0;if((f|0)!=(c|0)){continue}break}}Ii=g+16|0;return}J(102572,96899,11932,102603);G()}J(102700,96899,11947,102603);G()}J(102807,96899,11970,102603);G()}J(102862,96899,11977,102603);G()}J(102893,96899,12018,102603);G()}J(102928,96899,12032,102603);G()}J(102893,96899,12048,102603);G()}function _r(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-16|0;g=q[q[c+8>>2]+116>>2];f=q[q[b+8>>2]+116>>2];a:{b:{if(f>>>0>=t[q[a+8>>2]+116>>2]){h=0;if(f>>>0<=g>>>0){break a}q[e+8>>2]=q[b+8>>2];f=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=f;q[b+8>>2]=q[c+8>>2];f=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=f;q[c+8>>2]=q[e+8>>2];f=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=f;h=1;if(t[q[b+8>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){break a}q[e+8>>2]=q[a+8>>2];f=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=f;q[a+8>>2]=q[b+8>>2];f=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=f;q[b+8>>2]=q[e+8>>2];f=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=f;break b}if(f>>>0>g>>>0){q[e+8>>2]=q[a+8>>2];f=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=f;q[a+8>>2]=q[c+8>>2];f=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=f;q[c+8>>2]=q[e+8>>2];f=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=f;h=1;break a}q[e+8>>2]=q[a+8>>2];f=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=f;q[a+8>>2]=q[b+8>>2];f=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=f;q[b+8>>2]=q[e+8>>2];f=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=f;h=1;if(t[q[c+8>>2]+116>>2]>=t[q[b+8>>2]+116>>2]){break a}q[e+8>>2]=q[b+8>>2];f=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=f;q[b+8>>2]=q[c+8>>2];f=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=f;q[c+8>>2]=q[e+8>>2];f=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=f}h=2}f=h;if(t[q[d+8>>2]+116>>2]>2]+116>>2]){q[e+8>>2]=q[c+8>>2];g=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=g;q[c+8>>2]=q[d+8>>2];g=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=g;q[d+8>>2]=q[e+8>>2];g=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=g;if(t[q[c+8>>2]+116>>2]>=t[q[b+8>>2]+116>>2]){return f+1|0}q[e+8>>2]=q[b+8>>2];d=q[b+4>>2];q[e>>2]=q[b>>2];q[e+4>>2]=d;q[b+8>>2]=q[c+8>>2];d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;q[c+8>>2]=q[e+8>>2];d=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=d;if(t[q[b+8>>2]+116>>2]>=t[q[a+8>>2]+116>>2]){return f+2|0}q[e+8>>2]=q[a+8>>2];c=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=c;q[a+8>>2]=q[b+8>>2];c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;q[b+8>>2]=q[e+8>>2];a=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=a;f=f+3|0}return f}function fM(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-48|0;Ii=d;c=q[a>>2];q[d+24>>2]=0;a:{b:{if(c){a=q[c+4>>2];if(!a){break b}i=q[a>>2];if(!i){h=1;break a}h=1;while(1){k=s[(a+(b<<1)|0)+28568>>1];f=a+w(k,112)|0;g=f;if(q[g+72>>2]){q[d+16>>2]=0;q[d+32>>2]=q[c+8>>2];q[d+36>>2]=q[((k<<2)+c|0)+12>>2];q[d+40>>2]=q[f+24>>2];h=!(Mi[q[g+72>>2]](d+32|0)|0)&h}b=b+1|0;if((i|0)!=(b|0)){continue}break}break a}J(8878,7192,2708,8926);G()}J(12121,7192,2710,8926);G()}c:{a=s[c+3260>>1];d:{if((a|0)!=32767){i=0;k=0;while(1){q[c+3260>>2]=2147450879;m=k;k=k+1|0;b=a;e:{f:{g:{h:{i:{j:{while(1){j=q[c+1036>>2];l=q[c+1040>>2]-j>>2;b=b&65535;if(l>>>0<=b>>>0){break c}e=q[j+(b<<2)>>2];b=e;f=q[b+140>>2];b=q[b+136>>2];n=l;g=f;l=g&32767;if(n>>>0<=l>>>0){break c}f=j;j=l<<2;if((e|0)!=q[f+j>>2]){break j}if(!(g&32768)){break i}f=s[e+144>>1];if(b&256){p[e+144>>1]=f;q[e+136>>2]=b&-257;q[e+140>>2]=g;b=q[c+1036>>2];if(l>>>0>=q[c+1040>>2]-b>>2>>>0){break c}if((e|0)!=q[b+j>>2]){break h}h=DB(c,e)&h;b=s[e+144>>1]}else{b=f}if((b&65535)!=32767){continue}break}b=q[c+3220>>2];q[d+32>>2]=q[c+3216>>2];q[d+36>>2]=b;b=q[c+3228>>2];q[d+40>>2]=q[c+3224>>2];q[d+44>>2]=b;h=Mr(c,d+32|0,2)&h;while(1){e=q[c+1036>>2];j=q[c+1040>>2]-e>>2;if(j>>>0<=a>>>0){break c}g=q[e+(a<<2)>>2];b=g;a=q[b+140>>2];f=a;a=a&32767;if(a>>>0>=j>>>0){break c}if((g|0)!=q[e+(a<<2)>>2]){break g}if(!(f&32768)){break f}a=s[g+144>>1];oM(c,g);i=i+1|0;if((a|0)!=32767){continue}break}break e}J(8193,7192,2750,8926);G()}J(12125,7192,2751,8926);G()}J(8193,7192,1830,12011);G()}J(8193,7192,2769,8926);G()}J(12125,7192,2770,8926);G()}if(m>>>0<=8){a=s[c+3260>>1];if((a|0)!=32767){continue}}break}if((k|0)!=10){break d}Pi(3,7319,12149,0);break d}a=q[c+3220>>2];q[d+32>>2]=q[c+3216>>2];q[d+36>>2]=a;a=q[c+3228>>2];q[d+40>>2]=q[c+3224>>2];q[d+44>>2]=a;h=Mr(c,d+32|0,2)&h;i=0}q[71474]=q[71474]+i;q[d+32>>2]=i;q[d+36>>2]=0;q[d+8>>2]=i;q[d+12>>2]=0;Ii=d+48|0;return h}J(12419,9962,479,9454);G()}function NQ(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,r=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0;z=Ii-256|0;Ii=z;f=z;while(1){a:{b:{e=s[c+32>>1];d=p[c+16>>1];if((e|d)&65535){break b}e=0;if(s[c+48>>1]|s[c+64>>1]|(s[c+80>>1]|s[c+96>>1])){break b}if(s[c+112>>1]){break b}d=p[c>>1]<<2;q[f+192>>2]=d;q[f+224>>2]=d;q[f+160>>2]=d;q[f+128>>2]=d;q[f+96>>2]=d;q[f+64>>2]=d;q[f+32>>2]=d;q[f>>2]=d;break a}j=p[c+96>>1];k=e<<16>>16;e=w(j+k|0,2217);i=p[c+80>>1];g=i+d|0;l=w(g,-1597);h=g;g=p[c+48>>1];u=p[c+112>>1];m=g+u|0;h=w(h+m|0,4816);k=e+w(k,3135)|0;n=p[c+64>>1];r=p[c>>1];x=n+r<<12;t=(k+x|0)+512|0;v=l+w(d,6149)|0;d=h+w(d+u|0,-3685)|0;v=v+d|0;q[f+224>>2]=t-v>>10;q[f>>2]=t+v>>10;e=e+w(j,-7567)|0;j=r-n<<12;n=(e+j|0)+512|0;m=w(m,-8034);r=m+w(g,12586)|0;g=h+w(g+i|0,-10497)|0;h=r+g|0;q[f+192>>2]=n-h>>10;q[f+32>>2]=h+n>>10;e=(j-e|0)+512|0;i=g+(l+w(i,8410)|0)|0;q[f+160>>2]=e-i>>10;q[f+64>>2]=e+i>>10;e=(x-k|0)+512|0;d=d+(m+w(u,1223)|0)|0;q[f+128>>2]=e-d>>10;q[f+96>>2]=d+e>>10}f=f+4|0;c=c+2|0;y=y+1|0;if((y|0)!=8){continue}break}f=0;c=z;while(1){j=q[c+24>>2];k=q[c+8>>2];d=w(j+k|0,2217);e=q[c+4>>2];i=q[c+20>>2];g=e+i|0;l=w(g,-1597);h=g;g=q[c+12>>2];u=q[c+28>>2];m=g+u|0;h=w(h+m|0,4816);k=d+w(k,3135)|0;n=q[c+16>>2];r=q[c>>2];x=n+r<<12;t=(k+x|0)+16842752|0;v=h+w(e+u|0,-3685)|0;y=v+(l+w(e,6149)|0)|0;A=t-y|0;e=A>>17;o[a+7|0]=e>>>0>255?A>>31^-1:e;t=t+y|0;e=t>>17;o[a|0]=e>>>0>255?t>>31^-1:e;e=d+w(j,-7567)|0;j=r-n<<12;n=(e+j|0)+16842752|0;m=w(m,-8034);d=m+w(g,12586)|0;g=h+w(g+i|0,-10497)|0;h=d+g|0;r=n-h|0;d=r>>17;o[a+6|0]=d>>>0>255?r>>31^-1:d;h=h+n|0;d=h>>17;o[a+1|0]=d>>>0>255?h>>31^-1:d;e=(j-e|0)+16842752|0;i=g+(l+w(i,8410)|0)|0;l=e-i|0;d=l>>17;o[a+5|0]=d>>>0>255?l>>31^-1:d;e=e+i|0;d=e>>17;o[a+2|0]=d>>>0>255?e>>31^-1:d;e=(x-k|0)+16842752|0;i=v+(m+w(u,1223)|0)|0;l=e-i|0;d=l>>17;o[a+4|0]=d>>>0>255?l>>31^-1:d;e=e+i|0;d=e>>17;o[a+3|0]=d>>>0>255?e>>31^-1:d;a=a+b|0;c=c+32|0;f=f+1|0;if((f|0)!=8){continue}break}Ii=z+256|0}function Lna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=x(0);b=Ii-112|0;Ii=b;q[b+24>>2]=0;h=q[q[a+8>>2]>>2];f=q[a+4>>2];q[b+104>>2]=0;a:{b:{c=q[f+8>>2];a=q[f+4>>2];d=c-a|0;if(!d){break b}if((a|0)!=(c|0)){c=a-c|0;c=((c|0)>(d|0)?c:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(c,(d|0)<1?d:1);c=d>>>0>1?d:1;while(1){a=q[(e<<2)+a>>2];c:{if((r[a+204|0]&3)!=3){break c}d=Jp(q[a>>2]);if((q[q[a>>2]+136>>2]&512)>>>9|0){_k(b+32|0,d,a+16|0);u[a+80>>2]=u[b+32>>2];u[a+84>>2]=u[b+36>>2];u[a+88>>2]=u[b+40>>2];u[a+92>>2]=u[b+44>>2];u[a+96>>2]=u[b+48>>2];u[a+100>>2]=u[b+52>>2];u[a+104>>2]=u[b+56>>2];u[a+108>>2]=u[b+60>>2];u[a+112>>2]=u[b+64>>2];u[a+116>>2]=u[b+68>>2];u[a+120>>2]=u[b+72>>2];u[a+124>>2]=u[b+76>>2];u[a+128>>2]=u[b+80>>2];u[a+132>>2]=u[b+84>>2];u[a+136>>2]=u[b+88>>2];u[a+140>>2]=u[b+92>>2];break c}jo(b+32|0,d,a+16|0);u[a+80>>2]=u[b+32>>2];u[a+84>>2]=u[b+36>>2];u[a+88>>2]=u[b+40>>2];u[a+92>>2]=u[b+44>>2];u[a+96>>2]=u[b+48>>2];u[a+100>>2]=u[b+52>>2];u[a+104>>2]=u[b+56>>2];u[a+108>>2]=u[b+60>>2];u[a+112>>2]=u[b+64>>2];u[a+116>>2]=u[b+68>>2];u[a+120>>2]=u[b+72>>2];u[a+124>>2]=u[b+76>>2];u[a+128>>2]=u[b+80>>2];u[a+132>>2]=u[b+84>>2];u[a+136>>2]=u[b+88>>2];u[a+140>>2]=u[b+92>>2]}e=e+1|0;if((c|0)==(e|0)){break b}a=q[f+4>>2];if(q[f+8>>2]-a>>2>>>0>e>>>0){continue}break}}break a}c=q[f+8>>2];g=q[f+4>>2];e=c-g|0;d=vp(h,e>>2);i=Dv(h,213,214,f);a=d;d:{if(e){a=g-c|0;c=((a|0)>(e|0)?a:e)>>>2|0;a=(e|0)>-1?e:-1;a=w(c,(a|0)<1?a:1);g=a>>>0>1?a:1;i=i<<6;e=0;a=d;while(1){c=q[f+4>>2];if(q[f+8>>2]-c>>2>>>0<=e>>>0){break d}c=q[c+(e<<2)>>2];if(o[c+204|0]&1){q[72744]=q[72744]+1;q[b+16>>2]=1;q[b+20>>2]=0;q[b+8>>2]=1;q[b+12>>2]=0;j=q[c+128>>2];k=q[c+132>>2];l=u[c+136>>2];q[a+16>>2]=c;q[a+20>>2]=0;u[a+8>>2]=l;q[a>>2]=j;q[a+4>>2]=k;q[a+28>>2]=q[c+144>>2];q[a+32>>2]=q[q[q[q[c+152>>2]+8>>2]>>2]+132>>2];q[a+36>>2]=i|q[a+36>>2]&-16384|16;a=a+48|0}e=e+1|0;if((g|0)!=(e|0)){continue}break}}up(h,d,a);Ii=b+112|0;return 0}}J(46069,45367,486,46080);G()}function gwa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=Ii-112|0;Ii=e;a:{if(!c|!d){break a}if((Dza(c<<2)|0)!=1){break a}if((Dza(d<<2)|0)!=1){break a}l=e+92|0;m=e+88|0;n=e+84|0;p=e+80|0;r=e+76|0;s=e+72|0;t=e+68|0;u=e- -64|0;v=e+60|0;x=e+56|0;y=e+52|0;z=e+48|0;A=e+32|12;B=e+32|8;C=e+32|4;j=KN(e+96|0,w(c,d));b:{while(1){E=w(c,k);f=1;i=0;c:{d:{while(1){D=i+E|0;h=e+32|0;if(!Aq((D<<4)+a|0,h)){break d}f=e+24|0;o[f+3|0]=255;o[f+2|0]=255;o[f+1|0]=255;o[f|0]=255;g=e+16|0;o[g+3|0]=0;o[g+2|0]=0;o[g+1|0]=0;o[g|0]=0;Sk(e+8|0,f,h);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,h);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,C);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,C);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,B);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,B);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,A);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,A);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,z);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,z);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,y);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,y);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,x);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,x);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,v);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,v);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,u);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,u);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,t);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,t);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,s);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,s);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,r);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,r);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,p);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,p);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,n);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,n);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,m);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,m);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,l);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,l);q[e+16>>2]=q[e+8>>2];h=e+8|0;q[h>>2]=0;q[h+4>>2]=0;uwa(h,f);vwa(h,g);f=q[e+12>>2];q[El(j,D)>>2]=f;i=i+1|0;f=i>>>0>>0;if((c|0)!=(i|0)){continue}break}break c}if(f){break b}}k=k+1|0;if((k|0)!=(d|0)){continue}break}Fwa(a,El(j,0),b,c,d)}zq(j)}Ii=e+112|0}function HB(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-48|0;Ii=e;q[e+8>>2]=q[a+4>>2];q[e+12>>2]=q[a+12>>2];b=q[a+20>>2];q[e+20>>2]=0;q[e+24>>2]=0;q[e+16>>2]=b;q[e+28>>2]=q[a+28>>2];q[e+32>>2]=q[a+36>>2];q[e+36>>2]=q[a+44>>2];q[e+40>>2]=q[a+52>>2];a:{b:{c:{d:{if(b){c=q[a+16>>2];d=q[a+72>>2];while(1){if((b|0)==(f|0)){break d}g=(hj(q[(q[(c+(f<<5)|0)+16>>2]<<2)+d>>2])+g|0)+1|0;q[e+20>>2]=g;f=f+1|0;if((b|0)!=(f|0)){continue}break}}f=Fw(e+8|0);if(q[a+4>>2]){b=0;while(1){c=q[a>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+60>>2]){break a}Fp(f,q[c+8>>2],q[c+12>>2],0,q[a+56>>2]+(d<<2)|0);b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+28>>2]){b=0;while(1){c=q[a+24>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+60>>2]){break a}Fp(f,q[c+8>>2],q[c+12>>2],3,q[a+56>>2]+(d<<2)|0);b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+36>>2]){b=0;while(1){c=q[a+32>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+60>>2]){break a}Fp(f,q[c+8>>2],q[c+12>>2],4,q[a+56>>2]+(d<<2)|0);b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+44>>2]){b=0;while(1){c=q[a+40>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+60>>2]){break a}Fp(f,q[c+8>>2],q[c+12>>2],5,q[a+56>>2]+(d<<2)|0);b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+52>>2]){b=0;while(1){c=q[a+48>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+60>>2]){break a}cM(f,q[c+8>>2],q[c+12>>2],u[q[a+56>>2]+(d<<2)>>2]!=x(0));b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+12>>2]){b=0;while(1){c=q[a+8>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+68>>2]){break c}g=q[c+8>>2];h=q[c+12>>2];c=q[a+64>>2]+(d<<3)|0;aM(f,g,h,q[c>>2],q[c+4>>2]);b=b+1|0;if(b>>>0>2]){continue}break}}if(q[a+20>>2]){b=0;while(1){c=q[a+16>>2]+(b<<5)|0;d=q[c+16>>2];if(d>>>0>=t[a+76>>2]){break b}kra(f,q[c+8>>2],q[c+12>>2],q[q[a+72>>2]+(d<<2)>>2]);b=b+1|0;if(b>>>0>2]){continue}break}}a=GB(f);Ii=e+48|0;return a}J(14256,14268,69,14302);G()}J(14256,14268,117,14302);G()}J(14256,14268,125,14302);G()}J(14256,14268,109,14302);G()}function Su(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-48|0;Ii=e;d=q[a+8>>2];f=Yj(a,141328,0);q[d+8>>2]=4;q[d>>2]=f;f=a;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;q[f+8>>2]=d;g=gk(b,37);a:{if(!g){f=1;break a}f=1;while(1){b=Yj(a,b,g-b|0);q[d+8>>2]=4;q[d>>2]=b;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}q[a+8>>2]=d+16;h=a;b:{c:{d:{e:{f:{g:{h:{i:{j:{b=o[g+1|0];switch(b-99|0){case 13:break f;case 3:break g;case 1:break h;case 0:break i;case 16:break j;case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 14:case 15:break d;default:break e}}b=q[c>>2];b=b?b:141329;b=Yj(a,b,hj(b));q[d+24>>2]=4;q[d+16>>2]=b;c=c+4|0;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;break b}b=q[c>>2];o[e+17|0]=0;o[e+16|0]=b;b=Yj(a,e+16|0,hj(e+16|0));q[d+24>>2]=4;q[d+16>>2]=b;c=c+4|0;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;break b}b=q[c>>2];q[d+24>>2]=3;v[d+16>>3]=b|0;c=c+4|0;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;break b}b=c+7&-8;i=v[b>>3];q[d+24>>2]=3;v[d+16>>3]=i;c=b+8|0;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;break b}q[e>>2]=q[c>>2];mn(e+16|0,141336,e);b=q[a+8>>2];d=Yj(a,e+16|0,hj(e+16|0));q[b+8>>2]=4;q[b>>2]=d;c=c+4|0;d=q[a+8>>2];if((q[a+28>>2]-d|0)<=16){Mk(a,1);d=q[a+8>>2]}d=d+16|0;break b}if((b|0)==37){break c}}o[e+18|0]=0;o[e+17|0]=b;o[e+16|0]=37;b=Yj(a,e+16|0,hj(e+16|0));q[d+24>>2]=4;q[d+16>>2]=b;b=q[a+8>>2];if((q[a+28>>2]-b|0)<=16){Mk(a,1);b=q[a+8>>2]}d=b+16|0;break b}b=Yj(a,141339,1);q[d+24>>2]=4;q[d+16>>2]=b;b=q[a+8>>2];if((q[a+28>>2]-b|0)<=16){Mk(a,1);b=q[a+8>>2]}d=b+16|0}q[h+8>>2]=d;f=f+2|0;b=g+2|0;g=gk(b,37);if(g){continue}break}}b=Yj(a,b,hj(b));q[d+8>>2]=4;q[d>>2]=b;c=a;b=q[a+8>>2];if((q[a+28>>2]-b|0)<=16){Mk(a,1);b=q[a+8>>2]}b=b+16|0;q[c+8>>2]=b;Ey(a,f+1|0,(b-q[a+12>>2]>>4)-1|0);b=a;a=q[a+8>>2]-(f<<4)|0;q[b+8>>2]=a;Ii=e+48|0;return q[a-16>>2]+16|0}function IN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=Ii-16|0;Ii=g;h=1;a:{b:{switch(b-a>>4){case 2:c=q[c>>2];i=q[c+12>>2];if(!i){break a}d=b-16|0;b=q[d>>2];c=q[c+8>>2];c:{while(1){if(!dj(b,q[c+(e<<2)>>2])){break c}e=e+1|0;if((i|0)!=(e|0)){continue}break}e=-1}b=q[a>>2];d:{while(1){if(!dj(b,q[c+(f<<2)>>2])){break d}f=f+1|0;if((i|0)!=(f|0)){continue}break}f=-1}if((e|0)>=(f|0)){break a}b=q[a+12>>2];q[g+8>>2]=q[a+8>>2];q[g+12>>2]=b;b=q[a+4>>2];q[g>>2]=q[a>>2];q[g+4>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b;a=q[g+12>>2];q[d+8>>2]=q[g+8>>2];q[d+12>>2]=a;a=q[g+4>>2];q[d>>2]=q[g>>2];q[d+4>>2]=a;break a;case 3:Jq(a,a+16|0,b-16|0,c);break a;case 4:zx(a,a+16|0,a+32|0,b-16|0,c);break a;case 5:vx(a,a+16|0,a+32|0,a+48|0,b-16|0,c);break a;case 0:case 1:break a;default:break b}}i=a+32|0;Jq(a,a+16|0,i,c);e:{f:{e=a+48|0;if((e|0)==(b|0)){break f}while(1){g:{j=i;i=e;d=q[c>>2];k=q[d+12>>2];h:{if(!k){break h}l=q[i>>2];h=q[d+8>>2];e=0;i:{while(1){if(!dj(l,q[h+(e<<2)>>2])){break i}e=e+1|0;if((k|0)!=(e|0)){continue}break}e=-1}d=q[j>>2];f=0;j:{while(1){if(!dj(d,q[h+(f<<2)>>2])){break j}f=f+1|0;if((k|0)!=(f|0)){continue}break}f=-1}if((e|0)>=(f|0)){break h}q[g+8>>2]=q[i+12>>2];d=q[i+8>>2];q[g>>2]=q[i+4>>2];q[g+4>>2]=d;h=i;while(1){k:{d=j;j=q[d+4>>2];q[h>>2]=q[d>>2];q[h+4>>2]=j;j=q[d+12>>2];q[h+8>>2]=q[d+8>>2];q[h+12>>2]=j;if((a|0)==(d|0)){d=a;break k}h=q[c>>2];m=q[h+12>>2];if(!m){break k}j=d-16|0;k=q[h+8>>2];e=0;l:{while(1){if(!dj(l,q[k+(e<<2)>>2])){break l}e=e+1|0;if((m|0)!=(e|0)){continue}break}e=-1}h=q[j>>2];f=0;m:{while(1){if(!dj(h,q[k+(f<<2)>>2])){break m}f=f+1|0;if((m|0)!=(f|0)){continue}break}f=-1}h=d;if((e|0)<(f|0)){continue}}break}q[d>>2]=l;j=q[g+4>>2];q[d+4>>2]=q[g>>2];q[d+8>>2]=j;q[d+12>>2]=q[g+8>>2];n=n+1|0;if((n|0)==8){break g}}e=i+16|0;if((e|0)!=(b|0)){continue}break f}break}f=(i+16|0)==(b|0);a=0;break e}a=1}h=a|f}Ii=g+16|0;return h&1}function fwa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=Ii-112|0;Ii=e;a:{if(!c|!d){break a}if((Dza(c<<2)|0)!=1){break a}if((Dza(d<<2)|0)!=1){break a}l=e+92|0;m=e+88|0;n=e+84|0;p=e+80|0;r=e+76|0;s=e+72|0;t=e+68|0;u=e- -64|0;v=e+60|0;x=e+56|0;y=e+52|0;z=e+48|0;A=e+32|12;B=e+32|8;C=e+32|4;j=KN(e+96|0,w(c,d));b:{while(1){E=w(c,k);f=1;i=0;c:{while(1){D=i+E|0;h=e+32|0;if(Aq((D<<4)+a|0,h)){f=e+24|0;o[f+3|0]=255;o[f+2|0]=255;o[f+1|0]=255;o[f|0]=255;g=e+16|0;o[g+3|0]=0;o[g+2|0]=0;o[g+1|0]=0;o[g|0]=0;Sk(e+8|0,f,h);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,h);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,C);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,C);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,B);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,B);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,A);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,A);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,z);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,z);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,y);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,y);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,x);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,x);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,v);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,v);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,u);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,u);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,t);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,t);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,s);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,s);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,r);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,r);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,p);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,p);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,n);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,n);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,m);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,m);q[e+16>>2]=q[e+8>>2];Sk(e+8|0,f,l);q[e+24>>2]=q[e+8>>2];Tk(e+8|0,g,l);q[e+16>>2]=q[e+8>>2];h=e+8|0;q[h>>2]=0;q[h+4>>2]=0;wwa(h,f);xwa(h,g);f=q[e+12>>2];q[El(j,D)>>2]=f;i=i+1|0;f=i>>>0>>0;if((c|0)!=(i|0)){continue}break c}break}if(f){break b}}k=k+1|0;if((k|0)!=(d|0)){continue}break}Ewa(a,El(j,0),b,c,d)}zq(j)}Ii=e+112|0}function Rsa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii-80|0;Ii=d;c=q[a+80>>2];a:{if(c){e=a+96|0;MM(c,e);if((c|0)==q[64058]){a=q[e>>2];q[b+144>>2]=-1;q[b+140>>2]=a;o[b+148|0]=0;break a}if((c|0)==q[64140]){q[b+12>>2]=Pk(4839);c=0;e=q[e>>2];if(e){g=Pk(e)}e=q[a+100>>2];if(e){c=Pk(e)}e=0;f=q[a+104>>2];if(f){h=Pk(f)}f=q[a+108>>2];if(f){e=Pk(f)}f=0;j=q[a+112>>2];if(j){i=Pk(j)}a=q[a+116>>2];if(a){f=Pk(a)}q[b+16>>2]=g;a=1;b:{if(!g|!r[g|0]){break b}q[b+20>>2]=c;a=2;if(!c|!r[c|0]){break b}q[b+24>>2]=h;a=3;if(!h|!r[h|0]){break b}q[b+28>>2]=e;a=4;if(!e|!r[e|0]){break b}q[b+32>>2]=i;a=5;if(!i|!r[i|0]){break b}q[b+36>>2]=f;a=6;if(!f){break b}a=r[f|0]?7:6}o[b+148|0]=0;q[b+8>>2]=a;q[b+144>>2]=1;break a}if((c|0)==q[64059]){break a}if((c|0)==q[64060]){if(!r[266420]){break a}o[b+240|0]=r[b+240|0]^1;break a}if((c|0)==q[64094]){q[b+500>>2]=q[a+100>>2];c=Mi[q[74931]](q[b+216>>2])|0;e=Mi[q[74932]](q[b+216>>2])|0;q[d+56>>2]=0;q[d+60>>2]=0;q[d+64>>2]=0;q[d+68>>2]=0;q[d+72>>2]=0;q[d+76>>2]=30;q[d+60>>2]=e;q[d+56>>2]=c;q[d+72>>2]=q[a+96>>2];q[d+76>>2]=q[a+104>>2];q[d+16>>2]=-3;Pi(4,1076,4639,d+16|0);q[b+488>>2]=0;break a}if((c|0)==q[64095]){if(q[b+488>>2]){a=q[b+492>>2];if(a){Ni(a)}q[b+488>>2]=0;q[b+492>>2]=0;break a}Pi(4,1076,4670,0);break a}if((c|0)==q[64174]){q[b+460>>2]=q[e>>2];break a}if((c|0)==q[56604]){Mi[q[74928]](q[b+216>>2]);break a}if((c|0)==q[64158]){a=q[e>>2];Mi[q[74941]](q[b+216>>2],(a|0)>0?a:0);break a}if((c|0)==q[56622]){a=q[b+288>>2];c=q[b+272>>2];if(c){xw(a,c,e);break a}xw(a,q[b+276>>2],e);xw(a,q[b+284>>2],e);xw(a,q[b+280>>2],e);break a}b=sm(q[a>>2],q[a+4>>2]);e=aj(q[a+16>>2],q[a+20>>2]);a=aj(q[a+24>>2],q[a+28>>2]);c=q[c+4>>2];q[d+48>>2]=a;q[d+44>>2]=e;q[d+40>>2]=b;q[d+36>>2]=2923;q[d+32>>2]=c;Pi(4,1076,4695,d+32|0);break a}b=sm(q[a>>2],q[a+4>>2]);c=aj(q[a+16>>2],q[a+20>>2]);q[d+12>>2]=aj(q[a+24>>2],q[a+28>>2]);q[d+8>>2]=c;q[d+4>>2]=b;q[d>>2]=2923;Pi(4,1076,4758,d)}Ii=d+80|0}function nqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-272|0;Ii=b;gj(a);d=_i(a,-1,q[71661],18049);Ri(a,-2);c=q[d+4>>2];q[b+264>>2]=0;q[b+268>>2]=0;q[b+256>>2]=0;q[b+260>>2]=0;q[b+248>>2]=0;q[b+252>>2]=0;q[b+240>>2]=0;q[b+244>>2]=0;qm(a,b+240|0);q[b+232>>2]=0;q[b+236>>2]=0;q[b+224>>2]=0;q[b+228>>2]=0;q[b+216>>2]=0;q[b+220>>2]=0;q[b+208>>2]=0;q[b+212>>2]=0;Gk(a,1,b+208|0,b+240|0);d=q[q[q[d+4>>2]+80>>2]+8>>2];a:{if(!d){break a}d=q[d>>2];if(!d){break a}f=q[d+3216>>2];e=q[d+3220>>2]}b:{if((f|0)!=q[b+208>>2]|(e|0)!=q[b+212>>2]){c=Qi(a,14874,0);break b}c:{if(uk(a,2)){d=Oi(uj(a,2,0));f=Li;break c}d=nl(a,2);f=Li}i=jn(q[q[c+80>>2]+8>>2],q[b+224>>2],q[b+228>>2]);if(!i){q[b>>2]=aj(q[b+224>>2],q[b+228>>2]);c=Qi(a,14935,b);break b}o[b+200|0]=0;q[b+192>>2]=0;c=0;if(q[a+8>>2]-q[a+12>>2]>>4>=3){Dj(a,3,5);ej(a,3);Zi(a,-1,14977);if(Vi(a,-1)){c=$j(a,-1);o[b+200|0]=255;q[b+192>>2]=c;q[b+196>>2]=Li;h=255}Ri(a,-2);Zi(a,-1,14981);d:{c=Vi(a,-1);if(!c){break d}if(h&1){c=Qi(a,14987,0);break b}if(!Oj(a,-1)){c=Qi(a,15040,0);break b}e=jj(a,-1);g=e-1|0;q[b+192>>2]=g;if((e|0)>0){break d}d=aj(d,f);q[b+68>>2]=g;q[b+64>>2]=d;c=Qi(a,15098,b- -64|0);break b}Ri(a,-2);Ri(a,-2);c=(c|0)!=0}e=Hp(b+80|0);g=q[b+204>>2];q[b+56>>2]=q[b+200>>2];q[b+60>>2]=g;g=q[b+196>>2];q[b+48>>2]=q[b+192>>2];q[b+52>>2]=g;e:{g=uq(i,q[b+232>>2],q[b+236>>2],d,f,b+48|0,e);if(g|c){break e}j=s[e+108>>1];if(j>>>0<8|j&2){break e}vj(a,0,0);f:{if(!(r[e+108|0]&2?0:h&1)){zB(a,e+32|0);break f}q[b+32>>2]=aj(d,f);c=Qi(a,18198,b+32|0);if((c|0)!=1){break b}}h=1;nk(a,-2,1);if(s[e+108>>1]<8){c=1;break b}while(1){c=q[b+204>>2];q[b+24>>2]=q[b+200>>2];q[b+28>>2]=c;q[b+192>>2]=h;c=q[b+196>>2];q[b+16>>2]=q[b+192>>2];q[b+20>>2]=c;c=yM(a,uq(i,q[b+232>>2],q[b+236>>2],d,f,b+16|0,e),e,d,f,b+208|0,b+192|0,0);if((c|0)!=1){break b}c=1;h=h+1|0;nk(a,-2,h);if(s[e+108>>1]>>>2>>>0>h>>>0){continue}break}break b}c=yM(a,g,e,d,f,b+208|0,b+192|0,c)}Ii=b+272|0;return c|0}function wN(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,s=x(0),v=0,y=0;if(r[b+21|0]){l=q[f>>2];k=q[e>>2];v=1;a:{b:{if((h|0)>=1){m=q[b>>2];y=w(d,g);while(1){g=q[a+1408>>2];c:{if((g|0)>9){break c}if(!g){q[a+1404>>2]=0}while(1){g=r[a+1388|0];d:{e:{f:{g:{h:{if(q[a+1396>>2]){if(g&255){break h}break c}if(g&255){break h}i=q[a+1392>>2];if((i|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break c}if(!(o[a+1387|0]&1)){break g}i=q[a+1392>>2]}j=i+1|0;q[a+1392>>2]=j;g=r[(a+i|0)+1132|0];if((g|0)!=255){q[a+1400>>2]=i;q[a+1396>>2]=1}if((j|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break f}o[a+1388|0]=g;if(!g){break c}}o[a+1388|0]=g-1;q[a+1412>>2]=q[a+1412>>2]+1;g=q[a+44>>2];i:{if(g){if(g>>>0>=t[a+52>>2]){break e}q[a+44>>2]=g+1;g=r[g|0];break i}g=wj(q[a+32>>2]);if((g|0)==-1){break e}}g=g&255;break d}q[a+112>>2]=32;break c}J(211824,211687,1555,211845);G()}q[a+108>>2]=1;g=0}i=q[a+1408>>2];q[a+1408>>2]=i+8;q[a+1404>>2]=q[a+1404>>2]+(g<>2];g=p[(((i&1023)<<1)+b|0)+36>>1];j:{if((g|0)>=0){n=i;i=r[g+q[b+8>>2]|0];q[a+1404>>2]=n>>>i;j=q[a+1408>>2]-i|0;i=(j|0)<0;q[a+1408>>2]=i?0:j;g=i?-1:g;break j}g=yq(a,b)}if((g|0)>=q[b+2092>>2]?r[b+23|0]:0){break a}if((g|0)<=-1){if(!r[a+1388|0]){v=0;if(q[a+1396>>2]){break b}}q[a+112>>2]=21;return 0}i=w(d,l);m=((i+m|0)+k|0)>(y|0)?(y-i|0)+k|0:m;i=w(g,q[b>>2]);k:{if(r[b+22|0]){if((m|0)<1){break k}n=q[b+28>>2];g=0;s=x(0);while(1){s=x(s+u[n+(g+i<<2)>>2]);j=q[(k<<2)+c>>2];if(j){j=j+(l<<2)|0;u[j>>2]=s+u[j>>2]}k=k+1|0;j=(k|0)==(d|0);k=j?0:k;l=j+l|0;g=g+1|0;if((m|0)!=(g|0)){continue}break}break k}g=0;if((m|0)<=0){break k}while(1){j=q[(k<<2)+c>>2];if(j){j=j+(l<<2)|0;u[j>>2]=u[j>>2]+x(u[q[b+28>>2]+(g+i<<2)>>2]+x(0))}k=k+1|0;j=(k|0)==(d|0);k=j?0:k;l=j+l|0;g=g+1|0;if((m|0)!=(g|0)){continue}break}}h=h-m|0;if((h|0)>0){continue}break}}q[e>>2]=k;q[f>>2]=l}return v}J(211968,211687,1878,212004);G()}q[a+112>>2]=21;return 0}function Wz(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0;p=Ii-32|0;Ii=p;a:{b:{c:{d:{e:{f:{h=q[a+4>>2];g:{if(!h){break g}h=q[q[a>>2]+(Cza(b,c,h)<<2)>>2];if((h|0)==-1){break g}i=q[a+8>>2];while(1){k=i+w(h,40)|0;if((b|0)==q[k>>2]&q[k+4>>2]==(c|0)){break f}h=q[k+32>>2];if((h|0)!=-1){continue}break}}h=q[a+24>>2];if((h|0)==((q[a+16>>2]-q[a+8>>2]|0)/40|0)){h=h+8|0;Rv(a,h,h<<1)}k=a+32|0;j=e+f|0;l=a+40|0;h=q[l>>2];n=a+36|0;i=q[n>>2];m=h-i>>4;if(j>>>0>m>>>0){if(o[a+44|0]&1){break c}Wi((j-m|0)+(h-q[k>>2]>>4)|0,16,k,l,n);i=q[n>>2];h=q[l>>2]}r=i;i=q[k>>2];l=r-i>>4;k=l+j|0;if(k>>>0>h-i>>4>>>0){break b}q[a+36>>2]=i+(k<<4);q[p+20>>2]=j;h=p;q[h+8>>2]=b;q[h+12>>2]=c;q[h+24>>2]=g;q[h+16>>2]=l;yA(a,b,c,h+8|0);g=0;h=q[a+4>>2];h:{if(!h){break h}h=q[q[a>>2]+(Cza(b,c,h)<<2)>>2];if((h|0)==-1){break h}i=q[a+8>>2];while(1){h=w(h,40);g=h+i|0;if((b|0)==q[g>>2]&(c|0)==q[g+4>>2]){break h}h=q[(h+i|0)+32>>2];if((h|0)!=-1){continue}break}g=0}n=g?g+8|0:0;break e}b=i+w(h,40)|0;r=b;k=q[b+20>>2];if(k){c=-5;if(q[b+24>>2]!=(g|0)){break d}}n=b+8|0;c=e+f|0;if(c>>>0<=k>>>0){break e}j=a+32|0;g=q[(i+w(h,40)|0)+16>>2];l=c-k|0;h=a+40|0;b=q[h>>2];i=a+36|0;m=q[i>>2];if(l>>>0>b-m>>4>>>0){if(o[a+44|0]&1){break c}Wi(l+(b-q[j>>2]>>4)|0,16,j,h,i);m=q[i>>2];b=q[h>>2]}j=q[j>>2];h=l+(m-j>>4)|0;if(h>>>0>b-j>>4>>>0){break b}q[i>>2]=j+(h<<4);if(g>>>0>=h>>>0){break a}i=0;b=j+(g<<4)|0;j=b+(c<<4)|0;b=b+(k<<4)|0;bl(j,Ui(b,0,j-b|0),h-(c+g|0)<<4);q[r+20>>2]=c;c=q[a+4>>2];if(!c){break e}k=l&2147483647;j=q[a>>2];while(1){h=q[j+(i<<2)>>2];if((h|0)!=-1){l=q[a+8>>2];while(1){b=l+w(h,40)|0;h=b;m=q[h+16>>2];if(m>>>0>g>>>0){q[h+16>>2]=k+m}h=q[b+32>>2];if((h|0)!=-1){continue}break}}i=i+1|0;if((c|0)!=(i|0)){continue}break}}b=q[n+8>>2];c=q[a+36>>2];a=q[a+32>>2];if(b>>>0>=c-a>>4>>>0){break a}Ti((a+(b<<4)|0)+(f<<4)|0,d,e<<4);c=0}Ii=p+32|0;return c}J(111496,111323,493,111227);G()}J(111304,111323,506,111379);G()}J(111387,111323,479,111398);G()}function Psa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=x(0),g=0,h=0,i=x(0),j=0,k=0,l=0,m=0,n=x(0),o=0,r=x(0),v=0,z=0,A=0,B=x(0);l=Ii-960|0;Ii=l;A=Mi[q[74934]](q[d+216>>2])|0;e=iM(l);q[e>>2]=a;q[e+4>>2]=b;u[e+8>>2]=u[c>>2];m=s[c+944>>1];a=m<<1;a=s[e+956>>1]&-1985|a&64|a&128|a&256|a&512|a&1024;p[e+956>>1]=a;i=u[d+484>>2];b=q[d+472>>2];n=x(u[d+480>>2]*x(t[d+468>>2]));f=x(q[c+12>>2]);u[e+12>>2]=n*x(f+x(.5));r=x(b>>>0);i=x(i*r);b=q[c+16>>2];u[e+16>>2]=r-x(i*x(x(b|0)+x(.5)));B=x(q[c+20>>2]);u[e+20>>2]=n*B;g=q[c+24>>2];u[e+36>>2]=B;u[e+32>>2]=A-b|0;u[e+28>>2]=f;f=x(0-g|0);u[e+40>>2]=f;u[e+24>>2]=i*f;u[e+44>>2]=u[c+28>>2];u[e+48>>2]=u[c+32>>2];u[e+52>>2]=u[c+36>>2];v=q[c+524>>2];q[e+540>>2]=v;if((v|0)>0){while(1){b=w(z,44);a=b+e|0;g=b+c|0;q[a+96>>2]=q[g+80>>2];b=q[g+76>>2];q[a+88>>2]=q[g+72>>2];q[a+92>>2]=b;j=g- -64|0;b=j;h=q[b+4>>2];q[a+80>>2]=q[b>>2];q[a+84>>2]=h;b=q[g+60>>2];q[a+72>>2]=q[g+56>>2];q[a+76>>2]=b;o=q[g+52>>2];b=a- -64|0;q[b>>2]=q[g+48>>2];q[b+4>>2]=o;h=q[g+44>>2];q[a+56>>2]=q[g+40>>2];q[a+60>>2]=h;q[a+96>>2]=q[g+80>>2];o=q[g+48>>2];f=x(n*x(x(o|0)+x(.5)));a:{if(x(y(f))>2]=h;b=a;h=q[g+52>>2];f=x(r-x(i*x(x(h|0)+x(.5))));b:{if(x(y(f))>2]=k;b=a;j=q[j>>2];f=x(n*x(j|0));c:{if(x(y(f))>2]=k;b=q[g+68>>2];q[a+88>>2]=j;q[a+76>>2]=A-h;q[a+72>>2]=o;b=0-b|0;q[a+92>>2]=b;f=x(i*x(b|0));d:{if(x(y(f))>2]=b;z=z+1|0;if((v|0)!=(z|0)){continue}break}a=s[e+956>>1]}b=q[c+784>>2];q[e+800>>2]=b;a=s[c+788>>1]<<5&32|a&-33;p[e+956>>1]=a;if((b|0)>=1){Ti(e+544|0,c+528|0,b);a=s[e+956>>1]}q[e+804>>2]=q[c+792>>2];Ti(e+812|0,c+800|0,144);p[e+956>>1]=m&16|(m&12|(m&3|a&65504));q[e+808>>2]=q[c+796>>2];a=q[d+164>>2];if((a|0)==q[d+168>>2]){J(4610,4554,533,4634);G()}q[d+164>>2]=a+960;Ti(a,l,958);Ii=l+960|0}function zr(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-96|0;Ii=e;a:{b:{c:{d:{if((b|0)==(c|0)){f=-8;break d}i=b&65535;g=q[a+32>>2];l=(q[a+36>>2]-g|0)/592|0;if(i>>>0>=l>>>0){break c}if(s[(w(i,592)+g|0)+568>>1]!=(b>>>16|0)){break b}k=65535;h=w(i,592)+g|0;m=s[h+570>>1];if((m|0)!=(b&65535)){break a}e:{if(!c){break e}b=c&65535;if(b>>>0>=l>>>0){break c}j=w(b,592)+g|0;if(s[j+568>>1]!=(c>>>16|0)){break b}k=s[j+570>>1];if((k|0)!=(c&65535)){break a}j=w(b,592)+g|0;b=s[j+576>>1];if((b|0)==65535){break e}while(1){b=b&65535;if((b|0)==(m|0)){f=-8;break d}if(b>>>0>=l>>>0){break c}b=s[(w(b,592)+g|0)+576>>1];if((b|0)!=65535){continue}break}}l=w(i,592)+g|0;if(s[l+576>>1]==(k|0)){break d}if(d){Cr(a,h,0,e);b=q[e+52>>2];c=q[e+48>>2];u[e+72>>2]=u[e+56>>2];q[e+64>>2]=c;q[e+68>>2]=b;PA(e+80|0,a,h,j,e- -64|0);c=q[e+88>>2];d=q[e+84>>2];u[h>>2]=u[e+80>>2];b=w(i,592)+g|0;q[b+12>>2]=1065353216;q[b+4>>2]=d;q[b+8>>2]=c;q[b+412>>2]=q[b+412>>2]|4194304}Br(a,h);c=65535;d=a+382|0;f=j+580|0;k=s[((k|0)==65535?d:f)>>1];b=0;f:{if((k|0)==65535){break f}b=q[a+32>>2];if(k>>>0>=(q[a+36>>2]-b|0)/592>>>0){break c}b=b+w(k,592)|0}if(j){c=s[j+570>>1];d=f;f=j+578|0}else{f=a+380|0}p[l+576>>1]=c;if(b){c=s[b+570>>1];g:{if((c|0)==s[d>>1]){p[d>>1]=s[h+570>>1];p[(w(i,592)+g|0)+574>>1]=65535;c=s[b+570>>1];break g}d=s[b+574>>1];if((d|0)==65535){break g}f=q[a+36>>2];a=q[a+32>>2];if(d>>>0>=(f-a|0)/592>>>0){break c}p[(a+w(d,592)|0)+572>>1]=s[h+570>>1];p[(w(i,592)+g|0)+574>>1]=d}p[b+574>>1]=s[h+570>>1];p[(w(i,592)+g|0)+572>>1]=c;f=0;break d}b=w(i,592)+g|0;p[b+572>>1]=65535;p[b+574>>1]=s[f>>1];b=s[f>>1];h:{if((b|0)==65535){b=s[h+570>>1];break h}c=q[a+36>>2];a=q[a+32>>2];if(b>>>0>=(c-a|0)/592>>>0){break c}a=a+w(b,592)|0;b=s[h+570>>1];p[a+572>>1]=b}p[f>>1]=b;f=0;if(s[d>>1]!=65535){break d}p[d>>1]=s[h+570>>1]}Ii=e+96|0;return f}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function iA(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,v=0;j=Ii-32|0;Ii=j;q[j+16>>2]=0;a:{b:{c:{c=q[a+4>>2];e=q[a>>2];d=c-e|0;if(!d){break c}d:{if((c|0)!=(e|0)){c=e-c|0;c=((c|0)>(d|0)?c:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(c,(d|0)<1?d:1);v=d>>>0>1?d:1;while(1){e:{f=q[(l<<2)+e>>2];if(!f){break e}h=q[f+4>>2];e=q[f>>2];m=h-e|0;if(!m){break e}d=1;g=(m|0)/304|0;n=g>>>0>1?g:1;f:{if(q[e+280>>2]){break f}while(1){c=d;if((c|0)!=(n|0)){d=c+1|0;if(!q[(w(c,304)+e|0)+280>>2]){continue}}break}if(c>>>0>>0){break f}if(!m){break e}if((e|0)!=(h|0)){c=g>>>0>1?g:1;d=0;while(1){e=w(d,304)+e|0;q[e+260>>2]=0;g=q[q[f+64>>2]+16>>2];if(t[g+4>>2]<=d>>>0){break a}YH(f,e,q[g>>2]+w(d,160)|0,b);d=d+1|0;if((c|0)==(d|0)){break e}e=q[f>>2];if((q[f+4>>2]-e|0)/304>>>0>d>>>0){continue}break}}break b}u[f+76>>2]=u[f+76>>2]+b;if((e|0)!=(h|0)){m=s[f+80>>1]<<16|l;g=q[f+64>>2];d=0;while(1){k=q[g>>2];if((q[g+4>>2]-k|0)/18568>>>0<=d>>>0){break b}h=q[g+16>>2];if(t[h+4>>2]<=d>>>0){break a}c=w(d,304)+e|0;h=q[h>>2]+w(d,160)|0;YH(f,c,h,b);e=k+w(d,18568)|0;jA(f,e,c,h,b);k=q[c+56>>2];i=q[c+60>>2];q[j+24>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;k=(i-k|0)/160|0;i=q[e+18552>>2];g:{if(!i){break g}if(Mi[204](i,q[e+18544>>2],q[e+18548>>2],c)|0){i=r[c+296|0];if(i&2){break g}o[c+296|0]=i|2;e=e+18544|0;q[j>>2]=aj(q[e>>2],q[e+4>>2]);Pi(3,150692,151624,j);break g}if(q[c+52>>2]!=56){break d}o[c+296|0]=r[c+296|0]&253}ZH(m,d,f,c,h);if(r[c+296|0]&16){mA(c)}p=k+p|0;d=d+1|0;if((n|0)==(d|0)){break e}e=q[f>>2];if((q[f+4>>2]-e|0)/304>>>0>d>>>0){continue}break}}break b}l=l+1|0;if((v|0)==(l|0)){break c}e=q[a>>2];if(q[a+4>>2]-e>>2>>>0>l>>>0){continue}break}}break b}J(151662,150916,758,151609);G()}q[210794]=p;Ii=j+32|0;return}J(151947,151192,479,151403);G()}J(151361,151373,270,151403);G()}function ds(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{if(q[a+18368>>2]>15){break a}while(1){c=0;b:{if(q[a+18376>>2]){break b}d=q[a>>2];e=q[d+172>>2];c:{if(e>>>0>2]){q[d+172>>2]=e+1;c=r[e|0];break c}if(!q[d+32>>2]){break b}e=d+40|0;c=Mi[q[d+16>>2]](q[d+28>>2],e,q[d+36>>2])|0;q[d+168>>2]=q[d+168>>2]+(q[d+172>>2]-q[d+180>>2]|0);d:{if(!c){o[d+40|0]=0;q[d+32>>2]=0;e=d+41|0;c=0;break d}e=c+e|0;c=r[d+40|0]}q[d+176>>2]=e;q[d+172>>2]=d+41}if((c|0)!=255){break b}c=q[a>>2];d=q[c+172>>2];e:{if(d>>>0>2]){q[c+172>>2]=d+1;d=r[d|0];break e}if(!q[c+32>>2]){d=0;break e}e=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],e,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);f:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break f}e=d+e|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41}while(1){c=255;e=d&255;if((e|0)!=255){if(!e){break b}q[a+18376>>2]=1;o[a+18372|0]=d;break a}c=q[a>>2];d=q[c+172>>2];if(d>>>0>2]){q[c+172>>2]=d+1;d=r[d|0];continue}d=0;if(!q[c+32>>2]){continue}e=c+40|0;d=Mi[q[c+16>>2]](q[c+28>>2],e,q[c+36>>2])|0;q[c+168>>2]=q[c+168>>2]+(q[c+172>>2]-q[c+180>>2]|0);g:{if(!d){o[c+40|0]=0;q[c+32>>2]=0;e=c+41|0;d=0;break g}e=d+e|0;d=r[c+40|0]}q[c+176>>2]=e;q[c+172>>2]=c+41;continue}}d=q[a+18368>>2];q[a+18368>>2]=d+8;q[a+18364>>2]=q[a+18364>>2]|c<<24-d;if((d|0)<17){continue}break}}h:{e=q[a+18364>>2];c=r[(e>>>23|0)+b|0];i:{if((c|0)!=255){f=q[a+18368>>2];c=b+c|0;b=r[c+1280|0];d=-1;if((f|0)<(b|0)){break i}q[a+18368>>2]=f-b;q[a+18364>>2]=e<>>16|0;d=10;while(1){c=d;d=c+1|0;if(f>>>0>=t[((c<<2)+b|0)+1540>>2]){continue}break}f=q[a+18368>>2];if((c|0)==17){q[a+18368>>2]=f-16;return-1}d=-1;if((c|0)>(f|0)){break i}d=c<<2;d=(q[d+169552>>2]&e>>>32-c)+q[(b+d|0)+1612>>2]|0;g=d+b|0;h=r[g+1280|0];if((e>>>32-h&q[(h<<2)+169552>>2])!=s[((d<<1)+b|0)+512>>1]){break h}q[a+18364>>2]=e<>2]=f-c;d=r[g+1024|0]}return d}J(169620,169198,2074,169702);G()}function $w(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0,p=0,q=0,s=0,t=0,u=0;k=Zt(g);a:{b:{c:{d:{e:{f:{if(!r[a+585|0]){break f}if(!_w(b,c)){break f}j=r[b+65|0]|r[b+66|0]<<8|(r[b+67|0]<<16|r[b+68|0]<<24);l=r[b+21|0]|r[b+22|0]<<8;m=eC(b,d);if((m|0)<0){break f}d=b+j|0;p=l&4;g:{if(r[b+20|0]){break g}if(o[(d+w(m,23)|0)+4|0]&1){break f}if(!p){break g}j=m+1|0;if(j>>>0>=(r[b+14|0]|(r[b+15|0]<<8|r[b+16|0]<<16))>>>0){break f}l=d+w(j,23)|0;if(!(o[l+4|0]&1)){break f}n=d+w(m,23)|0;if((r[n+9|0]|r[n+10|0]<<8)!=(r[l+9|0]|r[l+10|0]<<8)){break f}l=d+w(m,23)|0;j=d+w(j,23)|0;if((r[l+11|0]|r[l+12|0]<<8)!=(r[j+11|0]|r[j+12|0]<<8)){break f}}j=d+w(m,23)|0;l=j;n=j+9|0;q=r[n|0]|r[n+1|0]<<8;s=r[j+11|0]|r[j+12|0]<<8;n=(g|0)==9?p?9:8:g;h:{if((n&-2)!=8){break h}g=w(q,s);if(g>>>0>=f>>>0){break h}Ui(w(g,k)+e|0,0,w(k,f-g|0))}if(r[b+20|0]==1){a=d+w(m,23)|0;return axa(n,e,f,b,c,r[l+9|0]|r[l+10|0]<<8,r[j+11|0]|r[j+12|0]<<8,r[a+5|0]|r[a+6|0]<<8,r[a+7|0]|r[a+8|0]<<8,r[a+13|0]|r[a+14|0]<<8|(r[a+15|0]<<16|r[a+16|0]<<24),r[a+17|0]|r[a+18|0]<<8|(r[a+19|0]<<16|r[a+20|0]<<24),(p|0)!=0,h,i)}g=d+w(m,23)|0;if(o[g+4|0]&1){break e}k=p?g+23|0:0;if(k){if(!(o[k+4|0]&1)){break d}if((r[l+9|0]|r[l+10|0]<<8)!=(r[k+9|0]|r[k+10|0]<<8)){break c}if((r[j+11|0]|r[j+12|0]<<8)!=(r[k+11|0]|r[k+12|0]<<8)){break b}if(r[(d+w(m,23)|0)+3|0]!=r[k+3|0]){break a}}l=r[l+9|0]|r[l+10|0]<<8;j=r[j+11|0]|r[j+12|0]<<8;d=d+w(m,23)|0;m=r[d+5|0]|r[d+6|0]<<8;q=r[d+7|0]|r[d+8|0]<<8;s=r[d+3|0];t=r[d+13|0]|r[d+14|0]<<8|(r[d+15|0]<<16|r[d+16|0]<<24);u=r[d+17|0]|r[d+18|0]<<8|(r[d+19|0]<<16|r[d+20|0]<<24);g=0;d=0;if(k){g=r[k+13|0]|r[k+14|0]<<8|(r[k+15|0]<<16|r[k+16|0]<<24);d=r[k+17|0]|r[k+18|0]<<8|(r[k+19|0]<<16|r[k+20|0]<<24)}q=bxa(a,n,e,f,b,c,l,j,m,q,s,t,u,g,d,(p|0)!=0,r[b+23|0]==3,h,i)}return q}J(97156,96899,10803,97210);G()}J(97232,96899,10808,97210);G()}J(97292,96899,10809,97210);G()}J(97357,96899,10810,97210);G()}J(97422,96899,10811,97210);G()}function d4(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=x(0),g=x(0),h=x(0),i=0,j=x(0),k=x(0),l=0,m=x(0),n=x(0);c=Ii-192|0;Ii=c;b=Ll(a,1);a:{if((b|0)==q[210436]){break a}e=1;if((b|0)==q[210437]){break a}e=2;if((b|0)==q[210438]){break a}e=3;if((b|0)==q[210439]){break a}e=(b|0)==q[210440]?4:5}b=Ll(a,2);l=q[210436];b:{if((b|0)==(l|0)){break b}i=1;if((b|0)==q[210437]){break b}i=2;if((b|0)==q[210438]){break b}i=3;if((b|0)==q[210439]){break b}i=(b|0)==q[210440]?4:5}c:{if((e|0)!=(i|0)){q[c+180>>2]=135666;q[c+176>>2]=134064;a=Qi(a,135915,c+176|0);break c}d:{switch(e|0){case 0:b=_i(a,1,l,0);f=u[b>>2];g=u[b+4>>2];e:{if(!(f!=f|g!=g)){d=u[b+8>>2];if(d==d){break e}}d=u[b+8>>2];v[c- -64>>3]=g;v[c+72>>3]=d;v[c+56>>3]=f;q[c+48>>2]=1;Qi(a,134131,c+48|0)}e=_i(a,2,q[210436],0);f=u[e>>2];g=u[e+4>>2];f:{if(!(f!=f|g!=g)){d=u[e+8>>2];if(d==d){break f}}d=u[e+8>>2];v[c+32>>3]=g;v[c+40>>3]=d;v[c+24>>3]=f;q[c+16>>2]=2;Qi(a,134131,c+16|0);d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}h=u[b+8>>2];j=u[b>>2];k=u[b+4>>2];b=yj(a,16);u[b+8>>2]=h*d;u[b+4>>2]=k*g;u[b>>2]=j*f;Zi(a,-1e4,134e3);xj(a,-2);a=1;break c;case 1:b=_i(a,1,q[210437],0);f=u[b>>2];g=u[b+4>>2];g:{h:{if(f!=f|g!=g){break h}d=u[b+8>>2];if(d!=d){break h}d=u[b+12>>2];if(d==d){break g}}d=u[b+8>>2];h=u[b+12>>2];v[c+144>>3]=g;v[c+160>>3]=h;v[c+152>>3]=d;v[c+136>>3]=f;q[c+128>>2]=1;Qi(a,134221,c+128|0)}e=_i(a,2,q[210437],0);f=u[e>>2];g=u[e+4>>2];i:{j:{if(f!=f|g!=g){break j}d=u[e+8>>2];if(d!=d){break j}h=u[e+12>>2];if(h==h){break i}}d=u[e+8>>2];h=u[e+12>>2];v[c+96>>3]=g;v[c+112>>3]=h;v[c+104>>3]=d;v[c+88>>3]=f;q[c+80>>2]=2;Qi(a,134221,c+80|0);h=u[e+12>>2];d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}j=u[b+12>>2];k=u[b>>2];m=u[b+4>>2];n=u[b+8>>2];b=yj(a,16);u[b+12>>2]=j*h;u[b+8>>2]=n*d;u[b+4>>2]=m*g;u[b>>2]=k*f;Zi(a,-1e4,134016);xj(a,-2);a=1;break c;default:break d}}q[c+12>>2]=134016;q[c+8>>2]=134e3;q[c+4>>2]=135666;q[c>>2]=134064;a=Qi(a,135879,c)}Ii=c+192|0;return a|0}function sN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-112|0;Ii=c;i=q[a+4>>2];e=q[a+48>>2];h=Bm(e,10,0,0,0);q[c+100>>2]=0;q[c+104>>2]=0;q[c+108>>2]=0;q[c+96>>2]=b;q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=h;q[b>>2]=11;q[c+88>>2]=-1;q[c+92>>2]=-1;q[c+80>>2]=0;q[c+72>>2]=0;Mm(q[a+48>>2],b);if(q[a+16>>2]!=123){b=q[a+52>>2];q[c+64>>2]=tl(a,123);Sj(a,oj(b,141919,c- -64|0))}Vj(a);a:{if(q[a+16>>2]==125){break a}b=0;while(1){b:{if(!b){break b}Mm(e,c+72|0);q[c+72>>2]=0;if(q[c+108>>2]!=50){break b}Jy(e,q[q[c+96>>2]+8>>2],q[c+104>>2],50);q[c+108>>2]=0}c:{d:{b=q[a+16>>2];if((b|0)!=91){if((b|0)!=285){break d}q[a+32>>2]=xF(a,a+40|0);if(q[a+32>>2]!=61){pl(a,c+72|0,0);f=c;b=q[c+104>>2];if((b|0)>=2147483646){b=q[a+48>>2];d=q[b+16>>2];g=q[q[b>>2]+60>>2];e:{if(!g){q[c+32>>2]=2147483645;q[c+36>>2]=142041;d=oj(d,142064,c+32|0);break e}q[c+52>>2]=2147483645;q[c+48>>2]=g;q[c+56>>2]=142041;d=oj(d,142098,c+48|0)}gm(q[b+12>>2],d,0);b=q[c+104>>2]}q[f+104>>2]=b+1;q[c+108>>2]=q[c+108>>2]+1;break c}OD(a,c+72|0);break c}OD(a,c+72|0);break c}pl(a,c+72|0,0);f=c;b=q[c+104>>2];if((b|0)>=2147483646){b=q[a+48>>2];d=q[b+16>>2];g=q[q[b>>2]+60>>2];f:{if(!g){q[c>>2]=2147483645;q[c+4>>2]=142041;d=oj(d,142064,c);break f}q[c+20>>2]=2147483645;q[c+16>>2]=g;q[c+24>>2]=142041;d=oj(d,142098,c+16|0)}gm(q[b+12>>2],d,0);b=q[c+104>>2]}q[f+104>>2]=b+1;q[c+108>>2]=q[c+108>>2]+1}b=q[a+16>>2]-44|0;if(!(!b|(b|0)==15)){break a}Vj(a);if(q[a+16>>2]==125){break a}b=q[c+72>>2];continue}}Yo(a,125,123,i);a=q[c+108>>2];g:{if(!a){break g}h:{switch(q[c+72>>2]){case 13:case 14:Vu(e,c+72|0,-1);Jy(e,q[q[c+96>>2]+8>>2],q[c+104>>2],-1);q[c+104>>2]=q[c+104>>2]-1;break g;default:Mm(e,c+72|0);a=q[c+108>>2];break;case 0:break h}}Jy(e,q[q[c+96>>2]+8>>2],q[c+104>>2],a)}a=h<<2;b=q[a+q[q[e>>2]+12>>2]>>2]&8388607|hF(q[c+104>>2])<<23;q[a+q[q[e>>2]+12>>2]>>2]=b;f=hF(q[c+100>>2]);q[a+q[q[e>>2]+12>>2]>>2]=f<<14&8372224|b&-8372225;Ii=c+112|0}function b6(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-3152|0;Ii=g;a:{b:{h=q[a+16>>2];c:{if(!h){break c}h=q[q[a+12>>2]+(Cza(b,c,h)<<2)>>2];if((h|0)==-1){break c}k=q[q[q[a>>2]+8>>2]>>2];j=q[a+20>>2];while(1){i=w(h,24)+j|0;if((b|0)==q[i>>2]&q[i+4>>2]==(c|0)){break b}h=q[i+16>>2];if((h|0)!=-1){continue}break}}q[g>>2]=d;Pi(4,32178,32723,g);d=-2;break a}i=w(h,24)+j|0;c=q[i+8>>2];b=q[c+4>>2];l=q[(k<<2)+30880>>2]>>>3|0;c=q[c>>2];Av(c,b,g+592|0,b<<1|1);d=f-16|0;q[g+580>>2]=d;q[g+584>>2]=e;e=e+16|0;q[g+576>>2]=e;f7(k,e,d,g- -64|0);d:{e:{if(!q[a>>2]){d=-4;break e}d=-5;if(!U6(g- -64|0,l,c,b)){break d}}q[g+20>>2]=d;q[g+16>>2]=c;Pi(4,32178,32760,g+16|0);break a}d=a+44|0;nr(d,g+1104|0);vv(d,g+2128|0);f:{if(bm(g+1104|0)){break f}b=dl(g+1104|0,32826);if(!b){Pi(4,32178,32830,0);break f}rk(b)}g:{if(bm(g+2128|0)){break g}b=dl(g+2128|0,32826);if(!b){Pi(4,32178,32830,0);break g}rk(b)}c=q[a>>2];b=q[c>>2];if(!b){e=q[a+4>>2];b=$i(24);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[c>>2]=b;f=$i(48);L6(f);b=q[c>>2];q[b+4>>2]=f;q[b+8>>2]=Ui($i(1048),0,1048);o[b+20|0]=r[b+20|0]|1;b=q[q[c>>2]+4>>2];c=q[q[e>>2]+4>>2];q[b>>2]=q[c>>2];q[b+28>>2]=q[c+28>>2];e=q[c+44>>2];q[b+40>>2]=q[c+40>>2];q[b+44>>2]=e;e=q[c+36>>2];q[b+32>>2]=q[c+32>>2];q[b+36>>2]=e;b=q[q[a>>2]>>2]}b=q[b+8>>2];if(!q[b+1032>>2]){vv(d,g+1104|0);c=dl(g+1104|0,32826);if(!c){Pi(4,32178,32872,0)}Pj(b,g+1104|0,1024);q[g+48>>2]=b;Pi(2,32178,32919,g+48|0);q[b+1036>>2]=0;q[b+1040>>2]=0;q[b+1032>>2]=c;o[b+1044|0]=0}nr(d,g+1104|0);Zk(g+1104|0,32486,1024);b=H6(q[q[a>>2]>>2],g+1104|0,g- -64|0,l<<1,g+576|0,g+2128|0);if(!b){G6(q[q[a>>2]>>2],q[g+2128>>2]);q[a+8>>2]=q[q[a>>2]>>2]}c=(w(h,24)+j|0)+12|0;h:{if(q[c>>2]){break h}d=q[a+8>>2];a=q[i+8>>2];if(!Oz(d,q[a>>2],q[a+4>>2],c)){break h}q[g+32>>2]=q[q[i+8>>2]+8>>2];Pi(4,32178,32195,g+32|0)}d=b?-3:0}Ii=g+3152|0;return d|0}function wR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=Ii-96|0;Ii=c;e=q[q[a+68>>2]+1120>>2];q[c+92>>2]=0;a:{b:{c:{switch(q[e+16>>2]-1|0){case 0:q[a+4>>2]=q[a+4>>2]+1;break a;case 8:case 9:d=QR(a);if(d){Xj(a,2,40);break a}break b;default:break c}}d=_n(a);if(d){break a}if(q[a+128>>2]!=22){Xj(a,2,10);d=-30464;break a}b=q[a+120>>2];d:{if(r[b|0]!=12){e:{switch(q[e+16>>2]-5|0){case 0:case 2:q[a+176>>2]=1;break d;default:break e}}Xj(a,2,10);d=-30464;break a}q[c+92>>2]=b+(r[q[a>>2]+184|0]&2?12:4);h=b+q[a+168>>2]|0;g=q[e+16>>2];if(g-5>>>0<=3){if(vR(c+92|0,h)){Xj(a,2,47);d=-31488;break a}g=q[e+16>>2]}d=-27648;if(g>>>0>8){break a}f:{b=1<>2]-2>>>0>=3){break d}g=0;q[c+12>>2]=0;q[c+8>>2]=0;k=q[a+120>>2];l=r[q[a>>2]+184|0]&2?12:4;i=q[c+92>>2];b=q[a+20>>2];g:{h:{if((b|0)==3){if(tR(a,c+92|0,h,c+12|0,c+8|0)){Xj(a,2,47);d=-31488;break g}b=q[e+16>>2]-1|0;i:{if(b>>>0<=9){b=q[(b<<2)+181084>>2];break i}b=0}e=q[c+8>>2];if((b|0)==(e|0)){break h}Xj(a,2,47);d=-31488;break g}if((b|0)>2){break g}b=c;e=q[e+16>>2]-1|0;j:{if(e>>>0<=9){e=q[(e<<2)+181084>>2];break j}e=0}q[b+8>>2]=e;if((e|0)!=4){break h}q[c+12>>2]=4;e=4}b=q[c+92>>2];if(b>>>0>h-2>>>0){Xj(a,2,50);d=-31488;break g}f=r[b|0];j=r[b+1|0];b=b+2|0;q[c+92>>2]=b;j=f<<8|j;if((b|0)!=(h-j|0)){Xj(a,2,50);d=-31488;break g}f=k+l|0;b=i-f|0;i=q[c+12>>2];k:{if(!i){q[c+88>>2]=36;d=UV(a,c+16|0,f,b);if(!d){break k}break g}d=TV(a,c+16|0,c+88|0,f,b,i);if(d){break g}}b=q[q[a+64>>2]+96>>2];if(!b){d=-27648;break g}d=0;f=b+204|0;l:{if(!f){break l}b=q[f>>2];if(!b){break l}d=Mi[q[b+12>>2]](e)|0}if(!d){Xj(a,2,40);d=-27904;break g}d=mE(f,i,c+16|0,q[c+88>>2],q[c+92>>2],j);if(!d){g=1;break g}Xj(a,2,51)}if(!g){break a}}}q[a+4>>2]=q[a+4>>2]+1;d=0}Ii=c+96|0;return d}function cha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-192|0;Ii=b;g=q[a+8>>2]-q[a+12>>2]>>4;c=q[q[jk(a)+80>>2]+8>>2];q[b+176>>2]=0;q[b+180>>2]=0;q[b+168>>2]=0;q[b+172>>2]=0;q[b+160>>2]=0;q[b+164>>2]=0;q[b+152>>2]=0;q[b+156>>2]=0;d=1;Ml(a,1,c,81003,b+188|0,b+152|0,0);f=q[b+188>>2];c=$j(a,2);e=Li;h=e;i=oB(f,c,e);a:{if((i|0)==-1){q[b>>2]=aj(c,h);Pi(4,81369,81377,b);c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=0;q[a+8>>2]=q[a+8>>2]+16;if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(81404,81141,238,81429);G()}h=jj(a,3);j=jj(a,4);b:{d=jj(a,5);if((d|0)>=0){e=d;c=q[f+152>>2];if(!c){c=q[q[f+156>>2]>>2]}if(s[q[c+64>>2]+28>>1]>=(e|0)){break b}}q[b+16>>2]=d;d=Qi(a,81445,b+16|0);break a}mB(f,b+148|0,b+144|0,b+140|0,b+136|0);c=q[f+156>>2];q[b+132>>2]=(h-1|0)-q[c+36>>2];q[b+128>>2]=(j-1|0)-q[c+40>>2];c:{c=q[b+132>>2];d:{if((c|0)<0|(c|0)>=q[b+140>>2]){break d}c=q[b+128>>2];if((c|0)<0){break d}if((c|0)>2]){break c}}Pi(4,81369,81503,0);d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=0;q[a+8>>2]=q[a+8>>2]+16;d=1;if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(81404,81141,274,81429);G()}e:{if(!(!Oj(a,6)|(g|0)!=6)){e=jj(a,6);c=e>>31;c=c^c+e;if(!(c&248)){break e}q[b+48>>2]=d;d=Qi(a,81568,b+48|0);break a}c=(Uj(a,6)|0)!=0;c=Uj(a,7)?c|2:c}d=d-1|0;e=c&255;Iha(f,i,q[b+132>>2],q[b+128>>2],d,e);q[b+120>>2]=0;q[b+124>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;if(qm(a,b+96|0)){q[b+72>>2]=q[b+132>>2];q[b+64>>2]=i;q[b+76>>2]=d;q[b+68>>2]=q[b+128>>2];d=1;q[b+80>>2]=c&1;q[b+88>>2]=e>>>2&1;q[b+84>>2]=e>>>1&1;c=q[60558];e=q[c+8>>2];f=q[c+12>>2];q[b+176>>2]=0;q[b+180>>2]=0;c=vk(b+96|0,b+152|0,e,f,0,c,b- -64|0,28);if(c){q[b+32>>2]=q[q[60558]+4>>2];q[b+36>>2]=c;Pi(4,81369,81636,b+32|0)}c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=1;q[a+8>>2]=q[a+8>>2]+16;if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(81404,81141,333,81429);G()}d=Qi(a,81681,0)}Ii=b+192|0;return d|0}function Jha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,r=0;b=Ii-448|0;Ii=b;j=q[a+8>>2]-q[a+12>>2]>>4;f=$j(a,1);g=Li;Dj(a,2,5);c=np(a,78140);e=np(a,78145);k=np(a,77433);l=np(a,77439);Xi(a,78922);ik(a,2);m=mp(a,78922,0);Ri(a,-2);Xi(a,78929);ik(a,2);h=mp(a,78929,-1);Ri(a,-2);Xi(a,78931);ik(a,2);i=mp(a,78931,-1);Ri(a,-2);a:{b:{c:{d:{if(!(Mi[q[75007]](q[74446],e)|0)){d=b;if(e>>>0<=29){c=q[(e<<2)+245844>>2]}else{c=87439}q[d+64>>2]=c;d=Qi(a,78473,b- -64|0);break d}if(c&-3){d=b;if(c>>>0<=2){c=q[(c<<2)+245820>>2]}else{c=86458}q[d+48>>2]=c;d=Qi(a,78933,b+48|0);break d}Xi(a,78221);ik(a,2);d=-1;n=mp(a,78221,0);Ri(a,-2);r=gt(a,3);q[b+188>>2]=0;q[b+184>>2]=0;Wo(q[r>>2],b+188|0,b+184|0);q[b+176>>2]=0;q[b+180>>2]=0;q[b+168>>2]=0;q[b+172>>2]=0;q[b+160>>2]=0;q[b+164>>2]=0;q[b+152>>2]=0;q[b+156>>2]=0;q[b+144>>2]=0;q[b+148>>2]=0;q[b+136>>2]=0;q[b+140>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;q[b+120>>2]=0;q[b+124>>2]=0;q[b+108>>2]=1;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=b+120;if(c>>>0>=3){break c}q[b+116>>2]=1;q[b+132>>2]=l;q[b+128>>2]=k;q[b+124>>2]=l;q[b+120>>2]=k;q[b+112>>2]=q[(c<<2)+79468>>2];d=e>>>0<=29?q[(e<<2)+79480>>2]:d;e=q[b+184>>2];q[b+160>>2]=e;q[b+180>>2]=1;q[b+152>>2]=1;q[b+144>>2]=1;q[b+168>>2]=0;q[b+172>>2]=0;q[b+164>>2]=n;q[b+136>>2]=d;q[b+156>>2]=q[b+188>>2];d=0;q[b+100>>2]=0;q[b+96>>2]=(e>>>0)/(((c|0)==2?6:1)>>>0);q[b+176>>2]=b+96;q[b+148>>2]=b+96;q[b+140>>2]=b+100;o[b+88|0]=m&31|((h&i)!=-1)<<6|32;p[b+86>>1]=(i|0)>0?i:0;p[b+84>>1]=(h|0)>0?h:0;q[b+80>>2]=b+104;c=O6(q[74445],f,g,b+80|0);e=q[a+8>>2]-q[a+12>>2]>>4;if(c){if((e|0)!=(j|0)){break b}q[b+32>>2]=aj(f,g);q[b+24>>2]=f;q[b+28>>2]=g;q[b+16>>2]=c;sj(b+192|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+16|0);q[b>>2]=b+192;d=Qi(a,75832,b);break d}if((e|0)!=(j|0)){break a}}Ii=b+448|0;return d|0}J(77974,76581,550,78666);G()}J(76560,76581,1115,78987);G()}J(76560,76581,1119,78987);G()}function Co(a,b,c){var d=0,e=0;d=Ii-144|0;Ii=d;a:{if((Jj(c,1)|0)<1){e=-4;break a}q[d+120>>2]=0;q[d+112>>2]=1;q[d+116>>2]=0;q[d+104>>2]=0;q[d+96>>2]=1;q[d+100>>2]=0;q[d+88>>2]=0;q[d+80>>2]=1;q[d+84>>2]=0;e=d- -64|0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;q[d+136>>2]=0;q[d+128>>2]=1;q[d+132>>2]=0;q[d+56>>2]=0;q[d+48>>2]=1;q[d+52>>2]=0;q[d+40>>2]=0;q[d+32>>2]=1;q[d+36>>2]=0;q[d+24>>2]=0;q[d+16>>2]=1;q[d+20>>2]=0;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;e=ws(d+128|0,b,c);b:{if(e){break b}e=-14;if(Jj(d+128|0,1)){break b}e=gl(d+112|0,b,c);if(e){break b}e=wk(d+96|0,d+112|0);if(e){break b}e=wk(d+48|0,c);if(e){break b}e=wk(d+32|0,c);if(e){break b}e=Bk(d+80|0,1);if(e){break b}e=Bk(d- -64|0,0);if(e){break b}e=Bk(d+16|0,0);if(e){break b}e=Bk(d,1);if(e){break b}while(1){if(!(o[q[d+104>>2]]&1)){e=kl(d+96|0,1);if(e){break b}if(!(o[q[d+72>>2]]&1?0:!(o[q[d+88>>2]]&1))){e=Rl(d+80|0,d+80|0,d+48|0);if(e){break b}e=yl(d- -64|0,d- -64|0,d+112|0);if(e){break b}}e=kl(d+80|0,1);if(e){break b}e=kl(d- -64|0,1);if(!e){continue}break b}while(1){if(!(o[q[d+40>>2]]&1)){e=kl(d+32|0,1);if(e){break b}if(!(o[q[d+8>>2]]&1?0:!(o[q[d+24>>2]]&1))){e=Rl(d+16|0,d+16|0,d+48|0);if(e){break b}e=yl(d,d,d+112|0);if(e){break b}}e=kl(d+16|0,1);if(e){break b}e=kl(d,1);if(!e){continue}break b}break}c:{if((_j(d+96|0,d+32|0)|0)>=0){e=yl(d+96|0,d+96|0,d+32|0);if(e){break b}e=yl(d+80|0,d+80|0,d+16|0);if(e){break b}e=yl(d- -64|0,d- -64|0,d);if(!e){break c}break b}e=yl(d+32|0,d+32|0,d+96|0);if(e){break b}e=yl(d+16|0,d+16|0,d+80|0);if(e){break b}e=yl(d,d,d- -64|0);if(e){break b}}if(Jj(d+96|0,0)){continue}break}while(1){if((Jj(d+16|0,0)|0)>-1){while(1){if((_j(d+16|0,c)|0)>=0){e=yl(d+16|0,d+16|0,c);if(!e){continue}break b}break}e=wk(a,d+16|0);break b}e=Rl(d+16|0,d+16|0,c);if(!e){continue}break}}ij(d+112|0);ij(d+96|0);ij(d+80|0);ij(d- -64|0);ij(d+128|0);ij(d+48|0);ij(d+32|0);ij(d+16|0);ij(d)}Ii=d+144|0;return e}function hM(a,b,c){var d=0,e=0,f=0;d=Ii-32|0;Ii=d;q[c+4>>2]=-2;q[c+8>>2]=-2;q[c+28>>2]=-2;q[c+20>>2]=-2;q[c+24>>2]=-2;q[c+12>>2]=-2;q[c+16>>2]=-2;f=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{c:{d:{e:{f:{if(!pv(a,b)){rj(a,-1e4,q[c+48>>2]);yk(a);e=Pm(a,0,0);if(e){break c}Zi(a,-10002,q[56656]);g:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226624;break b}q[c+4>>2]=zk(a,-1e4);break g}q[c+4>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56657]);if(!Vi(a,-1)){break e}if((Vi(a,-1)|0)==6){break f}c=226628;break b}q[d+16>>2]=uj(a,-1,0);Pi(4,14825,19494,d+16|0);Ri(a,-2);b=0;break a}q[c+8>>2]=zk(a,-1e4);break d}q[c+8>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56658]);h:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226632;break b}q[c+12>>2]=zk(a,-1e4);break h}q[c+12>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56659]);i:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226636;break b}q[c+16>>2]=zk(a,-1e4);break i}q[c+16>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56660]);j:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226640;break b}q[c+20>>2]=zk(a,-1e4);break j}q[c+20>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56661]);k:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226644;break b}q[c+24>>2]=zk(a,-1e4);break k}q[c+24>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[56662]);if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=226648;break b}q[c+28>>2]=zk(a,-1e4);break c}q[c+28>>2]=-2;Ri(a,-2)}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;yk(a);b=!e;break a}c=q[c>>2];q[d+4>>2]=q[b+8>>2];q[d>>2]=c;Pi(4,14825,19445,d);Ri(a,-2);b=0}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56656]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56657]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56658]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56659]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56660]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56661]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[56662]);if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){Ii=d+32|0;return b}J(15852,15159,2448,19519);G()}function PK(a,b){var c=0,d=0,e=0;if(q[b+56>>2]==2){Mi[q[75010]](q[b+48>>2],q[b+52>>2],b);so(a,b,36064)}if(q[b+120>>2]==2){c=b- -64|0;Mi[q[75010]](q[b+112>>2],q[b+116>>2],c);so(a,c,36065)}if(q[b+184>>2]==2){c=b+128|0;Mi[q[75010]](q[b+176>>2],q[b+180>>2],c);so(a,c,36066)}if(q[b+248>>2]==2){c=b+192|0;Mi[q[75010]](q[b+240>>2],q[b+244>>2],c);so(a,c,36067)}e=b+384|0;a:{b:{c:{d:{e:{f:{g:{h:{switch(q[b+440>>2]){case 1:ha(36161,q[b+432>>2]);Fa(36161,34041,s[b+424>>1],s[b+426>>1]);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break g}}so(a,e,33306);ha(36161,0);return;case 2:c=q[b+432>>2];d=q[b+436>>2];if((d|0)==2097152|d>>>0>2097152){break f}d=c&65535;if(d>>>0>=t[a+32>>2]){break e}ga(3553,q[q[(s[q[a+28>>2]+(d<<1)>>1]==(c>>>16|0)?q[q[a+24>>2]+(d<<2)>>2]:0)+4>>2]>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break d}}U(3553,0,35056,s[b+424>>1],s[b+426>>1],0,34041,34042,0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break c}}ga(3553,0);so(a,e,33306);return;default:J(88669,88575,2468,93359);G();case 0:break h}}c=b+256|0;i:{j:{switch(q[b+312>>2]-1|0){case 0:ha(36161,q[b+304>>2]);Fa(36161,(q[a+144>>2]==16?33189:6402)|0,s[b+296>>1],s[b+298>>1]);if(r[q[75054]+156|0]&64){e=K()|0;if(e){break b}}so(a,c,36096);ha(36161,0);break i;case 1:break j;default:break i}}Mi[q[75010]](q[b+304>>2],q[b+308>>2],c);so(a,c,36096)}c=b+320|0;k:{switch(q[b+376>>2]-1|0){case 0:ha(36161,q[b+368>>2]);Fa(36161,36168,s[b+360>>1],s[b+362>>1]);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}so(a,c,36128);ha(36161,0);return;case 1:Mi[q[75010]](q[b+368>>2],q[b+372>>2],c);so(a,c,36128);break;default:break k}}return}lj(b,93359,2428);J(88669,88575,2428,93359);G()}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}lj(c,93359,2447);J(88669,88575,2447,93359);G()}lj(b,93359,2455);J(88669,88575,2455,93359);G()}lj(e,93359,2477);J(88669,88575,2477,93359);G()}lj(b,93359,2496);J(88669,88575,2496,93359);G()}function v6(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;c=Ii-2208|0;Ii=c;a:{b:{i=dl(a,28639);c:{if(!i){q[c>>2]=a;Pi(4,28642,28651,c);a=-9;break c}Ui(c+144|0,0,2048);if(!dr(c+144|0,2048,i)){rk(i);a=-19;break c}l=b+8|0;k=b+4|0;n=-1;while(1){a=ko(c+144|0,q[57765],c+2200|0);d:{if(!a){break d}g=0;j=-1e3;d=-1;h=0;f=0;e:{f:{while(1){g:{h:{if(!f){if(!an(a,28759)){break h}d=0;break g}if(!((f|0)!=1|d)){q[c+64>>2]=c+2204;if((ru(a,28901,c- -64|0)|0)==1){j=q[c+2204>>2];d=0;break g}q[c+52>>2]=a;q[c+48>>2]=28821;Pi(4,28642,28773,c+48|0);break f}m=(d|0)!=1;if(!(m|(f|0)!=1)){q[c+96>>2]=c+2204;if((ru(a,28901,c+96|0)|0)==1){j=q[c+2204>>2];d=1;break g}q[c+84>>2]=a;q[c+80>>2]=28836;Pi(4,28642,28773,c+80|0);break f}i:{if((f|0)!=2|m){break i}e=hj(a);j:{if(!e){break j}while(1){e=e-1|0;h=e+a|0;p=o[h|0];if(!((p|0)==32|p-9>>>0<5)){break j}o[h|0]=0;if(e){continue}break}}h=a;if(r[a|0]){break i}q[c+116>>2]=a;q[c+112>>2]=28892;Pi(4,28642,28845,c+112|0);break f}if((f|0)!=3|m){break g}e=hj(a);k:{if(!e){break k}while(1){e=e-1|0;g=e+a|0;d=o[g|0];if(!((d|0)==32|d-9>>>0<5)){break k}o[g|0]=0;if(e){continue}break}}d=1;if(r[a|0]){g=a;break g}q[c+132>>2]=a;q[c+128>>2]=28897;Pi(4,28642,28845,c+128|0);break f}d=an(a,28767)?1:d}f=f+1|0;a=ko(0,q[57765],c+2200|0);if(a){continue}break}if(d?0:(f|0)!=2){break f}if((f|0)==4|(d|0)!=1){break e}}q[c+16>>2]=c+144;Pi(4,28642,28674,c+16|0);break d}l:{switch(d|0){case 0:n=1;if((j|0)==1){break d}q[c+36>>2]=j;q[c+32>>2]=1;Pi(4,28642,28714,c+32|0);rk(i);a=-19;break c;case 1:break l;default:break d}}a=q[k>>2];if((a|0)==q[l>>2]){if(o[b+12|0]&1){break b}Wi(((a-q[b>>2]|0)/12|0)+8|0,12,b,l,k)}h=Pk(h);g=Pk(g);a=q[k>>2];if((a|0)==q[l>>2]){break a}q[k>>2]=a+12;q[a+8>>2]=j;q[a+4>>2]=g;q[a>>2]=h}if(dr(c+144|0,2048,i)){continue}break}rk(i);a=(n|0)==1?0:-19}Ii=c+2208|0;return a}J(28982,28915,493,29057);G()}J(29069,28915,533,29093);G()}function Dl(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;h=Ii-16|0;Ii=h;a:{b:{c:{if(b|c){g=q[a>>2];f=q[a+4>>2];if(!(g|f)){break b}if((b|0)==(g|0)&(c|0)==(f|0)){break c}e=q[a+12>>2];g=e;f=q[a+8>>2];if(!(e|f)){a=a+8|0;e=1;break b}e=1;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+20>>2];g=e;f=q[a+16>>2];if(!(e|f)){a=a+16|0;e=2;break b}e=2;if((b|0)==(f|0)&(c|0)==(g|0)){break c}g=q[a+24>>2];f=q[a+28>>2];if(!(g|f)){a=a+24|0;e=3;break b}e=3;if((b|0)==(g|0)&(c|0)==(f|0)){break c}e=q[a+36>>2];g=e;f=q[a+32>>2];if(!(e|f)){a=a+32|0;e=4;break b}e=4;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+44>>2];g=e;f=q[a+40>>2];if(!(e|f)){a=a+40|0;e=5;break b}e=5;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+52>>2];g=e;f=q[a+48>>2];if(!(e|f)){a=a+48|0;e=6;break b}e=6;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+60>>2];g=e;f=q[a+56>>2];if(!(e|f)){a=a+56|0;e=7;break b}e=7;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+68>>2];g=e;f=q[a+64>>2];if(!(e|f)){a=a- -64|0;e=8;break b}e=8;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+76>>2];g=e;f=q[a+72>>2];if(!(e|f)){a=a+72|0;e=9;break b}e=9;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+84>>2];g=e;f=q[a+80>>2];if(!(e|f)){a=a+80|0;e=10;break b}e=10;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+92>>2];g=e;f=q[a+88>>2];if(!(e|f)){a=a+88|0;e=11;break b}e=11;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+100>>2];g=e;f=q[a+96>>2];if(!(e|f)){a=a+96|0;e=12;break b}e=12;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+108>>2];g=e;f=q[a+104>>2];if(!(e|f)){a=a+104|0;e=13;break b}e=13;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+116>>2];g=e;f=q[a+112>>2];if(!(e|f)){a=a+112|0;e=14;break b}e=14;if((b|0)==(f|0)&(c|0)==(g|0)){break c}e=q[a+124>>2];g=e;f=q[a+120>>2];if(!(e|f)){a=a+120|0;e=15;break b}e=15;if((b|0)==(f|0)&(c|0)==(g|0)){break c}q[h>>2]=aj(b,c);Pi(3,37377,38828,h)}break a}i=1<>2]=b;q[a+4>>2]=c;i=1<>2];m=q[i+20>>2];Gj(m);n=r[a+44|0];g=q[i>>2];d=q[i+4>>2];q[e+56>>2]=0;q[e+60>>2]=0;q[e+48>>2]=0;q[e+52>>2]=0;f=d-g|0;a:{if(f){g=g-d|0;d=((g|0)>(f|0)?g:f)>>>4|0;f=(f|0)>-1?f:-1;f=w(d,(f|0)<1?f:1);p=f>>>0>1?f:1;b:{while(1){g=q[i>>2];if(q[i+4>>2]-g>>4>>>0>k>>>0){g=q[(g+(k<<4)|0)+4>>2];d=q[q[g>>2]+20>>2];f=-1;c:{if(!d){break c}f=Mi[d|0](q[g+4>>2],e+44|0)|0}d:{if(f){break d}q[e+52>>2]=q[e+48>>2];if((_6(q[e+44>>2],b,c,e+48|0)|0)==-3){break d}l=0;d=q[e+48>>2];if((d|0)==q[e+52>>2]){break d}s=q[(q[q[q[e+44>>2]+8>>2]>>2]<<2)+30880>>2]>>>3|0;while(1){g=(l<<3)+d|0;f=q[g>>2];g=q[g+4>>2];h=q[a+4>>2];e:{f:{if(!h){break f}d=q[q[a>>2]+(Cza(f,g,h)<<2)>>2];if((d|0)==-1){break f}j=q[a+8>>2];while(1){d=j+(d<<4)|0;if((f|0)==q[d>>2]&q[d+4>>2]==(g|0)){break e}d=q[d+12>>2];if((d|0)!=-1){continue}break}}g:{if(!n){j=1;break g}j=!fH(i,f,g,0,e+16|0);h=q[a+4>>2]}o[e+16|0]=j;h:{i:{j:{if(!h){break j}d=q[q[a>>2]+(Cza(f,g,h)<<2)>>2];if((d|0)==-1){break j}h=q[a+8>>2];while(1){d=h+(d<<4)|0;if((f|0)==q[d>>2]&q[d+4>>2]==(g|0)){break i}d=q[d+12>>2];if((d|0)!=-1){continue}break}}d=q[a+24>>2];if((d|0)==q[a+16>>2]-q[a+8>>2]>>4){d=d+32|0;mJ(a,(d<<1>>>0)/3|0,d)}BA(a,f,g,e+16|0);break h}o[d+8|0]=j}d=j^1;if(d?0:n){break e}q[e+24>>2]=0;q[e+28>>2]=0;q[e+32>>2]=0;q[e+36>>2]=0;o[e+32|0]=d;q[e+16>>2]=f;q[e+20>>2]=g;d=b7(q[e+44>>2],f,g);if(!d){q[e+8>>2]=b;q[e+12>>2]=c;q[e>>2]=f;q[e+4>>2]=g;Pi(4,27874,28231,e);Mi[q[a+36>>2]](q[a+40>>2],e+16|0);break e}h=q[d>>2];q[e+28>>2]=s;q[e+24>>2]=h;Mi[q[a+36>>2]](q[a+40>>2],e+16|0);if(!r[a+45|0]|!q[d+40>>2]){break e}gH(a,f,g)}l=l+1|0;d=q[e+48>>2];if(l>>>0>2]-d>>3>>>0){continue}break}}k=k+1|0;if((p|0)!=(k|0)){continue}break b}break}J(28298,28028,479,28309);G()}if(o[e+60|0]&1){break a}}a=q[e+48>>2];if(!a){break a}Ni(a)}Bj(m);Ii=e- -64|0}function j5(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=x(0),g=x(0),h=x(0),i=0,j=0,k=0;c=Ii-192|0;Ii=c;b=Ll(a,1);a:{if((b|0)==q[210436]){break a}e=1;if((b|0)==q[210437]){break a}e=2;if((b|0)==q[210438]){break a}e=3;if((b|0)==q[210439]){break a}e=(b|0)==q[210440]?4:5}b=Ll(a,2);k=q[210436];b:{if((b|0)==(k|0)){break b}i=1;if((b|0)==q[210437]){break b}i=2;if((b|0)==q[210438]){break b}i=3;if((b|0)==q[210439]){break b}i=(b|0)==q[210440]?4:5}c:{if((e|0)!=(i|0)){q[c+180>>2]=135583;q[c+176>>2]=134064;a=Qi(a,135915,c+176|0);break c}d:{switch(e|0){case 0:b=_i(a,1,k,0);f=u[b>>2];g=u[b+4>>2];e:{if(!(f!=f|g!=g)){d=u[b+8>>2];if(d==d){break e}}d=u[b+8>>2];v[c- -64>>3]=g;v[c+72>>3]=d;v[c+56>>3]=f;q[c+48>>2]=1;Qi(a,134131,c+48|0)}e=_i(a,2,q[210436],0);f=u[e>>2];g=u[e+4>>2];f:{if(!(f!=f|g!=g)){d=u[e+8>>2];if(d==d){break f}}d=u[e+8>>2];v[c+32>>3]=g;v[c+40>>3]=d;v[c+24>>3]=f;q[c+16>>2]=2;Qi(a,134131,c+16|0);d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}j=+x(x(x(u[b>>2]*f)+x(u[b+4>>2]*g))+x(u[b+8>>2]*d));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=j;q[a+8>>2]=q[a+8>>2]+16;a=1;break c;case 1:b=_i(a,1,q[210437],0);f=u[b>>2];g=u[b+4>>2];g:{h:{if(f!=f|g!=g){break h}d=u[b+8>>2];if(d!=d){break h}d=u[b+12>>2];if(d==d){break g}}d=u[b+8>>2];h=u[b+12>>2];v[c+144>>3]=g;v[c+160>>3]=h;v[c+152>>3]=d;v[c+136>>3]=f;q[c+128>>2]=1;Qi(a,134221,c+128|0)}e=_i(a,2,q[210437],0);f=u[e>>2];g=u[e+4>>2];i:{j:{if(f!=f|g!=g){break j}d=u[e+8>>2];if(d!=d){break j}h=u[e+12>>2];if(h==h){break i}}d=u[e+8>>2];h=u[e+12>>2];v[c+96>>3]=g;v[c+112>>3]=h;v[c+104>>3]=d;v[c+88>>3]=f;q[c+80>>2]=2;Qi(a,134221,c+80|0);h=u[e+12>>2];d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}j=+x(x(x(x(u[b>>2]*f)+x(u[b+4>>2]*g))+x(u[b+8>>2]*d))+x(u[b+12>>2]*h));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=j;q[a+8>>2]=q[a+8>>2]+16;a=1;break c;default:break d}}q[c+12>>2]=134016;q[c+8>>2]=134e3;q[c+4>>2]=135583;q[c>>2]=134064;a=Qi(a,135879,c)}Ii=c+192|0;return a|0}function Aoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=0,k=x(0),l=x(0),m=0,n=x(0);b=Ii-128|0;Ii=b;d=q[a+1040>>2];a:{if(q[d+8>>2]==2){break a}f=q[d+32>>2];g=q[d>>2];m=Ap(q[f+8>>2],g);c=q[a+1052>>2];h=c;d=q[a+1048>>2];e=d+1|0;c=e>>>0<1?c+1|0:c;q[a+1048>>2]=e;q[a+1052>>2]=c;if(!h&d>>>0<=3){c=d;q[a>>2]=Oi(q[(c<<2)+231856>>2]);q[a+4>>2]=Li;if(!h&c>>>0<=2){b:{switch(c-1|0){default:j=1;q[a+8>>2]=1;q[a+16>>2]=Oi(q[(m<<2)+231872>>2]);q[a+20>>2]=Li;break a;case 0:j=1;q[a+8>>2]=1;q[b+64>>2]=0;d=wJ($v(q[f+8>>2],g),b- -64|0);q[a+16>>2]=Oi(d?d:41733);q[a+20>>2]=Li;break a;case 1:break b}}j=1;q[a+8>>2]=1;q[a+16>>2]=pea(q[f+8>>2],g);q[a+20>>2]=Li;break a}j=1;q[a+8>>2]=1;d=a;c=XA(q[f+8>>2],g);e=41733;c:{if(c>>>0>8){break c}e=q[(c<<2)+231968>>2]}q[d+16>>2]=Oi(e);q[a+20>>2]=Li;break a}c=d;e=h-(c>>>0<4)|0;c=c-4|0;d:{if(!e&c>>>0<=9){d=q[(c<<2)+43680>>2];Xl(b- -64|0,q[f+8>>2],g,d);q[a>>2]=Oi(q[(d<<2)+231904>>2]);q[a+4>>2]=Li;u[a+16>>2]=u[b+64>>2];u[a+20>>2]=u[b+68>>2];u[a+24>>2]=u[b+72>>2];i=u[b+76>>2];q[a+8>>2]=4;u[a+28>>2]=i;break d}c=d;e=h-(c>>>0<14)|0;c=c-14|0;e=!e&c>>>0>3|(e|0)!=0;if(!e){fea(b- -64|0,q[f+8>>2],g);op(b+16|0,b- -64|0);if(e){break a}d=a;e:{f:{switch(c-1|0){default:i=u[b+40>>2];k=u[b+36>>2];l=u[b+32>>2];e=3;break e;case 0:n=u[b+28>>2];i=u[b+24>>2];k=u[b+20>>2];l=u[b+16>>2];e=4;break e;case 1:i=u[b+56>>2];k=u[b+52>>2];l=u[b+48>>2];e=3;break e;case 2:break f}}Xl(b,q[f+8>>2],g,4);n=x(u[b+12>>2]*x(0));i=x(u[b+56>>2]*u[b+8>>2]);k=x(u[b+52>>2]*u[b+4>>2]);l=x(u[b+48>>2]*u[b>>2]);e=3}q[d+8>>2]=e;d=Oi(q[(c<<2)+231952>>2]);u[a+28>>2]=n;u[a+24>>2]=i;u[a+20>>2]=k;u[a+16>>2]=l;q[a>>2]=d;q[a+4>>2]=Li;break d}if(!h&(d|0)==18){q[a+8>>2]=6;o[a+16|0]=ZJ(q[f+8>>2],g,0);q[a>>2]=Oi(43773);q[a+4>>2]=Li;break d}if((d|0)!=19|h|(m|0)!=1){break a}q[a+8>>2]=7;q[a+16>>2]=UA(q[f+8>>2],g);q[a>>2]=Oi(43781);q[a+4>>2]=Li}j=1}Ii=b+128|0;return j|0}function yoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;g=Ii-96|0;Ii=g;e=q[a>>2];c=Ui($i(328),0,328);q[c+288>>2]=208;b=q[e+4>>2];a:{if((b|0)!=q[e+8>>2]){q[e+4>>2]=b+4;q[b>>2]=c;break a}q[g>>2]=b-q[e>>2]>>2;Pi(3,40439,40813,g)}q[c+320>>2]=e;b:{c:{if(!(o[c+44|0]&1)){b=q[a+16>>2];d=q[e+64>>2];Wi(b>>>0>>0?b:d,4,c+32|0,c+40|0,c+36|0);d=q[q[e+52>>2]+2384>>2];b=qq(d);zt(b,q[72630],q[72631],3,6,0);zt(b,q[72632],q[72633],2,6,0);zt(b,q[72634],q[72635],4,6,1);q[c+48>>2]=Mi[q[74954]](d,b);um(b);b=q[72630];f=q[72631];q[c+104>>2]=0;q[c+108>>2]=12;q[c+96>>2]=2;q[c+100>>2]=1;q[c+88>>2]=b;q[c+92>>2]=f;b=q[72632];f=q[72633];q[c+120>>2]=3;q[c+124>>2]=1;q[c+128>>2]=0;q[c+132>>2]=8;q[c+112>>2]=b;q[c+116>>2]=f;b=q[72634];f=q[72635];q[c+144>>2]=5;q[c+148>>2]=1;q[c+152>>2]=0;q[c+156>>2]=16;q[c+136>>2]=b;q[c+140>>2]=f;b=Mi[q[74962]](q[c+48>>2])|0;q[c+284>>2]=3;q[c+280>>2]=b;if(o[c+68|0]&1){break b}Wi(512,36,c+56|0,c- -64|0,c+60|0);q[c+52>>2]=Mi[q[74943]](d,0,0,0);b=g;q[b+88>>2]=-1;q[b+92>>2]=-1;q[b+80>>2]=-1;q[b+84>>2]=-1;o[b+78|0]=1;p[b+72>>1]=1;q[b+64>>2]=0;q[b+68>>2]=131074;o[b+59|0]=0;o[b+60|0]=0;o[b+61|0]=0;o[b+62|0]=0;q[b+52>>2]=0;q[b+56>>2]=0;p[b+74>>1]=2;p[b+76>>1]=2;q[b+36>>2]=1;q[b+40>>2]=1;q[b+44>>2]=0;q[b+48>>2]=0;q[b+20>>2]=16;q[b+24>>2]=3;q[b+28>>2]=1;q[b+32>>2]=1;p[b+58>>1]=2;p[b+56>>1]=2;q[b+16>>2]=b+80;d=Mi[q[75008]](d,b- -64|0)|0;q[c+72>>2]=d;f=Li;q[c+76>>2]=f;Mi[q[75010]](d,f,b+16|0);if(o[c+12|0]&1){break b}Wi(128,320,c,c+8|0,c+4|0);if(o[c+28|0]&1){break b}Wi(128,4,c+16|0,c+24|0,c+20|0);b=q[c+16>>2];d=q[c+24>>2]-b|0;if(d>>2>>>0<=127){break c}q[c+20>>2]=b+512;Ui(b,0,d);b=q[e+68>>2];q[c+296>>2]=b;d=q[e+72>>2];q[c+300>>2]=d;q[c+80>>2]=jI(b,d);q[c+308>>2]=q[e+76>>2];q[c+316>>2]=xz(q[e+60>>2]);if(r[266420]){mq(q[e+48>>2],195,c)}q[q[a+12>>2]>>2]=c;Ii=g+96|0;return 0}break b}J(40968,40745,506,40987);G()}J(40670,40745,493,40801);G()}function BL(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-112|0;Ii=e;m=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-1,77255);a:{if(!Vi(a,-1)){break a}Dj(a,-1,5);f=q[a+8>>2];q[f+8>>2]=0;q[a+8>>2]=f+16;if(!Hj(a,-2)){break a}while(1){Dj(a,-1,5);f=jj(a,-2);Zi(a,-1,77266);Dj(a,-1,5);if(al(a,-1)&1){q[e+100>>2]=f;q[e+96>>2]=77266;Qi(a,77275,e+96|0)}g=q[a+8>>2];q[g+8>>2]=0;q[a+8>>2]=g+16;if(Hj(a,-2)){while(1){jj(a,-1);Dj(a,-2,3);Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);Zi(a,-1,77330);Dj(a,-1,5);if(al(a,-1)&1){q[e+84>>2]=f;q[e+80>>2]=77330;Qi(a,77275,e+80|0)}g=q[a+8>>2];q[g+8>>2]=0;q[a+8>>2]=g+16;if(Hj(a,-2)){while(1){jj(a,-1);Dj(a,-2,3);Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);Zi(a,-1,77334);Dj(a,-1,5);if((al(a,-1)>>>0)%3|0){q[e+68>>2]=f;q[e+64>>2]=77334;Qi(a,77275,e- -64|0)}f=q[a+8>>2];q[f+8>>2]=0;q[a+8>>2]=f+16;if(Hj(a,-2)){while(1){jj(a,-1);Dj(a,-2,3);Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);Ri(a,-2);h=h+1|0;if(Hj(a,-2)){continue}break}}Ri(a,-2);Zi(a,-1,77342);b:{if(!Vi(a,-1)){f=h;break b}Dj(a,-1,5);f=q[a+8>>2];q[f+8>>2]=0;q[a+8>>2]=f+16;f=h;if(!Hj(a,-2)){break b}l=h+1|0;while(1){Dj(a,-1,5);k=jj(a,-2);Zi(a,-1,77353);if(!uk(a,-1)){q[e+48>>2]=i+1;Qi(a,77356,e+48|0)}Ri(a,-2);bv(a,77433);bv(a,77439);g=bv(a,77446);j=bv(a,77458);Zi(a,-1,77468);mp(a,77468,0);Ri(a,-2);Zi(a,-1,77477);mp(a,77477,0);Ri(a,-2);Zi(a,-1,77481);Rt(a,77481,0);Ri(a,-2);Zi(a,-1,77495);Rt(a,77495,0);Ri(a,-2);if(!(g>>>0<=l>>>0?(g|0)>=1:0)){q[e+40>>2]=h;q[e+36>>2]=g;q[e+32>>2]=k;Qi(a,77511,e+32|0)}if(!(j>>>0<=l>>>0?(j|0)>=1:0)){q[e+24>>2]=h;q[e+20>>2]=j;q[e+16>>2]=k;Qi(a,77595,e+16|0)}g=j-g|0;if((g|0)<=0){q[e+4>>2]=g;q[e>>2]=k;Qi(a,77677,e)}Ri(a,-2);f=f+g|0;i=i+1|0;if(Hj(a,-2)){continue}break}}Ri(a,-2);q[c>>2]=i;q[b>>2]=h;q[d>>2]=f;if(!h){Qi(a,77736,0)}if(!i){Qi(a,77796,0)}if(q[a+8>>2]-q[a+12>>2]>>4!=(m|0)){J(77856,76581,1433,77877);G()}Ii=e+112|0}function kpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=x(0),g=x(0),h=0,i=0,j=0,k=0,l=0,m=0;b=Ii-112|0;Ii=b;i=q[a+8>>2];c=q[i>>2];if((c|0)!=q[i+4>>2]){k=b+80|0;j=b- -64|0;while(1){c=(l<<7)+c|0;a:{if(!(r[c+58|0]&16)){break a}q[72320]=q[72320]+1;q[b+104>>2]=1;q[b+108>>2]=0;q[b+48>>2]=1;q[b+52>>2]=0;d=q[c+60>>2];b:{if(!d){break b}e=q[q[a+12>>2]>>2];q[b+60>>2]=c;q[b+56>>2]=e;d=jt(d,164,b+56|0,1e4);if((d|0)==-17){break b}Pn(q[c+60>>2]);c:{if(d){break c}if(!Po(q[c+64>>2],q[c+68>>2])){break c}d=vk(c+96|0,c- -64|0,Oi(35794),Li,0,0,0,0);if(!d){break c}q[b+32>>2]=d;Pi(3,35807,35815,b+32|0)}q[c+60>>2]=0}d:{if(!q[c+36>>2]){break d}q[72342]=q[72342]+1;q[b+96>>2]=1;q[b+100>>2]=0;q[b+24>>2]=1;q[b+28>>2]=0;d=q[c+56>>2];e=d>>>18&1;if((e|0)!=(d>>>17&1)){d=d&-131073|e<<17;q[c+56>>2]=d}if(d&131072){q[72364]=q[72364]+1;q[b+88>>2]=1;q[b+92>>2]=0;q[b+16>>2]=1;q[b+20>>2]=0;d=q[a+4>>2];e=q[d+12>>2];q[j>>2]=q[d+8>>2];q[j+4>>2]=e;e=q[d+4>>2];q[b+56>>2]=q[d>>2];q[b+60>>2]=e;g=u[c+48>>2];u[b+56>>2]=u[d>>2]*g;f=g;g=u[d+4>>2];f=x(f*g);e:{f:{switch(q[c+44>>2]){case 0:u[b+60>>2]=f;q[c+52>>2]=0;break e;case 1:break f;default:break e}}f=x(f+u[c+52>>2]);u[c+52>>2]=f;if(!(f>=g^1)){u[b+60>>2]=g;u[c+52>>2]=f-u[d+4>>2];break e}q[b+60>>2]=0}m=UL(q[c+36>>2],b+56|0)?m:-1e3;break d}q[c+52>>2]=0}d=q[c+56>>2];if(!(d&524288)){break a}q[c+56>>2]=d&-524289;if(!Po(q[c>>2],q[c+4>>2])){break a}q[k>>2]=0;q[k+4>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[j>>2]=0;q[j+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;d=0;e=0;h=q[q[q[c+40>>2]+80>>2]+8>>2];g:{if(!h){break g}h=q[h>>2];if(!h){break g}d=q[h+3216>>2];e=q[h+3220>>2]}q[b+56>>2]=d;q[b+60>>2]=e;d=q[c+40>>2];e=q[d+100>>2];q[b+72>>2]=q[d+96>>2];q[b+76>>2]=e;to(q[c+40>>2],s[c+56>>1],k);c=vk(b+56|0,c,Oi(35869),Li,0,0,0,0);if(!c){break a}q[b>>2]=c;Pi(3,35807,35884,b)}l=l+1|0;c=q[i>>2];if(l>>>0>2]-c>>7>>>0){continue}break}}Ii=b+112|0;return m|0}function Xu(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;Nm(a,b);a:{b:{c:{d:{e:{f:{g:{switch(q[b>>2]-2|0){case 1:g=q[a+32>>2];q[a+32>>2]=-1;d=fl(a,2147450902,q[q[a+12>>2]+8>>2]);if((g|0)==-1){break c}if((d|0)==-1){d=g;break b}i=q[q[a>>2]+12>>2];c=d;while(1){f=c;h=(c<<2)+i|0;e=q[h>>2];c=(e>>>14|0)-131071|0;c=(c|0)==-1?-1:(f+c|0)+1|0;if((c|0)!=-1){continue}break}c=h;g=g+(f^-1)|0;f=g>>31;if((f^f+g)>=131072){Sj(q[a+12>>2],141849);e=q[h>>2]}q[c>>2]=(e&16383|g<<14)+2147467264;break c;case 8:c=q[b+8>>2];e=q[q[a>>2]+12>>2]+(c<<2)|0;h:{if((c|0)>=1){d=e-4|0;c=q[d>>2];if(o[(c&63)+141360|0]<0){break h}}c=q[e>>2];d=e}q[d>>2]=c&-16321|!(c&16320)<<6;d=q[b+8>>2];break c;case 9:c=q[a>>2];d=q[q[c+12>>2]+(q[b+8>>2]<<2)>>2];if((d&63)!=19){break f}q[a+24>>2]=q[a+24>>2]-1;d=uo(a,26,d>>>23|0,0,1);break c;case 0:case 2:case 3:break a;case 10:break e;default:break g}}c=q[a>>2]}f=q[a+36>>2];e=f+1|0;i:{if((f|0)=249){Sj(q[a+12>>2],141814);d=q[a+36>>2]+1|0;c=q[a>>2]}o[c+75|0]=e}q[a+36>>2]=d;Nw(a,b,d-1|0);if(q[b>>2]!=12){break d}}c=q[b+8>>2];if(c&256|(c|0)>2]=q[a+36>>2]-1}d=uo(a,27,255,q[b+8>>2],0)}if((d|0)==-1){break a}}c=q[b+20>>2];if((c|0)!=-1){g=q[q[a>>2]+12>>2];while(1){f=c;h=g+(c<<2)|0;e=q[h>>2];c=(e>>>14|0)-131071|0;c=(c|0)==-1?-1:(f+c|0)+1|0;if((c|0)!=-1){continue}break}c=h;f=(f^-1)+d|0;d=f>>31;if((d^d+f)>=131072){Sj(q[a+12>>2],141849);e=q[h>>2]}q[c>>2]=(e&16383|f<<14)+2147467264;break a}q[b+20>>2]=d}g=q[b+16>>2];q[a+28>>2]=q[a+24>>2];j:{if((g|0)!=-1){c=q[a+32>>2];if((c|0)==-1){break j}h=q[q[a>>2]+12>>2];while(1){e=c;f=h+(c<<2)|0;d=q[f>>2];c=(d>>>14|0)-131071|0;c=(c|0)==-1?-1:(e+c|0)+1|0;if((c|0)!=-1){continue}break}c=f;h=g+(e^-1)|0;e=h>>31;if((e^e+h)>=131072){Sj(q[a+12>>2],141849);d=q[f>>2]}q[c>>2]=(d&16383|h<<14)+2147467264}q[b+16>>2]=-1;return}q[a+32>>2]=g;q[b+16>>2]=-1}function xfa(a){a=a|0;Ui(a+128|0,0,328);q[a+396>>2]=636;q[a+392>>2]=637;q[a+388>>2]=638;q[a+384>>2]=639;q[a+376>>2]=640;q[a+372>>2]=641;q[a+368>>2]=642;q[a+364>>2]=643;q[a+360>>2]=644;q[a+356>>2]=645;q[a+352>>2]=646;q[a+348>>2]=647;q[a+344>>2]=648;q[a+340>>2]=649;q[a+336>>2]=650;q[a+332>>2]=651;q[a+328>>2]=652;q[a+324>>2]=653;q[a+320>>2]=654;q[a+316>>2]=655;q[a+312>>2]=656;q[a+308>>2]=657;q[a+304>>2]=658;q[a+300>>2]=659;q[a+296>>2]=660;q[a+292>>2]=661;q[a+288>>2]=662;q[a+284>>2]=663;q[a+280>>2]=664;q[a+276>>2]=665;q[a+272>>2]=666;q[a+268>>2]=667;q[a+264>>2]=668;q[a+260>>2]=669;q[a+256>>2]=670;q[a+252>>2]=671;q[a+248>>2]=672;q[a+244>>2]=673;q[a+240>>2]=674;q[a+236>>2]=675;q[a+232>>2]=676;q[a+228>>2]=677;q[a+224>>2]=678;q[a+220>>2]=679;q[a+216>>2]=680;q[a+212>>2]=681;q[a+208>>2]=682;q[a+204>>2]=683;q[a+200>>2]=684;q[a+196>>2]=685;q[a+192>>2]=686;q[a+188>>2]=687;q[a+184>>2]=688;q[a+180>>2]=689;q[a+176>>2]=690;q[a+172>>2]=691;q[a+168>>2]=692;q[a+164>>2]=693;q[a+160>>2]=694;q[a+156>>2]=695;q[a+152>>2]=696;q[a+148>>2]=697;q[a+144>>2]=698;q[a+140>>2]=699;q[a+136>>2]=700;q[a+132>>2]=701;q[a+124>>2]=702;q[a+120>>2]=703;q[a+116>>2]=704;q[a+112>>2]=705;q[a+108>>2]=706;q[a+104>>2]=707;q[a+100>>2]=708;q[a+96>>2]=709;q[a+92>>2]=710;q[a+88>>2]=711;q[a+84>>2]=712;q[a+80>>2]=713;q[a+76>>2]=714;q[a+72>>2]=715;q[a+68>>2]=716;q[a+64>>2]=717;q[a+60>>2]=718;q[a+56>>2]=719;q[a+52>>2]=720;q[a+48>>2]=721;q[a+44>>2]=722;q[a+40>>2]=723;q[a+36>>2]=724;q[a+32>>2]=725;q[a+28>>2]=726;q[a+24>>2]=727;q[a+20>>2]=728;q[a+16>>2]=729;q[a+12>>2]=730;q[a+8>>2]=731;q[a+4>>2]=732;q[a>>2]=733;q[a+424>>2]=734;q[a+420>>2]=735;q[a+416>>2]=736;q[a+412>>2]=737;q[a+408>>2]=738;q[a+404>>2]=739;q[a+400>>2]=740;q[a+380>>2]=741;q[a+128>>2]=742;q[a+428>>2]=743;q[a+432>>2]=744;q[a+436>>2]=745;q[a+440>>2]=746;q[a+444>>2]=747;q[a+448>>2]=748;q[a+452>>2]=749}function naa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=Ii-1200|0;Ii=d;k=q[a+48>>2];Gj(k);a:{b:{c:{d:{e:{f:{c=q[b+4>>2];if(!(!c|!q[b>>2])){l=q[b+40>>2];m=q[b+44>>2];rk(c);q[b+4>>2]=0;g:{c=q[a+20>>2];h:{if(!c){break h}n=a+16|0;h=q[b+48>>2];i=q[b+52>>2];c=q[q[n>>2]+(Cza(h,i,c)<<2)>>2];if((c|0)==-1){break h}f=q[a+24>>2];while(1){e=f+w(c,136)|0;if((h|0)==q[e>>2]&(i|0)==q[e+4>>2]){break g}c=q[e+128>>2];if((c|0)!=-1){continue}break}}J(166620,166551,565,166616);G()}if(o[b+58|0]&1){Mn(q[b>>2]);break d}AI(q[a>>2],l,m,d+176|0);i:{if(bm(d+176|0)){if(!Mn(d+176|0)){break i}q[d+16>>2]=d+176;Pi(4,166128,166626,d+16|0);break d}e=wm(d+176|0,47);g=r[e|0];o[e|0]=0;j:{if(bm(d+176|0)){break j}j=0;k:{if(!YD(d+176|0)){break k}j=Ys(q[240513])}if(!j){break j}q[d+32>>2]=d+176;Pi(4,166128,166658,d+32|0);break d}o[e|0]=g}e=f+w(c,136)|0;g=s[e+120>>1];if(!(g&256)){break f}if((l|0)!=q[e+80>>2]|(m|0)!=q[e+84>>2]){break e}p[e+120>>1]=g&65279;c=f+w(c,136)|0;q[c+104>>2]=ro(b+8|0);q[c+108>>2]=Li;if(hv(d+176|0,q[b>>2])){Ui(d+48|0,0,128);p1(d+48|0,q[240513]);c=q[b>>2];q[d+12>>2]=q[240513];q[d>>2]=c;q[d+8>>2]=d+48;q[d+4>>2]=d+176;Pi(4,166128,166759,d);break d}c=q[b+4>>2];if(c){rk(c)}c=q[b>>2];if(c){Mn(c);Ni(q[b>>2])}f=q[a+52>>2];if(!f){break b}c=s[a+58>>1];if(!c|c>>>0>s[a+56>>1]){break a}e=s[b+56>>1];c=c-1|0;p[a+58>>1]=c;p[f+((c&65535)<<1)>>1]=e;p[b+56>>1]=65535;q[b>>2]=0;q[b+4>>2]=0;o[a+88|0]=1;break c}J(166500,166551,557,166616);G()}J(166690,166551,609,166616);G()}J(166709,166551,610,166616);G()}c=q[b+4>>2];if(c){rk(c)}c=q[b>>2];if(c){Mn(c);Ni(q[b>>2])}f=q[a+52>>2];if(!f){break b}c=s[a+58>>1];if(!c|c>>>0>s[a+56>>1]){break a}e=s[b+56>>1];g=a;a=c-1|0;p[g+58>>1]=a;p[f+((a&65535)<<1)>>1]=e;p[b+56>>1]=65535;q[b>>2]=0;q[b+4>>2]=0;ZI(n,h,i)}Bj(k);Ii=d+1200|0;return}J(167324,167163,140,167355);G()}J(167360,167163,141,167355);G()}function Yz(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-32|0;Ii=e;a:{b:{c:{m=q[a+2384>>2];f=Mi[q[74967]](m,b,c)|0;if(f){d=$i(160);q[d+36>>2]=0;q[d+40>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+44>>2]=0;q[d+48>>2]=0;q[d+28>>2]=0;q[d+32>>2]=0;q[d+40>>2]=-1;k=Ui(d+52|0,0,80);q[d+144>>2]=0;q[d+148>>2]=0;q[d+136>>2]=0;q[d+140>>2]=0;q[d+152>>2]=1;q[d+12>>2]=c;q[d+8>>2]=b;q[d>>2]=a;q[d+16>>2]=0;q[d+4>>2]=f;g=Mi[q[74977]](f)|0;d:{e:{if(!(o[d+80|0]&1)){Wi(g,8,d+68|0,d+76|0,d+72|0);a=q[d+68>>2];if(g>>>0>q[d+76>>2]-a>>3>>>0){break b}q[d+72>>2]=a+(g<<3);if(o[d+64|0]&1){break c}Wi(g,48,k,d+60|0,d+56|0);a=q[d+52>>2];if(g>>>0>(q[d+60>>2]-a|0)/48>>>0){break b}k=d;q[d+56>>2]=a+w(g,48);if(!g){c=0;break d}c=0;a=0;while(1){q[e+24>>2]=0;q[e+28>>2]=0;q[e+20>>2]=-1;q[e+16>>2]=0;q[e+12>>2]=0;q[e+8>>2]=-1;Mi[q[74978]](q[d+4>>2],a,e+24|0,e+20|0,e+12|0,e+16|0,e+8|0);b=q[d+52>>2];if((q[d+56>>2]-b|0)/48>>>0<=a>>>0){break a}f=q[e+28>>2];l=f;j=b+w(a,48)|0;b=j;h=q[e+24>>2];q[b+8>>2]=h;q[b+12>>2]=f;i=2;f:{if(q[79132]==(h|0)&q[79133]==(f|0)){break f}i=3;if((h|0)==q[79134]&(l|0)==q[79135]){break f}i=5;if((h|0)==q[79136]&(l|0)==q[79137]){break f}i=(h|0)==q[79138]&(l|0)==q[79139]?4:1}q[b+16>>2]=i;b=q[e+20>>2];if(b>>>0>=16|!(61951>>>b&1)){break e}h=q[(b<<2)+114448>>2];q[j+28>>2]=h;b=q[e+12>>2];q[j+32>>2]=1;o[j+24|0]=0;q[j+20>>2]=b;f=q[k+68>>2];if(q[d+72>>2]-f>>3>>>0<=a>>>0){break a}b=q[e+8>>2];f=f+(a<<3)|0;p[f+4>>1]=c;q[f>>2]=b;p[f+6>>1]=q[e+16>>2];c=w(xt(yt(h)),q[e+12>>2])+c|0;a=a+1|0;if((g|0)!=(a|0)){continue}break}break d}break c}J(114108,113682,70,114134);G()}if(o[d+96|0]&1){break c}Wi(c,1,d+84|0,d+92|0,d+88|0);a=q[d+84>>2];if(q[d+92>>2]-a>>>0>>0){break b}q[d+88>>2]=a+c;Ui(a,0,c);SH(m,d);K8(d)}Ii=e+32|0;return d}J(113938,114013,493,114069);G()}J(114081,114013,506,114100);G()}J(114155,114013,479,114166);G()}function yq(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=q[a+1408>>2];a:{if((c|0)>24){break a}if(!c){q[a+1404>>2]=0}while(1){c=r[a+1388|0];b:{c:{d:{e:{f:{if(q[a+1396>>2]){if(c&255){break f}break a}if(c&255){break f}d=q[a+1392>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break a}if(!(o[a+1387|0]&1)){break e}d=q[a+1392>>2]}f=d+1|0;q[a+1392>>2]=f;c=r[(a+d|0)+1132|0];if((c|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if((f|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break d}o[a+1388|0]=c;if(!c){break a}}o[a+1388|0]=c-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];g:{if(c){if(c>>>0>=t[a+52>>2]){break c}q[a+44>>2]=c+1;c=r[c|0];break g}c=wj(q[a+32>>2]);if((c|0)==-1){break c}}c=c&255;break b}q[a+112>>2]=32;break a}J(211824,211687,1555,211845);G()}q[a+108>>2]=1;c=0}d=q[a+1408>>2];q[a+1408>>2]=d+8;q[a+1404>>2]=q[a+1404>>2]+(c<>2];k:{if(!f){g=q[b+2084>>2];if(g){break k}return-1}d=q[b+4>>2];if((d|0)<9){break j}g=q[b+2084>>2];if(!g){break j}}f=q[a+1404>>2];c=0;d=q[b+2092>>2];if((d|0)>=2){e=f>>>1&1431655765|f<<1&-1431655766;e=e>>>2&858993459|e<<2&-858993460;e=e>>>4&252645135|e<<4&-252645136;j=Fza(e>>>8&16711935|e<<8&-16711936,16);while(1){e=d>>>1|0;i=e+c|0;h=j>>>0>2];c=h?c:i;d=h?e:d-e|0;if((d|0)>1){continue}break}}d=q[a+1408>>2];c=r[b+23|0]?c:q[q[b+2088>>2]+(c<<2)>>2];b=r[c+q[b+8>>2]|0];if((d|0)<(b|0)){break i}q[a+1404>>2]=f>>>b;q[a+1408>>2]=d-b;return c}if(r[b+23|0]){break h}if((d|0)>=1){g=q[b+8>>2];c=0;while(1){l:{e=c+g|0;b=r[e|0];if((b|0)==255){break l}h=q[a+1404>>2];if(q[f+(c<<2)>>2]!=(h&(-1<>2];if((d|0)<(b|0)){break i}q[a+1404>>2]=h>>>b;q[a+1408>>2]=d-r[e|0];return c}c=c+1|0;if((d|0)!=(c|0)){continue}break}}q[a+112>>2]=21}q[a+1408>>2]=0;return-1}J(211930,211687,1696,211941);G()}function _ma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=x(0),k=0,l=0;c=Ii-16|0;Ii=c;a:{e=q[a+4>>2];b=q[e+32>>2];b:{c:{d:{e:{f=q[q[a+24>>2]>>2];if(f>>>0>2]-b>>3>>>0){h=q[b+(f<<3)>>2];g=q[e+16>>2];if(h>>>0>=q[e+20>>2]-g>>4>>>0){break a}b=-4;if(q[a+32>>2]){break b}f:{g:{f=q[a+16>>2];d=q[a+20>>2];if((f|0)!=q[73160]|(d|0)!=q[73161]){if((f|0)==q[73162]&(d|0)==q[73163]){break g}b=-1;if((f|0)!=q[73164]|(d|0)!=q[73165]){break b}f=q[a+8>>2];i=x(v[a+40>>3]);u[(g+(h<<4)|0)+12>>2]=i;d=2;break f}f=q[a+8>>2];i=x(v[a+40>>3]);u[(g+(h<<4)|0)+8>>2]=i;d=0;break f}f=q[a+8>>2];i=x(v[a+40>>3]);u[(g+(h<<4)|0)+4>>2]=i;d=1}k=q[e+4>>2];a=q[e>>2];l=k-a|0;b=(l|0)/104|0;if(!l){break c}g=q[g+(h<<4)>>2];h:{switch(d|0){case 1:break h;case 0:break d;default:break e}}if((a|0)==(k|0)){break a}h=b>>>0>1?b:1;b=0;while(1){i:{a=w(b,104)+a|0;d=q[a+8>>2];if(!d|(g|0)!=q[a+4>>2]|q[a+80>>2]!=(f|0)){break i}j=u[g+16>>2];q[c+12>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;u[c>>2]=i+j;if(!pp(d,1,c)){break i}b=-8;break b}b=b+1|0;if((h|0)==(b|0)){break c}a=q[e>>2];if((q[e+4>>2]-a|0)/104>>>0>b>>>0){continue}break}break a}break a}if((a|0)==(k|0)){break a}h=b>>>0>1?b:1;b=0;while(1){j:{a=w(b,104)+a|0;d=q[a+8>>2];if(!d|(g|0)!=q[a+4>>2]|q[a+80>>2]!=(f|0)){break j}j=u[g+20>>2];q[c+12>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;u[c>>2]=i*j;if(!pp(d,2,c)){break j}b=-8;break b}b=b+1|0;if((h|0)==(b|0)){break c}a=q[e>>2];if((q[e+4>>2]-a|0)/104>>>0>b>>>0){continue}break}break a}if((a|0)==(k|0)){break a}h=b>>>0>1?b:1;b=0;while(1){k:{a=w(b,104)+a|0;d=q[a+8>>2];if(!d|(g|0)!=q[a+4>>2]|q[a+80>>2]!=(f|0)){break k}j=u[g+12>>2];q[c+12>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;u[c>>2]=i*j;if(!pp(d,0,c)){break k}b=-8;break b}b=b+1|0;if((h|0)==(b|0)){break c}a=q[e>>2];if((q[e+4>>2]-a|0)/104>>>0>b>>>0){continue}break}break a}b=0}Ii=c+16|0;return b|0}J(50132,49868,479,50143);G()}function wP(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0;q[a+1516>>2]=0;q[a+1520>>2]=0;a:{if(q[a+108>>2]){break a}k=c;b:{c:{d:{e:{f:while(1){if(!$X(a)){return 0}if(Fj(a,1)){if(r[a+60|0]){q[a+112>>2]=35;return 0}while(1){g:{h:{i:{j:{g=r[a+1388|0];if(!g){if(q[a+1396>>2]){break i}c=q[a+1392>>2];if((c|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break i}if(!(o[a+1387|0]&1)){break j}c=q[a+1392>>2]}h=c+1|0;q[a+1392>>2]=h;g=r[(a+c|0)+1132|0];if((g|0)!=255){q[a+1400>>2]=c;q[a+1396>>2]=1}if((h|0)>=q[a+1128>>2]){q[a+1392>>2]=-1}if(r[a+1388|0]){break e}o[a+1388|0]=g;if(!g){break i}}o[a+1388|0]=g-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];if(c){if(c>>>0>2]){break h}q[a+108>>2]=1;q[a+1408>>2]=0;continue}if((wj(q[a+32>>2])|0)!=-1){break g}q[a+108>>2]=1;q[a+1408>>2]=0;continue}q[a+112>>2]=32}g=0;q[a+1408>>2]=0;if(!q[a+108>>2]){continue f}break a}q[a+44>>2]=c+1}q[a+1408>>2]=0;continue}}break}if(q[a+96>>2]!=q[a+104>>2]?q[a+92>>2]:0){break d}c=a;j=q[a+420>>2];i=0;k:{if((j|0)<1){break k}h=j-1|0;if((j|0)<=16384){i=o[h+211872|0];if((j|0)<=16){break k}i=o[(h>>>5|0)+211872|0]+5|0;if((j|0)<=512){break k}i=o[(h>>>10|0)+211872|0]+10|0;break k}if((j|0)<=16777216){i=o[(h>>>15|0)+211872|0]+15|0;if((j|0)<=524288){break k}i=o[(h>>>20|0)+211872|0]+20|0;break k}i=o[(h>>>25|0)+211872|0]+25|0;if((j|0)<=536870912){break k}i=o[(h>>>30|0)+211872|0]+30|0}c=Fj(c,i);if((c|0)==-1|(c|0)>=q[a+420>>2]){break a}q[f>>2]=c;h=w(c,6)+a|0;if(!r[h+424|0]){h=1;g=q[a+124>>2];c=g>>1;f=0;break c}g=q[a+128>>2];c=g>>1;j=Fj(a,1);f=Fj(a,1);i=r[h+424|0];h=!i;if(!i|j){break c}q[b>>2]=g-q[a+124>>2]>>2;b=q[a+124>>2]+g>>2;break b}J(211824,211687,1555,211845);G()}J(211718,211687,3143,211774);G()}q[b>>2]=0;b=c}q[k>>2]=b;l:{if(!(f|h)){b=w(g,3);q[d>>2]=b-q[a+124>>2]>>2;g=b+q[a+124>>2]>>2;break l}q[d>>2]=c}q[e>>2]=g;g=1}return g}function maa(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=Ii-3392|0;Ii=b;j=q[a+48>>2];Gj(j);a:{if(!r[a+88|0]){break a}o[a+88|0]=0;Pi(2,166128,166148,0);c=q[a>>2];q[b+52>>2]=166139;q[b+48>>2]=c;sj(b- -64|0,1024,166133,b+48|0);g=dl(b- -64|0,166176);b:{if(g){q[b+1152>>2]=120;q[b+1156>>2]=2232;q[b+1144>>2]=0;q[b+1148>>2]=0;q[b+1136>>2]=-894784852;q[b+1140>>2]=7;c:{d:{if((Kl(b+1136|0,1,24,g)|0)!=24){break d}o[b+1100|0]=0;q[b+1096>>2]=g;h=b+1104|0;wn(h,0);c=q[a+20>>2];if(c){k=b+1232|0;e=b+1168|0;while(1){f=q[q[a+16>>2]+(i<<2)>>2];if((f|0)!=-1){while(1){f=q[a+24>>2]+w(f,136)|0;e:{if(r[b+1100|0]){break e}c=f+8|0;if(o[f+121|0]&1){q[b+32>>2]=c;Pi(3,166128,166935,b+32|0);break e}Ui(b+1160|0,0,2232);c=f;d=q[c+4>>2];q[b+1160>>2]=q[c>>2];q[b+1164>>2]=d;d=q[c+68>>2];q[e+56>>2]=q[c+64>>2];q[e+60>>2]=d;d=q[c+60>>2];q[e+48>>2]=q[c+56>>2];q[e+52>>2]=d;d=q[c+52>>2];q[e+40>>2]=q[c+48>>2];q[e+44>>2]=d;d=q[c+44>>2];q[e+32>>2]=q[c+40>>2];q[e+36>>2]=d;d=q[c+36>>2];q[e+24>>2]=q[c+32>>2];q[e+28>>2]=d;d=q[c+28>>2];q[e+16>>2]=q[c+24>>2];q[e+20>>2]=d;d=q[c+20>>2];q[e+8>>2]=q[c+16>>2];q[e+12>>2]=d;d=q[c+12>>2];q[e>>2]=q[c+8>>2];q[e+4>>2]=d;Pj(k,q[c+72>>2],2124);d=q[c+84>>2];q[b+3360>>2]=q[c+80>>2];q[b+3364>>2]=d;d=q[c+92>>2];q[b+3368>>2]=q[c+88>>2];q[b+3372>>2]=d;d=q[c+100>>2];q[b+3376>>2]=q[c+96>>2];q[b+3380>>2]=d;d=q[c+108>>2];q[b+3384>>2]=q[c+104>>2];q[b+3388>>2]=d;Cl(h,b+1160|0,2232);if((Kl(b+1160|0,1,2232,q[b+1096>>2])|0)==2232){break e}o[b+1100|0]=1}f=q[f+128>>2];if((f|0)!=-1){continue}break}c=q[a+20>>2]}i=i+1|0;if(i>>>0>>0){continue}break}}if(r[b+1100|0]){break d}Uk(g,0,0);q[b+1144>>2]=ro(h);q[b+1148>>2]=Li;a=Kl(b+1136|0,1,24,g);rk(g);if((a|0)!=24){break c}break a}rk(g)}q[b+16>>2]=b- -64;Pi(4,166128,166179,b+16|0);Mn(b- -64|0);break b}q[b>>2]=b- -64;Pi(4,166128,166212,b)}}Bj(j);Ii=b+3392|0}function U7(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=0,h=0,i=0,j=x(0),k=x(0),l=0,m=x(0),n=x(0);g=Ii+ -64|0;Ii=g;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);i=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){Dj(a,1,5);e=q[a+8>>2]-q[a+12>>2]>>4;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=0;c:{if(Hj(a,1)){while(1){d:{e:{f:{g:{h:{h=jj(a,-2);switch(h-16|0){case 16:break g;case 0:break e;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:break f;default:break h}}if((h|0)!=1){break f}c=rm(a,-1);j=u[c+12>>2];k=u[c+8>>2];m=u[c+4>>2];f=u[c>>2];break d}d=jj(a,-1);break d}Ri(a,-3);if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){break b}q[g+16>>2]=115561;a=Qi(a,117185,g+16|0);break c}n=x(jj(a,-1)|0)}b=b|h;Ri(a,-2);if(Hj(a,1)){continue}break}h=b;b=d}if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){break a}j=x(j*x(255));i:{if(j=x(0)){e=~~j>>>0;break i}e=0}d=e>>>8|0;c=e<<24;k=x(k*x(255));j:{if(k=x(0)){e=~~k>>>0;break j}e=0}l=e>>>16|0;e=c|e<<16;d=d|l;f=x(f*x(255));k:{if(f=x(0)){c=~~f>>>0;break k}c=0}l=c|e;c=g;q[c+32>>2]=h;q[c+36>>2]=0;q[c+24>>2]=5;q[c+56>>2]=b;q[c+60>>2]=0;q[c+48>>2]=(Pza(n),Lza(2));q[c+52>>2]=0;e=c;h=l;f=x(m*x(255));l:{if(f=x(0)){b=~~f>>>0;break l}b=0}l=b>>>24|0;q[e+40>>2]=h|b<<8;q[c+44>>2]=d|l;d=q[i+4>>2];if((d|0)!=q[i+8>>2]){q[i+4>>2]=d+40;a=g;b=q[a+60>>2];q[d+32>>2]=q[a+56>>2];q[d+36>>2]=b;b=q[a+52>>2];q[d+24>>2]=q[a+48>>2];q[d+28>>2]=b;b=q[a+44>>2];q[d+16>>2]=q[a+40>>2];q[d+20>>2]=b;b=q[a+36>>2];q[d+8>>2]=q[a+32>>2];q[d+12>>2]=b;b=q[a+28>>2];q[d>>2]=q[a+24>>2];q[d+4>>2]=b;a=0;break c}q[g>>2]=(q[i+8>>2]-q[i>>2]|0)/40;a=Qi(a,115614,g)}Ii=g- -64|0;return a|0}J(115568,115465,478,119531);G()}J(115568,115465,1732,117166);G()}J(115568,115465,1737,117166);G()}function Ml(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=Ii-256|0;Ii=h;q[h+248>>2]=0;q[h+252>>2]=0;q[h+240>>2]=0;q[h+244>>2]=0;q[h+232>>2]=0;q[h+236>>2]=0;q[h+224>>2]=0;q[h+228>>2]=0;a:{b:{if(qm(a,h+224|0)){q[h+216>>2]=0;q[h+220>>2]=0;q[h+208>>2]=0;q[h+212>>2]=0;q[h+200>>2]=0;q[h+204>>2]=0;q[h+192>>2]=0;q[h+196>>2]=0;Gk(a,b,h+192|0,h+224|0);c:{l=q[h+224>>2];m=q[h+228>>2];if((l|0)==q[h+192>>2]&(m|0)==q[h+196>>2]){d:{if(!c){break d}j=q[c>>2];if(!j){break d}n=q[j+3216>>2];i=q[j+3220>>2]}if((l|0)==(n|0)&(i|0)==(m|0)){break c}}Qi(a,14557,0);break a}k=jn(c,q[h+208>>2],q[h+212>>2]);if(!k){q[h>>2]=uj(a,b,0);Qi(a,14627,h);break a}b=q[k+84>>2];m=q[b+4>>2];e:{if(m){o=q[b>>2];b=0;n=q[h+216>>2];i=q[h+220>>2];c=0;while(1){j=o+w(b,96)|0;l=q[q[j+16>>2]+100>>2];if(q[j>>2]==(n|0)&q[j+4>>2]==(i|0)){q[e>>2]=l&65536?q[(k+(c<<2)|0)+156>>2]:0;b=q[(o+w(b,96)|0)+20>>2];c=(d|0)!=0;break e}c=(l>>>16&1)+c|0;b=b+1|0;if((m|0)!=(b|0)){continue}break}}if(d|e){break b}c=0}i=q[q[q[k+80>>2]+8>>2]>>2];if(t[q[i+4>>2]>>2]>b>>>0){i=q[(i+(b<<2)|0)+12>>2]}else{i=0}if(g){q[g>>2]=i}f:{if(!c){break f}g=0;c=q[q[k+80>>2]+8>>2];g:{if(!c){break g}c=q[c>>2];if(!c){break g}g=q[c>>2]}if(Vl(g,d,h+60|0)){q[h+48>>2]=d;Qi(a,14688,h+48|0);break a}g=0;c=q[q[k+80>>2]+8>>2];h:{if(!c){break h}c=q[c>>2];if(!c){break h}g=q[c+4>>2]}b=w(b,112)+g|0;if(q[b+8>>2]!=q[h+60>>2]){q[h+36>>2]=q[b+12>>2];q[h+32>>2]=d;Qi(a,14718,h+32|0);break a}a=q[b+56>>2];if(!a){break f}q[h+68>>2]=e;q[h+64>>2]=i;q[e>>2]=Mi[a|0](h- -64|0)}if(!f){break a}a=q[h+196>>2];q[f>>2]=q[h+192>>2];q[f+4>>2]=a;a=q[h+220>>2];q[f+24>>2]=q[h+216>>2];q[f+28>>2]=a;a=q[h+212>>2];q[f+16>>2]=q[h+208>>2];q[f+20>>2]=a;a=q[h+204>>2];q[f+8>>2]=q[h+200>>2];q[f+12>>2]=a;break a}Qi(a,14769,0);break a}q[h+16>>2]=_s(h+192|0,h- -64|0,128);Qi(a,14649,h+16|0)}Ii=h+256|0}function zx(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Ii-16|0;Ii=h;j=Jq(a,b,c,e);f=q[e>>2];i=q[f+12>>2];a:{if(!i){d=j;break a}g=q[d>>2];k=q[f+8>>2];f=0;b:{while(1){if(!dj(g,q[k+(f<<2)>>2])){break b}f=f+1|0;if((i|0)!=(f|0)){continue}break}f=-1}l=q[c>>2];g=0;c:{while(1){if(!dj(l,q[k+(g<<2)>>2])){break c}g=g+1|0;if((i|0)!=(g|0)){continue}break}g=-1}if((f|0)>=(g|0)){d=j;break a}f=q[c+12>>2];q[h+8>>2]=q[c+8>>2];q[h+12>>2]=f;f=q[c+4>>2];q[h>>2]=q[c>>2];q[h+4>>2]=f;f=d+8|0;g=q[f+4>>2];q[c+8>>2]=q[f>>2];q[c+12>>2]=g;f=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=f;f=q[h+12>>2];q[d+8>>2]=q[h+8>>2];q[d+12>>2]=f;f=q[h+4>>2];q[d>>2]=q[h>>2];q[d+4>>2]=f;d=j+1|0;f=q[e>>2];i=q[f+12>>2];if(!i){break a}g=q[c>>2];k=q[f+8>>2];f=0;d:{while(1){if(!dj(g,q[k+(f<<2)>>2])){break d}f=f+1|0;if((i|0)!=(f|0)){continue}break}f=-1}l=q[b>>2];g=0;e:{while(1){if(!dj(l,q[k+(g<<2)>>2])){break e}g=g+1|0;if((i|0)!=(g|0)){continue}break}g=-1}if((f|0)>=(g|0)){break a}d=q[b+12>>2];q[h+8>>2]=q[b+8>>2];q[h+12>>2]=d;d=q[b+4>>2];q[h>>2]=q[b>>2];q[h+4>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;d=q[h+12>>2];q[c+8>>2]=q[h+8>>2];q[c+12>>2]=d;d=q[h+4>>2];q[c>>2]=q[h>>2];q[c+4>>2]=d;d=j+2|0;e=q[e>>2];c=q[e+12>>2];if(!c){break a}g=q[b>>2];e=q[e+8>>2];f=0;f:{while(1){if(!dj(g,q[e+(f<<2)>>2])){break f}f=f+1|0;if((c|0)!=(f|0)){continue}break}f=-1}i=q[a>>2];g=0;g:{while(1){if(!dj(i,q[e+(g<<2)>>2])){break g}g=g+1|0;if((c|0)!=(g|0)){continue}break}g=-1}if((f|0)>=(g|0)){break a}c=q[a+12>>2];q[h+8>>2]=q[a+8>>2];q[h+12>>2]=c;c=q[a+4>>2];q[h>>2]=q[a>>2];q[h+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;a=q[h+12>>2];q[b+8>>2]=q[h+8>>2];q[b+12>>2]=a;a=q[h+4>>2];q[b>>2]=q[h>>2];q[b+4>>2]=a;d=j+3|0}Ii=h+16|0;return d}function xL(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=0,k=0,l=0,m=0,n=0;c=Ii-160|0;Ii=c;a:{e=q[a+8>>2];if(e){g=q[a+12>>2];b:{if(!r[266420]){break b}f=q[e+148>>2];b=q[e+144>>2];d=f-b|0;if(!d){break b}if((b|0)!=(f|0)){f=b-f|0;f=((d|0)<(f|0)?f:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(f,(d|0)<1?d:1);j=d>>>0>1?d:1;d=0;while(1){b=q[(d<<2)+b>>2];h=q[b>>2];f=q[h+136>>2];if(!(!f|q[f+32>>2]>-1)){k=q[h+164>>2];l=WH(c+56|0);ZK(e,b,q[b>>2],k,1,l);p[b+20>>1]=s[c+86>>1];h=q[h+136>>2];if(q[h+12>>2]==q[h+8>>2]){break a}q[b+8>>2]=0;UK(e,b);q[f+32>>2]=q[f+32>>2]&2147483647}d=d+1|0;if((j|0)==(d|0)){break b}b=q[e+144>>2];if(q[e+148>>2]-b>>2>>>0>d>>>0){continue}break}}J(39032,38457,479,38435);G()}q[c+136>>2]=0;q[c+132>>2]=g;q[c+128>>2]=e;q[c+120>>2]=0;q[c+116>>2]=g;q[c+112>>2]=e;b=U8(c+56|0);q[b+48>>2]=e;q[b+44>>2]=168;q[b+40>>2]=e;q[b+36>>2]=169;q[b+20>>2]=170;q[b+12>>2]=171;q[b+32>>2]=e;q[b+28>>2]=172;q[b+24>>2]=c+112;q[b+16>>2]=c+128;o[b+4|0]=r[g+18|0];q[b+8>>2]=q[g+20>>2];i=u[q[a+4>>2]+4>>2];u[b>>2]=i;a=q[a>>2];q[72474]=0;u[e+132>>2]=i;q[c+156>>2]=e;o[c+148|0]=1;q[c+144>>2]=g;q[c+152>>2]=a;c:{if(r[g+17|0]){break c}}oq(0,0,173,c+144|0);if(!r[c+148|0]){Pi(3,37377,38560,0)}q[c+144>>2]=0;d=q[c+136>>2];b=q[g+4>>2];d:{if(d>>>0>=b>>>0){if(r[289920]){break d}q[c+32>>2]=b;q[c+36>>2]=q[57958];Pi(3,37377,38620,c+32|0)}o[289920]=b>>>0<=d>>>0}d=q[c+120>>2];b=q[g+12>>2];e:{if(d>>>0>=b>>>0){if(r[289921]){break e}q[c+16>>2]=b;q[c+20>>2]=q[57959];Pi(3,37377,38725,c+16|0)}o[289921]=b>>>0<=d>>>0}f:{if(!a){break f}b=q[a>>2];if(!b){break f}m=q[b+3216>>2];n=q[b+3220>>2]}q[c+144>>2]=m;q[c+148>>2]=n;Mr(q[a>>2],c+144|0,1);if(q[72474]>=1){Uo(q[a>>2])}a=q[e+148>>2]-q[e+144>>2]>>2;q[72444]=a+q[72444];q[c+48>>2]=a;q[c+52>>2]=0;q[c+8>>2]=a;q[c+12>>2]=0}Ii=c+160|0;return}J(38446,38457,421,38513);G()}function qw(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=Ii-16|0;Ii=i;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{if(!b){c=s[a+138>>1];d=c>>>16|0;g=c<<16;if(!(d|g^2147418112)){break d}f=q[a+80>>2];if(q[f+1084>>2]-q[f+1080>>2]>>1>>>0>=t[f+1032>>2]){break g}c=a+136|0;break j}c=q[b+140>>2];if(!0&(q[b+136>>2]&255)>>>0>=127|d){q[i>>2]=127;Pi(4,7319,9016,i);e=-6;break d}f=q[a+80>>2];c=c&32767;if((c|0)!=32767){d=q[f+1036>>2];e=q[f+1040>>2]-d>>2;while(1){if(c>>>0>=e>>>0){break a}c=q[d+(c<<2)>>2];if((c|0)==(a|0)){break h}c=s[c+138>>1];if((c|0)!=32767){continue}break}}if(q[b+80>>2]!=(f|0)){break c}c=q[a+136>>2];d=((c&255)<<4)+f|0;if(t[f+1032>>2]<=q[d+1100>>2]-q[d+1096>>2]>>1>>>0){break i}g=c&-65536;d=0;c=a+136|0}if(d|g^2147418112){pw(f,a)}Kt(f,a);if(!b){break f}e=q[b+148>>2];d=e>>>16&32767;if((d|0)!=32767){e=q[f+1036>>2];if(d>>>0>=q[f+1040>>2]-e>>2>>>0){break a}d=q[e+(d<<2)>>2];e=q[d+136>>2];d=q[d+140>>2];if(r[b+136|0]!=((e&255)-1|0)){break b}q[a+148>>2]=q[a+148>>2]&-32768|d&32767;e=q[b+148>>2]}q[b+148>>2]=((q[c+4>>2]&65535)<<16|q[c>>2]>>>16)&2147418112|e&-2147418113;g=q[c+4>>2];e=q[c>>2];h=((q[b+140>>2]&65535)<<16|q[b+136>>2]>>>16)&2147418112|e&65535;q[c>>2]=h;d=g;q[c+4>>2]=d;g=h&2147483392;h=s[c+8>>1];c=e;b=s[b+136>>1]+1&255;break e}J(9210,7192,3094,9200);G()}Pi(4,7319,9074,0);e=-7;break d}J(9291,7192,3098,9200);G()}b=q[c>>2];g=b&65280;d=q[c+4>>2];h=s[c+8>>1];c=b;b=2147418112}q[a+136>>2]=b|g;q[a+140>>2]=d;p[a+144>>1]=h;zw(f,a);e=0;b=c&255;d=r[a+136|0];c=b-d|0;if((c|0)>=0){if(!c){break d}b=a;a=0;while(1){ww(f,q[b+148>>2]);a=a+1|0;if((c|0)!=(a|0)){continue}break}break d}b=d-b|0;c=(b|0)>1?b:1;b=a;a=0;while(1){gM(f,q[b+148>>2]);a=a+1|0;if((c|0)!=(a|0)){continue}break}}Ii=i+16|0;return e}J(9156,7192,3093,9200);G()}J(9357,7192,3118,9200);G()}J(12419,9962,479,9454);G()}function jsa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{c:{d:{e:{e=Gt(a);f:{if(o[e+108|0]&1){a=q[e+48>>2];if(!a){break f}c=q[q[e+44>>2]+((b>>>0)%(a>>>0)<<2)>>2];if((c|0)==-1){break f}a=q[e+52>>2];while(1){d=a+w(c,12)|0;if(q[d>>2]!=(b|0)){c=q[d+8>>2];if((c|0)!=-1){continue}break f}break}c=s[(a+w(c,12)|0)+4>>1];if((c|0)==65535){break f}while(1){b=c&65535;a=q[e+16>>2];if(b>>>0>=q[e+20>>2]-a>>1>>>0){break a}a=s[a+(b<<1)>>1];c=q[e>>2];if(a>>>0>=(q[e+4>>2]-c|0)/104>>>0){break a}a=c+w(a,104)|0;o[a+96|0]=r[a+96|0]&252;c=s[a+94>>1];if((c|0)!=65535){continue}break}break f}a=q[e+48>>2];if(!a){break f}i=e+44|0;c=q[q[i>>2]+((b>>>0)%(a>>>0)<<2)>>2];if((c|0)==-1){break f}a=q[e+52>>2];while(1){d=a+w(c,12)|0;if(q[d>>2]!=(b|0)){c=q[d+8>>2];if((c|0)!=-1){continue}break f}break}a=s[(a+w(c,12)|0)+4>>1];if((a|0)!=65535){d=q[e+4>>2];c=q[e>>2];h=(d-c|0)/104|0;while(1){f=q[e+16>>2];if(q[e+20>>2]-f>>1>>>0<=a>>>0){break a}g=(d-c|0)/104|0;d=s[f+(a<<1)>>1];if(g>>>0<=d>>>0){break a}c=w(d,104)+c|0;o[c+96|0]=r[c+96|0]&252;d=q[c+76>>2];if(d){Mi[d|0](q[c>>2],q[c+8>>2],q[c+12>>2],q[c+16>>2],q[c+20>>2],0,q[c+80>>2],q[c+84>>2]);$L(e,c)}d=q[c+36>>2];if(d){Mi[d|0](c+28|0)}f=q[e+32>>2];if(!f){break e}d=s[e+38>>1];if(!d|d>>>0>s[e+36>>1]){break d}d=d-1|0;p[e+38>>1]=d;p[f+((d&65535)<<1)>>1]=a;d=q[e>>2];j=(c-d|0)/104|0;f=j&65535;g=q[e+4>>2];if(f>>>0>=(g-d|0)/104>>>0){break c}a=s[c+94>>1];k=w(f,104);Ti(d+k|0,g-104|0,97);d=q[e+4>>2]-104|0;q[e+4>>2]=d;c=q[e>>2];if(d>>>0>>0){break b}h=h-1|0;if(f>>>0>>0){g=s[(c+k|0)+92>>1];f=q[e+16>>2];if(g>>>0>=q[e+20>>2]-f>>1>>>0){break a}p[f+(g<<1)>>1]=j}if((a|0)!=65535){continue}break}}Nv(i,b)}return}J(6137,6144,140,6662);G()}J(6667,6144,141,6662);G()}J(6790,6386,513,6805);G()}J(6815,6386,516,6805);G()}J(6640,6386,479,6651);G()}function cL(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=x(0),t=0,v=0;h=Ii-336|0;Ii=h;a:{if(f){while(1){k=q[((l<<4)+b|0)+8>>2];Xl(h+320|0,a,k,3);Xl(h+304|0,a,k,5);Xl(h+288|0,a,k,6);if((Ap(a,k)|0)!=1){break a}m=YA(a,k);if(m){i=To(a,k);b:{if(i){t=q[i>>2];break b}t=q[m+16>>2]}v=dA(h+16|0);j=l<<2;n=u[j+d>>2];u[h+92>>2]=n;u[h+88>>2]=u[h+328>>2];i=q[h+324>>2];q[h+80>>2]=q[h+320>>2];q[h+84>>2]=i;u[h+104>>2]=u[h+312>>2];i=q[h+308>>2];q[h+96>>2]=q[h+304>>2];q[h+100>>2]=i;i=q[h+292>>2];q[h+112>>2]=q[h+288>>2];q[h+116>>2]=i;u[h+120>>2]=u[h+296>>2];u[h+108>>2]=n*u[h+316>>2];u[h+124>>2]=n*u[h+300>>2];q[h+128>>2]=UA(a,k);i=(l<<6)+c|0;u[h+16>>2]=u[i>>2];u[h+20>>2]=u[i+4>>2];u[h+24>>2]=u[i+8>>2];u[h+28>>2]=u[i+12>>2];u[h+32>>2]=u[i+16>>2];u[h+36>>2]=u[i+20>>2];u[h+40>>2]=u[i+24>>2];u[h+44>>2]=u[i+28>>2];u[h+48>>2]=u[i+32>>2];u[h+52>>2]=u[i+36>>2];u[h+56>>2]=u[i+40>>2];u[h+60>>2]=u[i+44>>2];u[h+64>>2]=u[i+48>>2];u[h+68>>2]=u[i+52>>2];u[h+72>>2]=u[i+56>>2];u[h+76>>2]=u[i+60>>2];p[h+204>>1]=s[a+386>>1];o[h+224|0]=eK(a,k);u[h+216>>2]=WA(a,k);u[h+220>>2]=VA(a,k);Xl(h,a,k,4);i=q[h+4>>2];q[h+208>>2]=q[h>>2];q[h+212>>2]=i;j=q[e+j>>2];o[h+272|0]=r[h+272|0]|1;i=h;c:{d:{if(j){q[h+244>>2]=2;q[h+248>>2]=2;q[h+236>>2]=5;q[h+240>>2]=0;o[h+268|0]=r[j|0];o[h+269|0]=r[j+1|0];o[h+270|0]=r[j+2|0];j=r[h+271|0]&-48|r[j+3|0]&15;o[h+271|0]=j;if(!r[g+16|0]){break c}o[g+16|0]=0;j=j|16;break d}o[h+270|0]=255;p[h+268>>1]=65280;q[h+244>>2]=0;q[h+248>>2]=0;q[h+236>>2]=7;q[h+240>>2]=0;j=r[h+271|0]&-48|15}o[i+271|0]=j}i=XA(a,k);if(i>>>0<=8){i=i<<2;q[h+232>>2]=q[i+44236>>2];q[h+228>>2]=q[i+44200>>2]}cA(q[g>>2],m,t,0,v)}l=l+1|0;if((l|0)!=(f|0)){continue}break}}c=q[g>>2];b=s[a+386>>1];a=q[g+12>>2];q[g+12>>2]=a+1;bA(c,2,a+(b<<16)|0);Ii=h+336|0;return}J(42373,41161,1e3,42408);G()}function Rha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=Ii-48|0;Ii=f;g=nj(f+24|0,a,0,65882,942);j=oo(a,1,1,0);k=$j(a,2);l=Li;h=jj(a,4);Dj(a,3,5);e=al(a,3);a:{if(e){if(h>>>0>=9){q[f>>2]=h;i=Kj(g,67911,f);break a}if((h&-5)==3){i=Kj(g,67953,0);break a}ej(a,3);b:{c:{d:{switch(h|0){case 8:d=Yi(w(wq(8),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){u[(b<<2)+d>>2]=fj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 0:d=Yi(w(wq(0),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){o[b+d|0]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 1:d=Yi(w(wq(1),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){p[(b<<1)+d>>1]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 2:d=Yi(w(wq(2),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){q[(b<<2)+d>>2]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 4:d=Yi(w(wq(4),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){o[b+d|0]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 5:d=Yi(w(wq(5),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){p[(b<<1)+d>>1]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}break c;case 6:break d;default:break b}}d=Yi(w(wq(6),e));c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(!Hj(a,-2)){break c}while(1){q[(b<<2)+d>>2]=jj(a,-1);jj(a,-2);Ri(a,-2);b=b+1|0;if(Hj(a,-2)){continue}break}}Ri(a,-2)}b=jN(j,k,l,d,e,h);Ni(d);if(!b){break a}a=f;if(b>>>0<=11){b=q[(b<<2)+262624>>2]}else{b=153853}q[a+16>>2]=b;i=Kj(g,67996,f+16|0);break a}i=Kj(g,68031,0)}mj(g);Ii=f+48|0;return i|0}function RN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0;g=Ii-16|0;Ii=g;h=q[a+104>>2];c=r[h+99376|0];a:{if(h-15>>>0<=2){c=(c<<9)+302480|0;d=r[c+(r[a+22|0]<<1)|0];e=r[c+(r[a+21|0]<<1)|0];c=g+8|0;o[c+3|0]=255;o[c+2|0]=e;o[c+1|0]=e;o[c|0]=e;c=Xw(c);o[b|0]=c;o[b+1|0]=c>>>8;c=g+8|0;o[c+3|0]=255;o[c+2|0]=d;o[c+1|0]=d;o[c|0]=d;break a}c=(c<<9)+302480|0;e=r[c+(r[a+21|0]<<1)|0];f=r[c+(r[a+23|0]<<1)|0];i=r[c+(r[a+25|0]<<1)|0];d=g+8|0;o[d+3|0]=255;o[d+2|0]=i;o[d+1|0]=f;o[d|0]=e;d=Xw(d);o[b|0]=d;o[b+1|0]=d>>>8;d=r[c+(r[a+22|0]<<1)|0];e=r[c+(r[a+24|0]<<1)|0];f=r[c+(r[a+26|0]<<1)|0];c=g+8|0;o[c+3|0]=255;o[c+2|0]=f;o[c+1|0]=e;o[c|0]=d}c=Xw(c);o[b+2|0]=c;o[b+3|0]=c>>>8;f=r[b|0]|r[b+1|0]<<8;i=r[b+2|0]|r[b+3|0]<<8;b:{c:{if((r[b|0]|r[b+1|0]<<8)==(r[b+2|0]|r[b+3|0]<<8)){d:{if(!i){if(!f){a=0;f=1;c=85;break d}J(106336,96899,15550,106393);G()}a=i-1|0;if((a&65535)>>>0>=f>>>0){break b}c=0}o[b|0]=f;o[b+1|0]=f>>>8;o[b+2|0]=a;o[b+3|0]=a>>>8;a=w(c,16843009);o[b+4|0]=a;o[b+5|0]=a>>>8;o[b+6|0]=a>>>16;o[b+7|0]=a>>>24;break c}if(f>>>0>>0){Fx(b,b+2|0);Fx(b+1|0,b+3|0)}c=q[(r[h+99312|0]<<2)+248528>>2];e=a+39|0;d=r[h+99440|0]-1|0;h=r[c+r[e+(1<>>0>>0;c=a^r[c+r[e+(9<>>6;c=(c<<4|(a^s)<<2|a^p)<<4|(a^n)<<2|a^m;o[b+6|0]=c>>>6;c=(c<<4|(a^l)<<2|a^k)<<4|(a^j)<<2|a^h;o[b+5|0]=c>>>6;o[b+4|0]=a^t|c<<2}Ii=g+16|0;return}J(106373,96899,15557,106393);G()}function Mpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{e=q[a+8>>2];d=q[e+20>>2];b=q[e+16>>2];c=d-b|0;c:{if(!c){break c}h=q[q[a+16>>2]>>2];f=c>>2;c=0;while(1){i=(c<<2)+b|0;g=q[i>>2]==(h|0)|g;if(!(!(g&1)|f-1>>>0<=c>>>0)){c=c+1|0;if(c>>>0>=f>>>0){break b}q[i>>2]=q[(c<<2)+b>>2];d=q[e+20>>2];b=q[e+16>>2]}j=j+1|0;c=j&255;f=d-b>>2;if(c>>>0>>0){continue}break}if(!(g&1)){break c}if((b|0)==(d|0)){break a}q[e+20>>2]=d-4}d:{e:{g=q[e+4>>2];f=q[e>>2];if((g|0)==(f|0)){break e}h=(g-f|0)/176|0;a=q[a+4>>2];c=0;b=0;while(1){d=f+w(c,176)|0;if((a|0)!=q[d>>2]){b=b+1|0;c=b&255;if(h>>>0>c>>>0){continue}break e}break}a=g-176|0;b=q[a+4>>2];q[d>>2]=q[a>>2];q[d+4>>2]=b;b=q[a+20>>2];q[d+16>>2]=q[a+16>>2];q[d+20>>2]=b;b=q[a+12>>2];q[d+8>>2]=q[a+8>>2];q[d+12>>2]=b;q[d+24>>2]=q[a+24>>2];b=f+w(c,176)|0;u[b+32>>2]=u[a+32>>2];u[b+36>>2]=u[a+36>>2];u[b+40>>2]=u[a+40>>2];u[b+44>>2]=u[a+44>>2];u[b+48>>2]=u[a+48>>2];u[b+52>>2]=u[a+52>>2];u[b+56>>2]=u[a+56>>2];u[b+60>>2]=u[a+60>>2];u[b- -64>>2]=u[a- -64>>2];u[b+68>>2]=u[a+68>>2];u[b+72>>2]=u[a+72>>2];u[b+76>>2]=u[a+76>>2];u[b+80>>2]=u[a+80>>2];u[b+84>>2]=u[a+84>>2];u[b+88>>2]=u[a+88>>2];u[b+92>>2]=u[a+92>>2];u[b+96>>2]=u[a+96>>2];u[b+100>>2]=u[a+100>>2];u[b+104>>2]=u[a+104>>2];u[b+108>>2]=u[a+108>>2];u[b+112>>2]=u[a+112>>2];u[b+116>>2]=u[a+116>>2];u[b+120>>2]=u[a+120>>2];u[b+124>>2]=u[a+124>>2];u[b+128>>2]=u[a+128>>2];u[b+132>>2]=u[a+132>>2];u[b+136>>2]=u[a+136>>2];u[b+140>>2]=u[a+140>>2];u[b+144>>2]=u[a+144>>2];u[b+148>>2]=u[a+148>>2];u[b+152>>2]=u[a+152>>2];u[b+156>>2]=u[a+156>>2];q[b+160>>2]=q[a+160>>2];b=q[e+4>>2]-176|0;q[e+4>>2]=b;a=0;if(b>>>0>=t[e>>2]){break d}J(49074,48930,516,49064);G()}Pi(4,48644,48652,0);a=-1e3}return a|0}J(49027,48930,479,49038);G()}J(49049,48930,548,49060);G()}function qma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-448|0;Ii=b;h=nj(b+168|0,a,1,76581,2262);c=kj(a,1,0);q[b+160>>2]=0;q[b+164>>2]=0;jB(a,c,78008,b+160|0);Dj(a,2,5);ej(a,2);Zi(a,-1,78017);d=gt(a,-1);Ri(a,-2);Zi(a,-1,78024);e=Rt(a,78024,1);Ri(a,-2);Ri(a,-2);g=q[q[jk(a)+80>>2]+8>>2];q[b+156>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+144>>2]=0;q[b+148>>2]=0;q[b+136>>2]=0;q[b+140>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;q[b+120>>2]=0;q[b+124>>2]=0;q[b+112>>2]=1;q[b+96>>2]=1;q[b+88>>2]=0;q[b+92>>2]=0;q[b+92>>2]=4;q[b+108>>2]=b+156;q[b+84>>2]=1;q[b+80>>2]=b+88;q[b+72>>2]=0;q[b+76>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;a:{b:{if(!Nt(b+80|0,q[58382],b- -64|0)){q[b+60>>2]=0;f=c;c=q[b+64>>2];c=Uz(q[74445],f,c,q[b+68>>2]-c|0,b+60|0);if(c){d=q[b+160>>2];e=q[b+164>>2];q[b+48>>2]=aj(d,e);q[b+40>>2]=d;q[b+44>>2]=e;q[b+32>>2]=c;sj(b+192|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+32|0);q[b+16>>2]=b+192;a=Qi(a,75832,b+16|0);break a}c=q[(q[d+4>>2]==2?q[d>>2]+4|0:d)>>2];if(q[d+4>>2]==2){c=mN(c,b+56|0);if(c){break b}c=q[b+56>>2]}q[q[b+60>>2]>>2]=0;q[q[b+60>>2]+4>>2]=c;i=Kw(c);f=q[b+60>>2];q[f+20>>2]=i;Kp(c,f+16|0);xq(c,q[b+60>>2]+24|0);if(e){c:{d:{switch(q[d+4>>2]-1|0){case 0:tp(q[74445],q[b+60>>2]);break c;case 1:break d;default:break c}}cj(q[74445],q[d>>2]);tp(q[74445],q[b+60>>2])}q[d+4>>2]=2;q[d>>2]=q[b+60>>2]}d=q[b+160>>2];c=q[b+164>>2];KB(g,d,c);lk(a,d,c);a=1;break a}J(77e3,76581,2300,78043);G()}qr(q[74445],q[d>>2],b+192|0);e=aj(q[b+160>>2],q[b+164>>2]);g=aj(q[b+192>>2],q[b+196>>2]);if(c>>>0<=11){d=q[(c<<2)+262624>>2]}else{d=153853}q[b+12>>2]=c;q[b+8>>2]=d;q[b+4>>2]=g;q[b>>2]=e;a=Qi(a,78056,b)}e:{if(o[b+76|0]&1){break e}d=q[b+64>>2];if(!d){break e}Ni(d)}mj(h);Ii=b+448|0;return a|0}function ak(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=Ii-1088|0;Ii=e;a:{b:{c:{d:{e:{if(b){if(!c){break e}q[c>>2]=0;f=r[b|0];f:{if((f|0)!=47){if(!f){Pi(4,24640,24649,0);d=-3;break f}q[e>>2]=b;Pi(4,24640,24669,e);d=-3;break f}l=q[a+5140>>2];Gj(l);d=q[a+5144>>2];g:{if(d){g=q[a+5148>>2];f=q[a+5152>>2];break g}g=q[a+5148>>2];q[a+5152>>2]=g;f=g}j=a+5148|0;q[a+5144>>2]=d+1;i=a+5152|0;h:{i:{d=f-g|0;if(!d){break i}k=d>>2;h=g-f|0;h=((d|0)<(h|0)?h:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(h,(d|0)<1?d:1);h=d>>>0>1?d:1;d=0;while(1){if(dj(q[(d<<2)+g>>2],b)){d=d+1|0;if((h|0)!=(d|0)){continue}break i}break}d=0;Pi(4,24640,25045,0);Pi(4,24640,25078,0);while(1){c=q[j>>2];if(q[i>>2]-c>>2>>>0<=d>>>0){break d}q[e+36>>2]=q[c+(d<<2)>>2];q[e+32>>2]=d;Pi(4,24640,25095,e+32|0);d=d+1|0;if((h|0)!=(d|0)){continue}break}q[e+20>>2]=b;q[e+16>>2]=k;Pi(4,24640,25095,e+16|0);d=-16;break h}h=a+5156|0;g=q[h>>2];if((g|0)==(f|0)){if(o[a+5160|0]&1){break a}Wi((f-q[j>>2]>>2)+16|0,4,j,h,i);f=q[i>>2];g=q[h>>2]}if((f|0)==(g|0)){break c}q[a+5152>>2]=f+4;q[f>>2]=b;q[e+1080>>2]=0;Mo(b,e+48|0);g=Wl(e+48|0,hj(e+48|0));f=Li;k=f;d=iH(a,e+48|0,g,f,c,e+44|0);j:{if(d){break j}d=0;if(q[c>>2]){break j}q[e+40>>2]=0;d=a+7368|0;n=a+7372|0;m=a+7376|0;f=q[a+7368>>2];if((q[m>>2]-f|0)!=1048576){if(o[a+7380|0]&1){break a}Wi(1048576,1,d,m,a+7372|0);f=q[a+7368>>2]}q[n>>2]=f;d=zv(a,e+48|0,e+40|0,d);if(d){break j}d=sH(a,q[e+44>>2],b,e+48|0,g,k,q[a+7368>>2],q[e+40>>2],c)}b=q[j>>2];c=(q[i>>2]-b>>2)-1|0;if(c>>>0>q[h>>2]-b>>2>>>0){break b}q[i>>2]=b+(c<<2)}q[a+5144>>2]=q[a+5144>>2]-1;Bj(l)}Ii=e+1088|0;return d}J(24992,24997,779,25041);G()}J(25032,24997,780,25041);G()}J(26961,26878,479,26972);G()}J(26983,26878,533,27007);G()}J(26934,26878,506,26953);G()}J(26803,26878,493,26726);G()}function dva(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-224|0;Ii=b;e=a;d=a;if((Vi(a,1)|0)==8){f=1;e=Gn(a,1)}c=d;d=f|2;a:{if(Oj(c,d)){c=hl(a,d);Ri(a,-2);break a}c=(a|0)==(e|0)}b:{c:{if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){bj(a,147501,0);break c}if(!uk(a,f+1|0)){break b}bj(a,147206,1)}bj(a,147502,16);d:{if(!sl(e,c,b+120|0)){break d}g=b+156|0;d=0;while(1){h=c+1|0;e:{if(!(d&1)){d=c;while(1){c=d;d=h;if((c|0)>11){break e}bj(a,147525,2);Hn(e,147528,b+120|0);q[b+112>>2]=g;Lj(a,147532,b+112|0);c=q[b+140>>2];if((c|0)>=1){q[b+96>>2]=c;Lj(a,147536,b+96|0)}f:{if(r[q[b+128>>2]]){q[b+80>>2]=q[b+124>>2];Lj(a,147540,b+80|0);break f}g:{h:{i:{j:{c=r[q[b+132>>2]];switch(c-109|0){case 1:case 2:case 3:case 4:case 5:case 6:break g;case 0:break h;case 7:break i;default:break j}}if((c|0)!=67){break g}}bj(a,147573,2);break f}Lj(a,147558,0);break f}q[b+64>>2]=g;q[b+68>>2]=q[b+148>>2];Lj(a,147576,b- -64|0)}fm(a,(q[a+8>>2]-q[a+12>>2]>>4)-f|0);h=d+1|0;if(sl(e,d,b+120|0)){continue}break}break d}while(1){d=h;bj(a,147525,2);Hn(e,147528,b+120|0);q[b+48>>2]=g;Lj(a,147532,b+48|0);c=q[b+140>>2];if((c|0)>0){q[b+32>>2]=c;Lj(a,147536,b+32|0)}k:{if(r[q[b+128>>2]]){q[b+16>>2]=q[b+124>>2];Lj(a,147540,b+16|0);break k}l:{m:{n:{o:{c=r[q[b+132>>2]];switch(c-109|0){case 7:break l;case 1:case 2:case 3:case 4:case 5:case 6:break m;case 0:break o;default:break n}}Lj(a,147558,0);break k}if((c|0)==67){break l}}q[b>>2]=g;q[b+4>>2]=q[b+148>>2];Lj(a,147576,b);break k}bj(a,147573,2)}fm(a,(q[a+8>>2]-q[a+12>>2]>>4)-f|0);h=d+1|0;if(sl(e,d,b+120|0)){continue}break}break d}if(sl(e,c+11|0,b+120|0)){bj(a,147519,5);while(1){c=d;d=c+1|0;if(sl(e,c+10|0,b+120|0)){continue}break}}d=1;if(sl(e,c,b+120|0)){continue}break}}fm(a,(q[a+8>>2]-q[a+12>>2]>>4)-f|0)}Ii=b+224|0;return 1}function Eu(a,b,c,d,e){var f=0,g=0,h=0,i=0;f=Ii-160|0;Ii=f;g=-16512;if(!is(a,1)){q[f+152>>2]=0;q[f+144>>2]=1;q[f+148>>2]=0;q[f+136>>2]=0;q[f+128>>2]=1;q[f+132>>2]=0;q[f+120>>2]=0;q[f+112>>2]=1;q[f+116>>2]=0;q[f+104>>2]=0;q[f+96>>2]=1;q[f+100>>2]=0;if(b){q[f+56>>2]=0;q[f+48>>2]=1;q[f+52>>2]=0;q[f+40>>2]=0;q[f+32>>2]=1;q[f+36>>2]=0}q[f+88>>2]=0;q[f+80>>2]=1;q[f+84>>2]=0;g=f- -64|0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;q[f+24>>2]=0;q[f+16>>2]=1;q[f+20>>2]=0;q[f+8>>2]=0;q[f>>2]=1;q[f+4>>2]=0;g=pn(f+144|0,d,q[a+4>>2]);a:{if(g){break a}g=-4;d=a+8|0;if((_j(f+144|0,d)|0)>-1){break a}g=wk(f+16|0,f+144|0);if(g){break a}h=a+80|0;i=a+68|0;if(b){g=XS(a,b,c);if(g){break a}g=Wk(f+144|0,f+144|0,a+140|0);if(g){break a}g=gl(f+144|0,f+144|0,d);if(g){break a}g=Pl(f+128|0,a+44|0,1);if(g){break a}g=Pl(f+112|0,a+56|0,1);if(g){break a}g=$n(f+96|0,28,b,c);if(g){break a}g=Wk(f+48|0,f+128|0,f+96|0);if(g){break a}g=Rl(f+48|0,f+48|0,i);if(g){break a}g=$n(f+96|0,28,b,c);if(g){break a}g=Wk(f+32|0,f+112|0,f+96|0);if(g){break a}g=Rl(f+32|0,f+32|0,h);if(g){break a}i=f+48|0;h=f+32|0}c=a+44|0;g=Do(f+80|0,f+144|0,i,c,a+116|0);if(g){break a}g=h;h=a+56|0;g=Do(f- -64|0,f+144|0,g,h,a+128|0);if(g){break a}g=yl(f+144|0,f+80|0,f- -64|0);if(g){break a}g=Wk(f+80|0,f+144|0,a+92|0);if(g){break a}g=gl(f+144|0,f+80|0,c);if(g){break a}g=Wk(f+80|0,f+144|0,h);if(g){break a}g=Rl(f+144|0,f- -64|0,f+80|0);if(g){break a}if(b){g=Wk(f+144|0,f+144|0,a+152|0);if(g){break a}g=gl(f+144|0,f+144|0,d);if(g){break a}}g=Do(f,f+144|0,a+20|0,d,a+104|0);if(g){break a}g=-17280;if(_j(f,f+16|0)){break a}g=Dn(f+144|0,e,q[a+4>>2])}ij(f+128|0);ij(f+112|0);ij(f+96|0);if(b){ij(f+48|0);ij(f+32|0)}ij(f+144|0);ij(f+80|0);ij(f- -64|0);ij(f);ij(f+16|0);g=g?g-17152|0:0}Ii=f+160|0;return g}function Dr(a,b,c,d,e,f,g,h,i,j,k,l){var m=0,n=0,p=0,v=0,y=0,z=0,A=0,C=0,D=0,E=x(0);n=Ii-32|0;Ii=n;a:{b:{c:{p=b&65535;m=q[a+32>>2];if(p>>>0<(q[a+36>>2]-m|0)/592>>>0){if(s[(m+w(p,592)|0)+568>>1]!=(b>>>16|0)){break c}q[n+24>>2]=0;q[n+16>>2]=0;q[n+20>>2]=0;q[n+8>>2]=0;q[n+12>>2]=0;A=q[a+52>>2];p=q[a+48>>2];m=p;D=A-m|0;if(D){z=(D|0)/72|0;m=p;while(1){C=z>>>1|0;v=w(C,72)+m|0;y=t[v+4>>2]>>0;m=y?v+72|0:m;z=y?(C^-1)+z|0:C;if(z){continue}break}}d:{e:{f:{if(!((m|0)==(A|0)|q[m+4>>2]!=(c|0))){m=m-p|0;y=(m|0)/72|0;if((m|0)!=-72){break f}}v=(D|0)/72|0;m=q[a+56>>2];if((m|0)==(A|0)){q[n>>2]=v;Pi(3,199633,201870,n);a=0;break d}D=(m-p|0)/72|0;m=v+1|0;if(D>>>0>>0){break b}A=w(m,72)+p|0;q[a+52>>2]=A;break e}if(y>>>0>=(D|0)/72>>>0){break a}v=w(y,72)+p|0;m=q[v+56>>2];if(!m|r[v+68|0]&2){break e}p=w(y,72)+p|0;Mi[m|0](a,q[p>>2],0,q[p+60>>2],q[p+64>>2]);A=q[a+52>>2];p=q[a+48>>2]}q[n+24>>2]=q[e+16>>2];m=q[e+12>>2];q[n+16>>2]=q[e+8>>2];q[n+20>>2]=m;m=q[e+4>>2];q[n+8>>2]=q[e>>2];q[n+12>>2]=m;C=A-72|0;e=C-p|0;g:{if(!e){m=p;break g}z=(e|0)/72|0;m=p;while(1){y=z>>>1|0;e=w(y,72)+m|0;v=t[e+4>>2]>>0;m=v?e+72|0:m;z=v?(y^-1)+z|0:y;if(z){continue}break}}E=x(B(g,x(0)));g=x(B(h,x(0)));if(!((m|0)==(C|0)|q[m+4>>2]==(c|0))){bl(m+72|0,m,C-m|0)}u[m+28>>2]=i;u[m+24>>2]=E;q[m+20>>2]=0;u[m+16>>2]=g;u[m+12>>2]=d;q[m+4>>2]=c;q[m>>2]=b;y=q[n+16>>2];v=q[n+20>>2];e=q[n+24>>2];c=q[n+8>>2];b=q[n+12>>2];o[m+68|0]=1;q[m+64>>2]=l;q[m+60>>2]=k;q[m+56>>2]=j;q[m+52>>2]=f;q[m+48>>2]=e;q[m+40>>2]=y;q[m+44>>2]=v;q[m+32>>2]=c;q[m+36>>2]=b;b=q[a+48>>2];c=(q[a+52>>2]-b|0)/72|0;a=(m-p|0)/72|0;if(c>>>0<=a>>>0){break a}a=b+w(a,72)|0}Ii=n+32|0;return a}break a}J(199518,199542,3561,201853);G()}J(202185,201514,506,202204);G()}J(201665,201514,479,201676);G()}function _wa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{if(!_w(b,c)){break a}b:{if(!r[b+20|0]){if(q[a+8>>2]){ZN(a)}c:{if((r[b+21|0]|r[b+22|0]<<8)&8){if(!q[a>>2]|!q[q[a>>2]+8>>2]|(q[q[a>>2]+8>>2]!=(r[b+39|0]|r[b+40|0]<<8)|q[q[a>>2]+20>>2]!=(r[b+48|0]|r[b+49|0]<<8))){break a}d=b+61|0;if(!(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))){break a}e=b+57|0;if((r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))>>>0>c>>>0){break a}if(c-(r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))>>>0>=(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))>>>0){break c}break a}if(!(r[b+45|0]|(r[b+46|0]<<8|r[b+47|0]<<16))|!(r[b+54|0]|(r[b+55|0]<<8|r[b+56|0]<<16))){break a}d=b+61|0;if(!(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))){break a}h=b+41|0;g=h;if((r[g|0]|r[g+1|0]<<8|(r[g+2|0]<<16|r[g+3|0]<<24))>>>0>c>>>0){break a}g=b+50|0;f=g;if((r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24))>>>0>c>>>0){break a}e=b+57|0;if((r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))>>>0>c>>>0){break a}f=h;if(c-(r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24))>>>0<(r[b+45|0]|(r[b+46|0]<<8|r[b+47|0]<<16))>>>0){break a}f=g;if(c-(r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24))>>>0<(r[b+54|0]|(r[b+55|0]<<8|r[b+56|0]<<16))>>>0|c-(r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))>>>0<(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))>>>0){break a}if(!dxa(a,r[b+39|0]|r[b+40|0]<<8,(r[h|0]|r[h+1|0]<<8|(r[h+2|0]<<16|r[h+3|0]<<24))+b|0,r[b+45|0]|(r[b+46|0]<<8|r[b+47|0]<<16),r[b+48|0]|r[b+49|0]<<8,(r[g|0]|r[g+1|0]<<8|(r[g+2|0]<<16|r[g+3|0]<<24))+b|0,r[b+54|0]|(r[b+55|0]<<8|r[b+56|0]<<16))){break a}}if(cxa(a,(r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24))+b|0,r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))){break b}break a}if(!q[a+8>>2]){break b}ZN(a)}o[a+585|0]=1}}function GL(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-48|0;Ii=c;a:{b:{e=ak(a,q[q[b>>2]>>2],b+8|0);if(e){break b}e=ak(a,q[q[b>>2]+4>>2],b+4|0);if(e){cj(a,q[q[b>>2]>>2]);break b}q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;c:{f=q[b>>2];d=q[f+12>>2];if(!d){break c}e=0;d:{while(1){if(d>>>0>g>>>0){h=g<<2;d=q[h+q[f+8>>2]>>2];if(r[d|0]){d=ak(a,d,c+12|0);f=q[c+12>>2];q[h+(c+16|0)>>2]=f;if(d){e=e?e:d}else{d=qr(a,f,((g<<3)+b|0)+48|0);e=d?d:e}f=q[b>>2]}if(g>>>0>6){break d}d=q[f+12>>2];g=g+1|0;if(d>>>0>g>>>0){continue}break d}break}J(62316,62328,44,62353);G()}if(!e){break c}cj(a,q[f>>2]);cj(a,q[q[b>>2]+4>>2]);b=q[c+16>>2];if(b){cj(a,b)}b=q[c+20>>2];if(b){cj(a,b)}b=q[c+24>>2];if(b){cj(a,b)}b=q[c+28>>2];if(b){cj(a,b)}b=q[c+32>>2];if(b){cj(a,b)}b=q[c+36>>2];if(b){cj(a,b)}b=q[c+40>>2];if(b){cj(a,b)}b=q[c+44>>2];if(!b){break b}cj(a,b);break b}a=q[c+20>>2];q[b+12>>2]=q[c+16>>2];q[b+16>>2]=a;a=q[c+28>>2];q[b+20>>2]=q[c+24>>2];q[b+24>>2]=a;a=q[c+44>>2];q[b+36>>2]=q[c+40>>2];q[b+40>>2]=a;a=q[c+36>>2];q[b+28>>2]=q[c+32>>2];q[b+32>>2]=a;a=b;if(q[q[b+4>>2]+4>>2]){CL(b);f=q[b>>2]}q[a+128>>2]=Oi(q[f+20>>2]);q[a+132>>2]=Li;q[b+144>>2]=Oi(q[q[b>>2]+24>>2]);q[b+148>>2]=Li;i=q[b+4>>2];f=q[i>>2];j=q[f+4>>2];if(!j){e=0;break b}e=b+136|0;h=b+152|0;g=0;e:{while(1){k=g<<6;a=Oi(q[k+q[f>>2]>>2]);d=Li;f:{g:{if((a|0)==q[b+128>>2]&(d|0)==q[b+132>>2]){d=e;a=q[i>>2];if(t[a+4>>2]>g>>>0){break g}break a}if(q[b+144>>2]!=(a|0)|q[b+148>>2]!=(d|0)){break f}d=h;a=q[i>>2];if(t[a+4>>2]<=g>>>0){break e}}q[d>>2]=q[(q[a>>2]+k|0)+4>>2]}g=g+1|0;if((j|0)==(g|0)){e=0;break b}f=q[i>>2];if(t[f+4>>2]>g>>>0){continue}break}break a}break a}Ii=c+48|0;return e}J(62316,62530,100,62353);G()}function ZH(a,b,c,d,e){var f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=0,F=0,H=x(0),I=x(0),K=x(0),L=x(0),M=x(0),N=x(0);i=u[c+52>>2];j=u[c+60>>2];k=u[c+48>>2];l=u[c+56>>2];h=u[c+44>>2];m=x(u[e+20>>2]*h);g=x(u[e+16>>2]*h);f=u[e+24>>2];a:{if(o[c+82|0]&1){C=x(x(i*m)+x(k*g));f=x(f*h);t=x(x(x(l*g)+x(j*m))-x(k*f));v=x(x(x(j*f)+x(k*m))-x(i*g));D=x(l*f);m=x(x(x(j*g)+x(i*f))-x(l*m));break a}C=x(x(k*g)+x(i*m));v=x(x(x(f*j)+x(k*m))-x(i*g));t=x(x(x(l*g)+x(j*m))-x(f*k));D=x(f*l);m=x(x(x(f*i)+x(j*g))-x(l*m))}E=q[c+64>>2];F=q[E>>2];if((q[E+4>>2]-F|0)/18568>>>0<=b>>>0){J(151947,151192,479,151403);G()}g=u[e+36>>2];f=u[e+44>>2];r=u[e+32>>2];s=u[e+40>>2];L=u[c+36>>2];M=u[c+40>>2];N=u[c+32>>2];q[d+204>>2]=1065353216;z=x(h*x(0));u[d+188>>2]=z;p=x(x(x(s*i)+x(x(f*k)+x(r*j)))-x(g*l));H=x(p+p);n=x(x(x(r*l)+x(x(f*i)+x(g*j)))-x(s*k));A=x(n+n);I=x(x(1)-x(p*H));K=x(n*A);u[d+184>>2]=h*x(I-K);y=n;B=x(x(x(g*k)+x(x(f*l)+x(s*j)))-x(r*i));n=x(B+B);y=x(y*n);g=x(x(x(x(f*j)-x(r*k))-x(g*i))-x(s*l));f=x(H*g);u[d+180>>2]=h*x(y-f);r=x(p*n);s=x(A*g);u[d+176>>2]=h*x(r+s);u[d+172>>2]=z;u[d+168>>2]=h*x(y+f);f=x(B*n);u[d+164>>2]=h*x(I-f);p=x(p*A);g=x(g*n);u[d+160>>2]=h*x(p-g);u[d+156>>2]=z;u[d+152>>2]=h*x(r-s);u[d+148>>2]=h*x(p+g);u[d+144>>2]=h*x(x(x(1)-K)-f);h=x(D+C);u[d+200>>2]=M+x(x(k*t)+x(x(x(l*h)+x(j*v))-x(i*m)));u[d+196>>2]=L+x(x(l*m)+x(x(x(j*t)+x(i*h))-x(k*v)));u[d+192>>2]=N+x(x(i*v)+x(x(x(j*m)+x(k*h))-x(l*t)));c=F+w(b,18568)|0;q[d+208>>2]=q[c+18556>>2];q[d+212>>2]=q[c+18560>>2];q[d+216>>2]=q[d>>2];c=q[d+72>>2];q[d+228>>2]=c;q[d+240>>2]=b;q[d+236>>2]=a;q[d+232>>2]=(q[d+76>>2]-c|0)/96;q[d+220>>2]=q[e+144>>2];q[d+224>>2]=q[e+148>>2]}function uma(a,b){a=a|0;b=b|0;var c=0,d=x(0),e=0,f=0,g=0,h=x(0),i=x(0),j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=x(0),t=0,v=0,w=0,y=0,z=0,A=0,B=0,C=0;c=Ii-144|0;Ii=c;l=q[b+8>>2];t=q[q[b+4>>2]+12>>2];if(l>>>0>>0){q[b+8>>2]=l+1;v=q[a+64>>2];m=q[v+4>>2];f=m;w=q[f+96>>2];f=q[f+100>>2];y=q[a+68>>2];n=q[y+4>>2];g=n;z=q[g+96>>2];g=q[g+100>>2];h=u[a+84>>2];B=h<=x(0);i=u[a+80>>2];C=i<=x(0);A=q[b>>2];b=s[a+88>>1];if(b){if(!(b&1)){while(1){e=e+1|0;j=b&2;b=(b&65534)>>>1|0;if(!j){continue}break}}b=(e<<3)+A|0;j=q[b>>2];o=q[b+4>>2]}b=s[a+90>>1];if(b){e=0;if(!(b&1)){while(1){e=e+1|0;k=b&2;b=(b&65534)>>>1|0;if(!k){continue}break}}b=(e<<3)+A|0;k=q[b>>2];p=q[b+4>>2]}u[c+16>>2]=u[a>>2];u[c+20>>2]=u[a+4>>2];u[c+24>>2]=u[a+8>>2];d=u[a+36>>2];r=u[a+32>>2];u[c+40>>2]=-u[a+40>>2];u[c+36>>2]=-d;u[c+32>>2]=-r;d=u[a+52>>2];r=u[a+48>>2];u[c+56>>2]=-u[a+56>>2];u[c+52>>2]=-d;u[c+48>>2]=-r;u[c+64>>2]=u[a+72>>2];d=u[a+76>>2];q[c+88>>2]=z;q[c+92>>2]=g;h=B?x(0):h;u[c+80>>2]=h;i=C?x(0):i;u[c+76>>2]=i;u[c+68>>2]=d;Ip(c,n);b=q[c+8>>2];q[c+100>>2]=q[c+4>>2];q[c+104>>2]=b;u[c+96>>2]=u[c>>2];q[c+128>>2]=j;q[c+132>>2]=o;q[c+112>>2]=k;q[c+116>>2]=p;q[c+120>>2]=k;q[c+124>>2]=p;q[c+72>>2]=0;LC(c+16|0,m,w,f,s[v+22>>1]);u[c+16>>2]=u[a+16>>2];u[c+20>>2]=u[a+20>>2];u[c+24>>2]=u[a+24>>2];u[c+32>>2]=u[a+32>>2];u[c+36>>2]=u[a+36>>2];u[c+40>>2]=u[a+40>>2];u[c+48>>2]=u[a+48>>2];u[c+52>>2]=u[a+52>>2];u[c+56>>2]=u[a+56>>2];u[c+64>>2]=u[a+72>>2];d=u[a+76>>2];q[c+88>>2]=w;q[c+92>>2]=f;u[c+80>>2]=i;u[c+76>>2]=h;u[c+68>>2]=d;Ip(c,m);a=q[c+8>>2];q[c+100>>2]=q[c+4>>2];q[c+104>>2]=a;u[c+96>>2]=u[c>>2];q[c+128>>2]=k;q[c+132>>2]=p;q[c+112>>2]=j;q[c+116>>2]=o;q[c+120>>2]=j;q[c+124>>2]=o;q[c+72>>2]=0;LC(c+16|0,n,z,g,s[y+22>>1])}Ii=c+144|0;return l>>>0>>0|0}function pna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=0;f=Ii-48|0;Ii=f;b=q[a+4>>2];c=q[b+16>>2];a:{b:{c:{d:{e:{f:{g:{d=q[q[a+24>>2]>>2];if(d>>>0>2]-c>>3>>>0){c=q[(d<<3)+c>>2];d=q[b+4>>2];b=q[b>>2];if(c>>>0>=d-b>>2>>>0){break a}c=q[b+(c<<2)>>2];d=q[a+16>>2];e=q[a+20>>2];if((d|0)==q[73316]&(e|0)==q[73317]){b=-4;if(q[a+32>>2]!=1){break b}b=0;if((z5(q[c+132>>2],q[a+40>>2],q[a+44>>2])|0)!=1){break b}q[f>>2]=aj(q[a+40>>2],q[a+44>>2]);Pi(4,50700,51060,f);b=-8;break b}if((d|0)==q[73320]&(e|0)==q[73321]){b=-4;if(q[a+32>>2]){break b}b=0;if((A5(q[c+132>>2],x(v[a+40>>3]))|0)!=1){break b}v[f+16>>3]=v[a+40>>3];Pi(4,50700,51099,f+16|0);b=-8;break b}if((d|0)==q[73322]&(e|0)==q[73323]){b=-4;if(q[a+32>>2]){break b}b=0;c=q[c+132>>2];g=x(v[a+40>>3]);u[(((o[c+186|0]&1)<<5)+c|0)+20>>2]=g>x(0)?g:x(0);break b}if(q[73202]==(d|0)&q[73203]==(e|0)){break g}b=0;if(q[73208]==(d|0)&q[73209]==(e|0)){break c}b=1;if(q[73210]==(d|0)&q[73211]==(e|0)){break c}b=2;if(q[73212]==(d|0)&q[73213]==(e|0)){break c}b=3;if(q[73214]==(d|0)&q[73215]==(e|0)){break c}b=4;if(q[73216]==(d|0)&q[73217]==(e|0)){break c}b=5;if(q[73218]==(d|0)&q[73219]==(e|0)){break c}b=6;if(q[73220]==(d|0)&q[73221]==(e|0)){break c}b=7;if(q[73222]==(d|0)&q[73223]==(e|0)){break c}b=q[c+216>>2];if(!b){break f}break e}break a}b=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[73184],q[73185],c+216|0);a=r[c+254|0];o[c+254|0]=(b?a&8:8)|a&247;break b}h=q[c+128>>2];b=q[h+28>>2];if((b|0)==q[h+32>>2]){break d}b=q[b+4>>2]}b=Bp(q[b>>2],d,e,a+32|0,q[a+104>>2],238,c);break b}J(51709,51308,486,51547);G()}b=Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[73190],q[73191],(c+(b<<2)|0)+184|0);a=r[c+254|0];o[c+254|0]=(b?a&8:8)|a&247}Ii=f+48|0;return b|0}J(51709,51308,479,51547);G()}function X9(){q[210628]=326;q[210626]=324;q[210627]=325;q[210624]=322;q[210625]=323;q[210622]=320;q[210623]=321;q[210620]=318;q[210621]=319;q[210618]=316;q[210619]=317;q[210616]=314;q[210617]=315;q[210614]=312;q[210615]=313;q[210612]=310;q[210613]=311;q[210610]=308;q[210611]=309;q[210608]=306;q[210609]=307;q[210606]=304;q[210607]=305;q[210604]=302;q[210605]=303;q[210602]=300;q[210603]=301;q[210600]=298;q[210601]=299;q[210598]=296;q[210599]=297;q[210596]=294;q[210597]=295;q[210594]=292;q[210595]=293;q[210592]=290;q[210593]=291;q[210590]=288;q[210591]=289;q[210588]=286;q[210589]=287;q[210586]=284;q[210587]=285;q[210584]=269;q[210585]=283;q[210582]=267;q[210583]=268;q[210580]=265;q[210581]=266;q[210578]=263;q[210579]=264;q[210576]=261;q[210577]=262;q[210574]=259;q[210575]=260;q[210572]=257;q[210573]=258;q[210570]=125;q[210571]=126;q[210568]=123;q[210569]=124;q[210566]=95;q[210567]=96;q[210564]=93;q[210565]=94;q[210562]=91;q[210563]=92;q[210560]=89;q[210561]=90;q[210558]=87;q[210559]=88;q[210556]=85;q[210557]=86;q[210554]=83;q[210555]=84;q[210552]=81;q[210553]=82;q[210550]=79;q[210551]=80;q[210548]=77;q[210549]=78;q[210546]=75;q[210547]=76;q[210544]=73;q[210545]=74;q[210542]=71;q[210543]=72;q[210540]=69;q[210541]=70;q[210538]=67;q[210539]=68;q[210536]=65;q[210537]=66;q[210534]=63;q[210535]=64;q[210532]=61;q[210533]=62;q[210530]=59;q[210531]=60;q[210528]=57;q[210529]=58;q[210526]=55;q[210527]=56;q[210524]=53;q[210525]=54;q[210522]=51;q[210523]=52;q[210520]=49;q[210521]=50;q[210518]=47;q[210519]=48;q[210516]=45;q[210517]=46;q[210514]=43;q[210515]=44;q[210512]=41;q[210513]=42;q[210510]=39;q[210511]=40;q[210508]=36;q[210509]=38;q[210506]=34;q[210507]=35;q[210504]=32;q[210505]=33}function j7(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0;j=Ii-16|0;Ii=j;a:{b:{c:{d:{if(!b|!c){break d}h=q[a+52>>2];d=q[a+56>>2];k=(h|0)==(d|0);if(k){break d}i=(d-h|0)/48|0;l=i>>>0>1?i:1;e:{while(1){e=w(g,48)+b|0;m=q[e+8>>2];n=q[e+12>>2];d=0;f:{g:{while(1){f=w(d,48)+h|0;if(q[f+8>>2]!=(m|0)|q[f+12>>2]!=(n|0)){d=d+1|0;if((l|0)!=(d|0)){continue}break g}break}if(d>>>0>=i>>>0){break f}q[f+28>>2]=q[e+28>>2];o[f+24|0]=r[e+24|0];q[f+20>>2]=q[e+20>>2];q[f+16>>2]=q[e+16>>2];q[f+32>>2]=q[e+32>>2];t=1}g=g+1|0;if((g|0)==(c|0)){break e}continue}break}break a}if(!t){break d}e=0;h:{if(k){break h}d=0;i:{while(1){f=q[a+68>>2];if(q[a+72>>2]-f>>3>>>0>d>>>0){p[(f+(d<<3)|0)+4>>1]=e;f=w(d,48);i=xt(yt(q[(f+h|0)+28>>2]));h=q[a+52>>2];g=(q[a+56>>2]-h|0)/48|0;if(g>>>0<=d>>>0){break i}e=w(i,q[(f+h|0)+20>>2])+e|0;d=d+1|0;if(g>>>0>d>>>0){continue}break h}break}break a}break a}if(o[a+96|0]&1){break c}Wi(e,1,a+84|0,a+92|0,a+88|0);d=q[a+84>>2];if(q[a+92>>2]-d>>>0>>0){break b}q[a+88>>2]=d+e;h=c>>>0>1?c:1;c=0;while(1){d=q[a+56>>2];f=q[a+52>>2];j:{if((d|0)==(f|0)){break j}e=w(c,48)+b|0;i=q[e+8>>2];g=q[e+12>>2];d=(d-f|0)/48|0;k=d>>>0>1?d:1;d=0;while(1){l=f+w(d,48)|0;if(q[l+8>>2]!=(i|0)|q[l+12>>2]!=(g|0)){d=d+1|0;if((k|0)!=(d|0)){continue}break j}break}f=q[a+68>>2];if(q[a+72>>2]-f>>3>>>0<=d>>>0){break a}q[j+12>>2]=q[e+36>>2];q[j+8>>2]=q[e+40>>2];i=xt(yt(q[e+28>>2]));d=f+(d<<3)|0;f=s[d+4>>1];g=q[a+84>>2];if(f>>>0>=q[a+88>>2]-g>>>0){break a}d=w(s[d+6>>1],w(i,q[e+20>>2]));e=q[j+8>>2];Ti(f+g|0,q[j+12>>2],d>>>0>>0?d:e)}c=c+1|0;if((h|0)!=(c|0)){continue}break}SH(q[q[a>>2]+2384>>2],a)}Ii=j+16|0;return}J(113938,114013,493,114069);G()}J(114081,114013,506,114100);G()}J(114155,114013,479,114166);G()}function RG(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Ii-48|0;Ii=h;Dj(a,b,5);k=Ou(a,b);l=d+4|0;g=q[l>>2];i=q[d>>2];e=g-i|0;m=e>>2;a:{b:{c:{d:{e:{f:{if(!e){break f}if(q[i>>2]!=(k|0)){f=1;j=i-g|0;j=((e|0)<(j|0)?j:e)>>>2|0;e=(e|0)>-1?e:-1;e=w(j,(e|0)<1?e:1);j=e>>>0>1?e:1;while(1){e=f;if((e|0)!=(j|0)){f=e+1|0;if(q[i+(e<<2)>>2]!=(k|0)){continue}}break}if(e>>>0>=m>>>0){break f}}b=Qi(a,130873,0);break e}f=q[d+8>>2];if((f|0)==(g|0)){if(o[d+12|0]&1){break d}Wi(m+8|0,4,d,d+8|0,l);g=q[d+4>>2];f=q[d+8>>2]}if((f|0)==(g|0)){break c}q[l>>2]=g+4;q[g>>2]=k;ej(a,b);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=4;if(Hj(a,-2)){while(1){e=Vi(a,-2);g=Vi(a,-1);i=e-3|0;if(i>>>0>=2){q[h+32>>2]=(e|0)==-1?140583:q[(e<<2)+256832>>2];Qi(a,130898,h+32|0)}f=b+2|0;g:{h:{switch(i|0){case 1:f=(al(a,-2)+b|0)+6|0;break g;case 0:break h;default:break g}}f=b+6|0}i:{j:{switch(g-1|0){case 0:b=f+1|0;break i;case 2:b=c+f|0;b=((f-b|0)+(b+3&-4)|0)+8|0;break i;case 3:b=(al(a,-1)+f|0)+4|0;break i;case 6:b=f+1|0;f=b+c|0;b=((f+3&-4)-f|0)+b|0;if((Ll(a,-1)|0)==q[210436]){b=b+12|0;break i}if((Ll(a,-1)|0)==q[210437]){b=b+16|0;break i}if((Ll(a,-1)|0)==q[210438]){b=b+16|0;break i}if(at(a,-1)){b=b- -64|0;break i}if(On(a,-1)){b=b+8|0;break i}if(qv(a,-1)){b=b+32|0;break i}q[h+16>>2]=q[64215];Qi(a,130956,h+16|0);break i;case 4:b=RG(a,-1,c+f|0,d)+f|0;break i;default:break j}}q[h>>2]=(g|0)==-1?140583:q[(g<<2)+256832>>2];Qi(a,130956,h);b=f}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);a=q[d+4>>2];if((a|0)==q[d>>2]){break b}a=a-4|0;c=q[a>>2];q[l>>2]=a;if((c|0)!=(k|0)){break a}}Ii=h+48|0;return b}J(132193,132137,493,132268);G()}J(132280,132137,533,132304);G()}J(132309,132137,435,132320);G()}J(130992,131008,440,131032);G()}function hsa(a,b,c){var d=0,e=0,f=0,g=0,h=0;q[a+1036>>2]=0;q[a+1040>>2]=0;d=a+1052|0;q[d>>2]=0;q[d+4>>2]=0;d=a+1044|0;q[d>>2]=0;q[d+4>>2]=0;e=a+1060|0;o[e|0]=r[e|0]&254;Ui(a+1064|0,0,2112);q[a+3244>>2]=0;q[a+3164>>2]=-1;q[a+3176>>2]=0;q[a+3180>>2]=0;e=a+3184|0;q[e>>2]=0;q[e+4>>2]=0;e=a+3192|0;q[e>>2]=0;q[e+4>>2]=0;e=a+3200|0;q[e>>2]=0;q[e+4>>2]=0;e=a+3248|0;q[e>>2]=0;q[e+4>>2]=0;q[a+1032>>2]=b;q[a+4>>2]=0;q[a>>2]=0;e=a+3256|0;o[e|0]=r[e|0]&254;Wi(b,4,a+1036|0,d,a+1040|0);a:{b:{c:{e=q[d>>2];d=q[a+1036>>2];if(e-d>>2>>>0>=b>>>0){d:{q[a+1040>>2]=d+(b<<2);d=s[a+1056>>1];e=b&65535;if(d>>>0>e>>>0){break c}g=q[a+1052>>2];f=Yi(e<<1);q[a+1052>>2]=f;f=Ti(f,g,d<<1);p[a+1056>>1]=b;if(d>>>0>>0){while(1){p[f+(d<<1)>>1]=d;d=d+1|0;if((e|0)!=(d|0)){continue}break}}Ni(g);if(o[a+3140|0]&1){break b}e=a+3128|0;d=a+3136|0;g=a+3132|0;Wi(b,64,e,d,g);f=q[d>>2];d=q[a+3128>>2];if(f-d>>6>>>0>>0){break d}q[a+3132>>2]=d+(b<<6);gJ(a+3144|0,b>>>0<3?1:(b>>>0)/3|0,b);if(o[a+3188|0]&1){break b}Wi(c,4,a+3176|0,a+3184|0,a+3180|0);c=a+3224|0;q[c>>2]=0;q[c+4>>2]=0;c=a+3216|0;q[c>>2]=0;q[c+4>>2]=0;q[a+3208>>2]=0;q[a+3212>>2]=0;q[a+3240>>2]=0;q[a+3236>>2]=b;d=q[a+3248>>2];if(d>>>0>b>>>0){break c}c=q[a+3244>>2];f=b<<2;h=Yi(f);q[a+3244>>2]=h;h=Ti(h,c,d<<2);q[a+3248>>2]=b;if(b>>>0>d>>>0){while(1){q[h+(d<<2)>>2]=d;d=d+1|0;if((d|0)!=(b|0)){continue}break}}Ni(c);q[a+3268>>2]=0;q[a+3260>>2]=2147450879;q[a+3264>>2]=2147450879;o[a+3272|0]=r[a+3272|0]&192|40;c=q[a+1036>>2];if((c|0)==q[a+1040>>2]){break a}Ui(c,0,f);c=q[e>>2];if((c|0)==q[g>>2]){break a}Ui(c,204,w(b,48));Ui(a+1080|0,0,2048);return a}}J(9943,9962,506,10018);G()}J(12345,12368,112,10101);G()}J(10026,9962,493,10101);G()}J(12419,9962,479,9454);G()}function IM(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-96|0;Ii=c;b=q[a+156>>2];if(b){cj(q[a+288>>2],b)}eM(q[a+152>>2]);Ira(q[a+152>>2]);caa();b=q[a+288>>2];if(b){d7(b,a+176|0)}q[c+80>>2]=0;q[c+84>>2]=0;q[c+88>>2]=0;q[c+92>>2]=0;q[c+72>>2]=0;q[c+76>>2]=0;q[c+84>>2]=-1;q[c+64>>2]=0;q[c+68>>2]=0;HM(a,c+48|0);Dra(c+48|0);b=c+24|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+4>>2]=q[a+288>>2];q[b+8>>2]=q[a+152>>2];e=q[a+272>>2];a:{if(e){q[b>>2]=e?q[e+120>>2]:0;break a}e=b;d=q[a+276>>2];f=0;b:{if(!d){break b}f=q[d+120>>2]}q[e>>2]=f;oL(b);e=b;d=q[a+284>>2];f=0;c:{if(!d){break c}f=q[d+120>>2]}q[e>>2]=f}oL(b);gaa();Gra(q[a+152>>2]);b=q[a+428>>2];if(b){cj(q[a+288>>2],b)}b=q[a+408>>2];if(b){cj(q[a+288>>2],b)}b=q[a+420>>2];if(b){cj(q[a+288>>2],b)}b=q[a+424>>2];if(b){cj(q[a+288>>2],b)}Y1();_9(q[a+416>>2]);I8(q[a+220>>2]);b=q[a+412>>2];if(b){Uaa(b);um(q[a+412>>2])}b=a+272|0;d=q[a+292>>2];if(d){Ni(Gea(d))}d=q[a+272>>2];d:{if(!d){b=q[a+276>>2];if(b){Dz(b);Gz(q[a+276>>2])}b=q[a+280>>2];if(b){Dz(b);Gz(q[a+280>>2])}d=q[a+284>>2];if(!d){break d}b=a+284|0}Dz(d);Gz(q[b>>2])}b=q[a+288>>2];if(b){tH(b)}b=q[a+216>>2];if(b){Mi[q[74927]](b);Mi[q[74922]](q[a+216>>2])}b=q[a+300>>2];d=b;e=q[a+296>>2];if(b|e){Qo(e,d)}q[c+20>>2]=0;q[c+12>>2]=0;q[c+16>>2]=0;q[c+8>>2]=q[a+4>>2];q[c+12>>2]=0;q[c+16>>2]=q[a+152>>2];q[c+20>>2]=q[a+412>>2];usa(c+8|0);mua();b=q[a+4>>2];if(b){hua(b)}e:{if(o[a+404|0]&1){break e}b=q[a+392>>2];if(!b){break e}Ni(b)}f:{if(o[a+204|0]&1){break f}b=q[a+184>>2];if(b){Ni(b)}b=q[a+176>>2];if(!b){break f}Ni(b)}g:{if(o[a+172|0]&1){break g}b=q[a+160>>2];if(!b){break g}Ni(b)}Ni(a);h:{if(o[c+92|0]&1){break h}a=q[c+72>>2];if(a){Ni(a)}a=q[c+64>>2];if(!a){break h}Ni(a)}Ii=c+96|0}function xJ(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=Ii-368|0;Ii=e;Fb();a:{b=q[a+3480>>2];if(!(b&4)){b=a+2412|0;q[b>>2]=q[b>>2]|-2147483648;b=0;while(1){c=1<>>3&536870908)+a|0)+2368|0;q[d>>2]=c|q[d>>2];break b}d=((b>>>3&536870908)+a|0)+2368|0;q[d>>2]=q[d>>2]&(c^-1)}b=b+1|0;if((b|0)!=327){continue}break}b=q[a+3480>>2]}if(!(b&2)){b=a+2432|0;q[b>>2]=q[b>>2]|-2147483648;c=T(0)|0;b=a+2428|0;q[b>>2]=q[b>>2]&-2|(c|0)==1;c=T(1)|0;q[b>>2]=q[b>>2]&-3|((c|0)==1)<<1;c=T(2)|0;q[b>>2]=q[b>>2]&-5|((c|0)==1)<<2;c=T(3)|0;q[b>>2]=q[b>>2]&-9|((c|0)==1)<<3;c=T(4)|0;q[b>>2]=q[b>>2]&-17|((c|0)==1)<<4;c=T(5)|0;q[b>>2]=q[b>>2]&-33|((c|0)==1)<<5;c=T(6)|0;q[b>>2]=q[b>>2]&-65|((c|0)==1)<<6;c=T(7)|0;q[b>>2]=q[b>>2]&-129|((c|0)==1)<<7;b=Lb()|0;q[a+2424>>2]=q[a+3480>>2]&64?0-b|0:b;Mb(a+2416|0,a+2420|0);b=q[a+3480>>2]}if(!(b&8)){c=q[q[210501]+3476>>2];b=0;while(1){f=w(b,148)+a|0;d=r[f+144|0];if((d|0)!=255){g=q[c>>2];if(d>>>0>=q[c+4>>2]-g>>2>>>0){break a}d=q[(d<<2)+g>>2];Mi[q[d+8>>2]](a,d,f)}b=b+1|0;if((b|0)!=16){continue}break}b=q[a+3480>>2]}if(!(b&16)){c:{if(!y$(e+16|0,e+12|0)){break c}b=a+2924|0;q[b>>2]=q[b>>2]|-2147483648;f=q[e+12>>2];q[a+2920>>2]=f;if((f|0)<1){break c}d=0;while(1){b=w(d,44)+a|0;c=(e+16|0)+(d<<5)|0;q[b+2436>>2]=q[c>>2];q[b+2476>>2]=q[c+28>>2];q[b+2440>>2]=q[c+4>>2];q[b+2444>>2]=q[c+8>>2];q[b+2448>>2]=q[c+12>>2];q[b+2460>>2]=q[c+16>>2];q[b+2464>>2]=q[c+20>>2];d=d+1|0;if((f|0)!=(d|0)){continue}break}}b=q[a+3480>>2]}d:{if(b&32){break d}q[a+3480>>2]=b&-2;if(!(Ub(e+16|0,e+16|4,e+24|0)|0)){break d}q[a+3480>>2]=q[a+3480>>2]|1;b=q[e+20>>2];q[a+3452>>2]=q[e+16>>2];q[a+3456>>2]=b;q[a+3460>>2]=q[e+24>>2]}Ii=e+368|0;return}J(149280,149183,479,149291);G()}function gza(){var a=0;q[73176]=Oi(50294);q[73177]=Li;q[73178]=Oi(50313);q[73179]=Li;q[73180]=Oi(50330);q[73181]=Li;q[73182]=Oi(50339);q[73183]=Li;q[73184]=Oi(50345);q[73185]=Li;q[73186]=Oi(50355);q[73187]=Li;q[73188]=Oi(50363);q[73189]=Li;q[73190]=Oi(50370);q[73191]=Li;q[73192]=Oi(50379);q[73193]=Li;q[73194]=Oi(50391);q[73195]=Li;q[73196]=Oi(50400);q[73197]=Li;q[73198]=Oi(50405);q[73199]=Li;q[73200]=Oi(50411);q[73201]=Li;q[73202]=Oi(50417);q[73203]=Li;q[73204]=Oi(50426);q[73205]=Li;q[73208]=Oi(50436);q[73209]=Li;q[73210]=Oi(50445);q[73211]=Li;q[73212]=Oi(50454);q[73213]=Li;q[73214]=Oi(50463);q[73215]=Li;q[73216]=Oi(50472);q[73217]=Li;q[73218]=Oi(50481);q[73219]=Li;q[73220]=Oi(50490);q[73221]=Li;q[73222]=Oi(50499);q[73223]=Li;q[73224]=Oi(50508);q[73225]=Li;a=Oi(50517);q[73245]=0;q[73246]=0;q[73244]=295392;q[73242]=0;q[73240]=50540;q[73239]=50529;q[73238]=0;q[73236]=0;q[73234]=0;q[73232]=0;q[73230]=1;q[73228]=0;q[73229]=3;q[73226]=a;q[73227]=Li;q[73247]=0;q[73248]=0;q[73249]=0;q[73266]=292912;q[73264]=0;q[73262]=50574;q[73261]=50553;q[73260]=0;q[73258]=0;q[73256]=0;q[73254]=0;q[73252]=1;q[73250]=0;q[73251]=3;q[73271]=0;q[73269]=0;q[73270]=0;q[73267]=0;q[73268]=0;q[73288]=292912;q[73286]=0;q[73284]=50606;q[73283]=50584;q[73282]=0;q[73280]=0;q[73278]=0;q[73276]=0;q[73274]=1;q[73272]=0;q[73273]=3;q[73293]=0;q[73291]=0;q[73292]=0;q[73289]=0;q[73290]=0;q[73310]=292912;q[73308]=0;q[73306]=50638;q[73305]=50617;q[73304]=0;q[73302]=0;q[73300]=0;q[73298]=0;q[73296]=1;q[73294]=0;q[73295]=3;q[73315]=0;q[73313]=0;q[73314]=0;q[73311]=0;q[73312]=0;q[73316]=Oi(50664);q[73317]=Li;q[73318]=Oi(50669);q[73319]=Li;q[73320]=Oi(50679);q[73321]=Li;q[73322]=Oi(50686);q[73323]=Li}function bw(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=x(0);k=Ii-16|0;Ii=k;f=s[a+24>>1];d=f;a:{b:{c:{d:{e:{f:{g=s[a+26>>1];g:{if((g|0)==(d|0)){break g}d=q[a+20>>2];if(!d){break f}if(f>>>0<=g>>>0){break e}p[a+26>>1]=g+1;d=s[d+(g<<1)>>1];g=q[a+32>>2];if(d>>>0<(q[a+36>>2]-g|0)/592>>>0){break g}if((q[a+40>>2]-g|0)/592>>>0<=d>>>0){break d}q[a+36>>2]=(g+w(d,592)|0)+592}h:{if((d|0)==(f|0)){q[k>>2]=f;Pi(4,199633,200391,k);d=-4;break h}f=s[a+384>>1];i=f?f:1;q[c>>2]=i<<16|d;g=q[a+32>>2];if((q[a+36>>2]-g|0)/592>>>0<=d>>>0){break c}e=Ui(g+w(d,592)|0,0,592);f=b&65535;j=q[a+32>>2];if(f>>>0>=(q[a+36>>2]-j|0)/592>>>0){break c}l=b>>>16|0;h=w(f,592)+j|0;if((l|0)!=s[h+568>>1]){break b}m=s[h+570>>1];if((m|0)!=(b&65535)){break a}h=w(f,592)+j|0;Dba(e,h);e=q[h+420>>2];if(e){q[(g+w(d,592)|0)+420>>2]=Pk(e)}e=g+w(d,592)|0;p[e+584>>1]=65535;p[e+570>>1]=d;p[e+568>>1]=i;q[e+572>>2]=-1;q[e+576>>2]=-1;p[e+580>>1]=65535;p[a+384>>1]=(i+1>>>0)%65535;e=q[h+416>>2];if(e){i=g+w(d,592)|0;q[i+512>>2]=Mi[q[a+412>>2]](q[a+420>>2],a,q[c>>2],e,q[(w(f,592)+j|0)+512>>2]);q[i+416>>2]=q[h+416>>2]}e=w(f,592)+j|0;if(q[e+464>>2]|q[e+468>>2]){n=hK(a,b);b=q[a+32>>2];if(f>>>0>=(q[a+36>>2]-b|0)/592>>>0){break c}h=b+w(f,592)|0;if(s[h+568>>1]!=(l|0)){break b}if(s[h+570>>1]!=(m|0)){break a}Vv(a,q[c>>2],q[e+464>>2],q[e+468>>2],u[(b+w(f,592)|0)+472>>2],n,0,0,0)}if(q[e+548>>2]){b=g+w(d,592)|0;q[b+548>>2]=0;d=w(f,592)+j|0;f=q[d+540>>2];q[b+536>>2]=q[d+536>>2];q[b+540>>2]=f}Xv(a,q[c>>2],0);d=0}Ii=k+16|0;return d}J(201735,201742,151,201793);G()}J(201797,201742,152,201793);G()}J(202185,201514,506,202204);G()}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function $P(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=q[a+4>>2];c=g&3;d=g&-8;f=d+a|0;a:{if(!c){c=0;if(b>>>0<256){break a}if(d>>>0>=b+4>>>0){c=a;if(d-b>>>0<=q[240711]<<1>>>0){break a}}return 0}b:{if(b>>>0<=d>>>0){c=d-b|0;if(c>>>0<16){break b}q[a+4>>2]=g&1|b|2;b=a+b|0;q[b+4>>2]=c|3;q[f+4>>2]=q[f+4>>2]|1;Mw(b,c);break b}c=0;if(q[240597]==(f|0)){d=d+q[240594]|0;if(d>>>0<=b>>>0){break a}q[a+4>>2]=g&1|b|2;c=a+b|0;b=d-b|0;q[c+4>>2]=b|1;q[240594]=b;q[240597]=c;break b}if(q[240596]==(f|0)){d=d+q[240593]|0;if(d>>>0>>0){break a}c=d-b|0;c:{if(c>>>0>=16){q[a+4>>2]=g&1|b|2;b=a+b|0;q[b+4>>2]=c|1;d=a+d|0;q[d>>2]=c;q[d+4>>2]=q[d+4>>2]&-2;break c}q[a+4>>2]=d|g&1|2;b=a+d|0;q[b+4>>2]=q[b+4>>2]|1;c=0;b=0}q[240596]=b;q[240593]=c;break b}e=q[f+4>>2];if(e&2){break a}h=d+(e&-8)|0;if(h>>>0>>0){break a}j=h-b|0;d:{if(e>>>0<=255){c=q[f+8>>2];e=e>>>3|0;d=q[f+12>>2];if((d|0)==(c|0)){q[240591]=q[240591]&Fza(-2,e);break d}q[c+12>>2]=d;q[d+8>>2]=c;break d}i=q[f+24>>2];d=q[f+12>>2];e:{if((f|0)!=(d|0)){c=q[f+8>>2];q[c+12>>2]=d;q[d+8>>2]=c;break e}f:{c=f+20|0;e=q[c>>2];if(e){break f}c=f+16|0;e=q[c>>2];if(e){break f}d=0;break e}while(1){k=c;d=e;c=d+20|0;e=q[c>>2];if(e){continue}c=d+16|0;e=q[d+16>>2];if(e){continue}break}q[k>>2]=0}if(!i){break d}c=q[f+28>>2];e=(c<<2)+962668|0;g:{if(q[e>>2]==(f|0)){q[e>>2]=d;if(d){break g}q[240592]=q[240592]&Fza(-2,c);break d}q[i+(q[i+16>>2]==(f|0)?16:20)>>2]=d;if(!d){break d}}q[d+24>>2]=i;c=q[f+16>>2];if(c){q[d+16>>2]=c;q[c+24>>2]=d}c=q[f+20>>2];if(!c){break d}q[d+20>>2]=c;q[c+24>>2]=d}if(j>>>0<=15){q[a+4>>2]=g&1|h|2;b=a+h|0;q[b+4>>2]=q[b+4>>2]|1;break b}q[a+4>>2]=g&1|b|2;b=a+b|0;q[b+4>>2]=j|3;c=a+h|0;q[c+4>>2]=q[c+4>>2]|1;Mw(b,j)}c=a}return c}function Wna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=Ii-224|0;Ii=b;e=q[a+8>>2];q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;o[b+80|0]=0;o[b+81|0]=0;o[b+82|0]=0;o[b+83|0]=0;o[b+84|0]=0;o[b+85|0]=0;o[b+86|0]=0;o[b+87|0]=0;o[b+104|0]=0;o[b+105|0]=0;o[b+106|0]=0;o[b+107|0]=0;o[b+108|0]=0;o[b+109|0]=0;o[b+110|0]=0;o[b+111|0]=0;o[b+96|0]=0;o[b+97|0]=0;o[b+98|0]=0;o[b+99|0]=0;o[b+100|0]=0;o[b+101|0]=0;o[b+102|0]=0;o[b+103|0]=0;o[b+88|0]=0;o[b+89|0]=0;o[b+90|0]=0;o[b+91|0]=0;o[b+92|0]=0;o[b+93|0]=0;o[b+94|0]=0;o[b+95|0]=0;a:{b:{if(vn(q[62138],b+80|0)){q[b+32>>2]=q[62138];Pi(4,52227,52235,b+32|0);break b}a=q[e>>2];d=q[e+4>>2];c=0;if((a|0)==(d|0)){break a}c=q[58734];g=q[c+8>>2];h=q[c+12>>2];i=b+208|0;c:{while(1){c=q[(f<<2)+a>>2];if(o[c+8|0]&1){a=q[c>>2];j=q[a+20>>2];k=q[a+16>>2];d=b- -64|0;u[d+8>>2]=u[a+24>>2];q[d>>2]=k;q[d+4>>2]=j;a=q[c>>2];u[b+48>>2]=u[a>>2];u[b+52>>2]=u[a+4>>2];u[b+56>>2]=u[a+8>>2];u[b+60>>2]=u[a+12>>2];a=q[q[c+4>>2]>>2];q[b+16>>2]=st(q[a>>2]);sj(i,9,52267,b+16|0);q[b+144>>2]=96;q[b+148>>2]=q[a+4>>2];u[b+152>>2]=u[a+8>>2];u[b+160>>2]=u[a+16>>2];u[b+164>>2]=u[a+20>>2];u[b+168>>2]=u[a+24>>2];u[b+176>>2]=u[a+32>>2];u[b+180>>2]=u[a+36>>2];u[b+184>>2]=u[a+40>>2];u[b+188>>2]=u[a+44>>2];u[b+192>>2]=u[a+48>>2];u[b+112>>2]=u[b+64>>2];u[b+116>>2]=u[b+68>>2];u[b+120>>2]=u[b+72>>2];u[b+128>>2]=u[b+48>>2];u[b+132>>2]=u[b+52>>2];u[b+136>>2]=u[b+56>>2];u[b+140>>2]=u[b+60>>2];if(vk(0,b+80|0,g,h,0,q[58734],b+112|0,105)){break c}d=q[e+4>>2];a=q[e>>2]}f=f+1|0;if(f>>>0>2>>>0){continue}break}c=0;break a}q[b>>2]=q[62138];Pi(4,52227,52270,b)}c=-1e3}Ii=b+224|0;return c|0}function iR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;a:{b:{c:{b=q[a+68>>2];g=q[b+1120>>2];d=q[g+16>>2];if(d>>>0>10){break c}if(!(1<>2];q[f+12>>2]=b;o[q[a+204>>2]+4|0]=b>>>8;o[q[a+204>>2]+5|0]=b;d=6;c=q[a+68>>2];g=Wm(c+12|0);e=b;b=q[a>>2];c=HE(c+8|0,g,q[a+204>>2]+6|0,e,q[b+24>>2],q[b+28>>2]);if(c){break a}b=q[a+68>>2];e=b+8|0;c=b+1192|0;g=b+1124|0;b=q[a>>2];c=IE(e,c,1060,g,q[b+24>>2],q[b+28>>2]);if(!c){break b}break a}d=4;e=b+132|0;b=q[a>>2];c=FE(e,f+12|0,q[a+204>>2]+4|0,1e3,q[b+24>>2],q[b+28>>2]);if(c){break a}b=q[a+68>>2];e=b+132|0;c=b+1124|0;g=b+1192|0;b=q[a>>2];c=GE(e,c,g,1024,q[b+24>>2],q[b+28>>2]);if(!c){break b}break a}if(q[g+16>>2]-5>>>0<4){c=-27648;d=q[a>>2];if(!yD(d)){break a}d=q[d+140>>2];q[f+12>>2]=d;if(d+6>>>0>16384){c=-27136;break a}o[q[a+204>>2]+4|0]=d>>>8;o[q[a+204>>2]+5|0]=d;d=q[a>>2];Ti(q[a+204>>2]+6|0,q[d+136>>2],q[d+140>>2]);b=q[a>>2];e=q[b+140>>2];d=e+6|0;d:{e:{switch(q[g+16>>2]-5|0){case 0:q[f+12>>2]=0;break d;case 2:c=kD(a,d,f+12|0,2);if(!c){break d}break a;case 1:h=q[q[a+68>>2]+8>>2];q[f+12>>2]=h;c=-27136;b=e+8|0;if(b+h>>>0>16384){break a}o[q[a+204>>2]+d|0]=h>>>8;o[(q[a+204>>2]+e|0)+7|0]=q[f+12>>2];d=q[a+68>>2];c=Wm(d+12|0);e=d+8|0;d=b;b=q[a>>2];c=HE(e,c,d+q[a+204>>2]|0,q[f+12>>2],q[b+24>>2],q[b+28>>2]);if(!c){break d}break a;case 3:break e;default:break a}}c=FE(q[a+68>>2]+132|0,f+12|0,q[a+204>>2]+d|0,16378-e|0,q[b+24>>2],q[b+28>>2]);if(c){break a}}c=HV(a,q[g+16>>2]);if(!c){break b}break a}c=-27648;if(q[g+16>>2]!=1){break a}d=4;c=kD(a,4,f+12|0,0);if(c){break a}}b=q[f+12>>2];q[a+208>>2]=22;q[a+212>>2]=b+d;o[q[a+204>>2]]=16;q[a+4>>2]=q[a+4>>2]+1;c=Pq(a)}Ii=f+16|0;return c}function H7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-272|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);g=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){i=jj(a,1);a:{if(Oj(a,2)){f=Mj(a,2);b:{if(f<0x10000000000000000&f>=0){e=y(f)>=1?f>0?~~A(C(f*2.3283064365386963e-10),4294967295)>>>0:~~D((f- +(~~f>>>0>>>0))*2.3283064365386963e-10)>>>0:0;c=~~f>>>0;break b}c=0}d=e;if(!ew(q[q[g+304>>2]+2384>>2],c,d)){e=b;if(d>>>0<=2){d=q[(d<<2)+245832>>2]}else{d=86723}q[e+132>>2]=d;q[b+128>>2]=c;sj(b+144|0,128,119817,b+128|0);q[b+112>>2]=b+144;a=Qi(a,116737,b+112|0);break a}c:{d:{e:{switch(d-1|0){case 1:f:{if(!Oj(a,3)){h=1;break f}h=jj(a,3);d=h-1|0;if(1<>>0<=31:0){break f}q[b+96>>2]=h;h=Qi(a,119660,b+96|0)}d=Mi[q[75004]](c,e,h)|0;e=Li;if(d|e){break d}q[b+68>>2]=q[61460];q[b+64>>2]=c;sj(b+144|0,128,119817,b- -64|0);q[b+52>>2]=MK(h);q[b+48>>2]=b+144;a=Qi(a,116771,b+48|0);break a;case 0:break e;default:break c}}if(!(c|e)){break c}d=c}q[b+152>>2]=i;q[b+156>>2]=0;q[b+144>>2]=2;q[b+160>>2]=d;q[b+164>>2]=e;c=q[g+4>>2];if((c|0)!=q[g+8>>2]){q[g+4>>2]=c+40;a=q[b+180>>2];q[c+32>>2]=q[b+176>>2];q[c+36>>2]=a;a=q[b+172>>2];q[c+24>>2]=q[b+168>>2];q[c+28>>2]=a;a=q[b+164>>2];q[c+16>>2]=q[b+160>>2];q[c+20>>2]=a;a=q[b+156>>2];q[c+8>>2]=q[b+152>>2];q[c+12>>2]=a;a=q[b+148>>2];q[c>>2]=q[b+144>>2];q[c+4>>2]=a;a=0;break a}q[b+80>>2]=(q[g+8>>2]-q[g>>2]|0)/40;a=Qi(a,115614,b+80|0);break a}e=b;if(d>>>0<=2){d=q[(d<<2)+245832>>2]}else{d=86723}q[e+36>>2]=d;q[b+32>>2]=c;sj(b+144|0,128,119817,b+32|0);q[b+16>>2]=b+144;a=Qi(a,116737,b+16|0);break a}q[b+4>>2]=i;q[b>>2]=115561;a=Qi(a,116855,b)}Ii=b+272|0;return a|0}J(115568,115465,478,119531);G()}function ZK(a,b,c,d,e,f){q[f>>2]=b;q[f+4>>2]=q[d+4>>2];u[f+8>>2]=u[d+8>>2];u[f+12>>2]=u[d+12>>2];u[f+16>>2]=u[d+16>>2];b=Dl(a,q[c+128>>2],q[c+132>>2],0);p[f+30>>1]=0;p[f+28>>1]=b;u[f+20>>2]=u[d+48>>2];u[f+24>>2]=u[d+52>>2];b=r[f+32|0]&-2;o[f+32|0]=b|r[d+56|0];b=b|r[d+56|0];o[f+32|0]=b;o[f+32|0]=b&249|(e?4:0)|r[d+57|0]<<1;b=q[c+4>>2];d=b;e=q[c>>2];a:{if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+12>>2];d=b;e=q[c+8>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+20>>2];d=b;e=q[c+16>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+28>>2];d=b;e=q[c+24>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+36>>2];d=b;e=q[c+32>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+44>>2];d=b;e=q[c+40>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+52>>2];d=b;e=q[c+48>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+60>>2];d=b;e=q[c+56>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+68>>2];d=b;e=q[c+64>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+76>>2];d=b;e=q[c+72>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+84>>2];d=b;e=q[c+80>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+92>>2];d=b;e=q[c+88>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+100>>2];d=b;e=q[c+96>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+108>>2];d=b;e=q[c+104>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+116>>2];d=b;e=q[c+112>>2];if(!(b|e)){break a}p[f+30>>1]=Dl(a,e,d,0)|s[f+30>>1];b=q[c+124>>2];d=b;c=q[c+120>>2];if(!(b|c)){break a}p[f+30>>1]=Dl(a,c,d,0)|s[f+30>>1]}}function xba(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0),n=x(0);d=Ii-160|0;Ii=d;a:{b:{c:{d:{k=b&65535;l=q[a+32>>2];if(k>>>0<(q[a+36>>2]-l|0)/592>>>0){if(s[(w(k,592)+l|0)+568>>1]!=(b>>>16|0)){break d}f=w(k,592)+l|0;if(s[f+570>>1]!=(b&65535)){break c}e=-10;e:{if((q[f+412>>2]&240)!=80){break e}g=w(k,592)+l|0;e=q[g+540>>2];j=q[g+536>>2];if(!(e|j)){Pi(4,199633,200530,0);e=-5;break e}g=q[a+264>>2];if((g|0)==q[a+268>>2]){q[d>>2]=(g-q[a+260>>2]|0)/12;Pi(4,199633,200579,d);e=-4;break e}g=q[a+236>>2];h=q[q[a+228>>2]+(Cza(j,e,q[a+232>>2])<<2)>>2];i=g+(h<<4)|0;if(q[i>>2]!=(j|0)|q[i+4>>2]!=(e|0)){while(1){h=q[(g+(h<<4)|0)+12>>2];i=g+(h<<4)|0;if((j|0)!=q[i>>2]|(e|0)!=q[i+4>>2]){continue}break}}g=q[(g+(h<<4)|0)+8>>2];c=iI(q[a+224>>2],g,c);e=q[f+412>>2];f:{if((e&196608)!=131072){break f}q[f+412>>2]=e&-196609;if(r[855704]){break f}o[855704]=1;e=w(k,592)+l|0;q[d+16>>2]=aj(q[e+560>>2],q[e+564>>2]);Pi(3,199633,200695,d+16|0)}Cr(a,f,2,d+96|0);op(d+48|0,d+96|0);e=q[a+224>>2];u[d+40>>2]=u[d+72>>2];f=q[d+68>>2];q[d+32>>2]=q[d+64>>2];q[d+36>>2]=f;Kv(e,c,d+32|0);e=q[a+224>>2];f=q[d+52>>2];q[d+32>>2]=q[d+48>>2];q[d+36>>2]=f;f=q[d+60>>2];q[d+40>>2]=q[d+56>>2];q[d+44>>2]=f;Jv(e,c,d+32|0);m=u[d+80>>2];n=u[d+84>>2];Iv(q[a+224>>2],c,m>2];f=q[a+260>>2];j=e-f|0;h=(j|0)/12|0;i=h+1|0;if(i>>>0>(q[a+268>>2]-f|0)/12>>>0){break b}q[a+264>>2]=f+w(i,12);if((j+12|0)/12>>>0<=h>>>0){break a}q[e+8>>2]=b;q[e>>2]=c;q[e+4>>2]=g;b=w(k,592)+l|0;q[b+548>>2]=c;q[b+544>>2]=g;lA(q[a+224>>2],c);e=0}Ii=d+160|0;return e}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(202185,201514,506,202204);G()}J(201665,201514,479,201676);G()}function hoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=0;e=Ii-48|0;Ii=e;b=q[a+1040>>2];c=q[b+28>>2];d=q[c+16>>2];b=q[b+32>>2];if(b>>>0>2]-d>>3>>>0){g=q[d+(b<<3)>>2];h=q[c>>2];if(g>>>0>2]-h>>8>>>0){d=q[a+1052>>2];m=d;c=q[a+1048>>2];b=c+1|0;d=b>>>0<1?d+1|0:d;q[a+1048>>2]=b;q[a+1052>>2]=d;b=!m&c>>>0>3|(m|0)!=0;a:{if(!b){d=3;b:{if(b){break b}c:{d:{switch(c-1|0){default:b=h+(g<<8)|0;i=u[b+16>>2];l=u[b+24>>2];j=u[b+20>>2];k=x(1);break b;case 0:d=h+(g<<8)|0;i=u[d+32>>2];k=u[d+44>>2];l=u[d+40>>2];j=u[d+36>>2];d=4;break b;case 1:b=h+(g<<8)|0;i=u[b+64>>2];j=u[b+68>>2];l=u[b+72>>2];break c;case 2:break d}}b=h+(g<<8)|0;i=u[b+48>>2];j=u[b+52>>2];l=u[b+56>>2]}}c=Oi(q[(c<<2)+232048>>2]);u[a+28>>2]=k;u[a+24>>2]=l;u[a+20>>2]=j;u[a+16>>2]=i;q[a+8>>2]=d;q[a>>2]=c;q[a+4>>2]=Li;f=1;break a}if(!m&(c|0)==4){c=Oi(56858);q[a+8>>2]=7;q[a>>2]=c;q[a+4>>2]=Li;q[a+16>>2]=q[(h+(g<<8)|0)+240>>2];f=1;break a}b=m-(c>>>0<5)|0;d=c-5|0;b=!b&d>>>0>3|(b|0)!=0;if(!b){op(e,(h+(g<<8)|0)+128|0);f=0;if(b){break a}b=a;e:{f:{switch(d-1|0){default:j=u[e+20>>2];k=u[e+16>>2];i=u[e+24>>2];f=3;break e;case 0:l=u[e+12>>2];j=u[e+4>>2];k=u[e>>2];i=u[e+8>>2];f=4;break e;case 1:c=h+(g<<8)|0;k=x(u[e+32>>2]/x(u[c+48>>2]*u[c+64>>2]));j=x(u[e+36>>2]/x(u[c+52>>2]*u[c+68>>2]));i=u[e+40>>2];f=3;break e;case 2:break f}}j=u[e+36>>2];k=u[e+32>>2];i=u[e+40>>2];f=3}q[b+8>>2]=f;c=Oi(q[(d<<2)+232080>>2]);u[a+28>>2]=l;u[a+24>>2]=i;u[a+20>>2]=j;u[a+16>>2]=k;q[a>>2]=c;q[a+4>>2]=Li;f=1;break a}f=0;if((c|0)!=9|m){break a}q[a+8>>2]=6;o[a+16|0]=o[(h+(g<<8)|0)+246|0]&1;q[a>>2]=Oi(56916);q[a+4>>2]=Li;f=1}d=f;Ii=e+48|0;return d|0}}J(57189,57106,479,57200);G()}function sH(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0;j=Ii-80|0;Ii=j;l=j- -64|0;q[l>>2]=0;q[l+4>>2]=0;q[j+56>>2]=0;q[j+60>>2]=0;q[j+76>>2]=1;q[j+48>>2]=e;q[j+52>>2]=f;q[j+72>>2]=b;q[j+44>>2]=0;l=q[b+16>>2];a:{if(l){q[j+16>>2]=a;k=q[b+12>>2];q[j+32>>2]=h;q[j+28>>2]=g;q[j+20>>2]=k;q[j+36>>2]=0;q[j+24>>2]=c;q[j+40>>2]=j+44;k=Mi[l|0](j+16|0)|0;if(k){break a}k=q[j+44>>2]}q[j+64>>2]=0;q[j+68>>2]=h;q[j+16>>2]=a;l=q[b+12>>2];q[j+36>>2]=k;q[j+32>>2]=h;q[j+28>>2]=g;q[j+20>>2]=l;q[j+24>>2]=c;q[j+40>>2]=j+48;k=Mi[q[b+20>>2]](j+16|0)|0;if(k){break a}g=q[b+24>>2];if(!g){k=0;break a}q[j+16>>2]=a;q[j+20>>2]=q[b+12>>2];q[j+24>>2]=q[j+44>>2];q[j+28>>2]=j+48;k=Mi[g|0](j+16|0)|0;if((k|0)!=-17){break a}while(1){Xn(1e3);k=Mi[q[b+24>>2]](j+16|0)|0;if((k|0)==-17){continue}break}}g=a+7372|0;h=q[a+7368>>2];q[g>>2]=h;b:{l=a+7376|0;if((q[l>>2]-h|0)!=1048576){if(o[a+7380|0]&1){break b}Wi(1048576,1,a+7368|0,l,g)}h=25706;c:{d:{e:{switch(k+21|0){case 21:k=pH(a,c,e,f,j+48|0);if(!k){q[i>>2]=q[j+56>>2];k=0;break c}q[j+16>>2]=a;q[j+20>>2]=q[b+12>>2];q[j+24>>2]=j+48;Mi[q[b+28>>2]](j+16|0)|0;break c;case 19:h=25719;break d;case 18:h=25729;break d;case 17:h=25748;break d;case 16:h=25771;break d;case 15:h=25790;break d;case 14:h=25796;break d;case 13:h=25818;break d;case 12:h=25832;break d;case 11:h=25841;break d;case 10:h=25852;break d;case 9:h=25869;break d;case 8:h=25892;break d;case 7:h=25905;break d;case 6:h=25920;break d;case 5:h=25934;break d;case 4:h=25954;break d;case 2:h=25962;break d;case 1:h=25979;break d;case 0:h=25998;break d;case 20:break d;default:break e}}h=26012}q[j+4>>2]=h;q[j>>2]=d;Pi(3,24640,26595,j)}Ii=j+80|0;return k}J(26803,26878,493,26726);G()}function Loa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-32|0;Ii=f;a:{g=q[a+8>>2];b=q[g+4>>2];if((b|0)!=q[g+8>>2]){while(1){c=w(h,28)+b|0;b:{if((q[c+24>>2]&3)!=3){break b}b=0;e=q[a>>2];c:{if(!e){break c}e=q[e>>2];if(!e){break c}b=q[e>>2]}e=q[c+8>>2];d:{if(!e){d=0;break d}q[f+28>>2]=c;q[f+24>>2]=b;d=jt(e,175,f+24|0,1e4);if((d|0)==-17){break b}}q[c+24>>2]=q[c+24>>2]&-2;e=q[q[a+12>>2]+4>>2];b=0;e:{if(!e){break e}b=q[e+120>>2]}e=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[c+12>>2]);rj(b,-1e4,q[c+16>>2]);ej(b,-1);yk(b);if(!zz(b)){Ri(b,-3);Pi(4,39489,39717,0);q[c+24>>2]=q[c+24>>2]&-2;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((e|0)==q[b+8>>2]-q[b+12>>2]>>4){break b}J(39801,39822,428,39865);G()}if(q[c+12>>2]==-2){Ri(b,-3);Pi(4,39489,39878,0);q[c+24>>2]=q[c+24>>2]&-2;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((e|0)==q[b+8>>2]-q[b+12>>2]>>4){break b}J(39801,39822,436,39865);G()}rj(b,-1e4,q[c+20>>2]);i=q[b+8>>2];q[i+8>>2]=1;q[i>>2]=!d;q[b+8>>2]=q[b+8>>2]+16;Pm(b,3,0);q[c+24>>2]=q[c+24>>2]&-2;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((e|0)!=q[b+8>>2]-q[b+12>>2]>>4){break a}}h=h+1|0;b=q[g+4>>2];if(h>>>0<(q[g+8>>2]-b|0)/28>>>0){continue}break}}a=q[g+28>>2];q[72536]=a+q[72536];q[f+16>>2]=a;q[f+20>>2]=0;q[f+8>>2]=a;q[f+12>>2]=0;Ii=f+32|0;return 0}J(39801,39822,444,39865);G()}function xia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=Ii+ -64|0;Ii=b;j=-13;a:{b:{c:{d:{if(Qj(q[a+20>>2],q[a+24>>2],q[61372],b+60|0)){break d}d=q[q[a+32>>2]+8>>2];q[b+56>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;j=QL(q[a>>2],q[b+60>>2],b+16|0,1);e:{if(!j){i=d+12|0;f=q[i>>2];c=q[d+8>>2];e=q[b+28>>2];g=q[b+24>>2];iw(q[a>>2],d);q[d+4>>2]=q[b+20>>2];q[d+24>>2]=q[b+40>>2];q[d+28>>2]=q[b+44>>2];q[d+32>>2]=q[d+32>>2]&-2147483648|q[b+48>>2]&2147483647;q[d+36>>2]=q[b+52>>2];q[d+40>>2]=q[b+56>>2];k=d+8|0;e=e-g>>2;f=f-c>>2;f:{if(e>>>0>f>>>0){if(o[d+20|0]&1){break c}c=d+16|0;g=q[c>>2];h=q[d+8>>2];Wi(e,4,k,c,i);l=q[q[b+60>>2]+8>>2];m=q[c>>2];c=q[k>>2];if(l>>>0>m-c>>2>>>0){break b}q[i>>2]=c+(l<<2);c=g-h>>2;if(e>>>0<=c>>>0){e=f;break f}while(1){g=q[b+24>>2];if(q[b+28>>2]-g>>2>>>0<=c>>>0){break a}h=q[k>>2];if(q[i>>2]-h>>2>>>0<=c>>>0){break a}l=h;h=c<<2;q[l+h>>2]=q[g+h>>2];c=c+1|0;if(e>>>0>c>>>0){continue}break}e=f;break f}if(e>>>0>=f>>>0){break f}f=q[d+8>>2];if(q[d+16>>2]-f>>2>>>0>>0){break b}q[i>>2]=f+(e<<2)}if(e){c=0;while(1){f=q[b+24>>2];if(q[b+28>>2]-f>>2>>>0<=c>>>0){break a}g=q[k>>2];if(q[i>>2]-g>>2>>>0<=c>>>0){break a}h=g;g=c<<2;q[h+g>>2]=q[f+g>>2];c=c+1|0;if((e|0)!=(c|0)){continue}break}}q[d+32>>2]=q[d+32>>2]|-2147483648;q[q[a+32>>2]+16>>2]=((q[a+24>>2]+q[d+16>>2]|0)-q[d+8>>2]|0)+44;break e}q[b>>2]=j;Pi(3,65212,65356,b);iw(q[a>>2],b+16|0)}if(o[b+36|0]&1){break d}a=q[b+24>>2];if(!a){break d}Ni(a)}Ii=b- -64|0;return j|0}J(65440,65515,493,65571);G()}J(65583,65515,506,65602);G()}J(65610,65515,479,65429);G()}function vI(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-288|0;Ii=c;d=r[a+2196|0];e=q[a>>2];f=s[a+2198>>1];q[c+28>>2]=b;q[c+24>>2]=f;q[c+20>>2]=e;q[c+16>>2]=d?167855:167861;d=a+4|0;sj(d,2124,167841,c+16|0);q[a+2168>>2]=Jk();q[a+2172>>2]=Li;a:{b:{c:{if(o[a+2200|0]&1){break c}e=q[a+2192>>2];if(!e){break c}f=q[e+48>>2];Gj(f);e=q[e+80>>2];Bj(f);if(laa(q[a+2192>>2],d,c+40|0)){break c}f=r[c+144|0];if(!(f&1)|(e|0)!=1?!(f&2):0){break c}q[c+272>>2]=0;q[c+276>>2]=0;q[c+280>>2]=0;q[c+284>>2]=0;o[c+196|0]=0;q[c+192>>2]=-1;q[c+180>>2]=0;q[c+172>>2]=0;q[c+176>>2]=0;q[c+264>>2]=0;q[c+268>>2]=0;o[c+260|0]=0;q[c+184>>2]=-1;q[c+188>>2]=0;q[c+168>>2]=a;e=a+2184|0;q[e>>2]=q[e>>2]+1;q[c+164>>2]=0;if(yI(q[a+2192>>2],d,c+40|0,c+164|0,c+152|0)){break c}b=a+2208|0;while(1){e=zl(b,1,65536,q[c+164>>2]);o[(e+a|0)+2208|0]=0;Mi[q[a+2136>>2]](c+168|0,q[a+2132>>2],304,b,e);if(e){continue}break}xI(q[a+2192>>2],d,c+40|0,q[c+164>>2]);a=q[c+276>>2];if(!a){break a}if(q[q[c+168>>2]+2128>>2]?0:!(r[c+260|0]&2)){break b}eN(q[c+272>>2],a);break a}d:{if(q[a+2156>>2]<1){d=-8;break d}f=0;while(1){e=wI(a,b,167866);d=e;e:{switch(e+7|0){case 6:d=-1;g=q[a+2128>>2]+24|0;if(g>>>0>21|!(1<>2];if(!(!d|!q[d>>2])){d=e;break d}f:{if(!q[a+2160>>2]){break f}d=Jk();g=q[a+2168>>2];if(q[a+2160>>2]>(d-g|0)){break f}d=e;break d}g=q[a+2156>>2];g:{if((g-1|0)<=(f|0)){f=f+1|0;break g}q[a+2188>>2]=q[a+2188>>2]+1;q[a+2168>>2]=Jk();q[a+2172>>2]=Li;d=q[a+2156>>2];f=f+1|0;q[c>>2]=f;q[c+4>>2]=d-1;Pi(2,167836,167870,c);g=q[a+2156>>2]}d=e;if((f|0)<(g|0)){continue}break}}Ii=c+288|0;return d}bN(q[c+272>>2],a)}Ii=c+288|0;return 1}function Rz(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-1072|0;Ii=e;d=-1;a:{if(!b){break a}d=g7(b);if(d){break a}h=hj(b);if(h>>>0>=1024){q[e>>2]=b;Pi(4,29297,29306,e);d=-1;break a}q[c+16>>2]=Wl(b,h);q[c+20>>2]=Li;g=wm(b,46);b:{c:{if(!g){q[e+16>>2]=b;Pi(3,29297,29492,e+16|0);break c}d=a7(q[a+155704>>2],g+1|0);if(d){if(q[d+20>>2]){break b}J(29545,29446,228,29577);G()}q[e+36>>2]=g;q[e+32>>2]=b;Pi(4,29297,29593,e+32|0)}d=0}q[c+8>>2]=d;l=Mo(b,e+48|0);q[c+24>>2]=Wl(e+48|0,l);q[c+28>>2]=Li;while(1){d=q[a+88104>>2];q[a+88104>>2]=d?d:1;if(d){continue}break}g=a+16|0;i=q[c+16>>2];j=q[c+20>>2];d:{e:{f:{g:{h:{i:{f=q[a+20>>2];j:{if(!f){break j}d=q[q[g>>2]+(Cza(i,j,f)<<2)>>2];if((d|0)==-1){break j}m=q[a+24>>2];while(1){k=(d<<4)+m|0;if((i|0)==q[k>>2]&(j|0)==q[k+4>>2]){break i}d=q[k+12>>2];if((d|0)!=-1){continue}break}}k:{if(q[a+40>>2]==q[a+32>>2]-q[a+24>>2]>>4){break k}f=q[a+88100>>2];d=h+1|0;if(f+d>>>0>61440){break k}h=(a+f|0)+26660|0;Pj(h,b,d);vr(g,i,j,a+88100|0);q[a+88100>>2]=d+q[a+88100>>2];f=q[a+20>>2];break h}q[c>>2]=0;break g}h=(q[((d<<4)+m|0)+8>>2]+a|0)+26660|0}q[c>>2]=h;i=q[c+24>>2];j=q[c+28>>2];l:{if(!f){break l}d=q[q[g>>2]+(Cza(i,j,f)<<2)>>2];if((d|0)==-1){break l}b=q[a+24>>2];while(1){f=b+(d<<4)|0;if((i|0)==q[f>>2]&(j|0)==q[f+4>>2]){break f}d=q[f+12>>2];if((d|0)!=-1){continue}break}}m:{if(q[a+40>>2]==q[a+32>>2]-q[a+24>>2]>>4){break m}b=q[a+88100>>2];d=l+1|0;if(b+d>>>0>61440){break m}b=(a+b|0)+26660|0;Pj(b,e+48|0,d);vr(g,i,j,a+88100|0);q[a+88100>>2]=d+q[a+88100>>2];break e}q[c+4>>2]=0}q[a+88104>>2]=0;d=-8;break d}b=(q[(b+(d<<4)|0)+8>>2]+a|0)+26660|0}q[c+4>>2]=b;d=0}q[a+88104>>2]=0}Ii=e+1072|0;return d}function TG(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0);i=Ii-32|0;Ii=i;g=q[b+12>>2]+c|0;k=(q[b+4>>2]&-268435456)!=805306368;a:{b:{if(k){j=1;break b}j=q[g+4>>2];c=q[g>>2];vj(a,0,0);if(!j){break a}g=c+d|0}c=0;while(1){c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{e=q[b+4>>2]>>>22&63;switch(e-2|0){case 0:break h;case 6:break i;case 2:break j;case 11:break k;case 3:break l;case 9:break e;case 12:break f;case 7:break g;default:break d}}e=q[(c<<2)+g>>2];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;break c}e=q[(c<<2)+g>>2];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;break c}e=(c<<3)+g|0;lk(a,q[e>>2],q[e+4>>2]);break c}e=r[c+g|0];f=q[a+8>>2];q[f+8>>2]=1;q[f>>2]=(e|0)!=0;q[a+8>>2]=q[a+8>>2]+16;break c}m=u[(c<<2)+g>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=m;q[a+8>>2]=q[a+8>>2]+16;break c}Xi(a,q[(c<<2)+g>>2]+d|0);break c}e=q[(c<<2)+g>>2];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;break c}f=q[b+8>>2];e=w(q[f+16>>2],c)+g|0;h=q[f+4>>2];if(!Ik(h,124545,8)){Al(a,e);break c}if(!Ik(h,124553,7)){u[i+16>>2]=u[e>>2];u[i+20>>2]=u[e+4>>2];u[i+24>>2]=u[e+8>>2];Al(a,i+16|0);break c}if(!Ik(h,124560,8)){lo(a,e);break c}if(!Ik(h,124568,5)){hr(a,e);break c}if(!Ik(h,124573,8)){ir(a,e);break c}if(!Ik(h,124581,8)){if(q[e>>2]){rj(a,-1e4,q[e+4>>2]);rj(a,-1,q[e>>2]);ll(a,-2);break c}e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;break c}vj(a,0,0);if(!r[f+24|0]){break c}h=0;while(1){l=w(h,24);Xi(a,q[l+q[f+20>>2]>>2]);TG(a,q[f+20>>2]+l|0,e,d);Ij(a,-3);h=h+1|0;if(h>>>0>2]=q[b>>2];q[i>>2]=e;Qi(a,124589,i)}c=c+1|0;if(!k){nk(a,-2,c)}if((c|0)!=(j|0)){continue}break}}Ii=i+32|0}function mK(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=0,n=x(0);g=Ii-16|0;Ii=g;m=Ar(a,1,-2,0);c=q[a+32>>2];b=q[a+36>>2]-c|0;if(b){f=(b|0)/592|0;while(1){b=c+w(d,592)|0;if(o[b+588|0]&1){ZA(a,s[b+570>>1]|s[b+568>>1]<<16,1);p[b+588>>1]=s[b+588>>1]&65534;f=(q[a+36>>2]-q[a+32>>2]|0)/592|0}d=d+1|0;if(f>>>0>d>>>0){continue}break}}d=q[a+264>>2];e=q[a+260>>2];b=d-e|0;c=(b|0)/12|0;a:{if(!b){break a}if((d|0)!=(e|0)){b=c>>>0>1?c:1;d=0;while(1){nt(q[a+224>>2],q[w(d,12)+e>>2]);d=d+1|0;if((b|0)==(d|0)){e=q[a+260>>2];break a}e=q[a+260>>2];if((q[a+264>>2]-e|0)/12>>>0>d>>>0){continue}break}}J(201665,201514,479,201676);G()}q[a+264>>2]=e;e=0;f=-1;d=0;while(1){b:{c:{d:{e:{f=e?q[e+32>>2]:f;if((f|0)!=-1){break e}h=q[a+164>>2];if(h>>>0<=d>>>0){break d}c=q[a+160>>2];while(1){b=d+1|0;f=q[(d<<2)+c>>2];if((f|0)!=-1){d=b;break e}d=b;if((b|0)!=(h|0)){continue}break}break b}i=q[a+168>>2];if(i){break c}h=q[a+164>>2]}c=q[a+160>>2];break b}e=w(f,40);b=e+i|0;j=q[b+8>>2];k=q[b+28>>2];h=q[b+20>>2];c=q[b+16>>2];b=q[b+24>>2];if(b){Ni(b)}e=e+i|0;if(!j){continue}n=u[213692];if(k>>>0<=2){b=q[(k<<2)+171240>>2]}else{b=0}l=x(+(w(b,w(c,h))>>>0)*.0009765625*.0009765625);u[213692]=n-l;u[g+8>>2]=-l;b=q[g+12>>2];q[g>>2]=q[g+8>>2];q[g+4>>2]=b;Mi[203](a,j,q[a+12>>2]);continue}break}Ui(c,255,h<<2);q[a+180>>2]=-1;q[a+184>>2]=0;q[a+172>>2]=q[a+168>>2];c=q[213713];d=c;b=q[213712];q[a+344>>2]=b;q[a+348>>2]=c;c=q[a+308>>2];q[a+312>>2]=c;f:{if((c|0)!=q[a+316>>2]){q[a+312>>2]=c+8;q[c>>2]=b;q[c+4>>2]=d;if(o[a+336|0]&1){break f}Wi(0,4,a+324|0,a+332|0,a+328|0);Ii=g+16|0;return m}J(201636,201514,533,201660);G()}J(202045,201514,493,201251);G()}function KL(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;j=Ii-112|0;Ii=j;q[e>>2]=0;a:{b:{c:{d:{f=ak(a,q[c+4>>2],j+108|0);e:{if(f){Aj(c);break e}f=ak(a,q[c>>2],j+104|0);if(f){Aj(c);break e}g=q[q[j+104>>2]>>2];if(!g){break d}f=A8(j+8|0);if(o[f+12|0]&1){break c}Wi(q[g+4>>2],64,f,f+8|0,f+4|0);k=q[g+4>>2];n=q[f>>2];if(k>>>0>q[f+8>>2]-n>>6>>>0){break b}q[f+4>>2]=(k<<6)+n;if(k){p=q[g>>2];while(1){if((k|0)==(l|0)){break a}h=(l<<6)+n|0;i=w(l,48)+p|0;q[h>>2]=q[i>>2];u[h+8>>2]=u[i+8>>2];q[h+16>>2]=q[i+16>>2];q[h+20>>2]=q[i+20>>2];u[h+12>>2]=u[i+12>>2];m=q[i+4>>2];o[h+32|0]=0;q[h+4>>2]=m;m=q[i+36>>2];q[h+40>>2]=q[i+32>>2];q[h+44>>2]=m;m=q[i+44>>2];q[h+48>>2]=q[i+40>>2];q[h+52>>2]=m;l=l+1|0;if((l|0)!=(k|0)){continue}break}}u[f+16>>2]=u[c+8>>2];u[f+20>>2]=u[c+12>>2];u[f+52>>2]=u[c+20>>2];u[f+56>>2]=u[c+24>>2];u[f+48>>2]=u[c+16>>2];o[f+89|0]=q[c+28>>2];u[f+24>>2]=u[g+28>>2];u[f+28>>2]=u[g+32>>2];u[f+36>>2]=u[g+44>>2];u[f+32>>2]=u[g+40>>2];u[f+40>>2]=u[g+48>>2];u[f+44>>2]=u[g+52>>2];q[f+76>>2]=q[g+64>>2];q[f+80>>2]=q[g+68>>2];q[f+84>>2]=q[g+72>>2];o[f+88|0]=q[g+8>>2];q[f+60>>2]=q[g+56>>2];q[f+64>>2]=q[g+60>>2];q[f+92>>2]=q[g+36>>2];o[f+68|0]=q[g+16>>2];h=Yi(q[g+24>>2]);q[f+72>>2]=h;Ti(h,q[g+20>>2],q[g+24>>2]);f:{if(!d){d=t8(q[b+2384>>2],f);break f}k7(d,f);b=q[d>>2];cj(a,q[b>>2]);cj(a,q[b+4>>2]);Ni(b)}a=$i(8);q[a>>2]=q[j+108>>2];q[a+4>>2]=q[j+104>>2];q[d>>2]=a;q[d+16>>2]=q[q[j+108>>2]>>2];Aj(c);q[e>>2]=d;g:{if(o[f+12|0]&1){break g}a=q[f>>2];if(!a){break g}Ni(a)}f=0}Ii=j+112|0;return f}J(60380,60391,66,60433);G()}J(60450,60525,493,60581);G()}J(60593,60525,506,60612);G()}J(60620,60632,89,60683);G()}function lN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,u=0;g=Ii-32|0;Ii=g;e=q[210908];a:{l=a+1|0;f=0;b:{if(l>>>0<2){break b}d=a&65535;if(d>>>0>=t[e+8>>2]){break a}c=q[q[e>>2]+(d<<2)>>2];f=0;if(!c){break b}f=s[q[e+4>>2]+(d<<1)>>1]==(a>>>16|0)?c:0}m=b+1|0;c:{if(m>>>0<2){break c}d=b&65535;if(d>>>0>=t[e+8>>2]){break a}c=q[q[e>>2]+(d<<2)>>2];if(!c){break c}i=s[q[e+4>>2]+(d<<1)>>1]==(b>>>16|0)?c:0}d=8;k=r[i+34|0];d:{if((k|0)!=r[f+34|0]){break d}e:{if(!k){break e}n=q[i+4>>2];j=q[f+4>>2];d=0;while(1){c=d<<4;h=c+n|0;p=q[h>>2];c=c+j|0;u=q[h+4>>2];if(!((p|0)!=q[c>>2]|(u|0)!=q[c+4>>2]|q[h+8>>2]!=q[c+8>>2]|(r[h+12|0]!=r[c+12|0]|r[h+13|0]!=r[c+13|0]))){d=d+1|0;if((k|0)!=(d|0)){continue}break e}break}f=aj(p,u);e=d<<4;b=e+n|0;i=q[b+8>>2];h=o[b+12|0];a=154037;f:{if(h>>>0>8){break f}a=q[(h<<2)+262672>>2]}h=r[b+13|0];c=aj(q[c>>2],q[c+4>>2]);e=e+j|0;k=q[e+8>>2];e=o[e+12|0];b=154037;g:{if(e>>>0>8){break g}b=q[(e<<2)+262672>>2]}q[g+28>>2]=r[(j+(d<<4)|0)+13|0];q[g+24>>2]=b;q[g+20>>2]=k;q[g+16>>2]=c;q[g+12>>2]=h;q[g+8>>2]=a;q[g+4>>2]=i;q[g>>2]=f;Pi(4,154138,154143,g);d=9;break d}f=t[i+28>>2]>t[f+28>>2];d=f?4:3;if(l>>>0<2|f){break d}i=q[e+8>>2];c=a&65535;if(i>>>0<=c>>>0){break a}d=3;j=q[e>>2];f=q[j+(c<<2)>>2];if(!f){break d}e=q[e+4>>2];if(s[e+(c<<1)>>1]!=(a>>>16|0)){break d}c=q[f>>2];a=Ej(c+w(q[f+24>>2],q[f+28>>2])|0,154272,16);d=a?1:3;if(a|m>>>0<2){break d}f=b&65535;if(f>>>0>=i>>>0){break a}d=3;a=q[j+(f<<2)>>2];if(!a|s[e+(f<<1)>>1]!=(b>>>16|0)){break d}d=1;b=q[a>>2];a=w(q[a+24>>2],q[a+28>>2]);if(Ej(b+a|0,154272,16)){break d}Ti(c,b,a);d=0}Ii=g+32|0;return d}J(154349,154364,144,154402);G()}function BP(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-16|0;e=a+24|0;g=q[a+32>>2];d=q[g+116>>2];f=q[q[a+20>>2]+116>>2];h=q[a+8>>2];a:{if(f>>>0>=t[h+116>>2]){if(d>>>0>=f>>>0){break a}q[c+8>>2]=q[a+20>>2];d=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=d;q[a+20>>2]=q[e+8>>2];d=q[e+4>>2];q[a+12>>2]=q[e>>2];q[a+16>>2]=d;q[e+8>>2]=q[c+8>>2];d=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=d;if(t[q[a+20>>2]+116>>2]>=t[h+116>>2]){break a}q[c+8>>2]=q[a+8>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[a+8>>2]=q[a+20>>2];d=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=d;q[a+20>>2]=q[c+8>>2];d=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=d;break a}if(d>>>0>>0){q[c+8>>2]=q[a+8>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[a+8>>2]=q[e+8>>2];d=q[e+4>>2];q[a>>2]=q[e>>2];q[a+4>>2]=d;q[e+8>>2]=q[c+8>>2];d=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=d;break a}q[c+8>>2]=q[a+8>>2];d=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;q[a+8>>2]=q[a+20>>2];d=q[a+16>>2];q[a>>2]=q[a+12>>2];q[a+4>>2]=d;q[a+20>>2]=q[c+8>>2];d=q[c+4>>2];q[a+12>>2]=q[c>>2];q[a+16>>2]=d;if(t[g+116>>2]>=t[q[a+20>>2]+116>>2]){break a}q[c+8>>2]=q[a+20>>2];d=q[a+16>>2];q[c>>2]=q[a+12>>2];q[c+4>>2]=d;q[a+20>>2]=q[e+8>>2];d=q[e+4>>2];q[a+12>>2]=q[e>>2];q[a+16>>2]=d;q[e+8>>2]=q[c+8>>2];d=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=d}c=a+36|0;if((c|0)!=(b|0)){while(1){d=c;g=q[c+8>>2];if(t[g+116>>2]>2]+116>>2]){h=q[d>>2];i=q[d+4>>2];f=d;while(1){b:{c=e;e=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=e;q[f+8>>2]=q[c+8>>2];if((a|0)==(c|0)){c=a;break b}e=c-12|0;f=c;if(t[g+116>>2]>2]+116>>2]){continue}}break}q[c+8>>2]=g;q[c>>2]=h;q[c+4>>2]=i}e=d;c=e+12|0;if((c|0)!=(b|0)){continue}break}}}function wJ(a,b){var c=0,d=0,e=0,f=0,g=0;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}if(!r[852468]){return 0}b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}e=q[213116];Gj(e);c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213119];d:{if(!c){break d}c=q[q[213118]+((a>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break d}d=q[213120];while(1){f=(c<<4)+d|0;if(q[f>>2]!=(a|0)){c=q[f+12>>2];if((c|0)!=-1){continue}break d}break}if(b){q[b>>2]=s[((c<<4)+d|0)+8>>1]}g=q[((c<<4)+d|0)+4>>2]}Bj(e);return g}function Vs(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=q[a+44>>2];k=c-262|0;f=q[a+116>>2];b=c;while(1){h=q[a+108>>2];f=(q[a+60>>2]-f|0)-h|0;if(b+k>>>0<=h>>>0){b=q[a+56>>2];Ti(b,b+c|0,c);q[a+112>>2]=q[a+112>>2]-c;h=q[a+108>>2]-c|0;q[a+108>>2]=h;q[a+92>>2]=q[a+92>>2]-c;d=q[a+76>>2];b=q[a+68>>2]+(d<<1)|0;while(1){b=b-2|0;g=s[b>>1];e=g-c|0;p[b>>1]=e>>>0>g>>>0?0:e;d=d-1|0;if(d){continue}break}b=q[a+64>>2]+(c<<1)|0;d=c;while(1){b=b-2|0;g=s[b>>1];e=g-c|0;p[b>>1]=e>>>0>g>>>0?0:e;d=d-1|0;if(d){continue}break}f=c+f|0}a:{e=q[a>>2];g=q[e+4>>2];if(!g){break a}b=q[a+116>>2];d=a;f=f>>>0>>0?f:g;if(f){i=q[a+56>>2];q[e+4>>2]=g-f;b=Ti(b+(h+i|0)|0,q[e>>2],f);b:{c:{switch(q[q[e+28>>2]+24>>2]-1|0){case 0:q[e+48>>2]=Dq(q[e+48>>2],b,f);break b;case 1:break c;default:break b}}q[e+48>>2]=vl(q[e+48>>2],b,f)}q[e>>2]=f+q[e>>2];q[e+8>>2]=f+q[e+8>>2];b=q[a+116>>2]}f=b+f|0;q[d+116>>2]=f;d=q[a+5812>>2];d:{if(f+d>>>0<3){break d}b=q[a+108>>2]-d|0;e=q[a+56>>2];h=b+e|0;g=r[h|0];q[a+72>>2]=g;i=q[a+84>>2];j=g;g=q[a+88>>2];h=i&(r[h+1|0]^j<>2]=h;while(1){if(!d){break d}h=(r[(b+e|0)+2|0]^h<>2]=h;j=q[a+68>>2]+(h<<1)|0;p[q[a+64>>2]+((q[a+52>>2]&b)<<1)>>1]=s[j>>1];p[j>>1]=b;d=d-1|0;q[a+5812>>2]=d;b=b+1|0;if(f+d>>>0>2){continue}break}}if(!q[q[a>>2]+4>>2]|f>>>0>261){break a}b=q[a+44>>2];continue}break}d=q[a+60>>2];c=q[a+5824>>2];e:{if(d>>>0<=c>>>0){break e}b=q[a+116>>2]+q[a+108>>2]|0;if(b>>>0>c>>>0){c=d-b|0;c=c>>>0<258?c:258;Ui(b+q[a+56>>2]|0,0,c);q[a+5824>>2]=b+c;return}b=b+258|0;if(b>>>0<=c>>>0){break e}g=c+q[a+56>>2]|0;d=d-c|0;c=b-c|0;c=c>>>0>d>>>0?d:c;Ui(g,0,c);q[a+5824>>2]=c+q[a+5824>>2]}}function ZP(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;i=Ii-1056|0;Ii=i;d=i+1048|0;q[d>>2]=0;q[d+4>>2]=0;d=i+1040|0;q[d>>2]=0;q[d+4>>2]=0;q[i+1032>>2]=0;q[i+1036>>2]=0;q[i+1024>>2]=0;q[i+1028>>2]=0;a:{b:{c:{d:{c=r[b|0];e:{if(!c){j=-1;d=1;break e}while(1){if(!r[a+f|0]){break b}d=c&255;f=f+1|0;q[(d<<2)+i>>2]=f;c=(i+1024|0)+(d>>>3&28)|0;q[c>>2]=q[c>>2]|1<>>0>1){break d}}g=-1;e=1;break c}k=1;c=1;while(1){g=r[(c+j|0)+b|0];h=r[b+d|0];f:{if((g|0)==(h|0)){if((c|0)==(k|0)){e=e+k|0;c=1;break f}c=c+1|0;break f}if(g>>>0>h>>>0){k=d-j|0;e=d;c=1;break f}j=e;e=e+1|0;k=1;c=1}d=c+e|0;if(f>>>0>d>>>0){continue}break}e=1;g=-1;if(f>>>0<=1){d=k;break c}d=0;h=1;c=1;while(1){m=r[(c+g|0)+b|0];l=r[b+e|0];g:{if((m|0)==(l|0)){if((c|0)==(h|0)){d=d+h|0;c=1;break g}c=c+1|0;break g}if(l>>>0>m>>>0){h=e-g|0;d=e;c=1;break g}g=d;d=d+1|0;h=1;c=1}e=d+c|0;if(f>>>0>e>>>0){continue}break}d=k;e=h}c=d;d=g+1>>>0>j+1>>>0;h=d?e:c;l=d?g:j;m=l+1|0;h:{if(Ej(b,h+b|0,m)){d=(l^-1)+f|0;h=(d>>>0>>0?l:d)+1|0;n=f-h|0;k=0;break h}n=f-h|0;k=n}p=f-1|0;o=f|63;g=0;d=a;while(1){i:{if(a-d>>>0>=f>>>0){break i}c=Oq(a,0,o);if(c){a=c;if(c-d>>>0>>0){break b}break i}a=a+o|0}e=r[d+p|0];c=f;j:{k:{if(!(q[(i+1024|0)+(e>>>3&28)>>2]>>>e&1)){break k}c=f-q[(e<<2)+i>>2]|0;if(c){c=k?g?c>>>0>>0?n:c:c:c;break k}l:{c=m;e=c>>>0>g>>>0?c:g;j=r[e+b|0];if(j){while(1){if(r[d+e|0]!=(j&255)){break l}e=e+1|0;j=r[e+b|0];if(j){continue}break}}while(1){if(c>>>0<=g>>>0){break a}c=c-1|0;if(r[c+b|0]==r[d+c|0]){continue}break}c=h;g=k;break j}c=e-l|0}g=0}d=d+c|0;continue}}d=0}Ii=i+1056|0;return d}function RL(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=x(0),l=x(0);f=Ii-16|0;Ii=f;d=q[b+92>>2];g=d;h=q[b+88>>2];a:{if(d|h){d=X6(a,h,g,f+12|0);break a}d=ak(a,q[b>>2],f+12|0)}g=q[f+12>>2];q[c+48>>2]=g;b:{c:{d:{e:{f:{g:{if(!d){d=qr(a,g,c+56|0);if(d){break g}q[c+64>>2]=b;a=q[f+12>>2];a=Mi[q[75017]](q[a>>2],q[a+4>>2])|0;d=q[f+12>>2];g=Mi[q[75018]](q[d>>2],q[d+4>>2])|0;d=-1;if(a>>>0>2]|g>>>0>2]){break g}if(o[c+12|0]&1){break f}a=q[b+16>>2];Wi(a,8,c,c+8|0,c+4|0);d=q[c>>2];if(a>>>0>q[c+8>>2]-d>>3>>>0){break e}q[c+4>>2]=d+(a<<3);g=$i((a|0)!=(a&1073741823)?-1:a<<2);if(a){d=0;while(1){if(t[b+16>>2]<=d>>>0){break d}h=q[b+12>>2]+w(d,12)|0;e=Oi(q[h+8>>2]);i=q[c>>2];if(q[c+4>>2]-i>>3>>>0<=d>>>0){break c}i=i+(d<<3)|0;q[i>>2]=e;q[i+4>>2]=Li;e=g+(d<<2)|0;p[e>>1]=q[h>>2];p[e+2>>1]=q[h+4>>2];d=d+1|0;if((a|0)!=(d|0)){continue}break}}e=q[b+24>>2];i=q[b+20>>2];h=q[b+32>>2];d=q[b+36>>2];a=d&-2;a=$i((a|0)!=(d&1073741822)?-1:a<<2);j=d>>>1|0;if(j){k=x(x(1)/x(e-1>>>0));l=x(x(1)/x(i-1>>>0));d=0;while(1){e=d<<3;u[e+a>>2]=x(l*u[e+h>>2])+x(-.5);e=e|4;u[e+a>>2]=x(k*u[e+h>>2])+x(-.5);d=d+1|0;if((j|0)!=(d|0)){continue}break}}q[c+68>>2]=0;Ni(g);Ni(a);a=q[b+8>>2];Ui(q[c+16>>2],255,q[c+20>>2]<<2);q[c+36>>2]=-1;q[c+40>>2]=0;q[c+28>>2]=q[c+24>>2];c=c+16|0;Pv(c,37,a);d=0;q[f+8>>2]=0;if(a){while(1){if(t[b+8>>2]<=d>>>0){break b}vr(c,Oi(q[q[b+4>>2]+w(d,40)>>2]),Li,f+8|0);d=q[f+8>>2]+1|0;q[f+8>>2]=d;if(a>>>0>d>>>0){continue}break}}d=0;break g}Aj(b)}Ii=f+16|0;return d}J(65031,65106,493,65162);G()}J(65174,65106,506,65193);G()}J(64976,64988,96,65020);G()}J(65201,65106,479,65020);G()}J(64976,64988,88,65020);G()}function kR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=Ii+ -64|0;Ii=f;b=q[q[a+68>>2]+1120>>2];q[f+60>>2]=0;d=gE(a);a:{if(d){break a}b=q[b+16>>2]-1|0;b:{if(b>>>0<=9){b=q[(b<<2)+181160>>2];break b}b=0}if(!b){q[a+4>>2]=q[a+4>>2]+1;d=0;break a}c:{if(q[a+232>>2]){d:{e:{b=q[a+68>>2];if(b){c=q[b+452>>2];if(c){break e}}c=q[q[a>>2]+84>>2];if(c){break e}b=0;break d}b=q[c>>2]}if(b){break c}}q[a+4>>2]=q[a+4>>2]+1;d=0;break a}f:{g:{b=q[a+68>>2];if(b){d=q[b+452>>2];if(d){break g}}d=q[q[a>>2]+84>>2];if(d){break g}b=0;break f}b=q[d+4>>2]}if(!b){d=-30208;break a}Mi[q[q[a+68>>2]+1108>>2]](a,f);h:{if(q[a+20>>2]!=3){d=4;i:{j:{b=q[a+68>>2];if(b){c=q[b+452>>2];if(c){break j}}c=q[q[a>>2]+84>>2];if(c){break j}b=0;break i}b=q[c+4>>2]}k:{if(!b){break k}b=q[b>>2];if(!b){break k}e=Mi[q[b+12>>2]](4)|0}if(!e){c=36;d=0;b=f;break h}c=20;b=f+16|0;break h}d=q[q[q[a+68>>2]+1120>>2]+12>>2]==7;o[q[a+204>>2]+4|0]=d?5:4;l:{m:{b=q[a+68>>2];if(b){c=q[b+452>>2];if(c){break m}}c=q[q[a>>2]+84>>2];if(c){break m}b=0;break l}b=q[c+4>>2]}n:{if(!b){break n}c=q[b>>2];if(!c){break n}e=Mi[q[c+12>>2]](1)|0}o:{if(!e){c=0;p:{if(!b){break p}b=q[b>>2];if(!b){break p}c=Mi[q[b+12>>2]](4)|0}b=c?3:0;break o}b=1}o[q[a+204>>2]+5|0]=b;d=d?7:6;c=0;g=2;b=f}q:{r:{e=q[a+68>>2];if(e){e=q[e+452>>2];if(e){break r}}e=q[q[a>>2]+84>>2];if(e){break r}h=0;break q}h=q[e+4>>2]}e=b;b=q[a>>2];d=CW(h,d,e,c,(q[a+204>>2]+g|0)+6|0,f+60|0,q[b+24>>2],q[b+28>>2]);if(d){break a}o[q[a+204>>2]+(g|4)|0]=q[f+60>>2]>>>8;o[q[a+204>>2]+(g|5)|0]=q[f+60>>2];b=q[f+60>>2];q[a+208>>2]=22;q[a+212>>2]=(b+g|0)+6;o[q[a+204>>2]]=15;q[a+4>>2]=q[a+4>>2]+1;d=Pq(a)}Ii=f- -64|0;return d}function xpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-32|0;Ii=e;a:{g=q[a+8>>2];b=q[g>>2];if((b|0)!=q[g+4>>2]){while(1){c=w(h,28)+b|0;b=r[c+24|0];b:{if((b&3)!=3){break b}f=q[c+8>>2];c:{if(!f){d=0;break c}b=q[g+32>>2];q[e+28>>2]=c;q[e+24>>2]=b;d=jt(f,163,e+24|0,1e4);if((d|0)==-17){break b}b=r[c+24|0]}o[c+24|0]=b&254;f=q[q[a+12>>2]+4>>2];b=0;d:{if(!f){break d}b=q[f+120>>2]}f=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[c+12>>2]);rj(b,-1e4,q[c+16>>2]);ej(b,-1);yk(b);if(!zz(b)){Ri(b,-3);Pi(4,34592,35019,0);o[c+24|0]=r[c+24|0]&254;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((f|0)==q[b+8>>2]-q[b+12>>2]>>4){break b}J(35113,35134,372,35188);G()}if(q[c+12>>2]==-2){Ri(b,-3);Pi(4,34592,35201,0);o[c+24|0]=r[c+24|0]&254;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((f|0)==q[b+8>>2]-q[b+12>>2]>>4){break b}J(35113,35134,380,35188);G()}rj(b,-1e4,q[c+20>>2]);i=q[b+8>>2];q[i+8>>2]=1;q[i>>2]=!d;q[b+8>>2]=q[b+8>>2]+16;Pm(b,3,0);o[c+24|0]=r[c+24|0]&254;d=q[c+12>>2];if((d|0)!=-2){Rj(b,-1e4,d);Rj(b,-1e4,q[c+16>>2]);Rj(b,-1e4,q[c+20>>2]);q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+20>>2]=-2}d=q[c+8>>2];if(d){Pn(d);q[c+8>>2]=0}if((f|0)!=q[b+8>>2]-q[b+12>>2]>>4){break a}}h=h+1|0;b=q[g>>2];if(h>>>0<(q[g+4>>2]-b|0)/28>>>0){continue}break}}a=q[g+24>>2];q[72244]=a+q[72244];q[e+16>>2]=a;q[e+20>>2]=0;q[e+8>>2]=a;q[e+12>>2]=0;Ii=e+32|0;return 0}J(35113,35134,388,35188);G()}function Ey(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=Ii-80|0;Ii=h;while(1){d=q[a+12>>2]+(c<<4)|0;e=d-16|0;j=d+16|0;a:{b:{c:{d:{if(q[d-8>>2]-3>>>0>1){break d}g=j-16|0;switch(q[j-8>>2]-3|0){case 1:break b;case 0:break c;default:break d}}d=j-16|0;e:{f=el(a,e,15);if(!q[f+8>>2]){f=el(a,d,15);if(!q[f+8>>2]){break e}}j=q[a+32>>2];i=q[f+4>>2];g=q[a+8>>2];q[g>>2]=q[f>>2];q[g+4>>2]=i;q[g+8>>2]=q[f+8>>2];g=q[e+4>>2];f=q[a+8>>2];q[f+16>>2]=q[e>>2];q[f+20>>2]=g;q[f+24>>2]=q[e+8>>2];g=q[d+4>>2];f=q[a+8>>2];q[f+32>>2]=q[d>>2];q[f+36>>2]=g;q[f+40>>2]=q[d+8>>2];g=q[a+8>>2];if((q[a+28>>2]-g|0)<=48){Mk(a,3);g=q[a+8>>2]}q[a+8>>2]=g+48;Ul(a,g,1);d=q[a+8>>2]-16|0;q[a+8>>2]=d;f=q[d+4>>2];e=q[a+32>>2]+(e-j|0)|0;q[e>>2]=q[d>>2];q[e+4>>2]=f;q[e+8>>2]=q[d+8>>2];d=2;break a}vZ(a,e,d);d=2;break a}v[h+32>>3]=v[g>>3];cu(h+48|0,142961,h+32|0);d=Yj(a,h+48|0,hj(h+48|0));q[g+8>>2]=4;q[g>>2]=d}f=q[q[g>>2]+12>>2];if(f){d=1;f:{if((b|0)<=1){break f}while(1){g:{h:{e=g-(d<<4)|0;switch(q[e+8>>2]-3|0){case 1:break g;case 0:break h;default:break f}}v[h+16>>3]=v[e>>3];cu(h+48|0,142961,h+16|0);i=Yj(a,h+48|0,hj(h+48|0));q[e+8>>2]=4;q[e>>2]=i}e=q[q[e>>2]+12>>2];if(e>>>0>=-3-f>>>0){Yk(a,143007,0)}f=e+f|0;d=d+1|0;if((d|0)!=(b|0)){continue}break}d=b}g=0;f=Ks(a,q[a+16>>2]+52|0,f);e=d;while(1){k=q[j-(e<<4)>>2];i=q[k+12>>2];Ti(f+g|0,k+16|0,i);g=g+i|0;i=(e|0)>1;e=e-1|0;if(i){continue}break}e=Yj(a,f,g);f=j-(d<<4)|0;q[f+8>>2]=4;q[f>>2]=e;break a}d=2;if(q[e+8>>2]!=3){break a}v[h>>3]=v[e>>3];cu(h+48|0,142961,h);f=Yj(a,h+48|0,hj(h+48|0));q[e+8>>2]=4;q[e>>2]=f}d=d-1|0;c=c-d|0;b=b-d|0;if((b|0)>1){continue}break}Ii=h+80|0}function kZ(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=Ii-32|0;Ii=g;q[g+24>>2]=-1;q[g+28>>2]=-1;q[g+16>>2]=0;q[g+20>>2]=0;q[g+8>>2]=5;a:{b:{switch(b|0){case 0:if(!(q[c+20>>2]==-1?!(q[c>>2]!=5|q[c+16>>2]!=-1):0)){rn(a,c)}Xo(a,18,c,g+8|0);break a;case 1:Nm(a,c);c:{d:{e:{switch(q[c>>2]-1|0){case 0:case 2:q[c>>2]=2;break c;case 1:case 3:case 4:q[c>>2]=3;break c;case 9:b=q[c+8>>2];e=q[q[a>>2]+12>>2]+(b<<2)|0;f:{if((b|0)>=1){d=e-4|0;b=q[d>>2];if(o[(b&63)+141360|0]<0){break f}}b=q[e>>2];d=e}q[d>>2]=b&-16321|!(b&16320)<<6;break c;case 10:f=q[a+36>>2];d=f+1|0;e=q[a>>2];g:{if((f|0)=249){Sj(q[a+12>>2],141814);e=q[a>>2];b=q[a+36>>2]+1|0}o[e+75|0]=d}q[a+36>>2]=b;Nw(a,c,b-1|0);if(q[c>>2]!=12){break d}break;case 11:break e;default:break c}}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}b=fl(a,q[c+8>>2]<<23|19,q[q[a+12>>2]+8>>2]);q[c>>2]=11;q[c+8>>2]=b}b=q[c+20>>2];f=q[c+16>>2];q[c+20>>2]=f;q[c+16>>2]=b;if((f|0)!=-1){h=q[q[a>>2]+12>>2];while(1){b=(f<<2)+h|0;h:{if((f|0)>=1){e=b-4|0;d=q[e>>2];if(o[(d&63)+141360|0]<0){break h}}d=q[b>>2];e=b}if((d&63)==27){q[e>>2]=d&8372224|d>>>17&32704|26}b=(q[b>>2]>>>14|0)-131071|0;f=(b|0)==-1?-1:(b+f|0)+1|0;if((f|0)!=-1){continue}break}b=q[c+16>>2]}if((b|0)==-1){break a}c=q[q[a>>2]+12>>2];while(1){a=c+(b<<2)|0;i:{if((b|0)>=1){e=a-4|0;d=q[e>>2];if(o[(d&63)+141360|0]<0){break i}}d=q[a>>2];e=a}if((d&63)==27){q[e>>2]=d&8372224|d>>>17&32704|26}a=(q[a>>2]>>>14|0)-131071|0;b=(a|0)==-1?-1:(a+b|0)+1|0;if((b|0)!=-1){continue}break}break a;case 2:break b;default:break a}}rn(a,c);Xo(a,20,c,g+8|0)}Ii=g+32|0}function Bia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=Ii-112|0;Ii=b;f=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[61028],b+76|0)){break a}c=q[q[a+32>>2]+8>>2];q[b+32>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+36>>2]=-1;q[b+64>>2]=0;q[b+68>>2]=0;q[b+48>>2]=0;q[b>>2]=0;q[b+4>>2]=0;f=RL(q[a>>2],q[b+76>>2],b);b:{if(!f){d=q[c+48>>2];if(d){cj(q[a>>2],d)}d=q[c+64>>2];if(d){Aj(d)}q[c+64>>2]=q[b+64>>2];q[c+48>>2]=q[b+48>>2];d=q[b>>2];q[b>>2]=q[c>>2];q[c>>2]=d;d=q[b+4>>2];q[b+4>>2]=q[c+4>>2];q[c+4>>2]=d;d=q[b+8>>2];q[b+8>>2]=q[c+8>>2];q[c+8>>2]=d;d=r[b+12|0];o[b+12|0]=o[c+12|0]&1|d&254;o[c+12|0]=r[c+12|0]&254|d&1;q[c+68>>2]=q[b+68>>2];d=q[b+44>>2];g=q[b+40>>2];q[b+104>>2]=g;q[b+108>>2]=d;h=q[b+36>>2];i=q[b+32>>2];q[b+96>>2]=i;q[b+100>>2]=h;j=q[b+28>>2];k=q[b+24>>2];q[b+88>>2]=k;q[b+92>>2]=j;l=q[b+20>>2];m=q[b+16>>2];q[b+80>>2]=m;q[b+84>>2]=l;e=q[c+44>>2];q[b+40>>2]=q[c+40>>2];q[b+44>>2]=e;e=q[c+36>>2];q[b+32>>2]=q[c+32>>2];q[b+36>>2]=e;e=q[c+28>>2];q[b+24>>2]=q[c+24>>2];q[b+28>>2]=e;e=q[c+20>>2];q[b+16>>2]=q[c+16>>2];q[b+20>>2]=e;q[c+40>>2]=g;q[c+44>>2]=d;q[c+32>>2]=i;q[c+36>>2]=h;q[c+24>>2]=k;q[c+28>>2]=j;q[c+16>>2]=m;q[c+20>>2]=l;q[q[a+32>>2]+16>>2]=(((q[a+24>>2]+q[c+8>>2]|0)-q[c>>2]|0)+w(q[c+32>>2]-q[c+24>>2]>>4,12)|0)+72;break b}c=q[b+48>>2];if(c){cj(q[a>>2],c)}a=q[b+64>>2];if(a){Aj(a)}if(!q[b+68>>2]){break b}}c:{if(o[b+44|0]&1){break c}a=q[b+24>>2];if(a){Ni(a)}a=q[b+16>>2];if(!a){break c}Ni(a)}if(o[b+12|0]&1){break a}a=q[b>>2];if(!a){break a}Ni(a)}Ii=b+112|0;return f|0}function tt(a,b){var c=0,d=0,e=0,f=0,g=0;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}if(!r[852468]){return 0}b:{if(o[852568]&1){break b}if(!fk(852568)){break b}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}e=q[213116];Gj(e);c:{if(o[852568]&1){break c}if(!fk(852568)){break c}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;c=Wj();o[852468]=0;q[213116]=c;ek(852568)}c=q[213127];d:{if(!c){break d}c=q[q[213126]+(Cza(a,b,c)<<2)>>2];if((c|0)==-1){break d}f=q[213128];while(1){d=w(c,24)+f|0;if((a|0)!=q[d>>2]|q[d+4>>2]!=(b|0)){c=q[d+16>>2];if((c|0)!=-1){continue}break d}break}g=q[(w(c,24)+f|0)+8>>2]}Bj(e);return g}function tma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=Ii-160|0;Ii=b;h=nj(b+136|0,a,0,65882,601);o=oo(a,1,1,0);l=oo(a,3,1,0);m=jj(a,2);p=jj(a,4);i=jj(a,5);a:{if((i|0)<=0){q[b>>2]=i;c=Kj(h,67419,b);break a}Kp(o,b+132|0);Kp(l,b+128|0);a=q[b+132>>2];if((a|0)<(i+m|0)){q[b+24>>2]=i;q[b+20>>2]=m;q[b+16>>2]=a;c=Kj(h,67448,b+16|0);break a}if(q[b+128>>2]<(i+p|0)){q[b+40>>2]=i;q[b+36>>2]=m;q[b+32>>2]=a;c=Kj(h,67545,b+32|0);break a}TB(l,b+124|0);a=q[b+124>>2];j=b-w(a,96)|0;Ii=j;if(!a){break a}while(1){k=c<<1;d=w(k|1,48)+j|0;SB(l,c,d+8|0);g=q[d+12>>2];a=g;f=w(c,96)+j|0;n=f+36|0;e=q[d+8>>2];f=Ot(o,e,a,f+16|0,f+28|0,n,f+32|0);if(f){if((f|0)==6){q[b+64>>2]=aj(e,a);c=Kj(h,67641,b- -64|0);break a}a=b;if(f>>>0<=11){g=q[(f<<2)+262624>>2]}else{g=153853}q[a+48>>2]=g;c=Kj(h,67704,b+48|0);break a}f=d+36|0;Ot(l,e,a,d+16|0,d+28|0,f,d+32|0);k=w(k,48)+j|0;g=k;Pr(o,e,a,k+40|0,n);Pr(l,e,a,d+40|0,f);if(q[k+40>>2]!=q[d+40>>2]){i=aj(e,a);a=q[g+40>>2];b:{if(a>>>0<=8){a=q[(a<<2)+262672>>2];break b}a=154037}g=b;d=q[d+40>>2];c:{if(d>>>0<=8){e=q[(d<<2)+262672>>2];break c}e=154037}q[g+120>>2]=e;q[b+116>>2]=a;q[b+112>>2]=i;c=Kj(h,67766,b+112|0);break a}if(q[n>>2]!=q[f>>2]){a=aj(e,a);c=q[n>>2];q[b+104>>2]=q[f>>2];q[b+100>>2]=c;q[b+96>>2]=a;c=Kj(h,67836,b+96|0);break a}c=c+1|0;a=q[b+124>>2];if(c>>>0>>0){continue}break}c=0;if(!a){break a}a=0;while(1){e=w(a,96)+j|0;d=q[e+36>>2];g=e;e=a<<1;if(wL(g,w(d,m),w(e|1,48)+j|0,w(d,p),w(d,i))){a=a+1|0;if(a>>>0>2]){continue}break a}break}q[b+80>>2]=q[(w(e,48)+j|0)+40>>2];c=Kj(h,67389,b+80|0)}mj(h);Ii=b+160|0;return c|0}function Sda(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0;b=Ii-288|0;Ii=b;r=nj(b+264|0,a,0,202233,1089);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+260|0);a:{if(On(a,2)){h=nl(a,2);i=Li;break a}h=Oi(kj(a,2,0));i=Li}if(!aK(h,i)){q[b+48>>2]=ct(a,2,b+128|0);Qi(a,202404,b+48|0)}b:{if(Oj(a,3)){d=x(Mj(a,3));u[b+140>>2]=d;u[b+136>>2]=d;u[b+132>>2]=d;u[b+128>>2]=d;break b}c=Om(a,3);if(c){kea(b+112|0,e,q[b+260>>2],h,i);f=q[c+4>>2];g=q[c>>2];d=u[c+8>>2];u[b+140>>2]=u[b+124>>2];u[b+136>>2]=d;q[b+128>>2]=g;q[b+132>>2]=f;break b}c=rm(a,3);u[b+128>>2]=u[c>>2];u[b+132>>2]=u[c+4>>2];u[b+136>>2]=u[c+8>>2];u[b+140>>2]=u[c+12>>2]}c:{d:{e:{if(Oj(a,4)){g=jj(a,4);c=0;if((g|0)<42){break e}a=Qi(a,202428,0);break c}if(!IG(a,4)){break d}l=UG(a,4);rj(a,-1e4,q[e+8>>2]);ej(a,4);j=zk(a,-2);Ri(a,-2);m=1429;g=41;c=e}n=fj(a,5);f:{if(Oj(a,6)){d=x(Mj(a,6));if((Vi(a,7)|0)!=6){k=-2;break f}o=rp(a,7);rj(a,-1e4,q[e+8>>2]);ej(a,1);k=In(a,-2);Ri(a,-2);break f}k=-2;d=x(0);if((Vi(a,6)|0)==-1){break f}Nk(a,6,202510)}f=0;g:{if(!Oj(a,8)){break g}f=jj(a,8)}p=q[b+260>>2];if(!o){q[b+96>>2]=m;q[b+104>>2]=j;q[b+16>>2]=j;q[b+100>>2]=c;a=q[b+100>>2];q[b+8>>2]=q[b+96>>2];q[b+12>>2]=a;q[b+92>>2]=l;q[b+88>>2]=g;a=q[b+92>>2];q[b>>2]=q[b+88>>2];q[b+4>>2]=a;wK(e,p,h,i,b+128|0,b,f,x(n),d,0,0,0);a=0;break c}q[b+72>>2]=m;q[b+80>>2]=j;q[b+40>>2]=j;q[b+76>>2]=c;a=q[b+76>>2];q[b+32>>2]=q[b+72>>2];q[b+36>>2]=a;q[b+68>>2]=l;q[b+64>>2]=g;a=q[b+68>>2];q[b+24>>2]=q[b+64>>2];q[b+28>>2]=a;wK(e,p,h,i,b+128|0,b+24|0,f,x(n),d,1430,o,k);a=0;break c}a=Qi(a,202452,0)}mj(r);Ii=b+288|0;return a|0}function DT(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-1248|0;Ii=d;f=Tl(a,1,146027,0);c=d;a:{if((Vi(a,2)|0)<=0){b=ba(0)|0;break a}g=fj(a,2);if(y(g)<2147483648){b=~~g;break a}b=-2147483648}q[c+1244>>2]=b;b:{c:{if(r[f|0]==33){f=f+1|0;c=Gi(d+1244|0,962240)|0;break c}c=wF(d+1244|0)}if(!c){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;break b}if(!dj(f,146030)){vj(a,0,9);e=q[c>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146033);e=q[c+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146037);e=q[c+8>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146041);e=q[c+12>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146046);e=q[c+16>>2]+1|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146050);e=q[c+20>>2]+1900|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146056);e=q[c+24>>2]+1|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146061);e=q[c+28>>2]+1|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146066);b=q[c+32>>2];if((b|0)<0){break b}c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146071);break b}o[d+1243|0]=0;o[d+1241|0]=37;b=d+200|0;q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;e=d+1236|0;while(1){d:{a=r[f|0];e:{if((a|0)!=37){if(a){break e}zm(d+200|0);break b}b=r[f+1|0];if(b){break d}}b=q[d+200>>2];if(e>>>0<=b>>>0){ml(d+200|0);b=q[d+200>>2];a=r[f|0]}q[d+200>>2]=b+1;o[b|0]=a;f=f+1|0;continue}o[d+1242|0]=b;qn(d+200|0,d,kb(d|0,200,d+1241|0,c|0)|0);f=f+2|0;continue}}Ii=d+1248|0;return 1}function $oa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0);c=Ii-96|0;Ii=c;g=q[a+8>>2];h=q[q[a+12>>2]>>2];a:{b:{c:{d=q[a+16>>2];e=q[d+64>>2];b=q[57289];f=q[d+68>>2];b=(e|0)==q[b+8>>2]&(f|0)==q[b+12>>2];if(!b){i=q[57290];if(q[i+8>>2]!=(e|0)|q[i+12>>2]!=(f|0)){break c}}d=r[h+24|0];if(d&2){b=0;if(r[g+17|0]){break b}b=0;break b}o[h+24|0]=d&251|b<<2;b=0;break b}b=q[60212];if((e|0)==q[b+8>>2]&(f|0)==q[b+12>>2]){b=0;if(r[g+17|0]){break b}b=0;break b}b=q[60483];if((e|0)==q[b+8>>2]&(f|0)==q[b+12>>2]){u[c+64>>2]=u[c+48>>2];d=q[c+56>>2];q[c+68>>2]=q[c+52>>2];q[c+72>>2]=d;j=u[c+52>>2];k=u[c+48>>2];u[c+88>>2]=u[c+56>>2];u[c+84>>2]=j;u[c+80>>2]=k;a=q[a+16>>2];b=a+32|0;d=a;a=q[60504];a=vk(b,d,q[a+8>>2],q[a+12>>2],0,a,c- -64|0,32);b=0;if(!a){break b}q[c>>2]=q[q[60504]+4>>2];q[c+4>>2]=a;Pi(4,37377,37697,c);b=-1e3;break b}a=q[60558];if((e|0)==q[a+8>>2]&(f|0)==q[a+12>>2]){if(r[g+17|0]){Pi(4,37377,37741,0);b=-1e3;break b}a=q[h>>2];if(q[a+160>>2]>=0){Pi(4,37377,37790,0);b=-1e3;break b}a=q[a+136>>2];if(!(t[d+104>>2]>2]?t[d+100>>2]<(q[a+32>>2]&2147483647)>>>0:0)){Pi(4,37377,37860,0);b=-1e3;break b}d:{e=q[d+108>>2];if((e|0)==-1){break d}a=q[a>>2];if(e>>>0>2]-q[a>>2]>>3>>>0){break d}Pi(4,37377,37905,0);b=-1e3;break b}a=r[d+120|0]<<2&4|(r[d+116|0]<<1&2|o[d+112|0]&1);o[c+39|0]=a;o[c+40|0]=a;q[c+20>>2]=q[d+96>>2];q[c+16>>2]=e;Pi(4,37377,37961,c+16|0);b=-1e3;break b}d=0;a=q[60580];b=d;if(q[a+8>>2]!=(e|0)|q[a+12>>2]!=(f|0)){break b}if(r[g+17|0]){break a}if(q[q[h>>2]+160>>2]>=0){Pi(4,37377,38066,0);d=-1e3}b=d}d=b;Ii=c+96|0;return d|0}J(38014,37552,1202,38037);G()}function LC(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Ii-96|0;Ii=g;i=q[60342];f=i;l=q[f+8>>2];m=q[f+12>>2];h=g+88|0;f=h;q[f>>2]=0;q[f+4>>2]=0;q[g+80>>2]=0;q[g+84>>2]=0;q[g+72>>2]=0;q[g+76>>2]=0;q[g+64>>2]=0;q[g+68>>2]=0;f=g- -64|0;o[f|0]=0;o[f+1|0]=0;o[f+2|0]=0;o[f+3|0]=0;o[f+4|0]=0;o[f+5|0]=0;o[f+6|0]=0;o[f+7|0]=0;o[f+24|0]=0;o[f+25|0]=0;o[f+26|0]=0;o[f+27|0]=0;o[f+28|0]=0;o[f+29|0]=0;o[f+30|0]=0;o[f+31|0]=0;o[f+16|0]=0;o[f+17|0]=0;o[f+18|0]=0;o[f+19|0]=0;o[f+20|0]=0;o[f+21|0]=0;o[f+22|0]=0;o[f+23|0]=0;o[f+8|0]=0;o[f+9|0]=0;o[f+10|0]=0;o[f+11|0]=0;o[f+12|0]=0;o[f+13|0]=0;o[f+14|0]=0;o[f+15|0]=0;f=g;q[f+56>>2]=0;q[f+60>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+32>>2]=0;q[f+36>>2]=0;o[f+32|0]=0;o[f+33|0]=0;o[f+34|0]=0;o[f+35|0]=0;o[f+36|0]=0;o[f+37|0]=0;o[f+38|0]=0;o[f+39|0]=0;o[f+56|0]=0;o[f+57|0]=0;o[f+58|0]=0;o[f+59|0]=0;o[f+60|0]=0;o[f+61|0]=0;o[f+62|0]=0;o[f+63|0]=0;o[f+48|0]=0;o[f+49|0]=0;o[f+50|0]=0;o[f+51|0]=0;o[f+52|0]=0;o[f+53|0]=0;o[f+54|0]=0;o[f+55|0]=0;o[f+40|0]=0;o[f+41|0]=0;o[f+42|0]=0;o[f+43|0]=0;o[f+44|0]=0;o[f+45|0]=0;o[f+46|0]=0;o[f+47|0]=0;f=q[q[b+80>>2]+8>>2];a:{if(!f){break a}f=q[f>>2];if(!f){break a}j=q[f+3216>>2];k=q[f+3220>>2]}q[g+48>>2]=c;q[g+52>>2]=d;q[g+80>>2]=c;q[g+84>>2]=d;c=q[g+44>>2];q[g+72>>2]=q[g+40>>2];q[g+76>>2]=c;c=q[g+60>>2];q[h>>2]=q[g+56>>2];q[h+4>>2]=c;q[g+32>>2]=j;q[g+36>>2]=k;q[g+64>>2]=j;q[g+68>>2]=k;b=to(b,e,h);if(b){q[g+16>>2]=q[q[60342]+4>>2];q[g+20>>2]=b;Pi(4,37377,39070,g+16|0)}a=vk(g- -64|0,g+32|0,l,m,0,i,a,128);if(a){q[g>>2]=q[q[60342]+4>>2];q[g+4>>2]=a;Pi(4,37377,39128,g)}Ii=g+96|0}function ku(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Ii-96|0;Ii=g;i=q[60382];f=i;l=q[f+8>>2];m=q[f+12>>2];h=g+88|0;f=h;q[f>>2]=0;q[f+4>>2]=0;q[g+80>>2]=0;q[g+84>>2]=0;q[g+72>>2]=0;q[g+76>>2]=0;q[g+64>>2]=0;q[g+68>>2]=0;f=g- -64|0;o[f|0]=0;o[f+1|0]=0;o[f+2|0]=0;o[f+3|0]=0;o[f+4|0]=0;o[f+5|0]=0;o[f+6|0]=0;o[f+7|0]=0;o[f+24|0]=0;o[f+25|0]=0;o[f+26|0]=0;o[f+27|0]=0;o[f+28|0]=0;o[f+29|0]=0;o[f+30|0]=0;o[f+31|0]=0;o[f+16|0]=0;o[f+17|0]=0;o[f+18|0]=0;o[f+19|0]=0;o[f+20|0]=0;o[f+21|0]=0;o[f+22|0]=0;o[f+23|0]=0;o[f+8|0]=0;o[f+9|0]=0;o[f+10|0]=0;o[f+11|0]=0;o[f+12|0]=0;o[f+13|0]=0;o[f+14|0]=0;o[f+15|0]=0;f=g;q[f+56>>2]=0;q[f+60>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+32>>2]=0;q[f+36>>2]=0;o[f+32|0]=0;o[f+33|0]=0;o[f+34|0]=0;o[f+35|0]=0;o[f+36|0]=0;o[f+37|0]=0;o[f+38|0]=0;o[f+39|0]=0;o[f+56|0]=0;o[f+57|0]=0;o[f+58|0]=0;o[f+59|0]=0;o[f+60|0]=0;o[f+61|0]=0;o[f+62|0]=0;o[f+63|0]=0;o[f+48|0]=0;o[f+49|0]=0;o[f+50|0]=0;o[f+51|0]=0;o[f+52|0]=0;o[f+53|0]=0;o[f+54|0]=0;o[f+55|0]=0;o[f+40|0]=0;o[f+41|0]=0;o[f+42|0]=0;o[f+43|0]=0;o[f+44|0]=0;o[f+45|0]=0;o[f+46|0]=0;o[f+47|0]=0;f=q[q[b+80>>2]+8>>2];a:{if(!f){break a}f=q[f>>2];if(!f){break a}j=q[f+3216>>2];k=q[f+3220>>2]}q[g+48>>2]=c;q[g+52>>2]=d;q[g+80>>2]=c;q[g+84>>2]=d;c=q[g+44>>2];q[g+72>>2]=q[g+40>>2];q[g+76>>2]=c;c=q[g+60>>2];q[h>>2]=q[g+56>>2];q[h+4>>2]=c;q[g+32>>2]=j;q[g+36>>2]=k;q[g+64>>2]=j;q[g+68>>2]=k;b=to(b,e,h);if(b){q[g+16>>2]=q[q[60382]+4>>2];q[g+20>>2]=b;Pi(4,37377,39070,g+16|0)}a=vk(g- -64|0,g+32|0,l,m,0,i,a,40);if(a){q[g>>2]=q[q[60382]+4>>2];q[g+4>>2]=a;Pi(4,37377,39128,g)}Ii=g+96|0}function MC(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Ii-96|0;Ii=g;i=q[60254];f=i;l=q[f+8>>2];m=q[f+12>>2];h=g+88|0;f=h;q[f>>2]=0;q[f+4>>2]=0;q[g+80>>2]=0;q[g+84>>2]=0;q[g+72>>2]=0;q[g+76>>2]=0;q[g+64>>2]=0;q[g+68>>2]=0;f=g- -64|0;o[f|0]=0;o[f+1|0]=0;o[f+2|0]=0;o[f+3|0]=0;o[f+4|0]=0;o[f+5|0]=0;o[f+6|0]=0;o[f+7|0]=0;o[f+24|0]=0;o[f+25|0]=0;o[f+26|0]=0;o[f+27|0]=0;o[f+28|0]=0;o[f+29|0]=0;o[f+30|0]=0;o[f+31|0]=0;o[f+16|0]=0;o[f+17|0]=0;o[f+18|0]=0;o[f+19|0]=0;o[f+20|0]=0;o[f+21|0]=0;o[f+22|0]=0;o[f+23|0]=0;o[f+8|0]=0;o[f+9|0]=0;o[f+10|0]=0;o[f+11|0]=0;o[f+12|0]=0;o[f+13|0]=0;o[f+14|0]=0;o[f+15|0]=0;f=g;q[f+56>>2]=0;q[f+60>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+32>>2]=0;q[f+36>>2]=0;o[f+32|0]=0;o[f+33|0]=0;o[f+34|0]=0;o[f+35|0]=0;o[f+36|0]=0;o[f+37|0]=0;o[f+38|0]=0;o[f+39|0]=0;o[f+56|0]=0;o[f+57|0]=0;o[f+58|0]=0;o[f+59|0]=0;o[f+60|0]=0;o[f+61|0]=0;o[f+62|0]=0;o[f+63|0]=0;o[f+48|0]=0;o[f+49|0]=0;o[f+50|0]=0;o[f+51|0]=0;o[f+52|0]=0;o[f+53|0]=0;o[f+54|0]=0;o[f+55|0]=0;o[f+40|0]=0;o[f+41|0]=0;o[f+42|0]=0;o[f+43|0]=0;o[f+44|0]=0;o[f+45|0]=0;o[f+46|0]=0;o[f+47|0]=0;f=q[q[b+80>>2]+8>>2];a:{if(!f){break a}f=q[f>>2];if(!f){break a}j=q[f+3216>>2];k=q[f+3220>>2]}q[g+48>>2]=c;q[g+52>>2]=d;q[g+80>>2]=c;q[g+84>>2]=d;c=q[g+44>>2];q[g+72>>2]=q[g+40>>2];q[g+76>>2]=c;c=q[g+60>>2];q[h>>2]=q[g+56>>2];q[h+4>>2]=c;q[g+32>>2]=j;q[g+36>>2]=k;q[g+64>>2]=j;q[g+68>>2]=k;b=to(b,e,h);if(b){q[g+16>>2]=q[q[60254]+4>>2];q[g+20>>2]=b;Pi(4,37377,39070,g+16|0)}a=vk(g- -64|0,g+32|0,l,m,0,i,a,48);if(a){q[g>>2]=q[q[60254]+4>>2];q[g+4>>2]=a;Pi(4,37377,39128,g)}Ii=g+96|0}function vma(a,b){a=a|0;b=b|0;var c=0,d=0,e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=x(0),l=0,m=x(0),n=x(0),o=x(0),s=x(0),t=x(0),v=0;b=Ii-144|0;Ii=b;a:{g=q[a+8>>2];d=q[g+8>>2];a=q[g+4>>2];c=d-a|0;if(!c){break a}if((a|0)!=(d|0)){d=a-d|0;d=((c|0)<(d|0)?d:c)>>>2|0;c=(c|0)>-1?c:-1;c=w(d,(c|0)<1?c:1);v=c>>>0>1?c:1;c=0;while(1){a=q[(c<<2)+a>>2];b:{if((r[a+166|0]&3)!=3){break b}d=QK(a);p[a+164>>1]=d;if(!(d&65535)){break b}i=u[a+28>>2];h=u[a+24>>2];e=u[a+20>>2];f=u[a+16>>2];q[b+124>>2]=0;q[b+108>>2]=0;q[b+92>>2]=0;j=x(f+f);n=x(x(1)-x(f*j));m=x(e+e);o=x(e*m);u[b+120>>2]=n-o;k=e;e=x(h+h);k=x(k*e);j=x(j*i);u[b+116>>2]=k-j;s=x(f*e);t=x(m*i);u[b+112>>2]=s+t;u[b+104>>2]=k+j;h=x(h*e);u[b+100>>2]=n-h;f=x(f*m);e=x(i*e);u[b+96>>2]=f-e;u[b+88>>2]=s-t;u[b+84>>2]=f+e;u[b+80>>2]=x(x(1)-o)-h;d=q[a+4>>2];l=q[a>>2];f=u[a+8>>2];q[b+140>>2]=1065353216;u[b+136>>2]=f;q[b+128>>2]=l;q[b+132>>2]=d;d=Jp(q[a+96>>2]);c:{if((q[q[a+96>>2]+136>>2]&512)>>>9|0){_k(b+16|0,d,b+80|0);break c}jo(b+16|0,d,b+80|0)}u[a+32>>2]=u[b+16>>2];u[a+36>>2]=u[b+20>>2];u[a+40>>2]=u[b+24>>2];u[a+44>>2]=u[b+28>>2];u[a+48>>2]=u[b+32>>2];u[a+52>>2]=u[b+36>>2];u[a+56>>2]=u[b+40>>2];u[a+60>>2]=u[b+44>>2];u[a- -64>>2]=u[b+48>>2];u[a+68>>2]=u[b+52>>2];u[a+72>>2]=u[b+56>>2];u[a+76>>2]=u[b+60>>2];f=u[b+72>>2];e=u[b+68>>2];i=u[b+64>>2];u[a+92>>2]=u[b+76>>2];u[a+88>>2]=f;u[a+84>>2]=e;u[a+80>>2]=i}a=q[g+4>>2];l=q[g+8>>2]-a>>2;c=c+1|0;if((v|0)==(c|0)){break a}if(c>>>0>>0){continue}break}}J(55728,55585,479,55717);G()}q[73568]=q[73568]+l;a=q[g+8>>2]-q[g+4>>2]>>2;q[b>>2]=a;q[b+4>>2]=0;q[b+8>>2]=a;q[b+12>>2]=0;Ii=b+144|0;return 0}function Efa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;e=q[b>>2];d=1;a:{if((e|0)!=1){break a}e=1;d=1;if(r[a+156|0]&2){break a}e=0;d=s[b+8>>1]}c=d&65535;f=Yi(c<<2);rc(c|0,f|0);b:{c:{d:{if(r[q[75054]+156|0]&64){c=K()|0;if(c){break d}}c=Ui($i(76),0,76);q[c+56>>2]=0;q[c+60>>2]=0;q[c+52>>2]=1;q[c+44>>2]=2;q[c+48>>2]=1;q[c+36>>2]=3;q[c+40>>2]=5;g=c- -64|0;q[g>>2]=0;q[g+4>>2]=0;o[c+71|0]=0;o[c+72|0]=0;o[c+73|0]=0;o[c+74|0]=0;q[c+4>>2]=f;q[c>>2]=e;f=s[b+4>>1];p[c+14>>1]=f;e=s[b+6>>1];p[c+16>>1]=e;g=s[b+8>>1];p[c+12>>1]=d;p[c+18>>1]=g;d=s[b+10>>1];e:{if(!d){p[c+20>>1]=f;break e}p[c+20>>1]=d;e=s[b+12>>1]}b=0;p[c+26>>1]=0;p[c+24>>1]=0;p[c+22>>1]=e;q[c+8>>2]=0;d=q[a+32>>2];f:{g:{if(!d){e=q[a+24>>2];b=8;break g}e=q[a+24>>2];h:{while(1){if(q[(b<<2)+e>>2]){b=b+1|0;if((d|0)!=(b|0)){continue}break h}break}if((b|0)!=-1){break f}}b=d+8|0;if(b>>>0>65535){break c}}q[a+24>>2]=ul(e,b<<2);q[a+28>>2]=ul(q[a+28>>2],b<<1);b=q[a+24>>2]+(q[a+32>>2]<<2)|0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=q[a+28>>2]+(q[a+32>>2]<<1)|0;p[b>>1]=0;p[b+2>>1]=0;p[b+4>>1]=0;p[b+6>>1]=0;p[b+8>>1]=0;p[b+10>>1]=0;p[b+12>>1]=0;p[b+14>>1]=0;d=q[a+32>>2]+8|0;q[a+32>>2]=d}i:{if(d){e=q[a+24>>2];b=0;while(1){f=e+(b<<2)|0;if(!q[f>>2]){break i}b=b+1|0;if((d|0)!=(b|0)){continue}break}}J(93784,91032,238,93815);G()}d=s[a+36>>1];d=d>>>0>65533?1:d+1|0;p[a+36>>1]=d;p[q[a+28>>2]+(b<<1)>>1]=d;q[f>>2]=c;a=s[a+36>>1]<<16|b;if((a|0)==-1){break b}Li=1;return a|0}lj(c,93936,2847);J(88669,88575,2847,93936);G()}J(93752,91032,200,93775);G()}J(93819,91032,251,93815);G()}function EP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=0,i=x(0),j=0,k=x(0),l=0,m=0,n=x(0),p=x(0),s=x(0),t=0,v=0,w=0,z=x(0),B=x(0),E=0,F=0,H=x(0),I=x(0),K=0;h=b;l=q[h+48>>2];v=q[h+52>>2];g=u[h+40>>2];w=q[h+4>>2];m=w+(q[h+44>>2]<<1)|0;o[m|0]=r[m-2|0];m=q[h+44>>2]<<1;o[(m|1)+w|0]=r[(m+w|0)-1|0];s=u[h+32>>2];k=u[h+28>>2];j=q[a+4>>2];t=q[a>>2];z=u[h+20>>2];i=u[h+16>>2];g=x(g*x(+(Bza(c<<31,c>>>1|0,d)>>>0)+ +(Li>>>0)*4294967296));a:{if(g=x(0)){c=~~g>>>0;m=x(y(g))>=x(1)?g>x(0)?~~x(A(x(C(x(g*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(g-x(~~g>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;break a}c=0;m=0}b:{if(!f){q[b+48>>2]=l;q[b+52>>2]=v;a=q[b+44>>2];d=0;break b}I=x(x(1)/x(f>>>0));n=k;B=x(s-k);k=x(j>>>0);s=x(B/k);p=x(t>>>0);g=x(n+x(s*p));s=x(x(s+g)-g);n=i;i=x(x(z-i)/k);k=x(n+x(i*p));z=x(x(i+k)-k);d=0;a=0;while(1){h=d;j=d<<1;d=j+w|0;t=r[d|0];K=r[d+2|0];i=x(I*x(a|0));p=x(+x(g+x(s*i))*1.5707963267948966);n=Nl(p);j=r[(j|1)+w|0];d=r[d+3|0];E=a<<3;F=E+e|0;B=n;n=x(k+x(z*i));i=x(x(+(l>>>0)+ +(v>>>0)*4294967296)*x(4.656612873077393e-10));H=x(x(1)-i);u[F>>2]=u[F>>2]+x(B*x(n*x(x(H*x((-128-t&255)>>>0))+x(i*x((-128-K&255)>>>0)))));p=Lk(p);t=(E|4)+e|0;u[t>>2]=u[t>>2]+x(p*x(n*x(x(H*x((-128-j&255)>>>0))+x(i*x((-128-d&255)>>>0)))));d=l;l=c;j=d+l|0;d=v+m|0;d=j>>>0>>0?d+1|0:d;l=j&2147483647;v=0;d=((d&2147483647)<<1|j>>>31)+h|0;a=a+1|0;if((f|0)!=(a|0)){continue}break}q[b+48>>2]=l;q[b+52>>2]=v;a=q[b+44>>2];if(h>>>0<=a>>>0){break b}J(211098,210166,983,211185);G()}c=q[b+4>>2];bl(c,c+(d<<1)|0,a-d<<1);q[b+44>>2]=q[b+44>>2]-d}function uoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-48|0;Ii=g;c=q[a+4>>2];h=q[a+8>>2];q[g+44>>2]=205;q[g+40>>2]=203;q[g+36>>2]=206;q[g+32>>2]=207;a=q[h+52>>2];q[g+20>>2]=0;q[g+16>>2]=c;q[g+8>>2]=a;b=q[c+32>>2];d=q[c+36>>2];a:{if((b|0)==(d|0)){b=d;break a}a=0;while(1){e=q[(a<<2)+b>>2];if((r[e+22|0]&3)==3){b=q[e+8>>2];f=(s[q[e+8>>2]+26>>1]+f|0)+((q[b+264>>2]-q[b+260>>2]|0)/12|0)|0;d=q[c+36>>2];b=q[c+32>>2]}a=a+1|0;if(a>>>0>2>>>0){continue}break}}b:{c:{a=(f<<1)+(f>>>3|0)|0;f=q[c>>2];e=(q[c+8>>2]-f|0)/320|0;if(a>>>0>e>>>0){if(o[c+12|0]&1){break b}Wi(a,320,c,c+8|0,c+4|0);if(o[c+28|0]&1){break b}Wi(a,4,c+16|0,c+24|0,c+20|0);b=q[c+16>>2];if(a>>>0>q[c+24>>2]-b>>2>>>0){break c}q[c+20>>2]=b+(a<<2);Ui(b+(e<<2)|0,0,a-e<<2);d=q[c+36>>2];f=q[c>>2];b=q[c+32>>2]}q[c+4>>2]=f;q[c+60>>2]=q[c+56>>2];if((b|0)!=(d|0)){a=0;while(1){e=q[(i<<2)+b>>2];if((r[e+22|0]&3)==3){f=g;b=q[e+16>>2];if(!b){b=q[q[e+4>>2]+96>>2]}q[f+12>>2]=q[b>>2];vba(q[e+8>>2],g+32|0,g+8|0);f=vp(q[h+52>>2],((q[c+4>>2]-q[c>>2]|0)/320|0)-a|0);b=Ev(q[h+52>>2],208,c);e=s[q[e+8>>2]+386>>1];d=q[c>>2];d:{if((q[c+4>>2]-d|0)/320>>>0<=a>>>0){b=f;break d}j=b<<6;e=e<<16;b=f;while(1){q[b+36>>2]=q[b+36>>2]&-64|32;d=w(a,320)+d|0;k=q[d+304>>2];q[b+28>>2]=a;q[b+16>>2]=d;q[b+20>>2]=0;q[b+24>>2]=e+k;q[b+32>>2]=q[q[d+156>>2]+132>>2];q[b+36>>2]=q[b+36>>2]&-16321|j;b=b+48|0;a=a+1|0;d=q[c>>2];if(a>>>0<(q[c+4>>2]-d|0)/320>>>0){continue}break}}up(q[h+52>>2],f,b);d=q[c+36>>2];b=q[c+32>>2]}i=i+1|0;if(i>>>0>2>>>0){continue}break}}Ii=g+48|0;return 0}J(40968,40745,506,40987);G()}J(40670,40745,493,40801);G()}function vG(a){var b=0,c=0;c=Ii-16|0;Ii=c;b=173159;a:{b:{c:{switch(a+103|0){case 102:b=173162;break a;case 101:b=173168;break a;case 100:b=173180;break a;case 99:b=173191;break a;case 98:b=173196;break a;case 97:b=173206;break a;case 96:b=173218;break a;case 95:b=173224;break a;case 94:b=173236;break a;case 93:b=173241;break a;case 92:b=173247;break a;case 91:b=173254;break a;case 90:b=173260;break a;case 89:b=173268;break a;case 88:b=173276;break a;case 86:b=173287;break a;case 83:b=173294;break a;case 81:b=173302;break a;case 80:b=173310;break a;case 79:b=173320;break a;case 78:b=173325;break a;case 77:b=173340;break a;case 76:b=173350;break a;case 75:b=173359;break a;case 74:b=173372;break a;case 73:b=173384;break a;case 72:b=173394;break a;case 71:b=173406;break a;case 3:b=173417;break a;case 2:b=173432;break a;case 1:b=173442;break a;case 0:b=173454;break a;default:if((a|0)==-1e3){break b}break;case 103:break a;case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 82:case 84:case 85:case 87:break c}}q[c>>2]=a;Pi(4,173470,173475,c);b=173513;break a}b=173462}Ii=c+16|0;return b}function lma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=Ii-112|0;c=b;Ii=c;j=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{g=jj(a,1);c:{if((g|0)<=0){q[c>>2]=g;b=Qi(a,66443,c);break c}if((Vi(a,2)|0)!=5){b=Qi(a,66498,0);break c}h=al(a,2);if((h|0)<=0){b=Qi(a,66545,0);break c}i=b-(w(h,24)+15&-16)|0;Ii=i;ej(a,2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;if(Hj(a,-2)){while(1){e=nj(c+88|0,a,0,65882,285);d:{if((Vi(a,-1)|0)!=5){b=c;f=Vi(a,-1);d=140583;e:{if((f|0)==-1){break e}d=q[(f<<2)+256832>>2]}q[b+80>>2]=d;Kj(e,66683,c+80|0);break d}ej(a,-1);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;f:{g:{h:{if(!Hj(a,-2)){Ri(a,-2);b=9;break h}d=w(k,24)+i|0;l=d;b=9;while(1){if((Vi(a,-2)|0)!=4){Ri(a,-4);d=Vi(a,-2);b=140583;i:{if((d|0)==-1){break i}b=q[(d<<2)+256832>>2]}q[c+68>>2]=uj(a,-2,0);q[c+64>>2]=b;Kj(e,66721,c- -64|0);break d}f=uj(a,-2,0);j:{if(!dj(f,66764)){q[d>>2]=$j(a,-1);q[d+4>>2]=Li;break j}if(!dj(f,66769)){b=jj(a,-1);break j}if(dj(f,66774)){break f}o[l+12|0]=jj(a,-1)}Ri(a,-2);if(Hj(a,-2)){continue}break}Ri(a,-2);if(b>>>0<9){break g}}q[c+36>>2]=0;q[c+40>>2]=8;q[c+32>>2]=b;Kj(e,66818,c+32|0);break d}q[d+8>>2]=b;break d}Ri(a,-4);q[c+48>>2]=f;Kj(e,66780,c+48|0)}mj(e);Ri(a,-2);k=k+1|0;if(Hj(a,-2)){continue}break}}Ri(a,-2);q[c+84>>2]=0;e=Lw(g,i,h&255,c+84|0);if(e){if(q[a+8>>2]-q[a+12>>2]>>4!=(j|0)){break b}b=c;if(e>>>0<=11){d=q[(e<<2)+262624>>2]}else{d=153853}q[b+16>>2]=d;b=Qi(a,66616,c+16|0);break c}q[c+88>>2]=q[c+84>>2];b=1;q[c+92>>2]=1;vz(a,c+88|0);if((j+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}}Ii=c+112|0;return b|0}J(65861,65882,416,66609);G()}J(66658,65882,423,66609);G()}function Ena(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=0,k=0,l=0;c=q[a+80>>2];d=q[c+8>>2];if((d|0)==q[c+4>>2]){xn(50838,50844,d-q[c>>2]>>2);return-1e3}f=B9(c);d=Ui($i(256),0,256);b=q[c+16>>2];if(q[c+20>>2]-b>>3>>>0>f>>>0){b=q[b+(f<<3)>>2];e=q[c>>2];if(b>>>0>2]-e>>2>>>0){q[e+(b<<2)>>2]=d;q[d>>2]=q[a>>2];g=q[a+40>>2];h=q[a+44>>2];i=u[a+24>>2];j=q[a+32>>2];k=q[a+36>>2];l=q[a+16>>2];e=q[a+20>>2];q[d+56>>2]=1065353216;b=d;q[b+48>>2]=1065353216;q[b+52>>2]=1065353216;u[b+40>>2]=i;q[b+32>>2]=l;q[b+36>>2]=e;q[b+24>>2]=g;q[b+28>>2]=h;q[b+16>>2]=j;q[b+20>>2]=k;e=q[a+76>>2];q[b+128>>2]=e;o[b+144|0]=0;o[b+145|0]=0;o[b+146|0]=0;o[b+147|0]=0;o[b+148|0]=0;o[b+149|0]=0;o[b+150|0]=0;o[b+151|0]=0;o[b+168|0]=0;o[b+169|0]=0;o[b+170|0]=0;o[b+171|0]=0;o[b+172|0]=0;o[b+173|0]=0;o[b+174|0]=0;o[b+175|0]=0;o[b+160|0]=0;o[b+161|0]=0;o[b+162|0]=0;o[b+163|0]=0;o[b+164|0]=0;o[b+165|0]=0;o[b+166|0]=0;o[b+167|0]=0;o[b+152|0]=0;o[b+153|0]=0;o[b+154|0]=0;o[b+155|0]=0;o[b+156|0]=0;o[b+157|0]=0;o[b+158|0]=0;o[b+159|0]=0;p[b+252>>1]=s[a+92>>1];q[b+68>>2]=0;q[b+72>>2]=0;q[b+64>>2]=1065353216;q[b+76>>2]=0;q[b+80>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+84>>2]=1065353216;q[b+96>>2]=0;q[b+100>>2]=0;q[b+108>>2]=0;q[b+112>>2]=0;q[b+104>>2]=1065353216;q[b+116>>2]=0;q[b+120>>2]=0;q[b+124>>2]=1065353216;q[b+176>>2]=0;q[b+180>>2]=0;o[b+254|0]=r[b+254|0]&252|1;if(!uL(c,b)){Pi(4,50700,50860,0);Dt(c,f);return-1e3}q[d+132>>2]=0;b=VK(q[c+96>>2],d,q[e+8>>2],Oi(q[q[e>>2]+4>>2]),Li);if(b){Dt(c,f);return b|0}WK(d,e);o[d+254|0]=r[d+254|0]|8;q[q[a+88>>2]>>2]=f;return 0}}J(51709,51308,479,51547);G()}function kqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-160|0;Ii=b;g=nj(b+136|0,a,0,15159,1326);gj(a);d=_i(a,-1,q[71661],18049);Ri(a,-2);e=q[d+4>>2];q[b+128>>2]=0;q[b+132>>2]=0;q[b+120>>2]=0;q[b+124>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;qm(a,b+104|0);Gk(a,1,b+72|0,b+104|0);d=q[q[e+80>>2]+8>>2];a:{if(!d){break a}d=q[d>>2];if(!d){break a}c=q[d+3216>>2];f=q[d+3220>>2]}b:{if((c|0)!=q[b+72>>2]|(f|0)!=q[b+76>>2]){a=Kj(g,15750,0);break b}c=q[q[e+80>>2]+8>>2];d=jn(c,q[b+88>>2],q[b+92>>2]);if(!d){q[b>>2]=aj(q[b+88>>2],q[b+92>>2]);a=Kj(g,14935,b);break b}c:{if(q[a+8>>2]-q[a+12>>2]>>4<2){break c}if(!Vi(a,2)){break c}Gk(a,2,b+72|0,b+104|0);h=jn(c,q[b+88>>2],q[b+92>>2]);if(!h){q[b+16>>2]=aj(q[b+88>>2],q[b+92>>2]);a=Kj(g,14935,b+16|0);break b}c=0;f=0;e=q[q[e+80>>2]+8>>2];d:{if(!e){break d}e=q[e>>2];if(!e){break d}c=q[e+3216>>2];f=q[e+3220>>2]}if((c|0)==q[b+72>>2]&(f|0)==q[b+76>>2]){break c}a=Kj(g,15750,0);break b}q[b+64>>2]=Uj(a,3);a=b;c=b;if(h){f=q[h+100>>2];e=q[h+96>>2]}else{f=0;e=0}q[c+56>>2]=e;q[a+60>>2]=f;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;c=0;f=0;a=q[q[d+80>>2]+8>>2];e:{if(!a){break e}a=q[a>>2];if(!a){break e}c=q[a+3216>>2];f=q[a+3220>>2]}q[b+24>>2]=c;q[b+28>>2]=f;a=q[d+96>>2];c=q[d+100>>2];q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=a;q[b+44>>2]=c;c=q[57288];a=0;if(!vk(0,b+24|0,q[c+8>>2],q[c+12>>2],d,c,b+56|0,16)){break b}a=Kj(g,15818,0)}mj(g);Ii=b+160|0;return a|0}function Dka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=Ii-80|0;Ii=f;b=q[a+4>>2];a:{b:{c:{d:{e:{f:{switch(q[a+8>>2]){case 0:q[b+52>>2]=q[b+44>>2];q[b+24>>2]=q[b+20>>2];break e;case 2:a=q[b+44>>2];c=q[b+52>>2];Mi[q[74945]](q[b+40>>2],0,0,2);c=c-a|0;Mi[q[74945]](q[b+40>>2],c,q[b+44>>2],2);b=(c|0)/20|0;d=(b>>>0)/6|0;q[73590]=d+q[73590];a=f;q[a+64>>2]=d;q[a+68>>2]=0;q[a+24>>2]=d;q[a+28>>2]=0;q[73612]=b+q[73612];q[a+56>>2]=b;q[a+60>>2]=0;q[a+16>>2]=b;q[a+20>>2]=0;q[73634]=c+q[73634];q[a+48>>2]=c;q[a+52>>2]=0;q[a+8>>2]=c;q[a+12>>2]=0;break e;case 1:break f;default:break e}}k=q[a+20>>2];l=q[a>>2];c=q[a+12>>2];h=q[a+16>>2];q[f+72>>2]=0;d=s[(c+w(q[h>>2],48)|0)+16>>1];a=q[b+4>>2];if(d>>>0>=q[b+8>>2]-a>>2>>>0){break d}d=q[a+(d<<2)>>2];if(!(o[d+166|0]&1)){break c}i=q[d+156>>2];g=q[d+152>>2];if(!g){g=q[i>>2]}a=q[b+24>>2];e=q[b+20>>2];j=((a-e|0)/304|0)+1|0;if(j>>>0>(q[b+28>>2]-e|0)/304>>>0){break b}q[b+24>>2]=e+w(j,304);e=q[b+52>>2];q[b+52>>2]=mma(b,e,g,c,h,k);fn(a);q[a+148>>2]=q[b+36>>2];c=q[b+40>>2];q[a+224>>2]=1;q[a+144>>2]=c;q[a+280>>2]=(e-q[b+44>>2]|0)/20;q[a+284>>2]=(q[b+52>>2]-e|0)/20;b=a;c=q[d+148>>2];if(!c){c=q[q[d+156>>2]+24>>2]}q[b+156>>2]=q[c>>2];c=q[g+48>>2];b=q[c+4>>2];q[a+160>>2]=q[c>>2];q[a+164>>2]=b;c=q[d+144>>2];if(c){Gr(a,c)}c=q[q[i+4>>2]+16>>2];if(c>>>0>=5){break a}o[a+288|0]=r[a+288|0]|1;c=c<<2;q[a+236>>2]=q[c+56092>>2];q[a+232>>2]=q[c+56072>>2];po(l,a)}Ii=f+80|0;return}J(55728,55585,479,55717);G()}J(55759,54775,637,55776);G()}J(55653,55585,506,55672);G()}q[f+32>>2]=c;Pi(4,55056,55788,f+32|0);J(55812,54775,688,55776);G()} - - - -function rua(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=b+2|0;a:{b:{c:{d:{e:{g=b+3&-2;if(g>>>0<=8192){e=q[a+96>>2];if(e){break e}b=0;break d}e=Yi(i);p[e>>1]=8;break a}c=q[a+4>>2];if(c>>>0>=g>>>0){d=a+4|0;break b}f=8;b=1;c=q[a+8>>2];d=c+g|0;if(d>>>0>16384){break d}f=a+8|0;break c}e=q[a+100>>2];if(e){h=1;d=a+16|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}b=f;f=a+20|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}}e=q[a+104>>2];f:{if(e){h=2;d=a+28|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+32|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}break f}b=(b|0)==8?2:b}e=q[a+108>>2];g:{if(e){h=3;d=a+40|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+44|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}break g}b=(b|0)==8?3:b}e=q[a+112>>2];h:{if(e){h=4;d=a+52|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+56|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}break h}b=(b|0)==8?4:b}e=q[a+116>>2];i:{if(e){h=5;d=a- -64|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+68|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}break i}b=(b|0)==8?5:b}e=q[a+120>>2];j:{if(e){h=6;d=a+76|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+80|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}break j}b=(b|0)==8?6:b}k:{e=q[a+124>>2];l:{if(e){h=7;d=a+88|0;c=q[d>>2];if(c>>>0>=g>>>0){break b}f=a+92|0;c=q[f>>2];d=c+g|0;if(d>>>0<16385){break c}if((b|0)==8){break k}break l}b=(b|0)==8?7:b}e=$i(16384);f=w(b,12)+a|0;q[f+8>>2]=g;q[f>>2]=1;q[f+4>>2]=0;p[e>>1]=b;q[((b<<2)+a|0)+96>>2]=e;break a}e=Yi(i);p[e>>1]=8;break a}a=w(h,12)+a|0;q[a>>2]=q[a>>2]+1;q[f>>2]=d;e=e+c|0;p[e>>1]=h;break a}b=c-g|0;q[d>>2]=b;a=w(h,12)+a|0;q[a>>2]=q[a>>2]+1;e=b+e|0;p[e>>1]=h}return e+2|0}function cq(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);f=c<<8&16711680|c<<24|(c>>>8&65280|c>>>24);d=r[b|0];c=r[b+3|0]|(r[b+1|0]<<16|d<<24|r[b+2|0]<<8);e=(f>>>4^c)&252645135;b=(e<<4^f)&-269488145|c&269488144;b=(q[(b>>>7&60)+161104>>2]<<2|q[(b<<1&60)+161104>>2]<<3|q[(b>>>15&60)+161104>>2]<<1|q[(b>>>23&60)+161104>>2]|q[(b>>>2&60)+161104>>2]<<7|q[(b>>>10&60)+161104>>2]<<6|q[(b>>>18&60)+161104>>2]<<5|q[(b>>>26&60)+161104>>2]<<4)&268435455;c=c^e;e=(q[(c>>>6&60)+161040>>2]<<2|q[((c&15)<<2)+161040>>2]<<3|q[(c>>>14&60)+161040>>2]<<1|q[(c>>>22&60)+161040>>2]|q[(c>>>3&60)+161040>>2]<<7|q[(c>>>11&60)+161040>>2]<<6|q[(c>>>19&60)+161040>>2]<<5|q[(d>>>3&28)+161040>>2]<<4)&268435455;while(1){c=a;f=b;a:{if(!(!(1<>>0>15)){g=27;i=1;h=268435454;break a}g=26;i=2;h=268435452}d=e<>>g|0;e=j|l;n=e<<10;m=c;c=f<>>g|0;b=f|h;f=f>>>14|0;g=b>>>3|0;q[m>>2]=c&256|(d>>>10&65536|(j<<2&131072|(n&262144|(d>>>1&1048576|(d<<9&2097152|(d<<6&16777216|(e<<18&34078720|(d<<14&134217728|(j<<4&603979776|l<<28&268435456)))))))))|c>>>13&8192|c>>>4&4096|b<<6&2048|c>>>1&1024|f&512|c>>>5&32|c>>>10&16|g&8|c>>>18&4|c>>>26&2|c>>>24&1;m=c>>>21&2;i=c>>>7&32;l=c>>>9&1024;o=c>>>2&8192;p=c&512;c=e<<15;q[a+4>>2]=m|(h<<2&4|(g&17|(i|(b<<7&256|(l|(f&2056|(b<<8&4096|(o|(p|(d>>>4&65536|(d>>>6&262144|(j<<3&524288|(d<<11&1048576|(e<<16&2097152|(j<<1&16777216|(d>>>2&33554432|(e<<22&67108864|(n&134217728|(c&536870912|d<<17&268435456))))))))|c&131072)))))))))));a=a+8|0;k=k+1|0;if((k|0)!=16){continue}break}}function Jla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=x(0),j=0,k=0;b=Ii-352|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);d=Li;q[b+92>>2]=0;j=kj(a,2,b+92|0);k=Cp(a,q[74445],c,d,79370);a:{if((e|0)<3){g=x(1e5);h=x(1);c=0;break a}Dj(a,3,5);Xi(a,77433);ik(a,3);g=x(1e5);b:{if(!Vi(a,-1)){break b}if(!Oj(a,-1)){e=b;d=Vi(a,-1);c=140583;c:{if((d|0)==-1){break c}c=q[(d<<2)+256832>>2]}q[e+88>>2]=c;q[b+84>>2]=75760;q[b+80>>2]=77433;sj(b+96|0,256,75775,b+80|0);q[b+64>>2]=b+96;g=x(Qi(a,75832,b- -64|0)|0);break b}g=x(Mj(a,-1))}Ri(a,-2);Xi(a,79376);ik(a,3);h=x(1);d:{if(!Vi(a,-1)){break d}if(!Oj(a,-1)){e=b;d=Vi(a,-1);c=140583;e:{if((d|0)==-1){break e}c=q[(d<<2)+256832>>2]}q[e+56>>2]=c;q[b+52>>2]=75760;q[b+48>>2]=79376;sj(b+96|0,256,75775,b+48|0);q[b+32>>2]=b+96;h=x(Qi(a,75832,b+32|0)|0);break d}h=x(Mj(a,-1))}Ri(a,-2);Xi(a,79384);ik(a,3);i=x(0);f:{if(!Vi(a,-1)){break f}if(!Oj(a,-1)){e=b;d=Vi(a,-1);c=140583;g:{if((d|0)==-1){break g}c=q[(d<<2)+256832>>2]}q[e+24>>2]=c;q[b+20>>2]=75760;q[b+16>>2]=79384;sj(b+96|0,256,75775,b+16|0);q[b>>2]=b+96;i=x(Qi(a,75832,b)|0);break f}i=x(Mj(a,-1))}Ri(a,-2);Xi(a,79393);ik(a,3);c=Rt(a,79393,0);Ri(a,-2)}_z(k,j,g,c,h,i,b+96|0);vj(a,0,4);bj(a,77433,5);f=+u[b+96>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,77439,6);f=+u[b+100>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,79404,10);f=+u[b+104>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,79415,11);f=+u[b+108>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);Ii=b+352|0;return 1}function _ka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),r=x(0);c=Ii-128|0;Ii=c;g=nj(c+104|0,a,1,73366,406);q[c+96>>2]=0;q[c+100>>2]=0;q[c+88>>2]=0;q[c+92>>2]=0;q[c+80>>2]=0;q[c+84>>2]=0;q[c+72>>2]=0;q[c+76>>2]=0;a:{b:{if(!qm(a,c+72|0)){a=Qi(a,73597,0);break b}et(a,q[74444]);e=qj(a,-1);Ri(a,-2);b=q[q[q[jk(a)+80>>2]+8>>2]>>2];e=q[e+8>>2];if(t[q[b+4>>2]>>2]>e>>>0){e=q[(b+(e<<2)|0)+12>>2]}else{e=0}if(!e){a=Kj(g,73654,0);break b}b=Bl(a,1);j=u[b+8>>2];k=u[b+4>>2];l=u[b>>2];b=Bl(a,2);m=u[b+8>>2];n=u[b+4>>2];r=u[b>>2];Dj(a,3,5);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=0;if(Hj(a,3)){while(1){d=yL(e,nl(a,-1),Li);Ri(a,-2);b=b|d;if(Hj(a,3)){continue}break}}h=Vi(a,4);if((h|0)==5){ej(a,4);Zi(a,-1,73748);f=0;c:{if(!Vi(a,-1)){break c}f=(Uj(a,-1)|0)!=0}Ri(a,-2);Ri(a,-2)}d=c- -64|0;q[d>>2]=0;q[d+4>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;Wi(32,64,c+56|0,d,c+56|4);d=VH(c);p[d+40>>1]=b;u[d+16>>2]=r;u[d+8>>2]=j;u[d+4>>2]=k;u[d>>2]=l;u[d+24>>2]=m;u[d+20>>2]=n;p[d+42>>1]=s[d+42>>1]&65534|f;d:{if(o[e+141|0]&1){break d}}d=q[c+56>>2];i=q[c+60>>2];e:{if((d|0)==(i|0)){e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;break e}b=0;vj(a,0,0);f=f?i-d>>6:1;if(!f){break e}if((h|0)==5){while(1){vj(a,0,0);d=q[c+56>>2];if(q[c+60>>2]-d>>6>>>0<=b>>>0){break a}iL(a,e,d+(b<<6)|0);b=b+1|0;nk(a,-2,b);if((b|0)!=(f|0)){continue}break e}}while(1){d=q[c+56>>2];if(q[c+60>>2]-d>>6>>>0<=b>>>0){break a}iL(a,e,d+(b<<6)|0);b=b+1|0;if((f|0)!=(b|0)){continue}break}}a=1;if(o[c+68|0]&1){break b}e=q[c+56>>2];if(!e){break b}Ni(e)}mj(g);Ii=c+128|0;return a|0}J(75730,75674,479,75741);G()}function Npa(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0);c=Ii-176|0;Ii=c;a:{b:{d=q[a+80>>2];c:{if(q[d+4>>2]==q[d+8>>2]){Fha();a=-1e3;break c}e=q[a+76>>2];q[c>>2]=q[a>>2];q[c+4>>2]=d;b=q[e>>2];u[c+8>>2]=u[b>>2];u[c+12>>2]=u[b+4>>2];u[c+16>>2]=u[b+8>>2];u[c+20>>2]=u[b+12>>2];b=q[b+16>>2]!=0;o[c+160|0]=b;b=b|(q[q[e>>2]+20>>2]!=0)<<2;o[c+160|0]=b;f=u[q[e>>2]+24>>2];o[c+160|0]=b;u[c+24>>2]=f;p[c+162>>1]=s[a+92>>1];qB(c,q[a+84>>2]);b=q[d+4>>2];if((b|0)==q[d+8>>2]){break b}q[d+4>>2]=b+176;e=q[c+20>>2];q[b+16>>2]=q[c+16>>2];q[b+20>>2]=e;e=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=e;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;q[b+24>>2]=q[c+24>>2];u[b+32>>2]=u[c+32>>2];u[b+36>>2]=u[c+36>>2];u[b+40>>2]=u[c+40>>2];u[b+44>>2]=u[c+44>>2];u[b+48>>2]=u[c+48>>2];u[b+52>>2]=u[c+52>>2];u[b+56>>2]=u[c+56>>2];u[b+60>>2]=u[c+60>>2];u[b- -64>>2]=u[c- -64>>2];u[b+68>>2]=u[c+68>>2];u[b+72>>2]=u[c+72>>2];u[b+76>>2]=u[c+76>>2];u[b+80>>2]=u[c+80>>2];u[b+84>>2]=u[c+84>>2];u[b+88>>2]=u[c+88>>2];u[b+92>>2]=u[c+92>>2];u[b+96>>2]=u[c+96>>2];u[b+100>>2]=u[c+100>>2];u[b+104>>2]=u[c+104>>2];u[b+108>>2]=u[c+108>>2];u[b+112>>2]=u[c+112>>2];u[b+116>>2]=u[c+116>>2];u[b+120>>2]=u[c+120>>2];u[b+124>>2]=u[c+124>>2];u[b+128>>2]=u[c+128>>2];u[b+132>>2]=u[c+132>>2];u[b+136>>2]=u[c+136>>2];u[b+140>>2]=u[c+140>>2];u[b+144>>2]=u[c+144>>2];u[b+148>>2]=u[c+148>>2];u[b+152>>2]=u[c+152>>2];u[b+156>>2]=u[c+156>>2];q[b+160>>2]=q[c+160>>2];b=q[d>>2];d=q[d+4>>2]-b|0;if(!d){break a}q[q[a+88>>2]>>2]=(b+w((d|0)/176|0,176)|0)-176;a=0}Ii=c+176|0;return a|0}J(48998,48930,533,49022);G()}J(49027,48930,479,49038);G()}function Sma(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=0,i=0,j=0,k=x(0),l=x(0),m=0;e=Ii-48|0;Ii=e;b=q[a+1040>>2];d=q[b+28>>2];c=q[d+16>>2];b=q[b+32>>2];if(b>>>0>2]-c>>3>>>0){h=q[c+(b<<3)>>2];i=q[d>>2];if(h>>>0<(q[d+4>>2]-i|0)/240>>>0){c=q[a+1052>>2];m=c;d=q[a+1048>>2];b=d+1|0;c=b>>>0<1?c+1|0:c;q[a+1048>>2]=b;q[a+1052>>2]=c;b=!m&d>>>0>3|(m|0)!=0;a:{if(!b){c=3;b:{if(b){break b}c:{d:{switch(d-1|0){default:b=i+w(h,240)|0;f=u[b+16>>2];g=u[b+20>>2];k=u[b+24>>2];break c;case 0:c=i+w(h,240)|0;f=u[c+32>>2];l=u[c+44>>2];k=u[c+40>>2];g=u[c+36>>2];c=4;break b;case 1:b=i+w(h,240)|0;f=u[b+48>>2];g=u[b+52>>2];k=u[b+56>>2];break c;case 2:break d}}b=i+w(h,240)|0;f=u[b+64>>2];g=u[b+68>>2];k=u[b+72>>2]}}d=Oi(q[(d<<2)+232016>>2]);u[a+28>>2]=l;u[a+24>>2]=k;u[a+20>>2]=g;u[a+16>>2]=f;q[a+8>>2]=c;q[a>>2]=d;q[a+4>>2]=Li;j=1;break a}c=d;b=m-(c>>>0<4)|0;c=c-4|0;if(!b&c>>>0<=3){op(e,(i+w(h,240)|0)+80|0);j=0;if(!b&c>>>0>3|b){break a}b=a;e:{f:{switch(c-1|0){default:g=u[e+20>>2];l=u[e+16>>2];f=u[e+24>>2];d=3;break e;case 0:k=u[e+12>>2];g=u[e+4>>2];l=u[e>>2];f=u[e+8>>2];d=4;break e;case 1:d=i+w(h,240)|0;l=x(u[e+32>>2]/x(u[d+64>>2]*u[d+48>>2]));g=x(u[e+36>>2]/x(u[d+68>>2]*u[d+52>>2]));f=u[e+40>>2];d=3;break e;case 2:break f}}g=u[e+36>>2];l=u[e+32>>2];f=u[e+40>>2];d=3}q[b+8>>2]=d;d=Oi(q[(c<<2)+232032>>2]);u[a+28>>2]=k;u[a+24>>2]=f;u[a+20>>2]=g;u[a+16>>2]=l;q[a>>2]=d;q[a+4>>2]=Li;j=1;break a}j=0;if((d|0)!=8|m){break a}q[a+8>>2]=6;o[a+16|0]=r[(i+w(h,240)|0)+234|0]>>>2&1;q[a>>2]=Oi(54137);q[a+4>>2]=Li;j=1}c=j;Ii=e+48|0;return c|0}}J(53716,53631,479,53341);G()}function Bna(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;d=Ii-112|0;Ii=d;q[d+72>>2]=0;q[d+76>>2]=0;e=d- -64|0;q[e>>2]=0;q[e+4>>2]=0;q[d+56>>2]=0;q[d+60>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;e=q[c+172>>2];q[d+40>>2]=q[c+168>>2];q[d+44>>2]=e;e=q[c+164>>2];q[d+32>>2]=q[c+160>>2];q[d+36>>2]=e;e=q[c+156>>2];q[d+24>>2]=q[c+152>>2];q[d+28>>2]=e;e=q[c+148>>2];q[d+16>>2]=q[c+144>>2];q[d+20>>2]=e;a:{if(!a){q[d+104>>2]=0;q[d+108>>2]=0;q[d+96>>2]=0;q[d+100>>2]=0;q[d+88>>2]=0;q[d+92>>2]=0;a=q[q[q[c>>2]+80>>2]+8>>2];b:{if(!a){break b}a=q[a>>2];if(!a){break b}f=q[a+3216>>2];g=q[a+3220>>2]}q[d+80>>2]=f;q[d+84>>2]=g;c:{if(Po(f,g)){if(!to(q[c>>2],s[c+252>>1],d+104|0)){break c}}Pi(4,50700,51720,0);break a}f=q[c>>2];g=q[f+100>>2];a=d- -64|0;q[a>>2]=q[f+96>>2];q[a+4>>2]=g;a=q[d+92>>2];q[d+56>>2]=q[d+88>>2];q[d+60>>2]=a;a=q[d+108>>2];q[d+72>>2]=q[d+104>>2];q[d+76>>2]=a;a=q[d+84>>2];q[d+48>>2]=q[d+80>>2];q[d+52>>2]=a;a=q[60020];g=q[a+8>>2];f=q[a+12>>2];e=q[b+4>>2];q[d+80>>2]=q[b>>2];q[d+84>>2]=e;q[d+88>>2]=q[b+8>>2];a=Oo(d+48|0,d+16|0,g,f,0,q[c+176>>2],a,d+80|0,16,0);o[c+144|0]=0;o[c+145|0]=0;o[c+146|0]=0;o[c+147|0]=0;o[c+148|0]=0;o[c+149|0]=0;o[c+150|0]=0;o[c+151|0]=0;o[c+168|0]=0;o[c+169|0]=0;o[c+170|0]=0;o[c+171|0]=0;o[c+172|0]=0;o[c+173|0]=0;o[c+174|0]=0;o[c+175|0]=0;o[c+160|0]=0;o[c+161|0]=0;o[c+162|0]=0;o[c+163|0]=0;o[c+164|0]=0;o[c+165|0]=0;o[c+166|0]=0;o[c+167|0]=0;o[c+152|0]=0;o[c+153|0]=0;o[c+154|0]=0;o[c+155|0]=0;o[c+156|0]=0;o[c+157|0]=0;o[c+158|0]=0;o[c+159|0]=0;if(!a){break a}Pi(4,50700,51795,0);break a}q[d>>2]=a;Pi(4,50700,51838,d)}Ii=d+112|0}function Bqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-304|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);c=q[c+4>>2];q[b+296>>2]=0;q[b+300>>2]=0;q[b+288>>2]=0;q[b+292>>2]=0;q[b+280>>2]=0;q[b+284>>2]=0;q[b+272>>2]=0;q[b+276>>2]=0;qm(a,b+272|0);q[b+264>>2]=0;q[b+268>>2]=0;q[b+256>>2]=0;q[b+260>>2]=0;q[b+248>>2]=0;q[b+252>>2]=0;q[b+240>>2]=0;q[b+244>>2]=0;Gk(a,1,b+240|0,b+272|0);c=q[q[c+80>>2]+8>>2];a:{if(!c){break a}f=q[c>>2];if(!f){break a}h=q[f+3216>>2];i=q[f+3220>>2]}if((h|0)!=q[b+240>>2]|(i|0)!=q[b+244>>2]){Qi(a,15889,0)}b:{if((e|0)<2){break b}if(!Vi(a,2)){break b}if(uk(a,2)){d=Oi(uj(a,2,0));g=Li;break b}d=nl(a,2);g=Li}f=jn(c,q[b+256>>2],q[b+260>>2]);c:{if(!f){q[b>>2]=aj(q[b+256>>2],q[b+260>>2]);d=Qi(a,14935,b);break c}d:{e:{f:{g:{h:{c=isa(c,f,q[b+264>>2],q[b+268>>2],d,g);switch(c+5|0){case 0:break g;case 1:case 2:break h;case 4:break d;case 5:break e;default:break f}}c=Hp(b+112|0);q[b+108>>2]=q[b+236>>2];e=q[b+232>>2];q[b+100>>2]=q[b+228>>2];q[b+104>>2]=e;e=q[b+108>>2];q[b+72>>2]=q[b+104>>2];q[b+76>>2]=e;q[b+96>>2]=0;e=q[b+100>>2];q[b+64>>2]=q[b+96>>2];q[b+68>>2]=e;uq(f,q[b+264>>2],q[b+268>>2],d,g,b- -64|0,c);q[b+48>>2]=aj(d,g);d=Qi(a,16418,b+48|0);break c}d=aj(q[b+264>>2],q[b+268>>2]);q[b+84>>2]=uj(a,1,0);q[b+80>>2]=d;d=Qi(a,16241,b+80|0);break c}q[b+16>>2]=c;d=Qi(a,16464,b+16|0);break c}d=0;if(q[a+8>>2]-q[a+12>>2]>>4==(e|0)){break c}J(16382,15159,1947,16511);G()}bj(a,16151,0);km(a,b+240|0);fm(a,2);c=uj(a,-1,0);Ri(a,-2);q[b+36>>2]=aj(d,g);q[b+32>>2]=c;d=Qi(a,16152,b+32|0)}Ii=b+304|0;return d|0}function bza(){var a=0;q[73514]=Oi(54376);q[73515]=Li;q[73516]=Oi(54395);q[73517]=Li;q[73518]=Oi(54412);q[73519]=Li;q[73520]=Oi(54421);q[73521]=Li;q[73522]=Oi(54427);q[73523]=Li;q[73524]=Oi(54437);q[73525]=Li;q[73526]=Oi(54445);q[73527]=Li;q[73528]=Oi(54452);q[73529]=Li;q[73530]=Oi(54461);q[73531]=Li;q[73532]=Oi(54473);q[73533]=Li;q[73534]=Oi(54482);q[73535]=Li;q[73536]=Oi(54487);q[73537]=Li;q[73538]=Oi(54493);q[73539]=Li;q[73540]=Oi(54499);q[73541]=Li;q[73542]=Oi(54508);q[73543]=Li;q[73544]=Oi(54518);q[73545]=Li;q[73546]=Oi(54527);q[73547]=Li;q[73548]=Oi(54536);q[73549]=Li;q[73550]=Oi(54545);q[73551]=Li;q[73552]=Oi(54554);q[73553]=Li;q[73554]=Oi(54563);q[73555]=Li;q[73556]=Oi(54572);q[73557]=Li;q[73558]=Oi(54581);q[73559]=Li;q[73560]=Oi(54590);q[73561]=Li;a=Oi(54599);q[73581]=0;q[73582]=0;q[73580]=295392;q[73578]=0;q[73576]=54624;q[73575]=54611;q[73574]=0;q[73572]=0;q[73570]=0;q[73568]=0;q[73566]=1;q[73564]=0;q[73565]=3;q[73562]=a;q[73563]=Li;q[73583]=0;q[73584]=0;q[73585]=0;q[73602]=294256;q[73600]=0;q[73598]=54659;q[73597]=54637;q[73596]=0;q[73594]=0;q[73592]=0;q[73590]=0;q[73588]=1;q[73586]=0;q[73587]=3;q[73607]=0;q[73605]=0;q[73606]=0;q[73603]=0;q[73604]=0;q[73624]=294256;q[73622]=0;q[73620]=54659;q[73619]=54670;q[73618]=0;q[73616]=0;q[73614]=0;q[73612]=0;q[73610]=1;q[73608]=0;q[73609]=3;q[73629]=0;q[73627]=0;q[73628]=0;q[73625]=0;q[73626]=0;q[73646]=294256;q[73644]=0;q[73642]=54717;q[73641]=54694;q[73640]=0;q[73638]=0;q[73636]=0;q[73634]=0;q[73632]=1;q[73630]=0;q[73631]=3;q[73651]=0;q[73649]=0;q[73650]=0;q[73647]=0;q[73648]=0}function Qq(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=q[a+68>>2];if(r[b+492|0]!=1){c=q[b+496>>2];q[b+500>>2]=c;q[b+504>>2]=q[c>>2]+12;Jx(a);b=q[a+68>>2];o[b+492|0]=1}d=q[b+500>>2];a:{if(d){while(1){b:{if(r[d+8|0]!=22){h=r[a+180|0];e=0;break b}h=r[a+180|0];e=0;c=q[d>>2];if(r[c|0]!=20){break b}e=1;if(q[b+504>>2]!=(c+12|0)){break b}Jx(a)}b=uD(a);if((b|0)<0){break a}c:{d:{e:{f:{g:{if(r[d+8|0]==20){if(b){break g}break d}if(b>>>0>=12){f=q[d>>2];g=q[q[a+68>>2]+504>>2];i=q[d+4>>2]-12|0;if(!i|(b|0)!=12){break f}}if(!e){break d}Jx(a);break d}Ti(q[a+204>>2],q[d>>2],q[d+4>>2]);e=q[d+4>>2];q[a+212>>2]=e;q[a+208>>2]=r[d+8|0];b=q[a+68>>2];c=q[b+504>>2]+e|0;q[b+504>>2]=c;break e}e=q[a+204>>2];c=r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24);o[e|0]=c;o[e+1|0]=c>>>8;o[e+2|0]=c>>>16;o[e+3|0]=c>>>24;c=r[f+4|0]|r[f+5|0]<<8;o[e+4|0]=c;o[e+5|0]=c>>>8;c=(g-f|0)-12|0;o[q[a+204>>2]+6|0]=c>>>16;o[q[a+204>>2]+7|0]=c>>>8;o[q[a+204>>2]+8|0]=c;b=b-12|0;c=i-c|0;c=c>>>0>b>>>0?b:c;o[q[a+204>>2]+9|0]=c>>>16;o[q[a+204>>2]+10|0]=c>>>8;o[q[a+204>>2]+11|0]=c;Ti(q[a+204>>2]+12|0,g,c);q[a+212>>2]=c+12;q[a+208>>2]=r[d+8|0];b=q[a+68>>2];c=c+q[b+504>>2]|0;q[b+504>>2]=c;e=q[d+4>>2]}if(q[d>>2]+e>>>0<=c>>>0){c=b;g=q[d+12>>2];h:{if(g){q[b+500>>2]=g;b=q[g>>2]+12|0;break h}q[b+500>>2]=0;b=0}q[c+504>>2]=b}b=zu(a,(h|0)==1);if(b){break a}break c}b=Xp(a);if(b){break a}}b=q[a+68>>2];d=q[b+500>>2];if(d){continue}break}}b=Xp(a);if(b){break a}c=q[a+68>>2];i:{if(q[a+4>>2]==16){o[c+492|0]=3;break i}o[c+492|0]=2;b=q[c+488>>2];c=q[a+92>>2];if(c){Mi[c|0](q[a+88>>2],b>>>2|0,b)}}b=0}return b}function FF(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;i=Ii-16|0;Ii=i;a:{b:{c:{d:{if((a|0)!=10){if((a|0)!=2){break c}while(1){e=0;a=0;e:{f:{while(1){d=a+b|0;if(o[d|0]-48>>>0<10){e=(o[d|0]+w(e,10)|0)-48|0;g=3;a=a+1|0;if((a|0)!=3){continue}break f}break}g=a;g:{switch(a|0){case 0:break a;case 1:break g;default:break f}}g=1;if((e|0)<=255){break e}break b}a=0;if(r[b|0]==48|(e|0)>255){break a}}o[c+f|0]=e;b=b+g|0;d=r[b|0];if(d?0:(f|0)==3){break d}a=0;if((d|0)!=46){break a}b=b+1|0;f=f+1|0;if((f|0)!=4){continue}break}break a}f=r[b|0];if((f|0)==58){a=0;if(r[b+1|0]!=58){break a}b=b+1|0}h=-1;while(1){h:{i:{if(!((f&255)==58?(h|0)<=-1:0)){a=0;e=0;g=0;f=KF(f<<24>>24);j:{if((f|0)>-1){while(1){g=(g<<4)+f|0;e=e+1|0;if((e|0)==4){e=4;break j}f=KF(o[b+e|0]);if((f|0)>-1){continue}break}}if(!e){break a}}p[((d&7)<<1|i)>>1]=g;e=b+e|0;g=r[e|0];if(!g){g=1;if((d|0)==7|(h|0)>-1){break i}break a}if((d|0)==7){break a}if((g|0)!=58){if((g|0)!=46|((h|0)<0?d>>>0<=5:0)){break a}d=d+1|0;g=0;break i}a=e+1|0;f=r[a|0];break h}g=1;p[((d&7)<<1|i)>>1]=0;a=b+1|0;f=r[b+1|0];if(!f){b=a;h=d;break i}h=d;if((d|0)==7){break b}break h}a=0;k:{if((h|0)<0){break k}e=(h<<1)+i|0;bl((e-(d<<1)|0)+14|0,e,(d-h<<1)+2|0);if((d|0)>6){break k}d=7-d|0;d=(d|0)>1?d:1;e=0;while(1){p[(e+h<<1)+i>>1]=0;e=e+1|0;if((d|0)!=(e|0)){continue}break}}while(1){d=c;c=s[(a<<1)+i>>1];c=(c<<24|c<<8&16711680)>>>16|0;o[d|0]=c;o[d+1|0]=c>>>8;c=d+2|0;a=a+1|0;if((a|0)!=8){continue}break}if(g){break d}if((FF(2,b,d-2|0)|0)<1){break b}break d}d=d+1|0;b=a;continue}}a=1;break a}q[240513]=5;a=-1;break a}a=0}Ii=i+16|0;return a}function PG(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-144|0;Ii=e;a:{b:{h=q[a+8>>2]-q[a+12>>2]>>4;if((h|0)>-1){g=Ou(a,b);f=q[d+4>>2];c:{if(!f){break c}f=q[q[d>>2]+((g>>>0)%(f>>>0)<<2)>>2];if((f|0)==-1){break c}i=q[d+8>>2];while(1){f=w(f,12)+i|0;if(q[f>>2]==(g|0)){break b}f=q[f+8>>2];if((f|0)!=-1){continue}break}}f=(q[d+16>>2]-q[d+8>>2]|0)/12|0;if((f|0)==q[d+24>>2]){f=(f<<1)+20|0;GI(d,(f>>>0)/3|0,f)}o[e+143|0]=1;HI(d,g,e+143|0);ej(a,b);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;if(!Hj(a,-2)){q[e+32>>2]=g;un(c,123806,e+32|0);Ri(a,-2);break a}q[e+112>>2]=g;un(c,123819,e+112|0);b=q[c+12>>2]+2|0;q[c+12>>2]=(b|0)>0?b:0;f=122493;while(1){q[e+96>>2]=f;un(c,123830,e+96|0);b=Vi(a,-1);ej(a,-2);Zi(a,-10002,122919);xk(a,-2);Rk(a,1,1);f=uj(a,-1,0);if(!f){Ri(a,-2);Qi(a,122928,0);break a}q[e+80>>2]=f;un(c,123836,e+80|0);Ri(a,-2);d:{e:{switch(b-4|0){case 1:PG(a,-1,c,d);break d;case 0:q[e+64>>2]=uj(a,-1,0);un(c,123842,e- -64|0);break d;default:break e}}ej(a,-1);Zi(a,-10002,122919);xk(a,-2);Rk(a,1,1);b=uj(a,-1,0);if(!b){Ri(a,-2);Qi(a,122928,0);break a}q[e+48>>2]=b;un(c,122973,e+48|0);Ri(a,-2)}Ri(a,-2);f=123834;if(Hj(a,-2)){continue}break}b=q[c+12>>2]-2|0;q[c+12>>2]=(b|0)>0?b:0;un(c,123004,0);un(c,123847,0);qaa(d,g);Ri(a,-2);break a}q[e+12>>2]=h;q[e+4>>2]=420;q[e+8>>2]=0;q[e>>2]=122672;Pi(4,122749,123291,e);J(123363,122672,1469,123380);G()}q[e+128>>2]=g;un(c,123789,e+128|0)}a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)==(h|0)){Ii=e+144|0;return}q[e+28>>2]=a;q[e+24>>2]=h;q[e+20>>2]=420;q[e+16>>2]=122672;Pi(4,122749,123394,e+16|0);J(123465,122672,1492,123484);G()}function Yea(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;a:{b:{c:{d:{e:{f:{if(b>>>0<2097152){e=q[75054];d=a;g:{if(d+1>>>0<2){break g}h=d&65535;if(h>>>0>=t[e+32>>2]){break f}i=q[q[e+24>>2]+(h<<2)>>2];if(!i){break g}f=s[q[e+28>>2]+(h<<1)>>1]==(d>>>16|0)?i:0}p[f+26>>1]=s[f+26>>1]|1<>2];Gj(h);d=s[150092];if((d|0)==s[150093]){if(d>>>0>=65472){break e}e=q[75045];f=d- -64|0;i=f&65535;j=Yi(i<<1);q[75045]=j;j=Ti(j,e,d<<1);p[150092]=f;while(1){p[j+(d<<1)>>1]=d;d=d+1|0;if((i|0)!=(d|0)){continue}break}Ni(e);if(o[300176]&1){break d}Wi(s[150092],56,300164,300172,300168);q[75042]=q[75043]}e=q[75045];if(!e){break c}d=s[150093];if(d>>>0>=s[150092]){break b}p[150093]=d+1;e=s[e+(d<<1)>>1];f=q[75041];if(e>>>0>=(q[75042]-f|0)/56>>>0){break a}d=f+w(e,56)|0;q[d>>2]=a;q[d+4>>2]=b;a=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=a;a=q[c+12>>2];q[d+16>>2]=q[c+8>>2];q[d+20>>2]=a;a=q[c+20>>2];q[d+24>>2]=q[c+16>>2];q[d+28>>2]=a;a=q[c+28>>2];q[d+32>>2]=q[c+24>>2];q[d+36>>2]=a;a=q[c+36>>2];q[d+40>>2]=q[c+32>>2];q[d+44>>2]=a;a=r[c+43|0]|r[c+44|0]<<8|(r[c+45|0]<<16|r[c+46|0]<<24);b=r[c+39|0]|r[c+40|0]<<8|(r[c+41|0]<<16|r[c+42|0]<<24);o[d+47|0]=b;o[d+48|0]=b>>>8;o[d+49|0]=b>>>16;o[d+50|0]=b>>>24;o[d+51|0]=a;o[d+52|0]=a>>>8;o[d+53|0]=a>>>16;o[d+54|0]=a>>>24;Bj(h);q[g+8>>2]=0;q[g+4>>2]=750;q[g>>2]=e;bB(g);Ii=g+16|0;return}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}J(94210,94233,112,90558);G()}J(90427,90502,493,90558);G()}J(94284,94233,151,94291);G()}J(94295,94233,152,94291);G()}J(91269,90502,479,91280);G()}function _$(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;Oza(+b);d=Lza(1)|0;h=Lza(0)|0;j=d;d=d<<1|h>>>31;f=d;a:{g=h<<1;b:{if(!(d|g)){break b}d=j&2147483647;if((d|0)==2146435072&(h|0)!=0|d>>>0>2146435072){break b}Oza(+a);d=Lza(1)|0;c=Lza(0)|0;l=d;i=d>>>20&2047;if((i|0)!=2047){break a}}a=a*b;return a/a}k=c<<1;d=l<<1|c>>>31;e=d;if((d|0)==(f|0)&g>>>0>>0|d>>>0>f>>>0){k=j>>>20&2047;c:{if(!i){i=0;e=l<<12|c>>>20;f=c<<12;d=e;if((d|0)>0?1:(d|0)>=0){while(1){i=i-1|0;e=d<<1|f>>>31;f=f<<1;d=e;if((d|0)>-1){continue}break}}d=l;f=1-i|0;g=f&31;if((f&63)>>>0>=32){e=c<>>32-g|d<>>20;c=e;if((c|0)>0?1:(c|0)>=0){while(1){k=k-1|0;e=c<<1|g>>>31;g=g<<1;c=e;if((c|0)>-1){continue}break}}c=h;e=1-k|0;h=e&31;if((e&63)>>>0>=32){e=c<>>32-h|j<(k|0)){while(1){c=e;h=d-((c>>>0>f>>>0)+g|0)|0;j=f-c|0;e:{c=h;if((c|0)<0){break e}f=j;d=c;if(f|c){break e}return a*0}d=d<<1|f>>>31;f=f<<1;i=i-1|0;if((k|0)<(i|0)){continue}break}i=k}c=f;j=d-((e>>>0>c>>>0)+g|0)|0;c=c-e|0;f:{e=j;if((e|0)<0){break f}f=c;d=e;if(c|d){break f}return a*0}g:{if(d>>>0>1048575){g=f;c=d;break g}while(1){i=i-1|0;e=d>>>0<524288;d=d<<1|f>>>31;g=f<<1;c=d;f=g;if(e){continue}break}}j=0;l=l&-2147483648;if((i|0)>=1){e=c+ -1048576|i<<20}else{f=g;d=1-i|0;h=d&31;if((d&63)>>>0>=32){e=0;g=c>>>h|0}else{e=c>>>h|0;g=((1<>>h}}Mza(0,g|j);Mza(1,e|l);return+Nza()}return(g|0)==(k|0)&(e|0)==(f|0)?a*0:a}function Vra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;f=Ii-128|0;Ii=f;a:{b:{c:{c=q[a+1048>>2];e=c>>>16|0;if(e>>>0<=7){m=q[q[a+1040>>2]+32>>2];b=q[q[m>>2]+44>>2];s=b- -64|0;t=b+60|0;w=b+72|0;x=b+68|0;y=b+80|0;z=b+76|0;A=b+88|0;B=b+84|0;d=b+96|0;i=b+92|0;k=b+104|0;l=b+100|0;g=b+112|0;h=b+108|0;j=c&65535;while(1){b=t;c=s;n=0;d:{e:{f:{switch(e|0){case 1:b=x;c=w;break e;case 2:b=z;c=y;break e;case 3:b=B;c=A;break e;case 4:b=i;c=d;break e;case 5:b=l;c=k;break e;case 0:break e;case 6:break f;default:break d}}b=h;c=g}n=q[c>>2];p=q[b>>2]}if(!C&j>>>0>>0){break c}j=0;e=e+1|0;if((e|0)!=8){continue}break}a=0;break b}a=0;if((e|0)==8){break b}break a}if(!p){break a}c=(j<<5)+p|0;g=q[c>>2];b=q[c+20>>2];d=Hp(f+16|0);i=YL(m,g,e,b,0,0,d);g:{if(i){break g}b=C;h=j+1|0;b=h>>>0<1?b+1|0:b;q[a+1048>>2]=h|e<<16;q[a+1052>>2]=b;q[a>>2]=Oi(g);q[a+4>>2]=Li;h:{switch(e|0){case 1:q[a+8>>2]=1;c=q[d+44>>2];q[a+16>>2]=q[d+40>>2];q[a+20>>2]=c;break g;case 0:q[a+8>>2]=0;v[a+16>>3]=v[d+40>>3];break g;case 6:q[a+8>>2]=6;o[a+16|0]=r[d+40|0];break g;case 3:case 4:case 5:q[a+8>>2]=e;u[a+16>>2]=u[d+40>>2];u[a+20>>2]=u[d+44>>2];u[a+24>>2]=u[d+48>>2];u[a+28>>2]=u[d+52>>2];break g;case 2:break h;default:break g}}q[a+8>>2]=2;k=aj(q[d+40>>2],q[d+44>>2]);l=aj(q[d+56>>2],q[d+60>>2]);b=d- -64|0;c=q[b+4>>2];d=q[b>>2];b=c;g=!(d|b);h=g?13097:13603;c=f;if(g){b=13097}else{b=aj(d,b)}q[c+12>>2]=b;q[f+8>>2]=h;q[f+4>>2]=l;q[f>>2]=k;sj(a+16|0,1024,13593,f)}a=!i}Ii=f+128|0;return a|0}J(13548,12749,1068,13561);G()}function m9(a,b,c,d,e,f,g){var h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),y=0,z=0,A=x(0),B=x(0);l=u[210829];k=u[d>>2];p=u[210830];h=u[d+12>>2];n=u[210828];j=u[d+4>>2];i=u[d+8>>2];o=u[210825];s=u[210826];t=u[210824];m=x(f*x(64));a:{if(m=x(0)){d=~~m>>>0;break a}d=0}y=q[a>>2];z=q[a+4>>2]-y|0;a=(z|0)/160|0;if(z){m=x(x(x(i*n)+x(h*l))-x(k*p));r=x(x(i*p)+x(x(k*n)+x(j*l)));v=x(x(x(h*p)+x(k*l))-x(j*n));l=x(x(x(h*n)+x(j*p))-x(i*l));A=x(x(k*m)+x(x(x(i*r)+x(h*v))-x(j*l)));B=x(x(i*l)+x(x(x(h*m)+x(j*r))-x(k*v)));v=x(x(j*v)+x(x(x(h*l)+x(k*r))-x(i*m)));n=x(x(x(t*i)+x(h*o))-x(s*k));m=x(x(s*i)+x(x(j*o)+x(t*k)));r=x(x(x(h*s)+x(o*k))-x(t*j));o=x(x(x(h*t)+x(j*s))-x(i*o));l=x(x(k*n)+x(x(x(i*m)+x(h*r))-x(j*o)));p=x(x(i*o)+x(x(x(h*n)+x(j*m))-x(k*r)));k=x(x(j*r)+x(x(x(h*o)+x(k*m))-x(i*n)));d=w(d>>>0<63?d:63,12)+b|0;n=x(x(x(f-u[d>>2])*u[d+8>>2])+u[d+4>>2]);f=x(e*g);e=x(u[b+776>>2]*e);o=x(e*e);s=u[b+768>>2];d=a>>>0>1?a:1;t=u[c+8>>2];m=u[c+4>>2];r=u[c>>2];a=0;while(1){b=w(a,160)+y|0;h=x(u[b>>2]-r);j=x(u[b+4>>2]-m);g=x(u[b+8>>2]-t);e=x(x(x(k*h)+x(p*j))+x(l*g));g=x(g-x(l*e));h=x(h-x(k*e));e=x(j-x(p*e));j=x(o-x(x(g*g)+x(x(h*h)+x(e*e))))>=x(0)?x(n+x(s*u[b+76>>2])):x(0);i=x(x(k*e)-x(p*h));e=x(x(p*g)-x(l*e));g=x(x(l*h)-x(k*g));c=x(x(i*i)+x(x(e*e)+x(g*g)))<=x(0);h=c?A:i;i=c?v:e;g=c?B:g;e=x(x(1)/x(F(x(x(h*h)+x(x(i*i)+x(g*g))))));u[b+56>>2]=u[b+56>>2]+x(f*x(j*x(h*e)));u[b+52>>2]=u[b+52>>2]+x(f*x(j*x(g*e)));u[b+48>>2]=u[b+48>>2]+x(f*x(j*x(i*e)));a=a+1|0;if((d|0)!=(a|0)){continue}break}}}function q$(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii-288|0;Ii=d;q[d+284>>2]=-1;j=fo(a,3,-1);Ui(d+152|0,0,128);Ui(d+24|0,0,128);Ri(a,3);vj(a,0,0);g=q[a+8>>2]-q[a+12>>2]>>4;vj(a,0,0);h=q[a+8>>2]-q[a+12>>2]>>4;vj(a,0,0);c=1;i=q[a+8>>2]-q[a+12>>2]>>4;uN(a,1,g,d+152|0,d+284|0);uN(a,2,g,d+24|0,d+284|0);if(Vi(a,1)){e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=1;q[a+8>>2]=q[a+8>>2]+16;ik(a,1);if(Vi(a,-1)){while(1){e=OF(a);a:{if((e|0)==-1){break a}Xi(a,137244);ik(a,-2);if(!Vi(a,-1)){Ri(a,-2);break a}ej(a,-2);Rk(a,1,1);b=Uj(a,-1);Ri(a,-2);if(!b){break a}b=q[a+8>>2];q[b+8>>2]=3;f=f+1|0;v[b>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;ej(a,-2);pj(a,h);b=(d+152|0)+(e>>>3&536870908)|0;k=q[b>>2];q[b>>2]=Fza(-2,e)&k}Ri(a,-2);e=q[a+8>>2];q[e+8>>2]=3;c=c+1|0;v[e>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,1);if(Vi(a,-1)){continue}break}}Ri(a,-2)}v[d+8>>3]=-1;c=(f|0)>0;v[d>>3]=c?0:j;Yn(d);b=!c;e=q[d+284>>2];c=iS(e+1|0,d+152|0,d+24|0,d);b:{if(!((c|0)<1?b:0)){c=0;if((e|0)>=0){while(1){if(q[(d+152|0)+(c>>>3&536870908)>>2]>>>c&1){b=q[a+8>>2];q[b+8>>2]=3;f=f+1|0;v[b>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,g);pj(a,h)}b=(c|0)!=(e|0);c=c+1|0;if(b){continue}break}c=0;f=0;while(1){if(q[(d+24|0)+(c>>>3&536870908)>>2]>>>c&1){b=q[a+8>>2];q[b+8>>2]=3;f=f+1|0;v[b>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,g);pj(a,i)}b=(c|0)!=(e|0);c=c+1|0;if(b){continue}break}}$E(a,h);$E(a,i);a=2;break b}c:{if(!c){Xi(a,137182);break c}Qi(a,137190,0)}a=3}Ii=d+288|0;return a|0}function lsa(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=0,p=0,r=0,s=x(0),t=0,w=0,y=0,z=x(0),A=0,B=0,C=0;n=Ii-336|0;Ii=n;a:{if(!b){p=-6;break a}r=Hp(n+224|0);p=q[n+220>>2];q[n+88>>2]=q[n+216>>2];q[n+92>>2]=p;q[n+208>>2]=0;p=q[n+212>>2];q[n+80>>2]=q[n+208>>2];q[n+84>>2]=p;p=uq(b,c,d,e,f,n+80|0,r);if(p){break a}p=-9;if(o[r+108|0]&1){break a}w=q[h>>2];t=q[r+32>>2];if((w|0)!=(t|0)){p=-4;if(t-3>>>0>1|w){break a}s=x(v[h+8>>3]);b:{if((t|0)==3){u[n+120>>2]=s;u[n+116>>2]=s;u[n+112>>2]=s;q[n+136>>2]=3;u[n+144>>2]=u[n+112>>2];u[n+148>>2]=u[n+116>>2];u[n+152>>2]=u[n+120>>2];break b}u[n+108>>2]=s;u[n+104>>2]=s;u[n+100>>2]=s;u[n+96>>2]=s;Gp(n+136|0,n+96|0)}Ti(h,n+136|0,72);w=q[r+32>>2]}p=-3;c:{d:{switch(w|0){case 4:case 5:w=4;case 3:a=Gt(a);q[n+72>>2]=q[i+16>>2];t=q[i+12>>2];p=n- -64|0;q[p>>2]=q[i+8>>2];q[p+4>>2]=t;p=q[i+4>>2];q[n+56>>2]=q[i>>2];q[n+60>>2]=p;p=-7;if(!xB(a,b,c,d,e,f,g,0,x(0),x(0),n+56|0,j,k,l,m,1)){break a}q[i+8>>2]=0;l=h+8|0;m=r+40|0;h=0;while(1){e=h<<2;s=u[e+l>>2];z=u[e+m>>2];f=r+(h<<3)|0;t=q[f>>2];A=q[f+4>>2];f=q[r+104>>2];q[n+48>>2]=q[i+16>>2];y=q[i+12>>2];q[n+40>>2]=q[i+8>>2];q[n+44>>2]=y;y=q[i+4>>2];q[n+32>>2]=q[i>>2];q[n+36>>2]=y;if(!xB(a,b,c,d,t,A,g,f?e+f|0:0,z,s,n+32|0,j,k,0,0,0)){break a}h=h+1|0;if((w|0)!=(h|0)){continue}break}break c;case 0:break d;default:break a}}a=Gt(a);B=v[r+40>>3];r=q[r+104>>2];C=v[h+8>>3];q[n+24>>2]=q[i+16>>2];h=q[i+12>>2];q[n+16>>2]=q[i+8>>2];q[n+20>>2]=h;h=q[i+4>>2];q[n+8>>2]=q[i>>2];q[n+12>>2]=h;p=-7;if(!xB(a,b,c,d,e,f,g,r,x(B),x(C),n+8|0,j,k,l,m,0)){break a}}p=0}Ii=n+336|0;return p}function a6(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-352|0;Ii=b;c=q[a+4>>2];d=q[c+16>>2];g=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);a:{if(!(o[a+20|0]&1)){a=q[a+8>>2];h=q[a+1028>>2];i=q[a+1024>>2];break a}a=q[c+24>>2];i=c+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0;a=q[c+20>>2];h=c+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0}if(g){c=0;while(1){e=(c<<4)+h|0;a=q[e+12>>2];f=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);a=q[e+4>>2];d=q[e+8>>2];e=q[e>>2];q[b+340>>2]=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);q[b+336>>2]=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);q[b+332>>2]=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);q[b+328>>2]=f>>>2&1;q[b+324>>2]=f>>>1&1;q[b+320>>2]=f&1;Jl(32968,b+320|0);a=(c<<6)+i|0;q[b+304>>2]=r[a|0];Jl(32963,b+304|0);q[b+288>>2]=r[a+1|0];Jl(32963,b+288|0);q[b+272>>2]=r[a+2|0];Jl(32963,b+272|0);q[b+256>>2]=r[a+3|0];Jl(32963,b+256|0);q[b+240>>2]=r[a+4|0];Jl(32963,b+240|0);q[b+224>>2]=r[a+5|0];Jl(32963,b+224|0);q[b+208>>2]=r[a+6|0];Jl(32963,b+208|0);q[b+192>>2]=r[a+7|0];Jl(32963,b+192|0);q[b+176>>2]=r[a+8|0];Jl(32963,b+176|0);q[b+160>>2]=r[a+9|0];Jl(32963,b+160|0);q[b+144>>2]=r[a+10|0];Jl(32963,b+144|0);q[b+128>>2]=r[a+11|0];Jl(32963,b+128|0);q[b+112>>2]=r[a+12|0];Jl(32963,b+112|0);q[b+96>>2]=r[a+13|0];Jl(32963,b+96|0);q[b+80>>2]=r[a+14|0];Jl(32963,b+80|0);q[b+64>>2]=r[a+15|0];Jl(32963,b- -64|0);q[b+48>>2]=r[a+16|0];Jl(32963,b+48|0);q[b+32>>2]=r[a+17|0];Jl(32963,b+32|0);q[b+16>>2]=r[a+18|0];Jl(32963,b+16|0);q[b>>2]=r[a+19|0];Jl(32963,b);Us(10,q[53735]);c=c+1|0;if((g|0)!=(c|0)){continue}break}}Ii=b+352|0}function Y1(){var a=0,b=0,c=0;b=q[239672];if(b){q[b+33904>>2]=0;a=q[b+12>>2];if(a){eG(a);Qn(q[b+16>>2])}F1(q[b>>2]);a=q[b+20>>2];if((a|0)!=q[b+24>>2]){while(1){a=(c<<6)+a|0;q[a+56>>2]=-1;Ni(q[a+4>>2]);q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;c=c+1|0;a=q[b+20>>2];if(c>>>0>2]-a>>6>>>0){continue}break}}Ni(q[b+33928>>2]);Ni(q[b+33932>>2]);Ni(q[b+33936>>2]);Ni(q[b+33940>>2]);Ni(q[b+33944>>2]);Ni(q[b+33948>>2]);a=q[b+132>>2];if(a){Ni(a)}a=q[b+1188>>2];if(a){Ni(a)}a=q[b+2244>>2];if(a){Ni(a)}a=q[b+3300>>2];if(a){Ni(a)}a=q[b+4356>>2];if(a){Ni(a)}a=q[b+5412>>2];if(a){Ni(a)}a=q[b+6468>>2];if(a){Ni(a)}a=q[b+7524>>2];if(a){Ni(a)}a=q[b+8580>>2];if(a){Ni(a)}a=q[b+9636>>2];if(a){Ni(a)}a=q[b+10692>>2];if(a){Ni(a)}a=q[b+11748>>2];if(a){Ni(a)}a=q[b+12804>>2];if(a){Ni(a)}a=q[b+13860>>2];if(a){Ni(a)}a=q[b+14916>>2];if(a){Ni(a)}a=q[b+15972>>2];if(a){Ni(a)}a=q[b+17028>>2];if(a){Ni(a)}a=q[b+18084>>2];if(a){Ni(a)}a=q[b+19140>>2];if(a){Ni(a)}a=q[b+20196>>2];if(a){Ni(a)}a=q[b+21252>>2];if(a){Ni(a)}a=q[b+22308>>2];if(a){Ni(a)}a=q[b+23364>>2];if(a){Ni(a)}a=q[b+24420>>2];if(a){Ni(a)}a=q[b+25476>>2];if(a){Ni(a)}a=q[b+26532>>2];if(a){Ni(a)}a=q[b+27588>>2];if(a){Ni(a)}a=q[b+28644>>2];if(a){Ni(a)}a=q[b+29700>>2];if(a){Ni(a)}a=q[b+30756>>2];if(a){Ni(a)}a=q[b+31812>>2];if(a){Ni(a)}a=q[b+32868>>2];if(a){Ni(a)}a=q[b+8>>2];if(a){Mi[q[q[b+4>>2]+8>>2]](a)}Ni(I1(b));q[239672]=0}}function kH(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,t=0;while(1){b=q[a+88104>>2];q[a+88104>>2]=b?b:1;if(b){continue}break}q[a+8>>2]=0;q[a+88104>>2]=0;b=q[a+4>>2];j=q[a>>2];q[a>>2]=0;q[a+4>>2]=0;l=r[a+12|0];o[a+12|0]=l&254;e=b-j|0;b=(e|0)/40|0;a:{if(!e){break a}t=b>>>0>1?b:1;m=a+88112|0;while(1){b:{e=w(k,40)+j|0;f=p[e+32>>1];i=f<<6;g=(i+a|0)+88146|0;b=s[g>>1];c:{if((b|0)!=65535){c=q[e+16>>2];h=q[e+20>>2];while(1){b=(b<<16>>16<<6)+a|0;d=b+88128|0;if((c|0)==q[d>>2]&(h|0)==q[d+4>>2]){break c}b=s[b+88148>>1];if((b|0)!=65535){continue}break}}b=q[a+155696>>2];if(!b){break c}b=b-1|0;q[a+155696>>2]=b;h=p[((b<<1)+a|0)+153648>>1];c=(h<<6)+m|0;b=c;q[b>>2]=0;q[b+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;b=e;d=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;d=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=d;d=q[b+20>>2];q[c+16>>2]=q[b+16>>2];q[c+20>>2]=d;d=q[b+28>>2];q[c+24>>2]=q[b+24>>2];q[c+28>>2]=d;q[c+56>>2]=-17;p[c+34>>1]=65535;b=s[g>>1];p[c+32>>1]=f;p[c+36>>1]=b;p[g>>1]=h;b=i+m|0;i=s[b+38>>1];g=i+1|0;p[b+38>>1]=g;d:{if((f|0)==-1){break d}h=q[e+24>>2];e=q[e+28>>2];while(1){f=(f<<16>>16<<6)+a|0;d=f+88136|0;if(q[d>>2]==(h|0)&q[d+4>>2]==(e|0)){q[c+56>>2]=-16;if(!(g&65535)){break b}p[b+38>>1]=i;break d}f=s[f+88144>>1];if((f|0)!=65535){continue}break}}n=n+1|0}k=k+1|0;if((t|0)!=(k|0)){continue}break a}break}J(29730,29446,360,29708);G()}if(!(!j|l&1)){Ni(j)}return(n|0)!=0}function fz(a,b,c){var d=0,e=0,f=0,g=0;d=Ii+ -64|0;Ii=d;q[d+56>>2]=0;q[d+48>>2]=1;q[d+52>>2]=0;q[d+40>>2]=0;q[d+32>>2]=1;q[d+36>>2]=0;q[d+24>>2]=0;q[d+16>>2]=1;q[d+20>>2]=0;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;a:{b:{if(!q[a+24>>2]){e=c+24|0;e=ck(a,d+32|0,e,e);if(e){break a}e=bq(a,d+16|0,c,d+32|0);if(e){break a}e=Jm(a,d,c,d+32|0);if(e){break a}e=ck(a,d+32|0,d+16|0,d);if(e){break a}e=Tq(d+48|0,d+32|0,3);if(e){break a}f=a+4|0;while(1){if((_j(d+48|0,f)|0)<0){break b}e=nn(d+48|0,d+48|0,f);if(!e){continue}break}break a}e=ck(a,d+32|0,c,c);if(e){break a}e=Tq(d+48|0,d+32|0,3);if(e){break a}f=a+16|0;g=a+4|0;while(1){if((_j(d+48|0,g)|0)>=0){e=nn(d+48|0,d+48|0,g);if(!e){continue}break a}break}if(!Jj(f,0)){break b}e=c+24|0;e=ck(a,d+32|0,e,e);if(e){break a}e=ck(a,d+16|0,d+32|0,d+32|0);if(e){break a}e=ck(a,d+32|0,d+16|0,f);if(e){break a}e=bq(a,d+48|0,d+48|0,d+32|0);if(e){break a}}f=c+12|0;e=ck(a,d+16|0,f,f);if(e){break a}e=us(a,d+16|0);if(e){break a}e=ck(a,d+32|0,c,d+16|0);if(e){break a}e=us(a,d+32|0);if(e){break a}e=ck(a,d,d+16|0,d+16|0);if(e){break a}e=us(a,d);if(e){break a}e=ck(a,d+16|0,d+48|0,d+48|0);if(e){break a}e=Jm(a,d+16|0,d+16|0,d+32|0);if(e){break a}e=Jm(a,d+16|0,d+16|0,d+32|0);if(e){break a}e=Jm(a,d+32|0,d+32|0,d+16|0);if(e){break a}e=ck(a,d+32|0,d+32|0,d+48|0);if(e){break a}e=Jm(a,d+32|0,d+32|0,d);if(e){break a}e=ck(a,d,f,c+24|0);if(e){break a}e=us(a,d);if(e){break a}e=wk(b,d+16|0);if(e){break a}e=wk(b+12|0,d+32|0);if(e){break a}e=wk(b+24|0,d)}ij(d+48|0);ij(d+32|0);ij(d+16|0);ij(d);Ii=d- -64|0;return e}function una(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;g=q[a>>2];e=q[g>>2];c=Ui($i(112),0,112);q[c+52>>2]=0;q[c+56>>2]=0;q[c+48>>2]=-1;q[c+60>>2]=0;q[c+64>>2]=0;q[c+80>>2]=0;q[c+84>>2]=0;q[c+88>>2]=0;q[c+92>>2]=0;d=q[a+16>>2];b=q[g+8>>2];d=b>>>0>d>>>0?d:b;q[f+8>>2]=d;a:{b=C5(f+8|0,c+96|0);b:{if(b){q[f>>2]=b;Pi(5,50700,50708,f);b=-1e3;break b}z9(c,d);if(o[c+64|0]&1){break a}Wi(d,304,c+52|0,c+60|0,c+56|0);d=q[e+2384>>2];e=qq(d);tm(e,50747,3,0);tm(e,50756,3,0);tm(e,50763,3,0);tm(e,50771,4,0);tm(e,50777,2,0);tm(e,50787,2,0);q[c+68>>2]=Mi[q[74954]](d,e);q[c+100>>2]=Mi[q[74947]](d);q[c+72>>2]=$i(64);b=$i(260);q[b>>2]=16;q[c+76>>2]=Ui(b+4|0,0,256);b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+4>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+8>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+12>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+16>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+20>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+24>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+28>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+32>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+36>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+40>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+44>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+48>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+52>>2]=b;b=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+56>>2]=b;d=Mi[q[74943]](d,0,0,1)|0;q[q[c+72>>2]+60>>2]=d;um(e);q[q[a+12>>2]>>2]=c;mq(q[g+4>>2],233,c);b=0}Ii=f+16|0;return b|0}J(51372,51308,493,51447);G()}function b4(a){a=a|0;var b=0,c=x(0),d=x(0),e=0,f=x(0),g=x(0),h=x(0);e=Ii-160|0;Ii=e;b=Ll(a,1);a:{b:{c:{d:{if((b|0)!=q[210436]){if((b|0)==q[210437]){break d}if((b|0)==q[210438]){break c}q[e+144>>2]=134032;q[e+140>>2]=134016;q[e+136>>2]=134e3;q[e+132>>2]=135605;q[e+128>>2]=134064;a=Qi(a,135957,e+128|0);break a}b=_i(a,1,b,0);f=u[b>>2];g=u[b+4>>2];e:{if(!(f!=f|g!=g)){c=u[b+8>>2];if(c==c){break e}}c=u[b+8>>2];v[e+16>>3]=g;v[e+24>>3]=c;v[e+8>>3]=f;q[e>>2]=1;Qi(a,134131,e);c=u[b+8>>2];g=u[b+4>>2];f=u[b>>2]}b=yj(a,16);d=c;c=x(x(1)/x(F(x(x(x(f*f)+x(g*g))+x(c*c)))));u[b+8>>2]=d*c;u[b+4>>2]=g*c;u[b>>2]=f*c;Zi(a,-1e4,134e3);break b}b=_i(a,1,b,0);f=u[b>>2];g=u[b+4>>2];f:{g:{if(f!=f|g!=g){break g}c=u[b+8>>2];if(c!=c){break g}d=u[b+12>>2];if(d==d){break f}}c=u[b+8>>2];d=u[b+12>>2];v[e+48>>3]=g;v[e- -64>>3]=d;v[e+56>>3]=c;v[e+40>>3]=f;q[e+32>>2]=1;Qi(a,134221,e+32|0);d=u[b+12>>2];c=u[b+8>>2];g=u[b+4>>2];f=u[b>>2]}b=yj(a,16);h=d;d=x(x(1)/x(F(x(x(x(x(f*f)+x(g*g))+x(c*c))+x(d*d)))));u[b+12>>2]=h*d;u[b+8>>2]=c*d;u[b+4>>2]=g*d;u[b>>2]=f*d;Zi(a,-1e4,134016);break b}b=_i(a,1,b,0);f=u[b>>2];g=u[b+4>>2];h:{i:{if(f!=f|g!=g){break i}c=u[b+8>>2];if(c!=c){break i}d=u[b+12>>2];if(d==d){break h}}c=u[b+8>>2];d=u[b+12>>2];v[e+96>>3]=g;v[e+112>>3]=d;v[e+104>>3]=c;v[e+88>>3]=f;q[e+80>>2]=1;Qi(a,134315,e+80|0);d=u[b+12>>2];c=u[b+8>>2];g=u[b+4>>2];f=u[b>>2]}b=yj(a,16);h=d;d=x(x(1)/x(F(x(x(x(x(f*f)+x(g*g))+x(c*c))+x(d*d)))));u[b+12>>2]=h*d;u[b+8>>2]=c*d;u[b+4>>2]=g*d;u[b>>2]=f*d;Zi(a,-1e4,134032)}xj(a,-2);a=1}Ii=e+160|0;return a|0}function L7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0);c=Ii-48|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){if(!dF(a,1)){break b}h=q[_i(a,1,q[79182],119836)>>2];c:{d:{e:{if((Vi(a,2)|0)==5){Dj(a,2,5);ej(a,2);Zi(a,-1,117258);d=0;f:{if(!Vi(a,-1)){break f}d=Ym(a,-1)}Ri(a,-2);Zi(a,-1,117266);e=4;g:{if(!Vi(a,-1)){break g}e=jj(a,-1)}Ri(a,-2);Zi(a,-1,117281);if(Vi(a,-1)){break e}g=0;break d}if(!dF(a,2)){break c}if(!r[316712]){o[316712]=1;Pi(3,116024,117291,0)}g=q[_i(a,2,q[79181],119910)>>2];break c}g=q[_i(a,-1,q[79181],119910)>>2]}Ri(a,-2);Ri(a,-2);if(!d){break c}b=$i(80);u[b>>2]=u[d>>2];u[b+4>>2]=u[d+4>>2];u[b+8>>2]=u[d+8>>2];u[b+12>>2]=u[d+12>>2];u[b+16>>2]=u[d+16>>2];u[b+20>>2]=u[d+20>>2];u[b+24>>2]=u[d+24>>2];u[b+28>>2]=u[d+28>>2];u[b+32>>2]=u[d+32>>2];u[b+36>>2]=u[d+36>>2];u[b+40>>2]=u[d+40>>2];u[b+44>>2]=u[d+44>>2];u[b+48>>2]=u[d+48>>2];u[b+52>>2]=u[d+52>>2];u[b+56>>2]=u[d+56>>2];i=u[d+60>>2];q[b+64>>2]=e;u[b+60>>2]=i}q[c+16>>2]=h;q[c+20>>2]=0;q[c+8>>2]=18;q[c+32>>2]=b;q[c+36>>2]=0;q[c+24>>2]=g;q[c+28>>2]=0;b=q[f+4>>2];if((b|0)!=q[f+8>>2]){q[f+4>>2]=b+40;a=q[c+44>>2];q[b+32>>2]=q[c+40>>2];q[b+36>>2]=a;a=q[c+36>>2];q[b+24>>2]=q[c+32>>2];q[b+28>>2]=a;a=q[c+28>>2];q[b+16>>2]=q[c+24>>2];q[b+20>>2]=a;a=q[c+20>>2];q[b+8>>2]=q[c+16>>2];q[b+12>>2]=a;a=q[c+12>>2];q[b>>2]=q[c+8>>2];q[b+4>>2]=a;a=0;break a}q[c>>2]=(q[f+8>>2]-q[f>>2]|0)/40;a=Qi(a,115614,c);break a}J(115568,115465,478,119531);G()}a=Qi(a,117227,0)}Ii=c+48|0;return a|0}function gz(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-112|0;Ii=e;g=c+24|0;a:{if(!Jj(g,0)){f=Eo(b,d);break a}b:{if(!q[d+32>>2]){break b}h=d+24|0;if(!Jj(h,0)){f=Eo(b,c);break a}if(!q[d+32>>2]){break b}f=-20352;if(Jj(h,1)){break a}}q[e+104>>2]=0;q[e+96>>2]=1;q[e+100>>2]=0;q[e+88>>2]=0;q[e+80>>2]=1;q[e+84>>2]=0;f=e- -64|0;q[f+8>>2]=0;q[f>>2]=1;q[f+4>>2]=0;q[e+56>>2]=0;q[e+48>>2]=1;q[e+52>>2]=0;q[e+40>>2]=0;q[e+32>>2]=1;q[e+36>>2]=0;q[e+24>>2]=0;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;f=ck(a,e+96|0,g,g);c:{if(f){break c}f=ck(a,e+80|0,e+96|0,g);if(f){break c}f=ck(a,e+96|0,e+96|0,d);if(f){break c}f=ck(a,e+80|0,e+80|0,d+12|0);if(f){break c}f=Jm(a,e+96|0,e+96|0,c);if(f){break c}d=c+12|0;f=Jm(a,e+80|0,e+80|0,d);if(f){break c}if(!Jj(e+96|0,0)){if(!Jj(e+80|0,0)){f=fz(a,b,c);break c}f=wE(b);break c}f=ck(a,e,g,e+96|0);if(f){break c}f=ck(a,e- -64|0,e+96|0,e+96|0);if(f){break c}f=ck(a,e+48|0,e- -64|0,e+96|0);if(f){break c}f=ck(a,e- -64|0,e- -64|0,c);if(f){break c}f=wk(e+96|0,e- -64|0);if(f){break c}f=us(a,e+96|0);if(f){break c}f=ck(a,e+32|0,e+80|0,e+80|0);if(f){break c}f=Jm(a,e+32|0,e+32|0,e+96|0);if(f){break c}f=Jm(a,e+32|0,e+32|0,e+48|0);if(f){break c}f=Jm(a,e- -64|0,e- -64|0,e+32|0);if(f){break c}f=ck(a,e- -64|0,e- -64|0,e+80|0);if(f){break c}f=ck(a,e+48|0,e+48|0,d);if(f){break c}f=Jm(a,e+16|0,e- -64|0,e+48|0);if(f){break c}f=wk(b,e+32|0);if(f){break c}f=wk(b+12|0,e+16|0);if(f){break c}f=wk(b+24|0,e)}ij(e+96|0);ij(e+80|0);ij(e- -64|0);ij(e+48|0);ij(e+32|0);ij(e+16|0);ij(e)}Ii=e+112|0;return f}function FA(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{c:{d:{g=q[a+16>>2];f=q[a+8>>2];if(q[a+24>>2]!=((g-f|0)/80|0)){d=q[a+4>>2];e:{if(!d){break e}e=q[q[a>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,80)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+72>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((g|0)!=(d|0)){q[a+12>>2]=d+80;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,80)+f|0;q[a+20>>2]=q[d+72>>2]}q[d>>2]=b;e=q[c+4>>2];q[d+8>>2]=q[c>>2];q[d+12>>2]=e;e=q[c+12>>2];q[d+16>>2]=q[c+8>>2];q[d+20>>2]=e;e=q[c+20>>2];q[d+24>>2]=q[c+16>>2];q[d+28>>2]=e;e=q[c+28>>2];q[d+32>>2]=q[c+24>>2];q[d+36>>2]=e;e=q[c+36>>2];q[d+40>>2]=q[c+32>>2];q[d+44>>2]=e;e=q[c+44>>2];q[d+48>>2]=q[c+40>>2];q[d+52>>2]=e;e=q[c+52>>2];q[d+56>>2]=q[c+48>>2];q[d+60>>2]=e;f=q[c+60>>2];e=d- -64|0;q[e>>2]=q[c+56>>2];q[e+4>>2]=f;q[d+72>>2]=-1;c=q[a+8>>2];b=q[a>>2]+((b>>>0)%t[a+4>>2]<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=c+w(e,80)|0;e=q[b+72>>2];if((e|0)!=-1){continue}break}q[b+72>>2]=(d-c|0)/80;break a}J(113346,113209,229,113354);G()}d=q[c+4>>2];a=w(e,80)+f|0;q[a+8>>2]=q[c>>2];q[a+12>>2]=d;d=q[c+60>>2];b=a- -64|0;q[b>>2]=q[c+56>>2];q[b+4>>2]=d;b=q[c+52>>2];q[a+56>>2]=q[c+48>>2];q[a+60>>2]=b;b=q[c+44>>2];q[a+48>>2]=q[c+40>>2];q[a+52>>2]=b;b=q[c+36>>2];q[a+40>>2]=q[c+32>>2];q[a+44>>2]=b;b=q[c+28>>2];q[a+32>>2]=q[c+24>>2];q[a+36>>2]=b;b=q[c+20>>2];q[a+24>>2]=q[c+16>>2];q[a+28>>2]=b;b=q[c+12>>2];q[a+16>>2]=q[c+8>>2];q[a+20>>2]=b;return}J(113358,113209,537,113420);G()}q[b>>2]=(d-c|0)/80}q[a+24>>2]=q[a+24>>2]+1}function r5(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Ii-16|0;Ii=l;a:{b:{c:{d:{e:{f:{g:{if(a){if(!(b>=x(0))){break g}n=q[a+4>>2]-q[a>>2]|0;m=(n|0)/28|0;h:{if((n|0)==182e4){q[l>>2]=65e3;Pi(4,133348,133355,l);d=-1;break h}g=s[a+36>>1];if((g|0)==s[a+38>>1]){h=(g>>>0<64984?g:64984)+16|0;k=h&65535;if(k>>>0>>0){break f}j=q[a+32>>2];f=Yi(h<<1);q[a+32>>2]=f;i=Ti(f,j,g<<1);p[a+36>>1]=h;if(g>>>0>>0){f=g;while(1){p[i+(f<<1)>>1]=f;f=f+1|0;if((h|0)!=(f|0)){continue}break}}Ni(j);if(o[a+28|0]&1){break c}Wi(h,2,a+16|0,a+24|0,a+20|0);f=q[a+16>>2];if(q[a+24>>2]-f>>1>>>0>>0){break b}q[a+20>>2]=f+(h<<1);if(g>>>0>=h>>>0){break a}Ui(f+(g<<1)|0,0,h-g<<1)}f=q[a+32>>2];if(!f){break e}i=s[a+38>>1];if(i>>>0>=s[a+36>>1]){break d}k=a+4|0;g=s[a+44>>1];p[a+38>>1]=i+1;j=s[f+(i<<1)>>1];i=q[a+8>>2];f=q[a+4>>2];if((i|0)==(f|0)){if(o[a+12|0]&1){break c}f=((f-q[a>>2]|0)/28|0)+16|0;Wi(f>>>0<65e3?f:65e3,28,a,a+8|0,k);h=q[a+8>>2]}else{h=i}i=q[a>>2];f=m+1|0;if((h-i|0)/28>>>0>>0){break b}q[k>>2]=i+w(f,28);if((n+28|0)/28>>>0<=m>>>0){break a}f=i+w(m,28)|0;q[f+4>>2]=d;d=j|g<<16;q[f+12>>2]=d;g=q[a+20>>2];a=q[a+16>>2];if(j>>>0>=g-a>>1>>>0){break a}p[a+(j<<1)>>1]=m;u[f+16>>2]=b;u[f+20>>2]=b;q[f+8>>2]=e;q[f>>2]=889;o[f+24|0]=r[f+24|0]&252|c|2}Ii=l+16|0;return d}J(132889,132848,286,132928);G()}J(132937,132848,287,132928);G()}J(133852,133158,112,133875);G()}J(133151,133158,151,133418);G()}J(133422,133158,152,133418);G()}J(133887,133265,493,133875);G()}J(133442,133265,506,133461);G()}J(133962,133265,479,133973);G()}function mw(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0),n=0,o=0,r=x(0);j=Ii-16|0;Ii=j;f=q[a+196>>2];if(!f){f=q[q[a+188>>2]+4>>2]}g=q[f+20>>2];a:{if(!g){break a}g=q[q[f+16>>2]+(Cza(b,c,g)<<2)>>2];if((g|0)==-1){break a}h=q[f+24>>2];while(1){g=g<<4;i=g+h|0;if((b|0)==q[i>>2]&q[i+4>>2]==(c|0)){break a}g=q[(g+h|0)+12>>2];if((g|0)!=-1){continue}break}i=0}b:{g=i?i+8|0:0;c:{if(g){i=q[g>>2];q[a+208>>2]=b;q[a+212>>2]=c;q[a+184>>2]=i;c=q[g>>2];b=q[f+64>>2];if(c>>>0>=t[b+8>>2]){break b}c=q[b+4>>2]+w(c,40)|0;b=q[c+20>>2];h=q[c+12>>2];l=q[c+16>>2];n=q[c+24>>2]-5|0;k=n>>>0<2;o=k|s[a+234>>1]&-2;p[a+234>>1]=o;m=x(b>>>0);b=l-h|0;h=(b<<1)-2|0;u[a+220>>2]=m/x((k?h?h:1:b)>>>0);h=q[c+24>>2];b=o&-3|((h|0)==2?2:((h|0)==4)<<1);p[a+234>>1]=b;k=b&-9|(q[c+24>>2]!=0)<<3;p[a+234>>1]=k;if(q[q[q[a+188>>2]>>2]+48>>2]==1){f=q[f+64>>2];if(i>>>0>=t[f+8>>2]){break b}l=q[f+4>>2];b=a;d:{if(q[f+60>>2]){f=q[f+56>>2]+(q[a+216>>2]+q[(l+w(i,40)|0)+12>>2]<<3)|0;m=u[f+4>>2];r=u[f>>2];break d}f=l+w(i,40)|0;m=x(t[f+8>>2]);r=x(t[f+4>>2])}u[b+64>>2]=r;q[a+72>>2]=1065353216;u[a+68>>2]=m}d=d>2]-2|0){case 0:case 2:d=x(x(1)-d);break;default:break e}}p[a+234>>1]=k|16;u[a+228>>2]=e>x(0)?e:x(0);d=d>>0<2?x(d*x(.5)):d;u[a+224>>2]=(h|0)==4^(h|0)==2?x(x(1)-d):d;RK(a);break c}q[a+216>>2]=0;q[a+208>>2]=0;q[a+212>>2]=0;p[a+234>>1]=s[a+234>>1]&65527;a=aj(b,c);q[j+4>>2]=aj(q[f+56>>2],q[f+60>>2]);q[j>>2]=a;Pi(4,53024,53220,j)}Ii=j+16|0;return(g|0)!=0}J(53297,53309,88,53341);G()}function $ka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),p=x(0),r=0;b=Ii-144|0;Ii=b;f=nj(b+120|0,a,0,73366,292);i=q[a+8>>2]-q[a+12>>2]>>4;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;a:{if(!qm(a,b+88|0)){a=Qi(a,73408,0);break a}et(a,q[74444]);e=qj(a,-1);Ri(a,-2);g=jk(a);d=q[q[q[g+80>>2]+8>>2]>>2];c=q[e+8>>2];if(t[q[d+4>>2]>>2]>c>>>0){d=q[(d+(c<<2)|0)+12>>2]}else{d=0}if(!d){a=Kj(f,73471,0);break a}c=Bl(a,1);j=u[c+8>>2];k=u[c+4>>2];l=u[c>>2];c=Bl(a,2);m=u[c+8>>2];n=u[c+4>>2];p=u[c>>2];Dj(a,3,5);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;c=0;if(Hj(a,3)){while(1){r=yL(d,nl(a,-1),Li);Ri(a,-2);c=c|r;if(Hj(a,3)){continue}break}}b:{if((i|0)<4){break b}h=jj(a,4);if(h>>>0<256){break b}a=Qi(a,73564,0);break a}u[b+56>>2]=m;u[b+52>>2]=n;q[b+68>>2]=h;q[b+64>>2]=c;u[b+48>>2]=p;u[b+40>>2]=j;u[b+36>>2]=k;u[b+32>>2]=l;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;o[b+15|0]=0;a=q[e+4>>2];q[b>>2]=q[e>>2];q[b+4>>2]=a;d=q[60416];vk(b+88|0,b,q[d+8>>2],q[d+12>>2],g,d,b+32|0,48);a=0}mj(f);Ii=b+144|0;return a|0}function Nda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=Ii-16|0;Ii=e;i=q[a+8>>2]-q[a+12>>2]>>4;vj(a,0,0);vj(a,0,1);qk(a,1431,0);Si(a,-2,204413);xj(a,-2);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);a:{b:{c:{d:{e:{f:{if(Vi(a,1)){f=tj(a,1,e+8|0);b=f;d=bw(c,s[b+570>>1]|s[b+568>>1]<<16,e+4|0);if(d){break f}lk(a,q[f+560>>2],q[f+564>>2]);b=q[e+4>>2];d=yj(a,8);q[d+4>>2]=b;q[d>>2]=c;Zi(a,-1e4,202300);xj(a,-2);Ij(a,-3);b=s[f+578>>1];g=s[99560];if((b|0)!=(g|0)){h=q[e+4>>2];while(1){b=b&65535;d=q[c+32>>2];if(b>>>0>=(q[c+36>>2]-d|0)/592>>>0){break a}b=d+w(b,592)|0;d=qK(a,c,b,e+12|0);if(d){break f}zr(c,q[e+12>>2],h,0);b=s[b+574>>1];if((g|0)!=(b|0)){continue}break}}d=0;b=0;h=c;j=q[e+4>>2];f=s[f+576>>1];if((f|0)!=(g|0)){b=q[c+32>>2];if(f>>>0>=(q[c+36>>2]-b|0)/592>>>0){break a}b=b+w(f,592)|0;b=s[b+570>>1]|s[b+568>>1]<<16}zr(h,j,b,0);break f}b=s[c+380>>1];f=s[99560];if((b|0)==(f|0)){break e}while(1){b=b&65535;d=q[c+32>>2];if(b>>>0>=(q[c+36>>2]-d|0)/592>>>0){break a}b=d+w(b,592)|0;d=bw(c,s[b+570>>1]|s[b+568>>1]<<16,e+12|0);if(d){break f}lk(a,q[b+560>>2],q[b+564>>2]);d=q[e+12>>2];g=yj(a,8);q[g+4>>2]=d;q[g>>2]=c;Zi(a,-1e4,202300);xj(a,-2);Ij(a,-3);d=rK(a,c,s[b+578>>1],q[e+12>>2]);if(d){break f}zr(c,q[e+12>>2],0,0);b=s[b+574>>1];if((f|0)!=(b|0)){continue}break}break e}c=207316;switch(d+4|0){case 0:break c;case 4:break e;default:break d}}c=1;if((i+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break b}J(202310,202233,3436,207360);G()}c=207239}Ri(a,-2);c=Qi(a,c,0)}Ii=e+16|0;return c|0}J(208265,208276,479,208332);G()}function GV(a,b,c){var d=0,e=0,f=0;d=-28928;a:{b:{if(!a){break b}e=q[a>>2];if(!e){break b}c:{if(!(r[e+184|0]&2)){break c}d=Xp(a);if(d){break b}d=q[a+68>>2];if(!d|r[d+492|0]!=1){break c}d=Qq(a);if(d){break b}}d=AD(a);if((d|0)!=-27392?d:0){break b}d:{if(q[a+4>>2]==16){break d}d=ps(a);if(!d){break d}if((d|0)!=-27392){break b}}e=q[a+124>>2];if(!e){while(1){d=q[a+96>>2];e:{if(!d){break e}if((Mi[d|0](q[a+88>>2])|0)!=-1){break e}d=q[q[a>>2]+148>>2];e=q[a+92>>2];if(e){Mi[e|0](q[a+88>>2],d>>>2|0,d)}}f=0;d=_n(a);if(d){if((d|0)!=-29312){break b}break a}f:{g:{if(q[a+132>>2]){break g}e=q[a+128>>2];if((e|0)!=23){break f}d=_n(a);if(!d){break g}if((d|0)==-29312){break a}break b}e=q[a+128>>2]}h:{i:{if((e|0)==22){e=q[a>>2];d=q[e+184>>2];if(!(d&1|(q[a+168>>2]==((r[e+184|0]&2?12:4)|0)?!r[q[a+120>>2]]:0))){if(d&2){break i}return-30464}if(!(!(d&8192)|!(q[a+244>>2]|d&48))){if((d&3)==2){q[a+8>>2]=3}f=mD(a);if((f|0)==-27392){break i}if(f){break a}break i}if(q[a+20>>2]<1){return-27648}f=Xj(a,1,100);if(f){break a}break i}j:{if(q[a+8>>2]!=3){break j}d=q[q[a>>2]+160>>2];if((d|0)<0){break j}f=q[a+12>>2];q[a+12>>2]=f+1;if((d|0)>(f|0)){break j}return-30464}if((e|0)!=23){f=-26880;d=-30464;if((e|0)==21){break a}break b}e=q[a+120>>2];q[a+124>>2]=e;if(q[a+4>>2]!=16){break h}d=q[a+92>>2];if(d){Mi[d|0](q[a+88>>2],0,0)}}e=q[a+124>>2]}if(!e){continue}break}}f=b;b=q[a+132>>2];d=b>>>0>c>>>0?c:b;Ti(f,e,d);b=q[a+132>>2]-d|0;q[a+132>>2]=b;if(!b){q[a+176>>2]=0;q[a+124>>2]=0;return d}q[a+124>>2]=q[a+124>>2]+d}return d}return f}function BH(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=q[b+12>>2];q[a+32>>2]=q[b+8>>2];q[a+36>>2]=g;a:{b:{c:{d:{e:{f:{e=q[b>>2];if(e){h=q[e+4>>2];if(h){break f}return}if(o[a+12|0]&1){break a}Wi(0,16,a,a+8|0,a+4|0);if(o[a+28|0]&1){break a}Wi(0,20,a+16|0,a+24|0,a+20|0);break e}d=q[e>>2];b=0;g:{while(1){g=c;if((c|0)==(h|0)){break g}b=q[(d+w(g,12)|0)+8>>2]+b|0;c=g+1|0;if(h>>>0>c>>>0){continue}break}if(!(o[a+12|0]&1)){Wi(c,16,a,a+8|0,a+4|0);d=q[a>>2];if(q[a+8>>2]-d>>4>>>0>g>>>0){q[a+4>>2]=d+(c<<4);if(!(o[a+28|0]&1)){Wi(b,20,a+16|0,a+24|0,a+20|0);c=q[a+16>>2];if((q[a+24>>2]-c|0)/20>>>0>=b>>>0){q[a+20>>2]=w(b,20)+c;if(b){while(1){h:{b=q[a>>2];if(q[a+4>>2]-b>>4>>>0>f>>>0){if(t[e+4>>2]<=f>>>0){break c}d=b+(f<<4)|0;l=w(f,12);q[d>>2]=Oi(q[l+q[e>>2]>>2]);q[d+4>>2]=Li;b=t[e+4>>2]>f>>>0;if(!b){break c}m=q[(q[e>>2]+l|0)+8>>2];q[d+12>>2]=c;q[d+8>>2]=m;if(!m){break h}j=0;if(!b){break c}while(1){k=q[(q[e>>2]+l|0)+4>>2]+(j<<4)|0;u[c>>2]=t[k>>2];b=q[k+4>>2];q[c+8>>2]=0;u[c+4>>2]=b>>>0;i=q[k+12>>2];q[c+12>>2]=i;q[c+16>>2]=$i((i&1073741823)!=(i|0)?-1:i<<2);if(i){b=0;while(1){h=b<<2;d=Pk(q[h+q[k+8>>2]>>2]);q[h+q[c+16>>2]>>2]=d;b=b+1|0;if((i|0)!=(b|0)){continue}break}}c=c+20|0;j=j+1|0;if((j|0)==(m|0)){break h}if(t[e+4>>2]>f>>>0){continue}break}break c}break d}b=(f|0)==(g|0);f=f+1|0;if(!b){continue}break}break e}break d}break b}break a}break b}break a}break c}return}J(112001,112012,479,111990);G()}J(111952,111964,148,111990);G()}J(112155,112012,506,112174);G()}J(112068,112012,493,112143);G()}function Xwa(a){var b=0;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;b=a+12|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+24|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+36|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+48|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+60|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+72|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+84|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+96|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+108|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+120|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+132|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+144|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+156|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+168|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+180|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+192|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+204|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+216|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+228|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+240|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+252|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+264|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+276|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+288|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+300|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+312|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+324|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+336|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+348|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+360|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+372|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+384|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;a=a+396|0;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0}function iI(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=Ii-16|0;Ii=h;a:{b:{c:{d:{e:{f:{f=s[a+20>>1];e=s[a+22>>1];g:{if((f|0)==(e|0)){b=q[a>>2];a=q[a+8>>2];q[h+4>>2]=q[64814];q[h>>2]=a-b>>2;Pi(4,150692,150755,h);c=0;break g}i=q[b+16>>2];j=q[i+4>>2];d=$i(96);q[d+52>>2]=0;q[d+56>>2]=0;q[d+44>>2]=1065353216;q[d+48>>2]=0;q[d+72>>2]=0;q[d+76>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+60>>2]=1065353216;q[d+64>>2]=0;q[d+40>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;o[d+79|0]=0;o[d+80|0]=0;o[d+81|0]=0;o[d+82|0]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d+16>>2]=0;g=q[a+16>>2];if(!g){break f}if(f>>>0<=e>>>0){break e}p[a+22>>1]=e+1;f=s[g+(e<<1)>>1];e=s[a+52>>1];e=e?e:1;p[a+52>>1]=e+1;p[d+80>>1]=e;e=q[a>>2];if(f>>>0>=q[a+4>>2]-e>>2>>>0){break b}q[e+(f<<2)>>2]=d;q[d+64>>2]=b;if(!(!c|!q[c+4>>2])){b=q[c+4>>2];q[d+68>>2]=q[c>>2];q[d+72>>2]=b}if(o[d+12|0]&1){break d}Wi(j,304,d,d+8|0,d+4|0);b=q[d>>2];if((q[d+8>>2]-b|0)/304>>>0>>0){break c}c=w(j,304);q[d+4>>2]=c+b;g=s[d+80>>1];e=Jk();b=0;Ui(q[d>>2],0,c);c=f|g<<16;if(!j){break g}while(1){f=q[d>>2];if((q[d+4>>2]-f|0)/304>>>0<=b>>>0){break b}g=s[a+54>>1];p[a+54>>1]=g+1;if(t[i+4>>2]<=b>>>0){break a}f=f+w(b,304)|0;k=w(b,160);g=g+(b+e|0)|0;nA(f,k+q[i>>2]|0,g);q[f+276>>2]=g;if(t[i+4>>2]<=b>>>0){break a}ZH(c,b,d,f,q[i>>2]+k|0);mA(f);b=b+1|0;if((j|0)!=(b|0)){continue}break}}Ii=h+16|0;return c}J(151958,151310,151,151965);G()}J(151969,151310,152,151965);G()}J(151117,151192,493,151248);G()}J(151260,151192,506,151279);G()}J(151947,151192,479,151403);G()}J(151361,151373,270,151403);G()}function IC(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{b:{c:{switch(d|0){case 2:c=q[c>>2];b=b-4|0;d=q[b>>2];g=c+(d<<3)|0;f=q[g>>2];h=q[a>>2];c=c+(h<<3)|0;i=q[c>>2];g=q[g+4>>2];c=q[c+4>>2];if((g|0)==(c|0)&f>>>0>>0|c>>>0>g>>>0){q[e>>2]=d;q[e+4>>2]=q[a>>2];return}q[e>>2]=h;q[e+4>>2]=q[b>>2];return;default:if((d|0)<=8){if((a|0)==(b|0)){break a}d=q[a>>2];q[e>>2]=d;f=a+4|0;if((f|0)==(b|0)){break a}h=q[c>>2];a=e;while(1){g=a+4|0;c=q[f>>2];i=h+(c<<3)|0;l=q[i>>2];j=h+(d<<3)|0;k=q[j>>2];i=q[i+4>>2];j=q[j+4>>2];d:{if((i|0)==(j|0)&k>>>0>l>>>0|i>>>0>>0){q[a+4>>2]=d;m=e;e:{if((a|0)==(e|0)){break e}while(1){i=h+(q[f>>2]<<3)|0;l=q[i>>2];d=a-4|0;j=q[d>>2];k=h+(j<<3)|0;c=q[k>>2];i=q[i+4>>2];k=q[k+4>>2];m=a;if((i|0)==(k|0)&c>>>0<=l>>>0|i>>>0>k>>>0){break e}q[a>>2]=j;a=d;if((e|0)!=(a|0)){continue}break}m=e}q[m>>2]=q[f>>2];break d}q[g>>2]=c}f=f+4|0;if((f|0)==(b|0)){break a}d=q[g>>2];a=g;continue}}f=d>>>1|0;h=f<<2;g=h+a|0;Op(a,g,c,f,e,f);d=d-f|0;Op(g,b,c,d,e+h|0,d);c=q[c>>2];d=g;while(1){if((b|0)==(d|0)){if((a|0)==(g|0)){break a}while(1){q[e>>2]=q[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}break a}f=q[d>>2];h=c+(f<<3)|0;i=q[h>>2];l=q[a>>2];j=c+(l<<3)|0;k=q[j>>2];h=q[h+4>>2];j=q[j+4>>2];f:{if((h|0)==(j|0)&i>>>0>>0|h>>>0>>0){q[e>>2]=f;d=d+4|0;break f}q[e>>2]=l;a=a+4|0}e=e+4|0;if((a|0)!=(g|0)){continue}break}break b;case 0:break a;case 1:break c}}q[e>>2]=q[a>>2];break a}if((b|0)==(d|0)){break a}while(1){q[e>>2]=q[d>>2];e=e+4|0;d=d+4|0;if((d|0)!=(b|0)){continue}break}}}function vl(a,b,c){if(!b){return 0}a=a^-1;a:{if(!c|!(b&3)){break a}while(1){a=q[((r[b|0]^a&255)<<2)+184896>>2]^a>>>8;b=b+1|0;c=c-1|0;if(!c){break a}if(b&3){continue}break}}if(c>>>0>31){while(1){a=q[b>>2]^a;a=q[b+4>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+8>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+12>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+16>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+20>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+24>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[b+28>>2]^(q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2]);a=q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2];b=b+32|0;c=c-32|0;if(c>>>0>31){continue}break}}if(c>>>0>3){while(1){a=q[b>>2]^a;a=q[(a>>>6&1020)+186944>>2]^q[((a&255)<<2)+187968>>2]^q[(a>>>14&1020)+185920>>2]^q[(a>>>22&1020)+184896>>2];b=b+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(c){while(1){a=q[((r[b|0]^a&255)<<2)+184896>>2]^a>>>8;b=b+1|0;c=c-1|0;if(c){continue}break}}return a^-1}function mza(){var a=0;q[72264]=Oi(35358);q[72265]=Li;q[72266]=Oi(35377);q[72267]=Li;q[72268]=Oi(35394);q[72269]=Li;q[72270]=Oi(35403);q[72271]=Li;q[72272]=Oi(35409);q[72273]=Li;q[72274]=Oi(35419);q[72275]=Li;q[72276]=Oi(35427);q[72277]=Li;q[72278]=Oi(35434);q[72279]=Li;q[72280]=Oi(35443);q[72281]=Li;q[72282]=Oi(35455);q[72283]=Li;q[72284]=Oi(35464);q[72285]=Li;q[72286]=Oi(35469);q[72287]=Li;q[72288]=Oi(35475);q[72289]=Li;q[72290]=Oi(35481);q[72291]=Li;q[72292]=Oi(35490);q[72293]=Li;q[72296]=Oi(35500);q[72297]=Li;q[72298]=Oi(35509);q[72299]=Li;q[72300]=Oi(35518);q[72301]=Li;q[72302]=Oi(35527);q[72303]=Li;q[72304]=Oi(35536);q[72305]=Li;q[72306]=Oi(35545);q[72307]=Li;q[72308]=Oi(35554);q[72309]=Li;q[72310]=Oi(35563);q[72311]=Li;q[72312]=Oi(35572);q[72313]=Li;a=Oi(35581);q[72333]=0;q[72334]=0;q[72332]=295392;q[72330]=0;q[72328]=35614;q[72327]=35593;q[72326]=0;q[72324]=0;q[72322]=0;q[72320]=0;q[72318]=1;q[72316]=0;q[72317]=3;q[72314]=a;q[72315]=Li;q[72335]=0;q[72336]=0;q[72337]=0;q[72354]=289264;q[72352]=0;q[72350]=35654;q[72349]=35627;q[72348]=0;q[72346]=0;q[72344]=0;q[72342]=0;q[72340]=1;q[72338]=0;q[72339]=3;q[72359]=0;q[72357]=0;q[72358]=0;q[72355]=0;q[72356]=0;q[72376]=289264;q[72374]=0;q[72372]=35710;q[72371]=35682;q[72370]=0;q[72368]=0;q[72366]=0;q[72364]=0;q[72362]=1;q[72360]=0;q[72361]=3;q[72381]=0;q[72379]=0;q[72380]=0;q[72377]=0;q[72378]=0;q[72382]=Oi(35766);q[72383]=Li;q[72384]=Oi(35771);q[72385]=Li;q[72386]=Oi(35782);q[72387]=Li;q[72388]=Oi(35789);q[72389]=Li}function hla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-160|0;Ii=b;e=nj(b+136|0,a,0,73366,663);d=jj(a,1);a:{if((d|0)>=5){q[b>>2]=d;c=Kj(e,74276,b);break a}f=$j(a,3);g=Li;c=Bl(a,4);u[b+112>>2]=u[c>>2];u[b+116>>2]=u[c+4>>2];u[b+120>>2]=u[c+8>>2];c=Bl(a,6);u[b+96>>2]=u[c>>2];u[b+100>>2]=u[c+4>>2];u[b+104>>2]=u[c+8>>2];c=q[q[jk(a)+80>>2]+8>>2];q[b+92>>2]=0;q[b+88>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Ml(a,2,c,73150,b+92|0,b+24|0,b+88|0);q[b+84>>2]=0;q[b+80>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Ml(a,5,c,73150,b+84|0,b+24|0,b+80|0);if(q[b+88>>2]!=q[b+80>>2]){c=Kj(e,74299,0);break a}c=0;o[b+24|0]=0;b:{c:{switch(d|0){case 0:q[b+36>>2]=0;q[b+28>>2]=1065353216;q[b+32>>2]=0;break b;case 1:q[b+28>>2]=0;break b;case 2:o[b+49|0]=0;o[b+50|0]=0;o[b+51|0]=0;o[b+52|0]=0;o[b+53|0]=0;o[b+54|0]=0;o[b+55|0]=0;o[b+56|0]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;o[b+57|0]=0;break b;case 3:q[b+68>>2]=0;q[b+72>>2]=0;q[b+36>>2]=1065353216;q[b+40>>2]=0;q[b+44>>2]=0;o[b+45|0]=0;o[b+46|0]=0;o[b+47|0]=0;o[b+48|0]=0;o[b+49|0]=0;o[b+50|0]=0;o[b+51|0]=0;o[b+52|0]=0;q[b+56>>2]=0;q[b+60>>2]=0;o[b- -64|0]=0;break b;case 4:break c;default:break b}}q[b+36>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0}TK(a,d,7,b+24|0);a=oma(q[b+88>>2],q[b+92>>2],f,g,q[b+84>>2],d);if(!a){break a}q[b+20>>2]=a;q[b+16>>2]=q[(a<<2)+232752>>2];c=Kj(e,74379,b+16|0)}mj(e);Ii=b+160|0;return c|0}function AF(a,b,c,d){var e=0,f=0,g=0;f=Ii-16|0;Ii=f;g=Mj(a,d);a:{b:{c:{switch(q[b+1324>>2]){case 0:Oza(+g);e=Lza(1)|0;Lza(0)|0;if((e&2146435072)!=2146435072){break b}if(!q[b+1332>>2]){Im(c)}d=Vi(a,d);e=140583;d:{if((d|0)==-1){break d}e=q[(d<<2)+256832>>2]}q[f+4>>2]=139291;q[f>>2]=e;Qi(a,139522,f);break b;case 1:Oza(+g);d=Lza(1)|0;a=Lza(0)|0;d=d&2147483647;e=d;if((d|0)==2146435072&a>>>0>=1|d>>>0>2146435072){a=c+8|0;b=q[a>>2];if((q[c+4>>2]+(b^-1)|0)<=2){Vk(c,b+3|0);b=q[c+8>>2]}b=q[c>>2]+b|0;c=r[139319]|r[139320]<<8;o[b|0]=c;o[b+1|0]=c>>>8;o[b+2|0]=r[139321];b=3;break a}if(a|(e|0)!=2146435072){break b}a=c+8|0;b=q[a>>2];d=q[c+4>>2]+(b^-1)|0;if(!(g<0^1)){if((d|0)<=8){Vk(c,b+9|0);b=q[c+8>>2]}b=q[c>>2]+b|0;c=r[139327]|r[139328]<<8|(r[139329]<<16|r[139330]<<24);d=r[139323]|r[139324]<<8|(r[139325]<<16|r[139326]<<24);o[b|0]=d;o[b+1|0]=d>>>8;o[b+2|0]=d>>>16;o[b+3|0]=d>>>24;o[b+4|0]=c;o[b+5|0]=c>>>8;o[b+6|0]=c>>>16;o[b+7|0]=c>>>24;o[b+8|0]=r[139331];b=9;break a}if((d|0)<=7){Vk(c,b+8|0);b=q[c+8>>2]}b=q[c>>2]+b|0;o[b|0]=73;o[b+1|0]=110;o[b+2|0]=102;o[b+3|0]=105;o[b+4|0]=110;o[b+5|0]=105;o[b+6|0]=116;o[b+7|0]=121;b=8;break a;default:break c}}Oza(+g);a=Lza(1)|0;Lza(0)|0;if((a&2146435072)!=2146435072){break b}b=4;a=c+8|0;d=q[a>>2];if((q[c+4>>2]+(d^-1)|0)<=3){Vk(c,d+4|0);d=q[c+8>>2]}c=q[c>>2]+d|0;o[c|0]=110;o[c+1|0]=117;o[c+2|0]=108;o[c+3|0]=108;break a}a=c+8|0;d=q[a>>2];if((q[c+4>>2]+(d^-1)|0)<=31){Vk(c,d+32|0);d=q[c+8>>2]}b=T$(q[c>>2]+d|0,g,q[b+1328>>2])}q[a>>2]=q[a>>2]+b;Ii=f+16|0}function tL(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,s=0,u=0;d=q[a+156>>2];j=q[d+4>>2];e=q[j+8>>2];c=w(w(e,q[d+28>>2]),q[d+32>>2]&2147483647);b=q[a+100>>2];if(b){Ni(b)}b=c+c|0;b=$i(b>>>0>>0?-1:b);q[a+100>>2]=b;Ui(b,255,c<<1);b=q[a+104>>2];if(b){Ni(b)}b=$i(c);q[a+104>>2]=b;Ui(b,0,c);a:{b:{c:{d:{if(!(o[a+136|0]&1)){c=q[d+32>>2];l=q[d+28>>2];m=q[d+40>>2];n=q[d+36>>2];Wi(e,1,a+124|0,a+132|0,a+128|0);b=q[a+124>>2];if(q[a+132>>2]-b>>>0>=e>>>0){q[a+128>>2]=b+e;if(!e){break d}s=c&2147483647;c=0;while(1){e:{if(t[j+8>>2]>c>>>0){b=q[a+124>>2];if(q[a+128>>2]-b>>>0<=c>>>0){break c}b=b+c|0;i=q[j+4>>2]+(c<<5)|0;o[b|0]=r[b|0]&254|o[i+8|0]&1;k=q[i+28>>2];if(!k){break e}u=w(c,s)-m|0;g=0;while(1){f=q[i+24>>2]+w(g,24)|0;b=w(q[f+4>>2]+u|0,l)+(q[f>>2]-n|0)|0;p[q[a+100>>2]+(b<<1)>>1]=q[f+8>>2];h=b+q[a+104>>2]|0;b=r[h|0]&-8;o[h|0]=b;if(q[f+12>>2]){b=b|1;o[h|0]=b}if(q[f+16>>2]){b=b|2;o[h|0]=b}if(q[f+20>>2]){o[h|0]=b|4}g=g+1|0;if((k|0)==(g|0)){break e}if(t[i+28>>2]>g>>>0){continue}break}J(55680,55692,164,55717);G()}J(55680,55692,189,55717);G()}c=c+1|0;if((e|0)!=(c|0)){continue}break}break d}break b}break a}c=q[d+28>>2]+31>>>5|0;p[a+160>>1]=c;d=q[d+32>>2]+31>>>5|0;p[a+162>>1]=d;f:{if(!(o[a+120|0]&1)){d=w(d&65535,c&65535);Wi(d,1,a+108|0,a+116|0,a+112|0);c=q[a+108>>2];if(d>>>0>q[a+116>>2]-c>>>0){break b}q[a+112>>2]=c+d;if(!d){break f}Ui(c,255,d);p[a+164>>1]=QK(a);return e}break a}}J(55728,55585,479,55717);G()}J(55653,55585,506,55672);G()}J(55510,55585,493,55641);G()}function GP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=x(0),i=x(0),j=0,k=0,l=x(0),m=x(0),n=x(0),p=0,s=0,t=x(0),v=0,w=0,z=0,B=0,E=x(0),F=x(0);j=q[b+48>>2];p=q[b+52>>2];g=u[b+40>>2];w=q[b+4>>2];s=w+q[b+44>>2]|0;o[s|0]=r[s-1|0];n=u[b+32>>2];i=u[b+28>>2];k=q[a+4>>2];v=q[a>>2];h=u[b+20>>2];l=u[b+16>>2];g=x(g*x(+(Bza(c<<31,c>>>1|0,d)>>>0)+ +(Li>>>0)*4294967296));a:{if(g=x(0)){c=~~g>>>0;s=x(y(g))>=x(1)?g>x(0)?~~x(A(x(C(x(g*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(g-x(~~g>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;break a}c=0;s=0}b:{c:{d:{if(!f){q[b+48>>2]=j;q[b+52>>2]=p;a=q[b+44>>2];d=0;break d}E=x(x(1)/x(f>>>0));t=i;g=x(n-i);i=x(k>>>0);n=x(g/i);m=x(v>>>0);g=x(t+x(n*m));n=x(x(n+g)-g);t=l;l=x(x(h-l)/i);i=x(t+x(l*m));l=x(x(l+i)-i);d=0;a=0;while(1){z=d;d=d+w|0;k=r[d|0];d=r[d+1|0];h=x(E*x(a|0));m=x(+x(g+x(n*h))*1.5707963267948966);t=Nl(m);v=a<<3;B=v+e|0;F=x(i+x(l*h));h=x(x(+(j>>>0)+ +(p>>>0)*4294967296)*x(4.656612873077393e-10));h=x(F*x(x(x(x(1)-h)*x((-128-k&255)>>>0))+x(h*x((-128-d&255)>>>0))));u[B>>2]=u[B>>2]+x(t*h);m=Lk(m);d=(v|4)+e|0;u[d>>2]=u[d>>2]+x(m*h);d=j;j=c;k=d+j|0;d=p+s|0;d=k>>>0>>0?d+1|0:d;j=k&2147483647;p=0;d=((d&2147483647)<<1|k>>>31)+z|0;a=a+1|0;if((f|0)!=(a|0)){continue}break}q[b+48>>2]=j;q[b+52>>2]=p;a=q[b+44>>2];if(z>>>0>a>>>0){break c}if(a>>>0>>0){break b}}c=q[b+4>>2];bl(c,c+d|0,a-d|0);q[b+44>>2]=q[b+44>>2]-d;return}J(211098,210166,923,211135);G()}J(211153,210166,926,211135);G()}function u4(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0);g=Ii-96|0;Ii=g;b=_i(a,1,q[210436],0);l=u[b>>2];m=u[b+4>>2];a:{if(!(l!=l|m!=m)){k=u[b+8>>2];if(k==k){break a}}k=u[b+8>>2];v[g+80>>3]=m;v[g+88>>3]=k;v[g+72>>3]=l;q[g+64>>2]=1;Qi(a,134131,g- -64|0);k=u[b+8>>2];m=u[b+4>>2];l=u[b>>2]}b=_i(a,2,q[210436],0);e=u[b>>2];i=u[b+4>>2];b:{if(!(e!=e|i!=i)){f=u[b+8>>2];if(f==f){break b}}c=u[b+8>>2];v[g+48>>3]=i;v[g+56>>3]=c;v[g+40>>3]=e;q[g+32>>2]=2;Qi(a,134131,g+32|0);f=u[b+8>>2];i=u[b+4>>2];e=u[b>>2]}b=_i(a,3,q[210436],0);c=u[b>>2];d=u[b+4>>2];c:{if(!(c!=c|d!=d)){h=u[b+8>>2];if(h==h){break c}}h=u[b+8>>2];v[g+16>>3]=d;v[g+24>>3]=h;v[g+8>>3]=c;q[g>>2]=3;Qi(a,134131,g);h=u[b+8>>2];d=u[b+4>>2];c=u[b>>2]}b=yj(a,64);q[b+60>>2]=1065353216;q[b+44>>2]=0;q[b+28>>2]=0;q[b+12>>2]=0;j=x(l-e);i=x(m-i);e=x(k-f);f=x(x(1)/x(F(x(x(x(j*j)+x(i*i))+x(e*e)))));e=x(e*f);u[b+40>>2]=e;i=x(i*f);u[b+24>>2]=i;f=x(j*f);u[b+8>>2]=f;u[b+56>>2]=-x(x(l*f)+x(x(m*i)+x(k*e)));n=c;c=x(x(1)/x(F(x(x(x(c*c)+x(d*d))+x(h*h)))));j=x(n*c);o=x(d*c);d=x(x(i*j)-x(f*o));n=d;p=x(d*d);c=x(h*c);h=x(x(e*o)-x(i*c));d=x(x(f*c)-x(e*j));j=x(x(1)/x(F(x(p+x(x(h*h)+x(d*d))))));c=x(n*j);u[b+32>>2]=c;d=x(d*j);u[b+16>>2]=d;h=x(h*j);u[b>>2]=h;j=x(x(f*d)-x(i*h));u[b+36>>2]=j;f=x(x(e*h)-x(f*c));u[b+20>>2]=f;e=x(x(i*c)-x(e*d));u[b+4>>2]=e;u[b+48>>2]=-x(x(l*h)+x(x(m*d)+x(k*c)));u[b+52>>2]=-x(x(l*e)+x(x(m*f)+x(k*j)));Zi(a,-1e4,134048);xj(a,-2);Ii=g+96|0;return 1}function u9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=q[a>>2];c=(q[a+4>>2]-d|0)/240|0;a:{b:{c:{d:{g=q[a+16>>2];if(q[a+20>>2]-g>>3>>>0>b>>>0){h=c-1|0;e=q[a+32>>2];if(h>>>0>=q[a+36>>2]-e>>2>>>0){break a}f=(b<<3)+g|0;i=q[f>>2];if(c>>>0<=i>>>0){break d}c=q[(h<<2)+e>>2];Ui(d+w(i,240)|0,0,240);d=q[a+16>>2];if(c>>>0>=q[a+20>>2]-d>>3>>>0){break a}q[d+(c<<3)>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];d=q[a+4>>2];c=q[a>>2];if(e>>>0>=(d-c|0)/240>>>0){break c}c=c+w(e,240)|0;d=d-240|0;q[c>>2]=q[d>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];u[c+64>>2]=u[d+64>>2];u[c+68>>2]=u[d+68>>2];u[c+72>>2]=u[d+72>>2];u[c+80>>2]=u[d+80>>2];u[c+84>>2]=u[d+84>>2];u[c+88>>2]=u[d+88>>2];u[c+92>>2]=u[d+92>>2];u[c+96>>2]=u[d+96>>2];u[c+100>>2]=u[d+100>>2];u[c+104>>2]=u[d+104>>2];u[c+108>>2]=u[d+108>>2];u[c+112>>2]=u[d+112>>2];u[c+116>>2]=u[d+116>>2];u[c+120>>2]=u[d+120>>2];u[c+124>>2]=u[d+124>>2];u[c+128>>2]=u[d+128>>2];u[c+132>>2]=u[d+132>>2];u[c+136>>2]=u[d+136>>2];u[c+140>>2]=u[d+140>>2];Ti(c+144|0,d+144|0,92);c=q[a+4>>2]-240|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(54267,54178,152,54288);G()}J(54293,53631,513,54308);G()}J(54318,53631,516,54308);G()}J(53716,53631,479,53341);G()}function xoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-976|0;Ii=g;b=q[q[a+12>>2]>>2];a:{if(o[b+22|0]&1){k=q[b+8>>2];c=iM(g+16|0);d=q[a+4>>2];b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;u[c+8>>2]=u[d+8>>2];b=s[c+956>>1]&-65|s[d+956>>1]&64;p[c+956>>1]=b;b=b&-129|s[d+956>>1]&128;p[c+956>>1]=b;b=b&-257|s[d+956>>1]&256;p[c+956>>1]=b;b=b&-513|s[d+956>>1]&512;p[c+956>>1]=b;u[c+12>>2]=u[d+12>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+28>>2]=u[d+28>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];q[c+804>>2]=q[d+804>>2];b=p[d+956>>1]&1|b&-2;p[c+956>>1]=b;b=b&-3|s[d+956>>1]&2;p[c+956>>1]=b;b=b&-5|s[d+956>>1]&4;p[c+956>>1]=b;b=b&-9|s[d+956>>1]&8;p[c+956>>1]=b;Ti(c+812|0,d+812|0,144);b=s[d+956>>1]&16|b&-17;p[c+956>>1]=b;u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];p[c+956>>1]=s[d+956>>1]&1024|b&64511;q[c+808>>2]=q[d+808>>2];h=q[d+540>>2];q[c+540>>2]=h;if((h|0)>0){while(1){b=w(i,44);e=b+c|0;b=b+d|0;q[e+96>>2]=q[b+96>>2];f=q[b+92>>2];q[e+88>>2]=q[b+88>>2];q[e+92>>2]=f;f=q[b+84>>2];q[e+80>>2]=q[b+80>>2];q[e+84>>2]=f;f=q[b+76>>2];q[e+72>>2]=q[b+72>>2];q[e+76>>2]=f;j=b- -64|0;l=q[j+4>>2];f=e- -64|0;q[f>>2]=q[j>>2];q[f+4>>2]=l;f=q[b+60>>2];q[e+56>>2]=q[b+56>>2];q[e+60>>2]=f;i=i+1|0;if((h|0)!=(i|0)){continue}break}}q[c+800>>2]=Pj(c+544|0,d+544|0,256);p[c+956>>1]=s[c+956>>1]&65503|s[q[a+4>>2]+956>>1]&32;b=Dea(k,c,g+15|0);a=b?-1e3:1;if(r[g+15|0]|b){break a}}a=0}Ii=g+976|0;return a|0}function m$(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a:{f=853608;g=q[213408];b:{if(g){f=0;e=853608;if(q[213409]==(a|0)){break b}}c:{if(!q[213416]){e=853640;break c}e=0;if(q[213417]!=(a|0)){break c}e=853640;break b}d:{if(!q[213424]){h=853672;break d}if(q[213425]!=(a|0)){break d}e=853672;break b}e:{if(!q[213432]){i=853704;break e}if(q[213433]!=(a|0)){break e}e=853704;break b}f:{if(!q[213440]){j=853736;break f}if(q[213441]!=(a|0)){break f}e=853736;break b}g:{if(!q[213448]){k=853768;break g}if(q[213449]!=(a|0)){break g}e=853768;break b}h:{if(!q[213456]){l=853800;break h}if(q[213457]!=(a|0)){break h}e=853800;break b}i:{if(!q[213464]){m=853832;break i}if(q[213465]!=(a|0)){break i}e=853832;break b}j:{if(!q[213472]){n=853864;break j}if(q[213473]!=(a|0)){break j}e=853864;break b}k:{if(!q[213480]){o=853896;break k}if(q[213481]!=(a|0)){break k}e=853896;break b}l:{if(!q[213488]){p=853928;break l}if(q[213489]!=(a|0)){break l}e=853928;break b}e=g?e:f;e=e?e:h;e=e?e:i;e=e?e:j;e=e?e:k;e=e?e:l;e=e?e:m;e=e?e:n;e=e?e:o;e=e?e:p;if(!e){break a}q[e+24>>2]=e}f=q[e+4>>2];if(!d){if((f|0)!=6){break a}q[e+28>>2]=a;q[e+4>>2]=0;q[e+16>>2]=0;q[e+20>>2]=0;q[e+12>>2]=c;q[e+8>>2]=b;return}if((f|0)==6){q[e+24>>2]=0;return}if((f|0)==5){break a}a=(d|0)==4?3:d;g=(a|0)!=1;if((f|0)==3?!g:0){break a}h=q[e+12>>2];q[e+12>>2]=c;i=q[e+8>>2];q[e+8>>2]=b;q[e+16>>2]=b-i;q[e+20>>2]=c-h;if(f?0:!g){break a}if(!(f|(a|0)!=3)){q[e+4>>2]=5;return}q[e+4>>2]=d}}function Lpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=x(0),f=0,g=0;c=Ii-208|0;Ii=c;d=q[q[a+24>>2]>>2];f=q[a+16>>2];a=q[a+20>>2];a:{b:{if((f|0)==q[73050]&(a|0)==q[73051]){e=u[d+12>>2];a=c+136|0;q[a>>2]=0;v[a+8>>3]=e;break b}if(q[73052]==(f|0)&q[73053]==(a|0)){e=u[d+16>>2];a=c+136|0;q[a>>2]=0;v[a+8>>3]=e;break b}if(q[73054]==(f|0)&q[73055]==(a|0)){e=u[d+20>>2];a=c+136|0;q[a>>2]=0;v[a+8>>3]=e;break b}if(q[73056]==(f|0)&q[73057]==(a|0)){e=u[d+24>>2];a=c+136|0;q[a>>2]=0;v[a+8>>3]=e;break b}if(q[73058]==(f|0)&q[73059]==(a|0)){u[c+64>>2]=u[d+96>>2];u[c+68>>2]=u[d+100>>2];u[c+72>>2]=u[d+104>>2];u[c+76>>2]=u[d+108>>2];u[c+80>>2]=u[d+112>>2];u[c+84>>2]=u[d+116>>2];u[c+88>>2]=u[d+120>>2];u[c+92>>2]=u[d+124>>2];u[c+96>>2]=u[d+128>>2];u[c+100>>2]=u[d+132>>2];u[c+104>>2]=u[d+136>>2];u[c+108>>2]=u[d+140>>2];u[c+112>>2]=u[d+144>>2];u[c+116>>2]=u[d+148>>2];u[c+120>>2]=u[d+152>>2];u[c+124>>2]=u[d+156>>2];uw(c+136|0,c- -64|0);break b}if(q[73060]==(f|0)&q[73061]==(a|0)){u[c>>2]=u[d+32>>2];u[c+4>>2]=u[d+36>>2];u[c+8>>2]=u[d+40>>2];u[c+12>>2]=u[d+44>>2];u[c+16>>2]=u[d+48>>2];u[c+20>>2]=u[d+52>>2];u[c+24>>2]=u[d+56>>2];u[c+28>>2]=u[d+60>>2];u[c+32>>2]=u[d- -64>>2];u[c+36>>2]=u[d+68>>2];u[c+40>>2]=u[d+72>>2];u[c+44>>2]=u[d+76>>2];u[c+48>>2]=u[d+80>>2];u[c+52>>2]=u[d+84>>2];u[c+56>>2]=u[d+88>>2];u[c+60>>2]=u[d+92>>2];uw(c+136|0,c);break b}g=-1;if((f|0)!=q[73062]|(a|0)!=q[73063]){break a}e=u[d+8>>2];a=c+136|0;q[a>>2]=0;v[a+8>>3]=e}Ti(b+32|0,c+136|0,72);g=0}a=g;Ii=c+208|0;return a|0}function wK(a,b,c,d,e,f,g,h,i,j,k,l){var m=0,n=0,o=0,p=x(0),t=0,v=0;m=Ii-160|0;Ii=m;a:{n=b&65535;o=q[a+32>>2];if(n>>>0<(q[a+36>>2]-o|0)/592>>>0){if(s[(o+w(n,592)|0)+568>>1]!=(b>>>16|0)){break a}t=Yv(c,d);b:{if(t){o=(o+w(n,592)|0)+(q[t+8>>2]<<4)|0;c=r[t+12|0];if((c|0)==255){p=u[e>>2];c=q[f>>2];d=q[f+4>>2];n=q[f+12>>2];v=q[f+16>>2];t=v;q[m+144>>2]=0;q[m+148>>2]=n;q[m+152>>2]=t;v=q[m+148>>2];q[m+96>>2]=q[m+144>>2];q[m+100>>2]=v;q[m+104>>2]=q[m+152>>2];q[m+136>>2]=c;q[m+140>>2]=d;q[m+88>>2]=c;q[m+92>>2]=d;Dr(a,b,o,p,m+88|0,g,h,i,x(1),0,0,0);p=u[e+4>>2];q[m+144>>2]=0;q[m+148>>2]=n;q[m+152>>2]=t;v=q[m+148>>2];q[m+72>>2]=q[m+144>>2];q[m+76>>2]=v;q[m+80>>2]=q[m+152>>2];q[m+136>>2]=c;q[m+140>>2]=d;q[m+64>>2]=c;q[m+68>>2]=d;Dr(a,b,o+4|0,p,m- -64|0,g,h,i,x(1),0,0,0);p=u[e+8>>2];q[m+144>>2]=0;q[m+148>>2]=n;q[m+152>>2]=t;n=q[m+148>>2];q[m+48>>2]=q[m+144>>2];q[m+52>>2]=n;q[m+56>>2]=q[m+152>>2];q[m+136>>2]=c;q[m+140>>2]=d;q[m+40>>2]=c;q[m+44>>2]=d;Dr(a,b,o+8|0,p,m+40|0,g,h,i,x(1),0,0,0);p=u[e+12>>2];q[m+32>>2]=q[f+16>>2];c=q[f+12>>2];q[m+24>>2]=q[f+8>>2];q[m+28>>2]=c;c=q[f+4>>2];q[m+16>>2]=q[f>>2];q[m+20>>2]=c;Dr(a,b,o+12|0,p,m+16|0,g,h,i,x(1),j,k,l);break b}c=c<<2;p=u[c+e>>2];q[m+128>>2]=q[f+16>>2];d=q[f+12>>2];q[m+120>>2]=q[f+8>>2];q[m+124>>2]=d;d=q[f+4>>2];q[m+112>>2]=q[f>>2];q[m+116>>2]=d;Dr(a,b,c+o|0,p,m+112|0,g,h,i,x(1),j,k,l);break b}q[m>>2]=aj(c,d);Pi(4,199633,200814,m)}Ii=m+160|0;return}J(201665,201514,479,201676);G()}J(199518,199542,3624,200798);G()}function GW(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-32|0;Ii=g;a:{if(!a){d=-5248;break a}d=-4224;e=an(b,174128);if(!e){break a}f=an(b,174156);if(f>>>0<=e>>>0){break a}j=1;e=hj(174128)+e|0;h=r[e|0]==32;i=h?e+1|0:e;e=r[e+h|0]==13?i+1|0:i;if(r[e|0]!=10){break a}d=hj(174156)+f|0;h=r[d|0]==32;i=c;c=h?d+1|0:d;c=r[d+h|0]==13?c+1|0:c;q[i>>2]=(r[c|0]==10?c+1|0:c)-b;b=e+1|0;b:{if((f-b|0)<22){break b}if(Ej(b,163216,22)){break b}d=-4352;b=r[e+23|0]==13;if(r[e+(b?24:23)|0]!=10){break a}c=1;e=b?e+24|0:e+23|0;b=e+1|0;d=f-b|0;c:{d:{e:{if((d|0)>=23){if(Ej(b,163239,23)){break e}d=-4608;b=e+24|0;if((f-b|0)<16){break a}if(ay(b,g,8)){break a}b=e+40|0;break d}if((d|0)<18){break c}}if(Ej(b,163263,18)){break c}d=-4608;b=e+19|0;if((f-b|0)<16){break a}if(ay(b,g,8)){break a}b=e+35|0}c=0}f:{g:{e=f-b|0;if((e|0)<14){break g}if(Ej(b,163282,14)){break g}d=-4736;if((e|0)<22){break a}h:{if(!Ej(b,163297,22)){break h}if(!Ej(b,163320,22)){break h}if(Ej(b,163343,22)){break a}}d=-4608;c=b+22|0;if((f-c|0)<32){break a}if(ay(c,g,16)){break a}b=b+54|0;break f}d=-4736;if(c){break a}}d=-4352;b=r[b|0]==13?b+1|0:b;if(r[b|0]!=10){break a}b=b+1|0;j=0}d=-4352;if(b>>>0>=f>>>0){break a}d=-4396;f=f-b|0;if((RE(0,0,g+28|0,b,f)|0)==-44){break a}d=q[g+28>>2];c=bk(1,d);if(!c){d=-4480;break a}b=RE(c,d,g+28|0,b,f);if(b){Mi[q[65677]](c,0,q[g+28>>2])|0;Ni(c);d=b-4352|0;break a}i:{if(j){b=q[g+28>>2];break i}Mi[q[65677]](c,0,q[g+28>>2])|0;Ni(c);d=-4864;break a}q[a+4>>2]=b;q[a>>2]=c;d=0}Ii=g+32|0;return d}function k7(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii-48|0;Ii=d;Ui(q[a+20>>2],255,q[a+24>>2]<<2);q[a+40>>2]=-1;q[a+44>>2]=0;q[a+32>>2]=q[a+28>>2];f=a+20|0;c=q[b+4>>2]-q[b>>2]>>6;EA(f,w(c,3)>>>1|0,c);e=q[b>>2];if((e|0)!=q[b+4>>2]){c=0;while(1){e=(c<<6)+e|0;FA(f,q[e>>2],e);c=c+1|0;e=q[b>>2];if(c>>>0>2]-e>>6>>>0){continue}break}}c=q[a+104>>2];if(c){Ni(c);Ni(q[a+108>>2]);Ni(q[a+136>>2])}u[a+52>>2]=u[b+16>>2];u[a+56>>2]=u[b+20>>2];u[a+60>>2]=u[b+24>>2];u[a+64>>2]=u[b+28>>2];u[a+68>>2]=u[b+32>>2];u[a+72>>2]=u[b+36>>2];u[a+76>>2]=u[b+40>>2];u[a+80>>2]=u[b+44>>2];u[a+84>>2]=u[b+48>>2];u[a+88>>2]=u[b+52>>2];u[a+92>>2]=u[b+56>>2];o[a+153|0]=r[b+89|0];e=q[b+60>>2];q[a+96>>2]=e;f=q[b+64>>2];q[a+100>>2]=f;q[a+104>>2]=q[b+72>>2];c=q[b+76>>2];q[a+140>>2]=c;g=q[b+80>>2];q[a+144>>2]=g;q[a+148>>2]=q[b+84>>2];h=r[b+88|0];i=(f>>>0)/(g>>>0)|0;q[a+132>>2]=i;j=(e>>>0)/(c>>>0)|0;q[a+128>>2]=j;o[a+152|0]=h;q[a+136>>2]=Yi(w(c,g)<<2);c=0;a:{b:{c:{d:{e:{b=r[b+68|0];switch(b-1|0){case 0:break b;case 2:break c;case 3:break e;default:break d}}c=3;break b}Pi(4,112261,112268,0);Ni(aA(a));break a}c=2}q[a+116>>2]=c;g=w(i,j)<<2;h=Yi(g);q[a+108>>2]=h;Ui(h,0,g);q[d+36>>2]=0;q[d+40>>2]=0;o[d+43|0]=0;o[d+44|0]=0;o[d+45|0]=0;o[d+46|0]=0;q[d+20>>2]=1;q[d+24>>2]=1;q[d+12>>2]=5;q[d+16>>2]=2;q[d+28>>2]=0;q[d+32>>2]=0;q[d+8>>2]=c;p[d+40>>1]=e;p[d+42>>1]=f;b=w(b,w(f&65535,e&65535));c=Yi(b);q[d+4>>2]=b;q[d>>2]=c;Ui(c,0,b);Mi[q[75010]](q[a+8>>2],q[a+12>>2],d);Ni(q[d>>2])}Ii=d+48|0}function Rwa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;h=Ii-16|0;Ii=h;g=h+8|0;a:{if((r[a+3|0]&2)>>>1|0){f=Twa(a);if(c){Kwa(g,f,Qwa(a));break a}Lwa(g,f);break a}Mwa(h,Uwa(a,c));q[g>>2]=q[h>>2]}i=(Pwa(a,c)<<4)+105744|0;d=q[i>>2];c=0;f=d+r[h+8|0]|0;b:{c:{if(f>>>0<256){c=f;break c}a=255;if((f|0)>=0){break b}}a=c}f=a;a=0;e=d+r[g+1|0]|0;d:{e:{if(e>>>0<256){a=e;break e}c=255;if((e|0)>=0){break d}}c=a}a=0;d=d+r[g+2|0]|0;f:{g:{if(d>>>0<256){a=d;break g}e=255;if((d|0)>=0){break f}}e=a}o[b+3|0]=255;o[b+2|0]=e;o[b+1|0]=c;o[b|0]=f;a=0;d=q[i+4>>2];f=d+r[h+8|0]|0;h:{i:{if(f>>>0<256){a=f;break i}c=255;if((f|0)>=0){break h}}c=a}f=c;a=0;e=d+r[g+1|0]|0;j:{k:{if(e>>>0<256){a=e;break k}c=255;if((e|0)>=0){break j}}c=a}a=0;d=d+r[g+2|0]|0;l:{m:{if(d>>>0<256){a=d;break m}e=255;if((d|0)>=0){break l}}e=a}o[b+7|0]=255;o[b+6|0]=e;o[b+5|0]=c;o[b+4|0]=f;a=0;d=q[i+8>>2];f=d+r[h+8|0]|0;n:{o:{if(f>>>0<256){a=f;break o}c=255;if((f|0)>=0){break n}}c=a}f=c;a=0;e=d+r[g+1|0]|0;p:{q:{if(e>>>0<256){a=e;break q}c=255;if((e|0)>=0){break p}}c=a}a=0;d=d+r[g+2|0]|0;r:{s:{if(d>>>0<256){a=d;break s}e=255;if((d|0)>=0){break r}}e=a}o[b+11|0]=255;o[b+10|0]=e;o[b+9|0]=c;o[b+8|0]=f;a=0;d=q[i+12>>2];f=d+r[h+8|0]|0;t:{u:{if(f>>>0<256){a=f;break u}c=255;if((f|0)>=0){break t}}c=a}f=c;a=0;e=d+r[g+1|0]|0;v:{w:{if(e>>>0<256){a=e;break w}c=255;if((e|0)>=0){break v}}c=a}a=0;d=d+r[g+2|0]|0;x:{y:{if(d>>>0<256){a=d;break y}e=255;if((d|0)>=0){break x}}e=a}o[b+15|0]=255;o[b+14|0]=e;o[b+13|0]=c;o[b+12|0]=f;Ii=h+16|0}function Dq(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,s=0,t=0,u=0,v=0;d=a&65535;e=a>>>16|0;if((c|0)==1){a=r[b|0]+d|0;a=a>>>0>65520?a-65521|0:a;b=a+e|0;c=b<<16;return(b>>>0>65520?c+983040|0:c)|a}if(b){if(c>>>0>=16){a:{b:{c:{if(c>>>0>5551){while(1){c=c-5552|0;f=347;a=b;while(1){g=r[a|0]+d|0;h=g+r[a+1|0]|0;i=h+r[a+2|0]|0;j=i+r[a+3|0]|0;k=j+r[a+4|0]|0;l=k+r[a+5|0]|0;m=l+r[a+6|0]|0;n=m+r[a+7|0]|0;o=n+r[a+8|0]|0;p=o+r[a+9|0]|0;q=p+r[a+10|0]|0;s=q+r[a+11|0]|0;t=s+r[a+12|0]|0;u=t+r[a+13|0]|0;v=u+r[a+14|0]|0;d=v+r[a+15|0]|0;e=d+(v+(u+(t+(s+(q+(p+(o+(n+(m+(l+(k+(j+(i+(h+(e+g|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0;a=a+16|0;f=f-1|0;if(f){continue}break}e=(e>>>0)%65521|0;d=(d>>>0)%65521|0;b=b+5552|0;if(c>>>0>5551){continue}break}if(!c){break a}if(c>>>0<16){break c}}while(1){a=r[b|0]+d|0;f=a+r[b+1|0]|0;g=f+r[b+2|0]|0;h=g+r[b+3|0]|0;i=h+r[b+4|0]|0;j=i+r[b+5|0]|0;k=j+r[b+6|0]|0;l=k+r[b+7|0]|0;m=l+r[b+8|0]|0;n=m+r[b+9|0]|0;o=n+r[b+10|0]|0;p=o+r[b+11|0]|0;q=p+r[b+12|0]|0;s=q+r[b+13|0]|0;t=s+r[b+14|0]|0;d=t+r[b+15|0]|0;e=d+(t+(s+(q+(p+(o+(n+(m+(l+(k+(j+(i+(h+(g+(f+(a+e|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0)|0;b=b+16|0;c=c-16|0;if(c>>>0>15){continue}break}if(!c){break b}}while(1){d=r[b|0]+d|0;e=e+d|0;b=b+1|0;c=c-1|0;if(c){continue}break}}e=(e>>>0)%65521|0;d=(d>>>0)%65521|0}return e<<16|d}if(c){while(1){d=r[b|0]+d|0;e=e+d|0;b=b+1|0;c=c-1|0;if(c){continue}break}}a=(e>>>0)%65521<<16|(d>>>0>65520?d-65521|0:d)}else{a=1}return a}function nM(a,b,c,d,e){var f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),t=0,v=0,y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0);a:{if(!(!e|(c|0)==32767)){v=q[a>>2];while(1){c=c&65535;f=q[v+1036>>2];if(c>>>0>=q[v+1040>>2]-f>>2>>>0){break a}b:{f=q[f+(c<<2)>>2];if(!(q[f+136>>2]&1024)){break b}c=w(t,48)+d|0;g=u[c>>2];u[f>>2]=g;h=u[c+4>>2];u[f+4>>2]=h;i=u[c+8>>2];u[f+8>>2]=i;n=u[c+12>>2];u[f+12>>2]=n;y=u[c+16>>2];u[f+16>>2]=y;z=u[c+20>>2];u[f+20>>2]=z;A=u[c+24>>2];u[f+24>>2]=A;B=u[c+32>>2];u[f+32>>2]=B;C=u[c+36>>2];u[f+36>>2]=C;r=u[c+40>>2];u[f+40>>2]=r;c=t+1|0;if(!(t|!b)){D=u[b+16>>2];E=u[b+20>>2];F=u[b+24>>2];j=u[b+8>>2];k=u[b+4>>2];l=u[b+12>>2];m=u[b>>2];o=u[b+32>>2];p=u[b+36>>2];H=r;r=u[b+40>>2];u[f+40>>2]=H*r;u[f+36>>2]=C*p;u[f+32>>2]=B*o;u[f+12>>2]=x(x(x(n*l)-x(g*m))-x(h*k))-x(i*j);u[f+8>>2]=x(x(h*m)+x(x(n*j)+x(i*l)))-x(g*k);u[f+4>>2]=x(x(g*j)+x(x(n*k)+x(h*l)))-x(i*m);u[f>>2]=x(x(i*k)+x(x(n*m)+x(g*l)))-x(h*j);g=x(y*o);h=x(z*p);i=x(A*r);n=x(x(x(j*g)+x(l*h))-x(m*i));o=x(x(j*i)+x(x(m*g)+x(k*h)));p=x(x(x(m*h)+x(l*i))-x(k*g));g=x(x(x(l*g)+x(k*i))-x(j*h));u[f+24>>2]=F+x(x(m*n)+x(x(x(j*o)+x(l*p))-x(k*g)));u[f+20>>2]=E+x(x(j*g)+x(x(x(l*n)+x(k*o))-x(m*p)));u[f+16>>2]=D+x(x(k*p)+x(x(x(m*o)+x(l*g))-x(j*n)))}if(c>>>0>>0){c=nM(a,0,s[f+150>>1]&32767,w(c,48)+d|0,e-c|0)+c|0}t=c;if((c|0)!=(e|0)){break b}return e}c=q[f+148>>2]&32767;if((c|0)!=32767){continue}break}}return t}J(12419,9962,479,9454);G()}function FP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=0,i=0,j=x(0),k=x(0),l=0,m=0,n=x(0),o=0,r=0,t=0,v=x(0),w=x(0),z=0,B=x(0),E=x(0),F=x(0),H=x(0),I=0,K=0,L=0;i=b;r=q[i+48>>2];t=q[i+52>>2];g=u[i+40>>2];m=q[i+4>>2];z=q[i+44>>2];l=z<<2;h=m+l|0;p[h>>1]=s[h-4>>1];p[(l|2)+m>>1]=s[h-2>>1];j=u[i+32>>2];k=u[i+28>>2];h=q[a+4>>2];l=q[a>>2];v=u[i+20>>2];w=u[i+16>>2];g=x(g*x(+(Bza(c<<31,c>>>1|0,d)>>>0)+ +(Li>>>0)*4294967296));a:{if(g=x(0)){i=x(y(g))>=x(1)?g>x(0)?~~x(A(x(C(x(g*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(g-x(~~g>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;d=~~g>>>0;break a}i=0;d=0}b:{if(!f){c=0;break b}F=x(x(1)/x(f>>>0));n=k;g=x(j-k);k=x(h>>>0);g=x(g/k);j=x(l>>>0);n=x(n+x(g*j));H=x(x(g+n)-n);g=x(x(v-w)/k);B=x(w+x(g*j));w=x(x(g+B)-B);c=0;a=0;while(1){l=c;c=c<<2;h=c+m|0;I=p[h>>1];K=p[h+4>>1];j=x(F*x(a|0));v=x(+x(n+x(H*j))*1.5707963267948966);g=Nl(v);L=p[(c|2)+m>>1];o=p[h+6>>1];h=a<<3;c=h+e|0;k=x(B+x(w*j));E=x(x(+(r>>>0)+ +(t>>>0)*4294967296)*x(4.656612873077393e-10));j=x(x(1)-E);u[c>>2]=u[c>>2]+x(g*x(k*x(x(j*x(I|0))+x(E*x(K|0)))));g=Lk(v);c=(h|4)+e|0;u[c>>2]=u[c>>2]+x(g*x(k*x(x(j*x(L|0))+x(E*x(o|0)))));c=d;o=c+r|0;h=i+t|0;h=c>>>0>o>>>0?h+1|0:h;r=o&2147483647;t=0;c=h;h=o;c=((c&2147483647)<<1|h>>>31)+l|0;a=a+1|0;if((f|0)!=(a|0)){continue}break}q[b+48>>2]=r;q[b+52>>2]=t;if(l>>>0<=z>>>0){break b}J(211098,210166,983,211185);G()}bl(m,(c<<2)+m|0,z-c<<2);q[b+44>>2]=q[b+44>>2]-c}function Xma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=q[a+80>>2];c=q[b+8>>2];if((c|0)==q[b+4>>2]){xn(53e3,53007,(c-q[b>>2]|0)/240|0);return-1e3}f=v9(b);c=q[b+16>>2];if(f>>>0>2]-c>>3>>>0){g=q[c+(f<<3)>>2];h=q[b>>2];if(g>>>0<(q[b+4>>2]-h|0)/240>>>0){b=Ui(w(g,240)+h|0,0,240);q[b>>2]=q[a>>2];d=q[a+20>>2];c=q[a+16>>2];u[b+24>>2]=u[a+24>>2];q[b+16>>2]=c;q[b+20>>2]=d;u[b+32>>2]=u[a+32>>2];u[b+36>>2]=u[a+36>>2];u[b+40>>2]=u[a+40>>2];u[b+44>>2]=u[a+44>>2];u[b+48>>2]=u[a+48>>2];u[b+52>>2]=u[a+52>>2];u[b+56>>2]=u[a+56>>2];i=q[a+76>>2];q[b+192>>2]=0;q[b+188>>2]=i;o[b+152|0]=0;o[b+153|0]=0;o[b+154|0]=0;o[b+155|0]=0;o[b+156|0]=0;o[b+157|0]=0;o[b+158|0]=0;o[b+159|0]=0;o[b+176|0]=0;o[b+177|0]=0;o[b+178|0]=0;o[b+179|0]=0;o[b+180|0]=0;o[b+181|0]=0;o[b+182|0]=0;o[b+183|0]=0;o[b+168|0]=0;o[b+169|0]=0;o[b+170|0]=0;o[b+171|0]=0;o[b+172|0]=0;o[b+173|0]=0;o[b+174|0]=0;o[b+175|0]=0;o[b+160|0]=0;o[b+161|0]=0;o[b+162|0]=0;o[b+163|0]=0;o[b+164|0]=0;o[b+165|0]=0;o[b+166|0]=0;o[b+167|0]=0;p[b+232>>1]=s[a+92>>1];q[b+148>>2]=0;c=s[b+234>>1]|260;p[b+234>>1]=c;j=b;d=q[b+188>>2];e=q[d>>2];if(x(x(x(u[e+16>>2]+u[e+20>>2])+u[e+24>>2])+u[e+28>>2])!=x(0)){e=!q[e+48>>2]<<9}else{e=0}p[j+234>>1]=e|c&65023;c=w(g,240)+h|0;q[c+184>>2]=0;q[c+72>>2]=0;q[c+64>>2]=0;q[c+68>>2]=0;d=q[d>>2];if(!q[d+48>>2]){c=c- -64|0;u[c>>2]=u[d+32>>2];u[c+4>>2]=u[d+36>>2]}mw(b,q[i+16>>2],q[i+20>>2],u[d+52>>2],u[d+56>>2]);q[q[a+88>>2]>>2]=f;return 0}}J(53716,53631,479,53341);G()}function rv(a){var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-32|0;Ii=d;a:{b=q[a+120>>2];f=q[b+8>>2]-q[b+12>>2]>>4;if((f|0)>-1){hZ(b);Zi(b,-10002,122690);Zi(b,-1,122695);Si(b,-2,122700);Ri(b,-2);Z4(b);T4(b);Q4(b);S4(b);U4(b);W4(b);V4(b);P4(b);Y4(b);GY(b);Ri(b,-2);c=q[b+8>>2]-q[b+12>>2]>>4;MY(b);Ri(b,c+(q[b+8>>2]-q[b+12>>2]>>4^-1)|0);qk(b,822,0);Si(b,-10002,122704);qk(b,823,0);Si(b,-10002,122710);Zi(b,-10002,122690);b:{if(Vi(b,-1)){c=Yi(4);q[c>>2]=0;e=q[b+8>>2];q[e+8>>2]=2;q[e>>2]=c;q[b+8>>2]=q[b+8>>2]+16;Si(b,-10002,122717);q[c>>2]=w(q[c>>2],214013)+2531011;qk(b,824,0);Si(b,-2,122731);qk(b,825,0);Si(b,-2,122738);break b}Pi(3,122749,122756,0)}Ri(b,-2);c=q[b+8>>2];q[c+8>>2]=2;q[c>>2]=a;q[b+8>>2]=q[b+8>>2]+16;c=pq(122784,16);bj(b,122784,16);ej(b,-2);pj(b,-10002);e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;xk(b,-2);pj(b,-10002);q[79289]=c;c=q[b+8>>2];q[c+8>>2]=2;q[c>>2]=b;q[b+8>>2]=q[b+8>>2]+16;Si(b,-10002,122801);vj(b,0,0);q[79288]=q[79288]+1;q[a+124>>2]=In(b,-1e4);X4(a);R4(a);if(r[a+128|0]){_4(a)}c=q[a+104>>2];e=q[a+108>>2];if((c|0)!=(e|0)){while(1){g=q[q[c>>2]>>2];if(g){Mi[g|0](a);e=q[a+108>>2]}c=c+4|0;if((e|0)!=(c|0)){continue}break}}a=q[b+8>>2]-q[b+12>>2]>>4;if((a|0)!=(f|0)){break a}Ii=d+32|0;return}q[d+12>>2]=f;q[d+4>>2]=156;q[d+8>>2]=0;q[d>>2]=122672;Pi(4,122749,123291,d);J(123363,122672,1469,123380);G()}q[d+28>>2]=a;q[d+24>>2]=f;q[d+20>>2]=156;q[d+16>>2]=122672;Pi(4,122749,123394,d+16|0);J(123465,122672,1492,123484);G()}function cn(a,b,c,d,e){var f=0,g=0,h=0,i=0;g=-24832;f=q[a>>2];a:{if(!f){break a}q[e>>2]=0;h=f?q[f+24>>2]:0;b:{c:{d:{i=q[f+4>>2];switch(i-1|0){case 5:break c;case 0:break d;default:break b}}g=-25216;if((c|0)!=(h|0)){break a}q[e>>2]=c;return Mi[q[q[f+28>>2]+4>>2]](q[a+60>>2],q[a+8>>2],b,d)|0}q[e>>2]=c;return tE(q[a+60>>2],c,b,d)}if(q[f>>2]==73){q[e>>2]=c;return ME(q[a+60>>2],c,b,d)}if(!h){return-25472}if(q[a+36>>2]|(c>>>0)%(h>>>0)?(b|0)==(d|0):0){break a}g=-24704;e:{f:{g:{h:{switch(i-2|0){case 0:i:{j:{k:{switch(q[a+8>>2]){case 0:f=q[a+36>>2];i=h-f|0;if(!q[a+12>>2]){break j}if(c>>>0<=i>>>0){break f}break i;case 1:break k;default:break i}}f=q[a+36>>2];if(h-f>>>0<=c>>>0){break i}break f}if(c>>>0>>0){break f}}f=q[a+36>>2];if(f){i=a+20|0;g=i+f|0;f=h-f|0;Ti(g,b,f);g=Mi[q[q[q[a>>2]+28>>2]+8>>2]](q[a+60>>2],q[a+8>>2],h,a+40|0,i,d)|0;if(g){break a}q[e>>2]=q[e>>2]+h;q[a+36>>2]=0;c=c-f|0;d=d+h|0;b=b+f|0}g=0;if(!c){break a}f=(c>>>0)%(h>>>0)|0;l:{if(f){break l}f=0;if(q[a+8>>2]){break l}f=q[a+12>>2]?h:0}c=c-f|0;Ti(a+20|0,c+b|0,f);q[a+36>>2]=q[a+36>>2]+f;if(!c){break a}g=Mi[q[q[q[a>>2]+28>>2]+8>>2]](q[a+60>>2],q[a+8>>2],c,a+40|0,b,d)|0;if(g){break a}q[e>>2]=c+q[e>>2];break e;case 1:g=Mi[q[q[f+28>>2]+12>>2]](q[a+60>>2],q[a+8>>2],c,a+36|0,a+40|0,b,d)|0;if(!g){break g}break a;case 5:break h;default:break a}}g=Mi[q[q[f+28>>2]+16>>2]](q[a+60>>2],c,b,d)|0;if(g){break a}}q[e>>2]=c;break e}Ti((a+f|0)+20|0,b,c);q[a+36>>2]=q[a+36>>2]+c}g=0}return g}function bD(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=Ii-288|0;Ii=e;h=kj(a,1,e+284|0);d=kj(a,2,e+280|0);f=Am(a,3,1);c=q[e+284>>2];g=f+(c+1&f>>31)|0;f=(g|0)>0;g=f?g-1|0:-1;f=f?c>>>0>>0?c:g:0;a:{b:{c:{d:{e:{if(b){if(Uj(a,4)){break e}c=ZC(d,146381)+d|0;if(!(r[c|0]?c:0)){break e}c=q[e+284>>2]}g=r[d|0];q[e+16>>2]=a;q[e+8>>2]=h;q[e+12>>2]=c+h;i=d+1|0;c=d;d=(g|0)==94;g=d?i:c;c=f+h|0;if(d){break d}while(1){q[e+20>>2]=0;d=Fn(e+8|0,c,g);if(d){break c}d=t[e+12>>2]>c>>>0;c=c+1|0;if(d){continue}break}break b}b=f+h|0;c=q[e+280>>2];f:{if(c){f=q[e+284>>2]-f|0;if(f>>>0>>0){break b}g=c-1|0;c=f-g|0;if(!c){break b}i=d+1|0;j=o[d|0];d=b;while(1){b=Oq(d,j,c);if(!b){break b}f=b+1|0;if(!Ej(f,i,g)){break f}b=c+d|0;d=f;c=b-d|0;if(c){continue}break}break b}if(!h){break b}}d=q[a+8>>2];q[d+8>>2]=3;b=b-h|0;v[d>>3]=b+1|0;q[a+8>>2]=q[a+8>>2]+16;b=b+q[e+280>>2]|0;d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;b=2;break a}q[e+20>>2]=0;d=Fn(e+8|0,c,g);if(!d){break b}}if(b){b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=(c-h|0)+1|0;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d-h|0;q[a+8>>2]=q[a+8>>2]+16;a=q[e+20>>2];jp(q[e+16>>2],a,146427);if((a|0)>=1){c=0;while(1){js(e+8|0,c,0,0);c=c+1|0;if((a|0)!=(c|0)){continue}break}}b=a+2|0;break a}a=q[e+20>>2];b=c?a?a:1:a;jp(q[e+16>>2],b,146427);if((b|0)<1){break a}a=0;while(1){js(e+8|0,a,c,d);a=a+1|0;if((b|0)!=(a|0)){continue}break}break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=1}Ii=e+288|0;return b}function aS(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=q[a+68>>2];a:{b:{if(!e){break b}c:{switch(q[a+128>>2]-20|0){case 0:o[e+528|0]=1;break b;case 2:break c;default:break a}}b=-27648;d=q[a+120>>2];g=r[d+4|0]<<8|r[d+5|0];c=q[e+476>>2];if(g>>>0>>0){break a}h=g-c|0;if(h>>>0>3){break b}j=q[a+168>>2];i=j-12|0;d:{e:{f=e+w(h,12)|0;g=f;c=r[f+532|0];if(!(c&1)){f=c&253;c=((rD(a)|0)==1)<<1;o[g+532|0]=f|c;if(j>>>0>16384){break b}f=q[e+524>>2];if(f>>>0>32768){break a}d=i+12|0;d=c>>>1|0?((i>>>3|0)+d|0)+((i&7)!=0)|0:d;if(d>>>0>32768-f>>>0){if(h){break b}b=-27136;if(bS(a,d)){break a}}c=w(h,12);k=c+e|0;b=bk(1,d);q[k+536>>2]=b;if(b){break e}return-32512}b=q[f+536>>2];if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))==(r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))){break d}break b}q[(c+e|0)+540>>2]=d;c=q[a+120>>2];f=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[b|0]=f;o[b+1|0]=f>>>8;o[b+2|0]=f>>>16;o[b+3|0]=f>>>24;c=r[c+4|0]|r[c+5|0]<<8;o[b+4|0]=c;o[b+5|0]=c>>>8;b=q[k+536>>2];o[b+6|0]=0;o[b+7|0]=0;o[b+8|0]=0;b=q[k+536>>2];c=r[b+1|0]|r[b+2|0]<<8;o[b+9|0]=c;o[b+10|0]=c>>>8;o[b+11|0]=r[b+3|0];c=r[g+532|0]|1;o[g+532|0]=c;q[e+524>>2]=q[e+524>>2]+d}if(c&4){break b}e=q[(e+w(h,12)|0)+536>>2];a=q[a+120>>2];d=r[a+8|0]|(r[a+7|0]<<8|r[a+6|0]<<16);b=r[a+11|0]|(r[a+10|0]<<8|r[a+9|0]<<16);Ti((e+d|0)+12|0,a+12|0,b);a=g;f=a;c=r[a+532|0];f:{if(c&2){e=e+j|0;dS(e,d,b);a=r[g+532|0]&-5|!eS(e,i)<<2;break f}a=c|4}o[f+532|0]=a}b=0}return b}function Gs(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii-16|0;Ii=d;h=q[a>>2];f=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);e=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);g=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);b=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);i=q[a+4>>2]^(b<<24|b<<8&16711680|(b>>>8&65280|b>>>24));q[d>>2]=i;b=q[a+8>>2]^(g<<8&16711680|g<<24|(g>>>8&65280|g>>>24));q[d+4>>2]=b;e=q[a+12>>2]^(e<<8&16711680|e<<24|(e>>>8&65280|e>>>24));q[d+8>>2]=e;f=q[a+16>>2]^(f<<8&16711680|f<<24|(f>>>8&65280|f>>>24));q[d+12>>2]=f;a=a+20|0;if(h){f=d|8;while(1){zn(i,b,q[a>>2],q[a+4>>2],f);zn(q[d+8>>2],q[d+12>>2],q[a+8>>2],q[a+12>>2],d);zn(q[d>>2],q[d+4>>2],q[a+16>>2],q[a+20>>2],f);zn(q[d+8>>2],q[d+12>>2],q[a+24>>2],q[a+28>>2],d);zn(q[d>>2],q[d+4>>2],q[a+32>>2],q[a+36>>2],f);zn(q[d+8>>2],q[d+12>>2],q[a+40>>2],q[a+44>>2],d);h=h-1|0;if(h){e=q[d>>2];b=q[d+4>>2]^Fza(e&q[a+48>>2],1);q[d+4>>2]=b;i=e^(q[a+52>>2]|b);q[d>>2]=i;e=q[d+12>>2];g=q[d+8>>2]^(e|q[a+60>>2]);q[d+8>>2]=g;q[d+12>>2]=Fza(g&q[a+56>>2],1)^e;a=a- -64|0;continue}break}b=q[d+4>>2];i=q[d>>2];f=q[d+12>>2];e=q[d+8>>2];a=a+48|0}g=q[a>>2];h=q[a+4>>2];j=q[a+8>>2];a=q[a+12>>2]^b;o[c+15|0]=a;b=i^j;o[c+11|0]=b;f=f^h;o[c+7|0]=f;e=e^g;o[c+3|0]=e;o[c+14|0]=a>>>8;o[c+13|0]=a>>>16;o[c+12|0]=a>>>24;o[c+10|0]=b>>>8;o[c+9|0]=b>>>16;o[c+8|0]=b>>>24;o[c+6|0]=f>>>8;o[c+5|0]=f>>>16;o[c+4|0]=f>>>24;o[c+2|0]=e>>>8;o[c+1|0]=e>>>16;o[c|0]=e>>>24;Ii=d+16|0;return 0}function hza(){var a=0;q[72688]=Oi(44312);q[72689]=Li;q[72690]=Oi(44331);q[72691]=Li;q[72692]=Oi(44348);q[72693]=Li;q[72694]=Oi(44357);q[72695]=Li;q[72696]=Oi(44363);q[72697]=Li;q[72698]=Oi(44373);q[72699]=Li;q[72700]=Oi(44381);q[72701]=Li;q[72702]=Oi(44388);q[72703]=Li;q[72704]=Oi(44397);q[72705]=Li;q[72706]=Oi(44409);q[72707]=Li;q[72708]=Oi(44418);q[72709]=Li;q[72710]=Oi(44423);q[72711]=Li;q[72712]=Oi(44429);q[72713]=Li;q[72714]=Oi(44435);q[72715]=Li;q[72716]=Oi(44444);q[72717]=Li;q[72720]=Oi(44454);q[72721]=Li;q[72722]=Oi(44463);q[72723]=Li;q[72724]=Oi(44472);q[72725]=Li;q[72726]=Oi(44481);q[72727]=Li;q[72728]=Oi(44490);q[72729]=Li;q[72730]=Oi(44499);q[72731]=Li;q[72732]=Oi(44508);q[72733]=Li;q[72734]=Oi(44517);q[72735]=Li;q[72736]=Oi(44526);q[72737]=Li;a=Oi(44535);q[72757]=0;q[72758]=0;q[72756]=295392;q[72754]=0;q[72752]=44557;q[72751]=44547;q[72750]=0;q[72748]=0;q[72746]=0;q[72744]=0;q[72742]=1;q[72740]=0;q[72741]=3;q[72738]=a;q[72739]=Li;q[72759]=0;q[72760]=0;q[72761]=0;q[72778]=290960;q[72776]=0;q[72774]=44591;q[72773]=44570;q[72772]=0;q[72770]=0;q[72768]=0;q[72766]=0;q[72764]=1;q[72762]=0;q[72763]=3;q[72783]=0;q[72781]=0;q[72782]=0;q[72779]=0;q[72780]=0;q[72800]=290960;q[72798]=0;q[72796]=44622;q[72795]=44602;q[72794]=0;q[72792]=0;q[72790]=0;q[72788]=0;q[72786]=1;q[72784]=0;q[72785]=3;q[72805]=0;q[72803]=0;q[72804]=0;q[72801]=0;q[72802]=0;q[72806]=Oi(44648);q[72807]=Li;q[72808]=Oi(44657);q[72809]=Li}function Xv(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{if(!b|(b|0)==(c|0)){break b}c:{d:{e:{d=b&65535;e=q[a+32>>2];if(d>>>0<(q[a+36>>2]-e|0)/592>>>0){if(s[(w(d,592)+e|0)+568>>1]!=(b>>>16|0)){break e}g=w(d,592)+e|0;if(s[g+570>>1]!=(b&65535)){break d}Br(a,g);j=w(d,592)+e|0;f:{g:{h:{if(c){h=q[a+36>>2];f=q[a+32>>2];i=(h-f|0)/592|0;b=c&65535;if(i>>>0<=b>>>0){break a}b=w(b,592)+f|0;c=s[b+576>>1];if((c|0)==65535){c=a+382|0;a=65535;break g}if(c>>>0>>0){break h}break a}c=a+382|0;b=s[a+382>>1];if((b|0)==65535){p[(w(d,592)+e|0)+576>>1]=65535;break c}h=q[a+36>>2];f=q[a+32>>2];if(b>>>0>=(h-f|0)/592>>>0){break a}p[(w(d,592)+e|0)+576>>1]=65535;if(!f){break c}b=w(b,592)+f|0;break f}a=w(c,592)+f|0;c=a+580|0;a=s[a+570>>1]}p[j+576>>1]=a}a=s[b+570>>1];i:{if((a|0)==s[c>>1]){p[c>>1]=s[g+570>>1];p[(w(d,592)+e|0)+574>>1]=65535;a=s[b+570>>1];break i}c=s[b+574>>1];if((c|0)==65535){break i}if(c>>>0>=(h-f|0)/592>>>0){break a}p[(w(c,592)+f|0)+572>>1]=s[g+570>>1];p[(w(d,592)+e|0)+574>>1]=c}p[b+574>>1]=s[g+570>>1];p[(w(d,592)+e|0)+572>>1]=a;return}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}b=w(d,592)+e|0;p[b+572>>1]=65535;p[b+574>>1]=s[a+380>>1];b=s[a+380>>1];j:{if((b|0)==65535){b=s[g+570>>1];break j}c=q[a+32>>2];if(b>>>0>=(q[a+36>>2]-c|0)/592>>>0){break a}c=c+w(b,592)|0;b=s[g+570>>1];p[c+572>>1]=b}p[a+380>>1]=b;if(s[a+382>>1]!=65535){break b}p[a+382>>1]=s[g+570>>1]}return}J(201665,201514,479,201676);G()}function fP(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=Ii-32|0;Ii=e;a:{if(q[a>>2]==(b|0)){b=0;break a}b=rV(a,b,c+236|0);if(b){break a}b=q[a>>2];g=q[c+244>>2]+q[c+240>>2]|0;if(b>>>0>>0){h=c+288|0;i=c+284|0;j=c+292|0;k=c+296|0;l=c+248|0;m=c+312|0;n=c+264|0;o=e+16|4;while(1){q[e+24>>2]=0;q[e+16>>2]=0;q[e+20>>2]=0;q[e+12>>2]=0;q[e+8>>2]=0;b=hk(a,g,e+28|0,48);if(b){b=b-9472|0;break a}b=q[a>>2]+q[e+28>>2]|0;d=hk(a,b,o,6);if(d){b=d-9472|0;break a}q[e+16>>2]=6;d=q[a>>2];q[e+24>>2]=d;q[a>>2]=d+q[e+20>>2];d=VE(a,b,e+12|0);if(!((d|0)==-98|!d)){b=d-9472|0;break a}d=hk(a,b,e+28|0,4);if(d){b=d-9472|0;break a}if((b|0)!=(q[a>>2]+q[e+28>>2]|0)){b=-9574;break a}f=hU(e+16|0);d=-46;b:{if(!f){break b}q[e+8>>2]=q[f+16>>2];d=0}c:{if(d){q[a>>2]=b;if(!q[e+12>>2]){break c}b=-9570;break a}f=q[c+280>>2];d=q[e+8>>2];if(f&d){b=-9472;break a}q[c+280>>2]=d|f;d:{e:{f:{g:{h:{i:{if((d|0)<=255){switch(d-4|0){case 0:break d;case 4:break g;case 28:break i;default:break f}}if((d|0)==65536){break h}if((d|0)==2048){break e}if((d|0)!=256){break f}b=hP(a,b,i,h);if(!b){break c}break a}b=_O(a,b,l);if(!b){break c}break a}b=aP(a,b,m);if(!b){break c}break a}b=gP(a,b,n);if(!b){break c}if((b|0)!=-8320){break a}if(!q[e+12>>2]){break c}break a}if(q[e+12>>2]){b=-8320;break a}q[a>>2]=b;break c}b=dP(a,b,k);if(!b){break c}break a}b=bP(a,b,j);if(b){break a}}b=q[a>>2];if(g>>>0>b>>>0){continue}break}}b=(b|0)==(g|0)?0:-9574}Ii=e+32|0;return b}function Mt(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0);c=Ii-128|0;Ii=c;q[c+120>>2]=0;a:{b:{c:{d:{e:{f:{k=q[b+84>>2];e=q[k+4>>2];if(e>>>0<=65535){if(e){break f}g=1;break e}q[c>>2]=e;Pi(3,7319,7949,c);break e}f=c+80|0;i=f;e=0;while(1){d=q[k>>2]+w(j,96)|0;h=q[d+16>>2];if(!h){break d}g=0;q[c+112>>2]=0;if(o[h+102|0]&1){g=((e<<2)+b|0)+156|0;q[g>>2]=0;e=e+1|0}if(t[b+152>>2]>>0){break c}q[f>>2]=0;q[f+4>>2]=0;q[f+8>>2]=0;q[c+16>>2]=b;u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];u[c+60>>2]=u[d+60>>2];u[c+64>>2]=u[d+64>>2];u[c+68>>2]=u[d+68>>2];m=u[d+72>>2];p[c+108>>1]=j;u[c+72>>2]=m;q[c+92>>2]=q[d+24>>2];q[c+96>>2]=q[((q[d+20>>2]<<2)+a|0)+12>>2];l=q[h+16>>2];q[c+104>>2]=g;q[c+100>>2]=l;q[i+8>>2]=q[d+88>>2];g=q[d+84>>2];q[f>>2]=q[d+80>>2];q[f+4>>2]=g;d=Mi[q[h+28>>2]](c+16|0)|0;if(!d){g=1;j=j+1|0;if(j>>>0>2]){continue}break e}break}if(!j){g=0;break e}g=!d;f=0;e=0;while(1){i=q[k>>2]+w(f,96)|0;h=q[i+16>>2];if(!h){break b}l=q[h+100>>2]&65536;d=(l>>>16|0)+e|0;if(d>>>0>t[b+152>>2]){break a}q[c+16>>2]=q[a+8>>2];q[c+20>>2]=b;q[c+24>>2]=q[((q[i+20>>2]<<2)+a|0)+12>>2];i=q[h+16>>2];q[c+32>>2]=l?((e<<2)+b|0)+156|0:0;q[c+28>>2]=i;Mi[q[h+32>>2]](c+16|0)|0;e=d;f=f+1|0;if((j|0)!=(f|0)){continue}break}}Ii=c+128|0;return g}J(8003,7192,805,7932);G()}J(8018,7192,815,7932);G()}J(8003,7192,847,7932);G()}J(8018,7192,853,7932);G()}function C8(a){var b=0,c=0,d=0,e=0,f=0;if(q[a+1872>>2]){Mi[q[74945]](q[a+1876>>2],0,0,0);b=q[a+348>>2];if(b){q[a+344>>2]=0;d=1}c=q[a+668>>2];if(c){q[a+664>>2]=b;d=d+1|0;b=b+c|0}c=q[a+988>>2];if(c){q[a+984>>2]=b;d=d+1|0;b=b+c|0}c=q[a+1308>>2];if(c){q[a+1304>>2]=b;d=d+1|0;b=b+c|0}Mi[q[74945]](q[a+1876>>2],b<<5,0,0);c=vp(a,d);d=Ev(a,761,a- -64|0);b=a+1888|0;q[b>>2]=q[b>>2]+1;e=d<<6;b=c;d=q[a+348>>2];if(d){Mi[q[74946]](q[a+1876>>2],q[a+344>>2]<<5,d<<5,q[a+368>>2]);q[c+24>>2]=16777214;q[c+16>>2]=a- -64;q[c+20>>2]=0;q[c+36>>2]=q[c+36>>2]&-64|32;q[c+28>>2]=q[a+1888>>2];q[c+32>>2]=q[q[a+220>>2]+132>>2];q[c+36>>2]=e|q[c+36>>2]&-16321;b=c+48|0}d=q[a+668>>2];if(d){Mi[q[74946]](q[a+1876>>2],q[a+664>>2]<<5,d<<5,q[a+688>>2]);q[b+24>>2]=16777214;q[b+16>>2]=a+384;q[b+20>>2]=0;q[b+36>>2]=q[b+36>>2]&-64|32;q[b+28>>2]=q[a+1888>>2];q[b+32>>2]=q[q[a+540>>2]+132>>2];q[b+36>>2]=e|q[b+36>>2]&-16321;b=b+48|0}d=q[a+988>>2];if(d){Mi[q[74946]](q[a+1876>>2],q[a+984>>2]<<5,d<<5,q[a+1008>>2]);q[b+24>>2]=16777214;q[b+16>>2]=a+704;q[b+20>>2]=0;q[b+36>>2]=q[b+36>>2]&-64|32;q[b+28>>2]=q[a+1888>>2];q[b+32>>2]=q[q[a+860>>2]+132>>2];q[b+36>>2]=e|q[b+36>>2]&-16321;b=b+48|0}d=a;f=q[a+1308>>2];if(f){Mi[q[74946]](q[a+1876>>2],q[a+1304>>2]<<5,f<<5,q[a+1328>>2]);q[b+24>>2]=16777214;q[b+16>>2]=a+1024;q[b+20>>2]=0;q[b+36>>2]=q[b+36>>2]&-64|32;q[b+28>>2]=q[a+1888>>2];q[b+32>>2]=q[q[a+1180>>2]+132>>2];q[b+36>>2]=e|q[b+36>>2]&-16321;b=b+48|0}up(d,c,b)}}function HP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=0,i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),o=x(0),r=0,t=x(0),v=0,w=0,z=0,B=0,E=0,F=x(0),H=x(0);h=b;k=q[h+48>>2];v=q[h+52>>2];g=u[h+40>>2];w=q[h+4>>2];z=q[h+44>>2];r=w+(z<<1)|0;p[r>>1]=s[r-2>>1];o=u[h+32>>2];j=u[h+28>>2];l=q[a+4>>2];B=q[a>>2];i=u[h+20>>2];m=u[h+16>>2];g=x(g*x(+(Bza(c<<31,c>>>1|0,d)>>>0)+ +(Li>>>0)*4294967296));a:{if(g=x(0)){c=~~g>>>0;r=x(y(g))>=x(1)?g>x(0)?~~x(A(x(C(x(g*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(g-x(~~g>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;break a}c=0;r=0}b:{c:{d:{if(!f){d=0;break d}F=x(x(1)/x(f>>>0));t=j;g=x(o-j);j=x(l>>>0);o=x(g/j);n=x(B>>>0);g=x(t+x(o*n));o=x(x(o+g)-g);t=m;m=x(x(i-m)/j);j=x(t+x(m*n));m=x(x(m+j)-j);d=0;a=0;while(1){h=d;d=(d<<1)+w|0;l=p[d>>1];d=p[d+2>>1];i=x(F*x(a|0));n=x(+x(g+x(o*i))*1.5707963267948966);t=Nl(n);B=a<<3;E=B+e|0;H=x(j+x(m*i));i=x(x(+(k>>>0)+ +(v>>>0)*4294967296)*x(4.656612873077393e-10));i=x(H*x(x(x(x(1)-i)*x(l|0))+x(i*x(d|0))));u[E>>2]=u[E>>2]+x(t*i);n=Lk(n);d=(B|4)+e|0;u[d>>2]=u[d>>2]+x(n*i);d=k;k=c;l=d+k|0;d=v+r|0;d=l>>>0>>0?d+1|0:d;k=l&2147483647;v=0;d=((d&2147483647)<<1|l>>>31)+h|0;a=a+1|0;if((f|0)!=(a|0)){continue}break}q[b+48>>2]=k;q[b+52>>2]=v;if(h>>>0>z>>>0){break c}if(d>>>0>z>>>0){break b}}bl(w,(d<<1)+w|0,z-d<<1);q[b+44>>2]=q[b+44>>2]-d;return}J(211098,210166,923,211135);G()}J(211153,210166,926,211135);G()}function GH(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0;i=Ii-16|0;Ii=i;a:{if(!q[a+1872>>2]){break a}g=q[a+1884>>2];h=q[a+668>>2];if(g>>>0>h+2>>>0){j=q[b>>2];k=q[e>>2];l=q[e+4>>2];m=q[e+8>>2];n=q[e+12>>2];p=q[c+4>>2];s=q[c+8>>2];t=q[c>>2];c=d;g=q[c+8>>2];e=q[c+12>>2];d=q[c>>2];c=q[c+4>>2];f=q[a+688>>2]+(h<<5)|0;h=q[b+8>>2];b=q[b+4>>2];o[f+4|0]=b;o[f+5|0]=b>>>8;o[f+6|0]=b>>>16;o[f+7|0]=b>>>24;o[f+8|0]=h;o[f+9|0]=h>>>8;o[f+10|0]=h>>>16;o[f+11|0]=h>>>24;o[f+12|0]=0;o[f+13|0]=0;o[f+14|0]=128;o[f+15|0]=63;o[f+16|0]=d;o[f+17|0]=d>>>8;o[f+18|0]=d>>>16;o[f+19|0]=d>>>24;o[f+20|0]=c;o[f+21|0]=c>>>8;o[f+22|0]=c>>>16;o[f+23|0]=c>>>24;o[f+24|0]=g;o[f+25|0]=g>>>8;o[f+26|0]=g>>>16;o[f+27|0]=g>>>24;o[f+28|0]=e;o[f+29|0]=e>>>8;o[f+30|0]=e>>>16;o[f+31|0]=e>>>24;o[f+32|0]=t;o[f+33|0]=t>>>8;o[f+34|0]=t>>>16;o[f+35|0]=t>>>24;o[f+36|0]=p;o[f+37|0]=p>>>8;o[f+38|0]=p>>>16;o[f+39|0]=p>>>24;o[f+40|0]=s;o[f+41|0]=s>>>8;o[f+42|0]=s>>>16;o[f+43|0]=s>>>24;o[f+44|0]=0;o[f+45|0]=0;o[f+46|0]=128;o[f+47|0]=63;o[f+56|0]=m;o[f+57|0]=m>>>8;o[f+58|0]=m>>>16;o[f+59|0]=m>>>24;o[f+60|0]=n;o[f+61|0]=n>>>8;o[f+62|0]=n>>>16;o[f+63|0]=n>>>24;o[f+48|0]=k;o[f+49|0]=k>>>8;o[f+50|0]=k>>>16;o[f+51|0]=k>>>24;o[f+52|0]=l;o[f+53|0]=l>>>8;o[f+54|0]=l>>>16;o[f+55|0]=l>>>24;o[f|0]=j;o[f+1|0]=j>>>8;o[f+2|0]=j>>>16;o[f+3|0]=j>>>24;q[a+668>>2]=q[a+668>>2]+2;break a}if(r[316304]){break a}q[i>>2]=g;Pi(3,111674,111840,i);o[316304]=1}Ii=i+16|0}function aI(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0,p=0,t=0,v=0,y=0,z=x(0);a:{b:{c:{d:{e:{i=b&65535;j=q[a+4>>2];a=q[a>>2];if(i>>>0>2>>>0){l=q[a+(i<<2)>>2];if(s[l+80>>1]!=(b>>>16|0)){break e}i=q[l+4>>2];a=q[l>>2];b=i-a|0;if(!b){break b}b=(b|0)/304|0;if((a|0)!=(i|0)){v=b>>>0>1?b:1;while(1){i=w(m,304)+a|0;if(q[i+128>>2]==(c|0)&q[i+132>>2]==(d|0)){n=i+76|0;t=q[n>>2];j=q[i+72>>2];p=t-j|0;k=(p|0)/96|0;f:{if(p){y=k>>>0>1?k:1;a=0;while(1){b=w(a,96)+j|0;if((e|0)==q[b>>2]&q[b+4>>2]==(f|0)){break f}a=a+1|0;if((y|0)!=(a|0)){continue}break}}b=i+80|0;a=q[b>>2];if((t|0)==(a|0)){if(o[i+84|0]&1){break d}Wi(k+4|0,96,i+72|0,b,n);j=q[i+72>>2];b=q[b>>2]}else{b=a}a=k+1|0;if((b-j|0)/96>>>0>>0){break c}q[n>>2]=w(a,96)+j;if(k>>>0>=(p+96|0)/96>>>0){break a}b=w(k,96)+j|0;q[b>>2]=e;q[b+4>>2]=f}u[b+16>>2]=u[g>>2];u[b+20>>2]=u[g+4>>2];u[b+24>>2]=u[g+8>>2];u[b+28>>2]=u[g+12>>2];u[b+32>>2]=u[g+16>>2];u[b+36>>2]=u[g+20>>2];u[b+40>>2]=u[g+24>>2];u[b+44>>2]=u[g+28>>2];u[b+48>>2]=u[g+32>>2];u[b+52>>2]=u[g+36>>2];u[b+56>>2]=u[g+40>>2];u[b+60>>2]=u[g+44>>2];u[b- -64>>2]=u[g+48>>2];u[b+68>>2]=u[g+52>>2];u[b+72>>2]=u[g+56>>2];z=u[g+60>>2];o[b+80|0]=h;u[b+76>>2]=z;o[i+296|0]=r[i+296|0]|16}m=m+1|0;if((v|0)==(m|0)){break b}a=q[l>>2];if((q[l+4>>2]-a|0)/304>>>0>m>>>0){continue}break}}break a}break a}Pi(4,150692,151414,0);G()}J(151117,151192,493,151248);G()}J(151260,151192,506,151279);G()}return}J(151947,151192,479,151403);G()}function zu(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii-32|0;Ii=e;d=q[a+212>>2];ls(q[a+16>>2],q[a+20>>2],q[q[a>>2]+184>>2]>>>1&1,q[a+192>>2]+1|0);f=q[a+224>>2];c=q[a+188>>2];g=q[a+220>>2];o[c|0]=g;o[c+1|0]=g>>>8;o[c+2|0]=g>>>16;o[c+3|0]=g>>>24;o[c+4|0]=f;o[c+5|0]=f>>>8;o[c+6|0]=f>>>16;o[c+7|0]=f>>>24;o[q[a+196>>2]]=d>>>8;o[q[a+196>>2]+1|0]=d;a:{if(q[a+76>>2]){c=q[a+200>>2];q[e+12>>2]=c;q[e+16>>2]=(q[a+184>>2]-c|0)+16749;q[e+24>>2]=q[a+212>>2];q[e+20>>2]=q[a+204>>2]-c;c=q[a+188>>2];f=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);c=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);q[e>>2]=f;q[e+4>>2]=c;ls(q[a+16>>2],q[a+20>>2],q[q[a>>2]+184>>2]>>>1&1,e+9|0);o[e+8|0]=q[a+208>>2];c=q[a>>2];c=WV(q[a+76>>2],e,q[c+24>>2],q[c+28>>2]);if(c){break a}c=-27648;if(q[e+20>>2]){break a}q[a+208>>2]=r[e+8|0];d=q[e+24>>2];q[a+212>>2]=d;o[q[a+196>>2]]=d>>>8;o[q[a+196>>2]+1|0]=q[e+24>>2]}c=d;d=q[a+192>>2];f=c+(q[a+200>>2]-d|0)|0;if(r[q[a>>2]+184|0]&2){c=tD(a);if((c|0)<0){break a}g=c>>>0>>0;c=-27648;if(g){break a}}o[d|0]=q[a+208>>2];q[a+216>>2]=f+q[a+216>>2];q[a+192>>2]=f+q[a+192>>2];fs(a,q[a+76>>2]);c=8;b:{while(1){f=c;d=q[a>>2];if((q[d+184>>2]&2)>>>0>=c>>>0){break b}c=f-1|0;g=c+a|0;d=r[g+220|0]+1|0;o[g+220|0]=d;if((d|0)!=(d&255)){continue}break}d=q[a>>2]}c=-27520;if((f|0)==(q[d+184>>2]&2)){break a}if(!(!(q[d+184>>2]&2)|b)){c=uD(a);if((c|0)<0){break a}b=!c}if((b|0)==1){c=Xp(a);if(c){break a}}c=0}Ii=e+32|0;return c}function hx(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:while(1){i=b-4|0;b:while(1){d=a;c:while(1){d:{e:{f:{g:{h:{i:{j:{k:{a=b-d|0;e=a>>2;switch(e|0){case 4:break j;case 2:break k;case 0:case 1:break d;case 3:break g;case 5:break i;default:break h}}a=b-4|0;if(t[a>>2]>=t[d>>2]){break d}Hl(d,a);return}xx(d,d+4|0,d+8|0,b-4|0);return}tx(d,d+4|0,d+8|0,d+12|0,b-4|0);return}if((a|0)<=123){zP(d,b);return}g=((e|0)/2<<2)+d|0;l:{if((a|0)>=3997){a=(e|0)/4<<2;h=tx(d,a+d|0,g,a+g|0,i);break l}h=Iq(d,g,i)}a=i;if(t[d>>2]>=t[g>>2]){while(1){a=a-4|0;if((d|0)==(a|0)){f=d+4|0;if(t[d>>2]>2]){break e}while(1){if((f|0)==(i|0)){break d}if(t[d>>2]>2]){Hl(f,i);f=f+4|0;break e}else{f=f+4|0;continue}}}if(t[a>>2]>=t[g>>2]){continue}break}Hl(d,a);h=h+1|0}e=d+4|0;if(e>>>0>=a>>>0){break f}while(1){f=e;e=e+4|0;if(t[f>>2]>2]){continue}while(1){a=a-4|0;if(t[a>>2]>=t[g>>2]){continue}break}if(a>>>0>>0){e=f;break f}else{Hl(f,a);g=(f|0)==(g|0)?a:g;h=h+1|0;continue}}}Iq(d,d+4|0,b-4|0);break d}if(!((e|0)==(g|0)|t[g>>2]>=t[e>>2])){Hl(e,g);h=h+1|0}if(!h){f=EN(d,e);a=e+4|0;if(EN(a,b)){b=e;a=d;if(!f){continue a}break d}if(f){continue b}}if((e-d|0)<(b-e|0)){hx(d,e,c);a=e+4|0;continue b}hx(e+4|0,b,c);b=e;a=d;continue a}a=i;if((f|0)==(a|0)){break d}while(1){e=f;f=e+4|0;if(t[d>>2]>=t[e>>2]){continue}while(1){a=a-4|0;if(t[d>>2]>2]){continue}break}if(a>>>0<=e>>>0){d=e;continue c}else{Hl(e,a);continue}}}break}break}break}}function J9(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a=Ii+ -64|0;Ii=a;e=q[213152];o[a+11|0]=1;if(r[a+11|0]){while(1){Xn(3e4);while(1){b=q[213151];q[213151]=b?b:1;if(b){continue}break}a:{if(q[213150]<=0){q[213151]=0;break a}b=q[213152];d=q[b+8>>2];f=q[b+4>>2];c=q[b+16>>2];q[213151]=0;if((c|0)==-1){break a}b=tG(a+40|0);sG(b,0,c);b:{if(uG(b,0)){break b}if(!osa(b,c)){break b}b=a+16|0;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;c:{d:{e:{f:{b=c2(c,b,a+12|0);switch(b+4|0){case 4:break f;case 1:case 2:case 3:break b;case 0:break c;default:break e}}if((d|0)==(f|0)){b=0;Pi(4,171374,171856,0);c=q[a+12>>2];q[a+60>>2]=0;while(1){g:{d=lv(c,b+171888|0,34-b|0,a+60|0);if((d|0)!=-101){if(d){break g}b=q[a+60>>2]+b|0}if((b|0)<34){continue}}break}qp(q[a+12>>2]);Cm(q[a+12>>2]);break b}c=q[a+12>>2];b=0;q[a+60>>2]=0;while(1){h:{d=lv(c,b+171923|0,5-b|0,a+60|0);if((d|0)!=-101){if(d){break h}b=q[a+60>>2]+b|0}if((b|0)<5){continue}}break}_1(q[a+12>>2]);d=q[a+12>>2];while(1){b=q[213151];q[213151]=b?b:1;if(b){continue}break}if(q[213150]>=1){c=q[213152];b=q[c+4>>2];if((b|0)==q[c+8>>2]){break d}q[c+4>>2]=b+4;q[b>>2]=d;q[213151]=0;break b}q[213151]=0;break b}if((b|0)==-31){break c}break b}J(171929,171830,533,171953);G()}b=Ii-1184|0;Ii=b;i:{if(!r[266420]){break i}}Ii=b+1184|0}if(o[a+52|0]&1){break a}b=q[a+40>>2];if(!b){break a}Ni(b)}oq(q[e+24>>2],q[e+28>>2],1395,a+11|0);if(r[a+11|0]){continue}break}}Ii=a- -64|0}function pT(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;q[d+12>>2]=b;a=a+b|0;b=Xq(d+12|0,a,d+4|0);a:{if(b){b=b-15616|0;break a}if(q[d+4>>2]-1>>>0>2){b=-15616;break a}b=hk(d+12|0,a,d+8|0,48);if(b){break a}e=q[d+12>>2]+q[d+8>>2]|0;b=hk(d+12|0,e,d+8|0,6);if(b){break a}b=-14720;if(q[d+8>>2]!=7){break a}f=q[d+12>>2];if(Ej(f,165282,7)){break a}q[d+12>>2]=f+7;f=c+4|0;b=Nu(d+12|0,e,f);if(b){b=b-15616|0;break a}q[c+88>>2]=Ql(f);b=-15718;if((e|0)!=q[d+12>>2]){break a}b=hk(d+12|0,a,d+8|0,48);if(b){break a}b:{e=q[d+12>>2]+q[d+8>>2]|0;b=hk(d+12|0,e,d+8|0,4);if(!b){b=pn(c+16|0,q[d+12>>2],q[d+8>>2]);if(!b){break b}}b=b-15616|0;break a}q[d+12>>2]=q[d+12>>2]+q[d+8>>2];c:{b=hk(d+12|0,e,d+8|0,4);if(!b){b=pn(c+28|0,q[d+12>>2],q[d+8>>2]);if(!b){break c}}b=b-15616|0;break a}q[d+12>>2]=q[d+12>>2]+q[d+8>>2];d:{if(hk(d+12|0,e,d+8|0,3)){g=q[d+12>>2];break d}g=q[d+12>>2]+q[d+8>>2]|0;q[d+12>>2]=g}b=-15718;if((e|0)!=(g|0)){break a}b=hk(d+12|0,a,d+8|0,4);if(b){b=b-15616|0;break a}b=c+40|0;e=uy(c,b,q[d+12>>2],q[d+8>>2]);if(e){if((e|0)!=-20096){b=-15616;break a}if((r[q[d+12>>2]]&254)!=2){b=-15616;break a}if(q[d+8>>2]!=(Wm(f)+1|0)){b=-15616;break a}if(pn(b,q[d+12>>2]+1|0,q[d+8>>2]-1|0)){b=-15616;break a}if(Bk(c+52|0,r[q[d+12>>2]]-2|0)){b=-15616;break a}b=-15616;if(Bk(c- -64|0,1)){break a}}q[d+12>>2]=q[d+12>>2]+q[d+8>>2];b=a;a=c+76|0;b=Nu(d+12|0,b,a);if(b){b=b-15616|0;break a}q[c+92>>2]=Ql(a);b=0}Ii=d+16|0;return b}function Xha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-96|0;Ii=c;j=q[a+8>>2]-q[a+12>>2]>>4;h=$j(a,1);i=Li;b=gt(a,2);if((Vi(a,3)|0)==5){ej(a,3);Zi(a,-1,78024);f=Rt(a,78024,0);Ri(a,-2);Ri(a,-2)}e=q[(q[b+4>>2]==2?q[b>>2]+4|0:b)>>2];d=Cp(a,q[74445],h,i,79134);g=q[d+4>>2];a:{b:{c:{if(f){if((e|0)!=(g|0)){q[c+92>>2]=0;f=Kp(e,c+92|0);if(f){break c}Pt(q[d+4>>2]);q[d+4>>2]=e;q[d+16>>2]=q[c+92>>2];q[d+20>>2]=Kw(e);if(q[b+4>>2]==2){cj(q[74445],q[b>>2])}tp(q[74445],d)}q[b>>2]=d;q[b+4>>2]=2;break b}q[c+92>>2]=0;b=Kp(g,c+92|0);if(b){e=aj(h,i);if(b>>>0<=11){d=q[(b<<2)+262624>>2]}else{d=153853}q[c+72>>2]=b;q[c+68>>2]=d;q[c+64>>2]=e;b=Qi(a,79235,c- -64|0);break a}q[c+88>>2]=0;b=Kp(e,c+88|0);if(b){if(b>>>0<=11){d=q[(b<<2)+262624>>2]}else{d=153853}q[c+52>>2]=b;q[c+48>>2]=d;b=Qi(a,79181,c+48|0);break a}if(q[c+92>>2]!=q[c+88>>2]){b=mN(e,c+84|0);if(!b){Pt(q[d+4>>2]);q[d+4>>2]=q[c+84>>2];q[d+16>>2]=q[c+88>>2];break b}if(b>>>0<=11){d=q[(b<<2)+262624>>2]}else{d=153853}q[c+36>>2]=b;q[c+32>>2]=d;b=Qi(a,79278,c+32|0);break a}b=lN(g,e);if(!b){break b}if(b>>>0<=11){d=q[(b<<2)+262624>>2]}else{d=153853}q[c+20>>2]=b;q[c+16>>2]=d;b=Qi(a,79318,c+16|0);break a}if(f>>>0<=11){b=q[(f<<2)+262624>>2]}else{b=153853}q[c+4>>2]=f;q[c>>2]=b;b=Qi(a,79181,c);break a}RB(g);xq(q[d+4>>2],d+24|0);q[d+8>>2]=h;q[d+12>>2]=i;b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(j|0)){break a}J(76560,76581,2564,79360);G()}Ii=c+96|0;return b|0}function K7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-448|0;Ii=c;f=q[a+8>>2]-q[a+12>>2]>>4;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{c:{if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){d:{if(Vi(a,1)){b=$j(a,1);g=Li;e:{e=q[d+20>>2];f:{if(!e){break f}e=q[q[d+16>>2]+(Cza(b,g,e)<<2)>>2];if((e|0)==-1){break f}i=q[d+24>>2];while(1){h=(e<<4)+i|0;if((b|0)==q[h>>2]&(g|0)==q[h+4>>2]){break e}e=q[h+12>>2];if((e|0)!=-1){continue}break}}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){break c}d=ct(a,1,c+320|0);q[c+40>>2]=b;q[c+44>>2]=g;q[c+32>>2]=d;sj(c- -64|0,256,117928,c+32|0);q[c+16>>2]=c- -64;b=Qi(a,117962,c+16|0);break d}b=c- -64|0;q[b+8>>2]=q[((e<<4)+i|0)+8>>2];q[b+12>>2]=0;q[b>>2]=21;b=q[d+4>>2];if((b|0)!=q[d+8>>2]){q[d+4>>2]=b+40;d=q[c+100>>2];q[b+32>>2]=q[c+96>>2];q[b+36>>2]=d;d=q[c+92>>2];q[b+24>>2]=q[c+88>>2];q[b+28>>2]=d;d=q[c+84>>2];q[b+16>>2]=q[c+80>>2];q[b+20>>2]=d;d=q[c+76>>2];q[b+8>>2]=q[c+72>>2];q[b+12>>2]=d;d=q[c+68>>2];q[b>>2]=q[c+64>>2];q[b+4>>2]=d;b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){break d}J(115568,115465,2867,117900);G()}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){break b}q[c+48>>2]=(q[d+8>>2]-q[d>>2]|0)/40;b=Qi(a,115614,c+48|0);break d}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){break a}q[c>>2]=115561;b=Qi(a,117965,c)}Ii=c+448|0;return b|0}J(115568,115465,478,119531);G()}J(115568,115465,2856,117900);G()}J(115568,115465,2872,117900);G()}J(115568,115465,2879,117900);G()}function QL(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=Ii-16|0;Ii=i;a:{b:{c:{d:{e:{if(d){d=kt(a,q[b>>2],0);if(d){break e}}q[c+4>>2]=b;d=ak(a,q[b>>2],c);if(d){break e}d=ak(a,q[b+12>>2],c+24|0);if(d){break e}if(q[q[q[c+24>>2]>>2]+152>>2]){Pi(4,65212,65220,0);d=-15;break e}if(q[b+16>>2]==2){q[b+16>>2]=1}l=q[c>>2];j=-2147483648;k=-2147483648;a=2147483647;g=2147483647;d=q[b+8>>2];if(d){while(1){if(d>>>0<=e>>>0){break d}d=q[b+4>>2]+(e<<5)|0;q[d+16>>2]=Oi(q[d>>2]);q[d+20>>2]=Li;m=q[d+28>>2];if(m){n=q[d+24>>2];d=0;while(1){h=w(d,24)+n|0;f=q[h+4>>2];a=(a|0)<(f|0)?a:f;h=q[h>>2];g=(g|0)<(h|0)?g:h;f=f+1|0;j=(f|0)<(j|0)?j:f;f=h+1|0;k=(f|0)<(k|0)?k:f;d=d+1|0;if((m|0)!=(d|0)){continue}break}}d=q[b+8>>2];e=e+1|0;if(d>>>0>e>>>0){continue}break}}q[c+40>>2]=a;q[c+36>>2]=g;q[c+28>>2]=k-g;q[c+32>>2]=q[c+32>>2]&-2147483648|j-a&2147483647;f:{if(!q[l+68>>2]){break f}d=q[l+64>>2];q[i+8>>2]=0;if(o[c+20|0]&1){break c}b=q[b+8>>2];Wi(b,4,c+8|0,c+16|0,c+12|0);e=q[c+8>>2];if(b>>>0>q[c+16>>2]-e>>2>>>0){break b}q[c+12>>2]=e+(b<<2);e=q[d+20>>2];u[i+4>>2]=x(x(t[d+24>>2])*x(.5))*x(a+j|0);u[i>>2]=x(x(e>>>0)*x(.5))*x(g+k|0);if(!b){break f}d=0;while(1){a=q[c+8>>2];if(q[c+12>>2]-a>>2>>>0<=d>>>0){break a}q[a+(d<<2)>>2]=0;d=d+1|0;if((b|0)!=(d|0)){continue}break}}d=0}Ii=i+16|0;return d}J(65392,65404,189,65429);G()}J(65440,65515,493,65571);G()}J(65583,65515,506,65602);G()}J(65610,65515,479,65429);G()}function vw(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-32|0;Ii=f;a:{b:{c:{d:{e:{d=s[a+1056>>1];f:{if((d|0)==s[a+1058>>1]){q[f>>2]=d;Pi(4,7319,7656,f);d=0;break f}g=q[b+4>>2];if(g){h=q[b>>2];d=0;while(1){i=q[(w(d,96)+h|0)+16>>2];if(!i){break e}e=(p[i+102>>1]&1)+e|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}}d=$i((e<<2)+160|0);q[d+88>>2]=-1;q[d+84>>2]=b;q[d+72>>2]=0;q[d+64>>2]=0;q[d+68>>2]=0;q[d+56>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;q[d+40>>2]=1065353216;q[d+32>>2]=1065353216;q[d+36>>2]=1065353216;q[d+24>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=1065353216;q[d>>2]=0;q[d+4>>2]=0;q[d+80>>2]=0;b=q[71493];q[d+96>>2]=q[71492];q[d+100>>2]=b;wn(d+104|0,0);q[d+152>>2]=e;p[d+146>>1]=32767;q[d+80>>2]=a;q[d+148>>2]=q[d+148>>2]&-2147483648|2147450879;b=r[a+3272|0];p[d+144>>1]=32767;e=q[d+140>>2]&-2147483648|2147450879;g=e;h=q[d+136>>2]&61440|b<<7&512|2147418112;q[d+136>>2]=h;q[d+140>>2]=e;c=q[a+1052>>2];if(!c){break d}b=s[a+1058>>1];if(b>>>0>=s[a+1056>>1]){break c}p[a+1058>>1]=b+1;e=s[c+(b<<1)>>1];p[d+144>>1]=32767;q[d+136>>2]=h&2147480064;q[d+140>>2]=g&-65536|e&32767;b=q[a+1036>>2];if(e>>>0>=q[a+1040>>2]-b>>2>>>0){break b}b=b+(e<<2)|0;if(q[b>>2]){break a}q[b>>2]=d;zw(a,d)}Ii=f+32|0;return d}q[f+20>>2]=c;q[f+16>>2]=d;Pi(4,7319,10113,f+16|0);J(10168,7192,720,10174);G()}J(12459,12368,151,12466);G()}J(12470,12368,152,12466);G()}J(12419,9962,479,9454);G()}J(7785,7192,756,7830);G()}function QF(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=Ii-1072|0;Ii=e;d=q[a+8>>2]-q[a+12>>2]>>4;q[b>>2]=q[b>>2]&-49;a:{b:{if((d|0)==1){g=c+1|0;f=xu(a,b);break b}jp(a,d+19|0,145687);d=d-2|0;g=c;while(1){i=d;c:{if((Vi(a,g)|0)==3){f=hl(a,g);if(!f){d=wj(b);PC(d,b);bj(a,0,0);d=(d|0)!=-1;break c}d=e+32|0;q[d+4>>2]=0;q[d+8>>2]=a;q[d>>2]=d+12;d=1024;while(1){d:{d=d>>>0>f>>>0?f:d;h=zl(ml(e+32|0),1,d,b);q[e+32>>2]=h+q[e+32>>2];f=f-h|0;if((d|0)!=(h|0)){break d}if(f){continue}}break}zm(e+32|0);d=1;if(!f){break c}d=(al(a,-1)|0)!=0;break c}d=uj(a,g,0);if(!(r[d|0]==42?d:0)){dk(a,g,145706)}e:{switch(o[d+1|0]-97|0){case 13:q[e+16>>2]=e+32;d=0;if((R$(b,e+16|0)|0)!=1){break c}j=v[e+32>>3];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=j;q[a+8>>2]=q[a+8>>2]+16;d=1;break c;case 0:d=e+32|0;q[d+4>>2]=0;q[d+8>>2]=a;q[d>>2]=d+12;f=-1;d=1024;while(1){f:{d=d>>>0>f>>>0?f:d;h=zl(ml(e+32|0),1,d,b);q[e+32>>2]=h+q[e+32>>2];f=f-h|0;if((d|0)!=(h|0)){break f}if(f){continue}}break}zm(e+32|0);if(f){al(a,-1)}d=1;break c;default:a=dk(a,g,145721);break a;case 11:break e}}d=xu(a,b)}f=d;g=g+1|0;if(!f){break b}d=i-1|0;if(i){continue}break}}if(q[b+76>>2]<=-1){b=q[b>>2]}else{b=q[b>>2]}if(b>>>5&1){b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[e>>2]=ql(b);Lj(a,145661,e);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;a=3;break a}if(!f){Ri(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}a=g-c|0}Ii=e+1072|0;return a}function vs(a){var b=0,c=0,d=0,e=0;d=q[a+4>>2];if(!d){return 0}e=q[a+8>>2];a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{while(1){a=q[(c<<2)+e>>2];if(a&1){return b}E:{if(a&2){a=b|1;break E}if(a&4){break D}if(a&8){break C}if(a&16){break B}if(a&32){break A}if(a&64){break z}if(a&128){break y}if(a&256){break x}if(a&512){break w}if(a&1024){break v}if(a&2048){break u}if(a&4096){break t}if(a&8192){break s}if(a&16384){break r}if(a&32768){break q}if(a&65536){break p}if(a&131072){break o}if(a&262144){break n}if(a&524288){break m}if(a&1048576){break l}if(a&2097152){break k}if(a&4194304){break j}if(a&8388608){break i}if(a&16777216){break h}if(a&33554432){break g}if(a&67108864){break f}if(a&134217728){break e}if(a&268435456){break d}if(a&536870912){break c}if(a&1073741824){break b}if((a|0)<0){break a}b=b+32|0;a=0;c=c+1|0;if(d>>>0>c>>>0){continue}}break}return a}return(b|1)+1|0}return b|3}return(b|3)+1|0}return(b|3)+2|0}return(b|3)+3|0}return b|7}return(b|7)+1|0}return(b|7)+2|0}return(b|7)+3|0}return(b|7)+4|0}return(b|7)+5|0}return(b|7)+6|0}return(b|7)+7|0}return b|15}return(b|15)+1|0}return(b|15)+2|0}return(b|15)+3|0}return(b|15)+4|0}return(b|15)+5|0}return(b|15)+6|0}return(b|15)+7|0}return(b|15)+8|0}return(b|15)+9|0}return(b|15)+10|0}return(b|15)+11|0}return(b|15)+12|0}return(b|15)+13|0}return(b|15)+14|0}return(b|15)+15|0}return b|31}function lr(a){var b=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{if((a|0)<=-8705){if((a|0)<=-9729){if((a|0)<=-10241){if((a|0)<=-10497){if((a|0)==-12288){break e}if((a|0)!=-10624){break c}return 182806}if((a|0)==-10496){break f}if((a|0)!=-10368){break c}return 182745}if((a|0)<=-9985){if((a|0)==-10240){break g}if((a|0)!=-10112){break c}return 182676}if((a|0)==-9984){break h}if((a|0)!=-9856){break c}return 182610}if((a|0)<=-9217){if((a|0)<=-9473){if((a|0)==-9728){break i}if((a|0)!=-9600){break c}return 182544}if((a|0)==-9472){break j}if((a|0)!=-9344){break c}return 182473}if((a|0)<=-8961){if((a|0)==-9216){break k}if((a|0)!=-9088){break c}return 182413}if((a|0)==-8960){break l}if((a|0)!=-8832){break c}return 182352}m:{n:{if((a|0)<=-8321){if((a|0)==-8704){break m}if((a|0)==-8576){break n}if((a|0)!=-8448){break c}return 182258}b=181836;o:{switch(a+82|0){case 14:return 181866;case 12:return 181897;case 10:return 181925;case 8:return 181955;case 6:return 181985;case 4:return 182013;case 2:return 182041;case 0:return 182068;case 15:return 182097;case 13:return 182130;case 11:return 182162;case 16:break b;case 9:break o;case 1:case 3:case 5:case 7:break c;default:break d}}return 182190}return 182287}return 182319}return 182384}return 182443}return 182508}return 182577}return 182640}return 182713}return 182775}return 182840}if((a|0)==-8320){break a}}b=182869}return b}return 182221}function cs(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-144|0;Ii=f;e=Ui(f,0,68);g=Ui(a,0,1024);a:{b:{c:{if((c|0)>0){while(1){a=(r[b+d|0]<<2)+e|0;q[a>>2]=q[a>>2]+1;d=d+1|0;if((d|0)!=(c|0)){continue}break}q[e>>2]=0;d=q[e+4>>2];if((d|0)>2){break b}break c}q[e>>2]=0}if(q[e+12>>2]>8|q[e+8>>2]>=5|(q[e+16>>2]>16|q[e+20>>2]>32)){break b}if(q[e+24>>2]>64|q[e+28>>2]>128|(q[e+32>>2]>256|q[e+36>>2]>512)){break b}if(q[e+40>>2]>1024|q[e+44>>2]>2048|(q[e+48>>2]>4096|q[e+52>>2]>8192)){break b}if(q[e+56>>2]>16384|q[e+60>>2]>32768){break b}q[e+84>>2]=0;p[g+1126>>1]=0;p[g+1026>>1]=0;d:{if((d|0)<=2){f=1;a=d;while(1){i=f;q[((f<<2)+g|0)+1056>>2]=d<<16-f;f=f+1|0;if((f|0)==16){break d}h=f<<2;d=d<<1;q[h+(e+80|0)>>2]=d;h=q[e+h>>2];j=(f<<1)+g|0;k=a+k|0;p[j+1124>>1]=k;p[j+1024>>1]=d;a=h;d=a+d|0;if(!a|(d|0)<=2<>2]=65536;d=1;if((c|0)<1){break a}f=0;while(1){a=r[b+f|0];if(a){i=(e+80|0)+(a<<2)|0;h=q[i>>2];d=(a<<1)+g|0;d=(h-s[d+1024>>1]|0)+s[d+1124>>1]|0;o[(d+g|0)+1156|0]=a;p[((d<<1)+g|0)+1444>>1]=f;e:{if(a>>>0>9){break e}d=h>>>1&21845|h<<1&43690;d=d>>>2&13107|d<<2&52428;d=d>>>4&3855|d<<4&61680;d=(d<<8&65280|d>>>8)>>>16-a|0;if((d|0)>511){break e}j=a<<9|f;a=1<>1]=j;d=a+d|0;if((d|0)<512){continue}break}}q[i>>2]=h+1}d=1;f=f+1|0;if((f|0)!=(c|0)){continue}break}break a}q[213145]=169845;d=0}Ii=e+144|0;return d}function qV(a,b,c,d){var e=0,f=0,g=0;e=Ii-48|0;Ii=e;q[b>>2]=4;q[c>>2]=4;q[d>>2]=20;f=-9058;a:{if(q[a>>2]!=48){break a}f=q[a+8>>2];q[e+44>>2]=f;a=q[a+4>>2];if(!a){f=0;break a}b:{c:{d:{g=a+f|0;a=hk(e+44|0,g,e+40|0,160);if(a){if((a|0)!=-98){break d}a=q[e+44>>2];break b}a=q[e+44>>2]+q[e+40>>2]|0;f=XX(e+44|0,a,e+24|0);f=f?f-8960|0:0;if(f){break a}b=pE(e+24|0,b);if(!b){break c}f=b-8960|0;break a}f=a-8960|0;break a}f=-9062;if(q[e+44>>2]!=(a|0)){break a}}if((a|0)==(g|0)){f=0;break a}e:{f:{a=hk(e+44|0,g,e+40|0,161);g:{if(a){if((a|0)!=-98){break f}a=q[e+44>>2];break g}a=q[e+44>>2]+q[e+40>>2]|0;f=hy(e+44|0,a,e+24|0,e+8|0);if(f){break a}f=-8366;if(q[e+28>>2]!=9){break a}if(Ej(174084,q[e+32>>2],9)){break a}f=cP(q[e+8>>2],q[e+12>>2],q[e+16>>2],c);if(f){break a}f=-9062;if(q[e+44>>2]!=(a|0)){break a}}if((a|0)==(g|0)){f=0;break a}h:{i:{j:{a=hk(e+44|0,g,e+40|0,162);if(a){if((a|0)!=-98){break j}a=q[e+44>>2];break h}a=q[e+44>>2]+q[e+40>>2]|0;b=Xq(e+44|0,a,d);if(!b){break i}f=b-8960|0;break a}f=a-8960|0;break a}f=-9062;if(q[e+44>>2]!=(a|0)){break a}}f=0;if((a|0)==(g|0)){break a}a=hk(e+44|0,g,e+40|0,163);k:{if(a){if((a|0)!=-98){break e}a=q[e+44>>2];break k}a=q[e+44>>2]+q[e+40>>2]|0;b=Xq(e+44|0,a,e+4|0);if(b){f=b-8960|0;break a}f=-9062;if(q[e+44>>2]!=(a|0)){break a}f=-8960;if(q[e+4>>2]!=1){break a}}f=(a|0)==(g|0)?0:-9062;break a}f=a-8960|0;break a}f=a-8960|0}Ii=e+48|0;return f}function my(a,b){var c=0,d=0,e=0,f=0;if(!(q[a+40>>2]|q[a+44>>2])){return-28928}c=-28928;a:{e=q[a+108>>2];if((q[a+100>>2]-e|0)+16749>>>0>>0){break a}if(!(r[q[a>>2]+184|0]&2)){c=0;d=q[a+136>>2];if(d>>>0>=b>>>0){break a}while(1){c=q[a+96>>2];b:{if(c){c=(Mi[c|0](q[a+88>>2])|0)==2?-1:0;break b}c=0}if(c){return-26624}d=b-d|0;c=q[a+44>>2];c:{if(c){c=Mi[c|0](q[a+48>>2],q[a+108>>2]+q[a+136>>2]|0,d,q[q[a>>2]+148>>2])|0;break c}c=Mi[q[a+40>>2]](q[a+48>>2],q[a+108>>2]+q[a+136>>2]|0,d)|0}if(!c){return-29312}if((c|0)<0){break a}if(c>>>0>d>>>0){return-27648}d=q[a+136>>2]+c|0;q[a+136>>2]=d;c=0;if(b>>>0>d>>>0){continue}break}break a}if(!q[a+92>>2]|!q[a+96>>2]){break a}f=q[a+144>>2];if(f){c=-27648;d=q[a+136>>2];if(f>>>0>d>>>0){break a}c=d-f|0;q[a+136>>2]=c;if(c){bl(e,e+f|0,c)}q[a+144>>2]=0}c=0;d=b;b=q[a+136>>2];if(d>>>0<=b>>>0){break a}c=-27648;if(b){break a}d:{b=q[a+96>>2];e:{if(b){b=(Mi[b|0](q[a+88>>2])|0)==2?-1:0;break e}b=0}if(!b){e=q[a+108>>2];c=q[a+100>>2]-e|0;if(q[a+4>>2]!=16){b=q[a+68>>2]+488|0}else{b=q[a>>2]+148|0}d=c+16749|0;c=q[a+44>>2];f:{if(c){b=Mi[c|0](q[a+48>>2],e,d,q[b>>2])|0;break f}b=Mi[q[a+40>>2]](q[a+48>>2],e,d)|0}if(!b){return-29312}if((b|0)!=-26624){break d}}b=q[a+92>>2];if(b){Mi[b|0](q[a+88>>2],0,0)}c=-26624;if(q[a+4>>2]==16){break a}if(TR(q[a>>2],q[a+68>>2])){break a}a=Qq(a);return a?a:-26880}if((b|0)<0){return b}q[a+136>>2]=b;return 0}return c}function gu(a,b){var c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),q=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=x(0);d=u[b+4>>2];g=u[b+32>>2];h=u[b>>2];k=u[b+36>>2];v=x(x(d*g)-x(h*k));l=u[b+8>>2];m=u[b+40>>2];w=x(x(l*g)-x(h*m));i=u[b+48>>2];n=u[b+28>>2];f=x(x(d*m)-x(l*k));o=u[b+24>>2];p=u[b+12>>2];q=u[b+44>>2];y=x(x(p*k)-x(d*q));e=u[b+20>>2];z=x(x(p*m)-x(l*q));F=x(x(x(n*f)+x(o*y))-x(e*z));r=u[b+56>>2];s=u[b+52>>2];A=x(x(e*r)-x(o*s));t=u[b+60>>2];B=x(x(n*s)-x(e*t));C=x(x(n*r)-x(o*t));G=x(x(x(p*A)+x(l*B))-x(d*C));j=u[b+16>>2];H=x(x(x(s*z)-x(f*t))-x(y*r));I=x(x(x(k*C)-x(q*A))-x(m*B));c=x(x(1)/x(x(i*F)+x(x(g*G)+x(x(j*H)+x(h*I)))));u[a+60>>2]=x(x(x(o*v)-x(e*w))-x(j*f))*c;D=x(x(e*i)-x(j*s));E=x(x(o*i)-x(j*r));u[a+56>>2]=x(x(x(l*D)-x(d*E))-x(h*A))*c;u[a+52>>2]=x(x(i*f)+x(x(w*s)-x(v*r)))*c;u[a+48>>2]=x(x(g*A)+x(x(k*E)-x(m*D)))*c;f=e;e=x(x(p*g)-x(h*q));u[a+44>>2]=x(x(x(f*e)-x(n*v))-x(j*y))*c;f=d;d=x(x(n*i)-x(j*t));u[a+40>>2]=x(x(x(f*d)-x(p*D))-x(h*B))*c;u[a+36>>2]=x(x(i*y)+x(x(v*t)-x(s*e)))*c;u[a+32>>2]=x(x(g*B)+x(x(q*D)-x(k*d)))*c;u[a+28>>2]=x(x(j*z)+x(x(n*w)-x(o*e)))*c;u[a+24>>2]=x(x(h*C)+x(x(p*E)-x(l*d)))*c;u[a+20>>2]=x(x(x(e*r)-x(w*t))-x(i*z))*c;u[a+16>>2]=x(x(x(m*d)-x(q*E))-x(g*C))*c;u[a+12>>2]=F*c;u[a+8>>2]=G*c;u[a+4>>2]=H*c;u[a>>2]=I*c}function fza(){var a=0;q[72858]=Oi(46368);q[72859]=Li;q[72860]=Oi(46387);q[72861]=Li;q[72862]=Oi(46404);q[72863]=Li;q[72864]=Oi(46413);q[72865]=Li;q[72866]=Oi(46419);q[72867]=Li;q[72868]=Oi(46429);q[72869]=Li;q[72870]=Oi(46437);q[72871]=Li;q[72872]=Oi(46444);q[72873]=Li;q[72874]=Oi(46453);q[72875]=Li;q[72876]=Oi(46465);q[72877]=Li;q[72878]=Oi(46474);q[72879]=Li;q[72880]=Oi(46479);q[72881]=Li;q[72882]=Oi(46485);q[72883]=Li;q[72884]=Oi(46491);q[72885]=Li;q[72886]=Oi(46500);q[72887]=Li;q[72888]=Oi(46510);q[72889]=Li;q[72890]=Oi(46519);q[72891]=Li;q[72892]=Oi(46528);q[72893]=Li;q[72894]=Oi(46537);q[72895]=Li;q[72896]=Oi(46546);q[72897]=Li;q[72898]=Oi(46555);q[72899]=Li;q[72900]=Oi(46564);q[72901]=Li;q[72902]=Oi(46573);q[72903]=Li;q[72904]=Oi(46582);q[72905]=Li;a=Oi(46591);q[72925]=0;q[72926]=0;q[72924]=295392;q[72922]=0;q[72920]=46619;q[72919]=46603;q[72918]=0;q[72916]=0;q[72914]=0;q[72912]=0;q[72910]=1;q[72908]=0;q[72909]=3;q[72906]=a;q[72907]=Li;q[72927]=0;q[72928]=0;q[72929]=0;q[72946]=291632;q[72944]=0;q[72942]=46657;q[72941]=46632;q[72940]=0;q[72938]=0;q[72936]=0;q[72934]=0;q[72932]=1;q[72930]=0;q[72931]=3;q[72951]=0;q[72949]=0;q[72950]=0;q[72947]=0;q[72948]=0;q[72968]=291632;q[72966]=0;q[72964]=46692;q[72963]=46668;q[72962]=0;q[72960]=0;q[72958]=0;q[72956]=0;q[72954]=1;q[72952]=0;q[72953]=3;q[72973]=0;q[72971]=0;q[72972]=0;q[72969]=0;q[72970]=0}function _k(a,b,c){var d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),q=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0),H=x(0),I=x(0),J=x(0),K=x(0);d=u[c+28>>2];e=u[c+20>>2];f=u[c+24>>2];g=u[c+44>>2];h=u[c+36>>2];i=u[c+40>>2];j=u[b+52>>2];k=u[b+20>>2];l=u[b+36>>2];m=u[b+56>>2];n=u[b+24>>2];o=u[b+40>>2];p=u[c+60>>2];q=u[b+60>>2];r=u[c+52>>2];s=u[b+28>>2];t=u[c+56>>2];v=u[b+44>>2];w=u[c+16>>2];y=u[c+32>>2];z=u[b+4>>2];A=u[b+8>>2];B=u[c+48>>2];C=u[b+12>>2];D=u[b>>2];E=u[c>>2];F=u[b+16>>2];G=u[c+4>>2];H=u[b+32>>2];I=u[c+8>>2];J=u[b+48>>2];K=u[c+12>>2];u[a>>2]=x(x(x(D*E)+x(F*G))+x(H*I))+x(J*K);u[a+60>>2]=x(x(x(C*B)+x(s*r))+x(v*t))+x(q*p);u[a+56>>2]=x(x(x(A*B)+x(n*r))+x(o*t))+x(m*p);u[a+52>>2]=x(x(x(z*B)+x(k*r))+x(l*t))+x(j*p);u[a+48>>2]=x(x(x(D*B)+x(F*r))+x(H*t))+x(J*p);u[a+44>>2]=x(x(x(C*y)+x(s*h))+x(v*i))+x(q*g);u[a+40>>2]=x(x(x(A*y)+x(n*h))+x(o*i))+x(m*g);u[a+36>>2]=x(x(x(z*y)+x(k*h))+x(l*i))+x(j*g);u[a+32>>2]=x(x(x(D*y)+x(F*h))+x(H*i))+x(J*g);u[a+28>>2]=x(x(x(C*w)+x(s*e))+x(v*f))+x(q*d);u[a+24>>2]=x(x(x(A*w)+x(n*e))+x(o*f))+x(m*d);u[a+20>>2]=x(x(x(z*w)+x(k*e))+x(l*f))+x(j*d);u[a+16>>2]=x(x(x(D*w)+x(F*e))+x(H*f))+x(J*d);u[a+12>>2]=x(x(x(E*C)+x(G*s))+x(I*v))+x(K*q);u[a+8>>2]=x(x(x(E*A)+x(G*n))+x(I*o))+x(K*m);u[a+4>>2]=x(x(x(E*z)+x(G*k))+x(I*l))+x(K*j)}function Ws(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{Oza(+a);f=Lza(1)|0;Lza(0)|0;d:{e:{b=f;f=b&2147483647;if(f>>>0>=1078159482){Oza(+a);f=Lza(1)|0;f=f&2147483647;if((f|0)==2146435072&(Lza(0)|0)!=0|f>>>0>2146435072){break a}if((b|0)<0){return-1}if(a>709.782712893384^1){break e}return a*8.98846567431158e+307}if(f>>>0<1071001155){break c}if(f>>>0>1072734897){break e}if((b|0)>0?1:(b|0)>=0){b=1;c=1.9082149292705877e-10;d=a+ -.6931471803691238;break d}b=-1;c=-1.9082149292705877e-10;d=a+.6931471803691238;break d}Oza(.5);b=Lza(1)|0;h=Lza(0)|0;Oza(+a);f=Lza(1)|0;Lza(0)|0;Mza(0,h|0);Mza(1,b&2147483647|f&-2147483648);c=a*1.4426950408889634+ +Nza();f:{if(y(c)<2147483648){b=~~c;break f}b=-2147483648}e=+(b|0);c=e*1.9082149292705877e-10;d=a+e*-.6931471803691238}a=d;a=a-c;c=d-a-c;break b}if(f>>>0<1016070144){break a}b=0}g=a*.5;e=a*g;d=e*(e*(e*(e*(e*-2.0109921818362437e-7+4008217827329362e-21)+ -793650757867488e-19)+.0015873015872548146)+ -.03333333333333313)+1;i=d;d=3-g*d;d=e*((i-d)/(6-a*d));if(!b){return a-(a*d-e)}c=a*(d-c)-c-e;g:{switch(b+1|0){case 0:return(a-c)*.5+ -.5;case 2:if(!(a<-.25^1)){return(c-(a+.5))*-2}a=a-c;return a+a+1;default:break g}}Mza(0,0);Mza(1,b+1023<<20);e=+Nza();if(b>>>0>=57){a=a-c+1;return((b|0)==1024?(a+a)*8.98846567431158e+307:a*e)+ -1}Mza(0,0);Mza(1,1023-b<<20);d=+Nza();b=(b|0)<20;a=((b?1-d:a-(c+d))+(b?a-c:1))*e}return a}function sZ(a,b,c){var d=0,e=0,f=0,g=0;d=-1;a:{b:{c:{switch(q[c+8>>2]){case 3:f=v[c>>3];d:{if(y(f)<2147483648){d=~~f;break d}d=-2147483648}if(!((d|0)<1|+(d|0)!=f|(d|0)>q[b+28>>2])){d=d-1|0;break a}d=q[b+16>>2];if(f==0){break b}g=q[b+16>>2];Oza(+f);e=Lza(1)|0;d=Lza(0)|0;e=d+e|0;d=g+((e>>>0)%((-1<>>0)<<5)|0;break b;case 4:d=q[b+16>>2]+((q[q[c>>2]+8>>2]&(-1<>2]+((q[c>>2]&(-1<>2]+(t[c>>2]%((-1<>>0)<<5)|0;break b;case 0:break a;default:break c}}d=q[b+16>>2]+(t[c>>2]%((-1<>>0)<<5)|0}while(1){e:{if(!hp(d+16|0,c)){if(q[d+24>>2]!=11|q[c+8>>2]<4|q[d+16>>2]!=q[c>>2]){break e}}d=q[b+28>>2]+(d-q[b+16>>2]>>5)|0;break a}d=q[d+28>>2];if(d){continue}break}d=0;Yk(a,142591,0)}g=d+1|0;e=q[b+28>>2];f:{g:{while(1){a=d;d=d+1|0;if((e|0)<=(d|0)){break g}if(!q[(q[b+12>>2]+(d<<4)|0)+8>>2]){continue}break}q[c+8>>2]=3;v[c>>3]=a+2|0;a=q[b+12>>2]+(d<<4)|0;b=q[a+4>>2];q[c+16>>2]=q[a>>2];q[c+20>>2]=b;break f}d=(e|0)>(g|0)?0:g-e|0;e=1<>2];while(1){if(q[(a+(d<<5)|0)+8>>2]){d=d<<5;a=d+a|0;e=q[a+20>>2];q[c>>2]=q[a+16>>2];q[c+4>>2]=e;q[c+8>>2]=q[a+24>>2];a=d+q[b+16>>2]|0;b=q[a+4>>2];q[c+16>>2]=q[a>>2];q[c+20>>2]=b;break f}d=d+1|0;if((e|0)>(d|0)){continue}break}}return 0}q[c+24>>2]=q[a+8>>2];return 1}function Wx(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;j=Ii-16|0;Ii=j;l=q[b+16>>2];m=r[b+7|0];k=q[b+28>>2];if((k|0)<(c|0)){e=b;a:{if(c+1>>>0<=268435455){h=Cj(a,q[b+12>>2],k<<4,c<<4);break a}h=mk(a)}q[e+12>>2]=h;e=q[b+28>>2];if((e|0)<(c|0)){while(1){q[(h+(e<<4)|0)+8>>2]=0;e=e+1|0;if((e|0)!=(c|0)){continue}break}}q[b+28>>2]=c}ID(a,b,d);if((c|0)<(k|0)){q[b+28>>2]=c;e=c;while(1){f=e+1|0;g=q[b+12>>2]+(e<<4)|0;if(q[g+8>>2]){b:{c:{d:{if(t[b+28>>2]>e>>>0){e=g;break d}i=+(f|0);if(f){e=q[b+16>>2];Oza(+i);h=Lza(1)|0;d=Lza(0)|0;n=e;e=h;h=d+e|0;e=n+((h>>>0)%((-1<>>0)<<5)|0}else{e=q[b+16>>2]}while(1){if(v[e+16>>3]==i?q[e+24>>2]==3:0){break d}e=q[e+28>>2];if(e){continue}break}break c}if((e|0)!=141056){break b}i=+(f|0)}q[j+8>>2]=3;v[j>>3]=i;e=Wp(a,b,j)}d=q[g+4>>2];q[e>>2]=q[g>>2];q[e+4>>2]=d;q[e+8>>2]=q[g+8>>2]}e=f;if((k|0)!=(e|0)){continue}break}d=b;e:{if(c+1>>>0<=268435455){c=Cj(a,q[b+12>>2],k<<4,c<<4);break e}c=mk(a)}q[d+12>>2]=c}h=1<>2]){g=f+16|0;d=Rs(b,g);o[b+6|0]=0;if((d|0)==141056){f:{g:{switch(q[f+24>>2]){case 0:Yk(a,142553,0);break f;case 3:break g;default:break f}}i=v[g>>3];if(i==i){break f}Yk(a,142572,0)}d=Wp(a,b,g)}g=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=g;q[d+8>>2]=q[f+8>>2]}d=(c|0)>1;c=e;if(d){continue}break}}if((l|0)!=142616){Cj(a,l,h<<5,0)}Ii=j+16|0}function Ny(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-112|0;Ii=f;a:{if(!(r[a+56|0]&2)){d=q[a+20>>2];break a}g=q[a+32>>2];c=g;e=q[a+68>>2];b:{if(!e){break b}c=g;if(!r[a+57|0]){break b}c=q[a+20>>2];h=q[c+8>>2];d=q[a+8>>2];q[f+28>>2]=-1;q[f+8>>2]=1;q[f+104>>2]=(c-q[a+40>>2]|0)/24;if((q[a+28>>2]-d|0)<=320){c=q[a+44>>2];sn(a,(c|0)<20?c+20|0:c<<1)}q[q[a+20>>2]+8>>2]=q[a+8>>2]+320;o[a+57|0]=0;Mi[e|0](a,f+8|0);o[a+57|0]=1;c=q[a+32>>2];q[q[a+20>>2]+8>>2]=c+(h-g|0);q[a+8>>2]=(d-g|0)+c}d=q[a+20>>2];c:{if(r[q[q[d+4>>2]>>2]+6|0]){break c}e=r[a+56|0];if(!(e&2)){break c}while(1){h=q[d+20>>2];q[d+20>>2]=h-1;if(!h){break c}h=q[a+68>>2];if(!(!h|!r[a+57|0])){e=q[a+8>>2];i=q[d+8>>2];q[f+104>>2]=0;q[f+28>>2]=-1;q[f+8>>2]=4;if((q[a+28>>2]-e|0)<=320){d=q[a+44>>2];sn(a,(d|0)<20?d+20|0:d<<1)}e=e-c|0;q[q[a+20>>2]+8>>2]=q[a+8>>2]+320;o[a+57|0]=0;Mi[h|0](a,f+8|0);o[a+57|0]=1;h=i-c|0;d=q[a+20>>2];c=q[a+32>>2];q[d+8>>2]=h+c;q[a+8>>2]=c+e;e=r[a+56|0]}if(e&2){continue}break}}b=(b-g|0)+c|0}c=d-24|0;q[a+20>>2]=c;g=q[d+16>>2];d=q[d+4>>2];q[a+12>>2]=q[c>>2];q[a+24>>2]=q[c+12>>2];d:{if(!g){break d}c=g;while(1){if(t[a+8>>2]>b>>>0){e=q[b+4>>2];q[d>>2]=q[b>>2];q[d+4>>2]=e;q[d+8>>2]=q[b+8>>2];d=d+16|0;b=b+16|0;c=c-1|0;if(c){continue}break d}break}if((c|0)<1){break d}while(1){q[d+8>>2]=0;d=d+16|0;b=(c|0)>1;c=c-1|0;if(b){continue}break}}q[a+8>>2]=d;Ii=f+112|0;return g+1|0}function ewa(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Ii-1024|0;Ii=h;while(1){a:{if(!gxa(b)){break a}a=0;d=$N(b);if(!d){HC(h,(d<<2)+h|0);break a}while(1){q[(a<<2)+h>>2]=cwa(a,b)<<8|a;a=a+1|0;if((d|0)!=(a|0)){continue}break}HC(h,(d<<2)+h|0);a=0;if(!d){break a}while(1){c=q[(a<<2)+h>>2];e=((b<<9)+302480|0)+((c&255)<<1)|0;o[e+1|0]=a;o[e|0]=c>>>8;a=a+1|0;if((d|0)!=(a|0)){continue}break}}b=b+1|0;if((b|0)!=21){continue}break}while(1){c=0;e=65535;while(1){j=w(c,86)+32|0;a=0;while(1){k=b;b=(j+w(a,42)>>>6|0)-f|0;i=w(b,b);g=i>>>0<(e&65535)>>>0;b=g?a:k;d=g?c:d;e=g?i:e;a=a+1|0;if((a|0)!=128){continue}break}c=c+1|0;if((c|0)!=128){continue}break}j=f<<3;a=j+313232|0;o[a+3|0]=b;o[a+2|0]=d;p[a>>1]=e;e=65535;c=0;while(1){i=w(c<<1|1,43)+32|0;a=0;while(1){k=b;b=(i+w(a<<1|1,21)>>>6|0)-f|0;l=w(b,b);g=l>>>0<(e&65535)>>>0;b=g?a:k;d=g?c:d;e=g?l:e;a=a+1|0;if((a|0)!=128){continue}break}c=c+1|0;if((c|0)!=128){continue}break}a=j+313232|0;p[a+4>>1]=e;o[a+7|0]=b;o[a+6|0]=d;f=f+1|0;if((f|0)!=256){continue}break}c=0;while(1){f=0;b=65535;while(1){j=w(f<<1|f>>>6,43)+32|0;a=0;while(1){d=(j+w(a<<1|a>>>6,21)>>>6|0)-c|0;i=w(d,d);d=i>>>0<(b&65535)>>>0;b=d?i:b;e=d?f:e;g=d?a:g;a=a+1|0;if((a|0)!=128){continue}break}f=f+1|0;if((f|0)!=128){continue}break}a=(c<<2)+315280|0;o[a+3|0]=g;o[a+2|0]=e;p[a>>1]=b;c=c+1|0;if((c|0)!=256){continue}break}Ii=h+1024|0}function G4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0);c=Ii-160|0;Ii=c;b=Ll(a,1);a:{b:{c:{d:{if((b|0)!=q[210436]){if((b|0)==q[210437]){break d}if((b|0)==q[210438]){break c}q[c+144>>2]=134032;q[c+140>>2]=134016;q[c+136>>2]=134e3;q[c+132>>2]=135598;q[c+128>>2]=134064;a=Qi(a,135957,c+128|0);break a}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];e:{if(!(e!=e|f!=f)){d=u[b+8>>2];if(d==d){break e}}d=u[b+8>>2];v[c+16>>3]=f;v[c+24>>3]=d;v[c+8>>3]=e;q[c>>2]=1;Qi(a,134131,c);d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(F(x(x(x(e*e)+x(f*f))+x(d*d))));break b}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];f:{g:{if(e!=e|f!=f){break g}d=u[b+8>>2];if(d!=d){break g}g=u[b+12>>2];if(g==g){break f}}d=u[b+8>>2];g=u[b+12>>2];v[c+48>>3]=f;v[c- -64>>3]=g;v[c+56>>3]=d;v[c+40>>3]=e;q[c+32>>2]=1;Qi(a,134221,c+32|0);g=u[b+12>>2];d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(F(x(x(x(x(e*e)+x(f*f))+x(d*d))+x(g*g))));break b}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];h:{i:{if(e!=e|f!=f){break i}d=u[b+8>>2];if(d!=d){break i}g=u[b+12>>2];if(g==g){break h}}d=u[b+8>>2];g=u[b+12>>2];v[c+96>>3]=f;v[c+112>>3]=g;v[c+104>>3]=d;v[c+88>>3]=e;q[c+80>>2]=1;Qi(a,134315,c+80|0);g=u[b+12>>2];d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(F(x(x(x(x(e*e)+x(f*f))+x(d*d))+x(g*g))))}q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+160|0;return a|0}function Aga(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a:{b:{c:{d:{e:{if(a){if(!c){break e}if(!b){break d}e=q[a+128>>2];if(!(q[b+196>>2]==q[d>>2]?(e|0)==q[b+200>>2]:0)){k=b;i=s[b+192>>1];if(i){while(1){h=q[d+4>>2];e=q[d+8>>2];f:{g:{if((h|0)==(e|0)){break g}e=(e-h|0)/24|0;l=e>>>0>1?e:1;e=w(g,24)+b|0;m=q[e>>2];n=q[e+4>>2];f=0;while(1){j=w(f,24)+h|0;e=j;if((m|0)!=q[e>>2]|q[e+4>>2]!=(n|0)){f=f+1|0;if((l|0)!=(f|0)){continue}break g}break}f=q[j+8>>2];if((f|0)!=-1){break f}}f=65535;if(!(r[q[75054]+156|0]&64)){break f}if(!(K()|0)){break f}while(1){if(K()|0){continue}break}}p[(w(g,24)+b|0)+10>>1]=f;g=g+1|0;if((i|0)!=(g|0)){continue}break}e=q[a+128>>2]}q[k+200>>2]=e;q[b+196>>2]=d}Q(34962,c|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}if(s[b+192>>1]){c=0;while(1){d=w(c,24)+b|0;a=p[d+10>>1];h:{if((a|0)==-1){break h}$a(a|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Va(p[d+10>>1],s[d+12>>1],q[(q[d+16>>2]<<2)+91872>>2],r[d+20|0],s[b+194>>1],s[d+14>>1]);if(!(r[q[75054]+156|0]&64)){break h}a=K()|0;if(a){break a}}c=c+1|0;if(c>>>0>1]){continue}break}}return}J(88636,88575,1752,91920);G()}J(91829,88575,1753,91920);G()}J(91843,88575,1754,91920);G()}lj(a,91920,1766);J(88669,88575,1766,91920);G()}lj(a,91920,1773);J(88669,88575,1773,91920);G()}lj(a,91920,1782);J(88669,88575,1782,91920);G()}function Tr(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=r[b+2|0];e=r[b+1|0];i=(c<<4)+105744|0;f=q[i>>2];b=r[b|0];j=(b<<3|b>>>2)&255;c=f+j|0;a:{b:{if(c>>>0<256){d=c;break b}b=255;if((c|0)>=0){break a}}b=d}c=b;b=0;k=(e<<3|e>>>2)&255;d=k+f|0;c:{d:{if(d>>>0<256){b=d;break d}e=255;if((d|0)>=0){break c}}e=b}d=e;o[a+3|0]=255;b=0;h=a;g=(g<<3|g>>>2)&255;e=g+f|0;e:{f:{if(e>>>0<256){b=e;break f}f=255;if((e|0)>=0){break e}}f=b}o[h+2|0]=f;o[a+1|0]=d;o[a|0]=c;b=0;f=q[i+4>>2];d=f+j|0;g:{h:{if(d>>>0<256){b=d;break h}c=255;if((d|0)>=0){break g}}c=b}b=0;d=f+k|0;i:{j:{if(d>>>0<256){b=d;break j}e=255;if((d|0)>=0){break i}}e=b}d=e;o[a+7|0]=255;b=0;h=a;e=f+g|0;k:{l:{if(e>>>0<256){b=e;break l}f=255;if((e|0)>=0){break k}}f=b}o[h+6|0]=f;o[a+5|0]=d;o[a+4|0]=c;b=0;f=q[i+8>>2];d=f+j|0;m:{n:{if(d>>>0<256){b=d;break n}c=255;if((d|0)>=0){break m}}c=b}b=0;d=f+k|0;o:{p:{if(d>>>0<256){b=d;break p}e=255;if((d|0)>=0){break o}}e=b}d=e;o[a+11|0]=255;b=0;h=a;e=f+g|0;q:{r:{if(e>>>0<256){b=e;break r}f=255;if((e|0)>=0){break q}}f=b}o[h+10|0]=f;o[a+9|0]=d;o[a+8|0]=c;b=0;f=q[i+12>>2];d=f+j|0;s:{t:{if(d>>>0<256){b=d;break t}c=255;if((d|0)>=0){break s}}c=b}b=0;d=f+k|0;u:{v:{if(d>>>0<256){b=d;break v}e=255;if((d|0)>=0){break u}}e=b}d=e;o[a+15|0]=255;b=0;h=a;e=f+g|0;w:{x:{if(e>>>0<256){b=e;break x}f=255;if((e|0)>=0){break w}}f=b}o[h+14|0]=f;o[a+13|0]=d;o[a+12|0]=c}function Iba(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{if(!b|(b|0)==(c|0)){break b}c:{d:{e:{f:{g=b&65535;h=q[a+32>>2];if(g>>>0<(q[a+36>>2]-h|0)/592>>>0){if(s[(w(g,592)+h|0)+568>>1]!=(b>>>16|0)){break f}f=w(g,592)+h|0;if(s[f+570>>1]!=(b&65535)){break e}Br(a,f);if(!c){b=0;break d}d=q[a+32>>2];e=(q[a+36>>2]-d|0)/592|0;c=c&65535;if(e>>>0<=c>>>0){break a}i=s[(d+w(c,592)|0)+572>>1];b=0;g:{if((i|0)==65535){break g}if(e>>>0<=i>>>0){break a}b=d+w(i,592)|0}c=s[(d+w(c,592)|0)+576>>1];if((c|0)==65535){break d}if(c>>>0>=e>>>0){break a}e=d+w(c,592)|0;c=e+580|0;d=e+578|0;e=s[e+570>>1];break c}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}c=a+382|0;d=a+380|0;e=65535}i=w(g,592)+h|0;p[i+576>>1]=e;if(b){d=s[b+570>>1];h:{if((d|0)==s[c>>1]){p[c>>1]=s[f+570>>1];p[(w(g,592)+h|0)+574>>1]=65535;d=s[b+570>>1];break h}c=s[b+574>>1];if((c|0)==65535){break h}e=q[a+36>>2];a=q[a+32>>2];if(c>>>0>=(e-a|0)/592>>>0){break a}p[(a+w(c,592)|0)+572>>1]=s[f+570>>1];p[(w(g,592)+h|0)+574>>1]=c}p[b+574>>1]=s[f+570>>1];p[(w(g,592)+h|0)+572>>1]=d;return}p[i+572>>1]=65535;p[i+574>>1]=s[d>>1];b=s[d>>1];i:{if((b|0)==65535){b=s[f+570>>1];break i}e=q[a+36>>2];a=q[a+32>>2];if(b>>>0>=(e-a|0)/592>>>0){break a}a=a+w(b,592)|0;b=s[f+570>>1];p[a+572>>1]=b}p[d>>1]=b;if(s[c>>1]!=65535){break b}p[c>>1]=s[f+570>>1]}return}J(201665,201514,479,201676);G()}function wM(a,b,c){var d=0,e=0,f=0;d=Ii-80|0;Ii=d;a=a?q[a+120>>2]:0;f=nj(d+56|0,a,0,14313,174);q[d+48>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;a:{if(!c){a=Fw(d+16|0);if(!a){break a}e=GB(a);break a}gr(a,b,c);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;if(Hj(a,-2)){while(1){b:{if(!uk(a,-2)){break b}q[d+12>>2]=0;c:{switch(BB(a,-1,d+12|0)|0){case 1:q[d+20>>2]=q[d+20>>2]+1;break b;case 2:q[d+32>>2]=q[d+32>>2]+1;break b;case 3:q[d+36>>2]=q[d+36>>2]+1;break b;case 4:q[d+40>>2]=q[d+40>>2]+1;break b;case 5:q[d+44>>2]=q[d+44>>2]+1;break b;case 6:q[d+48>>2]=q[d+48>>2]+1;break b;case 7:case 8:Ri(a,-4);break a;case 0:break c;default:break b}}q[d+16>>2]=q[d+16>>2]+1}Ri(a,-2);if(Hj(a,-2)){continue}break}}b=Fw(d+16|0);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){d:{if(!uk(a,-2)){break d}q[d+12>>2]=0;c=Oi(uj(a,-2,0));e=Li;e:{switch(BB(a,-1,d+12|0)|0){case 1:aM(b,c,e,nl(a,-1),Li);break d;case 2:jra(b,c,e,Hz(a,-1));break d;case 3:Fp(b,c,e,3,Bl(a,-1));break d;case 4:Fp(b,c,e,4,rm(a,-1));break d;case 5:Fp(b,c,e,5,kr(a,-1));break d;case 6:cM(b,c,e,(Uj(a,-1)|0)!=0);break d;case 7:case 8:J(14356,14313,261,14362);G();case 0:break e;default:break d}}u[d+8>>2]=Mj(a,-1);Fp(b,c,e,0,d+8|0)}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);e=GB(b)}mj(f);Ii=d+80|0;return e}function Op(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{switch(d|0){case 2:c=q[c>>2];b=b-4|0;d=q[b>>2];e=c+(d<<3)|0;f=q[e>>2];h=q[a>>2];c=c+(h<<3)|0;g=q[c>>2];e=q[e+4>>2];c=q[c+4>>2];if((e|0)==(c|0)&f>>>0>=g>>>0|c>>>0>>0){break a}q[a>>2]=d;q[b>>2]=h;return;case 0:case 1:break a;default:break b}}if((d|0)<=128){if((a|0)==(b|0)){break a}d=a+4|0;if((d|0)==(b|0)){break a}f=q[c>>2];while(1){h=q[d>>2];e=a;c:{if((e|0)==(d|0)){break c}g=f+(h<<3)|0;e=d;while(1){c=e-4|0;j=q[c>>2];i=f+(j<<3)|0;k=q[i>>2];l=q[g+4>>2];i=q[i+4>>2];if((l|0)==(i|0)&k>>>0<=t[g>>2]|i>>>0>>0){break c}q[e>>2]=j;e=c;if((e|0)!=(a|0)){continue}break}e=a}q[e>>2]=h;d=d+4|0;if((d|0)!=(b|0)){continue}break}break a}h=d>>>1|0;j=h<<2;g=j+a|0;d:{if((d|0)<=(f|0)){IC(a,g,c,h,e);f=b;b=e+j|0;IC(g,f,c,d-h|0,b);f=(d<<2)+e|0;c=q[c>>2];d=b;while(1){if((d|0)==(f|0)){if((b|0)==(e|0)){break a}while(1){q[a>>2]=q[e>>2];a=a+4|0;e=e+4|0;if((b|0)!=(e|0)){continue}break}break a}h=q[d>>2];g=c+(h<<3)|0;j=q[g>>2];i=q[e>>2];k=c+(i<<3)|0;l=q[k>>2];g=q[g+4>>2];k=q[k+4>>2];e:{if((g|0)==(k|0)&j>>>0>>0|g>>>0>>0){q[a>>2]=h;d=d+4|0;break e}q[a>>2]=i;e=e+4|0}a=a+4|0;if((b|0)!=(e|0)){continue}break}break d}Op(a,g,c,h,e,f);d=d-h|0;Op(g,b,c,d,e,f);ox(a,g,b,c,h,d,e,f);break a}if((d|0)==(f|0)){break a}while(1){q[a>>2]=q[d>>2];a=a+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}}}function UH(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii+ -64|0;Ii=e;j=q[a+112>>2];o[e+59|0]=0;o[e+60|0]=0;o[e+61|0]=0;o[e+62|0]=0;q[e+52>>2]=0;q[e+56>>2]=0;q[e+44>>2]=0;q[e+48>>2]=0;q[e+36>>2]=1;q[e+40>>2]=1;q[e+16>>2]=0;q[e+20>>2]=0;o[e+62|0]=128;q[e+24>>2]=q[a+116>>2];q[e+28>>2]=q[a+120>>2];q[e+32>>2]=q[a+124>>2];g=q[a+128>>2];l=w(g,q[a+132>>2]);h=q[b+96>>2];m=q[a+108>>2];b=j;a:{b:{c:{while(1){d:{f=(b+1>>>0)%(l>>>0)|0;e:{k=(b<<2)+m|0;i=q[k>>2];f:{if(i){if((h|0)==q[i+56>>2]){break e}q[a+112>>2]=f;o[i+32|0]=0;break f}q[a+112>>2]=f}q[k>>2]=c;f=b;b=(b>>>0)/(g>>>0)|0;q[c+24>>2]=w(q[a+140>>2],f-w(b,g)|0);f=q[a+144>>2];q[c+56>>2]=h;o[c+32|0]=1;q[c+28>>2]=w(b,f);b=r[a+152|0]<<1;p[e+56>>1]=b+q[c+4>>2];p[e+58>>1]=q[c+20>>2]+(b+q[c+16>>2]|0);f=q[a+104>>2]+q[c+40>>2]|0;b=f+1|0;if(r[f|0]){g=q[c+48>>2];h=q[a+136>>2];f=0;q[e+8>>2]=0;q[e+12>>2]=h;if(aG(b,g-1|0,e+8|0,762)){q[e>>2]=q[c>>2];Pi(4,112261,112680,e);break a}g=q[a+136>>2];h=q[e+8>>2];if((h|0)<=0){break d}b=0;while(1){i=b+g|0;f=r[i|0]+(f&255)|0;o[i|0]=f;b=b+1|0;if((h|0)!=(b|0)){continue}break}q[e+16>>2]=q[a+136>>2];break c}q[e+16>>2]=b;break c}b=f;if((j|0)!=(b|0)){continue}break b}break}q[e+16>>2]=g}q[e+44>>2]=q[c+24>>2];q[e+48>>2]=q[c+28>>2]+d;Mi[q[75010]](q[a+8>>2],q[a+12>>2],e+16|0);if(q[a+112>>2]!=(j|0)){break a}}Pi(4,112261,112712,0)}Ii=e- -64|0}function H4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0);c=Ii-160|0;Ii=c;b=Ll(a,1);a:{b:{c:{d:{if((b|0)!=q[210436]){if((b|0)==q[210437]){break d}if((b|0)==q[210438]){break c}q[c+144>>2]=134032;q[c+140>>2]=134016;q[c+136>>2]=134e3;q[c+132>>2]=135995;q[c+128>>2]=134064;a=Qi(a,135957,c+128|0);break a}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];e:{if(!(e!=e|f!=f)){d=u[b+8>>2];if(d==d){break e}}d=u[b+8>>2];v[c+16>>3]=f;v[c+24>>3]=d;v[c+8>>3]=e;q[c>>2]=1;Qi(a,134131,c);d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(x(x(e*e)+x(f*f))+x(d*d));break b}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];f:{g:{if(e!=e|f!=f){break g}d=u[b+8>>2];if(d!=d){break g}g=u[b+12>>2];if(g==g){break f}}d=u[b+8>>2];g=u[b+12>>2];v[c+48>>3]=f;v[c- -64>>3]=g;v[c+56>>3]=d;v[c+40>>3]=e;q[c+32>>2]=1;Qi(a,134221,c+32|0);g=u[b+12>>2];d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(x(x(x(e*e)+x(f*f))+x(d*d))+x(g*g));break b}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];h:{i:{if(e!=e|f!=f){break i}d=u[b+8>>2];if(d!=d){break i}g=u[b+12>>2];if(g==g){break h}}d=u[b+8>>2];g=u[b+12>>2];v[c+96>>3]=f;v[c+112>>3]=g;v[c+104>>3]=d;v[c+88>>3]=e;q[c+80>>2]=1;Qi(a,134315,c+80|0);g=u[b+12>>2];d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=x(x(x(x(e*e)+x(f*f))+x(d*d))+x(g*g))}q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+160|0;return a|0}function nF(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{e=q[a+28>>2];if(!e){break b}b=q[a+12>>2];if(q[(b+(e<<4)|0)-8>>2]){break b}if(e>>>0<2){break a}while(1){g=e+d>>>1|0;a=q[(b+(g<<4)|0)-8>>2];e=a?e:g;d=a?g:d;if(e-d>>>0>1){continue}break}break a}g=q[a+16>>2];if((g|0)==142616){return e}b=e+1|0;d=e;while(1){f=b;b=b-1|0;c:{if(b>>>0>>0){c=q[a+12>>2]+(b<<4)|0;break c}i=+(f|0);b=g;if(f){Oza(+i);c=Lza(1)|0;b=Lza(0)|0;c=b+c|0;b=((c>>>0)%((-1<>>0)<<5)+g|0}while(1){if(!(q[b+24>>2]!=3|i!=v[b+16>>3])){c=b;break c}c=141056;b=q[b+28>>2];if(b){continue}break}}if(!q[c+8>>2]){if(f-d>>>0<=1){break a}while(1){h=f+d>>>1|0;b=h-1|0;d:{if(b>>>0>>0){c=q[a+12>>2]+(b<<4)|0;break d}i=+(h|0);b=g;if(h){Oza(+i);c=Lza(1)|0;b=Lza(0)|0;c=b+c|0;b=((c>>>0)%((-1<>>0)<<5)+g|0}while(1){if(!(q[b+24>>2]!=3|i!=v[b+16>>3])){c=b;break d}c=141056;b=q[b+28>>2];if(b){continue}break}}b=q[c+8>>2];f=b?f:h;d=b?h:d;if(f-d>>>0>1){continue}break}break a}h=1;d=f;b=d<<1;if(b>>>0<2147483646){continue}break}while(1){d=h-1|0;e:{if(e>>>0>d>>>0){c=q[a+12>>2]+(d<<4)|0;break e}i=+(h|0);b=g;if(h){Oza(+i);f=Lza(1)|0;b=Lza(0)|0;f=b+f|0;b=((f>>>0)%((-1<>>0)<<5)+g|0}while(1){if(!(q[b+24>>2]!=3|i!=v[b+16>>3])){c=b;break e}c=141056;b=q[b+28>>2];if(b){continue}break}}h=h+1|0;if(q[c+8>>2]){continue}break}}return d}function Px(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;h=Ii-32|0;Ii=h;a:{if(!a){q[c+16>>2]=-1;q[c+20>>2]=-1;q[c+8>>2]=255;f=8;q[c>>2]=8;break a}f=r[a+50|0];b:{while(1){e=f;if((e|0)<1){break b}f=e-1|0;if(q[q[q[a>>2]+24>>2]+w(s[((f<<1)+a|0)+172>>1],12)>>2]!=(b|0)){continue}break}q[c+16>>2]=-1;q[c+20>>2]=-1;q[c+8>>2]=f;f=6;q[c>>2]=6;if(d){break a}a=q[a+20>>2];if(!a){break a}while(1){if((e|0)<=r[a+8|0]){a=q[a>>2];if(a){continue}break a}break}o[a+9|0]=1;break a}f=8;d=0;if((Px(q[a+8>>2],b,c,0)|0)==8){break a}g=q[a>>2];f=q[g+36>>2];e=f;i=r[g+72|0];c:{d:{if(!i){break d}d=q[c>>2];e=0;while(1){j=(e<<1)+a|0;if(q[c+8>>2]==r[j+52|0]?r[j+51|0]==(d|0):0){break c}e=e+1|0;if((i|0)!=(e|0)){continue}break}e=f;d=i;if(d>>>0<60){break d}d=q[a+16>>2];e=q[g+60>>2];e:{if(!e){q[h>>2]=60;q[h+4>>2]=142255;d=oj(d,142064,h);break e}q[h+20>>2]=60;q[h+16>>2]=e;q[h+24>>2]=142255;d=oj(d,142098,h+16|0)}gm(q[a+12>>2],d,0);e=q[g+36>>2];d=r[g+72|0]}if((d&255)>=(e|0)){q[g+28>>2]=_q(q[a+16>>2],q[g+28>>2],g+36|0,4,2147483645,142264);e=q[g+36>>2]}if((e|0)>(f|0)){while(1){q[q[g+28>>2]+(f<<2)>>2]=0;f=f+1|0;if((f|0)!=(e|0)){continue}break}}e=r[g+72|0];q[q[g+28>>2]+(e<<2)>>2]=b;if(!(!(r[b+5|0]&3)|!(r[g+5|0]&4))){go(q[a+16>>2],g,b);e=r[g+72|0]}a=(e<<1)+a|0;o[a+51|0]=q[c>>2];o[a+52|0]=q[c+8>>2];o[g+72|0]=e+1}f=7;q[c>>2]=7;q[c+8>>2]=e}Ii=h+32|0;return f}function vga(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;a:{b:{c:{d:{if(a){i=q[a+4>>2];if((q[a+8>>2]-i|0)/24>>>0<=b>>>0){break b}a=i+w(b,24)|0;h=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=h;e:{f:{g:{h:{i:{j:{k:{l:{m:{n:{o:{h=q[a+16>>2];switch(h-35664|0){case 12:break i;case 11:break j;case 10:break k;case 2:break l;case 1:break m;case 0:break n;case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 13:case 15:break e;case 16:break g;case 14:break h;default:break o}}c=0;p:{switch(h-5120|0){case 1:c=1;break c;case 2:c=2;break c;case 3:c=3;break c;case 4:c=4;break c;case 5:c=5;break c;case 6:break p;case 0:break c;default:break f}}c=6;break c}c=12;break c}c=13;break c}c=7;break c}c=14;break c}c=15;break c}c=8;break c}c=9;break c}c=10;break c}if((h|0)==36289){break d}}c=-1;break c}J(92095,88575,2210,92273);G()}c=11}q[d>>2]=c;b=i+w(b,24)|0;q[f>>2]=q[b+12>>2];q[g>>2]=q[b+8>>2];q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{b=q[a+16>>2];switch(b-35664|0){case 6:case 7:case 8:case 9:break a;case 5:break s;case 4:break t;case 3:break u;case 12:break v;case 11:break w;case 2:case 10:break x;case 1:break y;case 0:break z;default:break r}}a=2;break q}a=3;break q}a=4;break q}a=9;break q}a=16;break q}a=2;break q}a=3;break q}a=4;break q}a=1;if(b-5124>>>0>=3){break a}}q[e>>2]=a}return}J(92292,88575,2204,92316);G()}function cZ(a,b,c){var d=0,e=0,f=0,g=0;g=1;a:{b:{c:{d:{e:{switch(q[b+8>>2]){case 3:return v[b>>3]==v[c>>3];case 7:e=q[b>>2];d=q[c>>2];if((e|0)==(d|0)){break c}g=0;f=q[e+8>>2];if(!f|r[f+6|0]&16){break c}d=q[d+8>>2];e=eo(f,4,q[q[a+16>>2]+204>>2]);if(!e){break c}if((d|0)==(f|0)){break d}if(!d|r[d+6|0]&16){break c}d=eo(d,4,q[q[a+16>>2]+204>>2]);if(!d){break c}if(hp(e,d)){break d}break c;case 1:case 2:break a;case 0:break c;case 5:break e;default:break b}}e=q[b>>2];d=q[c>>2];if((e|0)==(d|0)){break c}g=0;f=q[e+8>>2];if(!f|r[f+6|0]&16){break c}d=q[d+8>>2];e=eo(f,4,q[q[a+16>>2]+204>>2]);if(!e){break c}if((d|0)==(f|0)){break d}if(!d|r[d+6|0]&16){break c}d=eo(d,4,q[q[a+16>>2]+204>>2]);if(!d){break c}if(!hp(e,d)){break c}}d=q[a+32>>2];g=q[e+4>>2];f=q[a+8>>2];q[f>>2]=q[e>>2];q[f+4>>2]=g;q[f+8>>2]=q[e+8>>2];g=q[b+4>>2];e=q[a+8>>2];q[e+16>>2]=q[b>>2];q[e+20>>2]=g;q[e+24>>2]=q[b+8>>2];e=q[c+4>>2];b=q[a+8>>2];q[b+32>>2]=q[c>>2];q[b+36>>2]=e;q[b+40>>2]=q[c+8>>2];b=q[a+8>>2];if((q[a+28>>2]-b|0)<=48){Mk(a,3);b=q[a+8>>2]}q[a+8>>2]=b+48;Ul(a,b,1);b=q[a+8>>2]-16|0;q[a+8>>2]=b;e=q[b+4>>2];c=q[a+32>>2]+(f-d|0)|0;q[c>>2]=q[b>>2];q[c+4>>2]=e;q[c+8>>2]=q[b+8>>2];g=0;f:{g:{a=q[a+8>>2];switch(q[a+8>>2]){case 1:break g;case 0:break c;default:break f}}return q[a>>2]!=0}g=1}return g}return q[b>>2]==q[c>>2]}return q[b>>2]==q[c>>2]}function WI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=h-g>>6){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+(f<<6)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+56>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e- -64;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+(e<<6)|0;q[a+20>>2]=q[e+56>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;f=q[d+20>>2];q[e+24>>2]=q[d+16>>2];q[e+28>>2]=f;f=q[d+28>>2];q[e+32>>2]=q[d+24>>2];q[e+36>>2]=f;f=q[d+36>>2];q[e+40>>2]=q[d+32>>2];q[e+44>>2]=f;f=q[d+44>>2];q[e+48>>2]=q[d+40>>2];q[e+52>>2]=f;q[e+56>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+(f<<6)|0;f=q[b+56>>2];if((f|0)!=-1){continue}break}q[b+56>>2]=e-d>>6;break a}J(172393,172174,229,172401);G()}c=q[d+4>>2];a=g+(f<<6)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;b=q[d+44>>2];q[a+48>>2]=q[d+40>>2];q[a+52>>2]=b;b=q[d+36>>2];q[a+40>>2]=q[d+32>>2];q[a+44>>2]=b;b=q[d+28>>2];q[a+32>>2]=q[d+24>>2];q[a+36>>2]=b;b=q[d+20>>2];q[a+24>>2]=q[d+16>>2];q[a+28>>2]=b;b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(172405,172174,537,172467);G()}q[b>>2]=e-d>>6}q[a+24>>2]=q[a+24>>2]+1}function kE(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;i=Ii-1120|0;Ii=i;h=-16512;j=q[a+4>>2];a:{if(j-16>>>0>1008){break a}h=ts(a,g,i);if(h){break a}h=-16640;g=j-1|0;if(r[g+i|0]!=188){break a}if(b){b=b-3|0;b:{if(b>>>0<=5){b=q[(b<<2)+263e3>>2];break b}b=0}if(!b){h=-16512;break a}c=(b?q[b+8>>2]:0)&255}h=-16512;b=e-3|0;c:{if(b>>>0<=5){b=q[(b<<2)+263e3>>2];break c}b=0}if(!b){break a}e=b?q[b+8>>2]:0;q[i+1048>>2]=0;q[i+1052>>2]=0;a=Ql(a+8|0)-1|0;if(r[i|0]>>>(a-(j<<3)|0)+8|0){break a}k=e&255;e=j;j=a&7;e=j?e:g;if(k+2>>>0>e>>>0){break a}g=i+1032|0;q[g>>2]=0;q[g+4>>2]=0;q[g+8>>2]=0;h=En(i+1032|0,b,0);d:{if(h){break d}h=k^-1;b=j?i:i|1;g=h+(e+b|0)|0;h=Nq(b,e+h|0,g,k,i+1032|0);if(h){break d}o[i|0]=r[i|0]&255>>>(e<<3)-a;e=g-1|0;e:{if(e>>>0>b>>>0){while(1){a=r[b|0];if(a){break e}b=b+1|0;if((e|0)!=(b|0)){continue}break}b=e}a=r[b|0]}h=-16640;if((a&255)!=1){break d}j=(f|0)!=-1;a=f;e=b+1|0;f=g-e|0;if((a|0)!=(f|0)?j:0){break d}a=-20736;b=i+1032|0;f:{if(!b){break f}h=q[b>>2];if(!h){break f}a=Mi[q[h+16>>2]](q[b+4>>2])|0}h=a;if(h){break d}h=ao(i+1032|0,i+1048|0,8);if(h){break d}h=ao(i+1032|0,d,c);if(h){break d}h=ao(i+1032|0,e,f);if(h){break d}c=i+1056|0;a=-20736;b=i+1032|0;g:{if(!b){break g}d=q[b>>2];if(!d){break g}a=Mi[q[d+24>>2]](q[b+4>>2],c)|0}h=a;if(h){break d}h=Ej(g,i+1056|0,k)?-17280:0}ym(i+1032|0)}Ii=i+1120|0;return h}function F6(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;h=Ii-32|0;Ii=h;q[h+28>>2]=a;a:{b:{if((e|0)>-1){b=b?b:q[a+4>>2];a=q[b+24>>2];a=(b+(e<<6)|0)+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0;g=q[b+20>>2];i=(g<<8&16711680|g<<24|(g>>>8&65280|g>>>24))+b|0;g=q[b+16>>2];g=g<<8&16711680|g<<24|(g>>>8&65280|g>>>24);c:{if(g>>>0<=e>>>0){Ti(a,c,d);e=(e<<4)+i|0;break c}g=g-e|0;bl(a- -64|0,a,g<<6);Ti(a,c,d);e=(e<<4)+i|0;bl(e+16|0,e,g<<4)}g=e;j=e;d:{if(!f){a=q[2];c=q[1];d=q[0];f=q[3];break d}q[h+24>>2]=0;q[h+20>>2]=0;if(C6(h+28|0,q[f>>2],q[f+4>>2],h+24|0,h+20|0)){break b}a=q[h+20>>2];d=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);c=q[f+8>>2];i=r[c+4|0];e:{if(i&2){c=q[c>>2];a=q[f+4>>2];break e}c=q[f+4>>2];c=c<<8&16711680|c<<24|(c>>>8&65280|c>>>24);a=-1}a=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);f=i|4;f=f<<8&16711680|f<<24|(f>>>8&65280|f>>>24)}o[j+12|0]=f;o[g+13|0]=f>>>8;o[g+14|0]=f>>>16;o[g+15|0]=f>>>24;o[e+8|0]=a;o[e+9|0]=a>>>8;o[e+10|0]=a>>>16;o[e+11|0]=a>>>24;o[e+4|0]=c;o[e+5|0]=c>>>8;o[e+6|0]=c>>>16;o[e+7|0]=c>>>24;o[e|0]=d;o[e+1|0]=d>>>8;o[e+2|0]=d>>>16;o[e+3|0]=d>>>24;a=q[b+16>>2];a=(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))+1|0;q[b+16>>2]=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);a=0;break a}J(31436,31266,440,31457);G()}a=q[f+4>>2];q[h>>2]=q[h+24>>2];q[h+4>>2]=a;Pi(4,31176,31472,h);Ni(b);a=-2}Ii=h+32|0;return a}function dza(){var a=0;q[73064]=Oi(49091);q[73065]=Li;q[73066]=Oi(49110);q[73067]=Li;q[73068]=Oi(49127);q[73069]=Li;q[73070]=Oi(49136);q[73071]=Li;q[73072]=Oi(49142);q[73073]=Li;q[73074]=Oi(49152);q[73075]=Li;q[73076]=Oi(49160);q[73077]=Li;q[73078]=Oi(49167);q[73079]=Li;q[73080]=Oi(49176);q[73081]=Li;q[73082]=Oi(49188);q[73083]=Li;q[73084]=Oi(49197);q[73085]=Li;q[73086]=Oi(49202);q[73087]=Li;q[73088]=Oi(49208);q[73089]=Li;q[73090]=Oi(49214);q[73091]=Li;q[73092]=Oi(49223);q[73093]=Li;q[73096]=Oi(49233);q[73097]=Li;q[73098]=Oi(49242);q[73099]=Li;q[73100]=Oi(49251);q[73101]=Li;q[73102]=Oi(49260);q[73103]=Li;q[73104]=Oi(49269);q[73105]=Li;q[73106]=Oi(49278);q[73107]=Li;q[73108]=Oi(49287);q[73109]=Li;q[73110]=Oi(49296);q[73111]=Li;q[73112]=Oi(49305);q[73113]=Li;a=Oi(49314);q[73133]=0;q[73134]=0;q[73132]=295392;q[73130]=0;q[73128]=49337;q[73127]=49326;q[73126]=0;q[73124]=0;q[73122]=0;q[73120]=0;q[73118]=1;q[73116]=0;q[73117]=3;q[73114]=a;q[73115]=Li;q[73135]=0;q[73136]=0;q[73137]=0;q[73154]=292464;q[73152]=0;q[73150]=49368;q[73149]=49350;q[73148]=0;q[73146]=0;q[73144]=0;q[73142]=0;q[73140]=1;q[73138]=0;q[73139]=3;q[73159]=0;q[73157]=0;q[73158]=0;q[73155]=0;q[73156]=0;q[73160]=Oi(49385);q[73161]=Li;q[73162]=Oi(49390);q[73163]=Li;q[73164]=Oi(49394);q[73165]=Li;q[73166]=Oi(49400);q[73167]=Li}function D4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-4112|0;Ii=b;a:{g=q[a+8>>2]-q[a+12>>2]>>4;if((g|0)>-1){h=q[a+8>>2]-q[a+12>>2]>>4;d=b+104|0;o[d+16|0]=1;q[d+8>>2]=0;q[d+12>>2]=0;q[d+4>>2]=3984;q[d>>2]=b+128;o[b+128|0]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+92>>2]=-1;b:{c:{if((h|0)<1){break c}e=1;while(1){d:{Ui(f,255,c<<2);q[b+92>>2]=-1;q[b+96>>2]=0;q[b+84>>2]=q[b+80>>2];e:{if((Vi(a,e)|0)==5){c=a;if((e|0)==1){un(d,123004,0);f=1}else{f=e}PG(c,f,d,b+72|0);q[b+48>>2]=(e|0)<(h|0)?123006:122493;un(d,122973,b+48|0);break e}ej(a,e);Zi(a,-10002,122919);xk(a,-2);Rk(a,1,1);c=uj(a,-1,0);if(!c){break d}q[b+64>>2]=c;q[b+68>>2]=(e|0)<(h|0)?123006:122493;un(d,123009,b- -64|0);Ri(a,-2)}if((e|0)==(h|0)){break c}e=e+1|0;c=q[b+76>>2];f=q[b+72>>2];continue}break}Ri(a,-2);f=Qi(a,122928,0);break b}q[b+32>>2]=b+128;Pi(1,122749,122973,b+32|0);f=0}f:{if(o[b+100|0]&1){break f}c=q[b+80>>2];if(c){Ni(c)}c=q[b+72>>2];if(!c){break f}Ni(c)}a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(g|0)){break a}Ii=b+4112|0;return f|0}q[b+12>>2]=g;q[b+4>>2]=559;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=g;q[b+20>>2]=559;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function GJ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{b:{f=b&65535;g=q[a+32>>2];if(f>>>0<(q[a+36>>2]-g|0)/592>>>0){if(s[(w(f,592)+g|0)+568>>1]!=(b>>>16|0)){break b}h=w(f,592)+g|0;if(s[h+570>>1]!=(b&65535)){break a}if(q[h+436>>2]==2){cw(a,b,0)}c:{d:{e:{b=q[a+132>>2];f:{if(!b){break f}b=q[q[a+128>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break f}e=q[a+136>>2];while(1){i=e+w(b,24)|0;if((c|0)==q[i>>2]&q[i+4>>2]==(d|0)){break e}b=q[i+20>>2];if((b|0)!=-1){continue}break}}b=q[a+164>>2];g:{if(!b){break g}b=q[q[a+160>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break g}a=q[a+168>>2];while(1){e=a+w(b,40)|0;if((c|0)==q[e>>2]&q[e+4>>2]==(d|0)){break d}b=q[e+32>>2];if((b|0)!=-1){continue}break}}q[(w(f,592)+g|0)+432>>2]=0;q[h+436>>2]=0;return-5}a=w(f,592)+g|0;q[a+424>>2]=c;q[a+428>>2]=d;c=e+w(b,24)|0;d=q[c+8>>2];q[a+432>>2]=d;q[h+436>>2]=q[c+12>>2];a=q[a+412>>2];if(!(a&262144)|!d|(a>>>4&15)-5>>>0<2){break c}a=w(f,592)+g|0;b=e+w(b,24)|0;u[a+64>>2]=s[b+16>>1];u[a+68>>2]=s[b+18>>1];return 0}e=w(f,592)+g|0;q[e+424>>2]=c;q[e+428>>2]=d;q[e+432>>2]=q[(a+w(b,40)|0)+8>>2];q[h+436>>2]=3;c=q[e+412>>2];if(!(c&262144)|(c>>>4&15)-5>>>0<2){break c}c=w(f,592)+g|0;a=a+w(b,40)|0;u[c+64>>2]=t[a+16>>2];u[c+68>>2]=t[a+20>>2]}return 0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Gna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=Ii-32|0;Ii=b;q[b>>2]=0;a:{e=q[a+8>>2];d=q[e+8>>2];a=q[e+4>>2];c=d-a|0;if(!c){break a}b:{if((a|0)!=(d|0)){d=a-d|0;d=((c|0)<(d|0)?d:c)>>>2|0;c=(c|0)>-1?c:-1;c=w(d,(c|0)<1?c:1);j=c>>>0>1?c:1;while(1){c=q[(g<<2)+a>>2];c:{if((r[c+204|0]&3)!=3){break c}a=q[c+192>>2];if(!a){a=q[q[c+152>>2]+8>>2]}d:{if(q[q[a>>2]+152>>2]!=1){break d}d=q[c+156>>2];if(!d){d=q[q[c+152>>2]+4>>2]}q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;xq(q[d+4>>2],b+4|0);kk(b+8|0,d+4|0,4);kk(b+8|0,b+4|0,4);f=Rn(b+8|0);q[c+200>>2]=f;e:{a=q[e+76>>2];f:{if(!a){break f}h=q[d+8>>2];i=q[d+12>>2];a=q[q[e+72>>2]+(Cza(h,i,a)<<2)>>2];if((a|0)==-1){break f}k=q[e+80>>2];while(1){a=k+w(a,24)|0;if(q[a>>2]==(h|0)&(i|0)==q[a+4>>2]){break e}a=q[a+20>>2];if((a|0)!=-1){continue}break}}J(44689,44699,491,44739);G()}if((f|0)==q[a+16>>2]){break d}q[a+16>>2]=f;a=q[a+8>>2];f=q[d+16>>2];h=q[d+20>>2];d=q[d+4>>2];q[b+8>>2]=0;q[b+4>>2]=0;if(Wo(d,b+8|0,b+4|0)){break b}Mi[q[74945]](a,w(f,h),q[b+8>>2],1)}a=q[c+148>>2];if(!(!a|!r[a+52|0])){o[c+204|0]=r[c+204|0]|4}if(!(r[c+204|0]&4)){break c}hL(c)}g=g+1|0;if((j|0)==(g|0)){break a}a=q[e+4>>2];if(q[e+8>>2]-a>>2>>>0>g>>>0){continue}break}}J(46069,45367,486,46080);G()}J(45428,44699,192,45453);G()}Ii=b+32|0;return 0}function Qna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=q[a+4>>2];d=q[c+20>>2];a:{b:{c:{d:{e=q[q[a+24>>2]>>2];if(e>>>0>2]-d>>3>>>0){d=q[d+(e<<3)>>2];e=q[c+8>>2];c=q[c+4>>2];if(d>>>0>=e-c>>2>>>0){break a}d=q[c+(d<<2)>>2];e=q[a+16>>2];f=q[a+20>>2];if((e|0)==q[72806]&(f|0)==q[72807]){c=q[q[q[a+8>>2]+80>>2]>>2];a=q[d+156>>2];if(!a){a=q[q[d+152>>2]+4>>2]}return cm(c,a,b)|0}e:{if((e|0)!=q[72714]|(f|0)!=q[72715]){c=0;if(q[72720]!=(e|0)|q[72721]!=(f|0)){break e}break b}c=q[q[q[a+8>>2]+80>>2]>>2];a=q[d+192>>2];if(!a){a=q[q[d+152>>2]+8>>2]}return cm(c,a,b)|0}c=1;if(q[72722]==(e|0)&q[72723]==(f|0)){break b}c=2;if(q[72724]==(e|0)&q[72725]==(f|0)){break b}c=3;if(q[72726]==(e|0)&q[72727]==(f|0)){break b}c=4;if(q[72728]==(e|0)&q[72729]==(f|0)){break b}c=5;if(q[72730]==(e|0)&q[72731]==(f|0)){break b}c=6;if(q[72732]==(e|0)&q[72733]==(f|0)){break b}c=7;if(q[72734]==(e|0)&q[72735]==(f|0)){break b}c=q[d+192>>2];if(!c){break d}break c}break a}c=q[q[d+152>>2]+8>>2]}return Ct(q[c>>2],e,f,q[a+32>>2],b,1,216,d)|0}e=q[q[q[a+8>>2]+80>>2]>>2];a=q[(d+(c<<2)|0)+160>>2];f:{if(a){break f}a=q[d+192>>2];if(a){a=q[(a+(c<<2)|0)+4>>2];if(a){break f}}d=q[d+152>>2];a=q[(d+(c<<2)|0)+12>>2];if(a){break f}a=q[d+8>>2];if(!a){return cm(e,0,b)|0}a=q[(a+(c<<2)|0)+4>>2]}return cm(e,a,b)|0}J(46069,45367,479,46080);G()}function xy(a,b,c){var d=0,e=0,f=0,g=0;d=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);d=d<<24|d<<8&16711680|(d>>>8&65280|d>>>24);b=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);b=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);e=(d>>>4^b)&252645135;d=e<<4^d;e=b^e;b=d>>>16^e&65535;e=b^e;b=d^b<<16;d=(e>>>2^b)&858993459;e=d<<2^e;b=b^d;d=(e>>>8^b)&16711935;e=Fza(d<<8^e,1);f=e;d=b^d;e=(d^e)&-1431655766;b=f^e;d=Fza(d^e,1);while(1){f=b;e=q[a+4>>2]^Fza(b,28);b=q[a>>2]^b;d=q[((e&63)<<2)+162192>>2]^(q[((b&63)<<2)+161168>>2]^d^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2])^q[(e>>>6&252)+162448>>2]^q[(e>>>14&252)+162704>>2]^q[(e>>>22&252)+162960>>2];b=d^q[a+8>>2];e=f^q[((b&63)<<2)+161168>>2]^q[(b>>>6&252)+161424>>2]^q[(b>>>14&252)+161680>>2]^q[(b>>>22&252)+161936>>2];b=q[a+12>>2]^Fza(d,28);b=e^q[((b&63)<<2)+162192>>2]^q[(b>>>6&252)+162448>>2]^q[(b>>>14&252)+162704>>2]^q[(b>>>22&252)+162960>>2];a=a+16|0;g=g+1|0;if((g|0)!=8){continue}break}a=Fza(b,31);b=(a^d)&-1431655766;d=d<<31|(b^d)>>>1;a=a^b;b=(d>>>8^a)&16711935;d=b<<8^d;a=a^b;b=(d>>>2^a)&858993459;d=b<<2^d;a=a^b;b=d&65535^a>>>16;e=b<<16^a;a=b^d;b=(e>>>4^a)&252645135;a=a^b;o[c+7|0]=a;o[c+6|0]=a>>>8;o[c+5|0]=a>>>16;o[c+4|0]=a>>>24;a=e^b<<4;o[c+3|0]=a;o[c+2|0]=a>>>8;o[c+1|0]=a>>>16;o[c|0]=a>>>24;return 0}function VW(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;i=Ii-16|0;Ii=i;q[i+12>>2]=0;a:{if(!d){b=-20;break a}q[a+352>>2]=0;q[a+356>>2]=0;q[a+384>>2]=b;q[a+320>>2]=0;q[a+324>>2]=0;q[a+376>>2]=0;q[a+380>>2]=0;j=a+368|0;b=j;q[b>>2]=0;q[b+4>>2]=0;q[a+360>>2]=0;q[a+364>>2]=0;q[a+328>>2]=0;q[a+332>>2]=0;g=a+352|0;b:{if((d|0)==12){d=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);b=g;h=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);o[b|0]=h;o[b+1|0]=h>>>8;o[b+2|0]=h>>>16;o[b+3|0]=h>>>24;o[b+4|0]=d;o[b+5|0]=d>>>8;o[b+6|0]=d>>>16;o[b+7|0]=d>>>24;c=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);o[b+8|0]=c;o[b+9|0]=c>>>8;o[b+10|0]=c>>>16;o[b+11|0]=c>>>24;o[a+367|0]=1;break b}l=d<<3;m=d>>>5|0;n=d>>>13|0;p=d>>>21|0;while(1){h=d>>>0<16?d:16;s=h>>>0>1?h:1;b=0;while(1){k=a+b|0;o[k+352|0]=r[k+352|0]^r[b+c|0];b=b+1|0;if((s|0)!=(b|0)){continue}break}Ts(a,g,g);c=c+h|0;d=d-h|0;if(d){continue}break}o[a+367|0]=r[a+367|0]^l;o[a+366|0]=r[a+366|0]^m;o[a+365|0]=r[a+365|0]^n;o[a+364|0]=r[a+364|0]^p;Ts(a,g,g)}b=cn(a,g,16,a+336|0,i+12|0);if(b){break a}q[a+328>>2]=f;q[a+332>>2]=0;if(f){while(1){c=f>>>0<16?f:16;d=c>>>0>1?c:1;b=0;while(1){g=a+b|0;o[g+368|0]=r[g+368|0]^r[b+e|0];b=b+1|0;if((d|0)!=(b|0)){continue}break}Ts(a,j,j);e=c+e|0;f=f-c|0;if(f){continue}break}}b=0}Ii=i+16|0;return b}function J6(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;j=Ii-16|0;Ii=j;k=-2;f=dl(a,31173);a:{if(!f){break a}e=$i(24);d=e;q[d>>2]=0;q[d+4>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;i=$i(48);d=i;q[d>>2]=0;q[d+4>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d+24>>2]=805306368;q[d+20>>2]=805306368;q[e+4>>2]=d;h=Ui($i(1048),0,1048);q[e+8>>2]=h;Pj(h,a,1024);if((zl(d,1,48,f)|0)!=48){rk(f);a=q[e+4>>2];if(a){Ni(a)}Ni(e);break a}a=q[i>>2];a=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);if((a|0)!=5){q[j+4>>2]=a;q[j>>2]=5;Pi(4,31176,31185,j);rk(f);a=q[e+4>>2];if(a){Ni(a)}Ni(e);k=-1;break a}a=q[i+16>>2];h=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);d=q[i+20>>2];a=0;g=q[i+24>>2];Uk(f,g<<8&16711680|g<<24|(g>>>8&65280|g>>>24),0);g=h<<6;l=$i(g);q[q[e+8>>2]+1024>>2]=l;if((zl(l,1,g,f)|0)!=(g|0)){rk(f);a=q[e+4>>2];if(a){Ni(a)}Ni(e);break a}Uk(f,d<<8&16711680|d<<24|(d>>>8&65280|d>>>24),0);d=h<<4;g=$i((h&268435455)!=(h|0)?-1:d);if(h){Ui(g,0,d);a=d}q[q[e+8>>2]+1028>>2]=g;if((zl(g,1,a,f)|0)!=(a|0)){rk(f);a=q[e+4>>2];if(a){Ni(a)}Ni(e);break a}q[i+8>>2]=1337;q[i+12>>2]=0;a=dl(b,31173);if(!a){rk(f);a=q[e+4>>2];if(a){Ni(a)}Ni(e);break a}q[q[e+8>>2]+1032>>2]=a;q[c>>2]=e;rk(f);k=0}Ii=j+16|0;return k}function FH(a,b,c){var d=0,e=0,f=0;d=Ii-32|0;Ii=d;q[c+8>>2]=-2;q[c+12>>2]=-2;q[c>>2]=-2;q[c+4>>2]=-2;f=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{c:{d:{e:{f:{if(!pv(a,b)){rj(a,-1e4,q[c+24>>2]);yk(a);e=Pm(a,0,0);if(e){break c}Zi(a,-10002,q[62140]);g:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=248560;break b}q[c>>2]=zk(a,-1e4);break g}q[c>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[62141]);if(!Vi(a,-1)){break e}if((Vi(a,-1)|0)==6){break f}c=248564;break b}q[d+16>>2]=uj(a,-1,0);Pi(4,116024,121311,d+16|0);Ri(a,-2);b=0;break a}q[c+4>>2]=zk(a,-1e4);break d}q[c+4>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[62142]);h:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=248568;break b}q[c+8>>2]=zk(a,-1e4);break h}q[c+8>>2]=-2;Ri(a,-2)}Zi(a,-10002,q[62143]);i:{if(Vi(a,-1)){if((Vi(a,-1)|0)!=6){c=248572;break b}q[c+12>>2]=zk(a,-1e4);break i}q[c+12>>2]=-2;Ri(a,-2)}q[c+20>>2]=Pk(q[b+8>>2])}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;yk(a);b=!e;break a}c=q[c>>2];q[d+4>>2]=q[b+8>>2];q[d>>2]=c;Pi(4,116024,121262,d);Ri(a,-2);b=0}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[62140]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[62141]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[62142]);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Si(a,-10002,q[62143]);if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){Ii=d+32|0;return b}J(115568,115465,3195,121336);G()}function Gga(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii+ -64|0;Ii=c;b=c;q[b+44>>2]=0;q[b+48>>2]=0;q[b+40>>2]=1;q[b+32>>2]=2;q[b+36>>2]=1;q[b+24>>2]=3;q[b+28>>2]=5;q[b+52>>2]=0;q[b+56>>2]=0;o[b+59|0]=0;o[b+60|0]=0;o[b+61|0]=0;o[b+62|0]=0;q[b+16>>2]=0;q[b+20>>2]=0;e=q[q[75054]>>2];Gj(e);a:{b:{c:{d:{b=a&65535;d=q[75041];if(b>>>0<(q[75042]-d|0)/56>>>0){d=d+w(b,56)|0;b=q[d+52>>2];q[c+56>>2]=q[d+48>>2];q[c+60>>2]=b;b=q[d+44>>2];q[c+48>>2]=q[d+40>>2];q[c+52>>2]=b;b=q[d+36>>2];q[c+40>>2]=q[d+32>>2];q[c+44>>2]=b;b=q[d+28>>2];q[c+32>>2]=q[d+24>>2];q[c+36>>2]=b;b=q[d+20>>2];q[c+24>>2]=q[d+16>>2];q[c+28>>2]=b;b=q[d+12>>2];q[c+16>>2]=q[d+8>>2];q[c+20>>2]=b;b=q[d+4>>2];q[c+8>>2]=q[d>>2];q[c+12>>2]=b;f=q[75045];if(!f){break d}d=s[150093]-1|0;b=d&65535;if(b>>>0>=s[150092]){break c}p[150093]=d;p[f+(b<<1)>>1]=a;Bj(e);Mi[q[75010]](q[c+8>>2],q[c+12>>2],c+16|0);wc();b=q[c+8>>2];a=q[c+12>>2];if((a|0)==2097152|a>>>0>2097152){break b}a=0;e:{if(b+1>>>0<2){break e}f=b&65535;e=q[75054];if(f>>>0>=t[e+32>>2]){break a}d=q[q[e+24>>2]+(f<<2)>>2];if(!d){break e}a=s[q[e+28>>2]+(f<<1)>>1]==(b>>>16|0)?d:0}p[a+26>>1]=s[a+26>>1]&Fza(-2,r[c+62|0]);Ii=c- -64|0;return}J(91269,90502,479,91280);G()}J(94284,94233,140,90594);G()}J(94315,94233,141,90594);G()}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function foa(a,b,c,d,e,f){var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),G=x(0);i=x(u[d+4>>2]*u[e+4>>2]);j=x(u[d>>2]*u[e>>2]);l=u[c+12>>2];m=u[c+8>>2];n=u[c+4>>2];o=u[c>>2];E=u[b+8>>2];F=u[b+4>>2];G=u[b>>2];a:{b:{c:{d:{e:{f:{switch(f|0){case 0:case 1:case 5:g=x(j*x(-.5));break e;case 8:break c;case 7:break d;case 2:case 3:case 4:break f;default:break a}}g=x(-j)}h=g;switch(f|0){case 1:case 2:break c;case 0:case 3:break d;default:break a}}p=x(i*x(-.5));break b}p=x(-i)}h=g}q[a+12>>2]=0;q[a+60>>2]=1065353216;q[a+44>>2]=0;q[a+28>>2]=0;i=x(m*x(0));j=x(l*x(0));k=x(o*x(0));t=x(x(i+x(n+j))-k);v=x(n*x(0));y=x(x(k+x(m+j))-v);w=x(y+y);s=x(t*w);r=x(x(x(l-k)-v)-i);g=x(x(v+x(o+j))-i);A=x(g+g);B=x(r*A);u[a+36>>2]=s-B;C=x(g*w);z=x(t+t);D=x(r*z);u[a+32>>2]=C+D;u[a+24>>2]=s+B;s=x(g*z);r=x(r*w);u[a+16>>2]=s-r;u[a+8>>2]=C-D;u[a+4>>2]=s+r;k=x(x(x(m*h)+x(l*p))-k);i=x(i+x(x(o*h)+x(n*p)));j=x(x(j+x(o*p))-x(n*h));h=x(x(v+x(l*h))-x(m*p));u[a+56>>2]=E+x(x(o*k)+x(x(x(m*i)+x(l*j))-x(n*h)));u[a+52>>2]=F+x(x(m*h)+x(x(x(l*k)+x(n*i))-x(o*j)));u[a+48>>2]=G+x(x(n*j)+x(x(x(l*h)+x(o*i))-x(m*k)));g=x(x(1)-x(g*A));h=x(t*z);u[a+40>>2]=g-h;p=g;g=x(y*w);u[a+20>>2]=p-g;u[a>>2]=x(x(1)-h)-g}function Cka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-176|0;Ii=b;q[b+168>>2]=0;c=q[a>>2];u[b+48>>2]=u[c>>2];u[b+52>>2]=u[c+4>>2];u[b+56>>2]=u[c+8>>2];u[b+60>>2]=u[c+12>>2];u[b+64>>2]=u[c+16>>2];u[b+68>>2]=u[c+20>>2];u[b+72>>2]=u[c+24>>2];u[b+76>>2]=u[c+28>>2];u[b+80>>2]=u[c+32>>2];u[b+84>>2]=u[c+36>>2];u[b+88>>2]=u[c+40>>2];u[b+92>>2]=u[c+44>>2];u[b+96>>2]=u[c+48>>2];u[b+100>>2]=u[c+52>>2];u[b+104>>2]=u[c+56>>2];u[b+108>>2]=u[c+60>>2];u[b+112>>2]=u[c+64>>2];u[b+116>>2]=u[c+68>>2];u[b+120>>2]=u[c+72>>2];u[b+124>>2]=u[c+76>>2];u[b+128>>2]=u[c+80>>2];u[b+132>>2]=u[c+84>>2];u[b+136>>2]=u[c+88>>2];u[b+140>>2]=u[c+92>>2];q[b+144>>2]=q[c+96>>2];i=q[a+12>>2];if(i){while(1){d=q[a+8>>2]+w(e,48)|0;f=q[d+16>>2];c=q[f+156>>2];if(!c){c=q[q[f+152>>2]+4>>2]}c=kN(q[c+4>>2],q[72808],q[72809],b+44|0,b+40|0,b+36|0);a:{if((c|0)==11){q[d+36>>2]=q[d+36>>2]|16384;break a}if(!(q[b+40>>2]==6?q[b+36>>2]==8:0)){Pi(4,44761,45968,0);q[d+36>>2]=q[d+36>>2]|16384;break a}if(c){Pi(4,44761,46019,0);break a}c=q[b+44>>2];g=q[c+4>>2];h=q[c>>2];u[b+24>>2]=u[c+8>>2];q[b+16>>2]=h;q[b+20>>2]=g;g=q[c+16>>2];h=q[c+12>>2];u[b+8>>2]=u[c+20>>2];q[b>>2]=h;q[b+4>>2]=g;c=qI(b+48|0,f+80|0,b+16|0,b);q[d+36>>2]=q[d+36>>2]&-16385|(c?16384:0)}e=e+1|0;if((i|0)!=(e|0)){continue}break}}Ii=b+176|0}function K9(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-16|0;Ii=f;d=r[a+96|0];a:{if((d&3)==1){o[b|0]=0;break a}e=q[213152];g=d>>>2|0;d=a+112|0;i=hj(d);while(1){b=q[213154];q[213154]=b?b:1;if(b){continue}break}b=q[213153];if((b|0)>=1){c=a+97|0;while(1){a=b-1|0;Mi[q[(a<<2)+852624>>2]](g,c,d);h=(b|0)>1;b=a;if(h){continue}break}}q[f>>2]=d;q[213154]=0;while(1){a=q[213151];q[213151]=a?a:1;if(a){continue}break}if(q[213150]<=0){q[213151]=0;break a}a=q[e>>2];b=q[e+4>>2];q[213151]=0;a=b-a|0;if((a|0)<1){break a}g=a>>>2|0;a=0;b:{c:{while(1){b=q[213151];q[213151]=b?b:1;if(b){continue}d:{if(q[213150]>=1){b=q[e>>2];if(q[e+4>>2]-b>>2>>>0>a>>>0){break d}J(172003,171830,479,172014);G()}q[213151]=0;break a}h=a<<2;j=h+b|0;c=q[j>>2];b=0;q[213151]=0;e:{f:{while(1){g:{k=lv(c,b+d|0,i-b|0,f+12|0);if((k|0)!=-101){if(k){break g}b=q[f+12>>2]+b|0}if((b|0)<(i|0)){continue}break f}break}qp(c);Cm(c);while(1){b=q[213151];q[213151]=b?b:1;if(b){continue}break}if(q[213150]<1){break b}q[j>>2]=-1;c=q[e+4>>2];b=q[e>>2];if(c-b>>2>>>0<=a>>>0){break e}c=c-4|0;q[b+h>>2]=q[c>>2];q[e+4>>2]=c;if(b>>>0>c>>>0){break c}q[213151]=0;a=a-1|0;g=g-1|0}a=a+1|0;if((g|0)>(a|0)){continue}break a}break}J(171958,171830,513,171973);G()}J(171983,171830,516,171973);G()}q[213151]=0}Ii=f+16|0}function ooa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=q[a+80>>2];c=q[b+8>>2];if((c|0)==q[b+4>>2]){xn(56584,56590,c-q[b>>2]>>8);return-1e3}e=q[a+76>>2];c=q[e>>2];h=H9(b);d=q[b+16>>2];if(h>>>0>2]-d>>3>>>0){d=q[d+(h<<3)>>2];f=q[b+4>>2];b=q[b>>2];if(d>>>0>8>>>0){b=Ui(b+(d<<8)|0,0,256);q[b>>2]=q[a>>2];d=q[c>>2];f=q[c+4>>2];u[b+56>>2]=u[c+8>>2];q[b+48>>2]=d;q[b+52>>2]=f;u[b+64>>2]=u[a+48>>2];u[b+68>>2]=u[a+52>>2];u[b+72>>2]=u[a+56>>2];u[b+16>>2]=u[a+16>>2];u[b+20>>2]=u[a+20>>2];u[b+24>>2]=u[a+24>>2];u[b+32>>2]=u[a+32>>2];u[b+36>>2]=u[a+36>>2];u[b+40>>2]=u[a+40>>2];u[b+44>>2]=u[a+44>>2];d=q[c+32>>2];f=q[c+36>>2];g=q[c+44>>2];q[b+88>>2]=q[c+40>>2];q[b+92>>2]=g;q[b+80>>2]=d;q[b+84>>2]=f;d=q[c+48>>2];f=q[c+52>>2];g=q[c+60>>2];q[b+104>>2]=q[c+56>>2];q[b+108>>2]=g;q[b+96>>2]=d;q[b+100>>2]=f;d=q[c+72>>2];f=q[c+76>>2];g=q[c+64>>2];i=q[c+68>>2];q[b+216>>2]=e;q[b+120>>2]=d;q[b+124>>2]=f;q[b+112>>2]=g;q[b+116>>2]=i;e=q[c+88>>2];q[b+200>>2]=0;q[b+208>>2]=255;q[b+212>>2]=0;q[b+220>>2]=0;q[b+192>>2]=e;p[b+244>>1]=s[a+92>>1];e=s[b+246>>1]|1;p[b+246>>1]=e;d=q[c+100>>2];e=e&-13|8;p[b+246>>1]=e;q[b+240>>2]=d;u[b+232>>2]=u[c+80>>2];u[b+236>>2]=u[c+84>>2];p[b+246>>1]=e&65515|r[c+96|0]<<4&240;q[q[a+88>>2]>>2]=h;return 0}}J(57189,57106,479,57200);G()}function jt(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0;j=Ii-32|0;Ii=j;q[j+8>>2]=0;h=d>>>0<1e3;l=Jk();e=l;s=1e3-e|0;m=Li;t=0-(m+(e>>>0>1e3)|0)|0;a:{while(1){b:{g=q[a+88168>>2];c:{d:{i=q[a+173496>>2];e=q[a+173500>>2];n=i>>>0>=(q[a+173504>>2]-e|0)/56>>>0;if(n){break d}e=e+w(i,56)|0;i=e+16|0;q[e+12>>2]=i;k=q[e+40>>2];p=Mi[q[k+24>>2]](e)|0;if((p|0)==-17){break d}q[a+173496>>2]=q[a+173496>>2]+1;e:{if(r[e+48|0]){q[j+16>>2]=q[a+155704>>2];f=q[k+12>>2];q[j+24>>2]=i;q[j+20>>2]=f;Mi[q[k+28>>2]](j+16|0)|0;o[e+48|0]=0;break e}f=q[e+12>>2];f=nq(q[a+155704>>2],q[f>>2],q[f+4>>2]);if(!f){break e}e=q[q[e+12>>2]+16>>2];if(!e){break e}q[f+16>>2]=e}e=q[a+173500>>2];if(q[a+173496>>2]==((q[a+173504>>2]-e|0)/56|0)){q[a+173496>>2]=0;q[a+173504>>2]=e}f=0;if(g){break c}q[a+88168>>2]=p;break c}f:{if((g|0)==-17){if(!jH(a,0)){break f}f=0;break c}g:{if(r[a+173493|0]){break g}o[a+173493|0]=1;if(g|!b){break g}f=0;if(Mi[b|0](c)|0){break c}q[a+88168>>2]=-10;break c}if(n){break a}}if(kH(a)){f=0;break c}if(h){h=1;f=f+1|0;if(f>>>0<=3){break c}break b}e=d;g=s;i=Jk()+g|0;h=t+Li|0;h=g>>>0>i>>>0?h+1|0:h;g=i;if(!h&e>>>0>>0|h){h=1;Xn(1);break c}Xn(1e3);h=0}g=Jk();e=l;i=g-e|0;if((Li|0)==((e>>>0>g>>>0)+m|0)&d>>>0>=i>>>0){continue}}break}g=-17}Ii=j+32|0;return g}function lA(a,b){var c=0,d=0,e=0,f=x(0),g=x(0),h=0,i=0,j=0,k=0;a:{b:{c:{if(!b){break c}c=b&65535;d=q[a+4>>2];a=q[a>>2];if(c>>>0>=d-a>>2>>>0){break a}a=q[a+(c<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}b=q[a+4>>2]-q[a>>2]|0;if(!b){break c}i=q[a+64>>2];b=(b|0)/304|0;k=b>>>0>1?b:1;b=0;while(1){e=q[i+16>>2];if(t[e+4>>2]<=b>>>0){break b}c=q[a>>2];d=(q[a+4>>2]-c|0)/304|0;e=q[e>>2]+w(b,160)|0;f=u[e+124>>2];d:{if(!(f>>0>=d>>>0){break a}c=c+w(b,304)|0;d=q[c+280>>2];q[c+280>>2]=1;e:{if((d|0)==1){break e}d=q[a+72>>2];if(!d){break e}e=q[a+16>>2]+1|0;q[a+16>>2]=e;Mi[q[a+68>>2]](e,q[c+128>>2],q[c+132>>2],1,d)}o[c+296|0]=r[c+296|0]&247;break d}if(b>>>0>=d>>>0){break a}d=q[i>>2];if((q[i+4>>2]-d|0)/18568>>>0<=b>>>0){break a}c=c+w(b,304)|0;h=q[c+280>>2];d=d+w(b,18568)|0;g=u[d+18564>>2];q[c+280>>2]=1;f=x(B(f>2];if(!h){break f}j=q[a+16>>2]+1|0;q[a+16>>2]=j;Mi[q[a+68>>2]](j,q[c+128>>2],q[c+132>>2],1,h)}o[c+296|0]=r[c+296|0]&247;g=x(0);if(f>x(0)^1){break d}while(1){jA(a,d,c,e,x(.01666666753590107));g=x(g+x(.01666666753590107));if(f>g){continue}break}}b=b+1|0;if((k|0)!=(b|0)){continue}break}}return}J(151361,151373,270,151403);G()}J(151947,151192,479,151403);G()}function Jpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=Ii-16|0;Ii=i;e=q[q[a+12>>2]>>2];a:{b:{b=q[a+16>>2];c=q[b+80>>2];c:{if((c|0)==q[58484]){u[e+8>>2]=u[b+96>>2];u[e+12>>2]=u[b+100>>2];u[e+16>>2]=u[b+104>>2];u[e+20>>2]=u[b+108>>2];o[e+160|0]=r[b+112|0]<<2&4|r[e+160|0]&251;u[e+24>>2]=u[b+116>>2];break c}if((c|0)==q[58485]){d=q[e+4>>2];b=d+20|0;c=q[b>>2];f=q[d+16>>2];g=c-f|0;d:{if(!g){break d}h=g>>2;b=0;g=0;while(1){c=b;b=b+1|0;j=b;k=c>>>0>=h-1>>>0;c=(c<<2)+f|0;g=q[c>>2]==(e|0)|g;if(!(k|!(g&1))){if(b>>>0>=h>>>0){break b}q[c>>2]=q[(b<<2)+f>>2];d=q[e+4>>2]}c=q[d+20>>2];f=q[d+16>>2];h=c-f>>2;if(j>>>0>>0){continue}break}b=d+20|0;if(!(g&1)){break d}if((c|0)==(f|0)){break a}c=c-4|0;q[d+20>>2]=c}if(q[d+24>>2]!=(c|0)){q[b>>2]=c+4;q[c>>2]=e;break c}a=q[a+16>>2];q[i>>2]=c-f>>2;gn(a,48793,i);break c}if((c|0)!=q[58486]){break c}d=q[e+4>>2];f=q[d+16>>2];a=q[d+20>>2]-f|0;if(!a){break c}h=a>>2;b=0;while(1){a=b;b=b+1|0;j=b;c=(a<<2)+f|0;g=q[c>>2]==(e|0)|g;if(!(!(g&1)|a>>>0>=h-1>>>0)){if(b>>>0>=h>>>0){break b}q[c>>2]=q[(b<<2)+f>>2];d=q[e+4>>2]}a=q[d+20>>2];f=q[d+16>>2];h=a-f>>2;if(j>>>0>>0){continue}break}if(!(g&1)){break c}if((a|0)==(f|0)){break a}q[d+20>>2]=a-4}Ii=i+16|0;return 0}J(49027,48930,479,49038);G()}J(49049,48930,548,49060);G()}function uK(a,b,c){var d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),o=x(0),p=x(0),r=x(0);k=b&2;g=k?u[a+68>>2]:x(1);h=k?u[a+64>>2]:x(1);if(b&4){a:{b:{c:{d:{e:{f:{g:{l=q[a+412>>2]>>>12&15;switch(l|0){case 8:break c;case 7:break d;case 2:case 3:case 4:break f;case 0:case 1:case 5:break g;default:break a}}f=x(h*x(-.5));break e}f=x(-h)}e=f;switch(l|0){case 1:case 2:break c;case 0:case 3:break d;default:break a}}d=x(g*x(-.5));break b}d=x(-g)}e=f}u[c+48>>2]=u[c+48>>2]+x(x(x(e*u[c>>2])+x(d*u[c+16>>2]))+x(u[c+32>>2]*x(0)));u[c+60>>2]=u[c+60>>2]+x(x(x(e*u[c+12>>2])+x(d*u[c+28>>2]))+x(u[c+44>>2]*x(0)));u[c+56>>2]=u[c+56>>2]+x(x(x(e*u[c+8>>2])+x(d*u[c+24>>2]))+x(u[c+40>>2]*x(0)));u[c+52>>2]=u[c+52>>2]+x(x(x(e*u[c+4>>2])+x(d*u[c+20>>2]))+x(u[c+36>>2]*x(0)))}if(!(!k|((q[a+412>>2]&240)==16?!(b&1):0))){f=u[c>>2];e=x(f*x(0));d=u[c+16>>2];i=x(d*x(0));j=u[c+32>>2];u[c+32>>2]=x(e+i)+j;d=x(e+x(g*d));e=x(j*x(0));u[c+16>>2]=d+e;u[c>>2]=x(x(h*f)+i)+e;f=u[c+8>>2];e=x(f*x(0));d=u[c+24>>2];i=x(d*x(0));j=u[c+40>>2];u[c+40>>2]=x(e+i)+j;m=u[c+4>>2];n=x(m*x(0));o=u[c+20>>2];p=x(o*x(0));r=u[c+36>>2];u[c+36>>2]=x(n+p)+r;d=x(e+x(g*d));e=x(j*x(0));u[c+24>>2]=d+e;d=x(r*x(0));u[c+20>>2]=x(n+x(g*o))+d;u[c+8>>2]=x(x(h*f)+i)+e;u[c+4>>2]=x(x(h*m)+p)+d}}function nla(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=Ii-160|0;Ii=d;g=d+152|0;e=g;q[e>>2]=0;q[e+4>>2]=0;q[d+144>>2]=0;q[d+148>>2]=0;f=q[a+312>>2]-q[a+308>>2]>>>3&65535;Wi(f,8,d+144|0,e,d+144|4);a:{if(!f){break a}g=0;while(1){b:{e=lK(a,g&65535,d+16|0);if(!e){e=q[d+148>>2];if((e|0)!=q[d+152>>2]){break b}J(40939,40745,533,40963);G()}q[d>>2]=e;Pi(4,40439,41432,d);break a}q[d+148>>2]=e+8;h=q[d+20>>2];q[e>>2]=q[d+16>>2];q[e+4>>2]=h;g=g+1|0;if((g&65535)>>>0>>0){continue}break}}g=q[a+344>>2];e=q[a+348>>2];f=q[q[a+12>>2]+172>>2];b=IH(f,b,c,q[q[a+12>>2]+36>>2],d+144|0);c=Li;if((g|0)!=(b|0)|(c|0)!=(e|0)){OH(f,b,c,d+128|0);f=q[d+128>>2];q[a+396>>2]=q[d+132>>2];q[a+392>>2]=f;o[a+390|0]=r[a+390|0]|1;WJ(a,b,c);q[d+104>>2]=0;q[d+108>>2]=0;q[d+96>>2]=0;q[d+100>>2]=0;q[d+88>>2]=0;q[d+92>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+56>>2]=0;q[d+60>>2]=0;f=d- -64|0;q[f>>2]=0;q[f+4>>2]=0;q[d+72>>2]=0;q[d+76>>2]=0;q[d+80>>2]=0;q[d+84>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;f=Oi(41475);q[d+96>>2]=q[59632];q[d+80>>2]=f;q[d+84>>2]=Li;q[d+120>>2]=g;q[d+124>>2]=e;q[d+112>>2]=b;q[d+116>>2]=c;q[d+100>>2]=16;nK(a,d+16|0)}c:{if(o[d+156|0]&1){break c}a=q[d+144>>2];if(!a){break c}Ni(a)}Ii=d+160|0}function dO(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-80|0;Ii=d;if(q[b+8>>2]-6>>>0>=4){Sj(a,142498)}i=b+8|0;a:{b:{c:{d:{e:{f:{e=q[a+16>>2]-44|0;if(e){if((e|0)==17){break e}break f}Vj(a);q[d+48>>2]=b;_x(a,d+56|0);if(q[d+56>>2]!=6){break c}f=q[a+48>>2];g=q[f+36>>2];while(1){g:{if(q[b+8>>2]==9){e=q[d+64>>2];if((e|0)==q[b+16>>2]){q[b+16>>2]=g;h=1;e=q[d+64>>2]}if(q[b+20>>2]==(e|0)){break g}}b=q[b>>2];if(b){continue}if(!h){break c}e=q[d+64>>2];break d}q[b+20>>2]=g;h=1;b=q[b>>2];if(b){continue}break}break d}b=q[a+52>>2];q[d>>2]=tl(a,61);Sj(a,oj(b,141919,d))}Vj(a);pl(a,d+48|0,0);b=1;if(q[a+16>>2]==44){while(1){Vj(a);Mm(q[a+48>>2],d+48|0);pl(a,d+48|0,0);b=b+1|0;if(q[a+16>>2]==44){continue}break}}e=q[a+48>>2];if((b|0)!=(c|0)){jC(e,c,b,d+48|0);if((b|0)<=(c|0)){break b}e=q[a+48>>2];q[e+36>>2]=q[e+36>>2]+(c-b|0);break b}iZ(e,d+48|0);a=q[a+48>>2];break a}Bm(f,0,q[f+36>>2],e,0);hq(f,1)}b=200-s[q[a+52>>2]+52>>1]|0;if((b|0)<(c|0)){e=q[a+48>>2];f=q[e+16>>2];g=q[q[e>>2]+60>>2];h:{if(!g){q[d+16>>2]=b;q[d+20>>2]=142511;b=oj(f,142064,d+16|0);break h}q[d+36>>2]=b;q[d+32>>2]=g;q[d+40>>2]=142511;b=oj(f,142098,d+32|0)}gm(q[e+12>>2],b,0)}dO(a,d+48|0,c+1|0)}a=q[a+48>>2];b=q[a+36>>2];q[d+64>>2]=-1;q[d+68>>2]=-1;q[d+48>>2]=12;q[d+56>>2]=b-1}Iy(a,i,d+48|0);Ii=d+80|0}function ona(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-48|0;Ii=e;h=q[a+8>>2];j=y5(q[h+96>>2],u[q[a+4>>2]+4>>2]);a:{d=q[h+4>>2];a=q[h>>2];c=d-a|0;if(!c){break a}if((a|0)!=(d|0)){d=a-d|0;f=((c|0)<(d|0)?d:c)>>>2|0;c=(c|0)>-1?c:-1;c=w(f,(c|0)<1?c:1);k=c>>>0>1?c:1;while(1){a=q[(i<<2)+a>>2];d=r[a+254|0];c=d&253;o[a+254|0]=c;if((d&5)==5){b:{c:{if(d&8){break c}d=q[a+180>>2];if(!d){break b}if(r[d+52|0]){break c}c=r[a+254|0];break b}d=q[a+128>>2];c=0;q[e+24>>2]=0;q[e+28>>2]=0;q[e+40>>2]=0;q[e+32>>2]=0;q[e+36>>2]=0;d:{f=q[d+28>>2];if((f|0)==q[d+32>>2]){break d}while(1){e:{g=f;f=c<<4;g=q[(g+f|0)+4>>2];kk(e+24|0,g,4);kk(e+24|0,g+4|0,32);g=q[d+28>>2];if(q[d+32>>2]-g>>4>>>0<=c>>>0){break e}f=f+g|0;kk(e+24|0,q[f+8>>2],q[f+12>>2]<<4);c=c+1|0;f=q[d+28>>2];if(c>>>0>2]-f>>4>>>0){continue}break d}break}J(51709,51308,479,51547);G()}kk(e+24|0,a+184|0,8);c=q[a+216>>2];if(c){kk(e+24|0,c,4);kk(e+24|0,c+4|0,32)}c=q[a+180>>2];if(c){At(c,e+24|0)}q[a+136>>2]=Rn(e+24|0);c=r[a+254|0]&-9;o[a+254|0]=c}o[a+254|0]=c|2;q[73232]=q[73232]+1;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=1;q[e+12>>2]=0}i=i+1|0;if((k|0)==(i|0)){break a}a=q[h>>2];if(q[h+4>>2]-a>>2>>>0>i>>>0){continue}break}}J(51709,51308,486,51547);G()}o[b|0]=(j|0)==4;Ii=e+48|0;return 0} - - - -function Yya(){q[56777]=q[71906];q[71906]=227080;q[56829]=q[71906];q[71906]=227288;q[56875]=q[71906];q[71906]=227472;q[56901]=q[71906];q[71906]=227576;q[56929]=q[71906];q[71906]=227688;q[56951]=q[71906];q[71906]=227776;q[57011]=q[71906];q[71906]=228016;q[57071]=q[71906];q[71906]=228256;q[57091]=q[71906];q[71906]=228336;q[57145]=q[71906];q[71906]=228552;q[57197]=q[71906];q[71906]=228760;q[71852]=1;q[71850]=-837310683;q[71851]=-705779925;q[71849]=21686;q[71848]=1;q[71855]=0;o[287416]=0;q[71853]=q[71846];q[71855]=q[71906];q[71906]=287392;q[71862]=1;q[71860]=246251198;q[71861]=718133641;q[71859]=21706;q[71858]=1;q[71865]=0;o[287456]=0;q[71863]=q[71857];q[71865]=q[71906];q[71906]=287432;q[71872]=1;q[71870]=2127212355;q[71871]=1376186741;q[71869]=21726;q[71868]=1;q[71875]=0;o[287496]=0;q[71873]=q[71867];q[71875]=q[71906];q[71906]=287472;q[57263]=q[71906];q[71906]=229024;q[57287]=q[71906];q[71906]=229120;q[71886]=1;q[71884]=772958340;q[71885]=1445875888;q[71883]=21860;q[71882]=1;q[71889]=0;o[287552]=0;q[71887]=q[71880];q[71889]=q[71906];q[71906]=287528;q[71896]=1;q[71894]=-779701654;q[71895]=342456181;q[71893]=21867;q[71892]=1;q[71899]=0;o[287592]=0;q[71897]=q[71891];q[71899]=q[71906];q[71906]=287568;q[57323]=q[71906];q[71906]=229264}function Ax(a,b,c,d,e,f){var g=0,h=0,i=x(0),j=0,k=0,l=0,m=0,n=x(0),o=0,r=x(0),s=0;h=Ii-16|0;Ii=h;q[h+12>>2]=a;m=a;while(1){q[h+8>>2]=m;j=0;l=0;i=x(0);n=x(0);a:{if(f){while(1){g=Ko(h+12|0);b:{if(!g){break b}j=j+1|0;if((g|0)==10|(g|0)==8203){break b}if((g|0)!=32){continue}}c:{if((j|0)<1){break c}k=j-((g|0)!=0)|0;i=HH(e,m,k,1);if(!(i<=b^1)){q[h+8>>2]=q[h+12>>2];l=k;n=i;break c}if(!l){l=0;break c}q[h+12>>2]=q[h+8>>2];g=Ko(h+8|0)}if(b>=i^1){break a}switch(g|0){case 0:case 10:break a;default:continue}}}while(1){g=Ko(h+12|0);d:{if(!g){break d}j=j+1|0;if((g|0)==10|(g|0)==8203){break d}if((g|0)!=32){continue}}e:{if((j|0)<1){break e}f:{k=j-((g|0)!=0)|0;i=HH(e,m,k,0);if(!(i<=b^1)){q[h+8>>2]=q[h+12>>2];if((g|0)==10){l=k;g=10;n=i;break e}g=Ko(h+12|0);if(!g){break f}while(1){g:{j=j+1|0;if((g|0)!=32?(g|0)!=8203:0){break g}g=Ko(h+12|0);if(g){continue}break f}break}l=k;n=i;break e}if(!l){l=0;break e}q[h+12>>2]=q[h+8>>2];g=Ko(h+8|0);break e}l=k;g=0;n=i}if(b>=i^1){break a}switch(g|0){case 0:case 10:break a;default:continue}}}h:{if(o>>>0>=128){break h}k=(g|0)!=0;s=j-k|0;j=!l&b0|k)){break h}k=(o<<3)+c|0;p[k+6>>1]=l;p[k+4>>1]=m-a;i=j?i:n;u[k>>2]=i;r=i>2];continue}break}u[d>>2]=r;Ii=h+16|0;return o}function gfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-32|0;Ii=g;a:{b:{c:{d:{e:{if(!(b|c)){break e}if((c|0)==2097152|c>>>0>2097152){break d}if(b+1>>>0<2){break e}e=b&65535;if(e>>>0>=t[a+32>>2]){break c}c=q[q[a+24>>2]+(e<<2)>>2];if(!c){break e}f=s[q[a+28>>2]+(e<<1)>>1]==(b>>>16|0)?c:0}c=q[75052];if(c){e=q[a+148>>2];if(e){b=0;e=e&48?r[a+156|0]&16?e&-49:e:e;if(e&1){q[g>>2]=s[a+156>>1]&8?36064:6144;b=1}if(e&16){q[(b<<2|g)>>2]=s[a+156>>1]&8?36096:6145;b=b+1|0}if(e&32){q[(b<<2|g)>>2]=s[a+156>>1]&8?36128:6146;b=b+1|0}Mi[c|0](36160,b,g)}q[a+148>>2]=d;p[a+156>>1]=s[a+156>>1]&65527|((f|0)!=0)<<3}f:{if(!f){a=Ua()|0;break f}a=q[f+448>>2]}Ia(36160,a|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}g:{if(!f){break g}h=q[f+48>>2];i=q[f+52>>2];j=!(h|i);q[g>>2]=j?0:36064;e=!(q[f+112>>2]|q[f+116>>2]);q[g+4>>2]=e?0:36065;d=q[f+176>>2];c=q[f+180>>2];q[g+8>>2]=d|c?36066:0;b=q[f+240>>2];a=q[f+244>>2];q[g+12>>2]=b|a?36067:0;a=(((d|0)!=0|(c|0)!=0)+(e?(h|0)!=0|(i|0)!=0:j?1:2)|0)+((b|0)!=0|(a|0)!=0)|0;if(a>>>0<2){break g}zc(a|0,g|0)}a=za(36160)|0;if((a|0)!=36053){break a}Ii=g+32|0;return}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}lj(a,93855,2701);J(88669,88575,2701,93855);G()}dw(a);J(93324,88575,2735,93855);G()}function YX(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-288|0;Ii=d;Hs(d+8|0);q[a+4>>2]=a+8;g=Yq(d+8|0,b,c);if(!g){e=q[d+8>>2];q[a>>2]=e;h=q[d+12>>2];f=h+(e<<4)|0;q[a+8>>2]=q[f>>2];q[a+12>>2]=q[f+4>>2];q[a+16>>2]=q[f+8>>2];q[a+20>>2]=q[f+12>>2];b=a+24|0;c=f-16|0;if((e|0)<2){a=f+16|0}else{while(1){a=q[c>>2];q[b>>2]=q[(r[(a>>>8&255)+843760|0]<<2)+845040>>2]^q[(r[(a&255)+843760|0]<<2)+844016>>2]^q[(r[(a>>>16&255)+843760|0]<<2)+846064>>2]^q[(r[(a>>>24|0)+843760|0]<<2)+847088>>2];a=q[c+4>>2];q[b+4>>2]=q[(r[(a>>>8&255)+843760|0]<<2)+845040>>2]^q[(r[(a&255)+843760|0]<<2)+844016>>2]^q[(r[(a>>>16&255)+843760|0]<<2)+846064>>2]^q[(r[(a>>>24|0)+843760|0]<<2)+847088>>2];a=q[c+8>>2];q[b+8>>2]=q[(r[(a>>>8&255)+843760|0]<<2)+845040>>2]^q[(r[(a&255)+843760|0]<<2)+844016>>2]^q[(r[(a>>>16&255)+843760|0]<<2)+846064>>2]^q[(r[(a>>>24|0)+843760|0]<<2)+847088>>2];a=q[c+12>>2];q[b+12>>2]=q[(r[(a>>>8&255)+843760|0]<<2)+845040>>2]^q[(r[(a&255)+843760|0]<<2)+844016>>2]^q[(r[(a>>>16&255)+843760|0]<<2)+846064>>2]^q[(r[(a>>>24|0)+843760|0]<<2)+847088>>2];c=c-16|0;b=b+16|0;a=(e|0)>2;e=e-1|0;if(a){continue}break}c=h;a=c+32|0}q[b>>2]=q[c>>2];q[b+4>>2]=q[a-28>>2];q[b+8>>2]=q[a-24>>2];q[b+12>>2]=q[a-20>>2]}a=d+8|0;if(a){Mi[q[65677]](a,0,280)|0}Ii=d+288|0;return g}function JC(a,b,c,d,e){var f=0,g=0,h=0,i=0;a:{b:{c:{switch(d|0){case 2:c=q[c>>2];b=b-4|0;d=q[b>>2];g=q[a>>2];if(t[(c+w(d,48)|0)+32>>2]>2]){q[e>>2]=d;q[e+4>>2]=q[a>>2];return}q[e>>2]=g;q[e+4>>2]=q[b>>2];return;default:if((d|0)<=8){if((a|0)==(b|0)){break a}d=q[a>>2];q[e>>2]=d;f=a+4|0;if((f|0)==(b|0)){break a}h=q[c>>2];a=e;while(1){g=a+4|0;c=q[f>>2];d:{if(t[(h+w(c,48)|0)+32>>2]>2]){q[a+4>>2]=d;i=e;e:{if((a|0)==(e|0)){break e}while(1){d=a-4|0;c=q[d>>2];i=a;if(t[(h+w(q[f>>2],48)|0)+32>>2]>=t[(h+w(c,48)|0)+32>>2]){break e}q[a>>2]=c;a=d;if((e|0)!=(a|0)){continue}break}i=e}q[i>>2]=q[f>>2];break d}q[g>>2]=c}f=f+4|0;if((f|0)==(b|0)){break a}d=q[g>>2];a=g;continue}}f=d>>>1|0;h=f<<2;g=h+a|0;Pp(a,g,c,f,e,f);d=d-f|0;Pp(g,b,c,d,e+h|0,d);c=q[c>>2];d=g;while(1){if((b|0)==(d|0)){if((a|0)==(g|0)){break a}while(1){q[e>>2]=q[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}break a}f=q[d>>2];h=q[a>>2];f:{if(t[(c+w(f,48)|0)+32>>2]>2]){q[e>>2]=f;d=d+4|0;break f}q[e>>2]=h;a=a+4|0}e=e+4|0;if((a|0)!=(g|0)){continue}break}break b;case 0:break a;case 1:break c}}q[e>>2]=q[a>>2];break a}if((b|0)==(d|0)){break a}while(1){q[e>>2]=q[d>>2];e=e+4|0;d=d+4|0;if((d|0)!=(b|0)){continue}break}}}function x7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-80|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=_i(a,-1,q[79180],119558);Ri(a,-2);if((d|0)==q[a+8>>2]-q[a+12>>2]>>4){a:{if((Vi(a,1)|0)!=1){break a}if((Vi(a,2)|0)!=1){break a}if((Vi(a,3)|0)!=1){break a}if((Vi(a,4)|0)!=1){break a}h=(Uj(a,1)|0)!=0;f=(Uj(a,2)|0)!=0;c=(Uj(a,3)|0)!=0;d=(Uj(a,4)|0)!=0;q[b+48>>2]=h;q[b+52>>2]=0;q[b+40>>2]=10;q[b+72>>2]=d;q[b+76>>2]=0;q[b+64>>2]=c;q[b+68>>2]=0;q[b+56>>2]=f;q[b+60>>2]=0;c=q[e+4>>2];b:{if((c|0)==q[e+8>>2]){q[b>>2]=(q[e+8>>2]-q[e>>2]|0)/40;g=Qi(a,115614,b);break b}q[e+4>>2]=c+40;a=q[b+76>>2];q[c+32>>2]=q[b+72>>2];q[c+36>>2]=a;d=b- -64|0;a=q[d+4>>2];q[c+24>>2]=q[d>>2];q[c+28>>2]=a;a=q[b+60>>2];q[c+16>>2]=q[b+56>>2];q[c+20>>2]=a;a=q[b+52>>2];q[c+8>>2]=q[b+48>>2];q[c+12>>2]=a;a=q[b+44>>2];q[c>>2]=q[b+40>>2];q[c+4>>2]=a}Ii=b+80|0;return g|0}d=Vi(a,2);f=140583;c:{if((d|0)==-1){break c}f=q[(d<<2)+256832>>2]}d=Vi(a,3);c=140583;d:{if((d|0)==-1){break d}c=q[(d<<2)+256832>>2]}d=Vi(a,4);g=140583;e:{if((d|0)==-1){break e}g=q[(d<<2)+256832>>2]}d=b;h=Vi(a,5);e=140583;f:{if((h|0)==-1){break f}e=q[(h<<2)+256832>>2]}q[d+28>>2]=e;q[b+24>>2]=g;q[b+20>>2]=c;q[b+16>>2]=f;a=Qi(a,117518,b+16|0);Ii=b+80|0;return a|0}J(115568,115465,478,119531);G()}function Wy(){q[213402]=0;q[213403]=0;q[213410]=0;q[213411]=0;q[213418]=0;q[213419]=0;q[213426]=0;q[213427]=0;q[213408]=0;q[213409]=0;q[213406]=0;q[213407]=0;q[213404]=0;q[213405]=0;q[213403]=6;q[213411]=6;q[213412]=0;q[213413]=0;q[213414]=0;q[213415]=0;q[213416]=0;q[213417]=1;q[213419]=6;q[213420]=0;q[213421]=0;q[213422]=0;q[213423]=0;q[213424]=0;q[213425]=2;q[213428]=0;q[213429]=0;q[213430]=0;q[213431]=0;q[213433]=3;q[213432]=0;q[213427]=6;q[213438]=0;q[213439]=0;q[213436]=0;q[213437]=0;q[213434]=0;q[213435]=0;q[213441]=4;q[213440]=0;q[213435]=6;q[213446]=0;q[213447]=0;q[213444]=0;q[213445]=0;q[213442]=0;q[213443]=0;q[213449]=5;q[213448]=0;q[213443]=6;q[213454]=0;q[213455]=0;q[213452]=0;q[213453]=0;q[213450]=0;q[213451]=0;q[213457]=6;q[213456]=0;q[213451]=6;q[213462]=0;q[213463]=0;q[213460]=0;q[213461]=0;q[213458]=0;q[213459]=0;q[213465]=7;q[213464]=0;q[213459]=6;q[213470]=0;q[213471]=0;q[213468]=0;q[213469]=0;q[213466]=0;q[213467]=0;q[213473]=8;q[213472]=0;q[213467]=6;q[213478]=0;q[213479]=0;q[213476]=0;q[213477]=0;q[213474]=0;q[213475]=0;q[213481]=9;q[213480]=0;q[213475]=6;q[213486]=0;q[213487]=0;q[213484]=0;q[213485]=0;q[213482]=0;q[213483]=0;q[213489]=10;q[213488]=0;q[213483]=6;Hb()|0;zb(1427)|0;return 1}function B0(a,b,c,d,e,f){var g=0,h=0,i=0;g=Ii-144|0;Ii=g;q[g+136>>2]=0;q[g+128>>2]=1;q[g+132>>2]=0;q[g+120>>2]=0;q[g+112>>2]=1;q[g+116>>2]=0;q[g+104>>2]=0;q[g+96>>2]=1;q[g+100>>2]=0;q[g+88>>2]=0;q[g+80>>2]=1;q[g+84>>2]=0;h=g- -64|0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;q[g+56>>2]=0;q[g+48>>2]=1;q[g+52>>2]=0;q[g+40>>2]=0;q[g+32>>2]=1;q[g+36>>2]=0;q[g+24>>2]=0;q[g+16>>2]=1;q[g+20>>2]=0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;i=d+24|0;h=bq(a,g+128|0,d,i);a:{if(h){break a}h=ck(a,g+112|0,g+128|0,g+128|0);if(h){break a}h=Jm(a,g+96|0,d,i);if(h){break a}h=ck(a,g+80|0,g+96|0,g+96|0);if(h){break a}h=Jm(a,g- -64|0,g+112|0,g+80|0);if(h){break a}d=e+24|0;h=bq(a,g+48|0,e,d);if(h){break a}h=Jm(a,g+32|0,e,d);if(h){break a}h=ck(a,g+16|0,g+32|0,g+128|0);if(h){break a}h=ck(a,g,g+48|0,g+96|0);if(h){break a}h=Rl(c,g+16|0,g);if(h){break a}h=YF(c,a);if(h){break a}h=ck(a,c,c,c);if(h){break a}c=c+24|0;h=Jm(a,c,g+16|0,g);if(h){break a}h=ck(a,c,c,c);if(h){break a}h=ck(a,c,f,c);if(h){break a}h=ck(a,b,g+112|0,g+80|0);if(h){break a}b=b+24|0;h=ck(a,b,a+16|0,g- -64|0);if(h){break a}h=bq(a,b,g+80|0,b);if(h){break a}h=ck(a,b,g- -64|0,b)}ij(g+128|0);ij(g+112|0);ij(g+96|0);ij(g+80|0);ij(g- -64|0);ij(g+48|0);ij(g+32|0);ij(g+16|0);ij(g);Ii=g+144|0;return h}function K2(a,b){var c=0,d=0,e=0,f=0,g=x(0),h=0,i=0,j=x(0);h=Ii-32|0;Ii=h;a:{b:{if(a){q[h+24>>2]=0;o[a+46|0]=r[a+46|0]|1;e=q[a+4>>2]-q[a>>2]|0;c=(e|0)/28|0;q[210402]=c+q[210402];q[h+8>>2]=c;q[h+12>>2]=0;q[h+16>>2]=c;q[h+20>>2]=0;if(!e){break b}e=c>>>0>1?c:1;while(1){c=q[a>>2];if((q[a+4>>2]-c|0)/28>>>0<=d>>>0){break a}f=w(d,28);c=f+c|0;i=r[c+24|0];c:{if(!(i&2)){break c}g=x(u[c+16>>2]-b);u[c+16>>2]=g;if(g>x(0)){break c}Mi[q[c>>2]](a,i&1,q[c+12>>2],x(u[c+20>>2]-g),q[c+4>>2],q[c+8>>2]);c=q[a>>2];if((q[a+4>>2]-c|0)/28>>>0<=d>>>0){break a}c=c+f|0;f=r[c+24|0];if(!(f&2)){break c}if(!(f&1)){o[c+24|0]=f&253;break c}g=u[c+20>>2];if(g==x(0)){q[c+16>>2]=0;break c}j=u[c+16>>2];j=x(j+x(g*x(C(x(x(1)-x(j/g))))));u[c+16>>2]=j;if(j>2]=g}d=d+1|0;if((e|0)!=(d|0)){continue}break}break b}J(132889,132848,197,132908);G()}o[a+46|0]=r[a+46|0]&254;c=q[a+4>>2];e=q[a>>2];d=c-e|0;f=(d|0)/28|0;d:{if(!d){break d}e:{if((c|0)!=(e|0)){d=0;c=f;while(1){e=w(d,28)+e|0;i=r[e+24|0];f:{if(!(i&2)){Cz(a,q[e+12>>2],i);c=c-1|0;break f}d=d+1|0}if(c>>>0<=d>>>0){break e}e=q[a>>2];if((q[a+4>>2]-e|0)/28>>>0>d>>>0){continue}break}}break a}if((c|0)==(f|0)){break d}p[a+44>>1]=s[a+44>>1]+1}Ii=h+32|0;return}J(133962,133265,479,133973);G()}function Du(a,b){var c=0,d=0,e=0,f=0;f=a+40|0;d=q[a>>2];e=d&63;o[f+e|0]=128;c=e+1|0;a:{if(e>>>0<=55){Ui((a+c|0)+40|0,0,55-e|0);break a}Ui((a+c|0)+40|0,0,e^63);Bs(a,f);c=f;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=q[a>>2]}o[a+103|0]=d<<3;o[a+102|0]=d>>>5;o[a+101|0]=d>>>13;o[a+100|0]=d>>>21;c=q[a+4>>2];o[a+98|0]=c>>>5;o[a+97|0]=c>>>13;o[a+96|0]=c>>>21;o[a+99|0]=c<<3|d>>>29;Bs(a,f);o[b|0]=r[a+11|0];o[b+1|0]=s[a+10>>1];o[b+2|0]=q[a+8>>2]>>>8;o[b+3|0]=q[a+8>>2];o[b+4|0]=r[a+15|0];o[b+5|0]=s[a+14>>1];o[b+6|0]=q[a+12>>2]>>>8;o[b+7|0]=q[a+12>>2];o[b+8|0]=r[a+19|0];o[b+9|0]=s[a+18>>1];o[b+10|0]=q[a+16>>2]>>>8;o[b+11|0]=q[a+16>>2];o[b+12|0]=r[a+23|0];o[b+13|0]=s[a+22>>1];o[b+14|0]=q[a+20>>2]>>>8;o[b+15|0]=q[a+20>>2];o[b+16|0]=r[a+27|0];o[b+17|0]=s[a+26>>1];o[b+18|0]=q[a+24>>2]>>>8;o[b+19|0]=q[a+24>>2];o[b+20|0]=r[a+31|0];o[b+21|0]=s[a+30>>1];o[b+22|0]=q[a+28>>2]>>>8;o[b+23|0]=q[a+28>>2];o[b+24|0]=r[a+35|0];o[b+25|0]=s[a+34>>1];o[b+26|0]=q[a+32>>2]>>>8;o[b+27|0]=q[a+32>>2];if(!q[a+104>>2]){o[b+28|0]=r[a+39|0];o[b+29|0]=s[a+38>>1];o[b+30|0]=q[a+36>>2]>>>8;o[b+31|0]=q[a+36>>2]}return 0}function vN(a,b){var c=0,d=0,e=0;if(!r[b+21|0]){q[a+112>>2]=21;return-1}c=q[a+1408>>2];a:{if((c|0)>9){break a}if(!c){q[a+1404>>2]=0}while(1){c=r[a+1388|0];b:{c:{d:{e:{f:{if(q[a+1396>>2]){if(c&255){break f}break a}if(c&255){break f}d=q[a+1392>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break a}if(!(o[a+1387|0]&1)){break e}d=q[a+1392>>2]}e=d+1|0;q[a+1392>>2]=e;c=r[(a+d|0)+1132|0];if((c|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if(q[a+1128>>2]<=(e|0)){q[a+1392>>2]=-1}if(r[a+1388|0]){break d}o[a+1388|0]=c;if(!c){break a}}o[a+1388|0]=c-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];g:{if(c){if(c>>>0>=t[a+52>>2]){break c}q[a+44>>2]=c+1;c=r[c|0];break g}c=wj(q[a+32>>2]);if((c|0)==-1){break c}}c=c&255;break b}q[a+112>>2]=32;break a}J(211824,211687,1555,211845);G()}q[a+108>>2]=1;c=0}d=q[a+1408>>2];q[a+1408>>2]=d+8;q[a+1404>>2]=q[a+1404>>2]+(c<>2];c=p[(((d&1023)<<1)+b|0)+36>>1];h:{if((c|0)>=0){e=d;d=r[c+q[b+8>>2]|0];q[a+1404>>2]=e>>>d;e=q[a+1408>>2]-d|0;d=(e|0)<0;q[a+1408>>2]=d?0:e;c=d?-1:c;break h}c=yq(a,b)}if(!((c|0)>=q[b+2092>>2]?r[b+23|0]:0)){if(!((c|0)>-1|(q[a+1396>>2]?!r[a+1388|0]:0))){q[a+112>>2]=21}return c}J(212040,211687,1784,212062);G()}function jza(){var a=0;q[72556]=Oi(40157);q[72557]=Li;q[72558]=Oi(40176);q[72559]=Li;q[72560]=Oi(40193);q[72561]=Li;q[72562]=Oi(40202);q[72563]=Li;q[72564]=Oi(40208);q[72565]=Li;q[72566]=Oi(40218);q[72567]=Li;q[72568]=Oi(40226);q[72569]=Li;q[72570]=Oi(40233);q[72571]=Li;q[72572]=Oi(40242);q[72573]=Li;q[72574]=Oi(40254);q[72575]=Li;q[72576]=Oi(40263);q[72577]=Li;q[72578]=Oi(40268);q[72579]=Li;q[72580]=Oi(40274);q[72581]=Li;q[72582]=Oi(40280);q[72583]=Li;q[72584]=Oi(40289);q[72585]=Li;q[72588]=Oi(40299);q[72589]=Li;q[72590]=Oi(40308);q[72591]=Li;q[72592]=Oi(40317);q[72593]=Li;q[72594]=Oi(40326);q[72595]=Li;q[72596]=Oi(40335);q[72597]=Li;q[72598]=Oi(40344);q[72599]=Li;q[72600]=Oi(40353);q[72601]=Li;q[72602]=Oi(40362);q[72603]=Li;q[72604]=Oi(40371);q[72605]=Li;a=Oi(40380);q[72625]=0;q[72626]=0;q[72624]=853960;q[72622]=0;q[72620]=40412;q[72619]=40392;q[72618]=0;q[72616]=0;q[72614]=0;q[72612]=0;q[72610]=1;q[72608]=0;q[72609]=3;q[72606]=a;q[72607]=Li;q[72627]=0;q[72628]=0;q[72629]=0;q[72630]=Oi(40414);q[72631]=Li;q[72632]=Oi(40423);q[72633]=Li;a=Oi(40433);q[72642]=2;q[72640]=4;q[72641]=5;q[72638]=1;q[72639]=3;q[72636]=6;q[72637]=0;q[72634]=a;q[72635]=Li;q[72643]=0;q[72646]=3;q[72647]=4;q[72644]=1;q[72645]=2}function Vka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-112|0;Ii=b;e=nj(b+88|0,a,0,73366,845);d=$j(a,2);f=Li;c=q[q[jk(a)+80>>2]+8>>2];q[b+84>>2]=0;q[b+80>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Ml(a,1,c,73150,b+84|0,b+24|0,b+80|0);c=Tla(q[b+80>>2],q[b+84>>2],d,f,b+76|0);a:{if(c){q[b+20>>2]=c;q[b+16>>2]=q[(c<<2)+232752>>2];a=Kj(e,75238,b+16|0);break a}o[b+24|0]=0;b:{c:{d:{e:{f:{g:{c=q[b+76>>2];switch(c|0){case 4:break c;case 3:break d;case 2:break e;case 1:break f;case 0:break g;default:break b}}q[b+36>>2]=0;q[b+28>>2]=1065353216;q[b+32>>2]=0;break b}q[b+28>>2]=0;break b}o[b+49|0]=0;o[b+50|0]=0;o[b+51|0]=0;o[b+52|0]=0;o[b+53|0]=0;o[b+54|0]=0;o[b+55|0]=0;o[b+56|0]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;o[b+57|0]=0;break b}q[b+68>>2]=0;q[b+72>>2]=0;q[b+36>>2]=1065353216;q[b+40>>2]=0;q[b+44>>2]=0;o[b+45|0]=0;o[b+46|0]=0;o[b+47|0]=0;o[b+48|0]=0;o[b+49|0]=0;o[b+50|0]=0;o[b+51|0]=0;o[b+52|0]=0;q[b+56>>2]=0;q[b+60>>2]=0;o[b- -64|0]=0;break b}q[b+36>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0}TK(a,c,3,b+24|0);d=nL(q[b+80>>2],q[b+84>>2],d,f);a=0;if(!d){break a}q[b+4>>2]=d;q[b>>2]=q[(d<<2)+232752>>2];a=Kj(e,75304,b)}mj(e);Ii=b+112|0;return a|0}function cj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-32|0;Ii=g;q[g+24>>2]=0;a:{d=q[a+4>>2];c=q[d+4>>2];b:{if(!c){break b}c=q[q[d>>2]+((b>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break b}d=q[d+8>>2];while(1){e=d+w(c,24)|0;if(q[e>>2]==(b|0)){break a}c=q[e+16>>2];if((c|0)!=-1){continue}break}}J(25672,24997,1240,25693);G()}c:{e=q[a>>2];f=q[e+4>>2];d:{if(!f){break d}d=d+w(c,24)|0;c=d;h=q[c+8>>2];i=q[c+12>>2];c=q[q[e>>2]+(Cza(h,i,f)<<2)>>2];if((c|0)==-1){break d}e=q[e+8>>2];while(1){f=e+w(c,48)|0;if((h|0)==q[f>>2]&(i|0)==q[f+4>>2]){break c}c=q[f+40>>2];if((c|0)!=-1){continue}break}}J(25623,24997,1243,25693);G()}f=e+w(c,48)|0;h=f;i=q[f+36>>2];if(i){j=h;h=i-1|0;q[j+36>>2]=h;if(!h){c=q[(e+w(c,48)|0)+32>>2];q[g+16>>2]=0;q[g>>2]=a;e=q[c+12>>2];q[g+8>>2]=f+8;q[g+4>>2]=e;Mi[q[c+28>>2]](g)|0;DI(q[a+4>>2],b);taa(q[a>>2],q[d+8>>2],q[d+12>>2]);a=q[a+8>>2];if(a){b=q[d+8>>2];d=q[d+12>>2];e:{c=q[a+4>>2];f:{if(!c){break f}c=q[q[a>>2]+(Cza(b,d,c)<<2)>>2];if((c|0)==-1){break f}e=q[a+8>>2];while(1){f=e+(c<<4)|0;if((b|0)==q[f>>2]&(d|0)==q[f+4>>2]){break e}c=q[f+12>>2];if((c|0)!=-1){continue}break}}lJ(a,b,d);J(25701,24997,1265,25693);G()}lJ(a,b,d);Ni(q[(e+(c<<4)|0)+8>>2])}}Ii=g+32|0;return}J(25626,24997,1244,25693);G()}function QK(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,t=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0;f=s[a+162>>1];if(!f){return 0}b=s[a+160>>1];a:{while(1){b=b&65535;b:{if(!b){b=0;break b}A=i<<5;f=0;c:{while(1){c=w(b,i)+f|0;d=q[a+108>>2];if(c>>>0>2]-d>>>0){j=d+c|0;d=r[j|0];d:{if(!(d&1)){b=d>>>1&1;break d}o[j|0]=d&254;g=q[a+156>>2];k=q[q[g+4>>2]+8>>2];l=q[g+36>>2];p=q[g+28>>2];m=q[g+40>>2];c=q[g+32>>2];t=d&252;o[j|0]=t;b=0;if(!k){break d}u=q[a+124>>2];n=q[a+128>>2]-u|0;e:{d=m+A|0;e=d+32|0;v=c&2147483647;c=m+v|0;x=(c|0)>(e|0)?e:c;if((x|0)>(d|0)){h=0;c=l+(f<<5)|0;b=c+32|0;e=l+p|0;y=(b|0)<(e|0)?b:e;if((y|0)<=(c|0)){b=0;if(k-1>>>0>=n>>>0){break a}break d}while(1){if((h|0)==(n|0)){break a}if(o[h+u|0]&1){B=w(h,v)-q[g+40>>2]|0;C=q[a+100>>2];l=q[g+36>>2];e=d;while(1){m=w(e+B|0,p)-l|0;b=c;while(1){if(s[(b+m<<1)+C>>1]!=65535){break e}b=b+1|0;if((y|0)>(b|0)){continue}break}e=e+1|0;if((x|0)>(e|0)){continue}break}}b=0;h=h+1|0;if((k|0)!=(h|0)){continue}break}break d}if(k-1>>>0>>0){break d}break a}o[j|0]=t|2;b=1}z=b+z|0;b=s[a+160>>1];f=f+1|0;if(b>>>0>f>>>0){continue}break c}break}break a}f=s[a+162>>1]}i=i+1|0;if(i>>>0<(f&65535)>>>0){continue}break}return z}J(55728,55585,479,55717);G()}function Et(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;f=BB(a,b,d+12|0);q[c>>2]=f;e=-3;a:{b:{c:{switch(f|0){case 0:v[c+8>>3]=Mj(a,b);break b;case 1:q[c+8>>2]=nl(a,b);q[c+12>>2]=Li;break b;case 2:a=Hz(a,b);b=q[a+4>>2];q[c+8>>2]=q[a>>2];q[c+12>>2]=b;b=q[a+28>>2];q[c+32>>2]=q[a+24>>2];q[c+36>>2]=b;b=q[a+20>>2];q[c+24>>2]=q[a+16>>2];q[c+28>>2]=b;b=q[a+12>>2];q[c+16>>2]=q[a+8>>2];q[c+20>>2]=b;break b;case 3:a=q[d+12>>2];u[c+8>>2]=u[a>>2];u[c+12>>2]=u[a+4>>2];u[c+16>>2]=u[a+8>>2];break b;case 4:a=q[d+12>>2];u[c+8>>2]=u[a>>2];u[c+12>>2]=u[a+4>>2];u[c+16>>2]=u[a+8>>2];u[c+20>>2]=u[a+12>>2];break b;case 5:a=q[d+12>>2];u[c+8>>2]=u[a>>2];u[c+12>>2]=u[a+4>>2];u[c+16>>2]=u[a+8>>2];u[c+20>>2]=u[a+12>>2];break b;case 6:e=0;o[c+8|0]=(Uj(a,b)|0)!=0;break a;case 7:break c;default:break a}}a=q[d+12>>2];b=q[a+4>>2];q[c+8>>2]=q[a>>2];q[c+12>>2]=b;e=q[a+60>>2];b=c- -64|0;q[b>>2]=q[a+56>>2];q[b+4>>2]=e;b=q[a+52>>2];q[c+56>>2]=q[a+48>>2];q[c+60>>2]=b;b=q[a+44>>2];q[c+48>>2]=q[a+40>>2];q[c+52>>2]=b;b=q[a+36>>2];q[c+40>>2]=q[a+32>>2];q[c+44>>2]=b;b=q[a+28>>2];q[c+32>>2]=q[a+24>>2];q[c+36>>2]=b;b=q[a+20>>2];q[c+24>>2]=q[a+16>>2];q[c+28>>2]=b;b=q[a+12>>2];q[c+16>>2]=q[a+8>>2];q[c+20>>2]=b}e=0}Ii=d+16|0;return e}function jla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),F=x(0),H=x(0);b=Ii-160|0;Ii=b;h=q[a+8>>2]-q[a+12>>2]>>4;i=jk(a);j=$j(a,2);k=Li;l=$j(a,3);m=Li;d=at(a,4);a:{if(d){c=qz(a,4);e=c+12|0;n=u[c+48>>2];p=u[c+32>>2];r=u[c+16>>2];s=u[c+60>>2];t=u[c+56>>2];v=u[c+52>>2];w=u[c+44>>2];y=u[c+40>>2];z=u[c+36>>2];A=u[c+28>>2];B=u[c+24>>2];C=u[c+20>>2];f=c+8|0;g=c+4|0;break a}c=rm(a,4);e=c+12|0;f=c+8|0;g=c+4|0}D=u[c>>2];E=u[g>>2];F=u[f>>2];H=u[e>>2];u[b+140>>2]=s;u[b+136>>2]=t;u[b+132>>2]=v;u[b+128>>2]=n;u[b+124>>2]=w;u[b+120>>2]=y;u[b+116>>2]=z;u[b+112>>2]=p;u[b+108>>2]=A;u[b+104>>2]=B;u[b+100>>2]=C;u[b+96>>2]=r;u[b+92>>2]=H;u[b+88>>2]=F;u[b+84>>2]=E;o[b+144|0]=d;u[b+80>>2]=D;q[b+72>>2]=l;q[b+76>>2]=m;q[b+64>>2]=j;q[b+68>>2]=k;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[58952];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],i,c,b- -64|0,96);if(q[a+8>>2]-q[a+12>>2]>>4!=(h|0)){J(72895,72626,344,72916);G()}Ii=b+160|0;return 0}function oza(){var a=0;q[72976]=Oi(48313);q[72977]=Li;q[72978]=Oi(48332);q[72979]=Li;q[72980]=Oi(48349);q[72981]=Li;q[72982]=Oi(48358);q[72983]=Li;q[72984]=Oi(48364);q[72985]=Li;q[72986]=Oi(48374);q[72987]=Li;q[72988]=Oi(48382);q[72989]=Li;q[72990]=Oi(48389);q[72991]=Li;q[72992]=Oi(48398);q[72993]=Li;q[72994]=Oi(48410);q[72995]=Li;q[72996]=Oi(48419);q[72997]=Li;q[72998]=Oi(48424);q[72999]=Li;q[73e3]=Oi(48430);q[73001]=Li;q[73002]=Oi(48436);q[73003]=Li;q[73004]=Oi(48445);q[73005]=Li;q[73008]=Oi(48455);q[73009]=Li;q[73010]=Oi(48464);q[73011]=Li;q[73012]=Oi(48473);q[73013]=Li;q[73014]=Oi(48482);q[73015]=Li;q[73016]=Oi(48491);q[73017]=Li;q[73018]=Oi(48500);q[73019]=Li;q[73020]=Oi(48509);q[73021]=Li;q[73022]=Oi(48518);q[73023]=Li;q[73024]=Oi(48527);q[73025]=Li;a=Oi(48536);q[73045]=0;q[73046]=0;q[73044]=295392;q[73042]=0;q[73040]=48560;q[73039]=48548;q[73038]=0;q[73036]=0;q[73034]=0;q[73032]=0;q[73030]=1;q[73028]=0;q[73029]=3;q[73026]=a;q[73027]=Li;q[73047]=0;q[73048]=0;q[73049]=0;q[73050]=Oi(48573);q[73051]=Li;q[73052]=Oi(48577);q[73053]=Li;q[73054]=Oi(48584);q[73055]=Li;q[73056]=Oi(48590);q[73057]=Li;q[73058]=Oi(48608);q[73059]=Li;q[73060]=Oi(48619);q[73061]=Li;q[73062]=Oi(48624);q[73063]=Li}function Ioa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;d=q[a>>2];a=q[a+4>>2];if(r[266420]){lq(q[d+48>>2],195,a)}a:{b=q[d>>2];c=q[d+4>>2];if((b|0)!=(c|0)){while(1){g=(e<<2)+b|0;if((a|0)==q[g>>2]){q[g>>2]=q[c-4>>2];c=q[d+4>>2]-4|0;q[d+4>>2]=c;b=q[d>>2];if(c>>>0>>0){break a}}e=e+1|0;if(e>>>0>2>>>0){continue}break}}b=q[a+36>>2]-q[a+32>>2]|0;b:{if(!b){break b}q[f>>2]=b>>2;Pi(3,40439,41017,f);b=q[a+32>>2];d=q[a+36>>2];if((b|0)==(d|0)){break b}e=0;while(1){c=q[(e<<2)+b>>2];if(c){c:{if(o[c+36|0]&1){break c}b=q[c+24>>2];if(!b){break c}Ni(b)}Ni(c);d=q[a+36>>2];b=q[a+32>>2]}e=e+1|0;if(e>>>0>2>>>0){continue}break}}gI(q[a+80>>2]);b=q[a+16>>2];c=q[a+20>>2];if((b|0)!=(c|0)){e=0;while(1){d=q[(e<<2)+b>>2];if(d){Hr(d);c=q[a+20>>2];b=q[a+16>>2]}e=e+1|0;if(e>>>0>2>>>0){continue}break}}Mi[q[74957]](q[a+48>>2]);Mi[q[74944]](q[a+52>>2]);Mi[q[75009]](q[a+72>>2],q[a+76>>2]);Fz(q[a+316>>2]);d:{if(o[a+68|0]&1){break d}b=q[a+56>>2];if(!b){break d}Ni(b)}e:{if(o[a+44|0]&1){break e}b=q[a+32>>2];if(!b){break e}Ni(b)}f:{if(o[a+28|0]&1){break f}b=q[a+16>>2];if(!b){break f}Ni(b)}g:{if(o[a+12|0]&1){break g}b=q[a>>2];if(!b){break g}Ni(b)}Ni(a);Ii=f+16|0;return 0}J(41109,40745,516,41099);G()}function Vz(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=Ii-32|0;Ii=k;a:{b:{c:{g=q[a+4>>2];d:{e:{if(!g){break e}h=q[q[a>>2]+(Cza(b,c,g)<<2)>>2];if((h|0)==-1){break e}g=q[a+8>>2];while(1){j=g+w(h,40)|0;i=j;if(q[i>>2]!=(b|0)|q[i+4>>2]!=(c|0)){h=q[j+32>>2];if((h|0)!=-1){continue}break e}break}g=g+w(h,40)|0;if(q[g+20>>2]==(e|0)){b=g+8|0;break d}n8(a,b,c)}g=q[a+24>>2];if((g|0)==((q[a+16>>2]-q[a+8>>2]|0)/40|0)){g=g+8|0;Rv(a,g,g<<1)}h=a+32|0;i=a+40|0;j=q[i>>2];l=a+36|0;g=q[l>>2];m=j-g>>4;if(m>>>0>>0){if(o[a+44|0]&1){break c}Wi((e-m|0)+(j-q[h>>2]>>4)|0,16,h,i,l);j=q[i>>2];i=q[l>>2]}else{i=g}g=q[h>>2];i=i-g>>4;h=i+e|0;if(h>>>0>j-g>>4>>>0){break b}q[a+36>>2]=g+(h<<4);q[k+20>>2]=e;g=k;q[g+8>>2]=b;q[g+12>>2]=c;q[g+24>>2]=f;q[g+16>>2]=i;yA(a,b,c,g+8|0);g=0;f=q[a+4>>2];f:{if(!f){break f}h=q[q[a>>2]+(Cza(b,c,f)<<2)>>2];if((h|0)==-1){break f}f=q[a+8>>2];while(1){h=w(h,40);g=h+f|0;if((b|0)==q[g>>2]&(c|0)==q[g+4>>2]){break f}h=q[(f+h|0)+32>>2];if((h|0)!=-1){continue}break}g=0}b=g?g+8|0:0}b=q[b+8>>2];c=q[a+36>>2];a=q[a+32>>2];if(b>>>0>=c-a>>4>>>0){break a}Ti(a+(b<<4)|0,d,e<<4);Ii=k+32|0;return}J(111496,111323,493,111227);G()}J(111304,111323,506,111379);G()}J(111387,111323,479,111398);G()}function baa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=Ii-224|0;Ii=e;q[e+212>>2]=a;q[e+200>>2]=0;q[e+64>>2]=0;q[e+48>>2]=0;b=a+b|0;q[e+216>>2]=b;q[e+204>>2]=a;q[e+208>>2]=b;a=MQ(e+32|0,e+28|0,e+24|0,e+20|0);a:{b:{if(a){i=2;h=q[e+24>>2];g=q[e+28>>2];c:{d:{e:{f:{g:{h:{b=q[e+20>>2];switch(b-1|0){case 0:break c;case 3:break f;case 2:break g;case 1:break h;default:break e}}if((g|h)<0|((2147483647/(h|0)|0)<(g|0)?h:0)){break d}j=Yi(w(g,h));if(!j){break d}if(!((h|0)<1|(g|0)<1)){while(1){c=w(g,k);b=c+j|0;c=(c<<1)+a|0;f=g;while(1){o[b|0]=r[c|0];b=b+1|0;c=c+2|0;l=(f|0)>1;f=f-1|0;if(l){continue}break}k=k+1|0;if((k|0)!=(h|0)){continue}break}}Ni(a);a=j;break c}i=0;break c}i=1;if(!c|(g|0)<1|(h|0)<1){break c}b=0;while(1){j=w(b,g);c=0;while(1){f=c+j<<2;i=(f|2)+a|0;k=r[i|0];l=(f|1)+a|0;n=r[l|0];m=a+f|0;f=r[(f|3)+a|0];o[m|0]=w(f,r[m|0])+255>>>8;o[l|0]=w(f,n)+255>>>8;o[i|0]=w(f,k)+255>>>8;c=c+1|0;if((g|0)!=(c|0)){continue}break}i=1;b=b+1|0;if((h|0)!=(b|0)){continue}break}break c}q[e+16>>2]=b;Pi(4,169066,169071,e+16|0);Ni(a);break b}Ni(a);q[213145]=169512;a=0}q[d+12>>2]=a;q[d+8>>2]=i;q[d+4>>2]=h;q[d>>2]=g;a=0;break a}q[e>>2]=q[213145];Pi(4,169066,169117,e)}a=-2}Ii=e+224|0;return a}function Zya(){var a=0;q[71442]=0;q[71443]=0;q[71440]=0;q[71438]=6848;q[71437]=6832;q[71436]=0;q[71434]=0;q[71432]=0;q[71430]=0;q[71428]=0;q[71426]=0;q[71427]=0;q[71464]=285704;q[71462]=0;q[71460]=6877;q[71459]=6860;q[71458]=0;q[71456]=0;q[71454]=0;q[71452]=0;q[71450]=1;q[71448]=0;q[71449]=3;q[71444]=0;q[71445]=0;q[71446]=0;q[71447]=0;q[71469]=0;q[71467]=0;q[71468]=0;q[71465]=0;q[71466]=0;q[71486]=285704;q[71484]=0;q[71482]=6921;q[71481]=6906;q[71480]=0;q[71478]=0;q[71476]=0;q[71474]=0;q[71472]=1;q[71470]=0;q[71471]=3;q[71491]=0;q[71489]=0;q[71490]=0;q[71487]=0;q[71488]=0;a=Wl(7009,11);q[71494]=0;q[71495]=0;q[71492]=a;q[71493]=Li;q[71496]=0;q[71497]=0;q[71498]=0;q[71499]=0;q[71500]=Oi(7023);q[71501]=Li;q[71502]=Oi(7032);q[71503]=Li;q[71504]=Oi(7043);q[71505]=Li;q[71506]=Oi(7054);q[71507]=Li;q[71508]=Oi(7065);q[71509]=Li;q[71510]=Oi(7074);q[71511]=Li;q[71512]=Oi(7085);q[71513]=Li;q[71514]=Oi(7096);q[71515]=Li;q[71516]=Oi(7107);q[71517]=Li;q[71518]=Oi(7118);q[71519]=Li;q[71520]=Oi(7124);q[71521]=Li;q[71522]=Oi(7132);q[71523]=Li;q[71524]=Oi(7140);q[71525]=Li;q[71526]=Oi(7148);q[71527]=Li;q[71528]=Oi(7154);q[71529]=Li;q[71530]=Oi(7162);q[71531]=Li;q[71532]=Oi(7170);q[71533]=Li}function Hla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=Ii-16|0;Ii=e;i=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{if(Oj(a,1)){d=Mj(a,1);c:{if(d<0x10000000000000000&d>=0){c=~~d>>>0;b=y(d)>=1?d>0?~~A(C(d*2.3283064365386963e-10),4294967295)>>>0:~~D((d- +(~~d>>>0>>>0))*2.3283064365386963e-10)>>>0:0;break c}b=0}if(ew(q[74446],c,b)){break b}b=Qi(a,78998,0);break a}f=$j(a,1);b=Li;g=b;c=Cp(a,q[74445],f,b,77180);b=q[c+4>>2];c=q[c>>2];if(ew(q[74446],c,b)){break b}q[e>>2]=aj(f,g);b=Qi(a,79027,e);break a}f=Mi[q[75014]](c,b)|0;g=Mi[q[75015]](c,b)|0;j=Mi[q[75019]](c,b)|0;k=Mi[q[75020]](c,b)|0;l=Mi[q[75016]](c,b)|0;vj(a,0,0);h=q[a+8>>2];q[h+8>>2]=3;v[h>>3]=+(c>>>0)+ +(b>>>0)*4294967296;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,79071);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77433);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=g|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,77439);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=j|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,79078);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=k|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,79084);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=l|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,78140);b=1;if((i+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(79092,76581,1244,79119);G()}Ii=e+16|0;return b|0}function Dna(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+4>>2];Mi[q[74957]](q[b+68>>2]);Mi[q[74944]](q[q[b+72>>2]>>2]);Mi[q[74944]](q[q[b+72>>2]+4>>2]);Mi[q[74944]](q[q[b+72>>2]+8>>2]);Mi[q[74944]](q[q[b+72>>2]+12>>2]);Mi[q[74944]](q[q[b+72>>2]+16>>2]);Mi[q[74944]](q[q[b+72>>2]+20>>2]);Mi[q[74944]](q[q[b+72>>2]+24>>2]);Mi[q[74944]](q[q[b+72>>2]+28>>2]);Mi[q[74944]](q[q[b+72>>2]+32>>2]);Mi[q[74944]](q[q[b+72>>2]+36>>2]);Mi[q[74944]](q[q[b+72>>2]+40>>2]);Mi[q[74944]](q[q[b+72>>2]+44>>2]);Mi[q[74944]](q[q[b+72>>2]+48>>2]);Mi[q[74944]](q[q[b+72>>2]+52>>2]);Mi[q[74944]](q[q[b+72>>2]+56>>2]);Mi[q[74944]](q[q[b+72>>2]+60>>2]);lq(q[q[a>>2]+4>>2],233,b);a=q[b+96>>2];if(a){Ni(B5(a))}c=q[b+76>>2];if(c){e=c-4|0;a=q[e>>2];if(a){a=(a<<4)+c|0;while(1){d=a;a=a-16|0;a:{if(o[d-4|0]&1){break a}d=q[a>>2];if(!d){break a}Ni(d)}if((a|0)!=(c|0)){continue}break}}Ni(e)}a=q[b+72>>2];if(a){Ni(a)}b:{if(o[b+92|0]&1){break b}a=q[b+80>>2];if(!a){break b}Ni(a)}c:{if(o[b+64|0]&1){break c}a=q[b+52>>2];if(!a){break c}Ni(a)}d:{if(o[b+44|0]&1){break d}a=q[b+32>>2];if(!a){break d}Ni(a)}e:{if(o[b+28|0]&1){break e}a=q[b+16>>2];if(!a){break e}Ni(a)}f:{if(o[b+12|0]&1){break f}a=q[b>>2];if(!a){break f}Ni(a)}Ni(b);return 0}function Jta(a){a=a|0;var b=0,c=0;a:{if(r[855716]){a=q[a+8>>2];c=q[a+8>>2]-q[a+12>>2]>>4;Ak(a,208613,284272);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208619);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208643);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208664);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208686);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208708);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=5;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208729);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=6;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208753);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208771);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=8;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208796);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=9;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208815);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=10;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208850);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=32;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208863);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=255;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,208877);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){break a}return 0}J(208548,208573,323,208597);G()}J(208892,208573,434,208597);G()}function jra(a,b,c,d){var e=0,f=0,g=0;f=q[a+4>>2];e=q[a>>2];if(f>>>0>=t[e>>2]){J(13986,13768,256,14049);G()}q[a+4>>2]=f+1;g=q[e+4>>2]+(f<<3)|0;q[g>>2]=b;q[g+4>>2]=c;b=f<<2;q[b+q[e+12>>2]>>2]=2;c=b+q[e+8>>2]|0;b=q[a+20>>2];q[c>>2]=b;b=b+q[e+24>>2]|0;e=r[d+4|0]|r[d+5|0]<<8|(r[d+6|0]<<16|r[d+7|0]<<24);f=r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24);o[b|0]=f;o[b+1|0]=f>>>8;o[b+2|0]=f>>>16;o[b+3|0]=f>>>24;o[b+4|0]=e;o[b+5|0]=e>>>8;o[b+6|0]=e>>>16;o[b+7|0]=e>>>24;c=r[d+28|0]|r[d+29|0]<<8|(r[d+30|0]<<16|r[d+31|0]<<24);e=r[d+24|0]|r[d+25|0]<<8|(r[d+26|0]<<16|r[d+27|0]<<24);o[b+24|0]=e;o[b+25|0]=e>>>8;o[b+26|0]=e>>>16;o[b+27|0]=e>>>24;o[b+28|0]=c;o[b+29|0]=c>>>8;o[b+30|0]=c>>>16;o[b+31|0]=c>>>24;c=r[d+20|0]|r[d+21|0]<<8|(r[d+22|0]<<16|r[d+23|0]<<24);e=r[d+16|0]|r[d+17|0]<<8|(r[d+18|0]<<16|r[d+19|0]<<24);o[b+16|0]=e;o[b+17|0]=e>>>8;o[b+18|0]=e>>>16;o[b+19|0]=e>>>24;o[b+20|0]=c;o[b+21|0]=c>>>8;o[b+22|0]=c>>>16;o[b+23|0]=c>>>24;c=r[d+12|0]|r[d+13|0]<<8|(r[d+14|0]<<16|r[d+15|0]<<24);d=r[d+8|0]|r[d+9|0]<<8|(r[d+10|0]<<16|r[d+11|0]<<24);o[b+8|0]=d;o[b+9|0]=d>>>8;o[b+10|0]=d>>>16;o[b+11|0]=d>>>24;o[b+12|0]=c;o[b+13|0]=c>>>8;o[b+14|0]=c>>>16;o[b+15|0]=c>>>24;q[a+20>>2]=q[a+20>>2]+32}function axa(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=0,p=0,q=0;p=j+k|0;o=j>>>0>p>>>0?1:o;a:{if(!o&e>>>0

>>0|o){break a}if((a&-2)==8){if((Dza(f<<2)|0)!=1){break a}if((Dza(g<<2)|0)!=1){break a}}e=(a|0)==9?l?9:8:a;a=Zt(e);if(!_N(e,c,h,i,m,n,w(f,g))){break a}b:{switch(e|0){case 1:return Hm(b,f,g,d+j|0,k,1,a,h,i,m,n,-1,-1);case 2:return Hm(b,f,g,d+j|0,k,2,a,h,i,m,n,-1,-1);case 3:return Hm(b,f,g,d+j|0,k,3,a,h,i,m,n,-1,-1);case 4:return Hm(b,f,g,d+j|0,k,4,a,h,i,m,n,0,-1);case 5:return Hm(b,f,g,d+j|0,k,5,a,h,i,m,n,0,3);case 6:case 7:return Hm(b,f,g,d+j|0,k,8,a,h,i,m,n,-1,-1);case 8:return Hm(b,f,g,d+j|0,k,6,a,h,i,m,n,-1,-1);case 9:return Hm(b,f,g,d+j|0,k,7,a,h,i,m,n,-1,-1);case 10:return Hm(b,f,g,d+j|0,k,12,a,h,i,m,n,-1,-1);case 20:return Hm(b,f,g,d+j|0,k,18,a,h,i,m,n,0,-1);case 21:return Hm(b,f,g,d+j|0,k,19,a,h,i,m,n,0,3);case 13:return Hm(b,f,g,d+j|0,k,22,a,h,i,m,n,-1,-1);case 14:return Hm(b,f,g,d+j|0,k,24,a,h,i,m,n,-1,-1);case 15:return Hm(b,f,g,d+j|0,k,25,a,h,i,m,n,-1,-1);case 16:return Hm(b,f,g,d+j|0,k,29,a,h,i,m,n,-1,-1);default:J(96993,96899,9820,97140);G();case 11:case 12:case 17:case 18:case 19:break a;case 0:break b}}q=Hm(b,f,g,d+j|0,k,0,a,h,i,m,n,-1,-1)}return q}function Tpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-96|0;Ii=b;i=q[a+8>>2]-q[a+12>>2]>>4;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;mo(a,68198,b+92|0,b+88|0,b+56|0);a:{if(!((r[q[q[b+88>>2]>>2]+28|0]&2)>>>1|0)){c=sm(q[b+56>>2],q[b+60>>2]);d=aj(q[b+72>>2],q[b+76>>2]);q[b+40>>2]=aj(q[b+80>>2],q[b+84>>2]);q[b+36>>2]=d;q[b+32>>2]=c;c=Qi(a,69279,b+32|0);break a}if(o[q[b+88>>2]+24|0]&1){c=Qi(a,69376,0);break a}e=q[q[b+92>>2]+32>>2];f=q[q[b+88>>2]>>2];c=q[q[b+88>>2]+4>>2];q[b+52>>2]=0;b:{c:{d:{e:{f:{if(!Vi(a,2)){break f}d=kj(a,2,0);g=Oi(d);h=Li;if(dj(Tz(d),69422)){c=sm(q[b+56>>2],q[b+60>>2]);e=aj(q[b+72>>2],q[b+76>>2]);q[b+28>>2]=aj(q[b+80>>2],q[b+84>>2]);q[b+24>>2]=e;q[b+20>>2]=c;q[b+16>>2]=d;c=Qi(a,69435,b+16|0);break a}if(!d){break f}if(q[f>>2]!=(g|0)|q[f+4>>2]!=(h|0)){break e}}q[b+52>>2]=0;break d}if(!(!c|(q[c>>2]!=(g|0)|q[c+4>>2]!=(h|0)))){q[b+52>>2]=c;q[q[b+88>>2]+4>>2]=c;break c}if(oka(e,d,b+52|0)){break b}j=q[b+52>>2]}q[q[b+88>>2]+4>>2]=j;if(!c){break c}bL(e,c)}c=0;if(q[a+8>>2]-q[a+12>>2]>>4==(i|0)){break a}J(69186,68606,504,69569);G()}q[b>>2]=d;c=Qi(a,69522,b)}Ii=b+96|0;return c|0}function M7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0);d=Ii-48|0;Ii=d;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=_i(a,-1,q[79180],119558);Ri(a,-2);if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){a:{if((Vi(a,1)|0)!=5){break a}Dj(a,1,5);ej(a,1);Zi(a,-1,117258);b=0;b:{if(!Vi(a,-1)){break b}b=Ym(a,-1)}Ri(a,-2);Zi(a,-1,117266);f=4;c:{if(!Vi(a,-1)){break c}f=jj(a,-1)}Ri(a,-2);Ri(a,-2);if(!b){break a}c=$i(80);u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];g=u[b+60>>2];q[c+64>>2]=f;u[c+60>>2]=g}q[d+16>>2]=c;q[d+20>>2]=0;q[d+8>>2]=19;b=q[e+4>>2];d:{if((b|0)!=q[e+8>>2]){q[e+4>>2]=b+40;a=q[d+44>>2];q[b+32>>2]=q[d+40>>2];q[b+36>>2]=a;a=q[d+36>>2];q[b+24>>2]=q[d+32>>2];q[b+28>>2]=a;a=q[d+28>>2];q[b+16>>2]=q[d+24>>2];q[b+20>>2]=a;a=q[d+20>>2];q[b+8>>2]=q[d+16>>2];q[b+12>>2]=a;a=q[d+12>>2];q[b>>2]=q[d+8>>2];q[b+4>>2]=a;a=0;break d}q[d>>2]=(q[e+8>>2]-q[e>>2]|0)/40;a=Qi(a,115614,d)}Ii=d+48|0;return a|0}J(115568,115465,478,119531);G()}function tu(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-112|0;Ii=f;g=q[a>>2];d=q[a+60>>2];e=q[d+4>>2];c=e+1|0;b=q[d+8>>2];a:{if(c>>>0<=b>>>0){b=q[d>>2];break a}if(b>>>0>=2147483646){Xk(f+32|0,q[a+64>>2]+16|0,80);b=q[a+52>>2];c=q[a+4>>2];q[f+24>>2]=141590;q[f+20>>2]=c;q[f+16>>2]=f+32;oj(b,141567,f+16|0);Nj(q[a+52>>2],3);b=q[d+8>>2]}c=q[a+52>>2];e=b<<1;b:{if((e|0)!=-2){b=Cj(c,q[d>>2],b,e);break b}b=mk(c)}q[d+8>>2]=e;q[d>>2]=b;e=q[d+4>>2];c=e+1|0}q[d+4>>2]=c;o[b+e|0]=g;b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;d=a;c:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break c}b=Hk(b)}q[d>>2]=b;if((b|0)==61){while(1){d=q[a+60>>2];e=q[d+4>>2];c=e+1|0;b=q[d+8>>2];d:{if(c>>>0<=b>>>0){b=q[d>>2];break d}if(b>>>0>=2147483646){Xk(f+32|0,q[a+64>>2]+16|0,80);b=q[a+52>>2];c=q[a+4>>2];q[f+8>>2]=141590;q[f+4>>2]=c;q[f>>2]=f+32;oj(b,141567,f);Nj(q[a+52>>2],3);b=q[d+8>>2]}c=q[a+52>>2];e=b<<1;e:{if((e|0)!=-2){b=Cj(c,q[d>>2],b,e);break e}b=mk(c)}q[d+8>>2]=e;q[d>>2]=b;e=q[d+4>>2];c=e+1|0}q[d+4>>2]=c;o[b+e|0]=61;b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;d=a;f:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break f}b=Hk(b)}q[d>>2]=b;h=h+1|0;if((b|0)==61){continue}break}}Ii=f+112|0;return((b|0)!=(g|0)?-1:0)^h}function lza(){var a=0;q[72390]=Oi(36898);q[72391]=Li;q[72392]=Oi(36917);q[72393]=Li;q[72394]=Oi(36934);q[72395]=Li;q[72396]=Oi(36943);q[72397]=Li;q[72398]=Oi(36949);q[72399]=Li;q[72400]=Oi(36959);q[72401]=Li;q[72402]=Oi(36967);q[72403]=Li;q[72404]=Oi(36974);q[72405]=Li;q[72406]=Oi(36983);q[72407]=Li;q[72408]=Oi(36995);q[72409]=Li;q[72410]=Oi(37004);q[72411]=Li;q[72412]=Oi(37009);q[72413]=Li;q[72414]=Oi(37015);q[72415]=Li;q[72416]=Oi(37021);q[72417]=Li;q[72418]=Oi(37030);q[72419]=Li;q[72420]=Oi(37040);q[72421]=Li;q[72422]=Oi(37049);q[72423]=Li;q[72424]=Oi(37058);q[72425]=Li;q[72426]=Oi(37067);q[72427]=Li;q[72428]=Oi(37076);q[72429]=Li;q[72430]=Oi(37085);q[72431]=Li;q[72432]=Oi(37094);q[72433]=Li;q[72434]=Oi(37103);q[72435]=Li;q[72436]=Oi(37112);q[72437]=Li;a=Oi(37121);q[72457]=0;q[72458]=0;q[72456]=295392;q[72454]=0;q[72452]=37154;q[72451]=37133;q[72450]=0;q[72448]=0;q[72446]=0;q[72444]=0;q[72442]=1;q[72440]=0;q[72441]=3;q[72438]=a;q[72439]=Li;q[72459]=0;q[72460]=0;q[72461]=0;q[72462]=Oi(37301);q[72463]=Li;q[72464]=Oi(37316);q[72465]=Li;q[72466]=Oi(37332);q[72467]=Li;q[72468]=Oi(37348);q[72469]=Li;q[72470]=Oi(37365);q[72471]=Li;q[72472]=Oi(37370);q[72473]=Li}function cz(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-48|0;Ii=e;a:{if(c>>>0<=1){d=dz(a,q[b>>2]);break a}h=bk(c,12);if(!h){d=-19840;break a}while(1){g=w(f,12)+h|0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;f=f+1|0;if((f|0)!=(c|0)){continue}break}q[e+40>>2]=0;q[e+32>>2]=1;q[e+36>>2]=0;q[e+24>>2]=0;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;d=wk(h,q[b>>2]+24|0);b:{if(d){break b}f=1;if(c>>>0>1){while(1){g=w(f,12)+h|0;d=ck(a,g,g-12|0,q[(f<<2)+b>>2]+24|0);if(d){break b}f=f+1|0;if((f|0)!=(c|0)){continue}break}}f=c-1|0;d=Co(e+32|0,w(f,12)+h|0,a+4|0);if(d){break b}while(1){g=f;c:{if(!f){d=wk(e+16|0,e+32|0);if(!d){break c}break b}d=ck(a,e+16|0,e+32|0,(w(g,12)+h|0)-12|0);if(d){break b}d=ck(a,e+32|0,e+32|0,q[(g<<2)+b>>2]+24|0);if(d){break b}}d=ck(a,e,e+16|0,e+16|0);if(d){break b}f=(g<<2)+b|0;d=q[f>>2];d=ck(a,d,d,e);if(d){break b}d=q[f>>2]+12|0;d=ck(a,d,d,e);if(d){break b}d=q[f>>2]+12|0;d=ck(a,d,d,e+16|0);if(d){break b}d=rE(q[f>>2],q[a+8>>2]);if(d){break b}d=rE(q[f>>2]+12|0,q[a+8>>2]);if(d){break b}ij(q[f>>2]+24|0);f=g-1|0;d=0;if(g){continue}break}}ij(e+32|0);ij(e+16|0);ij(e);f=0;while(1){ij(w(f,12)+h|0);f=f+1|0;if((f|0)!=(c|0)){continue}break}Ni(h)}Ii=e+48|0;return d}function ava(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-112|0;Ii=c;e=a;f=a;if((Vi(a,1)|0)==8){b=1;e=Gn(a,1)}d=b|2;f=Tl(f,d,147258,0);a:{b:{b=b+1|0;c:{if(Oj(a,b)){if(sl(e,hl(a,b),c+8|0)){break c}e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;b=1;break a}if((Vi(a,b)|0)!=6){break b}q[c>>2]=f;Lj(a,147264,c);f=uj(a,-1,0);ej(a,b);co(a,e,1)}if(!Hn(e,f,c+8|0)){b=dk(a,d,147295);break a}vj(a,0,2);if(gk(f,83)){Xi(a,q[c+24>>2]);Si(a,-2,147310);Xi(a,c+44|0);Si(a,-2,147317);b=q[c+36>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,147327);b=q[c+40>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,147339);Xi(a,q[c+20>>2]);Si(a,-2,147355)}if(gk(f,108)){b=q[c+28>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,147360)}if(gk(f,117)){b=q[c+32>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,147372)}if(gk(f,110)){Xi(a,q[c+12>>2]);Si(a,-2,147377);Xi(a,q[c+16>>2]);Si(a,-2,147382)}if(gk(f,76)){d:{if((a|0)==(e|0)){ej(a,-2);ll(a,-3);break d}co(e,a,1)}Si(a,-2,147391)}b=1;if(!gk(f,102)){break a}e:{if((a|0)==(e|0)){ej(a,-2);ll(a,-3);break e}co(e,a,1)}Si(a,-2,147403);break a}b=dk(a,b,147268)}Ii=c+112|0;return b|0}function GF(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-208|0;Ii=e;a:{b:{c:{if((a|0)!=10){if((a|0)!=2){break c}a=r[b|0];f=r[b+1|0];h=r[b+2|0];q[e+12>>2]=r[b+3|0];q[e+8>>2]=h;q[e+4>>2]=f;q[e>>2]=a;if(cp(c,d,218064,e)>>>0>>0){break a}break b}j=Ej(b,218076,12);a=r[b+11|0]|r[b+10|0]<<8;f=r[b+9|0]|r[b+8|0]<<8;h=r[b+7|0]|r[b+6|0]<<8;g=r[b+5|0]|r[b+4|0]<<8;i=r[b+3|0]|r[b+2|0]<<8;l=r[b+1|0]|r[b|0]<<8;m=r[b+12|0];d:{if(j){j=r[b+15|0];k=r[b+14|0];b=r[b+13|0];q[e+84>>2]=a;q[e+80>>2]=f;q[e+88>>2]=b|m<<8;q[e+92>>2]=j|k<<8;q[e+76>>2]=h;q[e+72>>2]=g;q[e+68>>2]=i;q[e+64>>2]=l;cp(e+96|0,100,218089,e- -64|0);break d}j=r[b+13|0];k=r[b+14|0];q[e+52>>2]=r[b+15|0];q[e+48>>2]=k;q[e+44>>2]=j;q[e+40>>2]=m;q[e+36>>2]=a;q[e+32>>2]=f;q[e+28>>2]=h;q[e+24>>2]=g;q[e+20>>2]=i;q[e+16>>2]=l;cp(e+96|0,100,218113,e+16|0)}g=r[e+96|0];e:{if(!g){break e}f=2;h=0;i=e+96|0;a=0;while(1){b=a;if(!((g|0)!=58?b:0)){g=pQ(i);a=(g|0)>(f|0);h=a?b:h;f=a?g:f}a=b+1|0;i=a+(e+96|0)|0;g=r[i|0];if(g){continue}break}if((f|0)<3){break e}a=(e+96|0)+h|0;o[a|0]=58;o[a+1|0]=58;bl(a+2|0,a+f|0,((b-f|0)-h|0)+2|0)}if(hj(e+96|0)>>>0>=d>>>0){break b}ou(c,e+96|0);break a}q[240513]=5;break a}q[240513]=51}Ii=e+208|0}function n6(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;b=Ii-2096|0;Ii=b;a:{if(dj(a,32093)){d=-1;if(dj(a,31845)){break a}}d=$i(2228);e=d+2212|0;q[e>>2]=0;q[e+4>>2]=0;q[d+2188>>2]=0;q[d+2192>>2]=0;e=d+2220|0;q[e>>2]=0;q[e+4>>2]=0;e=d+2204|0;q[e>>2]=0;q[e+4>>2]=0;e=d+2196|0;q[e>>2]=0;q[e+4>>2]=0;q[d+2216>>2]=-1;d=Ti(d,a,2188);e=d+2188|0;a=d+140|0;f=wm(a,46);b:{if(!f){break b}if(dj(f,32100)){break b}o[f|0]=0}if(oH(d,e)){a=q[e>>2];if(a){No(a)}if(q[d+2192>>2]){pr(d+2192|0)}c:{if(o[d+2224|0]&1){break c}a=q[d+2204>>2];if(a){Ni(a)}a=q[d+2196>>2];if(!a){break c}Ni(a)}Ni(d);d=-4;break a}q[b+36>>2]=a;f=d+8|0;q[b+32>>2]=f;sj(b+1072|0,1024,32111,b+32|0);q[b+20>>2]=a;q[b+16>>2]=f;sj(b+48|0,1024,32121,b+16|0);q[b+44>>2]=0;d:{f=d+2192|0;g=nH(b+1072|0,b+48|0,f,b+44|0);if(!g){a=q[f>>2];if(a){break d}}a=b;c=g+21|0;e:{if(c>>>0<=21){c=q[(c<<2)+230968>>2];break e}c=26012}q[a+8>>2]=c;q[b+4>>2]=b+48;q[b>>2]=b+1072;Pi(4,31790,32131,b);a=q[e>>2];if(a){No(a)}if(q[f>>2]){pr(f)}f:{if(o[d+2224|0]&1){break f}a=q[d+2204>>2];if(a){Ni(a)}a=q[d+2196>>2];if(!a){break f}Ni(a)}Ni(d);d=-1e3;break a}q[a+12>>2]=q[b+44>>2];cH(d);q[q[d+2188>>2]>>2]=q[d+2192>>2];q[c>>2]=d;d=0}Ii=b+2096|0;return d|0}function uxa(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii-2048|0;Ii=d;c=1;while(1){q[(c<<2)+d>>2]=a;q[(d+1024|0)+(a<<2)>>2]=c;c=c<<24>>31&27^(c<<1&254^c);a=a+1|0;if((a|0)!=256){continue}break}q[210936]=27;q[210937]=54;q[210934]=64;q[210935]=128;q[210932]=16;q[210933]=32;q[210930]=4;q[210931]=8;q[210928]=1;q[210929]=2;o[843760]=99;o[852307]=0;c=1;while(1){a=q[((0-q[(c<<2)+d>>2]<<2)+d|0)+2044>>2];e=(a<<1|a>>>7)&255;b=e<<1&254;g=b|e>>>7;h=g<<1&254;b=b>>>7|h;a=(b<<1&254|h>>>7)^(b^(g^(a^e)))^99;o[c+843760|0]=a;o[a+852208|0]=c;c=c+1|0;if((c|0)!=256){continue}break}e=0;a=99;g=q[d+44>>2];h=q[d+52>>2];j=q[d+36>>2];k=q[d+56>>2];while(1){a=a&255;b=a<<24>>31&27^a<<1&254;c=e<<2;f=b|(a<<16|a<<8);b=a^b;i=f<<8|b;q[c+849136>>2]=i;q[c+848112>>2]=f|b<<24;b=a|i<<8;q[c+850160>>2]=b;q[c+851184>>2]=a|b<<8;a=0;b=0;f=r[e+852208|0];if(f){b=q[(f<<2)+d>>2];a=q[(d+1024|0)+((b+j|0)%255<<2)>>2]<<8^q[(d+1024|0)+((b+k|0)%255<<2)>>2]^q[(d+1024|0)+((b+h|0)%255<<2)>>2]<<16;b=q[(d+1024|0)+((b+g|0)%255<<2)>>2]}b=b<<24^a;q[c+844016>>2]=b;a=a<<8|b>>>24;q[c+845040>>2]=a;q[c+846064>>2]=Fza(a,8);q[c+847088>>2]=Fza(a,16);e=e+1|0;if((e|0)!=256){a=r[e+843760|0];continue}break}Ii=d+2048|0}function sma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-96|0;Ii=c;g=nj(c+72|0,a,0,65882,526);a:{if((Vi(a,1)|0)==7){e=_i(a,1,q[74078],0);if(e){if(Vo(q[e>>2])){break a}}Qi(a,66244,0)}Nk(a,1,65680);e=0}i=jj(a,2);b:{if((Ll(a,3)|0)==q[74078]){c:{if((Vi(a,3)|0)==7){b=_i(a,3,q[74078],0);if(b){if(Vo(q[b>>2])){break c}}Qi(a,66244,0)}Nk(a,3,65680);b=0}j=jj(a,4);a=jj(a,5);if(!b){break b}d=q[e+40>>2];if((d|0)!=q[b+40>>2]){if(d>>>0<=8){a=q[(d<<2)+262672>>2]}else{a=154037}d=c;b=q[b+40>>2];d:{if(b>>>0<=8){b=q[(b<<2)+262672>>2];break d}b=154037}q[d+68>>2]=b;q[c+64>>2]=a;f=Kj(g,67071,c- -64|0);break b}h=q[e+36>>2];if((h|0)!=q[b+36>>2]){if(d>>>0<=8){a=q[(d<<2)+262672>>2]}else{a=154037}f=q[b+36>>2];d=c;b=q[b+40>>2];e:{if(b>>>0<=8){b=q[(b<<2)+262672>>2];break e}b=154037}q[d+60>>2]=b;q[c+56>>2]=f;q[c+52>>2]=a;q[c+48>>2]=h;f=Kj(g,67142,c+48|0);break b}d=q[e+28>>2];if(a+i>>>0>w(d,h)>>>0){q[c+8>>2]=a;q[c+4>>2]=i;q[c>>2]=d;f=Kj(g,67224,c);break b}d=q[b+28>>2];if(a+j>>>0>w(d,h)>>>0){q[c+24>>2]=a;q[c+20>>2]=j;q[c+16>>2]=d;f=Kj(g,67307,c+16|0);break b}if(wL(e,i,b,j,a)){break b}q[c+32>>2]=q[e+40>>2];f=Kj(g,67389,c+32|0);break b}f=Nk(a,3,65680)}mj(g);Ii=c+96|0;return f|0}function sz(a,b,c,d){var e=0,f=0;e=Ii-96|0;Ii=e;a:{b:{c:{d:{e:{switch(r[b|0]-35|0){case 11:if(r[b+1|0]){break d}a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;a=q[d+20>>2];q[c+16>>2]=q[d+16>>2];q[c+20>>2]=a;break c;case 0:break e;default:break d}}if(r[b+1|0]){break d}a=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=a;a=q[d+28>>2];q[c+24>>2]=q[d+24>>2];q[c+28>>2]=a;a=q[d+20>>2];q[c+16>>2]=q[d+16>>2];q[c+20>>2]=a;a=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=a;break c}if(q[c+8>>2]|q[c+12>>2]){break a}q[e+88>>2]=0;q[e+92>>2]=0;q[e+80>>2]=0;q[e+84>>2]=0;q[e+72>>2]=0;q[e+76>>2]=0;b=lI(b,e+72|0);if(b){break b}f=q[e+76>>2];f:{if(f){b=-4;if(f>>>0>63){break b}Pj(e,q[e+72>>2],f+1|0);g:{b=vn(e,c);switch(b+6|0){case 0:case 6:break g;default:break b}}q[c+16>>2]=Wl(q[e+80>>2],q[e+84>>2]);q[c+20>>2]=Li;break f}b=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=b;b=q[e+84>>2];if(b){EG(a,q[e+80>>2],b,c+16|0);break f}a=q[d+20>>2];q[c+16>>2]=q[d+16>>2];q[c+20>>2]=a}a=q[e+92>>2];if(a){q[c+24>>2]=Wl(q[e+88>>2],a);q[c+28>>2]=Li;break c}if(!(q[e+76>>2]|q[e+84>>2])){a=q[d+28>>2];q[c+24>>2]=q[d+24>>2];q[c+28>>2]=a;break c}q[c+24>>2]=0;q[c+28>>2]=0}b=0}Ii=e+96|0;return b}J(128770,128517,608,128794);G()}function UF(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-32|0;Ii=j;f=q[a+48>>2];h=r[f+50|0]+3|0;o[f+50|0]=h;g=q[q[f>>2]+24>>2];k=((h&255)<<1)+f|0;h=q[f+24>>2];q[(g+w(s[k+166>>1],12)|0)+4>>2]=h;q[(g+w(s[k+168>>1],12)|0)+4>>2]=h;q[(g+w(s[k+170>>1],12)|0)+4>>2]=h;if(q[a+16>>2]!=259){h=q[a+52>>2];q[j>>2]=tl(a,259);Sj(a,oj(h,141919,j))}Vj(a);a:{if(e){h=Yu(f,32,b,131070);break a}h=kp(f)}o[j+26|0]=0;q[j+20>>2]=-1;g=r[f+50|0];o[j+25|0]=0;o[j+24|0]=g;q[j+16>>2]=q[f+20>>2];q[f+20>>2]=j+16;i=q[a+48>>2];g=r[i+50|0]+d|0;o[i+50|0]=g;if(d){l=g&255;m=q[i+24>>2];k=q[q[i>>2]+24>>2];g=d;while(1){q[(k+w(s[(i+(l-g<<1)|0)+172>>1],12)|0)+4>>2]=m;g=g-1|0;if(g){continue}break}}hq(f,d);St(a);l=q[f+20>>2];q[f+20>>2]=q[l>>2];i=q[q[f+12>>2]+48>>2];g=r[i+50|0];m=r[l+8|0];if(g>>>0>m>>>0){k=q[i+24>>2];a=q[q[i>>2]+24>>2];while(1){g=g-1|0;q[(a+w(s[(i+(g<<1)|0)+172>>1],12)|0)+8>>2]=k;if(g>>>0>m>>>0){continue}break}o[i+50|0]=g}if(r[l+9|0]){Bm(f,35,m,0,0)}q[f+36>>2]=r[f+50|0];dn(f,q[l+4>>2]);dn(f,h);b:{if(e){g=Yu(f,31,b,131070);q[(q[q[f>>2]+20>>2]+(q[f+24>>2]<<2)|0)-4>>2]=c;break b}Bm(f,33,b,0,d);q[(q[q[f>>2]+20>>2]+(q[f+24>>2]<<2)|0)-4>>2]=c;g=kp(f)}Wu(f,g,h+1|0);Ii=j+32|0}function W3(a){a=a|0;var b=x(0),c=x(0),d=x(0),e=0,f=0,g=0,h=x(0),i=x(0),j=0,k=0,l=0,m=0,n=0,o=x(0),p=x(0);e=Ii-96|0;Ii=e;g=_i(a,1,q[210436],0);d=u[g>>2];c=u[g+4>>2];a:{if(!(d!=d|c!=c)){b=u[g+8>>2];if(b==b){break a}}b=u[g+8>>2];v[e+80>>3]=c;v[e+88>>3]=b;v[e+72>>3]=d;q[e+64>>2]=1;Qi(a,134131,e- -64|0)}j=_i(a,2,q[210436],0);d=u[j>>2];c=u[j+4>>2];b:{if(!(d!=d|c!=c)){b=u[j+8>>2];if(b==b){break b}}b=u[j+8>>2];v[e+48>>3]=c;v[e+56>>3]=b;v[e+40>>3]=d;q[e+32>>2]=2;Qi(a,134131,e+32|0)}f=_i(a,3,q[210436],0);i=u[f>>2];d=u[f+4>>2];c:{if(!(i!=i|d!=d)){c=u[f+8>>2];if(c==c){break c}}c=u[f+8>>2];v[e+16>>3]=d;v[e+24>>3]=c;v[e+8>>3]=i;q[e>>2]=3;Qi(a,134131,e);c=u[f+8>>2];d=u[f+4>>2];i=u[f>>2]}b=u[g>>2];h=u[j+4>>2];f=x(x(b+h)+c)h;k=c>b;l=f&(m&k^1);n=b>2];p=x(x(u[g+4>>2]-(l?x(-b):b))*c);b=u[g+8>>2];b=x(x(i-(f?x(-b):b))*c);c=x(x(u[j+8>>2]-(k?x(-d):d))*c);d:{if(!l){h=c;d=b;b=p;c=o;break d}h=o;d=p}e:{if(!k){i=h;h=d;d=b;b=c;break e}i=d;d=c}g=yj(a,16);u[g+12>>2]=b;u[g+8>>2]=d;u[g+4>>2]=h;u[g>>2]=i;Zi(a,-1e4,134032);xj(a,-2);Ii=e+96|0;return 1}function LD(a,b){var c=0,d=0,e=0,f=0;a:{b:{c:{d=q[a+4>>2];d:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break d}d=Fk(a)}switch(d-43|0){case 0:case 2:break b;default:break c}}c=d-48|0;break a}f=(d|0)==45;b=!b;c=q[a+4>>2];e:{if(c>>>0>2]){q[a+4>>2]=c+1;d=r[c|0];break e}d=Fk(a)}c=d-48|0;if(!(b|c>>>0<10|!q[a+104>>2])){q[a+4>>2]=q[a+4>>2]-1}}f:{if(c>>>0<10){c=0;while(1){c=w(c,10)+d|0;b=q[a+4>>2];g:{if(b>>>0>2]){q[a+4>>2]=b+1;d=r[b|0];break g}d=Fk(a)}e=d-48|0;c=c-48|0;if((c|0)<214748364?e>>>0<=9:0){continue}break}b=c;c=c>>31;h:{if(e>>>0>=10){break h}while(1){c=Aza(b,c,10,0);d=c+d|0;b=Li;b=c>>>0>d>>>0?b+1|0:b;c=d;e=b;b=q[a+4>>2];i:{if(b>>>0>2]){q[a+4>>2]=b+1;d=r[b|0];break i}d=Fk(a)}b=c-48|0;c=e-(c>>>0<48)|0;e=d-48|0;if(e>>>0>9){break h}if((c|0)<21474836?1:(c|0)<=21474836?b>>>0<2061584302:0){continue}break}}if(e>>>0<10){while(1){d=q[a+4>>2];j:{if(d>>>0>2]){q[a+4>>2]=d+1;d=r[d|0];break j}d=Fk(a)}if(d-48>>>0<10){continue}break}}if(q[a+104>>2]){q[a+4>>2]=q[a+4>>2]-1}a=b;b=f?0-a|0:a;c=f?0-(((a|0)!=0)+c|0)|0:c;break f}b=0;c=-2147483648;if(!q[a+104>>2]){break f}q[a+4>>2]=q[a+4>>2]-1;Li=-2147483648;return 0}Li=c;return b}function zB(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,w=0;c=Ii+ -64|0;Ii=c;a:{b:{switch(q[b>>2]){case 0:g=v[b+8>>3];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=g;q[a+8>>2]=q[a+8>>2]+16;break a;case 1:lk(a,q[b+8>>2],q[b+12>>2]);break a;case 2:km(a,b+8|0);break a;case 3:d=q[b+12>>2];e=q[b+8>>2];u[c+8>>2]=u[b+16>>2];q[c>>2]=e;q[c+4>>2]=d;Al(a,c);break a;case 4:d=q[b+8>>2];e=q[b+12>>2];f=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=f;q[c>>2]=d;q[c+4>>2]=e;lo(a,c);break a;case 5:d=q[b+8>>2];e=q[b+12>>2];f=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=f;q[c>>2]=d;q[c+4>>2]=e;hr(a,c);break a;case 6:b=r[b+8|0];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;break a;case 7:break b;default:break a}}d=q[b+16>>2];e=q[b+20>>2];f=q[b+24>>2];h=q[b+28>>2];i=q[b+40>>2];j=q[b+44>>2];k=q[b+56>>2];l=q[b+60>>2];m=q[b+32>>2];n=q[b+36>>2];o=q[b+48>>2];p=q[b+52>>2];s=q[b+8>>2];t=q[b+12>>2];b=b- -64|0;w=q[b+4>>2];q[c+56>>2]=q[b>>2];q[c+60>>2]=w;q[c+40>>2]=o;q[c+44>>2]=p;q[c+24>>2]=m;q[c+28>>2]=n;q[c+48>>2]=k;q[c+52>>2]=l;q[c+32>>2]=i;q[c+36>>2]=j;q[c+16>>2]=f;q[c+20>>2]=h;q[c+8>>2]=d;q[c+12>>2]=e;q[c>>2]=s;q[c+4>>2]=t;ir(a,c)}Ii=c- -64|0}function iU(a){var b=0,c=0;a:{if(!a){break a}b:{c:{switch(q[a+4>>2]-5|0){case 4:if(!Ej(157166,q[a+8>>2],9)){c=263024;break a}if(!Ej(157210,q[a+8>>2],9)){return 263048}if(!Ej(157257,q[a+8>>2],9)){return 263072}if(!Ej(157308,q[a+8>>2],9)){return 263096}if(!Ej(157359,q[a+8>>2],9)){return 263120}if(Ej(157410,q[a+8>>2],9)){break b}return 263144;case 0:if(Ej(157461,q[a+8>>2],5)){break a}return 263168;case 2:if(Ej(157467,q[a+8>>2],7)){break a}return 263192;case 3:break c;default:break a}}b=q[a+8>>2];if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))==-834107862&(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24))==16974909){return 263216}b=q[a+8>>2];if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))==-834107862&(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24))==33752125){return 263240}b=q[a+8>>2];if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))==-834107862&(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24))==50529341){return 263264}a=q[a+8>>2];if((r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))!=-834107862|(r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24))!=67306557){break a}return 263288}if(Ej(157687,q[a+8>>2],9)){break a}return 263312}return c}function jM(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=Ii-288|0;Ii=h;a:{b:{switch(b+13|0){case 12:c:{if(!Vi(a,1)){b=18695;break c}bj(a,16151,0);ej(a,1);fm(a,2);b=uj(a,-1,0);Ri(a,-2)}q[h+20>>2]=aj(c,d);q[h+16>>2]=b;b=Qi(a,16152,h+16|0);break a;case 9:case 10:b=Hp(h+176|0);j=q[f+24>>2];f=q[f+28>>2];i=q[g+12>>2];q[h+56>>2]=q[g+8>>2];q[h+60>>2]=i;i=q[g+4>>2];q[h+48>>2]=q[g>>2];q[h+52>>2]=i;uq(e,j,f,c,d,h+48|0,b);c=aj(c,d);d=uj(a,1,0);b=q[b+32>>2];q[h+36>>2]=d;q[h+32>>2]=c;q[h+40>>2]=q[(b<<2)+226976>>2];b=Qi(a,18699,h+32|0);break a;case 0:q[h+64>>2]=aj(c,d);b=Qi(a,18738,h- -64|0);break a;case 2:if(o[g+8|0]&1){q[h+96>>2]=aj(c,d);b=Qi(a,18332,h+96|0);break a}b=q[g>>2];q[h+84>>2]=aj(c,d);q[h+80>>2]=b+1;b=Qi(a,18412,h+80|0);break a;case 1:if(!(o[g+8|0]&1)){q[h+112>>2]=aj(c,d);b=Qi(a,18447,h+112|0);break a}b=aj(q[g>>2],q[g+4>>2]);q[h+132>>2]=aj(c,d);q[h+128>>2]=b;b=Qi(a,18530,h+128|0);break a;case 8:b=aj(q[f+24>>2],q[f+28>>2]);q[h+148>>2]=uj(a,1,0);q[h+144>>2]=b;b=Qi(a,16241,h+144|0);break a;case 5:b=Qi(a,18792,0);break a;case 4:q[h+160>>2]=aj(c,d);b=Qi(a,18839,h+160|0);break a;case 13:break a;default:break b}}q[h>>2]=b;b=Qi(a,18887,h)}Ii=h+288|0;return b}function n9(a,b,c,d,e,f){var g=x(0),h=x(0),i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0),y=0,z=0,A=x(0),B=x(0),C=x(0),D=x(0),E=x(0),G=x(0);h=x(e*x(64));a:{if(h=x(0)){i=~~h>>>0;break a}i=0}y=q[a>>2];z=q[a+4>>2]-y|0;a=(z|0)/160|0;if(z){i=w(i>>>0<63?i:63,12)+b|0;A=x(x(x(e-u[i>>2])*u[i+8>>2])+u[i+4>>2]);n=x(d*f);d=x(u[b+776>>2]*d);B=x(d*d);C=u[b+768>>2];i=a>>>0>1?a:1;D=u[c+8>>2];E=u[c+4>>2];G=u[c>>2];c=0;while(1){a=w(c,160)+y|0;d=u[a+40>>2];j=u[210812];e=u[a+44>>2];g=u[210813];f=u[a+32>>2];l=u[210814];o=x(x(x(d*j)+x(e*g))-x(f*l));p=x(u[a>>2]-G);r=x(u[a+4>>2]-E);k=x(u[a+8>>2]-D);m=x(x(x(p*p)+x(r*r))+x(k*k));s=x(B-m)>=x(0)?x(A+x(C*u[a+76>>2])):x(0);h=u[a+36>>2];t=x(x(d*l)+x(x(f*j)+x(h*g)));v=x(x(x(e*l)+x(f*g))-x(h*j));j=x(x(x(e*j)+x(h*l))-x(d*g));b=m<=x(0);g=b?x(x(f*o)+x(x(x(d*t)+x(e*v))-x(h*j))):k;m=g;k=x(g*g);g=b?x(x(h*v)+x(x(x(e*j)+x(f*t))-x(d*o))):p;d=b?x(x(d*j)+x(x(x(e*o)+x(h*t))-x(f*v))):r;e=x(x(1)/x(F(x(k+x(x(g*g)+x(d*d))))));u[a+56>>2]=u[a+56>>2]+x(n*x(s*x(m*e)));u[a+52>>2]=u[a+52>>2]+x(n*x(s*x(d*e)));u[a+48>>2]=u[a+48>>2]+x(n*x(s*x(g*e)));c=c+1|0;if((i|0)!=(c|0)){continue}break}}}function Mea(a,b,c,d){var e=0,f=0,g=0;e=Ii-144|0;Ii=e;a:{f=s[b+576>>1];if((f|0)!=65535){g=q[a+32>>2];if((q[a+36>>2]-g|0)/592>>>0<=f>>>0){break a}tK(a,w(f,592)+g|0,e+80|0,e+76|0,q[a+12>>2]+176|0)}if(!(!(o[a+390|0]&1)|q[a+352>>2]==2?!(r[b+414|0]&64):0)){Uv(a,b)}u[c>>2]=u[b+320>>2];u[c+4>>2]=u[b+324>>2];u[c+8>>2]=u[b+328>>2];u[c+12>>2]=u[b+332>>2];u[c+16>>2]=u[b+336>>2];u[c+20>>2]=u[b+340>>2];u[c+24>>2]=u[b+344>>2];u[c+28>>2]=u[b+348>>2];u[c+32>>2]=u[b+352>>2];u[c+36>>2]=u[b+356>>2];u[c+40>>2]=u[b+360>>2];u[c+44>>2]=u[b+364>>2];u[c+48>>2]=u[b+368>>2];u[c+52>>2]=u[b+372>>2];u[c+56>>2]=u[b+376>>2];u[c+60>>2]=u[b+380>>2];uK(b,6,c);u[d>>2]=u[b+60>>2];b:{if(s[b+576>>1]==65535){break b}_k(e,e+80|0,c);u[c>>2]=u[e>>2];u[c+4>>2]=u[e+4>>2];u[c+8>>2]=u[e+8>>2];u[c+12>>2]=u[e+12>>2];u[c+16>>2]=u[e+16>>2];u[c+20>>2]=u[e+20>>2];u[c+24>>2]=u[e+24>>2];u[c+28>>2]=u[e+28>>2];u[c+32>>2]=u[e+32>>2];u[c+36>>2]=u[e+36>>2];u[c+40>>2]=u[e+40>>2];u[c+44>>2]=u[e+44>>2];u[c+48>>2]=u[e+48>>2];u[c+52>>2]=u[e+52>>2];u[c+56>>2]=u[e+56>>2];u[c+60>>2]=u[e+60>>2];if(!(r[b+414|0]&128)){break b}u[d>>2]=u[e+76>>2]*u[d>>2]}Ii=e+144|0;return}J(201665,201514,479,201676);G()}function roa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=Ii+ -64|0;Ii=c;d=q[b+16>>2];a:{if(!d){break a}q[c+44>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+56>>2]=0;q[c+36>>2]=0;q[c+40>>2]=0;q[c+48>>2]=-1;q[c+28>>2]=0;q[c+32>>2]=0;q[c+8>>2]=q[a>>2];q[c+16>>2]=q[d+52>>2];q[c+12>>2]=q[d+48>>2];q[c+20>>2]=q[d+56>>2];q[c+24>>2]=q[d+60>>2];g=c+28|0;So(g,7,q[a+32>>2]-q[a+24>>2]>>4);e=q[a+20>>2];if(e){while(1){b=q[q[a+16>>2]+(f<<2)>>2];if((b|0)!=-1){while(1){b=q[a+24>>2]+(b<<4)|0;Em(g,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+20>>2]}f=f+1|0;if(f>>>0>>0){continue}break}}if(r[290744]){b=q[72687];if(b){while(1){a=q[b+8>>2];b:{if(!a){break b}if(!(Mi[a|0](c+8|0,q[b+12>>2])|0)){break b}q[c>>2]=q[b+16>>2];Pi(4,40439,44139,c)}a=q[b+12>>2];if(a){Ni(a)}b=q[b>>2];if(b){continue}break}}Ui(q[d+16>>2],255,q[d+20>>2]<<2);q[d+36>>2]=-1;q[d+40>>2]=0;q[d+28>>2]=q[d+24>>2];o[290744]=0}c:{if(o[d+44|0]&1){break c}a=q[d+24>>2];if(a){Ni(a)}a=q[d+16>>2];if(!a){break c}Ni(a)}d:{if(o[d+12|0]&1){break d}a=q[d>>2];if(!a){break d}Ni(a)}Ni(d);if(o[c+56|0]&1){break a}a=q[c+36>>2];if(a){Ni(a)}a=q[c+28>>2];if(!a){break a}Ni(a)}Ii=c- -64|0;return 0}function Faa(a){var b=0,c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;a:{b:{c:{d:{e:{if(!a){break e}if(q[210501]){break d}if(!Wy()){Pi(5,148282,148690,0);break e}if(!(Db(1240)|0)){Pi(5,148282,148721,0)}if(!(Ab(1241)|0)){Pi(5,148282,148755,0)}if(!(Cb(1242)|0)){Pi(5,148282,148796,0)}if(q[a+3476>>2]){break c}b=$i(16);q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[a+3476>>2]=b;q[210501]=a;a=Ui(a,0,2368);o[a+2364|0]=255;o[a+2216|0]=255;o[a+2068|0]=255;o[a+1920|0]=255;o[a+1772|0]=255;o[a+1624|0]=255;o[a+1476|0]=255;o[a+1328|0]=255;o[a+1180|0]=255;o[a+1032|0]=255;o[a+884|0]=255;o[a+736|0]=255;o[a+588|0]=255;o[a+440|0]=255;o[a+292|0]=255;o[a+144|0]=255;b=Waa(a);c=q[210501];a=q[c+3476>>2];f:{if(!(Mi[q[b>>2]](c,b)|0)){q[d+16>>2]=149032;Pi(4,148282,149037,d+16|0);break f}f=a+4|0;c=q[a+4>>2];e=q[a+8>>2];if((c|0)==(e|0)){if(o[a+12|0]&1){break b}Wi((c-q[a>>2]>>2)+1|0,4,a,a+8|0,f);e=q[a+8>>2];c=q[a+4>>2]}if((c|0)==(e|0)){break a}q[f>>2]=c+4;q[c>>2]=b;q[d>>2]=149032;Pi(0,148282,149078,d);Mi[q[b+12>>2]](q[210501],b)}}Ii=d+32|0;return}J(148667,148471,185,148685);G()}J(148844,148471,206,148685);G()}J(149108,149183,493,149239);G()}J(149251,149183,533,149275);G()}function mr(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=x(0),s=x(0);h=Ii-48|0;Ii=h;a:{n=q[b+28>>2];if(!n){break a}b:{if(f){while(1){l=q[b+24>>2]+(k<<4)|0;m=q[l+12>>2];if(m){o=l+8|0;f=0;while(1){i=ZG(o,f);r=u[i>>2];s=x(e-r);if(!(s>=c^1|d>s^1)){j=q[l+4>>2];q[h+8>>2]=q[l>>2];q[h+12>>2]=j;j=q[b+4>>2];p=q[b>>2];u[h+28>>2]=g;q[h+16>>2]=p;q[h+20>>2]=j;u[h+24>>2]=r;q[h+32>>2]=q[i+4>>2];u[h+36>>2]=u[i+8>>2];j=q[i+20>>2];q[h+40>>2]=q[i+16>>2];q[h+44>>2]=j;Mi[q[a+100>>2]](1,h+8|0,q[a+104>>2],q[a+108>>2])}f=f+1|0;if((m|0)!=(f|0)){continue}break}}k=k+1|0;if((n|0)==(k|0)){break a}if(t[b+28>>2]>k>>>0){continue}break b}}while(1){l=q[b+24>>2]+(k<<4)|0;m=q[l+12>>2];if(m){o=l+8|0;f=0;while(1){i=ZG(o,f);e=u[i>>2];if(!(e>=c^1|d>e^1)){j=q[l+4>>2];q[h+8>>2]=q[l>>2];q[h+12>>2]=j;j=q[b+4>>2];p=q[b>>2];u[h+28>>2]=g;q[h+16>>2]=p;q[h+20>>2]=j;u[h+24>>2]=e;q[h+32>>2]=q[i+4>>2];u[h+36>>2]=u[i+8>>2];j=q[i+20>>2];q[h+40>>2]=q[i+16>>2];q[h+44>>2]=j;Mi[q[a+100>>2]](1,h+8|0,q[a+104>>2],q[a+108>>2])}f=f+1|0;if((m|0)!=(f|0)){continue}break}}k=k+1|0;if((n|0)==(k|0)){break a}if(t[b+28>>2]>k>>>0){continue}break}}J(152522,152534,161,152554);G()}Ii=h+48|0}function Pp(a,b,c,d,e,f){var g=0,h=0,i=0;a:{b:{switch(d|0){case 2:c=q[c>>2];b=b-4|0;d=q[b>>2];e=q[a>>2];if(t[(c+w(d,48)|0)+32>>2]>=t[(c+w(e,48)|0)+32>>2]){break a}q[a>>2]=d;q[b>>2]=e;return;case 0:case 1:break a;default:break b}}if((d|0)<=128){if((a|0)==(b|0)){break a}d=a+4|0;if((d|0)==(b|0)){break a}f=q[c>>2];while(1){g=q[d>>2];e=a;c:{if((e|0)==(d|0)){break c}h=f+w(g,48)|0;e=d;while(1){c=e-4|0;i=q[c>>2];if(t[h+32>>2]>=t[(f+w(i,48)|0)+32>>2]){break c}q[e>>2]=i;e=c;if((e|0)!=(a|0)){continue}break}e=a}q[e>>2]=g;d=d+4|0;if((d|0)!=(b|0)){continue}break}break a}g=d>>>1|0;i=g<<2;h=i+a|0;d:{if((d|0)<=(f|0)){JC(a,h,c,g,e);f=b;b=e+i|0;JC(h,f,c,d-g|0,b);f=(d<<2)+e|0;c=q[c>>2];d=b;while(1){if((d|0)==(f|0)){if((b|0)==(e|0)){break a}while(1){q[a>>2]=q[e>>2];a=a+4|0;e=e+4|0;if((b|0)!=(e|0)){continue}break}break a}g=q[d>>2];h=q[e>>2];e:{if(t[(c+w(g,48)|0)+32>>2]>2]){q[a>>2]=g;d=d+4|0;break e}q[a>>2]=h;e=e+4|0}a=a+4|0;if((b|0)!=(e|0)){continue}break}break d}Pp(a,h,c,g,e,f);d=d-g|0;Pp(h,b,c,d,e,f);px(a,h,b,c,g,d,e,f);break a}if((d|0)==(f|0)){break a}while(1){q[a>>2]=q[d>>2];a=a+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}}}function mI(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=Ii-144|0;Ii=j;a:{b:{if(q[213234]){break b}while(1){e=q[213233];q[213233]=e?e:1;if(e){continue}break}c:{f=q[213232];e=q[f+4>>2];d:{if(!e){break d}e=q[q[f>>2]+(Cza(a,b,e)<<2)>>2];if((e|0)==-1){break d}i=q[f+8>>2];while(1){f=(e<<6)+i|0;if((a|0)==q[f>>2]&q[f+4>>2]==(b|0)){break c}e=q[f+56>>2];if((e|0)!=-1){continue}break}}q[213233]=0;break b}f=(e<<6)+i|0;a=q[f+8>>2];if(!a){break a}g=f+8|0;q[g>>2]=a+1;q[213233]=0;Gj(q[f+36>>2]);if(q[f+24>>2]){q[j+8>>2]=0;a=q[f+24>>2];q[f+24>>2]=0;h=(e<<6)+i|0;q[h+28>>2]=0;b=q[h+52>>2];q[h+52>>2]=0;Bj(q[f+36>>2]);if(a){while(1){Mi[c|0](a,d);h=q[a+92>>2];if(h){Mi[h|0](a)}k=k+1|0;a=q[a+88>>2];if(a){continue}break}}Gj(q[f+36>>2]);if(b){c=(e<<6)+i|0;e=q[c+48>>2];while(1){a=b;b=q[a+4100>>2];q[a+4100>>2]=e;e=a;if(b){continue}break}q[c+48>>2]=e}Bj(q[f+36>>2]);while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}a=q[g>>2]-1|0;q[g>>2]=a;q[213233]=0;if(!a){ot(g)}break b}Bj(q[f+36>>2]);while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}a=q[g>>2]-1|0;q[g>>2]=a;q[213233]=0;if(a){break b}ot(g)}Ii=j+144|0;return k}J(172281,172300,289,172324);G()}function tH(a){var b=0,c=0,d=0,e=0,f=0;f=Ii-16|0;Ii=f;b=q[a+5172>>2];c=b;d=q[a+5168>>2];if(b|d){Qo(d,c)}b=q[a+5140>>2];if(b){Qn(b)}b=q[a+7388>>2];if(b){eH(q[a+7384>>2],b);Mz(q[a+7388>>2]);q[a+7388>>2]=0}b=q[a+7384>>2];if(b){A6(b)}b=q[a>>2];a:{if(!b|!q[b+24>>2]){break a}b=0;Pi(4,24640,24960,0);c=q[a>>2];d=q[c+4>>2];if(!d){break a}while(1){e=q[q[c>>2]+(b<<2)>>2];if((e|0)!=-1){while(1){d=q[c+8>>2]+w(e,48)|0;e=aj(q[d>>2],q[d+4>>2]);q[f+4>>2]=q[d+36>>2];q[f>>2]=e;Pi(4,24640,26285,f);e=q[d+40>>2];if((e|0)!=-1){continue}break}d=q[c+4>>2]}b=b+1|0;if(d>>>0>b>>>0){continue}break}}Ni(q[a+7364>>2]);b=q[a>>2];if(b){b:{if(o[b+28|0]&1){break b}c=q[b+8>>2];if(c){Ni(c)}c=q[b>>2];if(!c){break b}Ni(c)}Ni(b)}b=q[a+4>>2];if(b){c:{if(o[b+28|0]&1){break c}c=q[b+8>>2];if(c){Ni(c)}c=q[b>>2];if(!c){break c}Ni(c)}Ni(b)}b=q[a+8>>2];if(b){d:{if(o[b+28|0]&1){break d}c=q[b+8>>2];if(c){Ni(c)}c=q[b>>2];if(!c){break d}Ni(c)}Ni(b)}b=q[a+12>>2];if(b){e:{if(o[b+12|0]&1){break e}c=q[b>>2];if(!c){break e}Ni(c)}Ni(b)}f:{if(o[a+7380|0]&1){break f}b=q[a+7368>>2];if(!b){break f}Ni(b)}g:{if(o[a+5160|0]&1){break g}b=q[a+5148>>2];if(!b){break g}Ni(b)}Ni(a);Ii=f+16|0}function sL(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-16|0;Ii=f;g=q[b+8>>2];h=q[b+12>>2];a:{b:{c:{d:{e:{e=q[a+76>>2];if(!e){break e}d=q[q[a+72>>2]+(Cza(g,h,e)<<2)>>2];if((d|0)==-1){break e}i=q[a+80>>2];e=d;while(1){j=w(e,24)+i|0;if(q[j>>2]!=(g|0)|q[j+4>>2]!=(h|0)){e=q[j+20>>2];if((e|0)!=-1){continue}break e}break}if(!q[(w(e,24)+i|0)+8>>2]){break e}f:{while(1){a=w(d,24)+i|0;if((g|0)==q[a>>2]&q[a+4>>2]==(h|0)){break f}d=q[a+20>>2];if((d|0)!=-1){continue}break}J(44689,44699,170,45218);G()}a=w(d,24)+i|0;q[a+12>>2]=q[a+12>>2]+1;break d}d=q[a+108>>2];e=q[a+104>>2];g:{if((d|0)!=(e|0)){d=d-e|0;if(!d){break c}d=(d>>2)-1|0;if(d>>>0>q[a+112>>2]-e>>2>>>0){break b}d=e+(d<<2)|0;e=q[d>>2];q[a+108>>2]=d;break g}e=Mi[q[74943]](q[a+136>>2],0,0,1)|0;g=q[b+8>>2];h=q[b+12>>2]}q[f+8>>2]=c;q[f>>2]=e;q[f+4>>2]=1;c=a+72|0;d=(q[a+88>>2]-q[a+80>>2]|0)/24|0;a=q[a+96>>2];if((d|0)==(a|0)){a=a+8|0;cJ(c,(a>>>0)/3|0,a)}dJ(c,g,h,f);a=q[b+16>>2];c=q[b+20>>2];b=q[b+4>>2];q[f>>2]=0;q[f+12>>2]=0;if(Wo(b,f,f+12|0)){break a}Mi[q[74945]](e,w(a,c),q[f>>2],0)}Ii=f+16|0;return}J(46069,45367,479,46080);G()}J(45520,45367,506,45539);G()}J(45428,44699,192,45453);G()}function o9(a,b,c,d,e,f){var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=0,r=x(0),s=0,t=x(0);k=u[210821];h=u[d>>2];m=u[210822];g=u[d+12>>2];n=u[210820];i=u[d+4>>2];j=u[d+8>>2];o=x(e*x(64));a:{if(o=x(0)){d=~~o>>>0;break a}d=0}p=q[a>>2];s=q[a+4>>2]-p|0;a=(s|0)/160|0;b:{if(!s){break b}d=w(d>>>0<63?d:63,12)+b|0;o=x(x(x(e-u[d>>2])*u[d+8>>2])+u[d+4>>2]);t=u[b+768>>2];d=a>>>0>1?a:1;a=0;if(!q[c+4>>2]){while(1){b=w(a,160)+p|0;e=u[b+56>>2];l=e;e=x(x(o+x(t*u[b+76>>2]))*f);e=e>2]=l-x(l*e);h=u[b+52>>2];u[b+52>>2]=h-x(h*e);h=u[b+48>>2];u[b+48>>2]=h-x(h*e);a=a+1|0;if((d|0)!=(a|0)){continue}break b}}e=x(x(x(n*j)+x(g*k))-x(m*h));r=x(x(m*j)+x(x(i*k)+x(n*h)));l=x(x(x(g*m)+x(k*h))-x(n*i));k=x(x(x(g*n)+x(i*m))-x(j*k));m=x(x(h*e)+x(x(x(j*r)+x(g*l))-x(i*k)));n=x(x(j*k)+x(x(x(g*e)+x(i*r))-x(h*l)));h=x(x(i*l)+x(x(x(g*k)+x(h*r))-x(j*e)));while(1){b=w(a,160)+p|0;i=u[b+48>>2];j=u[b+52>>2];g=u[b+56>>2];e=x(x(x(h*i)+x(n*j))+x(m*g));l=g;g=x(x(o+x(t*u[b+76>>2]))*f);g=g>2]=l-x(x(m*e)*g);u[b+52>>2]=j-x(x(n*e)*g);u[b+48>>2]=i-x(x(h*e)*g);a=a+1|0;if((d|0)!=(a|0)){continue}break}}}function mka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;g=Ii-16|0;Ii=g;q[g+12>>2]=0;a:{b:{b=lL(q[a>>2],q[a+20>>2],q[a+24>>2],g+12|0);if(b){c=q[g+12>>2];break b}c=q[g+12>>2];b=PL(q[a>>2],c);if(b){break b}b=q[q[a+32>>2]+8>>2];d=q[b+16>>2];f=q[b+12>>2];if((d|0)!=(f|0)){h=q[a>>2];d=f;while(1){cj(h,q[(e<<2)+d>>2]);e=e+1|0;d=q[b+12>>2];if(e>>>0>2]-d>>2>>>0){continue}break}}q[b+16>>2]=d;e=d;f=q[b+8>>2];if(f){Aj(f);q[b+8>>2]=0;e=q[b+12>>2];d=q[b+16>>2]}q[b+8>>2]=q[c+8>>2];f=q[c+12>>2];q[c+12>>2]=e;q[b+12>>2]=f;e=q[c+16>>2];q[c+16>>2]=d;q[b+16>>2]=e;d=q[c+20>>2];q[c+20>>2]=q[b+20>>2];q[b+20>>2]=d;d=r[c+24|0];o[c+24|0]=o[b+24|0]&1|d&254;o[b+24|0]=r[b+24|0]&254|d&1;o[b+28|0]=r[b+28|0]&254|o[c+28|0]&1;c:{if(o[c+24|0]&1){break c}d=q[c+12>>2];if(!d){break c}Ni(d)}Ni(c);q[q[a+32>>2]+16>>2]=(q[a+24>>2]+(q[b+16>>2]-q[b+12>>2]|0)|0)+32;b=0;break a}d=q[c+16>>2];f=q[c+12>>2];if((d|0)!=(f|0)){a=q[a>>2];d=f;while(1){cj(a,q[(e<<2)+d>>2]);e=e+1|0;d=q[c+12>>2];if(e>>>0>2]-d>>2>>>0){continue}break}}q[c+16>>2]=d;a=q[c+8>>2];if(a){Aj(a);q[c+8>>2]=0}d:{if(o[c+24|0]&1){break d}a=q[c+12>>2];if(!a){break d}Ni(a)}Ni(c)}Ii=g+16|0;return b|0}function Jz(a,b,c,d){var e=x(0),f=x(0),g=0,h=x(0),i=0,j=0,k=0,l=0;j=Ii-16|0;Ii=j;i=q[b>>2];a:{if(!i){break a}g=r[b+28|0];if(!(g&1)){break a}h=u[b+16>>2];e=h;k=q[b+24>>2];if(k){e=x(h+x(u[b+20>>2]*c));u[b+16>>2]=e}f=u[i+8>>2];f=(k|0)==3?x(f+f):f;if(f==x(0)){q[b+16>>2]=0;e=x(0)}b:{c:{d:{switch(k-1|0){case 5:if(f>x(0)^1|f<=e^1){break b}while(1){g=g^2;e=x(e-f);if(!(f<=e^1)){continue}break}o[b+28|0]=g;break c;case 0:case 1:case 2:if(f<=e^1){break b}u[b+16>>2]=f;e=f;l=1;break b;case 3:case 4:break d;default:break b}}if(f>x(0)^1|f<=e^1){break b}while(1){e=x(e-f);if(f<=e){continue}break}}u[b+16>>2]=e}e:{if(!q[a+100>>2]|e==h){break e}e=l?x(e+c):e;if(!(e>>1|0,d);mr(a,i,x(0),e,f,(r[b+28|0]&2)>>>1|0,d);break e}f:{if((k|0)!=3){break f}c=x(f*x(.5));if(ch^1)){mr(a,i,h,c,f,0,d);mr(a,i,c,e,f,1,d);break e}mr(a,i,h,e,f,1,d);break e}mr(a,i,h,e,f,(g&2)>>>1|0,d)}if(!l){break a}o[b+28|0]=r[b+28|0]&254;if((((o[a+186|0]&1)<<5)+a|0)!=(b|0)){break a}l=q[a+100>>2];if(!l){break a}g=q[b+12>>2];q[j>>2]=q[b+8>>2];q[j+4>>2]=g;q[j+8>>2]=q[b+24>>2];Mi[l|0](0,j,q[a+104>>2],q[a+108>>2])}Ii=j+16|0}function cma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-96|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;mo(a,70062,b+60|0,b+56|0,b- -64|0);a:{if(!((r[q[q[b+56>>2]>>2]+8|0]&2)>>>1|0)){c=sm(q[b+64>>2],q[b+68>>2]);d=aj(q[b+80>>2],q[b+84>>2]);q[b+40>>2]=aj(q[b+88>>2],q[b+92>>2]);q[b+36>>2]=d;q[b+32>>2]=c;c=Qi(a,70849,b+32|0);break a}if(q[q[b+56>>2]+24>>2]&1){c=Qi(a,70935,0);break a}f=q[q[b+60>>2]>>2];g=q[q[b+56>>2]>>2];c=q[q[b+56>>2]+4>>2];q[b+52>>2]=0;b:{c:{d:{e:{f:{if(!Vi(a,2)){break f}d=kj(a,2,0);if(dj(Tz(d),70981)){c=sm(q[b+64>>2],q[b+68>>2]);e=aj(q[b+80>>2],q[b+84>>2]);q[b+28>>2]=aj(q[b+88>>2],q[b+92>>2]);q[b+24>>2]=e;q[b+20>>2]=c;q[b+16>>2]=d;c=Qi(a,70986,b+16|0);break a}if(!d){break f}if(dj(d,q[g+4>>2])){break e}}q[b+52>>2]=0;break d}g:{if(!c){break g}if(dj(d,q[c+4>>2])){break g}q[b+52>>2]=c;q[q[b+56>>2]+4>>2]=c;break c}if(Wja(d,b+52|0)){break b}h=q[b+52>>2]}q[q[b+56>>2]+4>>2]=h;if(!c){break c}aL(f,c)}c=0;if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(70777,70569,460,71112);G()}q[b>>2]=d;c=Qi(a,71065,b)}Ii=b+96|0;return c|0}function PI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/48|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,48)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+40>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+48;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,48)|0;q[a+20>>2]=q[e+40>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;f=q[d+20>>2];q[e+24>>2]=q[d+16>>2];q[e+28>>2]=f;f=q[d+28>>2];q[e+32>>2]=q[d+24>>2];q[e+36>>2]=f;q[e+40>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,48)|0;f=q[b+40>>2];if((f|0)!=-1){continue}break}q[b+40>>2]=(e-d|0)/48;break a}J(27012,26666,229,27020);G()}c=q[d+4>>2];a=g+w(f,48)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;b=q[d+28>>2];q[a+32>>2]=q[d+24>>2];q[a+36>>2]=b;b=q[d+20>>2];q[a+24>>2]=q[d+16>>2];q[a+28>>2]=b;b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(27024,26666,537,27086);G()}q[b>>2]=(e-d|0)/48}q[a+24>>2]=q[a+24>>2]+1}function uF(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,u=0,v=0;e=q[a+124>>2];c=e;d=e>>>2|0;e=q[a+120>>2];i=e>>>0>2]?c:d;c=q[a+108>>2];d=(c-q[a+44>>2]|0)+262|0;n=c>>>0>>0?0:d;h=q[a+116>>2];d=q[a+144>>2];o=d>>>0>h>>>0?h:d;k=q[a+56>>2];f=c+k|0;p=f+258|0;c=e+f|0;l=r[c|0];m=r[c-1|0];u=q[a+52>>2];v=q[a+64>>2];while(1){a:{d=b+k|0;c=e+d|0;b:{if(r[c|0]!=(l|0)|r[c-1|0]!=(m|0)|r[d|0]!=r[f|0]){break b}g=2;if(r[d+1|0]!=r[f+1|0]){break b}c:{d:{e:{f:{g:{h:{i:{while(1){c=f+g|0;if(r[c+1|0]!=r[d+3|0]){break d}if(r[c+2|0]!=r[d+4|0]){break e}if(r[c+3|0]!=r[d+5|0]){break f}if(r[c+4|0]!=r[d+6|0]){break g}if(r[c+5|0]!=r[d+7|0]){break h}if(r[c+6|0]!=r[d+8|0]){break i}if(r[c+7|0]==r[d+9|0]){j=g>>>0>249;g=g+8|0;c=g+f|0;if(j){break c}j=r[d+10|0];d=d+8|0;if((j|0)==r[c|0]){continue}break c}break}c=c+7|0;break c}c=c+6|0;break c}c=c+5|0;break c}c=c+4|0;break c}c=c+3|0;break c}c=c+2|0;break c}c=c+1|0}d=c-p|0;c=d+258|0;if((c|0)<=(e|0)){break b}q[a+112>>2]=b;if((c|0)>=(o|0)){e=c;break a}l=r[c+f|0];m=r[(d+f|0)+257|0];e=c}i=i-1|0;if(!i){break a}b=s[((b&u)<<1)+v>>1];if(n>>>0>>0){continue}}break}return e>>>0>h>>>0?h:e}function e4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-2288|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{if(!Vi(a,1)){d=Qi(a,128547,0);break b}c=b+2280|0;q[c>>2]=0;q[c+4>>2]=0;c=b+2272|0;q[c>>2]=0;q[c+4>>2]=0;c=b+2264|0;q[c>>2]=0;q[c+4>>2]=0;q[b+2256>>2]=0;q[b+2260>>2]=0;c=b+2248|0;q[c>>2]=0;q[c+4>>2]=0;c=b+2240|0;q[c>>2]=0;q[c+4>>2]=0;c=b+2232|0;q[c>>2]=0;q[c+4>>2]=0;q[b+2224>>2]=0;q[b+2228>>2]=0;Gk(a,1,b+2256|0,b+2224|0);c:{if(uk(a,2)){c=Oi(uj(a,2,0));g=Li;break c}c=nl(a,2);g=Li}e=UM(c,g);d:{if(e){f=q[e+16>>2];if(f>>>0>=2049){q[b+36>>2]=2048;q[b+32>>2]=f;d=Qi(a,128579,b+32|0);break b}e:{if((d|0)>=3){Dj(a,3,5);ej(a,3);break e}vj(a,0,0)}f=WG(a,e,b+176|0,2048);Ri(a,-2);break d}if((d|0)<3){break d}if(!Vi(a,3)){break d}f=ft(a,b+176|0,2048,3)}if((d|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}f:{g:{d=vk(b+2224|0,b+2256|0,c,g,0,e,b+176|0,f);switch(d+2|0){case 0:break g;case 2:break b;default:break f}}d=_s(b+2256|0,b+112|0,64);e=_s(b+2224|0,b+48|0,64);c=aj(c,g);q[b+24>>2]=d;q[b+20>>2]=e;q[b+16>>2]=c;d=Qi(a,128668,b+16|0);break b}q[b>>2]=sm(q[b+2256>>2],q[b+2260>>2]);d=Qi(a,128715,b)}Ii=b+2288|0;return d|0}J(128638,128517,534,128659);G()}function SN(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;b=(Fm(a,0,0)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,1,0)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,2,0)<<2)+c|0;q[b>>2]=q[b>>2]+1;e=3;b=(Fm(a,3,0)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,0,1)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,1,1)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,2,1)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,3,1)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,0,2)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,1,2)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,2,2)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,3,2)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,0,3)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,1,3)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,2,3)<<2)+c|0;q[b>>2]=q[b>>2]+1;b=(Fm(a,3,3)<<2)+c|0;q[b>>2]=q[b>>2]+1;o[a+10|0]=0;o[a+8|0]=3;o[a+9|0]=0;f=a+10|0;b=a+8|0;a:{b:{c:{d:{e:{f:{if(!q[c>>2]){if(!q[c+4>>2]){break e}o[a+10|0]=1;o[b|0]=1;e=1;d=1;break f}o[a+10|0]=1;o[b|0]=0;if(!q[c+4>>2]){break d}o[a+10|0]=2;e=0;d=2}o[a+9|0]=1}if(!q[c+8>>2]){break a}d=d+1|0;o[a+10|0]=d;f=b;if(e>>>0<3){break b}break c}d=2;if(q[c+8>>2]){break c}d=1;break a}o[f|0]=2}o[a+9|0]=2}if(q[c+12>>2]){o[a+9|0]=3;o[a+10|0]=d+1}Ii=c+16|0}function $o(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-96|0;Ii=g;Sr(b);f=Yl(a,14);a:{if(!f){h=1;break a}if(f>>>0>16384){break a}c=g- -64|0;o[c|0]=0;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;o[c+4|0]=0;o[c+5|0]=0;o[c+6|0]=0;o[c+7|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0;o[c+16|0]=0;o[c+17|0]=0;o[c+18|0]=0;o[c+19|0]=0;o[c+20|0]=0;o[c+8|0]=0;o[c+9|0]=0;o[c+10|0]=0;o[c+11|0]=0;o[c+12|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0;c=Yl(a,5);if(c-1>>>0>20){break a}while(1){o[r[h+106432|0]+(g- -64|0)|0]=Yl(a,3);h=h+1|0;if((c|0)!=(h|0)){continue}break}h=0;i=xo(g+24|0);if(!(!TN(i,21,g- -64|0)|!q[i+4>>2])){c=0;e=g+8|0;q[e+8>>2]=0;q[e>>2]=0;q[e+4>>2]=0;MN(e,f);b:{while(1){d=kn(a,i);c:{if((d|0)<=16){o[Ut(e,c)|0]=d;c=c+1|0;break c}d:{switch(d-17|0){case 0:c=(Yl(a,3)+c|0)+3|0;break c;case 1:c=(Yl(a,7)+c|0)+11|0;break c;default:break d}}if(!c){break b}d=(d|0)==19;k=Yl(a,d?2:7);j=r[Ut(e,c-1|0)|0];if(!j){break b}l=c>>>0>>0?f:c;d=(d?3:7)+k|0;while(1){if((c|0)==(l|0)){break b}o[Ut(e,c)|0]=j;c=c+1|0;d=d-1|0;if(d){continue}break}}if(c>>>0>>0){continue}break}if((c|0)!=(f|0)){break b}h=TN(b,f,Ut(e,0))}zq(e)}Rr(i)}Ii=g+96|0;return h}function LK(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-256|0;Ii=e;d=Pj(e,90599,8);Pj(d+e|0,b,256-d|0);a:{b:{if(gk(e,32)|!r[e|0]){break b}g=q[c+8>>2];h=q[c+4>>2];d=g-h|0;if(!d){break b}f=h-g|0;f=((d|0)<(f|0)?f:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(f,(d|0)<1?d:1);f=d>>>0>1?d:1;d=0;c:{while(1){if(!dj(e,q[h+(d<<2)>>2])){break c}d=d+1|0;if((f|0)!=(d|0)){continue}break}f=0;break b}d=Pj(e,a,255);Pj(d+e|0,90623,256-d|0);f=Ea(e|0)|0;if(f){break a}}d=Pj(e,90607,8);Pj(d+e|0,b,256-d|0);d:{if(gk(e,32)|!r[e|0]){break d}g=q[c+8>>2];h=q[c+4>>2];d=g-h|0;if(!d){break d}g=h-g|0;g=((d|0)<(g|0)?g:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(g,(d|0)<1?d:1);g=d>>>0>1?d:1;d=0;while(1){if(dj(e,q[h+(d<<2)>>2])){d=d+1|0;if((g|0)!=(d|0)){continue}break d}break}d=Pj(e,a,255);Pj(d+e|0,90627,256-d|0);f=Ea(e|0)|0;if(f){break a}}d=Pj(e,90615,8);Pj(d+e|0,b,256-d|0);if(gk(e,32)|!r[e|0]){break a}d=q[c+8>>2];c=q[c+4>>2];b=d-c|0;if(!b){break a}d=c-d|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);b=b>>>0>1?b:1;d=0;while(1){if(dj(e,q[c+(d<<2)>>2])){d=d+1|0;if((b|0)!=(d|0)){continue}break a}break}a=Pj(e,a,255);Pj(a+e|0,90631,256-a|0);f=Ea(e|0)|0}Ii=e+256|0;return f}function iua(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-16|0;Ii=j;l=Oi(b);m=Li;a:{b:{c:{d:{e:{f:{i=q[a+696>>2];k=a+700|0;e=q[k>>2];if((i|0)==(e|0)){break f}if(q[i>>2]!=(l|0)|q[i+4>>2]!=(m|0)){f=1;g=e-i|0;d=(g|0)>-1?g:-1;h=(d|0)<1?d:1;d=i-e|0;d=w(h,((d|0)>(g|0)?d:g)>>>4|0);h=d>>>0>1?d:1;g=g>>4;while(1){d=f;if((d|0)!=(h|0)){f=d+1|0;e=(d<<4)+i|0;if((l|0)!=q[e>>2]|q[e+4>>2]!=(m|0)){continue}}break}if(d>>>0>=g>>>0){break f}}q[j>>2]=b;Pi(3,154668,154923,j);break e}e=a+712|0;d=a+720|0;f=q[d>>2];g=a+716|0;b=q[g>>2];h=hj(c)+1|0;if(f-b>>>0>>0){if(o[a+724|0]&1){break a}Wi(((h>>>0>1024?h:1024)+f|0)-q[e>>2]|0,1,e,d,g);f=q[d>>2];b=q[g>>2]}e=q[e>>2];d=b-e|0;b=d+h|0;if(b>>>0>f-e>>>0){break d}q[g>>2]=b+e;if(b>>>0<=d>>>0){break c}Ti(d+e|0,c,h);c=q[a+700>>2];b=a+704|0;f=q[b>>2];if((c|0)==(f|0)){if(o[a+708|0]&1){break a}a=a+696|0;Wi((f-q[a>>2]>>4)+32|0,16,a,b,k);f=q[b>>2];c=q[k>>2]}if((c|0)==(f|0)){break b}q[k>>2]=c+16;q[c+8>>2]=d;q[c>>2]=l;q[c+4>>2]=m}Ii=j+16|0;return}J(155035,154885,506,155054);G()}J(155013,154885,479,155024);G()}J(154984,154885,533,155008);G()}J(154810,154885,493,154911);G()}function isa(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0;h=Ii-144|0;Ii=h;a:{b:{if(!b){i=-6;break b}a=Gt(a);g=q[a+48>>2];c:{if(!g){break c}g=q[q[a+44>>2]+((b>>>0)%(g>>>0)<<2)>>2];if((g|0)==-1){break c}i=q[a+52>>2];while(1){g=w(g,12);j=g+i|0;if(q[j>>2]==(b|0)){break c}g=q[(g+i|0)+8>>2];if((g|0)!=-1){continue}break}j=0}k=j?j+4|0:0;if(!(e|f)){i=0;if(!j){break b}g=s[k>>1];if((g|0)==65535){break b}d:{while(1){e=g&65535;b=q[a+16>>2];if(e>>>0>2]-b>>1>>>0){b=s[b+(e<<1)>>1];f=q[a>>2];if(b>>>0>=(q[a+4>>2]-f|0)/104>>>0){break d}b=f+w(b,104)|0;if(q[b+8>>2]==(c|0)&q[b+12>>2]==(d|0)){o[b+96|0]=r[b+96|0]&252}g=s[b+94>>1];if((g|0)!=65535){continue}break b}break}break a}break a}j=Hp(h+32|0);g=q[h+28>>2];q[h+8>>2]=q[h+24>>2];q[h+12>>2]=g;q[h+16>>2]=0;g=q[h+20>>2];q[h>>2]=q[h+16>>2];q[h+4>>2]=g;i=uq(b,c,d,e,f,h,j);if(i){break b}i=-3;e:{f:{g:{b=q[j+32>>2];switch(b|0){case 3:break e;case 4:case 5:break f;case 0:break g;default:break b}}rB(a,k,c,d,e,f);i=0;break b}b=4}rB(a,k,c,d,e,f);i=0;g=0;while(1){e=j+(g<<3)|0;rB(a,k,c,d,q[e>>2],q[e+4>>2]);g=g+1|0;if((g|0)!=(b|0)){continue}break}}Ii=h+144|0;return i}J(6640,6386,479,6651);G()}function $X(a){var b=0,c=0;a:{b:{c:{if(q[a+1392>>2]!=-1){break c}b=q[a+44>>2];d:{e:{if(b){if(b>>>0>=t[a+52>>2]){break e}q[a+44>>2]=b+1;b=r[b|0];break d}b=wj(q[a+32>>2]);if((b|0)!=-1){break d}}q[a+108>>2]=1;b=0}if(q[a+108>>2]){break b}if((b&255)!=79){break a}f:{g:{h:{i:{j:{k:{l:{m:{b=q[a+44>>2];n:{if(b){if(b>>>0>=t[a+52>>2]){break m}q[a+44>>2]=b+1;b=r[b|0];break n}b=wj(q[a+32>>2]);if((b|0)==-1){break m}}if((b&255)!=103){break a}b=q[a+44>>2];if(!b){break l}if(b>>>0>=t[a+52>>2]){break j}q[a+44>>2]=b+1;b=r[b|0];break k}q[a+108>>2]=1;break a}b=wj(q[a+32>>2]);if((b|0)==-1){break j}}if((b&255)!=103){break a}b=q[a+44>>2];if(!b){break i}if(b>>>0>=t[a+52>>2]){break g}q[a+44>>2]=b+1;b=r[b|0];break h}q[a+108>>2]=1;break a}b=wj(q[a+32>>2]);if((b|0)==-1){break g}}if((b&255)!=83){break f}if(!jD(a)){break b}if(!(o[a+1387|0]&1)){break c}o[a+1388|0]=0;q[a+1396>>2]=0;q[a+112>>2]=32;return 0}q[a+108>>2]=1}break a}o:{while(1){if(q[a+1392>>2]!=-1){break o}if(!$k(a)){break b}if(!(o[a+1387|0]&1)){continue}break}q[a+112>>2]=32;return 0}q[a+1408>>2]=0;q[a+1412>>2]=0;q[a+1396>>2]=0;o[a+1388|0]=0;c=1}return c}q[a+112>>2]=30;return 0}function $9(a){var b=0,c=0,d=0,e=0;q[q[a>>2]+76>>2]=0;b=q[a+4>>2];if(b){a:{if(o[b+104|0]&1){break a}c=q[b+92>>2];if(!c){break a}Ni(c)}Ni(b)}b=q[a+8>>2];if(b){b:{if(o[b+48|0]&1){break b}c=q[b+36>>2];if(!c){break b}Ni(c)}Ni(b)}b=q[a+12>>2];d=q[a+16>>2];if((b|0)!=(d|0)){while(1){c=q[(e<<2)+b>>2];if(c){c:{if(o[c+336|0]&1){break c}b=q[c+316>>2];if(b){Ni(b)}b=q[c+308>>2];if(!b){break c}Ni(b)}d:{if(o[c+304|0]&1){break d}b=q[c+292>>2];if(!b){break d}Ni(b)}Ni(c);d=q[a+16>>2];b=q[a+12>>2]}e=e+1|0;if(e>>>0>2>>>0){continue}break}}b=q[a+28>>2];if(b){e:{if(o[b+992|0]&1){break e}c=q[b+980>>2];if(!c){break e}Ni(c)}Ni(b)}b=q[a+32>>2];if(b){Ni(b)}b=q[a+36>>2];if(b){f:{if(o[b+536|0]&1){break f}c=q[b+524>>2];if(!c){break f}Ni(c)}Ni(b)}c=q[a+88>>2];g:{h:{if(!c){break h}d=q[a+92>>2];if(d){b=0;while(1){e=q[(c+(b<<3)|0)+4>>2];if(e){Ni(e)}b=b+1|0;if((d|0)!=(b|0)){continue}break}Ni(c);if(!a){break g}break h}Ni(c)}i:{if(o[a+84|0]&1){break i}b=q[a+72>>2];if(!b){break i}Ni(b)}j:{if(o[a+68|0]&1){break j}b=q[a+48>>2];if(b){Ni(b)}b=q[a+40>>2];if(!b){break j}Ni(b)}k:{if(o[a+24|0]&1){break k}b=q[a+12>>2];if(!b){break k}Ni(b)}Ni(a)}}function $Y(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-656|0;Ii=e;q[e+644>>2]=c;aZ(a,e+584|0,b,Yj(a,d,hj(d)));c=q[e+636>>2];d=Ly(c);o[e+51|0]=0;o[e+52|0]=0;o[e+53|0]=0;o[e+54|0]=0;o[e+55|0]=0;o[e+56|0]=0;o[e+57|0]=0;o[e+58|0]=0;q[e+44>>2]=0;q[e+48>>2]=0;q[e+8>>2]=d;q[e+24>>2]=c;q[e+36>>2]=-1;q[e+40>>2]=-1;q[e+28>>2]=0;q[e+32>>2]=0;q[e+16>>2]=q[e+632>>2];q[e+20>>2]=e+584;q[e+632>>2]=e+8;a=q[e+648>>2];o[d+75|0]=2;q[d+32>>2]=a;b=lp(c,0,0);q[e+12>>2]=b;a=q[c+8>>2];q[a+8>>2]=5;q[a>>2]=b;b=q[c+8>>2];if((q[c+28>>2]-b|0)<=16){Mk(c,1);b=q[c+8>>2]}q[c+8>>2]=b+16;q[b+24>>2]=9;q[b+16>>2]=d;b=c;a=q[b+8>>2];if((q[b+28>>2]-a|0)<=16){Mk(c,1);a=q[c+8>>2]}q[b+8>>2]=a+16;o[q[e+8>>2]+74|0]=2;Vj(e+584|0);a=q[e+636>>2];b=s[a+52>>1]+1|0;p[a+52>>1]=b;if((b&65535)>>>0>=201){gm(e+584|0,141933,0)}a:{while(1){a=q[e+600>>2];b=a-260|0;if(1<>>0<=27:0){break a}b=qu(e+584|0);if(q[e+600>>2]==59){Vj(e+584|0)}a=q[e+632>>2];q[a+36>>2]=r[a+50|0];if(!b){continue}break}a=q[e+600>>2]}b=q[e+636>>2];p[b+52>>1]=s[b+52>>1]-1;if((a|0)!=287){q[e>>2]=tl(e+584|0,287);Sj(e+584|0,oj(b,141919,e))}xN(e+584|0);Ii=e+656|0;return q[e+8>>2]}function w0(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-160|0;Ii=b;d=q[a+4>>2];a:{if(d>>>0<15){break a}q[b+144>>2]=1;e=d-14|0;q[b+148>>2]=e;c=-20352;if(e>>>0>14){break a}q[b+80>>2]=0;q[b+84>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+120>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+152>>2]=b- -64;c=q[a+8>>2]+56|0;Ti(b- -64|0,c,e<<2);Ui(c,0,(d<<2)-56|0);c=Rl(a,a,b+144|0);if(c){break a}c=q[b+84>>2];q[b+16>>2]=q[b+80>>2];q[b+20>>2]=c;c=q[b+92>>2];q[b+24>>2]=q[b+88>>2];q[b+28>>2]=c;c=q[b+100>>2];q[b+32>>2]=q[b+96>>2];q[b+36>>2]=c;c=q[b+108>>2];q[b+40>>2]=q[b+104>>2];q[b+44>>2]=c;c=q[b+116>>2];q[b+48>>2]=q[b+112>>2];q[b+52>>2]=c;c=q[b+148>>2];q[b+128>>2]=q[b+144>>2];q[b+132>>2]=c;c=q[b+68>>2];q[b>>2]=q[b+64>>2];q[b+4>>2]=c;c=q[b+76>>2];q[b+8>>2]=q[b+72>>2];q[b+12>>2]=c;q[b+136>>2]=b;c=kl(b+128|0,224);if(c){break a}c=Rl(a,a,b+128|0);if(c){break a}c=q[b+148>>2];if(c>>>0>=8){Ui(b+92|0,0,(c<<2)-28|0)}c=Rl(b+144|0,b+144|0,b+128|0);if(c){break a}q[b+148>>2]=15;c=on(b+144|0,224);if(c){break a}c=Rl(a,a,b+144|0)}Ii=b+160|0;return c|0}function yM(a,b,c,d,e,f,g,h){var i=0;i=Ii-192|0;Ii=i;a:{b:{switch(b+12|0){case 12:if(!(!h|!(r[c+108|0]&2))){q[i+32>>2]=aj(d,e);b=Qi(a,18133,i+32|0);break a}b=1;if(!(!(o[g+8|0]&1)|r[c+108|0]&2)){q[i+16>>2]=aj(d,e);b=Qi(a,18198,i+16|0);break a}zB(a,c+32|0);break a;case 2:if(o[g+8|0]&1){b=aj(q[g>>2],q[g+4>>2]);q[i+68>>2]=aj(d,e);q[i+64>>2]=b;b=Qi(a,18264,i- -64|0);break a}q[i+48>>2]=aj(d,e);b=Qi(a,18307,i+48|0);break a;case 1:if(o[g+8|0]&1){q[i+96>>2]=aj(d,e);b=Qi(a,18332,i+96|0);break a}b=q[g>>2];q[i+84>>2]=aj(d,e);q[i+80>>2]=b+1;b=Qi(a,18412,i+80|0);break a;case 0:if(!(o[g+8|0]&1)){q[i+112>>2]=aj(d,e);b=Qi(a,18447,i+112|0);break a}b=aj(q[g>>2],q[g+4>>2]);q[i+132>>2]=aj(d,e);q[i+128>>2]=b;b=Qi(a,18530,i+128|0);break a;case 11:b=aj(q[f+16>>2],q[f+20>>2]);c=aj(d,e);d=q[f+28>>2];e=d;f=q[f+24>>2];if(d|f){d=aj(f,e);q[i+168>>2]=c;q[i+164>>2]=d;q[i+160>>2]=b;b=Qi(a,18565,i+160|0);break a}q[i+148>>2]=c;q[i+144>>2]=b;b=Qi(a,16152,i+144|0);break a;case 7:b=aj(q[f+24>>2],q[f+28>>2]);q[i+180>>2]=uj(a,1,0);q[i+176>>2]=b;b=Qi(a,18612,i+176|0);break a;default:break b}}q[i>>2]=b;b=Qi(a,18662,i)}Ii=i+192|0;return b}function Mna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-112|0;Ii=d;b=q[a+4>>2];c=q[b+20>>2];e=q[q[a+12>>2]>>2];if(e>>>0>2]-c>>3>>>0){c=q[c+(e<<3)>>2];g=q[b+8>>2];b=q[b+4>>2];if(c>>>0>2>>>0){c=q[b+(c<<2)>>2];b=q[a+16>>2];e=q[b+64>>2];f=q[57289];g=q[b+68>>2];a:{if((e|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){o[c+204|0]=r[c+204|0]|1;break a}f=q[57290];if((e|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){o[c+204|0]=r[c+204|0]&254;break a}if(!q[b+80>>2]){break a}f=q[59006];if((e|0)==q[f+8>>2]&(g|0)==q[f+12>>2]){e=q[b+100>>2];g=q[b+96>>2];f=q[q[q[c+152>>2]+8>>2]>>2];u[d+16>>2]=u[b+112>>2];u[d+20>>2]=u[b+116>>2];u[d+24>>2]=u[b+120>>2];u[d+28>>2]=u[b+124>>2];if((Bp(f,g,e,Gp(d+40|0,d+16|0),q[b+128>>2],215,c)|0)!=-1){break a}a=q[a+16>>2];c=sm(q[a+32>>2],q[a+36>>2]);e=aj(q[a+48>>2],q[a+52>>2]);a=aj(q[a+56>>2],q[a+60>>2]);q[d+12>>2]=aj(q[b+96>>2],q[b+100>>2]);q[d+8>>2]=a;q[d+4>>2]=e;q[d>>2]=c;Pi(4,44761,44769,d);break a}a=q[59022];if(q[a+8>>2]!=(e|0)|q[a+12>>2]!=(g|0)){break a}a=q[c+148>>2];if(!a){break a}if(!ow(a,q[b+96>>2],q[b+100>>2])){break a}o[c+204|0]=r[c+204|0]|4}Ii=d+112|0;return 0}}J(46069,45367,479,46080);G()}function epa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=q[a+8>>2];g=q[a+12>>2];a:{b:{c:{d=q[q[a+16>>2]>>2];a=q[d+16>>2];if(a){while(1){b=q[a+8>>2];if(!q[b+12>>2]){break c}q[b+12>>2]=0;b=q[a>>2];Ni(a);a=b;if(a){continue}break}}q[d+16>>2]=0;d:{e:{f:{b=q[d+12>>2];if(b){while(1){if(q[b+12>>2]){q[b+12>>2]=0;c=q[b+20>>2];if(!c){break b}e=q[c+4>>2];a=q[e+16>>2];if(!a){break f}g:{if((a|0)==(c|0)){q[e+16>>2]=q[c>>2];break g}while(1){e=a;a=q[a>>2];if(!a){break f}if((a|0)!=(c|0)){continue}break}q[e>>2]=q[c>>2]}Ni(c)}a=q[b+16>>2];Ni(b);b=a;if(a){continue}break}}q[d+12>>2]=0;a=q[d+8>>2];if(!r[g+17|0]){break e}if(!a){break d}q[d+8>>2]=0;break d}J(39010,37552,1596,38974);G()}if(!a){break d}q[d+8>>2]=0}b=q[f+148>>2];e=q[f+144>>2];a=b-e|0;h:{if(!a){break h}c=e-b|0;c=((a|0)<(c|0)?c:a)>>>2|0;a=(a|0)>-1?a:-1;a=w(c,(a|0)<1?a:1);c=a>>>0>1?a:1;a=0;while(1){g=e+(a<<2)|0;if(q[g>>2]!=(d|0)){a=a+1|0;if((c|0)!=(a|0)){continue}break h}break}q[g>>2]=q[b-4>>2];a=q[f+148>>2]-4|0;q[f+148>>2]=a;if(a>>>0>2]){break a}}if(d){Ni(d)}return 0}J(39018,37552,1602,38974);G()}J(38986,37552,1572,38974);G()}J(39053,38457,516,39043);G()}function rU(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;k=-1;a:{b:{if(!a|!b){break b}c=q[a+72>>2];if(!c|q[a+20>>2]!=1){break b}if(q[c+36>>2]){p=q[c+32>>2];l=hj(b);a=q[a+16>>2];if((a|0)<1){break b}j=a-1|0;h=q[c+16>>2];e=q[c>>2];while(1){m=f+j>>1;k=q[(m<<2)+p>>2];a=q[(k<<2)+h>>2]+e|0;g=r[a+28|0]|r[a+29|0]<<8;d=g>>>0>>0?g:l;n=(d+a|0)+46|0;a=a+46|0;c=b;i=0;g=g-l|0;if((d|0)>=1){while(1){d=r[c|0];i=(d-65&255)>>>0<26?d+32|0:d;d=r[a|0];d=(d-65&255)>>>0<26?d+32|0:d;if(!((i^d)&255)){c=c+1|0;a=a+1|0;if(n>>>0>a>>>0){continue}}break}i=i&255;c=d&255}else{c=0}a=(a|0)==(n|0)?g:c-i|0;if(!a){break b}k=-1;a=(a|0)<0;f=a?m+1|0:f;j=a?j:m-1|0;if((f|0)<=(j|0)){continue}break}break b}h=hj(b);if(h>>>0>65535){break b}g=q[a+16>>2];if(!g){break b}i=q[c+16>>2];d=q[c>>2];while(1){c:{c=d+q[i+(f<<2)>>2]|0;a=r[c+28|0]|r[c+29|0]<<8;if(a>>>0>>0|(a|0)!=(h|0)){break c}a=0;if(!h){break a}c=c+46|0;while(1){e=o[a+b|0];j=(e-65&255)>>>0<26?e+32|0:e;e=o[a+c|0];if((j|0)!=(((e-65&255)>>>0<26?e+32|0:e)|0)){break c}a=a+1|0;if((h|0)!=(a|0)){continue}break}break a}f=f+1|0;if(g>>>0>f>>>0){continue}break}}return k}return f}function xX(a,b,c,d,e,f){var g=0,h=0;h=-50;a:{if(c&7){break a}if((b|0)!=1){h=0;if(!c){break a}while(1){g=r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24);b=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24);yy(a,e,f);o[f|0]=r[d|0]^r[f|0];o[f+1|0]=r[d+1|0]^r[f+1|0];o[f+2|0]=r[d+2|0]^r[f+2|0];o[f+3|0]=r[d+3|0]^r[f+3|0];o[f+4|0]=r[d+4|0]^r[f+4|0];o[f+5|0]=r[d+5|0]^r[f+5|0];o[f+6|0]=r[d+6|0]^r[f+6|0];o[f+7|0]=r[d+7|0]^r[f+7|0];o[d|0]=b;o[d+1|0]=b>>>8;o[d+2|0]=b>>>16;o[d+3|0]=b>>>24;o[d+4|0]=g;o[d+5|0]=g>>>8;o[d+6|0]=g>>>16;o[d+7|0]=g>>>24;f=f+8|0;e=e+8|0;c=c-8|0;if(c){continue}break}break a}h=0;if(!c){break a}b=r[d|0];while(1){o[f|0]=r[e|0]^b;o[f+1|0]=r[d+1|0]^r[e+1|0];o[f+2|0]=r[d+2|0]^r[e+2|0];o[f+3|0]=r[d+3|0]^r[e+3|0];o[f+4|0]=r[d+4|0]^r[e+4|0];o[f+5|0]=r[d+5|0]^r[e+5|0];o[f+6|0]=r[d+6|0]^r[e+6|0];o[f+7|0]=r[d+7|0]^r[e+7|0];yy(a,f,f);g=r[f+4|0]|r[f+5|0]<<8|(r[f+6|0]<<16|r[f+7|0]<<24);b=r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24);o[d|0]=b;o[d+1|0]=b>>>8;o[d+2|0]=b>>>16;o[d+3|0]=b>>>24;o[d+4|0]=g;o[d+5|0]=g>>>8;o[d+6|0]=g>>>16;o[d+7|0]=g>>>24;f=f+8|0;e=e+8|0;c=c-8|0;if(c){continue}break}}return h}function sX(a,b,c,d,e,f){var g=0,h=0;h=-50;a:{if(c&7){break a}if((b|0)!=1){h=0;if(!c){break a}while(1){g=r[e+4|0]|r[e+5|0]<<8|(r[e+6|0]<<16|r[e+7|0]<<24);b=r[e|0]|r[e+1|0]<<8|(r[e+2|0]<<16|r[e+3|0]<<24);xy(a,e,f);o[f|0]=r[d|0]^r[f|0];o[f+1|0]=r[d+1|0]^r[f+1|0];o[f+2|0]=r[d+2|0]^r[f+2|0];o[f+3|0]=r[d+3|0]^r[f+3|0];o[f+4|0]=r[d+4|0]^r[f+4|0];o[f+5|0]=r[d+5|0]^r[f+5|0];o[f+6|0]=r[d+6|0]^r[f+6|0];o[f+7|0]=r[d+7|0]^r[f+7|0];o[d|0]=b;o[d+1|0]=b>>>8;o[d+2|0]=b>>>16;o[d+3|0]=b>>>24;o[d+4|0]=g;o[d+5|0]=g>>>8;o[d+6|0]=g>>>16;o[d+7|0]=g>>>24;f=f+8|0;e=e+8|0;c=c-8|0;if(c){continue}break}break a}h=0;if(!c){break a}b=r[d|0];while(1){o[f|0]=r[e|0]^b;o[f+1|0]=r[d+1|0]^r[e+1|0];o[f+2|0]=r[d+2|0]^r[e+2|0];o[f+3|0]=r[d+3|0]^r[e+3|0];o[f+4|0]=r[d+4|0]^r[e+4|0];o[f+5|0]=r[d+5|0]^r[e+5|0];o[f+6|0]=r[d+6|0]^r[e+6|0];o[f+7|0]=r[d+7|0]^r[e+7|0];xy(a,f,f);g=r[f+4|0]|r[f+5|0]<<8|(r[f+6|0]<<16|r[f+7|0]<<24);b=r[f|0]|r[f+1|0]<<8|(r[f+2|0]<<16|r[f+3|0]<<24);o[d|0]=b;o[d+1|0]=b>>>8;o[d+2|0]=b>>>16;o[d+3|0]=b>>>24;o[d+4|0]=g;o[d+5|0]=g>>>8;o[d+6|0]=g>>>16;o[d+7|0]=g>>>24;f=f+8|0;e=e+8|0;c=c-8|0;if(c){continue}break}}return h}function SY(){var a=0,b=0,c=0;a=Mi[1076](0,0,0,376)|0;if(a){o[a+140|0]=33;o[a+4|0]=8;q[a>>2]=0;q[a+32>>2]=0;q[a+68>>2]=0;q[a+104>>2]=0;q[a+60>>2]=0;q[a+64>>2]=0;p[a+56>>1]=256;q[a+40>>2]=0;q[a+44>>2]=0;o[a+5|0]=97;o[a+6|0]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+80>>2]=0;q[a+136>>2]=0;q[a+132>>2]=1076;q[a+48>>2]=0;q[a+52>>2]=0;q[a+16>>2]=a+120;b=a+240|0;q[a+260>>2]=b;q[a+256>>2]=b;q[a+232>>2]=a;q[a+128>>2]=0;q[a+184>>2]=0;q[a+188>>2]=376;q[a+120>>2]=0;q[a+124>>2]=0;q[a+224>>2]=0;q[a+172>>2]=0;q[a+180>>2]=0;q[a+208>>2]=0;o[a+141|0]=0;q[a+144>>2]=0;q[a+152>>2]=a+148;q[a+156>>2]=0;q[a+160>>2]=0;q[a+164>>2]=0;q[a+168>>2]=0;q[a+200>>2]=200;q[a+204>>2]=200;q[a+196>>2]=0;q[a+304>>2]=0;q[a+296>>2]=0;q[a+300>>2]=0;q[a+288>>2]=0;q[a+292>>2]=0;q[a+280>>2]=0;q[a+284>>2]=0;q[a+272>>2]=0;q[a+276>>2]=0;q[a+148>>2]=a;if(!$u(a,1072,0)){return a}b=q[a+16>>2];Jo(a,q[a+32>>2]);tF(a);c=q[a+16>>2];Cj(a,q[c>>2],q[c+8>>2]<<2,0);c=Cj(a,q[b+52>>2],q[b+60>>2],0);q[b+60>>2]=0;q[b+52>>2]=c;Cj(a,q[a+40>>2],w(q[a+48>>2],24),0);Cj(a,q[a+32>>2],q[a+44>>2]<<4,0);Mi[q[b+12>>2]](q[b+16>>2],a,376,0)|0}return 0}function op(a,b){var c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=0,m=0,n=x(0),o=x(0),p=x(0),q=x(0),r=0,s=0,t=0;g=u[b+36>>2];i=u[b+32>>2];e=u[b+40>>2];d=u[b+20>>2];h=u[b+16>>2];j=u[b+24>>2];a:{b:{f=u[b>>2];n=u[b+4>>2];k=u[b+8>>2];c=u[b+12>>2];o=x(F(x(x(x(x(f*f)+x(n*n))+x(k*k))+x(c*c))));if(o==x(0)){break b}c=u[b+28>>2];p=x(F(x(x(x(x(h*h)+x(d*d))+x(j*j))+x(c*c))));if(p==x(0)){break b}c=u[b+44>>2];q=x(F(x(x(x(x(i*i)+x(g*g))+x(e*e))+x(c*c))));if(q==x(0)){break b}c=x(x(1)/q);e=x(e*c);g=x(g*c);i=x(i*c);c=x(x(1)/p);j=x(j*c);d=x(d*c);h=x(h*c);c=x(x(1)/o);k=x(k*c);n=x(n*c);f=x(f*c);break a}o=x(1);p=x(1);q=x(1)}l=x(x(f+d)+e)f;r=l&(s&m^1);t=d>f;m=l&(m|t);l=l&(t^-1|s);e=x(x((r?x(-e):e)+x((m?x(-f):f)+(l?x(-d):d)))+x(1));d=x(x(x(1)/x(F(e)))*x(.5));c=x(e*d);h=x(x(n-(r?x(-h):h))*d);e=x(x(i-(l?x(-k):k))*d);d=x(x(j-(m?x(-g):g))*d);c:{if(!r){f=d;g=e;e=h;d=c;break c}f=c;g=h}c=u[b+56>>2];h=u[b+52>>2];j=u[b+48>>2];d:{if(!m){i=f;f=g;g=e;e=d;break d}i=g;g=d}u[a+32>>2]=o;u[a+16>>2]=j;u[a+12>>2]=e;u[a+8>>2]=g;u[a+4>>2]=f;u[a>>2]=i;u[a+40>>2]=q;u[a+36>>2]=p;u[a+24>>2]=c;u[a+20>>2]=h}function qR(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;a:{b:{if(!q[a+72>>2]){e=q[a>>2];break b}b=q[a+116>>2];q[c+12>>2]=b;q[c+16>>2]=(q[a+100>>2]-b|0)+16749;b=q[a+132>>2];q[c+20>>2]=0;q[c+24>>2]=b;b=q[a+104>>2];d=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);b=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);q[c>>2]=d;q[c+4>>2]=b;ls(q[a+16>>2],q[a+20>>2],q[q[a>>2]+184>>2]>>>1&1,c+9|0);o[c+8|0]=q[a+128>>2];b=ZV(q[a+72>>2],c);if(b){break a}b=r[c+8|0];q[a+128>>2]=b;o[q[a+108>>2]]=b;q[a+120>>2]=q[c+12>>2]+q[c+20>>2];b=q[c+24>>2];q[a+132>>2]=b;o[q[a+112>>2]]=b>>>8;o[q[a+112>>2]+1|0]=q[c+24>>2];b=-29184;d=q[a+132>>2];if(d>>>0>16384){break a}c:{if(!d){if(q[a+128>>2]!=23?q[a+20>>2]==3:0){break a}d=q[a+172>>2];q[a+172>>2]=d+1;b=-29056;if((d|0)<=2){break c}break a}q[a+172>>2]=0}e=q[a>>2];if(r[e+184|0]&2){break b}b=8;d:{if((q[e+184>>2]&2)>>>0>7){d=8;break d}while(1){d=b-1|0;e=d+q[a+104>>2]|0;f=r[e|0]+1|0;o[e|0]=f;e=q[a>>2];if((f&255)==(f|0)){d=b;break d}b=d;if(b>>>0>(q[e+184>>2]&2)>>>0){continue}break}}b=-27520;if((q[e+184>>2]&2)==(d|0)){break a}}b=0;if(!(r[e+184|0]&2)){break a}XV(a)}Ii=c+32|0;return b}function Ti(a,b,c){var d=0,e=0,f=0;if(c>>>0>=512){Wc(a|0,b|0,c|0)|0;return a}e=a+c|0;a:{if(!((a^b)&3)){b:{if((c|0)<1){c=a;break b}if(!(a&3)){c=a;break b}c=a;while(1){o[c|0]=r[b|0];b=b+1|0;c=c+1|0;if(e>>>0<=c>>>0){break b}if(c&3){continue}break}}d=e&-4;c:{if(d>>>0<64){break c}f=d+ -64|0;if(f>>>0>>0){break c}while(1){q[c>>2]=q[b>>2];q[c+4>>2]=q[b+4>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=q[b+12>>2];q[c+16>>2]=q[b+16>>2];q[c+20>>2]=q[b+20>>2];q[c+24>>2]=q[b+24>>2];q[c+28>>2]=q[b+28>>2];q[c+32>>2]=q[b+32>>2];q[c+36>>2]=q[b+36>>2];q[c+40>>2]=q[b+40>>2];q[c+44>>2]=q[b+44>>2];q[c+48>>2]=q[b+48>>2];q[c+52>>2]=q[b+52>>2];q[c+56>>2]=q[b+56>>2];q[c+60>>2]=q[b+60>>2];b=b- -64|0;c=c- -64|0;if(f>>>0>=c>>>0){continue}break}}if(c>>>0>=d>>>0){break a}while(1){q[c>>2]=q[b>>2];b=b+4|0;c=c+4|0;if(d>>>0>c>>>0){continue}break}break a}if(e>>>0<4){c=a;break a}d=e-4|0;if(d>>>0>>0){c=a;break a}c=a;while(1){o[c|0]=r[b|0];o[c+1|0]=r[b+1|0];o[c+2|0]=r[b+2|0];o[c+3|0]=r[b+3|0];b=b+4|0;c=c+4|0;if(d>>>0>=c>>>0){continue}break}}if(c>>>0>>0){while(1){o[c|0]=r[b|0];b=b+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return a}function bpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-144|0;Ii=c;d=q[a>>2];e=q[a+16>>2];a=q[a+20>>2];a:{b:{if((e|0)==q[72466]&(a|0)==q[72467]){if(r[d+17|0]){q[c+72>>2]=3;u[c+80>>2]=u[c+48>>2];u[c+84>>2]=u[c+52>>2];u[c+88>>2]=u[c+56>>2];break b}q[c+72>>2]=3;u[c+80>>2]=u[c+32>>2];u[c+84>>2]=u[c+36>>2];u[c+88>>2]=u[c+40>>2];break b}if((e|0)==q[72468]&(a|0)==q[72469]){if(r[d+17|0]){q[c+72>>2]=3;u[c+80>>2]=u[c+16>>2];u[c+84>>2]=u[c+20>>2];u[c+88>>2]=u[c+24>>2];break b}q[c+72>>2]=3;u[c+80>>2]=u[c>>2];u[c+84>>2]=u[c+4>>2];u[c+88>>2]=u[c+8>>2];break b}if((e|0)==q[72470]&(a|0)==q[72471]){if(r[d+17|0]){a=c+72|0;q[a>>2]=0;v[a+8>>3]=0;break b}a=c+72|0;q[a>>2]=0;v[a+8>>3]=0;break b}if((e|0)==q[72472]&(a|0)==q[72473]){if(r[d+17|0]){Pi(3,37377,38177,0);f=-1;break a}o[c+80|0]=0;q[c+72>>2]=6;break b}if((e|0)==q[72462]&(a|0)==q[72463]){if(r[d+17|0]){a=c+72|0;q[a>>2]=0;v[a+8>>3]=0;break b}a=c+72|0;q[a>>2]=0;v[a+8>>3]=0;break b}f=-1;if(q[72464]!=(e|0)|q[72465]!=(a|0)){break a}if(r[d+17|0]){a=c+72|0;q[a>>2]=0;v[a+8>>3]=0;break b}a=c+72|0;q[a>>2]=0;v[a+8>>3]=0}Ti(b+32|0,c+72|0,72);f=0}a=f;Ii=c+144|0;return a|0}function QB(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-144|0;Ii=g;Ui(g+16|0,0,128);f=r[c+24|0];if(f){while(1){h=q[c+20>>2]+w(e,24)|0;if((q[h+4>>2]&-268435456)==805306368){ota(d,a,h,tta(a,PM(b),q[h+4>>2]&4194303));f=r[c+24|0]}e=e+1|0;if(f>>>0>e>>>0){continue}break}}a:{b:{if(Hw(b)){break b}while(1){if(!vq(b,g+12|0)){e=2;break a}e=q[g+12>>2];i=e>>>3|0;if(!i){e=2;break a}h=e&7;c:{d:{e:{j=r[c+24|0];if(j){k=q[c+20>>2];e=0;while(1){f=w(e,24)+k|0;if((q[f+4>>2]&4194303)==(i|0)){break e}e=e+1|0;if((j|0)!=(e|0)){continue}break}}e=KM(b,h);if(!e){break d}break a}if(e>>>0>=128){break c}o[(g+16|0)+e|0]=1;e=mta(d,a,h,f,b);if(e){break a}e=r[f+20|0];if(!(e&127)){break d}o[f+20|0]=e|128}if(!Hw(b)){continue}break b}break}J(22805,22834,169,22858);G()}f=r[c+24|0];if(f){e=0;while(1){b=q[c+20>>2]+w(e,24)|0;f:{if(r[b+20|0]&127){break f}h=q[b+4>>2]&-268435456;if((h|0)!=268435456){if(r[(g+16|0)+e|0]|(h|0)!=536870912){break f}a=q[c+4>>2];q[g+4>>2]=q[b>>2];q[g>>2]=a;Pi(3,22872,22876,g);e=5;break a}if(r[(g+16|0)+e|0]){break f}WM(a,b,d);f=r[c+24|0]}e=e+1|0;if(f>>>0>e>>>0){continue}break}}e=0}Ii=g+144|0;return e}function G5(a,b){var c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=0,i=0,j=x(0),k=x(0),l=x(0),m=x(0),n=0,p=x(0),r=x(0),s=x(0),t=x(0),v=0,y=0,z=0;a:{b:{if(!(o[b+12|0]&1)){h=q[a+4>>2];Wi(h,80,b,b+8|0,b+4|0);n=q[b>>2];if((q[b+8>>2]-n|0)/80>>>0>>0){break b}q[b+4>>2]=w(h,80)+n;if(h){v=q[a>>2];y=q[a+4>>2];while(1){if((i|0)==(y|0)){break a}b=w(i,192)+v|0;c=u[b+128>>2];k=u[b+132>>2];p=u[b+140>>2];e=u[b+136>>2];l=u[b+168>>2];d=u[b+164>>2];m=u[b+160>>2];f=u[b+152>>2];z=q[b+148>>2];a=w(i,80)+n|0;q[a+48>>2]=q[b+144>>2];q[a+52>>2]=z;q[a+60>>2]=1065353216;u[a+56>>2]=f;u[a+12>>2]=m*x(0);u[a+28>>2]=d*x(0);u[a+44>>2]=l*x(0);r=x(k+k);j=x(c*r);f=x(e+e);g=x(p*f);u[a+4>>2]=m*x(j+g);s=x(c*f);t=x(r*p);u[a+8>>2]=m*x(s-t);u[a+16>>2]=d*x(j-g);g=c;c=x(c+c);j=x(x(1)-x(g*c));e=x(e*f);u[a+20>>2]=d*x(j-e);g=d;d=x(k*f);c=x(c*p);u[a+24>>2]=g*x(d+c);u[a+32>>2]=l*x(s+t);u[a+36>>2]=l*x(d-c);c=x(k*r);u[a+40>>2]=l*x(j-c);u[a>>2]=m*x(x(x(1)-c)-e);q[a+64>>2]=q[b>>2];u[a+68>>2]=u[b+176>>2];i=i+1|0;if((h|0)!=(i|0)){continue}break}}return}J(152643,152587,493,152718);G()}J(152730,152587,506,152749);G()}J(152522,152534,69,152554);G()}function zba(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=x(0),j=0;b=Ii-176|0;Ii=b;j=nj(b+152|0,a,1,202233,359);d=_i(a,1,q[213928],0);c=q[d>>2];e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=Ck(a,-1,q[213927]);Ri(a,-2);if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){a:{if((c|0)==(f|0)){e=q[d>>2];c=q[e+32>>2];b:{c:{d:{e:{f:{g:{d=q[d+4>>2];f=d&65535;if(f>>>0>=(q[e+36>>2]-c|0)/592>>>0|s[(c+w(f,592)|0)+568>>1]!=(d>>>16|0)){break g}c=c+w(f,592)|0;if(s[c+570>>1]!=(d&65535)|r[c+415|0]&32){break g}c=TA(e,d);g=u[c+8>>2];h=u[c+4>>2];i=u[c>>2];switch(q[c+412>>2]>>>4&15){case 5:break c;case 6:break d;case 1:break e;case 0:break f;default:break b}}Qi(a,204389,0);G()}v[b+48>>3]=g;v[b+40>>3]=h;v[b+32>>3]=i;Lj(a,204504,b+32|0);break a}c=q[c+420>>2];v[b+88>>3]=g;v[b+80>>3]=h;v[b+72>>3]=i;q[b+64>>2]=c;Lj(a,204521,b- -64|0);break a}c=q[c+416>>2];v[b+120>>3]=g;v[b+112>>3]=h;v[b+104>>3]=i;q[b+96>>2]=c;Lj(a,204537,b+96|0);break a}v[b+144>>3]=g;v[b+136>>3]=h;v[b+128>>3]=i;Lj(a,204560,b+128|0);break a}v[b+16>>3]=g;v[b+8>>3]=h;v[b>>3]=i;Lj(a,204584,b);break a}Xi(a,204605)}mj(j);Ii=b+176|0;return 1}J(202212,202233,187,202255);G()}function PA(a,b,c,d,e){var f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0);f=Ii+ -64|0;Ii=f;a:{b:{if(d){Cr(b,d,0,f);h=u[d+384>>2];g=h;i=u[d+388>>2];j=i;c:{d:{d=q[c+412>>2];switch(d>>>16&3){case 1:break c;case 0:break d;default:break a}}g=hi?h:i;break b}d=q[b+12>>2];l=x(t[d+20>>2]);m=x(t[b+392>>2]);h=x(l/m);g=h;k=x(t[d+24>>2]);n=x(t[b+396>>2]);i=x(k/n);j=i;e:{f:{g:{h:{d=q[c+412>>2];switch(d>>>16&3){case 1:break g;case 0:break h;default:break e}}g=hi?h:i}j=g}q[f+24>>2]=0;q[f+28>>2]=0;u[f+20>>2]=j;q[f+32>>2]=0;q[f+36>>2]=0;q[f+44>>2]=0;q[f+48>>2]=0;q[f+40>>2]=1065353216;q[f+52>>2]=0;q[f+56>>2]=0;q[f+60>>2]=1065353216;q[f+4>>2]=0;q[f+8>>2]=0;q[f+12>>2]=0;q[f+16>>2]=0;k=x(x(k-x(j*n))*x(.5));u[f>>2]=g;l=x(x(l-x(g*m))*x(.5));break a}j=g}m=u[e>>2];n=u[e+4>>2];o=u[f+52>>2];p=u[f+48>>2];u[a+8>>2]=u[e+8>>2]-u[f+56>>2];r=x(x(1)/j);b=(d>>>10&3)-1|0;j=x(x(n-o)-(b>>>0<2?x(0):k));u[a+4>>2]=r*j;k=x(x(1)/g);c=(d>>>8&3)-1|0;g=x(x(m-p)-(c>>>0<2?x(0):l));u[a>>2]=k*g;if(c>>>0<=1){u[a>>2]=g/h}if(b>>>0<=1){u[a+4>>2]=j/i}Ii=f- -64|0}function q7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-96|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){c=0;f=nj(b+72|0,a,0,115465,1257);if(q[a+8>>2]-q[a+12>>2]>>4<1){break b}if(Oj(a,1)){g=rr(a,q[q[d+304>>2]+2384>>2]);h=Li;break b}if(!Vi(a,1)){break b}if(!jj(a,1)){break b}q[b+16>>2]=115561;a=Qi(a,116530,b+16|0);break a}J(115568,115465,478,119531);G()}if(q[a+8>>2]-q[a+12>>2]>>4>=2){Dj(a,2,5);ej(a,2);Zi(a,-1,116586);c:{if(!Vi(a,-1)){break c}e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;if(!Hj(a,-2)){break c}while(1){e=jj(a,-1);Ri(a,-2);c=c|e;if(Hj(a,-2)){continue}break}}Ri(a,-3)}q[b+40>>2]=g;q[b+44>>2]=h;q[b+32>>2]=4;q[b+48>>2]=c;q[b+52>>2]=0;c=q[d+4>>2];if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=b- -64|0;d=q[a+4>>2];q[c+32>>2]=q[a>>2];q[c+36>>2]=d;a=q[b+60>>2];q[c+24>>2]=q[b+56>>2];q[c+28>>2]=a;a=q[b+52>>2];q[c+16>>2]=q[b+48>>2];q[c+20>>2]=a;a=q[b+44>>2];q[c+8>>2]=q[b+40>>2];q[c+12>>2]=a;a=q[b+36>>2];q[c>>2]=q[b+32>>2];q[c+4>>2]=a;a=0;break a}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b)}mj(f);Ii=b+96|0;return a|0}function oxa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;Oza(+b);c=Lza(1)|0;c=c&2147483647;e=!(Lza(0)|0)&(c|0)==2146435072|c>>>0<2146435072;Oza(+a);c=Lza(1)|0;d=Lza(0)|0;c=c&2147483647;if(!((c|0)==2146435072&d>>>0<1|c>>>0<2146435072?e:0)){return a+b}Oza(+b);d=Lza(1)|0;e=Lza(0)|0;c=d;h=c;if(!(e|c-1072693248)){return iC(a)}Oza(+a);d=Lza(1)|0;g=c>>>30&2;c=g|d>>>31;a:{b:{c:{d=d&2147483647;if(!(Lza(0)|d)){d:{switch(c-2|0){case 0:break c;case 1:break d;default:break b}}return-3.141592653589793}i=e;e=h&2147483647;if(!(i|e)){break a}e:{if((e|0)==2146435072){if((d|0)!=2146435072){break e}return v[(c<<3)+214960>>3]}if(!(e+67108864>>>0>=d>>>0?(d|0)!=2146435072:0)){break a}f:{if(g){f=0;if(e>>>0>d+67108864>>>0){break f}}f=iC(y(a/b))}a=f;g:{switch(c|0){case 1:return-a;case 2:return 3.141592653589793-(a+ -1.2246467991473532e-16);case 0:break b;default:break g}}return a+ -1.2246467991473532e-16+ -3.141592653589793}return v[(c<<3)+214992>>3]}a=3.141592653589793}return a}Oza(1.5707963267948966);c=Lza(1)|0;e=Lza(0)|0;Oza(+a);d=Lza(1)|0;Lza(0)|0;Mza(0,e|0);Mza(1,c&2147483647|d&-2147483648);return+Nza()}function fua(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-2256|0;Ii=e;a:{b:{c:{d:{if(a){if(!d){break d}q[d>>2]=0;e:{f:{if(!iz(a,e+8|0)){g:{if(Ej(e+8|0,155080,5)){if(Ej(e+8|0,155085,6)){break g}}f=e+2248|0;q[f>>2]=0;q[f+4>>2]=0;q[e+2240>>2]=0;q[e+2244>>2]=0;f=e+2200|0;q[f+8>>2]=0;q[f+12>>2]=0;q[f+28>>2]=1;q[f+32>>2]=0;q[f+4>>2]=1381;q[f+16>>2]=0;q[f+20>>2]=0;q[f+24>>2]=0;q[e+2208>>2]=1258;q[e+2204>>2]=1259;q[e+2200>>2]=e+2240;f=-1;g=uI(e+2200|0,e+80|0,s[e+144>>1],!Ej(e+8|0,155085,6));h:{if(!g){break h}h=vI(g,e+148|0);pA(g);if(h){break h}g=q[e+2244>>2];f=q[e+2240>>2];if((g|0)==(f|0)){break c}f=hN(a,f,g-f|0,b,c,d)}if(o[e+2252|0]&1){break e}a=q[e+2240>>2];if(!a){break e}Ni(a);break e}if(!Ej(e+8|0,155091,5)){f=gN(e+148|0,b,c,d);break e}if(!Ej(e+8|0,155096,5)){break f}if(!Ej(e+8|0,155101,5)){break f}break b}if(!bm(a)){break b}}f=gN(a,b,c,d)}if(f){break a}f=0;a=q[210909];if(!a){break a}b=q[d>>2];while(1){c=q[a+4>>2];if(c){Mi[c|0](b)}a=q[a+24>>2];if(a){continue}break}break a}J(155062,154735,608,155066);G()}J(155073,154735,609,155066);G()}J(155106,154885,421,155117);G()}f=-5}Ii=e+2256|0;return f}function wha(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=0,k=0;b=Ii-112|0;Ii=b;k=nj(b+88|0,a,1,79890,503);j=q[a+8>>2]-q[a+12>>2]>>4;g=jk(a);q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Gk(a,1,b+56|0,b+24|0);c=-1;a:{if((j|0)<2){f=x(1);h=x(1);d=0;break a}b:{if(!Vi(a,2)){h=x(1);f=x(1);break b}Dj(a,2,5);ej(a,2);Zi(a,-1,80380);i=x(0);c:{if(!Vi(a,-1)){break c}i=x(fj(a,-1))}Ri(a,-2);Zi(a,-1,80386);e=x(1);d:{if(!Vi(a,-1)){break d}e=x(fj(a,-1))}h=e;Ri(a,-2);Zi(a,-1,80391);e=x(0);e:{if(!Vi(a,-1)){break e}e=x(fj(a,-1))}Ri(a,-2);Zi(a,-1,80395);f=x(1);f:{if(!Vi(a,-1)){break f}f=x(fj(a,-1))}Ri(a,-2);Ri(a,-2)}d=0;if((j|0)<3){break a}d=0;if((Vi(a,3)|0)!=6){break a}ej(a,3);c=X1();d=$s(a)+2|0}q[b+16>>2]=c;u[b+12>>2]=f;u[b+8>>2]=e;u[b+4>>2]=h;u[b>>2]=i;c=q[58810];Oo(b+24|0,b+56|0,q[c+8>>2],q[c+12>>2],g,d,c,b,20,0);g=q[b+16>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=g>>>0;q[a+8>>2]=q[a+8>>2]+16;mj(k);Ii=b+112|0;return 1}function b5(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;e=Ii-1056|0;Ii=e;if(q[63996]==(b|0)){g=q[c+24>>2];h=q[c+8>>2];vj(a,0,0);b=q[c>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,126983);b=q[c+36>>2];a:{if(b){b:{if(q[c>>2]!=200){break b}d=q[c+32>>2];Pj(e+32|0,b,1024);Zk(e+32|0,127170,1024);f=dl(e+32|0,127180);c:{if(!f){break c}g=Kl(g,1,d,f);Kn(f);rk(f);if((d|0)!=(g|0)){q[e+20>>2]=b;q[e+16>>2]=d;Pi(4,127183,127190,e+16|0);break c}if(!hv(b,e+32|0)){break b}q[e+4>>2]=b;q[e>>2]=e+32;Pi(4,127183,127225,e)}Xi(a,126990);Si(a,-2,127019)}Xi(a,q[c+36>>2]);Si(a,-2,127025);break a}bj(a,g,q[c+32>>2]);Si(a,-2,127030)}bj(a,127039,7);vj(a,0,0);b=q[c+16>>2];d:{if(!b){break d}o[(b+h|0)-1|0]=0;d=ko(h,127047,e+32|0);if(!d){break d}while(1){c=gk(d,58);o[c|0]=0;b=d;f=r[b|0];if(f){while(1){f=f<<24>>24;o[b|0]=f-65>>>0<26?f|32:f;f=r[b+1|0];b=b+1|0;if(f){continue}break}}Xi(a,d);o[c|0]=58;while(1){b=r[c+1|0];d=c+1|0;c=d;if((b|0)==32){continue}break}Xi(a,d);Ij(a,-3);d=ko(0,127047,e+32|0);if(d){continue}break}}Ij(a,-3);Ii=e+1056|0;return 0}J(126888,126937,51,126963);G()}function tba(a){var b=0;a:{if(o[a+368|0]&1){break a}b=q[a+356>>2];if(!b){break a}Ni(b)}b:{if(o[a+336|0]&1){break b}b=q[a+324>>2];if(!b){break b}Ni(b)}c:{if(o[a+320|0]&1){break c}b=q[a+308>>2];if(!b){break c}Ni(b)}d:{if(o[a+304|0]&1){break d}b=q[a+284>>2];if(b){Ni(b)}b=q[a+276>>2];if(!b){break d}Ni(b)}e:{if(o[a+272|0]&1){break e}b=q[a+260>>2];if(!b){break e}Ni(b)}f:{if(o[a+256|0]&1){break f}b=q[a+236>>2];if(b){Ni(b)}b=q[a+228>>2];if(!b){break f}Ni(b)}g:{if(o[a+220|0]&1){break g}b=q[a+200>>2];if(b){Ni(b)}b=q[a+192>>2];if(!b){break g}Ni(b)}h:{if(o[a+188|0]&1){break h}b=q[a+168>>2];if(b){Ni(b)}b=q[a+160>>2];if(!b){break h}Ni(b)}i:{if(o[a+156|0]&1){break i}b=q[a+136>>2];if(b){Ni(b)}b=q[a+128>>2];if(!b){break i}Ni(b)}j:{if(o[a+124|0]&1){break j}b=q[a+104>>2];if(b){Ni(b)}b=q[a+96>>2];if(!b){break j}Ni(b)}k:{if(o[a+92|0]&1){break k}b=q[a+72>>2];if(b){Ni(b)}b=q[a+64>>2];if(!b){break k}Ni(b)}l:{if(o[a+60|0]&1){break l}b=q[a+48>>2];if(!b){break l}Ni(b)}m:{if(o[a+44|0]&1){break m}b=q[a+32>>2];if(!b){break m}Ni(b)}n:{if(o[a+28|0]&1){break n}b=q[a+20>>2];if(!b){break n}Ni(b)}return a}function t7(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=0,g=0,h=0;b=Ii-48|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){d=x(fj(a,1));a:{if(d=x(0)){g=x(y(d))>=x(1)?d>x(0)?~~x(A(x(C(x(d*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(d-x(~~d>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;c=~~d>>>0;break a}c=0}d=x(fj(a,2));b:{if(d=x(0)){h=x(y(d))>=x(1)?d>x(0)?~~x(A(x(C(x(d*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(d-x(~~d>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;f=~~d>>>0;break b}f=0}q[b+16>>2]=c;q[b+20>>2]=g;q[b+8>>2]=17;q[b+24>>2]=f;q[b+28>>2]=h;c=q[e+4>>2];c:{if((c|0)!=q[e+8>>2]){q[e+4>>2]=c+40;a=q[b+44>>2];q[c+32>>2]=q[b+40>>2];q[c+36>>2]=a;a=q[b+36>>2];q[c+24>>2]=q[b+32>>2];q[c+28>>2]=a;a=q[b+28>>2];q[c+16>>2]=q[b+24>>2];q[c+20>>2]=a;a=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=a;a=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=a;a=0;break c}q[b>>2]=(q[e+8>>2]-q[e>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+48|0;return a|0}J(115568,115465,478,119531);G()}function Ym(a,b){var c=x(0),d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),w=x(0);e=Ii-144|0;Ii=e;d=_i(a,b,q[210439],0);f=u[d+16>>2];g=u[d>>2];a:{b:{if(g!=g|f!=f){break b}c=u[d+32>>2];if(c!=c){break b}c=u[d+48>>2];if(c!=c){break b}c=u[d+4>>2];if(c!=c){break b}c=u[d+20>>2];if(c!=c){break b}c=u[d+36>>2];if(c!=c){break b}c=u[d+52>>2];if(c!=c){break b}c=u[d+8>>2];if(c!=c){break b}c=u[d+24>>2];if(c!=c){break b}c=u[d+40>>2];if(c!=c){break b}c=u[d+56>>2];if(c!=c){break b}c=u[d+12>>2];if(c!=c){break b}c=u[d+28>>2];if(c!=c){break b}c=u[d+44>>2];if(c!=c){break b}c=u[d+60>>2];if(c==c){break a}}c=u[d+32>>2];h=u[d+48>>2];i=u[d+4>>2];j=u[d+20>>2];k=u[d+36>>2];l=u[d+52>>2];m=u[d+8>>2];n=u[d+24>>2];o=u[d+40>>2];p=u[d+56>>2];r=u[d+12>>2];s=u[d+28>>2];t=u[d+44>>2];w=u[d+60>>2];v[e+16>>3]=f;v[e+128>>3]=w;v[e+120>>3]=t;v[e+112>>3]=s;v[e+104>>3]=r;v[e+96>>3]=p;v[e+88>>3]=o;v[e+80>>3]=n;v[e+72>>3]=m;v[e- -64>>3]=l;v[e+56>>3]=k;v[e+48>>3]=j;v[e+40>>3]=i;v[e+32>>3]=h;v[e+24>>3]=c;v[e+8>>3]=g;q[e>>2]=b;Qi(a,134406,e)}Ii=e+144|0;return d}function Vaa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=Ii-16|0;Ii=g;f=q[a+3476>>2];a:{b:{if(r[a+144|0]==255){c=a+144|0;break b}c=a+292|0;if(r[c|0]==255){d=1;break b}c=a+440|0;if(r[c|0]==255){d=2;break b}c=a+588|0;if(r[c|0]==255){d=3;break b}c=a+736|0;if(r[c|0]==255){d=4;break b}c=a+884|0;if(r[c|0]==255){d=5;break b}c=a+1032|0;if(r[c|0]==255){d=6;break b}c=a+1180|0;if(r[c|0]==255){d=7;break b}c=a+1328|0;if(r[c|0]==255){d=8;break b}c=a+1476|0;if(r[c|0]==255){d=9;break b}c=a+1624|0;if(r[c|0]==255){d=10;break b}c=a+1772|0;if(r[c|0]==255){d=11;break b}c=a+1920|0;if(r[c|0]==255){d=12;break b}c=a+2068|0;if(r[c|0]==255){d=13;break b}c=a+2216|0;if(r[c|0]==255){d=14;break b}c=a+2364|0;if(r[c|0]==255){d=15;break b}q[g>>2]=16;Pi(4,148282,148514,g);break a}c:{d:{e=q[f+4>>2];f=q[f>>2];if((e|0)!=(f|0)){d=w(d,148)+a|0;a=e-f|0;h=(a|0)>-1?a:-1;e=f-e|0;a=w((h|0)<1?h:1,((a|0)<(e|0)?e:a)>>>2|0);e=a>>>0>1?a:1;a=0;while(1){if(q[f+(a<<2)>>2]==(b|0)){break d}a=a+1|0;if((e|0)!=(a|0)){continue}break}}o[c|0]=255;break c}o[c|0]=a;if((a&255)!=255){break a}}J(148417,148471,164,148500);G()}Ii=g+16|0;return d}function s7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0;d=Ii-48|0;Ii=d;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);c=_i(a,-1,q[79180],119558);Ri(a,-2);if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){b=Ym(a,1);e=q[b>>2];f=q[b+4>>2];g=q[b+8>>2];h=q[b+12>>2];i=q[b+16>>2];j=q[b+20>>2];k=q[b+24>>2];l=q[b+28>>2];m=q[b+32>>2];n=q[b+36>>2];o=q[b+40>>2];p=q[b+44>>2];r=q[b+48>>2];s=q[b+52>>2];t=q[b+60>>2];u=q[b+56>>2];b=$i(64);q[b+56>>2]=u;q[b+60>>2]=t;q[b+48>>2]=r;q[b+52>>2]=s;q[b+40>>2]=o;q[b+44>>2]=p;q[b+32>>2]=m;q[b+36>>2]=n;q[b+24>>2]=k;q[b+28>>2]=l;q[b+16>>2]=i;q[b+20>>2]=j;q[b+8>>2]=g;q[b+12>>2]=h;q[b>>2]=e;q[b+4>>2]=f;q[d+16>>2]=b;q[d+20>>2]=0;q[d+8>>2]=8;b=q[c+4>>2];a:{if((b|0)!=q[c+8>>2]){q[c+4>>2]=b+40;a=d;c=q[a+44>>2];q[b+32>>2]=q[a+40>>2];q[b+36>>2]=c;c=q[a+36>>2];q[b+24>>2]=q[a+32>>2];q[b+28>>2]=c;c=q[a+28>>2];q[b+16>>2]=q[a+24>>2];q[b+20>>2]=c;c=q[a+20>>2];q[b+8>>2]=q[a+16>>2];q[b+12>>2]=c;c=q[a+12>>2];q[b>>2]=q[a+8>>2];q[b+4>>2]=c;a=0;break a}q[d>>2]=(q[c+8>>2]-q[c>>2]|0)/40;a=Qi(a,115614,d)}Ii=d+48|0;return a|0}J(115568,115465,478,119531);G()}function m7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0;d=Ii-48|0;Ii=d;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);c=_i(a,-1,q[79180],119558);Ri(a,-2);if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){b=Ym(a,1);e=q[b>>2];f=q[b+4>>2];g=q[b+8>>2];h=q[b+12>>2];i=q[b+16>>2];j=q[b+20>>2];k=q[b+24>>2];l=q[b+28>>2];m=q[b+32>>2];n=q[b+36>>2];o=q[b+40>>2];p=q[b+44>>2];r=q[b+48>>2];s=q[b+52>>2];t=q[b+60>>2];u=q[b+56>>2];b=$i(64);q[b+56>>2]=u;q[b+60>>2]=t;q[b+48>>2]=r;q[b+52>>2]=s;q[b+40>>2]=o;q[b+44>>2]=p;q[b+32>>2]=m;q[b+36>>2]=n;q[b+24>>2]=k;q[b+28>>2]=l;q[b+16>>2]=i;q[b+20>>2]=j;q[b+8>>2]=g;q[b+12>>2]=h;q[b>>2]=e;q[b+4>>2]=f;q[d+16>>2]=b;q[d+20>>2]=0;q[d+8>>2]=7;b=q[c+4>>2];a:{if((b|0)!=q[c+8>>2]){q[c+4>>2]=b+40;a=d;c=q[a+44>>2];q[b+32>>2]=q[a+40>>2];q[b+36>>2]=c;c=q[a+36>>2];q[b+24>>2]=q[a+32>>2];q[b+28>>2]=c;c=q[a+28>>2];q[b+16>>2]=q[a+24>>2];q[b+20>>2]=c;c=q[a+20>>2];q[b+8>>2]=q[a+16>>2];q[b+12>>2]=c;c=q[a+12>>2];q[b>>2]=q[a+8>>2];q[b+4>>2]=c;a=0;break a}q[d>>2]=(q[c+8>>2]-q[c>>2]|0)/40;a=Qi(a,115614,d)}Ii=d+48|0;return a|0}J(115568,115465,478,119531);G()}function Q1(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-32|0;Ii=f;d=q[239672];a:{b:{c:{c=q[a+20>>2];switch(c|0){case 0:break a;case 1:break b;default:break c}}J(210164,210166,559,210183);G()}c=1}g=q[d+16>>2];if(g){Gj(g)}d:{e:{f:{g:{e=s[d+40>>1];h:{if((e|0)==s[d+42>>1]){q[b>>2]=0;q[f>>2]=e;Pi(4,209937,210200,f);c=-3;break h}c=C1(q[d>>2],c,q[a+8>>2],q[a+12>>2],f+28|0);if(c){q[f+16>>2]=c;Pi(4,209937,210296,f+16|0);c=-8;break h}e=q[d+36>>2];if(!e){break g}c=s[d+42>>1];if(c>>>0>=s[d+40>>1]){break f}h=1;p[d+42>>1]=c+1;e=s[e+(c<<1)>>1];c=-8}if(g){Bj(g)}if(h){p[a+24>>1]=s[a+24>>1]+1;c=q[d+20>>2];if(q[d+24>>2]-c>>6>>>0<=e>>>0){break e}d=c+(e<<6)|0;if(s[d+56>>1]!=65535){break d}c=c+(e<<6)|0;p[c+58>>1]=s[a+16>>1];p[d+56>>1]=e;q[c+32>>2]=1056964608;q[c+36>>2]=1056964608;q[c+24>>2]=1065353216;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=1065353216;o[c+60|0]=r[c+60|0]&248;q[d>>2]=q[f+28>>2];a=q[239671];q[c+8>>2]=q[239670];q[c+12>>2]=a;q[b>>2]=d;c=0}Ii=f+32|0;return c}J(211026,210953,151,211033);G()}J(211037,210953,152,211033);G()}J(211004,210835,479,211015);G()}J(210324,210166,585,210183);G()}function Pq(a){var b=0,c=0,d=0,e=0,f=0,g=0;b=-27648;a:{b:{e=q[a+208>>2];switch(e-20|0){case 0:case 2:break b;default:break a}}c=q[a+212>>2];f=q[a+204>>2];d=r[f|0];if(q[a+68>>2]?0:!(d?0:(e|0)==22)){break a}c:{d:{if(!(r[q[a>>2]+184|0]&2)){break d}g=q[a+68>>2];if(!g){break d}if(c>>>0>16384){break a}if(r[g+492|0]!=1){break c}break a}if(c>>>0>16384){break a}}e:{if((e|0)!=22){break e}c=c-4|0;o[f+1|0]=c>>>16;o[q[a+204>>2]+2|0]=c>>>8;o[q[a+204>>2]+3|0]=c;if(r[q[a>>2]+184|0]&2){b=-28928;if(16384-q[a+212>>2]>>>0<8){break a}b=q[a+204>>2];bl(b+12|0,b+4|0,c);q[a+212>>2]=q[a+212>>2]+8;f:{if(d){o[q[a+204>>2]+4|0]=q[q[a+68>>2]+472>>2]>>>8;o[q[a+204>>2]+5|0]=q[q[a+68>>2]+472>>2];b=q[a+68>>2];q[b+472>>2]=q[b+472>>2]+1;break f}o[q[a+204>>2]+4|0]=0;o[q[a+204>>2]+5|0]=0}b=q[a+204>>2];o[b+6|0]=0;o[b+7|0]=0;o[b+8|0]=0;b=q[a+204>>2];c=r[b+1|0]|r[b+2|0]<<8;o[b+9|0]=c;o[b+10|0]=c>>>8;o[b+11|0]=r[b+3|0]}if(!d){break e}Mi[q[q[a+68>>2]+1104>>2]](a,q[a+204>>2],q[a+212>>2])}g:{if(!(!(r[q[a>>2]+184|0]&2)|(q[a+208>>2]==22?!d:0))){b=SR(a);if(!b){break g}break a}b=zu(a,1);if(b){break a}}b=0}return b}function OL(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-48|0;Ii=e;a:{if(!Qj(b,c,q[60044],e+44|0)){f=1;b:{c:{d:{e:{f:{g:{c=q[e+44>>2];switch(q[c>>2]){case 3:break d;case 2:break e;case 1:break f;case 0:break g;default:break b}}if(q[c+8>>2]!=1){f=0;Pi(4,60204,60212,0);break b}break c}if(q[c+8>>2]!=3){f=0;Pi(4,60204,60233,0);break b}if(r[a+17|0]){a=q[c+4>>2];b=q[a+4>>2];c=q[a>>2];u[e+24>>2]=u[a+8>>2];q[e+16>>2]=c;q[e+20>>2]=b;q[d>>2]=0;break b}a=q[c+4>>2];b=q[a+4>>2];c=q[a>>2];u[e+24>>2]=u[a+8>>2];q[e+16>>2]=c;q[e+20>>2]=b;q[d>>2]=0;break b}if(q[c+8>>2]!=2){f=0;Pi(4,60204,60251,0);break b}if(r[a+17|0]){q[d>>2]=0;break b}q[e>>2]=60276;Pi(4,60204,60273,e);break b}b=q[c+8>>2];if(b>>>0<=8){f=0;Pi(4,60204,60310,0);break b}if(r[a+17|0]){q[d>>2]=0;break b}b=b<<1;a=(b>>>0)/3|0;g=$i((a|0)!=(a&1073741823)?-1:a<<2);if(b>>>0>=3){a=a>>>0>1?a:1;i=q[c+8>>2];b=0;while(1){h=w(b>>>1|0,3)+(b&1)|0;if(h>>>0>=i>>>0){break a}u[(b<<2)+g>>2]=u[q[c+4>>2]+(h<<2)>>2];b=b+1|0;if((a|0)!=(b|0)){continue}break}}q[d>>2]=0;Ni(g);break b}q[d>>2]=0}Aj(q[e+44>>2])}Ii=e+48|0;return f}J(60329,60341,53,60369);G()}function H8(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=0,k=0,l=x(0);c=Ii-336|0;Ii=c;e=q[b>>2];a:{b:{d=q[a+80>>2];if(!d){break b}if(!(q[62906]!=(d|0)?q[62876]!=(d|0):0)){if(!q[q[e+304>>2]+2176>>2]){Pi(3,116024,119446,0);q[b+4>>2]=-1;break a}b=dA(c- -64|0);j=q[62876];q[b+112>>2]=q[a+112>>2]+(a+96|0);h=u[a+104>>2];k=q[a+100>>2];q[b+48>>2]=q[a+96>>2];q[b+52>>2]=k;c:{if((d|0)==(j|0)){f=x(1);g=x(1);break c}i=u[a+132>>2];l=u[a+128>>2];f=u[a+136>>2];g=u[a+140>>2]}u[b+64>>2]=l;u[b+76>>2]=g;u[b+72>>2]=f;u[b+68>>2]=i;u[b+56>>2]=h;a=q[e+304>>2];cA(a,q[a+2176>>2],0,0,b);break a}if(q[62934]==(d|0)){b=q[e+304>>2];u[c+48>>2]=u[a+96>>2];u[c+52>>2]=u[a+100>>2];u[c+56>>2]=u[a+104>>2];u[c+32>>2]=u[a+112>>2];u[c+36>>2]=u[a+116>>2];u[c+40>>2]=u[a+120>>2];g=u[a+128>>2];u[c+16>>2]=g;f=u[a+132>>2];u[c+20>>2]=f;h=u[a+136>>2];u[c+24>>2]=h;i=u[a+140>>2];u[c+12>>2]=i;u[c+8>>2]=h;u[c+4>>2]=f;u[c>>2]=g;u[c+28>>2]=i;GH(b,c+48|0,c+32|0,c+16|0,c);break a}if(q[62980]!=(d|0)){break b}Mi[q[74937]](q[q[e+304>>2]+2384>>2],q[a+96>>2],q[a+100>>2]);break a}q[b+4>>2]=Cv(e,2,a)}Ii=c+336|0}function gW(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;i=Ii-80|0;Ii=i;h=-16512;a:{if(!b|q[a+164>>2]!=1){break a}k=q[a+4>>2];if(d){d=d-3|0;b:{if(d>>>0<=5){d=q[(d<<2)+263e3>>2];break b}d=0}if(!d){break a}e=(d?q[d+8>>2]:0)&255}d=q[a+168>>2]-3|0;c:{if(d>>>0<=5){d=q[(d<<2)+263e3>>2];break c}d=0}if(!d){break a}l=(d?q[d+8>>2]:0)&255;j=l<<1;if(j>>>0>k>>>0){break a}g=Ui(g,0,k);n=k-l|0;h=n-2|0;j=j+2>>>0>k>>>0?h:l;m=Mi[b|0](c,i+16|0,j)|0;if(m){h=m-17536|0;break a}m=a+8|0;p=Ql(m);h=g+(h-j|0)|0;o[h|0]=1;s=Ti(h+1|0,i+16|0,j);q[i>>2]=0;q[i+4>>2]=0;q[i+8>>2]=0;d:{h=En(i,d,0);e:{if(h){break e}d=-20736;f:{if(!i){break f}h=q[i>>2];if(!h){break f}d=Mi[q[h+16>>2]](q[i+4>>2])|0}h=d;if(d){break e}d=j+s|0;h=ao(i,d,8);if(h){break e}h=ao(i,f,e);if(h){break e}h=ao(i,i+16|0,j);if(h){break e}e=-20736;g:{if(!i){break g}f=q[i>>2];if(!f){break g}e=Mi[q[f+24>>2]](q[i+4>>2],d)|0}h=e;if(h){break e}e=!(p+7&7);h=Nq(e+g|0,(e^-1)+n|0,d,l,i);if(!h){break d}}ym(i);break a}e=Ql(m);o[g|0]=r[g|0]&255>>>(k<<3|1)-e;o[d+l|0]=188;Mi[q[65677]](i+16|0,0,64)|0;ym(i);h=Eu(a,b,c,g,g)}Ii=i+80|0;return h}function Joa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-96|0;Ii=c;a:{b:{d=q[a+80>>2];b=q[d+36>>2];c:{if((b|0)==q[d+40>>2]){xn(41126,40504,b-q[d+32>>2]>>2);a=-1e3;break c}f=q[a+76>>2];e=q[f>>2];b=$i(40);q[b>>2]=0;q[b+4>>2]=0;q[b+4>>2]=f;q[b>>2]=d;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;g=q[a>>2];q[b+16>>2]=0;q[b+12>>2]=g;g=s[a+92>>1];o[b+22|0]=1;p[b+20>>1]=g;qba(c+8|0);e=q[e+80>>2];if(e>>>0>=8193){break b}q[c+44>>2]=b;q[c+8>>2]=e;q[c+24>>2]=64;q[c+16>>2]=128;q[c+20>>2]=16;q[c+12>>2]=q[d+308>>2];q[c+32>>2]=q[d+296>>2];e=q[d+80>>2];q[c+76>>2]=196;q[c+40>>2]=e;q[c+80>>2]=197;q[c+72>>2]=b;q[c+68>>2]=198;q[c+64>>2]=b;q[c+60>>2]=199;q[c+56>>2]=200;q[c+52>>2]=201;q[c+48>>2]=202;q[c+88>>2]=q[d+316>>2];e=Fba(q[f+92>>2],c+8|0);q[b+8>>2]=e;if(!XK(e,f)){oK(q[b+8>>2]);d:{if(o[b+36|0]&1){break d}a=q[b+24>>2];if(!a){break d}Ni(a)}Ni(b);a=-1e3;break c}q[q[a+88>>2]>>2]=b;a=q[d+36>>2];if((a|0)==q[d+40>>2]){break a}q[d+36>>2]=a+4;q[a>>2]=b;a=0}Ii=c+96|0;return a|0}J(41130,41161,751,41200);G()}J(40939,40745,533,40963);G()}function Iu(a,b){bo(a);q[a>>2]=b;a:{b:{switch(b-1|0){case 0:Ln(a,158224,24,0,0,158256,24,158288,24,158320,24,158352,24);break a;case 1:Ln(a,158384,32,0,0,158416,28,158448,28,158480,28,158512,28);break a;case 2:Ln(a,158544,32,0,0,158576,32,158608,32,158640,32,158672,32);break a;case 3:Ln(a,158704,48,0,0,158752,48,158800,48,158848,48,158896,48);break a;case 4:Ln(a,158944,68,0,0,159024,68,159104,68,159184,68,159264,68);break a;case 9:q[a+100>>2]=1297;Ln(a,159344,24,159368,4,159372,4,159376,24,159408,24,159440,24);break a;case 10:q[a+100>>2]=1298;Ln(a,159472,28,159500,4,159504,4,159520,28,159552,28,159584,32);break a;case 11:q[a+100>>2]=1299;Ln(a,159616,32,159648,4,159652,4,159664,32,159696,32,159728,32);break a;case 5:Ln(a,159760,32,159792,32,159824,32,159856,32,159888,32,159920,32);break a;case 6:Ln(a,159952,48,16e4,48,160048,48,160096,48,160144,48,160192,48);break a;case 7:Ln(a,160240,64,160304,64,160368,64,160432,64,160496,64,160560,64);break a;case 8:q[a+100>>2]=1300;return n0(a);case 12:q[a+100>>2]=1301;return m0(a);default:break b}}bo(a);return-20096}return 0}function Ht(a,b){var c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0,k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=0,s=0;i=q[b+80>>2];j=q[i+3128>>2];b=q[b+140>>2]&32767;if(b>>>0>2]-j>>6>>>0){b=j+(b<<6)|0;l=u[b+32>>2];g=u[b+36>>2];e=u[b+40>>2];h=u[b+16>>2];d=u[b+20>>2];m=u[b+24>>2];f=u[b>>2];n=u[b+4>>2];k=u[b+8>>2];c=u[b+12>>2];o=x(F(x(x(x(x(f*f)+x(n*n))+x(k*k))+x(c*c))));a:{if(o==x(0)){break a}c=u[b+28>>2];p=x(F(x(x(x(x(h*h)+x(d*d))+x(m*m))+x(c*c))));if(p==x(0)){break a}c=u[b+44>>2];c=x(F(x(x(x(x(l*l)+x(g*g))+x(e*e))+x(c*c))));if(c==x(0)){break a}c=x(x(1)/c);e=x(e*c);g=x(g*c);l=x(l*c);c=x(x(1)/p);m=x(m*c);d=x(d*c);h=x(h*c);c=x(x(1)/o);k=x(k*c);n=x(n*c);f=x(f*c)}b=x(x(f+d)+e)f;j=b&(r&i^1);s=d>f;i=b&(i|s);b=b&(s^-1|r);e=x(x((j?x(-e):e)+x((i?x(-f):f)+(b?x(-d):d)))+x(1));d=x(x(x(1)/x(F(e)))*x(.5));c=x(e*d);h=x(x(n-(j?x(-h):h))*d);e=x(x(l-(b?x(-k):k))*d);d=x(x(m-(i?x(-g):g))*d);b:{if(!j){f=d;g=e;e=h;d=c;break b}f=c;g=h}c:{if(!i){h=f;f=g;g=e;e=d;break c}h=g;g=d}u[a+12>>2]=e;u[a+8>>2]=g;u[a+4>>2]=f;u[a>>2]=h;return}J(12419,9962,479,9454);G()}function xN(a){var b=0,c=0,d=0,e=0,f=0,g=0;f=q[a+52>>2];d=q[a+48>>2];c=q[d>>2];e=r[d+50|0];if(e){b=q[c+24>>2];g=q[d+24>>2];while(1){e=e-1|0;q[(w(s[((e<<1)+d|0)+172>>1],12)+b|0)+8>>2]=g;if(e){continue}break}o[d+50|0]=0}kF(d,0,0);e=c;b=q[d+24>>2];a:{if(b+1>>>0<=1073741823){b=Cj(f,q[c+12>>2],q[c+44>>2]<<2,b<<2);break a}b=mk(f)}q[e+12>>2]=b;b=q[d+24>>2];q[c+44>>2]=b;e=c;b:{if(b+1>>>0<=1073741823){b=Cj(f,q[c+20>>2],q[c+48>>2]<<2,b<<2);break b}b=mk(f)}q[e+20>>2]=b;q[c+48>>2]=q[d+24>>2];e=c;b=q[d+40>>2];c:{if(b+1>>>0<=268435455){b=Cj(f,q[c+8>>2],q[c+40>>2]<<4,b<<4);break c}b=mk(f)}q[e+8>>2]=b;q[c+40>>2]=q[d+40>>2];e=c;b=q[d+44>>2];d:{if(b+1>>>0<=1073741823){b=Cj(f,q[c+16>>2],q[c+52>>2]<<2,b<<2);break d}b=mk(f)}q[e+16>>2]=b;q[c+52>>2]=q[d+44>>2];e=c;b=p[d+48>>1];e:{if(b+1>>>0<=357913941){b=Cj(f,q[c+24>>2],w(q[c+56>>2],12),w(b,12));break e}b=mk(f)}q[e+24>>2]=b;q[c+56>>2]=p[d+48>>1];q[c+28>>2]=Cj(f,q[c+28>>2],q[c+36>>2]<<2,r[c+72|0]<<2);q[c+36>>2]=r[c+72|0];q[a+48>>2]=q[d+8>>2];q[f+8>>2]=q[f+8>>2]-32;if(q[a+16>>2]-285>>>0<=1){c=a;a=q[a+24>>2];Go(c,a+16|0,q[a+12>>2])}}function P0(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0;h=Ii-96|0;Ii=h;a:{if(!q[a+84>>2]){i=-20352;break a}i=-19584;if((Jj(d,1)|0)<0){break a}j=a+76|0;if((_j(d,j)|0)>-1){break a}q[h+56>>2]=0;q[h+48>>2]=1;q[h+52>>2]=0;q[h+68>>2]=0;q[h+60>>2]=1;q[h+64>>2]=0;q[h+80>>2]=0;q[h+72>>2]=1;q[h+76>>2]=0;q[h+40>>2]=0;q[h+32>>2]=1;q[h+36>>2]=0;q[h+24>>2]=0;q[h+16>>2]=1;q[h+20>>2]=0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;q[h+88>>2]=0;m=a+40|0;k=h+92|0;l=h+88|0;b:{c:while(1){q[k>>2]=0;l=l+4|0;while(1){i=wy(a,h+32|0,1302,g);if(i){break b}i=Es(a,h+48|0,h+32|0,m,1302,g);if(i){break b}i=gl(b,h+48|0,j);if(i){break b}k=k+4|0;d:{if(Jj(b,0)){i=VB(a,h+16|0,e,f);if(i){break b}i=wy(a,h,1302,g);if(i){break b}i=Wk(c,b,d);if(i){break b}i=Rl(h+16|0,h+16|0,c);if(i){break b}i=Wk(h+16|0,h+16|0,h);if(i){break b}i=Wk(h+32|0,h+32|0,h);if(i){break b}i=Co(c,h+32|0,j);if(i){break b}i=Wk(c,c,h+16|0);if(i){break b}i=gl(c,c,j);if(i){break b}i=0;if(Jj(c,0)){break b}if(q[l>>2]<=10){continue c}break d}if(q[k>>2]<=10){continue}}break}break}i=-19712}nm(h+48|0);ij(h+32|0);ij(h+16|0);ij(h)}Ii=h+96|0;return i}function yJ(a,b,c){var d=0,e=0,f=0;e=Ii-144|0;Ii=e;a:{b:{c:{if((a|0)==(b|0)){break c}if((a+148|0)==(b|0)){d=1;break c}if((a+296|0)==(b|0)){d=2;break c}if((a+444|0)==(b|0)){d=3;break c}if((a+592|0)==(b|0)){d=4;break c}if((a+740|0)==(b|0)){d=5;break c}if((a+888|0)==(b|0)){d=6;break c}if((a+1036|0)==(b|0)){d=7;break c}if((a+1184|0)==(b|0)){d=8;break c}if((a+1332|0)==(b|0)){d=9;break c}if((a+1480|0)==(b|0)){d=10;break c}if((a+1628|0)==(b|0)){d=11;break c}if((a+1776|0)==(b|0)){d=12;break c}if((a+1924|0)==(b|0)){d=13;break c}if((a+2072|0)==(b|0)){d=14;break c}d=15;if((a+2220|0)!=(b|0)){break b}}d:{if((r[b+147|0]>>>7|0)==(c|0)){break d}f=q[a+3464>>2];e:{if(f){if(Mi[f|0](d,c,q[a+3468>>2])|0){break e}c=r[b+144|0];f:{if((c|0)==255){o[e+16|0]=0;break f}f=q[q[210501]+3476>>2];d=q[f>>2];if(c>>>0>=q[f+4>>2]-d>>2>>>0){break a}f=a;a=q[d+(c<<2)>>2];Mi[q[a+16>>2]](f,a,b,e+16|0,128)}q[e>>2]=e+16;Pi(3,148282,148286,e);break d}Pi(3,148282,148348,0)}Daa(a,d,c);o[b+147|0]=r[b+147|0]&127|(c?-128:0)}Ii=e+144|0;return}J(149015,148471,87,149017);G()}J(148934,148471,360,148901);G()}function Cra(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,t=0,u=0,v=0;h=Ii-32|0;Ii=h;q[h+24>>2]=0;a:{b:{if(c){while(1){c:{i=w(k,960)+b|0;d:{if(r[i+957|0]&6?0:!(q[i>>2]|q[i+4>>2])){break d}d=q[a+3180>>2];f=q[a+3176>>2];e=d-f|0;if(!e){break d}l=e>>2;g=l-1|0;if(g>>>0>=l>>>0){break b}d=f-d|0;d=((e|0)<(d|0)?d:e)>>>2|0;e=(e|0)>-1?e:-1;e=w(d,(e|0)<1?e:1);u=e>>>0>1?e:1;e=0;while(1){e:{m=q[(g<<2)+f>>2];o=q[m+84>>2];t=q[o+4>>2];if(t){g=0;n=0;f=0;while(1){j=q[(q[o>>2]+w(g,96)|0)+16>>2];if(!j){break a}d=q[j+72>>2];f:{if(!d){break f}v=q[j+100>>2];q[h+12>>2]=i;q[h+8>>2]=m;q[h+16>>2]=q[j+16>>2];q[h+20>>2]=((n<<2)+m|0)+156&v<<15>>31;d=Mi[d|0](h+8|0)|0;if((d|0)==1){f=d;break f}if((d|0)==-1e3){break c}}n=(p[j+102>>1]&1)+n|0;g=g+1|0;if((t|0)!=(g|0)){continue}break}if((f|0)==1){break e}}f=e+1|0;if((f|0)==(u|0)){break d}d=l-e|0;e=f;g=d-2|0;f=q[a+3176>>2];if(g>>>0>2]-f>>2>>>0){continue}break b}break}f=Ui(i,0,960);p[f+956>>1]=s[f+956>>1]|2048}k=k+1|0;if((k|0)!=(c|0)){continue}}break}}Ii=h+32|0;return}J(12419,9962,479,9454);G()}J(8003,7192,2845,8937);G()}function ov(a){var b=0,c=0,d=0,e=0;b=q[a>>2];d=q[b+8>>2]-q[b+12>>2]>>4;a:{if(q[a+8>>2]==-2){a=0;Pi(3,122749,123591,0);if((d|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123067,122672,1669,123641);G()}c=q[79286];e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;ik(b,-10002);rj(b,-1e4,q[a+4>>2]);if((Vi(b,-1)|0)!=5){Ri(b,-3);a=0;if((d|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123067,122672,1683,123641);G()}c=q[b+8>>2]-q[b+12>>2]>>4;rj(b,c,q[a+12>>2]);if((Vi(b,-1)|0)!=6){Ri(b,-4);a=0;if((d|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123067,122672,1697,123641);G()}rj(b,c,q[a+16>>2]);if(!Vi(b,-1)){Ri(b,-5);a=0;if((d|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123067,122672,1710,123641);G()}ej(b,-1);a=q[79286];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=a|0;q[b+8>>2]=q[b+8>>2]+16;xk(b,-2);pj(b,-10002);if(!zz(b)){Ri(b,-4);a=q[79286];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=a|0;q[b+8>>2]=q[b+8>>2]+16;xk(b,-2);pj(b,-10002);a=0;if((d|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123067,122672,1733,123641);G()}a=1;if((d+4|0)==q[b+8>>2]-q[b+12>>2]>>4){break a}J(123655,122672,1737,123641);G()}return a}function Fj(a,b){var c=0,d=0,e=0,f=0,g=0;a:{b:{c=q[a+1408>>2];if((c|0)>=0){c:{if((b|0)>(c|0)){if((b|0)>=25){break a}if(!c){q[a+1404>>2]=0}while(1){d:{e:{f:{g:{c=r[a+1388|0];if(!c){e=0;f=-1;if(q[a+1396>>2]){break c}d=q[a+1392>>2];if((d|0)==-1){q[a+1400>>2]=q[a+1128>>2]-1;if(!$k(a)){q[a+1396>>2]=1;break c}if(!(o[a+1387|0]&1)){break g}d=q[a+1392>>2]}g=d+1|0;q[a+1392>>2]=g;c=r[(a+d|0)+1132|0];if((c|0)!=255){q[a+1400>>2]=d;q[a+1396>>2]=1}if(q[a+1128>>2]<=(g|0)){q[a+1392>>2]=-1}if(r[a+1388|0]){break f}o[a+1388|0]=c;if(!c){break c}}o[a+1388|0]=c-1;q[a+1412>>2]=q[a+1412>>2]+1;c=q[a+44>>2];h:{if(c){if(c>>>0>=t[a+52>>2]){break e}q[a+44>>2]=c+1;c=r[c|0];break h}c=wj(q[a+32>>2]);if((c|0)==-1){break e}}d=c&255;break d}q[a+112>>2]=32;break c}J(211824,211687,1555,211845);G()}q[a+108>>2]=1;d=0}e=q[a+1408>>2];c=e+8|0;q[a+1408>>2]=c;q[a+1404>>2]=q[a+1404>>2]+(d<(c|0)){continue}break}}if((b|0)>(c|0)){break b}d=q[a+1404>>2];q[a+1404>>2]=d>>>b;f=c-b|0;e=d&(-1<>2]=f}return e}J(211796,211687,1623,211815);G()}return Fj(a,24)+(Fj(a,b-24|0)<<24)|0}function DK(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=x(g);var h=0,i=0,j=x(0);a:{b:{c:{d:{e:{f:{if(b>>>0<2097152){i=a&65535;b=q[75054];if(i>>>0>=t[b+32>>2]){break f}a=q[(s[q[b+28>>2]+(i<<1)>>1]==(a>>>16|0)?q[q[b+24>>2]+(i<<2)>>2]:0)>>2];if(a>>>0<=2){h=q[(a<<2)+94580>>2]}ta(h|0,10241,q[(c<<2)+94384>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break e}}ta(h|0,10240,q[(d<<2)+94384>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break d}}ta(h|0,10242,q[(e<<2)+94416>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}ta(h|0,10243,q[(f<<2)+94416>>2]);c=q[75054];d=s[c+156>>1];if(d&64){a=K()|0;if(a){break b}c=q[75054];d=s[c+156>>1]}g:{if(!(d&1)|g>x(1)^1){break g}j=u[c+152>>2];cc(h|0,34046,x(g>2]!=1){break a}l=q[a+4>>2];if(l-16>>>0>1008){break a}j=q[a+168>>2]-3|0;b:{if(j>>>0<=5){j=q[(j<<2)+263e3>>2];break b}j=0}if(!j){break a}k=(j?q[j+8>>2]:0)&255;m=k<<1;if(m+2>>>0>l>>>0){break a}h=Eu(a,b,c,e,i+80|0);c:{if(h){break c}q[i>>2]=0;q[i+4>>2]=0;q[i+8>>2]=0;h=En(i,j,0);if(h){ym(i);break c}d:{a=i+80|1;b=(i+k|0)+81|0;c=(k^-1)+l|0;h=Nq(a,k,b,c,i);if(!h){h=Nq(b,c,a,k,i);if(!h){break d}}ym(i);break c}ym(i);if(j){h=Mi[q[j+28>>2]](0,0,i+16|0)|0}else{h=-20736}if(h){break c}a=a+k|0;e=r[i+80|0];if(k){b=m|1;h=0;while(1){e=r[a|0]^r[(i+16|0)+h|0]|e;a=a+1|0;h=h+1|0;if((k|0)!=(h|0)){continue}break}a=b+(i+80|0)|0}h=0;j=(l-m|0)-2|0;e:{if(!j){b=0;break e}b=0;c=0;while(1){h=r[a+c|0]|h;b=((h|0-h&128)>>>7^1)+b|0;c=c+1|0;if((j|0)!=(c|0)){continue}break}}h=-16640;a=a+b|0;if(e&255|r[a|0]^1){break c}h=-17408;b=a+1|0;a=((i+80|0)-b|0)+l|0;if(a>>>0>g>>>0){break c}q[d>>2]=a;h=0;if(!a){break c}Ti(f,b,a)}Mi[q[65677]](i+80|0,0,1024)|0;Mi[q[65677]](i+16|0,0,64)|0}Ii=i+1104|0;return h}function bZ(a){var b=0;b=Yj(a,141398,3);o[b+6|0]=1;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141402,5);o[b+6|0]=2;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141408,2);o[b+6|0]=3;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141411,4);o[b+6|0]=4;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141416,6);o[b+6|0]=5;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141423,3);o[b+6|0]=6;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141427,5);o[b+6|0]=7;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141433,3);o[b+6|0]=8;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141437,8);o[b+6|0]=9;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141446,2);o[b+6|0]=10;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141449,2);o[b+6|0]=11;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141452,5);o[b+6|0]=12;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141458,3);o[b+6|0]=13;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141462,3);o[b+6|0]=14;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141466,2);o[b+6|0]=15;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141469,6);o[b+6|0]=16;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141476,6);o[b+6|0]=17;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141483,4);o[b+6|0]=18;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141488,4);o[b+6|0]=19;o[b+5|0]=r[b+5|0]|32;b=Yj(a,141493,5);o[b+6|0]=20;o[b+5|0]=r[b+5|0]|32;a=Yj(a,141499,5);o[a+6|0]=21;o[a+5|0]=r[a+5|0]|32}function jna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;a:{b:{c:{e=q[a>>2];if(e){b=Ui($i(124),0,124);q[b+80>>2]=e;c=q[a+16>>2];d=q[e+8>>2];q[b+84>>2]=jI(d,q[e+12>>2]);if(o[b+12|0]&1){break b}c=c>>>0>>0?c:d;Wi(c,40,b,b+8|0,b+4|0);if(o[b+60|0]&1){break b}Wi(c,48,b+48|0,b+56|0,b+52|0);d=q[b+48>>2];if(c>>>0>(q[b+56>>2]-d|0)/48>>>0){break a}q[b+52>>2]=d+w(c,48);d=q[b+68>>2];if(c>>>0>>0){break c}g=q[b+64>>2];f=Yi(c<<2);q[b+64>>2]=f;f=Ti(f,g,d<<2);q[b+68>>2]=c;if(c>>>0>d>>>0){while(1){q[f+(d<<2)>>2]=d;d=d+1|0;if((c|0)!=(d|0)){continue}break}}Ni(g);if(o[b+28|0]&1){break b}c=s[e+16>>1];Wi(c,304,b+16|0,b+24|0,b+20|0);if(o[b+44|0]&1){break b}Wi(c,4,b+32|0,b+40|0,b+36|0);d=q[b+32>>2];if(c>>>0>q[b+40>>2]-d>>2>>>0){break a}c=c<<2;q[b+36>>2]=c+d;Ui(d,0,c);if(o[b+104|0]&1){break b}c=w(q[e+12>>2],240);Wi(c,1,b+92|0,b+100|0,b+96|0);q[b+88>>2]=Mi[q[74943]](q[q[e+4>>2]+2384>>2],c,0,0);q[b+112>>2]=0;o[b+120|0]=r[b+120|0]&254;q[q[a+12>>2]>>2]=b;return 0}J(46718,46735,90,46781);G()}J(47583,47606,112,47571);G()}J(47496,47132,493,47571);G()}J(47113,47132,506,47188);G()}function rp(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-32|0;Ii=c;Dj(a,b,6);a:{b:{g=q[a+8>>2]-q[a+12>>2]>>4;if((g|0)>-1){d=q[79286];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);c:{if(!$l(a,-1)){e=-2;break c}bj(a,122576,32);e=-2;jl(a,-2);ll(a,-2);if(!Vi(a,-1)){Ri(a,-2);break c}ej(a,-2);Rk(a,1,1);if((Vi(a,-1)|0)!=3){break b}e=-3;h=Mj(a,-1);Ri(a,-3);ej(a,b);d=a;if(y(h)<2147483648){b=~~h}else{b=-2147483648}rj(d,-1e4,b);if((Vi(a,-1)|0)!=5){break c}e=-2;xk(a,-2);f=yj(a,20);Zi(a,-10002,122801);d=qj(a,-1);Ri(a,-2);q[f+4>>2]=b;q[f>>2]=d;q[79288]=q[79288]+1;q[f+8>>2]=In(a,-1e4);q[f+12>>2]=In(a,-2);b=q[79286];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);q[f+16>>2]=In(a,-2)}Ri(a,e);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(g|0)){break a}Ii=c+32|0;return f}q[c+12>>2]=g;q[c+4>>2]=1538;q[c+8>>2]=0;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}J(123491,122672,1558,123522);G()}q[c+28>>2]=a;q[c+24>>2]=g;q[c+20>>2]=1538;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function fF(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{d=q[b+8>>2];if((d|0)!=q[c+8>>2]){break b}c:{switch(d-3|0){case 0:return v[b>>3]>3];case 1:d=q[b>>2];a=d+16|0;c=q[c>>2];e=c+16|0;b=pu(a,e);d:{if(b){break d}d=q[d+12>>2];c=q[c+12>>2];while(1){b=hj(a);if((b|0)==(c|0)){b=0;break d}if((b|0)==(d|0)){b=-1;break d}b=b+1|0;c=c-b|0;d=d-b|0;a=a+b|0;e=b+e|0;b=pu(a,e);if(!b){continue}break}}return b>>>31|0;default:break c}}d=el(a,b,13);if(!q[d+8>>2]){break b}if(!hp(d,el(a,c,13))){break b}g=q[a+32>>2];h=q[d+4>>2];f=q[a+8>>2];e=f;q[e>>2]=q[d>>2];q[e+4>>2]=h;q[e+8>>2]=q[d+8>>2];e=q[b+4>>2];d=q[a+8>>2];q[d+16>>2]=q[b>>2];q[d+20>>2]=e;q[d+24>>2]=q[b+8>>2];d=q[c+4>>2];b=q[a+8>>2];q[b+32>>2]=q[c>>2];q[b+36>>2]=d;q[b+40>>2]=q[c+8>>2];b=q[a+8>>2];if((q[a+28>>2]-b|0)<=48){Mk(a,3);b=q[a+8>>2]}q[a+8>>2]=b+48;Ul(a,b,1);b=q[a+8>>2]-16|0;q[a+8>>2]=b;d=q[b+4>>2];c=q[a+32>>2]+(f-g|0)|0;q[c>>2]=q[b>>2];q[c+4>>2]=d;q[c+8>>2]=q[b+8>>2];e:{f:{a=q[a+8>>2];b=q[a+8>>2];switch(b|0){case 0:break a;case 1:break f;default:break e}}return q[a>>2]!=0}return 1}b=oF(a,b,c)}return b}function RE(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{c:{if(e){while(1){d:{e:{if(e>>>0<=g>>>0){i=0;break e}h=e-g|0;i=0;while(1){if(r[d+g|0]!=32){break e}g=g+1|0;i=i+1|0;if((h|0)!=(i|0)){continue}break}g=e;break d}if((e|0)==(g|0)){g=e;break d}h=d+g|0;f=o[h|0];f:{g:{if(!((f|0)!=13|e-g>>>0<2)){if(r[h+1|0]==10){break f}f=13;if(!i){break g}return-44}if((f|0)==10){break f}h=-44;if(i){break b}if((f|0)==61){f=61;k=k+1|0;if(k>>>0<=2){break g}break b}if((f|0)<0){break b}}h=-44;f=r[(f&255)+160912|0];if((f|0)==127|(f>>>0<64?k:0)){break b}j=j+1|0}g=g+1|0;if(g>>>0>>0){continue}}break}if(j){break c}}q[c>>2]=0;return 0}e=w(j>>>3|0,6)-k+(w(j&7,6)+7>>>3)|0;if(!a|e>>>0>b>>>0){break a}b=a;if(g){h=3;j=0;e=0;while(1){f=r[d|0];i=f-10|0;if(!(1<>>0<=22:0)){i=r[f+160912|0]&63|j<<6;f=h-((f|0)==61)|0;h:{i:{e=e+1|0;if((e|0)==4){e=0;if(!f){h=0;break h}o[b|0]=j>>>10;h=1;if((f|0)==1){break i}h=2;o[b+1|0]=j>>>2;if(f>>>0<3){break i}o[b+2|0]=i;b=b+3|0}h=f;break h}b=b+h|0}j=i}d=d+1|0;g=g-1|0;if(g){continue}break}}q[c>>2]=b-a;h=0}return h}q[c>>2]=e;return-42}function KJ(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{e=b&65535;f=q[a+32>>2];if(e>>>0<(q[a+36>>2]-f|0)/592>>>0){if(s[(w(e,592)+f|0)+568>>1]!=(b>>>16|0)){break b}d=w(e,592)+f|0;if(s[d+570>>1]!=(b&65535)){break a}b=q[d+412>>2];q[d+412>>2]=b&-262145|c<<18&262144;c:{if(!(c&1)|(b>>>4&15)-5>>>0<2){break c}b=w(e,592)+f|0;c=q[b+424>>2];d=q[b+428>>2];d:{e:{b=q[a+132>>2];f:{if(!b){break f}b=q[q[a+128>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break f}g=q[a+136>>2];while(1){h=g+w(b,24)|0;if((c|0)==q[h>>2]&(d|0)==q[h+4>>2]){break e}b=q[h+20>>2];if((b|0)!=-1){continue}break}}b=q[a+164>>2];if(!b){break c}b=q[q[a+160>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break c}a=q[a+168>>2];while(1){g=a+w(b,40)|0;if((c|0)==q[g>>2]&(d|0)==q[g+4>>2]){break d}b=q[g+32>>2];if((b|0)!=-1){continue}break}break c}a=g+w(b,24)|0;if(!q[a+8>>2]){break c}b=w(e,592)+f|0;u[b+64>>2]=s[a+16>>1];u[b+68>>2]=s[a+18>>1];return}c=w(e,592)+f|0;a=a+w(b,40)|0;u[c+64>>2]=t[a+16>>2];u[c+68>>2]=t[a+20>>2]}return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Pi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=Ii-4080|0;Ii=e;a:{b:{if(q[69274]>(a|0)){break b}g=r[266420];if(q[213153]?0:!g){break b}q[e+4076>>2]=d;if(a>>>0>=6){break a}q[e+20>>2]=b;q[e+16>>2]=q[(a<<2)+277100>>2];f=e+80|0;d=sj(f,3984,171525,e+16|0);c:{d:{if(d>>>0>3983){break d}d=Gq(d+f|0,3984-d|0,c,q[e+4076>>2])+d|0;if(d>>>0>3983){break d}d=sj(d+f|0,3984-d|0,171533,0)+d|0;if(d>>>0<3984){break c}}c=q[69273];ou((f-hj(c)|0)+3983|0,c)}o[e+4063|0]=0;c=(d|0)<3983?d:3983;e:{if(!g){break e}f:{if((a&-2)==4){Kl(e+80|0,1,c,q[53736]);break f}Kl(f,1,c,q[53735])}d=q[213155];if(!d){break e}g=q[213149];if((g|0)>33554431){break e}q[213149]=c+g;Kl(f,1,c,d);Kn(q[213155])}if(q[213150]<1){break b}while(1){c=q[213151];q[213151]=c?c:1;if(c){continue}break}if(q[213150]>=1){if(!q[q[213152]+32>>2]){while(1){c=q[213154];q[213154]=c?c:1;if(c){continue}break}d=q[213153];if((d|0)>=1){while(1){c=d-1|0;Mi[q[(c<<2)+852624>>2]](a,b,f);g=(d|0)>1;d=c;if(g){continue}break}}q[e>>2]=f;q[213154]=0}}q[213151]=0}Ii=e+4080|0;return}J(171491,171493,644,171513);G()}function hja(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;c=-13;a:{b:{c:{d:{if(!Qj(q[a+12>>2],q[a+16>>2],q[59608],e+12|0)){Ek(q[a+20>>2],q[q[e+12>>2]+64>>2]);c=q[e+12>>2];b=q[c>>2];if(r[b|0]){Ek(q[a+20>>2],b);c=q[e+12>>2]}d=q[c+8>>2];if(d){b=0;while(1){if(b>>>0>=d>>>0){break d}Ek(q[a+20>>2],q[(q[c+4>>2]+(b<<3)|0)+4>>2]);b=b+1|0;c=q[e+12>>2];d=q[c+8>>2];if(b>>>0>>0){continue}break}}d=q[c+16>>2];if(d){b=0;while(1){if(b>>>0>=d>>>0){break c}Ek(q[a+20>>2],q[(q[c+12>>2]+(b<<3)|0)+4>>2]);b=b+1|0;c=q[e+12>>2];d=q[c+16>>2];if(b>>>0>>0){continue}break}}d=q[c+96>>2];if(d){b=0;while(1){if(b>>>0>=d>>>0){break b}Ek(q[a+20>>2],q[(q[c+92>>2]+(b<<3)|0)+4>>2]);b=b+1|0;c=q[e+12>>2];d=q[c+96>>2];if(b>>>0>>0){continue}break}}d=q[c+104>>2];if(d){b=0;while(1){if(b>>>0>=d>>>0){break a}Ek(q[a+20>>2],q[(q[c+100>>2]+(b<<3)|0)+4>>2]);b=b+1|0;c=q[e+12>>2];d=q[c+104>>2];if(b>>>0>>0){continue}break}}q[q[a+24>>2]>>2]=c;c=0}Ii=e+16|0;return c|0}J(60849,60861,255,60885);G()}J(60849,60861,263,60885);G()}J(60849,60861,307,60885);G()}J(60849,60861,315,60885);G()}function f8(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=Ii-48|0;Ii=c;l=q[a+8>>2]-q[a+12>>2]>>4;a:{e=qj(a,1);f=q[e>>2];if(f){h=Oi(kj(a,2,0));i=Li;b:{c:{if((Vi(a,3)|0)==5){g=yj(a,24);Zi(a,-1e4,118084);xj(a,-2);ej(a,-1);b=In(a,-1e4);Ri(a,-2);q[g+16>>2]=b;q[g+8>>2]=h;q[g+12>>2]=i;q[g>>2]=f;d=e+4|0;b=q[e+28>>2];if((b|0)==((q[e+20>>2]-q[e+12>>2]|0)/40|0)){RI(d,4,b+1|0)}SI(d,h,i,g);ej(a,3);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;if(Hj(a,-2)){while(1){if(!Oj(a,-2)){q[c>>2]=aj(h,i);b=Qi(a,120256,c);break b}d=hl(a,-2);if((d|0)<=0){f=aj(h,i);q[c+20>>2]=d;q[c+16>>2]=f;b=Qi(a,120301,c+16|0);break b}b=d-1|0;j=f;m=h;n=i;d:{if(at(a,-1)){b=b<<2;e=9;g=4;k=Ym(a,-1);break d}e=0;g=1;k=rm(a,-1)}if(Wz(j,m,n,k,g,b,e)){f=aj(h,i);q[c+36>>2]=d;q[c+32>>2]=f;b=Qi(a,120352,c+32|0);break b}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);break c}e:{if(at(a,3)){b=9;d=4;j=Ym(a,3);break e}d=1;j=rm(a,3)}Wz(f,h,i,j,d,0,b)}b=0;if(q[a+8>>2]-q[a+12>>2]>>4!=(l|0)){break a}}Ii=c+48|0;return b|0}J(120163,115465,202,120220);G()}J(115568,115465,257,120220);G()}function CP(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-16|0;Ii=j;i=a+32|0;Jq(a,a+16|0,i,c);e=a+48|0;if((e|0)!=(b|0)){while(1){h=i;i=e;d=q[c>>2];k=q[d+12>>2];a:{if(!k){break a}l=q[i>>2];f=q[d+8>>2];e=0;b:{while(1){if(!dj(l,q[f+(e<<2)>>2])){break b}e=e+1|0;if((k|0)!=(e|0)){continue}break}e=-1}d=q[h>>2];g=0;c:{while(1){if(!dj(d,q[f+(g<<2)>>2])){break c}g=g+1|0;if((k|0)!=(g|0)){continue}break}g=-1}if((e|0)>=(g|0)){break a}q[j+8>>2]=q[i+12>>2];d=q[i+8>>2];q[j>>2]=q[i+4>>2];q[j+4>>2]=d;f=i;while(1){d:{d=h;h=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=h;h=q[d+12>>2];q[f+8>>2]=q[d+8>>2];q[f+12>>2]=h;if((a|0)==(d|0)){d=a;break d}f=q[c>>2];m=q[f+12>>2];if(!m){break d}h=d-16|0;k=q[f+8>>2];e=0;e:{while(1){if(!dj(l,q[k+(e<<2)>>2])){break e}e=e+1|0;if((m|0)!=(e|0)){continue}break}e=-1}f=q[h>>2];g=0;f:{while(1){if(!dj(f,q[k+(g<<2)>>2])){break f}g=g+1|0;if((m|0)!=(g|0)){continue}break}g=-1}f=d;if((e|0)<(g|0)){continue}}break}q[d>>2]=l;h=q[j+4>>2];q[d+4>>2]=q[j>>2];q[d+8>>2]=h;q[d+12>>2]=q[j+8>>2]}e=i+16|0;if((e|0)!=(b|0)){continue}break}}Ii=j+16|0}function iH(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0;h=Ii-48|0;Ii=h;q[e>>2]=0;a:{b:{c:{d:{e:{i=q[a>>2];g=q[i+4>>2];f:{if(!g){break f}g=q[q[i>>2]+(Cza(c,d,g)<<2)>>2];if((g|0)==-1){break f}j=q[i+8>>2];while(1){k=w(g,48)+j|0;if(q[k>>2]==(c|0)&(d|0)==q[k+4>>2]){break e}g=q[k+40>>2];if((g|0)!=-1){continue}break}}c=q[i+24>>2];if((c|0)!=((q[i+16>>2]-q[i+8>>2]|0)/48|0)){break d}q[h>>2]=c;q[h+4>>2]=q[57741];Pi(4,24640,25102,h);a=-11;break a}g:{a=q[a+4>>2];c=q[a+4>>2];h:{if(!c){break h}b=q[(w(g,48)+j|0)+16>>2];f=q[q[a>>2]+((b>>>0)%(c>>>0)<<2)>>2];if((f|0)==-1){break h}a=q[a+8>>2];while(1){c=a+w(f,24)|0;if((b|0)==q[c>>2]){break g}f=q[c+16>>2];if((f|0)!=-1){continue}break}}J(26431,24997,677,26490);G()}a=w(g,48)+j|0;q[a+36>>2]=q[a+36>>2]+1;q[e>>2]=b;break c}c=wm(b,46);if(!c){q[h+16>>2]=b;Pi(3,24640,26514,h+16|0);a=-4;break a}b=c+1|0;c=q[a+5136>>2];if(!c){break b}g=0;while(1){if(dj(b,q[(w(g,40)+a|0)+24>>2])){g=g+1|0;if((c|0)!=(g|0)){continue}break b}break}q[f>>2]=(w(g,40)+a|0)+16}a=0;break a}q[h+32>>2]=b;Pi(4,24640,26569,h+32|0);a=-7}Ii=h+48|0;return a}function gna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=x(0),p=0,s=0,t=0;c=Ii-32|0;Ii=c;d=q[a+4>>2];f=q[d+4>>2]-q[d>>2]|0;b=(f|0)/40|0;a:{g=(q[d+24>>2]-q[d+16>>2]|0)/304|0;e=q[d+112>>2];b:{if(g>>>0>>0){q[c>>2]=g;Pi(3,46815,46823,c);a=-1e3;break b}j=q[d+84>>2];h=q[a+8>>2];if(r[h+20|0]){k9(j,q[h+4>>2])}g=vp(q[h+4>>2],e);e=Ev(q[h+4>>2],232,d);a=g;if(f){l=b>>>0>1?b:1;m=e<<6;f=0;while(1){b=q[d>>2];if((q[d+4>>2]-b|0)/40>>>0<=f>>>0){break a}i=b+w(f,40)|0;c:{if(!(o[i+32|0]&1)){break c}q[72912]=q[72912]+1;q[c+24>>2]=1;q[c+28>>2]=0;q[c+8>>2]=1;q[c+12>>2]=0;b=q[i+20>>2];k=(q[b+4>>2]-q[b>>2]|0)/18568|0;if(!k){break c}e=0;while(1){eI(j,q[i+16>>2],e,c+20|0);b=q[c+20>>2];n=u[b+56>>2];p=q[b+64>>2];s=q[b+48>>2];t=q[b+52>>2];q[a+16>>2]=b;q[a+20>>2]=0;u[a+8>>2]=n;q[a>>2]=s;q[a+4>>2]=t;q[a+28>>2]=q[b+100>>2];q[a+32>>2]=q[q[p>>2]+132>>2];q[a+36>>2]=q[a+36>>2]&-16384|m|16;a=a+48|0;e=e+1|0;if((k|0)!=(e|0)){continue}break}}f=f+1|0;if((l|0)!=(f|0)){continue}break}}up(q[h+4>>2],g,a);a=0}Ii=c+32|0;return a|0}J(47406,47132,479,47417);G()}function yA(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/40|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,40)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+32>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+40;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,40)|0;q[a+20>>2]=q[e+32>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;f=q[d+20>>2];q[e+24>>2]=q[d+16>>2];q[e+28>>2]=f;q[e+32>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,40)|0;f=q[b+32>>2];if((f|0)!=-1){continue}break}q[b+32>>2]=(e-d|0)/40;break a}J(111571,111167,229,111579);G()}c=q[d+4>>2];a=g+w(f,40)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;b=q[d+20>>2];q[a+24>>2]=q[d+16>>2];q[a+28>>2]=b;b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(111583,111167,537,111645);G()}q[b>>2]=(e-d|0)/40}q[a+24>>2]=q[a+24>>2]+1}function bJ(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/40|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,40)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+32>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+40;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,40)|0;q[a+20>>2]=q[e+32>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;f=q[d+20>>2];q[e+24>>2]=q[d+16>>2];q[e+28>>2]=f;q[e+32>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,40)|0;f=q[b+32>>2];if((f|0)!=-1){continue}break}q[b+32>>2]=(e-d|0)/40;break a}J(201328,201191,229,201336);G()}c=q[d+4>>2];a=g+w(f,40)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;b=q[d+20>>2];q[a+24>>2]=q[d+16>>2];q[a+28>>2]=b;b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(201340,201191,537,201402);G()}q[b>>2]=(e-d|0)/40}q[a+24>>2]=q[a+24>>2]+1}function Z9(a,b){var c=0,d=0,e=0,f=0,g=0;d=q[a+44>>2];if(d){while(1){c=q[q[a+40>>2]+(e<<2)>>2];if((c|0)!=-1){while(1){c=q[a+48>>2]+w(c,968)|0;a:{b:{if(u[c+8>>2]!=x(0)){break b}d=s[c+952>>1];if(d&96|d&1052|(q[c+796>>2]|q[c+532>>2]>0)){break b}if(q[c>>2]|q[c+4>>2]){break a}if(q[c+28>>2]|d&512){break b}if(!q[c+32>>2]){break a}}Mi[12](q[c>>2],q[c+4>>2],c+8|0,b)}c=q[c+960>>2];if((c|0)!=-1){continue}break}d=q[a+44>>2]}e=e+1|0;if(e>>>0>>0){continue}break}}c=q[a+12>>2];d=q[a+16>>2];if((c|0)!=(d|0)){while(1){f=q[(g<<2)+c>>2];c:{if(!f){break c}e=q[f+312>>2];if(!e){break c}d=0;while(1){c=q[q[f+308>>2]+(d<<2)>>2];if((c|0)!=-1){while(1){c=q[f+316>>2]+w(c,968)|0;d:{e:{if(u[c+8>>2]!=x(0)){break e}e=s[c+952>>1];if(e&96|e&1052|(q[c+796>>2]|q[c+532>>2]>0)){break e}if(q[c>>2]|q[c+4>>2]){break d}if(q[c+28>>2]|e&512){break e}if(!q[c+32>>2]){break d}}Mi[12](q[c>>2],q[c+4>>2],c+8|0,b)}c=q[c+960>>2];if((c|0)!=-1){continue}break}e=q[f+312>>2]}d=d+1|0;if(e>>>0>d>>>0){continue}break}c=q[a+12>>2];d=q[a+16>>2]}g=g+1|0;if(g>>>0>2>>>0){continue}break}}}function Yx(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=Ii-208|0;Ii=e;q[e+8>>2]=1;q[e+12>>2]=0;a:{i=w(b,c);if(!i){break a}q[e+16>>2]=c;q[e+20>>2]=c;j=0-c|0;b=c;h=b;g=2;while(1){f=b;b=(c+h|0)+b|0;q[(e+16|0)+(g<<2)>>2]=b;g=g+1|0;h=f;if(b>>>0>>0){continue}break}f=(a+i|0)+j|0;b:{if(f>>>0<=a>>>0){g=1;b=1;break b}g=1;b=1;while(1){c:{if((g&3)==3){Rx(a,c,d,b,e+16|0);uu(e+8|0,2);b=b+2|0;break c}h=b-1|0;d:{if(t[(e+16|0)+(h<<2)>>2]>=f-a>>>0){mu(a,c,d,e+8|0,b,0,e+16|0);break d}Rx(a,c,d,b,e+16|0)}if((b|0)==1){vu(e+8|0,1);b=0;break c}vu(e+8|0,h);b=1}g=q[e+8>>2]|1;q[e+8>>2]=g;a=a+c|0;if(f>>>0>a>>>0){continue}break}}mu(a,c,d,e+8|0,b,0,e+16|0);while(1){e:{f:{g:{if(!((b|0)!=1|(g|0)!=1)){if(q[e+12>>2]){break g}break a}if((b|0)>1){break f}}h=e+8|0;f=zza(q[e+8>>2]-1|0);if(!f){f=zza(q[e+12>>2]);f=f?f+32|0:0}uu(h,f);g=q[e+8>>2];b=b+f|0;break e}vu(e+8|0,2);q[e+8>>2]=q[e+8>>2]^7;uu(e+8|0,1);h=a+j|0;f=b-2|0;mu(h-q[(e+16|0)+(f<<2)>>2]|0,c,d,e+8|0,b-1|0,1,e+16|0);vu(e+8|0,1);g=q[e+8>>2]|1;q[e+8>>2]=g;mu(h,c,d,e+8|0,f,1,e+16|0);b=f}a=a+j|0;continue}}Ii=e+208|0}function SI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/40|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,40)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+32>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+40;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,40)|0;q[a+20>>2]=q[e+32>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;f=q[d+20>>2];q[e+24>>2]=q[d+16>>2];q[e+28>>2]=f;q[e+32>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,40)|0;f=q[b+32>>2];if((f|0)!=-1){continue}break}q[b+32>>2]=(e-d|0)/40;break a}J(120563,120426,229,120571);G()}c=q[d+4>>2];a=g+w(f,40)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;b=q[d+20>>2];q[a+24>>2]=q[d+16>>2];q[a+28>>2]=b;b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(120575,120426,537,120637);G()}q[b>>2]=(e-d|0)/40}q[a+24>>2]=q[a+24>>2]+1}function HL(a,b,c,d,e){var f=0,g=0;f=Ii-48|0;Ii=f;g=-13;a:{b:{c:{if(!Qj(b,c,q[62852],f+44|0)){g=ak(a,q[q[f+44>>2]>>2],e+28|0);d:{if(g){break d}b=q[e+24>>2];e:{if(!b){if(!lt(a,q[q[f+44>>2]>>2],f+8|0)){b=q[f+12>>2];q[e+16>>2]=q[f+8>>2];q[e+20>>2]=b}q[e+24>>2]=r8(d,q[e+28>>2]);break e}q[b+308>>2]=q[e+28>>2];M8(q[e+24>>2])}if(o[e+12|0]&1){break c}Wi(q[q[f+44>>2]+8>>2],4,e,e+8|0,e+4|0);g=q[f+44>>2];d=q[g+8>>2];f:{if(!d){break f}b=0;while(1){if(b>>>0>=d>>>0){break a}if(ak(a,q[(q[g+4>>2]+(b<<3)|0)+4>>2],f+8|0)){break f}c=q[e+4>>2];if((c|0)==q[e+8>>2]){break b}d=q[f+8>>2];q[e+4>>2]=c+4;q[c>>2]=d;b=b+1|0;g=q[f+44>>2];d=q[g+8>>2];if(b>>>0>>0){continue}break}}g=-11;a=q[e+4>>2];if((a|0)!=q[e+8>>2]){break d}g=0;c=q[e>>2];if((a|0)==(c|0)){break d}b=0;while(1){a=q[f+44>>2];if(t[a+8>>2]<=b>>>0){break a}Q8(q[e+24>>2],q[q[a+4>>2]+(b<<3)>>2],q[q[(b<<2)+c>>2]>>2]);b=b+1|0;c=q[e>>2];if(b>>>0>2]-c>>2>>>0){continue}break}}Aj(q[f+44>>2])}Ii=f+48|0;return g}J(63629,63704,493,63760);G()}J(63772,63704,533,63796);G()}J(63553,63565,46,63618);G()}function Cr(a,b,c,d){var e=0,f=0,g=0;e=Ii-128|0;Ii=e;a:{f=s[b+576>>1];if((f|0)!=65535){g=q[a+32>>2];if((q[a+36>>2]-g|0)/592>>>0<=f>>>0){break a}sK(a,w(f,592)+g|0,e- -64|0)}if(!(!(o[a+390|0]&1)|q[a+352>>2]==2?!(r[b+414|0]&64):0)){Uv(a,b)}u[d>>2]=u[b+320>>2];u[d+4>>2]=u[b+324>>2];u[d+8>>2]=u[b+328>>2];u[d+12>>2]=u[b+332>>2];u[d+16>>2]=u[b+336>>2];u[d+20>>2]=u[b+340>>2];u[d+24>>2]=u[b+344>>2];u[d+28>>2]=u[b+348>>2];u[d+32>>2]=u[b+352>>2];u[d+36>>2]=u[b+356>>2];u[d+40>>2]=u[b+360>>2];u[d+44>>2]=u[b+364>>2];u[d+48>>2]=u[b+368>>2];u[d+52>>2]=u[b+372>>2];u[d+56>>2]=u[b+376>>2];u[d+60>>2]=u[b+380>>2];uK(b,c,d);if(s[b+576>>1]!=65535){_k(e,e- -64|0,d);u[d>>2]=u[e>>2];u[d+4>>2]=u[e+4>>2];u[d+8>>2]=u[e+8>>2];u[d+12>>2]=u[e+12>>2];u[d+16>>2]=u[e+16>>2];u[d+20>>2]=u[e+20>>2];u[d+24>>2]=u[e+24>>2];u[d+28>>2]=u[e+28>>2];u[d+32>>2]=u[e+32>>2];u[d+36>>2]=u[e+36>>2];u[d+40>>2]=u[e+40>>2];u[d+44>>2]=u[e+44>>2];u[d+48>>2]=u[e+48>>2];u[d+52>>2]=u[e+52>>2];u[d+56>>2]=u[e+56>>2];u[d+60>>2]=u[e+60>>2]}Ii=e+128|0;return}J(201665,201514,479,201676);G()}function $A(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{if((e|0)==65535){f=0}else{f=q[c>>2];if((q[c+4>>2]-f|0)/24>>>0<=e>>>0){break a}f=f+w(e,24)|0}b:{c:{if((b|0)!=65535){l=f?f+4|0:0;while(1){g=b&65535;f=q[a+32>>2];if(g>>>0>=(q[a+36>>2]-f|0)/592>>>0){break a}f=f+w(g,592)|0;g=q[f+412>>2];d:{if(!(g&1048576)){break d}e:{switch(g>>>24&3){case 2:g=q[c+4>>2];i=q[c>>2];k=g-i|0;h=(k|0)/24|0;j=h+1|0;if(j>>>0>(q[c+8>>2]-i|0)/24>>>0){break c}q[c+4>>2]=w(j,24)+i;if(!j){break b}p[g+18>>1]=65535;p[g+16>>1]=e;p[g+20>>1]=b;q[g+8>>2]=-1;q[g+12>>2]=-1;p[f+586>>1]=h;if(r[f+415|0]&8){BJ(f,g,g+4|0,l,s[d+8>>1],0,0,s[d+4>>1]);p[d+8>>1]=s[d+8>>1]+1;$A(a,s[f+578>>1],c,d,h&65535);break d}if(s[d>>1]==65535){b=d}else{b=s[d+2>>1];if(b>>>0>=(k+24|0)/24>>>0){break a}b=(w(b,24)+i|0)+18|0}p[b>>1]=h;p[d+2>>1]=h;p[d+6>>1]=s[d+6>>1]+1;break d;case 0:break e;default:break d}}p[f+586>>1]=e;$A(a,s[f+578>>1],c,d,e)}b=s[f+574>>1];if((b|0)!=65535){continue}break}}return}J(202185,201514,506,202204);G()}J(201503,201514,435,201570);G()}J(201665,201514,479,201676);G()}function JF(a,b,c,d,e){var f=x(0),g=x(0),h=0,i=x(0),j=x(0),k=0;if(!(a&3)){if((a|0)>=4){k=a>>>2|0;a=(c<<2)+b|0;d=a+(d<<2)|0;while(1){b=d-4|0;g=u[b>>2];i=u[a>>2];j=u[d>>2];u[a>>2]=i+j;c=a-4|0;f=u[c>>2];u[c>>2]=f+u[b>>2];i=x(i-j);f=x(f-g);u[d>>2]=x(i*u[e>>2])-x(f*u[e+4>>2]);u[b>>2]=x(f*u[e>>2])+x(i*u[e+4>>2]);b=d-12|0;i=u[b>>2];c=a-8|0;f=u[c>>2];h=c;c=d-8|0;j=u[c>>2];u[h>>2]=f+j;h=a-12|0;g=u[h>>2];u[h>>2]=g+u[b>>2];f=x(f-j);g=x(g-i);u[c>>2]=x(f*u[e+32>>2])-x(g*u[e+36>>2]);u[b>>2]=x(g*u[e+32>>2])+x(f*u[e+36>>2]);b=d-20|0;i=u[b>>2];c=a-16|0;f=u[c>>2];h=c;c=d-16|0;j=u[c>>2];u[h>>2]=f+j;h=a-20|0;g=u[h>>2];u[h>>2]=g+u[b>>2];f=x(f-j);g=x(g-i);u[c>>2]=x(f*u[e+64>>2])-x(g*u[e+68>>2]);u[b>>2]=x(g*u[e+64>>2])+x(f*u[e+68>>2]);b=d-28|0;i=u[b>>2];c=a-24|0;f=u[c>>2];h=c;c=d-24|0;j=u[c>>2];u[h>>2]=f+j;h=a-28|0;g=u[h>>2];u[h>>2]=g+u[b>>2];f=x(f-j);g=x(g-i);u[c>>2]=x(f*u[e+96>>2])-x(g*u[e+100>>2]);u[b>>2]=x(g*u[e+96>>2])+x(f*u[e+100>>2]);d=d-32|0;a=a-32|0;e=e+128|0;b=(k|0)>1;k=k-1|0;if(b){continue}break}}return}J(213120,211687,2414,213133);G()}function Hy(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-1088|0;Ii=c;d=q[a+8>>2]-q[a+12>>2]>>4;q[c+56>>2]=0;f=d+1|0;a:{b:{c:{d:{if(!b){bj(a,143356,6);d=q[53734];q[c+60>>2]=d;break d}q[c+48>>2]=b;Lj(a,143363,c+48|0);d=dl(b,143367);q[c+60>>2]=d;if(d){break d}b=ql(q[240513]);d=uj(a,f,0);q[c+40>>2]=b;q[c+32>>2]=143369;q[c+36>>2]=d+1;Lj(a,143389,c+32|0);break c}e:{e=wj(d);if((e|0)==35){q[c+56>>2]=1;f:{while(1){g:{switch(wj(d)+1|0){case 0:break g;case 11:break f;default:continue}}break}g=(b|0)!=0;e=-1;break e}e=wj(d)}g=(b|0)!=0;if(!b|(e|0)!=27){break e}d=S$(b,d);q[c+60>>2]=d;if(d){while(1){e=wj(d);if((e|0)!=-1?(e|0)!=27:0){continue}break}q[c+56>>2]=0;g=1;break e}b=ql(q[240513]);d=uj(a,f,0);q[c+8>>2]=b;q[c>>2]=143377;q[c+4>>2]=d+1;Lj(a,143389,c);break c}PC(e,d);d=Dy(a,1074,c+56|0,uj(a,-1,0));e=q[c+60>>2];b=e;h:{if(q[b+76>>2]<=-1){b=q[b>>2];break h}b=q[b>>2]}b=b>>>5&1;if(g){rk(e)}if(!b){break b}Ri(a,f);b=ql(q[240513]);d=uj(a,f,0);q[c+24>>2]=b;q[c+16>>2]=143384;q[c+20>>2]=d+1;Lj(a,143389,c+16|0)}ll(a,f);d=6;break a}ll(a,f)}Ii=c+1088|0;return d}function Ou(a,b){var c=0,d=0;a:{b:{c:{d:{if((b|0)>=1){c=(q[a+12>>2]+(b<<4)|0)-16|0;c=c>>>0>2]?c:141056;break d}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break d}e:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break d;case 1:c=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=c;c=a+88|0;break d;case 0:c=a+72|0;break d;default:break e}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}switch(q[c+8>>2]-2|0){case 3:case 4:case 6:break c;case 0:case 5:break b;default:break a}}return q[c>>2]}f:{g:{h:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break h}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break h}i:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break h;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break h;case 0:c=a+72|0;break h;default:break i}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}a=c;switch(q[a+8>>2]-2|0){case 0:break f;case 5:break g;default:break a}}return q[a>>2]+32|0}d=q[a>>2]}return d}function Ska(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;a:{b:{c:{e=q[a+4>>2];b=q[e+4>>2];d:{e:{if(!b){d=1;c=q[e>>2];if(o[c+28|0]&1){break e}break d}d=1;c=b;if(!(o[b+28|0]&1)){break d}}h=q[a>>2];a=q[c+12>>2];d=q[c+16>>2];if((a|0)!=(d|0)){b=0;while(1){cj(h,q[(b<<2)+a>>2]);b=b+1|0;a=q[c+12>>2];if(b>>>0>2]-a>>2>>>0){continue}break}d=a;b=q[e+4>>2]}q[c+16>>2]=d;d=1;b=b?b:q[e>>2];if(o[b+24|0]&1){break c}g=q[b+8>>2];Wi(q[g+8>>2],4,b+12|0,b+20|0,b+16|0);c=q[g+8>>2];if(!c){break d}i=b;a=b;b=0;while(1){if(b>>>0>=c>>>0){break b}d=q[(q[g+4>>2]+w(b,80)|0)+4>>2];if(d){if(ak(h,d,f+12|0)){c=q[e+4>>2];if(!c){c=q[e>>2]}a=q[c+12>>2];if((a|0)!=q[c+16>>2]){b=0;while(1){cj(h,q[(b<<2)+a>>2]);b=b+1|0;a=q[c+12>>2];if(b>>>0>2]-a>>2>>>0){continue}break}q[c+16>>2]=a}d=0;break d}c=q[a+16>>2];if((c|0)==q[i+20>>2]){break a}d=q[f+12>>2];q[a+16>>2]=c+4;q[c>>2]=d;c=q[g+8>>2]}d=1;b=b+1|0;if(c>>>0>b>>>0){continue}break}}Ii=f+16|0;return d|0}J(34903,34820,493,34978);G()}J(34725,34737,244,34798);G()}J(34990,34820,533,35014);G()}function Ima(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0);c=q[a+80>>2];b=q[c+8>>2];if((b|0)==q[c+12>>2]){xn(54743,54751,b-q[c+4>>2]>>2);return-1e3}a:{b:{if(!q[c+36>>2]){if(o[c+32|0]&1){break b}Wi(4,304,c+20|0,c+28|0,c+24|0);d=q[q[c>>2]+2384>>2];b=qq(d);tm(b,55491,3,0);tm(b,55500,2,0);q[c+36>>2]=Mi[q[74954]](d,b);um(b);q[c+40>>2]=Mi[q[74943]](q[q[c>>2]+2384>>2],0,0,0);b=w(q[c+60>>2],120);d=Yi(b);q[c+44>>2]=d;q[c+48>>2]=b+d}d=q[a+76>>2];b=$i(176);q[b+96>>2]=0;q[b+100>>2]=0;q[b+144>>2]=0;q[b+148>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;q[b+120>>2]=0;q[b+124>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+152>>2]=0;q[b+156>>2]=0;q[b+136>>2]=0;q[b+96>>2]=q[a>>2];q[b+156>>2]=d;d=q[a+20>>2];e=q[a+16>>2];u[b+8>>2]=u[a+24>>2];q[b>>2]=e;q[b+4>>2]=d;u[b+16>>2]=u[a+32>>2];u[b+20>>2]=u[a+36>>2];u[b+24>>2]=u[a+40>>2];f=u[a+44>>2];o[b+166|0]=255;u[b+28>>2]=f;if(!tL(b)){return-1e3}d=q[c+8>>2];if((d|0)==q[c+12>>2]){break a}q[c+8>>2]=d+4;q[d>>2]=b;q[q[a+88>>2]>>2]=b;lw(b);return 0}J(55510,55585,493,55641);G()}J(55999,55585,533,56023);G()}function Pka(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Ii-128|0;Ii=d;a:{if(o[a+54|0]&1){g=q[a+48>>2];u[d+48>>2]=u[a>>2];f=q[g+4>>2];g=q[f+100>>2];q[d+96>>2]=q[f+96>>2];q[d+100>>2]=g;g=d;e=s[a+52>>1];f=0;b:{if(!e){break b}if(!(e&1)){while(1){h=h+1|0;f=e&2;e=(e&65534)>>>1|0;if(!f){continue}break}}c=(h<<3)+c|0;i=q[c>>2];f=q[c+4>>2]}q[g+104>>2]=i;q[g+108>>2]=f;u[d+64>>2]=u[a+16>>2];u[d+68>>2]=u[a+20>>2];u[d+72>>2]=u[a+24>>2];u[d+80>>2]=u[a+32>>2];u[d+84>>2]=u[a+36>>2];u[d+88>>2]=u[a+40>>2];q[d+112>>2]=r[b+44|0];e=241856;h=d+48|0;a=80;break a}q[d+48>>2]=r[b+44|0];e=241928;h=d+48|0;a=4}j=q[e>>2];c=j;i=q[c+8>>2];f=q[c+12>>2];e=q[b+36>>2];g=d+40|0;c=g;q[c>>2]=0;q[c+4>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;c=q[q[e+80>>2]+8>>2];c:{if(!c){break c}c=q[c>>2];if(!c){break c}k=q[c+3216>>2];l=q[c+3220>>2]}q[d+16>>2]=k;q[d+20>>2]=l;c=q[e+100>>2];q[d+32>>2]=q[e+96>>2];q[d+36>>2]=c;e=to(e,s[b+46>>1],g);d:{if(!e){e=vk(0,d+16|0,i,f,0,j,h,a);if(!e){break d}}q[d>>2]=e;Pi(4,37377,38519,d)}Ii=d+128|0}function Rs(a,b){var c=0,d=0,e=0,f=0,g=0;a:{b:{c:{switch(q[b+8>>2]){case 4:b=q[b>>2];a=q[a+16>>2]+((q[b+8>>2]&(-1<>2]!=4|(b|0)!=q[a+16>>2])){return a}a=q[a+28>>2];if(a){continue}break}break a;case 3:d=v[b>>3];d:{if(y(d)<2147483648){c=~~d;break d}c=-2147483648}f=+(c|0);if(f==d){b=c-1|0;if(b>>>0>2]){return q[a+12>>2]+(b<<4)|0}if(c){e=q[a+16>>2];Oza(+f);c=Lza(1)|0;b=Lza(0)|0;c=b+c|0;a=((c>>>0)%((-1<>>0)<<5)+e|0}else{a=q[a+16>>2]}while(1){if(!(q[a+24>>2]!=3|v[a+16>>3]!=f)){return a}a=q[a+28>>2];if(a){continue}break}break a}c=q[a+16>>2];if(d==0){break b}g=q[a+16>>2];Oza(+d);e=Lza(1)|0;c=Lza(0)|0;e=c+e|0;c=((e>>>0)%((-1<>>0)<<5)+g|0;break b;case 1:c=q[a+16>>2]+((q[b>>2]&(-1<>2]+(t[b>>2]%((-1<>>0)<<5)|0;break b;case 0:break a;default:break c}}c=q[a+16>>2]+(t[b>>2]%((-1<>>0)<<5)|0}a=c;while(1){if(hp(a+16|0,b)){return a}a=q[a+28>>2];if(a){continue}break}}return 141056}function sK(a,b,c){var d=0,e=0,f=0;d=Ii-128|0;Ii=d;a:{e=s[b+576>>1];if((e|0)!=65535){f=q[a+32>>2];if((q[a+36>>2]-f|0)/592>>>0<=e>>>0){break a}sK(a,w(e,592)+f|0,d- -64|0)}if(!(!(o[a+390|0]&1)|q[a+352>>2]==2?!(r[b+414|0]&64):0)){Uv(a,b)}u[c>>2]=u[b+320>>2];u[c+4>>2]=u[b+324>>2];u[c+8>>2]=u[b+328>>2];u[c+12>>2]=u[b+332>>2];u[c+16>>2]=u[b+336>>2];u[c+20>>2]=u[b+340>>2];u[c+24>>2]=u[b+344>>2];u[c+28>>2]=u[b+348>>2];u[c+32>>2]=u[b+352>>2];u[c+36>>2]=u[b+356>>2];u[c+40>>2]=u[b+360>>2];u[c+44>>2]=u[b+364>>2];u[c+48>>2]=u[b+368>>2];u[c+52>>2]=u[b+372>>2];u[c+56>>2]=u[b+376>>2];u[c+60>>2]=u[b+380>>2];if(s[b+576>>1]!=65535){_k(d,d- -64|0,c);u[c>>2]=u[d>>2];u[c+4>>2]=u[d+4>>2];u[c+8>>2]=u[d+8>>2];u[c+12>>2]=u[d+12>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+28>>2]=u[d+28>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];u[c+44>>2]=u[d+44>>2];u[c+48>>2]=u[d+48>>2];u[c+52>>2]=u[d+52>>2];u[c+56>>2]=u[d+56>>2];u[c+60>>2]=u[d+60>>2]}Ii=d+128|0;return}J(201665,201514,479,201676);G()}function mC(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;g=Ii-32|0;Ii=g;e=d&2147483647;h=e;f=e-1006698496|0;e=e-1140785152|0;i=c;a:{if((f|0)==(e|0)&c>>>0>c>>>0|e>>>0>f>>>0){e=d<<4|c>>>28;c=c<<4|b>>>28;b=b&268435455;h=b;if((b|0)==134217728&a>>>0>=1|b>>>0>134217728){e=e+1073741824|0;a=c+1|0;e=a>>>0<1?e+1|0:e;f=a;break a}f=c;e=e+1073741824|0;if(a|h^134217728){break a}b=c&1;a=b+f|0;e=a>>>0>>0?e+1|0:e;f=a;break a}if(!(!i&(h|0)==2147418112?!(a|b):h>>>0<2147418112)){f=c;c=d<<4|c>>>28;f=f<<4|b>>>28;e=c&524287|2146959360;break a}f=0;e=2146435072;if(h>>>0>1140785151){break a}e=0;h=h>>>16|0;if(h>>>0<15249){break a}e=d&65535|65536;vm(g+16|0,a,b,c,e,h-15233|0);Xr(g,a,b,c,e,15361-h|0);e=q[g+4>>2];h=e;a=q[g+8>>2];c=q[g+12>>2]<<4|a>>>28;f=a<<4|e>>>28;e=c;a=h&268435455;c=a;b=q[g>>2]|((q[g+16>>2]|q[g+24>>2])!=0|(q[g+20>>2]|q[g+28>>2])!=0);if((a|0)==134217728&b>>>0>=1|a>>>0>134217728){a=f+1|0;e=a>>>0<1?e+1|0:e;f=a;break a}if(b|c^134217728){break a}a=f+(f&1)|0;e=a>>>0>>0?e+1|0:e;f=a}Ii=g+32|0;Mza(0,f|0);Mza(1,d&-2147483648|e);return+Nza()}function ZL(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{b:{c:{d:{d=s[b+150>>1]&32767;if((d|0)!=32767){e=q[a+1040>>2];c=q[a+1036>>2];while(1){if(e-c>>2>>>0<=d>>>0){break a}f=d<<2;c=q[f+c>>2];e=q[c+136>>2];g=q[c+140>>2];h=q[b+136>>2];if((q[b+140>>2]&32767)!=(e>>>16|0)){break d}p[c+144>>1]=s[c+144>>1];q[c+136>>2]=h&-65536|e&65535;q[c+140>>2]=g;e=q[a+1040>>2];c=q[a+1036>>2];if(e-c>>2>>>0<=d>>>0){break a}d=q[q[c+f>>2]+148>>2]&32767;if((d|0)!=32767){continue}break}}d=s[b+138>>1];if((d|0)!=32767){c=q[a+1040>>2];a=q[a+1036>>2];e=c-a>>2;if(e>>>0<=d>>>0){break a}f=q[a+(d<<2)>>2];c=q[f+148>>2];d=c>>>16&32767;e:{if((d|0)!=32767){while(1){if(d>>>0>=e>>>0){break a}c=q[a+(d<<2)>>2];d=q[c+148>>2]&32767;if((d|0)!=32767){continue}break}a=q[c+148>>2];if((a&32767)!=32767){break c}d=c+148|0;c=a&-32768;a=s[b+150>>1]&32767;break e}if((c&2147418112)!=2147418112){break b}d=f+148|0;c=c&-2147418113;a=q[b+148>>2]&2147418112}q[d>>2]=a|c}return}J(8292,7192,1265,9797);G()}J(9816,7192,1285,9797);G()}J(9864,7192,1290,9797);G()}J(12419,9962,479,9454);G()}function z4(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;q[c+48>>2]=106;q[c+40>>2]=a;q[c+44>>2]=122672;b=q[a+8>>2]-q[a+12>>2]>>4;q[c+56>>2]=1;q[c+52>>2]=b;a:{b:{if((b|0)>-2){Zi(a,-10002,122717);b=qj(a,-1);Ri(a,-2);d=b;b=w(q[b>>2],214013)+2531011|0;q[d>>2]=b;e=+((b>>>16&32767)>>>0)*30517578125e-15;c:{d:{e:{switch(q[a+8>>2]-q[a+12>>2]>>4){case 1:b=jj(a,1);if((b|0)<=0){dk(a,1,123745)}e=C(e*+(b|0))+1;break d;case 0:break d;case 2:break e;default:break c}}b=jj(a,1);d=jj(a,2);if((b|0)>(d|0)){dk(a,2,123745)}e=C(e*+((d-b|0)+1|0))+ +(b|0)}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e;q[a+8>>2]=q[a+8>>2]+16;a=1;b=1;break b}a=Kj(c+40|0,123763,0);b=q[c+56>>2];if((b|0)!=-8388608){break b}break a}q[c+12>>2]=b;q[c+4>>2]=106;q[c+8>>2]=1;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}b=q[c+52>>2]+b|0;d=q[c+40>>2];d=q[d+8>>2]-q[d+12>>2]>>4;if((b|0)==(d|0)){break a}a=q[c+48>>2];q[c+16>>2]=q[c+44>>2];q[c+20>>2]=a;q[c+24>>2]=b;q[c+28>>2]=d;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}Ii=c- -64|0;return a|0}function kI(a,b,c,d){var e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);e=u[d+20>>2];f=u[c+44>>2];g=u[d+16>>2];i=u[c+40>>2];j=u[c+32>>2];h=u[d+24>>2];l=x(x(x(e*f)+x(g*i))-x(j*h));k=u[c+36>>2];n=x(x(h*i)+x(x(e*k)+x(g*j)));m=x(x(x(h*f)+x(e*j))-x(g*k));e=x(x(x(g*f)+x(h*k))-x(e*i));h=x(u[c+24>>2]+x(x(j*l)+x(x(x(i*n)+x(f*m))-x(k*e))));g=x(u[c+20>>2]+x(x(i*e)+x(x(x(f*l)+x(k*n))-x(j*m))));f=x(u[c+16>>2]+x(x(k*m)+x(x(x(f*e)+x(j*n))-x(i*l))));if(!q[c+12>>2]){l=u[b+44>>2];e=x(g*l);g=x(f*l);f=u[b+60>>2];i=u[b+56>>2];j=u[b+52>>2];k=u[b+48>>2];a:{if(o[b+82|0]&1){m=x(x(j*e)+x(k*g));h=x(h*l);l=x(x(x(i*g)+x(f*e))-x(k*h));n=x(x(x(f*h)+x(k*e))-x(j*g));e=x(x(x(f*g)+x(j*h))-x(i*e));g=x(i*h);break a}m=x(x(k*g)+x(j*e));n=x(x(x(h*f)+x(k*e))-x(j*g));l=x(x(x(i*g)+x(f*e))-x(h*k));e=x(x(x(h*j)+x(f*g))-x(i*e));g=x(h*i)}m=x(g+m);h=x(u[b+40>>2]+x(x(k*l)+x(x(x(i*m)+x(f*n))-x(j*e))));g=x(u[b+36>>2]+x(x(i*e)+x(x(x(f*l)+x(j*m))-x(k*n))));f=x(u[b+32>>2]+x(x(j*n)+x(x(x(f*e)+x(k*m))-x(i*l))))}u[a+8>>2]=h;u[a+4>>2]=g;u[a>>2]=f}function Ava(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=Ii-16|0;Ii=e;m=q[a+8>>2]-q[a+12>>2]>>4;q[e+8>>2]=0;j=kj(a,2,e+8|0);k=fo(a,3,1);l=fo(a,4,-1);Yn(q[b+20>>2]);a:{b:{d=q[e+8>>2];i=d+1|0;f=i;if(y(k)<2147483648){c=~~k}else{c=-2147483648}c=(f&c>>31)+c|0;f=(c|0)>1?c:1;n=f;o=d;if(y(l)<2147483648){h=~~l}else{h=-2147483648}c=(i&h>>31)+h|0;d=(c|0)>(d|0)?o:c;if((n|0)>(d|0)){break b}c=d-f|0;d=c+1|0;if(c>>>0>d>>>0){break b}j=(f+j|0)-1|0;i=q[b+20>>2];h=q[b+16>>2];while(1){c:{q[e+12>>2]=0;c=d-g|0;c=Mi[q[h+4>>2]](q[h>>2],g+j|0,c>>>0<8192?c:8192,e+12|0,i)|0;g=q[e+12>>2]+g|0;if(c){break c}if(d>>>0>g>>>0){continue}}break}q[b+8>>2]=q[b+8>>2]+g;if(!c){break b}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;b=q[b+16>>2];Xi(a,Mi[q[b+12>>2]](q[b>>2],c)|0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=(g+f|0)-1>>>0;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=(g+f|0)-1>>>0;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}Ii=e+16|0;return(q[a+8>>2]-q[a+12>>2]>>4)-m|0}function o4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0);c=Ii-96|0;Ii=c;b=Ll(a,1);a:{b:{c:{if((b|0)!=q[210436]){if((b|0)==q[210437]){break c}q[c+92>>2]=134016;q[c+88>>2]=134e3;q[c+84>>2]=135563;q[c+80>>2]=134064;a=Qi(a,135879,c+80|0);break a}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];d:{if(!(e!=e|f!=f)){d=u[b+8>>2];if(d==d){break d}}d=u[b+8>>2];v[c+16>>3]=f;v[c+24>>3]=d;v[c+8>>3]=e;q[c>>2]=1;Qi(a,134131,c);d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}break b}b=_i(a,1,b,0);e=u[b>>2];f=u[b+4>>2];e:{f:{if(e!=e|f!=f){break f}d=u[b+8>>2];if(d!=d){break f}g=u[b+12>>2];if(g==g){break e}}d=u[b+8>>2];g=u[b+12>>2];v[c+48>>3]=f;v[c- -64>>3]=g;v[c+56>>3]=d;v[c+40>>3]=e;q[c+32>>2]=1;Qi(a,134221,c+32|0);d=u[b+8>>2];f=u[b+4>>2];e=u[b>>2]}}b=yj(a,64);q[b+4>>2]=0;q[b+8>>2]=0;q[b>>2]=1065353216;q[b+24>>2]=0;q[b+28>>2]=0;q[b+20>>2]=1065353216;q[b+60>>2]=1065353216;u[b+56>>2]=d;u[b+52>>2]=f;u[b+48>>2]=e;q[b+40>>2]=1065353216;q[b+44>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;Zi(a,-1e4,134048);xj(a,-2);a=1}Ii=c+96|0;return a|0}function nza(){var a=0;q[72188]=Oi(34264);q[72189]=Li;q[72190]=Oi(34283);q[72191]=Li;q[72192]=Oi(34300);q[72193]=Li;q[72194]=Oi(34309);q[72195]=Li;q[72196]=Oi(34315);q[72197]=Li;q[72198]=Oi(34325);q[72199]=Li;q[72200]=Oi(34333);q[72201]=Li;q[72202]=Oi(34340);q[72203]=Li;q[72204]=Oi(34349);q[72205]=Li;q[72206]=Oi(34361);q[72207]=Li;q[72208]=Oi(34370);q[72209]=Li;q[72210]=Oi(34375);q[72211]=Li;q[72212]=Oi(34381);q[72213]=Li;q[72214]=Oi(34387);q[72215]=Li;q[72216]=Oi(34396);q[72217]=Li;q[72220]=Oi(34406);q[72221]=Li;q[72222]=Oi(34415);q[72223]=Li;q[72224]=Oi(34424);q[72225]=Li;q[72226]=Oi(34433);q[72227]=Li;q[72228]=Oi(34442);q[72229]=Li;q[72230]=Oi(34451);q[72231]=Li;q[72232]=Oi(34460);q[72233]=Li;q[72234]=Oi(34469);q[72235]=Li;q[72236]=Oi(34478);q[72237]=Li;a=Oi(34487);q[72257]=0;q[72258]=0;q[72256]=295392;q[72254]=0;q[72252]=34522;q[72251]=34499;q[72250]=0;q[72248]=0;q[72246]=0;q[72244]=0;q[72242]=1;q[72240]=0;q[72241]=3;q[72238]=a;q[72239]=Li;q[72259]=0;q[72260]=0;q[72261]=0;q[72262]=Oi(34563);q[72263]=Li}function kza(){var a=0;q[72482]=Oi(39192);q[72483]=Li;q[72484]=Oi(39211);q[72485]=Li;q[72486]=Oi(39228);q[72487]=Li;q[72488]=Oi(39237);q[72489]=Li;q[72490]=Oi(39243);q[72491]=Li;q[72492]=Oi(39253);q[72493]=Li;q[72494]=Oi(39261);q[72495]=Li;q[72496]=Oi(39268);q[72497]=Li;q[72498]=Oi(39277);q[72499]=Li;q[72500]=Oi(39289);q[72501]=Li;q[72502]=Oi(39298);q[72503]=Li;q[72504]=Oi(39303);q[72505]=Li;q[72506]=Oi(39309);q[72507]=Li;q[72508]=Oi(39315);q[72509]=Li;q[72510]=Oi(39324);q[72511]=Li;q[72512]=Oi(39334);q[72513]=Li;q[72514]=Oi(39343);q[72515]=Li;q[72516]=Oi(39352);q[72517]=Li;q[72518]=Oi(39361);q[72519]=Li;q[72520]=Oi(39370);q[72521]=Li;q[72522]=Oi(39379);q[72523]=Li;q[72524]=Oi(39388);q[72525]=Li;q[72526]=Oi(39397);q[72527]=Li;q[72528]=Oi(39406);q[72529]=Li;a=Oi(39415);q[72549]=0;q[72550]=0;q[72548]=295392;q[72546]=0;q[72544]=39440;q[72543]=39427;q[72542]=0;q[72540]=0;q[72538]=0;q[72536]=0;q[72534]=1;q[72532]=0;q[72533]=3;q[72530]=a;q[72531]=Li;q[72551]=0;q[72552]=0;q[72553]=0;q[72554]=Oi(39471);q[72555]=Li}function _G(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;a:{h=q[a+84>>2];if(!h){break a}i=q[h+4>>2];if(!i){break a}j=q[h>>2];h=0;while(1){k=j+(h<<5)|0;if((b|0)!=q[k>>2]|q[k+4>>2]!=(c|0)){h=h+1|0;if((i|0)!=(h|0)){continue}break a}break}b:{if(!(e>x(0)^1)){u[a+176>>2]=e;q[a+180>>2]=0;i=r[a+186|0];h=i&1;i=i|2;break b}i=r[a+186|0];h=i&1;j=(h<<5)+a|0;o[j+28|0]=r[j+28|0]&254}h=h^1;o[a+186|0]=h|i&254;h=(h<<5)+a|0;q[h>>2]=k;q[h+8>>2]=b;q[h+12>>2]=c;q[h+24>>2]=d;b=r[h+28|0];c=b|1;o[h+28|0]=c;c:{d:{switch(d-2|0){case 0:case 3:o[h+28|0]=b|3;f=f>2];if(d){e=u[d+8>>2];f=x(f*e);e:{if(q[c+24>>2]!=6){break e}d=(b<<5)+a|0;h=r[d+28|0];if(!(h&2)){break e}o[d+28|0]=h&253}f:{if(e>2]=r[a+28|0]&2?x(e-f):f}u[c+20>>2]=g>x(0)?g:x(0);return 0}a=((o[a+186|0]&1)<<5)+a|0;o[a+28|0]=r[a+28|0]&254;return 3}function Xo(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{if(q[c>>2]!=5|q[c+16>>2]!=-1|(q[c+20>>2]!=-1|q[d>>2]!=5)){break c}if(q[d+16>>2]!=-1|q[d+20>>2]!=-1){break c}e=v[d+8>>3];g=v[c+8>>3];d:{e:{f:{switch(b-12|0){case 0:f=g+e;break e;case 1:f=g-e;break e;case 2:f=g*e;break e;case 3:if(e==0){break b}f=g/e;break e;case 4:if(e==0){break b}f=g-e*C(g/e);break e;case 5:f=Up(g,e);break e;case 8:break a;case 6:break f;default:break d}}f=-g}if(f!=f){break c}}v[c+8>>3]=f;return}switch(b-18|0){case 0:case 2:break a;default:break b}}h=Il(a,d)}i=Il(a,c);g:{if((i|0)>(h|0)){h:{if(q[c>>2]!=12){break h}j=q[c+8>>2];if(j&256|r[a+50|0]>(j|0)){break h}q[a+36>>2]=q[a+36>>2]-1}if(q[d>>2]!=12){break g}d=q[d+8>>2];if(d&256|(d|0)>2]=q[a+36>>2]-1;break g}i:{if(q[d>>2]!=12){break i}d=q[d+8>>2];if(d&256|(d|0)>2]=q[a+36>>2]-1}if(q[c>>2]!=12){break g}d=q[c+8>>2];if(d&256|(d|0)>2]=q[a+36>>2]-1}a=fl(a,h<<14|b|i<<23,q[q[a+12>>2]+8>>2]);q[c>>2]=11;q[c+8>>2]=a}function jo(a,b,c){var d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),q=x(0),r=x(0),s=x(0),t=x(0),v=x(0),w=x(0),y=x(0),z=x(0);d=Ii+ -64|0;Ii=d;g=u[b+60>>2];l=u[b+56>>2];m=u[b+52>>2];h=u[b+28>>2];n=u[b+24>>2];o=u[b+20>>2];p=u[b+48>>2];q=u[b+16>>2];r=u[b+12>>2];s=u[b+8>>2];t=u[b+4>>2];v=u[b>>2];i=u[b+32>>2];j=u[b+36>>2];k=u[b+40>>2];f=u[b+44>>2];e=x(x(x(x(i*i)+x(j*j))+x(k*k))+x(f*f));if(!(e>x(0)^1)){e=x(x(1)/x(F(e)));f=x(f*e);k=x(k*e);j=x(j*e);i=x(i*e)}_k(d,b,c);u[a>>2]=u[d>>2];u[a+4>>2]=u[d+4>>2];u[a+8>>2]=u[d+8>>2];u[a+12>>2]=u[d+12>>2];u[a+16>>2]=u[d+16>>2];u[a+20>>2]=u[d+20>>2];u[a+24>>2]=u[d+24>>2];u[a+28>>2]=u[d+28>>2];u[a+32>>2]=u[d+32>>2];u[a+36>>2]=u[d+36>>2];u[a+40>>2]=u[d+40>>2];u[a+44>>2]=u[d+44>>2];e=u[c+48>>2];w=h;h=u[c+52>>2];y=f;f=u[c+56>>2];z=g;g=u[c+60>>2];u[a+60>>2]=x(x(x(r*e)+x(w*h))+x(y*f))+x(z*g);u[a+56>>2]=x(x(x(s*e)+x(n*h))+x(k*f))+x(l*g);u[a+52>>2]=x(x(x(t*e)+x(o*h))+x(j*f))+x(m*g);u[a+48>>2]=x(x(x(v*e)+x(q*h))+x(i*f))+x(p*g);Ii=d- -64|0}function fQ(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;h=Ii-48|0;Ii=h;q[h>>2]=0;q[h+4>>2]=0;q[h+8>>2]=0;j=hj(c);k=j+e|0;l=k+20|0;i=bk(1,l);a:{if(!i){c=-32512;break a}m=Ti(i+20|0,c,j);Ti(j+m|0,d,e);c=-27648;d=q[65750];if(!d){break a}c=En(h,d,1);if(c){break a}j=b+1>>>1|0;ep(h,a,j);il(h,m,k);c=i+4|0;em(h,c);if(g){p=g&15;s=k+16|0;d=0;e=0;while(1){bn(h);il(h,c,s);em(h,h+16|0);bn(h);il(h,c,16);em(h,c);e=e+16|0;n=g>>>0>>0?p:16;if(n){Ti((d<<4)+f|0,h+16|0,n)}d=d+1|0;if(e>>>0>>0){continue}break}}ym(h);c=-27648;d=q[65751];if(!d){break a}c=En(h,d,1);if(c){break a}ep(h,(a+b|0)-j|0,j);il(h,m,k);em(h,i);if(!g){c=0;break a}d=(g>>>0)%20|0;a=0;while(1){bn(h);il(h,i,l);em(h,h+16|0);bn(h);il(h,i,20);em(h,i);c=0;b=a;a=a+20|0;e=g>>>0>>0?d:20;if(e){while(1){k=(b+c|0)+f|0;o[k|0]=r[(h+16|0)+c|0]^r[k|0];c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=0;if(a>>>0>>0){continue}break}}ym(h);Mi[q[65677]](i,0,l)|0;Mi[q[65677]](h+16|0,0,20)|0;Ni(i);Ii=h+48|0;return c|0}function N9(){var a=0,b=0,c=0,d=0,e=0;e=Ii-48|0;Ii=e;a:{if(q[213150]<=0){a=q[213155];if(!a){break a}rk(a);q[213155]=0;break a}d=q[213152];o[e+32|0]=1;a=e;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;b=q[d+24>>2];c=q[d+28>>2];q[a+16>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a>>2]=b;q[a+4>>2]=c;vk(0,a,0,0,0,0,a+32|0,16);q[213150]=0;a=q[d+32>>2];if(a){eG(a)}while(1){a=q[213151];q[213151]=a?a:1;if(a){continue}break}b:{c=q[d+4>>2];a=q[d>>2];b=c-a|0;if(!b){break b}if((a|0)!=(c|0)){c=a-c|0;c=((b|0)<(c|0)?c:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(c,(b|0)<1?b:1);c=b>>>0>1?b:1;b=0;while(1){a=(b<<2)+a|0;qp(q[a>>2]);Cm(q[a>>2]);q[a>>2]=-1;b=b+1|0;if((c|0)==(b|0)){break b}a=q[d>>2];if(q[d+4>>2]-a>>2>>>0>b>>>0){continue}break}}J(172003,171830,479,172014);G()}a=q[d+16>>2];if((a|0)!=-1){Cm(a);q[d+16>>2]=-1}a=q[d+28>>2];b=a;c=q[d+24>>2];if(a|c){Qo(c,b)}c:{if(o[d+12|0]&1){break c}a=q[d>>2];if(!a){break c}Ni(a)}Ni(d);q[213152]=0;a=q[213155];if(a){rk(a);q[213155]=0}q[213151]=0}Ii=e+48|0}function jN(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=3;a:{b:{c:{d:{e:{if(a+1>>>0<2){break e}h=a&65535;g=q[210908];if(h>>>0>=t[g+8>>2]){break d}j=q[q[g>>2]+(h<<2)>>2];if(!j|s[q[g+4>>2]+(h<<1)>>1]!=(a>>>16|0)){break e}m=10;if(!e){break e}h=q[j+8>>2];l=j+12|0;k=q[l>>2];f:{if((h|0)==(k|0)){g=0;break f}a=k-h|0;g=(a|0)>-1?a:-1;i=(g|0)<1?g:1;g=h-k|0;a=w(i,((a|0)<(g|0)?g:a)>>>2|0);i=a>>>0>1?a:1;a=0;while(1){g=q[(a<<2)+h>>2];if(q[g>>2]==(b|0)&q[g+4>>2]==(c|0)){break f}a=a+1|0;if((i|0)!=(a|0)){continue}break}g=0}if(f>>>0>=9){break c}i=w(q[(f<<2)+154632>>2],e);g:{if(g){if(r[g+9|0]!=(e|0)|r[g+8|0]!=(f|0)){break e}Ti(q[g+12>>2],d,i);break g}g=j+16|0;if((k|0)==q[g>>2]){if(o[j+20|0]&1){break b}Wi((k-h>>2)+2|0,4,j+8|0,g,l)}a=Yi(16);o[a+9|0]=e;q[a>>2]=b;q[a+4>>2]=c;o[a+8|0]=f;b=Yi(i);q[a+12>>2]=b;Ti(b,d,i);b=q[l>>2];if((b|0)==q[g>>2]){break a}q[l>>2]=b+4;q[b>>2]=a}m=0}return m}J(154349,154364,144,154402);G()}J(153529,153556,157,153579);G()}J(154516,154323,493,154591);G()}J(154603,154323,533,154627);G()}function sU(a,b){var c=0,d=0;a:{b=dl(b,184635);if(!b){break a}if(Uk(b,0,2)){rk(b);break a}d=pm(b);b:{if(!(q[a+20>>2]|(q[a+72>>2]|!a))){c=q[a+40>>2];if(!c){q[a+40>>2]=1418;c=1418}if(!q[a+44>>2]){q[a+44>>2]=1419}if(!q[a+48>>2]){q[a+48>>2]=1420}q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=0;q[a+20>>2]=1;q[a+8>>2]=0;q[a+12>>2]=0;c=Mi[c|0](q[a+52>>2],1,88)|0;q[a+72>>2]=c;if(c){break b}}rk(b);break a}Ui(c,0,88);c=q[a+72>>2];q[c+12>>2]=1;q[c+44>>2]=4;q[c+28>>2]=4;q[a+56>>2]=1421;q[a+68>>2]=a;q[c+60>>2]=b;q[a>>2]=d;q[a+4>>2]=d>>31;b=1;c:{if(qU(a)){break c}c=q[a+72>>2];if(!c|!q[a+40>>2]){break a}d=q[a+44>>2];if(!d){break a}b=0;if(q[a+20>>2]!=1){break c}q[a+72>>2]=0;Mi[d|0](q[a+52>>2],q[c>>2]);q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;Mi[q[a+44>>2]](q[a+52>>2],q[c+16>>2]);q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;Mi[q[a+44>>2]](q[a+52>>2],q[c+32>>2]);q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;d=q[c+60>>2];if(d){rk(d);q[c+60>>2]=0}Mi[q[a+44>>2]](q[a+52>>2],c);q[a+20>>2]=0}return b}return 0}function sra(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0;g=Ii-32|0;Ii=g;a:{b:{c:{if(d>>>0>=32768){q[g>>2]=32767;Pi(4,7319,7503,g);break c}j=$i(3280);if(!c){break a}l=hsa(j,d,q[c+29104>>2]);q[j+3232>>2]=Wj();f=q[c>>2];d:{if(!f){break d}m=j+12|0;if(!e){while(1){e=w(h,112)+c|0;i=q[e+28>>2];if(i){e=q[e+24>>2];q[g+24>>2]=-1;o[g+12|0]=h;q[g+8>>2]=e;q[g+20>>2]=(h<<2)+m;q[g+16>>2]=d;Mi[i|0](g+8|0)|0;f=q[c>>2]}h=h+1|0;if(h>>>0>>0){continue}break d}}while(1){i=w(h,112)+c|0;n=q[i+28>>2];if(n){f=q[i+24>>2];o[g+12|0]=h;q[g+8>>2]=f;p=q[e+44>>2];f=-1;e:{if(!p){break e}r=q[i+16>>2];i=q[i+20>>2];s=q[e+40>>2];f=0;f:{while(1){k=s+(f<<4)|0;if(q[k>>2]==(r|0)&(i|0)==q[k+4>>2]){break f}f=f+1|0;if((p|0)!=(f|0)){continue}break}f=0;break e}f=q[k+8>>2]}q[g+16>>2]=d;q[g+24>>2]=f;q[g+20>>2]=(h<<2)+m;Mi[n|0](g+8|0)|0;f=q[c>>2]}h=h+1|0;if(h>>>0>>0){continue}break}}q[j+3208>>2]=Oi(a);q[j+3212>>2]=Li;f=$i(4);if(!JB(l,a,b,c,f)){break b}vM(l);Ni(f)}f=0}Ii=g+32|0;return f}J(7178,7192,262,9465);G()}function Gba(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0;k=Ii-32|0;Ii=k;if(f>>>0<=2){j=q[(f<<2)+171240>>2]}else{j=0}j=w(j,w(d,e));a:{if((j|0)!=(i|0)){q[k+4>>2]=i;q[k>>2]=j;Pi(4,199633,199637,k);j=-7;break a}n=a+160|0;b:{c:{d:{e:{f:{g:{h:{j=q[a+164>>2];i:{if(!j){break i}l=q[q[n>>2]+(Cza(b,c,j)<<2)>>2];if((l|0)==-1){break i}m=q[a+168>>2];while(1){j=m+w(l,40)|0;if(q[j>>2]==(b|0)&(c|0)==q[j+4>>2]){break h}l=q[j+32>>2];if((l|0)!=-1){continue}break}}j=-4;if(q[a+184>>2]==((q[a+176>>2]-q[a+168>>2]|0)/40|0)){break a}q[k+8>>2]=0;q[k+12>>2]=0;l=Yi(i);q[k+24>>2]=l;if(!g){break d}j=d;switch(f|0){case 0:break g;case 1:break f;default:break e}}a=m+w(l,40)|0;b=r[a+12|0];j=-6;if(!(b&2)){break a}o[a+12|0]=b&253;break b}j=w(d,3);break e}j=d<<2}if((w(e,j)|0)==(i|0)){if(!e){break c}g=0;m=0-j|0;a=h+i|0;while(1){a=a+m|0;l=Ti(l,a,j)+j|0;g=g+1|0;if((g|0)!=(e|0)){continue}break}break c}Pi(4,199633,201130,0);Ni(l);j=-9;break a}Ti(l,h,i)}q[k+28>>2]=f;q[k+20>>2]=e;q[k+16>>2]=d;bJ(n,b,c,k+8|0)}j=0}Ii=k+32|0;return j}function $4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;Dj(a,1,4);q[b+44>>2]=0;c=uj(a,1,b+44|0);if((f|0)==2){d=(Uj(a,2)|0)!=0}q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;c=baa(c,q[b+44>>2],d,b+24|0);a:{if(!c){c=q[b+32>>2];b:{if(c>>>0<=2){c=q[(c<<2)+171240>>2];break b}c=0}if(!c){tI(b+24|0);q[b>>2]=q[b+32>>2];Qi(a,127566,b)}vj(a,0,0);bj(a,127588,5);d=q[b+24>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,127594,6);d=q[b+28>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,127601,4);c:{d:{switch(q[b+32>>2]){case 1:bj(a,127610,4);break c;case 2:bj(a,127615,1);break c;default:J(127617,127623,134,127647);G();case 0:break d}}bj(a,127606,3)}Ij(a,-3);bj(a,127658,6);bj(a,q[b+36>>2],w(q[b+28>>2],w(c,q[b+24>>2])));Ij(a,-3);tI(b+24|0);break a}q[b+16>>2]=c;Pi(3,127665,127672,b+16|0);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16}if((f+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(127698,127623,149,127647);G()}Ii=b+48|0;return 1}function Ss(a,b,c,d,e,f){var g=x(0),h=x(0),i=0,j=x(0),k=x(0),l=0;if((a|0)>=4){l=a>>>2|0;a=(c<<2)+b|0;d=a+(d<<2)|0;b=f<<2;while(1){c=d-4|0;h=u[c>>2];j=u[a>>2];k=u[d>>2];u[a>>2]=j+k;f=a-4|0;g=u[f>>2];u[f>>2]=g+u[c>>2];j=x(j-k);g=x(g-h);u[d>>2]=x(j*u[e>>2])-x(g*u[e+4>>2]);u[c>>2]=x(g*u[e>>2])+x(j*u[e+4>>2]);f=d-12|0;j=u[f>>2];c=a-8|0;g=u[c>>2];i=c;c=d-8|0;k=u[c>>2];u[i>>2]=g+k;i=a-12|0;h=u[i>>2];u[i>>2]=h+u[f>>2];i=c;g=x(g-k);c=b+e|0;h=x(h-j);u[i>>2]=x(g*u[c>>2])-x(h*u[c+4>>2]);u[f>>2]=x(h*u[c>>2])+x(g*u[c+4>>2]);e=d-20|0;j=u[e>>2];f=a-16|0;g=u[f>>2];i=f;f=d-16|0;k=u[f>>2];u[i>>2]=g+k;i=a-20|0;h=u[i>>2];u[i>>2]=h+u[e>>2];g=x(g-k);c=b+c|0;h=x(h-j);u[f>>2]=x(g*u[c>>2])-x(h*u[c+4>>2]);u[e>>2]=x(h*u[c>>2])+x(g*u[c+4>>2]);e=d-28|0;j=u[e>>2];f=a-24|0;g=u[f>>2];i=f;f=d-24|0;k=u[f>>2];u[i>>2]=g+k;i=a-28|0;h=u[i>>2];u[i>>2]=h+u[e>>2];g=x(g-k);c=b+c|0;h=x(h-j);u[f>>2]=x(g*u[c>>2])-x(h*u[c+4>>2]);u[e>>2]=x(h*u[c>>2])+x(g*u[c+4>>2]);e=b+c|0;d=d-32|0;a=a-32|0;c=(l|0)>1;l=l-1|0;if(c){continue}break}}}function i4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0),h=0,i=0,j=0,k=0;b=Ii-80|0;Ii=b;h=qj(a,1);q[b+60>>2]=0;c=kj(a,2,b+60|0);a:{b:{c:{switch(q[b+60>>2]-2|0){case 1:i=r[c+1|0];if((i&252)!=48){break b}c=r[c+2|0];if((c&252)!=48){break b}j=fj(a,-1);a=((c<<4)+h|0)-768|0;c=q[a>>2];h=q[a+4>>2];k=q[a+12>>2];q[b+72>>2]=q[a+8>>2];q[b+76>>2]=k;q[b+64>>2]=c;q[b+68>>2]=h;u[((i<<2)+b|0)-128>>2]=j;u[a>>2]=u[b+64>>2];u[a+4>>2]=u[b+68>>2];u[a+8>>2]=u[b+72>>2];u[a+12>>2]=u[b+76>>2];a=0;break a;case 0:break c;default:break b}}c=r[c+1|0];if((c&252)!=48){break b}i=c-48|0;c=_i(a,-1,q[210437],0);f=u[c>>2];g=u[c+4>>2];d:{e:{if(f!=f|g!=g){break e}d=u[c+8>>2];if(d!=d){break e}e=u[c+12>>2];if(e==e){break d}}d=u[c+8>>2];e=u[c+12>>2];v[b+32>>3]=g;v[b+48>>3]=e;v[b+40>>3]=d;v[b+24>>3]=f;q[b+16>>2]=-1;Qi(a,134221,b+16|0);e=u[c+12>>2];d=u[c+8>>2];g=u[c+4>>2];f=u[c>>2]}a=(i<<4)+h|0;u[a+12>>2]=e;u[a+8>>2]=d;u[a+4>>2]=g;u[a>>2]=f;a=0;break a}q[b+4>>2]=134048;q[b>>2]=134064;a=Qi(a,135048,b)}Ii=b+80|0;return a|0}function Wya(){q[58513]=q[71906];q[71906]=234024;q[58541]=q[71906];q[71906]=234136;q[58591]=q[71906];q[71906]=234336;q[58615]=q[71906];q[71906]=234432;q[58639]=q[71906];q[71906]=234528;q[58705]=q[71906];q[71906]=234792;q[58733]=q[71906];q[71906]=234904;q[58761]=q[71906];q[71906]=235016;q[58809]=q[71906];q[71906]=235208;q[74658]=1;q[74656]=1430610974;q[74657]=1205238996;q[74655]=82968;q[74654]=1;q[74661]=0;o[298640]=0;q[74659]=q[74652];q[74661]=q[71906];q[71906]=298616;q[58829]=q[71906];q[71906]=235288;q[58845]=q[71906];q[71906]=235352;q[58865]=q[71906];q[71906]=235432;q[58881]=q[71906];q[71906]=235496;q[58901]=q[71906];q[71906]=235576;q[74672]=1;q[74670]=-53895322;q[74671]=550923652;q[74669]=83036;q[74668]=1;q[74675]=0;o[298696]=0;q[74673]=q[74667];q[74675]=q[71906];q[71906]=298672;q[58917]=q[71906];q[71906]=235640;q[58951]=q[71906];q[71906]=235776;q[58975]=q[71906];q[71906]=235872;q[59005]=q[71906];q[71906]=235992;q[59021]=q[71906];q[71906]=236056;q[59037]=q[71906];q[71906]=236120}function YE(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0;h=q[a+4>>2];a:{if(h>>>0<=b>>>0){break a}p=c+1|0;l=d-1|0;e=b;b:{c:{d:{i=o[c|0];switch(i-37|0){case 0:break c;case 9:break d;default:break b}}while(1){f=f+1|0;if(f+b>>>0>>0){continue}break}break a}c=r[p|0];while(1){if(!fp(r[e|0],c)){break a}f=f+1|0;e=f+b|0;if(h>>>0>e>>>0){continue}break}break a}while(1){e:{if((i|0)==46){break e}g=r[e|0];if((i|0)==91){j=r[c+1|0];m=(j|0)==94;e=m?p:c;k=e+1|0;f:{if(k>>>0>=l>>>0){break f}j=(j|0)!=94;while(1){s=r[e+2|0];g:{n=r[e+1|0];h:{if((n|0)==37){if(fp(g,s)){break h}e=e+2|0;break g}i:{if((s|0)!=45){break i}e=e+3|0;if(l>>>0<=e>>>0){break i}if(g>>>0>>0){break g}if(r[e|0]>=g>>>0){break h}break g}e=k;if((g|0)!=(n|0)){break g}}m=j;break f}k=e+1|0;if(k>>>0>>0){continue}break}}if(m){break e}break a}if((i&255)!=(g|0)){break a}}f=f+1|0;e=f+b|0;if(h>>>0>e>>>0){continue}break}}c=d+1|0;while(1){j:{e=0;if((f|0)<0){break j}d=b+f|0;f=f-1|0;e=Fn(a,d,c);if(!e){continue}}break}return e}function XI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(167041,167056,156,167086);G();case 0:J(167098,167056,157,167086);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/136>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,136);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;XI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,136)|0;YI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+128>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(167120,167056,158,167086);G()}J(167140,167056,159,167086);G()}function AA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(150082,150097,156,150037);G();case 0:J(150157,150097,157,150037);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/968>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,968);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;AA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,968)|0;qo(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+960>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(150179,150097,158,150037);G()}J(150199,150097,159,150037);G()}function kA(a,b,c){var d=0,e=0;a:{b:{if(!b){break b}d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>2>>>0){a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);break b}d=q[a+4>>2];b=q[a>>2];e=d-b|0;if(!e){break b}e=(e|0)/304|0;e=e>>>0>1?e:1;c:{if(!c){if((b|0)==(d|0)){break c}c=0;while(1){b=w(c,304)+b|0;d=q[b+280>>2];d:{if(!d){break d}q[b+280>>2]=3;if((d|0)==3){break d}d=q[a+72>>2];if(!d){break d}Mi[q[a+68>>2]](q[a+16>>2],q[b+128>>2],q[b+132>>2],3,d)}o[b+296|0]=r[b+296|0]&247;c=c+1|0;if((e|0)==(c|0)){break b}b=q[a>>2];if((q[a+4>>2]-b|0)/304>>>0>c>>>0){continue}break}break c}if((b|0)==(d|0)){break c}c=0;while(1){b=w(c,304)+b|0;d=q[b+280>>2];e:{if(!d){break e}q[b+280>>2]=3;if((d|0)==3){break e}d=q[a+72>>2];if(!d){break e}Mi[q[a+68>>2]](q[a+16>>2],q[b+128>>2],q[b+132>>2],3,d)}q[b+60>>2]=q[b+56>>2];o[b+296|0]=r[b+296|0]&247;c=c+1|0;if((e|0)==(c|0)){break b}b=q[a>>2];if((q[a+4>>2]-b|0)/304>>>0>c>>>0){continue}break}}break a}break a}return}J(151947,151192,479,151403);G()}function aJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(201176,201191,156,201251);G();case 0:J(201263,201191,157,201251);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/40>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,40);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;aJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,40)|0;bJ(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+32>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(201285,201191,158,201251);G()}J(201305,201191,159,201251);G()}function _I(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(201176,201191,156,201251);G();case 0:J(201263,201191,157,201251);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;_I(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;$I(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+20>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(201285,201191,158,201251);G()}J(201305,201191,159,201251);G()}function Sv(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(165821,165836,156,165559);G();case 0:J(165866,165836,157,165559);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;Sv(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;CA(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(165888,165836,158,165559);G()}J(165908,165836,159,165559);G()}function Rv(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(111152,111167,156,111227);G();case 0:J(111239,111167,157,111227);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/40>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,40);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;Rv(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,40)|0;yA(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+32>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(111261,111167,158,111227);G()}J(111281,111167,159,111227);G()}function RI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(120411,120426,156,120486);G();case 0:J(120498,120426,157,120486);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/40>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,40);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;RI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,40)|0;SI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+32>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(120520,120426,158,120486);G()}J(120540,120426,159,120486);G()}function kT(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,s=0,t=0;n=q[a+28>>2];p=q[a+24>>2];r=q[a+20>>2];g=q[a+16>>2];h=q[a+48>>2];i=q[a+44>>2];k=q[a+40>>2];f=k;l=q[a+36>>2];d=l;m=q[a+32>>2];a=m+5|0;c=a>>>0<5?1:c;j=a;e=c;c=c+d|0;a=0;a=c>>>0>>0?a+1|0:a;e=c;c=0;d=a;a=a+f|0;c=a>>>0>>0?c+1|0:c;f=a;a=0;d=c+i|0;s=d;t=g;a=(c>>>0>d>>>0?a+1|0:a)+h>>>2|0;g=a-1|0;h=0-a|0;c=g&m|h&j;a=t+c|0;d=0;o[b|0]=a;d=a>>>0>>0?1:d;c=a;o[b+3|0]=(d&16777215)<<8|a>>>24;a=d;o[b+2|0]=(a&65535)<<16|c>>>16;o[b+1|0]=(a&255)<<24|c>>>8;e=g&l|e&h;d=e+r|0;c=0;c=d>>>0>>0?1:c;e=a;j=a+d|0;a=c;c=j;o[b+4|0]=c;a=e>>>0>c>>>0?a+1|0:a;o[b+7|0]=(a&16777215)<<8|c>>>24;d=a;o[b+6|0]=(a&65535)<<16|c>>>16;o[b+5|0]=(a&255)<<24|c>>>8;f=g&k|f&h;e=f+p|0;a=0;a=e>>>0>>0?1:a;f=d;e=d+e|0;c=e;o[b+8|0]=c;d=c>>>0>>0?a+1|0:a;o[b+11|0]=(d&16777215)<<8|c>>>24;a=d;o[b+10|0]=(a&65535)<<16|c>>>16;o[b+9|0]=(a&255)<<24|c>>>8;a=((g&i|h&s)+n|0)+a|0;o[b+12|0]=a;o[b+15|0]=a>>>24;o[b+14|0]=a>>>16;o[b+13|0]=a>>>8}function Xya(){var a=0;q[73796]=Oi(57392);q[73797]=Li;q[73798]=Oi(57411);q[73799]=Li;q[73800]=Oi(57428);q[73801]=Li;q[73802]=Oi(57437);q[73803]=Li;q[73804]=Oi(57443);q[73805]=Li;q[73806]=Oi(57453);q[73807]=Li;q[73808]=Oi(57461);q[73809]=Li;q[73810]=Oi(57468);q[73811]=Li;q[73812]=Oi(57477);q[73813]=Li;q[73814]=Oi(57489);q[73815]=Li;q[73816]=Oi(57498);q[73817]=Li;q[73818]=Oi(57503);q[73819]=Li;q[73820]=Oi(57509);q[73821]=Li;q[73822]=Oi(57515);q[73823]=Li;q[73824]=Oi(57524);q[73825]=Li;q[73828]=Oi(57534);q[73829]=Li;q[73830]=Oi(57543);q[73831]=Li;q[73832]=Oi(57552);q[73833]=Li;q[73834]=Oi(57561);q[73835]=Li;q[73836]=Oi(57570);q[73837]=Li;q[73838]=Oi(57579);q[73839]=Li;q[73840]=Oi(57588);q[73841]=Li;q[73842]=Oi(57597);q[73843]=Li;q[73844]=Oi(57606);q[73845]=Li;a=Oi(57615);q[73864]=0;q[73865]=0;q[73862]=0;q[73860]=57643;q[73859]=57627;q[73858]=0;q[73856]=0;q[73854]=0;q[73852]=0;q[73850]=0;q[73848]=0;q[73849]=0;q[73846]=a;q[73847]=Li;q[73866]=0;q[73867]=0;q[73868]=0;q[73869]=0}function uj(a,b,c){var d=0;a:{if((b|0)>=1){d=(q[a+12>>2]+(b<<4)|0)-16|0;d=d>>>0>2]?d:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:d=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=d;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}c:{d:{if(q[d+8>>2]==4){break d}if(!eF(a,d)){a=0;if(!c){break c}q[c>>2]=0;return 0}d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break d}if((b|0)>=-9999){d=q[a+8>>2]+(b<<4)|0;break d}e:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break d;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break d;case 0:d=a+72|0;break d;default:break e}}a=q[q[q[a+20>>2]+4>>2]>>2];d=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}if(c){q[c>>2]=q[q[d>>2]+12>>2]}a=q[d>>2]+16|0}return a}function uA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(123849,123864,156,123924);G();case 0:J(123936,123864,157,123924);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>5>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<5;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;uA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<5)|0;JI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+28>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(123958,123864,158,123924);G()}J(123978,123864,159,123924);G()} - - - -function bxa(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t=0,u=0,v=0,x=0;u=l+m|0;t=u>>>0>>0?1:t;v=u;a:{b:{if(!t&v>>>0>f>>>0|t){break b}c:{if(o){v=n;t=v+o|0;u=0;u=t>>>0>>0?1:u;if(!u&f>>>0>=t>>>0){break c}break b}if(p){break a}}if((b&-2)==8){if((Dza(g<<2)|0)!=1){break b}if((Dza(h<<2)|0)!=1){break b}}b=(b|0)==9?p?9:8:b;v=Zt(b);if(!_N(b,d,i,j,r,s,w(g,h))){break b}t=p^1|1;d=t?m:o;f=e+l|0;e=e+n|0;l=t?f:e;d:{switch(b|0){case 13:l=22;if(p){l=21;if(!Ur(a,c,g,h,e,o,23,4,q,1,k,i,j,r,s)){break b}}return Ur(a,c,g,h,f,m,l,4,q,0,k,i,j,r,s);case 14:case 15:return Ur(a,c,g,h,l,d,(b|0)==14?24:25,2,q,0,k,i,j,r,s);case 16:l=28;if(p){l=26;if(!Ur(a,c,g,h,e,o,27,2,q,1,k,i,j,r,s)){break b}}return Ur(a,c,g,h,f,m,l,2,q,0,k,i,j,r,s);default:J(96993,96899,9278,97140);G();case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 17:case 18:case 19:case 20:case 21:break b;case 0:break d}}x=Ur(a,c,g,h,l,d,0,v,q,0,k,i,j,r,s)}return x}J(97111,96899,8720,97140);G()}function R9(a,b,c){var d=x(0),e=x(0),f=x(0),g=x(0),h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),v=x(0);j=u[a+20>>2];k=u[a+36>>2];l=u[a+52>>2];e=u[a+28>>2];m=u[a+24>>2];f=u[a+44>>2];n=u[a+40>>2];d=u[a+60>>2];o=u[a+56>>2];p=u[a+16>>2];r=u[a+32>>2];s=u[a+48>>2];t=u[a>>2];v=u[a+4>>2];g=u[a+12>>2];i=u[a+8>>2];u[c+80>>2]=g-i;u[c+64>>2]=i+g;u[c+48>>2]=g-v;u[c+32>>2]=v+g;u[c+16>>2]=g-t;g=x(t+g);u[c>>2]=g;q[c+96>>2]=b;u[c+92>>2]=d-o;u[c+88>>2]=f-n;u[c+84>>2]=e-m;u[c+76>>2]=o+d;u[c+72>>2]=n+f;u[c+68>>2]=m+e;u[c+60>>2]=d-l;u[c+56>>2]=f-k;u[c+52>>2]=e-j;u[c+44>>2]=l+d;u[c+40>>2]=k+f;u[c+36>>2]=j+e;u[c+28>>2]=d-s;u[c+24>>2]=f-r;u[c+20>>2]=e-p;d=x(s+d);u[c+12>>2]=d;f=x(r+f);u[c+8>>2]=f;e=x(p+e);u[c+4>>2]=e;a:{if((b|0)<1){break a}a=0;while(1){h=(a<<4)+c|0;i=d;d=x(F(x(x(x(g*g)+x(e*e))+x(f*f))));u[h+12>>2]=i/d;u[h+8>>2]=f/d;u[h+4>>2]=e/d;u[h>>2]=g/d;a=a+1|0;if((b|0)==(a|0)){break a}h=(a<<4)+c|0;d=u[h+12>>2];f=u[h+8>>2];e=u[h+4>>2];g=u[h>>2];continue}}}function Kk(a,b,c,d,e,f){var g=0,h=0,i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),o=x(0),p=x(0),s=x(0),t=x(0),v=x(0),y=x(0),z=x(0),A=x(0),B=x(0),C=x(0);g=Ii-32|0;Ii=g;u[g+28>>2]=e;if(r[f+96|0]){while(1){a:{b:{c:{d:{e:{h=w(k,12)+f|0;l=q[h>>2];switch(q[l+16>>2]-2|0){case 2:break c;case 1:break d;case 0:break e;default:break b}}f:{switch(q[l+32>>2]-1|0){case 0:m=u[c+48>>2];n=u[c+32>>2];o=u[c>>2];p=u[c+16>>2];s=u[c+52>>2];t=u[c+36>>2];v=u[c+4>>2];y=u[c+20>>2];z=u[c+56>>2];A=u[c+40>>2];B=u[c+8>>2];C=u[c+24>>2];e=u[b>>2];i=u[b+4>>2];j=u[b+8>>2];u[g+12>>2]=u[c+60>>2]+x(x(x(e*u[c+12>>2])+x(i*u[c+28>>2]))+x(j*u[c+44>>2]));u[g+8>>2]=z+x(x(x(e*B)+x(i*C))+x(j*A));u[g+4>>2]=s+x(x(x(e*v)+x(i*y))+x(j*t));u[g>>2]=m+x(x(x(o*e)+x(p*i))+x(n*j));Ti(a,g,q[h+8>>2]);break a;case 1:Ti(a,b,q[h+8>>2]);break a;default:break f}}J(53903,53126,477,54048);G()}Ti(a,d,q[h+8>>2]);break a}Ti(a,g+28|0,q[h+8>>2]);break a}Ti(a,q[h+4>>2],q[h+8>>2])}a=q[h+8>>2]+a|0;k=k+1|0;if(k>>>0>2];if((q[a+16>>2]-e|0)/184>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,184);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;rJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,184)|0;GA(d,q[b>>2],b+4|0);b=q[b+180>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(150179,150097,158,150037);G()}J(150199,150097,159,150037);G()}function pJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(114177,114192,156,114069);G();case 0:J(114252,114192,157,114069);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/280>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,280);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;pJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,280)|0;qJ(d,q[b>>2],b+8|0);b=q[b+272>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(114274,114192,158,114069);G()}J(114294,114192,159,114069);G()}function zA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(120411,120426,156,120486);G();case 0:J(120498,120426,157,120486);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;zA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;QI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(120520,120426,158,120486);G()}J(120540,120426,159,120486);G()}function vA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(123849,123864,156,123924);G();case 0:J(123936,123864,157,123924);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;vA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;KI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(123958,123864,158,123924);G()}J(123978,123864,159,123924);G()}function qt(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(114177,114192,156,114069);G();case 0:J(114252,114192,157,114069);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;qt(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;rt(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(114274,114192,158,114069);G()}J(114294,114192,159,114069);G()}function VI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(172159,172174,156,172204);G();case 0:J(172216,172174,157,172204);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>6>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<6;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;VI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<6)|0;WI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+56>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(172238,172174,158,172204);G()}J(172258,172174,159,172204);G()}function TI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(201176,201191,156,201251);G();case 0:J(201263,201191,157,201251);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;TI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;UI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(201285,201191,158,201251);G()}J(201305,201191,159,201251);G()}function II(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(201176,201191,156,201251);G();case 0:J(201263,201191,157,201251);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;II(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;tA(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(201285,201191,158,201251);G()}J(201305,201191,159,201251);G()}function Qz(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f:{g:{e=s[b+34>>1];if((e|0)!=65535){c=q[a+155696>>2];g=a+88112|0;while(1){if(c>>>0>=1024){break g}f=e<<16>>16;d=f<<6;c=d+a|0;if(s[c+88146>>1]!=65535){break f}if(s[c+88150>>1]){break e}h=d+g|0;i=(p[h+32>>1]<<6)+g|0;if(s[i+34>>1]!=(e|0)){break d}d=q[c+88172>>2];h:{if(!d){break h}if((f|0)>1]){f=q[a+173524>>2];if((f|0)==q[a+173528>>2]){break c}q[a+173524>>2]=f+4;q[f>>2]=d;break h}cj(q[a+155704>>2],d)}p[i+34>>1]=s[c+88148>>1];i:{if(q[c+88168>>2]!=-17){break i}c=p[h+32>>1];if((c|0)==-1){break i}c=((c<<6)+a|0)+88150|0;d=s[c>>1];if(!d){break b}p[c>>1]=d-1}d=q[a+155696>>2];c=d+1|0;q[a+155696>>2]=c;p[((d<<1)+a|0)+153648>>1]=e;e=s[b+34>>1];if((e|0)!=65535){continue}break}}if(s[b+38>>1]){break a}return}J(30430,29446,407,30481);G()}J(30501,29446,410,30481);G()}J(30524,29446,411,30481);G()}J(30553,29446,413,30481);G()}J(30736,29794,533,30760);G()}J(29952,29446,316,30012);G()}J(30092,29446,443,30415);G()}function EA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(113194,113209,156,113269);G();case 0:J(113281,113209,157,113269);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/80>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,80);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;EA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,80)|0;FA(d,q[b>>2],b+8|0);b=q[b+72>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(113303,113209,158,113269);G()}J(113323,113209,159,113269);G()}function uJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(150082,150097,156,150037);G();case 0:J(150157,150097,157,150037);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;uJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;vJ(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(150179,150097,158,150037);G()}J(150199,150097,159,150037);G()}function GI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(123849,123864,156,123924);G();case 0:J(123936,123864,157,123924);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;GI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;HI(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(123958,123864,158,123924);G()}J(123978,123864,159,123924);G()}function xA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(32239,32254,156,32314);G();case 0:J(32326,32254,157,32314);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;xA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;LI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(32348,32254,158,32314);G()}J(32368,32254,159,32314);G()}function wA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(33645,33660,156,33720);G();case 0:J(33732,33660,157,33720);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;wA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;Qv(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+20>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(33754,33660,158,33720);G()}J(33774,33660,159,33720);G()}function pt(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(11170,11185,156,10101);G();case 0:J(11245,11185,157,10101);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;pt(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;Ov(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(11267,11185,158,10101);G()}J(11287,11185,159,10101);G()}function eJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(68779,68794,156,68854);G();case 0:J(68866,68794,157,68854);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;eJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;fJ(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(68888,68794,158,68854);G()}J(68908,68794,159,68854);G()}function cJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(44978,44993,156,45053);G();case 0:J(45065,44993,157,45053);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;cJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;dJ(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+20>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(45087,44993,158,45053);G()}J(45107,44993,159,45053);G()}function bu(a){var b=x(0),c=0,d=0,e=x(0);a:{d=(Pza(a),Lza(2));c=d&2147483647;if(c>>>0>=1065353216){if((c|0)==1065353216){break a}return x(x(0)/x(a-a))}b:{if(c>>>0<=1056964607){b=x(1.570796251296997);if(c>>>0<847249409){break b}b=x(a*a);return x(x(x(x(7.549789415861596e-8)-x(x(x(x(x(x(x(b*x(-.008656363002955914))+x(-.04274342209100723))*b)+x(.16666586697101593))*b)/x(x(b*x(-.7066296339035034))+x(1)))*a))-a)+x(1.570796251296997))}if((d|0)<=-1){a=x(x(a+x(1))*x(.5));b=x(F(a));a=x(x(1.570796251296997)-x(b+x(x(b*x(x(x(x(x(x(a*x(-.008656363002955914))+x(-.04274342209100723))*a)+x(.16666586697101593))*a)/x(x(a*x(-.7066296339035034))+x(1))))+x(-7.549789415861596e-8))));return x(a+a)}a=x(x(x(1)-a)*x(.5));e=x(F(a));b=(Mza(2,(Pza(e),Lza(2))&-4096),Qza());a=x(x(x(e*x(x(x(x(x(x(a*x(-.008656363002955914))+x(-.04274342209100723))*a)+x(.16666586697101593))*a)/x(x(a*x(-.7066296339035034))+x(1))))+x(x(a-x(b*b))/x(e+b)))+b);b=x(a+a)}return b}return(d|0)>-1?x(0):x(3.141592502593994)}function OI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(26651,26666,156,26726);G();case 0:J(26738,26666,157,26726);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/48>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,48);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;OI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,48)|0;PI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+40>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(26760,26666,158,26726);G()}J(26780,26666,159,26726);G()}function MI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(31853,31868,156,31928);G();case 0:J(31940,31868,157,31928);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;MI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;NI(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(31962,31868,158,31928);G()}J(31982,31868,159,31928);G()}function EI(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(124871,124886,156,124946);G();case 0:J(124958,124886,157,124946);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;EI(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;FI(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(124980,124886,158,124946);G()}J(125e3,124886,159,124946);G()}function Ppa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,t=0,v=0;i=Ii+ -64|0;Ii=i;j=q[e+8>>2];p=q[q[e+4>>2]+4>>2];if(j>>>0

>>0){q[e+8>>2]=j+1;k=q[a+4>>2];f=k;r=q[f+96>>2];f=q[f+100>>2];l=q[c+4>>2];g=l;t=q[g+96>>2];g=q[g+100>>2];v=q[e>>2];if(b){e=0;if(!(b&1)){while(1){e=e+1|0;h=b&2;b=(b&65534)>>>1|0;if(!h){continue}break}}b=(e<<3)+v|0;h=q[b>>2];m=q[b+4>>2]}if(d){b=0;if(!(d&1)){while(1){b=b+1|0;e=d&2;d=(d&65534)>>>1|0;if(!e){continue}break}}b=(b<<3)+v|0;n=q[b>>2];o=q[b+4>>2]}b=i;q[b+48>>2]=n;q[b+52>>2]=o;q[b+56>>2]=h;q[b+60>>2]=m;q[b+24>>2]=n;q[b+28>>2]=o;q[b+16>>2]=t;q[b+20>>2]=g;Ip(b,l);d=q[b+8>>2];q[b+36>>2]=q[b+4>>2];q[b+40>>2]=d;u[b+32>>2]=u[b>>2];MC(b+16|0,k,r,f,s[a+22>>1]);q[b+48>>2]=h;q[b+52>>2]=m;q[b+56>>2]=n;q[b+60>>2]=o;q[b+24>>2]=h;q[b+28>>2]=m;q[b+16>>2]=r;q[b+20>>2]=f;Ip(b,k);a=q[b+8>>2];q[b+36>>2]=q[b+4>>2];q[b+40>>2]=a;u[b+32>>2]=u[b>>2];MC(b+16|0,l,t,g,s[c+22>>1])}Ii=i- -64|0;return j>>>0

>>0|0}function M2(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-48|0;Ii=d;c=qj(a,1);b=kj(a,2,0);a:{if(!dj(129104,b)){if(On(a,3)){a=qj(a,3);b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;b=0;break a}if(uk(a,3)){b=0;b:{c:{e=uj(a,3,0);c=vn(e,c);switch(c+6|0){case 0:case 6:break a;case 2:break c;default:break b}}q[d+16>>2]=e;b=Qi(a,128265,d+16|0);break a}q[d+4>>2]=c;q[d>>2]=e;b=Qi(a,128298,d);break a}if(!Vi(a,3)){q[c>>2]=0;q[c+4>>2]=0;b=0;break a}b=Qi(a,129171,0);break a}if(!dj(129111,b)){if(uk(a,3)){b=0;q[c+16>>2]=Oi(uj(a,3,0));q[c+20>>2]=Li;break a}if(!Vi(a,3)){q[c+16>>2]=0;q[c+20>>2]=0;b=0;break a}if(On(a,3)){q[c+16>>2]=nl(a,3);q[c+20>>2]=Li;b=0;break a}b=Qi(a,129227,0);break a}if(!dj(129116,b)){if(uk(a,3)){b=0;q[c+24>>2]=Oi(uj(a,3,0));q[c+28>>2]=Li;break a}if(!Vi(a,3)){q[c+24>>2]=0;q[c+28>>2]=0;b=0;break a}if(On(a,3)){a=qj(a,3);b=q[a+4>>2];q[c+24>>2]=q[a>>2];q[c+28>>2]=b;b=0;break a}b=Qi(a,129279,0);break a}q[d+36>>2]=128488;q[d+32>>2]=128484;b=Qi(a,129125,d+32|0)}Ii=d+48|0;return b|0}function iC(a){var b=0,c=0,d=0,e=0,f=0,g=0;Oza(+a);b=Lza(1)|0;Lza(0)|0;f=b;b=b&2147483647;if(b>>>0<1141899264){a:{b:{if(b>>>0<=1071382527){if(b>>>0<1044381696){break a}b=-1;d=1;break b}a=y(a);c:{if(b>>>0<=1072889855){if(b>>>0<=1072037887){a=(a+a+ -1)/(a+2);b=0;d=0;break b}b=1;a=(a+ -1)/(a+1);break c}if(b>>>0<=1073971199){b=2;a=(a+ -1.5)/(a*1.5+1);break c}b=3;a=-1/a}d=0}g=a*a;c=g*g;e=c*(c*(c*(c*(c*-.036531572744216916+ -.058335701337905735)+ -.0769187620504483)+ -.11111110405462356)+ -.19999999999876483);c=g*(c*(c*(c*(c*(c*.016285820115365782+.049768779946159324)+.06661073137387531)+.09090887133436507)+.14285714272503466)+.3333333333333293);if(d){return a-a*(e+c)}b=b<<3;a=v[b+217936>>3]-(a*(e+c)-v[b+217968>>3]-a);a=(f|0)>-1?a:-a}return a}Oza(1.5707963267948966);b=Lza(1)|0;f=Lza(0)|0;Oza(+a);d=Lza(1)|0;Lza(0)|0;Mza(0,f|0);Mza(1,b&2147483647|d&-2147483648);e=+Nza();Oza(+a);b=Lza(1)|0;d=Lza(0)|0;b=b&2147483647;return(b|0)==2146435072&(d|0)!=0|b>>>0>2146435072?a:e}function Tv(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(165821,165836,156,165559);G();case 0:J(165866,165836,157,165559);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;Tv(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;HA(d,q[b>>2],b+4|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(165888,165836,158,165559);G()}J(165908,165836,159,165559);G()}function mJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(28320,28335,156,28395);G();case 0:J(28407,28335,157,28395);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;mJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;BA(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(28429,28335,158,28395);G()}J(28449,28335,159,28395);G()}function jJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(26651,26666,156,26726);G();case 0:J(26738,26666,157,26726);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;jJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;kJ(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(26760,26666,158,26726);G()}J(26780,26666,159,26726);G()}function hJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(22555,22570,156,22504);G();case 0:J(22630,22570,157,22504);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;hJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;iJ(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(22652,22570,158,22504);G()}J(22672,22570,159,22504);G()}function gJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(11170,11185,156,10101);G();case 0:J(11245,11185,157,10101);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;gJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;wr(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(11267,11185,158,10101);G()}J(11287,11185,159,10101);G()}function Pv(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(63801,63816,156,63876);G();case 0:J(63888,63816,157,63876);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;Pv(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;vr(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(63910,63816,158,63876);G()}J(63930,63816,159,63876);G()}function rA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(26651,26666,156,26726);G();case 0:J(26738,26666,157,26726);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/24>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,24);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;rA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,24)|0;sA(d,q[b>>2],b+8|0);b=q[b+16>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(26760,26666,158,26726);G()}J(26780,26666,159,26726);G()}function n7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-80|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);g=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){d=fj(a,1);c:{if(d<4294967296&d>=0){c=~~d>>>0;break c}c=0}e=c;d=fj(a,2);d:{if(d<4294967296&d>=0){f=~~d>>>0;break d}f=0}h=e|f;d=fj(a,3);e:{if(d<4294967296&d>=0){e=~~d>>>0;break e}e=0}if((h|e)>>>0>=8){q[b+28>>2]=e;q[b+24>>2]=f;q[b+20>>2]=c;q[b+16>>2]=115561;a=Qi(a,117689,b+16|0);break a}q[b+48>>2]=c;q[b+52>>2]=0;q[b+40>>2]=15;q[b+64>>2]=e;q[b+68>>2]=0;q[b+56>>2]=f;q[b+60>>2]=0;c=q[g+4>>2];if((c|0)==q[g+8>>2]){break b}q[g+4>>2]=c+40;a=q[b+76>>2];q[c+32>>2]=q[b+72>>2];q[c+36>>2]=a;a=b- -64|0;f=q[a+4>>2];q[c+24>>2]=q[a>>2];q[c+28>>2]=f;a=q[b+60>>2];q[c+16>>2]=q[b+56>>2];q[c+20>>2]=a;a=q[b+52>>2];q[c+8>>2]=q[b+48>>2];q[c+12>>2]=a;a=q[b+44>>2];q[c>>2]=q[b+40>>2];q[c+4>>2]=a;a=0;break a}J(115568,115465,478,119531);G()}q[b>>2]=(q[g+8>>2]-q[g>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+80|0;return a|0}function sJ(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(43867,43882,156,40801);G();case 0:J(43942,43882,157,40801);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;sJ(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;tJ(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(43964,43882,158,40801);G()}J(43984,43882,159,40801);G()}function DA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(24188,24203,156,24263);G();case 0:J(24275,24203,157,24263);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;DA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;oJ(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(24297,24203,158,24263);G()}J(24317,24203,159,24263);G()}function yba(a,b,c,d){var e=0,f=x(0),g=x(0),h=0,i=0,j=x(0),k=x(0),l=0,m=0;e=Ii-128|0;Ii=e;a:{b:{i=b&65535;h=q[a+32>>2];if(i>>>0<(q[a+36>>2]-h|0)/592>>>0){if(s[(h+w(i,592)|0)+568>>1]!=(b>>>16|0)){break b}h=h+w(i,592)|0;if(s[h+570>>1]!=(b&65535)){break a}b=q[a+12>>2];i=q[b+20>>2];l=q[b+28>>2];m=q[b+24>>2];b=q[b+32>>2];Cr(a,h,7,e- -64|0);q[e+104>>2]=1065353216;gu(e,e- -64|0);f=x(x(x(i>>>0)/x(l>>>0))*c);g=x(x(x(m>>>0)/x(b>>>0))*d);j=u[e+36>>2];c=x(x(x(x(f*u[e+4>>2])+x(g*u[e+20>>2]))+x(j*x(0)))+u[e+52>>2]);k=u[e+32>>2];d=x(x(x(x(f*u[e>>2])+x(g*u[e+16>>2]))+x(k*x(0)))+u[e+48>>2]);Ii=e+128|0;g=x(x(f*u[e+8>>2])+x(g*u[e+24>>2]));f=u[e+40>>2];g=x(x(g+x(f*x(0)))+u[e+56>>2]);c:{if(!((g>=x(0)?g:x(-g))>x(9999999747378752e-20)^1)){a=0;if((f>=x(0)?f:x(-f))=x(0)&c>=x(0)&c<=x(1)}return a}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fx(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=x(0);a:{j=q[a+1004>>2];b:{c:{d:{e:{if(!j){e=q[a+4>>2];break e}f=j<<1;e=a+1104|0;f:{if((f|0)==q[a+124>>2]){break f}if((f|0)!=q[a+128>>2]){break b}e=a+1108|0}g=q[e>>2];if(!g){break b}e=q[a+4>>2];if((e|0)<=0){q[a+1004>>2]=b-d;break a}if((j|0)<=0){g=b-d|0;q[a+1004>>2]=g;break d}k=(e|0)>1?e:1;while(1){f=(h<<2)+a|0;l=q[f+940>>2];m=q[f+812>>2];f=0;while(1){i=m+(c+f<<2)|0;n=i;o=u[i>>2];i=f<<2;u[n>>2]=x(o*u[i+g>>2])+x(u[l+i>>2]*u[g+((f^-1)+j<<2)>>2]);f=f+1|0;if((j|0)!=(f|0)){continue}break}h=h+1|0;if((k|0)!=(h|0)){continue}break}}g=b-d|0;q[a+1004>>2]=g;if((e|0)<1){break c}}if((b|0)<=(d|0)){break c}k=(e|0)>1?e:1;h=0;while(1){e=(h<<2)+a|0;l=q[e+940>>2];m=q[e+812>>2];e=d;f=0;while(1){u[l+(f<<2)>>2]=u[m+(e<<2)>>2];f=f+1|0;e=f+d|0;if((f|0)!=(g|0)){continue}break}h=h+1|0;if((k|0)!=(h|0)){continue}break}}if(j){break a}}return 0}e=a;i=q[a+1428>>2];a=((b|0)<(d|0)?b:d)-c|0;q[e+1428>>2]=i+a;return a}function vla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-48|0;Ii=e;k=q[a+8>>2]-q[a+12>>2]>>4;d=q[q[jk(a)+80>>2]+8>>2];b=e;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+4>>2]=0;h=1;Ml(a,1,d,71700,b+44|0,b+8|0,b+4|0);a:{b:{g=Ana(q[b+4>>2],q[b+44>>2]);if(!g){c=72030;break b}h=2;b=q[g+128>>2];if(!b){c=72068;break b}if(!q[q[b+8>>2]+20>>2]){c=72068;break b}i=$j(a,2);j=Li;d=q[q[b+8>>2]+20>>2];b=q[d+8>>2];if(!b){c=72068;break b}c=q[q[d+4>>2]+(Cza(i,j,b)<<2)>>2];if((c|0)==-1){c=72068;break b}f=q[d+12>>2];c:{while(1){d=f+(c<<4)|0;b=d;if((i|0)==q[b>>2]&(j|0)==q[b+4>>2]){break c}c=q[d+12>>2];if((c|0)!=-1){continue}break}c=72068;break b}b=yna(g,q[(f+(c<<4)|0)+8>>2]);if(!b){c=72101;break b}f=q[b+100>>2];d=f;b=q[b+96>>2];if(!(d|b)){c=72140;break b}lk(a,b,d);b=1;if((k+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(72193,71916,439,72218);G()}q[e>>2]=uj(a,h,0);b=Qi(a,c,e)}Ii=e+48|0;return b|0}function nt(a,b){var c=0,d=0,e=0,f=0;a:{b:{c:{d:{if(b){e=b&65535;c=q[a>>2];if(e>>>0>=q[a+4>>2]-c>>2>>>0){break b}c=q[c+(e<<2)>>2];if(s[c+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}d=q[c+72>>2];if(d){Ni(d);q[c+16>>2]=0;q[c+72>>2]=0}f=q[a+16>>2];if(!f){break d}d=s[a+22>>1];if(!d|d>>>0>s[a+20>>1]){break c}d=d-1|0;p[a+22>>1]=d;p[f+((d&65535)<<1)>>1]=b;b=q[a+4>>2];a=q[a>>2];if(e>>>0>=b-a>>2>>>0){break b}b=0;q[a+(e<<2)>>2]=0;d=q[c+4>>2];a=q[c>>2];f=d-a|0;e=(f|0)/304|0;e:{if(!f){break e}if((a|0)!=(d|0)){e=e>>>0>1?e:1;while(1){a=w(b,304)+a|0;if(o[a+68|0]&1){break a}Wi(0,160,a+56|0,a- -64|0,a+60|0);if(o[a+84|0]&1){break a}Wi(0,96,a+72|0,a+80|0,a+76|0);b=b+1|0;if((e|0)==(b|0)){break e}a=q[c>>2];if((q[c+4>>2]-a|0)/304>>>0>b>>>0){continue}break}}break b}f:{if(o[c+12|0]&1){break f}a=q[c>>2];if(!a){break f}Ni(a)}Ni(c)}return}J(151958,151310,140,151942);G()}J(151989,151310,141,151942);G()}J(151947,151192,479,151403);G()}J(151117,151192,493,151248);G()}function So(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(4848,4863,156,4923);G();case 0:J(4935,4863,157,4923);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if(q[a+16>>2]-e>>4>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=c<<4;b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;So(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+(b<<4)|0;Em(d,q[b>>2],q[b+4>>2],b+8|0);b=q[b+12>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(4957,4863,158,4923);G()}J(4977,4863,159,4923);G()}function ey(a,b,c){var d=0,e=0;a:{if(!a){break a}d=q[a+72>>2];if(!d|t[a+16>>2]<=b>>>0|(!c|q[a+20>>2]!=1)){break a}a=q[d>>2];if(!a){break a}d=q[d+16>>2]+(b<<2)|0;e=q[d>>2];q[c>>2]=b;q[c+4>>2]=q[d>>2];a=a+e|0;p[c+8>>1]=r[a+4|0]|r[a+5|0]<<8;p[c+10>>1]=r[a+6|0]|r[a+7|0]<<8;p[c+12>>1]=r[a+8|0]|r[a+9|0]<<8;p[c+14>>1]=r[a+10|0]|r[a+11|0]<<8;q[c+16>>2]=r[a+16|0]|r[a+17|0]<<8|(r[a+18|0]<<16|r[a+19|0]<<24);q[c+24>>2]=r[a+20|0]|r[a+21|0]<<8|(r[a+22|0]<<16|r[a+23|0]<<24);q[c+28>>2]=0;q[c+32>>2]=r[a+24|0]|r[a+25|0]<<8|(r[a+26|0]<<16|r[a+27|0]<<24);q[c+36>>2]=0;p[c+40>>1]=r[a+36|0]|r[a+37|0]<<8;q[c+44>>2]=r[a+38|0]|r[a+39|0]<<8|(r[a+40|0]<<16|r[a+41|0]<<24);q[c+48>>2]=r[a+42|0]|r[a+43|0]<<8|(r[a+44|0]<<16|r[a+45|0]<<24);q[c+52>>2]=0;d=a+46|0;b=r[a+28|0]|r[a+29|0]<<8;b=b>>>0<259?b:259;o[Ti(c+60|0,d,b)+b|0]=0;b=r[a+32|0]|r[a+33|0]<<8;b=b>>>0<255?b:255;q[c+56>>2]=b;o[Ti(c+320|0,(d+(r[a+28|0]|r[a+29|0]<<8)|0)+(r[a+30|0]|r[a+31|0]<<8)|0,b)+b|0]=0;e=1}return e}function HV(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;c=q[a+68>>2];i=q[c+444>>2];f=q[a>>2];e=q[(i?c+448|0:f+132|0)>>2];j=q[f+128>>2];d=-27648;a:{b:{c:{switch(b-5|0){case 0:b=(e<<8&16711680|e<<24)>>>16|0;o[c+1192|0]=b;o[c+1193|0]=b>>>8;d=-28928;if(e>>>0>1058){break a}b=Ui(c+1194|0,0,e)+e|0;break b;case 1:h=c+1194|0;d=IE(c+8|0,h,1058,g+12|0,q[f+24>>2],q[f+28>>2]);if(d){break a}b=q[g+12>>2];d=(b<<24|b<<8&16711680)>>>16|0;o[c+1192|0]=d;o[c+1193|0]=d>>>8;b=b+h|0;break b;case 3:h=c+1194|0;d=GE(c+132|0,g+8|0,h,1058,q[f+24>>2],q[f+28>>2]);if(d){break a}b=q[g+8>>2];d=(b<<24|b<<8&16711680)>>>16|0;o[c+1192|0]=d;o[c+1193|0]=d>>>8;b=b+h|0;break b;case 2:break c;default:break a}}o[c+1192|0]=0;o[c+1193|0]=48;b=c+1242|0}d=-28928;c=c+2252|0;if((c-b|0)<2){break a}f=(e<<8&16711680|e<<24)>>>16|0;o[b|0]=f;o[b+1|0]=f>>>8;b=b+2|0;if(b>>>0>c>>>0|c-b>>>0>>0){break a}b=Ti(b,i?i:j,e);a=q[a+68>>2];q[a+1124>>2]=((b+e|0)-a|0)-1192;d=0}Ii=g+16|0;return d}function qA(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{switch(b+1|0){case 1:J(6560,6227,156,6525);G();case 0:J(6575,6227,157,6525);G();default:break a}}b:{if((c|0)!=-1){e=q[a+8>>2];if((q[a+16>>2]-e|0)/12>>>0>c>>>0){break b}c:{if(!e){q[a+4>>2]=b;b=b<<2;e=Yi(b);q[a>>2]=e;Ui(e,255,b);c=w(c,12);b=Yi(c);q[a+12>>2]=b;q[a+8>>2]=b;q[a+16>>2]=b+c;break c}q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;qA(d,b,c);e=q[a+4>>2];if(e){c=0;while(1){b=q[q[a>>2]+(c<<2)>>2];if((b|0)!=-1){while(1){b=q[a+8>>2]+w(b,12)|0;Mv(d,q[b>>2],b+4|0);b=q[b+8>>2];if((b|0)!=-1){continue}break}e=q[a+4>>2]}c=c+1|0;if(e>>>0>c>>>0){continue}break}}Ni(q[a>>2]);Ni(q[a+8>>2]);b=q[d+28>>2];q[a+24>>2]=q[d+24>>2];q[a+28>>2]=b;b=q[d+20>>2];q[a+16>>2]=q[d+16>>2];q[a+20>>2]=b;b=q[d+12>>2];q[a+8>>2]=q[d+8>>2];q[a+12>>2]=b;b=q[d+4>>2];q[a>>2]=q[d>>2];q[a+4>>2]=b}Ii=d+32|0;return}J(6597,6227,158,6525);G()}J(6617,6227,159,6525);G()}function pL(a,b,c,d,e,f,g,h,i,j){fn(a);q[a+148>>2]=q[f>>2];q[a+144>>2]=q[g>>2];q[a+156>>2]=q[c>>2];b=q[b>>2];q[a+284>>2]=h;q[a+280>>2]=0;q[a+224>>2]=b;rza(a+16|0,i);i=q[e>>2];a:{if(!i){i=q[d>>2];if(!i){break a}}b=q[i+4>>2];q[a+160>>2]=q[i>>2];q[a+164>>2]=b}i=q[e+4>>2];b:{if(!i){i=q[d+4>>2];if(!i){break b}}b=q[i+4>>2];q[a+168>>2]=q[i>>2];q[a+172>>2]=b}i=q[e+8>>2];c:{if(!i){i=q[d+8>>2];if(!i){break c}}b=q[i+4>>2];q[a+176>>2]=q[i>>2];q[a+180>>2]=b}i=q[e+12>>2];d:{if(!i){i=q[d+12>>2];if(!i){break d}}b=q[i+4>>2];q[a+184>>2]=q[i>>2];q[a+188>>2]=b}i=q[e+16>>2];e:{if(!i){i=q[d+16>>2];if(!i){break e}}b=q[i+4>>2];q[a+192>>2]=q[i>>2];q[a+196>>2]=b}i=q[e+20>>2];f:{if(!i){i=q[d+20>>2];if(!i){break f}}b=q[i+4>>2];q[a+200>>2]=q[i>>2];q[a+204>>2]=b}i=q[e+24>>2];g:{if(!i){i=q[d+24>>2];if(!i){break g}}b=q[i+4>>2];q[a+208>>2]=q[i>>2];q[a+212>>2]=b}e=q[e+28>>2];h:{if(!e){e=q[d+28>>2];if(!e){break h}}b=q[e+4>>2];q[a+216>>2]=q[e>>2];q[a+220>>2]=b}if(j){Gr(a,j)}}function tW(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-32|0;Ii=f;g=-4;a:{if(!d|!e|(q[d+8>>2]|q[e+8>>2])){break a}if((Jj(a,0)|0)<1){break a}if((Jj(c,1)|0)<1){break a}if((_j(c,a)|0)>-1){break a}if((Jj(b,1)|0)<1){break a}if((_j(b,a)|0)>-1){break a}q[f+8>>2]=0;q[f>>2]=1;q[f+4>>2]=0;q[f+24>>2]=0;q[f+16>>2]=1;q[f+20>>2]=0;g=Wk(f+16|0,c,b);b:{if(g){break b}g=Pl(f+16|0,f+16|0,1);if(g){break b}h=vs(f+16|0)&65535;c:{if(!h){break c}g=kl(f+16|0,h);if(g){break b}c=(q[q[a+8>>2]>>2]&7)==1;while(1){Bk(f,r[c+155904|0]);g=ws(d,f,a);if(g){break b}if(!Jj(d,1)){b=1;g=Do(f,f,f+16|0,a,e);if(g){break b}while(1){if(Jj(f,1)){g=NW(f,f);if(g){break b}g=ws(d,f,a);if(g){break b}d:{if((Jj(d,1)|0)!=1){break d}if((_j(d,a)|0)!=-1){break d}g=ry(e,0,a,d);break b}g=Pl(f,f,1);if(g){break b}g=Wk(f,f,f);if(g){break b}g=gl(f,f,a);if(g){break b}b=b+1|0;if((b&65535)>>>0<=h>>>0){continue}}break}if(Jj(f,1)){break c}}c=c+1|0;if((c|0)!=54){continue}break}}g=-4}ij(f);ij(f+16|0)}Ii=f+32|0;return g}function Lt(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=q[b+140>>2];g=e;h=q[b+136>>2];f=e;a:{b:{c:{d:{d=e&32767;e=q[a+1036>>2];i=q[a+1040>>2]-e|0;if(d>>>0>2>>>0){if(q[(d<<2)+e>>2]!=(b|0)){break d}if(q[b+80>>2]!=(a|0)){break c}if(!(r[a+3272|0]&2|(g&32768)!=0)){d=f;f=s[b+144>>1];d=d|0;e:{if(!c){break e}c=s[b+150>>1]&32767;if((c|0)==32767){break e}f:{if(i>>2>>>0>c>>>0){while(1){c=q[(c<<2)+e>>2];if(s[c+138>>1]!=(q[b+140>>2]&32767)){break b}d=q[c+148>>2];Lt(a,c,1);c=d&32767;if((c|0)==32767){break f}e=q[a+1036>>2];if(q[a+1040>>2]-e>>2>>>0>c>>>0){continue}break}}break a}f=s[b+144>>1];c=q[b+140>>2];g=c;h=q[b+136>>2];d=c}p[b+144>>1]=f;q[b+136>>2]=h;q[b+140>>2]=g|32768;b=d&32767;c=s[a+3262>>1];g:{if((c|0)!=32767){d=q[a+1036>>2];if(c>>>0>=q[a+1040>>2]-d>>2>>>0){break a}p[q[d+(c<<2)>>2]+144>>1]=b;break g}p[a+3260>>1]=b}p[a+3262>>1]=b}return}break a}J(8193,7192,1864,8248);G()}J(8255,7192,1865,8248);G()}J(8292,7192,1883,8248);G()}J(12419,9962,479,9454);G()}function sna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-16|0;Ii=b;a:{b:{c=q[a+132>>2];f=q[(c+112|0)+4>>2];e=q[c+112>>2];c:{if((f|0)==(e|0)){break c}d=b+8|0;q[d>>2]=0;q[d+4>>2]=0;q[b>>2]=0;q[b+4>>2]=0;e=f-e|0;f=(e|0)/176|0;Wi(f,48,b,d,b|4);g=q[b>>2];if(f>>>0>(q[d>>2]-g|0)/48>>>0){break b}q[b+4>>2]=w(f,48)+g;if(e){i=f>>>0>1?f:1;h=q[c+112>>2];j=(q[c+116>>2]-h|0)/176|0;e=0;while(1){if((e|0)==(j|0)|(e|0)==(f|0)){break a}c=w(e,48)+g|0;d=w(e,176)+h|0;u[c>>2]=u[d>>2];u[c+4>>2]=u[d+4>>2];u[c+8>>2]=u[d+8>>2];u[c+12>>2]=u[d+12>>2];u[c+16>>2]=u[d+16>>2];u[c+20>>2]=u[d+20>>2];u[c+24>>2]=u[d+24>>2];u[c+32>>2]=u[d+32>>2];u[c+36>>2]=u[d+36>>2];u[c+40>>2]=u[d+40>>2];e=e+1|0;if((i|0)!=(e|0)){continue}break}}c=q[a+220>>2];if((c|0)==q[a+224>>2]){break a}c=q[c>>2];nM(q[q[c+80>>2]+8>>2],a+16|0,q[c+140>>2]&32767,g,f);if(o[b+12|0]&1){break c}a=q[b>>2];if(!a){break c}Ni(a)}Ii=b+16|0;return}J(51289,51308,506,51364);G()}J(51709,51308,479,51547);G()}function JI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=h-g>>5){e=q[a+4>>2];c:{if(!e){break c}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break c}while(1){e=g+(f<<5)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break b}f=q[e+28>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];d:{if((h|0)!=(e|0)){q[a+12>>2]=e+32;break d}e=q[a+20>>2];if((e|0)==-1){break a}e=g+(e<<5)|0;q[a+20>>2]=q[e+28>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;f=q[d+12>>2];q[e+16>>2]=q[d+8>>2];q[e+20>>2]=f;q[e+24>>2]=q[d+16>>2];q[e+28>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)!=-1){while(1){b=d+(f<<5)|0;f=q[b+28>>2];if((f|0)!=-1){continue}break}b=b+28|0}q[b>>2]=e-d>>5;q[a+24>>2]=q[a+24>>2]+1;return}J(124001,123864,229,124009);G()}c=q[d+4>>2];a=g+(f<<5)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=c;q[a+24>>2]=q[d+16>>2];b=q[d+12>>2];q[a+16>>2]=q[d+8>>2];q[a+20>>2]=b;return}J(124013,123864,537,124075);G()}function S6(a,b){var c=0,d=0,e=0,f=0;d=Ii-48|0;Ii=d;c=q[72006];a:{if(!c){break a}while(1){e=q[b+24>>2];if((e|0)==q[b+16>>2]-q[b+8>>2]>>4){e=e+8|0;So(b,e>>>1|0,e)}q[d+40>>2]=b;q[d+24>>2]=a;e=q[c>>2];q[d+28>>2]=e;q[d+32>>2]=Oi(e);q[d+36>>2]=Li;e=Mi[q[c+4>>2]](d+24|0)|0;f=q[c>>2];if(e){c=25719;b:{c:{switch(e+21|0){case 18:c=25729;break b;case 17:c=25748;break b;case 16:c=25771;break b;case 15:c=25790;break b;case 14:c=25796;break b;case 13:c=25818;break b;case 12:c=25832;break b;case 11:c=25841;break b;case 10:c=25852;break b;case 9:c=25869;break b;case 8:c=25892;break b;case 7:c=25905;break b;case 6:c=25920;break b;case 5:c=25934;break b;case 4:c=25954;break b;case 2:c=25962;break b;case 1:c=25979;break b;case 0:c=25998;break b;default:c=26012;break b;case 19:break b;case 20:break c}}c=25706}q[d+4>>2]=c;q[d>>2]=f;Pi(4,24640,26068,d);break a}q[d+16>>2]=f;e=0;Pi(0,24640,26101,d+16|0);c=q[c+12>>2];if(c){continue}break}}Ii=d+48|0;return e}function Ru(a,b,c,d){var e=0,f=0,g=0,h=0;f=q[b+8>>2];a:{b:{while(1){c:{if((f|0)==5){g=q[b>>2];f=Ky(a,g,c);d:{if(q[f+8>>2]){break d}e=q[g+8>>2];if(!e|r[e+6|0]&2){break d}e=eo(e,1,q[q[a+16>>2]+192>>2]);if(e){break c}}b=q[d+4>>2];q[f>>2]=q[d>>2];q[f+4>>2]=b;q[f+8>>2]=q[d+8>>2];if(!(r[g+5|0]&4)|(!(r[q[d>>2]+5|0]&3)|q[d+8>>2]<4)){break a}a=q[a+16>>2];o[g+5|0]=r[g+5|0]&251;q[g+24>>2]=q[a+40>>2];q[a+40>>2]=g;return}e=el(a,b,1);if(q[e+8>>2]){break c}_u(a,b,142967)}f=q[e+8>>2];if((f|0)!=6){b=e;h=h+1|0;if((h|0)==100){break b}continue}break}f=q[e+4>>2];h=q[a+8>>2];q[h>>2]=q[e>>2];q[h+4>>2]=f;q[h+8>>2]=q[e+8>>2];f=q[b+4>>2];e=q[a+8>>2];q[e+16>>2]=q[b>>2];q[e+20>>2]=f;q[e+24>>2]=q[b+8>>2];b=q[c+4>>2];f=q[a+8>>2];q[f+32>>2]=q[c>>2];q[f+36>>2]=b;q[f+40>>2]=q[c+8>>2];b=q[d+4>>2];c=q[a+8>>2];q[c+48>>2]=q[d>>2];q[c+52>>2]=b;q[c+56>>2]=q[d+8>>2];e=q[a+8>>2];if((q[a+28>>2]-e|0)<=64){Mk(a,4);e=q[a+8>>2]}q[a+8>>2]=e- -64;Ul(a,e,0);return}Yk(a,142990,0)}}function Rq(a,b){var c=0,d=0,e=0,f=0;f=a+28|0;d=q[a>>2];e=d&63;o[f+e|0]=128;c=e+1|0;a:{if(e>>>0<=55){Ui((a+c|0)+28|0,0,55-e|0);break a}Ui((a+c|0)+28|0,0,e^63);Cs(a,f);c=f;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=q[a>>2]}o[a+91|0]=d<<3;o[a+90|0]=d>>>5;o[a+89|0]=d>>>13;o[a+88|0]=d>>>21;c=q[a+4>>2];o[a+86|0]=c>>>5;o[a+85|0]=c>>>13;o[a+84|0]=c>>>21;o[a+87|0]=c<<3|d>>>29;Cs(a,f);o[b|0]=r[a+11|0];o[b+1|0]=s[a+10>>1];o[b+2|0]=q[a+8>>2]>>>8;o[b+3|0]=q[a+8>>2];o[b+4|0]=r[a+15|0];o[b+5|0]=s[a+14>>1];o[b+6|0]=q[a+12>>2]>>>8;o[b+7|0]=q[a+12>>2];o[b+8|0]=r[a+19|0];o[b+9|0]=s[a+18>>1];o[b+10|0]=q[a+16>>2]>>>8;o[b+11|0]=q[a+16>>2];o[b+12|0]=r[a+23|0];o[b+13|0]=s[a+22>>1];o[b+14|0]=q[a+20>>2]>>>8;o[b+15|0]=q[a+20>>2];o[b+16|0]=r[a+27|0];o[b+17|0]=s[a+26>>1];o[b+18|0]=q[a+24>>2]>>>8;o[b+19|0]=q[a+24>>2];return 0}function a2(a,b,c,d){var e=0,f=0,g=0;g=Ii-48|0;Ii=g;q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;e=g;q[e+24>>2]=0;q[e+28>>2]=0;q[e+32>>2]=0;q[e+36>>2]=0;q[e+40>>2]=0;q[e+44>>2]=0;q[e+24>>2]=1;q[e+16>>2]=0;q[e+20>>2]=0;f=c^d?2:0;q[e+20>>2]=d?c?f:10:f;f=-100;if(!(ja(a|0,0,e+16|0,e+12|0)|0)){a=q[g+12>>2];a:{if(!a){break a}if(c){while(1){b:{c=q[a+4>>2];if((c|0)!=2){if(!d|(c|0)!=10){break b}d=q[a+20>>2];q[b>>2]=2;c=Zs(b);b=c;a=q[d+20>>2];q[b+8>>2]=q[d+16>>2];q[b+12>>2]=a;a=q[d+12>>2];q[b>>2]=q[d+8>>2];q[b+4>>2]=a;f=0;break a}a=q[a+20>>2];q[b>>2]=1;a=q[a+4>>2];q[nv(b)>>2]=a;f=0;break a}a=q[a+28>>2];if(a){continue}break a}}if(d){while(1){c=q[a+4>>2]!=10;if(!c){d=q[a+20>>2];q[b>>2]=2;c=Zs(b);b=c;a=q[d+20>>2];q[b+8>>2]=q[d+16>>2];q[b+12>>2]=a;a=q[d+12>>2];q[b>>2]=q[d+8>>2];q[b+4>>2]=a;f=0;break a}a=q[a+28>>2];if(!a){break a}if(c){continue}break a}}while(1){a=q[a+28>>2];if(a){continue}break}}Ni(q[g+12>>2])}Ii=g+48|0;return f}function yza(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{d=b;if(d){e=c;if(!e){break i}break h}b=a;a=(a>>>0)/(c>>>0)|0;Ji=b-w(a,c)|0;Ki=0;Li=0;return a}if(!a){break g}break f}g=e-1|0;if(!(g&e)){break e}g=(z(e)+33|0)-z(d)|0;i=0-g|0;break c}Ji=0;a=(d>>>0)/0|0;Ki=d-w(a,0)|0;Li=0;return a}d=32-z(d)|0;if(d>>>0<31){break d}break b}Ji=a&g;Ki=0;if((e|0)==1){break a}d=zza(e);c=d&31;if((d&63)>>>0>=32){e=0;a=b>>>c|0}else{e=b>>>c|0;a=((1<>>c}Li=e;return a}g=d+1|0;i=63-d|0}d=b;e=g&63;f=e&31;if(e>>>0>=32){e=0;f=d>>>f|0}else{e=d>>>f|0;f=((1<>>f}i=i&63;d=i&31;if(i>>>0>=32){b=a<>>32-d|b<>>31;j=h;e=e<<1|f>>>31;h=i-(e+(d>>>0>>0)|0)>>31;k=c&h;f=j-k|0;e=e-(j>>>0>>0)|0;b=b<<1|a>>>31;a=l|a<<1;h=h&1;l=h;g=g-1|0;if(g){continue}break}}Ji=f;Ki=e;Li=b<<1|a>>>31;return h|a<<1}Ji=a;Ki=b;a=0;b=0}Li=b;return a}function rma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-464|0;Ii=b;g=nj(b+184|0,a,1,76581,1788);d=kj(a,1,0);q[b+176>>2]=0;q[b+180>>2]=0;jB(a,d,76979,b+176|0);Ui(b- -64|0,0,112);Dj(a,2,5);ej(a,2);Zi(a,-1,76992);e=$j(a,-1);c=Li;f=c;c=Cp(a,q[74445],e,c,77180);h=q[c>>2];c=q[c+4>>2];Ri(a,-2);q[b+208>>2]=0;q[b+40>>2]=0;q[b+60>>2]=0;BL(a,b+208|0,b+40|0,b+60|0);kL(a,e,f,h,c,q[b+208>>2],r[b+40|0],q[b+60>>2],b- -64|0);Ri(a,-2);f=q[q[jk(a)+80>>2]+8>>2];q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;if(!Nt(b- -64|0,q[61028],b+40|0)){q[b+60>>2]=0;c=d;d=q[b+40>>2];d=Uz(q[74445],c,d,q[b+44>>2]-d|0,b+60|0);e=q[b+176>>2];c=q[b+180>>2];a:{if(d){q[b+32>>2]=aj(e,c);q[b+24>>2]=e;q[b+28>>2]=c;q[b+16>>2]=d;sj(b+208|0,256,(d|0)==-3?76793:(d|0)==-15?76835:76900,b+16|0);q[b>>2]=b+208;a=Qi(a,75832,b);break a}KB(f,e,c);lk(a,e,c);a=1}b:{if(o[b+52|0]&1){break b}d=q[b+40>>2];if(!d){break b}Ni(d)}mj(g);Ii=b+464|0;return a|0}J(77e3,76581,1826,77031);G()}function am(a,b,c){var d=0;d=Ii-144|0;Ii=d;q[d+140>>2]=c+4;c=q[c>>2];c=(b|0)==4?c|32768:c;a:{b:{if(b>>>0>16){break b}if(!(1<>2]=c;a=R(a|0,14,d+16|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}break a}q[d+48>>2]=d+128;b=R(a|0,16,d+48|0)|0;if(b){if((b|0)==-28){q[d+32>>2]=c;a=R(a|0,9,d+32|0)|0;break a}if(b>>>0>=4294963201){q[240513]=0-b;a=-1}else{a=b}break a}a=q[d+132>>2];a=q[d+128>>2]==2?0-a|0:a;break a}q[d+112>>2]=c;a=R(a|0,b|0,d+112|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}break a}if((b|0)!=1030){q[d>>2]=c;a=R(a|0,b|0,d|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}break a}q[d+96>>2]=c;b=R(a|0,1030,d+96|0)|0;if((b|0)!=-28){a=b;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}break a}q[d+80>>2]=0;b=R(a|0,1030,d+80|0)|0;if((b|0)!=-28){if((b|0)>=0){pa(b|0)|0}q[240513]=28;a=-1;break a}q[d+64>>2]=c;a=R(a|0,0,d- -64|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}}Ii=d+144|0;return a}function Zma(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=x(0),i=x(0),j=0;b=Ii-80|0;Ii=b;d=q[a+8>>2];c=q[d+20>>2];q[73120]=q[73120]+(c-q[d+16>>2]>>4);c=c-q[d+16>>2]>>4;q[b+56>>2]=c;q[b+60>>2]=0;q[b+72>>2]=c;q[b+76>>2]=0;c=q[d>>2];if((c|0)!=q[d+4>>2]){while(1){c=w(f,104)+c|0;a:{if(!q[c+8>>2]){break a}q[73142]=q[73142]+1;q[b+64>>2]=1;q[b+68>>2]=0;q[b+48>>2]=1;q[b+52>>2]=0;h=u[c+88>>2];i=x(h-u[q[a+4>>2]+4>>2]);u[c+88>>2]=i;b:{if(!(i>2];if(!(h>=x(0)^1)){c=O1(e);if(!c){break a}q[b+32>>2]=c;Pi(4,49438,49446,b+32|0);g=-1e3;break a}j=R1(e);e=r[c+96|0];if(j?0:!(e&6)){break b}if(e&2){o[c+96|0]=e&253;c=P1(q[c+8>>2],(e&4)>>>2|0);if(!c){break a}q[b+16>>2]=c;Pi(4,49438,49472,b+16|0);g=-1e3;break a}if(!(e&1)){break a}c=mG(q[c+8>>2]);if(!c){break a}q[b>>2]=c;Pi(4,49438,49498,b);g=-1e3;break a}if(!(o[c+96|0]&1)){break a}}g=yla(d,c,f)}f=f+1|0;c=q[d>>2];if(f>>>0<(q[d+4>>2]-c|0)/104>>>0){continue}break}}kG();Ii=b+80|0;return g|0}function cua(a){var b=0,c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;d=q[a+12>>2];b=q[a+8>>2];c=d-b|0;a:{if(!c){break a}b:{if((b|0)!=(d|0)){d=b-d|0;d=((c|0)<(d|0)?d:c)>>>6|0;c=(c|0)>-1?c:-1;c=w(d,(c|0)<1?c:1);g=c>>>0>1?c:1;c=0;d=0;while(1){c:{d:{e:{b=(c<<6)+b|0;switch(q[b+48>>2]-1|0){case 0:break d;case 1:break e;default:break c}}d=d+1|0;break c}e=q[b+40>>2];if(e){ht(e);q[b+40>>2]=0}e=q[b+44>>2];if((e|0)!=-1){qp(e);Cm(q[b+44>>2])}q[b>>2]=0;q[b+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+44>>2]=-1;q[b+40>>2]=0;q[b+48>>2]=0}c=c+1|0;if((g|0)==(c|0)){break b}b=q[a+8>>2];if(q[a+12>>2]-b>>6>>>0>c>>>0){continue}break}}J(167814,167666,479,167825);G()}if((d|0)<=0){break a}q[f>>2]=d;Pi(3,167731,167736,f)}Qn(q[a+28>>2]);f:{if(o[a+20|0]&1){break f}b=q[a+8>>2];if(!b){break f}Ni(b)}Ii=f+16|0;return a}function HH(a,b,c,d){var e=x(0),f=0,g=x(0),h=0,i=0,j=0,k=x(0),l=0,m=0,n=x(0),o=0;f=Ii-16|0;Ii=f;k=u[a+4>>2];i=q[a>>2];q[f+12>>2]=b;a:{if((c|0)<1){break a}b=0;while(1){j=Ko(f+12|0);g=e;n=k;b:{c:{d:{e:{h=q[i+24>>2];f:{if(!h){break f}l=q[i+20>>2];a=q[l+((j>>>0)%(h>>>0)<<2)>>2];if((a|0)!=-1){o=q[i+28>>2];while(1){a=w(a,80)+o|0;if(q[a>>2]==(j|0)){break e}a=q[a+72>>2];if((a|0)!=-1){continue}break}}a=q[(126%(h>>>0)<<2)+l>>2];if((a|0)==-1){break f}h=q[i+28>>2];while(1){a=h+w(a,80)|0;if(q[a>>2]==126){break d}a=q[a+72>>2];if((a|0)!=-1){continue}break}}q[f>>2]=j;Pi(3,112261,113127,f);break b}b=a+8|0;break c}b=a+8|0}e=x(n+u[b+8>>2]);g:{if(x(y(e))>2]!=32)){g=u[b+8>>2];if(x(y(g))>2];a=q[b+4>>2]}e=x(x(e-x(g-x(u[b+12>>2]+x(a>>>0))))-k)}Ii=f+16|0;return e}function W2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-32|0;Ii=f;h=nj(f+8|0,a,1,132848,754);c=jj(a,1);b=q[210420];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;tv(a);a:{b:{c:{if((Vi(a,-1)|0)!=2){Ri(a,-2);break c}b=qj(a,-1);Ri(a,-2);if(b){break b}}Pi(4,133348,133753,0);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break a}e=c&65535;d=q[b+16>>2];if(e>>>0>=q[b+20>>2]-d>>1>>>0){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break a}d=s[(e<<1)+d>>1];e=q[b+4>>2];b=q[b>>2];if(d>>>0>=(e-b|0)/28>>>0){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break a}if((c|0)!=q[(b+w(d,28)|0)+12>>2]){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break a}vj(a,0,0);b=b+w(d,28)|0;g=+u[b+16>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=g;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,133827);g=+u[b+20>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=g;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,133483);b=o[b+24|0]&1;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,133842)}mj(h);Ii=f+32|0;return 1}function N0(a,b,c,d,e,f){var g=0,h=0,i=0;g=Ii-112|0;Ii=g;q[g+16>>2]=0;q[g+8>>2]=1;q[g+12>>2]=0;q[g+28>>2]=0;q[g+20>>2]=1;q[g+24>>2]=0;q[g+40>>2]=0;q[g+32>>2]=1;q[g+36>>2]=0;q[g+104>>2]=0;q[g+96>>2]=1;q[g+100>>2]=0;q[g+88>>2]=0;q[g+80>>2]=1;q[g+84>>2]=0;h=g- -64|0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;q[g+56>>2]=0;q[g+48>>2]=1;q[g+52>>2]=0;a:{if(!q[a+84>>2]){h=-20352;break a}h=-19968;b:{if((Jj(e,1)|0)<0){break b}i=a+76|0;if((_j(e,i)|0)>-1){break b}if((Jj(f,1)|0)<0){break b}if((_j(f,i)|0)>-1){break b}h=VB(a,g+96|0,b,c);if(h){break b}h=Co(g+80|0,f,i);if(h){break b}h=Wk(g- -64|0,g+96|0,g+80|0);if(h){break b}h=gl(g- -64|0,g- -64|0,i);if(h){break b}h=Wk(g+48|0,e,g+80|0);if(h){break b}h=gl(g+48|0,g+48|0,i);if(h){break b}h=fX(a,g+8|0,g- -64|0,a+40|0,g+48|0,d);if(h){break b}h=-19968;if(zE(g+8|0)){break b}h=gl(g+8|0,g+8|0,i);if(h){break b}h=_j(g+8|0,e)?-19968:0}nm(g+8|0);ij(g+96|0);ij(g+80|0);ij(g- -64|0);ij(g+48|0)}Ii=g+112|0;return h}function _B(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{if(d>>>0<21){d:{if(!(898778>>>d&1)){if(b|c){break c}b=q[w(d,12)+99504>>2];d=8;c=0;while(1){e=(b|0)>(d|0)?d:b;g=a>>>((b|0)>(e|0)?b-e|0:0)|0;if(g>>>e|0){break b}d=d-e|0;c=g<0){continue}break}break d}if(1198383>>>d&1){break a}h=d<<3;g=q[h+248320>>2];f=r[g|0];if((f|0)!=48){e=a>>>f-97<<1&2}f=r[g+1|0];if((f|0)!=48){e=a>>>f-97&1|e}e=e<<1;f=r[g+2|0];if((f|0)!=48){e=e|a>>>f-97&1}e=e<<1;f=r[g+3|0];if((f|0)!=48){e=e|a>>>f-97&1}e=e<<1;f=r[g+4|0];if((f|0)!=48){e=e|a>>>f-97&1}e=e<<1;f=r[g+5|0];if((f|0)!=48){e=a>>>f-97&1|e}f=599186>>>d|0;d=e<<1;e=r[g+6|0];if((e|0)!=48){d=d|a>>>e-97&1}d=d<<1;e=r[g+7|0];if((e|0)!=48){d=a>>>e-97&1|d}e=q[(h+248320|0)+4>>2];d=d<<1;g=r[g+8|0];if((g|0)!=48){d=a>>>g-97&1|d}a=0-(a&1)&511;c=a&128|(a^w(e,f&1?b:c)+d)>>>2}return c}J(99810,96899,11411,99843);G()}J(99865,96899,11420,99843);G()}J(99897,96899,11431,99843);G()}J(99911,96899,11443,99843);G()}function Pz(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-80|0;Ii=f;q[f+72>>2]=0;k=q[a+5140>>2];Gj(k);a:{if(d){h=-3;i=q[a>>2];g=q[i+4>>2];b:{if(!g){break b}g=q[q[i>>2]+(Cza(b,c,g)<<2)>>2];if((g|0)==-1){break b}i=q[i+8>>2];while(1){j=i+w(g,48)|0;if((b|0)!=q[j>>2]|q[j+4>>2]!=(c|0)){g=q[j+40>>2];if((g|0)!=-1){continue}break b}break}g=i+w(g,48)|0;h=q[g+32>>2];i=q[h+32>>2];if(!i){h=-15;break b}if(!e){break a}q[f+32>>2]=a;h=q[h+12>>2];q[f+60>>2]=0;q[f+36>>2]=h;j=g+8|0;q[f+64>>2]=j;q[f+56>>2]=e;q[f+52>>2]=d;q[f+48>>2]=0;q[f+40>>2]=b;q[f+44>>2]=c;h=Mi[i|0](f+32|0)|0;if(h){break b}d=q[a+12>>2];if(!d){h=0;break b}h=0;e=q[d>>2];if((e|0)==q[d+4>>2]){break b}g=0;while(1){d=(g<<3)+e|0;e=q[d+4>>2];q[f+24>>2]=b;q[f+28>>2]=c;q[f+16>>2]=0;q[f+12>>2]=j;q[f+8>>2]=e;Mi[q[d>>2]](f+8|0);d=q[a+12>>2];e=q[d>>2];g=g+1|0;if(g>>>0>2]-e>>3>>>0){continue}break}}Bj(k);Ii=f+80|0;return h}J(25584,24997,1009,25572);G()}J(25589,24997,1021,25572);G()}function OK(a){var b=0,c=0,d=0,e=0;b=Ii-288|0;Ii=b;fa(q[a>>2],35721,b+284|0);a:{b:{c:{d:{e:{if(r[q[75054]+156|0]&64){d=K()|0;if(d){break e}}if(o[a+16|0]&1){break d}Wi(q[b+284>>2],24,a+4|0,a+12|0,a+8|0);d=q[b+284>>2];c=q[a+4>>2];if(d>>>0>(q[a+12>>2]-c|0)/24>>>0){break c}q[a+8>>2]=w(d,24)+c;if((d|0)<1){break a}d=0;while(1){qc(q[a>>2],d|0,256,b+12|0,b+8|0,b+4|0,b+16|0);f:{if(!(r[q[75054]+156|0]&64)){break f}e=K()|0;if(!e){break f}lj(e,92079,1925);J(88669,88575,1925,92079);G()}c=w(d,24)+c|0;q[c+8>>2]=oc(q[a>>2],b+16|0);q[c>>2]=Oi(b+16|0);q[c+4>>2]=Li;q[c+12>>2]=q[b+8>>2];q[c+16>>2]=q[b+4>>2];if(r[q[75054]+156|0]&64){c=K()|0;if(c){break b}}d=d+1|0;if((d|0)>=q[b+284>>2]){break a}c=q[a+4>>2];if((q[a+8>>2]-c|0)/24>>>0>d>>>0){continue}break}J(91269,90502,479,91280);G()}lj(d,92079,1907);J(88669,88575,1907,92079);G()}J(90427,90502,493,90558);G()}J(91333,90502,506,91352);G()}lj(c,92079,1931);J(88669,88575,1931,92079);G()}Ii=b+288|0}function jw(a,b){var c=0,d=0,e=0;d=q[b+56>>2];if((d|0)!=q[b+60>>2]){while(1){cj(a,q[(c<<2)+d>>2]);c=c+1|0;d=q[b+56>>2];if(c>>>0>2]-d>>2>>>0){continue}break}}d=q[b+8>>2];if((d|0)!=q[b+12>>2]){c=0;while(1){cj(a,q[(c<<2)+d>>2]);c=c+1|0;d=q[b+8>>2];if(c>>>0>2]-d>>2>>>0){continue}break}}d=q[b+72>>2];if((d|0)!=q[b+76>>2]){c=0;while(1){cj(a,q[(c<<2)+d>>2]);c=c+1|0;d=q[b+72>>2];if(c>>>0>2]-d>>2>>>0){continue}break}}d=q[b+40>>2];if((d|0)!=q[b+44>>2]){c=0;while(1){d=(c<<3)+d|0;e=q[d>>2];a:{if(e){cj(a,e);break a}cj(a,q[d+4>>2])}c=c+1|0;d=q[b+40>>2];if(c>>>0>2]-d>>3>>>0){continue}break}}e=q[b+104>>2];if(e){d=0;while(1){c=q[q[b+100>>2]+(d<<2)>>2];if((c|0)!=-1){while(1){c=q[b+108>>2]+(c<<4)|0;cj(a,q[c+8>>2]);c=q[c+12>>2];if((c|0)!=-1){continue}break}e=q[b+104>>2]}d=d+1|0;if(e>>>0>d>>>0){continue}break}}c=q[b+4>>2];if(c){cj(a,c)}c=q[b>>2];if(c){Aj(c)}c=q[b+88>>2];if(c){Ni(c)}b=q[b+96>>2];if(b){cj(a,b)}}function J5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;i=Ii-32|0;Ii=i;g=-2;h=q[a+2200>>2];a:{if(!h){break a}h=q[q[a+2196>>2]+(Cza(b,c,h)<<2)>>2];if((h|0)==-1){break a}j=q[a+2204>>2];while(1){k=j+w(h,24)|0;if(q[k>>2]!=(b|0)|q[k+4>>2]!=(c|0)){h=q[k+20>>2];if((h|0)!=-1){continue}break a}break}g=-4;b=j+w(h,24)|0;if(t[b+12>>2]>f>>>0){break a}g=-3;if(bG(q[a+2188>>2],q[b+16>>2])){break a}g=j+w(h,24)|0;b:{if(q[g+8>>2]){b=i;c=q[a+2188>>2];if(c){c=q[c+96>>2]}else{c=0}q[b+24>>2]=c;c=q[i+24>>2];b=$i(c);hz(q[a+2188>>2],b,c);c=b+16|0;f=q[i+24>>2]-16|0;g=q[g+8>>2];h=q[g+32>>2];j=h&8;k=q[(j?28:24)+g>>2];g=q[g+24>>2];c:{if(!(h&4)){break c}if(!(Mi[q[57767]](c,f)|0)){break c}q[i+16>>2]=d;Pi(4,33493,33885,i+16|0);Ni(b);g=-3;break b}d:{if(j){if(!oI(c,k,e,g,i+28|0)){break d}q[i>>2]=d;Pi(4,33493,33917,i);Ni(b);g=-3;break b}Ti(e,c,f)}Ni(b);g=0;break b}hz(q[a+2188>>2],e,f);g=0}bx(q[a+2188>>2])}Ii=i+32|0;return g|0}function Nw(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;Nm(a,b);a:{b:{c:{d:{e:{f:{g:{h:{i:{d=q[b>>2];switch(d-1|0){case 11:break d;case 10:break e;case 4:break f;case 3:break g;case 1:case 2:break h;case 0:break i;default:break a}}d=q[a+24>>2];if((d|0)<=q[a+28>>2]){break c}if(!d){if(r[a+50|0]<=(c|0)){break b}break c}f=(q[q[a>>2]+12>>2]+(d<<2)|0)-4|0;d=q[f>>2];if((d&63)!=3|(d>>>6&255)>(c|0)){break c}g=d>>>23|0;if((g+1|0)<(c|0)){break c}if((c|0)<=(g|0)){break b}q[f>>2]=d&8388607|c<<23;break b}fl(a,c<<6|((d|0)==2?8388608:2)|2,q[q[a+12>>2]+8>>2]);break b}fl(a,c<<6|q[b+8>>2]<<14|1,q[q[a+12>>2]+8>>2]);break b}h=v[b+8>>3];q[e+8>>2]=3;v[e>>3]=h;fl(a,c<<6|Vr(a,e,e)<<14|1,q[q[a+12>>2]+8>>2]);break b}a=q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)|0;q[a>>2]=q[a>>2]&-16321|c<<6&16320;break b}d=q[b+8>>2];if((d|0)==(c|0)){break b}fl(a,d<<23|c<<6,q[q[a+12>>2]+8>>2]);break b}fl(a,c<<23|c<<6|3,q[q[a+12>>2]+8>>2])}q[b>>2]=12;q[b+8>>2]=c}Ii=e+16|0}function Noa(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=0,n=0;c=Ii-32|0;Ii=c;a:{if(q[q[a+16>>2]+80>>2]!=q[58592]){break a}h=q[q[q[a>>2]+80>>2]+8>>2];b=q[a+16>>2];f=q[b+84>>2];d=q[b+160>>2];i=q[q[a+12>>2]>>2];a=q[b+132>>2];k=a;j=q[b+128>>2];if(!(a|j)){b:{if((d|0)!=-1){break b}d=LB(h);if((d|0)!=-1){break b}Pi(4,39489,39497,0);break a}j=IB(d);k=Li}l=u[b+144>>2];e=u[b+148>>2];c:{if(!(l!=x(0)|e!=x(0)|u[b+152>>2]!=x(0))){e=u[b+136>>2];u[c+20>>2]=e;u[c+16>>2]=e;break c}u[c+20>>2]=e;u[c+16>>2]=l;e=u[b+152>>2]}u[c+24>>2]=e;a=0;d:{if(!h){break d}g=q[h>>2];if(!g){break d}a=q[g>>2]}g=a;n=b+176|0;m=f-80|0;a=q[i+4>>2];if(!a){a=q[i>>2]}f=q[a>>2];e:{if(f){break e}if(!ak(g,q[a+4>>2],a)){f=q[a>>2];break e}q[c>>2]=q[a+4>>2];Pi(4,39489,39672,c);f=0}g=h;a=q[i+4>>2];if(!a){a=q[i>>2]}a=VL(g,f,q[a+4>>2],j,k,m?n:0,m,b+96|0,b+112|0,c+16|0);if((d|0)==-1){break a}if(a){if(a){q[a+88>>2]=d}break a}vB(d,h)}Ii=c+32|0;return 0}function fl(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=q[a+24>>2];f=q[a>>2];d=q[a+32>>2];if((d|0)!=-1){e=f;while(1){h=q[e+12>>2]+(d<<2)|0;j=q[h>>2];e=(j>>>14|0)-131071|0;k=(e|0)==-1;l=(d+e|0)+1|0;a:{if((d|0)>=1){e=h-4|0;i=q[e>>2];if(o[(i&63)+141360|0]<0){break a}}i=j;e=h}k=k?-1:l;b:{c:{d:{if((i&63)==27){q[e>>2]=i&8372224|i>>>17&32704|26;d=(d^-1)+g|0;e=d>>31;if((e^d+e)>131071){break d}break c}d=(d^-1)+g|0;e=d>>31;if((e^d+e)<131072){break b}}Sj(q[a+12>>2],141849)}j=q[h>>2]}q[h>>2]=(j&16383|d<<14)+2147467264;if((k|0)!=-1){e=q[a>>2];d=k;continue}break}g=q[a+24>>2]}q[a+32>>2]=-1;e:{if(q[f+44>>2]>(g|0)){d=q[f+12>>2];break e}d=_q(q[a+16>>2],q[f+12>>2],f+44|0,4,2147483645,141900);q[f+12>>2]=d;g=q[a+24>>2]}q[(g<<2)+d>>2]=b;d=q[a+24>>2];f:{if((d|0)>2]){e=q[f+20>>2];break f}e=_q(q[a+16>>2],q[f+20>>2],f+48|0,4,2147483645,141900);q[f+20>>2]=e;d=q[a+24>>2]}q[(d<<2)+e>>2]=c;b=a;a=q[a+24>>2];q[b+24>>2]=a+1;return a}function w6(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-3296|0;Ii=c;yp(b,q[57764],c- -64|0);if(bm(c- -64|0)){g=q[a+20>>2];Gj(g);q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;a:{if(v6(c- -64|0,c+48|0)){Pi(4,27874,27977,0);break a}f=q[c+52>>2];d=q[c+48>>2];e=f-d|0;b=(e|0)/12|0;b:{if(!e){break b}if((d|0)!=(f|0)){h=b>>>0>1?b:1;b=0;while(1){d=w(b,12)+d|0;f=q[d>>2];i=q[d+8>>2];d=q[d+4>>2];iz(d,c+1104|0);e=kq(Oi(c+1104|0),Li);c:{if(!e){q[c+4>>2]=d;q[c>>2]=c+1104;Pi(4,27874,28116,c);break c}if(!(Mi[q[e+8>>2]](c+1104|0)|0)){q[c+32>>2]=d;Pi(4,27874,28164,c+32|0);break c}e=or(e,c+1104|0,q[a+16>>2],c+1100|0);if(e){q[c+24>>2]=e;q[c+20>>2]=d;q[c+16>>2]=f;Pi(4,27874,28192,c+16|0);break c}Nz(a,f,q[c+1100>>2],i,1)}b=b+1|0;if((h|0)==(b|0)){break b}d=q[c+48>>2];if((q[c+52>>2]-d|0)/12>>>0>b>>>0){continue}break}}J(28298,28028,479,28309);G()}z6(c+48|0)}d:{if(o[c+60|0]&1){break d}a=q[c+48>>2];if(!a){break d}Ni(a)}Bj(g)}Ii=c+3296|0}function dv(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{b:{c:{while(1){f=q[b+4>>2];if(q[f+8>>2]!=6){break a}e=q[f>>2];if(r[e+6|0]){break a}g=q[e+16>>2];d:{if(q[a+20>>2]!=(b|0)){h=q[b+12>>2];break d}h=q[a+24>>2];q[b+12>>2]=h;e=q[f>>2]}e=(h-q[q[e+16>>2]+12>>2]>>2)-1|0;f=My(g,c+1|0,e);q[d>>2]=f;if(f){return 140800}e:{e=XC(g,e,c);c=e&63;if(c){f:{switch(c-4|0){case 1:break f;case 7:break b;case 0:break c;case 2:break e;default:break a}}q[d>>2]=q[q[g+8>>2]+(e>>>10&4194288)>>2]+16;return 140806}c=e>>>23|0;if(c>>>0<(e>>>6&255)>>>0){continue}break a}break}a=140819;g:{if(!(e&4194304)){break g}b=q[g+8>>2]+((e>>>14&255)<<4)|0;a=140819;if(q[b+8>>2]!=4){break g}a=q[b>>2]+16|0}q[d>>2]=a;return 140813}b=q[g+28>>2];a=140819;h:{if(!b){break h}a=q[b+(e>>>21&2044)>>2]+16|0}q[d>>2]=a;return 140821}a=140819;i:{if(!(e&4194304)){break i}b=q[g+8>>2]+((e>>>14&255)<<4)|0;a=140819;if(q[b+8>>2]!=4){break i}a=q[b>>2]+16|0}q[d>>2]=a;i=140829}return i}function Cz(a,b,c){var d=0,e=0,f=0;a:{b:{c:{d:{e:{f:{if(a){if(c&2){break f}d=b&65535;e=q[a+16>>2];if(d>>>0>=q[a+20>>2]-e>>1>>>0){break a}f=q[a+32>>2];if(!f){break e}c=s[a+38>>1];if(!c|c>>>0>s[a+36>>1]){break d}e=s[(d<<1)+e>>1];c=c-1|0;p[a+38>>1]=c;p[((c&65535)<<1)+f>>1]=b;c=q[a+4>>2];b=q[a>>2];if(e>>>0>=(c-b|0)/28>>>0){break c}c=c-28|0;d=q[c+4>>2];b=b+w(e,28)|0;q[b>>2]=q[c>>2];q[b+4>>2]=d;q[b+24>>2]=q[c+24>>2];d=q[c+20>>2];q[b+16>>2]=q[c+16>>2];q[b+20>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;b=q[a+4>>2]-28|0;q[a+4>>2]=b;c=q[a>>2];if(c>>>0>b>>>0){break b}if(e>>>0<(b-c|0)/28>>>0){b=s[(c+w(e,28)|0)+12>>1];c=q[a+20>>2];a=q[a+16>>2];if(b>>>0>=c-a>>1>>>0){break a}p[a+(b<<1)>>1]=e}return}J(132889,132848,166,133120);G()}J(133130,132848,167,133120);G()}J(133151,133158,140,133209);G()}J(133214,133158,141,133209);G()}J(133250,133265,513,133321);G()}J(133331,133265,516,133321);G()}J(133962,133265,479,133973);G()}function Yha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-464|0;Ii=b;g=nj(b+184|0,a,0,76581,1972);e=$j(a,1);d=Li;f=d;Cp(a,q[74445],e,d,78755);Ui(b+72|0,0,112);q[b+68>>2]=0;q[b+64>>2]=0;q[b+60>>2]=0;Dj(a,2,5);ej(a,2);Zi(a,-1,76992);d=$j(a,-1);c=Li;h=c;c=Cp(a,q[74445],d,c,77180);i=q[c>>2];c=q[c+4>>2];Ri(a,-2);BL(a,b+68|0,b- -64|0,b+60|0);kL(a,d,h,i,c,q[b+68>>2],r[b+64|0],q[b+60>>2],b+72|0);Ri(a,-2);q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;if(!Nt(b+72|0,q[61028],b+40|0)){d=q[b+40>>2];d=Pz(q[74445],e,f,d,q[b+44>>2]-d|0);c=q[b+76>>2];if(c){Ni(c)}c=q[b+136>>2];if(c){Ni(c)}c=q[b+148>>2];if(c){Ni(c)}c=q[b+120>>2];if(c){Ni(c)}if(d){q[b+32>>2]=aj(e,f);q[b+24>>2]=e;q[b+28>>2]=f;q[b+16>>2]=d;sj(b+208|0,256,(d|0)==-3?76793:(d|0)==-15?76835:76900,b+16|0);q[b>>2]=b+208;a=Qi(a,75832,b)}else{a=0}a:{if(o[b+52|0]&1){break a}e=q[b+40>>2];if(!e){break a}Ni(e)}mj(g);Ii=b+464|0;return a|0}J(77e3,76581,1999,78767);G()}function Qsa(a,b){var c=0;Ui(a+4|0,0,144);q[a+196>>2]=0;q[a+200>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;o[a+148|0]=1;c=a+164|0;q[c>>2]=0;q[c+4>>2]=0;q[a+172>>2]=0;q[a+176>>2]=0;q[a+180>>2]=0;q[a+184>>2]=0;q[a+188>>2]=0;q[a+192>>2]=0;q[a+204>>2]=0;q[a+248>>2]=0;q[a+252>>2]=0;q[a+216>>2]=0;q[a+220>>2]=0;q[a+208>>2]=0;q[a+212>>2]=1065353216;q[a+256>>2]=0;q[a+260>>2]=0;q[a+264>>2]=0;q[a+268>>2]=0;q[a+272>>2]=0;q[a+276>>2]=0;q[a+280>>2]=0;q[a+284>>2]=0;q[a+288>>2]=0;q[a+196>>2]=-1;Ui(a+296|0,0,144);q[a+488>>2]=0;q[a+492>>2]=0;q[a+480>>2]=982026377;q[a+484>>2]=986500301;q[a+468>>2]=960;q[a+472>>2]=640;q[a+440>>2]=1;q[a+496>>2]=0;q[a+500>>2]=0;q[a+504>>2]=0;q[a>>2]=b;q[a+152>>2]=qra();if(o[a+172|0]&1){J(5088,4554,493,4923);G()}Wi(64,960,a+160|0,a+168|0,c);So(a+176|0,31,64);q[a+456>>2]=0;q[a+356>>2]=0;q[a+348>>2]=0;q[a+304>>2]=0;q[a+308>>2]=0;q[a+292>>2]=0;p[a+240>>1]=0;q[a+224>>2]=0;q[a+448>>2]=Jk();q[a+452>>2]=Li;return a}function Yoa(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;e=q[a>>2];a:{b:{c:{b=q[a+16>>2];d=q[a+20>>2];if((b|0)==q[72466]&(d|0)==q[72467]){b=-4;if(q[a+32>>2]!=3){break a}if(!r[e+17|0]){break c}b=q[a+44>>2];d=q[a+40>>2];u[c+8>>2]=u[a+48>>2];q[c>>2]=d;q[c+4>>2]=b;break b}if((b|0)==q[72468]&(d|0)==q[72469]){b=-4;if(q[a+32>>2]!=3){break a}if(r[e+17|0]){b=q[a+44>>2];d=q[a+40>>2];u[c+8>>2]=u[a+48>>2];q[c>>2]=d;q[c+4>>2]=b;break b}b=q[a+44>>2];d=q[a+40>>2];u[c+8>>2]=u[a+48>>2];q[c>>2]=d;q[c+4>>2]=b;break b}if((b|0)==q[72472]&(d|0)==q[72473]){b=-4;if(q[a+32>>2]!=6){break a}if(r[e+17|0]){Pi(3,37377,38177,0);b=-1;break a}break b}if((b|0)==q[72462]&(d|0)==q[72463]){b=-4;if(q[a+32>>2]){break a}break b}if((b|0)==q[72464]&(d|0)==q[72465]){b=-4;if(q[a+32>>2]){break a}break b}Ii=c+16|0;return(q[72470]==(b|0)&q[72471]==(d|0)?-13:-1)|0}b=q[a+44>>2];d=q[a+40>>2];u[c+8>>2]=u[a+48>>2];q[c>>2]=d;q[c+4>>2]=b}b=0}Ii=c+16|0;return b|0}function fja(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-176|0;Ii=c;e=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[59608],c+172|0)){Ui(c+8|0,0,164);e=LL(q[a>>2],q[a+4>>2],q[c+172>>2],c+8|0);a:{if(!e){b=q[q[a+32>>2]+8>>2];jw(q[a>>2],b);q[b>>2]=q[c+8>>2];q[b+4>>2]=q[c+12>>2];d=q[c+16>>2];q[c+16>>2]=q[b+8>>2];q[b+8>>2]=d;d=q[c+20>>2];q[c+20>>2]=q[b+12>>2];q[b+12>>2]=d;d=q[c+24>>2];q[c+24>>2]=q[b+16>>2];q[b+16>>2]=d;d=r[c+28|0];o[c+28|0]=o[b+20|0]&1|d&254;o[b+20|0]=r[b+20|0]&254|d&1;d=q[c+48>>2];q[c+48>>2]=q[b+40>>2];q[b+40>>2]=d;d=q[c+52>>2];q[c+52>>2]=q[b+44>>2];q[b+44>>2]=d;d=q[c+56>>2];q[c+56>>2]=q[b+48>>2];q[b+48>>2]=d;d=r[c+60|0];o[c+60|0]=o[b+52|0]&1|d&254;o[b+52|0]=r[b+52|0]&254|d&1;q[b+88>>2]=q[c+96>>2];q[b+92>>2]=q[c+100>>2];q[b+96>>2]=q[c+104>>2];q[q[a+32>>2]+16>>2]=(q[b- -64>>2]+(q[b+48>>2]+(q[a+24>>2]+q[b+16>>2]|0)|0)-(q[b+56>>2]+(q[b+8>>2]+q[b+40>>2]|0))|0)+164;break a}jw(q[a>>2],c+8|0)}lB(c+8|0)}Ii=c+176|0;return e|0}function au(a,b){var c=0,d=0,e=0,f=x(0),g=0;if(!(((Pza(a),Lza(2))&2147483647)>>>0<2139095041?((Pza(b),Lza(2))&2147483647)>>>0<=2139095040:0)){return x(a+b)}c=(Pza(b),Lza(2));if((c|0)==1065353216){return cO(a)}g=c>>>30&2;d=(Pza(a),Lza(2));e=g|d>>>31;a:{b:{c:{d:{d=d&2147483647;if(!d){e:{switch(e-2|0){case 0:break d;case 1:break e;default:break c}}return x(-3.1415927410125732)}c=c&2147483647;if((c|0)!=2139095040){if(!c|!(d>>>0<=c+218103808>>>0?(d|0)!=2139095040:0)){break a}f:{if(c>>>0>d+218103808>>>0){f=x(0);if(g){break f}}f=cO(x(y(x(a/b))))}a=f;g:{switch(e|0){case 1:return x(-a);case 2:return x(x(3.1415927410125732)-x(a+x(8.742277657347586e-8)));case 0:break c;default:break g}}return x(x(a+x(8.742277657347586e-8))+x(-3.1415927410125732))}if((d|0)==2139095040){break b}return u[(e<<2)+217920>>2]}a=x(3.1415927410125732)}return a}return u[(e<<2)+217904>>2]}return Mza(2,(Pza(a),Lza(2))&-2147483648|1070141403),Qza()}function Kxa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;h=Ii-32|0;Ii=h;f=d&2147483647;g=f;e=f-1065418752|0;i=f-1082064896|0;f=c;a:{if((e|0)==(i|0)&f>>>0>>0|e>>>0>>0){g=(d&33554431)<<7|c>>>25;f=0;j=f;i=c&33554431;if(!(!f&(i|0)==16777216?!(a|b):!f&i>>>0<16777216)){e=g+1073741825|0;break a}e=g+1073741824|0;if(i^16777216|a|(b|j)){break a}e=(g&1)+e|0;break a}if(!(!f&(g|0)==2147418112?!(a|b):g>>>0<2147418112)){e=((d&33554431)<<7|c>>>25)&4194303|2143289344;break a}e=2139095040;if(g>>>0>1082064895){break a}e=0;f=g>>>16|0;if(f>>>0<16145){break a}g=c;e=d&65535|65536;vm(h+16|0,a,b,g,e,f-16129|0);Xr(h,a,b,g,e,16257-f|0);b=q[h+8>>2];e=(q[h+12>>2]&33554431)<<7|b>>>25;g=q[h+4>>2];f=g;a=0;i=a;j=q[h>>2]|((q[h+16>>2]|q[h+24>>2])!=0|(q[h+20>>2]|q[h+28>>2])!=0);b=b&33554431;if(!(!a&(b|0)==16777216?!(f|j):!a&b>>>0<16777216)){e=e+1|0;break a}if(b^16777216|j|(f|i)){break a}e=(e&1)+e|0}Ii=h+32|0;return Mza(2,d&-2147483648|e),Qza()}function aB(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=x(0),t=x(0);k=Ii-48|0;Ii=k;a:{b:{l=b&65535;i=q[a+32>>2];if(l>>>0<(q[a+36>>2]-i|0)/592>>>0){if(s[(w(l,592)+i|0)+568>>1]!=(b>>>16|0)){break b}h=w(l,592)+i|0;if(s[h+570>>1]!=(b&65535)){break a}j=q[h+440>>2];h=(j>>>13&8191)-(j&8191)|0;m=h;h=h>>31;c:{d:{j=j>>>26&15;n=j-2|0;switch(n|0){case 0:case 3:break d;default:break c}}h=h<<1|m>>>31;m=m<<1}i=w(l,592)+i|0;p=x(x(+(m>>>0)+ +(h>>>0)*4294967296)/x(r[i+448|0]));c=c>2]=0;h=k;q[h+32>>2]=0;q[h+36>>2]=0;q[h+8>>2]=0;q[h+12>>2]=0;q[h+16>>2]=0;q[h+24>>2]=0;q[h+28>>2]=0;q[h>>2]=0;q[h+4>>2]=0;a=Dr(a,b,i+472|0,x(1),h,j,p,x(0),d,e,f,g);if(a){q[a+8>>2]=0;u[a+20>>2]=p*t;o[a+68|0]=r[a+68|0]&254;u[i+472>>2]=c}Ii=k+48|0;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function I3(a){a=a|0;var b=x(0),c=x(0),d=0,e=0,f=x(0),g=x(0),h=0,i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);e=Ii-80|0;Ii=e;d=_i(a,1,q[210438],0);c=u[d>>2];f=u[d+4>>2];a:{b:{if(c!=c|f!=f){break b}b=u[d+8>>2];if(b!=b){break b}b=u[d+12>>2];if(b==b){break a}}b=u[d+8>>2];g=u[d+12>>2];v[e+48>>3]=f;v[e- -64>>3]=g;v[e+56>>3]=b;v[e+40>>3]=c;q[e+32>>2]=1;Qi(a,134315,e+32|0)}h=_i(a,2,q[210436],0);c=u[h>>2];f=u[h+4>>2];c:{if(!(c!=c|f!=f)){b=u[h+8>>2];if(b==b){break c}}b=u[h+8>>2];v[e+16>>3]=f;v[e+24>>3]=b;v[e+8>>3]=c;q[e>>2]=2;Qi(a,134131,e);b=u[h+8>>2];f=u[h+4>>2];c=u[h>>2]}g=u[d+12>>2];i=u[d>>2];j=u[d+4>>2];k=u[d+8>>2];d=yj(a,16);l=x(x(x(k*c)+x(g*f))-x(i*b));m=x(x(k*b)+x(x(i*c)+x(j*f)));n=x(x(x(i*f)+x(g*b))-x(j*c));c=x(x(x(g*c)+x(j*b))-x(k*f));u[d+8>>2]=x(i*l)+x(x(x(k*m)+x(g*n))-x(j*c));u[d+4>>2]=x(k*c)+x(x(x(g*l)+x(j*m))-x(i*n));u[d>>2]=x(j*n)+x(x(x(i*m)+x(g*c))-x(k*l));Zi(a,-1e4,134e3);xj(a,-2);Ii=e+80|0;return 1}function Zq(a,b){var c=0,d=0,e=0;a:{b:{if((b|0)==-10001){if(q[a+20>>2]!=q[a+40>>2]){break b}Yk(a,140560,0);break b}c:{if((b|0)>=1){c=(q[a+12>>2]+(b<<4)|0)-16|0;c=c>>>0>2]?c:141056;break c}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break c}d:{switch(b+10002|0){case 0:c=a+72|0;break c;default:c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0;break c;case 1:break b;case 2:break d}}c=q[a+16>>2]+96|0}d=q[a+8>>2]-16|0;e=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=e;q[c+8>>2]=q[d+8>>2];if((b|0)>-10003){break a}b=q[a+8>>2];if(q[b-8>>2]<4){break a}c=q[b-16>>2];if(!(r[c+5|0]&3)){break a}b=q[q[q[a+20>>2]+4>>2]>>2];if(!(r[b+5|0]&4)){break a}go(a,b,c);break a}c=q[a+20>>2];b=q[q[q[c+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=q[q[c+4>>2]>>2];q[c+12>>2]=q[q[a+8>>2]-16>>2];b=q[a+8>>2];if(q[b-8>>2]<4){break a}b=q[b-16>>2];if(!(r[b+5|0]&3)|!(r[c+5|0]&4)){break a}go(a,c,b)}q[a+8>>2]=q[a+8>>2]-16}function p7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii+ -64|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){d=fj(a,1);a:{if(d<4294967296&d>=0){c=~~d>>>0;break a}c=0}b:{if(c>>>0>=8){q[b+4>>2]=c;q[b>>2]=115561;a=Qi(a,117637,b);break b}g=c;d=fj(a,2);c:{if(d<4294967296&d>=0){c=~~d>>>0;break c}c=0}d=fj(a,3);d:{if(d<4294967296&d>=0){f=~~d>>>0;break d}f=0}q[b+32>>2]=g;q[b+36>>2]=0;q[b+24>>2]=14;q[b+48>>2]=f;q[b+52>>2]=0;q[b+40>>2]=c;q[b+44>>2]=0;c=q[e+4>>2];if((c|0)!=q[e+8>>2]){q[e+4>>2]=c+40;a=q[b+60>>2];q[c+32>>2]=q[b+56>>2];q[c+36>>2]=a;a=q[b+52>>2];q[c+24>>2]=q[b+48>>2];q[c+28>>2]=a;a=q[b+44>>2];q[c+16>>2]=q[b+40>>2];q[c+20>>2]=a;a=q[b+36>>2];q[c+8>>2]=q[b+32>>2];q[c+12>>2]=a;a=q[b+28>>2];q[c>>2]=q[b+24>>2];q[c+4>>2]=a;a=0;break b}q[b+16>>2]=(q[e+8>>2]-q[e>>2]|0)/40;a=Qi(a,115614,b+16|0)}Ii=b- -64|0;return a|0}J(115568,115465,478,119531);G()}function Ts(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=r[b+15|0];e=((h&15)<<3)+a|0;d=e- -64|0;i=q[d>>2];f=q[d+4>>2];g=q[e+192>>2];d=q[e+196>>2];j=15;while(1){k=(h&240)>>>4|0;a:{if((j|0)==15){h=i;break a}l=((h&15)<<3)+a|0;e=l- -64|0;h=q[e>>2]^((f&15)<<28|i>>>4);f=q[e+4>>2]^(g<<28|f>>>4);g=q[l+192>>2]^((d&15)<<28|g>>>4);e=((i&15)<<3)+163376|0;d=q[l+196>>2]^(q[e>>2]<<16^d>>>4)}k=(k<<3)+a|0;e=k- -64|0;i=q[e>>2]^((f&15)<<28|h>>>4);f=q[e+4>>2]^(g<<28|f>>>4);g=q[k+192>>2]^((d&15)<<28|g>>>4);e=((h&15)<<3)+163376|0;d=q[k+196>>2]^(q[e>>2]<<16^d>>>4);if(j){j=j-1|0;h=r[j+b|0];continue}break}o[c+15|0]=i;o[c+7|0]=g;o[c+14|0]=(f&255)<<24|i>>>8;o[c+13|0]=(f&65535)<<16|i>>>16;o[c+12|0]=(f&16777215)<<8|i>>>24;o[c+11|0]=f;o[c+10|0]=f>>>8;o[c+9|0]=f>>>16;o[c+8|0]=f>>>24;o[c+6|0]=(d&255)<<24|g>>>8;o[c+5|0]=(d&65535)<<16|g>>>16;o[c+4|0]=(d&16777215)<<8|g>>>24;o[c+3|0]=d;o[c+2|0]=d>>>8;o[c+1|0]=d>>>16;o[c|0]=d>>>24}function O3(a){a=a|0;var b=x(0),c=0,d=0,e=x(0),f=x(0),g=x(0),h=0,i=x(0),j=x(0),k=x(0),l=x(0);d=Ii-96|0;Ii=d;c=_i(a,1,q[210438],0);e=u[c>>2];f=u[c+4>>2];a:{b:{if(e!=e|f!=f){break b}b=u[c+8>>2];if(b!=b){break b}b=u[c+12>>2];if(b==b){break a}}b=u[c+8>>2];g=u[c+12>>2];v[d- -64>>3]=f;v[d+80>>3]=g;v[d+72>>3]=b;v[d+56>>3]=e;q[d+48>>2]=1;Qi(a,134315,d+48|0)}h=_i(a,2,q[210438],0);e=u[h>>2];f=u[h+4>>2];c:{d:{if(e!=e|f!=f){break d}b=u[h+8>>2];if(b!=b){break d}g=u[h+12>>2];if(g==g){break c}}b=u[h+8>>2];g=u[h+12>>2];v[d+16>>3]=f;v[d+32>>3]=g;v[d+24>>3]=b;v[d+8>>3]=e;q[d>>2]=2;Qi(a,134315,d);f=u[h+4>>2];b=u[h+8>>2];g=u[h+12>>2];e=u[h>>2]}i=u[c>>2];j=u[c+12>>2];k=u[c+4>>2];l=u[c+8>>2];c=yj(a,16);u[c+12>>2]=x(x(x(j*g)-x(e*i))-x(k*f))-x(b*l);u[c+8>>2]=x(x(x(j*b)+x(g*l))+x(i*f))-x(e*k);u[c+4>>2]=x(x(e*l)+x(x(g*k)+x(j*f)))-x(i*b);u[c>>2]=x(x(x(j*e)+x(i*g))+x(k*b))-x(l*f);Zi(a,-1e4,134032);xj(a,-2);Ii=d+96|0;return 1}function pba(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0,n=0;l=Ii-16|0;Ii=l;j=-5;k=q[a+164>>2];a:{if(!k){break a}k=q[q[a+160>>2]+(Cza(b,c,k)<<2)>>2];if((k|0)==-1){break a}m=q[a+168>>2];while(1){a=w(k,40)+m|0;if(q[a>>2]!=(b|0)|q[a+4>>2]!=(c|0)){k=q[a+32>>2];if((k|0)!=-1){continue}break a}break}b=w(k,40)+m|0;if(r[b+12|0]&2){Pi(4,199633,199684,0);j=-7;break a}a=q[b+24>>2];if(a){Ni(a);q[b+24>>2]=0}n=+(i>>>0)*.0009765625*-.0009765625;u[213692]=n+ +u[213692];u[l+8>>2]=n;a=q[l+12>>2];q[l>>2]=q[l+8>>2];q[l+4>>2]=a;j=Yi(i);q[b+24>>2]=j;b:{if(g){a=d;c:{d:{switch(f|0){case 0:a=w(d,3);break c;case 1:break d;default:break c}}a=d<<2}if((w(a,e)|0)==(i|0)){if(!e){break b}g=0;b=0-a|0;i=h+i|0;while(1){i=b+i|0;j=Ti(j,i,a)+a|0;g=g+1|0;if((g|0)!=(e|0)){continue}break}break b}Pi(4,199633,201130,0);Ni(q[b+24>>2]);q[b+24>>2]=0;j=-9;break a}Ti(j,h,i)}a=w(k,40)+m|0;q[a+28>>2]=f;q[a+20>>2]=e;q[a+16>>2]=d;j=0}Ii=l+16|0;return j}function cja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-32|0;Ii=b;d=q[a+4>>2];c=q[q[a+32>>2]+8>>2];q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=q[c+24>>2];g=HL(q[a>>2],q[a+20>>2],q[a+24>>2],d,b);e=q[a>>2];a:{if(!g){a=q[c+28>>2];if(a){cj(e,a)}f=q[c+4>>2];d=f;h=q[c>>2];if((d|0)!=(h|0)){a=0;d=h;while(1){cj(e,q[(a<<2)+d>>2]);a=a+1|0;f=q[c+4>>2];d=q[c>>2];if(a>>>0>2>>>0){continue}break}}q[c+28>>2]=q[b+28>>2];a=q[b>>2];q[b>>2]=d;q[c>>2]=a;a=q[b+4>>2];q[b+4>>2]=f;q[c+4>>2]=a;a=q[b+8>>2];q[b+8>>2]=q[c+8>>2];q[c+8>>2]=a;a=r[b+12|0];o[b+12|0]=o[c+12|0]&1|a&254;o[c+12|0]=r[c+12|0]&254|a&1;break a}a=q[b+28>>2];if(a){cj(e,a)}d=q[b>>2];if((d|0)==q[b+4>>2]){break a}a=0;while(1){cj(e,q[(a<<2)+d>>2]);a=a+1|0;d=q[b>>2];if(a>>>0>2]-d>>2>>>0){continue}break}}b:{if(o[b+12|0]&1){break b}a=q[b>>2];if(!a){break b}Ni(a)}Ii=b+32|0;return g|0}function eW(a,b,c,d,e){var f=0,g=0,h=0,i=0;f=Ii-32|0;Ii=f;q[f+24>>2]=0;q[f+16>>2]=1;q[f+20>>2]=0;q[f+8>>2]=0;q[f>>2]=1;q[f+4>>2]=0;a:{if(!b){break a}}b:{if(!c){break b}}c:{d:{i=(b|0)!=0&(c|0)!=0;if(!(!a|!i)){g=Wk(f+16|0,b,c);if(g){break d}h=-16896;if((Jj(a,1)|0)<1){break c}if(_j(f+16|0,a)){break c}}if(!(!e|(!a|!d))){h=-16896;if((Jj(d,1)|0)<1){break c}if((Jj(e,1)|0)<1){break c}if((_j(d,a)|0)>-1){break c}if((_j(e,a)|0)>-1){break c}}h=0;if(!e|(!d|i^1)){break c}h=-16896;if((Jj(b,1)|0)<1){break c}if((Jj(c,1)|0)<1){break c}g=Wk(f+16|0,d,e);if(g){break d}g=Pl(f+16|0,f+16|0,1);if(g){break d}g=Pl(f,b,1);if(g){break d}g=gl(f+16|0,f+16|0,f);if(g){break d}if(Jj(f+16|0,0)){break c}g=Wk(f+16|0,d,e);if(g){break d}g=Pl(f+16|0,f+16|0,1);if(g){break d}g=Pl(f,c,1);if(g){break d}g=gl(f+16|0,f+16|0,f);if(g){break d}h=Jj(f+16|0,0)?-16896:0;break c}h=(g|0)==-16896?-16896:g-16896|0}ij(f+16|0);ij(f);Ii=f+32|0;return h}function q_(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;Oza(+a);b=Lza(1)|0;d=Lza(0)|0;a:{b:{c:{d:{if((b|0)>0?1:(b|0)>=0){e=b;if(b>>>0>1048575){break d}}if(!(b&2147483647|d)){return-1/(a*a)}if((b|0)>-1){break c}return(a-a)/0}if(e>>>0>2146435071){break a}b=1072693248;k=-1023;if((e|0)!=1072693248){b=e;break b}if(d){break b}return 0}Oza(+(a*0x40000000000000));b=Lza(1)|0;d=Lza(0)|0;k=-1077}b=b+614242|0;l=+((b>>>20|0)+k|0);f=l*.30102999566361177;Mza(0,d|0);Mza(1,(b&1048575)+1072079006|0);c=+Nza()+ -1;g=c*(c*.5);h=c/(c+2);i=h*h;a=i*i;Oza(+(c-g));b=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,b|0);j=+Nza();m=j*.4342944818781689;n=f+m;a=c-j-g+h*(g+(a*(a*(a*.15313837699209373+.22222198432149784)+.3999999999940942)+i*(a*(a*(a*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));a=n+(m+(f-n)+(a*.4342944818781689+(l*3.694239077158931e-13+(a+j)*2.5082946711645275e-11)))}return a}function bO(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{if((b|0)>=(c|0)){break a}while(1){rj(a,1,b);rj(a,1,c);b:{if(Sp(a,-1,-2)){nk(a,1,b);nk(a,1,c);break b}Ri(a,-3)}d=c-b|0;if((d|0)==1){break a}e=(b+c|0)/2|0;rj(a,1,e);rj(a,1,b);c:{if(Sp(a,-2,-1)){nk(a,1,e);nk(a,1,b);break c}Ri(a,-2);rj(a,1,c);if(Sp(a,-1,-2)){nk(a,1,e);nk(a,1,c);break c}Ri(a,-3)}if((d|0)==2){break a}rj(a,1,e);ej(a,-1);h=c-1|0;rj(a,1,h);f=h;d=b;while(1){nk(a,1,e);nk(a,1,f);e=d+1|0;rj(a,1,e);if(Sp(a,-1,-2)){while(1){if((c|0)<=(d|0)){Qi(a,145481,0)}Ri(a,-2);g=e+1|0;rj(a,1,g);d=e;e=g;if(Sp(a,-1,-2)){continue}break}}g=d;d=f-1|0;rj(a,1,d);if(Sp(a,-3,-1)){while(1){if((b|0)>=(f|0)){Qi(a,145481,0)}f=d;Ri(a,-2);d=d-1|0;rj(a,1,d);if(Sp(a,-3,-1)){continue}break}}i=(e|0)<(f|0);f=d;d=e;if(i){continue}break}Ri(a,-4);rj(a,1,h);rj(a,1,e);nk(a,1,h);nk(a,1,e);f=g+2|0;d=(e-b|0)<(c-e|0);bO(a,d?b:f,d?g:c);b=d?f:b;c=d?c:g;if((b|0)<(c|0)){continue}break}}}function CF(a){var b=0;while(1){p[((b<<2)+a|0)+148>>1]=0;b=b+1|0;if((b|0)!=286){continue}break}p[a+2684>>1]=0;p[a+2440>>1]=0;p[a+2756>>1]=0;p[a+2752>>1]=0;p[a+2748>>1]=0;p[a+2744>>1]=0;p[a+2740>>1]=0;p[a+2736>>1]=0;p[a+2732>>1]=0;p[a+2728>>1]=0;p[a+2724>>1]=0;p[a+2720>>1]=0;p[a+2716>>1]=0;p[a+2712>>1]=0;p[a+2708>>1]=0;p[a+2704>>1]=0;p[a+2700>>1]=0;p[a+2696>>1]=0;p[a+2692>>1]=0;p[a+2688>>1]=0;p[a+2556>>1]=0;p[a+2552>>1]=0;p[a+2548>>1]=0;p[a+2544>>1]=0;p[a+2540>>1]=0;p[a+2536>>1]=0;p[a+2532>>1]=0;p[a+2528>>1]=0;p[a+2524>>1]=0;p[a+2520>>1]=0;p[a+2516>>1]=0;p[a+2512>>1]=0;p[a+2508>>1]=0;p[a+2504>>1]=0;p[a+2500>>1]=0;p[a+2496>>1]=0;p[a+2492>>1]=0;p[a+2488>>1]=0;p[a+2484>>1]=0;p[a+2480>>1]=0;p[a+2476>>1]=0;p[a+2472>>1]=0;p[a+2468>>1]=0;p[a+2464>>1]=0;p[a+2460>>1]=0;p[a+2456>>1]=0;p[a+2452>>1]=0;p[a+2448>>1]=0;p[a+2444>>1]=0;q[a+5804>>2]=0;q[a+5808>>2]=0;p[a+1172>>1]=1;q[a+5800>>2]=0;q[a+5792>>2]=0}function fha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-32|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;Ml(a,1,q[q[jk(a)+80>>2]+8>>2],81003,b+28|0,0,0);d=q[b+28>>2];c=$j(a,2);e=Li;g=e;a:{h=oB(d,c,e);b:{if((h|0)==-1){q[b>>2]=aj(c,g);Pi(4,81369,81377,b);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;if((f+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break b}J(81404,81141,374,81738);G()}c=jj(a,3);e=jj(a,4);mB(d,b+24|0,b+20|0,b+16|0,b+12|0);g=c-1|0;c=q[d+156>>2];q[b+8>>2]=g-q[c+36>>2];q[b+4>>2]=(e-1|0)-q[c+40>>2];c:{c=q[b+8>>2];d:{if((c|0)<0|(c|0)>=q[b+16>>2]){break d}e=q[b+4>>2];if((e|0)<0){break d}if((e|0)>2]){break c}}Pi(4,81369,81754,0);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;if((f+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break b}J(81404,81141,391,81738);G()}d=Gla(d,h,c,e);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;if((f+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}}Ii=b+32|0;return 1}J(81404,81141,398,81738);G()}function DN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-16|0;Ii=g;d=1;a:{b:{switch(b-a>>3){case 2:e=b-8|0;b=e;f=q[b>>2];c=q[b+4>>2];b=q[a+4>>2];if((c|0)==(b|0)&t[a>>2]<=f>>>0|b>>>0>>0){break a}Zl(a,e);break a;case 3:Hq(a,a+8|0,b-8|0);break a;case 4:wx(a,a+8|0,a+16|0,b-8|0);break a;case 5:sx(a,a+8|0,a+16|0,a+24|0,b-8|0);break a;case 0:case 1:break a;default:break b}}c=a+16|0;Hq(a,a+8|0,c);f=a+24|0;c:{while(1){i=(b|0)==(f|0);if(i){break c}d:{h=q[f+4>>2];e=q[c+4>>2];if((h|0)==(e|0)&t[f>>2]>2]|e>>>0>h>>>0){d=q[f+4>>2];q[g+8>>2]=q[f>>2];q[g+12>>2]=d;e=f;while(1){e:{d=c;c=q[c+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=c;if((a|0)==(d|0)){d=a;break e}e=d;c=d-8|0;j=q[g+12>>2];h=q[c+4>>2];if((j|0)==(h|0)&t[c>>2]>t[g+8>>2]|h>>>0>j>>>0){continue}}break}e=g+8|0;c=q[e+4>>2];q[d>>2]=q[e>>2];q[d+4>>2]=c;k=k+1|0;if((k|0)==8){break d}}c=f;f=c+8|0;continue}break}d=(f+8|0)==(b|0)}d=d|i}Ii=g+16|0;return d&1}function Xfa(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;g=Ii-16|0;Ii=g;pc(q[a>>2],b|0,d|0,g+4|0,g+12|0,g+8|0,c|0);a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{l:{m:{a=q[g+8>>2];switch(a-35664|0){case 2:break j;case 1:break k;case 0:break l;case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 13:case 15:break c;case 16:break e;case 14:break f;case 12:break g;case 11:break h;case 10:break i;default:break m}}b=0;n:{switch(a-5120|0){case 1:b=1;break a;case 2:b=2;break a;case 3:b=3;break a;case 4:b=4;break a;case 5:b=5;break a;case 0:break a;case 6:break n;default:break d}}b=6;break a}b=12;break a}b=13;break a}b=7;break a}b=14;break a}b=15;break a}b=8;break a}b=9;break a}b=10;break a}if((a|0)==36289){break b}}b=-1;break a}b=11}q[e>>2]=b;q[f>>2]=q[g+12>>2];o:{if(!(r[q[75054]+156|0]&64)){break o}a=K()|0;if(!a){break o}lj(a,92332,2243);J(88669,88575,2243,92332);G()}Ii=g+16|0;return q[g+4>>2]}function ur(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=Ii-48|0;Ii=h;c=-3;a:{if(q[213234]){break a}c=-4;if(!a|!r[a|0]){break a}if(gk(a,35)){break a}if(gk(a,58)){break a}e=Oi(a);f=Li;while(1){c=q[213233];q[213233]=c?c:1;if(c){continue}break}d=q[213232];if(!d){d=$i(32);c=d;q[c+16>>2]=0;q[c+20>>2]=0;q[c>>2]=0;q[c+4>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c+20>>2]=-1;VI(c,256,256);q[213232]=c}i=q[d+8>>2];g=-3;b:{if(q[d+24>>2]==q[d+16>>2]-i>>6){break b}c=q[d+4>>2];c:{if(!c){break c}c=q[q[d>>2]+(Cza(e,f,c)<<2)>>2];if((c|0)==-1){break c}while(1){c=(c<<6)+i|0;g=-1;if((e|0)==q[c>>2]&q[c+4>>2]==(f|0)){break b}c=q[c+56>>2];if((c|0)!=-1){continue}break}}q[h+44>>2]=0;c=h;q[c+36>>2]=0;q[c+40>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c>>2]=1;q[c+8>>2]=e;q[c+12>>2]=f;q[c+24>>2]=Pk(a);q[c+28>>2]=Wj();q[c+32>>2]=jua();WI(q[213232],e,f,c);q[b>>2]=e;q[b+4>>2]=f;g=0}c=g;q[213233]=0}Ii=h+48|0;return c}function Wwa(a){var b=0;b=q[a+396>>2];if(b){Ni(b)}b=q[a+384>>2];if(b){Ni(b)}b=q[a+372>>2];if(b){Ni(b)}b=q[a+360>>2];if(b){Ni(b)}b=q[a+348>>2];if(b){Ni(b)}b=q[a+336>>2];if(b){Ni(b)}b=q[a+324>>2];if(b){Ni(b)}b=q[a+312>>2];if(b){Ni(b)}b=q[a+300>>2];if(b){Ni(b)}b=q[a+288>>2];if(b){Ni(b)}b=q[a+276>>2];if(b){Ni(b)}b=q[a+264>>2];if(b){Ni(b)}b=q[a+252>>2];if(b){Ni(b)}b=q[a+240>>2];if(b){Ni(b)}b=q[a+228>>2];if(b){Ni(b)}b=q[a+216>>2];if(b){Ni(b)}b=q[a+204>>2];if(b){Ni(b)}b=q[a+192>>2];if(b){Ni(b)}b=q[a+180>>2];if(b){Ni(b)}b=q[a+168>>2];if(b){Ni(b)}b=q[a+156>>2];if(b){Ni(b)}b=q[a+144>>2];if(b){Ni(b)}b=q[a+132>>2];if(b){Ni(b)}b=q[a+120>>2];if(b){Ni(b)}b=q[a+108>>2];if(b){Ni(b)}b=q[a+96>>2];if(b){Ni(b)}b=q[a+84>>2];if(b){Ni(b)}b=q[a+72>>2];if(b){Ni(b)}b=q[a+60>>2];if(b){Ni(b)}b=q[a+48>>2];if(b){Ni(b)}b=q[a+36>>2];if(b){Ni(b)}b=q[a+24>>2];if(b){Ni(b)}b=q[a+12>>2];if(b){Ni(b)}a=q[a>>2];if(a){Ni(a)}}function JV(a){var b=0,c=0,d=0;c=Ii-16|0;Ii=c;Mi[q[q[a+68>>2]+1112>>2]](a,c+4|0,(q[q[a>>2]+184>>2]^-1)&1);b=_n(a);a:{if(b){break a}if(q[a+128>>2]!=22){Xj(a,2,10);b=-30464;break a}b:{b=q[a+120>>2];if(r[b|0]==20){d=r[q[a>>2]+184|0]&2?12:4;if(q[a+168>>2]==(d+12|0)){break b}}Xj(a,2,50);b=-32384;break a}if(os(b+d|0,c+4|0,12)){Xj(a,2,50);b=-32384;break a}q[a+248>>2]=12;b=r[c+12|0]|r[c+13|0]<<8|(r[c+14|0]<<16|r[c+15|0]<<24);o[a+272|0]=b;o[a+273|0]=b>>>8;o[a+274|0]=b>>>16;o[a+275|0]=b>>>24;b=r[c+8|0]|r[c+9|0]<<8|(r[c+10|0]<<16|r[c+11|0]<<24);d=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);o[a+264|0]=d;o[a+265|0]=d>>>8;o[a+266|0]=d>>>16;o[a+267|0]=d>>>24;o[a+268|0]=b;o[a+269|0]=b>>>8;o[a+270|0]=b>>>16;o[a+271|0]=b>>>24;c:{if(q[q[a+68>>2]+2252>>2]){d=q[a>>2];if(o[d+184|0]&1){break c}q[a+4>>2]=10;break c}q[a+4>>2]=q[a+4>>2]+1;d=q[a>>2]}b=0;if(!(r[d+184|0]&2)){break a}jy(a)}Ii=c+16|0;return b}function mN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=Ii-16|0;h=e;Ii=e;c=3;a:{b:{c:{if(a+1>>>0<2){break c}f=a&65535;g=q[210908];if(f>>>0>=t[g+8>>2]){break a}d=q[q[g>>2]+(f<<2)>>2];if(!d|s[q[g+4>>2]+(f<<1)>>1]!=(a>>>16|0)){break c}c=1;j=q[d+28>>2];if(Ej(q[d>>2]+w(j,q[d+24>>2])|0,154272,16)){break c}c=e;e=r[d+34|0];i=c-(w(e,24)+15&16368)|0;Ii=i;if(e){k=q[d+4>>2];c=0;while(1){f=(c<<4)+k|0;l=q[f+4>>2];g=i+w(c,24)|0;q[g>>2]=q[f>>2];q[g+4>>2]=l;q[g+8>>2]=r[f+12|0];o[g+12|0]=r[f+13|0];c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=Lw(j,i,e,h+12|0);if(c){break c}lN(q[h+12>>2],a);c=q[d+8>>2];if((c|0)!=q[d+12>>2]){a=0;while(1){c=q[(a<<2)+c>>2];if(jN(q[h+12>>2],q[c>>2],q[c+4>>2],q[c+12>>2],r[c+9|0],r[c+8|0])){break b}a=a+1|0;c=q[d+8>>2];if(a>>>0>2]-c>>2>>>0){continue}break}}q[b>>2]=q[h+12>>2];c=0}Ii=h+16|0;return c}J(154115,153556,406,154132);G()}J(154349,154364,144,154402);G()}function lia(a){var b=0,c=0;b=q[a>>2];q[74076]=q[a+4>>2];a=q[b+8>>2]-q[b+12>>2]>>4;q[74077]=jm(b,65665,65672,232096);q[74078]=jm(b,65680,65696,232128);Ak(b,65665,232176);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65704);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65721);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65739);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65757);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=4;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65775);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=5;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65791);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=6;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65808);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=7;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65825);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=8;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,65842);Ri(b,-2);if((a|0)!=q[b+8>>2]-q[b+12>>2]>>4){J(65861,65882,1190,65923);G()}}function Ooa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a>>2];c=$i(40);q[c>>2]=0;q[c+4>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;g=c+8|0;d=g;q[d>>2]=0;q[d+4>>2]=0;q[c>>2]=q[b>>2];e=q[a+16>>2];b=q[b+8>>2];e=b>>>0>e>>>0?e:b;Wi(e,28,c+4|0,c+12|0,d);a:{b:{b=q[c+4>>2];if(e>>>0<=(q[c+12>>2]-b|0)/28>>>0){q[c+8>>2]=b+w(e,28);b=q[c+24>>2];if(e>>>0>>0){break b}d=q[c+20>>2];f=Yi(e<<2);q[c+20>>2]=f;f=Ti(f,d,b<<2);q[c+24>>2]=e;if(b>>>0>>0){while(1){q[f+(b<<2)>>2]=b;b=b+1|0;if((e|0)!=(b|0)){continue}break}}Ni(d);if(e){b=0;while(1){d=q[c+4>>2];if((q[g>>2]-d|0)/28>>>0<=b>>>0){break a}d=d+w(b,28)|0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+24>>2]=0;q[d+16>>2]=-2;q[d+20>>2]=-2;q[d+12>>2]=-2;b=b+1|0;if((e|0)!=(b|0)){continue}break}}q[q[a+12>>2]>>2]=c;return 0}J(39962,39894,506,39981);G()}J(39989,40012,112,39950);G()}J(40063,39894,479,40074);G()}function vT(a){a=a|0;var b=0,c=0,d=0;c=Ii-96|0;Ii=c;a:{if((Vi(a,1)|0)<=0){b=ba(0)|0;break a}Dj(a,1,5);Ri(a,1);Zi(a,-1,146033);if(Oj(a,-1)){b=hl(a,-1)}Ri(a,-2);q[c+48>>2]=b;Zi(a,-1,146037);b=0;b:{if(!Oj(a,-1)){break b}b=hl(a,-1)}Ri(a,-2);q[c+52>>2]=b;Zi(a,-1,146041);b=12;c:{if(!Oj(a,-1)){break c}b=hl(a,-1)}Ri(a,-2);q[c+56>>2]=b;Zi(a,-1,146046);d:{if(Oj(a,-1)){b=hl(a,-1);Ri(a,-2);break d}q[c+32>>2]=146046;b=Qi(a,146155,c+32|0)}q[c+60>>2]=b;Zi(a,-1,146050);e:{if(Oj(a,-1)){b=hl(a,-1);Ri(a,-2);break e}q[c+16>>2]=146050;b=Qi(a,146155,c+16|0)}q[c+64>>2]=b-1;Zi(a,-1,146056);f:{if(Oj(a,-1)){b=hl(a,-1);Ri(a,-2);break f}q[c>>2]=146056;b=Qi(a,146155,c)}q[c+68>>2]=b-1900;b=-1;Zi(a,-1,146071);if(Vi(a,-1)){b=Uj(a,-1)}Ri(a,-2);q[c+80>>2]=b;b=ob(c+48|0)|0}g:{if((b|0)==-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break g}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16}Ii=c+96|0;return 1}function ev(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{f=(Pza(b),Lza(2));d=f<<1;if(!(!d|(f&2147483647)>>>0>2139095040)){h=(Pza(a),Lza(2));e=h>>>23&255;if((e|0)!=255){break a}}a=x(a*b);return x(a/a)}c=h<<1;if(c>>>0>d>>>0){g=f>>>23&255;b:{if(!e){e=0;c=h<<9;if((c|0)>=0){while(1){e=e-1|0;c=c<<1;if((c|0)>-1){continue}break}}c=h<<1-e;break b}c=h&8388607|8388608}c:{if(!g){g=0;d=f<<9;if((d|0)>=0){while(1){g=g-1|0;d=d<<1;if((d|0)>-1){continue}break}}d=f<<1-g;break c}d=f&8388607|8388608}f=d;if((e|0)>(g|0)){while(1){d:{d=c-f|0;if((d|0)<0){break d}c=d;if(c){break d}return x(a*x(0))}c=c<<1;e=e-1|0;if((g|0)<(e|0)){continue}break}e=g}e:{d=c-f|0;if((d|0)<0){break e}c=d;if(c){break e}return x(a*x(0))}f:{if(c>>>0>8388607){d=c;break f}while(1){e=e-1|0;f=c>>>0<4194304;d=c<<1;c=d;if(f){continue}break}}c=h&-2147483648;return Mza(2,c|((e|0)>=1?d-8388608|e<<23:d>>>1-e|0)),Qza()}return(c|0)==(d|0)?x(a*x(0)):a}function eua(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+12>>2];e=q[a+16>>2];a:{if((b|0)>=(e|0)){c=b;break a}c=b+1|0;q[a+12>>2]=c;d=o[b+q[a+8>>2]|0]}b:{c:{d:{while(1){e:{switch(d+1|0){case 14:d=0;if((c|0)>=(e|0)){continue}b=c+1|0;q[a+12>>2]=b;d=o[q[a+8>>2]+c|0];c=b;continue;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:break c;case 0:break e;default:break d}}break}Or(a,-4);G()}if((d|0)!=91){break c}fN(a,a+180|0,512);d=0;b=q[a+12>>2];e=q[a+16>>2];f:{if((b|0)>=(e|0)){c=b;break f}c=b+1|0;q[a+12>>2]=c;d=o[b+q[a+8>>2]|0]}g:{while(1){h:{switch(d+1|0){case 14:d=0;if((c|0)>=(e|0)){continue}b=c+1|0;q[a+12>>2]=b;d=o[q[a+8>>2]+c|0];c=b;continue;case 0:break h;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:break b;default:break g}}break}Or(a,-4);G()}if((d|0)!=93){break b}return}Or(a,-3);G()}Or(a,-3);G()}function VK(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;f=Ii-80|0;Ii=f;q[f+72>>2]=0;q[f+76>>2]=0;g=f- -64|0;q[g>>2]=0;q[g+4>>2]=0;q[f+56>>2]=0;q[f+60>>2]=0;q[f+32>>2]=0;q[f+36>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;q[f+72>>2]=0;q[g>>2]=234;q[f+56>>2]=b;q[f+32>>2]=c;q[f+16>>2]=0;q[f+20>>2]=0;q[f+68>>2]=b;q[f+60>>2]=0;q[f+52>>2]=235;a:{b:{g=q[c+20>>2];if(!g){q[f+40>>2]=0;break b}h=q[g>>2];q[f+40>>2]=h;if(!h){break b}q[f+36>>2]=g+4;h=f;g=q[c+28>>2];i=0;c:{if(!g){break c}i=q[g>>2]}q[h+48>>2]=i;break a}if(!q[c+28>>2]){break a}Pi(3,50700,51558,0)}c=q[q[c+24>>2]>>2];q[f+44>>2]=c;d:{if(!q[c+4>>2]){break d}c=q[c>>2];if(!c){break d}j=q[c+48>>2];k=q[c+52>>2]}q[f+24>>2]=d;q[f+28>>2]=e;q[f+16>>2]=j;q[f+20>>2]=k;a=D5(a,f+16|0,b+132|0);e:{if(!a){b=0;break e}q[f>>2]=a;Pi(4,50700,51599,f);b=-1e3;if((a|0)!=2){break e}Pi(4,50700,51652,0)}Ii=f+80|0;return b}function Gfa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Ii-16|0;Ii=d;q[a+128>>2]=q[a+128>>2]+1;a=$i(20);q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;e=bb()|0;a:{b:{c:{d:{if(r[q[75054]+156|0]&64){f=K()|0;if(f){break d}}c=q[c>>2];Aa(e|0,q[b>>2]);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break c}}Aa(e|0,c|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}Ga(e|0);fa(e|0,35714,d+12|0);e:{if(!q[d+12>>2]){fa(e|0,35716,d+8|0);b=q[d+8>>2];if((b|0)>=1){c=b;b=Yi(b);Za(e|0,c|0,d+8|0,b|0);q[d>>2]=b;Pi(3,88531,92058,d);Ni(b)}f:{if(o[a+16|0]&1){break f}b=q[a+4>>2];if(!b){break f}Ni(b)}Ni(a);xa(e|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}a=0;break e}q[a>>2]=e;OK(a)}Ii=d+16|0;return a|0}lj(f,92062,1949);J(88669,88575,1949,92062);G()}lj(b,92062,1958);J(88669,88575,1958,92062);G()}lj(b,92062,1960);J(88669,88575,1960,92062);G()}lj(a,92062,1994);J(88669,88575,1994,92062);G()}function $wa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{if(!_w(a,b)){break a}e=eC(a,0);if((e|0)<0|!(r[a+17|0]|(r[a+18|0]<<8|r[a+19|0]<<16))){break a}f=1;g=(r[a+65|0]|r[a+66|0]<<8|(r[a+67|0]<<16|r[a+68|0]<<24))+a|0;b=e+1|0;if(b>>>0<(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16))>>>0){while(1){h=w(b,23)+g|0;d=h;if(!(r[d|0]|(r[d+1|0]<<8|r[d+2|0]<<16))){d=r[h+3|0]+1|0;f=f>>>0>d>>>0?f:d;b=b+1|0;if(b>>>0<(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16))>>>0){continue}}break}if(f>>>0>16){break a}}o[c+40|0]=0;q[c+4>>2]=f;q[c>>2]=0;b=c;if(r[a+20|0]){a=r[(w(e,23)+g|0)+4|0]}else{a=(r[a+21|0]|r[a+22|0]<<8)>>>2|0}o[b+40|0]=a&1;a=w(e,23)+g|0;o[c+41|0]=r[a+4|0]>>>1&1;q[c+16>>2]=(r[a+9|0]|r[a+10|0]<<8)<<2;q[c+20>>2]=(r[a+11|0]|r[a+12|0]<<8)<<2;q[c+8>>2]=r[a+5|0]|r[a+6|0]<<8;q[c+12>>2]=r[a+7|0]|r[a+8|0]<<8;q[c+24>>2]=r[a+9|0]|r[a+10|0]<<8;a=r[a+11|0]|r[a+12|0]<<8;q[c+28>>2]=a;q[c+36>>2]=e;q[c+32>>2]=w(a,q[c+24>>2])}}function oG(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;a:{b:{d=q[239672];f=q[d+16>>2];if(f){Gj(f);b=q[q[239672]+16>>2];if(b){break b}}c=r[a+60|0];break a}Gj(b);c=r[a+60|0];Bj(b)}c:{d:{if(!(c&4)){break d}c=s[a+58>>1];b=q[d+48>>2];if(c>>>0>=q[d+52>>2]-b>>5>>>0){break c}b=b+(c<<5)|0;q[e>>2]=aj(q[b>>2],q[b+4>>2]);Pi(4,209937,210346,e);b=q[q[239672]+16>>2];if(b){Gj(b);o[a+60|0]=r[a+60|0]&251;fr(q[a>>2]);Bj(b);break d}o[a+60|0]=r[a+60|0]&251;fr(q[a>>2])}e:{c=q[d+36>>2];if(c){b=s[d+42>>1];if(!b|b>>>0>s[d+40>>1]){break e}g=s[a+56>>1];b=b-1|0;p[d+42>>1]=b;p[c+((b&65535)<<1)>>1]=g;p[a+56>>1]=65535;c=s[a+58>>1];b=q[d+48>>2];if(c>>>0>=q[d+52>>2]-b>>5>>>0){break c}kz(b+(c<<5)|0);p[a+58>>1]=65535;G1(q[d>>2],q[a>>2]);q[a>>2]=0;q[a+40>>2]=1065353216;q[a+44>>2]=0;if(f){Bj(f)}Ii=e+16|0;return 0}J(211026,210953,140,211057);G()}J(211062,210953,141,211057);G()}J(211004,210835,479,211015);G()}function dw(a){var b=0;b=Ii-144|0;Ii=b;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{if((a|0)<=36181){switch(a-36054|0){case 0:break j;case 2:case 3:case 4:break c;case 7:break f;case 6:break g;case 5:break h;case 1:break i;default:break d}}if((a|0)==36182){break e}if((a|0)!=36264){break c}q[b+128>>2]=36264;q[b+132>>2]=93681;Pi(4,88531,93417,b+128|0);break a}q[b+32>>2]=36054;q[b+36>>2]=93458;Pi(4,88531,93417,b+32|0);break a}q[b+48>>2]=36055;q[b+52>>2]=93495;Pi(4,88531,93417,b+48|0);break a}q[b+64>>2]=36059;q[b+68>>2]=93540;Pi(4,88531,93417,b- -64|0);break a}q[b+80>>2]=36060;q[b+84>>2]=93578;Pi(4,88531,93417,b+80|0);break a}q[b+96>>2]=36061;q[b+100>>2]=93616;Pi(4,88531,93417,b+96|0);break a}q[b+112>>2]=36182;q[b+116>>2]=93643;Pi(4,88531,93417,b+112|0);break a}if((a|0)==33305){break b}}q[b>>2]=a;Pi(4,88531,93725,b);break a}q[b+16>>2]=33305;q[b+20>>2]=93433;Pi(4,88531,93417,b+16|0)}Ii=b+144|0}function Bea(a,b){var c=0,d=0,e=0;a:{b:{c:{if(a){if(!b){b=q[a+32>>2];c=q[a+36>>2]-b|0;a=(c|0)/592|0;if(!c){return 0}d=a>>>0>1?a:1;a=0;while(1){d:{c=b+w(a,592)|0;if(o[c+588|0]&1){break d}e=s[c+570>>1];if((e|0)==65535|s[c+576>>1]!=65535){break d}return e|s[(b+w(a,592)|0)+568>>1]<<16}a=a+1|0;if((d|0)!=(a|0)){continue}break}return 0}c=q[a+32>>2];e=(q[a+36>>2]-c|0)/592|0;a=b&65535;if(e>>>0<=a>>>0){break a}if(s[(c+w(a,592)|0)+568>>1]!=(b>>>16|0)){break c}a=c+w(a,592)|0;if(s[a+570>>1]!=(b&65535)){break b}a=s[a+578>>1];if((a|0)!=65535){while(1){b=a&65535;if(b>>>0>=e>>>0){break a}d=c+w(b,592)|0;a=s[d+574>>1];e:{if(o[d+588|0]&1){break e}d=s[d+570>>1];if((d|0)==65535){break e}return d|s[(c+w(b,592)|0)+568>>1]<<16}if((a&65535)!=65535){continue}break}}return 0}J(200362,199542,2251,200373);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function xj(a,b){var c=0,d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}d=q[a+8>>2];b=0;c:{if(!q[d-8>>2]){break c}b=q[d-16>>2]}d:{e:{f:{g:{d=q[c+8>>2];switch(d-5|0){case 2:break f;case 0:break g;default:break e}}q[q[c>>2]+8>>2]=b;if(!b|!(r[b+5|0]&3)){break d}c=q[c>>2];if(!(r[c+5|0]&4)){break d}b=q[a+16>>2];o[c+5|0]=r[c+5|0]&251;q[c+24>>2]=q[b+40>>2];q[b+40>>2]=c;break d}q[q[c>>2]+8>>2]=b;if(!b|!(r[b+5|0]&3)){break d}c=q[c>>2];if(!(r[c+5|0]&4)){break d}go(a,c,b);break d}q[(q[a+16>>2]+(d<<2)|0)+152>>2]=b}q[a+8>>2]=q[a+8>>2]-16;return 1}function O6(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-80|0;Ii=f;q[f+72>>2]=0;j=q[a+5140>>2];Gj(j);if(d){h=-3;g=q[a>>2];e=q[g+4>>2];a:{if(!e){break a}e=q[q[g>>2]+(Cza(b,c,e)<<2)>>2];if((e|0)==-1){break a}g=q[g+8>>2];while(1){i=g+w(e,48)|0;if((b|0)!=q[i>>2]|q[i+4>>2]!=(c|0)){e=q[i+40>>2];if((e|0)!=-1){continue}break a}break}e=g+w(e,48)|0;h=q[e+32>>2];g=q[h+32>>2];if(!g){h=-15;break a}q[f+32>>2]=a;h=q[h+12>>2];q[f+60>>2]=d;q[f+36>>2]=h;i=e+8|0;q[f+64>>2]=i;q[f+56>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+40>>2]=b;q[f+44>>2]=c;h=Mi[g|0](f+32|0)|0;if(h){break a}e=q[a+12>>2];if(!e){h=0;break a}h=0;d=q[e>>2];if((d|0)==q[e+4>>2]){break a}e=0;while(1){d=(e<<3)+d|0;g=q[d+4>>2];q[f+24>>2]=b;q[f+28>>2]=c;q[f+16>>2]=0;q[f+12>>2]=i;q[f+8>>2]=g;Mi[q[d>>2]](f+8|0);g=q[a+12>>2];d=q[g>>2];e=e+1|0;if(e>>>0>2]-d>>3>>>0){continue}break}}Bj(j);Ii=f+80|0;return h}J(25602,24997,1064,25572);G()}function Wu(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{if(q[a+24>>2]==(c|0)){q[a+28>>2]=c;if((b|0)==-1){break b}c=q[a+32>>2];if((c|0)==-1){break a}g=q[q[a>>2]+12>>2];while(1){d=c;f=g+(d<<2)|0;e=q[f>>2];c=(e>>>14|0)-131071|0;c=(c|0)==-1?-1:(d+c|0)+1|0;if((c|0)!=-1){continue}break}c=f;d=(d^-1)+b|0;b=d>>31;if((b^b+d)>=131072){Sj(q[a+12>>2],141849);e=q[f>>2]}q[c>>2]=(e&16383|d<<14)+2147467264;return}if((b|0)==-1){break b}while(1){h=q[q[a>>2]+12>>2]+(b<<2)|0;f=q[h>>2];e=(f>>>14|0)-131071|0;i=(e|0)==-1;e=(b+e|0)+1|0;c:{if((b|0)>=1){d=h-4|0;g=q[d>>2];if(o[(g&63)+141360|0]<0){break c}}g=f;d=h}e=i?-1:e;d:{e:{f:{if((g&63)==27){q[d>>2]=g&8372224|g>>>17&32704|26;b=(b^-1)+c|0;d=b>>31;if((d^b+d)>131071){break f}break e}b=(b^-1)+c|0;d=b>>31;if((d^b+d)<131072){break d}}Sj(q[a+12>>2],141849)}f=q[h>>2]}q[h>>2]=(f&16383|b<<14)+2147467264;b=e;if((b|0)!=-1){continue}break}}return}q[a+32>>2]=b}function s1(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,s=0,t=0;e=Ii-32|0;Ii=e;h=-2;a:{if(q[a>>2]!=1179011410|b>>>0<12|q[a+8>>2]!=1163280727){break a}d=a+12|0;g=a+b|0;while(1){b:{f=d+8|0;if(f>>>0>g>>>0){break b}i=r[d+4|0]|r[d+5|0]<<8|(r[d+6|0]<<16|r[d+7|0]<<24);j=r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24);c:{if((j|0)!=1635017060){if((j|0)!=544501094){break c}if(d+24>>>0>g>>>0){q[e+4>>2]=b;q[e>>2]=d-a;Pi(3,211309,211315,e);break a}k=r[d+22|0]|r[d+23|0]<<8;f=r[d+8|0]|r[d+9|0]<<8;if((f|0)!=1){q[e+20>>2]=k;q[e+16>>2]=f;Pi(3,211309,211382,e+16|0);break a}n=r[d+10|0];p=r[d+12|0]|r[d+13|0]<<8|(r[d+14|0]<<16|r[d+15|0]<<24);l=1;break c}m=1;s=i;t=f}d=(d+i|0)+8|0;if(g>>>0<=d>>>0){break b}if(!(l&m)){continue}}break}if(!m|!l){break a}a=$i(20);q[a+16>>2]=t;h=0;q[a+12>>2]=0;o[a+9|0]=k;o[a+8|0]=n;q[a+4>>2]=s;q[a>>2]=p;q[c>>2]=a}Ii=e+32|0;return h|0}function Zsa(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;a:{if(a){ka(q[a+4>>2])|0;gi(q[a+4>>2]);if(q[a+12>>2]!=q[a+16>>2]){while(1){oa(q[a+24>>2],4118,c+28|0);if(q[c+28>>2]>=1){while(1){gb(q[a+24>>2],1,c+24|0);b=X()|0;if(b){q[c+16>>2]=W(b|0);Pi(4,213576,214018,c+16|0)}b=q[a+12>>2];if((b|0)==q[a+16>>2]){break a}e=q[c+24>>2];q[a+12>>2]=b+4;q[b>>2]=e;b=q[c+28>>2];q[c+28>>2]=b-1;if((b|0)>1){continue}break}}b=d+1|0;if(!((b>>>0)%10|0)){Pi(2,213576,213683,0)}Xn(1e4);if(d>>>0>=1e3){Pi(4,213576,213721,0)}d=b;if(q[a+12>>2]!=q[a+16>>2]){continue}break}}ki(q[a+24>>2]);pi(1,a+24|0);d=q[a+8>>2];qi(q[a+12>>2]-d>>2,d|0);d=X()|0;if(d){q[c>>2]=W(d|0);Pi(4,213576,214018,c)}b=213645;b:{c:{if(!(ka(0)|0)){break c}fb(q[a+4>>2]);if(La(q[a>>2])|0){break b}b=213755}Pi(4,213576,b,0)}d:{if(o[a+20|0]&1){break d}d=q[a+8>>2];if(!d){break d}Ni(d)}Ni(a)}Ii=c+32|0;return}J(214104,214021,533,214128);G()}function Nla(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;b=Ii-48|0;Ii=b;a:{b:{c:{d:{g=q[a+4>>2];a=q[g+136>>2];e:{if(!a){break e}a=q[q[g+132>>2]+(Cza(c,d,a)<<2)>>2];if((a|0)==-1){break e}i=q[g+140>>2];while(1){h=i+w(a,24)|0;if((c|0)==q[h>>2]&(d|0)==q[h+4>>2]){break d}a=q[h+16>>2];if((a|0)!=-1){continue}break}}a=aj(c,d);q[b+4>>2]=aj(e,f);q[b>>2]=a;Pi(4,40439,41290,b);break c}a=i+w(a,24)|0;if(q[a+8>>2]!=(e|0)|q[a+12>>2]!=(f|0)){c=aj(c,d);a=aj(q[a+8>>2],q[a+12>>2]);q[b+40>>2]=aj(e,f);q[b+36>>2]=a;q[b+32>>2]=c;Pi(4,40439,41332,b+32|0);break c}a=q[g+104>>2];f:{if(!a){break f}a=q[q[g+100>>2]+(Cza(c,d,a)<<2)>>2];if((a|0)==-1){break f}e=q[g+108>>2];while(1){f=e+(a<<4)|0;g=f;if((c|0)==q[g>>2]&(d|0)==q[g+4>>2]){break b}a=q[f+12>>2];if((a|0)!=-1){continue}break}}q[b+16>>2]=aj(c,d);Pi(4,40439,41390,b+16|0)}a=0;break a}a=q[(e+(a<<4)|0)+8>>2]}Ii=b+48|0;return a|0}function Pua(a){var b=0,c=0,d=0;c=-6;a:{if(r[184711]!=49){break a}c=-2;if(!a){break a}q[a+24>>2]=0;b=q[a+32>>2];if(!b){q[a+40>>2]=0;q[a+32>>2]=1422;b=1422}if(!q[a+36>>2]){q[a+36>>2]=1423}b=Mi[b|0](q[a+40>>2],1,5828)|0;c=-4;if(!b){break a}q[a+28>>2]=b;q[b+48>>2]=15;q[b+28>>2]=0;q[b+24>>2]=1;q[b>>2]=a;q[b+80>>2]=15;q[b+44>>2]=32768;q[b+52>>2]=32767;q[b+76>>2]=32768;q[b+88>>2]=5;q[b+84>>2]=32767;q[b+56>>2]=Mi[q[a+32>>2]](q[a+40>>2],32768,2);q[b+64>>2]=Mi[q[a+32>>2]](q[a+40>>2],q[b+44>>2],2);c=Mi[q[a+32>>2]](q[a+40>>2],q[b+76>>2],2)|0;q[b+5824>>2]=0;q[b+68>>2]=c;q[b+5788>>2]=16384;c=Mi[q[a+32>>2]](q[a+40>>2],16384,4)|0;q[b+8>>2]=c;d=q[b+5788>>2];q[b+12>>2]=d<<2;b:{if(!(!c|(!q[b+56>>2]|!q[b+64>>2]))){if(q[b+68>>2]){break b}}q[b+4>>2]=666;q[a+24>>2]=q[70782];WB(a);return-4}q[b+136>>2]=0;q[b+132>>2]=3;o[b+36|0]=8;q[b+5784>>2]=c+w(d,3);q[b+5796>>2]=c+(d&-2);c=Oua(a)}return c}function $r(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;i=q[e>>2];f=i+8|0;e=s[c>>1];k=s[(f+w(e,112)|0)+104>>1];h=s[b>>1];j=s[(f+w(h,112)|0)+104>>1];g=s[a>>1];f=f+w(g,112)|0;a:{if(j>>>0>=s[f+104>>1]){if(k>>>0>=j>>>0){f=0;break a}p[b>>1]=e;p[c>>1]=h;f=i+8|0;e=s[b>>1];g=s[a>>1];if(s[(f+w(e,112)|0)+104>>1]>=s[(f+w(g,112)|0)+104>>1]){f=1;e=h;break a}p[a>>1]=e;p[b>>1]=g;e=s[c>>1];f=2;break a}b:{if(k>>>0>>0){p[a>>1]=e;p[c>>1]=g;f=1;break b}p[a>>1]=h;p[b>>1]=g;e=s[c>>1];if(s[(w(e,112)+i|0)+112>>1]>=s[f+104>>1]){f=1;break a}p[b>>1]=e;p[c>>1]=g;f=2}e=g}g=i+8|0;h=s[d>>1];if(s[(g+w(h,112)|0)+104>>1]>1]){p[c>>1]=h;p[d>>1]=e;d=s[c>>1];e=s[b>>1];if(s[(g+w(d,112)|0)+104>>1]>=s[(g+w(e,112)|0)+104>>1]){return f+1|0}p[b>>1]=d;p[c>>1]=e;d=i+8|0;c=s[b>>1];e=s[a>>1];if(s[(d+w(c,112)|0)+104>>1]>=s[(d+w(e,112)|0)+104>>1]){return f+2|0}p[a>>1]=c;p[b>>1]=e;f=f+3|0}return f}function zpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=q[a>>2];c=$i(36);q[c>>2]=0;q[c+4>>2]=0;q[c+32>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;b=c+8|0;q[b>>2]=0;q[b+4>>2]=0;e=q[a+16>>2];f=q[d+8>>2];e=e>>>0>>0?e:f;Wi(e,28,c,b,c+4|0);a:{b:{f=q[b>>2];b=q[c>>2];if(e>>>0<=(f-b|0)/28>>>0){q[c+4>>2]=b+w(e,28);b=q[c+20>>2];if(e>>>0>>0){break b}f=q[c+16>>2];g=Yi(e<<2);q[c+16>>2]=g;g=Ti(g,f,b<<2);q[c+20>>2]=e;if(b>>>0>>0){while(1){q[g+(b<<2)>>2]=b;b=b+1|0;if((e|0)!=(b|0)){continue}break}}Ni(f);q[c+32>>2]=q[d>>2];if(e){b=0;while(1){d=q[c>>2];if((q[c+4>>2]-d|0)/28>>>0<=b>>>0){break a}d=d+w(b,28)|0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+24>>2]=0;q[d+16>>2]=-2;q[d+20>>2]=-2;q[d+12>>2]=-2;b=b+1|0;if((e|0)!=(b|0)){continue}break}}q[q[a+12>>2]>>2]=c;return 0}J(34876,34820,506,34895);G()}J(35217,35240,112,34978);G()}J(34809,34820,479,34798);G()}function IA(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{if(b>>>0<8){d=b;break a}d=b;while(1){e=g;g=Aza(r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24),r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24),1540483477,-962287725);h=Li;i=Aza(Aza(g^h>>>15,h,1540483477,-962287725)^i,Li^e,1540483477,-962287725);g=Li;a=a+8|0;d=d-8|0;if(d>>>0>7){continue}break}}b:{switch(d-1|0){case 6:c=r[a+6|0]<<16;case 5:c=c|r[a+5|0]<<8;case 4:c=c^r[a+4|0];case 3:e=r[a+3|0];d=e>>>8|0;f=f^e<<24;c=c^d;case 2:d=r[a+2|0];e=d>>>16|0;f=f^d<<16;c=c^e;case 1:e=r[a+1|0];d=e>>>24|0;f=f^e<<8;c=c^d;case 0:f=Aza(r[a|0]^f,c,1540483477,-962287725);c=Li;break;default:break b}}a=c;c=Aza(Aza(f^a>>>15,a,1540483477,-962287725)^i,g^Li,1540483477,-962287725);e=Li;a=Aza(b,0,1540483477,-962287725);b=Li;a=Aza(a^b>>>15,b,1540483477,-962287725)^c;b=Li^e;a=Aza(a^b>>>15,b,1540483477,-962287725);b=Li;Li=b;return a^b>>>15}function y7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-80|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=_i(a,-1,q[79180],119558);Ri(a,-2);a:{b:{if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){d=fj(a,1);c:{if(d<4294967296&d>=0){c=~~d>>>0;break c}c=0}g=c>>>0<=14;d=fj(a,2);d:{if(d<4294967296&d>=0){e=~~d>>>0;break d}e=0}if(!(e>>>0<15?g:0)){q[b+24>>2]=e;q[b+20>>2]=c;q[b+16>>2]=115561;a=Qi(a,117465,b+16|0);break a}q[b+48>>2]=c;q[b+52>>2]=0;q[b+40>>2]=9;q[b+56>>2]=e;q[b+60>>2]=0;c=q[f+4>>2];if((c|0)==q[f+8>>2]){break b}q[f+4>>2]=c+40;a=q[b+76>>2];q[c+32>>2]=q[b+72>>2];q[c+36>>2]=a;a=b- -64|0;e=q[a+4>>2];q[c+24>>2]=q[a>>2];q[c+28>>2]=e;a=q[b+60>>2];q[c+16>>2]=q[b+56>>2];q[c+20>>2]=a;a=q[b+52>>2];q[c+8>>2]=q[b+48>>2];q[c+12>>2]=a;a=q[b+44>>2];q[c>>2]=q[b+40>>2];q[c+4>>2]=a;a=0;break a}J(115568,115465,478,119531);G()}q[b>>2]=(q[f+8>>2]-q[f>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+80|0;return a|0}function $la(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;f=q[a+20>>2];if(!f){return-1}e=-1;a:{g=q[q[a+16>>2]+(Cza(b,c,f)<<2)>>2];b:{if((g|0)==-1){break b}f=q[a+64>>2];i=q[a+24>>2];while(1){h=i+(g<<4)|0;if(q[h>>2]!=(b|0)|q[h+4>>2]!=(c|0)){g=q[h+12>>2];if((g|0)!=-1){continue}break b}break}if(!q[f+52>>2]){return-1e3}b=q[(i+(g<<4)|0)+8>>2];if(b>>>0>=t[f+8>>2]){break a}e=-3;b=q[f+4>>2]+w(b,40)|0;c=q[b+24>>2];if(c>>>0>6){break b}q[d+12>>2]=q[f+48>>2];e=q[d>>2]&-8192|q[b+12>>2]&8191;q[d>>2]=e;q[d>>2]=q[b+16>>2]<<13&67100672|e&-67100673;e=q[a+48>>2];p[d+4>>1]=Mi[q[75017]](q[e>>2],q[e+4>>2]);a=q[a+48>>2];p[d+6>>1]=Mi[q[75018]](q[a>>2],q[a+4>>2]);q[d>>2]=q[d>>2]&-1006632961|q[(c<<2)+290544>>2]<<26&1006632960;o[d+8|0]=q[b+20>>2];a=r[d+20|0]&-2|o[b+28|0]&1;o[d+20|0]=a;b=r[b+32|0];q[d+16>>2]=f;o[d+20|0]=b<<1&2|a&253;e=0}return e|0}J(41214,41226,88,41006);G()}function $I(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];c:{if(!e){break c}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break c}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break b}f=q[e+20>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];d:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break d}e=q[a+20>>2];if((e|0)==-1){break a}e=g+w(e,24)|0;q[a+20>>2]=q[e+20>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;q[e+16>>2]=q[d+8>>2];q[e+20>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)!=-1){while(1){b=d+w(f,24)|0;f=q[b+20>>2];if((f|0)!=-1){continue}break}b=b+20|0}q[b>>2]=(e-d|0)/24;q[a+24>>2]=q[a+24>>2]+1;return}J(201328,201191,229,201336);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;q[a+16>>2]=q[d+8>>2];return}J(201340,201191,537,201402);G()}function _O(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-48|0;Ii=e;f=hk(a,b,e+44|0,48);a:{if(f){d=f-9472|0;break a}d=-9574;g=q[a>>2];if((g+q[e+44>>2]|0)!=(b|0)){break a}b:{if(b>>>0<=g>>>0){f=c;break b}f=c;while(1){q[e+32>>2]=0;q[e+36>>2]=0;q[e+24>>2]=0;q[e+28>>2]=0;q[e+16>>2]=0;q[e+20>>2]=0;q[e+8>>2]=0;q[e+12>>2]=0;q[e>>2]=0;q[e+4>>2]=0;if((b-g|0)<1){d=-9568;break a}h=r[g|0];q[a>>2]=g+1;d=Wq(a,b,e+40|0);if(d){d=d-9472|0;break a}if((h&192)!=128){d=-9570;break a}d=mV(f,e);if(!((d|0)==-8320|!d)){a=q[c+12>>2];if(a){while(1){b=q[a+12>>2];Mi[q[65677]](a,0,16)|0;Ni(a);a=b;if(a){continue}break}}q[c+12>>2]=0;break a}if(q[f+8>>2]){if(q[f+12>>2]){d=-9472;break a}d=f;f=bk(1,16);q[d+12>>2]=f;if(!f){d=-9578;break a}}q[f>>2]=h;q[f+8>>2]=q[a>>2];d=q[e+40>>2];q[f+4>>2]=d;g=d+q[a>>2]|0;q[a>>2]=g;if(b>>>0>g>>>0){continue}break}}q[f+12>>2]=0;d=q[a>>2]==(b|0)?0:-9574}Ii=e+48|0;return d}function d7(a,b){var c=0,d=0,e=0,f=0;d=Ii-48|0;Ii=d;c=q[72006];if(c){while(1){a:{if(q[c+8>>2]){q[d+40>>2]=b;q[d+24>>2]=a;e=q[c>>2];q[d+28>>2]=e;q[d+32>>2]=Oi(e);q[d+36>>2]=Li;e=Mi[q[c+8>>2]](d+24|0)|0;f=q[c>>2];if(e){c=25719;b:{c:{switch(e+21|0){case 18:c=25729;break b;case 17:c=25748;break b;case 16:c=25771;break b;case 15:c=25790;break b;case 14:c=25796;break b;case 13:c=25818;break b;case 12:c=25832;break b;case 11:c=25841;break b;case 10:c=25852;break b;case 9:c=25869;break b;case 8:c=25892;break b;case 7:c=25905;break b;case 6:c=25920;break b;case 5:c=25934;break b;case 4:c=25954;break b;case 2:c=25962;break b;case 1:c=25979;break b;case 0:c=25998;break b;default:c=26012;break b;case 19:break b;case 20:break c}}c=25706}q[d+4>>2]=c;q[d>>2]=f;Pi(4,24640,26122,d);break a}q[d+16>>2]=f;Pi(0,24640,26157,d+16|0)}c=q[c+12>>2];if(c){continue}}break}}Ii=d+48|0}function Bs(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;j=Ii-256|0;Ii=j;o=q[a+20>>2];f=o;p=q[a+16>>2];k=p;s=q[a+12>>2];h=s;t=q[a+8>>2];c=t;u=q[a+28>>2];e=u;v=q[a+32>>2];l=v;w=q[a+24>>2];d=w;x=q[a+36>>2];m=x;while(1){i=d;n=l;l=e;e=c;a:{if(g>>>0<=15){c=g<<2;c=r[(c|1)+b|0]<<16|r[b+c|0]<<24|r[(c|2)+b|0]<<8|r[(c|3)+b|0];break a}c=(g<<2)+j|0;d=q[c-8>>2];d=((Fza(d,15)^Fza(d,13)^d>>>10)+q[c-28>>2]|0)+q[c+ -64>>2]|0;c=q[c-60>>2];c=d+(Fza(c,25)^Fza(c,14)^c>>>3)|0}d=g<<2;q[d+j>>2]=c;y=f;f=(c+(q[d+155968>>2]+((Fza(i,26)^Fza(i,21)^Fza(i,7))+m|0)|0)|0)+((l^n)&i^n)|0;d=y+f|0;c=(f+(Fza(e,30)^Fza(e,19)^Fza(e,10))|0)+((e|h)&k|e&h)|0;f=k;k=h;h=e;e=i;m=n;g=g+1|0;if((g|0)!=64){continue}break}q[a+36>>2]=m+x;q[a+32>>2]=l+v;q[a+28>>2]=e+u;q[a+24>>2]=d+w;q[a+20>>2]=f+o;q[a+16>>2]=k+p;q[a+12>>2]=h+s;q[a+8>>2]=c+t;Ii=j+256|0;return 0}function bA(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Ii-16|0;Ii=h;q[h+8>>2]=0;f=q[a+1984>>2]-q[a+1980>>2]|0;e=(f|0)/288|0;a:{b:{if(!f){break b}d=e;f=d;e=q[a+2e3>>2];g=q[a+1996>>2];c:{if((e|0)==q[a+2004>>2]){break c}q[a+2004>>2]=e;q[a+1996>>2]=0;q[a+1960>>2]=0;e=a+1948|0;q[e>>2]=0;q[e+4>>2]=0;g=0}i=f-g|0;if(!i){break b}e=vp(a,i);j=Dv(a,763,764,a)<<6;k=b<<4&48;f=0;d=e;while(1){g=q[a+1996>>2]+f|0;b=q[a+1980>>2];if(g>>>0>=(q[a+1984>>2]-b|0)/288>>>0){break a}b=w(g,288)+b|0;g=q[b+100>>2];l=q[b+96>>2];u[d+8>>2]=u[b+104>>2];q[d>>2]=l;q[d+4>>2]=g;q[d+36>>2]=q[d+36>>2]&-64|k;q[d+24>>2]=c;q[d+16>>2]=b;q[d+20>>2]=0;q[d+28>>2]=q[b+192>>2];q[d+32>>2]=q[q[b+180>>2]+132>>2];q[d+36>>2]=q[d+36>>2]&-16321|j;d=d+48|0;f=f+1|0;if((i|0)!=(f|0)){continue}break}up(a,e,d);d=(q[a+1984>>2]-q[a+1980>>2]|0)/288|0}q[a+1996>>2]=d;Ii=h+16|0;return}J(112884,112895,479,112951);G()}function yF(a){var b=0;q[a+1316>>2]=10;q[a+1320>>2]=1e3;q[a+1308>>2]=0;q[a+1312>>2]=2;q[a+1344>>2]=1;q[a+1348>>2]=1e3;q[a+1324>>2]=0;q[a+1352>>2]=0;q[a+1328>>2]=14;q[a+1332>>2]=1;q[a+1336>>2]=1;q[a+1340>>2]=1;$C(a+1280|0);while(1){q[(b<<2)+a>>2]=12;b=b+1|0;if((b|0)!=256){continue}break}q[a+500>>2]=1;q[a+492>>2]=0;q[a+372>>2]=3;q[a+364>>2]=2;q[a+232>>2]=8;q[a+128>>2]=11;q[a>>2]=10;q[a+420>>2]=13;q[a+408>>2]=13;q[a+52>>2]=11;q[a+36>>2]=11;q[a+40>>2]=11;q[a+440>>2]=13;q[a+292>>2]=13;q[a+464>>2]=13;q[a+312>>2]=13;q[a+224>>2]=13;q[a+228>>2]=13;q[a+216>>2]=13;q[a+220>>2]=13;q[a+208>>2]=13;q[a+212>>2]=13;q[a+200>>2]=13;q[a+204>>2]=13;q[a+192>>2]=13;q[a+196>>2]=13;q[a+180>>2]=13;q[a+172>>2]=13;q[a+176>>2]=9;q[a+136>>2]=13;Ui(a+1024|0,0,256);o[a+1116|0]=92;o[a+1058|0]=34;o[a+1122|0]=8;o[a+1071|0]=47;o[a+1134|0]=10;p[a+1140>>1]=29961;o[a+1138|0]=13;o[a+1126|0]=12}function oK(a){var b=0,c=0,d=0,e=0,f=0,g=0;c=q[q[a+12>>2]>>2];rj(c,-1e4,q[a>>2]);yk(c);Ez(q[a+400>>2]);b=q[c+8>>2];q[b+8>>2]=0;q[c+8>>2]=b+16;yk(c);f=q[a+32>>2];d=q[a+36>>2]-f|0;b=(d|0)/592|0;if(d){e=b>>>0>1?b:1;d=0;while(1){b=f+w(d,592)|0;g=q[b+416>>2];if(g){Mi[q[a+408>>2]](q[a+420>>2],a,s[b+570>>1]|s[b+568>>1]<<16,g,q[b+512>>2])}b=q[b+420>>2];if(b){Ni(b)}d=d+1|0;if((e|0)!=(d|0)){continue}break}}Rj(c,-1e4,q[a>>2]);Rj(c,-1e4,q[a+4>>2]);Rj(c,-1e4,q[a+8>>2]);a:{c=q[a+12>>2];d=q[c+44>>2];f=q[c+40>>2];b=d-f|0;if(!b){break a}e=f-d|0;e=((b|0)<(e|0)?e:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(e,(b|0)<1?b:1);e=b>>>0>1?b:1;b=0;while(1){g=f+(b<<2)|0;if(q[g>>2]!=(a|0)){b=b+1|0;if((e|0)!=(b|0)){continue}break a}break}q[g>>2]=q[d-4>>2];b=q[c+44>>2]-4|0;q[c+44>>2]=b;if(b>>>0>=t[c+40>>2]){break a}J(202168,201514,516,202158);G()}Ui(tba(a),0,440);q[a+8>>2]=-2;q[a>>2]=-2;q[a+4>>2]=-2}function ez(a,b,c){var d=0,e=0,f=0,g=0,h=0;h=Ii-80|0;Ii=h;e=q[a+4>>2];a:{if(e>>>0>>0){break a}d=h;q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+40>>2]=0;q[d+56>>2]=b;q[d+48>>2]=1;q[d+52>>2]=2;q[d+64>>2]=1;q[d>>2]=0;q[d+4>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;g=e-c|0;f=c>>>0>>0?c:g;q[d+68>>2]=f;q[d+72>>2]=d;d=q[a+8>>2]+(c<<2)|0;b=Ti(h,d,f<<2);q[b+68>>2]=f+2;if(c>>>0>>0){Ui(d,0,g<<2)}d=Wk(b- -64|0,b- -64|0,b+48|0);if(d){break a}d=ys(a,a,b- -64|0);if(d){break a}g=q[a+4>>2];q[b+16>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;f=g-c|0;d=c>>>0>>0?c:f;q[b+68>>2]=d;e=b;b=q[a+8>>2]+(c<<2)|0;e=Ti(e,b,d<<2);q[e+68>>2]=d+q[e+52>>2];if(c>>>0>>0){Ui(b,0,f<<2)}d=Wk(e- -64|0,e- -64|0,e+48|0);if(d){break a}d=ys(a,a,e- -64|0)}Ii=h+80|0;return d}function O4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii+ -64|0;Ii=d;f=d+16|0;c=a;g=0;a:{if(!c){break a}g=q[c+120>>2]}k=nj(f,g,0,125134,135);c=c?q[a+120>>2]:0;f=nj(d+40|0,c,0,125134,91);Xi(c,q[63063]);MG(a);b=qj(c,-1);Ri(c,-2);mj(f);if(b){e=q[210498];if(e){while(1){b:{if(!q[e+24>>2]){break b}h=d+40|0;q[h>>2]=0;q[h+4>>2]=0;q[h+8>>2]=0;c=d;f=a;i=0;c:{if(!a){break c}i=q[f>>2]}q[c+40>>2]=i;c=f?q[a+4>>2]:0;q[d+48>>2]=g;q[d+44>>2]=c;if(!(q[((j&-4)+b|0)+4>>2]>>>(j&3)&1)){break b}if(!(Mi[q[e+24>>2]](h)|0)){break b}q[d>>2]=q[e>>2];Pi(4,125163,125236,d)}j=j+1|0;e=q[e+36>>2];if(e){continue}break}}Rj(g,-1e4,q[b+68>>2]);q[b+4>>2]=0;q[b+8>>2]=0;q[b+68>>2]=-2;q[b+12>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+64>>2]=0}mj(k);Ii=d- -64|0}function lm(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Ii-160|0;Ii=d;c=b&255;i=c>>>0<16?q[q[a>>2]+72>>2]+w(c,148)|0:0;KA(q[q[a>>2]+72>>2],i,d+32|0);a:{if(!r[d+32|0]){break a}e=st(d+32|0);b:{c:{d:{f=q[a>>2];g=q[f+12>>2];e:{if(!g){break e}j=q[f+8>>2];c=q[j+((e>>>0)%(g>>>0)<<2)>>2];if((c|0)!=-1){k=q[f+16>>2];while(1){l=w(c,184)+k|0;if((e|0)==q[l>>2]){break d}c=q[l+180>>2];if((c|0)!=-1){continue}break}}e=q[210502];c=q[((e>>>0)%(g>>>0)<<2)+j>>2];if((c|0)==-1){break e}f=q[f+16>>2];while(1){g=f+w(c,184)|0;if(q[g>>2]==(e|0)){break c}c=q[g+180>>2];if((c|0)!=-1){continue}break}}q[d>>2]=b;q[d+4>>2]=d+32;Pi(3,149328,149835,d);break a}e=q[210502];c=(w(c,184)+k|0)+4|0;break b}c=(f+w(c,184)|0)+4|0}h=$i(348);Ui(h+4|0,0,344);q[h>>2]=i;if(q[c>>2]==(e|0)){q[d+16>>2]=b;q[d+20>>2]=d+32;Pi(3,149328,149886,d+16|0);o[h+345|0]=r[h+345|0]|2}oA(a,h,b)}Ii=d+160|0;return h}function lU(a){var b=0,c=0;a:{if(!a){break a}b:{c:{d:{e:{switch(q[a+4>>2]-5|0){case 3:b=q[a+8>>2];if((r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))!=-834107862|(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24))!=16843581){break d}c=263440;break a;case 4:break b;case 0:break e;default:break a}}if(Ej(157823,q[a+8>>2],5)){break c}return 263460}a=q[a+8>>2];if((r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))!=-834107862|(r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24))!=117506877){break a}return 263480}if(!Ej(157858,q[a+8>>2],5)){return 263500}if(!Ej(157874,q[a+8>>2],5)){return 263520}if(!Ej(157890,q[a+8>>2],5)){return 263540}if(!Ej(157906,q[a+8>>2],5)){return 263560}if(Ej(157922,q[a+8>>2],5)){break a}return 263580}if(!Ej(157938,q[a+8>>2],9)){return 263600}if(!Ej(157979,q[a+8>>2],9)){return 263620}if(Ej(158020,q[a+8>>2],9)){break a}return 263640}return c}function TY(a,b,c){var d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}c:{if((c|0)>=1){b=(q[a+12>>2]+(c<<4)|0)-16|0;b=b>>>0>2]?b:141056;break c}b=q[a+8>>2]+(c<<4)|0;if((c|0)>=-9999){break c}d:{switch(c+10002|0){case 2:b=q[a+16>>2]+96|0;break c;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;b=a+88|0;break c;case 0:b=a+72|0;break c;default:break d}}b=q[q[q[a+20>>2]+4>>2]>>2];b=r[b+7|0]<(-10002-c|0)?141056:(b+(0-c<<4)|0)-160024|0}c=0;if(!((d|0)==141056|(b|0)==141056)){c=fF(a,d,b)}return c}function Mu(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{if(!b){break a}e=q[a+128>>2];while(1){if(e>>>0<=63){o[d+i|0]=r[(a+e|0)- -64|0]^r[c+i|0];e=q[a+128>>2]+1|0;q[a+128>>2]=e;i=i+1|0;b=b-1|0;if(b){continue}break a}break}if(b>>>0>=64){h=a- -64|0;while(1){BN(a,h);q[a+48>>2]=q[a+48>>2]+1;e=0;while(1){g=e+i|0;o[g+d|0]=r[e+h|0]^r[c+g|0];f=g+1|0;o[f+d|0]=r[h+(e|1)|0]^r[c+f|0];f=g+2|0;o[f+d|0]=r[h+(e|2)|0]^r[c+f|0];f=g+3|0;o[f+d|0]=r[h+(e|3)|0]^r[c+f|0];f=g+4|0;o[f+d|0]=r[h+(e|4)|0]^r[c+f|0];f=g+5|0;o[f+d|0]=r[h+(e|5)|0]^r[c+f|0];f=g+6|0;o[f+d|0]=r[h+(e|6)|0]^r[c+f|0];g=g+7|0;o[g+d|0]=r[h+(e|7)|0]^r[c+g|0];g=e>>>0<56;e=e+8|0;if(g){continue}break}i=i- -64|0;b=b+ -64|0;if(b>>>0>63){continue}break}if(!b){break a}}BN(a,a- -64|0);q[a+48>>2]=q[a+48>>2]+1;e=0;while(1){h=e+i|0;o[h+d|0]=r[(a+e|0)- -64|0]^r[c+h|0];e=e+1|0;if((e|0)!=(b|0)){continue}break}q[a+128>>2]=b}return 0}function ula(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=Ii-112|0;Ii=b;f=nj(b+88|0,a,0,71916,294);e=q[a+8>>2]-q[a+12>>2]>>4;g=jk(a);h=$j(a,2);i=Li;j=jj(a,3);q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Gk(a,1,b+56|0,b+24|0);a:{if((e|0)<4){d=1;c=0;break a}Dj(a,4,5);ej(a,4);Zi(a,-1,71974);if(Vi(a,-1)){k=fj(a,-1)}Ri(a,-2);Zi(a,-1,71989);if(Vi(a,-1)){l=fj(a,-1)}Ri(a,-2);Zi(a,-1,71996);d=1;b:{if(!Vi(a,-1)){break b}d=fj(a,-1)}Ri(a,-2);Ri(a,-2);c=0;if((e|0)<5){break a}c=0;if((Vi(a,5)|0)!=6){break a}ej(a,5);c=$s(a)+2|0}q[b+8>>2]=j;q[b>>2]=h;q[b+4>>2]=i;u[b+20>>2]=d;u[b+16>>2]=l;u[b+12>>2]=k;a=q[59998];Oo(b+24|0,b+56|0,q[a+8>>2],q[a+12>>2],g,c,a,b,24,0);mj(f);Ii=b+112|0;return 0}function dJ(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];c:{if(!e){break c}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break c}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break b}f=q[e+20>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];d:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break d}e=q[a+20>>2];if((e|0)==-1){break a}e=g+w(e,24)|0;q[a+20>>2]=q[e+20>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;q[e+16>>2]=q[d+8>>2];q[e+20>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)!=-1){while(1){b=d+w(f,24)|0;f=q[b+20>>2];if((f|0)!=-1){continue}break}b=b+20|0}q[b>>2]=(e-d|0)/24;q[a+24>>2]=q[a+24>>2]+1;return}J(45130,44993,229,45138);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;q[a+16>>2]=q[d+8>>2];return}J(45142,44993,537,45204);G()}function Qv(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];c:{if(!e){break c}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break c}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break b}f=q[e+20>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];d:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break d}e=q[a+20>>2];if((e|0)==-1){break a}e=g+w(e,24)|0;q[a+20>>2]=q[e+20>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];q[e+8>>2]=q[d>>2];q[e+12>>2]=f;q[e+16>>2]=q[d+8>>2];q[e+20>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)!=-1){while(1){b=d+w(f,24)|0;f=q[b+20>>2];if((f|0)!=-1){continue}break}b=b+20|0}q[b>>2]=(e-d|0)/24;q[a+24>>2]=q[a+24>>2]+1;return}J(33797,33660,229,33805);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;q[a+16>>2]=q[d+8>>2];return}J(33809,33660,537,33871);G()}function fv(a){var b=0,c=0,d=0,e=0,f=0,g=0;Oza(+a);e=Lza(1)|0;Lza(0)|0;b=e;e=b>>>31|0;a:{b:{c:{d:{d=a;e:{f:{b=b&2147483647;g:{if(b>>>0>=1082532651){Oza(+a);b=Lza(1)|0;b=b&2147483647;if((b|0)==2146435072&(Lza(0)|0)!=0|b>>>0>2146435072){return a}if(!(a>709.782712893384^1)){return a*8.98846567431158e+307}if(!(a<-745.1332191019411)|a<-708.3964185322641^1){break g}break b}if(b>>>0<1071001155){break d}if(b>>>0<1072734898){break f}}a=a*1.4426950408889634+v[(e<<3)+218048>>3];if(y(a)<2147483648){b=~~a;break e}b=-2147483648;break e}b=(e^1)-e|0}c=+(b|0);a=d+c*-.6931471803691238;f=c*1.9082149292705877e-10;d=a-f;break c}if(b>>>0<=1043333120){break a}b=0;d=a}c=d;g=a;c=c*c;a=d-c*(c*(c*(c*(c*4.1381367970572385e-8+ -16533902205465252e-22)+6613756321437934e-20)+ -.0027777777777015593)+.16666666666666602);c=g+(d*a/(2-a)-f)+1;if(!b){break b}c=Zn(c,b)}return c}return a+1}function Lla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-96|0;Ii=b;i=nj(b+32|0,a,1,65882,438);f=oo(a,1,1,0);e=$j(a,2);c=Li;d=c;g=nj(b+72|0,a,1,65882,207);c=Pr(f,e,c,b+68|0,b- -64|0);a:{if(c){a=b;if(c>>>0<=11){d=q[(c<<2)+262624>>2]}else{d=153853}q[a+16>>2]=d;Kj(g,66929,b+16|0);break a}q[b+56>>2]=0;q[b+52>>2]=0;c=Ot(f,e,d,b+60|0,b+56|0,b- -64|0,b+52|0);if(c){a=b;if(c>>>0<=11){d=q[(c<<2)+262624>>2]}else{d=153853}q[a>>2]=d;Kj(g,66959,b);break a}h=q[b+68>>2];if(h>>>0>=9){Pi(3,65621,65629,0);if(t[b+68>>2]>=9){Pi(3,65621,65629,0)}Kj(g,66990,0);break a}c=yj(a,48);q[c+8>>2]=e;q[c+12>>2]=d;q[c>>2]=f;q[c+16>>2]=q[b+60>>2];q[c+28>>2]=q[b+56>>2];q[c+32>>2]=q[b+52>>2];q[c+40>>2]=q[b+68>>2];f=q[b+64>>2];e=h<<2;q[c+24>>2]=q[e+232276>>2];q[c+20>>2]=q[e+232240>>2];q[c+36>>2]=f;ej(a,1);q[c+44>>2]=zk(a,-1e4);Zi(a,-1e4,65680);xj(a,-2)}mj(g);mj(i);Ii=b+96|0;return 1}function Is(a,b,c){var d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}c:{if((c|0)>=1){b=(q[a+12>>2]+(c<<4)|0)-16|0;b=b>>>0>2]?b:141056;break c}b=q[a+8>>2]+(c<<4)|0;if((c|0)>=-9999){break c}d:{switch(c+10002|0){case 2:b=q[a+16>>2]+96|0;break c;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;b=a+88|0;break c;case 0:b=a+72|0;break c;default:break d}}a=q[q[q[a+20>>2]+4>>2]>>2];b=r[a+7|0]<(-10002-c|0)?141056:(a+(0-c<<4)|0)-160024|0}a=0;if(!((d|0)==141056|(b|0)==141056)){a=hp(d,b)}return a}function gm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-240|0;Ii=d;Xk(d+80|0,q[a+64>>2]+16|0,80);h=q[a+52>>2];g=q[a+4>>2];q[d+72>>2]=b;q[d+68>>2]=g;q[d+64>>2]=d+80;h=oj(h,141567,d- -64|0);if(c){g=q[a+52>>2];i=d;a:{if(c-284>>>0<=2){e=q[a+60>>2];c=q[e+4>>2];f=c+1|0;b=q[e+8>>2];b:{if(f>>>0<=b>>>0){b=q[e>>2];break b}if(b>>>0>=2147483646){Xk(d+160|0,q[a+64>>2]+16|0,80);c=q[a+52>>2];b=q[a+4>>2];q[d+24>>2]=141590;q[d+20>>2]=b;q[d+16>>2]=d+160;oj(c,141567,d+16|0);Nj(q[a+52>>2],3);b=q[e+8>>2]}f=q[a+52>>2];c=b<<1;c:{if((c|0)!=-2){b=Cj(f,q[e>>2],b,c);break c}b=mk(f)}q[e+8>>2]=c;q[e>>2]=b;c=q[e+4>>2];f=c+1|0}q[e+4>>2]=f;o[b+c|0]=0;b=q[q[a+60>>2]>>2];break a}if((c|0)<=256){if((c|0)==127|c>>>0<32){q[d+48>>2]=c;b=oj(g,141555,d+48|0);break a}q[d+32>>2]=c;b=oj(g,141564,d+32|0);break a}b=q[(c<<2)+255676>>2]}q[i+4>>2]=b;q[d>>2]=h;oj(g,141577,d)}Nj(q[a+52>>2],3);Ii=d+240|0}function fA(a){var b=0,c=0,d=0,e=0,f=0,g=0;a:{d=q[a+4>>2];b=q[a>>2];c=d-b|0;b:{c:{if(!c){d:{if(o[a+28|0]&1){break d}b=q[a+16>>2];if(!b){break d}Ni(b)}if(o[a+12|0]&1){break c}b=q[a>>2];if(!b){break c}Ni(b);break c}e=q[a+16>>2];if((e|0)==q[a+20>>2]){break a}e:{if((b|0)!=(d|0)){d=b-d|0;d=((c|0)<(d|0)?d:c)>>>4|0;c=(c|0)>-1?c:-1;c=w(d,(c|0)<1?c:1);g=c>>>0>1?c:1;c=0;while(1){d=0;f=q[((c<<4)+b|0)+8>>2];if(f){while(1){if(q[e+12>>2]){b=0;while(1){Ni(q[q[e+16>>2]+(b<<2)>>2]);b=b+1|0;if(b>>>0>2]){continue}break}}b=q[e+16>>2];if(b){Ni(b)}e=e+20|0;d=d+1|0;if((f|0)!=(d|0)){continue}break}}c=c+1|0;if((g|0)==(c|0)){break e}b=q[a>>2];if(q[a+4>>2]-b>>4>>>0>c>>>0){continue}break}}break a}if(!a){break b}f:{if(o[a+28|0]&1){break f}b=q[a+16>>2];if(!b){break f}Ni(b)}if(o[a+12|0]&1){break c}b=q[a>>2];if(!b){break c}Ni(b)}Ni(a)}return}J(112001,112012,479,111990);G()}function KR(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if(q[a+128>>2]!=22){Xj(a,2,10);return-30464}a:{b:{e=q[a+120>>2];if(r[e|0]==11){c=q[a+168>>2];d=r[q[a>>2]+184|0]&2?12:4;if(c>>>0>=d+6>>>0){break b}}break a}c:{e=d+e|0;if(!r[e|0]){d=d+3|0;if((d+(r[e+2|0]|r[e+1|0]<<8)|0)==(c|0)){break c}}break a}if(c>>>0>d>>>0){e=0;i=42;while(1){f=d+3|0;if(f>>>0>c>>>0){break a}g=q[a+120>>2];d=g+d|0;if(r[d|0]){break a}d:{h=r[d+2|0]|r[d+1|0]<<8;if(h>>>0>=128){d=f+h|0;if(d>>>0<=c>>>0){break d}}break a}if(!(o[q[a>>2]+184|0]&1|e|q[a+8>>2]!=1)){c=q[a+60>>2];if(UR(q[c+96>>2],f+g|0,h)){Xj(a,2,49);return-31232}Mx(c);g=q[a+120>>2]}e:{c=iy(b,f+g|0,h);f:{if((c|0)<=-9601){if((c|0)==-9774){break e}if((c|0)!=-10368){break f}i=80;break f}if(!c){break e}if((c|0)!=-9600){break f}i=43}Xj(a,2,i);return c}e=e+1|0;c=q[a+168>>2];if(d>>>0>>0){continue}break}}return 0}Xj(a,2,50);return-31232}function Lea(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0;h=Ii-16|0;Ii=h;a:{b:{e=b&65535;f=q[a+32>>2];if(e>>>0<(q[a+36>>2]-f|0)/592>>>0){if(s[(f+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}i=q[a+52>>2];g=q[a+48>>2];j=i-g|0;k=(j|0)/72|0;l=Yv(c,d);if(l){c:{if(!j){break c}if((g|0)!=(i|0)){k=k>>>0>1?k:1;c=0;i=f+w(e,592)|0;while(1){e=r[l+12|0];d=(e|0)==255;f=d?0:e;e=d?4:e+1|0;if(f>>>0>>0){j=(q[l+8>>2]<<4)+i|0;n=d?4:1;m=w(c,72)+g|0;d=m;p=q[d>>2];g=0;while(1){if(!((b|0)!=(p|0)|q[m+4>>2]!=((f<<2)+j|0))){o[d+68|0]=r[d+68|0]|4;g=g+1|0;if((n|0)==(g|0)){break c}}f=f+1|0;if((e|0)!=(f|0)){continue}break}}c=c+1|0;if((k|0)==(c|0)){break c}g=q[a+48>>2];if((q[a+52>>2]-g|0)/72>>>0>c>>>0){continue}break}}break a}Ii=h+16|0;return}q[h>>2]=aj(c,d);Pi(4,199633,200814,h);Ii=h+16|0;return}break a}J(199518,199542,3684,200838);G()}J(201665,201514,479,201676);G()}function zs(a,b){var c=0,d=0,e=0,f=0;f=a+24|0;d=q[a>>2];e=d&63;o[f+e|0]=128;c=e+1|0;a:{if(e>>>0<=55){Ui((a+c|0)+24|0,0,55-e|0);break a}Ui((a+c|0)+24|0,0,e^63);Ds(a,f);c=f;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=q[a>>2]}o[a+83|0]=d>>>21;o[a+82|0]=d>>>13;o[a+81|0]=d>>>5;o[a+80|0]=d<<3;c=q[a+4>>2];o[a+87|0]=c>>>21;o[a+86|0]=c>>>13;o[a+85|0]=c>>>5;o[a+84|0]=c<<3|d>>>29;Ds(a,f);o[b|0]=q[a+8>>2];o[b+1|0]=q[a+8>>2]>>>8;o[b+2|0]=s[a+10>>1];o[b+3|0]=r[a+11|0];o[b+4|0]=q[a+12>>2];o[b+5|0]=q[a+12>>2]>>>8;o[b+6|0]=s[a+14>>1];o[b+7|0]=r[a+15|0];o[b+8|0]=q[a+16>>2];o[b+9|0]=q[a+16>>2]>>>8;o[b+10|0]=s[a+18>>1];o[b+11|0]=r[a+19|0];o[b+12|0]=q[a+20>>2];o[b+13|0]=q[a+20>>2]>>>8;o[b+14|0]=s[a+22>>1];o[b+15|0]=r[a+23|0];return 0}function k3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-272|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;Ui(b+8|0,0,264);jv(b+8|0);a:{if((d|0)<1){break a}Dj(a,1,5);ej(a,1);Zi(a,-1,130204);if(Vi(a,-1)){Uj(a,-1);Ri(a,-2);Ri(a,-2);break a}Ri(a,-2);Ri(a,-2)}vj(a,0,0);bj(a,130218,12);Xi(a,b+8|0);Ij(a,-3);bj(a,130231,12);Xi(a,b+40|0);Ij(a,-3);bj(a,130244,11);Xi(a,b+72|0);Ij(a,-3);bj(a,130256,14);Xi(a,b+104|0);Ij(a,-3);bj(a,130271,11);Xi(a,b+136|0);Ij(a,-3);bj(a,130283,8);Xi(a,b+168|0);Ij(a,-3);bj(a,130292,15);Xi(a,b+176|0);Ij(a,-3);bj(a,130308,9);Xi(a,b+192|0);Ij(a,-3);bj(a,130318,10);c=q[b+200>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,130329,12);Xi(a,b+204|0);Ij(a,-3);bj(a,130342,10);c=q[b+268>>2];Xi(a,c?c:130353);Ij(a,-3);if((d+1|0)==q[a+8>>2]-q[a+12>>2]>>4){a=q[b+268>>2];if(a){Ni(a)}Ii=b+272|0;return 1}J(130179,129431,762,130354);G()}function Ls(a,b,c,d){var e=0,f=0,g=0,h=0;f=q[b+8>>2];a:{while(1){b:{if((f|0)==5){e=q[b>>2];f=Rs(e,c);c:{if(q[f+8>>2]){break c}e=q[e+8>>2];if(!e|o[e+6|0]&1){break c}e=eo(e,0,q[q[a+16>>2]+188>>2]);if(e){break b}}a=q[f+4>>2];q[d>>2]=q[f>>2];q[d+4>>2]=a;q[d+8>>2]=q[f+8>>2];return}e=el(a,b,0);if(q[e+8>>2]){break b}_u(a,b,142967)}f=q[e+8>>2];if((f|0)!=6){b=e;g=g+1|0;if((g|0)==100){break a}continue}break}g=q[a+32>>2];f=q[e+4>>2];h=q[a+8>>2];q[h>>2]=q[e>>2];q[h+4>>2]=f;q[h+8>>2]=q[e+8>>2];f=q[b+4>>2];e=q[a+8>>2];q[e+16>>2]=q[b>>2];q[e+20>>2]=f;q[e+24>>2]=q[b+8>>2];b=q[c+4>>2];f=q[a+8>>2];q[f+32>>2]=q[c>>2];q[f+36>>2]=b;q[f+40>>2]=q[c+8>>2];e=q[a+8>>2];if((q[a+28>>2]-e|0)<=48){Mk(a,3);e=q[a+8>>2]}q[a+8>>2]=e+48;Ul(a,e,1);c=q[a+8>>2]-16|0;q[a+8>>2]=c;b=q[a+32>>2]+(d-g|0)|0;a=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=a;q[b+8>>2]=q[c+8>>2];return}Yk(a,142973,0)}function _W(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii+ -64|0;Ii=d;e=-60;if(c>>>0<=64){g=a+228|0;a:{while(1){if((h|0)==257){e=-60;break a}e=k0(a);if(e){break a}f=1;i=q[a+224>>2];if((i|0)>=1){h=h+1|0;e=0;while(1){j=f;f=w(e,20)+g|0;f=t[f+8>>2]>2]?0:j;e=e+1|0;if((i|0)!=(e|0)){continue}break}if(!f){continue}}break}q[d+56>>2]=0;q[d+60>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;f=a+8|0;e=qs(f,d);if(e){break a}if(f){Mi[q[65677]](f,0,216)|0}_p(f);e=Zp(f,0);if(e){break a}e=Yp(f,d,64);if(e){break a}f=0;e=Bu(d,64,d,0);if(e){break a}a=q[a+224>>2];if((a|0)>=1){while(1){q[(w(f,20)+g|0)+8>>2]=0;f=f+1|0;if((a|0)!=(f|0)){continue}break}}Ti(b,d,c);e=0}Mi[q[65677]](d,0,64)|0}Ii=d- -64|0;return e|0}function YL(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=x(0);h=Ii-80|0;Ii=h;a:{if((c|0)==3){c=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=c;c=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=c;c=q[d+20>>2];q[g+16>>2]=q[d+16>>2];q[g+20>>2]=c;break a}if((c&-2)!=4){break a}c=q[d+4>>2];q[g>>2]=q[d>>2];q[g+4>>2]=c;c=q[d+12>>2];q[g+8>>2]=q[d+8>>2];q[g+12>>2]=c;c=q[d+20>>2];q[g+16>>2]=q[d+16>>2];q[g+20>>2]=c;c=q[d+28>>2];q[g+24>>2]=q[d+24>>2];q[g+28>>2]=c}c=q[q[a>>2]>>2];j=q[c+8>>2]-q[c+12>>2]>>4;gj(c);d=-1;i=Vi(c,-1);Ri(c,-2);if(!i){rj(c,-1e4,q[a+12>>2]);yk(c)}rj(c,-1e4,q[a+16>>2]);Xi(c,b);jl(c,-2);b:{if(!Vi(c,-1)){break b}a=g+32|0;d=Et(c,-1,a);if(d|!e){break b}k=u[((f<<2)+g|0)+40>>2];b=h+8|0;q[b>>2]=0;v[b+8>>3]=k;Ti(a,h+8|0,72);d=0}Ri(c,-3);if(!i){a=q[c+8>>2];q[a+8>>2]=0;q[c+8>>2]=a+16;yk(c)}if(q[c+8>>2]-q[c+12>>2]>>4!=(j|0)){J(13231,12749,944,13526);G()}Ii=h+80|0;return d}function UE(a,b,c){var d=0,e=0;if(c>>>0<=127){d=q[a>>2];if((d-b|0)<1){return-108}b=a;a=d-1|0;q[b>>2]=a;o[a|0]=c;return 1}a:{if(c>>>0<=255){d=q[a>>2];e=-108;if((d-b|0)<2){break a}b=d-1|0;q[a>>2]=b;o[b|0]=c;b=a;a=q[a>>2]-1|0;q[b>>2]=a;o[a|0]=129;return 2}if(c>>>0<=65535){d=q[a>>2];e=-108;if((d-b|0)<3){break a}b=d-1|0;q[a>>2]=b;o[b|0]=c;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>8;b=a;a=q[a>>2]-1|0;q[b>>2]=a;o[a|0]=130;return 3}d=q[a>>2];b=d-b|0;if(c>>>0<=16777215){e=-108;if((b|0)<4){break a}b=d-1|0;q[a>>2]=b;o[b|0]=c;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>8;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>16;b=a;a=q[a>>2]-1|0;q[b>>2]=a;o[a|0]=131;return 4}e=-108;if((b|0)<5){break a}b=d-1|0;q[a>>2]=b;o[b|0]=c;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>8;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>16;b=q[a>>2]-1|0;q[a>>2]=b;o[b|0]=c>>>24;b=a;a=q[a>>2]-1|0;q[b>>2]=a;o[a|0]=132;e=5}return e}function Hsa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=Ii-48|0;Ii=d;e=q[62956];g=q[e+8>>2];h=q[e+12>>2];q[d+44>>2]=c;q[d+40>>2]=b;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;o[d+8|0]=0;o[d+9|0]=0;o[d+10|0]=0;o[d+11|0]=0;o[d+12|0]=0;o[d+13|0]=0;o[d+14|0]=0;o[d+15|0]=0;o[d+32|0]=0;o[d+33|0]=0;o[d+34|0]=0;o[d+35|0]=0;o[d+36|0]=0;o[d+37|0]=0;o[d+38|0]=0;o[d+39|0]=0;o[d+24|0]=0;o[d+25|0]=0;o[d+26|0]=0;o[d+27|0]=0;o[d+28|0]=0;o[d+29|0]=0;o[d+30|0]=0;o[d+31|0]=0;o[d+16|0]=0;o[d+17|0]=0;o[d+18|0]=0;o[d+19|0]=0;o[d+20|0]=0;o[d+21|0]=0;o[d+22|0]=0;o[d+23|0]=0;f=4416;a:{b:{if(vn(q[62138],d+8|0)){break b}if(!vk(0,d+8|0,g,h,0,e,d+40|0,8)){break a}f=4444}e=f;q[d>>2]=q[62138];Pi(4,1076,e,d)}u[a+484>>2]=x(1)/x(c>>>0);u[a+480>>2]=x(1)/x(b>>>0);a=q[a+292>>2];if(a){aba(a,b,c)}_ha(b,c);Ii=d+48|0}function fJ(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+16>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,24)|0;q[a+20>>2]=q[e+16>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];d=q[d>>2];q[e+16>>2]=-1;q[e+8>>2]=d;q[e+12>>2]=f;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,24)|0;f=q[b+16>>2];if((f|0)!=-1){continue}break}q[b+16>>2]=(e-d|0)/24;break a}J(68931,68794,229,68939);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;return}J(68943,68794,537,69005);G()}q[b>>2]=(e-d|0)/24}q[a+24>>2]=q[a+24>>2]+1}function Ov(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=((j-g|0)/24|0)){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=w(f,24)+g|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+16>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+24;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=w(e,24)+g|0;q[a+20>>2]=q[e+16>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];d=q[d>>2];q[e+16>>2]=-1;q[e+8>>2]=d;q[e+12>>2]=f;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=w(f,24)+g|0;f=q[b+16>>2];if((f|0)!=-1){continue}break}q[b+16>>2]=(e-g|0)/24;break a}J(11310,11185,229,11318);G()}b=q[d+4>>2];a=w(f,24)+g|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;return}J(11322,11185,537,11384);G()}q[b>>2]=(e-g|0)/24;h=q[a+24>>2]}q[a+24>>2]=h+1}function NI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+16>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,24)|0;q[a+20>>2]=q[e+16>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];d=q[d>>2];q[e+16>>2]=-1;q[e+8>>2]=d;q[e+12>>2]=f;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,24)|0;f=q[b+16>>2];if((f|0)!=-1){continue}break}q[b+16>>2]=(e-d|0)/24;break a}J(32005,31868,229,32013);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;return}J(32017,31868,537,32079);G()}q[b>>2]=(e-d|0)/24}q[a+24>>2]=q[a+24>>2]+1}function LI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+16>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,24)|0;q[a+20>>2]=q[e+16>>2]}q[e>>2]=b;q[e+4>>2]=c;f=q[d+4>>2];d=q[d>>2];q[e+16>>2]=-1;q[e+8>>2]=d;q[e+12>>2]=f;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,24)|0;f=q[b+16>>2];if((f|0)!=-1){continue}break}q[b+16>>2]=(e-d|0)/24;break a}J(32391,32254,229,32399);G()}b=q[d+4>>2];a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];q[a+12>>2]=b;return}J(32403,32254,537,32465);G()}q[b>>2]=(e-d|0)/24}q[a+24>>2]=q[a+24>>2]+1}function DR(a){var b=0,c=0,d=0,e=0,f=0;a:{c=_n(a);b:{if(c){break b}if(q[a+128>>2]!=22){Xj(a,2,10);return-30464}c:{d=q[a+120>>2];if(r[d|0]==4){b=q[a+168>>2];e=r[q[a>>2]+184|0]&2?12:4;f=e+6|0;if(b>>>0>=f>>>0){break c}}break a}d=d+e|0;e=r[d+4|0]<<8|r[d+5|0];if((b|0)!=(e+f|0)){break a}f=r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24);c=0;q[q[a+68>>2]+2268>>2]=0;q[a+4>>2]=12;if(!e){break b}b=q[a+60>>2];d:{if(!b){break d}c=q[b+104>>2];if(!c){break d}Mi[q[65677]](c,0,q[b+108>>2])|0;Ni(q[q[a+60>>2]+104>>2]);b=q[a+60>>2];q[b+104>>2]=0;q[b+108>>2]=0}b=q[a+64>>2];Mi[q[65677]](q[b+104>>2],0,q[b+108>>2])|0;Ni(q[q[a+64>>2]+104>>2]);b=q[a+64>>2];q[b+104>>2]=0;q[b+108>>2]=0;c=bk(1,e);if(!c){Xj(a,2,80);return-32512}a=Ti(c,d+6|0,e);q[b+112>>2]=f<<8&16711680|f<<24|(f>>>8&65280|f>>>24);q[b+108>>2]=e;q[b+104>>2]=a;c=0;q[b+12>>2]=0}return c}Xj(a,2,50);return-28160}function p9(a,b,c,d,e,f){var g=x(0),h=x(0),i=x(0),j=x(0),k=0,l=0,m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0);g=x(e*x(64));a:{if(g=x(0)){k=~~g>>>0;break a}k=0}l=w(k>>>0<63?k:63,12)+b|0;g=u[l>>2];h=u[l+8>>2];i=u[l+4>>2];l=q[a>>2];k=q[a+4>>2]-l|0;a=(k|0)/160|0;if(k){s=x(x(x(e-g)*h)+i);j=u[210816];e=u[c+8>>2];g=u[c+12>>2];m=u[210817];h=u[c>>2];n=u[210818];o=x(x(x(j*e)+x(g*m))-x(h*n));i=u[c+4>>2];p=x(x(n*e)+x(x(i*m)+x(j*h)));r=x(x(x(g*n)+x(m*h))-x(j*i));j=x(x(x(g*j)+x(i*n))-x(e*m));m=x(x(x(x(h*o)+x(x(x(e*p)+x(g*r))-x(i*j)))*f)*d);n=x(x(x(x(e*j)+x(x(x(g*o)+x(i*p))-x(h*r)))*f)*d);e=x(x(x(x(i*r)+x(x(x(g*j)+x(h*p))-x(e*o)))*f)*d);f=u[b+768>>2];c=a>>>0>1?a:1;a=0;while(1){b=l+w(a,160)|0;d=x(s+x(f*u[b+76>>2]));u[b+56>>2]=u[b+56>>2]+x(m*d);u[b+52>>2]=u[b+52>>2]+x(n*d);u[b+48>>2]=u[b+48>>2]+x(e*d);a=a+1|0;if((c|0)!=(a|0)){continue}break}}}function qN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;d=Ii-48|0;Ii=d;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;c=16;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;h=a+32|0;while(1){if(c){c=c-1|0;f=c+a|0;e=r[f|0]+1|0;o[f|0]=e;if((e|0)!=(e&255)){continue}}break}c=Km(h,1,a,d);a:{if(c){break a}c=16;f=d+16|0;while(1){if(c){c=c-1|0;g=c+a|0;e=r[g|0]+1|0;o[g|0]=e;if((e|0)!=(e&255)){continue}}break}c=Km(h,1,a,f);if(c){break a}f=d+32|0;c=16;while(1){if(c){c=c-1|0;g=c+a|0;e=r[g|0]+1|0;o[g|0]=e;if((e|0)!=(e&255)){continue}}break}c=Km(h,1,a,f);if(c){break a}c=0;while(1){e=d+c|0;o[e|0]=r[e|0]^r[b+c|0];c=c+1|0;if((c|0)!=48){continue}break}c=Yq(h,d,256);if(c){break a}b=q[d+36>>2];q[a>>2]=q[d+32>>2];q[a+4>>2]=b;b=q[d+44>>2];q[a+8>>2]=q[d+40>>2];q[a+12>>2]=b;c=0}Mi[q[65677]](d,0,48)|0;Ii=d+48|0;return c}function fxa(a,b,c,d,e){var f=0,g=0,h=0,i=0;f=Ii-48|0;Ii=f;q[f+44>>2]=c;q[f+32>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;q[f+16>>2]=0;q[f+20>>2]=0;c=q[w(e,12)+99504>>2];a:{if(1497965>>>e&1){if(1797559>>>e&1){if((d|0)<1){break a}e=0;while(1){_t(f+16|0,f+44|0,r[b+e|0],c);e=e+1|0;if((e|0)!=(d|0)){continue}break}break a}if((d|0)<1){break a}i=(d+2|0)/3|0;e=0;while(1){o[f+12|0]=0;q[f+8>>2]=0;h=w(e,3);g=d-h|0;g=(g|0)>3?3:g;if((g|0)>=1){Ti(f+8|0,b+h|0,g)}ixa(f+16|0,f+8|0,f+44|0,c);e=e+1|0;if((i|0)!=(e|0)){continue}break}break a}if((d|0)<=0){break a}i=(d+4|0)/5|0;e=0;while(1){o[f+12|0]=0;q[f+8>>2]=0;h=w(e,5);g=d-h|0;g=(g|0)>5?5:g;if((g|0)>=1){Ti(f+8|0,b+h|0,g)}hxa(f+16|0,f+8|0,f+44|0,c);e=e+1|0;if((i|0)!=(e|0)){continue}break}}q[a>>2]=q[a>>2]|q[f+16>>2];q[a+4>>2]=q[a+4>>2]|q[f+20>>2];q[a+8>>2]=q[a+8>>2]|q[f+24>>2];q[a+12>>2]=q[a+12>>2]|q[f+28>>2];Ii=f+48|0}function CA(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/24|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,24)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+16>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+24;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,24)|0;q[a+20>>2]=q[e+16>>2]}q[e>>2]=b;q[e+4>>2]=c;q[e+8>>2]=q[d>>2];p[e+12>>1]=s[d+4>>1];q[e+16>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,24)|0;f=q[b+16>>2];if((f|0)!=-1){continue}break}q[b+16>>2]=(e-d|0)/24;break a}J(165953,165836,229,165961);G()}a=g+w(f,24)|0;q[a+8>>2]=q[d>>2];p[a+12>>1]=s[d+4>>1];return}J(165965,165836,537,166027);G()}q[b>>2]=(e-d|0)/24}q[a+24>>2]=q[a+24>>2]+1}function mP(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;q[g+8>>2]=0;while(1){e=q[d+80>>2];f=(e<<3)+d|0;q[f+4>>2]=0;q[f>>2]=a;q[d+80>>2]=e+1;if(fy(a+168|0)){q[f+4>>2]=q[f+4>>2]|1}if(gy(a+144|0)){q[f+4>>2]=q[f+4>>2]|512}i=0;a:{if(h){break a}e=c;h=q[a+328>>2];b:{if(h){e=q[e>>2]>>>h-1&1?0:-1;break b}e=-1}if(e){q[f+4>>2]=q[f+4>>2]|16384}e=q[a+332>>2];c:{if(e){e=q[c+4>>2]>>>e-1&1?0:-1;break c}e=-1}if(e){q[f+4>>2]=q[f+4>>2]|32768}e=q[d+80>>2];if((e|0)==1){if(!qP(a,b)){break a}}pP(a,b,g+12|0,g+8|0,g+4|0,e-1|0,j);e=q[g+12>>2];if(!e){q[f+4>>2]=q[f+4>>2]|8;break a}i=q[d+80>>2];d:{if((i|0)!=1){j=!cx(a+80|0,a+112|0)+j|0;h=q[g+8>>2];if(h){break d}h=0;if(i>>>0<=8){break d}i=-12288;break a}h=q[g+8>>2]}if(!q[g+4>>2]){q[f+4>>2]=q[f+4>>2]|8}if(vC(c,e+204|0)){q[f+4>>2]=q[f+4>>2]|65536}q[g+4>>2]=0;q[g+12>>2]=0;a=e;continue}break}Ii=g+16|0;return i}function h$(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-304|0;Ii=b;c=kj(a,1,0);q[b+300>>2]=0;q[b+272>>2]=0;q[b+276>>2]=0;q[b+288>>2]=0;q[b+292>>2]=0;q[b+280>>2]=0;q[b+284>>2]=0;q[b+272>>2]=1;q[b+264>>2]=0;q[b+268>>2]=0;q[b+268>>2]=0;c=ja(c|0,0,b+264|0,b+300|0)|0;a:{if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,gs(c));a=2;break a}vj(a,0,0);c=q[b+300>>2];if(c){d=1;while(1){b:{c:{d:{e=ia(q[c+20>>2],q[c+16>>2],b|0,255,0,0,1)|0;if(!e){e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;vj(a,0,0);e:{switch(q[c+4>>2]-2|0){case 0:break d;case 8:break e;default:break b}}bj(a,137044,6);bj(a,136933,5);break c}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,gs(e));a=2;break a}bj(a,137044,6);bj(a,136928,4)}pj(a,-3)}bj(a,137051,4);Xi(a,b);pj(a,-3);pj(a,-3);d=d+1|0;c=q[c+28>>2];if(c){continue}break}a=q[b+300>>2]}else{a=0}Ni(a);a=1}Ii=b+304|0;return a|0}function $O(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;q[e+8>>2]=c;f=-10240;a:{if((a&223)!=128){break a}b=b+c|0;a=hk(e+8|0,b,e+12|0,6);if(a){f=a-9472|0;break a}f=-8320;if(q[e+12>>2]!=8){break a}a=q[e+8>>2];if((r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))!=83953195|(r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24))!=67634949){break a}a=a+8|0;b:{if(a>>>0>=b>>>0){break b}q[e+8>>2]=a;a=hk(e+8|0,b,e+12|0,160);if(a){f=a-9472|0;break a}a=hk(e+8|0,b,e+12|0,48);if(a){f=a-9472|0;break a}a=hk(e+8|0,b,e+12|0,6);if(a){f=a-9472|0;break a}q[d+12>>2]=6;a=q[e+8>>2];q[d+20>>2]=a;c=q[e+12>>2];q[d+16>>2]=c;a=a+c|0;if(a>>>0>=b>>>0){break b}q[e+8>>2]=a;a=hk(e+8|0,b,e+12|0,4);if(a){f=a-9472|0;break a}q[d+24>>2]=4;a=q[e+8>>2];q[d+32>>2]=a;c=q[e+12>>2];q[d+28>>2]=c;a=a+c|0;q[e+8>>2]=a;if((a|0)==(b|0)){f=0;break a}}Mi[q[65677]](d,0,36)|0;f=-9574}Ii=e+16|0;return f}function g3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-4064|0;Ii=b;d=nj(b+4032|0,a,0,129431,1195);vj(a,0,0);if(uk(a,1)){Xi(a,kj(a,1,0));Si(a,-2,130734)}if(uk(a,2)){Xi(a,kj(a,2,0));Si(a,-2,130739)}if(uk(a,3)){Xi(a,kj(a,3,0));Si(a,-2,130744)}if(uk(a,4)){Xi(a,kj(a,4,0));Si(a,-2,130749)}if(uk(a,5)){Xi(a,kj(a,5,0));Si(a,-2,130754)}if(uk(a,6)){Xi(a,kj(a,6,0));Si(a,-2,130759)}f=WG(a,q[64140],b+32|0,4e3);q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;a:{if(!vn(130706,b+4056|0)){c=q[b+4060>>2];g=c;e=q[b+4056>>2];if(!(c|e)){break a}q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b>>2]=e;q[b+4>>2]=g;c=q[64140];b:{if(vk(0,b,q[c+8>>2],q[c+12>>2],0,c,b+32|0,f)){h=Kj(d,130764,0);break b}Ri(a,-2)}mj(d);Ii=b+4064|0;return h|0}J(130666,129431,1126,130714);G()}J(130727,129431,1127,130714);G()}function RY(a,b){var c=0,d=0,e=0,f=0;a:{b:{c:{d:{switch(r[a+6|0]){default:c=q[a+20>>2];break c;case 1:break b;case 0:break d}}c=q[a+20>>2];if((c|0)==q[a+40>>2]){break b}}b=q[c>>2];q[a+8>>2]=b;c=Yj(a,140905,37);break a}c=s[a+52>>1];if(c>>>0>=200){b=q[q[a+20>>2]>>2];q[a+8>>2]=b;c=Yj(a,140888,16);break a}c=c+1|0;p[a+54>>1]=c;p[a+52>>1]=c;b=$u(a,1068,q[a+8>>2]-(b<<4)|0);e:{if(b){o[a+6|0]=b;c=q[a+8>>2];f=c;f:{g:{h:{switch(b-2|0){case 2:q[c>>2]=Yj(a,140846,17);d=4;break g;case 3:q[c>>2]=Yj(a,140864,23);d=4;break g;case 0:case 1:break h;default:break f}}e=c-16|0;d=q[e+4>>2];q[c>>2]=q[e>>2];q[c+4>>2]=d;d=q[e+8>>2]}q[f+8>>2]=d}c=c+16|0;q[a+8>>2]=c;q[q[a+20>>2]+8>>2]=c;break e}b=r[a+6|0]}p[a+52>>1]=s[a+52>>1]-1;return b}q[b+8>>2]=4;q[b>>2]=c;if((q[a+28>>2]-q[a+8>>2]|0)<=16){b=q[a+44>>2];sn(a,(b|0)<1?b+1|0:b<<1)}q[a+8>>2]=q[a+8>>2]+16;return 2}function xl(a){var b=0,c=0,d=0;if(a){c=a;while(1){b=c+204|0;if(b){d=q[b>>2];if(d){Mi[q[d+40>>2]](q[b+4>>2])}Mi[q[65677]](b,0,8)|0}Ni(q[c+336>>2]);b=q[c+104>>2];if(b){while(1){d=q[b+24>>2];Mi[q[65677]](b,0,32)|0;Ni(b);b=d;if(b){continue}break}}b=q[c+136>>2];if(b){while(1){d=q[b+24>>2];Mi[q[65677]](b,0,32)|0;Ni(b);b=d;if(b){continue}break}}b=q[c+308>>2];if(b){while(1){d=q[b+12>>2];Mi[q[65677]](b,0,16)|0;Ni(b);b=d;if(b){continue}break}}b=q[c+260>>2];if(b){while(1){d=q[b+12>>2];Mi[q[65677]](b,0,16)|0;Ni(b);b=d;if(b){continue}break}}b=q[c+276>>2];if(b){while(1){d=q[b+12>>2];Mi[q[65677]](b,0,16)|0;Ni(b);b=d;if(b){continue}break}}b=q[c+12>>2];if(!(!b|!q[c>>2])){Mi[q[65677]](b,0,q[c+8>>2])|0;Ni(q[c+12>>2])}c=q[c+340>>2];if(c){continue}break}b=a;while(1){c=q[b+340>>2];Mi[q[65677]](b,0,344)|0;if((a|0)!=(b|0)){Ni(b)}b=c;if(b){continue}break}}}function dt(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;a:{b:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>-2){b=q[79286];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);c:{d:{if($l(a,-1)){bj(a,122576,32);jl(a,-2);ll(a,-2);if(Vi(a,-1)){break d}Ri(a,-2)}Ri(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break c}xk(a,-2);Rk(a,1,1);if((Vi(a,-1)|0)!=3){break b}f=Mj(a,-1);Ri(a,-2);if(y(f)<2147483648){b=~~f}else{b=-2147483648}if((b|0)==-2){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break c}rj(a,-1e4,b)}b=d+1|0;a=q[a+8>>2]-q[a+12>>2]>>4;if((b|0)!=(a|0)){break a}Ii=c+32|0;return}q[c+12>>2]=d;q[c+4>>2]=985;q[c+8>>2]=1;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}J(123491,122672,1005,124176);G()}q[c+28>>2]=a;q[c+24>>2]=b;q[c+20>>2]=985;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function Nq(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;f=Ii-80|0;Ii=f;q[f+32>>2]=0;q[f+36>>2]=0;q[f+40>>2]=0;q[f+44>>2]=0;q[f+48>>2]=0;q[f+52>>2]=0;q[f+56>>2]=0;q[f+60>>2]=0;g=f- -64|0;q[g>>2]=0;q[g+4>>2]=0;q[f+72>>2]=0;q[f+76>>2]=0;q[f+16>>2]=0;q[f+20>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;q[f+12>>2]=0;g=q[e>>2];if(g){g=q[g+8>>2]}else{g=0}j=g&255;a:{if(!b){break a}while(1){h=-20736;g=e;b:{if(!g){break b}i=q[g>>2];if(!i){break b}h=Mi[q[i+16>>2]](q[g+4>>2])|0}if(h){break a}h=ao(g,c,d);if(h){break a}h=ao(g,f+12|0,4);if(h){break a}i=f+16|0;h=-20736;c:{if(!g){break c}g=q[e>>2];if(!g){break c}h=Mi[q[g+24>>2]](q[e+4>>2],i)|0}if(h){break a}h=0;g=b>>>0>>0?b:j;if(g){while(1){o[a|0]=r[a|0]^r[(f+16|0)+h|0];a=a+1|0;h=h+1|0;if((g|0)!=(h|0)){continue}break}}o[f+15|0]=r[f+15|0]+1;b=b-g|0;if(b){continue}break}h=0}Mi[q[65677]](f+16|0,0,64)|0;Ii=f+80|0;return h}function q0(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;h=Ii-128|0;Ii=h;f=Eo(b,c);a:{if(f){break a}i=d-1|0;g=w(i,e);if(g){c=0;while(1){f=(c>>>0)/(e>>>0)|0;j=1<>>1|0,36)+b|0);if(f){break a}}f=fz(a,d,d);if(f){break a}c=c+1|0;if((g|0)!=(c|0)){continue}break}}c=1;b:{c:{g=1<>>0>1){d=0;while(1){q[(d<<2)+h>>2]=w(c,36)+b;d=d+1|0;c=c<<1&254;if(g>>>0>c>>>0){continue}break}f=cz(a,h,d);if(f){break a}i=0;e=h;if(g>>>0<2){break b}d=1;break c}i=0;f=cz(a,h,0);if(f){break a}e=h;break b}while(1){j=w(d,36)+b|0;c=d;while(1){if(c){c=c-1|0;f=gz(a,w(d+c|0,36)+b|0,w(c,36)+b|0,j);if(!f){continue}break a}break}d=d<<1&254;if(g>>>0>d>>>0){continue}break}if(g>>>0<2){break b}d=b+36|0;c=0;b=1;while(1){q[(c<<2)+h>>2]=d+w(c,36);i=b;c=b;b=c+1|0;if((g|0)!=(b|0)){continue}break}}f=cz(a,e,i)}Ii=h+128|0;return f}function Ypa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-224|0;Ii=b;h=nj(b+200|0,a,1,65882,734);c=oo(a,1,1,0);TB(c,b+196|0);q[b+192>>2]=0;a:{if(Kp(c,b+192|0)){q[b+32>>2]=65665;Lj(a,66007,b+32|0);break a}f=q[b+196>>2]<<7|64;d=b-f|0;Ii=d;o[d|0]=0;q[b+60>>2]=0;xq(c,b+60|0);q[b+16>>2]=65665;q[b+28>>2]=c;q[b+20>>2]=q[b+192>>2];q[b+24>>2]=q[b+60>>2];sj(b- -64|0,128,66026,b+16|0);Zk(d,b- -64|0,f);if(q[b+196>>2]){while(1){q[b+48>>2]=0;q[b+52>>2]=0;SB(c,g,b+48|0);q[b+40>>2]=0;Pr(c,q[b+48>>2],q[b+52>>2],b+44|0,b+40|0);i=q[b+196>>2];e=q[b+44>>2];b:{if(e>>>0<=8){e=q[(e<<2)+262672>>2];break b}e=154037}q[b>>2]=aj(q[b+48>>2],q[b+52>>2]);q[b+4>>2]=e;q[b+12>>2]=i-1>>>0>g>>>0?66076:66079;q[b+8>>2]=q[b+40>>2];sj(b- -64|0,128,66080,b);Zk(d,b- -64|0,f);g=g+1|0;if(g>>>0>2]){continue}break}}Zk(d,66112,f);Xi(a,d)}mj(h);Ii=b+224|0;return 1}function n8(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{d=q[a+4>>2];c:{if(!d){break c}d=q[q[a>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break c}f=q[a+8>>2];while(1){e=f+w(d,40)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+32>>2];if((d|0)!=-1){continue}break c}break}e=q[a+32>>2];g=q[a+36>>2]-e>>4;d=f+w(d,40)|0;f=q[d+16>>2];if(g>>>0<=f>>>0){break b}e=e+(f<<4)|0;d=q[d+20>>2];bl(e,e+(d<<4)|0,g-(d+f|0)<<4);uaa(a,b,c);b=q[a+32>>2];c=(q[a+36>>2]-b>>4)-d|0;if(c>>>0>q[a+40>>2]-b>>4>>>0){break a}q[a+36>>2]=b+(c<<4);e=q[a+4>>2];if(!e){break c}g=d&2147483647;i=q[a>>2];b=0;while(1){d=q[(b<<2)+i>>2];if((d|0)!=-1){j=q[a+8>>2];while(1){c=w(d,40)+j|0;d=c;h=q[d+16>>2];if(f>>>0>>0){q[d+16>>2]=h-g}d=q[c+32>>2];if((d|0)!=-1){continue}break}}b=b+1|0;if((e|0)!=(b|0)){continue}break}}return}J(111387,111323,479,111398);G()}J(111304,111323,506,111379);G()}function qM(a){var b=0,c=0,d=0,e=0,f=0;c=q[a+4>>2];Gj(q[c+29080>>2]);a:{b:{e=q[c+29084>>2];b=q[c+29088>>2];c:{if((e|0)==(b|0)){break c}b=b-e|0;f=b>>2;while(1){if(q[(d<<2)+e>>2]==(a|0)){f=b>>2;b=f-1|0;if(b>>>0>d>>>0){while(1){b=d+1|0;if(b>>>0>=f>>>0|d>>>0>=f>>>0){break a}q[(d<<2)+e>>2]=q[(b<<2)+e>>2];d=b;e=q[c+29084>>2];f=q[c+29088>>2]-e>>2;b=f-1|0;if(d>>>0>>0){continue}break}}if(q[c+29092>>2]-e>>2>>>0>>0){break b}q[c+29088>>2]=(b<<2)+e;break c}d=d+1|0;if(f>>>0>d>>>0){continue}break}}Bj(q[c+29080>>2]);lq(q[a>>2],26,a);d=q[a+3220>>2];b=d;c=q[a+3216>>2];if(b|c){nI(c,b);Qo(q[a+3216>>2],q[a+3220>>2]);q[a+3216>>2]=0;q[a+3220>>2]=0}d=q[a+3228>>2];b=d;c=q[a+3224>>2];if(b|c){nI(c,b);Qo(q[a+3224>>2],q[a+3228>>2]);q[a+3224>>2]=0;q[a+3228>>2]=0}q[q[a+8>>2]>>2]=0;q[a+8>>2]=0;return}J(9943,9962,506,10018);G()}J(12419,9962,479,9454);G()}function m8(a){var b=0;a:{if(o[a+2172|0]&1){break a}b=q[a+2152>>2];if(b){Ni(b)}b=q[a+2144>>2];if(!b){break a}Ni(b)}b:{if(o[a+2132|0]&1){break b}b=q[a+2120>>2];if(!b){break b}Ni(b)}c:{if(o[a+2116|0]&1){break c}b=q[a+2104>>2];if(!b){break c}Ni(b)}d:{if(o[a+2100|0]&1){break d}b=q[a+2088>>2];if(!b){break d}Ni(b)}e:{if(o[a+2084|0]&1){break e}b=q[a+2072>>2];if(!b){break e}Ni(b)}f:{if(o[a+2068|0]&1){break f}b=q[a+2056>>2];if(!b){break f}Ni(b)}g:{if(o[a+2052|0]&1){break g}b=q[a+2040>>2];if(!b){break g}Ni(b)}h:{if(o[a+2032|0]&1){break h}b=q[a+2020>>2];if(!b){break h}Ni(b)}i:{if(o[a+1992|0]&1){break i}b=q[a+1980>>2];if(!b){break i}Ni(b)}j:{if(o[a+1976|0]&1){break j}b=q[a+1964>>2];if(!b){break j}Ni(b)}k:{if(o[a+1932|0]&1){break k}b=q[a+1920>>2];if(!b){break k}Ni(b)}l:{if(o[a+1916|0]&1){break l}b=q[a+1904>>2];if(!b){break l}Ni(b)}return a}function eO(a,b,c,d){var e=0,f=0;f=d&65535;e=q[a+5820>>2];d=s[a+5816>>1]|f<>1]=d;a:{if((e|0)>=14){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=r[a+5817|0];e=q[a+5820>>2];d=f>>>16-e|0;p[a+5816>>1]=d;e=e-13|0;break a}e=e+3|0}b:{c:{if((e|0)>=9){e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;d=q[a+20>>2];q[a+20>>2]=d+1;e=d+q[a+8>>2]|0;d=r[a+5817|0];break c}if((e|0)<1){break b}e=q[a+20>>2];q[a+20>>2]=e+1;e=e+q[a+8>>2]|0}o[e|0]=d}q[a+5820>>2]=0;p[a+5816>>1]=0;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=c;d=q[a+20>>2];q[a+20>>2]=d+1;o[d+q[a+8>>2]|0]=c>>>8;d=q[a+20>>2];q[a+20>>2]=d+1;e=d+q[a+8>>2]|0;d=c^-1;o[e|0]=d;e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d>>>8;if(c){while(1){d=r[b|0];e=q[a+20>>2];q[a+20>>2]=e+1;o[e+q[a+8>>2]|0]=d;b=b+1|0;c=c-1|0;if(c){continue}break}}}function XW(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=-20;if(c-4>>>0<=12){d=q[a+328>>2];f=q[a+332>>2];e=q[a+320>>2];g=q[a+324>>2];j=Ti(b,a+336|0,c);b=f<<3|d>>>29;h=d<<3;i=e<<3;if(!(h|i|(b|(g<<3|e>>>29)))){return 0}b=f;o[a+368|0]=r[a+368|0]^b>>>21;o[a+369|0]=r[a+369|0]^b>>>13;o[a+370|0]=r[a+370|0]^b>>>5;o[a+371|0]=r[a+371|0]^((b&536870911)<<3|d>>>29);o[a+372|0]=r[a+372|0]^d>>>21;o[a+373|0]=r[a+373|0]^d>>>13;o[a+374|0]=r[a+374|0]^d>>>5;o[a+375|0]=h^r[a+375|0];b=g;o[a+376|0]=r[a+376|0]^b>>>21;o[a+377|0]=r[a+377|0]^b>>>13;o[a+378|0]=r[a+378|0]^b>>>5;o[a+379|0]=r[a+379|0]^((b&536870911)<<3|e>>>29);o[a+380|0]=r[a+380|0]^e>>>21;o[a+381|0]=r[a+381|0]^e>>>13;o[a+382|0]=r[a+382|0]^e>>>5;o[a+383|0]=i^r[a+383|0];b=a+368|0;Ts(a,b,b);f=0;b=0;while(1){g=b+j|0;o[g|0]=r[g|0]^r[(a+b|0)+368|0];b=b+1|0;if((c|0)!=(b|0)){continue}break}}return f}function CR(a){var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=q[a+108>>2];q[a+128>>2]=r[b|0];ky(c+12|0,c+8|0,q[q[a>>2]+184>>2]>>>1&1,b+1|0);a:{if((r[a+128|0]&252)==20?0:-29184){b=-29184;if(r[q[a>>2]+184|0]&2){break a}Xj(a,2,10);break a}if(q[c+12>>2]!=q[a+16>>2]){b=-29184;break a}if(q[c+8>>2]>r[q[a>>2]+181|0]){b=-29184;break a}b=my(a,q[a+116>>2]-q[a+108>>2]|0);if(b){break a}b=q[a+112>>2];d=r[b|0]<<8|r[b+1|0];q[a+132>>2]=d;if((q[a+100>>2]-q[a+120>>2]|0)+16749>>>0>>0){b=-29184;break a}if(r[q[a>>2]+184|0]&2){b=s[a+140>>1];e=q[a+104>>2];e=r[e|0]<<8|r[e+1|0];if((b|0)!=(e|0)){b=(e|0)==(b+1|0)?-25728:-26368;break a}b=-26368;if(YV(a)){break a}}b=q[a+72>>2];b:{if(!b){b=-29184;if(d-1>>>0<=16383){break b}break a}b=q[b>>2];if(b>>>0>d>>>0){b=-29184;break a}if(b+16640>>>0>=d>>>0){break b}b=-29184;if(q[a+20>>2]>0){break a}}b=0}Ii=c+16|0;return b}function sA(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/24|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,24)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+16>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+24;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,24)+f|0;q[a+20>>2]=q[d+16>>2]}q[d>>2]=b;e=q[c+4>>2];c=q[c>>2];q[d+16>>2]=-1;q[d+8>>2]=c;q[d+12>>2]=e;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,24)+f|0;e=q[b+16>>2];if((e|0)!=-1){continue}break}q[b+16>>2]=(d-f|0)/24;break a}J(27012,26666,229,27020);G()}b=q[c+4>>2];a=w(e,24)+f|0;q[a+8>>2]=q[c>>2];q[a+12>>2]=b;return}J(27024,26666,537,27086);G()}q[b>>2]=(d-f|0)/24;g=q[a+24>>2]}q[a+24>>2]=g+1}function Esa(a){var b=0;b=q[a+4>>2];if(b){Ni(b)}b=q[a+8>>2];if(b){Ni(b)}b=q[a+12>>2];if(b){Ni(b)}b=q[a+16>>2];if(b){Ni(b)}b=q[a+20>>2];if(b){Ni(b)}b=q[a+24>>2];if(b){Ni(b)}b=q[a+28>>2];if(b){Ni(b)}b=q[a+32>>2];if(b){Ni(b)}b=q[a+36>>2];if(b){Ni(b)}b=q[a+40>>2];if(b){Ni(b)}b=q[a+44>>2];if(b){Ni(b)}b=q[a+48>>2];if(b){Ni(b)}b=q[a+52>>2];if(b){Ni(b)}b=q[a+56>>2];if(b){Ni(b)}b=q[a+60>>2];if(b){Ni(b)}b=q[a- -64>>2];if(b){Ni(b)}b=q[a+68>>2];if(b){Ni(b)}b=q[a+72>>2];if(b){Ni(b)}b=q[a+76>>2];if(b){Ni(b)}b=q[a+80>>2];if(b){Ni(b)}b=q[a+84>>2];if(b){Ni(b)}b=q[a+88>>2];if(b){Ni(b)}b=q[a+92>>2];if(b){Ni(b)}b=q[a+96>>2];if(b){Ni(b)}b=q[a+100>>2];if(b){Ni(b)}b=q[a+104>>2];if(b){Ni(b)}b=q[a+108>>2];if(b){Ni(b)}b=q[a+112>>2];if(b){Ni(b)}b=q[a+116>>2];if(b){Ni(b)}b=q[a+120>>2];if(b){Ni(b)}b=q[a+124>>2];if(b){Ni(b)}a=q[a+128>>2];if(a){Ni(a)}}function _qa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-16|0;Ii=b;g=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[57198],b+12|0)){h=q[a+4>>2];c=q[q[a+32>>2]+8>>2];d=q[c>>2];i=(r[d+3272|0]&16)>>>4|0;if(i){Jt(c)}qM(d);q[b+8>>2]=0;a:{b:{g=AM(q[a>>2],h,q[b+12>>2],q[a+16>>2],b+8|0);if(!g){e=q[b+8>>2];f=q[e>>2];q[c>>2]=f;q[d+8>>2]=e;q[e>>2]=d;q[f+8>>2]=c;if(i){if(!Ft(c)){break b}d=q[e>>2]}Nr(d);a=q[a+32>>2];q[a+12>>2]=0;d=a;a=q[c>>2];q[d+16>>2]=((((((s[a+1056>>1]<<1)+q[a+3136>>2]|0)+q[a+3184>>2]-(q[a+3128>>2]+q[a+3176>>2])|0)+w(q[a+3160>>2]-q[a+3152>>2]>>4,12)|0)+q[a+1044>>2]|0)-q[a+1036>>2]|0)+3284;break a}JB(d,q[q[b+12>>2]>>2],q[a>>2],h,c);break a}q[b>>2]=q[q[b+12>>2]>>2];Pi(3,19954,20540,b);Jt(c);q[c>>2]=d;q[d+8>>2]=c;q[e>>2]=f;q[f+8>>2]=e;Nr(f);JB(d,q[q[b+12>>2]>>2],q[a>>2],h,c);Ft(c);g=-21}Aj(q[b+12>>2])}Ii=b+16|0;return g|0}function Aka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-128|0;Ii=c;q[c+120>>2]=0;f=q[q[a+4>>2]+68>>2];b=q[a>>2];u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];u[c+64>>2]=u[b+64>>2];u[c+68>>2]=u[b+68>>2];u[c+72>>2]=u[b+72>>2];u[c+76>>2]=u[b+76>>2];u[c+80>>2]=u[b+80>>2];u[c+84>>2]=u[b+84>>2];u[c+88>>2]=u[b+88>>2];u[c+92>>2]=u[b+92>>2];q[c+96>>2]=q[b+96>>2];e=q[a+12>>2];if(e){b=0;while(1){d=q[a+8>>2]+w(b,48)|0;g=pI(c,d,u[(q[d+16>>2]<<2)+f>>2]);q[d+36>>2]=q[d+36>>2]&-16385|(g?16384:0);b=b+1|0;if((e|0)!=(b|0)){continue}break}}Ii=c+128|0}function R5(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;b=Ii-3136|0;Ii=b;a:{if(dj(a,33030)){f=-1;if(dj(a,33035)){break a}}f=0;e=$i(2224);q[e+2220>>2]=0;d=e+2212|0;q[d>>2]=0;q[d+4>>2]=0;d=e+2204|0;q[d>>2]=0;q[d+4>>2]=0;d=e+2196|0;q[d>>2]=0;q[d+4>>2]=0;g=e+2188|0;d=g;q[d>>2]=0;q[d+4>>2]=0;e=Ti(e,a,2188);d=b+2072|0;q[d+8>>2]=0;q[d+12>>2]=0;q[d+28>>2]=1;q[d+32>>2]=0;q[d+4>>2]=1381;q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[b+2076>>2]=154;q[b+2080>>2]=155;q[b+2096>>2]=0;q[b+2072>>2]=e;d=uI(b+2072|0,a+72|0,s[a+136>>1],!dj(a,33035));q[g>>2]=d;if(!d){rH(a+140|0,33075,b+2112|0);dG(b+2112|0,b+16|0);q[b>>2]=b+16;Pi(4,33041,33050,b);a=q[e+2188>>2];if(a){pA(a)}a=q[e+2192>>2];if(a){BI(a)}q[e+2188>>2]=0;q[e+2192>>2]=0;b:{if(o[e+2208|0]&1){break b}a=q[e+2196>>2];if(!a){break b}Ni(a)}Ni(e);f=-1e3;break a}q[c>>2]=e}Ii=b+3136|0;return f|0}function IR(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(!b){return 0}h=q[a+68>>2];g=q[a+28>>2];a:{if(g){f=a+32|0;break a}d=q[a>>2];f=d+56|0;g=q[d+52>>2]}d=q[f>>2];f=q[h+464>>2];b:{if(f){e=q[a>>2];break b}e=q[a>>2];f=q[e+88>>2]}h=q[h+1120>>2];e=jP(c,f,q[e+80>>2],q[a+236>>2],q[a+64>>2]+100|0,g,d);g=0;d=c+204|0;c:{if(!d){break c}d=q[d>>2];if(!d){break c}g=Mi[q[d+12>>2]](2)|0}d:{if(!g){break d}if(!hE(a,q[q[c+208>>2]>>2])){break d}d=q[a+64>>2];q[d+100>>2]=q[d+100>>2]|65536;e=e?e:-31232}c=(i=e,j=cW(c,h,(q[q[a>>2]+184>>2]^-1)&1,q[a+64>>2]+100|0)?-31232:e,k=e,k?i:j);if(!((b|0)!=1|((c|0)!=-31232?(c|0)!=-9984:0))){c=0}c=(b|0)==2?f?c:-30336:c;if(!c){return 0}b=a;a=q[q[a+64>>2]+100>>2];d=49;e:{if(a&256){break e}d=42;if(a&4){break e}d=43;if(a&112640){break e}d=45;if(a&1){break e}d=44;if(a&2){break e}d=a&8?48:46}Xj(b,2,d);return c}function rX(a,b){var c=0,d=0;cq(a,b);b=q[a>>2];c=q[a+4>>2];d=q[a+124>>2];q[a>>2]=q[a+120>>2];q[a+4>>2]=d;q[a+120>>2]=b;q[a+124>>2]=c;b=q[a+8>>2];c=q[a+12>>2];d=q[a+116>>2];q[a+8>>2]=q[a+112>>2];q[a+12>>2]=d;q[a+112>>2]=b;q[a+116>>2]=c;b=q[a+104>>2];c=q[a+108>>2];d=q[a+20>>2];q[a+104>>2]=q[a+16>>2];q[a+108>>2]=d;q[a+16>>2]=b;q[a+20>>2]=c;b=q[a+24>>2];q[a+24>>2]=q[a+96>>2];q[a+96>>2]=b;b=q[a+100>>2];q[a+100>>2]=q[a+28>>2];q[a+28>>2]=b;b=q[a+88>>2];q[a+88>>2]=q[a+32>>2];q[a+32>>2]=b;b=q[a+92>>2];q[a+92>>2]=q[a+36>>2];q[a+36>>2]=b;b=q[a+80>>2];q[a+80>>2]=q[a+40>>2];q[a+40>>2]=b;b=q[a+84>>2];q[a+84>>2]=q[a+44>>2];q[a+44>>2]=b;b=q[a+72>>2];q[a+72>>2]=q[a+48>>2];q[a+48>>2]=b;b=q[a+76>>2];q[a+76>>2]=q[a+52>>2];q[a+52>>2]=b;b=q[a+64>>2];q[a+64>>2]=q[a+56>>2];q[a+56>>2]=b;b=q[a+68>>2];q[a+68>>2]=q[a+60>>2];q[a+60>>2]=b;return 0}function UK(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Ii-16|0;Ii=g;a:{b:{b=q[b>>2];c:{if(q[b+160>>2]>-1){break c}c=q[b+136>>2];d=q[c+12>>2];e=q[c+8>>2];b=d-e|0;if(!b){break c}i=q[c+4>>2];h=q[c>>2];j=q[h+64>>2];c=e-d|0;c=((b|0)<(c|0)?c:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(c,(b|0)<1?b:1);m=b>>>0>1?b:1;d=0;while(1){if(t[i+8>>2]<=d>>>0){break b}d:{b=q[i+4>>2]+(d<<5)|0;k=q[b+28>>2];if(!k){break d}c=b;e=0;while(1){f=q[(q[b+24>>2]+w(e,24)|0)+8>>2];if(!(f>>>0>=t[j+16>>2]|!q[(q[j+12>>2]+w(f,12)|0)+4>>2])){o[g+7|0]=0;o[g+8|0]=0;l=q[h>>2];if(f>>>0>=q[h+4>>2]-l>>3>>>0){break a}f=l+(f<<3)|0;Dl(a,q[f>>2],q[f+4>>2],0)}e=e+1|0;if((k|0)==(e|0)){break d}if(t[c+28>>2]>e>>>0){continue}break}J(38398,38410,164,38435);G()}d=d+1|0;if((m|0)!=(d|0)){continue}break}}Ii=g+16|0;return}J(38398,38410,189,38435);G()}J(39032,38457,479,38435);G()}function xH(a,b){var c=0;c=Ii+ -64|0;Ii=c;u[a+2256>>2]=u[b>>2];u[a+2260>>2]=u[b+4>>2];u[a+2264>>2]=u[b+8>>2];u[a+2268>>2]=u[b+12>>2];u[a+2272>>2]=u[b+16>>2];u[a+2276>>2]=u[b+20>>2];u[a+2280>>2]=u[b+24>>2];u[a+2284>>2]=u[b+28>>2];u[a+2288>>2]=u[b+32>>2];u[a+2292>>2]=u[b+36>>2];u[a+2296>>2]=u[b+40>>2];u[a+2300>>2]=u[b+44>>2];u[a+2304>>2]=u[b+48>>2];u[a+2308>>2]=u[b+52>>2];u[a+2312>>2]=u[b+56>>2];u[a+2316>>2]=u[b+60>>2];_k(c,b,a+2192|0);u[a+2320>>2]=u[c>>2];u[a+2324>>2]=u[c+4>>2];u[a+2328>>2]=u[c+8>>2];u[a+2332>>2]=u[c+12>>2];u[a+2336>>2]=u[c+16>>2];u[a+2340>>2]=u[c+20>>2];u[a+2344>>2]=u[c+24>>2];u[a+2348>>2]=u[c+28>>2];u[a+2352>>2]=u[c+32>>2];u[a+2356>>2]=u[c+36>>2];u[a+2360>>2]=u[c+40>>2];u[a+2364>>2]=u[c+44>>2];u[a+2368>>2]=u[c+48>>2];u[a+2372>>2]=u[c+52>>2];u[a+2376>>2]=u[c+56>>2];u[a+2380>>2]=u[c+60>>2];Ii=c- -64|0}function wH(a,b){var c=0;c=Ii+ -64|0;Ii=c;u[a+2192>>2]=u[b>>2];u[a+2196>>2]=u[b+4>>2];u[a+2200>>2]=u[b+8>>2];u[a+2204>>2]=u[b+12>>2];u[a+2208>>2]=u[b+16>>2];u[a+2212>>2]=u[b+20>>2];u[a+2216>>2]=u[b+24>>2];u[a+2220>>2]=u[b+28>>2];u[a+2224>>2]=u[b+32>>2];u[a+2228>>2]=u[b+36>>2];u[a+2232>>2]=u[b+40>>2];u[a+2236>>2]=u[b+44>>2];u[a+2240>>2]=u[b+48>>2];u[a+2244>>2]=u[b+52>>2];u[a+2248>>2]=u[b+56>>2];u[a+2252>>2]=u[b+60>>2];_k(c,a+2256|0,b);u[a+2320>>2]=u[c>>2];u[a+2324>>2]=u[c+4>>2];u[a+2328>>2]=u[c+8>>2];u[a+2332>>2]=u[c+12>>2];u[a+2336>>2]=u[c+16>>2];u[a+2340>>2]=u[c+20>>2];u[a+2344>>2]=u[c+24>>2];u[a+2348>>2]=u[c+28>>2];u[a+2352>>2]=u[c+32>>2];u[a+2356>>2]=u[c+36>>2];u[a+2360>>2]=u[c+40>>2];u[a+2364>>2]=u[c+44>>2];u[a+2368>>2]=u[c+48>>2];u[a+2372>>2]=u[c+52>>2];u[a+2376>>2]=u[c+56>>2];u[a+2380>>2]=u[c+60>>2];Ii=c- -64|0}function j4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0);c=Ii-16|0;Ii=c;a:{b:{c:{if(!(q[a+8>>2]-q[a+12>>2]>>4)){d=x(1);e=x(1);f=x(1);g=x(1);break c}if(q[a+8>>2]-q[a+12>>2]>>4!=1){break b}b=Ym(a,-1);h=u[b+48>>2];i=u[b+32>>2];j=u[b+16>>2];k=u[b+12>>2];l=u[b+8>>2];f=u[b+60>>2];m=u[b+56>>2];n=u[b+52>>2];o=u[b+44>>2];e=u[b+40>>2];p=u[b+36>>2];r=u[b+28>>2];s=u[b+24>>2];d=u[b+20>>2];t=u[b+4>>2];g=u[b>>2]}b=yj(a,64);u[b+60>>2]=f;u[b+56>>2]=m;u[b+52>>2]=n;u[b+48>>2]=h;u[b+44>>2]=o;u[b+40>>2]=e;u[b+36>>2]=p;u[b+32>>2]=i;u[b+28>>2]=r;u[b+24>>2]=s;u[b+20>>2]=d;u[b+16>>2]=j;u[b+12>>2]=k;u[b+8>>2]=l;u[b+4>>2]=t;u[b>>2]=g;Zi(a,-1e4,134048);xj(a,-2);a=1;break a}q[c+8>>2]=134048;q[c+4>>2]=134048;q[c>>2]=134064;a=Qi(a,135751,c)}Ii=c+16|0;return a|0}function x$(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii+ -64|0;Ii=b;h=kj(a,1,0);i=kj(a,2,0);g=Tl(a,3,0,0);j=Tl(a,4,137935,0);d=q[($q(a,5,137937,253600)<<2)+136944>>2];c=Ui(yj(a,8280),0,8280);f=c+4|0;e=f;q[e+12>>2]=994;q[e+8>>2]=995;q[e+4>>2]=996;q[e>>2]=c;e=c+8248|0;v[e+8>>3]=-1;v[e>>3]=-1;YB(c+24|0,f,e);q[c+8272>>2]=0;q[c>>2]=-1;q[b+60>>2]=0;q[b+52>>2]=0;q[b+56>>2]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+40>>2]=1;q[b+36>>2]=d;q[b+32>>2]=1;f=c+8272|0;a:{if(g){d=Uy(c,g,j,b+32|0);if(d){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,d);a=2;break a}d=q[b+36>>2];q[f>>2]=d}q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=1;q[b>>2]=0;q[b+4>>2]=0;q[b+4>>2]=d;d=Ty(c,f,h,i,e,b);if(d){hs(c);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,d);a=2;break a}Np(a,137623,-1);a=1}Ii=b- -64|0;return a|0}function Ys(a){var b=0,c=0;c=Ii-16|0;Ii=c;b=-1;a:{b:{switch(a-1|0){case 43:b=-2;break a;case 70:b=-3;break a;case 26:b=-4;break a;case 28:b=-5;break a;case 59:b=-6;break a;case 0:b=-7;break a;case 44:b=-8;break a;case 7:b=-9;break a;case 11:b=-10;break a;case 15:b=-11;break a;case 47:b=-12;break a;case 1:b=-13;break a;case 20:b=-14;break a;case 9:b=-15;break a;case 19:b=-16;break a;case 74:b=-17;break a;case 42:b=-18;break a;case 53:b=-19;break a;case 30:b=-20;break a;case 27:b=-21;break a;case 40:b=-22;break a;case 32:b=-23;break a;case 58:b=-24;break a;case 73:b=-25;break a;case 21:b=-26;break a;case 50:b=-27;break a;case 69:b=-28;break a;case 68:b=-29;break a;case 33:b=-30;break a;case 63:b=-31;break a;case 54:b=-32;break a;case 62:break a;default:break b}}q[c>>2]=a;Pi(4,182929,182934,c);b=-1e3}Ii=c+16|0;return b}function L4(a){a=a|0;var b=0,c=0;b=Ii-128|0;Ii=b;c=Ym(a,1);u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];u[b+16>>2]=u[c+16>>2];u[b+20>>2]=u[c+20>>2];u[b+24>>2]=u[c+24>>2];u[b+28>>2]=u[c+28>>2];u[b+32>>2]=u[c+32>>2];u[b+36>>2]=u[c+36>>2];u[b+40>>2]=u[c+40>>2];u[b+44>>2]=u[c+44>>2];u[b+48>>2]=u[c+48>>2];u[b+52>>2]=u[c+52>>2];u[b+56>>2]=u[c+56>>2];u[b+60>>2]=u[c+60>>2];gu(b- -64|0,b);c=yj(a,64);u[c>>2]=u[b+64>>2];u[c+4>>2]=u[b+68>>2];u[c+8>>2]=u[b+72>>2];u[c+12>>2]=u[b+76>>2];u[c+16>>2]=u[b+80>>2];u[c+20>>2]=u[b+84>>2];u[c+24>>2]=u[b+88>>2];u[c+28>>2]=u[b+92>>2];u[c+32>>2]=u[b+96>>2];u[c+36>>2]=u[b+100>>2];u[c+40>>2]=u[b+104>>2];u[c+44>>2]=u[b+108>>2];u[c+48>>2]=u[b+112>>2];u[c+52>>2]=u[b+116>>2];u[c+56>>2]=u[b+120>>2];u[c+60>>2]=u[b+124>>2];Zi(a,-1e4,134048);xj(a,-2);Ii=b+128|0;return 1}function E_(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=q[a+44>>2];c=q[a+1392>>2];a:{b:{if((c|0)==-1){h=1;c=-1;break b}e=q[a+1128>>2];c:{if((e|0)<=(c|0)){break c}while(1){d=r[(a+c|0)+1132|0];b=d+b|0;if((d|0)!=255){break c}c=c+1|0;if((e|0)>(c|0)){continue}break}}d=1;if(t[a+52>>2]>>0){break a}c=(c|0)==(e|0)?-1:c}while(1){if((c|0)!=-1){return 1}g=q[a+52>>2];if(g>>>0<=b+26>>>0){d=1;break a}d=21;if(r[b+4|0]|q[71115]!=(r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24))){break a}d:{if(h){if(!q[a+1004>>2]|!(o[b+5|0]&1)){break d}break a}if(!(o[b+5|0]&1)){break a}}d=b+27|0;e=r[b+26|0];b=d+e|0;if(g>>>0>>0){d=1;break a}h=0;c=0;f=0;e:{if(!e){break e}while(1){i=r[c+d|0];b=i+b|0;f=c;if((i|0)!=255){break e}c=c+1|0;if((e|0)!=(c|0)){continue}break}f=e}d=f;c=(d|0)==(e|0)?-1:d;d=1;if(b>>>0<=g>>>0){continue}break}}q[a+112>>2]=d;return 0}function _2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=q[a+8>>2]-q[a+12>>2]>>4;f=jj(a,1);b=q[210420];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;tv(a);a:{b:{c:{if((Vi(a,-1)|0)!=2){Ri(a,-2);break c}d=qj(a,-1);Ri(a,-2);if(d){break b}}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;break a}e=f&65535;c=q[d+16>>2];d:{if(e>>>0>=q[d+20>>2]-c>>1>>>0){break d}c=s[c+(e<<1)>>1];b=q[d>>2];if(c>>>0>=(q[d+4>>2]-b|0)/28>>>0){break d}e=b+w(c,28)|0;if(q[e+12>>2]!=(f|0)){break d}b=b+w(c,28)|0;g=r[b+24|0];if(!(g&2)){break d}c=b;o[b+24|0]=g&253;Mi[q[b>>2]](d,2,f,x(0),q[b+4>>2],q[b+8>>2]);i=1;if(o[d+46|0]&1){break d}Cz(d,q[e+12>>2],r[c+24|0]);p[d+44>>1]=s[d+44>>1]+1}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=i;q[a+8>>2]=q[a+8>>2]+16;if((h+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(133633,132848,655,133669);G()}return 1}function wV(a){var b=0,c=0;fs(a,q[a+84>>2]);Mi[q[q[a+68>>2]+1112>>2]](a,q[a+204>>2]+4|0,q[q[a>>2]+184>>2]&1);b=q[a+20>>2]?12:36;q[a+248>>2]=b;c=q[a+204>>2];Ti(a+252|0,c+4|0,b);q[a+208>>2]=22;q[a+212>>2]=b+4;o[c|0]=20;c=q[a+68>>2];a:{if(q[c+2252>>2]){b=q[a>>2];if(o[b+184|0]&1){break a}q[a+4>>2]=15;break a}q[a+4>>2]=q[a+4>>2]+1;b=q[a>>2]}b:{c:{if(r[b+184|0]&2){q[c+512>>2]=q[a+76>>2];b=q[a+224>>2];q[c+516>>2]=q[a+220>>2];q[c+520>>2]=b;o[a+226|0]=0;o[a+227|0]=0;o[a+222|0]=0;o[a+223|0]=0;o[a+224|0]=0;o[a+225|0]=0;b=r[a+221|0]+1|0;o[a+221|0]=b;if((b|0)!=(b&255)){c=r[a+220|0]+1|0;o[a+220|0]=c;b=-27520;if((c|0)!=(c&255)){break b}}b=q[a>>2];break c}q[a+220>>2]=0;q[a+224>>2]=0}q[a+76>>2]=q[a+84>>2];q[a+56>>2]=q[a+64>>2];if(r[b+184|0]&2){dE(a)}b=Pq(a);if(b){break b}if(r[q[a>>2]+184|0]&2){b=Qq(a);if(b){break b}}b=0}return b}function Xxa(a,b){var c=0,d=0,e=0;a:{if(r[b|0]){break a}b=Jn(220423);if(r[b|0]?b:0){break a}b=Jn(w(a,12)+220432|0);if(r[b|0]?b:0){break a}b=Jn(220504);if(r[b|0]?b:0){break a}b=220509}b:{while(1){e=r[b+c|0];if(!(!e|(e|0)==47)){e=15;c=c+1|0;if((c|0)!=15){continue}break b}break}e=c}d=220509;c:{d:{c=r[b|0];e:{f:{if(!(r[b+e|0]|(c|0)==46)){d=b;if((c|0)!=67){break f}}if(!r[d+1|0]){break e}}if(!dj(d,220509)){break e}if(dj(d,220517)){break d}}if(!a){c=220580;if(r[d+1|0]==46){break c}}return 0}c=q[240516];if(c){while(1){if(!dj(d,c+8|0)){break c}c=q[c+24>>2];if(c){continue}break}}c=q[240516];if(c){while(1){if(!dj(d,c+8|0)){return c}c=q[c+24>>2];if(c){continue}break}}c=Yi(28);g:{if(!c){c=0;break g}b=q[55146];q[c>>2]=q[55145];q[c+4>>2]=b;b=c+8|0;Ti(b,d,e);o[b+e|0]=0;q[c+24>>2]=q[240516];q[240516]=c}c=a|c?c:220580}return c}function WB(a){var b=0,c=0;a:{if(!a){break a}c=q[a+28>>2];if(!c){break a}b:{c:{b=q[c+4>>2];switch(b-69|0){case 1:case 2:case 3:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:break a;case 0:case 4:case 22:case 34:case 44:break b;default:break c}}if((b|0)==666){break b}if((b|0)!=42){break a}}b=q[c+8>>2];if(b){Mi[q[a+36>>2]](q[a+40>>2],b);c=q[a+28>>2]}b=q[c+68>>2];if(b){Mi[q[a+36>>2]](q[a+40>>2],b);c=q[a+28>>2]}b=q[c+64>>2];if(b){Mi[q[a+36>>2]](q[a+40>>2],b);c=q[a+28>>2]}b=q[c+56>>2];if(b){Mi[q[a+36>>2]](q[a+40>>2],b);c=q[a+28>>2]}Mi[q[a+36>>2]](q[a+40>>2],c);q[a+28>>2]=0}}function Kla(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-112|0;Ii=b;e=nj(b+88|0,a,1,71372,318);jk(a);q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Gk(a,1,b+56|0,b+24|0);q[b+20>>2]=0;lM(a,b+20|0);c=q[b+20>>2];if(!c){J(71565,71372,328,71580);G()}ioa(c,b);vj(a,0,4);bj(a,71595,5);d=+u[b>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,71601,6);d=+u[b+4>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,71608,10);d=+u[b+8>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,71619,11);d=+u[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);mj(e);Ii=b+112|0;return 1}function w4(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);f=Ii-48|0;Ii=f;b=_i(a,1,q[210438],0);c=u[b>>2];e=u[b+4>>2];a:{b:{if(c!=c|e!=e){break b}g=u[b+8>>2];if(g!=g){break b}d=u[b+12>>2];if(d==d){break a}}g=u[b+8>>2];d=u[b+12>>2];v[f+16>>3]=e;v[f+32>>3]=d;v[f+24>>3]=g;v[f+8>>3]=c;q[f>>2]=1;Qi(a,134315,f);d=u[b+12>>2];g=u[b+8>>2];e=u[b+4>>2];c=u[b>>2]}b=yj(a,64);q[b+44>>2]=0;q[b+48>>2]=0;q[b+28>>2]=0;q[b+12>>2]=0;q[b+60>>2]=1065353216;q[b+52>>2]=0;q[b+56>>2]=0;i=x(g+g);h=x(e*i);k=x(c+c);l=x(k*d);u[b+36>>2]=h-l;m=x(c*i);j=x(e+e);n=x(j*d);u[b+32>>2]=m+n;u[b+24>>2]=h+l;h=x(c*j);d=x(d*i);u[b+16>>2]=h-d;u[b+8>>2]=m-n;u[b+4>>2]=h+d;c=x(x(1)-x(c*k));e=x(e*j);u[b+40>>2]=c-e;d=c;c=x(g*i);u[b+20>>2]=d-c;u[b>>2]=x(x(1)-e)-c;Zi(a,-1e4,134048);xj(a,-2);Ii=f+48|0;return 1}function tE(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;i=Ii-32|0;Ii=i;q[i+12>>2]=0;a:{if(c>>>0>>0){e=-20;if(d-c>>>0>>0){break a}}e=-20;j=q[a+324>>2];f=j;h=q[a+320>>2];g=b+h|0;f=b>>>0>g>>>0?f+1|0:f;k=g;if((f|0)==(j|0)&g>>>0>>0|f>>>0>>0|((f|0)==15&g>>>0>4294967264|f>>>0>15)){break a}q[a+320>>2]=k;q[a+324>>2]=f;if(b){k=a+368|0;j=a+352|0;while(1){e=16;while(1){if(e>>>0>=13){e=e-1|0;h=e+a|0;f=r[h+352|0]+1|0;o[h+352|0]=f;if((f|0)!=(f&255)){continue}}break}e=cn(a,j,16,i+16|0,i+12|0);if(e){break a}f=b>>>0<16?b:16;h=f>>>0>1?f:1;e=0;while(1){if(!q[a+384>>2]){g=a+e|0;o[g+368|0]=r[g+368|0]^r[c+e|0]}g=r[c+e|0]^r[(i+16|0)+e|0];o[d+e|0]=g;if(q[a+384>>2]==1){l=a+e|0;o[l+368|0]=g^r[l+368|0]}e=e+1|0;if((h|0)!=(e|0)){continue}break}Ts(a,k,k);d=d+f|0;c=c+f|0;b=b-f|0;if(b){continue}break}}e=0}Ii=i+32|0;return e}function esa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=q[a+12>>2];if(!c){return-1e3}b=Ui($i(112),0,112);q[b+92>>2]=0;q[b+96>>2]=0;q[b+76>>2]=0;q[b+80>>2]=0;q[b+64>>2]=-1;q[b+84>>2]=0;q[b+88>>2]=0;q[b+100>>2]=0;q[b+104>>2]=0;q[b+96>>2]=-1;q[c>>2]=b;a:{b:{c:{if(!(o[b+12|0]&1)){Wi(512,104,b,b+8|0,b+4|0);if(o[b+28|0]&1){break a}Wi(65e3,2,b+16|0,b+24|0,b+20|0);c=q[b+16>>2];if(q[b+24>>2]-c>>1>>>0<=64999){break c}q[b+20>>2]=c+13e4;c=s[b+36>>1];if(c>>>0>=65001){break b}f=b+76|0;g=b+44|0;e=q[b+32>>2];d=Yi(13e4);q[b+32>>2]=d;d=Ti(d,e,c<<1);p[b+36>>1]=65e3;if((c|0)!=65e3){while(1){p[d+(c<<1)>>1]=c;c=c+1|0;if((c|0)!=65e3){continue}break}}Ni(e);a=q[a+8>>2];c=(a|0)/3|0;c=(c|0)>1?c:1;qA(g,c,a);qA(f,c,a);o[b+108|0]=r[b+108|0]&254;return 0}break a}J(6367,6386,506,6442);G()}J(6537,6144,112,6525);G()}J(6450,6386,493,6525);G()}function CK(a){var b=0,c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;q[d+8>>2]=0;c=q[75048];b=q[75049];a:{if(!a){if((b|0)==(c|0)){break a}b=0;while(1){b:{a=b<<3;c=a+c|0;e=q[c+4>>2];c=q[c>>2];c:{if(!(Mi[q[75024]](c,e)&1)){q[d+24>>2]=0;q[d+16>>2]=c;q[d+20>>2]=751;bB(d+16|0);e=q[75049];c=q[75048];if(e-c>>3>>>0<=b>>>0){break b}f=a+c|0;a=e-8|0;e=q[a+4>>2];q[f>>2]=q[a>>2];q[f+4>>2]=e;q[75049]=a;if(a>>>0>=c>>>0){break c}J(91316,90502,516,91306);G()}b=b+1|0;c=q[75048];a=q[75049]}if(a-c>>3>>>0>b>>>0){continue}break a}break}J(91291,90502,513,91306);G()}a=b-c|0;if(!a){break a}if((b|0)!=(c|0)){b=c-b|0;b=((a|0)<(b|0)?b:a)>>>3|0;a=(a|0)>-1?a:-1;a=w(b,(a|0)<1?a:1);a=a>>>0>1?a:1;b=0;while(1){GK(q[(b<<3)+c>>2]);b=b+1|0;if((a|0)==(b|0)){break a}c=q[75048];if(q[75049]-c>>3>>>0>b>>>0){continue}break}}J(91269,90502,479,91280);G()}Ii=d+32|0}function qo(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/968|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,968)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+960>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+968;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,968)|0;q[a+20>>2]=q[e+960>>2]}q[e>>2]=b;q[e+4>>2]=c;Ti(e+8|0,d,952);q[e+960>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,968)|0;f=q[b+960>>2];if((f|0)!=-1){continue}break}q[b+960>>2]=(e-d|0)/968;break a}J(150222,150097,229,150230);G()}Ti((g+w(f,968)|0)+8|0,d,952);return}J(150234,150097,537,150296);G()}q[b>>2]=(e-d|0)/968}q[a+24>>2]=q[a+24>>2]+1}function k8(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-128|0;Ii=c;q[c+120>>2]=0;b=q[a>>2];u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];u[c+64>>2]=u[b+64>>2];u[c+68>>2]=u[b+68>>2];u[c+72>>2]=u[b+72>>2];u[c+76>>2]=u[b+76>>2];u[c+80>>2]=u[b+80>>2];u[c+84>>2]=u[b+84>>2];u[c+88>>2]=u[b+88>>2];u[c+92>>2]=u[b+92>>2];q[c+96>>2]=q[b+96>>2];f=q[a+12>>2];if(f){b=0;while(1){e=q[a+8>>2]+w(b,48)|0;d=q[e+16>>2];d=pI(c,d+256|0,u[d+272>>2]);q[e+36>>2]=q[e+36>>2]&-16385|(d?16384:0);b=b+1|0;if((f|0)!=(b|0)){continue}break}}Ii=c+128|0}function YI(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{c:{d:{h=q[a+16>>2];g=q[a+8>>2];if(q[a+24>>2]!=((h-g|0)/136|0)){e=q[a+4>>2];e:{if(!e){break e}f=q[q[a>>2]+(Cza(b,c,e)<<2)>>2];if((f|0)==-1){break e}while(1){e=g+w(f,136)|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break d}f=q[e+128>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((h|0)!=(e|0)){q[a+12>>2]=e+136;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=g+w(e,136)|0;q[a+20>>2]=q[e+128>>2]}q[e>>2]=b;q[e+4>>2]=c;Ti(e+8|0,d,114);q[e+128>>2]=-1;d=q[a+8>>2];b=q[a>>2]+(Cza(b,c,q[a+4>>2])<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=d+w(f,136)|0;f=q[b+128>>2];if((f|0)!=-1){continue}break}q[b+128>>2]=(e-d|0)/136;break a}J(167236,167056,229,167244);G()}Ti((g+w(f,136)|0)+8|0,d,114);return}J(167248,167056,537,167310);G()}q[b>>2]=(e-d|0)/136}q[a+24>>2]=q[a+24>>2]+1}function eia(a){var b=0,c=0,d=0,e=0;d=Ii-32|0;Ii=d;b=q[a>>2];Ak(b,73752,232592);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,73760);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,73778);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,73795);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,73812);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=4;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,73830);Ri(b,-2);c=$i(16);q[c>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;a:{b:{c:{if(vn(q[56623],c)){break c}e=Vl(q[a+4>>2],73150,d+28|0);if(e){q[d+20>>2]=e;q[d+16>>2]=73150;Pi(4,73846,73854,d+16|0);break c}if(Cw(q[a+8>>2],q[d+28>>2],c+8|0)){break b}q[d>>2]=73150;Pi(4,73846,73896,d)}Ni(c);break a}a=q[b+8>>2];q[a+8>>2]=2;q[a>>2]=c;q[b+8>>2]=q[b+8>>2]+16;q[74444]=A3(b)}Ii=d+32|0}function Bka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-128|0;Ii=c;q[c+120>>2]=0;b=q[a>>2];u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];u[c+64>>2]=u[b+64>>2];u[c+68>>2]=u[b+68>>2];u[c+72>>2]=u[b+72>>2];u[c+76>>2]=u[b+76>>2];u[c+80>>2]=u[b+80>>2];u[c+84>>2]=u[b+84>>2];u[c+88>>2]=u[b+88>>2];u[c+92>>2]=u[b+92>>2];q[c+96>>2]=q[b+96>>2];f=q[a+12>>2];if(f){b=0;while(1){e=q[a+8>>2]+w(b,48)|0;d=q[e+16>>2];d=qI(c,d,d- -64|0,d+80|0);q[e+36>>2]=q[e+36>>2]&-16385|(d?16384:0);b=b+1|0;if((f|0)!=(b|0)){continue}break}}Ii=c+128|0}function DP(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=q[c>>2];d=j+8|0;e=s[a+4>>1];c=d+w(e,112)|0;h=c;i=s[c+104>>1];c=s[a>>1];g=d+w(c,112)|0;f=s[a+2>>1];d=s[(d+w(f,112)|0)+104>>1];a:{if(s[g+104>>1]<=d>>>0){if(d>>>0<=i>>>0){f=e;break a}p[a+4>>1]=f;p[a+2>>1]=e;if(s[h+104>>1]>=s[g+104>>1]){break a}p[a+2>>1]=c;p[a>>1]=e;break a}b:{if(d>>>0>i>>>0){p[a+4>>1]=c;p[a>>1]=e;break b}p[a+2>>1]=c;p[a>>1]=f;if(s[h+104>>1]>=s[g+104>>1]){f=e;break a}p[a+4>>1]=c;p[a+2>>1]=e}f=c}c:{c=a+6|0;if((c|0)==(b|0)){break c}d=a+4|0;i=j+8|0;while(1){e=c;g=s[c>>1];k=i+w(g,112)|0;if(s[k+104>>1]>1]){h=e;while(1){d:{p[h>>1]=f;c=d;if((c|0)==(a|0)){c=a;break d}h=c;d=c-2|0;f=s[d>>1];if(s[k+104>>1]>1]){continue}}break}p[c>>1]=g}c=e+2|0;if((c|0)==(b|0)){break c}f=s[e>>1];d=e;continue}}}function Apa(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-16|0;Ii=f;q[b+20>>2]=e;q[b+16>>2]=d;q[b+12>>2]=c;d=1;e=r[b+24|0];a:{b:{c=q[b+4>>2];if(!c){c=q[b>>2]}c:{if(!(o[c+28|0]&1)){o[b+24|0]=e|1;break c}if(e&1){d=0;Pi(4,34592,34600,0);break c}if(q[c+16>>2]!=q[c+12>>2]){o[b+24|0]=e|1;break c}d=q[c+8>>2];if(!q[d+8>>2]){d=1;o[b+24|0]=e|1;break c}c=f+8|0;q[c>>2]=0;q[c+4>>2]=0;q[f>>2]=0;q[f+4>>2]=0;Wi(q[d+8>>2],4,f,c,f|4);e=q[d+8>>2];if(e){c=0;while(1){if((c|0)==(e|0)){break b}h=q[(q[d+4>>2]+w(c,80)|0)+4>>2];if(h){g=q[f+4>>2];if((g|0)==q[f+8>>2]){break a}q[f+4>>2]=g+4;q[g>>2]=h}c=c+1|0;if(e>>>0>c>>>0){continue}break}}a=lH(q[a+32>>2],f);q[b+8>>2]=a;if(a){o[b+24|0]=r[b+24|0]|1}d:{if(o[f+12|0]&1){break d}b=q[f>>2];if(!b){break d}Ni(b)}d=(a|0)!=0}Ii=f+16|0;return d}J(34725,34737,244,34798);G()}J(34990,34820,533,35014);G()}function gO(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;Oza(+a);i=Lza(1)|0;Lza(0)|0;g=i&2147483640;g=(g|0)==1072010279|g>>>0<1072010279;if(!g){h=(i|0)>-1;a=.7853981633974483-(h?a:-a)+(3.061616997868383e-17-(h?b:-b));h=i>>>31|0;b=0}d=a*a;e=a*d;f=b;b=d*d;d=e*.3333333333333341+(f+d*(f+e*(b*(b*(b*(b*(b*-18558637485527546e-21+7817944429395571e-20)+.0005880412408202641)+.0035920791075913124)+.021869488294859542)+.13333333333320124+d*(b*(b*(b*(b*(b*2590730518636337e-20+7140724913826082e-20)+.0002464631348184699)+.0014562094543252903)+.0088632398235993)+.05396825397622605))));b=a+d;if(!g){e=b*b;f=b;b=+(1-(c<<1)|0);a=a+(d-e/(f+b));a=b-(a+a);return h?-a:a}if(c){Oza(+b);c=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,c|0);e=+Nza();f=-1/b;Oza(+f);c=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,c|0);b=+Nza();b=f*(e*b+1+(d-(e-a))*b)+b}return b}function Cv(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=x(0);e=Ii-160|0;Ii=e;q[e+152>>2]=0;f=1;a:{b:{g=q[a+308>>2]+(b<<2)|0;if(q[g>>2]!=-2){d=q[q[a+304>>2]+2012>>2];h=q[d+8>>2]-q[d+12>>2]>>4;rj(d,-1e4,q[a+320>>2]);yk(d);rj(d,-1e4,q[g>>2]);rj(d,-1e4,q[a+320>>2]);a=1;c:{d:{switch(b-1|0){case 1:lk(d,q[c+64>>2],q[c+68>>2]);a=q[c+80>>2];e:{if(a){uz(d,a,c+96|0);break e}a=q[c+84>>2];if(a){gr(d,c+96|0,a);break e}vj(d,0,0)}km(d,c);a=4;break c;case 0:break d;default:break c}}i=u[c>>2];a=q[d+8>>2];q[a+8>>2]=3;v[a>>3]=i;q[d+8>>2]=q[d+8>>2]+16;a=2}b=Ii-128|0;Ii=b;Ii=b+128|0;q[e+8>>2]=0;if(Pm(d,a,0)){f=-1;if((h|0)!=q[d+8>>2]-q[d+12>>2]>>4){break b}}a=q[d+8>>2];q[a+8>>2]=0;q[d+8>>2]=a+16;yk(d);if((h|0)!=q[d+8>>2]-q[d+12>>2]>>4){break a}}Ii=e+160|0;return f}J(115568,115465,3411,119436);G()}J(115568,115465,3419,119436);G()}function y5(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=Ii-16|0;Ii=g;q[g>>2]=0;q[g+8>>2]=0;a:{b:{f=q[a+4>>2];e=q[a>>2];c=f-e|0;if(!c){break b}if((e|0)!=(f|0)){f=e-f|0;f=((c|0)<(f|0)?f:c)>>>2|0;c=(c|0)>-1?c:-1;c=w(f,(c|0)<1?c:1);c=c>>>0>1?c:1;while(1){aH(q[(d<<2)+e>>2],b);d=d+1|0;if((c|0)==(d|0)){break b}e=q[a>>2];if(q[a+4>>2]-e>>2>>>0>d>>>0){continue}break}}break a}f=q[a+4>>2];e=q[a>>2];d=f-e|0;c=0;c:{if(!d){break c}d:{if((e|0)!=(f|0)){c=e-f|0;c=((c|0)>(d|0)?c:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(c,(d|0)<1?d:1);f=d>>>0>1?d:1;d=0;c=0;while(1){e=q[(d<<2)+e>>2];e:{if(q[e+116>>2]==q[e+112>>2]){break e}h=q[e+88>>2];if(!h){break e}Mi[h|0](q[e+92>>2],q[e+96>>2]);c=1}d=d+1|0;if((f|0)==(d|0)){break d}e=q[a>>2];if(q[a+4>>2]-e>>2>>>0>d>>>0){continue}break}}break a}c=c?4:0}Ii=g+16|0;return c}J(152576,152587,486,152554);G()}function tla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=Ii-112|0;Ii=b;if(!r[297360]){o[297360]=1;q[b>>2]=71874;q[b+4>>2]=71880;q[b+8>>2]=71874;q[b+12>>2]=71885;Pi(3,71866,72289,b)}d=q[a+8>>2]-q[a+12>>2]>>4;f=jk(a);c=$j(a,2);g=Li;h=jj(a,3);i=fj(a,4);q[b+104>>2]=0;q[b+108>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;e=b- -64|0;q[e>>2]=0;q[e+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Gk(a,1,b+80|0,b+48|0);a:{if((d|0)<5){break a}if((Vi(a,5)|0)!=6){break a}ej(a,5);j=$s(a)+2|0}q[b+40>>2]=0;q[b+44>>2]=1065353216;q[b+32>>2]=h;q[b+24>>2]=c;q[b+28>>2]=g;u[b+36>>2]=i;c=q[59998];Oo(b+48|0,b+80|0,q[c+8>>2],q[c+12>>2],f,j,c,b+24|0,24,0);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(71895,71916,205,71956);G()}Ii=b+112|0;return 0}function ow(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{d=q[a+4>>2];e=q[a>>2];f=d-e|0;c:{if((f|0)<1){break c}d:{if((d|0)!=(e|0)){d=e-d|0;d=((d|0)>(f|0)?d:f)>>>2|0;f=d>>>0>1?d:1;d=0;while(1){e=q[(d<<2)+e>>2];if(q[e+8>>2]==(b|0)&q[e+12>>2]==(c|0)){break d}d=d+1|0;if((f|0)==(d|0)){break c}e=q[a>>2];if(q[a+4>>2]-e>>2>>>0>d>>>0){continue}break}}J(48162,47954,479,48173);G()}e=q[a+4>>2];f=q[a>>2];if(e-f>>2>>>0<=d>>>0){break b}q[f+(d<<2)>>2]=q[e-4>>2];d=q[a+4>>2]-4|0;q[a+4>>2]=d;if(d>>>0>2]){break a}}e=0;d=q[a+20>>2];e:{if(!d){break e}f=a+16|0;d=q[q[f>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break e}g=q[a+24>>2];while(1){d=w(d,24)+g|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){d=q[d+16>>2];if((d|0)!=-1){continue}break e}break}raa(f,b,c);e=1;o[a+52|0]=1}return e}J(48184,47954,513,48199);G()}J(48209,47954,516,48199);G()}function N4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-48|0;Ii=c;d=a?q[a+120>>2]:0;h=nj(c+24|0,d,0,125134,44);b=yj(d,72);q[b+4>>2]=0;q[b+8>>2]=0;q[b+68>>2]=-2;q[b>>2]=a;q[b+60>>2]=0;q[b+64>>2]=0;q[b+52>>2]=0;q[b+56>>2]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;ej(d,-1);q[b+68>>2]=zk(d,-1e4);Xi(d,q[63063]);xk(d,-2);B3(q[b>>2]);e=q[210498];if(e){i=b+4|0;while(1){a:{if(!q[e+20>>2]){break a}b=c+8|0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;j=b;k=c;b=a;f=0;b:{if(!b){break b}f=q[b>>2]}q[k+8>>2]=f;b=b?q[a+4>>2]:0;q[c+16>>2]=d;q[c+12>>2]=b;if(!(Mi[q[e+20>>2]](j)|0)){b=(g&-4)+i|0;q[b>>2]=q[b>>2]|1<<(g&3);break a}q[c>>2]=q[e>>2];Pi(4,125163,125170,c)}g=g+1|0;e=q[e+36>>2];if(e){continue}break}}mj(h);Ii=c+48|0}function cO(a){var b=0,c=x(0),d=0,e=x(0),f=0,g=x(0);f=(Pza(a),Lza(2));b=f&2147483647;if(b>>>0<1283457024){a:{b:{if(b>>>0<=1054867455){if(b>>>0<964689920){break a}b=-1;d=1;break b}a=x(y(a));c:{if(b>>>0<=1066926079){if(b>>>0<=1060110335){a=x(x(x(a+a)+x(-1))/x(a+x(2)));b=0;d=0;break b}b=1;a=x(x(a+x(-1))/x(a+x(1)));break c}if(b>>>0<=1075576831){b=2;a=x(x(a+x(-1.5))/x(x(a*x(1.5))+x(1)));break c}b=3;a=x(x(-1)/a)}d=0}e=x(a*a);c=x(e*e);g=x(c*x(x(c*x(-.106480173766613))+x(-.19999158382415771)));c=x(e*x(x(c*x(x(c*x(.06168760731816292))+x(.14253635704517365)))+x(.333333283662796)));if(d){return x(a-x(a*x(g+c)))}b=b<<2;a=x(u[b+217872>>2]-x(x(x(a*x(g+c))-u[b+217888>>2])-a));a=(f|0)>-1?a:x(-a)}return a}return((Pza(a),Lza(2))&2147483647)>>>0>2139095040?a:(Mza(2,(Pza(a),Lza(2))&-2147483648|1070141402),Qza())}function Zp(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0;q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;a:{if(!b){c=528734635;d=725511199;e=-1694144372;f=-1377402159;g=1359893119;h=1595750129;i=-1521486534;j=-23791573;k=1013904242;l=-2067093701;m=-1150833019;n=-205731576;o=1779033703;p=327033209;r=1541459225;s=-79577749;break a}c=-619958771;d=1750603025;e=-1900787065;f=-4191439;g=1731405415;h=-150054599;i=355462360;j=812702999;k=-1856437926;l=914150663;m=1654270250;n=-1056596264;o=-876896931;p=-1090891868;r=1203062813;s=1694076839}q[a+208>>2]=b;q[a+16>>2]=n;q[a+20>>2]=o;q[a+72>>2]=p;q[a+76>>2]=r;b=a- -64|0;q[b>>2]=s;q[b+4>>2]=c;q[a+56>>2]=d;q[a+60>>2]=e;q[a+48>>2]=f;q[a+52>>2]=g;q[a+40>>2]=h;q[a+44>>2]=i;q[a+32>>2]=j;q[a+36>>2]=k;q[a+24>>2]=l;q[a+28>>2]=m;return 0}function Qqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;d=q[q[a+32>>2]+8>>2];q[b+28>>2]=0;c=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[57366],b+28|0)){break a}Kr(q[b+28>>2]);if(!Ep(q[a>>2],q[a+4>>2],q[b+28>>2])){Aj(q[b+28>>2]);break a}g=q[d+44>>2];e=q[b+28>>2];q[d+44>>2]=e;if(hM(q[d>>2],e,d)){q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;c=q[b+28>>2];if(!yw(q[a>>2],q[c+140>>2],q[c+144>>2],b+8|0)){Dp(q[a>>2],d+52|0);c=q[b+8>>2];q[b+8>>2]=q[d+52>>2];q[d+52>>2]=c;c=q[b+12>>2];q[b+12>>2]=q[d+56>>2];q[d+56>>2]=c;c=q[b+16>>2];q[b+16>>2]=q[d+60>>2];q[d+60>>2]=c;c=d- -64|0;e=r[c|0];f=r[b+20|0];o[b+20|0]=e&1|f&254;o[c|0]=e&254|f&1}Aj(g);q[q[a+32>>2]+16>>2]=q[a+24>>2]-q[q[d+44>>2]+4>>2];b:{if(o[b+20|0]&1){break b}a=q[b+8>>2];if(!a){break b}Ni(a)}c=0;break a}Aj(q[b+28>>2])}Ii=b+32|0;return c|0}function so(a,b,c){var d=0,e=0;a:{b:{c:{d:{if(!r[b+60|0]){e:{f:{switch(q[b+56>>2]-1|0){case 0:vc(36160,c|0,36161,q[b+48>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break d}}a=za(36160)|0;if((a|0)==36053){break e}dw(a);J(93324,88575,2391,93388);G();case 1:e=q[b+48>>2];d=q[b+52>>2];if((d|0)==2097152|d>>>0>2097152){break c}d=e&65535;if(d>>>0>=t[a+32>>2]){break b}uc(36160,c|0,3553,q[q[(s[q[a+28>>2]+(d<<1)>>1]==(e>>>16|0)?q[q[a+24>>2]+(d<<2)>>2]:0)+4>>2]>>2],0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}a=za(36160)|0;if((a|0)==36053){break e}dw(a);J(93324,88575,2401,93388);G();default:break f}}J(88669,88575,2404,93388);G()}o[b+60|0]=1}return}lj(a,93388,2390);J(88669,88575,2390,93388);G()}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}lj(a,93388,2400);J(88669,88575,2400,93388);G()}function Wsa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;e=Ii-32|0;Ii=e;a:{b:{if(a){if(!b){break b}c=hi(0)|0;c:{if(!c){Pi(4,213576,213582,0);a=-1e3;break c}f=ji(c|0,0)|0;if(!f){Pi(4,213576,213613,0);La(c|0)|0;a=-1e3;break c}if(!(ka(f|0)|0)){Pi(4,213576,213645,0);fb(f|0);La(c|0)|0;a=-1e3;break c}d=$i(32);q[d+4>>2]=f;q[d>>2]=c;q[d+8>>2]=0;q[d+12>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;c=d+16|0;q[c>>2]=0;q[c+4>>2]=0;Wi(q[a>>2],4,d+8|0,c,d+12|0);a=q[a>>2];f=q[c>>2];c=q[d+8>>2];if(a>>>0>f-c>>2>>>0){break a}q[d+12>>2]=c+(a<<2);oi(a|0,c|0);a=X()|0;if(a){q[e+16>>2]=W(a|0);Pi(4,213576,214018,e+16|0)}ni(1,d+24|0);a=X()|0;if(a){q[e>>2]=W(a|0);Pi(4,213576,214018,e)}q[d+28>>2]=44100;q[b>>2]=d;ka(0)|0;a=0}Ii=e+32|0;return a|0}J(213512,213519,63,213552);G()}J(213569,213519,64,213552);G()}J(214077,214021,506,214096);G()}function PR(a){var b=0,c=0,d=0;a:{b=MR(a);b:{if(b){break b}Ix(a);b=my(a,q[a+116>>2]-q[a+108>>2]|0);if(b){break b}b=CR(a);if(b){if(!(q[q[a>>2]+184>>2]&2)|(b|0)==-26496){break b}c:{if((b|0)!=-26368){if((b|0)!=-25728){break c}cS(a)}q[a+144>>2]=q[a+132>>2]+(q[a+116>>2]-q[a+108>>2]|0);return-25984}break a}b=my(a,q[a+132>>2]+(q[a+116>>2]-q[a+108>>2]|0)|0);if(b){break b}d:{if(r[q[a>>2]+184|0]&2){q[a+144>>2]=q[a+132>>2]+(q[a+116>>2]-q[a+108>>2]|0);break d}q[a+136>>2]=0}b=qR(a);if(!b){return 0}c=q[a>>2];e:{if(r[c+184|0]&2){if((b|0)!=-29056){break b}f:{switch(q[a+4>>2]-11|0){case 0:case 2:break e;default:break f}}c=q[c+172>>2];if(c){d=q[a+24>>2]+1|0;q[a+24>>2]=d;b=-29056;if(c>>>0<=d>>>0){break b}}break a}if((b|0)!=-29056){break b}}Xj(a,2,20);b=-29056}return b}q[a+136>>2]=0;q[a+144>>2]=0;return-25984}function iz(a,b){var c=0,d=0,e=0,f=0,g=0;o[b+140|0]=0;q[b+136>>2]=-1;o[b+72|0]=0;o[b+8|0]=0;o[b|0]=0;f=b+140|0;a:{d=gk(a,58);b:{if(!d){break b}if(a>>>0>=d>>>0){break a}c=o[a|0];if(!((c|32)-97>>>0<26?1:c-48>>>0<10)){break b}c=a;while(1){c=c+1|0;if((d|0)!=(c|0)){e=o[c|0];if((e|32)-97>>>0<26?1:e-48>>>0<10){continue}}break}if(c>>>0>=d>>>0){break a}}Pj(b,183872,8);Pj(f,a,2048);return 0}c=(d-a|0)+1|0;Pj(b,a,c>>>0<8?c:8);c=80;c:{d:{if(!dj(b,183877)){break d}if(!dj(b,183882)){break d}c=443;if(!dj(b,183885)){break d}if(dj(b,183891)){break c}}q[b+136>>2]=c}c=an(a,183895);e:{if(c){d=b+72|0;a=b+8|0;c=c+2|0;e=gk(c,47);f:{if(e){g=c;c=(e-c|0)+1|0;Pj(a,g,c>>>0<64?c:64);Pj(f,e,2048);break f}Pj(a,c,64)}Pj(d,a,64);a=gk(d,58);if(!a){break e}q[b+136>>2]=Kq(a+1|0,0);o[a|0]=0;return 0}Pj(f,d+1|0,2048)}return 0}function rha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=Ii-112|0;Ii=b;f=nj(b+88|0,a,0,80657,468);d=q[a+8>>2]-q[a+12>>2]>>4;g=jk(a);h=$j(a,2);i=Li;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;e=b- -64|0;q[e>>2]=0;q[e+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;Gk(a,1,b+56|0,b+24|0);a:{b:{if((d|0)>=4){Dj(a,4,5);ej(a,4);Zi(a,-1,80806);c=0;c:{if(!Vi(a,-1)){break c}c=fj(a,-1)}j=c;Ri(a,-2);Zi(a,-1,80813);c=1;d:{if(!Vi(a,-1)){break d}c=fj(a,-1)}Ri(a,-2);Ri(a,-2);break b}c=1;if((d|0)!=3){break a}}if((Vi(a,3)|0)!=6){break a}ej(a,3);k=$s(a)+2|0}q[b+8>>2]=h;q[b+12>>2]=i;u[b+20>>2]=c;u[b+16>>2]=j;a=q[60754];Oo(b+24|0,b+56|0,q[a+8>>2],q[a+12>>2],g,k,a,b+8|0,16,0);mj(f);Ii=b+112|0;return 0}function ama(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=q[a+20>>2];if(!e){return-1}h=-1;a:{f=q[q[a+16>>2]+(Cza(b,c,e)<<2)>>2];b:{if((f|0)==-1){break b}e=q[a+64>>2];i=q[a+24>>2];while(1){g=(f<<4)+i|0;if((b|0)!=q[g>>2]|q[g+4>>2]!=(c|0)){f=q[g+12>>2];if((f|0)!=-1){continue}break b}break}if(!q[e+52>>2]){return-1e3}f=(f<<4)+i|0;b=d;a=q[a+48>>2];c=0;c:{if(!a){break c}c=q[a>>2]}q[b>>2]=c;q[d+4>>2]=q[e+48>>2];q[d+8>>2]=q[e+56>>2];q[d+12>>2]=q[e+96>>2];q[d+16>>2]=q[e+76>>2];a=q[f+8>>2];if(a>>>0>=t[e+8>>2]){break a}a=q[e+4>>2]+w(a,40)|0;q[d+40>>2]=q[a+20>>2];q[d+24>>2]=q[a+4>>2];q[d+28>>2]=q[a+8>>2];q[d+32>>2]=q[a+12>>2];q[d+36>>2]=q[a+16>>2];q[d+44>>2]=q[a+28>>2];q[d+48>>2]=q[a+32>>2];a=q[a+24>>2];if(a>>>0<=6){q[d+20>>2]=a}q[d+52>>2]=56;h=0}return h|0}J(47452,47464,88,47417);G()}function Pxa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=Ii-32|0;Ii=e;g=q[a+28>>2];q[e+16>>2]=g;d=q[a+20>>2];q[e+28>>2]=c;q[e+24>>2]=b;b=d-g|0;q[e+20>>2]=b;g=b+c|0;j=2;b=e+16|0;a:{b:{f=Ma(q[a+60>>2],e+16|0,2,e+12|0)|0;d=0;c:{if(!f){break c}q[240513]=f;d=-1}d:{if(!d){while(1){d=q[e+12>>2];if((d|0)==(g|0)){break d}if((d|0)<=-1){break b}h=q[b+4>>2];f=h>>>0>>0;i=(f<<3)+b|0;h=d-(f?h:0)|0;q[i>>2]=h+q[i>>2];i=(f?12:4)+b|0;q[i>>2]=q[i>>2]-h;g=g-d|0;b=f?b+8|0:b;j=j-f|0;f=Ma(q[a+60>>2],b|0,j|0,e+12|0)|0;d=0;e:{if(!f){break e}q[240513]=f;d=-1}if(!d){continue}break}}if((g|0)!=-1){break b}}b=q[a+44>>2];q[a+28>>2]=b;q[a+20>>2]=b;q[a+16>>2]=b+q[a+48>>2];a=c;break a}q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a>>2]=q[a>>2]|32;a=0;if((j|0)==2){break a}a=c-q[b+4>>2]|0}Ii=e+32|0;return a|0}function $k(a){var b=0;a:{b:{b=q[a+44>>2];if(b){if(b>>>0>=t[a+52>>2]){q[a+108>>2]=1;break a}q[a+44>>2]=b+1;b=r[b|0];break b}b=wj(q[a+32>>2]);if((b|0)!=-1){break b}q[a+108>>2]=1;break a}if((b&255)!=79){break a}c:{b=q[a+44>>2];if(b){if(b>>>0>=t[a+52>>2]){q[a+108>>2]=1;break a}q[a+44>>2]=b+1;b=r[b|0];break c}b=wj(q[a+32>>2]);if((b|0)!=-1){break c}q[a+108>>2]=1;break a}if((b&255)!=103){break a}d:{b=q[a+44>>2];if(b){if(b>>>0>=t[a+52>>2]){q[a+108>>2]=1;break a}q[a+44>>2]=b+1;b=r[b|0];break d}b=wj(q[a+32>>2]);if((b|0)!=-1){break d}q[a+108>>2]=1;break a}if((b&255)!=103){break a}e:{b=q[a+44>>2];if(b){if(b>>>0>=t[a+52>>2]){q[a+108>>2]=1;break a}q[a+44>>2]=b+1;b=r[b|0];break e}b=wj(q[a+32>>2]);if((b|0)!=-1){break e}q[a+108>>2]=1;break a}if((b&255)!=83){break a}return jD(a)}q[a+112>>2]=30;return 0}function x9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{b:{c:{d:{g=q[a+16>>2];c=q[a+20>>2]-g>>3;if(c>>>0>b>>>0){f=q[a+4>>2]-q[a>>2]>>4;e=f-1|0;d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}h=f;f=(b<<3)+g|0;if(h>>>0<=t[f>>2]){break d}h=c;c=q[d+(e<<2)>>2];if(h>>>0<=c>>>0){break a}q[(c<<3)+g>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];d=q[a+4>>2];c=q[a>>2];if(e>>>0>=d-c>>4>>>0){break c}c=c+(e<<4)|0;d=d-16|0;e=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=e;e=q[d+12>>2];q[c+8>>2]=q[d+8>>2];q[c+12>>2]=e;c=q[a+4>>2]-16|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(50154,50070,152,50175);G()}J(50180,49868,513,50195);G()}J(50205,49868,516,50195);G()}J(50132,49868,479,50143);G()}function hH(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;d=q[b+12>>2];d=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);h=d&2;j=d&1;d=q[b+4>>2];d=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);e=q[b>>2];e=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);b=q[b+8>>2];b=b<<8&16711680|b<<24|(b>>>8&65280|b>>>24);a:{b:{c:{d:{e:{f:{g:{a=q[a+8>>2];h:{if(!r[a+1044|0]){i=q[a+1032>>2];Uk(i,e,0);if(!h){e=-2;b=d;a=c;if((b|0)==(zl(a,1,b,i)|0)){break h}break a}a=$i(b);if((zl(a,1,b,i)|0)==(b|0)){f=a;break h}Ni(a);e=-2;break a}a=e+q[a+1036>>2]|0;if(h){break g}b=d;a=Ti(c,a,b)}if(j){break f}break e}if(!j){break d}f=$i(b);a=Ti(f,a,b)}if(!(Mi[q[57767]](a,b)|0)){break e}e=-1e3;if(f){break b}break a}if(!h){break c}}if(!oI(a,b,c,d,g+12|0)){break c}if(f){Ni(f)}e=-4;break a}e=0;if(!f){break a}}Ni(f)}Ii=g+16|0;return e}function f$(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-336|0;Ii=b;d=Tl(a,1,0,0);e=Tl(a,2,0,0);if(!(d|e)){Qi(a,137056,0)}q[b+24>>2]=0;q[b+28>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=1;q[b+16>>2]=0;q[b+20>>2]=0;q[b+20>>2]=0;c=ja(d|0,e|0,b+16|0,b+12|0)|0;a:{b:{if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,gs(c));break b}vj(a,0,0);c=q[b+12>>2];c:{if(!c){break c}f=d?255:0;g=((e|0)!=0)<<5;if(d){d=1;while(1){ia(q[c+20>>2],q[c+16>>2],b+80|0,f|0,b+48|0,g|0,0)|0;h=q[a+8>>2];q[h+8>>2]=3;v[h>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Xi(a,b+80|0);pj(a,-3);d=d+1|0;c=q[c+28>>2];if(c){continue}break}break c}while(1){ia(q[c+20>>2],q[c+16>>2],b+80|0,f|0,b+48|0,g|0,0)|0;c=q[c+28>>2];if(c){continue}break}}Ni(q[b+12>>2]);c=1;if(!e){break a}Xi(a,b+48|0)}c=2}Ii=b+336|0;return c|0}function WK(a,b){var c=0,d=0,e=0,f=0,g=0,h=x(0),i=0,j=0,k=0,l=x(0),m=0,n=0;a:{if(!(o[a+248|0]&1)){Wi((q[b+16>>2]-q[b+12>>2]|0)/12|0,128,a+236|0,a+244|0,a+240|0);c=q[a+236>>2];q[a+240>>2]=c;d=q[b+12>>2];if((d|0)==q[b+16>>2]){break a}if(q[a+244>>2]!=(c|0)){e=q[d+8>>2];g=q[e+116>>2]&15;while(1){h=u[e+24>>2];d=w(f,12)+d|0;i=q[d>>2];d=q[d+4>>2];j=q[e>>2];k=q[e+4>>2];l=u[e+8>>2];m=q[e+16>>2];n=q[e+20>>2];q[a+240>>2]=c+128;o[c+112|0]=g|16;q[c+108>>2]=e;q[c+100>>2]=i;q[c+104>>2]=d;q[c+96>>2]=a;u[c+88>>2]=h;q[c+80>>2]=m;q[c+84>>2]=n;u[c+72>>2]=l;q[c+64>>2]=j;q[c+68>>2]=k;f=f+1|0;d=q[b+12>>2];if(f>>>0>=(q[b+16>>2]-d|0)/12>>>0){break a}e=q[(w(f,12)+d|0)+8>>2];g=g&-32|q[e+116>>2]&15;c=q[a+240>>2];if((c|0)!=q[a+244>>2]){continue}break}}J(51459,51308,533,51483);G()}J(51372,51308,493,51447);G()}}function y2(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0);c=Ii-96|0;Ii=c;b=_i(a,1,q[210437],0);f=u[b>>2];g=u[b+4>>2];a:{b:{if(f!=f|g!=g){break b}d=u[b+8>>2];if(d!=d){break b}d=u[b+12>>2];if(d==d){break a}}d=u[b+8>>2];h=u[b+12>>2];v[c- -64>>3]=g;v[c+80>>3]=h;v[c+72>>3]=d;v[c+56>>3]=f;q[c+48>>2]=1;Qi(a,134221,c+48|0)}e=_i(a,2,q[210437],0);f=u[e>>2];g=u[e+4>>2];c:{d:{if(f!=f|g!=g){break d}d=u[e+8>>2];if(d!=d){break d}h=u[e+12>>2];if(h==h){break c}}d=u[e+8>>2];h=u[e+12>>2];v[c+16>>3]=g;v[c+32>>3]=h;v[c+24>>3]=d;v[c+8>>3]=f;q[c>>2]=2;Qi(a,134221,c);h=u[e+12>>2];d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}i=u[b+12>>2];j=u[b>>2];k=u[b+4>>2];l=u[b+8>>2];b=yj(a,16);u[b+12>>2]=i+h;u[b+8>>2]=l+d;u[b+4>>2]=k+g;u[b>>2]=j+f;Zi(a,-1e4,134016);xj(a,-2);Ii=c+96|0;return 1}function q2(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0);c=Ii-96|0;Ii=c;b=_i(a,1,q[210437],0);f=u[b>>2];g=u[b+4>>2];a:{b:{if(f!=f|g!=g){break b}d=u[b+8>>2];if(d!=d){break b}d=u[b+12>>2];if(d==d){break a}}d=u[b+8>>2];h=u[b+12>>2];v[c- -64>>3]=g;v[c+80>>3]=h;v[c+72>>3]=d;v[c+56>>3]=f;q[c+48>>2]=1;Qi(a,134221,c+48|0)}e=_i(a,2,q[210437],0);f=u[e>>2];g=u[e+4>>2];c:{d:{if(f!=f|g!=g){break d}d=u[e+8>>2];if(d!=d){break d}h=u[e+12>>2];if(h==h){break c}}d=u[e+8>>2];h=u[e+12>>2];v[c+16>>3]=g;v[c+32>>3]=h;v[c+24>>3]=d;v[c+8>>3]=f;q[c>>2]=2;Qi(a,134221,c);h=u[e+12>>2];d=u[e+8>>2];g=u[e+4>>2];f=u[e>>2]}i=u[b+12>>2];j=u[b>>2];k=u[b+4>>2];l=u[b+8>>2];b=yj(a,16);u[b+12>>2]=i-h;u[b+8>>2]=l-d;u[b+4>>2]=k-g;u[b>>2]=j-f;Zi(a,-1e4,134016);xj(a,-2);Ii=c+96|0;return 1}function Gx(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=q[a+8>>2];a:{b:{if((e|0)>=16){f=q[a+12>>2];break b}g=-1;d=q[a>>2];h=q[a+4>>2];if(d>>>0>=h>>>0){break a}f=q[a+12>>2];c=e;while(1){if(f>>>c|0){q[a>>2]=h;e=c;break b}g=0;if(d>>>0>>0){e=d+1|0;q[a>>2]=e;g=r[d|0];d=e}e=c+8|0;q[a+8>>2]=e;f=g<>2]=f;g=(c|0)<17;c=e;if(g){continue}break}}c=s[((f&511)<<1)+b>>1];if(c){b=c>>>9|0;q[a+8>>2]=e-b;q[a+12>>2]=f>>>b;return c&511}c=f>>>1&21845|f<<1&43690;c=c>>>2&13107|c<<2&52428;c=c>>>4&3855|c<<4&61680;h=c<<8&65280|c>>>8;d=10;while(1){c=d;d=c+1|0;if((h|0)>=q[((c<<2)+b|0)+1056>>2]){continue}break}g=-1;if(c>>>0>15){break a}d=(c<<1)+b|0;d=((h>>>16-c|0)-s[d+1024>>1]|0)+s[d+1124>>1]|0;if(d>>>0>287|(c|0)!=r[(b+d|0)+1156|0]){break a}q[a+8>>2]=e-c;q[a+12>>2]=f>>>c;g=s[((d<<1)+b|0)+1444>>1]}return g}function zya(){q[74236]=Oi(71137);q[74237]=Li;q[74238]=Oi(71156);q[74239]=Li;q[74240]=Oi(71173);q[74241]=Li;q[74242]=Oi(71182);q[74243]=Li;q[74244]=Oi(71188);q[74245]=Li;q[74246]=Oi(71198);q[74247]=Li;q[74248]=Oi(71206);q[74249]=Li;q[74250]=Oi(71213);q[74251]=Li;q[74252]=Oi(71222);q[74253]=Li;q[74254]=Oi(71234);q[74255]=Li;q[74256]=Oi(71243);q[74257]=Li;q[74258]=Oi(71248);q[74259]=Li;q[74260]=Oi(71254);q[74261]=Li;q[74262]=Oi(71260);q[74263]=Li;q[74264]=Oi(71269);q[74265]=Li;q[74268]=Oi(71279);q[74269]=Li;q[74270]=Oi(71288);q[74271]=Li;q[74272]=Oi(71297);q[74273]=Li;q[74274]=Oi(71306);q[74275]=Li;q[74276]=Oi(71315);q[74277]=Li;q[74278]=Oi(71324);q[74279]=Li;q[74280]=Oi(71333);q[74281]=Li;q[74282]=Oi(71342);q[74283]=Li;q[74284]=Oi(71351);q[74285]=Li;q[74286]=Oi(71360);q[74287]=Li}function yya(){q[74288]=Oi(71631);q[74289]=Li;q[74290]=Oi(71650);q[74291]=Li;q[74292]=Oi(71667);q[74293]=Li;q[74294]=Oi(71676);q[74295]=Li;q[74296]=Oi(71682);q[74297]=Li;q[74298]=Oi(71692);q[74299]=Li;q[74300]=Oi(71700);q[74301]=Li;q[74302]=Oi(71707);q[74303]=Li;q[74304]=Oi(71716);q[74305]=Li;q[74306]=Oi(71728);q[74307]=Li;q[74308]=Oi(71737);q[74309]=Li;q[74310]=Oi(71742);q[74311]=Li;q[74312]=Oi(71748);q[74313]=Li;q[74314]=Oi(71754);q[74315]=Li;q[74316]=Oi(71763);q[74317]=Li;q[74320]=Oi(71773);q[74321]=Li;q[74322]=Oi(71782);q[74323]=Li;q[74324]=Oi(71791);q[74325]=Li;q[74326]=Oi(71800);q[74327]=Li;q[74328]=Oi(71809);q[74329]=Li;q[74330]=Oi(71818);q[74331]=Li;q[74332]=Oi(71827);q[74333]=Li;q[74334]=Oi(71836);q[74335]=Li;q[74336]=Oi(71845);q[74337]=Li;q[74338]=Oi(71854);q[74339]=Li}function xya(){q[74342]=Oi(72391);q[74343]=Li;q[74344]=Oi(72410);q[74345]=Li;q[74346]=Oi(72427);q[74347]=Li;q[74348]=Oi(72436);q[74349]=Li;q[74350]=Oi(72442);q[74351]=Li;q[74352]=Oi(72452);q[74353]=Li;q[74354]=Oi(72460);q[74355]=Li;q[74356]=Oi(72467);q[74357]=Li;q[74358]=Oi(72476);q[74359]=Li;q[74360]=Oi(72488);q[74361]=Li;q[74362]=Oi(72497);q[74363]=Li;q[74364]=Oi(72502);q[74365]=Li;q[74366]=Oi(72508);q[74367]=Li;q[74368]=Oi(72514);q[74369]=Li;q[74370]=Oi(72523);q[74371]=Li;q[74372]=Oi(72533);q[74373]=Li;q[74374]=Oi(72542);q[74375]=Li;q[74376]=Oi(72551);q[74377]=Li;q[74378]=Oi(72560);q[74379]=Li;q[74380]=Oi(72569);q[74381]=Li;q[74382]=Oi(72578);q[74383]=Li;q[74384]=Oi(72587);q[74385]=Li;q[74386]=Oi(72596);q[74387]=Li;q[74388]=Oi(72605);q[74389]=Li;q[74390]=Oi(72614);q[74391]=Li}function wya(){q[74392]=Oi(73131);q[74393]=Li;q[74394]=Oi(73150);q[74395]=Li;q[74396]=Oi(73167);q[74397]=Li;q[74398]=Oi(73176);q[74399]=Li;q[74400]=Oi(73182);q[74401]=Li;q[74402]=Oi(73192);q[74403]=Li;q[74404]=Oi(73200);q[74405]=Li;q[74406]=Oi(73207);q[74407]=Li;q[74408]=Oi(73216);q[74409]=Li;q[74410]=Oi(73228);q[74411]=Li;q[74412]=Oi(73237);q[74413]=Li;q[74414]=Oi(73242);q[74415]=Li;q[74416]=Oi(73248);q[74417]=Li;q[74418]=Oi(73254);q[74419]=Li;q[74420]=Oi(73263);q[74421]=Li;q[74424]=Oi(73273);q[74425]=Li;q[74426]=Oi(73282);q[74427]=Li;q[74428]=Oi(73291);q[74429]=Li;q[74430]=Oi(73300);q[74431]=Li;q[74432]=Oi(73309);q[74433]=Li;q[74434]=Oi(73318);q[74435]=Li;q[74436]=Oi(73327);q[74437]=Li;q[74438]=Oi(73336);q[74439]=Li;q[74440]=Oi(73345);q[74441]=Li;q[74442]=Oi(73354);q[74443]=Li}function vya(){q[74448]=Oi(79628);q[74449]=Li;q[74450]=Oi(79647);q[74451]=Li;q[74452]=Oi(79664);q[74453]=Li;q[74454]=Oi(79673);q[74455]=Li;q[74456]=Oi(79679);q[74457]=Li;q[74458]=Oi(79689);q[74459]=Li;q[74460]=Oi(79697);q[74461]=Li;q[74462]=Oi(79704);q[74463]=Li;q[74464]=Oi(79713);q[74465]=Li;q[74466]=Oi(79725);q[74467]=Li;q[74468]=Oi(79734);q[74469]=Li;q[74470]=Oi(79739);q[74471]=Li;q[74472]=Oi(79745);q[74473]=Li;q[74474]=Oi(79751);q[74475]=Li;q[74476]=Oi(79760);q[74477]=Li;q[74480]=Oi(79770);q[74481]=Li;q[74482]=Oi(79779);q[74483]=Li;q[74484]=Oi(79788);q[74485]=Li;q[74486]=Oi(79797);q[74487]=Li;q[74488]=Oi(79806);q[74489]=Li;q[74490]=Oi(79815);q[74491]=Li;q[74492]=Oi(79824);q[74493]=Li;q[74494]=Oi(79833);q[74495]=Li;q[74496]=Oi(79842);q[74497]=Li;q[74498]=Oi(79851);q[74499]=Li}function uya(){q[74500]=Oi(80401);q[74501]=Li;q[74502]=Oi(80420);q[74503]=Li;q[74504]=Oi(80437);q[74505]=Li;q[74506]=Oi(80446);q[74507]=Li;q[74508]=Oi(80452);q[74509]=Li;q[74510]=Oi(80462);q[74511]=Li;q[74512]=Oi(80470);q[74513]=Li;q[74514]=Oi(80477);q[74515]=Li;q[74516]=Oi(80486);q[74517]=Li;q[74518]=Oi(80498);q[74519]=Li;q[74520]=Oi(80507);q[74521]=Li;q[74522]=Oi(80512);q[74523]=Li;q[74524]=Oi(80518);q[74525]=Li;q[74526]=Oi(80524);q[74527]=Li;q[74528]=Oi(80533);q[74529]=Li;q[74532]=Oi(80543);q[74533]=Li;q[74534]=Oi(80552);q[74535]=Li;q[74536]=Oi(80561);q[74537]=Li;q[74538]=Oi(80570);q[74539]=Li;q[74540]=Oi(80579);q[74541]=Li;q[74542]=Oi(80588);q[74543]=Li;q[74544]=Oi(80597);q[74545]=Li;q[74546]=Oi(80606);q[74547]=Li;q[74548]=Oi(80615);q[74549]=Li;q[74550]=Oi(80624);q[74551]=Li}function tya(){q[74552]=Oi(80906);q[74553]=Li;q[74554]=Oi(80925);q[74555]=Li;q[74556]=Oi(80942);q[74557]=Li;q[74558]=Oi(80951);q[74559]=Li;q[74560]=Oi(80957);q[74561]=Li;q[74562]=Oi(80967);q[74563]=Li;q[74564]=Oi(80975);q[74565]=Li;q[74566]=Oi(80982);q[74567]=Li;q[74568]=Oi(80991);q[74569]=Li;q[74570]=Oi(81003);q[74571]=Li;q[74572]=Oi(81012);q[74573]=Li;q[74574]=Oi(81017);q[74575]=Li;q[74576]=Oi(81023);q[74577]=Li;q[74578]=Oi(81029);q[74579]=Li;q[74580]=Oi(81038);q[74581]=Li;q[74584]=Oi(81048);q[74585]=Li;q[74586]=Oi(81057);q[74587]=Li;q[74588]=Oi(81066);q[74589]=Li;q[74590]=Oi(81075);q[74591]=Li;q[74592]=Oi(81084);q[74593]=Li;q[74594]=Oi(81093);q[74595]=Li;q[74596]=Oi(81102);q[74597]=Li;q[74598]=Oi(81111);q[74599]=Li;q[74600]=Oi(81120);q[74601]=Li;q[74602]=Oi(81129);q[74603]=Li}function Vya(){q[73870]=Oi(57967);q[73871]=Li;q[73872]=Oi(57986);q[73873]=Li;q[73874]=Oi(58003);q[73875]=Li;q[73876]=Oi(58012);q[73877]=Li;q[73878]=Oi(58018);q[73879]=Li;q[73880]=Oi(58028);q[73881]=Li;q[73882]=Oi(58036);q[73883]=Li;q[73884]=Oi(58043);q[73885]=Li;q[73886]=Oi(58052);q[73887]=Li;q[73888]=Oi(58064);q[73889]=Li;q[73890]=Oi(58073);q[73891]=Li;q[73892]=Oi(58078);q[73893]=Li;q[73894]=Oi(58084);q[73895]=Li;q[73896]=Oi(58090);q[73897]=Li;q[73898]=Oi(58099);q[73899]=Li;q[73900]=Oi(58109);q[73901]=Li;q[73902]=Oi(58118);q[73903]=Li;q[73904]=Oi(58127);q[73905]=Li;q[73906]=Oi(58136);q[73907]=Li;q[73908]=Oi(58145);q[73909]=Li;q[73910]=Oi(58154);q[73911]=Li;q[73912]=Oi(58163);q[73913]=Li;q[73914]=Oi(58172);q[73915]=Li;q[73916]=Oi(58181);q[73917]=Li;q[73918]=Oi(58190);q[73919]=Li}function Uya(){q[73920]=Oi(58539);q[73921]=Li;q[73922]=Oi(58558);q[73923]=Li;q[73924]=Oi(58575);q[73925]=Li;q[73926]=Oi(58584);q[73927]=Li;q[73928]=Oi(58590);q[73929]=Li;q[73930]=Oi(58600);q[73931]=Li;q[73932]=Oi(58608);q[73933]=Li;q[73934]=Oi(58615);q[73935]=Li;q[73936]=Oi(58624);q[73937]=Li;q[73938]=Oi(58636);q[73939]=Li;q[73940]=Oi(58645);q[73941]=Li;q[73942]=Oi(58650);q[73943]=Li;q[73944]=Oi(58656);q[73945]=Li;q[73946]=Oi(58662);q[73947]=Li;q[73948]=Oi(58671);q[73949]=Li;q[73952]=Oi(58681);q[73953]=Li;q[73954]=Oi(58690);q[73955]=Li;q[73956]=Oi(58699);q[73957]=Li;q[73958]=Oi(58708);q[73959]=Li;q[73960]=Oi(58717);q[73961]=Li;q[73962]=Oi(58726);q[73963]=Li;q[73964]=Oi(58735);q[73965]=Li;q[73966]=Oi(58744);q[73967]=Li;q[73968]=Oi(58753);q[73969]=Li;q[73970]=Oi(58762);q[73971]=Li}function Cya(){q[74080]=Oi(68198);q[74081]=Li;q[74082]=Oi(68217);q[74083]=Li;q[74084]=Oi(68234);q[74085]=Li;q[74086]=Oi(68243);q[74087]=Li;q[74088]=Oi(68249);q[74089]=Li;q[74090]=Oi(68259);q[74091]=Li;q[74092]=Oi(68267);q[74093]=Li;q[74094]=Oi(68274);q[74095]=Li;q[74096]=Oi(68283);q[74097]=Li;q[74098]=Oi(68295);q[74099]=Li;q[74100]=Oi(68304);q[74101]=Li;q[74102]=Oi(68309);q[74103]=Li;q[74104]=Oi(68315);q[74105]=Li;q[74106]=Oi(68321);q[74107]=Li;q[74108]=Oi(68330);q[74109]=Li;q[74112]=Oi(68340);q[74113]=Li;q[74114]=Oi(68349);q[74115]=Li;q[74116]=Oi(68358);q[74117]=Li;q[74118]=Oi(68367);q[74119]=Li;q[74120]=Oi(68376);q[74121]=Li;q[74122]=Oi(68385);q[74123]=Li;q[74124]=Oi(68394);q[74125]=Li;q[74126]=Oi(68403);q[74127]=Li;q[74128]=Oi(68412);q[74129]=Li;q[74130]=Oi(68421);q[74131]=Li}function Bya(){q[74132]=Oi(69604);q[74133]=Li;q[74134]=Oi(69623);q[74135]=Li;q[74136]=Oi(69640);q[74137]=Li;q[74138]=Oi(69649);q[74139]=Li;q[74140]=Oi(69655);q[74141]=Li;q[74142]=Oi(69665);q[74143]=Li;q[74144]=Oi(69673);q[74145]=Li;q[74146]=Oi(69680);q[74147]=Li;q[74148]=Oi(69689);q[74149]=Li;q[74150]=Oi(69701);q[74151]=Li;q[74152]=Oi(69710);q[74153]=Li;q[74154]=Oi(69715);q[74155]=Li;q[74156]=Oi(69721);q[74157]=Li;q[74158]=Oi(69727);q[74159]=Li;q[74160]=Oi(69736);q[74161]=Li;q[74164]=Oi(69746);q[74165]=Li;q[74166]=Oi(69755);q[74167]=Li;q[74168]=Oi(69764);q[74169]=Li;q[74170]=Oi(69773);q[74171]=Li;q[74172]=Oi(69782);q[74173]=Li;q[74174]=Oi(69791);q[74175]=Li;q[74176]=Oi(69800);q[74177]=Li;q[74178]=Oi(69809);q[74179]=Li;q[74180]=Oi(69818);q[74181]=Li;q[74182]=Oi(69827);q[74183]=Li}function Aya(){q[74184]=Oi(70026);q[74185]=Li;q[74186]=Oi(70045);q[74187]=Li;q[74188]=Oi(70062);q[74189]=Li;q[74190]=Oi(70071);q[74191]=Li;q[74192]=Oi(70077);q[74193]=Li;q[74194]=Oi(70087);q[74195]=Li;q[74196]=Oi(70095);q[74197]=Li;q[74198]=Oi(70102);q[74199]=Li;q[74200]=Oi(70111);q[74201]=Li;q[74202]=Oi(70123);q[74203]=Li;q[74204]=Oi(70132);q[74205]=Li;q[74206]=Oi(70137);q[74207]=Li;q[74208]=Oi(70143);q[74209]=Li;q[74210]=Oi(70149);q[74211]=Li;q[74212]=Oi(70158);q[74213]=Li;q[74216]=Oi(70168);q[74217]=Li;q[74218]=Oi(70177);q[74219]=Li;q[74220]=Oi(70186);q[74221]=Li;q[74222]=Oi(70195);q[74223]=Li;q[74224]=Oi(70204);q[74225]=Li;q[74226]=Oi(70213);q[74227]=Li;q[74228]=Oi(70222);q[74229]=Li;q[74230]=Oi(70231);q[74231]=Li;q[74232]=Oi(70240);q[74233]=Li;q[74234]=Oi(70249);q[74235]=Li}function _x(a,b){var c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;e=q[a+48>>2];a:{b:{c=q[a+16>>2];if((c|0)!=285){if((c|0)!=40){break b}c=q[a+4>>2];Vj(a);pl(a,b,0);Yo(a,41,40,c);Nm(q[a+48>>2],b);break a}c=q[a+24>>2];Vj(a);f=q[a+48>>2];if((Px(f,c,b,1)|0)!=8){break a}q[b+8>>2]=gq(f,c);break a}Sj(a,142237)}while(1){c:{d:{e:{f:{c=q[a+16>>2];g:{if((c|0)<=90){switch(c-40|0){case 18:break d;case 6:break f;case 0:break g;default:break c}}if((c|0)==91){break e}if((c|0)==123){break g}if((c|0)!=286){break c}}Mm(e,b);SF(a,b);continue}bz(a,b);continue}rn(e,b);uC(a,d+8|0);lF(e,b,d+8|0);continue}Vj(a);if(q[a+16>>2]!=285){c=q[a+52>>2];q[d>>2]=tl(a,285);Sj(a,oj(c,141919,d))}c=q[a+24>>2];Vj(a);c=gq(q[a+48>>2],c);q[d+24>>2]=-1;q[d+28>>2]=-1;q[d+16>>2]=c;q[d+8>>2]=4;jZ(e,b,d+8|0);SF(a,b);continue}break}Ii=d+32|0}function tA(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=s[d>>1];q[e+12>>2]=-1;p[e+8>>1]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(201328,201191,229,201336);G()}p[((f<<4)+g|0)+8>>1]=s[d>>1];return}J(201340,201191,537,201402);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function rt(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(114346,114192,229,114354);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(114358,114192,537,114420);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function UI(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(201328,201191,229,201336);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(201340,201191,537,201402);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function QI(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(120563,120426,229,120571);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(120575,120426,537,120637);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function KI(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(124001,123864,229,124009);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(124013,123864,537,124075);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function EB(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Ii-32|0;Ii=d;c=1;a:{b:{c:{d:{if(!b){break d}q[b+148>>2]=q[b+148>>2]&-32769;e=q[b+140>>2];f=e;if(e&32768){break d}f=f&32767;e=q[a+1036>>2];if(f>>>0>=q[a+1040>>2]-e>>2>>>0){break c}if(q[e+(f<<2)>>2]!=(b|0)){break b}h=q[b+84>>2];g=q[h+4>>2];if(!g){break d}f=0;while(1){j=q[h>>2]+w(i,96)|0;c=q[j+16>>2];k=q[c+100>>2];e=((k&65536)>>>16|0)+f|0;if(e>>>0>t[b+152>>2]){break a}l=q[c+44>>2];if(l){g=q[a+8>>2];q[d+12>>2]=b;q[d+8>>2]=g;q[d+16>>2]=q[((q[j+20>>2]<<2)+a|0)+12>>2];c=q[c+16>>2];q[d+24>>2]=((f<<2)+b|0)+156&k<<15>>31;q[d+20>>2]=c;if(Mi[l|0](d+8|0)|0){c=0;break d}g=q[h+4>>2]}c=1;f=e;i=i+1|0;if(i>>>0>>0){continue}break}}Ii=d+32|0;return c}J(12419,9962,479,9454);G()}J(8193,7192,1043,11887);G()}J(8018,7192,1057,11887);G()}function xla(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-336|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;e=kj(a,1,0);q[b+76>>2]=0;q[b+72>>2]=0;a:{b:{c=yv(q[74445],e,b+76|0,b+72|0);c:{if(c){if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){break b}d=Oi(e);e=Li;q[b+32>>2]=aj(d,e);q[b+24>>2]=d;q[b+28>>2]=e;q[b+16>>2]=c;sj(b+80|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+16|0);q[b>>2]=b+80;a=Qi(a,75832,b);break c}c=Oi(76949);q[b+96>>2]=0;q[b+100>>2]=0;o[b+92|0]=1;q[b+88>>2]=0;q[b+80>>2]=c;q[b+84>>2]=Li;q[b+68>>2]=0;Lw(q[b+72>>2],b+80|0,1,b+68|0);q[b+64>>2]=0;q[b+60>>2]=0;Wo(q[b+68>>2],b- -64|0,b+60|0);Ti(q[b+64>>2],q[b+76>>2],q[b+72>>2]);q[b+52>>2]=1;q[b+48>>2]=q[b+68>>2];vz(a,b+48|0);if((d+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}a=1}Ii=b+336|0;return a|0}J(76560,76581,373,76944);G()}J(76954,76581,392,76944);G()}function qJ(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{c:{d:{g=q[a+16>>2];f=q[a+8>>2];if(q[a+24>>2]!=((g-f|0)/280|0)){d=q[a+4>>2];e:{if(!d){break e}e=q[q[a>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,280)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+272>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((g|0)!=(d|0)){q[a+12>>2]=d+280;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,280)+f|0;q[a+20>>2]=q[d+272>>2]}q[d>>2]=b;Ti(d+8|0,c,264);q[d+272>>2]=-1;c=q[a+8>>2];b=q[a>>2]+((b>>>0)%t[a+4>>2]<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=c+w(e,280)|0;e=q[b+272>>2];if((e|0)!=-1){continue}break}q[b+272>>2]=(d-c|0)/280;break a}J(114346,114192,229,114354);G()}Ti((w(e,280)+f|0)+8|0,c,264);return}J(114358,114192,537,114420);G()}q[b>>2]=(d-c|0)/280}q[a+24>>2]=q[a+24>>2]+1}function P7(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]>>4;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){b=jj(a,1);a:{if(!(b-2>>>0<5|!b)){q[c+4>>2]=b;q[c>>2]=115561;b=Qi(a,115643,c);break a}q[c+32>>2]=b;q[c+36>>2]=0;q[c+24>>2]=1;b=q[d+4>>2];if((b|0)!=q[d+8>>2]){q[d+4>>2]=b+40;d=q[c+60>>2];q[b+32>>2]=q[c+56>>2];q[b+36>>2]=d;d=q[c+52>>2];q[b+24>>2]=q[c+48>>2];q[b+28>>2]=d;d=q[c+44>>2];q[b+16>>2]=q[c+40>>2];q[b+20>>2]=d;d=q[c+36>>2];q[b+8>>2]=q[c+32>>2];q[b+12>>2]=d;d=q[c+28>>2];q[b>>2]=q[c+24>>2];q[b+4>>2]=d;b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(e|0)){break a}J(115568,115465,727,115680);G()}q[c+16>>2]=(q[d+8>>2]-q[d>>2]|0)/40;b=Qi(a,115614,c+16|0)}Ii=c- -64|0;return b|0}J(115568,115465,478,119531);G()}function I7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii+ -64|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){c=jj(a,1);a:{if(!(c-2>>>0<5|!c)){q[b+4>>2]=c;q[b>>2]=115561;e=Qi(a,115525,b);break a}q[b+32>>2]=c;q[b+36>>2]=0;q[b+24>>2]=0;c=q[d+4>>2];if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;d=q[b+60>>2];q[c+32>>2]=q[b+56>>2];q[c+36>>2]=d;d=q[b+52>>2];q[c+24>>2]=q[b+48>>2];q[c+28>>2]=d;d=q[b+44>>2];q[c+16>>2]=q[b+40>>2];q[c+20>>2]=d;d=q[b+36>>2];q[c+8>>2]=q[b+32>>2];q[c+12>>2]=d;d=q[b+28>>2];q[c>>2]=q[b+24>>2];q[c+4>>2]=d;if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){break a}J(115568,115465,681,115589);G()}q[b+16>>2]=(q[d+8>>2]-q[d>>2]|0)/40;e=Qi(a,115614,b+16|0)}Ii=b- -64|0;return e|0}J(115568,115465,478,119531);G()}function Maa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=Ii-32|0;Ii=f;g=c;d=q[b+28>>2];e=q[b+24>>2];a:{if((d|0)!=(e|0)){b=d-e|0;a=(b|0)>-1?b:-1;d=e-d|0;b=w((a|0)<1?a:1,((b|0)<(d|0)?d:b)>>>3|0);d=b>>>0>1?b:1;b=0;while(1){a=q[e+(b<<3)>>2];if(q[(e+(b<<3)|0)+4>>2]==(c|0)){break a}b=b+1|0;if((d|0)!=(b|0)){continue}break}}a=-1}a=q[(a<<2)+148176>>2];b=sa(a|0,327682)|0;o[g+145|0]=b;Pb(a|0,c|0,b&255)|0;b=sa(a|0,327684)|0;b=b>>>0<4?b:4;o[c+147|0]=b|r[c+147|0]&128;Qb(a|0,c+136|0,b|0)|0;b=sa(a|0,327683)|0;b=b>>>0<32?b:32;o[c+146|0]=b;Sb(a|0,f|0,b|0)|0;a=r[c+146|0];if(a){e=a>>>0>1?a:1;b=0;while(1){a=1<>>3&536870908)+c|0;q[d+128>>2]=a|q[d+128>>2];break b}d=(b>>>3&536870908)+c|0;q[d+128>>2]=q[d+128>>2]&(a^-1)}b=b+1|0;if((e|0)!=(b|0)){continue}break}}Ii=f+32|0}function nB(a,b,c,d,e){var f=0,g=0,h=x(0),i=0,j=0;f=Ii-96|0;Ii=f;g=r[e+40|0];q[a+104>>2]=0;p[a+108>>1]=s[a+108>>1]&65534|g;g=q[e+8>>2];i=q[e+12>>2];a:{if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){q[a>>2]=g;q[a+4>>2]=i;b=q[e+20>>2];q[a+8>>2]=q[e+16>>2];q[a+12>>2]=b;b=q[e+28>>2];q[a+16>>2]=q[e+24>>2];q[a+20>>2]=b;b=q[e+36>>2];q[a+24>>2]=q[e+32>>2];q[a+28>>2]=b;u[f>>2]=u[d>>2];u[f+4>>2]=u[d+4>>2];u[f+8>>2]=u[d+8>>2];u[f+12>>2]=u[d+12>>2];Gp(f+24|0,f);Ti(a+32|0,f+24|0,72);break a}b:{if((b|0)==(g|0)&(c|0)==(i|0)){h=u[d>>2];break b}if(q[e+16>>2]==(b|0)&q[e+20>>2]==(c|0)){h=u[d+4>>2];break b}if(q[e+24>>2]==(b|0)&q[e+28>>2]==(c|0)){h=u[d+8>>2];break b}j=-1;if((b|0)!=q[e+32>>2]|(c|0)!=q[e+36>>2]){break a}h=u[d+12>>2]}b=f+24|0;q[b>>2]=0;v[b+8>>3]=h;Ti(a+32|0,f+24|0,72);j=0}Ii=f+96|0;return j}function bha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-128|0;Ii=b;g=nj(b+104|0,a,0,81141,462);c=q[q[jk(a)+80>>2]+8>>2];q[b+88>>2]=0;q[b+92>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;Ml(a,1,c,81003,b+100|0,b- -64|0,0);c=q[b+100>>2];e=$j(a,2);d=Li;f=d;d=oB(c,e,d);a:{if((d|0)==-1){q[b>>2]=aj(e,f);a=Kj(g,81377,b);break a}f=c;c=Uj(a,3);Tha(f,d,(c|0)!=0);q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;if(qm(a,b+32|0)){q[b+24>>2]=d;a=0;q[b+28>>2]=(c|0)!=0;c=q[60580];e=q[c+8>>2];d=q[c+12>>2];q[b+88>>2]=0;q[b+92>>2]=0;c=vk(b+32|0,b- -64|0,e,d,0,c,b+24|0,8);if(!c){break a}q[b+16>>2]=q[q[60580]+4>>2];q[b+20>>2]=c;Pi(4,81369,81636,b+16|0);break a}a=Qi(a,81681,0)}mj(g);Ii=b+128|0;return a|0}function PJ(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;a:{b:{c:{d:{e:{f=b&65535;g=q[a+32>>2];if(f>>>0<(q[a+36>>2]-g|0)/592>>>0){if(s[(g+w(f,592)|0)+568>>1]!=(b>>>16|0)){break e}g=g+w(f,592)|0;if(s[g+570>>1]!=(b&65535)){break d}b=q[g+508>>2];f:{if(b){f=q[a+312>>2]-q[a+308>>2]>>3;break f}b=q[a+328>>2];j=q[a+332>>2];if((b|0)==(j|0)){return}f=q[a+312>>2]-q[a+308>>2]>>3;h=q[a+324>>2];k=b-h>>2;i=f+k|0;if(i>>>0>j-h>>2>>>0){break c}q[a+328>>2]=(i<<2)+h;if(i>>>0<=k>>>0){break a}q[g+508>>2]=b}if(e>>>0>=f>>>0){break b}if(d>>>0<=e>>>0){while(1){q[((d&65535)<<2)+b>>2]=c;d=d+1|0;if((d&65535)>>>0<=e>>>0){continue}break}}return}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(202185,201514,506,202204);G()}J(199870,199542,915,199913);G()}J(201665,201514,479,201676);G()}function LH(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,r=0;l=Ii-16|0;Ii=l;j=q[a+104>>2];h=q[a+100>>2];q[f>>2]=-1;i=j-h|0;m=(i|0)/40|0;a:{if(!i){break a}b:{c:{if((h|0)!=(j|0)){n=1;o=m>>>0>1?m:1;while(1){h=w(k,40)+h|0;i=q[h>>2];j=q[i+8>>2];i=q[i+12>>2];q[l+12>>2]=s[q[h>>2]+24>>1];r=h+8|0;d:{if((b|0)!=(j|0)|(c|0)!=(i|0)){if((b|0)!=q[h+8>>2]|(c|0)!=q[h+12>>2]){break d}h=0;break c}q[e>>2]=r;j=b;i=c;break b}if(q[h+16>>2]==(b|0)&q[h+20>>2]==(c|0)){h=1;break c}if(q[h+24>>2]==(b|0)&q[h+28>>2]==(c|0)){h=2;break c}if(q[h+32>>2]==(b|0)&q[h+36>>2]==(c|0)){h=3;break c}k=k+1|0;n=m>>>0>k>>>0;if((k|0)==(o|0)){break a}h=q[a+100>>2];if((q[a+104>>2]-h|0)/40>>>0>k>>>0){continue}break}}J(114155,114013,479,114166);G()}q[f>>2]=h}q[d>>2]=j;q[d+4>>2]=i;p[g>>1]=q[l+12>>2]}Ii=l+16|0;return n}function xG(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{b:{c:{d:{e:{if(mz(a)){if(q[b>>2]!=1){break d}q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;p[d>>1]=2;q[d+4>>2]=q[nv(b)>>2];b=c&65535;p[d+2>>1]=(b<<24|b<<8)>>>16;b=Qw(a,d,16);break e}if(!lz(a)){break b}if(q[b>>2]!=2){break c}q[d+24>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;p[d>>1]=10;b=Zs(b);e=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=e;e=q[b+12>>2];q[d+16>>2]=q[b+8>>2];q[d+20>>2]=e;b=c&65535;p[d+2>>1]=(b<<24|b<<8)>>>16;b=Qw(a,d,28)}a=0;if((b|0)!=-1){break a}if((im(173656,408,q[240513])|0)==-32){break a}if((im(173656,408,q[240513])|0)==-3){break a}a=im(173656,410,q[240513]);break a}J(173743,173656,382,173863);G()}J(173780,173656,393,173863);G()}Pi(4,173567,173871,0);a=-2}Ii=d+32|0;return a}function wr(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(11310,11185,229,11318);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(11322,11185,537,11384);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function vr(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(30648,29648,229,30656);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(30660,29648,537,30722);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function kJ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(27012,26666,229,27020);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(27024,26666,537,27086);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function iJ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(22695,22570,229,22703);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(22707,22570,537,22769);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function Nl(a){var b=x(0),c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;e=(Pza(a),Lza(2));d=e&2147483647;a:{if(d>>>0<=1061752794){b=x(1);if(d>>>0<964689920){break a}b=Wn(+a);break a}if(d>>>0<=1081824209){f=+a;if(d>>>0>=1075235812){b=x(-Wn(((e|0)>-1?-3.141592653589793:3.141592653589793)+f));break a}if((e|0)<=-1){b=Un(f+1.5707963267948966);break a}b=Un(1.5707963267948966-f);break a}if(d>>>0<=1088565717){if(d>>>0>=1085271520){b=Wn(((e|0)>-1?-6.283185307179586:6.283185307179586)+ +a);break a}if((e|0)<=-1){b=Un(-4.71238898038469- +a);break a}b=Un(+a+ -4.71238898038469);break a}b=x(a-a);if(d>>>0>=2139095040){break a}b:{switch(qC(a,c+8|0)&3){case 0:b=Wn(v[c+8>>3]);break a;case 1:b=Un(-v[c+8>>3]);break a;case 2:b=x(-Wn(v[c+8>>3]));break a;default:break b}}b=Un(v[c+8>>3])}a=b;Ii=c+16|0;return a}function FI(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=q[c>>2];q[d+8>>2]=-1;q[d+4>>2]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(125023,124886,229,125031);G()}q[(w(e,12)+f|0)+4>>2]=q[c>>2];return}J(125035,124886,537,125097);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function ip(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=Ii-1040|0;Ii=e;l=hj(c);q[e+4>>2]=0;i=e+12|0;q[e>>2]=i;q[e+8>>2]=a;h=an(b,c);if(h){k=e+1036|0;while(1){g=h-b|0;if(g){while(1){g=g-1|0;f=q[e>>2];if(k>>>0<=f>>>0){ml(e);f=q[e>>2]}j=r[b|0];q[e>>2]=f+1;o[f|0]=j;b=b+1|0;if(g){continue}break}}b=d;g=hj(b);if(g){while(1){g=g-1|0;f=q[e>>2];if(k>>>0<=f>>>0){ml(e);f=q[e>>2]}j=r[b|0];q[e>>2]=f+1;o[f|0]=j;b=b+1|0;if(g){continue}break}}b=h+l|0;h=an(b,c);if(h){continue}break}}g=hj(b);if(g){c=e+1036|0;while(1){g=g-1|0;f=q[e>>2];if(c>>>0<=f>>>0){ml(e);f=q[e>>2]}d=r[b|0];q[e>>2]=f+1;o[f|0]=d;b=b+1|0;if(g){continue}break}}b=q[e>>2]-i|0;a:{if(!b){f=q[e+4>>2];break a}bj(q[e+8>>2],i,b);q[e>>2]=i;f=q[e+4>>2]+1|0;q[e+4>>2]=f}fm(q[e+8>>2],f);q[e+4>>2]=1;a=uj(a,-1,0);Ii=e+1040|0;return a}function Hoa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;a:{b:{e=q[a+8>>2];d=q[e+36>>2];b=q[e+32>>2];if((d|0)==(b|0)){break b}c=q[q[a+16>>2]>>2];f=d-b>>2;d=0;while(1){c:{if(q[b+(d<<2)>>2]==(c|0)){g=q[q[q[a+4>>2]+80>>2]>>2];a=q[c+16>>2];if(a){cj(g,a)}a=q[c+28>>2];b=q[c+24>>2];if((a|0)==(b|0)){b=a;break c}f=0;while(1){h=q[(f<<2)+b>>2];if(h){cj(g,h);b=q[c+24>>2];a=q[c+28>>2]}f=f+1|0;if(f>>>0>2>>>0){continue}break}break c}d=d+1|0;if(f>>>0>d>>>0){continue}break b}break}q[c+28>>2]=b;oK(q[c+8>>2]);if(c){d:{if(o[c+36|0]&1){break d}a=q[c+24>>2];if(!a){break d}Ni(a)}Ni(c)}a=q[e+36>>2];b=q[e+32>>2];if(a-b>>2>>>0<=d>>>0){break a}q[b+(d<<2)>>2]=q[a-4>>2];a=q[e+36>>2]-4|0;q[e+36>>2]=a;if(a>>>0>=t[e+32>>2]){break b}J(41109,40745,516,41099);G()}return 0}J(41084,40745,513,41099);G()}function yI(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=Ii-1072|0;Ii=f;k=q[a+48>>2];Gj(k);wn(f+1040|0,0);Cl(f+1040|0,b,hj(b));Cl(f+1040|0,c,hj(c));l=ro(f+1040|0);m=Li;h=Oi(b);i=Li;b=q[a+20>>2];a:{if(b){c=2;n=a+16|0;b=q[q[n>>2]+(Cza(h,i,b)<<2)>>2];if((b|0)==-1){break a}j=q[a+24>>2];while(1){g=w(b,136)+j|0;if(q[g>>2]!=(h|0)|q[g+4>>2]!=(i|0)){b=q[g+128>>2];if((b|0)!=-1){continue}break a}break}g=w(b,136)+j|0;if((l|0)!=q[g+80>>2]|q[g+84>>2]!=(m|0)){break a}if(o[g+121|0]&1){c=3;Pi(3,166128,166824,0);break a}b=w(b,136)+j|0;q[b+88>>2]=Jk();q[b+92>>2]=Li;AI(q[a>>2],l,m,f+16|0);a=dl(f+16|0,166145);if(a){q[d>>2]=a;o[g+120|0]=r[g+120|0]+1;a=q[b+108>>2];q[e>>2]=q[b+104>>2];q[e+4>>2]=a;c=0;break a}q[f>>2]=f+16;Pi(4,166128,166844,f);ZI(n,h,i)}c=2}Bj(k);Ii=f+1072|0;return c}function vJ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=r[c|0];q[d+8>>2]=-1;o[d+4|0]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(150222,150097,229,150230);G()}o[(w(e,12)+f|0)+4|0]=r[c|0];return}J(150234,150097,537,150296);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function Zga(a,b,c,d){var e=0;e=b;a:{b:{switch(b|0){case 3:case 5:case 11:case 15:case 16:case 18:case 21:e=21;if(Mi[q[75007]](a,21)|0){break a}e=16;if(Mi[q[75007]](a,16)|0){break a}e=15;if(Mi[q[75007]](a,15)|0){break a}if((c|0)==(d|0)){e=11;if(Mi[q[75007]](a,11)|0){break a}}return Mi[q[75007]](a,b)|0?b:3;case 2:case 4:case 9:case 12:case 17:e=17;if(Mi[q[75007]](a,17)|0){break a}e=12;if(Mi[q[75007]](a,12)|0){break a}if((c|0)==(d|0)){e=9;if(Mi[q[75007]](a,9)|0){break a}}return Mi[q[75007]](a,b)|0?b:2;case 1:case 20:e=20;if(Mi[q[75007]](a,20)|0){break a}e=14;if(Mi[q[75007]](a,14)|0){break a}return Mi[q[75007]](a,b)|0?b:1;case 0:case 19:break b;default:break a}}e=19;if(Mi[q[75007]](a,19)|0){break a}e=13;if(Mi[q[75007]](a,13)|0){break a}e=Mi[q[75007]](a,b)|0?b:0}return e}function Sm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-16|0;Ii=g;i=Oi(b);j=Li;e=q[a+4>>2];f=q[a>>2];a:{if((e|0)==(f|0)){break a}d=e-f|0;h=(d|0)>-1?d:-1;e=f-e|0;d=w((h|0)<1?h:1,((d|0)<(e|0)?e:d)>>>4|0);e=d>>>0>1?d:1;d=0;while(1){b:{h=f+(d<<4)|0;if((i|0)==q[h>>2]&q[h+4>>2]==(j|0)){d=q[(f+(d<<4)|0)+8>>2];e=q[a+16>>2];if(d>>>0>2]-e>>>0){break b}J(155013,154885,479,155024);G()}d=d+1|0;if((e|0)!=(d|0)){continue}break a}break}if(!e){break a}d=d+e|0;f=hj(d);q[g+12>>2]=0;k=nu(d,g+12|0);e=d+f|0;f=q[g+12>>2];if(!((e|0)!=(f|0)|(d|0)==(f|0))){c=x(k);break a}q[g>>2]=d;Pi(3,154668,155156,g)}q[g+8>>2]=0;d=q[210909];c:{if(!d){break c}while(1){d:{f=q[d+20>>2];if(f){if(Mi[f|0](a,b,c,g+8|0)|0){break d}}d=q[d+24>>2];if(d){continue}break c}break}c=u[g+8>>2]}Ii=g+16|0;return c}function HI(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=r[c|0];q[d+8>>2]=-1;o[d+4|0]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(124001,123864,229,124009);G()}o[(w(e,12)+f|0)+4|0]=r[c|0];return}J(124013,123864,537,124075);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function BA(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=r[d|0];q[e+12>>2]=-1;o[e+8|0]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(28472,28335,229,28480);G()}o[((f<<4)+g|0)+8|0]=r[d|0];return}J(28484,28335,537,28546);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function gp(a,b){var c=0,d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;c=0;c:{d:{e:{switch(q[b+8>>2]-6|0){case 0:q[q[b>>2]+12>>2]=q[q[a+8>>2]-16>>2];break d;case 1:q[q[b>>2]+12>>2]=q[q[a+8>>2]-16>>2];break d;case 2:break e;default:break c}}c=q[q[a+8>>2]-16>>2];d=q[b>>2];q[d+80>>2]=5;q[d+72>>2]=c}c=1;d=q[q[a+8>>2]-16>>2];if(!(r[d+5|0]&3)){break c}b=q[b>>2];if(!(r[b+5|0]&4)){break c}go(a,b,d)}q[a+8>>2]=q[a+8>>2]-16;return c}function tJ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=q[c>>2];q[d+8>>2]=-1;q[d+4>>2]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(44007,43882,229,44015);G()}q[(w(e,12)+f|0)+4>>2]=q[c>>2];return}J(44019,43882,537,44081);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function oJ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=q[c>>2];q[d+8>>2]=-1;q[d+4>>2]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(24340,24203,229,24348);G()}q[(w(e,12)+f|0)+4>>2]=q[c>>2];return}J(24352,24203,537,24414);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function HA(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{g=q[a+16>>2];f=q[a+8>>2];if(q[a+24>>2]!=g-f>>4){d=q[a+4>>2];c:{if(!d){break c}e=q[q[a>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((e|0)==-1){break c}while(1){d=(e<<4)+f|0;if(q[d>>2]==(b|0)){break b}e=q[d+12>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];d:{if((g|0)!=(d|0)){q[a+12>>2]=d+16;break d}d=q[a+20>>2];if((d|0)==-1){break a}d=(d<<4)+f|0;q[a+20>>2]=q[d+12>>2]}q[d>>2]=b;q[d+4>>2]=q[c>>2];p[d+8>>1]=s[c+4>>1];q[d+12>>2]=-1;c=q[a+8>>2];b=q[a>>2]+((b>>>0)%t[a+4>>2]<<2)|0;e=q[b>>2];if((e|0)!=-1){while(1){b=c+(e<<4)|0;e=q[b+12>>2];if((e|0)!=-1){continue}break}b=b+12|0}q[b>>2]=d-c>>4;q[a+24>>2]=q[a+24>>2]+1;return}J(165953,165836,229,165961);G()}a=(e<<4)+f|0;q[a+4>>2]=q[c>>2];p[a+8>>1]=s[c+4>>1];return}J(165965,165836,537,166027);G()}function Em(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{d:{h=q[a+24>>2];j=q[a+16>>2];g=q[a+8>>2];if((h|0)!=j-g>>4){i=q[a+4>>2];e:{if(!i){break e}f=q[q[a>>2]+(Cza(b,c,i)<<2)>>2];if((f|0)==-1){break e}while(1){e=(f<<4)+g|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){break d}f=q[e+12>>2];if((f|0)!=-1){continue}break}}e=q[a+12>>2];f:{if((j|0)!=(e|0)){q[a+12>>2]=e+16;break f}e=q[a+20>>2];if((e|0)==-1){break c}e=(e<<4)+g|0;q[a+20>>2]=q[e+12>>2]}q[e>>2]=b;q[e+4>>2]=c;d=q[d>>2];q[e+12>>2]=-1;q[e+8>>2]=d;b=q[a>>2]+(Cza(b,c,i)<<2)|0;f=q[b>>2];if((f|0)==-1){break b}while(1){b=(f<<4)+g|0;f=q[b+12>>2];if((f|0)!=-1){continue}break}q[b+12>>2]=e-g>>4;break a}J(5e3,4863,229,5008);G()}q[((f<<4)+g|0)+8>>2]=q[d>>2];return}J(5012,4863,537,5074);G()}q[b>>2]=e-g>>4;h=q[a+24>>2]}q[a+24>>2]=h+1}function gP(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-16|0;Ii=f;e=hk(a,b,f+12|0,48);a:{if(e){e=e-9472|0;break a}e=-9574;d=q[f+12>>2];if(!d){break a}g=q[a>>2];if((d+g|0)!=(b|0)){break a}while(1){if(b>>>0>g>>>0){g=hk(a,b,f+12|0,48);if(g){e=g-9472|0;break a}g=q[a>>2]+q[f+12>>2]|0;d=hk(a,g,f+12|0,6);if(d){e=d-9472|0;break a}h=q[f+12>>2];d=q[a>>2];i=((r[d|0]|r[d+1|0]<<8|(r[d+2|0]<<16|r[d+3|0]<<24))==2104661?(h|0)==4:0)?i:-8320;if(q[c+8>>2]){if(q[c+12>>2]){e=-9472;break a}j=c;c=bk(1,16);q[j+12>>2]=c;if(!c){e=-9578;break a}}q[c+8>>2]=d;q[c>>2]=6;q[c+4>>2]=h;d=q[a>>2]+h|0;q[a>>2]=d;if(d>>>0>>0){d=hk(a,g,f+12|0,48);if(d){e=d-9472|0;break a}d=q[a>>2]+q[f+12>>2]|0;q[a>>2]=d}if((d|0)==(g|0)){continue}break a}break}q[c+12>>2]=0;e=q[a>>2]==(b|0)?i:-9574}Ii=f+16|0;return e}function jr(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-32|0;Ii=c;a:{g=q[a+8>>2]-q[a+12>>2]>>4;if((g|0)>-1){d=q[79286];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);b:{if((jF(a,-1,122534)|0)!=1){Ri(a,-2);b=0;break b}f=qj(a,-1);c:{if(f){d=f;e=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=e;e=q[d+28>>2];q[b+24>>2]=q[d+24>>2];q[b+28>>2]=e;e=q[d+20>>2];q[b+16>>2]=q[d+16>>2];q[b+20>>2]=e;e=q[d+12>>2];q[b+8>>2]=q[d+8>>2];q[b+12>>2]=e;Ri(a,-3);break c}Hz(a,-1)}b=(f|0)!=0}a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(g|0)){break a}Ii=c+32|0;return b}q[c+12>>2]=g;q[c+4>>2]=813;q[c+8>>2]=0;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}q[c+28>>2]=a;q[c+24>>2]=g;q[c+20>>2]=813;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function dG(a,b){var c=0,d=0,e=0,f=0,g=0;g=Ii-16|0;Ii=g;a:{b:{c:{if((a|0)!=(b|0)){d=b;c=r[a|0];d:{if(!c){break d}if(!b){f=-1;d=0;while(1){e:{f:{if((c-48&255)>>>0<10|((c&-33)-65&255)>>>0<26){break f}c=c<<24>>24;if(c-45>>>0<3|(c|0)==95|(c|0)==126){break f}if(f>>>0<=2){break c}e=-3;c=3;break e}if(!f){break b}e=-1;c=1}f=f+e|0;d=c+d|0;c=r[a+1|0];a=a+1|0;if(c){continue}break}break d}f=2047;while(1){g:{h:{i:{if((c-48&255)>>>0<10|((c&-33)-65&255)>>>0<26){break i}e=c<<24>>24;if(e-45>>>0<3|(e|0)==126){break i}if((e|0)!=95){break h}}if(!f){break b}o[d|0]=c;e=-1;c=1;break g}if(f>>>0<3){break c}q[g>>2]=e;sj(d,4,183974,g);e=-3;c=3}f=f+e|0;d=c+d|0;c=r[a+1|0];a=a+1|0;if(c){continue}break}}if(b){o[d|0]=0}break a}J(183898,183923,132,183943);G()}o[d|0]=0;break a}o[d|0]=0}Ii=g+16|0}function Tj(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;i=Oi(b);j=Li;e=q[a+4>>2];f=q[a>>2];a:{b:{if((e|0)==(f|0)){break b}d=e-f|0;h=(d|0)>-1?d:-1;e=f-e|0;d=w((h|0)<1?h:1,((d|0)<(e|0)?e:d)>>>4|0);e=d>>>0>1?d:1;d=0;while(1){c:{h=f+(d<<4)|0;if((i|0)==q[h>>2]&q[h+4>>2]==(j|0)){f=q[(f+(d<<4)|0)+8>>2];e=q[a+16>>2];if(f>>>0>2]-e>>>0){break c}J(155013,154885,479,155024);G()}d=d+1|0;if((e|0)!=(d|0)){continue}break b}break}if(!e){break b}d=e+f|0;e=hj(d);q[g+12>>2]=0;f=Kq(d,g+12|0);h=d+e|0;e=q[g+12>>2];if((d|0)!=(e|0)?(h|0)==(e|0):0){break a}q[g>>2]=d;Pi(3,154668,155126,g)}f=c}q[g+8>>2]=0;d=q[210909];d:{if(!d){break d}while(1){e:{c=q[d+16>>2];if(c){if(Mi[c|0](a,b,f,g+8|0)|0){break e}}d=q[d+24>>2];if(d){continue}break d}break}f=q[g+8>>2]}Ii=g+16|0;return f}function Gma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{b:{d=q[a+8>>2];c=q[d+8>>2];e=q[d+4>>2];if((c|0)!=(e|0)){b=q[q[a+16>>2]>>2];f=c-e>>2;c=0;while(1){if(q[e+(c<<2)>>2]==(b|0)){if(q[b+148>>2]){cj(q[q[q[a+4>>2]+80>>2]>>2],q[b+148>>2])}if(q[b+152>>2]){cj(q[q[q[a+4>>2]+80>>2]>>2],q[b+152>>2])}a=q[b+100>>2];if(a){Ni(a)}a=q[b+104>>2];if(a){Ni(a)}a=q[b+144>>2];if(a){Hr(a)}a=q[d+8>>2];e=q[d+4>>2];if(a-e>>2>>>0<=c>>>0){break b}q[e+(c<<2)>>2]=q[a-4>>2];a=q[d+8>>2]-4|0;q[d+8>>2]=a;if(a>>>0>2]){break a}if(b){c:{if(o[b+136|0]&1){break c}a=q[b+124>>2];if(!a){break c}Ni(a)}d:{if(o[b+120|0]&1){break d}a=q[b+108>>2];if(!a){break d}Ni(a)}Ni(b)}return 0}c=c+1|0;if(f>>>0>c>>>0){continue}break}}J(54769,54775,468,54819);G()}J(56028,55585,513,56043);G()}J(56053,55585,516,56043);G()}function Xs(a,b,c,d,e){var f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=x(0);a:{b:{c:{g=(d!=x(0))<<2|(c!=x(0))<<1;switch(g|b!=x(0)){case 1:case 2:case 4:break b;case 0:break c;default:break a}}q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;return}q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;b=au(x(x(b+c)+d),e);u[(g<<1)+a>>2]=x(b+b)*x(57.295780181884766);return}g=a;f=x(x(b*c)+x(d*e));d:{if(!(f>x(.4999000132083893)^1)){b=au(b,e);c=x(b+b);b=x(0);d=x(90);break d}if(!(f>2]=d;u[a>>2]=b;u[a+4>>2]=c*x(57.295780181884766)}function Lk(a){var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=(Pza(a),Lza(2));c=e&2147483647;a:{if(c>>>0<=1061752794){if(c>>>0<964689920){break a}a=Un(+a);break a}if(c>>>0<=1081824209){d=+a;if(c>>>0<=1075235811){if((e|0)<=-1){a=x(-Wn(d+1.5707963267948966));break a}a=Wn(d+ -1.5707963267948966);break a}a=Un(-(((e|0)>-1?-3.141592653589793:3.141592653589793)+d));break a}if(c>>>0<=1088565717){d=+a;if(c>>>0<=1085271519){if((e|0)<=-1){a=Wn(d+4.71238898038469);break a}a=x(-Wn(d+ -4.71238898038469));break a}a=Un(((e|0)>-1?-6.283185307179586:6.283185307179586)+d);break a}if(c>>>0>=2139095040){a=x(a-a);break a}b:{switch(qC(a,b+8|0)&3){case 0:a=Un(v[b+8>>3]);break a;case 1:a=Wn(v[b+8>>3]);break a;case 2:a=Un(-v[b+8>>3]);break a;default:break b}}a=x(-Wn(v[b+8>>3]))}Ii=b+16|0;return a}function Paa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;a=0;a:{b:{while(1){c:{if((sa(a|0,327681)|0)==1){AJ(b,a);break c}e=q[b+28>>2];d=q[b+24>>2];if((e|0)==(d|0)){break c}c=e-d|0;f=(c|0)>-1?c:-1;e=d-e|0;c=w((f|0)<1?f:1,((c|0)<(e|0)?e:c)>>>3|0);f=c>>>0>1?c:1;c=0;while(1){e=c<<3;g=e+d|0;if(q[g>>2]==(a|0)){yJ(q[b+20>>2],q[g+4>>2],0);d=q[b+24>>2];if(q[b+28>>2]-d>>3>>>0<=c>>>0){break b}Eaa(q[b+20>>2],q[(e+d|0)+4>>2]);g=c;c=q[b+28>>2];d=q[b+24>>2];if(g>>>0>=c-d>>3>>>0){break a}d=e+d|0;c=c-8|0;e=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=e;c=q[b+28>>2]-8|0;q[b+28>>2]=c;if(c>>>0>=t[b+24>>2]){break c}J(148265,147927,516,148255);G()}c=c+1|0;if((f|0)!=(c|0)){continue}break}}a=a+1|0;if((a|0)!=16){continue}break}return}J(147916,147927,479,147983);G()}J(148240,147927,513,148255);G()}function r9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+16>>2];if(q[a+20>>2]-g>>3>>>0>b>>>0){d=q[a>>2];e=q[a+4>>2]-d>>2;h=e-1|0;c=q[a+32>>2];if(h>>>0>=q[a+36>>2]-c>>2>>>0){break a}f=(b<<3)+g|0;i=q[f>>2];if(e>>>0<=i>>>0){break d}c=q[c+(h<<2)>>2];q[d+(i<<2)>>2]=0;d=q[a+16>>2];if(c>>>0>=q[a+20>>2]-d>>3>>>0){break a}q[d+(c<<3)>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];c=q[a+4>>2];d=q[a>>2];if(e>>>0>=c-d>>2>>>0){break c}q[d+(e<<2)>>2]=q[c-4>>2];c=q[a+4>>2]-4|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(152757,152778,152,152840);G()}J(152845,152587,513,152860);G()}J(152870,152587,516,152860);G()}J(152576,152587,479,152554);G()}function SF(a,b){var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;e=q[a+48>>2];f=q[a+4>>2];a:{b:{c:{d:{d=q[a+16>>2];if((d|0)!=286){if((d|0)==123){break c}if((d|0)!=40){break d}if(q[a+8>>2]!=(f|0)){Sj(a,142265)}Vj(a);e:{if(q[a+16>>2]==41){q[c+8>>2]=0;break e}pl(a,c+8|0,0);if(q[a+16>>2]==44){while(1){Vj(a);Mm(q[a+48>>2],c+8|0);pl(a,c+8|0,0);if(q[a+16>>2]==44){continue}break}}Vu(e,c+8|0,-1)}Yo(a,41,40,f);break b}d=gq(e,q[a+24>>2]);q[c+24>>2]=-1;q[c+28>>2]=-1;q[c+16>>2]=d;q[c+8>>2]=4;Vj(a);break b}Sj(a,142314);break a}sN(a,c+8|0)}a=q[b+8>>2];d=0;f:{switch(q[c+8>>2]){default:Mm(e,c+8|0);case 0:d=q[e+36>>2]-a|0;break;case 13:case 14:break f}}d=Bm(e,28,a,d,2);q[b+16>>2]=-1;q[b+20>>2]=-1;q[b+8>>2]=d;q[b>>2]=13;q[(q[q[e>>2]+20>>2]+(q[e+24>>2]<<2)|0)-4>>2]=f;q[e+36>>2]=a+1}Ii=c+32|0}function Mv(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+24>>2];i=q[a+16>>2];f=q[a+8>>2];if((g|0)!=((i-f|0)/12|0)){h=q[a+4>>2];e:{if(!h){break e}e=q[q[a>>2]+((b>>>0)%(h>>>0)<<2)>>2];if((e|0)==-1){break e}while(1){d=w(e,12)+f|0;if(q[d>>2]==(b|0)){break d}e=q[d+8>>2];if((e|0)!=-1){continue}break}}d=q[a+12>>2];f:{if((i|0)!=(d|0)){q[a+12>>2]=d+12;break f}d=q[a+20>>2];if((d|0)==-1){break c}d=w(d,12)+f|0;q[a+20>>2]=q[d+8>>2]}q[d>>2]=b;c=s[c>>1];q[d+8>>2]=-1;p[d+4>>1]=c;b=q[a>>2]+((b>>>0)%(h>>>0)<<2)|0;e=q[b>>2];if((e|0)==-1){break b}while(1){b=w(e,12)+f|0;e=q[b+8>>2];if((e|0)!=-1){continue}break}q[b+8>>2]=(d-f|0)/12;break a}J(6219,6227,229,6287);G()}p[(w(e,12)+f|0)+4>>1]=s[c>>1];return}J(6291,6227,537,6353);G()}q[b>>2]=(d-f|0)/12;g=q[a+24>>2]}q[a+24>>2]=g+1}function V9(a){var b=0,c=0,d=x(0);if(!r[843028]){X9();q[210644]=7;q[210642]=5;q[210643]=6;q[210640]=3;q[210641]=4;q[210638]=1;q[210639]=2;q[210636]=1;q[210637]=0;q[210634]=0;q[210635]=2;o[843028]=1}b=Ui($i(92),0,92);q[b+56>>2]=0;q[b+60>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+28>>2]=-1;q[b+48>>2]=0;q[b+52>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+60>>2]=-1;c=Yi(16);o[b+4|0]=16;q[b>>2]=c;o[c|0]=0;o[c+1|0]=1;o[q[b>>2]+2|0]=2;o[q[b>>2]+3|0]=3;o[q[b>>2]+4|0]=4;o[q[b>>2]+5|0]=5;o[q[b>>2]+6|0]=6;o[q[b>>2]+7|0]=7;o[q[b>>2]+8|0]=8;o[q[b>>2]+9|0]=9;o[q[b>>2]+10|0]=10;o[q[b>>2]+11|0]=11;o[q[b>>2]+12|0]=12;o[q[b>>2]+13|0]=13;o[q[b>>2]+14|0]=14;o[q[b>>2]+15|0]=15;uJ(b+40|0,7,16);q[b+72>>2]=q[a>>2];u[b+80>>2]=u[a+4>>2];d=u[a+8>>2];q[b+88>>2]=1063675494;u[b+84>>2]=d;return b}function Dw(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;q[f+8>>2]=0;g=1;a:{b:{c:{c=r[a+3272|0];if(!(c&1)){e=q[a+1040>>2];d=q[a+1036>>2];b=e-d|0;if(!b){break b}if((d|0)!=(e|0)){c=d-e|0;c=((b|0)<(c|0)?c:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(c,(b|0)<1?b:1);h=b>>>0>1?b:1;c=0;while(1){b=q[(c<<2)+d>>2];d:{if(!b){break d}d=q[b+140>>2];e=q[b+136>>2];if(!(e&256)){break d}p[b+144>>1]=s[b+144>>1];q[b+136>>2]=e&-257;q[b+140>>2]=d;d=d&32767;e=q[a+1036>>2];if(d>>>0>=q[a+1040>>2]-e>>2>>>0){break a}if((b|0)!=q[(d<<2)+e>>2]){break c}g=DB(a,b)&g}c=c+1|0;if((h|0)==(c|0)){c=r[a+3272|0];break b}d=q[a+1036>>2];if(q[a+1040>>2]-d>>2>>>0>c>>>0){continue}break}}break a}J(11907,7192,1840,11995);G()}J(8193,7192,1830,12011);G()}o[a+3272|0]=c&239;Ii=f+16|0;return}J(12419,9962,479,9454);G()}function im(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;d=-1;a:{b:{switch(c-2|0){case 3:d=-2;break a;case 4:d=-3;break a;case 6:d=-4;break a;case 13:d=-5;break a;case 15:d=-6;break a;case 19:d=-7;break a;case 21:d=-8;break a;case 25:d=-9;break a;case 26:d=-10;break a;case 28:d=-11;break a;case 31:d=-12;break a;case 33:d=-13;break a;case 36:d=-14;break a;case 38:d=-15;break a;case 40:d=-17;break a;case 51:d=-20;break a;case 55:d=-22;break a;case 136:d=-23;break a;case 62:d=-24;break a;case 64:d=-25;break a;case 65:d=-26;break a;case 71:d=-27;break a;case 2:d=-28;break a;case 12:d=-29;break a;case 1:d=-30;break a;case 11:d=-31;break a;case 24:d=-32;break a;case 0:break a;default:break b}}q[e+8>>2]=c;q[e+4>>2]=b;q[e>>2]=a;Pi(4,173567,173572,e);d=-1e3}Ii=e+16|0;return d}function gI(a){var b=0,c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;b=q[a+4>>2];d=q[a>>2];a:{if((b|0)==(d|0)){break a}while(1){e=q[(c<<2)+d>>2];if(e){b=q[e+72>>2];if(b){Ni(b);q[e+16>>2]=0;q[e+72>>2]=0}b:{if(o[e+12|0]&1){break b}b=q[e>>2];if(!b){break b}Ni(b)}g=g+1|0;Ni(e);d=q[a>>2];b=q[a+4>>2]}c=c+1|0;if(c>>>0>2>>>0){continue}break}if(!g){break a}q[f>>2]=g;Pi(3,150692,150701,f)}c:{c=q[a+36>>2];b=q[a+28>>2];if((c|0)!=(b|0)){d=0;c=b;while(1){if(q[a+32>>2]-c>>2>>>0<=d>>>0){break c}Ni(q[(d<<2)+c>>2]);d=d+1|0;c=q[a+28>>2];if(d>>>0>2]-c>>2>>>0){continue}break}}if(!(!c|o[a+40|0]&1)){Ni(c)}d:{if(o[a+24|0]&1){break d}b=q[a+16>>2];if(!b){break d}Ni(b)}e:{if(o[a+12|0]&1){break e}b=q[a>>2];if(!b){break e}Ni(b)}Ni(a);Ii=f+16|0;return}J(151947,151192,479,151403);G()}function J7(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){e=nj(b+72|0,a,0,115465,1326);a:{b:{if(Oj(a,1)){q[b+40>>2]=rr(a,q[q[d+304>>2]+2384>>2]);q[b+44>>2]=Li;q[b+32>>2]=4;q[b+48>>2]=0;q[b+52>>2]=0;c=q[d+4>>2];if((c|0)==q[d+8>>2]){break b}q[d+4>>2]=c+40;a=b- -64|0;d=q[a+4>>2];q[c+32>>2]=q[a>>2];q[c+36>>2]=d;a=q[b+60>>2];q[c+24>>2]=q[b+56>>2];q[c+28>>2]=a;a=q[b+52>>2];q[c+16>>2]=q[b+48>>2];q[c+20>>2]=a;a=q[b+44>>2];q[c+8>>2]=q[b+40>>2];q[c+12>>2]=a;a=q[b+36>>2];q[c>>2]=q[b+32>>2];q[c+4>>2]=a;a=0;break a}q[b>>2]=115561;a=Qi(a,116596,b);break a}q[b+16>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b+16|0)}mj(e);Ii=b+96|0;return a|0}J(115568,115465,478,119531);G()}function aha(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,t=0,u=0;c=Ii-48|0;Ii=c;k=q[a>>2];l=q[k+4>>2];e=l;m=q[e+96>>2];n=q[e+100>>2];p=q[a+4>>2];r=q[p+4>>2];e=r;t=q[e+96>>2];u=q[e+100>>2];o[c+16|0]=1;d=s[a+8>>1];if(d){if(!(d&1)){while(1){f=f+1|0;e=d&2;d=(d&65534)>>>1|0;if(!e){continue}break}}e=(f<<3)+b|0;g=q[e>>2];h=q[e+4>>2]}d=s[a+10>>1];if(d){f=0;if(!(d&1)){while(1){f=f+1|0;a=d&2;d=(d&65534)>>>1|0;if(!a){continue}break}}a=(f<<3)+b|0;i=q[a>>2];j=q[a+4>>2]}q[c+40>>2]=g;q[c+44>>2]=h;q[c+24>>2]=i;q[c+28>>2]=j;q[c+8>>2]=t;q[c+12>>2]=u;q[c+32>>2]=i;q[c+36>>2]=j;ku(c+8|0,l,m,n,s[k+22>>1]);q[c+40>>2]=i;q[c+44>>2]=j;q[c+24>>2]=g;q[c+28>>2]=h;q[c+8>>2]=m;q[c+12>>2]=n;q[c+32>>2]=g;q[c+36>>2]=h;ku(c+8|0,r,t,u,s[p+22>>1]);Ii=c+48|0}function Xba(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0),j=0;b=Ii-48|0;Ii=b;a:{d=tj(a,1,b+44|0);if(!(r[d+415|0]&16)){c=Om(a,2);b:{c:{if(c){e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if((e|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(b+16|0,j,q[b+44>>2],1);f=u[c+4>>2];g=u[c>>2];h=u[c+8>>2];break c}c=Nn(a,2);if(c){h=u[c+8>>2];f=u[c+4>>2];g=u[c>>2];i=u[c+12>>2];break b}c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=Ck(a,-1,q[213927]);Ri(a,-2);if((c|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(b+16|0,e,q[b+44>>2],1);a=kr(a,2);Xs(b,u[a>>2],u[a+4>>2],u[a+8>>2],u[a+12>>2]);f=u[b+4>>2];g=u[b>>2];h=u[b+8>>2]}i=u[b+28>>2]}u[d+16>>2]=g;u[d+28>>2]=i;u[d+24>>2]=h;u[d+20>>2]=f;q[d+412>>2]=q[d+412>>2]|4194304}Ii=b+48|0;return 0}J(202212,202233,187,202255);G()}function $ga(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,r=0,t=0,u=0;c=Ii-48|0;Ii=c;k=q[a>>2];l=q[k+4>>2];e=l;m=q[e+96>>2];n=q[e+100>>2];p=q[a+4>>2];r=q[p+4>>2];e=r;t=q[e+96>>2];u=q[e+100>>2];o[c+16|0]=0;d=s[a+8>>1];if(d){if(!(d&1)){while(1){f=f+1|0;e=d&2;d=(d&65534)>>>1|0;if(!e){continue}break}}e=(f<<3)+b|0;g=q[e>>2];h=q[e+4>>2]}d=s[a+10>>1];if(d){f=0;if(!(d&1)){while(1){f=f+1|0;a=d&2;d=(d&65534)>>>1|0;if(!a){continue}break}}a=(f<<3)+b|0;i=q[a>>2];j=q[a+4>>2]}q[c+40>>2]=g;q[c+44>>2]=h;q[c+24>>2]=i;q[c+28>>2]=j;q[c+8>>2]=t;q[c+12>>2]=u;q[c+32>>2]=i;q[c+36>>2]=j;ku(c+8|0,l,m,n,s[k+22>>1]);q[c+40>>2]=i;q[c+44>>2]=j;q[c+24>>2]=g;q[c+28>>2]=h;q[c+8>>2]=m;q[c+12>>2]=n;q[c+32>>2]=g;q[c+36>>2]=h;ku(c+8|0,r,t,u,s[p+22>>1]);Ii=c+48|0}function Xk(a,b,c){var d=0,e=0,f=0;a:{switch(r[b|0]-61|0){case 0:o[(Dx(a,b+1|0,c)+c|0)-1|0]=0;return;case 3:b=b+1|0;e=hj(b);o[a|0]=0;d=a;c=c-8|0;if(c>>>0>>0){a=hj(a)+a|0;o[a|0]=46;o[a+1|0]=46;o[a+2|0]=46;o[a+3|0]=0;b=b+(e-c|0)|0}_C(d,b);return;default:break a}}f=ZC(b,141341);d=r[141352]|r[141353]<<8;o[a+8|0]=d;o[a+9|0]=d>>>8;d=r[141348]|r[141349]<<8|(r[141350]<<16|r[141351]<<24);e=r[141344]|r[141345]<<8|(r[141346]<<16|r[141347]<<24);o[a|0]=e;o[a+1|0]=e>>>8;o[a+2|0]=e>>>16;o[a+3|0]=e>>>24;o[a+4|0]=d;o[a+5|0]=d>>>8;o[a+6|0]=d>>>16;o[a+7|0]=d>>>24;c=c-17|0;c=c>>>0>>0?c:f;b:{if(r[c+b|0]){b=Ex(a,b,c);b=hj(b)+b|0;o[b|0]=46;o[b+1|0]=46;o[b+2|0]=46;o[b+3|0]=0;break b}_C(a,b)}a=hj(a)+a|0;b=r[141354]|r[141355]<<8;o[a|0]=b;o[a+1|0]=b>>>8;o[a+2|0]=r[141356]}function Uqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;q[e+12>>2]=0;b=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[57366],e+12|0)){b=q[e+12>>2];c=q[b+24>>2];a:{if(c){yB(q[b+12>>2],q[b+16>>2],q[b+20>>2],c);break a}if(q[b+16>>2]){break a}c=q[b+32>>2];q[b+12>>2]=q[b+28>>2];q[b+16>>2]=c}b:{f=q[a+4>>2];d=q[f+4>>2];c=q[f>>2];b=d-c|0;if(!b){break b}if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;b=0;while(1){g=q[(b<<2)+c>>2];c=q[a+32>>2];J3(g,q[e+12>>2],q[c>>2],q[c+4>>2]);b=b+1|0;if((d|0)==(b|0)){break b}c=q[f>>2];if(q[f+4>>2]-c>>2>>>0>b>>>0){continue}break}}J(20958,20969,479,21025);G()}c=q[a+32>>2];f=q[c+8>>2];b=q[f>>2];q[c+16>>2]=(q[a+24>>2]-q[b+4>>2]|0)+4;Aj(b);q[f>>2]=q[e+12>>2];b=0}Ii=e+16|0;return b|0}function FX(a,b,c){var d=0,e=0,f=0,g=0;e=q[a>>2];if(!e){return-24832}q[c>>2]=0;a:{b:{f=q[e+4>>2];g=f-3|0;if((q[e>>2]&-2)==72|(95>>>g&1?g>>>0<7:0)){break b}d=-24704;c:{switch(f-1|0){case 0:break a;case 1:break c;default:break b}}d:{e:{d=q[a+8>>2];if((d|0)==1){e=q[a+12>>2];if(e){break e}break a}f=q[a+36>>2];if((f|0)==((e?q[e+24>>2]:0)|0)){break d}return f|q[a+12>>2]?-25216:0}f=a+20|0;d=0;g=q[a>>2];if(g){d=q[a+56>>2];if(!d){d=q[g+16>>2]}}Mi[e|0](f,d,q[a+36>>2]);d=q[a+8>>2];e=q[a>>2]}d=Mi[q[q[e+28>>2]+8>>2]](q[a+60>>2],d,e?q[e+24>>2]:0,a+40|0,a+20|0,b)|0;if(d){break b}if(!q[a+8>>2]){e=q[a>>2];d=0;f:{if(!e){break f}d=q[e+24>>2]}return Mi[q[a+16>>2]](b,d,c)|0}a=q[a>>2];b=0;g:{if(!a){break g}b=q[a+24>>2]}q[c>>2]=b;return 0}return d}return q[a+36>>2]?-25216:0}function jz(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;e=Oi(a);f=Li;d=q[239672];h=q[d+100>>2];c=q[d+84>>2];a=-1;a:{if((h|0)==q[d+92>>2]-c>>4){break a}i=d+76|0;b:{a=q[d+80>>2];c:{if(!a){break c}b=q[q[i>>2]+(Cza(e,f,a)<<2)>>2];if((b|0)==-1){break c}a=b;while(1){a=(a<<4)+c|0;if((e|0)==q[a>>2]&(f|0)==q[a+4>>2]){break b}a=q[a+12>>2];if((a|0)!=-1){continue}break}}a=w(h,1056)+d|0;q[a+128>>2]=1065353216;q[a+120>>2]=0;q[a+124>>2]=1065353216;q[a+112>>2]=e;q[a+116>>2]=f;c=a;a=q[d+33920>>2]<<3;b=Yi(a);q[c+132>>2]=b;Ui(b,0,a);q[g+12>>2]=h;rt(i,e,f,g+12|0);a=h;break a}a=(b<<4)+c|0;if(q[a>>2]!=(e|0)|q[a+4>>2]!=(f|0)){while(1){b=q[((b<<4)+c|0)+12>>2];a=(b<<4)+c|0;if((e|0)!=q[a>>2]|q[a+4>>2]!=(f|0)){continue}break}}a=q[((b<<4)+c|0)+8>>2]}Ii=g+16|0;return a}function Fia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii-16|0;Ii=c;b=q[a+28>>2];q[c+12>>2]=0;a:{b:{if(b){d=q[b>>2];q[c+12>>2]=d;if(d){break b}}d=-13;if(Qj(q[a+20>>2],q[a+24>>2],q[61786],c+12|0)){break a}i=1;d=q[c+12>>2]}j=q[a+4>>2];h=q[q[a+32>>2]+8>>2];f=h;e=q[f+4>>2];f=q[f>>2];q[c>>2]=f;q[c+4>>2]=e;g=$i(124);Ui(g+4|0,0,120);q[g>>2]=d;c:{if(!b){d=0;b=0;break c}k=r[b+8|0];d=s[b+6>>1];b=s[b+4>>1]}if(Mi[q[75024]](f,e)&1){while(1){Xn(250);if(Mi[q[75024]](f,e)&1){continue}break}}d=TL(q[a+16>>2],j,g,b,d,k,f,e,c);b=q[c+4>>2];f=b;e=q[c>>2];q[h>>2]=e;q[h+4>>2]=b;if(Mi[q[75024]](e,b)&1){while(1){Xn(250);if(Mi[q[75024]](e,f)&1){continue}break}}rL(g);if(i){Aj(q[c+12>>2])}if(d){break a}e=Mi[q[75013]](e,f)|0;q[q[a+32>>2]+16>>2]=e}Ii=c+16|0;return d|0}function u7(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii+ -64|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){if((Vi(a,1)|0)==1){q[b+32>>2]=(Uj(a,1)|0)!=0;q[b+36>>2]=0;q[b+24>>2]=11;c=q[d+4>>2];a:{if((c|0)==q[d+8>>2]){q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;e=Qi(a,115614,b);break a}q[d+4>>2]=c+40;a=q[b+60>>2];q[c+32>>2]=q[b+56>>2];q[c+36>>2]=a;a=q[b+52>>2];q[c+24>>2]=q[b+48>>2];q[c+28>>2]=a;a=q[b+44>>2];q[c+16>>2]=q[b+40>>2];q[c+20>>2]=a;a=q[b+36>>2];q[c+8>>2]=q[b+32>>2];q[c+12>>2]=a;a=q[b+28>>2];q[c>>2]=q[b+24>>2];q[c+4>>2]=a}Ii=b- -64|0;return e|0}e=b;c=Vi(a,2);d=140583;b:{if((c|0)==-1){break b}d=q[(c<<2)+256832>>2]}q[e+16>>2]=d;a=Qi(a,117560,b+16|0);Ii=b- -64|0;return a|0}J(115568,115465,478,119531);G()}function f5(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-32|0;Ii=d;a:{g=q[a+8>>2]-q[a+12>>2]>>4;if((g|0)>-1){e=q[79286];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);e=-2;b:{if((Vi(a,-1)|0)!=7){break b}if(!$l(a,-1)){break b}e=q[79287];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;jl(a,-2);e=-4;if((hl(a,-1)|0)!=(c|0)){break b}Ri(a,-2);bj(a,122544,15);jl(a,-2);if(!Vi(a,-1)){break b}ej(a,-3);h=1;Rk(a,1,1);q[b>>2]=qj(a,-1)}Ri(a,e);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(g|0)){break a}Ii=d+32|0;return h}q[d+12>>2]=g;q[d+4>>2]=840;q[d+8>>2]=0;q[d>>2]=122672;Pi(4,122749,123291,d);J(123363,122672,1469,123380);G()}q[d+28>>2]=a;q[d+24>>2]=g;q[d+20>>2]=840;q[d+16>>2]=122672;Pi(4,122749,123394,d+16|0);J(123465,122672,1492,123484);G()}function c4(){var a=0,b=0,c=0,d=0;a=$i(48);q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;b=a+24|0;q[b>>2]=0;q[b+4>>2]=0;d=a+16|0;c=d;q[c>>2]=0;q[c+4>>2]=0;c=a+8|0;q[c>>2]=0;q[c+4>>2]=0;Wi(8,28,a,c,a+4|0);a:{b:{if(!(o[a+28|0]&1)){Wi(8,2,d,b,a+20|0);b=q[a+16>>2];if(q[a+24>>2]-b>>1>>>0<=7){break b}q[a+20>>2]=b+16;p[b+8>>1]=0;p[b+10>>1]=0;p[b+12>>1]=0;p[b+14>>1]=0;p[b>>1]=0;p[b+2>>1]=0;p[b+4>>1]=0;p[b+6>>1]=0;b=s[a+36>>1];if(b>>>0>=9){break a}c=q[a+32>>2];d=Yi(16);q[a+32>>2]=d;d=Ti(d,c,b<<1);p[a+36>>1]=8;if((b|0)!=8){while(1){p[d+(b<<1)>>1]=b;b=b+1|0;if((b|0)!=8){continue}break}}Ni(c);p[a+44>>1]=0;o[a+46|0]=r[a+46|0]&254;return a}J(133887,133265,493,133875);G()}J(133442,133265,506,133461);G()}J(133852,133158,112,133875);G()}function S2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;e=Ii-32|0;Ii=e;f=nj(e+8|0,a,1,132848,679);d=jj(a,1);b=q[210420];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;tv(a);a:{b:{c:{if((Vi(a,-1)|0)!=2){Ri(a,-2);break c}b=qj(a,-1);Ri(a,-2);if(b){break b}}Pi(4,133348,133681,0);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}d=d&65535;c=q[b+16>>2];if(d>>>0>=q[b+20>>2]-c>>1>>>0){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}d=s[c+(d<<1)>>1];c=q[b+4>>2];b=q[b>>2];if(d>>>0>=(c-b|0)/28>>>0){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}c=q[(b+w(d,28)|0)+8>>2];if(!Lo(c)){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}b=b+w(d,28)|0;q[e>>2]=q[b+12>>2];u[e+4>>2]=u[b+20>>2]-u[b+16>>2];bt(c,890,e);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1}q[a+8>>2]=q[a+8>>2]+16;mj(f);Ii=e+32|0;return 1}function D9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+16>>2];if(q[a+20>>2]-g>>3>>>0>b>>>0){d=q[a>>2];e=q[a+4>>2]-d>>2;h=e-1|0;c=q[a+32>>2];if(h>>>0>=q[a+36>>2]-c>>2>>>0){break a}f=(b<<3)+g|0;i=q[f>>2];if(e>>>0<=i>>>0){break d}c=q[c+(h<<2)>>2];q[d+(i<<2)>>2]=0;d=q[a+16>>2];if(c>>>0>=q[a+20>>2]-d>>3>>>0){break a}q[d+(c<<3)>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];c=q[a+4>>2];d=q[a>>2];if(e>>>0>=c-d>>2>>>0){break c}q[d+(e<<2)>>2]=q[c-4>>2];c=q[a+4>>2]-4|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(46300,46124,152,46321);G()}J(46326,45367,513,46341);G()}J(46351,45367,516,46341);G()}J(46069,45367,479,46080);G()}function A9(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{g=q[a+16>>2];if(q[a+20>>2]-g>>3>>>0>b>>>0){d=q[a>>2];e=q[a+4>>2]-d>>2;h=e-1|0;c=q[a+32>>2];if(h>>>0>=q[a+36>>2]-c>>2>>>0){break a}f=(b<<3)+g|0;i=q[f>>2];if(e>>>0<=i>>>0){break d}c=q[c+(h<<2)>>2];q[d+(i<<2)>>2]=0;d=q[a+16>>2];if(c>>>0>=q[a+20>>2]-d>>3>>>0){break a}q[d+(c<<3)>>2]=q[f>>2];e=q[f>>2];d=q[a+32>>2];if(e>>>0>=q[a+36>>2]-d>>2>>>0){break a}q[d+(e<<2)>>2]=c;e=q[f>>2];c=q[a+4>>2];d=q[a>>2];if(e>>>0>=c-d>>2>>>0){break c}q[d+(e<<2)>>2]=q[c-4>>2];c=q[a+4>>2]-4|0;q[a+4>>2]=c;if(c>>>0>2]){break b}q[((b<<3)+g|0)+4>>2]=q[a+48>>2];q[a+48>>2]=f-q[a+16>>2]>>3;return}break a}J(51871,51892,152,51954);G()}J(51959,51308,513,51974);G()}J(51984,51308,516,51974);G()}J(51709,51308,479,51547);G()}function Js(a,b){var c=0,d=0;a:{b:{c:{d:{e:{f:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break f}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break f}g:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break f;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break f;case 0:c=a+72|0;break f;default:break g}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;switch(q[b+8>>2]-6|0){case 2:break c;case 1:break d;case 0:break e;default:break b}}c=q[a+8>>2];q[c>>2]=q[q[b>>2]+12>>2];b=5;break a}c=q[a+8>>2];q[c>>2]=q[q[b>>2]+12>>2];b=5;break a}b=q[b>>2];d=q[b+76>>2];c=q[a+8>>2];q[c>>2]=q[b+72>>2];q[c+4>>2]=d;b=q[b+80>>2];break a}c=q[a+8>>2];b=0}q[c+8>>2]=b;q[a+8>>2]=q[a+8>>2]+16}function JB(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-160|0;Ii=f;q[a+4>>2]=d;q[a+8>>2]=e;q[e>>2]=a;q[a>>2]=c;Pj(f+32|0,b,128);Zk(f+32|0,7312,128);e=-1e3;a:{b:{c:{d:{switch(ur(b,a+3216|0)+4|0){case 3:break b;case 0:break c;case 4:break d;default:break a}}b=f+32|0;e:{switch(ur(f+32|0,a+3224|0)+4|0){case 3:break b;case 0:break c;case 4:break e;default:break a}}mq(c,26,a);h=q[d+29080>>2];Gj(h);f:{g:{e=d+29088|0;b=q[e>>2];g=d+29092|0;c=q[g>>2];if((b|0)==(c|0)){if(o[d+29096|0]&1){break g}c=b;b=d+29084|0;Wi((c-q[b>>2]>>2)+4|0,4,b,g,e);c=q[g>>2];b=q[e>>2]}if((b|0)==(c|0)){break f}q[e>>2]=b+4;q[b>>2]=a;Bj(h);e=0;break a}J(10026,9962,493,10101);G()}J(12430,9962,533,12454);G()}q[f+16>>2]=b;Pi(4,7319,7423,f+16|0);break a}q[f>>2]=b;Pi(4,7319,7330,f)}Ii=f+160|0;return e}function GA(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{g=q[a+16>>2];f=q[a+8>>2];if(q[a+24>>2]!=((g-f|0)/184|0)){d=q[a+4>>2];c:{if(!d){break c}d=q[q[a>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((d|0)==-1){break c}while(1){e=w(d,184)+f|0;if(q[e>>2]==(b|0)){break b}d=q[e+180>>2];if((d|0)!=-1){continue}break}}e=q[a+12>>2];d:{if((g|0)!=(e|0)){q[a+12>>2]=e+184;break d}d=q[a+20>>2];if((d|0)==-1){break a}e=w(d,184)+f|0;q[a+20>>2]=q[e+180>>2]}q[e>>2]=b;Ti(e+4|0,c,176);q[e+180>>2]=-1;c=q[a+8>>2];b=q[a>>2]+((b>>>0)%t[a+4>>2]<<2)|0;d=q[b>>2];if((d|0)!=-1){while(1){b=c+w(d,184)|0;d=q[b+180>>2];if((d|0)!=-1){continue}break}b=b+180|0}q[b>>2]=(e-c|0)/184;q[a+24>>2]=q[a+24>>2]+1;return}J(150222,150097,229,150230);G()}Ti((w(d,184)+f|0)+4|0,c,176);return}J(150234,150097,537,150296);G()}function AL(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-96|0;Ii=c;f=nj(c,a,1,69876,76);q[c+88>>2]=0;q[c+92>>2]=0;q[c+80>>2]=0;q[c+84>>2]=0;q[c+72>>2]=0;q[c+76>>2]=0;q[c+64>>2]=0;q[c+68>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;Gk(a,1,c+32|0,0);qm(a,c- -64|0);a:{b:{d=q[q[jk(a)+80>>2]+8>>2];e=jn(d,q[c+48>>2],q[c+52>>2]);if(e){p[c+30>>1]=0;kM(e,q[c+56>>2],q[c+60>>2],c+30|0);q[c+24>>2]=0;q[c+20>>2]=0;Ml(a,1,d,70009,c+24|0,c+32|0,c+20|0);g=q[q[e+80>>2]>>2];e=Fla(q[c+20>>2],q[e+96>>2],q[e+100>>2],s[c+30>>1]);d=Li;h=d;if(e|d){break b}}d=Kj(f,69966,0);break a}vj(a,0,0);q[c+36>>2]=1;q[c+32>>2]=a;o[c+73|0]=0;o[c+72|0]=b;q[c+64>>2]=e;q[c+68>>2]=h;Z6(g,c- -64|0,c+32|0);d=1}mj(f);Ii=c+96|0;return d}function x4(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=0;g=Ii-32|0;Ii=g;b=_i(a,1,q[210436],0);d=u[b>>2];e=u[b+4>>2];a:{if(!(d!=d|e!=e)){c=u[b+8>>2];if(c==c){break a}}c=u[b+8>>2];v[g+16>>3]=e;v[g+24>>3]=c;v[g+8>>3]=d;q[g>>2]=1;Qi(a,134131,g)}n=fj(a,2);e=u[b>>2];c=u[b+4>>2];f=u[b+8>>2];b=yj(a,64);q[b+44>>2]=0;q[b+48>>2]=0;q[b+28>>2]=0;q[b+12>>2]=0;q[b+60>>2]=1065353216;q[b+52>>2]=0;q[b+56>>2]=0;h=x(n);i=Nl(h);d=x(x(1)-i);u[b+40>>2]=i+x(d*x(f*f));j=x(d*x(c*f));h=Lk(h);k=x(e*h);u[b+36>>2]=j-k;l=x(h*c);m=x(d*x(e*f));u[b+32>>2]=l+m;u[b+24>>2]=k+j;u[b+20>>2]=i+x(d*x(c*c));c=x(d*x(e*c));f=x(h*f);u[b+16>>2]=c-f;u[b+8>>2]=m-l;u[b+4>>2]=c+f;u[b>>2]=i+x(x(e*e)*d);Zi(a,-1e4,134048);xj(a,-2);Ii=g+32|0;return 1}function s0(a,b,c,d,e,f){var g=0,h=0,i=0;g=Ii+ -64|0;Ii=g;q[g+32>>2]=0;q[g+24>>2]=1;q[g+28>>2]=0;q[g+44>>2]=0;q[g+36>>2]=1;q[g+40>>2]=0;q[g+56>>2]=0;q[g+48>>2]=1;q[g+52>>2]=0;q[g+16>>2]=0;q[g+8>>2]=1;q[g+12>>2]=0;h=wk(g+8|0,d);a:{if(h){break a}h=Eo(g+24|0,d);if(h){break a}h=Bk(b,1);if(h){break a}i=b+24|0;h=Bk(i,0);if(h){break a}ij(b+12|0);d=a+4|0;while(1){if((_j(g+24|0,d)|0)>=0){h=nn(g+24|0,g+24|0,d);if(!h){continue}break a}break}if(e){h=o0(a,g+24|0,e,f);if(h){break a}}f=g+48|0;e=Ql(c);while(1){if(e){e=e-1|0;d=Xm(c,e)&255;h=Fu(b,g+24|0,d);if(h){break a}h=Fu(i,f,d);if(h){break a}h=B0(a,b,g+24|0,b,g+24|0,g+8|0);if(h){break a}h=Fu(b,g+24|0,d);if(h){break a}h=Fu(i,f,d);if(!h){continue}break a}break}h=r0(a,b)}nm(g+24|0);ij(g+8|0);Ii=g- -64|0;return h}function Zha(a){var b=0,c=0,d=0;b=q[a>>2];d=q[b+8>>2]-q[b+12>>2]>>4;Ak(b,81862,233152);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81869);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81893);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81919);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=3;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81940);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=4;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81962);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=0;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,81987);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,82003);c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=2;q[b+8>>2]=q[b+8>>2]+16;Si(b,-2,82014);Ri(b,-2);if(q[b+8>>2]-q[b+12>>2]>>4!=(d|0)){J(82026,82047,400,82088);G()}q[74604]=q[a+12>>2]}function OD(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-112|0;Ii=c;e=q[a+48>>2];g=q[e+36>>2];a:{if(q[a+16>>2]==285){b:{if(q[b+28>>2]<2147483646){break b}d=q[e+16>>2];f=q[q[e>>2]+60>>2];c:{if(!f){q[c+32>>2]=2147483645;q[c+36>>2]=142041;d=oj(d,142064,c+32|0);break c}q[c+52>>2]=2147483645;q[c+48>>2]=f;q[c+56>>2]=142041;d=oj(d,142098,c+48|0)}gm(q[e+12>>2],d,0);if(q[a+16>>2]==285){break b}d=q[a+52>>2];q[c+16>>2]=tl(a,285);Sj(a,oj(d,141919,c+16|0))}d=q[a+24>>2];Vj(a);d=gq(q[a+48>>2],d);q[c+104>>2]=-1;q[c+108>>2]=-1;q[c+96>>2]=d;q[c+88>>2]=4;break a}uC(a,c+88|0)}q[b+28>>2]=q[b+28>>2]+1;if(q[a+16>>2]!=61){d=q[a+52>>2];q[c>>2]=tl(a,61);Sj(a,oj(d,141919,c))}Vj(a);d=Il(e,c+88|0);pl(a,c- -64|0,0);Bm(e,9,q[q[b+24>>2]+8>>2],d,Il(e,c- -64|0));q[e+36>>2]=g;Ii=c+112|0} - - - -function vF(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;Oza(+a);b=Lza(1)|0;e=Lza(0)|0;a:{b:{c:{d:{if((b|0)>0?1:(b|0)>=0){f=b;if(b>>>0>1048575){break d}}if(!(b&2147483647|e)){return-1/(a*a)}if((b|0)>-1){break c}return(a-a)/0}if(f>>>0>2146435071){break a}b=1072693248;g=-1023;if((f|0)!=1072693248){b=f;break b}if(e){break b}return 0}Oza(+(a*0x40000000000000));b=Lza(1)|0;e=Lza(0)|0;g=-1077}b=b+614242|0;d=+((b>>>20|0)+g|0);Mza(0,e|0);Mza(1,(b&1048575)+1072079006|0);a=+Nza()+ -1;c=a/(a+2);h=d*.6931471803691238;i=a;j=d*1.9082149292705877e-10;k=c;d=a*(a*.5);c=c*c;a=c*c;a=h+(i+(j+k*(d+(a*(a*(a*.15313837699209373+.22222198432149784)+.3999999999940942)+c*(a*(a*(a*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)))-d))}return a}function Eoa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;e=q[q[a+24>>2]>>2];d=q[a+16>>2];f=q[a+20>>2];if((d|0)==q[72582]&(f|0)==q[72583]){d=q[q[q[a+8>>2]+80>>2]>>2];a=q[e+16>>2];if(!a){a=q[q[e+4>>2]+96>>2]}return cm(d,a,b)|0}a:{if((d|0)==q[72584]&(f|0)==q[72585]){c=-12;if(!(o[a+40|0]&1)){break a}p[b+108>>1]=s[b+108>>1]|2;return cm(q[q[q[a+8>>2]+80>>2]>>2],xea(q[e+8>>2],q[a+32>>2],q[a+36>>2]),b)|0}if((d|0)==q[72578]&(f|0)==q[72579]){c=-12;if(!(o[a+40|0]&1)){break a}p[b+108>>1]=s[b+108>>1]|2;return cm(q[q[q[a+8>>2]+80>>2]>>2],zea(q[e+8>>2],q[a+32>>2],q[a+36>>2]),b)|0}c=-1;if(q[72604]!=(d|0)|q[72605]!=(f|0)){break a}c=-12;if(!(o[a+40|0]&1)){break a}p[b+108>>1]=s[b+108>>1]|2;c=cm(q[q[q[a+8>>2]+80>>2]>>2],bea(q[e+8>>2],q[a+32>>2],q[a+36>>2]),b)}return c|0}function DL(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-32|0;Ii=c;a:{b:{c:{if(a){e=q[a+4>>2];if(TB(e,c+28|0)){break a}f=qq(q[74072]);if(q[c+28>>2]){a=0;while(1){if(SB(e,a,c+16|0)){break b}if(Pr(e,q[c+16>>2],q[c+20>>2],c+12|0,c+8|0)){break b}h=q[c+16>>2];d=q[c+20>>2];g=q[c+12>>2];if((g&-5)==3){q[c>>2]=aj(h,d);Pi(4,62262,62270,c);um(f);break b}zt(f,h,d,q[c+8>>2],g>>>0<=8?q[(g<<2)+62620>>2]:0,0);a=a+1|0;if(a>>>0>2]){continue}break}}a=Kw(e);q[b>>2]=Mi[q[74955]](q[74072],f,a);um(f);if(!q[c+28>>2]){d=1;break a}a=0;while(1){q[c+16>>2]=0;if(lua(e,a,c+16|0)){break b}if(!(Mi[q[74956]](q[b>>2],a,s[c+16>>1])|0)){break c}d=1;a=a+1|0;if(a>>>0>2]){continue}break}break a}J(62185,62201,88,62239);G()}J(62313,62201,132,62239);G()}d=0}Ii=c+32|0;return d}function v0(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if(!_j(d+12|0,a+52|0)){l=!_j(d,a+40|0)}h=q[a+92>>2];i=(h>>>0>383?5:4)+l|0;k=h>>>0>i>>>0?i:2;i=k-1|0;o=(h+i>>>0)/(k>>>0)|0;m=1<>2];if(h){break c}}n=m&255;h=bk(n,36);if(!h){d=-19840;break a}if(i>>>0<=7){while(1){g=w(g,36)+h|0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;q[g+20>>2]=0;q[g+12>>2]=1;q[g+16>>2]=0;q[g+32>>2]=0;q[g+24>>2]=1;q[g+28>>2]=0;j=j+1|0;g=j&255;if(n>>>0>g>>>0){continue}break}}d=q0(a,h,d,k,o);if(d){break b}if(!l){break c}q[a+120>>2]=n;q[a+116>>2]=h}d=u0(a,b,c,h,m&255,k,o,e,f)}if(!(!h|q[a+116>>2]==(h|0))){if(i>>>0<=7){a=m&255;g=0;j=0;while(1){nm(w(g,36)+h|0);j=j+1|0;g=j&255;if(a>>>0>g>>>0){continue}break}}Ni(h)}if(d){break a}return 0}nm(b);return d}function Zwa(a,b,c){a:{if((r[b|0]|r[b+1|0]<<8)!=17011|c>>>0<78|((r[b+2|0]|r[b+3|0]<<8)!=19|(r[b+4|0]|r[b+5|0]<<8)!=77)){break a}if(!(r[b+17|0]|(r[b+18|0]<<8|r[b+19|0]<<16))|(r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24))+77>>>0>c>>>0|(!(r[b+14|0]|(r[b+15|0]<<8|r[b+16|0]<<16))|(r[b+17|0]|(r[b+18|0]<<8|r[b+19|0]<<16))>>>0>(r[b+14|0]|(r[b+15|0]<<8|r[b+16|0]<<16))>>>0)){break a}a=r[b+21|0]|r[b+22|0]<<8;b:{if(!r[b+20|0]){if((r[b+14|0]|(r[b+15|0]<<8|r[b+16|0]<<16))&1?a&4:0){break a}if((r[b+21|0]|r[b+22|0]<<8)&1){break b}break a}if(a&1){break a}}a=b+65|0;if((r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))>>>0>=c>>>0){break a}return c-(r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))>>>0>=w(r[b+14|0]|(r[b+15|0]<<8|r[b+16|0]<<16),23)>>>0}return 0}function T1(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=x(0),m=x(0);h=-13;f=q[239672];k=q[f+16>>2];if(k){Gj(k);f=q[239672]}g=q[f+80>>2];a:{if(!g){break a}g=q[q[f+76>>2]+(Cza(a,b,g)<<2)>>2];if((g|0)==-1){break a}j=q[f+84>>2];while(1){i=j+(g<<4)|0;if(q[i>>2]!=(a|0)|q[i+4>>2]!=(b|0)){g=q[i+12>>2];if((g|0)!=-1){continue}break a}break}a=0;c=x(x(t[f+33916>>2])*c);b:{if(c=x(0)){h=~~c>>>0;break b}h=0}c:{if((h|0)<=0){f=q[f+33920>>2];c=x(0);break c}b=w(q[(j+(g<<4)|0)+8>>2],1056)+f|0;g=q[b+1160>>2];f=q[f+33920>>2];c=x(0);while(1){j=b+136|0;g=g-1&63;i=g<<3;c=x(c+u[j+i>>2]);l=x(l+u[(i|4)+j>>2]);a=a+1|0;h=h-f|0;if((h|0)>0){continue}break}}m=c;c=x(w(a,f)>>>0);u[d>>2]=x(F(x(m/c)))/x(32767);u[e>>2]=x(F(x(l/c)))/x(32767);h=0}if(k){Bj(k)}return h}function pra(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;e=q[b>>2];h=q[e+8>>2]-q[e+12>>2]|0;f=yj(e,36);q[f+20>>2]=0;q[f+24>>2]=0;q[f+4>>2]=0;q[f+8>>2]=0;q[f+12>>2]=-2;q[f+16>>2]=-2;q[f>>2]=b;q[f+28>>2]=0;q[f+32>>2]=0;q[f+20>>2]=-2;ej(e,-1);q[f+12>>2]=zk(e,-1e4);vj(e,0,0);q[f+16>>2]=zk(e,-1e4);vj(e,0,0);i=zk(e,-1e4);q[f+4>>2]=c;q[f+20>>2]=i;a=q[a+16>>2];p[f+24>>1]=d;q[f+8>>2]=a;q[g>>2]=0;q[g+4>>2]=0;q[g+8>>2]=0;q[g+8>>2]=58;q[g+4>>2]=e;q[g>>2]=59;a=rra(g);q[f+28>>2]=a;c=q[b+36>>2];q[a+24>>2]=q[b+32>>2];q[a+28>>2]=c;q[a+32>>2]=q[b+40>>2];Zi(e,-1e4,14479);xj(e,-2);Ri(e,-2);rj(e,-1e4,q[f+12>>2]);yk(e);Az(q[f+8>>2]);a=q[e+8>>2];q[a+8>>2]=0;q[e+8>>2]=a+16;yk(e);if(h>>4!=q[e+8>>2]-q[e+12>>2]>>4){J(15852,15159,2658,17970);G()}Ii=g+16|0;return f}function iba(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{e=b&65535;d=q[a+32>>2];if(e>>>0<(q[a+36>>2]-d|0)/592>>>0){if(s[(d+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}d=d+w(e,592)|0;if(s[d+570>>1]!=(b&65535)){break a}c=c>2]=c;c:{if(!(q[d+464>>2]|q[d+468>>2])){break c}e=q[a+48>>2];a=q[a+52>>2]-e|0;if(!a){break c}d=d+472|0;a=(a|0)/72|0;g=a>>>0>1?a:1;a=0;while(1){f=e+w(a,72)|0;if(!((d|0)==q[f+4>>2]?q[f>>2]==(b|0):0)){a=a+1|0;if((g|0)!=(a|0)){continue}break c}break}d:{e:{f:{a=e+w(a,72)|0;switch(q[a+52>>2]-1|0){case 0:case 3:break f;case 1:case 4:break e;default:break d}}c=x(x(1)-c);break d}c=x(c*x(.5))}u[a+20>>2]=c*u[a+24>>2]}return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Ek(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=Ii-32|0;Ii=g;a:{b:{c:{if(!(!a|!b)){d=q[a>>2];if(!Rz(d,b,g)){while(1){b=q[d+88104>>2];q[d+88104>>2]=b?b:1;if(b){continue}break}e=d+4|0;b=q[d>>2];f=(q[d+8>>2]-b|0)/40|0;c=(q[d+4>>2]-b|0)/40|0;if((f|0)==(c|0)){if(o[d+12|0]&1){break c}Wi(c+32|0,40,d,d+8|0,e);b=q[d>>2];h=(q[d+8>>2]-b|0)/40|0}else{h=f}f=c+1|0;if(h>>>0>>0){break b}q[e>>2]=w(f,40)+b;if(!f){break a}c=w(c,40)+b|0;b=g;e=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=e;e=q[b+28>>2];q[c+24>>2]=q[b+24>>2];q[c+28>>2]=e;e=q[b+20>>2];q[c+16>>2]=q[b+16>>2];q[c+20>>2]=e;e=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=e;p[c+32>>1]=q[a+4>>2];q[d+88104>>2]=0}}Ii=g+32|0;return}J(30765,29794,493,30840);G()}J(29861,29794,506,29880);G()}J(30245,29794,435,30256);G()}function ND(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;q[g+12>>2]=0;q[g+8>>2]=0;a:{b:{if(a){i=-16512;b=a-3|0;c:{if(b>>>0<=5){b=q[(b<<2)+263e3>>2];break c}b=0}if(!b){break a}if(IW(a,g+8|0,g+12|0)){break a}b=(b?q[b+8>>2]:0)&255;h=q[g+12>>2];if((b+h|0)+8>>>0>127){break a}j=b+10|0;f=j+h|0;if(f>>>0>>0){break a}if(d>>>0>=f>>>0){break b}break a}i=-16512;f=b;if(f>>>0>d>>>0){break a}}f=d-f|0;if(f>>>0<11){break a}o[e|0]=0;o[e+1|0]=1;i=0;f=f-3|0;f=Ui(e+2|0,255,f)+f|0;o[f|0]=0;f=f+1|0;if(!a){Ti(f,c,b);break a}o[f|0]=48;o[f+5|0]=h;o[f+4|0]=6;o[f+3|0]=h+4;o[f+2|0]=48;o[f+1|0]=(b+h|0)+8;a=Ti(f+6|0,q[g+8>>2],h)+h|0;o[a+3|0]=b;o[a+2|0]=4;o[a|0]=5;o[a+1|0]=0;if((Ti(a+4|0,c,b)+b|0)==(d+e|0)){break a}Mi[q[65677]](e,0,d)|0;i=-16512}Ii=g+16|0;return i}function UO(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-576|0;Ii=c;i=-1;a:{if(!a|(b|0)<0|(q[a+20>>2]!=1|t[a+16>>2]<=b>>>0)){break a}e=q[a+72>>2];d=q[e>>2];if(!d){break a}d=d+q[q[e+16>>2]+(b<<2)>>2]|0;g=r[d+28|0]|r[d+29|0]<<8;e=bk(g+1|0,1);b:{if(!e|!g){break b}h=d+46|0;d=e;while(1){f=r[h|0];c:{if((f|0)!=92){if(f){break c}break b}f=47}h=h+1|0;o[d|0]=f;d=d+1|0;j=j+1|0;if((j|0)!=(g|0)){continue}break}}q[a+92>>2]=e;if(!e){break a}if(!ey(a,b,c)){break a}q[a+88>>2]=b;b=q[c+28>>2];q[a+104>>2]=q[c+24>>2];q[a+108>>2]=b;b=q[c+36>>2];q[a+96>>2]=q[c+32>>2];q[a+100>>2]=b;q[a+112>>2]=q[c+16>>2];q[a+120>>2]=q[c+4>>2];q[a+124>>2]=0;b=q[c+52>>2];q[a+160>>2]=q[c+48>>2];q[a+164>>2]=b;p[a+168>>1]=s[c+14>>1];q[a+319468>>2]=q[c+44>>2];i=0}Ii=c+576|0;return i}function ty(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-80|0;Ii=e;d=q[a>>2];if(d){d=q[d+8>>2]}else{d=0}f=d&255;o[e+79|0]=0;d=(b|0)!=0&(c|0)!=0;h=d?2:1;g=a+12|0;a:{b:{if(d){while(1){d=bn(a);if(d){break a}d=il(a,g,f);if(d){break a}d=il(a,e+79|0,1);if(d){break a}d=il(a,b,c);if(d){break a}d=em(a,e);if(d){break a}d=ep(a,e,f);if(d){break a}d=il(a,g,f);if(d){break a}d=em(a,g);if(d){break a}d=r[e+79|0]+1|0;o[e+79|0]=d;if((d&255)>>>0>>0){continue}break b}}while(1){d=bn(a);if(d){break a}d=il(a,g,f);if(d){break a}d=il(a,e+79|0,1);if(d){break a}d=em(a,e);if(d){break a}d=ep(a,e,f);if(d){break a}d=il(a,g,f);if(d){break a}d=em(a,g);if(d){break a}b=r[e+79|0]+1|0;o[e+79|0]=b;if((b&255)>>>0>>0){continue}break}}d=0}Mi[q[65677]](e,0,64)|0;Ii=e+80|0;return d}function p_(a){var b=0,c=x(0),d=x(0),e=x(0),f=x(0),g=0,h=x(0);b=(Pza(a),Lza(2));a:{b:{if(!((b|0)>-1?b>>>0>=8388608:0)){if(!(b&2147483647)){return x(x(-1)/x(a*a))}if((b|0)<=-1){return x(x(a-a)/x(0))}b=(Pza(x(a*x(33554432))),Lza(2));g=-152;break b}if(b>>>0>2139095039){break a}g=-127;a=x(0);if((b|0)==1065353216){break a}}b=b+4913933|0;a=x((Mza(2,(b&8388607)+1060439283|0),Qza())+x(-1));c=x(a*x(a*x(.5)));d=x(a/x(a+x(2)));e=x(d*d);f=x(e*e);h=a;a=(Mza(2,(Pza(x(a-c)),Lza(2))&-4096),Qza());c=x(x(x(h-a)-c)+x(d*x(c+x(x(e*x(x(f*x(.2849878668785095))+x(.6666666269302368)))+x(f*x(x(f*x(.24279078841209412))+x(.40000972151756287)))))));a=x(x(x(a*x(1.44287109375))+x(x(c*x(1.44287109375))+x(x(c+a)*x(-.00017605285393074155))))+x((b>>>23|0)+g|0))}return a}function Z3(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=0,g=0,h=x(0);b=Ii-80|0;Ii=b;f=_i(a,1,q[210436],0);c=u[f>>2];e=u[f+4>>2];a:{if(!(c!=c|e!=e)){d=u[f+8>>2];if(d==d){break a}}d=u[f+8>>2];v[b- -64>>3]=e;v[b+72>>3]=d;v[b+56>>3]=c;q[b+48>>2]=1;Qi(a,134131,b+48|0)}g=_i(a,2,q[210436],0);c=u[g>>2];e=u[g+4>>2];b:{if(!(c!=c|e!=e)){d=u[g+8>>2];if(d==d){break b}}d=u[g+8>>2];v[b+32>>3]=e;v[b+40>>3]=d;v[b+24>>3]=c;q[b+16>>2]=2;Qi(a,134131,b+16|0);d=u[g+8>>2];e=u[g+4>>2];c=u[g>>2]}h=x(x(x(c*c)+x(e*e))+x(d*d));c:{if(h==x(0)){q[b+12>>2]=135644;q[b+8>>2]=134064;q[b+4>>2]=134e3;q[b>>2]=134064;a=Qi(a,136168,b);break c}c=x(x(x(x(c*u[f>>2])+x(e*u[f+4>>2]))+x(d*u[f+8>>2]))/h);f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=c;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=b+80|0;return a|0}function V3(a){a=a|0;var b=x(0),c=0,d=0,e=x(0),f=x(0),g=x(0),h=0,i=x(0),j=x(0),k=x(0);c=Ii+ -64|0;Ii=c;d=_i(a,1,q[210436],0);e=u[d>>2];f=u[d+4>>2];a:{if(!(e!=e|f!=f)){b=u[d+8>>2];if(b==b){break a}}b=u[d+8>>2];v[c+48>>3]=f;v[c+56>>3]=b;v[c+40>>3]=e;q[c+32>>2]=1;Qi(a,134131,c+32|0)}h=_i(a,2,q[210436],0);e=u[h>>2];f=u[h+4>>2];b:{if(!(e!=e|f!=f)){b=u[h+8>>2];if(b==b){break b}}b=u[h+8>>2];v[c+16>>3]=f;v[c+24>>3]=b;v[c+8>>3]=e;q[c>>2]=2;Qi(a,134131,c);b=u[h+8>>2];f=u[h+4>>2];e=u[h>>2]}i=u[d+4>>2];j=u[d>>2];k=u[d+8>>2];d=yj(a,16);g=x(x(x(x(j*e)+x(i*f))+x(k*b))+x(1));g=x(F(x(g+g)));u[d+12>>2]=g*x(.5);g=x(x(1)/g);u[d+8>>2]=x(x(j*f)-x(e*i))*g;u[d+4>>2]=x(x(e*k)-x(j*b))*g;u[d>>2]=x(x(i*b)-x(f*k))*g;Zi(a,-1e4,134032);xj(a,-2);Ii=c- -64|0;return 1}function XM(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=Ii-32|0;Ii=e;a:{if(c){k=PM(b);b:{if(!Hw(b)){while(1){if(!vq(b,e+28|0)){f=2;break b}f=2;d=q[e+28>>2];i=d>>>3|0;if(!i){break b}l=d&7;c:{d:{j=r[c+24|0];e:{if(!j){break e}m=q[c+20>>2];g=0;while(1){h=w(g,24)+m|0;d=q[h+4>>2];if((d&4194303)!=(i|0)){g=g+1|0;if((j|0)!=(g|0)){continue}break e}break}if((d&-268435456)==805306368){sta(a,k,i);d=q[h+4>>2]}if((d&264241152)==46137344){break d}}f=KM(b,l);if(!f){break c}break b}if(!q[h+8>>2]){break a}if(!vq(b,e+24|0)){break b}d=e+8|0;q[d+8>>2]=0;q[d>>2]=0;q[d+4>>2]=0;if(!QM(b,q[e+24>>2],d)){break b}f=XM(a,d,q[h+8>>2]);if(f){break b}}if(!Hw(b)){continue}break}}f=0}Ii=e+32|0;return f}J(22273,22242,86,22328);G()}J(22346,22242,124,22328);G()}function $8(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{b:{c:{h=b&65535;g=q[a+4>>2];a=q[a>>2];if(h>>>0>2>>>0){h=q[a+(h<<2)>>2];if(s[h+80>>1]!=(b>>>16|0)){break c}g=q[h+4>>2];a=q[h>>2];b=g-a|0;if(!b){break b}b=(b|0)/304|0;if((a|0)!=(g|0)){k=b>>>0>1?b:1;g=0;while(1){b=w(g,304)+a|0;d:{if((c|0)!=q[b+128>>2]|(d|0)!=q[b+132>>2]){break d}i=q[b+72>>2];a=q[b+76>>2]-i|0;if(!a){break d}l=b+72|0;a=(a|0)/96|0;m=a>>>0>1?a:1;a=0;while(1){j=w(a,96)+i|0;if(q[j>>2]==(e|0)&q[j+4>>2]==(f|0)){sua(l,a);o[b+296|0]=r[b+296|0]|16;break d}a=a+1|0;if((m|0)!=(a|0)){continue}break}}g=g+1|0;if((k|0)==(g|0)){break b}a=q[h>>2];if((q[h+4>>2]-a|0)/304>>>0>g>>>0){continue}break}}break a}break a}Pi(4,150692,151414,0);G()}return}J(151947,151192,479,151403);G()}function vfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;a=Ii-16|0;Ii=a;e=bb()|0;a:{b:{c:{d:{if(r[q[75054]+156|0]&64){f=K()|0;if(f){break d}}Aa(e|0,q[c>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break c}}Aa(e|0,q[d>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break b}}Ga(e|0);fa(e|0,35714,a+12|0);c=q[a+12>>2];e:{if(!c){fa(e|0,35716,a+8|0);b=q[a+8>>2];if((b|0)>=1){d=b;b=Yi(b);Za(e|0,d|0,a+8|0,b|0);q[a>>2]=b;Pi(4,88531,92058,a);Ni(b)}xa(e|0);break e}xa(e|0);Ga(q[b>>2]);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break a}}OK(b)}Ii=a+16|0;return(c|0)!=0|0}lj(f,92234,2136);J(88669,88575,2136,92234);G()}lj(c,92234,2138);J(88669,88575,2138,92234);G()}lj(c,92234,2140);J(88669,88575,2140,92234);G()}lj(d,92214,2174);J(88669,88575,2174,92214);G()}function lla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-112|0;Ii=b;f=jk(a);c=q[a+8>>2]-q[a+12>>2]>>4;a:{if((c|0)<=0){a=Qi(a,72759,0);break a}e=nj(b+88|0,a,0,72626,175);q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);b:{c:{if((c|0)==1){break c}if(!Vi(a,2)){break c}Zi(a,-10002,122801);c=qj(a,-1);Ri(a,-2);a=rp(c,-1);if(!a){a=Kj(e,72808,0);break b}q[b+80>>2]=0;q[b+76>>2]=a;q[b+64>>2]=567;c=q[b+56>>2];d=q[b+60>>2];a=!(c|d);d=a?q[b+52>>2]:d;q[b+68>>2]=a?q[b+48>>2]:c;q[b+72>>2]=d;d=20}c=q[58902];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],f,c,b- -64|0,d);a=0}mj(e)}Ii=b+112|0;return a|0}function St(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;c=q[a+48>>2];o[e+10|0]=0;q[e+4>>2]=-1;b=r[c+50|0];o[e+9|0]=0;o[e+8|0]=b;q[e>>2]=q[c+20>>2];q[c+20>>2]=e;d=q[a+52>>2];b=s[d+52>>1]+1|0;p[d+52>>1]=b;if((b&65535)>>>0>=201){gm(a,141933,0)}while(1){b=q[a+16>>2]-260|0;if(!(1<>>0<=27:0)){b=qu(a);if(q[a+16>>2]==59){Vj(a)}d=q[a+48>>2];q[d+36>>2]=r[d+50|0];if(!b){continue}}break}a=q[a+52>>2];p[a+52>>1]=s[a+52>>1]-1;d=q[c+20>>2];q[c+20>>2]=q[d>>2];b=q[q[c+12>>2]+48>>2];a=r[b+50|0];f=r[d+8|0];if(a>>>0>f>>>0){g=q[b+24>>2];h=q[q[b>>2]+24>>2];while(1){a=a-1|0;q[(w(s[(b+(a<<1)|0)+172>>1],12)+h|0)+8>>2]=g;if(a>>>0>f>>>0){continue}break}o[b+50|0]=a}if(r[d+9|0]){Bm(c,35,f,0,0)}q[c+36>>2]=r[c+50|0];dn(c,q[d+4>>2]);Ii=e+16|0}function S9(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{if(!q[a- -64>>2]){break b}d=q[a+76>>2];if(!d){break b}c=q[a+44>>2];c:{if(!c){c=0;break c}while(1){b=q[q[a+40>>2]+(e<<2)>>2];if((b|0)!=-1){while(1){f=q[a+48>>2]+w(b,12)|0;d:{if(!r[f+4|0]){break d}c=q[f>>2];e:{g=q[d+12>>2];b=q[d+16>>2];if((g|0)==(b|0)){break e}i=b-g>>2;b=0;while(1){h=q[(b<<2)+g>>2];if((c|0)!=r[h+344|0]){b=b+1|0;if(i>>>0>b>>>0){continue}break e}break}oA(d,h,c);break d}c=lm(d,c);if(!c){break d}b=q[d+16>>2];if((b|0)==q[d+20>>2]){break a}q[d+16>>2]=b+4;q[b>>2]=c}b=q[f+8>>2];if((b|0)!=-1){continue}break}c=q[a+44>>2]}e=e+1|0;if(e>>>0>>0){continue}break}}Ui(q[a+40>>2],255,c<<2);q[a+60>>2]=-1;q[a+64>>2]=0;q[a+52>>2]=q[a+48>>2]}return}J(150049,149779,533,150073);G()}function l7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-48|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){c=jj(a,1);e=jj(a,2);f=jj(a,3);g=jj(a,4);q[b+16>>2]=c;q[b+20>>2]=c>>31;q[b+8>>2]=6;q[b+40>>2]=g;q[b+44>>2]=g>>31;q[b+32>>2]=f;q[b+36>>2]=f>>31;q[b+24>>2]=e;q[b+28>>2]=e>>31;c=q[d+4>>2];a:{if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+44>>2];q[c+32>>2]=q[b+40>>2];q[c+36>>2]=a;a=q[b+36>>2];q[c+24>>2]=q[b+32>>2];q[c+28>>2]=a;a=q[b+28>>2];q[c+16>>2]=q[b+24>>2];q[c+20>>2]=a;a=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=a;a=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=a;a=0;break a}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+48|0;return a|0}J(115568,115465,478,119531);G()}function M1(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=-13;f=q[239672];i=q[f+16>>2];if(i){Gj(i);f=q[239672]}d=q[f+80>>2];a:{if(!d){break a}d=q[q[f+76>>2]+(Cza(a,b,d)<<2)>>2];if((d|0)==-1){break a}h=q[f+84>>2];while(1){g=h+(d<<4)|0;if(q[g>>2]!=(a|0)|q[g+4>>2]!=(b|0)){d=q[g+12>>2];if((d|0)!=-1){continue}break a}break}h=h+(d<<4)|0;e=q[f+24>>2];g=q[f+20>>2];d=e-g|0;b:{if(d){e=g-e|0;e=((d|0)<(e|0)?e:d)>>>6|0;d=(d|0)>-1?d:-1;d=w(e,(d|0)<1?d:1);j=d>>>0>1?d:1;d=0;while(1){e=g+(d<<6)|0;if(!((a|0)!=q[e+8>>2]|q[e+12>>2]!=(b|0)|(q[e+44>>2]?0:!(r[e+60|0]&4))|u[e+16>>2]==x(0))){d=q[h+8>>2];break b}d=d+1|0;if((j|0)!=(d|0)){continue}break}}d=q[h+8>>2];a=w(d,1056)+f|0;u[a+124>>2]=c;q[a+120>>2]=0}u[(w(d,1056)+f|0)+128>>2]=c;e=0}if(i){Bj(i)}return e}function Nj(a,b){var c=0,d=0,e=0;c=q[a+112>>2];if(!c){o[a+6|0]=b;if(q[q[a+16>>2]+88>>2]){c=q[a+40>>2];q[a+20>>2]=c;c=q[c>>2];q[a+12>>2]=c;Jo(a,c);c=q[a+12>>2];d=c;a:{b:{c:{switch(b-2|0){case 2:q[c>>2]=Yj(a,140846,17);b=4;break b;case 3:q[c>>2]=Yj(a,140864,23);b=4;break b;case 0:case 1:break c;default:break a}}b=q[a+8>>2]-16|0;e=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=e;b=q[b+8>>2]}q[d+8>>2]=b}o[a+57|0]=1;q[a+8>>2]=c+16;p[a+52>>1]=s[a+54>>1];b=q[a+48>>2];d:{if((b|0)<20001){break d}c=q[a+40>>2];if((q[a+20>>2]-c|0)>479975){break d}b=Cj(a,c,w(b,24),48e4);q[a+48>>2]=2e4;q[a+40>>2]=b;q[a+36>>2]=b+479976;q[a+20>>2]=b+w((q[a+20>>2]-c|0)/24|0,24)}q[a+112>>2]=0;q[a+116>>2]=0;Mi[q[q[a+16>>2]+88>>2]](a)|0}Ja(1);G()}q[c+160>>2]=b;O(c+4|0,1);G()}function J3(a,b,c,d){var e=0,f=0,g=0,h=0;e=a?q[a+120>>2]:0;h=q[e+8>>2]-q[e+12>>2]>>4;a:{f=q[a+44>>2];if(!f){break a}g=q[q[a+40>>2]+(Cza(c,d,f)<<2)>>2];if((g|0)==-1){break a}f=q[a+48>>2];while(1){a=f+(g<<4)|0;if(q[a>>2]!=(c|0)|q[a+4>>2]!=(d|0)){g=q[a+12>>2];if((g|0)!=-1){continue}break a}break}a=q[b+16>>2];c=q[(a?12:0)+b>>2];d=q[(f+(g<<4)|0)+8>>2];b=q[(a?16:4)+b>>2];a=ul(q[d>>2],b);q[d+4>>2]=b;q[d>>2]=a;Ti(a,c,b);b:{if(HG(e,c,b,q[d+8>>2])){Xi(e,q[d+8>>2]);a=Pm(e,1,-1);b=q[e+8>>2]-q[e+12>>2]>>4;if(!a){break b}if((b|0)==(h|0)){break a}J(128005,128026,173,128051);G()}if((h|0)==q[e+8>>2]-q[e+12>>2]>>4){break a}J(128005,128026,181,128051);G()}Ri(e,h+(b^-1)|0);if((h|0)==q[e+8>>2]-q[e+12>>2]>>4){break a}J(128005,128026,184,128051);G()}}function dua(a,b){var c=0,d=0;q[a+8>>2]=0;q[a+12>>2]=0;c=a+16|0;q[c>>2]=0;q[c+4>>2]=0;d=q[b>>2];q[a>>2]=q[b+4>>2];q[a+4>>2]=0;q[a+28>>2]=Wj();a:{b:{if(!(o[a+20|0]&1)){Wi(d,64,a+8|0,c,a+12|0);b=q[a+8>>2];if(q[c>>2]-b>>6>>>0>>0){break b}q[a+12>>2]=(d<<6)+b;if(!d){break a}c=0;while(1){b=(c<<6)+b|0;q[b+48>>2]=0;q[b+52>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+40>>2]=0;q[b+44>>2]=-1;q[b+48>>2]=0;c=c+1|0;if((d|0)==(c|0)){break a}b=q[a+8>>2];if(q[a+12>>2]-b>>6>>>0>c>>>0){continue}break}J(167814,167666,479,167825);G()}J(167591,167666,493,167692);G()}J(167704,167666,506,167723);G()}p[a+24>>1]=0;o[a+32|0]=r[a+32|0]|1}function bl(a,b,c){var d=0;a:{if((a|0)==(b|0)){break a}if((b-a|0)-c>>>0<=0-(c<<1)>>>0){return Ti(a,b,c)}d=(a^b)&3;b:{c:{if(a>>>0>>0){if(d){d=a;break b}if(!(a&3)){d=a;break c}d=a;while(1){if(!c){break a}o[d|0]=r[b|0];b=b+1|0;c=c-1|0;d=d+1|0;if(d&3){continue}break}break c}d:{if(d){break d}if(a+c&3){while(1){if(!c){break a}c=c-1|0;d=c+a|0;o[d|0]=r[b+c|0];if(d&3){continue}break}}if(c>>>0<=3){break d}while(1){c=c-4|0;q[c+a>>2]=q[b+c>>2];if(c>>>0>3){continue}break}}if(!c){break a}while(1){c=c-1|0;o[c+a|0]=r[b+c|0];if(c){continue}break}break a}if(c>>>0<=3){break b}while(1){q[d>>2]=q[b>>2];b=b+4|0;d=d+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}while(1){o[d|0]=r[b|0];d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}return a}function yv(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-1056|0;Ii=e;q[e+1048>>2]=0;a:{b:{c:{d:{if(b){if(!c){break d}if(!d){break c}q[c>>2]=0;q[d>>2]=0;f=r[b|0];e:{if((f|0)!=47){if(!f){Pi(4,24640,24649,0);b=-3;break e}q[e>>2]=b;Pi(4,24640,24669,e);b=-3;break e}i=q[a+5140>>2];Gj(i);Mo(b,e+16|0);f=a+7368|0;g=a+7372|0;h=a+7376|0;b=q[a+7368>>2];if((q[h>>2]-b|0)!=1048576){if(o[a+7380|0]&1){break b}Wi(1048576,1,f,h,a+7372|0);b=q[a+7368>>2]}q[g>>2]=b;b=zv(a,e+16|0,e+12|0,f);if(!b){a=q[f>>2];h=c;c=q[e+12>>2];g=Yi(c);q[h>>2]=g;if((a|0)!=q[f>>2]){break a}Ti(g,a,c);q[d>>2]=c}Bj(i)}Ii=e+1056|0;return b}J(24992,24997,869,25255);G()}J(25032,24997,870,25255);G()}J(25262,24997,871,25255);G()}J(26803,26878,493,26726);G()}J(25276,24997,891,25255);G()}function VO(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-576|0;Ii=c;h=-1;a:{if(!a|!b){break a}f=hj(b);if(!f){break a}b:{d=bk(f+1|0,1);if(d){g=d;while(1){c:{e=r[b|0];d:{if((e|0)!=92){if(e){break d}break c}e=47}b=b+1|0;o[g|0]=e;g=g+1|0;i=i+1|0;if((i|0)!=(f|0)){continue}}break}q[a+92>>2]=d;e:{if(q[a+20>>2]!=1){break e}b=rU(a,d);q[a+88>>2]=b;if((b|0)<0){break e}if(ey(a,b,c)){break b}d=q[a+92>>2]}if(!d){break a}Ni(d);q[a+92>>2]=0;break a}q[a+92>>2]=0;break a}b=q[c+28>>2];q[a+104>>2]=q[c+24>>2];q[a+108>>2]=b;b=q[c+36>>2];q[a+96>>2]=q[c+32>>2];q[a+100>>2]=b;q[a+112>>2]=q[c+16>>2];q[a+120>>2]=q[c+4>>2];q[a+124>>2]=0;b=q[c+52>>2];q[a+160>>2]=q[c+48>>2];q[a+164>>2]=b;p[a+168>>1]=s[c+14>>1];q[a+319468>>2]=q[c+44>>2];h=0}Ii=c+576|0;return h}function RK(a){var b=0,c=0,d=0,e=x(0),f=x(0),g=0,h=0,i=0,j=0,k=0,l=0;g=q[a+184>>2];d=g;b=q[a+196>>2];if(!b){b=q[q[a+188>>2]+4>>2]}c=d;d=q[b+64>>2];if(c>>>0>2]){e=u[a+224>>2];j=q[d+4>>2];b=j+w(g,40)|0;c=q[b+24>>2];f=(c|0)==2?x(1):(c|0)==4?x(1):x(0);k=q[b+12>>2];h=q[b+16>>2]-k|0;i=(h<<1)-2|0;c=c-5>>>0<2?i?i:1:h;e=x(x(e+x(f-x(f*x(e+e))))*x(c>>>0));a:{if(e=x(0)){b=~~e>>>0;break a}b=0}l=q[a+216>>2];c=c-1|0;b=b>>>0>c>>>0?c:b;c=b>>>0>>0?b:i-b|0;q[a+216>>2]=c;if(!((c|0)==(l|0)|q[q[q[a+188>>2]>>2]+48>>2]!=1)){b=a;b:{if(q[d+60>>2]){d=q[d+56>>2]+(c+k<<3)|0;e=u[d+4>>2];f=u[d>>2];break b}d=w(g,40)+j|0;e=x(t[d+8>>2]);f=x(t[d+4>>2])}u[b+64>>2]=f;q[a+72>>2]=1065353216;u[a+68>>2]=e}return}J(53297,53309,88,53341);G()}function v7(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii+ -64|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){e=fj(a,1);a:{if(e<4294967296&e>=0){c=~~e>>>0;break a}c=0}b:{if(c>>>0>=8){q[b+4>>2]=c;q[b>>2]=115561;a=Qi(a,117589,b);break b}q[b+32>>2]=c;q[b+36>>2]=0;q[b+24>>2]=12;c=q[d+4>>2];if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+60>>2];q[c+32>>2]=q[b+56>>2];q[c+36>>2]=a;a=q[b+52>>2];q[c+24>>2]=q[b+48>>2];q[c+28>>2]=a;a=q[b+44>>2];q[c+16>>2]=q[b+40>>2];q[c+20>>2]=a;a=q[b+36>>2];q[c+8>>2]=q[b+32>>2];q[c+12>>2]=a;a=q[b+28>>2];q[c>>2]=q[b+24>>2];q[c+4>>2]=a;a=0;break b}q[b+16>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b+16|0)}Ii=b- -64|0;return a|0}J(115568,115465,478,119531);G()}function zqa(a){a=a|0;var b=0,c=0,d=0;d=Ii-16|0;Ii=d;b=q[a+8>>2]-q[a+12>>2]>>4;a:{if((b|0)>=3){c=Qi(a,16535,0);break a}b:{if(!b){break b}c:{d:{e:{if((Vi(a,1)|0)==1){if((b|0)<2){break e}c=Qi(a,16577,0);break a}c=0;if((b|0)<2){break d}b=1;if((Vi(a,2)|0)==1){c=Uj(a,2);Ri(a,-2);c=(c|0)!=0;break c}c=Qi(a,16642,0);break a}c=Uj(a,1);Ri(a,-2);b=b-1|0;c=(c|0)!=0}if(!b){break b}}if((Vi(a,1)|0)==5){c=sM(a,c);if(c){break a}c=0;if(q[a+8>>2]-q[a+12>>2]>>4==(b|0)){break a}J(16684,15159,2082,16706);G()}if(Vi(a,1)){break b}Pi(3,14825,16720,0)}b=Zm(a,1);if((q[b+136>>2]&1024)>>>10|0){q[d>>2]=aj(q[b+96>>2],q[b+100>>2]);c=Qi(a,16774,d);break a}if(q[b+136>>2]&2048){GG(a,q[b+96>>2],q[b+100>>2])}Ew(q[q[b+80>>2]+8>>2],b,c);c=0}Ii=d+16|0;return c|0}function Gca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Ii-16|0;Ii=d;c=1;e=q[a+8>>2]-q[a+12>>2]>>4;g=$j(a,1);h=Li;i=jj(a,2);j=jj(a,3);b=kj(a,4,0);Dj(a,5,4);k=uj(a,5,d+12|0);gj(a);l=_i(a,-1,q[213927],204267);Ri(a,-2);if((e|0)>=6){Dj(a,6,1);c=!Uj(a,6)}a:{if(!dj(b,206505)){break a}if(!dj(b,206509)){f=1;break a}if(!dj(b,206514)){f=2;break a}q[d>>2]=b;Qi(a,206516,d)}b=Gba(l,g,h,i,j,f,c,k,q[d+12>>2]);b:{if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break b}c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=0;q[a+8>>2]=q[a+8>>2]+16;c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16}if((e+2|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(206466,202233,1783,206491);G()}Ii=d+16|0;return 2}function Yj(a,b,c){var d=0,e=0,f=0,g=0;f=c;e=c>>>5|0;if(e>>>0>>0){g=e^-1;d=c;f=d;while(1){f=r[(b+d|0)-1|0]+((f<<5)+(f>>>2|0)|0)^f;d=d+g|0;if(e>>>0>>0){continue}break}}e=q[a+16>>2];d=q[q[e>>2]+((q[e+8>>2]-1&f)<<2)>>2];a:{if(d){while(1){b:{if(q[d+12>>2]!=(c|0)){break b}if(Ej(b,d+16|0,c)){break b}a=r[d+5|0];if(!(a&(r[e+20|0]^-1)&3)){break a}o[d+5|0]=a^3;return d}d=q[d>>2];if(d){continue}break}}if(c+1>>>0>=4294967278){mk(a)}d=Cj(a,0,0,c+17|0);q[d+8>>2]=f;q[d+12>>2]=c;e=r[q[a+16>>2]+20|0];o[d+6|0]=0;o[d+4|0]=4;o[d+5|0]=e&3;o[Ti(d+16|0,b,c)+c|0]=0;b=q[a+16>>2];c=(q[b+8>>2]-1&f)<<2;q[d>>2]=q[c+q[b>>2]>>2];q[c+q[b>>2]>>2]=d;c=q[b+4>>2]+1|0;q[b+4>>2]=c;b=q[b+8>>2];if(b>>>0>=c>>>0|(b|0)>1073741822){break a}Fy(a,b<<1)}return d}function Oha(a,b,c,d,e){var f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{f=q[a+4>>2];g=q[a>>2];h=f-g|0;if((h|0)<1){break e}f:{if((f|0)!=(g|0)){f=g-f|0;f=((f|0)>(h|0)?f:h)>>>2|0;h=f>>>0>1?f:1;f=0;while(1){g=q[(f<<2)+g>>2];if((b|0)==q[g+8>>2]&q[g+12>>2]==(c|0)){break f}f=f+1|0;if((h|0)==(f|0)){break e}g=q[a>>2];if(q[a+4>>2]-g>>2>>>0>f>>>0){continue}break}}break a}g=q[a>>2];if(q[a+4>>2]-g>>2>>>0<=f>>>0){break a}g=q[g+(f<<2)>>2];break d}h=a+4|0;g=Zz(b,c);f=q[a+4>>2];i=q[a+8>>2];if((f|0)==(i|0)){if(o[a+12|0]&1){break c}Wi((f-q[a>>2]>>2)+4|0,4,a,a+8|0,h);i=q[a+8>>2];f=q[a+4>>2]}if((f|0)==(i|0)){break b}q[h>>2]=f+4;q[f>>2]=g}mt(g,d,e);SK(a,b,c,d,e);return}J(48075,47954,493,48150);G()}J(47930,47954,533,48010);G()}J(48162,47954,479,48173);G()}function Bga(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a:{b:{c:{d:{if(e>>>0<2097152){g=d;e:{if(g+1>>>0<2){break e}h=g&65535;if(h>>>0>=t[a+32>>2]){break d}i=q[q[a+24>>2]+(h<<2)>>2];if(!i){break e}f=s[q[a+28>>2]+(h<<1)>>1]==(g>>>16|0)?i:0}if(s[f+12>>1]<=c>>>0){break c}a=0;g=q[f>>2];if(g>>>0<=2){a=q[(g<<2)+94580>>2]}eb(q[(b<<2)+246e3>>2]);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}ga(a|0,q[q[f+4>>2]+(c<<2)>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}DK(d,e,q[f+40>>2],q[f+44>>2],q[f+48>>2],q[f+52>>2],x(1));return}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}J(94432,88575,3512,94464);G()}lj(b,94464,3521);J(88669,88575,3521,94464);G()}lj(a,94464,3523);J(88669,88575,3523,94464);G()}function kW(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0;i=Ii-1024|0;Ii=i;h=-16512;j=q[a+4>>2];if(!(q[a+164>>2]|j-16>>>0>1008)){h=Eu(a,b,c,e,i);if(!h){c=2;b=r[i|0]|r[i+1|0]^2;e=0;a=0;while(1){h=a;k=e;a=r[c+i|0];e=(((0-a|a)^-1)&128)>>>7|e;a=h+((((k|0-e)^-1)&128)>>>7|0)|0;c=c+1|0;if((j|0)!=(c|0)){continue}break}c=e&255;c=b|((0-c|c)>>31^-1)&1|a-8>>>31;h=(0-c|c)>>31;b=j-11|0;b=b>>>0>>0?b:g;e=(c|0-c)>>31;k=b&e|(j-a|0)-3&(e^-1);e=b-k>>>31|0;a=e;h=h&16640|(0-a|a)>>31&17408&(h^-1);if(j>>>0>=12){a=c|e;c=(0-a|a)>>31^-1;a=11;while(1){l=a+i|0;o[l|0]=c&r[l|0];a=a+1|0;if((j|0)!=(a|0)){continue}break}}a=(i+j|0)-b|0;c=(e|0-e)>>31;c=c&b|(c^-1)&k;dV(a,b,b-c|0);if(g){Ti(f,a,b)}q[d>>2]=c;h=0-h|0}Mi[q[65677]](i,0,1024)|0}Ii=i+1024|0;return h}function Cca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=x(0),n=x(0);b=Ii-16|0;Ii=b;j=q[a+8>>2]-q[a+12>>2]>>4;gj(a);k=-2;f=_i(a,-1,q[213927],204267);Ri(a,-2);l=tj(a,1,b+12|0);if((Vi(a,3)|0)==6){c=rp(a,3);rj(a,-1e4,q[f+8>>2]);ej(a,1);k=In(a,-2);Ri(a,-2)}a:{if((j|0)<4){d=1;break a}Dj(a,4,5);ej(a,4);Zi(a,-1,206373);g=0;b:{if(!Vi(a,-1)){break b}g=fj(a,-1)}Ri(a,-2);Zi(a,-1,206380);d=1;c:{if(!Vi(a,-1)){break c}d=fj(a,-1)}Ri(a,-2);Ri(a,-2)}m=x(d);n=x(g);h=$j(a,2);i=Li;e=q[b+12>>2];d:{if(c){c=Vv(f,e,h,i,n,m,1430,c,k);break d}c=Vv(f,e,h,i,n,m,0,0,0)}if(c){e=aj(h,i);q[b+4>>2]=aj(q[l+560>>2],q[l+564>>2]);q[b>>2]=e;Qi(a,206394,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(j|0)){J(202212,202233,1659,206450);G()}Ii=b+16|0;return 0}function no(a){var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;a:{c=q[a>>2];e=q[c+8>>2]-q[c+12>>2]>>4;if((e|0)>-1){d=q[a+4>>2];b:{if((d|0)!=-2){rj(c,-1e4,d);c:{if((Vi(c,-1)|0)!=5){break c}Ho(c,-1,q[a+16>>2]);Ho(c,-1,q[a+12>>2]);f=q[a+8>>2];if((f|0)==-2){break c}d=q[79288];if((d|0)<=0){Pi(4,122749,123218,0);d=q[79288]}q[79288]=d-1;Ho(c,-1e4,f)}q[a+12>>2]=-2;q[a+16>>2]=-2;q[a+4>>2]=-2;q[a+8>>2]=-2;Ri(c,-2);break b}Pi(3,122749,123537,0)}a=q[c+8>>2]-q[c+12>>2]>>4;if((a|0)!=(e|0)){break a}Ii=b+32|0;return}q[b+12>>2]=e;q[b+4>>2]=1632;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=e;q[b+20>>2]=1632;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function nD(a){var b=0;q[a+4>>2]=0;b=q[a+92>>2];if(b){Mi[b|0](q[a+88>>2],0,0)}q[a+244>>2]=0;q[a+248>>2]=0;q[a+124>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+252>>2]=0;q[a+256>>2]=0;q[a+260>>2]=0;q[a+264>>2]=0;q[a+268>>2]=0;q[a+272>>2]=0;oD(a);q[a+144>>2]=0;q[a+128>>2]=0;q[a+132>>2]=0;p[a+140>>1]=0;q[a+152>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;q[a+164>>2]=0;q[a+216>>2]=0;q[a+208>>2]=0;q[a+212>>2]=0;q[a+176>>2]=0;q[a+168>>2]=0;q[a+172>>2]=0;if(r[a+230|0]){o[a+230|0]=0}q[a+72>>2]=0;q[a+76>>2]=0;q[a+220>>2]=0;q[a+224>>2]=0;q[a+52>>2]=0;q[a+56>>2]=0;Ui(q[a+184>>2],0,16749);q[a+136>>2]=0;Ui(q[a+100>>2],0,16749);b=q[a+80>>2];if(b){ms(b);Ni(q[a+80>>2]);q[a+80>>2]=0}b=q[a+60>>2];if(b){ns(b);Ni(q[a+60>>2]);q[a+60>>2]=0}q[a+240>>2]=0;Kx(a)}function sM(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii-48|0;Ii=e;gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);f=q[q[q[c+4>>2]+80>>2]+8>>2];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;a:{if(Hj(a,1)){while(1){c=e;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;Gk(a,-1,c+16|0,0);d=0;g=0;b:{if(!f){break b}c=q[f>>2];if(!c){break b}d=q[c+3216>>2];g=q[c+3220>>2]}if((d|0)!=q[e+16>>2]|(g|0)!=q[e+20>>2]){Qi(a,18920,0)}d=jn(f,q[e+32>>2],q[e+36>>2]);c:{if(d){if((q[d+136>>2]&1024)>>>10|0){q[e>>2]=aj(q[d+96>>2],q[d+100>>2]);a=Qi(a,16774,e);break a}if(q[d+136>>2]&2048){GG(a,q[d+96>>2],q[d+100>>2])}Ew(f,d,b);break c}Pi(3,14825,18990,0)}Ri(a,-2);if(Hj(a,1)){continue}break}}a=0}Ii=e+48|0;return a}function bH(a,b,c,d,e){var f=0;f=Ii-3120|0;Ii=f;q[a+2220>>2]=-1;q[a+2212>>2]=-1;q[a+2216>>2]=0;q[a+2200>>2]=q[a+2196>>2];rH(a+140|0,c,f+2096|0);dG(f+2096|0,f+48|0);c=faa(q[a+2188>>2],b,f+48|0);a:{if(c){b=-2;a=q[a+2220>>2];if((a|0)==404){break a}if(!((a|0)==304|(c|0)!=1)){q[f+32>>2]=a;Pi(3,33041,33307,f+32|0);b=-3;break a}q[f+20>>2]=daa(c);q[f+16>>2]=c;Pi(4,33041,33339,f+16|0);b=-3;break a}if(!dj(b,33302)){q[d>>2]=q[a+2212>>2];b=0;break a}b:{if(q[a+2220>>2]==304){break b}b=q[a+2212>>2];if((b|0)==-1){break b}c=q[a+2216>>2];if((c|0)==(b|0)){break b}q[f+8>>2]=c;q[f+4>>2]=b;q[f>>2]=f+48;Pi(4,33041,33369,f)}b=-3;c=q[a+2216>>2];if(c>>>0>t[d>>2]){break a}q[d>>2]=c;b=0;if(!e){break a}Ti(e,q[a+2196>>2],c)}Ii=f+3120|0;return b}function Ij(a,b){var c=0,d=0,e=0;e=a;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];c=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}b=q[a+8>>2];e=Ky(e,q[c>>2],b-32|0);d=b-16|0;b=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=b;q[e+8>>2]=q[d+8>>2];b=q[a+8>>2];c:{if(q[b-8>>2]<4|!(r[q[b-16>>2]+5|0]&3)){break c}c=q[c>>2];if(!(r[c+5|0]&4)){break c}b=q[a+16>>2];o[c+5|0]=r[c+5|0]&251;q[c+24>>2]=q[b+40>>2];q[b+40>>2]=c;b=q[a+8>>2]}q[a+8>>2]=b-32}function wy(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;g=q[a+92>>2]+7|0;h=g>>>3|0;f=-20352;if(q[a+48>>2]){e=q[a+60>>2]?1:2}else{e=0}a:{b:{if((e|0)!=2){break b}while(1){e=$n(b,h,c,d);if(e){break a}if(!Ql(b)){continue}break}f=Ql(b)-1|0;e=q[a+92>>2];c:{if(f>>>0>e>>>0){e=kl(b,f-e|0);if(!e){break c}break a}e=dp(b,e,1);if(e){break a}}e=dp(b,0,0);if(e){break a}e=dp(b,1,0);if(e){break a}f=0;if(q[a+92>>2]!=254){break b}e=dp(b,2,0);if(e){break a}}e=f;if(q[a+48>>2]){f=q[a+60>>2]?1:2}else{f=0}if((f|0)!=1){break a}e=$n(b,h,c,d);if(e){break a}i=a+76|0;g=g&-8;f=0;while(1){e=kl(b,g-q[a+92>>2]|0);if(e){break a}if((f|0)==30){return-19712}if((Jj(b,1)|0)>=0){e=0;if((_j(b,i)|0)<0){break a}}f=f+1|0;e=$n(b,h,c,d);if(!e){continue}break}}return e}function rF(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;h=q[a+116>>2];q[a+116>>2]=e;i=r[a+57|0];f=q[a+40>>2];g=q[a+20>>2];j=s[a+52>>1];e=$u(a,b,c);a:{if(!e){break a}b=q[a+32>>2]+d|0;Jo(a,b);f=g-f|0;c=b;b:{c:{d:{switch(e-2|0){case 2:q[b>>2]=Yj(a,140846,17);d=4;break c;case 3:q[b>>2]=Yj(a,140864,23);d=4;break c;case 0:case 1:break d;default:break b}}d=q[a+8>>2]-16|0;g=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=g;d=q[d+8>>2]}q[c+8>>2]=d}p[a+52>>1]=j;q[a+8>>2]=b+16;c=q[a+40>>2];b=c+f|0;q[a+20>>2]=b;q[a+12>>2]=q[b>>2];q[a+24>>2]=q[b+12>>2];o[a+57|0]=i;b=q[a+48>>2];if((b|0)<20001|(f|0)>479975){break a}b=Cj(a,c,w(b,24),48e4);q[a+48>>2]=2e4;q[a+40>>2]=b;q[a+36>>2]=b+479976;q[a+20>>2]=b+w((q[a+20>>2]-c|0)/24|0,24)}q[a+116>>2]=h;return e}function n4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0),t=x(0),w=x(0),y=x(0);b=Ii-144|0;Ii=b;q[b+140>>2]=0;f=kj(a,1,b+140|0);c=Ym(a,2);d=q[b+140>>2]+350|0;e=$i((d|0)>-1?d:-1);g=u[c>>2];h=u[c+16>>2];i=u[c+32>>2];j=u[c+48>>2];k=u[c+4>>2];l=u[c+20>>2];m=u[c+36>>2];n=u[c+52>>2];o=u[c+8>>2];p=u[c+24>>2];r=u[c+40>>2];s=u[c+56>>2];t=u[c+12>>2];w=u[c+28>>2];y=u[c+44>>2];v[b+128>>3]=u[c+60>>2];v[b+120>>3]=y;v[b+112>>3]=w;v[b+104>>3]=t;v[b+96>>3]=s;v[b+88>>3]=r;v[b+80>>3]=p;v[b+72>>3]=o;v[b- -64>>3]=n;v[b+56>>3]=m;v[b+48>>3]=l;v[b+40>>3]=k;v[b+32>>3]=j;v[b+24>>3]=i;v[b+16>>3]=h;q[b>>2]=f;v[b+8>>3]=g;sj(e,d,135180,b);Xi(a,e);Ni(e);Ii=b+144|0;return 1}function hma(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=x(0);d=Ii-80|0;Ii=d;a:{c=q[a+80>>2];b:{if(!c|(c|0)!=q[60416]){break b}e=q[a+72>>2];c=kM(e,q[a+24>>2],q[a+28>>2],d+78|0);if(c){q[d>>2]=q[q[60416]+4>>2];q[d+4>>2]=c;Pi(4,37377,37419,d);o[b+4|0]=0;break b}f=r[q[b+12>>2]+140|0];c=q[q[q[e+80>>2]+8>>2]>>2];if(f>>>0>2]>>2]){c=q[(c+(f<<2)|0)+12>>2]}else{c=0}if(r[c+140|0]!=r[q[b+12>>2]+140|0]){break a}b=VH(d+16|0);u[b>>2]=u[a+96>>2];u[b+4>>2]=u[a+100>>2];u[b+8>>2]=u[a+104>>2];u[b+16>>2]=u[a+112>>2];u[b+20>>2]=u[a+116>>2];g=u[a+120>>2];q[b+32>>2]=e;u[b+24>>2]=g;p[b+40>>1]=q[a+128>>2];a=r[a+132|0];f=s[d+78>>1];q[b+36>>2]=e;q[b+44>>2]=a|f<<16;if(o[c+141|0]&1){break b}}Ii=d+80|0;return}J(37482,37552,842,37604);G()}function gsa(a){var b=0,c=0,d=0;a:{if(o[a+3256|0]&1){break a}b=q[a+3244>>2];if(!b){break a}Ni(b)}b:{if(o[a+3204|0]&1){break b}b=q[a+3192>>2];if(!b){break b}Ni(b)}c:{if(o[a+3188|0]&1){break c}b=q[a+3176>>2];if(!b){break c}Ni(b)}d:{if(o[a+3172|0]&1){break d}b=q[a+3152>>2];if(b){Ni(b)}b=q[a+3144>>2];if(!b){break d}Ni(b)}e:{if(o[a+3140|0]&1){break e}b=q[a+3128>>2];if(!b){break e}Ni(b)}c=a+3128|0;d=a+1080|0;while(1){b=c;c=b-16|0;f:{if(o[b-4|0]&1){break f}b=q[c>>2];if(!b){break f}Ni(b)}if((c|0)!=(d|0)){continue}break}g:{if(o[a+1076|0]&1){break g}b=q[a+1064>>2];if(!b){break g}Ni(b)}h:{if(o[a+1060|0]&1){break h}b=q[a+1052>>2];if(!b){break h}Ni(b)}i:{if(o[a+1048|0]&1){break i}b=q[a+1036>>2];if(!b){break i}Ni(b)}return a}function Sna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=q[a+8>>2];b=q[e+20>>2];f=q[q[a+16>>2]>>2];if(f>>>0>2]-b>>3>>>0){b=q[b+(f<<3)>>2];d=q[e+4>>2];if(b>>>0>2]-d>>2>>>0){c=q[q[q[a+4>>2]+80>>2]>>2];b=q[d+(b<<2)>>2];a=q[b+192>>2];if(a){cj(c,a)}a=q[b+160>>2];if(a){cj(c,a)}a=q[b+164>>2];if(a){cj(c,a)}a=q[b+168>>2];if(a){cj(c,a)}a=q[b+172>>2];if(a){cj(c,a)}a=q[b+176>>2];if(a){cj(c,a)}a=q[b+180>>2];if(a){cj(c,a)}a=q[b+184>>2];if(a){cj(c,a)}a=q[b+188>>2];if(a){cj(c,a)}g=q[b+152>>2];d=q[b+156>>2];if(!d){d=q[g+4>>2]}a=q[b+192>>2];if(!a){a=q[g+8>>2]}if(q[q[a>>2]+152>>2]==1){pB(e,q[d+8>>2],q[d+12>>2])}a=q[b+156>>2];if(a){cj(c,a)}a=q[b+148>>2];if(a){Hr(a)}Ni(b);D9(e+4|0,f);return 0}}J(46069,45367,479,46080);G()}function RV(a){var b=0,c=0;c=q[a+128>>2];a:{if((c|0)==22){b=IV(a);if(b){break a}c=q[a+128>>2]}b:{c:{switch(c-20|0){case 0:b=-29184;if(q[a+132>>2]!=1|r[q[a+120>>2]]!=1){break a}b=0;if(!(r[q[a>>2]+184|0]&2)){break a}d:{switch(q[a+4>>2]-10|0){case 0:case 2:break b;default:break d}}return q[a+68>>2]?-25728:-26368;case 1:b=-29184;if(q[a+132>>2]!=2){break a}b=-30592;e:{f:{a=q[a+120>>2];switch(r[a|0]-1|0){case 1:break a;case 0:break f;default:break e}}a=r[a+1|0];return a?(a|0)==100?0:-26240:-30848}return-26240;default:break c}}b=0;if(!(r[q[a>>2]+184|0]&2)){break a}if((c|0)!=23){break b}c=q[a+4>>2];if((c|0)==16){break b}b=-26240;if((c|0)!=2|q[a+8>>2]!=1){break a}}b=0;if(!q[a+68>>2]|q[a+4>>2]!=16){break a}sD(a)}return b}function l4(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=0,h=0;c=Ii-32|0;Ii=c;d=qj(a,1);q[c+12>>2]=0;b=kj(a,2,c+12|0);a:{b:{c:{switch(q[c+12>>2]-2|0){case 1:e=r[b+1|0];if((e&252)!=48){break b}b=r[b+2|0];if((b&252)!=48){break b}b=((b<<4)+d|0)-768|0;u[c+16>>2]=u[b>>2];u[c+20>>2]=u[b+4>>2];u[c+24>>2]=u[b+8>>2];u[c+28>>2]=u[b+12>>2];f=u[((e<<2)+c|0)-176>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=f;q[a+8>>2]=q[a+8>>2]+16;a=1;break a;case 0:break c;default:break b}}b=r[b+1|0];if((b&252)!=48){break b}b=((b<<4)+d|0)-768|0;d=q[b>>2];e=q[b+4>>2];g=q[b+12>>2];h=q[b+8>>2];b=yj(a,16);q[b+8>>2]=h;q[b+12>>2]=g;q[b>>2]=d;q[b+4>>2]=e;Zi(a,-1e4,134016);xj(a,-2);a=1;break a}q[c+4>>2]=134048;q[c>>2]=134064;a=Qi(a,135048,c)}Ii=c+32|0;return a|0}function Tna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=q[a+4>>2];i=b+108|0;j=b+104|0;a:{b:{e=q[b+104>>2];d=q[b+112>>2]-e>>2;f=q[b+120>>2];g=q[b+124>>2]-f|0;c=g>>2;h=q[b+108>>2];e=h-e>>2;if(d>>>0>>0){if(o[b+116|0]&1){break b}Wi(c+d|0,4,j,b+112|0,i);h=q[b+108>>2];c=q[b+104>>2];e=h-c>>2;d=q[b+112>>2]-c>>2;f=q[b+120>>2];g=q[b+124>>2]-f|0;c=g>>2}if(d-e>>>0>>0){break a}Ti(h,f,g);q[b+124>>2]=q[b+120>>2];c=q[b+108>>2]+(c<<2)|0;q[b+108>>2]=c;d=q[b+104>>2];if((c|0)!=(d|0)){c=0;while(1){Mi[q[74944]](q[(c<<2)+d>>2]);c=c+1|0;d=q[j>>2];if(c>>>0>2]-d>>2>>>0){continue}break}}c=q[b+140>>2];if(c){Ni(c)}lq(q[q[a>>2]+4>>2],212,b);qla(b);Ni(b);return 0}J(46186,45367,493,45053);G()}J(46261,45367,540,46290);G()}function yV(a){var b=0,c=0,d=0;b=q[q[q[a+68>>2]+1120>>2]+16>>2]-1|0;a:{if(b>>>0<=9){b=q[(b<<2)+181308>>2];break a}b=0}if(!(!b|(q[a+232>>2]?0:!(o[q[a>>2]+184|0]&1)))){b:{c:{b=q[a+68>>2];if(b){c=q[b+452>>2];if(c){break c}}c=q[q[a>>2]+84>>2];if(c){break c}b=0;break b}b=q[c>>2]}d:{if(!b){c=7;break d}c=7;while(1){d=q[b+8>>2];if(d>>>0>16381-c>>>0){return-29952}o[q[a+204>>2]+c|0]=d>>>16;o[(q[a+204>>2]+c|0)+1|0]=d>>>8;o[(q[a+204>>2]+c|0)+2|0]=d;c=c+3|0;Ti(c+q[a+204>>2]|0,q[b+12>>2],d);c=c+d|0;b=q[b+340>>2];if(b){continue}break}}b=c-7|0;o[q[a+204>>2]+4|0]=b>>>16;o[q[a+204>>2]+5|0]=b>>>8;o[q[a+204>>2]+6|0]=b;q[a+208>>2]=22;q[a+212>>2]=c;o[q[a+204>>2]]=11;q[a+4>>2]=q[a+4>>2]+1;return Pq(a)}q[a+4>>2]=q[a+4>>2]+1;return 0}function Ui(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;a:{if(!c){break a}d=a+c|0;o[d-1|0]=b;o[a|0]=b;if(c>>>0<3){break a}o[d-2|0]=b;o[a+1|0]=b;o[d-3|0]=b;o[a+2|0]=b;if(c>>>0<7){break a}o[d-4|0]=b;o[a+3|0]=b;if(c>>>0<9){break a}d=0-a&3;e=d+a|0;b=w(b&255,16843009);q[e>>2]=b;c=c-d&-4;d=c+e|0;q[d-4>>2]=b;if(c>>>0<9){break a}q[e+8>>2]=b;q[e+4>>2]=b;q[d-8>>2]=b;q[d-12>>2]=b;if(c>>>0<25){break a}q[e+24>>2]=b;q[e+20>>2]=b;q[e+16>>2]=b;q[e+12>>2]=b;q[d-16>>2]=b;q[d-20>>2]=b;q[d-24>>2]=b;q[d-28>>2]=b;g=e&4|24;c=c-g|0;if(c>>>0<32){break a}d=b;f=b;b=e+g|0;while(1){q[b+24>>2]=f;q[b+28>>2]=d;q[b+16>>2]=f;q[b+20>>2]=d;q[b+8>>2]=f;q[b+12>>2]=d;q[b>>2]=f;q[b+4>>2]=d;b=b+32|0;c=c-32|0;if(c>>>0>31){continue}break}}return a|0}function B1(a){var b=0,c=0,d=0,e=0,f=0;c=$i(28);q[c>>2]=0;q[c+4>>2]=0;o[c+24|0]=0;q[c+16>>2]=0;q[c+20>>2]=0;b=c+8|0;q[b>>2]=0;q[b+4>>2]=0;Wi(q[a>>2],12,c,b,c+4|0);a:{e=q[a>>2];f=q[b>>2];b=q[c>>2];if(e>>>0<=(f-b|0)/12>>>0){q[c+4>>2]=w(e,12)+b;if(!e){b=0;break a}while(1){b=w(d,12)+b|0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;b=q[a>>2];d=d+1|0;if(b>>>0<=d>>>0){break a}b=q[c>>2];if((q[c+4>>2]-b|0)/12>>>0>d>>>0){continue}break}J(209754,209659,479,209765);G()}J(209727,209659,506,209746);G()}d=s[c+20>>1];a=b&65535;if(d>>>0<=a>>>0){e=q[c+16>>2];f=Yi(a<<1);q[c+16>>2]=f;f=Ti(f,e,d<<1);p[c+20>>1]=b;if(a>>>0>d>>>0){while(1){p[f+(d<<1)>>1]=d;d=d+1|0;if((a|0)!=(d|0)){continue}break}}Ni(e);return c}J(209776,209799,112,209715);G()}function IP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=x(0),o=x(0),p=0,s=0;if(q[b+44>>2]==(f|0)){if(f){n=x(x(1)/x(f>>>0));c=q[b+4>>2];i=u[b+28>>2];g=x(t[a+4>>2]);j=x(x(u[b+32>>2]-i)/g);k=j;j=x(t[a>>2]);i=x(i+x(k*j));o=x(x(k+i)-i);h=u[b+16>>2];g=x(x(u[b+20>>2]-h)/g);k=g;g=x(h+x(g*j));j=x(x(k+g)-g);a=0;while(1){d=a<<1;p=r[d+c|0];h=x(n*x(a|0));l=x(+x(i+x(o*h))*1.5707963267948966);k=Nl(l);d=d|1;s=r[d+c|0];m=(a<<3)+e|0;h=x(g+x(j*h));u[m>>2]=u[m>>2]+x(k*x(h*x(x(x(p>>>0)+x(-128))*x(255))));l=Lk(l);d=(d<<2)+e|0;u[d>>2]=u[d>>2]+x(l*x(h*x(x(x(s>>>0)+x(-128))*x(255))));a=a+1|0;if((f|0)!=(a|0)){continue}break}}q[b+44>>2]=0;return}J(211205,210166,1019,211272);G()}function oia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+16>>2];c=Oi(61138);e=Li;a:{d=q[b+4>>2];b:{if(!d){break b}d=q[q[b>>2]+(Cza(c,e,d)<<2)>>2];if((d|0)==-1){break b}f=q[b+8>>2];while(1){b=f+(d<<4)|0;if((c|0)==q[b>>2]&(e|0)==q[b+4>>2]){break a}d=q[b+12>>2];if((d|0)!=-1){continue}break}}Pi(4,61150,61158,0);return-6}b=q[a+16>>2];e=Oi(61242);g=Li;c:{c=q[b+4>>2];d:{if(!c){break d}c=q[q[b>>2]+(Cza(e,g,c)<<2)>>2];if((c|0)==-1){break d}f=f+(d<<4)|0;d=q[b+8>>2];while(1){b=d+(c<<4)|0;if((e|0)==q[b>>2]&(g|0)==q[b+4>>2]){break c}c=q[b+12>>2];if((c|0)!=-1){continue}break}}Pi(4,61150,61247,0);return-6}b=Yi(8);q[b>>2]=q[(d+(c<<4)|0)+8>>2];q[b+4>>2]=q[f+8>>2];q[74036]=b;return Dk(q[a>>2],q[a+4>>2],b,503,504,0,505,506)|0}function haa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii-32|0;Ii=d;f=an(a,168157);e=an(a,168162);a:{if(!e){h=1;break a}g=r[e|0];o[e|0]=0;q[d>>2]=d+28;q[d+4>>2]=d+24;q[d+8>>2]=d+20;h=-1;if((ru(a,168165,d)|0)!=3){break a}b:{if(f){f=f+4|0}else{if(!c|q[d+20>>2]!=204){break b}c=e+1|0;f=hj(c)+c|0}c=gk(a,32);if(!c){break a}c=gk(c+1|0,32);if(!c){break a}Mi[1382](b,q[d+28>>2],q[d+24>>2],q[d+20>>2],c+1|0);j=r[f|0];h=0;o[f|0]=0;c=ko(e+2|0,168162,d+16|0);if(c){while(1){e=gk(c,58);g=e;if(!e){h=-1;break a}while(1){k=r[g+1|0];i=g+1|0;g=i;if((k|0)==32){continue}break}g=r[e|0];o[e|0]=0;Mi[1383](b,c,i);o[e|0]=g;c=ko(0,168162,d+16|0);if(c){continue}break}}o[f|0]=j;Mi[1384](b,f-a|0);break a}o[e|0]=g;h=1}Ii=d+32|0;return h}function Ora(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-96|0;Ii=c;d=q[q[a+24>>2]>>2];e=q[q[d>>2]+44>>2];q[c+92>>2]=0;q[c+88>>2]=0;q[c+84>>2]=0;o[c+83|0]=0;q[c+76>>2]=0;b=-1;a:{if(mM(e+60|0,q[a+16>>2],q[a+20>>2],c+88|0,c+92|0,c+84|0,c+83|0,c+76|0)){b=q[q[d>>2]>>2];g=q[b+8>>2]-q[b+12>>2]>>4;gj(b);e=Vi(b,-1);Ri(b,-2);if(!e){rj(b,-1e4,q[d+12>>2]);yk(b)}rj(b,-1e4,q[d+16>>2]);d=Ti(c,a+32|0,72);f=q[d+88>>2];if(r[d+83|0]){Xi(b,f);jl(b,-2);b:{if(!Vi(b,-1)){break b}if(Et(b,-1,d)){break b}u[(d+(q[d+76>>2]<<2)|0)+8>>2]=v[a+40>>3]}Ri(b,-2)}Xi(b,f);zB(b,d);Ij(b,-3);Ri(b,-2);if(!e){a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16;yk(b)}if(q[b+8>>2]-q[b+12>>2]>>4!=(g|0)){break a}b=0}Ii=c+96|0;return b|0}J(13231,12749,1026,13252);G()}function nw(a,b,c,d,e){var f=0,g=0,h=x(0),i=0,j=0;f=Ii-96|0;Ii=f;g=r[e+32|0];q[a+104>>2]=0;p[a+108>>1]=s[a+108>>1]&65534|g;g=q[e+8>>2];i=q[e+12>>2];a:{if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){q[a>>2]=g;q[a+4>>2]=i;b=q[e+20>>2];q[a+8>>2]=q[e+16>>2];q[a+12>>2]=b;b=q[e+28>>2];q[a+16>>2]=q[e+24>>2];q[a+20>>2]=b;u[f>>2]=u[d>>2];u[f+4>>2]=u[d+4>>2];u[f+8>>2]=u[d+8>>2];q[f+24>>2]=3;u[f+32>>2]=u[f>>2];u[f+36>>2]=u[f+4>>2];u[f+40>>2]=u[f+8>>2];Ti(a+32|0,f+24|0,72);break a}b:{if((b|0)==(g|0)&(c|0)==(i|0)){h=u[d>>2];break b}if(q[e+16>>2]==(b|0)&q[e+20>>2]==(c|0)){h=u[d+4>>2];break b}j=-1;if((b|0)!=q[e+24>>2]|(c|0)!=q[e+28>>2]){break a}h=u[d+8>>2]}b=f+24|0;q[b>>2]=0;v[b+8>>3]=h;Ti(a+32|0,f+24|0,72);j=0}Ii=f+96|0;return j}function nk(a,b,c){var d=0,e=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}b=q[a+8>>2];e=Zu(a,q[d>>2],c);c=b-16|0;b=q[c+4>>2];q[e>>2]=q[c>>2];q[e+4>>2]=b;q[e+8>>2]=q[c+8>>2];b=q[a+8>>2];c:{if(q[b-8>>2]<4|!(r[q[b-16>>2]+5|0]&3)){break c}c=q[d>>2];if(!(r[c+5|0]&4)){break c}b=q[a+16>>2];o[c+5|0]=r[c+5|0]&251;q[c+24>>2]=q[b+40>>2];q[b+40>>2]=c;b=q[a+8>>2]}q[a+8>>2]=b-16}function MQ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-2064|0;Ii=g;e=LQ(a,b,c,d,g);a:{if(!e){e=0;break a}b:{switch(q[g>>2]-8|0){default:J(169144,169198,1209,170317);G();case 8:f=w(q[d>>2],w(q[c>>2],q[b>>2]));i=Yi(f);c:{if(i){a=0;if((f|0)>0){while(1){o[a+i|0]=r[((a<<1)+e|0)+1|0];a=a+1|0;if((f|0)!=(a|0)){continue}break}}Ni(e);break c}q[213145]=169512}e=i;break;case 0:break b}}if(!q[213146]){break a}f=q[c>>2];if((f|0)<2){break a}a=w(q[b>>2],q[d>>2]);if(!a){break a}b=f>>1;i=(b|0)>1?b:1;c=0;while(1){d=w(a,c)+e|0;j=w(a,f+(c^-1)|0)+e|0;b=a;while(1){h=b>>>0<2048?b:2048;Ti(g+16|0,d,h);d=Ti(d,j,h);j=Ti(j,g+16|0,h)+h|0;d=d+h|0;b=b-h|0;if(b){continue}break}c=c+1|0;if((i|0)!=(c|0)){continue}break}}Ii=g+2064|0;return e}function Uw(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{b:{c:{d:{e:{if(b>>>0<2){e=q[a+4>>2];f=zj(c,0);g=zj(c,1);h=f|g;i=e&1;e=zj(c,2);c=zj(c,3);f:{if(d){if(!b){if(h>>>0>31|e>>>0>=16){break e}d=f<<10|i|g<<5;e=e<<1;c=32768;break f}if((e|h)>>>0>=32){break d}d=f<<10|g<<5;c=32768;break f}if(!b){if(h>>>0>15|(c|e)>>>0>=8){break c}d=f<<8|i|g<<4;e=e<<1;c=c<<12;break f}if((e|h)>>>0>15|c>>>0>=8){break b}d=g<<4|f<<8;c=c<<12}c=c|(d|e);if(c>>>0>=65536){break a}d=q[a+4>>2];if(b){q[a+4>>2]=d&65535|c<<16;return}q[a+4>>2]=c|d&-65536;return}J(107954,96899,3179,110224);G()}J(110241,96899,3191,110224);G()}J(108512,96899,3198,110224);G()}J(110274,96899,3208,110224);G()}J(110317,96899,3215,110224);G()}J(108545,96899,3220,110224);G()}function MD(a,b,c,d,e,f){var g=0;g=Ii-80|0;Ii=g;a:{if((f|0)>=16384){Qk(g+32|0,b,c,d,e,0,0,0,2147352576);d=q[g+40>>2];e=q[g+44>>2];b=q[g+32>>2];c=q[g+36>>2];if((f|0)<32767){f=f-16383|0;break a}Qk(g+16|0,b,c,d,e,0,0,0,2147352576);f=((f|0)<49149?f:49149)-32766|0;d=q[g+24>>2];e=q[g+28>>2];b=q[g+16>>2];c=q[g+20>>2];break a}if((f|0)>-16383){break a}Qk(g- -64|0,b,c,d,e,0,0,0,65536);d=q[g+72>>2];e=q[g+76>>2];b=q[g+64>>2];c=q[g+68>>2];if((f|0)>-32765){f=f+16382|0;break a}Qk(g+48|0,b,c,d,e,0,0,0,65536);f=((f|0)>-49146?f:-49146)+32764|0;d=q[g+56>>2];e=q[g+60>>2];b=q[g+48>>2];c=q[g+52>>2]}Qk(g,b,c,d,e,0,0,0,f+16383<<16);b=q[g+12>>2];q[a+8>>2]=q[g+8>>2];q[a+12>>2]=b;b=q[g+4>>2];q[a>>2]=q[g>>2];q[a+4>>2]=b;Ii=g+80|0}function YH(a,b,c,d){var e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);f=u[a+56>>2];e=u[a+44>>2];g=x(u[c+16>>2]*e);j=u[a+60>>2];h=x(u[c+20>>2]*e);k=u[a+48>>2];i=x(u[c+24>>2]*e);l=x(x(x(f*g)+x(j*h))-x(k*i));e=u[a+52>>2];m=x(x(f*i)+x(x(e*h)+x(k*g)));n=x(x(x(j*i)+x(k*h))-x(e*g));g=x(x(x(j*g)+x(e*i))-x(f*h));h=x(u[a+40>>2]+x(x(k*l)+x(x(x(f*m)+x(j*n))-x(e*g))));i=x(u[a+36>>2]+x(x(f*g)+x(x(x(j*l)+x(e*m))-x(k*n))));f=x(u[a+32>>2]+x(x(e*n)+x(x(x(j*g)+x(k*m))-x(f*l))));a=r[b+296|0];a:{if(a&4){if(d>x(0)^1){break a}d=x(x(1)/d);u[b+96>>2]=d*x(f-u[b+112>>2]);u[b+104>>2]=d*x(h-u[b+120>>2]);u[b+100>>2]=d*x(i-u[b+116>>2]);break a}o[b+296|0]=a|4}u[b+112>>2]=f;u[b+120>>2]=h;u[b+116>>2]=i} - - - -function TH(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;h=q[a+2384>>2];a:{d=q[c+4>>2];if(d){while(1){a=q[q[c>>2]+(g<<2)>>2];if((a|0)!=-1){while(1){d=q[c+8>>2]+w(a,40)|0;a=q[b+24>>2];b:{if(!a){break b}e=q[d>>2];f=q[d+4>>2];a=q[q[b+20>>2]+(Cza(e,f,a)<<2)>>2];if((a|0)==-1){break b}i=q[b+28>>2];while(1){a=i+(a<<4)|0;if((e|0)!=q[a>>2]|q[a+4>>2]!=(f|0)){a=q[a+12>>2];if((a|0)!=-1){continue}break b}break}f=q[d+16>>2];e=q[c+32>>2];if(f>>>0>=q[c+36>>2]-e>>4>>>0){break a}e=e+(f<<4)|0;f=q[d+20>>2];if(q[d+24>>2]==9){Mi[q[74983]](h,e,f>>>2|0,q[a+8>>2]);break b}Mi[q[74982]](h,e,f,q[a+8>>2])}a=q[d+32>>2];if((a|0)!=-1){continue}break}d=q[c+4>>2]}g=g+1|0;if(g>>>0>>0){continue}break}}return}J(111387,111323,479,111398);G()}function Sz(a,b,c){var d=0,e=0;e=Ii-48|0;Ii=e;d=$i(44);q[d>>2]=0;q[d+4>>2]=0;q[d+40>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;a=Qj(a,b,q[57936],d+4|0);a:{b:{if(!a){a=q[d+4>>2];b=q[a+24>>2];if((b|0)!=5){q[e+20>>2]=b;q[e+16>>2]=5;Pi(4,27287,27579,e+16|0);Aj(q[d+4>>2]);q[d+4>>2]=0;a=-19;break b}a=Qj(q[a>>2],q[a+4>>2],q[57902],d+8|0);if(a){q[e>>2]=a;Pi(4,27287,27639,e);Aj(q[d+4>>2]);q[d+4>>2]=0;a=-2;break b}q[c>>2]=d;a=0;break a}q[e+32>>2]=a;Pi(4,27287,27549,e+32|0);a=-2;b=q[d+4>>2];if(!b){break b}Aj(b)}b=q[d+8>>2];if(b){Aj(b)}c:{if(o[d+40|0]&1){break c}b=q[d+20>>2];if(b){Ni(b)}b=q[d+12>>2];if(!b){break c}Ni(b)}Ni(d)}Ii=e+48|0;return a}function rB(a,b,c,d,e,f){var g=0;a:{b:{if(!b){break b}b=s[b>>1];if((b|0)==65535){break b}if(!(e|f)){while(1){b=b&65535;e=q[a+16>>2];if(b>>>0>=q[a+20>>2]-e>>1>>>0){break a}b=s[e+(b<<1)>>1];f=q[a>>2];if(b>>>0>=(q[a+4>>2]-f|0)/104>>>0){break a}b=f+w(b,104)|0;if(q[b+8>>2]==(c|0)&q[b+12>>2]==(d|0)){o[b+96|0]=r[b+96|0]&252}b=s[b+94>>1];if((b|0)!=65535){continue}break b}}while(1){b=b&65535;g=q[a+16>>2];if(b>>>0>=q[a+20>>2]-g>>1>>>0){break a}b=s[g+(b<<1)>>1];g=q[a>>2];if(b>>>0>=(q[a+4>>2]-g|0)/104>>>0){break a}b=g+w(b,104)|0;if(!((c|0)!=q[b+8>>2]|q[b+12>>2]!=(d|0)|((e|0)!=q[b+16>>2]|(f|0)!=q[b+20>>2]))){o[b+96|0]=r[b+96|0]&252}b=s[b+94>>1];if((b|0)!=65535){continue}break}}return}J(6640,6386,479,6651);G()}function eu(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-32|0;Ii=c;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;a:{while(1){q[(c+16|0)+(d<<2)>>2]=Cx(a,c+12|0,0);e=q[c+12>>2];if((e|0)==(a|0)){break a}e=r[e|0];if(o[a|0]-48>>>0>=10|(e?(e|0)!=46:0)){break a}a=q[c+12>>2];if(r[a|0]){a=a+1|0;d=d+1|0;if((d|0)!=4){continue}break a}break}g=c;a=c;b:{c:{d:{e:{switch(d|0){case 2:a=q[c+24>>2];break c;case 1:d=q[c+20>>2];break d;case 4:break a;case 0:break e;default:break b}}d=q[c+16>>2];q[c+16>>2]=d>>>24;d=d&16777215}q[a+20>>2]=d>>>16;a=d&65535}e=a;q[g+24>>2]=e>>>8;q[c+28>>2]=e&255}a=0;while(1){e=q[(c+16|0)+(a<<2)>>2];if(e>>>0>255){f=0;break a}o[a+b|0]=e;f=1;a=a+1|0;if((a|0)!=4){continue}break}}Ii=c+32|0;return f}function Sga(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=x(g);h=h|0;var i=0;i=Ii-16|0;Ii=i;a:{b:{c:{d:{if(a){q[i+8>>2]=0;Nc(x(x(x(c>>>0)/x(255))),x(x(x(d>>>0)/x(255))),x(x(x(e>>>0)/x(255))),x(x(x(f>>>0)/x(255))));if(r[q[75054]+156|0]&64){a=K()|0;if(a){break d}}Mc(x(g));if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}Lc(h|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Oc(b<<5&1024|(b<<14&16384|b<<4&256));if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}Ii=i+16|0;return}J(88567,88575,1473,91573);G()}lj(a,91573,1481);J(88669,88575,1481,91573);G()}lj(a,91573,1484);J(88669,88575,1484,91573);G()}lj(a,91573,1487);J(88669,88575,1487,91573);G()}lj(a,91573,1494);J(88669,88575,1494,91573);G()}function NB(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;f=Ii-128|0;Ii=f;q[f+120>>2]=0;a:{b:{c:{if(a){if(!c){break c}if(!d){break b}if(e){q[e>>2]=0}i=4;d:{if(s[c>>1]!=1){break d}g=rta(f- -64|0);OM(f+48|0,g,c);h=f+32|0;q[h+8>>2]=a;q[h>>2]=a;q[h+4>>2]=a+b;i=XM(g,h,c);if(!i){RM(h);QB(g,h,c,f+48|0);b=q[g+40>>2]-q[g+32>>2]|0;q[f+28>>2]=0;Ro(f+28|0,16,b);a=q[f+28>>2];if(!a){break a}qta(g,a,b);OM(f+8|0,g,c);RM(h);i=QB(g,h,c,f+8|0);e:{if(!i){if(e){q[e>>2]=b}j=q[f+28>>2];break e}Ni(q[f+28>>2])}q[d>>2]=j}if(o[g+28|0]&1){break d}a=q[g+8>>2];if(a){Ni(a)}a=q[g>>2];if(!a){break d}Ni(a)}Ii=f+128|0;return i}J(22235,22242,163,22261);G()}J(22273,22242,164,22261);G()}J(22278,22242,165,22261);G()}J(22290,22242,190,22261);G()}function QD(a,b,c,d){a:{if(b>>>0>20){break a}b:{switch(b-9|0){case 0:b=q[c>>2];q[c>>2]=b+4;q[a>>2]=q[b>>2];return;case 1:b=q[c>>2];q[c>>2]=b+4;b=q[b>>2];q[a>>2]=b;q[a+4>>2]=b>>31;return;case 2:b=q[c>>2];q[c>>2]=b+4;q[a>>2]=q[b>>2];q[a+4>>2]=0;return;case 3:b=q[c>>2]+7&-8;q[c>>2]=b+8;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;return;case 4:b=q[c>>2];q[c>>2]=b+4;b=p[b>>1];q[a>>2]=b;q[a+4>>2]=b>>31;return;case 5:b=q[c>>2];q[c>>2]=b+4;q[a>>2]=s[b>>1];q[a+4>>2]=0;return;case 6:b=q[c>>2];q[c>>2]=b+4;b=o[b|0];q[a>>2]=b;q[a+4>>2]=b>>31;return;case 7:b=q[c>>2];q[c>>2]=b+4;q[a>>2]=r[b|0];q[a+4>>2]=0;return;case 8:b=q[c>>2]+7&-8;q[c>>2]=b+8;v[a>>3]=v[b>>3];return;case 9:break b;default:break a}}Mi[d|0](a,c)}}function Jya(){q[210784]=0;q[210785]=0;q[210782]=0;q[210780]=150555;q[210779]=150540;q[210778]=0;q[210776]=0;q[210774]=0;q[210772]=0;q[210770]=0;q[210768]=0;q[210769]=0;q[210806]=843072;q[210804]=0;q[210802]=150585;q[210801]=150565;q[210800]=0;q[210798]=0;q[210796]=0;q[210794]=0;q[210792]=1;q[210790]=0;q[210791]=3;q[210786]=0;q[210787]=0;q[210788]=0;q[210789]=0;q[210811]=0;q[210809]=0;q[210810]=0;q[210807]=0;q[210808]=0;q[210814]=0;q[210812]=0;q[210813]=1065353216;q[210818]=0;q[210816]=0;q[210817]=1065353216;q[210822]=0;q[210820]=1065353216;q[210821]=0;q[210826]=1065353216;q[210824]=0;q[210825]=0;q[210830]=-2147483648;q[210828]=-1082130432;q[210829]=-2147483648;q[210832]=Oi(150686);q[210833]=Li}function x_(a){a=a|0;var b=0,c=0,d=0;d=Ii-32|0;Ii=d;c=kj(a,1,0);Ri(a,1);Zi(a,-1e4,144742);Zi(a,2,c);a:{if(Uj(a,-1)){if((qj(a,-1)|0)!=145200){break a}q[d+16>>2]=c;Qi(a,145204,d+16|0);break a}Zi(a,-10001,144480);if((Vi(a,-1)|0)!=5){Qi(a,145247,0)}bj(a,144975,0);b=1;while(1){rj(a,-2,b);if(!Vi(a,-1)){q[d+4>>2]=uj(a,-2,0);q[d>>2]=c;Qi(a,145281,d)}Xi(a,c);Rk(a,1,1);if((Vi(a,-1)|0)!=6){if(uk(a,-1)){fm(a,2);b=b+1|0;continue}Ri(a,-2);b=b+1|0;continue}break}b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=145200;q[a+8>>2]=q[a+8>>2]+16;Si(a,2,c);Xi(a,c);Rk(a,1,1);if(Vi(a,-1)){Si(a,2,c)}Zi(a,2,c);if((qj(a,-1)|0)!=145200){break a}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;ej(a,-1);Si(a,2,c)}Ii=d+32|0;return 1}function U1(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=x(0),k=0,l=0,m=x(0);h=-13;g=q[239672];k=q[g+16>>2];if(k){Gj(k);g=q[239672]}f=q[g+80>>2];a:{if(!f){break a}f=q[q[g+76>>2]+(Cza(a,b,f)<<2)>>2];if((f|0)==-1){break a}i=q[g+84>>2];while(1){l=i+(f<<4)|0;if(q[l>>2]!=(a|0)|q[l+4>>2]!=(b|0)){f=q[l+12>>2];if((f|0)!=-1){continue}break a}break}c=x(x(t[g+33916>>2])*c);b:{if(c=x(0)){h=~~c>>>0;break b}h=0}c:{if((h|0)<1){c=x(0);break c}a=w(q[(i+(f<<4)|0)+8>>2],1056)+g|0;f=q[a+1160>>2];b=q[g+33920>>2];c=x(0);while(1){f=f-1&63;g=f<<3;i=a+648|0;j=u[g+i>>2];c=c>j?c:j;j=u[i+(g|4)>>2];m=j0){continue}break}}u[d>>2]=x(F(c))/x(32767);u[e>>2]=x(F(m))/x(32767);h=0}if(k){Bj(k)}return h}function lta(a,b,c,d,e){var f=0,g=0,h=0;g=Ii-48|0;Ii=g;a:{b:{if(q[d+8>>2]){f=2;c:{if((c|0)!=2){break c}if(!vq(e,g+44|0)){break c}d:{if((q[d+4>>2]&-268435456)==805306368){f=q[d+8>>2];if(!f){break b}c=0;if(r[a+12|0]){break d}f=q[f+16>>2];h=q[a+4>>2]+q[d+12>>2]|0;c=w(f,q[h+4>>2])+q[h>>2]|0;Ui(c,0,f);q[h+4>>2]=q[h+4>>2]+1;f=q[d+8>>2];break d}c=q[a+4>>2]+q[d+12>>2]|0;f=q[d+8>>2];if(t[a+8>>2]>2]>>>0){break a}}h=q[f+16>>2];o[g+36|0]=r[a+12|0];q[g+24>>2]=f;q[g+28>>2]=c;q[g+32>>2]=c+h;f=2;a=g+8|0;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;if(!QM(e,q[g+44>>2],a)){break c}f=QB(b,a,q[d+8>>2],g+24|0)}Ii=g+48|0;return f}J(23445,23354,149,23472);G()}J(23445,23354,259,23786);G()}J(23489,23354,170,23472);G()}function uda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;i=q[a+8>>2]-q[a+12>>2]>>4;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);a:{e=tj(a,1,g+12|0);b=s[e+576>>1];h=s[99560];f=c+380|0;b:{if((b|0)==(h|0)){break b}d=q[c+32>>2];if(b>>>0>=(q[c+36>>2]-d|0)/592>>>0){break a}f=(d+w(b,592)|0)+578|0}d=0;b=s[f>>1];c:{if((h|0)==(b|0)){break c}f=s[e+570>>1];while(1){if((b|0)==(f|0)){break c}e=q[c+32>>2];if((q[c+36>>2]-e|0)/592>>>0<=b>>>0){break a}d=d+1|0;b=s[(w(b,592)+e|0)+574>>1];if((h|0)!=(b|0)){continue}break}}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d>>>0;q[a+8>>2]=q[a+8>>2]+16;if((i+1|0)==q[a+8>>2]-q[a+12>>2]>>4){Ii=g+16|0;return 1}J(202310,202233,648,202364);G()}J(208265,208276,479,208332);G()}function Vm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-32|0;Ii=f;g=q[a+48>>2];h=g;if((r[g+50|0]+c|0)>=200){d=q[g+16>>2];e=q[q[g>>2]+60>>2];a:{if(!e){q[f>>2]=200;q[f+4>>2]=142143;d=oj(d,142064,f);break a}q[f+20>>2]=200;q[f+16>>2]=e;q[f+24>>2]=142143;d=oj(d,142098,f+16|0)}gm(q[g+12>>2],d,0);h=q[a+48>>2]}e=q[h>>2];d=q[e+56>>2];b:{if((d|0)>p[h+48>>1]){i=q[e+24>>2];break b}i=_q(q[a+52>>2],q[e+24>>2],e+56|0,12,32767,142159);q[e+24>>2]=i;j=q[e+56>>2];if((j|0)<=(d|0)){break b}while(1){q[w(d,12)+i>>2]=0;d=d+1|0;if((j|0)!=(d|0)){continue}break}}d=p[h+48>>1];q[w(d,12)+i>>2]=b;if(!(!(r[b+5|0]&3)|!(r[e+5|0]&4))){go(q[a+52>>2],e,b);d=s[h+48>>1]}p[h+48>>1]=d+1;p[((r[g+50|0]+c<<1)+g|0)+172>>1]=d;Ii=f+32|0}function Nr(a){var b=0,c=0,d=0,e=0,f=0;f=Ii-16|0;Ii=f;q[f+8>>2]=0;o[a+3272|0]=r[a+3272|0]|2;Dw(a);c=q[a+1036>>2];e=q[a+1040>>2];if((c|0)!=(e|0)){while(1){b=q[(d<<2)+c>>2];if(b){oM(a,b);e=q[a+1040>>2];c=q[a+1036>>2]}d=d+1|0;if(d>>>0>2>>>0){continue}break}}Gj(q[a+3232>>2]);a:{b:{e=a+3196|0;c=q[e>>2];b=q[a+3192>>2];if((c|0)!=(b|0)){d=0;c=b;while(1){b=(d<<3)+c|0;b=nq(q[a>>2],q[b>>2],q[b+4>>2]);if(!b){break b}cj(q[a>>2],q[b+8>>2]);d=d+1|0;c=q[a+3192>>2];if(d>>>0>2]-c>>3>>>0){continue}break}}q[a+3196>>2]=c;if(o[a+3204|0]&1){break a}Wi(0,8,a+3192|0,a+3200|0,e);Bj(q[a+3232>>2]);b=q[a+8>>2];qM(a);vM(a);if(b){Ni(b)}Ii=f+16|0;return}J(9916,7192,298,9919);G()}J(10026,9962,493,10101);G()}function Eaa(a,b){var c=0;a:{b:{c:{if((a|0)==(b|0)){break c}if((a+148|0)==(b|0)){c=1;break c}if((a+296|0)==(b|0)){c=2;break c}if((a+444|0)==(b|0)){c=3;break c}if((a+592|0)==(b|0)){c=4;break c}if((a+740|0)==(b|0)){c=5;break c}if((a+888|0)==(b|0)){c=6;break c}if((a+1036|0)==(b|0)){c=7;break c}if((a+1184|0)==(b|0)){c=8;break c}if((a+1332|0)==(b|0)){c=9;break c}if((a+1480|0)==(b|0)){c=10;break c}if((a+1628|0)==(b|0)){c=11;break c}if((a+1776|0)==(b|0)){c=12;break c}if((a+1924|0)==(b|0)){c=13;break c}if((a+2072|0)==(b|0)){c=14;break c}c=15;if((a+2220|0)!=(b|0)){break b}}a=w(c,148)+a|0;if(r[a+144|0]==255){break a}o[a+144|0]=255;return}J(149015,148471,87,149017);G()}J(148586,148471,177,148652);G()}function ep(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=Ii+ -64|0;Ii=f;d=-20736;a:{if(!a){break a}e=q[a>>2];if(!e){break a}g=q[a+8>>2];if(!g){break a}d=q[e+12>>2];b:{if(d>>>0>>0){d=Mi[q[e+16>>2]](q[a+4>>2])|0;if(d){break b}d=Mi[q[q[a>>2]+20>>2]](q[a+4>>2],b,c)|0;if(d){break b}d=Mi[q[q[a>>2]+24>>2]](q[a+4>>2],f)|0;if(d){break b}g=q[a+8>>2];b=q[a>>2];d=q[b+12>>2];c=q[b+8>>2];b=f}e=Ui(g,54,d);g=Ui(e+d|0,92,q[q[a>>2]+12>>2]);if(c){d=0;while(1){h=d+e|0;i=b+d|0;o[h|0]=r[i|0]^r[h|0];h=d+g|0;o[h|0]=r[i|0]^r[h|0];d=d+1|0;if((d|0)!=(c|0)){continue}break}}d=Mi[q[q[a>>2]+16>>2]](q[a+4>>2])|0;if(d){break b}b=q[a+4>>2];a=q[a>>2];d=Mi[q[a+20>>2]](b,e,q[a+12>>2])|0}Mi[q[65677]](f,0,64)|0}Ii=f- -64|0;return d}function ima(a,b,c,d){var e=0;if(o[a+141|0]&1){Pi(4,37377,38924,0);return 1}a=3;a:{e=q[b+12>>2];b:{if(!e){break b}while(1){if(q[e>>2]!=(c|0)|q[e+4>>2]!=(d|0)){e=q[e+16>>2];if(e){continue}break b}break}if(!q[e+12>>2]){return 4}q[e+12>>2]=0;d=q[e+20>>2];if(!d){break a}c:{d:{e:{c=q[d+4>>2];a=q[c+16>>2];if(!a){break e}f:{if((a|0)==(d|0)){q[c+16>>2]=q[d>>2];break f}while(1){c=a;a=q[a>>2];if(!a){break e}if((a|0)!=(d|0)){continue}break}q[c>>2]=q[d>>2]}Ni(d);a=q[b+12>>2];if((e|0)!=(a|0)){break d}q[b+12>>2]=q[e+16>>2];break c}J(39010,37552,1596,38974);G()}while(1){b=a;if(!a){break c}a=q[b+16>>2];if((e|0)!=(a|0)){continue}break}q[b+16>>2]=q[e+16>>2]}Ni(e);a=0}return a}J(38986,37552,1572,38974);G()}function fW(a,b,c,d,e,f){var g=0,h=0;h=Ii-32|0;Ii=h;q[h+24>>2]=0;q[h+16>>2]=1;q[h+20>>2]=0;q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;a:{b:{if(d){if(!a){g=-16512;break a}g=Pl(h+16|0,a,1);if(g){break b}g=yl(h,d,c);if(g){break b}g=gl(h,h,h+16|0);if(g){break b}g=-16896;if(Jj(h,0)){break a}}if(e){if(!b){g=-16512;break a}g=Pl(h+16|0,b,1);if(g){break b}g=yl(h,e,c);if(g){break b}g=gl(h,h,h+16|0);if(g){break b}g=-16896;if(Jj(h,0)){break a}}if(!f){g=0;break a}g=-16512;if(!a|!b){break a}g=Wk(h+16|0,f,b);if(g){break b}g=Pl(h+16|0,h+16|0,1);if(g){break b}g=gl(h+16|0,h+16|0,a);if(g){break b}g=Jj(h+16|0,0)?-16896:0;break a}if((g|0)==-16896|(g|0)==-16512){break a}g=g-16896|0}ij(h+16|0);ij(h);Ii=h+32|0;return g}function yw(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;a:{if(q[d+4>>2]==q[d>>2]){if(o[d+12|0]&1){break a}j=d+8|0;h=d+4|0;Wi(c,4,d,j,h);b:{if(c){while(1){c:{d:{i=(e<<2)+b|0;f=ak(a,q[i>>2],g+12|0);if(f){b=q[i>>2];q[g+4>>2]=f;q[g>>2]=b;Pi(4,13829,13840,g);b=q[d+4>>2];c=q[d>>2];if((b|0)!=(c|0)){e=0;b=c;while(1){cj(a,q[(e<<2)+b>>2]);e=e+1|0;b=q[d>>2];if(e>>>0>2]-b>>2>>>0){continue}break}}q[d+4>>2]=b;if(!(o[d+12|0]&1)){break d}break a}f=q[h>>2];if((f|0)!=q[j>>2]){break c}J(14227,14159,533,14251);G()}Wi(0,4,d,j,h);break b}i=q[g+12>>2];q[h>>2]=f+4;q[f>>2]=i;e=e+1|0;if((e|0)!=(c|0)){continue}break}}f=0}Ii=g+16|0;return f}J(13742,13768,105,13807);G()}J(14084,14159,493,14215);G()}function QN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=q[a+104>>2];o[c|0]=1;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;e=a+39|0;f=r[d+99440|0]-1|0;d=q[(r[d+99312|0]<<2)+248528>>2];g=r[r[e+(1<>>6;d=(d<<4|n<<2|m)<<4|l<<2|k;o[c+6|0]=d>>>6;d=(d<<4|j<<2|i)<<4|h<<2|g;o[c+5|0]=d>>>6;o[c+4|0]=a|d<<2;aC(c,b,4)}function Ot(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0;k=3;a:{b:{c:{if(a+1>>>0<2){break c}j=a&65535;h=q[210908];if(j>>>0>=t[h+8>>2]){break b}i=q[q[h>>2]+(j<<2)>>2];if(!i|s[q[h+4>>2]+(j<<1)>>1]!=(a>>>16|0)){break c}k=6;j=r[i+34|0];if(!j){break c}h=q[i+4>>2];a=0;while(1){l=h+(a<<4)|0;if((b|0)!=q[l>>2]|q[l+4>>2]!=(c|0)){a=a+1|0;if((j|0)!=(a|0)){continue}break c}break}k=1;c=q[i>>2];b=q[i+28>>2];if(Ej(c+w(b,q[i+24>>2])|0,154272,16)){break c}q[d>>2]=c+q[(h+(a<<4)|0)+8>>2];if(e){q[e>>2]=b}if(f){q[f>>2]=r[(h+(a<<4)|0)+13|0]}k=0;if(!g){break c}a=o[(h+(a<<4)|0)+12|0];if(a>>>0>=9){break a}q[g>>2]=t[i+24>>2]/t[(a<<2)+154632>>2]}return k}J(154349,154364,144,154402);G()}J(153529,153556,157,153579);G()}function Nna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=q[a>>2];b=Ui($i(148),0,148);q[b+88>>2]=0;q[b+92>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+52>>2]=-1;e=b- -64|0;c=e;q[c>>2]=0;q[c+4>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+80>>2]=0;q[b+84>>2]=0;q[b+96>>2]=0;q[b+100>>2]=0;q[b+104>>2]=0;q[b+108>>2]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+120>>2]=0;q[b+124>>2]=0;q[b+128>>2]=0;q[b+132>>2]=0;q[b+92>>2]=-1;c=q[d+8>>2];f=q[a+16>>2];q[b>>2]=q[d+4>>2];c=c>>>0>f>>>0?f:c;C9(b+4|0,c);if(!(o[b+68|0]&1)){a:{Wi(c,304,b+56|0,e,b+60|0);if(o[b+116|0]&1){break a}Wi(0,4,b+104|0,b+112|0,b+108|0);q[b+140>>2]=0;q[b+144>>2]=0;q[b+108>>2]=q[b+104>>2];q[q[a+12>>2]>>2]=b;mq(q[d+4>>2],212,b);return 0}}J(46186,45367,493,45053);G()}function lW(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Ii-16|0;Ii=h;a:{if(!b){g=-16512;break a}g=-16512;i=q[a+168>>2]-3|0;b:{if(i>>>0<=5){i=q[(i<<2)+263e3>>2];break b}i=0}if(!i){break a}j=(i?q[i+8>>2]:0)&255;l=(j<<1)+d|0;m=l+2|0;if(m>>>0>>0){break a}k=q[a+4>>2];if(m>>>0>k>>>0){break a}f=Ui(f,0,k);o[f|0]=0;g=c;c=f+1|0;b=Mi[b|0](g,c,j)|0;if(b){g=b-17536|0;break a}b=c+j|0;g=-20736;c:{if(!i){break c}g=Mi[q[i+28>>2]](0,0,b)|0}if(g){break a}b=(b+j+(k-l)|0)-2|0;o[b|0]=1;if(d){Ti(b+1|0,e,d)}q[h>>2]=0;q[h+4>>2]=0;q[h+8>>2]=0;d:{g=En(h,i,0);if(!g){b=(f+j|0)+1|0;d=(j^-1)+k|0;g=Nq(b,d,c,j,h);if(!g){break d}}ym(h);break a}g=Nq(c,j,b,d,h);ym(h);if(g){break a}g=ts(a,f,f)}Ii=h+16|0;return g}function CZ(a){var b=0,c=0,d=0,e=0;b=Cj(a,0,0,120);ar(a,b,8);c=q[a+16>>2];q[b+32>>2]=0;q[b+16>>2]=c;q[b+68>>2]=0;q[b+104>>2]=0;q[b+60>>2]=0;q[b+64>>2]=0;p[b+56>>1]=256;q[b+40>>2]=0;q[b+44>>2]=0;o[b+6|0]=0;q[b+112>>2]=0;q[b+116>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+80>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;c=Cj(a,0,0,192);q[b+48>>2]=8;q[b+20>>2]=c;q[b+40>>2]=c;q[b+36>>2]=c+168;c=Cj(a,0,0,720);q[b+44>>2]=45;q[b+32>>2]=c;q[b+28>>2]=c+624;d=q[b+20>>2];q[d+4>>2]=c;e=c+16|0;q[b+8>>2]=e;q[c+8>>2]=0;q[d>>2]=e;q[b+12>>2]=e;q[d+8>>2]=c+336;c=q[a+76>>2];q[b+72>>2]=q[a+72>>2];q[b+76>>2]=c;q[b+80>>2]=q[a+80>>2];o[b+56|0]=r[a+56|0];c=q[a+60>>2];q[b+60>>2]=c;a=q[a+68>>2];q[b+64>>2]=c;q[b+68>>2]=a;return b}function xI(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-32|0;Ii=e;h=q[a+48>>2];Gj(h);wn(e,0);Cl(e,b,hj(b));Cl(e,c,hj(c));j=ro(e);k=Li;f=Oi(b);i=Li;a:{c=q[a+20>>2];b:{if(!c){break b}c=q[q[a+16>>2]+(Cza(f,i,c)<<2)>>2];if((c|0)==-1){break b}a=q[a+24>>2];while(1){g=a+w(c,136)|0;if((f|0)==q[g>>2]&(i|0)==q[g+4>>2]){break a}c=q[g+128>>2];if((c|0)!=-1){continue}break}}J(166620,166551,742,166862);G()}c:{d:{f=a+w(c,136)|0;if(q[f+80>>2]==(j|0)&q[f+84>>2]==(k|0)){if(dj(b,q[f+72>>2])){break d}b=a+w(c,136)|0;a=s[b+120>>1];if(!(a&255)){break c}p[b+120>>1]=a&65280|a-1&255;rk(d);Bj(h);Ii=e+32|0;return}J(166709,166551,743,166862);G()}J(166870,166551,744,166862);G()}J(166908,166551,745,166862);G()}function JR(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=q[q[q[a+68>>2]+1120>>2]+16>>2]-1|0;a:{if(c>>>0<=9){b=q[(c<<2)+181160>>2];break a}b=0}if(!b){q[a+4>>2]=q[a+4>>2]+1;return 0}b=_n(a);b:{if(b){break b}if(q[a+128>>2]!=22){Xj(a,2,10);return-30464}q[a+4>>2]=q[a+4>>2]+1;c=q[a+120>>2];b=r[c|0]==13;q[a+232>>2]=b;if(!b){q[a+176>>2]=1;return 0}d=q[a+168>>2];g=q[a>>2];b=r[g+184|0]&2?12:4;c:{if(d>>>0<=b>>>0){break c}e=r[b+c|0];b=b+e|0;h=b+2|0;if(h>>>0>=d>>>0){break c}d:{if(q[a+20>>2]==3){f=b;b=r[c+h|0]|r[(b+c|0)+1|0]<<8;if((f+b|0)+3>>>0>=d>>>0){break d}e=(b+e|0)+2|0}b=0;f=d;d=c;c=(r[g+184|0]&2?12:4)+e|0;d=d+c|0;if((f|0)==(((r[d+1|0]<<8|r[d+2|0])+c|0)+3|0)){break b}}}Xj(a,2,50);b=-31360}return b}function Y_(a,b){var c=0,d=0,e=0,f=0,g=0;c=16;d=a>>>0>16?a:16;a:{if(!(d-1&d)){a=d;break a}while(1){a=c;c=a<<1;if(a>>>0>>0){continue}break}}if(-64-a>>>0<=b>>>0){q[240513]=48;return 0}d=b>>>0<11?16:b+11&-8;c=Yi((d+a|0)+12|0);if(!c){return 0}b=c-8|0;b:{if(!(c&a-1)){a=b;break b}f=c-4|0;g=q[f>>2];c=((a+c|0)-1&0-a)-8|0;a=c-b>>>0>15?c:a+c|0;c=a-b|0;e=(g&-8)-c|0;if(!(g&3)){b=q[b>>2];q[a+4>>2]=e;q[a>>2]=b+c;break b}q[a+4>>2]=e|q[a+4>>2]&1|2;e=a+e|0;q[e+4>>2]=q[e+4>>2]|1;q[f>>2]=c|q[f>>2]&1|2;q[a+4>>2]=q[a+4>>2]|1;Mw(b,c)}b=q[a+4>>2];c:{if(!(b&3)){break c}c=b&-8;if(c>>>0<=d+16>>>0){break c}q[a+4>>2]=d|b&1|2;b=a+d|0;d=c-d|0;q[b+4>>2]=d|3;c=a+c|0;q[c+4>>2]=q[c+4>>2]|1;Mw(b,d)}return a+8|0}function ws(a,b,c){var d=0;d=Ii-48|0;Ii=d;q[d+40>>2]=0;q[d+32>>2]=1;q[d+36>>2]=0;q[d+24>>2]=0;q[d+16>>2]=1;q[d+20>>2]=0;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;b=wk(d+16|0,b);a:{if(b){break a}b=wk(d,c);if(b){break a}b=vs(d+16|0);c=vs(d);c=b>>>0>c>>>0?c:b;b=kl(d+16|0,c);if(b){break a}b=kl(d,c);if(b){break a}q[d+16>>2]=1;q[d>>2]=1;if(Jj(d+16|0,0)){while(1){b=kl(d+16|0,vs(d+16|0));if(b){break a}b=kl(d,vs(d));if(b){break a}b:{if((_j(d+16|0,d)|0)>=0){b=nn(d+16|0,d+16|0,d);if(b){break a}b=kl(d+16|0,1);if(!b){break b}break a}b=nn(d,d,d+16|0);if(b){break a}b=kl(d,1);if(b){break a}}if(Jj(d+16|0,0)){continue}break}}b=on(d,c);if(b){break a}b=wk(a,d)}ij(d+32|0);ij(d+16|0);ij(d);Ii=d+48|0;return b}function lk(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-16|0;Ii=f;j=q[a+8>>2]-q[a+12>>2]>>4;e=jq(a);g=e+72|0;a:{b:{d=q[e+76>>2];c:{if(!d){break c}d=q[q[g>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break c}i=q[e+80>>2];while(1){h=(d<<4)+i|0;if(q[h>>2]==(b|0)&q[h+4>>2]==(c|0)){break b}d=q[h+12>>2];if((d|0)!=-1){continue}break}}d=yj(a,8);q[d>>2]=b;q[d+4>>2]=c;Zi(a,-1e4,125269);xj(a,-2);rj(a,-1e4,q[e+124>>2]);ej(a,-2);q[f+12>>2]=In(a,-2);Ri(a,-2);d=q[e+88>>2]-q[e+80>>2]>>4;e=q[e+96>>2];if((d|0)==(e|0)){qt(g,e,e+256|0)}rt(g,b,c,f+12|0);break a}rj(a,-1e4,q[e+124>>2]);rj(a,-1,q[((d<<4)+i|0)+8>>2]);ll(a,-2)}if((j+1|0)==q[a+8>>2]-q[a+12>>2]>>4){Ii=f+16|0;return}J(125274,125299,184,125322);G()}function dq(a,b,c,d){var e=0,f=0,g=0;f=Ii-16|0;Ii=f;a:{if(!d){d=q[a+32>>2];e=0;break a}b:{if((d|0)>=1){d=(q[a+12>>2]+(d<<4)|0)-16|0;e=d>>>0>2]?d:141056;break b}e=q[a+8>>2]+(d<<4)|0;if((d|0)>=-9999){break b}c:{switch(d+10002|0){case 2:e=q[a+16>>2]+96|0;break b;case 1:d=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=d;e=a+88|0;break b;case 0:e=a+72|0;break b;default:break c}}e=q[q[q[a+20>>2]+4>>2]>>2];e=r[e+7|0]<(-10002-d|0)?141056:(e+(0-d<<4)|0)-160024|0}d=q[a+32>>2];e=e-d|0}g=q[a+8>>2];q[f+12>>2]=c;b=g+((b^-1)<<4)|0;q[f+8>>2]=b;b=rF(a,1067,f+8|0,b-d|0,e);d:{if((c|0)!=-1){break d}c=q[a+20>>2];a=q[a+8>>2];if(t[c+8>>2]>a>>>0){break d}q[c+8>>2]=a}Ii=f+16|0;return b}function Uy(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;q[e+12>>2]=0;f=q[a>>2];q[e+8>>2]=f;b=gs(ja((dj(b,136974)?b:0)|0,(c?c:136976)|0,d|0,e+12|0)|0);c=q[e+12>>2];a:{b:{c:{d:{if(!b){if(!c){break c}while(1){e:{if((f|0)==-1){b=mm(Nx(e+8|0,q[c+4>>2],q[c+8>>2],q[c+12>>2]));if(b){break e}}b=mm(mS(e+8|0,q[c+20>>2],q[c+16>>2]));if(!b){break d}if(q[e+8>>2]==q[a>>2]){break e}hs(e+8|0)}c=q[c+28>>2];if(!c){break b}f=q[e+8>>2];continue}}if(!c){break a}Ni(c);break a}b=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=b;b=q[c+28>>2];q[d+24>>2]=q[c+24>>2];q[d+28>>2]=b;b=q[c+20>>2];q[d+16>>2]=q[c+16>>2];q[d+20>>2]=b;b=q[c+12>>2];q[d+8>>2]=q[c+8>>2];q[d+12>>2]=b}b=0}Ni(q[e+12>>2]);q[a>>2]=q[e+8>>2]}Ii=e+16|0;return b}function dA(a){var b=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a>>2]=1065353216;q[a+212>>2]=0;q[a+216>>2]=0;o[a+208|0]=0;q[a+200>>2]=1065353216;q[a+204>>2]=0;q[a+192>>2]=2139095039;q[a+196>>2]=0;o[a+190|0]=0;p[a+188>>1]=0;q[a+180>>2]=1;q[a+184>>2]=7;q[a+12>>2]=0;q[a+16>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+20>>2]=1065353216;q[a+32>>2]=0;q[a+36>>2]=0;q[a+44>>2]=0;q[a+48>>2]=0;q[a+40>>2]=1065353216;q[a+52>>2]=0;q[a+56>>2]=0;q[a+108>>2]=1065353216;q[a+112>>2]=0;q[a+100>>2]=0;q[a+104>>2]=0;q[a+92>>2]=1065353216;q[a+96>>2]=0;q[a+84>>2]=0;q[a+88>>2]=0;q[a+76>>2]=1065353216;q[a+80>>2]=0;q[a+68>>2]=0;q[a+72>>2]=0;q[a+60>>2]=1065353216;q[a+64>>2]=0;b=vH(a+220|0);o[a+256|0]=r[a+256|0]&254;i7(b);return a}function _6(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=-3;a:{b:{e=q[a+8>>2];a=q[e+32>>2]-1|0;c:{if((a|0)<0){break c}i=q[e+28>>2];while(1){h=((a-g|0)/2|0)+g|0;e=w(h,48)+i|0;j=q[e+16>>2];e=q[e+20>>2];if((j|0)!=(b|0)|(e|0)!=(c|0)){k=(c|0)==(e|0)&b>>>0>>0|c>>>0>>0;a=k?h-1|0:a;g=k?g:(c|0)==(e|0)&b>>>0>j>>>0|c>>>0>e>>>0?h+1|0:g;if((a|0)>=(g|0)){continue}break c}break}a=q[d>>2];f=q[d+8>>2]-a>>3;b=q[(w(h,48)+i|0)+40>>2];if(f>>>0>>0){if(o[d+12|0]&1){break b}Wi(b,8,d,d+8|0,d+4|0);a=q[d>>2];f=q[d+8>>2]-a>>3}c=q[d+4>>2];if(f-(c-a>>3)>>>0>>0){break a}a=b<<3;Ti(c,q[(w(h,48)+i|0)+36>>2],a);q[d+4>>2]=a+q[d+4>>2];f=0}return f}J(27686,27761,493,27674);G()}J(27817,27761,540,27846);G()}function w7(a){a=a|0;var b=0,c=0,d=0;b=Ii+ -64|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){c=jj(a,1);a:{if(c>>>0>=3){q[b+4>>2]=c;q[b>>2]=115561;a=Qi(a,117746,b);break a}q[b+32>>2]=c;q[b+36>>2]=0;q[b+24>>2]=16;c=q[d+4>>2];if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+60>>2];q[c+32>>2]=q[b+56>>2];q[c+36>>2]=a;a=q[b+52>>2];q[c+24>>2]=q[b+48>>2];q[c+28>>2]=a;a=q[b+44>>2];q[c+16>>2]=q[b+40>>2];q[c+20>>2]=a;a=q[b+36>>2];q[c+8>>2]=q[b+32>>2];q[c+12>>2]=a;a=q[b+28>>2];q[c>>2]=q[b+24>>2];q[c+4>>2]=a;a=0;break a}q[b+16>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b+16|0)}Ii=b- -64|0;return a|0}J(115568,115465,478,119531);G()}function WJ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;q[a+344>>2]=b;q[a+348>>2]=c;d=q[a+312>>2];h=q[a+308>>2];e=d-h|0;j=e>>3;a:{if(!e){e=0;break a}d=h-d|0;f=((d|0)>(e|0)?d:e)>>>3|0;d=(e|0)>-1?e:-1;d=w(f,(d|0)<1?d:1);d=d>>>0>1?d:1;e=0;while(1){f=h+(e<<3)|0;if(q[f>>2]==(b|0)&q[f+4>>2]==(c|0)){break a}e=e+1|0;if((d|0)!=(e|0)){continue}break}e=d}b:{if((e|0)==(j|0)){q[g>>2]=aj(b,c);Pi(4,199633,199834,g);b=0;break b}b=e&65535}e=q[a+32>>2];c=q[a+36>>2]-e|0;d=(c|0)/592|0;if(c){d=d>>>0>1?d:1;c=b<<2;while(1){f=e+w(i,592)|0;b=q[f+508>>2];if(b){Mi[211](a,s[f+570>>1]|s[f+568>>1]<<16,q[b+c>>2]);q[f+412>>2]=q[f+412>>2]|4194304}i=i+1|0;if((d|0)!=(i|0)){continue}break}}Ii=g+16|0}function Hha(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=x(0),g=x(0),h=0;d=Ii+ -64|0;Ii=d;if(a){e=q[a+4>>2];a:{if(o[a+24|0]&1){u[d+48>>2]=u[b>>2];u[d+52>>2]=u[b+4>>2];u[d+56>>2]=u[b+8>>2];a=q[d+48>>2];b=q[d+52>>2];u[e+24>>2]=u[d+56>>2];break a}a=q[e+16>>2];h=q[e+20>>2];u[d+40>>2]=u[e+24>>2];q[d+32>>2]=a;q[d+36>>2]=h;f=u[b>>2];u[d+32>>2]=f;g=u[b+4>>2];u[d+20>>2]=g;u[d+16>>2]=f;u[d+36>>2]=g;u[d+24>>2]=u[d+40>>2];a=q[d+16>>2];b=q[d+20>>2];u[e+24>>2]=u[d+24>>2]}q[e+16>>2]=a;q[e+20>>2]=b;u[d>>2]=u[c>>2];u[d+4>>2]=u[c+4>>2];u[d+8>>2]=u[c+8>>2];u[d+12>>2]=u[c+12>>2];a=q[d>>2];b=q[d+4>>2];c=q[d+12>>2];q[e+8>>2]=q[d+8>>2];q[e+12>>2]=c;q[e>>2]=a;q[e+4>>2]=b;q[72474]=q[72474]+1}Ii=d- -64|0}function EW(a,b,c){var d=0,e=0,f=0;d=Ii-32|0;Ii=d;q[d+12>>2]=0;b=hk(a,b,d+28|0,48);a:{if(b){b=b-15616|0;break a}e=q[a>>2]+q[d+28>>2]|0;b=rT(a,e,d+12|0,d+16|0);if(b){break a}b=WE(a,e,d+28|0);if(b){b=b-15104|0;break a}b=-15206;if((q[a>>2]+q[d+28>>2]|0)!=(e|0)){break a}b=q[d+12>>2]-1|0;b:{if(b>>>0<=3){b=q[(b<<2)+264476>>2];break b}b=0}if(!b){b=-15488;break a}b=DW(c,b);if(b){break a}c:{f=q[d+12>>2];d:{if((f|0)==1){b=qT(a,e,q[c+4>>2]);break d}b=-15488;if((f&-2)!=2){break c}b=mT(d+16|0,q[c+4>>2]);if(b){break c}b=sT(a,e,q[c+4>>2])}if(b){break c}b=-15206;if(q[a>>2]!=(e|0)){break c}b=0;break a}if(c){a=q[c>>2];if(a){Mi[q[a+40>>2]](q[c+4>>2])}Mi[q[65677]](c,0,8)|0}}Ii=d+32|0;return b}function zga(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{b:{c:{d:{e:{if(a){if(!c){break e}if(!b){break d}Q(34962,c|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}if(s[b+192>>1]){a=0;while(1){c=w(a,24)+b|0;$a(s[c+8>>1]);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break b}}Va(s[c+8>>1],s[c+12>>1],q[(q[c+16>>2]<<2)+91872>>2],r[c+20|0],s[b+194>>1],s[c+14>>1]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}a=a+1|0;if(a>>>0>1]){continue}break}}return}J(88567,88575,1690,91799);G()}J(91829,88575,1691,91799);G()}J(91843,88575,1692,91799);G()}lj(a,91799,1696);J(88669,88575,1696,91799);G()}lj(d,91799,1701);J(88669,88575,1701,91799);G()}lj(c,91799,1710);J(88669,88575,1710,91799);G()}function oA(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-960|0;Ii=d;Ui(d+8|0,0,952);p[d+952>>1]=r[b+345|0]&2|1;o[b+344|0]=c;a:{if(!(o[b+304|0]&1)){Wi(q[a+92>>2],16,b+292|0,b+300|0,b+296|0);q[b+296>>2]=q[b+292>>2];Ui(q[b+308>>2],255,q[b+312>>2]<<2);q[b+328>>2]=-1;q[b+332>>2]=0;q[b+320>>2]=q[b+316>>2];g=b+308|0;AA(g,64,256);c=r[b+344|0];q[d+804>>2]=0;q[d+800>>2]=c;if(q[a+92>>2]){c=0;while(1){f=q[a+88>>2]+(c<<3)|0;h=Oi(q[f+4>>2]);i=Li;e=q[b+296>>2];if((e|0)==q[b+300>>2]){break a}f=q[f>>2];q[b+296>>2]=e+16;q[e+8>>2]=h;q[e+12>>2]=i;q[e>>2]=f;qo(g,h,i,d+8|0);c=c+1|0;if(c>>>0>2]){continue}break}}Ii=d+960|0;return}J(149962,149779,493,150037);G()}J(150049,149779,533,150073);G()}function TQ(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=Ii-16|0;Ii=f;l=a+812|0;i=(d|0)/(b|0)|0;while(1){a:{if((g|0)>=(i|0)){break a}d=a;h=q[a+1516>>2];e=q[a+1520>>2]-h|0;e=(e+g|0)<(i|0)?e:i-g|0;if(e){gva(b,c,q[a+4>>2],l,h,e);h=q[a+1516>>2]}q[d+1516>>2]=e+h;g=e+g|0;if((i|0)==(g|0)){g=i;break a}m=(w(b,e)<<1)+c|0;b:{if(r[a+60|0]){q[a+112>>2]=2;j=0;break b}if(!gx(a,f+12|0,f+4|0,f+8|0)){q[a+1516>>2]=0;q[a+1520>>2]=0;j=0;break b}k=q[f+4>>2];j=fx(a,q[f+12>>2],k,q[f+8>>2]);d=0;e=q[a+4>>2];if((e|0)>=1){while(1){h=(d<<2)+a|0;q[h+876>>2]=q[h+812>>2]+(k<<2);d=d+1|0;if((e|0)!=(d|0)){continue}break}}q[a+1516>>2]=k;q[a+1520>>2]=j+k}c=c?m:0;if(j){continue}}break}Ii=f+16|0;return g}function QV(a){var b=0;b=-28928;a:{if(!q[a+68>>2]|q[a+4>>2]==16){break a}b=Xp(a);if(b){break a}if(!(!(r[q[a>>2]+184|0]&2)|r[q[a+68>>2]+492|0]!=1)){b=Qq(a);if(b){break a}}b=-28928;b:{c:{d:{e:{f:{g:{switch(q[a+4>>2]){case 12:if(!q[q[a+68>>2]+2268>>2]){break f}q[a+4>>2]=17;case 17:return DR(a);case 0:q[a+4>>2]=1;break b;case 1:return jR(a);case 2:return yR(a);case 3:return LV(a);case 4:return wR(a);case 5:return JR(a);case 6:return xR(a);case 7:return yV(a);case 8:return iR(a);case 9:return kR(a);case 10:return xV(a);case 15:break c;case 14:break d;case 13:break e;case 11:break g;default:break a}}return wV(a)}return KV(a)}return JV(a)}q[a+4>>2]=15;break b}OV(a)}b=0}return b}function E4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-32|0;Ii=c;g=q[a+8>>2]-q[a+12>>2]>>4;b=jq(a);e=kj(a,1,0);h=Oi(e);i=Li;a:{b:{d=q[b+12>>2];c:{if(!d){break c}d=q[q[b+8>>2]+(Cza(h,i,d)<<2)>>2];if((d|0)==-1){break c}b=q[b+16>>2];while(1){f=b+(d<<5)|0;if(q[f>>2]==(h|0)&(i|0)==q[f+4>>2]){break b}d=q[f+28>>2];if((d|0)!=-1){continue}break}}q[c>>2]=e;Lj(a,128187,c);if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(128116,128026,101,128202);G()}b=b+(d<<5)|0;if(!HG(a,q[b+8>>2],q[b+12>>2],q[b+24>>2])){b=uj(a,1,0);q[c+24>>2]=uj(a,-1,0);q[c+20>>2]=e;q[c+16>>2]=b;Qi(a,128213,c+16|0)}if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(128116,128026,110,128202);G()}Ii=c+32|0;return 1}function Oua(a){var b=0,c=0,d=0;b=-2;a:{if(!a){break a}c=q[a+28>>2];if(!q[a+36>>2]|(!c|!q[a+32>>2])){break a}q[a+44>>2]=2;q[a+8>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[c+20>>2]=0;q[c+16>>2]=q[c+8>>2];b=q[c+24>>2];if((b|0)<=-1){b=0-b|0;q[c+24>>2]=b}q[c+4>>2]=b?42:113;d=a;b:{if((b|0)==2){b=vl(0,0,0);break b}b=Dq(0,0,0)}q[d+48>>2]=b;b=0;q[c+40>>2]=0;Fxa(c);a=q[a+28>>2];q[a+60>>2]=q[a+44>>2]<<1;d=(q[a+76>>2]<<1)-2|0;c=q[a+68>>2];p[d+c>>1]=0;Ui(c,0,d);q[a+5812>>2]=0;q[a+116>>2]=0;q[a+120>>2]=2;q[a+104>>2]=0;q[a+108>>2]=0;q[a+92>>2]=0;q[a+96>>2]=2;q[a+72>>2]=0;d=w(q[a+132>>2],12)+282912|0;q[a+144>>2]=s[d+4>>1];q[a+140>>2]=s[d>>1];q[a+128>>2]=s[d+2>>1];q[a+124>>2]=s[d+6>>1]}return b}function JP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=0,o=x(0),r=x(0),s=0;if(q[b+44>>2]==(f|0)){if(f){o=x(x(1)/x(f>>>0));c=q[b+4>>2];i=u[b+28>>2];g=x(t[a+4>>2]);j=x(x(u[b+32>>2]-i)/g);k=j;j=x(t[a>>2]);i=x(i+x(k*j));r=x(x(k+i)-i);h=u[b+16>>2];g=x(x(u[b+20>>2]-h)/g);k=g;g=x(h+x(g*j));j=x(x(k+g)-g);a=0;while(1){d=p[(a<<2)+c>>1];h=x(o*x(a|0));l=x(+x(i+x(r*h))*1.5707963267948966);k=Nl(l);m=a<<1|1;s=p[(m<<1)+c>>1];n=(a<<3)+e|0;h=x(g+x(j*h));u[n>>2]=u[n>>2]+x(k*x(h*x(d|0)));l=Lk(l);d=(m<<2)+e|0;u[d>>2]=u[d>>2]+x(l*x(h*x(s|0)));a=a+1|0;if((f|0)!=(a|0)){continue}break}}q[b+44>>2]=0;return}J(211205,210166,1019,211272);G()}function yW(a,b){q[a>>2]=r[b+3|0]<<24&251658240|(r[b|0]|r[b+1|0]<<8|r[b+2|0]<<16);q[a+4>>2]=(r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24))&268435452;q[a+8>>2]=(r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24))&268435452;q[a+12>>2]=(r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24))&268435452;q[a+16>>2]=r[b+16|0]|r[b+17|0]<<8|(r[b+18|0]<<16|r[b+19|0]<<24);q[a+20>>2]=r[b+20|0]|r[b+21|0]<<8|(r[b+22|0]<<16|r[b+23|0]<<24);q[a+24>>2]=r[b+24|0]|r[b+25|0]<<8|(r[b+26|0]<<16|r[b+27|0]<<24);b=r[b+28|0]|r[b+29|0]<<8|(r[b+30|0]<<16|r[b+31|0]<<24);q[a+32>>2]=0;q[a+36>>2]=0;q[a+28>>2]=b;q[a+40>>2]=0;q[a+44>>2]=0;q[a+48>>2]=0;Mi[q[65677]](a+52|0,0,16)|0;q[a+68>>2]=0;return 0}function xv(a,b,c){var d=0,e=0,f=0,g=0;a:{if(c){f=-10;e=q[a+4>>2];d=q[e+4>>2];b:{if(!d){break b}d=q[q[e>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((d|0)==-1){break b}e=q[e+8>>2];while(1){g=e+w(d,24)|0;if(q[g>>2]!=(b|0)){d=q[g+16>>2];if((d|0)!=-1){continue}break b}break}c:{a=q[a>>2];b=q[a+4>>2];d:{if(!b){break d}d=e+w(d,24)|0;f=q[d+8>>2];e=q[d+12>>2];d=q[q[a>>2]+(Cza(f,e,b)<<2)>>2];if((d|0)==-1){break d}a=q[a+8>>2];while(1){b=a+w(d,48)|0;if(q[b>>2]==(f|0)&(e|0)==q[b+4>>2]){break c}d=q[b+40>>2];if((d|0)!=-1){continue}break}}J(25623,24997,1121,25615);G()}a=a+w(d,48)|0;if(!q[a+36>>2]){break a}q[c>>2]=q[a+32>>2];f=0}return f}J(25610,24997,1112,25615);G()}J(25626,24997,1122,25615);G()}function bna(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=x(0);g=Ii-80|0;Ii=g;c=q[a+4>>2];e=q[c+32>>2];f=q[q[a+24>>2]>>2];if(f>>>0>2]-e>>3>>>0){e=q[(f<<3)+e>>2];d=q[c+20>>2];c=q[c+16>>2];if(e>>>0>4>>>0){f=q[a+16>>2];h=q[a+20>>2];a:{if((f|0)==q[73166]&(h|0)==q[73167]){d=cm(q[q[q[a+8>>2]+80>>2]>>2],q[q[c+(e<<4)>>2]+8>>2],b);break a}a=g+8|0;b:{c:{if(q[73160]!=(f|0)|q[73161]!=(h|0)){if((f|0)==q[73162]&(h|0)==q[73163]){break c}d=-1;if((f|0)!=q[73164]|(h|0)!=q[73165]){break a}d=(c+(e<<4)|0)+12|0;break b}d=(c+(e<<4)|0)+8|0;break b}d=(c+(e<<4)|0)+4|0}i=u[d>>2];q[a>>2]=0;v[a+8>>3]=i;Ti(b+32|0,g+8|0,72);d=0}a=d;Ii=g+80|0;return a|0}}J(50132,49868,479,50143);G()}function tr(a,b,c){var d=x(0),e=x(0),f=x(0),g=0,h=0,i=0,j=0,k=x(0),l=x(0),m=x(0);a:{b:{if((b|0)!=1){h=b-1|0;if(h){break b}b=0;break a}return x(u[a+4>>2]+x(x(x(c-u[a>>2])*u[a+12>>2])/u[a+8>>2]))}g=b-2|0;b=0;while(1){i=b+1|0;j=(i<<4)+a|0;c:{e=u[(b<<4)+a>>2];d:{if(!(e<=c^1)){f=u[j>>2];if((b|0)==(g|0)|f>c){break d}break c}if((b|0)!=(g|0)){break c}f=u[j>>2];b=g}d=x(x(c-e)/x(f-e));break a}b=i;if((h|0)!=(b|0)){continue}break}b=0}c=x(d*d);e=x(d*c);m=x(e-c);a=(b<<4)+a|0;c=x(u[a+16>>2]-u[a>>2]);f=x(d*x(d*x(3)));k=x(d*x(d+d));l=x(d*k);return x(x(m*x(x(c*u[a+28>>2])/u[a+24>>2]))+x(x(x(f-l)*u[a+20>>2])+x(x(u[a+4>>2]*x(x(l-f)+x(1)))+x(x(d+x(e-k))*x(x(u[a+12>>2]*c)/u[a+8>>2])))))}function Wq(a,b,c){var d=0,e=0,f=0,g=0;d=-96;a:{e=q[a>>2];f=b-e|0;if((f|0)<1){break a}g=r[e|0];b:{if(!(g&128)){d=e+1|0;q[a>>2]=d;a=c;c=r[e|0];q[a>>2]=c;break b}d=-100;c:{d:{switch((g&127)-1|0){case 0:d=-96;if((f|0)<2){break a}d=c;c=r[e+1|0];q[d>>2]=c;d=e+2|0;break c;case 1:d=-96;if((f|0)<3){break a}d=c;c=r[e+2|0]|r[e+1|0]<<8;q[d>>2]=c;d=e+3|0;break c;case 2:d=-96;if((f|0)<4){break a}d=c;c=r[e+3|0]|(r[e+2|0]<<8|r[e+1|0]<<16);q[d>>2]=c;d=e+4|0;break c;case 3:break d;default:break a}}d=-96;if((f|0)<5){break a}d=c;c=r[e+1|0]|r[e+2|0]<<8|(r[e+3|0]<<16|r[e+4|0]<<24);c=c<<24|c<<8&16711680|(c>>>8&65280|c>>>24);q[d>>2]=c;d=e+5|0}q[a>>2]=d}return b-d>>>0>>0?-96:0}return d}function AI(a,b,c,d){var e=0;e=Ii-48|0;Ii=e;o[e+32|0]=0;q[e>>2]=a;q[e+12>>2]=e+16|2;o[e+31|0]=r[(b&15)+167024|0];o[e+24|0]=r[(b>>>28|0)+167024|0];a=o[(c>>>28|0)+167024|0];o[e+16|0]=a;q[e+4>>2]=a;o[e+30|0]=r[(b>>>4&15)+167024|0];o[e+29|0]=r[(b>>>8&15)+167024|0];o[e+28|0]=r[(b>>>12&15)+167024|0];o[e+27|0]=r[(b>>>16&15)+167024|0];o[e+26|0]=r[(b>>>20&15)+167024|0];o[e+25|0]=r[(b>>>24&15)+167024|0];o[e+23|0]=r[(c&15)+167024|0];o[e+22|0]=r[(c>>>4&15)+167024|0];o[e+21|0]=r[(c>>>8&15)+167024|0];o[e+20|0]=r[(c>>>12&15)+167024|0];o[e+19|0]=r[(c>>>16&15)+167024|0];o[e+18|0]=r[(c>>>20&15)+167024|0];a=o[(c>>>24&15)+167024|0];o[e+17|0]=a;q[e+8>>2]=a;sj(d,1024,167001,e);Ii=e+48|0}function ana(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=q[a>>2];b=Ui($i(84),0,84);q[b+68>>2]=0;q[b+72>>2]=0;q[b+64>>2]=-1;o[b+73|0]=0;o[b+74|0]=0;o[b+75|0]=0;o[b+76|0]=0;o[b+77|0]=0;o[b+78|0]=0;o[b+79|0]=0;o[b+80|0]=0;f=q[c>>2];g=q[a+16>>2];c=q[c+4>>2];Wi(c,104,b,b+8|0,b+4|0);a:{d=q[b>>2];if(c>>>0<=(q[b+8>>2]-d|0)/104>>>0){q[b+4>>2]=d+w(c,104);d=q[b+72>>2];if(c>>>0>>0){break a}h=q[b+68>>2];e=Yi(c<<2);q[b+68>>2]=e;e=Ti(e,h,d<<2);q[b+72>>2]=c;if(c>>>0>d>>>0){while(1){q[e+(d<<2)>>2]=d;d=d+1|0;if((c|0)!=(d|0)){continue}break}}Ni(h);Ui(q[b>>2],0,w(c,104));w9(b+16|0,f>>>0>g>>>0?g:f);q[q[a+12>>2]>>2]=b;return 0}J(49936,49868,506,49955);G()}J(49963,49986,112,49924);G()}function qya(){q[64057]=q[71906];q[71906]=256200;q[210464]=1;q[210462]=-990112893;q[210463]=-1808347863;q[210461]=140380;q[210460]=1;q[210467]=0;o[841864]=0;q[210465]=q[210458];q[210467]=q[71906];q[71906]=841840;q[210474]=1;q[210472]=-646628091;q[210473]=-486267828;q[210471]=140395;q[210470]=1;q[210477]=0;o[841904]=0;q[210475]=q[210469];q[210477]=q[71906];q[71906]=841880;q[64093]=q[71906];q[71906]=256344;q[210486]=1;q[210484]=-588138364;q[210485]=-388737994;q[210483]=140456;q[210482]=1;q[210489]=0;o[841952]=0;q[210487]=q[210480];q[210489]=q[71906];q[71906]=841928;q[64139]=q[71906];q[71906]=256528;q[64157]=q[71906];q[71906]=256600;q[64173]=q[71906];q[71906]=256664}function oja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;c=-2;a:{if(!Qj(q[a+12>>2],q[a+16>>2],239640,d+12|0)){b=q[d+12>>2];e=q[b+12>>2];if(e){while(1){if(f>>>0>=e>>>0){break a}g=f<<4;Ek(q[a+20>>2],q[(g+q[b+8>>2]|0)+4>>2]);b=q[d+12>>2];e=q[b+12>>2];if(e>>>0<=f>>>0){break a}c=0;h=q[b+8>>2];b:{if(!q[(h+g|0)+12>>2]){break b}while(1){Ek(q[a+20>>2],q[(q[(g+h|0)+8>>2]+(c<<3)|0)+4>>2]);b=q[d+12>>2];e=q[b+12>>2];if(e>>>0<=f>>>0){break a}if(c>>>0>6){break b}c=c+1|0;h=q[b+8>>2];if(c>>>0>2]){continue}break}}f=f+1|0;if(e>>>0>f>>>0){continue}break}}Ek(q[a+20>>2],q[b>>2]);q[q[a+24>>2]>>2]=q[d+12>>2];c=0}Ii=d+16|0;return c|0}J(62773,63136,92,62832);G()}function o7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-48|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){c=b;g=b;e=fj(a,1);a:{if(e<4294967296&e>=0){f=~~e>>>0;break a}f=0}q[g+16>>2]=f;q[c+20>>2]=0;q[b+8>>2]=13;c=q[d+4>>2];b:{if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+44>>2];q[c+32>>2]=q[b+40>>2];q[c+36>>2]=a;a=q[b+36>>2];q[c+24>>2]=q[b+32>>2];q[c+28>>2]=a;a=q[b+28>>2];q[c+16>>2]=q[b+24>>2];q[c+20>>2]=a;a=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=a;a=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=a;a=0;break b}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+48|0;return a|0}J(115568,115465,478,119531);G()}function ila(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-112|0;Ii=b;d=nj(b+88|0,a,0,72626,249);e=jk(a);q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;Gk(a,1,b+48|0,b+16|0);if((Vi(a,2)|0)!=-1){Dj(a,2,5);ej(a,2);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){c=uj(a,-2,0);a:{if(!dj(c,72850)){f=Uj(a,-1);break a}q[b>>2]=c;Pi(3,72671,72856,b)}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2)}o[b+80|0]=(f|0)!=0;a=q[58918];vk(b+16|0,b+48|0,q[a+8>>2],q[a+12>>2],e,a,b+80|0,1);mj(d);Ii=b+112|0;return 0}function Fp(a,b,c,d,e){var f=0,g=0,h=0,i=0;a:{b:{c:{switch(d|0){case 0:f=q[a+4>>2];d=q[a>>2];if(f>>>0>2]){g=1;break b}break a;case 3:h=3;g=3;f=q[a+4>>2];d=q[a>>2];if(f>>>0>2]){break b}break a;case 4:h=4;g=4;f=q[a+4>>2];d=q[a>>2];if(f>>>0>2]){break b}break a;case 5:f=q[a+4>>2];d=q[a>>2];if(f>>>0>2]){g=4;h=5;break b}break a;default:break c}}J(13883,13768,286,13889);G()}q[a+4>>2]=f+1;i=q[d+4>>2]+(f<<3)|0;q[i>>2]=b;q[i+4>>2]=c;b=f<<2;q[b+q[d+12>>2]>>2]=h;c=b+q[d+8>>2]|0;b=q[a+8>>2];q[c>>2]=b;c=q[d+20>>2];d=0;while(1){u[c+(b+d<<2)>>2]=u[(d<<2)+e>>2];d=d+1|0;if((g|0)!=(d|0)){continue}break}q[a+8>>2]=q[a+8>>2]+g;return}J(13986,13768,256,14049);G()}function $l(a,b){var c=0;a:{b:{c:{d:{e:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break e}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break e}f:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break e;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break e;case 0:c=a+72|0;break e;default:break f}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;c=q[b+8>>2];switch(c-5|0){case 2:break c;case 0:break d;default:break b}}b=q[b>>2]+8|0;break a}b=q[b>>2]+8|0;break a}b=(q[a+16>>2]+(c<<2)|0)+152|0}b=q[b>>2];if(!b){return 0}c=q[a+8>>2];q[c+8>>2]=5;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function rpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;if(q[b+8>>2]!=2){J(36456,36512,566,36564);G()}d=q[b+32>>2];c=q[b+36>>2];q[a+72>>2]=q[b+32>>2];q[a+76>>2]=c;e=q[b+28>>2];c=a- -64|0;q[c>>2]=q[b+24>>2];q[c+4>>2]=e;c=q[b+20>>2];q[a+56>>2]=q[b+16>>2];q[a+60>>2]=c;c=q[b+12>>2];q[a+48>>2]=q[b+8>>2];q[a+52>>2]=c;c=q[b+4>>2];q[a+40>>2]=q[b>>2];q[a+44>>2]=c;c=q[b+12>>2];q[a+88>>2]=q[b+8>>2];q[a+92>>2]=c;c=q[b+20>>2];q[a+96>>2]=q[b+16>>2];q[a+100>>2]=c;c=q[b+28>>2];q[a+104>>2]=q[b+24>>2];q[a+108>>2]=c;c=q[b+36>>2];q[a+112>>2]=q[b+32>>2];q[a+116>>2]=c;c=q[b+4>>2];q[a+80>>2]=q[b>>2];q[a+84>>2]=c;b=q[d+36>>2];q[a+120>>2]=165;q[a+88>>2]=0;q[a+92>>2]=b;q[a+80>>2]=b;q[a+84>>2]=0}function SG(a,b,c,d,e,f,g){var h=0,i=0,j=0;i=Ii-16|0;Ii=i;a:{b:{c:{d:{e:{f:{g:{h:{i:{h=q[b+4>>2]>>>22&63;switch(h-2|0){case 12:break c;case 7:break d;case 0:break e;case 6:break f;case 2:break g;case 11:break h;case 3:break i;default:break b}}q[q[b+12>>2]+c>>2]=q[f>>2];break a}q[q[b+12>>2]+c>>2]=q[f>>2];break a}a=q[b+12>>2]+c|0;b=q[f+4>>2];q[a>>2]=q[f>>2];q[a+4>>2]=b;break a}o[q[b+12>>2]+c|0]=r[f|0];break a}u[q[b+12>>2]+c>>2]=u[f>>2];break a}j=q[d>>2];h=hj(f)+1|0;j:{if(j+h>>>0>t[e>>2]){Qi(a,124686,0);break j}Ti(j,f,h);q[q[b+12>>2]+c>>2]=q[d>>2]-g}q[d>>2]=h+q[d>>2];break a}q[q[b+12>>2]+c>>2]=q[f>>2];break a}q[i+4>>2]=q[b>>2];q[i>>2]=h;Qi(a,124711,i)}Ii=i+16|0}function zX(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii+ -64|0;Ii=d;e=-54;a:{if(c>>>0>1024){break a}q[d+56>>2]=0;q[d+60>>2]=0;q[d+48>>2]=0;q[d+52>>2]=0;q[d+40>>2]=0;q[d+44>>2]=0;q[d+32>>2]=0;q[d+36>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;b:{if(q[a+20>>2]?0:q[a+16>>2]<=q[a+28>>2]){break b}e=JE(a,0,0);if(!e){break b}break a}c:{if(c){h=a+32|0;while(1){e=16;while(1){if(e){e=e-1|0;g=e+a|0;f=r[g|0]+1|0;o[g|0]=f;if((f|0)!=(f&255)){continue}}break}if(Km(h,1,a,d)){break c}e=c>>>0<16?c:16;b=Ti(b,d,e)+e|0;c=c-e|0;if(c){continue}break}}if(qN(a,d+16|0)){break c}q[a+16>>2]=q[a+16>>2]+1}Mi[q[65677]](d+16|0,0,48)|0;Mi[q[65677]](d,0,16)|0;e=0}Ii=d- -64|0;return e}function gB(a,b){var c=0,d=0,e=0,f=0,g=0;e=q[b+16>>2];c=q[b+12>>2];if((e|0)!=(c|0)){e=c;while(1){c=q[w(d,12)+e>>2];Mi[q[74944]](q[c>>2]);Mi[q[74949]](q[c+4>>2]);Ni(c);d=d+1|0;e=q[b+12>>2];if(d>>>0<(q[b+16>>2]-e|0)/12>>>0){continue}break}}q[b+16>>2]=e;c=q[b>>2];if(c){Aj(c)}q[b>>2]=0;c=q[b+8>>2];if(c){cj(a,c)}q[b+8>>2]=0;d=q[b+32>>2];c=q[b+28>>2];if((d|0)!=(c|0)){d=c;while(1){f=(g<<4)+d|0;Ni(q[f>>2]);cj(a,q[f+4>>2]);e=q[f+12>>2];if(e){d=0;while(1){c=q[(q[f+8>>2]+(d<<4)|0)+8>>2];if(c){cj(a,c);e=q[f+12>>2]}d=d+1|0;if(e>>>0>d>>>0){continue}break}}c=q[f+8>>2];if(c){Ni(c)}q[f+12>>2]=0;g=g+1|0;d=q[b+28>>2];if(g>>>0>2]-d>>4>>>0){continue}break}}q[b+32>>2]=d}function Vsa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Ii-48|0;Ii=d;a:{b:{if(a){f=ii()|0;e=X()|0;if(e){q[d+32>>2]=W(e|0);Pi(4,213576,214018,d+32|0)}e=-15;if((f|0)==q[a+4>>2]){f=q[a+12>>2];e=q[a+8>>2];if((f|0)==(e|0)){break b}q[d+44>>2]=q[e>>2];f=f-4|0;q[e>>2]=q[f>>2];q[a+12>>2]=f;if(e>>>0>f>>>0){break a}ri(q[d+44>>2],4355,b|0,c<<2,q[a+28>>2]);b=X()|0;if(b){q[d+16>>2]=W(b|0);Pi(4,213576,214018,d+16|0)}li(q[a+24>>2],1,d+44|0);oa(q[a+24>>2],4112,d+40|0);b=X()|0;if(b){q[d>>2]=W(b|0);Pi(4,213576,214018,d)}if(q[d+40>>2]!=4114){mi(q[a+24>>2])}e=0}Ii=d+48|0;return e|0}J(213569,213519,165,213785);G()}J(214133,214021,479,214144);G()}J(214165,214021,516,214155);G()}function kea(a,b,c,d,e){var f=0,g=0,h=x(0),i=0;f=Ii-16|0;Ii=f;a:{b:{g=c&65535;i=q[b+36>>2];b=q[b+32>>2];if(g>>>0<(i-b|0)/592>>>0){if(s[(b+w(g,592)|0)+568>>1]!=(c>>>16|0)){break b}if(s[(b+w(g,592)|0)+570>>1]!=(c&65535)){break a}c=Yv(d,e);c:{if(c){b=(b+w(g,592)|0)+(q[c+8>>2]<<4)|0;c=r[c+12|0];if((c|0)==255){u[a>>2]=u[b>>2];u[a+4>>2]=u[b+4>>2];u[a+8>>2]=u[b+8>>2];u[a+12>>2]=u[b+12>>2];break c}h=u[b+(c<<2)>>2];u[a+12>>2]=h;u[a+8>>2]=h;u[a+4>>2]=h;u[a>>2]=h;break c}q[f>>2]=aj(d,e);Pi(4,199633,200490,f);q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0}Ii=f+16|0;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function $aa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-32|0;Ii=d;a:{b:{c:{g=b&65535;e=q[a+32>>2];h=(q[a+36>>2]-e|0)/592|0;if(g>>>0>>0){if(s[(w(g,592)+e|0)+568>>1]!=(b>>>16|0)){break c}i=w(g,592)+e|0;if(s[i+570>>1]!=(b&65535)){break b}f=s[i+576>>1];b=0;d:{if((f|0)==65535){break d}if(f>>>0>=h>>>0){break a}b=w(f,592)+e|0}f=q[c+4>>2];h=q[c>>2];u[d+8>>2]=u[c+8>>2];q[d>>2]=h;q[d+4>>2]=f;PA(d+16|0,a,i,b,d);b=q[d+24>>2];c=q[d+20>>2];u[i>>2]=u[d+16>>2];a=w(g,592)+e|0;q[a+12>>2]=1065353216;q[a+4>>2]=c;q[a+8>>2]=b;q[a+412>>2]=q[a+412>>2]|4194304;Ii=d+32|0;return}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function bt(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-176|0;Ii=d;a:{e=q[a>>2];f=q[e+8>>2]-q[e+12>>2]>>4;if((f|0)>-1){if(ov(a)){g=q[e+8>>2]-q[e+12>>2]>>4;if(b){Mi[b|0](e,c)}b=((q[e+8>>2]-q[e+12>>2]>>4)-g|0)+1|0;c=Ii-128|0;Ii=c;Ii=c+128|0;q[d+40>>2]=0;wz(e,b,0,0);a=q[a>>2];Ri(a,-2);b=q[79286];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);pj(a,-10002)}a=q[e+8>>2]-q[e+12>>2]>>4;if((a|0)!=(f|0)){break a}Ii=d+176|0;return}q[d+12>>2]=f;q[d+4>>2]=1754;q[d+8>>2]=0;q[d>>2]=122672;Pi(4,122749,123291,d);J(123363,122672,1469,123380);G()}q[d+28>>2]=a;q[d+24>>2]=f;q[d+20>>2]=1754;q[d+16>>2]=122672;Pi(4,122749,123394,d+16|0);J(123465,122672,1492,123484);G()}function NL(a,b,c){var d=0,e=0,f=0;e=b+32|0;d=q[b+16>>2];f=q[d+12>>2];a:{b:{if(r[f|0]){d=ak(a,f,e);if(d){break a}d=q[b+16>>2];break b}q[e>>2]=0}c:{d:{e:{f:{g:{h:{i:{j:{e=q[d>>2];k:{if(r[e|0]){d=a;if(c){f=kt(a,e,0);e=q[b+16>>2];if(!f){break j}e=q[e>>2]}d=ak(d,e,b+20|0);if(d){break a}d=q[b+16>>2];break k}q[b+20>>2]=0}d=q[d+4>>2];if(!r[d|0]){break i}if(!c){break g}break h}d=q[e+4>>2];if(r[d|0]){break h}}q[b+28>>2]=0;break f}if(!kt(a,d,0)){break e}d=q[q[b+16>>2]+4>>2]}d=ak(a,d,b+28|0);if(d){break a}}if(!c){break d}}if(!kt(a,q[q[b+16>>2]+8>>2],0)){break c}}d=ak(a,q[q[b+16>>2]+8>>2],b+24|0);if(d){break a}}d=0;a=q[b+20>>2];if(!a){break a}G5(q[a>>2],b)}return d}function nG(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0;l=Ii-16|0;Ii=l;g=q[239672];i=q[g+16>>2];if(i){Gj(i)}a:{b:{c:{j=s[g+68>>1];h=s[g+70>>1];d:{if((j|0)==(h|0)){q[d>>2]=0;q[l>>2]=j;Pi(4,209937,210082,l);break d}k=q[g+64>>2];if(!k){break c}if(h>>>0>=j>>>0){break b}p[g+70>>1]=h+1;k=s[k+(h<<1)>>1]}if(i){Bj(i)}i=-3;if((h|0)!=(j|0)){h=q[g+48>>2];j=q[g+52>>2]-h>>5;g=k;if(j>>>0<=g>>>0){break a}g=h+(g<<5)|0;q[g+20>>2]=c;q[g>>2]=e;q[g+4>>2]=f;p[g+16>>1]=k;p[g+24>>1]=1;q[g+8>>2]=0;q[g+12>>2]=0;c=Yi(b);q[g+12>>2]=b;q[g+8>>2]=c;Ti(c,a,b);q[d>>2]=g;i=0}Ii=l+16|0;return i}J(211026,210953,151,211033);G()}J(211037,210953,152,211033);G()}J(211004,210835,479,211015);G()}function g8(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-16|0;Ii=c;a:{b:{d=qj(a,1);h=q[d>>2];if(h){e=Oi(kj(a,2,0));f=Li;q[c+12>>2]=0;q[c+8>>2]=0;b=q[d+8>>2];c:{if(!b){break c}b=q[q[d+4>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break c}d=q[d+12>>2];while(1){g=d+w(b,40)|0;if(q[g>>2]==(e|0)&(f|0)==q[g+4>>2]){break b}b=q[g+32>>2];if((b|0)!=-1){continue}break}}if(JH(h,e,f,c+12|0,c+8|0,c+4|0)){b=0;if(!q[c+8>>2]){break a}e=q[c+12>>2];d:{switch(q[c+4>>2]){case 0:lo(a,e);b=1;break a;case 9:break d;default:break a}}ir(a,e);b=1;break a}q[c>>2]=aj(e,f);b=Qi(a,120199,c);break a}J(120163,115465,151,120166);G()}rj(a,-1e4,q[(d+w(b,40)|0)+24>>2]);b=1}Ii=c+16|0;return b|0}function Q7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-80|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){e=nj(b+56|0,a,0,115465,1384);q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=4;q[b+32>>2]=0;q[b+36>>2]=0;c=q[d+4>>2];a:{if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+52>>2];q[c+32>>2]=q[b+48>>2];q[c+36>>2]=a;a=q[b+44>>2];q[c+24>>2]=q[b+40>>2];q[c+28>>2]=a;a=q[b+36>>2];q[c+16>>2]=q[b+32>>2];q[c+20>>2]=a;a=q[b+28>>2];q[c+8>>2]=q[b+24>>2];q[c+12>>2]=a;a=q[b+20>>2];q[c>>2]=q[b+16>>2];q[c+4>>2]=a;break a}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;f=Qi(a,115614,b)}mj(e);Ii=b+80|0;return f|0}J(115568,115465,478,119531);G()}function rr(a,b){var c=0,d=0,e=0,f=0;c=Ii-192|0;Ii=c;if(Oj(a,1)){d=b;e=Mj(a,1);a:{if(e<0x10000000000000000&e>=0){f=~~e>>>0;b=y(e)>=1?e>0?~~A(C(e*2.3283064365386963e-10),4294967295)>>>0:~~D((e- +(~~e>>>0>>>0))*2.3283064365386963e-10)>>>0:0;break a}b=0}b:{c:{if(!ew(d,f,b)){d=c;if(b>>>0<=2){b=q[(b<<2)+245832>>2]}else{b=86723}q[d+52>>2]=b;q[c+48>>2]=f;sj(c- -64|0,128,119817,c+48|0);q[c+32>>2]=c- -64;Qi(a,119735,c+32|0);break c}d=b;if((b|0)==2){break b}b=c;if(d>>>0<=2){d=q[(d<<2)+245832>>2]}else{d=86723}q[b+20>>2]=d;q[c+16>>2]=f;sj(c- -64|0,128,119817,c+16|0);q[c>>2]=c- -64;Qi(a,119767,c)}f=-1;b=-1}Ii=c+192|0;Li=b;return f}J(119695,115465,1165,119718);G()}function iwa(a,b,c,d){var e=0,f=0,g=0;e=Ii-224|0;Ii=e;f=a;a=e+72|0;g=Tn(f,a,0,1);a:{if(!g){break a}if(q[a+104>>2]==8){f=c;c=a+112|0;p[b>>1]=r[f+c|0]|3328;a=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[b+2|0]=a;o[b+3|0]=a>>>8;o[b+4|0]=a>>>16;o[b+5|0]=a>>>24;a=r[105960]|r[105961]<<8;o[b+6|0]=a;o[b+7|0]=a>>>8;p[b+8>>1]=r[c+d|0]|3328;a=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[b+10|0]=a;o[b+11|0]=a>>>8;o[b+12|0]=a>>>16;o[b+13|0]=a>>>24;a=r[105960]|r[105961]<<8;o[b+14|0]=a;o[b+15|0]=a>>>8;break a}Zo(a,e);b:{if((c|0)==3){Tw(a,e,b);break b}Mi[760](b,c+e|0,4)}if((d|0)==3){Tw(a,e,b+8|0);break a}Mi[760](b+8|0,d+e|0,4)}Ii=e+224|0;return g}function pK(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0;g=Ii-16|0;Ii=g;p[g+8>>1]=d;p[g+4>>1]=c;q[g>>2]=-1;p[g+6>>1]=0;$A(a,b,e,g,f);a:{b=s[g>>1];if((b|0)!=65535){f=0;while(1){d=b&65535;h=q[e>>2];i=(q[e+4>>2]-h|0)/24|0;if(d>>>0>=i>>>0){break a}b=h+w(d,24)|0;j=s[b+16>>1];k=0;b:{if((j|0)==65535){break b}if(j>>>0>=i>>>0){break a}k=(h+w(j,24)|0)+4|0}i=k;j=s[b+20>>1];h=q[a+32>>2];if(j>>>0>=(q[a+36>>2]-h|0)/592>>>0){break a}h=h+w(j,592)|0;BJ(h,b,b+4|0,i,f&65535,s[g+6>>1],s[g+8>>1],c);i=s[h+578>>1];h=s[g+6>>1];pK(a,i,s[g+4>>1]+(h?32-z(h)|0:0)&65535,s[g+8>>1],e,d);f=f+1|0;b=s[b+18>>1];if((b|0)!=65535){continue}break}}Ii=g+16|0;return}J(201665,201514,479,201676);G()}function doa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=q[a+4>>2];e=q[b+16>>2];d=q[q[a+12>>2]>>2];if(d>>>0>2]-e>>3>>>0){e=q[e+(d<<3)>>2];f=q[b>>2];if(e>>>0>2]-f>>8>>>0){b=q[a+16>>2];d=q[b+80>>2];if(d){MM(d,b+96|0);b=q[a+16>>2]}c=q[b+68>>2];a=c;d=q[b+64>>2];c=q[57289];if((d|0)==q[c+8>>2]&q[c+12>>2]==(a|0)){a=f+(e<<8)|0;p[a+246>>1]=s[a+246>>1]|1;return 0}c=q[57290];if((d|0)==q[c+8>>2]&(a|0)==q[c+12>>2]){a=f+(e<<8)|0;p[a+246>>1]=s[a+246>>1]&65534;return 0}c=q[59738];if((d|0)==q[c+8>>2]&(a|0)==q[c+12>>2]){a=f+(e<<8)|0;f=a;if(r[a+246|0]&4){Ni(q[a+240>>2])}q[a+240>>2]=Pk(q[b+96>>2]);p[f+246>>1]=s[f+246>>1]|4}return 0}}J(57189,57106,479,57200);G()}function KP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=0,o=x(0),p=x(0);if(q[b+44>>2]==(f|0)){if(f){o=x(x(1)/x(f>>>0));c=q[b+4>>2];i=u[b+28>>2];g=x(t[a+4>>2]);j=x(x(u[b+32>>2]-i)/g);k=j;j=x(t[a>>2]);i=x(i+x(k*j));p=x(x(k+i)-i);h=u[b+16>>2];g=x(x(u[b+20>>2]-h)/g);k=g;g=x(h+x(g*j));j=x(x(k+g)-g);a=0;while(1){d=r[a+c|0];h=x(o*x(a|0));l=x(+x(i+x(p*h))*1.5707963267948966);k=Nl(l);m=a<<3;n=m+e|0;h=x(x(g+x(j*h))*x(x(x(d>>>0)+x(-128))*x(255)));u[n>>2]=u[n>>2]+x(k*h);l=Lk(l);d=(m|4)+e|0;u[d>>2]=u[d>>2]+x(l*h);a=a+1|0;if((f|0)!=(a|0)){continue}break}}q[b+44>>2]=0;return}J(211205,210166,994,211248);G()}function EN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;c=1;a:{b:{switch(b-a>>2){case 2:b=b-4|0;if(t[b>>2]>=t[a>>2]){break a}Hl(a,b);break a;case 3:Iq(a,a+4|0,b-4|0);break a;case 4:xx(a,a+4|0,a+8|0,b-4|0);break a;case 5:tx(a,a+4|0,a+8|0,a+12|0,b-4|0);break a;case 0:case 1:break a;default:break b}}e=a+8|0;Iq(a,a+4|0,e);d=a+12|0;c:{while(1){g=(b|0)==(d|0);if(g){break c}d:{if(t[d>>2]>2]){q[f+12>>2]=q[d>>2];h=d;while(1){e:{c=e;q[h>>2]=q[c>>2];if((a|0)==(c|0)){c=a;break e}h=c;e=c-4|0;if(t[f+12>>2]>2]){continue}}break}q[c>>2]=q[f+12>>2];i=i+1|0;if((i|0)==8){break d}}e=d;d=d+4|0;continue}break}c=(d+4|0)==(b|0)}c=c|g}Ii=f+16|0;return c&1}function y_(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-112|0;Ii=d;b=kj(a,1,0);e=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-1e4,144742);c=e+1|0;Zi(a,c,b);a:{if((Vi(a,-1)|0)!=5){Ri(a,-2);if(Uu(a,-10002,b,1)){q[d>>2]=b;c=Qi(a,145108,d);break a}ej(a,-1);Si(a,c,b)}Zi(a,-1,145138);c=Vi(a,-1);Ri(a,-2);if(!c){ej(a,-1);Si(a,-2,145144);Xi(a,b);Si(a,-2,145138);c=wm(b,46);bj(a,b,(c?c+1|0:b)-b|0);Si(a,-2,145147)}ej(a,-1);b:{c:{if(!sl(a,1,d+8|0)){break c}if(!Hn(a,145156,d+8|0)){break c}if(!eq(a,-1)){break b}}Qi(a,145158,0)}ej(a,-2);gp(a,-2);Ri(a,-2);b=2;c=0;if((e|0)<2){break a}while(1){ej(a,b);ej(a,-2);Rk(a,1,0);f=(b|0)!=(e|0);b=b+1|0;if(f){continue}break}}Ii=d+112|0;return c|0}function lQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-1072|0;Ii=b;g=Tl(a,2,145370,b+28|0);Dj(a,1,5);d=Am(a,3,1);a:{if((Vi(a,4)|0)<=0){e=al(a,1);break a}e=jj(a,4)}c=b+32|0;q[c+4>>2]=0;q[c+8>>2]=a;q[c>>2]=c+12;b:{c:{if((d|0)<(e|0)){while(1){rj(a,1,d);if(!uk(a,-1)){c=Vi(a,-1);f=140583;d:{if((c|0)==-1){break d}f=q[(c<<2)+256832>>2]}c=f;q[b+20>>2]=d;q[b+16>>2]=c;Qi(a,145371,b+16|0)}Os(b+32|0);qn(b+32|0,g,q[b+28>>2]);d=d+1|0;if((e|0)!=(d|0)){continue}break c}}if((d|0)!=(e|0)){break b}}rj(a,1,e);if(!uk(a,-1)){c=Vi(a,-1);d=140583;e:{if((c|0)==-1){break e}d=q[(c<<2)+256832>>2]}q[b+4>>2]=e;q[b>>2]=d;Qi(a,145371,b)}Os(b+32|0)}zm(b+32|0);Ii=b+1072|0;return 1}function GU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-48|0;Ii=b;c=ln(a,137996);q[b+40>>2]=0;e=2;f=kj(a,2,b+44|0);d=kj(a,3,0);g=kj(a,4,0);q[b+28>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;h=q[c+32>>2];q[b+16>>2]=2;q[b+12>>2]=h;q[b+8>>2]=1028;d=ja(d|0,g|0,b+8|0,b+4|0)|0;a:{if(d){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,na(d|0)|0);break a}d=c+8|0;Yn(d);g=c;c=q[b+4>>2];c=hS(g,f,q[b+44>>2],b+40|0,q[c+20>>2],q[c+16>>2],d);Ni(q[b+4>>2]);if(c){f=q[a+8>>2];q[f+8>>2]=0;q[a+8>>2]=f+16;if((c|0)==-2){Xi(a,138035);break a}Xi(a,mm(c));break a}c=q[b+40>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;e=1}Ii=b+48|0;return e|0}function oT(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0;c=Ii-128|0;Ii=c;Fs(c);d=AE();a:{if(!q[d>>2]){break a}h=a+52|0;i=a- -64|0;j=a+40|0;k=a+76|0;l=a+28|0;m=a+16|0;n=a+4|0;o=c+52|0;p=c- -64|0;r=c+40|0;s=c+76|0;t=c+28|0;u=c+16|0;v=c|4;while(1){bo(c);e=d;f=Iu(c,q[d>>2]);if(f){g=f;break a}b:{if(q[a+88>>2]!=q[c+88>>2]|q[a+92>>2]!=q[c+92>>2]){break b}if(_j(n,v)){break b}if(_j(m,u)){break b}if(_j(l,t)){break b}if(_j(k,s)){break b}if(_j(j,r)){break b}if(_j(i,p)){break b}if((Xm(h,0)|0)!=(Xm(o,0)|0)){break b}break a}d=e+4|0;if(q[e+4>>2]){continue}break}}bo(c);q[b>>2]=q[d>>2];Ii=c+128|0;return g?g:q[d>>2]?0:-20096}function eN(a,b){var c=0,d=0,e=0;e=q[a+28>>2];Gj(e);a:{b:{c=b&65535;d=q[a+12>>2];a=q[a+8>>2];if(c>>>0>6>>>0){if(s[(a+(c<<6)|0)+54>>1]!=(b>>>16|0)){break b}b=a+(c<<6)|0;if(q[b+48>>2]!=2){break a}d=q[b+40>>2];if(d){ht(d);q[b+40>>2]=0}a=a+(c<<6)|0;c=a;d=q[a+44>>2];if((d|0)!=-1){qp(d);Cm(q[c+44>>2])}q[a>>2]=0;q[a+4>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[c+44>>2]=-1;q[b+40>>2]=0;q[b+48>>2]=0;Bj(e);return}J(167814,167666,479,167825);G()}J(167780,167483,187,167800);G()}J(167515,167483,457,167548);G()}function pw(a,b){var c=0,d=0,e=0,f=0,g=0;a:{b:{d=q[b+136>>2];c=d>>>16|0;if((c|0)!=32767){if(!(d&255)){break b}d=q[a+1036>>2];e=q[a+1040>>2]-d>>2;if(c>>>0>=e>>>0){break a}f=q[(c<<2)+d>>2];g=q[f+148>>2];a=g>>>16&32767;c:{if((a|0)==32767){break c}c=0;while(1){if(a>>>0>=e>>>0){break a}a=q[(a<<2)+d>>2];if((a|0)==(b|0)){a=q[b+148>>2];if(c){q[c+148>>2]=q[c+148>>2]&-32768|a&32767;break c}q[f+148>>2]=g&-2147418113|a<<16&2147418112;break c}c=a;a=q[a+148>>2]&32767;if((a|0)!=32767){continue}break}}q[b+148>>2]=q[b+148>>2]|32767;a=q[b+140>>2];q[b+136>>2]=q[b+136>>2]&65535|2147418112;q[b+140>>2]=a}return}J(10374,7192,1201,10396);G()}J(12419,9962,479,9454);G()}function M9(){var a=0,b=0,c=0,d=0,e=0,f=0,g=0;a=Ii-48|0;Ii=a;q[213149]=0;a:{if(q[213150]){Kl(171276,38,1,q[53736]);break a}q[213151]=0;q[a+44>>2]=-1;p[a+42>>1]=0;b:{if(!r[266420]){break b}}q[a+16>>2]=0;q[a+20>>2]=0;if(ur(171315,a+16|0)){Kl(171320,49,1,q[53736]);b=q[a+20>>2];d=b;c=q[a+16>>2];if(b|c){Qo(c,d)}b=q[a+44>>2];if((b|0)==-1){break a}Cm(b);break a}b=$i(40);d=q[a+44>>2];c=s[a+42>>1];f=q[a+16>>2];g=q[a+20>>2];e=b+8|0;q[e>>2]=0;q[e+4>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Wi(16,4,b,e,b+4|0);q[b+24>>2]=f;q[b+28>>2]=g;p[b+20>>1]=c;q[b+16>>2]=d;q[213152]=b;q[b+32>>2]=0;q[213153]=0;q[213150]=1;q[213154]=0;q[a>>2]=s[a+42>>1];Pi(2,171374,171379,a)}Ii=a+48|0}function KG(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;g=Ii-112|0;Ii=g;i=a;f=a;if((Vi(f,1)|0)==8){f=Gn(a,1);h=1}e=h|2;a:{if(Oj(i,e)){e=hl(a,e);Ri(a,-2);break a}e=(a|0)==(f|0)}b:{if(q[a+8>>2]-q[a+12>>2]>>4!=(h|0)){if(!uk(a,h+1|0)){break b}}if(!sl(f,e,g+8|0)){break b}h=0;while(1){i=e+1|0;if(h&1){while(1){if(Hn(f,b,g+8|0)){Mi[c|0](f,g+8|0,d)}a=sl(f,i,g+8|0);i=i+1|0;if(a){continue}break b}}while(1){c:{h=i;if((e|0)>11){break c}if(Hn(f,b,g+8|0)){Mi[c|0](f,g+8|0,d)}i=h+1|0;e=h;if(sl(f,e,g+8|0)){continue}break b}break}if(sl(f,e+11|0,g+8|0)){bj(a,122822,5);while(1){e=h;h=e+1|0;if(sl(f,e+10|0,g+8|0)){continue}break}}h=1;if(sl(f,e,g+8|0)){continue}break}}Ii=g+112|0}function Fk(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{c=q[a+112>>2];d=q[a+116>>2];b:{if(c|d){b=c>>>0<=t[a+120>>2];c=q[a+124>>2];if((d|0)<(c|0)?1:(d|0)<=(c|0)?b:0){break b}}g=ax(a);if((g|0)>-1){break a}}q[a+104>>2]=0;return-1}h=a;b=q[a+116>>2];i=b;d=q[a+8>>2];c=d;f=q[a+112>>2];c:{if(!(b|f)){break c}c=d;e=q[a+120>>2]^-1;f=e+f|0;b=(q[a+124>>2]^-1)+i|0;b=f>>>0>>0?b+1|0:b;i=q[a+4>>2];e=d-i|0;j=f>>>0>=e>>>0;e=e>>31;if((b|0)>(e|0)?1:(e|0)<=(b|0)?j:0){break c}c=f+i|0}q[h+104>>2]=c;h=q[a+4>>2];if(d){c=a;b=(d-h|0)+1|0;d=b+q[a+120>>2]|0;a=q[a+124>>2]+(b>>31)|0;q[c+120>>2]=d;q[c+124>>2]=d>>>0>>0?a+1|0:a}a=h-1|0;if(r[a|0]!=(g|0)){o[a|0]=g}return g}function C1(a,b,c,d,e){var f=0,g=0;a:{b:{c:{d:{e:{if(s[a+20>>1]!=s[a+22>>1]){g=E1(b);if(!g){return-4}f=q[a+16>>2];if(!f){break e}b=s[a+22>>1];if(b>>>0>=s[a+20>>1]){break d}p[a+22>>1]=b+1;b=s[f+(b<<1)>>1];f=q[a>>2];if(b>>>0>=(q[a+4>>2]-f|0)/12>>>0){break c}f=f+w(b,12)|0;q[f+8>>2]=g;q[f>>2]=b;d=Mi[q[g+12>>2]](c,d,f+4|0)|0;if(d){e=q[a+16>>2];if(!e){break b}c=s[a+22>>1];if(!c|c>>>0>s[a+20>>1]){break a}f=a;a=c-1|0;p[f+22>>1]=a;p[e+((a&65535)<<1)>>1]=b;return d}q[e>>2]=f;a=0}else{a=-1}return a}J(209850,209799,151,209857);G()}J(209861,209799,152,209857);G()}J(209754,209659,479,209765);G()}J(209850,209799,140,209881);G()}J(209886,209799,141,209881);G()}function dna(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+4>>2];e=q[b+4>>2];c=q[b>>2];d=e-c|0;a=(d|0)/104|0;a:{if(!d){break a}if((c|0)!=(e|0)){e=a>>>0>1?a:1;a=0;while(1){c=w(a,104)+c|0;d=q[c+8>>2];if(d){mG(d);oG(q[c+8>>2])}a=a+1|0;if((e|0)==(a|0)){break a}c=q[b>>2];if((q[b+4>>2]-c|0)/104>>>0>a>>>0){continue}break}}J(50132,49868,479,50143);G()}b:{if(o[b+80|0]&1){break b}a=q[b+68>>2];if(!a){break b}Ni(a)}c:{if(o[b+60|0]&1){break c}a=q[b+48>>2];if(!a){break c}Ni(a)}d:{if(o[b+44|0]&1){break d}a=q[b+32>>2];if(!a){break d}Ni(a)}e:{if(o[b+28|0]&1){break e}a=q[b+16>>2];if(!a){break e}Ni(a)}f:{if(o[b+12|0]&1){break f}a=q[b>>2];if(!a){break f}Ni(a)}Ni(b);return 0}function Ox(a,b,c,d){var e=0,f=0,g=0;f=Ii-16|0;Ii=f;e=q[a>>2];a:{if((e|0)==-1){e=-2;break a}if(!Qw(e,b,c)){e=0;break a}while(1){e=q[240513];q[f+4>>2]=e;if((e|0)!=27){if((e|0)!=26?(e|0)!=6:0){break a}e=-1;if(v[d>>3]==0){break a}b=q[a>>2];q[f+12>>2]=5;q[f+8>>2]=b;b:{c:{while(1){c=f+8|0;g=Qp(d)*1e3;d:{if(y(g)<2147483648){b=~~g;break d}b=-2147483648}b=Vp(c,1,(b|0)>-1?b:-1);if((b|0)!=-1){if(!b){break a}if(r[f+14|0]&9){break c}e=0;break a}if(q[240513]==27){continue}break}e=q[240513];q[f+4>>2]=e;if((e|0)!=-2){break a}break b}q[f+4>>2]=-2}e=0;if(!wu(q[a>>2],f+4|0,0)){break a}e=q[240513];break a}if(Qw(q[a>>2],b,c)){continue}break}e=0}Ii=f+16|0;return e}function xk(a,b){var c=0,d=0,e=0,f=0,g=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}e=c;f=c;b=q[a+8>>2];if(c>>>0>>0){while(1){d=b-16|0;g=q[d+4>>2];q[b>>2]=q[d>>2];q[b+4>>2]=g;q[b+8>>2]=q[d+8>>2];b=d;if(c>>>0>>0){continue}break}b=q[a+8>>2]}a=q[b+4>>2];q[f>>2]=q[b>>2];q[e+4>>2]=a;q[c+8>>2]=q[b+8>>2]}function UV(a,b,c,d){var e=0,f=0;e=Ii-192|0;Ii=e;Vq(e+104|0);aq(e+8|0);q[e+112>>2]=1732584193;q[e+116>>2]=-271733879;q[e+104>>2]=0;q[e+108>>2]=0;q[e+120>>2]=-1732584194;q[e+124>>2]=271733878;f=Uq(e+104|0,q[a+68>>2]+1128|0,64);a:{if(f){break a}f=Uq(e+104|0,c,d);if(f){break a}f=zs(e+104|0,b);if(f){break a}q[e+16>>2]=1732584193;q[e+20>>2]=-271733879;q[e+8>>2]=0;q[e+12>>2]=0;q[e+32>>2]=-1009589776;q[e+24>>2]=-1732584194;q[e+28>>2]=271733878;f=$p(e+8|0,q[a+68>>2]+1128|0,64);if(f){break a}f=$p(e+8|0,c,d);if(f){break a}f=Rq(e+8|0,b+16|0)}b=e+104|0;if(b){Mi[q[65677]](b,0,88)|0}b=e+8|0;if(b){Mi[q[65677]](b,0,92)|0}if(f){Xj(a,2,80)}Ii=e+192|0;return f}function Jra(a){var b=0,c=0,d=0,e=0;b=Ii-144|0;Ii=b;c=q[71400];a:{if(c){while(1){e=_m(b+32|0);d=Vl(q[a+4>>2],q[c+12>>2],b+28|0);if(d){e=q[c+12>>2];a=b;c=d+21|0;b:{if(c>>>0<=21){c=q[(c<<2)+230968>>2];break b}c=26012}q[a+20>>2]=c;q[b+16>>2]=e;Pi(3,5642,5693,b+16|0);d=-1e3;break a}q[b+24>>2]=0;if(Cw(q[a+8>>2],q[b+28>>2],b+24|0)){q[b>>2]=q[c+12>>2];Pi(3,5642,5734,b)}p[b+132>>1]=q[q[a+8>>2]>>2];q[b+32>>2]=q[b+28>>2];d=q[c+12>>2];q[b+36>>2]=d;q[b+40>>2]=Oi(d);q[b+44>>2]=Li;q[b+132>>2]=q[b+132>>2]|65536;d=Mi[q[c+4>>2]](a,e)|0;if(d){break a}d=hn(q[a+8>>2],e);if(d){break a}p[c+16>>1]=q[b+132>>2];c=q[c>>2];if(c){continue}break}}d=0}Ii=b+144|0;return d}function Eq(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0;j=1;i=d&2147483647;m=i;k=c;a:{if(!c&(i|0)==2147418112?a|b:(i|0)==2147418112&(c|0)!=0|i>>>0>2147418112){break a}l=h&2147483647;n=l;i=g;if(!g&(l|0)==2147418112?e|f:(l|0)==2147418112&(g|0)!=0|l>>>0>2147418112){break a}if(!(a|e|(i|k)|(b|f|(m|n)))){return 0}k=d&h;if((k|0)>0?1:(k|0)>=0){j=-1;if((c|0)==(g|0)&(d|0)==(h|0)?(b|0)==(f|0)&a>>>0>>0|b>>>0>>0:(d|0)<(h|0)?1:(d|0)<=(h|0)?c>>>0>>0:0){break a}return(a^e|c^g)!=0|(b^f|d^h)!=0}j=-1;if((c|0)==(g|0)&(d|0)==(h|0)?(b|0)==(f|0)&a>>>0>e>>>0|b>>>0>f>>>0:(d|0)>(h|0)?1:(d|0)>=(h|0)?c>>>0>g>>>0:0){break a}j=(a^e|c^g)!=0|(b^f|d^h)!=0}return j}function Dpa(a){a=a|0;var b=0,c=0,d=0,e=0;d=q[a+8>>2];b=q[q[a+16>>2]>>2];a=q[q[a+12>>2]+4>>2];c=0;a:{if(!a){break a}c=q[a+120>>2]}o[b+24|0]=r[b+24|0]&254;a=q[b+12>>2];if((a|0)!=-2){Rj(c,-1e4,a);Rj(c,-1e4,q[b+16>>2]);Rj(c,-1e4,q[b+20>>2]);q[b+20>>2]=-2;q[b+12>>2]=-2;q[b+16>>2]=-2}a=q[b+8>>2];if(a){Pn(a);q[b+8>>2]=0}b:{c:{e=q[d>>2];if((e|0)!=q[d+4>>2]){q[b>>2]=0;a=q[b+4>>2];if(a){bL(q[d+32>>2],a)}q[b+4>>2]=0;o[b+24|0]=r[b+24|0]&253;c=q[d+16>>2];if(!c){break c}a=q[d+24>>2];if(!a|a>>>0>t[d+20>>2]){break b}a=a-1|0;q[d+24>>2]=a;q[(a<<2)+c>>2]=(b-e|0)/28;return 0}J(34809,34820,479,34798);G()}J(35291,35240,140,35014);G()}J(35322,35240,141,35014);G()}function M4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=Ii+ -64|0;Ii=c;g=c+16|0;b=a;d=0;a:{if(!b){break a}d=q[b+120>>2]}k=d;g=nj(g,d,0,125134,103);b=b?q[a+120>>2]:0;d=nj(c+40|0,b,0,125134,91);Xi(b,q[63063]);MG(a);j=qj(b,-1);Ri(b,-2);mj(d);b:{if(!j){break b}e=q[210498];if(!e){break b}while(1){c:{if(!q[e+28>>2]){break c}f=c+40|0;q[f>>2]=0;q[f+4>>2]=0;q[f+8>>2]=0;b=c;d=a;h=0;d:{if(!d){break d}h=q[d>>2]}q[b+40>>2]=h;b=d?q[a+4>>2]:0;q[c+48>>2]=k;q[c+44>>2]=b;if(!(q[((i&-4)+j|0)+4>>2]>>>(i&3)&1)){break c}if(!(Mi[q[e+28>>2]](f)|0)){break c}q[c>>2]=q[e>>2];Pi(4,125163,125205,c)}i=i+1|0;e=q[e+36>>2];if(e){continue}break}}mj(g);Ii=c- -64|0}function EG(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-32|0;Ii=e;a:{g=q[a+8>>2]-q[a+12>>2]>>4;if((g|0)>-1){f=q[79286];h=q[a+8>>2];q[h+8>>2]=3;v[h>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);b:{if(!$l(a,-1)){f=-2;break b}bj(a,122519,14);f=-2;jl(a,-2);ll(a,-2);if(!Vi(a,-1)){Ri(a,-2);break b}ej(a,-2);bj(a,b,c);Rk(a,2,1);q[d>>2]=nl(a,-1);q[d+4>>2]=Li;f=-3}Ri(a,f);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(g|0)){break a}Ii=e+32|0;return}q[e+12>>2]=g;q[e+4>>2]=798;q[e+8>>2]=0;q[e>>2]=122672;Pi(4,122749,123291,e);J(123363,122672,1469,123380);G()}q[e+28>>2]=a;q[e+24>>2]=g;q[e+20>>2]=798;q[e+16>>2]=122672;Pi(4,122749,123394,e+16|0);J(123465,122672,1492,123484);G()}function kD(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=-27136;g=q[a+20>>2];h=((g|0)!=0)<<1;i=h+b|0;a:{if(i>>>0>16384){break a}e=q[a>>2];d=(q[a+68>>2]+d|0)+1192|0;ls(r[e+180|0],r[e+181|0],q[e+184>>2]>>>1&1,d);e=q[a>>2];e=Mi[q[e+24>>2]](q[e+28>>2],d+2|0,46)|0;if(e){break a}q[q[a+68>>2]+1124>>2]=48;f=q[q[a+64>>2]+96>>2];if(!f){return-27648}e=0;f=f+204|0;b:{if(!f){break b}j=q[f>>2];if(!j){break b}e=Mi[q[j+12>>2]](1)|0}if(!e){return-27904}e=d;d=q[a>>2];e=FW(f,e,q[q[a+68>>2]+1124>>2],(q[a+204>>2]+b|0)+h|0,c,16384-i|0,q[d+24>>2],q[d+28>>2]);if(e|!g){break a}o[q[a+204>>2]+b|0]=q[c>>2]>>>8;o[(q[a+204>>2]+b|0)+1|0]=q[c>>2];q[c>>2]=q[c>>2]+2;e=0}return e}function s5(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0;g=Ii-32|0;Ii=g;h=Oi(c);i=Li;q[g+16>>2]=Pk(c);c=q[b+16>>2];k=q[(c?12:0)+b>>2];c=q[(c?16:4)+b>>2];j=Yi(c);q[g+12>>2]=c;q[g+8>>2]=j;Ti(j,k,c);q[g+20>>2]=d;q[g+24>>2]=Pk(q[b+8>>2]);b=a+8|0;c=q[a+32>>2];if((c|0)==q[a+24>>2]-q[a+16>>2]>>5){uA(b,127,c+128|0);vA(a+40|0,127,(q[a+56>>2]-q[a+48>>2]>>4)+128|0)}JI(b,h,i,g+8|0);c=q[a+12>>2];a:{b:{if(!c){break b}b=q[q[b>>2]+(Cza(h,i,c)<<2)>>2];if((b|0)==-1){break b}c=q[a+16>>2];while(1){d=b<<5;b=d+c|0;if(q[b>>2]==(h|0)&(i|0)==q[b+4>>2]){break a}b=q[(c+d|0)+28>>2];if((b|0)!=-1){continue}break}}b=0}q[g+4>>2]=b?b+8|0:0;KI(a+40|0,e,f,g+4|0);Ii=g+32|0;return 0}function s2(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=x(0);d=Ii-48|0;Ii=d;a:{if(!(q[a+8>>2]-q[a+12>>2]>>4)){break a}if(q[a+8>>2]-q[a+12>>2]>>4==1){if((Vi(a,-1)|0)==3){c=x(Mj(a,-1));g=c;e=c;f=c;break a}b=_i(a,-1,q[210437],0);c=u[b>>2];g=u[b+4>>2];b:{if(c!=c|g!=g){break b}e=u[b+8>>2];if(e!=e){break b}f=u[b+12>>2];if(f==f){break a}}e=u[b+8>>2];f=u[b+12>>2];v[d+16>>3]=g;v[d+32>>3]=f;v[d+24>>3]=e;v[d+8>>3]=c;q[d>>2]=-1;Qi(a,134221,d);f=u[b+12>>2];e=u[b+8>>2];g=u[b+4>>2];c=u[b>>2];break a}c=x(fj(a,1));g=x(fj(a,2));e=x(fj(a,3));f=x(fj(a,4))}b=yj(a,16);u[b+12>>2]=f;u[b+8>>2]=e;u[b+4>>2]=g;u[b>>2]=c;Zi(a,-1e4,134016);xj(a,-2);Ii=d+48|0;return 1}function SK(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;g=Ii-48|0;Ii=g;f=g;q[f+40>>2]=b;q[f+44>>2]=c;q[f+16>>2]=0;q[f+20>>2]=0;q[f+32>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;kk(f+16|0,f+40|0,8);kk(f+16|0,d,e<<4);i=Rn(f+16|0);q[f+8>>2]=i;q[f+12>>2]=0;h=a+16|0;d=q[a+20>>2];a:{b:{if(!d){break b}d=q[q[h>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break b}e=q[a+24>>2];while(1){j=w(d,24)+e|0;f=j;if(q[f>>2]!=(b|0)|q[f+4>>2]!=(c|0)){d=q[j+16>>2];if((d|0)!=-1){continue}break b}break}f=w(d,24)+e|0;d=q[f+8>>2];if(!q[f+12>>2]&(d|0)==(i|0)){break a}}o[a+52|0]=1;e=q[a+24>>2]}d=(q[a+32>>2]-e|0)/24|0;a=q[a+40>>2];if((d|0)==(a|0)){a=a+8|0;pt(h,a,a<<1)}Ov(h,b,c,g+8|0);Ii=g+48|0}function v4(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=0,m=0,n=0,o=0,p=0;f=Ii-16|0;Ii=f;l=fj(a,1);m=fj(a,2);n=fj(a,3);o=fj(a,4);d=x(fj(a,5));if(d==x(0)){Ms(a,1);q[f>>2]=uj(a,-1,0);Pi(3,135828,135835,f)}p=fj(a,6);b=yj(a,64);q[b+4>>2]=0;q[b+8>>2]=0;q[b+60>>2]=0;q[b+52>>2]=0;q[b+44>>2]=-1082130432;q[b+48>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;e=x(m);h=x(l);i=x(x(1)/x(e-h));g=x(d+d);u[b>>2]=i*g;j=x(o);k=x(n);c=x(x(1)/x(j-k));u[b+36>>2]=x(k+j)*c;u[b+32>>2]=x(h+e)*i;u[b+20>>2]=g*c;c=x(p);e=x(x(1)/x(d-c));u[b+40>>2]=x(d+c)*e;u[b+56>>2]=x(g*e)*c;Zi(a,-1e4,134048);xj(a,-2);Ii=f+16|0;return 1}function ML(a,b){var c=0,d=0,e=0,f=0;e=Ii-16|0;Ii=e;c=q[b>>2];if(q[c+12>>2]==2){q[c+12>>2]=1}c=ak(a,q[c>>2],b+4|0);a:{if(c){break a}c=ak(a,q[q[b>>2]+8>>2],b+8|0);if(c){break a}if(q[q[q[b+8>>2]>>2]+152>>2]){Pi(4,64070,64078,0);c=-15;break a}a=Oi(q[q[b>>2]+4>>2]);c=Li;f=c;q[b+16>>2]=a;q[b+20>>2]=c;d=q[b+4>>2];c=q[d+20>>2];b:{if(!c){break b}c=q[q[d+16>>2]+(Cza(a,f,c)<<2)>>2];if((c|0)==-1){break b}d=q[d+24>>2];while(1){c=d+(c<<4)|0;if(q[c>>2]==(a|0)&q[c+4>>2]==(f|0)){c=0;break a}c=q[c+12>>2];if((c|0)!=-1){continue}break}}a=q[q[b>>2]+4>>2];c:{if(!(r[a|0]?a:0)){Pi(4,64070,64211,0);break c}q[e>>2]=a;Pi(4,64070,64242,e)}c=-13}Ii=e+16|0;return c}function Iya(){q[60043]=q[71906];q[71906]=240144;q[60085]=q[71906];q[71906]=240312;q[60107]=q[71906];q[71906]=240400;q[60187]=q[71906];q[71906]=240720;q[60211]=q[71906];q[71906]=240816;q[60253]=q[71906];q[71906]=240984;q[60341]=q[71906];q[71906]=241336;q[60381]=q[71906];q[71906]=241496;q[60415]=q[71906];q[71906]=241632;q[60463]=q[71906];q[71906]=241824;q[60481]=q[71906];q[71906]=241896;q[74788]=1;q[74786]=-1505215520;q[74787]=-1547365408;q[74785]=85027;q[74784]=1;q[74791]=0;o[299160]=0;q[74789]=q[74783];q[74791]=q[71906];q[71906]=299136;q[60503]=q[71906];q[71906]=241984;q[60557]=q[71906];q[71906]=242200;q[60579]=q[71906];q[71906]=242288}function pxa(a){var b=0,c=0,d=x(0),e=0;a:{b:{e=(Pza(a),Lza(2));c=e&2147483647;if(c>>>0>=1065353216){if((c|0)!=1065353216){break b}return x(+a*1.5707963267948966+7.52316384526264e-37)}if(c>>>0<=1056964607){if(c-8388608>>>0<956301312){break a}d=x(a*a);return x(x(x(x(x(x(x(x(d*x(-.008656363002955914))+x(-.04274342209100723))*d)+x(.16666586697101593))*d)/x(x(d*x(-.7066296339035034))+x(1)))*a)+a)}a=x(x(x(1)-x(y(a)))*x(.5));b=F(+a);b=b+b*+x(x(x(x(x(x(a*x(-.008656363002955914))+x(-.04274342209100723))*a)+x(.16666586697101593))*a)/x(x(a*x(-.7066296339035034))+x(1)));a=x(1.5707963267948966-(b+b));return(e|0)>-1?a:x(-a)}a=x(x(0)/x(a-a))}return a}function o1(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-32|0;Ii=g;a:{if(a){e=hj(a);if(e){break a}}a=183117;q[g+16>>2]=183117;Pi(3,182929,183123,g+16|0);e=5}c=a;while(1){d=r[c|0];if(!(!d|(d|0)==45|(d|0)==95)){c=c+1|0;continue}break}d=c;e=a+e|0;f=1;b:{if((e|0)==(c|0)){break b}d=e;while(1){h=r[d|0];f=0;if((h|0)==45|(h|0)==95){break b}d=d-1|0;if((d|0)!=(c|0)){continue}break}d=c;f=1}i=b+160|0;h=c-a|0;c=h+1|0;Pj(i,a,c>>>0<8?c:8);c=b+168|0;c:{if(!f){f=c;c=(d-a|0)+1|0;Pj(f,a,c>>>0<16?c:16);o[(b+h|0)+168|0]=45;break c}Pj(c,i,8)}b=b+184|0;d:{if((d|0)!=(e|0)){a=e-d|0;Pj(b,d+1|0,a>>>0<8?a:8);break d}o[b|0]=0;q[g>>2]=a;Pi(3,182929,183185,g)}Ii=g+32|0}function l9(a,b,c){var d=0,e=0,f=0;q[a>>2]=0;q[a+4>>2]=0;q[a+28>>2]=0;q[a+32>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+52>>2]=1;q[a+48>>2]=c;q[a+16>>2]=0;q[a+20>>2]=0;c=a+8|0;q[c>>2]=0;q[c+4>>2]=0;q[a+36>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a- -64>>2]=0;o[a+24|0]=r[a+24|0]&254;Wi(b,4,a,c,a+4|0);a:{d=q[c>>2];c=q[a>>2];if(d-c>>2>>>0>=b>>>0){q[a+4>>2]=c+(b<<2);if(b){Ui(c,0,b<<2)}c=s[a+20>>1];d=b&65535;if(c>>>0>d>>>0){break a}f=q[a+16>>2];e=Yi(d<<1);q[a+16>>2]=e;e=Ti(e,f,c<<1);p[a+20>>1]=b;if(c>>>0>>0){while(1){p[e+(c<<1)>>1]=c;c=c+1|0;if((d|0)!=(c|0)){continue}break}}Ni(f);return a}J(151260,151192,506,151279);G()}J(151287,151310,112,151248);G()}function I9(a,b){var c=0,d=0,e=0;a:{b:{if(q[213234]|!(a|b)){break b}while(1){c=q[213233];q[213233]=c?c:1;if(c){continue}break}c:{d=q[213232];c=q[d+4>>2];d:{if(!c){break d}c=q[q[d>>2]+(Cza(a,b,c)<<2)>>2];if((c|0)==-1){break d}d=q[d+8>>2];while(1){e=d+(c<<6)|0;if((a|0)==q[e>>2]&q[e+4>>2]==(b|0)){break c}c=q[e+56>>2];if((c|0)!=-1){continue}break}}q[213233]=0;return 0}a=d+(c<<6)|0;c=q[a+8>>2];if(!c){break a}b=a+8|0;q[b>>2]=c+1;q[213233]=0;c=q[a+36>>2];Gj(c);d=q[a+24>>2];Bj(c);while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}a=q[b>>2]-1|0;q[b>>2]=a;q[213233]=0;c=(d|0)!=0;if(a){break b}ot(b)}return c}J(172281,172300,289,172324);G()}function RH(a){var b=0,c=0,d=0;b=q[q[a+304>>2]+2012>>2];c=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[a+320>>2]);yk(b);Ez(q[a+312>>2]);d=q[b+8>>2];q[d+8>>2]=0;q[b+8>>2]=d+16;yk(b);Rj(b,-1e4,q[a+320>>2]);Rj(b,-1e4,q[a+324>>2]);Rj(b,-1e4,q[a+328>>2]);if((c|0)==q[b+8>>2]-q[b+12>>2]>>4){c=q[a+316>>2];if(c){b=0;while(1){d=q[((b<<2)+a|0)+48>>2];if(d){Ni(d);c=q[a+316>>2]}b=b+1|0;if(c>>>0>b>>>0){continue}break}}a:{if(o[a+44|0]&1){break a}b=q[a+24>>2];if(b){Ni(b)}b=q[a+16>>2];if(!b){break a}Ni(b)}b:{if(o[a+12|0]&1){break b}b=q[a>>2];if(!b){break b}Ni(b)}a=Ui(a,0,320);q[a+328>>2]=-2;q[a+320>>2]=-2;q[a+324>>2]=-2;return}J(115568,115465,3315,119409);G()}function iga(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a:{if(b>>>0<2097152){b:{if(a+1>>>0<2){break b}b=a&65535;e=q[75054];if(b>>>0>=t[e+32>>2]){break a}f=q[q[e+24>>2]+(b<<2)>>2];if(!f){break b}d=s[q[e+28>>2]+(b<<1)>>1]==(a>>>16|0)?f:0}if(!(!(1<>>0>8)){a=(rq(c)<<6)+d|0;b=q[a+56>>2]==2;c=b?q[a+48>>2]:0;Li=b?q[a+52>>2]:0;return c|0}if(q[d+440>>2]==2){Li=q[d+436>>2];return q[d+432>>2]}a=0;b=0;c:{d:{c=c-16|0;if(c){if((c|0)==16){break d}break c}if(q[d+312>>2]!=2){break c}Li=q[d+308>>2];return q[d+304>>2]}if(q[d+376>>2]!=2){break c}a=q[d+368>>2];b=q[d+372>>2]}Li=b;return a|0}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function mV(a,b){var c=0,d=0,e=0;e=Ii-48|0;Ii=e;d=-8320;a:{b:{c:{c=q[a>>2];switch((c&223)-128|0){case 2:break b;case 0:break c;default:break a}}d=$O(c,q[a+4>>2],q[a+8>>2],e+8|0);if(d){break a}d=0;q[b>>2]=0;a=e;c=q[a+12>>2];q[b+4>>2]=q[a+8>>2];q[b+8>>2]=c;c=q[a+20>>2];q[b+12>>2]=q[a+16>>2];q[b+16>>2]=c;c=q[a+28>>2];q[b+20>>2]=q[a+24>>2];q[b+24>>2]=c;c=q[a+36>>2];q[b+28>>2]=q[a+32>>2];q[b+32>>2]=c;q[b+36>>2]=q[a+40>>2];break a}q[b+4>>2]=0;q[b+8>>2]=0;q[b>>2]=2;d=0;q[b+36>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;c=q[a+4>>2];q[b+4>>2]=q[a>>2];q[b+8>>2]=c;q[b+12>>2]=q[a+8>>2]}Ii=e+48|0;return d}function _aa(a,b,c){var d=0,e=0,f=0;a:{b:{c:{d:{e:{e=b&65535;d=q[a+32>>2];if(e>>>0<(q[a+36>>2]-d|0)/592>>>0){if(s[(d+w(e,592)|0)+568>>1]!=(b>>>16|0)){break e}e=d+w(e,592)|0;if(s[e+570>>1]!=(b&65535)){break d}d=-10;if((q[e+412>>2]&240)!=80){break b}f=q[a+264>>2];e=q[a+260>>2];d=f-e|0;if(!d){break c}d=(d|0)/12|0;if((e|0)!=(f|0)){f=d>>>0>1?d:1;d=0;while(1){e=w(d,12)+e|0;if(q[e+8>>2]==(b|0)){kA(q[a+224>>2],q[e>>2],c)}d=d+1|0;if((f|0)==(d|0)){break c}e=q[a+260>>2];if((q[a+264>>2]-e|0)/12>>>0>d>>>0){continue}break}}break a}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}d=0}return d}J(201665,201514,479,201676);G()}function WM(a,b,c){var d=0,e=0,f=0;e=Ii-32|0;Ii=e;a:{b:{c:{d=q[b+4>>2];switch((d>>>28|0)-1|0){case 0:break b;case 1:break c;default:break a}}q[e>>2]=q[b>>2];Pi(3,22872,22905,e);break a}d:{f=d&264241152;if((f|0)!=50331648){if((f|0)!=37748736){break d}f=q[b+16>>2];if(!f){break d}hta(c,a,b,f,hj(f));break a}if(!q[b+16>>2]){break d}Pi(3,22872,22971,0);break a}d=d>>>22&63;if((d|0)==11){gta(e+16|0,c,b);c=q[b+8>>2];if(!r[c+24|0]){break a}b=0;while(1){d=q[c+20>>2]+w(b,24)|0;e:{if(r[d+20|0]&127){Pi(3,22872,23015,0);break e}WM(a,d,e+16|0)}b=b+1|0;if(b>>>0>2];if(!a){break a}ita(c,b,a,MB(d))}Ii=e+32|0}function $L(a,b){var c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;d=s[b+88>>1];c=s[b+90>>1];p[f+14>>1]=c;a:{if((d|0)!=65535){e=q[a+16>>2];if(q[a+20>>2]-e>>1>>>0<=d>>>0){break a}e=s[e+(d<<1)>>1];g=q[a>>2];if(e>>>0>=(q[a+4>>2]-g|0)/104>>>0){break a}p[(w(e,104)+g|0)+90>>1]=c;c=s[f+14>>1]}if((c|0)!=65535){e=q[a+16>>2];if(q[a+20>>2]-e>>1>>>0<=c>>>0){break a}c=s[e+(c<<1)>>1];g=q[a>>2];if(c>>>0>=(q[a+4>>2]-g|0)/104>>>0){break a}p[(g+w(c,104)|0)+88>>1]=d}b:{if((d|0)!=65535){break b}a=a+76|0;d=q[b+80>>2];if(s[f+14>>1]==65535){Nv(a,d);break b}Mv(a,d,f+14|0)}q[b+84>>2]=0;q[b+88>>2]=-1;q[b+76>>2]=0;q[b+80>>2]=0;Ii=f+16|0;return}J(6640,6386,479,6651);G()}function tp(a,b){var c=0,d=0,e=0;a:{d=q[a+4>>2];c=q[d+4>>2];b:{if(!c){break b}c=q[q[d>>2]+((b>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break b}d=q[d+8>>2];while(1){e=d+w(c,24)|0;if(q[e>>2]==(b|0)){break a}c=q[e+16>>2];if((c|0)!=-1){continue}break}}J(25672,24997,1208,25686);G()}c:{a=q[a>>2];b=q[a+4>>2];d:{if(!b){break d}c=d+w(c,24)|0;d=q[c+8>>2];e=q[c+12>>2];c=q[q[a>>2]+(Cza(d,e,b)<<2)>>2];if((c|0)==-1){break d}a=q[a+8>>2];while(1){b=a+w(c,48)|0;if(q[b>>2]==(d|0)&(e|0)==q[b+4>>2]){break c}c=q[b+40>>2];if((c|0)!=-1){continue}break}}J(25623,24997,1211,25686);G()}a=a+w(c,48)|0;b=q[a+36>>2];if(!b){J(25626,24997,1212,25686);G()}q[a+36>>2]=b+1}function l5(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0);b=Ii+ -64|0;Ii=b;d=_i(a,1,q[210436],0);e=u[d>>2];f=u[d+4>>2];a:{if(!(e!=e|f!=f)){c=u[d+8>>2];if(c==c){break a}}c=u[d+8>>2];v[b+48>>3]=f;v[b+56>>3]=c;v[b+40>>3]=e;q[b+32>>2]=1;Qi(a,134131,b+32|0)}g=_i(a,2,q[210436],0);e=u[g>>2];f=u[g+4>>2];b:{if(!(e!=e|f!=f)){c=u[g+8>>2];if(c==c){break b}}c=u[g+8>>2];v[b+16>>3]=f;v[b+24>>3]=c;v[b+8>>3]=e;q[b>>2]=2;Qi(a,134131,b);c=u[g+8>>2];f=u[g+4>>2];e=u[g>>2]}h=u[d+4>>2];i=u[d>>2];j=u[d+8>>2];d=yj(a,16);u[d+8>>2]=x(i*f)-x(h*e);u[d+4>>2]=x(j*e)-x(i*c);u[d>>2]=x(h*c)-x(j*f);Zi(a,-1e4,134e3);xj(a,-2);Ii=b- -64|0;return 1}function Toa(a){a=a|0;var b=0,c=0,d=0,e=0;d=q[a+8>>2];b=q[q[a+16>>2]>>2];a=q[q[a+12>>2]+4>>2];c=0;a:{if(!a){break a}c=q[a+120>>2]}q[b+24>>2]=q[b+24>>2]&-2;a=q[b+12>>2];if((a|0)!=-2){Rj(c,-1e4,a);Rj(c,-1e4,q[b+16>>2]);Rj(c,-1e4,q[b+20>>2]);q[b+20>>2]=-2;q[b+12>>2]=-2;q[b+16>>2]=-2}a=q[b+8>>2];if(a){Pn(a);q[b+8>>2]=0}b:{c:{e=q[d+4>>2];if((e|0)!=q[d+8>>2]){q[b>>2]=0;a=q[b+4>>2];if(a){aL(q[d>>2],a)}q[b+24>>2]=q[b+24>>2]&-3;c=q[d+20>>2];if(!c){break c}a=q[d+28>>2];if(!a|a>>>0>t[d+24>>2]){break b}a=a-1|0;q[d+28>>2]=a;q[(a<<2)+c>>2]=(b-e|0)/28;return 0}J(40063,39894,479,40074);G()}J(40085,40012,140,40116);G()}J(40121,40012,141,40116);G()}function SC(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0;i=Ii-80|0;Ii=i;q[i>>2]=0;q[i+4>>2]=0;q[i+8>>2]=0;a=a-3|0;a:{if(a>>>0<=5){k=q[(a<<2)+263e3>>2];break a}k=0}b:{if(!k){e=-27648;break b}a=(k?q[k+8>>2]:0)&255;l=hj(d);n=l+f|0;m=a+n|0;j=bk(1,m);c:{if(!j){e=-32512;break c}d=Ti(a+j|0,d,l);Ti(d+l|0,e,f);e=En(i,k,1);if(e){break c}ep(i,b,c);il(i,d,n);em(i,j);e=0;if(!h){break c}b=0;f=0;while(1){bn(i);il(i,j,m);em(i,i+16|0);bn(i);il(i,j,a);em(i,j);f=a+f|0;d=h>>>0>>0?(h>>>0)%(a>>>0)|0:a;if(d){Ti(w(a,b)+g|0,i+16|0,d)}b=b+1|0;if(f>>>0>>0){continue}break}}ym(i);Mi[q[65677]](j,0,m)|0;Mi[q[65677]](i+16|0,0,64)|0;Ni(j)}Ii=i+80|0;return e}function LP(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=0,n=0,o=x(0),r=x(0);if(q[b+44>>2]==(f|0)){if(f){o=x(x(1)/x(f>>>0));c=q[b+4>>2];i=u[b+28>>2];g=x(t[a+4>>2]);j=x(x(u[b+32>>2]-i)/g);k=j;j=x(t[a>>2]);i=x(i+x(k*j));r=x(x(k+i)-i);h=u[b+16>>2];g=x(x(u[b+20>>2]-h)/g);k=g;g=x(h+x(g*j));j=x(x(k+g)-g);a=0;while(1){d=p[(a<<1)+c>>1];h=x(o*x(a|0));l=x(+x(i+x(r*h))*1.5707963267948966);k=Nl(l);m=a<<3;n=m+e|0;h=x(x(g+x(j*h))*x(d|0));u[n>>2]=u[n>>2]+x(k*h);l=Lk(l);d=(m|4)+e|0;u[d>>2]=u[d>>2]+x(l*h);a=a+1|0;if((f|0)!=(a|0)){continue}break}}q[b+44>>2]=0;return}J(211205,210166,994,211248);G()}function eH(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;i=q[a+20>>2];Gj(i);a:{b:{h=q[a+4>>2];f=q[a>>2];d=h-f|0;c:{if(!d){break c}c=f-h|0;e=((c|0)>(d|0)?c:d)>>>4|0;c=(d|0)>-1?d:-1;e=w(e,(c|0)<1?c:1);j=e>>>0>1?e:1;c=0;while(1){if((c|0)==(e|0)){break b}if(q[((c<<4)+f|0)+4>>2]==(b|0)){if(d>>4>>>0<=c>>>0){break c}b=(c<<4)+f|0;c=h-16|0;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;d=q[c+12>>2];q[b+8>>2]=q[c+8>>2];q[b+12>>2]=d;b=q[a+4>>2]-16|0;q[a+4>>2]=b;a=q[a>>2];if(a>>>0>b>>>0){break a}ju(a,b,g+8|0);break c}c=c+1|0;if((j|0)!=(c|0)){continue}break}}Bj(i);Ii=g+16|0;return}J(28298,28028,479,28309);G()}J(28099,28028,516,28089);G()}function $Q(a,b,c){var d=0,e=0,f=0,g=0,h=0;h=q[a+204>>2];q[c>>2]=0;d=6;f=q[q[a>>2]+100>>2];g=q[f>>2];a:{if(g){while(1){d=e;e=g-1|0;b:{if(e>>>0<=11){e=q[(e<<2)+264192>>2];break b}e=0}if(!e){break a}e=d+2|0;g=q[f+4>>2];f=f+4|0;if(g){continue}break}d=d+8|0}e=h+16384|0;if(e>>>0>>0|e-b>>>0>>0){break a}g=q[q[a>>2]+100>>2];f=q[g>>2];if(!f){break a}e=b+6|0;d=0;while(1){a=d;h=d+e|0;d=f-1|0;c:{if(d>>>0<=11){d=q[(d<<2)+264192>>2];break c}d=0}o[h|0]=r[d+5|0];o[e+(a|1)|0]=r[d+4|0];d=a+2|0;f=q[g+4>>2];g=g+4|0;if(f){continue}break}if(!d){break a}o[b+5|0]=d;o[b|0]=0;o[b+1|0]=10;o[b+4|0]=d>>>8;d=a+4|0;o[b+3|0]=d;o[b+2|0]=d>>>8;q[c>>2]=a+8}}function Coa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=q[b+32>>2];c=q[b+36>>2];q[a+72>>2]=q[b+32>>2];q[a+76>>2]=c;e=q[b+28>>2];c=a- -64|0;q[c>>2]=q[b+24>>2];q[c+4>>2]=e;c=q[b+20>>2];q[a+56>>2]=q[b+16>>2];q[a+60>>2]=c;c=q[b+12>>2];q[a+48>>2]=q[b+8>>2];q[a+52>>2]=c;c=q[b+4>>2];q[a+40>>2]=q[b>>2];q[a+44>>2]=c;c=q[b+12>>2];q[a+88>>2]=q[b+8>>2];q[a+92>>2]=c;c=q[b+4>>2];q[a+80>>2]=q[b>>2];q[a+84>>2]=c;c=q[b+20>>2];q[a+96>>2]=q[b+16>>2];q[a+100>>2]=c;c=q[b+28>>2];q[a+104>>2]=q[b+24>>2];q[a+108>>2]=c;c=q[b+36>>2];q[a+112>>2]=q[b+32>>2];q[a+116>>2]=c;q[a+88>>2]=3;b=Bea(q[d+8>>2],q[b+8>>2]==3?q[b>>2]:0);q[a+120>>2]=209;q[a+80>>2]=b;q[a+84>>2]=0}function Y6(a,b,c,d,e){var f=0,g=0,h=0,i=0;h=-10;f=q[a>>2];a=q[f+4>>2];a:{if(!a){break a}a=q[q[f>>2]+(Cza(b,c,a)<<2)>>2];if((a|0)==-1){break a}i=q[f+8>>2];while(1){g=i+w(a,48)|0;f=g;if(q[f>>2]!=(b|0)|q[f+4>>2]!=(c|0)){a=q[g+40>>2];if((a|0)!=-1){continue}break a}break}b=i+w(a,48)|0;a=q[b+32>>2];g=q[a>>2];f=q[a+4>>2];a=0;b:{while(1){c=(a<<3)+d|0;if(q[c>>2]==(g|0)&q[c+4>>2]==(f|0)){break b}a=a+1|0;if((a|0)!=1){continue}break}return-18}a=q[b+12>>2];q[e>>2]=q[b+8>>2];q[e+4>>2]=a;a=q[b+36>>2];q[e+24>>2]=q[b+32>>2];q[e+28>>2]=a;a=q[b+28>>2];q[e+16>>2]=q[b+24>>2];q[e+20>>2]=a;a=q[b+20>>2];q[e+8>>2]=q[b+16>>2];q[e+12>>2]=a;h=0}return h}function Iga(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;a:{b:{c:{d:{if(a){if((d|0)==2097152|d>>>0>2097152){break d}e:{if(c+1>>>0<2){break e}d=c&65535;if(d>>>0>=t[a+32>>2]){break c}e=q[q[a+24>>2]+(d<<2)>>2];if(!e){break e}f=s[q[a+28>>2]+(d<<1)>>1]==(c>>>16|0)?e:0}eb(q[(b<<2)+246e3>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}a=q[f>>2];if(a>>>0<=2){a=q[(a<<2)+94580>>2]}else{a=0}ga(a|0,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}return}J(88567,88575,3530,94484);G()}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}lj(a,94484,3540);J(88669,88575,3540,94484);G()}lj(a,94484,3542);J(88669,88575,3542,94484);G()}function Nz(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;f=Ii-48|0;Ii=f;a:{b:{c:{if(hj(b)>>>0>=64){q[f+4>>2]=b;q[f>>2]=64;Pi(4,27874,27883,f);break c}if(!x6(a,b,f+24|0)){q[f+16>>2]=b;Pi(4,27874,27940,f+16|0);break c}j=Pk(b);h=q[a+20>>2];Gj(h);i=a+4|0;b=q[i>>2];g=q[a+8>>2];if((b|0)==(g|0)){if(o[a+12|0]&1){break b}Wi((b-q[a>>2]>>4)+2|0,16,a,a+8|0,i);g=q[a+8>>2];b=q[a+4>>2]}if((b|0)==(g|0)){break a}q[a+4>>2]=b+16;o[b+12|0]=e;q[b+8>>2]=d;q[b+4>>2]=c;q[b>>2]=j;c=r[f+21|0]|r[f+22|0]<<8;o[b+13|0]=c;o[b+14|0]=c>>>8;o[b+15|0]=r[f+23|0];ju(q[a>>2],q[a+4>>2],f+40|0);Bj(h)}Ii=f+48|0;return}J(28560,28028,493,28395);G()}J(28004,28028,533,28084);G()}function Jca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=0;b=Ii-208|0;Ii=b;f=nj(b+184|0,a,1,202233,4051);c=Nn(a,1);a:{if(c){e=c+8|0;d=c+4|0;break a}c=Bl(a,1);e=c+8|0;d=c+4|0}g=u[c>>2];h=u[d>>2];u[b+168>>2]=u[e>>2];u[b+164>>2]=h;u[b+160>>2]=g;d=$j(a,2);i=Li;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);q[b+40>>2]=0;q[b+32>>2]=1065353216;q[b+36>>2]=1065353216;e=Wv(c,b+160|0,b+32|0,5,0);b:{if(!e){q[b>>2]=(q[c+40>>2]-q[c+32>>2]|0)/592;a=Kj(f,206298,b);break b}if((MA(c,e,d,i)|0)==-5){q[b+16>>2]=ct(a,2,b+32|0);a=Kj(f,207882,b+16|0);break b}d=yj(a,8);q[d+4>>2]=e;q[d>>2]=c;Zi(a,-1e4,202300);xj(a,-2);a=1}mj(f);Ii=b+208|0;return a|0}function SQ(a,b,c){var d=0,e=0,f=0;e=Ii-1536|0;Ii=e;a:{if(!a){a=0;if(!c){break a}q[c>>2]=10;break a}d=Ui(e,0,1524);q[d+1432>>2]=-1;q[d+136>>2]=0;q[d+108>>2]=0;q[d+112>>2]=0;q[d+40>>2]=0;q[d+44>>2]=a;q[d+32>>2]=0;o[d+60|0]=0;q[d+48>>2]=a;q[d+56>>2]=b;q[d+52>>2]=a+b;b:{if(!VQ(d)){break b}q[d+8>>2]=q[d+8>>2]+1528;a=q[d+92>>2];c:{if(a){b=q[d+100>>2];f=b+1528|0;if((f|0)>q[d+104>>2]){break b}q[d+100>>2]=f;a=a+b|0;break c}a=Yi(1528)}if(!a){break b}b=Ti(a,d,1524);if(gx(b,d+1532|0,d+1524|0,d+1528|0)){fx(b,q[d+1532>>2],q[d+1524>>2],q[d+1528>>2])}if(!c){break a}q[c>>2]=0;break a}if(c){q[c>>2]=q[d+112>>2]}GC(d);a=0}Ii=e+1536|0;return a}function NK(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=b;a=Ha(a|0)|0;a:{b:{c:{if(r[q[75054]+156|0]&64){b=K()|0;if(b){break c}}q[d+24>>2]=c;ua(a|0,1,d+28|0,d+24|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}ya(a|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}va(a|0,35713,d+20|0);if(!q[d+20>>2]){va(a|0,35716,d+16|0);b=q[d+16>>2];if((b|0)>=1){c=b;b=Yi(b);Ya(a|0,c|0,d+16|0,b|0);q[d>>2]=b;Pi(4,88531,92058,d);Ni(b)}wa(a|0);a=0}d:{if(!a){c=0;break d}c=$i(4);q[c>>2]=a}Ii=d+32|0;return c}lj(b,92043,1852);J(88669,88575,1852,92043);G()}lj(b,92043,1855);J(88669,88575,1855,92043);G()}lj(b,92043,1857);J(88669,88575,1857,92043);G()}function Cp(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-384|0;Ii=f;h=nq(b,c,d);a:{if(!h){q[f+4>>2]=aj(c,d);q[f>>2]=e;Qi(a,77189,f);a=0;break a}g=xv(b,q[h+8>>2],f+124|0);if(g){q[f+112>>2]=aj(c,d);q[f+104>>2]=c;q[f+108>>2]=d;q[f+96>>2]=g;sj(f+128|0,256,(g|0)==-3?76793:(g|0)==-15?76835:76900,f+96|0);q[f+80>>2]=f+128;Qi(a,75832,f+80|0)}b=Vl(b,e,f+120|0);if(b){q[f- -64>>2]=aj(c,d);q[f+56>>2]=c;q[f+60>>2]=d;q[f+48>>2]=b;sj(f+128|0,256,(b|0)==-3?76793:(b|0)==-15?76835:76900,f+48|0);q[f+32>>2]=f+128;Qi(a,75832,f+32|0)}if(q[f+124>>2]!=q[f+120>>2]){b=aj(c,d);q[f+20>>2]=e;q[f+16>>2]=b;Qi(a,77224,f+16|0);a=0;break a}a=q[h+8>>2]}Ii=f+384|0;return a}function rI(a,b,c){var d=x(0),e=x(0),f=0,g=x(0);e=u[c+4>>2];d=u[q[a+4>>2]+88>>2];if(!(e>2])<<5}g=u[c>>2];b=s[c+944>>1]&-225|f|(d<=e?(d>g)<<6:0);p[c+944>>1]=b;a:{if(g>x(0)^1){break a}if(f){b=b|128;p[c+944>>1]=b;u[c+8>>2]=u[q[a+4>>2]+80>>2];break a}d=x(u[c+8>>2]-u[a>>2]);u[c+8>>2]=d;if(d<=x(0)^1){break a}b=b|128;p[c+944>>1]=b;u[c+8>>2]=d+u[q[a+4>>2]+84>>2]}if(!(b&256)){q[c+12>>2]=q[a+8>>2];q[c+16>>2]=q[a+12>>2];q[c+20>>2]=q[a+16>>2];q[c+24>>2]=q[a+20>>2];b=b&-257|(o[a+36|0]&1)<<8;p[c+944>>1]=b}if(!(b&512)){u[c+28>>2]=u[a+24>>2];u[c+32>>2]=u[a+28>>2];u[c+36>>2]=u[a+32>>2];p[c+944>>1]=r[a+36|0]<<8&512|b&65023}}function sua(a,b){var c=0,d=0,e=0;a:{d=q[a+4>>2];e=q[a>>2];if((d-e|0)/96>>>0>b>>>0){c=w(b,96)+e|0;b=d-96|0;d=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];u[c- -64>>2]=u[b- -64>>2];u[c+68>>2]=u[b+68>>2];u[c+72>>2]=u[b+72>>2];u[c+76>>2]=u[b+76>>2];o[c+80|0]=r[b+80|0];q[a+4>>2]=b;if(b>>>0>>0){break a}return}J(151452,151192,513,151467);G()}J(151477,151192,516,151467);G()}function nA(a,b,c){var d=x(0);q[a+128>>2]=Oi(q[b>>2]);q[a+132>>2]=Li;a:{if(!(o[a+68|0]&1)){Wi(q[b+72>>2],160,a+56|0,a- -64|0,a+60|0);q[a+272>>2]=c;c=w(c,214013)+2531011|0;d=x(x((c>>>16&32767)>>>0)*x(30518509447574615e-21));u[a+284>>2]=B(x(u[b+8>>2]+x(x(x(d+d)+x(-1))*u[b+116>>2])),x(0));c=w(c,214013)+2531011|0;d=x(x((c>>>16&32767)>>>0)*x(30518509447574615e-21));u[a+288>>2]=u[b+80>>2]+x(x(x(d+d)+x(-1))*u[b+112>>2]);if(!q[b+88>>2]){break a}d=x(x((w(c,214013)+2531011>>>16&32767)>>>0)*x(30518509447574615e-21));u[a+292>>2]=x(x(d+d)+x(-1))*u[q[b+84>>2]+12>>2];return}J(151117,151192,493,151248);G()}J(151361,151373,225,151403);G()}function CD(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=Ii-16|0;Ii=h;q[d>>2]=0;g=q[a>>2];a:{if((g|0)==-1){f=-2;break a}b:{c:{f=Ux(g,b,c);if((f|0)<=-1){while(1){f=q[240513];d:{if((f|0)!=6){if((f|0)==27){break d}g=-2;if((f|0)!=64){break a}break b}g=q[a>>2];q[h+12>>2]=4;q[h+8>>2]=g;if(v[e>>3]==0){break c}while(1){g=h+8|0;i=Qp(e)*1e3;e:{if(y(i)<2147483648){f=~~i;break e}f=-2147483648}g=Vp(g,1,(f|0)>-1?f:-1);if((g|0)!=-1){if(g){break d}break c}if(q[240513]==27){continue}break}g=q[240513];if(g){break b}}f=Ux(q[a>>2],b,c);if((f|0)<=-1){continue}break}}q[d>>2]=f;f=0;break a}f=-1;break a}f=g}Ii=h+16|0;return f|0}function Xqa(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;b=-13;a:{if(!Qj(q[a+12>>2],q[a+16>>2],227576,e+12|0)){c=q[e+12>>2];d=q[c+4>>2];b:{if(!d){break b}b=0;while(1){if(b>>>0>=d>>>0){break a}Ek(q[a+20>>2],q[(q[c>>2]+w(b,160)|0)+4>>2]);b=b+1|0;c=q[e+12>>2];d=q[c+4>>2];if(b>>>0>>0){continue}break}if(!d){break b}c=q[c>>2];b=0;while(1){Ek(q[a+20>>2],q[(c+w(b,160)|0)+4>>2]);b=b+1|0;if((d|0)!=(b|0)){continue}break}c=q[e+12>>2]}d=q[c+20>>2];if(d){c=q[c+16>>2];b=0;while(1){Ek(q[a+20>>2],q[c+(b<<2)>>2]);b=b+1|0;if((d|0)!=(b|0)){continue}break}c=q[e+12>>2]}q[q[a+24>>2]>>2]=c;b=0}Ii=e+16|0;return b|0}J(20656,20668,94,20709);G()}function Nm(a,b){var c=0,d=0;a:{b:{switch(q[b>>2]-6|0){case 0:q[b>>2]=12;return;case 1:a=fl(a,q[b+8>>2]<<23|4,q[q[a+12>>2]+8>>2]);break a;case 2:a=fl(a,q[b+8>>2]<<14|5,q[q[a+12>>2]+8>>2]);break a;case 3:c=q[b+12>>2];if(!(c&256|(c|0)>2]=q[a+36>>2]-1}d=a;c=q[b+8>>2];if(!(c&256|r[a+50|0]>(c|0))){q[a+36>>2]=q[a+36>>2]-1;c=q[b+8>>2]}a=fl(d,c<<23|q[b+12>>2]<<14|6,q[q[a+12>>2]+8>>2]);break a;case 7:q[b>>2]=12;q[b+8>>2]=q[q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)>>2]>>>6&255;return;case 8:a=q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)|0;q[a>>2]=q[a>>2]&8388607|16777216;q[b>>2]=11;break;default:break b}}return}q[b>>2]=11;q[b+8>>2]=a}function Kt(a,b){var c=0,d=0,e=0,f=0,g=0;g=q[b+140>>2];a:{b:{c:{d:{b=((q[b+136>>2]&255)<<4)+a|0;c=b+1084|0;d=q[c>>2];e=q[b+1080>>2];f=d-e|0;if(f){b=g>>>16&32767;if(b>>>0>=f>>1>>>0){break d}f=(b<<1)+e|0;b=d-2|0;d=s[b>>1];p[f>>1]=d;q[c>>2]=b;if(b>>>0>>0){break c}b=q[a+1040>>2];a=q[a+1036>>2];if(d>>>0>=b-a>>2>>>0){break b}c=q[a+(d<<2)>>2];b=c;a=q[b+140>>2];b=q[b+136>>2];e=a;if((d|0)!=(a&32767)){break a}p[c+144>>1]=s[c+144>>1];q[c+136>>2]=b;q[c+140>>2]=e&-2147418113|g&2147418112;return}J(10229,7192,670,10246);G()}J(10266,7192,671,10246);G()}J(10357,9962,516,10347);G()}J(12419,9962,479,9454);G()}J(10304,7192,676,10246);G()}function Wk(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-32|0;Ii=e;q[e+24>>2]=0;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;a:{if((a|0)==(b|0)){d=wk(e+16|0,a);if(d){break a}b=e+16|0}if((a|0)==(c|0)){d=wk(e,a);if(d){break a}c=e}f=q[b+4>>2];while(1){g=f;if(f){f=g-1|0;if(!q[q[b+8>>2]+(f<<2)>>2]){continue}}break}d=q[c+4>>2];while(1){f=d;if(f){d=f-1|0;if(!q[q[c+8>>2]+(d<<2)>>2]){continue}}break}d=rl(a,f+g|0);if(d){break a}d=Bk(a,0);if(d){break a}if(f){while(1){d=(q[a+8>>2]+(f<<2)|0)-4|0;f=f-1|0;dy(g,q[b+8>>2],d,q[q[c+8>>2]+(f<<2)>>2]);if(f){continue}break}}q[a>>2]=w(q[c>>2],q[b>>2]);d=0}ij(e);ij(e+16|0);Ii=e+32|0;return d}function Tia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;b=-2;a:{if(!Qj(q[a+20>>2],q[a+24>>2],261104,c+8|0)){a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}q[a>>2]=q[c+8>>2];Ui(q[a+4>>2],255,q[a+8>>2]<<2);q[a+24>>2]=-1;q[a+28>>2]=0;b=q[a+12>>2];q[a+16>>2]=b;e=a+4|0;f=q[a+20>>2]-b>>4;d=q[a>>2];b=q[d+4>>2];b:{c:{if(f>>>0>>0){a=(b<<1>>>0)/3|0;Pv(e,a>>>0>1?a:1,b);q[c+12>>2]=0;break c}q[c+12>>2]=0;if(!b){break b}}a=0;while(1){if(t[d+4>>2]<=a>>>0){break a}a=q[d>>2]+w(a,192)|0;vr(e,q[a+8>>2],q[a+12>>2],c+12|0);a=q[c+12>>2]+1|0;q[c+12>>2]=a;if(a>>>0>>0){continue}break}}b=0}Ii=c+16|0;return b|0}J(63953,63965,69,64012);G()}function Rm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Ii-16|0;Ii=g;i=Oi(b);j=Li;a:{e=q[a+4>>2];f=q[a>>2];b:{if((e|0)==(f|0)){break b}d=e-f|0;h=(d|0)>-1?d:-1;e=f-e|0;d=w((h|0)<1?h:1,((d|0)<(e|0)?e:d)>>>4|0);e=d>>>0>1?d:1;d=0;while(1){h=f+(d<<4)|0;if((i|0)==q[h>>2]&q[h+4>>2]==(j|0)){d=q[(f+(d<<4)|0)+8>>2];c=q[a+16>>2];if(d>>>0>=q[a+20>>2]-c>>>0){break a}c=c+d|0;break b}d=d+1|0;if((e|0)!=(d|0)){continue}break}}q[g+12>>2]=0;d=q[210909];c:{if(!d){break c}while(1){d:{f=q[d+12>>2];if(f){if(Mi[f|0](a,b,c,g+12|0)|0){break d}}d=q[d+24>>2];if(d){continue}break c}break}c=q[g+12>>2]}Ii=g+16|0;return c}J(155013,154885,479,155024);G()}function sr(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;i=Ii-16|0;Ii=i;u[i+12>>2]=g;a:{if(q[a+196>>2]){while(1){b:{c:{d:{e:{f:{g:{h=w(j,24)+a|0;switch(q[h+8>>2]-2|0){case 2:break d;case 3:break e;case 1:break f;case 0:break g;default:break c}}h:{switch(q[h+12>>2]-1|0){case 0:Ti(b,c,q[h+20>>2]);break b;case 1:Ti(b,d,q[h+20>>2]);break b;default:break h}}J(151904,150916,1068,151906);G()}Ti(b,f,q[h+20>>2]);break b}Ti(b,e,q[h+20>>2]);break b}Ti(b,i+12|0,q[h+20>>2]);break b}k=q[h+16>>2];if(!k){break a}Ti(b,k,q[h+20>>2])}b=q[h+20>>2]+b|0;j=j+1|0;if(j>>>0>2]){continue}break}}Ii=i+16|0;return b}J(151926,150916,1084,151906);G()}function h4(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0),o=x(0),p=x(0),r=x(0),s=x(0);b=Ii-144|0;Ii=b;c=qj(a,1);d=u[c>>2];e=u[c+16>>2];f=u[c+32>>2];g=u[c+48>>2];h=u[c+4>>2];i=u[c+20>>2];j=u[c+36>>2];k=u[c+52>>2];l=u[c+8>>2];m=u[c+24>>2];n=u[c+40>>2];o=u[c+56>>2];p=u[c+12>>2];r=u[c+28>>2];s=u[c+44>>2];v[b+128>>3]=u[c+60>>2];v[b+120>>3]=s;v[b+112>>3]=r;v[b+104>>3]=p;v[b+96>>3]=o;v[b+88>>3]=n;v[b+80>>3]=m;v[b+72>>3]=l;v[b- -64>>3]=k;v[b+56>>3]=j;v[b+48>>3]=i;v[b+40>>3]=h;v[b+32>>3]=g;v[b+24>>3]=f;v[b+16>>3]=e;q[b>>2]=134048;v[b+8>>3]=d;Lj(a,134975,b);Ii=b+144|0;return 1}function Pba(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=Ii-32|0;Ii=c;d=1;e=q[a+8>>2]-q[a+12>>2]>>4;g=$j(a,1);h=Li;i=jj(a,2);j=jj(a,3);b=kj(a,4,0);Dj(a,5,4);k=uj(a,5,c+28|0);gj(a);l=_i(a,-1,q[213927],204267);Ri(a,-2);if((e|0)>=6){Dj(a,6,1);d=!Uj(a,6)}a:{if(!dj(b,206505)){break a}if(!dj(b,206509)){f=1;break a}if(!dj(b,206514)){f=2;break a}q[c+16>>2]=b;Qi(a,206516,c+16|0)}b=pba(l,g,h,i,j,f,d,k,q[c+28>>2]);if(b){q[c>>2]=b;Pi(3,202556,206609,c);b=0}else{b=1}d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;if((e+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,1905,206641);G()}Ii=c+32|0;return 1}function KY(a){a=a|0;var b=0;Ns(a,145545);ej(a,-1);Si(a,-2,145551);Ak(a,0,257520);vj(a,0,1);qk(a,1132,0);Si(a,-2,145646);Zq(a,-10001);Ak(a,145516,257424);vj(a,0,1);qk(a,1133,0);Si(a,-2,145646);b=yj(a,4);q[b>>2]=0;Zi(a,-1e4,145545);xj(a,-2);q[b>>2]=q[53734];ej(a,-1);nk(a,-10001,1);ej(a,-2);gp(a,-2);Si(a,-3,145519);b=yj(a,4);q[b>>2]=0;Zi(a,-1e4,145545);xj(a,-2);q[b>>2]=q[53735];ej(a,-1);nk(a,-10001,2);ej(a,-2);gp(a,-2);Si(a,-3,145525);b=yj(a,4);q[b>>2]=0;Zi(a,-1e4,145545);xj(a,-2);q[b>>2]=q[53736];ej(a,-2);gp(a,-2);Si(a,-3,145532);Ri(a,-2);Zi(a,-1,145539);vj(a,0,1);qk(a,1134,0);Si(a,-2,145646);gp(a,-2);Ri(a,-2);return 1}function Eia(a){a=a|0;var b=0,c=0,d=0;b=$i(72);q[b+32>>2]=0;q[b+36>>2]=0;q[b+64>>2]=0;q[b+68>>2]=0;q[b+48>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+36>>2]=-1;d=RL(q[a>>2],q[a+20>>2],b);if(!d){c=q[a+24>>2];q[c+8>>2]=b;q[c+16>>2]=(((q[a+16>>2]+q[b+8>>2]|0)-q[b>>2]|0)+w(q[b+32>>2]-q[b+24>>2]>>4,12)|0)+72;return d|0}c=q[b+48>>2];if(c){cj(q[a>>2],c)}a=q[b+64>>2];if(a){Aj(a)}a:{if(o[b+44|0]&1){break a}a=q[b+24>>2];if(a){Ni(a)}a=q[b+16>>2];if(!a){break a}Ni(a)}b:{if(o[b+12|0]&1){break b}a=q[b>>2];if(!a){break b}Ni(a)}Ni(b);return d|0}function sO(a,b){var c=0,d=0;d=Ii-32|0;Ii=d;a:{b:{c:{if(!gk(214952,o[b|0])){q[240513]=28;break c}c=Yi(1176);if(c){break b}}c=0;break a}Ui(c,0,144);if(!gk(b,43)){q[c>>2]=r[b|0]==114?8:4}d:{if(r[b|0]!=97){b=q[c>>2];break d}b=R(a|0,3,0)|0;if(!(b&1024)){q[d+16>>2]=b|1024;R(a|0,4,d+16|0)|0}b=q[c>>2]|128;q[c>>2]=b}o[c+75|0]=255;q[c+48>>2]=1024;q[c+60>>2]=a;q[c+44>>2]=c+152;e:{if(b&8){break e}q[d>>2]=d+24;if(vi(a|0,21523,d|0)|0){break e}o[c+75|0]=10}q[c+40>>2]=1613;q[c+36>>2]=1615;q[c+32>>2]=1612;q[c+12>>2]=1611;if(!q[240545]){q[c+76>>2]=-1}q[c+56>>2]=q[240502];a=q[240502];if(a){q[a+52>>2]=c}q[240502]=c}Ii=d+32|0;return c}function pB(a,b,c){var d=0,e=0,f=0,g=0;a:{d=q[a+76>>2];b:{if(!d){break b}f=a+72|0;d=q[q[f>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break b}e=q[a+80>>2];while(1){g=e+w(d,24)|0;if(q[g>>2]==(b|0)&(c|0)==q[g+4>>2]){break a}d=q[g+20>>2];if((d|0)!=-1){continue}break}}J(44689,44699,158,45237);G()}d=e+w(d,24)|0;e=q[d+12>>2]-1|0;q[d+12>>2]=e;c:{d:{if(!e){xaa(f,b,c);f=q[d+8>>2];b=a+108|0;d=q[b>>2];c=a+112|0;e=q[c>>2];if((d|0)==(e|0)){if(o[a+116|0]&1){break d}a=a+104|0;Wi((d-q[a>>2]>>2)+4|0,4,a,c,b);e=q[c>>2];d=q[b>>2]}if((d|0)==(e|0)){break c}q[b>>2]=d+4;q[d>>2]=f}return}J(46186,45367,493,45053);G()}J(45343,45367,533,45423);G()}function kha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=Ii+ -64|0;Ii=c;f=nj(c+40|0,a,1,65882,848);a:{if((Vi(a,1)|0)==7){b=_i(a,1,q[74078],0);if(b){if(Vo(q[b>>2])){break a}}Qi(a,66244,0)}Nk(a,1,65680);b=0}d=jj(a,2);e=q[b+28>>2];b:{c:{if((d|0)>=1){g=q[b+36>>2];if((d|0)<=(w(e,g)|0)){break c}}if(e){a=q[b+36>>2];q[c+20>>2]=65680;q[c+16>>2]=65665;q[c+24>>2]=w(a,e);a=Kj(f,66273,c+16|0);break b}q[c+4>>2]=65680;q[c>>2]=65665;a=Kj(f,66320,c);break b}d=d-1|0;e=(d>>>0)/(g>>>0)|0;h=+Mi[q[b+24>>2]](q[b+16>>2],w(e,q[b+32>>2])+(d-w(e,g)|0)|0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=h;q[a+8>>2]=q[a+8>>2]+16;a=1}mj(f);Ii=c- -64|0;return a|0}function a8(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=qj(a,1);q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;o[b+15|0]=0;d=q[c+304>>2];c=q[d+2396>>2];q[b>>2]=q[d+2392>>2];q[b+4>>2]=c;km(a,b);Ii=b+32|0;return 1}function Upa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;a:{b:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>=2){if((Vi(a,2)|0)==6){break b}}c=Qi(a,69019,0);break a}q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;mo(a,68198,b+44|0,b+40|0,b+8|0);c:{d:{if(o[q[b+40>>2]+24|0]&1){Pi(4,69070,69078,0);break d}ej(a,2);c=zk(a,-1e4);gj(a);e=zk(a,-1e4);km(a,b+8|0);f=zk(a,-1e4);if(Apa(q[b+44>>2],q[b+40>>2],c,e,f)){break c}Rj(a,-1e4,c);Rj(a,-1e4,e);Rj(a,-1e4,f)}c=Qi(a,69143,0);break a}c=0;if(q[a+8>>2]-q[a+12>>2]>>4==(d|0)){break a}J(69186,68606,212,69207);G()}Ii=b+48|0;return c|0}function xM(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-16|0;Ii=g;d=q[a+12>>2];f=0;a:{if(!d){break a}f=q[d+120>>2]}j=q[f+8>>2]-q[f+12>>2]>>4;q[g+8>>2]=q[a+4>>2];b:{h=q[a+8>>2];a=q[h+4>>2];e=q[h>>2];d=a-e|0;if(!d){break b}if((a|0)!=(e|0)){a=e-a|0;k=((a|0)>(d|0)?a:d)>>>2|0;a=(d|0)>-1?d:-1;a=w(k,(a|0)<1?a:1);d=a>>>0>1?a:1;a=0;while(1){e=q[(a<<2)+e>>2];if(o[e+32|0]&1){i=(sw(f,q[e>>2],b,e,g+8|0)|0)==-1?-1e3:i}a=a+1|0;if((d|0)==(a|0)){break b}e=q[h>>2];if(q[h+4>>2]-e>>2>>>0>a>>>0){continue}break}}J(13690,13629,479,13515);G()}o[c|0]=1;if(q[f+8>>2]-q[f+12>>2]>>4!=(j|0)){J(12728,12749,246,13382);G()}Ii=g+16|0;return i}function lC(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-208|0;Ii=f;q[f+204>>2]=c;Ui(f+160|0,0,40);q[f+200>>2]=q[f+204>>2];a:{if((Zx(0,b,f+200|0,f+80|0,f+160|0,d,e)|0)<0){b=-1;break a}g=q[a+76>>2]>=0;c=q[a>>2];if(o[a+74|0]<=0){q[a>>2]=c&-33}h=c&32;b:{if(q[a+48>>2]){b=Zx(a,b,f+200|0,f+80|0,f+160|0,d,e);break b}q[a+48>>2]=80;q[a+16>>2]=f+80;q[a+28>>2]=f;q[a+20>>2]=f;c=q[a+44>>2];q[a+44>>2]=f;d=Zx(a,b,f+200|0,f+80|0,f+160|0,d,e);b=d;if(!c){break b}Mi[q[a+36>>2]](a,0,0)|0;q[a+48>>2]=0;q[a+44>>2]=c;q[a+28>>2]=0;q[a+16>>2]=0;b=q[a+20>>2];q[a+20>>2]=0;b=b?d:-1}c=a;a=q[a>>2];q[c>>2]=a|h;b=a&32?-1:b;if(!g){break a}}Ii=f+208|0;return b}function dma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-48|0;Ii=b;a:{b:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>=2){if((Vi(a,2)|0)==6){break b}}c=Qi(a,70630,0);break a}g=XG(a);q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;mo(a,70062,0,b+44|0,b+8|0);c:{d:{if(q[q[b+44>>2]+24>>2]&1){Pi(4,70469,70681,0);break d}ej(a,2);c=zk(a,-1e4);gj(a);e=zk(a,-1e4);km(a,b+8|0);f=zk(a,-1e4);if(Poa(g,q[b+44>>2],c,e,f)){break c}Rj(a,-1e4,c);Rj(a,-1e4,e);Rj(a,-1e4,f)}c=Qi(a,70745,0);break a}c=0;if(q[a+8>>2]-q[a+12>>2]>>4==(d|0)){break a}J(70777,70569,192,70798);G()}Ii=b+48|0;return c|0}function b8(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=qj(a,1);q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;o[b+15|0]=0;d=q[c+16>>2];c=q[d+2396>>2];q[b>>2]=q[d+2392>>2];q[b+4>>2]=c;km(a,b);Ii=b+32|0;return 1}function F7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-32|0;Ii=c;f=q[a+8>>2]-q[a+12>>2]>>4;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);a:{if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){b:{if(!Oj(a,1)){q[c>>2]=115561;b=Qi(a,117054,c);break b}d=rr(a,q[q[d+304>>2]+2384>>2]);g=Li;b=jj(a,2);e=b-1|0;if(!(1<>>0<=31:0)){q[c+16>>2]=b;b=Qi(a,119660,c+16|0)}Mi[q[75005]](d,g,b,c+28|0,c+24|0);b=q[c+24>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16;b=1;if((f+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}}Ii=c+32|0;return b|0}J(115568,115465,478,119531);G()}J(115440,115465,1639,117131);G()}function E7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-32|0;Ii=c;f=q[a+8>>2]-q[a+12>>2]>>4;b=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);a:{if((b|0)==q[a+8>>2]-q[a+12>>2]>>4){b:{if(!Oj(a,1)){q[c>>2]=115561;b=Qi(a,116944,c);break b}d=rr(a,q[q[d+304>>2]+2384>>2]);g=Li;b=jj(a,2);e=b-1|0;if(!(1<>>0<=31:0)){q[c+16>>2]=b;b=Qi(a,119660,c+16|0)}Mi[q[75005]](d,g,b,c+28|0,c+24|0);b=q[c+28>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16;b=1;if((f+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}}Ii=c+32|0;return b|0}J(115568,115465,478,119531);G()}J(115440,115465,1597,117020);G()}function Y9(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;o[f+15|0]=b;a:{b:{e=q[c+76>>2];c:{if(!e){vJ(c+40|0,a,f+15|0);break c}if(!b){break c}d:{d=q[e+16>>2];c=q[e+12>>2];if((d|0)==(c|0)){break d}b=d-c|0;g=(b|0)>-1?b:-1;d=c-d|0;d=w((g|0)<1?g:1,((b|0)<(d|0)?d:b)>>>2|0);g=d>>>0>1?d:1;b=0;while(1){if((b|0)==(d|0)){break b}h=q[c+(b<<2)>>2];if(r[h+344|0]!=(a|0)){b=b+1|0;if((g|0)==(b|0)){break d}continue}break}oA(e,h,a);break c}b=lm(e,a);if(!b){break c}a=q[e+16>>2];if((a|0)==q[e+20>>2]){break a}q[e+16>>2]=a+4;q[a>>2]=b}Ii=f+16|0;return 1}J(150310,149779,479,149768);G()}J(150049,149779,533,150073);G()}function Vr(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=q[a+16>>2];d=Ky(g,q[a+4>>2],b);if(q[d+8>>2]==3){h=v[d>>3];if(y(h)<2147483648){return~~h}return-2147483648}e=q[a>>2];b=q[e+40>>2];f=q[a+40>>2];q[d+8>>2]=3;v[d>>3]=f|0;f=e+40|0;d=q[f>>2];if((d|0)<=q[a+40>>2]){q[e+8>>2]=_q(g,q[e+8>>2],f,16,262143,141876);d=q[e+40>>2]}f=q[e+8>>2];if((b|0)<(d|0)){while(1){q[(f+(b<<4)|0)+8>>2]=0;b=b+1|0;if((d|0)>(b|0)){continue}break}}d=q[c+4>>2];b=f+(q[a+40>>2]<<4)|0;q[b>>2]=q[c>>2];q[b+4>>2]=d;q[b+8>>2]=q[c+8>>2];a:{if(q[c+8>>2]<4){break a}b=q[c>>2];if(!(r[b+5|0]&3)|!(r[e+5|0]&4)){break a}go(g,e,b)}b=a;a=q[a+40>>2];q[b+40>>2]=a+1;return a}function wz(a,b,c,d){var e=0,f=0;e=Ii-32|0;Ii=e;qk(a,826,0);f=(b^-1)+(q[a+8>>2]-q[a+12>>2]>>4)|0;xk(a,f);b=dq(a,b,c,f);ll(a,f);a:{b:{switch(b|0){case 4:Ri(a,-2);Pi(4,122749,124200,0);break a;case 0:break a;default:break b}}Zi(a,-1,124229);Zi(a,-2,124235);c=uj(a,-2,0);f=uj(a,-1,0);if(d){q[e+20>>2]=f;q[e+16>>2]=c;Pi(4,122749,124245,e+16|0);Ri(a,-4);break a}q[e+4>>2]=f;q[e>>2]=c;Pi(4,122749,124268,e);Zi(a,-10002,124274);c:{if((Vi(a,-1)|0)!=5){break c}Xi(a,124280);jl(a,-2);if((Vi(a,-1)|0)==6){bj(a,124296,3);ej(a,-5);ej(a,-5);wz(a,3,0,1);break c}if(Vi(a,-1)){Pi(4,122749,124300,0)}Ri(a,-2)}Ri(a,-5)}Ii=e+32|0;return b}function al(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;c=0;c:{d:{switch(q[b+8>>2]-3|0){case 1:return q[q[b>>2]+12>>2];case 4:return q[q[b>>2]+16>>2];case 2:return nF(q[b>>2]);case 0:break d;default:break c}}if(!eF(a,b)){break c}c=q[q[b>>2]+12>>2]}return c}function Lha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-4096|0;Ii=b;d=nj(b+4072|0,a,0,71372,279);g=jk(a);q[b+4068>>2]=0;c=kj(a,2,b+4068|0);a:{if(!c){a=Kj(d,71453,0);break a}e=q[b+4068>>2];f=e+5|0;if(f>>>0>=4001){a=Kj(d,71488,0);break a}q[b+64>>2]=4;Ti(b- -64|4,c,e+1|0);q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;qm(a,b);Gk(a,1,b+32|0,b);c=q[59738];a=0;if(!vk(b,b+32|0,q[c+8>>2],q[c+12>>2],g,c,b- -64|0,f)){break a}a=Kj(d,71518,0)}mj(d);Ii=b+4096|0;return a|0}function E0(a,b){var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;d=-19584;a:{if((Jj(b,0)|0)<0){break a}e=b+12|0;if((Jj(e,0)|0)<0){break a}f=a+4|0;if((_j(b,f)|0)>-1){break a}if((_j(e,f)|0)>-1){break a}q[c+24>>2]=0;q[c+16>>2]=1;q[c+20>>2]=0;q[c+8>>2]=0;q[c>>2]=1;q[c+4>>2]=0;d=ck(a,c+16|0,e,e);b:{if(d){break b}d=ck(a,c,b,b);if(d){break b}c:{if(!q[a+24>>2]){d=Pl(c,c,3);if(d){break b}while(1){if(q[c>>2]>-1){break c}if(!Jj(c,0)){break c}d=Rl(c,c,f);if(!d){continue}break}break b}d=bq(a,c,c,a+16|0);if(d){break b}}d=ck(a,c,c,b);if(d){break b}d=bq(a,c,c,a+28|0);if(d){break b}d=_j(c+16|0,c)?-19584:0}ij(c+16|0);ij(c)}Ii=c+32|0;return d}function NA(a,b,c,d){var e=0,f=0,g=0;a:{b:{e=b&65535;f=q[a+32>>2];if(e>>>0<(q[a+36>>2]-f|0)/592>>>0){if(s[(w(e,592)+f|0)+568>>1]!=(b>>>16|0)){break b}if(s[(w(e,592)+f|0)+570>>1]!=(b&65535)){break a}b=0;if(c|d){b=q[a+196>>2];if(!b){return-5}b=q[q[a+192>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){return-5}a=q[a+200>>2];c:{while(1){g=a+(b<<4)|0;if(q[g>>2]==(c|0)&(d|0)==q[g+4>>2]){break c}b=q[g+12>>2];if((b|0)!=-1){continue}break}return-5}b=q[(a+(b<<4)|0)+8>>2]}a=w(e,592)+f|0;q[a+528>>2]=b;q[a+520>>2]=c;q[a+524>>2]=d;return 0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function qoa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=x(0),i=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;e=q[a+8>>2];oz(q[e+316>>2],u[q[a+4>>2]+4>>2]);h=u[q[a+4>>2]+4>>2];u[e+312>>2]=h;iA(q[e+80>>2],h);f=q[e+36>>2];i=q[e+32>>2];d=f-i|0;c=d>>2;q[213494]=c+q[213494];q[b+16>>2]=c;q[b+20>>2]=0;q[b+8>>2]=c;q[b+12>>2]=0;a:{if(d){c=i-f|0;f=((c|0)>(d|0)?c:d)>>>2|0;c=(d|0)>-1?d:-1;c=w(f,(c|0)<1?c:1);c=c>>>0>1?c:1;while(1){d=q[e+32>>2];if(q[e+36>>2]-d>>2>>>0<=g>>>0){break a}d=q[d+(g<<2)>>2];if((r[d+22|0]&3)==3){Yaa(q[d+8>>2],u[q[a+4>>2]+4>>2])}g=g+1|0;if((c|0)!=(g|0)){continue}break}}Ii=b+32|0;return 0}J(40995,40745,479,41006);G()}function Vxa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=q[a>>2]+1794895138|0;e=Rp(q[a+8>>2],f);g=Rp(q[a+12>>2],f);d=Rp(q[a+16>>2],f);a:{if(b>>>2>>>0<=e>>>0){break a}h=b-(e<<2)|0;if((d|g)&3|(h>>>0<=g>>>0|d>>>0>=h>>>0)){break a}l=d>>>2|0;m=g>>>2|0;g=0;while(1){h=e>>>1|0;i=h+g|0;j=i<<1;d=(j+m<<2)+a|0;k=Rp(q[d>>2],f);d=Rp(q[d+4>>2],f);if(d>>>0>=b>>>0|b-d>>>0<=k>>>0|r[(d+k|0)+a|0]){break a}d=dj(c,a+d|0);if(!d){c=(l+j<<2)+a|0;e=Rp(q[c>>2],f);c=Rp(q[c+4>>2],f);if(c>>>0>=b>>>0|e>>>0>=b-c>>>0){break a}n=r[(c+e|0)+a|0]?0:a+c|0;break a}if((e|0)==1){break a}d=(d|0)<0;e=d?h:e-h|0;g=d?g:i;continue}}return n}function uI(a,b,c,d){var e=0,f=0,g=0,h=0;f=Ii-32|0;Ii=f;e=f+8|0;q[e>>2]=0;q[e+4>>2]=0;q[e+16>>2]=0;q[e+8>>2]=0;q[e+12>>2]=0;h=e;e=q[a+32>>2];if(!wG(b,h,e,1,1)){g=$i(67752);e=Ui(g,0,67752);b=Pk(b);q[e+2128>>2]=0;q[e>>2]=b;q[e+2132>>2]=q[a>>2];q[e+2136>>2]=q[a+4>>2];q[e+2140>>2]=q[a+8>>2];q[e+2144>>2]=q[a+12>>2];q[e+2148>>2]=q[a+16>>2];q[e+2152>>2]=q[a+20>>2];q[e+2156>>2]=q[a+28>>2];b=q[a+32>>2];q[e+2168>>2]=0;q[e+2172>>2]=0;q[e+2160>>2]=b;b=e+2176|0;q[b>>2]=0;q[b+4>>2]=0;b=e+2184|0;q[b>>2]=0;q[b+4>>2]=0;a=q[a+24>>2];q[e+2204>>2]=0;p[e+2198>>1]=c;o[e+2196|0]=d;q[e+2192>>2]=a;o[e+2200|0]=!a}Ii=f+32|0;return g}function u6(a,b,c,d,e,f){var g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=Ii-2192|0;Ii=j;l=q[a+20>>2];Gj(l);a:{g=q[a+4>>2];i=q[a>>2];h=g-i|0;if(!h){g=-3;break a}if((g|0)!=(i|0)){g=i-g|0;k=((g|0)>(h|0)?g:h)>>>4|0;g=(h|0)>-1?h:-1;g=w(k,(g|0)<1?g:1);k=g>>>0>1?g:1;h=0;g=-21;while(1){b:{m=(h<<4)+i|0;i=q[m+4>>2];i=Mi[q[q[i>>2]+32>>2]](q[i+4>>2],b,c,d,e,f)|0;c:{if((i|0)!=-2){h=-9;d:{switch(i+3|0){case 0:break c;case 3:break d;default:break a}}dH(q[m+4>>2],j);g=0;break a}h=h+1|0;if((k|0)!=(h|0)){break b}h=-3}g=h;break a}i=q[a>>2];if(q[a+4>>2]-i>>4>>>0>h>>>0){continue}break}}J(28298,28028,479,28309);G()}Bj(l);Ii=j+2192|0;return g}function rla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-112|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;e=jk(a);c=$j(a,2);f=Li;g=c;c=rm(a,3);q[b+64>>2]=g;q[b+68>>2]=f;u[b+80>>2]=u[c>>2];u[b+84>>2]=u[c+4>>2];u[b+88>>2]=u[c+8>>2];u[b+92>>2]=u[c+12>>2];q[b+96>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[59006];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],e,c,b- -64|0,48);if(d>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(71895,71916,486,72237);G()}Ii=b+112|0;return 0}function pha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-112|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;e=jk(a);c=$j(a,2);f=Li;g=c;c=rm(a,3);q[b+64>>2]=g;q[b+68>>2]=f;u[b+80>>2]=u[c>>2];u[b+84>>2]=u[c+4>>2];u[b+88>>2]=u[c+8>>2];u[b+92>>2]=u[c+12>>2];q[b+96>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[59006];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],e,c,b- -64|0,48);if(d>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(80636,80657,341,80738);G()}Ii=b+112|0;return 0}function dr(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=b-1|0;a:{if((b|0)>=2){b=a;b:{while(1){c:{if(!e){break c}d=q[c+4>>2];g=Oq(d,10,q[c+8>>2]-d|0);d:{if(g){d=q[c+4>>2];f=(g-d|0)+1|0;break d}d=q[c+4>>2];f=q[c+8>>2]-d|0}h=d;d=e>>>0>f>>>0?f:e;Ti(b,h,d);f=d+q[c+4>>2]|0;q[c+4>>2]=f;b=b+d|0;if(g){break c}e=e-d|0;if(!e){break c}e:{if(f>>>0>2]){q[c+4>>2]=f+1;d=r[f|0];break e}d=ax(c);if((d|0)>-1){break e}d=0;if(!(r[c|0]&16)|(a|0)==(b|0)){break b}break c}o[b|0]=d;b=b+1|0;e=e-1|0;if((d&255)!=10){continue}}break}d=0;if(!a){break b}o[b|0]=0;d=a}break a}b=r[c+74|0];o[c+74|0]=b-1|b;if(e){break a}o[a|0]=0;return a}return d}function MA(a,b,c,d){var e=0,f=0,g=0,h=0;a:{b:{e=b&65535;f=q[a+32>>2];if(e>>>0<(q[a+36>>2]-f|0)/592>>>0){if(s[(w(e,592)+f|0)+568>>1]!=(b>>>16|0)){break b}g=w(e,592)+f|0;if(s[g+570>>1]!=(b&65535)){break a}h=-10;c:{if((q[g+412>>2]&240)!=80){break c}h=-5;b=q[a+232>>2];if(!b){break c}b=q[q[a+228>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break c}g=q[a+236>>2];while(1){a=g+(b<<4)|0;if((c|0)!=q[a>>2]|q[a+4>>2]!=(d|0)){b=q[a+12>>2];if((b|0)!=-1){continue}break c}break}a=w(e,592)+f|0;q[a+536>>2]=c;q[a+540>>2]=d;h=0}return h}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function JU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-8400|0;Ii=b;c=ln(a,137996);f=fo(a,2,8192);q[b+68>>2]=128;e=c+8|0;Yn(e);a:{b:{c:{g=b+208|0;if(f<4294967296&f>=0){d=~~f>>>0}else{d=0}c=jS(c,g,d>>>0<8192?d:8192,b+204|0,b+72|0,b+68|0,e);switch(c+2|0){case 0:case 2:break b;default:break c}}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,mm(c));c=2;break a}c=3;d=ia(b+72|0,q[b+68>>2],b+16|0,46,b+10|0,6,3)|0;if(d){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,na(d|0)|0);c=2;break a}bj(a,b+208|0,q[b+204>>2]);Xi(a,b+16|0);d=Kq(b+10|0,0);e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16}Ii=b+8400|0;return c|0}function uV(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-32|0;Ii=d;e=-10240;a:{if(!a|!b){break a}b:{if(!(r[(b+c|0)-1|0]|!c)){if(an(b,174128)){break b}}e=iy(a,b,c);break a}if(c>>>0>1){e=0;while(1){c:{q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;d:{e:{f:{f=GW(d+16|0,b,d+12|0);if(f){if((f|0)!=-5248){break f}e=f;break a}h=q[d+12>>2];f=iy(a,q[d+16>>2],q[d+20>>2]);oE(d+16|0);if(!f){i=1;break d}if((f|0)!=-10368){break e}e=f;break a}if((f|0)==-4224){break c}e=e+1|0;g=g?g:f;oE(d+16|0);h=q[d+12>>2];break d}e=e+1|0;g=g?g:f}b=b+h|0;c=c-h|0;if(c>>>0>1){continue}}break}if(i){break a}e=g;if(g){break a}}e=-10112}Ii=d+32|0;return e}function pla(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;a=Ii+ -64|0;Ii=a;f=q[q[f>>2]+2384>>2];o[a+62|0]=1;p[a+56>>1]=1;q[a+48>>2]=0;q[a+52>>2]=0;o[a+43|0]=0;o[a+44|0]=0;o[a+45|0]=0;o[a+46|0]=0;q[a+36>>2]=0;q[a+40>>2]=0;p[a+60>>1]=c;p[a+58>>1]=b;p[a+54>>1]=c;p[a+52>>1]=b;q[a+20>>2]=1;q[a+24>>2]=1;q[a+28>>2]=0;q[a+32>>2]=0;q[a+12>>2]=2;q[a+16>>2]=2;q[a>>2]=e;p[a+42>>1]=c;p[a+40>>1]=b;e=a;if(d>>>0<=2){g=q[(d<<2)+171240>>2]}else{g=0}q[e+4>>2]=w(g,w(b,c));if(d>>>0>=3){J(43083,41161,2009,43089);G()}q[a+8>>2]=q[(d<<2)+44188>>2];b=Mi[q[75008]](f,a+48|0)|0;Mi[q[75010]](b,Li,a);Ii=a- -64|0;return b|0}function lV(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;e=c?c:962048;c=q[e>>2];a:{b:{c:{if(!b){if(c){break c}break a}d=-2;h=a?a:g+12|0;d:{if(c){a=1;break d}a=r[b|0];c=a<<24>>24;if((c|0)>=0){q[h>>2]=a;d=(c|0)!=0;break a}a=o[b|0];if(!q[q[71281]>>2]){q[h>>2]=a&57343;d=1;break a}a=(a&255)-194|0;if(a>>>0>50){break c}c=q[(a<<2)+218256>>2];break b}f=r[b|0];i=f>>>3|0;if((i-16|(c>>26)+i)>>>0>7){break c}while(1){a=a-1|0;c=f-128|c<<6;if((c|0)>=0){q[e>>2]=0;q[h>>2]=c;d=1-a|0;break a}if(!a){break b}b=b+1|0;f=r[b|0];if((f&192)==128){continue}break}}q[e>>2]=0;q[240513]=25;d=-1;break a}q[e>>2]=c}Ii=g+16|0;return d}function cB(a,b,c,d,e){var f=0,g=0;g=r[e+40|0]?-9:0;a:{b:{if(q[e>>2]==(a|0)&q[e+4>>2]==(b|0)){f=-4;if(q[c>>2]!=4){break a}e=q[c+8>>2];b=q[c+12>>2];a=q[c+20>>2];q[d+8>>2]=q[c+16>>2];q[d+12>>2]=a;q[d>>2]=e;q[d+4>>2]=b;break b}if(q[e+8>>2]==(a|0)&q[e+12>>2]==(b|0)){f=-4;if(q[c>>2]){break a}u[d>>2]=v[c+8>>3];break b}if(q[e+16>>2]==(a|0)&q[e+20>>2]==(b|0)){f=-4;if(q[c>>2]){break a}u[d+4>>2]=v[c+8>>3];break b}if(q[e+24>>2]==(a|0)&q[e+28>>2]==(b|0)){f=-4;if(q[c>>2]){break a}u[d+8>>2]=v[c+8>>3];break b}f=-1;if((a|0)!=q[e+32>>2]|(b|0)!=q[e+36>>2]){break a}f=-4;if(q[c>>2]){break a}u[d+12>>2]=v[c+8>>3]}f=g}return f}function Ft(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;a=q[a>>2];q[c+24>>2]=0;d=1;a:{if(!(o[a+3272|0]&1)){Uo(a);f=s[a+1058>>1];if(f){while(1){e=q[a+1036>>2];if(q[a+1040>>2]-e>>2>>>0<=b>>>0){break a}d=AB(a,q[e+(b<<2)>>2])&d;b=b+1|0;if((f|0)!=(b|0)){continue}break}b=0;while(1){e=q[a+1036>>2];if(q[a+1040>>2]-e>>2>>>0<=b>>>0){break a}d=EB(a,q[e+(b<<2)>>2])&d;b=b+1|0;if((f|0)!=(b|0)){continue}break}}b=q[a+3220>>2];q[c>>2]=q[a+3216>>2];q[c+4>>2]=b;b=q[a+3228>>2];q[c+8>>2]=q[a+3224>>2];q[c+12>>2]=b;b=Mr(a,c,2);o[a+3272|0]=r[a+3272|0]|16;Ii=c+32|0;return b&d}J(11782,7192,1753,11872);G()}J(12419,9962,479,9454);G()}function _3(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=x(0),g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);b=Ym(a,1);c=u[b+48>>2];d=u[b+52>>2];e=u[b+56>>2];f=u[b>>2];g=u[b+16>>2];h=u[b+32>>2];i=u[b+4>>2];j=u[b+20>>2];k=u[b+36>>2];l=u[b+8>>2];m=u[b+24>>2];n=u[b+40>>2];b=yj(a,64);q[b+60>>2]=1065353216;q[b+44>>2]=0;u[b+40>>2]=n;u[b+36>>2]=m;u[b+32>>2]=l;q[b+28>>2]=0;u[b+24>>2]=k;u[b+20>>2]=j;u[b+16>>2]=i;q[b+12>>2]=0;u[b+8>>2]=h;u[b+4>>2]=g;u[b>>2]=f;u[b+56>>2]=-x(x(h*c)+x(x(k*d)+x(n*e)));u[b+52>>2]=-x(x(g*c)+x(x(j*d)+x(m*e)));u[b+48>>2]=-x(x(f*c)+x(x(i*d)+x(l*e)));Zi(a,-1e4,134048);xj(a,-2);return 1}function hS(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;j=Ii-16|0;Ii=j;q[d>>2]=0;i=q[a>>2];a:{if((i|0)==-1){h=-2;break a}b:{c:{h=Tx(i,b,c,e,f);if((h|0)<=-1){while(1){h=q[240513];d:{if((h|0)!=6){if((h|0)==27){break d}i=-2;if((h|0)!=64){break a}break b}i=q[a>>2];q[j+12>>2]=4;q[j+8>>2]=i;if(v[g>>3]==0){break c}while(1){i=j+8|0;k=Qp(g)*1e3;e:{if(y(k)<2147483648){h=~~k;break e}h=-2147483648}i=Vp(i,1,(h|0)>-1?h:-1);if((i|0)!=-1){if(i){break d}break c}if(q[240513]==27){continue}break}i=q[240513];if(i){break b}}h=Tx(q[a>>2],b,c,e,f);if((h|0)<=-1){continue}break}}q[d>>2]=h;h=0;break a}h=-1;break a}h=i}Ii=j+16|0;return h}function fH(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;i=Ii-2192|0;Ii=i;k=q[a+20>>2];Gj(k);a:{f=q[a+4>>2];h=q[a>>2];g=f-h|0;if(!g){f=-3;break a}if((f|0)!=(h|0)){f=h-f|0;j=((f|0)>(g|0)?f:g)>>>4|0;f=(g|0)>-1?g:-1;f=w(j,(f|0)<1?f:1);j=f>>>0>1?f:1;g=0;f=-21;while(1){b:{l=(g<<4)+h|0;h=q[l+4>>2];h=Mi[q[q[h>>2]+28>>2]](q[h+4>>2],b,c,d,e)|0;c:{if((h|0)!=-2){g=-9;d:{switch(h+3|0){case 0:break c;case 3:break d;default:break a}}dH(q[l+4>>2],i);f=0;break a}g=g+1|0;if((j|0)!=(g|0)){break b}g=-3}f=g;break a}h=q[a>>2];if(q[a+4>>2]-h>>4>>>0>g>>>0){continue}break}}J(28298,28028,479,28309);G()}Bj(k);Ii=i+2192|0;return f}function Ina(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;f=$i(12);c=f;q[c>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;q[c+4>>2]=q[a+4>>2];g=Oi(46062);c=q[a+24>>2];h=Li;d=q[q[a+16>>2]+(Cza(g,h,q[a+20>>2])<<2)>>2];e=c+(d<<4)|0;if((g|0)!=q[e>>2]|q[e+4>>2]!=(h|0)){while(1){d=q[((d<<4)+c|0)+12>>2];e=(d<<4)+c|0;if((g|0)!=q[e>>2]|(h|0)!=q[e+4>>2]){continue}break}}q[f>>2]=q[((d<<4)+c|0)+8>>2];q[f+8>>2]=Tj(q[a>>2],44667,128);p[b+104>>1]=725;q[b+16>>2]=f;q[b+20>>2]=220;q[b+24>>2]=221;q[b+28>>2]=222;q[b+32>>2]=223;q[b+44>>2]=224;q[b+52>>2]=225;q[b+60>>2]=226;q[b+68>>2]=227;q[b+84>>2]=228;q[b+88>>2]=229;q[b+96>>2]=230;return 0}function yz(a,b){var c=0,d=0;c=Ui($i(132),0,132);q[c+56>>2]=0;q[c+60>>2]=0;q[c+88>>2]=0;q[c+92>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+28>>2]=-1;q[c+48>>2]=0;q[c+52>>2]=0;d=c- -64|0;q[d>>2]=0;q[d+4>>2]=0;q[c+72>>2]=0;q[c+76>>2]=0;q[c+80>>2]=0;q[c+84>>2]=0;q[c+96>>2]=0;q[c+100>>2]=0;q[c+104>>2]=0;q[c+108>>2]=0;d=c+112|0;q[d>>2]=0;q[d+4>>2]=0;q[c+60>>2]=-1;q[c+92>>2]=-1;uA(c+8|0,127,256);vA(c+40|0,127,256);qt(c+72|0,443,256);if(o[c+116|0]&1){J(124369,124444,493,123924);G()}Wi(8,4,c+104|0,d,c+108|0);q[c+4>>2]=b;q[c>>2]=a;a=SY();if(a){q[q[a+16>>2]+88>>2]=1077}o[c+128|0]=1;q[c+124>>2]=-2;q[c+120>>2]=a;return c}function Wma(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+4>>2];d=q[b+56>>2];c=q[b+52>>2];if((d|0)!=(c|0)){a=0;while(1){e=q[(a<<2)+c>>2];if(e){Ni(e);c=q[b+52>>2];d=q[b+56>>2]}a=a+1|0;if(a>>>0>2>>>0){continue}break}}Mi[q[74944]](q[b+88>>2]);Ni(q[b+92>>2]);Mi[q[74949]](q[b+100>>2]);Ni(q[b+120>>2]);a:{if(o[b+80|0]&1){break a}a=q[b+68>>2];if(!a){break a}Ni(a)}b:{if(o[b+64|0]&1){break b}a=q[b+52>>2];if(!a){break b}Ni(a)}c:{if(o[b+44|0]&1){break c}a=q[b+32>>2];if(!a){break c}Ni(a)}d:{if(o[b+28|0]&1){break d}a=q[b+16>>2];if(!a){break d}Ni(a)}e:{if(o[b+12|0]&1){break e}a=q[b>>2];if(!a){break e}Ni(a)}Ni(b);return 0}function WC(a){var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;c=(Pza(a),Lza(2));b=c&2147483647;a:{if(b>>>0<=1061752794){if(b>>>0<964689920){break a}a=Wr(+a,0);break a}if(b>>>0<=1081824209){d=+a;if(b>>>0<=1075235811){a=Wr(((c|0)>-1?-1.5707963267948966:1.5707963267948966)+d,1);break a}a=Wr(((c|0)>-1?-3.141592653589793:3.141592653589793)+d,0);break a}if(b>>>0<=1088565717){d=+a;if(b>>>0<=1085271519){a=Wr(((c|0)>-1?-4.71238898038469:4.71238898038469)+d,1);break a}a=Wr(((c|0)>-1?-6.283185307179586:6.283185307179586)+d,0);break a}if(b>>>0>=2139095040){a=x(a-a);break a}b=qC(a,e+8|0);a=Wr(v[e+8>>3],b&1)}Ii=e+16|0;return a}function J2(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0);b=Ii+ -64|0;Ii=b;c=_i(a,1,q[210436],0);e=u[c>>2];f=u[c+4>>2];a:{if(!(e!=e|f!=f)){d=u[c+8>>2];if(d==d){break a}}d=u[c+8>>2];v[b+48>>3]=f;v[b+56>>3]=d;v[b+40>>3]=e;q[b+32>>2]=1;Qi(a,134131,b+32|0)}g=_i(a,2,q[210436],0);e=u[g>>2];f=u[g+4>>2];b:{if(!(e!=e|f!=f)){d=u[g+8>>2];if(d==d){break b}}d=u[g+8>>2];v[b+16>>3]=f;v[b+24>>3]=d;v[b+8>>3]=e;q[b>>2]=2;Qi(a,134131,b);d=u[g+8>>2];f=u[g+4>>2];e=u[g>>2]}h=u[c+8>>2];i=u[c>>2];j=u[c+4>>2];c=yj(a,16);u[c+8>>2]=h+d;u[c+4>>2]=j+f;u[c>>2]=i+e;Zi(a,-1e4,134e3);xj(a,-2);Ii=b- -64|0;return 1}function B2(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=0,h=x(0),i=x(0),j=x(0);b=Ii+ -64|0;Ii=b;c=_i(a,1,q[210436],0);e=u[c>>2];f=u[c+4>>2];a:{if(!(e!=e|f!=f)){d=u[c+8>>2];if(d==d){break a}}d=u[c+8>>2];v[b+48>>3]=f;v[b+56>>3]=d;v[b+40>>3]=e;q[b+32>>2]=1;Qi(a,134131,b+32|0)}g=_i(a,2,q[210436],0);e=u[g>>2];f=u[g+4>>2];b:{if(!(e!=e|f!=f)){d=u[g+8>>2];if(d==d){break b}}d=u[g+8>>2];v[b+16>>3]=f;v[b+24>>3]=d;v[b+8>>3]=e;q[b>>2]=2;Qi(a,134131,b);d=u[g+8>>2];f=u[g+4>>2];e=u[g>>2]}h=u[c+8>>2];i=u[c>>2];j=u[c+4>>2];c=yj(a,16);u[c+8>>2]=h-d;u[c+4>>2]=j-f;u[c>>2]=i-e;Zi(a,-1e4,134e3);xj(a,-2);Ii=b- -64|0;return 1}function ys(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=(a|0)==(c|0);d=e?a:b;a:{if((d|0)!=(a|0)){d=wk(a,d);if(d){break a}}q[a>>2]=1;c=e?b:c;d=q[c+4>>2];while(1){b=d;if(d){d=b-1|0;if(!q[q[c+8>>2]+(d<<2)>>2]){continue}}break}d=rl(a,b);if(d){break a}b:{if(!b){break b}c=q[c+8>>2];d=q[a+8>>2];e=0;while(1){f=q[d>>2];e=f+e|0;g=e+q[c>>2]|0;q[d>>2]=g;e=(e>>>0>>0)+(e>>>0>g>>>0)|0;d=d+4|0;c=c+4|0;h=h+1|0;if((h|0)!=(b|0)){continue}break}if(!e){break b}while(1){c=b+1|0;if(t[a+4>>2]<=b>>>0){d=rl(a,c);if(d){break a}d=q[a+8>>2]+(b<<2)|0}f=q[d>>2];g=f+e|0;q[d>>2]=g;d=d+4|0;e=1;b=c;if(f>>>0>g>>>0){continue}break}}d=0}return d}function mqa(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;c=q[a+8>>2]-q[a+12>>2]>>4;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=Ck(a,-1,q[71662]);Ri(a,-2);a:{if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){b:{if(!b){b=Qi(a,16906,0);break b}b=0;kj(a,1,0);c:{if(Oj(a,2)){break c}if(qv(a,2)){break c}if(On(a,2)){break c}if(Om(a,2)){break c}if(Nn(a,2)){break c}if(pz(a,2)){break c}if((Vi(a,2)|0)==1){break c}b=d;e=Vi(a,2);c=140583;d:{if((e|0)==-1){break d}c=q[(e<<2)+256832>>2]}q[b>>2]=c;b=Qi(a,16960,d);break b}if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){break a}}Ii=d+16|0;return b|0}J(15852,15159,197,19034);G()}J(15852,15159,2249,17080);G()}function mna(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+80>>2];c=q[b+68>>2];d=q[b+72>>2];if((c|0)==(d|0)){xn(46804,q[64814],c);return-1e3}a:{b:{e=q[b+64>>2];if(e){if(d>>>0>=c>>>0){break b}q[b+72>>2]=d+1;d=q[(d<<2)+e>>2];c=q[b+52>>2];b=q[b+48>>2];if(d>>>0>=(c-b|0)/48>>>0){break a}c=q[a+20>>2];e=q[a+16>>2];b=b+w(d,48)|0;u[b+8>>2]=u[a+24>>2];q[b>>2]=e;q[b+4>>2]=c;u[b+16>>2]=u[a+32>>2];u[b+20>>2]=u[a+36>>2];u[b+24>>2]=u[a+40>>2];u[b+28>>2]=u[a+44>>2];q[b+32>>2]=q[a+76>>2];p[b+36>>1]=s[b+36>>1]&65534;q[q[a+88>>2]>>2]=b;return 0}J(47657,47606,151,47664);G()}J(47668,47606,152,47664);G()}J(47406,47132,479,47417);G()}function OX(a,b){q[a+8>>2]=2036477234;q[a+12>>2]=1797285236;q[a>>2]=1634760805;q[a+4>>2]=857760878;q[a+16>>2]=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);q[a+20>>2]=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);q[a+24>>2]=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);q[a+28>>2]=r[b+12|0]|r[b+13|0]<<8|(r[b+14|0]<<16|r[b+15|0]<<24);q[a+32>>2]=r[b+16|0]|r[b+17|0]<<8|(r[b+18|0]<<16|r[b+19|0]<<24);q[a+36>>2]=r[b+20|0]|r[b+21|0]<<8|(r[b+22|0]<<16|r[b+23|0]<<24);q[a+40>>2]=r[b+24|0]|r[b+25|0]<<8|(r[b+26|0]<<16|r[b+27|0]<<24);q[a+44>>2]=r[b+28|0]|r[b+29|0]<<8|(r[b+30|0]<<16|r[b+31|0]<<24);return 0}function ksa(a,b){var c=0,d=0,e=0,f=0,g=0;a:{d=Gt(a);a=q[d+80>>2];b:{if(!a){break b}f=d+76|0;a=q[q[f>>2]+((b>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break b}c=q[d+84>>2];while(1){e=c+w(a,12)|0;if(q[e>>2]!=(b|0)){a=q[e+8>>2];if((a|0)!=-1){continue}break b}break}a=s[(c+w(a,12)|0)+4>>1];if((a|0)!=65535){e=q[d+16>>2];g=q[d+20>>2]-e>>1;while(1){if(a>>>0>=g>>>0){break a}a=s[e+(a<<1)>>1];c=q[d>>2];if(a>>>0>=(q[d+4>>2]-c|0)/104>>>0){break a}c=c+w(a,104)|0;p[c+88>>1]=65535;q[c+84>>2]=0;q[c+76>>2]=0;q[c+80>>2]=0;a=s[c+90>>1];p[c+90>>1]=65535;if((a|0)!=65535){continue}break}}Nv(f,b)}return}J(6640,6386,479,6651);G()}function gpa(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=0,g=0,h=0;d=Ii-16|0;Ii=d;f=-1e3;c=q[a+76>>2];a:{if(!c){break a}b=q[c+164>>2];if(!b){break a}b:{e=u[b+8>>2];c:{if(!(q[b+4>>2]|e!=x(0))){b=0;break c}if(e>x(0)^1){break b}b=q[b+4>>2];if(!b){break b}}q[d+8>>2]=b;v[d>>3]=e;Pi(4,37377,37385,d);break a}g=q[a+84>>2];b=$i(28);q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;h=r[g+17|0];q[b>>2]=c;c=q[a>>2];q[b+8>>2]=0;q[b+4>>2]=c;c=s[a+92>>1];o[b+24|0]=h|4;q[b+12>>2]=0;q[b+16>>2]=0;p[b+22>>1]=c;if(!vL(g,q[a+80>>2],b,0)){Ni(b);break a}q[q[a+88>>2]>>2]=b;f=0}Ii=d+16|0;return f|0}function dha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-96|0;Ii=e;f=q[a+8>>2]-q[a+12>>2]|0;g=jk(a);b=$j(a,2);h=Li;c=b;d=rm(a,3);b=e;q[b+64>>2]=c;q[b+68>>2]=h;u[b+80>>2]=u[d>>2];u[b+84>>2]=u[d+4>>2];u[b+88>>2]=u[d+8>>2];u[b+92>>2]=u[d+12>>2];q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[61436];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],g,c,b- -64|0,32);if(f>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(81306,81141,128,81327);G()}Ii=e+96|0;return 0}function QJ(a,b,c,d){var e=0,f=0,g=0,h=0;f=-5;a:{b:{c:{e=q[a+280>>2];d:{if(!e){break d}e=q[q[a+276>>2]+(Cza(c,d,e)<<2)>>2];if((e|0)==-1){break d}h=q[a+284>>2];while(1){g=(e<<4)+h|0;if((c|0)!=q[g>>2]|q[g+4>>2]!=(d|0)){e=q[g+12>>2];if((e|0)!=-1){continue}break d}break}f=b&65535;g=q[a+36>>2];a=q[a+32>>2];if(f>>>0>=(g-a|0)/592>>>0){break c}if(s[(a+w(f,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(f,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+496>>2]=c;q[a+500>>2]=d;p[a+504>>1]=s[((e<<4)+h|0)+8>>1];f=0}return f}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Ok(a,b){var c=0,d=0;c=r[b+5|0];a:{b:{c:{d:{e:{f:{while(1){g:{c=c&252;o[b+5|0]=c;d=r[b+4|0];if((d|0)!=7){switch(d-5|0){case 4:break c;case 3:break d;case 0:break e;case 1:break f;case 5:break g;default:break a}}o[b+5|0]=c|4;c=q[b+8>>2];if(!(!c|!(r[c+5|0]&3))){Ok(a,c)}b=q[b+12>>2];c=r[b+5|0];if(c&3){continue}break a}break}c=q[b+8>>2];h:{if(q[c+8>>2]<4){break h}d=q[c>>2];if(!(r[d+5|0]&3)){break h}Ok(a,d);c=q[b+8>>2]}if((b+16|0)!=(c|0)){break a}o[b+5|0]=r[b+5|0]|4;return}q[b+8>>2]=q[a+36>>2];break b}q[b+24>>2]=q[a+36>>2];break b}q[b+108>>2]=q[a+36>>2];break b}q[b+68>>2]=q[a+36>>2]}q[a+36>>2]=b}}function Fw(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=Ii-16|0;Ii=g;c=q[a+32>>2];d=q[a+20>>2];i=q[a+16>>2];e=q[a+4>>2];f=q[a>>2];j=q[a+28>>2]+q[a+24>>2]|0;b=c+(d+(i+(q[a+8>>2]+(e+(f+j|0)|0)|0)|0)|0)|0;h=b<<2;l=c+q[a+12>>2]|0;a=h;h=(b<<3)+35&-8;c=a+h|0;k=(a+c|0)+7&-8;e=k+(e<<3)|0;d=(e+((f+w(d,3)|0)+(j<<2)<<2)|0)+7&-8;f=d+(i<<5)|0;a:{if(Ro(g+12|0,8,l+f|0)){b=0;break a}a=q[g+12>>2];q[a>>2]=b;q[a+28>>2]=a+f;q[a+24>>2]=a+d;q[a+20>>2]=a+e;q[a+16>>2]=a+k;q[a+12>>2]=a+c;q[a+8>>2]=a+h;q[a+4>>2]=a+32;b=$i(24);q[b+4>>2]=0;q[b+8>>2]=0;q[b>>2]=a;q[b+12>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0}Ii=g+16|0;return b}function VM(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=r[a+24|0];if(f){while(1){d=q[a+20>>2]+w(g,24)|0;c=q[d+12>>2]+b|0;a:{b:{c:{d:{e=q[d+4>>2];switch((e>>>22&63)-9|0){case 3:break b;case 0:break c;case 2:break d;default:break a}}VM(q[d+8>>2],c);f=r[a+24|0];break a}if((e&-268435456)==805306368){d=q[c>>2]+b|0;q[c>>2]=d;e=q[c+4>>2];if(!e){break a}i=q[a+16>>2];c=0;while(1){h=q[d>>2];q[d>>2]=i>>>0>h>>>0?0:h+b|0;d=d+4|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}break a}d=c;c=q[c>>2];q[d>>2]=c>>>0>2]?0:c+b|0;break a}d=c;c=q[c>>2];q[d>>2]=c>>>0>2]?0:c+b|0}g=g+1|0;if(g>>>0>>0){continue}break}}}function TJ(a,b,c,d){var e=0,f=0,g=0,h=0;f=-5;a:{b:{c:{e=q[a+100>>2];d:{if(!e){break d}e=q[q[a+96>>2]+(Cza(c,d,e)<<2)>>2];if((e|0)==-1){break d}h=q[a+104>>2];while(1){g=(e<<4)+h|0;if((c|0)!=q[g>>2]|q[g+4>>2]!=(d|0)){e=q[g+12>>2];if((e|0)!=-1){continue}break d}break}f=b&65535;g=q[a+36>>2];a=q[a+32>>2];if(f>>>0>=(g-a|0)/592>>>0){break c}if(s[(a+w(f,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(f,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+480>>2]=c;q[a+484>>2]=d;q[a+488>>2]=q[((e<<4)+h|0)+8>>2];f=0}return f}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function DD(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;q[d>>2]=0;f=q[a>>2];a:{if((f|0)==-1){f=-2;break a}b:{f=wu(f,b,c);if((f|0)<=0){while(1){if(!f){f=-2;break a}f=q[240513];c:{if((f|0)==27){break c}if((f|0)!=6){break a}f=q[a>>2];q[g+12>>2]=1;q[g+8>>2]=f;if(v[e>>3]==0){break b}while(1){i=g+8|0;h=Qp(e)*1e3;d:{if(y(h)<2147483648){f=~~h;break d}f=-2147483648}f=Vp(i,1,(f|0)>-1?f:-1);if((f|0)!=-1){if(f){break c}break b}if(q[240513]==27){continue}break}f=q[240513];if(f){break a}}f=wu(q[a>>2],b,c);if((f|0)<=0){continue}break}}q[d>>2]=f;f=0;break a}f=-1}Ii=g+16|0;return f|0}function XV(a){var b=0,c=0,d=0,e=0,f=0,g=0;c=qD(q[a+104>>2]+2|0);g=Li;a:{if(!(r[q[a>>2]+185|0]&8)){break a}b=q[a+156>>2];d=q[a+152>>2];if((g|0)==(b|0)&c>>>0>d>>>0|b>>>0>>0){f=1;e=0;b=g-((c>>>0>>0)+b|0)|0;d=c-d|0;if(!b&d>>>0<=63){e=q[a+164>>2];f=q[a+160>>2];b=d&31;if((d&63)>>>0>=32){e=f<>>32-b|e<>2]=c;q[a+156>>2]=g;q[a+160>>2]=f;q[a+164>>2]=e;return}e=b-((c>>>0>d>>>0)+g|0)|0;c=d-c|0;if(!e&c>>>0>63|e){break a}e=q[a+164>>2];d=a;b=a;f=q[a+160>>2];a=c&31;if((c&63)>>>0>=32){c=1<>>32-a;a=1<>2]=f|a;q[d+164>>2]=c|e}}function mra(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;g=Ii-32|0;Ii=g;h=g+24|0;q[h>>2]=0;q[h+4>>2]=0;q[g+16>>2]=0;q[g+20>>2]=0;Wi(c+24|0,1,g+16|0,h,g+16|4);i=q[h>>2];q[g+20>>2]=i;h=q[g+16>>2];q[h+8>>2]=c;j=q[a+12>>2];a=q[a+8>>2];o[h+16|0]=0;q[h+12>>2]=f;q[h>>2]=a;q[h+4>>2]=j;Ti(h+24|0,b,c);c=0;a=q[57324];if(Oo(d,e,q[a+8>>2],q[a+12>>2],0,0,a,h,i-h|0,0)){a=aj(q[a+8>>2],q[a+12>>2]);b=sm(q[e>>2],q[e+4>>2]);c=aj(q[e+16>>2],q[e+20>>2]);q[g+12>>2]=aj(q[e+24>>2],q[e+28>>2]);q[g+8>>2]=c;q[g+4>>2]=b;q[g>>2]=a;Pi(4,14825,14836,g);c=-1e3}a:{if(o[g+28|0]&1){break a}a=q[g+16>>2];if(!a){break a}Ni(a)}Ii=g+32|0;return c}function Dja(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;q[c+8>>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[59722],c)){break a}b:{b=q[a>>2];d=ak(b,q[q[c>>2]+108>>2],c|4);if(d){break b}if(q[q[q[c+4>>2]>>2]+152>>2]){Pi(4,61401,61409,0);d=-15;break b}d=ak(b,q[q[c>>2]+104>>2],c+8|0);if(d){break b}d=q[a>>2];a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}b=q[a+4>>2];if(b){cj(d,b)}b=q[a+8>>2];if(b){cj(d,b)}d=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=d;q[a+8>>2]=q[c+8>>2];d=0;break a}a=q[a>>2];b=q[c>>2];if(b){Aj(b)}b=q[c+4>>2];if(b){cj(a,b)}b=q[c+8>>2];if(!b){break a}cj(a,b)}Ii=c+16|0;return d|0}function AK(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;q[d+24>>2]=c;q[d+28>>2]=b;ua(a|0,1,d+28|0,d+24|0);a:{b:{c:{if(r[q[75054]+156|0]&64){b=K()|0;if(b){break c}}ya(a|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}va(a|0,35713,d+20|0);c=q[d+20>>2];d:{if(c){break d}va(a|0,35716,d+16|0);b=q[d+16>>2];if((b|0)>=1){e=a;a=Yi(b);Ya(e|0,b|0,d+16|0,a|0);q[d>>2]=a;Pi(4,88531,92058,d);Ni(a)}if(!(r[q[75054]+156|0]&64)){break d}a=K()|0;if(a){break a}}Ii=d+32|0;return(c|0)!=0}lj(b,92130,2020);J(88669,88575,2020,92130);G()}lj(b,92130,2022);J(88669,88575,2022,92130);G()}lj(a,92130,2037);J(88669,88575,2037,92130);G()}function ll(a,b){var c=0,d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;c=b+16|0;d=q[a+8>>2];if(c>>>0>>0){while(1){d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;q[b+8>>2]=q[b+24>>2];b=c;c=b+16|0;d=q[a+8>>2];if(c>>>0>>0){continue}break}}q[a+8>>2]=d-16}function cw(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{d=b&65535;e=q[a+32>>2];if(d>>>0<(q[a+36>>2]-e|0)/592>>>0){if(s[(w(d,592)+e|0)+568>>1]!=(b>>>16|0)){break b}f=w(d,592)+e|0;if(s[f+570>>1]!=(b&65535)){break a}h=q[a+48>>2];g=q[a+52>>2]-h|0;a=(g|0)/72|0;c:{if(!g){break c}f=f+472|0;g=a>>>0>1?a:1;a=0;while(1){i=w(a,72)+h|0;if(!((f|0)==q[i+4>>2]?q[i>>2]==(b|0):0)){a=a+1|0;if((g|0)!=(a|0)){continue}break c}break}a=w(a,72)+h|0;o[a+68|0]=r[a+68|0]|4}if(!c){a=w(d,592)+e|0;q[a+464>>2]=0;q[a+468>>2]=0}return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function vW(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=a+8|0;l=Jj(c,0);d=a+44|0;i=Jj(d,0);g=a+56|0;j=Jj(g,0);e=(i|0)!=0&(j|0)!=0;h=a+32|0;f=Jj(h,0);k=a+20|0;b=(Jj(k,0)|0)!=0;m=e&!f&b;f=(f|0)!=0;n=!l|(i|j)!=0;o=b&(f&(n^1));e=m|(o|b&(e&f));a:{if(!(b&((f|n)^1))){b=-16512;if(!e){break a}}if(!(!j|(!i|l))){b=Wk(c,d,g);if(b){return b-16512|0}q[a+4>>2]=Wm(c)}b:{c:{d:{if(o){c=tW(c,k,h,d,g);if(!c){break d}return c-16512|0}if(!m){break d}c=sW(d,g,k,h);if(!c){break c}return c-16512|0}if(!e){break b}}d=uW(d,g,h,a+68|0,a+80|0,a+92|0);if(!d){break b}return d-16512|0}b=is(a,e)}return b}function r6(a,b,c,d,e,f,g){var h=0,i=0,j=0;j=Ii-16|0;Ii=j;i=$i(2228);h=i+2212|0;q[h>>2]=0;q[h+4>>2]=0;q[i+2188>>2]=0;q[i+2192>>2]=0;h=i+2220|0;q[h>>2]=0;q[h+4>>2]=0;h=i+2204|0;q[h>>2]=0;q[h+4>>2]=0;h=i+2196|0;q[h>>2]=0;q[h+4>>2]=0;q[i+2216>>2]=-1;h=b;b=Ui(i,0,2188);i=b+2188|0;a=Sz(a,h,i);a:{if(a){q[j>>2]=a;Pi(4,31790,31799,j);a=q[i>>2];if(a){No(a)}if(q[b+2192>>2]){pr(b+2192|0)}b:{if(o[b+2224|0]&1){break b}a=q[b+2204>>2];if(a){Ni(a)}a=q[b+2196>>2];if(!a){break b}Ni(a)}Ni(b);a=-4;break a}a=-3;if(E6(c,d,e,f,q[i>>2])){break a}q[b+2192>>2]=q[q[b+2188>>2]>>2];cH(b);q[g>>2]=b;a=0}Ii=j+16|0;return a}function mu(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0;h=Ii-240|0;Ii=h;i=q[d>>2];q[h+232>>2]=i;d=q[d+4>>2];q[h>>2]=a;q[h+236>>2]=d;k=1;a:{b:{c:{if(!(d|(i|0)!=1)){d=a;break c}l=0-b|0;i=a;while(1){j=(e<<2)+g|0;d=i-q[j>>2]|0;if((Mi[c|0](d,a)|0)<1){d=i;break c}d:{if(!((e|0)<2|f)){f=q[j-8>>2];j=i+l|0;if((Mi[c|0](j,d)|0)>-1){break d}if((Mi[c|0](j-f|0,d)|0)>-1){break d}}q[(k<<2)+h>>2]=d;i=h+232|0;f=zza(q[h+232>>2]-1|0);if(!f){f=zza(q[h+236>>2]);f=f?f+32|0:0}uu(i,f);k=k+1|0;e=e+f|0;f=0;i=d;if(q[h+236>>2]|q[h+232>>2]!=1){continue}break b}break}d=i;break b}if(f){break a}}pN(b,h,k);Rx(d,b,c,e,g)}Ii=h+240|0}function h1(a,b,c){var d=0,e=0,f=0;d=Ii-16448|0;Ii=d;q[d+16432>>2]=0;q[d+16424>>2]=0;q[d+16428>>2]=0;a:{b:{c:{d:{e=Pua(d+16392|0);f=e+6|0;if(f>>>0<=8){if((f|0)!=6){break a}q[d+16392>>2]=a;q[d+16396>>2]=b;while(1){q[d+16408>>2]=16384;q[d+16404>>2]=d;a=Qua(d+16392|0);if((a|0)==-2){break d}if(!(Mi[966](c,d,16384-q[d+16408>>2]|0)|0)){WB(d+16392|0);e=-1;break a}if(!q[d+16408>>2]){continue}break}if(q[d+16396>>2]){break c}if((a|0)!=1){break b}WB(d+16392|0);e=0;break a}e=-1e3;break a}J(184717,184739,106,184774);G()}J(184788,184739,115,184774);G()}J(184807,184739,116,184774);G()}Ii=d+16448|0;return e}function O7(a){a=a|0;var b=0,c=0,d=0;b=Ii-48|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){q[b+16>>2]=jj(a,1);q[b+20>>2]=0;q[b+8>>2]=3;c=q[d+4>>2];a:{if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+44>>2];q[c+32>>2]=q[b+40>>2];q[c+36>>2]=a;a=q[b+36>>2];q[c+24>>2]=q[b+32>>2];q[c+28>>2]=a;a=q[b+28>>2];q[c+16>>2]=q[b+24>>2];q[c+20>>2]=a;a=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=a;a=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=a;a=0;break a}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+48|0;return a|0}J(115568,115465,478,119531);G()}function N3(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0);c=Ii-48|0;Ii=c;a:{if(!(q[a+8>>2]-q[a+12>>2]>>4)){d=x(1);break a}if(q[a+8>>2]-q[a+12>>2]>>4==1){b=_i(a,-1,q[210438],0);f=u[b>>2];g=u[b+4>>2];b:{if(f!=f|g!=g){break b}e=u[b+8>>2];if(e!=e){break b}d=u[b+12>>2];if(d==d){break a}}d=u[b+8>>2];e=u[b+12>>2];v[c+16>>3]=g;v[c+32>>3]=e;v[c+24>>3]=d;v[c+8>>3]=f;q[c>>2]=-1;Qi(a,134315,c);d=u[b+12>>2];e=u[b+8>>2];g=u[b+4>>2];f=u[b>>2];break a}f=x(fj(a,1));g=x(fj(a,2));e=x(fj(a,3));d=x(fj(a,4))}b=yj(a,16);u[b+12>>2]=d;u[b+8>>2]=e;u[b+4>>2]=g;u[b>>2]=f;Zi(a,-1e4,134032);xj(a,-2);Ii=c+48|0;return 1}function Il(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;a:{if(q[b+16>>2]!=q[b+20>>2]){rn(a,b);break a}Nm(a,b)}b:{c:{d:{e:{d=q[b>>2];switch(d-1|0){case 3:break d;case 0:case 1:case 2:case 4:break e;default:break c}}if(q[a+40>>2]>255){break c}f:{g:{switch(d-1|0){case 0:q[c+8>>2]=0;d=q[a+4>>2];q[c+24>>2]=5;q[c+16>>2]=d;a=Vr(a,c+16|0,c);break f;case 4:e=v[b+8>>3];q[c+24>>2]=3;v[c+16>>3]=e;a=Vr(a,c+16|0,c+16|0);break f;default:break g}}q[c+24>>2]=1;q[c+16>>2]=(d|0)==2;a=Vr(a,c+16|0,c+16|0)}q[b>>2]=4;q[b+8>>2]=a;a=a|256;break b}d=q[b+8>>2];if((d|0)>255){break c}a=d|256;break b}a=rn(a,b)}Ii=c+32|0;return a}function yB(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;a:{if(!d){break a}if(b>>>0>=16777216){while(1){g=f+5|0;b=c+f|0;e=r[b+4|0];b:{if(!e){f=g;break b}b=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);f=g;while(1){o[a+b|0]=r[c+f|0];f=f+1|0;b=b+1|0;e=e-1|0;if(e){continue}break}}if(d>>>0>f>>>0){continue}break a}}h=b>>>0<65536;i=b>>>0<256;while(1){g=f+1|0;e=c+f|0;b=r[e|0];c:{d:{if(!h){g=r[c+g|0]<<8|b;b=r[e+2|0]<<16;e=f+3|0;break d}if(i){e=g;break c}g=r[c+g|0]<<8;e=f+2|0}b=b|g}f=e+1|0;e=r[c+e|0];if(e){while(1){o[a+b|0]=r[c+f|0];f=f+1|0;b=b+1|0;e=e-1|0;if(e){continue}break}}if(d>>>0>f>>>0){continue}break}}}function qxa(a){var b=0,c=0,d=0,e=0,f=0,g=0;Oza(+a);b=Lza(1)|0;f=Lza(0)|0;g=b;a:{b:{b=b&2147483647;if(b>>>0>=1072693248){if(b-1072693248|f){break b}return a*1.5707963267948966+7.52316384526264e-37}if(b>>>0<=1071644671){if(b+ -1048576>>>0<1044381696){break a}return hu(a*a)*a+a}c=(1-y(a))*.5;a=F(c);e=hu(c);c:{if(b>>>0>=1072640819){a=a+a*e;a=1.5707963267948966-(a+a+ -6.123233995736766e-17);break c}d=c;Oza(+a);b=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,b|0);c=+Nza();d=(d-c*c)/(a+c);a=.7853981633974483-(c+c)-((a+a)*e-(6.123233995736766e-17-(d+d)))+.7853981633974483}return(g|0)>-1?a:-a}a=0/(a-a)}return a}function Ep(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-48|0;Ii=d;h=q[c+48>>2];a:{if(!h){e=1;break a}while(1){b:{c:{d:{if(t[c+56>>2]>f>>>0){if(t[c+48>>2]<=f>>>0){break d}g=f<<2;e=q[g+q[c+52>>2]>>2];g=q[g+q[c+44>>2]>>2];q[d+44>>2]=0;if(!ak(a,e,d+44|0)){if(lt(a,e,d+8|0)){break c}if(f4(b,q[d+8>>2],q[d+12>>2])){cj(a,q[d+44>>2]);break b}if(Ep(a,b,q[q[d+44>>2]>>2])){e=q[d+44>>2];if(!s5(b,q[e>>2],g,e,q[d+8>>2],q[d+12>>2])){break b}}cj(a,q[d+44>>2])}e=0;break a}J(19810,19822,45,19849);G()}J(19810,19822,38,19849);G()}J(19668,19695,39,19740);G()}e=1;f=f+1|0;if((h|0)!=(f|0)){continue}break}}Ii=d+48|0;return e}function zw(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=(r[b+136|0]<<4)+a|0;g=c+1080|0;a:{b:{c:{e=c+1084|0;d=q[e>>2];h=c+1088|0;f=q[h>>2];if((d|0)==(f|0)){if(o[c+1092|0]&1){break c}c=q[a+1032>>2];a=d-q[g>>2]>>1;d=c-a|0;c=a>>>1|0;c=c>>>0>10?c:10;Wi((d>>>0>>0?d:c)+a|0,2,g,h,e);f=q[h>>2];d=q[e>>2]}if((d|0)==(f|0)){break b}a=q[g>>2];c=d-a>>1;d=c&65535;if(d>>>0>=f-a>>1>>>0){break a}a=a+(d<<1)|0;q[e>>2]=a+2;p[a>>1]=s[b+140>>1]&32767;d=q[b+140>>2]&-2147418113;a=b;q[a+136>>2]=q[a+136>>2];q[a+140>>2]=(c&32767)<<16|d;return}J(10026,9962,493,10101);G()}J(10188,7192,702,10202);G()}J(9943,9962,506,10018);G()}function jga(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a:{b:{if(b>>>0<2097152){c:{if(a+1>>>0<2){break c}b=a&65535;g=q[75054];if(b>>>0>=t[g+32>>2]){break b}h=q[q[g+24>>2]+(b<<2)>>2];if(!h){break c}f=s[q[g+28>>2]+(b<<1)>>1]==(a>>>16|0)?h:0}d:{if(!(!(1<>>0>8)){a=rq(c);if(a>>>0>=4){break a}a=(a<<6)+f|0;break d}a=f+384|0;if(q[f+440>>2]){break d}a=c-16|0;if(a){e:{if((a|0)!=16){break e}a=f+320|0;break d}J(88669,88575,2793,93910);G()}a=f+256|0}q[d>>2]=s[a+40>>1];q[e>>2]=s[a+42>>1];return}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}J(93877,88575,2776,93910);G()}function Aja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-144|0;Ii=b;c=q[a+4>>2];e=q[a+20>>2];q[b+40>>2]=0;q[b+44>>2]=0;a:{b:{f=JL(q[a>>2],e,b+40|0);c:{if(!f){c=Yz(c,q[b+44>>2],q[b+40>>2]);if(!c){cj(q[a>>2],q[b+44>>2]);cj(q[a>>2],q[b+40>>2]);f=-2;break c}if(lt(q[a>>2],q[e+12>>2],b+8|0)){break b}d=q[b+12>>2];q[c+136>>2]=q[b+8>>2];q[c+140>>2]=d;if(lt(q[a>>2],q[e+16>>2],b+8|0)){break a}d=q[b+12>>2];q[c+144>>2]=q[b+8>>2];q[c+148>>2]=d;mq(q[a>>2],508,c);d=$i(36);q[d>>2]=c;YK(q[a+8>>2],d,b+40|0,e);q[q[a+24>>2]+8>>2]=d}Aj(e)}Ii=b+144|0;return f|0}J(61541,61576,270,61618);G()}J(61541,61576,274,61618);G()}function XJ(a,b){var c=0,d=0;a:{b:{c:{d=b&65535;c=q[a+32>>2];if(d>>>0<(q[a+36>>2]-c|0)/592>>>0){if(s[(w(d,592)+c|0)+568>>1]!=(b>>>16|0)){break c}c=w(d,592)+c|0;if(s[c+570>>1]!=(b&65535)){break b}q[c+412>>2]=q[c+412>>2]|4194304;b=s[c+578>>1];if((b|0)!=65535){while(1){b=b&65535;c=q[a+32>>2];if(b>>>0>=(q[a+36>>2]-c|0)/592>>>0){break a}b=c+w(b,592)|0;q[b+412>>2]=q[b+412>>2]|4194304;if(s[b+578>>1]!=65535){XJ(a,s[b+570>>1]|s[b+568>>1]<<16)}b=s[b+574>>1];if((b|0)!=65535){continue}break}}return}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function PH(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,s=0,u=0;if(c){while(1){m=(b<<2)+a|0;r=m+(c<<2)|0;h=c>>>1|0;i=(h<<2)+m|0;j=w(q[i>>2],48);n=j+d|0;o=q[e>>2];k=m;if(h){u=q[(j+o|0)+32>>2];while(1){l=h>>>1|0;s=(l<<2)+k|0;p=t[(w(q[s>>2],48)+o|0)+32>>2]>>0;k=p?s+4|0:k;h=p?(l^-1)+h|0:l;if(h){continue}break}}p=q[n+32>>2];h=r-i|0;if(h){h=h>>2;r=q[(j+o|0)+32>>2];while(1){j=h>>>1|0;n=(j<<2)+i|0;l=r>>>0>2],48)+o|0)+32>>2];i=l?i:n+4|0;h=l?j:(j^-1)+h|0;if(h){continue}break}}Mi[g|0](f,p,k-a>>2,i-k>>2);PH(a,b,k-m>>2,d,e,f,g);b=i-a>>2;c=c-(i-m>>2)|0;if(c){continue}break}}}function HY(a){a=a|0;var b=0;Ns(a,144458);qk(a,1114,0);Si(a,-2,144467);Ak(a,144472,257280);ej(a,-1);Zq(a,-10001);vj(a,0,4);qk(a,1115,0);nk(a,-2,1);qk(a,1116,0);nk(a,-2,2);qk(a,1117,0);nk(a,-2,3);qk(a,1118,0);nk(a,-2,4);Si(a,-2,144480);b=Jn(144493);a:{if(!b){Xi(a,144502);break a}ip(a,ip(a,b,145084,145087),145091,144502);ll(a,-2)}Si(a,-2,144488);b=Jn(144646);b:{if(!b){Xi(a,144656);break b}ip(a,ip(a,b,145084,145087),145091,144656);ll(a,-2)}Si(a,-2,144640);bj(a,144725,9);Si(a,-2,144735);Uu(a,-1e4,144742,2);Si(a,-2,144750);vj(a,0,0);Si(a,-2,144757);ej(a,-10002);Ak(a,0,257312);Ri(a,-2);return 1}function vK(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{d=q[a+32>>2];b=q[a+36>>2];if((d|0)==(b|0)){break a}b=(b-d|0)/592|0;f=q[a+196>>2];if(f){j=b>>>0>1?b:1;k=q[a+192>>2];while(1){g=w(e,592)+d|0;b=g;h=q[b+520>>2];i=q[b+524>>2];b=q[(Cza(h,i,f)<<2)+k>>2];c=0;b:{if((b|0)==-1){break b}c=q[a+200>>2];c:{while(1){b=c+(b<<4)|0;if(q[b>>2]==(h|0)&(i|0)==q[b+4>>2]){break c}b=q[b+12>>2];if((b|0)!=-1){continue}break}c=0;break b}c=q[b+8>>2]}q[g+528>>2]=c;e=e+1|0;if((j|0)!=(e|0)){continue}break}break a}a=b>>>0>1?b:1;b=0;while(1){q[(w(b,592)+d|0)+528>>2]=0;b=b+1|0;if((a|0)!=(b|0)){continue}break}}}function as(a,b,c){var d=0,e=0,f=0,g=0;d=q[b>>2];a:{if(!d){break a}f=q[a+16>>2];g=r[f+20|0]^3;while(1){if(!c){break a}if(r[d+4|0]==8){as(a,d+104|0,-3)}e=r[d+5|0];b:{if((e^3)&g){o[d+5|0]=r[f+20|0]&3|e&248;b=d;break b}q[b>>2]=q[d>>2];if(q[f+28>>2]==(d|0)){q[f+28>>2]=q[d>>2]}c:{switch(r[d+4|0]-4|0){case 5:zZ(a,d);break b;case 2:AZ(a,d);break b;case 6:yZ(a,d);break b;case 1:uZ(a,d);break b;case 4:DZ(a,d);break b;case 0:e=q[a+16>>2];q[e+4>>2]=q[e+4>>2]-1;Cj(a,d,q[d+12>>2]+17|0,0);break b;case 3:break c;default:break b}}Cj(a,d,q[d+16>>2]+32|0,0)}c=c-1|0;d=q[b>>2];if(d){continue}break}}return b}function IV(a){var b=0,c=0,d=0,e=0,f=0;d=-29184;e=q[a+132>>2];c=q[a>>2];b=r[c+184|0]&2?12:4;a:{if(e>>>0>>0){break a}f=q[a+120>>2];b=b+(r[f+3|0]|(r[f+2|0]<<8|r[f+1|0]<<16))|0;q[a+168>>2]=b;b:{c:{if(r[c+184|0]&2){c=r[f+4|0];b=r[f+5|0];if(VR(a)){break a}e=q[a+68>>2];if(!e){break c}c=b|c<<8;d:{if(q[a+4>>2]!=16){b=q[e+476>>2];if((c|0)!=(b|0)){break d}break c}if(r[f|0]==1){break c}b=q[e+476>>2]}d=-25728;if(b>>>0>>0){break a}if(!(r[f|0]==3|(c|0)!=(q[e+508>>2]-1|0))){d=Qq(a);if(d){break a}}return-25984}d=-28800;if(b>>>0>e>>>0){break a}break b}d=-25728;if((rD(a)|0)==1){break a}}d=0}return d}function H3(a){a=a|0;var b=0,c=0;b=Ii-144|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;YM(kj(a,1,b+140|0),q[b+140>>2],b+112|0);q[b+16>>2]=r[b+116|0];q[b+20>>2]=r[b+117|0];q[b+24>>2]=r[b+118|0];q[b+28>>2]=r[b+119|0];q[b+32>>2]=r[b+120|0];q[b+36>>2]=r[b+121|0];q[b+40>>2]=r[b+122|0];q[b+44>>2]=r[b+123|0];q[b+48>>2]=r[b+124|0];q[b+52>>2]=r[b+125|0];q[b+56>>2]=r[b+126|0];q[b+60>>2]=r[b+127|0];q[b>>2]=r[b+112|0];q[b+4>>2]=r[b+113|0];q[b+8>>2]=r[b+114|0];q[b+12>>2]=r[b+115|0];sj(b- -64|0,33,125555,b);Xi(a,b- -64|0);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(125274,125299,133,125620);G()}Ii=b+144|0;return 1}function yG(a,b,c){var d=0,e=0;d=Ii+ -64|0;Ii=d;a:{if(r[q[a+8>>2]]){e=q[a+20>>2];q[d+56>>2]=q[a+4>>2];q[d+52>>2]=e;q[d+48>>2]=a+36;a=sj(b,c,122828,d+48|0);break a}b:{c:{d:{e:{e=r[q[a+12>>2]];switch(e-109|0){case 7:break b;case 1:case 2:case 3:case 4:case 5:case 6:break c;case 0:break e;default:break d}}q[d+20>>2]=q[a+20>>2];q[d+16>>2]=a+36;a=sj(b,c,122853,d+16|0);break a}if((e|0)==67){break b}}e=q[a+20>>2];q[d+12>>2]=q[a+28>>2];a=a+36|0;q[d+8>>2]=a;q[d+4>>2]=e;q[d>>2]=a;a=sj(b,c,122889,d);break a}q[d+36>>2]=q[a+20>>2];q[d+32>>2]=a+36;a=sj(b,c,122877,d+32|0)}Ii=d- -64|0;return(a|0)>0?a:0}function Vta(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-80|0;Ii=c;h=q[a+8>>2]-q[a+12>>2]>>4;d=jj(a,1);if(!((d|0)==1&r[906092]!=0)){Qi(a,209110,0)}vj(a,0,0);a:{e=aN(d,0);b=(e|0)!=0;f=$M(d,0);if((b|0)!=(!f|0)){while(1){if(!b){break a}b=q[a+8>>2];q[b+8>>2]=3;g=g+1|0;v[b>>3]=g>>>0;q[a+8>>2]=q[a+8>>2]+16;vj(a,0,0);Xi(a,209266);Xi(a,f);pj(a,-3);q[c>>2]=e;mn(c+16|0,209167,c);Xi(a,209271);Xi(a,c+16|0);pj(a,-3);pj(a,-3);e=aN(d,g);b=(e|0)!=0;f=$M(d,g);if(b^!f){continue}break}}J(209214,208573,164,209249);G()}if((h+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(209170,208573,186,209249);G()}Ii=c+80|0;return 1}function eX(a,b,c,d,e,f){var g=0,h=0,i=0;h=Wm(a+4|0);g=-20096;if(q[a+48>>2]){i=q[a+60>>2]?1:2}else{i=0}a:{if((i|0)==2){q[d>>2]=h;g=-20224;if(f>>>0>>0){break a}g=qE(b,e,h);if(g){break a}g=0}if(q[a+48>>2]){a=q[a+60>>2]?1:2}else{a=0}if((a|0)!=1){break a}if(!Jj(b+24|0,0)){if(!f){return-20224}o[e|0]=0;q[d>>2]=1;return 0}b:{switch(c|0){case 0:a=h<<1|1;q[d>>2]=a;g=-20224;if(a>>>0>f>>>0){break a}o[e|0]=4;a=e+1|0;g=Dn(b,a,h);if(g){break a}return Dn(b+12|0,a+h|0,h);case 1:break b;default:break a}}a=h+1|0;q[d>>2]=a;g=-20224;if(a>>>0>f>>>0){break a}o[e|0]=Xm(b+12|0,0)+2;g=Dn(b,e+1|0,h)}return g}function Z2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;f=q[a+8>>2]-q[a+12>>2]>>4;Dj(a,1,3);Dj(a,2,1);Dj(a,3,6);d=Mj(a,1);if(!(d<0^1)){return Qi(a,133513,0)|0}c=Uj(a,2);b=q[210420];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;tv(a);a:{b:{c:{if((Vi(a,-1)|0)!=2){Ri(a,-2);break c}b=qj(a,-1);Ri(a,-2);if(b){break b}}Pi(4,133348,133563,0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4294967295;q[a+8>>2]=q[a+8>>2]+16;break a}b=r5(b,x(d),(c|0)!=0,LG(a),rp(a,3));c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;if((f+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(133633,132848,617,133658);G()}return 1}function Gea(a){var b=0;a:{if(o[a+188|0]&1){break a}b=q[a+176>>2];if(!b){break a}Ni(b)}b:{if(o[a+164|0]&1){break b}b=q[a+152>>2];if(!b){break b}Ni(b)}c:{if(o[a+148|0]&1){break c}b=q[a+136>>2];if(!b){break c}Ni(b)}d:{if(o[a+132|0]&1){break d}b=q[a+120>>2];if(!b){break d}Ni(b)}e:{if(o[a+116|0]&1){break e}b=q[a+104>>2];if(!b){break e}Ni(b)}f:{if(o[a+100|0]&1){break f}b=q[a+88>>2];if(!b){break f}Ni(b)}g:{if(o[a+84|0]&1){break g}b=q[a+72>>2];if(!b){break g}Ni(b)}h:{if(o[a+68|0]&1){break h}b=q[a+56>>2];if(!b){break h}Ni(b)}i:{if(o[a+52|0]&1){break i}b=q[a+40>>2];if(!b){break i}Ni(b)}return a}function uv(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=-3;c=GV(q[a+12>>2],b,c-1|0);a:{b:{if((c|0)<=-26753){if((c|0)==-28672){break a}if((c|0)!=-26880){break b}break a}if((c|0)==-26752|(c|0)==-26624){break a}}f=0;c:{if((c|0)<=0){nD(q[a+12>>2]);f=-5;d:{e:{if((c|0)<=-81){if((c|0)==-30848){break a}if((c|0)==-26624){break e}if((c|0)==-26496){break a}break c}switch(c+80|0){case 0:break a;case 4:break d;default:break c}}f=-3;break a}f=-101;break a}o[b+c|0]=0;q[d>>2]=c;break a}q[e+4>>2]=c;q[e>>2]=lr(c);q[e+8>>2]=(c|0)<0?45:32;a=c>>31;q[e+12>>2]=a+c^a;Pi(3,181404,182883,e);f=-1e3}Ii=e+16|0;return f}function QY(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{c:{f=q[a+40>>2];b=q[b+96>>2];e=f+w(b,24)|0;g=q[e+4>>2];if(q[g+8>>2]!=6){break c}d=q[g>>2];if(r[d+6|0]){break c}h=q[d+16>>2];if(!h){break c}d:{if((e|0)!=q[a+20>>2]){b=q[(f+w(b,24)|0)+12>>2];break d}d=f+w(b,24)|0;b=q[a+24>>2];q[d+12>>2]=b;d=q[g>>2]}d=My(h,c,(b-q[q[d+16>>2]+12>>2]>>2)-1|0);if(!d){break c}b=q[e>>2];break b}d=0;b=q[e>>2];if((c|0)<1|q[((e|0)==q[a+20>>2]?a+8|0:e+28|0)>>2]-b>>4<(c|0)){break a}d=140752}b=((c<<4)+b|0)-16|0;c=q[a+8>>2]-16|0;e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;q[b+8>>2]=q[c+8>>2]}q[a+8>>2]=q[a+8>>2]-16;return d}function Kia(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;d=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[60724],b+8|0)){break a}d=ML(q[a>>2],b+8|0);if(!d){d=q[a>>2];a=q[q[a+32>>2]+8>>2];c=q[a>>2];if(c){Aj(c)}c=q[a+4>>2];if(c){cj(d,c)}c=q[a+8>>2];if(c){cj(d,c)}d=q[b+12>>2];q[a>>2]=q[b+8>>2];q[a+4>>2]=d;d=q[b+28>>2];q[a+16>>2]=q[b+24>>2];q[a+20>>2]=d;d=q[b+20>>2];q[a+8>>2]=q[b+16>>2];q[a+12>>2]=d;d=0;break a}a=q[a>>2];c=q[b+8>>2];if(c){Aj(c)}c=q[b+12>>2];if(c){cj(a,c)}c=q[b+16>>2];if(!c){break a}cj(a,c)}Ii=b+32|0;return d|0}function CM(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{if(b>>>0<3){d=b<<4;b=d&31;g=(d&63)>>>0>=32?2>>>b|0:((1<>>b;d=q[a+4>>2];b=d;e=q[a>>2];if((e|0)!=(b|0)){f=g;h=d-e>>3;b=0;while(1){if(q[e+(b<<3)>>2]==(c|0)){a=e+(b<<3)|0;p[a+4>>1]=f|s[a+4>>1];return}b=b+1|0;if(h>>>0>b>>>0){continue}break}b=e}e=a+4|0;f=q[a+8>>2];if((f|0)==(d|0)){if(o[a+12|0]&1){break b}Wi((d-b>>3)+4|0,8,a,a+8|0,e);f=q[a+8>>2];d=q[a+4>>2]}if((d|0)==(f|0)){break a}q[e>>2]=d+8;q[d>>2]=c;q[d+4>>2]=g&65535;return}J(172817,172823,30,172861);G()}J(172903,172978,493,173004);G()}J(173016,172978,533,173040);G()}function mA(a){var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-48|0;Ii=b;a:{b:{e=a+208|0;if(q[e>>2]){d=a+216|0;if(q[d>>2]){break b}}o[a+296|0]=r[a+296|0]|16;break a}q[b+24>>2]=0;q[b+28>>2]=0;q[b+40>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;kk(b+24|0,d,4);kk(b+24|0,a+212|0,4);d=q[a+232>>2];if(d){g=q[a+228>>2];while(1){f=w(c,96)+g|0;kk(b+24|0,f,8);kk(b+24|0,f+16|0,16);c=c+1|0;if((d|0)!=(c|0)){continue}break}}q[b+16>>2]=q[b+40>>2];c=q[b+36>>2];q[b+8>>2]=q[b+32>>2];q[b+12>>2]=c;c=q[b+28>>2];q[b>>2]=q[b+24>>2];q[b+4>>2]=c;q[a+248>>2]=Rn(b);kk(b+24|0,e,4);q[a+244>>2]=Rn(b+24|0);o[a+296|0]=r[a+296|0]&239}Ii=b+48|0}function hK(a,b){var c=0,d=0,e=0,f=0,g=x(0);a:{b:{d=b&65535;e=q[a+32>>2];if(d>>>0<(q[a+36>>2]-e|0)/592>>>0){if(s[(e+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}c=e+w(d,592)|0;if(s[c+570>>1]!=(b&65535)){break a}c:{if(!(q[c+464>>2]|q[c+468>>2])){break c}c=q[a+48>>2];a=q[a+52>>2]-c|0;if(!a){break c}e=(e+w(d,592)|0)+472|0;a=(a|0)/72|0;d=a>>>0>1?a:1;a=0;while(1){f=c+w(a,72)|0;if(!((e|0)==q[f+4>>2]?q[f>>2]==(b|0):0)){a=a+1|0;if((d|0)!=(a|0)){continue}break c}break}g=u[(c+w(a,72)|0)+28>>2]}return g}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Vw(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,s=0;p=(c|0)<1;q=(e|0)==1;while(1){if(!((d|0)<1|p)){l=(i<<1)+a|0;m=l;k=256;h=0;while(1){a:{if(!q){e=0;while(1){g=r[b+e|0]-i|0;f=g>>31;f=f^f+g;if((f|0)<(k|0)){o[l|0]=e;o[m+1|0]=h;k=f}e=e+1|0;if((e|0)!=(d|0)){continue}break}break a}s=b+h|0;e=0;while(1){j=r[s|0];g=r[b+e|0];n=((j+(g<<1)>>>0)/3|0)-i|0;f=n>>31;j=g-j|0;g=j>>31;f=((w(g^g+j,3)>>>0)/100|0)+(f+n^f)|0;if((f|0)<(k|0)){o[l|0]=e;o[m+1|0]=h;k=f}e=e+1|0;if((e|0)!=(d|0)){continue}break}}h=h+1|0;if((h|0)!=(c|0)){continue}break}}i=i+1|0;if((i|0)!=256){continue}break}}function GK(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{d=a+1|0;b:{if(d>>>0<2){break b}c=a&65535;b=q[75054];if(c>>>0>=t[b+32>>2]){break a}f=q[q[b+24>>2]+(c<<2)>>2];if(!f){break b}e=s[q[b+28>>2]+(c<<1)>>1]==(a>>>16|0)?f:0}Fc(s[e+12>>1],q[e+4>>2]);c:{if(r[q[75054]+156|0]&64){b=K()|0;if(b){break c}}Ni(q[e+4>>2]);d:{if(d>>>0<2){break d}c=a&65535;b=q[75054];if(c>>>0>=t[b+32>>2]){break a}d=q[b+24>>2]+(c<<2)|0;if(!q[d>>2]){break d}c=c<<1;if(s[c+q[b+28>>2]>>1]!=(a>>>16|0)){break d}q[d>>2]=0;p[c+q[b+28>>2]>>1]=0}Ni(e);return}lj(b,91150,2881);J(88669,88575,2881,91150);G()}J(91017,91032,144,91096);G()}function iha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii+ -64|0;Ii=b;f=nj(b+40|0,a,0,65882,869);a:{if((Vi(a,1)|0)==7){c=_i(a,1,q[74078],0);if(c){if(Vo(q[c>>2])){break a}}Qi(a,66244,0)}Nk(a,1,65680);c=0}d=jj(a,2);e=q[c+28>>2];b:{c:{if((d|0)>=1){g=q[c+36>>2];if((d|0)<=(w(e,g)|0)){break c}}if(e){a=q[c+36>>2];q[b+20>>2]=65680;q[b+16>>2]=65665;q[b+24>>2]=w(a,e);a=Kj(f,66273,b+16|0);break b}q[b+4>>2]=65680;q[b>>2]=65665;a=Kj(f,66320,b);break b}e=q[c+20>>2];d=d-1|0;h=(d>>>0)/(g>>>0)|0;Mi[e|0](q[c+16>>2],w(h,q[c+32>>2])+(d-w(g,h)|0)|0,fj(a,3));RB(q[c>>2]);a=0}mj(f);Ii=b- -64|0;return a|0}function nsa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;g=Ii-16|0;Ii=g;a:{b:{c=q[a+3180>>2];e=q[a+3176>>2];d=c-e|0;c:{if(!d){break c}h=d>>2;d=0;while(1){f=d;d=d+1|0;j=d;k=h-1>>>0<=f>>>0;f=(f<<2)+e|0;i=q[f>>2]==(b|0)|i;if(!(k|!(i&1))){if(d>>>0>=h>>>0){break b}q[f>>2]=q[(d<<2)+e>>2];e=q[a+3176>>2];c=q[a+3180>>2]}h=c-e>>2;if(j>>>0>>0){continue}break}if(!(i&1)){break c}if((c|0)==(e|0)){break a}c=c-4|0;q[a+3180>>2]=c}d:{if(q[a+3184>>2]!=(c|0)){q[a+3180>>2]=c+4;q[c>>2]=b;break d}q[g>>2]=c-e>>2;Pi(3,7319,8951,g)}Ii=g+16|0;return}J(12419,9962,479,9454);G()}J(12613,9962,548,12466);G()}function wO(){var a=0,b=0,c=0,d=0;a:{b:{c:{d:{a=q[213139];if((a|0)==q[213140]){if(a>>>0>=4294967040){break d}b=q[213138];d=a+256|0;c=Yi(d<<2);q[213138]=c;c=Ti(c,b,a<<2);q[213139]=d;while(1){q[c+(a<<2)>>2]=a;a=a+1|0;if((d|0)!=(a|0)){continue}break}Ni(b);if(o[852548]&1){break c}Wi((q[213136]-q[213134]>>3)+256|0,8,852536,852544,852540);q[213135]=q[213136]}b=q[213138];if(!b){break b}a=q[213140];if(a>>>0>=t[213139]){break a}q[213140]=a+1;return q[b+(a<<2)>>2]}J(165598,165621,112,165559);G()}J(165458,165533,493,165559);G()}J(165646,165621,151,165653);G()}J(165657,165621,152,165653);G()}function uy(a,b,c,d){var e=0,f=0,g=0;if(!d){return-20352}f=Wm(a+4|0);e=-20096;if(q[a+48>>2]){g=q[a+60>>2]?1:2}else{g=0}a:{if((g|0)==2){if((d|0)!=(f|0)){return-20352}e=MW(b,c,d);if(e){break a}ij(b+12|0);if(q[a>>2]==9){e=dp(b,(d<<3)-1|0,0);if(e){break a}}e=Bk(b+24|0,1);if(e){break a}e=0}if(q[a+48>>2]){a=q[a+60>>2]?1:2}else{a=0}if((a|0)!=1){break a}e=-20096;b:{switch(r[c|0]){case 0:e=-20352;if((d|0)!=1){break a}return wE(b);case 4:break b;default:break a}}e=-20352;if((f<<1|1)!=(d|0)){break a}a=c+1|0;e=pn(b,a,f);if(e){break a}e=pn(b+12|0,a+f|0,f);if(e){break a}e=Bk(b+24|0,1)}return e}function sba(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-32|0;Ii=e;a:{b:{c:{h=c&65535;g=q[b+32>>2];i=(q[b+36>>2]-g|0)/592|0;if(h>>>0>>0){if(s[(w(h,592)+g|0)+568>>1]!=(c>>>16|0)){break c}f=w(h,592)+g|0;if(s[f+570>>1]!=(c&65535)){break b}f=s[f+576>>1];c=0;d:{if((f|0)==65535){break d}if(f>>>0>=i>>>0){break a}c=w(f,592)+g|0}u[e>>2]=u[d>>2];u[e+4>>2]=u[d+4>>2];u[e+8>>2]=u[d+8>>2];PA(e+16|0,b,w(h,592)+g|0,c,e);u[a>>2]=u[e+16>>2];u[a+4>>2]=u[e+20>>2];u[a+8>>2]=u[e+24>>2];Ii=e+32|0;return}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function VY(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{c:{f=q[a+40>>2];b=q[b+96>>2];e=f+w(b,24)|0;g=q[e+4>>2];if(q[g+8>>2]!=6){break c}d=q[g>>2];if(r[d+6|0]){break c}h=q[d+16>>2];if(!h){break c}d:{if((e|0)!=q[a+20>>2]){b=q[(f+w(b,24)|0)+12>>2];break d}d=f+w(b,24)|0;b=q[a+24>>2];q[d+12>>2]=b;d=q[g>>2]}d=My(h,c,(b-q[q[d+16>>2]+12>>2]>>2)-1|0);if(!d){break c}b=q[e>>2];break b}d=0;b=q[e>>2];if((c|0)<1|q[((e|0)==q[a+20>>2]?a+8|0:e+28|0)>>2]-b>>4<(c|0)){break a}d=140752}b=((c<<4)+b|0)-16|0;c=q[b+4>>2];e=q[a+8>>2];q[e>>2]=q[b>>2];q[e+4>>2]=c;q[e+8>>2]=q[b+8>>2];q[a+8>>2]=q[a+8>>2]+16}return d}function jS(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;i=Ii-16|0;Ii=i;q[d>>2]=0;h=q[a>>2];a:{if((h|0)==-1){h=-2;break a}b:{h=Xx(h,b,c,e,f);if((h|0)<=0){while(1){if(!h){h=-2;break a}h=q[240513];c:{if((h|0)==27){break c}if((h|0)!=6){break a}h=q[a>>2];q[i+12>>2]=1;q[i+8>>2]=h;if(v[g>>3]==0){break b}while(1){k=i+8|0;j=Qp(g)*1e3;d:{if(y(j)<2147483648){h=~~j;break d}h=-2147483648}h=Vp(k,1,(h|0)>-1?h:-1);if((h|0)!=-1){if(h){break c}break b}if(q[240513]==27){continue}break}h=q[240513];if(h){break a}}h=Xx(q[a>>2],b,c,e,f);if((h|0)<=0){continue}break}}q[d>>2]=h;h=0;break a}h=-1}Ii=i+16|0;return h}function $G(a,b){var c=0,d=0;a:{b:{if(!(!a|!b)){d=q[b+64>>2];b=q[a+16>>2];if(d>>>0>=q[a+20>>2]-b>>3>>>0){break b}b=q[b+(d<<3)>>2];c=q[a>>2];if(b>>>0>=q[a+4>>2]-c>>2>>>0){break b}b=q[c+(b<<2)>>2];if(o[b+124|0]&1){break a}Wi(0,176,b+112|0,b+120|0,b+116|0);if(o[b+156|0]&1){break a}Wi(0,48,b+144|0,b+152|0,b+148|0);c:{if(o[b+156|0]&1){break c}c=q[b+144>>2];if(!c){break c}Ni(c)}d:{if(o[b+140|0]&1){break d}c=q[b+128>>2];if(!c){break d}Ni(c)}e:{if(o[b+124|0]&1){break e}c=q[b+112>>2];if(!c){break e}Ni(c)}Ni(b);r9(a,d)}return}J(152576,152587,479,152554);G()}J(152643,152587,493,152718);G()}function iK(a,b){var c=0,d=0,e=0,f=x(0);a:{b:{d=b&65535;c=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(c-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}c=a+w(d,592)|0;if(s[c+570>>1]!=(b&65535)){break a}b=0;c:{if(q[c+436>>2]!=2){break c}a=a+w(d,592)|0;e=q[a+452>>2];if(!e){break c}c=q[a+440>>2];d=c&8191;c=(c>>>13&8191)-d|0;f=x(u[a+472>>2]*x(c|0));d:{if(x(y(f))=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break c}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break c}d:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break c;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break c;case 0:c=a+72|0;break c;default:break d}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}b=c;if(q[b+8>>2]==3){break b}b=Qu(b,d);if(b){break b}a=0;break a}e=v[b>>3];if(y(e)<2147483648){a=~~e;break a}a=-2147483648}Ii=d+16|0;return a}function DB(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Ii-32|0;Ii=d;a:{b:{f=q[b+84>>2];e=q[f+4>>2];c:{if(!e){c=1;break c}while(1){h=q[f>>2]+w(g,96)|0;c=q[h+16>>2];if(!c){break b}i=q[c+100>>2];k=((i&65536)>>>16|0)+j|0;if(k>>>0>t[b+152>>2]){break a}l=q[c+40>>2];if(l){e=q[a+8>>2];q[d+12>>2]=b;q[d+8>>2]=e;q[d+16>>2]=q[((q[h+20>>2]<<2)+a|0)+12>>2];c=q[c+16>>2];q[d+24>>2]=((j<<2)+b|0)+156&i<<15>>31;q[d+20>>2]=c;if(Mi[l|0](d+8|0)|0){c=0;break c}e=q[f+4>>2]}c=1;j=k;g=g+1|0;if(g>>>0>>0){continue}break}}Ii=d+32|0;return c}J(8003,7192,1794,12025);G()}J(8018,7192,1801,12025);G()}function hba(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{e=b&65535;f=q[a+32>>2];if(e>>>0<(q[a+36>>2]-f|0)/592>>>0){if(s[(f+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}d=f+w(e,592)|0;if(s[d+570>>1]!=(b&65535)){break a}c:{if(!(q[d+464>>2]|q[d+468>>2])){break c}d=q[a+48>>2];a=q[a+52>>2]-d|0;if(!a){break c}f=(f+w(e,592)|0)+472|0;a=(a|0)/72|0;e=a>>>0>1?a:1;a=0;while(1){g=d+w(a,72)|0;if(!((f|0)==q[g+4>>2]?q[g>>2]==(b|0):0)){a=a+1|0;if((e|0)!=(a|0)){continue}break c}break}u[(d+w(a,72)|0)+28>>2]=c}return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function bR(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;q[d>>2]=0;a:{if(r[a+181|0]!=3){break a}h=b+16384|0;b=6;i=c>>>0>h>>>0;g=q[a+96>>2];f=q[g>>2];if(f){a=g;while(1){b=e;e=b+4|0;j=q[a+4>>2];a=a+4|0;if(j){continue}break}b=b+10|0}if(i|b>>>0>h-c>>>0){break a}a=0;if(f){b=c+6|0;while(1){h=a+b|0;e=f-3|0;b:{if(e>>>0<=5){e=e+1&255;break b}e=0}o[h|0]=e;o[b+(a|1)|0]=3;f=b+(a|2)|0;e=q[g>>2]-3|0;c:{if(e>>>0<=5){e=e+1&255;break c}e=0}o[f|0]=e;o[b+(a|3)|0]=1;a=a+4|0;f=q[g+4>>2];g=g+4|0;if(f){continue}break}}o[c+5|0]=a;o[c|0]=0;o[c+1|0]=13;b=a>>>8|0;o[c+4|0]=b;o[c+3|0]=a|2;o[c+2|0]=b;q[d>>2]=a+6}}function Sba(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;d=Ii-32|0;Ii=d;a:{b=tj(a,1,d+28|0);c=q[b+412>>2];b:{if(c&262144){Pi(3,202556,202560,0);break b}if(c&268435456){break b}c=Om(a,2);c:{if(c){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(d,j,q[d+28>>2],4);e=u[c>>2];f=u[d+12>>2];g=u[c+8>>2];h=u[c+4>>2];break c}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+64>>2]=e;u[b+76>>2]=f;u[b+72>>2]=g;u[b+68>>2]=h;q[b+412>>2]=q[b+412>>2]|4194304}Ii=d+32|0;return 0}J(202212,202233,187,202255);G()}function ata(){var a=0,b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;a=q[71906];q[b+12>>2]=a;Ui(q[71907],255,q[71908]<<2);q[71912]=-1;q[71913]=0;c=q[71909];q[71910]=c;a:{if(!a){break a}while(1){if(q[71911]-c>>4==(d|0)){hJ(287628,587,d+128|0);a=q[b+12>>2]}e=Oi(q[a+4>>2]);c=Li;a=q[71908];b:{c:{if(!a){break c}a=q[q[71907]+(Cza(e,c,a)<<2)>>2];if((a|0)==-1){break c}d=q[71909];while(1){a=d+(a<<4)|0;if(q[a>>2]==(e|0)&q[a+4>>2]==(c|0)){break b}a=q[a+12>>2];if((a|0)!=-1){continue}break}}iJ(287628,e,c,b+12|0)}a=q[q[b+12>>2]+28>>2];q[b+12>>2]=a;if(!a){break a}c=q[71909];d=q[71913];continue}}Ii=b+16|0}function WN(a,b,c,d,e,f,g,h){var i=0,j=0,k=0,l=0,m=0,n=0;f=f<<2|f>>>4;i=c<<2|c>>>4;c=f-i|0;e=e<<3|e>>>2;j=b<<3|b>>>2;b=e-j|0;g=g<<3|g>>>2;k=d<<3|d>>>2;d=g-k|0;l=(w(c,(i+(f<<1)>>>0)/3|0)+w(b,(j+(e<<1)>>>0)/3|0)|0)+w(d,((g<<1)+k>>>0)/3|0)|0;m=(w(c,(f+(i<<1)>>>0)/3|0)+w(b,(e+(j<<1)>>>0)/3|0)|0)+w(d,(g+(k<<1)>>>0)/3|0)|0;n=l+m|0;g=((w(c,f)+w(b,e)|0)+w(d,g)|0)+l|0;i=((w(c,i)+w(b,j)|0)+w(d,k)|0)+m|0;f=0;while(1){e=(f<<2)+a|0;e=(w(c,r[e+1|0])+w(r[e|0],b)|0)+w(d,r[e+2|0])<<1;o[f+h|0]=r[((((e|0)<=(i|0))+((e|0)<(n|0))|0)+((e|0)<(g|0))|0)+107888|0];f=f+1|0;if((f|0)!=16){continue}break}}function CL(a){var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[a+4>>2];if(d){b=q[a+116>>2];if(b){Mi[q[74944]](b);q[a+116>>2]=0}e=a+112|0;b=q[a+112>>2];if(b){Mi[q[74957]](b);q[e>>2]=0}b=0;a:{b:{switch(q[q[a>>2]+16>>2]-1|0){case 4:b=2;break a;default:J(62472,62201,77,62506);G();case 0:break a;case 3:break b}}b=1}q[a+120>>2]=b;c:{if(!DL(d,e)){Pi(4,62262,62381,0);a=0;break c}q[c+12>>2]=0;q[c+8>>2]=0;b=Wo(q[d+4>>2],c+12|0,c+8|0);d:{if(b){Pi(4,62262,62439,0);break d}q[a+116>>2]=Mi[q[74943]](q[74072],w(q[d+20>>2],q[d+16>>2]),q[c+12>>2],0)}a=!b}Ii=c+16|0;return a}J(62378,62201,144,62364);G()}function ppa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=$i(32);q[c>>2]=0;q[c+4>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;b=c+8|0;q[b>>2]=0;q[b+4>>2]=0;d=q[a+16>>2];e=q[q[a>>2]+4>>2];d=d>>>0>>0?d:e;Wi(d,128,c,b,c+4|0);a:{e=q[b>>2];b=q[c>>2];if(d>>>0<=e-b>>7>>>0){e=d<<7;q[c+4>>2]=e+b;Ui(b,0,e);b=q[c+20>>2];if(d>>>0>>0){break a}e=q[c+16>>2];f=Yi(d<<2);q[c+16>>2]=f;f=Ti(f,e,b<<2);q[c+20>>2]=d;if(b>>>0>>0){while(1){q[f+(b<<2)>>2]=b;b=b+1|0;if((d|0)!=(b|0)){continue}break}}Ni(e);q[q[a+12>>2]>>2]=c;return 0}J(36725,36646,506,36744);G()}J(36752,36775,112,36713);G()}function eB(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=Ii-32|0;Ii=e;d=q[q[a>>2]+4>>2];if(d){b=d?q[d>>2]:0;g=nj(e+8|0,b,0,82047,82);if(ov(d)){f=q[a+4>>2];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=f>>>0;q[b+8>>2]=q[b+8>>2]+16;vj(b,0,0);f=q[a+8>>2];c=q[a+4>>2];Xi(b,82347);a:{if((c|0)==2){c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=f|0;q[b+8>>2]=q[b+8>>2]+16;break a}c=q[b+8>>2];q[c+8>>2]=0;q[b+8>>2]=c+16}Ij(b,-3);c=q[a+12>>2];a=q[a+4>>2];Xi(b,82353);b:{if((a|0)==2){a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;break b}a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16}Ij(b,-3);Pm(b,3,0);rz(d)}mj(g)}Ii=e+32|0}function Wqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;c=q[a+4>>2];f=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[56902],d+12|0)){b=$i(24);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;f=zM(q[a>>2],c,q[d+12>>2],b,q[a+16>>2]);a:{if(!f){c=q[a+32>>2];a=q[c+8>>2];e=q[a+4>>2];g=q[a>>2];q[a>>2]=q[b>>2];q[a+4>>2]=q[b+4>>2];q[b>>2]=g;q[b+4>>2]=e;q[c+12>>2]=b;break a}c=q[a>>2];if(q[b+4>>2]){a=0;while(1){e=q[b>>2]+w(a,96)|0;cj(c,q[e+24>>2]);um(q[e+88>>2]);a=a+1|0;if(a>>>0>2]){continue}break}}Dp(c,b+8|0);wB(b);Ni(b)}Aj(q[d+12>>2])}Ii=d+16|0;return f|0}function oU(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;Oza(+a);c=Lza(1)|0;g=Lza(0)|0;h=c;d=c>>>20&2047;c=d-1023|0;a:{b:{if(d>>>0>=1075){v[b>>3]=a;if((c|0)==1024?h&1048575|g:0){break b}break a}if(d>>>0<=1022){q[b>>2]=0;q[b+4>>2]=h&-2147483648;return a}d=h;f=g;e=c&31;if((c&63)>>>0>=32){d=f<>>32-e|d<>3]=a;break a}e=c&31;f=b;if((c&63)>>>0>=32){d=-1;c=-1048576>>e}else{d=-1048576>>e;c=((1<>2]=c;g=b;b=d&h;q[g+4>>2]=b;Mza(0,c|0);Mza(1,b|0);a=a- +Nza()}return a}Mza(0,0);Mza(1,h&-2147483648);return+Nza()}function m4(a){a=a|0;var b=0,c=0,d=0;b=Ck(a,1,q[210439]);c=Ck(a,2,q[210439]);a:{if(!b|!c|(u[b>>2]!=u[c>>2]|u[b+16>>2]!=u[c+16>>2])){break a}if(u[b+32>>2]!=u[c+32>>2]|u[b+48>>2]!=u[c+48>>2]|(u[b+4>>2]!=u[c+4>>2]|u[b+20>>2]!=u[c+20>>2])){break a}if(u[b+36>>2]!=u[c+36>>2]|u[b+52>>2]!=u[c+52>>2]|(u[b+8>>2]!=u[c+8>>2]|u[b+24>>2]!=u[c+24>>2])){break a}if(u[b+40>>2]!=u[c+40>>2]|u[b+56>>2]!=u[c+56>>2]|(u[b+12>>2]!=u[c+12>>2]|u[b+28>>2]!=u[c+28>>2])){break a}if(u[b+44>>2]!=u[c+44>>2]){break a}d=u[b+60>>2]==u[c+60>>2]}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;return 1}function wua(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{g=a+28|0;d=a+112|0;if(_j(g,d)){d=wk(d,g);if(d){break a}d=Bk(a+88|0,1);if(d){break a}d=Bk(a+100|0,1);if(d){break a}return 0}e=a+88|0;if(!Jj(e,1)){f=a+4|0;while(1){d=$n(e,Wm(f),b,c);if(d){break a}while(1){if((_j(e,f)|0)>=0){d=kl(e,1);if(!d){continue}break a}break}if((h|0)==11){return-14}h=h+1|0;if((Jj(e,1)|0)<1){continue}break}b=a+100|0;d=Co(b,e,f);if(d){break a}d=Do(b,b,g,f,a+76|0);break a}d=Wk(e,e,e);if(d){break a}b=a+4|0;d=gl(e,e,b);if(d){break a}a=a+100|0;d=Wk(a,a,a);if(d){break a}d=gl(a,a,b);if(d){break a}return 0}return d}function sn(a,b){var c=0,d=0,e=0;e=b+6|0;d=q[a+32>>2];a:{if(b+7>>>0<=268435455){c=Cj(a,d,q[a+44>>2]<<4,e<<4);break a}c=mk(a)}q[a+44>>2]=e;q[a+32>>2]=c;q[a+28>>2]=c+(b<<4);q[a+8>>2]=c+(q[a+8>>2]-d|0);b=q[a+104>>2];b:{if(!b){break b}q[b+8>>2]=c+(q[b+8>>2]-d|0);b=q[b>>2];if(!b){break b}while(1){q[b+8>>2]=q[a+32>>2]+(q[b+8>>2]-d|0);b=q[b>>2];if(b){continue}break}}c=q[a+32>>2];b=q[a+40>>2];e=q[a+20>>2];if(b>>>0<=e>>>0){while(1){q[b+8>>2]=c+(q[b+8>>2]-d|0);q[b>>2]=c+(q[b>>2]-d|0);q[b+4>>2]=c+(q[b+4>>2]-d|0);b=b+24|0;if(e>>>0>=b>>>0){continue}break}}q[a+12>>2]=c+(q[a+12>>2]-d|0)}function aG(a,b,c,d){var e=0,f=0,g=0;e=Ii-16448|0;Ii=e;q[e+16432>>2]=0;q[e+16424>>2]=0;q[e+16428>>2]=0;q[e+16392>>2]=0;q[e+16396>>2]=0;a:{b:{f=$_(e+16392|0);g=f+6|0;if(g>>>0<=8){if((g|0)!=6){break a}q[e+16392>>2]=a;q[e+16396>>2]=b;while(1){q[e+16408>>2]=16384;q[e+16404>>2]=e;a=a$(e+16392|0);if((a|0)==-2){break b}if(!((a|0)!=2?(a|0)>=0:0)){Sy(e+16392|0);f=-3;break a}if(!(Mi[d|0](c,e,16384-q[e+16408>>2]|0)|0)){Sy(e+16392|0);f=-1;break a}if(!q[e+16408>>2]){continue}break}f=(a|0)==1?0:-3;Sy(e+16392|0);break a}f=-1e3;break a}J(184717,184739,67,184760);G()}Ii=e+16448|0;return f}function TD(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;q[d+24>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;if((Vi(a,3)|0)!=5){hC(a,q[64213])}Xi(a,137409);ik(a,3);if(!uk(a,-1)){dk(a,3,137419)}if(!FF(10,uj(a,-1,0),d+8|0)){dk(a,3,137453)}Xi(a,137484);ik(a,3);a:{if(!Vi(a,-1)){break a}if(Oj(a,-1)){e=Mj(a,-1);if(e<4294967296&e>=0){q[d+24>>2]=~~e>>>0;break a}q[d+24>>2]=0;break a}dk(a,-1,137559)}b:{if((Ol(q[b>>2],41,c,d+8|0,20)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=d+32|0;return a}function Pt(a){var b=0,c=0,d=0,e=0;a:{if(a){b:{c:{if(a+1>>>0<2){break c}d=a&65535;b=q[210908];if(d>>>0>=t[b+8>>2]){break a}e=q[b>>2]+(d<<2)|0;c=q[e>>2];if(!c|s[q[b+4>>2]+(d<<1)>>1]!=(a>>>16|0)){break c}if(!Ej(q[c>>2]+w(q[c+24>>2],q[c+28>>2])|0,154272,16)){break b}}Pi(4,154138,154288,0);return}a=0;q[e>>2]=0;p[q[b+4>>2]+(d<<1)>>1]=0;b=q[c+12>>2];d=q[c+8>>2];if((b|0)!=(d|0)){b=d;while(1){b=q[(a<<2)+b>>2];Ni(q[b+12>>2]);Ni(b);a=a+1|0;b=q[c+8>>2];if(a>>>0>2]-b>>2>>>0){continue}break}}q[c+12>>2]=b;if(!(!b|o[c+20|0]&1)){Ni(b)}Ni(c)}return}J(154349,154364,144,154402);G()}function MG(a){var b=0,c=0,d=0;b=Ii-32|0;Ii=b;a:{b:{if(a){c=q[a+120>>2];d=q[c+8>>2]-q[c+12>>2]>>4;if((d|0)<=-1){break b}rj(c,-1e4,q[a+124>>2]);c:{if((Vi(c,-1)|0)!=5){Ri(c,-3);a=q[c+8>>2];q[a+8>>2]=0;q[c+8>>2]=a+16;break c}xk(c,-2);ik(c,-2);ll(c,-2)}a=q[c+8>>2]-q[c+12>>2]>>4;if((a|0)!=(d|0)){break a}Ii=b+32|0;return}J(123088,122672,955,123149);G()}q[b+12>>2]=d;q[b+4>>2]=958;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=d;q[b+20>>2]=958;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function Kx(a){var b=0,c=0,d=0;b=q[a+84>>2];if(b){ms(b)}b=q[a+64>>2];if(b){ns(b)}if(q[a+68>>2]){ly(a)}d=q[a+84>>2];if(!d){d=bk(1,212);q[a+84>>2]=d}c=q[a+64>>2];if(!c){c=bk(1,128);q[a+64>>2]=c}a:{b:{c:{b=q[a+68>>2];if(b){break c}b=bk(1,2280);q[a+68>>2]=b;if(b){break c}b=0;break b}if(!d){break b}if(c){break a}}Ni(b);Ni(q[a+84>>2]);Ni(q[a+64>>2]);q[a+84>>2]=0;q[a+64>>2]=0;q[a+68>>2]=0;return-32512}qx(c);BV(q[a+84>>2]);OR(q[a+68>>2]);b=q[a>>2];if(r[b+184|0]&2){c=q[a+68>>2];q[c+512>>2]=q[a+76>>2];o[c+492|0]=r[b+184|0]<<1&2;b=q[a+92>>2];if(b){Mi[b|0](q[a+88>>2],0,0)}}return 0}function i8(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=Ii-48|0;Ii=c;i=q[a+8>>2]-q[a+12>>2]>>4;b=qj(a,1);d=q[b+8>>2];e=q[b+12>>2];b=q[b>>2];a:{if(!Oj(a,2)){q[c>>2]=aj(d,e);b=Qi(a,120256,c);break a}f=hl(a,2);if((f|0)<=0){b=aj(d,e);q[c+20>>2]=f;q[c+16>>2]=b;b=Qi(a,120301,c+16|0);break a}g=f-1|0;j=b;k=d;l=e;b:{if(at(a,3)){g=g<<2;m=9;b=4;h=Ym(a,3);break b}b=1;h=rm(a,3)}if(Wz(j,k,l,h,b,g,m)){b=aj(d,e);q[c+36>>2]=f;q[c+32>>2]=b;b=Qi(a,120352,c+32|0);break a}b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(i|0)){break a}J(115568,115465,306,120690);G()}Ii=c+48|0;return b|0}function JL(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;Ui(c+8|0,0,96);a:{d=ak(a,q[b+12>>2],c+4|0);if(d){break a}d=ak(a,q[b+16>>2],c);if(d){break a}b:{e=q[b+52>>2];if(e){h=q[b+48>>2];d=0;while(1){f=w(d,48)+h|0;g=q[f+32>>2];if(r[g|0]){i=q[f+44>>2];e=(d<<3)+c|0;q[e+40>>2]=q[f+40>>2];q[e+44>>2]=i;e=ak(a,g,((d<<2)+c|0)+8|0);if(e){break b}e=q[b+52>>2]}d=d+1|0;if(e>>>0>d>>>0){continue}break}}return 0}b=q[c>>2];if(b){cj(a,b)}q[c>>2]=0;b=q[c+4>>2];if(b){cj(a,b)}q[c+4>>2]=0;hw(a,c+8|0);return e}b=q[c>>2];if(b){cj(a,b)}q[c>>2]=0;b=q[c+4>>2];if(b){cj(a,b)}q[c+4>>2]=0;hw(a,c+8|0);return d}function v9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=(c|0)/240|0;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-240){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if((q[a+8>>2]-f|0)/240>>>0>>0){break a}q[a+4>>2]=w(b,240)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(53716,53631,479,53341);G()}J(54240,53631,506,54259);G()}function fU(a,b){var c=0,d=0,e=0;c=q[a+52>>2];d=Ly(c);q[b>>2]=d;e=q[a+48>>2];q[b+16>>2]=c;q[b+12>>2]=a;q[b+8>>2]=e;q[a+48>>2]=b;q[b+28>>2]=-1;q[b+32>>2]=-1;q[b+20>>2]=0;q[b+24>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;o[b+43|0]=0;o[b+44|0]=0;o[b+45|0]=0;o[b+46|0]=0;o[b+47|0]=0;o[b+48|0]=0;o[b+49|0]=0;o[b+50|0]=0;a=q[a+64>>2];o[d+75|0]=2;q[d+32>>2]=a;a=lp(c,0,0);q[b+4>>2]=a;b=q[c+8>>2];q[b+8>>2]=5;q[b>>2]=a;b=q[c+8>>2];if((q[c+28>>2]-b|0)<=16){Mk(c,1);b=q[c+8>>2]}q[c+8>>2]=b+16;q[b+24>>2]=9;q[b+16>>2]=d;b=c;a=q[b+8>>2];if((q[b+28>>2]-a|0)<=16){Mk(c,1);a=q[c+8>>2]}q[b+8>>2]=a+16}function up(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{b:{f=(c-b|0)/48|0;g=q[a+2112>>2];e=q[a+2108>>2];if((f|0)<=g-e>>2){d=q[a+2044>>2];if(d>>>0>>0){break b}if(c>>>0>>0){d=q[a+2040>>2];if((q[a+2048>>2]-d|0)/48>>>0<(c-d|0)/48>>>0){break a}q[a+2044>>2]=c}if((b|0)!=(c|0)){h=q[a+2040>>2];d=e;while(1){q[d>>2]=(b-h|0)/48;d=d+4|0;b=b+48|0;if((c|0)!=(b|0)){continue}break}c=q[a+2104>>2];b=(e-c>>2)+f|0;if(b>>>0>g-c>>2>>>0){break a}q[a+2124>>2]=q[a+2120>>2];q[a+2108>>2]=c+(b<<2)}return}J(114677,114567,220,114754);G()}J(114771,114567,221,114754);G()}J(115295,115168,506,115314);G()}function pp(a,b,c){var d=0,e=0,f=x(0);d=Ii-16|0;Ii=d;e=r[a+60|0]&4;a:{b:{c:{switch(b|0){case 0:f=x(B(u[c>>2],x(0)));if(!e){q[a+16>>2]=0;u[a+20>>2]=f}u[a+24>>2]=f;a=0;break b;case 1:f=x(x(x(B(x(A(u[c>>2],x(1))),x(-1)))+x(1))*x(.5));if(!e){q[a+28>>2]=0;u[a+32>>2]=f}u[a+36>>2]=f;a=0;break b;case 2:u[a+40>>2]=B(x(A(u[c>>2],x(5))),x(0));a=0;break b;default:break c}}e=q[239672];c=q[e+48>>2];a=s[a+58>>1];if(a>>>0>=q[e+52>>2]-c>>5>>>0){break a}a=c+(a<<5)|0;q[d+4>>2]=aj(q[a>>2],q[a+4>>2]);q[d>>2]=b;Pi(4,209937,210413,d);a=-6}Ii=d+16|0;return a}J(211004,210835,479,211015);G()}function YJ(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0;l=Ii-32|0;Ii=l;j=l+16|0;q[j>>2]=0;q[j+4>>2]=0;q[j+8>>2]=0;q[j+12>>2]=0;if(cea(b,e,c,d,f,g,h,i,j)){q[l>>2]=aj(c,d);Qi(a,206816,l)}vj(a,0,4);bj(a,206955,5);k=+u[j>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=k;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,206961,6);k=+u[j+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=k;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,206968,10);k=+u[j+8>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=k;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);bj(a,206979,11);k=+u[j+12>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=k;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);Ii=l+32|0}function Zta(a){var b=0,c=0,d=0,e=0;e=q[a+28>>2];Gj(e);a:{c=q[a+12>>2];b=q[a+8>>2];d=c-b|0;if(!d){break a}if((b|0)!=(c|0)){d=d>>6;c=0;while(1){b=(c<<6)+b|0;if(q[b+48>>2]==1){ht(q[b+40>>2]);Cm(q[b+44>>2]);q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+40>>2]=0;q[b+44>>2]=-1;q[b+48>>2]=0}c=c+1|0;if((d|0)==(c|0)){break a}b=q[a+8>>2];if(q[a+12>>2]-b>>6>>>0>c>>>0){continue}break}}J(167814,167666,479,167825);G()}o[a+32|0]=r[a+32|0]|1;Bj(e)}function kn(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=10;a:{b:{if(q[b+4>>2]){c=q[a+20>>2];if(c>>>0<16){break b}e=q[a+16>>2];break a}J(106755,106647,447,106778);G()}f=q[a+4>>2];h=q[a+12>>2];while(1){e=0;if(f>>>0>>0){g=f+1|0;q[a+4>>2]=g;e=r[f|0];f=g}g=c+8|0;q[a+20>>2]=g;e=q[a+16>>2]|e<>2]=e;i=c>>>0<8;c=g;if(i){continue}break}}c=q[Wva(b+12|0,e&1023)>>2];c:{if((c|0)<=-1){b=b+24|0;while(1){f=q[a+16>>2]>>>d|0;d=d+1|0;c=p[Tva(b,(f&1)+(c^-1)|0)>>1];if((c|0)<0){continue}break}break c}d=c>>>16|0;c=c&65535}q[a+16>>2]=q[a+16>>2]>>>d;q[a+20>>2]=q[a+20>>2]-d;return c}function Exa(a){var b=0,c=0,d=0,e=0,f=0,g=0;Oza(+a);b=Lza(1)|0;f=Lza(0)|0;d=b;a:{b=b&2147483647;if(b>>>0>=1072693248){if(!(b-1072693248|f)){break a}return 0/(a-a)}b:{if(b>>>0<=1071644671){e=1.5707963267948966;if(b>>>0<1012924417){break b}return 6.123233995736766e-17-hu(a*a)*a-a+1.5707963267948966}if((d|0)<-1?1:(d|0)<=-1){a=(a+1)*.5;c=F(a);a=1.5707963267948966-(c+(c*hu(a)+ -6.123233995736766e-17));return a+a}a=(1-a)*.5;c=F(a);g=c*hu(a);e=a;Oza(+c);d=Lza(1)|0;Lza(0)|0;Mza(0,0);Mza(1,d|0);a=+Nza();a=g+(e-a*a)/(c+a)+a;e=a+a}return e}return(d|0)>-1?0:3.141592653589793}function wea(a,b){var c=0,d=0,e=0;a:{b:{c:{c=q[a+36>>2];a=q[a+32>>2];e=(c-a|0)/592|0;c=b&65535;if(e>>>0>c>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break c}c=a+w(c,592)|0;if(s[c+570>>1]!=(b&65535)){break b}b=s[c+574>>1];if((b|0)!=65535){while(1){c=b&65535;if(c>>>0>=e>>>0){break a}d=a+w(c,592)|0;b=s[d+574>>1];d:{if(o[d+588|0]&1){break d}d=s[d+570>>1];if((d|0)==65535){break d}return d|s[(a+w(c,592)|0)+568>>1]<<16}if((b&65535)!=65535){continue}break}}return 0}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function p0(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-32|0;Ii=e;h=a+4|0;i=q[a+88>>2]+7>>>3|0;q[e+24>>2]=0;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;a:{b:{while(1){f=$n(e+16|0,i,c,d);if(f){break b}while(1){if((_j(e+16|0,h)|0)>=0){f=kl(e+16|0,1);if(!f){continue}break b}break}if((g|0)==11){f=-19712;break a}g=g+1|0;if((Jj(e+16|0,1)|0)<1){continue}break}c=b+24|0;f=ck(a,c,c,e+16|0);if(f){break b}f=ck(a,e,e+16|0,e+16|0);if(f){break b}f=ck(a,b,b,e);if(f){break b}f=ck(a,e,e,e+16|0);if(f){break b}c=a;a=b+12|0;f=ck(c,a,a,e)}ij(e+16|0);ij(e)}Ii=e+32|0;return f}function noa(a){a=a|0;var b=0,c=0,d=0;a:{b=q[a+4>>2];c=q[b+4>>2];d=q[b>>2];a=c-d|0;if(!a){break a}if((c|0)!=(d|0)){c=d-c|0;c=((a|0)<(c|0)?c:a)>>>8|0;a=(a|0)>-1?a:-1;a=w(c,(a|0)<1?a:1);c=a>>>0>1?a:1;a=0;while(1){d=(a<<8)+d|0;if(r[d+246|0]&4){Ni(q[d+240>>2])}a=a+1|0;if((c|0)==(a|0)){break a}d=q[b>>2];if(q[b+4>>2]-d>>8>>>0>a>>>0){continue}break}}J(57189,57106,479,57200);G()}b:{if(o[b+44|0]&1){break b}a=q[b+32>>2];if(!a){break b}Ni(a)}c:{if(o[b+28|0]&1){break c}a=q[b+16>>2];if(!a){break c}Ni(a)}d:{if(o[b+12|0]&1){break d}a=q[b>>2];if(!a){break d}Ni(a)}Ni(b);return 0}function hX(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-176|0;Ii=c;d=-20352;e=q[a>>2];a:{if(!e|(e|0)!=q[b>>2]){break a}e=b+136|0;if(_j(a+136|0,e)){break a}f=b+148|0;if(_j(a+148|0,f)){break a}g=a+160|0;a=b+160|0;if(_j(g,a)){break a}q[c+144>>2]=0;q[c+136>>2]=1;q[c+140>>2]=0;q[c+156>>2]=0;q[c+148>>2]=1;q[c+152>>2]=0;q[c+168>>2]=0;q[c+160>>2]=1;q[c+164>>2]=0;Fs(c+8|0);BE(c+8|0,b);d=Es(c+8|0,c+136|0,b+124|0,b+40|0,0,0);b:{if(d){break b}c:{if(_j(c+136|0,e)){break c}if(_j(c+148|0,f)){break c}if(_j(c+160|0,a)){break c}d=0;break b}d=-20352}nm(c+136|0);bo(c+8|0)}Ii=c+176|0;return d}function Zm(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-48|0;Ii=c;gj(a);d=_i(a,-1,q[71661],18049);Ri(a,-2);e=q[d+4>>2];a:{if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){break a}if(!Vi(a,b)){break a}q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;Gk(a,b,c+16|0,0);d=q[q[q[d+4>>2]+80>>2]+8>>2];b:{if(!d){break b}d=q[d>>2];if(!d){break b}f=q[d+3216>>2];g=q[d+3220>>2]}if((f|0)!=q[c+16>>2]|(g|0)!=q[c+20>>2]){Qi(a,14557,0)}e=jn(q[q[e+80>>2]+8>>2],q[c+32>>2],q[c+36>>2]);if(e){break a}e=0;q[c>>2]=uj(a,b,0);Qi(a,14627,c)}Ii=c+48|0;return e}function Br(a,b){var c=0,d=0,e=0;a:{c=s[b+572>>1];if((c|0)!=65535){e=q[a+32>>2];if(c>>>0>=(q[a+36>>2]-e|0)/592>>>0){break a}p[(e+w(c,592)|0)+574>>1]=s[b+574>>1]}e=s[b+574>>1];if((e|0)!=65535){d=q[a+32>>2];if(e>>>0>=(q[a+36>>2]-d|0)/592>>>0){break a}p[(d+w(e,592)|0)+572>>1]=c}c=s[b+576>>1];b:{if((c|0)!=65535){d=q[a+36>>2];a=q[a+32>>2];if(c>>>0>=(d-a|0)/592>>>0){break a}a=a+w(c,592)|0;c=a+580|0;a=a+578|0;break b}c=a+382|0;a=a+380|0}d=s[b+570>>1];if((d|0)==s[a>>1]){p[a>>1]=e;d=s[b+570>>1]}if((d|0)==s[c>>1]){p[c>>1]=s[b+572>>1]}return}J(201665,201514,479,201676);G()}function B3(a){var b=0,c=0,d=0;b=Ii-32|0;Ii=b;a:{b:{c:{if(a){c=q[a+120>>2];d=q[c+8>>2]-q[c+12>>2]>>4;if((d|0)<=1){break c}rj(c,-1e4,q[a+124>>2]);if((Vi(c,-1)|0)!=5){break b}xk(c,-3);pj(c,-3);Ri(c,-2);a=d-2|0;c=q[c+8>>2]-q[c+12>>2]>>4;if((a|0)!=(c|0)){break a}Ii=b+32|0;return}J(123088,122672,930,123103);G()}q[b+12>>2]=d;q[b+4>>2]=933;q[b+8>>2]=-2;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}J(123119,122672,940,123103);G()}q[b+28>>2]=c;q[b+24>>2]=a;q[b+20>>2]=933;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function s4(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=x(0),h=0,i=0,j=0,k=0;d=Ii-16|0;Ii=d;h=fj(a,1);i=fj(a,2);j=fj(a,3);k=fj(a,4);e=x(j);if(e==x(0)){Ms(a,1);q[d>>2]=uj(a,-1,0);Pi(3,135828,135835,d)}c=WC(x(x(x(h)*x(-.5))+x(1.5707963705062866)));b=yj(a,64);q[b+4>>2]=0;q[b+8>>2]=0;u[b>>2]=c/x(i);q[b+24>>2]=0;q[b+28>>2]=0;u[b+20>>2]=c;q[b+60>>2]=0;c=x(k);f=x(x(1)/x(e-c));g=x(x(e*c)*f);u[b+56>>2]=g+g;q[b+52>>2]=0;q[b+44>>2]=-1082130432;q[b+48>>2]=0;u[b+40>>2]=x(e+c)*f;q[b+12>>2]=0;q[b+16>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;Zi(a,-1e4,134048);xj(a,-2);Ii=d+16|0;return 1}function dZ(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=Ii+ -64|0;Ii=e;a:{b:{c:{f=r[d|0];switch(f-61|0){case 1:case 2:break a;case 0:case 3:break b;default:break c}}if((f|0)!=27){break a}d=142842;break a}d=d+1|0}q[e+32>>2]=c;q[e+28>>2]=b;q[e+24>>2]=a;q[e+36>>2]=d;q[e+56>>2]=67174481;q[e+60>>2]=525316;q[e+52>>2]=1635077147;if(cl(b,e+40|0,12)){q[e+16>>2]=d;q[e+20>>2]=142870;oj(a,142885,e+16|0);Nj(q[e+24>>2],3)}if(Ej(e+52|0,e+40|0,12)){q[e>>2]=q[e+36>>2];q[e+4>>2]=142859;oj(q[e+24>>2],142885,e);Nj(q[e+24>>2],3)}a=KO(e+24|0,Yj(a,142856,2));Ii=e- -64|0;return a|0}function __(a){var b=0,c=0,d=0;d=-2;a:{if(!a){break a}b=q[a+28>>2];if(!b){break a}c=q[b+52>>2];b:{if(!(q[b+36>>2]!=15?c:0)){q[b+36>>2]=15;q[b+8>>2]=3;break b}Mi[q[a+36>>2]](q[a+40>>2],c);q[b+52>>2]=0;c=q[a+28>>2];q[b+36>>2]=15;q[b+8>>2]=3;b=c;if(!b){break a}}d=0;q[b+48>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+28>>2]=0;q[a+8>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;c=q[b+8>>2];if(c){q[a+48>>2]=c&1}q[b+56>>2]=0;q[b+60>>2]=0;q[b+32>>2]=0;q[b+20>>2]=32768;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+7104>>2]=1;q[b+7108>>2]=-1;a=b+1328|0;q[b+108>>2]=a;q[b+80>>2]=a;q[b+76>>2]=a}return d}function R7(a){a=a|0;var b=0,c=0,d=0;b=Ii-48|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){q[b+8>>2]=22;c=q[d+4>>2];a:{if((c|0)!=q[d+8>>2]){q[d+4>>2]=c+40;a=q[b+44>>2];q[c+32>>2]=q[b+40>>2];q[c+36>>2]=a;a=q[b+36>>2];q[c+24>>2]=q[b+32>>2];q[c+28>>2]=a;a=q[b+28>>2];q[c+16>>2]=q[b+24>>2];q[c+20>>2]=a;a=q[b+20>>2];q[c+8>>2]=q[b+16>>2];q[c+12>>2]=a;a=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=a;a=0;break a}q[b>>2]=(q[d+8>>2]-q[d>>2]|0)/40;a=Qi(a,115614,b)}Ii=b+48|0;return a|0}J(115568,115465,478,119531);G()}function PF(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-32|0;Ii=d;a:{b:{f=(q[a+8>>2]-q[a+12>>2]>>4)-1|0;if(f){g=1;while(1){c:{if((Vi(a,c)|0)==3){e=0;if(!g){break c}v[d+16>>3]=Mj(a,c);e=(Uxa(b,d+16|0)|0)>0;break c}h=kj(a,c,d+28|0);e=0;if(!g){break c}e=(Kl(h,1,q[d+28>>2],b)|0)==q[d+28>>2]}g=e;c=c+1|0;f=f-1|0;if(f){continue}break}if(!g){break b}}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;a=1;break a}b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[d>>2]=ql(b);Lj(a,145661,d);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;a=3}Ii=d+32|0;return a}function hY(a){a=a|0;var b=0,c=0,d=0,e=0;b=Aza(q[240504],q[240505],1284865837,1481765933)+1|0;c=Li;c=b>>>0<1?c+1|0:c;q[240504]=b;q[240505]=c;d=+((c>>>1>>>0)%2147483647|0)/2147483647;a:{b:{switch(q[a+8>>2]-q[a+12>>2]>>4){case 0:b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;break a;case 1:b=jj(a,1);if((b|0)<=0){dk(a,1,146993)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=C(d*+(b|0))+1;break a;case 2:b=jj(a,1);c=jj(a,2);if((b|0)>(c|0)){dk(a,2,146993)}e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=C(d*+((c-b|0)+1|0))+ +(b|0);break a;default:break b}}return Qi(a,147011,0)|0}q[a+8>>2]=q[a+8>>2]+16;return 1}function zC(a,b,c,d,e,f,g){var h=0,i=0;a:{if(!b){g=0;f=0;break a}i=(f-g|0)+1|0;g=0;if(!e){f=0;while(1){b:{if(BC(a,b,0)){break b}e=q[b+288>>2];if(e>>>0>>0?(e|0)>=1:0){break b}e=!AC(a,b);c:{if(fy(b+168|0)){break c}if(gy(b+144|0)){break c}g=e;f=b;break a}g=f?g:e;f=f?f:b}b=q[b+340>>2];if(b){continue}break}break a}f=0;while(1){d:{if(BC(a,b,e)){break d}h=q[b+288>>2];if(h>>>0>>0?(h|0)>=1:0){break d}h=AC(a,b);if(h){break d}e:{if(fy(b+168|0)){break e}if(gy(b+144|0)){break e}g=1;f=b;break a}g=f?g:!h;f=f?f:b}b=q[b+340>>2];if(b){continue}break}}q[c>>2]=f;q[d>>2]=g}function n$(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-288|0;Ii=b;f=uj(a,-10003,b+12|0);g=uj(a,-10004,0);q[b+16>>2]=f;q[b+24>>2]=a;c=q[b+12>>2];q[b+20>>2]=c+f;e=c;c=hl(a,-10005);a:{if((e|0)<(c|0)){break a}c=c+f|0;while(1){q[b+28>>2]=0;e=Fn(b+16|0,c,g);if(e){d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=(e-f|0)+((c|0)==(e|0))|0;q[a+8>>2]=q[a+8>>2]+16;Zq(a,-10005);a=q[b+28>>2];d=c?a?a:1:a;jp(q[b+24>>2],d,146427);if((d|0)<1){break a}a=0;while(1){js(b+16|0,a,c,e);a=a+1|0;if((d|0)!=(a|0)){continue}break}break a}c=c+1|0;if(c>>>0<=t[b+20>>2]){continue}break}}Ii=b+288|0;return d|0}function TV(a,b,c,d,e,f){var g=0,h=0;g=Ii-16|0;Ii=g;h=c;c=f-3|0;a:{if(c>>>0<=5){c=q[(c<<2)+263e3>>2];break a}c=0}f=c;if(f){f=q[f+8>>2]}else{f=0}q[h>>2]=f&255;q[g>>2]=0;q[g+4>>2]=0;q[g+8>>2]=0;b:{c:{d:{f=En(g,c,0);e:{if(f){break e}c=-20736;f:{if(!g){break f}f=q[g>>2];if(!f){break f}c=Mi[q[f+16>>2]](q[g+4>>2])|0}f=c;if(f){break e}f=ao(g,q[a+68>>2]+1128|0,64);if(f){break e}f=ao(g,d,e);if(!f){break d}}ym(g);break c}c=-20736;g:{if(!g){break g}d=q[g>>2];if(!d){break g}c=Mi[q[d+24>>2]](q[g+4>>2],b)|0}ym(g);f=c;if(f){break c}f=0;break b}Xj(a,2,80)}Ii=g+16|0;return f}function s9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=c>>2;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-4){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if(q[a+8>>2]-f>>2>>>0>>0){break a}q[a+4>>2]=(b<<2)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(152576,152587,479,152554);G()}J(152730,152587,506,152749);G()}function Hca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0);c=Ii-48|0;Ii=c;b=Nn(a,1);a:{if(b){d=b+8|0;e=b+4|0;break a}b=Bl(a,1);d=b+8|0;e=b+4|0}i=u[b>>2];j=u[e>>2];k=u[d>>2];e=kj(a,2,0);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);f=q[d+372>>2];b:{if(!f){g=x(1);h=x(1);break b}b=c+32|0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Mi[q[q[d+12>>2]+16>>2]](f,e,x(0),0,x(1),x(0),b);g=x(u[b+8>>2]+u[b+12>>2]);h=u[b>>2]}u[c+24>>2]=k;u[c+20>>2]=j;u[c+16>>2]=i;q[c+8>>2]=1065353216;u[c+4>>2]=g;u[c>>2]=h;a=RA(a,d,c+16|0,c,1,e,f);Ii=c+48|0;return a|0}function FR(a){var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;b=q[a>>2];c=q[a+120>>2]+(r[b+184|0]&2?12:4)|0;ky(d+12|0,d+8|0,q[b+184>>2]>>>1&1,c);a:{b:{b=q[d+12>>2];c:{if((b|0)<3){break c}e=q[d+8>>2];if((e|0)<2){break c}f=q[a>>2];if((b|0)>r[f+180|0]){break c}if((e|0)<=r[f+181|0]){break b}}Xj(a,2,70);g=-28288;break a}b=r[c+2|0];f=c+3|0;if((b|0)>((q[a+120>>2]+q[a+132>>2]|0)-f|0)){Xj(a,2,50);g=-31104;break a}Ni(q[q[a+68>>2]+480>>2]);e=bk(1,b);c=q[a+68>>2];q[c+480>>2]=e;g=-32512;if(!e){break a}Ti(e,f,b);o[c+484|0]=b;q[a+4>>2]=1;EV(a);jy(a);g=0}c=g;Ii=d+16|0;return c}function pQ(a){var b=0,c=0,d=0,e=0,f=0;d=218143;f=Ii-32|0;b=f;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;c=r[218143];if(!c){return 0}b=r[218144];if(!b){b=a;while(1){d=b;b=b+1|0;if((c|0)==r[d|0]){continue}break}return d-a|0}e=(c>>>3&28)+f|0;q[e>>2]=q[e>>2]|1<>>3|0;b=r[d+2|0];e=(e&28)+f|0;q[e>>2]=q[e>>2]|1<>>3&28)+f>>2]>>>b&1)){c=d;break a}b=r[d+1|0];c=d+1|0;d=c;if(b){continue}break}}return c-a|0}function Yga(a){var b=0,c=0,d=0,e=0;c=Ii-464|0;Ii=c;d=1;a:{if(q[75035]){break a}b:{c:{d:{b=q[74920];if(!(!a|!b)){while(1){e=q[b+12>>2];if(!e){break d}if(!tn(e,a)){if(Mi[q[b+8>>2]]()|0){break c}}b=q[b>>2];if(b){continue}break}b=q[74920]}if(!b){break b}a=b;while(1){if(o[a+16|0]>2]]()|0?a:b}a=q[a>>2];if(a){continue}break}break c}J(88310,87638,55,88335);G()}Mi[q[b+4>>2]](c+8|0);Ti(299684,c+8|0,456);q[75035]=b;if(!(Mi[q[74923]]()|0)){break b}q[c>>2]=q[q[75035]+12>>2];Pi(2,87731,88157,c);break a}d=0;Pi(4,87731,88190,0)}Ii=c+464|0;return d}function AG(a,b){var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;a:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>-1){b=pq(b,hj(b));ej(a,-1);e=q[79287];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;pj(a,-3);Ri(a,-2);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(d|0)){break a}Ii=c+32|0;return b}q[c+12>>2]=d;q[c+4>>2]=681;q[c+8>>2]=0;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}q[c+28>>2]=a;q[c+24>>2]=d;q[c+20>>2]=681;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function yo(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=Ii-16|0;Ii=f;Oza(+b);h=Lza(1)|0;e=Lza(0)|0;g=h&2147483647;c=g;d=e;g=c+ -1048576|0;a:{if((g|0)==2145386495|g>>>0<2145386495){i=d<<28;e=c>>>4|0;c=(c&15)<<28|d>>>4;d=e+1006632960|0;break a}if((c|0)==2146435072|c>>>0>2146435072){i=e<<28;c=h;e=c>>>4|0;c=(c&15)<<28|d>>>4;d=e|2147418112;break a}if(!(c|d)){c=0;d=0;break a}g=c;c=c>>>0<1?z(e)+32|0:z(c);vm(f,d,g,0,0,c+49|0);j=q[f>>2];i=q[f+4>>2];e=15372-c<<16;c=q[f+8>>2];d=e|q[f+12>>2]^65536}q[a>>2]=j;q[a+4>>2]=i;q[a+8>>2]=c;q[a+12>>2]=h&-2147483648|d;Ii=f+16|0}function lR(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=q[a+204>>2];q[c>>2]=0;e=q[q[a>>2]+144>>2];a:{if(!e){break a}d=d+16384|0;h=d>>>0>>0;i=d-b|0;d=q[e>>2];g=6;b:{if(!d){break b}while(1){f=((hj(d)&255)+f|0)+1|0;d=q[e+4>>2];e=e+4|0;if(d){continue}break}g=f+6|0}if(h|i>>>0>>0){break a}o[b|0]=0;o[b+1|0]=16;e=b+6|0;d=q[q[a>>2]+144>>2];f=q[d>>2];if(f){while(1){a=hj(f);o[e|0]=a;a=a&255;Ti(e+1|0,q[d>>2],a);e=(a+e|0)+1|0;f=q[d+4>>2];d=d+4|0;if(f){continue}break}}a=e-b|0;q[c>>2]=a;o[b+4|0]=a+65530>>>8;o[b+5|0]=r[c|0]-6;o[b+2|0]=q[c>>2]+65532>>>8;o[b+3|0]=r[c|0]-4}}function Tca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;g=q[a+8>>2]-q[a+12>>2]>>4;vj(a,0,0);vj(a,0,1);qk(a,1431,0);Si(a,-2,204413);xj(a,-2);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);a:{b:{c:{if(Vi(a,1)){QA(a,c,tj(a,1,d+12|0));break c}b=s[c+380>>1];e=s[99560];if((b|0)==(e|0)){break c}while(1){f=q[c+32>>2];if((q[c+36>>2]-f|0)/592>>>0<=b>>>0){break b}b=w(b,592)+f|0;QA(a,c,b);b=s[b+574>>1];if((e|0)!=(b|0)){continue}break}}if((g+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}Ii=d+16|0;return 1}J(208265,208276,479,208332);G()}J(202310,202233,3498,207373);G()}function Ofa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{b:{c:{if(!(b|c)){break c}d:{switch(c-1|0){case 0:if((c|0)==2097152|c>>>0>2097152){break b}if(b+1>>>0<2){break c}c=b&65535;if(c>>>0>=t[a+32>>2]){break a}if(!q[q[a+24>>2]+(c<<2)>>2]){break c}return s[q[a+28>>2]+(c<<1)>>1]==(b>>>16|0)|0;case 1:break d;default:break c}}if((c|0)==2097152|c>>>0>2097152){break b}if(b+1>>>0<2){break c}c=b&65535;if(c>>>0>=t[a+32>>2]){break a}if(!q[q[a+24>>2]+(c<<2)>>2]){break c}d=s[q[a+28>>2]+(c<<1)>>1]==(b>>>16|0)}return d|0}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function Ll(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;a:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>-1){ej(a,b);b=0;b:{if((Vi(a,-1)|0)!=7){break b}if(!$l(a,-1)){break b}b=q[79287];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;jl(a,-2);b=hl(a,-1);Ri(a,-3)}Ri(a,-2);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(d|0)){break a}Ii=c+32|0;return b}q[c+12>>2]=d;q[c+4>>2]=727;q[c+8>>2]=0;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}q[c+28>>2]=a;q[c+24>>2]=d;q[c+20>>2]=727;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function LG(a){var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;a:{c=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)>-1){e=q[79286];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);b:{switch(Vi(a,-1)-2|0){case 0:case 5:f=qj(a,-1);break;default:break b}}Ri(a,-2);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(c|0)){break a}Ii=b+32|0;return f}q[b+12>>2]=c;q[b+4>>2]=1023;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=c;q[b+20>>2]=1023;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function H9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=c>>8;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-256){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if(q[a+8>>2]-f>>8>>>0>>0){break a}q[a+4>>2]=(b<<8)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(57189,57106,479,57200);G()}J(57162,57106,506,57181);G()}function y9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=c>>4;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-16){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if(q[a+8>>2]-f>>4>>>0>>0){break a}q[a+4>>2]=(b<<4)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(50132,49868,479,50143);G()}J(49936,49868,506,49955);G()}function gha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]|0;Ml(a,1,q[q[jk(a)+80>>2]+8>>2],81003,b+28|0,0,0);mB(q[b+28>>2],b+24|0,b+20|0,b+16|0,b+12|0);d=q[b+24>>2]+1|0;c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;d=q[b+20>>2]+1|0;c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;d=q[b+16>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;d=q[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;if(((e>>4)+4|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(81819,81141,442,81844);G()}Ii=b+32|0;return 4}function WP(a,b,c){var d=0,e=0,f=0;a:{d=q[a+28>>2];e=q[d+52>>2];b:{if(!e){f=1;e=Mi[q[a+32>>2]](q[a+40>>2],1<>2],1)|0;q[d+52>>2]=e;if(!e){break b}}a=q[d+40>>2];if(!a){q[d+44>>2]=0;q[d+48>>2]=0;a=1<>2];q[d+40>>2]=a}if(a>>>0<=c>>>0){Ti(e,b-a|0,a);q[d+48>>2]=0;break a}f=q[d+48>>2];a=a-f|0;a=a>>>0>c>>>0?c:a;Ti(e+f|0,b-c|0,a);c=c-a|0;if(c){Ti(q[d+52>>2],b-c|0,c);q[d+48>>2]=c;break a}f=0;b=a+q[d+48>>2]|0;c=b;b=q[d+40>>2];q[d+48>>2]=(c|0)==(b|0)?0:c;c=b;b=q[d+44>>2];if(c>>>0<=b>>>0){break b}q[d+44>>2]=a+b}return f}q[d+44>>2]=q[d+40>>2];return 0}function wfa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;a:{b:{c:{d:{if(a){if(!b){break d}c=Ha(35632)|0;d=b+8|0;e=AK(c,q[b+4>>2],q[d>>2]);wa(c|0);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break c}}e:{if(!e){break e}a=q[a>>2];ua(a|0,1,b+4|0,d|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}ya(a|0);if(!(r[q[75054]+156|0]&64)){break e}a=K()|0;if(a){break a}}return e|0}J(92095,88575,2068,92147);G()}J(92126,88575,2069,92147);G()}lj(c,92147,2074);J(88669,88575,2074,92147);G()}lj(b,92147,2080);J(88669,88575,2080,92147);G()}lj(a,92147,2082);J(88669,88575,2082,92147);G()}function ufa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;a:{b:{c:{d:{if(a){if(!b){break d}c=Ha(35633)|0;d=b+8|0;e=AK(c,q[b+4>>2],q[d>>2]);wa(c|0);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break c}}e:{if(!e){break e}a=q[a>>2];ua(a|0,1,b+4|0,d|0);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break b}}ya(a|0);if(!(r[q[75054]+156|0]&64)){break e}a=K()|0;if(a){break a}}return e|0}J(92095,88575,2046,92100);G()}J(92126,88575,2047,92100);G()}lj(c,92100,2052);J(88669,88575,2052,92100);G()}lj(b,92100,2058);J(88669,88575,2058,92100);G()}lj(a,92100,2060);J(88669,88575,2060,92100);G()}function E9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=c>>2;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-4){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if(q[a+8>>2]-f>>2>>>0>>0){break a}q[a+4>>2]=(b<<2)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(46069,45367,479,46080);G()}J(45520,45367,506,45539);G()}function B9(a){var b=0,c=0,d=0,e=0,f=0;f=q[a>>2];c=q[a+4>>2]-f|0;e=c>>2;a:{b:{b=q[a+48>>2];c:{if((b|0)!=-1){d=q[a+16>>2];if(b>>>0>=q[a+20>>2]-d>>3>>>0){break b}c=(b<<3)+d|0;q[a+48>>2]=q[c+4>>2];b=e+1|0;break c}b=e+1|0;d=q[a+16>>2];if(b>>>0>q[a+24>>2]-d>>3>>>0){break a}q[a+20>>2]=(b<<3)+d;if((c|0)==-4){break b}c=(e<<3)+d|0}q[c>>2]=e;q[c+4>>2]=-1;if(q[a+8>>2]-f>>2>>>0>>0){break a}q[a+4>>2]=(b<<2)+f;b=q[a+36>>2];a=q[a+32>>2];if(b-a>>2>>>0<=e>>>0){break b}b=a+(e<<2)|0;a=c-d>>3;q[b>>2]=a;return a}J(51709,51308,479,51547);G()}J(51289,51308,506,51364);G()}function AH(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;h=Ii-16|0;Ii=h;i=q[a+104>>2];g=q[a+100>>2];j=i-g|0;f=(j|0)/40|0;a:{b:{if((j|0)<1){break b}c:{if((g|0)!=(i|0)){i=(f|0)>1?f:1;f=0;while(1){g=q[w(f,40)+g>>2];if((b|0)==q[g+8>>2]&q[g+12>>2]==(c|0)){break c}f=f+1|0;if((i|0)==(f|0)){break b}g=q[a+100>>2];if((q[a+104>>2]-g|0)/40>>>0>f>>>0){continue}break}}break a}b=q[a+104>>2];a=q[a+100>>2];if((b-a|0)/40>>>0<=f>>>0){break a}a=q[a+w(f,40)>>2];q[h+12>>2]=s[a+24>>1];b=q[a>>2];a=q[h+12>>2];Ti(b,d,(a>>>0>>0?a:e)<<4)}Ii=h+16|0;return}J(114155,114013,479,114166);G()}function ZI(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+w(e,136)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[(w(e,136)+f|0)+128>>2];if((e|0)==-1){J(167450,167056,366,167417);G()}h=d;d=w(e,136)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(e,136)+f|0)+128>>2];b:{if(!h){q[g>>2]=b;break b}q[h+128>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[(w(e,136)+f|0)+128>>2]=b;return}J(167396,167056,334,167417);G()}J(167423,167056,340,167417);G()}function Gta(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=Ii-32|0;Ii=e;if(d>>>0<17){Ui((e+16|0)+d|0,0,16-d|0);Ti(e+16|0,c,d);c=b>>>3|0;if(c){k=b&-8;i=c;while(1){g=(f<<3)+a|0;d=q[g>>2];c=q[g+4>>2];q[g>>2]=ZM(j,h,e+16|0)^d;q[g+4>>2]=Li^c;f=f+1|0;c=j+1|0;h=c>>>0<1?h+1|0:h;j=c;if((i|0)!=(c|0)|h){continue}break}a=a+k|0}c=ZM(i,0,e+16|0);q[e+8>>2]=c;q[e+12>>2]=Li;d=b&7;a:{if(!d){break a}o[a|0]=c^r[a|0];f=1;if((d|0)==1){break a}while(1){b=a+f|0;o[b|0]=r[b|0]^r[(e+8|0)+f|0];f=f+1|0;if((d|0)!=(f|0)){continue}break}}Ii=e+32|0;return}J(165290,165303,59,165325);G()}function _j(a,b){var c=0,d=0,e=0,f=0;c=q[a+4>>2];while(1){d=c;if(c){c=d-1|0;if(!q[q[a+8>>2]+(c<<2)>>2]){continue}}break}e=q[b+4>>2];while(1){c=e;if(c){e=c-1|0;if(!q[q[b+8>>2]+(e<<2)>>2]){continue}}break}if(!(c|d)){return 0}if(c>>>0>>0){return q[a>>2]}if(c>>>0>d>>>0){return 0-q[b>>2]|0}c=1;f=q[b>>2];e=q[a>>2];a:{b:{if((e|0)>=1){if((f|0)>=0){break b}break a}if(!e){break b}c=-1;if((f|0)>0){break a}}while(1){if(!d){return 0}d=d-1|0;c=d<<2;f=q[c+q[a+8>>2]>>2];c=q[c+q[b+8>>2]>>2];if(f>>>0>c>>>0){return e}if(c>>>0<=f>>>0){continue}break}c=0-e|0}return c}function v3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=nj(b+48|0,a,0,129431,1154);q[b+40>>2]=jj(a,1);q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;a:{b:{if(!vn(130706,b+72|0)){a=q[b+76>>2];e=a;c=q[b+72>>2];if(!(a|c)){break b}q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=c;q[b+12>>2]=e;a=q[64058];if(vk(0,b+8|0,q[a+8>>2],q[a+12>>2],0,a,b+40|0,4)){break a}mj(d);Ii=b+80|0;return 0}J(130666,129431,1126,130714);G()}J(130727,129431,1127,130714);G()}J(130666,129431,1163,130697);G()}function kN(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;j=3;a:{b:{if(a+1>>>0<2){break b}h=a&65535;g=q[210908];if(h>>>0>=t[g+8>>2]){break a}i=q[q[g>>2]+(h<<2)>>2];if(!i|s[q[g+4>>2]+(h<<1)>>1]!=(a>>>16|0)){break b}j=11;g=q[i+12>>2];h=q[i+8>>2];if((g|0)==(h|0)){break b}a=g-h|0;i=(a|0)>-1?a:-1;g=h-g|0;a=w((i|0)<1?i:1,((a|0)<(g|0)?g:a)>>>2|0);i=a>>>0>1?a:1;a=0;while(1){g=q[h+(a<<2)>>2];if(q[g>>2]!=(b|0)|q[g+4>>2]!=(c|0)){a=a+1|0;if((i|0)!=(a|0)){continue}break b}break}q[e>>2]=r[g+9|0];q[f>>2]=r[g+8|0];q[d>>2]=q[g+12>>2];j=0}return j}J(154349,154364,144,154402);G()}function a3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=nj(b+48|0,a,0,129431,1286);q[b+40>>2]=jj(a,1);q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;a:{b:{if(!vn(130706,b+72|0)){a=q[b+76>>2];e=a;c=q[b+72>>2];if(!(a|c)){break b}q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=c;q[b+12>>2]=e;a=q[64174];if(vk(0,b+8|0,q[a+8>>2],q[a+12>>2],0,a,b+40|0,4)){break a}mj(d);Ii=b+80|0;return 0}J(130666,129431,1126,130714);G()}J(130727,129431,1127,130714);G()}J(130666,129431,1295,130795);G()}function $2(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=nj(b+48|0,a,0,129431,1253);q[b+40>>2]=jj(a,1);q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;a:{b:{if(!vn(130706,b+72|0)){a=q[b+76>>2];e=a;c=q[b+72>>2];if(!(a|c)){break b}q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=c;q[b+12>>2]=e;a=q[64158];if(vk(0,b+8|0,q[a+8>>2],q[a+12>>2],0,a,b+40|0,4)){break a}mj(d);Ii=b+80|0;return 0}J(130666,129431,1126,130714);G()}J(130727,129431,1127,130714);G()}J(130666,129431,1262,130818);G()}function bla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0);b=Ii-80|0;Ii=b;e=1;f=nj(b+24|0,a,1,73366,923);c=$j(a,2);g=Li;d=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;h=b- -64|0;q[h>>2]=0;q[h+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,d,73150,b+20|0,b+48|0,b+16|0);q[b+48>>2]=0;d=nL(q[b+16>>2],q[b+20>>2],c,g);a:{if(d){q[b>>2]=aj(c,g);q[b+8>>2]=d;q[b+4>>2]=q[(d<<2)+232752>>2];e=Kj(f,75395,b);break a}i=u[b+48>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=i;q[a+8>>2]=q[a+8>>2]+16}mj(f);Ii=b+80|0;return e|0}function R3(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=0,h=0,i=0,j=x(0);b=Ii-96|0;Ii=b;q[b+92>>2]=0;i=kj(a,1,b+92|0);c=_i(a,2,q[210438],0);e=u[c>>2];f=u[c+4>>2];a:{b:{if(e!=e|f!=f){break b}d=u[c+8>>2];if(d!=d){break b}d=u[c+12>>2];if(d==d){break a}}d=u[c+8>>2];j=u[c+12>>2];v[b- -64>>3]=f;v[b+80>>3]=j;v[b+72>>3]=d;v[b+56>>3]=e;q[b+48>>2]=2;Qi(a,134315,b+48|0)}g=q[b+92>>2]+95|0;h=$i((g|0)>-1?g:-1);e=u[c>>2];f=u[c+4>>2];d=u[c+8>>2];v[b+32>>3]=u[c+12>>2];v[b+24>>3]=d;v[b+16>>3]=f;q[b>>2]=i;v[b+8>>3]=e;sj(h,g,134934,b);Xi(a,h);Ni(h);Ii=b+96|0;return 1}function sw(a,b,c,d,e){var f=0,g=0,h=x(0);f=Ii-160|0;Ii=f;q[f+152>>2]=0;g=1;a:{b=(c<<2)+b|0;if(q[b+4>>2]!=-2){g=q[a+8>>2]-q[a+12>>2]>>4;rj(a,-1e4,q[d+12>>2]);yk(a);rj(a,-1e4,q[b+4>>2]);rj(a,-1e4,q[d+12>>2]);b:{c:{if(!c){rj(a,-1e4,q[d+12>>2]);break c}b=1;if((c&-2)!=2){break b}h=u[q[e>>2]+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=h;q[a+8>>2]=q[a+8>>2]+16}b=2}c=Ii-128|0;Ii=c;Ii=c+128|0;q[f+8>>2]=0;b=Pm(a,b,0);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;yk(a);if((g|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}g=b?-1:1}Ii=f+160|0;return g}J(12728,12749,147,12718);G()}function Pn(a){var b=0,c=0,d=0,e=0;if((jt(a,0,0,1e6)|0)==-17){while(1){Pi(3,29297,29353,0);if((jt(a,0,0,1e6)|0)==-17){continue}break}}a:{b=q[a+173524>>2];if((b|0)!=q[a+173528>>2]){q[a+173524>>2]=b+4;q[b>>2]=q[a+88172>>2];b=q[a+173520>>2];c=q[a+173524>>2];if((b|0)!=(c|0)){while(1){e=q[(d<<2)+b>>2];if(e){cj(q[a+155704>>2],e);c=q[a+173524>>2];b=q[a+173520>>2]}d=d+1|0;if(d>>>0>2>>>0){continue}break}}if(q[a+155696>>2]!=1023){break a}um(q[a+155700>>2]);pua(q[a+173488>>2]);Ni(Q6(a));return}J(30736,29794,533,30760);G()}J(29388,29446,1042,29476);G()}function Wia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;b=$i(36);d=b+24|0;q[d>>2]=0;q[d+4>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+32>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=-1;d=q[a+20>>2];q[b>>2]=d;q[q[a+24>>2]+8>>2]=b;a:{a=q[d+4>>2];b:{if(!a){q[c+12>>2]=0;break b}b=b+4|0;f=(a<<1>>>0)/3|0;Pv(b,f>>>0>1?f:1,a);q[c+12>>2]=0;while(1){if(t[d+4>>2]<=e>>>0){break a}e=q[d>>2]+w(e,192)|0;vr(b,q[e+8>>2],q[e+12>>2],c+12|0);e=q[c+12>>2]+1|0;q[c+12>>2]=e;if(a>>>0>e>>>0){continue}break}}Ii=c+16|0;return 0}J(63953,63965,69,64012);G()}function RQ(a){var b=0,c=0,d=0;c=Ii-16|0;Ii=c;a:{if(r[a+60|0]){q[a+112>>2]=2;break a}q[a+108>>2]=0;b=q[a+64>>2];b:{if(q[a+44>>2]){d=q[a+52>>2];c:{if((b|0)>=0){b=b+q[a+48>>2]|0;if(b>>>0>>0){break c}}q[a+108>>2]=1;q[a+44>>2]=d;break b}q[a+44>>2]=b;break b}d:{if((b|0)>=0){d=q[a+36>>2];b=d+b|0;if(b>>>0>=d>>>0){break d}}q[a+108>>2]=1;b=2147483647}if(!Uk(q[a+32>>2],b,0)){break b}q[a+108>>2]=1;Uk(q[a+32>>2],q[a+36>>2],2)}q[a+1392>>2]=-1;o[a+1389|0]=1;q[a+1004>>2]=0;if(!gx(a,c+12|0,c+4|0,c+8|0)){break a}fx(a,q[c+12>>2],q[c+4>>2],q[c+8>>2])}Ii=c+16|0}function Lz(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-16|0;Ii=c;g=a+12|0;e=q[q[q[a>>2]+8>>2]+32>>2];b=e<<1;xA(g,b>>>0<3?1:(b>>>0)/3|0,e);if(e){i=c+8|4;while(1){b=q[q[q[a>>2]+8>>2]+28>>2]+w(h,48)|0;a:{if(!(r[b+32|0]&2)){break a}q[c+12>>2]=0;q[c+8>>2]=b;b:{f=q[a+8>>2];if(!f){break b}if(!Oz(f,q[b>>2],q[b+4>>2],i)){break b}q[c>>2]=q[b+8>>2];Pi(4,32178,32195,c);break a}f=q[b+16>>2];b=q[b+20>>2];d=q[a+36>>2];if((d|0)==((q[a+28>>2]-q[a+20>>2]|0)/24|0)){d=d+32|0;xA(g,(d<<1>>>0)/3|0,d)}LI(g,f,b,c+8|0)}h=h+1|0;if((h|0)!=(e|0)){continue}break}}Ii=c+16|0}function x2(a){a=a|0;var b=0,c=0,d=x(0),e=0,f=x(0),g=x(0),h=0,i=0,j=x(0);b=Ii-96|0;Ii=b;q[b+92>>2]=0;i=kj(a,1,b+92|0);c=_i(a,2,q[210437],0);f=u[c>>2];g=u[c+4>>2];a:{b:{if(f!=f|g!=g){break b}d=u[c+8>>2];if(d!=d){break b}d=u[c+12>>2];if(d==d){break a}}d=u[c+8>>2];j=u[c+12>>2];v[b- -64>>3]=g;v[b+80>>3]=j;v[b+72>>3]=d;v[b+56>>3]=f;q[b+48>>2]=2;Qi(a,134221,b+48|0)}e=q[b+92>>2];h=e+98|0;e=$i(h+e|0);f=u[c>>2];g=u[c+4>>2];d=u[c+8>>2];v[b+32>>3]=u[c+12>>2];v[b+24>>3]=d;v[b+16>>3]=g;q[b>>2]=i;v[b+8>>3]=f;sj(e,h,134890,b);Xi(a,e);Ni(e);Ii=b+96|0;return 1}function A7(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);_i(a,-1,q[79180],119558);Ri(a,-2);a:{if((c|0)==q[a+8>>2]-q[a+12>>2]>>4){Dj(a,1,5);c=yj(a,4);q[c>>2]=Ui($i(264),0,264);Zi(a,-1e4,117793);xj(a,-2);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;if(Hj(a,1)){while(1){d=$j(a,-1);if(R8(q[c>>2],d,Li)){q[b>>2]=32;Pi(3,116024,117815,b)}Ri(a,-2);if(Hj(a,1)){continue}break}}if((e+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}Ii=b+16|0;return 1}J(115568,115465,478,119531);G()}J(115440,115465,2821,117877);G()}function waa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+w(e,40)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[(w(e,40)+f|0)+32>>2];if((e|0)==-1){J(201470,201191,366,201437);G()}h=d;d=w(e,40)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(e,40)+f|0)+32>>2];b:{if(!h){q[g>>2]=b;break b}q[h+32>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[(w(e,40)+f|0)+32>>2]=b;return}J(201416,201191,334,201437);G()}J(201443,201191,340,201437);G()}function uaa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+w(e,40)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[(w(e,40)+f|0)+32>>2];if((e|0)==-1){J(111463,111167,366,111430);G()}h=d;d=w(e,40)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(e,40)+f|0)+32>>2];b:{if(!h){q[g>>2]=b;break b}q[h+32>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[(w(e,40)+f|0)+32>>2]=b;return}J(111409,111167,334,111430);G()}J(111436,111167,340,111430);G()}function nS(a,b,c,d,e){var f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;a:{if(q[a>>2]==-1){f=-2;break a}while(1){f=kC(q[a>>2],c,d);q[b>>2]=f;if((f|0)!=-1){f=0;break a}b:{f=q[240513];switch(f-6|0){case 21:continue;case 0:case 7:break b;default:break a}}f=q[a>>2];q[g+12>>2]=1;q[g+8>>2]=f;c:{if(v[e>>3]==0){break c}d:{while(1){h=g+8|0;i=Qp(e)*1e3;e:{if(y(i)<2147483648){f=~~i;break e}f=-2147483648}f=Vp(h,1,(f|0)>-1?f:-1);if((f|0)!=-1){h=0;if(f){break d}break c}if(q[240513]==27){continue}break}h=q[240513]}f=h;if(!f){continue}break a}break}f=-1}Ii=g+16|0;return f}function on(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=q[a+4>>2]<<5;c=Ql(a)+b|0;a:{if(d>>>0>>0){f=rl(a,(c>>>5|0)+((c&31)!=0)|0);if(f){break a}}g=b&31;b=b>>>5|0;b:{if(!b){break b}c=q[a+4>>2];c:{if(c>>>0<=b>>>0){d=c;break c}h=b^-1;e=q[a+8>>2];while(1){d=c-1|0;q[e+(d<<2)>>2]=q[e+(c+h<<2)>>2];c=d;if(c>>>0>b>>>0){continue}break}}if(!d){break b}Ui(q[a+8>>2],0,d<<2)}f=0;if(!g){break a}e=q[a+4>>2];if(e>>>0<=b>>>0){break a}h=32-g|0;c=q[a+8>>2];d=0;while(1){a=c+(b<<2)|0;i=q[a>>2];q[a>>2]=i<>>h|0;b=b+1|0;if(e>>>0>b>>>0){continue}break}}return f}function c2(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;a:{b:{c:{if(mz(a)){q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+28>>2]=16;a=kC(a,d,d+28|0);q[b>>2]=1;e=q[d+4>>2];q[nv(b)>>2]=e;break c}if(!lz(a)){break b}q[d+24>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+28>>2]=28;a=kC(a,d,d+28|0);q[b>>2]=2;b=Zs(b);e=q[d+20>>2];q[b+8>>2]=q[d+16>>2];q[b+12>>2]=e;e=q[d+12>>2];q[b>>2]=q[d+8>>2];q[b+4>>2]=e}q[c>>2]=a;b=0;if((a|0)>-1){break a}b=im(173656,340,q[240513]);break a}Pi(4,173567,173685,0);b=-2}Ii=d+32|0;return b}function Qma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a>>2];b=Ui($i(132),0,132);q[b+52>>2]=0;q[b+56>>2]=0;q[b+48>>2]=-1;q[b+60>>2]=0;q[b+64>>2]=0;d=b+68|0;q[d>>2]=0;q[d+4>>2]=0;f=b+76|0;e=f;q[e>>2]=0;q[e+4>>2]=0;e=q[a+16>>2];c=q[c+4>>2];c=c>>>0>e>>>0?e:c;t9(b,c);a:{if(!(o[b+80|0]&1)){Wi(c,4,d,f,b+72|0);d=q[b+68>>2];if(c>>>0>q[b+76>>2]-d>>2>>>0){break a}q[b+72>>2]=d+(c<<2);Ui(q[b>>2],0,w(c,240));q[b+120>>2]=0;q[b+100>>2]=0;q[b+92>>2]=0;q[b+84>>2]=0;q[b+88>>2]=0;q[q[a+12>>2]>>2]=b;return 0}J(53556,53631,493,53687);G()}J(54240,53631,506,54259);G()}function tea(a,b){var c=0,d=0,e=x(0);a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}d=a+w(c,592)|0;if(s[d+570>>1]!=(b&65535)){break a}b=-1;c:{if(q[d+436>>2]!=2){break c}a=a+w(c,592)|0;if(!q[a+452>>2]){break c}c=q[a+440>>2];b=c&8191;c=(c>>>13&8191)-b|0;e=x(u[a+472>>2]*x(c|0));d:{if(x(y(e))>2];e=c>>>0>2]?c:141056;a:{if(q[e+8>>2]!=6){break a}c=q[e>>2];b:{if(r[c+6|0]){if((b|0)<1|r[c+7|0]<(b|0)){break a}f=140594;b=(c+(b<<4)|0)+8|0;break b}if((b|0)<1){break a}d=q[c+16>>2];if(q[d+36>>2]<(b|0)){break a}b=(b<<2)-4|0;f=q[b+q[d+28>>2]>>2]+16|0;b=q[q[(b+c|0)+20>>2]+8>>2]}c=q[a+8>>2]-16|0;q[a+8>>2]=c;d=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=d;q[b+8>>2]=q[c+8>>2];b=q[a+8>>2];if(q[b+8>>2]<4){break a}b=q[b>>2];if(!(r[b+5|0]&3)){break a}c=q[e>>2];if(!(r[c+5|0]&4)){break a}go(a,c,b)}return f}function Gha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-304|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;e=$j(a,1);c=Li;g=c;d=gt(a,2);q[b+44>>2]=0;q[b+40>>2]=0;Wo(q[d>>2],b+40|0,b+44|0);c=Pz(q[74445],e,c,q[b+40>>2],q[b+44>>2]);d=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{c:{if(c){if((d|0)!=(f|0)){break b}q[b+32>>2]=aj(e,g);q[b+24>>2]=e;q[b+28>>2]=g;q[b+16>>2]=c;sj(b+48|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+16|0);q[b>>2]=b+48;h=Qi(a,75832,b);break c}if((d|0)!=(f|0)){break a}}Ii=b+304|0;return h|0}J(76560,76581,330,76789);G()}J(76560,76581,333,76789);G()}function yaa(a,b){var c=0,d=0,e=0,f=0,g=0;a:{c=q[213127];if(c){f=q[213126]+(Cza(a,b,c)<<2)|0;d=q[f>>2];if((d|0)==-1){break a}e=q[213128];c=e+w(d,24)|0;if(q[c>>2]!=(a|0)|q[c+4>>2]!=(b|0)){while(1){d=q[(w(d,24)+e|0)+16>>2];if((d|0)==-1){J(166095,165836,366,166062);G()}g=c;c=w(d,24)+e|0;if((a|0)!=q[c>>2]|q[c+4>>2]!=(b|0)){continue}break}}q[213132]=q[213132]-1;a=q[(w(d,24)+e|0)+16>>2];b:{if(!g){q[f>>2]=a;break b}q[g+16>>2]=a}a=q[213131];q[213131]=d;q[(w(d,24)+e|0)+16>>2]=a;return}J(166041,165836,334,166062);G()}J(166068,165836,340,166062);G()}function yC(a,b,c){var d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;b=hk(a,b,f+12|0,48);a:{if(b){b=b-9088|0;break a}b=-9184;d=q[f+12>>2];if((d|0)<1){break a}e=q[a>>2];q[c>>2]=r[e|0];e=d+e|0;d=hk(a,e,c+4|0,6);if(d){b=d-9088|0;break a}q[c+8>>2]=q[a>>2];d=q[a>>2]+q[c+4>>2]|0;q[a>>2]=d;if((e-d|0)<1){break a}b=-9186;g=r[d|0];if(g>>>0>30|!(1<>2]=d+1;q[c+12>>2]=r[d|0];b=Wq(a,e,c+16|0);if(b){b=b-9088|0;break a}q[c+20>>2]=q[a>>2];b=a;a=q[a>>2]+q[c+16>>2]|0;q[b>>2]=a;b=-9190;if((a|0)!=(e|0)){break a}b=0;q[c+24>>2]=0}Ii=f+16|0;return b}function Os(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;e=q[a+8>>2];c=uj(e,-1,g+12|0);b=q[g+12>>2];d=a+12|0;f=q[a>>2];a:{if(b>>>0<=(d-f|0)+1024>>>0){Ti(f,c,b);q[a>>2]=q[a>>2]+q[g+12>>2];Ri(e,-2);break a}b=f-d|0;if(b){bj(q[a+8>>2],d,b);q[a>>2]=d;q[a+4>>2]=q[a+4>>2]+1;xk(e,-2)}b=q[a+4>>2];q[a+4>>2]=b+1;if((b|0)<1){break a}d=q[a+8>>2];i=al(d,-1);c=1;while(1){b:{b=c+1|0;h=c;e=al(d,c^-1);f=q[a+4>>2];c=e>>>0>>0|(f-c|0)>8;h=c?b:h;if(!c){break b}i=e+i|0;c=b;if((f|0)>(h|0)){continue}}break}fm(d,h);q[a+4>>2]=(q[a+4>>2]-h|0)+1}Ii=g+16|0}function vaa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+(e<<6)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[((e<<6)+f|0)+56>>2];if((e|0)==-1){J(172535,172174,366,172502);G()}h=d;d=(e<<6)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[((e<<6)+f|0)+56>>2];b:{if(!h){q[g>>2]=b;break b}q[h+56>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[((e<<6)+f|0)+56>>2]=b;return}J(172481,172174,334,172502);G()}J(172508,172174,340,172502);G()}function t2(a){a=a|0;var b=0,c=x(0),d=x(0),e=0,f=x(0),g=x(0),h=0,i=x(0);e=Ii-48|0;Ii=e;b=Ck(a,1,q[210437]);a:{if(b){h=fj(a,2);break a}h=fj(a,1);b=_i(a,2,q[210437],0);c=u[b>>2];f=u[b+4>>2];b:{if(c!=c|f!=f){break b}d=u[b+8>>2];if(d!=d){break b}d=u[b+12>>2];if(d==d){break a}}d=u[b+8>>2];g=u[b+12>>2];v[e+16>>3]=f;v[e+32>>3]=g;v[e+24>>3]=d;v[e+8>>3]=c;q[e>>2]=2;Qi(a,134221,e)}c=u[b+12>>2];f=u[b>>2];d=u[b+4>>2];g=u[b+8>>2];b=yj(a,16);i=c;c=x(h);u[b+12>>2]=i*c;u[b+8>>2]=g*c;u[b+4>>2]=d*c;u[b>>2]=f*c;Zi(a,-1e4,134016);xj(a,-2);Ii=e+48|0;return 1}function ot(a){var b=0,c=0;b=q[a+16>>2];if(b){while(1){c=q[b+92>>2];if(c){Mi[c|0](b)}b=q[b+88>>2];if(b){continue}break}}Ni(q[a+24>>2]);b=q[a+40>>2];if(b){while(1){c=q[b+4100>>2];Ni(b);b=c;if(b){continue}break}}b=q[a+44>>2];if(b){while(1){c=q[b+4100>>2];Ni(b);b=c;if(b){continue}break}}b=q[a+36>>2];if(b){Ni(b)}a:{b=q[a+32>>2];if(b){Ni(b);break a}J(172073,172034,124,172083);G()}Qn(q[a+28>>2]);q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0}function wv(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{if((b&65535)==65535){break a}f=a+155708|0;while(1){e=(b<<16>>16<<6)+a|0;if(s[e+88150>>1]){c=g;break a}uH(a,e+88112|0,0,0);b:{b=q[a+155712>>2];c:{if(!b){break c}d=e+88136|0;c=q[d>>2];d=q[d+4>>2];b=q[q[f>>2]+(Cza(c,d,b)<<2)>>2];if((b|0)==-1){break c}i=q[a+155716>>2];while(1){b=i+(b<<4)|0;if(q[b>>2]==(c|0)&(d|0)==q[b+4>>2]){break b}b=q[b+12>>2];if((b|0)!=-1){continue}break}}J(30261,29446,299,30307);G()}nJ(f,c,d);c=1;h=g^1|h;g=1;b=s[e+88144>>1];if((b|0)!=65535){continue}break}}return c&h&1}function Wt(a,b,c,d){var e=0,f=0;e=Ii-288|0;Ii=e;a:{b:{c:{d:{e:{f:{f=q[a+8>>2];if(f>>>0>=t[a+4>>2]){if(2147418112/(d>>>0)>>>0<=b>>>0){break f}if(b>>>0<=f>>>0){break b}if(!c){break d}c=b;f=Eza(c);if(!Li&(f|0)==1){break d}c=bwa(c);if(!c|t[a+8>>2]>=c>>>0){break e}if(b>>>0<=c>>>0){break c}Kl(96767,17,1,q[53736]);G();G()}J(96587,96608,12,96657);G()}J(96675,96608,17,96657);G()}J(96723,96608,27,96657);G()}c=b}b=w(c,d);d=ul(q[a>>2],b);if(!d){q[e>>2]=b;mn(e+32|0,96785,e);break a}q[a>>2]=d;q[a+8>>2]=c}Ii=e+288|0;return}_y(e+32|0,q[53736]);G();G()}function C5(a,b){var c=0,d=0,e=0;d=$i(116);c=d;q[c>>2]=0;q[c+4>>2]=0;q[c+52>>2]=0;q[c+56>>2]=0;q[c+48>>2]=-1;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;e=c+60|0;c=e;q[c>>2]=0;q[c+4>>2]=0;c=d;q[c+68>>2]=0;q[c+72>>2]=0;q[c+76>>2]=0;q[c+80>>2]=0;q[c+84>>2]=0;q[c+88>>2]=0;q[c+92>>2]=0;q[c+96>>2]=0;q[c+100>>2]=0;q[c+104>>2]=0;q[c+108>>2]=0;q[c+112>>2]=0;q9(c,q[a>>2]);if(o[c+64|0]&1){J(152643,152587,493,152718);G()}Wi(0,64,d+52|0,e,d+56|0);q[b>>2]=d;return 0}function XL(a){a=a|0;var b=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0;o[b+24|0]=0;o[b+25|0]=0;o[b+26|0]=0;o[b+27|0]=0;o[b+28|0]=0;o[b+29|0]=0;o[b+30|0]=0;o[b+31|0]=0;o[b+16|0]=0;o[b+17|0]=0;o[b+18|0]=0;o[b+19|0]=0;o[b+20|0]=0;o[b+21|0]=0;o[b+22|0]=0;o[b+23|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;o[b+15|0]=0;km(a,b);Ii=b+32|0;return 1}function PL(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-16|0;Ii=d;a:{b:{c:{d:{if(o[b+28|0]&1){break d}e=q[b+8>>2];f=q[e+8>>2];if(!f){break d}if(o[b+24|0]&1){break c}h=b;g=b;Wi(f,4,b+12|0,b+20|0,b+16|0);b=0;while(1){if(t[e+8>>2]<=b>>>0){break b}c=q[(q[e+4>>2]+w(b,80)|0)+4>>2];if(c){c=ak(a,c,d+12|0);if(c){break d}c=q[g+16>>2];if((c|0)==q[h+20>>2]){break a}i=q[d+12>>2];q[g+16>>2]=c+4;q[c>>2]=i}b=b+1|0;if((f|0)!=(b|0)){continue}break}c=0}Ii=d+16|0;return c}J(59629,59704,493,59760);G()}J(59545,59557,244,59618);G()}J(59772,59704,533,59796);G()}function LO(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;d=q[a+16>>2];b=q[d+48>>2];c=q[b>>2];a:{if((b|0)==(c|0)){q[d+48>>2]=0;break a}q[b>>2]=q[c>>2]}q[c>>2]=q[q[d+112>>2]>>2];q[q[d+112>>2]>>2]=c;o[c+5|0]=r[d+20|0]&3|r[c+5|0]&248;b=q[c+8>>2];b:{if(!b|r[b+6|0]&4){break b}b=eo(b,2,q[q[a+16>>2]+196>>2]);if(!b){break b}f=q[d+64>>2];g=r[a+57|0];o[a+57|0]=0;q[d+64>>2]=q[d+68>>2]<<1;h=q[b+4>>2];e=q[a+8>>2];q[e>>2]=q[b>>2];q[e+4>>2]=h;q[e+8>>2]=q[b+8>>2];b=q[a+8>>2];q[b+16>>2]=c;q[b+24>>2]=7;c=q[a+8>>2];q[a+8>>2]=c+32;Ul(a,c,0);o[a+57|0]=g;q[d+64>>2]=f}}function Xpa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=Ii-48|0;Ii=f;a:{b:{g=q[q[a>>2]+320>>2];a=q[g+20>>2];c:{if(!a){break c}a=q[q[g+16>>2]+((d>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break c}g=q[g+24>>2];while(1){h=g+w(a,12)|0;if(q[h>>2]==(d|0)){break b}a=q[h+8>>2];if((a|0)!=-1){continue}break}}a=0;if(r[290720]){break a}o[290720]=1;q[f>>2]=d;Pi(4,40439,41258,f);break a}a=q[(g+w(a,12)|0)+4>>2]}q[f+28>>2]=c;q[f+24>>2]=b;b=q[a+4>>2];q[f+32>>2]=d;q[f+16>>2]=e;q[f+20>>2]=b;a=Mi[q[a+16>>2]](f+40|0,f+16|0)|0;Ii=f+48|0;return a|0}function CH(a,b,c,d,e,f,g){if((d^g)&255){Mi[q[74988]](a,d&15,d>>>4&15)}d=d>>>11&1;if((d|0)!=(g>>>11&1)){Mi[q[74999]](a,d)}g=c>>>5&255;if((g|0)!=(f>>>5&255)){Mi[q[74993]](a,g)}f=c^f;d=b;g=e^d;if(g&15){Mi[q[74989]](a,(d&8)>>>3|0,(d&4)>>>2|0,(d&2)>>>1|0,d&1)}if(g&29360128|f&536862720){Mi[q[74995]](a,0,d>>>22&7,c>>>21&255,c>>>13&255)}if(f&536862748){Mi[q[74995]](a,1,c>>>2&7,c>>>21&255,c>>>13&255)}if(g&4186112){Mi[q[74997]](a,0,d>>>13&7,d>>>19&7,d>>>16&7)}if(g&-33554432|f&3){Mi[q[74997]](a,1,d>>>25&7,((c&2147483647)<<1|b>>>31)&7,d>>>28&7)}}function taa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+w(e,48)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[(w(e,48)+f|0)+40>>2];if((e|0)==-1){J(27154,26666,366,27121);G()}h=d;d=w(e,48)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(e,48)+f|0)+40>>2];b:{if(!h){q[g>>2]=b;break b}q[h+40>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[(w(e,48)+f|0)+40>>2]=b;return}J(27100,26666,334,27121);G()}J(27127,26666,340,27121);G()}function raa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)==-1){break a}f=q[a+8>>2];d=f+w(e,24)|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){while(1){e=q[(w(e,24)+f|0)+16>>2];if((e|0)==-1){J(48280,48015,366,48247);G()}h=d;d=w(e,24)+f|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(e,24)+f|0)+16>>2];b:{if(!h){q[g>>2]=b;break b}q[h+16>>2]=b}b=q[a+20>>2];q[a+20>>2]=e;q[(w(e,24)+f|0)+16>>2]=b;return}J(48226,48015,334,48247);G()}J(48253,48015,340,48247);G()}function _ga(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=x(f);var g=0,h=0,i=0;g=Ii-32|0;Ii=g;a:{b:{h=q[q[a>>2]+320>>2];a=q[h+20>>2];c:{if(!a){break c}a=q[q[h+16>>2]+((d>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break c}h=q[h+24>>2];while(1){i=h+w(a,12)|0;if(q[i>>2]==(d|0)){break b}a=q[i+8>>2];if((a|0)!=-1){continue}break}}a=0;if(r[290720]){break a}o[290720]=1;q[g>>2]=d;Pi(4,40439,41258,g);break a}a=q[(h+w(a,12)|0)+4>>2]}h=q[a+20>>2];if(h){q[g+20>>2]=c;q[g+16>>2]=b;a=q[a+4>>2];q[g+24>>2]=d;q[g+8>>2]=e;q[g+12>>2]=a;Mi[h|0](g+8|0,f)}Ii=g+32|0}function vp(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=a+2040|0;a:{f=a+2048|0;c=q[f>>2];g=a+2044|0;d=q[g>>2];h=(c-d|0)/48|0;if(h>>>0>>0){if(o[a+2052|0]&1){break a}d=(c-q[a+2040>>2]|0)/48|0;c=b-h|0;Wi(d+(c>>>0>256?c:256)|0,48,e,f,g);if(o[a+2116|0]&1){break a}Wi((q[a+2048>>2]-q[a+2040>>2]|0)/48|0,4,a+2104|0,a+2112|0,a+2108|0);d=q[a+2044>>2];c=q[a+2048>>2]}f=b;b=q[e>>2];e=f+((d-b|0)/48|0)|0;if((c-b|0)/48>>>0>=e>>>0){q[a+2136>>2]=-1;q[a+2140>>2]=0;q[a+2044>>2]=b+w(e,48);return d}J(115295,115168,506,115314);G()}J(115093,115168,493,115224);G()}function kla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-80|0;Ii=d;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);g=$j(a,2);c=Li;b=d;q[b+72>>2]=$j(a,3);q[b+76>>2]=Li;q[b+64>>2]=g;q[b+68>>2]=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[58976];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],f,c,b- -64|0,16);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(72895,72626,389,72939);G()}Ii=d+80|0;return 0}function Hga(a,b){a=a|0;b=b|0;var c=0;a:{b:{c:{if(a){if(!b){break a}if(s[b+192>>1]){a=0;while(1){Bc(a|0);d:{if(!(r[q[75054]+156|0]&64)){break d}c=K()|0;if(!c){break d}lj(c,91957,1797);J(88669,88575,1797,91957);G()}a=a+1|0;if(a>>>0>1]){continue}break}}Q(34962,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}Q(34963,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}return}J(88567,88575,1791,91957);G()}lj(a,91957,1801);J(88669,88575,1801,91957);G()}lj(a,91957,1804);J(88669,88575,1804,91957);G()}J(91843,88575,1792,91957);G()}function qk(a,b,c){var d=0,e=0,f=0,g=0;e=q[a+16>>2];if(t[e+68>>2]>=t[e+64>>2]){om(a)}e=a;f=c;d=q[a+20>>2];g=a+72|0;a:{if((d|0)==q[a+40>>2]){break a}g=q[q[d+4>>2]>>2]+12|0}e=xZ(e,f,q[g>>2]);q[e+16>>2]=b;d=q[a+8>>2];b=d-(c<<4)|0;q[a+8>>2]=b;if(c){d=d-16|0;f=q[d+4>>2];c=c-1|0;b=e+(c<<4)|0;q[b+24>>2]=q[d>>2];q[b+28>>2]=f;q[b+32>>2]=q[d+8>>2];if(c){while(1){c=c-1|0;d=c<<4;b=d+e|0;d=d+q[a+8>>2]|0;f=q[d+4>>2];q[b+24>>2]=q[d>>2];q[b+28>>2]=f;q[b+32>>2]=q[d+8>>2];if(c){continue}break}}b=q[a+8>>2]}q[b+8>>2]=6;q[b>>2]=e;q[a+8>>2]=q[a+8>>2]+16}function jma(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=Ii-48|0;Ii=f;a:{b:{g=q[q[a>>2]+320>>2];a=q[g+20>>2];c:{if(!a){break c}a=q[q[g+16>>2]+((d>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break c}g=q[g+24>>2];while(1){h=g+w(a,12)|0;if(q[h>>2]==(d|0)){break b}a=q[h+8>>2];if((a|0)!=-1){continue}break}}a=0;if(r[290720]){break a}o[290720]=1;q[f>>2]=d;Pi(4,40439,41258,f);break a}a=q[(g+w(a,12)|0)+4>>2]}g=q[a+12>>2];if(g){q[f+28>>2]=c;q[f+24>>2]=b;a=q[a+4>>2];q[f+32>>2]=d;q[f+16>>2]=e;q[f+20>>2]=a;Mi[g|0](f+40|0,f+16|0)}Ii=f+48|0}function Ir(a,b){var c=0,d=0;c=q[b+84>>2];if((c|0)!=285976){cj(q[a>>2],c)}Kt(a,b);c=q[b+140>>2];a:{if(!(q[b+136>>2]&-65536^2147418112)){break a}pw(a,b);c=s[b+140>>1]}Ni(b);b:{c:{d:{b=c&32767;d=q[a+1036>>2];if(b>>>0>2]-d>>2>>>0){q[d+(b<<2)>>2]=0;d=q[a+1052>>2];if(!d){break d}c=s[a+1058>>1];if(!c|c>>>0>s[a+1056>>1]){break c}c=c-1|0;p[a+1058>>1]=c;p[((c&65535)<<1)+d>>1]=b;if(t[a+3168>>2]>s[a+1058>>1]){break b}return}J(12419,9962,479,9454);G()}J(12459,12368,140,12454);G()}J(12490,12368,141,12454);G()}J(7842,7192,783,7916);G()}function nka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;b=lL(q[a>>2],q[a+12>>2],q[a+16>>2],d+12|0);c=q[d+12>>2];a:{b:{if(b){b=-2;if(!c){break b}c:{if(o[c+24|0]&1){break c}a=q[c+12>>2];if(!a){break c}Ni(a)}Ni(c);break b}d:{if(!q[a+20>>2]|o[c+28|0]&1){break d}f=q[c+8>>2];e=q[f+8>>2];if(!e){break d}b=0;while(1){if(b>>>0>=e>>>0){break a}g=q[(q[f+4>>2]+w(b,80)|0)+4>>2];if(g){Ek(q[a+20>>2],g);e=q[f+8>>2]}b=b+1|0;if(e>>>0>b>>>0){continue}break}}q[q[a+24>>2]>>2]=c;b=0}Ii=d+16|0;return b|0}J(59545,59557,244,59618);G()}function Xca(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=0,g=0,h=0,i=0,j=0,k=0;h=q[a+8>>2]-q[a+12>>2]>>4;gj(a);i=_i(a,-1,q[213927],204267);Ri(a,-2);b=a;a:{if(uk(a,1)){f=Oi(kj(a,1,0));g=Li;break a}f=nl(a,1);g=Li}j=b;k=kj(a,2,0);c=x(3.4028234663852886e+38);b:{if((Vi(a,3)|0)<1){break b}c=x(fj(a,3))}if((Vi(a,4)|0)>=1){b=(Uj(a,4)|0)!=0}else{b=0}d=x(1);c:{if((Vi(a,5)|0)<1){break c}d=x(fj(a,5))}e=x(0);d:{if((Vi(a,6)|0)<1){break d}e=x(fj(a,6))}YJ(j,i,f,g,k,c,b,d,e);if((h+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2387,206937);G()}return 1}function OZ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;e=Ii-16|0;Ii=e;a:{b:{c=Am(a,2,10);if((c|0)==10){hm(a,1);if(!Oj(a,1)){break b}f=Mj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=f;q[a+8>>2]=q[a+8>>2]+16;break a}b=kj(a,1,0);if(c-2>>>0>=35){dk(a,2,144168)}c=Cx(b,e+12|0,c);d=q[e+12>>2];if((b|0)==(d|0)){break b}b=r[d|0];if((b|0)==32|b-9>>>0<5){while(1){b=r[d+1|0];d=d+1|0;if((b|0)==32|b-9>>>0<5){continue}break}}if(b){break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}Ii=e+16|0;return 1}function Mj(a,b){var c=0,d=0,e=0;d=Ii-16|0;Ii=d;a:{b:{c:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break c}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break c}d:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break c;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break c;case 0:c=a+72|0;break c;default:break d}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}b=c;if(q[b+8>>2]==3){break b}b=Qu(b,d);if(b){break b}e=0;break a}e=v[b>>3]}Ii=d+16|0;return e}function Bo(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=-4;f=q[e+4>>2];a:{if(f>>>0>2]+1>>>0){break a}h=q[e+8>>2];if(!h){break a}Ui(h,0,f<<2);g=q[e+8>>2];f=q[c+4>>2];if(f){h=q[b+4>>2];j=f>>>0>h>>>0?h:f;k=f+1<<2;h=0;while(1){l=q[g>>2];i=q[b+8>>2];m=q[i>>2];n=i;i=q[q[a+8>>2]+(h<<2)>>2];dy(j,n,g,i);dy(f,q[c+8>>2],g,w(w(i,m)+l|0,d));q[g>>2]=i;g=g+4|0;q[k+g>>2]=0;h=h+1|0;if((f|0)!=(h|0)){continue}break}}Ti(q[a+8>>2],g,(f<<2)+4|0);g=0;if((xs(a,c)|0)>=0){cy(f,q[c+8>>2],q[a+8>>2]);return 0}cy(f,q[a+8>>2],q[e+8>>2])}return g}function BJ(a,b,c,d,e,f,g,h){var i=0,j=0;o[b+1|0]=0;o[b+2|0]=255;if(d){i=r[d+1|0];o[b+1|0]=i}f=(f?32-z(f)|0:0)&65535;j=q[a+412>>2]&134217728;a:{if(!j){a=e+1<>2]<<5>>31&15;o[c|0]=0;o[c+2|0]=0;a=r[b|0];o[c+1|0]=a;if(!d){break a}o[c|0]=r[d|0];o[c+1|0]=a|r[d+1|0]}o[c+3|0]=r[c+3|0]|15;if((f+h|0)+(j?e+1|0:g)>>>0>=9){Pi(3,199633,201575,0)}}function y0(a){a=a|0;var b=0,c=0,d=0;b=Ii+ -64|0;Ii=b;c=q[a+4>>2];a:{if(c>>>0<8){break a}q[b+48>>2]=1;c=c-7|0;q[b+52>>2]=c;d=-20352;if(c>>>0>9){break a}q[b+16>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+56>>2]=b;c=Ti(b,q[a+8>>2]+28|0,c<<2);d=kl(c+48|0,31);if(d){break a}q[c+52>>2]=q[c+52>>2]+1;d=dp(a,255,0);if(d){break a}d=q[a+4>>2];if(d>>>0>=9){Ui(q[a+8>>2]+32|0,0,(d<<2)-32|0)}d=Tq(c+48|0,c+48|0,19);if(d){break a}d=ys(a,a,c+48|0)}Ii=b- -64|0;return d|0}function Si(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}b=d;c=Yj(a,c,hj(c));q[e+8>>2]=4;q[e>>2]=c;Ru(a,b,e,q[a+8>>2]-16|0);q[a+8>>2]=q[a+8>>2]-16;Ii=e+16|0}function lL(a,b,c,d){var e=0,f=0,g=0;e=Ii-16|0;Ii=e;f=-13;if(!Qj(b,c,q[58542],e+4|0)){c=$i(32);b=c;q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;f=b+8|0;b=f;q[b>>2]=0;q[b+4>>2]=0;b=q[e+4>>2];g=r[b+4|0];o[c+28|0]=g;o[c+28|0]=r[b+5|0]<<1|g;q[c>>2]=Oi(q[b>>2]);q[c+4>>2]=Li;a:{b:{b=q[q[e+4>>2]>>2];c:{if(yv(a,b,e+12|0,e+8|0)){f=-3;a=59462;break c}a=Qj(q[e+12>>2],q[e+8>>2],q[57198],f);Ni(q[e+12>>2]);if(!a){break b}f=-2;a=59503}q[e>>2]=b;Pi(4,59454,a,e);break a}f=0}Aj(q[e+4>>2]);q[d>>2]=c}Ii=e+16|0;return f}function hha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;e=nj(b+56|0,a,1,65882,826);a:{if((Vi(a,1)|0)==7){c=_i(a,1,q[74078],0);if(c){if(Vo(q[c>>2])){break a}}Qi(a,66244,0)}Nk(a,1,65680);c=0}d=Pr(q[c>>2],q[c+8>>2],q[c+12>>2],b+52|0,b+48|0);c=aj(q[c+8>>2],q[c+12>>2]);b:{if(!d){d=q[b+52>>2];c:{if(d>>>0<=8){d=q[(d<<2)+262672>>2];break c}d=154037}q[b+16>>2]=q[b+48>>2];q[b>>2]=65665;q[b+4>>2]=65680;q[b+8>>2]=c;q[b+12>>2]=d;Lj(a,66167,b);break b}q[b+40>>2]=c;q[b+36>>2]=65680;q[b+32>>2]=65665;Lj(a,66204,b+32|0)}mj(e);Ii=b+80|0;return 1}function Rqa(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[57366],d+12|0)){Kr(q[d+12>>2]);a:{c=q[d+12>>2];e=q[c+48>>2];if(!e){break a}if(q[c+56>>2]){b=0;while(1){Ek(q[a+20>>2],q[q[c+52>>2]+(b<<2)>>2]);c=q[d+12>>2];b=b+1|0;if((e|0)==(b|0)){break a}if(t[c+56>>2]>b>>>0){continue}break}}J(21112,21124,45,21151);G()}e=q[c+144>>2];if(e){c=q[c+140>>2];b=0;while(1){Ek(q[a+20>>2],q[c+(b<<2)>>2]);b=b+1|0;if((e|0)!=(b|0)){continue}break}c=q[d+12>>2]}q[q[a+24>>2]>>2]=c;b=0}Ii=d+16|0;return b|0}function lt(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-1024|0;Ii=e;Mo(b,e);g=Wl(e,hj(e));h=Li;b=-10;d=q[a>>2];a=q[d+4>>2];a:{if(!a){break a}a=q[q[d>>2]+(Cza(g,h,a)<<2)>>2];if((a|0)==-1){break a}d=q[d+8>>2];while(1){f=d+w(a,48)|0;if(q[f>>2]!=(g|0)|q[f+4>>2]!=(h|0)){a=q[f+40>>2];if((a|0)!=-1){continue}break a}break}a=d+w(a,48)|0;b=q[a+12>>2];q[c>>2]=q[a+8>>2];q[c+4>>2]=b;b=q[a+36>>2];q[c+24>>2]=q[a+32>>2];q[c+28>>2]=b;b=q[a+28>>2];q[c+16>>2]=q[a+24>>2];q[c+20>>2]=b;b=q[a+20>>2];q[c+8>>2]=q[a+16>>2];q[c+12>>2]=b;b=0}Ii=e+1024|0;return b}function EF(a,b){var c=0,d=0,e=0,f=0;vj(a,0,0);f=q[a+8>>2]-q[a+12>>2]>>4;Xi(a,137030);Xi(a,q[b>>2]);pj(a,f);Xi(a,137035);Xi(a,137038);c=q[b+4>>2];vj(a,0,0);if(!(!c|!q[c>>2])){d=1;while(1){e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Xi(a,q[c>>2]);pj(a,-3);d=d+1|0;e=q[c+4>>2];c=c+4|0;if(e){continue}break}}pj(a,f);vj(a,0,0);c=q[b+16>>2];if(!(!c|!q[c>>2])){d=1;while(1){b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Xi(a,Vy(q[q[c>>2]>>2]));pj(a,-3);d=d+1|0;b=q[c+4>>2];c=c+4|0;if(b){continue}break}}pj(a,f)}function Aw(a,b){var c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;d=q[b+80>>2];e=q[d+3128>>2];b=q[b+140>>2]&32767;if(b>>>0>=q[d+3132>>2]-e>>6>>>0){J(12419,9962,479,9454);G()}b=e+(b<<6)|0;u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];op(a,c);Ii=c- -64|0}function u2(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;e=1;b=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-119|0){case 1:c=+u[b>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 2:c=+u[b+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 3:c=+u[b+8>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 0:c=+u[b+12>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;default:break b}}q[d+4>>2]=134016;q[d>>2]=134064;e=Qi(a,134856,d)}Ii=d+16|0;return e|0}function P3(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;e=1;b=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-119|0){case 1:c=+u[b>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 2:c=+u[b+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 3:c=+u[b+8>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;case 0:c=+u[b+12>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break a;default:break b}}q[d+4>>2]=134032;q[d>>2]=134064;e=Qi(a,134856,d)}Ii=d+16|0;return e|0}function Lr(a,b){var c=x(0),d=x(0),e=0,f=0,g=x(0),h=x(0),i=x(0),j=x(0),k=x(0),l=x(0),m=x(0),n=x(0);e=q[b+80>>2];f=q[e+3128>>2];b=q[b+140>>2]&32767;if(b>>>0>=q[e+3132>>2]-f>>6>>>0){J(12419,9962,479,9454);G()}b=f+(b<<6)|0;g=u[b+28>>2];h=u[b+24>>2];i=u[b+20>>2];j=u[b+16>>2];k=u[b+44>>2];l=u[b+40>>2];m=u[b+36>>2];n=u[b+32>>2];c=u[b>>2];d=x(c*c);c=u[b+4>>2];d=x(d+x(c*c));c=u[b+8>>2];d=x(d+x(c*c));c=u[b+12>>2];u[a>>2]=F(x(d+x(c*c)));u[a+8>>2]=F(x(x(x(x(n*n)+x(m*m))+x(l*l))+x(k*k)));u[a+4>>2]=F(x(x(x(x(j*j)+x(i*i))+x(h*h))+x(g*g)))}function D2(a){a=a|0;var b=0,c=x(0),d=x(0),e=0,f=x(0);e=Ii-32|0;Ii=e;a:{if(!(q[a+8>>2]-q[a+12>>2]>>4)){break a}if(q[a+8>>2]-q[a+12>>2]>>4==1){if((Vi(a,-1)|0)==3){c=x(Mj(a,-1));f=c;d=c;break a}b=_i(a,-1,q[210436],0);c=u[b>>2];f=u[b+4>>2];if(!(c!=c|f!=f)){d=u[b+8>>2];if(d==d){break a}}d=u[b+8>>2];v[e+16>>3]=f;v[e+24>>3]=d;v[e+8>>3]=c;q[e>>2]=-1;Qi(a,134131,e);d=u[b+8>>2];f=u[b+4>>2];c=u[b>>2];break a}c=x(fj(a,1));f=x(fj(a,2));d=x(fj(a,3))}b=yj(a,16);u[b+8>>2]=d;u[b+4>>2]=f;u[b>>2]=c;Zi(a,-1e4,134e3);xj(a,-2);Ii=e+32|0;return 1}function Zi(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}b=d;c=Yj(a,c,hj(c));q[e+8>>2]=4;q[e>>2]=c;Ls(a,b,e,q[a+8>>2]);q[a+8>>2]=q[a+8>>2]+16;Ii=e+16|0}function TF(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-48|0;Ii=e;a:{b:{g=r[254432];if((g|0)!=46){d=a;while(1){c:{c=r[d|0];d:{if((c-48&255)>>>0<10){break d}f=c-43|0;if((f|0)!=1?f>>>0<=3:0){break d}if(((c|32)-97&255)>>>0>24){break c}}d=d+1|0;continue}break}d=d-a|0;if(!d){q[b>>2]=a;break a}c=e+16|0;if((d|0)>=32){c=Yi(d+1|0);if(!c){break b}}c=Ti(c,a,d);o[c+d|0]=0;f=gk(c,46);if(f){o[f|0]=g}h=nu(c,e+12|0);q[b>>2]=(q[e+12>>2]-c|0)+a;if((d|0)<32){break a}Ni(c);break a}h=nu(a,b);break a}Kl(138871,13,1,q[53736]);G();G()}Ii=e+48|0;return h}function Oz(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;f=q[a+4>>2];e=q[f+16>>2];e=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);a:{if(!(o[a+20|0]&1)){a=q[a+8>>2];h=q[a+1028>>2];i=q[a+1024>>2];break a}a=q[f+24>>2];i=f+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0;a=q[f+20>>2];h=f+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0}j=1;b:{if((e|0)<1){break b}f=e-1|0;a=0;while(1){e=((f-a|0)/2|0)+a|0;g=Ej(b,(e<<6)+i|0,c);if(!g){j=0;if(!d){break b}q[d>>2]=(e<<4)+h;return 0}g=(g|0)>0;f=g?f:e-1|0;a=g?e+1|0:a;if((f|0)>=(a|0)){continue}break}}return j}function uz(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;a:{b:{d=q[79291];c:{if(!d){break c}d=q[q[79290]+((b>>>0)%(d>>>0)<<2)>>2];if((d|0)==-1){break c}f=q[79292];while(1){g=f+w(d,12)|0;if(q[g>>2]==(b|0)){break b}d=q[g+8>>2];if((d|0)!=-1){continue}break}}d=0;vj(a,0,0);if(!r[b+24|0]){break a}while(1){f=w(d,24);Xi(a,q[f+q[b+20>>2]>>2]);TG(a,f+q[b+20>>2]|0,c,c);Ij(a,-3);d=d+1|0;if(d>>>0>2]](a,b,c)|0;if(!c){break a}b=q[b+4>>2];q[e+4>>2]=c;q[e>>2]=b;Qi(a,124621,e)}Ii=e+16|0}function un(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;q[e+12>>2]=c;a:{if(!r[a+16|0]){c=q[a+8>>2];break a}c=1;d=q[a+12>>2];f=q[a+8>>2];g=q[a+4>>2]+(f^-1)|0;d=(d|0)<(g|0)?d:g;if((d|0)>=1){o[q[a>>2]+f|0]=32;if((d|0)!=1){while(1){o[q[a>>2]+(q[a+8>>2]+c|0)|0]=32;c=c+1|0;if((d|0)!=(c|0)){continue}break}}f=q[a+8>>2]}o[a+16|0]=0;c=d+f|0;q[a+8>>2]=c}Gq(q[a>>2]+c|0,q[a+4>>2]-c|0,b,q[e+12>>2]);o[(q[a+4>>2]+q[a>>2]|0)-1|0]=0;q[a+8>>2]=hj(q[a>>2]);if(gk(b,10)){o[a+16|0]=1}if(q[a+8>>2]>q[a+4>>2]){J(172785,172754,64,172810);G()}Ii=e+16|0}function r8(a,b){var c=0,d=0,e=0;c=q[a+2012>>2];e=q[c+8>>2]-q[c+12>>2]|0;d=Ui(yj(c,332),0,304);q[d+324>>2]=-2;q[d+328>>2]=-2;q[d+316>>2]=0;q[d+320>>2]=-2;q[d+308>>2]=b;b=q[a+2036>>2];q[d+304>>2]=a;q[d+312>>2]=b;Wi(q[a+2016>>2],40,d,d+8|0,d+4|0);zA(d+16|0,16,8);ej(c,-1);q[d+320>>2]=zk(c,-1e4);vj(c,0,0);q[d+324>>2]=zk(c,-1e4);vj(c,0,0);q[d+328>>2]=zk(c,-1e4);Zi(c,-1e4,118036);xj(c,-2);yk(c);Az(q[d+312>>2]);a=q[c+8>>2];q[a+8>>2]=0;q[c+8>>2]=a+16;yk(c);if(e>>4!=q[c+8>>2]-q[c+12>>2]>>4){J(115568,115465,3293,119385);G()}return d}function Uj(a,b){var c=0;a:{b:{c:{d:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break d}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break d}e:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break d;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break d;case 0:c=a+72|0;break d;default:break e}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}b=c;a=q[b+8>>2];switch(a|0){case 0:break a;case 1:break c;default:break b}}return q[b>>2]!=0}a=1}return a}function Fga(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;g=Ii-32|0;Ii=g;q[g+24>>2]=0;q[74902]=q[74902]+1;q[g+16>>2]=1;q[g+20>>2]=0;q[g+8>>2]=1;q[g+12>>2]=0;a:{b:{c:{if(a){if(!f){break c}Q(34963,f|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}yc(q[(b<<2)+92020>>2],d|0,q[(e<<2)+91872>>2],c|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}Ii=g+32|0;return}J(88567,88575,1831,91988);G()}J(92007,88575,1832,91988);G()}lj(a,91988,1834);J(88669,88575,1834,91988);G()}lj(a,91988,1837);J(88669,88575,1837,91988);G()}function zz(a){var b=0,c=0,d=0,e=0;b=q[a+8>>2]-q[a+12>>2]>>4;c=q[79286];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);a:{b:{c:{d:{if($l(a,-1)){bj(a,122560,10);jl(a,-2);ll(a,-2);if(Vi(a,-1)){break d}Ri(a,-2)}Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4==(b|0)){break c}J(123067,122672,924,123051);G()}ej(a,-2);Rk(a,1,1);if((b+2|0)!=q[a+8>>2]-q[a+12>>2]>>4){break b}c=Uj(a,-1);Ri(a,-3);if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){break a}e=(c|0)!=0}return e}J(123026,122672,917,123051);G()}J(123067,122672,920,123051);G()}function fn(a){a=Ui(a,0,304);q[a+20>>2]=0;q[a+24>>2]=0;q[a+16>>2]=1065353216;q[a+28>>2]=0;q[a+32>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+36>>2]=1065353216;q[a+48>>2]=0;q[a+52>>2]=0;q[a+60>>2]=0;q[a+64>>2]=0;q[a+56>>2]=1065353216;q[a+68>>2]=0;q[a+72>>2]=0;q[a+84>>2]=0;q[a+88>>2]=0;q[a+76>>2]=1065353216;q[a+80>>2]=1065353216;q[a+92>>2]=0;q[a+96>>2]=0;q[a+104>>2]=0;q[a+108>>2]=0;q[a+100>>2]=1065353216;q[a+112>>2]=0;q[a+116>>2]=0;q[a+120>>2]=1065353216;q[a+124>>2]=0;q[a+128>>2]=0;q[a+132>>2]=0;q[a+136>>2]=0;q[a+140>>2]=1065353216}function rj(a,b,c){var d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;d=b>>>0>2]?b:141056;break a}d=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:d=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;d=a+88|0;break a;case 0:d=a+72|0;break a;default:break b}}d=q[q[q[a+20>>2]+4>>2]>>2];d=r[d+7|0]<(-10002-b|0)?141056:(d+(0-b<<4)|0)-160024|0}b=tZ(q[d>>2],c);d=q[b+4>>2];c=q[a+8>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;q[c+8>>2]=q[b+8>>2];q[a+8>>2]=q[a+8>>2]+16}function Xka(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=nj(b+56|0,a,0,73366,964);q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;a:{if(!qm(a,b+24|0)){a=Kj(d,75447,0);break a}et(a,q[74444]);c=qj(a,-1);Ri(a,-2);e=q[q[q[jk(a)+80>>2]+8>>2]>>2];c=q[c+8>>2];if(t[q[e+4>>2]>>2]>c>>>0){c=q[((c<<2)+e|0)+12>>2]}else{c=0}if(!c){a=Kj(d,73654,0);break a}a=Bl(a,1);u[b>>2]=u[a>>2];u[b+4>>2]=u[a+4>>2];u[b+8>>2]=u[a+8>>2];b:{if(o[c+141|0]&1){break b}}a=0}mj(d);Ii=b+80|0;return a|0}function HD(a,b,c){var d=0,e=0;d=Ii-80|0;Ii=d;q[d+76>>2]=0;q[d+68>>2]=0;q[d+72>>2]=0;q[d+64>>2]=c;q[d+60>>2]=b;q[d+56>>2]=a;e=S(1,d+56|0)|0;if(e>>>0>=4294963201){q[240513]=0-e;e=-1}a:{if(!(b&526336)|((e|0)>-1|(q[240513]!=66?q[240513]!=28:0))){break a}q[d+44>>2]=0;q[d+48>>2]=0;q[d+40>>2]=c;q[d+32>>2]=a;q[d+36>>2]=b&-526337;q[d+52>>2]=0;e=S(1,d+32|0)|0;if(e>>>0>=4294963201){q[240513]=0-e;e=-1}if((e|0)<0){break a}if(b&524288){q[d+16>>2]=1;R(e|0,2,d+16|0)|0}if(!(b&2048)){break a}q[d>>2]=2048;R(e|0,4,d|0)|0}Ii=d+80|0;return e}function Uja(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=-2;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[58514],b+12|0)){break a}q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;e=q[a>>2];c=q[b+12>>2];d=r[c+4|0];o[b+8|0]=d;o[b+8|0]=d|r[c+5|0]<<1;c=Pk(q[c>>2]);q[b+4>>2]=c;b:{c:{if(d){Aj(q[b+12>>2]);break c}c=ak(e,c,b);Aj(q[b+12>>2]);if(c){break b}}c=q[q[a+32>>2]+8>>2];d=q[c>>2];if(d){cj(q[a>>2],d)}Ni(q[c+4>>2]);q[c+8>>2]=q[b+8>>2];a=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=a;c=0;break a}d=q[b>>2];if(d){cj(q[a>>2],d)}Ni(q[b+4>>2])}Ii=b+16|0;return c|0}function Aea(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=q[a+100>>2];a:{if(!d){break a}d=q[q[a+96>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}f=q[a+104>>2];while(1){e=f+(d<<4)|0;if(q[e>>2]!=(b|0)|q[e+4>>2]!=(c|0)){d=q[e+12>>2];if((d|0)!=-1){continue}break a}break}b=q[a+68>>2];if(!b){break a}c=q[(f+(d<<4)|0)+8>>2];d=q[q[a+64>>2]+((c>>>0)%(b>>>0)<<2)>>2];if((d|0)==-1){break a}a=q[a+72>>2];while(1){b=a+w(d,24)|0;if((c|0)!=q[b>>2]){d=q[b+16>>2];if((d|0)!=-1){continue}break a}break}a=a+w(d,24)|0;g=q[a+8>>2];h=q[a+12>>2]}Li=h;return g}function jm(a,b,c,d){var e=0,f=0,g=0;e=Ii-32|0;Ii=e;a:{f=q[a+8>>2]-q[a+12>>2]>>4;if((f|0)>-1){Ak(a,b,c);c=q[a+8>>2]-q[a+12>>2]>>4;Ns(a,b);b=AG(a,b);g=q[a+8>>2]-q[a+12>>2]|0;Ak(a,0,d);bj(a,123014,11);ej(a,c);pj(a,g>>4);Ri(a,-3);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(f|0)){break a}Ii=e+32|0;return b}q[e+12>>2]=f;q[e+4>>2]=706;q[e+8>>2]=0;q[e>>2]=122672;Pi(4,122749,123291,e);J(123363,122672,1469,123380);G()}q[e+28>>2]=a;q[e+24>>2]=f;q[e+20>>2]=706;q[e+16>>2]=122672;Pi(4,122749,123394,e+16|0);J(123465,122672,1492,123484);G()}function nha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;e=jk(a);c=Bl(a,2);u[b+64>>2]=u[c>>2];u[b+68>>2]=u[c+4>>2];u[b+72>>2]=u[c+8>>2];q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);c=q[59038];vk(b,b+32|0,q[c+8>>2],q[c+12>>2],e,c,b- -64|0,16);if(d>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(80636,80657,403,80786);G()}Ii=b+80|0;return 0}function eja(a){a=a|0;var b=0,c=0,d=0,e=0;c=q[a+4>>2];b=$i(32);q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;c=HL(q[a>>2],q[a+12>>2],q[a+16>>2],c,b);if(!c){q[q[a+24>>2]+8>>2]=b;mq(q[a>>2],510,b);return c|0}e=q[a>>2];a=q[b+28>>2];if(a){cj(e,a)}d=q[b>>2];if((d|0)!=q[b+4>>2]){a=0;while(1){cj(e,q[(a<<2)+d>>2]);a=a+1|0;d=q[b>>2];if(a>>>0>2]-d>>2>>>0){continue}break}}a=q[b+24>>2];if(a){RH(a)}a:{if(o[b+12|0]&1){break a}a=q[b>>2];if(!a){break a}Ni(a)}Ni(b);return c|0}function qj(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}b=c;a=0;c:{switch(q[b+8>>2]-2|0){case 5:return q[b>>2]+32|0;case 0:a=q[b>>2];break;default:break c}}return a}function Uba(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;c=Ii-32|0;Ii=c;a:{b=tj(a,1,c+28|0);if(!(r[b+415|0]&16)){d=Om(a,2);b:{if(d){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(c,j,q[c+28>>2],6);e=u[d>>2];f=u[c+12>>2];g=u[d+8>>2];h=u[d+4>>2];break b}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+96>>2]=e;u[b+108>>2]=f;u[b+104>>2]=g;u[b+100>>2]=h;q[b+412>>2]=q[b+412>>2]|4194304}Ii=c+32|0;return 0}J(202212,202233,187,202255);G()}function FB(a){var b=0,c=0;c=q[a>>2];b=q[a+4>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+8>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+12>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+16>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+20>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+24>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+28>>2];if((b|0)!=-2){Rj(c,-1e4,b)}Rj(c,-1e4,q[a+48>>2]);a:{if(o[a- -64|0]&1){break a}c=q[a+52>>2];if(!c){break a}Ni(c)}a=Ui(a,0,68);q[a+48>>2]=-2;q[a+28>>2]=-2;q[a+20>>2]=-2;q[a+24>>2]=-2;q[a+12>>2]=-2;q[a+16>>2]=-2;q[a+4>>2]=-2;q[a+8>>2]=-2}function BU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-32|0;Ii=b;d=Fl(a,138013);e=kj(a,2,0);f=dj(e,138461);c=138463;a:{if(!f){break a}c=kj(a,3,0)}g=d+8|0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=2;q[b>>2]=0;q[b+4>>2]=0;h=q[d+32>>2];q[b+4>>2]=h;b:{c:{if(f){c=Ty(d,d+32|0,e,c,g,b);if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,c);a=2;break b}Np(a,137981,1);break c}b$(d,h,g);Np(a,137996,1)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=b+32|0;return a|0}function yqa(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;e=nj(b+72|0,a,1,15159,2269);gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);d=q[c+4>>2];c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;qm(a,b+40|0);q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+8|0,b+40|0);d=(jn(q[q[d+80>>2]+8>>2],q[b+24>>2],q[b+28>>2])|0)!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=b+96|0;return 1}function saa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){b:{g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)!=-1){f=q[a+8>>2];d=f+(e<<4)|0;if((b|0)==q[d>>2]&q[d+4>>2]==(c|0)){break a}break b}J(125722,125635,340,125716);G()}while(1){e=q[((e<<4)+f|0)+12>>2];if((e|0)!=-1){h=d;d=(e<<4)+f|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){continue}break a}break}J(125749,125635,366,125716);G()}J(125695,125635,334,125716);G()}q[a+24>>2]=q[a+24>>2]-1;b=(e<<4)+f|0;q[(h?h+12|0:g)>>2]=q[b+12>>2];c=q[a+20>>2];q[a+20>>2]=e;q[b+12>>2]=c}function t4(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=0,g=0,h=0,i=0,j=0,k=0;f=fj(a,1);g=fj(a,2);h=fj(a,3);i=fj(a,4);j=fj(a,5);k=fj(a,6);b=yj(a,64);q[b+4>>2]=0;q[b+8>>2]=0;d=x(g);e=x(f);c=x(x(1)/x(d-e));u[b>>2]=c+c;q[b+24>>2]=0;q[b+28>>2]=0;q[b+60>>2]=1065353216;u[b+48>>2]=c*x(-x(e+d));q[b+44>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;d=x(i);e=x(h);c=x(x(1)/x(d-e));u[b+20>>2]=c+c;q[b+32>>2]=0;q[b+36>>2]=0;u[b+52>>2]=c*x(-x(e+d));d=x(j);e=x(k);c=x(x(1)/x(d-e));u[b+56>>2]=x(d+e)*c;u[b+40>>2]=c+c;Zi(a,-1e4,134048);xj(a,-2);return 1}function p5(a){var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;c=Bw(a);a:{if(c){break a}c=SA(a);if(!c){c=0;break a}c=q[q[c+376>>2]+12>>2]}b:{if(!Vi(a,1)){break b}c=q[q[c+80>>2]+8>>2];q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;Gk(a,1,b+16|0,0);c:{if(!c){break c}d=q[c>>2];if(!d){break c}e=q[d+3216>>2];f=q[d+3220>>2]}if((e|0)!=q[b+16>>2]|(f|0)!=q[b+20>>2]){Qi(a,58835,0)}c=jn(c,q[b+32>>2],q[b+36>>2]);if(c){break b}c=0;q[b>>2]=uj(a,1,0);Qi(a,58905,b)}Ii=b+48|0;return c}function qca(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;c=Ii-32|0;Ii=c;a:{b=tj(a,1,c+28|0);if(!(r[b+415|0]&16)){d=Om(a,2);b:{if(d){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(c,j,q[c+28>>2],3);e=u[d>>2];f=u[c+12>>2];g=u[d+8>>2];h=u[d+4>>2];break b}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+48>>2]=e;u[b+60>>2]=f;u[b+56>>2]=g;u[b+52>>2]=h;q[b+412>>2]=q[b+412>>2]|4194304}Ii=c+32|0;return 0}J(202212,202233,187,202255);G()}function nta(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-16|0;Ii=f;h=2;a:{b:{c:{d:{if((c|0)!=2){break d}if(!vq(e,f+12|0)){break d}if(!SM(e,q[f+12>>2],f+8|0)){break d}c=q[d+4>>2];if((c&-268435456)==805306368){break c}if((c&264241152)!=50331648){break b}g=q[f+8>>2];e=q[f+12>>2];c=vta(b,e);h=0;if(r[a+12|0]){break d}g=Ti(c,g,e);a=q[a+4>>2]+q[d+12>>2]|0;if(q[a+4>>2]){break a}c=o[b+48|0]&1?g-q[b+32>>2]|0:c;q[a+4>>2]=e;q[a>>2]=c}Ii=f+16|0;return h}J(23397,23354,134,23430);G()}J(23871,23354,349,23906);G()}J(23915,23354,359,23906);G()}function jl(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=Rs(q[c>>2],q[a+8>>2]-16|0);c=q[b+4>>2];a=q[a+8>>2]-16|0;q[a>>2]=q[b>>2];q[a+4>>2]=c;q[a+8>>2]=q[b+8>>2]}function gn(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-576|0;Ii=d;q[d+572>>2]=c;b=Gq(d+48|0,512,b,c);a:{if((b|0)<=511){c=aj(q[a+64>>2],q[a+68>>2]);e=sm(q[a>>2],q[a+4>>2]);f=aj(q[a+16>>2],q[a+20>>2]);g=aj(q[a+24>>2],q[a+28>>2]);h=sm(q[a+32>>2],q[a+36>>2]);i=aj(q[a+48>>2],q[a+52>>2]);q[d+40>>2]=aj(q[a+56>>2],q[a+60>>2]);q[d+36>>2]=i;q[d+32>>2]=h;q[d+28>>2]=g;q[d+24>>2]=f;q[d+20>>2]=e;q[d+16>>2]=c;if((sj(b+(d+48|0)|0,512-b|0,58202,d+16|0)+b|0)<511){break a}}Pi(4,58248,58256,0)}q[d>>2]=d+48;Pi(4,58248,58321,d);Ii=d+576|0}function f3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;e=kj(a,1,0);Dj(a,2,5);a:{b:{d=VG(a,2);if(d>>>0<524289){c=317296;break b}q[b+44>>2]=0;Ro(b+44|0,16,d);c=q[b+44>>2];if(c){break b}q[b>>2]=d;a=Qi(a,129846,b);break a}d=ft(a,c,d,2);f=dl(e,129899);if(!f){if((c|0)!=317296){Ni(c)}q[b+16>>2]=e;a=Qi(a,129902,b+16|0);break a}d=(Kl(c,1,d,f)|0)==(d|0)&!rk(f);if((c|0)!=317296){Ni(c)}if(!d){Mn(e);q[b+32>>2]=e;a=Qi(a,129902,b+32|0);break a}c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=b+48|0;return a|0}function dca(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;c=Ii-32|0;Ii=c;a:{b=tj(a,1,c+28|0);if(!(r[b+415|0]&16)){d=Om(a,2);b:{if(d){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(c,j,q[c+28>>2],5);e=u[d>>2];f=u[c+12>>2];g=u[d+8>>2];h=u[d+4>>2];break b}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+80>>2]=e;u[b+92>>2]=f;u[b+88>>2]=g;u[b+84>>2]=h;q[b+412>>2]=q[b+412>>2]|4194304}Ii=c+32|0;return 0}J(202212,202233,187,202255);G()}function Wba(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;c=Ii-32|0;Ii=c;a:{b=tj(a,1,c+28|0);if(!(r[b+415|0]&16)){d=Om(a,2);b:{if(d){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(c,j,q[c+28>>2],2);e=u[d>>2];f=u[c+12>>2];g=u[d+8>>2];h=u[d+4>>2];break b}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+32>>2]=e;u[b+44>>2]=f;u[b+40>>2]=g;u[b+36>>2]=h;q[b+412>>2]=q[b+412>>2]|4194304}Ii=c+32|0;return 0}J(202212,202233,187,202255);G()}function zK(a,b,c,d,e,f){var g=0,h=0;g=Ii-16|0;Ii=g;q[g+4>>2]=d;h=-4;if(q[a+120>>2]!=q[a+112>>2]-q[a+104>>2]>>4){if(!q[a+372>>2]){q[a+372>>2]=d}q[g+8>>2]=e;q[g+12>>2]=f;e=a- -64|0;f=q[a+88>>2];if((f|0)==((q[a+80>>2]-q[a+72>>2]|0)/24|0)){f=f+8|0;rA(e,(f<<1)/3|0,f)}sA(e,d,g+8|0);Em(a+96|0,b,c,g+4|0);e=q[a+32>>2];d=q[a+36>>2]-e|0;a=(d|0)/592|0;if(d){f=a>>>0>1?a:1;a=0;while(1){d=e+w(a,592)|0;if(q[d+480>>2]==(b|0)&q[d+484>>2]==(c|0)){q[d+488>>2]=q[g+4>>2]}a=a+1|0;if((f|0)!=(a|0)){continue}break}}h=0}Ii=g+16|0;return h}function Kea(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;Ui(q[a+96>>2],255,q[a+100>>2]<<2);q[a+116>>2]=-1;q[a+120>>2]=0;q[a+108>>2]=q[a+104>>2];f=q[a+32>>2];e=q[a+36>>2]-f|0;c=(e|0)/592|0;if(e){g=c>>>0>1?c:1;e=a- -64|0;c=0;while(1){d=w(c,592)+f|0;h=d;b=q[a+68>>2];a:{if(!b){break a}d=q[d+488>>2];b=q[q[e>>2]+((d>>>0)%(b>>>0)<<2)>>2];if((b|0)==-1){break a}i=q[a+72>>2];while(1){b=w(b,24)+i|0;if((d|0)!=q[b>>2]){b=q[b+16>>2];if((b|0)!=-1){continue}break a}break}DI(e,d)}q[h+488>>2]=0;c=c+1|0;if((g|0)!=(c|0)){continue}break}}}function vpa(a){a=a|0;var b=0,c=0,d=0,e=0;a:{b:{c:{b=q[a+80>>2];d=q[b+20>>2];c=q[b+24>>2];if((d|0)!=(c|0)){e=q[b+16>>2];if(!e){break c}if(c>>>0>=d>>>0){break b}q[b+24>>2]=c+1;c=q[(c<<2)+e>>2];d=q[b+4>>2];b=q[b>>2];if(c>>>0>=d-b>>7>>>0){break a}b=Ui(b+(c<<7)|0,0,128);q[b+48>>2]=1065353216;q[b+32>>2]=q[a+76>>2];q[b+40>>2]=q[a>>2];p[b+56>>1]=s[a+92>>1];q[q[a+88>>2]>>2]=b;return 0}xn(35852,q[57956],q[b+4>>2]-q[b>>2]>>7);return-1e3}J(36826,36775,151,36833);G()}J(36837,36775,152,36833);G()}J(36635,36646,479,36702);G()}function pH(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-1056|0;Ii=f;q[f+1048>>2]=c;q[f+1052>>2]=d;a:{b:{g=q[a>>2];h=q[g+24>>2];c:{if((h|0)==((q[g+16>>2]-q[g+8>>2]|0)/48|0)){q[f>>2]=h;q[f+4>>2]=q[57741];Pi(4,24640,25102,f);e=-11;break c}if(!q[e+8>>2]){break b}if(q[e+28>>2]!=1){break a}PI(g,c,d,e);sA(q[a+4>>2],q[e+8>>2],f+1048|0);e=0;if(!q[a+8>>2]){break c}Mo(b,f+16|0);a=q[a+8>>2];b=q[f+1048>>2];c=q[f+1052>>2];q[f+12>>2]=Pk(f+16|0);kJ(a,b,c,f+12|0)}Ii=f+1056|0;return e}J(25183,24997,850,25206);G()}J(25221,24997,851,25206);G()}function lI(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if(a){f=a;a:{b:{c:{d=r[a|0];if(d){while(1){h=e;c=f;d:{if((d&255)!=35){if((d&255)!=58){break d}f=g|h;e=0;g=c;if(!f){break d}return-5}e=c;if(!h){break d}return-5}f=c+1|0;d=r[c+1|0];if(d){continue}break}if(g){break c}}d=0;break b}d=g-a|0;c=-5;if(d>>>0>63){break a}i=a;a=g+1|0}q[b+8>>2]=a;q[b+4>>2]=d;q[b>>2]=i;c=e+1|0;q[b+16>>2]=e?c:0;q[b+12>>2]=(e?e:f)-a;q[b+20>>2]=e?f-c|0:0;c=0}return c}q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;return 0}function afa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a:{if(a){ec(q[(b<<2)+92808>>2],q[(c<<2)+92880>>2],q[(d<<2)+92880>>2],q[(e<<2)+92880>>2]);if(r[q[75054]+156|0]&64){f=K()|0;if(f){break a}}f=q[a+72>>2];g=q[a+76>>2];if((b|0)==1){h=c<<25&234881024;b=d&7;c=b>>>1|0;q[a+72>>2]=f&33554431|(e<<28&1879048192|(h|b<<31));q[a+76>>2]=c|g&-4;return}q[a+72>>2]=f&-4186113|(e<<16&458752|(d<<19&3670016|c<<13&57344));q[a+76>>2]=g;return}J(88636,88575,3759,92839);G()}lj(f,92839,3772);J(88669,88575,3772,92839);G()}function IF(a,b,c){var d=0,e=0;d=Ii-208|0;Ii=d;q[d+76>>2]=128;a:{if((A$(q[b>>2],d+80|0,d+76|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,mm(q[240513]));a=2;break a}b=ia(d+80|0,q[d+76>>2],d+16|0,46,d+10|0,6,3)|0;if(b){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,na(b|0)|0);a=2;break a}Xi(a,d+16|0);b=Kq(d+10|0,0);e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;b:{c:{switch(c-2|0){case 0:bj(a,136928,4);break b;case 8:bj(a,136933,5);break b;default:break c}}bj(a,136960,13)}a=3}Ii=d+208|0;return a}function xaa(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){b:{g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)!=-1){f=q[a+8>>2];d=f+w(e,24)|0;if((b|0)==q[d>>2]&q[d+4>>2]==(c|0)){break a}break b}J(45283,44993,340,45277);G()}while(1){e=q[(w(e,24)+f|0)+20>>2];if((e|0)!=-1){h=d;d=w(e,24)+f|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){continue}break a}break}J(45310,44993,366,45277);G()}J(45256,44993,334,45277);G()}q[a+24>>2]=q[a+24>>2]-1;b=w(e,24)+f|0;q[(h?h+20|0:g)>>2]=q[b+20>>2];c=q[a+20>>2];q[a+20>>2]=e;q[b+20>>2]=c}function ej(a,b){var c=0,d=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=c;d=q[b+4>>2];c=q[a+8>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;q[c+8>>2]=q[b+8>>2];q[a+8>>2]=q[a+8>>2]+16}function XH(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-1024|0;Ii=c;e=r[a|0];a:{b:{if(!e){break b}while(1){f=d;d=e;c:{if(!((d|0)!=47?(d|0)!=92:0)){o[c+f|0]=47;while(1){e=r[a|0];if((e|0)==92|(e|0)==47){a=a+1|0;continue}else{d=47;break c}}}o[c+f|0]=d;e=r[a+1|0];a=a+1|0}g=d;d=f+1|0;if(e?f>>>0<=1022:0){continue}break}if(!f){d=1;break b}if((g&255)==47){o[c+f|0]=0}a=1023;if(f>>>0>1021){break a}}a=d}o[a+c|0]=0;d:{if(s[c>>1]==46){break d}a=wm(c,47);if(a){if((a|0)==(c|0)){break d}o[a|0]=0;break d}o[c|0]=0}Pj(b,c,1024);Ii=c+1024|0}function lS(a,b){a=a|0;b=b|0;if((b|0)<=0){a=b+2|0;a:{if(a>>>0<=2){a=q[(a<<2)+253664>>2];break a}a=137265}return a|0}a=138489;b:{c:{switch(b-2|0){case 28:return 138512;case 0:return 138530;case 12:return 138548;case 11:return 138567;case 13:return 138567;default:if((b|0)==73){break b};case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:a=ql(b);break;case 1:break c}}return a|0}return 138574}function cla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-80|0;Ii=b;d=1;e=nj(b+24|0,a,1,73366,887);f=$j(a,2);g=Li;c=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;h=b- -64|0;q[h>>2]=0;q[h+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,c,73150,b+20|0,b+48|0,b+16|0);q[b+56>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;c=nL(q[b+16>>2],q[b+20>>2],f,g);a:{if(c){q[b>>2]=aj(f,g);q[b+8>>2]=c;q[b+4>>2]=q[(c<<2)+232752>>2];d=Kj(e,75344,b);break a}Al(a,b+48|0)}mj(e);Ii=b+80|0;return d|0}function Zba(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0,j=0;c=Ii-32|0;Ii=c;a:{b=tj(a,1,c+28|0);if(!(r[b+415|0]&16)){d=Om(a,2);b:{if(d){i=q[a+8>>2]-q[a+12>>2]|0;gj(a);j=Ck(a,-1,q[213927]);Ri(a,-2);if(i>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}Xl(c,j,q[c+28>>2],0);e=u[d>>2];f=u[c+12>>2];g=u[d+8>>2];h=u[d+4>>2];break b}a=rm(a,2);f=u[a+12>>2];e=u[a>>2];g=u[a+8>>2];h=u[a+4>>2]}u[b+12>>2]=f;u[b+8>>2]=g;u[b+4>>2]=h;u[b>>2]=e;q[b+412>>2]=q[b+412>>2]|4194304}Ii=c+32|0;return 0}J(202212,202233,187,202255);G()}function Cna(a){a=a|0;var b=0,c=0,d=0,e=0;d=q[a+8>>2];c=q[d+16>>2];e=q[q[a+16>>2]>>2];if(e>>>0>2]-c>>3>>>0){c=q[c+(e<<3)>>2];b=q[d>>2];if(c>>>0>2]-b>>2>>>0){a=q[q[q[a+4>>2]+80>>2]>>2];c=q[b+(c<<2)>>2];b=q[c+216>>2];if(b){cj(a,b)}b=q[c+184>>2];if(b){cj(a,b)}b=q[c+188>>2];if(b){cj(a,b)}b=q[c+192>>2];if(b){cj(a,b)}b=q[c+196>>2];if(b){cj(a,b)}b=q[c+200>>2];if(b){cj(a,b)}b=q[c+204>>2];if(b){cj(a,b)}b=q[c+208>>2];if(b){cj(a,b)}c=q[c+212>>2];if(c){cj(a,c)}Dt(d,e);return 0}}J(51709,51308,479,51547);G()}function eqa(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;e=Wl(c,hj(c));f=Li;q[d+12>>2]=b;g=a+3144|0;a:{c=q[a+3148>>2];b:{if(!c){break b}c=q[q[g>>2]+(Cza(e,f,c)<<2)>>2];if((c|0)==-1){break b}h=q[a+3152>>2];while(1){c=(c<<4)+h|0;if(q[c>>2]==(e|0)&q[c+4>>2]==(f|0)){c=-3;break a}c=q[c+12>>2];if((c|0)!=-1){continue}break}}c=-4;if(q[b+96>>2]!=q[71492]|q[b+100>>2]!=q[71493]){break a}q[b+96>>2]=e;q[b+100>>2]=f;wr(g,e,f,d+12|0);c=0;if(t[a+3168>>2]<=s[a+1058>>1]){break a}J(7842,7192,1e3,8106);G()}Ii=d+16|0;return c}function ZJ(a,b,c){var d=0,e=0,f=0;a:{b:{c:{e=b&65535;d=q[a+32>>2];f=(q[a+36>>2]-d|0)/592|0;if(e>>>0>>0){if(s[(w(e,592)+d|0)+568>>1]!=(b>>>16|0)){break c}a=s[(w(e,592)+d|0)+570>>1];if((a|0)!=(b&65535)){break b}if(c){while(1){a=a&65535;if(a>>>0>=f>>>0){break a}a=w(a,592)+d|0;b=q[a+412>>2]&1048576;if(b){a=s[a+576>>1];if((a|0)!=65535){continue}}break}return(b|0)!=0}return(r[(w(e,592)+d|0)+414|0]&16)>>>4|0}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function FQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;i=kj(a,1,f+12|0);c=Am(a,2,1);c=c+(q[f+12>>2]+1&c>>31)|0;e=(c|0)>0?c:0;b=Am(a,3,e);d=q[f+12>>2];b=b+(d+1&b>>31)|0;b=(b|0)>0?b:0;b=b>>>0>d>>>0?d:b;d=(e|0)>1?c:1;a:{if((b|0)<(d|0)){break a}e=b-d|0;g=e+1|0;if((b|0)==2147483647){Qi(a,146315,0)}jp(a,g,146315);c=0;if((e|0)<0){break a}b=d-1|0;d=e+1|0;while(1){e=r[(b+c|0)+i|0];h=q[a+8>>2];q[h+8>>2]=3;v[h>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;c=c+1|0;if((d|0)!=(c|0)){continue}break}}Ii=f+16|0;return g|0}function xr(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){b:{g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)!=-1){f=q[a+8>>2];d=f+(e<<4)|0;if((b|0)==q[d>>2]&q[d+4>>2]==(c|0)){break a}break b}J(12553,11185,340,12547);G()}while(1){e=q[((e<<4)+f|0)+12>>2];if((e|0)!=-1){h=d;d=(e<<4)+f|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){continue}break a}break}J(12580,11185,366,12547);G()}J(12526,11185,334,12547);G()}q[a+24>>2]=q[a+24>>2]-1;b=(e<<4)+f|0;q[(h?h+12|0:g)>>2]=q[b+12>>2];c=q[a+20>>2];q[a+20>>2]=e;q[b+12>>2]=c}function tj(a,b,c){var d=0,e=0,f=0,g=0;b=_i(a,b,q[213928],0);d=q[b>>2];e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=Ck(a,-1,q[213927]);Ri(a,-2);if((e|0)==q[a+8>>2]-q[a+12>>2]>>4){if((d|0)!=(f|0)){Qi(a,204360,0)}f=q[b>>2];d=q[f+32>>2];a:{b:{e=q[b+4>>2];g=e&65535;if(g>>>0>=(q[f+36>>2]-d|0)/592>>>0|s[(w(g,592)+d|0)+568>>1]!=(e>>>16|0)){break b}d=w(g,592)+d|0;if(s[d+570>>1]!=(e&65535)|r[d+415|0]&32){break b}d=TA(f,e);a=d;if(!c){break a}q[c>>2]=q[b+4>>2];return d}Qi(a,204389,0);a=0}return a}J(202212,202233,187,202255);G()}function nJ(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){b:{g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)!=-1){f=q[a+8>>2];d=f+(e<<4)|0;if((b|0)==q[d>>2]&q[d+4>>2]==(c|0)){break a}break b}J(30355,29648,340,30349);G()}while(1){e=q[((e<<4)+f|0)+12>>2];if((e|0)!=-1){h=d;d=(e<<4)+f|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){continue}break a}break}J(30382,29648,366,30349);G()}J(30328,29648,334,30349);G()}q[a+24>>2]=q[a+24>>2]-1;b=(e<<4)+f|0;q[(h?h+12|0:g)>>2]=q[b+12>>2];c=q[a+20>>2];q[a+20>>2]=e;q[b+12>>2]=c}function lJ(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{d=q[a+4>>2];if(d){b:{g=q[a>>2]+(Cza(b,c,d)<<2)|0;e=q[g>>2];if((e|0)!=-1){f=q[a+8>>2];d=f+(e<<4)|0;if((b|0)==q[d>>2]&q[d+4>>2]==(c|0)){break a}break b}J(27127,26666,340,27121);G()}while(1){e=q[((e<<4)+f|0)+12>>2];if((e|0)!=-1){h=d;d=(e<<4)+f|0;if(q[d>>2]!=(b|0)|q[d+4>>2]!=(c|0)){continue}break a}break}J(27154,26666,366,27121);G()}J(27100,26666,334,27121);G()}q[a+24>>2]=q[a+24>>2]-1;b=(e<<4)+f|0;q[(h?h+12|0:g)>>2]=q[b+12>>2];c=q[a+20>>2];q[a+20>>2]=e;q[b+12>>2]=c}function jP(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=Ii-96|0;Ii=h;q[e>>2]=0;q[h+4>>2]=0;lP(h+8|0);a:{b:{c:{if(!c){c=-10240;break c}if(d){kP(a,d,h+4|0)}d=0;j=a+204|0;i=j;d:{if(!i){break d}i=q[i>>2];if(!i){break d}d=q[i>>2]}i=q[c+4>>2]>>>d-1&1?0:-1;e:{if(d){break e}i=-1}if(i){q[h+4>>2]=q[h+4>>2]|32768}if(vC(c,j)){q[h+4>>2]=q[h+4>>2]|65536}c=mP(a,b,c,h+8|0);if(!c){q[h+12>>2]=q[h+12>>2]|q[h+4>>2];c=oP(e,h+8|0,f,g)}if((c|0)==-9984){c=-12288;break c}if(!c){break b}}q[e>>2]=-1;break a}c=q[e>>2]?-9984:0}Ii=h+96|0;return c}function Dm(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;q[f+12>>2]=0;a:{if((c|0)<1){break a}while(1){d=q[a+116>>2];b:{if(d){d=v5(d,b+g|0,c-g|0,f+12|0);break b}d=lv(q[a+112>>2],b+g|0,c-g|0,f+12|0)}e=(d|0)==-3?-101:d;if((e|0)!=-101?e:0){break a}h=q[a>>2];d=q[h+2204>>2];if(!(!d|!q[d>>2])){e=-3;break a}c:{if(!q[h+2160>>2]){break c}d=Jk();i=q[h+2160>>2];h=q[h+2168>>2];if((i|0)>(d-h|0)){break c}e=-3;break a}if((e|0)!=-101){if(e){break a}g=q[f+12>>2]+g|0}if((c|0)>(g|0)){continue}break}e=0}Ii=f+16|0;return e}function DI(a,b){var c=0,d=0,e=0,f=0,g=0;a:{d=q[a+4>>2];if(d){g=q[a>>2]+((b>>>0)%(d>>>0)<<2)|0;c=q[g>>2];if((c|0)==-1){break a}d=0;e=q[a+8>>2];f=e+w(c,24)|0;if(q[f>>2]!=(b|0)){while(1){c=q[(w(c,24)+e|0)+16>>2];if((c|0)==-1){J(27154,26666,366,27121);G()}d=f;f=w(c,24)+e|0;if(q[f>>2]!=(b|0)){continue}break}}q[a+24>>2]=q[a+24>>2]-1;b=q[(w(c,24)+e|0)+16>>2];b:{if(!d){q[g>>2]=b;break b}q[d+16>>2]=b}b=q[a+20>>2];q[a+20>>2]=c;q[(w(c,24)+e|0)+16>>2]=b;return}J(27100,26666,334,27121);G()}J(27127,26666,340,27121);G()}function zv(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-1056|0;Ii=e;q[e+1048>>2]=0;Mo(b,e+16|0);g=Oi(e+16|0);f=Li;h=f;b=-3;a:{b:{c:{if(fH(q[a+7384>>2],g,f,e+16|0,e+12|0)){break c}f=q[e+12>>2];b=q[d>>2];if(f>>>0>q[d+8>>2]-b>>>0){if(o[d+12|0]&1){break b}Wi(f,1,d,d+8|0,d+4|0);f=q[e+12>>2];b=q[d>>2]}q[d+4>>2]=b;b=u6(q[a+7384>>2],g,h,e+16|0,b,f);if(b){break c}a=q[e+12>>2];b=q[d>>2];if(a>>>0>q[d+8>>2]-b>>>0){break a}q[d+4>>2]=a+b;q[c>>2]=a;b=0}Ii=e+1056|0;return b}J(26803,26878,493,26726);G()}J(26934,26878,506,26953);G()}function o8(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-272|0;Ii=e;g=a+2144|0;h=b<<3;f=pq(c,h);a:{d=q[a+2148>>2];b:{c:{if(!d){break c}d=q[q[g>>2]+((f>>>0)%(d>>>0)<<2)>>2];if((d|0)==-1){break c}i=q[a+2152>>2];while(1){d=w(d,280)+i|0;if(q[d>>2]==(f|0)){break b}d=q[d+272>>2];if((d|0)!=-1){continue}break}}if(b>>>0>=33){break a}if(b){Ti(e+16|0,c,h)}q[e+8>>2]=b;b=(q[a+2160>>2]-q[a+2152>>2]|0)/280|0;a=q[a+2168>>2];if((b|0)==(a|0)){a=a+8|0;pJ(g,a<<1,a)}qJ(g,f,e+8|0)}Ii=e+272|0;return f}J(113819,113682,824,113865);G()}function gr(a,b,c){var d=0,e=0;d=Ii-336|0;Ii=d;q[d+328>>2]=0;q[d+332>>2]=0;if(c>>>0<=7){q[d+48>>2]=c;q[d+52>>2]=8;sj(d- -64|0,256,131998,d+48|0);q[d+32>>2]=d- -64;Qi(a,131516,d+32|0)}e=b;a:{b:{if(q[b>>2]==1112818760){e=q[b+4>>2];q[d+328>>2]=q[b>>2];q[d+332>>2]=e;if(e>>>0>4){break b}e=b+8|0}Ui(d- -64|0,0,129);q[d+204>>2]=0;q[d+208>>2]=0;c=c-8|0;q[d+200>>2]=c;q[d+196>>2]=e;NG(a,d- -64|0,d+328|0,b,e,c,0);break a}q[d+16>>2]=e;q[d+20>>2]=4;sj(d- -64|0,256,132070,d+16|0);q[d>>2]=d- -64;Qi(a,131516,d)}Ii=d+336|0}function _ia(a){a=a|0;var b=0,c=0,d=0;b=$i(36);q[b>>2]=0;q[b+4>>2]=0;q[b+32>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+16>>2]=q[a+20>>2];d=NL(q[a>>2],b,0);if(!d){c=q[a+24>>2];q[c+8>>2]=b;q[c+16>>2]=((q[a+16>>2]+q[b+8>>2]|0)-q[b>>2]|0)+36;return d|0}a=q[a>>2];c=q[b+16>>2];if(c){Aj(c)}c=q[b+32>>2];if(c){cj(a,c)}c=q[b+20>>2];if(c){cj(a,c)}c=q[b+28>>2];if(c){cj(a,c)}c=q[b+24>>2];if(c){cj(a,c)}a:{if(o[b+12|0]&1){break a}a=q[b>>2];if(!a){break a}Ni(a)}Ni(b);return d|0}function Xr(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(f&64){c=f+ -64|0;b=c&31;if((c&63)>>>0>=32){c=0;b=e>>>b|0}else{c=e>>>b|0;b=((1<>>b}d=0;e=0;break a}if(!f){break a}h=e;i=d;j=64-f|0;g=j&31;if((j&63)>>>0>=32){h=i<>>32-g|h<>>0>=32){g=0;b=c>>>b|0}else{g=c>>>b|0;b=((1<>>b}b=j|b;c=g|h;g=d;d=f&31;if((f&63)>>>0>=32){h=0;d=e>>>d|0}else{h=e>>>d|0;d=((1<>>d}e=h}q[a>>2]=b;q[a+4>>2]=c;q[a+8>>2]=d;q[a+12>>2]=e}function Eva(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;f=Lza(0)|0;a:{if(f){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}b=8;b:{if((Vi(a,2)|0)==-1){break b}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;b=Lza(0)|0;if(b){break b}b=0;if(Oj(a,2)){break b}Nk(a,2,136658)}d=b>>31;c=d+b^d;d=(c|0)<8?c:8;if((c|0)>=1){g=(b|0)<0?136749:136732;b=d;while(1){c=b-1|0;o[c+(e+8|0)|0]=r[(f&15)+g|0];f=f>>>4|0;h=(b|0)>1;b=c;if(h){continue}break}}bj(a,e+8|0,d);Ii=e+16|0;return 1}function sla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=$j(a,2);q[c+76>>2]=Li;b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);d=q[59022];vk(b+8|0,b+40|0,q[d+8>>2],q[d+12>>2],f,d,b+72|0,8);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(71895,71916,527,72262);G()}Ii=c+80|0;return 0}function qha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=$j(a,2);q[c+76>>2]=Li;b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);d=q[59022];vk(b+8|0,b+40|0,q[d+8>>2],q[d+12>>2],f,d,b+72|0,8);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(80636,80657,382,80761);G()}Ii=c+80|0;return 0}function eha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=$j(a,2);q[c+76>>2]=Li;b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);d=q[61454];vk(b+8|0,b+40|0,q[d+8>>2],q[d+12>>2],f,d,b+72|0,8);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(81306,81141,169,81347);G()}Ii=c+80|0;return 0}function Pu(a,b,c){var d=0,e=0;d=q[a+16>>2];e=-1;a:{b:{switch(b|0){case 0:q[d+64>>2]=-3;return 0;case 1:q[d+64>>2]=q[d+68>>2];return 0;case 2:IZ(a);return 0;case 3:return q[d+68>>2]>>>10|0;case 4:return q[d+68>>2]&1023;case 5:e=0;b=q[d+68>>2];c=b-(c<<10)|0;c=b>>>0>>0?0:c;q[d+64>>2]=c;if(b>>>0>>0){break a}while(1){om(a);if(!r[d+21|0]){return 1}if(t[d+64>>2]<=t[d+68>>2]){continue}break}break a;case 6:a=q[d+80>>2];q[d+80>>2]=c;return a;case 7:break b;default:break a}}e=q[d+84>>2];q[d+84>>2]=c}return e}function IL(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-48|0;Ii=d;a:{if(!b){q[d>>2]=c;Pi(3,63162,63170,d);e=-13;break a}h=(q[b+4>>2]-q[b>>2]|0)/18568|0;if(h){while(1){g=f9(b,f);e=ak(a,g,d+44|0);if(e){q[d+36>>2]=c;q[d+32>>2]=g;Pi(4,63162,63207,d+32|0);break a}_H(b,f,q[d+44>>2]);g=h9(b,f);e=ak(a,g,d+40|0);if(e){q[d+20>>2]=c;q[d+16>>2]=g;Pi(4,63162,63257,d+16|0);break a}bI(b,f,q[d+40>>2]);if(q[q[q[d+40>>2]>>2]+152>>2]){Pi(4,63162,63308,0);e=-15;break a}f=f+1|0;if((h|0)!=(f|0)){continue}break}}e=0}Ii=d+48|0;return e}function kU(a){var b=0;a:{if(!a){break a}b:{switch(q[a+4>>2]-5|0){case 3:a=q[a+8>>2];if((r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24))!=-2042067414|(r[a+4|0]|r[a+5|0]<<8|(r[a+6|0]<<16|r[a+7|0]<<24))!=84020727){break a}b=263680;break a;case 0:if(Ej(158081,q[a+8>>2],5)){break a}return 263700;case 4:break b;default:break a}}if(!Ej(158101,q[a+8>>2],9)){return 263720}if(!Ej(158129,q[a+8>>2],9)){return 263740}if(!Ej(158157,q[a+8>>2],9)){return 263760}if(Ej(158185,q[a+8>>2],9)){break a}return 263780}return b}function Gsa(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;d=q[a+4>>2];c=q[a>>2];q[b+28>>2]=q[c>>2];q[b+24>>2]=q[c+4>>2];q[b+20>>2]=0;q[b+16>>2]=0;Mi[q[c+32>>2]](d,b+16|0,b+20|0,b+28|0,b+24|0);if(q[b+16>>2]){o[284264]=0;o[284368]=0;Vc();Zh();Mi[q[c+24>>2]](d);a:{if(q[b+16>>2]!=1){break a}c=Mi[q[c+20>>2]](q[b+28>>2],q[b+24>>2])|0;q[a+4>>2]=c;if(c){Ka(21,a|0,0,1);break a}Pi(4,5163,5170,0);q[b+20>>2]=1}q[b>>2]=q[b+20>>2];Pi(2,5163,5194,b)}if(!r[284264]){o[284264]=1;o[284368]=1}Mi[q[q[a>>2]+28>>2]](d)|0;Ii=b+32|0}function yP(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;g=Ii-16|0;Ii=g;c=a+16|0;Hq(a,a+8|0,c);e=a+24|0;while(1){if((b|0)!=(e|0)){d=q[e+4>>2];f=q[c+4>>2];if((d|0)==(f|0)&t[e>>2]>2]|d>>>0>>0){d=q[e+4>>2];q[g+8>>2]=q[e>>2];q[g+12>>2]=d;f=e;while(1){a:{d=c;h=q[c+4>>2];q[f>>2]=q[c>>2];q[f+4>>2]=h;if((a|0)==(c|0)){d=a;break a}f=d;c=d-8|0;i=q[g+12>>2];h=q[c+4>>2];if((i|0)==(h|0)&t[c>>2]>t[g+8>>2]|h>>>0>i>>>0){continue}}break}c=g+8|0;f=q[c+4>>2];q[d>>2]=q[c>>2];q[d+4>>2]=f}c=e;e=c+8|0;continue}break}Ii=g+16|0}function hfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;a:{if(b>>>0<2097152){b=q[75054];b:{if(a+1>>>0<2){break b}f=a&65535;if(f>>>0>=t[b+32>>2]){break a}g=q[q[b+24>>2]+(f<<2)>>2];if(!g){break b}e=s[q[b+28>>2]+(f<<1)>>1]==(a>>>16|0)?g:0}p[e+42>>1]=d;p[e+40>>1]=c;p[e+426>>1]=d;p[e+424>>1]=c;p[e+234>>1]=d;p[e+232>>1]=c;p[e+170>>1]=d;p[e+168>>1]=c;p[e+106>>1]=d;p[e+104>>1]=c;p[e+362>>1]=d;p[e+360>>1]=c;p[e+298>>1]=d;p[e+296>>1]=c;PK(b,e);return}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function tv(a){var b=0,c=0,d=0;b=Ii-32|0;Ii=b;a:{c=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)>-1){dt(a);b:{if((Vi(a,-1)|0)!=5){Ri(a,-3);d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;break b}xk(a,-2);ik(a,-2);xk(a,-2);Ri(a,-2)}a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(c|0)){break a}Ii=b+32|0;return}q[b+12>>2]=c;q[b+4>>2]=1220;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=c;q[b+20>>2]=1220;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function ko(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{if(b){if(!c){break a}b:{if(a){break b}a=q[c>>2];if(a){break b}return 0}while(1){e=a+1|0;f=r[a|0];d=b;c:{while(1){g=r[d|0];if(!g){break c}d=d+1|0;if((f|0)!=(g|0)){continue}break}a=e;continue}break}if(!f){q[c>>2]=0;return 0}while(1){f=e+1|0;g=r[e|0];d=b;d:{while(1){h=r[d|0];if((g|0)==(h|0)){if(g){break d}q[c>>2]=0;return a}d=d+1|0;if(h){continue}break}e=f;continue}break}o[e|0]=0;q[c>>2]=f;return a}J(165340,165354,86,165379);G()}J(165388,165354,87,165379);G()}function mm(a){var b=0;if((a|0)<=0){a=a+2|0;a:{if(a>>>0<=2){a=q[(a<<2)+253664>>2];break a}a=137265}return a}b=138489;b:{c:{switch(a-2|0){case 28:return 138512;case 0:return 138530;case 12:return 138548;case 11:return 138567;case 13:return 138567;default:if((a|0)==73){break b};case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:b=ql(a);break;case 1:break c}}return b}return 138574}function lq(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{b:{f=q[a+12>>2];if(!f){break b}d=q[f+4>>2];e=q[f>>2];g=d-e|0;if(!g){break b}if((d|0)!=(e|0)){h=g>>3;g=0;while(1){e=(g<<3)+e|0;c:{if(!(q[e>>2]!=(b|0)|q[e+4>>2]!=(c|0))){d=d-8|0;i=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=i;d=q[f+4>>2]-8|0;q[f+4>>2]=d;if(d>>>0>2]){break a}h=h-1|0;break c}g=g+1|0}if(g>>>0>=h>>>0){break b}f=q[a+12>>2];d=q[f+4>>2];e=q[f>>2];if(d-e>>3>>>0>g>>>0){continue}break}}J(26961,26878,479,26972);G()}return}J(27197,26878,516,27187);G()}function lB(a){var b=0;a:{if(o[a+160|0]&1){break a}b=q[a+140>>2];if(b){Ni(b)}b=q[a+132>>2];if(!b){break a}Ni(b)}b:{if(o[a+128|0]&1){break b}b=q[a+108>>2];if(b){Ni(b)}b=q[a+100>>2];if(!b){break b}Ni(b)}c:{if(o[a+84|0]&1){break c}b=q[a+72>>2];if(!b){break c}Ni(b)}d:{if(o[a+68|0]&1){break d}b=q[a+56>>2];if(!b){break d}Ni(b)}e:{if(o[a+52|0]&1){break e}b=q[a+40>>2];if(!b){break e}Ni(b)}f:{if(o[a+36|0]&1){break f}b=q[a+24>>2];if(!b){break f}Ni(b)}g:{if(o[a+20|0]&1){break g}a=q[a+8>>2];if(!a){break g}Ni(a)}}function FG(a,b){var c=0,d=0;c=Ii-32|0;Ii=c;a:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>-2){dt(a);b:{if((Vi(a,-1)|0)!=5){Ri(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break b}rj(a,-1,b);xk(a,-2);Ri(a,-2)}b=d+1|0;a=q[a+8>>2]-q[a+12>>2]>>4;if((b|0)!=(a|0)){break a}Ii=c+32|0;return}q[c+12>>2]=d;q[c+4>>2]=1309;q[c+8>>2]=1;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}q[c+28>>2]=a;q[c+24>>2]=b;q[c+20>>2]=1309;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function Dt(a,b){var c=0,d=0;a:{b:{c=q[a+16>>2];if(q[a+20>>2]-c>>3>>>0>b>>>0){c=q[c+(b<<3)>>2];d=q[a>>2];if(c>>>0>=q[a+4>>2]-d>>2>>>0){break a}c=q[d+(c<<2)>>2];tM(q[c>>2]);if(o[c+232|0]&1){break b}Wi(0,4,c+220|0,c+228|0,c+224|0);d=q[c+132>>2];if(d){$G(q[a+96>>2],d)}d=q[c+180>>2];if(d){Hr(d)}c:{if(o[c+248|0]&1){break c}d=q[c+236>>2];if(!d){break c}Ni(d)}d:{if(o[c+232|0]&1){break d}d=q[c+220>>2];if(!d){break d}Ni(d)}Ni(c);A9(a,b);return}break a}J(51372,51308,493,51447);G()}J(51709,51308,479,51547);G()}function $ea(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:{if(a){fc(q[(b<<2)+92880>>2],q[(c<<2)+92880>>2],q[(d<<2)+92880>>2]);if(r[q[75054]+156|0]&64){f=K()|0;if(f){break a}}f=a;h=q[a+72>>2]&29368319;i=q[a+76>>2]&-4;b=b&7;a=b;e=a>>>7|0;g=a<<25;a=e;e=b>>>19|0;b=b<<13|g;g=a|e;j=b;a=c&7;e=a>>>13|0;b=a>>>1|0;a=j|a<<19|a<<31;b=b|(e|g);c=a;a=d&7;e=a>>>16|0;q[f+72>>2]=c|a<<16|a<<28|h;q[f+76>>2]=b|e|a>>>4|i;return}J(88636,88575,3733,92820);G()}lj(f,92820,3746);J(88669,88575,3746,92820);G()}function Nxa(a,b,c){var d=0;a:{b:{c:{if((a^b)&3){break c}d=(c|0)!=0;d:{if(!c|!(b&3)){break d}while(1){d=r[b|0];o[a|0]=d;if(!d){break a}a=a+1|0;b=b+1|0;c=c-1|0;d=(c|0)!=0;if(!c){break d}if(b&3){continue}break}}if(!d){break b}if(!r[b|0]){break a}if(c>>>0<4){break c}while(1){d=q[b>>2];if((d^-1)&d-16843009&-2139062144){break c}q[a>>2]=d;a=a+4|0;b=b+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break b}while(1){d=r[b|0];o[a|0]=d;if(!d){break a}a=a+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}c=0}Ui(a,0,c)}function $B(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=(d<<1)+300432|0;c=(c<<1)+301456|0;b=(b<<1)+300432|0;d=r[f|0]|(r[c|0]<<5|r[b|0]<<11);q[e+12>>2]=d;b=r[f+1|0]|(r[c+1|0]<<5|r[b+1|0]<<11);q[e+8>>2]=b;c=170;a:{if((b|0)==(d|0)){if(!d){q[e+8>>2]=0;d=1;q[e+12>>2]=1;c=85;break a}b=d-1|0;q[e+8>>2]=b;c=0}if(b>>>0<=d>>>0){break a}c=c|85;Hl(e+12|0,e+8|0);d=q[e+12>>2]}o[a|0]=d;o[a+1|0]=d>>>8;b=s[e+8>>1];o[a+2|0]=b;o[a+3|0]=b>>>8;b=w(c,16843009);o[a+4|0]=b;o[a+5|0]=b>>>8;o[a+6|0]=b>>>16;o[a+7|0]=b>>>24;Ii=e+16|0}function qC(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;f=(Pza(a),Lza(2));c=f&2147483647;a:{if(c>>>0<=1305022426){g=+a;d=g*.6366197723675814+6755399441055744+ -6755399441055744;v[b>>3]=g+d*-1.5707963109016418+d*-1.5893254773528196e-8;if(y(d)<2147483648){c=~~d;break a}c=-2147483648;break a}if(c>>>0>=2139095040){v[b>>3]=x(a-a);c=0;break a}h=c;c=(c>>>23|0)-150|0;v[e+8>>3]=(Mza(2,h-(c<<23)|0),Qza());c=iO(e+8|0,e,c,1,0);d=v[e>>3];if((f|0)<=-1){v[b>>3]=-d;c=0-c|0;break a}v[b>>3]=d}Ii=e+16|0;return c}function oua(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=b-2|0;b=s[e>>1];if((b|0)==8){Ni(e);return}a:{b:{if(b>>>0<8){g=(b<<2)+a|0;f=q[g+96>>2];if(!f){break b}d=w(b,12)+a|0;h=q[d>>2];if(!h){break a}i=d;d=h-1|0;q[i>>2]=d;c:{if(!d){if(!b){break c}Ni(f);q[g+96>>2]=0;return}c=c+3&-2;a=w(b,12)+a|0;b=q[a+4>>2];if((b+f|0)==(e|0)){q[a+4>>2]=b+(c&65535);return}b=q[a+8>>2]-(c&65535)|0;if((b+f|0)!=(e|0)){break c}q[a+8>>2]=b}return}J(29098,29128,111,29155);G()}J(29160,29128,114,29155);G()}J(29173,29128,116,29155);G()}function j8(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-32|0;Ii=b;d=qj(a,1);e=q[d+12>>2];f=q[d+8>>2];c=q[d>>2];d=jj(a,2);q[b+28>>2]=0;q[b+24>>2]=0;a:{if(JH(c,f,e,b+28|0,b+24|0,b+20|0)){b:{c=d-1|0;g=q[b+20>>2];c=(g|0)==9?c<<2:c;if(c>>>0>=t[b+24>>2]){break b}h=q[b+28>>2];c:{switch(g|0){case 0:lo(a,(c<<4)+h|0);a=1;break a;case 9:break c;default:break b}}ir(a,(c<<4)+h|0);a=1;break a}e=aj(f,e);q[b+4>>2]=d;q[b>>2]=e;a=Qi(a,120665,b);break a}q[b+16>>2]=aj(f,e);a=Qi(a,120199,b+16|0)}Ii=b+32|0;return a|0}function S$(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=qO(143374);Kn(b);a:{b:{if(!a){a=q[b+60>>2];q[c>>2]=d&-524481;a=R(a|0,4,c|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}if((a|0)>=0){break a}break b}a=dl(a,143374);if(!a){break b}c:{e=q[a+60>>2];f=q[b+60>>2];d:{if((e|0)==(f|0)){q[a+60>>2]=-1;break d}if((bya(e,f,d&524288)|0)<0){break c}}q[b>>2]=q[a>>2]|q[b>>2]&1;q[b+32>>2]=q[a+32>>2];q[b+36>>2]=q[a+36>>2];q[b+40>>2]=q[a+40>>2];q[b+12>>2]=q[a+12>>2];rk(a);break a}rk(a)}rk(b);b=0}Ii=c+16|0;return b}function vn(a,b){var c=0,d=0,e=0,f=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;c=-4;a:{if(!a|!r[a|0]){break a}if(gk(a,35)){break a}if(gk(a,58)){break a}c=Oi(a);f=Li;while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}q[b>>2]=c;q[b+4>>2]=f;b=0;d=q[213232];a=q[d+4>>2];b:{if(!a){break b}a=q[q[d>>2]+(Cza(c,f,a)<<2)>>2];if((a|0)==-1){break b}d=q[d+8>>2];while(1){a=a<<6;b=a+d|0;if((c|0)==q[b>>2]&(f|0)==q[b+4>>2]){break b}a=q[(a+d|0)+56>>2];if((a|0)!=-1){continue}break}b=0}q[213233]=0;c=b?0:-6}Ii=e+16|0;return c}function dqa(a,b,c,d){var e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;e=q[a>>2];q[f+12>>2]=b;g=e+3144|0;a:{a=q[e+3148>>2];b:{if(!a){break b}a=q[q[g>>2]+(Cza(c,d,a)<<2)>>2];if((a|0)==-1){break b}h=q[e+3152>>2];while(1){a=(a<<4)+h|0;if(q[a>>2]==(c|0)&q[a+4>>2]==(d|0)){a=-3;break a}a=q[a+12>>2];if((a|0)!=-1){continue}break}}a=-4;if(q[b+96>>2]!=q[71492]|q[b+100>>2]!=q[71493]){break a}q[b+96>>2]=c;q[b+100>>2]=d;wr(g,c,d,f+12|0);a=0;if(t[e+3168>>2]<=s[e+1058>>1]){break a}J(7842,7192,1e3,8106);G()}Ii=f+16|0;return a}function Yp(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;a:{if(!c){break a}g=q[a+4>>2];e=g;h=q[a>>2];d=c+h|0;e=d>>>0>>0?e+1|0:e;f=a;q[a>>2]=d;q[a+4>>2]=e;if((e|0)==(g|0)&d>>>0>>0|e>>>0>>0){d=q[a+12>>2];e=q[a+8>>2]+1|0;d=e>>>0<1?d+1|0:d;q[a+8>>2]=e;q[f+12>>2]=d}f=h&127;b:{if(!f){break b}d=128-f|0;if(d>>>0>c>>>0){i=f;break b}g=f;f=a+80|0;Ti(g+f|0,b,d);As(a,f);c=c-d|0;b=b+d|0}if(c>>>0>=128){while(1){As(a,b);b=b+128|0;c=c-128|0;if(c>>>0>127){continue}break}}if(!c){break a}Ti((a+i|0)+80|0,b,c)}return 0}function Hpa(a){a=a|0;var b=0,c=0,d=0;d=q[q[a+24>>2]>>2];b=q[a+16>>2];c=q[a+20>>2];if((b|0)==q[73050]&(c|0)==q[73051]){u[d+12>>2]=v[a+40>>3];return 0}if(q[73052]==(b|0)&q[73053]==(c|0)){u[d+16>>2]=v[a+40>>3];return 0}if(q[73054]==(b|0)&q[73055]==(c|0)){u[d+20>>2]=v[a+40>>3];return 0}if(q[73056]==(b|0)&q[73057]==(c|0)){u[d+24>>2]=v[a+40>>3];return 0}if(q[73062]==(b|0)&q[73063]==(c|0)){u[d+8>>2]=v[a+40>>3];return 0}return((b|0)==q[73058]&(c|0)==q[73059]?-13:(b|0)==q[73060]&(c|0)==q[73061]?-13:-1)|0}function uN(a,b,c,d,e){var f=0,g=0,h=0;if(Vi(a,b)){Dj(a,b,5);f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=1;q[a+8>>2]=q[a+8>>2]+16;ik(a,b);if(Vi(a,-1)){h=1;while(1){f=OF(a);if((f|0)!=-1){if((f|0)>=1024){dk(a,b,137204)}g=(f>>>3&536870908)+d|0;q[g>>2]=q[g>>2]|1<>2];if(!((f|0)<=(g|0)?(g|0)!=-1:0)){q[e>>2]=f}g=q[a+8>>2];q[g+8>>2]=3;v[g>>3]=f|0;q[a+8>>2]=q[a+8>>2]+16;ej(a,-2);pj(a,c)}Ri(a,-2);f=q[a+8>>2];q[f+8>>2]=3;h=h+1|0;v[f>>3]=h|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,b);if(Vi(a,-1)){continue}break}}Ri(a,-2)}}function w2(a){a=a|0;var b=0,c=x(0),d=x(0),e=0,f=x(0),g=x(0),h=0,i=x(0);e=Ii-48|0;Ii=e;b=_i(a,1,q[210437],0);c=u[b>>2];f=u[b+4>>2];a:{b:{if(c!=c|f!=f){break b}d=u[b+8>>2];if(d!=d){break b}d=u[b+12>>2];if(d==d){break a}}d=u[b+8>>2];g=u[b+12>>2];v[e+16>>3]=f;v[e+32>>3]=g;v[e+24>>3]=d;v[e+8>>3]=c;q[e>>2]=1;Qi(a,134221,e)}h=fj(a,2);c=u[b+12>>2];f=u[b>>2];d=u[b+4>>2];g=u[b+8>>2];b=yj(a,16);i=c;c=x(h);u[b+12>>2]=i/c;u[b+8>>2]=g/c;u[b+4>>2]=d/c;u[b>>2]=f/c;Zi(a,-1e4,134016);xj(a,-2);Ii=e+48|0;return 1}function m0(a){var b=0,c=0,d=0;d=Ii-16|0;Ii=d;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;a:{b:{b=Hu(a+16|0,160664);if(b){break b}c=a+4|0;b=Bk(c,1);if(b){break b}b=on(c,224);if(b){break b}b=Pl(c,c,1);if(b){break b}b=on(c,224);if(b){break b}b=Pl(c,c,1);if(b){break b}q[a+88>>2]=Ql(c);b=Bk(a+40|0,5);if(b){break b}b=Bk(a- -64|0,1);if(b){break b}ij(a+52|0);c=a+76|0;b=dp(c,446,1);if(b){break b}b=Hu(d,160669);if(b){break b}b=yl(c,c,d);if(b){break b}q[a+92>>2]=447;ij(d);b=0;break a}ij(d);bo(a)}Ii=d+16|0;return b}function vm(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(f&64){d=b;e=f+ -64|0;b=e&31;if((e&63)>>>0>=32){e=d<>>32-b|c<>>0>=32){h=g<>>32-d|e<>>0>=32){f=0;d=d>>>e|0}else{f=d>>>e|0;d=((1<>>e}d=j|d;e=f|h;f=b;b=i&31;if((i&63)>>>0>=32){h=f<>>32-b|c<>2]=b;q[a+4>>2]=c;q[a+8>>2]=d;q[a+12>>2]=e}function _w(a,b){var c=0;a:{if((r[a|0]|r[a+1|0]<<8)!=17011|b>>>0<78|((r[a+2|0]|r[a+3|0]<<8)!=19|(r[a+4|0]|r[a+5|0]<<8)!=77)){break a}if(!(r[a+17|0]|(r[a+18|0]<<8|r[a+19|0]<<16))|(!(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16))|(r[a+8|0]|r[a+9|0]<<8|(r[a+10|0]<<16|r[a+11|0]<<24))+77>>>0>b>>>0)){break a}c=a+65|0;if((r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24))>>>0>=b>>>0){break a}return b-(r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24))>>>0>=w(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16),23)>>>0}return 0}function SD(a,b,c){var d=0;d=Ii-16|0;Ii=d;if((Vi(a,3)|0)!=5){hC(a,q[64213])}Xi(a,137409);ik(a,3);if(!uk(a,-1)){dk(a,3,137419)}if(!eu(uj(a,-1,0),d+8|0)){dk(a,3,137453)}Xi(a,137484);ik(a,3);if(!uk(a,-1)){dk(a,3,137494)}q[d+12>>2]=0;a:{if(!dj(uj(a,-1,0),137377)){break a}if(eu(uj(a,-1,0),d+8|4)){break a}dk(a,3,137528)}b:{if((Ol(q[b>>2],0,c,d+8|0,8)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=d+16|0;return a}function zH(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0;k=q[a+116>>2];a:{if(!(b|c)|(q[a+120>>2]-k|0)/40>>>0<=d>>>0){break a}j=q[a+24>>2];if(!j){break a}j=q[q[a+20>>2]+(Cza(b,c,j)<<2)>>2];if((j|0)==-1){break a}l=q[a+28>>2];while(1){a=(j<<4)+l|0;if((b|0)!=q[a>>2]|q[a+4>>2]!=(c|0)){j=q[a+12>>2];if((j|0)!=-1){continue}break a}break}a=w(d,40)+k|0;q[a>>2]=b;q[a+4>>2]=c;b=q[((j<<4)+l|0)+8>>2];q[a+24>>2]=f;q[a+20>>2]=e;u[a+28>>2]=i;q[a+16>>2]=h;q[a+12>>2]=g;q[a+32>>2]=b&16777215|r[a+35|0]<<24;m=1}return m}function TX(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-288|0;Ii=d;QE(d+8|0);f=PE(d+8|0,b,c);if(!f){b=q[d+8>>2];q[a>>2]=b;c=(b|0)==4;b=(d+8|0)+(c<<6)|0;q[a+4>>2]=q[b+196>>2];q[a+8>>2]=q[b+200>>2];q[a+12>>2]=q[b+204>>2];q[a+16>>2]=q[b+208>>2];g=a+20|0;e=c<<3|22;c=b+188|0;while(1){a=g;b=c;q[a>>2]=q[b>>2];q[a+4>>2]=q[b+4>>2];c=b-8|0;g=a+8|0;e=e-1|0;if(e){continue}break}q[a+8>>2]=q[b-16>>2];q[a+12>>2]=q[b-12>>2];q[a+16>>2]=q[c>>2];q[a+20>>2]=q[b-4>>2]}a=d+8|0;if(a){Mi[q[65677]](a,0,276)|0}Ii=d+288|0;return f}function TS(a,b){var c=0,d=0,e=0;d=Ii-16|0;Ii=d;a:{if(a>>>0>6){break a}if((a|0)==6){if(b){a=q[55135];q[d+8>>2]=q[55134];q[d+12>>2]=a;a=q[55133];q[d>>2]=q[55132];q[d+4>>2]=a;a=0;while(1){c=pC(b,59);e=c-b|0;if((e|0)<=15){Ti(d,b,e);o[d+e|0]=0;b=r[c|0]?c+1|0:b}JD(a,d);a=a+1|0;if((a|0)!=6){continue}break}}b=962080;a=0;while(1){c=q[(a<<2)+962216>>2];e=c?c+8|0:220544;c=hj(e);Ti(b,e,c);c=b+c|0;o[c|0]=59;b=c+1|0;a=a+1|0;if((a|0)!=6){continue}break}o[c|0]=0;c=962080;break a}c=JD(a,b)}Ii=d+16|0;return c}function Er(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Ii-16|0;Ii=d;if(b){e=Mi[q[74973]](a)|0;f=q[b+4>>2];a:{if(f){while(1){h=q[b>>2];i=w(g,44);c=h+i|0;b:{if(q[c>>2]!=(e|0)){break b}if(!r[(h+i|0)+40|0]){j=c;break b}if(!(Mi[q[75033]](a,1)|0)){break a}f=q[b+4>>2]}g=g+1|0;if(f>>>0>g>>>0){continue}break}c=j;if(c){break a}}b=(e|0)==5?87676:87675;c=e-1|0;a=87584;c:{if(c>>>0>5){break c}a=q[(c<<2)+245964>>2]}q[d+4>>2]=b;q[d>>2]=a;Pi(4,87731,87740,d);c=0}Ii=d+16|0;return c}J(87626,87638,273,87658);G()}function OH(a,b,c,d){var e=x(0),f=0,g=0,h=0;a:{f=q[a>>2];a=q[a+4>>2];if((f|0)==(a|0)){break a}h=a-f>>4;a=0;while(1){g=(a<<4)+f|0;if((b|0)==q[g>>2]&q[g+4>>2]==(c|0)){b=(a<<4)+f|0;if(!q[b+8>>2]){break a}a=d;b=q[b+12>>2];e=u[b>>2];b:{if(e=x(0)){c=~~e>>>0;break b}c=0}q[a>>2]=c;a=d;e=u[b+4>>2];c:{if(e=x(0)){c=~~e>>>0;break c}c=0}q[a+4>>2]=c;e=u[b+8>>2];d:{if(e=x(0)){a=~~e>>>0;break d}a=0}q[d+8>>2]=a;return}a=a+1|0;if(h>>>0>a>>>0){continue}break}}}function oha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=Uj(a,2);b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);d=q[60794];vk(b+8|0,b+40|0,q[d+8>>2],q[d+12>>2],f,d,b+72|0,4);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(80636,80657,256,80698);G()}Ii=c+80|0;return 0}function mha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=Uj(a,2);b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);d=q[60810];vk(b+8|0,b+40|0,q[d+8>>2],q[d+12>>2],f,d,b+72|0,4);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(80636,80657,295,80718);G()}Ii=c+80|0;return 0}function K6(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=q[a+4>>2];d=q[f+16>>2];g=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);e=g<<6;a:{if(o[a+20|0]&1){a=q[f+24>>2];d=f+(a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))|0;break a}d=q[q[a+8>>2]+1024>>2]}k=e+d|0;a=q[f+28>>2];i=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);e=d;if(g){a=g;while(1){h=a>>>1|0;f=(h<<6)+e|0;j=(Ej(b,f,i)|0)>-1;e=j?f- -64|0:e;a=j?(h^-1)+a|0:h;if(a){continue}break}}if(e>>>0>>0){if(!Ej(e,b,i)){return-5}g=e-d>>>6|0}q[c>>2]=g;return 0}function qaa(a,b){var c=0,d=0,e=0,f=0,g=0;a:{c=q[a+4>>2];if(c){b:{g=q[a>>2]+((b>>>0)%(c>>>0)<<2)|0;d=q[g>>2];if((d|0)!=-1){c=0;e=q[a+8>>2];f=e+w(d,12)|0;if(q[f>>2]==(b|0)){break a}break b}J(124116,123864,340,124110);G()}while(1){d=q[(w(d,12)+e|0)+8>>2];if((d|0)!=-1){c=f;f=w(d,12)+e|0;if(q[f>>2]!=(b|0)){continue}break a}break}J(124143,123864,366,124110);G()}J(124089,123864,334,124110);G()}q[a+24>>2]=q[a+24>>2]-1;b=w(d,12)+e|0;q[(c?c+8|0:g)>>2]=q[b+8>>2];c=q[a+20>>2];q[a+20>>2]=d;q[b+8>>2]=c}function x6(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=q[a+20>>2];Gj(g);a:{e=q[a+4>>2];f=q[a>>2];d=e-f|0;if(d){e=f-e|0;e=((d|0)<(e|0)?e:d)>>>4|0;d=(d|0)>-1?d:-1;e=w(e,(d|0)<1?d:1);h=e>>>0>1?e:1;d=0;while(1){if((d|0)==(e|0)){break a}if(!dj(q[f+(d<<4)>>2],b)){f=q[a+20>>2];Gj(f);b=-6;e=q[a+4>>2];a=q[a>>2];if(e-a>>4>>>0>d>>>0){a=a+(d<<4)|0;q[c>>2]=q[a>>2];q[c+4>>2]=q[a+4>>2];q[c+8>>2]=q[a+8>>2];b=0}Bj(f);Bj(g);return b}d=d+1|0;if((h|0)!=(d|0)){continue}break}}Bj(g);return-6}J(28298,28028,479,28309);G()}function Oj(a,b){var c=0,d=0;d=Ii-16|0;Ii=d;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}a=c;b=1;if(q[a+8>>2]!=3){b=(Qu(a,d)|0)!=0}Ii=d+16|0;return b}function I4(a,b){var c=0,d=0,e=0,f=0,g=0;if(a){d=q[a+4>>2];c=q[a>>2];e=d-c|0;if(!e){return}a:{if((d|0)!=(c|0)){e=(e|0)/28|0;d=0;while(1){b:{c:{c=w(d,28)+c|0;if(q[c+4>>2]!=(b|0)){break c}f=r[c+24|0];if(f&2){f=f&253;o[c+24|0]=f;g=g+1|0}if(o[a+46|0]&1){break c}Cz(a,q[c+12>>2],f);e=e-1|0;break b}d=d+1|0}if(d>>>0>=e>>>0){break a}c=q[a>>2];if((q[a+4>>2]-c|0)/28>>>0>d>>>0){continue}break}}J(133962,133265,479,133973);G()}if(!g){return}p[a+44>>1]=s[a+44>>1]+1;return}J(132889,132848,344,132972);G()}function ala(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-80|0;Ii=b;e=1;f=nj(b+24|0,a,1,73366,1248);d=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,d,73150,b+20|0,b+48|0,b+16|0);d=$j(a,2);c=Li;g=c;a:{if(!Xla(q[b+16>>2],d,c,b+48|0)){q[b>>2]=aj(d,g);e=Qi(a,75638,b);break a}d=r[b+48|0];c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(d|0)!=0;q[a+8>>2]=q[a+8>>2]+16}mj(f);Ii=b+80|0;return e|0}function Lsa(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;a:{if(r[a+442|0]){break a}if(!Tj(q[a+4>>2],3926,1)){break a}c=q[a+288>>2];e=q[c+7388>>2];if(e){eH(q[c+7384>>2],e);Mz(q[c+7388>>2]);q[c+7388>>2]=0}}c=Rm(b,3951,0);b:{if(c){if(ak(q[a+288>>2],c,d+12|0)){break b}U9(q[a+416>>2],q[d+12>>2]);cj(q[a+288>>2],q[d+12>>2])}c=Rm(b,3966,3985);if(ak(q[a+288>>2],c,a+420|0)){break b}c=Rm(b,4012,4029);if(ak(q[a+288>>2],c,a+428|0)){break b}b=Rm(b,4062,4087);f=!ak(q[a+288>>2],b,a+424|0)}Ii=d+16|0;return f}function Hj(a,b){var c=0,d=0;d=a;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=sZ(d,q[c>>2],q[a+8>>2]-16|0);q[a+8>>2]=q[a+8>>2]+(b?16:-16);return b}function jaa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;a:{if(!tn(b,168634)){q[a+24>>2]=Kq(c,0);break a}b:{if(tn(b,168649)){break b}if(tn(c,168667)){break b}o[a+92|0]=r[a+92|0]|1;break a}c:{if(tn(b,168675)){break c}if(tn(c,168686)){break c}o[a+92|0]=r[a+92|0]|2;break a}if(!tn(b,168692)){Pj(a+28|0,c,64);break a}if(tn(b,168697)){break a}d=an(c,168711);if(!d){break a}d=nxa(d+8|0);d=(d|0)>0?d:0;q[a+96>>2]=d>>>0<2592e3?d:2592e3}d=q[a>>2];e=q[d+2140>>2];if(e){Mi[e|0](a,q[d+2132>>2],q[a+12>>2],b,c)}}function Eya(){q[65213]=q[71906];q[71906]=260824;q[65263]=q[71906];q[71906]=261024;q[65283]=q[71906];q[71906]=261104;q[65315]=q[71906];q[71906]=261232;q[65347]=q[71906];q[71906]=261360;q[65367]=q[71906];q[71906]=261440;q[65405]=q[71906];q[71906]=261592;q[65427]=q[71906];q[71906]=261680;q[65441]=q[71906];q[71906]=261736;q[65463]=q[71906];q[71906]=261824;q[65561]=q[71906];q[71906]=262216;q[65589]=q[71906];q[71906]=262328;q[65623]=q[71906];q[71906]=262464;q[65655]=q[71906];q[71906]=262592}function fp(a,b){a:{b:{switch((b-65>>>0<26?b|32:b)-97|0){case 2:a=(a|0)==127|a>>>0<32;break a;case 3:a=a-48>>>0<10;break a;case 11:a=a-97>>>0<26;break a;case 15:a=a-33>>>0>=94?0:!((a|32)-97>>>0<26?1:a-48>>>0<10);break a;case 18:a=(a|0)==32|a-9>>>0<5;break a;case 20:a=a-65>>>0<26;break a;case 22:a=(a|32)-97>>>0<26?1:a-48>>>0<10;break a;case 23:a=a-48>>>0<10|(a|32)-97>>>0<6;break a;case 25:a=!a;break a;default:return(a|0)==(b|0);case 0:break b}}a=(a|32)-97>>>0<26}return b-97>>>0<26?a:!a}function Sya(){q[61579]=q[71906];q[71906]=246288;q[61593]=q[71906];q[71906]=246344;q[61609]=q[71906];q[71906]=246408;q[61683]=q[71906];q[71906]=246704;q[61757]=q[71906];q[71906]=247e3;q[61785]=q[71906];q[71906]=247112;q[61813]=q[71906];q[71906]=247224;q[61835]=q[71906];q[71906]=247312;q[61877]=q[71906];q[71906]=247480;q[61899]=q[71906];q[71906]=247568;q[61919]=q[71906];q[71906]=247648;q[61967]=q[71906];q[71906]=247840;q[62017]=q[71906];q[71906]=248040;q[62033]=q[71906];q[71906]=248104}function Iy(a,b,c){var d=0,e=0;e=a;a:{b:{c:{switch(q[b>>2]-6|0){case 0:d:{if(q[c>>2]!=12){break d}d=q[c+8>>2];if(d&256|(d|0)>2]=q[a+36>>2]-1}er(a,c,q[b+8>>2]);return;case 1:d=8;b=rn(a,c)<<6|q[b+8>>2]<<23;break b;case 2:d=7;b=rn(a,c)<<6|q[b+8>>2]<<14;break b;case 3:break c;default:break a}}d=9;b=Il(a,c)<<14|q[b+8>>2]<<6|q[b+12>>2]<<23}fl(e,b|d,q[q[a+12>>2]+8>>2])}e:{if(q[c>>2]!=12){break e}b=q[c+8>>2];if(b&256|(b|0)>2]=q[a+36>>2]-1}}function IT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;if((Vi(a,3)|0)!=5){hC(a,q[64213])}Xi(a,137306);ik(a,3);if((Vi(a,-1)|0)!=1){dk(a,3,137309)}q[c+8>>2]=Uj(a,-1)&65535;Xi(a,137337);ik(a,3);if(!Oj(a,-1)){dk(a,3,137345)}d=c;e=Mj(a,-1);a:{if(e<4294967296&e>=0){f=~~e>>>0;break a}f=0}q[d+12>>2]=f;d=1;b:{if((Ol(q[b>>2],1,13,c+8|0,8)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function AV(a){var b=0,c=0,d=0;b=q[a+68>>2];if(!(!b|q[a+4>>2]==16)){Mi[q[b+1104>>2]](a,q[a+120>>2],q[a+168>>2])}a:{if(!(r[q[a>>2]+184|0]&2)){break a}a=q[a+68>>2];if(!a){break a}q[b+476>>2]=q[b+476>>2]+1;zo(a,0);q[b+540>>2]=q[b+552>>2];a=q[b+548>>2];q[b+532>>2]=q[b+544>>2];q[b+536>>2]=a;a=q[b+556>>2];c=q[b+560>>2];d=q[b+572>>2];q[b+556>>2]=q[b+568>>2];q[b+560>>2]=d;q[b+544>>2]=a;q[b+548>>2]=c;a=q[b+564>>2];q[b+564>>2]=q[b+576>>2];q[b+552>>2]=a;q[b+568>>2]=0;q[b+572>>2]=0;q[b+576>>2]=0}}function i3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-32|0;Ii=b;f=1;g=kj(a,1,0);c=dl(g,129934);a:{if(!c){vj(a,0,0);break a}Uk(c,0,2);e=pm(c);Uk(c,0,0);b:{if(e>>>0<524289){d=317296;break b}q[b+28>>2]=0;Ro(b+28|0,16,e);d=q[b+28>>2];if(d){break b}q[b>>2]=e;f=Qi(a,129937,b);break a}h=zl(d,1,e,c);if(q[c+76>>2]<=-1){e=q[c>>2]}else{e=q[c>>2]}rk(c);if(e>>>5&1){if((d|0)!=317296){Ni(d)}q[b+16>>2]=g;f=Qi(a,129992,b+16|0);break a}gr(a,d,h);if((d|0)==317296){break a}Ni(d)}Ii=b+32|0;return f|0}function gC(a,b,c){var d=0,e=0;e=Ii-112|0;Ii=e;a:{if((a|0)==(b|0)){break a}b:{c:{d=r[b+6|0];switch(d|0){case 1:break a;case 0:break c;default:break b}}d=2;if((sl(b,0,e+8|0)|0)>0){break a}d=q[b+8>>2]-q[b+12>>2]>>4?1:3;break a}d=3}if(!fq(b,c)){Qi(a,144353,0)}d:{e:{if((d|0)!=1){q[e>>2]=q[(d<<2)+257264>>2];Lj(a,144382,e);break e}co(a,b,c);p[b+52>>1]=s[a+52>>1];if(RY(b,c)>>>0<=1){c=q[b+8>>2]-q[b+12>>2]>>4;if(!fq(a,c+1|0)){Qi(a,144409,0)}co(b,a,c);break d}co(b,a,1)}c=-1}Ii=e+112|0;return c}function bia(a){var b=0,c=0,d=0;c=Ii-32|0;Ii=c;a=q[a>>2];d=nj(c+8|0,a,0,81141,548);Ak(a,81183,233088);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,81191);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,81198);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=4;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,81205);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=-3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,81215);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=-7;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,81226);Ri(a,-2);mj(d);Ii=c+32|0}function C6(a,b,c,d,e){var f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;a:{a=q[q[a>>2]+8>>2];g=q[a+1032>>2];if(g){Uk(g,0,2);h=pm(g);b:{if((Kl(b,1,c,g)|0)==(c|0)){q[d>>2]=c;q[e>>2]=h;Kn(g);if(!r[a+1044|0]){break b}q[f+12>>2]=q[a+1036>>2];if(q[a+1040>>2]!=q[e>>2]){break a}q[f+12>>2]=0;q[f+8>>2]=0;q[a+1036>>2]=q[f+12>>2];q[a+1040>>2]=q[d>>2]+q[e>>2];if(q[f+8>>2]==(q[d>>2]+q[e>>2]|0)){break b}J(31399,31266,430,31294);G()}i=-2}Ii=f+16|0;return i}J(31237,31266,399,31294);G()}J(31317,31266,417,31294);G()}function $s(a){var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;a:{c=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)>0){dt(a);f=a;b:{if((Vi(a,-1)|0)!=5){d=-2;e=-3;break b}xk(a,-2);d=In(a,-2);e=-2}Ri(f,e);c=c-1|0;a=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)!=(a|0)){break a}Ii=b+32|0;return d}q[b+12>>2]=c;q[b+4>>2]=1256;q[b+8>>2]=-1;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=c;q[b+20>>2]=1256;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function Hu(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;c=-4;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;e=hj(b);if(e>>>0<=1073741823){c=rl(a,(e>>>3|0)+((e&7)!=0)|0);a:{if(c){break a}c=Bk(a,0);if(c){break a}c=e;while(1){b:{c:{d:{switch(c|0){case 0:break a;case 1:break d;default:break c}}if(r[b|0]!=45){break c}q[a>>2]=-1;break b}e=c-1|0;c=nU(d+12|0,o[e+b|0]);if(c){break a}c=q[a+8>>2]+(f>>>1&2147483644)|0;q[c>>2]=q[c>>2]|q[d+12>>2]<<(f<<2&28);f=f+1|0;c=e;continue}break}c=0}ij(d)}Ii=d+16|0;return c}function rn(a,b){var c=0,d=0,e=0,f=0;Nm(a,b);a:{b:{if(q[b>>2]!=12){break b}d=b+8|0;if(q[b+16>>2]==q[b+20>>2]){break a}c=q[b+8>>2];if((c|0)>2]}Nm(a,b);c:{if(q[b>>2]!=12){break c}c=q[b+8>>2];if(c&256|(c|0)>2]=q[a+36>>2]-1}e=q[a+36>>2];c=e+1|0;f=q[a>>2];d:{if(r[f+75|0]>(e|0)){d=c;break d}d=c;if((e|0)>=249){Sj(q[a+12>>2],141814);f=q[a>>2];d=q[a+36>>2]+1|0}o[f+75|0]=c}q[a+36>>2]=d;er(a,b,d-1|0);d=b+8|0}return q[d>>2]}function kna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+8>>2];g=(q[q[a+16>>2]>>2]-q[b+48>>2]|0)/48|0;c=q[b>>2];e=q[b+4>>2];if((c|0)!=(e|0)){while(1){d=w(f,40)+c|0;if(!(q[d>>2]!=q[a+4>>2]|q[d+28>>2]!=(g|0))){q[d>>2]=0;_8(q[b+84>>2],q[d+16>>2]);e=q[b+4>>2];c=q[b>>2]}f=f+1|0;if(f>>>0<(e-c|0)/40>>>0){continue}break}}a:{c=q[b+64>>2];if(c){a=q[b+72>>2];if(!a|a>>>0>t[b+68>>2]){break a}a=a-1|0;q[b+72>>2]=a;q[c+(a<<2)>>2]=g;return 0}J(47657,47606,140,47688);G()}J(47693,47606,141,47688);G()}function Wea(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;a:{b:{c:{d:{if(!b){break d}Q(34962,a|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}db(34962,b|0,c|0,q[(d<<2)+91660>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Q(34962,0);if(!(r[q[75054]+156|0]&64)){break d}a=K()|0;if(a){break a}}Ii=e+16|0;return}lj(a,91632,1560);J(88669,88575,1560,91632);G()}lj(a,91632,1562);J(88669,88575,1562,91632);G()}lj(a,91632,1564);J(88669,88575,1564,91632);G()} - - - -function IE(a,b,c,d,e,f){var g=0,h=0,i=0;h=Ii-16|0;Ii=h;g=-12416;a:{if(t[a>>2]>c>>>0){break a}c=a+52|0;i=a+4|0;g=Ow(c,i);if(g){break a}q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;b:{c:{if(e){g=wua(a,e,f);if(g){break b}g=Wk(h,c,a+88|0);if(g){break b}g=gl(h,h,i);if(!g){break c}break b}g=wk(h,c);if(g){break b}}c=a- -64|0;g=Do(c,h,a+28|0,i,a+76|0);if(g){break b}if(e){g=Wk(c,c,a+100|0);if(g){break b}g=gl(c,c,i);if(g){break b}}a=Wm(c);q[d>>2]=a;g=Dn(c,b,a)}g=g?g-13056|0:0;ij(h)}Ii=h+16|0;return g}function c5(a){a=a|0;var b=x(0),c=0,d=0,e=0;c=a?q[a+120>>2]:0;a=a?q[a>>2]:0;e=q[c+8>>2]-q[c+12>>2]>>4;K3(q[63996]);if(a){b=x(Sm(a,127306,x(0))*x(1e6));a:{if(b=x(0)){a=x(y(b))>=x(1)?b>x(0)?~~x(A(x(C(x(b*x(2.3283064365386963e-10)))),x(4294967296)))>>>0:~~x(D(x(x(b-x(~~b>>>0>>>0))*x(2.3283064365386963e-10))))>>>0:0;d=~~b>>>0;break a}a=0;d=0}q[79310]=d;q[79311]=a}Ak(c,127327,252304);Ri(c,-2);if(q[c+8>>2]-q[c+12>>2]>>4!=(e|0)){J(127057,127078,211,127332);G()}}function U5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if(!(!e|d)){q[b+2200>>2]=q[b+2196>>2];return}q[b+2220>>2]=c;a:{b:{f=q[b+2204>>2];a=q[b+2200>>2];c=f-a|0;if(c>>>0>>0){if(o[b+2208|0]&1){break b}a=b+2196|0;g=(((e+f|0)-c|0)-q[a>>2]|0)- -1048576|0;f=a;a=b+2204|0;c=b+2200|0;Wi(g,1,f,a,c);f=q[a>>2];a=q[c>>2];c=f-a|0}if(c>>>0>>0){break a}Ti(a,d,e);q[b+2200>>2]=q[b+2200>>2]+e;q[b+2216>>2]=q[b+2216>>2]+e;return}J(33120,33195,493,33251);G()}J(33263,33195,540,33292);G()}function Pra(a){a=a|0;var b=0,c=0,d=0,e=0;d=q[a+8>>2];c=q[q[a+16>>2]>>2];b=q[c+28>>2];q[b>>2]=q[a+4>>2];q[b+4>>2]=d;q[b+8>>2]=q[a+12>>2];a=q[q[c>>2]>>2];d=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=qj(a,-1);Ri(a,-2);rj(a,-1e4,q[c+12>>2]);yk(a);rj(a,-1e4,q[c+16>>2]);c=dM(q[c>>2],q[c+28>>2],a);Ri(a,-2);a:{if(b){e=q[a+8>>2];q[e+8>>2]=2;q[e>>2]=b;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}yk(a);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(12728,12749,779,13207);G()}return c|0}function zp(a,b,c,d){var e=0,f=0;a:{b:{c:{if((c|0)<10){e=b&65535;f=q[a+36>>2];a=q[a+32>>2];if(e>>>0>=(f-a|0)/592>>>0){break c}if(s[(a+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(e,592)|0;if(s[a+570>>1]!=(b&65535)){break a}b=a+(c<<4)|0;u[b>>2]=u[d>>2];u[b+4>>2]=u[d+4>>2];u[b+8>>2]=u[d+8>>2];u[b+12>>2]=u[d+12>>2];q[a+412>>2]=q[a+412>>2]|4194304;return}J(200448,199542,2889,200514);G()}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fw(a,b,c,d,e){var f=0,g=0;g=r[e+32|0]?-9:0;a:{b:{if(q[e>>2]==(a|0)&q[e+4>>2]==(b|0)){f=-4;if(q[c>>2]!=3){break a}u[d>>2]=u[c+8>>2];u[d+4>>2]=u[c+12>>2];u[d+8>>2]=u[c+16>>2];break b}if(q[e+8>>2]==(a|0)&q[e+12>>2]==(b|0)){f=-4;if(q[c>>2]){break a}u[d>>2]=v[c+8>>3];break b}if(q[e+16>>2]==(a|0)&q[e+20>>2]==(b|0)){f=-4;if(q[c>>2]){break a}u[d+4>>2]=v[c+8>>3];break b}f=-1;if((a|0)!=q[e+24>>2]|(b|0)!=q[e+28>>2]){break a}f=-4;if(q[c>>2]){break a}u[d+8>>2]=v[c+8>>3]}f=g}return f}function Vu(a,b,c){var d=0,e=0,f=0;a:{switch(q[b>>2]-13|0){case 0:a=q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)|0;q[a>>2]=q[a>>2]&-8372225|(c<<14)+16384&8372224;return;case 1:e=q[a>>2];d=q[e+12>>2];f=d+(q[b+8>>2]<<2)|0;q[f>>2]=(q[f>>2]&8388607|c<<23)+8388608;b=d+(q[b+8>>2]<<2)|0;q[b>>2]=q[a+36>>2]<<6&16320|q[b>>2]&-16321;d=q[a+36>>2];b=d+1|0;b:{if((d|0)=249){Sj(q[a+12>>2],141814);e=q[a>>2];c=q[a+36>>2]+1|0}o[e+75|0]=b}q[a+36>>2]=c;break;default:break a}}}function Vk(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;a:{if((b|0)>0){c=b+1|0;e=q[a+4>>2];b:{if((c|0)<(e|0)){break b}f=q[a+12>>2];if((f|0)<=-1){c=e;if((c|0)>(b|0)){break b}while(1){c=0-w(c,f)|0;if((c|0)<=(b|0)){continue}break}break b}c=e;if(!f){break b}b=(e+f|0)-1|0;c=b-((b|0)%(f|0)|0)|0}if(q[a+24>>2]>=2){q[d+8>>2]=c;q[d+4>>2]=e;q[d>>2]=a;$y(q[53736],140012,d)}q[a+4>>2]=c;b=ul(q[a>>2],c);q[a>>2]=b;if(!b){break a}q[a+20>>2]=q[a+20>>2]+1;Ii=d+16|0;return}Qt(140090);G()}Qt(139998);G()}function At(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;a:{e=q[a+4>>2];d=q[a>>2];c=e-d|0;if(!c){break a}if((d|0)!=(e|0)){e=d-e|0;e=((c|0)<(e|0)?e:c)>>>2|0;c=(c|0)>-1?c:-1;c=w(e,(c|0)<1?c:1);e=c>>>0>1?c:1;c=0;while(1){d=q[(c<<2)+d>>2];q[f+12>>2]=s[d+24>>1];g=q[d>>2];h=q[d+12>>2];q[f>>2]=q[d+8>>2];q[f+4>>2]=h;kk(b,f,8);kk(b,g,q[f+12>>2]<<4);c=c+1|0;if((e|0)==(c|0)){break a}d=q[a>>2];if(q[a+4>>2]-d>>2>>>0>c>>>0){continue}break}}J(48162,47954,479,48173);G()}o[a+52|0]=0;Ii=f+16|0}function rM(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=Ii-48|0;Ii=c;q[c+40>>2]=0;a:{e=q[b+84>>2];if(q[e+4>>2]){while(1){d=q[e>>2]+w(f,96)|0;g=q[d+16>>2];q[c+32>>2]=0;h=q[g+100>>2]&65536;j=(h>>>16|0)+i|0;if(j>>>0>t[b+152>>2]){break a}q[c+8>>2]=q[a+8>>2];q[c+12>>2]=b;q[c+16>>2]=q[((q[d+20>>2]<<2)+a|0)+12>>2];d=q[g+16>>2];q[c+24>>2]=h?((i<<2)+b|0)+156|0:0;q[c+20>>2]=d;Mi[q[g+32>>2]](c+8|0)|0;i=j;f=f+1|0;if(f>>>0>2]){continue}break}}Ii=c+48|0;return}J(8018,7192,889,9779);G()}function jZ(a,b,c){var d=0,e=0,f=0,g=0;rn(a,b);a:{if(q[b>>2]!=12){break a}d=q[b+8>>2];if(d&256|(d|0)>2]=q[a+36>>2]-1}e=q[a+36>>2];d=e+2|0;f=q[a>>2];b:{if((d|0)<=r[f+75|0]){g=d;break b}g=d;if((e|0)>=248){Sj(q[a+12>>2],141814);f=q[a>>2];g=q[a+36>>2]+2|0}o[f+75|0]=d}q[a+36>>2]=g;fl(a,e<<6|q[b+8>>2]<<23|Il(a,c)<<14|11,q[q[a+12>>2]+8>>2]);c:{if(q[c>>2]!=12){break c}c=q[c+8>>2];if(c&256|(c|0)>2]=q[a+36>>2]-1}q[b>>2]=12;q[b+8>>2]=e}function sia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;a:{e=q[a>>2];d=q[e+4>>2];c=q[e>>2];b=d-c|0;if(!b){break a}if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;b=0;while(1){f=q[(b<<2)+c>>2];c=q[f+128>>2];b:{if(!c){break b}g=q[q[a+4>>2]+8>>2];if((c|0)!=(g|0)){c=q[c+8>>2];if(!c|q[c+28>>2]!=(g|0)){break b}}ola(e,f,b)}b=b+1|0;if((d|0)==(b|0)){break a}c=q[e>>2];if(q[e+4>>2]-c>>2>>>0>b>>>0){continue}break}}J(51709,51308,486,51547);G()}}function moa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;c=q[a+8>>2];b=q[c+16>>2];g=q[q[a+16>>2]>>2];if(g>>>0>2]-b>>3>>>0){d=q[b+(g<<3)>>2];e=q[c>>2];if(d>>>0>2]-e>>8>>>0){b=(d<<8)+e|0;f=s[b+246>>1];if(f&4){p[b+246>>1]=f&65531;Ni(q[((d<<8)+e|0)+240>>2])}b=0;a=q[a>>2];a:{if(!a){break a}a=q[a>>2];if(!a){break a}b=q[a>>2]}a=(d<<8)+e|0;f=q[a+224>>2];if(f){cj(b,f)}a=q[a+228>>2];if(a){cj(b,a)}a=q[((d<<8)+e|0)+220>>2];if(a){Hr(a)}G9(c,g);return 0}}J(57189,57106,479,57200);G()}function aaa(a,b){var c=x(0),d=0,e=0;e=Ii-16|0;Ii=e;a:{b:{c:{d:{d=r[b+4|0];switch(d&3){case 2:break b;case 1:break c;case 0:break d;default:break a}}c=u[(s[b>>1]<<2)+a>>2];c=d&4?x(-c):c;c=d&8?x(x(c+x(1))*x(.5)):c;if(!(d&16)){break a}c=c>1];a=q[(d+(a>>>3&536870908)|0)+128>>2]>>>a&1}else{a=0}c=a?x(1):x(0);break a}o[e+15|0]=0;d=s[b>>1];if(a){o[e+15|0]=r[(a+d|0)+136|0]}if(!a){break a}c=s[b+2>>1]&r[e+15|0]?x(1):x(0)}Ii=e+16|0;return c}function yp(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-1024|0;Ii=d;a:{if(r[a|0]){Pj(d,a,1024);Zk(d,172678,1024);break a}o[d|0]=0}Zk(d,b,1024);b=r[d|0];b:{if(!b){break b}a=d;while(1){f=e;g=b&255;c:{if(!((g|0)!=47?(g|0)!=92:0)){o[c+f|0]=47;while(1){b=r[a|0];if((b|0)==92|(b|0)==47){a=a+1|0;continue}else{g=47;break c}}}o[c+f|0]=b;g=b;b=r[a+1|0];a=a+1|0}e=f+1|0;if(b&255?e>>>0<1024:0){continue}break}if(!f){e=1;break b}if((g&255)!=47){break b}o[c+f|0]=0}o[(e>>>0<1023?e:1023)+c|0]=0;Ii=d+1024|0}function qla(a){var b=0;a:{if(o[a+132|0]&1){break a}b=q[a+120>>2];if(!b){break a}Ni(b)}b:{if(o[a+116|0]&1){break b}b=q[a+104>>2];if(!b){break b}Ni(b)}c:{if(o[a+100|0]&1){break c}b=q[a+80>>2];if(b){Ni(b)}b=q[a+72>>2];if(!b){break c}Ni(b)}d:{if(o[a+68|0]&1){break d}b=q[a+56>>2];if(!b){break d}Ni(b)}e:{if(o[a+48|0]&1){break e}b=q[a+36>>2];if(!b){break e}Ni(b)}f:{if(o[a+32|0]&1){break f}b=q[a+20>>2];if(!b){break f}Ni(b)}g:{if(o[a+16|0]&1){break g}a=q[a+4>>2];if(!a){break g}Ni(a)}}function Vi(a,b){var c=0;a:{b:{if((b|0)>=1){c=-1;b=(q[a+12>>2]+(b<<4)|0)-16|0;if(b>>>0>2]){break b}break a}if((b|0)>=-9999){b=q[a+8>>2]+(b<<4)|0;break b}c:{switch(b+10002|0){case 2:b=q[a+16>>2]+96|0;break b;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;b=a+88|0;break b;case 0:b=a+72|0;break b;default:break c}}c=-1;a=q[q[q[a+20>>2]+4>>2]>>2];if(r[a+7|0]<(-10002-b|0)){break a}b=(a+(0-b<<4)|0)-160024|0}if((b|0)==141056){return-1}c=q[b+8>>2]}return c}function Jo(a,b){var c=0,d=0,e=0,f=0,g=0;a:{c=q[a+104>>2];if(!c){break a}f=q[a+16>>2];while(1){d=q[c+8>>2];if(d>>>0>>0){break a}q[a+104>>2]=q[c>>2];e=c+16|0;b:{if(r[c+5|0]&(r[f+20|0]^-1)&3){if((e|0)!=(d|0)){q[q[e+4>>2]+16>>2]=q[e>>2];q[q[e>>2]+20>>2]=q[e+4>>2]}Cj(a,c,32,0);break b}q[q[c+20>>2]+16>>2]=q[c+16>>2];q[q[c+16>>2]+20>>2]=q[c+20>>2];d=q[c+8>>2];g=q[d+4>>2];q[c+16>>2]=q[d>>2];q[c+20>>2]=g;q[c+24>>2]=q[d+8>>2];q[c+8>>2]=e;HZ(a,c)}c=q[a+104>>2];if(c){continue}break}}}function EK(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;a:{b:{c:{d:{if(!b){break d}Q(34963,a|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}db(34963,b|0,c|0,q[(d<<2)+91660>>2]);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Q(34963,0);if(!(r[q[75054]+156|0]&64)){break d}a=K()|0;if(a){break a}}Ii=e+16|0;return}lj(a,91746,1591);J(88669,88575,1591,91746);G()}lj(a,91746,1593);J(88669,88575,1593,91746);G()}lj(a,91746,1595);J(88669,88575,1595,91746);G()}function $pa(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;e=ak(a,q[b>>2],d+12|0);if(!e){a=$i(32);q[a>>2]=0;q[a+4>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+8>>2]=q[d+12>>2];o[a+25|0]=o[b+4|0]&1;o[a+24|0]=q[b+24>>2];q[a>>2]=Oi(q[b+8>>2]);q[a+4>>2]=Li;u[a+12>>2]=u[b+12>>2];u[a+16>>2]=u[b+16>>2];u[a+20>>2]=u[b+20>>2];f=Z1(q[b+8>>2]);if(f){g=q[b+8>>2];q[d+4>>2]=f;q[d>>2]=g;Pi(4,64023,64031,d)}q[c>>2]=a}Aj(b);Ii=d+16|0;return e}function wla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-80|0;Ii=c;e=q[a+8>>2]-q[a+12>>2]|0;f=jk(a);q[c+72>>2]=0;q[c+76>>2]=0;b=c- -64|0;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;Gk(a,1,b+48|0,b+16|0);d=q[59999];vk(b+16|0,b+48|0,q[d+8>>2],q[d+12>>2],f,d,b+15|0,1);if(e>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(71895,71916,368,72010);G()}Ii=c+80|0;return 0}function bta(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;a:{if((b|0)<=-1){e=b;c=b>>31;b=0;while(1){g=b;o[(d+1|0)+b|0]=e|128;b=b+1|0;h=!c&e>>>0>16383|(c|0)!=0;f=c;c=c>>>7|0;f=(f&127)<<25|e>>>7;e=f;if(h){continue}break}o[(d+1|0)+b|0]=f;a=Mi[q[a>>2]](q[a+4>>2],d+1|0,g+2|0)|0;break a}b:{if(b>>>0<128){e=b;break b}while(1){o[(d+11|0)+c|0]=b|128;c=c+1|0;f=b>>>0>16383;e=b>>>7|0;b=e;if(f){continue}break}}o[(d+11|0)+c|0]=e;a=Mi[q[a>>2]](q[a+4>>2],d+11|0,c+1|0)|0}Ii=d+16|0;return a}function YO(a,b,c,d){var e=0,f=0;a:{b:{f=c+8|0;if(f>>>0>b>>>0){break b}e=Fq(a,c,d);if(e){break a}if((c|0)==2){c=q[d>>2];q[d>>2]=((c|0)<50?c+100|0:c)+1900}e=Fq(a,2,d+4|0);if(e){break a}e=Fq(a,2,d+8|0);if(e){break a}e=Fq(a,2,d+12|0);if(e){break a}e=Fq(a,2,d+16|0);if(e){break a}b=b-f|0;if(b>>>0<2){break b}e=Fq(a,2,d+20|0);if(e){break a}e=-9216;c:{switch(b-2|0){case 1:b=q[a>>2];if(r[b|0]!=90){break a}q[a>>2]=b+1;break;case 0:break c;default:break a}}return iP(d)}e=-9216}return e}function uk(a,b){var c=0;a:{b:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;if(b>>>0>2]){break b}break a}if((b|0)>=-9999){b=q[a+8>>2]+(b<<4)|0;break b}c:{switch(b+10002|0){case 2:b=q[a+16>>2]+96|0;break b;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;b=a+88|0;break b;case 0:b=a+72|0;break b;default:break c}}a=q[q[q[a+20>>2]+4>>2]>>2];if(r[a+7|0]<(-10002-b|0)){break a}b=(a+(0-b<<4)|0)-160024|0}if((b|0)==141056){return 0}c=q[b+8>>2]-3>>>0<2}return c}function pj(a,b){var c=0,d=0;d=a;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}b=q[a+8>>2];Ru(d,c,b-32|0,b-16|0);q[a+8>>2]=q[a+8>>2]-32}function Rxa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Ii-32|0;Ii=d;q[d+16>>2]=b;e=q[a+48>>2];q[d+20>>2]=c-((e|0)!=0);f=q[a+44>>2];q[d+28>>2]=e;q[d+24>>2]=f;e=-1;a:{b:{g=hb(q[a+60>>2],d+16|0,2,d+12|0)|0;f=0;c:{if(!g){break c}q[240513]=g;f=-1}if(!f){e=q[d+12>>2];if((e|0)>0){break b}}q[a>>2]=q[a>>2]|e&48^16;break a}g=q[d+20>>2];if(g>>>0>=e>>>0){break a}f=q[a+44>>2];q[a+4>>2]=f;q[a+8>>2]=f+(e-g|0);if(q[a+48>>2]){q[a+4>>2]=f+1;o[(b+c|0)-1|0]=r[f|0]}e=c}Ii=d+32|0;return e|0}function BB(a,b,c){var d=0,e=0,f=0;f=Ii-16|0;Ii=f;a:{b:{c:{d:{e:{d=Vi(a,b);switch(d-1|0){case 2:break a;case 6:break d;case 0:break e;default:break c}}e=6;break a}e=1;if(On(a,b)){break a}e=2;if(qv(a,b)){break a}d=Om(a,b);q[c>>2]=d;e=3;if(d){break a}d=Nn(a,b);q[c>>2]=d;e=4;if(d){break a}d=pz(a,b);q[c>>2]=d;e=5;if(d){break a}a=qz(a,b);q[c>>2]=a;e=7;if(a){break a}Pi(4,14393,14404,0);break b}q[f>>2]=(d|0)==-1?140583:q[(d<<2)+256832>>2];Pi(4,14393,14443,f)}e=8}Ii=f+16|0;return e}function gM(a,b){var c=0,d=0,e=0,f=0;a:{b:{c=b>>>16&32767;if((c|0)!=32767){d=q[a+1040>>2];b=q[a+1036>>2];while(1){if(d-b>>2>>>0<=c>>>0){break a}e=c<<2;b=q[e+b>>2];gM(a,q[b+148>>2]);if(r[b+136|0]>=127){break b}Kt(a,b);d=q[b+136>>2];f=q[b+140>>2];q[b+136>>2]=d&-256|d+1&255;q[b+140>>2]=f;zw(a,b);d=q[a+1040>>2];b=q[a+1036>>2];if(d-b>>2>>>0<=c>>>0){break a}c=q[q[b+e>>2]+148>>2]&32767;if((c|0)!=32767){continue}break}}return}J(12236,7192,1643,12283);G()}J(12419,9962,479,9454);G()}function O2(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;b=qj(a,1);a:{b:{c:{c=kj(a,2,0);if(!dj(129104,c)){c=q[b+4>>2];e=c;b=q[b>>2];if(!(c|b)){break c}lk(a,b,e);a=1;break a}if(!dj(129111,c)){c=q[b+20>>2];e=c;b=q[b+16>>2];if(!(c|b)){break c}lk(a,b,e);a=1;break a}if(dj(129116,c)){break b}c=q[b+28>>2];e=c;b=q[b+24>>2];if(!(c|b)){break c}lk(a,b,e);a=1;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;a=1;break a}q[d+4>>2]=128488;q[d>>2]=128484;a=Qi(a,129125,d)}Ii=d+16|0;return a|0}function vq(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{if(b){c=q[a+8>>2];i=q[a+4>>2];if(c>>>0>i>>>0){break a}b:{while(1){d=c>>>0>=i>>>0;e=!f&(h|0)==10;if(d|!f&(h|0)==10){break b}e=c+1|0;q[a+8>>2]=e;j=r[c|0];d=j&127;g=Aza(h,f,7,0);c=g&31;if((g&63)>>>0>=32){g=d<>>32-c;c=d<>>0<1?f+1|0:f;h=c;c=e;if(j&128){continue}break}d=0;e=0}a=e|d;if(!a){q[b>>2]=k}return a^1}J(23192,23130,69,23198);G()}J(23111,23130,70,23198);G()}function A6(a){var b=0,c=0,d=0,e=0,f=0;e=q[a+20>>2];Gj(e);f=a;d=q[a+4>>2];c=q[a>>2];b=d-c|0;if(b){a:{if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>4|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;b=0;while(1){c=(b<<4)+c|0;Ni(q[c>>2]);Mz(q[c+4>>2]);b=b+1|0;if((d|0)==(b|0)){break a}c=q[a>>2];if(q[a+4>>2]-c>>4>>>0>b>>>0){continue}break}}J(28298,28028,479,28309);G()}c=q[a>>2]}q[f+4>>2]=c;Bj(e);Qn(q[a+20>>2]);b:{if(o[a+12|0]&1){break b}c=q[a>>2];if(!c){break b}Ni(c)}Ni(a)}function hI(a){var b=0,c=0,d=0,e=0;d=q[a+4>>2];c=q[a>>2];e=d-c|0;b=(e|0)/18568|0;a:{b:{if(!e){break b}if((c|0)!=(d|0)){d=b>>>0>1?b:1;b=0;while(1){c=w(b,18568)+c|0;if(o[c+18540|0]&1){break a}Wi(0,1544,c+18528|0,c+18536|0,c+18532|0);b=b+1|0;if((d|0)==(b|0)){break b}c=q[a>>2];if((q[a+4>>2]-c|0)/18568>>>0>b>>>0){continue}break}}J(151947,151192,479,151403);G()}Aj(q[a+16>>2]);c:{if(o[a+12|0]&1){break c}b=q[a>>2];if(!b){break c}Ni(b)}Ni(a);return}J(151117,151192,493,151248);G()}function dS(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{e=b&7;b:{if(!e){e=c;break b}d=b>>>3|0;g=8-e|0;c:{if(g>>>0>=c>>>0){if(!c){break a}e=a+d|0;f=r[e|0];d=c;while(1){f=1<>>0<=g>>>0){break a}}c=(b>>>3|0)+a|0;d=e&7;if(d){a=(b+e>>>3|0)+a|0;f=r[a|0];while(1){f=1<<8-d|f;d=d-1|0;if(d){continue}break}o[a|0]=f;e=e&-8}Ui(c,255,e>>>3|0)}}function Swa(a,b,c){var d=0,e=0,f=0,g=0;e=a;b=r[b+1|0];f=b<<3|b>>>2;g=(c<<4)+105744|0;b=f+q[g>>2]|0;a:{b:{if(b>>>0<256){d=b;break b}c=255;if((b|0)>=0){break a}}c=d}q[e>>2]=c;b=0;e=a;c=q[g+4>>2]+f|0;c:{d:{if(c>>>0<256){b=c;break d}d=255;if((c|0)>=0){break c}}d=b}q[e+4>>2]=d;b=0;e=a;c=q[g+8>>2]+f|0;e:{f:{if(c>>>0<256){b=c;break f}d=255;if((c|0)>=0){break e}}d=b}q[e+8>>2]=d;d=a;a=0;b=q[g+12>>2]+f|0;g:{h:{if(b>>>0<256){a=b;break h}c=255;if((b|0)>=0){break g}}c=a}q[d+12>>2]=c}function Nv(a,b){var c=0,d=0,e=0,f=0,g=0;a:{c=q[a+4>>2];if(c){b:{g=q[a>>2]+((b>>>0)%(c>>>0)<<2)|0;d=q[g>>2];if((d|0)!=-1){c=0;e=q[a+8>>2];f=e+w(d,12)|0;if(q[f>>2]==(b|0)){break a}break b}J(6730,6227,340,6724);G()}while(1){d=q[(w(d,12)+e|0)+8>>2];if((d|0)!=-1){c=f;f=w(d,12)+e|0;if(q[f>>2]!=(b|0)){continue}break a}break}J(6757,6227,366,6724);G()}J(6703,6227,334,6724);G()}q[a+24>>2]=q[a+24>>2]-1;b=w(d,12)+e|0;q[(c?c+8|0:g)>>2]=q[b+8>>2];c=q[a+20>>2];q[a+20>>2]=d;q[b+8>>2]=c}function ww(a,b){var c=0,d=0,e=0,f=0;a:{b:{c=b>>>16&32767;if((c|0)!=32767){d=q[a+1040>>2];b=q[a+1036>>2];while(1){if(d-b>>2>>>0<=c>>>0){break a}e=c<<2;b=q[e+b>>2];ww(a,q[b+148>>2]);if(!r[b+136|0]){break b}Kt(a,b);d=q[b+136>>2];f=q[b+140>>2];q[b+136>>2]=d&-256|d-1&255;q[b+140>>2]=f;zw(a,b);d=q[a+1040>>2];b=q[a+1036>>2];if(d-b>>2>>>0<=c>>>0){break a}c=q[q[b+e>>2]+148>>2]&32767;if((c|0)!=32767){continue}break}}return}J(10374,7192,1232,12292);G()}J(12419,9962,479,9454);G()}function Fta(a,b,c){var d=0;d=Ii-96|0;Ii=d;aq(d);q[d+8>>2]=1732584193;q[d+12>>2]=-271733879;q[d>>2]=0;q[d+4>>2]=0;q[d+24>>2]=-1009589776;q[d+16>>2]=-1732584194;q[d+20>>2]=271733878;$p(d,a,b);a=Rq(d,c);if(d){Mi[q[65677]](d,0,92)|0}if(a){o[c|0]=0;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;o[c+4|0]=0;o[c+5|0]=0;o[c+6|0]=0;o[c+7|0]=0;o[c+16|0]=0;o[c+17|0]=0;o[c+18|0]=0;o[c+19|0]=0;o[c+8|0]=0;o[c+9|0]=0;o[c+10|0]=0;o[c+11|0]=0;o[c+12|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0}Ii=d+96|0}function jta(a,b,c,d,e){var f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;g=2;a:{b:{if((c|0)!=2){break b}if(!vq(e,f+12|0)){break b}if(!SM(e,q[f+12>>2],f+8|0)){break b}e=q[f+12>>2];h=q[f+8>>2];c=q[d+4>>2];if((c&-268435456)==805306368){pta(a,b,d,h,e);g=0;break b}if((c&264241152)!=37748736){break a}c=OB(b,e+1|0);g=0;if(r[a+12|0]){break b}a=q[a+4>>2];d=q[d+12>>2];i=e;e=Ti(c,h,e);o[i+e|0]=0;a=a+d|0;if(o[b+48|0]&1){c=e-q[b+32>>2]|0}q[a>>2]=c}Ii=f+16|0;return g}J(23815,23354,288,23851);G()}function eq(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}a=c;if(q[a+8>>2]==6){a=r[q[a>>2]+6|0]!=0}else{a=0}return a}function Voa(a){a=a|0;var b=0,c=0,d=0,e=0;a:{b:{c:{b=q[a+80>>2];d=q[b+24>>2];c=q[b+28>>2];if((d|0)!=(c|0)){e=q[b+20>>2];if(!e){break c}if(c>>>0>=d>>>0){break b}q[b+28>>2]=c+1;c=q[(c<<2)+e>>2];d=q[b+8>>2];b=q[b+4>>2];if(c>>>0>=(d-b|0)/28>>>0){break a}d=q[a+76>>2];b=b+w(c,28)|0;q[b+4>>2]=0;q[b>>2]=d;q[q[a+88>>2]>>2]=b;return 0}xn(39481,q[57962],(q[b+8>>2]-q[b+4>>2]|0)/28|0);return-1e3}J(40085,40012,151,40092);G()}J(40096,40012,152,40092);G()}J(40063,39894,479,40074);G()}function C4(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-4e3|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-10002,122919);o[b+16|0]=0;c=1;a:{b:{if((e|0)>=1){while(1){ej(a,-1);ej(a,c);Rk(a,1,1);d=uj(a,-1,0);if(!d){break b}if(c>>>0>=2){Zk(b+16|0,122971,3984)}Zk(b+16|0,d,3984);Ri(a,-2);d=(c|0)==(e|0);c=c+1|0;if(!d){continue}break}}q[b>>2]=b+16;Pi(1,122749,122973,b);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4==(e|0)){break a}J(122976,122672,395,122995);G()}f=Qi(a,122928,0)}Ii=b+4e3|0;return f|0}function cca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=q[a+8>>2]-q[a+12>>2]>>4;e=tj(a,1,c+12|0);a:{if(r[e+415|0]&16){break a}if(Vi(a,2)){b=tj(a,2,c+12|0);b=s[b+570>>1]|s[b+568>>1]<<16}b:{if((d|0)<3){break b}if((Vi(a,3)|0)!=1){break b}f=(Uj(a,3)|0)!=0}gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);c:{d:{b=zr(d,s[e+570>>1]|s[e+568>>1]<<16,b,f);switch(b+8|0){case 8:break a;case 0:break d;default:break c}}b=Qi(a,207180,0);break a}b=Qi(a,207239,0)}Ii=c+16|0;return b|0}function Fra(a){var b=0,c=0,d=0;ksa(q[q[q[a+4>>2]+80>>2]+8>>2],a);b=q[q[a>>2]>>2];d=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[a+12>>2]);yk(b);Ez(q[a+8>>2]);c=q[b+8>>2];q[c+8>>2]=0;q[b+8>>2]=c+16;yk(b);Rj(b,-1e4,q[a+20>>2]);Rj(b,-1e4,q[a+12>>2]);Rj(b,-1e4,q[a+16>>2]);Hra(q[a+28>>2]);q[a+8>>2]=0;q[a+12>>2]=0;q[a+32>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=-2;q[a+20>>2]=-2;q[a+12>>2]=-2;if(q[b+8>>2]-q[b+12>>2]>>4!=(d|0)){J(15852,15159,2687,17988);G()}}function Xta(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-80|0;Ii=b;g=q[a+8>>2]-q[a+12>>2]>>4;e=jj(a,1);if(!((e|0)==1&r[906092]!=0)){Qi(a,209110,0)}c=q[230860];c=(e|0)!=1?0:r[906092]?c>>>0<64?c:64:0;vj(a,0,0);if(c){while(1){q[b>>2]=Nta(e,d);mn(b+16|0,209167,b);f=q[a+8>>2];q[f+8>>2]=3;d=d+1|0;v[f>>3]=d>>>0;q[a+8>>2]=q[a+8>>2]+16;Xi(a,b+16|0);pj(a,-3);if((c|0)!=(d|0)){continue}break}}if((g+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(209170,208573,284,209195);G()}Ii=b+80|0;return 1}function Oq(a,b,c){var d=0,e=0;d=(c|0)!=0;a:{b:{c:{if(!c|!(a&3)){break c}e=b&255;while(1){if((e|0)==r[a|0]){break b}a=a+1|0;c=c-1|0;d=(c|0)!=0;if(!c){break c}if(a&3){continue}break}}if(!d){break a}}d:{if(r[a|0]==(b&255)|c>>>0<4){break d}d=w(b&255,16843009);while(1){e=d^q[a>>2];if((e^-1)&e-16843009&-2139062144){break d}a=a+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}b=b&255;while(1){if((b|0)==r[a|0]){return a}a=a+1|0;c=c-1|0;if(c){continue}break}}return 0}function k2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;a:{b:{if(!(q[a+8>>2]-q[a+12>>2]>>4)){b=$i(8);q[b>>2]=0;break b}Dj(a,1,5);d=al(a,1);b=$i(8);if((d|0)>-1){q[b>>2]=d;if(!d){break b}q[b+4>>2]=Yi(d<<2);while(1){c=q[a+8>>2];q[c+8>>2]=3;f=c;c=e+1|0;v[f>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,1);g=Mj(a,-1);u[q[b+4>>2]+(e<<2)>>2]=g;Ri(a,-2);e=c;if((c|0)!=(d|0)){continue}break}break a}J(135679,135693,37,135739);G()}q[b+4>>2]=0}q[yj(a,4)>>2]=b;Zi(a,-1e4,133984);xj(a,-2);return 1}function W6(a,b){var c=0,d=0;c=Ii-48|0;Ii=c;q[c+44>>2]=0;q[c+40>>2]=0;q[c+36>>2]=0;gv(a,c+44|0);Ro(c+40|0,16,q[c+44>>2]);d=q[c+40>>2];if(d){a:{b:{c:{d:{d=iv(a,d,q[c+44>>2],c+36|0);switch(d+2|0){case 2:break b;case 0:break d;default:break c}}q[c+20>>2]=-2;q[c+16>>2]=a;Pi(4,27287,27296,c+16|0);a=-3;break a}q[c+4>>2]=d;q[c>>2]=a;Pi(4,27287,27331,c);Ni(q[c+40>>2]);a=-1;break a}a=Sz(q[c+40>>2],q[c+44>>2],b);Ni(q[c+40>>2])}Ii=c+48|0;return a}J(27229,27245,130,27274);G()}function JX(a,b,c){var d=0;d=Ii+ -64|0;Ii=d;b=NE(a,b);a:{if(b){break a}b=d;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=Mu(a,64,b,b);if(b){break a}b=yW(a+132|0,d);if(b){break a}q[a+208>>2]=0;q[a+212>>2]=0;q[a+228>>2]=c;q[a+224>>2]=1;q[a+216>>2]=0;q[a+220>>2]=0;b=0}Mi[q[65677]](d,0,64)|0;Ii=d- -64|0;return b}function JA(a,b){var c=0,d=0,e=0,f=0;a:{if(b>>>0<4){d=b;break a}d=b;while(1){f=e;e=w(r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24),1540483477);e=w(f^w(e>>>24^e,1540483477),1540483477);a=a+4|0;d=d-4|0;if(d>>>0>3){continue}break}}b:{switch(d-1|0){case 2:c=r[a+2|0]<<16;case 1:c=r[a+1|0]<<8|c;case 0:c=w(r[a|0]^c,1540483477);break;default:break b}}a=w(b,1540483477);a=w(w(c>>>24^c,1540483477)^e,1540483477)^w(a>>>24^a,1540483477);a=w(a>>>13^a,1540483477);return a>>>15^a}function Epa(a){a=a|0;var b=0,c=0,d=0,e=0;a:{b:{c:{b=q[a+80>>2];d=q[b+20>>2];c=q[b+24>>2];if((d|0)!=(c|0)){e=q[b+16>>2];if(!e){break c}if(c>>>0>=d>>>0){break b}q[b+24>>2]=c+1;c=q[(c<<2)+e>>2];d=q[b+4>>2];b=q[b>>2];if(c>>>0>=(d-b|0)/28>>>0){break a}d=q[a+76>>2];b=b+w(c,28)|0;q[b+4>>2]=0;q[b>>2]=d;q[q[a+88>>2]>>2]=b;return 0}xn(34573,q[57955],(q[b+4>>2]-q[b>>2]|0)/28|0);return-1e3}J(35291,35240,151,35298);G()}J(35302,35240,152,35298);G()}J(34809,34820,479,34798);G()}function CG(a){var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;a:{c=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)>1){dt(a);e=a;if((Vi(a,-1)|0)==5){xk(a,-3);pj(a,-3);d=-2}else{d=-4}Ri(e,d);c=c-2|0;a=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)!=(a|0)){break a}Ii=b+32|0;return}q[b+12>>2]=c;q[b+4>>2]=1189;q[b+8>>2]=-2;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=c;q[b+20>>2]=1189;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function hna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+8>>2];q[b+112>>2]=0;o[b+120|0]=r[b+120|0]&254;e=q[b+4>>2];c=q[b>>2];g=e-c|0;d=(g|0)/40|0;a:{if(!g){break a}if((c|0)!=(e|0)){e=d>>>0>1?d:1;while(1){d=w(f,40)+c|0;c=q[d+20>>2];if((c|0)==q[a+4>>2]){b9(q[b+84>>2],q[d+16>>2]);c=q[d+20>>2]}q[b+112>>2]=q[b+112>>2]+((q[c+4>>2]-q[c>>2]|0)/18568|0);f=f+1|0;if((e|0)==(f|0)){break a}c=q[b>>2];if((q[b+4>>2]-c|0)/40>>>0>f>>>0){continue}break}}J(47406,47132,479,47417);G()}}function bva(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=a;if((Vi(a,1)|0)==8){d=Gn(a,1)}e=r[d+56|0];b=q[d+68>>2];a:{if(!(!b|(b|0)==1211)){bj(a,147208,13);break a}MF(a);b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;jl(a,-2);ll(a,-2)}b=0;if(e&1){o[c+11|0]=99;b=1}if(e&2){o[(c+11|0)+b|0]=114;b=b+1|0}if(e&4){o[(c+11|0)+b|0]=108;b=b+1|0}o[(c+11|0)+b|0]=0;Xi(a,c+11|0);d=q[d+60>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ii=c+16|0;return 3}function hqa(a){a=a|0;var b=0,c=0,d=0,e=x(0),f=x(0),g=x(0),h=0;b=Ii-16|0;Ii=b;c=Zm(a,2);d=Om(a,1);a:{b:{if(d){c:{e=u[d>>2];d:{if(e<=x(0)){break d}f=u[d+4>>2];if(f<=x(0)){break d}g=u[d+8>>2];if(g<=x(0)^1){break c}}a=Qi(a,15609,0);break a}u[b+8>>2]=g;u[b+4>>2]=f;u[b>>2]=e;a=q[b+4>>2];d=q[b>>2];u[c+40>>2]=u[b+8>>2];q[c+32>>2]=d;q[c+36>>2]=a;break b}h=fj(a,1);if(!(h<=0^1)){a=Qi(a,15691,0);break a}e=x(h);u[c+32>>2]=e;u[c+40>>2]=e;u[c+36>>2]=e}a=0}Ii=b+16|0;return a|0}function _8(a,b){var c=0,d=0;a:{b:{if(!b){break b}c=b&65535;d=q[a+4>>2];a=q[a>>2];if(c>>>0>2>>>0){a=q[a+(c<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);break b}d=q[a+4>>2];c=q[a>>2];b=d-c|0;if(!b){break b}b=(b|0)/304|0;if((c|0)!=(d|0)){d=b>>>0>1?b:1;b=0;while(1){c=w(b,304)+c|0;o[c+296|0]=r[c+296|0]|8;b=b+1|0;if((d|0)==(b|0)){break b}c=q[a>>2];if((q[a+4>>2]-c|0)/304>>>0>b>>>0){continue}break}}break a}break a}return}J(151947,151192,479,151403);G()}function v5(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=-101;b=zV(q[a+12>>2],b,c);a:{if((b&-129)==-26880){break a}b:{if((b|0)<=-1){nD(q[a+12>>2]);f=-5;c:{d:{if((b|0)<=-81){if((b|0)==-30848){break a}if((b|0)==-26624){break d}if((b|0)==-26496){break a}break b}switch(b+80|0){case 0:break a;case 4:break c;default:break b}}f=-3;break a}f=-101;break a}q[d>>2]=b;f=0;break a}q[e+12>>2]=0-b;q[e+8>>2]=45;q[e+4>>2]=b;q[e>>2]=lr(b);Pi(3,181404,182883,e);f=-1e3}Ii=e+16|0;return f}function qT(a,b,c){var d=0,e=0,f=0;e=Ii-16|0;Ii=e;d=hk(a,b,e+12|0,48);a:{if(d){d=d-15104|0;break a}d=-15206;if((q[a>>2]+q[e+12>>2]|0)!=(b|0)){break a}d=hk(a,b,e+12|0,2);if(d){d=d-15104|0;break a}d=-15104;if(lE(c,q[a>>2],q[e+12>>2],0,0)){break a}q[a>>2]=q[a>>2]+q[e+12>>2];f=hk(a,b,e+12|0,2);if(f){d=f-15104|0;break a}if(lE(c,0,0,q[a>>2],q[e+12>>2])){break a}q[a>>2]=q[a>>2]+q[e+12>>2];if(vW(c)){break a}if(qy(c)){break a}d=q[a>>2]==(b|0)?0:-15206}Ii=e+16|0;return d}function f6(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;d=-2;i=q[a+8>>2];a:{if(!i|!q[a+36>>2]){break a}g=q[a+16>>2];if(!g){break a}g=q[q[a+12>>2]+(Cza(b,c,g)<<2)>>2];if((g|0)==-1){break a}a=q[a+20>>2];while(1){h=a+w(g,24)|0;if((b|0)!=q[h>>2]|q[h+4>>2]!=(c|0)){g=q[h+16>>2];if((g|0)!=-1){continue}break a}break}d=-4;b=q[(a+w(g,24)|0)+12>>2];a=q[b+4>>2];if((a<<8&16711680|a<<24|(a>>>8&65280|a>>>24))>>>0>f>>>0){break a}d=hH(i,b,e)?-3:0}return d|0}function BZ(a,b){var c=0,d=0,e=0,f=0;c=a+104|0;e=q[a+16>>2];d=q[a+104>>2];a:{if(!d){break a}f=q[d+8>>2];if(f>>>0>>0){break a}while(1){c=d;if((b|0)==(f|0)){a=r[c+5|0];if(!(a&(r[e+20|0]^-1)&3)){return c}o[c+5|0]=a^3;return c}d=q[c>>2];if(!d){break a}f=q[d+8>>2];if(f>>>0>=b>>>0){continue}break}}a=Cj(a,0,0,32);o[a+4|0]=10;d=r[e+20|0];q[a+8>>2]=b;o[a+5|0]=d&3;q[a>>2]=q[c>>2];q[c>>2]=a;q[a+16>>2]=e+120;b=q[e+140>>2];q[a+20>>2]=b;q[b+16>>2]=a;q[e+140>>2]=a;return a}function daa(a){var b=0,c=0;c=Ii-16|0;Ii=c;b=167926;a:{b:{switch(a+10|0){case 10:b=167937;break a;case 9:b=167940;break a;case 8:b=167953;break a;case 7:b=167972;break a;case 6:b=167989;break a;case 5:b=168005;break a;case 4:b=168035;break a;case 3:b=168047;break a;case 2:b=168062;break a;case 1:b=168071;break a;case 0:b=168088;break a;case 11:break a;default:break b}}if((a|0)!=-1e3){q[c>>2]=a;Pi(4,167836,168102,c);b=168140;break a}b=168094}Ii=c+16|0;return b}function Gra(a){var b=0,c=0,d=0,e=0;e=a;d=q[a+29088>>2];c=q[a+29084>>2];b=d-c|0;if(b){a:{if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;b=0;while(1){c=q[c>>2];Dw(c);Nr(c);b=b+1|0;if((d|0)==(b|0)){break a}c=q[a+29084>>2];if((c|0)!=q[a+29088>>2]){continue}break}}J(12419,9962,479,9454);G()}c=q[a+29084>>2]}q[e+29088>>2]=c;Qn(q[a+29080>>2]);b:{if(o[a+29096|0]&1){break b}c=q[a+29084>>2];if(!c){break b}Ni(c)}Ni(a)}function Eca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;d=nj(b+8|0,a,0,202233,4224);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);if((Vi(a,2)|0)!=-1){Dj(a,2,5);ej(a,2);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;if(Hj(a,-2)){while(1){c=uj(a,-2,0);a:{if(!dj(c,208140)){f=Uj(a,-1);break a}q[b>>2]=c;Pi(3,202556,208146,b)}Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2)}if((_aa(e,q[b+4>>2],(f|0)!=0)|0)==-10){g=Kj(d,208189,0)}mj(d);Ii=b+32|0;return g|0}function DC(a,b){var c=0,d=0,e=0;e=1;c=q[a>>2];d=q[b>>2];a:{if((c|0)>(d|0)){break a}b:{if((c|0)!=(d|0)){break b}c=q[a+4>>2];d=q[b+4>>2];if((c|0)>(d|0)){break a}if((c|0)!=(d|0)){break b}if(q[a+8>>2]>q[b+8>>2]|(q[a+12>>2]>q[b+12>>2]?q[a+8>>2]==q[b+8>>2]:0)|(q[a+16>>2]>q[b+16>>2]?!(q[a+8>>2]!=q[b+8>>2]|q[a+12>>2]!=q[b+12>>2]):0)){break a}if(q[a+8>>2]!=q[b+8>>2]|q[a+12>>2]!=q[b+12>>2]|q[a+16>>2]!=q[b+16>>2]){break b}if(q[a+20>>2]>q[b+20>>2]){break a}}e=0}return e}function AJ(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;f=q[a+24>>2];d=q[a+28>>2];a:{b:{if((f|0)==(d|0)){break b}c=d-f|0;g=(c|0)>-1?c:-1;d=f-d|0;c=w((g|0)<1?g:1,((c|0)<(d|0)?d:c)>>>3|0);d=c>>>0>1?c:1;c=0;while(1){if(q[(c<<3)+f>>2]!=(b|0)){c=c+1|0;if((d|0)!=(c|0)){continue}break b}break}c=q[((c<<3)+f|0)+4>>2];if(c){break a}}c=Vaa(q[a+20>>2],a);if(!c){c=0;break a}q[e+12>>2]=c;q[e+8>>2]=b;b=a+24|0;if(q[a+28>>2]==q[a+32>>2]){uua(b)}tua(b,e+8|0)}Ii=e+16|0;return c}function n5(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=x(0);c=Ii-48|0;Ii=c;b=_i(a,1,q[210438],0);f=u[b>>2];g=u[b+4>>2];a:{b:{if(f!=f|g!=g){break b}d=u[b+8>>2];if(d!=d){break b}e=u[b+12>>2];if(e==e){break a}}d=u[b+8>>2];e=u[b+12>>2];v[c+16>>3]=g;v[c+32>>3]=e;v[c+24>>3]=d;v[c+8>>3]=f;q[c>>2]=1;Qi(a,134315,c);e=u[b+12>>2];d=u[b+8>>2];g=u[b+4>>2];f=u[b>>2]}b=yj(a,16);u[b+12>>2]=e;u[b+8>>2]=-d;u[b+4>>2]=-g;u[b>>2]=-f;Zi(a,-1e4,134032);xj(a,-2);Ii=c+48|0;return 1}function _n(a){var b=0;a:{if(!q[a+176>>2]){b=xD(a);if(b){break a}while(1){b:{c:{if(q[a+132>>2]){break c}if(!(!(r[q[a>>2]+184|0]&2)|t[a+136>>2]>t[a+144>>2])){if(!NR(a)){break c}}b=PR(a);if((b|0)==-25984){break b}if(b){break a}}b=RV(a);if((b|0)<=-25729){if((b|0)==-26240|(b|0)==-25984){break b}break a}if((b|0)!=-25728){if(b){break a}b=0;if(q[a+128>>2]!=22){break a}AV(a);return 0}b=aS(a);if(b){break a}}b=xD(a);if(!b){continue}break}break a}q[a+176>>2]=0}return b}function Gn(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}a=c;if(q[a+8>>2]==8){a=q[a>>2]}else{a=0}return a}function f0(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=q[a+16>>2];b=Cj(a,0,0,192);q[a+48>>2]=8;q[a+20>>2]=b;q[a+40>>2]=b;q[a+36>>2]=b+168;b=Cj(a,0,0,720);q[a+44>>2]=45;q[a+32>>2]=b;q[a+28>>2]=b+624;c=q[a+20>>2];q[c+4>>2]=b;d=b+16|0;q[a+8>>2]=d;q[b+8>>2]=0;q[c>>2]=d;q[a+12>>2]=d;q[c+8>>2]=b+336;b=lp(a,0,2);q[a+80>>2]=5;q[a+72>>2]=b;b=q[a+16>>2];c=lp(a,0,2);q[b+104>>2]=5;q[b+96>>2]=c;Fy(a,32);fZ(a);bZ(a);a=Yj(a,142535,17);o[a+5|0]=r[a+5|0]|32;q[e+64>>2]=q[e+68>>2]<<2}function dfa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a:{if(a){hc(q[(b<<2)+92808>>2],q[(c<<2)+92688>>2],d|0,e|0);if(r[q[75054]+156|0]&64){f=K()|0;if(f){break a}}h=q[a+72>>2];i=q[a+76>>2];b:{if((b|0)==1){f=-1;g=-29;b=(c&7)<<2;c=0;break b}f=-29360129;g=-1;b=0;c=c<<22&29360128}c=c|f&h;f=(g&i|b)&-536862721;b=(e&255)<<13;q[a+72>>2]=c;q[a+76>>2]=(d&255)<<21|b|f;return}J(88636,88575,3714,92779);G()}lj(f,92779,3716);J(88669,88575,3716,92779);G()}function Bv(a,b,c,d){var e=0,f=0,g=0,h=0;g=q[a+104>>2];f=q[a+100>>2];h=g-f|0;e=(h|0)/40|0;a:{b:{if((h|0)<1){break b}c:{if((f|0)!=(g|0)){g=(e|0)>1?e:1;e=0;while(1){f=q[w(e,40)+f>>2];if((b|0)==q[f+8>>2]&q[f+12>>2]==(c|0)){break c}e=e+1|0;if((g|0)==(e|0)){break b}f=q[a+100>>2];if((q[a+104>>2]-f|0)/40>>>0>e>>>0){continue}break}}break a}b=q[a+104>>2];a=q[a+100>>2];if((b-a|0)/40>>>0<=e>>>0){break a}q[q[a+w(e,40)>>2]+16>>2]=d}return}J(114155,114013,479,114166);G()}function Qea(a,b){var c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;c=q[a+300>>2];a:{if((c|0)==q[a+292>>2]-q[a+284>>2]>>4){q[d>>2]=c;Pi(4,199633,199727,d);a=-4;break a}b=Oi(b);c=Li;g=c;e=s[a+388>>1];p[a+388>>1]=e+1;p[d+14>>1]=e;tA(a+276|0,b,c,d+14|0);c=q[a+32>>2];e=q[a+36>>2]-c|0;a=(e|0)/592|0;if(e){e=a>>>0>1?a:1;a=0;while(1){f=c+w(a,592)|0;if((b|0)==q[f+496>>2]&q[f+500>>2]==(g|0)){p[f+504>>1]=s[d+14>>1]}a=a+1|0;if((e|0)!=(a|0)){continue}break}}a=0}Ii=d+16|0;return a}function Kta(){var a=0,b=0;a=Ii-272|0;Ii=a;Ui(956480,0,1024);Ui(855716,0,50376);a:{if(kv(208343,957504)){break a}Zk(957504,208350,1024);Zk(957504,208352,1024);Pj(956480,957504,1024);Ui(a+8|0,0,264);jv(a+8|0);Pj(855876,a+8|0,32);Pj(855908,a+40|0,32);Pj(855940,a+72|0,32);Pj(855972,a+104|0,32);Pj(856004,a+168|0,8);Pj(856012,a+176|0,16);Pj(856028,a+192|0,8);Pj(855716,4177,32);Pj(855748,4183,128);o[284368]=r[284264];b=q[a+268>>2];if(!b){break a}Ni(b)}Ii=a+272|0}function T$(a,b,c){var d=0,e=0,f=0,g=0;d=Ii+ -64|0;Ii=d;if(c-1>>>0<16){o[d+26|0]=37;o[d+27|0]=46;if(c>>>0>=10){o[d+28|0]=49;e=3}else{e=2}e=e+(d+26|0)|0;o[e+1|0]=103;o[e+2|0]=0;o[e|0]=((c&255)>>>0)%10|48;a:{if(r[254432]==46){v[d>>3]=b;e=cp(a,32,d+26|0,d);break a}v[d+16>>3]=b;e=cp(d+32|0,32,d+26|0,d+16|0);c=d+32|0;g=r[254432];while(1){f=r[c|0];o[a|0]=(f|0)==(g|0)?46:f;c=c+1|0;a=a+1|0;if(f){continue}break}}Ii=d- -64|0;return e}J(138885,138919,163,138944);G()}function ID(a,b,c){var d=0,e=0,f=0;a:{if(!c){c=142616;q[b+16>>2]=142616;break a}c=Gy(c-1|0);d=c+1|0;if((c|0)>=26){Yk(a,142648,0)}e=1<>>0<=26){c=Cj(a,0,0,e<<5);q[b+16>>2]=c;a=b+16|0;break b}c=mk(a);q[b+16>>2]=c;if((d|0)==31){break a}a=b+16|0}q[c+8>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;if(!(!d|(e|0)<2)){c=1;while(1){f=q[a>>2]+(c<<5)|0;q[f+8>>2]=0;q[f+24>>2]=0;q[f+28>>2]=0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}c=q[a>>2]}o[b+7|0]=d;q[b+20>>2]=(e<<5)+c}function B5(a){var b=0;a:{if(o[a+112|0]&1){break a}b=q[a+100>>2];if(!b){break a}Ni(b)}b:{if(o[a+96|0]&1){break b}b=q[a+84>>2];if(!b){break b}Ni(b)}c:{if(o[a+80|0]&1){break c}b=q[a+68>>2];if(!b){break c}Ni(b)}d:{if(o[a- -64|0]&1){break d}b=q[a+52>>2];if(!b){break d}Ni(b)}e:{if(o[a+44|0]&1){break e}b=q[a+32>>2];if(!b){break e}Ni(b)}f:{if(o[a+28|0]&1){break f}b=q[a+16>>2];if(!b){break f}Ni(b)}g:{if(o[a+12|0]&1){break g}b=q[a>>2];if(!b){break g}Ni(b)}return a}function vZ(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-48|0;Ii=d;e=q[b+8>>2];q[d+44>>2]=0;c=e-3>>>0<2?c:b;e=q[(q[c+8>>2]<<2)+256832>>2];f=q[a+20>>2];g=q[f+8>>2];a:{b:{b=q[f>>2];if(g>>>0<=b>>>0){break b}while(1){if((b|0)!=(c|0)){b=b+16|0;if(g>>>0>b>>>0){continue}break b}break}b=dv(a,f,c-q[a+12>>2]>>4,d+44|0);if(!b){break b}q[d+20>>2]=b;q[d+24>>2]=q[d+44>>2];q[d+28>>2]=e;q[d+16>>2]=140655;Yk(a,140595,d+16|0);break a}q[d+4>>2]=e;q[d>>2]=140655;Yk(a,140630,d)}Ii=d+48|0}function i_(a){a=a|0;var b=0,c=0,d=0;d=Ii-112|0;Ii=d;a:{b:{c=Gn(a,1);if(c){if((a|0)==(c|0)){break a}c:{b=r[c+6|0];switch(b|0){case 1:break a;case 0:break c;default:break b}}b=2;if((sl(c,0,d+8|0)|0)>0){break a}b=q[c+8>>2]-q[c+12>>2]>>4?1:3;break a}dk(a,1,144334);if(!a){break a}d:{b=r[6];switch(b|0){case 1:break a;case 0:break d;default:break b}}b=2;if((sl(0,0,d+8|0)|0)>0){break a}b=q[2]-q[3]>>4?1:3;break a}b=3}Xi(a,q[(b<<2)+257264>>2]);Ii=d+112|0;return 1}function y4(a){a=a|0;var b=0,c=0;b=Ii-32|0;Ii=b;a:{c=q[a+8>>2]-q[a+12>>2]>>4;if((c|0)>-1){Zi(a,-10002,122717);q[qj(a,-1)>>2]=w(jj(a,1),214013)+2531011;Ri(a,-2);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(c|0)){break a}Ii=b+32|0;return 0}q[b+12>>2]=c;q[b+4>>2]=143;q[b+8>>2]=0;q[b>>2]=122672;Pi(4,122749,123291,b);J(123363,122672,1469,123380);G()}q[b+28>>2]=a;q[b+24>>2]=c;q[b+20>>2]=143;q[b+16>>2]=122672;Pi(4,122749,123394,b+16|0);J(123465,122672,1492,123484);G()}function qka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=q[a+20>>2];d=PL(q[a>>2],b);if(!d){c=q[a+24>>2];q[c+8>>2]=b;q[c+16>>2]=(q[a+16>>2]+(q[b+16>>2]-q[b+12>>2]|0)|0)+32;return d|0}c=q[b+16>>2];e=q[b+12>>2];if((c|0)!=(e|0)){f=q[a>>2];a=0;c=e;while(1){cj(f,q[(a<<2)+c>>2]);a=a+1|0;c=q[b+12>>2];if(a>>>0>2]-c>>2>>>0){continue}break}}q[b+16>>2]=c;a=q[b+8>>2];if(a){Aj(a);q[b+8>>2]=0}a:{if(o[b+24|0]&1){break a}a=q[b+12>>2];if(!a){break a}Ni(a)}Ni(b);return d|0}function iq(a,b,c){var d=0,e=0,f=0,g=0;d=Ii+ -64|0;Ii=d;e=Qu(b,d+40|0);q[d+60>>2]=0;c=e?c:b;e=q[(q[c+8>>2]<<2)+256832>>2];a:{b:{f=q[a+20>>2];b=q[f>>2];g=q[f+8>>2];if(b>>>0>=g>>>0){break b}while(1){if((b|0)!=(c|0)){b=b+16|0;if(g>>>0>b>>>0){continue}break b}break}b=dv(a,f,c-q[a+12>>2]>>4,d+60|0);if(!b){break b}q[d+20>>2]=b;q[d+24>>2]=q[d+60>>2];q[d+28>>2]=e;q[d+16>>2]=140667;Yk(a,140595,d+16|0);break a}q[d+4>>2]=e;q[d>>2]=140667;Yk(a,140630,d)}Ii=d- -64|0}function _s(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-80|0;Ii=d;o[b|0]=0;a:{if(Po(q[a>>2],q[a+4>>2])){e=sm(q[a>>2],q[a+4>>2]);if(e){break a}}q[d+32>>2]=aj(q[a>>2],q[a+4>>2]);sj(d+48|0,32,128258,d+32|0);e=d+48|0}Pj(b,e,c);Zk(b,128261,c);e=q[a+20>>2];g=e;f=q[a+16>>2];if(e|f){q[d+16>>2]=aj(f,g);sj(d+48|0,32,128258,d+16|0);Zk(b,d+48|0,c)}if(q[a+24>>2]|q[a+28>>2]){Zk(b,128263,c);q[d>>2]=aj(q[a+24>>2],q[a+28>>2]);sj(d+48|0,32,128258,d);Zk(b,d+48|0,c)}Ii=d+80|0;return b}function Mda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-16|0;Ii=b;g=q[a+8>>2]-q[a+12>>2]>>4;e=1;tj(a,1,b+12|0);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);c=207268;a:{b:{switch(bw(d,q[b+12>>2],b+8|0)+4|0){case 4:Xv(d,q[b+8>>2],q[b+12>>2]);c=q[b+8>>2];f=yj(a,8);q[f+4>>2]=c;q[f>>2]=d;Zi(a,-1e4,202300);xj(a,-2);if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(202310,202233,3329,207307);G();default:c=207239;break;case 0:break b}}e=Qi(a,c,0)}Ii=b+16|0;return e|0}function Fca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,0,202233,4172);gj(a);f=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,c+4|0);g=e;a:{b:{c:{if(q[a+8>>2]-q[a+12>>2]>>4<2){break c}if(!Vi(a,2)){break c}a=rp(a,2);d=208048;if(!a){break b}b=Yi(20);q[b+12>>2]=f;q[b+8>>2]=a;q[b+16>>2]=q[c+4>>2];q[b>>2]=1432;q[b+4>>2]=b}if((xba(f,q[c+4>>2],b)|0)!=-10){break a}d=208090;if(!b){break b}Ni(b);d=208090}h=Kj(g,d,0)}mj(e);Ii=c+32|0;return h|0}function mda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-32|0;Ii=d;f=q[a+8>>2]-q[a+12>>2]>>4;gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);a:{b:{if(uk(a,1)){b=kj(a,1,0);c=aw(e,b);if(c){break a}q[d+16>>2]=b;Qi(a,202264,d+16|0);break b}b=nl(a,1);c=Li;g=c;c=sea(e,b,c);if(c){break a}q[d>>2]=aj(b,g);Qi(a,202281,d)}c=0}b=yj(a,8);q[b+4>>2]=c;q[b>>2]=e;Zi(a,-1e4,202300);xj(a,-2);if((f+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,513,202335);G()}Ii=d+32|0;return 1}function kX(a,b,c,d,e){var f=0;f=Ii-48|0;Ii=f;q[f+44>>2]=d;q[f+32>>2]=0;q[f+24>>2]=1;q[f+28>>2]=0;q[f+16>>2]=0;q[f+8>>2]=1;q[f+12>>2]=0;e=d+e|0;d=hk(f+44|0,e,f+40|0,48);a:{if(d){d=d-20352|0;break a}d=-20454;if((e|0)!=(q[f+44>>2]+q[f+40>>2]|0)){break a}b:{d=Nu(f+44|0,e,f+24|0);if(!d){d=Nu(f+44|0,e,f+8|0);if(!d){break b}}d=d-20352|0;break a}d=N0(a,b,c,a+136|0,f+24|0,f+8|0);if(d){break a}d=(e|0)==q[f+44>>2]?0:-19456}ij(f+24|0);ij(f+8|0);Ii=f+48|0;return d}function GZ(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=q[a+16>>2];d=q[e+112>>2];b=q[d>>2];if(!b){return}while(1){f=r[b+5|0];a:{if(!(f&3|1?!(f&8):0)){d=b;break a}b:{g=b;c=q[b+8>>2];if(!(!c|r[c+6|0]&4)){if(eo(c,2,q[q[a+16>>2]+196>>2])){break b}f=r[b+5|0]}o[g+5|0]=f|8;d=b;break a}o[b+5|0]=r[b+5|0]|8;c=q[b+16>>2];q[d>>2]=q[b>>2];h=(c+h|0)+32|0;c=q[e+48>>2];c:{if(!c){q[b>>2]=b;break c}q[b>>2]=q[c>>2];q[q[e+48>>2]>>2]=b}q[e+48>>2]=b}b=q[d>>2];if(b){continue}break}}function pta(a,b,c,d,e){var f=0,g=0;a:{if((q[c+4>>2]&-268435456)==805306368){if(q[c+8>>2]){break a}g=OB(b,e+1|0);if(!r[a+12|0]){f=q[a+4>>2]+q[c+12>>2]|0;a=q[f>>2];if(o[b+48|0]&1){if(!q[f+4>>2]){a=a-q[b+32>>2]|0;q[f>>2]=a}a=q[b+32>>2]+a|0}d=Ti(g,d,e);o[d+e|0]=0;c=(q[f+4>>2]<<2)+a|0;a=o[b+48|0]&1?d-q[b+32>>2]|0:g;o[c|0]=a;o[c+1|0]=a>>>8;o[c+2|0]=a>>>16;o[c+3|0]=a>>>24;q[f+4>>2]=q[f+4>>2]+1}return}J(23735,23354,312,23861);G()}J(23654,23354,313,23861);G()}function OR(a){var b=0;a=Ui(a,0,2280);Vq(a+596|0);aq(a+684|0);q[a+604>>2]=1732584193;q[a+608>>2]=-271733879;q[a+596>>2]=0;q[a+600>>2]=0;q[a+612>>2]=-1732584194;q[a+616>>2]=271733878;q[a+692>>2]=1732584193;q[a+696>>2]=-271733879;q[a+684>>2]=0;q[a+688>>2]=0;q[a+708>>2]=-1009589776;q[a+700>>2]=-1732584194;q[a+704>>2]=271733878;b=a+776|0;ss(b);rs(b,0);b=a+888|0;_p(b);Zp(b,1);q[a+1104>>2]=1410;q[a+4>>2]=0;q[a>>2]=0;Ui(a+8|0,0,124);mX(a+132|0);q[a+456>>2]=3}function sW(a,b,c,d){var e=0,f=0;e=Ii-32|0;Ii=e;f=-4;a:{if(!d){break a}if(Jj(d,0)){break a}if((Jj(a,1)|0)<1){break a}if((Jj(b,1)|0)<1){break a}if(!Jj(c,0)){break a}q[e+24>>2]=0;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;f=Pl(e+16|0,a,1);b:{if(f){break b}f=Pl(e,b,1);if(f){break b}f=ws(d,e+16|0,e);if(f){break b}f=Wk(e+16|0,e+16|0,e);if(f){break b}f=ry(e+16|0,0,e+16|0,d);if(f){break b}f=Co(d,c,e+16|0)}ij(e+16|0);ij(e)}Ii=e+32|0;return f}function jL(a,b){var c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;e=nj(c+8|0,a,0,73366,1037);d=q[q[jk(a)+80>>2]+8>>2];q[c+4>>2]=0;q[c>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;Ml(a,1,d,73150,c+4|0,c+32|0,c);a:{if(o[q[c>>2]+141|0]&1){a=Kj(e,75569,0);break a}if(!q[c+4>>2]){a=Kj(e,75607,0);break a}d=Uj(a,2);a=q[c+4>>2];if(b){Wha(a,(d|0)!=0);a=0;break a}Vha(a,(d|0)!=0);a=0}mj(e);Ii=c- -64|0;return a} - - - -function NX(a,b,c,d,e,f,g,h){var i=0;i=Ii-16|0;Ii=i;a=zN(a,1,b,c,d,e,g,h,i);a:{if(a){break a}if(!(r[i|0]^r[f|0]|r[i+1|0]^r[f+1|0]|r[i+2|0]^r[f+2|0]|r[i+3|0]^r[f+3|0]|r[i+4|0]^r[f+4|0]|r[i+5|0]^r[f+5|0]|r[i+6|0]^r[f+6|0]|r[i+7|0]^r[f+7|0]|r[i+8|0]^r[f+8|0]|r[i+9|0]^r[f+9|0]|r[i+10|0]^r[f+10|0]|r[i+11|0]^r[f+11|0]|r[i+12|0]^r[f+12|0]|r[i+13|0]^r[f+13|0]|r[i+14|0]^r[f+14|0]|r[i+15|0]^r[f+15|0])){a=0;break a}Mi[q[65677]](h,0,b)|0;a=-86}Ii=i+16|0;return a}function I2(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0),g=0,h=0,i=0;b=Ii-80|0;Ii=b;q[b+76>>2]=0;i=kj(a,1,b+76|0);c=_i(a,2,q[210436],0);d=u[c>>2];e=u[c+4>>2];a:{if(!(d!=d|e!=e)){f=u[c+8>>2];if(f==f){break a}}f=u[c+8>>2];v[b+48>>3]=e;v[b+56>>3]=f;v[b+40>>3]=d;q[b+32>>2]=2;Qi(a,134131,b+32|0)}g=q[b+76>>2]+77|0;h=$i((g|0)>-1?g:-1);d=u[c>>2];e=u[c+4>>2];v[b+24>>3]=u[c+8>>2];v[b+16>>3]=e;q[b>>2]=i;v[b+8>>3]=d;sj(h,g,134794,b);Xi(a,h);Ni(h);Ii=b+80|0;return 1}function uja(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=-2;a:{if(!Qj(q[a+12>>2],q[a+16>>2],239120,c+12|0)){Ek(q[a+20>>2],q[q[c+12>>2]>>2]);Ek(q[a+20>>2],q[q[c+12>>2]+4>>2]);d=q[c+12>>2];e=q[d+12>>2];b:{if(!e){break b}b=0;while(1){if(b>>>0>=e>>>0){break a}Ek(q[a+20>>2],q[q[d+8>>2]+(b<<2)>>2]);d=q[c+12>>2];if(b>>>0>6){break b}b=b+1|0;e=q[d+12>>2];if(b>>>0>>0){continue}break}}q[q[a+24>>2]>>2]=d;b=0}Ii=c+16|0;return b|0}J(62316,62328,44,62353);G()}function az(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-32|0;Ii=d;f=ip(a,b,144941,144943);Zi(a,-10001,c);b=uj(a,-1,0);if(!b){q[d+16>>2]=c;Qi(a,144945,d+16|0)}bj(a,144975,0);while(1){a:{c=r[b|0];if((c|0)!=59){e=0;b:{if(!c){break b}g=a;h=b;c=gk(b,59);if(!c){c=hj(b)+b|0}bj(g,h,c-b|0);if(!c){break b}e=ip(a,uj(a,-1,0),144976,f);ll(a,-2);b=dl(e,144993);if(!b){break a}rk(b)}Ii=d+32|0;return e}b=b+1|0;continue}q[d>>2]=e;Lj(a,144978,d);ll(a,-2);fm(a,2);b=c;continue}}function VV(a){var b=0,c=0,d=0,e=0,f=0;if(a){b=q[a+184>>2];if(b){Mi[q[65677]](b,0,16749)|0;Ni(q[a+184>>2])}b=q[a+100>>2];if(b){Mi[q[65677]](b,0,16749)|0;Ni(q[a+100>>2])}b=q[a+80>>2];if(b){ms(b);Ni(q[a+80>>2])}if(q[a+68>>2]){ly(a);ms(q[a+84>>2]);ns(q[a+64>>2]);Ni(q[a+68>>2]);Ni(q[a+84>>2]);Ni(q[a+64>>2])}b=q[a+60>>2];if(b){ns(b);Ni(q[a+60>>2])}b=q[a+236>>2];if(b){d=b,e=0,f=hj(b),c=q[65677],Mi[c](d|0,e|0,f|0)|0;Ni(q[a+236>>2])}Mi[q[65677]](a,0,280)|0}}function hn(a,b){var c=0,d=0,e=0,f=0,g=0;f=Ii-16|0;Ii=f;d=q[a>>2];e=-1;a:{if((d|0)==255){break a}if(d){g=q[b>>2];while(1){e=-2;if(q[(w(c,112)+a|0)+8>>2]==(g|0)){break a}c=c+1|0;if((d|0)!=(c|0)){continue}break}}if(!(q[b+44>>2]|!q[b+52>>2])){q[f>>2]=q[b+4>>2];Pi(3,7319,7562,f);e=-7;break a}c=a+8|0;Ti(c+w(d,112)|0,b,106);d=Oi(q[b+4>>2]);b=q[a>>2];c=c+w(b,112)|0;q[c+8>>2]=d;q[c+12>>2]=Li;p[((b<<1)+a|0)+28568>>1]=b;q[a>>2]=b+1;e=0}c=e;Ii=f+16|0;return c}function HF(a,b,c){var d=0;d=Ii-208|0;Ii=d;q[d+76>>2]=128;a:{if((Xy(q[b>>2],d+80|0,d+76|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,mm(q[240513]));a=2;break a}b=ia(d+80|0,q[d+76>>2],d+16|0,46,d+10|0,6,3)|0;if(b){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,na(b|0)|0);a=2;break a}Xi(a,d+16|0);Xi(a,d+10|0);b:{c:{switch(c-2|0){case 0:bj(a,136928,4);break b;case 8:bj(a,136933,5);break b;default:break c}}bj(a,136960,13)}a=3}Ii=d+208|0;return a}function bga(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;a:{if(b>>>0<2097152){d=0;b:{if(a+1>>>0<2){break b}e=a&65535;c=q[75054];if(e>>>0>=t[c+32>>2]){break a}b=q[q[c+24>>2]+(e<<2)>>2];d=0;if(!b){break b}d=s[q[c+28>>2]+(e<<1)>>1]==(a>>>16|0)?b:0}b=d;a=s[b+24>>1];if(a){e=a>>>0>1?a:1;a=q[b+8>>2];c=0;while(1){f=a+f|0;a=a>>>2|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}a=s[b+18>>1];return w(a?a:1,f)+76|0}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function Xl(a,b,c,d){var e=0,f=0;a:{b:{c:{if((d|0)<10){e=c&65535;f=q[b+36>>2];b=q[b+32>>2];if(e>>>0>=(f-b|0)/592>>>0){break c}if(s[(b+w(e,592)|0)+568>>1]!=(c>>>16|0)){break b}b=b+w(e,592)|0;if(s[b+570>>1]!=(c&65535)){break a}b=b+(d<<4)|0;u[a>>2]=u[b>>2];u[a+4>>2]=u[b+4>>2];u[a+8>>2]=u[b+8>>2];u[a+12>>2]=u[b+12>>2];return}J(200448,199542,2865,200474);G()}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function PQ(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;if((e|0)>=1){while(1){k=r[d+i|0];h=r[c+i|0];g=r[b+i|0];o[a+3|0]=255;l=h-128|0;h=g<<20|524288;j=w(l,1858048)+h|0;g=j>>20;o[a+2|0]=g>>>0>255?(j|0)<0?0:255:g;k=k-128|0;j=h+w(k,1470208)|0;g=j>>20;o[a|0]=g>>>0>255?(j|0)<0?0:255:g;g=(h+w(k,-748800)|0)+(w(l,-360960)&-65536)|0;h=g>>20;o[a+1|0]=h>>>0>255?(g|0)<0?0:255:h;a=a+f|0;i=i+1|0;if((i|0)!=(e|0)){continue}break}}}function Mga(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=Ii-16|0;Ii=d;a:{b:{if(a|b){c:{if(Mi[q[75024]](a,b)&1){c=q[75049];e=q[75050];if((c|0)==(e|0)){if(o[300204]&1){break b}Wi((c-q[75048]>>3)- -64|0,8,300192,300200,300196);e=q[75050];c=q[75049]}if((c|0)==(e|0)){break a}q[75049]=c+8;q[c>>2]=a;q[c+4>>2]=b;break c}q[d+8>>2]=0;q[d>>2]=a;q[d+4>>2]=751;bB(d)}Ii=d+16|0;return}J(93224,88575,2929,93953);G()}J(90427,90502,493,90558);G()}J(90570,90502,533,90594);G()}function JM(a,b){var c=0,d=x(0),e=0,f=x(0),g=0,h=x(0);c=q[a>>2];a:{b:{if((c|0)==41){a=q[a+4>>2];c=q[a+4>>2];c:{a=q[a>>2];switch(a|0){case 0:break a;case 1:break c;default:break b}}return u[c>>2]}c=w(c,260)+266432|0;a=64}e=a-1|0;d=x(e|0);h=x(x(1)/d);b=b(g|0)?g:e)<<2)+c>>2]*b)+x(u[(a<<2)+c>>2]*x(x(1)-b)))}return d}function $z(a,b,c,d){var e=0,f=0,g=0,h=0;g=q[a+104>>2];f=q[a+100>>2];h=g-f|0;e=(h|0)/40|0;if((h|0)<1){return 0}a:{b:{if((f|0)!=(g|0)){g=(e|0)>1?e:1;e=0;while(1){f=q[w(e,40)+f>>2];if((b|0)==q[f+8>>2]&q[f+12>>2]==(c|0)){break b}e=e+1|0;if((g|0)==(e|0)){return 0}f=q[a+100>>2];if((q[a+104>>2]-f|0)/40>>>0>e>>>0){continue}break}}break a}b=q[a+104>>2];a=q[a+100>>2];if((b-a|0)/40>>>0>e>>>0){q[d>>2]=q[a+w(e,40)>>2];return 1}}J(114155,114013,479,114166);G()}function ly(a){var b=0,c=0,d=0;c=q[a+68>>2];if(c){b=c+596|0;if(b){Mi[q[65677]](b,0,88)|0}b=c+684|0;if(b){Mi[q[65677]](b,0,92)|0}b=c+776|0;if(b){Mi[q[65677]](b,0,108)|0}b=c+888|0;if(b){Mi[q[65677]](b,0,216)|0}qX(c+8|0);oX(c+132|0);Ni(q[c+440>>2]);b=q[c+444>>2];if(b){Mi[q[65677]](b,0,q[c+448>>2])|0;Ni(q[c+444>>2])}b=q[c+460>>2];if(b){while(1){d=q[b+8>>2];Ni(b);b=d;if(b){continue}break}}Ni(q[c+480>>2]);wD(q[c+496>>2]);BD(a);Mi[q[65677]](c,0,2280)|0}}function lna(a){a=a|0;var b=0,c=0,d=0,e=0;a=q[a+4>>2];b=q[a>>2];if((b|0)!=q[a+4>>2]){while(1){b=w(c,40)+b|0;cj(q[q[a+80>>2]>>2],q[b+20>>2]);nt(q[a+84>>2],q[b+16>>2]);c=c+1|0;b=q[a>>2];if(c>>>0<(q[a+4>>2]-b|0)/40>>>0){continue}break}}b=q[a+32>>2];d=q[a+36>>2];if((b|0)!=(d|0)){c=0;while(1){e=q[(c<<2)+b>>2];if(e){Hv(e);d=q[a+36>>2];b=q[a+32>>2]}c=c+1|0;if(c>>>0>2>>>0){continue}break}}gI(q[a+84>>2]);Mi[q[74944]](q[a+88>>2]);mla(a);Ni(a);return 0}function k0(a){var b=0,c=0,d=0,e=0,f=0,g=0;c=Ii-144|0;Ii=c;b=q[a+224>>2];a:{if(!b){b=-64;break a}b:{if((b|0)<1){b=-61;break b}while(1){d=w(e,20)+a|0;g=q[d+244>>2];q[c+12>>2]=0;b=Mi[q[d+228>>2]](q[d+232>>2],c+16|0,128,c+12|0)|0;if(b){break b}b=q[c+12>>2];if(b){b=j0(a,e&255,c+16|0,b);if(b){break a}q[d+236>>2]=q[d+236>>2]+q[c+12>>2]}f=(g|0)==1?1:f;e=e+1|0;if((e|0)>2]){continue}break}b=f?0:-61}Mi[q[65677]](c+16|0,0,128)|0}Ii=c+144|0;return b}function ik(a,b){var c=0,d=0;d=a;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}c=q[q[q[a+20>>2]+4>>2]>>2];c=r[c+7|0]<(-10002-b|0)?141056:(c+(0-b<<4)|0)-160024|0}a=q[a+8>>2]-16|0;Ls(d,c,a,a)}function fla(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=nj(b+56|0,a,1,73366,1011);q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;a:{if(!qm(a,b+24|0)){a=Kj(d,75508,0);break a}et(a,q[74444]);c=qj(a,-1);Ri(a,-2);e=q[q[q[jk(a)+80>>2]+8>>2]>>2];c=q[c+8>>2];if(t[q[e+4>>2]>>2]>c>>>0){c=q[((c<<2)+e|0)+12>>2]}else{c=0}if(!c){a=Kj(d,73654,0);break a}Vla(b,c);Al(a,b);a=1}mj(d);Ii=b+80|0;return a|0}function dF(a,b){var c=0;a:{if((b|0)>=1){b=(q[a+12>>2]+(b<<4)|0)-16|0;c=b>>>0>2]?b:141056;break a}c=q[a+8>>2]+(b<<4)|0;if((b|0)>=-9999){break a}b:{switch(b+10002|0){case 2:c=q[a+16>>2]+96|0;break a;case 1:b=q[q[q[q[a+20>>2]+4>>2]>>2]+12>>2];q[a+96>>2]=5;q[a+88>>2]=b;c=a+88|0;break a;case 0:c=a+72|0;break a;default:break b}}a=q[q[q[a+20>>2]+4>>2]>>2];c=r[a+7|0]<(-10002-b|0)?141056:(a+(0-b<<4)|0)-160024|0}a=q[c+8>>2];return(a|0)==7|(a|0)==2}function Fu(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((a|0)==(b|0)){return 0}d=rl(a,q[b+4>>2]);a:{if(d){break a}d=rl(b,q[a+4>>2]);if(d){break a}c=((0-c|c)&128)>>>7|0;f=c^1;d=q[a>>2];q[a>>2]=w(c,q[b>>2])+w(d,f);q[b>>2]=w(q[b>>2],f)+w(c,d);g=q[a+4>>2];if(!g){return 0}h=q[b+8>>2];i=q[a+8>>2];d=0;a=0;while(1){b=a<<2;e=b+i|0;j=e;b=b+h|0;e=q[e>>2];q[j>>2]=w(c,q[b>>2])+w(e,f);q[b>>2]=w(q[b>>2],f)+w(c,e);a=a+1|0;if((g|0)!=(a|0)){continue}break}}return d}function yja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;b=-2;a:{if(Qj(q[a+12>>2],q[a+16>>2],q[62810],c+12|0)){break a}b=q[c+12>>2];if(!r[q[b>>2]]){Aj(b);b=-13;break a}Ek(q[a+20>>2],q[b+12>>2]);Ek(q[a+20>>2],q[q[c+12>>2]+16>>2]);d=q[c+12>>2];if(q[d+52>>2]){f=q[d+48>>2];b=0;while(1){e=q[(w(b,48)+f|0)+32>>2];if(!(!e|!r[e|0])){Ek(q[a+20>>2],e);d=q[c+12>>2]}b=b+1|0;if(b>>>0>2]){continue}break}}q[q[a+24>>2]>>2]=d;b=0}Ii=c+16|0;return b|0}function t0(a,b,c,d,e,f,g,h){var i=0,j=0;i=Ii-48|0;Ii=i;q[i+16>>2]=0;q[i+8>>2]=1;q[i+12>>2]=0;q[i+28>>2]=0;q[i+20>>2]=1;q[i+24>>2]=0;q[i+40>>2]=0;q[i+32>>2]=1;q[i+36>>2]=0;j=WF(a,b,c,d,r[e+f|0]);a:{if(j){break a}j=Bk(b+24|0,1);if(j){break a}if(g){j=p0(a,b,g,h);if(j){break a}}while(1){if(!f){j=0;break a}j=fz(a,b,b);if(j){break a}f=f-1|0;j=WF(a,i+8|0,c,d,r[f+e|0]);if(j){break a}j=gz(a,b,b,i+8|0);if(!j){continue}break}}nm(i+8|0);Ii=i+48|0;return j}function Yta(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=q[a+28>>2];Gj(f);a:{c=q[a+12>>2];b=q[a+8>>2];d=c-b|0;if(!d){break a}if((b|0)!=(c|0)){h=d>>6;while(1){b=(e<<6)+b|0;b:{if(q[b+48>>2]!=2){break b}i=i+1|0;c=r[b+58|0];if(c&1){break b}d=b;g=q[b+44>>2];if((g|0)!=-1){qp(g);c=r[b+58|0]}o[d+58|0]=c|1}e=e+1|0;if((h|0)==(e|0)){break a}b=q[a+8>>2];if(q[a+12>>2]-b>>6>>>0>e>>>0){continue}break}}J(167814,167666,479,167825);G()}o[a+32|0]=r[a+32|0]&254;Bj(f)}function Aaa(a){var b=0;a:{if(o[852568]&1){break a}if(!fk(852568)){break a}q[213122]=0;q[213123]=0;q[213130]=0;q[213131]=0;q[213118]=0;q[213119]=0;q[213126]=0;q[213127]=0;q[213134]=0;q[213135]=0;q[213124]=0;q[213125]=0;q[213120]=0;q[213121]=0;q[213128]=0;q[213129]=0;q[213132]=0;q[213133]=0;q[213136]=0;q[213137]=0;q[213138]=0;q[213139]=0;q[213140]=0;q[213123]=-1;q[213131]=-1;o[852564]=r[852564]&254;b=Wj();o[852468]=0;q[213116]=b;ek(852568)}vO(a)}function xca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=x(0),j=x(0);b=Ii-80|0;Ii=b;g=nj(b+56|0,a,1,202233,3931);gj(a);h=_i(a,-1,q[213927],204267);Ri(a,-2);d=tj(a,1,0);c=Nn(a,2);a:{if(c){e=c+8|0;f=c+4|0;break a}c=Bl(a,2);e=c+8|0;f=c+4|0}i=u[c>>2];j=u[f>>2];u[b+40>>2]=u[e>>2];u[b+36>>2]=j;u[b+32>>2]=i;sba(b+16|0,h,s[d+570>>1]|s[d+568>>1]<<16,b+32|0);u[b>>2]=u[b+16>>2];c=q[b+24>>2];q[b+4>>2]=q[b+20>>2];q[b+8>>2]=c;Al(a,b);mj(g);Ii=b+80|0;return 1}function kl(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{c=q[a+4>>2];d=b>>>5|0;h=c>>>0>>0;if(!h){g=b&31;if(!g|(d|0)!=(c|0)){break a}}return Bk(a,0)}b:{if(!d){break b}e=c-d|0;if(e){f=q[a+8>>2];b=0;while(1){q[(b<<2)+f>>2]=q[(b+d<<2)+f>>2];b=b+1|0;if((e|0)!=(b|0)){continue}break}}if(h){break b}Ui(q[a+8>>2]+(e<<2)|0,0,d<<2)}if(!(!c|!g)){d=32-g|0;e=q[a+8>>2];b=0;while(1){c=c-1|0;f=e+(c<<2)|0;a=q[f>>2];q[f>>2]=a>>>g|b;b=a<>2];d=q[e>>2];f=b;c=q[a+224>>2];if(!c){c=q[e+4>>2]}q[f+4>>2]=q[c>>2];c=q[a+228>>2];if(!c){c=q[e+8>>2]}q[f>>2]=c;q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;kk(b+8|0,b+4|0,4);kk(b+8|0,b,4);kk(b+8|0,d+92|0,4);kk(b+8|0,d+32|0,16);kk(b+8|0,d+48|0,16);kk(b+8|0,d- -64|0,16);c=q[a+220>>2];if(c){At(c,b+8|0)}q[a+196>>2]=Rn(b+8|0);p[a+246>>1]=s[a+246>>1]&65527;Ii=b+32|0}function Lya(){q[213204]=0;q[213205]=0;q[213202]=0;q[213200]=172103;q[213199]=172090;q[213198]=0;q[213196]=0;q[213194]=0;q[213192]=0;q[213190]=0;q[213188]=0;q[213189]=0;q[213226]=852752;q[213224]=0;q[213222]=172127;q[213221]=172113;q[213220]=0;q[213218]=0;q[213216]=0;q[213214]=0;q[213212]=1;q[213210]=0;q[213211]=3;q[213206]=0;q[213207]=0;q[213208]=0;q[213209]=0;q[213231]=0;q[213229]=0;q[213230]=0;q[213227]=0;q[213228]=0;q[213234]=0;q[213233]=0}function uo(a,b,c,d,e){var f=0,g=0,h=0,i=0;fl(a,c<<6|b|d<<23|e<<14,q[q[a+12>>2]+8>>2]);f=q[a+32>>2];q[a+32>>2]=-1;g=fl(a,2147450902,q[q[a+12>>2]+8>>2]);if((f|0)!=-1){if((g|0)==-1){return f}i=q[q[a>>2]+12>>2];e=g;while(1){d=e;h=(e<<2)+i|0;c=q[h>>2];b=(c>>>14|0)-131071|0;e=(b|0)==-1?-1:(e+b|0)+1|0;if((e|0)!=-1){continue}break}b=h;e=(d^-1)+f|0;d=e>>31;if((d^d+e)>=131072){Sj(q[a+12>>2],141849);c=q[h>>2]}q[b>>2]=(c&16383|e<<14)+2147467264}return g}function q8(a,b){var c=0,d=0,e=0;d=q[a+2012>>2];c=d;e=q[c+8>>2]-q[c+12>>2]>>4;c=yj(c,28);q[c+16>>2]=0;q[c+20>>2]=0;q[c+24>>2]=-2;q[c+8>>2]=-2;q[c+12>>2]=-2;q[c>>2]=-2;q[c+4>>2]=-2;q[c+16>>2]=a;Zi(d,-1e4,118014);xj(d,-2);a=zk(d,-1e4);q[c+20>>2]=0;q[c+24>>2]=a;a:{if(FH(d,b,c)){if(q[d+8>>2]-q[d+12>>2]>>4==(e|0)){break a}J(115568,115465,3223,119369);G()}QH(c);c=0;if(q[d+8>>2]-q[d+12>>2]>>4==(e|0)){break a}J(115568,115465,3229,119369);G()}return c}function laa(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=q[a+48>>2];Gj(e);d=Oi(b);g=Li;b=q[a+20>>2];if(!b){Bj(e);return 2}h=2;b=q[q[a+16>>2]+(Cza(d,g,b)<<2)>>2];a:{if((b|0)==-1){break a}a=q[a+24>>2];while(1){f=a+w(b,136)|0;if(q[f>>2]!=(d|0)|q[f+4>>2]!=(g|0)){b=q[f+128>>2];if((b|0)!=-1){continue}break a}break}a=Ti(c,(a+w(b,136)|0)+8|0,112);b=Jk();c=Li;d=q[a+92>>2];o[a+104|0]=r[a+104|0]&253|((c|0)==(d|0)&t[a+88>>2]>b>>>0|c>>>0>>0)<<1;h=0}Bj(e);return h}function Xsa(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;a:{if(a){oa(q[a+24>>2],4118,b+12|0);if(q[b+12>>2]<=0){c=q[a+12>>2]}else{while(1){gb(q[a+24>>2],1,b+8|0);c=X()|0;if(c){q[b>>2]=W(c|0);Pi(4,213576,214018,b)}c=q[a+12>>2];if((c|0)==q[a+16>>2]){break a}d=q[b+8>>2];q[a+12>>2]=c+4;q[c>>2]=d;d=q[b+12>>2];q[b+12>>2]=d-1;if((d|0)>1){continue}break}c=c+4|0}Ii=b+16|0;return c-q[a+8>>2]>>2}J(213569,213519,193,213803);G()}J(214104,214021,533,214128);G()}function nO(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;h=-1;f=d&2147483647;i=f;g=c;a:{if(!c&(f|0)==2147418112?a|b:(f|0)==2147418112&(c|0)!=0|f>>>0>2147418112){break a}f=e&2147483647;j=f;if((f|0)==2147418112?0:f>>>0>2147418112){break a}if(!(a|g|(i|j|b))){return 0}g=d&e;if((g|0)>0?1:(g|0)>=0){if(!c&(d|0)==(e|0)?0:(d|0)<(e|0)){break a}return(a|c)!=0|(d^e|b)!=0}if(!c&(d|0)==(e|0)?a|b:(d|0)>(e|0)?1:(d|0)>=(e|0)?c:0){break a}h=(a|c)!=0|(d^e|b)!=0}return h}function X3(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=x(0),h=x(0),i=0;d=Ii-32|0;Ii=d;b=_i(a,1,q[210436],0);c=u[b>>2];f=u[b+4>>2];a:{if(!(c!=c|f!=f)){e=u[b+8>>2];if(e==e){break a}}e=u[b+8>>2];v[d+16>>3]=f;v[d+24>>3]=e;v[d+8>>3]=c;q[d>>2]=1;Qi(a,134131,d)}i=fj(a,2);f=u[b>>2];e=u[b+4>>2];c=u[b+8>>2];h=x(x(i)*x(.5));g=Nl(h);b=yj(a,16);u[b+12>>2]=g;g=c;c=Lk(h);u[b+8>>2]=g*c;u[b+4>>2]=e*c;u[b>>2]=f*c;Zi(a,-1e4,134032);xj(a,-2);Ii=d+32|0;return 1}function Pr(a,b,c,d,e){var f=0,g=0,h=0,i=0;i=3;a:{b:{if(a+1>>>0<2){break b}f=a&65535;g=q[210908];if(f>>>0>=t[g+8>>2]){break a}h=q[q[g>>2]+(f<<2)>>2];if(!h|s[q[g+4>>2]+(f<<1)>>1]!=(a>>>16|0)){break b}i=6;f=r[h+34|0];if(!f){break b}g=q[h+4>>2];a=0;while(1){h=g+(a<<4)|0;if((b|0)!=q[h>>2]|q[h+4>>2]!=(c|0)){a=a+1|0;if((f|0)!=(a|0)){continue}break b}break}a=g+(a<<4)|0;q[d>>2]=r[a+12|0];q[e>>2]=r[a+13|0];i=0}return i}J(154349,154364,144,154402);G()}function sta(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;q[d+12>>2]=b;q[d+8>>2]=c;b=JA(d+8|0,8);c=q[a+24>>2];if((c|0)==((q[a+16>>2]-q[a+8>>2]|0)/12|0)){DA(a,2048,c+1024|0)}a:{b:{c=q[a+4>>2];c:{if(!c){break c}c=q[q[a>>2]+((b>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break c}e=q[a+8>>2];while(1){f=w(c,12)+e|0;if((b|0)==q[f>>2]){break b}c=q[f+8>>2];if((c|0)!=-1){continue}break}}q[d+4>>2]=1;oJ(a,b,d+4|0);break a}a=w(c,12)+e|0;q[a+4>>2]=q[a+4>>2]+1}Ii=d+16|0}function gia(a){var b=0,c=0;a=q[a>>2];c=q[a+8>>2]-q[a+12>>2]>>4;Ak(a,72964,232544);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,72975);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,72998);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,73021);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,73044);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){J(72895,72626,421,73068);G()}}function Kha(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;a=Ii-48|0;Ii=a;q[a+36>>2]=0;q[a+40>>2]=0;o[a+43|0]=0;o[a+44|0]=0;o[a+45|0]=0;o[a+46|0]=0;q[a+20>>2]=1;q[a+24>>2]=1;q[a+28>>2]=0;q[a+32>>2]=0;q[a+12>>2]=2;q[a+16>>2]=2;q[a>>2]=f;p[a+40>>1]=c;p[a+42>>1]=d;f=a;if(e>>>0<=2){g=q[(e<<2)+171240>>2]}else{g=0}q[f+4>>2]=w(g,w(c,d));if(e>>>0>=3){J(43083,41161,2009,43089);G()}q[a+8>>2]=q[(e<<2)+44188>>2];Mi[q[75010]](b,0,a);Ii=a+48|0}function By(a,b,c,d){var e=0,f=0;f=Ii-16|0;Ii=f;e=hk(a,b,f+12|0,48);a:{if(e){break a}e=b;b=q[a>>2];if((e-b|0)<1){e=-96;break a}q[c>>2]=r[b|0];b=b+q[f+12>>2]|0;e=hk(a,b,c+4|0,6);if(e){break a}q[c+8>>2]=q[a>>2];c=q[a>>2]+q[c+4>>2]|0;q[a>>2]=c;if((b|0)==(c|0)){Mi[q[65677]](d,0,12)|0;e=0;break a}q[d>>2]=r[c|0];q[a>>2]=c+1;e=Wq(a,b,d+4|0);if(e){break a}q[d+8>>2]=q[a>>2];c=a;a=q[a>>2]+q[d+4>>2]|0;q[c>>2]=a;e=(a|0)==(b|0)?0:-102}Ii=f+16|0;return e}function tP(a,b){a:{if(a){if(b>>>0<=127){break a}b:{if(!q[q[71281]>>2]){if((b&-128)==57216){break a}break b}if(b>>>0<=2047){o[a+1|0]=b&63|128;o[a|0]=b>>>6|192;return 2}if(!((b&-8192)!=57344?b>>>0>=55296:0)){o[a+2|0]=b&63|128;o[a|0]=b>>>12|224;o[a+1|0]=b>>>6&63|128;return 3}if(b-65536>>>0<=1048575){o[a+3|0]=b&63|128;o[a|0]=b>>>18|240;o[a+2|0]=b>>>6&63|128;o[a+1|0]=b>>>12&63|128;return 4}}q[240513]=25;a=-1}else{a=1}return a}o[a|0]=b;return 1}function _U(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;e=2;c=Fl(a,137647);d=kj(a,2,0);g=kj(a,3,0);q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=1;q[b>>2]=0;q[b+4>>2]=0;q[b+4>>2]=q[c+8272>>2];f=c+8248|0;Yn(f);c=Ty(c,c+8272|0,d,g,f,b);Np(a,137623,1);a:{if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,c);break a}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;e=1}Ii=b+32|0;return e|0}function XY(a){var b=0,c=0;a=q[q[a+16>>2]+112>>2];Jo(a,q[a+32>>2]);GZ(a);q[a+116>>2]=0;while(1){b=q[a+40>>2];q[a+20>>2]=b;b=q[b>>2];q[a+8>>2]=b;q[a+12>>2]=b;q[a+52>>2]=0;if($u(a,1073,0)){continue}break}b=q[a+16>>2];Jo(a,q[a+32>>2]);tF(a);c=q[a+16>>2];Cj(a,q[c>>2],q[c+8>>2]<<2,0);c=Cj(a,q[b+52>>2],q[b+60>>2],0);q[b+60>>2]=0;q[b+52>>2]=c;Cj(a,q[a+40>>2],w(q[a+48>>2],24),0);Cj(a,q[a+32>>2],q[a+44>>2]<<4,0);Mi[q[b+12>>2]](q[b+16>>2],a,376,0)|0}function F2(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;e=1;b=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-120|0){case 0:d=+u[b>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;break a;case 1:d=+u[b+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;break a;case 2:d=+u[b+8>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;break a;default:break b}}q[c+4>>2]=134e3;q[c>>2]=134064;e=Qi(a,134763,c)}Ii=c+16|0;return e|0}function E2(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=0,h=x(0);d=Ii-32|0;Ii=d;b=Ck(a,1,q[210436]);a:{if(b){g=fj(a,2);break a}g=fj(a,1);b=_i(a,2,q[210436],0);c=u[b>>2];f=u[b+4>>2];if(!(c!=c|f!=f)){e=u[b+8>>2];if(e==e){break a}}e=u[b+8>>2];v[d+16>>3]=f;v[d+24>>3]=e;v[d+8>>3]=c;q[d>>2]=2;Qi(a,134131,d)}c=u[b+8>>2];f=u[b>>2];e=u[b+4>>2];b=yj(a,16);h=c;c=x(g);u[b+8>>2]=h*c;u[b+4>>2]=e*c;u[b>>2]=f*c;Zi(a,-1e4,134e3);xj(a,-2);Ii=d+32|0;return 1}function w5(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;g=q[a>>2];a:{if((g|0)<0){d=-69;break a}b:{if(d){break b}d=q[a+12>>2];f=d;h=q[a+8>>2];if(!(d|h)){d=0;break b}d=Bza(h,f,1e3)}q[e+8>>2]=0;q[e+12>>2]=0;q[e>>2]=0;q[e+4>>2]=0;CM(e,0,g);d=BM(e,d?d:-1);f=-26624;c:{if(!d){break c}f=q[240513]==27?-26880:-76;if((d|0)<=-1){break c}f=KW(a,b,c)}d=f;if(o[e+12|0]&1){break a}a=q[e>>2];if(!a){break a}Ni(a)}Ii=e+16|0;return d|0}function j3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;c=1;d=q[a+8>>2]-q[a+12>>2]>>4;e=kj(a,1,0);a:{f=yv(q[jq(a)+4>>2],e,b+12|0,b+8|0);if(f){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[b+4>>2]=f;q[b>>2]=e;Lj(a,130104,b);c=2;if((d+2|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(130137,129431,640,130162);G()}bj(a,q[b+12>>2],q[b+8>>2]);Ni(q[b+12>>2]);if((d+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(130179,129431,645,130162);G()}Ii=b+16|0;return c|0}function ZY(a,b,c){var d=0;d=Ii-1424|0;Ii=d;yF(d- -64|0);q[d+60>>2]=0;q[d+44>>2]=b+c;q[d+40>>2]=b;q[d+48>>2]=b;q[d+56>>2]=d- -64;if(!(c>>>0<2|(r[b+1|0]?r[b|0]:0))){Qi(a,138982,0)}q[d+52>>2]=sQ(c);ho(d+40|0,d+16|0);Qy(a,d+40|0,d+16|0);ho(d+40|0,d+16|0);if(q[d+16>>2]!=10){Im(q[d+52>>2]);b=q[d+16>>2];b=q[((b|0)==12?d+24|0:(b<<2)+255472|0)>>2];q[d>>2]=139028;q[d+4>>2]=b;q[d+8>>2]=q[d+20>>2]+1;Qi(a,139825,d)}Im(q[d+52>>2]);Ii=d+1424|0;return 1}function Q0(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=Ii-256|0;Ii=h;i=q[a+92>>2];g=g-3|0;a:{if(g>>>0<=5){j=q[(g<<2)+263e3>>2];break a}j=0}b:{if(!j){g=-20352;break b}q[h+8>>2]=0;q[h>>2]=1;q[h+4>>2]=0;Ui(h+152|0,0,100);i=i+7>>>3|0;g=Dn(d,h+16|0,i);c:{if(g){break c}g=VB(a,h,e,f);if(g){break c}g=Dn(h,i+(h+16|0)|0,i);if(g){break c}RW(h+152|0,j,h+16|0,i<<1);g=P0(a,b,c,d,e,f,h+152|0)}a=h+152|0;if(a){ym(a);Mi[q[65677]](a,0,100)|0}ij(h)}Ii=h+256|0;return g}function BK(a,b,c){var d=0,e=0;a:{switch(b|0){case 2:d=q[a+4>>2];b=a;e=q[a>>2]&-4097;c=c&1;a=c>>>20|0;q[b>>2]=e|c<<12;q[b+4>>2]=a|d;return;case 4:d=q[a+4>>2]&-536870913;q[a>>2]=q[a>>2];q[a+4>>2]=(c&1)<<29|d;return;case 5:p[a+8>>1]=s[a+8>>1]&65279|(c&1)<<8;return;case 6:p[a+8>>1]=s[a+8>>1]&61439|(c&1)<<12;return;default:J(88095,87638,752,88135);G();case 0:break a}}d=q[a+4>>2];b=a;e=q[a>>2]&-257;c=c&1;a=c>>>24|0;q[b>>2]=e|c<<8;q[b+4>>2]=a|d}function yx(a,b,c,d){var e=0,f=0,g=0;e=q[c+144>>2];g=q[b+144>>2];a:{b:{if(g>>>0>=t[a+144>>2]){f=0;if(e>>>0>=g>>>0){break a}sk(b,c);f=1;if(t[b+144>>2]>=t[a+144>>2]){break a}sk(a,b);break b}if(e>>>0>>0){sk(a,c);f=1;break a}sk(a,b);f=1;if(t[c+144>>2]>=t[b+144>>2]){break a}sk(b,c)}f=2}e=f;if(t[d+144>>2]>2]){sk(c,d);if(t[c+144>>2]>=t[b+144>>2]){return e+1|0}sk(b,c);if(t[b+144>>2]>=t[a+144>>2]){return e+2|0}sk(a,b);e=e+3|0}return e}function is(a,b){var c=0,d=0;d=-16512;c=a+8|0;a:{if(q[a+4>>2]!=(Wm(c)|0)|t[a+4>>2]>1024){break a}if((Jj(c,0)|0)<1){break a}if(!Xm(c,0)){break a}b:{if(b){b=a+44|0;if((Jj(b,0)|0)<1){break a}if(!Xm(b,0)){break a}b=a+56|0;if((Jj(b,0)|0)<1){break a}if(!Xm(b,0)){break a}if((Jj(a+20|0,0)|0)<1){break a}if((Jj(a+68|0,0)|0)<1){break a}if((Jj(a+80|0,0)|0)<1){break a}if((Jj(a+92|0,0)|0)<1){break a}break b}if((Jj(a+20|0,0)|0)<1){break a}}d=0}return d}function em(a,b){var c=0,d=0,e=0,f=0,g=0;d=Ii+ -64|0;Ii=d;c=-20736;a:{if(!a){break a}e=q[a>>2];if(!e){break a}f=q[a+8>>2];if(!f){break a}g=q[e+12>>2];c=Mi[q[e+24>>2]](q[a+4>>2],d)|0;if(c){break a}c=Mi[q[q[a>>2]+16>>2]](q[a+4>>2])|0;if(c){break a}c=q[a>>2];c=Mi[q[c+20>>2]](q[a+4>>2],f+g|0,q[c+12>>2])|0;if(c){break a}c=q[a>>2];c=Mi[q[c+20>>2]](q[a+4>>2],d,q[c+8>>2])|0;if(c){break a}c=Mi[q[q[a>>2]+24>>2]](q[a+4>>2],b)|0}Ii=d- -64|0;return c}function b2(a){var b=0,c=0;c=Ii-48|0;Ii=c;a:{b:{switch(q[a>>2]-1|0){case 0:b=c;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;GF(2,nv(a),b,16);a=Pk(b);break a;case 1:b=c;p[b+38>>1]=0;p[b+40>>1]=0;p[b+42>>1]=0;p[b+44>>1]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;GF(10,Zs(a),b,46);a=Pk(b);break a;default:break b}}Pi(4,173567,174e3,0);a=0}Ii=c+48|0;return a}function NR(a){var b=0,c=0,d=0;c=-1;b=q[a+68>>2];a:{if(!b){break a}b:{switch(q[a+4>>2]-10|0){case 0:case 2:if(!r[b+528|0]){break a}q[a+128>>2]=20;q[a+132>>2]=1;o[q[a+120>>2]]=1;q[a+144>>2]=0;q[a+136>>2]=0;o[b+528|0]=0;return 0;default:break b}}if((r[b+532|0]&5)!=5){break a}c=-27648;b=q[b+536>>2];d=r[b+2|0]<<8|r[b+1|0]<<16|r[b+3|0];if(d>>>0>16372){break a}c=d+12|0;q[a+168>>2]=c;q[a+128>>2]=22;q[a+132>>2]=c;Ti(q[a+120>>2],b,c);c=0}return c}function AC(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=Ii+ -64|0;Ii=e;c=q[a+328>>2]-3|0;a:{if(c>>>0<=5){c=q[(c<<2)+263e3>>2];break a}c=0}g=(c?q[c+8>>2]:0)&255;f=-1;if(c){c=Mi[q[c+28>>2]](q[a+24>>2],q[a+20>>2],e)|0}else{c=-20736}b:{if(c){break b}h=q[a+332>>2];c=0;b=b+204|0;d=b;c:{if(!d){break c}d=q[d>>2];if(!d){break c}c=Mi[q[d+12>>2]](h)|0}if(!c){break b}f=BW(q[a+332>>2],q[a+336>>2],b,q[a+328>>2],e,g,q[a+324>>2],q[a+320>>2])}Ii=e- -64|0;return f}function $qa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[57198],c+12|0)){b=q[c+12>>2];d=q[b+8>>2];if(d){e=q[b+4>>2];b=0;while(1){f=q[(e+w(b,80)|0)+4>>2];if(f){Ek(q[a+20>>2],f)}b=b+1|0;if((d|0)!=(b|0)){continue}break}b=q[c+12>>2]}d=q[b+36>>2];if(d){e=q[b+32>>2];b=0;while(1){Ek(q[a+20>>2],q[e+(b<<2)>>2]);b=b+1|0;if((d|0)!=(b|0)){continue}break}b=q[c+12>>2]}q[q[a+24>>2]>>2]=b;b=0}Ii=c+16|0;return b|0}function pC(a,b){var c=0,d=0;a:{d=b&255;if(d){if(a&3){while(1){c=r[a|0];if(!c|(c|0)==(b&255)){break a}a=a+1|0;if(a&3){continue}break}}c=q[a>>2];b:{if((c^-1)&c-16843009&-2139062144){break b}d=w(d,16843009);while(1){c=c^d;if((c^-1)&c-16843009&-2139062144){break b}c=q[a+4>>2];a=a+4|0;if(!(c-16843009&(c^-1)&-2139062144)){continue}break}}while(1){c=a;d=r[c|0];if(d){a=c+1|0;if((d|0)!=(b&255)){continue}}break}return c}return hj(a)+a|0}return a}function m6(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;d=-2;g=q[a+2200>>2];a:{if(!g){break a}g=q[q[a+2196>>2]+(Cza(b,c,g)<<2)>>2];if((g|0)==-1){break a}i=q[a+2204>>2];while(1){h=i+w(g,24)|0;if((b|0)!=q[h>>2]|q[h+4>>2]!=(c|0)){g=q[h+16>>2];if((g|0)!=-1){continue}break a}break}d=-4;c=q[(i+w(g,24)|0)+12>>2];b=q[c+4>>2];if((b<<8&16711680|b<<24|(b>>>8&65280|b>>>24))>>>0>f>>>0){break a}hH(q[a+2192>>2],c,e);d=0}return d|0}function R_(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;b=1;a:{if((Vi(a,1)|0)<=0){rj(a,-10001,1);if(q[Lm(a,145545)>>2]){break a}Qi(a,145617,0);break a}b=kj(a,1,0);c=yj(a,4);q[c>>2]=0;Zi(a,-1e4,145545);xj(a,-2);e=c;c=dl(b,145877);q[e>>2]=c;if(!c){q[d+4>>2]=ql(q[240513]);q[d>>2]=b;Lj(a,145654,d);dk(a,1,uj(a,-1,0))}c=1;b=q[a+8>>2]-q[a+12>>2]>>4}ej(a,b);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=c;q[a+8>>2]=q[a+8>>2]+16;qk(a,1135,2);Ii=d+16|0;return 1}function KV(a){var b=0,c=0;b=_n(a);a:{if(b){break a}if(q[a+128>>2]!=20){Xj(a,2,10);return-30464}q[a+72>>2]=q[a+84>>2];q[a+52>>2]=q[a+64>>2];b:{if(r[q[a>>2]+184|0]&2){q[a+152>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;q[a+164>>2]=0;c=s[a+140>>1]+1|0;p[a+140>>1]=c;b=-27520;if((c&65535)==(c|0)){break b}break a}b=q[a+104>>2];o[b|0]=0;o[b+1|0]=0;o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+6|0]=0;o[b+7|0]=0}Ix(a);q[a+4>>2]=q[a+4>>2]+1;b=0}return b}function Cta(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=q[a+8>>2];i=q[a+4>>2];if(c>>>0<=i>>>0){a:{while(1){d=c>>>0>=i>>>0;e=!f&(h|0)==10;if(d|!f&(h|0)==10){break a}e=c+1|0;q[a+8>>2]=e;j=r[c|0];d=j&127;g=Aza(h,f,7,0);c=g&31;if((g&63)>>>0>=32){g=d<>>32-c;c=d<>>0<1?f+1|0:f;h=c;c=e;if(j&128){continue}break}d=0;e=0}a=e|d;if(!a){o[b|0]=(k|0)!=0}return a^1}J(23111,23130,70,23198);G()}function $u(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=Ii-176|0;Ii=e;d=Yi(40);q[d>>2]=0;q[e+168>>2]=0;q[e+8>>2]=q[a+112>>2];q[a+112>>2]=e+8;h=Vx(e+8|4,1,d,4);i=M()|0;d=0;a:{while(1){if(!d){q[240588]=0;qa(b|0,a|0,c|0);d=q[240588];q[240588]=0;f=-1;b:{if(!d){break b}g=q[240589];if(!g){break b}f=pk(q[d>>2],h,i);if(!f){break a}L(g|0)}d=M()|0;if((f|0)==1){continue}}break}q[a+112>>2]=q[e+8>>2];a=q[e+168>>2];Ni(h);Ii=e+176|0;return a}O(d|0,g|0);G()}function jfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;Q(34963,a|0);a:{b:{c:{if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}cb(34963,b|0,c|0,d|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Q(34963,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}Ii=e+16|0;return}lj(a,91771,1620);J(88669,88575,1620,91771);G()}lj(a,91771,1622);J(88669,88575,1622,91771);G()}lj(a,91771,1624);J(88669,88575,1624,91771);G()}function _E(a){var b=0;b=q[a+152>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+156>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+160>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+164>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+168>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+172>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+176>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+180>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}b=q[a+184>>2];if(!(!b|!(r[b+5|0]&3))){Ok(a,b)}}function Vea(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;Q(34962,a|0);a:{b:{c:{if(r[q[75054]+156|0]&64){a=K()|0;if(a){break c}}cb(34962,b|0,c|0,d|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break b}}Q(34962,0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}Ii=e+16|0;return}lj(a,91672,1571);J(88669,88575,1571,91672);G()}lj(a,91672,1573);J(88669,88575,1573,91672);G()}lj(a,91672,1575);J(88669,88575,1575,91672);G()}function Kya(){q[59807]=q[71906];q[71906]=239200;q[59833]=q[71906];q[71906]=239304;q[59891]=q[71906];q[71906]=239536;q[59917]=q[71906];q[71906]=239640;q[59933]=q[71906];q[71906]=239704;q[59955]=q[71906];q[71906]=239792;q[59997]=q[71906];q[71906]=239960;q[74766]=1;q[74764]=-166866304;q[74765]=916817987;q[74763]=84470;q[74762]=1;q[74769]=0;o[299072]=0;q[74767]=q[74761];q[74769]=q[71906];q[71906]=299048;q[60019]=q[71906];q[71906]=240048}function Eea(a){var b=0,c=0;c=q[q[a+24>>2]>>2];b=q[a>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+4>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+8>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+12>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+16>>2];if((b|0)!=-2){Rj(c,-1e4,b)}b=q[a+20>>2];if((b|0)!=-2){Rj(c,-1e4,b)}Rj(c,-1e4,q[a+32>>2]);Ni(q[a+28>>2]);q[a+32>>2]=-2;q[a+16>>2]=-2;q[a+20>>2]=-2;q[a+8>>2]=-2;q[a+12>>2]=-2;q[a>>2]=-2;q[a+4>>2]=-2;q[a+24>>2]=0;q[a+28>>2]=0}function Bt(a,b,c,d){var e=0,f=0,g=0;e=q[a+4>>2];f=q[a>>2];g=e-f|0;if((g|0)<1){return 0}a:{b:{if((e|0)!=(f|0)){e=f-e|0;e=((e|0)>(g|0)?e:g)>>>2|0;g=e>>>0>1?e:1;e=0;while(1){f=q[(e<<2)+f>>2];if((b|0)==q[f+8>>2]&q[f+12>>2]==(c|0)){break b}e=e+1|0;if((g|0)==(e|0)){return 0}f=q[a>>2];if(q[a+4>>2]-f>>2>>>0>e>>>0){continue}break}}break a}b=q[a+4>>2];a=q[a>>2];if(b-a>>2>>>0>e>>>0){q[d>>2]=q[a+(e<<2)>>2];return 1}}J(48162,47954,479,48173);G()}function c9(a,b){var c=0,d=0;a:{b:{c:{c=b&65535;d=q[a+4>>2];a=q[a>>2];if(c>>>0>2>>>0){c=q[a+(c<<2)>>2];if(s[c+80>>1]!=(b>>>16|0)){break c}d=q[c+4>>2];b=q[c>>2];a=d-b|0;if(!a){break b}a=(a|0)/304|0;if((b|0)!=(d|0)){d=a>>>0>1?a:1;a=0;while(1){mA(w(a,304)+b|0);a=a+1|0;if((d|0)==(a|0)){break b}b=q[c>>2];if((q[c+4>>2]-b|0)/304>>>0>a>>>0){continue}break}}break a}break a}Pi(4,150692,151414,0);G()}return}J(151947,151192,479,151403);G()}function bQ(a){var b=0,c=0,d=0;b=Ii-128|0;Ii=b;c=r[214207]|r[214208]<<8|(r[214209]<<16|r[214210]<<24);o[b+111|0]=c;o[b+112|0]=c>>>8;o[b+113|0]=c>>>16;o[b+114|0]=c>>>24;c=q[53551];q[b+104>>2]=q[53550];q[b+108>>2]=c;c=q[53549];q[b+96>>2]=q[53548];q[b+100>>2]=c;c=b+96|12;a:{b:{while(1){jO(c);Ui(b+8|0,0,88);if((Ai(b+96|0,b+8|0)|0)==-44){break b}d=d+1|0;if((d|0)!=100){continue}break}a=0;break a}a=ou(a?a:959888,b+96|0)}Ii=b+128|0;return a}function Hq(a,b,c){var d=0,e=0,f=0;d=q[c+4>>2];e=q[b+4>>2];e=(d|0)==(e|0)&t[c>>2]>2]|e>>>0>d>>>0;d=q[b+4>>2];f=q[a+4>>2];a:{b:{if((d|0)==(f|0)&t[b>>2]>=t[a>>2]|d>>>0>f>>>0){d=0;if(!e){break a}Zl(b,c);c=q[b+4>>2];e=q[a+4>>2];d=1;if((c|0)==(e|0)&t[b>>2]>=t[a>>2]|c>>>0>e>>>0){break a}Zl(a,b);break b}if(e){Zl(a,c);return 1}Zl(a,b);a=q[c+4>>2];e=q[b+4>>2];d=1;if((a|0)==(e|0)&t[c>>2]>=t[b>>2]|a>>>0>e>>>0){break a}Zl(b,c)}d=2}return d}function GG(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;i=q[a+8>>2]-q[a+12>>2]>>4;e=jq(a);d=q[e+76>>2];a:{if(!d){break a}g=e+72|0;d=q[q[g>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}h=q[e+80>>2];while(1){f=(d<<4)+h|0;if((b|0)!=q[f>>2]|q[f+4>>2]!=(c|0)){d=q[f+12>>2];if((d|0)!=-1){continue}break a}break}rj(a,-1e4,q[e+124>>2]);Ho(a,-1,q[((d<<4)+h|0)+8>>2]);Ri(a,-2);saa(g,b,c)}if(q[a+8>>2]-q[a+12>>2]>>4!=(i|0)){J(125331,125299,202,125352);G()}}function Bp(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;h=Ii-32|0;Ii=h;q[h+24>>2]=0;q[h+28>>2]=0;q[h+20>>2]=0;i=-1;q[h+16>>2]=-1;p[h+14>>1]=0;a:{if(!LH(a,b,c,h+24|0,h+20|0,h+16|0,h+14|0)){break a}if((y8(a,q[h+24>>2],q[h+28>>2])|0)<0){break a}a=q[d>>2];j=q[h+24>>2];k=q[h+28>>2];if((b|0)==(j|0)&(k|0)==(c|0)){i=-4;if(!(1<>>0>7){break a}i=0;Mi[f|0](g,b,c,e,0,d);break a}i=-4;if(a){break a}Mi[f|0](g,j,k,e,h+16|0,d);i=0}Ii=h+32|0;return i}function gua(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;a:{b:{c:{if((c|0)==200){if(!(d|e)){q[b+4>>2]=q[b>>2];return}a=b+4|0;c=b+8|0;f=q[b+8>>2];if(f-q[b+4>>2]>>>0>>0){if(o[b+12|0]&1){break c}Wi(((e>>>0>4096?e:4096)+f|0)-q[b>>2]|0,1,b,c,a)}if(!d){break b}b=q[a>>2];if(q[c>>2]-b>>>0>>0){break a}Ti(b,d,e);q[a>>2]=q[a>>2]+e}return}J(154810,154885,493,154911);G()}J(154722,154735,421,154762);G()}J(155188,154885,540,155217);G()}function dI(a,b){var c=0,d=0,e=0;c=1;a:{b:{if(!b){break b}d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>=e-a>>2>>>0){break a}a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return 1}d=q[a>>2];b=q[a+4>>2]-d|0;if(!b){break b}c=0;if(q[d+280>>2]){break b}a=1;c=(b|0)/304|0;e=c>>>0>1?c:1;while(1){b=a;if((e|0)!=(b|0)){a=b+1|0;if(!q[(w(b,304)+d|0)+280>>2]){continue}}break}c=b>>>0>=c>>>0}return c}J(151947,151192,479,151403);G()}function _M(a){var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=dl(a,208359);a:{if(!c){a=0;break a}q[b+24>>2]=0;q[b+28>>2]=0;b:{if((zl(b+24|0,1,8,c)|0)==8){a=0;Ui(906092,0,50376);d=q[b+24>>2];e=q[b+28>>2];if(!((d|0)!=2|(e|0)!=50376)){a=1;if((zl(906092,1,50376,c)|0)==50376){break b}a=0;Pi(4,208362,208388,0);break b}q[b+8>>2]=2;q[b+12>>2]=50376;q[b+4>>2]=e;q[b>>2]=d;Pi(3,208362,208413,b);break b}a=0;Pi(4,208362,208499,0)}rk(c)}Ii=b+32|0;return a}function Zu(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;a:{b:{c:{d=c-1|0;if(d>>>0>2]){d=q[b+12>>2]+(d<<4)|0;break c}f=+(c|0);if(c){h=q[b+16>>2];Oza(+f);g=Lza(1)|0;d=Lza(0)|0;g=d+g|0;d=((g>>>0)%((-1<>>0)<<5)+h|0}else{d=q[b+16>>2]}while(1){if(v[d+16>>3]==f?q[d+24>>2]==3:0){break c}d=q[d+28>>2];if(d){continue}break}break b}if((d|0)!=141056){break a}f=+(c|0)}q[e+8>>2]=3;v[e>>3]=f;d=Wp(a,b,e)}Ii=e+16|0;return d}function JH(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{g=q[a+4>>2];b:{if(!g){break b}g=q[q[a>>2]+(Cza(b,c,g)<<2)>>2];if((g|0)==-1){break b}i=q[a+8>>2];while(1){h=w(g,40)+i|0;if((b|0)!=q[h>>2]|q[h+4>>2]!=(c|0)){g=q[h+32>>2];if((g|0)!=-1){continue}break b}break}b=q[a+32>>2];h=q[a+36>>2]-b>>4;a=w(g,40)+i|0;c=q[a+16>>2];if(h>>>0<=c>>>0){break a}q[d>>2]=b+(c<<4);q[e>>2]=q[a+20>>2];q[f>>2]=q[a+24>>2];j=1}return j}J(111387,111323,479,111398);G()}function Fy(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if(r[q[a+16>>2]+21|0]!=2){a:{if(b+1>>>0<=1073741823){f=Cj(a,0,0,b<<2);break a}f=mk(a)}d=q[a+16>>2];if((b|0)>=1){Ui(f,0,b<<2)}e=q[d+8>>2];if((e|0)>=1){i=b-1|0;while(1){c=q[q[d>>2]+(g<<2)>>2];if(c){while(1){e=q[c>>2];h=((q[c+8>>2]&i)<<2)+f|0;q[c>>2]=q[h>>2];q[h>>2]=c;c=e;if(c){continue}break}e=q[d+8>>2]}g=g+1|0;if((g|0)<(e|0)){continue}break}}Cj(a,q[d>>2],e<<2,0);q[d>>2]=f;q[d+8>>2]=b}}function f2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;c=b+24|0;q[c>>2]=0;q[c+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;d=1;e=b+16|4;Wi(32768,1,b+16|0,c,e);a:{f=aG(kj(a,1,0),al(a,1),b+16|0,966);b:{if(!f){c=a;a=q[b+16>>2];bj(c,a,q[b+20>>2]-a|0);break b}if(o[b+28|0]&1){break a}d=0;Wi(0,1,b+16|0,c,e);q[b>>2]=f;Qi(a,136228,b)}c:{if(o[b+28|0]&1){break c}a=q[b+16>>2];if(!a){break c}Ni(a)}Ii=b+32|0;return d|0}J(136463,136381,493,136538);G()}function Ty(a,b,c,d,e,f){var g=0,h=0;g=Ii-16|0;Ii=g;q[g+12>>2]=0;d=gs(ja(c|0,d|0,f|0,g+12|0)|0);c=q[g+12>>2];a:{b:{c:{if(!d){if(c){break c}d=0;break b}if(!c){break a}Ni(c);break a}while(1){Yn(e);if(q[b>>2]!=q[c+4>>2]){hs(a);d=mm(Nx(a,q[c+4>>2],q[c+8>>2],q[c+12>>2]));if(d){Ni(q[g+12>>2]);break a}q[b>>2]=q[c+4>>2];su(a)}d=mm(Ox(a,q[c+20>>2],q[c+16>>2],e));if(d){c=q[c+28>>2];if(c){continue}}break}h=q[g+12>>2]}Ni(h)}Ii=g+16|0;return d}function Pia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;f=q[a+32>>2];e=q[f+8>>2];c=q[e+4>>2];b=q[a+20>>2];g=q[a+24>>2];a:{if(g>>>0<3){break a}c=r[b|0]!=79|r[b+1|0]!=103?c:r[b+2|0]==103?1:c;if(r[b+8|0]!=87|g>>>0<11|r[b+9|0]!=65){break a}c=r[b+10|0]==86?0:c}h=-11;if(!nG(b,g,c,d+12|0,q[f>>2],q[f+4>>2])){kz(q[e>>2]);q[e>>2]=q[d+12>>2];q[q[a+32>>2]+8>>2]=e;q[q[a+32>>2]+16>>2]=q[q[d+12>>2]+12>>2]+32;h=0}Ii=d+16|0;return h|0}function Mta(a,b){var c=0;a:{if(!r[906092]|(a|0)!=1){break a}b:{switch(b|0){case 0:o[906123]=0;return 906092;case 1:o[906251]=0;return 906124;case 2:o[906283]=0;return 906252;case 3:o[906315]=0;return 906284;case 4:o[906347]=0;return 906316;case 5:o[906379]=0;return 906348;case 6:o[906387]=0;return 906380;case 7:o[906403]=0;return 906388;case 8:o[906411]=0;return 906404;case 9:break b;default:break a}}o[906539]=0;c=906412}return c}function ora(a,b){var c=0,d=0;c=yj(a,68);d=c+48|0;q[d>>2]=0;q[d+4>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+28>>2]=-2;q[c+20>>2]=-2;q[c+24>>2]=-2;q[c+12>>2]=-2;q[c+16>>2]=-2;q[c+4>>2]=-2;q[c+8>>2]=-2;q[c>>2]=a;q[c- -64>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+48>>2]=-2;ej(a,-1);d=zk(a,-1e4);q[c+40>>2]=c;q[c+48>>2]=d;q[c+44>>2]=b;q[c+32>>2]=57;Zi(a,-1e4,17096);xj(a,-2);if(!hM(a,b,c)){FB(c);return 0}Ri(a,-2);return c}function Qo(a,b){var c=0,d=0,e=0,f=0;while(1){c=q[213233];q[213233]=c?c:1;if(c){continue}break}a:{c=q[213232];d=q[c+4>>2];b:{if(!d){break b}d=q[q[c>>2]+(Cza(a,b,d)<<2)>>2];if((d|0)==-1){break b}f=q[c+8>>2];while(1){e=(d<<6)+f|0;if((a|0)==q[e>>2]&(b|0)==q[e+4>>2]){break a}d=q[e+56>>2];if((d|0)!=-1){continue}break}}q[213233]=0;return}a=(d<<6)+f|0;vaa(c,q[a+16>>2],q[a+20>>2]);b=q[a+8>>2]-1|0;q[a+8>>2]=b;q[213233]=0;if(!b){ot(a+8|0)}}function HX(a,b,c,d,e,f,g,h,i,j,k){var l=0,m=0;a:{b:{c:{m=q[a>>2];switch(q[m+4>>2]-6|0){case 2:break b;case 0:break c;default:break a}}q[i>>2]=g;a=YW(q[a+60>>2],g,b,c,d,e,j,k,f,h);return(a|0)==-18?-25344:a}q[i>>2]=g;a=SX(q[a+60>>2],g,b,c,d,e,f,h,j,k);return(a|0)==-15?-25344:a}l=-24704;d:{if(q[m>>2]!=73){break d}l=-24832;if((k|0)!=16|q[m+16>>2]!=(c|0)){break d}q[i>>2]=g;a=NX(q[a+60>>2],g,b,d,e,j,f,h);l=(a|0)==-86?-25344:a}return l}function Ema(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=q[q[a+24>>2]>>2];e=q[a+16>>2];f=q[a+20>>2];if((e|0)==q[73540]&(f|0)==q[73541]){d=q[q[q[a+8>>2]+80>>2]>>2];a=q[c+148>>2];if(!a){a=q[q[c+156>>2]+24>>2]}return cm(d,a,b)|0}if((e|0)==q[73562]&(f|0)==q[73563]){d=q[q[q[a+8>>2]+80>>2]>>2];a=q[c+152>>2];if(!a){a=q[q[c+156>>2]>>2]}return cm(d,a,b)|0}d=q[c+148>>2];if(!d){d=q[q[c+156>>2]+24>>2]}return Ct(q[d>>2],e,f,q[a+32>>2],b,1,247,c)|0}function e6(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=Ii-1040|0;Ii=d;c=q[a>>2];if(c){No(c)}qH(a+44|0,d+16|0);if(bm(d+16|0)){Mn(d+16|0)}q[a>>2]=0;if(b){c=$i(44);q[c>>2]=0;q[c+4>>2]=0;q[c+40>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;e=c+8|0;q[e>>2]=0;q[e+4>>2]=0;Jw(q[b+4>>2],q[57936],c+4|0);Jw(q[b+8>>2],q[57902],e);q[a>>2]=c;M6(d+16|0,c);q[d>>2]=d+16;Pi(2,32178,32700,d)}Lz(a);Ii=d+1040|0;return 0}function PB(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=q[a+8>>2];i=q[a+4>>2];if(c>>>0<=i>>>0){a:{while(1){d=c>>>0>=i>>>0;e=!f&(h|0)==10;if(d|!f&(h|0)==10){break a}e=c+1|0;q[a+8>>2]=e;j=r[c|0];d=j&127;g=Aza(h,f,7,0);c=g&31;if((g&63)>>>0>=32){g=d<>>32-c;c=d<>>0<1?f+1|0:f;h=c;c=e;if(j&128){continue}break}d=0;e=0}a=e|d;if(!a){q[b>>2]=k}return a^1}J(23111,23130,70,23198);G()}function gla(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-80|0;Ii=b;c=nj(b+24|0,a,0,73366,713);e=$j(a,2);f=Li;g=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;d=b- -64|0;q[d>>2]=0;q[d+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,g,73150,b+20|0,b+48|0,b+16|0);a=ima(q[b+16>>2],q[b+20>>2],e,f);if(a){q[b+4>>2]=a;q[b>>2]=q[(a<<2)+232752>>2];h=Kj(c,75113,b)}mj(c);Ii=b+80|0;return h|0}function cP(a,b,c,d){var e=0,f=0;e=Ii-32|0;Ii=e;f=-9058;a:{if((a|0)!=48){break a}q[e+28>>2]=c;f=-9056;if((b|0)<1){break a}q[e+16>>2]=r[c|0];a=b+c|0;b=hk(e+28|0,a,e+16|4,6);if(b){f=b-8960|0;break a}b=q[e+28>>2];q[e+24>>2]=b;q[e+28>>2]=b+q[e+20>>2];b=pE(e+16|0,d);if(b){f=b-8960|0;break a}f=0;if((a|0)==q[e+28>>2]){break a}b=hk(e+28|0,a,e+12|0,5);f=b-8960|0;if(b|q[e+12>>2]){break a}f=(a|0)==q[e+28>>2]?0:-9062}a=f;Ii=e+32|0;return a}function aba(a,b,c){var d=0,e=0,f=0,g=0;q[a+24>>2]=c;q[a+20>>2]=b;a:{f=q[a+44>>2];e=q[a+40>>2];d=f-e|0;if(!d){break a}if((e|0)!=(f|0)){f=e-f|0;f=((d|0)<(f|0)?f:d)>>>2|0;d=(d|0)>-1?d:-1;d=w(f,(d|0)<1?d:1);f=d>>>0>1?d:1;d=0;while(1){e=q[(d<<2)+e>>2];o[e+390|0]=r[e+390|0]|1;g=q[e+436>>2];if(g){Mi[g|0](e,b,c)}d=d+1|0;if((f|0)==(d|0)){break a}e=q[a+40>>2];if(q[a+44>>2]-e>>2>>>0>d>>>0){continue}break}}J(201665,201514,479,201676);G()}}function Zxa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-16|0;Ii=d;f=(Pza(b),Lza(2));c=f&2147483647;a:{if(c-8388608>>>0<=2130706431){e=c;c=c>>>7|0;g=e<<25;c=c+1065353216|0;break a}if(c>>>0>=2139095040){c=f;e=c>>>7|0;g=c<<25;c=e|2147418112;break a}if(!c){c=0;break a}e=c;c=z(c);vm(d,e,0,0,0,c+81|0);h=q[d>>2];i=q[d+4>>2];g=q[d+8>>2];c=q[d+12>>2]^65536|16265-c<<16}q[a>>2]=h;q[a+4>>2]=i;q[a+8>>2]=g;q[a+12>>2]=f&-2147483648|c;Ii=d+16|0}function Gu(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=rl(a,q[b+4>>2]);a:{if(g){break a}d=((0-c|c)&128)>>>7|0;e=d^1;q[a>>2]=w(q[b>>2],d)+w(q[a>>2],e);c=q[b+4>>2];if(c){b=q[b+8>>2];j=q[a+8>>2];while(1){h=f<<2;i=h+j|0;q[i>>2]=w(q[b+h>>2],d)+w(q[i>>2],e);f=f+1|0;if((f|0)!=(c|0)){continue}break}}b=q[a+4>>2];if(b>>>0<=c>>>0){break a}a=q[a+8>>2];while(1){d=a+(c<<2)|0;q[d>>2]=w(q[d>>2],e);c=c+1|0;if(b>>>0>c>>>0){continue}break}}return g}function cba(a,b,c){var d=0,e=0,f=x(0);a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}b=q[c+4>>2];d=q[c>>2];f=u[c+8>>2];q[a+12>>2]=1065353216;u[a+8>>2]=f;q[a>>2]=d;q[a+4>>2]=b;q[a+412>>2]=q[a+412>>2]|4194304;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Ln(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=0,o=0;o=a+4|0;n=o;q[n+8>>2]=b;q[n>>2]=1;q[n+4>>2]=c>>>2;if(d){q[a+24>>2]=d;q[a+16>>2]=1;q[a+20>>2]=e>>>2}q[a+36>>2]=f;q[a+28>>2]=1;q[a+32>>2]=g>>>2;c=a+76|0;b=c;q[b+8>>2]=l;q[b>>2]=1;q[b+4>>2]=m>>>2;q[a+48>>2]=h;q[a+40>>2]=1;q[a+44>>2]=i>>>2;q[a+60>>2]=j;q[a+52>>2]=1;q[a+56>>2]=k>>>2;b=a- -64|0;q[b>>2]=1;q[b+4>>2]=1;q[b+8>>2]=264012;q[a+88>>2]=Ql(o);b=Ql(c);q[a+96>>2]=1;q[a+92>>2]=b}function zG(a,b){var c=0,d=0;c=Ii-32|0;Ii=c;a:{d=q[a+8>>2]-q[a+12>>2]>>4;if((d|0)>-1){dt(a);if((Vi(a,-1)|0)==5){Ho(a,-1,b)}Ri(a,-2);a=q[a+8>>2]-q[a+12>>2]>>4;if((a|0)!=(d|0)){break a}Ii=c+32|0;return}q[c+12>>2]=d;q[c+4>>2]=1287;q[c+8>>2]=0;q[c>>2]=122672;Pi(4,122749,123291,c);J(123363,122672,1469,123380);G()}q[c+28>>2]=a;q[c+24>>2]=d;q[c+20>>2]=1287;q[c+16>>2]=122672;Pi(4,122749,123394,c+16|0);J(123465,122672,1492,123484);G()}function sF(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=Ii-112|0;Ii=d;e=q[a+68>>2];if(!(!e|!r[a+57|0])){f=q[a+20>>2];i=q[f+8>>2];g=q[a+32>>2];h=q[a+8>>2];q[d+28>>2]=c;q[d+8>>2]=b;q[d+104>>2]=(b|0)!=4?(f-q[a+40>>2]|0)/24|0:0;if((q[a+28>>2]-h|0)<=320){b=q[a+44>>2];sn(a,(b|0)<20?b+20|0:b<<1)}q[q[a+20>>2]+8>>2]=q[a+8>>2]+320;o[a+57|0]=0;Mi[e|0](a,d+8|0);o[a+57|0]=1;b=q[a+32>>2];q[q[a+20>>2]+8>>2]=b+(i-g|0);q[a+8>>2]=b+(h-g|0)}Ii=d+112|0}function pma(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;f=Ii-16|0;Ii=f;a:{e=q[q[a>>2]+320>>2];a=q[e+20>>2];b:{if(!a){break b}a=q[q[e+16>>2]+((d>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break b}e=q[e+24>>2];while(1){g=e+w(a,12)|0;if(q[g>>2]==(d|0)){break a}a=q[g+8>>2];if((a|0)!=-1){continue}break}}o[290720]=1;q[f>>2]=d;Pi(4,40439,41258,f);G()}a=q[(e+w(a,12)|0)+4>>2];a=Mi[q[a+8>>2]](f+8|0,q[a+4>>2],b,c,d)|0;Ii=f+16|0;return a|0}function e0(a,b){a=a|0;b=b|0;var c=0,d=0;c=_Y(q[b>>2]);d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}c=Mi[((c|0)==27?1071:1070)|0](a,q[b>>2],b+4|0,q[b+16>>2])|0;d=qF(a,r[c+72|0],q[a+72>>2]);q[d+16>>2]=c;if(r[c+72|0]){b=0;while(1){q[(d+(b<<2)|0)+20>>2]=wZ(a);b=b+1|0;if(b>>>0>2];q[b+8>>2]=6;q[b>>2]=d;if((q[a+28>>2]-q[a+8>>2]|0)<=16){b=q[a+44>>2];sn(a,(b|0)<1?b+1|0:b<<1)}q[a+8>>2]=q[a+8>>2]+16}function UY(a,b){var c=0,d=0,e=0;c=q[a+12>>2];c=c>>>0>2]?c:141056;a:{if(q[c+8>>2]!=6){break a}c=q[c>>2];b:{if(r[c+6|0]){if((b|0)<1|r[c+7|0]<(b|0)){break a}e=140594;b=(c+(b<<4)|0)+8|0;break b}if((b|0)<1){break a}d=q[c+16>>2];if(q[d+36>>2]<(b|0)){break a}b=(b<<2)-4|0;e=q[b+q[d+28>>2]>>2]+16|0;b=q[q[(b+c|0)+20>>2]+8>>2]}d=q[b+4>>2];c=q[a+8>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;q[c+8>>2]=q[b+8>>2];q[a+8>>2]=q[a+8>>2]+16}return e}function u8(a){var b=0;a:{if(o[a+128|0]&1){break a}b=q[a+116>>2];if(!b){break a}Ni(b)}b:{if(o[a+112|0]&1){break b}b=q[a+100>>2];if(!b){break b}Ni(b)}c:{if(o[a+96|0]&1){break c}b=q[a+84>>2];if(!b){break c}Ni(b)}d:{if(o[a+80|0]&1){break d}b=q[a+68>>2];if(!b){break d}Ni(b)}e:{if(o[a- -64|0]&1){break e}b=q[a+52>>2];if(!b){break e}Ni(b)}f:{if(o[a+48|0]&1){break f}b=q[a+28>>2];if(b){Ni(b)}b=q[a+20>>2];if(!b){break f}Ni(b)}return a}function cv(a){var b=0,c=0,d=0,e=0;e=q[a>>2];b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;d=a;a:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break a}b=Hk(b)}q[d>>2]=b;b:{c:{switch(b-10|0){case 0:case 3:break c;default:break b}}if((b|0)==(e|0)){break b}b=q[a+56>>2];c=q[b>>2];q[b>>2]=c-1;d=a;d:{if(c){c=b;b=q[b+4>>2];q[c+4>>2]=b+1;b=r[b|0];break d}b=Hk(b)}q[d>>2]=b}b=q[a+4>>2];q[a+4>>2]=b+1;if((b|0)>=2147483644){gm(a,141645,q[a+16>>2])}}function cV(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;e=1;c=ln(a,137635);b=Yn(c+8248|0);b=c$(c,q[c+8272>>2],d+12|0,b);a:{if(!b){b=yj(a,8280);Np(a,137623,-1);a=Ui(b,0,8280);su(d+12|0);q[a>>2]=q[d+12>>2];f=a+4|0;b=f;q[b+12>>2]=994;q[b+8>>2]=995;q[b+4>>2]=996;q[b>>2]=a;b=a+8248|0;v[b+8>>3]=-1;v[b>>3]=-1;YB(a+24|0,f,b);q[a+8272>>2]=q[c+8272>>2];break a}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,b);e=2}Ii=d+16|0;return e|0}function _ya(){q[79095]=0;q[79096]=0;q[79094]=316560;q[79092]=0;q[79090]=112206;q[79089]=112182;q[79088]=0;q[79086]=0;q[79084]=0;q[79082]=0;q[79080]=1;q[79078]=0;q[79079]=3;q[79116]=316560;q[79114]=0;q[79112]=112235;q[79111]=112215;q[79110]=0;q[79108]=0;q[79106]=0;q[79104]=0;q[79102]=1;q[79100]=0;q[79101]=3;q[79097]=0;q[79098]=0;q[79099]=0;q[79121]=0;q[79119]=0;q[79120]=0;q[79117]=0;q[79118]=0;q[79122]=Oi(112440);q[79123]=Li}function Yva(a,b,c){var d=0;a:{b:{c:{d:{if(b>>>0<=c>>>0){if(q[a>>2]+(q[a+4>>2]<<2)>>>0>>0|t[a>>2]>b>>>0){break d}if(q[a>>2]+(q[a+4>>2]<<2)>>>0>>0|t[a>>2]>c>>>0){break c}d=b-q[a>>2]|0;if((d|0)<=-1){break b}b=c-b|0;if((b|0)<=-1){break a}Xva(a,d>>>2|0,b>>>2|0);return}J(106453,106468,782,106512);G()}J(106518,106468,783,106512);G()}J(106555,106468,784,106512);G()}J(96993,106468,789,106512);G()}J(96993,106468,796,106512);G()}function Vva(a,b,c){var d=0;a:{b:{c:{d:{if(b>>>0<=c>>>0){if(q[a>>2]+(q[a+4>>2]<<1)>>>0>>0|t[a>>2]>b>>>0){break d}if(q[a>>2]+(q[a+4>>2]<<1)>>>0>>0|t[a>>2]>c>>>0){break c}d=b-q[a>>2]|0;if((d|0)<=-1){break b}b=c-b|0;if((b|0)<=-1){break a}Uva(a,d>>>1|0,b>>>1|0);return}J(106453,106468,782,106512);G()}J(106518,106468,783,106512);G()}J(106555,106468,784,106512);G()}J(96993,106468,789,106512);G()}J(96993,106468,796,106512);G()}function Dk(a,b,c,d,e,f,g,h){var i=0,j=0;i=-11;j=q[a+5136>>2];a:{if((j|0)==128){break a}i=-6;if(!g|(wm(b,46)|!e)){break a}b:{if(!j){break b}i=0;while(1){if(dj(b,q[(w(i,40)+a|0)+24>>2])){i=i+1|0;if((j|0)!=(i|0)){continue}break b}break}return-5}i=Oi(b);j=q[a+5136>>2];q[a+5136>>2]=j+1;a=w(j,40)+a|0;q[a+48>>2]=h;q[a+44>>2]=g;q[a+40>>2]=f;q[a+36>>2]=e;q[a+32>>2]=d;q[a+28>>2]=c;q[a+24>>2]=b;q[a+16>>2]=i;q[a+20>>2]=Li;i=0}return i}function rs(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;q[a>>2]=0;q[a+4>>2]=0;a:{if(!b){c=-1694144372;d=1359893119;e=-1521486534;f=1013904242;g=-1150833019;h=1779033703;i=1541459225;j=528734635;break a}c=1750603025;d=-4191439;e=-150054599;f=812702999;g=914150663;h=-1056596264;i=-1090891868;j=1694076839}q[a+104>>2]=b;q[a+8>>2]=h;q[a+36>>2]=i;q[a+32>>2]=j;q[a+28>>2]=c;q[a+24>>2]=d;q[a+20>>2]=e;q[a+16>>2]=f;q[a+12>>2]=g;return 0}function Bha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);f=Li;d=fj(a,2);q[b+12>>2]=0;q[b+8>>2]=0;c=U1(c,f,x(d),b+12|0,b+8|0);if(c){q[b>>2]=c;Pi(3,80094,80163,b)}d=+u[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;d=+u[b+8>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;if((e+2|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(80125,79890,255,80187);G()}Ii=b+16|0;return 2}function Aha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);f=Li;d=fj(a,2);q[b+12>>2]=0;q[b+8>>2]=0;c=T1(c,f,x(d),b+12|0,b+8|0);if(c){q[b>>2]=c;Pi(3,80094,80102,b)}d=+u[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;d=+u[b+8>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d;q[a+8>>2]=q[a+8>>2]+16;if((e+2|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(80125,79890,211,80150);G()}Ii=b+16|0;return 2}function $E(a,b){var c=0,d=0,e=0,f=0;vj(a,0,0);e=1;f=q[a+8>>2]-q[a+12>>2]>>4;d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=1;q[a+8>>2]=q[a+8>>2]+16;ik(a,b);if(Vi(a,-1)){d=1;while(1){c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;ej(a,-2);pj(a,f);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;pj(a,f);c=q[a+8>>2];q[c+8>>2]=3;d=d+1|0;e=+(d|0);v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;ik(a,b);if(Vi(a,-1)){continue}break}}Ri(a,-2)}function aE(a,b,c){var d=0,e=0,f=0;e=Ii-16|0;Ii=e;d=hk(a,b,e+12|0,49);a:{if(!d){while(1){f=q[a>>2]+q[e+12>>2]|0;d=yC(a,f,c);if(d){break a}while(1){if(q[a>>2]!=(f|0)){o[c+28|0]=1;d=c;c=bk(1,32);q[d+24>>2]=c;if(!c){d=-10368;break a}d=yC(a,f,c);if(!d){continue}break a}break}if((b|0)==(f|0)){d=0;break a}d=c;c=bk(1,32);q[d+24>>2]=c;if(!c){d=-10368;break a}d=hk(a,b,e+12|0,49);if(!d){continue}break}}d=d-9088|0}Ii=e+16|0;return d}function Z8(a,b,c,d,e,f,g){var h=0;h=Ii+ -64|0;Ii=h;u[h>>2]=u[g>>2];u[h+4>>2]=u[g+4>>2];u[h+8>>2]=u[g+8>>2];u[h+12>>2]=u[g+12>>2];u[h+16>>2]=u[g+16>>2];u[h+20>>2]=u[g+20>>2];u[h+24>>2]=u[g+24>>2];u[h+28>>2]=u[g+28>>2];u[h+32>>2]=u[g+32>>2];u[h+36>>2]=u[g+36>>2];u[h+40>>2]=u[g+40>>2];u[h+44>>2]=u[g+44>>2];u[h+48>>2]=u[g+48>>2];u[h+52>>2]=u[g+52>>2];u[h+56>>2]=u[g+56>>2];u[h+60>>2]=u[g+60>>2];aI(a,b,c,d,e,f,h,1);Ii=h- -64|0}function WX(a,b,c){var d=0,e=0,f=0;f=Ii-16|0;Ii=f;e=hk(a,b,f+12|0,48);a:{if(e){break a}e=-102;d=q[a>>2];if((d+q[f+12>>2]|0)!=(b|0)){break a}if(b>>>0>d>>>0){while(1){q[c>>2]=r[d|0];e=hk(a,b,c+4|0,6);if(e){break a}q[c+8>>2]=q[a>>2];d=q[a>>2]+q[c+4>>2]|0;q[a>>2]=d;if(b>>>0>d>>>0){d=c;c=bk(1,16);q[d+12>>2]=c;if(!c){e=-106;break a}d=q[a>>2]}if(b>>>0>d>>>0){continue}break}}q[c+12>>2]=0;e=q[a>>2]==(b|0)?0:-102}Ii=f+16|0;return e}function IQ(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;c=1;e=r[b|0];if((d|0)==1){o[a|0]=e;o[a+1|0]=e;return a|0}o[a|0]=e;o[a+1|0]=(r[b+1|0]+w(r[b|0],3)|0)+2>>>2;e=d-1|0;f=2;if((d|0)>=3){while(1){f=c<<1;g=b+c|0;h=w(r[g|0],3)+2|0;o[f+a|0]=h+r[g-1|0]>>>2;c=c+1|0;o[(f|1)+a|0]=r[c+b|0]+h>>>2;if((c|0)!=(e|0)){continue}break}f=e<<1}c=b+e|0;o[a+f|0]=(r[c|0]+w(r[(b+d|0)-2|0],3)|0)+2>>>2;o[(f|1)+a|0]=r[c|0];return a|0}function vha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;d=nj(b+72|0,a,0,79890,645);e=jk(a);c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);u[b>>2]=fj(a,2);a=q[58866];vk(b+8|0,b+40|0,q[a+8>>2],q[a+12>>2],e,a,b,4);mj(d);Ii=b+96|0;return 0}function tha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;d=nj(b+72|0,a,0,79890,683);e=jk(a);c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);u[b>>2]=fj(a,2);a=q[58882];vk(b+8|0,b+40|0,q[a+8>>2],q[a+12>>2],e,a,b,4);mj(d);Ii=b+96|0;return 0}function mea(a,b){var c=0,d=0;a:{b:{c:{c=q[a+36>>2];a=q[a+32>>2];d=(c-a|0)/592|0;c=b&65535;if(d>>>0>c>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break c}c=a+w(c,592)|0;if(s[c+570>>1]!=(b&65535)){break b}b=s[c+576>>1];if((b|0)==65535){return 0}if(b>>>0>=d>>>0){break a}a=a+w(b,592)|0;return s[a+568>>1]<<16|s[a+570>>1]}break a}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}J(201665,201514,479,201676);G()}function hxa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=r[b+1|0];e=r[b|0];i=r[b+2|0];j=r[b+3|0];k=r[b+4|0];g=(((w(f>>>d|0,3)+(e>>>d|0)|0)+w(i>>>d|0,9)|0)+w(j>>>d|0,27)|0)+w(k>>>d|0,81)|0;if((g|0)>=243){J(107255,96899,5158,107267);G()}b=-1<>>2&3|(b&i)<<2|(e>>>4&1)<>>5&3)<>>7<>2]=0;g=q[(q[b+8>>2]<<2)+256832>>2];f=q[a+20>>2];h=q[f+8>>2];a:{b:{e=q[f>>2];if(h>>>0<=e>>>0){break b}while(1){if((b|0)!=(e|0)){e=e+16|0;if(h>>>0>e>>>0){continue}break b}break}b=dv(a,f,b-q[a+12>>2]>>4,d+44|0);if(!b){break b}q[d+16>>2]=c;q[d+20>>2]=b;q[d+24>>2]=q[d+44>>2];q[d+28>>2]=g;Yk(a,140595,d+16|0);break a}q[d+4>>2]=g;q[d>>2]=c;Yk(a,140630,d)}Ii=d+48|0}function xha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;d=nj(b+72|0,a,0,79890,610);e=jk(a);c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);o[b|0]=Iz(a,2);a=q[58830];vk(b+8|0,b+40|0,q[a+8>>2],q[a+12>>2],e,a,b,1);mj(d);Ii=b+96|0;return 0}function jW(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;a:{if(d>>>0>4294967284){break a}g=q[a+4>>2];if(g>>>0>>0){break a}o[f|0]=0;i=(g-d|0)-3|0;if(!b){break a}o[f+1|0]=2;g=f+2|0;b:{while(1){if(!i){break b}i=i-1|0;h=100;while(1){c:{j=Mi[b|0](c,g,1)|0;if(r[g|0]){break c}h=h-1|0;if(!h){break c}if(!j){continue}}break}if(!j){g=g+1|0;if(h){continue}}break}return j-17536|0}o[g|0]=0;if(d){Ti(g+1|0,e,d)}return ts(a,f,f)}return-16512}function OV(a){var b=0,c=0,d=0,e=0;e=q[q[a+68>>2]+2252>>2];if(q[a+8>>2]==1){q[a+8>>2]=2;q[a+12>>2]=0}b=q[a+60>>2];if(b){q[q[a+64>>2]+124>>2]=q[b+124>>2];ns(b);Ni(q[a+60>>2])}b=q[a+64>>2];q[a+64>>2]=0;q[a+60>>2]=b;c=q[a>>2];d=q[c+36>>2];if(!(!q[b+12>>2]|(e|!d))){Mi[d|0](q[c+40>>2],b)|0;c=q[a>>2]}a:{if(!(!(r[c+184|0]&2)|!q[q[a+68>>2]+496>>2])){b=q[a+92>>2];if(b){Mi[b|0](q[a+88>>2],0,0)}break a}sD(a)}q[a+4>>2]=q[a+4>>2]+1}function $V(a){var b=0;q[a+184>>2]=q[a+184>>2]&-2;q[a+184>>2]=q[a+184>>2]&-3;o[a+166|0]=255;o[a+167|0]=255;o[a+168|0]=255;o[a+169|0]=255;p[a+164>>1]=0;q[a+160>>2]=16;q[a+152>>2]=1e3;q[a+156>>2]=6e4;o[a+170|0]=255;o[a+171|0]=255;q[a+184>>2]=q[a+184>>2]&-40461|40456;q[a+180>>2]=16974595;b=NV();q[a+8>>2]=b;q[a+12>>2]=b;q[a+4>>2]=b;q[a+80>>2]=174096;q[a>>2]=b;q[a+96>>2]=282880;b=AE();q[a+176>>2]=1024;q[a+100>>2]=b;return 0}function T2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-32|0;Ii=d;a:{b:{if(a){b=a?q[a>>2]:0;if(!b){break b}b=q[b+120>>2];if(!b){break a}f=nj(d+8|0,b,0,132848,433);g=c4();c=q[210420];e=q[b+8>>2];q[e+8>>2]=3;v[e>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;c=q[b+8>>2];q[c+8>>2]=2;q[c>>2]=g;q[b+8>>2]=q[b+8>>2]+16;BG(a);mj(f);Ii=d+32|0;return}J(132983,132848,428,133003);G()}J(133023,132848,430,133003);G()}J(133038,132848,432,133003);G()}function uw(a,b){var c=0;q[a>>2]=7;c=q[b+4>>2];q[a+8>>2]=q[b>>2];q[a+12>>2]=c;c=q[b+12>>2];q[a+16>>2]=q[b+8>>2];q[a+20>>2]=c;c=q[b+20>>2];q[a+24>>2]=q[b+16>>2];q[a+28>>2]=c;c=q[b+28>>2];q[a+32>>2]=q[b+24>>2];q[a+36>>2]=c;c=q[b+36>>2];q[a+40>>2]=q[b+32>>2];q[a+44>>2]=c;c=q[b+44>>2];q[a+48>>2]=q[b+40>>2];q[a+52>>2]=c;c=q[b+52>>2];q[a+56>>2]=q[b+48>>2];q[a+60>>2]=c;c=q[b+60>>2];a=a- -64|0;q[a>>2]=q[b+56>>2];q[a+4>>2]=c}function sx(a,b,c,d,e){var f=0,g=0,h=0;f=wx(a,b,c,d);g=q[e+4>>2];h=q[d+4>>2];if((g|0)==(h|0)&t[e>>2]>2]|g>>>0>>0){Zl(d,e);e=q[d+4>>2];g=q[c+4>>2];if((e|0)==(g|0)&t[d>>2]>=t[c>>2]|e>>>0>g>>>0){return f+1|0}Zl(c,d);d=q[c+4>>2];e=q[b+4>>2];if((d|0)==(e|0)&t[c>>2]>=t[b>>2]|d>>>0>e>>>0){return f+2|0}Zl(b,c);c=q[b+4>>2];d=q[a+4>>2];if((c|0)==(d|0)&t[b>>2]>=t[a>>2]|c>>>0>d>>>0){return f+3|0}Zl(a,b);f=f+4|0}return f}function mca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+28|0);a:{if(uk(a,2)){c=kj(a,2,0);if(!UJ(d,q[b+28>>2],c)){break a}q[b+16>>2]=c;Qi(a,206816,b+16|0);break a}c=nl(a,2);e=Li;g=e;if(!TJ(d,q[b+28>>2],c,e)){break a}q[b>>2]=aj(c,g);Qi(a,206816,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){J(202212,202233,2112,206852);G()}Ii=b+32|0;return 0}function ica(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+28|0);a:{if(uk(a,2)){c=kj(a,2,0);if(!OA(d,q[b+28>>2],c)){break a}q[b+16>>2]=c;Qi(a,206875,b+16|0);break a}c=nl(a,2);e=Li;g=e;if(!QJ(d,q[b+28>>2],c,e)){break a}q[b>>2]=aj(c,g);Qi(a,206875,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){J(202212,202233,2176,206912);G()}Ii=b+32|0;return 0}function Ywa(){var a=0,b=0;a=Ii-96|0;Ii=a;if(!r[300417]){ewa();q[a+88>>2]=-556347706;q[a+92>>2]=-528409;q[a+80>>2]=-1667986300;q[a+84>>2]=-1112167003;q[a+72>>2]=1515342402;q[a+76>>2]=2071161699;q[a+64>>2]=403703808;q[a+68>>2]=959523105;Vw(300432,a- -64|0,32,32,1);Vw(300944,a- -64|0,1,32,0);while(1){o[a+b|0]=b<<2|b>>>4;b=b+1|0;if((b|0)!=64){continue}break}Vw(301456,a,64,64,1);Vw(301968,a,1,64,0);o[300417]=1}Ii=a+96|0}function Xia(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;c=-2;a:{if(Qj(q[a+20>>2],q[a+24>>2],262592,e+12|0)){break a}c=q[a>>2];d=q[q[a+32>>2]+8>>2];b=q[d+16>>2];if(b){Aj(b)}b=q[d+32>>2];if(b){cj(c,b)}b=q[d+20>>2];if(b){cj(c,b)}b=q[d+28>>2];if(b){cj(c,b)}b=q[d+24>>2];if(b){cj(c,b)}q[d+16>>2]=q[e+12>>2];c=NL(q[a>>2],d,1);if(c){break a}q[q[a+32>>2]+16>>2]=((q[a+24>>2]+q[d+8>>2]|0)-q[d>>2]|0)+36;c=0}Ii=e+16|0;return c|0}function Oba(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;f=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+28|0);a:{if(uk(a,2)){c=kj(a,2,0);if(!LA(d,q[b+28>>2],c)){break a}q[b+16>>2]=c;Qi(a,206320,b+16|0);break a}c=nl(a,2);e=Li;g=e;if(!GJ(d,q[b+28>>2],c,e)){break a}q[b>>2]=aj(c,g);Qi(a,206320,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(f|0)){J(202212,202233,1535,206359);G()}Ii=b+32|0;return 0}function j6(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=-2;a:{if(!q[a+8>>2]){break a}d=q[a+16>>2];if(!d){break a}d=q[q[a+12>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+20>>2];while(1){f=a+w(d,24)|0;if((b|0)!=q[f>>2]|q[f+4>>2]!=(c|0)){d=q[f+16>>2];if((d|0)!=-1){continue}break a}break}a=q[(a+w(d,24)|0)+12>>2];if(!a){break a}a=q[a+4>>2];q[e>>2]=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);g=0}return g|0}function Fs(a){q[a>>2]=0;q[a+12>>2]=0;q[a+4>>2]=1;q[a+8>>2]=0;q[a+24>>2]=0;q[a+16>>2]=1;q[a+20>>2]=0;q[a+36>>2]=0;q[a+28>>2]=1;q[a+32>>2]=0;q[a+48>>2]=0;q[a+40>>2]=1;q[a+44>>2]=0;q[a+60>>2]=0;q[a+52>>2]=1;q[a+56>>2]=0;q[a+72>>2]=0;q[a+64>>2]=1;q[a+68>>2]=0;q[a+84>>2]=0;q[a+76>>2]=1;q[a+80>>2]=0;q[a+120>>2]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+104>>2]=0;q[a+108>>2]=0;q[a+96>>2]=0;q[a+100>>2]=0;q[a+88>>2]=0;q[a+92>>2]=0}function uea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}d=a+w(c,592)|0;if(s[d+570>>1]!=(b&65535)){break a}b=-1;c:{if(q[d+436>>2]!=2){break c}a=a+w(c,592)|0;if(!q[a+452>>2]){break c}a=q[a+440>>2];b=(a>>>13&8191)-(a&8191)|0}return b}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function ija(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[57366],b+12|0)){Kr(q[b+12>>2]);a:{d=q[b+12>>2];e=q[d+48>>2];if(!e){break a}if(q[d+56>>2]){c=0;while(1){Ek(q[a+20>>2],q[q[d+52>>2]+(c<<2)>>2]);c=c+1|0;if((e|0)==(c|0)){d=q[b+12>>2];break a}d=q[b+12>>2];if(t[d+56>>2]>c>>>0){continue}break}}J(61324,61336,45,61390);G()}q[q[a+24>>2]>>2]=d;c=0}Ii=b+16|0;return c|0}function TW(a,b,c){var d=0,e=0,f=0;d=-3;e=q[a>>2];if(e){e=q[e+8>>2]}else{e=0}e=e&255;a:{if(c>>>0>1024){break a}if(!(!q[a+92>>2]|(q[a+76>>2]<=q[a+88>>2]?q[a+84>>2]!=1:0))){d=SW(a);if(d){break a}}if(c){f=a+12|0;while(1){d=bn(a);if(d){break a}d=il(a,f,e);if(d){break a}d=em(a,f);if(d){break a}d=c>>>0>e>>>0?e:c;b=Ti(b,f,d)+d|0;c=c-d|0;if(c){continue}break}}d=ty(a,0,0);if(d){break a}q[a+76>>2]=q[a+76>>2]+1;d=0}return d}function Pna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=q[a+1040>>2];c=q[b+28>>2];d=q[c+20>>2];b=q[b+32>>2];if(b>>>0>2]-d>>3>>>0){d=q[(b<<3)+d>>2];b=q[c+8>>2];c=q[c+4>>2];if(d>>>0>2>>>0){c=q[c+(d<<2)>>2];b=q[a+1052>>2];e=q[a+1048>>2];f=e+1|0;d=f>>>0<1?b+1|0:b;q[a+1048>>2]=f;q[a+1052>>2]=d;if(!(b|e)){q[a+8>>2]=6;o[a+16|0]=o[c+204|0]&1;q[a>>2]=Oi(46054);q[a+4>>2]=Li}return!(b|e)|0}}J(46069,45367,479,46080);G()}function zF(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;c=uj(a,c,d+12|0);e=w(q[d+12>>2],6)+2|0;a=q[b+8>>2];if((e|0)>(q[b+4>>2]+(a^-1)|0)){Vk(b,a+e|0);a=q[b+8>>2]}q[b+8>>2]=a+1;o[q[b>>2]+a|0]=34;if(q[d+12>>2]){a=0;while(1){e=r[a+c|0];f=q[(e<<2)+254448>>2];a:{if(f){aD(b,f);break a}f=q[b+8>>2];q[b+8>>2]=f+1;o[f+q[b>>2]|0]=e}a=a+1|0;if(a>>>0>2]){continue}break}}a=q[b+8>>2];q[b+8>>2]=a+1;o[a+q[b>>2]|0]=34;Ii=d+16|0}function co(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{if((a|0)==(b|0)){break a}f=q[a+8>>2];d=f-(c<<4)|0;q[a+8>>2]=d;g=1;if((c|0)<1){break a}e=q[b+8>>2];q[b+8>>2]=e+16;h=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=h;q[e+8>>2]=q[(f+(0-c<<4)|0)+8>>2];if((c|0)==1){break a}while(1){d=q[a+8>>2];e=q[b+8>>2];q[b+8>>2]=e+16;d=d+(g<<4)|0;f=q[d+4>>2];q[e>>2]=q[d>>2];q[e+4>>2]=f;q[e+8>>2]=q[d+8>>2];g=g+1|0;if((g|0)!=(c|0)){continue}break}}}function wna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=q[a+1040>>2];c=q[b+28>>2];d=q[c+16>>2];b=q[b+32>>2];if(b>>>0>2]-d>>3>>>0){d=q[(b<<3)+d>>2];b=q[c+4>>2];c=q[c>>2];if(d>>>0>2>>>0){c=q[c+(d<<2)>>2];b=q[a+1052>>2];e=q[a+1048>>2];f=e+1|0;d=f>>>0<1?b+1|0:b;q[a+1048>>2]=f;q[a+1052>>2]=d;if(!(b|e)){q[a+8>>2]=6;o[a+16|0]=o[c+254|0]&1;q[a>>2]=Oi(52122);q[a+4>>2]=Li}return!(b|e)|0}}J(51709,51308,479,51547);G()}function Ova(a){a=a|0;var b=0,c=0,d=0,e=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;d=Lza(0)|0;a:{if(d){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}b=q[a+8>>2]-q[a+12>>2]>>4;if((b|0)>=2){while(1){c=b;Oza(+(Mj(a,c)+6755399441055744));Lza(1)|0;e=Lza(0)|0;b:{if(e){break b}if(Oj(a,c)){break b}Nk(a,c,136658)}b=c-1|0;d=d&e;if((c|0)>2){continue}break}}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Mva(a){a=a|0;var b=0,c=0,d=0,e=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;d=Lza(0)|0;a:{if(d){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}b=q[a+8>>2]-q[a+12>>2]>>4;if((b|0)>=2){while(1){c=b;Oza(+(Mj(a,c)+6755399441055744));Lza(1)|0;e=Lza(0)|0;b:{if(e){break b}if(Oj(a,c)){break b}Nk(a,c,136658)}b=c-1|0;d=d|e;if((c|0)>2){continue}break}}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Kva(a){a=a|0;var b=0,c=0,d=0,e=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;d=Lza(0)|0;a:{if(d){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}b=q[a+8>>2]-q[a+12>>2]>>4;if((b|0)>=2){while(1){c=b;Oza(+(Mj(a,c)+6755399441055744));Lza(1)|0;e=Lza(0)|0;b:{if(e){break b}if(Oj(a,c)){break b}Nk(a,c,136658)}b=c-1|0;d=d^e;if((c|0)>2){continue}break}}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function CV(a,b){var c=0,d=0,e=0,f=0;q[a+184>>2]=0;q[a>>2]=b;b=bk(1,16749);q[a+100>>2]=b;d=a+100|0;e=a+184|0;c=-32512;a:{if(!b){b=0;break a}f=bk(1,16749);q[e>>2]=f;if(!f){break a}oD(a);c=Kx(a);if(!c){return 0}b=q[d>>2]}Ni(b);Ni(q[a+184>>2]);q[a>>2]=0;a=d;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;a=e;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;return c}function tpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a+12>>2];d=q[q[a+16>>2]>>2];b=q[d+60>>2];if(b){Pn(b)}b=q[d+36>>2];if(b){cj(q[c>>2],b)}a=q[a+8>>2];c=q[a>>2];a:{b:{if((c|0)!=q[a+4>>2]){e=q[a+16>>2];if(!e){break b}b=q[a+24>>2];if(!b|b>>>0>t[a+20>>2]){break a}f=a;a=b-1|0;q[f+24>>2]=a;q[(a<<2)+e>>2]=d-c>>7;Ui(d,0,128);return 0}J(36635,36646,479,36702);G()}J(36826,36775,140,36857);G()}J(36862,36775,141,36857);G()}function _L(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;a:{d=q[a>>2];if(d){e=1;c=q[d+4>>2];g=q[c>>2];if(!g){break a}while(1){h=s[((f<<1)+c|0)+28568>>1];c=w(h,112)+c|0;i=c;if(q[c+68>>2]){q[b+16>>2]=0;q[b>>2]=a;q[b+4>>2]=q[((h<<2)+d|0)+12>>2];q[b+8>>2]=q[c+24>>2];e=!(Mi[q[i+68>>2]](b)|0)&e}f=f+1|0;if((g|0)==(f|0)){break a}c=q[d+4>>2];continue}}J(8878,7192,2668,8871);G()}Ii=b+32|0;return e}function HE(a,b,c,d,e,f){var g=0,h=0,i=0,j=0;g=-12416;a:{if(!d|t[a>>2]>>0){break a}i=a+4|0;if(!Jj(i,0)){break a}g=a+28|0;b:{while(1){h=$n(g,b,e,f);if(h){break b}while(1){if((_j(g,i)|0)>=0){h=kl(g,1);if(!h){continue}break b}break}if((j|0)==11){g=-12928;break a}j=j+1|0;if(Ow(g,i)){continue}break}b=a+40|0;h=Do(b,a+16|0,g,i,a+76|0);if(h){break b}g=Ow(b,i);if(g){break a}h=Dn(b,c,d)}return h?h-12928|0:0}return g}function Cwa(a,b,c){var d=0,e=0;if(c>>>0>=2){J(110977,110986,163,111019);G()}b=q[(c<<2)+110896>>2]&b>>>(((c|0)!=0)<<4);a:{if(b&32768){d=b&31;c=c?d+110912|0:(d>>>1|0)+110944|0;d=(b>>>5&31)+110912|0;e=(b>>>10&31)+110912|0;b=255;break a}d=b&15;c=c?d+110944|0:(d>>>1|0)+110960|0;d=(b>>>4&15)+110944|0;e=(b>>>8&15)+110944|0;b=r[(b>>>12&7)+110968|0]}e=r[e|0];d=r[d|0];c=r[c|0];o[a+3|0]=b;o[a+2|0]=c;o[a+1|0]=d;o[a|0]=e}function ena(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[a+80>>2];d=b+16|0;c=q[b+24>>2];if((c|0)==q[b+20>>2]){xn(49406,49412,c-q[d>>2]>>4);return-1e3}d=y9(d);c=q[b+32>>2];if(d>>>0>2]-c>>3>>>0){c=q[c+(d<<3)>>2];e=q[b+20>>2];b=q[b+16>>2];if(c>>>0>4>>>0){b=b+(c<<4)|0;c=q[a+76>>2];q[b>>2]=c;u[b+8>>2]=u[c+12>>2];u[b+4>>2]=u[c+16>>2];u[b+12>>2]=u[c+20>>2];q[q[a+88>>2]>>2]=d;return 0}}J(50132,49868,479,50143);G()}function VC(a,b){var c=0,d=0,e=0;d=Ii-16|0;Ii=d;c=DF(d+12|0,b,1);a:{if(!c){c=Ui(yj(a,8280),0,8280);Np(a,137611,-1);su(d+12|0);if((b|0)==10){q[d+8>>2]=1;Ol(q[d+12>>2],41,26,d+8|0,4)}q[c>>2]=q[d+12>>2];e=c+4|0;a=e;q[a+12>>2]=994;q[a+8>>2]=995;q[a+4>>2]=996;q[a>>2]=c;a=c+8248|0;v[a+8>>3]=-1;v[a>>3]=-1;YB(c+24|0,e,a);q[c+8272>>2]=b;a=1;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,c);a=2}Ii=d+16|0;return a}function Q6(a){var b=0;a:{if(o[a+173532|0]&1){break a}b=q[a+173520>>2];if(!b){break a}Ni(b)}b:{if(o[a+173512|0]&1){break b}b=q[a+173500>>2];if(!b){break b}Ni(b)}c:{if(o[a+155736|0]&1){break c}b=q[a+155716>>2];if(b){Ni(b)}b=q[a+155708>>2];if(!b){break c}Ni(b)}d:{if(o[a+44|0]&1){break d}b=q[a+24>>2];if(b){Ni(b)}b=q[a+16>>2];if(!b){break d}Ni(b)}e:{if(o[a+12|0]&1){break e}b=q[a>>2];if(!b){break e}Ni(b)}return a}function yT(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;c=1;e=kj(a,1,0);f=e;b=Oa(e|0)|0;if((b|0)==-31){b=wi(f|0)|0}if(b>>>0>=4294963201){q[240513]=0-b;b=-1}a:{if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[d+4>>2]=ql(b);q[d>>2]=e;Lj(a,146077,d);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;c=3}Ii=d+16|0;return c|0}function vra(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;h=Ii-48|0;Ii=h;if(!(!Lo(g)|!f)){f=q[q[a+80>>2]+8>>2];a:{if(!f){break a}f=q[f>>2];if(!f){break a}i=q[f+3216>>2];j=q[f+3220>>2]}f=q[a+96>>2];k=q[a+100>>2];a=h;q[a+40>>2]=d;q[a+44>>2]=e;q[a+32>>2]=b;q[a+36>>2]=c;q[a+24>>2]=f;q[a+28>>2]=k;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=i;q[a+12>>2]=j;bt(g,56,a+8|0)}no(g);Ii=h+48|0}function gma(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=Ii-32|0;Ii=h;if(Lo(q[e+8>>2])){i=h+8|0;g=q[e+8>>2];f=0;a:{if(!g){break a}f=q[g>>2]}g=nj(i,f,0,72626,93);b:{c:{if(!ov(q[e+8>>2])){Pi(4,72671,72679,0);break c}lk(f,q[e>>2],q[e+4>>2]);lk(f,b,c);b=q[f+8>>2];q[b+8>>2]=3;v[b>>3]=d>>>0;q[f+8>>2]=q[f+8>>2]+16;Pm(f,4,0);rz(q[e+8>>2]);if(a|d){break b}}no(q[e+8>>2]);q[e+8>>2]=0}mj(g)}Ii=h+32|0}function cQ(){var a=0,b=0,c=0,d=0;a=Ii-48|0;Ii=a;q[a+32>>2]=q[53560];b=q[53559];q[a+24>>2]=q[53558];q[a+28>>2]=b;b=q[53557];q[a+16>>2]=q[53556];q[a+20>>2]=b;d=a+16|13;a:{b:{while(1){c:{jO(d);q[a>>2]=384;b=Na(a+16|0,32962,a|0)|0;if(b>>>0>=4294963201){q[240513]=0-b;b=-1}if((b|0)>=0){break c}c=c+1|0;if((c|0)!=100){continue}break b}break}Oa(a+16|0)|0;c=sO(b,214244);if(c){break a}pa(b|0)|0}c=0}Ii=a+48|0;return c}function XS(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=a+152|0;a:{if(!q[a+160>>2]){g=a+8|0;f=a+140|0;while(1){if((h|0)==11){return-17536}d=$n(e,q[a+4>>2]-1|0,b,c);if(d){break a}d=ws(f,e,g);if(d){break a}h=h+1|0;if(Jj(f,1)){continue}break}d=Co(f,e,g);if(d){break a}d=Do(f,f,a+20|0,g,a+104|0);break a}b=a+140|0;d=Wk(b,b,b);if(d){break a}a=a+8|0;d=gl(b,b,a);if(d){break a}d=Wk(e,e,e);if(d){break a}return gl(e,e,a)}return d}function oQ(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=Ii-160|0;Ii=d;Ui(d+16|0,0,144);q[d+92>>2]=-1;q[d+60>>2]=b;q[d+24>>2]=-1;q[d+20>>2]=b;Cn(d+16|0,0,0);rO(d,d+16|0,1,1);f=q[d+8>>2];g=q[d+12>>2];h=q[d>>2];i=q[d+4>>2];if(c){j=c;e=b;b=q[d+20>>2]-q[d+24>>2]|0;k=b;c=b+q[d+136>>2]|0;b=q[d+140>>2]+(b>>31)|0;b=c>>>0>>0?b+1|0:b;q[j>>2]=!(b|c)?e:e+c|0}q[a>>2]=h;q[a+4>>2]=i;q[a+8>>2]=f;q[a+12>>2]=g;Ii=d+160|0}function Hba(a){var b=0;b=Ui($i(196),0,196);q[b>>2]=_J(q[a>>2]);q[b+4>>2]=q[a+4>>2];q[b+8>>2]=q[a+8>>2];q[b+12>>2]=q[a+12>>2];q[b+16>>2]=q[a+16>>2];q[b+28>>2]=q[a+28>>2];q[b+32>>2]=q[a+32>>2];q[b+20>>2]=q[a+20>>2];q[b+24>>2]=q[a+24>>2];q[b+36>>2]=q[a+36>>2];if(!(o[b+52|0]&1)){a:{Wi(32,4,b+40|0,b+48|0,b+44|0);if(o[b+164|0]&1){break a}Wi(32,4,b+152|0,b+160|0,b+156|0);return b}}J(202045,201514,493,201251);G()}function dV(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{if(!b){break a}h=b-c|0;f=b-1|0;if(!f){c=0;while(1){d=c-h>>>31|0;o[a|0]=r[a|0]&(0-d|d)>>31;c=c+1|0;if((c|0)!=(b|0)){continue}break}break a}i=a+f|0;while(1){d=g-h>>>31|0;c=0;while(1){e=a+c|0;j=e;k=r[e|0];e=(d|0-d)>>31;c=c+1|0;o[j|0]=k&e|r[c+a|0]&(e^-1);if((c|0)!=(f|0)){continue}break}o[i|0]=r[i|0]&(d|0-d)>>31;g=g+1|0;if((g|0)!=(b|0)){continue}break}}}function Pw(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;Oza(+a);d=Lza(1)|0;Lza(0)|0;d=d&2147483647;a:{if(d>>>0<=1072243195){c=1;if(d>>>0<1044816030){break a}c=fu(a,0);break a}c=a-a;if(d>>>0>=2146435072){break a}b:{switch(rC(a,b)&3){case 0:c=fu(v[b>>3],v[b+8>>3]);break a;case 1:c=-du(v[b>>3],v[b+8>>3],1);break a;case 2:c=-fu(v[b>>3],v[b+8>>3]);break a;default:break b}}c=du(v[b>>3],v[b+8>>3],1)}a=c;Ii=b+16|0;return a}function D0(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;h=Ui(a,0,b+1|0);a:{if(!b){break a}if(c){while(1){f=e+h|0;a=0;while(1){g=Xm(d,w(a,b)+e|0);o[f|0]=r[f|0]|g<>>0<=b>>>0){continue}break}}}function y3(a,b){a=a|0;b=b|0;var c=0,d=0;d=q[a+8>>2]-q[a+12>>2]>>4;Hn(a,130843,b);rj(a,-1e4,q[210396]);Xi(a,q[b+16>>2]);b=q[b+32>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=8;q[b>>2]=a;q[a+8>>2]=q[a+8>>2]+16;if(q[q[a+16>>2]+112>>2]==(a|0)){Ri(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}Rk(a,3,0);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(129410,129431,1380,130845);G()}}function xs(a,b){var c=0,d=0,e=0;c=q[a+4>>2];while(1){d=c;if(c){c=d-1|0;if(!q[q[a+8>>2]+(c<<2)>>2]){continue}}break}c=q[b+4>>2];while(1){e=c;if(c){c=e-1|0;if(!q[q[b+8>>2]+(c<<2)>>2]){continue}}break}if(!(d|e)){return 0}if(d>>>0>e>>>0){return 1}if(d>>>0>=e>>>0){while(1){if(!d){return 0}d=d-1|0;c=d<<2;e=q[c+q[a+8>>2]>>2];c=q[c+q[b+8>>2]>>2];if(e>>>0>c>>>0){return 1}if(c>>>0<=e>>>0){continue}break}}return-1}function qja(a){a=a|0;var b=0,c=0;b=$i(44);q[b+4>>2]=0;q[b+8>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b>>2]=q[a+20>>2];c=FL(q[a+4>>2],q[a>>2],b);if(!c){q[q[a+24>>2]+8>>2]=b;return c|0}gB(q[a>>2],b);a:{if(o[b+40|0]&1){break a}a=q[b+28>>2];if(!a){break a}Ni(a)}b:{if(o[b+24|0]&1){break b}a=q[b+12>>2];if(!a){break b}Ni(a)}Ni(b);return c|0}function Jka(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=x(0),g=x(0),h=x(0),i=x(0);e=Ii+ -64|0;Ii=e;u[e+48>>2]=u[b>>2];u[e+52>>2]=u[b+4>>2];u[e+56>>2]=u[b+8>>2];u[e+32>>2]=u[c>>2];u[e+36>>2]=u[c+4>>2];u[e+40>>2]=u[c+8>>2];f=u[d>>2];u[e+16>>2]=f;g=u[d+4>>2];u[e+20>>2]=g;h=u[d+8>>2];u[e+24>>2]=h;i=u[d+12>>2];u[e+12>>2]=i;u[e+8>>2]=h;u[e+4>>2]=g;u[e>>2]=f;u[e+28>>2]=i;GH(a,e+48|0,e+32|0,e+16|0,e);Ii=e- -64|0}function HQ(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;g=1;e=r[b|0];if((d|0)==1){b=(r[c|0]+w(e,3)|0)+2>>>2|0;o[a|0]=b;o[a+1|0]=b;return a|0}e=r[c|0]+w(e,3)|0;f=e+2>>>2|0;o[a|0]=f;i=((d<<1)+a|0)-1|0;if((d|0)>=2){while(1){h=(g<<1)+a|0;f=r[c+g|0]+w(r[b+g|0],3)|0;o[h-1|0]=(f+w(e,3)|0)+8>>>4;o[h|0]=(w(f,3)+e|0)+8>>>4;e=f;g=g+1|0;if((g|0)!=(d|0)){continue}break}f=e+2>>>2|0}o[i|0]=f;return a|0}function kp(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=q[a+32>>2];q[a+32>>2]=-1;f=fl(a,2147450902,q[q[a+12>>2]+8>>2]);if((e|0)!=-1){if((f|0)==-1){return e}c=q[q[a>>2]+12>>2];b=f;while(1){d=b;g=(b<<2)+c|0;h=q[g>>2];b=(h>>>14|0)-131071|0;b=(b|0)==-1?-1:(d+b|0)+1|0;if((b|0)!=-1){continue}break}b=g;c=(d^-1)+e|0;d=c>>31;if((d^c+d)>=131072){Sj(q[a+12>>2],141849);h=q[g>>2]}q[b>>2]=(h&16383|c<<14)+2147467264}return f}function Xp(a){var b=0,c=0,d=0;d=q[a+36>>2];if(!d){return-28928}c=q[a+216>>2];a:{if(!c){break a}b=Mi[d|0](q[a+48>>2],q[a+192>>2]-c|0,c)|0;if((b|0)<1){break a}while(1){c=q[a+216>>2];if(c>>>0>>0){return-27648}b=c-b|0;q[a+216>>2]=b;if(b){b=Mi[q[a+36>>2]](q[a+48>>2],q[a+192>>2]-b|0,b)|0;if((b|0)>=1){continue}break a}break}b=q[a+184>>2];q[a+192>>2]=q[q[a>>2]+184>>2]&2?b:b+8|0;fs(a,q[a+76>>2]);b=0}return b}function Sva(a,b,c){var d=0;a:{b:{c:{d:{if(b>>>0<=c>>>0){if(q[a>>2]+q[a+4>>2]>>>0>>0|t[a>>2]>b>>>0){break d}if(q[a>>2]+q[a+4>>2]>>>0>>0|t[a>>2]>c>>>0){break c}d=b-q[a>>2]|0;if((d|0)<=-1){break b}b=c-b|0;if((b|0)<=-1){break a}Rva(a,d,b);return}J(106453,106468,782,106512);G()}J(106518,106468,783,106512);G()}J(106555,106468,784,106512);G()}J(96993,106468,789,106512);G()}J(96993,106468,796,106512);G()}function Poa(a,b,c,d,e){q[b+20>>2]=e;q[b+16>>2]=d;q[b+12>>2]=c;d=q[b+24>>2];c=q[b+4>>2];if(!c){c=q[b>>2]}a:{b:{if(!(o[c+8|0]&1)){break b}if(d&1){Pi(4,39489,39549,0);break a}if(q[c>>2]){break b}e=b;d=0;c:{if(!a){break c}a=q[a>>2];if(!a){break c}d=q[a>>2]}a=mH(d,q[c+4>>2]);q[e+8>>2]=a;if(!a){break a}q[b+24>>2]=q[b+24>>2]|1;return 1}q[b+24>>2]=d|1;return 1}q[b+20>>2]=-2;q[b+12>>2]=-2;q[b+16>>2]=-2;return 0}function LR(a,b,c){var d=0,e=0,f=0;a:{b:{d=q[q[a>>2]+144>>2];if(!d){break b}if(c>>>0<=3){break a}f=r[b+1|0]|r[b|0]<<8;if((f|0)!=(c-2|0)){break a}e=r[b+2|0];if((e|0)==(f-1|0)){c=q[d>>2];if(c){b=b+3|0;while(1){c:{if((hj(c)|0)!=(e|0)){break c}if(Ej(b,c,e)){break c}q[a+240>>2]=c;return 0}c=q[d+4>>2];d=d+4|0;if(c){continue}break}}break b}Xj(a,2,50);return-31104}Xj(a,2,40);return-31104}Xj(a,2,50);return-31104}function lea(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}e=a+w(d,592)|0;if(s[e+570>>1]!=(b&65535)){break a}if((q[e+412>>2]&240)==80){a=a+w(d,592)|0;b=q[a+540>>2];q[c>>2]=q[a+536>>2];q[c+4>>2]=b;a=0}else{a=-10}return a}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function $q(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-32|0;Ii=e;a:{if(c){f=Tl(a,b,c,0);break a}f=uj(a,b,0);if(f){break a}g=q[64212];f=e;c=Vi(a,b);h=140583;b:{if((c|0)==-1){break b}h=q[(c<<2)+256832>>2]}q[f+20>>2]=h;q[e+16>>2]=g;dk(a,b,Lj(a,143231,e+16|0));f=0}g=q[d>>2];c:{if(g){c=0;while(1){if(!dj(g,f)){break c}c=c+1|0;g=q[(c<<2)+d>>2];if(g){continue}break}}q[e>>2]=f;c=dk(a,b,Lj(a,143263,e))}Ii=e+32|0;return c}function z5(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{f=q[a+80>>2];e=q[f+4>>2];if(e){while(1){if(d>>>0>=e>>>0){break a}g=q[f>>2];h=g+(d<<6)|0;if((b|0)==q[h+48>>2]&q[h+52>>2]==(c|0)){q[a+168>>2]=b;q[a+172>>2]=c;q[a+160>>2]=(d<<6)+g;o[a+186|0]=r[a+186|0]|8;return 0}d=d+1|0;if(e>>>0>d>>>0){continue}break}}q[a+168>>2]=0;q[a+172>>2]=0;q[a+160>>2]=0;o[a+186|0]=r[a+186|0]&247;return 1}J(152522,152534,325,152554);G()}function twa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{if(c>>>0<=64){if(c){break a}Li=0;return 0}J(107762,96899,12130,107778);G()}e=q[b>>2];while(1){d=q[b>>2];f=r[(d>>>3|0)+a|0];h=d;d=c-i|0;g=e&7;e=8-g|0;j=(d|0)<(e|0)?d:e;e=h+j|0;q[b>>2]=e;g=(-1<>>g;d=i;f=d&31;if((d&63)>>>0>=32){d=g<>>32-f;h=g<>>0>>0){continue}break}Li=l;return k}function ir(a,b){var c=0;c=yj(a,64);u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];u[c+16>>2]=u[b+16>>2];u[c+20>>2]=u[b+20>>2];u[c+24>>2]=u[b+24>>2];u[c+28>>2]=u[b+28>>2];u[c+32>>2]=u[b+32>>2];u[c+36>>2]=u[b+36>>2];u[c+40>>2]=u[b+40>>2];u[c+44>>2]=u[b+44>>2];u[c+48>>2]=u[b+48>>2];u[c+52>>2]=u[b+52>>2];u[c+56>>2]=u[b+56>>2];u[c+60>>2]=u[b+60>>2];Zi(a,-1e4,134048);xj(a,-2)}function Gza(a,b,c){var d=0,e=0,f=0,g=0;g=c&63;f=g;d=f&31;if(f>>>0>=32){d=-1>>>d|0}else{e=-1>>>d|0;d=(1<>>d}f=d&a;d=b&e;e=g&31;if(g>>>0>=32){d=f<>>32-e|d<>>0>=32){d=-1<>>32-c|-1<>>0>=32){c=0;a=d>>>b|0}else{c=d>>>b|0;a=((1<>>b}a=a|g;Li=c|f;return a}function eaa(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-16|0;Ii=f;g=q[213144];Gj(g);a:{h=q[213143];if(!h){q[f+8>>2]=32;q[f+12>>2]=10;if(cN(f+8|0)){break a}h=q[213143]}Bj(g);q[a+104>>2]=h;g=-1;if(!bua(h,b,c,d,e,a+108|0,q[a>>2]+2128|0)){q[a+112>>2]=_ta(q[a+104>>2],q[a+108>>2]);q[a+116>>2]=$ta(q[a+104>>2],q[a+108>>2]);pG(q[a+112>>2],5e5,0);qG(q[a+112>>2],5e5,0);g=0}Ii=f+16|0;return g}J(168179,168212,83,168240);G()}function Uka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-80|0;Ii=b;e=nj(b+24|0,a,0,73366,1213);d=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,d,73150,b+20|0,b+48|0,b+16|0);d=$j(a,2);c=Li;f=c;Iz(a,3);if(!Dl(q[b+16>>2],d,c,1)){q[b>>2]=aj(d,f);g=Qi(a,75638,b)}mj(e);Ii=b+80|0;return g|0}function E6(a,b,c,d,e){var f=0,g=0,h=0;g=Ii-16|0;Ii=g;f=$i(24);q[f>>2]=0;q[f+4>>2]=0;q[f+16>>2]=0;q[f+20>>2]=0;q[f+8>>2]=0;q[f+12>>2]=0;q[e>>2]=f;o[f+20|0]=1;e=q[a>>2];e=e<<8&16711680|e<<24|(e>>>8&65280|e>>>24);a:{if((e|0)!=5){q[g+4>>2]=e;q[g>>2]=5;Pi(4,31176,31185,g);h=-1;break a}e=Ui($i(1048),0,1048);q[f+8>>2]=e;o[e+1044|0]=1;q[e+1040>>2]=d;q[e+1036>>2]=c;q[f+16>>2]=b;q[f+4>>2]=a}Ii=g+16|0;return h}function Bfa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;a=0;d=Ui($i(208),0,208);if(r[b+192|0]){while(1){a=w(e,24);c=a+b|0;f=q[c+4>>2];g=q[c>>2];a=a+d|0;p[a+10>>1]=65535;p[a+8>>1]=e;q[a>>2]=g;q[a+4>>2]=f;f=q[c+12>>2];p[a+12>>1]=f;g=q[c+16>>2];q[a+16>>2]=g;c=r[c+20|0];p[a+14>>1]=h;o[a+20|0]=c;h=w(xt(g),f)+h|0;p[d+194>>1]=h;a=r[b+192|0];e=e+1|0;if(a>>>0>e>>>0){continue}break}}p[d+192>>1]=a;return d|0}function rL(a){var b=0;b=q[a+4>>2];if(b){Ni(b)}b=q[a+8>>2];if(b){Ni(b)}b=q[a+12>>2];if(b){Ni(b)}b=q[a+16>>2];if(b){Ni(b)}b=q[a+20>>2];if(b){Ni(b)}b=q[a+24>>2];if(b){Ni(b)}b=q[a+28>>2];if(b){Ni(b)}b=q[a+32>>2];if(b){Ni(b)}b=q[a+36>>2];if(b){Ni(b)}b=q[a+40>>2];if(b){Ni(b)}b=q[a+44>>2];if(b){Ni(b)}b=q[a+48>>2];if(b){Ni(b)}b=q[a+52>>2];if(b){Ni(b)}b=q[a+56>>2];if(b){Ni(b)}b=q[a+60>>2];if(b){Ni(b)}Ni(a)}function Zqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=q[a+20>>2];c=q[a+4>>2];b=$i(24);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;c=zM(q[a>>2],c,d,b,q[a+8>>2]);if(!c){q[q[a+24>>2]+8>>2]=b;Aj(d);return c|0}e=q[a>>2];if(q[b+4>>2]){a=0;while(1){f=q[b>>2]+w(a,96)|0;cj(e,q[f+24>>2]);um(q[f+88>>2]);a=a+1|0;if(a>>>0>2]){continue}break}}Dp(e,b+8|0);wB(b);Ni(b);Aj(d);return c|0}function Aia(a){a=a|0;var b=0,c=0,d=0;b=$i(44);q[b>>2]=0;q[b+4>>2]=0;q[b+40>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;c=QL(q[a>>2],q[a+20>>2],b,0);if(!c){d=q[a+24>>2];q[d+8>>2]=b;q[d+16>>2]=((q[a+16>>2]+q[b+16>>2]|0)-q[b+8>>2]|0)+44;return c|0}iw(q[a>>2],b);a:{if(o[b+20|0]&1){break a}a=q[b+8>>2];if(!a){break a}Ni(a)}Ni(b);return c|0}function xK(a,b,c,d,e,f,g){var h=0,i=0;h=Ii-16|0;Ii=h;i=-4;if(q[a+152>>2]!=((q[a+144>>2]-q[a+136>>2]|0)/24|0)){q[h+4>>2]=e;q[h>>2]=d;q[h+8>>2]=f&65535|g<<16;$I(a+128|0,b,c,h);g=q[a+32>>2];f=q[a+36>>2]-g|0;a=(f|0)/592|0;if(f){i=a>>>0>1?a:1;a=0;while(1){f=g+w(a,592)|0;if(q[f+424>>2]==(b|0)&q[f+428>>2]==(c|0)){q[f+436>>2]=e;q[f+432>>2]=d}a=a+1|0;if((i|0)!=(a|0)){continue}break}}i=0}Ii=h+16|0;return i}function kz(a){var b=0,c=0,d=0,e=0,f=0,g=0;c=q[q[239672]+16>>2];if(c){Gj(c)}b=s[a+24>>1]-1|0;p[a+24>>1]=b;a:{b:{if(!(b&65535)){b=q[a+8>>2];if(b){Ni(b)}b=q[239672];e=q[b+64>>2];if(!e){break b}d=s[b+70>>1];if(!d|s[b+68>>1]>>0){break a}f=s[a+16>>1];g=b;b=d-1|0;p[g+70>>1]=b;p[((b&65535)<<1)+e>>1]=f;p[a+16>>1]=65535}if(c){Bj(c)}return 0}J(211026,210953,140,211057);G()}J(211062,210953,141,211057);G()}function hP(a,b,c,d){var e=0,f=0,g=0;g=Ii-16|0;Ii=g;q[c>>2]=0;q[d>>2]=0;e=hk(a,b,g+12|0,48);a:{if(e){f=e-9472|0;break a}if(q[a>>2]==(b|0)){break a}e=VE(a,b,c);b:{if(!e){break b}if((e|0)==-98){e=Xq(a,b,c)}if(e){f=e-9472|0;break a}if(!q[c>>2]){break b}q[c>>2]=1}if(q[a>>2]==(b|0)){break a}c=Xq(a,b,d);if(c){f=c-9472|0;break a}f=-9574;if(q[a>>2]!=(b|0)){break a}q[d>>2]=q[d>>2]+1;f=0}Ii=g+16|0;return f}function TM(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=q[a+8>>2];l=q[a+4>>2];a:{while(1){d=c>>>0>=l>>>0;e=!f&(h|0)==10;if(d|!f&(h|0)==10){break a}e=c+1|0;q[a+8>>2]=e;i=r[c|0];d=i&127;g=Aza(h,f,7,0);c=g&31;if((g&63)>>>0>=32){g=d<>>32-c;c=d<>>0<1?f+1|0:f;h=c;c=e;if(i&128){continue}break}d=0;e=0}a=e|d;if(!a){q[b>>2]=j;q[b+4>>2]=k}return a^1}function P_(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;e=1;d=kj(a,1,0);b=Tl(a,2,145877,0);f=yj(a,4);q[f>>2]=0;Zi(a,-1e4,145545);xj(a,-2);b=dl(d,b);q[f>>2]=b;if(!b){e=q[240513];b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=ql(e);a:{if(d){q[c+20>>2]=b;q[c+16>>2]=d;Lj(a,145654,c+16|0);break a}q[c>>2]=b;Lj(a,145661,c)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;e=3}Ii=c+32|0;return e|0}function H2(a){a=a|0;var b=0,c=x(0),d=0,e=x(0),f=x(0),g=0,h=x(0);d=Ii-32|0;Ii=d;b=_i(a,1,q[210436],0);c=u[b>>2];f=u[b+4>>2];a:{if(!(c!=c|f!=f)){e=u[b+8>>2];if(e==e){break a}}e=u[b+8>>2];v[d+16>>3]=f;v[d+24>>3]=e;v[d+8>>3]=c;q[d>>2]=1;Qi(a,134131,d)}g=fj(a,2);c=u[b+8>>2];f=u[b>>2];e=u[b+4>>2];b=yj(a,16);h=c;c=x(g);u[b+8>>2]=h/c;u[b+4>>2]=e/c;u[b>>2]=f/c;Zi(a,-1e4,134e3);xj(a,-2);Ii=d+32|0;return 1}function xja(a){a=a|0;var b=0,c=0,d=0;b=Ii-112|0;Ii=b;d=-2;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[62810],b+108|0)){break a}c=q[b+108>>2];if(!r[q[c>>2]]){Aj(c);d=-13;break a}q[b>>2]=0;q[b+4>>2]=0;d=JL(q[a>>2],c,b);if(!d){c=q[q[a+32>>2]+8>>2];hw(q[a>>2],c+4|0);cj(q[a>>2],q[q[c>>2]+12>>2]);cj(q[a>>2],q[q[c>>2]+8>>2]);q[q[c>>2]+132>>2]=0;YK(q[a+16>>2],c,b,q[b+108>>2])}Aj(q[b+108>>2])}Ii=b+112|0;return d|0}function oka(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;f=$i(32);d=f;q[d+24>>2]=0;q[d+28>>2]=0;q[d>>2]=0;q[d+4>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;d=d+8|0;q[d>>2]=0;q[d+4>>2]=0;o[f+28|0]=3;q[f>>2]=Oi(b);q[f+4>>2]=Li;a:{b:{if(yv(a,b,e+12|0,e+8|0)){g=-3;a=59462;break b}a=Qj(q[e+12>>2],q[e+8>>2],q[57198],d);Ni(q[e+12>>2]);if(!a){break a}g=-2;a=59503}q[e>>2]=b;Pi(4,59454,a,e)}q[c>>2]=f;Ii=e+16|0;return g}function o5(a){var b=0,c=0,d=0,e=0;b=q[a+12>>2];a:{if(!b){b=0;break a}e=q[a+4>>2];while(1){c=q[q[a+8>>2]+(d<<2)>>2];if((c|0)!=-1){while(1){b=q[a+16>>2]+(c<<5)|0;c=q[b+20>>2];if(c){cj(e,c)}Ni(q[b+8>>2]);Ni(q[b+16>>2]);Ni(q[b+24>>2]);c=q[b+28>>2];if((c|0)!=-1){continue}break}b=q[a+12>>2]}d=d+1|0;if(d>>>0>>0){continue}break}}Ui(q[a+8>>2],255,b<<2);q[a+28>>2]=-1;q[a+32>>2]=0;q[a+20>>2]=q[a+16>>2]}function ct(a,b,c){var d=0,e=0;d=Ii-48|0;Ii=d;a:{if((Vi(a,b)|0)==4){q[d+44>>2]=0;e=uj(a,b,d+44|0);a=q[d+44>>2];b=a>>>0<128;o[Ti(c,e,b?a:128)+(b?a:127)|0]=0;break a}if(Ck(a,b,q[79307])){a=qj(a,b);b=tt(q[a>>2],q[a+4>>2]);if(b){q[d+32>>2]=b;sj(c,128,125388,d+32|0);break a}b=q[a+4>>2];q[d+16>>2]=q[a>>2];q[d+20>>2]=b;sj(c,128,125391,d+16|0);break a}q[d>>2]=125396;sj(c,128,125388,d)}Ii=d+48|0;return c}function Mq(a){var b=0,c=0;b=Ii-16|0;Ii=b;Oza(+a);c=Lza(1)|0;Lza(0)|0;c=c&2147483647;a:{if(c>>>0<=1072243195){if(c>>>0<1045430272){break a}a=du(a,0,0);break a}if(c>>>0>=2146435072){a=a-a;break a}b:{switch(rC(a,b)&3){case 0:a=du(v[b>>3],v[b+8>>3],1);break a;case 1:a=fu(v[b>>3],v[b+8>>3]);break a;case 2:a=-du(v[b>>3],v[b+8>>3],1);break a;default:break b}}a=-fu(v[b>>3],v[b+8>>3])}Ii=b+16|0;return a}function t_(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;d=kj(a,1,0);c=gk(d,46);a:{if(!c){break a}bj(a,d,c-d|0);f=1;c=az(a,uj(a,-1,0),144640);if(!c){break a}e=gk(d,45);q[b+32>>2]=ip(a,e?e+1|0:d,144941,145041);Lj(a,145043,b+32|0);ll(a,-2);if((Oy(a,c)|0)!=2){e=uj(a,1,0);q[b+24>>2]=uj(a,-1,0);q[b+20>>2]=c;q[b+16>>2]=e;Qi(a,144995,b+16|0)}q[b+4>>2]=c;q[b>>2]=d;Lj(a,145054,b)}Ii=b+48|0;return f|0}function Oxa(a,b){var c=0;a:{b:{if((a^b)&3){break b}if(b&3){while(1){c=r[b|0];o[a|0]=c;if(!c){break a}a=a+1|0;b=b+1|0;if(b&3){continue}break}}c=q[b>>2];if((c^-1)&c-16843009&-2139062144){break b}while(1){q[a>>2]=c;c=q[b+4>>2];a=a+4|0;b=b+4|0;if(!(c-16843009&(c^-1)&-2139062144)){continue}break}}c=r[b|0];o[a|0]=c;if(!c){break a}while(1){c=r[b+1|0];o[a+1|0]=c;a=a+1|0;b=b+1|0;if(c){continue}break}}}function Wka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-80|0;Ii=b;e=nj(b+24|0,a,0,73366,1152);d=q[q[jk(a)+80>>2]+8>>2];q[b+20>>2]=0;q[b+16>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;Ml(a,1,d,73150,b+20|0,b+48|0,b+16|0);d=$j(a,2);c=Li;f=c;if(!Dl(q[b+16>>2],d,c,1)){q[b>>2]=aj(d,f);g=Qi(a,75638,b)}mj(e);Ii=b+80|0;return g|0}function Io(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;if(b){if(q[c>>2]){e=c;while(1){f=f+1|0;g=q[e+8>>2];e=e+8|0;if(g){continue}break}}Uu(a,-1e4,143318,1);Zi(a,-1,b);if((Vi(a,-1)|0)!=5){Ri(a,-2);if(Uu(a,-10002,b,f)){q[d>>2]=b;Qi(a,143326,d)}ej(a,-1);Si(a,-3,b)}ll(a,-2);xk(a,-1)}if(q[c>>2]){while(1){qk(a,q[c+4>>2],0);Si(a,-2,q[c>>2]);b=q[c+8>>2];c=c+8|0;if(b){continue}break}}Ri(a,-1);Ii=d+16|0}function Ila(a){a=a|0;var b=0,c=0,d=0;b=Ii-96|0;Ii=b;d=nj(b+72|0,a,1,71372,369);jk(a);c=b- -64|0;q[c>>2]=0;q[c+4>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;Gk(a,1,b+40|0,b+8|0);q[b+4>>2]=0;lM(a,b+4|0);Xi(a,q[q[b+4>>2]+240>>2]);mj(d);Ii=b+96|0;return 1}function wma(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[q[a+24>>2]>>2];c=q[a+16>>2];d=q[a+20>>2];if((c|0)==q[73540]&(d|0)==q[73541]){return Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[73522],q[73523],b+148|0)|0}if((c|0)==q[73562]&(d|0)==q[73563]){return Qm(q[q[q[a+8>>2]+80>>2]>>2],a+32|0,q[73530],q[73531],b+152|0)|0}e=q[b+148>>2];if(!e){e=q[q[b+156>>2]+24>>2]}return Bp(q[e>>2],c,d,a+32|0,q[a+104>>2],248,b)|0}function Vqa(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[57366],d+12|0)){b=q[d+12>>2];c=q[b+24>>2];a:{if(c){yB(q[b+12>>2],q[b+16>>2],q[b+20>>2],c);b=q[d+12>>2];break a}if(q[b+16>>2]){break a}c=q[b+32>>2];q[b+12>>2]=q[b+28>>2];q[b+16>>2]=c}c=$i(4);q[c>>2]=b;e=q[a+24>>2];q[e+8>>2]=c;q[e+16>>2]=(q[a+16>>2]-q[b+4>>2]|0)+4;b=0}Ii=d+16|0;return b|0}function cH(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-16|0;Ii=c;f=a+2196|0;d=q[q[q[a+2188>>2]+8>>2]+32>>2];b=d<<1;MI(f,b>>>0<3?1:(b>>>0)/3|0,d);g=q[(q[q[q[a+2188>>2]+8>>2]>>2]<<2)+30880>>2]>>>3|0;if(d){h=c+8|4;b=0;while(1){e=q[q[q[a+2188>>2]+8>>2]+28>>2]+w(b,48)|0;q[c+8>>2]=e;if(!Oz(q[a+2192>>2],q[e>>2],g,h)){NI(f,q[e+16>>2],q[e+20>>2],c+8|0)}b=b+1|0;if((d|0)!=(b|0)){continue}break}}Ii=c+16|0}function YT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[b>>2];q[c+12>>2]=8;b=1;a:{if((io(d,1,13,c,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);b=2;break a}vj(a,0,0);d=q[c>>2];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(d|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,137306);d=q[c+4>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,137337)}Ii=c+16|0;return b|0}function Hta(){var a=0,b=0,c=0;a=Ii-32|0;Ii=a;c=r[266420];o[266420]=1;q[a+16>>2]=420;b=gU(a+16|0);a:{if((b|0)!=-1){q[a+24>>2]=2;q[a+28>>2]=50376;if((ex(b,a+24|0,8)|0)==8){if((ex(b,855716,50376)|0)==50376){q[a>>2]=956480;Pi(2,209335,209341,a);Qr(b);break a}Pi(4,209335,209382,0);Qr(b);lu(956480);break a}Pi(4,209335,209417,0);Qr(b);lu(956480);break a}Pi(4,209335,209451,0)}o[266420]=c;Ii=a+32|0}function upa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+4>>2];d=q[b+4>>2];c=q[b>>2];if((d|0)!=(c|0)){g=q[q[a>>2]>>2];a=0;while(1){f=(a<<7)+c|0;e=q[f+36>>2];if(e){if(o[f+58|0]&1){Jt(e)}cj(g,e);c=q[b>>2];d=q[b+4>>2]}a=a+1|0;if(a>>>0>7>>>0){continue}break}}a:{if(o[b+28|0]&1){break a}a=q[b+16>>2];if(!a){break a}Ni(a)}b:{if(o[b+12|0]&1){break b}a=q[b>>2];if(!a){break b}Ni(a)}Ni(b);return 0}function hU(a){var b=0;a:{if(!a){break a}b:{c:{switch(q[a+4>>2]-3|0){case 0:if(!Ej(156901,q[a+8>>2],3)){b=263824;break a}if(!Ej(156946,q[a+8>>2],3)){return 263844}if(!Ej(156975,q[a+8>>2],3)){return 263864}if(Ej(157016,q[a+8>>2],3)){break b}return 263884;case 6:break c;default:break a}}if(Ej(157058,q[a+8>>2],9)){break a}return 263904}if(Ej(157115,q[a+8>>2],3)){break a}return 263924}return b}function dm(a,b,c,d){var e=0,f=0,g=0;a:{b:{if(c>>>0>32){break b}e=b;g=c&31;if((c&63)>>>0>=32){e=0}else{e=e>>>g|0}if(e|f){break b}e=q[d>>2];if(c){while(1){f=q[d>>2];g=(f>>>3|0)+a|0;o[g|0]=r[g|0]|b<<(f&7);e=8-(e&7)|0;f=c>>>0>e>>>0?e:c;e=f+q[d>>2]|0;q[d>>2]=e;b=b>>>f|0;c=c-f|0;if(c){continue}break}}if(e>>>0>=129){break a}return}J(107137,96899,11546,107184);G()}J(107203,96899,11555,107184);G()}function cxa(a,b,c){var d=0,e=0,f=0;e=Ii-32|0;Ii=e;d=e+8|0;q[d>>2]=0;q[d+4>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;a:{if(!Zw(d,b,c)){break a}b=a+28|0;if(!$o(d,b)|!q[b+4>>2]){break a}b=a- -64|0;if(!$o(d,b)|!q[b+4>>2]){break a}b=a+100|0;if(!$o(d,b)|!q[b+4>>2]){break a}b=a+136|0;if(!$o(d,b)|!q[b+4>>2]){break a}b=a;a=Yl(d,13);q[b+172>>2]=a;if(!a){break a}f=1}Ii=e+32|0;return f}function _na(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=q[a+80>>2];c=b+8|0;e=b+4|0;f=q[a+76>>2];a:{b:{d=q[b+4>>2];if((d|0)==q[b+8>>2]){if(o[b+12|0]&1){break b}Wi((d-q[b>>2]>>2)+16|0,4,b,c,e)}b=$i(16);d=q[a>>2];p[b+8>>1]=65535;q[b+4>>2]=f;q[b>>2]=d;d=q[c>>2];c=q[e>>2];if((d|0)==(c|0)){break a}q[e>>2]=c+4;q[c>>2]=b;q[q[a+88>>2]>>2]=b;return 0}J(52314,52389,493,52445);G()}J(52457,52389,533,52481);G()}function ZX(a,b,c,d,e,f,g){var h=0,i=0;h=q[d>>2];if(h>>>0<=15){a:{if(b){if(!c){break a}while(1){c=c-1|0;if(!h){Km(a,1,e,e)}b=e+h|0;i=r[f|0]^r[b|0];o[g|0]=i;o[b|0]=i;g=g+1|0;f=f+1|0;h=h+1&15;if(c){continue}break}break a}if(!c){break a}while(1){c=c-1|0;if(!h){Km(a,1,e,e)}i=r[f|0];b=e+h|0;o[g|0]=i^r[b|0];o[b|0]=i;g=g+1|0;f=f+1|0;h=h+1&15;if(c){continue}break}}q[d>>2]=h;a=0}else{a=-33}return a}function Bma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=$i(64);q[b+4>>2]=0;q[b+8>>2]=0;q[b+52>>2]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;d=b+12|0;q[d>>2]=0;q[d+4>>2]=0;e=q[a>>2];q[b>>2]=q[e>>2];c=q[a+16>>2];f=q[e+4>>2];c=c>>>0>>0?c:f;q[b+56>>2]=c;q[b+60>>2]=q[e+8>>2];Wi(c,4,b+4|0,d,b+8|0);q[b+36>>2]=0;q[q[a+12>>2]>>2]=b;return 0}function sC(a,b,c){var d=0,e=0,f=0;f=q[c+16>>2];a:{if(f){d=f}else{if(fO(c)){break a}d=q[c+16>>2]}f=q[c+20>>2];if(d-f>>>0>>0){return Mi[q[c+36>>2]](c,a,b)|0}b:{if(o[c+75|0]<0){break b}d=b;while(1){e=d;if(!e){e=0;break b}d=e-1|0;if(r[d+a|0]!=10){continue}break}d=Mi[q[c+36>>2]](c,a,e)|0;if(d>>>0>>0){break a}a=a+e|0;b=b-e|0;f=q[c+20>>2]}Ti(f,a,b);q[c+20>>2]=q[c+20>>2]+b;d=b+e|0}return d}function q9(a,b){var c=0;a:{b:{if(q[a+8>>2]-q[a>>2]>>2>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,4,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(152887,152778,76,152718);G()}J(152730,152587,506,152749);G()}J(152643,152587,493,152718);G()}function jwa(a,b,c){var d=0,e=0;d=Ii-224|0;Ii=d;e=a;a=d+72|0;e=Tn(e,a,0,1);a:{if(!e){break a}if(q[a+104>>2]==8){p[b>>1]=r[(a+c|0)+112|0]|3328;a=r[105956]|r[105957]<<8|(r[105958]<<16|r[105959]<<24);o[b+2|0]=a;o[b+3|0]=a>>>8;o[b+4|0]=a>>>16;o[b+5|0]=a>>>24;a=r[105960]|r[105961]<<8;o[b+6|0]=a;o[b+7|0]=a>>>8;break a}Zo(a,d);if((c|0)==3){Tw(a,d,b);break a}Mi[760](b,c+d|0,4)}Ii=d+224|0;return e}function eM(a){var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;if(a){a:{b=q[a+29088>>2];c=q[a+29084>>2];d=b-c|0;if(!d){break a}if((b|0)!=(c|0)){d=d>>2;b=0;while(1){c=q[(b<<2)+c>>2];b:{if(r[c+3272|0]&2){Nr(c);d=d-1|0;break b}b=b+1|0}if(b>>>0>=d>>>0){break a}c=q[a+29084>>2];if(q[a+29088>>2]-c>>2>>>0>b>>>0){continue}break}}J(12419,9962,479,9454);G()}Ii=e+16|0;return}J(8915,7192,2800,8926);G()}function YN(a){var b=0;Wwa(a+176|0);b=q[a+160>>2];if(b){Ni(b)}b=q[a+148>>2];if(b){Ni(b)}b=q[a+136>>2];if(b){Ni(b)}b=q[a+124>>2];if(b){Ni(b)}b=q[a+112>>2];if(b){Ni(b)}b=q[a+100>>2];if(b){Ni(b)}b=q[a+88>>2];if(b){Ni(b)}b=q[a+76>>2];if(b){Ni(b)}b=q[a+64>>2];if(b){Ni(b)}b=q[a+52>>2];if(b){Ni(b)}b=q[a+40>>2];if(b){Ni(b)}b=q[a+28>>2];if(b){Ni(b)}b=q[a+16>>2];if(b){Ni(b)}a=q[a+4>>2];if(a){Ni(a)}}function xta(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c=q[a+8>>2];i=q[a+4>>2];a:{while(1){d=!g&(h|0)==10;e=c>>>0>=i>>>0;if(d|c>>>0>=i>>>0){break a}e=c+1|0;q[a+8>>2]=e;j=r[c|0];d=j&127;f=Aza(h,g,7,0);c=f&31;if((f&63)>>>0>=32){f=d<>>32-c;c=d<>>0<1?g+1|0:g;h=c;c=e;if(j&128){continue}break}q[b>>2]=k;q[b+4>>2]=l;d=0;e=0}return(e|d)^1}function sha(a){a=a|0;var b=0,c=0,d=0;b=Ii-96|0;Ii=b;c=nj(b+72|0,a,0,79890,580);d=jk(a);q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Gk(a,1,b+32|0,b);a=q[58811];vk(b,b+32|0,q[a+8>>2],q[a+12>>2],d,a,b+71|0,1);mj(c);Ii=b+96|0;return 0}function hra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{c=q[a+16>>2];b=q[c+4>>2];b:{if(!b){break b}e=q[a+8>>2];f=q[a+12>>2];b=q[q[c>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break b}c=q[c+8>>2];while(1){d=c+(b<<4)|0;if(q[d>>2]==(e|0)&(f|0)==q[d+4>>2]){break a}b=q[d+12>>2];if((b|0)!=-1){continue}break}}J(19878,19886,360,19923);G()}return Dk(q[a>>2],q[a+4>>2],q[(c+(b<<4)|0)+8>>2],101,102,0,103,104)|0}function gra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{c=q[a+16>>2];b=q[c+4>>2];b:{if(!b){break b}e=q[a+8>>2];f=q[a+12>>2];b=q[q[c>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break b}c=q[c+8>>2];while(1){d=c+(b<<4)|0;if(q[d>>2]==(e|0)&(f|0)==q[d+4>>2]){break a}b=q[d+12>>2];if((b|0)!=-1){continue}break}}J(20580,20588,219,20625);G()}return Dk(q[a>>2],q[a+4>>2],q[(c+(b<<4)|0)+8>>2],106,107,0,108,109)|0}function era(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{c=q[a+16>>2];b=q[c+4>>2];b:{if(!b){break b}e=q[a+8>>2];f=q[a+12>>2];b=q[q[c>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break b}c=q[c+8>>2];while(1){d=c+(b<<4)|0;if(q[d>>2]==(e|0)&(f|0)==q[d+4>>2]){break a}b=q[d+12>>2];if((b|0)!=-1){continue}break}}J(21044,21052,138,21085);G()}return Dk(q[a>>2],q[a+4>>2],q[(c+(b<<4)|0)+8>>2],115,116,0,117,118)|0}function Yk(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-80|0;Ii=d;q[d+12>>2]=c;g=Su(a,b,c);b=q[a+20>>2];c=q[b+4>>2];if(!(q[c+8>>2]!=6|r[q[c>>2]+6|0])){e=b;b=q[a+24>>2];q[e+12>>2]=b;c=q[q[c>>2]+16>>2];b=b-q[c+12>>2]|0;e=-1;a:{if((b|0)<4){break a}f=q[c+20>>2];e=0;if(!f){break a}e=q[f+((b>>2)-1<<2)>>2]}b=e;Xk(d+16|0,q[c+32>>2]+16|0,60);q[d+8>>2]=g;q[d+4>>2]=b;q[d>>2]=d+16;oj(a,140836,d)}pF(a);Ii=d+80|0}function QA(a,b,c){var d=0,e=0;e=s[c+570>>1]|s[c+568>>1]<<16;lk(a,q[c+560>>2],q[c+564>>2]);d=yj(a,8);q[d+4>>2]=e;q[d>>2]=b;Zi(a,-1e4,202300);xj(a,-2);Ij(a,-3);a:{c=s[c+578>>1];e=s[99560];if((c|0)!=(e|0)){while(1){c=c&65535;d=q[b+32>>2];if(c>>>0>=(q[b+36>>2]-d|0)/592>>>0){break a}c=d+w(c,592)|0;QA(a,b,c);c=s[c+574>>1];if((e|0)!=(c|0)){continue}break}}return}J(208265,208276,479,208332);G()}function Mr(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;d=1;o[e+4|0]=1;q[e>>2]=a;if(c){while(1){g=0;d=0;while(1){f=(d<<3)+b|0;a:{if(!I9(q[f>>2],q[f+4>>2])){break a}if(r[a+3272|0]&8){Uo(a)}if(!oq(q[f>>2],q[f+4>>2],29,e)){break a}o[a+3272|0]=r[a+3272|0]|8;g=1}d=d+1|0;if((d|0)!=(c|0)){continue}break}if(g){d=h>>>0<9;h=h+1|0;if(d){continue}}break}d=r[e+4|0]!=0}Ii=e+16|0;return d}function t9(a,b){var c=0;a:{b:{if((q[a+8>>2]-q[a>>2]|0)/240>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,240,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(54145,54178,76,53687);G()}J(54240,53631,506,54259);G()}J(53556,53631,493,53687);G()}function m2(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0);b=Ii-32|0;Ii=b;e=q[qj(a,1)>>2];c=jj(a,2);d=q[e>>2];a:{if(!((c|0)<1|(c|0)>(d|0))){f=u[(q[e+4>>2]+(c<<2)|0)-4>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16;a=1;break a}if((d|0)>=1){q[b+8>>2]=d;q[b+4>>2]=133984;q[b>>2]=134064;a=Qi(a,134606,b);break a}q[b+20>>2]=133984;q[b+16>>2]=134064;a=Qi(a,134653,b+16|0)}Ii=b+32|0;return a|0}function cea(a,b,c,d,e,f,g,h,i){var j=0,k=0,l=0,m=0;j=i;q[j>>2]=0;q[j+4>>2]=0;q[j+8>>2]=0;q[j+12>>2]=0;l=-5;j=q[a+100>>2];a:{if(!j){break a}j=q[q[a+96>>2]+(Cza(c,d,j)<<2)>>2];if((j|0)==-1){break a}m=q[a+104>>2];while(1){k=(j<<4)+m|0;if((c|0)!=q[k>>2]|q[k+4>>2]!=(d|0)){j=q[k+12>>2];if((j|0)!=-1){continue}break a}break}Mi[q[q[a+12>>2]+16>>2]](q[((j<<4)+m|0)+8>>2],b,e,f,g,h,i);l=0}return l}function Qra(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;c=q[q[a+16>>2]>>2];a=q[a+12>>2];b=0;a:{if(!a){break a}b=q[a+120>>2]}e=q[b+8>>2]-q[b+12>>2]>>4;rj(b,-1e4,q[c+12>>2]);yk(b);rj(b,-1e4,q[c+16>>2]);dM(q[c>>2],q[c+28>>2],b);Ri(b,-2);a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16;yk(b);q[d+8>>2]=0;sw(b,q[c>>2],6,c,d+8|0);if(q[b+8>>2]-q[b+12>>2]>>4!=(e|0)){J(12728,12749,748,13188);G()}Ii=d+16|0}function L8(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;g=a+2124|0;a:{b:{e=q[a+2124>>2];f=q[a+2128>>2];if((e|0)==(f|0)){if(o[a+2132|0]&1){break b}f=e;e=a+2120|0;a=a+2128|0;Wi(((f-q[e>>2]|0)/12|0)+16|0,12,e,a,g);f=q[a>>2];e=q[g>>2]}if((e|0)==(f|0)){break a}q[g>>2]=e+12;q[e+8>>2]=d&2147483647;q[e+4>>2]=c;q[e>>2]=b;return}J(115093,115168,493,115224);G()}J(115236,115168,533,115260);G()}function Kca(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0);c=Ii-32|0;Ii=c;b=Nn(a,1);a:{if(b){d=b+8|0;e=b+4|0;break a}b=Bl(a,1);d=b+8|0;e=b+4|0}f=u[b>>2];g=u[e>>2];h=u[d>>2];b=Bl(a,2);d=q[b+4>>2];e=q[b>>2];i=u[b+8>>2];gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);u[c+24>>2]=h;u[c+20>>2]=g;u[c+16>>2]=f;u[c+8>>2]=i;q[c>>2]=e;q[c+4>>2]=d;a=RA(a,b,c+16|0,c,0,0,0);Ii=c+32|0;return a|0}function Ica(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0),g=x(0),h=x(0),i=x(0);c=Ii-32|0;Ii=c;b=Nn(a,1);a:{if(b){d=b+8|0;e=b+4|0;break a}b=Bl(a,1);d=b+8|0;e=b+4|0}f=u[b>>2];g=u[e>>2];h=u[d>>2];b=Bl(a,2);d=q[b+4>>2];e=q[b>>2];i=u[b+8>>2];gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);u[c+24>>2]=h;u[c+20>>2]=g;u[c+16>>2]=f;u[c+8>>2]=i;q[c>>2]=e;q[c+4>>2]=d;a=RA(a,b,c+16|0,c,2,0,0);Ii=c+32|0;return a|0}function qza(){q[58437]=q[71906];q[71906]=233720;q[58483]=q[71906];q[71906]=233904;q[74620]=1;q[74618]=-1472275375;q[74619]=1862278062;q[74617]=82559;q[74616]=1;q[74623]=0;o[298488]=0;q[74621]=q[74615];q[74623]=q[71906];q[71906]=298464;q[74630]=1;q[74628]=-278759638;q[74629]=-1695457758;q[74627]=82580;q[74626]=1;q[74633]=0;o[298528]=0;q[74631]=q[74625];q[74633]=q[71906];q[71906]=298504}function mla(a){var b=0;a:{if(o[a+104|0]&1){break a}b=q[a+92>>2];if(!b){break a}Ni(b)}b:{if(o[a+76|0]&1){break b}b=q[a+64>>2];if(!b){break b}Ni(b)}c:{if(o[a+60|0]&1){break c}b=q[a+48>>2];if(!b){break c}Ni(b)}d:{if(o[a+44|0]&1){break d}b=q[a+32>>2];if(!b){break d}Ni(b)}e:{if(o[a+28|0]&1){break e}b=q[a+16>>2];if(!b){break e}Ni(b)}f:{if(o[a+12|0]&1){break f}a=q[a>>2];if(!a){break f}Ni(a)}}function jea(a,b,c){var d=0,e=0;a:{b:{d=c&65535;e=q[b+36>>2];b=q[b+32>>2];if(d>>>0<(e-b|0)/592>>>0){if(s[(b+w(d,592)|0)+568>>1]!=(c>>>16|0)){break b}b=b+w(d,592)|0;if(s[b+570>>1]!=(c&65535)){break a}u[a>>2]=u[b+112>>2];u[a+4>>2]=u[b+116>>2];u[a+8>>2]=u[b+120>>2];u[a+12>>2]=u[b+124>>2];return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{c=q[a+16>>2];b=q[c+4>>2];b:{if(!b){break b}e=q[a+8>>2];f=q[a+12>>2];b=q[q[c>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break b}c=q[c+8>>2];while(1){d=c+(b<<4)|0;if(q[d>>2]==(e|0)&(f|0)==q[d+4>>2]){break a}b=q[d+12>>2];if((b|0)!=-1){continue}break}}J(20896,20904,158,20934);G()}return Dk(q[a>>2],q[a+4>>2],q[(c+(b<<4)|0)+8>>2],0,111,0,112,113)|0}function dk(a,b,c){var d=0,e=0;d=Ii-160|0;Ii=d;a:{if(!sl(a,0,d+56|0)){q[d+4>>2]=c;q[d>>2]=b;a=Qi(a,143138,d);break a}Hn(a,143160,d+56|0);b:{if(dj(q[d+64>>2],143162)){break b}b=b-1|0;if(b){break b}q[d+16>>2]=q[d+60>>2];q[d+20>>2]=c;a=Qi(a,143169,d+16|0);break a}e=q[d+60>>2];if(!e){q[d+60>>2]=143199;e=143199}q[d+40>>2]=c;q[d+36>>2]=e;q[d+32>>2]=b;a=Qi(a,143201,d+32|0)}Ii=d+160|0;return a}function aza(){q[71313]=0;q[71314]=0;q[71312]=317056;q[71310]=0;q[71308]=1036;q[71307]=1024;q[71306]=0;q[71304]=0;q[71302]=0;q[71300]=0;q[71298]=1;q[71296]=0;q[71297]=3;q[71334]=317056;q[71332]=0;q[71330]=1052;q[71329]=1039;q[71328]=0;q[71326]=0;q[71324]=0;q[71322]=0;q[71320]=1;q[71318]=0;q[71319]=3;q[71315]=0;q[71316]=0;q[71317]=0;q[71339]=0;q[71337]=0;q[71338]=0;q[71335]=0;q[71336]=0}function W1(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;h=-13;e=q[239672];f=q[e+16>>2];if(f){Gj(f);e=q[239672]}d=q[e+80>>2];a:{if(!d){break a}d=q[q[e+76>>2]+(Cza(a,b,d)<<2)>>2];if((d|0)==-1){break a}i=q[e+84>>2];while(1){g=(d<<4)+i|0;if((a|0)!=q[g>>2]|q[g+4>>2]!=(b|0)){d=q[g+12>>2];if((d|0)!=-1){continue}break a}break}u[c>>2]=u[(w(q[((d<<4)+i|0)+8>>2],1056)+e|0)+128>>2];h=0}if(f){Bj(f)}return h}function UX(a,b,c,d,e,f,g){var h=0,i=0;h=q[d>>2];if(h>>>0<=15){a:{if(b){if(!c){break a}while(1){c=c-1|0;if(!h){Gs(a,e,e)}b=e+h|0;i=r[f|0]^r[b|0];o[g|0]=i;o[b|0]=i;g=g+1|0;f=f+1|0;h=h+1&15;if(c){continue}break}break a}if(!c){break a}while(1){c=c-1|0;if(!h){Gs(a,e,e)}i=r[f|0];b=e+h|0;o[g|0]=i^r[b|0];o[b|0]=i;g=g+1|0;f=f+1|0;h=h+1&15;if(c){continue}break}}q[d>>2]=h;a=0}else{a=-36}return a}function SH(a,b){var c=0,d=0,e=0;c=q[b+16>>2];if(c){Mi[q[74957]](c)}e=qq(a);a:{if(q[b+72>>2]!=q[b+68>>2]){c=0;while(1){d=q[b+52>>2];if((q[b+56>>2]-d|0)/48>>>0<=c>>>0){break a}d=d+w(c,48)|0;zt(e,q[d+8>>2],q[d+12>>2],q[d+20>>2],yt(q[d+28>>2]),r[d+24|0]);c=c+1|0;if(c>>>0>2]-q[b+68>>2]>>3>>>0){continue}break}}q[b+16>>2]=Mi[q[74954]](a,e);um(e);return}J(114155,114013,479,114166);G()}function Pya(){q[59345]=q[71906];q[71906]=237352;q[59367]=q[71906];q[71906]=237440;q[59387]=q[71906];q[71906]=237520;q[59401]=q[71906];q[71906]=237576;q[59423]=q[71906];q[71906]=237664;q[59443]=q[71906];q[71906]=237744;q[59463]=q[71906];q[71906]=237824;q[59483]=q[71906];q[71906]=237904;q[59503]=q[71906];q[71906]=237984;q[59607]=q[71906];q[71906]=238400;q[59631]=q[71906];q[71906]=238496}function Gya(){q[62831]=q[71906];q[71906]=251296;q[62851]=q[71906];q[71906]=251376;q[62875]=q[71906];q[71906]=251472;q[62905]=q[71906];q[71906]=251592;q[62933]=q[71906];q[71906]=251704;q[62955]=q[71906];q[71906]=251792;q[62979]=q[71906];q[71906]=251888;q[62997]=q[71906];q[71906]=251960;q[63025]=q[71906];q[71906]=252072;q[63047]=q[71906];q[71906]=252160;q[63061]=q[71906];q[71906]=252216}function $ia(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+4>>2];e=q[q[a+32>>2]+8>>2];q[b+12>>2]=0;c=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[57366],b+12|0)){Kr(q[b+12>>2]);a:{b:{if(!Ep(q[a>>2],q[d+2008>>2],q[b+12>>2])){break b}if(!FH(q[d+2012>>2],q[b+12>>2],e)){break b}c=q[a+32>>2];d=q[a+24>>2];a=q[b+12>>2];q[c+16>>2]=d-q[a+4>>2];c=0;break a}a=q[b+12>>2];c=-13}Aj(a)}Ii=b+16|0;return c|0}function xT(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;c=1;e=kj(a,1,0);b=yi(e|0,kj(a,2,0)|0)|0;if(b>>>0>=4294963201){q[240513]=0-b;b=-1}a:{if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[d+4>>2]=ql(b);q[d>>2]=e;Lj(a,146077,d);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;c=3}Ii=d+16|0;return c|0}function o3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-80|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;b=Ui(b,0,74);Ti(b,853532,74);vj(a,0,0);bj(a,130369,7);Xi(a,b+16|0);Ij(a,-3);bj(a,130377,12);Xi(a,b+32|0);Ij(a,-3);bj(a,130390,8);e=r[b+73|0];c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(e|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(130179,129431,811,130399);G()}Ii=b+80|0;return 1}function Tya(){q[74892]=0;q[74893]=0;q[74890]=0;q[74888]=86363;q[74887]=86349;q[74886]=0;q[74884]=0;q[74882]=0;q[74880]=0;q[74878]=0;q[74876]=0;q[74877]=0;q[74914]=299504;q[74912]=0;q[74910]=86387;q[74909]=86372;q[74908]=0;q[74906]=0;q[74904]=0;q[74902]=0;q[74900]=1;q[74898]=0;q[74899]=3;q[74894]=0;q[74895]=0;q[74896]=0;q[74897]=0;q[74919]=0;q[74917]=0;q[74918]=0;q[74915]=0;q[74916]=0}function Fja(a){a=a|0;var b=0,c=0,d=0;b=$i(12);q[b+4>>2]=0;q[b+8>>2]=0;d=q[a+20>>2];q[b>>2]=d;a:{c=q[a>>2];d=ak(c,q[d+108>>2],b+4|0);if(d){break a}if(q[q[q[b+4>>2]>>2]+152>>2]){Pi(4,61401,61409,0);d=-15;break a}d=ak(c,q[q[b>>2]+104>>2],b+8|0);if(d){break a}q[q[a+24>>2]+8>>2]=b;return 0}a=q[a>>2];c=q[b>>2];if(c){Aj(c)}c=q[b+4>>2];if(c){cj(a,c)}c=q[b+8>>2];if(c){cj(a,c)}Ni(b);return d|0}function Boa(a){a=a|0;var b=0,c=0,d=0;d=q[a+80>>2];if(!d){return 0}b=a+80|0;c=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=c;c=q[b+12>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=c;c=q[b+20>>2];q[a+16>>2]=q[b+16>>2];q[a+20>>2]=c;c=q[b+28>>2];q[a+24>>2]=q[b+24>>2];q[a+28>>2]=c;c=q[b+36>>2];q[a+32>>2]=q[b+32>>2];q[a+36>>2]=c;q[a+80>>2]=wea(q[q[a+112>>2]+8>>2],d);q[a+84>>2]=0;return q[a>>2]!=0|q[a+4>>2]!=0}function YF(a,b){var c=0;if(!q[b+100>>2]){return gl(a,a,b+4|0)}a:{if(q[a>>2]<=-1){c=-20352;if(Jj(a,0)){break a}}c=-20352;if(Ql(a)>>>0>q[b+88>>2]<<1>>>0){break a}c=Mi[q[b+100>>2]](a)|0;if(c){break a}b=b+4|0;while(1){b:{if(q[a>>2]>-1){break b}if(!Jj(a,0)){break b}c=Rl(a,a,b);if(!c){continue}break a}break}while(1){c=0;if((_j(a,b)|0)<0){break a}c=nn(a,a,b);if(!c){continue}break}}return c}function NZ(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;hm(a,1);a:{if(jF(a,1,144186)){break a}b:{switch(Vi(a,1)|0){case 3:Xi(a,uj(a,1,0));break a;case 4:ej(a,1);break a;case 1:Xi(a,Uj(a,1)?144197:144202);break a;case 0:bj(a,144208,3);break a;default:break b}}c=Vi(a,1);d=140583;c:{if((c|0)==-1){break c}d=q[(c<<2)+256832>>2]}c=d;q[b+4>>2]=Ou(a,1);q[b>>2]=c;Lj(a,144212,b)}Ii=b+16|0;return 1}function owa(a,b,c,d){var e=0,f=0,g=0;f=Ii-224|0;Ii=f;e=f+72|0;g=Tn(a,e,0,1);a:{if(!g){break a}a=b+8|0;if(q[e+104>>2]==8){e=e+112|0;c=r[e+c|0];o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+1|0]=c;o[b|0]=c;o[b+6|0]=0;o[b+7|0]=0;b=r[d+e|0];o[a+2|0]=0;o[a+3|0]=0;o[a+4|0]=0;o[a+5|0]=0;o[a+1|0]=b;o[a|0]=b;o[a+6|0]=0;o[a+7|0]=0;break a}Zo(e,f);Ww(b,c+f|0);Ww(a,d+f|0)}Ii=f+224|0;return g}function o0(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=Ii-16|0;Ii=e;h=a+4|0;i=q[a+88>>2]+7>>>3|0;q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;a:{b:{while(1){f=$n(e,i,c,d);if(f){break b}while(1){if((_j(e,h)|0)>=0){f=kl(e,1);if(!f){continue}break b}break}if((g|0)==11){f=-19712;break a}g=g+1|0;if((Jj(e,1)|0)<1){continue}break}f=ck(a,b,b,e);if(f){break b}c=a;a=b+24|0;f=ck(c,a,a,e)}ij(e)}Ii=e+16|0;return f}function fN(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;a:{d=iN(a);if(!(((d|32)-97>>>0<26?1:d-48>>>0<10)?0:(d|0)!=95)){c=c-1|0;c=(c|0)>0?c:0;while(1){o[b+e|0]=d;if((c|0)==(e|0)){break a}e=e+1|0;d=iN(a);if((d|0)==95|((d|32)-97>>>0<26?1:d-48>>>0<10)){continue}break}}b:{if(!(d&255)){break b}c=q[a+12>>2];if((c|0)<1){break b}c=c-1|0;q[a+12>>2]=c;o[c+q[a+8>>2]|0]=d}o[b+e|0]=0;return}Or(a,-2);G()}function bs(a,b,c){var d=0,e=0,f=0;if(!c){return 0}d=r[a|0];a:{if(!d){break a}while(1){b:{c=c-1|0;if(!c){break b}e=r[b|0];if(!e){break b}c:{if((d|0)==(e|0)){break c}e=d-65>>>0<26?d|32:d;d=r[b|0];if((e|0)==((d-65>>>0<26?d|32:d)|0)){break c}f=r[a|0];break a}b=b+1|0;d=r[a+1|0];a=a+1|0;if(d){continue}break a}break}f=d}a=f&255;c=a-65>>>0<26?a|32:a;a=r[b|0];return c-(a-65>>>0<26?a|32:a)|0}function Qp(a){var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=v[a+8>>3];d=v[a>>3];a:{if(!(d<0^1)){d=-1;if(b<0){break a}aa(c+8|0,0)|0;b=v[a+16>>3]+(b-(+q[c+12>>2]/1e6+ +q[c+8>>2]));d=b>0?b:0;break a}if(!(b<0^1)){aa(c+8|0,0)|0;b=v[a+16>>3]+(d-(+q[c+12>>2]/1e6+ +q[c+8>>2]));d=b>0?b:0;break a}aa(c+8|0,0)|0;d=v[a>>3];b=v[a+16>>3]+(b-(+q[c+12>>2]/1e6+ +q[c+8>>2]));b=b>0?b:0;d=b>d?d:b}Ii=c+16|0;return d}function Lqa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;e=qj(a,1);d=q[e+4>>2];q[b+8>>2]=0;q[b+12>>2]=0;c=q[q[d+80>>2]+8>>2];a:{if(!c){break a}c=q[c>>2];if(!c){break a}f=q[c+3216>>2];g=q[c+3220>>2]}q[b>>2]=f;q[b+4>>2]=g;c=q[d+100>>2];q[b+16>>2]=q[d+96>>2];q[b+20>>2]=c;d=q[q[d+84>>2]>>2]+w(s[e+24>>1],96)|0;c=q[d+4>>2];q[b+24>>2]=q[d>>2];q[b+28>>2]=c;km(a,b);Ii=b+32|0;return 1}function $R(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=Ii-224|0;Ii=d;e=q[a+64>>2];if(!e){e=q[a+60>>2]}Vq(d+136|0);aq(d+40|0);sy(d+136|0,q[a+68>>2]+596|0);py(d+40|0,q[a+68>>2]+684|0);zs(d+136|0,d);Rq(d+40|0,d+16|0);Mi[q[q[a+68>>2]+1116>>2]](e+48|0,48,c?181289:181273,d,36,b,12)|0;a=d+136|0;if(a){Mi[q[65677]](a,0,88)|0}a=d+40|0;if(a){Mi[q[65677]](a,0,92)|0}Mi[q[65677]](d,0,36)|0;Ii=d+224|0}function iw(a,b){var c=0,d=0;c=q[b>>2];if(c){cj(a,c)}c=q[b+24>>2];if(c){cj(a,c)}a=q[b+4>>2];if(a){Aj(a)}a:{d=q[b+12>>2];c=q[b+8>>2];a=d-c|0;if(!a){break a}if((c|0)!=(d|0)){c=c-d|0;c=((a|0)<(c|0)?c:a)>>>2|0;a=(a|0)>-1?a:-1;a=w(c,(a|0)<1?a:1);c=a>>>0>1?a:1;a=0;while(1){a=a+1|0;if((c|0)==(a|0)){break a}if(q[b+12>>2]-q[b+8>>2]>>2>>>0>a>>>0){continue}break}}J(65610,65515,479,65429);G()}}function bra(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=q[a+20>>2];d=q[a+4>>2];q[b+12>>2]=0;d=AM(q[a>>2],d,c,q[a+8>>2],b+12|0);Aj(c);if(!d){a=q[a+24>>2];c=q[b+12>>2];q[a+8>>2]=c;e=a;a=q[c>>2];q[e+16>>2]=((((((s[a+1056>>1]<<1)+q[a+3136>>2]|0)+q[a+3184>>2]-(q[a+3128>>2]+q[a+3176>>2])|0)+w(q[a+3160>>2]-q[a+3152>>2]>>4,12)|0)+q[a+1044>>2]|0)-q[a+1036>>2]|0)+3284}Ii=b+16|0;return d|0}function b0(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;c=Lm(a,145545);b=q[c>>2];if(!b){Qi(a,145617,0);b=q[c>>2]}c=3;a:{if(!RS(b,q[($q(a,2,0,257616)<<2)+145764>>2],Am(a,3,1024))){c=1;b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;break a}b=q[240513];d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;q[e>>2]=ql(b);Lj(a,145661,e);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0}q[a+8>>2]=q[a+8>>2]+16;Ii=e+16|0;return c|0}function F9(a,b){var c=0;a:{b:{if(q[a+8>>2]-q[a>>2]>>8>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,256,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(56924,56957,76,57019);G()}J(57162,57106,506,57181);G()}J(57031,57106,493,57019);G()}function w9(a,b){var c=0;a:{b:{if(q[a+8>>2]-q[a>>2]>>4>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,16,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(50037,50070,76,49924);G()}J(49936,49868,506,49955);G()}J(49793,49868,493,49924);G()}function qwa(a,b){var c=0,d=0,e=0,f=0;c=Ii-224|0;Ii=c;d=a;a=c+72|0;e=Tn(d,a,0,1);a:{if(!e){break a}d=b+8|0;if(q[a+104>>2]==8){f=r[a+115|0];o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+1|0]=f;o[b|0]=f;o[b+6|0]=0;o[b+7|0]=0;$B(d,r[a+112|0],r[a+113|0],r[a+114|0]);break a}Zo(a,c);Ww(b,c|3);if(r[a+116|0]){RN(a,d);break a}if(r[a+117|0]){QN(a,c,d);break a}aC(d,c,0)}Ii=c+224|0;return e}function z9(a,b){var c=0;a:{b:{if(q[a+8>>2]-q[a>>2]>>2>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,4,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(52130,51892,76,51447);G()}J(51289,51308,506,51364);G()}J(51372,51308,493,51447);G()}function q6(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=-2;d=q[a+2200>>2];a:{if(!d){break a}d=q[q[a+2196>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+2204>>2];while(1){f=a+w(d,24)|0;if((b|0)!=q[f>>2]|q[f+4>>2]!=(c|0)){d=q[f+16>>2];if((d|0)!=-1){continue}break a}break}a=q[q[(a+w(d,24)|0)+12>>2]+4>>2];q[e>>2]=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);g=0}return g|0}function mia(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a+16>>2];e=Oi(60844);f=Li;a:{b=q[c+4>>2];b:{if(!b){break b}b=q[q[c>>2]+(Cza(e,f,b)<<2)>>2];if((b|0)==-1){break b}c=q[c+8>>2];while(1){d=c+(b<<4)|0;if(q[d>>2]==(e|0)&(f|0)==q[d+4>>2]){break a}b=q[d+12>>2];if((b|0)!=-1){continue}break}}Pi(4,60694,60896,0);return-6}return Dk(q[a>>2],q[a+4>>2],q[(c+(b<<4)|0)+8>>2],497,498,0,499,500)|0}function hG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;f=1;a:{switch(r[a+8|0]-1|0){default:J(211646,211648,72,211630);G();case 1:f=2;break;case 0:break a}}c=TQ(q[a+12>>2],f,b,c>>>1|0);b=-3;b:{if((c|0)<0){break b}b=1;c:{switch(r[a+8|0]-1|0){default:J(211646,211648,83,211630);G();case 1:b=2;break;case 0:break c}}q[d>>2]=c<>2];d=q[a>>2];if((c|0)!=(d|0)){break a}e=q[a+4>>2];if((e|0)!=q[b+4>>2]){break a}if(Ej(q[a+8>>2],q[b+8>>2],e)){break a}return 0}b:{c:{switch(d-12|0){case 0:case 7:break c;default:break b}}d:{switch(c-12|0){case 0:case 7:break d;default:break b}}c=q[a+4>>2];if((c|0)!=q[b+4>>2]){break b}if(dx(q[a+8>>2],q[b+8>>2],c)){break b}return 0}return-1}function C9(a,b){var c=0;a:{b:{if(q[a+8>>2]-q[a>>2]>>2>>>0<=b>>>0){if(o[a+28|0]&1){break a}Wi(b,8,a+16|0,a+24|0,a+20|0);if(o[a+12|0]&1){break a}Wi(b,4,a,a+8|0,a+4|0);if(o[a+44|0]&1){break a}Wi(b,4,a+32|0,a+40|0,a+36|0);c=q[a+32>>2];if(q[a+40>>2]-c>>2>>>0>>0){break b}q[a+36>>2]=(b<<2)+c;return}J(46091,46124,76,45053);G()}J(45520,45367,506,45539);G()}J(46186,45367,493,45053);G()}function rea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}d=a+w(c,592)|0;if(s[d+570>>1]!=(b&65535)){break a}if(q[d+436>>2]==2){b=a+w(c,592)|0;a=q[b+464>>2];b=q[b+468>>2]}else{a=0;b=0}Li=b;return a}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function cl(a,b,c){var d=0,e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;a:{if(!c){break a}e=q[a>>2];while(1){b:{if(e){d=q[a+4>>2];break b}d=Mi[q[a+8>>2]](q[a+16>>2],q[a+12>>2],f+12|0)|0;if(!d){g=c;break a}e=q[f+12>>2];if(!e){g=c;break a}q[a+4>>2]=d;q[a>>2]=e}h=d;d=c>>>0>e>>>0?e:c;b=Ti(b,h,d);e=q[a>>2]-d|0;q[a>>2]=e;q[a+4>>2]=d+q[a+4>>2];b=b+d|0;c=c-d|0;if(c){continue}break}}Ii=f+16|0;return g}function M_(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=kj(a,1,0);Tl(a,2,145877,0);d=yj(a,4);q[d>>2]=0;Zi(a,-1e4,145545);xj(a,-2);Qi(a,145881,0);q[d>>2]=0;d=q[240513];e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;e=ql(d);a:{if(c){q[b+20>>2]=e;q[b+16>>2]=c;Lj(a,145654,b+16|0);break a}q[b>>2]=e;Lj(a,145661,b)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+32|0;return 3}function qE(a,b,c){var d=0,e=0,f=0;e=q[a+4>>2]<<2;f=e;a:{b:{if(c>>>0>e>>>0){break b}f=c;if(c>>>0>=e>>>0){break b}f=q[a+8>>2];d=c;while(1){if(q[f+(d&-4)>>2]>>>(d<<3&24)&255){break a}d=d+1|0;if((e|0)!=(d|0)){continue}break}f=c}if(f){d=0;while(1){o[b+d|0]=q[q[a+8>>2]+(d&-4)>>2]>>>(d<<3&24);d=d+1|0;if((f|0)!=(d|0)){continue}break}}if(c>>>0>e>>>0){Ui(b+e|0,0,c-e|0)}return 0}return-8}function iP(a){var b=0,c=0,d=0,e=0;a:{b:{c:{e=q[a>>2];if(e>>>0>9999|t[a+12>>2]>23|(t[a+16>>2]>59|t[a+20>>2]>59)){break c}b=q[a+4>>2];if(b>>>0>12){break c}d=1<>>0)%100|0;if(!(e&3)){c=29;if(d){break a}}c=(b>>>0)%400|0?28:29;break a}return-9216}c=30}a=q[a+8>>2];return(a|0)<1?-9216:(c|0)<(a|0)?-9216:0}function bV(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;c=2;d=ln(a,137611);e=kj(a,2,0);f=kj(a,3,0);q[b+28>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+8>>2]=1;g=q[d+8272>>2];q[b>>2]=1;q[b+4>>2]=g;d=Uy(d,e,f,b);a:{if(d){e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;Xi(a,d);break a}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;c=1}Ii=b+32|0;return c|0}function S4(a){var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;ej(a,-10002);Ak(a,129340,252448);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,129344);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,129362);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,129389);Ri(a,-3);if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(129410,129431,1471,129453);G()}}function Dn(a,b,c){var d=0,e=0,f=0;e=q[a+4>>2]<<2;a:{if(e>>>0>=c>>>0){if(c>>>0>=e>>>0){e=c;break a}f=q[a+8>>2];d=c;b:{while(1){if(q[(d&-4)+f>>2]>>>(d<<3&24)&255){break b}d=d+1|0;if((e|0)!=(d|0)){continue}break}e=c;break a}return-8}b=(Ui(b,0,c-e|0)+c|0)-e|0}if(e){d=0;while(1){o[((d^-1)+e|0)+b|0]=q[q[a+8>>2]+(d&-4)>>2]>>>(d<<3&24);d=d+1|0;if((e|0)!=(d|0)){continue}break}}return 0}function dn(a,b){var c=0,d=0,e=0,f=0,g=0;q[a+28>>2]=q[a+24>>2];a:{if((b|0)!=-1){c=q[a+32>>2];if((c|0)==-1){break a}g=q[q[a>>2]+12>>2];while(1){d=c;e=(c<<2)+g|0;f=q[e>>2];c=(f>>>14|0)-131071|0;c=(c|0)==-1?-1:(c+d|0)+1|0;if((c|0)!=-1){continue}break}c=e;d=(d^-1)+b|0;b=d>>31;if((b^b+d)>=131072){Sj(q[a+12>>2],141849);f=q[e>>2]}q[c>>2]=(f&16383|d<<14)+2147467264}return}q[a+32>>2]=b}function Oaa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=Ii-16|0;Ii=h;a=q[b+24>>2];f=q[b+28>>2];a:{if((a|0)!=(f|0)){b=f-a|0;g=(b|0)>-1?b:-1;f=a-f|0;b=w((g|0)<1?g:1,((b|0)<(f|0)?f:b)>>>3|0);f=b>>>0>1?b:1;b=0;while(1){g=q[(b<<3)+a>>2];if(q[((b<<3)+a|0)+4>>2]==(c|0)){break a}b=b+1|0;if((f|0)!=(b|0)){continue}break}}g=-1}Rb(g|0,h+12|0)|0;Pj(d,q[h+12>>2],e);Ii=h+16|0}function cfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;a:{if(a){ic(q[(b<<2)+92688>>2],c|0,d|0);if(r[q[75054]+156|0]&64){e=K()|0;if(e){break a}}e=a;f=q[a+72>>2]&-29360129;g=q[a+76>>2]&-536862749;b=b&7;a=b<<2;h=b<<22;b=b>>>10|a;a=(c&255)<<21;q[e+72>>2]=f|h;q[e+76>>2]=a|b|(d&255)<<13|g;return}J(88636,88575,3701,92758);G()}lj(e,92758,3703);J(88669,88575,3703,92758);G()}function Yca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+28|0);e=gK(c,q[b+28>>2]);f=Li;g=UA(c,q[b+28>>2]);Xl(b,c,q[b+28>>2],4);YJ(a,c,e,f,g,u[b>>2],eK(c,q[b+28>>2]),WA(c,q[b+28>>2]),VA(c,q[b+28>>2]));if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2340,206991);G()}Ii=b+32|0;return 1}function AU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;c=2;d=ln(a,137996);e=kj(a,2,0);f=kj(a,3,0);q[b+28>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+8>>2]=2;g=q[d+32>>2];q[b>>2]=1;q[b+4>>2]=g;d=Uy(d,e,f,b);a:{if(d){e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;Xi(a,d);break a}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=1;q[a+8>>2]=q[a+8>>2]+16;c=1}Ii=b+32|0;return c|0}function pS(a){var b=0,c=0,d=0,e=0,f=0;Oza(.5);d=Lza(1)|0;f=Lza(0)|0;Oza(+a);c=Lza(1)|0;Lza(0)|0;Mza(0,f|0);Mza(1,d&2147483647|c&-2147483648);e=+Nza();Oza(+a);c=Lza(1)|0;Mza(0,Lza(0)|0);c=c&2147483647;Mza(1,c|0);b=+Nza();d=c;a:{if(c>>>0<=1082535489){b=Ws(b);if(d>>>0<=1072693247){if(d>>>0<1045430272){break a}return e*(b+b-b*b/(b+1))}return e*(b+b/(b+1))}a=(e+e)*tO(b)}return a}function msa(a){var b=0;a:{if(o[a+104|0]&1){break a}b=q[a+84>>2];if(b){Ni(b)}b=q[a+76>>2];if(!b){break a}Ni(b)}b:{if(o[a+72|0]&1){break b}b=q[a+52>>2];if(b){Ni(b)}b=q[a+44>>2];if(!b){break b}Ni(b)}c:{if(o[a+40|0]&1){break c}b=q[a+32>>2];if(!b){break c}Ni(b)}d:{if(o[a+28|0]&1){break d}b=q[a+16>>2];if(!b){break d}Ni(b)}e:{if(o[a+12|0]&1){break e}a=q[a>>2];if(!a){break e}Ni(a)}}function ml(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=a+12|0;b=q[a>>2]-e|0;a:{if(!b){break a}bj(q[a+8>>2],e,b);q[a>>2]=e;b=q[a+4>>2];q[a+4>>2]=b+1;if((b|0)<1){break a}f=q[a+8>>2];g=al(f,-1);c=1;while(1){b:{b=c+1|0;d=c;h=al(f,c^-1);i=q[a+4>>2];c=h>>>0>>0|(i-c|0)>8;d=c?b:d;if(!c){break b}g=g+h|0;c=b;if((d|0)<(i|0)){continue}}break}fm(f,d);q[a+4>>2]=(q[a+4>>2]-d|0)+1}return e}function l_(a){a=a|0;var b=0,c=0,d=0;b=q[($q(a,1,143747,257232)<<2)+143792>>2];c=Pu(a,b,Am(a,2,0));a:{b:{switch(b-3|0){case 0:d=+(Pu(a,4,0)|0)*.0009765625;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d+ +(c|0);break a;case 2:b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)!=0;break a;default:break b}}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}q[a+8>>2]=q[a+8>>2]+16;return 1}function woa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;e=Ii-16|0;Ii=e;b=q[q[a+12>>2]>>2];c=q[a+16>>2];d=q[c+64>>2];f=q[57289];c=q[c+68>>2];a:{if((d|0)==q[f+8>>2]&(c|0)==q[f+12>>2]){o[b+22|0]=r[b+22|0]|1;break a}f=d;d=q[57290];if((f|0)!=q[d+8>>2]|q[d+12>>2]!=(c|0)){break a}o[b+22|0]=r[b+22|0]&254}b=nK(q[b+8>>2],q[a+16>>2]);if(b){a=q[a+16>>2];q[e>>2]=b;gn(a,43106,e)}Ii=e+16|0;return 0}function rya(){var a=0;a=Oi(209922);q[239687]=1577;q[239685]=2;q[239686]=16;q[239684]=1578;q[239682]=2;q[239683]=8;q[239681]=1579;q[239679]=1;q[239680]=16;q[239678]=1580;q[239676]=1;q[239677]=8;q[239670]=a;q[239671]=Li;q[239699]=1581;q[239697]=2;q[239698]=16;q[239696]=1582;q[239694]=2;q[239695]=8;q[239693]=1583;q[239691]=1;q[239692]=16;q[239690]=1584;q[239688]=1;q[239689]=8}function c7(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;d=q[a+80>>2];a:{if(d){if((d|0)==q[57954]){e=q[a+100>>2];if(!e){break a}f=q[a+96>>2]+(a+96|0)|0;d=0;while(1){kt(b,(r[(d<<3)+f|0]+a|0)+96|0,c+28|0);d=d+1|0;if((e|0)!=(d|0)){continue}break}break a}a=q[d+4>>2];q[c+20>>2]=24704;q[c+16>>2]=a;Pi(4,24640,26313,c+16|0);break a}q[c>>2]=24704;Pi(4,24640,26356,c)}Ii=c+32|0}function Lra(a,b){a=a|0;b=b|0;p[b+104>>1]=200;q[b+16>>2]=q[a+12>>2];q[b+100>>2]=q[b+100>>2]&-65537|65536;q[b+100>>2]=q[b+100>>2]&-131073|131072;q[b+20>>2]=38;q[b+24>>2]=39;q[b+28>>2]=40;q[b+32>>2]=41;q[b+36>>2]=42;q[b+40>>2]=43;q[b+44>>2]=44;q[b+52>>2]=45;q[b+56>>2]=46;q[b+68>>2]=47;q[b+72>>2]=48;q[b+76>>2]=49;q[b+80>>2]=50;q[b+84>>2]=51;q[b+88>>2]=52;q[b+96>>2]=53;return 0}function zI(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=q[a+48>>2];Gj(d);f=Oi(b);g=Li;b=q[a+20>>2];if(!b){Bj(d);return 2}h=2;b=q[q[a+16>>2]+(Cza(f,g,b)<<2)>>2];a:{if((b|0)==-1){break a}a=q[a+24>>2];while(1){e=a+w(b,136)|0;if((f|0)!=q[e>>2]|q[e+4>>2]!=(g|0)){b=q[e+128>>2];if((b|0)!=-1){continue}break a}break}a=a+w(b,136)|0;if(!r[a+8|0]){Bj(d);return-4}Pj(c,a+8|0,64);h=0}Bj(d);return h}function r7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if(c>>4==q[a+8>>2]-q[a+12>>2]>>4){a:{if(!Oj(a,1)){q[b>>2]=115561;a=Qi(a,116661,b);break a}f=rr(a,q[q[d+304>>2]+2384>>2]),g=Li,h=jj(a,2),i=jj(a,3),e=q[75006],Mi[e](f|0,g|0,h|0,i|0);a=0}Ii=b+16|0;return a|0}J(115568,115465,478,119531);G()}function hea(a,b){var c=0,d=0;a:{b:{c:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break c}d=a+w(c,592)|0;if(s[d+570>>1]!=(b&65535)){break b}if(q[d+436>>2]==2){break a}return 0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}a=a+w(c,592)|0;return q[a+452>>2]?a+440|0:0}function Wua(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;f=a;e=a;if((Vi(a,1)|0)==8){c=1;f=Gn(a,1)}b=e;e=c+1|0;a:{if((Vi(b,e)|0)<=0){Ri(a,e);c=0;b=0;break a}b=kj(a,c|2,0);Dj(a,e,6);c=Am(a,c+3|0,0);d=(gk(b,99)|0)!=0;d=gk(b,114)?d|2:d;b=gk(b,108)?d|4:d;d=(c|0)>0?b|8:b;b=1211}MF(a);g=q[a+8>>2];q[g+8>>2]=2;q[g>>2]=f;q[a+8>>2]=q[a+8>>2]+16;ej(a,e);Ij(a,-3);Ri(a,-2);aF(f,b,d,c);return 0}function U_(a){a=a|0;var b=0,c=0,d=0;c=Ii-32|0;Ii=c;rj(a,-10001,2);b=q[qj(a,-1)>>2];if(!b){q[c+16>>2]=145830;Qi(a,145850,c+16|0)}a:{if(!Kn(b)){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;a=1;break a}b=q[240513];d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;q[c>>2]=ql(b);Lj(a,145661,c);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;a=3}Ii=c+32|0;return a|0}function A5(a,b){var c=0,d=x(0),e=0,f=0;f=o[a+186|0]&1;c=(f<<5)+a|0;e=q[c>>2];if(e){d=u[e+8>>2];b=x(d*b);a:{if(q[c+24>>2]!=6){break a}c=(f<<5)+a|0;e=r[c+28|0];if(!(e&2)){break a}o[c+28|0]=e&253}b:{if(x(y(b))>d^1){break b}b=ev(b,d);if(x(y(b))>2]=r[a+28|0]&2?x(d-b):b}return 0}function sm(a,b){var c=0,d=0,e=0;while(1){c=q[213233];q[213233]=c?c:1;if(c){continue}break}e=q[213232];d=q[e+4>>2];c=0;a:{if(!d){break a}d=q[q[e>>2]+(Cza(a,b,d)<<2)>>2];c=0;if((d|0)==-1){break a}c=q[e+8>>2];b:{while(1){e=c+(d<<6)|0;if((a|0)==q[e>>2]&q[e+4>>2]==(b|0)){break b}d=q[e+56>>2];if((d|0)!=-1){continue}break}c=0;break a}c=q[(c+(d<<6)|0)+32>>2]}q[213233]=0;return c}function hQ(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=b;c=A(B(fj(a,1),0),2147483647);a:{if(y(c)<2147483648){a=~~c;break a}a=-2147483648}q[d+8>>2]=a;d=b;c=(c- +(a|0))*1e9;b:{if(y(c)<2147483648){a=~~c;break b}a=-2147483648}q[d+12>>2]=(a|0)<999999999?a:999999999;if(by(b+8|0)){while(1){a=q[b+4>>2];q[b+8>>2]=q[b>>2];q[b+12>>2]=a;if(by(b+8|0)){continue}break}}Ii=b+16|0;return 0}function Yna(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;a:{b=q[a+8>>2];c=q[b+4>>2];d=q[b>>2];if((c|0)==(d|0)){break a}e=q[q[a+16>>2]>>2];g=c-d>>2;a=0;while(1){f=(a<<2)+d|0;if(q[f>>2]!=(e|0)){a=a+1|0;if(g>>>0>a>>>0){continue}break a}break}q[f>>2]=q[c-4>>2];a=q[b+4>>2]-4|0;q[b+4>>2]=a;if(a>>>0>=t[b>>2]){if(e){Ni(e)}return 0}J(52496,52389,516,52486);G()}J(52163,52169,92,52210);G()}function T5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a=Ii-16|0;Ii=a;q[b+2220>>2]=c;a:{b:{if(tn(d,33076)){break b}e=Kq(e,0);q[b+2212>>2]=e;if((e|0)<=-1){q[a>>2]=e;Pi(4,33041,33091,a);break b}d=b;c=q[b+2196>>2];if(e>>>0>q[b+2204>>2]-c>>>0){if(o[b+2208|0]&1){break a}Wi(e,1,b+2196|0,b+2204|0,b+2200|0);c=q[b+2196>>2]}q[d+2200>>2]=c}Ii=a+16|0;return}J(33120,33195,493,33251);G()}function k$(a,b){a=a|0;b=b|0;var c=0;c=q[a+8>>2];q[c+8>>2]=2;q[c>>2]=147257;q[a+8>>2]=q[a+8>>2]+16;jl(a,-1e4);c=q[a+8>>2];q[c+8>>2]=2;q[c>>2]=a;q[a+8>>2]=q[a+8>>2]+16;jl(a,-2);if((Vi(a,-1)|0)==6){Xi(a,q[(q[b>>2]<<2)+258256>>2]);b=q[b+20>>2];a:{if((b|0)>=0){c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}Rk(a,2,0)}}function iS(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;f=Ii-16|0;Ii=f;while(1){h=f;g=Qp(d);a:{if(y(g)<2147483648){e=~~g;break a}e=-2147483648}q[h+8>>2]=e;h=f;i=(g- +(e|0))*1e6;b:{if(y(i)<2147483648){e=~~i;break b}e=-2147483648}q[h+12>>2]=e;e=Di(a|0,b|0,c|0,0,(g>=0?f+8|0:0)|0)|0;if(e>>>0>=4294963201){q[240513]=0-e;e=-1}if(q[240513]==27?(e|0)<=-1:0){continue}break}Ii=f+16|0;return e}function gta(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{f=q[c+8>>2];if(f){d=q[b>>2];e=r[d+24|0];if(!e){break a}g=q[d+20>>2];d=0;break b}J(23554,23354,184,23586);G()}while(1){if((w(d,24)+g|0)!=(c|0)){d=d+1|0;if(e>>>0>d>>>0){continue}break a}break}d=q[f+16>>2];e=q[b+4>>2];c=q[c+12>>2];o[a+12|0]=r[b+12|0];q[a>>2]=f;b=c+e|0;q[a+4>>2]=b;q[a+8>>2]=b+d;return}J(23597,23354,196,23586);G()}function Ira(a){var b=0,c=0,d=0;a:{d=q[a+29088>>2];c=q[a+29084>>2];b=d-c|0;if(!b){break a}if((c|0)!=(d|0)){d=c-d|0;d=((b|0)<(d|0)?d:b)>>>2|0;b=(b|0)>-1?b:-1;b=w(d,(b|0)<1?b:1);d=b>>>0>1?b:1;b=0;while(1){c=q[c>>2];Dw(c);Nr(c);b=b+1|0;if((d|0)==(b|0)){c=q[a+29084>>2];break a}c=q[a+29084>>2];if((c|0)!=q[a+29088>>2]){continue}break}}J(12419,9962,479,9454);G()}q[a+29088>>2]=c}function GX(a,b,c,d,e,f,g,h,i,j,k){var l=0,m=0;a:{b:{c:{m=q[a>>2];switch(q[m+4>>2]-6|0){case 2:break b;case 0:break c;default:break a}}q[i>>2]=g;return vE(q[a+60>>2],1,g,b,c,d,e,f,h,k,j)}q[i>>2]=g;return RX(q[a+60>>2],g,b,c,d,e,f,h,j,k)}l=-24704;d:{if(q[m>>2]!=73){break d}l=-24832;if((k|0)!=16|q[m+16>>2]!=(c|0)){break d}q[i>>2]=g;l=zN(q[a+60>>2],0,g,b,d,e,f,h,j)}return l}function Fz(a){var b=0,c=0,d=0,e=0;if(a){b=q[a>>2];c=q[b+104>>2];d=q[b+108>>2];if((c|0)!=(d|0)){while(1){e=q[q[c>>2]+16>>2];if(e){Mi[e|0](a);d=q[b+108>>2]}c=c+4|0;if((d|0)!=(c|0)){continue}break}b=q[a>>2]}c=q[a+4>>2];if((c|0)!=-2){d=q[b+120>>2];b=q[79288];if((b|0)<=0){Pi(4,122749,123218,0);b=q[79288]}q[79288]=b-1;Ho(d,-1e4,c)}Ni(a);return}J(123165,122672,1105,123200);G()}function om(a){var b=0,c=0,d=0,e=0;b=q[a+16>>2];q[b+76>>2]=q[b+76>>2]+(q[b+68>>2]-q[b+64>>2]|0);c=w(q[b+84>>2],10);c=c?c:2147483646;while(1){a:{e=Qx(a);d=r[b+21|0];if(!d){break a}c=c-e|0;if((c|0)>0){continue}}break}if(d){a=q[b+76>>2];if(a>>>0<=1023){q[b+64>>2]=q[b+68>>2]+1024;return}q[b+76>>2]=a-1024;q[b+64>>2]=q[b+68>>2];return}q[b+64>>2]=w(q[b+80>>2],t[b+72>>2]/100|0)}function Oea(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;d=-4;if(q[a+252>>2]!=q[a+244>>2]-q[a+236>>2]>>4){b=Oi(b);d=Li;h=d;q[e+12>>2]=c;UI(a+228|0,b,d,e+12|0);d=q[a+32>>2];f=q[a+36>>2]-d|0;a=(f|0)/592|0;if(f){f=a>>>0>1?a:1;a=0;while(1){g=d+w(a,592)|0;if((b|0)==q[g+536>>2]&q[g+540>>2]==(h|0)){q[g+544>>2]=c}a=a+1|0;if((f|0)!=(a|0)){continue}break}}d=0}Ii=e+16|0;return d}function KU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-8208|0;Ii=b;d=Fl(a,138013);e=fo(a,2,8192);f=d+8|0;Yn(f);a:{b:{c:{g=b+16|0;if(e<4294967296&e>=0){c=~~e>>>0}else{c=0}d=DD(d,g,c>>>0<8192?c:8192,b+12|0,f);switch(d+2|0){case 0:case 2:break b;default:break c}}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,mm(d));a=2;break a}bj(a,b+16|0,q[b+12>>2]);a=1}Ii=b+8208|0;return a|0}function HJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}b=q[a+420>>2];if(b){Ni(b)}if(!c){q[a+420>>2]=0;return}q[a+420>>2]=Pk(c);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function gja(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+4>>2];e=q[q[a+32>>2]+8>>2];q[b+12>>2]=0;c=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[57366],b+12|0)){Kr(q[b+12>>2]);a:{b:{if(!Ep(q[a>>2],q[d+4>>2],q[b+12>>2])){break b}if(CJ(e,q[b+12>>2])){break b}c=q[a+32>>2];d=q[a+24>>2];a=q[b+12>>2];q[c+16>>2]=d-q[a+4>>2];c=0;break a}a=q[b+12>>2];c=-13}Aj(a)}Ii=b+16|0;return c|0}function ega(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;a:{if(b>>>0<2097152){d=a;e=0;b:{if(d+1>>>0<2){break b}f=d&65535;g=q[75054];if(f>>>0>=t[g+32>>2]){break a}h=q[q[g+24>>2]+(f<<2)>>2];e=0;if(!h){break b}e=s[q[g+28>>2]+(f<<1)>>1]==(d>>>16|0)?h:0}d=e;q[c>>2]=0;if(!(a|b)){return-2}q[c>>2]=q[d+4>>2];return 0}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function cta(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-16|0;Ii=c;a:{if(!b){o[c+11|0]=0;h=Mi[q[a>>2]](q[a+4>>2],c+11|0,1)|0;break a}d=hj(b);g=d;if(d>>>0>=128){e=d;while(1){o[(c+11|0)+f|0]=e|128;f=f+1|0;i=e>>>0>16383;g=e>>>7|0;e=g;if(i){continue}break}}o[(c+11|0)+f|0]=g;if(!(Mi[q[a>>2]](q[a+4>>2],c+11|0,f+1|0)|0)){break a}h=Mi[q[a>>2]](q[a+4>>2],b,d)|0}Ii=c+16|0;return h}function ZM(a,b,c){var d=0,e=0,f=0;while(1){d=b;b=q[((e&3)<<2)+c>>2];b=d+((b<<8&16711680|b<<24|(b>>>8&65280|b>>>24))+e^(a<<4^a>>>5)+a)|0;e=e-1640531527|0;d=q[(e>>>9&12)+c>>2];a=((b<<4^b>>>5)+b^(d<<8&16711680|d<<24|(d>>>8&65280|d>>>24))+e)+a|0;f=f+1|0;if((f|0)!=32){continue}break}Li=a<<8&16711680|a<<24|(a>>>8&65280|a>>>24);return b<<8&16711680|b<<24|(b>>>8&65280|b>>>24)}function Z4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;Ns(a,125269);q[79307]=AG(a,125269);Io(a,0,252256);Xi(a,125406);qk(a,832,0);pj(a,-3);Xi(a,125411);qk(a,833,0);pj(a,-3);Xi(a,125422);qk(a,834,0);pj(a,-3);qk(a,835,0);Si(a,-10002,125269);qk(a,836,0);Si(a,-10002,125431);qk(a,837,0);Si(a,-10002,125443);Ri(a,-2);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(125331,125299,381,125451);G()}}function Gt(a){var b=0,c=0,d=0;c=Ii-16|0;Ii=c;a:{if(!a){break a}d=q[a>>2];if(!d){break a}b=q[d>>2]}b:{if(!Vl(b,5834,c+12|0)){b=0;c:{if(!a){break c}d=q[a>>2];if(!d){break c}b=q[d+4>>2]}if(!Cw(b,q[c+12>>2],c+8|0)){break b}Ii=c+16|0;b=q[c+8>>2];a=q[a>>2];if(b>>>0>2]>>2]){a=q[(a+(b<<2)|0)+12>>2]}else{a=0}return a}J(5840,5872,395,5904);G()}J(5913,5872,398,5904);G()}function Yia(a){a=a|0;var b=0,c=0,d=0;d=Ii-16|0;Ii=d;b=-2;if(!Qj(q[a+12>>2],q[a+16>>2],262592,d+12|0)){b=q[d+12>>2];c=q[b+12>>2];if(r[c|0]){Ek(q[a+20>>2],c);b=q[d+12>>2]}c=q[b>>2];if(r[c|0]){Ek(q[a+20>>2],c);b=q[d+12>>2]}c=q[b+4>>2];if(r[c|0]){Ek(q[a+20>>2],c);b=q[d+12>>2]}c=q[b+8>>2];if(r[c|0]){Ek(q[a+20>>2],c);b=q[d+12>>2]}q[q[a+24>>2]>>2]=b;b=0}Ii=d+16|0;return b|0}function oN(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;cq(a,c);cq(b+128|0,c+8|0);c=0;while(1){d=c<<2;f=d+b|0;q[f>>2]=q[(30-c<<2)+a>>2];g=d|4;h=g+b|0;q[h>>2]=q[(31-c<<2)+a>>2];e=a+d|0;q[e+128>>2]=q[(62-c<<2)+b>>2];q[e+132>>2]=q[(63-c<<2)+b>>2];i=d+256|0;q[i+a>>2]=q[e>>2];d=d+260|0;q[d+a>>2]=q[a+g>>2];q[b+i>>2]=q[f>>2];q[b+d>>2]=q[h>>2];d=c>>>0<30;c=c+2|0;if(d){continue}break}}function bK(a,b,c){var d=0,e=0;a:{b:{d=c&65535;e=q[b+36>>2];b=q[b+32>>2];if(d>>>0<(e-b|0)/592>>>0){if(s[(b+w(d,592)|0)+568>>1]!=(c>>>16|0)){break b}b=b+w(d,592)|0;if(s[b+570>>1]!=(c&65535)){break a}c=q[b+68>>2];d=q[b+64>>2];u[a+8>>2]=u[b+72>>2];q[a>>2]=d;q[a+4>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Po(a,b){var c=0,d=0,e=0;if(!(a|b)){return 0}while(1){d=q[213233];q[213233]=d?d:1;if(d){continue}break}d=0;e=q[213232];c=q[e+4>>2];a:{if(!c){break a}c=q[q[e>>2]+(Cza(a,b,c)<<2)>>2];if((c|0)==-1){break a}e=q[e+8>>2];while(1){c=c<<6;d=c+e|0;if((a|0)==q[d>>2]&q[d+4>>2]==(b|0)){break a}c=q[(c+e|0)+56>>2];if((c|0)!=-1){continue}break}d=0}q[213233]=0;return(d|0)!=0}function zy(a,b){var c=0,d=0;c=-24832;d=q[a>>2];a:{if(!d|q[d+4>>2]!=2){break a}c=-24704;b:{switch(b|0){case 0:q[a+16>>2]=1371;q[a+12>>2]=1372;return 0;case 1:q[a+16>>2]=1373;q[a+12>>2]=1374;return 0;case 2:q[a+16>>2]=1375;q[a+12>>2]=1376;return 0;case 3:q[a+16>>2]=1377;q[a+12>>2]=1378;return 0;case 4:break b;default:break a}}c=0;q[a+12>>2]=0;q[a+16>>2]=1379}return c}function sv(a){var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;a:{b:{if(a){b=a?q[a>>2]:0;if(!b){break b}b=q[b+120>>2];if(!b){break a}e=nj(c+8|0,b,0,132848,417);f=q[210420];d=q[b+8>>2];q[d+8>>2]=3;v[d>>3]=f|0;q[b+8>>2]=q[b+8>>2]+16;g5(a);a=qj(b,-1);Ri(b,-2);mj(e);Ii=c+32|0;return a}J(132983,132848,412,133469);G()}J(133023,132848,414,133469);G()}J(133038,132848,416,133469);G()}function nZ(a,b,c){var d=0,e=0,f=0;a:{d=q[a+24>>2];if((d|0)<=q[a+28>>2]){break a}b:{if(!d){if(r[a+50|0]<=(b|0)){break b}break a}e=(q[q[a>>2]+12>>2]+(d<<2)|0)-4|0;d=q[e>>2];if((d&63)!=3|(d>>>6&255)>(b|0)){break a}f=d>>>23|0;if((f+1|0)<(b|0)){break a}a=(b+c|0)-1|0;if((a|0)<=(f|0)){break b}q[e>>2]=d&8388607|a<<23}return}fl(a,(b+c<<23)-8388608|b<<6|3,q[q[a+12>>2]+8>>2])}function fX(a,b,c,d,e,f){var g=0,h=0,i=0;g=Ii-48|0;Ii=g;h=-20096;if(q[a+48>>2]){i=q[a+60>>2]?1:2}else{i=0}if((i|0)==1){q[g+16>>2]=0;q[g+8>>2]=1;q[g+12>>2]=0;q[g+28>>2]=0;q[g+20>>2]=1;q[g+24>>2]=0;q[g+40>>2]=0;q[g+32>>2]=1;q[g+36>>2]=0;h=xE(a,g+8|0,c,d);a:{if(h){break a}h=xE(a,b,e,f);if(h){break a}h=gz(a,b,g+8|0,b);if(h){break a}h=dz(a,b)}nm(g+8|0)}Ii=g+48|0;return h}function ME(a,b,c,d){var e=0,f=0;e=-84;f=q[a+224>>2];a:{if(f-1>>>0>1){break a}if((f|0)==1){q[a+224>>2]=2;e=yN(a);if(e){break a}}e=q[a+220>>2];f=q[a+216>>2]+b|0;q[a+216>>2]=f;q[a+220>>2]=b>>>0>f>>>0?e+1|0:e;b:{if(!q[a+228>>2]){e=Mu(a,b,c,d);if(e){break a}e=Sq(a+132|0,d,b);if(!e){break b}break a}e=Sq(a+132|0,c,b);if(e){break a}e=Mu(a,b,c,d);if(e){break a}}e=0}return e}function bba(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Ti(a+160|0,a,160);q[a+400>>2]=q[a+412>>2];q[a+404>>2]=q[a+404>>2]|1;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function iX(a,b){var c=0,d=0;d=-20352;a:{b:{c:{d:{if(q[a+48>>2]){c=q[a+60>>2]?1:2}else{c=0}switch(c-1|0){case 0:break c;case 1:break d;default:break b}}d=-19584;if(Xm(b,0)){break b}if(Xm(b,1)){break b}c=Ql(b)-1|0;if((c|0)!=q[a+92>>2]){break b}if((c|0)==254){if(Xm(b,2)){break b}}return 0}if((Jj(b,1)|0)>=0){break a}d=-19584}return d}return(_j(b,a+76|0)|0)<0?0:-19584}function Zk(a,b,c){var d=0,e=0,f=0,g=0;e=a;a:{if(!c|!r[e|0]){break a}d=c;f=a;while(1){e=f+1|0;d=d-1|0;if(!d){break a}g=r[f+1|0];f=e;if(g){continue}break}}b:{c:{g=e-a|0;d=c-g|0;if(d){c=r[b|0];if(c){break c}a=b;break b}return hj(b)+g|0}f=b;while(1){if((d|0)==1){d=1}else{o[e|0]=c;e=e+1|0;d=d-1|0}c=r[f+1|0];a=f+1|0;f=a;if(c){continue}break}}o[e|0]=0;return g+(a-b|0)|0}function Uq(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}d=q[a>>2];e=d+c|0;q[a>>2]=e;if(d>>>0>e>>>0){q[a+4>>2]=q[a+4>>2]+1}e=0;d=d&63;b:{if(!d){break b}f=64-d|0;if(f>>>0>c>>>0){e=d;break b}g=d;d=a+24|0;Ti(g+d|0,b,f);Ds(a,d);c=c-f|0;b=b+f|0}if(c>>>0>=64){while(1){Ds(a,b);b=b- -64|0;c=c+ -64|0;if(c>>>0>63){continue}break}}if(!c){break a}Ti((a+e|0)+24|0,b,c)}return 0}function Cu(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}d=q[a>>2];e=d+c|0;q[a>>2]=e;if(d>>>0>e>>>0){q[a+4>>2]=q[a+4>>2]+1}e=0;d=d&63;b:{if(!d){break b}f=64-d|0;if(f>>>0>c>>>0){e=d;break b}g=d;d=a+40|0;Ti(g+d|0,b,f);Bs(a,d);c=c-f|0;b=b+f|0}if(c>>>0>=64){while(1){Bs(a,b);b=b- -64|0;c=c+ -64|0;if(c>>>0>63){continue}break}}if(!c){break a}Ti((a+e|0)+40|0,b,c)}return 0}function $p(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}d=q[a>>2];e=d+c|0;q[a>>2]=e;if(d>>>0>e>>>0){q[a+4>>2]=q[a+4>>2]+1}e=0;d=d&63;b:{if(!d){break b}f=64-d|0;if(f>>>0>c>>>0){e=d;break b}g=d;d=a+28|0;Ti(g+d|0,b,f);Cs(a,d);c=c-f|0;b=b+f|0}if(c>>>0>=64){while(1){Cs(a,b);b=b- -64|0;c=c+ -64|0;if(c>>>0>63){continue}break}}if(!c){break a}Ti((a+e|0)+28|0,b,c)}return 0}function LV(a){var b=0,c=0,d=0;d=q[q[a>>2]+184>>2];a:{b:{b=q[q[q[a+68>>2]+1120>>2]+16>>2]-1|0;c:{if(b>>>0<=9){b=q[(b<<2)+181308>>2];break c}b=0}if(b){c=_n(a);if(c){break a}Mx(q[a+64>>2]);b=bk(1,344);if(!b){Xj(a,2,80);return-32512}bE(b);c=KR(a,b);if(c){break b}c=IR(a,d>>>2&3,b);if(c){break b}q[q[a+64>>2]+96>>2]=b}q[a+4>>2]=q[a+4>>2]+1;return 0}xl(b);Ni(b)}return c}function K_(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=q[qj(a,-10003)>>2];a:{if(b){d=xu(a,b);break a}Qi(a,145664,0);d=xu(a,0)}if(q[b+76>>2]<=-1){b=q[b>>2]}else{b=q[b>>2]}b:{if(b>>>5&1){q[c>>2]=ql(q[240513]);b=Qi(a,145661,c);break b}b=1;if(d){break b}b=0;if(!Uj(a,-10004)){break b}Ri(a,0);ej(a,-10003);Js(a,1);Zi(a,-1,145646);Mi[Cy(a)|0](a)|0;b=0}Ii=c+16|0;return b|0}function Vma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=q[a+8>>2];b=q[d+16>>2];e=q[q[a+16>>2]>>2];if(e>>>0>2]-b>>3>>>0){b=q[b+(e<<3)>>2];c=q[d>>2];if(b>>>0<(q[d+4>>2]-c|0)/240>>>0){a=q[q[q[a+4>>2]+80>>2]>>2];f=q[(c+w(b,240)|0)+200>>2];if(f){cj(a,f)}b=c+w(b,240)|0;c=q[b+196>>2];if(c){cj(a,c)}a=q[b+192>>2];if(a){Hr(a)}u9(d,e);return 0}}J(53716,53631,479,53341);G()}function Mqa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;gj(a);gj(a);d=_i(a,-1,q[71661],18049);Ri(a,-2);Ri(a,-2);a=q[d+4>>2];c=q[q[a+80>>2]+8>>2];a:{if(!c){break a}c=q[c>>2];if(!c){break a}e=q[c+3216>>2];f=q[c+3220>>2]}q[b>>2]=e;q[b+4>>2]=f;c=q[a+100>>2];q[b+16>>2]=q[a+96>>2];q[b+20>>2]=c;a=q[q[a+84>>2]>>2]+w(s[d+24>>1],96)|0;d=q[a+4>>2];q[b+24>>2]=q[a>>2];q[b+28>>2]=d}function iL(a,b,c){var d=0,e=0,f=x(0);d=Ii-16|0;Ii=d;f=u[c>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=f;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,73996);u[d>>2]=u[c+16>>2];u[d+4>>2]=u[c+20>>2];u[d+8>>2]=u[c+24>>2];Al(a,d);Si(a,-2,74005);Al(a,c+32|0);Si(a,-2,74014);lk(a,Sla(b,s[c+52>>1]),Li);Si(a,-2,74021);b=q[q[c+48>>2]+4>>2];lk(a,q[b+96>>2],q[b+100>>2]);Si(a,-2,74027);Ii=d+16|0}function cra(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=q[a>>2];Gj(q[d+3232>>2]);a:{a=q[d+3196>>2];f=q[d+3192>>2];if((a|0)!=(f|0)){while(1){e=(g<<3)+f|0;if(q[e>>2]==(b|0)&q[e+4>>2]==(c|0)){a=a-8|0;h=q[a+4>>2];q[e>>2]=q[a>>2];q[e+4>>2]=h;q[d+3196>>2]=a;if(a>>>0>>0){break a}}g=g+1|0;if(g>>>0>3>>>0){continue}break}}Bj(q[d+3232>>2]);return}J(10357,9962,516,10347);G()}function c0(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-16|0;Ii=e;d=Lm(a,145545);b=q[d>>2];if(!b){Qi(a,145617,0);b=q[d>>2]}c=$q(a,2,145756,257600);d=3;a:{if(Uk(b,Am(a,3,0),q[(c<<2)+145740>>2])){b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[e>>2]=ql(b);Lj(a,145661,e);break a}d=1;b=pm(b)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Ii=e+16|0;return d|0}function bja(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;d=-13;a:{if(Qj(q[a+12>>2],q[a+16>>2],q[57366],b+12|0)){break a}Kr(q[b+12>>2]);c=q[a+4>>2];if(!Ep(q[a>>2],q[c+2008>>2],q[b+12>>2])){Aj(q[b+12>>2]);break a}c=q8(c,q[b+12>>2]);e=q[b+12>>2];q[q[a+24>>2]+16>>2]=q[a+16>>2]-q[e+4>>2];Aj(e);if(!c){break a}q[q[a+24>>2]+8>>2]=c;d=0}Ii=b+16|0;return d|0}function b7(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=q[a+8>>2];a=q[d+32>>2]-1|0;if((a|0)>=0){h=q[d+28>>2];while(1){f=((a-e|0)/2|0)+e|0;d=w(f,48)+h|0;g=q[d+16>>2];d=q[d+20>>2];if((g|0)==(b|0)&(d|0)==(c|0)){return w(f,48)+h|0}i=(c|0)==(d|0)&b>>>0>>0|c>>>0>>0;a=i?f-1|0:a;e=i?e:(c|0)==(d|0)&b>>>0>g>>>0|c>>>0>d>>>0?f+1|0:e;if((a|0)>=(e|0)){continue}break}}return 0}function xwa(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=r[b+3|0];a:{if(d-239>>>0<=16){d=r[zj(b,0)+108592|0];e=r[zj(b,1)+108592|0];f=r[zj(b,2)+108592|0];b=c+8|0;o[b+3|0]=8;o[b+2|0]=f;o[b+1|0]=e;o[b|0]=d;Uw(a,1,b,1);break a}e=r[zj(b,0)+108848|0];f=r[zj(b,1)+108848|0];b=r[zj(b,2)+108848|0];o[c+3|0]=r[d+110384|0];o[c+2|0]=b;o[c+1|0]=f;o[c|0]=e;Uw(a,1,c,0)}Ii=c+16|0}function rK(a,b,c,d){var e=0,f=0,g=0,h=0;f=Ii-16|0;Ii=f;a:{g=s[99560];b:{if((g|0)==(c|0)){break b}while(1){c=c&65535;e=q[b+32>>2];if(c>>>0>=(q[b+36>>2]-e|0)/592>>>0){break a}h=e+w(c,592)|0;c=qK(a,b,h,f+12|0);if(c){e=c;break b}e=0;zr(b,q[f+12>>2],d,0);if(c){break b}c=s[h+574>>1];if((g|0)!=(c|0)){continue}break}}Ii=f+16|0;return e}J(208265,208276,479,208332);G()}function hpa(a){a=a|0;var b=0,c=0;a:{b:{b=q[a+8>>2];if(b){c=q[b+148>>2];if((c|0)==q[b+152>>2]){xn(37621,q[57957],c-q[b+144>>2]>>2);return-1e3}a=q[q[a+16>>2]>>2];if(r[a+24|0]&2){break b}o[a+24|0]=r[a+24|0]|2;c=q[b+148>>2];if((c|0)==q[b+152>>2]){break a}q[b+148>>2]=c+4;q[c>>2]=a;a=0}else{a=-1e3}return a|0}J(37638,37552,877,37666);G()}J(39163,38457,533,39187);G()}function MX(a,b){var c=0,d=0;d=Ii-16|0;Ii=d;c=-84;a:{b:{c:{switch(q[a+224>>2]){case 1:c=yN(a);if(!c){break b}break a;case 0:break a;case 2:break c;default:break b}}c=hva(a);if(c){break a}}q[a+224>>2]=3;c=q[a+212>>2];q[d>>2]=q[a+208>>2];q[d+4>>2]=c;c=q[a+220>>2];q[d+8>>2]=q[a+216>>2];q[d+12>>2]=c;a=a+132|0;c=Sq(a,d,16);if(c){break a}c=zW(a,b)}Ii=d+16|0;return c}function KB(a,b,c){var d=0,e=0,f=0,g=0;a=q[a>>2];Gj(q[a+3232>>2]);a:{b:{f=a+3196|0;d=q[f>>2];g=a+3200|0;e=q[g>>2];if((d|0)==(e|0)){if(o[a+3204|0]&1){break b}d=a+3192|0;Wi((e-q[d>>2]>>3)+1|0,8,d,g,f);e=q[g>>2];d=q[f>>2]}if((d|0)==(e|0)){break a}q[a+3196>>2]=d+8;q[d>>2]=b;q[d+4>>2]=c;Bj(q[a+3232>>2]);return}J(10026,9962,493,10101);G()}J(12430,9962,533,12454);G()}function I1(a){var b=0;a:{if(o[a+104|0]&1){break a}b=q[a+84>>2];if(b){Ni(b)}b=q[a+76>>2];if(!b){break a}Ni(b)}b:{if(o[a+72|0]&1){break b}b=q[a+64>>2];if(!b){break b}Ni(b)}c:{if(o[a+60|0]&1){break c}b=q[a+48>>2];if(!b){break c}Ni(b)}d:{if(o[a+44|0]&1){break d}b=q[a+36>>2];if(!b){break d}Ni(b)}e:{if(o[a+32|0]&1){break e}b=q[a+20>>2];if(!b){break e}Ni(b)}return a}function zl(a,b,c,d){var e=0,f=0,g=0,h=0;e=r[d+74|0];o[d+74|0]=e-1|e;g=w(b,c);e=q[d+4>>2];f=q[d+8>>2]-e|0;h=g;a:{if((f|0)<1){break a}h=e;e=f>>>0>>0?f:g;Ti(a,h,e);q[d+4>>2]=e+q[d+4>>2];a=a+e|0;h=g-e|0}e=h;if(e){while(1){b:{if(!nC(d)){f=Mi[q[d+32>>2]](d,a,e)|0;if(f+1>>>0>1){break b}}return(g-e>>>0)/(b>>>0)|0}a=a+f|0;e=e-f|0;if(e){continue}break}}return b?c:0}function oma(a,b,c,d,e,f){if(o[a+141|0]&1){Pi(4,37377,38924,0);return 1}a=q[b+12>>2];if(a){while(1){if((c|0)==q[a>>2]&q[a+4>>2]==(d|0)){return 2}a=q[a+16>>2];if(a){continue}break}}a=$i(24);q[a+16>>2]=q[b+12>>2];q[a+12>>2]=1;q[a>>2]=c;q[a+4>>2]=d;q[b+12>>2]=a;q[a+8>>2]=f;b=$i(12);c=q[e+16>>2];q[b+8>>2]=a;q[b>>2]=c;q[b+4>>2]=e;q[e+16>>2]=b;q[a+20>>2]=b;return 0}function js(a,b,c,d){if(q[a+12>>2]<=(b|0)){a=q[a+8>>2];if(!b){bj(a,c,d-c|0);return}Qi(a,146555,0);return}c=(b<<3)+a|0;b=c;a:{b:{c:{c=q[c+20>>2];switch(c+2|0){case 1:break b;case 0:break c;default:break a}}b=(q[b+16>>2]-q[a>>2]|0)+1|0;a=q[a+8>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;return}Qi(q[a+8>>2],146577,0)}bj(q[a+8>>2],q[b+16>>2],c)}function dz(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=b+24|0;if(Jj(e,0)){q[c+24>>2]=0;q[c+16>>2]=1;q[c+20>>2]=0;q[c+8>>2]=0;q[c>>2]=1;q[c+4>>2]=0;d=Co(c+16|0,e,a+4|0);a:{if(d){break a}d=ck(a,c,c+16|0,c+16|0);if(d){break a}d=ck(a,b,b,c);if(d){break a}b=b+12|0;d=ck(a,b,b,c);if(d){break a}d=ck(a,b,b,c+16|0);if(d){break a}d=Bk(e,1)}ij(c+16|0);ij(c)}Ii=c+32|0;return d}function ZC(a,b){var c=0,d=0,e=0;e=Ii-32|0;Ii=e;c=o[b|0];a:{if(!(r[b+1|0]?c:0)){c=pC(a,c);break a}Ui(e,0,32);d=r[b|0];if(d){while(1){c=(d>>>3&28)+e|0;q[c>>2]=q[c>>2]|1<>>3&28)+e>>2]>>>d&1){c=b;break a}d=r[b+1|0];c=b+1|0;b=c;if(d){continue}break}}Ii=e+32|0;return c-a|0}function Uz(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0;f=Ii-1056|0;Ii=f;a:{if(b){if(!e){break a}q[f+1048>>2]=0;h=q[a+5140>>2];Gj(h);Mo(b,f+16|0);i=Wl(f+16|0,hj(f+16|0));g=Li;j=g;g=iH(a,f+16|0,i,g,e,f+12|0);b:{if(g){break b}g=0;if(q[e>>2]){break b}g=sH(a,q[f+12>>2],b,f+16|0,i,j,c,d,e)}Bj(h);Ii=f+1056|0;return g}J(24992,24997,750,25017);G()}J(25032,24997,751,25017);G()}function Kj(a,b,c){var d=0,e=0,f=0;d=Ii-32|0;Ii=d;f=q[a+12>>2];e=q[a>>2];e=q[e+8>>2]-q[e+12>>2]>>4;if((f|0)!=(e|0)){b=q[a+8>>2];a=q[a+4>>2];q[d+12>>2]=e;q[d+8>>2]=f;q[d>>2]=a;q[d+4>>2]=b;Pi(4,122749,123394,d);J(123465,122672,1492,123484);G()}q[d+28>>2]=c;Ms(q[a>>2],1);bF(q[a>>2],b,q[d+28>>2]);fm(q[a>>2],2);q[a+16>>2]=-8388608;a=Fo(q[a>>2]);Ii=d+32|0;return a}function rza(a,b){u[a>>2]=u[b>>2];u[a+4>>2]=u[b+4>>2];u[a+8>>2]=u[b+8>>2];u[a+12>>2]=u[b+12>>2];u[a+16>>2]=u[b+16>>2];u[a+20>>2]=u[b+20>>2];u[a+24>>2]=u[b+24>>2];u[a+28>>2]=u[b+28>>2];u[a+32>>2]=u[b+32>>2];u[a+36>>2]=u[b+36>>2];u[a+40>>2]=u[b+40>>2];u[a+44>>2]=u[b+44>>2];u[a+48>>2]=u[b+48>>2];u[a+52>>2]=u[b+52>>2];u[a+56>>2]=u[b+56>>2];u[a+60>>2]=u[b+60>>2]}function kja(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=-2;if(!Qj(q[a+12>>2],q[a+16>>2],260608,c+12|0)){b=q[c+12>>2];if(q[b+4>>2]){while(1){d=w(e,160);Ek(q[a+20>>2],q[(d+q[b>>2]|0)+48>>2]);b=q[c+12>>2];d=q[(d+q[b>>2]|0)+56>>2];if(r[d|0]){Ek(q[a+20>>2],d);b=q[c+12>>2]}e=e+1|0;if(e>>>0>2]){continue}break}}q[q[a+24>>2]>>2]=b;b=0}Ii=c+16|0;return b|0}function apa(a){a=a|0;var b=0,c=0,d=0;b=Ii-48|0;Ii=b;d=q[a+16>>2];a:{if(!d){break a}c=q[q[a>>2]+8>>2];q[b+32>>2]=0;q[b+36>>2]=0;q[b+16>>2]=1148846080;q[b+20>>2]=1148846080;q[b+8>>2]=-998637568;q[b>>2]=-998637568;q[b+4>>2]=-998637568;q[b+24>>2]=1148846080;q[b+40>>2]=c>>>0>d>>>0?d:c;q[b+36>>2]=166;q[b+32>>2]=167;c=-1e3}q[q[a+12>>2]>>2]=0;Ii=b+48|0;return c|0}function EV(a){var b=0;b=q[a+68>>2];q[b+604>>2]=1732584193;q[b+608>>2]=-271733879;q[b+596>>2]=0;q[b+600>>2]=0;q[b+612>>2]=-1732584194;q[b+616>>2]=271733878;b=q[a+68>>2];q[b+692>>2]=1732584193;q[b+696>>2]=-271733879;q[b+684>>2]=0;q[b+688>>2]=0;q[b+708>>2]=-1009589776;q[b+700>>2]=-1732584194;q[b+704>>2]=271733878;rs(q[a+68>>2]+776|0,0);Zp(q[a+68>>2]+888|0,1)}function wwa(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=r[b+3|0];a:{if((d|0)==255){d=r[zj(b,0)+108e3|0];e=r[zj(b,1)+108e3|0];f=r[zj(b,2)+108256|0];b=c+8|0;o[b+3|0]=8;o[b+2|0]=f;o[b+1|0]=e;o[b|0]=d;Uw(a,0,b,1);break a}e=r[zj(b,0)+108256|0];f=r[zj(b,1)+108256|0];b=r[zj(b,2)+109968|0];o[c+3|0]=r[d+109712|0];o[c+2|0]=b;o[c+1|0]=f;o[c|0]=e;Uw(a,0,c,0)}Ii=c+16|0}function h2(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;f=a+4|0;a:{b:{g=q[a+8>>2];e=q[a+4>>2];d=g-e|0;if(d>>>0>>0){if(o[a+12|0]&1){break b}d=c-d|0;Wi((((d|0)>32768?d:32768)+g|0)-q[a>>2]|0,1,a,a+8|0,f);e=q[a+4>>2];d=q[a+8>>2]-e|0}if(c>>>0>d>>>0){break a}Ti(e,b,c);q[f>>2]=q[f>>2]+c;return 1}J(136463,136381,493,136538);G()}J(136352,136381,540,136437);G()}function VJ(a,b,c){var d=0,e=0;a:{b:{e=b&65535;d=q[a+32>>2];if(e>>>0<(q[a+36>>2]-d|0)/592>>>0){if(s[(w(e,592)+d|0)+568>>1]!=(b>>>16|0)){break b}d=w(e,592)+d|0;if(s[d+570>>1]!=(b&65535)){break a}q[d+412>>2]=q[d+412>>2]&-1048577|(c?1048576:0);if(c){XJ(a,b)}return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Mha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=Ii-336|0;Ii=b;f=nj(b+56|0,a,0,76581,2168);d=$j(a,1);c=Li;e=c;Dj(a,2,4);g=uj(a,2,b+52|0);c=Pz(q[74445],d,c,g,q[b+52>>2]);if(c){q[b+32>>2]=aj(d,e);q[b+24>>2]=d;q[b+28>>2]=e;q[b+16>>2]=c;sj(b+80|0,256,(c|0)==-3?76793:(c|0)==-15?76835:76900,b+16|0);q[b>>2]=b+80;h=Qi(a,75832,b)}mj(f);Ii=b+336|0;return h|0}function ft(a,b,c,d){var e=0;e=Ii-32|0;Ii=e;if(!(b&15)){a:{if(c>>>0>=9){q[b>>2]=1112818760;q[b+4>>2]=4;q[e+24>>2]=0;q[e+28>>2]=0;q[e+16>>2]=0;q[e+20>>2]=0;a=QG(a,b,b,b+8|0,c-8|0,d,e+16|0);b:{if(o[e+28|0]&1){break b}b=q[e+16>>2];if(!b){break b}Ni(b)}a=a+8|0;break a}q[e+4>>2]=8;q[e>>2]=c;Qi(a,131322,e);a=0}Ii=e+32|0;return a}J(131284,131008,717,131311);G()}function asa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a+80>>2];if(q[c+4>>2]==q[c+8>>2]){Pi(4,12654,12665,0);return-1e3}d=pra(c,q[a+76>>2],q[a>>2],s[a+92>>1]);b=q[d+28>>2];e=a- -64|0;f=q[e+4>>2];q[b+12>>2]=q[e>>2];q[b+16>>2]=f;q[b+20>>2]=q[e+8>>2];b=q[c+4>>2];if((b|0)!=q[c+8>>2]){q[c+4>>2]=b+4;q[b>>2]=d;q[q[a+88>>2]>>2]=d;return 0}J(13605,13629,533,13685);G()}function U0(a){Fs(a);q[a+132>>2]=0;q[a+124>>2]=1;q[a+128>>2]=0;q[a+144>>2]=0;q[a+136>>2]=1;q[a+140>>2]=0;q[a+156>>2]=0;q[a+148>>2]=1;q[a+152>>2]=0;q[a+168>>2]=0;q[a+160>>2]=1;q[a+164>>2]=0;q[a+180>>2]=0;q[a+172>>2]=1;q[a+176>>2]=0;q[a+192>>2]=0;q[a+184>>2]=1;q[a+188>>2]=0;q[a+204>>2]=0;q[a+196>>2]=1;q[a+200>>2]=0;q[a+216>>2]=0;q[a+208>>2]=1;q[a+212>>2]=0}function Pda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);a:{if(On(a,2)){c=nl(a,2);d=Li;break a}c=Oi(kj(a,2,0));d=Li}if(!aK(c,d)){q[b>>2]=aj(c,d);Qi(a,202404,b)}Lea(f,q[b+12>>2],c,d);if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){J(202517,202233,1243,202537);G()}Ii=b+16|0;return 0}function O9(a,b,c,d,e){var f=0,g=0,h=0;f=Ii-32|0;Ii=f;h=-2;a:{if(!a|!b|q[a+28>>2]!=(b|0)){break a}g=V6(q[a>>2],q[b+4>>2],c,d);q[e+4>>2]=-17;q[e+8>>2]=0;q[e>>2]=g;h=0;if(g){break a}g=q[b+8>>2];if(!g){break a}q[f>>2]=q[a>>2];q[f+4>>2]=q[b+20>>2];q[f+12>>2]=q[c>>2];a=q[d>>2];q[f+24>>2]=e+8;q[f+20>>2]=b+12;q[f+16>>2]=a;q[e+4>>2]=Mi[g|0](f)}Ii=f+32|0;return h}function MH(a,b,c,d){var e=0,f=0,g=0;a:{e=q[a+68>>2];if(q[a+72>>2]-e>>3>>>0>b>>>0){f=q[a+52>>2];if((q[a+56>>2]-f|0)/48>>>0<=b>>>0){break a}g=d;d=w(b,48)+f|0;q[g>>2]=w(xt(yt(q[d+28>>2])),q[d+20>>2]);b=s[((b<<3)+e|0)+4>>1];d=q[a+88>>2];a=q[a+84>>2];if(b>>>0>=d-a>>>0){break a}q[c>>2]=a+b;return}J(113739,113682,631,113785);G()}J(114155,114013,479,114166);G()}function L1(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=-13;d=q[239672];f=q[d+16>>2];if(f){Gj(f);d=q[239672]}e=q[d+80>>2];a:{if(!e){break a}e=q[q[d+76>>2]+(Cza(b,c,e)<<2)>>2];if((e|0)==-1){break a}h=q[d+84>>2];while(1){d=h+(e<<4)|0;if((b|0)!=q[d>>2]|q[d+4>>2]!=(c|0)){e=q[d+12>>2];if((e|0)!=-1){continue}break a}break}q[a+8>>2]=b;q[a+12>>2]=c;g=0}if(f){Bj(f)}return g}function JE(a,b,c){var d=0,e=0,f=0,g=0,h=0;g=Ii-384|0;Ii=g;d=-56;f=q[a+24>>2];a:{if(f>>>0>384|384-f>>>0>>0){break a}e=Ui(g,0,384);d=-52;if(Mi[q[a+312>>2]](q[a+316>>2],e,f)|0){break a}d=q[a+24>>2];f=e;h=e;if(!(!b|!c)){Ti(d+e|0,b,c);d=c+d|0}d=Dva(f,h,d);b:{if(d){break b}d=qN(a,e);if(d){break b}q[a+16>>2]=1;d=0}Mi[q[65677]](e,0,384)|0}Ii=g+384|0;return d}function oo(a,b,c,d){var e=0,f=0,g=0;g=Ii-16|0;Ii=g;a:{if((Vi(a,b)|0)==7){b:{c:{e=_i(a,b,q[74077],0);if(q[e+4>>2]!=2){break c}if(qr(q[74076],q[e>>2],g+8|0)){if(!c){break a}Qi(a,68170,0)}if(q[e+4>>2]!=2){break c}f=q[e>>2]+4|0;break b}f=e}f=q[f>>2];if(Vo(f)){if(!d){break a}q[d>>2]=e;break a}f=0;if(!c){break a}Qi(a,66244,0)}Nk(a,b,65665)}Ii=g+16|0;return f}function nra(a){var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[a>>2];e=q[d>>2];q[c+12>>2]=285976;b=vw(d,285976,0);a:{if(b){if(Mt(q[a>>2],b)){break a}a=q[b+96>>2];e=q[b+100>>2];if((a|0)!=q[71492]|(e|0)!=q[71493]){xr(d+3144|0,a,e);a=q[71493];q[b+96>>2]=q[71492];q[b+100>>2]=a}Ir(d,b);b=0;break a}b=0;a=q[c+12>>2];if((a|0)==285976){break a}cj(e,a)}Ii=c+16|0;return b}function h0(a){a=a|0;var b=0,c=0,d=0;d=Ii-16|0;Ii=d;c=Lm(a,145545);b=q[c>>2];if(!b){Qi(a,145617,0);b=q[c>>2]}a:{if(!Kn(b)){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;a=1;break a}b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[d>>2]=ql(b);Lj(a,145661,d);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;a=3}Ii=d+16|0;return a|0}function _z(a,b,c,d,e,f,g){var h=0,i=x(0),j=x(0);h=Ii-1056|0;Ii=h;i=u[a+60>>2];u[g+8>>2]=i;j=u[a+64>>2];u[g+12>>2]=j;q[h+16>>2]=a;i=x(i+j);u[h+20>>2]=i*f;a=q[h+20>>2];q[h+8>>2]=q[h+16>>2];q[h+12>>2]=a;a=Ax(b,d?c:x(3.4028234663852886e+38),h+32|0,h+28|0,h+8|0,d^1);c=u[h+28>>2];q[g+16>>2]=a;u[g>>2]=c;u[g+4>>2]=x(x(i*e)*x(a>>>0))-x(x(e+x(-1))*i);Ii=h+1056|0}function BW(a,b,c,d,e,f,g,h){var i=0,j=0,k=0;i=-16e3;a:{if(!q[c>>2]){break a}b:{if(!c){break b}j=q[c>>2];if(!j){break b}k=Mi[q[j+12>>2]](a)|0}if(!k){return-16128}if((a|0)==6){if(!b){break a}i=-17280;if(nE(c)>>>0>h>>>0){break a}i=kE(q[c+4>>2],d,f,e,q[b>>2],q[b+4>>2],g);if(i){break a}return nE(c)>>>0>>0?-14592:0}if(b){break a}i=mE(c,d,e,f,g,h)}return i}function vQ(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-1040|0;Ii=b;d=kj(a,1,b+1036|0);q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;a=q[b+1036>>2];c=a-1|0;q[b+1036>>2]=c;if(a){e=b+1036|0;while(1){a=q[b>>2];if(e>>>0<=a>>>0){ml(b);c=q[b+1036>>2];a=q[b>>2]}c=r[c+d|0];q[b>>2]=a+1;o[a|0]=c;a=q[b+1036>>2];c=a-1|0;q[b+1036>>2]=c;if(a){continue}break}}zm(b);Ii=b+1040|0;return 1}function pya(){q[61057]=q[71906];q[71906]=244200;q[61085]=q[71906];q[71906]=244312;q[61147]=q[71906];q[71906]=244560;q[61243]=q[71906];q[71906]=244944;q[61287]=q[71906];q[71906]=245120;q[61329]=q[71906];q[71906]=245288;q[61371]=q[71906];q[71906]=245456;q[61413]=q[71906];q[71906]=245624;q[61435]=q[71906];q[71906]=245712;q[61453]=q[71906];q[71906]=245784}function TE(a,b,c){var d=0,e=0,f=0;e=Wm(c);d=-108;f=q[a>>2];a:{if(f>>>0>>0|f-b>>>0>>0){break a}d=f-e|0;q[a>>2]=d;d=Dn(c,d,e);if(d){break a}b:{if(q[c>>2]!=1){break b}c=q[a>>2];if(o[c|0]>-1){break b}d=-108;if((c-b|0)<1){break a}c=c-1|0;q[a>>2]=c;o[c|0]=0;e=e+1|0}d=UE(a,b,e);if((d|0)<0){break a}a=SE(a,b,2);if((a|0)<0){return a}d=a+(d+e|0)|0}return d}function Nya(){q[64585]=q[71906];q[71906]=258312;q[64625]=q[71906];q[71906]=258472;q[64659]=q[71906];q[71906]=258608;q[64673]=q[71906];q[71906]=258664;q[64695]=q[71906];q[71906]=258752;q[64715]=q[71906];q[71906]=258832;q[64735]=q[71906];q[71906]=258912;q[64755]=q[71906];q[71906]=258992;q[64775]=q[71906];q[71906]=259072;q[64813]=q[71906];q[71906]=259224}function Fea(a,b,c){var d=0,e=0,f=0;f=-5;d=q[a+164>>2];a:{if(!d){break a}d=q[q[a+160>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+168>>2];while(1){e=a+w(d,40)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+32>>2];if((d|0)!=-1){continue}break a}break}b=a+w(d,40)|0;a=b;o[a+12|0]=r[a+12|0]|2;a=q[a+24>>2];if(!a){return 0}Ni(a);f=0;q[b+24>>2]=0}return f}function Vba(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=x(0),i=x(0);b=Ii-48|0;Ii=b;f=nj(b+24|0,a,0,202233,3912);gj(a);g=_i(a,-1,q[213927],204267);Ri(a,-2);d=tj(a,1,0);c=Nn(a,2);a:{if(c){a=c+8|0;e=c+4|0;break a}c=Bl(a,2);a=c+8|0;e=c+4|0}h=u[c>>2];i=u[e>>2];u[b+8>>2]=u[a>>2];u[b+4>>2]=i;u[b>>2]=h;$aa(g,s[d+570>>1]|s[d+568>>1]<<16,b);mj(f);Ii=b+48|0;return 0}function voa(a){a=a|0;var b=0,c=0,d=0;b=Ii-48|0;Ii=b;c=q[a+4>>2];a=q[q[a+16>>2]>>2];d=mK(q[a+8>>2]);if(d){q[b+32>>2]=d;Pi(4,40439,42282,b+32|0)}Hea(q[a+8>>2]);Kea(q[a+8>>2]);Iea(q[a+8>>2]);Jea(q[a+8>>2]);a:{if(XK(q[a+8>>2],c)){a=$J(q[a+8>>2]);if(!a){break a}q[b>>2]=a;Pi(4,40439,42239,b);break a}q[b+16>>2]=q[c+88>>2];Pi(4,40439,43155,b+16|0)}Ii=b+48|0}function oP(a,b,c,d){var e=0,f=0,g=0;g=Ii-16|0;Ii=g;a:{b:{e=q[b+80>>2];if(e){if(!c){break b}while(1){e=e-1|0;f=(e<<3)+b|0;q[g+12>>2]=q[f+4>>2];f=Mi[c|0](d,q[f>>2],e,g+12|0)|0;if(f){break a}q[a>>2]=q[a>>2]|q[g+12>>2];if(e){continue}break}}f=0;break a}c=q[a>>2];while(1){e=e-1|0;c=q[((e<<3)+b|0)+4>>2]|c;q[a>>2]=c;if(e){continue}break}}Ii=g+16|0;return f}function m5(a){var b=0;a:{if(o[a+116|0]&1){break a}b=q[a+104>>2];if(!b){break a}Ni(b)}b:{if(o[a+100|0]&1){break b}b=q[a+80>>2];if(b){Ni(b)}b=q[a+72>>2];if(!b){break b}Ni(b)}c:{if(o[a+68|0]&1){break c}b=q[a+48>>2];if(b){Ni(b)}b=q[a+40>>2];if(!b){break c}Ni(b)}d:{if(o[a+36|0]&1){break d}b=q[a+16>>2];if(b){Ni(b)}b=q[a+8>>2];if(!b){break d}Ni(b)}return a}function lba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-134217729|(c?134217728:0);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function _q(a,b,c,d,e,f){var g=0,h=0;g=q[c>>2];a:{if((g|0)>=((e|0)/2|0)){if((e|0)>(g|0)){break a}Yk(a,f,0);break a}e=g<<1;e=(e|0)>4?e:4}if(e+1>>>0<=4294967293/(d>>>0)>>>0){f=q[a+16>>2];h=b;g=w(q[c>>2],d);b=w(d,e);d=Mi[q[f+12>>2]](q[f+16>>2],h,g,b)|0;if(!(d|!b)){Nj(a,4)}q[f+68>>2]=q[f+68>>2]+(b-g|0);q[c>>2]=e;return d}Yk(a,141016,0);q[c>>2]=e;return 0}function G1(a,b){var c=0,d=0,e=0,f=0;a:{b:{if(b){Mi[q[q[b+8>>2]+16>>2]](q[b+4>>2]);d=q[a+16>>2];if(!d){break b}c=s[a+22>>1];if(!c|s[a+20>>1]>>0){break a}e=q[b>>2];f=a;a=c-1|0;p[f+22>>1]=a;p[((a&65535)<<1)+d>>1]=e;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;return}J(209580,209588,128,209645);G()}J(209850,209799,140,209881);G()}J(209886,209799,141,209881);G()}function YV(a){var b=0,c=0,d=0,e=0,f=0;c=qD(q[a+104>>2]+2|0);b=Li;a:{if(!(r[q[a>>2]+185|0]&8)){break a}e=q[a+156>>2];d=q[a+152>>2];if((b|0)==(e|0)&c>>>0>d>>>0|b>>>0>e>>>0){break a}f=-1;b=e-(b+(c>>>0>d>>>0)|0)|0;c=d-c|0;if(!b&c>>>0>63|b){break a}b=q[a+160>>2];d=q[a+164>>2];a=c&31;return((c&63)>>>0>=32?d>>>a|0:((1<>>a)&1?-1:0}return f}function KH(a,b,c){var d=0,e=0,f=0;e=Ii-16|0;Ii=e;a:{b:{d=q[a+2148>>2];c:{if(!d){break c}d=q[q[a+2144>>2]+((b>>>0)%(d>>>0)<<2)>>2];if((d|0)==-1){break c}a=q[a+2152>>2];while(1){f=a+w(d,280)|0;if(q[f>>2]==(b|0)){break b}d=q[f+272>>2];if((d|0)!=-1){continue}break}}q[e>>2]=b;Pi(4,113613,113889,e);q[c>>2]=0;break a}Ti(c,(a+w(d,280)|0)+8|0,264)}Ii=e+16|0}function HM(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;q[b>>2]=q[a+4>>2];q[b+12>>2]=q[a+276>>2];q[b+8>>2]=q[a+152>>2];q[b+4>>2]=q[a+288>>2];b=b+16|0;So(b,3,8);Em(b,Oi(4161),Li,a+216|0);d=Oi(4170);q[c+12>>2]=q[a+220>>2];Em(b,d,Li,c+12|0);if(q[a+292>>2]){d=Oi(3689);q[c+8>>2]=q[a+284>>2];Em(b,d,Li,c+8|0);d=Oi(3701);q[c+4>>2]=q[a+292>>2];Em(b,d,Li,c+4|0)}Ii=c+16|0}function kba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-50331649|c<<24&50331648;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function jba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-67108865|(c?67108864:0);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function S7(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-16|0;Ii=b;a:{b:{if(!Oj(a,1)){q[b>>2]=115561;a=Qi(a,116465,b);break b}c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[79180],119558);Ri(a,-2);if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){break a}f=rr(a,q[q[d+304>>2]+2384>>2]),g=Li,e=q[75002],Mi[e](f|0,g|0);a=0}Ii=b+16|0;return a|0}J(115568,115465,478,119531);G()}function y6(a,b,c){var d=0;d=Ii-48|0;Ii=d;q[d+16>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d+40>>2]=c;q[d+36>>2]=124;q[d+32>>2]=a;q[d>>2]=0;q[d+4>>2]=0;q[d+20>>2]=-1;o[d+45|0]=r[b+9|0];o[d+44|0]=r[b+8|0];gH(d,q[b>>2],q[b+4>>2]);a:{if(o[d+28|0]&1){break a}a=q[d+8>>2];if(a){Ni(a)}a=q[d>>2];if(!a){break a}Ni(a)}Ii=d+48|0}function pF(a){var b=0,c=0,d=0,e=0;b=q[a+116>>2];if(b){b=b+q[a+32>>2]|0;if(q[b+8>>2]!=6){Nj(a,5)}c=q[a+8>>2];d=c-16|0;e=q[d+4>>2];q[c>>2]=q[d>>2];q[c+4>>2]=e;q[c+8>>2]=q[d+8>>2];d=q[b+4>>2];c=q[a+8>>2]-16|0;q[c>>2]=q[b>>2];q[c+4>>2]=d;q[c+8>>2]=q[b+8>>2];b=q[a+8>>2];if((q[a+28>>2]-b|0)<=16){Mk(a,1);b=q[a+8>>2]}q[a+8>>2]=b+16;Ul(a,b-16|0,1)}Nj(a,2)}function _ra(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=q[q[a+16>>2]>>2];a:{b=q[a+8>>2];c=q[b+4>>2];d=q[b>>2];if((c|0)==(d|0)){break a}g=c-d>>2;a=0;while(1){f=(a<<2)+d|0;if(q[f>>2]!=(e|0)){a=a+1|0;if(g>>>0>a>>>0){continue}break a}break}q[f>>2]=q[c-4>>2];a=q[b+4>>2]-4|0;q[b+4>>2]=a;if(a>>>0>=t[b>>2]){break a}J(13711,13629,516,13701);G()}Fra(e);return 0}function W9(a){var b=0;b=Ui($i(96),0,96);q[b+80>>2]=0;q[b+84>>2]=0;q[b+72>>2]=0;q[b+76>>2]=0;q[b+60>>2]=-1;q[b+64>>2]=0;q[b+52>>2]=0;q[b>>2]=a;AA(b+40|0,64,256);if(o[b+24|0]&1){J(149962,149779,493,150037);G()}Wi(16,4,b+12|0,b+20|0,b+16|0);q[b+36>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+88>>2]=0;q[b+92>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[a+76>>2]=b;return b}function Ps(a,b,c){var d=0,e=0,f=0,g=0;a:{if((c|0)!=-1){d=q[b>>2];if((d|0)==-1){break a}b=q[q[a>>2]+12>>2];while(1){e=d;f=(e<<2)+b|0;g=q[f>>2];d=(g>>>14|0)-131071|0;d=(d|0)==-1?-1:(d+e|0)+1|0;if((d|0)!=-1){continue}break}b=f;e=(e^-1)+c|0;c=e>>31;if((c^c+e)>=131072){Sj(q[a+12>>2],141849);g=q[f>>2]}q[b>>2]=(g&16383|e<<14)+2147467264}return}q[b>>2]=c}function sV(a,b){var c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;f=277136;c=174231;e=512;a:{while(1){if(q[f>>2]&b){q[d+20>>2]=c;q[d+16>>2]=181785;c=cp(a,e,174182,d+16|0);if((c|0)<0|c>>>0>=e>>>0){break a}e=e-c|0;b=q[f>>2]^b;a=a+c|0}c=f;f=c+8|0;c=q[c+12>>2];if(c){continue}break}if(b){q[d>>2]=181785;a=cp(a,e,174188,d);if((a|0)<0|a>>>0>=e>>>0){break a}}}Ii=d+32|0}function r4(a){a=a|0;var b=0,c=x(0),d=x(0),e=0;e=fj(a,1);b=yj(a,64);q[b+4>>2]=0;q[b+8>>2]=0;q[b>>2]=1065353216;q[b+44>>2]=0;q[b+48>>2]=0;q[b+28>>2]=0;q[b+32>>2]=0;q[b+60>>2]=1065353216;q[b+12>>2]=0;q[b+16>>2]=0;c=x(e);d=Nl(c);u[b+40>>2]=d;c=Lk(c);u[b+24>>2]=c;u[b+20>>2]=d;q[b+52>>2]=0;q[b+56>>2]=0;u[b+36>>2]=-c;Zi(a,-1e4,134048);xj(a,-2);return 1}function q4(a){a=a|0;var b=0,c=x(0),d=x(0),e=0;e=fj(a,1);b=yj(a,64);q[b+44>>2]=0;q[b+48>>2]=0;q[b+36>>2]=0;q[b+28>>2]=0;q[b+20>>2]=1065353216;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+4>>2]=0;q[b+60>>2]=1065353216;c=x(e);d=Nl(c);u[b+40>>2]=d;c=Lk(c);u[b+32>>2]=c;u[b>>2]=d;q[b+52>>2]=0;q[b+56>>2]=0;u[b+8>>2]=-c;Zi(a,-1e4,134048);xj(a,-2);return 1}function p4(a){a=a|0;var b=0,c=x(0),d=x(0),e=0;e=fj(a,1);b=yj(a,64);q[b+24>>2]=0;q[b+28>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+44>>2]=0;q[b+48>>2]=0;q[b+40>>2]=1065353216;q[b+60>>2]=1065353216;c=x(e);d=Nl(c);u[b+20>>2]=d;c=Lk(c);u[b+4>>2]=c;u[b>>2]=d;q[b+32>>2]=0;q[b+36>>2]=0;q[b+52>>2]=0;q[b+56>>2]=0;u[b+16>>2]=-c;Zi(a,-1e4,134048);xj(a,-2);return 1}function nn(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;a:{if((xs(b,c)|0)<0){d=-10;break a}q[e+8>>2]=0;q[e>>2]=1;q[e+4>>2]=0;b:{if((a|0)==(c|0)){d=wk(e,c);if(d){break b}c=e}if((a|0)!=(b|0)){d=wk(a,b);if(d){break b}}q[a>>2]=1;d=q[c+8>>2];c=q[c+4>>2];while(1){b=c;if(c){c=b-1|0;if(!q[d+(c<<2)>>2]){continue}}break}cy(b,d,q[a+8>>2]);d=0}ij(e)}Ii=e+16|0;return d}function fba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-8388609|(c?8388608:0);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function cy(a,b,c){var d=0,e=0,f=0,g=0,h=0;a:{if(!a){break a}while(1){d=c;f=q[d>>2];c=f-e|0;q[d>>2]=c;g=q[b>>2];q[d>>2]=c-g;e=(c>>>0>>0)+(e>>>0>f>>>0)|0;c=d+4|0;b=b+4|0;h=h+1|0;if((h|0)!=(a|0)){continue}break}if(!e){break a}a=q[d+4>>2];q[d+4>>2]=a-e;if(a>>>0>=e>>>0){break a}a=d+8|0;while(1){b=q[a>>2];q[a>>2]=b-1;a=a+4|0;if(!b){continue}break}}}function Hea(a){var b=0,c=0,d=0,e=0,f=0;Ui(q[a+128>>2],255,q[a+132>>2]<<2);q[a+148>>2]=-1;q[a+152>>2]=0;q[a+140>>2]=q[a+136>>2];d=q[a+32>>2];c=q[a+36>>2]-d|0;b=(c|0)/592|0;if(c){e=b>>>0>1?b:1;c=0;while(1){b=w(c,592)+d|0;f=b;if(q[b+436>>2]==2){cw(a,s[b+570>>1]|s[b+568>>1]<<16,0)}q[b+432>>2]=0;q[f+436>>2]=0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}}function HU(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=1;b=ln(a,137981);q[c+8>>2]=0;e=kj(a,2,c+12|0);f=b+8|0;Yn(f);b=CD(b,e,q[c+12>>2],c+8|0,f);a:{if(b){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;if((b|0)==-2){b=138035}else{b=mm(b)}Xi(a,b);d=2;break a}b=q[c+8>>2];e=q[a+8>>2];q[e+8>>2]=3;v[e>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function r3(a){a=a|0;var b=0,c=x(0),d=0,e=0,f=0;e=Ii-32|0;Ii=e;f=nj(e+8|0,a,1,129431,518);b=kj(a,1,0);c=x(0);a:{if((Vi(a,2)|0)==-1){break a}c=x(fj(a,2))}b:{c:{d=jq(a);if(!d){break c}d=q[d>>2];if(!d){break c}c=Sm(d,b,c);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;break b}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}mj(f);Ii=e+32|0;return 1}function Zn(a,b){a:{if((b|0)>=1024){a=a*8.98846567431158e+307;if((b|0)<2047){b=b-1023|0;break a}a=a*8.98846567431158e+307;b=((b|0)<3069?b:3069)-2046|0;break a}if((b|0)>-1023){break a}a=a*2.2250738585072014e-308;if((b|0)>-2045){b=b+1022|0;break a}a=a*2.2250738585072014e-308;b=((b|0)>-3066?b:-3066)+2044|0}Mza(0,0);Mza(1,b+1023<<20);return a*+Nza()}function FJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-2097153|(c?2097152:0);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function oba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-196609|c<<16&196608;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function nj(a,b,c,d,e){var f=0;f=Ii-16|0;Ii=f;q[a+8>>2]=e;q[a+4>>2]=d;q[a>>2]=b;b=q[b+8>>2]-q[b+12>>2]>>4;q[a+16>>2]=c;q[a+12>>2]=b;d=0-b|0;if((d|0)>(c|0)){d=q[a+8>>2];e=q[a+4>>2];q[f+12>>2]=b;q[f+8>>2]=c;q[f>>2]=e;q[f+4>>2]=d;Pi(4,122749,123291,f);d=0-q[a+12>>2]|0;c=q[a+16>>2]}if((c|0)<(d|0)){J(123363,122672,1469,123380);G()}Ii=f+16|0;return a}function lw(a){var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;e=q[a+156>>2];q[b+8>>2]=0;q[b+12>>2]=0;q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;d=b+8|0;c=q[a+148>>2];if(!c){c=q[q[a+156>>2]+24>>2]}kk(d,q[c>>2],4);d=b+8|0;c=q[a+152>>2];if(!c){c=q[q[a+156>>2]>>2]}kk(d,c,72);kk(b+8|0,q[e+4>>2]+16|0,4);c=q[a+144>>2];if(c){At(c,b+8|0)}q[a+140>>2]=Rn(b+8|0);Ii=b+32|0}function jK(a,b,c,d){var e=0,f=0;a:{b:{e=b&65535;f=q[a+36>>2];a=q[a+32>>2];if(e>>>0<(f-a|0)/592>>>0){if(s[(a+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(e,592)|0;if(s[a+570>>1]!=(b&65535)){break a}o[c|0]=o[a+460|0]&1;o[d|0]=r[a+460|0]>>>1&1;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function dba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-524289|(c?524288:0);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function X8(a,b){var c=0,d=0,e=0;c=r[a|0];a:{if(!c){break a}while(1){e=d;b:{if(!((c|0)!=47?(c|0)!=92:0)){o[b+e|0]=47;while(1){c=r[a|0];if((c|0)!=47?(c|0)!=92:0){break b}a=a+1|0;continue}}o[b+e|0]=c;c=r[a+1|0];a=a+1|0}d=e+1|0;if(c?d>>>0<1024:0){continue}break}if(!e){d=1;break a}a=b+e|0;if(r[a|0]!=47){break a}o[a|0]=0}o[(d>>>0<1023?d:1023)+b|0]=0}function Gq(a,b,c,d){var e=0,f=0;e=Ii-160|0;Ii=e;Ti(e+8|0,214792,144);a:{b:{if(b-1>>>0>=2147483647){if(b){break b}b=1;a=e+159|0}q[e+52>>2]=a;q[e+28>>2]=a;f=-2-a|0;b=b>>>0>f>>>0?f:b;q[e+56>>2]=b;a=a+b|0;q[e+36>>2]=a;q[e+24>>2]=a;a=OC(e+8|0,c,d);if(!b){break a}b=q[e+28>>2];o[b-((b|0)==q[e+24>>2])|0]=0;break a}q[240513]=61;a=-1}Ii=e+160|0;return a}function Dz(a){var b=0,c=0,d=0,e=0;c=q[a+120>>2];d=q[a+108>>2];b=q[a+104>>2];if((d|0)!=(b|0)){while(1){e=q[q[b>>2]+8>>2];if(e){Mi[e|0](a);d=q[a+108>>2]}b=b+4|0;if((b|0)!=(d|0)){continue}break}}Zi(c,-10002,122717);Ni(qj(c,-1));Ri(c,-2);b=q[a+124>>2];if((b|0)!=-2){a=q[79288];if((a|0)<=0){Pi(4,122749,123218,0);a=q[79288]}q[79288]=a-1;Ho(c,-1e4,b)}}function Cla(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;a=q[a+376>>2];c=q[q[q[a+12>>2]+80>>2]+8>>2];a:{if(!c){break a}c=q[c>>2];if(!c){break a}e=q[c+3216>>2];f=q[c+3220>>2]}q[b>>2]=e;q[b+4>>2]=f;c=q[a+12>>2];e=q[c+100>>2];q[b+16>>2]=q[c+96>>2];q[b+20>>2]=e;a=to(q[a+12>>2],s[a+20>>1],b+24|0);if(a){q[d>>2]=a;Pi(4,40439,40447,d)}Ii=d+16|0}function cC(a,b){var c=0,d=0,e=0;if(!b){return 0}if(b>>>0<=25){d=q[a+20>>2];a:{while(1){if(b>>>0<=d>>>0){break a}e=0;c=q[a+4>>2];if(c>>>0>2]){q[a+4>>2]=c+1;e=r[c|0]}c=d+8|0;q[a+20>>2]=c;q[a+16>>2]=q[a+16>>2]|e<>>0<33){continue}break}J(106734,106647,334,106724);G()}return q[a+16>>2]&(-1<>2];a=q[a+32>>2];if(c>>>0<(f-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+560>>2]=d;q[a+564>>2]=e;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function pka(a){a=a|0;var b=0,c=0,d=0,e=0;b=q[q[a+8>>2]+8>>2];c=q[b+16>>2];d=q[b+12>>2];if((c|0)!=(d|0)){e=q[a>>2];a=0;c=d;while(1){cj(e,q[(a<<2)+c>>2]);a=a+1|0;c=q[b+12>>2];if(a>>>0>2]-c>>2>>>0){continue}break}}q[b+16>>2]=c;a=q[b+8>>2];if(a){Aj(a);q[b+8>>2]=0}a:{if(o[b+24|0]&1){break a}a=q[b+12>>2];if(!a){break a}Ni(a)}Ni(b);return 0}function eba(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-268435457|268435456;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function rE(a,b){var c=0,d=0,e=0,f=0;f=-16;a:{b:{if(b>>>0>1e4){break b}e=q[a+4>>2];if(e>>>0<=b>>>0){break a}c=e;while(1){d=c;c=c-1|0;if(q[q[a+8>>2]+(c<<2)>>2]?0:c){continue}break}b=b>>>0>d>>>0?b:d;c=bk(b,4);if(!c){break b}d=q[a+8>>2];if(d){Ti(c,d,b<<2);Mi[q[65677]](d,0,e<<2)|0;Ni(q[a+8>>2])}q[a+8>>2]=c;q[a+4>>2]=b;f=0}return f}return rl(a,b)}function kw(a,b,c){var d=0,e=0;d=q[c+160>>2];a:{if((d|0)>-1){break a}e=q[c+136>>2];if(!e){break a}cj(b,e);d=q[c+160>>2]}b=d&2147483647;if(b){d=q[c+156>>2];if(b>>>0>d>>>0){while(1){b:{if(r[a+17|0]){break b}}d=d+1|0;if((b|0)!=(d|0)){continue}break}}Ni(q[(r[a+17|0]?c+140|0:c+144|0)>>2]);Ni(q[c+148>>2]);Ni(q[c+152>>2])}a=q[c+164>>2];if(a){Aj(a)}}function LJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-61441|c<<12&61440;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Gl(a){var b=0,c=0;a:{c=a;b=q[a+5820>>2];b:{if((b|0)==16){b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5816|0];b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5817|0];p[a+5816>>1]=0;a=0;break b}if((b|0)<8){break a}b=q[a+20>>2];q[a+20>>2]=b+1;o[b+q[a+8>>2]|0]=r[a+5816|0];p[a+5816>>1]=r[a+5817|0];a=q[a+5820>>2]-8|0}q[c+5820>>2]=a}}function vC(a,b){var c=0,d=0,e=0;c=-1;a:{if(!b){break a}d=q[b>>2];if(!d){break a}e=q[d>>2]}b:{c:{switch(e-1|0){case 0:case 5:c=0;d:{if(!b){break d}d=q[b>>2];if(!d){break d}c=Mi[q[d+8>>2]](q[b+4>>2])|0}return t[a+12>>2]>c>>>0?-1:0;case 1:case 2:case 3:break c;default:break b}}b=q[q[b+4>>2]>>2];if(!b){break b}c=q[a+8>>2]>>>b-1&1?0:-1}return c}function fE(a){var b=0,c=0;b=(q[q[a>>2]+184>>2]>>>6&7)-1|0;a:{if(b>>>0<=3){b=q[(b<<2)+181348>>2];break a}b=16384}c=q[a+56>>2];if(c){c=r[c+116|0]-1|0;b:{if(c>>>0<=3){c=q[(c<<2)+181348>>2];break b}c=16384}b=b>>>0>c>>>0?c:b}a=q[a+64>>2];if(a){a=r[a+116|0]-1|0;c:{if(a>>>0<=3){a=q[(a<<2)+181348>>2];break c}a=16384}return a>>>0>>0?a:b}return b}function dja(a){a=a|0;var b=0,c=0,d=0,e=0;e=q[a>>2];b=q[q[a+8>>2]+8>>2];c=q[b+28>>2];if(c){cj(e,c)}d=q[b>>2];if((d|0)!=q[b+4>>2]){c=0;while(1){cj(e,q[(c<<2)+d>>2]);c=c+1|0;d=q[b>>2];if(c>>>0>2]-d>>2>>>0){continue}break}}c=q[b+24>>2];if(c){RH(c)}lq(q[a>>2],510,b);a:{if(o[b+12|0]&1){break a}a=q[b>>2];if(!a){break a}Ni(a)}Ni(b);return 0}function bca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-176|0;Ii=b;c=nj(b+152|0,a,0,202233,4271);tj(a,1,b+148|0);e=$j(a,2);f=Li;gj(a);g=_i(a,-1,q[213927],204267);Ri(a,-2);a:{b:{switch(MA(g,q[b+148>>2],e,f)+10|0){case 0:d=Kj(c,207917,0);break a;case 5:break b;default:break a}}q[b>>2]=ct(a,2,b+16|0);d=Kj(c,207967,b)}mj(c);Ii=b+176|0;return d|0}function Rx(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Ii-240|0;Ii=h;q[h>>2]=a;i=1;a:{if((d|0)<2){break a}k=0-b|0;f=a;while(1){f=f+k|0;j=d-2|0;g=f-q[(j<<2)+e>>2]|0;if((Mi[c|0](a,g)|0)>=0){if((Mi[c|0](a,f)|0)>-1){break a}}l=g;g=(Mi[c|0](g,f)|0)>-1;f=g?l:f;q[(i<<2)+h>>2]=f;i=i+1|0;d=g?d-1|0:j;if((d|0)>1){continue}break}}pN(b,h,i);Ii=h+240|0}function Cba(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=Ck(a,1,q[213928]);d=Ck(a,2,q[213928]);a:{if(!(d?b:0)){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}if(q[b>>2]!=q[d>>2]){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;break a}tj(a,1,c+12|0);tj(a,2,c+8|0);b=q[c+12>>2]==q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=b}q[a+8>>2]=q[a+8>>2]+16;Ii=c+16|0;return 1}function n0(a){var b=0,c=0;a:{b=Hu(a+16|0,160624);if(b){break a}c=a+4|0;b=Bk(c,1);if(b){break a}b=on(c,255);if(b){break a}b=Pl(c,c,19);if(b){break a}q[a+88>>2]=Ql(c);c=a+76|0;b=Hu(c,160631);if(b){break a}b=dp(c,252,1);if(b){break a}b=Bk(a+40|0,9);if(b){break a}b=Bk(a- -64|0,1);if(b){break a}ij(a+52|0);q[a+92>>2]=254;return 0}bo(a);return b}function eE(a){var b=0,c=0,d=0,e=0,f=0;b=q[a+200>>2]-q[a+192>>2]|0;c=q[a+76>>2];if(!c){return b}e=-27648;f=b;a:{b:{c:{d:{b=q[c+80>>2];d=0;e:{if(!b){break e}d=q[b+4>>2]}switch(d-2|0){case 0:break c;case 4:case 5:case 6:case 8:break d;default:break a}}a=q[c>>2];break b}b=b?q[b+24>>2]:0;a=(b+q[c+12>>2]|0)+(q[a+20>>2]>1?b:0)|0}e=f+a|0}return e}function Vn(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=e;e=0;i=e;f=c;c=0;e=Aza(h,e,f,c);j=Li;g=b;k=Aza(d,0,b,0);b=Li;d=Aza(d,l,f,c);c=b+d|0;b=Li;b=c>>>0>>0?b+1|0:b;f=b;d=b+e|0;b=j;b=d>>>0>>0?b+1|0:b;f=d;e=b;b=Aza(g,m,h,i)+c|0;d=Li;d=b>>>0>>0?d+1|0:d;g=d;d=d+f|0;q[a+8>>2]=d;q[a+12>>2]=d>>>0>>0?e+1|0:e;q[a>>2]=k;q[a+4>>2]=b}function U$(a,b){var c=0,d=0,e=0,f=0;d=a+3|0;c=r[a+3|0];f=!c;e=c|(r[a+1|0]<<16|r[a|0]<<24|r[a+2|0]<<8);a=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);b=a<<24|a<<8&16711680|(a>>>8&65280|a>>>24);a:{if(!(!c|(e|0)==(b|0))){while(1){a=d+1|0;c=r[d+1|0];f=!c;e=c|e<<8;if((b|0)==(e|0)){break a}d=a;if(c){continue}break}break a}a=d}return f?0:a-3|0}function T7(a){a=a|0;var b=0,c=0,d=0;c=q[a+8>>2]-q[a+12>>2]|0;d=Fv();b=yj(a,36);q[b+28>>2]=0;q[b+32>>2]=0;q[b+20>>2]=0;q[b+24>>2]=0;q[b+12>>2]=0;q[b+16>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b>>2]=d;q[b+28>>2]=0;q[b+24>>2]=-1;q[b+16>>2]=0;Zi(a,-1e4,115413);xj(a,-2);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(115440,115465,424,115497);G()}return 1}function Ku(a,b){var c=0;if(!b){return-24832}c=a;q[c>>2]=0;q[c+4>>2]=0;q[c+56>>2]=0;q[c+60>>2]=0;q[c+48>>2]=0;q[c+52>>2]=0;q[c+40>>2]=0;q[c+44>>2]=0;q[c+32>>2]=0;q[c+36>>2]=0;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;c=Mi[q[q[b+28>>2]+28>>2]]()|0;q[a+60>>2]=c;if(!c){return-24960}q[a>>2]=b;zy(a,0);return 0}function H6(a,b,c,d,e,f){var g=0,h=0;g=Ii-32|0;Ii=g;q[g+28>>2]=-1;h=K6(a,c,g+28|0);a:{if(h){q[g+16>>2]=h;Pi(4,31176,31645,g+16|0);break a}q[g+24>>2]=0;I6(g+24|0,a);h=a;a=q[g+24>>2];h=F6(h,a,c,d,q[g+28>>2],e);if(h){if(a){Ni(a)}q[g>>2]=h;Pi(4,31176,31751,g);break a}h=D6(b,a);if(h){if(!a){break a}Ni(a);break a}q[f>>2]=a;h=0}Ii=g+32|0;return h}function EQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-1040|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;if((e|0)>=1){g=b+1036|0;d=1;while(1){f=jj(a,d);if(f>>>0>=256){dk(a,d,146337)}c=q[b>>2];if(g>>>0<=c>>>0){ml(b);c=q[b>>2]}q[b>>2]=c+1;o[c|0]=f;c=(d|0)!=(e|0);d=d+1|0;if(c){continue}break}}zm(b);Ii=b+1040|0;return 1}function DJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-3073|c<<10&3072;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function g2(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=b+24|0;q[c>>2]=0;q[c+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;d=1;Wi(32768,1,b+16|0,c,b+16|4);c=h1(kj(a,1,0),al(a,1),b+16|0);a:{if(!c){c=a;a=q[b+16>>2];bj(c,a,q[b+20>>2]-a|0);break a}q[b>>2]=c;Qi(a,136258,b);d=0}b:{if(o[b+28|0]&1){break b}a=q[b+16>>2];if(!a){break b}Ni(a)}Ii=b+32|0;return d|0}function ela(a){a=a|0;var b=0,c=0,d=0;b=Ii+ -64|0;Ii=b;c=nj(b+8|0,a,1,73366,1183);d=q[q[jk(a)+80>>2]+8>>2];q[b+4>>2]=0;q[b>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;Ml(a,1,d,73150,b+4|0,b+32|0,b);a:{if(o[q[b>>2]+141|0]&1){break a}}Li=0;lk(a,0,0);mj(c);Ii=b- -64|0;return 1}function $_(a){var b=0,c=0,d=0;c=-6;a:{if(r[184711]!=49){break a}if(!a){return-2}q[a+24>>2]=0;b=q[a+32>>2];if(!b){q[a+40>>2]=0;q[a+32>>2]=1422;b=1422}if(!q[a+36>>2]){q[a+36>>2]=1423}d=Mi[b|0](q[a+40>>2],1,7116)|0;if(!d){return-4}q[a+28>>2]=d;q[d+52>>2]=0;b=__(a);c=0;if(!b){break a}Mi[q[a+36>>2]](q[a+40>>2],d);q[a+28>>2]=0;c=b}return c} - - - -function zn(a,b,c,d,e){b=b^d;d=r[(b>>>24|0)+163968|0];b=r[(b&255)+163712|0]|(r[(b>>>16&255)+164224|0]<<16|d<<24|r[(b>>>8&255)+164480|0]<<8);a=a^c;a=(d|b<<8)^(r[(a>>>16&255)+163968|0]<<16|r[(a>>>24|0)+163712|0]<<24|r[(a>>>8&255)+164224|0]<<8|r[(a&255)+164480|0]);b=Fza(a,16)^b;a=Fza(b,24)^a;q[e+4>>2]=a^q[e+4>>2];q[e>>2]=b^q[e>>2]^Fza(a,24)}function yda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=Ii-16|0;Ii=c;g=q[a+8>>2]-q[a+12>>2]>>4;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);e=1;f=$j(a,1);b=Li;h=b;d=Aea(d,f,b);b=Li;i=b;a:{if(d|b){lk(a,d,i);if((g+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(202310,202233,2069,206797);G()}q[c>>2]=aj(f,h);e=Qi(a,206757,c)}Ii=c+16|0;return e|0}function pO(a,b,c,d){var e=0,f=0;if((d|0)==1){f=b;e=q[a+8>>2]-q[a+4>>2]|0;b=b-e|0;c=c-((e>>31)+(f>>>0>>0)|0)|0}a:{if(t[a+20>>2]>t[a+28>>2]){Mi[q[a+36>>2]](a,0,0)|0;if(!q[a+20>>2]){break a}}q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;Mi[q[a+40>>2]](a,b,c,d)|0;if((Li|0)<0){break a}q[a+4>>2]=0;q[a+8>>2]=0;q[a>>2]=q[a>>2]&-17;return 0}return-1}function lp(a,b,c){var d=0,e=0,f=0;d=Cj(a,0,0,32);ar(a,d,5);q[d+28>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d+16>>2]=142616;p[d+6>>1]=255;e=d;a:{if(b+1>>>0<=268435455){f=Cj(a,0,0,b<<4);break a}f=mk(a)}q[e+12>>2]=f;e=q[d+28>>2];if((e|0)<(b|0)){while(1){q[((e<<4)+f|0)+8>>2]=0;e=e+1|0;if((e|0)!=(b|0)){continue}break}}q[d+28>>2]=b;ID(a,d,c);return d}function j2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;e=q[qj(a,1)>>2];c=jj(a,2);d=q[e>>2];a:{if(!((c|0)<1|(d|0)<(c|0))){f=fj(a,3);u[(q[e+4>>2]+(c<<2)|0)-4>>2]=f;a=0;break a}if((d|0)>=1){q[b+8>>2]=d;q[b+4>>2]=133984;q[b>>2]=134064;a=Qi(a,134606,b);break a}q[b+20>>2]=133984;q[b+16>>2]=134064;a=Qi(a,134653,b+16|0)}Ii=b+32|0;return a|0}function h3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;e=nj(d+8|0,a,1,129431,569);c=q[a+8>>2]-q[a+12>>2]>>4;f=kj(a,1,0);if((c|0)>=2){Dj(a,2,5);ej(a,2);Zi(a,-1,130097);b=0;a:{if(!Vi(a,-1)){break a}b=kj(a,-1,0)}Ri(a,-2);Ri(a,-2)}b=!(_h(f|0,b|0)|0?0:-1e3);c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=d+32|0;return 1}function tR(a,b,c,d,e){var f=0,g=0;q[d>>2]=0;q[e>>2]=0;a:{if(q[a+20>>2]!=3){break a}g=-31488;f=c;c=q[b>>2];if(f>>>0>>0){break a}f=d;c=r[c|0]-1&255;b:{if(c>>>0<=5){c=c+3|0;break b}c=0}q[f>>2]=c;if(!c){break a}c=r[q[b>>2]+1|0];c=(c|0)==1?1:((c|0)==3)<<2;q[e>>2]=c;if(!c){break a}if(bW(a,q[d>>2])){break a}q[b>>2]=q[b>>2]+2;g=0}return g}function _V(a){var b=0,c=0;ij(a+104|0);ij(a+116|0);b=q[a+128>>2];if(b){Mi[q[65677]](b,0,q[a+132>>2])|0;Ni(q[a+128>>2]);q[a+128>>2]=0;q[a+132>>2]=0}b=q[a+136>>2];if(b){Mi[q[65677]](b,0,q[a+140>>2])|0;Ni(q[a+136>>2]);q[a+136>>2]=0;q[a+140>>2]=0}c=q[a+84>>2];if(c){while(1){b=q[c+8>>2];Ni(c);c=b;if(b){continue}break}}Mi[q[65677]](a,0,188)|0}function Yja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a+20>>2];b=$i(12);q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;f=q[a>>2];d=r[c+4|0];o[b+8|0]=d;o[b+8|0]=d|r[c+5|0]<<1;e=Pk(q[c>>2]);q[b+4>>2]=e;a:{b:{if(d){Aj(c);break b}d=ak(f,e,b);Aj(c);if(d){break a}}q[q[a+24>>2]+8>>2]=b;return 0}c=q[b>>2];if(c){cj(q[a>>2],c)}Ni(q[b+4>>2]);Ni(b);Ni(b);return d|0}function EJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-769|c<<8&768;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Zja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;d=q[q[a+32>>2]+8>>2];e=DH();f=q[a+16>>2];b=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[63062],c+28|0)){break a}b=c+8|0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b>>2]=q[c+28>>2];q[b+8>>2]=Oi(f);q[b+12>>2]=Li;BH(e,b);Aj(q[c+28>>2]);if(d){fA(d)}q[q[a+32>>2]+8>>2]=e;b=0}Ii=c+32|0;return b|0}function V_(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;c=1;b=Lm(a,145545);e=rk(q[b>>2]);q[b>>2]=0;a:{if(!e){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;break a}c=q[240513];b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;q[d>>2]=ql(c);Lj(a,145661,d);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;c=3}Ii=d+16|0;return c|0}function EH(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{if(!c){h=1;break a}while(1){if(a>>>0<=g>>>0){break a}e=(f<<3)+d|0;i=q[e>>2];j=q[e+4>>2];e=g;while(1){b:{g=e+1|0;e=(e<<3)+b|0;if((i|0)==q[e>>2]&q[e+4>>2]==(j|0)){break b}e=g;if((e|0)!=(a|0)){continue}break a}break}f=f+1|0;h=f>>>0>=c>>>0;if((c|0)!=(f|0)){continue}break}}return(c|0)!=0&h}function pI(a,b,c){var d=0,e=0,f=0,g=x(0),h=x(0),i=x(0),j=x(0);f=q[a+96>>2];a:{if((f|0)<=0){b=0;break a}h=u[b+8>>2];i=u[b+4>>2];j=u[b>>2];b=1;while(1){e=(d<<4)+a|0;g=x(u[e+12>>2]+x(x(x(j*u[e>>2])+x(i*u[e+4>>2]))+x(h*u[e+8>>2])));if(x(g*g)>c^1?0:!(g(d|0);if((d|0)!=(f|0)){continue}break}}return(b^-1)&1}function kaa(a,b){var c=0,d=0,e=0,f=0;c=q[a+48>>2];Gj(c);e=Oi(b);f=Li;b=q[a+20>>2];if(!b){Bj(c);return}b=q[q[a+16>>2]+(Cza(e,f,b)<<2)>>2];a:{if((b|0)==-1){break a}a=q[a+24>>2];while(1){d=a+w(b,136)|0;if((e|0)!=q[d>>2]|q[d+4>>2]!=(f|0)){b=q[d+128>>2];if((b|0)!=-1){continue}break a}break}a=a+w(b,136)|0;o[a+112|0]=r[a+112|0]&254|1}Bj(c)}function IZ(a){var b=0,c=0;b=q[a+16>>2];c=r[b+21|0];a:{b:{if(c>>>0<=1){q[b+44>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;q[b+24>>2]=0;o[b+21|0]=2;q[b+32>>2]=b+28;break b}if((c|0)==4){break a}}while(1){Qx(a);if(r[b+21|0]!=4){continue}break}}ZE(a);if(r[b+21|0]){while(1){Qx(a);if(r[b+21|0]){continue}break}}q[b+64>>2]=w(q[b+80>>2],t[b+72>>2]/100|0)}function rQ(a,b){var c=0,d=0,e=0;c=r[a|0];a:{if(!c){break a}while(1){d=r[b|0];if(!d){e=c;break a}b:{if((c|0)==(d|0)){break b}d=c-65>>>0<26?c|32:c;c=r[b|0];if((d|0)==((c-65>>>0<26?c|32:c)|0)){break b}e=r[a|0];break a}b=b+1|0;c=r[a+1|0];a=a+1|0;if(c){continue}break}}a=e&255;e=a-65>>>0<26?a|32:a;a=r[b|0];return e-(a-65>>>0<26?a|32:a)|0}function mba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+412>>2]=q[a+412>>2]&-16|c&15;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function hw(a,b){var c=0;c=q[b>>2];if(c){cj(a,c)}c=q[b+4>>2];if(c){cj(a,c)}c=q[b+8>>2];if(c){cj(a,c)}c=q[b+12>>2];if(c){cj(a,c)}c=q[b+16>>2];if(c){cj(a,c)}c=q[b+20>>2];if(c){cj(a,c)}c=q[b+24>>2];if(c){cj(a,c)}c=q[b+28>>2];if(c){cj(a,c)}q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0}function Ega(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-32|0;Ii=e;q[e+24>>2]=0;q[74902]=q[74902]+1;q[e+16>>2]=1;q[e+20>>2]=0;q[e+8>>2]=1;q[e+12>>2]=0;a:{if(a){Ac(q[(b<<2)+92020>>2],c|0,d|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}Ii=e+32|0;return}J(88567,88575,1844,92032);G()}lj(a,92032,1846);J(88669,88575,1846,92032);G()}function pN(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=Ii-256|0;Ii=e;a:{if((c|0)<2){break a}h=(c<<2)+b|0;q[h>>2]=e;if(!a){break a}d=e;while(1){f=a>>>0<256?a:256;Ti(d,q[b>>2],f);d=0;while(1){g=(d<<2)+b|0;d=d+1|0;Ti(q[g>>2],q[(d<<2)+b>>2],f);q[g>>2]=q[g>>2]+f;if((c|0)!=(d|0)){continue}break}a=a-f|0;if(!a){break a}d=q[h>>2];continue}}Ii=e+256|0}function Sl(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;v[b>>3]=nu(a,d+12|0);c=q[d+12>>2];a:{if((c|0)==(a|0)){break a}e=r[c|0];if((e|32)==120){v[b>>3]=Cx(a,d+12|0,16)>>>0;c=q[d+12>>2];e=r[c|0]}if(!e){f=1;break a}if(!((e|0)==32|e-9>>>0<5)){break a}while(1){a=r[c+1|0];c=c+1|0;if((a|0)==32|a-9>>>0<5){continue}break}f=!a}Ii=d+16|0;return f}function SB(a,b,c){var d=0,e=0,f=0,g=0;d=3;a:{b:{if(a+1>>>0<2){break b}e=a&65535;f=q[210908];if(e>>>0>=t[f+8>>2]){break a}g=q[q[f>>2]+(e<<2)>>2];if(!g|s[q[f+4>>2]+(e<<1)>>1]!=(a>>>16|0)){break b}d=6;if(r[g+34|0]<=b>>>0){break b}a=q[g+4>>2]+(b<<4)|0;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;d=0}return d}J(154349,154364,144,154402);G()}function RF(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;if((Vi(a,1)|0)>=1){e=uj(a,1,0);a:{if(e){f=yj(a,4);q[f>>2]=0;Zi(a,-1e4,145545);xj(a,-2);c=dl(e,c);q[f>>2]=c;if(c){break a}q[d+4>>2]=ql(q[240513]);q[d>>2]=e;Lj(a,145654,d);dk(a,1,uj(a,-1,0));break a}if(!q[Lm(a,145545)>>2]){Qi(a,145617,0)}ej(a,1)}nk(a,-10001,b)}rj(a,-10001,b);Ii=d+16|0}function MT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;d=kj(a,3,0);q[c+8>>2]=0;a:{if(!dj(d,137377)){break a}if(eu(d,c+8|0)){break a}dk(a,3,137379)}b:{if((Ol(q[b>>2],0,32,c+8|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function $sa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;e=a+4|0;a:{b:{g=q[a+8>>2];d=q[a+4>>2];f=g-d|0;if(f>>>0>>0){if(o[a+12|0]&1){break b}Wi(((c+g|0)-q[a>>2]|0)+1024|0,1,a,a+8|0,e);d=q[a+4>>2];f=q[a+8>>2]-d|0}if(c>>>0>f>>>0){break a}Ti(d,b,c);q[e>>2]=q[e>>2]+c;return 1}J(22373,22448,493,22504);G()}J(22516,22448,540,22545);G()}function vt(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[c>>2]=q[a+436>>2];return q[a+432>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function hj(a){a=a|0;var b=0,c=0,d=0;a:{b:{b=a;if(!(b&3)){break b}if(!r[a|0]){return 0}while(1){b=b+1|0;if(!(b&3)){break b}if(r[b|0]){continue}break}break a}while(1){c=b;b=b+4|0;d=q[c>>2];if(!((d^-1)&d-16843009&-2139062144)){continue}break}if(!(d&255)){return c-a|0}while(1){d=r[c+1|0];b=c+1|0;c=b;if(d){continue}break}}return b-a|0}function fR(a,b,c){var d=0,e=0,f=0,g=0;e=q[a+204>>2];q[c>>2]=0;d=q[a+236>>2];a:{if(!d){break a}d=hj(d);e=e+16384|0;if(e>>>0>>0){break a}f=d+9|0;if(f>>>0>e-b>>>0){break a}o[b+8|0]=d;o[b+6|0]=0;o[b|0]=0;o[b+1|0]=0;o[b+7|0]=d>>>8;e=d+3|0;o[b+5|0]=e;g=d+5|0;o[b+3|0]=g;o[b+4|0]=e>>>8;o[b+2|0]=g>>>8;Ti(b+9|0,q[a+236>>2],d);q[c>>2]=f}}function Wo(a,b,c){var d=0,e=0,f=0,g=0;e=3;a:{b:{if(a+1>>>0<2){break b}f=a&65535;g=q[210908];if(f>>>0>=t[g+8>>2]){break a}d=q[q[g>>2]+(f<<2)>>2];if(!d|s[q[g+4>>2]+(f<<1)>>1]!=(a>>>16|0)){break b}e=1;a=q[d>>2];d=w(q[d+24>>2],q[d+28>>2]);if(Ej(a+d|0,154272,16)){break b}q[c>>2]=d;q[b>>2]=a;e=0}return e}J(154349,154364,144,154402);G()}function zsa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;if(b){f=b;b=q[a+144>>2];q[f>>2]=(b|0)==1?1:(b|0)==-1?-1:0}if(c){q[c>>2]=q[a+140>>2]}c=q[a+8>>2];if(d){q[d>>2]=c}a:{if(!e){break a}q[e>>2]=Yi(c<<2);if((c|0)<1){break a}b=0;while(1){d=b<<2;f=Pk(q[(d+a|0)+12>>2]);q[d+q[e>>2]>>2]=f;b=b+1|0;if((c|0)!=(b|0)){continue}break}}}function sza(){var a=0;vO(0);Qn(q[213116]);a:{if(o[852564]&1){break a}a=q[213138];if(!a){break a}Ni(a)}b:{if(o[852548]&1){break b}a=q[213134];if(!a){break b}Ni(a)}c:{if(o[852532]&1){break c}a=q[213128];if(a){Ni(a)}a=q[213126];if(!a){break c}Ni(a)}d:{if(o[852500]&1){break d}a=q[213120];if(a){Ni(a)}a=q[213118];if(!a){break d}Ni(a)}}function qpa(a){a=a|0;var b=0,c=0,d=0;c=q[a+84>>2];d=q[a+80>>2];q[a>>2]=d;q[a+4>>2]=c;q[a+80>>2]=0;q[a+84>>2]=0;b=q[a+116>>2];q[a+32>>2]=q[a+112>>2];q[a+36>>2]=b;b=q[a+108>>2];q[a+24>>2]=q[a+104>>2];q[a+28>>2]=b;b=q[a+100>>2];q[a+16>>2]=q[a+96>>2];q[a+20>>2]=b;b=q[a+92>>2];q[a+8>>2]=q[a+88>>2];q[a+12>>2]=b;return(d|0)!=0|(c|0)!=0}function gba(a,b,c,d){var e=0,f=0;a:{b:{e=b&65535;f=q[a+36>>2];a=q[a+32>>2];if(e>>>0<(f-a|0)/592>>>0){if(s[(a+w(e,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(e,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+560>>2]=c;q[a+564>>2]=d;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function NJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+404>>2]=q[a+404>>2]&1|c<<1;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function N5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=-2;d=q[a+2200>>2];a:{if(!d){break a}d=q[q[a+2196>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+2204>>2];while(1){f=a+w(d,24)|0;if((b|0)!=q[f>>2]|q[f+4>>2]!=(c|0)){d=q[f+20>>2];if((d|0)!=-1){continue}break a}break}q[e>>2]=q[(a+w(d,24)|0)+12>>2];g=0}return g|0}function xu(a,b){var c=0,d=0,e=0,f=0;c=Ii-1040|0;Ii=c;q[c+4>>2]=0;q[c+8>>2]=a;q[c>>2]=c+12;d=ml(c);a:{if(dr(d,1024,b)){while(1){b:{e=hj(d);if(!e){break b}f=d;d=e-1|0;if(r[f+d|0]!=10){break b}q[c>>2]=q[c>>2]+d;zm(c);a=1;break a}q[c>>2]=q[c>>2]+e;d=ml(c);if(dr(d,1024,b)){continue}break}}zm(c);a=(al(a,-1)|0)!=0}Ii=c+1040|0;return a}function rT(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;q[d>>2]=0;q[d+4>>2]=0;q[d+8>>2]=0;a=By(a,b,e,d);a:{if(a){a=a-14976|0;break a}a=-15488;b=jU(e);f=-46;b:{if(!b){break b}q[c>>2]=q[b+16>>2];f=0}if(f){break a}if(q[c>>2]==1){a=-14976;c:{switch(q[d>>2]){case 0:case 5:break c;default:break a}}if(q[d+4>>2]){break a}}a=0}Ii=e+16|0;return a}function nN(a,b,c){var d=0,e=0;cq(a,c);cq(b+128|0,c+8|0);cq(a+256|0,c+16|0);c=0;while(1){d=c<<2;e=d+b|0;q[e>>2]=q[(94-c<<2)+a>>2];q[(d|4)+b>>2]=q[(95-c<<2)+a>>2];d=a+d|0;q[d+128>>2]=q[(62-c<<2)+b>>2];q[d+132>>2]=q[(63-c<<2)+b>>2];q[e+256>>2]=q[(30-c<<2)+a>>2];q[e+260>>2]=q[(31-c<<2)+a>>2];d=c>>>0<30;c=c+2|0;if(d){continue}break}}function QT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;f=c;d=Mj(a,3);a:{if(y(d)<2147483648){e=~~d;break a}e=-2147483648}q[f+12>>2]=e;b:{if((Ol(q[b>>2],41,16,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function E8(a){var b=0,c=0;if(q[a+1872>>2]){b=q[a+220>>2];c=q[b+8>>2];if((c|0)!=-1){Mi[q[74971]](c)}c=q[b+12>>2];if((c|0)!=-1){Mi[q[74972]](c)}eA(a,b);eA(a,q[a+860>>2]);b=q[a+368>>2];if(b){Ni(b)}b=q[a+688>>2];if(b){Ni(b)}b=q[a+1008>>2];if(b){Ni(b)}b=q[a+1328>>2];if(b){Ni(b)}Mi[q[74944]](q[a+1876>>2]);Mi[q[74957]](q[a+1880>>2])}}function tq(a,b,c,d){var e=0,f=0;f=Ii-16|0;Ii=f;e=q[a>>2];a:{if(e){e=Mi[e|0](a,q[a+8>>2],b,c,d)|0;if((e|0)!=-1){break a}}e=q[a+12>>2];if(e){e=Mi[e|0](a,q[a+20>>2],b,c,d)|0;if((e|0)!=-1){break a}}e=q[a+24>>2];if(e){e=Mi[e|0](a,q[a+32>>2],b,c,d)|0;if((e|0)!=-1){break a}}q[f>>2]=aj(b,c);Pi(4,13829,13940,f);e=-1}Ii=f+16|0;return e}function nxa(a){var b=0,c=0,d=0,e=0,f=0;while(1){b=a;a=b+1|0;c=o[b|0];if((c|0)==32|c-9>>>0<5){continue}break}a:{b:{c:{c=o[b|0];switch(c-43|0){case 0:break b;case 2:break c;default:break a}}e=1}c=o[a|0];b=a;f=e}if(c-48>>>0<10){while(1){d=(w(d,10)-o[b|0]|0)+48|0;a=o[b+1|0];b=b+1|0;if(a-48>>>0<10){continue}break}}return f?d:0-d|0}function mq(a,b,c){var d=0,e=0,f=0;a:{b:{d=q[a+12>>2];if(d){e=q[d+4>>2];f=q[d+8>>2];if((e|0)==(f|0)){if(o[d+12|0]&1){break b}Wi((e-q[d>>2]>>3)+128|0,8,d,d+8|0,d+4|0);d=q[a+12>>2];e=q[d+4>>2];f=q[d+8>>2]}if((e|0)==(f|0)){break a}q[d+4>>2]=e+8;q[e+4>>2]=c;q[e>>2]=b}return}J(26803,26878,493,26726);G()}J(26983,26878,533,27007);G()}function mX(a){U0(a);q[a+232>>2]=0;q[a+224>>2]=1;q[a+228>>2]=0;q[a+244>>2]=0;q[a+236>>2]=1;q[a+240>>2]=0;q[a+256>>2]=0;q[a+248>>2]=1;q[a+252>>2]=0;q[a+268>>2]=0;q[a+260>>2]=1;q[a+264>>2]=0;q[a+280>>2]=0;q[a+272>>2]=1;q[a+276>>2]=0;q[a+292>>2]=0;q[a+284>>2]=1;q[a+288>>2]=0;q[a+304>>2]=0;q[a+296>>2]=1;q[a+300>>2]=0;q[a+220>>2]=0}function Xra(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;d=q[q[a+24>>2]>>2];f=q[q[d>>2]+44>>2];q[c+28>>2]=0;q[c+24>>2]=0;q[c+20>>2]=0;o[c+19|0]=0;q[c+12>>2]=0;e=-1;if(mM(f+60|0,q[a+16>>2],q[a+20>>2],c+20|0,c+28|0,c+24|0,c+19|0,c+12|0)){e=YL(d,q[c+20>>2],q[c+28>>2],q[c+24>>2],r[c+19|0],q[c+12>>2],b)}Ii=c+32|0;return e|0}function XN(a,b,c,d,e,f){var g=0;a:{if(!_w(a,b)){break a}b=eC(a,c);if((b|0)<0|!(r[a+17|0]|(r[a+18|0]<<8|r[a+19|0]<<16))){break a}a=((r[a+65|0]|r[a+66|0]<<8|(r[a+67|0]<<16|r[a+68|0]<<24))+a|0)+w(b,23)|0;q[d>>2]=r[a+5|0]|r[a+6|0]<<8;q[e>>2]=r[a+7|0]|r[a+8|0]<<8;q[f>>2]=w(r[a+9|0]|r[a+10|0]<<8,r[a+11|0]|r[a+12|0]<<8);g=1}return g}function Q4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;q[210440]=jm(a,133984,133992,252720);q[210436]=jm(a,134e3,134008,252768);q[210437]=jm(a,134016,134024,252864);q[210438]=jm(a,134032,134040,252960);q[210439]=jm(a,134048,134056,253024);Ak(a,134064,253088);Ri(a,-2);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(134070,134091,2367,134115);G()}}function Oy(a,b){var c=0,d=0;c=Ii-32|0;Ii=c;q[c+20>>2]=b;q[c+16>>2]=144797;Lj(a,144792,c+16|0);ik(a,-1e4);a:{if(Vi(a,-1)){d=qj(a,-1);break a}Ri(a,-2);d=yj(a,4);q[d>>2]=0;Zi(a,-1e4,144458);xj(a,-2);q[c+4>>2]=b;q[c>>2]=144797;Lj(a,144792,c);ej(a,-2);pj(a,-1e4)}b=q[d>>2];bj(a,144807,58);a=2;Ii=c+32|0;if(!b){q[d>>2]=0;a=1}return a}function KT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;f=c;d=Mj(a,3);a:{if(y(d)<2147483648){e=~~d;break a}e=-2147483648}q[f+12>>2]=e;b:{if((Ol(q[b>>2],0,33,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break b}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function C0(a,b,c,d,e,f){var g=0,h=0;g=Ii-32|0;Ii=g;q[g+24>>2]=0;q[g+16>>2]=1;q[g+20>>2]=0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;h=-20352;a=a+76|0;if((Xm(a,0)|0)==1){o[f|0]=!Xm(b,0);h=wk(g+16|0,b);a:{if(h){break a}h=yl(g,a,b);if(h){break a}h=Gu(g+16|0,g,r[f|0]);if(h){break a}D0(c,d,e,g+16|0);h=0}ij(g);ij(g+16|0)}Ii=g+32|0;return h}function j9(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>2>>>0){a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){break b}b=q[a+4>>2];a=q[a>>2];if((b-a|0)/304>>>0<=c>>>0){break a}a=a+w(c,304)|0;return w((q[a+60>>2]-q[a+56>>2]|0)/160|0,6)}break a}Pi(4,150692,151414,0);G()}J(151947,151192,479,151403);G()} - - - -function eZ(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+16>>2]=0;q[d+12>>2]=0;q[d+8>>2]=c;q[d+4>>2]=1166;q[d>>2]=a;o[d+24|0]=81;o[d+25|0]=0;o[d+26|0]=1;o[d+27|0]=4;o[d+28|0]=4;o[d+29|0]=4;o[d+30|0]=8;o[d+31|0]=0;o[d+20|0]=27;o[d+21|0]=76;o[d+22|0]=117;o[d+23|0]=97;q[d+16>>2]=Mi[1166](a,d+20|0,12,c);NO(b,0,d);Ii=d+32|0;return q[d+16>>2]}function bS(a,b){var c=0;c=q[a+68>>2];Lx(c);a:{if(32768-q[c+524>>2]>>>0>=b>>>0){break a}zo(q[a+68>>2],3);if(32768-q[c+524>>2]>>>0>=b>>>0){break a}zo(q[a+68>>2],2);if(32768-q[c+524>>2]>>>0>=b>>>0){break a}zo(q[a+68>>2],1);if(32768-q[c+524>>2]>>>0>=b>>>0){break a}zo(q[a+68>>2],0);return 32768-q[c+524>>2]>>>0>>0?-1:0}return 0}function X6(a,b,c,d){var e=0,f=0,g=0,h=0;h=-3;f=q[a>>2];e=q[f+4>>2];a:{if(!e){break a}e=q[q[f>>2]+(Cza(b,c,e)<<2)>>2];if((e|0)==-1){break a}f=q[f+8>>2];while(1){g=f+w(e,48)|0;if((b|0)!=q[g>>2]|q[g+4>>2]!=(c|0)){e=q[g+40>>2];if((e|0)!=-1){continue}break a}break}b=a;a=f+w(e,48)|0;tp(b,q[a+16>>2]);q[d>>2]=q[a+16>>2];h=0}return h}function Sq(a,b,c){var d=0,e=0;a:{if(!c){break a}d=q[a+68>>2];b:{if(!d){d=0;break b}e=(a+d|0)+52|0;d=16-d|0;if(d>>>0>c>>>0){Ti(e,b,c);q[a+68>>2]=q[a+68>>2]+c;return 0}Ti(e,b,d);q[a+68>>2]=0;$x(a,1,a+52|0,1);c=c-d|0}if(c>>>0>=16){$x(a,c>>>4|0,b+d|0,1);d=(c&-16)+d|0;c=c&15}if(!c){break a}q[a+68>>2]=c;Ti(a+52|0,b+d|0,c)}return 0}function J4(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]>>4;if(!c){Qi(a,127958,0)}q[b+12>>2]=0;q[b+8>>2]=0;a:{if(YY(a,b+12|0,b+8|0)){bj(a,q[b+12>>2],q[b+8>>2]);Ni(q[b+12>>2]);break a}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16}if((c+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(127805,127830,162,127993);G()}Ii=b+16|0;return 1}function D6(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;d=dl(a,31545);a:{if(!d){q[c>>2]=a;Pi(4,31176,31548,c);a=-2;break a}e=b;b=q[b+16>>2];b=b<<8&16711680|b<<24|(b>>>8&65280|b>>>24);b=(b<<6|48)+(b<<4)|0;if((Kl(e,1,b,d)|0)!=(b|0)){rk(d);q[c+20>>2]=a;q[c+16>>2]=b;Pi(4,31176,31591,c+16|0);a=-2;break a}Kn(d);rk(d);a=0}Ii=c+32|0;return a}function qr(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=-3;d=q[a+4>>2];a=q[d+4>>2];a:{if(!a){break a}a=q[q[d>>2]+((b>>>0)%(a>>>0)<<2)>>2];if((a|0)==-1){break a}d=q[d+8>>2];while(1){f=d+w(a,24)|0;if(q[f>>2]!=(b|0)){a=q[f+16>>2];if((a|0)!=-1){continue}break a}break}a=d+w(a,24)|0;g=q[a+8>>2];h=q[a+12>>2];e=0}q[c>>2]=g;q[c+4>>2]=h;return e}function pea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Li=q[a+564>>2];return q[a+560>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function oea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Li=q[a+500>>2];return q[a+496>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function nea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Li=q[a+524>>2];return q[a+520>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function iea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Li=q[a+428>>2];return q[a+424>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function LZ(a){a=a|0;var b=0,c=0,d=0,e=0;Dj(a,1,5);b=Am(a,2,1);e=b;a:{if((Vi(a,3)|0)<=0){c=al(a,1);break a}c=jj(a,3)}b:{if((e|0)>(c|0)){break b}c:{d=c-b|0;if((d|0)>=0){d=d+1|0;if(fq(a,d)){break c}}return Qi(a,144219,0)|0}rj(a,1,b);if((b|0)>=(c|0)){break b}while(1){b=b+1|0;rj(a,1,b);if((b|0)!=(c|0)){continue}break}}return d|0}function s3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;e=Ii-32|0;Ii=e;f=nj(e+8|0,a,1,129431,479);b=kj(a,1,0);if((Vi(a,2)|0)!=-1){d=jj(a,2)}a:{b:{c=jq(a);if(!c){break b}c=q[c>>2];if(!c){break b}b=Tj(c,b,d);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}mj(f);Ii=e+32|0;return 1}function gK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}Li=q[a+484>>2];return q[a+480>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function ypa(a,b){var c=0,d=0,e=0;c=q[b+4>>2];d=c;if(!c){d=q[b>>2]}if(o[d+28|0]&1){if(o[b+24|0]&1){Pi(4,34592,34665,0);return 0}c=c?c:q[b>>2];d=q[c+16>>2];e=q[c+12>>2];if((d|0)!=(e|0)){a=q[a+32>>2];b=0;d=e;while(1){cj(a,q[(b<<2)+d>>2]);b=b+1|0;d=q[c+12>>2];if(b>>>0>2]-d>>2>>>0){continue}break}}q[c+16>>2]=d}return 1}function wx(a,b,c,d){var e=0,f=0,g=0;e=Hq(a,b,c);f=q[d+4>>2];g=q[c+4>>2];if((f|0)==(g|0)&t[d>>2]>2]|f>>>0>>0){Zl(c,d);d=q[c+4>>2];f=q[b+4>>2];if((d|0)==(f|0)&t[c>>2]>=t[b>>2]|d>>>0>f>>>0){return e+1|0}Zl(b,c);c=q[b+4>>2];d=q[a+4>>2];if((c|0)==(d|0)&t[b>>2]>=t[a>>2]|c>>>0>d>>>0){return e+2|0}Zl(a,b);e=e+3|0}return e}function tta(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;q[d+12>>2]=b;q[d+8>>2]=c;b=JA(d+8|0,8);c=q[a+4>>2];a:{if(!c){break a}c=q[q[a>>2]+((b>>>0)%(c>>>0)<<2)>>2];if((c|0)==-1){break a}a=q[a+8>>2];while(1){e=a+w(c,12)|0;if((b|0)!=q[e>>2]){c=q[e+8>>2];if((c|0)!=-1){continue}break a}break}f=q[(a+w(c,12)|0)+4>>2]}Ii=d+16|0;return f}function k_(a){a=a|0;var b=0,c=0;b=Gn(a,1);a:{if(b){b=gC(a,b,(q[a+8>>2]-q[a+12>>2]>>4)-1|0);break a}dk(a,1,144334);b=gC(a,0,(q[a+8>>2]-q[a+12>>2]>>4)-1|0)}if((b|0)<=-1){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);return 2}c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=1;q[a+8>>2]=q[a+8>>2]+16;xk(a,b^-1);return b+1|0}function zP(a,b){var c=0,d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;c=a+8|0;Iq(a,a+4|0,c);d=a+12|0;while(1){if((b|0)!=(d|0)){if(t[d>>2]>2]){q[e+12>>2]=q[d>>2];g=d;while(1){a:{f=c;q[g>>2]=q[c>>2];if((a|0)==(c|0)){f=a;break a}g=f;c=f-4|0;if(t[e+12>>2]>2]){continue}}break}q[f>>2]=q[e+12>>2]}c=d;d=c+4|0;continue}break}Ii=e+16|0}function rm(a,b){var c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0);c=Ii-48|0;Ii=c;d=_i(a,b,q[210437],0);f=u[d>>2];g=u[d+4>>2];a:{b:{if(f!=f|g!=g){break b}e=u[d+8>>2];if(e!=e){break b}e=u[d+12>>2];if(e==e){break a}}e=u[d+8>>2];h=u[d+12>>2];v[c+16>>3]=g;v[c+32>>3]=h;v[c+24>>3]=e;v[c+8>>3]=f;q[c>>2]=b;Qi(a,134221,c)}Ii=c+48|0;return d}function kr(a,b){var c=0,d=0,e=x(0),f=x(0),g=x(0),h=x(0);c=Ii-48|0;Ii=c;d=_i(a,b,q[210438],0);f=u[d>>2];g=u[d+4>>2];a:{b:{if(f!=f|g!=g){break b}e=u[d+8>>2];if(e!=e){break b}e=u[d+12>>2];if(e==e){break a}}e=u[d+8>>2];h=u[d+12>>2];v[c+16>>3]=g;v[c+32>>3]=h;v[c+24>>3]=e;v[c+8>>3]=f;q[c>>2]=b;Qi(a,134315,c)}Ii=c+48|0;return d}function aua(a,b){var c=0,d=0,e=0;d=q[a+28>>2];Gj(d);a:{b:{c=b&65535;e=q[a+12>>2];a=q[a+8>>2];if(c>>>0>6>>>0){if(s[(a+(c<<6)|0)+54>>1]!=(b>>>16|0)){break b}a=a+(c<<6)|0;if(q[a+48>>2]!=2){break a}a=s[a+56>>1];Bj(d);return a}J(167814,167666,479,167825);G()}J(167780,167483,187,167800);G()}J(167515,167483,484,167577);G()}function _ta(a,b){var c=0,d=0,e=0;d=q[a+28>>2];Gj(d);a:{b:{c=b&65535;e=q[a+12>>2];a=q[a+8>>2];if(c>>>0>6>>>0){if(s[(a+(c<<6)|0)+54>>1]!=(b>>>16|0)){break b}a=a+(c<<6)|0;if(q[a+48>>2]!=2){break a}a=q[a+44>>2];Bj(d);return a}J(167814,167666,479,167825);G()}J(167780,167483,187,167800);G()}J(167515,167483,466,167554);G()}function YG(a,b){var c=0,d=0,e=0;c=Ii-528|0;Ii=c;d=q[213382];if(d){xl(d);Ni(q[213382])}d=bk(1,344);q[213382]=d;e=-1;a:{if(!d){break a}a=uV(d,a,b+1|0);e=0;if(!a){break a}Ui(c+16|0,0,512);o[c+16|0]=0;q[c>>2]=(a|0)<0?181457:181459;b=a;a=a>>31;q[c+4>>2]=b+a^a;q[c+8>>2]=c+16;Pi(4,181404,181409,c);e=-2e3}d=e;Ii=c+528|0;return d}function Kwa(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;Iwa(d+12|0,d+8|0,d+4|0,c);c=q[d+8>>2]+(b>>>5&31)|0;e=q[d+12>>2]+(b>>>10&31)|0;b=q[d+4>>2]+(b&31)|0;if((b|(c|e))>>>0>=32){e=(e|0)<0?0:(e|0)>31?31:e;c=(c|0)<0?0:(c|0)>31?31:c;b=(b|0)<0?0:(b|0)>31?31:b}o[a+3|0]=255;o[a+2|0]=b<<3|b>>2;o[a+1|0]=c<<3|c>>2;o[a|0]=e<<3|e>>2;Ii=d+16|0}function $ta(a,b){var c=0,d=0,e=0;d=q[a+28>>2];Gj(d);a:{b:{c=b&65535;e=q[a+12>>2];a=q[a+8>>2];if(c>>>0>6>>>0){if(s[(a+(c<<6)|0)+54>>1]!=(b>>>16|0)){break b}a=a+(c<<6)|0;if(q[a+48>>2]!=2){break a}a=q[a+40>>2];Bj(d);return a}J(167814,167666,479,167825);G()}J(167780,167483,187,167800);G()}J(167515,167483,475,167564);G()}function mQ(a){var b=0,c=0,d=0;Oza(+a);c=Lza(1)|0;b=Lza(0)|0;d=c;Mza(0,b|0);c=c&2147483647;Mza(1,c|0);a=+Nza();b=c;a:{if(b>>>0>=1071748075){if(b>>>0>=1077149697){a=-0/a+1;break a}a=1-2/(Ws(a+a)+2);break a}if(b>>>0>=1070618799){a=Ws(a+a);a=a/(a+2);break a}if(b>>>0<1048576){break a}a=Ws(a*-2);a=-a/(a+2)}return(d|0)>-1?a:-a}function V1(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=q[239672];d=q[c+16>>2];if(d){Gj(d);c=q[239672]}e=q[c+100>>2];if(e>>>0<=t[a>>2]){if(e){while(1){g=w(f,1056)+c|0;i=q[g+116>>2];h=(f<<3)+b|0;q[h>>2]=q[g+112>>2];q[h+4>>2]=i;f=f+1|0;if((f|0)!=(e|0)){continue}break}}q[a>>2]=e;if(d){Bj(d)}return}J(210383,210166,710,210398);G()}function MY(a){var b=0,c=0;c=Ii-16|0;Ii=c;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1437217655;q[a+8>>2]=q[a+8>>2]+16;Oza(+(Mj(a,-1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;if((b|0)!=1437217655){a:{if(b){break a}if(Oj(a,-1)){break a}Nk(a,-1,136658)}q[c>>2]=(b|0)==1127743488?136587:136550;Qi(a,136620,c)}Ak(a,136654,253408);Ii=c+16|0}function Iva(a){a=a|0;var b=0,c=0,d=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;c=Lza(0)|0;b:{if(c){break b}if(Oj(a,2)){break b}Nk(a,2,136658)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=Fza(b,c)|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Ita(){var a=0,b=0,c=0,d=0,e=0;b=873324;c=Ii-16|0;Ii=c;e=r[266420];o[266420]=1;Pi(4,208362,208368,0);d=hj(873324)+873324|0;while(1){if(b>>>0>>0){a=gk(b,10);if(!a){a=gk(b,13)}if(!(!a|a>>>0>=d>>>0)){o[a|0]=0}q[c>>2]=b;Pi(4,208362,208382,c);b=a+1|0;if(a){continue}}break}Pi(4,208362,208386,0);o[266420]=e;Ii=c+16|0}function Hva(a){a=a|0;var b=0,c=0,d=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;c=Lza(0)|0;b:{if(c){break b}if(Oj(a,2)){break b}Nk(a,2,136658)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=Hza(b,c)|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function iW(a,b,c,d,e,f,g){var h=0;h=-16512;a:{if(q[a+164>>2]){break a}h=ND(d,e,f,q[a+4>>2],g);if(h){break a}h=-16;e=q[a+4>>2];d=bk(1,e);if(!d){break a}e=bk(1,e);if(!e){Ni(d);return-16}h=Eu(a,b,c,g,d);b:{if(h){break b}h=ts(a,d,e);if(h){break b}h=-17152;a=q[a+4>>2];if(jE(e,g,a)){break b}Ti(g,d,a);h=0}Ni(d);Ni(e)}return h}function e3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;e=1;f=nj(b+8|0,a,1,129431,1320);Dj(a,1,5);a:{b:{d=VG(a,1);if(d>>>0<524289){c=317296;break b}q[b+28>>2]=0;Ro(b+28|0,16,d);c=q[b+28>>2];if(c){break b}q[b>>2]=d;e=Qi(a,129846,b);break a}bj(a,c,ft(a,c,d,1));if((c|0)==317296){break a}Ni(c)}mj(f);Ii=b+32|0;return e|0}function yQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-1040|0;Ii=b;e=kj(a,1,b+1036|0);q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;if(q[b+1036>>2]){f=b+1036|0;while(1){a=q[b>>2];if(f>>>0<=a>>>0){ml(b);a=q[b>>2]}d=r[c+e|0];q[b>>2]=a+1;o[a|0]=d-65>>>0<26?d|32:d;c=c+1|0;if(c>>>0>2]){continue}break}}zm(b);Ii=b+1040|0;return 1}function wba(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=q[b>>2];a:{if(Tda(q[c+12>>2],q[c+16>>2])){e=q[c+16>>2];c=q[c+12>>2];d=yj(a,8);q[d>>2]=c;q[d+4>>2]=e;Zi(a,-1e4,202300);xj(a,-2);break a}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16}lk(a,q[b+8>>2],q[b+12>>2]);b=q[b+16>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16}function tQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-1040|0;Ii=b;e=kj(a,1,b+1036|0);q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;if(q[b+1036>>2]){f=b+1036|0;while(1){a=q[b>>2];if(f>>>0<=a>>>0){ml(b);a=q[b>>2]}d=r[c+e|0];q[b>>2]=a+1;o[a|0]=d-97>>>0<26?d&95:d;c=c+1|0;if(c>>>0>2]){continue}break}}zm(b);Ii=b+1040|0;return 1}function qba(a){var b=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+80>>2]=0;q[a+16>>2]=4;q[a+20>>2]=128;q[a+8>>2]=32;q[a+12>>2]=8;q[a>>2]=512;q[a+4>>2]=128;b=a- -64|0;q[b>>2]=0;q[b+4>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+72>>2]=0;q[a+76>>2]=0;q[a+28>>2]=256}function kP(a,b,c){var d=0;d=hj(b);a:{if(r[a+280|0]&32){a=a+248|0;while(1){if(!CC(a,b,d)){break a}a=q[a+12>>2];if(a){continue}break}q[c>>2]=q[c>>2]|4;return}a=a+112|0;while(1){b:{if(q[a+4>>2]!=3){break b}if(Ej(175225,q[a+8>>2],3)){break b}if(!CC(a+12|0,b,d)){break a}}a=q[a+24>>2];if(a){continue}break}q[c>>2]=q[c>>2]|4}}function gea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return(r[a+414|0]&32)>>>5|0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function bN(a,b){var c=0,d=0,e=0;d=q[a+28>>2];Gj(d);a:{b:{c=b&65535;e=q[a+12>>2];a=q[a+8>>2];if(c>>>0>6>>>0){if(s[(a+(c<<6)|0)+54>>1]!=(b>>>16|0)){break b}a=a+(c<<6)|0;if(q[a+48>>2]!=2){break a}q[a+48>>2]=1;Bj(d);return}J(167814,167666,479,167825);G()}J(167780,167483,187,167800);G()}J(167515,167483,448,167541);G()}function O0(a,b,c,d){var e=0,f=0;e=Ii-160|0;Ii=e;q[e+12>>2]=e+155;b=TE(e+12|0,e+16|0,b);a:{if((b|0)<0){break a}a=TE(e+12|0,e+16|0,a);if((a|0)<0){b=a;break a}f=a+b|0;b=UE(e+12|0,e+16|0,f);if((b|0)<0){break a}a=SE(e+12|0,e+16|0,48);if((a|0)<0){b=a;break a}a=a+(b+f|0)|0;Ti(c,q[e+12>>2],a);q[d>>2]=a;b=0}Ii=e+160|0;return b}function $ba(a){a=a|0;var b=0,c=x(0),d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=x(fj(a,2));if(!(c>x(360)^1?!(c>3]=c;Qi(a,207415,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);MJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2741,207443);G()}Ii=b+16|0;return 0}function wk(a,b){var c=0,d=0,e=0;a:{if((a|0)==(b|0)){break a}e=q[b+8>>2];if(!e){ij(a);return 0}c=q[b+4>>2];while(1){d=c;c=c-1|0;if(q[(c<<2)+e>>2]?0:c){continue}break}q[a>>2]=q[b>>2];c=q[a+4>>2];b:{if(c>>>0>>0){c=rl(a,d);if(!c){break b}break a}Ui(q[a+8>>2]+(d<<2)|0,0,c-d<<2)}Ti(q[a+8>>2],q[b+8>>2],d<<2);c=0}return c}function tV(a,b,c){var d=0,e=0,f=0;f=-10240;a:{if(!a|!b){break a}f=0;d=a;b:{if(!q[d+28>>2]){break b}while(1){e=d;d=q[d+340>>2];if(d){if(q[d+28>>2]){continue}break b}break}d=bk(1,344);q[e+340>>2]=d;if(!d){return-10368}bE(d);d=q[e+340>>2]}b=nP(d,b,c);if(!b){break a}if(e){q[e+340>>2]=0}if((a|0)!=(d|0)){Ni(d)}f=b}return f}function nga(a,b){a=a|0;b=b|0;var c=0,d=0;a:{b:{if(b>>>0<2097152){if(a+1>>>0<2){break a}b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break b}d=q[q[c+24>>2]+(b<<2)>>2];if(!d|s[q[c+28>>2]+(b<<1)>>1]!=(a>>>16|0)){break a}return r[d+12|0]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}J(94547,88575,3004,94551);G()}function eoa(a){a=a|0;var b=0,c=0,d=0;c=q[a>>2];b=$i(52);q[b>>2]=0;q[b+4>>2]=0;q[b+48>>2]=-1;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;d=q[a+16>>2];c=q[c+4>>2];c=c>>>0>d>>>0?d:c;F9(b,c);Ui(q[b>>2],0,c<<8);q[q[a+12>>2]>>2]=b;return 0}function _v(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return(r[a+415|0]&16)>>>4|0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Mfa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;a:{if(gk(b,32)|!r[b|0]){break a}c=q[a+8>>2];d=q[a+4>>2];a=c-d|0;if(!a){break a}c=d-c|0;c=((a|0)<(c|0)?c:a)>>>2|0;a=(a|0)>-1?a:-1;a=w(c,(a|0)<1?a:1);c=a>>>0>1?a:1;a=0;while(1){e=dj(b,q[(a<<2)+d>>2]);f=!e;if(!e){break a}a=a+1|0;if((c|0)!=(a|0)){continue}break}}return f|0}function Gva(a){a=a|0;var b=0,c=0,d=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;c=Lza(0)|0;b:{if(c){break b}if(Oj(a,2)){break b}Nk(a,2,136658)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b>>>c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function tZ(a,b){var c=0,d=0,e=0;c=b-1|0;if(c>>>0>2]){return q[a+12>>2]+(c<<4)|0}d=+(b|0);if(b){e=q[a+16>>2];Oza(+d);c=Lza(1)|0;b=Lza(0)|0;c=b+c|0;a=((c>>>0)%((-1<>>0)<<5)+e|0}else{a=q[a+16>>2]}while(1){if(!(q[a+24>>2]!=3|v[a+16>>3]!=d)){return a}a=q[a+28>>2];if(a){continue}break}return 141056}function eK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return(r[a+414|0]&8)>>>3|0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function eC(a,b){var c=0,d=0,e=0;if(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16)){e=a+65|0;while(1){c=e;c=((r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24))+a|0)+w(d,23)|0;if(!(r[c|0]|(r[c+1|0]<<8|r[c+2|0]<<16)|r[c+3|0]!=(b|0))){return d}d=d+1|0;if(d>>>0<(r[a+14|0]|(r[a+15|0]<<8|r[a+16|0]<<16))>>>0){continue}break}}return-1}function dea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+412>>2]>>>10&3}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function XA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+412>>2]>>>12&15}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function M3(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-119|0){case 1:u[c>>2]=fj(a,-1);break a;case 2:u[c+4>>2]=fj(a,-1);break a;case 3:u[c+8>>2]=fj(a,-1);break a;case 0:u[c+12>>2]=fj(a,-1);break a;default:break b}}q[b+4>>2]=134032;q[b>>2]=134064;d=Qi(a,134856,b)}Ii=b+16|0;return d|0}function uta(a,b,c){var d=0,e=0,f=0;f=q[b+4>>2];d=q[a+40>>2]+15&-16;q[a+40>>2]=d;e=4;a:{b:{switch((q[b+4>>2]>>>22&63)-9|0){case 2:e=q[q[b+8>>2]+16>>2];break a;case 0:break a;default:break b}}e=MB(f>>>22&63);d=q[a+40>>2]}b=w(c,e)+d|0;q[a+40>>2]=b;if(!(r[a+44|0]|b>>>0<=t[a+36>>2])){J(24076,24107,68,24151);G()}return d}function eva(a){a=a|0;var b=0,c=0,d=0;b=Ii-256|0;Ii=b;c=q[53736];Kl(147171,11,1,c);d=q[53734];a:{if(!dr(b,250,d)){break a}while(1){if(!Ej(b,147183,6)){break a}b:{if(!Tu(a,b,hj(b),147189)){if(!dq(a,0,0,0)){break b}}_y(uj(a,-1,0),c);Us(10,c)}Ri(a,0);Kl(147171,11,1,c);if(dr(b,250,d)){continue}break}}Ii=b+256|0;return 0}function eea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+412>>2]>>>8&3}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Zla(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);a:{c=Cp(a,q[74445],c,Li,79134);b:{if(!Vo(q[c+4>>2])){a=Qi(a,79142,0);break b}tp(q[74445],c);q[b+12>>2]=2;q[b+8>>2]=c;vz(a,b+8|0);if((d+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}a=1}Ii=b+16|0;return a|0}J(76954,76581,2407,79171);G()}function Wi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;g=q[c>>2];i=q[d>>2]-g|0;if(((i>>>0)/(b>>>0)|0)!=(a|0)){if(a){h=$i(w(a,b))}else{h=0}f=(q[e>>2]-g>>>0)/(b>>>0)|0;f=a>>>0>f>>>0?f:a;a:{if(b>>>0>i>>>0){f=w(b,f);break a}f=w(b,f);Ti(h,g,f);if(!g){break a}Ni(g)}q[c>>2]=h;q[e>>2]=f+h;q[d>>2]=w(a,b)+h}}function Eha(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);q[b+12>>2]=0;c=W1(c,Li,b+12|0);if(c){q[b>>2]=c;Pi(3,80094,80250,b)}e=u[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;if((d+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(80280,79890,326,80305);G()}Ii=b+16|0;return 1}function Ap(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+412>>2]>>>4&15}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function zJ(a,b){var c=0;if(!(!a|!b|q[a+44>>2]>-1)){c=q[a+4>>2];q[b>>2]=q[a>>2];q[b+4>>2]=c;q[b+40>>2]=q[a+40>>2];c=q[a+36>>2];q[b+32>>2]=q[a+32>>2];q[b+36>>2]=c;c=q[a+28>>2];q[b+24>>2]=q[a+24>>2];q[b+28>>2]=c;c=q[a+20>>2];q[b+16>>2]=q[a+16>>2];q[b+20>>2]=c;c=q[a+12>>2];q[b+8>>2]=q[a+8>>2];q[b+12>>2]=c;c=1}return c}function ts(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;e=-16512;if(!is(a,0)){q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;a:{b:{e=pn(d,b,q[a+4>>2]);c:{if(e){break c}e=-4;b=a+8|0;if((_j(d,b)|0)>-1){break c}f=q[a+4>>2];e=Do(d,d,a+20|0,b,a+104|0);if(!e){break b}}e=e-17024|0;break a}a=Dn(d,c,f);e=a?a-17024|0:0}ij(d)}Ii=d+16|0;return e}function ay(a,b,c){var d=0,e=0,f=0,g=0;g=Ui(b,0,c);e=c<<1;if(e){c=0;while(1){b=-48;a:{d=r[a|0];if((d-48&255)>>>0<10){break a}b=-55;if((d-65&255)>>>0<6){break a}b=-87;if((d-97&255)>>>0<=5){break a}return-4608}f=(c>>>1|0)+g|0;b=b+d|0;o[f|0]=r[f|0]|(c&1?b:b<<4);a=a+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return 0}function aR(a,b,c){var d=0,e=0;a:{if(!(!(q[q[a>>2]+184>>2]&4096)|c>>>0<2|q[a+20>>2]>1)){d=q[q[a+76>>2]+80>>2];e=0;b:{if(!d){break b}e=q[d+4>>2]}if((e|0)==2){break a}}return Hx(a,b,c)}c:{if(!r[a+230|0]){d=Hx(a,b,1);if((d|0)<1){break c}o[a+230|0]=1}d=Hx(a,b+1|0,c-1|0);if((d|0)<1){break c}o[a+230|0]=0;d=d+1|0}return d}function Zv(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+404>>2]>>>1|0}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Pva(a){a=a|0;var b=0,c=0,d=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;c=Lza(0)|0;b:{if(c){break b}if(Oj(a,2)){break b}Nk(a,2,136658)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b>>c;q[a+8>>2]=q[a+8>>2]+16;return 1}function MW(a,b,c){var d=0,e=0,f=0;d=(c>>>2|0)+((c&3)!=0)|0;a:{if((d|0)!=q[a+4>>2]){ij(a);q[a+8>>2]=0;q[a>>2]=1;q[a+4>>2]=0;d=rl(a,d);if(d){break a}}d=Bk(a,0);if(d){break a}if(!c){return 0}f=q[a+8>>2];d=0;a=0;while(1){e=(a&-4)+f|0;q[e>>2]=q[e>>2]|r[a+b|0]<<(a<<3&24);a=a+1|0;if((c|0)!=(a|0)){continue}break}}return d}function Jva(a){a=a|0;var b=0,c=0,d=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}Oza(+(Mj(a,2)+6755399441055744));Lza(1)|0;c=Lza(0)|0;b:{if(c){break b}if(Oj(a,2)){break b}Nk(a,2,136658)}d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b<>2]=q[a+8>>2]+16;return 1}function HG(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=q[a+8>>2]-q[a+12>>2]>>4;a:{b=Tu(a,b,c,d);if(!b){if((f+1|0)==q[a+8>>2]-q[a+12>>2]>>4){break a}J(128116,128026,74,128141);G()}q[e>>2]=uj(a,-1,0);Pi(4,128155,128162,e);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4==(f|0)){break a}J(128005,128026,81,128141);G()}Ii=e+16|0;return!b}function hB(a,b){var c=0;c=q[b>>2];if(c){Aj(c)}c=q[b+8>>2];if(c){cj(a,c)}c=q[b+4>>2];if(c){cj(a,c)}c=q[b+12>>2];if(c){cj(a,c)}c=q[b+16>>2];if(c){cj(a,c)}c=q[b+20>>2];if(c){cj(a,c)}c=q[b+24>>2];if(c){cj(a,c)}c=q[b+28>>2];if(c){cj(a,c)}c=q[b+32>>2];if(c){cj(a,c)}c=q[b+36>>2];if(c){cj(a,c)}b=q[b+40>>2];if(b){cj(a,b)}}function Yl(a,b){var c=0,d=0;a:{if(b>>>0>=26){if(b>>>0>=33){break a}c=cC(a,25);q[a+16>>2]=q[a+16>>2]>>>25;q[a+20>>2]=q[a+20>>2]-25;b=b-25|0;d=cC(a,b);q[a+16>>2]=q[a+16>>2]>>>b;q[a+20>>2]=q[a+20>>2]-b;return c|d<<25}c=cC(a,b);q[a+16>>2]=q[a+16>>2]>>>b;q[a+20>>2]=q[a+20>>2]-b;return c}J(106632,106647,352,106700);G()}function Tqa(a){a=a|0;var b=0,c=0,d=0;b=q[a+20>>2];d=q[a+4>>2];c=0;a:{if(!d){break a}c=q[d+120>>2]}b:{if(!Ep(q[a>>2],d,b)){break b}c=ora(c,b);if(!c){break b}b=yw(q[a>>2],q[b+140>>2],q[b+144>>2],c+52|0);if(b){FB(c);return b|0}b=q[a+24>>2];q[b+8>>2]=c;q[b+16>>2]=q[a+16>>2]-q[q[c+44>>2]+4>>2];return 0}Aj(b);return-13}function MR(a){var b=0,c=0,d=0,e=0;b=q[a+68>>2];a:{if(!b|!(q[q[a>>2]+184>>2]&2)){break a}c=q[b+580>>2];if(!c|t[a+136>>2]>t[a+144>>2]|s[a+140>>1]!=q[b+588>>2]){break a}d=-27648;b=q[b+584>>2];e=q[a+108>>2];if(b>>>0>(q[a+100>>2]-e|0)+16749>>>0){break a}Ti(e,c,b);d=0;q[a+144>>2]=0;q[a+136>>2]=b;Lx(q[a+68>>2])}return d}function u3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;kj(a,1,0);o[b+8|0]=0;o[b+8|0]=0;vj(a,0,0);bj(a,130417,9);e=r[b+8|0];c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(e|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(130179,129431,876,130427);G()}Ii=b+16|0;return 1}function rP(a,b){var c=0,d=0,e=0,f=0,g=0;c=hj(a);e=-1;f=q[b+4>>2];a:{if(f>>>0<3){break a}d=q[b+8>>2];if(!c|(r[d|0]!=42|r[d+1|0]!=46)){break a}b=0;while(1){g=a+b|0;if(r[g|0]!=46){b=b+1|0;if((c|0)!=(b|0)){continue}break a}break}if(!b){break a}a=c-b|0;if((a|0)!=(f-1|0)){break a}if(dx(d+1|0,g,a)){break a}e=0}return e}function r2(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-119|0){case 1:u[c>>2]=fj(a,3);break a;case 2:u[c+4>>2]=fj(a,3);break a;case 3:u[c+8>>2]=fj(a,3);break a;case 0:u[c+12>>2]=fj(a,3);break a;default:break b}}q[b+4>>2]=134016;q[b>>2]=134064;d=Qi(a,134856,b)}Ii=b+16|0;return d|0}function nba(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}u[a+60>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function To(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+528>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()} - - - -function Ria(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-16|0;Ii=d;b=q[a+8>>2];c=hj(b);if(c>>>0>=6){e=!dj((b+c|0)-5|0,64064)}b=-11;c=q[a+24>>2];if(!nG(q[a+12>>2],q[a+16>>2],e,d+12|0,q[c>>2],q[c+4>>2])){b=$i(8);c=q[d+12>>2];q[b+4>>2]=e;q[b>>2]=c;q[q[a+24>>2]+8>>2]=b;q[q[a+24>>2]+16>>2]=q[c+12>>2]+32;b=0}Ii=d+16|0;return b|0}function RJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}u[a+128>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Pca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]|0;tj(a,1,b+12|0);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);c=dea(c,q[b+12>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;if(((e>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2473,207052);G()}Ii=b+16|0;return 1}function OJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}q[a+408>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Mm(a,b){var c=0,d=0,e=0,f=0;Nm(a,b);a:{if(q[b>>2]!=12){break a}c=q[b+8>>2];if(c&256|(c|0)>2]=q[a+36>>2]-1}e=q[a+36>>2];c=e+1|0;f=q[a>>2];b:{if(r[f+75|0]>(e|0)){d=c;break b}d=c;if((e|0)>=249){Sj(q[a+12>>2],141814);f=q[a>>2];d=q[a+36>>2]+1|0}o[f+75|0]=c}q[a+36>>2]=d;er(a,b,d-1|0)}function MJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}u[a+132>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Lp(a,b,c,d,e){var f=0,g=0;f=(b<<2)+a|0;b=(c<<2)+a|0;c=q[f>>2]+q[b>>2]|0;q[f>>2]=c;g=c;c=(e<<2)+a|0;e=Fza(g^q[c>>2],16);q[c>>2]=e;a=(d<<2)+a|0;d=e+q[a>>2]|0;q[a>>2]=d;d=Fza(d^q[b>>2],12);q[b>>2]=d;d=d+q[f>>2]|0;q[f>>2]=d;e=c;c=Fza(d^q[c>>2],8);q[e>>2]=c;d=a;a=c+q[a>>2]|0;q[d>>2]=a;q[b>>2]=Fza(a^q[b>>2],7)}function KC(a,b,c,d){var e=0,f=0,g=0;Zi(a,-1,b);b=al(a,-1);f=$i((b|0)!=(b&1073741823)?-1:b<<2);e=q[a+8>>2];q[e+8>>2]=0;q[a+8>>2]=e+16;if(Hj(a,-2)){while(1){g=Mj(a,-2);a:{if(y(g)<2147483648){e=~~g;break a}e=-2147483648}u[((e<<2)+f|0)-4>>2]=Mj(a,-1);Ri(a,-2);if(Hj(a,-2)){continue}break}}Ri(a,-2);q[c>>2]=f;q[d>>2]=b}function JJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}u[a+144>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function IJ(a,b,c){var d=0,e=0;a:{b:{d=b&65535;e=q[a+36>>2];a=q[a+32>>2];if(d>>>0<(e-a|0)/592>>>0){if(s[(a+w(d,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(d,592)|0;if(s[a+570>>1]!=(b&65535)){break a}u[a+148>>2]=c;return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function wt(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+412>>2]&15}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);c=XA(c,q[b+12>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;if(((e>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2542,207101);G()}Ii=b+16|0;return 1}function aga(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;a:{if(b>>>0<2097152){c=0;b:{if(a+1>>>0<2){break b}b=a&65535;d=q[75054];if(b>>>0>=t[d+32>>2]){break a}e=q[q[d+24>>2]+(b<<2)>>2];c=0;if(!e){break b}c=s[q[d+28>>2]+(b<<1)>>1]==(a>>>16|0)?e:0}return s[c+26>>1]!=0|0}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function aZ(a,b,c,d){q[b+52>>2]=a;o[b+68|0]=46;q[b+56>>2]=c;q[b+32>>2]=287;q[b+48>>2]=0;q[b+64>>2]=d;q[b+4>>2]=1;q[b+8>>2]=1;c=a;a=q[b+60>>2];a=Cj(c,q[a>>2],q[a+8>>2],32);c=q[b+60>>2];q[c+8>>2]=32;q[c>>2]=a;a=q[b+56>>2];c=q[a>>2];q[a>>2]=c-1;if(c){c=a;a=q[a+4>>2];q[c+4>>2]=a+1;q[b>>2]=r[a|0];return}q[b>>2]=Hk(a)}function NY(a){a=a|0;ej(a,-10002);Si(a,-10002,143468);Ak(a,143468,257024);bj(a,143471,7);Si(a,-10002,143479);qk(a,1078,0);qk(a,1079,1);Si(a,-2,143488);qk(a,1080,0);qk(a,1081,1);Si(a,-2,143495);vj(a,0,1);ej(a,-1);xj(a,-2);bj(a,143501,2);Si(a,-2,143504);qk(a,1082,1);Si(a,-10002,143511);Ak(a,143458,256960);return 2}function N7(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);_i(a,-1,q[79180],119558);Ri(a,-2);if(c>>4==q[a+8>>2]-q[a+12>>2]>>4){if(!r[316716]){o[316716]=1;q[b>>2]=115561;q[b+4>>2]=117439;q[b+8>>2]=115561;q[b+12>>2]=117452;Pi(3,116024,119973,b)}Ii=b+16|0;return 0}J(115568,115465,478,119531);G()}function Kpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=$i(32);q[b>>2]=0;q[b+4>>2]=0;d=b+24|0;c=d;q[c>>2]=0;q[c+4>>2]=0;e=b+16|0;c=e;q[c>>2]=0;q[c+4>>2]=0;c=b+8|0;q[c>>2]=0;q[c+4>>2]=0;f=q[a+16>>2];Wi(f>>>0<64?f:64,176,b,c,b+4|0);if(o[b+28|0]&1){J(48855,48930,493,48986);G()}Wi(8,4,e,d,b+20|0);q[q[a+12>>2]>>2]=b;return 0}function sda(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);e=fK(c,q[b+12>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2819,207613);G()}Ii=b+16|0;return 1}function pda(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);e=WA(c,q[b+12>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2926,207716);G()}Ii=b+16|0;return 1}function gda(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);e=cK(c,q[b+12>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2765,207462);G()}Ii=b+16|0;return 1}function Waa(a){var b=0;b=$i(40);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+4>>2]=1234;q[b>>2]=1235;q[b+32>>2]=0;q[b+36>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=1236;q[b+12>>2]=1237;q[b+8>>2]=1238;if(q[210500]){J(147784,147809,232,147851);G()}q[210500]=b;q[b+20>>2]=a;return b}function Uca(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);e=VA(c,q[b+12>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2975,207745);G()}Ii=b+16|0;return 1}function HZ(a,b){var c=0,d=0;c=q[a+16>>2];q[b>>2]=q[c+28>>2];q[c+28>>2]=b;d=r[b+5|0];a:{if(d&7){break a}if(r[c+21|0]==1){o[b+5|0]=d|4;c=q[b+8>>2];if(q[c+8>>2]<4){break a}c=q[c>>2];if(!(r[c+5|0]&3)){break a}a=q[a+16>>2];if(r[a+21|0]==1){Ok(a,c);return}o[b+5|0]=r[a+20|0]&3|d&248;return}o[b+5|0]=r[c+20|0]&3|d&248}}function qea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+472>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function lda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);c=dK(c,q[b+12>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;if(((e>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2877,207684);G()}Ii=b+16|0;return 1}function lca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);a:{if(uk(a,2)){c=Oi(uj(a,2,0));d=Li;break a}c=nl(a,2);d=Li}gba(f,q[b+12>>2],c,d);if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){J(202212,202233,595,202355);G()}Ii=b+16|0;return 0}function hda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);c=Zv(c,q[b+12>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;if(((e>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2713,207541);G()}Ii=b+16|0;return 1}function gs(a){var b=0;a:{switch(a+12|0){case 9:return 138582;case 11:return 138619;case 8:return 138646;case 6:return 138689;case 2:return 138713;case 10:return 138739;case 0:return 138782;case 4:return 138807;case 5:return 138845;case 1:return ql(q[240513]);default:b=na(a|0)|0;break;case 12:break a}}return b}function ZE(a){var b=0,c=0;b=q[a+16>>2];q[b+44>>2]=0;q[b+36>>2]=0;q[b+40>>2]=0;c=q[b+112>>2];if(r[c+5|0]&3){Ok(b,c);c=q[b+112>>2]}a:{if(q[c+80>>2]<4){break a}c=q[c+72>>2];if(!(r[c+5|0]&3)){break a}Ok(b,c)}a=q[a+16>>2];b:{if(q[a+104>>2]<4){break b}a=q[a+96>>2];if(!(r[a+5|0]&3)){break b}Ok(b,a)}_E(b);o[b+21|0]=1}function zva(a,b){var c=0,d=0,e=0;e=b;c=fo(a,2,+t[b+12>>2]);a:{if(y(c)<2147483648){d=~~c;break a}d=-2147483648}q[e+12>>2]=d;e=b;c=fo(a,3,+t[b+8>>2]);b:{if(y(c)<2147483648){d=~~c;break b}d=-2147483648}q[e+8>>2]=d;if(Oj(a,4)){v[b>>3]=Bx()-Mj(a,4)}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function xz(a){var b=0,c=0,d=0,e=0;c=Yi(8);if(c){q[c>>2]=a;b=q[a+120>>2];vj(b,0,0);q[79288]=q[79288]+1;q[c+4>>2]=In(b,-1e4);b=q[a+104>>2];d=q[a+108>>2];if((b|0)!=(d|0)){while(1){e=q[q[b>>2]+12>>2];if(e){Mi[e|0](c);d=q[a+108>>2]}b=b+4|0;if((d|0)!=(b|0)){continue}break}}return c}J(123165,122672,1088,123185);G()}function vea(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+60>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function kK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+512>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;gj(a);f=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);c=$j(a,2);d=Li;g=d;if(NA(f,q[b+12>>2],c,d)){q[b>>2]=aj(c,g);Qi(a,206674,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){J(202212,202233,1977,206714);G()}Ii=b+16|0;return 0}function fK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+128>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function dK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+408>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function cK(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+132>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function YY(a,b,c){var d=0,e=0,f=0;d=Ii-1392|0;Ii=d;if(q[a+8>>2]-q[a+12>>2]>>4!=1){dk(a,1,138962)}yF(d+32|0);f=a;e=d+32|0;a:{if(!q[d+1364>>2]){$C(d);a=d;break a}q[d+1320>>2]=0;a=d+1312|0}br(f,e,0,a);e=q[a+8>>2];f=b;b=q[a>>2];q[f>>2]=b;q[c>>2]=e;o[b+e|0]=0;q[a>>2]=0;if(!q[d+1364>>2]){Im(a)}Ii=d+1392|0;return 1}function YA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+488>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Y0(a,b,c,d,e,f){var g=0,h=0;g=-20352;a:{if(!a|!q[a+88>>2]){break a}h=a+208|0;g=X0(a,h,a+172|0,a+124|0,e,f);if(g){break a}g=-20352;if(Wm(h)>>>0>d>>>0){break a}d=q[a+88>>2];q[b>>2]=(d>>>3|0)+((d&7)!=0);b=q[b>>2];if(q[a+48>>2]){a=q[a+60>>2]?1:2}else{a=0}if((a|0)==2){return qE(h,c,b)}g=Dn(h,c,b)}return g}function WA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+144>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function VA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return u[a+148>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function UA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+420>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function Tl(a,b,c,d){var e=0,f=0,g=0;e=Ii-16|0;Ii=e;a:{if((Vi(a,b)|0)<=0){if(!d){break a}if(!c){q[d>>2]=0;break a}q[d>>2]=hj(c);break a}c=uj(a,b,d);if(c){break a}c=q[64212];g=e;d=Vi(a,b);f=140583;b:{if((d|0)==-1){break b}f=q[(d<<2)+256832>>2]}q[g+4>>2]=f;q[e>>2]=c;dk(a,b,Lj(a,143231,e));c=0}Ii=e+16|0;return c}function $v(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return q[a+416>>2]}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function fea(a,b,c){var d=0,e=0;a:{b:{e=c&65535;d=q[b+32>>2];if(e>>>0<(q[b+36>>2]-d|0)/592>>>0){if(s[(w(e,592)+d|0)+568>>1]!=(c>>>16|0)){break b}d=w(e,592)+d|0;if(s[d+570>>1]!=(c&65535)){break a}Cr(b,d,0,a);return}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function aw(a,b){var c=0,d=0,e=0,f=0,g=0;d=Oi(b);e=Li;c=q[a+32>>2];b=q[a+36>>2]-c|0;a=(b|0)/592|0;if(!b){return 0}f=a>>>0>1?a:1;a=0;while(1){a:{b=w(a,592)+c|0;if(q[b+560>>2]==(d|0)&q[b+564>>2]==(e|0)){g=s[b+570>>1]|s[b+568>>1]<<16;if(!(o[b+588|0]&1)){break a}}a=a+1|0;if((f|0)!=(a|0)){continue}}break}return g}function Tsa(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;if(a){oa(q[a+24>>2],4112,b+12|0);a:{if(q[b+12>>2]!=4114){break a}while(1){Xn(1e4);oa(q[a+24>>2],4112,b+12|0);if(c>>>0>18){break a}c=c+1|0;if(q[b+12>>2]==4114){continue}break}}if(!(ka(0)|0)){Pi(4,213576,213953,0)}Ii=b+16|0;return}J(213569,213519,229,213936);G()}function lxa(a){a=a|0;var b=0;b=Ii+ -64|0;Ii=b;a:{b:{if(!$l(a,1)){break b}Xi(a,136766);ik(a,-2);if((Vi(a,-1)|0)!=5){break b}Xi(a,136774);ik(a,-2);if(!uk(a,-1)){break b}q[b+16>>2]=qj(a,1);mn(b+32|0,136780,b+16|0);q[b>>2]=uj(a,-1,0);q[b+4>>2]=b+32;Lj(a,136783,b);break a}Xi(a,136790);Fo(a)}Ii=b- -64|0;return 1}function Tea(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=Ii-16|0;Ii=d;if(a){a:{if(!(r[a+156|0]&32)){break a}q[a+92>>2]=c;q[a+88>>2]=b;Sa(b|0,c|0);Ta(d+12|0,d+8|0);b=q[d+12>>2];q[a+96>>2]=b;c=q[d+8>>2];q[a+100>>2]=c;e=q[a+40>>2];if(!e){break a}Mi[e|0](q[a+44>>2],b,c)}Ii=d+16|0;return}J(88636,88575,1436,91523);G()}function RC(a,b){var c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=2;e=DF(c+12|0,b,2);a:{if(!e){d=yj(a,40);Np(a,137996,-1);su(c+12|0);if((b|0)==10){q[c+8>>2]=1;Ol(q[c+12>>2],41,26,c+8|0,4)}q[d>>2]=q[c+12>>2];v[d+16>>3]=-1;v[d+8>>3]=-1;q[d+32>>2]=b;d=1;break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,e)}Ii=c+16|0;return d}function Oma(a){a=a|0;var b=0,c=0;b=q[a+8>>2];c=q[b+16>>2];a=q[q[a+16>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+4>>2];b=q[b>>2];if(a>>>0<(c-b|0)/240>>>0){if(r[(b+w(a,240)|0)+234|0]&8){a=b+w(a,240)|0;mw(a,q[a+208>>2],q[a+212>>2],u[a+224>>2],u[a+228>>2])}return}}J(53716,53631,479,53341);G()}function Jv(a,b,c){var d=0,e=0;a:{if(b){d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>=e-a>>2>>>0){break a}a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}b=q[c>>2];d=q[c+4>>2];e=q[c+12>>2];q[a+56>>2]=q[c+8>>2];q[a+60>>2]=e;q[a+48>>2]=b;q[a+52>>2]=d}return}J(151947,151192,479,151403);G()}function Iha(a,b,c,d,e,f){var g=0;g=b;b=q[a+156>>2];b=w(w(g,q[b+32>>2]&2147483647)+d|0,q[b+28>>2])+c|0;p[q[a+100>>2]+(b<<1)>>1]=e;b=b+q[a+104>>2]|0;o[b|0]=r[b|0]&248|f&7;b=q[a+108>>2];e=q[a+112>>2]-b|0;a=w(s[a+160>>1],d>>>5|0)+(c>>>5|0)|0;if(e>>>0<=a>>>0){J(55728,55585,479,55717);G()}a=a+b|0;o[a|0]=r[a|0]|1}function mj(a){var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;a:{c=q[a+16>>2];if((c|0)==-8388608){break a}c=c+q[a+12>>2]|0;d=q[a>>2];d=q[d+8>>2]-q[d+12>>2]>>4;if((c|0)==(d|0)){break a}e=q[a+8>>2];a=q[a+4>>2];q[b+12>>2]=d;q[b+8>>2]=c;q[b>>2]=a;q[b+4>>2]=e;Pi(4,122749,123394,b);J(123465,122672,1492,123484);G()}Ii=b+16|0}function eI(a,b,c,d){var e=0,f=0;if(!b){q[d>>2]=0;return}e=b&65535;f=q[a+4>>2];a=q[a>>2];if(e>>>0>2>>>0){a=q[a+(e<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);q[d>>2]=0;return}b=q[a>>2];q[d>>2]=d?(q[a+4>>2]-b|0)/304>>>0<=c>>>0?0:(b+w(c,304)|0)+144|0:0;return}J(151947,151192,479,151403);G()}function Rt(a,b,c){var d=0,e=0,f=0;d=Ii-288|0;Ii=d;if(Vi(a,-1)){a:{if((Vi(a,-1)|0)!=1){f=d;c=Vi(a,-1);e=140583;b:{if((c|0)==-1){break b}e=q[(c<<2)+256832>>2]}q[f+24>>2]=e;q[d+20>>2]=75752;q[d+16>>2]=b;sj(d+32|0,256,75775,d+16|0);q[d>>2]=d+32;a=Qi(a,75832,d);break a}a=Uj(a,-1)}c=(a|0)!=0}Ii=d+288|0;return c}function Jea(a){var b=0,c=0,d=0;b=q[213713];d=b;c=q[213712];q[a+344>>2]=c;q[a+348>>2]=b;b=q[a+308>>2];q[a+312>>2]=b;a:{if(q[a+316>>2]!=(b|0)){q[a+312>>2]=b+8;q[b>>2]=c;q[b+4>>2]=d;if(o[a+336|0]&1){break a}Wi(0,4,a+324|0,a+332|0,a+328|0);return}J(201636,201514,533,201660);G()}J(202045,201514,493,201251);G()}function u5(a){a=a|0;var b=0,c=0,d=0,e=0;a:{if(!(q[a+40>>2]|q[a+44>>2])){c=-1;break a}c=2;d=Jk();b=q[a+24>>2];d=Bza(d-b|0,Li-(q[a+28>>2]+(d>>>0>>0)|0)|0,1e3);b=Li;e=q[a+44>>2];if((b|0)==(e|0)&t[a+40>>2]<=d>>>0|b>>>0>e>>>0){break a}c=q[a+36>>2];return(c|0)==(b|0)&t[a+32>>2]<=d>>>0|c>>>0>>0}return c|0}function jda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-32|0;Ii=b;f=nj(b+8|0,a,1,202233,3240);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+28|0);d=mea(c,q[b+28>>2]);a:{if(d){e=yj(a,8);q[e+4>>2]=d;q[e>>2]=c;Zi(a,-1e4,202300);xj(a,-2);break a}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16}mj(f);Ii=b+32|0;return 1}function hv(a,b){var c=0,d=0,e=0,f=0,g=0;f=-5;a:{c=dl(b,183232);b:{if(!c){break b}Uk(c,0,2);d=pm(c);Uk(c,0,0);e=Yi(d);if((zl(e,1,d,c)|0)!=(d|0)){break a}a=dl(a,183235);if(!a){break a}g=Kl(e,1,d,a);rk(c);rk(a);Ni(e);if((d|0)!=(g|0)){break b}f=0;if(!lu(b)){break b}Ys(q[240513])}return f}rk(c);Ni(e);return-5}function bP(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;q[d+8>>2]=0;q[d>>2]=0;q[d+4>>2]=0;a=XE(a,b,d);a:{if(a){e=a-9472|0;break a}a=q[d>>2];if(!a){e=-9572;break a}q[c>>2]=0;f=a-1>>>0<3?a:4;g=q[d+8>>2];b=0;a=0;while(1){b=r[a+g|0]<<(a<<3)|b;q[c>>2]=b;a=a+1|0;if((f|0)!=(a|0)){continue}break}}Ii=d+16|0;return e}function SR(a){var b=0,c=0,d=0;c=bk(1,16);if(c){b=q[a+212>>2];d=bk(1,b);q[c>>2]=d;if(!d){Ni(c);return-32512}Ti(d,q[a+204>>2],b);q[c+4>>2]=b;o[c+8|0]=q[a+208>>2];b=q[a+68>>2];a=q[b+496>>2];a:{if(!a){q[b+496>>2]=c;break a}while(1){b=a;a=q[a+12>>2];if(a){continue}break}q[b+12>>2]=c}a=0}else{a=-32512}return a}function Jda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-144|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;c=$j(a,1);d=Li;gj(a);f=_i(a,-1,q[213927],204267);Ri(a,-2);c=Fea(f,c,d);if(c){d=ct(a,1,b+16|0);q[b+4>>2]=c;q[b>>2]=d;Qi(a,206548,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(e|0)){J(202212,202233,1822,206592);G()}Ii=b+144|0;return 0}function $ja(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;d=DH();e=q[a+8>>2];a:{if(!Qj(q[a+12>>2],q[a+16>>2],q[63062],c+28|0)){b=c+8|0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b>>2]=q[c+28>>2];q[b+8>>2]=Oi(e);q[b+12>>2]=Li;BH(d,b);Aj(q[c+28>>2]);q[q[a+24>>2]+8>>2]=d;a=0;break a}fA(d);a=-13}Ii=c+32|0;return a|0}function yea(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;f=q[a+308>>2];d=q[a+312>>2]-f|0;g=d>>3;a=0;a:{if(!d){break a}while(1){d=(a<<3)+f|0;if(q[d>>2]==(b|0)&q[d+4>>2]==(c|0)){break a}a=a+1|0;if(g>>>0>a>>>0){continue}break}}if((a|0)==(g|0)){q[e>>2]=aj(b,c);Pi(4,199633,199834,e);a=0}Ii=e+16|0;return a&65535}function ZR(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Ii-272|0;Ii=d;e=q[a+64>>2];if(!e){e=q[a+60>>2]}_p(d+8|0);ny(d+8|0,q[a+68>>2]+888|0);qs(d+8|0,d+224|0);f=d+8|0;if(f){Mi[q[65677]](f,0,216)|0}Mi[q[q[a+68>>2]+1116>>2]](e+48|0,48,c?181289:181273,d+224|0,48,b,12)|0;Mi[q[65677]](d+224|0,0,48)|0;Ii=d+272|0}function Uu(a,b,c,d){var e=0,f=0,g=0;ej(a,b);while(1){f=a;g=c;b=gk(c,46);if(!b){b=hj(c)+c|0}e=b-c|0;bj(f,g,e);jl(a,-2);a:{if(!Vi(a,-1)){Ri(a,-2);vj(a,0,r[b|0]==46?1:d);bj(a,c,e);ej(a,-2);pj(a,-4);break a}if((Vi(a,-1)|0)==5){break a}Ri(a,-3);return c}ll(a,-2);c=b+1|0;if(r[b|0]==46){continue}break}return 0}function Fla(a,b,c,d){var e=0,f=0,g=0,h=0;e=q[a>>2];if((e|0)!=q[a+4>>2]){while(1){g=(f<<7)+e|0;h=q[g+40>>2];if(!(q[h+96>>2]!=(b|0)|q[h+100>>2]!=(c|0)|s[g+56>>1]!=(d|0))){a=q[((f<<7)+e|0)+32>>2];b=q[a+8>>2];Li=q[a+12>>2];return b}f=f+1|0;e=q[a>>2];if(f>>>0>2]-e>>7>>>0){continue}break}}Li=0;return 0}function Av(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;a:{if(!c|!d){break a}o[c|0]=0;if(!b){break a}d=d+1>>>1|0;g=(d>>>0>1?d:1)-1|0;h=e+14|0;while(1){q[e>>2]=r[a+f|0];sj(e+13|0,3,30900,e);if(d>>>0>f>>>0){Ex(c,e+13|0,1)}if((f|0)==(g|0)){break a}Ex(c,h,1);f=f+1|0;if((f|0)!=(b|0)){continue}break}}Ii=e+16|0}function $m(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;g=a;h=a;a:{if(!b){b=0;break a}c=b>>31;e=c+b^c;c=z(e);vm(d,e,0,0,0,c+81|0);e=0+q[d+8>>2]|0;c=(q[d+12>>2]^65536)+(16414-c<<16)|0;c=e>>>0>>0?c+1|0:c;f=b&-2147483648|c;c=q[d+4>>2];b=q[d>>2]}q[h>>2]=b;q[g+4>>2]=c;q[a+8>>2]=e;q[a+12>>2]=f;Ii=d+16|0}function uM(a,b){var c=0;a:{if((b|0)!=32767){while(1){b=b&65535;c=q[a+1036>>2];if(b>>>0>=q[a+1040>>2]-c>>2>>>0){break a}b=q[(b<<2)+c>>2];if(!(q[b+136>>2]&1024^1024|q[b+140>>2]&32768)){uM(a,s[b+150>>1]&32767);Lt(a,b,0)}b=q[b+148>>2]&32767;if((b|0)!=32767){continue}break}}return}J(12419,9962,479,9454);G()}function np(a,b){var c=0,d=0,e=0,f=0;c=Ii-288|0;Ii=c;Xi(a,b);ik(a,2);a:{if(!Oj(a,-1)){f=c;e=Vi(a,-1);d=140583;b:{if((e|0)==-1){break b}d=q[(e<<2)+256832>>2]}q[f+24>>2]=d;q[c+20>>2]=75767;q[c+16>>2]=b;sj(c+32|0,256,75775,c+16|0);q[c>>2]=c+32;b=Qi(a,75832,c);break a}b=hl(a,-1)}Ri(a,-2);Ii=c+288|0;return b}function uQ(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;f=kj(a,1,d+12|0);c=jj(a,2);g=q[d+12>>2];b=Am(a,3,-1);e=q[d+12>>2];b=b+(e+1&b>>31)|0;b=(b|0)>0?b:0;b=(b|0)>(e|0)?e:b;c=c+(g+1&c>>31)|0;c=(c|0)>1?c:1;a:{if((b|0)>=(c|0)){bj(a,(c+f|0)-1|0,(b-c|0)+1|0);break a}bj(a,146825,0)}Ii=d+16|0;return 1}function tz(a,b){var c=0,d=0,e=0,f=0;a:{b:{d=a+108|0;c=q[d>>2];e=a+112|0;f=q[e>>2];if((c|0)==(f|0)){if(o[a+116|0]&1){break b}a=a+104|0;Wi((c-q[a>>2]>>2)+8|0,4,a,e,d);f=q[e>>2];c=q[d>>2]}if((c|0)==(f|0)){break a}q[d>>2]=c+4;q[c>>2]=b;return}J(124369,124444,493,123924);G()}J(124500,124444,533,124524);G()}function nV(a,b,c,d,e){var f=0;f=-10240;a:{if(q[e>>2]){break a}a=HW(a,c,d);if(a){return a-9728|0}b:{if(q[d>>2]==6){a=bk(1,8);if(!a){return-10368}b=qV(b,c,a,a+4|0);if(b){Ni(a);return b}q[e>>2]=a;break b}f=-8960;c:{switch(q[b>>2]){case 0:case 5:break c;default:break a}}if(q[b+4>>2]){break a}}f=0}return f}function kv(a,b){var c=0,d=0;a:{d=ai()|0;b:{c:{if(r[d|0]){c=-21;if(Pj(b,d,1024)>>>0>=1024){break b}if(Zk(b,183241,1024)>>>0<1024){break c}break b}o[b|0]=0}c=-21;if(Zk(b,183243,1024)>>>0>=1024){break b}if(Zk(b,a,1024)>>>0>=1024){break b}if(YD(b)){break a}c=0}return c}a=Ys(q[240513]);return(a|0)==-16?0:a}function jca(a){a=a|0;var b=0,c=x(0),d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=x(fj(a,2));if(!(c>3]=c;Qi(a,207565,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);RJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2794,207595);G()}Ii=b+16|0;return 0}function ixa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0;e=r[b+1|0];f=r[b|0];g=r[b+2|0];b=(w(e>>>d|0,5)+(f>>>d|0)|0)+w(g>>>d|0,25)|0;if((b|0)>=125){J(107539,96899,11872,107552);G()}h=a;i=c;a=-1<>>3&3)<>>5&3)<>2]-36|0;b:{if(a>>>0<=6){a=q[(a<<2)+181056>>2];break b}a=0}if(a){break a}q[b>>2]=c;b=b+4|0}if(b>>>0<853524){c=q[d+4>>2];d=d+4|0;if(c){continue}}break}q[b>>2]=0;o[852960]=1}return 852976}function Bda(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0);b=Ii-32|0;Ii=b;d=1;e=nj(b+8|0,a,1,202233,3949);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);a:{if(_v(c,q[b+4>>2])){d=Kj(e,207760,0);break a}f=qea(c,q[b+4>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16}mj(e);Ii=b+32|0;return d|0}function zta(a,b){var c=0,d=0;c=q[a+8>>2];d=q[a+4>>2]-c|0;if((d|0)>=8){o[b|0]=r[c|0];o[b+1|0]=r[q[a+8>>2]+1|0];o[b+2|0]=r[q[a+8>>2]+2|0];o[b+3|0]=r[q[a+8>>2]+3|0];o[b+4|0]=r[q[a+8>>2]+4|0];o[b+5|0]=r[q[a+8>>2]+5|0];o[b+6|0]=r[q[a+8>>2]+6|0];o[b+7|0]=r[q[a+8>>2]+7|0];q[a+8>>2]=q[a+8>>2]+8}return(d|0)>7}function qfa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;a:{if(a){Kc(b|0,c|0,d|0,e|0);if(r[q[75054]+156|0]&64){f=K()|0;if(f){break a}}f=q[a+76>>2];q[a+72>>2]=q[a+72>>2]&-16|((c?2:0)|b|(d?4:0)|(e?8:0));q[a+76>>2]=f;return}J(88636,88575,3627,92620);G()}lj(f,92620,3629);J(88669,88575,3629,92620);G()}function hZ(a){qk(a,1226,0);Xi(a,147597);Rk(a,1,0);qk(a,1227,0);Xi(a,147598);Rk(a,1,0);qk(a,1228,0);Xi(a,147606);Rk(a,1,0);qk(a,1229,0);Xi(a,147612);Rk(a,1,0);qk(a,1230,0);Xi(a,147615);Rk(a,1,0);qk(a,1231,0);Xi(a,147618);Rk(a,1,0);qk(a,1232,0);Xi(a,147625);Rk(a,1,0);qk(a,1233,0);Xi(a,147630);Rk(a,1,0)}function cR(a,b,c){var d=0,e=0;d=q[q[a+64>>2]+108>>2];e=q[a+204>>2];q[c>>2]=0;e=e+16384|0;a:{if(!(q[q[a>>2]+184>>2]&32768)|e>>>0>>0|d+4>>>0>e-b>>>0){break a}o[b+3|0]=d;o[b|0]=0;o[b+1|0]=35;o[b+2|0]=d>>>8;q[c>>2]=4;if(!d){break a}a=q[q[a+64>>2]+104>>2];if(!a){break a}Ti(b+4|0,a,d);q[c>>2]=q[c>>2]+d}}function Pea(a,b){var c=0,d=0,e=0;c=Ii-16|0;Ii=c;a:{d=q[a+312>>2];b:{if((d|0)==q[a+316>>2]){q[c>>2]=d-q[a+308>>2]>>3;Pi(4,199633,199773,c);a=-4;break b}d=Oi(b);e=Li;b=q[a+312>>2];if((b|0)==q[a+316>>2]){break a}q[a+312>>2]=b+8;q[b>>2]=d;q[b+4>>2]=e;a=0}Ii=c+16|0;return a}J(201636,201514,533,201660);G()}function K4(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;if(!(q[a+8>>2]-q[a+12>>2]>>4)){Qi(a,127923,0)}c=kj(a,1,b+12|0);d=q[a+8>>2]-q[a+12>>2]>>4;c=ZY(a,c,q[b+12>>2]);if((c|0)!=1){Ri(a,(q[a+8>>2]-q[a+12>>2]>>4^-1)+d|0)}if((d+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(127805,127830,56,127853);G()}Ii=b+16|0;return c|0}function Ao(a){var b=x(0),c=x(0),d=0,e=0;d=(Pza(a),Lza(2));e=d>>>23&255;if(e>>>0<=149){if(e>>>0<=125){return x(a*x(0))}a=(d|0)>-1?a:x(-a);b=x(x(x(a+x(8388608))+x(-8388608))-a);a:{if(!(b>x(.5)^1)){c=x(x(a+b)+x(-1));break a}a=x(a+b);c=a;if(b<=x(-.5)^1){break a}c=x(a+x(1))}a=c;a=(d|0)>-1?a:x(-a)}return a}function z6(a){var b=0,c=0,d=0,e=0;d=q[a+4>>2];b=q[a>>2];e=d-b|0;c=(e|0)/12|0;a:{if(!e){break a}if((b|0)!=(d|0)){d=c>>>0>1?c:1;c=0;while(1){b=w(c,12)+b|0;Ni(q[b>>2]);Ni(q[b+4>>2]);c=c+1|0;if((d|0)==(c|0)){break a}b=q[a>>2];if((q[a+4>>2]-b|0)/12>>>0>c>>>0){continue}break}}J(28904,28915,479,28971);G()}}function vsa(){var a=0;q[71126]=q[239673];q[239673]=284472;q[71103]=q[239666];q[239666]=284372;OO();q[71114]=q[239666];q[239666]=284416;MO();a=q[74920];q[75038]=634;q[75036]=a;o[300160]=1;q[75037]=635;q[74920]=300144;BO();CO();xO();yO();EO();DO();AO();zO();HO();JO();IO();FO();GO();PO();SO();RO();QO()}function sl(a,b,c){var d=0,e=0,f=0;d=q[a+20>>2];a:{if((b|0)>=1){e=q[a+40>>2];while(1){if(d>>>0<=e>>>0){break a}b=b-1|0;b=r[q[q[d+4>>2]>>2]+6|0]?b:b-q[d+20>>2]|0;d=d-24|0;if((b|0)>0){continue}break}}b:{if(!b){a=q[a+40>>2];if(a>>>0>=d>>>0){break a}q[c+96>>2]=(d-a|0)/24;break b}q[c+96>>2]=0}f=1}return f}function jha(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,65882,840);a:{if((Vi(a,1)|0)==7){b=_i(a,1,q[74078],0);if(b){if(Vo(q[b>>2])){break a}}Qi(a,66244,0)}Nk(a,1,65680);G()}b=w(q[b+36>>2],q[b+28>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function gQ(a){a=a|0;var b=0,c=0,d=0;Dj(a,1,5);c=al(a,1);b=c+1|0;a:{switch((q[a+8>>2]-q[a+12>>2]>>4)-2|0){case 1:d=jj(a,2);if((c|0)>=(d|0)){b=(b|0)<(d|0)?d:b;while(1){c=b-1|0;rj(a,1,c);nk(a,1,b);b=c;if((d|0)<(b|0)){continue}break}}b=d;case 0:nk(a,1,b);return 0;default:break a}}return Qi(a,145424,0)|0}function QH(a){var b=0,c=0;c=q[q[a+16>>2]+2012>>2];b=q[a>>2];if(b){Rj(c,-1e4,b)}b=q[a+4>>2];if(b){Rj(c,-1e4,b)}b=q[a+8>>2];if(b){Rj(c,-1e4,b)}b=q[a+12>>2];if(b){Rj(c,-1e4,b)}Rj(c,-1e4,q[a+24>>2]);Ni(q[a+20>>2]);q[a+24>>2]=-2;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=-2;q[a+12>>2]=-2;q[a>>2]=-2;q[a+4>>2]=-2}function Ada(a){a=a|0;var b=0,c=0,d=0,e=0,f=x(0);b=Ii-32|0;Ii=b;d=1;e=nj(b+8|0,a,1,202233,4e3);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);a:{if(_v(c,q[b+4>>2])){d=Kj(e,207814,0);break a}f=hK(c,q[b+4>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=f;q[a+8>>2]=q[a+8>>2]+16}mj(e);Ii=b+32|0;return d|0}function aca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=jj(a,2);if(c-2>>>0>=99999){q[b>>2]=c;Qi(a,207481,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);NJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2688,207517);G()}Ii=b+16|0;return 0}function aM(a,b,c,d,e){var f=0,g=0,h=0;g=q[a+4>>2];f=q[a>>2];if(g>>>0>=t[f>>2]){J(13986,13768,256,14049);G()}q[a+4>>2]=g+1;h=q[f+4>>2]+(g<<3)|0;q[h>>2]=b;q[h+4>>2]=c;b=g<<2;q[b+q[f+12>>2]>>2]=1;c=b+q[f+8>>2]|0;b=q[a+12>>2];q[c>>2]=b;b=q[f+16>>2]+(b<<3)|0;q[b>>2]=d;q[b+4>>2]=e;q[a+12>>2]=q[a+12>>2]+1}function Y3(a,b){var c=0,d=0,e=0,f=0;c=Ii-144|0;Ii=c;q[c+12>>2]=b;Gq(c+16|0,128,131519,b);e=hj(c+16|0);if(e){b=q[a+144>>2];while(1){f=r[(c+16|0)+d|0];q[a+144>>2]=b+1;o[a+b|0]=f;b=q[a+144>>2];if(b>>>0>t[a+140>>2]){q[a+140>>2]=b}b=b&127;q[a+144>>2]=b;d=d+1|0;if((e|0)!=(d|0)){continue}break}}Ii=c+144|0}function TA(a,b){var c=0,d=0;a:{b:{c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){if(s[(a+w(c,592)|0)+568>>1]!=(b>>>16|0)){break b}a=a+w(c,592)|0;if(s[a+570>>1]!=(b&65535)){break a}return a}J(201665,201514,479,201676);G()}J(199518,199542,171,199557);G()}J(199565,199542,172,199557);G()}function DG(a,b,c,d,e,f){var g=0;g=Ii-48|0;Ii=g;q[g+40>>2]=f;q[g+24>>2]=d;q[g+8>>2]=b;b=Yi(d);q[g+16>>2]=b;q[g+20>>2]=0;Ti(b,c,d);b=Yi(f);q[g+32>>2]=b;q[g+36>>2]=0;Ti(b,e,f);if(Oo(0,a,q[35074],q[35075],0,q[a+32>>2],q[63996],g+8|0,40,840)){Ni(q[g+16>>2]);Ni(q[g+32>>2]);Pi(3,127183,127255,0)}Ii=g+48|0}function mp(a,b,c){var d=0,e=0,f=0;d=Ii-288|0;Ii=d;a:{if(!Vi(a,-1)){break a}if(!Oj(a,-1)){f=d;c=Vi(a,-1);e=140583;b:{if((c|0)==-1){break b}e=q[(c<<2)+256832>>2]}q[f+24>>2]=e;q[d+20>>2]=75767;q[d+16>>2]=b;sj(d+32|0,256,75775,d+16|0);q[d>>2]=d+32;c=Qi(a,75832,d);break a}c=hl(a,-1)}Ii=d+288|0;return c}function bv(a,b){var c=0,d=0,e=0,f=0;c=Ii-288|0;Ii=c;Zi(a,-1,b);a:{if(!Oj(a,-1)){f=c;e=Vi(a,-1);d=140583;b:{if((e|0)==-1){break b}d=q[(e<<2)+256832>>2]}q[f+24>>2]=d;q[c+20>>2]=75767;q[c+16>>2]=b;sj(c+32|0,256,75775,c+16|0);q[c>>2]=c+32;b=Qi(a,75832,c);break a}b=hl(a,-1)}Ri(a,-2);Ii=c+288|0;return b}function Jfa(a){a=a|0;var b=0;if(q[75054]){a=0}else{if(!Wy()){Pi(4,88531,88540,0);return 0}b=Ui($i(160),0,160);q[b+128>>2]=1;p[b+156>>1]=r[a+12|0]<<6&192;q[b+112>>2]=q[a>>2];a=q[a+4>>2];q[b+136>>2]=63;q[b+140>>2]=0;q[b+116>>2]=a;q[b+132>>2]=1;q[75054]=b;a=Wj();q[q[75054]>>2]=a;a=q[75054]}return a|0}function V2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;e=d+8|0;c=a?q[a>>2]:0;b=0;a:{if(!c){break a}b=q[c+120>>2]}f=nj(e,b,0,132848,466);e=q[210420];c=q[b+8>>2];q[c+8>>2]=3;v[c>>3]=e|0;q[b+8>>2]=q[b+8>>2]+16;c=sv(a);a=q[b+8>>2];q[a+8>>2]=2;q[a>>2]=c;q[b+8>>2]=q[b+8>>2]+16;CG(b);mj(f);Ii=d+32|0}function Saa(a){a=a|0;var b=0,c=0;a:{b=q[210501];a=q[b+3476>>2];c=q[a>>2];if((c|0)==q[a+4>>2]){break a}c=q[c>>2];Mi[q[c+12>>2]](b,c);c=1;b=q[a>>2];if(q[a+4>>2]-b>>2>>>0<=1){break a}while(1){b=q[(c<<2)+b>>2];Mi[q[b+12>>2]](q[210501],b);c=c+1|0;b=q[a>>2];if(c>>>0>2]-b>>2>>>0){continue}break}}}function Nca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;e=nj(b+8|0,a,1,202233,3015);tj(a,1,b+4|0);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4>=2){c=(Uj(a,2)|0)!=0}d=ZJ(d,q[b+4>>2],c);c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=(d|0)!=0;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=b+32|0;return 1}function yu(a,b,c){var d=0,e=0,f=0,g=0;d=Ii+ -64|0;Ii=d;g=kj(a,2,0);e=q[b>>2];a:{if(!e){f=b;break a}while(1){if(!dj(g,e)){f=b;break a}e=q[b+8>>2];f=b+8|0;b=f;if(e){continue}break}}e=a;b=q[f+4>>2];if(!b){q[d>>2]=g;mn(d+16|0,137279,d);dk(a,2,d+16|0);b=q[f+4>>2]}a=Mi[b|0](e,c)|0;Ii=d- -64|0;return a}function iv(a,b,c,d){var e=0,f=0,g=0;f=Ii-96|0;Ii=f;q[d>>2]=0;a:{if(!es(a,f+8|0)){e=-2;if((q[f+20>>2]&61440)!=32768){break a}g=c;c=q[f+48>>2];e=-21;if(g>>>0>>0){break a}a=dl(a,183232);b=zl(b,1,c,a);rk(a);e=-5;if((b|0)!=(c|0)){break a}q[d>>2]=c;e=0;break a}e=Ys(q[240513])}a=e;Ii=f+96|0;return a}function ZT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;b=1;a:{if((io(d,1,9,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);b=2;break a}d=q[c+8>>2];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(d|0)!=0;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return b|0}function WT(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;b=1;a:{if((io(d,6,1,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);b=2;break a}d=q[c+8>>2];e=q[a+8>>2];q[e+8>>2]=1;q[e>>2]=(d|0)!=0;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return b|0}function qna(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;h=q[a+180>>2];if(!h){h=sq();q[a+180>>2]=h}a:{g=q[a+216>>2];if(!g){g=q[a+128>>2];i=q[g+28>>2];if((i|0)==q[g+32>>2]){break a}g=q[i+4>>2]}Fr(h,q[g>>2],b,c,d,e,f);o[a+254|0]=r[a+254|0]|8;return}J(51709,51308,486,51547);G()}function nU(a,b){var c=0,d=0,e=0;d=b-65|0;c=255;a:{b:{e=b-48|0;if((e&255)>>>0<10){break b}switch(d|0){case 0:case 1:case 2:case 3:case 4:case 5:case 32:case 33:case 34:case 35:case 36:case 37:break b;default:break a}}c=(b-97&255)>>>0<6?b-87|0:(d&255)>>>0<6?b-55|0:e}q[a>>2]=c;return c>>>0<16?0:-6}function Lm(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;a:{b:{c=qj(a,1);if(!c){break b}if(!$l(a,1)){break b}Zi(a,-1e4,b);if(!Is(a,-1,-2)){break b}Ri(a,-3);break a}f=d;c=Vi(a,1);e=140583;c:{if((c|0)==-1){break c}e=q[(c<<2)+256832>>2]}q[f+4>>2]=e;q[d>>2]=b;dk(a,1,Lj(a,143231,d));c=0}Ii=d+16|0;return c}function Awa(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;d=zj(b,0);e=zj(b,1);f=zj(b,2);b=zj(b,3);q[a+12>>2]=0;q[a+4>>2]=-1;q[a+8>>2]=0;o[a|0]=252;o[a+1|0]=253;o[a+2|0]=255;o[a+3|0]=255;q[c+12>>2]=64;Mp(a,c+12|0,d<<8|d,16);Mp(a,c+12|0,e<<8|e,16);Mp(a,c+12|0,f<<8|f,16);Mp(a,c+12|0,b|b<<8,16);Ii=c+16|0}function sea(a,b,c){var d=0,e=0,f=0,g=0;e=q[a+32>>2];d=q[a+36>>2]-e|0;a=(d|0)/592|0;if(!d){return 0}f=a>>>0>1?a:1;a=0;while(1){a:{d=w(a,592)+e|0;if(q[d+560>>2]==(b|0)&q[d+564>>2]==(c|0)){g=s[d+570>>1]|s[d+568>>1]<<16;if(!(o[d+588|0]&1)){break a}}a=a+1|0;if((f|0)!=(a|0)){continue}}break}return g}function cU(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;b=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;a:{if((io(b,41,19,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);a=2;break a}b=q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function bua(a,b,c,d,e,f,g){var h=0,i=0;i=Jk();a:{b:{c:{h=dN(a,b,c,d,e,f,g,1,0);switch(h+4|0){case 0:case 3:case 4:break a;case 1:break c;default:break b}}h=-3;if(q[g>>2]!=-3){break a}}d:{if((e|0)<1){break d}h=e;e=Jk();e=h+(i-e|0)|0;if((e|0)>=1){break d}return-2}h=dN(a,b,c,d,e,f,g,0,1)}return h}function aU(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;b=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;a:{if((io(b,41,26,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);a=2;break a}b=q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function VZ(a){a=a|0;var b=0,c=0,d=0,e=0;e=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-10002,143685);b=1;d=q[53735];if((e|0)>=1){while(1){ej(a,-1);ej(a,b);Rk(a,1,1);c=uj(a,-1,0);if(!c){return Qi(a,143996,0)|0}if(b>>>0>=2){Us(9,d)}_y(c,d);Ri(a,-2);c=(b|0)!=(e|0);b=b+1|0;if(c){continue}break}}Us(10,d);return 0}function wl(a,b,c){var d=0,e=0;a:{if(c>>>0<10){if(!c){return 0}d=q[b>>2];if(d>>>0>=112){break a}e=(d>>>3|0)+a|0;d=d&7;a=r[e|0]>>>d|0;d=8-d|0;d=(c|0)<(d|0)?c:d;if((d|0)!=(c|0)){a=r[e+1|0]<>2]=q[b>>2]+c;return(-1<>2];e=q[a>>2];if(f>>>0>=t[e>>2]){J(13986,13768,256,14049);G()}q[a+4>>2]=f+1;g=q[e+4>>2]+(f<<3)|0;q[g>>2]=b;q[g+4>>2]=c;b=f<<2;q[b+q[e+12>>2]>>2]=7;c=b+q[e+8>>2]|0;b=q[a+16>>2];q[c>>2]=b;c=b+q[e+28>>2]|0;b=hj(d)+1|0;Ti(c,d,b);q[a+16>>2]=b+q[a+16>>2]}function eca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=jj(a,2);if(c>>>0>=2){q[b>>2]=c;Qi(a,207631,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);OJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2850,207666);G()}Ii=b+16|0;return 0}function _ba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=jj(a,2);if(c>>>0>=9){q[b>>2]=c;Qi(a,207113,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);LJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2583,207131);G()}Ii=b+16|0;return 0}function _T(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;b=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;a:{if((io(b,0,34,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);a=2;break a}b=q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function U4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-10002,128064);a:{b:{if((Vi(a,-1)|0)==5){if((Vi(a,-1)|0)!=5){break b}vj(a,0,0);qk(a,849,0);nk(a,-2,1);Si(a,-2,128108)}Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){break a}return}J(128072,128026,222,128091);G()}J(128005,128026,237,128091);G()}function Mia(a){a=a|0;var b=0,c=0,d=0;b=$i(24);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=q[a+20>>2];d=ML(q[a>>2],b);if(!d){q[q[a+24>>2]+8>>2]=b;return d|0}a=q[a>>2];c=q[b>>2];if(c){Aj(c)}c=q[b+4>>2];if(c){cj(a,c)}c=q[b+8>>2];if(c){cj(a,c)}Ni(b);return d|0}function Lba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=jj(a,2);if(c>>>0>=3){q[b>>2]=c;Qi(a,207017,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);EJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2445,207038);G()}Ii=b+16|0;return 0}function Kba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=jj(a,2);if(c>>>0>=3){q[b>>2]=c;Qi(a,207066,b)}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);DJ(e,q[b+12>>2],c);if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2507,207087);G()}Ii=b+16|0;return 0}function JG(a,b,c){var d=0,e=0,f=0;d=Ii-32|0;Ii=d;a:{if(Ck(a,b,q[79307])){b=qj(a,b);a=q[b+4>>2];f=q[b>>2];b=a;e=tt(f,b);o[c|0]=1;if(e){b=hj(e)+3|0;a=Yi(b);q[d+16>>2]=e;sj(a,b,125496,d+16|0);break a}a=Yi(64);q[d>>2]=f;q[d+4>>2]=b;sj(a,64,125501,d);break a}o[c|0]=0;a=kj(a,b,0)}Ii=d+32|0;return a}function Ela(a,b){a=a|0;b=b|0;var c=0;c=Ii-48|0;Ii=c;if(a){Aw(c,q[a+4>>2]);u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];u[b+16>>2]=u[c+16>>2];u[b+20>>2]=u[c+20>>2];u[b+24>>2]=u[c+24>>2];u[b+32>>2]=u[c+32>>2];u[b+36>>2]=u[c+36>>2];u[b+40>>2]=u[c+40>>2]}Ii=c+48|0}function vM(a){var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;e=q[a+4>>2];if(q[e>>2]){while(1){q[b+16>>2]=0;c=w(d,112)+e|0;q[b+8>>2]=q[c+24>>2];q[b+12>>2]=q[((d<<2)+a|0)+12>>2];c=q[c+32>>2];if(c){Mi[c|0](b+8|0)|0}d=d+1|0;if(d>>>0>2]){continue}break}}Qn(q[a+3232>>2]);Ni(gsa(a));Ii=b+32|0}function nua(a,b){var c=0,d=0,e=0,f=0,g=0;d=1;a:{while(1){c=w(e,24)+a|0;f=r[c+12|0];if(!f){return}c=q[c+8>>2];if(c>>>0>8){break a}c=q[(c<<2)+154632>>2];d=c>>>0>d>>>0?c:d;g=w(c,f)+((c+g|0)-1&0-c)|0;e=e+1|0;if((e|0)!=3){continue}break}q[b>>2]=(d+g|0)-1&0-d;return}J(153529,153556,157,153579);G()}function Zra(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=q[q[a+16>>2]>>2];a=q[a+12>>2];b=0;a:{if(!a){break a}b=q[a+120>>2]}e=q[b+8>>2]-q[b+12>>2]>>4;a=q[d>>2];q[c+8>>2]=0;a=sw(b,a,1,d,c+8|0);if(q[b+8>>2]-q[b+12>>2]>>4!=(e|0)){J(12728,12749,201,12783);G()}Ii=c+16|0;return((a|0)==-1?-1e3:0)|0}function Zpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-48|0;Ii=b;d=1;e=nj(b+24|0,a,1,65882,784);c=oo(a,1,1,0);q[b+20>>2]=0;a:{if(Kp(c,b+20|0)){q[b+4>>2]=65665;q[b>>2]=65665;d=Kj(e,66114,b);break a}c=q[b+20>>2];f=q[a+8>>2];q[f+8>>2]=3;v[f>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16}mj(e);Ii=b+48|0;return d|0}function XT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;d=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;b=2;a:{if((io(d,1,2,c+8|0,c+12|0)|0)<=-1){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,137391);break a}b=q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(b|0)!=0;q[a+8>>2]=q[a+8>>2]+16;b=1}Ii=c+16|0;return b|0}function lP(a){q[a+80>>2]=0;q[a+72>>2]=0;q[a+76>>2]=-1;q[a+64>>2]=0;q[a+68>>2]=-1;q[a+56>>2]=0;q[a+60>>2]=-1;q[a+48>>2]=0;q[a+52>>2]=-1;q[a+40>>2]=0;q[a+44>>2]=-1;q[a+32>>2]=0;q[a+36>>2]=-1;q[a+24>>2]=0;q[a+28>>2]=-1;q[a+16>>2]=0;q[a+20>>2]=-1;q[a+8>>2]=0;q[a+12>>2]=-1;q[a>>2]=0;q[a+4>>2]=-1}function kka(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;a:{if(!Qj(q[a+20>>2],q[a+24>>2],q[58616],c)){a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}b=q[c+4>>2];q[a>>2]=q[c>>2];q[a+4>>2]=b;b=q[c+12>>2];q[a+8>>2]=q[c+8>>2];q[a+12>>2]=b;a=0;break a}a=-13;b=q[c>>2];if(!b){break a}Aj(b)}Ii=c+16|0;return a|0}function kB(a){var b=0,c=0,d=0;c=q[a>>2];d=q[c+8>>2]-q[c+12>>2]>>4;lia(a);hia(a);gia(a);bia(a);eia(a);iia(a);kia(a);b=q[a>>2];Ak(b,80827,233024);Ri(b,-2);cia(a);dia(a);b=q[a>>2];Ak(b,71874,232480);Ri(b,-2);Zha(a);jia(a);if(q[c+8>>2]-q[c+12>>2]>>4!=(d|0)){J(58973,58994,144,59028);G()}return 1}function bL(a,b){var c=0,d=0,e=0;c=q[b+16>>2];e=q[b+12>>2];if((c|0)!=(e|0)){c=e;while(1){cj(a,q[(d<<2)+c>>2]);d=d+1|0;c=q[b+12>>2];if(d>>>0>2]-c>>2>>>0){continue}break}}q[b+16>>2]=c;a=q[b+8>>2];if(a){Aj(a);q[b+8>>2]=0}a:{if(o[b+24|0]&1){break a}a=q[b+12>>2];if(!a){break a}Ni(a)}Ni(b)}function RA(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=Ii-32|0;Ii=h;i=1;j=nj(h+8|0,a,1,202233,1258);c=Wv(b,c,d,e,0);a:{if(!c){q[h>>2]=(q[b+40>>2]-q[b+32>>2]|0)/592;i=Kj(j,206298,h);break a}q[TA(b,c)+488>>2]=g;HJ(b,c,f);d=yj(a,8);q[d+4>>2]=c;q[d>>2]=b;Zi(a,-1e4,202300);xj(a,-2)}mj(j);Ii=h+32|0;return i}function Lq(a,b,c){var d=0,e=0;d=q[c+4>>2];e=q[c>>2];o[a|0]=e;o[a+1|0]=e>>>8;o[a+2|0]=e>>>16;o[a+3|0]=e>>>24;o[a+4|0]=d;o[a+5|0]=d>>>8;o[a+6|0]=d>>>16;o[a+7|0]=d>>>24;o[a+8|0]=r[c+8|0];d=r[c+9|0]|r[c+10|0]<<8;o[a+9|0]=d;o[a+10|0]=d>>>8;o[a+11|0]=q[c+24>>2]>>>8;o[a+12|0]=q[c+24>>2];q[b>>2]=13}function wka(a){a=a|0;var b=0,c=0,d=0;c=$i(32);b=c;q[b>>2]=0;q[b+4>>2]=0;d=b+24|0;b=d;q[b>>2]=0;q[b+4>>2]=0;b=c;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=q[a+20>>2];q[q[a+24>>2]+8>>2]=b;q[b+8>>2]=Oi(q[a+8>>2]);q[b+12>>2]=Li;if(EL(b)){xq(q[c+4>>2],d);a=0}else{a=-1}return a|0}function t6(a){a:{b:{c:{d:{if(q[a>>2]|q[a+4>>2]){if(!q[a+12>>2]){break d}if(!q[a+16>>2]){break c}if(!q[a+28>>2]){break b}if(!q[a+32>>2]){break a}return}J(31057,31073,23,31103);G()}J(31110,31073,24,31103);G()}J(31123,31073,25,31103);G()}J(31138,31073,26,31103);G()}J(31157,31073,27,31103);G()}function oO(a){var b=0,c=0,d=0,e=0,f=0;b=q[a+40>>2];c=Mi[b|0](a,0,0,r[a|0]&128?t[a+20>>2]>t[a+28>>2]?2:1:1)|0;b=Li;d=b;if((b|0)>0?1:(b|0)>=0){e=q[a+20>>2]-q[a+28>>2]|0;a=q[a+8>>2]-q[a+4>>2]|0;f=c-a|0;b=e+f|0;a=(d-((a>>31)+(c>>>0>>0)|0)|0)+(e>>31)|0;c=b;d=b>>>0>>0?a+1|0:a}Li=d;return c}function jn(a,b,c){var d=0,e=0,f=0;d=q[a>>2];a=q[d+3148>>2];a:{if(!a){break a}a=q[q[d+3144>>2]+(Cza(b,c,a)<<2)>>2];if((a|0)==-1){break a}d=q[d+3152>>2];while(1){e=d+(a<<4)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){a=q[e+12>>2];if((a|0)!=-1){continue}break a}break}f=q[(d+(a<<4)|0)+8>>2]}return f}function ida(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-48|0;Ii=b;c=1;d=nj(b+24|0,a,1,202233,4300);tj(a,1,b+20|0);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);q[b+8>>2]=0;q[b+12>>2]=0;a:{if((lea(e,q[b+20>>2],b+8|0)|0)==-10){c=Kj(d,207998,0);break a}lk(a,q[b+8>>2],q[b+12>>2])}mj(d);Ii=b+48|0;return c|0}function bo(a){var b=0;if(a){if(q[a+96>>2]!=1){ij(a+4|0);ij(a+16|0);ij(a+28|0);nm(a+40|0);ij(a+76|0)}b=q[a+116>>2];if(b){if(q[a+120>>2]){nm(b);if(t[a+120>>2]>=2){b=1;while(1){nm(q[a+116>>2]+w(b,36)|0);b=b+1|0;if(b>>>0>2]){continue}break}}b=q[a+116>>2]}Ni(b)}Mi[q[65677]](a,0,124)|0}}function DV(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a:{if(b){d=hj(b);c=-28928;if(d>>>0>255){break a}}c=q[a+236>>2];if(c){f=c,g=0,h=hj(c),e=q[65677],Mi[e](f|0,g|0,h|0)|0;Ni(q[a+236>>2])}if(!b){q[a+236>>2]=0;return 0}c=a;a=bk(1,d+1|0);q[c+236>>2]=a;if(!a){return-32512}o[Ti(a,b,d)+d|0]=0;c=0}return c}function bU(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;b=q[b>>2];q[c+8>>2]=0;q[c+12>>2]=4;a:{if((io(b,41,16,c+8|0,c+12|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137391);a=2;break a}b=q[c+8>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function Tka(a){a=a|0;var b=0,c=0,d=0;b=Ii+ -64|0;Ii=b;c=nj(b+8|0,a,0,73366,1123);d=q[q[jk(a)+80>>2]+8>>2];q[b+4>>2]=0;q[b>>2]=0;q[b+56>>2]=0;q[b+60>>2]=0;q[b+48>>2]=0;q[b+52>>2]=0;q[b+40>>2]=0;q[b+44>>2]=0;q[b+32>>2]=0;q[b+36>>2]=0;Ml(a,1,d,73150,b+4|0,b+32|0,b);mj(c);Ii=b- -64|0;return 0}function Rba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;tj(a,1,b+12|0);c=Nn(a,2);a:{if(c){gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);zp(e,q[b+12>>2],7,c);break a}Qi(a,207143,0)}if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(202212,202233,2642,207167);G()}Ii=b+16|0;return 0}function Jn(a){var b=0,c=0,d=0,e=0;e=hj(a);a:{if(!q[240582]|!r[a|0]){break a}if(gk(a,61)){break a}b=q[q[240582]>>2];if(!b){break a}b:{while(1){d=Ik(a,b,e);b=q[240582];if(!d){d=q[b+(c<<2)>>2]+e|0;if(r[d|0]==61){break b}}c=c+1|0;b=q[b+(c<<2)>>2];if(b){continue}break}return 0}c=d+1|0}return c}function J_(a){a=a|0;var b=0,c=0,d=0;d=Ii-16|0;Ii=d;b=yj(a,4);q[b>>2]=0;Zi(a,-1e4,145545);xj(a,-2);c=cQ();q[b>>2]=c;b=1;if(!c){b=q[240513];c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;q[d>>2]=ql(b);Lj(a,145661,d);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;b=3}Ii=d+16|0;return b|0}function Ipa(a){a=a|0;var b=0,c=0,d=0;b=q[q[a+16>>2]>>2];d=q[a+4>>2];c=q[d>>2];u[b+8>>2]=u[c>>2];u[b+12>>2]=u[c+4>>2];u[b+16>>2]=u[c+8>>2];u[b+20>>2]=u[c+12>>2];c=r[b+160|0]&-2|q[c+16>>2]!=0;o[b+160|0]=c;o[b+160|0]=c&251|(q[q[d>>2]+20>>2]!=0)<<2;u[b+24>>2]=u[q[d>>2]+24>>2];qB(b,q[a+12>>2])}function uwa(a,b){var c=0,d=0,e=0;c=q[a+4>>2];d=zj(b,0);e=zj(b,1);a:{b=r[zj(b,2)+108256|0]<<1;if(b>>>0<32){b=(b|(r[d+108e3|0]<<10|r[e+108e3|0]<<5)|32768)&262142|c&1;if(b>>>0>=65536){break a}q[a+4>>2]=b|q[a+4>>2]&-65536;return}J(108512,96899,3126,107973);G()}J(108545,96899,3136,107973);G()}function Uaa(a){var b=0,c=0,d=0,e=0;b=q[210501];if(b){c=q[b+3476>>2];b=q[c+4>>2];e=q[c>>2];if((b|0)!=(e|0)){b=e;while(1){b=q[(d<<2)+b>>2];Mi[q[b+4>>2]](a,b);d=d+1|0;b=q[c>>2];if(d>>>0>2]-b>>2>>>0){continue}break}}if(!(!b|o[c+12|0]&1)){Ni(b)}Ni(c);q[q[210501]+3476>>2]=0;q[210501]=0}}function P2(a){a=a|0;var b=0,c=0,d=0;b=Ck(a,1,q[79321]);c=Ck(a,2,q[79321]);if(!(!b|!c|(q[b>>2]!=q[c>>2]|q[b+4>>2]!=q[c+4>>2]|(q[b+16>>2]!=q[c+16>>2]|q[b+20>>2]!=q[c+20>>2])))){d=q[b+24>>2]==q[c+24>>2]&q[b+28>>2]==q[c+28>>2]}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;return 1}function BR(a,b,c){var d=0,e=0;a:{b:{if(q[a+8>>2]){e=c;c=q[a+248>>2];d=c<<1;if((e|0)!=(d|1)|r[b|0]!=(d|0)){break a}b=b+1|0;if(os(b,a+252|0,c)){break a}c=b;b=q[a+248>>2];if(!os(c+b|0,a+264|0,b)){break b}break a}if(!(r[b|0]?0:(c|0)==1)){break a}q[a+244>>2]=1}return 0}Xj(a,2,40);return-31104}function $ua(a){a=a|0;var b=0,c=0,d=0,e=0;e=Ii-112|0;Ii=e;b=a;if((Vi(a,1)|0)==8){d=1;b=Gn(a,1)}c=d+1|0;a:{if(!sl(b,jj(a,c),e+8|0)){c=dk(a,c,147408);break a}c=2;d=VY(b,e+8|0,jj(a,d|2));if(d){co(b,a,1);Xi(a,d);ej(a,-2);break a}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;c=1}Ii=e+112|0;return c|0}function X2(a){a=a|0;var b=0,c=0,d=0,e=0;d=Ii-32|0;Ii=d;e=d+8|0;c=a?q[a>>2]:0;b=0;a:{if(!c){break a}b=q[c+120>>2]}e=nj(e,b,0,132848,478);c=LG(b);I4(sv(a),c);c=q[210420];a=q[b+8>>2];q[a+8>>2]=3;v[a>>3]=c|0;q[b+8>>2]=q[b+8>>2]+16;a=q[b+8>>2];q[a+8>>2]=0;q[b+8>>2]=a+16;CG(b);mj(e);Ii=d+32|0}function LB(a){var b=0,c=0,d=0;a=q[a>>2];Gj(q[a+3232>>2]);b=-1;a:{b:{c=q[a+3252>>2];d=q[a+3248>>2];if((c|0)!=(d|0)){b=q[a+3244>>2];if(!b){break b}if(c>>>0>=d>>>0){break a}q[a+3252>>2]=c+1;b=q[b+(c<<2)>>2]}Bj(q[a+3232>>2]);return b}J(12459,12368,151,12466);G()}J(12470,12368,152,12466);G()}function Jw(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;a:{b:{if(!a){break b}q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;if(!Iw(a,b,d,120)){a=q[d>>2];e=q[d+4>>2]-a|0;if(!e){break a}NB(a,e,b,c,0)}if(o[d+12|0]&1){break b}a=q[d>>2];if(!a){break b}Ni(a)}Ii=d+16|0;return}J(22783,22448,479,22794);G()}function A8(a){q[a>>2]=0;q[a+4>>2]=0;q[a+92>>2]=0;p[a+88>>1]=256;q[a+80>>2]=0;q[a+72>>2]=0;q[a+76>>2]=0;o[a+68|0]=1;q[a+60>>2]=0;q[a+64>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=1065353216;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;return a}function Yr(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-16|0;Ii=c;g=a;h=a;a:{if(!b){b=0;e=0;break a}d=b;b=z(b);vm(c,d,0,0,0,b+81|0);d=0+q[c+8>>2]|0;b=(q[c+12>>2]^65536)+(16414-b<<16)|0;b=d>>>0>>0?b+1|0:b;f=d;d=b;b=q[c+4>>2];e=q[c>>2]}q[h>>2]=e;q[g+4>>2]=b;q[a+8>>2]=f;q[a+12>>2]=d;Ii=c+16|0}function Fsa(a){var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=q[a+12>>2];if(b){Mi[b|0](q[a+8>>2])}d=q[a+4>>2];e=q[a>>2];b=0;while(1){a:{if(!b){b=Mi[q[a+20>>2]](e,d)|0;if(!b){break a}}q[c+12>>2]=b;q[c+8>>2]=a;Ka(21,c+8|0,0,1);continue}break}b=q[a+16>>2];if(b){Mi[b|0](q[a+8>>2])}Ii=c+16|0;return 1}function sq(){var a=0,b=0,c=0;a=$i(56);q[a+32>>2]=0;q[a+36>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;c=a+16|0;b=c;q[b>>2]=0;q[b+4>>2]=0;b=a+8|0;q[b>>2]=0;q[b+4>>2]=0;q[a+36>>2]=-1;Wi(4,4,a,b,a+4|0);pt(c,5,8);b=Fv();o[a+52|0]=0;q[a+48>>2]=b;return a}function rk(a){var b=0,c=0,d=0,e=0,f=0;f=q[a+76>>2]>=0;d=q[a>>2]&1;if(!d){b=q[a+52>>2];if(b){q[b+56>>2]=q[a+56>>2]}c=q[a+56>>2];if(c){q[c+52>>2]=b}if(q[240502]==(a|0)){q[240502]=c}}b=Kn(a);c=Mi[q[a+12>>2]](a)|0;e=q[a+96>>2];if(e){Ni(e)}a:{if(!d){Ni(a);break a}if(!f){break a}}return b|c}function DX(a,b,c){var d=0,e=0;a:{b:{e=q[a>>2];if(e){d=-24704;if(c>>>0>16){break a}if(o[e+20|0]&1){break b}d=c;c=q[e+16>>2];if(d>>>0>=c>>>0){break b}}d=-24832;break a}if(q[e>>2]==72){d=-24832;if(NE(q[a+60>>2],b)){break a}}d=0;if(!c){break a}Ti(a+40|0,b,c);q[a+56>>2]=c;return 0}return d}function Cha(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-304|0;Ii=b;e=nj(b+280|0,a,1,79890,353);q[b+12>>2]=32;V1(b+12|0,b+16|0);vj(a,q[b+12>>2],0);if(q[b+12>>2]){while(1){d=(b+16|0)+(c<<3)|0;lk(a,q[d>>2],q[d+4>>2]);c=c+1|0;nk(a,-2,c);if(t[b+12>>2]>c>>>0){continue}break}}mj(e);Ii=b+304|0;return 1}function b$(a,b,c){var d=0;d=Ii-32|0;Ii=d;a:{b:{switch(b-2|0){case 0:q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;mm(Ox(a,d,16,c));break a;case 8:break b;default:break a}}q[d+24>>2]=0;q[d+16>>2]=0;q[d+20>>2]=0;q[d+8>>2]=0;q[d+12>>2]=0;q[d>>2]=0;q[d+4>>2]=0;mm(Ox(a,d,28,c))}Ii=d+32|0}function Y2(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;if(a){d=sv(a);if(d){f=q[210420];b=a?q[a>>2]:0;c=q[b+120>>2];e=q[c+8>>2];q[e+8>>2]=3;v[e>>3]=f|0;q[c+8>>2]=q[c+8>>2]+16;b=q[b+120>>2];c=q[b+8>>2];q[c+8>>2]=2;q[c>>2]=0;q[b+8>>2]=q[b+8>>2]+16;BG(a);k5(d)}return}J(132983,132848,443,133047);G()}function Us(a,b){var c=0;if(q[b+76>>2]<0){a:{if(o[b+75|0]==(a&255)){break a}c=q[b+20>>2];if(c>>>0>=t[b+16>>2]){break a}q[b+20>>2]=c+1;o[c|0]=a;return}kO(b,a);return}b:{c:{if(o[b+75|0]==(a&255)){break c}c=q[b+20>>2];if(c>>>0>=t[b+16>>2]){break c}q[b+20>>2]=c+1;o[c|0]=a;break b}kO(b,a)}}function NM(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;a:{if(!c&b>>>0<128){e=b;break a}while(1){o[(d+6|0)+f|0]=b|128;f=f+1|0;g=!c&b>>>0>16383|(c|0)!=0;e=c;c=c>>>7|0;e=(e&127)<<25|b>>>7;b=e;if(g){continue}break}}o[(d+6|0)+f|0]=e;a=Mi[q[a>>2]](q[a+4>>2],d+6|0,f+1|0)|0;Ii=d+16|0;return a}function yX(a,b){var c=0,d=0,e=0;d=Ii-32|0;Ii=d;c=d;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;e=a+32|0;Hs(e);q[a+316>>2]=b;q[a+312>>2]=1411;q[a+28>>2]=1e4;q[a+24>>2]=48;b=Yq(e,c,256);if(!b){b=JE(a,181460,17)}Ii=d+32|0;return b}function vV(a,b){var c=0,d=0;a:{if(!(r[a+281|0]&8)){break a}a=a+296|0;while(1){c=q[a+4>>2];if((c|0)==8){if(!Ej(q[a+8>>2],b,8)){break a}}if((c|0)==4){c=q[a+8>>2];if((r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24))==2432341){break a}}a=q[a+12>>2];if(a){continue}break}d=-10240}return d}function iT(a){a=a|0;var b=0;ej(a,-10003);xk(a,1);if(dq(a,(q[a+8>>2]-q[a+12>>2]>>4)-1|0,-1,0)){if((Vi(a,-1)|0)==5){b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;ik(a,-2);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;xk(a,-2);return 2}Fo(a);return 0}return q[a+8>>2]-q[a+12>>2]>>4}function cka(a){a=a|0;var b=0,c=0,d=0;b=Ui($i(164),0,164);c=LL(q[a>>2],q[a+4>>2],q[a+20>>2],b);if(!c){d=q[a+24>>2];q[d+8>>2]=b;q[d+16>>2]=(q[b+64>>2]+(q[b+48>>2]+(q[a+16>>2]+q[b+16>>2]|0)|0)-(q[b+56>>2]+(q[b+8>>2]+q[b+40>>2]|0))|0)+164;return c|0}jw(q[a>>2],b);lB(b);Ni(b);return c|0}function V6(a,b,c,d){var e=0,f=0,g=0,h=0;e=a+7368|0;a:{h=a+7372|0;g=a+7376|0;f=q[a+7368>>2];if((q[g>>2]-f|0)!=1048576){if(o[a+7380|0]&1){break a}Wi(1048576,1,e,g,a+7372|0);f=q[a+7368>>2]}q[h>>2]=f;a=zv(a,b,d,e);if(a){b=0}else{b=q[e>>2]}q[c>>2]=b;return a}J(26803,26878,493,26726);G()}function C3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-96|0;Ii=b;d=_i(a,1,q[79307],0);c=q[d+4>>2];e=q[d>>2];d=c;c=tt(e,c);a:{if(c){q[b+20>>2]=c;q[b+16>>2]=125269;sj(b+32|0,64,125466,b+16|0);break a}q[b+8>>2]=e;q[b+12>>2]=d;q[b>>2]=125269;sj(b+32|0,64,125475,b)}Xi(a,b+32|0);Ii=b+96|0;return 1}function oaa(a){var b=0;Ni(q[a>>2]);Qn(q[a+48>>2]);T8(q[a+84>>2]);a:{if(o[a+76|0]&1){break a}b=q[a+64>>2];if(!b){break a}Ni(b)}b:{if(o[a+60|0]&1){break b}b=q[a+52>>2];if(!b){break b}Ni(b)}c:{if(o[a+44|0]&1){break c}b=q[a+24>>2];if(b){Ni(b)}b=q[a+16>>2];if(!b){break c}Ni(b)}return a}function faa(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;a:{if(!dj(b,167866)){a=vI(a,c);break a}e=r[a+2196|0];f=q[a>>2];g=s[a+2198>>1];q[d+12>>2]=c;q[d+8>>2]=g;q[d+4>>2]=f;q[d>>2]=e?167855:167861;sj(a+4|0,2124,167841,d);q[a+2168>>2]=Jk();q[a+2172>>2]=Li;a=wI(a,c,b)}Ii=d+16|0;return a}function Vx(a,b,c,d){var e=0,f=0,g=0;f=q[240587]+1|0;q[240587]=f;q[a>>2]=f;a:{if(d){while(1){g=(e<<3)+c|0;if(!q[g>>2]){break a}e=e+1|0;if((e|0)!=(d|0)){continue}break}}e=a;a=d<<1;b=Vx(e,b,ul(c,d<<4|8),a);L(a|0);return b}q[g>>2]=f;a=(e<<3)+c|0;q[a+4>>2]=b;q[a+8>>2]=0;L(d|0);return c}function Kv(a,b,c){var d=0,e=0;a:{if(b){d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>=e-a>>2>>>0){break a}a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}b=q[c+4>>2];d=q[c>>2];u[a+40>>2]=u[c+8>>2];q[a+32>>2]=d;q[a+36>>2]=b}return}J(151947,151192,479,151403);G()}function y8(a,b,c){var d=0,e=0,f=0;d=q[a+24>>2];if(!d){return-1}f=-1;d=q[q[a+20>>2]+(Cza(b,c,d)<<2)>>2];a:{if((d|0)==-1){break a}a=q[a+28>>2];while(1){e=a+(d<<4)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+12>>2];if((d|0)!=-1){continue}break a}break}f=q[(a+(d<<4)|0)+8>>2]}return f}function mT(a,b){var c=0,d=0,e=0;d=Ii-16|0;Ii=d;a:{b:{if(q[a>>2]==6){e=-14848;a=lU(a);c=-46;c:{if(!a){break c}q[d+12>>2]=q[a+16>>2];c=0}if(!c){break b}break a}e=nT(a,d+12|0);if(e){break a}}a=q[d+12>>2];c=q[b>>2];if(c){e=-15616;if((a|0)!=(c|0)){break a}}e=Iu(b,a)}Ii=d+16|0;return e}function cx(a,b){var c=0,d=0;a:{if(a|b){while(1){c=-1;if(!a|!b|q[a>>2]!=q[b>>2]){break a}d=q[a+4>>2];if((d|0)!=q[b+4>>2]){break a}if(Ej(q[a+8>>2],q[b+8>>2],d)){break a}if(XO(a+12|0,b+12|0)|r[a+28|0]!=r[b+28|0]){break a}a=q[a+24>>2];b=q[b+24>>2];if(a|b){continue}break}}c=0}return c}function bea(a,b,c){var d=0,e=0,f=0;d=q[a+132>>2];a:{if(!d){break a}d=q[q[a+128>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+136>>2];while(1){e=a+w(d,24)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+20>>2];if((d|0)!=-1){continue}break a}break}f=q[(a+w(d,24)|0)+8>>2]}return f}function _R(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=Ii-144|0;Ii=d;e=q[a+64>>2];if(!e){e=q[a+60>>2]}ss(d);oy(d,q[a+68>>2]+776|0);Du(d,d+112|0);if(d){Mi[q[65677]](d,0,108)|0}Mi[q[q[a+68>>2]+1116>>2]](e+48|0,48,c?181289:181273,d+112|0,32,b,12)|0;Mi[q[65677]](d+112|0,0,32)|0;Ii=d+144|0}function Xq(a,b,c){var d=0,e=0,f=0,g=0;e=Ii-16|0;Ii=e;d=hk(a,b,e+12|0,2);a:{if(d){break a}d=-100;f=q[e+12>>2]-1|0;if(f>>>0>3){break a}b=q[a>>2];if(o[b|0]<0){break a}q[c>>2]=0;while(1){g=r[b|0]|g<<8;q[c>>2]=g;b=b+1|0;q[a>>2]=b;d=f;f=d-1|0;if(d){continue}break}d=0}Ii=e+16|0;return d}function Lu(a,b,c,d){var e=0,f=0;f=-24832;e=q[a>>2];a:{if(!e|(q[e+8>>2]!=(c|0)?!(r[e+20|0]&2):0)){break a}q[a+8>>2]=d;q[a+4>>2]=c;if(!(q[e+4>>2]-3>>>0>2?(d|0)!=1:0)){return Mi[q[q[e+28>>2]+20>>2]](q[a+60>>2],b,c)|0}if(d){break a}f=Mi[q[q[e+28>>2]+24>>2]](q[a+60>>2],b,c)|0}return f}function Csa(a,b){a=a|0;b=b|0;var c=0,d=0;c=0;a:{if((a|0)<1){break a}b:{while(1){c=q[(d<<2)+b>>2];if(!Ik(4142,c,3)){c=gk(c,61);if(c){break b}}d=d+1|0;if((d|0)!=(a|0)){continue}break}c=0;break a}c=c+1|0}if(Yga(c)){c=q[71340];c=Qsa($i(512),c);if(Nsa(c,a,b)){return c|0}IM(c)}return 0}function CB(a,b,c){var d=0,e=0,f=0;d=q[a+3148>>2];a:{if(!d){break a}d=q[q[a+3144>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+3152>>2];while(1){e=a+(d<<4)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+12>>2];if((d|0)!=-1){continue}break a}break}f=q[(a+(d<<4)|0)+8>>2]}return f}function Ul(a,b,c){var d=0,e=0;d=s[a+52>>1]+1|0;p[a+52>>1]=d;a:{e=d&65535;b:{if(e>>>0<200){break b}if((e|0)==200){Yk(a,140888,0);break b}if((d&65535)>>>0>=225){break a}}if(!av(a,b,c)){gF(a,1)}p[a+52>>1]=s[a+52>>1]-1;b=q[a+16>>2];if(t[b+68>>2]>=t[b+64>>2]){om(a)}return}Nj(a,5);G()}function Mla(a){a=a|0;var b=0,c=0,d=0;d=q[a+8>>2]-q[a+12>>2]|0;c=+q[74606];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;c=+q[74607];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+2|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(82301,82047,281,82326);G()}return 2}function xea(a,b,c){var d=0,e=0,f=0;d=q[a+196>>2];a:{if(!d){break a}d=q[q[a+192>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+200>>2];while(1){e=a+(d<<4)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+12>>2];if((d|0)!=-1){continue}break a}break}f=q[(a+(d<<4)|0)+8>>2]}return f}function u1(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;f=q[a+4>>2];g=q[a+12>>2];if(f>>>0>>0){J(211547,211484,220,211531);G()}h=d;d=f-g|0;c=c>>>0>>0?c:d;q[h>>2]=c;Ti(b,q[a+16>>2]+q[a+12>>2]|0,c);q[a+12>>2]=c+q[a+12>>2];Ii=e+16|0;return 0}function Vo(a){var b=0,c=0,d=0,e=0;a:{b:{if(a+1>>>0<2){break b}c=a&65535;d=q[210908];if(c>>>0>=t[d+8>>2]){break a}b=q[q[d>>2]+(c<<2)>>2];if(!b|s[q[d+4>>2]+(c<<1)>>1]!=(a>>>16|0)){break b}e=!Ej(q[b>>2]+w(q[b+24>>2],q[b+28>>2])|0,154272,16)}return e}J(154349,154364,144,154402);G()}function C2(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=qj(a,1);a:{b:{switch(r[kj(a,2,0)|0]-120|0){case 0:u[c>>2]=fj(a,3);break a;case 1:u[c+4>>2]=fj(a,3);break a;case 2:u[c+8>>2]=fj(a,3);break a;default:break b}}q[b+4>>2]=134e3;q[b>>2]=134064;d=Qi(a,134763,b)}Ii=b+16|0;return d|0}function zea(a,b,c){var d=0,e=0,f=0;d=q[a+100>>2];a:{if(!d){break a}d=q[q[a+96>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+104>>2];while(1){e=a+(d<<4)|0;if((b|0)!=q[e>>2]|q[e+4>>2]!=(c|0)){d=q[e+12>>2];if((d|0)!=-1){continue}break a}break}f=q[(a+(d<<4)|0)+8>>2]}return f}function jQ(a,b){var c=0,d=0,e=0,f=0;d=a+2|0;c=r[a+2|0];e=!c;a=r[a+1|0]<<16|r[a|0]<<24|c<<8;f=r[b+1|0]<<16|r[b|0]<<24|r[b+2|0]<<8;a:{if(!(!c|(a|0)==(f|0))){while(1){b=d+1|0;c=r[d+1|0];e=!c;a=(a|c)<<8;if((f|0)==(a|0)){break a}d=b;if(c){continue}break}break a}b=d}return e?0:b-2|0}function d$(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=kj(a,1,0);q[b+4>>2]=0;a:{if(eu(c,b+8|0)){c=GD(b+8|0,b+4|0);break a}c=FD(c,b+4|0)}b:{if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,ED(c));break b}Xi(a,Vy(q[q[q[q[b+4>>2]+16>>2]>>2]>>2]));EF(a,q[b+4>>2])}Ii=b+16|0;return 2}function cS(a){var b=0,c=0,d=0;a:{b=q[a+68>>2];if(!b|q[a+128>>2]!=22|q[b+580>>2]){break a}c=q[a+132>>2]+13|0;if(c>>>0>32768-q[b+524>>2]>>>0){break a}d=s[a+140>>1];q[b+584>>2]=c;q[b+588>>2]=d+1;d=bk(1,c);q[b+580>>2]=d;if(!d){break a}Ti(d,q[a+108>>2],c);q[b+524>>2]=q[b+524>>2]+c}}function ZZ(a){a=a|0;var b=0;Ri(a,1);yj(a,0);if(Uj(a,1)){a:{if((Vi(a,1)|0)==1){vj(a,0,0);ej(a,-1);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-10003);break a}b:{if($l(a,1)){jl(a,-10003);b=Uj(a,-1);Ri(a,-2);if(b){break b}}dk(a,1,144246)}$l(a,1)}xj(a,2)}return 1}function KA(a,b,c){var d=0,e=0,f=0;a:{if(c){e=r[b+144|0];if((e|0)==255){o[c|0]=0;return}d=q[q[210501]+3476>>2];f=q[d>>2];if(q[d+4>>2]-f>>2>>>0<=e>>>0){break a}d=a;a=q[f+(e<<2)>>2];Mi[q[a+16>>2]](d,a,b,c,128);return}J(148922,148471,351,148901);G()}J(148934,148471,360,148901);G()}function G7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(115568,115465,478,119531);G()}c=Mi[q[74932]](q[q[b+304>>2]+2384>>2])|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function D7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(115568,115465,478,119531);G()}c=Mi[q[74931]](q[q[b+304>>2]+2384>>2])|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function C7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(115568,115465,478,119531);G()}c=Mi[q[74934]](q[q[b+304>>2]+2384>>2])|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function B7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;gj(a);b=_i(a,-1,q[79180],119558);Ri(a,-2);if((c|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(115568,115465,478,119531);G()}c=Mi[q[74933]](q[q[b+304>>2]+2384>>2])|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function kia(a){var b=0;a=q[a>>2];Ak(a,68433,232320);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,68451);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,68467);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,68482);Ri(a,-2)}function iia(a){var b=0;a=q[a>>2];Ak(a,70261,232400);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,70269);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,70285);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=2;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,70300);Ri(a,-2)}function h7(a,b){var c=0,d=0,e=0,f=0,g=0;c=Ii-16|0;Ii=c;u[c+12>>2]=b;q[c+8>>2]=0;q[a+4>>2]=q[a>>2];oz(q[a+312>>2],b);Cv(a,1,c+12|0);e=q[a+4>>2];d=q[a>>2];f=e-d|0;g=(f|0)/40|0;a:{if(f){if((d|0)==(e|0)){break a}p8(q[a+304>>2],d,g)}Ii=c+16|0;return}J(121409,121353,421,121420);G()}function cwa(a,b){var c=0,d=0;a:{if(b>>>0<21){if($N(b)>>>0<=a>>>0){break a}if(!(898778>>>b&1)){return _B(a,0,0,b)}c=q[w(b,12)+99504>>2];d=a>>>c|0;a=(-1<>>b&1){return _B(a,d,0,b)}return _B(a,0,d,b)}J(99810,96899,11468,99913);G()}J(99939,96899,11469,99913);G()}function Nha(a,b,c,d){var e=0,f=0;e=Ii-32|0;Ii=e;f=-4;a:{if(q[b>>2]!=1){break a}f=-8;b=Y6(a,q[b+8>>2],q[b+12>>2],c,e)+18|0;if(!b){break a}if((b|0)==18){f=0;b=q[e+8>>2];if((b|0)==q[d>>2]){break a}tp(a,b);b=q[d>>2];if(b){cj(a,b)}q[d>>2]=q[e+8>>2];break a}f=-10}Ii=e+32|0;return f}function nq(a,b,c){var d=0,e=0;d=q[a>>2];a=q[d+4>>2];a:{if(!a){break a}a=q[q[d>>2]+(Cza(b,c,a)<<2)>>2];if((a|0)==-1){break a}d=q[d+8>>2];while(1){a=w(a,48);e=a+d|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){break a}a=q[(a+d|0)+40>>2];if((a|0)!=-1){continue}break}e=0}return e?e+8|0:0}function mS(a,b,c){var d=0,e=0,f=0;d=Ii+ -64|0;Ii=d;e=q[a>>2];q[d+48>>2]=0;e=am(e,3,d+48|0);f=q[a>>2];q[d+32>>2]=e&-2049;am(f,4,d+32|0);e=0;if((Qva(q[a>>2],b,c)|0)<=-1){e=q[240513]}b=q[a>>2];q[d+16>>2]=0;b=am(b,3,d+16|0);a=q[a>>2];q[d>>2]=b|2048;am(a,4,d);Ii=d- -64|0;return e}function bC(a,b,c){var d=0,e=0;a:{b:{d=b+5|0;if(d>>>0<65){e=b>>>3|0;if((e|0)!=(d-1>>>3|0)){break b}if(c>>>0>=32){break a}a=a-e|0;d=a;e=r[a+7|0];a=b&7;o[d+7|0]=e&(31<>2]=0;q[g+8>>2]=1;q[g+12>>2]=0;q[g+28>>2]=0;q[g+20>>2]=1;q[g+24>>2]=0;q[g+40>>2]=0;q[g+32>>2]=1;q[g+36>>2]=0;a=Es(a,g+8|0,d,c,e,f);a:{if(a){break a}a=-20352;if(zE(g+8|0)){break a}a=wk(b,g+8|0)}nm(g+8|0);Ii=g+48|0;return a}function J8(a){a=a|0;var b=0,c=0,d=0,e=0;a:{if(q[a+8>>2]!=1){break a}b=q[a+16>>2];c=q[a+20>>2];if((b|0)==(c|0)){break a}e=q[a+4>>2];while(1){d=q[a+12>>2]+w(q[b>>2],48)|0;if(q[d+28>>2]==q[e+1824>>2]){po(q[a>>2],q[d+16>>2]);c=q[a+20>>2]}b=b+4|0;if((c|0)!=(b|0)){continue}break}}}function $D(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;f=q[a>>2];a:{if((b-f|0)<1){e=-9312;break a}g=2;e=-9314;b:{switch(r[f|0]-23|0){case 1:g=4;break;case 0:break b;default:break a}}q[a>>2]=f+1;b=Wq(a,b,d+12|0);if(b){e=b-9216|0;break a}e=YO(a,q[d+12>>2],g,c)}Ii=d+16|0;return e}function Es(a,b,c,d,e,f){var g=0,h=0;g=iX(a,c);a:{if(g){break a}g=CE(a,d);if(g){break a}g=-20352;if(q[a+48>>2]){h=q[a+60>>2]?1:2}else{h=0}if((h|0)==2){g=s0(a,b,c,d,e,f);if(g){break a}g=0}if(q[a+48>>2]){h=q[a+60>>2]?1:2}else{h=0}if((h|0)!=1){break a}g=v0(a,b,c,d,e,f)}return g}function tsa(a){var b=0,c=0,d=0;d=Ii-16|0;Ii=d;b=q[210498];a:{if(!b){break a}b:{while(1){c=q[b+4>>2];if(c){q[210499]=b;c=Mi[c|0](a)|0;if(c){break b}o[b+40|0]=1}b=q[b+36>>2];if(b){continue}break}c=0;break a}q[d>>2]=q[b>>2];Pi(4,147636,147646,d)}q[210499]=0;Ii=d+16|0;return c}function tk(a,b,c,d){var e=0,f=0,g=0;if((b|c|d)>>>0>=4){J(106805,106647,766,106823);G()}e=a+c|0;f=e;g=r[e|0];e=b<<1;o[f|0]=g&(3<>>3|0)|0;b=a;c=c&7;e=Fza(-2,c);g=b+7|0;f=e&r[b+7|0];b=r[d+106801|0];o[g|0]=f|(b&1)<>>1<>>0<1){d=a;break a}while(1){d=Bza(a,b,10);e=Li;f=e;e=Aza(d,e,10,0);c=c-1|0;o[c|0]=a-e|48;e=b>>>0>9;a=d;b=f;if(e){continue}break}}if(d){while(1){c=c-1|0;a=(d>>>0)/10|0;o[c|0]=d-w(a,10)|48;b=d>>>0>9;d=a;if(b){continue}break}}return c}function cM(a,b,c,d){var e=0,f=0,g=0;f=q[a+4>>2];e=q[a>>2];if(f>>>0>=t[e>>2]){J(13986,13768,256,14049);G()}q[a+4>>2]=f+1;g=q[e+4>>2]+(f<<3)|0;q[g>>2]=b;q[g+4>>2]=c;b=f<<2;q[b+q[e+12>>2]>>2]=6;c=b+q[e+8>>2]|0;b=q[a+16>>2];q[c>>2]=b;o[b+q[e+28>>2]|0]=d;q[a+16>>2]=q[a+16>>2]+1}function Ow(a,b){var c=0,d=0;c=Ii-32|0;Ii=c;q[c+24>>2]=0;q[c+16>>2]=1;q[c+20>>2]=0;q[c+8>>2]=0;q[c>>2]=1;q[c+4>>2]=0;d=Bk(c+16|0,2);a:{if(d){break a}d=Pl(c,b,2);if(d){break a}d=0;if((_j(a,c+16|0)|0)>=0){if((_j(a,c)|0)<1){break a}}d=-12416}ij(c+16|0);ij(c);Ii=c+32|0;return d}function GY(a){var b=0;lb(13,1)|0;Io(a,137089,253616);Xi(a,137096);Xi(a,137105);Ij(a,-3);Io(a,0,253520);Io(a,0,254016);Xi(a,136917);vj(a,0,0);Io(a,0,253552);pj(a,-3);kQ(a);YP(a);Xi(a,137166);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1024;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);Io(a,0,253648)}function Qs(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;d=q[b+16>>2]+((q[c+8>>2]&(-1<>2]==(c|0)?q[d+24>>2]==4:0)){d=q[d+28>>2];if(d){continue}break b}break}if((d|0)!=141056){break a}}q[e+8>>2]=4;q[e>>2]=c;d=Wp(a,b,e)}Ii=e+16|0;return d}function uia(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[q[a+32>>2]+8>>2];a:{if(!d){c=-13;break a}c=-13;if(Qj(q[a+20>>2],q[a+24>>2],q[62034],b+12|0)){break a}a=Er(q[a+4>>2],q[b+12>>2]);c=-13;b:{if(!a){break b}c=Mi[q[74969]](d,a)|0?0:-13}Aj(q[b+12>>2])}Ii=b+16|0;return c|0}function RZ(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{if((Vi(a,1)|0)!=4){break a}if(r[uj(a,1,0)|0]!=35){break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c-1|0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=jj(a,1);b=(b|0)<0?b+c|0:(b|0)>(c|0)?c:b;if((b|0)<=0){dk(a,1,144039)}return c-b|0}function Nja(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[q[a+32>>2]+8>>2];a:{if(!d){c=-13;break a}c=-13;if(Qj(q[a+20>>2],q[a+24>>2],q[62034],b+12|0)){break a}a=Er(q[a+4>>2],q[b+12>>2]);c=-13;b:{if(!a){break b}c=Mi[q[74970]](d,a)|0?0:-13}Aj(q[b+12>>2])}Ii=b+16|0;return c|0}function MU(a){a=a|0;var b=0,c=0,d=0;c=ln(a,137611);d=fo(a,2,32);a:{if(y(d)<2147483648){b=~~d;break a}b=-2147483648}b=kS(c,b);if(b){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,mm(b));return 2}Np(a,137635,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function mG(a){var b=0,c=0;b=q[239672];c=q[b+16>>2];a:{if(c){Gj(c);b=q[239672];b=q[b+16>>2];if(b){Gj(b);o[a+60|0]=r[a+60|0]&251;fr(q[a>>2]);Bj(b);Bj(c);return 0}o[a+60|0]=r[a+60|0]&251;fr(q[a>>2]);if(!c){break a}Bj(c);return 0}o[a+60|0]=r[a+60|0]&251;fr(q[a>>2])}return 0}function Yla(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-48|0;Ii=b;d=1;e=nj(b+24|0,a,1,65882,698);c=Wo(oo(a,1,1,0),b+20|0,b+16|0);a:{if(c){a=b;if(c>>>0<=11){c=q[(c<<2)+262624>>2]}else{c=153853}q[a>>2]=c;d=Kj(e,67030,b);break a}bj(a,q[b+20>>2],q[b+16>>2])}mj(e);Ii=b+48|0;return d|0}function UM(a,b){var c=0,d=0,e=0,f=0;c=q[71908];a:{if(!c){break a}c=q[q[71907]+(Cza(a,b,c)<<2)>>2];if((c|0)==-1){break a}e=q[71909];while(1){d=(c<<4)+e|0;if((a|0)!=q[d>>2]|q[d+4>>2]!=(b|0)){c=q[d+12>>2];if((c|0)!=-1){continue}break a}break}f=q[((c<<4)+e|0)+8>>2]}return f}function PX(a,b,c,d,e,f,g,h,i,j){var k=0;k=Ii-16|0;Ii=k;a=CN(a,1,b,c,d,e,f,g,h,k,j);a:{if(a){break a}a=0;if(!j){break a}c=0;d=0;while(1){c=r[a+k|0]^r[a+i|0]|c;d=d+1|0;a=d&255;if(j>>>0>a>>>0){continue}break}if(!c){a=0;break a}Mi[q[65677]](h,0,b)|0;a=-15}Ii=k+16|0;return a}function E1(a){var b=0,c=0,d=0,e=0,f=0;a:{b=q[239666];if(!b){break a}while(1){b:{if(q[b+4>>2]!=(a|0)){b=q[b+40>>2];if(b){continue}if(c){break b}break a}d=q[b+8>>2];f=!c|(d|0)>(e|0);c=f?b:c;e=f?d:e;b=q[b+40>>2];if(b){continue}}break}return c}J(209483,209493,74,209518);G()}function tC(a){var b=0,c=0;a:{if(t[a+20>>2]<=t[a+28>>2]){break a}Mi[q[a+36>>2]](a,0,0)|0;if(q[a+20>>2]){break a}return-1}b=q[a+4>>2];c=q[a+8>>2];if(b>>>0>>0){b=b-c|0;Mi[q[a+40>>2]](a,b,b>>31,1)|0}q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;return 0}function sR(a,b,c){var d=0;a:{b:{c:{if(!c){break c}d=c;c=r[b|0];if((d|0)!=(c+1|0)){break c}if(!c){break a}break b}Xj(a,2,50);return-31104}while(1){d=r[b+1|0];if(d>>>0>1){b=b+1|0;c=c-1|0;if(c){continue}break a}break}q[q[a+68>>2]+352>>2]=d;return 0}Xj(a,2,40);return-31104}function jU(a){var b=0;a:{if(!a){break a}b:{switch(q[a+4>>2]-5|0){case 4:if(Ej(157708,q[a+8>>2],9)){break a}b=263360;break a;case 2:if(Ej(157736,q[a+8>>2],7)){break a}return 263380;case 0:break b;default:break a}}if(Ej(157774,q[a+8>>2],5)){break a}return 263400}return b}function j0(a,b,c,d){var e=0,f=0;e=Ii-80|0;Ii=e;a:{if(d>>>0>=65){f=Bu(c,d,e,0);if(f){break a}d=64;c=e}o[e+79|0]=d;o[e+78|0]=b;if(!q[a>>2]){f=Zp(a+8|0,0);if(f){break a}}q[a>>2]=1;a=a+8|0;f=Yp(a,e+78|0,2);if(f){break a}f=Yp(a,c,d)}Mi[q[65677]](e,0,64)|0;Ii=e+80|0;return f}function Sta(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=jj(a,1);if(!((b|0)==1&r[906092]!=0)){Qi(a,209110,0)}d=jj(a,2);a:{if(d>>>0>=32){q[c>>2]=32;a=Qi(a,209056,c);break a}b=Lta(b,d);b:{if(!b){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;break b}Xi(a,b)}a=1}Ii=c+16|0;return a|0}function Mxa(a,b){var c=0,d=0,e=0;a:{b:{while(1){if(r[c+218464|0]!=(a|0)){d=87;c=c+1|0;if((c|0)!=87){continue}break b}break}d=c;if(c){break b}a=218560;break a}c=218560;while(1){e=r[c|0];a=c+1|0;c=a;if(e){continue}c=a;d=d-1|0;if(d){continue}break}}return lO(a,q[b+20>>2])}function G3(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-48|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;c=_i(a,1,q[79307],0);e=q[c+4>>2];q[b>>2]=q[c>>2];q[b+4>>2]=e;sj(b+16|0,17,125530,b);Xi(a,b+16|0);if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(125274,125299,114,125538);G()}Ii=b+48|0;return 1}function Dia(a){a=a|0;var b=0,c=0;b=q[q[a+8>>2]+8>>2];c=q[b+48>>2];if(c){cj(q[a>>2],c)}a=q[b+64>>2];if(a){Aj(a)}a:{if(o[b+44|0]&1){break a}a=q[b+24>>2];if(a){Ni(a)}a=q[b+16>>2];if(!a){break a}Ni(a)}b:{if(o[b+12|0]&1){break b}a=q[b>>2];if(!a){break b}Ni(a)}Ni(b);return 0}function ria(a){a=a|0;var b=0,c=0;a:{b=q[a+4>>2];c=q[b>>2];a=q[a>>2];b=q[b+4>>2];if(q[a+144>>2]!=(c|0)|q[a+148>>2]!=(b|0)?(c|0)!=q[a+136>>2]|(b|0)!=q[a+140>>2]:0){break a}if(Mi[q[74976]](q[q[a>>2]+2384>>2],q[a+4>>2],q[a+8>>2],q[a+12>>2])|0){break a}Pi(3,61636,61644,0)}}function jpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=q[a+1040>>2];f=q[c+28>>2];b=q[a+1052>>2];d=q[a+1048>>2];e=d+1|0;c=a;q[a+1048>>2]=e;q[a+1052>>2]=e>>>0<1?b+1|0:b;if(!(b|d)){q[a+8>>2]=6;a:{if(o[f+141|0]&1){break a}}o[c+16|0]=0;q[a>>2]=Oi(39024);q[a+4>>2]=Li}return!(b|d)|0}function du(a,b,c){var d=0,e=0,f=0;d=a*a;f=d*(d*d)*(d*1.58969099521155e-10+ -2.5050760253406863e-8)+(d*(d*27557313707070068e-22+ -.0001984126982985795)+.00833333333332249);e=d*a;if(!c){return e*(d*f+ -.16666666666666632)+a}return a-(d*(b*.5-e*f)-b+e*.16666666666666632)}function aD(a,b){var c=0,d=0,e=0,f=0,g=0;d=r[b|0];if(d){c=q[a+8>>2];e=q[a+4>>2]+(c^-1)|0;f=b;while(1){if((e|0)<=0){Vk(a,c+1|0);d=r[f|0];c=q[a+8>>2];e=q[a+4>>2]+(c^-1)|0}o[q[a>>2]+c|0]=d;c=q[a+8>>2]+1|0;q[a+8>>2]=c;e=e-1|0;g=g+1|0;f=g+b|0;d=r[f|0];if(d){continue}break}}}function Zia(a){a=a|0;var b=0,c=0;c=q[a>>2];a=q[q[a+8>>2]+8>>2];b=q[a+16>>2];if(b){Aj(b)}b=q[a+32>>2];if(b){cj(c,b)}b=q[a+20>>2];if(b){cj(c,b)}b=q[a+28>>2];if(b){cj(c,b)}b=q[a+24>>2];if(b){cj(c,b)}a:{if(o[a+12|0]&1){break a}c=q[a>>2];if(!c){break a}Ni(c)}Ni(a);return 0}function RR(a){var b=0,c=0;c=q[a+68>>2];if(!(q[c+480>>2]?r[q[a>>2]+184|0]&2:0)){b=ba(0)|0;b=b<<24|b<<8&16711680|(b>>>8&65280|b>>>24);o[c+1128|0]=b;o[c+1129|0]=b>>>8;o[c+1130|0]=b>>>16;o[c+1131|0]=b>>>24;a=q[a>>2];return Mi[q[a+24>>2]](q[a+28>>2],c+1132|0,28)|0}return 0}function Qja(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[q[a+32>>2]+8>>2];q[b+12>>2]=d;c=-13;a:{if(Qj(q[a+20>>2],q[a+24>>2],q[62640],b+8|0)){break a}c=KL(q[a>>2],q[a+4>>2],q[b+8>>2],d,b+12|0);if(c){break a}c=NH(q[b+12>>2]);q[q[a+32>>2]+16>>2]=c;c=0}Ii=b+16|0;return c|0}function Ly(a){var b=0;b=a;a=Cj(a,0,0,76);ar(b,a,9);q[a- -64>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+72>>2]=0;return a}function u_(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=kj(a,1,0);d=az(a,c,144640);if(d){e=gk(c,45);q[b+16>>2]=ip(a,e?e+1|0:c,144941,145041);Lj(a,145043,b+16|0);ll(a,-2);Oy(a,d);c=uj(a,1,0);q[b+8>>2]=uj(a,-1,0);q[b+4>>2]=d;q[b>>2]=c;Qi(a,144995,b)}Ii=b+32|0;return 1}function tm(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;g=Oi(b);h=Li;f=r[a+192|0];a:{if(f>>>0>=8){a=aj(g,h);q[e+4>>2]=8;q[e>>2]=a;Pi(4,87731,87951,e);break a}b=w(f,24)+a|0;o[b+20|0]=d;q[b+16>>2]=6;q[b+12>>2]=c;q[b>>2]=g;q[b+4>>2]=h;q[b+8>>2]=f;o[a+192|0]=f+1}Ii=e+16|0}function tda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;e=q[tj(a,1,b+12|0)+412>>2]>>>23|0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=e&1;q[a+8>>2]=q[a+8>>2]+16;if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,4328,208227);G()}Ii=b+16|0;return 1}function oB(a,b,c){var d=0,e=0,f=0;a:{a=q[q[a+156>>2]+4>>2];d=q[a+8>>2];if(d){f=q[a+4>>2];a=0;while(1){if((a|0)==(d|0)){break a}e=(a<<5)+f|0;if((b|0)==q[e+16>>2]&q[e+20>>2]==(c|0)){return a}a=a+1|0;if((d|0)!=(a|0)){continue}break}}return-1}J(55680,55692,189,55717);G()}function bwa(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=0-(a>>>0<1)|0;b=e;b=b|b>>>16;f=b|b>>>8;c=f;c=c|c>>>4;d=c|c>>>2;g=d|d>>>1;a=a-1|e;a=(e&65535)<<16|a>>>16|a;a=(b&255)<<24|a>>>8|a;a=(f&15)<<28|a>>>4|a;a=(c&3)<<30|a>>>2|a;a=((d&1)<<31|a>>>1|a)+1|0;Li=a>>>0<1?g+1|0:g;return a}function XE(a,b,c){var d=0,e=0,f=0,g=0;a:{d=hk(a,b,c,3);if(d){break a}d=q[c>>2];if(!d){d=-96;break a}e=d-1|0;q[c>>2]=e;f=q[a>>2];g=r[f|0];o[c+4|0]=g;d=-100;if(g>>>0>7){break a}d=f+1|0;q[a>>2]=d;q[c+8>>2]=d;c=a;a=q[a>>2]+e|0;q[c>>2]=a;return(a|0)==(b|0)?0:-102}return d}function tka(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-2;a:{if(Qj(q[a+20>>2],q[a+24>>2],233496,c+12|0)){break a}a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}q[a>>2]=0;b=q[a+4>>2];if(b){Pt(b)}q[a>>2]=q[c+12>>2];b=-1;if(!EL(a)){break a}RB(q[a+4>>2]);b=0}Ii=c+16|0;return b|0}function jy(a){var b=0,c=0;wD(q[q[a+68>>2]+496>>2]);b=q[a+68>>2];q[b+496>>2]=0;q[b+500>>2]=0;o[b+528|0]=0;q[b+508>>2]=q[b+476>>2];BD(a);b=q[a+92>>2];if(b){Mi[b|0](q[a+88>>2],0,0)}c=q[a+68>>2];a:{if(q[a+128>>2]==22){b=3;if(r[q[a+120>>2]]==20){break a}}b=0}o[c+492|0]=b}function fm(a,b){var c=0;a:{b:{if((b|0)>=2){c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}Ey(a,b,(q[a+8>>2]-q[a+12>>2]>>4)-1|0);c=a+8|0;a=q[a+8>>2]+(1-b<<4)|0;break b}if(b){break a}b=q[a+8>>2];c=Yj(a,140594,0);q[b+8>>2]=4;q[b>>2]=c;c=a+8|0;a=q[a+8>>2]+16|0}q[c>>2]=a}}function Zy(a,b){var c=0,d=0,e=0;Oza(+a);c=Lza(1)|0;d=Lza(0)|0;e=c;c=c>>>20&2047;if((c|0)!=2047){if(!c){c=b;if(a==0){b=0}else{a=Zy(a*0x10000000000000000,b);b=q[b>>2]+ -64|0}q[c>>2]=b;return a}q[b>>2]=c-1022;Mza(0,d|0);Mza(1,e&-2146435073|1071644672);a=+Nza()}return a}function l3(a){a=a|0;var b=0,c=0,d=0;b=Ii-1040|0;Ii=b;d=kj(a,1,0);c=kv(d,b+16|0);a:{if(c){q[b+4>>2]=c;q[b>>2]=d;a=Qi(a,130025,b);break a}d=kj(a,2,0);c=Jn(130082);if(c){Pj(b+16|0,c,1024)}Zk(b+16|0,130095,1024);Zk(b+16|0,d,1024);Xi(a,b+16|0);a=1}Ii=b+1040|0;return a|0}function k5(a){var b=0;if(!(o[a+46|0]&1)){a:{if(o[a+40|0]&1){break a}b=q[a+32>>2];if(!b){break a}Ni(b)}b:{if(o[a+28|0]&1){break b}b=q[a+16>>2];if(!b){break b}Ni(b)}c:{if(o[a+12|0]&1){break c}b=q[a>>2];if(!b){break c}Ni(b)}Ni(a);return}J(132819,132848,191,132872);G()}function f4(a,b,c){var d=0,e=0;d=q[a+44>>2];a:{if(!d){break a}d=q[q[a+40>>2]+(Cza(b,c,d)<<2)>>2];if((d|0)==-1){break a}a=q[a+48>>2];while(1){d=d<<4;e=d+a|0;if(q[e>>2]==(b|0)&(c|0)==q[e+4>>2]){break a}d=q[(a+d|0)+12>>2];if((d|0)!=-1){continue}break}e=0}return(e|0)!=0}function Z7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{b=_i(a,1,q[79180],119558);if(b){rj(a,-1e4,q[b+324>>2]);ej(a,2);ej(a,3);pj(a,-3);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){break a}return 0}J(120080,115465,512,120109);G()}J(115568,115465,520,120109);G()}function Yo(a,b,c,d){var e=0,f=0,g=0;e=Ii-32|0;Ii=e;a:{if(q[a+16>>2]==(b|0)){Vj(a);break a}g=q[a+4>>2];f=q[a+52>>2];b=tl(a,b);if((d|0)==(g|0)){q[e>>2]=b;Sj(a,oj(f,141919,e));break a}c=tl(a,c);q[e+24>>2]=d;q[e+20>>2]=c;q[e+16>>2]=b;Sj(a,oj(f,142342,e+16|0))}Ii=e+32|0}function Pj(a,b,c){var d=0,e=0,f=0;a:{b:{if(!c){d=b;break b}e=c-1|0;if(!e){d=b;break b}d=b;while(1){f=r[d|0];o[a|0]=f;d=d+1|0;if(!f){e=d;break a}a=a+1|0;e=e-1|0;if(e){continue}break}}if(c){o[a|0]=0}while(1){a=r[d|0];e=d+1|0;d=e;if(a){continue}break}}return(b^-1)+e|0}function KM(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;d=2;a:{b:{switch(b|0){case 0:d=xta(a,c+8|0)?0:2;break a;case 5:d=Ata(a,c+8|0)?0:2;break a;case 1:d=zta(a,c+8|0)?0:2;break a;case 2:break b;default:break a}}if(!vq(a,c+8|0)){break a}d=wta(a,q[c+8>>2])?0:2}Ii=c+16|0;return d}function mfa(a,b){a=a|0;b=b|0;var c=0;a:{if(a){Ec(q[(b<<2)+92688>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}c=q[a+76>>2];q[a+72>>2]=b<<9&3584|q[a+72>>2]&-3585;q[a+76>>2]=c;return}J(88567,88575,3678,92658);G()}lj(c,92658,3680);J(88669,88575,3680,92658);G()}function sE(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=Ii-96|0;Ii=d;Vq(d+8|0);q[d+16>>2]=1732584193;q[d+20>>2]=-271733879;q[d+8>>2]=0;q[d+12>>2]=0;q[d+24>>2]=-1732584194;q[d+28>>2]=271733878;Uq(d+8|0,a,b);zs(d+8|0,c);a=d+8|0;if(a){Mi[q[65677]](a,0,88)|0}Ii=d+96|0;return 0}function q3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;d=Ii-32|0;Ii=d;e=nj(d+8|0,a,1,129431,433);c=kj(a,1,0);if(uk(a,2)){f=uj(a,2,0)}a:{b:{b=jq(a);if(!b){break b}b=q[b>>2];if(!b){break b}Xi(a,Rm(b,c,f));break a}c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16}mj(e);Ii=d+32|0;return 1}function pwa(a,b,c){var d=0,e=0;d=Ii-224|0;Ii=d;e=a;a=d+72|0;e=Tn(e,a,0,1);a:{if(!e){break a}if(q[a+104>>2]==8){a=r[(a+c|0)+112|0];o[b+2|0]=0;o[b+3|0]=0;o[b+4|0]=0;o[b+5|0]=0;o[b+1|0]=a;o[b|0]=a;o[b+6|0]=0;o[b+7|0]=0;break a}Zo(a,d);Ww(b,c+d|0)}Ii=d+224|0;return e}function m1(a){a:{b:{if(Pj(853548,q[a+4>>2],16)>>>0<16){if(Pj(853564,q[a+8>>2],41)>>>0>=41){break b}if(Pj(853532,q[a>>2],16)>>>0>=16){break a}o[853605]=r[a+12|0];return}J(182958,182998,176,183018);G()}J(183032,182998,178,183018);G()}J(183076,182998,180,183018);G()}function iN(a){var b=0,c=0,d=0,e=0;d=q[a+16>>2];b=q[a+12>>2];if((d|0)<=(b|0)){return 0}c=b+1|0;q[a+12>>2]=c;b=o[b+q[a+8>>2]|0];if((b|0)==13){while(1){if((c|0)>=(d|0)){return 0}b=c+1|0;q[a+12>>2]=b;e=q[a+8>>2]+c|0;c=b;b=o[e|0];if((b|0)==13){continue}break}}return b}function el(a,b,c){var d=0;a:{b:{c:{d:{d=q[b+8>>2];switch(d-5|0){case 2:break c;case 0:break d;default:break b}}b=q[b>>2]+8|0;break a}b=q[b>>2]+8|0;break a}b=(q[a+16>>2]+(d<<2)|0)+152|0}b=q[b>>2];if(b){a=mF(b,q[(q[a+16>>2]+(c<<2)|0)+188>>2])}else{a=141056}return a}function YW(a,b,c,d,e,f,g,h,i,j){var k=0,l=0;k=Ii-16|0;Ii=k;a=vE(a,0,b,c,d,e,f,i,j,h,k);a:{if(a){break a}if(!h){a=0;break a}a=0;while(1){l=r[a+k|0]^r[a+g|0]|l;a=a+1|0;if((h|0)!=(a|0)){continue}break}a=0;if(!l){break a}Mi[q[65677]](j,0,b)|0;a=-18}Ii=k+16|0;return a}function XD(a,b){var c=0,d=0;a:{if(!b){break a}b=b-1|0;if((b|0)<0){break a}b=(b<<2)+a|0;while(1){c=q[a>>2];d=q[b>>2];q[a>>2]=d<<8&16711680|d<<24|(d>>>8&65280|d>>>24);q[b>>2]=c<<8&16711680|c<<24|(c>>>8&65280|c>>>24);a=a+4|0;b=b-4|0;if(a>>>0<=b>>>0){continue}break}}}function V$(a){a=a|0;var b=0,c=0,d=0;b=1;Dj(a,1,5);d=al(a,1);Dj(a,2,6);if((d|0)>=1){while(1){ej(a,2);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;rj(a,1,b);Rk(a,2,1);if(Vi(a,-1)){return 1}Ri(a,-2);c=(b|0)!=(d|0);b=b+1|0;if(c){continue}break}}return 0}function G$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;d=-24832;if(!(!a|!c)){q[c>>2]=0;if(!b){return-25088}f=128;d=0;while(1){e=d;b=b-1|0;g=b+a|0;d=e|r[g|0]!=0;e=(d|0)==(e|0);h=(e?0:b)|h;q[c>>2]=h;f=(e?0:r[g|0])^f;if(b){continue}break}d=f?-25088:0}return d|0}function Cpa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-80|0;Ii=c;d=-1;if(q[a+16>>2]==q[72262]&q[a+20>>2]==q[72263]){d=c;e=q[q[a+24>>2]>>2];a=q[e+4>>2];if(!a){a=q[e>>2]}e=q[a+4>>2];q[d+16>>2]=q[a>>2];q[d+20>>2]=e;q[c+8>>2]=1;Ti(b+32|0,c+8|0,72);d=0}Ii=c+80|0;return d|0}function Aqa(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{if(q[a+8>>2]-q[a+12>>2]>>4==1){if((Vi(a,1)|0)==5){break b}}Pi(3,14825,16837,0);break a}b=sM(a,0);if(b){break a}b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(c|0)){break a}J(15852,15159,2143,16889);G()}return b|0}function xD(a){var b=0,c=0,d=0;c=q[a+124>>2];d=q[a+168>>2];a:{if(d){b=-27648;if(c){break a}b=q[a+132>>2];b:{if(b>>>0>d>>>0){b=b-d|0;q[a+132>>2]=b;c=q[a+120>>2];bl(c,c+d|0,b);break b}q[a+132>>2]=0}q[a+168>>2]=0;return 0}b=0;if(c){break a}q[a+132>>2]=0;b=0}return b}function ola(a,b,c){var d=0;d=q[b+132>>2];if(d){$G(q[a+96>>2],d)}tM(q[b>>2]);if(!uL(a,b)){Pi(4,50700,50860,0);Dt(a,c);return}q[b+132>>2]=0;d=q[b+128>>2];if(VK(q[a+96>>2],b,q[d+8>>2],Oi(q[q[d>>2]+4>>2]),Li)){Dt(a,c);return}WK(b,q[b+128>>2]);o[b+254|0]=r[b+254|0]|8}function kS(a,b){var c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;d=q[a>>2];q[c+48>>2]=0;d=am(d,3,c+48|0);e=q[a>>2];q[c+32>>2]=d&-2049;am(e,4,c+32|0);d=0;if(A_(q[a>>2],b)){d=q[240513]}b=q[a>>2];q[c+16>>2]=0;b=am(b,3,c+16|0);a=q[a>>2];q[c>>2]=b|2048;am(a,4,c);Ii=c- -64|0;return d}function iqa(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=Zm(a,2);a=kr(a,1);u[b>>2]=u[a>>2];u[b+4>>2]=u[a+4>>2];u[b+8>>2]=u[a+8>>2];u[b+12>>2]=u[a+12>>2];d=q[b>>2];e=q[b+4>>2];a=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=a;q[c>>2]=d;q[c+4>>2]=e;Ii=b+16|0;return 0}function dW(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=Ii-96|0;Ii=d;aq(d);q[d+8>>2]=1732584193;q[d+12>>2]=-271733879;q[d>>2]=0;q[d+4>>2]=0;q[d+24>>2]=-1009589776;q[d+16>>2]=-1732584194;q[d+20>>2]=271733878;$p(d,a,b);Rq(d,c);if(d){Mi[q[65677]](d,0,92)|0}Ii=d+96|0;return 0}function bya(a,b,c){var d=0;d=-28;a:{if((a|0)==(b|0)){break a}if(c&524288){while(1){d=zi(a|0,b|0,c|0)|0;if((d|0)==-10){continue}break}if((d|0)!=-52){break a}}while(1){d=ui(a|0,b|0)|0;if((d|0)==-10){continue}break}}if(d>>>0>=4294963201){q[240513]=0-d;d=-1}return d}function aQ(a){a=a|0;var b=0,c=0,d=0,e=0;Dj(a,1,5);c=al(a,1);b=Am(a,2,c);if(!((b|0)<1|(b|0)>(c|0))){e=1;rj(a,1,b);if((b|0)<(c|0)){while(1){d=b+1|0;rj(a,1,d);nk(a,1,b);b=d;if((c|0)!=(b|0)){continue}break}}d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;nk(a,1,c)}return e|0}function _9(a){var b=0;if(a){a:{if(o[a+68|0]&1){break a}b=q[a+48>>2];if(b){Ni(b)}b=q[a+40>>2];if(!b){break a}Ni(b)}b:{if(o[a+36|0]&1){break b}b=q[a+16>>2];if(b){Ni(b)}b=q[a+8>>2];if(!b){break b}Ni(b)}c:{if(o[a+6|0]&1){break c}b=q[a>>2];if(!b){break c}Ni(b)}Ni(a)}}function Nea(a,b,c){var d=0,e=0;if(!(o[a+320|0]&1)){a:{c=c+1|0;d=a+316|0;e=q[d>>2]-q[a+308>>2]>>3;Wi(c>>>0>e>>>0?c:e,8,a+308|0,d,a+312|0);if(o[a+336|0]&1){break a}Wi(w(b,c),4,a+324|0,a+332|0,a+328|0);q[a+328>>2]=q[a+324>>2];return}}J(202045,201514,493,201251);G()}function NE(a,b){q[a+48>>2]=0;q[a+52>>2]=r[b|0]|r[b+1|0]<<8|(r[b+2|0]<<16|r[b+3|0]<<24);q[a+56>>2]=r[b+4|0]|r[b+5|0]<<8|(r[b+6|0]<<16|r[b+7|0]<<24);q[a+60>>2]=r[b+8|0]|r[b+9|0]<<8|(r[b+10|0]<<16|r[b+11|0]<<24);Mi[q[65677]](a- -64|0,0,64)|0;q[a+128>>2]=64;return 0}function vwa(a,b){var c=0,d=0;c=zj(b,0);d=zj(b,1);a:{b=r[zj(b,2)+108592|0];if(b>>>0<32){b=b|(r[c+108592|0]<<10|32768|r[d+108592|0]<<5);if(b>>>0>=65536){break a}q[a+4>>2]=q[a+4>>2]&65535|b<<16;return}J(108512,96899,3157,108562);G()}J(108545,96899,3167,108562);G()}function uW(a,b,c,d,e,f){var g=0,h=0;g=Ii-16|0;Ii=g;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;a:{if(d){h=Pl(g,a,1);if(h){break a}h=gl(d,c,g);if(h){break a}}if(e){h=Pl(g,b,1);if(h){break a}h=gl(e,c,g);if(h){break a}}if(!f){h=0;break a}h=Co(f,b,a)}ij(g);Ii=g+16|0;return h}function ms(a){var b=0,c=0;if(a){b=a+80|0;if(b){c=q[b+60>>2];if(c){Mi[q[q[q[b>>2]+28>>2]+32>>2]](c)}Mi[q[65677]](b,0,64)|0}b=a+144|0;if(b){c=q[b+60>>2];if(c){Mi[q[q[q[b>>2]+28>>2]+32>>2]](c)}Mi[q[65677]](b,0,64)|0}ym(a+52|0);ym(a- -64|0);Mi[q[65677]](a,0,212)|0}}function aya(){var a=0,b=0;a=Ii-16|0;Ii=a;a:{if(si(a+12|0,a+8|0)|0){break a}b=Yi((q[a+12>>2]<<2)+4|0);q[240582]=b;if(!b){break a}b=Yi(q[a+8>>2]);if(!b){q[240582]=0;break a}q[q[240582]+(q[a+12>>2]<<2)>>2]=0;if(!(ti(q[240582],b|0)|0)){break a}q[240582]=0}Ii=a+16|0}function Dfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=Ii-16|0;Ii=a;q[a+12>>2]=0;_a(1,a+12|0);a:{if(!(r[q[75054]+156|0]&64)){break a}e=K()|0;if(!e){break a}lj(e,91585,1538);J(88669,88575,1538,91585);G()}Mi[q[74945]](q[a+12>>2],b,c,d);Ii=a+16|0;return q[a+12>>2]}function v2(a){a=a|0;var b=0,c=0,d=0;b=Ck(a,1,q[210437]);c=Ck(a,2,q[210437]);a:{if(!b|!c|(u[b>>2]!=u[c>>2]|u[b+4>>2]!=u[c+4>>2])){break a}if(u[b+8>>2]!=u[c+8>>2]){break a}d=u[b+12>>2]==u[c+12>>2]}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;return 1}function ita(a,b,c,d){a:{b:{if((q[b+4>>2]&-268435456)!=805306368){if(q[b+8>>2]){break b}b=q[b+12>>2]+q[a+4>>2]|0;if(t[a+8>>2]>>0){break a}if(!r[a+12|0]){Ti(b,c,d)}return}J(23603,23354,228,23644);G()}J(23654,23354,229,23644);G()}J(23686,23354,231,23644);G()}function bz(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=q[a+48>>2];rn(e,b);Vj(a);if(q[a+16>>2]!=285){d=q[a+52>>2];q[c>>2]=tl(a,285);Sj(a,oj(d,141919,c))}d=q[a+24>>2];Vj(a);a=gq(q[a+48>>2],d);q[c+24>>2]=-1;q[c+28>>2]=-1;q[c+16>>2]=a;q[c+8>>2]=4;lF(e,b,c+8|0);Ii=c+32|0}function YM(a,b,c){if(sE(a,b,c)){o[c|0]=0;o[c+1|0]=0;o[c+2|0]=0;o[c+3|0]=0;o[c+4|0]=0;o[c+5|0]=0;o[c+6|0]=0;o[c+7|0]=0;o[c+16|0]=0;o[c+17|0]=0;o[c+18|0]=0;o[c+19|0]=0;o[c+8|0]=0;o[c+9|0]=0;o[c+10|0]=0;o[c+11|0]=0;o[c+12|0]=0;o[c+13|0]=0;o[c+14|0]=0;o[c+15|0]=0}}function Rda(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;b=Ii-32|0;Ii=b;f=q[q[a+12>>2]>>2];g=nj(b+8|0,f,0,202233,724);a:{if(!c){break a}if(!Lo(d)){break a}q[b+4>>2]=e;q[b>>2]=a;bt(d,1428,b)}rj(f,-1e4,q[a+8>>2]);Ho(f,-1,e);Ri(f,-2);no(d);mj(g);Ii=b+32|0}function Q3(a){a=a|0;var b=0,c=0,d=0;b=Ck(a,1,q[210438]);c=Ck(a,2,q[210438]);a:{if(!b|!c|(u[b>>2]!=u[c>>2]|u[b+4>>2]!=u[c+4>>2])){break a}if(u[b+8>>2]!=u[c+8>>2]){break a}d=u[b+12>>2]==u[c+12>>2]}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;return 1}function Dha(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;e=q[a+8>>2]-q[a+12>>2]>>4;d=nl(a,1);c=Li;f=c;c=tt(d,c);a:{if(c){Xi(a,c);break a}q[b>>2]=d;q[b+4>>2]=f;Lj(a,80324,b)}if((e+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(80280,79890,401,80337);G()}Ii=b+16|0;return 1}function CI(a,b,c){var d=0;d=Ii-16|0;Ii=d;if(!(!q[a+4>>2]|!q[a>>2])){Cl(a+8|0,b,c);a:{if(o[a+58|0]&1){break a}if((Kl(b,1,c,q[a+4>>2])|0)==(c|0)){break a}q[d>>2]=q[a>>2];Pi(4,166128,166582,d);o[a+58|0]=r[a+58|0]|1}Ii=d+16|0;return}J(166500,166551,529,166578);G()}function vL(a,b,c,d){var e=0,f=0,g=0,h=0;f=Ii-48|0;Ii=f;e=0;a:{if(!b){break a}g=q[c>>2];e=b;h=q[g+164>>2];b=WH(f+8|0);ZK(e,c,g,h,d,b);p[c+20>>1]=s[b+30>>1];if(r[a+17|0]){if(q[g+160>>2]<=-1){Pi(4,37377,38339,0);e=0;break a}e=0;break a}e=0}c=e;Ii=f+48|0;return c}function vH(a){q[a+16>>2]=7;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=7;q[a+4>>2]=0;o[a+33|0]=255;o[a+34|0]=255;q[a+20>>2]=0;q[a+24>>2]=0;o[a+25|0]=0;o[a+26|0]=0;o[a+27|0]=0;o[a+28|0]=0;o[a+29|0]=0;o[a+30|0]=0;o[a+31|0]=0;o[a+32|0]=0;o[a+35|0]=r[a+35|0]&192|15;return a}function Qi(a,b,c){var d=0;d=Ii-128|0;Ii=d;q[d+20>>2]=c;a:{b:{if(!sl(a,1,d+24|0)){break b}Hn(a,143251,d+24|0);c=q[d+44>>2];if((c|0)<1){break b}q[d+4>>2]=c;q[d>>2]=d+60;Lj(a,143254,d);break a}bj(a,143262,0)}bF(a,b,q[d+20>>2]);fm(a,2);a=Fo(a);Ii=d+128|0;return a}function My(a,b,c){var d=0,e=0,f=0;d=q[a+56>>2];if((d|0)<1){return 0}e=q[a+24>>2];a=0;while(1){f=w(a,12)+e|0;if(q[f+4>>2]<=(c|0)){a:{if(q[f+8>>2]<=(c|0)){break a}b=b-1|0;if(b){break a}return q[w(a,12)+e>>2]+16|0}a=a+1|0;if((d|0)>(a|0)){continue}}break}return 0}function Kka(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=Ii-32|0;Ii=b;e=nj(b+8|0,a,0,76581,880);d=$j(a,1);c=Li;f=c;c=nq(q[74445],d,c);a:{if(!c){q[b>>2]=aj(d,f);g=Kj(e,78728,b);break a}cra(q[q[jk(a)+80>>2]+8>>2],d,f);cj(q[74445],q[c+8>>2])}mj(e);Ii=b+32|0;return g|0}function Hx(a,b,c){var d=0,e=0;e=SV(a);if((e|0)<0){return e}a:{if(c>>>0>e>>>0){d=-28928;c=e;if(r[q[a>>2]+184|0]&2){break a}}b:{if(q[a+216>>2]){d=Xp(a);if(!d){break b}break a}q[a+208>>2]=23;q[a+212>>2]=c;Ti(q[a+204>>2],b,c);d=zu(a,1);if(d){break a}}d=c}return d}function xC(a){var b=0,c=0,d=0;c=Ii+ -64|0;Ii=c;q[c+12>>2]=ba(0);b=rb(c+12|0,c+16|0)|0;a:{if(!b){d=-1;break a}q[a>>2]=q[b+20>>2]+1900;q[a+4>>2]=q[b+16>>2]+1;q[a+8>>2]=q[b+12>>2];q[a+12>>2]=q[b+8>>2];q[a+16>>2]=q[b+4>>2];q[a+20>>2]=q[b>>2]}Ii=c- -64|0;return d}function hu(a){return(((((a*3479331075960212e-20+.0007915349942898145)*a+ -.04005553450067941)*a+.20121253213486293)*a+ -.3255658186224009)*a+.16666666666666666)*a/((((a*.07703815055590194+ -.6882839716054533)*a+2.0209457602335057)*a+ -2.403394911734414)*a+1)}function hW(a,b,c,d,e){var f=0,g=0,h=0;f=q[a+4>>2];h=bk(1,f);if(!h){return-16}g=bk(1,f);a:{if(!g){b=-16;break a}b=ND(b,c,d,f,g);if(b){break a}b=ts(a,e,h);if(b){break a}b=jE(h,g,f)?-17280:0}Mi[q[65677]](h,0,f)|0;Ni(h);if(g){Mi[q[65677]](g,0,f)|0;Ni(g)}return b}function fq(a,b){var c=0,d=0,e=0;a:{if((b|0)>8e3){break a}c=q[a+8>>2];if(((c-q[a+12>>2]>>4)+b|0)>8e3){break a}e=1;if((b|0)<1){break a}d=b<<4;if((d|0)>=(q[a+28>>2]-c|0)){Mk(a,b);c=q[a+8>>2]}b=c+d|0;a=q[a+20>>2];if(b>>>0<=t[a+8>>2]){break a}q[a+8>>2]=b}return e}function eT(a,b){a=a|0;b=b|0;var c=0;a:{b:{if(!r[a+6|0]){if(!av(a,b-16|0,-1)){break b}break a}o[a+6|0]=0;c=q[a+20>>2];if(r[q[q[c+4>>2]>>2]+6|0]){if(!Ny(a,b)){break b}q[a+8>>2]=q[q[a+20>>2]+8>>2];break b}q[a+12>>2]=q[c>>2]}gF(a,(q[a+20>>2]-q[a+40>>2]|0)/24|0)}}function e$(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=kj(a,1,0);q[b+4>>2]=0;a:{if(eu(c,b+8|0)){c=GD(b+8|0,b+4|0);break a}c=FD(c,b+4|0)}b:{if(c){d=q[a+8>>2];q[d+8>>2]=0;q[a+8>>2]=d+16;Xi(a,ED(c));break b}Xi(a,q[q[b+4>>2]>>2]);EF(a,q[b+4>>2])}Ii=b+16|0;return 2}function dl(a,b){var c=0,d=0,e=0;c=Ii-16|0;Ii=c;a:{b:{if(!gk(214948,o[b|0])){q[240513]=28;break b}e=qO(b);q[c>>2]=438;a=Na(a|0,e|32768,c|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}if((a|0)<0){break a}d=sO(a,b);if(d){break a}pa(a|0)|0}d=0}Ii=c+16|0;return d}function cW(a,b,c,d){var e=0,f=0;f=a;e=128;a:{if((c|0)!=1){break a}b=q[b+16>>2]-1|0;e=0;if(b>>>0>9){break a}e=q[(b<<2)+181364>>2]}b=e;e=0;b:{if(!cE(f,b)){break b}q[d>>2]=q[d>>2]|2048;e=-1}b=e;if(vV(a,(c|0)==1?181251:181260)){q[d>>2]=q[d>>2]|4096;b=-1}return b}function _7(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{b=_i(a,1,q[79180],119558);if(b){rj(a,-1e4,q[b+324>>2]);ej(a,2);ik(a,-2);ll(a,3);if((c+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){break a}return 1}J(120080,115465,494,120082);G()}J(115440,115465,502,120082);G()}function WG(a,b,c,d){var e=0,f=0,g=0,h=0;e=Ii-16|0;Ii=e;h=q[a+8>>2]-q[a+12>>2]>>4;g=q[b+16>>2];if(g>>>0>d>>>0){f=q[b+4>>2];q[e+4>>2]=d;q[e>>2]=f;Qi(a,124529,e)}f=c+g|0;q[e+12>>2]=f;q[e+8>>2]=(d+f|0)-g;OG(a,b,c,e+12|0,e+8|0,h,c);Ii=e+16|0;return q[e+12>>2]-c|0}function Soa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-80|0;Ii=c;d=-1;if(q[72554]==q[a+16>>2]&q[a+20>>2]==q[72555]){d=c;e=q[q[a+24>>2]>>2];a=q[e+4>>2];if(!a){a=q[e>>2]}q[d+16>>2]=Oi(q[a+4>>2]);q[d+20>>2]=Li;q[c+8>>2]=1;Ti(b+32|0,c+8|0,72);d=0}Ii=c+80|0;return d|0}function GT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=1;a:{if((Ol(q[b>>2],1,15,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function AD(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0;b=q[a>>2];c=q[b+184>>2]&2;a:{if(!(r[b+185|0]&32)|(q[a+8>>2]==3|q[a+4>>2]!=16)){break a}b=(b+c|0)+164|0;d=8-c|0;if(f=(Ej(q[a+104>>2]+c|0,b,d)|0)<=0,g=0,h=(Ej((a+c|0)+220|0,b,d)|0)<1,h?f:g){break a}e=FV(a)}return e}function rwa(a,b){var c=0,d=0;c=Ii-224|0;Ii=c;d=a;a=c+72|0;d=Tn(d,a,0,1);a:{if(!d){break a}if(q[a+104>>2]==8){$B(b,r[a+112|0],r[a+113|0],r[a+114|0]);break a}if(r[a+116|0]){RN(a,b);break a}Zo(a,c);if(r[a+117|0]){QN(a,c,b);break a}aC(b,c,0)}Ii=c+224|0;return d}function kO(a,b){var c=0,d=0,e=0;d=Ii-16|0;Ii=d;o[d+15|0]=b;c=q[a+16>>2];a:{if(!c){if(fO(a)){break a}c=q[a+16>>2]}e=c;c=q[a+20>>2];if(!(o[a+75|0]==(b&255)|e>>>0<=c>>>0)){q[a+20>>2]=c+1;o[c|0]=b;break a}if((Mi[q[a+36>>2]](a,d+15|0,1)|0)!=1){break a}}Ii=d+16|0}function VT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=1;a:{if((Ol(q[b>>2],1,6,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function Uha(a){a=a|0;var b=0;b=q[a+8>>2]-q[a+12>>2]>>4;a:{b:{if(jj(a,1)-1>>>0>=2){if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){break b}return Qi(a,82211,0)|0}if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){break a}return 0}J(82026,82047,232,82200);G()}J(82026,82047,236,82200);G()}function UT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=1;a:{if((Ol(q[b>>2],1,5,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function JT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=1;a:{if((Ol(q[b>>2],1,9,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function HT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=2;a:{if((Ol(q[b>>2],1,2,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;d=1}Ii=c+16|0;return d|0}function FT(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);d=1;a:{if((Ol(q[b>>2],6,1,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);d=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16}Ii=c+16|0;return d|0}function mpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+4>>2];d=q[b+4>>2];c=q[b>>2];if((d|0)!=(c|0)){a=0;while(1){e=(a<<7)+c|0;f=q[e+36>>2];if(!(!f|!(r[e+58|0]&2))){g=fM(f)?g:-1e3;c=q[b>>2];d=q[b+4>>2]}a=a+1|0;if(a>>>0>7>>>0){continue}break}}return g|0}function lpa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=q[a+4>>2];d=q[b+4>>2];c=q[b>>2];if((d|0)!=(c|0)){a=0;while(1){e=(a<<7)+c|0;f=q[e+36>>2];if(!(!f|!(r[e+58|0]&2))){g=_L(f)?g:-1e3;c=q[b>>2];d=q[b+4>>2]}a=a+1|0;if(a>>>0>7>>>0){continue}break}}return g|0}function hca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;tj(a,1,b+12|0);d=fj(a,2);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);JJ(e,q[b+12>>2],x(d));if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(202212,202233,2902,207702);G()}Ii=b+16|0;return 0}function bda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-112|0;Ii=b;d=nj(b+88|0,a,1,202233,3892);c=tj(a,1,0);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);Cr(e,c,0,b+16|0);u[b+8>>2]=u[b+72>>2];c=q[b+68>>2];q[b>>2]=q[b+64>>2];q[b+4>>2]=c;Al(a,b);mj(d);Ii=b+112|0;return 1}function Nba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;tj(a,1,b+12|0);d=fj(a,2);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);IJ(e,q[b+12>>2],x(d));if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(202212,202233,2951,207730);G()}Ii=b+16|0;return 0}function Dp(a,b){var c=0,d=0,e=0;c=q[b+4>>2];e=q[b>>2];if((c|0)!=(e|0)){c=e;while(1){cj(a,q[(d<<2)+c>>2]);d=d+1|0;c=q[b>>2];if(d>>>0>2]-c>>2>>>0){continue}break}}q[b+4>>2]=c;if(!(o[b+12|0]&1)){Wi(0,4,b,b+8|0,b+4|0);return}J(14084,14159,493,14215);G()}function xR(a){var b=0,c=0;b=_n(a);a:{if(b){break a}b=-30464;if(q[a+128>>2]!=22){break a}c=q[a>>2];if(!(r[q[a+120>>2]]==14?q[a+168>>2]==((r[c+184|0]&2?12:4)|0):0)){Xj(a,2,50);return-31616}q[a+4>>2]=q[a+4>>2]+1;b=0;if(!(r[c+184|0]&2)){break a}jy(a)}return b}function rda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);lk(a,oea(d,q[b+12>>2]),Li);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2135,206863);G()}Ii=b+16|0;return 1}function pr(a){var b=0,c=0;b=q[a>>2];c=q[b+8>>2];if(c){b=q[c+1028>>2];if(b){Ni(b)}b=q[c+1024>>2];if(b){Ni(b)}b=q[c+1032>>2];if(b){rk(b)}Ni(c);b=q[a>>2]}a:{b:{if(o[b+20|0]&1){break b}c=q[b+4>>2];if(!c){break b}Ni(c);b=q[a>>2];if(!b){break a}}Ni(b)}q[a>>2]=0}function nda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);lk(a,nea(d,q[b+12>>2]),Li);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,1939,206659);G()}Ii=b+16|0;return 1}function b3(a){a=a|0;var b=0,c=0;b=1;c=q[a+8>>2]-q[a+12>>2]>>4;Dj(a,1,6);Zi(a,-10002,130580);a:{if((Vi(a,-1)|0)!=5){Ri(a,-2);break a}ej(a,1);Si(a,-2,130586);Ri(a,-2);b=0;if(q[a+8>>2]-q[a+12>>2]>>4==(c|0)){break a}J(129410,129431,1064,130602);G()}return b|0}function RT(a,b){a=a|0;b=b|0;var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);a:{if((Ol(q[b>>2],41,19,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function PT(a,b){a=a|0;b=b|0;var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);a:{if((Ol(q[b>>2],41,26,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function NF(a,b){var c=0;c=Ii-112|0;Ii=c;a:{if((Vi(a,1)|0)==6){ej(a,1);break a}b:{if(b){b=Am(a,1,1);break b}b=jj(a,1)}if((b|0)<=-1){dk(a,1,143820)}if(!sl(a,b,c+8|0)){dk(a,1,143847)}Hn(a,143861,c+8|0);if(Vi(a,-1)){break a}q[c>>2]=b;Qi(a,143863,c)}Ii=c+112|0}function LE(a,b,c,d,e,f,g){var h=0;h=Ii-16|0;Ii=h;b=DX(a,b,c);a:{if(b){break a}if(q[a>>2]){q[a+36>>2]=0;b=0}else{b=-24832}if(b){break a}b=cn(a,d,e,f,g);if(b){break a}b=FX(a,q[g>>2]+f|0,h+12|0);if(b){break a}q[g>>2]=q[g>>2]+q[h+12>>2];b=0}Ii=h+16|0;return b}function Kp(a,b){var c=0,d=0,e=0,f=0;e=3;a:{b:{if(a+1>>>0<2){break b}c=a&65535;d=q[210908];if(c>>>0>=t[d+8>>2]){break a}f=q[q[d>>2]+(c<<2)>>2];if(!f|s[q[d+4>>2]+(c<<1)>>1]!=(a>>>16|0)){break b}q[b>>2]=q[f+28>>2];e=0}return e}J(154349,154364,144,154402);G()}function zt(a,b,c,d,e,f){var g=0,h=0,i=0;h=Ii-16|0;Ii=h;i=r[a+192|0];a:{if(i>>>0>=8){a=aj(b,c);q[h+4>>2]=8;q[h>>2]=a;Pi(4,87731,87951,h);break a}g=w(i,24)+a|0;o[g+20|0]=f;q[g+16>>2]=e;q[g+12>>2]=d;q[g>>2]=b;q[g+4>>2]=c;q[g+8>>2]=i;o[a+192|0]=i+1}Ii=h+16|0}function xda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);lk(a,gK(d,q[b+12>>2]),Li);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2030,206746);G()}Ii=b+16|0;return 1}function eA(a,b){var c=0;Mi[q[74968]](q[a+2384>>2],q[b+4>>2]);Mi[q[74957]](q[b+16>>2]);c=q[b+100>>2];if((c|0)!=q[b+104>>2]){a=0;while(1){c=q[w(a,40)+c>>2];Ni(q[c>>2]);Ni(c);a=a+1|0;c=q[b+100>>2];if(a>>>0<(q[b+104>>2]-c|0)/40>>>0){continue}break}}Ni(u8(b))}function Txa(a,b,c){var d=0,e=0;d=Ii-160|0;Ii=d;Ti(d+8|0,214792,144);q[d+52>>2]=a;q[d+28>>2]=a;e=-2-a|0;e=e>>>0<2147483647?e:2147483647;q[d+56>>2]=e;a=a+e|0;q[d+36>>2]=a;q[d+24>>2]=a;hO(d+8|0,b,c);if(e){a=q[d+28>>2];o[a-((a|0)==q[d+24>>2])|0]=0}Ii=d+160|0}function Tla(a,b,c,d,e){var f=0;if(o[a+141|0]&1){Pi(4,37377,38924,0);return 1}f=3;a=q[b+12>>2];a:{if(!a){break a}while(1){if(q[a>>2]!=(c|0)|q[a+4>>2]!=(d|0)){a=q[a+16>>2];if(a){continue}break a}break}if(!q[a+12>>2]){return 4}q[e>>2]=q[a+8>>2];f=0}return f}function TB(a,b){var c=0,d=0,e=0,f=0;e=3;a:{b:{if(a+1>>>0<2){break b}c=a&65535;d=q[210908];if(c>>>0>=t[d+8>>2]){break a}f=q[q[d>>2]+(c<<2)>>2];if(!f|s[q[d+4>>2]+(c<<1)>>1]!=(a>>>16|0)){break b}q[b>>2]=r[f+34|0];e=0}return e}J(154349,154364,144,154402);G()}function SP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<3)+a|0;if(y(c)<0x8000000000000000){q[a>>2]=~~c>>>0;q[a+4>>2]=y(c)>=1?c>0?~~A(C(c*2.3283064365386963e-10),4294967295)>>>0:~~D((c- +(~~c>>>0>>>0))*2.3283064365386963e-10)>>>0:0;return}q[a>>2]=0;q[a+4>>2]=-2147483648}function Roa(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;a:{if(!a){break a}a=q[a>>2];if(!a){break a}d=q[a>>2]}a=q[b+4>>2];if(!a){a=q[b>>2]}b=q[a>>2];b:{if(b){break b}if(!ak(d,q[a+4>>2],a)){b=q[a>>2];break b}q[c>>2]=q[a+4>>2];Pi(4,39489,39672,c);b=0}Ii=c+16|0;return b}function LT(a,b){a=a|0;b=b|0;var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=ap(a);a:{if((Ol(q[b>>2],0,34,c+12|0,4)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;Xi(a,137593);a=2;break a}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;a=1}Ii=c+16|0;return a|0}function vP(a,b,c){var d=0,e=0;d=Ii-160|0;Ii=d;Ti(d+8|0,214792,144);q[d+52>>2]=a;q[d+28>>2]=a;e=-2-a|0;e=e>>>0<2147483647?e:2147483647;q[d+56>>2]=e;a=a+e|0;q[d+36>>2]=a;q[d+24>>2]=a;rx(d+8|0,b,c);if(e){a=q[d+28>>2];o[a-((a|0)==q[d+24>>2])|0]=0}Ii=d+160|0}function hka(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-176|0;Ii=b;d=q[q[a+32>>2]+8>>2];Ui(b+8|0,0,168);c=q[a+4>>2];a:{if(SL(c,q[a>>2],q[a+20>>2],q[a+24>>2],b+8|0,q[a+16>>2])){kw(c,q[a>>2],d);Ti(d,b+8|0,168);break a}kw(c,q[a>>2],b+8|0);e=-13}Ii=b+176|0;return e|0}function fj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-16|0;Ii=c;e=Mj(a,b);a:{if(e!=0){break a}if(Oj(a,b)){break a}g=q[64211];h=c;f=Vi(a,b);d=140583;b:{if((f|0)==-1){break b}d=q[(f<<2)+256832>>2]}q[h+4>>2]=d;q[c>>2]=g;dk(a,b,Lj(a,143231,c))}Ii=c+16|0;return e}function eta(a,b){var c=0,d=0,e=0;c=Ii-16|0;Ii=c;Oza(+b);d=Lza(1)|0;e=Lza(0)|0;o[c+8|0]=e;o[c+9|0]=e>>>8;o[c+10|0]=e>>>16;o[c+11|0]=e>>>24;o[c+12|0]=d;o[c+13|0]=d>>>8;o[c+14|0]=d>>>16;o[c+15|0]=d>>>24;a=Mi[q[a>>2]](q[a+4>>2],c+8|0,8)|0;Ii=c+16|0;return a}function _o(a,b,c){var d=0,e=0;a:{b:{d=b+c|0;if(d>>>0<65){if(c-1>>>0>=8){break b}e=b>>>3|0;if((e|0)!=(d-1>>>3|0)){break a}return(-1<>>(b&7)}J(106890,96899,576,107794);G()}J(107808,96899,577,107794);G()}J(106942,96899,578,107794);G()}function Yma(a){a=a|0;var b=0,c=0;b=q[a+8>>2];c=q[b+16>>2];a=q[q[a+16>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+4>>2];b=q[b>>2];if(a>>>0<(c-b|0)/240>>>0){a=b+w(a,240)|0;p[a+234>>1]=s[a+234>>1]|128;return 0}}J(53716,53631,479,53341);G()}function QR(a){var b=0,c=0,d=0;a:{b=q[q[a+64>>2]+96>>2];if(!b){b=-27648;break a}c=b+204|0;b:{if(!c){break b}c=q[c>>2];if(!c){break b}d=Mi[q[c+12>>2]](2)|0}if(!d){return-27904}b=nX(q[a+68>>2]+132|0,q[b+208>>2]);if(b){break a}return zD(a)?-31232:0}return b}function M6(a,b){var c=0;c=Ii-1072|0;Ii=c;q[c+32>>2]=a;sj(c+48|0,1024,27377,c+32|0);b=_sa(q[b+4>>2],q[57936],c+48|0);a:{if(b){q[c+20>>2]=b;q[c+16>>2]=c+48;Pi(4,27287,27384,c+16|0);break a}if(hv(a,c+48|0)){break a}q[c>>2]=a;Pi(2,27287,27433,c)}Ii=c+1072|0}function zo(a,b){var c=0,d=0,e=0;a:{if(b>>>0>3){break a}c=w(b,12);b=c+a|0;if(!(o[b+532|0]&1)){break a}d=a;e=q[a+524>>2];a=c+(a+524|0)|0;c=q[a+16>>2];q[d+524>>2]=e-c;Mi[q[65677]](q[a+12>>2],0,c)|0;Ni(q[a+12>>2]);q[b+540>>2]=0;q[b+532>>2]=0;q[b+536>>2]=0}}function yj(a,b){var c=0,d=0,e=0;c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}c=a;e=b;b=q[a+20>>2];d=a+72|0;a:{if((b|0)==q[a+40>>2]){break a}d=q[q[b+4>>2]>>2]+12|0}b=gZ(c,e,q[d>>2]);c=q[a+8>>2];q[c+8>>2]=7;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return b+32|0}function Sn(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;c=b<<3|c;a:{if(c>>>0<128){b=c;break a}while(1){o[(d+11|0)+e|0]=c|128;e=e+1|0;f=c>>>0>16383;b=c>>>7|0;c=b;if(f){continue}break}}o[(d+11|0)+e|0]=b;a=Mi[q[a>>2]](q[a+4>>2],d+11|0,e+1|0)|0;Ii=d+16|0;return a}function Ota(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=jj(a,1);d=kj(a,2,0);a:{if(c>>>0>=32){q[b>>2]=32;a=Qi(a,209056,b);break a}if(hj(d)>>>0>=256){q[b+16>>2]=255;Pi(3,209279,209285,b+16|0)}if(c>>>0<=31){Pj((c<<8)+856164|0,d,256)}a=0}Ii=b+32|0;return a|0}function Dra(a){var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=q[71400];if(b){while(1){e=(q[a+8>>2]+w(s[b+16>>1],112)|0)+8|0;d=q[b+8>>2];a:{if(!d){break a}if(!(Mi[d|0](a,e)|0)){break a}q[c>>2]=q[b+12>>2];Pi(4,5642,5769,c)}b=q[b>>2];if(b){continue}break}}Ii=c+16|0}function y1(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Ii-32|0;Ii=d;b=SQ(a,b,d+28|0);a:{if(!b){f=-2;break a}UQ(d,b);a=$i(20);e=q[d>>2];q[a+4>>2]=0;q[a>>2]=e;e=q[d+4>>2];q[a+12>>2]=b;o[a+9|0]=16;o[a+8|0]=e;q[a+16>>2]=QQ(b);q[c>>2]=a}Ii=d+32|0;return f|0}function fva(a){var b=0,c=0;Oza(+a);b=Lza(1)|0;Mza(0,Lza(0)|0);b=b&2147483647;Mza(1,b|0);a=+Nza();a:{if(b>>>0<=1072049729){c=1;if(b>>>0<1045430272){break a}a=Ws(a);c=a+1;return a*a/(c+c)+1}if(b>>>0<=1082535489){a=fv(a);return(a+1/a)*.5}c=tO(a)}return c}function eS(a,b){var c=0,d=0;a:{d=b>>>3|0;if(d){while(1){if(r[a+c|0]!=255){break a}c=c+1|0;if((d|0)!=(c|0)){continue}break}}b=b&7;if(!b){return 0}a=r[a+d|0];c=0;while(1){if(!(a>>>7-c&1)){break a}c=c+1|0;if((b|0)!=(c|0)){continue}break}return 0}return-1}function Mo(a,b){var c=0,d=0,e=0,f=0;d=Ii-16|0;Ii=d;q[d+4>>2]=a;q[d>>2]=31056;sj(b,1024,31050,d);c=b;e=c;while(1){a=r[e|0];a:{b:{if((a|0)!=47){if(a){break b}o[c|0]=0;Ii=d+16|0;return c-b|0}if((f&255)==47){break a}}o[c|0]=a;c=c+1|0}e=e+1|0;f=a;continue}}function Hma(a){a=a|0;var b=0;a=q[a+4>>2];b=q[a+36>>2];if(b){Mi[q[74957]](b);Mi[q[74944]](q[a+40>>2]);Ni(q[a+44>>2])}a:{if(o[a+32|0]&1){break a}b=q[a+20>>2];if(!b){break a}Ni(b)}b:{if(o[a+16|0]&1){break b}b=q[a+4>>2];if(!b){break b}Ni(b)}Ni(a);return 0}function Hfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;a=Ii-16|0;Ii=a;q[a+12>>2]=0;_a(1,a+12|0);a:{if(!(r[q[75054]+156|0]&64)){break a}e=K()|0;if(!e){break a}lj(e,91701,1602);J(88669,88575,1602,91701);G()}EK(q[a+12>>2],b,c,d);Ii=a+16|0;return q[a+12>>2]}function Bl(a,b){var c=0,d=0,e=x(0),f=x(0),g=x(0);c=Ii-32|0;Ii=c;d=_i(a,b,q[210436],0);f=u[d>>2];g=u[d+4>>2];a:{if(!(f!=f|g!=g)){e=u[d+8>>2];if(e==e){break a}}e=u[d+8>>2];v[c+16>>3]=g;v[c+24>>3]=e;v[c+8>>3]=f;q[c>>2]=b;Qi(a,134131,c)}Ii=c+32|0;return d}function zla(a){a=a|0;var b=0,c=0,d=0;c=q[a>>2];b=q[c+32>>2];if((b|0)!=q[c+36>>2]){d=q[q[a+4>>2]+8>>2];a=0;while(1){b=q[(a<<2)+b>>2];if(q[q[b+8>>2]+16>>2]==(d|0)){Ar(q[b+8>>2],5,-2,0)}a=a+1|0;b=q[c+32>>2];if(a>>>0>2]-b>>2>>>0){continue}break}}}function uba(a){var b=0,c=0,d=0,e=0;d=q[a+32>>2];b=q[a+36>>2]-d|0;c=(b|0)/592|0;if(b){e=c>>>0>1?c:1;c=0;while(1){b=w(c,592)+d|0;if(o[b+404|0]&1){b=Ti(b,b+160|0,160);q[b+412>>2]=q[b+400>>2]}c=c+1|0;if((e|0)!=(c|0)){continue}break}}q[a+52>>2]=q[a+48>>2]}function nQ(a){var b=0,c=0;c=Ii-16|0;Ii=c;Oza(+a);b=Lza(1)|0;Lza(0)|0;b=b&2147483647;a:{if(b>>>0<=1072243195){if(b>>>0<1044381696){break a}a=gO(a,0,0);break a}if(b>>>0>=2146435072){a=a-a;break a}b=rC(a,c);a=gO(v[c>>3],v[c+8>>3],b&1)}Ii=c+16|0;return a}function jj(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=Ii-16|0;Ii=c;e=hl(a,b);a:{if(e){break a}if(Oj(a,b)){break a}g=q[64211];h=c;f=Vi(a,b);d=140583;b:{if((f|0)==-1){break b}d=q[(f<<2)+256832>>2]}q[h+4>>2]=d;q[c>>2]=g;dk(a,b,Lj(a,143231,c))}Ii=c+16|0;return e}function jB(a,b,c,d){var e=0,f=0,g=0;e=Ii-1056|0;Ii=e;f=Tz(b);a:{if(f){if(!tn(f,c)){break a}}q[e+20>>2]=c;q[e+16>>2]=b;Qi(a,77043,e+16|0)}c=Wl(e+32|0,Mo(b,e+32|0));f=Li;g=f;if(nq(q[74445],c,f)){q[e>>2]=b;Qi(a,77107,e)}q[d>>2]=c;q[d+4>>2]=g;Ii=e+1056|0}function i7(a){q[a+16>>2]=7;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=7;q[a+4>>2]=0;o[a+33|0]=255;o[a+34|0]=255;q[a+20>>2]=0;q[a+24>>2]=0;o[a+25|0]=0;o[a+26|0]=0;o[a+27|0]=0;o[a+28|0]=0;o[a+29|0]=0;o[a+30|0]=0;o[a+31|0]=0;o[a+32|0]=0;o[a+35|0]=r[a+35|0]&192|15}function bfa(a,b){a=a|0;b=b|0;var c=0;a:{if(a){gc(b|0);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}c=q[a+76>>2]&-8161;q[a+72>>2]=q[a+72>>2];q[a+76>>2]=(b&255)<<5|c;return}J(88567,88575,3693,92737);G()}lj(c,92737,3695);J(88669,88575,3695,92737);G()}function JY(a){a=a|0;var b=0;Ak(a,146834,257888);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=3.141592653589793;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146839);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=I;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,146842);Zi(a,-1,146847);Si(a,-2,146852);return 1}function Dca(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;tj(a,1,b+12|0);e=fj(a,2);f=fj(a,3);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);c=yba(c,q[b+12>>2],x(e),x(f));d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function Cva(a,b){var c=0,d=0;c=+t[b+12>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c;q[a+8>>2]=q[a+8>>2]+16;c=+t[b+8>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c;q[a+8>>2]=q[a+8>>2]+16;c=Bx()-v[b>>3];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 3}function vB(a,b){var c=0,d=0;b=q[b>>2];Gj(q[b+3232>>2]);a:{d=q[b+3244>>2];if(d){c=q[b+3252>>2];if(!c|c>>>0>t[b+3248>>2]){break a}c=c-1|0;q[b+3252>>2]=c;q[(c<<2)+d>>2]=a;Bj(q[b+3232>>2]);return}J(12459,12368,140,12454);G()}J(12490,12368,141,12454);G()}function nC(a){var b=0,c=0;b=r[a+74|0];o[a+74|0]=b-1|b;if(t[a+20>>2]>t[a+28>>2]){Mi[q[a+36>>2]](a,0,0)|0}q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;b=q[a>>2];if(b&4){q[a>>2]=b|32;return-1}c=q[a+44>>2]+q[a+48>>2]|0;q[a+8>>2]=c;q[a+4>>2]=c;return b<<27>>31}function hua(a){var b=0,c=0;b=q[210909];if(b){while(1){c=q[b+8>>2];if(c){Mi[c|0](a)}b=q[b+24>>2];if(b){continue}break}}if(a){a:{if(o[a+28|0]&1){break a}b=q[a+16>>2];if(!b){break a}Ni(b)}b:{if(o[a+12|0]&1){break b}b=q[a>>2];if(!b){break b}Ni(b)}Ni(a)}}function aY(a){a=a|0;var b=0,c=0,d=0;Dj(a,1,5);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;if(Hj(a,1)){while(1){Ri(a,-2);if((Vi(a,-1)|0)==3){d=Mj(a,-1);c=c>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function Ik(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;if(!c){return 0}d=r[a|0];a:{if(!d){break a}while(1){b:{e=r[b|0];if((e|0)!=(d|0)){break b}c=c-1|0;if(!c|!e){break b}b=b+1|0;d=r[a+1|0];a=a+1|0;if(d){continue}break a}break}f=d}return(f&255)-r[b|0]|0}function dR(a,b,c){var d=0;d=q[a+204>>2];q[c>>2]=0;d=d+16384|0;if(!(q[a+8>>2]!=1|d>>>0>>0|q[a+248>>2]+5>>>0>d-b>>>0)){o[b+2|0]=0;o[b|0]=255;o[b+1|0]=1;o[b+3|0]=r[a+248|0]+1;o[b+4|0]=q[a+248>>2];Ti(b+5|0,a+252|0,q[a+248>>2]);q[c>>2]=q[a+248>>2]+5}}function Wda(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{b=qj(a,1);if(b){rj(a,-1e4,q[b+4>>2]);ej(a,2);ej(a,3);pj(a,-3);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){break a}return 0}J(204446,202233,232,204472);G()}J(202212,202233,240,204472);G()}function Vna(a){a=a|0;var b=0,c=0;b=q[a+8>>2];c=q[b+20>>2];a=q[q[a+16>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+8>>2];b=q[b+4>>2];if(a>>>0>2>>>0){a=q[b+(a<<2)>>2];o[a+204|0]=r[a+204|0]|2;return 0}}J(46069,45367,479,46080);G()}function Sca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;e=nj(b+8|0,a,1,202233,3061);tj(a,1,b+4|0);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);c=gea(c,q[b+4>>2]);d=q[a+8>>2];q[d+8>>2]=1;q[d>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=b+32|0;return 1}function S8(a,b){var c=0,d=0,e=0,f=0;c=q[a+4>>2];d=hj(b)+1|0;if(c>>>0>=d>>>0){f=q[a>>2];e=q[f>>2];a:{if(c-e>>>0>=d>>>0){c=f;break a}c=$i(c+8|0);q[c+4>>2]=f;e=0;q[c>>2]=0;q[a>>2]=c}q[c>>2]=d+e;return Ti((c+e|0)+8|0,b,d)}J(172680,172705,67,172735);G()}function E3(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;o[b+15|0]=0;d=JG(a,1,b+15|0);o[b+14|0]=0;e=JG(a,2,b+14|0);f=(hj(d)+hj(e)|0)+1|0;c=Yi(f);o[c|0]=0;Pj(c,d,f);Zk(c,e,f);if(r[b+15|0]){Ni(d)}if(r[b+14|0]){Ni(e)}Xi(a,c);Ni(c);Ii=b+16|0;return 1}function E$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=-24832;if(!(!a|!c)){f=c;c=b-1|0;d=r[c+a|0];e=b-d|0;q[f>>2]=e;b=!d|b>>>0>>0;if(c){d=0;while(1){b=(d>>>0>>0?0:r[a+d|0])|b;d=d+1|0;if((c|0)!=(d|0)){continue}break}}d=b&255?-25088:0}return d|0}function rfa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{if(a){Pc(q[(b<<2)+92560>>2],q[(c<<2)+92560>>2]);if(r[q[75054]+156|0]&64){d=K()|0;if(d){break a}}o[a+80|0]=b&15|c<<4;return}J(88636,88575,3590,92531);G()}lj(d,92531,3617);J(88669,88575,3617,92531);G()}function ota(a,b,c,d){a:{if((q[c+4>>2]&-268435456)==805306368){b=uta(b,c,d);if((q[c+4>>2]&-268435456)!=805306368){break a}if(!r[a+12|0]){a=q[a+4>>2]+q[c+12>>2]|0;q[a+4>>2]=0;q[a>>2]=b}return}J(23735,23354,375,23949);G()}J(23735,23354,276,23797);G()}function km(a,b){var c=0,d=0;c=yj(a,32);d=q[b+28>>2];q[c+24>>2]=q[b+24>>2];q[c+28>>2]=d;d=q[b+20>>2];q[c+16>>2]=q[b+16>>2];q[c+20>>2]=d;d=q[b+12>>2];q[c+8>>2]=q[b+8>>2];q[c+12>>2]=d;d=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=d;Zi(a,-1e4,128488);xj(a,-2)}function it(a,b,c){q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=Oi(b);q[a+4>>2]=Li;Mi[c|0](a);t6(a);q[a+40>>2]=q[72018];q[72018]=a} - - - -function YR(a,b){a=a|0;b=b|0;var c=0;c=Ii-192|0;Ii=c;Vq(c+104|0);aq(c+8|0);sy(c+104|0,q[a+68>>2]+596|0);py(c+8|0,q[a+68>>2]+684|0);zs(c+104|0,b);Rq(c+8|0,b+16|0);a=c+104|0;if(a){Mi[q[65677]](a,0,88)|0}a=c+8|0;if(a){Mi[q[65677]](a,0,92)|0}Ii=c+192|0}function QZ(a){a=a|0;var b=0;Dj(a,2,5);NF(a,0);ej(a,2);a:{if(!Oj(a,1)){break a}if(Mj(a,1)!=0){break a}b=q[a+8>>2];q[b+8>>2]=8;q[b>>2]=a;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);gp(a,-2);return 0}b:{if(!eq(a,-2)){if(gp(a,-2)){break b}}Qi(a,144058,0)}return 1}function NP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<3)+a|0;if(c<0x10000000000000000&c>=0){q[a>>2]=~~c>>>0;q[a+4>>2]=y(c)>=1?c>0?~~A(C(c*2.3283064365386963e-10),4294967295)>>>0:~~D((c- +(~~c>>>0>>>0))*2.3283064365386963e-10)>>>0:0;return}q[a>>2]=0;q[a+4>>2]=0}function JQ(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if(!((d|0)<1|(e|0)<1)){c=0;while(1){g=w(c,e);h=b+c|0;f=0;while(1){o[(f+g|0)+a|0]=r[h|0];f=f+1|0;if((f|0)!=(e|0)){continue}break}c=c+1|0;if((d|0)!=(c|0)){continue}break}}return a|0}function CE(a,b){var c=0,d=0;c=-19584;a:{if(Jj(b+24|0,1)){break a}c=-20352;b:{c:{if(q[a+48>>2]){d=q[a+60>>2]?1:2}else{d=0}switch(d-1|0){case 0:break b;case 1:break c;default:break a}}return Wm(b)>>>0>q[a+92>>2]+7>>>3>>>0?-19584:0}c=E0(a,b)}return c}function $6(a,b){var c=0,d=0;c=Ii+ -64|0;Ii=c;d=q[7722]>>>3|0;a:{b:{if(d<<1>>>0>=42){Pi(4,27287,27455,0);break b}Av(q[q[a+8>>2]+12>>2],d,c+16|0,41);a=0;if(!kv(c+16|0,b)){break a}q[c+4>>2]=0;q[c>>2]=c+16;Pi(4,27287,27491,c)}a=-9}Ii=c- -64|0;return a}function ux(a,b,c,d,e){var f=0;f=yx(a,b,c,d);if(t[e+144>>2]>2]){sk(d,e);if(t[d+144>>2]>=t[c+144>>2]){return f+1|0}sk(c,d);if(t[c+144>>2]>=t[b+144>>2]){return f+2|0}sk(b,c);if(t[b+144>>2]>=t[a+144>>2]){return f+3|0}sk(a,b);f=f+4|0}return f}function lfa(a,b){a=a|0;b=b|0;var c=0;a:{if(a){Dc(b|0);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}c=q[a+76>>2];q[a+72>>2]=q[a+72>>2]&-17|(b?16:0);q[a+76>>2]=c;return}J(88567,88575,3642,92639);G()}lj(c,92639,3644);J(88669,88575,3644,92639);G()}function Ula(a,b,c,d,e){if(o[a+141|0]&1){Pi(4,37377,38924,0);return 1}a=3;b=q[b+12>>2];a:{if(!b){break a}while(1){if(q[b>>2]!=(c|0)|q[b+4>>2]!=(d|0)){b=q[b+16>>2];if(b){continue}break a}break}if(!q[b+12>>2]){return 4}q[e>>2]=q[b+8>>2];a=0}return a}function Fna(a){a=a|0;var b=0,c=0;b=q[a+8>>2];c=q[b+16>>2];a=q[q[a+16>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+4>>2];b=q[b>>2];if(a>>>0>2>>>0){a=q[b+(a<<2)>>2];o[a+254|0]=r[a+254|0]|4;return 0}}J(51709,51308,479,51547);G()}function BI(a){var b=0,c=0,d=0;a:{while(1){b=q[a+64>>2];if(q[a+68>>2]-b>>6>>>0<=c>>>0){break a}b=b+(c<<6)|0;d=q[b>>2];if(d){Ni(d)}b=q[b+4>>2];if(b){rk(b)}c=c+1|0;if((c|0)!=16){continue}break}maa(a);Ni(oaa(a));return}J(167214,167188,479,167225);G()}function mga(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return s[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+22>>1]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function lga(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return s[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+20>>1]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function hva(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+216>>2]&15;c=0;a:{if(!d){break a}o[b+7|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;q[b>>2]=0;q[b+4>>2]=0;c=Sq(a+132|0,b,16-d|0)}a=c;Ii=b+16|0;return a}function fga(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return s[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+18>>1]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function dga(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return s[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+16>>1]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function _fa(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return s[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+14>>1]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function Gw(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;a:{if(b>>>0<128){e=b;break a}while(1){o[(c+11|0)+d|0]=b|128;d=d+1|0;f=b>>>0>16383;e=b>>>7|0;b=e;if(f){continue}break}}o[(c+11|0)+d|0]=e;a=Mi[q[a>>2]](q[a+4>>2],c+11|0,d+1|0)|0;Ii=c+16|0;return a}function Dya(){q[79280]=0;q[79281]=0;q[79278]=0;q[79276]=122493;q[79275]=122481;q[79274]=0;q[79272]=0;q[79270]=0;q[79268]=0;q[79266]=0;q[79264]=0;q[79265]=0;q[79282]=0;q[79283]=0;q[79284]=0;q[79285]=0;q[79286]=pq(122496,22);q[79287]=JA(122656,15)}function yN(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+208>>2]&15;c=0;a:{if(!d){break a}o[b+7|0]=0;o[b+8|0]=0;o[b+9|0]=0;o[b+10|0]=0;o[b+11|0]=0;o[b+12|0]=0;o[b+13|0]=0;o[b+14|0]=0;q[b>>2]=0;q[b+4>>2]=0;c=Sq(a+132|0,b,16-d|0)}a=c;Ii=b+16|0;return a}function sya(){q[210415]=0;q[210416]=0;q[210414]=317056;q[210412]=0;q[210410]=132779;q[210409]=132763;q[210408]=0;q[210406]=0;q[210404]=0;q[210402]=0;q[210400]=1;q[210398]=0;q[210399]=3;q[210417]=0;q[210418]=0;q[210419]=0;q[210420]=pq(132800,18)}function rV(a,b,c){var d=0;d=Ii-16|0;Ii=d;b=hk(a,b,c+4|0,163);a:{if(b){a=b-9472|0;break a}q[c>>2]=163;q[c+8>>2]=q[a>>2];b=q[a>>2]+q[c+4>>2]|0;c=hk(a,b,d+12|0,48);if(c){a=c-9472|0;break a}a=(b|0)==(q[a>>2]+q[d+12>>2]|0)?0:-9574}Ii=d+16|0;return a}function poa(a){a=a|0;var b=0,c=0;b=q[a+8>>2];c=q[b+16>>2];a=q[q[a+16>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+4>>2];b=q[b>>2];if(a>>>0>8>>>0){a=b+(a<<8)|0;p[a+246>>1]=s[a+246>>1]|2;return 0}}J(57189,57106,479,57200);G()}function po(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;a:{if(!a){break a}d=q[a+2024>>2];if((d|0)==q[a+2028>>2]){if(o[a+2400|0]&1){break a}q[c>>2]=d-q[a+2020>>2]>>2;Pi(3,114609,114813,c);o[a+2400|0]=r[a+2400|0]|1;break a}q[a+2024>>2]=d+4;q[d>>2]=b}Ii=c+16|0}function lz(a){var b=0,c=0;b=Ii-144|0;Ii=b;Ui(b+16|0,0,128);q[b+12>>2]=128;a:{if(!Xy(a,b+16|0,b+12|0)){c=s[b+16>>1]==10;break a}a=im(173656,153,q[240513]);q[b+4>>2]=vG(im(173656,153,q[240513]));q[b>>2]=a;Pi(4,173567,173613,b)}Ii=b+144|0;return c}function cga(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return r[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)+24|0]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function RB(a){var b=0,c=0,d=0;a:{b:{if(a+1>>>0<2){break b}b=a&65535;c=q[210908];if(b>>>0>=t[c+8>>2]){break a}d=q[q[c>>2]+(b<<2)>>2];if(!d|s[q[c+4>>2]+(b<<1)>>1]!=(a>>>16|0)){break b}p[d+32>>1]=s[d+32>>1]+1}return}J(154349,154364,144,154402);G()}function Nra(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ii-16|0;Ii=d;c=q[a+8>>2];oz(q[c+16>>2],u[q[a+4>>2]+4>>2]);q[71570]=q[71570]+(q[c+4>>2]-q[c>>2]>>2);c=q[c+4>>2]-q[c>>2]>>2;q[d>>2]=c;q[d+4>>2]=0;q[d+8>>2]=c;q[d+12>>2]=0;a=xM(a,2,b);Ii=d+16|0;return a|0}function Hda(a){a=a|0;var b=0,c=0,d=0,e=x(0);b=Ii-32|0;Ii=b;d=nj(b+8|0,a,1,202233,4358);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);e=vea(c,q[b+4>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;mj(d);Ii=b+32|0;return 1}function F$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=-24832;if(!(!a|!c)){e=r[(a+b|0)-1|0];f=b-e|0;q[c>>2]=f;c=!e|b>>>0>>0;if(b){d=0;while(1){c=(d>>>0>>0?0:r[a+d|0]^e)|c;d=d+1|0;if((d|0)!=(b|0)){continue}break}}d=c&255?-25088:0}return d|0}function C$(a){var b=0,c=0,d=0,e=0;c=Ii-400|0;Ii=c;d=-1;a:{if(QC(c+8|0)){break a}d=0;b:{c:{while(1){e=r[(b+c|0)+73|0];o[a+b|0]=e;if(!e){break c}b=b+1|0;if((b|0)!=65){continue}break}break b}if((b|0)!=65){break a}}o[a- -64|0]=0}Ii=c+400|0;return d}function oca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,202233,3975);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);a:{if(_v(d,q[b+4>>2])){e=Kj(c,207787,0);break a}iba(d,q[b+4>>2],x(fj(a,2)))}mj(c);Ii=b+32|0;return e|0}function nca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,202233,4025);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+4|0);a:{if(_v(d,q[b+4>>2])){e=Kj(c,207848,0);break a}hba(d,q[b+4>>2],x(fj(a,2)))}mj(c);Ii=b+32|0;return e|0}function mz(a){var b=0,c=0;b=Ii-144|0;Ii=b;Ui(b+16|0,0,128);q[b+12>>2]=128;a:{if(!Xy(a,b+16|0,b+12|0)){c=s[b+16>>1]==2;break a}a=im(173656,128,q[240513]);q[b+4>>2]=vG(im(173656,128,q[240513]));q[b>>2]=a;Pi(4,173567,173613,b)}Ii=b+144|0;return c}function fu(a,b){var c=0,d=0,e=0,f=0;c=a*a;d=c*.5;e=1-d;f=1-e-d;d=c*c;return e+(f+(c*(c*(c*(c*2480158728947673e-20+ -.001388888888887411)+.0416666666666666)+d*d*(c*(c*-1.1359647557788195e-11+2.087572321298175e-9)+ -2.7557314351390663e-7))-a*b))}function Y5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=Ii-2064|0;Ii=b;q[b+8>>2]=d;q[b>>2]=a+8;q[b+4>>2]=a+140;sj(b+1040|0,1024,33023,b);a=-2;if(!fG(b+16|0,b+1040|0)){a=iv(b+16|0,e,f,b+1040|0);a=a?(a|0)==-2?-2:-3:0}Ii=b+2064|0;return a|0}function SW(a){var b=0,c=0,d=0,e=0;d=Ii-384|0;Ii=d;c=-5;b=q[a+80>>2];a:{if(b>>>0>384){break a}e=Ui(d,0,384);c=-9;if(Mi[q[a+92>>2]](q[a+96>>2],e,b)|0){break a}b=q[a+80>>2];c=ty(a,e,b);if(!c){q[a+76>>2]=1}Mi[q[65677]](e,0,b)|0}Ii=d+384|0;return c}function Oya(){q[210448]=1;q[210446]=1119817666;q[210447]=1850475176;q[210445]=140127;q[210444]=1;q[210451]=0;o[841800]=0;q[210449]=q[210443];q[210451]=q[71906];q[71906]=841776;q[63951]=q[71906];q[71906]=255776;q[63995]=q[71906];q[71906]=255952}function Jx(a){var b=0,c=0,d=0,e=0;c=q[a+76>>2];b=q[a+68>>2];d=q[b+512>>2];if((c|0)!=(d|0)){q[a+76>>2]=d;q[b+512>>2]=c;c=q[a+220>>2];d=q[a+224>>2];e=q[b+520>>2];q[a+220>>2]=q[b+516>>2];q[a+224>>2]=e;q[b+516>>2]=c;q[b+520>>2]=d;fs(a,q[a+76>>2])}}function Fqa(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]>>4;a:{b=qj(a,1);if(b){rj(a,-1e4,q[b+16>>2]);ej(a,2);ej(a,3);pj(a,-3);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(c|0)){break a}return 0}J(19085,15159,274,19108);G()}J(15852,15159,282,19108);G()}function Vua(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-112|0;Ii=c;d=a;if((Vi(a,1)|0)==8){e=1;d=Gn(a,1)}b=e+1|0;a:{if(!sl(d,jj(a,b),c+8|0)){b=dk(a,b,147408);break a}b=e+3|0;hm(a,b);Ri(a,b);co(a,d,1);Xi(a,QY(d,c+8|0,jj(a,e|2)));b=1}Ii=c+112|0;return b|0}function Lva(a){a=a|0;var b=0,c=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b<<8&16711680|b<<24|(b>>>8&65280|b>>>24);q[a+8>>2]=q[a+8>>2]+16;return 1}function $fa(a,b){a=a|0;b=b|0;var c=0;a:{if(b>>>0<2097152){b=a&65535;c=q[75054];if(b>>>0>=t[c+32>>2]){break a}return q[(s[q[c+28>>2]+(b<<1)>>1]==(a>>>16|0)?q[q[c+24>>2]+(b<<2)>>2]:0)>>2]}J(91172,91211,73,91247);G()}J(91017,91032,144,91096);G()}function zca(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);NA(d,q[b+12>>2],0,0);if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(202212,202233,2007,206729);G()}Ii=b+16|0;return 0}function xq(a,b){var c=0,d=0,e=0;a:{b:{if(a+1>>>0<2){break b}c=a&65535;d=q[210908];if(c>>>0>=t[d+8>>2]){break a}e=q[q[d>>2]+(c<<2)>>2];if(!e|s[q[d+4>>2]+(c<<1)>>1]!=(a>>>16|0)){break b}q[b>>2]=s[e+32>>1]}return}J(154349,154364,144,154402);G()}function dU(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Ii-16|0;Ii=c;q[c+12>>2]=0;q[c+8>>2]=4;d=1;e=a;a:{if((io(q[b>>2],1,4,c+12|0,c+8|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;d=2;a=137391;break a}a=mm(q[c+12>>2])}Xi(e,a);Ii=c+16|0;return d|0}function _pa(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;a:{if(!oo(a,1,0,b+12|0)){break a}a=q[b+12>>2];if(!a){break a}b:{switch(q[a+4>>2]-1|0){case 0:Pt(q[a>>2]);break a;case 1:break b;default:break a}}cj(q[74076],q[a>>2])}Ii=b+16|0;return 0}function WF(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0;a:{if(d){j=b+12|0;k=e>>>1&63;while(1){h=w(g,36)+c|0;i=(g|0)==(k|0);f=Gu(b,h,i);if(f){break a}f=Gu(j,h+12|0,i);if(f){break a}g=g+1|0;if((g|0)!=(d|0)){continue}break}}f=XF(a,b,e>>>7|0)}return f}function F3(a){a=a|0;var b=0,c=0,d=0,e=0;d=q[a+8>>2]-q[a+12>>2]>>4;e=a;a:{if(Ck(a,1,q[79307])){b=qj(a,1);c=q[b>>2];b=q[b+4>>2];break a}c=Oi(kj(a,1,0));b=Li}lk(e,c,b);if((d+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(125274,125299,86,125518);G()}return 1}function ul(a,b){var c=0,d=0;if(!a){return Yi(b)}if(b>>>0>=4294967232){q[240513]=48;return 0}c=$P(a-8|0,b>>>0<11?16:b+11&-8);if(c){return c+8|0}c=Yi(b);if(!c){return 0}d=q[a-4>>2];d=(d&3?-4:-8)+(d&-8)|0;Ti(c,a,b>>>0>d>>>0?d:b);Ni(a);return c}function oV(a,b,c){var d=0,e=0,f=0;e=Ii-16|0;Ii=e;d=q[a>>2];f=-9440;a:{if((b-d|0)<1){break a}d=r[d|0];b=WE(a,b,e+12|0);if(b){f=b-9344|0;break a}q[c>>2]=d;b=q[e+12>>2];q[c+4>>2]=b;q[c+8>>2]=q[a>>2];q[a>>2]=b+q[a>>2];f=0}d=f;Ii=e+16|0;return d}function kca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;c=tj(a,1,b+12|0);e=Uj(a,2);q[c+412>>2]=q[c+412>>2]&-8388609|e<<23&8388608;if(d>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(202212,202233,4347,208246);G()}Ii=b+16|0;return 0}function kM(a,b,c,d){var e=0,f=0,g=0;if(a){a=q[a+84>>2];e=q[a+4>>2];if(e){g=q[a>>2];a=0;while(1){f=w(a,96)+g|0;if((b|0)==q[f>>2]&q[f+4>>2]==(c|0)){p[d>>1]=a;return 0}a=a+1|0;if(e>>>0>a>>>0){continue}break}}return-5}J(8329,7192,2057,8345);G()}function Vja(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[58514],c+12|0)){b=q[c+12>>2];a:{if(r[b+4|0]){break a}d=q[a+20>>2];if(!d){break a}Ek(d,q[b>>2]);b=q[c+12>>2]}q[q[a+24>>2]>>2]=b;b=0}Ii=c+16|0;return b|0}function Jsa(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ii-32|0;Ii=d;c=d+16|0;q[c>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;q[c>>2]=q[a+4>>2];a=q[a+288>>2];q[c+8>>2]=0;q[c+4>>2]=a;q[d+8>>2]=!b;FM(c,d+8|0);a=(b|0)!=0;aia(a);b=q[239672];if(b){o[b+33956|0]=a}Ii=d+32|0}function H_(a){a=a|0;var b=0;hm(a,1);b=qj(a,1);Zi(a,-1e4,145545);a:{b:{if(!b){break b}if(!$l(a,1)){break b}if(Is(a,-2,-1)){break a}}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 1}if(!q[b>>2]){bj(a,145903,11);return 1}bj(a,145915,4);return 1}function Kw(a){var b=0,c=0,d=0,e=0;a:{b:{if(a+1>>>0<2){break b}b=a&65535;c=q[210908];if(b>>>0>=t[c+8>>2]){break a}d=q[q[c>>2]+(b<<2)>>2];if(!d|s[q[c+4>>2]+(b<<1)>>1]!=(a>>>16|0)){break b}e=q[d+24>>2]}return e}J(154349,154364,144,154402);G()}function Dj(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;if((Vi(a,b)|0)!=(c|0)){c=(c|0)==-1?140583:q[(c<<2)+256832>>2];g=d;f=Vi(a,b);e=140583;a:{if((f|0)==-1){break a}e=q[(f<<2)+256832>>2]}q[g+4>>2]=e;q[d>>2]=c;dk(a,b,Lj(a,143231,d))}Ii=d+16|0}function nfa(a,b){a=a|0;b=b|0;var c=0;a:{if(a){Hc(q[(b<<2)+92808>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}p[a+80>>1]=s[a+80>>1]&63999|b<<9&1536;return}J(88567,88575,3791,92912);G()}lj(c,92912,3793);J(88669,88575,3793,92912);G()}function Moa(a,b){var c=0;c=q[b+4>>2];if(!c){c=q[b>>2]}a:{if(!(o[c+8|0]&1)){break a}if(o[b+24|0]&1){Pi(4,39489,39613,0);return 0}if(!q[c>>2]){break a}b=0;b:{if(!a){break b}a=q[a>>2];if(!a){break b}b=q[a>>2]}cj(b,q[c>>2]);q[c>>2]=0}return 1}function Isa(a,b){a=a|0;b=b|0;var c=0,d=0;d=Ii-32|0;Ii=d;q[a+448>>2]=Jk();q[a+452>>2]=Li;c=d+16|0;q[c>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;q[c>>2]=q[a+4>>2];a=q[a+288>>2];q[c+8>>2]=0;q[c+4>>2]=a;q[d+8>>2]=b?2:3;FM(c,d+8|0);$ha((b|0)!=0);Ii=d+32|0}function Gm(a,b,c){var d=0,e=0;if(c>>>0<10){if(!c){return 0}d=a;a=q[b>>2];e=d+(a>>>3|0)|0;d=a&7;a=r[e|0]>>>d|0;d=8-d|0;d=(c|0)<(d|0)?c:d;if((d|0)!=(c|0)){a=r[e+1|0]<>2]=q[b>>2]+c;return(-1<>2]+32>>2];b=q[a+1052>>2];c=q[a+1048>>2];d=c+1|0;q[a+1048>>2]=d;q[a+1052>>2]=d>>>0<1?b+1|0:b;if(!(b|c)){q[a+8>>2]=6;o[a+16|0]=o[e+166|0]&1;q[a>>2]=Oi(55991);q[a+4>>2]=Li}return!(b|c)|0}function CT(a){a=a|0;var b=0,c=0,d=0,e=0;c=fj(a,1);d=fo(a,2,0);a:{if(y(d)<2147483648){b=~~d;break a}b=-2147483648}if(y(c)<2147483648){e=~~c}else{e=-2147483648}c=+ei(e|0,b|0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function $n(a,b,c,d){var e=0,f=0;f=(b>>>2|0)+((b&3)!=0)|0;a:{if((f|0)!=q[a+4>>2]){ij(a);q[a+8>>2]=0;q[a>>2]=1;q[a+4>>2]=0;e=rl(a,f);if(e){break a}}e=Bk(a,0);if(e){break a}Mi[c|0](d,q[a+8>>2]+((f<<2)-b|0)|0,b)|0;XD(q[a+8>>2],f);e=0}return e}function $H(a,b,c){var d=0,e=0;a:{if(b){d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>=e-a>>2>>>0){break a}a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}o[a+82|0]=r[a+82|0]&254|c}return}J(151947,151192,479,151403);G()}function usa(a){var b=0,c=0,d=0;c=Ii-16|0;Ii=c;b=q[210498];if(b){while(1){d=q[b+16>>2];a:{if(!d|!r[b+40|0]){break a}o[b+40|0]=0;if(!(Mi[d|0](a)|0)){break a}q[c>>2]=q[b>>2];Pi(4,147636,147693,c)}b=q[b+36>>2];if(b){continue}break}}Ii=c+16|0}function i9(a,b){var c=0,d=0;if(!b){return 0}c=b&65535;d=q[a+4>>2];a=q[a>>2];if(c>>>0>2>>>0){a=q[a+(c<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return 0}return(q[a+4>>2]-q[a>>2]|0)/304|0}J(151947,151192,479,151403);G()}function _P(a,b){var c=0,d=0,e=0,f=0;c=r[a+1|0];e=!c;d=c|r[a|0]<<8;f=r[b+1|0]|r[b|0]<<8;a:{if(!c|(d|0)==(f|0)){break a}b=a+1|0;while(1){a=b;c=r[a+1|0];e=!c;d=c|d<<8&65280;if((f|0)==(d|0)){break a}b=a+1|0;if(c){continue}break}}return e?0:a}function mY(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=2;d=q[a+8>>2]-q[a+12>>2]>>4;c=fj(a,1);if((d|0)>=2){while(1){e=fj(a,b);c=c>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function lY(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;b=2;d=q[a+8>>2]-q[a+12>>2]>>4;c=fj(a,1);if((d|0)>=2){while(1){e=fj(a,b);c=c>e?e:c;f=(b|0)!=(d|0);b=b+1|0;if(f){continue}break}}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function TC(a,b){var c=0;c=fo(a,2,-1);a:{b:{switch(o[Tl(a,3,137944,0)|0]-98|0){case 0:v[b>>3]=c;break a;case 16:case 18:v[b+8>>3]=c;break a;default:break b}}dk(a,3,137946)}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function Rga(a){a=a|0;if(a){if(r[a+156|0]&32){CK(1);Xb();q[a+88>>2]=0;q[a+92>>2]=0;q[a+40>>2]=0;q[a+96>>2]=0;q[a+100>>2]=0;q[a+8>>2]=q[a+4>>2];p[a+156>>1]=s[a+156>>1]&65503;Ni(q[a+20>>2]);q[a+20>>2]=0}return}J(88636,88575,1331,91107);G()}function W4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;Ak(a,127723,252320);bj(a,127606,3);Si(a,-2,127729);bj(a,127610,4);Si(a,-2,127738);bj(a,127615,1);Si(a,-2,127748);Ri(a,-2);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(127763,127623,178,127784);G()}}function Vl(a,b,c){var d=0,e=0,f=0;if(c){e=-7;f=q[a+5136>>2];a:{if(!f){break a}while(1){if(dj(b,q[(w(d,40)+a|0)+24>>2])){d=d+1|0;if((f|0)!=(d|0)){continue}break a}break}q[c>>2]=(w(d,40)+a|0)+16;e=0}return e}J(25610,24997,1130,25651);G()}function Qka(a){a=a|0;var b=0,c=0,d=0;d=Ii-16|0;Ii=d;b=q[a+4>>2];c=q[b+4>>2];if(!c){c=q[b>>2]}b=q[c>>2];a:{if(b){break a}if(!ak(q[a>>2],q[c+4>>2],c)){b=q[c>>2];break a}q[d>>2]=q[c+4>>2];Pi(4,39489,39672,d);b=0}Ii=d+16|0;return(b|0)!=0|0}function PC(a,b){var c=0,d=0;a:{if((a|0)==-1){break a}d=q[b+76>>2]>=0;b:{c=q[b+4>>2];c:{if(!c){nC(b);c=q[b+4>>2];if(!c){break c}}if(q[b+44>>2]-8>>>0>>0){break b}}if(!d){break a}return}c=c-1|0;q[b+4>>2]=c;o[c|0]=a;q[b>>2]=q[b>>2]&-17}}function Iq(a,b,c){var d=0,e=0;e=t[c>>2]>2];a:{b:{if(t[b>>2]>=t[a>>2]){d=0;if(!e){break a}Hl(b,c);d=1;if(t[b>>2]>=t[a>>2]){break a}Hl(a,b);break b}if(e){Hl(a,c);return 1}Hl(a,b);d=1;if(t[c>>2]>=t[b>>2]){break a}Hl(b,c)}d=2}return d}function Im(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;if(q[a+24>>2]){c=q[a+8>>2];d=q[a+4>>2];q[b+4>>2]=q[a+20>>2];q[b>>2]=a;q[b+8>>2]=Gza(d,c,32);q[b+12>>2]=Li;$y(q[53736],140042,b)}c=q[a>>2];if(c){Ni(c);q[a>>2]=0}if(q[a+16>>2]){Ni(a)}Ii=b+16|0}function VR(a){var b=0,c=0,d=0;b=q[a+120>>2];c=r[b+3|0]|(r[b+2|0]<<8|r[b+1|0]<<16);d=r[b+11|0]|(r[b+10|0]<<8|r[b+9|0]<<16);b=r[b+8|0]|(r[b+7|0]<<8|r[b+6|0]<<16);if(!(b>>>0>c>>>0|c-b>>>0>>0)){return t[a+132>>2]>>0?-1:0}return-1}function VN(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;if(b){g=b+1|0;d=1<>>0<32){continue}break}J(96993,106647,437,106879);G()}return f}J(106868,106647,418,106879);G()}function JW(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{d=q[a>>2];if((d|0)<0){b=-69;break a}b=ex(d,b,c);if((b|0)>-1){break a}b=-26752;if(VD(a)){break a}b=-80;if(q[240513]==64|q[240513]==15){break a}return(q[240513]==27?-26752:-78)|0}return b|0}function D8(a){var b=0,c=0;b=q[a+1920>>2];if((b|0)!=q[a+1924>>2]){while(1){Hv(q[(c<<2)+b>>2]);c=c+1|0;b=q[a+1920>>2];if(c>>>0>2]-b>>2>>>0){continue}break}}Ni(q[a+1940>>2]);Mi[q[74944]](q[a+1936>>2]);Mi[q[74957]](q[a+1944>>2])}function xp(a,b,c,d,e){var f=0;a:{if(!b){break a}f=q[b+32>>2]<<8;if((f|0)==-256){break a}Mi[q[74984]](q[a+2384>>2],f>>8,c);a=q[b+12>>2];if(!a){break a}c=q[b+16>>2];if(!c){break a}Mi[q[75012]](d,e,a,c,q[b+20>>2],q[b+24>>2],u[b+28>>2])}}function gS(a,b){var c=0,d=0,e=0;c=Ii+ -64|0;Ii=c;d=q[a>>2];q[c+48>>2]=0;d=am(d,3,c+48|0);e=q[a>>2];q[c+32>>2]=d&-2049;am(e,4,c+32|0);Sx(q[a>>2],b);b=q[a>>2];q[c+16>>2]=0;b=am(b,3,c+16|0);a=q[a>>2];q[c>>2]=b|2048;am(a,4,c);Ii=c- -64|0}function En(a,b,c){var d=0,e=0;d=-20736;a:{if(!a|!b){break a}e=Mi[q[b+32>>2]]()|0;q[a+4>>2]=e;d=-20864;if(!e){break a}b:{if(!c){break b}c=bk(2,q[b+12>>2]);q[a+8>>2]=c;if(c){break b}Mi[q[b+36>>2]](e);return-20864}q[a>>2]=b;d=0}return d}function Cea(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=Ii-32|0;Ii=f;a:{if(!Lo(q[e+8>>2])){break a}q[f+16>>2]=b;q[f+20>>2]=c;q[f+24>>2]=d;q[f+8>>2]=e;bt(q[e+8>>2],1433,f+8|0);if(a|d){break a}no(q[e+8>>2]);q[e+8>>2]=0}Ii=f+32|0}function pn(a,b,c){var d=0,e=0;e=(c>>>2|0)+((c&3)!=0)|0;a:{if((e|0)!=q[a+4>>2]){ij(a);q[a+8>>2]=0;q[a>>2]=1;q[a+4>>2]=0;d=rl(a,e);if(d){break a}}d=Bk(a,0);if(d|!b){break a}Ti(q[a+8>>2]+((e<<2)-c|0)|0,b,c);XD(q[a+8>>2],e);d=0}return d}function h5(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=q[c+8>>2];d=q[c+4>>2];if(r[c|0]){a=sj(d,a,124347,0);o[c|0]=0;a=(a|0)>0?a:0;d=a+q[c+4>>2]|0;q[c+4>>2]=d;a=q[c+8>>2]-a|0;q[c+8>>2]=a}a=yG(b,d,a);q[c+4>>2]=a+q[c+4>>2];q[c+8>>2]=q[c+8>>2]-a}function gZ(a,b,c){var d=0,e=0;if(b>>>0>=4294967262){mk(a)}d=Cj(a,0,0,b+32|0);e=r[q[a+16>>2]+20|0];q[d+16>>2]=b;o[d+4|0]=7;q[d+12>>2]=c;q[d+8>>2]=0;o[d+5|0]=e&3;q[d>>2]=q[q[q[a+16>>2]+112>>2]>>2];q[q[q[a+16>>2]+112>>2]>>2]=d;return d}function Zoa(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+4>>2];c=0;a:{if(!d){break a}c=q[a>>2];a=q[a+8>>2];q[b+12>>2]=d;o[b+4|0]=1;q[b>>2]=a;q[b+8>>2]=c;b:{if(r[a+17|0]){break b}}oq(0,0,173,b);c=r[b+4|0]?0:-1e3}Ii=b+16|0;return c|0}function V4(a){var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;ej(a,-10002);Ak(a,127863,252336);b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,127868);Ri(a,-3);if(c>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(127873,127830,192,127894);G()}}function Ola(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=Ii-144|0;Ii=d;c=q[a>>2];Av(q[b+8>>2],q[b+12>>2],d,129);e=a;a=q[a+4>>2];q[e+4>>2]=a+1;e=q[c+8>>2];q[e+8>>2]=3;v[e>>3]=a|0;q[c+8>>2]=q[c+8>>2]+16;bj(c,d,q[b+12>>2]<<1);pj(c,-3);Ii=d+144|0}function vqa(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=Zm(a,1);d=q[c+20>>2];e=q[c+16>>2];u[b+8>>2]=u[c+24>>2];q[b>>2]=e;q[b+4>>2]=d;u[b+16>>2]=u[b>>2];c=q[b+8>>2];q[b+20>>2]=q[b+4>>2];q[b+24>>2]=c;Al(a,b+16|0);Ii=b+32|0;return 1}function uE(a,b,c,d){var e=0;e=-20;a:{b=KE(b,d);if(!b|q[b+24>>2]!=16){break a}if(a){e=q[a+60>>2];if(e){Mi[q[q[q[a>>2]+28>>2]+32>>2]](e)}Mi[q[65677]](a,0,64)|0}e=Ku(a,b);if(e){break a}e=Lu(a,c,d,1);if(e){break a}return M$(a)}return e}function uD(a){var b=0,c=0,d=0,e=0;b=fE(a);c=b>>>0<16384?b:16384;d=q[a+216>>2];a:{if(c>>>0<=d>>>0){break a}b=tD(a);if((b|0)<0){return b}a=eE(a);if((a|0)<0){return a}if(a>>>0>=b>>>0){break a}a=b-a|0;b=c-d|0;e=a>>>0>>0?a:b}return e}function rH(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;q[d+4>>2]=b;q[d>>2]=a;sj(c,1024,31050,d);b=c;while(1){a=r[b|0];a:{b:{if((a|0)!=47){if(a){break b}o[c|0]=0;Ii=d+16|0;return}if((e&255)==47){break a}}o[c|0]=a;c=c+1|0}b=b+1|0;e=a;continue}}function iZ(a,b){a:{switch(q[b>>2]-13|0){case 0:q[b>>2]=12;q[b+8>>2]=q[q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)>>2]>>>6&255;return;case 1:a=q[q[a>>2]+12>>2]+(q[b+8>>2]<<2)|0;q[a>>2]=q[a>>2]&8388607|16777216;q[b>>2]=11;break;default:break a}}}function Osa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a=q[c+8>>2];d=q[c+4>>2];if(r[c|0]){a=sj(d,a,4228,0);o[c|0]=0;a=(a|0)>0?a:0;d=a+q[c+4>>2]|0;q[c+4>>2]=d;a=q[c+8>>2]-a|0;q[c+8>>2]=a}a=yG(b,d,a);q[c+4>>2]=a+q[c+4>>2];q[c+8>>2]=q[c+8>>2]-a}function sQ(a){var b=0;a:{b=Yi(28);if(b){q[b+24>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=-2;a=(a|0)<1?1023:a+1|0;q[b+4>>2]=a;a=Yi(a);q[b>>2]=a;if(a){break a}Qt(139998);G()}Qt(139998);G()}o[a|0]=0;q[b+16>>2]=1;return b}function hta(a,b,c,d,e){var f=0;if((q[c+4>>2]&264241152)==37748736){f=OB(b,e+1|0);if(!r[a+12|0]){a=q[a+4>>2];c=q[c+12>>2];d=Ti(f,d,e);o[d+e|0]=0;a=a+c|0;if(o[b+48|0]&1){f=d-q[b+32>>2]|0}q[a>>2]=f}return}J(23815,23354,288,23851);G()}function hp(a,b){var c=0,d=0;a:{c=q[a+8>>2];b:{if((c|0)!=q[b+8>>2]){break b}d=1;c:{switch(c|0){case 3:return v[a>>3]==v[b>>3];case 1:case 2:break a;case 0:break b;default:break c}}d=q[a>>2]==q[b>>2]}return d}return q[a>>2]==q[b>>2]}function gl(a,b,c){if((Jj(c,0)|0)<0){return-10}b=ry(0,a,b,c);a:{if(b){break a}while(1){if((Jj(a,0)|0)<=-1){b=Rl(a,a,c);if(!b){continue}break a}break}while(1){b=0;if((_j(a,c)|0)<0){break a}b=yl(a,a,c);if(!b){continue}break}}return b}function _Y(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;a:{b:{if(q[a>>2]){c=q[a+4>>2];break b}c:{c=Mi[q[a+8>>2]](q[a+16>>2],q[a+12>>2],b+12|0)|0;if(c){d=q[b+12>>2];if(d){break c}}a=-1;break a}q[a+4>>2]=c;q[a>>2]=d}a=r[c|0]}Ii=b+16|0;return a}function ZO(a,b,c){var d=0;d=Ii-16|0;Ii=d;b=hk(a,b,d+12|0,160);a:{if(b){if((b|0)==-98){q[c>>2]=0;a=0;break a}a=b-8576|0;break a}b=q[a>>2]+q[d+12>>2]|0;c=Xq(a,b,c);if(c){a=c-8704|0;break a}a=(b|0)==q[a>>2]?0:-8806}Ii=d+16|0;return a}function YC(a,b,c,d){var e=0;e=Ii-144|0;Ii=e;q[e+44>>2]=a;q[e+4>>2]=a;q[e>>2]=0;q[e+76>>2]=-1;q[e+8>>2]=(a|0)<0?-1:a+2147483647|0;Cn(e,0,0);c=mO(e,c,1,d,0);if(b){q[b>>2]=((q[e+4>>2]+q[e+120>>2]|0)-q[e+8>>2]|0)+a}Ii=e+144|0;return c}function UC(a){var b=0,c=0,d=0;b=Ii-32|0;Ii=b;Vj(a);pl(a,b+8|0,0);if(q[b+8>>2]==1){q[b+8>>2]=3}Xu(q[a+48>>2],b+8|0);c=q[b+28>>2];if(q[a+16>>2]!=274){d=q[a+52>>2];q[b>>2]=tl(a,274);Sj(a,oj(d,141919,b))}Vj(a);St(a);Ii=b+32|0;return c}function UB(a,b,c){var d=0,e=0,f=0,g=0,h=0;e=-12416;d=q[b>>2];a:{if((c-d|0)<2){break a}f=r[d+1|0];g=r[d|0];d=d+2|0;q[b>>2]=d;h=c-d|0;c=f|g<<8;if((h|0)<(c|0)){break a}a=pn(a,d,c);if(a){return a-12544|0}q[b>>2]=c+q[b>>2];e=0}return e}function Lca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=tj(a,1,b+12|0);if(Vi(a,2)){c=tj(a,2,b+12|0);c=s[c+570>>1]|s[c+568>>1]<<16}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);Iba(e,s[d+570>>1]|s[d+568>>1]<<16,c);Ii=b+16|0;return 0}function pua(a){a:{b:{if(a){if(q[a>>2]){break b}if(q[a+100>>2]|q[a+104>>2]|(q[a+108>>2]|q[a+112>>2])){break a}if(q[a+124>>2]|(q[a+116>>2]|q[a+120>>2])){break a}Ni(a)}return}J(29207,29128,158,29255);G()}J(29269,29128,161,29255);G()}function aA(a){var b=0;b=q[a+104>>2];if(b){Ni(b)}b=q[a+108>>2];if(b){Ni(b)}b=q[a+136>>2];if(b){Ni(b)}Mi[q[75009]](q[a+8>>2],q[a+12>>2]);a:{if(o[a+48|0]&1){break a}b=q[a+28>>2];if(b){Ni(b)}b=q[a+20>>2];if(!b){break a}Ni(b)}return a}function Tba(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=tj(a,1,c+12|0);d=fj(a,2);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);b=s[b+570>>1]|s[b+568>>1]<<16;if(y(d)<2147483648){a=~~d}else{a=-2147483648}KJ(e,b,a);Ii=c+16|0;return 0}function N_(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;q[Lm(a,145545)>>2]=0;d=q[240513];b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;q[c>>2]=ql(d);Lj(a,145661,c);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ii=c+16|0;return 3}function Mca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=tj(a,1,b+12|0);if(Vi(a,2)){c=tj(a,2,b+12|0);c=s[c+570>>1]|s[c+568>>1]<<16}gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);Xv(e,s[d+570>>1]|s[d+568>>1]<<16,c);Ii=b+16|0;return 0}function zZ(a,b){Cj(a,q[b+12>>2],q[b+44>>2]<<2,0);Cj(a,q[b+16>>2],q[b+52>>2]<<2,0);Cj(a,q[b+8>>2],q[b+40>>2]<<4,0);Cj(a,q[b+20>>2],q[b+48>>2]<<2,0);Cj(a,q[b+24>>2],w(q[b+56>>2],12),0);Cj(a,q[b+28>>2],q[b+36>>2]<<2,0);Cj(a,b,76,0)}function wQ(a){a=a|0;var b=0,c=0,d=0;b=Ii-1040|0;Ii=b;d=kj(a,1,b+1036|0);c=jj(a,2);q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;if((c|0)>=1){while(1){qn(b,d,q[b+1036>>2]);a=(c|0)>1;c=c-1|0;if(a){continue}break}}zm(b);Ii=b+1040|0;return 1}function fya(a){a=a|0;var b=0;q[213234]=1;while(1){a=q[213233];q[213233]=a?a:1;if(a){continue}break}a=q[213232];if(a){a:{if(o[a+28|0]&1){break a}b=q[a+8>>2];if(b){Ni(b)}b=q[a>>2];if(!b){break a}Ni(b)}Ni(a);q[213232]=0}q[213233]=0}function Ko(a){var b=0,c=0,d=0,e=0,f=0,g=0;c=q[a>>2];b=r[c|0];if(b){while(1){a:{d=g;e=(e<<6)+b|0;f=c+1|0;b=r[c+1|0];if(!b){break a}g=d+1|0;c=f;if((b&192)==128){continue}}break}q[a>>2]=f;a=e-q[(d<<2)+183984>>2]|0}else{a=0}return a}function F1(a){var b=0,c=0;c=Ii-16|0;Ii=c;b=s[a+22>>1];if(b){q[c>>2]=0-b;Pi(4,209534,209540,c)}a:{if(o[a+24|0]&1){break a}b=q[a+16>>2];if(!b){break a}Ni(b)}b:{if(o[a+12|0]&1){break b}b=q[a>>2];if(!b){break b}Ni(b)}Ni(a);Ii=c+16|0}function CW(a,b,c,d,e,f,g,h){var i=0;i=Ii-16|0;Ii=i;q[i+12>>2]=d;d=-16e3;a:{if(!q[a>>2]){break a}if(RD(b,i+12|0)){break a}d=q[q[a>>2]+20>>2];if(!d){d=-16128;break a}d=Mi[d|0](q[a+4>>2],b,c,q[i+12>>2],e,f,g,h)|0}Ii=i+16|0;return d}function uU(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=pm(q[q[a+72>>2]+60>>2]);if((c|0)<0){return 0}a:{if((b|0)!=(f|0)|f>>31!=(c|0)){c=0;if(Uk(q[q[a+72>>2]+60>>2],b,0)){break a}}c=zl(d,1,e,q[q[a+72>>2]+60>>2])}return c|0}function E5(a){var b=x(0),c=x(0),d=0,e=0;d=o[a+186|0]&1;e=q[(d<<5)+a>>2];if(!e){return x(0)}c=u[e+8>>2];if(c!=x(0)){a=(d<<5)+a|0;b=u[a+16>>2];b=c>2]==3?x(x(c+c)-b):b:b;b=x((r[a+28|0]&2?x(c-b):b)/c)}else{b=x(0)}return b}function Bta(a,b){var c=0,d=0,e=0,f=0;c=q[a+8>>2];d=q[a+4>>2]-c|0;if((d|0)>=8){e=r[c+4|0]|r[c+5|0]<<8|(r[c+6|0]<<16|r[c+7|0]<<24);f=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);q[a+8>>2]=c+8;q[b>>2]=f;q[b+4>>2]=e}return(d|0)>7}function lka(a){a=a|0;var b=0;b=$i(16);q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;if(!Qj(q[a+12>>2],q[a+16>>2],q[58616],b)){q[b+8>>2]=Oi(q[a+8>>2]);q[b+12>>2]=Li;q[q[a+24>>2]+8>>2]=b;return 0}a=q[b>>2];if(a){Aj(a)}return-13}function ap(a){var b=0,c=0,d=0,e=0,f=0;b=Ii-16|0;Ii=b;if((Vi(a,3)|0)!=1){e=q[64209];f=b;d=Vi(a,3);c=140583;a:{if((d|0)==-1){break a}c=q[(d<<2)+256832>>2]}q[f+4>>2]=c;q[b>>2]=e;dk(a,3,Lj(a,136854,b))}a=Uj(a,3);Ii=b+16|0;return a}function SM(a,b,c){var d=0,e=0;a:{if(c){e=q[a+8>>2];d=q[a+4>>2];if(e>>>0>d>>>0){break a}d=d>>>0>=b+e>>>0;if(!d){q[c>>2]=0;return d}q[c>>2]=e;q[a+8>>2]=q[a+8>>2]+b;return d}J(23176,23130,52,23187);G()}J(23111,23130,53,23187);G()}function Lda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;d=q[a+12>>2];b=q[q[d+12>>2]>>2];e=nj(c+8|0,b,0,202233,690);f=q[a+16>>2];rj(b,-1e4,q[d+8>>2]);Rj(b,-1,f);Ri(b,-2);q[a+16>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;mj(e);Ii=c+32|0}function J$(a,b,c){a=a|0;b=b|0;c=c|0;if(q[b>>2]){q[b>>2]=0;q[c>>2]=1;return 143406}a=q[b+4>>2];a:{if(q[a+76>>2]<=-1){a=q[a>>2];break a}a=q[a>>2]}if(a>>>4&1){a=0}else{a=b+8|0;b=zl(a,1,1024,q[b+4>>2]);q[c>>2]=b;a=b?a:0}return a|0}function $j(a,b){var c=0;c=Ii-16|0;Ii=c;a:{if(Ck(a,b,q[79307])){b=qj(a,b);a=q[b>>2];b=q[b+4>>2];break a}if((Vi(a,b)|0)==4){q[c+12>>2]=0;a=Wl(uj(a,b,c+12|0),q[c+12>>2]);b=Li;break a}Nk(a,b,125364);a=0;b=0}Ii=c+16|0;Li=b;return a}function wja(a){a=a|0;var b=0,c=0;q[74072]=q[a+4>>2];b=Ui($i(160),0,160);q[b>>2]=q[a+20>>2];c=GL(q[a>>2],b);a:{if(!c){q[q[a+24>>2]+8>>2]=b;break a}hB(q[a>>2],b);Ni(b)}q[b+156>>2]=q[q[b+4>>2]+24>>2];mq(q[a>>2],509,b);return c|0}function nL(a,b,c,d){if(o[a+141|0]&1){Pi(4,37377,38924,0);return 1}a=3;b=q[b+12>>2];a:{if(!b){break a}while(1){if(q[b>>2]!=(c|0)|q[b+4>>2]!=(d|0)){b=q[b+16>>2];if(b){continue}break a}break}if(!q[b+12>>2]){return 4}a=0}return a}function dE(a){var b=0,c=0;q[q[a+68>>2]+488>>2]=q[q[a>>2]+152>>2];b=q[q[a+68>>2]+488>>2];c=q[a+92>>2];if(c){Mi[c|0](q[a+88>>2],b>>>2|0,b)}c=q[a+68>>2];a:{if(q[a+128>>2]==22){b=3;if(r[q[a+120>>2]]==20){break a}}b=2}o[c+492|0]=b}function Qu(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;a:{b:{c:{switch(q[a+8>>2]-3|0){case 0:break a;case 1:break c;default:break b}}if(!Sl(q[a>>2]+16|0,c+8|0)){break b}d=v[c+8>>3];q[b+8>>2]=3;v[b>>3]=d;a=b;break a}a=0}Ii=c+16|0;return a}function Iv(a,b,c){var d=0,e=0;a:{if(b){d=b&65535;e=q[a+4>>2];a=q[a>>2];if(d>>>0>=e-a>>2>>>0){break a}a=q[a+(d<<2)>>2];if(s[a+80>>1]!=(b>>>16|0)){Pi(4,150692,151414,0);return}u[a+44>>2]=c}return}J(151947,151192,479,151403);G()}function Eja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[59722],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]+108>>2]);Ek(q[a+20>>2],q[q[b+12>>2]+104>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function vz(a,b){var c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,65882,1209);d=yj(a,8);q[d>>2]=q[b>>2];q[d>>2]=q[b>>2];b=q[b+4>>2];q[d+4>>2]=b;if(b>>>0>=3){J(65944,65882,1214,65974);G()}Zi(a,-1e4,65665);xj(a,-2);mj(e);Ii=c+32|0}function uha(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]>>4;c=M1($j(a,1),Li,x(fj(a,2)));if(c){q[b>>2]=c;Pi(3,80094,80201,b)}if(q[a+8>>2]-q[a+12>>2]>>4!=(d|0)){J(79869,79890,291,80231);G()}Ii=b+16|0;return 0}function oF(a,b,c){var d=0;d=Ii-32|0;Ii=d;b=q[(q[b+8>>2]<<2)+256832>>2];c=q[(q[c+8>>2]<<2)+256832>>2];a:{if(r[b+2|0]==r[c+2|0]){q[d>>2]=b;Yk(a,140689,d);break a}q[d+20>>2]=c;q[d+16>>2]=b;Yk(a,140722,d+16|0)}Ii=d+32|0;return 0}function VB(a,b,c,d){var e=0;e=c;c=q[a+92>>2]+7>>>3|0;c=c>>>0>>0?c:d;d=pn(b,e,c);a:{if(d){break a}c=c<<3;d=q[a+92>>2];if(c>>>0>d>>>0){d=kl(b,c-d|0);if(d){break a}}d=0;a=a+76|0;if((_j(b,a)|0)<0){break a}d=yl(b,b,a)}return d}function In(a,b){var c=0;b=b+9999>>>0<=9999?((q[a+8>>2]-q[a+12>>2]>>4)+b|0)+1|0:b;if(!Vi(a,-1)){Ri(a,-2);return-1}rj(a,b,0);c=hl(a,-1);Ri(a,-2);if(c){rj(a,b,c);nk(a,b,0);nk(a,b,c);return c}c=a;a=al(a,b)+1|0;nk(c,b,a);return a}function Eba(a){var b=0,c=0;c=q[a>>2];b=yj(c,36);q[b+16>>2]=-2;q[b+20>>2]=-2;q[b+8>>2]=-2;q[b+12>>2]=-2;q[b>>2]=-2;q[b+4>>2]=-2;q[b+28>>2]=0;q[b+32>>2]=-2;q[b+24>>2]=a;Zi(c,-1e4,201055);xj(c,-2);q[b+32>>2]=zk(c,-1e4);return b}function $5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;b=Ii-2064|0;Ii=b;q[b+8>>2]=d;q[b>>2]=a+8;q[b+4>>2]=a+140;sj(b+1040|0,1024,33023,b);a=-2;if(!fG(b+16|0,b+1040|0)){a=gv(b+16|0,e);a=a?(a|0)==-2?-2:-3:0}Ii=b+2064|0;return a|0}function xza(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=c>>>16|0;f=a>>>16|0;j=w(e,f);g=c&65535;h=a&65535;i=w(g,h);f=(i>>>16|0)+w(f,g)|0;e=(f&65535)+w(e,h)|0;a=(w(b,c)+j|0)+w(a,d)+(f>>>16)+(e>>>16)|0;b=i&65535|e<<16;Li=a;return b}function qY(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=Zy(fj(a,1),b+12|0);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e;q[a+8>>2]=q[a+8>>2]+16;c=q[b+12>>2];d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 2}function i5(a,b){var c=0,d=0,e=0,f=0;a:{if(!a){break a}d=q[a>>2];c=q[d+104>>2];e=q[d+108>>2];if((c|0)==(e|0)){break a}while(1){f=q[q[c>>2]+24>>2];if(f){Mi[f|0](a,b);e=q[d+108>>2]}c=c+4|0;if((e|0)!=(c|0)){continue}break}}} - - - -function d5(a){a=a|0;var b=0,c=0;hm(a,1);c=Vi(a,1);b=q[79309];if(!c){if(b){Ba(126253,1742,0)|0;no(q[79309])}q[79309]=0;return 0}if(b){no(b)}b=rp(a,1);q[79309]=b;if(!Lo(b)){return Qi(a,126541,0)|0}Ba(126567,1742,0)|0;return 0}function W$(a){a=a|0;var b=0;Dj(a,1,5);Dj(a,2,6);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;a:{if(Hj(a,1)){while(1){ej(a,2);ej(a,-3);ej(a,-3);Rk(a,2,1);b=1;if(Vi(a,-1)){break a}Ri(a,-3);if(Hj(a,1)){continue}break}}b=0}return b|0}function Tk(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=zj(b,0);e=zj(c,0);f=zj(b,1);g=zj(c,1);h=zj(b,2);i=zj(c,2);b=zj(b,3);c=zj(c,3);o[a+3|0]=b>>>0>c>>>0?b:c;o[a+2|0]=h>>>0>i>>>0?h:i;o[a+1|0]=f>>>0>g>>>0?f:g;o[a|0]=d>>>0>e>>>0?d:e}function Sk(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;d=zj(b,0);e=zj(c,0);f=zj(b,1);g=zj(c,1);h=zj(b,2);i=zj(c,2);b=zj(b,3);c=zj(c,3);o[a+3|0]=b>>>0>>0?b:c;o[a+2|0]=h>>>0>>0?h:i;o[a+1|0]=f>>>0>>0?f:g;o[a|0]=d>>>0>>0?d:e}function $T(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;q[c+4>>2]=4;d=a;a:{if((io(q[b>>2],0,32,c+8|0,c+4|0)|0)<=-1){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;b=137391;a=2;break a}b=Vy(q[c+8>>2]);a=1}Xi(d,b);Ii=c+16|0;return a|0}function rl(a,b){var c=0,d=0,e=0;c=-16;a:{if(b>>>0>1e4){break a}d=q[a+4>>2];if(d>>>0>>0){e=bk(b,4);if(!e){break a}c=q[a+8>>2];if(c){Ti(e,c,d<<2);Mi[q[65677]](c,0,d<<2)|0;Ni(q[a+8>>2])}q[a+8>>2]=e;q[a+4>>2]=b}c=0}return c}function lK(a,b,c){var d=0;a:{d=q[a+312>>2];a=q[a+308>>2];d=d-a>>3;if((d&65535)>>>0>b>>>0){if(b>>>0>=d>>>0){break a}a=a+(b<<3)|0;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;a=0}else{a=-5}return a}J(201665,201514,479,201676);G()}function jv(a){var b=0,c=0;b=Ii-400|0;Ii=b;a=Ui(a,0,264);QC(b);Pj(a- -64|0,183301,32);Pj(a+96|0,b+130|0,32);o[a|0]=0;q[a+260>>2]=bi();c=$h(183307)|0;o1(c,a);ba(b+396|0)|0;q[a+192>>2]=q[wF(b+396|0)+36>>2]/60;Ni(c);Ii=b+400|0}function jC(a,b,c,d){b=b-c|0;a:{b:{switch(q[d>>2]){case 13:case 14:b=(b|0)<0?0:b+1|0;Vu(a,d,b);if((b|0)<2){break a}hq(a,b-1|0);return;default:Mm(a,d);break;case 0:break b}}if((b|0)<1){break a}c=q[a+36>>2];hq(a,b);nZ(a,c,b)}}function dp(a,b,c){var d=0,e=0;d=-4;a:{if(c>>>0>1){break a}e=b>>>5|0;b:{if(q[a+4>>2]<<5>>>0<=b>>>0){if(!c){break b}d=rl(a,e+1|0);if(d){break a}}a=q[a+8>>2]+(e<<2)|0;d=q[a>>2];e=a;a=b&31;q[e>>2]=Fza(-2,a)&d|c<>2];b=q[q[a+8>>2]+8>>2];if(q[b+4>>2]){a=0;while(1){d=q[b>>2]+w(a,96)|0;cj(c,q[d+24>>2]);um(q[d+88>>2]);a=a+1|0;if(a>>>0>2]){continue}break}}Dp(c,b+8|0);wB(b);Ni(b);return 0}function $$(a){a=a|0;var b=0;if(!Uj(a,1)){ej(a,-10003);dq(a,0,0,0);Ri(a,2);vj(a,0,0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;ej(a,-3);pj(a,-3);xk(a,-2);Ri(a,-2);Fo(a);return 0}return q[a+8>>2]-q[a+12>>2]>>4}function or(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=-1;a:{if(!(Mi[q[a+8>>2]](b)|0)){break a}f=Mi[q[a+12>>2]](b,c,e+12|0)|0;if(f){break a}c=$i(2196);Ti(c+8|0,b,2188);q[c>>2]=a;q[c+4>>2]=q[e+12>>2];q[d>>2]=c}Ii=e+16|0;return f}function Dwa(a,b,c,d){q[d>>2]=102992;if(a>>>0>=2){if((a|0)==3){q[d>>2]=(c<<4)+98464;return w(c,3)+99040|0}if((b|0)==7){q[d>>2]=(c<<4)+98640;return w(c,3)+99088|0}q[d>>2]=(c<<4)+97984;a=w(c,3)+98944|0}else{a=102992}return a}function yia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[61372],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]>>2]);Ek(q[a+20>>2],q[q[b+12>>2]+12>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function p2(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0);b=Ii-48|0;Ii=b;c=qj(a,1);d=u[c>>2];e=u[c+4>>2];f=u[c+8>>2];v[b+32>>3]=u[c+12>>2];v[b+24>>3]=f;v[b+16>>3]=e;q[b>>2]=134016;v[b+8>>3]=d;Lj(a,134831,b);Ii=b+48|0;return 1}function mE(a,b,c,d,e,f){var g=0;g=Ii-16|0;Ii=g;q[g+12>>2]=d;d=-16e3;a:{if(!q[a>>2]){break a}if(RD(b,g+12|0)){break a}d=q[q[a>>2]+16>>2];if(!d){d=-16128;break a}d=Mi[d|0](q[a+4>>2],b,c,q[g+12>>2],e,f)|0}Ii=g+16|0;return d}function kj(a,b,c){var d=0,e=0,f=0,g=0,h=0;d=Ii-16|0;Ii=d;c=uj(a,b,c);if(!c){g=q[64212];h=d;f=Vi(a,b);e=140583;a:{if((f|0)==-1){break a}e=q[(f<<2)+256832>>2]}q[h+4>>2]=e;q[d>>2]=g;dk(a,b,Lj(a,143231,d))}Ii=d+16|0;return c}function j$(a){var b=0,c=0;b=218160;c=a-1|0;a:{if(!c){break a}while(1){if(!r[b|0]){break a}while(1){a=b;b=b+1|0;if(r[a+1|0]){continue}break}b=a+2|0;c=c-1|0;if(c){continue}break}}return lO(r[b|0]?b:b+1|0,q[q[71281]+20>>2])}function dka(a){a=a|0;var b=0,c=0,d=0;b=-13;c=q[a+4>>2];d=q[a+20>>2];a:{if(!Ep(q[a>>2],q[c+4>>2],d)){break a}c=Eba(q[c>>2]);if(CJ(c,d)){break a}b=q[a+24>>2];q[b+8>>2]=c;q[b+16>>2]=q[a+16>>2]-q[d+4>>2];b=0}Aj(d);return b|0}function L3(a){a=a|0;var b=0,c=0,d=x(0),e=x(0),f=x(0);b=Ii-48|0;Ii=b;c=qj(a,1);d=u[c>>2];e=u[c+4>>2];f=u[c+8>>2];v[b+32>>3]=u[c+12>>2];v[b+24>>3]=f;v[b+16>>3]=e;q[b>>2]=134032;v[b+8>>3]=d;Lj(a,134831,b);Ii=b+48|0;return 1}function oz(a,b){var c=0,d=0,e=0,f=0;a:{if(!a){break a}d=q[a>>2];c=q[d+104>>2];e=q[d+108>>2];if((c|0)==(e|0)){break a}while(1){f=q[q[c>>2]+20>>2];if(f){Mi[f|0](a,b);e=q[d+108>>2]}c=c+4|0;if((e|0)!=(c|0)){continue}break}}}function kY(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;d=oU(fj(a,1),c+8|0);e=v[c+8>>3];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e;q[a+8>>2]=q[a+8>>2]+16;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;Ii=c+16|0;return 2}function Tja(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=KL(q[a>>2],q[a+4>>2],q[a+20>>2],0,b+12|0);a:{if(!d){c=q[b+12>>2];q[q[a+24>>2]+8>>2]=c;c=NH(c);q[q[a+24>>2]+16>>2]=c;break a}q[q[a+24>>2]+8>>2]=0}Ii=b+16|0;return d|0}function Lia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[60724],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]>>2]);Ek(q[a+20>>2],q[q[b+12>>2]+8>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function Jy(a,b,c,d){var e=0,f=0;d=(d|0)==-1?0:d<<23;e=b<<6;f=((c-1|0)/50|0)+1|0;a:{if((c|0)<=25550){fl(a,d|e|f<<14|34,q[q[a+12>>2]+8>>2]);break a}fl(a,d|e|34,q[q[a+12>>2]+8>>2]);fl(a,f,q[q[a+12>>2]+8>>2])}q[a+36>>2]=b+1}function xqa(a){a=a|0;var b=0,c=0;gj(a);b=_i(a,-1,q[71661],18049);Ri(a,-2);c=a;a:{if(q[a+8>>2]-q[a+12>>2]>>4>=1){a=kj(a,1,0);a=It(q[b+4>>2],a,hj(a));b=Li;break a}b=q[b+4>>2];a=q[b+96>>2];b=q[b+100>>2]}lk(c,a,b);return 1}function rG(a,b){var c=0,d=0,e=0,f=0;c=Ii-32|0;Ii=c;q[c+16>>2]=0;e=am(a,3,c+16|0);d=718;a:{b:{if((e|0)<0){break b}q[c>>2]=e&-2049|(b?0:2048);if((am(a,4,c)|0)>-1){break a}d=732}f=im(173656,d,q[240513])}Ii=c+32|0;return f}function bn(a){var b=0,c=0,d=0;b=-20736;a:{if(!a){break a}c=q[a>>2];if(!c){break a}d=q[a+8>>2];if(!d){break a}b=Mi[q[c+16>>2]](q[a+4>>2])|0;if(b){break a}b=q[a+4>>2];a=q[a>>2];b=Mi[q[a+20>>2]](b,d,q[a+12>>2])|0}return b}function U2(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;a=q[a+120>>2];d=nj(b+8|0,a,0,132848,809);Ak(a,133093,252672);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=4294967295;q[a+8>>2]=q[a+8>>2]+16;Si(a,-2,133099);Ri(a,-2);mj(d);Ii=b+32|0}function D$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;e=-24832;if(!(!a|!c)){q[c>>2]=0;if(!b){return 0}while(1){e=0;g=b;h=d;b=b-1|0;d=r[b+a|0]!=0|d;f=((h|0)==(d|0)?0:g)|f;q[c>>2]=f;if(b){continue}break}}return e|0}function mt(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;a:{b:{if(s[a+24>>1]>=c>>>0){e=c<<4;f=q[a>>2];break b}q[d+12>>2]=0;e=c<<4;if(Ro(d+12|0,16,e)){break a}Ni(q[a>>2]);f=q[d+12>>2];q[a>>2]=f}Ti(f,b,e);p[a+24>>1]=c}Ii=d+16|0}function Tta(a){a=a|0;var b=0,c=0;b=jj(a,1);if(!((b|0)==1&r[906092]!=0)){Qi(a,209110,0)}c=jj(a,2);if(c>>>0>=10){return Qi(a,209137,0)|0}b=Mta(b,c);if(!b){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 1}Xi(a,b);return 1}function Rl(a,b,c){var d=0;d=q[b>>2];a:{b:{if((w(d,q[c>>2])|0)<=-1){if((xs(b,c)|0)>=0){c=nn(a,b,c);if(!c){break b}break a}c=nn(a,c,b);if(c){break a}q[a>>2]=0-d;return 0}c=ys(a,b,c);if(c){break a}}q[a>>2]=d;c=0}return c}function L9(a){var b=0,c=0;b=Ii-32|0;Ii=b;c=q[213155];if(c){rk(c);q[213155]=0}c=dl(a,171409);q[213155]=c;a:{if(c){q[b+16>>2]=a;Pi(2,171374,171412,b+16|0);break a}q[b>>2]=a;Pi(5,171374,171431,b)}Ii=b+32|0;return(c|0)!=0}function Ky(a,b,c){var d=0,e=0;d=Rs(b,c);o[b+6|0]=0;if((d|0)==141056){a:{b:{switch(q[c+8>>2]){case 0:Yk(a,142553,0);break a;case 3:break b;default:break a}}e=v[c>>3];if(e==e){break a}Yk(a,142572,0)}d=Wp(a,b,c)}return d}function Ip(a,b){var c=0,d=0;c=q[b+80>>2];d=q[c+3128>>2];b=q[b+140>>2]&32767;if(b>>>0>=q[c+3132>>2]-d>>6>>>0){J(12419,9962,479,9454);G()}b=d+(b<<6)|0;d=q[b+52>>2];c=q[b+48>>2];u[a+8>>2]=u[b+56>>2];q[a>>2]=c;q[a+4>>2]=d}function G2(a){a=a|0;var b=0,c=0,d=0;b=Ck(a,1,q[210436]);c=Ck(a,2,q[210436]);if(!(!b|!c|(u[b>>2]!=u[c>>2]|u[b+4>>2]!=u[c+4>>2]))){d=u[b+8>>2]==u[c+8>>2]}b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d;q[a+8>>2]=q[a+8>>2]+16;return 1}function Fq(a,b,c){var d=0,e=0,f=0;q[c>>2]=0;if(b){e=q[a>>2];while(1){if((r[e|0]-48&255)>>>0>9){return-9216}d=w(d,10);q[c>>2]=d;f=e+1|0;q[a>>2]=f;d=(d+r[e|0]|0)-48|0;q[c>>2]=d;e=f;b=b-1|0;if(b){continue}break}}return 0}function yl(a,b,c){var d=0;d=q[b>>2];a:{b:{if((w(d,q[c>>2])|0)>=1){if((xs(b,c)|0)>=0){c=nn(a,b,c);if(!c){break b}break a}c=nn(a,c,b);if(c){break a}q[a>>2]=0-d;return 0}c=ys(a,b,c);if(c){break a}}q[a>>2]=d;c=0}return c}function vda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[a+8>>2]-q[a+12>>2]|0;c=tj(a,1,b+12|0);lk(a,q[c+560>>2],q[c+564>>2]);if(((d>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,546,202346);G()}Ii=b+16|0;return 1}function rta(a){q[a+16>>2]=0;q[a+20>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+32>>2]=0;q[a+48>>2]=0;o[a+44|0]=1;q[a+24>>2]=0;q[a+28>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+36>>2]=0;q[a+20>>2]=-1;DA(a,2048,2048);return a}function MF(a){var b=0;b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=147257;q[a+8>>2]=q[a+8>>2]+16;jl(a,-1e4);if((Vi(a,-1)|0)!=5){Ri(a,-2);vj(a,0,1);b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=147257;q[a+8>>2]=q[a+8>>2]+16;ej(a,-2);Ij(a,-1e4)}}function Ay(a){q[a>>2]=0;q[a+4>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0}function $t(a,b,c){Ns(a,b);Xi(a,136766);vj(a,0,0);Xi(a,136774);Xi(a,b);Ij(a,-3);b=q[c>>2];if(b){while(1){Xi(a,b);qk(a,q[c+4>>2],0);Ij(a,r[q[c>>2]]==95?-5:-3);b=q[c+8>>2];c=c+8|0;if(b){continue}break}}Ij(a,-3);Ri(a,-2)}function jqa(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=Zm(a,2);a=Bl(a,1);u[b>>2]=u[a>>2];u[b+4>>2]=u[a+4>>2];u[b+8>>2]=u[a+8>>2];a=q[b+4>>2];d=q[b>>2];u[c+24>>2]=u[b+8>>2];q[c+16>>2]=d;q[c+20>>2]=a;Ii=b+16|0;return 0}function iB(a,b){var c=0,d=0,e=0;a:{if(!b){break a}e=(q[b+4>>2]-q[b>>2]|0)/18568|0;if(!e){break a}while(1){d=g9(b,c);if(d){cj(a,d);bI(b,c,0)}d=e9(b,c);if(d){cj(a,d);_H(b,c,0)}c=c+1|0;if((e|0)!=(c|0)){continue}break}}}function Jga(a,b){a=a|0;b=b|0;var c=0;a:{if(a){Cc(q[(b<<2)+92480>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}BK(a+72|0,b,0);return}J(88567,88575,3574,92512);G()}lj(c,92512,3583);J(88669,88575,3583,92512);G()}function Ez(a){var b=0,c=0,d=0,e=0;a:{if(!a){break a}c=q[a>>2];b=q[c+104>>2];d=q[c+108>>2];if((b|0)==(d|0)){break a}while(1){e=q[q[b>>2]+32>>2];if(e){Mi[e|0](a);d=q[c+108>>2]}b=b+4|0;if((d|0)!=(b|0)){continue}break}}}function Cga(a,b){a=a|0;b=b|0;var c=0;a:{if(a){xc(q[(b<<2)+92480>>2]);if(r[q[75054]+156|0]&64){c=K()|0;if(c){break a}}BK(a+72|0,b,1);return}J(88567,88575,3558,92450);G()}lj(c,92450,3567);J(88669,88575,3567,92450);G()}function Az(a){var b=0,c=0,d=0,e=0;a:{if(!a){break a}c=q[a>>2];b=q[c+104>>2];d=q[c+108>>2];if((b|0)==(d|0)){break a}while(1){e=q[q[b>>2]+28>>2];if(e){Mi[e|0](a);d=q[c+108>>2]}b=b+4|0;if((d|0)!=(b|0)){continue}break}}}function wp(a,b,c){var d=0,e=0,f=0;d=q[a+116>>2];a=q[a+120>>2];if((d|0)!=(a|0)){f=(a-d|0)/40|0;a=0;while(1){e=w(a,40)+d|0;if((b|0)==q[e>>2]&q[e+4>>2]==(c|0)){return a}a=a+1|0;if(f>>>0>a>>>0){continue}break}}return-1}function tx(a,b,c,d,e){var f=0;f=xx(a,b,c,d);if(t[e>>2]>2]){Hl(d,e);if(t[d>>2]>=t[c>>2]){return f+1|0}Hl(c,d);if(t[c>>2]>=t[b>>2]){return f+2|0}Hl(b,c);if(t[b>>2]>=t[a>>2]){return f+3|0}Hl(a,b);f=f+4|0}return f}function qda(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);lk(a,q[b+344>>2],q[b+348>>2]);if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(202310,202233,2192,206924);G()}return 1}function Fv(){var a=0;a=$i(48);q[a+16>>2]=0;q[a+20>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+20>>2]=-1;Rv(a,9,16);return a}function vD(a){var b=0;a:{if(q[a+4>>2]-1>>>0<2?!(o[q[a>>2]+184|0]&1):0){break a}b:{b=q[a+68>>2];if(b){b=s[b+592>>1];if(b){break b}}b=s[a+228>>1];break a}a=s[a+228>>1];if(!a){break a}b=a>>>0>>0?a:b}return b&65535}function rra(a){var b=0;b=$i(48);q[b>>2]=0;q[b+4>>2]=0;q[b+32>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b+36>>2]=q[a>>2];q[b+40>>2]=q[a+4>>2];q[b+44>>2]=q[a+8>>2];return b}function pV(a,b,c){var d=0;d=q[a>>2];if((b-d|0)<1){return-8928}if((r[d|0]|128)!=130){return-8930}q[a>>2]=d+1;q[c>>2]=r[d|0];b=Wq(a,b,c+4|0);if(b){return b-8832|0}q[c+8>>2]=q[a>>2];q[a>>2]=q[a>>2]+q[c+4>>2];return 0}function lha(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;d=nj(b+8|0,a,0,65882,814);a:{if((Vi(a,1)|0)!=7){break a}c=Ck(a,1,q[74078]);if(!c){break a}if(!Vo(q[c>>2])){break a}Rj(a,-1e4,q[c+44>>2])}mj(d);Ii=b+32|0;return 0}function efa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a:{if(a){jc(b|0,c|0,d|0,e|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}return}J(88567,88575,3686,92720);G()}lj(a,92720,3688);J(88669,88575,3688,92720);G()}function eP(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;b=hk(a,b,e+12|0,48);a:{if(b){b=b-9216|0;break a}f=q[a>>2]+q[e+12>>2]|0;b=$D(a,f,c);if(b){break a}b=$D(a,f,d);if(b){break a}b=q[a>>2]==(f|0)?0:-9318}Ii=e+16|0;return b}function Uea(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;a:{if(a){Zb(b|0,c|0,d|0,e|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}return}J(88567,88575,2261,92432);G()}lj(a,92432,2264);J(88669,88575,2264,92432);G()}function Rta(a){a=a|0;var b=0,c=0;if(_M(957504)){b=1}else{b=_M(956480)}if(b){c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;Mn(956480);Mn(957504);return 1}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 1}function Qfa(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=s[b+192>>1];if(e){while(1){c=w(d,24)+b|0;kk(a,c,8);kk(a,c+8|0,2);kk(a,c+12|0,2);kk(a,c+14|0,2);kk(a,c+16|0,4);kk(a,c+20|0,1);d=d+1|0;if((e|0)!=(d|0)){continue}break}}}function Pga(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;a:{b:{if(!a){break b}q[b+12>>2]=a;ab(1,b+12|0);if(!(r[q[75054]+156|0]&64)){break b}a=K()|0;if(a){break a}}Ii=b+16|0;return}lj(a,91722,1613);J(88669,88575,1613,91722);G()}function OM(a,b,c){var d=0,e=0,f=0,g=0;d=q[b+40>>2]+15&-16;e=q[c+16>>2];f=d+e|0;q[b+40>>2]=f;g=r[b+44|0];if(!(g|t[b+36>>2]>=f>>>0)){J(24076,24107,42,24138);G()}o[a+12|0]=(g|0)!=0;q[a+4>>2]=d;q[a>>2]=c;q[a+8>>2]=d+e}function Lga(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;a:{b:{if(!a){break b}q[b+12>>2]=a;ab(1,b+12|0);if(!(r[q[75054]+156|0]&64)){break b}a=K()|0;if(a){break a}}Ii=b+16|0;return}lj(a,91607,1549);J(88669,88575,1549,91607);G()}function Dv(a,b,c,d){var e=0;e=q[a+2060>>2];a:{if((e|0)==q[a+2064>>2]){Pi(4,114609,114616,0);a=255;break a}q[a+2060>>2]=e+12;q[e+8>>2]=d;q[e+4>>2]=c;q[e>>2]=b;a=((q[a+2060>>2]-q[a+2056>>2]|0)/12|0)-1|0}return a&255}function tl(a,b){var c=0;c=Ii-32|0;Ii=c;a:{if((b|0)<=256){a=q[a+52>>2];if((b|0)==127|b>>>0<32){q[c+16>>2]=b;a=oj(a,141555,c+16|0);break a}q[c>>2]=b;a=oj(a,141564,c);break a}a=q[(b<<2)+255676>>2]}Ii=c+32|0;return a}function jX(a,b,c,d,e,f){var g=0;g=Ii-32|0;Ii=g;q[g+24>>2]=0;q[g+16>>2]=1;q[g+20>>2]=0;q[g+8>>2]=0;q[g>>2]=1;q[g+4>>2]=0;a=Q0(a,g+16|0,g,a+124|0,c,d,b);if(!a){a=O0(g+16|0,g,e,f)}ij(g+16|0);ij(g);Ii=g+32|0;return a}function Wr(a,b){var c=0,d=0,e=0;c=a*a;d=c*a;e=d*(c*.13339200271297674+.3333313950307914)+a;a=c*c;a=e+d*a*(c*.024528318116654728+.05338123784456704+a*(c*.009465647849436732+.002974357433599673));return x(b?-1/a:a)}function W8(a){q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=1065353216;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=4;q[a+20>>2]=1065353216;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=-1054867456;o[a+48|0]=r[a+48|0]&254;return a}function Qla(a){a=a|0;var b=0,c=0,d=0;c=q[a+8>>2]-q[a+12>>2]|0;d=!(Nb()|0);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=d^1;q[a+8>>2]=q[a+8>>2]+16;if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(82265,82047,299,82334);G()}return 1}function OF(a){var b=0,c=0,d=0;Xi(a,137238);ik(a,-2);b=-1;a:{if(!Vi(a,-1)){break a}ej(a,-2);Rk(a,1,1);if(!Oj(a,-1)){break a}c=Mj(a,-1);b=c>=0;if(y(c)<2147483648){d=~~c}else{d=-2147483648}b=b?d:-1}Ri(a,-2);return b}function EZ(a,b){var c=0,d=0;d=q[a+40>>2];a:{if(b+1>>>0<=178956970){c=Cj(a,d,w(q[a+48>>2],24),w(b,24));break a}c=mk(a)}q[a+48>>2]=b;q[a+40>>2]=c;q[a+36>>2]=(w(b,24)+c|0)-24;q[a+20>>2]=w((q[a+20>>2]-d|0)/24|0,24)+c}function loa(a){a=a|0;var b=0,c=0;b=q[a>>2];c=q[b+16>>2];a=q[q[a+4>>2]>>2];if(a>>>0>2]-c>>3>>>0){a=q[(a<<3)+c>>2];c=q[b+4>>2];b=q[b>>2];if(a>>>0>8>>>0){return b+(a<<8)|0}}J(57189,57106,479,57200);G()}function d8(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,115465,550);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+328>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function c8(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,115465,562);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+324>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function _da(a){a=a|0;var b=0,c=0;b=Ii-32|0;Ii=b;c=qj(a,1);q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=0;q[b+4>>2]=0;Mi[q[q[c+12>>2]+4>>2]](c,b);km(a,b);Ii=b+32|0;return 1}function Vj(a){var b=0,c=0;q[a+8>>2]=q[a+4>>2];if(q[a+32>>2]!=287){b=a+32|0;c=q[b+4>>2];q[a+16>>2]=q[b>>2];q[a+20>>2]=c;c=q[b+12>>2];q[a+24>>2]=q[b+8>>2];q[a+28>>2]=c;q[a+32>>2]=287;return}q[a+16>>2]=xF(a,a+24|0)}function KW(a,b,c){var d=0;a:{d=q[a>>2];if((d|0)<0){b=-69;break a}b=hT(d,b,c);if((b|0)>-1){break a}b=-26880;if(VD(a)){break a}b=-80;if(q[240513]==64|q[240513]==15){break a}return q[240513]==27?-26880:-76}return b}function Ev(a,b,c){var d=0;d=q[a+2060>>2];a:{if((d|0)==q[a+2064>>2]){Pi(4,114609,114616,0);a=255;break a}q[a+2060>>2]=d+12;q[d+8>>2]=c;q[d+4>>2]=0;q[d>>2]=b;a=((q[a+2060>>2]-q[a+2056>>2]|0)/12|0)-1|0}return a&255}function o2(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0),f=x(0);b=qj(a,1);c=u[b>>2];d=u[b+4>>2];e=u[b+8>>2];f=u[b+12>>2];b=yj(a,16);u[b+12>>2]=-f;u[b+8>>2]=-e;u[b+4>>2]=-d;u[b>>2]=-c;Zi(a,-1e4,134016);xj(a,-2);return 1}function aea(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,202233,271);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+8>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function _N(a,b,c,d,e,f,g){a:{b:{if(a-13>>>0<4){a=0;if(w(f?f:d,e?e:c)>>>0<=b>>>0){break b}break a}if((a|0)==17){a=0;if(w(d+3>>>2|0,c+7>>>3|0)>>>0<=b>>>0){break b}break a}a=0;if(b>>>0>>0){break a}}a=1}return a}function Xi(a,b){var c=0,d=0;a:{if(!b){b=q[a+8>>2];q[b+8>>2]=0;a=a+8|0;break a}d=hj(b);c=q[a+16>>2];if(t[c+68>>2]>=t[c+64>>2]){om(a)}c=q[a+8>>2];b=Yj(a,b,d);q[c+8>>2]=4;q[c>>2]=b;b=q[a+8>>2];a=a+8|0}q[a>>2]=b+16}function Oqa(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,15159,354);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+20>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function Nqa(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,15159,366);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+16>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function $da(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-32|0;Ii=c;e=nj(c+8|0,a,1,202233,283);b=qj(a,1);d=-2;a:{if(!b){break a}d=+q[b+4>>2]}b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=d;q[a+8>>2]=q[a+8>>2]+16;mj(e);Ii=c+32|0;return 1}function vua(a,b,c){var d=0;a:{b:{if((b|0)==8){b=Yi(c);break b}d=28;if(b&3){break a}if((Dza(b>>>2|0)|0)!=1){break a}d=48;if(-64-b>>>0>>0){break a}b=Y_(b>>>0>16?b:16,c)}if(!b){return 48}q[a>>2]=b;d=0}return d}function pja(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];gB(b,a);if(a){a:{if(o[a+40|0]&1){break a}b=q[a+28>>2];if(!b){break a}Ni(b)}b:{if(o[a+24|0]&1){break b}b=q[a+12>>2];if(!b){break b}Ni(b)}Ni(a)}return 0}function lua(a,b,c){var d=0,e=0;d=a&65535;e=q[210908];if(d>>>0>=t[e+8>>2]){J(154349,154364,144,154402);G()}q[c>>2]=q[(q[(s[q[e+4>>2]+(d<<1)>>1]==(a>>>16|0)?q[q[e>>2]+(d<<2)>>2]:0)+4>>2]+(b<<4)|0)+8>>2];return 0}function Qca(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;tj(a,1,b+12|0);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);c=eea(c,q[b+12>>2]);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function OE(a,b,c,d){var e=0;e=-13;a:{b=KE(b,d);if(!b|q[b+24>>2]!=16){break a}if(a){e=q[a+60>>2];if(e){Mi[q[q[q[a>>2]+28>>2]+32>>2]](e)}Mi[q[65677]](a,0,64)|0}e=Ku(a,b);if(e){break a}return Lu(a,c,d,1)}return e}function Mma(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=q[a+192>>2];if(!g){g=sq();q[a+192>>2]=g}h=q[a+200>>2];if(!h){h=q[q[a+188>>2]+8>>2]}Fr(g,q[h>>2],b,c,d,e,f);p[a+234>>1]=s[a+234>>1]|256}function XX(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+8>>2]=0;q[d>>2]=0;q[d+4>>2]=0;a=By(a,b,c,d);a:{if(a){break a}a=-104;b:{switch(q[d>>2]){case 0:case 5:break b;default:break a}}a=q[d+4>>2]?-104:0}Ii=d+16|0;return a}function Jia(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=TL(q[a+8>>2],q[a+4>>2],q[a+20>>2],0,0,0,0,0,b+8|0);if(!d){c=$i(8);e=q[b+12>>2];q[c>>2]=q[b+8>>2];q[c+4>>2]=e;q[q[a+24>>2]+8>>2]=c}Ii=b+16|0;return d|0}function Dla(a,b,c,d,e,f,g){a=a|0;b=b|0;c=x(c);d=d|0;e=x(e);f=x(f);g=g|0;var h=0;h=Ii-32|0;Ii=h;_z(a,b,c,d,e,f,h+8|0);u[g>>2]=u[h+8>>2];u[g+4>>2]=u[h+12>>2];u[g+8>>2]=u[h+16>>2];u[g+12>>2]=u[h+20>>2];Ii=h+32|0}function A4(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=x(d);e=e|0;f=f|0;a=Ii-16|0;Ii=a;a:{if(!Lo(f)){break a}if((b|0)!=2){u[a+12>>2]=d;q[a+8>>2]=c;bt(f,890,a+8|0);if((b|0)==1){break a}}if(!Lo(f)){break a}no(f)}Ii=a+16|0}function sca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);d=fj(a,2);a=c;c=a;e=q[a+412>>2]&-50331649;if(y(d)<2147483648){a=~~d}else{a=-2147483648}q[c+412>>2]=e|a<<24&50331648;Ii=b+16|0;return 0}function boa(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=q[a+220>>2];if(!g){g=sq();q[a+220>>2]=g}h=q[a+224>>2];if(!h){h=q[q[a+216>>2]+4>>2]}Fr(g,q[h>>2],b,c,d,e,f);p[a+246>>1]=s[a+246>>1]|8}function Kn(a){var b=0;if(a){if(q[a+76>>2]<=-1){return tC(a)}return tC(a)}if(q[71200]){b=Kn(q[71200])}a=q[240502];if(a){while(1){if(t[a+20>>2]>t[a+28>>2]){b=tC(a)|b}a=q[a+56>>2];if(a){continue}break}}return b}function Gia(a){a=a|0;var b=0,c=0,d=0;c=Ii-16|0;Ii=c;q[c+8>>2]=0;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[61786],c+4|0)){d=q[c+4>>2];b=$i(124);Ui(b+4|0,0,120);q[b>>2]=d;q[q[a+24>>2]>>2]=b;b=0}Ii=c+16|0;return b|0}function zoa(a,b){a=a|0;b=b|0;a:{if((q[b+8>>2]&-2)==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=210;return}J(43311,41161,2790,43429);G()}J(43451,41161,2791,43429);G()}function gaa(){var a=0,b=0,c=0;a=Ii-16|0;Ii=a;c=q[213144];Gj(c);a:{b=q[213143];if(!b){q[a+8>>2]=32;q[a+12>>2]=10;if(cN(a+8|0)){break a}b=q[213143]}Bj(c);Zta(b);Ii=a+16|0;return}J(168179,168212,83,168240);G()}function _t(a,b,c,d){var e=0,f=0;if(d>>>0<10){if(d){e=q[b>>2];a=(e>>3)+a|0;f=c;c=e&7;e=f<>>0>>0){o[a+1|0]=r[a+1|0]|e>>>8}q[b>>2]=q[b>>2]+d}return}J(107220,96899,11733,107234);G()}function Sy(a){var b=0,c=0,d=0;a:{if(!a){break a}b=q[a+28>>2];if(!b){break a}c=q[a+36>>2];if(!c){break a}d=q[b+52>>2];if(d){Mi[c|0](q[a+40>>2],d);c=q[a+36>>2];b=q[a+28>>2]}Mi[c|0](q[a+40>>2],b);q[a+28>>2]=0}}function Nva(a){a=a|0;var b=0,c=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b^-1;q[a+8>>2]=q[a+8>>2]+16;return 1}function L6(a){q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+24>>2]=805306368;q[a+20>>2]=805306368}function osa(a,b){var c=0,d=0;c=q[a>>2];a=q[a+4>>2];if((c|0)!=(a|0)){d=a-c>>3;a=0;while(1){if(q[(a<<3)+c>>2]==(b|0)){return(q[43262]&s[((a<<3)+c|0)+6>>1])!=0}a=a+1|0;if(d>>>0>a>>>0){continue}break}}return 0}function dX(a,b,c){var d=0;d=-20352;a:{if(c>>>0<3){break a}c=q[b>>2];q[b>>2]=c+1;if(r[c|0]!=3){break a}q[b>>2]=c+2;d=r[c+1|0];q[b>>2]=c+3;b=gX(r[c+2|0]|d<<8);if(!b){return-20096}q[a>>2]=q[b>>2];d=0}return d}function Zfa(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;fa(q[a>>2],35718,b+12|0);a:{if(!(r[q[75054]+156|0]&64)){break a}a=K()|0;if(!a){break a}lj(a,92353,2230);J(88669,88575,2230,92353);G()}Ii=b+16|0;return q[b+12>>2]}function Kna(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=q[a+148>>2];if(!g){g=sq();q[a+148>>2]=g}h=q[a+192>>2];if(!h){h=q[q[a+152>>2]+8>>2]}Fr(g,q[h>>2],b,c,d,e,f);o[a+204|0]=r[a+204|0]|4}function Ika(a){a=a|0;var b=0;a:{if(q[a+8>>2]!=1){break a}b=q[a+16>>2];if((b|0)==q[a+20>>2]){break a}while(1){po(q[a>>2],q[(q[a+12>>2]+w(q[b>>2],48)|0)+16>>2]);b=b+4|0;if((b|0)!=q[a+20>>2]){continue}break}}}function Hia(a){a=a|0;var b=0,c=0;b=q[q[a+12>>2]+8>>2];if(Mi[q[75024]](q[b>>2],q[b+4>>2])&1){a=-17}else{c=q[a+8>>2];Aj(q[c>>2]);rL(c);b=Mi[q[75013]](q[b>>2],q[b+4>>2])|0;q[q[a+12>>2]+16>>2]=b;a=0}return a|0}function Fva(a){a=a|0;var b=0,c=0;Oza(+(Mj(a,1)+6755399441055744));Lza(1)|0;b=Lza(0)|0;a:{if(b){break a}if(Oj(a,1)){break a}Nk(a,1,136658)}c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Dea(a,b,c){var d=0,e=0,f=0;d=Ii-16|0;Ii=d;o[d+12|0]=0;a:{while(1){q[d+8>>2]=w(e,960)+b;f=Ar(a,4,-2,d+8|0);if(f){break a}o[c+e|0]=r[d+12|0];e=e+1|0;if((e|0)!=1){continue}break}f=0}Ii=d+16|0;return f}function _oa(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=q[a+8>>2];e=q[a+12>>2];c=q[q[a+16>>2]>>2];q[c>>2]=q[a+4>>2];o[c+24|0]=r[c+24|0]&249|4;if(!vL(e,d,c,1)){q[b>>2]=38116;Pi(4,37377,38113,b)}Ii=b+16|0}function Vpa(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;d=nj(b+8|0,a,1,68606,108);mo(a,68198,0,b+4|0,0);e=Bpa(q[b+4>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;mj(d);Ii=b+32|0;return 1}function xt(a){var b=0;b=1;a:{if(a>>>0<2){break a}b=2;if((a&-2)==2){break a}b=a-4|0;if(!(b>>>0>=12|!(3871>>>b&1))){return q[(b<<2)+88356>>2]}b=0;if(a-9>>>0<3){break a}J(87834,87638,370,87866);G()}return b}function wca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);d=fj(a,2);a=c;c=a;e=q[a+412>>2]&-196609;if(y(d)<2147483648){a=~~d}else{a=-2147483648}q[c+412>>2]=e|a<<16&196608;Ii=b+16|0;return 0}function s_(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=az(a,kj(a,1,0),144488);a:{if(!c){break a}if(!Hy(a,c)){break a}d=uj(a,1,0);q[b+8>>2]=uj(a,-1,0);q[b+4>>2]=c;q[b>>2]=d;Qi(a,144995,b)}Ii=b+16|0;return 1}function qsa(a){a=a|0;var b=0;a=q[a+8>>2];b=q[a+8>>2]-q[a+12>>2]>>4;Zi(a,-10002,5266);if(!Vi(a,-1)){Ri(a,-2);Ak(a,5266,226496)}Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){J(5275,5296,53,5321);G()}return 0}function lqa(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=fj(a,1);d=fj(a,2);q[b+24>>2]=1065353216;u[b+20>>2]=d;u[b+16>>2]=c;q[b+8>>2]=-1082130432;q[b>>2]=0;q[b+4>>2]=0;Al(a,b+16|0);Al(a,b);Ii=b+32|0;return 2}function ema(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;d=nj(b+8|0,a,1,70569,86);mo(a,70062,0,b+4|0,0);e=Qoa(q[b+4>>2]);c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=e|0;q[a+8>>2]=q[a+8>>2]+16;mj(d);Ii=b+32|0;return 1}function Qxa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=Ii-16|0;Ii=e;a=qb(q[a+60>>2],b|0,c|0,d&255,e+8|0)|0;b=0;a:{if(!a){break a}q[240513]=a;b=-1}a=b;Ii=e+16|0;Li=a?-1:q[e+12>>2];return(a?-1:q[e+8>>2])|0}function xm(a,b,c,d,e){var f=0;f=Ii-256|0;Ii=f;if(!(e&73728|(c|0)<=(d|0))){c=c-d|0;d=c>>>0<256;Ui(f,b&255,d?c:256);if(!d){while(1){_l(a,f,256);c=c-256|0;if(c>>>0>255){continue}break}}_l(a,f,c)}Ii=f+256|0}function eza(){q[71583]=0;q[71584]=0;q[71582]=285704;q[71580]=0;q[71578]=12641;q[71577]=12624;q[71576]=0;q[71574]=0;q[71572]=0;q[71570]=0;q[71568]=1;q[71566]=0;q[71567]=3;q[71585]=0;q[71586]=0;q[71587]=0}function Cn(a,b,c){var d=0,e=0,f=0,g=0;q[a+112>>2]=b;q[a+116>>2]=c;d=q[a+8>>2];g=q[a+4>>2];e=d-g|0;f=e>>31;q[a+120>>2]=e;q[a+124>>2]=f;q[a+104>>2]=b|c?((c|0)<(f|0)?1:(c|0)<=(f|0)?b>>>0>>0:0)?b+g|0:d:d}function vna(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=240;return}J(51182,50797,1312,51238);G()}J(51262,50797,1313,51238);G()}function ipa(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=174;return}J(38228,37552,1834,38284);G()}J(38312,37552,1835,38284);G()}function fia(a){var b=0,c=0;a:{a=q[a>>2];if(!a){break a}c=q[a+8>>2]-q[a+12>>2]>>4;et(a,q[74444]);b=qj(a,-1);Ri(a,-2);if(b){Ni(b)}if(q[a+8>>2]-q[a+12>>2]>>4==(c|0)){break a}J(73953,73366,1364,73974);G()}}function eR(a,b,c){var d=0;d=q[a+204>>2];q[c>>2]=0;d=d+16384|0;if(!(!(q[q[a>>2]+184>>2]&448)|d>>>0>>0|d-b>>>0<5)){o[b|0]=0;o[b+1|0]=1;o[b+2|0]=0;o[b+3|0]=1;o[b+4|0]=q[q[a>>2]+184>>2]>>>6&7;q[c>>2]=5}}function Rma(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=245;return}J(53070,53126,1678,53168);G()}J(53193,53126,1679,53168);G()}function Ri(a,b){var c=0;if((b|0)>=0){c=q[a+8>>2];b=q[a+12>>2]+(b<<4)|0;if(c>>>0>>0){while(1){q[c+8>>2]=0;c=c+16|0;if(b>>>0>c>>>0){continue}break}}q[a+8>>2]=b;return}q[a+8>>2]=(q[a+8>>2]+(b<<4)|0)+16}function Ona(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=217;return}J(44866,44699,1139,44922);G()}J(44945,44699,1140,44922);G()}function Mp(a,b,c,d){var e=0,f=0,g=0;if(d){e=q[b>>2];while(1){f=q[b>>2];g=(f>>3)+a|0;o[g|0]=r[g|0]|c<<(f&7);e=8-(e&7)|0;f=(d|0)<(e|0)?d:e;e=f+q[b>>2]|0;q[b>>2]=e;c=c>>>f|0;d=d-f|0;if(d){continue}break}}}function Hk(a){var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;d=-1;c=Mi[q[a+8>>2]](q[a+16>>2],q[a+12>>2],b+12|0)|0;a:{if(!c){break a}e=q[b+12>>2];if(!e){break a}q[a+4>>2]=c+1;q[a>>2]=e-1;d=r[c|0]}Ii=b+16|0;return d}function Cma(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=249;return}J(55381,54775,1017,55437);G()}J(55464,54775,1018,55437);G()}function ym(a){var b=0,c=0;a:{if(!a){break a}b=q[a>>2];if(!b){break a}c=q[a+4>>2];if(c){Mi[q[b+36>>2]](c)}b=q[a+8>>2];if(b){Mi[q[65677]](b,0,q[q[a>>2]+12>>2]<<1)|0;Ni(q[a+8>>2])}Mi[q[65677]](a,0,12)|0}}function wC(a,b,c,d){var e=0;e=q[a>>2];a:{if((e|0)==(b|0)){break a}q[c>>2]=r[e|0];b=hk(a,b,c+4|0,d|160);if((b|0)==-98){break a}if(b){return b-8576|0}q[c+8>>2]=q[a>>2];q[a>>2]=q[a>>2]+q[c+4>>2]}return 0}function pza(){q[71419]=0;q[71420]=0;q[71418]=285704;q[71416]=0;q[71414]=5825;q[71413]=5805;q[71412]=0;q[71410]=0;q[71408]=0;q[71406]=0;q[71404]=1;q[71402]=0;q[71403]=3;q[71421]=0;q[71422]=0;q[71423]=0}function fs(a,b){var c=0,d=0,e=0;c=q[a+192>>2];d=q[q[a>>2]+184>>2]&2;e=c+(d?13:5)|0;q[a+200>>2]=e;q[a+196>>2]=(d?11:3)+c;q[a+188>>2]=(d?3:-8)+c;q[a+204>>2]=!b|q[a+20>>2]<2?e:(q[b+4>>2]+e|0)-q[b+8>>2]|0}function Ura(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=31;return}J(13274,12749,1130,13330);G()}J(13355,12749,1131,13330);G()}function N6(a){var b=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;oq(q[a+5168>>2],q[a+5172>>2],123,a);q[71976]=q[71976]+q[q[a>>2]+24>>2];a=q[q[a>>2]+24>>2];q[b+8>>2]=a;q[b+12>>2]=0;q[b+16>>2]=a;q[b+20>>2]=0;Ii=b+32|0}function Mba(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,202233,3081);tj(a,1,b+4|0);d=Uj(a,2);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);FJ(e,q[b+4>>2],(d|0)!=0);mj(c);Ii=b+32|0;return 0}function KE(a,b){var c=0,d=0,e=0;d=265712;c=q[66429];a:{if(c){while(1){e=d;if(q[c+4>>2]==1?!(q[q[c+28>>2]>>2]!=(a|0)|q[c+8>>2]!=(b|0)):0){break a}d=e+8|0;c=q[e+12>>2];if(c){continue}break}}c=0}return c}function AE(){if(!r[843640]){q[210922]=10;q[210923]=0;q[210920]=11;q[210921]=1;q[210918]=6;q[210919]=2;q[210916]=3;q[210917]=12;q[210914]=4;q[210915]=7;q[210912]=5;q[210913]=8;o[843640]=1}return 843648}function uza(a){a=a|0;var b=0;if(r[284368]){q[218265]=57005;q[218266]=0;b=a;a=hj(a);Dx(873324,b,a>>>0<32767?a:32767);b=q[239664];if(b){a=hj(873324);Mi[b|0](q[239665],a+873324|0,32767-a|0)}Hta();Ita()}}function qP(a,b){var c=0;if(!(cx(a+80|0,a+112|0)|!b)){c=q[a+8>>2];while(1){a:{if(q[b+8>>2]!=(c|0)){break a}if(Ej(q[a+12>>2],q[b+12>>2],c)){break a}return 0}b=q[b+340>>2];if(b){continue}break}}return-1}function k1(a){var b=0,c=0;b=Ii+ -64|0;Ii=b;jb(30)|0;c=$i(12);q[c+8>>2]=a;q[c+4>>2]=210076;q[c>>2]=1576;if(!(nb(b+12|0,b+16|0,1417,c|0)|0)){Ii=b- -64|0;return q[b+12>>2]}J(183313,183322,76,183351);G()}function goa(a,b){a=a|0;b=b|0;a:{if(q[b+8>>2]==2){if(!q[b+20>>2]){break a}q[a+1048>>2]=0;q[a+1052>>2]=0;q[a+1040>>2]=b;q[a+1056>>2]=252;return}J(56613,56669,798,56710);G()}J(56734,56669,799,56710);G()}function eka(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;e=q[q[a+32>>2]+8>>2];c=q[a+4>>2];o[b+12|0]=r[c+17|0];d=-13;if(OL(c,q[a+20>>2],q[a+24>>2],b+8|0)){a=q[b+8>>2];q[e>>2]=a;d=0}Ii=b+16|0;return d|0}function R6(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-32|0;Ii=c;d=q[b+4>>2];q[c+8>>2]=q[b>>2];q[c+12>>2]=d;q[c+16>>2]=q[b+8>>2];q[c+20>>2]=q[b+12>>2];o[c+24|0]=r[b+16|0];Mi[q[a>>2]](q[a+4>>2],c+8|0);Ii=c+32|0}function Hya(){q[79156]=0;q[79157]=0;q[79154]=0;q[79152]=114524;q[79151]=114512;q[79150]=0;q[79148]=0;q[79146]=0;q[79144]=0;q[79142]=0;q[79140]=0;q[79141]=0;q[79158]=0;q[79159]=0;q[79160]=0;q[79161]=0}function q5(a){a=a|0;var b=0;b=Ii-1040|0;Ii=b;if(uk(a,1)){vj(a,0,2);ej(a,1);Si(a,-2,124229);q[b+8>>2]=1024;o[b|0]=1;q[b+4>>2]=b+16;KG(a,124343,827,b);Xi(a,b+16|0);Si(a,-2,124235)}Ii=b+1040|0;return 1}function pP(a,b,c,d,e,f,g){q[d>>2]=1;zC(a,b,c,e,1,f,g);a:{if(q[c>>2]){break a}while(1){b:{b=q[d>>2];q[d>>2]=0;if(!b){break b}zC(a,q[a+340>>2],c,e,0,f,g);if(!q[c>>2]){continue}break a}break}q[e>>2]=0}}function nja(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-2;if(!Qj(q[a+20>>2],q[a+24>>2],239640,c+12|0)){b=q[q[a+32>>2]+8>>2];gB(q[a>>2],b);q[b>>2]=q[c+12>>2];b=FL(q[a+4>>2],q[a>>2],b)}Ii=c+16|0;return b|0}function mD(a){var b=0,c=0;b=Kx(a);if(!b){c=q[q[a>>2]+184>>2];a:{if(!(c&2)|q[a+8>>2]!=3){break a}b=q[a+68>>2];if(c&1){q[b+472>>2]=1;break a}q[b+476>>2]=1}q[a+4>>2]=0;q[a+8>>2]=1;return ps(a)}return b}function Ms(a,b){var c=0;c=Ii-112|0;Ii=c;a:{b:{if(!sl(a,b,c+8|0)){break b}Hn(a,143251,c+8|0);b=q[c+28>>2];if((b|0)<1){break b}q[c+4>>2]=b;q[c>>2]=c+44;Lj(a,143254,c);break a}bj(a,143262,0)}Ii=c+112|0}function $ya(){q[71362]=1;q[71360]=1958639865;q[71361]=-771645978;q[71359]=5221;q[71358]=1;q[71365]=0;o[285456]=0;q[71363]=q[71356];q[71365]=q[71906];q[71906]=285432;q[56621]=q[71906];q[71906]=226456}function vca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,202233,4379);tj(a,1,b+4|0);d=fj(a,2);gj(a);e=_i(a,-1,q[213927],204267);Ri(a,-2);nba(e,q[b+4>>2],x(d));mj(c);Ii=b+32|0;return 0}function ura(a){a=a|0;var b=0,c=0;b=q[a+12>>2];c=q[b+8>>2]-q[b+12>>2]>>4;Rj(b,-1e4,q[a+16>>2]);q[a+16>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;if(q[b+8>>2]-q[b+12>>2]>>4!=(c|0)){J(15852,15159,1628,15873);G()}}function t3(a){a=a|0;var b=0,c=0;b=Ii-4128|0;Ii=b;c=b+16|0;if(Pj(c,ci()|0,4098)>>>0>=4098){o[c|0]=0;c=-21}else{c=0}a:{if(c){q[b>>2]=c;a=Qi(a,130450,b);break a}Xi(a,b+16|0);a=1}Ii=b+4128|0;return a|0}function q1(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=q[a+4>>2];e=q[a+12>>2];if(d>>>0>>0){J(211547,211484,231,211597);G()}f=c;c=d-e|0;b=b>>>0>>0?b:c;q[f>>2]=b;q[a+12>>2]=b+q[a+12>>2];return 0}function p3(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(130179,129431,1116,130646);G()}return 1}function lj(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;g=d;f=a-1280|0;e=90327;a:{if(f>>>0>2){break a}e=q[(f<<2)+246128>>2]}q[g+12>>2]=e;q[d+8>>2]=a;q[d+4>>2]=c;q[d>>2]=b;Pi(4,88531,90400,d);Ii=d+16|0}function io(a,b,c,d,e){var f=0;f=Ii-32|0;Ii=f;q[f+28>>2]=0;q[f+24>>2]=e;q[f+20>>2]=d;q[f+16>>2]=c;q[f+12>>2]=b;q[f+8>>2]=a;a=S(15,f+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=f+32|0;return a}function Zda(a){a=a|0;var b=0,c=0;b=qj(a,1);if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=q[b+12>>2]!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function Xx(a,b,c,d,e){var f=0;f=Ii-32|0;Ii=f;q[f+28>>2]=e;q[f+24>>2]=d;q[f+20>>2]=0;q[f+16>>2]=c;q[f+12>>2]=b;q[f+8>>2]=a;a=S(12,f+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=f+32|0;return a}function Uda(a){a=a|0;var b=0,c=0;b=qj(a,1);if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=q[b+24>>2]!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function Tx(a,b,c,d,e){var f=0;f=Ii-32|0;Ii=f;q[f+28>>2]=e;q[f+24>>2]=d;q[f+20>>2]=0;q[f+16>>2]=c;q[f+12>>2]=b;q[f+8>>2]=a;a=S(11,f+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=f+32|0;return a}function Ol(a,b,c,d,e){var f=0;f=Ii-32|0;Ii=f;q[f+28>>2]=0;q[f+24>>2]=e;q[f+20>>2]=d;q[f+16>>2]=c;q[f+12>>2]=b;q[f+8>>2]=a;a=S(14,f+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=f+32|0;return a}function Kda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;d=nj(b+8|0,a,0,202233,671);c=tj(a,1,b+4|0);a:{if(r[c+415|0]&16){e=Qi(a,202376,0);break a}p[c+588>>1]=s[c+588>>1]|1}mj(d);Ii=b+32|0;return e|0}function Iea(a){var b=0,c=0;q[a+380>>2]=-1;q[a+36>>2]=q[a+32>>2];p[a+26>>1]=0;if(s[a+24>>1]){c=q[a+20>>2];while(1){p[(b<<1)+c>>1]=b;b=b+1|0;if(b>>>0>1]){continue}break}}q[a+52>>2]=q[a+48>>2]}function Fya(){q[71988]=0;q[71989]=0;q[71986]=0;q[71984]=24589;q[71983]=24575;q[71982]=0;q[71980]=0;q[71978]=0;q[71976]=0;q[71974]=1;q[71972]=0;q[71973]=3;q[71990]=0;q[71991]=0;q[71992]=0;q[71993]=0}function Dqa(a){a=a|0;var b=0,c=0;b=qj(a,1);if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=q[b+44>>2]!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function Ata(a,b){var c=0,d=0;c=q[a+8>>2];d=q[a+4>>2]-c|0;if((d|0)>=4){o[b|0]=r[c|0];o[b+1|0]=r[q[a+8>>2]+1|0];o[b+2|0]=r[q[a+8>>2]+2|0];o[b+3|0]=r[q[a+8>>2]+3|0];q[a+8>>2]=q[a+8>>2]+4}return(d|0)>3}function $7(a){a=a|0;var b=0,c=0;b=qj(a,1);if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=q[b+304>>2]!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function l1(a,b){var c=0,d=0;c=Ii-96|0;Ii=c;d=-2;if(!es(a,c+8|0)){a=q[c+52>>2];q[b>>2]=q[c+48>>2];q[b+4>>2]=a;q[b+8>>2]=q[c+20>>2];q[b+12>>2]=q[c+64>>2];q[b+16>>2]=q[c+72>>2];d=0}Ii=c+96|0;return d}function Uua(a){a=a|0;var b=0,c=0;a:{switch(Vi(a,2)|0){default:dk(a,2,147479);break;case 0:case 5:break a}}Ri(a,2);c=xj(a,1);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Jqa(a){a=a|0;var b=0,c=0;b=qj(a,1);if(!b){b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}b=q[b+4>>2]!=0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function u0(a,b,c,d,e,f,g,h,i){var j=0;j=Ii-272|0;Ii=j;c=C0(a,c,j,g,f,j+271|0);a:{if(c){break a}c=t0(a,b,d,e,j,g,h,i);if(c){break a}c=XF(a,b,r[j+271|0]);if(c){break a}c=dz(a,b)}Ii=j+272|0;return c}function qra(){var a=0,b=0;a=$i(29112);Ui(a+8|0,0,28560);b=a+29092|0;q[b>>2]=0;q[b+4>>2]=0;q[a+29084>>2]=0;q[a+29088>>2]=0;q[a+29100>>2]=1024;q[a+29104>>2]=16;q[a>>2]=0;q[a+29080>>2]=Wj();return a}function fZ(a){var b=0,c=0,d=0;while(1){b=d<<2;c=q[b+256880>>2];c=Yj(a,c,hj(c));q[(b+q[a+16>>2]|0)+188>>2]=c;b=q[(b+q[a+16>>2]|0)+188>>2];o[b+5|0]=r[b+5|0]|32;d=d+1|0;if((d|0)!=17){continue}break}}function MK(a){var b=0;b=86492;a:{switch(a-1|0){case 1:return 86515;case 3:return 86538;case 7:return 86561;case 15:return 86584;case 31:return 86606;default:b=86630;break;case 0:break a}}return b}function Ara(a){var b=0,c=0;a:{b=s[a+138>>1];if((b|0)!=32767){c=q[a+80>>2];a=q[c+1036>>2];if(q[c+1040>>2]-a>>2>>>0<=b>>>0){break a}a=q[a+(b<<2)>>2]}else{a=0}return a}J(12419,9962,479,9454);G()} - - - -function yha(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(80280,79890,428,80356);G()}return 1}function wj(a){var b=0;if(q[a+76>>2]<0){b=q[a+4>>2];if(b>>>0>2]){q[a+4>>2]=b+1;return r[b|0]}return ax(a)}b=q[a+4>>2];a:{if(b>>>0>2]){q[a+4>>2]=b+1;a=r[b|0];break a}a=ax(a)}return a}function dC(a,b){if(b>>>0<6){a:{b:{switch(b>>>1|0){case 0:a=a>>>0>1;break a;case 1:a=(a|0)!=0;break a;case 2:break b;default:break a}}a=(a&-3)!=0}return b&1?1-a|0:a}J(97938,96899,11207,97944);G()}function Wra(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[q[a+16>>2]>>2];q[b+8>>2]=0;a=q[a+12>>2];c=0;a:{if(!a){break a}c=q[a+120>>2]}a=sw(c,q[d>>2],0,d,b+8|0);Ii=b+16|0;return((a|0)==-1?-1e3:0)|0}function Wla(a){a=a|0;var b=0,c=0;c=q[a+8>>2]-q[a+12>>2]|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;if(((c>>4)+1|0)!=q[a+8>>2]-q[a+12>>2]>>4){J(82265,82047,262,82290);G()}return 1}function KX(a){Mi[q[65677]](a,0,64)|0;Mi[q[65677]](a- -64|0,0,64)|0;q[a+128>>2]=64;Mi[q[65677]](a+132|0,0,72)|0;q[a+224>>2]=0;q[a+228>>2]=0;q[a+216>>2]=0;q[a+220>>2]=0;q[a+208>>2]=0;q[a+212>>2]=0}function FZ(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+20>>2]=0;q[d+24>>2]=c;q[d+8>>2]=b;q[d+12>>2]=0;b=rF(a,1069,d+8|0,q[a+8>>2]-q[a+32>>2]|0,q[a+116>>2]);Cj(a,q[d+12>>2],q[d+20>>2],0);Ii=d+32|0;return b}function qD(a){var b=0,c=0,d=0,e=0;c=r[a+1|0]|r[a|0]<<8;b=r[a+2|0];d=b>>>8|0;b=b<<24;d=c|d;e=b;c=r[a+3|0];b=c>>>16|0;c=e|c<<16;b=b|d;e=r[a+5|0];a=r[a+4|0];d=a>>>24|0;a=e|(a<<8|c);Li=b|d;return a}function ifa(a,b,c){a=a|0;b=x(b);c=x(c);a:{if(a){lc(x(b),x(c));if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}return}J(88567,88575,3814,92960);G()}lj(a,92960,3816);J(88669,88575,3816,92960);G()}function gN(a,b,c,d){var e=0,f=0,g=0,h=0;e=dl(a,155123);if(!e){return-1}Uk(e,0,2);f=pm(e);Uk(e,0,0);g=$i((f|0)>-1?f:-1);h=zl(g,1,f,e);rk(e);e=-4;if((f|0)==(h|0)){e=hN(a,g,f,b,c,d)}Ni(g);return e}function Xw(a){var b=0,c=0;b=(w(r[a+2|0],31)+127>>>0)/255|0;c=b>>>0<31?b:31;b=(w(r[a+1|0],63)+127>>>0)/255|0;a=(w(r[a|0],31)+127>>>0)/255|0;return(c|(b>>>0<63?b:63)<<5|(a>>>0<31?a:31)<<11)&65535}function Qva(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+16>>2]=c;q[d+12>>2]=b;q[d+8>>2]=a;a=S(2,d+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=d+32|0;return a}function xW(a){var b=0,c=0,d=0;a:{if(qy(a)){break a}if(is(a,1)){break a}b=a+44|0;c=a+56|0;d=a+32|0;if(eW(a+8|0,b,c,d,a+20|0)){break a}return fW(b,c,d,a+68|0,a+80|0,a+92|0)?-16896:0}return-16896}function l0(a,b){var c=0;c=Ii-48|0;Ii=c;q[c+40>>2]=15;q[c+36>>2]=16;q[c+32>>2]=17;q[c+28>>2]=18;q[c+16>>2]=0;q[c+12>>2]=b;q[c+8>>2]=a;q[c+24>>2]=19;q[c+20>>2]=20;a=Fsa(c+8|0);Ii=c+48|0;return a}function kC(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+16>>2]=c;q[d+12>>2]=b;q[d+8>>2]=a;a=S(5,d+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=d+32|0;return a}function hq(a,b){var c=0,d=0,e=0;c=q[a+36>>2]+b|0;d=q[a>>2];if((c|0)<=r[d+75|0]){q[a+36>>2]=c;return}e=c;if((c|0)>=250){Sj(q[a+12>>2],141814);d=q[a>>2];e=q[a+36>>2]+b|0}o[d+75|0]=c;q[a+36>>2]=e}function exa(a){var b=0;q[a>>2]=0;b=a+4|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+16|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;xo(a+28|0);xo(a- -64|0);xo(a+100|0);xo(a+136|0);q[a+172>>2]=0;Xwa(a+176|0)}function Xy(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+16>>2]=c;q[d+12>>2]=b;q[d+8>>2]=a;a=S(6,d+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=d+32|0;return a}function Qw(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+16>>2]=c;q[d+12>>2]=b;q[d+8>>2]=a;a=S(3,d+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=d+32|0;return a}function Ija(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],259224,b+12|0)){c=W9(q[a+4>>2]);sI(c,q[b+12>>2]);q[q[a+24>>2]+8>>2]=c;Aj(q[b+12>>2]);c=0}Ii=b+16|0;return c|0}function A$(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=0;q[d+20>>2]=0;q[d+24>>2]=0;q[d+16>>2]=c;q[d+12>>2]=b;q[d+8>>2]=a;a=S(7,d+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=d+32|0;return a}function qua(){var a=0;a=Yi(16512);q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+100>>2]=0;q[a+104>>2]=0;q[a+96>>2]=a+128;q[a+108>>2]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+120>>2]=0;q[a+124>>2]=0;return a}function k6(a){a=a|0;var b=0;b=q[a+2188>>2];if(b){No(b)}if(q[a+2192>>2]){pr(a+2192|0)}a:{if(o[a+2224|0]&1){break a}b=q[a+2204>>2];if(b){Ni(b)}b=q[a+2196>>2];if(!b){break a}Ni(b)}Ni(a);return 0}function dx(a,b,c){var d=0,e=0,f=0,g=0;a:{if(c){while(1){f=r[a+d|0];g=f^r[b+d|0];if(g){e=-1;if((g|0)!=32|((f&223)-65&255)>>>0>25){break a}}d=d+1|0;if((d|0)!=(c|0)){continue}break}}e=0}return e}function VS(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=-17280;a:{h=q[a+4>>2];if(h>>>0>f>>>0){break a}g=nW(a,b,d,c,e);if(g){break a}return(f>>>0>h>>>0?-14592:0)|0}return g|0}function Sx(a,b){var c=0;c=Ii-32|0;Ii=c;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+12>>2]=b;q[c+8>>2]=a;a=S(13,c+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=c+32|0;return a}function O5(a){a=a|0;var b=0;b=q[a+2188>>2];if(b){pA(b)}b=q[a+2192>>2];if(b){BI(b)}q[a+2188>>2]=0;q[a+2192>>2]=0;a:{if(o[a+2208|0]&1){break a}b=q[a+2196>>2];if(!b){break a}Ni(b)}Ni(a);return 0}function Jja(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=q[q[a+32>>2]+8>>2];d=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[62572],b+12|0)){a=q[c>>2];if(a){Aj(a)}q[c>>2]=q[b+12>>2];d=0}Ii=b+16|0;return d|0}function jua(){var a=0;a=$i(48);q[a>>2]=0;q[a+4>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;return a}function e5(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;q[b+16>>2]=kj(a,1,0);c=Ba(125809,126176,b+16|0)|0;a:{if(!r[317232]){q[b>>2]=c;Qi(a,126178,b);break a}Xi(a,c);d=1}Ni(c);Ii=b+32|0;return d|0}function c$(a,b,c,d){var e=0;e=Ii-144|0;Ii=e;a:{b:{switch(b-2|0){case 0:q[e+140>>2]=16;break a;case 8:break b;default:break a}}q[e+140>>2]=28}a=mm(nS(a,c,e+8|0,e+140|0,d));Ii=e+144|0;return a}function A_(a,b){var c=0;c=Ii-32|0;Ii=c;q[c+24>>2]=0;q[c+28>>2]=0;q[c+16>>2]=0;q[c+20>>2]=0;q[c+12>>2]=b;q[c+8>>2]=a;a=S(4,c+8|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=c+32|0;return a}function ffa(a,b,c){a=a|0;b=b|0;c=c|0;a:{if(a){ac(b|0,c|0);if(r[q[75054]+156|0]&64){a=K()|0;if(a){break a}}return}J(88567,88575,2281,92415);G()}lj(a,92415,2283);J(88669,88575,2283,92415);G()}function a7(a,b){var c=0,d=0;d=q[a+5136>>2];if(d){a:{while(1){if(!dj(b,q[(w(c,40)+a|0)+24>>2])){break a}c=c+1|0;if(d>>>0>c>>>0){continue}break}return 0}a=(w(c,40)+a|0)+16|0}else{a=0}return a}function Z6(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+28>>2]=c;q[d+24>>2]=550;c=q[b+4>>2];q[d+8>>2]=q[b>>2];q[d+12>>2]=c;o[d+16|0]=r[b+8|0];o[d+17|0]=r[b+9|0];y6(q[a+7384>>2],d+8|0,d+24|0);Ii=d+32|0}function Uta(a){a=a|0;var b=0,c=0;b=jj(a,1);if(!((b|0)==1&r[906092]!=0)){Qi(a,209110,0)}b=(b|0)!=1?0:r[906092]?q[230859]:0;c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function xma(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=q[a+144>>2];if(!g){g=sq();q[a+144>>2]=g}h=q[a+148>>2];if(!h){h=q[q[a+156>>2]+24>>2]}Fr(g,q[h>>2],b,c,d,e,f);lw(a)}function tja(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-2;if(!Qj(q[a+20>>2],q[a+24>>2],239120,c+12|0)){b=q[q[a+32>>2]+8>>2];hB(q[a>>2],b);q[b>>2]=q[c+12>>2];b=GL(q[a>>2],b)}Ii=c+16|0;return b|0}function aP(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+8>>2]=0;q[d>>2]=0;q[d+4>>2]=0;a=XE(a,b,d);a:{if(a){a=a-9472|0;break a}a=-9572;if(q[d>>2]!=1){break a}o[c|0]=r[q[d+8>>2]];a=0}Ii=d+16|0;return a}function Q9(a,b,c,d){var e=0;if(!q[a+28>>2]){q[a+4>>2]=b;q[a+8>>2]=c;e=a+4|0;q[a+28>>2]=e;b=q[d+4>>2];q[a+12>>2]=q[d>>2];q[a+16>>2]=b;b=q[d+12>>2];q[a+20>>2]=q[d+8>>2];q[a+24>>2]=b}return e}function Nk(a,b,c){var d=0,e=0,f=0,g=0;d=Ii-16|0;Ii=d;g=d;f=Vi(a,b);e=140583;a:{if((f|0)==-1){break a}e=q[(f<<2)+256832>>2]}q[g+4>>2]=e;q[d>>2]=c;a=dk(a,b,Lj(a,143231,d));Ii=d+16|0;return a}function H5(a){a=a|0;var b=0;b=q[a+2192>>2];if(b){No(b)}b=q[a+2188>>2];if(b){cG(b)}a:{if(o[a+2224|0]&1){break a}b=q[a+2204>>2];if(b){Ni(b)}b=q[a+2196>>2];if(!b){break a}Ni(b)}Ni(a);return 0}function vy(a){Fs(a);q[a+132>>2]=0;q[a+124>>2]=1;q[a+128>>2]=0;q[a+144>>2]=0;q[a+136>>2]=1;q[a+140>>2]=0;q[a+156>>2]=0;q[a+148>>2]=1;q[a+152>>2]=0;q[a+168>>2]=0;q[a+160>>2]=1;q[a+164>>2]=0}function vR(a,b){var c=0,d=0,e=0,f=0,g=0;d=-31488;c=q[a>>2];a:{if((b-c|0)<2){break a}e=r[c+1|0];f=r[c|0];c=c+2|0;q[a>>2]=c;g=b-c|0;b=e|f<<8;if((g|0)<(b|0)){break a}q[a>>2]=b+c;d=0}return d}function pX(a,b,c){var d=0,e=0,f=0;e=a+4|0;d=UB(e,b,c);a:{if(d){break a}d=UB(a+16|0,b,c);if(d){break a}f=a+52|0;d=UB(f,b,c);if(d){break a}d=Ow(f,e);if(d){break a}q[a>>2]=Wm(e);d=0}return d}function cD(a,b,c,d){a:{if(!a){break a}b:{switch(b+2|0){case 0:o[a|0]=c;return;case 1:p[a>>1]=c;return;case 2:case 3:q[a>>2]=c;return;case 5:break b;default:break a}}q[a>>2]=c;q[a+4>>2]=d}}function _Z(a){a=a|0;var b=0,c=0,d=0,e=0;c=Ii-16|0;Ii=c;b=1;d=kj(a,1,c+12|0);e=Tl(a,2,d,0);if(Tu(a,d,q[c+12>>2],e)){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;xk(a,-2);b=2}Ii=c+16|0;return b|0}function Rja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[62640],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]+4>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function jO(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;Hi(0,b+8|0)|0;c=(b+8>>>4|0)+a^w(q[b+12>>2],65537);while(1){o[a+d|0]=(c&15|c<<1&32)+65;c=c>>>5|0;d=d+1|0;if((d|0)!=6){continue}break}Ii=b+16|0}function g$(a){a=a|0;var b=0,c=0;b=Ii-272|0;Ii=b;o[b+256|0]=0;a:{if((C$(b)|0)<=-1){c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;Xi(a,mm(q[240513]));a=2;break a}Xi(a,b);a=1}Ii=b+272|0;return a|0}function U8(a){q[a>>2]=0;q[a+4>>2]=0;q[a+48>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;return a}function Hr(a){var b=0;Hv(q[a+48>>2]);a:{if(o[a+44|0]&1){break a}b=q[a+24>>2];if(b){Ni(b)}b=q[a+16>>2];if(!b){break a}Ni(b)}b:{if(o[a+12|0]&1){break b}b=q[a>>2];if(!b){break b}Ni(b)}Ni(a)}function A2(a){a=a|0;var b=0,c=0,d=x(0),e=x(0);b=Ii-32|0;Ii=b;c=qj(a,1);d=u[c>>2];e=u[c+4>>2];v[b+24>>3]=u[c+8>>2];v[b+16>>3]=e;q[b>>2]=134e3;v[b+8>>3]=d;Lj(a,134742,b);Ii=b+32|0;return 1}function xga(a){a=a|0;var b=0;a=Ii-16|0;Ii=a;q[a+8>>2]=0;CK(0);tb();a:{if(!(r[q[75054]+156|0]&64)){break a}b=K()|0;if(!b){break a}lj(b,91562,1509);J(88669,88575,1509,91562);G()}Ii=a+16|0}function fO(a){var b=0;b=r[a+74|0];o[a+74|0]=b-1|b;b=q[a>>2];if(b&8){q[a>>2]=b|32;return-1}q[a+4>>2]=0;q[a+8>>2]=0;b=q[a+44>>2];q[a+28>>2]=b;q[a+20>>2]=b;q[a+16>>2]=b+q[a+48>>2];return 0}function Rka(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=q[a>>2];a=q[a+4>>2];c=ak(c,q[q[q[a+32>>2]>>2]>>2],a+36|0);if(c){q[b>>2]=q[q[q[a+32>>2]>>2]>>2];Pi(4,35807,36596,b)}Ii=b+16|0;return!c|0}function Ql(a){var b=0,c=0;b=q[a+4>>2];if(!b){return 0}c=q[a+8>>2];a:{while(1){b=b-1|0;if(!b){a=q[c>>2];b=32;break a}a=q[(b<<2)+c>>2];if(!a){continue}break}b=(b<<5)+32|0}return b-CX(a)|0}function Nia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[60638],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function N1(a){q[a>>2]=0;q[a+4>>2]=0;q[a+32>>2]=0;q[a+24>>2]=768;q[a+28>>2]=256;q[a+16>>2]=32;q[a+20>>2]=49152;q[a+8>>2]=128;q[a+12>>2]=16;q[a+4>>2]=1065353216;q[a>>2]=209929;o[a+32|0]=1}function Ho(a,b,c){var d=0;if((c|0)>=0){b=b+9999>>>0<=9999?((q[a+8>>2]-q[a+12>>2]>>4)+b|0)+1|0:b;rj(a,b,0);nk(a,b,c);d=q[a+8>>2];q[d+8>>2]=3;v[d>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;nk(a,b,0)}}function Cia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[61028],b+12|0)){Ek(q[a+20>>2],q[q[b+12>>2]>>2]);q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function xka(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-2;if(!Qj(q[a+20>>2],q[a+24>>2],261680,c+12|0)){a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}q[a>>2]=q[c+12>>2];b=0}Ii=c+16|0;return b|0}function rja(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-2;if(!Qj(q[a+20>>2],q[a+24>>2],262464,c+12|0)){a=q[q[a+32>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}q[a>>2]=q[c+12>>2];b=0}Ii=c+16|0;return b|0}function dj(a,b){var c=0,d=0;c=r[a|0];d=r[b|0];a:{if(!c|(c|0)!=(d|0)){break a}while(1){d=r[b+1|0];c=r[a+1|0];if(!c){break a}b=b+1|0;a=a+1|0;if((c|0)==(d|0)){continue}break}}return c-d|0}function Y8(a,b,c,d,e,f,g){var h=0,i=0,j=0,k=0;h=Ii+ -64|0;Ii=h;i=q[g>>2];j=q[g+4>>2];k=q[g+12>>2];q[h+8>>2]=q[g+8>>2];q[h+12>>2]=k;q[h>>2]=i;q[h+4>>2]=j;aI(a,b,c,d,e,f,h,0);Ii=h- -64|0}function Tp(a){var b=0,c=0;b=q[71295];c=a+3&-4;a=b+c|0;a:{if(a>>>0<=b>>>0?(c|0)>=1:0){break a}if(a>>>0>Sza()<<16>>>0){if(!(Uc(a|0)|0)){break a}}q[71295]=a;return b}q[240513]=48;return-1}function R8(a,b,c){var d=0,e=0,f=0;f=Ii-16|0;Ii=f;e=-2;d=q[a+256>>2];if((d|0)!=32){e=d+1|0;q[a+256>>2]=e;d=(d<<3)+a|0;q[d>>2]=b;q[d+4>>2]=c;iu(a,(e<<3)+a|0,f+8|0);e=0}Ii=f+16|0;return e}function B4(a,b){a=a|0;b=b|0;var c=0,d=0,e=x(0);d=q[b>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;e=u[b+4>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=e;q[a+8>>2]=q[a+8>>2]+16}function pk(a,b,c){var d=0,e=0;a:{if(!c){break a}while(1){e=q[(d<<3)+b>>2];if(!e){break a}if((a|0)==(e|0)){return q[((d<<3)+b|0)+4>>2]}d=d+1|0;if((d|0)!=(c|0)){continue}break}}return 0}function jF(a,b,c){var d=0;b=b+9999>>>0<=9999?((q[a+8>>2]-q[a+12>>2]>>4)+b|0)+1|0:b;if($l(a,b)){Xi(a,c);jl(a,-2);if(!Vi(a,-1)){Ri(a,-3);return 0}ll(a,-2);ej(a,b);Rk(a,1,1);d=1}return d}function Zl(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;d=q[a+4>>2];q[c+8>>2]=q[a>>2];q[c+12>>2]=d;d=q[b+4>>2];q[a>>2]=q[b>>2];q[a+4>>2]=d;a=c+8|0;d=q[a+4>>2];q[b>>2]=q[a>>2];q[b+4>>2]=d;Ii=c+16|0}function UN(a,b,c){var d=0,e=0;a:{if(b>>>0<2){if(c>>>0>=8){break a}d=a;e=r[a+3|0];a=b?2:5;o[d+3|0]=e&(7<>2]=c;Lj(a,144908,b)}Ii=b+16|0;return 1}function oC(a,b,c,d,e,f,g,h,i){var j=0;j=Ii-16|0;Ii=j;Um(j,b,c,d,e,f,g,h,i^-2147483648);b=q[j+4>>2];q[a>>2]=q[j>>2];q[a+4>>2]=b;b=q[j+12>>2];q[a+8>>2]=q[j+8>>2];q[a+12>>2]=b;Ii=j+16|0}function lD(a,b,c,d){var e=0;e=1;a:{if(!a|q[a+24>>2]>(d|0)|(q[a+32>>2]<(c|0)|(r[a+36|0]&4?r[q[b>>2]+184|0]&2:0))){break a}if(q[a+16>>2]-5>>>0<4){if(!yD(q[b>>2])){break a}}e=0}return e}function Uoa(a){a=a|0;var b=0;a=q[a+4>>2];if(a){a:{if(o[a+32|0]&1){break a}b=q[a+20>>2];if(!b){break a}Ni(b)}b:{if(o[a+16|0]&1){break b}b=q[a+4>>2];if(!b){break b}Ni(b)}Ni(a)}return 0}function TR(a,b){var c=0,d=0;c=q[b+488>>2];d=q[a+156>>2];if(c>>>0>>0){if(q[a+152>>2]!=(c|0)){p[b+592>>1]=508}a=c<<1;q[b+488>>2]=a>>>0>>0?d:a>>>0>d>>>0?d:a;a=0}else{a=-1}return a}function Cw(a,b,c){var d=0,e=0,f=0;f=q[a>>2];if(f){while(1){e=(w(d,112)+a|0)+8|0;if(q[e>>2]==(b|0)){if(!c){return e}q[c>>2]=d;return e}d=d+1|0;if(f>>>0>d>>>0){continue}break}}return 0}function uca(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);d=fj(a,2);a:{if(y(d)<2147483648){a=~~d;break a}a=-2147483648}q[c+412>>2]=q[c+412>>2]&-16|a&15;Ii=b+16|0;return 0}function mta(a,b,c,d,e){a:{switch((q[d+4>>2]>>>22&63)-9|0){case 2:return lta(a,b,c,d,e);case 0:return jta(a,b,c,d,e);case 3:return nta(a,b,c,d,e);default:break a}}return kta(a,c,d,e)}function lE(a,b,c,d,e){var f=0;a:{if(b){f=a+8|0;b=pn(f,b,c);if(b){break a}q[a+4>>2]=Wm(f)}b:{if(!d){break b}a=pn(a+20|0,d,e);if(!a){break b}return a-16512|0}return 0}return b-16512|0}function hE(a,b){var c=0,d=0;d=-1;a=q[q[a>>2]+100>>2];a:{if(!a){break a}c=q[a>>2];if(!c){break a}while(1){if((b|0)!=(c|0)){a=a+4|0;c=q[a>>2];if(c){continue}break a}break}d=0}return d}function Qga(a){a=a|0;var b=0;if(a){b=q[q[75054]>>2];if(b){Qn(b)}b=q[a+24>>2];if(b){Ni(b);Ni(q[a+28>>2])}a:{if(o[a+16|0]&1){break a}b=q[a+4>>2];if(!b){break a}Ni(b)}Ni(a);q[75054]=0}}function LX(a){var b=0;if(a){if(a){Mi[q[65677]](a,0,132)|0}b=a+132|0;if(b){Mi[q[65677]](b,0,72)|0}q[a+224>>2]=0;q[a+228>>2]=0;q[a+216>>2]=0;q[a+220>>2]=0;q[a+208>>2]=0;q[a+212>>2]=0}}function tqa(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0);b=Zm(a,1);d=u[b+40>>2];c=u[b+32>>2];e=u[b+36>>2];c=c>2];q[b+8>>2]=3;v[b>>3]=c>d?d:c;q[a+8>>2]=q[a+8>>2]+16;return 1}function bW(a,b){var c=0,d=0;d=-1;a=q[q[a>>2]+96>>2];a:{if(!a){break a}c=q[a>>2];if(!c){break a}while(1){if((b|0)!=(c|0)){a=a+4|0;c=q[a>>2];if(c){continue}break a}break}d=0}return d}function _i(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;a:{if((Ll(a,b)|0)==(c|0)){f=qj(a,b);if(f){break a}}if(!d){f=0;Nk(a,b,wJ(c,0));break a}q[e>>2]=d;Qi(a,122973,e);f=0}Ii=e+16|0;return f}function VG(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+8>>2]=0;q[c+12>>2]=0;q[c>>2]=0;q[c+4>>2]=0;a=RG(a,b,0,c);a:{if(o[c+12|0]&1){break a}b=q[c>>2];if(!b){break a}Ni(b)}Ii=c+16|0;return a+8|0}function VE(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;b=hk(a,b,d+12|0,1);a:{if(b){break a}b=-100;if(q[d+12>>2]!=1){break a}b=0;e=c;c=q[a>>2];q[e>>2]=r[c|0]!=0;q[a>>2]=c+1}Ii=d+16|0;return b}function P6(a){q[a+32>>2]=0;q[a+36>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a>>2]=1024;q[a+48>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+12>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0}function Bxa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=b-c|0;if(d>>>0>=2){f=c-1|0;c=1;e=1;while(1){o[(c+f|0)+a|0]=0;e=e+1|0;c=e&255;if(d>>>0>c>>>0){continue}break}}o[(a+b|0)-1|0]=d}function zL(a){a=a|0;var b=0;a=q[a+4>>2];if(a){a:{if(o[a+28|0]&1){break a}b=q[a+16>>2];if(!b){break a}Ni(b)}b:{if(o[a+12|0]&1){break b}b=q[a>>2];if(!b){break b}Ni(b)}Ni(a)}return 0}function WZ(a){a=a|0;var b=0,c=0;hm(a,1);c=dq(a,(q[a+8>>2]-q[a+12>>2]>>4)-1|0,-1,0);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=!c;q[a+8>>2]=q[a+8>>2]+16;xk(a,1);return q[a+8>>2]-q[a+12>>2]>>4}function Sha(a){a=a|0;var b=0,c=0;hm(a,1);c=Vi(a,1);b=q[74605];if(!c){if(b){no(b)}q[74605]=0;return 0}if(b){no(b)}b=rp(a,1);q[74605]=b;if(Lo(b)){a=0}else{a=Qi(a,82174,0)}return a|0}function Ks(a,b,c){var d=0;d=q[b+8>>2];if(d>>>0>=c>>>0){return q[b>>2]}c=c>>>0>32?c:32;a:{if(c+1>>>0<=4294967293){a=Cj(a,q[b>>2],d,c);break a}a=mk(a)}q[b+8>>2]=c;q[b>>2]=a;return a}function K3(a){var b=0,c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=844;b=q[79296];if((b|0)==((q[79294]-q[79292]|0)/12|0)){b=b+128|0;EI(317160,(w(b,100)>>>0)/80|0,b)}FI(317160,a,c+12|0);Ii=c+16|0}function Ana(a,b){var c=0;c=q[a+16>>2];if(q[a+20>>2]-c>>3>>>0>b>>>0){b=q[(b<<3)+c>>2];c=q[a+4>>2];a=q[a>>2];if(b>>>0>2>>>0){return q[a+(b<<2)>>2]}}J(51709,51308,479,51547);G()}function jka(a){a=a|0;var b=0,c=0;b=Ui($i(168),0,168);c=q[a+4>>2];if(SL(c,q[a>>2],q[a+12>>2],q[a+16>>2],b,q[a+8>>2])){q[q[a+24>>2]+8>>2]=b;return 0}kw(c,q[a>>2],b);Ni(b);return-13}function g7(a){var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=r[a|0];c=0;a:{if((d|0)==47){break a}b:{if(!d){Pi(4,24640,24649,0);break b}q[b>>2]=a;Pi(4,24640,24669,b)}c=-3}a=c;Ii=b+16|0;return a}function dta(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;d=(Pza(b),Lza(2));o[c+12|0]=d;o[c+13|0]=d>>>8;o[c+14|0]=d>>>16;o[c+15|0]=d>>>24;a=Mi[q[a>>2]](q[a+4>>2],c+12|0,4)|0;Ii=c+16|0;return a}function T4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;q[79321]=jm(a,128488,128748,252368);Ak(a,128484,252416);Ri(a,-2);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(128638,128517,569,128756);G()}}function Pja(a){a=a|0;var b=0,c=0,d=0,e=0;c=-13;b=q[a+4>>2];d=q[a+20>>2];e=Er(b,d);a:{if(!e){break a}b=Mi[q[74966]](b,e)|0;if(!b){break a}q[q[a+24>>2]+8>>2]=b;c=0}Aj(d);return c|0}function iQ(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;aa(b+8|0,0)|0;d=+q[b+12>>2]/1e6;e=+q[b+8>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d+e;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function c3(a){a=a|0;var b=0,c=0;b=1;c=a;if((Vi(a,1)|0)==8){b=2;c=Gn(a,1)}Dj(a,b,6);ej(a,b);b=q[210396];if(b){Rj(a,-1e4,b);q[210396]=0}q[210396]=zk(a,-1e4);aF(c,857,1,0);return 0}function Xva(a,b,c){var d=0,e=0;d=q[a+4>>2];e=b+c|0;if(d>>>0>=e>>>0){if(c){b=q[a>>2]+(b<<2)|0;bl(b,b+(c<<2)|0,d-e<<2);q[a+4>>2]=q[a+4>>2]-c}return}J(106588,106468,729,106512);G()}function Uva(a,b,c){var d=0,e=0;d=q[a+4>>2];e=b+c|0;if(d>>>0>=e>>>0){if(c){b=q[a>>2]+(b<<1)|0;bl(b,b+(c<<1)|0,d-e<<1);q[a+4>>2]=q[a+4>>2]-c}return}J(106588,106468,729,106512);G()}function Hv(a){var b=0;if(a){a:{if(o[a+44|0]&1){break a}b=q[a+32>>2];if(!b){break a}Ni(b)}b:{if(o[a+28|0]&1){break b}b=q[a+8>>2];if(b){Ni(b)}b=q[a>>2];if(!b){break b}Ni(b)}Ni(a)}}function Bja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+20>>2],q[a+24>>2],q[58706],b+12|0)){a=q[q[a+32>>2]+8>>2];Aj(q[a>>2]);q[a>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function A3(a){var b=0,c=0;b=hj(73936);c=pq(73936,b);bj(a,73936,b);ej(a,-2);pj(a,-10002);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);pj(a,-10002);return c}function bma(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,70569,114);d=XG(a);mo(a,70062,0,b+4|0,0);if(!Moa(d,q[b+4>>2])){e=Kj(c,70815,0)}mj(c);Ii=b+32|0;return e|0}function Jk(){var a=0,b=0,c=0;a=Ii-16|0;Ii=a;aa(a+8|0,0)|0;Ii=a+16|0;b=q[a+12>>2];a=q[a+8>>2];a=Aza(a,a>>31,1e6,0);c=b+a|0;b=Li+(b>>31)|0;b=a>>>0>c>>>0?b+1|0:b;a=c;Li=b;return a}function z2(a){a=a|0;var b=0,c=x(0),d=x(0),e=x(0);b=qj(a,1);c=u[b>>2];d=u[b+4>>2];e=u[b+8>>2];b=yj(a,16);u[b+8>>2]=-e;u[b+4>>2]=-d;u[b>>2]=-c;Zi(a,-1e4,134e3);xj(a,-2);return 1}function rka(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+20>>2],q[a+24>>2],233720,b+12|0)){a=q[q[a+32>>2]+8>>2];Aj(q[a>>2]);q[a>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function i1(a,b){if(a>>>0<=127){o[b|0]=a;return 1}if(a>>>0<=2047){o[b+1|0]=a&63|128;o[b|0]=a>>>6|192;return 2}o[b+2|0]=a&63|128;o[b|0]=a>>>12|224;o[b+1|0]=a>>>6&63|128;return 3}function hC(a,b){var c=0,d=0,e=0,f=0;c=Ii-16|0;Ii=c;f=c;e=Vi(a,3);d=140583;a:{if((e|0)==-1){break a}d=q[(e<<2)+256832>>2]}q[f+4>>2]=d;q[c>>2]=b;dk(a,3,Lj(a,136854,c));Ii=c+16|0}function by(a){var b=0;a:{b:{if(!a){break b}b=q[a+4>>2];if(b>>>0>999999999){break b}a=q[a>>2];if((a|0)>-1){break a}}q[240513]=28;return-1}Tc(+(+(b|0)/1e6+ +(a|0)*1e3));return 0}function AW(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;q[d>>2]=0;a=-60;e=dl(160893,160906);a:{if(!e){break a}b=zl(b,1,c,e);rk(e);if((b|0)!=(c|0)){break a}q[d>>2]=c;a=0}return a|0}function qy(a){var b=0;a:{if(is(a,0)){break a}b=a+8|0;if(Ql(b)>>>0<128){break a}a=a+20|0;if(!Xm(a,0)){break a}if(Ql(a)>>>0<2){break a}return(_j(a,b)|0)<0?0:-16896}return-16896}function nz(a){var b=0,c=0,d=0;b=q[a+104>>2];c=q[a+108>>2];if((b|0)!=(c|0)){while(1){d=q[q[b>>2]+4>>2];if(d){Mi[d|0](a);c=q[a+108>>2]}b=b+4|0;if((c|0)!=(b|0)){continue}break}}}function cqa(a,b,c){var d=0,e=0;a:{e=q[a>>2];if(e){while(1){if(q[(w(d,112)+a|0)+8>>2]==(b|0)){break a}d=d+1|0;if(e>>>0>d>>>0){continue}break}}return}p[(w(d,112)+a|0)+112>>1]=c}function Hqa(a){a=a|0;var b=0,c=0;b=qj(a,1);c=a;a=kj(a,2,0);a:{if(!(!a|!r[a|0])){a=It(q[b+4>>2],a,hj(a));b=Li;break a}b=q[b+4>>2];a=q[b+96>>2];b=q[b+100>>2]}lk(c,a,b);return 1}function FV(a){var b=0;b=-28928;a:{if(!a|!q[a>>2]){break a}b:{if(q[a+8>>2]!=1){if(q[a+4>>2]!=16){break a}b=mD(a);if(!b){break b}break a}b=ps(a);if(b){break a}}b=0}return b} - - - -function yfa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=c;c=Mi[q[74931]](a)|0;a=Mi[q[74932]](a)|0;if(d>>>0>>0){J(94505,88575,3549,94530);G()}kc(0,0,c|0,a|0,32993,5121,b|0)}function swa(a,b){var c=0,d=0,e=0;d=Ii-160|0;Ii=d;c=a;a=d+8|0;c=Tn(c,a,1,0);a:{if(!c){break a}e=q[a+104>>2];if((e|0)==8){Awa(b,a+112|0);break a}Bwa(b,a,e)}Ii=d+160|0;return c}function gka(a){a=a|0;var b=0,c=0;b=$i(8);q[b>>2]=0;q[b+4>>2]=0;c=q[a+4>>2];o[b+4|0]=r[c+17|0];if(OL(c,q[a+12>>2],q[a+16>>2],b)){q[q[a+24>>2]+8>>2]=b;return 0}Ni(b);return-13}function SV(a){var b=0,c=0;b=fE(a);b=b>>>0<16384?b:16384;c=vD(a);if(!c){return b}a=eE(a);if((a|0)<0){return a}if(a>>>0>>0){a=c-a|0;a=a>>>0>>0?a:b}else{a=-28800}return a}function Qaa(a,b){a=a|0;b=b|0;if(q[210500]==(b|0)){if(b){a:{if(o[b+36|0]&1){break a}a=q[b+24>>2];if(!a){break a}Ni(a)}Ni(b)}q[210500]=0;return}J(148110,147809,217,148145);G()}function Cja(a){a=a|0;var b=0,c=0;c=Ii-16|0;Ii=c;b=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[58706],c+12|0)){b=$i(4);q[b>>2]=q[c+12>>2];q[q[a+24>>2]+8>>2]=b;b=0}Ii=c+16|0;return b|0}function zja(a){a=a|0;var b=0,c=0;c=q[a+4>>2];b=q[q[a+8>>2]+8>>2];hw(q[a>>2],b+4|0);b=q[b>>2];lq(q[a>>2],508,b);cj(q[a>>2],q[b+12>>2]);cj(q[a>>2],q[b+8>>2]);eA(c,b);return 0}function pfa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;_b(d|0,c|0,0,b|0);a:{if(!(r[q[75054]+156|0]&64)){break a}a=K()|0;if(!a){break a}lj(a,92395,2276);J(88669,88575,2276,92395);G()}}function hR(a,b,c,d){q[d>>2]=0;a:{if(!(r[a+185|0]&2)){break a}b=b+16384|0;if(!r[a+181|0]|b>>>0>>0|b-c>>>0<4){break a}o[c|0]=0;o[c+1|0]=22;o[c+2|0]=0;o[c+3|0]=0;q[d>>2]=4}}function gR(a,b,c,d){q[d>>2]=0;a:{if(!(r[a+185|0]&4)){break a}b=b+16384|0;if(!r[a+181|0]|b>>>0>>0|b-c>>>0<4){break a}o[c|0]=0;o[c+1|0]=23;o[c+2|0]=0;o[c+3|0]=0;q[d>>2]=4}}function Qha(a){a=a|0;var b=0;b=q[a+8>>2]-q[a+12>>2]>>4;a:{if(Iz(a,1)){Wb(196609);break a}Vb(196609)}if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){J(82026,82047,198,82252);G()}return 0}function H0(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=Ii-176|0;Ii=i;vy(i);a=DE(i,a);if(!a){a=$F(i,b,c,d,e,f,g,h)}Ju(i);Ii=i+176|0;return a|0}function Gja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+20>>2],q[a+24>>2],259224,b+12|0)){sI(q[q[a+32>>2]+8>>2],q[b+12>>2]);Aj(q[b+12>>2]);c=0}Ii=b+16|0;return c|0}function EM(a,b,c,d,e,f){q[a+32>>2]=0;q[a+28>>2]=0;q[a+24>>2]=f;q[a+20>>2]=e;q[a+16>>2]=d;q[a+4>>2]=c;q[a>>2]=b;b=q[210498];q[a+8>>2]=0;q[a+12>>2]=0;q[a+36>>2]=b;q[210498]=a}function rba(a){q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+32>>2]=0;q[a+36>>2]=360;q[a+24>>2]=960;q[a+20>>2]=640}function qn(a,b,c){var d=0,e=0,f=0;if(c){e=a+1036|0;while(1){c=c-1|0;d=q[a>>2];if(e>>>0<=d>>>0){ml(a);d=q[a>>2]}f=r[b|0];q[a>>2]=d+1;o[d|0]=f;b=b+1|0;if(c){continue}break}}}function qO(a){var b=0;b=2;if(!gk(a,43)){b=r[a|0]!=114}b=gk(a,120)?b|128:b;b=gk(a,101)?b|524288:b;a=r[a|0];b=(a|0)==114?b:b|64;b=(a|0)==119?b|512:b;return(a|0)==97?b|1024:b}function nW(a,b,c,d,e){var f=0;f=-16640;a:{switch(q[a+164>>2]){case 0:return hW(a,b,c,d,e);case 1:f=a;a=q[a+168>>2];f=kE(f,b,c,d,a?a:b,-1,e);break;default:break a}}return f}function Tra(a){a=a|0;var b=0,c=0,d=0;if(!q[a+12>>2]){return-1e3}c=q[a+8>>2];d=q[a+16>>2];b=$i(20);Mra(b,c>>>0>d>>>0?d:c);q[b+16>>2]=xz(q[a>>2]);q[q[a+12>>2]>>2]=b;return 0}function GQ(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if((d|0)>=1){e=0;while(1){o[a+e|0]=(r[c+e|0]+w(r[b+e|0],3)|0)+2>>>2;e=e+1|0;if((e|0)!=(d|0)){continue}break}}return a|0}function EX(a){var b=0,c=0;b=q[66429];if(!b){return 0}c=265712;if(q[66428]!=(a|0)){while(1){b=q[c+12>>2];if(!b){return 0}c=c+8|0;if(q[c>>2]!=(a|0)){continue}break}}return b}function xE(a,b,c,d){if(!Jj(c,1)){return Eo(b,d)}a:{if(!Jj(c,-1)){c=Eo(b,d);if(c){break a}c=0;b=b+12|0;if(!Jj(b,0)){break a}return yl(b,a+4|0,b)}c=Es(a,b,c,d,0,0)}return c}function ofa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;$b(d|0,c|0,b|0);a:{if(!(r[q[75054]+156|0]&64)){break a}a=K()|0;if(!a){break a}lj(a,92375,2270);J(88669,88575,2270,92375);G()}}function mF(a,b){a=q[a+16>>2]+((q[b+8>>2]&(-1<>2]!=4|q[a+16>>2]!=(b|0))){return a}a=q[a+28>>2];if(a){continue}break}return 141056}function lX(a,b,c){var d=0,e=0;e=Ii-16|0;Ii=e;d=dX(e+12|0,b,c-q[b>>2]|0);a:{if(d){break a}d=EE(a,q[e+12>>2]);if(d){break a}d=cX(a,a+172|0,b,c-q[b>>2]|0)}Ii=e+16|0;return d}function f7(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;a:{b:{switch(a-1|0){case 0:YM(b,c,d);break a;case 1:Fta(b,c,d);break a;default:break b}}q[e>>2]=a;Pi(4,30905,30914,e)}Ii=e+16|0}function Via(a){a=a|0;var b=0;a=q[q[a+8>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}a:{if(o[a+32|0]&1){break a}b=q[a+12>>2];if(b){Ni(b)}b=q[a+4>>2];if(!b){break a}Ni(b)}Ni(a);return 0}function Spa(a){a=a|0;var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,0,68606,137);mo(a,68198,b+4|0,b,0);if(!ypa(q[b+4>>2],q[b>>2])){d=Kj(c,69234,0)}mj(c);Ii=b+32|0;return d|0}function Iwa(a,b,c,d){q[a>>2]=d>>>6&7;q[b>>2]=d>>>3&7;q[c>>2]=d&7;d=q[a>>2];if((d|0)>=4){q[a>>2]=d-8}a=q[b>>2];if((a|0)>=4){q[b>>2]=a-8}a=q[c>>2];if((a|0)>=4){q[c>>2]=a-8}}function IB(a){var b=0;b=Ii-32|0;Ii=b;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+4>>2]=a;q[b>>2]=q[56654];sj(b+16|0,16,8093,b);a=Oi(b+16|0);Ii=b+32|0;return a}function wia(a){a=a|0;var b=0,c=0,d=0;a:{b=q[a+4>>2];c=q[a+20>>2];d=Er(b,c);if(d){b=Mi[q[74965]](b,d)|0;if(b){break a}}Aj(c);return-13}Aj(c);q[q[a+24>>2]+8>>2]=b;return 0}function bk(a,b){var c=0,d=0,e=0;c=0;a:{if(!a){break a}d=Aza(a,0,b,0);e=Li;c=d;if((a|b)>>>0<65536){break a}c=e?-1:d}b=c;a=Yi(b);if(!(!a|!(r[a-4|0]&3))){Ui(a,0,b)}return a}function _S(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0;i=e;e=q[a+4>>2];q[i>>2]=e;if(e>>>0<=f>>>0){a=pW(a,g,h,c,b,d)}else{a=-17408}return a|0}function WH(a){q[a+24>>2]=0;q[a+28>>2]=65537;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=1065353216;q[a+12>>2]=1056964608;q[a>>2]=0;q[a+4>>2]=0;o[a+32|0]=r[a+32|0]&248|4;return a}function Sw(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){Wt(a,b,(c+1|0)==(b|0),2);c=q[a+4>>2]}Ui(q[a>>2]+(c<<1)|0,0,b-c<<1)}q[a+4>>2]=b}}function Sla(a,b){var c=0,d=0;if(!b){Li=0;return 0}if(!(b&1)){while(1){c=c+1|0;d=b&2;b=(b&65534)>>>1|0;if(!d){continue}break}}a=(c<<3)+a|0;b=q[a>>2];Li=q[a+4>>2];return b}function Q8(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;c=a+16|0;e=q[a+40>>2];a=q[a+32>>2]-q[a+24>>2]|0;if((e|0)==a>>4){zA(c,a>>2,a>>3)}QI(c,Oi(b),Li,d+12|0);Ii=d+16|0}function Fxa(a){q[a+5820>>2]=0;p[a+5816>>1]=0;q[a+2872>>2]=283072;q[a+2864>>2]=a+2684;q[a+2860>>2]=283052;q[a+2852>>2]=a+2440;q[a+2848>>2]=283032;q[a+2840>>2]=a+148;CF(a)}function xx(a,b,c,d){var e=0;e=Iq(a,b,c);if(t[d>>2]>2]){Hl(c,d);if(t[c>>2]>=t[b>>2]){return e+1|0}Hl(b,c);if(t[b>>2]>=t[a>>2]){return e+2|0}Hl(a,b);e=e+3|0}return e}function cX(a,b,c,d){var e=0,f=0,g=0;g=-20352;a:{if(d>>>0<2){break a}e=q[c>>2];f=e+1|0;q[c>>2]=f;e=r[e|0];if(!e|e>>>0>d-1>>>0){break a}q[c>>2]=e+f;g=uy(a,b,f,e)}return g}function Tda(a,b){var c=0,d=0;c=b&65535;d=q[a+36>>2];a=q[a+32>>2];if(c>>>0<(d-a|0)/592>>>0){a=a+w(c,592)|0;a=s[a+568>>1]==(b>>>16|0)&s[a+570>>1]==(c|0)}else{a=0}return a}function No(a){var b=0;if(a){b=q[a+4>>2];if(b){Aj(b)}b=q[a+8>>2];if(b){Aj(b)}a:{if(o[a+40|0]&1){break a}b=q[a+20>>2];if(b){Ni(b)}b=q[a+12>>2];if(!b){break a}Ni(b)}Ni(a)}}function rW(a){if(a){ij(a+140|0);ij(a+152|0);ij(a+104|0);ij(a+32|0);ij(a+56|0);ij(a+44|0);ij(a+20|0);ij(a+8|0);ij(a+128|0);ij(a+116|0);ij(a+92|0);ij(a+80|0);ij(a+68|0)}}function qK(a,b,c,d){var e=0;e=bw(b,s[c+570>>1]|s[c+568>>1]<<16,d);if(!e){lk(a,q[c+560>>2],q[c+564>>2]);Bca(a,b,q[d>>2]);Ij(a,-3);e=rK(a,b,s[c+578>>1],q[d>>2])}return e}function hs(a){var b=0,c=0,d=0;b=Ii-32|0;Ii=b;c=q[a>>2];if((c|0)!=-1){q[b+16>>2]=0;c=am(c,3,b+16|0);d=q[a>>2];q[b>>2]=c&-2049;am(d,4,b);Qr(q[a>>2]);q[a>>2]=-1}Ii=b+32|0}function Tt(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){LN(a,b,(c+1|0)==(b|0));c=q[a+4>>2]}Ui(q[a>>2]+(c<<2)|0,0,b-c<<2)}q[a+4>>2]=b}}function KZ(a){a=a|0;var b=0,c=0;hm(a,2);Ri(a,2);xk(a,1);c=dq(a,0,-1,1);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=!c;q[a+8>>2]=q[a+8>>2]+16;Zq(a,1);return q[a+8>>2]-q[a+12>>2]>>4}function $va(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){Wt(a,b,(c+1|0)==(b|0),8);c=q[a+4>>2]}VP(q[a>>2]+(c<<3)|0,b-c|0)}q[a+4>>2]=b}}function to(a,b,c){if(a){a=q[a+84>>2];if(t[a+4>>2]>b>>>0){a=q[a>>2]+w(b,96)|0;b=q[a+4>>2];q[c>>2]=q[a>>2];q[c+4>>2]=b;a=0}else{a=-5}return a}J(8329,7192,2072,8363);G()}function qG(a,b,c){var d=0;d=Ii-16|0;Ii=d;c=Bza(b,c,1e6);q[d+8>>2]=c;c=Aza(c,Li,1e6,0);q[d+12>>2]=b-c;if((Ol(a,1,20,d+8|0,8)|0)<=-1){im(173656,792,q[240513])}Ii=d+16|0}function pG(a,b,c){var d=0;d=Ii-16|0;Ii=d;c=Bza(b,c,1e6);q[d+8>>2]=c;c=Aza(c,Li,1e6,0);q[d+12>>2]=b-c;if((Ol(a,1,21,d+8|0,8)|0)<=-1){im(173656,792,q[240513])}Ii=d+16|0}function eF(a,b){var c=0,d=0;c=Ii-48|0;Ii=c;if(q[b+8>>2]==3){v[c>>3]=v[b>>3];cu(c+16|0,142961,c);a=Yj(a,c+16|0,hj(c+16|0));q[b+8>>2]=4;q[b>>2]=a;d=1}Ii=c+48|0;return d}function cm(a,b,c){var d=0,e=0;d=Ii-80|0;Ii=d;e=-10;if(!qr(a,b,d+72|0)){a=q[d+76>>2];q[d+8>>2]=q[d+72>>2];q[d+12>>2]=a;q[d>>2]=1;Ti(c+32|0,d,72);e=0}Ii=d+80|0;return e}function cE(a,b){var c=0,d=0;a:{if(!(r[a+280|0]&4)){break a}d=-10240;c=b&-32770;a=q[a+292>>2];if((c|0)!=(a&c)){break a}return((a|b)&32769)==(b&32769)?0:-10240}return d}function Yba(a){a=a|0;var b=0;gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);a=jj(a,1);if(a>>>0>=16){Pi(3,202556,207384,0)}a=(a|0)<15?a:15;p[b+386>>1]=(a|0)>0?a:0;return 0}function U3(a){a=a|0;var b=0,c=x(0),d=0;d=fj(a,1);b=yj(a,16);q[b+4>>2]=0;q[b+8>>2]=0;c=x(x(d)*x(.5));u[b+12>>2]=Nl(c);u[b>>2]=Lk(c);Zi(a,-1e4,134032);xj(a,-2);return 1}function T3(a){a=a|0;var b=0,c=x(0),d=0;d=fj(a,1);b=yj(a,16);q[b+8>>2]=0;q[b>>2]=0;c=x(x(d)*x(.5));u[b+12>>2]=Nl(c);u[b+4>>2]=Lk(c);Zi(a,-1e4,134032);xj(a,-2);return 1}function S3(a){a=a|0;var b=0,c=x(0),d=0;d=fj(a,1);b=yj(a,16);q[b>>2]=0;q[b+4>>2]=0;c=x(x(d)*x(.5));u[b+12>>2]=Nl(c);u[b+8>>2]=Lk(c);Zi(a,-1e4,134032);xj(a,-2);return 1}function Rva(a,b,c){var d=0,e=0;d=q[a+4>>2];e=b+c|0;if(d>>>0>=e>>>0){if(c){b=q[a>>2]+b|0;bl(b,b+c|0,d-e|0);q[a+4>>2]=q[a+4>>2]-c}return}J(106588,106468,729,106512);G()}function FY(a){a=a|0;Ak(a,146225,257760);Zi(a,-1,146232);Si(a,-2,146239);vj(a,0,1);bj(a,146825,0);ej(a,-2);xj(a,-2);Ri(a,-2);ej(a,-2);Si(a,-2,146826);Ri(a,-2);return 1}function $M(a,b){var c=0;a:{if(b>>>0>127){break a}a=!r[906092]|(a|0)!=1;if(a){break a}b=(b<<6)+(a?0:906092)|0;a=b+8640|0;if(!r[a|0]){break a}o[b+8703|0]=0;c=a}return c}function Nta(a,b){var c=0,d=0;a=!r[906092]|(a|0)!=1;a:{if(a){break a}c=q[230860];if((c>>>0<64?c:64)>>>0<=b>>>0){break a}d=q[((b<<2)+(a?0:906092)|0)+17352>>2]}return d}function Lxa(a,b,c){var d=0,e=0,f=0;e=q[a+84>>2];d=c+256|0;f=Oq(e,0,d);d=f?f-e|0:d;c=c>>>0>d>>>0?d:c;Ti(b,e,c);b=e+d|0;q[a+84>>2]=b;q[a+8>>2]=b;q[a+4>>2]=c+e;return c}function K$(a,b,c){a=a|0;b=b|0;c=c|0;jp(a,2,143933);ej(a,1);Rk(a,0,1);if(!Vi(a,-1)){q[c>>2]=0;return 0}if(uk(a,-1)){Zq(a,3);return uj(a,3,c)|0}Qi(a,143959,0);return 0}function Ex(a,b,c){var d=0,e=0;d=hj(a)+a|0;a:{if(!c){break a}while(1){e=r[b|0];if(!e){break a}o[d|0]=e;d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}o[d|0]=0;return a}function Ej(a,b,c){var d=0,e=0,f=0;a:{if(!c){break a}while(1){d=r[a|0];e=r[b|0];if((d|0)==(e|0)){b=b+1|0;a=a+1|0;c=c-1|0;if(c){continue}break a}break}f=d-e|0}return f}function Dxa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;o[a+c|0]=128;e=b-c|0;if(e>>>0>=2){b=1;d=1;while(1){o[(b+c|0)+a|0]=0;d=d+1|0;b=d&255;if(e>>>0>b>>>0){continue}break}}}function tF(a){var b=0,c=0;b=q[a+16>>2];o[b+20|0]=67;as(a,b+28|0,-3);if(q[b+8>>2]>=1){while(1){as(a,q[b>>2]+(c<<2)|0,-3);c=c+1|0;if((c|0)>2]){continue}break}}}function rq(a){var b=0;a:{switch(a-1|0){case 1:return 1;case 3:return 2;case 7:return 3;case 15:return 4;case 31:return 5;default:b=-1;break;case 0:break a}}return b}function pca(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;tj(a,1,b+12|0);c=Uj(a,2);gj(a);d=_i(a,-1,q[213927],204267);Ri(a,-2);VJ(d,q[b+12>>2],(c|0)!=0);Ii=b+16|0;return 0}function j_(a){a=a|0;var b=0;b=q[a+8>>2];q[b+8>>2]=8;q[b>>2]=a;q[a+8>>2]=q[a+8>>2]+16;if(q[q[a+16>>2]+112>>2]==(a|0)){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}return 1}function ht(a){var b=0;if(a){aW(q[a+12>>2]);b=q[a+16>>2];q[b>>2]=-1;LW(b);VV(q[a+12>>2]);_V(q[a+8>>2]);BX(q[a+4>>2]);$W(q[a>>2]);Ni(q[a+16>>2]);Ni(q[a+12>>2]);Ni(a)}}function Yfa(a,b){a=a|0;b=b|0;a=mc(q[a>>2],b|0)|0;a:{if((a|0)!=-1|!(r[q[75054]+156|0]&64)){break a}if(!(K()|0)){break a}while(1){if(K()|0){continue}break}}return a|0}function PZ(a){a=a|0;var b=0;b=Vi(a,2);Dj(a,1,5);a:{switch(b|0){default:dk(a,2,144110);break;case 0:case 5:break a}}if(iF(a)){Qi(a,144132,0)}Ri(a,2);xj(a,1);return 1}function Lta(a,b){var c=0,d=0;a:{if(b>>>0>31){break a}a=(a|0)!=1;if(a){break a}c=r[906092];if(!c){break a}a=(b<<8)+(a?0:c?906092:0)|0;o[a+703|0]=0;d=a+448|0}return d}function IX(a,b,c){var d=0,e=0;if(q[a+224>>2]==1){d=q[a+212>>2];e=q[a+208>>2]+c|0;q[a+208>>2]=e;q[a+212>>2]=c>>>0>e>>>0?d+1|0:d;a=Sq(a+132|0,b,c)}else{a=-84}return a}function o_(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;hm(a,1);a:{if(!Uj(a,1)){q[b>>2]=Tl(a,2,143716,0);a=Qi(a,143713,b);break a}a=q[a+8>>2]-q[a+12>>2]>>4}Ii=b+16|0;return a|0}function nX(a,b){var c=0,d=0,e=0;d=q[b>>2];e=q[a>>2];a:{b:{if(!e){c=EE(a,d);if(!c){break b}break a}c=-20352;if((d|0)!=(e|0)){break a}}c=Eo(a+172|0,b+136|0)}return c}function mja(a){a=a|0;var b=0,c=0;b=q[a+20>>2];if(!b){return-2}b=d9(b);c=IL(q[a>>2],b,q[a+8>>2]);if(!c){q[q[a+24>>2]+8>>2]=b;return 0}iB(q[a>>2],b);hI(b);return c|0}function dda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,0);d=q[c+20>>2];e=q[c+16>>2];u[b+8>>2]=u[c+24>>2];q[b>>2]=e;q[b+4>>2]=d;Al(a,b);Ii=b+16|0;return 1}function cda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,0);d=q[c+36>>2];e=q[c+32>>2];u[b+8>>2]=u[c+40>>2];q[b>>2]=e;q[b+4>>2]=d;Al(a,b);Ii=b+16|0;return 1}function _ca(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,0);d=q[c+68>>2];e=q[c+64>>2];u[b+8>>2]=u[c+72>>2];q[b>>2]=e;q[b+4>>2]=d;Al(a,b);Ii=b+16|0;return 1}function Tga(a,b){a=a|0;b=b|0;var c=0,d=0;c=q[75054];if(c){q[c+100>>2]=b;q[c+96>>2]=a;d=q[c+40>>2];if(d){Mi[d|0](q[c+44>>2],a,b)}return}J(90258,88575,557,90268);G()}function MN(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){Wt(a,b,(c+1|0)==(b|0),1);c=q[a+4>>2]}Ui(q[a>>2]+c|0,0,b-c|0)}q[a+4>>2]=b}}function LF(a){var b=0,c=0,d=0;if(o[q[a>>2]]-48>>>0<10){while(1){b=q[a>>2];d=o[b|0];q[a>>2]=b+1;c=(w(c,10)+d|0)-48|0;if(o[b+1|0]-48>>>0<10){continue}break}}return c}function Fda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[tj(a,1,b+12|0)+412>>2]>>>27|0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=d&1;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function Dda(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;d=q[tj(a,1,b+12|0)+412>>2]>>>26|0;c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=d&1;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function DH(){var a=0;a=$i(40);q[a>>2]=0;q[a+4>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;return a}function zm(a){var b=0,c=0;b=a+12|0;c=q[a>>2]-b|0;a:{if(!c){b=q[a+4>>2];break a}bj(q[a+8>>2],b,c);q[a>>2]=b;b=q[a+4>>2]+1|0;q[a+4>>2]=b}fm(q[a+8>>2],b);q[a+4>>2]=1}function xw(a,b,c){var d=0;d=Ii-16|0;Ii=d;a:{if(!Ep(a,b,c)){q[d>>2]=q[c+8>>2];Pi(4,19759,19770,d);break a}a=b?q[b+120>>2]:0;if(pv(a,c)){break a}Pm(a,0,0)}Ii=d+16|0}function uqa(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=Zm(a,1);u[b>>2]=u[c>>2];u[b+4>>2]=u[c+4>>2];u[b+8>>2]=u[c+8>>2];u[b+12>>2]=u[c+12>>2];hr(a,b);Ii=b+16|0;return 1}function os(a,b,c){var d=0,e=0;d=Ii-16|0;o[d+15|0]=0;if(c){while(1){o[d+15|0]=r[d+15|0]|r[a+e|0]^r[b+e|0];e=e+1|0;if((e|0)!=(c|0)){continue}break}}return r[d+15|0]}function hT(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;q[d+8>>2]=b;a=hb(a|0,d+8|0,1,d+4|0)|0;b=0;a:{if(!a){break a}q[240513]=a;b=-1}Ii=d+16|0;return b?-1:q[d+4>>2]}function ex(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;q[d+8>>2]=b;a=Ma(a|0,d+8|0,1,d+4|0)|0;b=0;a:{if(!a){break a}q[240513]=a;b=-1}Ii=d+16|0;return b?-1:q[d+4>>2]}function Rya(){q[75041]=0;q[75042]=0;q[75039]=88524;q[75043]=0;q[75044]=0;q[75045]=0;q[75046]=0;o[300188]=r[300188]&254;q[75050]=0;q[75051]=0;q[75048]=0;q[75049]=0}function Goa(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;a=mK(q[q[q[a+16>>2]>>2]+8>>2]);c=0;a:{if(!a){break a}q[b>>2]=a;Pi(4,40439,42282,b);c=-1e3}a=c;Ii=b+16|0;return a|0}function Doa(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;a=$J(q[q[q[a+16>>2]>>2]+8>>2]);c=0;a:{if(!a){break a}q[b>>2]=a;Pi(4,40439,42239,b);c=-1e3}a=c;Ii=b+16|0;return a|0}function SA(a){var b=0,c=0;b=q[a+8>>2]-q[a+12>>2]|0;gj(a);c=Ck(a,-1,q[213927]);Ri(a,-2);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(202212,202233,187,202255);G()}return c}function yta(a,b){var c=0,d=0,e=0;c=q[a+8>>2];d=q[a+4>>2]-c|0;if((d|0)>=4){e=r[c|0]|r[c+1|0]<<8|(r[c+2|0]<<16|r[c+3|0]<<24);q[a+8>>2]=c+4;q[b>>2]=e}return(d|0)>3}function yH(a,b,c){var d=0,e=0;if(c){while(1){d=q[(e<<2)+b>>2];Vz(a,q[d+8>>2],q[d+12>>2],q[d>>2],s[d+24>>1],q[d+16>>2]);e=e+1|0;if((e|0)!=(c|0)){continue}break}}}function LS(a){a=a|0;q[a+8>>2]=1732584193;q[a+12>>2]=-271733879;q[a>>2]=0;q[a+4>>2]=0;q[a+24>>2]=-1009589776;q[a+16>>2]=-1732584194;q[a+20>>2]=271733878;return 0}function wda(a){a=a|0;var b=0,c=0;gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);b=q[b+396>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Rca(a){a=a|0;var b=0,c=0;gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);b=q[b+392>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function sqa(a){a=a|0;var b=0,c=0;b=Ii-32|0;Ii=b;Ip(b,Zm(a,1));u[b+16>>2]=u[b>>2];c=q[b+8>>2];q[b+20>>2]=q[b+4>>2];q[b+24>>2]=c;Al(a,b+16|0);Ii=b+32|0;return 1}function eda(a){a=a|0;var b=0,c=0,d=0,e=0;b=Ii-16|0;Ii=b;c=tj(a,1,0);d=q[c+4>>2];e=q[c>>2];u[b+8>>2]=u[c+8>>2];q[b>>2]=e;q[b+4>>2]=d;Al(a,b);Ii=b+16|0;return 1}function XF(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+8>>2]=0;q[d>>2]=1;q[d+4>>2]=0;b=b+12|0;a=yl(d,a+4|0,b);if(!a){a=Gu(b,d,(Jj(b,0)|0)!=0&c)}ij(d);Ii=d+16|0;return a}function U6(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;if((b|0)!=(d|0)){q[e+4>>2]=b;q[e>>2]=d;Pi(4,30905,30994,e);Ii=e+16|0;return-13}a=Ej(a,c,d);Ii=e+16|0;return a?-20:0}function Pl(a,b,c){var d=0,e=0;d=Ii-32|0;Ii=d;q[d+20>>2]=1;q[d+16>>2]=(c|0)<0?-1:1;e=c>>31;q[d+12>>2]=e^c+e;q[d+24>>2]=d+12;a=yl(a,b,d+16|0);Ii=d+32|0;return a}function uC(a,b){var c=0;c=Ii-16|0;Ii=c;Vj(a);pl(a,b,0);pZ(q[a+48>>2],b);if(q[a+16>>2]!=93){b=q[a+52>>2];q[c>>2]=tl(a,93);Sj(a,oj(b,141919,c))}Vj(a);Ii=c+16|0}function qX(a){if(a){ij(a+112|0);ij(a+100|0);ij(a+88|0);ij(a+76|0);ij(a- -64|0);ij(a+52|0);ij(a+40|0);ij(a+28|0);ij(a+16|0);ij(a+4|0);Mi[q[65677]](a,0,124)|0}}function oD(a){var b=0,c=0,d=0;b=q[a+184>>2];d=a;if(r[q[a>>2]+184|0]&2){c=q[a+100>>2]}else{b=b+8|0;c=q[a+100>>2]+8|0}q[d+108>>2]=c;q[a+192>>2]=b;fs(a,0);Ix(a)}function WE(a,b,c){a:{b=hk(a,b,c,3);if(b){break a}b=c;c=q[c>>2];q[b>>2]=c-1;b=-104;if(c>>>0<2){break a}b=a;a=q[a>>2];q[b>>2]=a+1;return r[a|0]?-104:0}return b}function Jm(a,b,c,d){c=yl(b,c,d);a:{if(c){break a}a=a+4|0;while(1){c=0;if(q[b>>2]>-1){break a}if(!Jj(b,0)){break a}c=Rl(b,b,a);if(!c){continue}break}}return c}function $C(a){var b=0;q[a+24>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=-2;q[a+4>>2]=1023;b=a;a=Yi(1023);q[b>>2]=a;if(!a){Qt(139998);G()}o[a|0]=0}function zW(a,b){var c=0,d=0,e=0;c=q[a+68>>2];if(c){d=c;c=a+52|0;o[d+c|0]=1;e=q[a+68>>2];d=e+1|0;q[a+68>>2]=d;Ui(c+d|0,0,15-e|0);$x(a,1,c,0)}kT(a,b);return 0}function zQ(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;kj(a,1,b+12|0);d=q[b+12>>2];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=d|0;q[a+8>>2]=q[a+8>>2]+16;Ii=b+16|0;return 1}function qW(a,b,c,d,e,f,g){var h=0;h=-16640;a:{switch(q[a+164>>2]){case 0:return kW(a,b,c,d,e,f,g);case 1:h=mW(a,b,c,d,e,f,g);break;default:break a}}return h}function oW(a,b,c,d,e,f,g){var h=0;h=-16640;a:{switch(q[a+164>>2]){case 0:return iW(a,b,c,d,e,f,g);case 1:h=gW(a,b,c,d,e,f,g);break;default:break a}}return h}function jG(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e+8>>2]=0;if(!a){J(209580,209588,102,209619);G()}a=Mi[q[q[a+8>>2]+20>>2]](q[a+4>>2],b,c,d)|0;Ii=e+16|0;return a}function Vy(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=a>>>24;q[b>>2]=a&255;q[b+8>>2]=a>>>16&255;q[b+4>>2]=a>>>8&255;cp(962032,16,218244,b);Ii=b+16|0;return 962032}function HK(a){a=a|0;var b=0;a:{if(a){wa(q[a>>2]);if(r[q[75054]+156|0]&64){b=K()|0;if(b){break a}}Ni(a)}return}lj(b,92175,2093);J(88669,88575,2093,92175);G()}function H1(a){a=a|0;var b=0,c=0;if(q[a+33904>>2]){while(1){c=a;if(q[a+33908>>2]){b=0}else{b=lG(a)}q[c+33912>>2]=b;Xn(8e3);if(q[a+33904>>2]){continue}break}}}function a_(a){a=a|0;var b=0;b=Tl(a,2,143925,0);Dj(a,1,6);Ri(a,3);if(Dy(a,1083,0,b)){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;xk(a,-2);a=2}else{a=1}return a|0}function Y4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;ej(a,-10002);Ak(a,126181,252272);Ri(a,-3);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(126187,125782,210,126208);G()}}function Un(a){var b=0,c=0;b=a*a;c=b*a;return x(c*(b*b)*(b*2718311493989822e-21+ -.00019839334836096632)+(c*(b*.008333329385889463+ -.16666666641626524)+a))}function Rea(a){q[a>>2]=0;q[a+4>>2]=0;o[a+50|0]=0;p[a+48>>1]=0;q[a+40>>2]=1;q[a+32>>2]=640;q[a+36>>2]=480;q[a+8>>2]=0;q[a+12>>2]=0;q[a+44>>2]=87615;return a}function P4(a){var b=0;b=q[a+8>>2]-q[a+12>>2]|0;ej(a,-10002);Ak(a,136288,253376);Ri(a,-3);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(136293,136314,150,136337);G()}}function P1(a,b){var c=0;c=q[239672];if(c){c=q[c+16>>2];if(!c){o[a+60|0]=r[a+60|0]&251|(b?0:4);return 0}Gj(c);o[a+60|0]=r[a+60|0]&251|(b?0:4);Bj(c)}return 0}function Mja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[64674],b+12|0)){q[q[a+24>>2]+8>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function Gy(a){var b=0,c=0,d=0;b=-1;a:{if(a>>>0<256){c=a;break a}while(1){b=b+8|0;d=a>>>0>65535;c=a>>>8|0;a=c;if(d){continue}break}}return r[c+141072|0]+b|0}function F_(a){a=a|0;var b=0,c=0;b=jj(a,2);Dj(a,1,5);c=q[a+8>>2];q[c+8>>2]=3;b=b+1|0;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;rj(a,1,b);return((Vi(a,-1)|0)!=0)<<1}function CX(a){var b=0,c=0,d=0;if((a|0)<0){return 0}b=-2147483648;while(1){a:{d=c+1|0;if(c>>>0>30){break a}c=d;b=b>>>1|0;if(!(b&a)){continue}}break}return d}function iG(a,b,c,d){a:{if(a){if(!b){break a}return Mi[q[q[b+8>>2]+28>>2]](q[b+4>>2],c,d)|0}J(209626,209588,108,209634);G()}J(209580,209588,109,209634);G()}function dra(a,b){var c=0,d=0;c=q[b+96>>2];d=q[b+100>>2];if((c|0)!=q[71492]|(d|0)!=q[71493]){xr(a+3144|0,c,d);a=q[71493];q[b+96>>2]=q[71492];q[b+100>>2]=a}}function Sr(a){var b=0;Sva(a,q[a>>2],q[a>>2]+q[a+4>>2]|0);b=a+12|0;Yva(b,q[b>>2],q[b>>2]+(q[b+4>>2]<<2)|0);a=a+24|0;Vva(a,q[a>>2],q[a>>2]+(q[a+4>>2]<<1)|0)}function QM(a,b,c){var d=0,e=0;d=q[a+4>>2];e=q[a+8>>2];b=e+b|0;if(d>>>0>=b>>>0){q[a+8>>2]=b;a=q[a>>2];q[c+8>>2]=e;q[c+4>>2]=b;q[c>>2]=a}return b>>>0<=d>>>0}function Jj(a,b){var c=0,d=0;c=Ii-32|0;Ii=c;q[c+20>>2]=1;q[c+16>>2]=(b|0)<0?-1:1;d=b>>31;q[c+12>>2]=d^b+d;q[c+24>>2]=c+12;a=_j(a,c+16|0);Ii=c+32|0;return a}function Ix(a){var b=0,c=0,d=0;b=q[a+108>>2];c=q[q[a>>2]+184>>2]&2;d=b+(c?13:5)|0;q[a+120>>2]=d;q[a+116>>2]=d;q[a+112>>2]=(c?11:3)+b;q[a+104>>2]=(c?3:-8)+b}function h8(a){a=a|0;var b=0;a=qj(a,1);Hv(q[a>>2]);a:{if(o[a+32|0]&1){break a}b=q[a+12>>2];if(b){Ni(b)}b=q[a+4>>2];if(!b){break a}Ni(b)}q[a>>2]=0;return 0}function g0(a){a=a|0;var b=0;if(!q[Lm(a,145545)>>2]){Qi(a,145617,0)}ej(a,1);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;qk(a,1135,2);return 1}function Zca(a){a=a|0;var b=0,c=0;b=Ii-32|0;Ii=b;tj(a,1,b+28|0);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);Xl(b,c,q[b+28>>2],7);lo(a,b);Ii=b+32|0;return 1}function Wj(){var a=0,b=0;b=Ii-16|0;Ii=b;a=$i(28);q[a>>2]=0;q[a+4>>2]=0;q[a+24>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;Ii=b+16|0;return a}function Kja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-13;if(!Qj(q[a+12>>2],q[a+16>>2],q[62572],b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function It(a,b,c){var d=0;d=Ii-32|0;Ii=d;a:{if(r[b|0]==r[q[56654]]){a=Wl(b,c);b=Li;break a}ut(d,a+104|0,0);Cl(d,b,c);a=ro(d);b=Li}Ii=d+32|0;Li=b;return a}function ER(a,b,c){var d=0;a:{b:{if((c|0)!=1){break b}c=q[q[a>>2]+184>>2]>>>6&7;if(!c){break b}d=0;if((c|0)==r[b|0]){break a}}Xj(a,2,40);d=-31104}return d}function DQ(a){a=a|0;var b=0;b=Ii-1040|0;Ii=b;Dj(a,1,6);Ri(a,1);q[b+4>>2]=0;q[b+8>>2]=a;q[b>>2]=b+12;if(WY(a,b)){Qi(a,146351,0)}zm(b);Ii=b+1040|0;return 1}function gU(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=a+4;q[b>>2]=q[a>>2];a=Na(956480,33345,b|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}Ii=b+16|0;return a}function VH(a){q[a+44>>2]=0;p[a+40>>1]=65535;q[a+32>>2]=-1;q[a+36>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+24>>2]=0;return a}function Ssa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=Ii-16|0;Ii=d;a=q[a+272>>2];if(a){q[d+8>>2]=c;q[d+4>>2]=b;o[d|0]=1;KG(a?q[a+120>>2]:0,4224,11,d)}Ii=d+16|0}function RS(a,b,c){o[a+75|0]=255;a:{b:{switch(b-1|0){case 1:q[a+48>>2]=0;break a;case 0:break b;default:break a}}o[a+75|0]=10}q[a>>2]=q[a>>2]|64;return 0}function Kl(a,b,c,d){var e=0,f=0;e=w(b,c);f=e;a:{if(q[d+76>>2]<=-1){a=sC(a,e,d);break a}a=sC(a,e,d)}if((f|0)==(a|0)){return b?c:0}return(a>>>0)/(b>>>0)|0}function G0(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;g=Ii-176|0;Ii=g;vy(g);a=DE(g,a);if(!a){a=_F(g,b,c,d,e,f)}Ju(g);Ii=g+176|0;return a|0}function zda(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);lk(a,rea(c,q[b+12>>2]),Li);Ii=b+16|0;return 1}function pm(a){var b=0;a:{if(q[a+76>>2]<=-1){a=oO(a);b=Li;break a}a=oO(a);b=Li}if((b|0)>0?1:(b|0)>=0?a>>>0>=2147483648:0){q[240513]=61;return-1}return a}function jia(a){var b=0;a=q[a>>2];b=q[a+8>>2]-q[a+12>>2]>>4;Ak(a,69839,232368);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){J(69855,69876,126,69926);G()}}function cia(a){var b=0;a=q[a>>2];b=q[a+8>>2]-q[a+12>>2]>>4;Ak(a,79863,232912);Ri(a,-2);if(q[a+8>>2]-q[a+12>>2]>>4!=(b|0)){J(79869,79890,725,79930);G()}}function Vca(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);tj(a,1,b+12|0);lk(a,iea(c,q[b+12>>2]),Li);Ii=b+16|0;return 1}function Kr(a){var b=0;b=q[a+24>>2];if(b){yB(q[a+12>>2],q[a+16>>2],q[a+20>>2],b);return}if(!q[a+16>>2]){b=q[a+32>>2];q[a+12>>2]=q[a+28>>2];q[a+16>>2]=b}}function Jp(a){var b=0,c=0;b=q[a+80>>2];c=q[b+3128>>2];a=q[a+140>>2]&32767;if(a>>>0>=q[b+3132>>2]-c>>6>>>0){J(12419,9962,479,9454);G()}return c+(a<<6)|0}function $K(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-2;if(!Qj(q[a+12>>2],q[a+16>>2],q[62034],b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function yka(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-2;if(!Qj(q[a+12>>2],q[a+16>>2],261680,b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function yK(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e+12>>2]=d;d=-4;if(q[a+216>>2]!=q[a+208>>2]-q[a+200>>2]>>4){Em(a+192|0,b,c,e+12|0);d=0}Ii=e+16|0;return d}function xo(a){var b=0;q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;b=a+12|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;b=a+24|0;q[b+8>>2]=0;q[b>>2]=0;q[b+4>>2]=0;return a}function uka(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-2;if(!Qj(q[a+12>>2],q[a+16>>2],233496,b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function sja(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-2;if(!Qj(q[a+12>>2],q[a+16>>2],262464,b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function pW(a,b,c,d,e,f){var g=0;g=-16640;a:{switch(q[a+164>>2]){case 0:return jW(a,b,c,d,e,f);case 1:g=lW(a,b,c,d,e,f);break;default:break a}}return g}function _K(a){a=a|0;var b=0,c=0;c=q[a>>2];a=q[q[a+8>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}b=q[a+4>>2];if(b){cj(c,b)}b=q[a+8>>2];if(b){cj(c,b)}Ni(a);return 0}function Uia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=-2;if(!Qj(q[a+12>>2],q[a+16>>2],261104,b+12|0)){q[q[a+24>>2]>>2]=q[b+12>>2];c=0}Ii=b+16|0;return c|0}function Iaa(a,b){var c=0;if(!(!a|!b|q[a+16>>2]>-1)){c=q[a+4>>2];q[b>>2]=q[a>>2];q[b+4>>2]=c;c=q[a+12>>2];q[b+8>>2]=q[a+8>>2];q[b+12>>2]=c;c=1}return c}function Hra(a){var b=0;if(a){b=q[a+4>>2];if(b){Mi[b|0](q[a+8>>2])}b=q[a+16>>2];if(b){Mi[b|0](q[a+20>>2])}b=q[a+28>>2];if(b){Mi[b|0](q[a+32>>2])}Ni(a)}}function Dy(a,b,c,d){var e=0;e=Ii-32|0;Ii=e;q[e+20>>2]=c;q[e+16>>2]=b;q[e+24>>2]=a;q[e+8>>2]=0;q[e+12>>2]=0;a=FZ(a,e+8|0,d?d:140592);Ii=e+32|0;return a}function Dga(a,b){a=a|0;b=b|0;Wa(q[b>>2]);a:{if(!(r[q[75054]+156|0]&64)){break a}a=K()|0;if(!a){break a}lj(a,92194,2125);J(88669,88575,2125,92194);G()}}function z_(a){a=a|0;var b=0,c=0;b=kj(a,1,0);kj(a,2,0);b=Oy(a,b);c=q[a+8>>2];q[c+8>>2]=0;q[a+8>>2]=c+16;xk(a,-2);Xi(a,(b|0)==1?144780:144787);return 3}function Yda(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;b=qj(a,1);c=kj(a,2,0);lk(a,(e=b,f=c,g=hj(c),d=q[q[b+12>>2]+12>>2],Mi[d](e|0,f|0,g|0)|0),Li);return 1}function WR(a,b){a=a|0;b=b|0;var c=0;c=Ii-224|0;Ii=c;_p(c+8|0);ny(c+8|0,q[a+68>>2]+888|0);qs(c+8|0,b);a=c+8|0;if(a){Mi[q[65677]](a,0,216)|0}Ii=c+224|0}function Bu(a,b,c,d){var e=0;e=Ii-224|0;Ii=e;_p(e+8|0);Zp(e+8|0,d);Yp(e+8|0,a,b);qs(e+8|0,c);a=e+8|0;if(a){Mi[q[65677]](a,0,216)|0}Ii=e+224|0;return 0}function mH(a,b){var c=0;c=Ii-32|0;Ii=c;q[c+28>>2]=b;o[c+20|0]=255;b=c+32|0;q[c+16>>2]=b;q[c+12>>2]=b;q[c+8>>2]=c+28;a=lH(a,c+8|0);Ii=c+32|0;return a}function l8(a){q[a+2136>>2]=-1;q[a+2140>>2]=0;q[a+2044>>2]=q[a+2040>>2];q[a+2108>>2]=q[a+2104>>2];q[a+2060>>2]=q[a+2056>>2];q[a+2124>>2]=q[a+2120>>2]}function kQ(a){$t(a,137611,253680);$t(a,137623,253680);$t(a,137635,253680);Cq(a,137611,137647);Cq(a,137623,137647);Cq(a,137635,137647);Io(a,0,253872)}function hwa(a,b){var c=0,d=0;c=Ii-224|0;Ii=c;d=a;a=c+72|0;d=Tn(d,a,0,1);if(d){if(q[a+104>>2]!=8){Zo(a,c)}Tw(a,c,b);PN(a,c,b+8|0)}Ii=c+224|0;return d}function csa(a,b){a=a|0;b=b|0;p[b+104>>1]=250;q[b+100>>2]=q[b+100>>2]&-131073|131072;q[b+20>>2]=33;q[b+24>>2]=34;q[b+44>>2]=35;q[b+52>>2]=36;return 0}function YP(a){$t(a,137981,254048);$t(a,137996,254048);Cq(a,137981,138013);Cq(a,137996,138013);Cq(a,137981,138022);Cq(a,137996,138022);Io(a,0,254208)}function P9(a){var b=0;b=$i(32);q[b>>2]=0;q[b+4>>2]=0;q[b+24>>2]=0;q[b+28>>2]=0;q[b+16>>2]=0;q[b+20>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=a;return b}function L_(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;rj(a,-10001,1);c=q[qj(a,-1)>>2];if(!c){q[b>>2]=145819;Qi(a,145850,b)}a=QF(a,c,1);Ii=b+16|0;return a|0}function G_(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;rj(a,-10001,2);c=q[qj(a,-1)>>2];if(!c){q[b>>2]=145830;Qi(a,145850,b)}a=PF(a,c,1);Ii=b+16|0;return a|0}function zia(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];iw(b,a);if(a){a:{if(o[a+20|0]&1){break a}b=q[a+8>>2];if(!b){break a}Ni(b)}Ni(a)}return 0}function sp(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e>>2]=b;Pi(0,24640,26029,e);q[a+8>>2]=d;q[a+4>>2]=c;q[a>>2]=b;q[a+12>>2]=q[72006];q[72006]=a;Ii=e+16|0}function XG(a){var b=0;a:{b=Bw(a);if(b){break a}b=SA(a);if(b){b=q[q[b+376>>2]+12>>2];if(b){break a}}Qi(a,58927,0);return 0}return q[q[b+80>>2]+8>>2]}function K1(a,b,c){var d=0;d=q[q[239672]+16>>2];if(d){Gj(d);o[a+61|0]=c;o[a+60|0]=r[a+60|0]&254|b;Bj(d);return}o[a+61|0]=c;o[a+60|0]=r[a+60|0]&254|b}function BC(a,b,c){var d=0;d=-1;a:{if(cx(a+80|0,b+112|0)){break a}if(!(q[b+28>>2]<3?c:0)){if(!q[b+284>>2]){break a}if(cE(b,4)){break a}}d=0}return d}function B6(a){var b=0,c=0;b=$i(24);q[b>>2]=0;q[b+4>>2]=0;c=b+8|0;q[c>>2]=0;q[c+4>>2]=0;Wi(2,16,b,c,b+4|0);c=Wj();q[b+16>>2]=a;q[b+20>>2]=c;return b}function zD(a){var b=0,c=0;c=q[q[a+68>>2]+132>>2];b=c-1|0;a:{if(b>>>0<=11){b=q[(b<<2)+264192>>2];break a}b=0}if(b){return hE(a,c)?-1:0}return-27648}function d2(){var a=0,b=0,c=0,d=0;b=Ii-32|0;Ii=b;a=q[79309];if(a){c=a?q[a>>2]:0;d=nj(b+8|0,c,0,125782,60);if(ov(a)){Pm(c,1,0);rz(a)}mj(d)}Ii=b+32|0}function Eza(a){var b=0,c=0,d=0,e=0,f=0;while(1){f=b;d=c;if(a|e){d=a;a=a-1&a;e=e-(d>>>0<1)&e;b=b+1|0;c=b>>>0<1?c+1|0:c;continue}break}Li=d;return f}function DE(a,b){var c=0;a:{c=BE(a,b);if(c){break a}c=wk(a+124|0,b+124|0);if(c){break a}c=Eo(a+136|0,b+136|0);if(c){break a}return 0}Ju(a);return c}function $ra(a){a=a|0;var b=0;a=q[a+4>>2];if(!a){return-1e3}Fz(q[a+16>>2]);a:{if(o[a+12|0]&1){break a}b=q[a>>2];if(!b){break a}Ni(b)}Ni(a);return 0}function zV(a,b,c){var d=0;d=-28928;a:{if(!a|!q[a>>2]){break a}d=AD(a);if(d){break a}if(q[a+4>>2]!=16){d=ps(a);if(d){break a}}d=aR(a,b,c)}return d}function tw(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e>>2]=b;Pi(0,5642,5653,e);q[a+8>>2]=d;q[a+4>>2]=c;q[a+12>>2]=b;q[a>>2]=q[71400];q[71400]=a;Ii=e+16|0}function ky(a,b,c,d){var e=0;e=r[d|0];if((c|0)==1){q[a>>2]=(e^255)+2;a=r[d+1|0];q[b>>2]=(a|0)==255?2:(a^255)+1|0;return}q[a>>2]=e;q[b>>2]=r[d+1|0]}function ioa(a,b){var c=0;c=q[a+228>>2];if(!c){c=q[q[a+216>>2]+8>>2]}_z(c,q[a+240>>2],u[a+48>>2],(s[a+246>>1]&16)>>>4|0,u[a+232>>2],u[a+236>>2],b)}function cF(a){var b=0,c=0;b=q[a+16>>2];if(t[b+68>>2]>=t[b+64>>2]){om(a)}b=CZ(a);c=q[a+8>>2];q[c+8>>2]=8;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return b}function UQ(a,b){q[a+4>>2]=q[b+4>>2];q[a>>2]=q[b>>2];q[a+8>>2]=q[b+8>>2];q[a+12>>2]=q[b+16>>2];q[a+16>>2]=q[b+12>>2];q[a+20>>2]=q[b+128>>2]>>1} - - - -function Q2(a){a=a|0;var b=0,c=0;b=Ii-80|0;Ii=b;c=kj(a,1,0);q[b+4>>2]=_s(_i(a,2,q[79321],0),b+16|0,64);q[b>>2]=c;Lj(a,129097,b);Ii=b+80|0;return 1}function I_(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=q[Lm(a,145545)>>2];a:{if(!c){bj(a,145795,13);break a}q[b>>2]=c;Lj(a,145809,b)}Ii=b+16|0;return 1}function wta(a,b){var c=0,d=0,e=0;c=q[a+8>>2];d=q[a+4>>2];if(c>>>0>d>>>0){J(23111,23130,45,23171);G()}e=a;a=b+c|0;q[e+8>>2]=a;return a>>>0<=d>>>0}function tca(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);a=Uj(a,2);q[c+412>>2]=q[c+412>>2]&-134217729|a<<27&134217728;Ii=b+16|0;return 0}function hF(a){var b=0,c=0;if(a>>>0<16){b=8}else{b=1;while(1){b=b+1|0;c=a+1|0;a=c>>>1|0;if(c>>>0>31){continue}break}b=b<<3}return a>>>0<8?a:b|a-8}function aX(a){var b=0,c=0;c=q[a+224>>2];if((c|0)<=19){b=w(c,20)+a|0;q[b+244>>2]=1;q[b+240>>2]=32;q[b+232>>2]=0;q[b+228>>2]=1327;q[a+224>>2]=c+1}}function _Q(a,b,c){q[c>>2]=0;a=a+16384|0;if(!(a>>>0>>0|a-b>>>0<6)){o[b+4|0]=1;o[b+5|0]=0;o[b|0]=0;o[b+1|0]=11;o[b+2|0]=0;o[b+3|0]=2;q[c>>2]=6}}function ZQ(a,b,c,d){q[d>>2]=0;b=b+16384|0;if(!(!(q[a+184>>2]&16384)|b>>>0>>0|b-c>>>0<4)){o[c|0]=0;o[c+1|0]=4;o[c+2|0]=0;o[c+3|0]=0;q[d>>2]=4}}function WL(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=Zm(a,1);u[b>>2]=u[c+32>>2];u[b+4>>2]=u[c+36>>2];u[b+8>>2]=u[c+40>>2];Al(a,b);Ii=b+16|0;return 1}function uP(a,b,c){var d=0;d=Ii-144|0;Ii=d;d=Ui(d,0,144);q[d+76>>2]=-1;q[d+44>>2]=a;q[d+32>>2]=1617;q[d+84>>2]=a;a=NC(d,b,c);Ii=d+144|0;return a}function tua(a,b){var c=0;c=q[a+4>>2];if((c|0)==q[a+8>>2]){J(148081,147927,533,148105);G()}q[a+4>>2]=c+8;a=q[b+4>>2];q[c>>2]=q[b>>2];q[c+4>>2]=a}function kua(){var a=0,b=0,c=0;a=$i(16);p[a+12>>1]=0;b=Yi(512);q[a>>2]=b;c=Yi(256);q[a+4>>2]=c;Ui(b,0,512);Ui(c,0,256);q[a+8>>2]=128;q[210908]=a}function jja(a){a=a|0;var b=0;b=q[q[a+32>>2]+8>>2];iB(q[a>>2],b);if(a9(b,q[a+20>>2],q[a+24>>2])){a=IL(q[a>>2],b,q[a+16>>2])}else{a=-1}return a|0}function ax(a){var b=0,c=0;b=Ii-16|0;Ii=b;c=-1;a:{if(nC(a)){break a}if((Mi[q[a+32>>2]](a,b+15|0,1)|0)!=1){break a}c=r[b+15|0]}Ii=b+16|0;return c}function Yt(a,b,c){o[a+7|0]=b;o[a+6|0]=(c&255)<<24|b>>>8;o[a+5|0]=(c&65535)<<16|b>>>16;o[a+4|0]=(c&16777215)<<8|b>>>24;o[a+3|0]=c;o[a+2|0]=c>>>8}function Qba(a){a=a|0;var b=0,c=0,d=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);a=kj(a,2,0);d=q[c+420>>2];if(d){Ni(d)}q[c+420>>2]=Pk(a);Ii=b+16|0;return 0}function Oda(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;tj(a,1,b+12|0);gj(a);c=_i(a,-1,q[213927],204267);Ri(a,-2);cw(c,q[b+12>>2],0);Ii=b+16|0;return 0}function rca(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);a=Uj(a,2);q[c+412>>2]=q[c+412>>2]&-67108865|a<<26&67108864;Ii=b+16|0;return 0}function opa(a){a=a|0;var b=0;b=q[q[a+12>>2]>>2];a:{if(r[b+58|0]&2){a=q[a+4>>2];pM(q[b+36>>2],a,1);b=1;if(r[a+957|0]&8){break a}}b=0}return b|0}function g9(a,b){var c=0;c=q[a+4>>2];a=q[a>>2];if((c-a|0)/18568>>>0<=b>>>0){J(151947,151192,479,151403);G()}return q[(a+w(b,18568)|0)+18556>>2]}function e9(a,b){var c=0;c=q[a+4>>2];a=q[a>>2];if((c-a|0)/18568>>>0<=b>>>0){J(151947,151192,479,151403);G()}return q[(a+w(b,18568)|0)+18552>>2]}function Ysa(a,b){a=a|0;b=b|0;a:{if(a){if(!b){break a}q[b>>2]=q[a+28>>2];return}J(213569,213519,212,213831);G()}J(213854,213519,213,213831);G()}function vta(a,b){var c=0;c=b;b=q[a+40>>2]+15&-16;c=c+b|0;q[a+40>>2]=c;if(!(r[a+44|0]|t[a+36>>2]>=c>>>0)){J(24076,24107,86,24177);G()}return b}function us(a,b){var c=0;c=on(b,1);a:{if(c){break a}a=a+4|0;while(1){c=0;if((_j(b,a)|0)<0){break a}c=nn(b,b,a);if(!c){continue}break}}return c}function n_(a){a=a|0;var b=0;b=gC(a,Gn(a,-10003),q[a+8>>2]-q[a+12>>2]>>4);if((b|0)<=-1){if(uk(a,-1)){Ms(a,1);xk(a,-2);fm(a,2)}Fo(a)}return b|0}function W_(a){a=a|0;if((Vi(a,1)|0)==-1){rj(a,-10001,2)}if(!q[Lm(a,145545)>>2]){Qi(a,145617,0)}Js(a,1);Zi(a,-1,145646);return Mi[Cy(a)|0](a)|0}function Mya(){q[79132]=Oi(113577);q[79133]=Li;q[79134]=Oi(113586);q[79135]=Li;q[79136]=Oi(113596);q[79137]=Li;q[79138]=Oi(113602);q[79139]=Li}function MV(a,b){if(q[a+20>>2]<=2){q[q[a+68>>2]+1104>>2]=1407;return}a=q[a+68>>2];if(q[b+12>>2]==7){q[a+1104>>2]=1408;return}q[a+1104>>2]=1409}function $S(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;if(q[a+4>>2]==(c|0)){a=qW(a,g,h,e,b,d,f)}else{a=-16512}return a|0}function wsa(a){a=a|0;a:{if(r[a+148|0]){Dsa(a);a=q[a+144>>2];break a}a=q[a+144>>2];if(a){break a}return-1}return((a|0)==1?1:(a|0)==-1?-1:0)|0}function vj(a,b,c){var d=0;d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}d=q[a+8>>2];b=lp(a,b,c);q[d+8>>2]=5;q[d>>2]=b;q[a+8>>2]=q[a+8>>2]+16}function oS(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=q[a+20>>2];d=q[a+16>>2]-e|0;d=c>>>0>>0?c:d;Ti(e,b,d);q[a+20>>2]=d+q[a+20>>2];return c|0}function gca(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=tj(a,1,b+12|0);a=Uj(a,2);q[c+412>>2]=q[c+412>>2]&-524289|((a|0)!=0)<<19;Ii=b+16|0;return 0}function bsa(a){a=a|0;var b=0,c=0;b=1;a=q[q[a+16>>2]>>2];c=q[a>>2];if(q[c+12>>2]==-2){b=q[c+16>>2]!=-2}p[a+32>>1]=s[a+32>>1]&65534|b;return 0}function bj(a,b,c){var d=0;d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}d=q[a+8>>2];b=Yj(a,b,c);q[d+8>>2]=4;q[d>>2]=b;q[a+8>>2]=q[a+8>>2]+16}function Yxa(a,b,c,d){var e=0,f=0;f=d&65535;d=d>>>16&32767;a:{if((d|0)!=32767){e=4;if(d){break a}return a|c|(b|f)?3:2}e=!(a|c|(b|f))}return e}function Tua(a){a=a|0;var b=0,c=0;hm(a,3);b=jj(a,2);Dj(a,1,6);a:{if(eq(a,1)){break a}b=PY(a,b);if(!b){break a}Xi(a,b);xk(a,-1);c=1}return c|0}function Rk(a,b,c){Ul(a,q[a+8>>2]+((b^-1)<<4)|0,c);a:{if((c|0)!=-1){break a}b=q[a+20>>2];a=q[a+8>>2];if(t[b+8>>2]>a>>>0){break a}q[b+8>>2]=a}}function RW(a,b,c,d){var e=0;a:{if(En(a,b,1)){break a}e=a+12|0;if(ep(a,e,(b?q[b+8>>2]:0)&255)){break a}Ui(e,1,(b?q[b+8>>2]:0)&255);ty(a,c,d)}}function Jaa(a,b){var c=0;if(!(!b|q[a+2412>>2]>-1)){Ti(b,a+3188|0,264);q[a+3444>>2]=0;o[a+3188|0]=0;a=a+3448|0;o[a|0]=r[a|0]&254;c=1}return c}function Iqa(a,b,c){a=a|0;b=b|0;c=c|0;if(!(!b|!r[b|0])){a=It(q[a+4>>2],b,hj(b));return a|0}a=q[a+4>>2];b=q[a+96>>2];Li=q[a+100>>2];return b|0}function lo(a,b){var c=0;c=yj(a,16);u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];Zi(a,-1e4,134016);xj(a,-2)}function hr(a,b){var c=0;c=yj(a,16);u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];u[c+12>>2]=u[b+12>>2];Zi(a,-1e4,134032);xj(a,-2)}function bq(a,b,c,d){c=Rl(b,c,d);a:{if(c){break a}a=a+4|0;while(1){c=0;if((_j(b,a)|0)<0){break a}c=nn(b,b,a);if(!c){continue}break}}return c}function bI(a,b,c){var d=0;d=q[a+4>>2];a=q[a>>2];if((d-a|0)/18568>>>0<=b>>>0){J(151947,151192,479,151403);G()}q[(a+w(b,18568)|0)+18556>>2]=c}function _H(a,b,c){var d=0;d=q[a+4>>2];a=q[a>>2];if((d-a|0)/18568>>>0<=b>>>0){J(151947,151192,479,151403);G()}q[(a+w(b,18568)|0)+18552>>2]=c}function Or(a,b){a=a|0;b=b|0;var c=0,d=0;c=Ii-16|0;Ii=c;d=q[a+20>>2];q[c+4>>2]=q[a+692>>2];q[c>>2]=d;Pi(3,154668,154673,c);O(a+24|0,b|0);G()}function FW(a,b,c,d,e,f,g,h){var i=0;i=q[a>>2];if(!i){return-16e3}i=q[i+28>>2];if(!i){return-16128}return Mi[i|0](q[a+4>>2],b,c,d,e,f,g,h)|0}function kwa(a,b){var c=0,d=0;c=Ii-224|0;Ii=c;d=a;a=c+72|0;d=Tn(d,a,0,1);if(d){if(q[a+104>>2]!=8){Zo(a,c)}PN(a,c,b)}Ii=c+224|0;return d} - - - -function kq(a,b){var c=0;c=q[72018];if(c){while(1){if(q[c>>2]==(a|0)&q[c+4>>2]==(b|0)){return c}c=q[c+40>>2];if(c){continue}break}}return 0}function i2(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b+8>>2]=q[q[qj(a,1)>>2]>>2];q[b+4>>2]=133984;q[b>>2]=134064;Lj(a,134589,b);Ii=b+16|0;return 1}function d6(a){a=a|0;q[a+36>>2]=134;q[a+32>>2]=135;q[a+28>>2]=136;q[a+24>>2]=137;q[a+20>>2]=138;q[a+16>>2]=139;q[a+12>>2]=140;q[a+8>>2]=141}function d3(a){a=a|0;var b=0;b=q[a+8>>2]-q[a+12>>2]|0;kj(a,1,0);if(b>>4!=q[a+8>>2]-q[a+12>>2]>>4){J(129410,129431,1084,130622);G()}return 0}function Sia(a){a=a|0;var b=0,c=0;b=Ii-16|0;Ii=b;c=$pa(q[a>>2],q[a+20>>2],b+12|0);if(!c){q[q[a+24>>2]+8>>2]=q[b+12>>2]}Ii=b+16|0;return c|0}function RD(a,b){if(!q[b>>2]){a=a-3|0;a:{if(a>>>0<=5){a=q[(a<<2)+263e3>>2];break a}a=0}if(!a){return-1}q[b>>2]=(a?q[a+8>>2]:0)&255}return 0}function Nu(a,b,c){var d=0;d=Ii-16|0;Ii=d;b=hk(a,b,d+12|0,2);if(!b){b=c;c=q[d+12>>2];b=pn(b,q[a>>2],c);q[a>>2]=c+q[a>>2]}Ii=d+16|0;return b}function ED(a){if((a|0)<=0){a=a+2|0;a:{if(a>>>0<=2){a=q[(a<<2)+253664>>2];break a}a=137265}return a}if((a|0)==1){return 138474}return j$(a)}function vo(a){Lp(a,0,4,8,12);Lp(a,1,5,9,13);Lp(a,2,6,10,14);Lp(a,3,7,11,15);Lp(a,0,5,10,15);Lp(a,1,6,11,12);Lp(a,2,7,8,13);Lp(a,3,4,9,14)}function rD(a){a:{if(t[a+132>>2]>2]){break a}a=q[a+120>>2];if(Ej(a+6|0,181269,3)){break a}return(Ej(a+9|0,a+1|0,3)|0)!=0}return 1}function jq(a){var b=0,c=0;b=q[79289];c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002);b=qj(a,-1);Ri(a,-2);return b}function fV(a){a=a|0;q[a+8>>2]=1732584193;q[a+12>>2]=-271733879;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=-1732584194;q[a+20>>2]=271733878;return 0}function Wn(a){var b=0;a=a*a;b=a*a;return x(a*-.499999997251031+1+b*.04166662332373906+a*b*(a*2439044879627741e-20+ -.001388676377460993))}function FM(a,b){var c=0,d=0;c=q[210498];if(c){while(1){d=q[c+32>>2];if(!(!d|!r[c+40|0])){Mi[d|0](a,b)}c=q[c+36>>2];if(c){continue}break}}}function Cxa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;b=b-c|0;if(b){while(1){o[(c+d|0)+a|0]=b;e=e+1|0;d=e&255;if(b>>>0>d>>>0){continue}break}}}function ssa(a){var b=0,c=0;b=q[210498];if(b){while(1){c=q[b+12>>2];if(!(!c|!r[b+40|0])){Mi[c|0](a)|0}b=q[b+36>>2];if(b){continue}break}}}function rz(a){var b=0,c=0;a=q[a>>2];Ri(a,-2);c=q[79286];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);pj(a,-10002)}function g_(a){a=a|0;var b=0,c=0;b=Tl(a,1,0,0);c=q[a+8>>2]-q[a+12>>2]>>4;if(Hy(a,b)){Fo(a)}Rk(a,0,-1);return(q[a+8>>2]-q[a+12>>2]>>4)-c|0}function fpa(a){a=a|0;var b=0;b=q[a+4>>2];if(!b){return-1e3}a:{if(o[b+156|0]&1){break a}a=q[b+144>>2];if(!a){break a}Ni(a)}Ni(b);return 0}function ZU(a){a=a|0;var b=0,c=0;b=Fl(a,137647);b=t[b+48>>2]>2];c=q[a+8>>2];q[c+8>>2]=1;q[c>>2]=b;q[a+8>>2]=q[a+8>>2]+16;return 1}function Cj(a,b,c,d){var e=0;e=q[a+16>>2];b=Mi[q[e+12>>2]](q[e+16>>2],b,c,d)|0;if(!(b|!d)){Nj(a,4)}q[e+68>>2]=q[e+68>>2]+(d-c|0);return b}function yra(a){var b=0,c=x(0),d=x(0),e=x(0);b=Ii-16|0;Ii=b;Lr(b,a);Ii=b+16|0;d=u[b>>2];c=u[b+4>>2];e=u[b+8>>2];c=c>e?c:e;return c>2],q[b+100>>2]);return 1}b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 1}function uG(a,b){var c=0;c=(b|0)>0?(b|0)/1e3|0:b;b=(c|0)>0;a=BM(a,b?c:0);if((a|0)<=-1){return im(173560,274,q[240513])}return b?a?0:-3:0}function rsa(a){var b=0,c=0;b=q[210498];if(b){while(1){c=q[b+8>>2];if(!(!c|!r[b+40|0])){Mi[c|0](a)|0}b=q[b+36>>2];if(b){continue}break}}}function mR(a,b,c){a=a|0;b=b|0;c=c|0;Uq(q[a+68>>2]+596|0,b,c);$p(q[a+68>>2]+684|0,b,c);Cu(q[a+68>>2]+776|0,b,c);Yp(q[a+68>>2]+888|0,b,c)}function il(a,b,c){var d=0,e=0;d=-20736;a:{if(!a){break a}e=q[a>>2];if(!e|!q[a+8>>2]){break a}d=Mi[q[e+20>>2]](q[a+4>>2],b,c)|0}return d}function WY(a,b){var c=0,d=0;d=1;c=q[a+8>>2];a:{if(q[c-8>>2]!=6){break a}c=q[c-16>>2];if(r[c+6|0]){break a}d=eZ(a,q[c+16>>2],b)}return d}function Au(a){var b=0,c=0;b=277312;c=52392;a:{while(1){if((a|0)==(c|0)){break a}c=q[b+40>>2];b=b+40|0;if(c){continue}break}b=0}return b}function sj(a,b,c,d){var e=0,f=0;e=Ii-16|0;Ii=e;f=-1;if(!(!c|(!a|!b))){q[e+12>>2]=d;a=Gq(a,b,c,d);f=(a|0)<(b|0)?a:-1}Ii=e+16|0;return f}function sD(a){var b=0;ly(a);Ni(q[a+68>>2]);q[a+68>>2]=0;b=q[a+80>>2];if(b){ms(b);Ni(q[a+80>>2])}b=q[a+84>>2];q[a+84>>2]=0;q[a+80>>2]=b}function qF(a,b,c){var d=0,e=0;e=a;d=b<<2;a=Cj(a,0,0,d+20|0);ar(e,a,6);q[a+12>>2]=c;o[a+6|0]=0;o[a+7|0]=b;if(b){Ui(a+20|0,0,d)}return a}function o$(a){a=a|0;var b=0;kj(a,1,0);kj(a,2,0);Ri(a,2);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;qk(a,1167,3);return 1}function h_(a){a=a|0;var b=0;b=cF(a);a:{if((Vi(a,1)|0)==6){if(!eq(a,1)){break a}}dk(a,1,144312)}ej(a,1);co(a,b,1);qk(a,1084,1);return 1}function gv(a,b){var c=0,d=0;c=Ii-96|0;Ii=c;d=-2;if(!(es(a,c+8|0)|(q[c+20>>2]&61440)!=32768)){q[b>>2]=q[c+48>>2];d=0}Ii=c+96|0;return d}function c6(a){a=a|0;var b=0;if(a){a:{if(o[a+40|0]&1){break a}b=q[a+20>>2];if(b){Ni(b)}b=q[a+12>>2];if(!b){break a}Ni(b)}Ni(a)}return 0}function X$(a,b,c,d){if(a|b){while(1){c=c-1|0;o[c|0]=r[(a&15)+214736|0]|d;a=(b&15)<<28|a>>>4;b=b>>>4|0;if(a|b){continue}break}}return c}function Lj(a,b,c){var d=0,e=0;d=Ii-16|0;Ii=d;e=q[a+16>>2];if(t[e+68>>2]>=t[e+64>>2]){om(a)}q[d+12>>2]=c;a=Su(a,b,c);Ii=d+16|0;return a}function BV(a){a=Ui(a,0,212);Ay(a+80|0);Ay(a+144|0);q[a+52>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;a=a- -64|0;q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0}function uu(a,b){var c=0,d=0;a:{if(b>>>0<=31){d=q[a+4>>2];c=a;break a}b=b-32|0;c=a+4|0}c=q[c>>2];q[a+4>>2]=d>>>b;q[a>>2]=d<<32-b|c>>>b}function qQ(a){var b=0,c=0;b=hj(1925);if(r[a|0]){while(1){if(!bs(a,1925,b)){return a}c=r[a+1|0];a=a+1|0;if(c){continue}break}}return 0}function iaa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;q[a+12>>2]=d;q[a+8>>2]=c;q[a+4>>2]=b;if((b<<16|c)<=65536){o[a+92|0]=r[a+92|0]|2}}function gga(a,b){a=a|0;b=b|0;var c=0;c=q[a+8>>2];a=q[a+4>>2];if(c-a>>2>>>0<=b>>>0){J(91269,90502,479,91280);G()}return q[a+(b<<2)>>2]}function WW(a){var b=0;if(a){if(a){b=q[a+60>>2];if(b){Mi[q[q[q[a>>2]+28>>2]+32>>2]](b)}Mi[q[65677]](a,0,64)|0}Mi[q[65677]](a,0,392)|0}}function Sja(a){a=a|0;var b=0,c=0;c=q[a>>2];a=q[q[a+8>>2]+8>>2];b=q[a>>2];cj(c,q[b>>2]);cj(c,q[b+4>>2]);Ni(b);if(a){Ni(aA(a))}return 0}function Q5(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;b=Ii-16|0;Ii=b;q[b+12>>2]=f;a=bH(a,33451,d,b+12|0,e);Ii=b+16|0;return a|0}function OB(a,b){var c=0;c=b;b=q[a+40>>2];c=c+b|0;q[a+40>>2]=c;if(!(r[a+44|0]|t[a+36>>2]>=c>>>0)){J(24076,24107,76,24165);G()}return b}function G6(a,b){var c=0,d=0;c=r[a+20|0];a:{if(c&1){break a}d=q[a+4>>2];if(!d){break a}Ni(d);c=r[a+20|0]}q[a+4>>2]=b;o[a+20|0]=c&254|1}function Bk(a,b){var c=0,d=0;c=rl(a,1);if(!c){Ui(q[a+8>>2],0,q[a+4>>2]<<2);d=b>>31;q[q[a+8>>2]>>2]=d^b+d;q[a>>2]=(b|0)<0?-1:1}return c}function qZ(a){var b=0,c=0;b=q[a+36>>2]+3|0;c=q[a>>2];if((b|0)>r[c+75|0]){if((b|0)>=250){Sj(q[a+12>>2],141814);c=q[a>>2]}o[c+75|0]=b}}function Yua(a){a=a|0;var b=0,c=0;b=jj(a,2);Dj(a,1,6);a:{if(eq(a,1)){break a}b=UY(a,b);if(!b){break a}Xi(a,b);xk(a,-2);c=2}return c|0}function UZ(a){a=a|0;var b=0,c=0;hm(a,1);hm(a,2);c=Is(a,1,2);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function QX(a){var b=0;if(a){if(a){b=q[a+60>>2];if(b){Mi[q[q[q[a>>2]+28>>2]+32>>2]](b)}Mi[q[65677]](a,0,64)|0}Mi[q[65677]](a,0,64)|0}}function Nfa(a,b){a=a|0;b=b|0;var c=0,d=0;c=4;a:{switch(b|0){case 1:c=2;case 0:d=(s[a+156>>1]&c)!=0;break;default:break a}}return d|0}function GD(a,b){a=Rc(a|0,4,2)|0;q[b>>2]=a;if(a){a=0}else{if(q[240506]){return q[240506]}if(!q[240513]){return-3}a=q[240513]}return a}function D3(a){a=a|0;var b=0,c=0,d=0;c=qj(a,1);d=qj(a,2);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)==(d|0);q[a+8>>2]=q[a+8>>2]+16;return 1}function zN(a,b,c,d,e,f,g,h,i){d=JX(a,d,b);a:{if(d){break a}d=IX(a,e,f);if(d){break a}d=ME(a,c,g,h);if(d){break a}d=MX(a,i)}return d}function wU(a){a=a|0;var b=0;gS(ln(a,137623),$q(a,2,137921,254e3));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function ska(a){a=a|0;var b=0;b=$i(4);q[b>>2]=0;if(Qj(q[a+12>>2],q[a+16>>2],233720,b)){Ni(b);return-13}q[q[a+24>>2]+8>>2]=b;return 0}function _4(a){q[79301]=0;q[79302]=0;q[79300]=829;q[79299]=830;q[79298]=831;q[79303]=0;q[79304]=0;q[79305]=0;q[79306]=0;tz(a,317192)}function Xj(a,b,c){if(!(!a|!q[a>>2])){q[a+208>>2]=21;q[a+212>>2]=2;o[q[a+204>>2]]=b;o[q[a+204>>2]+1|0]=c;return zu(a,1)}return-28928}function Tq(a,b,c){var d=0;d=Ii-32|0;Ii=d;q[d+16>>2]=1;q[d+20>>2]=1;q[d+12>>2]=c;q[d+24>>2]=d+12;a=Wk(a,b,d+16|0);Ii=d+32|0;return a}function Aba(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;tj(a,1,b+12|0);q[b+4>>2]=kj(a,2,0);q[b>>2]=202652;a=Qi(a,204667,b);Ii=b+16|0;return a|0}function $i(a){a=a|0;var b=0;a=a?a:1;a:{while(1){b=Yi(a);if(b){break a}b=q[240590];if(b){Mi[b|0]();continue}break}G();G()}return b|0}function $ca(a){a=a|0;var b=0,c=0;c=q[tj(a,1,0)+412>>2]>>>18&1;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function vu(a,b){var c=0,d=0;a:{if(b>>>0<=31){d=q[a>>2];c=a+4|0;break a}b=b-32|0;c=a}c=q[c>>2];q[a>>2]=d<>2]=c<>>32-b}function Zva(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){Wt(a,b,(c+1|0)==(b|0),11)}}q[a+4>>2]=b}}function Tha(a,b,c){var d=0;d=q[a+128>>2];a=q[a+124>>2];if(d-a>>>0<=b>>>0){J(55728,55585,479,55717);G()}a=a+b|0;o[a|0]=r[a|0]&254|c}function Iz(a,b){var c=0;c=Ii-16|0;Ii=c;a:{if((Vi(a,b)|0)==1){a=Uj(a,b);break a}q[c>>2]=b;a=Qi(a,123715,c)}Ii=c+16|0;return(a|0)!=0}function G8(a){var b=0;b=Ii-16|0;Ii=b;q[b+8>>2]=0;q[b+4>>2]=1;q[b>>2]=a;a=q[a+304>>2];oq(q[a+2392>>2],q[a+2396>>2],766,b);Ii=b+16|0}function x3(a){a=a|0;var b=0,c=0;b=Ii-32|0;Ii=b;c=nj(b+8|0,a,1,129431,1354);gr(a,kj(a,1,b+4|0),q[b+4>>2]);mj(c);Ii=b+32|0;return 1}function wW(a,b){a:{if(qy(a)){break a}if(xW(b)){break a}if(_j(a+8|0,b+8|0)){break a}return _j(a+20|0,b+20|0)?-16896:0}return-16896}function qia(a){a=a|0;a=q[a>>2];if(q[a+156>>2]!=q[q[a+4>>2]+24>>2]){if(!CL(a)){Pi(3,62262,62557,0)}q[a+156>>2]=q[q[a+4>>2]+24>>2]}}function p1(a,b){var c=0,d=0;if(a){c=q[240513];b=ql(b);d=hj(b);q[240513]=c;c=a;a=d+1|0;a=a>>>0>128?128:a;o[(Ti(c,b,a)+a|0)-1|0]=0}}function oda(a){a=a|0;var b=0,c=0;c=q[tj(a,1,0)+412>>2]>>>19|0;b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=c&1;q[a+8>>2]=q[a+8>>2]+16;return 1}function _ha(a,b){var c=0;c=Ii-16|0;Ii=c;q[74607]=b;q[74606]=a;q[c+12>>2]=b;q[c+8>>2]=a;q[c+4>>2]=2;q[c>>2]=298416;eB(c);Ii=c+16|0}function XR(a,b){a=a|0;b=b|0;var c=0;c=Ii-112|0;Ii=c;ss(c);oy(c,q[a+68>>2]+776|0);Du(c,b);if(c){Mi[q[65677]](c,0,108)|0}Ii=c+112|0}function Wga(){var a=0,b=0;a=q[75054];if(a){b=q[a+48>>2];if(!b){return 1}return Mi[b|0](q[a+52>>2])|0}J(90258,88575,566,90283);G()}function NW(a,b){var c=0;c=Ii-32|0;Ii=c;q[c+20>>2]=1;q[c+16>>2]=1;q[c+12>>2]=1;q[c+24>>2]=c+12;a=Rl(a,b,c+16|0);Ii=c+32|0;return a}function Jwa(a,b){var c=0;o[a+3|0]=255;c=b&31;o[a+2|0]=c<<3|c>>>2;c=b>>>5&31;o[a+1|0]=c<<3|c>>>2;c=a;a=b>>>10&31;o[c|0]=a<<3|a>>>2}function oH(a,b){var c=0;c=Ii-1040|0;Ii=c;q[c>>2]=a+8;q[c+4>>2]=a+140;sj(c+16|0,1024,27214,c);a=W6(c+16|0,b);Ii=c+1040|0;return a}function T0(a,b,c,d,e,f,g){var h=0;if(!q[a+88>>2]){return-20352}h=a+136|0;f=V0(a,a+124|0,h,f,g);if(!f){f=bX(a,h,c,b,d,e)}return f}function PV(a){var b=0,c=0;b=-28928;a:{if(!a){break a}c=q[a>>2];if(!c){break a}b=-28800;if(o[c+184|0]&1){break a}b=QV(a)}return b}function Lo(a){a:{if(!a|!q[a>>2]|(q[a+4>>2]==-2|q[a+8>>2]==-2)){break a}if(q[a+12>>2]==-2){break a}return q[a+16>>2]!=-2}return 0}function Fl(a,b){var c=0,d=0;c=Ii+ -64|0;Ii=c;d=mxa(a,b);if(!d){q[c>>2]=b;mn(c+16|0,136839,c);dk(a,1,c+16|0)}Ii=c- -64|0;return d}function FD(a,b){a=Qc(a|0)|0;q[b>>2]=a;if(a){a=0}else{if(q[240506]){return q[240506]}if(!q[240513]){return-3}a=q[240513]}return a}function uY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c/.017453292519943295;q[a+8>>2]=q[a+8>>2]+16;return 1}function ln(a,b){var c=0,d=0;c=Ii+ -64|0;Ii=c;d=Lm(a,b);if(!d){q[c>>2]=b;mn(c+16|0,136839,c);dk(a,1,c+16|0)}Ii=c- -64|0;return d}function kga(a,b){a=a|0;b=b|0;var c=0;c=q[b+76>>2];q[a>>2]=q[b+72>>2];q[a+4>>2]=c;c=q[b+84>>2];q[a+8>>2]=q[b+80>>2];q[a+12>>2]=c}function kfa(a,b){a=a|0;b=b|0;if(!a){J(88567,88575,3800,92930);G()}tc(q[(b<<2)+92952>>2]);p[a+80>>1]=s[a+80>>1]&63487|b<<11&2048}function ij(a){var b=0;if(a){b=q[a+8>>2];if(b){Mi[q[65677]](b,0,q[a+4>>2]<<2)|0;Ni(q[a+8>>2])}q[a+8>>2]=0;q[a>>2]=1;q[a+4>>2]=0}}function iY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c*.017453292519943295;q[a+8>>2]=q[a+8>>2]+16;return 1}function Xaa(a,b){var c=0;c=Ii-16|0;Ii=c;if(a){o[i1(b&65535,c+11|0)+(c+11|0)|0]=0;q[a+3184>>2]=Zk(a+2928|0,c+11|0,256)}Ii=c+16|0}function X4(a){q[79313]=0;q[79314]=0;q[79312]=843;q[79315]=0;q[79316]=0;q[79317]=0;q[79318]=0;q[79319]=0;q[79320]=0;tz(a,317248)}function Wta(a){a=a|0;var b=0;b=jj(a,1);if(!((b|0)==1&r[906092]!=0)){Qi(a,209110,0)}Xi(a,(b|0)!=1?0:r[906092]?923700:0);return 1}function WD(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e+12>>2]=1;q[e>>2]=1;q[e+4>>2]=1;q[e+8>>2]=e+12;a=Bo(a,e,b,c,d);Ii=e+16|0;return a}function Gda(a){a=a|0;var b=0,c=0;c=q[tj(a,1,0)+412>>2]&15;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function bB(a){var b=0;b=q[a+4>>2];if(b){Mi[b|0](q[a>>2]);b=q[a+8>>2];if(b){Mi[b|0](q[a>>2])}return}J(95272,95283,24,95322);G()}function Vga(a){a=a|0;var b=0,c=0;b=q[75054];if(b){c=q[b+56>>2];if(c){Mi[c|0](q[b+60>>2],a)}return}J(90258,88575,575,90297);G()}function Uga(a){a=a|0;var b=0,c=0;b=q[75054];if(b){c=q[b+64>>2];if(c){Mi[c|0](q[b+68>>2],a)}return}J(90258,88575,582,90311);G()}function ON(a,b){var c=0;c=q[a+4>>2];if((c|0)!=(b|0)){if(b>>>0>=c>>>0){if(t[a+8>>2]>>0){LN(a,b,(c+1|0)==(b|0))}}q[a+4>>2]=b}}function MZ(a){a=a|0;var b=0,c=0;hm(a,1);c=a;a=Vi(a,1);b=140583;a:{if((a|0)==-1){break a}b=q[(a<<2)+256832>>2]}Xi(c,b);return 1}function Ida(a){a=a|0;var b=0,c=0;c=s[tj(a,1,0)+414>>1]&3;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function FU(a){a=a|0;var b=0,c=0;c=Fl(a,137647);b=fj(a,2);a:{if(y(b)<2147483648){a=~~b;break a}a=-2147483648}q[c>>2]=a;return 0}function EU(a){a=a|0;var b=0,c=0;c=Fl(a,138013);b=fj(a,2);a:{if(y(b)<2147483648){a=~~b;break a}a=-2147483648}q[c>>2]=a;return 0}function Bba(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;tj(a,1,0);q[b+4>>2]=kj(a,2,0);q[b>>2]=202652;a=Qi(a,204626,b);Ii=b+16|0;return a|0}function yna(a,b){var c=0;c=q[a+224>>2];a=q[a+220>>2];if(c-a>>2>>>0<=b>>>0){J(51709,51308,479,51547);G()}return q[a+(b<<2)>>2]}function su(a){var b=0,c=0;b=Ii-32|0;Ii=b;c=q[a>>2];q[b+16>>2]=0;c=am(c,3,b+16|0);a=q[a>>2];q[b>>2]=c|2048;am(a,4,b);Ii=b+32|0}function ps(a){var b=0;b=-28928;if(!(!a|!q[a>>2])){while(1){if(q[a+4>>2]==16){return 0}b=PV(a);if(!b){continue}break}}return b}function jk(a){var b=0;b=Bw(a);a:{if(b){break a}b=SA(a);if(b){b=q[q[b+376>>2]+12>>2];if(b){break a}}b=0;Qi(a,58774,0)}return b}function iE(a,b,c,d){var e=0;e=Ii-112|0;Ii=e;ss(e);rs(e,d);Cu(e,a,b);Du(e,c);if(e){Mi[q[65677]](e,0,108)|0}Ii=e+112|0;return 0}function NH(a){var b=0,c=0;b=q[a+28>>2];c=q[a+36>>2];return((Mi[q[75013]](q[a+8>>2],q[a+12>>2])|0)+w((c-b|0)/80|0,68)|0)+160|0}function N8(a){q[a+2024>>2]=q[a+2020>>2];O8(a);q[a+1968>>2]=q[a+1964>>2];q[a+1984>>2]=q[a+1980>>2];a=a+2e3|0;q[a>>2]=q[a>>2]+1}function Lx(a){var b=0;a:{if(!a){break a}b=q[a+580>>2];if(!b){break a}q[a+524>>2]=q[a+524>>2]-q[a+584>>2];Ni(b);q[a+580>>2]=0}}function Go(a,b,c){var d=0;d=q[a+52>>2];b=Yj(d,b,c);a=Qs(d,q[q[a+48>>2]+4>>2],b);if(!q[a+8>>2]){q[a+8>>2]=1;q[a>>2]=1}return b}function Eda(a){a=a|0;var b=0,c=0;c=r[tj(a,1,0)+415|0]&3;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c>>>0;q[a+8>>2]=q[a+8>>2]+16;return 1}function DW(a,b){var c=0;c=-16e3;if(!(q[a>>2]|!b)){c=Mi[q[b+36>>2]]()|0;q[a+4>>2]=c;if(!c){return-16256}q[a>>2]=b;c=0}return c}function b_(a){a=a|0;var b=0;Dj(a,1,5);ej(a,-10003);ej(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=0;q[a+8>>2]=q[a+8>>2]+16;return 3}function ara(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];Dp(b,q[a>>2]+1064|0);a=q[a>>2];o[a+3272|0]=r[a+3272|0]|2;return 0}function ao(a,b,c){var d=0,e=0;d=-20736;a:{if(!a){break a}e=q[a>>2];if(!e){break a}d=Mi[q[e+20>>2]](q[a+4>>2],b,c)|0}return d}function Zw(a,b,c){if(!(c?!b:0)){q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=b;q[a+4>>2]=b;q[a>>2]=c;q[a+12>>2]=b+c}return!c|(b|0)!=0}function Xda(a){a=a|0;var b=0;b=qj(a,1);if(!b){J(204446,202233,218,204448);G()}rj(a,-1e4,q[b+4>>2]);ej(a,2);ik(a,-2);return 1}function Jba(a){a=a|0;var b=0;gj(a);_i(a,-1,q[213927],204267);Ri(a,-2);b=jj(a,1);Dj(a,2,1);a=Uj(a,2);Baa(b,(a|0)!=0);return 0}function Cy(a){var b=0;b=q[a+8>>2]-16|0;a=0;a:{if(q[b+8>>2]!=6){break a}b=q[b>>2];if(!r[b+6|0]){break a}a=q[b+16>>2]}return a}function uZ(a,b){var c=0;c=q[b+16>>2];if((c|0)!=142616){Cj(a,c,32<>2],q[b+28>>2]<<4,0);Cj(a,b,32,0)}function mv(a,b,c,d){q[d>>2]=0;a=wu(a,b,c);if((a|0)<=-1){a=im(173656,102,q[240513]);return(a|0)==-27?-3:a}q[d>>2]=a;return 0}function lv(a,b,c,d){q[d>>2]=0;a=Ux(a,b,c);if((a|0)<=-1){a=im(173656,102,q[240513]);return(a|0)==-27?-3:a}q[d>>2]=a;return 0}function hk(a,b,c,d){var e=0;e=q[a>>2];if((b-e|0)<1){return-96}if(r[e|0]==(d|0)){q[a>>2]=e+1;a=Wq(a,b,c)}else{a=-98}return a}function Qta(a){a=a|0;var b=0;b=jj(a,1);if(!((b|0)==1&r[906092]!=0)){Qi(a,209110,0)}if((b|0)==1){Ui(906092,0,50376)}return 0}function O1(a){var b=0;b=q[q[239672]+16>>2];if(!b){o[a+60|0]=r[a+60|0]|4;return 0}Gj(b);o[a+60|0]=r[a+60|0]|4;Bj(b);return 0}function L2(a){a=a|0;var b=0;b=Ii-80|0;Ii=b;q[b+4>>2]=_s(qj(a,1),b+16|0,64);q[b>>2]=128488;Lj(a,129088,b);Ii=b+80|0;return 1}function JD(a,b){var c=0;a:{if(b){c=(a<<2)+962216|0;a=Xxa(a,b);q[c>>2]=a;break a}a=q[(a<<2)+962216>>2]}return a?a+8|0:220544}function IW(a,b,c){a=a-3|0;if(a>>>0<=5){a=a<<2;q[b>>2]=q[a+263964>>2];q[c>>2]=q[q[a+263988>>2]+4>>2];a=0}else{a=-46}return a}function $N(a){if((a|0)>=21){J(99756,96899,11364,99794);G()}a=w(a,12)+99504|0;return(q[a+4>>2]<<1|1)+(q[a+8>>2]<<2)<>2]}function vE(a,b,c,d,e,f,g,h,i,j,k){a:{b=VW(a,b,d,e,f,g);if(b){break a}b=tE(a,c,h,i);if(b){break a}return XW(a,k,j)}return b}function n2(a){a=a|0;var b=0;a=q[qj(a,1)>>2];if(a){a:{if(q[a>>2]<1){break a}b=q[a+4>>2];if(!b){break a}Ni(b)}Ni(a)}return 0}function mB(a,b,c,d,e){a=q[a+156>>2];q[b>>2]=q[a+36>>2];q[c>>2]=q[a+40>>2];q[d>>2]=q[a+28>>2];q[e>>2]=q[a+32>>2]&2147483647}function bX(a,b,c,d,e,f){if(!f){return-20352}a=eX(a,b,c,d,e+1|0,f-1|0);if(!a){o[e|0]=q[d>>2];q[d>>2]=q[d>>2]+1;a=0}return a}function a9(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=0;b=Qj(b,c,q[65160],d+12|0);if(!b){cI(a,q[d+12>>2])}Ii=d+16|0;return!b}function R4(a){q[210432]=883;q[210431]=884;q[210430]=0;q[210429]=885;q[210428]=886;q[210427]=887;q[210424]=888;tz(a,841696)}function Gqa(a){a=a|0;var b=0;b=qj(a,1);if(!b){J(19085,15159,259,19087);G()}rj(a,-1e4,q[b+16>>2]);ej(a,2);ik(a,-2);return 1}function m_(a){a=a|0;var b=0;b=cF(a);a:{if((Vi(a,1)|0)==6){if(!eq(a,1)){break a}}dk(a,1,144312)}ej(a,1);co(a,b,1);return 1}function l2(a){a=a|0;var b=0,c=0;c=q[q[qj(a,1)>>2]>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function hia(a){var b=0,c=0;b=Ii-32|0;Ii=b;a=q[a>>2];c=nj(b+8|0,a,0,71372,396);Ak(a,71412,232448);Ri(a,-2);mj(c);Ii=b+32|0}function BT(a){a=a|0;var b=0,c=0;c=ib(Tl(a,1,0,0)|0)|0;b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Ala(a,b,c){a=a|0;b=b|0;c=c|0;a=q[q[a+376>>2]+12>>2];if(c){a=It(a,b,c);return a|0}Li=q[a+100>>2];return q[a+96>>2]}function $Z(a){a=a|0;var b=0;if(Hy(a,Tl(a,1,0,0))){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;xk(a,-2);a=2}else{a=1}return a|0}function yY(a){a=a|0;var b=0,c=0;c=oxa(fj(a,1),fj(a,2));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function yD(a){var b=0;a:{if(!q[a+136>>2]|!q[a+140>>2]){break a}if(q[a+128>>2]){b=1;if(q[a+132>>2]){break a}}b=0}return b}function w3(a){a=a|0;var b=0,c=0;c=bm(kj(a,1,0));b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function kxa(a,b){var c=0;c=q[a+12>>2];q[a+12>>2]=c+1;q[El(a,c)>>2]=b;if(q[a+4>>2]==q[a+12>>2]){q[a+12>>2]=q[a+4>>2]>>>1}}function jT(a,b){a=a|0;b=b|0;var c=0;c=b;b=q[b>>2]+15&-16;q[c>>2]=b+16;v[a>>3]=mC(q[b>>2],q[b+4>>2],q[b+8>>2],q[b+12>>2])}function _ea(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=s[a+192>>1];if(d>>>0>b>>>0){p[(w(b,24)+a|0)+14>>1]=c}return b>>>0>>0|0}function YZ(a){a=a|0;var b=0;Dj(a,1,5);Ri(a,2);if(Hj(a,1)){a=2}else{b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;a=1}return a|0}function WS(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;q[f>>2]=q[a+4>>2];return oW(a,g,h,b,d,c,e)|0}function VU(a){a=a|0;var b=0,c=0;c=q[Fl(a,137647)>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function UU(a){a=a|0;var b=0,c=0;c=q[Fl(a,138013)>>2];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function TO(a){var b=0;a:{if(!a|!r[a|0]){break a}b=bk(1,319480);if(b){q[b+80>>2]=9;if(sU(b,a)){break a}Ni(b)}b=0}return b}function Rj(a,b,c){var d=0;if((c|0)!=-2){d=q[79288];if((d|0)<=0){Pi(4,122749,123218,0);d=q[79288]}q[79288]=d-1;Ho(a,b,c)}}function Gla(a,b,c,d){var e=0;e=q[a+100>>2];a=q[a+156>>2];return s[e+(w(w(q[a+32>>2],b)+d|0,q[a+28>>2])+c<<1)>>1]+1&65535}function Bn(a){var b=0;if(!(a&32768)){J(109616,96899,3348,109632);G()}b=a&30;return(b+(a>>>5&31)|0)+(a>>>10&31)+(b>>>4)|0}function vka(a){a=a|0;var b=0;a=q[q[a+8>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}q[a>>2]=0;b=q[a+4>>2];if(b){Pt(b)}Ni(a);return 0}function rY(a){a=a|0;var b=0,c=0;c=_$(fj(a,1),fj(a,2));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function pY(a){a=a|0;var b=0,c=0;c=Py(fj(a,1),jj(a,2));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function mxa(a,b){var c=0;a:{if(!$l(a,1)){break a}Xi(a,b);jl(a,-2);b=Vi(a,-1);Ri(a,-3);if(!b){break a}c=qj(a,1)}return c}function jY(a){a=a|0;var b=0,c=0;c=Up(fj(a,1),fj(a,2));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function fS(a){a=a|0;var b=0;Dj(a,1,5);b=al(a,1);jp(a,40,145370);if((Vi(a,2)|0)>=1){Dj(a,2,6)}Ri(a,2);bO(a,1,b);return 0}function Zna(a){a=a|0;var b=0;a=q[a+4>>2];if(a){a:{if(o[a+12|0]&1){break a}b=q[a>>2];if(!b){break a}Ni(b)}Ni(a)}return 0}function Xn(a){var b=0,c=0;b=Ii-16|0;Ii=b;c=(a>>>0)/1e6|0;q[b+8>>2]=c;q[b+12>>2]=w(a-w(c,1e6)|0,1e3);by(b+8|0);Ii=b+16|0}function T8(a){var b=0,c=0;a:{b=q[a>>2];if(b){while(1){c=q[b+4>>2];Ni(b);b=c;if(b){continue}break}if(!a){break a}}Ni(a)}}function Pla(a,b){var c=0;c=q[a+4>>2];a=q[a>>2];if(c-a>>2>>>0<=b>>>0){J(48162,47954,479,48173);G()}return q[a+(b<<2)>>2]}function GR(a,b){if(!(q[a+20>>2]?!(b|!(r[q[a>>2]+185|0]&4)):0)){Xj(a,2,40);return-31104}q[q[a+68>>2]+2272>>2]=1;return 0}function B$(a){a=a|0;var b=0,c=0;Dj(a,1,5);c=al(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function ol(a,b){var c=0;c=Ii-16|0;Ii=c;Cwa(c+8|0,a,b);Ii=c+16|0;return r[c+11|0]+(r[c+10|0]+(r[c+8|0]+r[c+9|0]|0)|0)|0}function mva(){var a=0;a=bk(1,132);if(a){Mi[q[65677]](a,0,64)|0;Mi[q[65677]](a- -64|0,0,64)|0;q[a+128>>2]=64}return a|0}function h9(a,b){a=q[a+16>>2];if(t[a+4>>2]<=b>>>0){J(151361,151373,270,151403);G()}return q[(q[a>>2]+w(b,160)|0)+56>>2]}function f9(a,b){a=q[a+16>>2];if(t[a+4>>2]<=b>>>0){J(151361,151373,270,151403);G()}return q[(q[a>>2]+w(b,160)|0)+48>>2]}function Xga(a,b,c){var d=0,e=0;d=Ii-400|0;Ii=d;e=q[75001];Ti(d+12|0,c,388);a=Mi[e|0](a,b,d+12|0)|0;Ii=d+400|0;return a}function HR(a,b){if(!(q[a+20>>2]?!(b|!(r[q[a>>2]+185|0]&2)):0)){Xj(a,2,40);return-31104}q[q[a+64>>2]+124>>2]=1;return 0}function AR(a,b,c){b=pX(q[a+68>>2]+8|0,b,c);if(!b){return t[q[a>>2]+176>>2]>q[q[a+68>>2]+8>>2]<<3>>>0?-31488:0}return b}function yk(a){var b=0,c=0;c=q[79286];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;xk(a,-2);pj(a,-10002)}function t5(a,b,c){a=a|0;b=b|0;c=c|0;q[a+24>>2]=Jk();q[a+28>>2]=Li;q[a+40>>2]=c;q[a+44>>2]=0;q[a+32>>2]=b;q[a+36>>2]=0}function Z1(a){var b=0;b=q[q[239672]+16>>2];if(!b){return(jz(a)|0)==-1?-12:0}Gj(b);a=jz(a);Bj(b);return(a|0)==-1?-12:0}function Y$(a,b,c){if(a|b){while(1){c=c-1|0;o[c|0]=a&7|48;a=(b&7)<<29|a>>>3;b=b>>>3|0;if(a|b){continue}break}}return c}function Wxa(a,b,c){var d=0;b=b&255;while(1){if(!c){return 0}c=c-1|0;d=c+a|0;if((b|0)!=r[d|0]){continue}break}return d}function Wja(a,b){var c=0;c=$i(12);q[c>>2]=0;q[c+4>>2]=0;q[c+8>>2]=0;a=Pk(a);o[c+8|0]=3;q[c+4>>2]=a;q[b>>2]=c;return 0}function WO(a,b,c){var d=0;a:{if(!a|q[a+20>>2]!=1){break a}d=q[a+88>>2];if((d|0)<0){break a}if(!tU(a,d,b,c)){break a}}}function Sp(a,b,c){if(Vi(a,2)){ej(a,2);ej(a,b-1|0);ej(a,c-2|0);Rk(a,2,1);b=Uj(a,-1);Ri(a,-2);return b}return TY(a,b,c)}function spa(a){a=a|0;var b=0;a=q[q[a+16>>2]>>2];b=q[a+56>>2];if(b&65536){q[a+56>>2]=b&-65537;Jt(q[a+36>>2])}return 0}function r0(a,b){var c=0,d=0;d=b+24|0;c=Co(d,d,a+4|0);a:{if(c){break a}c=ck(a,b,b,d);if(c){break a}c=Bk(d,1)}return c}function qqa(a){a=a|0;var b=0,c=x(0);c=yra(Zm(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function pia(a){a=a|0;var b=0;b=q[a>>2];a=q[a+4>>2];if(q[b+16>>2]==q[a>>2]&q[a+4>>2]==q[b+20>>2]){Cv(q[b+24>>2],3,0)}}function oE(a){var b=0;b=q[a>>2];if(b){Mi[q[65677]](b,0,q[a+4>>2])|0;Ni(q[a>>2])}Ni(q[a+8>>2]);Mi[q[65677]](a,0,12)|0}function nu(a,b){var c=0,d=0;c=Ii-16|0;Ii=c;oQ(c,a,b);d=mC(q[c>>2],q[c+4>>2],q[c+8>>2],q[c+12>>2]);Ii=c+16|0;return d}function nT(a,b){var c=0;c=Ii-128|0;Ii=c;Fs(c);a=pT(q[a+4>>2],q[a+8>>2],c);if(!a){a=oT(c,b)}bo(c);Ii=c+128|0;return a}function jE(a,b,c){var d=0,e=0;if(c){while(1){e=r[b+d|0]^r[a+d|0]|e;d=d+1|0;if((d|0)!=(c|0)){continue}break}}return e}function Zz(a,b){var c=0;c=$i(32);p[c+24>>1]=0;q[c+16>>2]=0;q[c+20>>2]=-1;q[c+8>>2]=a;q[c+12>>2]=b;q[c>>2]=0;return c}function Mwa(a,b){var c=0;o[a+3|0]=255;c=b&15;o[a+2|0]=c<<4|c;c=b>>>4&15;o[a+1|0]=c<<4|c;c=a;a=b>>>8&15;o[c|0]=a<<4|a}function Kqa(a){a=a|0;var b=0,c=0;c=q[qj(a,1)+4>>2];b=q[a+8>>2];q[b+8>>2]=2;q[b>>2]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function Gp(a,b){q[a>>2]=4;u[a+8>>2]=u[b>>2];u[a+12>>2]=u[b+4>>2];u[a+16>>2]=u[b+8>>2];u[a+20>>2]=u[b+12>>2];return a}function Al(a,b){var c=0;c=yj(a,16);u[c>>2]=u[b>>2];u[c+4>>2]=u[b+4>>2];u[c+8>>2]=u[b+8>>2];Zi(a,-1e4,134e3);xj(a,-2)}function d0(a){a=a|0;var b=0,c=0,d=0;d=a;c=Lm(a,145545);b=q[c>>2];if(!b){Qi(a,145617,0);b=q[c>>2]}return QF(d,b,2)|0}function aT(a,b){a=a|0;b=b|0;q[b+12>>2]=1;q[b>>2]=1;q[b+20>>2]=a+20;q[b+16>>2]=160879;q[b+8>>2]=a+8;q[b+4>>2]=160873}function a0(a){a=a|0;var b=0,c=0,d=0;d=a;c=Lm(a,145545);b=q[c>>2];if(!b){Qi(a,145617,0);b=q[c>>2]}return PF(d,b,2)|0}function _1(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=1;if((Ol(a,6,1,b+12|0,4)|0)<=-1){im(173656,218,q[240513])}Ii=b+16|0}function DZ(a,b){Jo(b,q[b+32>>2]);Cj(a,q[b+40>>2],w(q[b+48>>2],24),0);Cj(a,q[b+32>>2],q[b+44>>2]<<4,0);Cj(a,b,120,0)}function Bpa(a){var b=0;if(o[a+24|0]&1){a=1}else{b=q[a+4>>2];if(!b){b=q[a>>2]}a=(q[b+16>>2]!=q[b+12>>2])<<1}return a}function BD(a){var b=0;b=q[a+68>>2];if(b){Lx(b);zo(q[a+68>>2],0);zo(q[a+68>>2],1);zo(q[a+68>>2],2);zo(q[a+68>>2],3)}}function yZ(a,b){if(q[b+8>>2]!=(b+16|0)){q[q[b+20>>2]+16>>2]=q[b+16>>2];q[q[b+16>>2]+20>>2]=q[b+20>>2]}Cj(a,b,32,0)}function uT(a){a=a|0;var b=0;b=Ii-32|0;Ii=b;a:{if(!bQ(b)){a=Qi(a,146188,0);break a}Xi(a,b);a=1}Ii=b+32|0;return a|0}function rN(a,b,c,d,e,f,g,h,i){q[a>>2]=b;q[a+4>>2]=c;q[a+8>>2]=d;q[a+12>>2]=e&65535|(i>>>16&32768|e>>>16&32767)<<16}function nE(a){var b=0,c=0;a:{if(!a){break a}b=q[a>>2];if(!b){break a}c=Mi[q[b+8>>2]](q[a+4>>2])|0}return c+7>>>3|0}function X7(a){a=a|0;var b=0,c=0;c=qj(a,1);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=(c|0)!=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function Sfa(a,b){a=a|0;b=b|0;if(a){if(r[a+156|0]&32){a=Kb(b|0)|0}else{a=0}return a|0}J(88567,88575,1377,91380);G()}function R1(a){var b=0;b=q[q[239672]+16>>2];a:{if(!b){a=r[a+60|0];break a}Gj(b);a=r[a+60|0];Bj(b)}return(a&4)>>>2|0}function $1(a,b){a=HD(q[(a<<2)+174068>>2],1,6);q[b>>2]=a;if((a|0)<=-1){a=im(173656,211,q[240513])}else{a=0}return a}function z1(a){a=a|0;var b=0;a=q[a+12>>2];b=-1;a:{if(!q[a+1076>>2]){break a}b=q[a+1072>>2]}a=b;Li=a>>31;return a|0}function lja(a){a=a|0;var b=0;b=q[q[a+8>>2]+8>>2];if(!b){J(63445,63488,131,63532);G()}iB(q[a>>2],b);hI(b);return 0}function jxa(a,b){var c=0,d=0,e=0;if(b){c=b>>>1|0;d=q[El(a,c)>>2];e=q[El(a,b)>>2];q[El(a,c)>>2]=e;q[El(a,b)>>2]=d}}function fk(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;q[b+4>>2]=a;q[b>>2]=a;q[b+8>>2]=a+1;a=eya(b);Ii=b+16|0;return a}function X1(){var a=0,b=0;b=q[239672];a=q[b+33924>>2];if((a|0)==-1){q[b+33924>>2]=0;a=0}q[b+33924>>2]=a+1;return a}function Oga(a,b){a=a|0;b=b|0;xa(q[b>>2]);if(b){a:{if(o[b+16|0]&1){break a}a=q[b+4>>2];if(!a){break a}Ni(a)}Ni(b)}}function KK(a){var b=x(0);b=x(C(p_(x(a>>>0))));a:{if(b=x(0)){a=~~b>>>0;break a}a=0}return a+1&255}function Eo(a,b){var c=0;c=wk(a,b);a:{if(c){break a}c=wk(a+12|0,b+12|0);if(c){break a}c=wk(a+24|0,b+24|0)}return c}function ET(a){a=a|0;var b=0,c=0;c=+(fi()|0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c/1e6;q[a+8>>2]=q[a+8>>2]+16;return 1}function Cq(a,b,c){Zi(a,-1e4,b);Xi(a,c);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=1;q[a+8>>2]=q[a+8>>2]+16;Ij(a,-3);Ri(a,-2)}function $W(a){var b=0;b=a+8|0;if(b){Mi[q[65677]](b,0,216)|0}q[a+224>>2]=0;Mi[q[65677]](a+228|0,0,400)|0;q[a>>2]=0}function vY(a){a=a|0;var b=0,c=0;c=fva(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function sfa(a,b,c){a=a|0;b=b|0;c=c|0;if(Mi[c|0](a)|0){while(1){Ka(b|0,a|0,0,1);if(Mi[c|0](a)|0){continue}break}}}function gA(a){Ui(q[a>>2],255,q[a+4>>2]<<2);q[a+20>>2]=-1;q[a+24>>2]=0;q[a+12>>2]=q[a+8>>2];q[a+36>>2]=q[a+32>>2]}function aW(a){a:{if(!a|!q[a>>2]){break a}if(q[a+216>>2]){Xp(a);return}if(q[a+4>>2]==16){if(Xj(a,1,0)){break a}}}}function Xna(a){a=a|0;var b=0;b=$i(16);q[b>>2]=0;q[b+4>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;q[q[a+12>>2]>>2]=b;return 0}function Daa(a,b,c){if(!a){J(147738,147746,209,147761);G()}a=w(b,148)+a|0;o[a+140|0]=r[a+140|0]&252|(c^1|(c?2:0))}function Baa(a,b){var c=0;c=Ii-16|0;Ii=c;if(a>>>0>=4){q[c>>2]=a;Pi(3,148282,148989,c);a=0}Ra(1,a|0,b|0);Ii=c+16|0}function BY(a){a=a|0;var b=0,c=0;c=Exa(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function AY(a){a=a|0;var b=0,c=0;c=qxa(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function zY(a){a=a|0;var b=0,c=0;c=iC(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function wY(a){a=a|0;var b=0,c=0;c=Pw(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function tY(a){a=a|0;var b=0,c=0;c=fv(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function oY(a){a=a|0;var b=0,c=0;c=vF(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function nY(a){a=a|0;var b=0,c=0;c=q_(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function lM(a,b){var c=0;gj(a);c=_i(a,-1,q[71661],18049);Ri(a,-2);Ml(a,1,q[q[q[c+4>>2]+80>>2]+8>>2],71558,b,0,0)}function fY(a){a=a|0;var b=0,c=0;c=Mq(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function e_(a){a=a|0;var b=0,c=0;c=Pu(a,3,0);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;return 1}function eY(a){a=a|0;var b=0,c=0;c=pS(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function c_(a){a=a|0;var b=0;hm(a,1);if(!$l(a,1)){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 1}iF(a);return 1}function cY(a){a=a|0;var b=0,c=0;c=nQ(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function bY(a){a=a|0;var b=0,c=0;c=mQ(fj(a,1));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c;q[a+8>>2]=q[a+8>>2]+16;return 1}function Xja(a){a=a|0;var b=0,c=0;b=q[q[a+8>>2]+8>>2];c=q[b>>2];if(c){cj(q[a>>2],c)}Ni(q[b+4>>2]);Ni(b);return 0}function I8(a){if(!a){return}q[a+2012>>2]=0;Fz(q[a+2036>>2]);E8(a);D8(a);Qo(q[a+2392>>2],q[a+2396>>2]);Ni(m8(a))}function Haa(a,b){var c=0;if(!(!b|q[a+2412>>2]>-1)){Ti(b,a+2928|0,260);o[a+2928|0]=0;q[a+3184>>2]=0;c=1}return c}function xY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=D(c);q[a+8>>2]=q[a+8>>2]+16;return 1}function sY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=C(c);q[a+8>>2]=q[a+8>>2]+16;return 1}function iF(a){if($l(a,1)){Xi(a,143913);jl(a,-2);if(!Vi(a,-1)){Ri(a,-3);return 0}ll(a,-2);a=1}else{a=0}return a}function f_(a){a=a|0;var b=0;b=Am(a,2,1);Ri(a,1);if(!(!uk(a,1)|(b|0)<1)){Ms(a,b);ej(a,1);fm(a,2)}return Fo(a)|0}function dY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=F(c);q[a+8>>2]=q[a+8>>2]+16;return 1}function cya(a){var b=0;a:{a=q[a+8>>2];b=r[a|0];if((b|0)!=1){if(b&2){break a}o[a|0]=2;a=1}else{a=0}return a}G()}function aV(a){a=a|0;var b=0;hs(Fl(a,137647));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function Usa(a){a=a|0;if(a){if(!(ka(q[a+4>>2])|0)){Pi(4,213576,213877,0)}return}J(213569,213519,220,213859);G()}function CY(a){a=a|0;var b=0,c=0;c=fj(a,1);b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=y(c);q[a+8>>2]=q[a+8>>2]+16;return 1}function $U(a){a=a|0;var b=0;hs(Fl(a,138013));b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=1;q[a+8>>2]=q[a+8>>2]+16;return 1}function uua(a){if(o[a+12|0]&1){J(147994,147927,493,148069);G()}Wi((q[a+8>>2]-q[a>>2]>>3)+1|0,8,a,a+8|0,a+4|0)}function tfa(a,b,c){a=a|0;b=b|0;c=c|0;if(a){if(r[a+156|0]&32){Sa(b|0,c|0)}return}J(88567,88575,1457,91543);G()}function ew(a,b,c){if((c|0)==2097152|c>>>0>2097152){J(88252,87638,1246,88291);G()}return Mi[q[75034]](a,b,c)|0}function $ha(a){var b=0;b=Ii-16|0;Ii=b;q[b+8>>2]=0;q[b+12>>2]=0;q[b+4>>2]=a?3:4;q[b>>2]=298416;eB(b);Ii=b+16|0}function yva(a,b){a=a|0;b=b|0;if(q[q[a+16>>2]+48>>2]){while(1){LO(a);if(q[q[a+16>>2]+48>>2]){continue}break}}}function uR(a,b){if(!(q[q[a>>2]+184>>2]&32768?!b:0)){Xj(a,2,40);return-31104}q[q[a+68>>2]+2268>>2]=1;return 0}function l6(a){a=a|0;q[a+32>>2]=127;q[a+28>>2]=128;q[a+20>>2]=129;q[a+16>>2]=130;q[a+12>>2]=131;q[a+8>>2]=132}function gj(a){var b=0,c=0;c=q[79286];b=q[a+8>>2];q[b+8>>2]=3;v[b>>3]=c|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002)}function bqa(a){var b=0,c=0;b=Ii-16|0;Ii=b;c=q[a>>2];q[b+8>>2]=a;a=a+28568|0;nx(a,a+(c<<1)|0,b+8|0);Ii=b+16|0}function _F(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;a=kX(a,c,d,e,f);return((a|0)==-19456?-14592:a)|0}function Yn(a){var b=0;b=Ii-16|0;Ii=b;aa(b+8|0,0)|0;v[a+16>>3]=+q[b+12>>2]/1e6+ +q[b+8>>2];Ii=b+16|0;return a}function Vla(a,b){if(o[b+141|0]&1){q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;return}q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0}function MB(a){a=a-1|0;if(!(a>>>0>=18|!(258303>>>a&1))){return q[(a<<2)+23280>>2]}J(23215,23241,52,23265);G()}function I5(a){a=a|0;q[a+32>>2]=157;q[a+28>>2]=158;q[a+20>>2]=159;q[a+16>>2]=160;q[a+12>>2]=161;q[a+8>>2]=162}function Hw(a){var b=0;b=q[a+8>>2];a=q[a+4>>2];if(b>>>0>a>>>0){J(23111,23130,86,23211);G()}return(a|0)==(b|0)}function xZ(a,b,c){var d=0;d=a;a=Cj(a,0,0,(b<<4)+24|0);ar(d,a,6);q[a+12>>2]=c;o[a+6|0]=1;o[a+7|0]=b;return a}function w_(a){a=a|0;Dj(a,1,5);if(!$l(a,1)){vj(a,0,1);ej(a,-1);xj(a,1)}ej(a,-10002);Si(a,-2,144866);return 0}function rR(a,b){if(!(q[q[a>>2]+184>>2]&16384?!b:0)){Xj(a,2,40);return-31104}q[q[a+64>>2]+120>>2]=1;return 0}function pD(a,b){var c=0;if(b){while(1){c=r[a|0]^c;a=a+1|0;b=b-1|0;if(b){continue}break}}o[(Ii-16|0)+15|0]=c}function nwa(a,b){var c=0,d=0,e=0;c=Ii-160|0;Ii=c;d=a;a=c+8|0;if(Tn(d,a,0,0)){e=lwa(a,b)}Ii=c+160|0;return e}function eya(a){var b=0,c=0;b=Ii-16|0;Ii=b;q[b+8>>2]=q[a+4>>2];if(!r[q[b+8>>2]]){c=cya(a)}Ii=b+16|0;return c}function d9(a){var b=0;b=$i(20);q[b>>2]=0;q[b+4>>2]=0;q[b+16>>2]=0;q[b+8>>2]=0;q[b+12>>2]=0;cI(b,a);return b}function YB(a,b,c){q[a+24>>2]=0;q[a+28>>2]=0;q[a+20>>2]=c;q[a+16>>2]=b;q[a+8>>2]=0;q[a+12>>2]=0;v[a>>3]=Bx()}function Tu(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e+12>>2]=c;q[e+8>>2]=b;a=Dy(a,1075,e+8|0,d);Ii=e+16|0;return a}function Qm(a,b,c,d,e){var f=0;f=Ii-16|0;Ii=f;q[f+8>>2]=c;q[f+12>>2]=d;a=Nha(a,b,f+8|0,e);Ii=f+16|0;return a}function Mra(a,b){var c=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=0;c=a+8|0;q[c>>2]=0;q[c+4>>2]=0;Wi(b,4,a,c,a+4|0)}function mU(a,b){var c=0;c=a;a=((b<<1)+4&8)+b|0;a=w(2-w(a,b)|0,a);a=w(2-w(a,b)|0,a);q[c>>2]=w(w(a,b)-2|0,a)}function fta(a,b){var c=0;c=Ii-16|0;Ii=c;o[c+11|0]=b;a=Mi[q[a>>2]](q[a+4>>2],c+11|0,1)|0;Ii=c+16|0;return a}function fG(a,b){var c=0;c=Ii-96|0;Ii=c;q[c>>2]=b;sj(a,1024,183238,c);a=es(a,c+8|0);Ii=c+96|0;return a?-2:0}function YU(a){a=a|0;var b=0;Fl(a,138013);b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function XZ(a){a=a|0;var b=0;Dj(a,1,5);ej(a,-10003);ej(a,1);b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;return 3}function TP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<2)+a|0;if(y(c)<2147483648){q[a>>2]=~~c;return}q[a>>2]=-2147483648}function JK(a,b){var c=0;if(b){while(1){a=(a&65534)>>>1|0;c=c+1|0;if((c|0)!=(b|0)){continue}break}}return a}function An(a){if((a|0)>=0){J(109616,96899,3363,109655);G()}return((a>>>26&31)+(a>>>21&31)|0)+(a>>>16&31)|0}function rxa(a,b){var c=0;c=Ii-16|0;q[c+12>>2]=a;a=b>>>0>1?((b<<2)+a|0)-4|0:a;q[c+8>>2]=a+4;return q[a>>2]}function ika(a){a=a|0;var b=0,c=0;b=q[a+4>>2];c=q[a>>2];a=q[q[a+8>>2]+8>>2];kw(b,c,a);if(a){Ni(a)}return 0}function aia(a){var b=0;b=Ii-16|0;Ii=b;q[b+4>>2]=a;q[b+8>>2]=0;q[b+12>>2]=0;q[b>>2]=298416;eB(b);Ii=b+16|0}function xn(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+8>>2]=b;q[d+4>>2]=c;q[d>>2]=a;Pi(4,58248,58408,d);Ii=d+16|0}function oI(a,b,c,d,e){if(d>>>0<=1073741824){a=tza(a,c,b,d);q[e>>2]=a;return a>>>30&2}q[e>>2]=-1;return 4}function fqa(a,b){if(a){if(b>>>0<=32765){q[a+29100>>2]=b;a=0}else{a=-7}return a}J(7178,7192,241,7225);G()}function Z5(a,b,c){a=a|0;b=b|0;c=c|0;if(dj(a,33018)){a=-1}else{q[c>>2]=Ti($i(2188),a,2188);a=0}return a|0}function Uk(a,b,c){var d=0;d=b;b=b>>31;a:{if(q[a+76>>2]<=-1){a=pO(a,d,b,c);break a}a=pO(a,d,b,c)}return a}function OY(a,b){if(s[a+52>>1]>s[a+54>>1]){Yk(a,140943,0)}o[a+6|0]=1;q[a+12>>2]=q[a+8>>2]-(b<<4);return-1}function sT(a,b,c){var d=0,e=0;e=c+136|0;d=q[a>>2];d=uy(c,e,d,b-d|0);if(!d){d=CE(c,e)}q[a>>2]=b;return d}function nya(a){a=a|0;a:{if(o[287656]&1){break a}a=q[71909];if(a){Ni(a)}a=q[71907];if(!a){break a}Ni(a)}}function jya(a){a=a|0;a:{if(o[317188]&1){break a}a=q[79292];if(a){Ni(a)}a=q[79290];if(!a){break a}Ni(a)}}function Tfa(a){a=a|0;if(a){if(r[a+156|0]&32){a=Jb()|0}else{a=0}return a|0}J(88567,88575,1386,88609);G()}function O8(a){if(q[a+1872>>2]){q[a+1888>>2]=0;q[a+1308>>2]=0;q[a+988>>2]=0;q[a+668>>2]=0;q[a+348>>2]=0}}function Aq(a,b){var c=0,d=0;d=Ii-160|0;Ii=d;c=a;a=d+8|0;c=Tn(c,a,0,0);if(c){Zo(a,b)}Ii=d+160|0;return c}function ysa(){var a=0;a=Ii-16|0;Ii=a;o[266420]=0;Aaa(r[266420]);Kta();ata();q[213382]=0;M9();Ii=a+16|0}function wT(a){a=a|0;var b=0;b=Tl(a,1,0,0);Xi(a,TS(q[($q(a,2,146120,257728)<<2)+146096>>2],b));return 1}function tT(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=uj(a,-1,0);$y(q[53736],143408,b);Ii=b+16|0;return 0}function kG(){var a=0,b=0;a=Ii-16|0;Ii=a;q[a+8>>2]=0;b=q[239672];if(b){if(!q[b+12>>2]){lG(b)}}Ii=a+16|0}function gt(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=0;a=oo(a,b,1,c+12|0);Ii=c+16|0;return a?q[c+12>>2]:0}function ek(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;q[b+4>>2]=a;q[b>>2]=a;q[b+8>>2]=a+1;dya(b);Ii=b+16|0}function OP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<2)+a|0;if(c<4294967296&c>=0){q[a>>2]=~~c>>>0;return}q[a>>2]=0}function MP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<1)+a|0;if(c<4294967296&c>=0){p[a>>1]=~~c>>>0;return}p[a>>1]=0}function Hl(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=q[a>>2];q[a>>2]=q[b>>2];q[b>>2]=q[c+12>>2];Ii=c+16|0}function CC(a,b,c){a:{if(q[a+4>>2]==(c|0)){if(!dx(b,q[a+8>>2],c)){break a}}return rP(b,a)?-1:0}return 0}function wE(a){var b=0;b=Bk(a,1);a:{if(b){break a}b=Bk(a+12|0,1);if(b){break a}b=Bk(a+24|0,0)}return b}function vja(a){a=a|0;var b=0;b=q[q[a+8>>2]+8>>2];lq(q[a>>2],509,b);hB(q[a>>2],b);if(b){Ni(b)}return 0}function VD(a){var b=0;b=q[240513];a=am(q[a>>2],3,0);q[240513]=b;if(!(a&2048)){return 0}return(b|0)==6}function Sqa(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];Dp(b,a+52|0);Aj(q[a+44>>2]);FB(a);return 0}function Qoa(a){var b=0;if(!(o[a+24|0]&1)){b=q[a+4>>2];if(!b){b=q[a>>2]}return(q[b>>2]!=0)<<1}return 1}function DM(a){var b=0,c=0;b=q[a+4>>2];c=q[a>>2];if((b|0)!=(c|0)){q[a+4>>2]=(((b-c|0)-8>>>3^-1)<<3)+b}}function SE(a,b,c){var d=0;d=q[a>>2];if((d-b|0)<1){return-108}b=a;a=d-1|0;q[b>>2]=a;o[a|0]=c;return 1}function PM(a){var b=0;b=q[a+8>>2];if(b>>>0>t[a+4>>2]){J(23111,23130,33,23161);G()}return b-q[a>>2]|0}function I$(a,b,c){a=a|0;b=b|0;c=c|0;a=q[b+4>>2];if(!a){return 0}q[c>>2]=a;q[b+4>>2]=0;return q[b>>2]}function $F(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;return jX(a,b,c,d,e,f)|0}function tD(a){var b=0;b=vD(a);b=b-1>>>0<16748?b:16749;a=q[a+216>>2];return a>>>0>b>>>0?-27648:b-a|0}function L5(a){a=a|0;if(!dj(a,33481)){return 1}a=wm(a+140|0,46);if(!a){return 0}return!dj(a,33485)|0}function A1(a){a=a|0;var b=0;b=q[a+12>>2];a:{if(!b){break a}GC(b);if(q[b+92>>2]){break a}Ni(b)}Ni(a)}function gya(a){a=a|0;Gj(q[213144]);a=q[213143];if(a){if(a){Ni(cua(a))}}Bj(q[213144]);Qn(q[213144])}function g5(a){var b=0;b=q[q[a>>2]+120>>2];rj(b,-1e4,q[a+4>>2]);xk(b,-2);ik(b,-2);xk(b,-2);Ri(b,-2)}function ar(a,b,c){a=q[a+16>>2];q[b>>2]=q[a+28>>2];q[a+28>>2]=b;a=r[a+20|0];o[b+4|0]=c;o[b+5|0]=a&3}function Vha(a,b){var c=0,d=0;d=a;c=r[a+24|0];if(!(!(c&16)^b)){c=r[a+24|0]}o[d+24|0]=c&239|(b?16:0)}function pv(a,b){var c=0;c=a;a=q[b+16>>2];return Tu(c,q[(a?12:0)+b>>2],q[(a?16:4)+b>>2],q[b+8>>2])}function mua(){var a=0,b=0;a=q[210908];if(a){b=q[a>>2];if(b){Ni(b);Ni(q[a+4>>2])}Ni(a)}q[210908]=0}function dya(a){var b=0;b=Ii-16|0;Ii=b;q[b+8>>2]=q[a+4>>2];o[q[b+8>>2]]=1;o[q[a+8>>2]]=1;Ii=b+16|0}function _ua(a){a=a|0;var b=0;hm(a,1);if(!$l(a,1)){b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16}return 1}function Qr(a){var b=0;a=pa(a|0)|0;a=(a|0)==27?0:a;b=0;a:{if(!a){break a}q[240513]=a;b=-1}return b}function ls(a,b,c,d){if((c|0)==1){o[d|0]=1-a;o[d+1|0]=0-((b|0)==2?1:b);return}o[d|0]=a;o[d+1|0]=b}function go(a,b,c){a=q[a+16>>2];if(r[a+21|0]==1){Ok(a,c);return}o[b+5|0]=r[a+20|0]&3|r[b+5|0]&248}function eQ(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return SC(6,a,b,c,d,e,f,g)|0}function dQ(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return SC(7,a,b,c,d,e,f,g)|0}function ZN(a){NN(a+4|0);NN(a+16|0);Sr(a+28|0);Sr(a- -64|0);Sr(a+100|0);Sr(a+136|0);q[a+172>>2]=0}function Wha(a,b){var c=0,d=0;d=a;c=r[a+24|0];if(!(!(c&8)^b)){c=r[a+24|0]}o[d+24|0]=c&247|(b?8:0)}function Uwa(a,b){var c=0;c=_o(a,b?56:60,4);return(_o(a,b?48:52,4)<<4|c<<8|_o(a,b?40:44,4))&65535}function Ro(a,b,c){var d=0;d=-1;if(!(!b|b&1)){a=vua(a,b,c);d=(a|0)==28?-1:(a|0)==48?-2:0}return d}function RP(a,b,c){a=a|0;b=b|0;c=+c;a=(b<<1)+a|0;if(y(c)<2147483648){p[a>>1]=~~c;return}p[a>>1]=0}function Fx(a,b){var c=0;c=Ii-16|0;Ii=c;o[c+15|0]=r[a|0];o[a|0]=r[b|0];o[b|0]=r[c+15|0];Ii=c+16|0}function zna(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=q[a+180>>2];if(!a){return 0}return Bt(a,b,c,d)|0}function yxa(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return ZX(a,b,c,d,e,f,g)|0}function wva(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return UX(a,b,c,d,e,f,g)|0}function vv(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+4>>2]=a+140;q[c>>2]=a+8;sj(b,1024,32953,c);Ii=c+16|0}function qH(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+4>>2]=a+140;q[c>>2]=a+8;sj(b,1024,27214,c);Ii=c+16|0}function nr(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+4>>2]=a+140;q[c>>2]=a+8;sj(b,1024,32943,c);Ii=c+16|0}function koa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=q[a+220>>2];if(!a){return 0}return Bt(a,b,c,d)|0}function gG(a,b){a=a|0;b=b|0;var c=0;c=q[a+4>>2];q[b>>2]=q[a>>2];q[b+4>>2]=c;q[b+8>>2]=q[a+8>>2]}function et(a,b){var c=0;c=q[a+8>>2];q[c+8>>2]=3;v[c>>3]=b|0;q[a+8>>2]=q[a+8>>2]+16;ik(a,-10002)}function dT(){var a=0,b=0;a=bk(1,172);if(a){b=Ui(a,0,172);q[b+168>>2]=0;q[b+164>>2]=0}return a|0}function Uma(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=q[a+192>>2];if(!a){return 0}return Bt(a,b,c,d)|0}function Rna(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=q[a+148>>2];if(!a){return 0}return Bt(a,b,c,d)|0}function R2(a,b){a=a|0;b=x(b);if(a){a=sv(a);if(a){K2(a,b)}return}J(132983,132848,454,133070);G()}function PP(a,b,c){a=a|0;b=b|0;c=+c;a=a+b|0;if(c<4294967296&c>=0){o[a|0]=~~c>>>0;return}o[a|0]=0}function M8(a){Ui(q[a+16>>2],255,q[a+20>>2]<<2);q[a+36>>2]=-1;q[a+40>>2]=0;q[a+28>>2]=q[a+24>>2]}function Gr(a,b){var c=0;c=q[b+48>>2];q[a>>2]=c;gA(c);c=q[a>>2];a=q[b>>2];yH(c,a,q[b+4>>2]-a>>2)}function Fma(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=q[a+144>>2];if(!a){return 0}return Bt(a,b,c,d)|0}function zha(a){a=a|0;var b=0;b=q[a+8>>2];q[b+8>>2]=1;q[b>>2]=0;q[a+8>>2]=q[a+8>>2]+16;return 1}function xV(a){q[a+208>>2]=20;q[a+212>>2]=1;o[q[a+204>>2]]=1;q[a+4>>2]=q[a+4>>2]+1;return Pq(a)}function wD(a){var b=0;if(a){while(1){b=q[a+12>>2];Ni(q[a>>2]);Ni(a);a=b;if(a){continue}break}}}function s6(a,b,c){var d=0;d=$i(2196);Ui(d+8|0,0,2188);q[d+4>>2]=b;q[d>>2]=a;q[c>>2]=d;return 0}function mL(a){a=a|0;a:{if(uk(a,-1)){lk(a,Oi(uj(a,-1,0)),Li);break a}ej(a,-1)}jl(a,-3);return 1}function _va(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,365,106621);G()}return q[a>>2]+w(b,11)|0}function wX(a,b){var c=0;c=Ii-384|0;Ii=c;oN(c,a,b);Mi[q[65677]](c,0,384)|0;Ii=c+384|0;return 0}function vX(a,b){var c=0;c=Ii-384|0;Ii=c;oN(a,c,b);Mi[q[65677]](c,0,384)|0;Ii=c+384|0;return 0}function uX(a,b){var c=0;c=Ii-384|0;Ii=c;nN(c,a,b);Mi[q[65677]](c,0,384)|0;Ii=c+384|0;return 0}function tX(a,b){var c=0;c=Ii-384|0;Ii=c;nN(a,c,b);Mi[q[65677]](c,0,384)|0;Ii=c+384|0;return 0}function tO(a){return fv(a+ -1416.0996898839683)*2.247116418577895e+307*2.247116418577895e+307}function oya(a){a=a|0;Ni(q[71494]);a:{if(o[285996]&1){break a}a=q[71496];if(!a){break a}Ni(a)}}function ok(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,366,106621);G()}return q[a>>2]+w(b,11)|0}function awa(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,365,106621);G()}return q[a>>2]+(b<<3)|0}function aka(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];jw(b,a);if(a){lB(a);Ni(a)}return 0}function aN(a,b){var c=0;if(!(!r[906092]|((a|0)!=1|b>>>0>127))){c=q[(b<<2)+922924>>2]}return c}function ZG(a,b){if(t[a+4>>2]<=b>>>0){J(152522,152534,135,152554);G()}return q[a>>2]+w(b,24)|0}function Xla(a,b,c,d){b=Dl(a,b,c,1);if(b){a:{if(o[a+141|0]&1){break a}}o[d|0]=0}return(b|0)!=0}function X5(a){a=a|0;q[a+32>>2]=143;q[a+28>>2]=144;q[a+16>>2]=145;q[a+12>>2]=146;q[a+8>>2]=147}function Wva(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,365,106621);G()}return q[a>>2]+(b<<2)|0}function Vda(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=qj(a,1);Lj(a,204432,b);Ii=b+16|0;return 1}function Tva(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,365,106621);G()}return q[a>>2]+(b<<1)|0}function P5(a){a=a|0;q[a+32>>2]=149;q[a+28>>2]=150;q[a+16>>2]=151;q[a+12>>2]=152;q[a+8>>2]=153}function Hza(a,b){var c=0,d=0;c=b&31;d=(-1<>>c|0;c=a;a=0-b&31;return d|(c&-1>>>a)<>>0>=4){J(106836,106647,758,106855);G()}return r[a+c|0]>>>(b<<1)&3}function Fha(){var a=0;a=Ii-16|0;Ii=a;q[a+4>>2]=64;q[a>>2]=48637;Pi(4,58248,58324,a);Ii=a+16|0}function Bx(){var a=0;a=Ii-16|0;Ii=a;aa(a+8|0,0)|0;Ii=a+16|0;return+q[a+12>>2]/1e6+ +q[a+8>>2]}function wo(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,366,106621);G()}return q[a>>2]+(b<<3)|0}function wga(a){a=a|0;if(!a){J(92095,88575,2182,92249);G()}return(q[a+8>>2]-q[a+4>>2]|0)/24|0}function gy(a){var b=0,c=0;b=Ii-32|0;Ii=b;c=1;if(!xC(b+8|0)){c=DC(a,b+8|0)}Ii=b+32|0;return c}function fy(a){var b=0,c=0;b=Ii-32|0;Ii=b;c=1;if(!xC(b+8|0)){c=DC(b+8|0,a)}Ii=b+32|0;return c}function e8(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=qj(a,1);Lj(a,120144,b);Ii=b+16|0;return 1}function Y7(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=qj(a,1);Lj(a,120063,b);Ii=b+16|0;return 1}function Vt(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,366,106621);G()}return q[a>>2]+(b<<1)|0}function V7(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=qj(a,1);Lj(a,120651,b);Ii=b+16|0;return 1}function T_(a){a=a|0;if(q[Lm(a,145545)>>2]){Js(a,1);Zi(a,-1,145646);Mi[Cy(a)|0](a)|0}return 0}function RM(a){var b=0;b=q[a>>2];q[a+8>>2]=b;if(t[a+4>>2]>>0){J(23111,23130,40,23166);G()}}function Qda(a,b){a=a|0;b=b|0;rj(a,-1e4,q[q[b>>2]+8>>2]);rj(a,-1,q[b+4>>2]);xk(a,-2);Ri(a,-2)}function Eqa(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;q[b>>2]=qj(a,1);Lj(a,19074,b);Ii=b+16|0;return 1}function El(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,366,106621);G()}return q[a>>2]+(b<<2)|0}function Bw(a){var b=0;b=Ii-16|0;Ii=b;a=f5(a,b+12|0,q[71661]);Ii=b+16|0;return a?q[b+12>>2]:0}function gq(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+8>>2]=4;q[c>>2]=b;a=Vr(a,c,c);Ii=c+16|0;return a}function bx(a){var b=0;if(!a){return}q[a+319472>>2]=0;b=q[a+92>>2];if(b){Ni(b);q[a+92>>2]=0}}function Q_(a){a=a|0;var b=0;b=q[a+8>>2];q[b+8>>2]=0;q[a+8>>2]=b+16;bj(a,145920,26);return 2}function BX(a){var b=0;if(a){b=a+32|0;if(b){Mi[q[65677]](b,0,280)|0}Mi[q[65677]](a,0,320)|0}}function Asa(){var a=0;Mi[q[74924]]();N9();a=q[213382];if(a){xl(a);Ni(q[213382])}q[213382]=0}function aF(a,b,c,d){q[a+64>>2]=d;q[a+60>>2]=d;d=b;b=!b|!c;q[a+68>>2]=b?0:d;o[a+56|0]=b?0:c}function Qt(a){var b=0;b=Ii-16|0;Ii=b;q[b+12>>2]=0;b=q[53736];OC(b,a,0);Us(10,b);Ja(-1);G()}function H$(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=-24832;if(!(!a|!c)){q[c>>2]=b;d=0}return d|0}function Caa(a,b){var c=0;if(a){c=a+3448|0;o[c|0]=r[c|0]|1;q[a+3444>>2]=Pj(a+3188|0,b,256)}}function B8(a,b,c){a=a|0;b=b|0;c=c|0;Ti(q[a+4>>2]+q[a>>2]|0,b,c);q[a>>2]=q[a>>2]+c;return 1}function AN(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)==256){return(OX(a,b)?-24832:0)|0}return-24832}function n3(a){a=a|0;var b=0;b=Ii-1024|0;Ii=b;n1(b,kj(a,1,0));Xi(a,b);Ii=b+1024|0;return 1}function mZ(a){var b=0;b=Ii-16|0;Ii=b;q[b+8>>2]=3;v[b>>3]=1;a=Vr(a,b,b);Ii=b+16|0;return a}function QP(a,b,c){a=a|0;b=b|0;c=+c;a=a+b|0;if(y(c)<2147483648){o[a|0]=~~c;return}o[a|0]=0}function Oia(a){a=a|0;var b=0;b=q[a>>2];a=q[q[a+8>>2]+8>>2];cj(b,q[a+8>>2]);Ni(a);return 0}function HW(a,b,c){a=iU(a);if(!a){return-46}q[b>>2]=q[a+16>>2];q[c>>2]=q[a+20>>2];return 0}function D1(a,b){if(!a){J(209580,209588,95,209611);G()}Mi[q[q[a+8>>2]+32>>2]](q[a+4>>2],b)}function BG(a){var b=0;b=q[q[a>>2]+120>>2];rj(b,-1e4,q[a+4>>2]);xk(b,-3);pj(b,-3);Ri(b,-2)}function wZ(a){var b=0;b=a;a=Cj(a,0,0,32);ar(b,a,10);q[a+24>>2]=0;q[a+8>>2]=a+16;return a}function kva(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=Mu(a,b,c,d);return((a|0)==-81?-24832:a)|0}function jp(a,b,c){var d=0;d=Ii-16|0;Ii=d;if(!fq(a,b)){q[d>>2]=c;Qi(a,143283,d)}Ii=d+16|0}function gX(a){a=a-18|0;if((a&65535)>>>0<=10){return q[(a<<16>>16<<2)+264240>>2]}return 0}function fr(a){if(!a){J(209580,209588,115,209639);G()}Mi[q[q[a+8>>2]+24>>2]](q[a+4>>2])|0}function cp(a,b,c,d){var e=0;e=Ii-16|0;Ii=e;q[e+12>>2]=d;a=Gq(a,b,c,d);Ii=e+16|0;return a}function Yra(a,b){a=a|0;b=b|0;i5(q[q[a+8>>2]+16>>2],u[q[a+4>>2]+4>>2]);return xM(a,3,b)|0}function Uxa(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=b;a=hO(a,145789,b);Ii=c+16|0;return a}function Pwa(a,b){if(b>>>0>=2){J(106998,96899,627,107854);G()}return r[a+3|0]>>>(b?2:5)&7}function KF(a){var b=0;b=a-48|0;if(b>>>0>=10){a=a|32;return a-97>>>0<6?a-87|0:-1}return b}function yca(a){a=a|0;var b=0;gj(a);b=_i(a,-1,q[213927],204267);Ri(a,-2);uba(b);return 0}function Xt(a,b){var c=0;c=a;a=q[b>>2];c=r[c+(a>>>3|0)|0];q[b>>2]=a+1;return c>>>(a&7)&1}function Xm(a,b){return q[a+4>>2]<<5>>>0>b>>>0?q[q[a+8>>2]+(b>>>3&536870908)>>2]>>>b&1:0}function Vp(a,b,c){a=Ci(a|0,b|0,c|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}return a}function Ut(a,b){if(t[a+4>>2]<=b>>>0){J(106610,106468,366,106621);G()}return q[a>>2]+b|0}function UR(a,b,c){var d=0;d=-1;if(!(!a|q[a+8>>2]!=(c|0))){d=Ej(q[a+12>>2],b,c)}return d}function Raa(a,b){a=a|0;b=b|0;a=AJ(q[210500],a);if(a){yJ(q[q[210500]+20>>2],a,(b|0)!=0)}}function R$(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=b;a=NC(a,145736,b);Ii=c+16|0;return a}function Owa(a,b,c){return((b>>>0<31?b:31)<<5|(a>>>0<31?a:31)<<10|(c>>>0<31?c:31))&65535}function Naa(a,b){a=a|0;b=b|0;a=Bb(1239)|0;if(!a){Pi(5,147875,147879,0)}return(a|0)!=0|0}function Iia(a){a=a|0;a=q[q[a+8>>2]+8>>2];Mi[q[75009]](q[a>>2],q[a+4>>2]);Ni(a);return 0}function Fza(a,b){var c=0,d=0;c=b&31;d=(-1>>>c&a)<>>a}function wB(a){Ni(q[a>>2]);a:{if(o[a+20|0]&1){break a}a=q[a+8>>2];if(!a){break a}Ni(a)}}function QW(a,b,c){if(a>>>0>>0){a=Bza(b,a,c);a=!Li&(a|0)!=-1?a:-1}else{a=-1}return a}function Pfa(a){a=a|0;if(a){if(r[a+156|0]&32){Ib()}return}J(88567,88575,1352,91360);G()}function zxa(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return _X(a,b,c,d,e,f)|0}function xva(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return VX(a,b,c,d,e,f)|0}function wq(a){if(a>>>0>=9){J(153529,153556,157,153579);G()}return q[(a<<2)+154632>>2]}function pR(a,b,c){a=a|0;b=b|0;c=c|0;Uq(q[a+68>>2]+596|0,b,c);$p(q[a+68>>2]+684|0,b,c)}function Zt(a){if(a>>>0>=22){J(96993,96899,10867,97485);G()}return q[(a<<2)+111036>>2]}function VP(a,b){if(b){b=(b<<3)+a|0;while(1){a=a+8|0;if((b|0)!=(a|0)){continue}break}}}function Qia(a){a=a|0;var b=0;a=q[q[a+8>>2]+8>>2];b=kz(q[a>>2]);Ni(a);return(b?-6:0)|0}function Kua(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return xX(a,b,c,d,e,f)|0}function Dza(a){var b=0,c=0;while(1){c=b;if(a){a=a-1&a;b=b+1|0;continue}break}return c}function Cua(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return sX(a,b,c,d,e,f)|0}function Bca(a,b,c){var d=0;d=yj(a,8);q[d+4>>2]=c;q[d>>2]=b;Zi(a,-1e4,202300);xj(a,-2)}function ru(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;a=uP(a,b,c);Ii=d+16|0;return a}function rqa(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;Ht(b,Zm(a,1));hr(a,b);Ii=b+16|0;return 1}function pqa(a){a=a|0;var b=0;b=Ii-16|0;Ii=b;Lr(b,Zm(a,1));Al(a,b);Ii=b+16|0;return 1}function p$(a){a=a|0;a=(jj(a,1)^-1)+(q[a+8>>2]-q[a+12>>2]>>4)|0;return((a|0)>0?a:0)|0}function oj(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;a=Su(a,b,c);Ii=d+16|0;return a}function mwa(a,b){var c=0;c=Ii-96|0;Ii=c;a=nwa(a,c);if(a){Hwa(b,c)}Ii=c+96|0;return a}function lT(a,b){a=a|0;b=b|0;a=s[a>>1];b=s[b>>1];return(a>>>0>>0?-1:a>>>0>b>>>0)|0}function gw(a){a=a|0;var b=0;a=q[q[a+8>>2]+8>>2];b=q[a>>2];if(b){Aj(b)}Ni(a);return 0}function fB(a){a=a|0;var b=0;b=$i(4);q[b>>2]=q[a+20>>2];q[q[a+24>>2]+8>>2]=b;return 0}function XP(a,b){a=a|0;b=b|0;a=q[a>>2];b=q[b>>2];return(a>>>0>>0?-1:a>>>0>b>>>0)|0}function Ns(a,b){Zi(a,-1e4,b);if(!Vi(a,-1)){Ri(a,-2);vj(a,0,0);ej(a,-1);Si(a,-1e4,b)}}function $3(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;DG(a,b,e,hj(e),c,d);if(a){Ni(a)}}function Kfa(a,b){a=a|0;b=b|0;b=1<>2])!=0|(q[a+140>>2]&b>>31)!=0}function Cfa(a,b,c){a=a|0;b=b|0;c=c|0;a=Mi[q[74954]](a,b)|0;p[a+194>>1]=c;return a|0}function zR(a,b,c){b=lX(q[a+68>>2]+132|0,b,c);if(!b){return zD(a)?-31488:0}return b}function caa(){var a=0,b=0;a=q[213144];Gj(a);b=q[213143];Bj(a);if(!b){return}Yta(b)}function V0(a,b,c,d,e){var f=0;f=wy(a,b,d,e);if(!f){f=Es(a,c,b,a+40|0,d,e)}return f}function IK(a){if(a>>>0>=30){J(88032,87638,506,88066);G()}return q[(a<<2)+88404>>2]}function C_(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(!d){Ni(b);return 0}return ul(b,d)|0}function rZ(a,b,c){if(q[b+16>>2]==142616){Wx(a,b,c,0);return}Wx(a,b,c,1<>2]=b;q[a+32>>2]=b;o[a+44|0]=0;q[a+36>>2]=b+c;Ui(b,0,c)}function es(a,b){a=Bi(a|0,b|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}return a}function d1(a,b){a=a|0;b=b|0;a=(b<<3)+a|0;return+(+t[a>>2]+ +q[a+4>>2]*4294967296)}function bF(a,b,c){var d=0;d=q[a+16>>2];if(t[d+68>>2]>=t[d+64>>2]){om(a)}Su(a,b,c)}function _0(a,b){a=a|0;b=b|0;a=(b<<3)+a|0;return+(+t[a>>2]+ +t[a+4>>2]*4294967296)}function RX(a,b,c,d,e,f,g,h,i,j){if(!j){return-13}return CN(a,0,b,c,d,e,f,g,h,i,j)}function Nx(a,b,c,d){var e=0;e=a;a=HD(b,c,d);q[e>>2]=a;return(a|0)==-1?q[240513]:0}function lya(a){a=a|0;a:{if(o[300176]&1){break a}a=q[75041];if(!a){break a}Ni(a)}}function kya(a){a=a|0;a:{if(o[300188]&1){break a}a=q[75045];if(!a){break a}Ni(a)}}function iya(a){a=a|0;a:{if(o[300204]&1){break a}a=q[75048];if(!a){break a}Ni(a)}}function d_(a){a=a|0;NF(a,1);if(eq(a,-1)){ej(a,-10002);return 1}Js(a,-1);return 1}function Twa(a){var b=0;b=_o(a,59,5);return(_o(a,51,5)<<5|b<<10|_o(a,43,5))&65535}function Oca(a){a=a|0;gj(a);_i(a,-1,q[213927],204267);Ri(a,-2);Ra(0,0,0);return 0}function Lwa(a,b){var c=0;c=Ii-16|0;Ii=c;Jwa(c+8|0,b);q[a>>2]=q[c+8>>2];Ii=c+16|0}function AZ(a,b){var c=0;c=a;a=r[b+6|0];Cj(c,b,(r[b+7|0]<<(a?4:2))+(a?24:20)|0,0)}function _sa(a,b,c){c=dl(c,22305);if(!c){return 3}a=Iw(a,b,c,119);rk(c);return a}function YD(a){a=xi(a|0,493)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}return a}function SX(a,b,c,d,e,f,g,h,i,j){if(!j){return-13}return PX(a,b,c,d,e,f,g,h,i,j)}function Qwa(a){var b=0;b=_o(a,56,3);return(_o(a,48,3)<<3|b<<6|_o(a,40,3))&65535}function wpa(a){a=a|0;a=q[q[a+16>>2]>>2];q[a+56>>2]=q[a+56>>2]|1048576;return 0}function n1(a,b){var c=0;c=Ii-16|0;Ii=c;q[c>>2]=b;sj(a,1024,183238,c);Ii=c+16|0}function eo(a,b,c){c=mF(a,c);if(!q[c+8>>2]){o[a+6|0]=r[a+6|0]|1<>2]==10?137852:137858,5);return 1}function V5(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return bH(a,33302,d,e,0)|0}function Pk(a){var b=0,c=0;b=hj(a)+1|0;c=Yi(b);if(!c){return 0}return Ti(c,a,b)}function Jl(a,b){var c=0;c=Ii-16|0;Ii=c;q[c+12>>2]=b;rx(q[53735],a,b);Ii=c+16|0}function p6(a,b){a=a|0;b=b|0;a=q[a+2188>>2];if(!a){return-2}q[b>>2]=a;return 0}function M5(a,b){a=a|0;b=b|0;a=q[a+2192>>2];if(!a){return-2}q[b>>2]=a;return 0}function LW(a){var b=0;b=q[a>>2];if((b|0)!=-1){Sx(b,2);Qr(q[a>>2]);q[a>>2]=-1}}function Kaa(a,b){if((a|0)!=0&(b|0)!=0){Ti(b,a,144);o[a+140|0]=r[a+140|0]&252}}function Gaa(a,b){var c=0;if(!(!a|!b|q[a+488>>2]>-1)){Ti(b,a,488);c=1}return c}function Cm(a){if((a|0)==-1){return}if(!Qr(a)){return}im(173656,304,q[240513])}function zj(a,b){if(b>>>0>=4){J(106793,106647,686,106621);G()}return r[a+b|0]}function uga(a,b,c){a=a|0;b=b|0;c=c|0;q[b>>2]=q[a+112>>2];q[c>>2]=q[a+116>>2]}function tga(a){a=a|0;if(!a){J(88567,88575,1400,91401);G()}return q[a+104>>2]}function e7(a,b){a=a|0;b=b|0;var c=0;c=a;a=q[57766];Gta(c,b,a,hj(a));return 0}function dP(a,b,c){a=WX(a,b,c);if(a){return a-9472|0}return q[c+8>>2]?0:-9572}function WU(a){a=a|0;bj(a,q[Fl(a,138013)+32>>2]==10?138204:138210,5);return 1}function Ufa(a){a=a|0;if(!a){J(88567,88575,1430,91473);G()}return q[a+100>>2]}function RU(a){a=a|0;var b=0;b=a;a=Fl(a,137647);return IF(b,a,q[a+8272>>2])|0}function PU(a){a=a|0;var b=0;b=a;a=Fl(a,137647);return HF(b,a,q[a+8272>>2])|0}function Msa(a,b){a=a|0;b=b|0;return(s[a+956>>1]>>>5&1)-(s[b+956>>1]>>>5&1)|0}function tI(a){Ni(q[a+12>>2]);q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0}function tG(a){q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;DM(a);return a}function sga(a){a=a|0;if(!a){J(88567,88575,1424,91495);G()}return x(x(Tb()))}function rga(a){a=a|0;if(!a){J(88567,88575,1412,91436);G()}return q[a+92>>2]}function lu(a){a=Oa(a|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}return a}function Xua(a){a=a|0;Dj(a,2,5);Ri(a,2);if(!gp(a,1)){Qi(a,147427,0)}return 1}function Vfa(a){a=a|0;if(!a){J(88567,88575,1406,91421);G()}return q[a+88>>2]}function Rfa(a){a=a|0;if(!a){J(88567,88575,1418,91452);G()}return q[a+96>>2]}function QC(a){a=Ei(a|0)|0;if(a>>>0>=4294963201){q[240513]=0-a;a=-1}return a}function Mx(a){var b=0;b=q[a+96>>2];if(b){xl(b);Ni(q[a+96>>2]);q[a+96>>2]=0}}function Aca(a){a=a|0;gj(a);_i(a,-1,q[213927],204267);Ri(a,-2);Eb();return 0}function dpa(a){a=a|0;a=q[q[a+16>>2]>>2];o[a+24|0]=r[a+24|0]&249|4;return 0}function cu(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;Txa(a,b,c);Ii=d+16|0}function QU(a){a=a|0;var b=0;b=a;a=ln(a,137981);return IF(b,a,q[a+32>>2])|0}function OU(a){a=a|0;var b=0;b=a;a=Fl(a,138013);return HF(b,a,q[a+32>>2])|0}function s$(a){a=a|0;Ri(a,1);if(!Vi(a,1)){qk(a,981,0)}qk(a,982,1);return 1}function nv(a){if(q[a>>2]!=1){J(173060,173093,46,173116);G()}return a+16|0}function mn(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;vP(a,b,c);Ii=d+16|0}function hga(a){a=a|0;a=s[a+156>>1];if(a&512){return(a&256?4:3)|0}return 2}function Zj(a,b){if(b>>>0>=4){J(106793,106647,687,106621);G()}return a+b|0}function $y(a,b,c){var d=0;d=Ii-16|0;Ii=d;q[d+12>>2]=c;rx(a,b,c);Ii=d+16|0}function yt(a){a=a-1|0;if(a>>>0>=7){J(87878,87638,391,87935);G()}return a}function sG(a,b,c){if(b>>>0>=3){J(173530,173093,237,173536);G()}CM(a,b,c)}function nna(a){a=a|0;a=q[q[a+16>>2]>>2];p[a+36>>1]=s[a+36>>1]|1;return 0}function i6(a,b){a=a|0;b=b|0;a=q[a>>2];if(!a){return-2}q[b>>2]=a;return 0}function fsa(a){a=a|0;a=q[a+4>>2];if(!a){return-1e3}msa(a);Ni(a);return 0}function Zs(a){if(q[a>>2]!=2){J(173121,173093,52,173154);G()}return a+4|0}function Woa(a){a=a|0;a=q[q[a+16>>2]>>2];q[a+24>>2]=q[a+24>>2]|2;return 0}function Opa(a){a=a|0;a=q[q[a+16>>2]>>2];o[a+160|0]=r[a+160|0]|2;return 0}function NN(a){if(q[a>>2]){Ni(q[a>>2]);q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0}}function Jma(a){a=a|0;a=q[q[a+16>>2]>>2];o[a+166|0]=r[a+166|0]|2;return 0}function Bm(a,b,c,d,e){return fl(a,c<<6|b|d<<23|e<<14,q[q[a+12>>2]+8>>2])}function Mka(a){a=a|0;return Dk(q[a>>2],q[a+4>>2],0,492,493,0,494,495)|0}function B_(a,b,c){a=a|0;b=b|0;c=c|0;a=Mi[a|0](b,c)|0;L(Li|0);return a|0}function Axa(a,b,c){a=a|0;b=b|0;c=c|0;if(b>>>0>c>>>0){Ui(a+c|0,0,b-c|0)}}function lO(a,b){if(b){b=Vxa(q[b>>2],q[b+4>>2],a)}else{b=0}return b?b:a}function SZ(a){a=a|0;Dj(a,1,5);hm(a,2);hm(a,3);Ri(a,3);Ij(a,1);return 1}function Koa(a){a=a|0;a=q[q[a+16>>2]>>2];o[a+22|0]=r[a+22|0]|2;return 0}function Km(a,b,c,d){if((b|0)==1){OW(a,c,d);return 0}PW(a,c,d);return 0}function K0(a,b){a=a|0;b=b|0;q[b>>2]=2;q[b+8>>2]=a+136;q[b+4>>2]=160885}function Fpa(a){a=a|0;a=q[q[a+16>>2]>>2];o[a+24|0]=r[a+24|0]|2;return 0}function $na(a){a=a|0;a=q[q[a+16>>2]>>2];p[a+8>>1]=s[a+8>>1]|1;return 0}function nH(a,b,c,d){q[d>>2]=0;a=J6(a,b,c);return a?(a|0)==-1?-19:-3:0}function bm(a){var b=0;b=Ii-96|0;Ii=b;a=es(a,b+8|0);Ii=b+96|0;return!a}function Mk(a,b){var c=0;c=a;a=q[a+44>>2];sn(c,(a|0)<(b|0)?a+b|0:a<<1)}function pE(a,b){a=kU(a);if(!a){return-46}q[b>>2]=q[a+16>>2];return 0}function nl(a,b){a=_i(a,b,q[79307],0);b=q[a>>2];Li=q[a+4>>2];return b}function Ck(a,b,c){if((Ll(a,b)|0)==(c|0)){a=qj(a,b)}else{a=0}return a}function zma(a){a=a|0;if(!tL(q[q[a+16>>2]>>2])){Pi(4,55056,55327,0)}}function i$(a){a=a|0;return a<<8&16711680|a<<24|(a>>>8&65280|a>>>24)}function gxa(a){return(1797559>>>a&1?1497965>>>a&1:0)?1:898768>>>a&1}function gk(a,b){a=a|0;b=b|0;a=pC(a,b);return(r[a|0]==(b&255)?a:0)|0}function aL(a,b){var c=0;c=q[b>>2];if(c){cj(a,c)}Ni(q[b+4>>2]);Ni(b)}function Xoa(a,b){a=a|0;b=b|0;if(!r[q[a+12>>2]+18|0]){xL(a)}return 0}function W0(a){bo(a);ij(a+124|0);nm(a+136|0);nm(a+172|0);ij(a+208|0)}function US(a,b){a=a|0;b=b|0;if(!q[240588]){q[240589]=b;q[240588]=a}}function Rp(a,b){return b?a<<8&16711680|a<<24|(a>>>8&65280|a>>>24):a}function Nwa(a,b){bC(a,59,b>>>10&31);bC(a,51,b>>>5&31);bC(a,43,b&31)}function Ifa(a,b){a=a|0;b=b|0;return NK(35632,q[b+4>>2],q[b+8>>2])|0}function Dta(a,b,c){a=a|0;b=b|0;c=c|0;return(Kl(b,1,c,a)|0)==(c|0)|0}function Afa(a,b){a=a|0;b=b|0;return NK(35633,q[b+4>>2],q[b+8>>2])|0}function tB(a){a=a|0;a=q[q[a+8>>2]+8>>2];Aj(q[a>>2]);Ni(a);return 0}function o6(a){a=a|0;if(!dj(a,32093)){return 1}return!dj(a,31845)|0}function ns(a){if(a){Mx(a);Ni(q[a+104>>2]);Mi[q[65677]](a,0,128)|0}}function kF(a,b,c){fl(a,(c<<23)+8388608|b<<6|30,q[q[a+12>>2]+8>>2])}function h6(a){a=a|0;if(!dj(a,32187)){return 1}return!dj(a,32479)|0}function fC(a,b,c){return(w(b<<8|b,c)+w(64-c|0,a<<8|a)|0)+32>>>14|0}function cpa(a,b){a=a|0;b=b|0;if(r[q[a+12>>2]+18|0]){xL(a)}return 0}function S5(a){a=a|0;if(!dj(a,33030)){return 1}return!dj(a,33035)|0}function KN(a,b){q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;Tt(a,b);return a}function xxa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Km(a,b,c,d)|0}function vU(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ul(b,w(c,d))|0}function pZ(a,b){if(q[b+16>>2]!=q[b+20>>2]){rn(a,b);return}Nm(a,b)}function oL(a){fia(a);a=q[74605];if(a){no(a)}q[74604]=0;q[74605]=0}function ira(a){a=a|0;return Dk(q[a>>2],q[a+4>>2],0,0,98,0,99,0)|0}function cna(a){a=a|0;x9(q[a+8>>2]+16|0,q[q[a+16>>2]>>2]);return 0}function wra(a,b){a=a|0;b=b|0;km(a,b);lk(a,q[b+32>>2],q[b+36>>2])}function v1(a){a=a|0;if(!a){J(211477,211484,202,211516);G()}Ni(a)}function Yu(a,b,c,d){return fl(a,c<<6|b|d<<14,q[q[a+12>>2]+8>>2])}function vva(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Gs(a,c,d)|0}function Qn(a){if(a){Ni(a);return}J(172609,172577,47,172615);G()}function Jua(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return yy(a,c,d)|0}function Eta(a,b,c){a=a|0;b=b|0;c=c|0;q[a>>2]=q[a>>2]+c;return 1}function Bua(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return xy(a,c,d)|0}function BM(a,b){var c=0;c=q[a>>2];return Vp(c,q[a+4>>2]-c>>3,b)}function xP(a,b){var c=0;c=Ii-16|0;Ii=c;hx(a,b,c+8|0);Ii=c+16|0}function sP(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;qn(d,b,c);return 0}function oX(a){if(a){nm(a+224|0);nm(a+260|0);ij(a+296|0);W0(a)}}function fT(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return b|0}function TZ(a){a=a|0;Dj(a,1,5);hm(a,2);Ri(a,2);jl(a,1);return 1}function Iua(){var a=0;a=bk(1,384);if(a){Ui(a,0,384)}return a|0}function Hna(a,b){a=a|0;b=b|0;a=q[b+16>>2];if(a){Ni(a)}return 0}function via(a){a=a|0;Mi[q[74971]](q[q[a+8>>2]+8>>2]);return 0}function eG(a){if(mb(a|0,0)|0){J(183313,183322,86,183355);G()}}function SS(a){a=a|0;Dj(a,1,5);Qi(a,145462,0);ej(a,1);return 1}function Oja(a){a=a|0;Mi[q[74972]](q[q[a+8>>2]+8>>2]);return 0}function O$(){var a=0;a=bk(1,392);if(a){Ui(a,0,392)}return a|0}function oR(a,b,c){a=a|0;b=b|0;c=c|0;Cu(q[a+68>>2]+776|0,b,c)}function nR(a,b,c){a=a|0;b=b|0;c=c|0;Yp(q[a+68>>2]+888|0,b,c)}function mo(a,b,c,d,e){Ml(a,1,q[q[p5(a)+80>>2]+8>>2],b,d,e,c)}function gY(a){a=a|0;q[240504]=jj(a,1)-1;q[240505]=0;return 0}function cN(a){var b=0;b=$i(40);dua(b,a);q[213143]=b;return 0}function W7(a){a=a|0;a=qj(a,1);um(q[a>>2]);q[a>>2]=0;return 0}function qp(a){if((Sx(a,2)|0)<=-1){im(173656,443,q[240513])}}function vk(a,b,c,d,e,f,g,h){return Oo(a,b,c,d,e,0,f,g,h,0)}function JZ(a){a=a|0;return OY(a,q[a+8>>2]-q[a+12>>2]>>4)|0}function FE(a,b,c,d,e,f){return T0(a,b,q[a+220>>2],c,d,e,f)}function $xa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Li=0;return 0}function qva(a,b,c){a=a|0;b=b|0;c=c|0;return OE(a,2,b,c)|0}function pva(a,b,c){a=a|0;b=b|0;c=c|0;return OE(a,5,b,c)|0}function ck(a,b,c,d){c=Wk(b,c,d);if(!c){c=YF(b,a)}return c}function ZW(a){q[a>>2]=0;Ui(a+224|0,0,404);_p(a+8|0);aX(a)}function Gj(a){if(a){return}J(172609,172577,55,172622);G()}function Bj(a){if(a){return}J(172609,172577,68,172627);G()}function zua(a){a=a|0;if(a){Mi[q[65677]](a,0,128)|0}Ni(a)}function wxa(){var a=0;a=bk(1,280);if(a){Hs(a)}return a|0}function w1(a,b,c){a=a|0;b=b|0;c=c|0;return hG(a,0,b,c)|0}function vxa(a){a=a|0;if(a){Mi[q[65677]](a,0,280)|0}Ni(a)}function uva(){var a=0;a=bk(1,276);if(a){QE(a)}return a|0}function tva(a){a=a|0;if(a){Mi[q[65677]](a,0,276)|0}Ni(a)}function sS(a,b,c){a=a|0;b=b|0;c=c|0;return Bu(a,b,c,1)|0}function qS(a,b,c){a=a|0;b=b|0;c=c|0;return Bu(a,b,c,0)|0}function lva(a){a=a|0;if(a){Mi[q[65677]](a,0,132)|0}Ni(a)}function jva(){var a=0;a=bk(1,232);if(a){KX(a)}return a|0}function Zo(a,b){dwa(q[a+104>>2],q[a+108>>2],a+112|0,a,b)}function Q$(a,b,c){a=a|0;b=b|0;c=c|0;return uE(a,2,b,c)|0}function P$(a,b,c){a=a|0;b=b|0;c=c|0;return uE(a,5,b,c)|0}function Nt(a,b,c){q[c+4>>2]=q[c>>2];return Iw(a,b,c,120)}function Hua(a){a=a|0;if(a){Mi[q[65677]](a,0,384)|0}Ni(a)}function CS(a,b,c){a=a|0;b=b|0;c=c|0;return iE(a,b,c,1)|0}function Aua(){var a=0;a=bk(1,128);if(a){qx(a)}return a|0}function AS(a,b,c){a=a|0;b=b|0;c=c|0;return iE(a,b,c,0)|0}function yS(){var a=0;a=bk(1,216);if(a){_p(a)}return a|0}function xS(a){a=a|0;if(a){Mi[q[65677]](a,0,216)|0}Ni(a)}function txa(a,b,c){a=a|0;b=b|0;c=c|0;return YX(a,b,c)|0}function sxa(a,b,c){a=a|0;b=b|0;c=c|0;return Yq(a,b,c)|0}function sva(a,b,c){a=a|0;b=b|0;c=c|0;return TX(a,b,c)|0}function rva(a,b,c){a=a|0;b=b|0;c=c|0;return PE(a,b,c)|0}function ova(){var a=0;a=bk(1,64);if(a){Ay(a)}return a|0}function mya(a){a=a|0;a=q[74036];if(a){Ni(a);q[74036]=0}}function g1(a,b,c){a=a|0;b=b|0;c=c|0;return Lxa(a,b,c)|0}function fo(a,b,c){if((Vi(a,b)|0)>=1){c=fj(a,b)}return c}function fka(a){a=a|0;a=q[q[a+8>>2]+8>>2];Ni(a);return 0}function _D(a,b,c){a=a|0;b=b|0;c=c|0;return Yi(w(b,c))|0}function ZF(){var a=0;a=bk(1,172);if(a){vy(a)}return a|0}function Wca(a){a=a|0;Xi(a,q[tj(a,1,0)+420>>2]);return 1}function Pta(a){a=a|0;Pj(956480,kj(a,1,0),1024);return 0}function IS(){var a=0;a=bk(1,108);if(a){ss(a)}return a|0}function HS(a){a=a|0;if(a){Mi[q[65677]](a,0,108)|0}Ni(a)}function Am(a,b,c){if((Vi(a,b)|0)>=1){c=jj(a,b)}return c}function Aj(a){if(!a){J(22308,22242,373,22316);G()}Ni(a)}function yU(a){a=a|0;return TC(a,Fl(a,137647)+8248|0)|0}function tS(a,b,c){a=a|0;b=b|0;c=c|0;return Yp(a,b,c)|0}function kma(a,b,c){a=a|0;b=b|0;c=c|0;Mi[q[75009]](b,0)}function jV(){var a=0;a=bk(1,88);if(a){Vq(a)}return a|0}function iV(a){a=a|0;if(a){Mi[q[65677]](a,0,88)|0}Ni(a)}function eV(a,b,c){a=a|0;b=b|0;c=c|0;return Uq(a,b,c)|0}function UW(a,b,c){a=a|0;b=b|0;c=c|0;return TW(a,b,c)|0}function TU(a){a=a|0;return yu(a,253904,Fl(a,137647))|0}function SU(a){a=a|0;return yu(a,254368,Fl(a,138013))|0}function PS(){var a=0;a=bk(1,92);if(a){aq(a)}return a|0}function OS(a){a=a|0;if(a){Mi[q[65677]](a,0,92)|0}Ni(a)}function Mn(a){if(!lu(a)){return 0}return Ys(q[240513])}function KS(a,b,c){a=a|0;b=b|0;c=c|0;return $p(a,b,c)|0}function DU(a){a=a|0;return yu(a,253952,Fl(a,137647))|0}function DS(a,b,c){a=a|0;b=b|0;c=c|0;return Cu(a,b,c)|0}function CU(a){a=a|0;return yu(a,254240,Fl(a,138013))|0}function AX(a,b,c){a=a|0;b=b|0;c=c|0;return zX(a,b,c)|0}function zU(a){a=a|0;return zva(a,ln(a,137623)+24|0)|0}function yua(a,b,c){a=a|0;b=b|0;c=c|0;return rX(a,b)|0}function xua(a,b,c){a=a|0;b=b|0;c=c|0;cq(a,b);return 0}function nia(a){a=a|0;Ni(q[74036]);q[74036]=0;return 0}function hy(a,b,c,d){a=By(a,b,c,d);return a?a-8960|0:0}function NU(a){a=a|0;return Cva(a,ln(a,137623)+24|0)|0}function Mz(a){Mi[q[q[a>>2]+16>>2]](q[a+4>>2])|0;Ni(a)}function Lfa(a,b){a=a|0;b=b|0;return q[a+132>>2]>>>b&1}function LU(a){a=a|0;return Bva(a,ln(a,137623)+24|0)|0}function IU(a){a=a|0;return Ava(a,ln(a,137623)+24|0)|0}function Gua(a,b,c){a=a|0;b=b|0;c=c|0;return wX(a,b)|0}function Fua(a,b,c){a=a|0;b=b|0;c=c|0;return vX(a,b)|0}function Eua(a,b,c){a=a|0;b=b|0;c=c|0;return uX(a,b)|0}function Dua(a,b,c){a=a|0;b=b|0;c=c|0;return tX(a,b)|0}function bka(a){a=a|0;Eea(q[q[a+8>>2]+8>>2]);return 0}function zza(a){if(a){return 31-z(a-1^a)|0}return 32}function xU(a){a=a|0;return TC(a,Fl(a,138013)+8|0)|0}function rw(a){a=a|0;lk(a,Oi(kj(a,2,0)),Li);return 1}function i0(a,b){a=a|0;b=b|0;Ul(a,q[b>>2],q[b+4>>2])}function hm(a,b){if((Vi(a,b)|0)==-1){dk(a,b,143303)}}function hA(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0}function g4(a){a=a|0;Ni(q[a+104>>2]);Ni(q[a+120>>2])}function aja(a){a=a|0;QH(q[q[a+8>>2]+8>>2]);return 0}function _ja(a){a=a|0;fA(q[q[a+8>>2]+8>>2]);return 0}function UP(a,b,c){a=a|0;b=b|0;c=+c;u[(b<<2)+a>>2]=c}function Lja(a){a=a|0;Aj(q[q[a+8>>2]+8>>2]);return 0}function Hja(a){a=a|0;$9(q[q[a+8>>2]+8>>2]);return 0}function zk(a,b){q[79288]=q[79288]+1;return In(a,b)}function yE(a){if(a){bo(a);ij(a+124|0);nm(a+136|0)}}function oga(a){a=a|0;return q[a+8>>2]-q[a+4>>2]>>2}function lF(a,b,c){a=Il(a,c);q[b>>2]=9;q[b+12>>2]=a}function kda(a){a=a|0;lo(a,tj(a,1,0)+80|0);return 1}function ada(a){a=a|0;lo(a,tj(a,1,0)+96|0);return 1}function Cda(a){a=a|0;lo(a,tj(a,1,0)+48|0);return 1}function f1(a,b){a=a|0;b=b|0;return+u[(b<<2)+a>>2]}function e1(a,b){a=a|0;b=b|0;return+q[(b<<2)+a>>2]}function c1(a,b){a=a|0;b=b|0;return+p[(b<<1)+a>>1]}function Z0(a,b){a=a|0;b=b|0;return+s[(b<<1)+a>>1]}function L$(a){a=a|0;q[Lm(a,144458)>>2]=0;return 0}function $0(a,b){a=a|0;b=b|0;return+t[(b<<2)+a>>2]}function zT(a){a=a|0;Xi(a,Jn(kj(a,1,0)));return 1}function nm(a){if(a){ij(a);ij(a+12|0);ij(a+24|0)}}function j1(a){a=a|0;Mi[q[a>>2]](q[a+8>>2]);Ni(a)}function UG(a,b){return q[_i(a,b,q[210440],0)>>2]}function Np(a,b,c){Zi(a,-1e4,b);xj(a,(c>>31)+c|0)}function LY(a){a=a|0;Ak(a,147037,258128);return 1}function IY(a){a=a|0;Ak(a,145947,257632);return 1}function EY(a){a=a|0;Ak(a,145306,257344);return 1}function Bla(a){a=a|0;return q[q[a+376>>2]+12>>2]}function oqa(a){a=a|0;ir(a,Jp(Zm(a,1)));return 1}function nK(a,b){return Ar(a,3,q[b+76>>2]-2|0,b)}function TT(a,b){a=a|0;b=b|0;return TD(a,b,20)|0}function ST(a,b){a=a|0;b=b|0;return TD(a,b,21)|0}function OT(a,b){a=a|0;b=b|0;return SD(a,b,35)|0}function NT(a,b){a=a|0;b=b|0;return SD(a,b,36)|0}function tM(a){uM(q[a+80>>2],s[a+150>>1]&32767)}function YQ(a){a=a|0;a=Ii-a&-16;Ii=a;return a|0}function Pha(a,b,c){a=a|0;b=b|0;c=c|0;dB(a,b,c)}function GE(a,b,c,d,e,f){return Y0(a,b,c,d,e,f)}function GB(a){var b=0;b=q[a>>2];Ni(a);return b}function EC(a,b){if(!a){return 0}return tP(a,b)}function qv(a,b){return(Ck(a,b,q[79321])|0)!=0}function _l(a,b,c){if(!(r[a|0]&32)){sC(b,c,a)}}function Xz(a,b,c){q[a+132>>2]=o8(q[a>>2],b,c)}function UD(a){a=a|0;return(a<<24|a<<8)>>>16|0}function Taa(a,b){a=a|0;b=b|0;Xaa(q[210501],a)}function On(a,b){return(Ck(a,b,q[79307])|0)!=0}function Kq(a,b){return YC(a,b,10,-2147483648)}function Gz(a){o5(a);XY(q[a+120>>2]);Ni(m5(a))}function D_(a){a=a|0;return(a|0)==32|a-9>>>0<5}function Cza(a,b,c){yza(a,b,c);Li=Ki;return Ji}function wS(a,b){a=a|0;b=b|0;return qs(a,b)|0}function vS(a,b){a=a|0;b=b|0;return As(a,b)|0}function hV(a,b){a=a|0;b=b|0;return zs(a,b)|0}function gV(a,b){a=a|0;b=b|0;return Ds(a,b)|0}function bT(a,b){a=a|0;b=b|0;return wW(a,b)|0}function at(a,b){return(Ll(a,b)|0)==q[210439]}function Sxa(a){a=a|0;return pa(q[a+60>>2])|0}function OO(){EM(958528,208542,0,0,1563,1564)}function OC(a,b,c){return lC(a,b,c,1608,1609)}function NS(a,b){a=a|0;b=b|0;return Rq(a,b)|0}function MS(a,b){a=a|0;b=b|0;return Cs(a,b)|0}function M0(a){a=a|0;return(a|0)==4|(a&-2)==2}function L0(a,b){a=a|0;b=b|0;return hX(a,b)|0}function IG(a,b){return(Ll(a,b)|0)==q[210440]}function GS(a,b){a=a|0;b=b|0;return Du(a,b)|0}function FS(a,b){a=a|0;b=b|0;return Bs(a,b)|0}function DY(a,b){a=a|0;b=b|0;return l0(a,b)|0}function Aza(a,b,c,d){a=xza(a,b,c,d);return a}function z0(a){a=a|0;return ez(a,264024,7)|0}function z$(a){a=a|0;return Qi(a,146715,0)|0}function x1(a){a=a|0;RQ(q[a+12>>2]);return 0}function x0(a){a=a|0;return ez(a,264032,8)|0}function cT(a){a=a|0;return(a|0)==1|(a|0)==6}function b1(a,b){a=a|0;b=b|0;return+o[a+b|0]}function aj(a,b){a=tt(a,b);return a?a:165402}function a4(a,b){a=a|0;b=b|0;DG(a,b,0,0,0,0)}function a1(a,b){a=a|0;b=b|0;return+r[a+b|0]}function S_(a){a=a|0;RF(a,1,145877);return 1}function O_(a){a=a|0;RF(a,2,145879);return 1}function Hp(a){Jr(a+32|0);return Ui(a,0,112)}function Foa(a){a=a|0;return q[q[a+4>>2]>>2]}function A0(a){a=a|0;return ez(a,264016,6)|0}function t1(a){a=a|0;Li=0;return q[a+12>>2]}function psa(a){a=a|0;return Qi(a,5544,0)|0}function Ksa(a){a=a|0;o[a+148|0]=0;return 0}function wm(a,b){return Wxa(a,b,hj(a)+1|0)}function r1(a){a=a|0;q[a+12>>2]=0;return 0}function hO(a,b,c){return lC(a,b,c,1608,0)}function UJ(a,b,c){return TJ(a,b,Oi(c),Li)}function Rr(a){zq(a+24|0);zq(a+12|0);zq(a)}function OA(a,b,c){return QJ(a,b,Oi(c),Li)}function LA(a,b,c){return GJ(a,b,Oi(c),Li)}function Kra(a,b){a=a|0;b=b|0;q[a+16>>2]=b}function Hz(a,b){return _i(a,b,q[79321],0)}function wG(a,b,c,d,e){return a2(a,b,d,e)}function r$(a){a=a|0;qk(a,983,1);return 1}function qz(a,b){return Ck(a,b,q[210439])}function pz(a,b){return Ck(a,b,q[210438])}function _5(a){a=a|0;return!dj(a,33018)|0}function Zua(a){a=a|0;ej(a,-1e4);return 1}function W5(a){a=a|0;if(a){Ni(a)}return 0}function Qj(a,b,c,d){return NB(a,b,c,d,0)}function Om(a,b){return Ck(a,b,q[210436])}function Nn(a,b){return Ck(a,b,q[210437])}function DF(a,b,c){return mm(Nx(a,b,c,0))}function qga(a){a=a|0;return q[a+120>>2]}function pga(a){a=a|0;return q[a+108>>2]}function YS(a){a=a|0;return q[a+4>>2]<<3}function Wfa(a){a=a|0;return s[a+194>>1]}function MO(){EM(285472,5257,22,23,24,0)}function EE(a,b){return Iu(a,b)?-20096:0}function AT(a){a=a|0;Ja(Am(a,1,0)|0);G()}function zq(a){if(q[a>>2]){Ni(q[a>>2])}}function wu(a,b,c){return Xx(a,b,c,0,0)}function qq(a){return Ui($i(200),0,200)}function oq(a,b,c,d){return mI(a,b,c,d)}function e2(a){a=a|0;o[317232]=(a|0)!=0}function Ux(a,b,c){return Tx(a,b,c,0,0)}function LM(a,b,c,d){return Iw(a,b,c,d)}function zO(){sp(296160,61138,501,502)}function wF(a){return Fi(a|0,962284)|0}function u$(a){a=a|0;return VC(a,10)|0}function t$(a){a=a|0;return RC(a,10)|0}function mk(a){Yk(a,141016,0);return 0}function jI(a,b){return l9($i(68),a,b)}function cva(a){a=a|0;Js(a,1);return 1}function Zka(a){a=a|0;return jL(a,1)|0}function Yka(a){a=a|0;return jL(a,0)|0}function Rpa(a){a=a|0;return AL(a,0)|0}function RO(){tw(290592,40480,176,177)}function Qpa(a){a=a|0;return AL(a,1)|0}function QO(){tw(291264,44972,218,219)}function Laa(a){a=a|0;Caa(q[210501],a)}function I0(a){a=a|0;return q[a+88>>2]}function F0(a){a=a|0;return(a&-2)==2|0}function Dx(a,b,c){Nxa(a,b,c);return a}function Cx(a,b,c){return YC(a,b,c,-1)}function Bsa(a){a=a|0;Esa(a+8|0);IM(a)}function yL(a,b,c){return Dl(a,b,c,0)}function xQ(a){a=a|0;return bD(a,0)|0}function w$(a){a=a|0;return VC(a,2)|0}function v$(a){a=a|0;return RC(a,2)|0}function uS(a){a=a|0;return Zp(a,1)|0}function rS(a){a=a|0;return Zp(a,0)|0}function ql(a){return Mxa(a,q[71281])}function bG(a,b){return(UO(a,b)|0)!=0}function aK(a,b){return(Yv(a,b)|0)!=0}function Zea(a,b){a=a|0;b=b|0;Qa(b|0)}function V8(a,b){a=a|0;b=b|0;return 0}function S0(a){a=a|0;return(a|0)==4|0}function Pm(a,b,c){return wz(a,b,c,0)}function Oi(a){a=Wl(a,hj(a));return a}function ES(a){a=a|0;return rs(a,1)|0}function CQ(a){a=a|0;return bD(a,1)|0}function Bza(a,b,c){return yza(a,b,c)}function BS(a){a=a|0;return rs(a,0)|0}function BE(a,b){return Iu(a,q[b>>2])}function zS(a,b){a=a|0;b=b|0;ny(a,b)}function yO(){sp(287040,20891,110,0)}function xO(){sp(287168,21036,114,0)}function kV(a,b){a=a|0;b=b|0;sy(a,b)}function QS(a,b){a=a|0;b=b|0;py(a,b)}function JS(a,b){a=a|0;b=b|0;oy(a,b)}function DO(){sp(295888,59049,491,0)}function CO(){sp(286784,19866,100,0)}function BO(){sp(286912,20576,105,0)}function AO(){sp(296016,60844,496,0)}function pM(a,b,c){Cra(q[a>>2],b,c)}function iy(a,b,c){return tV(a,b,c)}function eU(a){a=a|0;return $i(a)|0}function Wm(a){return Ql(a)+7>>>3|0}function Sj(a,b){gm(a,b,q[a+16>>2])}function SO(){tw(286384,13728,32,0)}function PO(){tw(286512,13734,37,0)}function EO(){sp(286656,19860,97,0)}function zE(a){return!Jj(a+24|0,0)}function ou(a,b){Oxa(a,b);return a}function cG(a){if(a){if(a){Ni(a)}}}function ZD(a,b){a=a|0;b=b|0;Ni(b)}function JO(){it(288080,31845,126)}function IO(){it(288208,32187,133)}function HO(){it(288336,33018,142)}function GO(){it(288464,33030,148)}function FO(){it(288592,33481,156)}function Ew(a,b,c){Lt(q[a>>2],b,c)}function $J(a){return Ar(a,0,-2,0)}function um(a){a=a|0;if(a){Ni(a)}}function st(a){return pq(a,hj(a))}function nva(a){a=a|0;QX(a);Ni(a)}function iva(a){a=a|0;LX(a);Ni(a)}function iM(a){return Ui(a,0,960)}function dH(a,b){Ti(b,a+8|0,2188)}function _m(a){return Ui(a,0,112)}function FK(){return(Wy()|0)==1|0}function rx(a,b,c){lC(a,b,c,0,0)}function pA(a){Ni(q[a>>2]);Ni(a)}function _y(a,b){Kl(a,1,hj(a),b)}function _C(a,b){ou(hj(a)+a|0,b)}function ZS(a){a=a|0;rW(a);Ni(a)}function R0(a){a=a|0;Ju(a);Ni(a)}function N$(a){a=a|0;WW(a);Ni(a)}function Jr(a){return Ui(a,0,72)}function J0(a){a=a|0;yE(a);Ni(a)}function tn(a,b){return rQ(a,b)}function qm(a,b){return jr(a,b)}function pu(a,b){return dj(a,b)}function nI(a,b){mI(a,b,1396,0)}function Py(a,b){return Zn(a,b)}function Bz(a){return Pu(a,3,0)}function uB(a){a=a|0;return-15}function Tz(a){return wm(a,46)}function LN(a,b,c){Wt(a,b,c,4)}function yn(a){a=a|0;return 0}function xsa(a,b){a=a|0;b=b|0}function Fo(a){pF(a);return 0}function oy(a,b){Ti(a,b,108)}function ny(a,b){Ti(a,b,216)}function hz(a,b,c){WO(a,b,c)}function _xa(){return 962052}function Ixa(){return 962340}function Hxa(){return 962344}function Gxa(){return 962332}function Ak(a,b,c){Io(a,b,c)}function wza(a){a=a|0;ysa()}function vza(a){a=a|0;Asa()}function sy(a,b){Ti(a,b,88)}function py(a,b){Ti(a,b,92)}function hya(a){a=a|0;sza()}function Kga(a){a=a|0;Wa(0)}function Ju(a){if(a){yE(a)}}function Era(a){a=a|0;Ni(a)}function ss(a){Ui(a,0,108)}function qx(a){Ui(a,0,128)}function bE(a){Ui(a,0,344)}function _p(a){Ui(a,0,216)}function QE(a){Ui(a,0,276)}function Jt(a){Dw(q[a>>2])}function Hs(a){Ui(a,0,280)}function aq(a){Ui(a,0,92)}function XQ(a){a=a|0;Ii=a}function WQ(){return Ii|0}function Vq(a){Ui(a,0,88)}function MM(a,b){VM(a,b)}function HC(a,b){xP(a,b)}function GM(a){a=a|0}function yga(){sb()} -// EMSCRIPTEN_END_FUNCS -a=r;Kza(aAa);var Mi=Iza([null,Ssa,Isa,Jsa,Ksa,Hsa,Y9,Dla,Ala,Bla,Cla,Osa,Psa,Msa,Rsa,zsa,wsa,Bsa,Csa,vza,wza,Gsa,yn,yn,qsa,psa,Pqa,um,lra,Bra,oya,Vra,csa,esa,fsa,yn,dsa,Lra,Tra,$ra,asa,_ra,Wra,Zra,bsa,Nra,Yra,Rra,Sra,Qra,Pra,Xra,Ora,Ura,ura,vra,wra,zra,Mqa,Iqa,XL,rw,Dqa,Eqa,Gqa,Fqa,Lqa,Kqa,Hqa,Jqa,Oqa,Nqa,nqa,gqa,vqa,uqa,WL,WL,tqa,wqa,jqa,iqa,hqa,kqa,sqa,rqa,pqa,qqa,oqa,xqa,Cqa,Bqa,zqa,Aqa,lqa,mqa,yqa,ira,uB,uB,hra,$qa,bra,ara,_qa,gra,Xqa,Zqa,Yqa,Wqa,fra,Vqa,tB,Uqa,era,Rqa,Tqa,Sqa,Qqa,Dta,$sa,nya,Eta,c7,R6,e7,l6,m6,q6,p6,k6,n6,o6,d6,b6,f6,j6,e6,i6,c6,g6,h6,X5,Y5,$5,W5,Z5,_5,P5,Q5,V5,O5,R5,S5,U5,T5,I5,J5,N5,M5,H5,K5,L5,Ska,Rka,qpa,Hha,Ela,$ga,aha,uma,Ppa,Pka,hma,jpa,Qka,soa,roa,yoa,Ioa,Joa,Hoa,Doa,Goa,Koa,qoa,uoa,woa,xoa,voa,Eoa,toa,Coa,zoa,Foa,zla,$la,nla,Nla,_ga,Xpa,jma,pma,kma,ama,Kha,pla,zka,Ika,Boa,Aoa,Pha,tia,Hka,Cka,Kna,Rna,Pna,Ina,Hna,Nna,Tna,Una,Sna,Vna,Gna,Lna,Mna,Qna,Jna,Ona,Jka,Gka,sia,Bna,sna,Fka,Bka,qna,zna,wna,Eka,Aka,Mma,Uma,Sma,Dka,Fma,xma,Dma,koa,boa,hoa,kka,gw,lka,hka,ika,jka,eka,fka,gka,jja,lja,mja,kja,Fia,Iia,Hia,Jia,Gia,uia,via,wia,$K,Nja,Oja,Pja,$K,Qja,Sja,Tja,Rja,tka,vka,wka,uka,tja,vja,wja,uja,nja,pja,qja,oja,xja,zja,Aja,yja,Jja,gw,fB,Kja,Pia,Qia,Ria,yn,Oia,Sia,Nia,rka,tB,ska,Gja,Hja,Ija,uB,Lja,Mja,Uja,Xja,Yja,Vja,mka,pka,qka,nka,Dja,_K,Fja,Eja,Bja,tB,Cja,$ia,aja,bja,cja,dja,eja,Kia,_K,Mia,Lia,Bia,Dia,Eia,Cia,xia,zia,Aia,yia,rja,gw,fB,sja,Tia,Via,Wia,Uia,Xia,Zia,_ia,Yia,Zja,_ja,$ja,lpa,wpa,spa,tpa,vpa,upa,ppa,rpa,opa,npa,mpa,kpa,hpa,dpa,epa,gpa,fpa,apa,ipa,Yoa,bpa,_oa,$oa,Zoa,cpa,Xoa,Opa,Mpa,Npa,zL,Kpa,Hpa,Lpa,Ipa,Jpa,Gpa,yn,cna,ena,dna,ana,_ma,bna,$ma,Zma,rna,Fna,Cna,Ena,Dna,una,vna,pna,xna,tna,ona,gna,nna,kna,mna,lna,jna,hna,ina,fna,Woa,Toa,Voa,Uoa,Ooa,Soa,Noa,Loa,Fpa,Dpa,Epa,zL,zpa,xpa,Cpa,$na,Yna,_na,Zna,Xna,yn,Wna,Nma,Yma,Vma,Xma,Wma,Qma,Rma,Lma,Tma,Oma,Pma,Kma,yma,Jma,Gma,Ima,Hma,Bma,Cma,wma,Ema,zma,Ama,vma,coa,loa,poa,moa,ooa,noa,eoa,goa,aoa,joa,GM,doa,V8,Mka,yka,fB,gw,xka,mia,hja,cka,aka,fja,oia,nia,ija,dka,bka,gja,mya,ria,qia,pia,_pa,Ypa,Zpa,lha,hha,jha,kha,iha,lma,Lla,Yla,sma,tma,Rha,Rla,PP,MP,OP,NP,QP,RP,TP,SP,UP,a1,Z0,$0,_0,b1,c1,e1,d1,f1,mL,Wpa,Upa,Spa,Vpa,Tpa,Ola,Qpa,Rpa,fma,dma,bma,ema,cma,Lha,Ila,Kla,tla,ula,wla,vla,rla,sla,gma,lla,ila,jla,kla,$ka,_ka,hla,gla,dla,Vka,cla,bla,Xka,fla,Zka,Yka,Tka,ela,Wka,ala,Uka,Gha,xla,rma,qma,nma,Kka,Yha,_la,Jha,Hla,Mha,Zla,Xha,Jla,zha,Aha,Bha,uha,Eha,Cha,Dha,yha,wha,sha,xha,vha,tha,oha,mha,pha,qha,nha,rha,dha,eha,cha,fha,gha,bha,Sha,Uha,Qha,Wla,Mla,Qla,FK,xfa,cga,fga,mga,lga,dga,_fa,bga,DK,Yea,Xea,Mga,Efa,Kfa,hfa,jga,iga,gfa,Nga,Ffa,ifa,kfa,nfa,afa,$ea,dfa,cfa,bfa,efa,mfa,lfa,qfa,rfa,Jga,Cga,Uea,ffa,pfa,ofa,Yfa,Zfa,Xfa,vga,wga,vfa,Kga,Dga,hga,HK,HK,wfa,ufa,Oga,Gfa,Ifa,Afa,Ega,Fga,Wfa,Qfa,Hga,Aga,zga,um,_ea,Cfa,Bfa,Lfa,jfa,EK,Pga,Hfa,qga,Vea,Wea,Lga,Dfa,Sga,Zea,xga,GM,uga,tfa,Tea,sga,Ufa,Rfa,rga,Vfa,tga,Sfa,Pfa,Rga,zfa,Tfa,yga,FK,Qga,Jfa,ega,sfa,yfa,aga,pga,Iga,Bga,$fa,yn,Mfa,oga,gga,nga,kga,Nfa,Ofa,Gga,GK,Tga,Wga,Vga,Uga,lya,kya,iya,ywa,zwa,J8,B8,z8,k8,L8,H8,b8,rw,X7,Y7,_7,Z7,a8,rw,$7,d8,c8,h8,e8,g8,f8,W7,V7,j8,i8,I7,P7,z7,S7,q7,J7,Q7,r7,H7,O7,E7,F7,U7,l7,m7,s7,y7,x7,u7,v7,o7,p7,n7,w7,t7,L7,M7,N7,D7,G7,B7,C7,A7,T7,K7,R7,C4,D4,z4,y4,q5,h5,jya,O4,M4,N4,D3,C3,E3,F3,G3,H3,e5,d5,g4,$3,a4,c5,b5,a5,$4,K4,J4,E4,L2,Q2,O2,M2,P2,N2,e4,y3,f3,i3,w3,n3,l3,q3,s3,r3,h3,j3,k3,o3,u3,t3,m3,b3,d3,p3,v3,g3,a3,$2,e3,x3,c3,X2,V2,R2,Y2,T2,U2,A4,B4,Z2,_2,S2,W2,n2,i2,l2,m2,j2,A2,F2,C2,J2,B2,E2,H2,z2,I2,G2,p2,u2,r2,y2,q2,t2,w2,o2,x2,v2,L3,P3,M3,O3,R3,Q3,h4,l4,i4,k4,n4,m4,k2,D2,s2,N3,j4,V3,X3,W3,U3,T3,S3,v4,u4,t4,s4,w4,x4,r4,q4,p4,o4,j5,H4,G4,b4,l5,F4,z3,n5,I3,Z3,L4,_3,d4,h2,f2,g2,Fva,Nva,Ova,Mva,Kva,Jva,Gva,Pva,Iva,Hva,Lva,Eva,yn,$$,iT,s$,r$,d$,h$,e$,f$,g$,p$,yn,q$,lS,DD,CD,aV,lxa,cV,bV,_U,ZU,XU,VU,TU,RU,PU,NU,zU,MU,LU,IU,FU,DU,yU,wU,w$,u$,x$,ZT,XT,WT,YT,dU,JT,HT,FT,PT,IT,iQ,hQ,$U,YU,WU,UU,QU,OU,KU,JU,HU,GU,EU,CU,SU,BU,AU,xU,v$,t$,UT,VT,GT,MT,KT,LT,OT,NT,QT,RT,TT,ST,$T,_T,bU,cU,aU,i0,eT,e0,$Y,dZ,f0,yva,J$,I$,C_,tT,F_,b_,YZ,XZ,ZZ,K$,n_,m_,k_,j_,i_,h_,JZ,o_,l_,g_,f_,e_,d_,c_,$Z,a_,_Z,WZ,VZ,UZ,TZ,SZ,RZ,QZ,PZ,OZ,NZ,MZ,LZ,KZ,L$,r_,s_,u_,t_,z_,w_,y_,x_,lQ,W$,V$,B$,aY,gQ,aQ,SS,fS,V_,Q_,N_,K_,W_,U_,S_,R_,P_,O_,M_,L_,J_,H_,G_,h0,g0,d0,c0,b0,a0,T_,I_,ET,DT,CT,BT,AT,zT,yT,xT,wT,vT,uT,sP,n$,FQ,EQ,DQ,CQ,BQ,z$,o$,AQ,zQ,yQ,xQ,wQ,vQ,uQ,tQ,CY,BY,AY,yY,zY,xY,vY,wY,uY,tY,sY,rY,qY,pY,nY,oY,mY,lY,kY,jY,iY,hY,gY,eY,fY,dY,bY,cY,k$,eva,cva,bva,ava,$ua,Zua,_ua,Yua,Xua,Wua,Vua,Uua,Tua,dva,NY,HY,EY,KY,IY,FY,JY,LY,Qaa,Naa,Oaa,Paa,Maa,Raa,Taa,Laa,Saa,eU,Wi,J,Era,D_,eua,hj,Ik,gk,Pi,Wl,$i,fN,Or,iua,hA,gua,Ui,fV,eV,hV,sE,jV,iV,kV,gV,LS,KS,NS,dW,PS,OS,QS,MS,ES,DS,GS,CS,IS,HS,JS,FS,BS,AS,uS,tS,wS,sS,yS,xS,zS,vS,rS,qS,A0,z0,x0,y0,w0,UW,YS,cT,VS,WS,$S,_S,bT,dT,ZS,aT,I0,M0,G0,H0,L0,ZF,J0,K0,F0,S0,_F,$F,ZF,R0,AW,xxa,zxa,yxa,sxa,txa,wxa,vxa,Q$,O$,N$,qva,ova,nva,vva,xva,wva,rva,sva,uva,tva,P$,pva,Bua,Cua,xua,yua,Aua,zua,Jua,Kua,Fua,Gua,Iua,Hua,Dua,Eua,kva,AN,mva,lva,AN,jva,iva,F$,Cxa,G$,Dxa,E$,Bxa,D$,Axa,H$,hya,hA,iaa,jaa,Kra,hA,gya,HQ,PQ,NQ,fT,GQ,JQ,IQ,J9,K9,xsa,fya,fQ,$R,YR,dQ,ZR,WR,eQ,_R,XR,pR,nR,oR,mR,_W,AX,JW,w5,t5,u5,j1,_D,ZD,vU,uU,_D,ZD,Lua,Nua,Mua,m$,Qda,Lda,Rda,mL,Cea,wba,XL,rw,Uda,Vda,Xda,Wda,_da,Yda,Zda,aea,$da,zba,Bba,Aba,Cba,mda,vda,lca,uda,Kda,Sda,Pda,Kca,Hca,Ica,Wca,Qba,gca,oda,Gda,uca,Eda,sca,Dda,rca,Fda,tca,Vca,Oba,zda,Cca,Oda,Gca,Jda,Pba,nda,fca,zca,xda,yda,mca,rda,ica,qda,Xca,Yca,Qca,Lba,Pca,Kba,fda,_ba,Rca,wda,Zca,Rba,Dca,Nca,pca,Sca,Mba,Ida,wca,$ca,Tba,Mca,Lca,jda,cca,Mda,Nda,Tca,Jba,Oca,Aca,bda,Vba,xca,yca,Yba,$ba,gda,aca,hda,jca,sda,eca,lda,hca,pda,Nba,Uca,Sba,_ca,Bda,oca,Ada,nca,Jca,bca,ida,Fca,Eca,tda,kca,Hda,vca,eda,Zba,dda,Xba,cda,Wba,Cda,qca,kda,dca,ada,Uba,Jta,yn,Pta,Rta,Sta,Tta,Xta,Vta,Wta,Uta,Qta,Ota,yn,H1,FP,EP,HP,GP,JP,IP,LP,KP,s1,v1,u1,r1,q1,gG,t1,y1,A1,hG,x1,w1,gG,z1,XP,lT,Wsa,Zsa,Vsa,Xsa,Ysa,Usa,Tsa,Z$,jT,oS,Sxa,Rxa,Qxa,yn,Pxa,$xa,g1,hg,$g,Te,Vh,tg,De,zf,Ef,Bf,Ff,Df,Jh,Tg,bg,Le,Eg,Kg,Bg,gd,Yh,Xh,Th,Sh,Ph,Oh,Mh,Ih,Hh,Gh,Fh,Eh,Ch,Bh,Ah,zh,uh,th,sh,qh,ph,oh,mh,jh,ih,gh,fh,eh,dh,ch,bh,_g,Yg,Wg,Sg,Rg,Qg,Pg,Og,Ng,Mg,Dg,wg,vg,qg,pg,og,ng,lg,kg,ag,jg,gg,eg,$f,_f,Wf,Vf,Uf,Sf,Rf,Qf,Of,Kf,Gf,Hf,yf,sf,vf,uf,tf,rf,of,nf,hf,gf,jf,bf,af,cf,$e,Ye,Xe,We,Ve,Se,Qe,Oe,Ke,Je,He,Ge,Be,Ae,ze,we,re,qe,pe,oe,ne,me,le,ke,je,ie,ge,fe,ee,de,ae,Zd,Yd,Xd,Wd,Td,Sd,Rd,Qd,Nd,Md,Ld,Kd,Hd,Gd,Fd,Ed,Ad,xd,ud,rd,qd,pd,od,nd,md,ld,kd,jd,id,Zc,Yc,ed,Ig,yg,Fg,Ce,xg,he,$d,hh,nh,lh,ig,ah,Ue,Wh,ug,Af,Cf,Gg,zd,wd,yd,td,vd,sd,Dh,ye,mg,Kh,Ug,cg,Me,Lf,Uh,sg,Qh,Rh,_d,mf,_c,ef,df,cd,ad,bd,$c,ff,Pf,Vd,Pd,Jd,Dd,Ud,Od,Id,Cd,wh,vh,xh,yh,qf,kh,kf,Xf,lf,Yf,Zf,Bd,Lg,Cg,rg,Pe,Xg,rh,Xc,Mf,pf,Nf,Tf,fg,Zg,Re,Nh,te,se,ve,ue,wf,xf,hd,Lh,Vg,dg,Ne,Ie,xe,If,Fe,Ee,_e,Ze,ce,be,Jf,dd,fd,Hg,Jg,zg,Ag]);function Sza(){return n.byteLength/65536|0}return{"bi":Mi,"ci":Jxa,"di":vsa,"ei":DY,"fi":Yi,"gi":Ni,"hi":i$,"ii":e2,"ji":d2,"ki":_xa,"li":UD,"mi":UD,"ni":uza,"oi":Gxa,"pi":Ixa,"qi":Hxa,"ri":WQ,"si":XQ,"ti":YQ,"ui":US,"vi":B_}}return Rza(Tza)} - - -// EMSCRIPTEN_END_ASM - - - - -)(asmLibraryArg)},instantiate:function(binary,info){return{then:function(ok){var module=new WebAssembly.Module(binary);ok({"instance":new WebAssembly.Instance(module)})}}},RuntimeError:Error};wasmBinary=[];if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeStringToMemory(string,buffer,dontAddNull){warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||33554432;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":INITIAL_MEMORY/65536})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}if(!Math.imul||Math.imul(4294967295,5)!==-5)Math.imul=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};if(!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(x){froundBuffer[0]=x;return froundBuffer[0]}}if(!Math.clz32)Math.clz32=function(x){var n=32;var y=x>>16;if(y){n-=16;x=y}y=x>>8;if(y){n-=8;x=y}y=x>>4;if(y){n-=4;x=y}y=x>>2;if(y){n-=2;x=y}y=x>>1;if(y)return n-2;return n-x};if(!Math.trunc)Math.trunc=function(x){return x<0?Math.ceil(x):Math.floor(x)};var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);throw e}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="dmengine.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmTable=Module["asm"]["bi"];removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;var ASM_CONSTS={1314:function(){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){console.log("%c %c Made with Defold %c %c https://www.defold.com","background: #fd6623; padding:5px 0; border: 5px;","background: #272c31; color: #fafafa; padding:5px 0;","background: #39a3e4; padding:5px 0;","background: #ffffff; color: #000000; padding:5px 0;")}else{console.log("Made with Defold -=[ https://www.defold.com ]=-")}},125809:function($0){var jsResult;var isSuccess=1;try{jsResult=eval(UTF8ToString($0))}catch(err){isSuccess=0;jsResult=err}_dmScript_Html5ReportOperationSuccess(isSuccess);jsResult+="";var lengthBytes=lengthBytesUTF8(jsResult)+1;var stringOnWasmHeap=_malloc(lengthBytes);stringToUTF8(jsResult,stringOnWasmHeap,lengthBytes);return stringOnWasmHeap},126253:function(){document.removeEventListener("click",Module.__defold_interaction_listener);document.removeEventListener("keyup",Module.__defold_interaction_listener);document.removeEventListener("touchend",Module.__defold_interaction_listener);Module.__defold_interaction_listener=undefined},126567:function(){Module.__defold_interaction_listener=function(){_dmScript_RunInteractionCallback()};document.addEventListener("click",Module.__defold_interaction_listener);document.addEventListener("keyup",Module.__defold_interaction_listener);document.addEventListener("touchend",Module.__defold_interaction_listener)}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){return func}function demangleAll(text){var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return"(no stack trace available)"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else if(typeof performance!=="undefined"&&performance.now){_emscripten_get_now=function(){return performance.now()}}else{_emscripten_get_now=Date.now}var _emscripten_get_now_is_monotonic=typeof performance==="object"&&performance&&typeof performance["now"]==="function"||ENVIRONMENT_IS_NODE||typeof dateNow!=="undefined";function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function ___clock_gettime(a0,a1){return _clock_gettime(a0,a1)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8("GMT");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function ___gmtime_r(a0,a1){return _gmtime_r(a0,a1)}function _tzset(){if(_tzset.called)return;_tzset.called=true;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function ___localtime_r(a0,a1){return _localtime_r(a0,a1)}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto==="object"&&typeof crypto["getRandomValues"]==="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return function(){return crypto_module["randomBytes"](1)[0]}}catch(e){}}return function(){abort("randomDevice")}}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){var alignedSize=alignMemory(size,16384);var ptr=_malloc(alignedSize);while(size=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 2}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 2}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 2}return 0},mayLookup:function(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:function(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){return low}};function ___sys__newselect(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_dup2(oldfd,suggestFD){try{var old=SYSCALLS.getStreamFromFD(oldfd);if(old.fd===suggestFD)return suggestFD;return SYSCALLS.doDup(old.path,old.flags,suggestFD)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_dup3(fd,suggestFD,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===suggestFD)return-28;return SYSCALLS.doDup(old.path,old.flags,suggestFD)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_mkdir(path,mode){try{path=SYSCALLS.getStr(path);return SYSCALLS.doMkdir(path,mode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_poll(fds,nfds,timeout){try{var nonzero=0;for(var i=0;i>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rename(old_path,new_path){try{old_path=SYSCALLS.getStr(old_path);new_path=SYSCALLS.getStr(new_path);FS.rename(old_path,new_path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(protocol){assert(streaming==(protocol==6))}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr==="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=ENVIRONMENT_IS_NODE?{"protocol":subProtocols.toString()}:subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!=="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data==="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}else{data=new Uint8Array(data)}}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,flags){if(!flags.binary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return ERRNO_CODES.EINVAL}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>>0}function jstoi_q(str){return parseInt(str)}function __inet_pton6_raw(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.indexOf("::")===0){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function __inet_ntop6_raw(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=__inet_ntop4_raw(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=__inet_ntop4_raw(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=__inet_ntop6_raw(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function __write_sockaddr(sa,family,addr,port,addrlen){switch(family){case 2:addr=__inet_pton4_raw(addr);if(addrlen){HEAP32[addrlen>>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=__inet_pton6_raw(addr);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);HEAP32[sa+4>>2]=0;HEAP32[sa+24>>2]=0;break;default:return 5}return 0}function ___sys_socketcall(call,socketvararg){try{SYSCALLS.varargs=socketvararg;var getSocketFromFD=function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(8);return socket};var getSocketAddress=function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};switch(call){case 1:{var domain=SYSCALLS.get(),type=SYSCALLS.get(),protocol=SYSCALLS.get();var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}case 2:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.bind(sock,info.addr,info.port);return 0}case 3:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.connect(sock,info.addr,info.port);return 0}case 4:{var sock=getSocketFromFD(),backlog=SYSCALLS.get();sock.sock_ops.listen(sock,backlog);return 0}case 5:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var newsock=sock.sock_ops.accept(sock);if(addr){var errno=__write_sockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}case 6:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}case 7:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();if(!sock.daddr){return-53}var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}case 11:{var sock=getSocketFromFD(),message=SYSCALLS.get(),length=SYSCALLS.get(),flags=SYSCALLS.get(),dest=getSocketAddress(true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}else{return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}}case 12:{var sock=getSocketFromFD(),buf=SYSCALLS.get(),len=SYSCALLS.get(),flags=SYSCALLS.get(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}case 14:{return-50}case 15:{var sock=getSocketFromFD(),level=SYSCALLS.get(),optname=SYSCALLS.get(),optval=SYSCALLS.get(),optlen=SYSCALLS.get();if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}case 16:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var addr,port;var name=HEAP32[message>>2];var namelen=HEAP32[message+4>>2];if(name){var info=__read_sockaddr(name,namelen);if(info.errno)return-info.errno;port=info.port;addr=DNS.lookup_addr(info.addr)||info.addr}var total=0;for(var i=0;i>2]}var view=new Uint8Array(total);var offset=0;for(var i=0;i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];for(var j=0;j>0]}}return sock.sock_ops.sendmsg(sock,view,0,total,addr,port)}case 17:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var total=0;for(var i=0;i>2]}var msg=sock.sock_ops.recvmsg(sock,total);if(!msg)return 0;var name=HEAP32[message>>2];if(name){var errno=__write_sockaddr(name,sock.family,DNS.lookup_name(msg.addr),msg.port)}var bytesRead=0;var bytesRemaining=msg.buffer.byteLength;for(var i=0;bytesRemaining>0&&i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];if(!iovlen){continue}var length=Math.min(iovlen,bytesRemaining);var buf=msg.buffer.subarray(bytesRead,bytesRead+length);HEAPU8.set(buf,iovbase+bytesRead);bytesRead+=length;bytesRemaining-=length}return bytesRead}default:{return-52}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_uname(buf){try{if(!buf)return-21;var layout={"__size__":390,"domainname":325,"machine":260,"nodename":65,"release":130,"sysname":0,"version":195};var copyString=function(element,value){var offset=layout[element];writeAsciiToMemory(value,buf+offset)};copyString("sysname","Emscripten");copyString("nodename","emscripten");copyString("release","1.0");copyString("version","#1");copyString("machine","x86-JS");return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_unlink(path){try{path=SYSCALLS.getStr(path);FS.unlink(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){abort()}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){noExitRuntime=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!=="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;if(typeof window!=="undefined"){RAF=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||RAF}RAF(func)},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){noExitRuntime=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){noExitRuntime=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h0?AL.freeIds.pop():AL._nextId++},freeIds:[],scheduleContextAudio:function(ctx){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}for(var i in ctx.sources){AL.scheduleSourceAudio(ctx.sources[i])}},scheduleSourceAudio:function(src,lookahead){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}if(src.state!==4114){return}var currentTime=AL.updateSourceTime(src);var startTime=src.bufStartTime;var startOffset=src.bufOffset;var bufCursor=src.bufsProcessed;for(var i=0;i=src.bufQueue.length){if(src.looping){bufCursor%=src.bufQueue.length}else{break}}var buf=src.bufQueue[bufCursor%src.bufQueue.length];if(buf.length===0){skipCount++;if(skipCount===src.bufQueue.length){break}}else{var audioSrc=src.context.audioCtx.createBufferSource();audioSrc.buffer=buf.audioBuf;audioSrc.playbackRate.value=src.playbackRate;if(buf.audioBuf._loopStart||buf.audioBuf._loopEnd){audioSrc.loopStart=buf.audioBuf._loopStart;audioSrc.loopEnd=buf.audioBuf._loopEnd}var duration=0;if(src.type===4136&&src.looping){duration=Number.POSITIVE_INFINITY;audioSrc.loop=true;if(buf.audioBuf._loopStart){audioSrc.loopStart=buf.audioBuf._loopStart}if(buf.audioBuf._loopEnd){audioSrc.loopEnd=buf.audioBuf._loopEnd}}else{duration=(buf.audioBuf.duration-startOffset)/src.playbackRate}audioSrc._startOffset=startOffset;audioSrc._duration=duration;audioSrc._skipCount=skipCount;skipCount=0;audioSrc.connect(src.gain);if(typeof audioSrc.start!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.start(startTime,startOffset)}else if(typeof audioSrc.noteOn!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.noteOn(startTime)}audioSrc._startTime=startTime;src.audioQueue.push(audioSrc);startTime+=duration}startOffset=0;bufCursor++}},updateSourceTime:function(src){var currentTime=src.context.audioCtx.currentTime;if(src.state!==4114){return currentTime}if(!isFinite(src.bufStartTime)){src.bufStartTime=currentTime-src.bufOffset/src.playbackRate;src.bufOffset=0}var nextStartTime=0;while(src.audioQueue.length){var audioSrc=src.audioQueue[0];src.bufsProcessed+=audioSrc._skipCount;nextStartTime=audioSrc._startTime+audioSrc._duration;if(currentTime=src.bufQueue.length&&!src.looping){AL.setSourceState(src,4116)}else if(src.type===4136&&src.looping){var buf=src.bufQueue[0];if(buf.length===0){src.bufOffset=0}else{var delta=(currentTime-src.bufStartTime)*src.playbackRate;var loopStart=buf.audioBuf._loopStart||0;var loopEnd=buf.audioBuf._loopEnd||buf.audioBuf.duration;if(loopEnd<=loopStart){loopEnd=buf.audioBuf.duration}if(delta0){src.bufStartTime+=Math.floor((currentTime-src.bufStartTime)/srcDuration)*srcDuration}}for(var i=0;i=src.bufQueue.length){if(src.looping){src.bufsProcessed%=src.bufQueue.length}else{AL.setSourceState(src,4116);break}}var buf=src.bufQueue[src.bufsProcessed];if(buf.length>0){nextStartTime=src.bufStartTime+buf.audioBuf.duration/src.playbackRate;if(currentTime1){src.audioQueue.length=1}},stopSourceAudio:function(src){for(var i=0;isrc.bufQueue[src.bufsProcessed].audioBuf.duration){offset-=src.bufQueue[src.bufsProcessed].audiobuf.duration;src.bufsProcessed++}src.bufOffset=offset}if(playing){AL.setSourceState(src,4114)}},getGlobalParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:AL.currentCtx.err=40962;return null}},setGlobalParam:function(funcname,param,value){if(!AL.currentCtx){return}switch(param){case 49152:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=value;AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(value)||value<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=value;AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=value;AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:AL.currentCtx.err=40962;return null}},setListenerParam:function(funcname,param,value){if(!AL.currentCtx){return}if(value===null){AL.currentCtx.err=40962;return}var listener=AL.currentCtx.listener;switch(param){case 4100:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.position[0]=value[0];listener.position[1]=value[1];listener.position[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.velocity[0]=value[0];listener.velocity[1]=value[1];listener.velocity[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=value;break;case 4111:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])||!Number.isFinite(value[3])||!Number.isFinite(value[4])||!Number.isFinite(value[5])){AL.currentCtx.err=40963;return}listener.direction[0]=value[0];listener.direction[1]=value[1];listener.direction[2]=value[2];listener.up[0]=value[3];listener.up[1]=value[4];listener.up[2]=value[5];AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}},getBufferParam:function(funcname,bufferId,param){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}switch(param){case 8193:return buf.frequency;case 8194:return buf.bytesPerSample*8;case 8195:return buf.channels;case 8196:return buf.length*buf.bytesPerSample*buf.channels;case 8213:if(buf.length===0){return[0,0]}else{return[(buf.audioBuf._loopStart||0)*buf.frequency,(buf.audioBuf._loopEnd||buf.length)*buf.frequency]}default:AL.currentCtx.err=40962;return null}},setBufferParam:function(funcname,bufferId,param,value){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}if(value===null){AL.currentCtx.err=40962;return}switch(param){case 8196:if(value!==0){AL.currentCtx.err=40963;return}break;case 8213:if(value[0]<0||value[0]>buf.length||value[1]<0||value[1]>buf.Length||value[0]>=value[1]){AL.currentCtx.err=40963;return}if(buf.refCount>0){AL.currentCtx.err=40964;return}if(buf.audioBuf){buf.audioBuf._loopStart=value[0]/buf.frequency;buf.audioBuf._loopEnd=value[1]/buf.frequency}break;default:AL.currentCtx.err=40962;return}},getSourceParam:function(funcname,sourceId,param){if(!AL.currentCtx){return null}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return null}switch(param){case 514:return src.relative;case 4097:return src.coneInnerAngle;case 4098:return src.coneOuterAngle;case 4099:return src.pitch;case 4100:return src.position;case 4101:return src.direction;case 4102:return src.velocity;case 4103:return src.looping;case 4105:if(src.type===4136){return src.bufQueue[0].id}else{return 0}case 4106:return src.gain.gain.value;case 4109:return src.minGain;case 4110:return src.maxGain;case 4112:return src.state;case 4117:if(src.bufQueue.length===1&&src.bufQueue[0].id===0){return 0}else{return src.bufQueue.length}case 4118:if(src.bufQueue.length===1&&src.bufQueue[0].id===0||src.looping){return 0}else{return src.bufsProcessed}case 4128:return src.refDistance;case 4129:return src.rolloffFactor;case 4130:return src.coneOuterGain;case 4131:return src.maxDistance;case 4132:return AL.sourceTell(src);case 4133:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency}return offset;case 4134:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency*src.bufQueue[0].bytesPerSample}return offset;case 4135:return src.type;case 4628:return src.spatialize;case 8201:var length=0;var bytesPerFrame=0;for(var i=0;i0){var audioSrc=src.audioQueue[0];audioSrc.loop=true;audioSrc._duration=Number.POSITIVE_INFINITY}}else if(value===0){src.looping=false;var currentTime=AL.updateSourceTime(src);if(src.type===4136&&src.audioQueue.length>0){var audioSrc=src.audioQueue[0];audioSrc.loop=false;audioSrc._duration=src.bufQueue[0].audioBuf.duration/src.playbackRate;audioSrc._startTime=currentTime-src.bufOffset/src.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(src.state===4114||src.state===4115){AL.currentCtx.err=40964;return}if(value===0){for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=1;src.bufQueue[0]=AL.buffers[0];src.bufsProcessed=0;src.type=4144}else{var buf=AL.buffers[value];if(!buf){AL.currentCtx.err=40963;return}for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=0;buf.refCount++;src.bufQueue=[buf];src.bufsProcessed=0;src.type=4136}AL.initSourcePanner(src);AL.scheduleSourceAudio(src);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.gain.gain.value=value;break;case 4109:if(!Number.isFinite(value)||value<0||value>Math.min(src.maxGain,1)){AL.currentCtx.err=40963;return}src.minGain=value;break;case 4110:if(!Number.isFinite(value)||value1){AL.currentCtx.err=40963;return}src.maxGain=value;break;case 4128:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.refDistance=value;if(src.panner){src.panner.refDistance=value}break;case 4129:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.rolloffFactor=value;if(src.panner){src.panner.rolloffFactor=value}break;case 4130:if(!Number.isFinite(value)||value<0||value>1){AL.currentCtx.err=40963;return}src.coneOuterGain=value;if(src.panner){src.panner.coneOuterGain=value}break;case 4131:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.maxDistance=value;if(src.panner){src.panner.maxDistance=value}break;case 4132:if(value<0||value>AL.sourceDuration(src)){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4133:var srcLen=AL.sourceDuration(src);if(srcLen>0){var frequency;for(var bufId in src.bufQueue){if(bufId){frequency=src.bufQueue[bufId].frequency;break}}value/=frequency}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4134:var srcLen=AL.sourceDuration(src);if(srcLen>0){var bytesPerSec;for(var bufId in src.bufQueue){if(bufId){var buf=src.bufQueue[bufId];bytesPerSec=buf.frequency*buf.bytesPerSample*buf.channels;break}}value/=bytesPerSec}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4628:if(value!==0&&value!==1&&value!==2){AL.currentCtx.err=40963;return}src.spatialize=value;AL.initSourcePanner(src);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:src.distanceModel=value;if(AL.currentCtx.sourceDistanceModel){AL.updateContextGlobal(AL.currentCtx)}break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:function(deviceId,funcname){if(deviceId===0){AL.alcErr=40961;return null}var c=AL.captures[deviceId];if(!c){AL.alcErr=40961;return null}var err=c.mediaStreamError;if(err){AL.alcErr=40961;return null}return c}};function _alBufferData(bufferId,format,pData,size,freq){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf){AL.currentCtx.err=40963;return}if(freq<=0){AL.currentCtx.err=40963;return}var audioBuf=null;try{switch(format){case 4352:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size,freq);var channel0=audioBuf.getChannelData(0);for(var i=0;i0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>1,freq);var channel0=audioBuf.getChannelData(0);pData>>=1;for(var i=0;i>1;++i){channel0[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=1;buf.length=size>>1;break;case 4354:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>1,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);for(var i=0;i>1;++i){channel0[i]=HEAPU8[pData++]*.0078125-1;channel1[i]=HEAPU8[pData++]*.0078125-1}}buf.bytesPerSample=1;buf.channels=2;buf.length=size>>1;break;case 4355:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>2,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=1;for(var i=0;i>2;++i){channel0[i]=HEAP16[pData++]*30517578125e-15;channel1[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=2;buf.length=size>>2;break;case 65552:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>2,freq);var channel0=audioBuf.getChannelData(0);pData>>=2;for(var i=0;i>2;++i){channel0[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=1;buf.length=size>>2;break;case 65553:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>3,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=2;for(var i=0;i>3;++i){channel0[i]=HEAPF32[pData++];channel1[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=2;buf.length=size>>3;break;default:AL.currentCtx.err=40963;return}buf.frequency=freq;buf.audioBuf=audioBuf}catch(e){AL.currentCtx.err=40963;return}}function _alDeleteBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(bufId===0){continue}if(!AL.buffers[bufId]){AL.currentCtx.err=40961;return}if(AL.buffers[bufId].refCount){AL.currentCtx.err=40964;return}}for(var i=0;i>2];if(bufId===0){continue}AL.deviceRefCounts[AL.buffers[bufId].deviceId]--;delete AL.buffers[bufId];AL.freeIds.push(bufId)}}function _alSourcei(sourceId,param,value){switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",sourceId,param,value);break;default:AL.setSourceParam("alSourcei",sourceId,param,null);break}}function _alDeleteSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(!AL.currentCtx.sources[srcId]){AL.currentCtx.err=40961;return}}for(var i=0;i>2];AL.setSourceState(AL.currentCtx.sources[srcId],4116);_alSourcei(srcId,4105,0);delete AL.currentCtx.sources[srcId];AL.freeIds.push(srcId)}}function _alGenBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2]=buf.id}}function _alGenSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2]=src.id}}function _alGetError(){if(!AL.currentCtx){return 40964}else{var err=AL.currentCtx.err;AL.currentCtx.err=0;return err}}function _alGetSourcei(sourceId,param,pValue){var val=AL.getSourceParam("alGetSourcei",sourceId,param);if(val===null){return}if(!pValue){AL.currentCtx.err=40963;return}switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[pValue>>2]=val;break;default:AL.currentCtx.err=40962;return}}function _alGetString(param){if(!AL.currentCtx){return 0}if(AL.stringCache[param]){return AL.stringCache[param]}var ret;switch(param){case 0:ret="No Error";break;case 40961:ret="Invalid Name";break;case 40962:ret="Invalid Enum";break;case 40963:ret="Invalid Value";break;case 40964:ret="Invalid Operation";break;case 40965:ret="Out of Memory";break;case 45057:ret="Emscripten";break;case 45058:ret="1.1";break;case 45059:ret="WebAudio";break;case 45060:ret="";for(var ext in AL.AL_EXTENSIONS){ret=ret.concat(ext);ret=ret.concat(" ")}ret=ret.trim();break;default:AL.currentCtx.err=40962;return 0}ret=allocate(intArrayFromString(ret),ALLOC_NORMAL);AL.stringCache[param]=ret;return ret}function _alSourcePlay(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4114)}function _alSourceQueueBuffers(sourceId,count,pBufferIds){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}if(src.type===4136){AL.currentCtx.err=40964;return}if(count===0){return}var templateBuf=AL.buffers[0];for(var i=0;i>2];var buf=AL.buffers[bufId];if(!buf){AL.currentCtx.err=40961;return}if(templateBuf.id!==0&&(buf.frequency!==templateBuf.frequency||buf.bytesPerSample!==templateBuf.bytesPerSample||buf.channels!==templateBuf.channels)){AL.currentCtx.err=40964}}if(src.bufQueue.length===1&&src.bufQueue[0].id===0){src.bufQueue.length=0}src.type=4137;for(var i=0;i>2];var buf=AL.buffers[bufId];buf.refCount++;src.bufQueue.push(buf)}if(src.looping){AL.cancelPendingSourceAudio(src)}AL.initSourcePanner(src);AL.scheduleSourceAudio(src)}function _alSourceStop(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4116)}function _alSourceUnqueueBuffers(sourceId,count,pBufferIds){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}if(count>(src.bufQueue.length===1&&src.bufQueue[0].id===0?0:src.bufsProcessed)){AL.currentCtx.err=40963;return}if(count===0){return}for(var i=0;i>2]=buf.id;src.bufsProcessed--}if(src.bufQueue.length===0){src.bufQueue.push(AL.buffers[0])}AL.initSourcePanner(src);AL.scheduleSourceAudio(src)}function _alcCloseDevice(deviceId){if(!(deviceId in AL.deviceRefCounts)||AL.deviceRefCounts[deviceId]>0){return 0}delete AL.deviceRefCounts[deviceId];AL.freeIds.push(deviceId);return 1}function listenOnce(object,event,func){object.addEventListener(event,function handler(){func();object.removeEventListener(event,handler)})}function autoResumeAudioContext(ctx,elements){if(!elements){elements=[document,document.getElementById("canvas")]}["keydown","mousedown","touchstart"].forEach(function(event){elements.forEach(function(element){if(element){listenOnce(element,event,function(){if(ctx.state==="suspended")ctx.resume()})}})})}function _alcCreateContext(deviceId,pAttrList){if(!(deviceId in AL.deviceRefCounts)){AL.alcErr=40961;return 0}var options=null;var attrs=[];var hrtf=null;pAttrList>>=2;if(pAttrList){var attr=0;var val=0;while(true){attr=HEAP32[pAttrList++];attrs.push(attr);if(attr===0){break}val=HEAP32[pAttrList++];attrs.push(val);switch(attr){case 4103:if(!options){options={}}options.sampleRate=val;break;case 4112:case 4113:break;case 6546:switch(val){case 0:hrtf=false;break;case 1:hrtf=true;break;case 2:break;default:AL.alcErr=40964;return 0}break;case 6550:if(val!==0){AL.alcErr=40964;return 0}break;default:AL.alcErr=40964;return 0}}}var AudioContext=window.AudioContext||window.webkitAudioContext;var ac=null;try{if(options){ac=new AudioContext(options)}else{ac=new AudioContext}}catch(e){if(e.name==="NotSupportedError"){AL.alcErr=40964}else{AL.alcErr=40961}return 0}autoResumeAudioContext(ac);if(typeof ac.createGain==="undefined"){ac.createGain=ac.createGainNode}var gain=ac.createGain();gain.connect(ac.destination);var ctx={deviceId:deviceId,id:AL.newId(),attrs:attrs,audioCtx:ac,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(function(){AL.scheduleContextAudio(ctx)},AL.QUEUE_INTERVAL),gain:gain,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:false,hrtf:hrtf||false,_err:0,get err(){return this._err},set err(val){if(this._err===0||val===0){this._err=val}}};AL.deviceRefCounts[deviceId]++;AL.contexts[ctx.id]=ctx;if(hrtf!==null){for(var ctxId in AL.contexts){var c=AL.contexts[ctxId];if(c.deviceId===deviceId){c.hrtf=hrtf;AL.updateContextGlobal(c)}}}return ctx.id}function _alcDestroyContext(contextId){var ctx=AL.contexts[contextId];if(AL.currentCtx===ctx){AL.alcErr=40962;return}if(AL.contexts[contextId].interval){clearInterval(AL.contexts[contextId].interval)}AL.deviceRefCounts[ctx.deviceId]--;delete AL.contexts[contextId];AL.freeIds.push(contextId)}function _alcGetCurrentContext(){if(AL.currentCtx!==null){return AL.currentCtx.id}else{return 0}}function _alcMakeContextCurrent(contextId){if(contextId===0){AL.currentCtx=null;return 0}else{AL.currentCtx=AL.contexts[contextId];return 1}}function _alcOpenDevice(pDeviceName){if(pDeviceName){var name=UTF8ToString(pDeviceName);if(name!==AL.DEVICE_NAME){return 0}}if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){var deviceId=AL.newId();AL.deviceRefCounts[deviceId]=0;return deviceId}else{return 0}}function _alcProcessContext(contextId){}function _clock(){if(_clock.start===undefined)_clock.start=Date.now();return(Date.now()-_clock.start)*(1e6/1e3)|0}function _difftime(time1,time0){return time1-time0}function _dmScriptHttpRequestAsync(method,url,headers,arg,onload,onerror,send_data,send_data_length,timeout){var xhr=new XMLHttpRequest;function listener(){var resp_headers=xhr.getAllResponseHeaders();resp_headers=resp_headers.replace(new RegExp("\r","g"),"");resp_headers+="\n";if(xhr.status!=0){var ab=new Uint8Array(xhr.response);var b=allocate(ab,ALLOC_NORMAL);var resp_headers_buffer=allocate(intArrayFromString(resp_headers),ALLOC_NORMAL);wasmTable.get(onload)(arg,xhr.status,b,ab.length,resp_headers_buffer);_free(b)}else{wasmTable.get(onerror)(arg,xhr.status)}}xhr.onload=listener;xhr.onerror=listener;xhr.ontimeout=listener;xhr.open(UTF8ToString(method),UTF8ToString(url),true);xhr.responseType="arraybuffer";if(timeout>0){xhr.timeout=timeout/1e3}var headersArray=UTF8ToString(headers).split("\n");for(var i=0;i0){xhr.send(HEAPU8.subarray(send_data,send_data+send_data_length))}else{xhr.send()}}var DMSYS={_folder:"/data",_cstr:null,GetUserPersistentDataRoot:function(){if(typeof window!=="undefined")return DMSYS._folder;else return""},PumpMessageQueue:function(){if(typeof window==="undefined"){var uvrun=require("uvrun");uvrun.runOnce()}}};function _dmSysGetApplicationPath(){var path=location.href.substring(0,location.href.lastIndexOf("/"));var lengthBytes=lengthBytesUTF8(path)+1;var buffer=_malloc(lengthBytes);Module.stringToUTF8(path,buffer,lengthBytes);return buffer}function _dmSysGetUserAgent(){var useragent=navigator.userAgent;var buffer=_malloc(useragent.length+1);Module.stringToUTF8(useragent,buffer,useragent.length+1);return buffer}function _dmSysGetUserPersistentDataRoot(){if(null==DMSYS._cstr){var str=DMSYS.GetUserPersistentDataRoot();DMSYS._cstr=_malloc(str.length+1);Module.stringToUTF8(str,DMSYS._cstr,str.length+1)}return DMSYS._cstr}function _dmSysGetUserPreferredLanguage(defaultlang){var jsdefault=UTF8ToString(defaultlang);var preferred=navigator==undefined?jsdefault:navigator.languages?navigator.languages[0]||jsdefault:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||jsdefault;var buffer=_malloc(preferred.length+1);Module.stringToUTF8(preferred,buffer,preferred.length+1);return buffer}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence0},removeAllHandlersOnTarget:function(target,eventTypeString){for(var i=0;i>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){function getChromeVersion(){var chromeVersion=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(chromeVersion)return chromeVersion[2]|0}var ctx=webGLContextAttributes.majorVersion>1?!(getChromeVersion()<=57)&&canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};context.cannotHandleOffsetsInUniformArrayViews=function(g){function b(c,t){var s=g.createShader(t);g.shaderSource(s,c);g.compileShader(s);return s}try{var p=g.createProgram();g.attachShader(p,b("attribute vec4 p;void main(){gl_Position=p;}",35633));g.attachShader(p,b("precision lowp float;uniform vec4 u;void main(){gl_FragColor=u;}",35632));g.linkProgram(p);var h=new Float32Array(8);h[4]=1;g.useProgram(p);var l=g.getUniformLocation(p,"u");g.uniform4fv(l,h.subarray(4,8));return!g.getUniform(p,l)[0]}catch(e){return false}}();if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(ext.indexOf("lose_context")<0&&ext.indexOf("debug")<0){GLctx.getExtension(ext)}})},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _emscripten_glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _emscripten_glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _emscripten_glClear(x0){GLctx["clear"](x0)}function _emscripten_glClearBufferfi(x0,x1,x2,x3){GLctx["clearBufferfi"](x0,x1,x2,x3)}function _emscripten_glClearBufferfv(buffer,drawbuffer,value){GLctx["clearBufferfv"](buffer,drawbuffer,HEAPF32,value>>2)}function _emscripten_glClearBufferiv(buffer,drawbuffer,value){GLctx["clearBufferiv"](buffer,drawbuffer,HEAP32,value>>2)}function _emscripten_glClearBufferuiv(buffer,drawbuffer,value){GLctx["clearBufferuiv"](buffer,drawbuffer,HEAPU32,value>>2)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearDepthf(x0){GLctx["clearDepth"](x0)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296}function _emscripten_glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _emscripten_glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _emscripten_glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){GLctx["copyTexSubImage3D"](x0,x1,x2,x3,x4,x5,x6,x7,x8)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueries(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx["deleteQuery"](query);GL.queries[id]=null}}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx["deleteSampler"](sampler);sampler.name=0;GL.samplers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteTransformFeedbacks(n,ids){for(var i=0;i>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx["deleteTransformFeedback"](transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedARB(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedEXT(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedNV(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersEXT(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedARB(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedEXT(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedNV(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQuery(x0){GLctx["endQuery"](x0)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _emscripten_glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueries(n,ids){__glGenObject(n,ids,"createQuery",GL.queries)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenTransformFeedbacks(n,ids){__glGenObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];switch(pname){case 35393:var name=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return;default:var result=GLctx["getActiveUniformBlockParameter"](program,uniformBlockIndex,pname);if(!result)return;if(typeof result=="number"){HEAP32[params>>2]=result}else{for(var i=0;i>2]=result[i]}}}}function _emscripten_glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i>2])}var result=GLctx["getActiveUniforms"](program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}writeI53ToI64(data,GLctx.getBufferParameter(target,value))}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFragDataLocation(program,name){return GLctx["getFragDataLocation"](GL.programs[program],UTF8ToString(name))}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx["getIndexedParameter"](target,index);var ret;switch(typeof result){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:writeI53ToI64(data,ret);break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data>>0]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}}function _emscripten_glGetInteger64i_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,1)}function _emscripten_glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)}function _emscripten_glGetIntegeri_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,0)}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx["getInternalformatParameter"](target,internalformat,pname);if(ret===null)return;for(var i=0;i>2]=ret[i]}}function _emscripten_glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx["getQueryParameter"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx["getQuery"](target,pname)}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAPF32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAP32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _emscripten_glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _emscripten_glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);HEAP32[length>>2]=ret;if(ret!==null&&length)HEAP32[length>>2]=1}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx["getTransformFeedbackVarying"](program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _emscripten_glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i>2]));var result=GLctx["getUniformIndices"](program,names);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetUniformuiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}}function _emscripten_glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribIuiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateFramebuffer"](target,list)}function _emscripten_glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateSubFramebuffer"](target,list,x,y,width,height)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx["isQuery"](query)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx["isSampler"](sampler)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsSync(sync){return GLctx.isSync(GL.syncs[sync])}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsTransformFeedback(id){return GLctx["isTransformFeedback"](GL.transformFeedbacks[id])}function _emscripten_glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPauseTransformFeedback(){GLctx["pauseTransformFeedback"]()}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}function _emscripten_glProgramParameteri(program,pname,value){GL.recordError(1280)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function _emscripten_glReadBuffer(x0){GLctx["readBuffer"](x0)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _emscripten_glResumeTransformFeedback(){GLctx["resumeTransformFeedback"]()}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glSamplerParameterf(sampler,pname,param){GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteri(sampler,pname,param){GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _emscripten_glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx["texStorage3D"](x0,x1,x2,x3,x4,x5)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _emscripten_glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1fv(GL.uniforms[location],HEAPF32,value>>2,count);return}if(count<=288){var view=miniTempWebGLFloatBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1iv(GL.uniforms[location],HEAP32,value>>2,count);return}if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Int32Array(view)}GLctx.uniform1iv(GL.uniforms[location],view)}function _emscripten_glUniform1ui(location,v0){GLctx.uniform1ui(GL.uniforms[location],v0)}function _emscripten_glUniform1uiv(location,count,value){GLctx.uniform1uiv(GL.uniforms[location],HEAPU32,value>>2,count)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(GL.uniforms[location],HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2iv(GL.uniforms[location],HEAP32,value>>2,count*2);return}if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Int32Array(view)}GLctx.uniform2iv(GL.uniforms[location],view)}function _emscripten_glUniform2ui(location,v0,v1){GLctx.uniform2ui(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2uiv(location,count,value){GLctx.uniform2uiv(GL.uniforms[location],HEAPU32,value>>2,count*2)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3fv(GL.uniforms[location],HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3iv(GL.uniforms[location],HEAP32,value>>2,count*3);return}if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Int32Array(view)}GLctx.uniform3iv(GL.uniforms[location],view)}function _emscripten_glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3uiv(location,count,value){GLctx.uniform3uiv(GL.uniforms[location],HEAPU32,value>>2,count*3)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(GL.uniforms[location],HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Int32Array(view)}GLctx.uniform4iv(GL.uniforms[location],view)}function _emscripten_glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4uiv(location,count,value){GLctx.uniform4uiv(GL.uniforms[location],HEAPU32,value>>2,count*4)}function _emscripten_glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix2x3fv(location,count,transpose,value){GLctx.uniformMatrix2x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix2x4fv(location,count,transpose,value){GLctx.uniformMatrix2x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3x2fv(location,count,transpose,value){GLctx.uniformMatrix3x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix3x4fv(location,count,transpose,value){GLctx.uniformMatrix3x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4x2fv(location,count,transpose,value){GLctx.uniformMatrix4x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix4x3fv(location,count,transpose,value){GLctx.uniformMatrix4x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorARB(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorEXT(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorNV(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribI4i(x0,x1,x2,x3,x4){GLctx["vertexAttribI4i"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])}function _emscripten_glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])}function _emscripten_glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_glWaitSync(sync,flags,timeoutLo,timeoutHi){GLctx.waitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _longjmp(env,value){_setThrew(env,value||1);throw"longjmp"}function _emscripten_longjmp(a0,a1){return _longjmp(a0,a1)}var _emscripten_memcpy_big=Uint8Array.prototype.copyWithin?function(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}:function(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)};function _emscripten_pause_main_loop(){Browser.mainLoop.pause()}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){requestedSize=requestedSize>>>0;abortOnCannotGrowMemory(requestedSize)}function _emscripten_set_main_loop_arg(func,arg,fps,simulateInfiniteLoop){var browserIterationFunc=function(){wasmTable.get(func)(arg)};setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _exit(status){exit(status)}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}var GAI_ERRNO_MESSAGES={};function _gai_strerror(val){var buflen=256;if(!_gai_strerror.buffer){_gai_strerror.buffer=_malloc(buflen);GAI_ERRNO_MESSAGES["0"]="Success";GAI_ERRNO_MESSAGES[""+-1]="Invalid value for 'ai_flags' field";GAI_ERRNO_MESSAGES[""+-2]="NAME or SERVICE is unknown";GAI_ERRNO_MESSAGES[""+-3]="Temporary failure in name resolution";GAI_ERRNO_MESSAGES[""+-4]="Non-recoverable failure in name res";GAI_ERRNO_MESSAGES[""+-6]="'ai_family' not supported";GAI_ERRNO_MESSAGES[""+-7]="'ai_socktype' not supported";GAI_ERRNO_MESSAGES[""+-8]="SERVICE not supported for 'ai_socktype'";GAI_ERRNO_MESSAGES[""+-10]="Memory allocation failure";GAI_ERRNO_MESSAGES[""+-11]="System error returned in 'errno'";GAI_ERRNO_MESSAGES[""+-12]="Argument buffer overflow"}var msg="Unknown error";if(val in GAI_ERRNO_MESSAGES){if(GAI_ERRNO_MESSAGES[val].length>buflen-1){msg="Message too long"}else{msg=GAI_ERRNO_MESSAGES[val]}}writeAsciiToMemory(msg,_gai_strerror.buffer);return _gai_strerror.buffer}function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?__inet_ntop6_raw(addr):__inet_ntop4_raw(addr);sa=_malloc(salen);errno=__write_sockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAP32[ai+24>>2]=canon;HEAP32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=__inet_pton4_raw(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=__inet_pton6_raw(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAP32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=__inet_pton4_raw(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}function getHostByName(name){var ret=_malloc(20);var nameBuf=_malloc(name.length+1);stringToUTF8(name,nameBuf,name.length+1);HEAP32[ret>>2]=nameBuf;var aliasesBuf=_malloc(4);HEAP32[aliasesBuf>>2]=0;HEAP32[ret+4>>2]=aliasesBuf;var afinet=2;HEAP32[ret+8>>2]=afinet;HEAP32[ret+12>>2]=4;var addrListBuf=_malloc(12);HEAP32[addrListBuf>>2]=addrListBuf+8;HEAP32[addrListBuf+4>>2]=0;HEAP32[addrListBuf+8>>2]=__inet_pton4_raw(DNS.lookup_name(name));HEAP32[ret+16>>2]=addrListBuf;return ret}function _gethostbyaddr(addr,addrlen,type){if(type!==2){setErrNo(5);return null}addr=HEAP32[addr>>2];var host=__inet_ntop4_raw(addr);var lookup=DNS.lookup_addr(host);if(lookup){host=lookup}return getHostByName(host)}function _gethostbyname(name){return getHostByName(UTF8ToString(name))}function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=__read_sockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}function _gettimeofday(ptr){var now=Date.now();HEAP32[ptr>>2]=now/1e3|0;HEAP32[ptr+4>>2]=now%1e3*1e3|0;return 0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glClearStencil(x0){GLctx["clearStencil"](x0)}function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDepthMask(flag){GLctx.depthMask(!!flag)}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFlush(){GLctx["flush"]()}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _glStencilMask(x0){GLctx["stencilMask"](x0)}function _glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniform4fv(GL.uniforms[location],view)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2);if(GL.currentContext.cannotHandleOffsetsInUniformArrayViews)view=new Float32Array(view)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GLFW={keyFunc:null,charFunc:null,markedTextFunc:null,gamepadFunc:null,mouseButtonFunc:null,mousePosFunc:null,mouseWheelFunc:null,resizeFunc:null,closeFunc:null,refreshFunc:null,focusFunc:null,iconifyFunc:null,touchFunc:null,params:null,initTime:null,wheelPos:0,buttons:0,keys:0,initWindowWidth:640,initWindowHeight:480,windowX:0,windowY:0,windowWidth:0,windowHeight:0,prevWidth:0,prevHeight:0,prevNonFSWidth:0,prevNonFSHeight:0,isFullscreen:false,isPointerLocked:false,dpi:1,mouseTouchId:null,DOMToGLFWKeyCode:function(keycode,code){switch(keycode){case 8:return 295;case 9:return 293;case 13:return 294;case 27:return 257;case 106:return 313;case 107:return 315;case 109:return 314;case 110:return 316;case 111:return 312;case 112:return 258;case 113:return 259;case 114:return 260;case 115:return 261;case 116:return 262;case 117:return 263;case 118:return 264;case 119:return 265;case 120:return 266;case 121:return 267;case 122:return 268;case 123:return 269;case 37:return 285;case 38:return 283;case 39:return 286;case 40:return 284;case 33:return 298;case 34:return 299;case 36:return 300;case 35:return 301;case 45:return 296;case 16:return 287;case 5:return 287;case 6:return 288;case 17:return 289;case 3:return 289;case 4:return 290;case 18:return 291;case 2:return 291;case 1:return 292;case 96:return 302;case 97:return 303;case 98:return 304;case 99:return 305;case 100:return 306;case 101:return 307;case 102:return 308;case 103:return 309;case 104:return 310;case 105:return 311}switch(code){case"Minus":return 45;case"Period":return 46;case"Comma":return 44;case"Slash":return 47;case"Backslash":return 92;case"IntlRo":return 92;case"IntlYen":return 92;case"IntlBackslash":return 92;case"Backquote":return 96;case"BracketLeft":return 91;case"BracketRight":return 93;case"Equal":return 61;case"Quote":return 39;case"Semicolon":return 59;case"NumpadComma":return 316}return keycode},DOMtoGLFWButton:function(button){if(button==1){button=2}else if(button==2){button=1}return button},getUnicodeChar:function(value){var output="";if(value>65535){value-=65536;output+=String.fromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=String.fromCharCode(value);return output},addEventListener:function(type,listener,useCapture){if(typeof window!=="undefined"){window.addEventListener(type,listener,useCapture)}},removeEventListener:function(type,listener,useCapture){if(typeof window!=="undefined"){window.removeEventListener(type,listener,useCapture)}},addEventListenerCanvas:function(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].addEventListener(type,listener,useCapture)}},removeEventListenerCanvas:function(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].removeEventListener(type,listener,useCapture)}},isCanvasActive:function(event){var res=typeof document.activeElement=="undefined"||document.activeElement==Module["canvas"];if(!res){res=event.target==Module["canvas"]}if(event.target.focus)event.target.focus();return res},onKeyPress:function(event){if(!GLFW.isCanvasActive(event)){return}if(event.charCode){var char=GLFW.getUnicodeChar(event.charCode);if(char!==null&&GLFW.charFunc){wasmTable.get(GLFW.charFunc)(event.charCode,1)}}},onKeyChanged:function(event,status){if(!GLFW.isCanvasActive(event)){return}var key=GLFW.DOMToGLFWKeyCode(event.keyCode,event.code);if(key){GLFW.keys[key]=status;if(GLFW.keyFunc){wasmTable.get(GLFW.keyFunc)(key,status)}}},onKeydown:function(event){if(!GLFW.isCanvasActive(event)){return}switch(event.keyCode){case 37:case 38:case 39:case 40:case 32:event.preventDefault();event.stopPropagation();default:break}GLFW.onKeyChanged(event,1);if(event.keyCode===32){if(GLFW.charFunc){wasmTable.get(GLFW.charFunc)(32,1);event.preventDefault()}}else if(event.keyCode===8||event.keyCode===9||event.keyCode===13){event.preventDefault()}},onKeyup:function(event){if(!GLFW.isCanvasActive(event)){return}GLFW.onKeyChanged(event,0)},onMousemove:function(event){var lastX=Browser.mouseX;var lastY=Browser.mouseY;Browser.calculateMouseEvent(event);var newX=Browser.mouseX;var newY=Browser.mouseY;if(event.target==Module["canvas"]&&GLFW.mousePosFunc){event.preventDefault();wasmTable.get(GLFW.mousePosFunc)(lastX,lastY)}},onMouseButtonChanged:function(event,status){if(!GLFW.isCanvasActive(event)){return}if(GLFW.mouseButtonFunc==null){return}Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"]){return}if(status==1){try{event.target.setCapture()}catch(e){}}event.preventDefault();var eventButton=GLFW.DOMtoGLFWButton(event["button"]);wasmTable.get(GLFW.mouseButtonFunc)(eventButton,status)},fillTouch:function(id,x,y,phase){if(GLFW.touchFunc){wasmTable.get(GLFW.touchFunc)(id,x,y,phase)}},touchWasFinished:function(event,phase){if(!GLFW.isCanvasActive(event)){return}for(var i=0;i0}function _glfwGetMouseLocked(){return GLFW.isPointerLocked?1:0}function _glfwGetMousePos(xpos,ypos){setValue(xpos,Browser.mouseX,"i32");setValue(ypos,Browser.mouseY,"i32")}function _glfwGetMouseWheel(){return GLFW.wheelPos}function _glfwGetProcAddress(procname){return _getProcAddress(procname)}function _glfwGetWindowParam(param){return GLFW.params[param]}function _glfwGetWindowRefreshRate(){return 0}function _glfwGetWindowSize(width,height){setValue(width,Module["canvas"].width,"i32");setValue(height,Module["canvas"].height,"i32")}function _glfwIconifyWindow(){}function _glfwInitJS(){GLFW.initTime=Date.now()/1e3;GLFW.addEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.addEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.addEventListener("keydown",GLFW.onKeydown,true);GLFW.addEventListener("keypress",GLFW.onKeyPress,true);GLFW.addEventListener("keyup",GLFW.onKeyup,true);GLFW.addEventListener("mousemove",GLFW.onMousemove,true);GLFW.addEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.addEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.addEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.addEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.addEventListenerCanvas("touchcancel",GLFW.onTouchCancel,true);GLFW.addEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.addEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.addEventListenerCanvas("blur",GLFW.onBlur,true);__ATEXIT__.push({func:function(){GLFW.removeEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.removeEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.removeEventListener("keydown",GLFW.onKeydown,true);GLFW.removeEventListener("keypress",GLFW.onKeyPress,true);GLFW.removeEventListener("keyup",GLFW.onKeyup,true);GLFW.removeEventListener("mousemove",GLFW.onMousemove,true);GLFW.removeEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.removeEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.removeEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.removeEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchcancel",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.removeEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.removeEventListenerCanvas("blur",GLFW.onBlur,true);var canvas=Module["canvas"];if(typeof canvas!=="undefined"){Module["canvas"].width=Module["canvas"].height=1}}});GLFW.params=new Array;GLFW.params[196609]=true;GLFW.params[196610]=false;GLFW.params[196611]=true;GLFW.params[196612]=false;GLFW.params[196613]=false;GLFW.params[196614]=true;GLFW.params[131073]=true;GLFW.params[131074]=true;GLFW.params[131075]=false;GLFW.params[131076]=true;GLFW.params[131077]=0;GLFW.params[131078]=0;GLFW.params[131079]=0;GLFW.params[131080]=0;GLFW.params[131081]=0;GLFW.params[131082]=0;GLFW.params[131083]=0;GLFW.params[131084]=0;GLFW.params[131085]=0;GLFW.params[131086]=0;GLFW.params[131087]=0;GLFW.params[131088]=0;GLFW.params[131089]=0;GLFW.params[131090]=0;GLFW.params[131091]=0;GLFW.params[131092]=0;GLFW.params[131093]=0;GLFW.params[131094]=0;GLFW.params[131095]=0;GLFW.params[131096]=0;GLFW.params[327681]=0;GLFW.params[327682]=1;GLFW.params[327683]=2;GLFW.params[131097]=0;GLFW.keys=new Array;GLFW.GLFW_PHASE_BEGAN=0;GLFW.GLFW_PHASE_MOVED=1;GLFW.GLFW_PHASE_ENDED=3;GLFW.GLFW_PHASE_CANCELLED=4;return 1}function _glfwOpenWindow(width,height,redbits,greenbits,bluebits,alphabits,depthbits,stencilbits,mode){if(width==0&&height>0){width=4*height/3}if(width>0&&height==0){height=3*width/4}GLFW.params[131077]=redbits;GLFW.params[131078]=greenbits;GLFW.params[131079]=bluebits;GLFW.params[131080]=alphabits;GLFW.params[131081]=depthbits;GLFW.params[131082]=stencilbits;if(mode==65537){GLFW.initWindowWidth=width;GLFW.initWindowHeight=height;GLFW.params[196611]=true}else if(mode==65538){GLFW.requestFullScreen();GLFW.params[196611]=false}else{throw"Invalid glfwOpenWindow mode."}var contextAttributes={antialias:GLFW.params[131091]>1,depth:GLFW.params[131081]>0,stencil:GLFW.params[131082]>0};var iOSVersion=false;try{iOSVersion=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||false}catch(e){}if(iOSVersion&&iOSVersion<15.2){contextAttributes.majorVersion=1}Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes);if(Module.ctx==null){contextAttributes.majorVersion=1;Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}return 1}function _glfwOpenWindowHint(target,hint){GLFW.params[target]=hint;if(target==131097){if(hint!=0){GLFW.dpi=window.devicePixelRatio||1}}}function _glfwPollEvents(){}function _glfwResetKeyboard(){}function _glfwSetCharCallback(cbfun){GLFW.charFunc=cbfun;return 1}function _glfwSetDeviceChangedCallback(cbfun){return 1}function _glfwSetGamepadCallback(cbfun){GLFW.gamepadFunc=cbfun;GLFW.refreshJoysticks();return 1}function _glfwSetMarkedTextCallback(cbfun){GLFW.markedTextFunc=cbfun;return 1}function _glfwSetTouchCallback(cbfun){GLFW.touchFunc=cbfun;return 1}function _glfwSetWindowBackgroundColor(){}function _glfwSetWindowCloseCallback(cbfun){GLFW.closeFunc=cbfun}function _glfwSetWindowFocusCallback(cbfun){GLFW.focusFunc=cbfun}function _glfwSetWindowIconifyCallback(cbfun){GLFW.iconifyFunc=cbfun}function _glfwSetWindowSize(width,height){Browser.setCanvasSize(width,height);if(GLFW.resizeFunc){wasmTable.get(GLFW.resizeFunc)(width,height)}}function _glfwSetWindowSizeCallback(cbfun){GLFW.resizeFunc=cbfun}function _glfwShowKeyboard(show_keyboard){Module["canvas"].contentEditable=show_keyboard?true:false;if(show_keyboard){Module["canvas"].focus()}}function _glfwSwapBuffers(){var width=Module["canvas"].width;var height=Module["canvas"].height;if(GLFW.prevWidth!=width||GLFW.prevHeight!=height){if(GLFW.isFullscreen){width=Math.floor(window.innerWidth*GLFW.dpi);height=Math.floor(window.innerHeight*GLFW.dpi)}else{width=Math.floor(width*GLFW.dpi);height=Math.floor(height*GLFW.dpi)}GLFW.prevWidth=width;GLFW.prevHeight=height;_glfwSetWindowSize(width,height)}}function _glfwSwapInterval(interval){}function _glfwTerminate(){}function _mktime(tmPtr){_tzset();var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();return date.getTime()/1e3|0}function _pthread_create(){return 6}function _pthread_join(){return 28}var __sigalrm_handler=0;function _signal(sig,func){if(sig==14){__sigalrm_handler=func}else{}return 0}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _sysconf(name){switch(name){case 30:return 16384;case 85:var maxHeapSize=HEAPU8.length;return maxHeapSize/16384;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 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79: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:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}setErrNo(28);return-1}function _system(command){if(ENVIRONMENT_IS_NODE){if(!command)return 1;var cmdstr=UTF8ToString(command);if(!cmdstr.length)return 0;var cp=require("child_process");var ret=cp.spawnSync(cmdstr,[],{shell:true,stdio:"inherit"});var _W_EXITCODE=function(ret,sig){return ret<<8|sig};if(ret.status===null){var signalToNumber=function(sig){switch(sig){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2};return _W_EXITCODE(0,signalToNumber(ret.signal))}return _W_EXITCODE(ret.status,0)}if(!command)return 0;setErrNo(6);return-1}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i>2]=allocateUTF8OnStack(thisProgram);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=entryFunction(argc,argv);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="unwind"){noExitRuntime=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);quit_(1,e)}}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&noExitRuntime&&status===0){return}if(noExitRuntime){}else{EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status);ABORT=true}quit_(status,new ExitStatus(status))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;noExitRuntime=true;run(); diff --git a/docs/druid/druid_logo.png b/docs/druid/druid_logo.png index 6b5174b5..4f3c65cf 100644 Binary files a/docs/druid/druid_logo.png and b/docs/druid/druid_logo.png differ diff --git a/docs/druid/druid_wasm.js b/docs/druid/druid_wasm.js index 8d9c5170..fbc736cb 100644 --- a/docs/druid/druid_wasm.js +++ b/docs/druid/druid_wasm.js @@ -1 +1,10098 @@ -var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;return Math.ceil(size/factor)*factor}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={"string":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},"array":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string")return UTF8ToString(ret);if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeStringToMemory(string,buffer,dontAddNull){warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var lastChar,end;if(dontAddNull){end=buffer+lengthBytesUTF8(string);lastChar=HEAP8[end]}stringToUTF8(string,buffer,Infinity);if(dontAddNull)HEAP8[end]=lastChar}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||33554432;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":2147483648/65536})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=false;callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);throw e}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="dmengine.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmTable=Module["asm"]["bi"];removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}var tempDouble;var tempI64;var ASM_CONSTS={1314:function(){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){console.log("%c %c Made with Defold %c %c https://www.defold.com","background: #fd6623; padding:5px 0; border: 5px;","background: #272c31; color: #fafafa; padding:5px 0;","background: #39a3e4; padding:5px 0;","background: #ffffff; color: #000000; padding:5px 0;")}else{console.log("Made with Defold -=[ https://www.defold.com ]=-")}},125809:function($0){var jsResult;var isSuccess=1;try{jsResult=eval(UTF8ToString($0))}catch(err){isSuccess=0;jsResult=err}_dmScript_Html5ReportOperationSuccess(isSuccess);jsResult+="";var lengthBytes=lengthBytesUTF8(jsResult)+1;var stringOnWasmHeap=_malloc(lengthBytes);stringToUTF8(jsResult,stringOnWasmHeap,lengthBytes);return stringOnWasmHeap},126253:function(){document.removeEventListener("click",Module.__defold_interaction_listener);document.removeEventListener("keyup",Module.__defold_interaction_listener);document.removeEventListener("touchend",Module.__defold_interaction_listener);Module.__defold_interaction_listener=undefined},126567:function(){Module.__defold_interaction_listener=function(){_dmScript_RunInteractionCallback()};document.addEventListener("click",Module.__defold_interaction_listener);document.addEventListener("keyup",Module.__defold_interaction_listener);document.addEventListener("touchend",Module.__defold_interaction_listener)}};function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}function demangle(func){return func}function demangleAll(text){var regex=/\b_Z[\w\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+" ["+x+"]"})}function jsStackTrace(){var error=new Error;if(!error.stack){try{throw new Error}catch(e){error=e}if(!error.stack){return"(no stack trace available)"}}return error.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=function(){var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else if(typeof dateNow!=="undefined"){_emscripten_get_now=dateNow}else _emscripten_get_now=function(){return performance.now()};var _emscripten_get_now_is_monotonic=true;function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function ___clock_gettime(a0,a1){return _clock_gettime(a0,a1)}function _gmtime_r(time,tmPtr){var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();HEAP32[tmPtr+36>>2]=0;HEAP32[tmPtr+32>>2]=0;var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;if(!_gmtime_r.GMTString)_gmtime_r.GMTString=allocateUTF8("GMT");HEAP32[tmPtr+40>>2]=_gmtime_r.GMTString;return tmPtr}function ___gmtime_r(a0,a1){return _gmtime_r(a0,a1)}function _tzset(){if(_tzset.called)return;_tzset.called=true;var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAP32[__get_timezone()>>2]=stdTimezoneOffset*60;HEAP32[__get_daylight()>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAP32[__get_tzname()+4>>2]=summerNamePtr}else{HEAP32[__get_tzname()>>2]=summerNamePtr;HEAP32[__get_tzname()+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[__get_tzname()+(dst?4:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function ___localtime_r(a0,a1){return _localtime_r(a0,a1)}var PATH={splitPath:function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},extname:function(path){return PATH.splitPath(path)[3]},join:function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))},join2:function(l,r){return PATH.normalize(l+"/"+r)}};function getRandomDevice(){if(typeof crypto==="object"&&typeof crypto["getRandomValues"]==="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return function(){return crypto_module["randomBytes"](1)[0]}}catch(e){}}return function(){abort("randomDevice")}}var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},flush:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){var alignedSize=alignMemory(size,16384);var ptr=_malloc(alignedSize);while(size=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length8){throw new FS.ErrnoError(32)}var parts=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),false);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:function(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function(node){FS.hashRemoveNode(node)},isRoot:function(node){return node===node.parent},isMountpoint:function(node){return!!node.mounted},isFile:function(mode){return(mode&61440)===32768},isDir:function(mode){return(mode&61440)===16384},isLink:function(mode){return(mode&61440)===40960},isChrdev:function(mode){return(mode&61440)===8192},isBlkdev:function(mode){return(mode&61440)===24576},isFIFO:function(mode){return(mode&61440)===4096},isSocket:function(mode){return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return 2}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return 2}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return 2}return 0},mayLookup:function(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:function(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:function(fd){return FS.streams[fd]},createStream:function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){};FS.FSStream.prototype={object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}}}}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function(fd){FS.streams[fd]=null},chrdev_stream_ops:{open:function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:function(){throw new FS.ErrnoError(70)}},major:function(dev){return dev>>8},minor:function(dev){return dev&255},makedev:function(ma,mi){return ma<<8|mi},registerDevice:function(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function(dev){return FS.devices[dev]},getMounts:function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function(path,mode){var dirs=path.split("/");var d="";for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){FS.forceLoadFile(node);var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;HEAP32[buf+56>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+76>>2]=0;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+80>>2]=tempI64[0],HEAP32[buf+84>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},doMkdir:function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0},doMknod:function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}FS.mknod(path,mode,dev);return 0},doReadlink:function(path,buf,bufsize){if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len},doAccess:function(path,amode){if(amode&~7){return-28}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0},doDup:function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd},doReadv:function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream},get64:function(low,high){return low}};function ___sys__newselect(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_dup2(oldfd,suggestFD){try{var old=SYSCALLS.getStreamFromFD(oldfd);if(old.fd===suggestFD)return suggestFD;return SYSCALLS.doDup(old.path,old.flags,suggestFD)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_dup3(fd,suggestFD,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===suggestFD)return-28;return SYSCALLS.doDup(old.path,old.flags,suggestFD)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_mkdir(path,mode){try{path=SYSCALLS.getStr(path);return SYSCALLS.doMkdir(path,mode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_open(path,flags,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(path);var mode=varargs?SYSCALLS.get():0;var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_poll(fds,nfds,timeout){try{var nonzero=0;for(var i=0;i>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rename(old_path,new_path){try{old_path=SYSCALLS.getStr(old_path);new_path=SYSCALLS.getStr(new_path);FS.rename(old_path,new_path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var ERRNO_CODES={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(protocol){assert(streaming==(protocol==6))}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr==="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=ENVIRONMENT_IS_NODE?{"protocol":subProtocols.toString()}:subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EHOSTUNREACH)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!=="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data==="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}else{data=new Uint8Array(data)}}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,flags){if(!flags.binary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=ERRNO_CODES.ECONNREFUSED;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return ERRNO_CODES.EINVAL}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>>0}function jstoi_q(str){return parseInt(str)}function __inet_pton6_raw(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.indexOf("::")===0){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function __inet_ntop6_raw(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=__inet_ntop4_raw(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=__inet_ntop4_raw(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=__inet_ntop6_raw(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function __write_sockaddr(sa,family,addr,port,addrlen){switch(family){case 2:addr=__inet_pton4_raw(addr);if(addrlen){HEAP32[addrlen>>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons(port);break;case 10:addr=__inet_pton6_raw(addr);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons(port);HEAP32[sa+4>>2]=0;HEAP32[sa+24>>2]=0;break;default:return 5}return 0}function ___sys_socketcall(call,socketvararg){try{SYSCALLS.varargs=socketvararg;var getSocketFromFD=function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(8);return socket};var getSocketAddress=function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};switch(call){case 1:{var domain=SYSCALLS.get(),type=SYSCALLS.get(),protocol=SYSCALLS.get();var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}case 2:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.bind(sock,info.addr,info.port);return 0}case 3:{var sock=getSocketFromFD(),info=getSocketAddress();sock.sock_ops.connect(sock,info.addr,info.port);return 0}case 4:{var sock=getSocketFromFD(),backlog=SYSCALLS.get();sock.sock_ops.listen(sock,backlog);return 0}case 5:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var newsock=sock.sock_ops.accept(sock);if(addr){var errno=__write_sockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}case 6:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}case 7:{var sock=getSocketFromFD(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();if(!sock.daddr){return-53}var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}case 11:{var sock=getSocketFromFD(),message=SYSCALLS.get(),length=SYSCALLS.get(),flags=SYSCALLS.get(),dest=getSocketAddress(true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}else{return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}}case 12:{var sock=getSocketFromFD(),buf=SYSCALLS.get(),len=SYSCALLS.get(),flags=SYSCALLS.get(),addr=SYSCALLS.get(),addrlen=SYSCALLS.get();var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=__write_sockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}case 14:{return-50}case 15:{var sock=getSocketFromFD(),level=SYSCALLS.get(),optname=SYSCALLS.get(),optval=SYSCALLS.get(),optlen=SYSCALLS.get();if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}case 16:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var addr,port;var name=HEAP32[message>>2];var namelen=HEAP32[message+4>>2];if(name){var info=__read_sockaddr(name,namelen);if(info.errno)return-info.errno;port=info.port;addr=DNS.lookup_addr(info.addr)||info.addr}var total=0;for(var i=0;i>2]}var view=new Uint8Array(total);var offset=0;for(var i=0;i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];for(var j=0;j>0]}}return sock.sock_ops.sendmsg(sock,view,0,total,addr,port)}case 17:{var sock=getSocketFromFD(),message=SYSCALLS.get(),flags=SYSCALLS.get();var iov=HEAP32[message+8>>2];var num=HEAP32[message+12>>2];var total=0;for(var i=0;i>2]}var msg=sock.sock_ops.recvmsg(sock,total);if(!msg)return 0;var name=HEAP32[message>>2];if(name){var errno=__write_sockaddr(name,sock.family,DNS.lookup_name(msg.addr),msg.port)}var bytesRead=0;var bytesRemaining=msg.buffer.byteLength;for(var i=0;bytesRemaining>0&&i>2];var iovlen=HEAP32[iov+(8*i+4)>>2];if(!iovlen){continue}var length=Math.min(iovlen,bytesRemaining);var buf=msg.buffer.subarray(bytesRead,bytesRead+length);HEAPU8.set(buf,iovbase+bytesRead);bytesRead+=length;bytesRemaining-=length}return bytesRead}default:{return-52}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_uname(buf){try{if(!buf)return-21;var layout={"__size__":390,"domainname":325,"machine":260,"nodename":65,"release":130,"sysname":0,"version":195};var copyString=function(element,value){var offset=layout[element];writeAsciiToMemory(value,buf+offset)};copyString("sysname","Emscripten");copyString("nodename","emscripten");copyString("release","1.0");copyString("version","#1");copyString("machine","x86-JS");return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___sys_unlink(path){try{path=SYSCALLS.getStr(path);FS.unlink(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _abort(){abort()}function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof setImmediate==="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){if(Module["setImmediates"]===undefined)Module["setImmediates"]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){noExitRuntime=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(thisMainLoopId0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout(function(){finish(audio)},1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!=="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!=="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){callback()});Browser.init()}return ctx},destroyContext:function(canvas,useWebGL,setInModule){},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullscreen);if(Module["onFullscreen"])Module["onFullscreen"](Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(func){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)},safeCallback:function(func){return function(){if(!ABORT)return func.apply(null,arguments)}},allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=false},resumeAsyncCallbacks:function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach(function(func){func()})}},safeRequestAnimationFrame:function(func){return Browser.requestAnimationFrame(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}})},safeSetTimeout:function(func,timeout){noExitRuntime=true;return setTimeout(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}},timeout)},safeSetInterval:function(func,timeout){noExitRuntime=true;return setInterval(function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}},timeout)},getMimetype:function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)},getMovementX:function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}},asyncLoad:function(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)},resizeListeners:[],updateResizeListeners:function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){listener(canvas.width,canvas.height)})},setCanvasSize:function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h0?AL.freeIds.pop():AL._nextId++},freeIds:[],scheduleContextAudio:function(ctx){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}for(var i in ctx.sources){AL.scheduleSourceAudio(ctx.sources[i])}},scheduleSourceAudio:function(src,lookahead){if(Browser.mainLoop.timingMode===1&&document["visibilityState"]!="visible"){return}if(src.state!==4114){return}var currentTime=AL.updateSourceTime(src);var startTime=src.bufStartTime;var startOffset=src.bufOffset;var bufCursor=src.bufsProcessed;for(var i=0;i=src.bufQueue.length){if(src.looping){bufCursor%=src.bufQueue.length}else{break}}var buf=src.bufQueue[bufCursor%src.bufQueue.length];if(buf.length===0){skipCount++;if(skipCount===src.bufQueue.length){break}}else{var audioSrc=src.context.audioCtx.createBufferSource();audioSrc.buffer=buf.audioBuf;audioSrc.playbackRate.value=src.playbackRate;if(buf.audioBuf._loopStart||buf.audioBuf._loopEnd){audioSrc.loopStart=buf.audioBuf._loopStart;audioSrc.loopEnd=buf.audioBuf._loopEnd}var duration=0;if(src.type===4136&&src.looping){duration=Number.POSITIVE_INFINITY;audioSrc.loop=true;if(buf.audioBuf._loopStart){audioSrc.loopStart=buf.audioBuf._loopStart}if(buf.audioBuf._loopEnd){audioSrc.loopEnd=buf.audioBuf._loopEnd}}else{duration=(buf.audioBuf.duration-startOffset)/src.playbackRate}audioSrc._startOffset=startOffset;audioSrc._duration=duration;audioSrc._skipCount=skipCount;skipCount=0;audioSrc.connect(src.gain);if(typeof audioSrc.start!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.start(startTime,startOffset)}else if(typeof audioSrc.noteOn!=="undefined"){startTime=Math.max(startTime,src.context.audioCtx.currentTime);audioSrc.noteOn(startTime)}audioSrc._startTime=startTime;src.audioQueue.push(audioSrc);startTime+=duration}startOffset=0;bufCursor++}},updateSourceTime:function(src){var currentTime=src.context.audioCtx.currentTime;if(src.state!==4114){return currentTime}if(!isFinite(src.bufStartTime)){src.bufStartTime=currentTime-src.bufOffset/src.playbackRate;src.bufOffset=0}var nextStartTime=0;while(src.audioQueue.length){var audioSrc=src.audioQueue[0];src.bufsProcessed+=audioSrc._skipCount;nextStartTime=audioSrc._startTime+audioSrc._duration;if(currentTime=src.bufQueue.length&&!src.looping){AL.setSourceState(src,4116)}else if(src.type===4136&&src.looping){var buf=src.bufQueue[0];if(buf.length===0){src.bufOffset=0}else{var delta=(currentTime-src.bufStartTime)*src.playbackRate;var loopStart=buf.audioBuf._loopStart||0;var loopEnd=buf.audioBuf._loopEnd||buf.audioBuf.duration;if(loopEnd<=loopStart){loopEnd=buf.audioBuf.duration}if(delta0){src.bufStartTime+=Math.floor((currentTime-src.bufStartTime)/srcDuration)*srcDuration}}for(var i=0;i=src.bufQueue.length){if(src.looping){src.bufsProcessed%=src.bufQueue.length}else{AL.setSourceState(src,4116);break}}var buf=src.bufQueue[src.bufsProcessed];if(buf.length>0){nextStartTime=src.bufStartTime+buf.audioBuf.duration/src.playbackRate;if(currentTime1){src.audioQueue.length=1}},stopSourceAudio:function(src){for(var i=0;isrc.bufQueue[src.bufsProcessed].audioBuf.duration){offset-=src.bufQueue[src.bufsProcessed].audiobuf.duration;src.bufsProcessed++}src.bufOffset=offset}if(playing){AL.setSourceState(src,4114)}},getGlobalParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:AL.currentCtx.err=40962;return null}},setGlobalParam:function(funcname,param,value){if(!AL.currentCtx){return}switch(param){case 49152:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=value;AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(value)||value<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=value;AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=value;AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:function(funcname,param){if(!AL.currentCtx){return null}switch(param){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:AL.currentCtx.err=40962;return null}},setListenerParam:function(funcname,param,value){if(!AL.currentCtx){return}if(value===null){AL.currentCtx.err=40962;return}var listener=AL.currentCtx.listener;switch(param){case 4100:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.position[0]=value[0];listener.position[1]=value[1];listener.position[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])){AL.currentCtx.err=40963;return}listener.velocity[0]=value[0];listener.velocity[1]=value[1];listener.velocity[2]=value[2];AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=value;break;case 4111:if(!Number.isFinite(value[0])||!Number.isFinite(value[1])||!Number.isFinite(value[2])||!Number.isFinite(value[3])||!Number.isFinite(value[4])||!Number.isFinite(value[5])){AL.currentCtx.err=40963;return}listener.direction[0]=value[0];listener.direction[1]=value[1];listener.direction[2]=value[2];listener.up[0]=value[3];listener.up[1]=value[4];listener.up[2]=value[5];AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}},getBufferParam:function(funcname,bufferId,param){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}switch(param){case 8193:return buf.frequency;case 8194:return buf.bytesPerSample*8;case 8195:return buf.channels;case 8196:return buf.length*buf.bytesPerSample*buf.channels;case 8213:if(buf.length===0){return[0,0]}else{return[(buf.audioBuf._loopStart||0)*buf.frequency,(buf.audioBuf._loopEnd||buf.length)*buf.frequency]}default:AL.currentCtx.err=40962;return null}},setBufferParam:function(funcname,bufferId,param,value){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf||bufferId===0){AL.currentCtx.err=40961;return}if(value===null){AL.currentCtx.err=40962;return}switch(param){case 8196:if(value!==0){AL.currentCtx.err=40963;return}break;case 8213:if(value[0]<0||value[0]>buf.length||value[1]<0||value[1]>buf.Length||value[0]>=value[1]){AL.currentCtx.err=40963;return}if(buf.refCount>0){AL.currentCtx.err=40964;return}if(buf.audioBuf){buf.audioBuf._loopStart=value[0]/buf.frequency;buf.audioBuf._loopEnd=value[1]/buf.frequency}break;default:AL.currentCtx.err=40962;return}},getSourceParam:function(funcname,sourceId,param){if(!AL.currentCtx){return null}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return null}switch(param){case 514:return src.relative;case 4097:return src.coneInnerAngle;case 4098:return src.coneOuterAngle;case 4099:return src.pitch;case 4100:return src.position;case 4101:return src.direction;case 4102:return src.velocity;case 4103:return src.looping;case 4105:if(src.type===4136){return src.bufQueue[0].id}else{return 0}case 4106:return src.gain.gain.value;case 4109:return src.minGain;case 4110:return src.maxGain;case 4112:return src.state;case 4117:if(src.bufQueue.length===1&&src.bufQueue[0].id===0){return 0}else{return src.bufQueue.length}case 4118:if(src.bufQueue.length===1&&src.bufQueue[0].id===0||src.looping){return 0}else{return src.bufsProcessed}case 4128:return src.refDistance;case 4129:return src.rolloffFactor;case 4130:return src.coneOuterGain;case 4131:return src.maxDistance;case 4132:return AL.sourceTell(src);case 4133:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency}return offset;case 4134:var offset=AL.sourceTell(src);if(offset>0){offset*=src.bufQueue[0].frequency*src.bufQueue[0].bytesPerSample}return offset;case 4135:return src.type;case 4628:return src.spatialize;case 8201:var length=0;var bytesPerFrame=0;for(var i=0;i0){var audioSrc=src.audioQueue[0];audioSrc.loop=true;audioSrc._duration=Number.POSITIVE_INFINITY}}else if(value===0){src.looping=false;var currentTime=AL.updateSourceTime(src);if(src.type===4136&&src.audioQueue.length>0){var audioSrc=src.audioQueue[0];audioSrc.loop=false;audioSrc._duration=src.bufQueue[0].audioBuf.duration/src.playbackRate;audioSrc._startTime=currentTime-src.bufOffset/src.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(src.state===4114||src.state===4115){AL.currentCtx.err=40964;return}if(value===0){for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=1;src.bufQueue[0]=AL.buffers[0];src.bufsProcessed=0;src.type=4144}else{var buf=AL.buffers[value];if(!buf){AL.currentCtx.err=40963;return}for(var i in src.bufQueue){src.bufQueue[i].refCount--}src.bufQueue.length=0;buf.refCount++;src.bufQueue=[buf];src.bufsProcessed=0;src.type=4136}AL.initSourcePanner(src);AL.scheduleSourceAudio(src);break;case 4106:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.gain.gain.value=value;break;case 4109:if(!Number.isFinite(value)||value<0||value>Math.min(src.maxGain,1)){AL.currentCtx.err=40963;return}src.minGain=value;break;case 4110:if(!Number.isFinite(value)||value1){AL.currentCtx.err=40963;return}src.maxGain=value;break;case 4128:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.refDistance=value;if(src.panner){src.panner.refDistance=value}break;case 4129:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.rolloffFactor=value;if(src.panner){src.panner.rolloffFactor=value}break;case 4130:if(!Number.isFinite(value)||value<0||value>1){AL.currentCtx.err=40963;return}src.coneOuterGain=value;if(src.panner){src.panner.coneOuterGain=value}break;case 4131:if(!Number.isFinite(value)||value<0){AL.currentCtx.err=40963;return}src.maxDistance=value;if(src.panner){src.panner.maxDistance=value}break;case 4132:if(value<0||value>AL.sourceDuration(src)){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4133:var srcLen=AL.sourceDuration(src);if(srcLen>0){var frequency;for(var bufId in src.bufQueue){if(bufId){frequency=src.bufQueue[bufId].frequency;break}}value/=frequency}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4134:var srcLen=AL.sourceDuration(src);if(srcLen>0){var bytesPerSec;for(var bufId in src.bufQueue){if(bufId){var buf=src.bufQueue[bufId];bytesPerSec=buf.frequency*buf.bytesPerSample*buf.channels;break}}value/=bytesPerSec}if(value<0||value>srcLen){AL.currentCtx.err=40963;return}AL.sourceSeek(src,value);break;case 4628:if(value!==0&&value!==1&&value!==2){AL.currentCtx.err=40963;return}src.spatialize=value;AL.initSourcePanner(src);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(value){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:src.distanceModel=value;if(AL.currentCtx.sourceDistanceModel){AL.updateContextGlobal(AL.currentCtx)}break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:function(deviceId,funcname){if(deviceId===0){AL.alcErr=40961;return null}var c=AL.captures[deviceId];if(!c){AL.alcErr=40961;return null}var err=c.mediaStreamError;if(err){AL.alcErr=40961;return null}return c}};function _alBufferData(bufferId,format,pData,size,freq){if(!AL.currentCtx){return}var buf=AL.buffers[bufferId];if(!buf){AL.currentCtx.err=40963;return}if(freq<=0){AL.currentCtx.err=40963;return}var audioBuf=null;try{switch(format){case 4352:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size,freq);var channel0=audioBuf.getChannelData(0);for(var i=0;i0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>1,freq);var channel0=audioBuf.getChannelData(0);pData>>=1;for(var i=0;i>1;++i){channel0[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=1;buf.length=size>>1;break;case 4354:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>1,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);for(var i=0;i>1;++i){channel0[i]=HEAPU8[pData++]*.0078125-1;channel1[i]=HEAPU8[pData++]*.0078125-1}}buf.bytesPerSample=1;buf.channels=2;buf.length=size>>1;break;case 4355:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>2,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=1;for(var i=0;i>2;++i){channel0[i]=HEAP16[pData++]*30517578125e-15;channel1[i]=HEAP16[pData++]*30517578125e-15}}buf.bytesPerSample=2;buf.channels=2;buf.length=size>>2;break;case 65552:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(1,size>>2,freq);var channel0=audioBuf.getChannelData(0);pData>>=2;for(var i=0;i>2;++i){channel0[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=1;buf.length=size>>2;break;case 65553:if(size>0){audioBuf=AL.currentCtx.audioCtx.createBuffer(2,size>>3,freq);var channel0=audioBuf.getChannelData(0);var channel1=audioBuf.getChannelData(1);pData>>=2;for(var i=0;i>3;++i){channel0[i]=HEAPF32[pData++];channel1[i]=HEAPF32[pData++]}}buf.bytesPerSample=4;buf.channels=2;buf.length=size>>3;break;default:AL.currentCtx.err=40963;return}buf.frequency=freq;buf.audioBuf=audioBuf}catch(e){AL.currentCtx.err=40963;return}}function _alDeleteBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(bufId===0){continue}if(!AL.buffers[bufId]){AL.currentCtx.err=40961;return}if(AL.buffers[bufId].refCount){AL.currentCtx.err=40964;return}}for(var i=0;i>2];if(bufId===0){continue}AL.deviceRefCounts[AL.buffers[bufId].deviceId]--;delete AL.buffers[bufId];AL.freeIds.push(bufId)}}function _alSourcei(sourceId,param,value){switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",sourceId,param,value);break;default:AL.setSourceParam("alSourcei",sourceId,param,null);break}}function _alDeleteSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2];if(!AL.currentCtx.sources[srcId]){AL.currentCtx.err=40961;return}}for(var i=0;i>2];AL.setSourceState(AL.currentCtx.sources[srcId],4116);_alSourcei(srcId,4105,0);delete AL.currentCtx.sources[srcId];AL.freeIds.push(srcId)}}function _alGenBuffers(count,pBufferIds){if(!AL.currentCtx){return}for(var i=0;i>2]=buf.id}}function _alGenSources(count,pSourceIds){if(!AL.currentCtx){return}for(var i=0;i>2]=src.id}}function _alGetError(){if(!AL.currentCtx){return 40964}else{var err=AL.currentCtx.err;AL.currentCtx.err=0;return err}}function _alGetSourcei(sourceId,param,pValue){var val=AL.getSourceParam("alGetSourcei",sourceId,param);if(val===null){return}if(!pValue){AL.currentCtx.err=40963;return}switch(param){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[pValue>>2]=val;break;default:AL.currentCtx.err=40962;return}}function _alGetString(param){if(!AL.currentCtx){return 0}if(AL.stringCache[param]){return AL.stringCache[param]}var ret;switch(param){case 0:ret="No Error";break;case 40961:ret="Invalid Name";break;case 40962:ret="Invalid Enum";break;case 40963:ret="Invalid Value";break;case 40964:ret="Invalid Operation";break;case 40965:ret="Out of Memory";break;case 45057:ret="Emscripten";break;case 45058:ret="1.1";break;case 45059:ret="WebAudio";break;case 45060:ret="";for(var ext in AL.AL_EXTENSIONS){ret=ret.concat(ext);ret=ret.concat(" ")}ret=ret.trim();break;default:AL.currentCtx.err=40962;return 0}ret=allocate(intArrayFromString(ret),ALLOC_NORMAL);AL.stringCache[param]=ret;return ret}function _alSourcePlay(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4114)}function _alSourceQueueBuffers(sourceId,count,pBufferIds){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}if(src.type===4136){AL.currentCtx.err=40964;return}if(count===0){return}var templateBuf=AL.buffers[0];for(var i=0;i>2];var buf=AL.buffers[bufId];if(!buf){AL.currentCtx.err=40961;return}if(templateBuf.id!==0&&(buf.frequency!==templateBuf.frequency||buf.bytesPerSample!==templateBuf.bytesPerSample||buf.channels!==templateBuf.channels)){AL.currentCtx.err=40964}}if(src.bufQueue.length===1&&src.bufQueue[0].id===0){src.bufQueue.length=0}src.type=4137;for(var i=0;i>2];var buf=AL.buffers[bufId];buf.refCount++;src.bufQueue.push(buf)}if(src.looping){AL.cancelPendingSourceAudio(src)}AL.initSourcePanner(src);AL.scheduleSourceAudio(src)}function _alSourceStop(sourceId){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}AL.setSourceState(src,4116)}function _alSourceUnqueueBuffers(sourceId,count,pBufferIds){if(!AL.currentCtx){return}var src=AL.currentCtx.sources[sourceId];if(!src){AL.currentCtx.err=40961;return}if(count>(src.bufQueue.length===1&&src.bufQueue[0].id===0?0:src.bufsProcessed)){AL.currentCtx.err=40963;return}if(count===0){return}for(var i=0;i>2]=buf.id;src.bufsProcessed--}if(src.bufQueue.length===0){src.bufQueue.push(AL.buffers[0])}AL.initSourcePanner(src);AL.scheduleSourceAudio(src)}function _alcCloseDevice(deviceId){if(!(deviceId in AL.deviceRefCounts)||AL.deviceRefCounts[deviceId]>0){return 0}delete AL.deviceRefCounts[deviceId];AL.freeIds.push(deviceId);return 1}function listenOnce(object,event,func){object.addEventListener(event,func,{"once":true})}function autoResumeAudioContext(ctx,elements){if(!elements){elements=[document,document.getElementById("canvas")]}["keydown","mousedown","touchstart"].forEach(function(event){elements.forEach(function(element){if(element){listenOnce(element,event,function(){if(ctx.state==="suspended")ctx.resume()})}})})}function _alcCreateContext(deviceId,pAttrList){if(!(deviceId in AL.deviceRefCounts)){AL.alcErr=40961;return 0}var options=null;var attrs=[];var hrtf=null;pAttrList>>=2;if(pAttrList){var attr=0;var val=0;while(true){attr=HEAP32[pAttrList++];attrs.push(attr);if(attr===0){break}val=HEAP32[pAttrList++];attrs.push(val);switch(attr){case 4103:if(!options){options={}}options.sampleRate=val;break;case 4112:case 4113:break;case 6546:switch(val){case 0:hrtf=false;break;case 1:hrtf=true;break;case 2:break;default:AL.alcErr=40964;return 0}break;case 6550:if(val!==0){AL.alcErr=40964;return 0}break;default:AL.alcErr=40964;return 0}}}var AudioContext=window.AudioContext||window.webkitAudioContext;var ac=null;try{if(options){ac=new AudioContext(options)}else{ac=new AudioContext}}catch(e){if(e.name==="NotSupportedError"){AL.alcErr=40964}else{AL.alcErr=40961}return 0}autoResumeAudioContext(ac);if(typeof ac.createGain==="undefined"){ac.createGain=ac.createGainNode}var gain=ac.createGain();gain.connect(ac.destination);var ctx={deviceId:deviceId,id:AL.newId(),attrs:attrs,audioCtx:ac,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(function(){AL.scheduleContextAudio(ctx)},AL.QUEUE_INTERVAL),gain:gain,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:false,hrtf:hrtf||false,_err:0,get err(){return this._err},set err(val){if(this._err===0||val===0){this._err=val}}};AL.deviceRefCounts[deviceId]++;AL.contexts[ctx.id]=ctx;if(hrtf!==null){for(var ctxId in AL.contexts){var c=AL.contexts[ctxId];if(c.deviceId===deviceId){c.hrtf=hrtf;AL.updateContextGlobal(c)}}}return ctx.id}function _alcDestroyContext(contextId){var ctx=AL.contexts[contextId];if(AL.currentCtx===ctx){AL.alcErr=40962;return}if(AL.contexts[contextId].interval){clearInterval(AL.contexts[contextId].interval)}AL.deviceRefCounts[ctx.deviceId]--;delete AL.contexts[contextId];AL.freeIds.push(contextId)}function _alcGetCurrentContext(){if(AL.currentCtx!==null){return AL.currentCtx.id}else{return 0}}function _alcMakeContextCurrent(contextId){if(contextId===0){AL.currentCtx=null;return 0}else{AL.currentCtx=AL.contexts[contextId];return 1}}function _alcOpenDevice(pDeviceName){if(pDeviceName){var name=UTF8ToString(pDeviceName);if(name!==AL.DEVICE_NAME){return 0}}if(typeof AudioContext!=="undefined"||typeof webkitAudioContext!=="undefined"){var deviceId=AL.newId();AL.deviceRefCounts[deviceId]=0;return deviceId}else{return 0}}function _alcProcessContext(contextId){}function _clock(){if(_clock.start===undefined)_clock.start=Date.now();return(Date.now()-_clock.start)*(1e6/1e3)|0}function _difftime(time1,time0){return time1-time0}function _dmScriptHttpRequestAsync(method,url,headers,arg,onload,onerror,send_data,send_data_length,timeout){var xhr=new XMLHttpRequest;function listener(){var resp_headers=xhr.getAllResponseHeaders();resp_headers=resp_headers.replace(new RegExp("\r","g"),"");resp_headers+="\n";if(xhr.status!=0){var ab=new Uint8Array(xhr.response);var b=allocate(ab,ALLOC_NORMAL);var resp_headers_buffer=allocate(intArrayFromString(resp_headers),ALLOC_NORMAL);wasmTable.get(onload)(arg,xhr.status,b,ab.length,resp_headers_buffer);_free(b)}else{wasmTable.get(onerror)(arg,xhr.status)}}xhr.onload=listener;xhr.onerror=listener;xhr.ontimeout=listener;xhr.open(UTF8ToString(method),UTF8ToString(url),true);xhr.responseType="arraybuffer";if(timeout>0){xhr.timeout=timeout/1e3}var headersArray=UTF8ToString(headers).split("\n");for(var i=0;i0){xhr.send(HEAPU8.subarray(send_data,send_data+send_data_length))}else{xhr.send()}}var DMSYS={_folder:"/data",_cstr:null,GetUserPersistentDataRoot:function(){if(typeof window!=="undefined")return DMSYS._folder;else return""},PumpMessageQueue:function(){if(typeof window==="undefined"){var uvrun=require("uvrun");uvrun.runOnce()}}};function _dmSysGetApplicationPath(){var path=location.href.substring(0,location.href.lastIndexOf("/"));var lengthBytes=lengthBytesUTF8(path)+1;var buffer=_malloc(lengthBytes);Module.stringToUTF8(path,buffer,lengthBytes);return buffer}function _dmSysGetUserAgent(){var useragent=navigator.userAgent;var buffer=_malloc(useragent.length+1);Module.stringToUTF8(useragent,buffer,useragent.length+1);return buffer}function _dmSysGetUserPersistentDataRoot(){if(null==DMSYS._cstr){var str=DMSYS.GetUserPersistentDataRoot();DMSYS._cstr=_malloc(str.length+1);Module.stringToUTF8(str,DMSYS._cstr,str.length+1)}return DMSYS._cstr}function _dmSysGetUserPreferredLanguage(defaultlang){var jsdefault=UTF8ToString(defaultlang);var preferred=navigator==undefined?jsdefault:navigator.languages?navigator.languages[0]||jsdefault:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||jsdefault;var buffer=_malloc(preferred.length+1);Module.stringToUTF8(preferred,buffer,preferred.length+1);return buffer}var JSEvents={inEventHandler:0,removeAllEventListeners:function(){for(var i=JSEvents.eventHandlers.length-1;i>=0;--i){JSEvents._removeHandler(i)}JSEvents.eventHandlers=[];JSEvents.deferredCalls=[]},registerRemoveEventListeners:function(){if(!JSEvents.removeEventListenersRegistered){__ATEXIT__.push(JSEvents.removeAllEventListeners);JSEvents.removeEventListenersRegistered=true}},deferredCalls:[],deferCall:function(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}for(var i in JSEvents.deferredCalls){var call=JSEvents.deferredCalls[i];if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence>2]:-1;source+=UTF8ToString(HEAP32[string+i*4>>2],len<0?undefined:len)}return source},createContext:function(canvas,webGLContextAttributes){var ctx=webGLContextAttributes.majorVersion>1?canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;if(typeof webGLContextAttributes.enableExtensionsByDefault==="undefined"||webGLContextAttributes.enableExtensionsByDefault){GL.initExtensions(context)}return handle},makeContextCurrent:function(contextHandle){GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=GL.currentContext&&GL.currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function(contextHandle){return GL.contexts[contextHandle]},deleteContext:function(contextHandle){if(GL.currentContext===GL.contexts[contextHandle])GL.currentContext=null;if(typeof JSEvents==="object")JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas)GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined;GL.contexts[contextHandle]=null},initExtensions:function(context){if(!context)context=GL.currentContext;if(context.initExtensionsDone)return;context.initExtensionsDone=true;var GLctx=context.GLctx;__webgl_enable_ANGLE_instanced_arrays(GLctx);__webgl_enable_OES_vertex_array_object(GLctx);__webgl_enable_WEBGL_draw_buffers(GLctx);__webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);__webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);GLctx.disjointTimerQueryExt=GLctx.getExtension("EXT_disjoint_timer_query");__webgl_enable_WEBGL_multi_draw(GLctx);var exts=GLctx.getSupportedExtensions()||[];exts.forEach(function(ext){if(ext.indexOf("lose_context")<0&&ext.indexOf("debug")<0){GLctx.getExtension(ext)}})},populateUniformTable:function(program){var p=GL.programs[program];var ptable=GL.programInfos[program]={uniforms:{},maxUniformLength:0,maxAttributeLength:-1,maxUniformBlockNameLength:-1};var utable=ptable.uniforms;var numUniforms=GLctx.getProgramParameter(p,35718);for(var i=0;i=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _emscripten_glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _emscripten_glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _emscripten_glClear(x0){GLctx["clear"](x0)}function _emscripten_glClearBufferfi(x0,x1,x2,x3){GLctx["clearBufferfi"](x0,x1,x2,x3)}function _emscripten_glClearBufferfv(buffer,drawbuffer,value){GLctx["clearBufferfv"](buffer,drawbuffer,HEAPF32,value>>2)}function _emscripten_glClearBufferiv(buffer,drawbuffer,value){GLctx["clearBufferiv"](buffer,drawbuffer,HEAP32,value>>2)}function _emscripten_glClearBufferuiv(buffer,drawbuffer,value){GLctx["clearBufferuiv"](buffer,drawbuffer,HEAPU32,value>>2)}function _emscripten_glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _emscripten_glClearDepthf(x0){GLctx["clearDepth"](x0)}function _emscripten_glClearStencil(x0){GLctx["clearStencil"](x0)}function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296}function _emscripten_glClientWaitSync(sync,flags,timeoutLo,timeoutHi){return GLctx.clientWaitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _emscripten_glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _emscripten_glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _emscripten_glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}function _emscripten_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _emscripten_glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _emscripten_glCopyBufferSubData(x0,x1,x2,x3,x4){GLctx["copyBufferSubData"](x0,x1,x2,x3,x4)}function _emscripten_glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){GLctx["copyTexSubImage2D"](x0,x1,x2,x3,x4,x5,x6,x7)}function _emscripten_glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){GLctx["copyTexSubImage3D"](x0,x1,x2,x3,x4,x5,x6,x7,x8)}function _emscripten_glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _emscripten_glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _emscripten_glCullFace(x0){GLctx["cullFace"](x0)}function _emscripten_glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _emscripten_glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _emscripten_glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _emscripten_glDeleteQueries(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx["deleteQuery"](query);GL.queries[id]=null}}function _emscripten_glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.timerQueriesEXT[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.timerQueriesEXT[id]=null}}function _emscripten_glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _emscripten_glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx["deleteSampler"](sampler);sampler.name=0;GL.samplers[id]=null}}function _emscripten_glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _emscripten_glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null}function _emscripten_glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _emscripten_glDeleteTransformFeedbacks(n,ids){for(var i=0;i>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx["deleteTransformFeedback"](transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}}function _emscripten_glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDeleteVertexArraysOES(n,vaos){for(var i=0;i>2];GLctx["deleteVertexArray"](GL.vaos[id]);GL.vaos[id]=null}}function _emscripten_glDepthFunc(x0){GLctx["depthFunc"](x0)}function _emscripten_glDepthMask(flag){GLctx.depthMask(!!flag)}function _emscripten_glDepthRangef(x0,x1){GLctx["depthRange"](x0,x1)}function _emscripten_glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])}function _emscripten_glDisable(x0){GLctx["disable"](x0)}function _emscripten_glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _emscripten_glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _emscripten_glDrawArraysInstanced(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedANGLE(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedARB(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedEXT(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}function _emscripten_glDrawArraysInstancedNV(mode,first,count,primcount){GLctx["drawArraysInstanced"](mode,first,count,primcount)}var tempFixedLengthArray=[];function _emscripten_glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersEXT(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawBuffersWEBGL(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _emscripten_glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedANGLE(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedARB(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedEXT(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _emscripten_glDrawElementsInstancedNV(mode,count,type,indices,primcount){GLctx["drawElementsInstanced"](mode,count,type,indices,primcount)}function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)}function _emscripten_glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)}function _emscripten_glEnable(x0){GLctx["enable"](x0)}function _emscripten_glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _emscripten_glEndQuery(x0){GLctx["endQuery"](x0)}function _emscripten_glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)}function _emscripten_glEndTransformFeedback(){GLctx["endTransformFeedback"]()}function _emscripten_glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}else{return 0}}function _emscripten_glFinish(){GLctx["finish"]()}function _emscripten_glFlush(){GLctx["flush"]()}function _emscripten_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _emscripten_glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _emscripten_glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)}function _emscripten_glFrontFace(x0){GLctx["frontFace"](x0)}function __glGenObject(n,buffers,createFunction,objectTable){for(var i=0;i>2]=id}}function _emscripten_glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _emscripten_glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _emscripten_glGenQueries(n,ids){__glGenObject(n,ids,"createQuery",GL.queries)}function _emscripten_glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.timerQueriesEXT);query.name=id;GL.timerQueriesEXT[id]=query;HEAP32[ids+i*4>>2]=id}}function _emscripten_glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _emscripten_glGenSamplers(n,samplers){__glGenObject(n,samplers,"createSampler",GL.samplers)}function _emscripten_glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _emscripten_glGenTransformFeedbacks(n,ids){__glGenObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)}function _emscripten_glGenVertexArrays(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenVertexArraysOES(n,arrays){__glGenObject(n,arrays,"createVertexArray",GL.vaos)}function _emscripten_glGenerateMipmap(x0){GLctx["generateMipmap"](x0)}function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}}function _emscripten_glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _emscripten_glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}}function _emscripten_glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];switch(pname){case 35393:var name=GLctx["getActiveUniformBlockName"](program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return;default:var result=GLctx["getActiveUniformBlockParameter"](program,uniformBlockIndex,pname);if(!result)return;if(typeof result=="number"){HEAP32[params>>2]=result}else{for(var i=0;i>2]=result[i]}}}}function _emscripten_glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i>2])}var result=GLctx["getActiveUniforms"](program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}}function _emscripten_glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;HEAPU32[ptr+4>>2]=(num-HEAPU32[ptr>>2])/4294967296}function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}var exts=GLctx.getSupportedExtensions()||[];ret=2*exts.length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(typeof result){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i>>0]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Unknown object returned from WebGL getParameter("+name_+")! (error: "+e+")");return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet"+type+"v: Native code calling glGet"+type+"v("+name_+") and it returns "+result+" of type "+typeof result+"!");return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p>>0]=ret?1:0;break}}function _emscripten_glGetBooleanv(name_,p){emscriptenWebGLGet(name_,p,4)}function _emscripten_glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}writeI53ToI64(data,GLctx.getBufferParameter(target,value))}function _emscripten_glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)}function _emscripten_glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _emscripten_glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _emscripten_glGetFragDataLocation(program,name){return GLctx["getFragDataLocation"](GL.programs[program],UTF8ToString(name))}function _emscripten_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result}function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx["getIndexedParameter"](target,index);var ret;switch(typeof result){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:writeI53ToI64(data,ret);break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data>>0]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}}function _emscripten_glGetInteger64i_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,1)}function _emscripten_glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)}function _emscripten_glGetIntegeri_v(target,index,data){emscriptenWebGLGetIndexed(target,index,data,0)}function _emscripten_glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _emscripten_glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx["getInternalformatParameter"](target,internalformat,pname);if(ret===null)return;for(var i=0;i>2]=ret[i]}}function _emscripten_glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)}function _emscripten_glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _emscripten_glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectui64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)}function _emscripten_glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx["getQueryParameter"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryObjectuivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.timerQueriesEXT[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret}function _emscripten_glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx["getQuery"](target,pname)}function _emscripten_glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)}function _emscripten_glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)}function _emscripten_glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAPF32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}sampler=GL.samplers[sampler];HEAP32[params>>2]=GLctx["getSamplerParameter"](sampler,pname)}function _emscripten_glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision}function _emscripten_glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _emscripten_glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function stringToNewUTF8(jsString){var length=lengthBytesUTF8(jsString)+1;var cString=_malloc(length);stringToUTF8(jsString,cString,length);return cString}function _emscripten_glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _emscripten_glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));exts=exts.map(function(e){return stringToNewUTF8(e)});stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}}function _emscripten_glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);HEAP32[length>>2]=ret;if(ret!==null&&length)HEAP32[length>>2]=1}function _emscripten_glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)}function _emscripten_glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx["getTransformFeedbackVarying"](program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}function _emscripten_glGetUniformBlockIndex(program,uniformBlockName){return GLctx["getUniformBlockIndex"](GL.programs[program],UTF8ToString(uniformBlockName))}function _emscripten_glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i>2]));var result=GLctx["getUniformIndices"](program,names);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}}function _emscripten_glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}}function _emscripten_glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)}function _emscripten_glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function _emscripten_glGetUniformuiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)}function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}}function _emscripten_glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribIuiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)}function _emscripten_glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)}function _emscripten_glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)}function _emscripten_glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)}function _emscripten_glHint(x0,x1){GLctx["hint"](x0,x1)}function _emscripten_glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateFramebuffer"](target,list)}function _emscripten_glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx["invalidateSubFramebuffer"](target,list,x,y,width,height)}function _emscripten_glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)}function _emscripten_glIsEnabled(x0){return GLctx["isEnabled"](x0)}function _emscripten_glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)}function _emscripten_glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)}function _emscripten_glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx["isQuery"](query)}function _emscripten_glIsQueryEXT(id){var query=GL.timerQueriesEXT[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)}function _emscripten_glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)}function _emscripten_glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx["isSampler"](sampler)}function _emscripten_glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)}function _emscripten_glIsSync(sync){return GLctx.isSync(GL.syncs[sync])}function _emscripten_glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)}function _emscripten_glIsTransformFeedback(id){return GLctx["isTransformFeedback"](GL.transformFeedbacks[id])}function _emscripten_glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glIsVertexArrayOES(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx["isVertexArray"](vao)}function _emscripten_glLineWidth(x0){GLctx["lineWidth"](x0)}function _emscripten_glLinkProgram(program){GLctx.linkProgram(GL.programs[program]);GL.populateUniformTable(program)}function _emscripten_glPauseTransformFeedback(){GLctx["pauseTransformFeedback"]()}function _emscripten_glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}GLctx.pixelStorei(pname,param)}function _emscripten_glPolygonOffset(x0,x1){GLctx["polygonOffset"](x0,x1)}function _emscripten_glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)}function _emscripten_glProgramParameteri(program,pname,value){GL.recordError(1280)}function _emscripten_glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.timerQueriesEXT[id],target)}function _emscripten_glReadBuffer(x0){GLctx["readBuffer"](x0)}function computeUnpackAlignedImageSize(width,height,sizePerPixel,alignment){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=width*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,alignment);return height*alignedRowSize}function __colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1}function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16}function heapAccessShiftForWebGLHeap(heap){return 31-Math.clz32(heap.BYTES_PER_ELEMENT)}function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var shift=heapAccessShiftForWebGLHeap(heap);var byteSize=1<>shift,pixels+bytes>>shift)}function _emscripten_glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _emscripten_glReleaseShaderCompiler(){}function _emscripten_glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _emscripten_glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){GLctx["renderbufferStorageMultisample"](x0,x1,x2,x3,x4)}function _emscripten_glResumeTransformFeedback(){GLctx["resumeTransformFeedback"]()}function _emscripten_glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)}function _emscripten_glSamplerParameterf(sampler,pname,param){GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx["samplerParameterf"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteri(sampler,pname,param){GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx["samplerParameteri"](GL.samplers[sampler],pname,param)}function _emscripten_glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _emscripten_glShaderBinary(){GL.recordError(1280)}function _emscripten_glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _emscripten_glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _emscripten_glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _emscripten_glStencilMask(x0){GLctx["stencilMask"](x0)}function _emscripten_glStencilMaskSeparate(x0,x1){GLctx["stencilMaskSeparate"](x0,x1)}function _emscripten_glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _emscripten_glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _emscripten_glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _emscripten_glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _emscripten_glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _emscripten_glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)}function _emscripten_glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _emscripten_glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)}function _emscripten_glTexStorage2D(x0,x1,x2,x3,x4){GLctx["texStorage2D"](x0,x1,x2,x3,x4)}function _emscripten_glTexStorage3D(x0,x1,x2,x3,x4,x5){GLctx["texStorage3D"](x0,x1,x2,x3,x4,x5)}function _emscripten_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _emscripten_glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _emscripten_glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx["transformFeedbackVaryings"](program,vars,bufferMode)}function _emscripten_glUniform1f(location,v0){GLctx.uniform1f(GL.uniforms[location],v0)}var miniTempWebGLFloatBuffers=[];function _emscripten_glUniform1fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1fv(GL.uniforms[location],HEAPF32,value>>2,count);return}if(count<=288){var view=miniTempWebGLFloatBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(GL.uniforms[location],view)}function _emscripten_glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}var __miniTempWebGLIntBuffers=[];function _emscripten_glUniform1iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform1iv(GL.uniforms[location],HEAP32,value>>2,count);return}if(count<=288){var view=__miniTempWebGLIntBuffers[count-1];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(GL.uniforms[location],view)}function _emscripten_glUniform1ui(location,v0){GLctx.uniform1ui(GL.uniforms[location],v0)}function _emscripten_glUniform1uiv(location,count,value){GLctx.uniform1uiv(GL.uniforms[location],HEAPU32,value>>2,count)}function _emscripten_glUniform2f(location,v0,v1){GLctx.uniform2f(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2fv(GL.uniforms[location],HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(GL.uniforms[location],view)}function _emscripten_glUniform2i(location,v0,v1){GLctx.uniform2i(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform2iv(GL.uniforms[location],HEAP32,value>>2,count*2);return}if(count<=144){var view=__miniTempWebGLIntBuffers[2*count-1];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(GL.uniforms[location],view)}function _emscripten_glUniform2ui(location,v0,v1){GLctx.uniform2ui(GL.uniforms[location],v0,v1)}function _emscripten_glUniform2uiv(location,count,value){GLctx.uniform2uiv(GL.uniforms[location],HEAPU32,value>>2,count*2)}function _emscripten_glUniform3f(location,v0,v1,v2){GLctx.uniform3f(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3fv(GL.uniforms[location],HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(GL.uniforms[location],view)}function _emscripten_glUniform3i(location,v0,v1,v2){GLctx.uniform3i(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform3iv(GL.uniforms[location],HEAP32,value>>2,count*3);return}if(count<=96){var view=__miniTempWebGLIntBuffers[3*count-1];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(GL.uniforms[location],view)}function _emscripten_glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(GL.uniforms[location],v0,v1,v2)}function _emscripten_glUniform3uiv(location,count,value){GLctx.uniform3uiv(GL.uniforms[location],HEAPU32,value>>2,count*3)}function _emscripten_glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _emscripten_glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4iv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4iv(GL.uniforms[location],HEAP32,value>>2,count*4);return}if(count<=72){var view=__miniTempWebGLIntBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(GL.uniforms[location],view)}function _emscripten_glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(GL.uniforms[location],v0,v1,v2,v3)}function _emscripten_glUniform4uiv(location,count,value){GLctx.uniform4uiv(GL.uniforms[location],HEAPU32,value>>2,count*4)}function _emscripten_glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx["uniformBlockBinding"](program,uniformBlockIndex,uniformBlockBinding)}function _emscripten_glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix2x3fv(location,count,transpose,value){GLctx.uniformMatrix2x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix2x4fv(location,count,transpose,value){GLctx.uniformMatrix2x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count-1];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix3x2fv(location,count,transpose,value){GLctx.uniformMatrix3x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*6)}function _emscripten_glUniformMatrix3x4fv(location,count,transpose,value){GLctx.uniformMatrix3x4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _emscripten_glUniformMatrix4x2fv(location,count,transpose,value){GLctx.uniformMatrix4x2fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*8)}function _emscripten_glUniformMatrix4x3fv(location,count,transpose,value){GLctx.uniformMatrix4x3fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*12)}function _emscripten_glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _emscripten_glValidateProgram(program){GLctx.validateProgram(GL.programs[program])}function _emscripten_glVertexAttrib1f(x0,x1){GLctx["vertexAttrib1f"](x0,x1)}function _emscripten_glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])}function _emscripten_glVertexAttrib2f(x0,x1,x2){GLctx["vertexAttrib2f"](x0,x1,x2)}function _emscripten_glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])}function _emscripten_glVertexAttrib3f(x0,x1,x2,x3){GLctx["vertexAttrib3f"](x0,x1,x2,x3)}function _emscripten_glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])}function _emscripten_glVertexAttrib4f(x0,x1,x2,x3,x4){GLctx["vertexAttrib4f"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])}function _emscripten_glVertexAttribDivisor(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorANGLE(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorARB(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorEXT(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribDivisorNV(index,divisor){GLctx["vertexAttribDivisor"](index,divisor)}function _emscripten_glVertexAttribI4i(x0,x1,x2,x3,x4){GLctx["vertexAttribI4i"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])}function _emscripten_glVertexAttribI4ui(x0,x1,x2,x3,x4){GLctx["vertexAttribI4ui"](x0,x1,x2,x3,x4)}function _emscripten_glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])}function _emscripten_glVertexAttribIPointer(index,size,type,stride,ptr){GLctx["vertexAttribIPointer"](index,size,type,stride,ptr)}function _emscripten_glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _emscripten_glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}function _emscripten_glWaitSync(sync,flags,timeoutLo,timeoutHi){GLctx.waitSync(GL.syncs[sync],flags,convertI32PairToI53(timeoutLo,timeoutHi))}function _longjmp(env,value){_setThrew(env,value||1);throw"longjmp"}function _emscripten_longjmp(a0,a1){return _longjmp(a0,a1)}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_pause_main_loop(){Browser.mainLoop.pause()}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){requestedSize=requestedSize>>>0;var oldSize=_emscripten_get_heap_size();var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}var minHeapSize=16777216;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(minHeapSize,requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function _emscripten_set_main_loop_arg(func,arg,fps,simulateInfiniteLoop){var browserIterationFunc=function(){wasmTable.get(func)(arg)};setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)}function _emscripten_thread_sleep(msecs){var start=_emscripten_get_now();while(_emscripten_get_now()-start>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _exit(status){exit(status)}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_read(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var stream=SYSCALLS.getStreamFromFD(fd);var HIGH_OFFSET=4294967296;var offset=offset_high*HIGH_OFFSET+(offset_low>>>0);var DOUBLE_LIMIT=9007199254740992;if(offset<=-DOUBLE_LIMIT||offset>=DOUBLE_LIMIT){return-61}FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doWritev(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return e.errno}}var GAI_ERRNO_MESSAGES={};function _gai_strerror(val){var buflen=256;if(!_gai_strerror.buffer){_gai_strerror.buffer=_malloc(buflen);GAI_ERRNO_MESSAGES["0"]="Success";GAI_ERRNO_MESSAGES[""+-1]="Invalid value for 'ai_flags' field";GAI_ERRNO_MESSAGES[""+-2]="NAME or SERVICE is unknown";GAI_ERRNO_MESSAGES[""+-3]="Temporary failure in name resolution";GAI_ERRNO_MESSAGES[""+-4]="Non-recoverable failure in name res";GAI_ERRNO_MESSAGES[""+-6]="'ai_family' not supported";GAI_ERRNO_MESSAGES[""+-7]="'ai_socktype' not supported";GAI_ERRNO_MESSAGES[""+-8]="SERVICE not supported for 'ai_socktype'";GAI_ERRNO_MESSAGES[""+-10]="Memory allocation failure";GAI_ERRNO_MESSAGES[""+-11]="System error returned in 'errno'";GAI_ERRNO_MESSAGES[""+-12]="Argument buffer overflow"}var msg="Unknown error";if(val in GAI_ERRNO_MESSAGES){if(GAI_ERRNO_MESSAGES[val].length>buflen-1){msg="Message too long"}else{msg=GAI_ERRNO_MESSAGES[val]}}writeAsciiToMemory(msg,_gai_strerror.buffer);return _gai_strerror.buffer}function _getTempRet0(){return getTempRet0()|0}function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?__inet_ntop6_raw(addr):__inet_ntop4_raw(addr);sa=_malloc(salen);errno=__write_sockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAP32[ai+24>>2]=canon;HEAP32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=__inet_pton4_raw(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl(65535),addr];family=10}else{return-2}}else{addr=__inet_pton6_raw(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAP32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=__inet_pton4_raw(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAP32[out>>2]=ai;return 0}function getHostByName(name){var ret=_malloc(20);var nameBuf=_malloc(name.length+1);stringToUTF8(name,nameBuf,name.length+1);HEAP32[ret>>2]=nameBuf;var aliasesBuf=_malloc(4);HEAP32[aliasesBuf>>2]=0;HEAP32[ret+4>>2]=aliasesBuf;var afinet=2;HEAP32[ret+8>>2]=afinet;HEAP32[ret+12>>2]=4;var addrListBuf=_malloc(12);HEAP32[addrListBuf>>2]=addrListBuf+8;HEAP32[addrListBuf+4>>2]=0;HEAP32[addrListBuf+8>>2]=__inet_pton4_raw(DNS.lookup_name(name));HEAP32[ret+16>>2]=addrListBuf;return ret}function _gethostbyaddr(addr,addrlen,type){if(type!==2){setErrNo(5);return null}addr=HEAP32[addr>>2];var host=__inet_ntop4_raw(addr);var lookup=DNS.lookup_addr(host);if(lookup){host=lookup}return getHostByName(host)}function _gethostbyname(name){return getHostByName(UTF8ToString(name))}function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=__read_sockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0}function _gettimeofday(ptr){var now=Date.now();HEAP32[ptr>>2]=now/1e3|0;HEAP32[ptr+4>>2]=now%1e3*1e3|0;return 0}function _glActiveTexture(x0){GLctx["activeTexture"](x0)}function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])}function _glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])}function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])}function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])}function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])}function _glBlendFunc(x0,x1){GLctx["blendFunc"](x0,x1)}function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}}else{GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)}}function _glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))}function _glCheckFramebufferStatus(x0){return GLctx["checkFramebufferStatus"](x0)}function _glClear(x0){GLctx["clear"](x0)}function _glClearColor(x0,x1,x2,x3){GLctx["clearColor"](x0,x1,x2,x3)}function _glClearDepthf(x0){GLctx["clearDepth"](x0)}function _glClearStencil(x0){GLctx["clearStencil"](x0)}function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)}function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])}function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,imageSize,data)}else{GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,HEAPU8,data,imageSize)}return}GLctx["compressedTexImage2D"](target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx["compressedTexImage3D"](target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}}function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,imageSize,data)}else{GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize)}return}GLctx["compressedTexSubImage2D"](target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)}function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx["compressedTexSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}}function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;GL.programs[id]=program;return id}function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id}function _glCullFace(x0){GLctx["cullFace"](x0)}function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}}function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}}function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null;GL.programInfos[id]=null}function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}}function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null}function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}}function _glDepthFunc(x0){GLctx["depthFunc"](x0)}function _glDepthMask(flag){GLctx.depthMask(!!flag)}function _glDisable(x0){GLctx["disable"](x0)}function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)}function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)}function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx["drawBuffers"](bufArray)}function _glEnable(x0){GLctx["enable"](x0)}function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)}function _glFlush(){GLctx["flush"]()}function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])}function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)}function _glFrontFace(x0){GLctx["frontFace"](x0)}function _glGenBuffers(n,buffers){__glGenObject(n,buffers,"createBuffer",GL.buffers)}function _glGenFramebuffers(n,ids){__glGenObject(n,ids,"createFramebuffer",GL.framebuffers)}function _glGenRenderbuffers(n,renderbuffers){__glGenObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)}function _glGenTextures(n,textures){__glGenObject(n,textures,"createTexture",GL.textures)}function _glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)}function _glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)}function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))}function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error}function _glGetFloatv(name_,p){emscriptenWebGLGet(name_,p,2)}function _glGetIntegerv(name_,p){emscriptenWebGLGet(name_,p,0)}function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}var ptable=GL.programInfos[program];if(!ptable){GL.recordError(1282);return}if(pname==35716){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){HEAP32[p>>2]=ptable.maxUniformLength}else if(pname==35722){if(ptable.maxAttributeLength==-1){program=GL.programs[program];var numAttribs=GLctx.getProgramParameter(program,35721);ptable.maxAttributeLength=0;for(var i=0;i>2]=ptable.maxAttributeLength}else if(pname==35381){if(ptable.maxUniformBlockNameLength==-1){program=GL.programs[program];var numBlocks=GLctx.getProgramParameter(program,35382);ptable.maxUniformBlockNameLength=0;for(var i=0;i>2]=ptable.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(GL.programs[program],pname)}}function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull}function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}}function _glGetString(name_){if(GL.stringCache[name_])return GL.stringCache[name_];var ret;switch(name_){case 7939:var exts=GLctx.getSupportedExtensions()||[];exts=exts.concat(exts.map(function(e){return"GL_"+e}));ret=stringToNewUTF8(exts.join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=stringToNewUTF8(s);break;case 7938:var glVersion=GLctx.getParameter(7938);if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 ("+glVersion+")";else{glVersion="OpenGL ES 2.0 ("+glVersion+")"}ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES "+ver_num[1]+" ("+glslVersion+")"}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280);return 0}GL.stringCache[name_]=ret;return ret}function _glGetUniformLocation(program,name){name=UTF8ToString(name);var arrayIndex=0;if(name[name.length-1]=="]"){var leftBrace=name.lastIndexOf("[");arrayIndex=name[leftBrace+1]!="]"?jstoi_q(name.slice(leftBrace+1)):0;name=name.slice(0,leftBrace)}var uniformInfo=GL.programInfos[program]&&GL.programInfos[program].uniforms[name];if(uniformInfo&&arrayIndex>=0&&arrayIndex=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels)}else{var heap=heapObjectForWebGLType(type);GLctx.readPixels(x,y,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)}function _glRenderbufferStorage(x0,x1,x2,x3){GLctx["renderbufferStorage"](x0,x1,x2,x3)}function _glScissor(x0,x1,x2,x3){GLctx["scissor"](x0,x1,x2,x3)}function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)}function _glStencilFunc(x0,x1,x2){GLctx["stencilFunc"](x0,x1,x2)}function _glStencilFuncSeparate(x0,x1,x2,x3){GLctx["stencilFuncSeparate"](x0,x1,x2,x3)}function _glStencilMask(x0){GLctx["stencilMask"](x0)}function _glStencilOp(x0,x1,x2){GLctx["stencilOp"](x0,x1,x2)}function _glStencilOpSeparate(x0,x1,x2,x3){GLctx["stencilOpSeparate"](x0,x1,x2,x3)}function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,null)}return}GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null)}function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texImage3D"](target,level,internalFormat,width,height,depth,border,format,type,null)}}function _glTexParameterf(x0,x1,x2){GLctx["texParameterf"](x0,x1,x2)}function _glTexParameteri(x0,x1,x2){GLctx["texParameteri"](x0,x1,x2)}function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,null)}return}var pixelData=null;if(pixels)pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)}function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,pixels>>heapAccessShiftForWebGLHeap(heap))}else{GLctx["texSubImage3D"](target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}}function _glUniform1i(location,v0){GLctx.uniform1i(GL.uniforms[location],v0)}function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){GLctx.uniform4fv(GL.uniforms[location],HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(GL.uniforms[location],view)}function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count-1];var heap=HEAPF32;value>>=2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(GL.uniforms[location],!!transpose,view)}function _glUseProgram(program){GLctx.useProgram(GL.programs[program])}function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)}function _glViewport(x0,x1,x2,x3){GLctx["viewport"](x0,x1,x2,x3)}var GLFW={keyFunc:null,charFunc:null,markedTextFunc:null,gamepadFunc:null,mouseButtonFunc:null,mousePosFunc:null,mouseWheelFunc:null,resizeFunc:null,closeFunc:null,refreshFunc:null,focusFunc:null,iconifyFunc:null,touchFunc:null,params:null,initTime:null,wheelPos:0,buttons:0,keys:0,initWindowWidth:640,initWindowHeight:480,windowX:0,windowY:0,windowWidth:0,windowHeight:0,prevWidth:0,prevHeight:0,prevNonFSWidth:0,prevNonFSHeight:0,isFullscreen:false,isPointerLocked:false,dpi:1,mouseTouchId:null,DOMToGLFWKeyCode:function(keycode,code){switch(keycode){case 8:return 295;case 9:return 293;case 13:return 294;case 27:return 257;case 106:return 313;case 107:return 315;case 109:return 314;case 110:return 316;case 111:return 312;case 112:return 258;case 113:return 259;case 114:return 260;case 115:return 261;case 116:return 262;case 117:return 263;case 118:return 264;case 119:return 265;case 120:return 266;case 121:return 267;case 122:return 268;case 123:return 269;case 37:return 285;case 38:return 283;case 39:return 286;case 40:return 284;case 33:return 298;case 34:return 299;case 36:return 300;case 35:return 301;case 45:return 296;case 16:return 287;case 5:return 287;case 6:return 288;case 17:return 289;case 3:return 289;case 4:return 290;case 18:return 291;case 2:return 291;case 1:return 292;case 96:return 302;case 97:return 303;case 98:return 304;case 99:return 305;case 100:return 306;case 101:return 307;case 102:return 308;case 103:return 309;case 104:return 310;case 105:return 311}switch(code){case"Minus":return 45;case"Period":return 46;case"Comma":return 44;case"Slash":return 47;case"Backslash":return 92;case"IntlRo":return 92;case"IntlYen":return 92;case"IntlBackslash":return 92;case"Backquote":return 96;case"BracketLeft":return 91;case"BracketRight":return 93;case"Equal":return 61;case"Quote":return 39;case"Semicolon":return 59;case"NumpadComma":return 316}return keycode},DOMtoGLFWButton:function(button){if(button==1){button=2}else if(button==2){button=1}return button},getUnicodeChar:function(value){var output="";if(value>65535){value-=65536;output+=String.fromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=String.fromCharCode(value);return output},addEventListener:function(type,listener,useCapture){if(typeof window!=="undefined"){window.addEventListener(type,listener,useCapture)}},removeEventListener:function(type,listener,useCapture){if(typeof window!=="undefined"){window.removeEventListener(type,listener,useCapture)}},addEventListenerCanvas:function(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].addEventListener(type,listener,useCapture)}},removeEventListenerCanvas:function(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].removeEventListener(type,listener,useCapture)}},isCanvasActive:function(event){var res=typeof document.activeElement=="undefined"||document.activeElement==Module["canvas"];if(!res){res=event.target==Module["canvas"]}if(event.target.focus)event.target.focus();return res},onKeyPress:function(event){if(!GLFW.isCanvasActive(event)){return}if(event.charCode){var char=GLFW.getUnicodeChar(event.charCode);if(char!==null&&GLFW.charFunc){wasmTable.get(GLFW.charFunc)(event.charCode,1)}}},onKeyChanged:function(event,status){if(!GLFW.isCanvasActive(event)){return}var key=GLFW.DOMToGLFWKeyCode(event.keyCode,event.code);if(key){GLFW.keys[key]=status;if(GLFW.keyFunc){wasmTable.get(GLFW.keyFunc)(key,status)}}},onKeydown:function(event){if(!GLFW.isCanvasActive(event)){return}switch(event.keyCode){case 37:case 38:case 39:case 40:case 32:event.preventDefault();event.stopPropagation();default:break}GLFW.onKeyChanged(event,1);if(event.keyCode===32){if(GLFW.charFunc){wasmTable.get(GLFW.charFunc)(32,1);event.preventDefault()}}else if(event.keyCode===8||event.keyCode===9||event.keyCode===13){event.preventDefault()}},onKeyup:function(event){if(!GLFW.isCanvasActive(event)){return}GLFW.onKeyChanged(event,0)},onMousemove:function(event){var lastX=Browser.mouseX;var lastY=Browser.mouseY;Browser.calculateMouseEvent(event);var newX=Browser.mouseX;var newY=Browser.mouseY;if(event.target==Module["canvas"]&&GLFW.mousePosFunc){event.preventDefault();wasmTable.get(GLFW.mousePosFunc)(lastX,lastY)}},onMouseButtonChanged:function(event,status){if(!GLFW.isCanvasActive(event)){return}if(GLFW.mouseButtonFunc==null){return}Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"]){return}if(status==1){try{event.target.setCapture()}catch(e){}}event.preventDefault();var eventButton=GLFW.DOMtoGLFWButton(event["button"]);wasmTable.get(GLFW.mouseButtonFunc)(eventButton,status)},fillTouch:function(id,x,y,phase){if(GLFW.touchFunc){wasmTable.get(GLFW.touchFunc)(id,x,y,phase)}},touchWasFinished:function(event,phase){if(!GLFW.isCanvasActive(event)){return}for(var i=0;i0}function _glfwGetMouseLocked(){return GLFW.isPointerLocked?1:0}function _glfwGetMousePos(xpos,ypos){setValue(xpos,Browser.mouseX,"i32");setValue(ypos,Browser.mouseY,"i32")}function _glfwGetMouseWheel(){return GLFW.wheelPos}function _glfwGetProcAddress(procname){return _getProcAddress(procname)}function _glfwGetWindowParam(param){return GLFW.params[param]}function _glfwGetWindowRefreshRate(){return 0}function _glfwGetWindowSize(width,height){setValue(width,Module["canvas"].width,"i32");setValue(height,Module["canvas"].height,"i32")}function _glfwIconifyWindow(){}function _glfwInitJS(){GLFW.initTime=Date.now()/1e3;GLFW.addEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.addEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.addEventListener("keydown",GLFW.onKeydown,true);GLFW.addEventListener("keypress",GLFW.onKeyPress,true);GLFW.addEventListener("keyup",GLFW.onKeyup,true);GLFW.addEventListener("mousemove",GLFW.onMousemove,true);GLFW.addEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.addEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.addEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.addEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.addEventListenerCanvas("touchcancel",GLFW.onTouchCancel,true);GLFW.addEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.addEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.addEventListenerCanvas("blur",GLFW.onBlur,true);__ATEXIT__.push({func:function(){GLFW.removeEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.removeEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.removeEventListener("keydown",GLFW.onKeydown,true);GLFW.removeEventListener("keypress",GLFW.onKeyPress,true);GLFW.removeEventListener("keyup",GLFW.onKeyup,true);GLFW.removeEventListener("mousemove",GLFW.onMousemove,true);GLFW.removeEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.removeEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.removeEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.removeEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchcancel",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.removeEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.removeEventListenerCanvas("blur",GLFW.onBlur,true);var canvas=Module["canvas"];if(typeof canvas!=="undefined"){Module["canvas"].width=Module["canvas"].height=1}}});GLFW.params=new Array;GLFW.params[196609]=true;GLFW.params[196610]=false;GLFW.params[196611]=true;GLFW.params[196612]=false;GLFW.params[196613]=false;GLFW.params[196614]=true;GLFW.params[131073]=true;GLFW.params[131074]=true;GLFW.params[131075]=false;GLFW.params[131076]=true;GLFW.params[131077]=0;GLFW.params[131078]=0;GLFW.params[131079]=0;GLFW.params[131080]=0;GLFW.params[131081]=0;GLFW.params[131082]=0;GLFW.params[131083]=0;GLFW.params[131084]=0;GLFW.params[131085]=0;GLFW.params[131086]=0;GLFW.params[131087]=0;GLFW.params[131088]=0;GLFW.params[131089]=0;GLFW.params[131090]=0;GLFW.params[131091]=0;GLFW.params[131092]=0;GLFW.params[131093]=0;GLFW.params[131094]=0;GLFW.params[131095]=0;GLFW.params[131096]=0;GLFW.params[327681]=0;GLFW.params[327682]=1;GLFW.params[327683]=2;GLFW.params[131097]=0;GLFW.keys=new Array;GLFW.GLFW_PHASE_BEGAN=0;GLFW.GLFW_PHASE_MOVED=1;GLFW.GLFW_PHASE_ENDED=3;GLFW.GLFW_PHASE_CANCELLED=4;return 1}function _glfwOpenWindow(width,height,redbits,greenbits,bluebits,alphabits,depthbits,stencilbits,mode){if(width==0&&height>0){width=4*height/3}if(width>0&&height==0){height=3*width/4}GLFW.params[131077]=redbits;GLFW.params[131078]=greenbits;GLFW.params[131079]=bluebits;GLFW.params[131080]=alphabits;GLFW.params[131081]=depthbits;GLFW.params[131082]=stencilbits;if(mode==65537){GLFW.initWindowWidth=width;GLFW.initWindowHeight=height;GLFW.params[196611]=true}else if(mode==65538){GLFW.requestFullScreen();GLFW.params[196611]=false}else{throw"Invalid glfwOpenWindow mode."}var contextAttributes={antialias:GLFW.params[131091]>1,depth:GLFW.params[131081]>0,stencil:GLFW.params[131082]>0};var iOSVersion=false;try{iOSVersion=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||false}catch(e){}if(iOSVersion&&iOSVersion<15.2){contextAttributes.majorVersion=1}Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes);if(Module.ctx==null){contextAttributes.majorVersion=1;Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}return 1}function _glfwOpenWindowHint(target,hint){GLFW.params[target]=hint;if(target==131097){if(hint!=0){GLFW.dpi=window.devicePixelRatio||1}}}function _glfwPollEvents(){}function _glfwResetKeyboard(){}function _glfwSetCharCallback(cbfun){GLFW.charFunc=cbfun;return 1}function _glfwSetDeviceChangedCallback(cbfun){return 1}function _glfwSetGamepadCallback(cbfun){GLFW.gamepadFunc=cbfun;GLFW.refreshJoysticks();return 1}function _glfwSetMarkedTextCallback(cbfun){GLFW.markedTextFunc=cbfun;return 1}function _glfwSetTouchCallback(cbfun){GLFW.touchFunc=cbfun;return 1}function _glfwSetWindowBackgroundColor(){}function _glfwSetWindowCloseCallback(cbfun){GLFW.closeFunc=cbfun}function _glfwSetWindowFocusCallback(cbfun){GLFW.focusFunc=cbfun}function _glfwSetWindowIconifyCallback(cbfun){GLFW.iconifyFunc=cbfun}function _glfwSetWindowSize(width,height){Browser.setCanvasSize(width,height);if(GLFW.resizeFunc){wasmTable.get(GLFW.resizeFunc)(width,height)}}function _glfwSetWindowSizeCallback(cbfun){GLFW.resizeFunc=cbfun}function _glfwShowKeyboard(show_keyboard){Module["canvas"].contentEditable=show_keyboard?true:false;if(show_keyboard){Module["canvas"].focus()}}function _glfwSwapBuffers(){var width=Module["canvas"].width;var height=Module["canvas"].height;if(GLFW.prevWidth!=width||GLFW.prevHeight!=height){if(GLFW.isFullscreen){width=Math.floor(window.innerWidth*GLFW.dpi);height=Math.floor(window.innerHeight*GLFW.dpi)}else{width=Math.floor(width*GLFW.dpi);height=Math.floor(height*GLFW.dpi)}GLFW.prevWidth=width;GLFW.prevHeight=height;_glfwSetWindowSize(width,height)}}function _glfwSwapInterval(interval){}function _glfwTerminate(){}function _mktime(tmPtr){_tzset();var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();return date.getTime()/1e3|0}function _pthread_create(){return 6}function _pthread_join(){return 28}function _setTempRet0($i){setTempRet0($i|0)}var __sigalrm_handler=0;function _signal(sig,func){if(sig==14){__sigalrm_handler=func}else{}return 0}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":function(date){return WEEKDAYS[date.tm_wday].substring(0,3)},"%A":function(date){return WEEKDAYS[date.tm_wday]},"%b":function(date){return MONTHS[date.tm_mon].substring(0,3)},"%B":function(date){return MONTHS[date.tm_mon]},"%C":function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)},"%d":function(date){return leadingNulls(date.tm_mday,2)},"%e":function(date){return leadingSomething(date.tm_mday,2," ")},"%g":function(date){return getWeekBasedYear(date).toString().substring(2)},"%G":function(date){return getWeekBasedYear(date)},"%H":function(date){return leadingNulls(date.tm_hour,2)},"%I":function(date){var twelveHour=date.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2)},"%j":function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)},"%m":function(date){return leadingNulls(date.tm_mon+1,2)},"%M":function(date){return leadingNulls(date.tm_min,2)},"%n":function(){return"\n"},"%p":function(date){if(date.tm_hour>=0&&date.tm_hour<12){return"AM"}else{return"PM"}},"%S":function(date){return leadingNulls(date.tm_sec,2)},"%t":function(){return"\t"},"%u":function(date){return date.tm_wday||7},"%U":function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"},"%V":function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)},"%Z":function(date){return date.tm_zone},"%%":function(){return"%"}};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _sysconf(name){switch(name){case 30:return 16384;case 85:var maxHeapSize=2147483648;return maxHeapSize/16384;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 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79: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:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}setErrNo(28);return-1}function _system(command){if(ENVIRONMENT_IS_NODE){if(!command)return 1;var cmdstr=UTF8ToString(command);if(!cmdstr.length)return 0;var cp=require("child_process");var ret=cp.spawnSync(cmdstr,[],{shell:true,stdio:"inherit"});var _W_EXITCODE=function(ret,sig){return ret<<8|sig};if(ret.status===null){var signalToNumber=function(sig){switch(sig){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2};return _W_EXITCODE(0,signalToNumber(ret.signal))}return _W_EXITCODE(ret.status,0)}if(!command)return 0;setErrNo(6);return-1}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr,buf){readAsmConstArgsArray.length=0;var ch;buf>>=2;while(ch=HEAPU8[sigPtr++]){var double=ch<105;if(double&&buf&1)buf++;readAsmConstArgsArray.push(double?HEAPF64[buf++>>1]:HEAP32[buf]);++buf}return readAsmConstArgsArray}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();Module["requestFullscreen"]=function Module_requestFullscreen(lockPointer,resizeCanvas){Browser.requestFullscreen(lockPointer,resizeCanvas)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};var GLctx;for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));var miniTempWebGLFloatBuffersStorage=new Float32Array(288);for(var i=0;i<288;++i){miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1)}var __miniTempWebGLIntBuffersStorage=new Int32Array(288);for(var i=0;i<288;++i){__miniTempWebGLIntBuffers[i]=__miniTempWebGLIntBuffersStorage.subarray(0,i+1)}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}__ATINIT__.push({func:function(){___wasm_call_ctors()}});var asmLibraryArg={"b":___assert_fail,"ai":___clock_gettime,"$h":___gmtime_r,"_h":___localtime_r,"Yh":___sys__newselect,"Ph":___sys_dup2,"Uh":___sys_dup3,"j":___sys_fcntl64,"Qh":___sys_ioctl,"Vh":___sys_lstat64,"Sh":___sys_mkdir,"ga":___sys_open,"Xh":___sys_poll,"Th":___sys_rename,"Rh":___sys_rmdir,"k":___sys_socketcall,"Wh":___sys_stat64,"Zh":___sys_uname,"ha":___sys_unlink,"W":_abort,"Mh":_alBufferData,"Lh":_alDeleteBuffers,"Kh":_alDeleteSources,"Jh":_alGenBuffers,"Ih":_alGenSources,"p":_alGetError,"I":_alGetSourcei,"o":_alGetString,"Hh":_alSourcePlay,"Gh":_alSourceQueueBuffers,"Fh":_alSourceStop,"Ba":_alSourceUnqueueBuffers,"ea":_alcCloseDevice,"Eh":_alcCreateContext,"Aa":_alcDestroyContext,"Dh":_alcGetCurrentContext,"E":_alcMakeContextCurrent,"Ch":_alcOpenDevice,"Bh":_alcProcessContext,"Ah":_clock,"zh":_difftime,"yh":_dmScriptHttpRequestAsync,"xh":_dmSysGetApplicationPath,"wh":_dmSysGetUserAgent,"vh":_dmSysGetUserPersistentDataRoot,"uh":_dmSysGetUserPreferredLanguage,"th":_dmSysOpenURL,"V":_emscripten_asm_const_int,"sh":_emscripten_cancel_main_loop,"rh":_emscripten_glActiveTexture,"qh":_emscripten_glAttachShader,"ph":_emscripten_glBeginQuery,"oh":_emscripten_glBeginQueryEXT,"nh":_emscripten_glBeginTransformFeedback,"mh":_emscripten_glBindAttribLocation,"lh":_emscripten_glBindBuffer,"kh":_emscripten_glBindBufferBase,"jh":_emscripten_glBindBufferRange,"ih":_emscripten_glBindFramebuffer,"hh":_emscripten_glBindRenderbuffer,"gh":_emscripten_glBindSampler,"fh":_emscripten_glBindTexture,"eh":_emscripten_glBindTransformFeedback,"dh":_emscripten_glBindVertexArray,"ch":_emscripten_glBindVertexArrayOES,"bh":_emscripten_glBlendColor,"ah":_emscripten_glBlendEquation,"$g":_emscripten_glBlendEquationSeparate,"_g":_emscripten_glBlendFunc,"Zg":_emscripten_glBlendFuncSeparate,"Yg":_emscripten_glBlitFramebuffer,"Xg":_emscripten_glBufferData,"Wg":_emscripten_glBufferSubData,"Vg":_emscripten_glCheckFramebufferStatus,"Ug":_emscripten_glClear,"Tg":_emscripten_glClearBufferfi,"Sg":_emscripten_glClearBufferfv,"Rg":_emscripten_glClearBufferiv,"Qg":_emscripten_glClearBufferuiv,"Pg":_emscripten_glClearColor,"Og":_emscripten_glClearDepthf,"Ng":_emscripten_glClearStencil,"Mg":_emscripten_glClientWaitSync,"Lg":_emscripten_glColorMask,"Kg":_emscripten_glCompileShader,"Jg":_emscripten_glCompressedTexImage2D,"Ig":_emscripten_glCompressedTexImage3D,"Hg":_emscripten_glCompressedTexSubImage2D,"Gg":_emscripten_glCompressedTexSubImage3D,"Fg":_emscripten_glCopyBufferSubData,"Eg":_emscripten_glCopyTexImage2D,"Dg":_emscripten_glCopyTexSubImage2D,"Cg":_emscripten_glCopyTexSubImage3D,"Bg":_emscripten_glCreateProgram,"Ag":_emscripten_glCreateShader,"zg":_emscripten_glCullFace,"yg":_emscripten_glDeleteBuffers,"xg":_emscripten_glDeleteFramebuffers,"wg":_emscripten_glDeleteProgram,"vg":_emscripten_glDeleteQueries,"ug":_emscripten_glDeleteQueriesEXT,"tg":_emscripten_glDeleteRenderbuffers,"sg":_emscripten_glDeleteSamplers,"rg":_emscripten_glDeleteShader,"qg":_emscripten_glDeleteSync,"pg":_emscripten_glDeleteTextures,"og":_emscripten_glDeleteTransformFeedbacks,"ng":_emscripten_glDeleteVertexArrays,"mg":_emscripten_glDeleteVertexArraysOES,"lg":_emscripten_glDepthFunc,"kg":_emscripten_glDepthMask,"jg":_emscripten_glDepthRangef,"ig":_emscripten_glDetachShader,"hg":_emscripten_glDisable,"gg":_emscripten_glDisableVertexAttribArray,"fg":_emscripten_glDrawArrays,"eg":_emscripten_glDrawArraysInstanced,"dg":_emscripten_glDrawArraysInstancedANGLE,"cg":_emscripten_glDrawArraysInstancedARB,"bg":_emscripten_glDrawArraysInstancedEXT,"ag":_emscripten_glDrawArraysInstancedNV,"$f":_emscripten_glDrawBuffers,"_f":_emscripten_glDrawBuffersEXT,"Zf":_emscripten_glDrawBuffersWEBGL,"Yf":_emscripten_glDrawElements,"Xf":_emscripten_glDrawElementsInstanced,"Wf":_emscripten_glDrawElementsInstancedANGLE,"Vf":_emscripten_glDrawElementsInstancedARB,"Uf":_emscripten_glDrawElementsInstancedEXT,"Tf":_emscripten_glDrawElementsInstancedNV,"Sf":_emscripten_glDrawRangeElements,"Rf":_emscripten_glEnable,"Qf":_emscripten_glEnableVertexAttribArray,"Pf":_emscripten_glEndQuery,"Of":_emscripten_glEndQueryEXT,"Nf":_emscripten_glEndTransformFeedback,"Mf":_emscripten_glFenceSync,"Lf":_emscripten_glFinish,"Kf":_emscripten_glFlush,"Jf":_emscripten_glFramebufferRenderbuffer,"If":_emscripten_glFramebufferTexture2D,"Hf":_emscripten_glFramebufferTextureLayer,"Gf":_emscripten_glFrontFace,"Ff":_emscripten_glGenBuffers,"Ef":_emscripten_glGenFramebuffers,"Df":_emscripten_glGenQueries,"Cf":_emscripten_glGenQueriesEXT,"Bf":_emscripten_glGenRenderbuffers,"Af":_emscripten_glGenSamplers,"zf":_emscripten_glGenTextures,"yf":_emscripten_glGenTransformFeedbacks,"xf":_emscripten_glGenVertexArrays,"wf":_emscripten_glGenVertexArraysOES,"vf":_emscripten_glGenerateMipmap,"uf":_emscripten_glGetActiveAttrib,"tf":_emscripten_glGetActiveUniform,"sf":_emscripten_glGetActiveUniformBlockName,"rf":_emscripten_glGetActiveUniformBlockiv,"qf":_emscripten_glGetActiveUniformsiv,"pf":_emscripten_glGetAttachedShaders,"of":_emscripten_glGetAttribLocation,"nf":_emscripten_glGetBooleanv,"mf":_emscripten_glGetBufferParameteri64v,"lf":_emscripten_glGetBufferParameteriv,"kf":_emscripten_glGetError,"jf":_emscripten_glGetFloatv,"hf":_emscripten_glGetFragDataLocation,"gf":_emscripten_glGetFramebufferAttachmentParameteriv,"ff":_emscripten_glGetInteger64i_v,"ef":_emscripten_glGetInteger64v,"df":_emscripten_glGetIntegeri_v,"cf":_emscripten_glGetIntegerv,"bf":_emscripten_glGetInternalformativ,"af":_emscripten_glGetProgramBinary,"$e":_emscripten_glGetProgramInfoLog,"_e":_emscripten_glGetProgramiv,"Ze":_emscripten_glGetQueryObjecti64vEXT,"Ye":_emscripten_glGetQueryObjectivEXT,"Xe":_emscripten_glGetQueryObjectui64vEXT,"We":_emscripten_glGetQueryObjectuiv,"Ve":_emscripten_glGetQueryObjectuivEXT,"Ue":_emscripten_glGetQueryiv,"Te":_emscripten_glGetQueryivEXT,"Se":_emscripten_glGetRenderbufferParameteriv,"Re":_emscripten_glGetSamplerParameterfv,"Qe":_emscripten_glGetSamplerParameteriv,"Pe":_emscripten_glGetShaderInfoLog,"Oe":_emscripten_glGetShaderPrecisionFormat,"Ne":_emscripten_glGetShaderSource,"Me":_emscripten_glGetShaderiv,"Le":_emscripten_glGetString,"Ke":_emscripten_glGetStringi,"Je":_emscripten_glGetSynciv,"Ie":_emscripten_glGetTexParameterfv,"He":_emscripten_glGetTexParameteriv,"Ge":_emscripten_glGetTransformFeedbackVarying,"Fe":_emscripten_glGetUniformBlockIndex,"Ee":_emscripten_glGetUniformIndices,"De":_emscripten_glGetUniformLocation,"Ce":_emscripten_glGetUniformfv,"Be":_emscripten_glGetUniformiv,"Ae":_emscripten_glGetUniformuiv,"ze":_emscripten_glGetVertexAttribIiv,"ye":_emscripten_glGetVertexAttribIuiv,"xe":_emscripten_glGetVertexAttribPointerv,"we":_emscripten_glGetVertexAttribfv,"ve":_emscripten_glGetVertexAttribiv,"ue":_emscripten_glHint,"te":_emscripten_glInvalidateFramebuffer,"se":_emscripten_glInvalidateSubFramebuffer,"re":_emscripten_glIsBuffer,"qe":_emscripten_glIsEnabled,"pe":_emscripten_glIsFramebuffer,"oe":_emscripten_glIsProgram,"ne":_emscripten_glIsQuery,"me":_emscripten_glIsQueryEXT,"le":_emscripten_glIsRenderbuffer,"ke":_emscripten_glIsSampler,"je":_emscripten_glIsShader,"ie":_emscripten_glIsSync,"he":_emscripten_glIsTexture,"ge":_emscripten_glIsTransformFeedback,"fe":_emscripten_glIsVertexArray,"ee":_emscripten_glIsVertexArrayOES,"de":_emscripten_glLineWidth,"ce":_emscripten_glLinkProgram,"be":_emscripten_glPauseTransformFeedback,"ae":_emscripten_glPixelStorei,"$d":_emscripten_glPolygonOffset,"_d":_emscripten_glProgramBinary,"Zd":_emscripten_glProgramParameteri,"Yd":_emscripten_glQueryCounterEXT,"Xd":_emscripten_glReadBuffer,"Wd":_emscripten_glReadPixels,"Vd":_emscripten_glReleaseShaderCompiler,"Ud":_emscripten_glRenderbufferStorage,"Td":_emscripten_glRenderbufferStorageMultisample,"Sd":_emscripten_glResumeTransformFeedback,"Rd":_emscripten_glSampleCoverage,"Qd":_emscripten_glSamplerParameterf,"Pd":_emscripten_glSamplerParameterfv,"Od":_emscripten_glSamplerParameteri,"Nd":_emscripten_glSamplerParameteriv,"Md":_emscripten_glScissor,"Ld":_emscripten_glShaderBinary,"Kd":_emscripten_glShaderSource,"Jd":_emscripten_glStencilFunc,"Id":_emscripten_glStencilFuncSeparate,"Hd":_emscripten_glStencilMask,"Gd":_emscripten_glStencilMaskSeparate,"Fd":_emscripten_glStencilOp,"Ed":_emscripten_glStencilOpSeparate,"Dd":_emscripten_glTexImage2D,"Cd":_emscripten_glTexImage3D,"Bd":_emscripten_glTexParameterf,"Ad":_emscripten_glTexParameterfv,"zd":_emscripten_glTexParameteri,"yd":_emscripten_glTexParameteriv,"xd":_emscripten_glTexStorage2D,"wd":_emscripten_glTexStorage3D,"vd":_emscripten_glTexSubImage2D,"ud":_emscripten_glTexSubImage3D,"td":_emscripten_glTransformFeedbackVaryings,"sd":_emscripten_glUniform1f,"rd":_emscripten_glUniform1fv,"qd":_emscripten_glUniform1i,"pd":_emscripten_glUniform1iv,"od":_emscripten_glUniform1ui,"nd":_emscripten_glUniform1uiv,"md":_emscripten_glUniform2f,"ld":_emscripten_glUniform2fv,"kd":_emscripten_glUniform2i,"jd":_emscripten_glUniform2iv,"id":_emscripten_glUniform2ui,"hd":_emscripten_glUniform2uiv,"gd":_emscripten_glUniform3f,"fd":_emscripten_glUniform3fv,"ed":_emscripten_glUniform3i,"dd":_emscripten_glUniform3iv,"cd":_emscripten_glUniform3ui,"bd":_emscripten_glUniform3uiv,"ad":_emscripten_glUniform4f,"$c":_emscripten_glUniform4fv,"_c":_emscripten_glUniform4i,"Zc":_emscripten_glUniform4iv,"Yc":_emscripten_glUniform4ui,"Xc":_emscripten_glUniform4uiv,"Wc":_emscripten_glUniformBlockBinding,"Vc":_emscripten_glUniformMatrix2fv,"Uc":_emscripten_glUniformMatrix2x3fv,"Tc":_emscripten_glUniformMatrix2x4fv,"Sc":_emscripten_glUniformMatrix3fv,"Rc":_emscripten_glUniformMatrix3x2fv,"Qc":_emscripten_glUniformMatrix3x4fv,"Pc":_emscripten_glUniformMatrix4fv,"Oc":_emscripten_glUniformMatrix4x2fv,"Nc":_emscripten_glUniformMatrix4x3fv,"Mc":_emscripten_glUseProgram,"Lc":_emscripten_glValidateProgram,"Kc":_emscripten_glVertexAttrib1f,"Jc":_emscripten_glVertexAttrib1fv,"Ic":_emscripten_glVertexAttrib2f,"Hc":_emscripten_glVertexAttrib2fv,"Gc":_emscripten_glVertexAttrib3f,"Fc":_emscripten_glVertexAttrib3fv,"Ec":_emscripten_glVertexAttrib4f,"Dc":_emscripten_glVertexAttrib4fv,"Cc":_emscripten_glVertexAttribDivisor,"Bc":_emscripten_glVertexAttribDivisorANGLE,"Ac":_emscripten_glVertexAttribDivisorARB,"zc":_emscripten_glVertexAttribDivisorEXT,"yc":_emscripten_glVertexAttribDivisorNV,"xc":_emscripten_glVertexAttribI4i,"wc":_emscripten_glVertexAttribI4iv,"vc":_emscripten_glVertexAttribI4ui,"uc":_emscripten_glVertexAttribI4uiv,"tc":_emscripten_glVertexAttribIPointer,"sc":_emscripten_glVertexAttribPointer,"rc":_emscripten_glViewport,"qc":_emscripten_glWaitSync,"g":_emscripten_longjmp,"pc":_emscripten_memcpy_big,"oc":_emscripten_pause_main_loop,"nc":_emscripten_resize_heap,"da":_emscripten_set_main_loop_arg,"mc":_emscripten_thread_sleep,"f":_emscripten_webgl_enable_extension,"lc":_emscripten_webgl_get_current_context,"Oh":_environ_get,"Nh":_environ_sizes_get,"ca":_exit,"J":_fd_close,"Ca":_fd_read,"La":_fd_seek,"fa":_fd_write,"H":_gai_strerror,"e":_getTempRet0,"D":_getaddrinfo,"kc":_gethostbyaddr,"jc":_gethostbyname,"C":_getnameinfo,"u":_gettimeofday,"za":_glActiveTexture,"U":_glAttachShader,"i":_glBindBuffer,"ba":_glBindFramebuffer,"B":_glBindRenderbuffer,"A":_glBindTexture,"ic":_glBlendFunc,"ya":_glBufferData,"xa":_glBufferSubData,"T":_glCheckFramebufferStatus,"hc":_glClear,"gc":_glClearColor,"fc":_glClearDepthf,"ec":_glClearStencil,"dc":_glColorMask,"S":_glCompileShader,"t":_glCompressedTexImage2D,"cc":_glCompressedTexImage3D,"s":_glCompressedTexSubImage2D,"bc":_glCompressedTexSubImage3D,"wa":_glCreateProgram,"aa":_glCreateShader,"ac":_glCullFace,"va":_glDeleteBuffers,"$b":_glDeleteFramebuffers,"R":_glDeleteProgram,"r":_glDeleteRenderbuffers,"Q":_glDeleteShader,"_b":_glDeleteTextures,"Zb":_glDepthFunc,"Yb":_glDepthMask,"Xb":_glDisable,"Wb":_glDisableVertexAttribArray,"Vb":_glDrawArrays,"Ub":_glDrawBuffers,"Tb":_glDrawElements,"Sb":_glEnable,"ua":_glEnableVertexAttribArray,"Rb":_glFlush,"Qb":_glFramebufferRenderbuffer,"Pb":_glFramebufferTexture2D,"Ob":_glFrontFace,"ta":_glGenBuffers,"Nb":_glGenFramebuffers,"G":_glGenRenderbuffers,"Mb":_glGenTextures,"Lb":_glGetActiveAttrib,"Kb":_glGetActiveUniform,"Jb":_glGetAttribLocation,"c":_glGetError,"Ib":_glGetFloatv,"F":_glGetIntegerv,"sa":_glGetProgramInfoLog,"z":_glGetProgramiv,"ra":_glGetShaderInfoLog,"P":_glGetShaderiv,"n":_glGetString,"Hb":_glGetUniformLocation,"$":_glLinkProgram,"qa":_glPixelStorei,"Gb":_glPolygonOffset,"Fb":_glReadPixels,"_":_glRenderbufferStorage,"Eb":_glScissor,"O":_glShaderSource,"Db":_glStencilFunc,"Cb":_glStencilFuncSeparate,"Bb":_glStencilMask,"Ab":_glStencilOp,"zb":_glStencilOpSeparate,"m":_glTexImage2D,"yb":_glTexImage3D,"xb":_glTexParameterf,"N":_glTexParameteri,"q":_glTexSubImage2D,"wb":_glTexSubImage3D,"vb":_glUniform1i,"ub":_glUniform4fv,"tb":_glUniformMatrix4fv,"pa":_glUseProgram,"oa":_glVertexAttribPointer,"sb":_glViewport,"rb":_glfwAccelerometerEnable,"qb":_glfwCloseWindow,"pb":_glfwDisable,"ob":_glfwEnable,"nb":_glfwGetAcceleration,"na":_glfwGetDefaultFramebuffer,"mb":_glfwGetDisplayScaleFactor,"lb":_glfwGetJoystickButtons,"kb":_glfwGetJoystickDeviceId,"jb":_glfwGetJoystickHats,"M":_glfwGetJoystickParam,"ib":_glfwGetJoystickPos,"hb":_glfwGetKey,"l":_glfwGetMouseButton,"gb":_glfwGetMouseLocked,"fb":_glfwGetMousePos,"eb":_glfwGetMouseWheel,"Z":_glfwGetProcAddress,"db":_glfwGetWindowParam,"cb":_glfwGetWindowRefreshRate,"ma":_glfwGetWindowSize,"bb":_glfwIconifyWindow,"ab":_glfwInitJS,"$a":_glfwOpenWindow,"Y":_glfwOpenWindowHint,"_a":_glfwPollEvents,"Za":_glfwResetKeyboard,"Ya":_glfwSetCharCallback,"Xa":_glfwSetDeviceChangedCallback,"Wa":_glfwSetGamepadCallback,"Va":_glfwSetMarkedTextCallback,"Ua":_glfwSetTouchCallback,"Ta":_glfwSetWindowBackgroundColor,"Sa":_glfwSetWindowCloseCallback,"Ra":_glfwSetWindowFocusCallback,"Qa":_glfwSetWindowIconifyCallback,"la":_glfwSetWindowSize,"Pa":_glfwSetWindowSizeCallback,"ka":_glfwShowKeyboard,"Oa":_glfwSwapBuffers,"ja":_glfwSwapInterval,"Na":_glfwTerminate,"Ma":_gmtime_r,"y":invoke_ii,"L":invoke_iii,"X":invoke_iiii,"Ka":invoke_jii,"x":invoke_vi,"K":invoke_vii,"ia":invoke_viii,"h":invoke_viiii,"w":invoke_viiiii,"a":wasmMemory,"Ja":_mktime,"Ia":_pthread_create,"Ha":_pthread_join,"d":_setTempRet0,"Ga":_signal,"Fa":_strftime,"Ea":_sysconf,"Da":_system,"v":_time};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["ci"]).apply(null,arguments)};var _dmExportedSymbols=Module["_dmExportedSymbols"]=function(){return(_dmExportedSymbols=Module["_dmExportedSymbols"]=Module["asm"]["di"]).apply(null,arguments)};var _main=Module["_main"]=function(){return(_main=Module["_main"]=Module["asm"]["ei"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["fi"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["gi"]).apply(null,arguments)};var _htonl=Module["_htonl"]=function(){return(_htonl=Module["_htonl"]=Module["asm"]["hi"]).apply(null,arguments)};var _dmScript_Html5ReportOperationSuccess=Module["_dmScript_Html5ReportOperationSuccess"]=function(){return(_dmScript_Html5ReportOperationSuccess=Module["_dmScript_Html5ReportOperationSuccess"]=Module["asm"]["ii"]).apply(null,arguments)};var _dmScript_RunInteractionCallback=Module["_dmScript_RunInteractionCallback"]=function(){return(_dmScript_RunInteractionCallback=Module["_dmScript_RunInteractionCallback"]=Module["asm"]["ji"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["ki"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["li"]).apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return(_ntohs=Module["_ntohs"]=Module["asm"]["mi"]).apply(null,arguments)};var _JSWriteDump=Module["_JSWriteDump"]=function(){return(_JSWriteDump=Module["_JSWriteDump"]=Module["asm"]["ni"]).apply(null,arguments)};var __get_tzname=Module["__get_tzname"]=function(){return(__get_tzname=Module["__get_tzname"]=Module["asm"]["oi"]).apply(null,arguments)};var __get_daylight=Module["__get_daylight"]=function(){return(__get_daylight=Module["__get_daylight"]=Module["asm"]["pi"]).apply(null,arguments)};var __get_timezone=Module["__get_timezone"]=function(){return(__get_timezone=Module["__get_timezone"]=Module["asm"]["qi"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["ri"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["si"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["ti"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["ui"]).apply(null,arguments)};var dynCall_jii=Module["dynCall_jii"]=function(){return(dynCall_jii=Module["dynCall_jii"]=Module["asm"]["vi"]).apply(null,arguments)};function invoke_vii(index,a1,a2){var sp=stackSave();try{wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{wasmTable.get(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return wasmTable.get(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{wasmTable.get(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_jii(index,a1,a2){var sp=stackSave();try{return dynCall_jii(index,a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}Module["ccall"]=ccall;Module["UTF8ToString"]=UTF8ToString;Module["stringToUTF8"]=stringToUTF8;Module["stackTrace"]=stackTrace;Module["writeStringToMemory"]=writeStringToMemory;Module["writeArrayToMemory"]=writeArrayToMemory;Module["callMain"]=callMain;Module["stackTrace"]=stackTrace;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}var calledMain=false;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args){var entryFunction=Module["_main"];args=args||[];var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(thisProgram);for(var i=1;i>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=entryFunction(argc,argv);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="unwind"){noExitRuntime=true;return}else{var toLog=e;if(e&&typeof e==="object"&&e.stack){toLog=[e,e.stack]}err("exception thrown: "+toLog);quit_(1,e)}}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&noExitRuntime&&status===0){return}if(noExitRuntime){}else{EXITSTATUS=status;exitRuntime();if(Module["onExit"])Module["onExit"](status);ABORT=true}quit_(status,new ExitStatus(status))}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;noExitRuntime=true;run(); +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +var Module = typeof Module != "undefined" ? Module : {}; +if (typeof Object.assign == "undefined") { + Object.assign = function (target, source) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + if (!source) continue; + for (var key in source) { + if (source.hasOwnProperty(key)) target[key] = source[key]; + } + } + return target; + }; +} +var moduleOverrides = Object.assign({}, Module); +var arguments_ = []; +var thisProgram = "./this.program"; +var quit_ = function quit_(status, toThrow) { + throw toThrow; +}; +var ENVIRONMENT_IS_WEB = (typeof window === "undefined" ? "undefined" : _typeof(window)) == "object"; +var ENVIRONMENT_IS_WORKER = typeof importScripts == "function"; +var ENVIRONMENT_IS_NODE = (typeof process === "undefined" ? "undefined" : _typeof(process)) == "object" && _typeof(process.versions) == "object" && typeof process.versions.node == "string"; +var scriptDirectory = ""; +function locateFile(path) { + if (Module["locateFile"]) { + return Module["locateFile"](path, scriptDirectory); + } + return scriptDirectory + path; +} +var read_, readAsync, readBinary; +if (ENVIRONMENT_IS_NODE) { + var fs = require("fs"); + var nodePath = require("path"); + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = nodePath.dirname(scriptDirectory) + "/"; + } else { + scriptDirectory = __dirname + "/"; + } + read_ = function read_(filename, binary) { + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + return fs.readFileSync(filename, binary ? undefined : "utf8"); + }; + readBinary = function readBinary(filename) { + var ret = read_(filename, true); + if (!ret.buffer) { + ret = new Uint8Array(ret); + } + return ret; + }; + readAsync = function readAsync(filename, onload, onerror) { + var binary = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); + fs.readFile(filename, binary ? undefined : "utf8", function (err, data) { + if (err) onerror(err);else onload(binary ? data.buffer : data); + }); + }; + if (!Module["thisProgram"] && process.argv.length > 1) { + thisProgram = process.argv[1].replace(/\\/g, "/"); + } + arguments_ = process.argv.slice(2); + if (typeof module != "undefined") { + module["exports"] = Module; + } + process.on("uncaughtException", function (ex) { + if (ex !== "unwind" && !(ex instanceof ExitStatus) && !(ex.context instanceof ExitStatus)) { + throw ex; + } + }); + quit_ = function quit_(status, toThrow) { + process.exitCode = status; + throw toThrow; + }; +} else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { + if (ENVIRONMENT_IS_WORKER) { + scriptDirectory = self.location.href; + } else if (typeof document != "undefined" && document.currentScript) { + scriptDirectory = document.currentScript.src; + } + if (scriptDirectory.startsWith("blob:")) { + scriptDirectory = ""; + } else { + scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1); + } + { + read_ = function read_(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.send(null); + return xhr.responseText; + }; + if (ENVIRONMENT_IS_WORKER) { + readBinary = function readBinary(url) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + xhr.responseType = "arraybuffer"; + xhr.send(null); + return new Uint8Array(xhr.response); + }; + } + readAsync = function readAsync(url, onload, onerror) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, true); + xhr.responseType = "arraybuffer"; + xhr.onload = function () { + if (xhr.status == 200 || xhr.status == 0 && xhr.response) { + onload(xhr.response); + return; + } + onerror(); + }; + xhr.onerror = onerror; + xhr.send(null); + }; + } +} else {} +var out = Module["print"] || console.log.bind(console); +var err = Module["printErr"] || console.error.bind(console); +Object.assign(Module, moduleOverrides); +moduleOverrides = null; +if (Module["arguments"]) arguments_ = Module["arguments"]; +if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; +if (Module["quit"]) quit_ = Module["quit"]; +var wasmBinary; +if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; +if ((typeof WebAssembly === "undefined" ? "undefined" : _typeof(WebAssembly)) != "object") { + abort("no native wasm support detected"); +} +var wasmMemory; +var ABORT = false; +var EXITSTATUS; +function assert(condition, text) { + if (!condition) { + abort(text); + } +} +var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; +function updateMemoryViews() { + var b = wasmMemory.buffer; + Module["HEAP8"] = HEAP8 = new Int8Array(b); + Module["HEAP16"] = HEAP16 = new Int16Array(b); + Module["HEAPU8"] = HEAPU8 = new Uint8Array(b); + Module["HEAPU16"] = HEAPU16 = new Uint16Array(b); + Module["HEAP32"] = HEAP32 = new Int32Array(b); + Module["HEAPU32"] = HEAPU32 = new Uint32Array(b); + Module["HEAPF32"] = HEAPF32 = new Float32Array(b); + Module["HEAPF64"] = HEAPF64 = new Float64Array(b); +} +var INITIAL_MEMORY = Module["INITIAL_MEMORY"] || 33554432; +if (Module["wasmMemory"]) { + wasmMemory = Module["wasmMemory"]; +} else { + wasmMemory = new WebAssembly.Memory({ + "initial": INITIAL_MEMORY / 65536, + "maximum": 2147483648 / 65536 + }); +} +updateMemoryViews(); +INITIAL_MEMORY = wasmMemory.buffer.byteLength; +var __ATPRERUN__ = []; +var __ATINIT__ = []; +var __ATMAIN__ = []; +var __ATEXIT__ = []; +var __ATPOSTRUN__ = []; +var runtimeInitialized = false; +function preRun() { + if (Module["preRun"]) { + if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; + while (Module["preRun"].length) { + addOnPreRun(Module["preRun"].shift()); + } + } + callRuntimeCallbacks(__ATPRERUN__); +} +function initRuntime() { + runtimeInitialized = true; + if (!Module["noFSInit"] && !FS.init.initialized) FS.init(); + FS.ignorePermissions = false; + TTY.init(); + SOCKFS.root = FS.mount(SOCKFS, {}, null); + callRuntimeCallbacks(__ATINIT__); +} +function preMain() { + callRuntimeCallbacks(__ATMAIN__); +} +function postRun() { + if (Module["postRun"]) { + if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; + while (Module["postRun"].length) { + addOnPostRun(Module["postRun"].shift()); + } + } + callRuntimeCallbacks(__ATPOSTRUN__); +} +function addOnPreRun(cb) { + __ATPRERUN__.unshift(cb); +} +function addOnInit(cb) { + __ATINIT__.unshift(cb); +} +function addOnPostRun(cb) { + __ATPOSTRUN__.unshift(cb); +} +if (!Math.fround) { + var froundBuffer = new Float32Array(1); + Math.fround = function (x) { + froundBuffer[0] = x; + return froundBuffer[0]; + }; +} +Math.clz32 || (Math.clz32 = function (x) { + var n = 32; + var y = x >> 16; + if (y) { + n -= 16; + x = y; + } + y = x >> 8; + if (y) { + n -= 8; + x = y; + } + y = x >> 4; + if (y) { + n -= 4; + x = y; + } + y = x >> 2; + if (y) { + n -= 2; + x = y; + } + y = x >> 1; + if (y) return n - 2; + return n - x; +}); +Math.trunc || (Math.trunc = function (x) { + return x < 0 ? Math.ceil(x) : Math.floor(x); +}); +var runDependencies = 0; +var runDependencyWatcher = null; +var dependenciesFulfilled = null; +function getUniqueRunDependency(id) { + return id; +} +function addRunDependency(id) { + var _Module$monitorRunDep; + runDependencies++; + (_Module$monitorRunDep = Module["monitorRunDependencies"]) === null || _Module$monitorRunDep === void 0 || _Module$monitorRunDep.call(Module, runDependencies); +} +function removeRunDependency(id) { + var _Module$monitorRunDep2; + runDependencies--; + (_Module$monitorRunDep2 = Module["monitorRunDependencies"]) === null || _Module$monitorRunDep2 === void 0 || _Module$monitorRunDep2.call(Module, runDependencies); + if (runDependencies == 0) { + if (runDependencyWatcher !== null) { + clearInterval(runDependencyWatcher); + runDependencyWatcher = null; + } + if (dependenciesFulfilled) { + var callback = dependenciesFulfilled; + dependenciesFulfilled = null; + callback(); + } + } +} +function abort(what) { + var _Module$onAbort; + (_Module$onAbort = Module["onAbort"]) === null || _Module$onAbort === void 0 || _Module$onAbort.call(Module, what); + what = "Aborted(" + what + ")"; + err(what); + ABORT = true; + EXITSTATUS = 1; + what += ". Build with -sASSERTIONS for more info."; + var e = new WebAssembly.RuntimeError(what); + throw e; +} +var dataURIPrefix = "data:application/octet-stream;base64,"; +var isDataURI = function isDataURI(filename) { + return filename.startsWith(dataURIPrefix); +}; +var isFileURI = function isFileURI(filename) { + return filename.startsWith("file://"); +}; +var wasmBinaryFile; +wasmBinaryFile = "dmengine_release.wasm"; +if (!isDataURI(wasmBinaryFile)) { + wasmBinaryFile = locateFile(wasmBinaryFile); +} +function getBinarySync(file) { + if (file == wasmBinaryFile && wasmBinary) { + return new Uint8Array(wasmBinary); + } + if (readBinary) { + return readBinary(file); + } + throw "both async and sync fetching of the wasm failed"; +} +function getBinaryPromise(binaryFile) { + if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { + if (typeof fetch == "function" && !isFileURI(binaryFile)) { + return fetch(binaryFile, { + credentials: "same-origin" + }).then(function (response) { + if (!response["ok"]) { + throw "failed to load wasm binary file at '".concat(binaryFile, "'"); + } + return response["arrayBuffer"](); + }).catch(function () { + return getBinarySync(binaryFile); + }); + } else if (readAsync) { + return new Promise(function (resolve, reject) { + readAsync(binaryFile, function (response) { + return resolve(new Uint8Array(response)); + }, reject); + }); + } + } + return Promise.resolve().then(function () { + return getBinarySync(binaryFile); + }); +} +function instantiateArrayBuffer(binaryFile, imports, receiver) { + return getBinaryPromise(binaryFile).then(function (binary) { + return WebAssembly.instantiate(binary, imports); + }).then(receiver, function (reason) { + err("failed to asynchronously prepare wasm: ".concat(reason)); + abort(reason); + }); +} +function instantiateAsync(binary, binaryFile, imports, callback) { + if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") { + return fetch(binaryFile, { + credentials: "same-origin" + }).then(function (response) { + var result = WebAssembly.instantiateStreaming(response, imports); + return result.then(callback, function (reason) { + err("wasm streaming compile failed: ".concat(reason)); + err("falling back to ArrayBuffer instantiation"); + return instantiateArrayBuffer(binaryFile, imports, callback); + }); + }); + } + return instantiateArrayBuffer(binaryFile, imports, callback); +} +function createWasm() { + var info = { + "a": wasmImports + }; + function receiveInstance(instance, module) { + wasmExports = instance.exports; + wasmTable = wasmExports["Vh"]; + addOnInit(wasmExports["Qh"]); + removeRunDependency("wasm-instantiate"); + return wasmExports; + } + addRunDependency("wasm-instantiate"); + function receiveInstantiationResult(result) { + receiveInstance(result["instance"]); + } + if (Module["instantiateWasm"]) { + try { + return Module["instantiateWasm"](info, receiveInstance); + } catch (e) { + err("Module.instantiateWasm callback failed with error: ".concat(e)); + return false; + } + } + instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult); + return {}; +} +var tempDouble; +var tempI64; +var ASM_CONSTS = { + 277608: function _() { + if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) { + console.log("%c %c Made with Defold %c %c https://www.defold.com", "background: #fd6623; padding:5px 0; border: 5px;", "background: #272c31; color: #fafafa; padding:5px 0;", "background: #39a3e4; padding:5px 0;", "background: #ffffff; color: #000000; padding:5px 0;"); + } else { + console.log("Made with Defold -=[ https://www.defold.com ]=-"); + } + }, + 278036: function _($0) { + var jsResult; + var isSuccess = 1; + try { + jsResult = eval(UTF8ToString($0)); + } catch (err) { + isSuccess = 0; + jsResult = err; + } + _dmScript_Html5ReportOperationSuccess(isSuccess); + jsResult += ""; + var stringOnWasmHeap = stringToNewUTF8(jsResult); + return stringOnWasmHeap; + }, + 278304: function _() { + document.removeEventListener("click", Module.__defold_interaction_listener); + document.removeEventListener("keyup", Module.__defold_interaction_listener); + document.removeEventListener("touchend", Module.__defold_interaction_listener); + Module.__defold_interaction_listener = undefined; + }, + 278592: function _() { + Module.__defold_interaction_listener = function () { + _dmScript_RunInteractionCallback(); + }; + document.addEventListener("click", Module.__defold_interaction_listener); + document.addEventListener("keyup", Module.__defold_interaction_listener); + document.addEventListener("touchend", Module.__defold_interaction_listener); + }, + 278913: function _($0) { + Module.printErr(UTF8ToString($0)); + }, + 278952: function _($0) { + Module.print(UTF8ToString($0)); + } +}; +function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(".concat(status, ")"); + this.status = status; +} +var callRuntimeCallbacks = function callRuntimeCallbacks(callbacks) { + while (callbacks.length > 0) { + callbacks.shift()(Module); + } +}; +function getValue(ptr) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "i8"; + if (type.endsWith("*")) type = "*"; + switch (type) { + case "i1": + return HEAP8[ptr]; + case "i8": + return HEAP8[ptr]; + case "i16": + return HEAP16[ptr >> 1]; + case "i32": + return HEAP32[ptr >> 2]; + case "i64": + abort("to do getValue(i64) use WASM_BIGINT"); + case "float": + return HEAPF32[ptr >> 2]; + case "double": + return HEAPF64[ptr >> 3]; + case "*": + return HEAPU32[ptr >> 2]; + default: + abort("invalid type for getValue: ".concat(type)); + } +} +var noExitRuntime = Module["noExitRuntime"] || true; +function setValue(ptr, value) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "i8"; + if (type.endsWith("*")) type = "*"; + switch (type) { + case "i1": + HEAP8[ptr] = value; + break; + case "i8": + HEAP8[ptr] = value; + break; + case "i16": + HEAP16[ptr >> 1] = value; + break; + case "i32": + HEAP32[ptr >> 2] = value; + break; + case "i64": + abort("to do setValue(i64) use WASM_BIGINT"); + case "float": + HEAPF32[ptr >> 2] = value; + break; + case "double": + HEAPF64[ptr >> 3] = value; + break; + case "*": + HEAPU32[ptr >> 2] = value; + break; + default: + abort("invalid type for setValue: ".concat(type)); + } +} +var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined; +var UTF8ArrayToString = function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { + var endIdx = idx + maxBytesToRead; + var endPtr = idx; + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); + } + } + return str; +}; +var UTF8ToString = function UTF8ToString(ptr, maxBytesToRead) { + return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; +}; +var ___assert_fail = function ___assert_fail(condition, filename, line, func) { + abort("Assertion failed: ".concat(UTF8ToString(condition), ", at: ") + [filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function"]); +}; +var PATH = { + isAbs: function isAbs(path) { + return path.charAt(0) === "/"; + }, + splitPath: function splitPath(filename) { + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + return splitPathRe.exec(filename).slice(1); + }, + normalizeArray: function normalizeArray(parts, allowAboveRoot) { + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + if (allowAboveRoot) { + for (; up; up--) { + parts.unshift(".."); + } + } + return parts; + }, + normalize: function normalize(path) { + var isAbsolute = PATH.isAbs(path), + trailingSlash = path.substr(-1) === "/"; + path = PATH.normalizeArray(path.split("/").filter(function (p) { + return !!p; + }), !isAbsolute).join("/"); + if (!path && !isAbsolute) { + path = "."; + } + if (path && trailingSlash) { + path += "/"; + } + return (isAbsolute ? "/" : "") + path; + }, + dirname: function dirname(path) { + var result = PATH.splitPath(path), + root = result[0], + dir = result[1]; + if (!root && !dir) { + return "."; + } + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + }, + basename: function basename(path) { + if (path === "/") return "/"; + path = PATH.normalize(path); + path = path.replace(/\/$/, ""); + var lastSlash = path.lastIndexOf("/"); + if (lastSlash === -1) return path; + return path.substr(lastSlash + 1); + }, + join: function join() { + for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) { + paths[_key] = arguments[_key]; + } + return PATH.normalize(paths.join("/")); + }, + join2: function join2(l, r) { + return PATH.normalize(l + "/" + r); + } +}; +var initRandomFill = function initRandomFill() { + if ((typeof crypto === "undefined" ? "undefined" : _typeof(crypto)) == "object" && typeof crypto["getRandomValues"] == "function") { + return function (view) { + return crypto.getRandomValues(view); + }; + } else if (ENVIRONMENT_IS_NODE) { + try { + var crypto_module = require("crypto"); + var randomFillSync = crypto_module["randomFillSync"]; + if (randomFillSync) { + return function (view) { + return crypto_module["randomFillSync"](view); + }; + } + var randomBytes = crypto_module["randomBytes"]; + return function (view) { + return view.set(randomBytes(view.byteLength)), view; + }; + } catch (e) {} + } + abort("initRandomDevice"); +}; +var _randomFill = function randomFill(view) { + return (_randomFill = initRandomFill())(view); +}; +var PATH_FS = { + resolve: function resolve() { + var resolvedPath = "", + resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? i < 0 || arguments.length <= i ? undefined : arguments[i] : FS.cwd(); + if (typeof path != "string") { + throw new TypeError("Arguments to path.resolve must be strings"); + } else if (!path) { + return ""; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = PATH.isAbs(path); + } + resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function (p) { + return !!p; + }), !resolvedAbsolute).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + }, + relative: function relative(from, to) { + from = PATH_FS.resolve(from).substr(1); + to = PATH_FS.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") break; + } + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== "") break; + } + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + var fromParts = trim(from.split("/")); + var toParts = trim(to.split("/")); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); + } +}; +var FS_stdin_getChar_buffer = []; +var lengthBytesUTF8 = function lengthBytesUTF8(str) { + var len = 0; + for (var i = 0; i < str.length; ++i) { + var c = str.charCodeAt(i); + if (c <= 127) { + len++; + } else if (c <= 2047) { + len += 2; + } else if (c >= 55296 && c <= 57343) { + len += 4; + ++i; + } else { + len += 3; + } + } + return len; +}; +var stringToUTF8Array = function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) { + if (!(maxBytesToWrite > 0)) return 0; + var startIdx = outIdx; + var endIdx = outIdx + maxBytesToWrite - 1; + for (var i = 0; i < str.length; ++i) { + var u = str.charCodeAt(i); + if (u >= 55296 && u <= 57343) { + var u1 = str.charCodeAt(++i); + u = 65536 + ((u & 1023) << 10) | u1 & 1023; + } + if (u <= 127) { + if (outIdx >= endIdx) break; + heap[outIdx++] = u; + } else if (u <= 2047) { + if (outIdx + 1 >= endIdx) break; + heap[outIdx++] = 192 | u >> 6; + heap[outIdx++] = 128 | u & 63; + } else if (u <= 65535) { + if (outIdx + 2 >= endIdx) break; + heap[outIdx++] = 224 | u >> 12; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + } else { + if (outIdx + 3 >= endIdx) break; + heap[outIdx++] = 240 | u >> 18; + heap[outIdx++] = 128 | u >> 12 & 63; + heap[outIdx++] = 128 | u >> 6 & 63; + heap[outIdx++] = 128 | u & 63; + } + } + heap[outIdx] = 0; + return outIdx - startIdx; +}; +function intArrayFromString(stringy, dontAddNull, length) { + var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1; + var u8array = new Array(len); + var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); + if (dontAddNull) u8array.length = numBytesWritten; + return u8array; +} +var FS_stdin_getChar = function FS_stdin_getChar() { + if (!FS_stdin_getChar_buffer.length) { + var result = null; + if (ENVIRONMENT_IS_NODE) { + var BUFSIZE = 256; + var buf = Buffer.alloc(BUFSIZE); + var bytesRead = 0; + var fd = process.stdin.fd; + try { + bytesRead = fs.readSync(fd, buf); + } catch (e) { + if (e.toString().includes("EOF")) bytesRead = 0;else throw e; + } + if (bytesRead > 0) { + result = buf.slice(0, bytesRead).toString("utf-8"); + } else { + result = null; + } + } else if (typeof window != "undefined" && typeof window.prompt == "function") { + result = window.prompt("Input: "); + if (result !== null) { + result += "\n"; + } + } else if (typeof readline == "function") { + result = readline(); + if (result !== null) { + result += "\n"; + } + } + if (!result) { + return null; + } + FS_stdin_getChar_buffer = intArrayFromString(result, true); + } + return FS_stdin_getChar_buffer.shift(); +}; +var TTY = { + ttys: [], + init: function init() {}, + shutdown: function shutdown() {}, + register: function register(dev, ops) { + TTY.ttys[dev] = { + input: [], + output: [], + ops: ops + }; + FS.registerDevice(dev, TTY.stream_ops); + }, + stream_ops: { + open: function open(stream) { + var tty = TTY.ttys[stream.node.rdev]; + if (!tty) { + throw new FS.ErrnoError(43); + } + stream.tty = tty; + stream.seekable = false; + }, + close: function close(stream) { + stream.tty.ops.fsync(stream.tty); + }, + fsync: function fsync(stream) { + stream.tty.ops.fsync(stream.tty); + }, + read: function read(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.get_char) { + throw new FS.ErrnoError(60); + } + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = stream.tty.ops.get_char(stream.tty); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function write(stream, buffer, offset, length, pos) { + if (!stream.tty || !stream.tty.ops.put_char) { + throw new FS.ErrnoError(60); + } + try { + for (var i = 0; i < length; i++) { + stream.tty.ops.put_char(stream.tty, buffer[offset + i]); + } + } catch (e) { + throw new FS.ErrnoError(29); + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }, + default_tty_ops: { + get_char: function get_char(tty) { + return FS_stdin_getChar(); + }, + put_char: function put_char(tty, val) { + if (val === null || val === 10) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + fsync: function fsync(tty) { + if (tty.output && tty.output.length > 0) { + out(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + }, + ioctl_tcgets: function ioctl_tcgets(tty) { + return { + c_iflag: 25856, + c_oflag: 5, + c_cflag: 191, + c_lflag: 35387, + c_cc: [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + }; + }, + ioctl_tcsets: function ioctl_tcsets(tty, optional_actions, data) { + return 0; + }, + ioctl_tiocgwinsz: function ioctl_tiocgwinsz(tty) { + return [24, 80]; + } + }, + default_tty1_ops: { + put_char: function put_char(tty, val) { + if (val === null || val === 10) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } else { + if (val != 0) tty.output.push(val); + } + }, + fsync: function fsync(tty) { + if (tty.output && tty.output.length > 0) { + err(UTF8ArrayToString(tty.output, 0)); + tty.output = []; + } + } + } +}; +var zeroMemory = function zeroMemory(address, size) { + HEAPU8.fill(0, address, address + size); + return address; +}; +var mmapAlloc = function mmapAlloc(size) { + abort(); +}; +var MEMFS = { + ops_table: null, + mount: function mount(_mount) { + return MEMFS.createNode(null, "/", 16384 | 511, 0); + }, + createNode: function createNode(parent, name, mode, dev) { + if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { + throw new FS.ErrnoError(63); + } + MEMFS.ops_table || (MEMFS.ops_table = { + dir: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + lookup: MEMFS.node_ops.lookup, + mknod: MEMFS.node_ops.mknod, + rename: MEMFS.node_ops.rename, + unlink: MEMFS.node_ops.unlink, + rmdir: MEMFS.node_ops.rmdir, + readdir: MEMFS.node_ops.readdir, + symlink: MEMFS.node_ops.symlink + }, + stream: { + llseek: MEMFS.stream_ops.llseek + } + }, + file: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: { + llseek: MEMFS.stream_ops.llseek, + read: MEMFS.stream_ops.read, + write: MEMFS.stream_ops.write, + allocate: MEMFS.stream_ops.allocate, + mmap: MEMFS.stream_ops.mmap, + msync: MEMFS.stream_ops.msync + } + }, + link: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr, + readlink: MEMFS.node_ops.readlink + }, + stream: {} + }, + chrdev: { + node: { + getattr: MEMFS.node_ops.getattr, + setattr: MEMFS.node_ops.setattr + }, + stream: FS.chrdev_stream_ops + } + }); + var node = FS.createNode(parent, name, mode, dev); + if (FS.isDir(node.mode)) { + node.node_ops = MEMFS.ops_table.dir.node; + node.stream_ops = MEMFS.ops_table.dir.stream; + node.contents = {}; + } else if (FS.isFile(node.mode)) { + node.node_ops = MEMFS.ops_table.file.node; + node.stream_ops = MEMFS.ops_table.file.stream; + node.usedBytes = 0; + node.contents = null; + } else if (FS.isLink(node.mode)) { + node.node_ops = MEMFS.ops_table.link.node; + node.stream_ops = MEMFS.ops_table.link.stream; + } else if (FS.isChrdev(node.mode)) { + node.node_ops = MEMFS.ops_table.chrdev.node; + node.stream_ops = MEMFS.ops_table.chrdev.stream; + } + node.timestamp = Date.now(); + if (parent) { + parent.contents[name] = node; + parent.timestamp = node.timestamp; + } + return node; + }, + getFileDataAsTypedArray: function getFileDataAsTypedArray(node) { + if (!node.contents) return new Uint8Array(0); + if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); + return new Uint8Array(node.contents); + }, + expandFileStorage: function expandFileStorage(node, newCapacity) { + var prevCapacity = node.contents ? node.contents.length : 0; + if (prevCapacity >= newCapacity) return; + var CAPACITY_DOUBLING_MAX = 1024 * 1024; + newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) >>> 0); + if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); + var oldContents = node.contents; + node.contents = new Uint8Array(newCapacity); + if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); + }, + resizeFileStorage: function resizeFileStorage(node, newSize) { + if (node.usedBytes == newSize) return; + if (newSize == 0) { + node.contents = null; + node.usedBytes = 0; + } else { + var oldContents = node.contents; + node.contents = new Uint8Array(newSize); + if (oldContents) { + node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); + } + node.usedBytes = newSize; + } + }, + node_ops: { + getattr: function getattr(node) { + var attr = {}; + attr.dev = FS.isChrdev(node.mode) ? node.id : 1; + attr.ino = node.id; + attr.mode = node.mode; + attr.nlink = 1; + attr.uid = 0; + attr.gid = 0; + attr.rdev = node.rdev; + if (FS.isDir(node.mode)) { + attr.size = 4096; + } else if (FS.isFile(node.mode)) { + attr.size = node.usedBytes; + } else if (FS.isLink(node.mode)) { + attr.size = node.link.length; + } else { + attr.size = 0; + } + attr.atime = new Date(node.timestamp); + attr.mtime = new Date(node.timestamp); + attr.ctime = new Date(node.timestamp); + attr.blksize = 4096; + attr.blocks = Math.ceil(attr.size / attr.blksize); + return attr; + }, + setattr: function setattr(node, attr) { + if (attr.mode !== undefined) { + node.mode = attr.mode; + } + if (attr.timestamp !== undefined) { + node.timestamp = attr.timestamp; + } + if (attr.size !== undefined) { + MEMFS.resizeFileStorage(node, attr.size); + } + }, + lookup: function lookup(parent, name) { + throw FS.genericErrors[44]; + }, + mknod: function mknod(parent, name, mode, dev) { + return MEMFS.createNode(parent, name, mode, dev); + }, + rename: function rename(old_node, new_dir, new_name) { + if (FS.isDir(old_node.mode)) { + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (new_node) { + for (var i in new_node.contents) { + throw new FS.ErrnoError(55); + } + } + } + delete old_node.parent.contents[old_node.name]; + old_node.parent.timestamp = Date.now(); + old_node.name = new_name; + new_dir.contents[new_name] = old_node; + new_dir.timestamp = old_node.parent.timestamp; + old_node.parent = new_dir; + }, + unlink: function unlink(parent, name) { + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + rmdir: function rmdir(parent, name) { + var node = FS.lookupNode(parent, name); + for (var i in node.contents) { + throw new FS.ErrnoError(55); + } + delete parent.contents[name]; + parent.timestamp = Date.now(); + }, + readdir: function readdir(node) { + var entries = [".", ".."]; + for (var _i = 0, _Object$keys = Object.keys(node.contents); _i < _Object$keys.length; _i++) { + var key = _Object$keys[_i]; + entries.push(key); + } + return entries; + }, + symlink: function symlink(parent, newname, oldpath) { + var node = MEMFS.createNode(parent, newname, 511 | 40960, 0); + node.link = oldpath; + return node; + }, + readlink: function readlink(node) { + if (!FS.isLink(node.mode)) { + throw new FS.ErrnoError(28); + } + return node.link; + } + }, + stream_ops: { + read: function read(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= stream.node.usedBytes) return 0; + var size = Math.min(stream.node.usedBytes - position, length); + if (size > 8 && contents.subarray) { + buffer.set(contents.subarray(position, position + size), offset); + } else { + for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; + } + return size; + }, + write: function write(stream, buffer, offset, length, position, canOwn) { + if (buffer.buffer === HEAP8.buffer) { + canOwn = false; + } + if (!length) return 0; + var node = stream.node; + node.timestamp = Date.now(); + if (buffer.subarray && (!node.contents || node.contents.subarray)) { + if (canOwn) { + node.contents = buffer.subarray(offset, offset + length); + node.usedBytes = length; + return length; + } else if (node.usedBytes === 0 && position === 0) { + node.contents = buffer.slice(offset, offset + length); + node.usedBytes = length; + return length; + } else if (position + length <= node.usedBytes) { + node.contents.set(buffer.subarray(offset, offset + length), position); + return length; + } + } + MEMFS.expandFileStorage(node, position + length); + if (node.contents.subarray && buffer.subarray) { + node.contents.set(buffer.subarray(offset, offset + length), position); + } else { + for (var i = 0; i < length; i++) { + node.contents[position + i] = buffer[offset + i]; + } + } + node.usedBytes = Math.max(node.usedBytes, position + length); + return length; + }, + llseek: function llseek(stream, offset, whence) { + var position = offset; + if (whence === 1) { + position += stream.position; + } else if (whence === 2) { + if (FS.isFile(stream.node.mode)) { + position += stream.node.usedBytes; + } + } + if (position < 0) { + throw new FS.ErrnoError(28); + } + return position; + }, + allocate: function allocate(stream, offset, length) { + MEMFS.expandFileStorage(stream.node, offset + length); + stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); + }, + mmap: function mmap(stream, length, position, prot, flags) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + var ptr; + var allocated; + var contents = stream.node.contents; + if (!(flags & 2) && contents.buffer === HEAP8.buffer) { + allocated = false; + ptr = contents.byteOffset; + } else { + if (position > 0 || position + length < contents.length) { + if (contents.subarray) { + contents = contents.subarray(position, position + length); + } else { + contents = Array.prototype.slice.call(contents, position, position + length); + } + } + allocated = true; + ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + HEAP8.set(contents, ptr); + } + return { + ptr: ptr, + allocated: allocated + }; + }, + msync: function msync(stream, buffer, offset, length, mmapFlags) { + MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); + return 0; + } + } +}; +var asyncLoad = function asyncLoad(url, onload, onerror, noRunDep) { + var dep = !noRunDep ? getUniqueRunDependency("al ".concat(url)) : ""; + readAsync(url, function (arrayBuffer) { + onload(new Uint8Array(arrayBuffer)); + if (dep) removeRunDependency(dep); + }, function (event) { + if (onerror) { + onerror(); + } else { + throw "Loading data file \"".concat(url, "\" failed."); + } + }); + if (dep) addRunDependency(dep); +}; +var FS_createDataFile = function FS_createDataFile(parent, name, fileData, canRead, canWrite, canOwn) { + FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn); +}; +var preloadPlugins = Module["preloadPlugins"] || []; +var FS_handledByPreloadPlugin = function FS_handledByPreloadPlugin(byteArray, fullname, finish, onerror) { + if (typeof Browser != "undefined") Browser.init(); + var handled = false; + preloadPlugins.forEach(function (plugin) { + if (handled) return; + if (plugin["canHandle"](fullname)) { + plugin["handle"](byteArray, fullname, finish, onerror); + handled = true; + } + }); + return handled; +}; +var FS_createPreloadedFile = function FS_createPreloadedFile(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; + var dep = getUniqueRunDependency("cp ".concat(fullname)); + function processData(byteArray) { + function finish(byteArray) { + preFinish === null || preFinish === void 0 || preFinish(); + if (!dontCreateFile) { + FS_createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); + } + onload === null || onload === void 0 || onload(); + removeRunDependency(dep); + } + if (FS_handledByPreloadPlugin(byteArray, fullname, finish, function () { + onerror === null || onerror === void 0 || onerror(); + removeRunDependency(dep); + })) { + return; + } + finish(byteArray); + } + addRunDependency(dep); + if (typeof url == "string") { + asyncLoad(url, processData, onerror); + } else { + processData(url); + } +}; +var FS_modeStringToFlags = function FS_modeStringToFlags(str) { + var flagModes = { + "r": 0, + "r+": 2, + "w": 512 | 64 | 1, + "w+": 512 | 64 | 2, + "a": 1024 | 64 | 1, + "a+": 1024 | 64 | 2 + }; + var flags = flagModes[str]; + if (typeof flags == "undefined") { + throw new Error("Unknown file open mode: ".concat(str)); + } + return flags; +}; +var FS_getMode = function FS_getMode(canRead, canWrite) { + var mode = 0; + if (canRead) mode |= 292 | 73; + if (canWrite) mode |= 146; + return mode; +}; +var IDBFS = { + dbs: {}, + indexedDB: function (_indexedDB) { + function indexedDB() { + return _indexedDB.apply(this, arguments); + } + indexedDB.toString = function () { + return _indexedDB.toString(); + }; + return indexedDB; + }(function () { + if (typeof indexedDB != "undefined") return indexedDB; + var ret = null; + if ((typeof window === "undefined" ? "undefined" : _typeof(window)) == "object") ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; + return ret; + }), + DB_VERSION: 21, + DB_STORE_NAME: "FILE_DATA", + mount: function mount() { + return MEMFS.mount.apply(MEMFS, arguments); + }, + syncfs: function syncfs(mount, populate, callback) { + IDBFS.getLocalSet(mount, function (err, local) { + if (err) return callback(err); + IDBFS.getRemoteSet(mount, function (err, remote) { + if (err) return callback(err); + var src = populate ? remote : local; + var dst = populate ? local : remote; + IDBFS.reconcile(src, dst, callback); + }); + }); + }, + quit: function quit() { + Object.values(IDBFS.dbs).forEach(function (value) { + return value.close(); + }); + IDBFS.dbs = {}; + }, + getDB: function getDB(name, callback) { + var db = IDBFS.dbs[name]; + if (db) { + return callback(null, db); + } + var req; + try { + req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION); + } catch (e) { + return callback(e); + } + if (!req) { + return callback("Unable to connect to IndexedDB"); + } + req.onupgradeneeded = function (e) { + var db = e.target.result; + var transaction = e.target.transaction; + var fileStore; + if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) { + fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME); + } else { + fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME); + } + if (!fileStore.indexNames.contains("timestamp")) { + fileStore.createIndex("timestamp", "timestamp", { + unique: false + }); + } + }; + req.onsuccess = function () { + db = req.result; + IDBFS.dbs[name] = db; + callback(null, db); + }; + req.onerror = function (e) { + callback(e.target.error); + e.preventDefault(); + }; + }, + getLocalSet: function getLocalSet(mount, callback) { + var entries = {}; + function isRealDir(p) { + return p !== "." && p !== ".."; + } + function toAbsolute(root) { + return function (p) { + return PATH.join2(root, p); + }; + } + var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint)); + while (check.length) { + var path = check.pop(); + var stat; + try { + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + if (FS.isDir(stat.mode)) { + check.push.apply(check, _toConsumableArray(FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))); + } + entries[path] = { + "timestamp": stat.mtime + }; + } + return callback(null, { + type: "local", + entries: entries + }); + }, + getRemoteSet: function getRemoteSet(mount, callback) { + var entries = {}; + IDBFS.getDB(mount.mountpoint, function (err, db) { + if (err) return callback(err); + try { + var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readonly"); + transaction.onerror = function (e) { + callback(e.target.error); + e.preventDefault(); + }; + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + var index = store.index("timestamp"); + index.openKeyCursor().onsuccess = function (event) { + var cursor = event.target.result; + if (!cursor) { + return callback(null, { + type: "remote", + db: db, + entries: entries + }); + } + entries[cursor.primaryKey] = { + "timestamp": cursor.key + }; + cursor.continue(); + }; + } catch (e) { + return callback(e); + } + }); + }, + loadLocalEntry: function loadLocalEntry(path, callback) { + var stat, node; + try { + var lookup = FS.lookupPath(path); + node = lookup.node; + stat = FS.stat(path); + } catch (e) { + return callback(e); + } + if (FS.isDir(stat.mode)) { + return callback(null, { + "timestamp": stat.mtime, + "mode": stat.mode + }); + } else if (FS.isFile(stat.mode)) { + node.contents = MEMFS.getFileDataAsTypedArray(node); + return callback(null, { + "timestamp": stat.mtime, + "mode": stat.mode, + "contents": node.contents + }); + } else { + return callback(new Error("node type not supported")); + } + }, + storeLocalEntry: function storeLocalEntry(path, entry, callback) { + try { + if (FS.isDir(entry["mode"])) { + FS.mkdirTree(path, entry["mode"]); + } else if (FS.isFile(entry["mode"])) { + FS.writeFile(path, entry["contents"], { + canOwn: true + }); + } else { + return callback(new Error("node type not supported")); + } + FS.chmod(path, entry["mode"]); + FS.utime(path, entry["timestamp"], entry["timestamp"]); + } catch (e) { + return callback(e); + } + callback(null); + }, + removeLocalEntry: function removeLocalEntry(path, callback) { + try { + var stat = FS.stat(path); + if (FS.isDir(stat.mode)) { + FS.rmdir(path); + } else if (FS.isFile(stat.mode)) { + FS.unlink(path); + } + } catch (e) { + return callback(e); + } + callback(null); + }, + loadRemoteEntry: function loadRemoteEntry(store, path, callback) { + var req = store.get(path); + req.onsuccess = function (event) { + return callback(null, event.target.result); + }; + req.onerror = function (e) { + callback(e.target.error); + e.preventDefault(); + }; + }, + storeRemoteEntry: function storeRemoteEntry(store, path, entry, callback) { + try { + var req = store.put(entry, path); + } catch (e) { + callback(e); + return; + } + req.onsuccess = function (event) { + return callback(); + }; + req.onerror = function (e) { + callback(e.target.error); + e.preventDefault(); + }; + }, + removeRemoteEntry: function removeRemoteEntry(store, path, callback) { + var req = store.delete(path); + req.onsuccess = function (event) { + return callback(); + }; + req.onerror = function (e) { + callback(e.target.error); + e.preventDefault(); + }; + }, + reconcile: function reconcile(src, dst, callback) { + var total = 0; + var create = []; + Object.keys(src.entries).forEach(function (key) { + var e = src.entries[key]; + var e2 = dst.entries[key]; + if (!e2 || e["timestamp"].getTime() != e2["timestamp"].getTime()) { + create.push(key); + total++; + } + }); + var remove = []; + Object.keys(dst.entries).forEach(function (key) { + if (!src.entries[key]) { + remove.push(key); + total++; + } + }); + if (!total) { + return callback(null); + } + var errored = false; + var db = src.type === "remote" ? src.db : dst.db; + var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readwrite"); + var store = transaction.objectStore(IDBFS.DB_STORE_NAME); + function done(err) { + if (err && !errored) { + errored = true; + return callback(err); + } + } + transaction.onerror = transaction.onabort = function (e) { + done(e.target.error); + e.preventDefault(); + }; + transaction.oncomplete = function (e) { + if (!errored) { + callback(null); + } + }; + create.sort().forEach(function (path) { + if (dst.type === "local") { + IDBFS.loadRemoteEntry(store, path, function (err, entry) { + if (err) return done(err); + IDBFS.storeLocalEntry(path, entry, done); + }); + } else { + IDBFS.loadLocalEntry(path, function (err, entry) { + if (err) return done(err); + IDBFS.storeRemoteEntry(store, path, entry, done); + }); + } + }); + remove.sort().reverse().forEach(function (path) { + if (dst.type === "local") { + IDBFS.removeLocalEntry(path, done); + } else { + IDBFS.removeRemoteEntry(store, path, done); + } + }); + } +}; +var FS = { + root: null, + mounts: [], + devices: {}, + streams: [], + nextInode: 1, + nameTable: null, + currentPath: "/", + initialized: false, + ignorePermissions: true, + ErrnoError: /*#__PURE__*/_createClass(function ErrnoError(errno) { + "use strict"; + + _classCallCheck(this, ErrnoError); + this.name = "ErrnoError"; + this.errno = errno; + }), + genericErrors: {}, + filesystems: null, + syncFSRequests: 0, + FSStream: /*#__PURE__*/function () { + "use strict"; + + function FSStream() { + _classCallCheck(this, FSStream); + this.shared = {}; + } + _createClass(FSStream, [{ + key: "object", + get: function get() { + return this.node; + }, + set: function set(val) { + this.node = val; + } + }, { + key: "isRead", + get: function get() { + return (this.flags & 2097155) !== 1; + } + }, { + key: "isWrite", + get: function get() { + return (this.flags & 2097155) !== 0; + } + }, { + key: "isAppend", + get: function get() { + return this.flags & 1024; + } + }, { + key: "flags", + get: function get() { + return this.shared.flags; + }, + set: function set(val) { + this.shared.flags = val; + } + }, { + key: "position", + get: function get() { + return this.shared.position; + }, + set: function set(val) { + this.shared.position = val; + } + }]); + return FSStream; + }(), + FSNode: /*#__PURE__*/function () { + "use strict"; + + function FSNode(parent, name, mode, rdev) { + _classCallCheck(this, FSNode); + if (!parent) { + parent = this; + } + this.parent = parent; + this.mount = parent.mount; + this.mounted = null; + this.id = FS.nextInode++; + this.name = name; + this.mode = mode; + this.node_ops = {}; + this.stream_ops = {}; + this.rdev = rdev; + this.readMode = 292 | 73; + this.writeMode = 146; + } + _createClass(FSNode, [{ + key: "read", + get: function get() { + return (this.mode & this.readMode) === this.readMode; + }, + set: function set(val) { + val ? this.mode |= this.readMode : this.mode &= ~this.readMode; + } + }, { + key: "write", + get: function get() { + return (this.mode & this.writeMode) === this.writeMode; + }, + set: function set(val) { + val ? this.mode |= this.writeMode : this.mode &= ~this.writeMode; + } + }, { + key: "isFolder", + get: function get() { + return FS.isDir(this.mode); + } + }, { + key: "isDevice", + get: function get() { + return FS.isChrdev(this.mode); + } + }]); + return FSNode; + }(), + lookupPath: function lookupPath(path) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + path = PATH_FS.resolve(path); + if (!path) return { + path: "", + node: null + }; + var defaults = { + follow_mount: true, + recurse_count: 0 + }; + opts = Object.assign(defaults, opts); + if (opts.recurse_count > 8) { + throw new FS.ErrnoError(32); + } + var parts = path.split("/").filter(function (p) { + return !!p; + }); + var current = FS.root; + var current_path = "/"; + for (var i = 0; i < parts.length; i++) { + var islast = i === parts.length - 1; + if (islast && opts.parent) { + break; + } + current = FS.lookupNode(current, parts[i]); + current_path = PATH.join2(current_path, parts[i]); + if (FS.isMountpoint(current)) { + if (!islast || islast && opts.follow_mount) { + current = current.mounted.root; + } + } + if (!islast || opts.follow) { + var count = 0; + while (FS.isLink(current.mode)) { + var link = FS.readlink(current_path); + current_path = PATH_FS.resolve(PATH.dirname(current_path), link); + var lookup = FS.lookupPath(current_path, { + recurse_count: opts.recurse_count + 1 + }); + current = lookup.node; + if (count++ > 40) { + throw new FS.ErrnoError(32); + } + } + } + } + return { + path: current_path, + node: current + }; + }, + getPath: function getPath(node) { + var path; + while (true) { + if (FS.isRoot(node)) { + var mount = node.mount.mountpoint; + if (!path) return mount; + return mount[mount.length - 1] !== "/" ? "".concat(mount, "/").concat(path) : mount + path; + } + path = path ? "".concat(node.name, "/").concat(path) : node.name; + node = node.parent; + } + }, + hashName: function hashName(parentid, name) { + var hash = 0; + for (var i = 0; i < name.length; i++) { + hash = (hash << 5) - hash + name.charCodeAt(i) | 0; + } + return (parentid + hash >>> 0) % FS.nameTable.length; + }, + hashAddNode: function hashAddNode(node) { + var hash = FS.hashName(node.parent.id, node.name); + node.name_next = FS.nameTable[hash]; + FS.nameTable[hash] = node; + }, + hashRemoveNode: function hashRemoveNode(node) { + var hash = FS.hashName(node.parent.id, node.name); + if (FS.nameTable[hash] === node) { + FS.nameTable[hash] = node.name_next; + } else { + var current = FS.nameTable[hash]; + while (current) { + if (current.name_next === node) { + current.name_next = node.name_next; + break; + } + current = current.name_next; + } + } + }, + lookupNode: function lookupNode(parent, name) { + var errCode = FS.mayLookup(parent); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + var hash = FS.hashName(parent.id, name); + for (var node = FS.nameTable[hash]; node; node = node.name_next) { + var nodeName = node.name; + if (node.parent.id === parent.id && nodeName === name) { + return node; + } + } + return FS.lookup(parent, name); + }, + createNode: function createNode(parent, name, mode, rdev) { + var node = new FS.FSNode(parent, name, mode, rdev); + FS.hashAddNode(node); + return node; + }, + destroyNode: function destroyNode(node) { + FS.hashRemoveNode(node); + }, + isRoot: function isRoot(node) { + return node === node.parent; + }, + isMountpoint: function isMountpoint(node) { + return !!node.mounted; + }, + isFile: function isFile(mode) { + return (mode & 61440) === 32768; + }, + isDir: function isDir(mode) { + return (mode & 61440) === 16384; + }, + isLink: function isLink(mode) { + return (mode & 61440) === 40960; + }, + isChrdev: function isChrdev(mode) { + return (mode & 61440) === 8192; + }, + isBlkdev: function isBlkdev(mode) { + return (mode & 61440) === 24576; + }, + isFIFO: function isFIFO(mode) { + return (mode & 61440) === 4096; + }, + isSocket: function isSocket(mode) { + return (mode & 49152) === 49152; + }, + flagsToPermissionString: function flagsToPermissionString(flag) { + var perms = ["r", "w", "rw"][flag & 3]; + if (flag & 512) { + perms += "w"; + } + return perms; + }, + nodePermissions: function nodePermissions(node, perms) { + if (FS.ignorePermissions) { + return 0; + } + if (perms.includes("r") && !(node.mode & 292)) { + return 2; + } else if (perms.includes("w") && !(node.mode & 146)) { + return 2; + } else if (perms.includes("x") && !(node.mode & 73)) { + return 2; + } + return 0; + }, + mayLookup: function mayLookup(dir) { + if (!FS.isDir(dir.mode)) return 54; + var errCode = FS.nodePermissions(dir, "x"); + if (errCode) return errCode; + if (!dir.node_ops.lookup) return 2; + return 0; + }, + mayCreate: function mayCreate(dir, name) { + try { + var node = FS.lookupNode(dir, name); + return 20; + } catch (e) {} + return FS.nodePermissions(dir, "wx"); + }, + mayDelete: function mayDelete(dir, name, isdir) { + var node; + try { + node = FS.lookupNode(dir, name); + } catch (e) { + return e.errno; + } + var errCode = FS.nodePermissions(dir, "wx"); + if (errCode) { + return errCode; + } + if (isdir) { + if (!FS.isDir(node.mode)) { + return 54; + } + if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { + return 10; + } + } else { + if (FS.isDir(node.mode)) { + return 31; + } + } + return 0; + }, + mayOpen: function mayOpen(node, flags) { + if (!node) { + return 44; + } + if (FS.isLink(node.mode)) { + return 32; + } else if (FS.isDir(node.mode)) { + if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) { + return 31; + } + } + return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); + }, + MAX_OPEN_FDS: 4096, + nextfd: function nextfd() { + for (var fd = 0; fd <= FS.MAX_OPEN_FDS; fd++) { + if (!FS.streams[fd]) { + return fd; + } + } + throw new FS.ErrnoError(33); + }, + getStreamChecked: function getStreamChecked(fd) { + var stream = FS.getStream(fd); + if (!stream) { + throw new FS.ErrnoError(8); + } + return stream; + }, + getStream: function getStream(fd) { + return FS.streams[fd]; + }, + createStream: function createStream(stream) { + var fd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + stream = Object.assign(new FS.FSStream(), stream); + if (fd == -1) { + fd = FS.nextfd(); + } + stream.fd = fd; + FS.streams[fd] = stream; + return stream; + }, + closeStream: function closeStream(fd) { + FS.streams[fd] = null; + }, + dupStream: function dupStream(origStream) { + var _stream$stream_ops, _stream$stream_ops$du; + var fd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1; + var stream = FS.createStream(origStream, fd); + (_stream$stream_ops = stream.stream_ops) === null || _stream$stream_ops === void 0 || (_stream$stream_ops$du = _stream$stream_ops.dup) === null || _stream$stream_ops$du === void 0 || _stream$stream_ops$du.call(_stream$stream_ops, stream); + return stream; + }, + chrdev_stream_ops: { + open: function open(stream) { + var _stream$stream_ops$op, _stream$stream_ops2; + var device = FS.getDevice(stream.node.rdev); + stream.stream_ops = device.stream_ops; + (_stream$stream_ops$op = (_stream$stream_ops2 = stream.stream_ops).open) === null || _stream$stream_ops$op === void 0 || _stream$stream_ops$op.call(_stream$stream_ops2, stream); + }, + llseek: function llseek() { + throw new FS.ErrnoError(70); + } + }, + major: function major(dev) { + return dev >> 8; + }, + minor: function minor(dev) { + return dev & 255; + }, + makedev: function makedev(ma, mi) { + return ma << 8 | mi; + }, + registerDevice: function registerDevice(dev, ops) { + FS.devices[dev] = { + stream_ops: ops + }; + }, + getDevice: function getDevice(dev) { + return FS.devices[dev]; + }, + getMounts: function getMounts(mount) { + var mounts = []; + var check = [mount]; + while (check.length) { + var m = check.pop(); + mounts.push(m); + check.push.apply(check, _toConsumableArray(m.mounts)); + } + return mounts; + }, + syncfs: function syncfs(populate, callback) { + if (typeof populate == "function") { + callback = populate; + populate = false; + } + FS.syncFSRequests++; + if (FS.syncFSRequests > 1) { + err("warning: ".concat(FS.syncFSRequests, " FS.syncfs operations in flight at once, probably just doing extra work")); + } + var mounts = FS.getMounts(FS.root.mount); + var completed = 0; + function doCallback(errCode) { + FS.syncFSRequests--; + return callback(errCode); + } + function done(errCode) { + if (errCode) { + if (!done.errored) { + done.errored = true; + return doCallback(errCode); + } + return; + } + if (++completed >= mounts.length) { + doCallback(null); + } + } + mounts.forEach(function (mount) { + if (!mount.type.syncfs) { + return done(null); + } + mount.type.syncfs(mount, populate, done); + }); + }, + mount: function mount(type, opts, mountpoint) { + var root = mountpoint === "/"; + var pseudo = !mountpoint; + var node; + if (root && FS.root) { + throw new FS.ErrnoError(10); + } else if (!root && !pseudo) { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + mountpoint = lookup.path; + node = lookup.node; + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + if (!FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + } + var mount = { + type: type, + opts: opts, + mountpoint: mountpoint, + mounts: [] + }; + var mountRoot = type.mount(mount); + mountRoot.mount = mount; + mount.root = mountRoot; + if (root) { + FS.root = mountRoot; + } else if (node) { + node.mounted = mount; + if (node.mount) { + node.mount.mounts.push(mount); + } + } + return mountRoot; + }, + unmount: function unmount(mountpoint) { + var lookup = FS.lookupPath(mountpoint, { + follow_mount: false + }); + if (!FS.isMountpoint(lookup.node)) { + throw new FS.ErrnoError(28); + } + var node = lookup.node; + var mount = node.mounted; + var mounts = FS.getMounts(mount); + Object.keys(FS.nameTable).forEach(function (hash) { + var current = FS.nameTable[hash]; + while (current) { + var next = current.name_next; + if (mounts.includes(current.mount)) { + FS.destroyNode(current); + } + current = next; + } + }); + node.mounted = null; + var idx = node.mount.mounts.indexOf(mount); + node.mount.mounts.splice(idx, 1); + }, + lookup: function lookup(parent, name) { + return parent.node_ops.lookup(parent, name); + }, + mknod: function mknod(path, mode, dev) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + if (!name || name === "." || name === "..") { + throw new FS.ErrnoError(28); + } + var errCode = FS.mayCreate(parent, name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.mknod) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.mknod(parent, name, mode, dev); + }, + create: function create(path, mode) { + mode = mode !== undefined ? mode : 438; + mode &= 4095; + mode |= 32768; + return FS.mknod(path, mode, 0); + }, + mkdir: function mkdir(path, mode) { + mode = mode !== undefined ? mode : 511; + mode &= 511 | 512; + mode |= 16384; + return FS.mknod(path, mode, 0); + }, + mkdirTree: function mkdirTree(path, mode) { + var dirs = path.split("/"); + var d = ""; + for (var i = 0; i < dirs.length; ++i) { + if (!dirs[i]) continue; + d += "/" + dirs[i]; + try { + FS.mkdir(d, mode); + } catch (e) { + if (e.errno != 20) throw e; + } + } + }, + mkdev: function mkdev(path, mode, dev) { + if (typeof dev == "undefined") { + dev = mode; + mode = 438; + } + mode |= 8192; + return FS.mknod(path, mode, dev); + }, + symlink: function symlink(oldpath, newpath) { + if (!PATH_FS.resolve(oldpath)) { + throw new FS.ErrnoError(44); + } + var lookup = FS.lookupPath(newpath, { + parent: true + }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + var newname = PATH.basename(newpath); + var errCode = FS.mayCreate(parent, newname); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.symlink) { + throw new FS.ErrnoError(63); + } + return parent.node_ops.symlink(parent, newname, oldpath); + }, + rename: function rename(old_path, new_path) { + var old_dirname = PATH.dirname(old_path); + var new_dirname = PATH.dirname(new_path); + var old_name = PATH.basename(old_path); + var new_name = PATH.basename(new_path); + var lookup, old_dir, new_dir; + lookup = FS.lookupPath(old_path, { + parent: true + }); + old_dir = lookup.node; + lookup = FS.lookupPath(new_path, { + parent: true + }); + new_dir = lookup.node; + if (!old_dir || !new_dir) throw new FS.ErrnoError(44); + if (old_dir.mount !== new_dir.mount) { + throw new FS.ErrnoError(75); + } + var old_node = FS.lookupNode(old_dir, old_name); + var relative = PATH_FS.relative(old_path, new_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(28); + } + relative = PATH_FS.relative(new_path, old_dirname); + if (relative.charAt(0) !== ".") { + throw new FS.ErrnoError(55); + } + var new_node; + try { + new_node = FS.lookupNode(new_dir, new_name); + } catch (e) {} + if (old_node === new_node) { + return; + } + var isdir = FS.isDir(old_node.mode); + var errCode = FS.mayDelete(old_dir, old_name, isdir); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + errCode = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!old_dir.node_ops.rename) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(old_node) || new_node && FS.isMountpoint(new_node)) { + throw new FS.ErrnoError(10); + } + if (new_dir !== old_dir) { + errCode = FS.nodePermissions(old_dir, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + FS.hashRemoveNode(old_node); + try { + old_dir.node_ops.rename(old_node, new_dir, new_name); + } catch (e) { + throw e; + } finally { + FS.hashAddNode(old_node); + } + }, + rmdir: function rmdir(path) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, true); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.rmdir) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.rmdir(parent, name); + FS.destroyNode(node); + }, + readdir: function readdir(path) { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + if (!node.node_ops.readdir) { + throw new FS.ErrnoError(54); + } + return node.node_ops.readdir(node); + }, + unlink: function unlink(path) { + var lookup = FS.lookupPath(path, { + parent: true + }); + var parent = lookup.node; + if (!parent) { + throw new FS.ErrnoError(44); + } + var name = PATH.basename(path); + var node = FS.lookupNode(parent, name); + var errCode = FS.mayDelete(parent, name, false); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + if (!parent.node_ops.unlink) { + throw new FS.ErrnoError(63); + } + if (FS.isMountpoint(node)) { + throw new FS.ErrnoError(10); + } + parent.node_ops.unlink(parent, name); + FS.destroyNode(node); + }, + readlink: function readlink(path) { + var lookup = FS.lookupPath(path); + var link = lookup.node; + if (!link) { + throw new FS.ErrnoError(44); + } + if (!link.node_ops.readlink) { + throw new FS.ErrnoError(28); + } + return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); + }, + stat: function stat(path, dontFollow) { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + var node = lookup.node; + if (!node) { + throw new FS.ErrnoError(44); + } + if (!node.node_ops.getattr) { + throw new FS.ErrnoError(63); + } + return node.node_ops.getattr(node); + }, + lstat: function lstat(path) { + return FS.stat(path, true); + }, + chmod: function chmod(path, mode, dontFollow) { + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + mode: mode & 4095 | node.mode & ~4095, + timestamp: Date.now() + }); + }, + lchmod: function lchmod(path, mode) { + FS.chmod(path, mode, true); + }, + fchmod: function fchmod(fd, mode) { + var stream = FS.getStreamChecked(fd); + FS.chmod(stream.node, mode); + }, + chown: function chown(path, uid, gid, dontFollow) { + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: !dontFollow + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + node.node_ops.setattr(node, { + timestamp: Date.now() + }); + }, + lchown: function lchown(path, uid, gid) { + FS.chown(path, uid, gid, true); + }, + fchown: function fchown(fd, uid, gid) { + var stream = FS.getStreamChecked(fd); + FS.chown(stream.node, uid, gid); + }, + truncate: function truncate(path, len) { + if (len < 0) { + throw new FS.ErrnoError(28); + } + var node; + if (typeof path == "string") { + var lookup = FS.lookupPath(path, { + follow: true + }); + node = lookup.node; + } else { + node = path; + } + if (!node.node_ops.setattr) { + throw new FS.ErrnoError(63); + } + if (FS.isDir(node.mode)) { + throw new FS.ErrnoError(31); + } + if (!FS.isFile(node.mode)) { + throw new FS.ErrnoError(28); + } + var errCode = FS.nodePermissions(node, "w"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + node.node_ops.setattr(node, { + size: len, + timestamp: Date.now() + }); + }, + ftruncate: function ftruncate(fd, len) { + var stream = FS.getStreamChecked(fd); + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(28); + } + FS.truncate(stream.node, len); + }, + utime: function utime(path, atime, mtime) { + var lookup = FS.lookupPath(path, { + follow: true + }); + var node = lookup.node; + node.node_ops.setattr(node, { + timestamp: Math.max(atime, mtime) + }); + }, + open: function open(path, flags, mode) { + if (path === "") { + throw new FS.ErrnoError(44); + } + flags = typeof flags == "string" ? FS_modeStringToFlags(flags) : flags; + mode = typeof mode == "undefined" ? 438 : mode; + if (flags & 64) { + mode = mode & 4095 | 32768; + } else { + mode = 0; + } + var node; + if (_typeof(path) == "object") { + node = path; + } else { + path = PATH.normalize(path); + try { + var lookup = FS.lookupPath(path, { + follow: !(flags & 131072) + }); + node = lookup.node; + } catch (e) {} + } + var created = false; + if (flags & 64) { + if (node) { + if (flags & 128) { + throw new FS.ErrnoError(20); + } + } else { + node = FS.mknod(path, mode, 0); + created = true; + } + } + if (!node) { + throw new FS.ErrnoError(44); + } + if (FS.isChrdev(node.mode)) { + flags &= ~512; + } + if (flags & 65536 && !FS.isDir(node.mode)) { + throw new FS.ErrnoError(54); + } + if (!created) { + var errCode = FS.mayOpen(node, flags); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + } + if (flags & 512 && !created) { + FS.truncate(node, 0); + } + flags &= ~(128 | 512 | 131072); + var stream = FS.createStream({ + node: node, + path: FS.getPath(node), + flags: flags, + seekable: true, + position: 0, + stream_ops: node.stream_ops, + ungotten: [], + error: false + }); + if (stream.stream_ops.open) { + stream.stream_ops.open(stream); + } + if (Module["logReadFiles"] && !(flags & 1)) { + if (!FS.readFiles) FS.readFiles = {}; + if (!(path in FS.readFiles)) { + FS.readFiles[path] = 1; + } + } + return stream; + }, + close: function close(stream) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (stream.getdents) stream.getdents = null; + try { + if (stream.stream_ops.close) { + stream.stream_ops.close(stream); + } + } catch (e) { + throw e; + } finally { + FS.closeStream(stream.fd); + } + stream.fd = null; + }, + isClosed: function isClosed(stream) { + return stream.fd === null; + }, + llseek: function llseek(stream, offset, whence) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (!stream.seekable || !stream.stream_ops.llseek) { + throw new FS.ErrnoError(70); + } + if (whence != 0 && whence != 1 && whence != 2) { + throw new FS.ErrnoError(28); + } + stream.position = stream.stream_ops.llseek(stream, offset, whence); + stream.ungotten = []; + return stream.position; + }, + read: function read(stream, buffer, offset, length, position) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.read) { + throw new FS.ErrnoError(28); + } + var seeking = typeof position != "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); + if (!seeking) stream.position += bytesRead; + return bytesRead; + }, + write: function write(stream, buffer, offset, length, position, canOwn) { + if (length < 0 || position < 0) { + throw new FS.ErrnoError(28); + } + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(31); + } + if (!stream.stream_ops.write) { + throw new FS.ErrnoError(28); + } + if (stream.seekable && stream.flags & 1024) { + FS.llseek(stream, 0, 2); + } + var seeking = typeof position != "undefined"; + if (!seeking) { + position = stream.position; + } else if (!stream.seekable) { + throw new FS.ErrnoError(70); + } + var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); + if (!seeking) stream.position += bytesWritten; + return bytesWritten; + }, + allocate: function allocate(stream, offset, length) { + if (FS.isClosed(stream)) { + throw new FS.ErrnoError(8); + } + if (offset < 0 || length <= 0) { + throw new FS.ErrnoError(28); + } + if ((stream.flags & 2097155) === 0) { + throw new FS.ErrnoError(8); + } + if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (!stream.stream_ops.allocate) { + throw new FS.ErrnoError(138); + } + stream.stream_ops.allocate(stream, offset, length); + }, + mmap: function mmap(stream, length, position, prot, flags) { + if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) { + throw new FS.ErrnoError(2); + } + if ((stream.flags & 2097155) === 1) { + throw new FS.ErrnoError(2); + } + if (!stream.stream_ops.mmap) { + throw new FS.ErrnoError(43); + } + return stream.stream_ops.mmap(stream, length, position, prot, flags); + }, + msync: function msync(stream, buffer, offset, length, mmapFlags) { + if (!stream.stream_ops.msync) { + return 0; + } + return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); + }, + ioctl: function ioctl(stream, cmd, arg) { + if (!stream.stream_ops.ioctl) { + throw new FS.ErrnoError(59); + } + return stream.stream_ops.ioctl(stream, cmd, arg); + }, + readFile: function readFile(path) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + opts.flags = opts.flags || 0; + opts.encoding = opts.encoding || "binary"; + if (opts.encoding !== "utf8" && opts.encoding !== "binary") { + throw new Error("Invalid encoding type \"".concat(opts.encoding, "\"")); + } + var ret; + var stream = FS.open(path, opts.flags); + var stat = FS.stat(path); + var length = stat.size; + var buf = new Uint8Array(length); + FS.read(stream, buf, 0, length, 0); + if (opts.encoding === "utf8") { + ret = UTF8ArrayToString(buf, 0); + } else if (opts.encoding === "binary") { + ret = buf; + } + FS.close(stream); + return ret; + }, + writeFile: function writeFile(path, data) { + var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + opts.flags = opts.flags || 577; + var stream = FS.open(path, opts.flags, opts.mode); + if (typeof data == "string") { + var buf = new Uint8Array(lengthBytesUTF8(data) + 1); + var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); + FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); + } else if (ArrayBuffer.isView(data)) { + FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); + } else { + throw new Error("Unsupported data type"); + } + FS.close(stream); + }, + cwd: function cwd() { + return FS.currentPath; + }, + chdir: function chdir(path) { + var lookup = FS.lookupPath(path, { + follow: true + }); + if (lookup.node === null) { + throw new FS.ErrnoError(44); + } + if (!FS.isDir(lookup.node.mode)) { + throw new FS.ErrnoError(54); + } + var errCode = FS.nodePermissions(lookup.node, "x"); + if (errCode) { + throw new FS.ErrnoError(errCode); + } + FS.currentPath = lookup.path; + }, + createDefaultDirectories: function createDefaultDirectories() { + FS.mkdir("/tmp"); + FS.mkdir("/home"); + FS.mkdir("/home/web_user"); + }, + createDefaultDevices: function createDefaultDevices() { + FS.mkdir("/dev"); + FS.registerDevice(FS.makedev(1, 3), { + read: function read() { + return 0; + }, + write: function write(stream, buffer, offset, length, pos) { + return length; + } + }); + FS.mkdev("/dev/null", FS.makedev(1, 3)); + TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); + TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); + FS.mkdev("/dev/tty", FS.makedev(5, 0)); + FS.mkdev("/dev/tty1", FS.makedev(6, 0)); + var randomBuffer = new Uint8Array(1024), + randomLeft = 0; + var randomByte = function randomByte() { + if (randomLeft === 0) { + randomLeft = _randomFill(randomBuffer).byteLength; + } + return randomBuffer[--randomLeft]; + }; + FS.createDevice("/dev", "random", randomByte); + FS.createDevice("/dev", "urandom", randomByte); + FS.mkdir("/dev/shm"); + FS.mkdir("/dev/shm/tmp"); + }, + createSpecialDirectories: function createSpecialDirectories() { + FS.mkdir("/proc"); + var proc_self = FS.mkdir("/proc/self"); + FS.mkdir("/proc/self/fd"); + FS.mount({ + mount: function mount() { + var node = FS.createNode(proc_self, "fd", 16384 | 511, 73); + node.node_ops = { + lookup: function lookup(parent, name) { + var fd = +name; + var stream = FS.getStreamChecked(fd); + var ret = { + parent: null, + mount: { + mountpoint: "fake" + }, + node_ops: { + readlink: function readlink() { + return stream.path; + } + } + }; + ret.parent = ret; + return ret; + } + }; + return node; + } + }, {}, "/proc/self/fd"); + }, + createStandardStreams: function createStandardStreams() { + if (Module["stdin"]) { + FS.createDevice("/dev", "stdin", Module["stdin"]); + } else { + FS.symlink("/dev/tty", "/dev/stdin"); + } + if (Module["stdout"]) { + FS.createDevice("/dev", "stdout", null, Module["stdout"]); + } else { + FS.symlink("/dev/tty", "/dev/stdout"); + } + if (Module["stderr"]) { + FS.createDevice("/dev", "stderr", null, Module["stderr"]); + } else { + FS.symlink("/dev/tty1", "/dev/stderr"); + } + var stdin = FS.open("/dev/stdin", 0); + var stdout = FS.open("/dev/stdout", 1); + var stderr = FS.open("/dev/stderr", 1); + }, + staticInit: function staticInit() { + [44].forEach(function (code) { + FS.genericErrors[code] = new FS.ErrnoError(code); + FS.genericErrors[code].stack = ""; + }); + FS.nameTable = new Array(4096); + FS.mount(MEMFS, {}, "/"); + FS.createDefaultDirectories(); + FS.createDefaultDevices(); + FS.createSpecialDirectories(); + FS.filesystems = { + "MEMFS": MEMFS, + "IDBFS": IDBFS + }; + }, + init: function init(input, output, error) { + FS.init.initialized = true; + Module["stdin"] = input || Module["stdin"]; + Module["stdout"] = output || Module["stdout"]; + Module["stderr"] = error || Module["stderr"]; + FS.createStandardStreams(); + }, + quit: function quit() { + FS.init.initialized = false; + for (var i = 0; i < FS.streams.length; i++) { + var stream = FS.streams[i]; + if (!stream) { + continue; + } + FS.close(stream); + } + }, + findObject: function findObject(path, dontResolveLastLink) { + var ret = FS.analyzePath(path, dontResolveLastLink); + if (!ret.exists) { + return null; + } + return ret.object; + }, + analyzePath: function analyzePath(path, dontResolveLastLink) { + try { + var lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + path = lookup.path; + } catch (e) {} + var ret = { + isRoot: false, + exists: false, + error: 0, + name: null, + path: null, + object: null, + parentExists: false, + parentPath: null, + parentObject: null + }; + try { + var lookup = FS.lookupPath(path, { + parent: true + }); + ret.parentExists = true; + ret.parentPath = lookup.path; + ret.parentObject = lookup.node; + ret.name = PATH.basename(path); + lookup = FS.lookupPath(path, { + follow: !dontResolveLastLink + }); + ret.exists = true; + ret.path = lookup.path; + ret.object = lookup.node; + ret.name = lookup.node.name; + ret.isRoot = lookup.path === "/"; + } catch (e) { + ret.error = e.errno; + } + return ret; + }, + createPath: function createPath(parent, path, canRead, canWrite) { + parent = typeof parent == "string" ? parent : FS.getPath(parent); + var parts = path.split("/").reverse(); + while (parts.length) { + var part = parts.pop(); + if (!part) continue; + var current = PATH.join2(parent, part); + try { + FS.mkdir(current); + } catch (e) {} + parent = current; + } + return current; + }, + createFile: function createFile(parent, name, properties, canRead, canWrite) { + var path = PATH.join2(typeof parent == "string" ? parent : FS.getPath(parent), name); + var mode = FS_getMode(canRead, canWrite); + return FS.create(path, mode); + }, + createDataFile: function createDataFile(parent, name, data, canRead, canWrite, canOwn) { + var path = name; + if (parent) { + parent = typeof parent == "string" ? parent : FS.getPath(parent); + path = name ? PATH.join2(parent, name) : parent; + } + var mode = FS_getMode(canRead, canWrite); + var node = FS.create(path, mode); + if (data) { + if (typeof data == "string") { + var arr = new Array(data.length); + for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); + data = arr; + } + FS.chmod(node, mode | 146); + var stream = FS.open(node, 577); + FS.write(stream, data, 0, data.length, 0, canOwn); + FS.close(stream); + FS.chmod(node, mode); + } + }, + createDevice: function createDevice(parent, name, input, output) { + var path = PATH.join2(typeof parent == "string" ? parent : FS.getPath(parent), name); + var mode = FS_getMode(!!input, !!output); + if (!FS.createDevice.major) FS.createDevice.major = 64; + var dev = FS.makedev(FS.createDevice.major++, 0); + FS.registerDevice(dev, { + open: function open(stream) { + stream.seekable = false; + }, + close: function close(stream) { + var _output$buffer; + if (output !== null && output !== void 0 && (_output$buffer = output.buffer) !== null && _output$buffer !== void 0 && _output$buffer.length) { + output(10); + } + }, + read: function read(stream, buffer, offset, length, pos) { + var bytesRead = 0; + for (var i = 0; i < length; i++) { + var result; + try { + result = input(); + } catch (e) { + throw new FS.ErrnoError(29); + } + if (result === undefined && bytesRead === 0) { + throw new FS.ErrnoError(6); + } + if (result === null || result === undefined) break; + bytesRead++; + buffer[offset + i] = result; + } + if (bytesRead) { + stream.node.timestamp = Date.now(); + } + return bytesRead; + }, + write: function write(stream, buffer, offset, length, pos) { + for (var i = 0; i < length; i++) { + try { + output(buffer[offset + i]); + } catch (e) { + throw new FS.ErrnoError(29); + } + } + if (length) { + stream.node.timestamp = Date.now(); + } + return i; + } + }); + return FS.mkdev(path, mode, dev); + }, + forceLoadFile: function forceLoadFile(obj) { + if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; + if (typeof XMLHttpRequest != "undefined") { + throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); + } else if (read_) { + try { + obj.contents = intArrayFromString(read_(obj.url), true); + obj.usedBytes = obj.contents.length; + } catch (e) { + throw new FS.ErrnoError(29); + } + } else { + throw new Error("Cannot load without read() or XMLHttpRequest."); + } + }, + createLazyFile: function createLazyFile(parent, name, url, canRead, canWrite) { + var LazyUint8Array = /*#__PURE__*/function () { + "use strict"; + + function LazyUint8Array() { + _classCallCheck(this, LazyUint8Array); + this.lengthKnown = false; + this.chunks = []; + } + _createClass(LazyUint8Array, [{ + key: "get", + value: function get(idx) { + if (idx > this.length - 1 || idx < 0) { + return undefined; + } + var chunkOffset = idx % this.chunkSize; + var chunkNum = idx / this.chunkSize | 0; + return this.getter(chunkNum)[chunkOffset]; + } + }, { + key: "setDataGetter", + value: function setDataGetter(getter) { + this.getter = getter; + } + }, { + key: "cacheLength", + value: function cacheLength() { + var xhr = new XMLHttpRequest(); + xhr.open("HEAD", url, false); + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + var datalength = Number(xhr.getResponseHeader("Content-length")); + var header; + var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; + var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; + var chunkSize = 1024 * 1024; + if (!hasByteServing) chunkSize = datalength; + var doXHR = function doXHR(from, to) { + if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); + if (to > datalength - 1) throw new Error("only " + datalength + " bytes available! programmer error!"); + var xhr = new XMLHttpRequest(); + xhr.open("GET", url, false); + if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); + xhr.responseType = "arraybuffer"; + if (xhr.overrideMimeType) { + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + } + xhr.send(null); + if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); + if (xhr.response !== undefined) { + return new Uint8Array(xhr.response || []); + } + return intArrayFromString(xhr.responseText || "", true); + }; + var lazyArray = this; + lazyArray.setDataGetter(function (chunkNum) { + var start = chunkNum * chunkSize; + var end = (chunkNum + 1) * chunkSize - 1; + end = Math.min(end, datalength - 1); + if (typeof lazyArray.chunks[chunkNum] == "undefined") { + lazyArray.chunks[chunkNum] = doXHR(start, end); + } + if (typeof lazyArray.chunks[chunkNum] == "undefined") throw new Error("doXHR failed!"); + return lazyArray.chunks[chunkNum]; + }); + if (usesGzip || !datalength) { + chunkSize = datalength = 1; + datalength = this.getter(0).length; + chunkSize = datalength; + out("LazyFiles on gzip forces download of the whole file when length is accessed"); + } + this._length = datalength; + this._chunkSize = chunkSize; + this.lengthKnown = true; + } + }, { + key: "length", + get: function get() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._length; + } + }, { + key: "chunkSize", + get: function get() { + if (!this.lengthKnown) { + this.cacheLength(); + } + return this._chunkSize; + } + }]); + return LazyUint8Array; + }(); + if (typeof XMLHttpRequest != "undefined") { + if (!ENVIRONMENT_IS_WORKER) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"; + var lazyArray = new LazyUint8Array(); + var properties = { + isDevice: false, + contents: lazyArray + }; + } else { + var properties = { + isDevice: false, + url: url + }; + } + var node = FS.createFile(parent, name, properties, canRead, canWrite); + if (properties.contents) { + node.contents = properties.contents; + } else if (properties.url) { + node.contents = null; + node.url = properties.url; + } + Object.defineProperties(node, { + usedBytes: { + get: function get() { + return this.contents.length; + } + } + }); + var stream_ops = {}; + var keys = Object.keys(node.stream_ops); + keys.forEach(function (key) { + var fn = node.stream_ops[key]; + stream_ops[key] = function () { + FS.forceLoadFile(node); + return fn.apply(void 0, arguments); + }; + }); + function writeChunks(stream, buffer, offset, length, position) { + var contents = stream.node.contents; + if (position >= contents.length) return 0; + var size = Math.min(contents.length - position, length); + if (contents.slice) { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents[position + i]; + } + } else { + for (var i = 0; i < size; i++) { + buffer[offset + i] = contents.get(position + i); + } + } + return size; + } + stream_ops.read = function (stream, buffer, offset, length, position) { + FS.forceLoadFile(node); + return writeChunks(stream, buffer, offset, length, position); + }; + stream_ops.mmap = function (stream, length, position, prot, flags) { + FS.forceLoadFile(node); + var ptr = mmapAlloc(length); + if (!ptr) { + throw new FS.ErrnoError(48); + } + writeChunks(stream, HEAP8, ptr, length, position); + return { + ptr: ptr, + allocated: true + }; + }; + node.stream_ops = stream_ops; + return node; + } +}; +var SYSCALLS = { + DEFAULT_POLLMASK: 5, + calculateAt: function calculateAt(dirfd, path, allowEmpty) { + if (PATH.isAbs(path)) { + return path; + } + var dir; + if (dirfd === -100) { + dir = FS.cwd(); + } else { + var dirstream = SYSCALLS.getStreamFromFD(dirfd); + dir = dirstream.path; + } + if (path.length == 0) { + if (!allowEmpty) { + throw new FS.ErrnoError(44); + } + return dir; + } + return PATH.join2(dir, path); + }, + doStat: function doStat(func, path, buf) { + var stat = func(path); + HEAP32[buf >> 2] = stat.dev; + HEAP32[buf + 4 >> 2] = stat.mode; + HEAPU32[buf + 8 >> 2] = stat.nlink; + HEAP32[buf + 12 >> 2] = stat.uid; + HEAP32[buf + 16 >> 2] = stat.gid; + HEAP32[buf + 20 >> 2] = stat.rdev; + tempI64 = [stat.size >>> 0, (tempDouble = stat.size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 24 >> 2] = tempI64[0], HEAP32[buf + 28 >> 2] = tempI64[1]; + HEAP32[buf + 32 >> 2] = 4096; + HEAP32[buf + 36 >> 2] = stat.blocks; + var atime = stat.atime.getTime(); + var mtime = stat.mtime.getTime(); + var ctime = stat.ctime.getTime(); + tempI64 = [Math.floor(atime / 1e3) >>> 0, (tempDouble = Math.floor(atime / 1e3), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1]; + HEAPU32[buf + 48 >> 2] = atime % 1e3 * 1e3; + tempI64 = [Math.floor(mtime / 1e3) >>> 0, (tempDouble = Math.floor(mtime / 1e3), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 56 >> 2] = tempI64[0], HEAP32[buf + 60 >> 2] = tempI64[1]; + HEAPU32[buf + 64 >> 2] = mtime % 1e3 * 1e3; + tempI64 = [Math.floor(ctime / 1e3) >>> 0, (tempDouble = Math.floor(ctime / 1e3), +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 72 >> 2] = tempI64[0], HEAP32[buf + 76 >> 2] = tempI64[1]; + HEAPU32[buf + 80 >> 2] = ctime % 1e3 * 1e3; + tempI64 = [stat.ino >>> 0, (tempDouble = stat.ino, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 88 >> 2] = tempI64[0], HEAP32[buf + 92 >> 2] = tempI64[1]; + return 0; + }, + doMsync: function doMsync(addr, stream, len, flags, offset) { + if (!FS.isFile(stream.node.mode)) { + throw new FS.ErrnoError(43); + } + if (flags & 2) { + return 0; + } + var buffer = HEAPU8.slice(addr, addr + len); + FS.msync(stream, buffer, offset, len, flags); + }, + varargs: undefined, + get: function get() { + var ret = HEAP32[+SYSCALLS.varargs >> 2]; + SYSCALLS.varargs += 4; + return ret; + }, + getp: function getp() { + return SYSCALLS.get(); + }, + getStr: function getStr(ptr) { + var ret = UTF8ToString(ptr); + return ret; + }, + getStreamFromFD: function getStreamFromFD(fd) { + var stream = FS.getStreamChecked(fd); + return stream; + } +}; +function ___syscall__newselect(nfds, readfds, writefds, exceptfds, timeout) { + try { + var total = 0; + var srcReadLow = readfds ? HEAP32[readfds >> 2] : 0, + srcReadHigh = readfds ? HEAP32[readfds + 4 >> 2] : 0; + var srcWriteLow = writefds ? HEAP32[writefds >> 2] : 0, + srcWriteHigh = writefds ? HEAP32[writefds + 4 >> 2] : 0; + var srcExceptLow = exceptfds ? HEAP32[exceptfds >> 2] : 0, + srcExceptHigh = exceptfds ? HEAP32[exceptfds + 4 >> 2] : 0; + var dstReadLow = 0, + dstReadHigh = 0; + var dstWriteLow = 0, + dstWriteHigh = 0; + var dstExceptLow = 0, + dstExceptHigh = 0; + var allLow = (readfds ? HEAP32[readfds >> 2] : 0) | (writefds ? HEAP32[writefds >> 2] : 0) | (exceptfds ? HEAP32[exceptfds >> 2] : 0); + var allHigh = (readfds ? HEAP32[readfds + 4 >> 2] : 0) | (writefds ? HEAP32[writefds + 4 >> 2] : 0) | (exceptfds ? HEAP32[exceptfds + 4 >> 2] : 0); + var check = function check(fd, low, high, val) { + return fd < 32 ? low & val : high & val; + }; + for (var fd = 0; fd < nfds; fd++) { + var mask = 1 << fd % 32; + if (!check(fd, allLow, allHigh, mask)) { + continue; + } + var stream = SYSCALLS.getStreamFromFD(fd); + var flags = SYSCALLS.DEFAULT_POLLMASK; + if (stream.stream_ops.poll) { + var timeoutInMillis = -1; + if (timeout) { + var tv_sec = readfds ? HEAP32[timeout >> 2] : 0, + tv_usec = readfds ? HEAP32[timeout + 4 >> 2] : 0; + timeoutInMillis = (tv_sec + tv_usec / 1e6) * 1e3; + } + flags = stream.stream_ops.poll(stream, timeoutInMillis); + } + if (flags & 1 && check(fd, srcReadLow, srcReadHigh, mask)) { + fd < 32 ? dstReadLow = dstReadLow | mask : dstReadHigh = dstReadHigh | mask; + total++; + } + if (flags & 4 && check(fd, srcWriteLow, srcWriteHigh, mask)) { + fd < 32 ? dstWriteLow = dstWriteLow | mask : dstWriteHigh = dstWriteHigh | mask; + total++; + } + if (flags & 2 && check(fd, srcExceptLow, srcExceptHigh, mask)) { + fd < 32 ? dstExceptLow = dstExceptLow | mask : dstExceptHigh = dstExceptHigh | mask; + total++; + } + } + if (readfds) { + HEAP32[readfds >> 2] = dstReadLow; + HEAP32[readfds + 4 >> 2] = dstReadHigh; + } + if (writefds) { + HEAP32[writefds >> 2] = dstWriteLow; + HEAP32[writefds + 4 >> 2] = dstWriteHigh; + } + if (exceptfds) { + HEAP32[exceptfds >> 2] = dstExceptLow; + HEAP32[exceptfds + 4 >> 2] = dstExceptHigh; + } + return total; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +var SOCKFS = { + mount: function mount(_mount2) { + Module["websocket"] = Module["websocket"] && "object" === _typeof(Module["websocket"]) ? Module["websocket"] : {}; + Module["websocket"]._callbacks = {}; + Module["websocket"]["on"] = function (event, callback) { + if ("function" === typeof callback) { + this._callbacks[event] = callback; + } + return this; + }; + Module["websocket"].emit = function (event, param) { + if ("function" === typeof this._callbacks[event]) { + this._callbacks[event].call(this, param); + } + }; + return FS.createNode(null, "/", 16384 | 511, 0); + }, + createSocket: function createSocket(family, type, protocol) { + type &= ~526336; + var streaming = type == 1; + if (streaming && protocol && protocol != 6) { + throw new FS.ErrnoError(66); + } + var sock = { + family: family, + type: type, + protocol: protocol, + server: null, + error: null, + peers: {}, + pending: [], + recv_queue: [], + sock_ops: SOCKFS.websocket_sock_ops + }; + var name = SOCKFS.nextname(); + var node = FS.createNode(SOCKFS.root, name, 49152, 0); + node.sock = sock; + var stream = FS.createStream({ + path: name, + node: node, + flags: 2, + seekable: false, + stream_ops: SOCKFS.stream_ops + }); + sock.stream = stream; + return sock; + }, + getSocket: function getSocket(fd) { + var stream = FS.getStream(fd); + if (!stream || !FS.isSocket(stream.node.mode)) { + return null; + } + return stream.node.sock; + }, + stream_ops: { + poll: function poll(stream) { + var sock = stream.node.sock; + return sock.sock_ops.poll(sock); + }, + ioctl: function ioctl(stream, request, varargs) { + var sock = stream.node.sock; + return sock.sock_ops.ioctl(sock, request, varargs); + }, + read: function read(stream, buffer, offset, length, position) { + var sock = stream.node.sock; + var msg = sock.sock_ops.recvmsg(sock, length); + if (!msg) { + return 0; + } + buffer.set(msg.buffer, offset); + return msg.buffer.length; + }, + write: function write(stream, buffer, offset, length, position) { + var sock = stream.node.sock; + return sock.sock_ops.sendmsg(sock, buffer, offset, length); + }, + close: function close(stream) { + var sock = stream.node.sock; + sock.sock_ops.close(sock); + } + }, + nextname: function nextname() { + if (!SOCKFS.nextname.current) { + SOCKFS.nextname.current = 0; + } + return "socket[" + SOCKFS.nextname.current++ + "]"; + }, + websocket_sock_ops: { + createPeer: function createPeer(sock, addr, port) { + var ws; + if (_typeof(addr) == "object") { + ws = addr; + addr = null; + port = null; + } + if (ws) { + if (ws._socket) { + addr = ws._socket.remoteAddress; + port = ws._socket.remotePort; + } else { + var result = /ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url); + if (!result) { + throw new Error("WebSocket URL must be in the format ws(s)://address:port"); + } + addr = result[1]; + port = parseInt(result[2], 10); + } + } else { + try { + var runtimeConfig = Module["websocket"] && "object" === _typeof(Module["websocket"]); + var url = "ws:#".replace("#", "//"); + if (runtimeConfig) { + if ("string" === typeof Module["websocket"]["url"]) { + url = Module["websocket"]["url"]; + } + } + if (url === "ws://" || url === "wss://") { + var parts = addr.split("/"); + url = url + parts[0] + ":" + port + "/" + parts.slice(1).join("/"); + } + var subProtocols = "binary"; + if (runtimeConfig) { + if ("string" === typeof Module["websocket"]["subprotocol"]) { + subProtocols = Module["websocket"]["subprotocol"]; + } + } + var opts = undefined; + if (subProtocols !== "null") { + subProtocols = subProtocols.replace(/^ +| +$/g, "").split(/ *, */); + opts = subProtocols; + } + if (runtimeConfig && null === Module["websocket"]["subprotocol"]) { + subProtocols = "null"; + opts = undefined; + } + var WebSocketConstructor; + if (ENVIRONMENT_IS_NODE) { + WebSocketConstructor = require("ws"); + } else { + WebSocketConstructor = WebSocket; + } + ws = new WebSocketConstructor(url, opts); + ws.binaryType = "arraybuffer"; + } catch (e) { + throw new FS.ErrnoError(23); + } + } + var peer = { + addr: addr, + port: port, + socket: ws, + dgram_send_queue: [] + }; + SOCKFS.websocket_sock_ops.addPeer(sock, peer); + SOCKFS.websocket_sock_ops.handlePeerEvents(sock, peer); + if (sock.type === 2 && typeof sock.sport != "undefined") { + peer.dgram_send_queue.push(new Uint8Array([255, 255, 255, 255, "p".charCodeAt(0), "o".charCodeAt(0), "r".charCodeAt(0), "t".charCodeAt(0), (sock.sport & 65280) >> 8, sock.sport & 255])); + } + return peer; + }, + getPeer: function getPeer(sock, addr, port) { + return sock.peers[addr + ":" + port]; + }, + addPeer: function addPeer(sock, peer) { + sock.peers[peer.addr + ":" + peer.port] = peer; + }, + removePeer: function removePeer(sock, peer) { + delete sock.peers[peer.addr + ":" + peer.port]; + }, + handlePeerEvents: function handlePeerEvents(sock, peer) { + var first = true; + var handleOpen = function handleOpen() { + Module["websocket"].emit("open", sock.stream.fd); + try { + var queued = peer.dgram_send_queue.shift(); + while (queued) { + peer.socket.send(queued); + queued = peer.dgram_send_queue.shift(); + } + } catch (e) { + peer.socket.close(); + } + }; + function handleMessage(data) { + if (typeof data == "string") { + var encoder = new TextEncoder(); + data = encoder.encode(data); + } else { + assert(data.byteLength !== undefined); + if (data.byteLength == 0) { + return; + } + data = new Uint8Array(data); + } + var wasfirst = first; + first = false; + if (wasfirst && data.length === 10 && data[0] === 255 && data[1] === 255 && data[2] === 255 && data[3] === 255 && data[4] === "p".charCodeAt(0) && data[5] === "o".charCodeAt(0) && data[6] === "r".charCodeAt(0) && data[7] === "t".charCodeAt(0)) { + var newport = data[8] << 8 | data[9]; + SOCKFS.websocket_sock_ops.removePeer(sock, peer); + peer.port = newport; + SOCKFS.websocket_sock_ops.addPeer(sock, peer); + return; + } + sock.recv_queue.push({ + addr: peer.addr, + port: peer.port, + data: data + }); + Module["websocket"].emit("message", sock.stream.fd); + } + if (ENVIRONMENT_IS_NODE) { + peer.socket.on("open", handleOpen); + peer.socket.on("message", function (data, isBinary) { + if (!isBinary) { + return; + } + handleMessage(new Uint8Array(data).buffer); + }); + peer.socket.on("close", function () { + Module["websocket"].emit("close", sock.stream.fd); + }); + peer.socket.on("error", function (error) { + sock.error = 14; + Module["websocket"].emit("error", [sock.stream.fd, sock.error, "ECONNREFUSED: Connection refused"]); + }); + } else { + peer.socket.onopen = handleOpen; + peer.socket.onclose = function () { + Module["websocket"].emit("close", sock.stream.fd); + }; + peer.socket.onmessage = function peer_socket_onmessage(event) { + handleMessage(event.data); + }; + peer.socket.onerror = function (error) { + sock.error = 14; + Module["websocket"].emit("error", [sock.stream.fd, sock.error, "ECONNREFUSED: Connection refused"]); + }; + } + }, + poll: function poll(sock) { + if (sock.type === 1 && sock.server) { + return sock.pending.length ? 64 | 1 : 0; + } + var mask = 0; + var dest = sock.type === 1 ? SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport) : null; + if (sock.recv_queue.length || !dest || dest && dest.socket.readyState === dest.socket.CLOSING || dest && dest.socket.readyState === dest.socket.CLOSED) { + mask |= 64 | 1; + } + if (!dest || dest && dest.socket.readyState === dest.socket.OPEN) { + mask |= 4; + } + if (dest && dest.socket.readyState === dest.socket.CLOSING || dest && dest.socket.readyState === dest.socket.CLOSED) { + mask |= 16; + } + return mask; + }, + ioctl: function ioctl(sock, request, arg) { + switch (request) { + case 21531: + var bytes = 0; + if (sock.recv_queue.length) { + bytes = sock.recv_queue[0].data.length; + } + HEAP32[arg >> 2] = bytes; + return 0; + default: + return 28; + } + }, + close: function close(sock) { + if (sock.server) { + try { + sock.server.close(); + } catch (e) {} + sock.server = null; + } + var peers = Object.keys(sock.peers); + for (var i = 0; i < peers.length; i++) { + var peer = sock.peers[peers[i]]; + try { + peer.socket.close(); + } catch (e) {} + SOCKFS.websocket_sock_ops.removePeer(sock, peer); + } + return 0; + }, + bind: function bind(sock, addr, port) { + if (typeof sock.saddr != "undefined" || typeof sock.sport != "undefined") { + throw new FS.ErrnoError(28); + } + sock.saddr = addr; + sock.sport = port; + if (sock.type === 2) { + if (sock.server) { + sock.server.close(); + sock.server = null; + } + try { + sock.sock_ops.listen(sock, 0); + } catch (e) { + if (!(e.name === "ErrnoError")) throw e; + if (e.errno !== 138) throw e; + } + } + }, + connect: function connect(sock, addr, port) { + if (sock.server) { + throw new FS.ErrnoError(138); + } + if (typeof sock.daddr != "undefined" && typeof sock.dport != "undefined") { + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); + if (dest) { + if (dest.socket.readyState === dest.socket.CONNECTING) { + throw new FS.ErrnoError(7); + } else { + throw new FS.ErrnoError(30); + } + } + } + var peer = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); + sock.daddr = peer.addr; + sock.dport = peer.port; + throw new FS.ErrnoError(26); + }, + listen: function listen(sock, backlog) { + if (!ENVIRONMENT_IS_NODE) { + throw new FS.ErrnoError(138); + } + if (sock.server) { + throw new FS.ErrnoError(28); + } + var WebSocketServer = require("ws").Server; + var host = sock.saddr; + sock.server = new WebSocketServer({ + host: host, + port: sock.sport + }); + Module["websocket"].emit("listen", sock.stream.fd); + sock.server.on("connection", function (ws) { + if (sock.type === 1) { + var newsock = SOCKFS.createSocket(sock.family, sock.type, sock.protocol); + var peer = SOCKFS.websocket_sock_ops.createPeer(newsock, ws); + newsock.daddr = peer.addr; + newsock.dport = peer.port; + sock.pending.push(newsock); + Module["websocket"].emit("connection", newsock.stream.fd); + } else { + SOCKFS.websocket_sock_ops.createPeer(sock, ws); + Module["websocket"].emit("connection", sock.stream.fd); + } + }); + sock.server.on("close", function () { + Module["websocket"].emit("close", sock.stream.fd); + sock.server = null; + }); + sock.server.on("error", function (error) { + sock.error = 23; + Module["websocket"].emit("error", [sock.stream.fd, sock.error, "EHOSTUNREACH: Host is unreachable"]); + }); + }, + accept: function accept(listensock) { + if (!listensock.server || !listensock.pending.length) { + throw new FS.ErrnoError(28); + } + var newsock = listensock.pending.shift(); + newsock.stream.flags = listensock.stream.flags; + return newsock; + }, + getname: function getname(sock, peer) { + var addr, port; + if (peer) { + if (sock.daddr === undefined || sock.dport === undefined) { + throw new FS.ErrnoError(53); + } + addr = sock.daddr; + port = sock.dport; + } else { + addr = sock.saddr || 0; + port = sock.sport || 0; + } + return { + addr: addr, + port: port + }; + }, + sendmsg: function sendmsg(sock, buffer, offset, length, addr, port) { + if (sock.type === 2) { + if (addr === undefined || port === undefined) { + addr = sock.daddr; + port = sock.dport; + } + if (addr === undefined || port === undefined) { + throw new FS.ErrnoError(17); + } + } else { + addr = sock.daddr; + port = sock.dport; + } + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, addr, port); + if (sock.type === 1) { + if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + throw new FS.ErrnoError(53); + } else if (dest.socket.readyState === dest.socket.CONNECTING) { + throw new FS.ErrnoError(6); + } + } + if (ArrayBuffer.isView(buffer)) { + offset += buffer.byteOffset; + buffer = buffer.buffer; + } + var data; + data = buffer.slice(offset, offset + length); + if (sock.type === 2) { + if (!dest || dest.socket.readyState !== dest.socket.OPEN) { + if (!dest || dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + dest = SOCKFS.websocket_sock_ops.createPeer(sock, addr, port); + } + dest.dgram_send_queue.push(data); + return length; + } + } + try { + dest.socket.send(data); + return length; + } catch (e) { + throw new FS.ErrnoError(28); + } + }, + recvmsg: function recvmsg(sock, length) { + if (sock.type === 1 && sock.server) { + throw new FS.ErrnoError(53); + } + var queued = sock.recv_queue.shift(); + if (!queued) { + if (sock.type === 1) { + var dest = SOCKFS.websocket_sock_ops.getPeer(sock, sock.daddr, sock.dport); + if (!dest) { + throw new FS.ErrnoError(53); + } + if (dest.socket.readyState === dest.socket.CLOSING || dest.socket.readyState === dest.socket.CLOSED) { + return null; + } + throw new FS.ErrnoError(6); + } + throw new FS.ErrnoError(6); + } + var queuedLength = queued.data.byteLength || queued.data.length; + var queuedOffset = queued.data.byteOffset || 0; + var queuedBuffer = queued.data.buffer || queued.data; + var bytesRead = Math.min(length, queuedLength); + var res = { + buffer: new Uint8Array(queuedBuffer, queuedOffset, bytesRead), + addr: queued.addr, + port: queued.port + }; + if (sock.type === 1 && bytesRead < queuedLength) { + var bytesRemaining = queuedLength - bytesRead; + queued.data = new Uint8Array(queuedBuffer, queuedOffset + bytesRead, bytesRemaining); + sock.recv_queue.unshift(queued); + } + return res; + } + } +}; +var getSocketFromFD = function getSocketFromFD(fd) { + var socket = SOCKFS.getSocket(fd); + if (!socket) throw new FS.ErrnoError(8); + return socket; +}; +var inetPton4 = function inetPton4(str) { + var b = str.split("."); + for (var i = 0; i < 4; i++) { + var tmp = Number(b[i]); + if (isNaN(tmp)) return null; + b[i] = tmp; + } + return (b[0] | b[1] << 8 | b[2] << 16 | b[3] << 24) >>> 0; +}; +var jstoi_q = function jstoi_q(str) { + return parseInt(str); +}; +var inetPton6 = function inetPton6(str) { + var words; + var w, offset, z; + var valid6regx = /^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i; + var parts = []; + if (!valid6regx.test(str)) { + return null; + } + if (str === "::") { + return [0, 0, 0, 0, 0, 0, 0, 0]; + } + if (str.startsWith("::")) { + str = str.replace("::", "Z:"); + } else { + str = str.replace("::", ":Z:"); + } + if (str.indexOf(".") > 0) { + str = str.replace(new RegExp("[.]", "g"), ":"); + words = str.split(":"); + words[words.length - 4] = jstoi_q(words[words.length - 4]) + jstoi_q(words[words.length - 3]) * 256; + words[words.length - 3] = jstoi_q(words[words.length - 2]) + jstoi_q(words[words.length - 1]) * 256; + words = words.slice(0, words.length - 2); + } else { + words = str.split(":"); + } + offset = 0; + z = 0; + for (w = 0; w < words.length; w++) { + if (typeof words[w] == "string") { + if (words[w] === "Z") { + for (z = 0; z < 8 - words.length + 1; z++) { + parts[w + z] = 0; + } + offset = z - 1; + } else { + parts[w + offset] = _htons2(parseInt(words[w], 16)); + } + } else { + parts[w + offset] = words[w]; + } + } + return [parts[1] << 16 | parts[0], parts[3] << 16 | parts[2], parts[5] << 16 | parts[4], parts[7] << 16 | parts[6]]; +}; +var writeSockaddr = function writeSockaddr(sa, family, addr, port, addrlen) { + switch (family) { + case 2: + addr = inetPton4(addr); + zeroMemory(sa, 16); + if (addrlen) { + HEAP32[addrlen >> 2] = 16; + } + HEAP16[sa >> 1] = family; + HEAP32[sa + 4 >> 2] = addr; + HEAP16[sa + 2 >> 1] = _htons2(port); + break; + case 10: + addr = inetPton6(addr); + zeroMemory(sa, 28); + if (addrlen) { + HEAP32[addrlen >> 2] = 28; + } + HEAP32[sa >> 2] = family; + HEAP32[sa + 8 >> 2] = addr[0]; + HEAP32[sa + 12 >> 2] = addr[1]; + HEAP32[sa + 16 >> 2] = addr[2]; + HEAP32[sa + 20 >> 2] = addr[3]; + HEAP16[sa + 2 >> 1] = _htons2(port); + break; + default: + return 5; + } + return 0; +}; +var DNS = { + address_map: { + id: 1, + addrs: {}, + names: {} + }, + lookup_name: function lookup_name(name) { + var res = inetPton4(name); + if (res !== null) { + return name; + } + res = inetPton6(name); + if (res !== null) { + return name; + } + var addr; + if (DNS.address_map.addrs[name]) { + addr = DNS.address_map.addrs[name]; + } else { + var id = DNS.address_map.id++; + assert(id < 65535, "exceeded max address mappings of 65535"); + addr = "172.29." + (id & 255) + "." + (id & 65280); + DNS.address_map.names[addr] = name; + DNS.address_map.addrs[name] = addr; + } + return addr; + }, + lookup_addr: function lookup_addr(addr) { + if (DNS.address_map.names[addr]) { + return DNS.address_map.names[addr]; + } + return null; + } +}; +function ___syscall_accept4(fd, addr, addrlen, flags, d1, d2) { + try { + var sock = getSocketFromFD(fd); + var newsock = sock.sock_ops.accept(sock); + if (addr) { + var errno = writeSockaddr(addr, newsock.family, DNS.lookup_name(newsock.daddr), newsock.dport, addrlen); + } + return newsock.stream.fd; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +var inetNtop4 = function inetNtop4(addr) { + return (addr & 255) + "." + (addr >> 8 & 255) + "." + (addr >> 16 & 255) + "." + (addr >> 24 & 255); +}; +var inetNtop6 = function inetNtop6(ints) { + var str = ""; + var word = 0; + var longest = 0; + var lastzero = 0; + var zstart = 0; + var len = 0; + var i = 0; + var parts = [ints[0] & 65535, ints[0] >> 16, ints[1] & 65535, ints[1] >> 16, ints[2] & 65535, ints[2] >> 16, ints[3] & 65535, ints[3] >> 16]; + var hasipv4 = true; + var v4part = ""; + for (i = 0; i < 5; i++) { + if (parts[i] !== 0) { + hasipv4 = false; + break; + } + } + if (hasipv4) { + v4part = inetNtop4(parts[6] | parts[7] << 16); + if (parts[5] === -1) { + str = "::ffff:"; + str += v4part; + return str; + } + if (parts[5] === 0) { + str = "::"; + if (v4part === "0.0.0.0") v4part = ""; + if (v4part === "0.0.0.1") v4part = "1"; + str += v4part; + return str; + } + } + for (word = 0; word < 8; word++) { + if (parts[word] === 0) { + if (word - lastzero > 1) { + len = 0; + } + lastzero = word; + len++; + } + if (len > longest) { + longest = len; + zstart = word - longest + 1; + } + } + for (word = 0; word < 8; word++) { + if (longest > 1) { + if (parts[word] === 0 && word >= zstart && word < zstart + longest) { + if (word === zstart) { + str += ":"; + if (zstart === 0) str += ":"; + } + continue; + } + } + str += Number(_ntohs2(parts[word] & 65535)).toString(16); + str += word < 7 ? ":" : ""; + } + return str; +}; +var readSockaddr = function readSockaddr(sa, salen) { + var family = HEAP16[sa >> 1]; + var port = _ntohs2(HEAPU16[sa + 2 >> 1]); + var addr; + switch (family) { + case 2: + if (salen !== 16) { + return { + errno: 28 + }; + } + addr = HEAP32[sa + 4 >> 2]; + addr = inetNtop4(addr); + break; + case 10: + if (salen !== 28) { + return { + errno: 28 + }; + } + addr = [HEAP32[sa + 8 >> 2], HEAP32[sa + 12 >> 2], HEAP32[sa + 16 >> 2], HEAP32[sa + 20 >> 2]]; + addr = inetNtop6(addr); + break; + default: + return { + errno: 5 + }; + } + return { + family: family, + addr: addr, + port: port + }; +}; +var getSocketAddress = function getSocketAddress(addrp, addrlen, allowNull) { + if (allowNull && addrp === 0) return null; + var info = readSockaddr(addrp, addrlen); + if (info.errno) throw new FS.ErrnoError(info.errno); + info.addr = DNS.lookup_addr(info.addr) || info.addr; + return info; +}; +function ___syscall_bind(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var info = getSocketAddress(addr, addrlen); + sock.sock_ops.bind(sock, info.addr, info.port); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_connect(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var info = getSocketAddress(addr, addrlen); + sock.sock_ops.connect(sock, info.addr, info.port); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_dup3(fd, newfd, flags) { + try { + var old = SYSCALLS.getStreamFromFD(fd); + if (old.fd === newfd) return -28; + var existing = FS.getStream(newfd); + if (existing) FS.close(existing); + return FS.dupStream(old, newfd).fd; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_fcntl64(fd, cmd, varargs) { + SYSCALLS.varargs = varargs; + try { + var stream = SYSCALLS.getStreamFromFD(fd); + switch (cmd) { + case 0: + { + var arg = SYSCALLS.get(); + if (arg < 0) { + return -28; + } + while (FS.streams[arg]) { + arg++; + } + var newStream; + newStream = FS.dupStream(stream, arg); + return newStream.fd; + } + case 1: + case 2: + return 0; + case 3: + return stream.flags; + case 4: + { + var arg = SYSCALLS.get(); + stream.flags |= arg; + return 0; + } + case 12: + { + var arg = SYSCALLS.getp(); + var offset = 0; + HEAP16[arg + offset >> 1] = 2; + return 0; + } + case 13: + case 14: + return 0; + } + return -28; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_getpeername(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + if (!sock.daddr) { + return -53; + } + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(sock.daddr), sock.dport, addrlen); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_getsockname(fd, addr, addrlen, d1, d2, d3) { + try { + var sock = getSocketFromFD(fd); + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(sock.saddr || "0.0.0.0"), sock.sport, addrlen); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_getsockopt(fd, level, optname, optval, optlen, d1) { + try { + var sock = getSocketFromFD(fd); + if (level === 1) { + if (optname === 4) { + HEAP32[optval >> 2] = sock.error; + HEAP32[optlen >> 2] = 4; + sock.error = null; + return 0; + } + } + return -50; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_ioctl(fd, op, varargs) { + SYSCALLS.varargs = varargs; + try { + var stream = SYSCALLS.getStreamFromFD(fd); + switch (op) { + case 21509: + { + if (!stream.tty) return -59; + return 0; + } + case 21505: + { + if (!stream.tty) return -59; + if (stream.tty.ops.ioctl_tcgets) { + var termios = stream.tty.ops.ioctl_tcgets(stream); + var argp = SYSCALLS.getp(); + HEAP32[argp >> 2] = termios.c_iflag || 0; + HEAP32[argp + 4 >> 2] = termios.c_oflag || 0; + HEAP32[argp + 8 >> 2] = termios.c_cflag || 0; + HEAP32[argp + 12 >> 2] = termios.c_lflag || 0; + for (var i = 0; i < 32; i++) { + HEAP8[argp + i + 17] = termios.c_cc[i] || 0; + } + return 0; + } + return 0; + } + case 21510: + case 21511: + case 21512: + { + if (!stream.tty) return -59; + return 0; + } + case 21506: + case 21507: + case 21508: + { + if (!stream.tty) return -59; + if (stream.tty.ops.ioctl_tcsets) { + var argp = SYSCALLS.getp(); + var c_iflag = HEAP32[argp >> 2]; + var c_oflag = HEAP32[argp + 4 >> 2]; + var c_cflag = HEAP32[argp + 8 >> 2]; + var c_lflag = HEAP32[argp + 12 >> 2]; + var c_cc = []; + for (var i = 0; i < 32; i++) { + c_cc.push(HEAP8[argp + i + 17]); + } + return stream.tty.ops.ioctl_tcsets(stream.tty, op, { + c_iflag: c_iflag, + c_oflag: c_oflag, + c_cflag: c_cflag, + c_lflag: c_lflag, + c_cc: c_cc + }); + } + return 0; + } + case 21519: + { + if (!stream.tty) return -59; + var argp = SYSCALLS.getp(); + HEAP32[argp >> 2] = 0; + return 0; + } + case 21520: + { + if (!stream.tty) return -59; + return -28; + } + case 21531: + { + var argp = SYSCALLS.getp(); + return FS.ioctl(stream, op, argp); + } + case 21523: + { + if (!stream.tty) return -59; + if (stream.tty.ops.ioctl_tiocgwinsz) { + var winsize = stream.tty.ops.ioctl_tiocgwinsz(stream.tty); + var argp = SYSCALLS.getp(); + HEAP16[argp >> 1] = winsize[0]; + HEAP16[argp + 2 >> 1] = winsize[1]; + } + return 0; + } + case 21524: + { + if (!stream.tty) return -59; + return 0; + } + case 21515: + { + if (!stream.tty) return -59; + return 0; + } + default: + return -28; + } + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_listen(fd, backlog) { + try { + var sock = getSocketFromFD(fd); + sock.sock_ops.listen(sock, backlog); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_mkdirat(dirfd, path, mode) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + path = PATH.normalize(path); + if (path[path.length - 1] === "/") path = path.substr(0, path.length - 1); + FS.mkdir(path, mode, 0); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_openat(dirfd, path, flags, varargs) { + SYSCALLS.varargs = varargs; + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + var mode = varargs ? SYSCALLS.get() : 0; + return FS.open(path, flags, mode).fd; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_poll(fds, nfds, timeout) { + try { + var nonzero = 0; + for (var i = 0; i < nfds; i++) { + var pollfd = fds + 8 * i; + var fd = HEAP32[pollfd >> 2]; + var events = HEAP16[pollfd + 4 >> 1]; + var mask = 32; + var stream = FS.getStream(fd); + if (stream) { + mask = SYSCALLS.DEFAULT_POLLMASK; + if (stream.stream_ops.poll) { + mask = stream.stream_ops.poll(stream, -1); + } + } + mask &= events | 8 | 16; + if (mask) nonzero++; + HEAP16[pollfd + 6 >> 1] = mask; + } + return nonzero; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +var stringToUTF8 = function stringToUTF8(str, outPtr, maxBytesToWrite) { + return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); +}; +function ___syscall_readlinkat(dirfd, path, buf, bufsize) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + if (bufsize <= 0) return -28; + var ret = FS.readlink(path); + var len = Math.min(bufsize, lengthBytesUTF8(ret)); + var endChar = HEAP8[buf + len]; + stringToUTF8(ret, buf, bufsize + 1); + HEAP8[buf + len] = endChar; + return len; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_recvfrom(fd, buf, len, flags, addr, addrlen) { + try { + var sock = getSocketFromFD(fd); + var msg = sock.sock_ops.recvmsg(sock, len); + if (!msg) return 0; + if (addr) { + var errno = writeSockaddr(addr, sock.family, DNS.lookup_name(msg.addr), msg.port, addrlen); + } + HEAPU8.set(msg.buffer, buf); + return msg.buffer.byteLength; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_renameat(olddirfd, oldpath, newdirfd, newpath) { + try { + oldpath = SYSCALLS.getStr(oldpath); + newpath = SYSCALLS.getStr(newpath); + oldpath = SYSCALLS.calculateAt(olddirfd, oldpath); + newpath = SYSCALLS.calculateAt(newdirfd, newpath); + FS.rename(oldpath, newpath); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_rmdir(path) { + try { + path = SYSCALLS.getStr(path); + FS.rmdir(path); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_sendto(fd, message, length, flags, addr, addr_len) { + try { + var sock = getSocketFromFD(fd); + var dest = getSocketAddress(addr, addr_len, true); + if (!dest) { + return FS.write(sock.stream, HEAP8, message, length); + } + return sock.sock_ops.sendmsg(sock, HEAP8, message, length, dest.addr, dest.port); + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_socket(domain, type, protocol) { + try { + var sock = SOCKFS.createSocket(domain, type, protocol); + return sock.stream.fd; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_stat64(path, buf) { + try { + path = SYSCALLS.getStr(path); + return SYSCALLS.doStat(FS.stat, path, buf); + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +function ___syscall_unlinkat(dirfd, path, flags) { + try { + path = SYSCALLS.getStr(path); + path = SYSCALLS.calculateAt(dirfd, path); + if (flags === 0) { + FS.unlink(path); + } else if (flags === 512) { + FS.rmdir(path); + } else { + abort("Invalid flags passed to unlinkat"); + } + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return -e.errno; + } +} +var nowIsMonotonic = 1; +var __emscripten_get_now_is_monotonic = function __emscripten_get_now_is_monotonic() { + return nowIsMonotonic; +}; +var __emscripten_lookup_name = function __emscripten_lookup_name(name) { + var nameString = UTF8ToString(name); + return inetPton4(DNS.lookup_name(nameString)); +}; +var __emscripten_system = function __emscripten_system(command) { + if (ENVIRONMENT_IS_NODE) { + if (!command) return 1; + var cmdstr = UTF8ToString(command); + if (!cmdstr.length) return 0; + var cp = require("child_process"); + var ret = cp.spawnSync(cmdstr, [], { + shell: true, + stdio: "inherit" + }); + var _W_EXITCODE = function _W_EXITCODE(ret, sig) { + return ret << 8 | sig; + }; + if (ret.status === null) { + var signalToNumber = function signalToNumber(sig) { + switch (sig) { + case "SIGHUP": + return 1; + case "SIGINT": + return 2; + case "SIGQUIT": + return 3; + case "SIGFPE": + return 8; + case "SIGKILL": + return 9; + case "SIGALRM": + return 14; + case "SIGTERM": + return 15; + } + return 2; + }; + return _W_EXITCODE(0, signalToNumber(ret.signal)); + } + return _W_EXITCODE(ret.status, 0); + } + if (!command) return 0; + return -52; +}; +var __emscripten_throw_longjmp = function __emscripten_throw_longjmp() { + throw Infinity; +}; +var convertI32PairToI53Checked = function convertI32PairToI53Checked(lo, hi) { + return hi + 2097152 >>> 0 < 4194305 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN; +}; +function __gmtime_js(time_low, time_high, tmPtr) { + var time = convertI32PairToI53Checked(time_low, time_high); + var date = new Date(time * 1e3); + HEAP32[tmPtr >> 2] = date.getUTCSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getUTCHours(); + HEAP32[tmPtr + 12 >> 2] = date.getUTCDate(); + HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900; + HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); + var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); + var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; + HEAP32[tmPtr + 28 >> 2] = yday; +} +var isLeapYear = function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}; +var MONTH_DAYS_LEAP_CUMULATIVE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; +var MONTH_DAYS_REGULAR_CUMULATIVE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; +var ydayFromDate = function ydayFromDate(date) { + var leap = isLeapYear(date.getFullYear()); + var monthDaysCumulative = leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE; + var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1; + return yday; +}; +function __localtime_js(time_low, time_high, tmPtr) { + var time = convertI32PairToI53Checked(time_low, time_high); + var date = new Date(time * 1e3); + HEAP32[tmPtr >> 2] = date.getSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getHours(); + HEAP32[tmPtr + 12 >> 2] = date.getDate(); + HEAP32[tmPtr + 16 >> 2] = date.getMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getFullYear() - 1900; + HEAP32[tmPtr + 24 >> 2] = date.getDay(); + var yday = ydayFromDate(date) | 0; + HEAP32[tmPtr + 28 >> 2] = yday; + HEAP32[tmPtr + 36 >> 2] = -(date.getTimezoneOffset() * 60); + var start = new Date(date.getFullYear(), 0, 1); + var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset(); + var winterOffset = start.getTimezoneOffset(); + var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset)) | 0; + HEAP32[tmPtr + 32 >> 2] = dst; +} +var __mktime_js = function __mktime_js(tmPtr) { + var ret = function () { + var date = new Date(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0); + var dst = HEAP32[tmPtr + 32 >> 2]; + var guessedOffset = date.getTimezoneOffset(); + var start = new Date(date.getFullYear(), 0, 1); + var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset(); + var winterOffset = start.getTimezoneOffset(); + var dstOffset = Math.min(winterOffset, summerOffset); + if (dst < 0) { + HEAP32[tmPtr + 32 >> 2] = Number(summerOffset != winterOffset && dstOffset == guessedOffset); + } else if (dst > 0 != (dstOffset == guessedOffset)) { + var nonDstOffset = Math.max(winterOffset, summerOffset); + var trueOffset = dst > 0 ? dstOffset : nonDstOffset; + date.setTime(date.getTime() + (trueOffset - guessedOffset) * 6e4); + } + HEAP32[tmPtr + 24 >> 2] = date.getDay(); + var yday = ydayFromDate(date) | 0; + HEAP32[tmPtr + 28 >> 2] = yday; + HEAP32[tmPtr >> 2] = date.getSeconds(); + HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); + HEAP32[tmPtr + 8 >> 2] = date.getHours(); + HEAP32[tmPtr + 12 >> 2] = date.getDate(); + HEAP32[tmPtr + 16 >> 2] = date.getMonth(); + HEAP32[tmPtr + 20 >> 2] = date.getYear(); + var timeMs = date.getTime(); + if (isNaN(timeMs)) { + return -1; + } + return timeMs / 1e3; + }(); + return _setTempRet((tempDouble = ret, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)), ret >>> 0; +}; +var __tzset_js = function __tzset_js(timezone, daylight, std_name, dst_name) { + var currentYear = new Date().getFullYear(); + var winter = new Date(currentYear, 0, 1); + var summer = new Date(currentYear, 6, 1); + var winterOffset = winter.getTimezoneOffset(); + var summerOffset = summer.getTimezoneOffset(); + var stdTimezoneOffset = Math.max(winterOffset, summerOffset); + HEAPU32[timezone >> 2] = stdTimezoneOffset * 60; + HEAP32[daylight >> 2] = Number(winterOffset != summerOffset); + function extractZone(date) { + var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); + return match ? match[1] : "GMT"; + } + var winterName = extractZone(winter); + var summerName = extractZone(summer); + if (summerOffset < winterOffset) { + stringToUTF8(winterName, std_name, 7); + stringToUTF8(summerName, dst_name, 7); + } else { + stringToUTF8(winterName, dst_name, 7); + stringToUTF8(summerName, std_name, 7); + } +}; +var _abort = function _abort() { + abort(""); +}; +var DefoldSoundDevice = { + TryResumeAudio: function TryResumeAudio() { + var audioCtx = window._dmJSDeviceShared.audioCtx; + if (audioCtx !== undefined && audioCtx.state != "running") { + audioCtx.resume(); + } + } +}; +function _dmDeviceJSFreeBufferSlots(id) { + return window._dmJSDeviceShared.devices[id]._freeBufferSlots(); +} +function _dmDeviceJSOpen(bufferCount) { + var shared = window._dmJSDeviceShared; + if (shared === undefined) { + shared = { + count: 0, + devices: {} + }; + window._dmJSDeviceShared = shared; + } + var id = shared.count++; + var device; + if (window.AudioContext || window.webkitAudioContext) { + if (shared.audioCtx === undefined) { + var audioCtxCtor = window.AudioContext || window.webkitAudioContext; + try { + shared.audioCtx = new audioCtxCtor({ + sampleRate: 44100 + }); + } catch (e) { + shared.audioCtx = new audioCtxCtor(); + } + } + device = { + sampleRate: shared.audioCtx.sampleRate, + bufferedTo: 0, + bufferDuration: 0, + creatingTime: Date.now() / 1e3, + lastTimeInSuspendedState: Date.now() / 1e3, + suspendedBufferedTo: 0, + _isContextRunning: function _isContextRunning() { + var audioCtx = window._dmJSDeviceShared.audioCtx; + return audioCtx !== undefined && audioCtx.state == "running"; + }, + _getCurrentSuspendedTime: function _getCurrentSuspendedTime() { + if (!this._isContextRunning()) { + this.lastTimeInSuspendedState = Date.now() / 1e3; + return this.lastTimeInSuspendedState - this.creatingTime; + } + return 0; + }, + _queue: function _queue(samples, sample_count) { + var len = sample_count / this.sampleRate; + this.bufferDuration = len; + if (!this._isContextRunning()) { + this.suspendedBufferedTo += len; + return; + } + var buf = shared.audioCtx.createBuffer(2, sample_count, this.sampleRate); + var c0 = buf.getChannelData(0); + var c1 = buf.getChannelData(1); + for (var i = 0; i < sample_count; i++) { + c0[i] = getValue(samples + 4 * i, "i16") / 32768; + c1[i] = getValue(samples + 4 * i + 2, "i16") / 32768; + } + var source = shared.audioCtx.createBufferSource(); + source.buffer = buf; + source.connect(shared.audioCtx.destination); + var t = shared.audioCtx.currentTime; + if (this.bufferedTo <= t) { + source.start(t); + this.bufferedTo = t + len; + } else { + source.start(this.bufferedTo); + this.bufferedTo = this.bufferedTo + len; + } + }, + _freeBufferSlots: function _freeBufferSlots() { + var ahead = 0; + if (this._isContextRunning()) { + if (this.bufferDuration == 0) return 1; + ahead = this.bufferedTo - shared.audioCtx.currentTime; + } else { + ahead = this.suspendedBufferedTo - this._getCurrentSuspendedTime(); + } + var inqueue = Math.ceil(ahead / this.bufferDuration); + if (inqueue < 0) { + inqueue = 0; + } + var left = bufferCount - inqueue; + if (left < 0) { + return 0; + } + return left; + } + }; + } + if (device != null) { + shared.audioCtx.onstatechanged = function () { + if (device._isContextRunning()) { + device.timeInSuspendedState = Date.now() / 1e3; + } else { + device.creatingTime = Date.now() / 1e3; + device.lastTimeInSuspendedState = Date.now() / 1e3; + device.suspendedBufferedTo = 0; + } + }; + shared.devices[id] = device; + return id; + } + return -1; +} +function _dmDeviceJSQueue(id, samples, sample_count) { + window._dmJSDeviceShared.devices[id]._queue(samples, sample_count); +} +function _dmGetDeviceSampleRate(id) { + return window._dmJSDeviceShared.devices[id].sampleRate; +} +var wasmTableMirror = []; +var wasmTable; +var getWasmTableEntry = function getWasmTableEntry(funcPtr) { + var func = wasmTableMirror[funcPtr]; + if (!func) { + if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1; + wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr); + } + return func; +}; +function _dmScriptHttpRequestAsync(method, url, headers, arg, onload, onerror, onprogress, send_data, send_data_length, timeout) { + var xhr = new XMLHttpRequest(); + function listener() { + var resp_headers = xhr.getAllResponseHeaders(); + resp_headers = resp_headers.replace(new RegExp("\r", "g"), ""); + resp_headers += "\n"; + if (xhr.status != 0) { + var ab = new Uint8Array(xhr.response); + var b = _malloc(ab.length * ab.BYTES_PER_ELEMENT); + HEAPU8.set(ab, b); + var resp_headers_buffer = stringToNewUTF8(resp_headers); + getWasmTableEntry(onload)(arg, xhr.status, b, ab.length, resp_headers_buffer); + _free(resp_headers_buffer); + _free(b); + } else { + getWasmTableEntry(onerror)(arg, xhr.status); + } + } + xhr.onload = listener; + xhr.onerror = listener; + xhr.ontimeout = listener; + xhr.onprogress = function (progress_event) { + if (onprogress != 0) { + getWasmTableEntry(onprogress)(arg, progress_event.loaded, progress_event.total); + } + }; + xhr.open(UTF8ToString(method), UTF8ToString(url), true); + xhr.responseType = "arraybuffer"; + if (timeout > 0) { + xhr.timeout = timeout / 1e3; + } + var headersArray = UTF8ToString(headers).split("\n"); + for (var i = 0; i < headersArray.length; i++) { + if (headersArray[i].trim() != "") { + var a = headersArray[i].split(":"); + xhr.setRequestHeader(a[0], a[1]); + } + } + if (send_data_length > 0) { + xhr.send(HEAPU8.subarray(send_data, send_data + send_data_length)); + } else { + xhr.send(); + } +} +var DMSYS = { + _folder: "/data", + _cstr: null, + GetUserPersistentDataRoot: function GetUserPersistentDataRoot() { + if (typeof window !== "undefined") return DMSYS._folder;else return ""; + }, + PumpMessageQueue: function PumpMessageQueue() { + if (typeof window === "undefined") { + var uvrun = require("uvrun"); + uvrun.runOnce(); + } + } +}; +function _dmSysGetApplicationPath() { + var path = location.href.substring(0, location.href.lastIndexOf("/")); + var buffer = stringToNewUTF8(path); + return buffer; +} +function _dmSysGetUserAgent() { + var useragent = navigator.userAgent; + var buffer = stringToNewUTF8(useragent); + return buffer; +} +function _dmSysGetUserPersistentDataRoot() { + if (null == DMSYS._cstr) { + var str = DMSYS.GetUserPersistentDataRoot(); + DMSYS._cstr = stringToNewUTF8(str); + } + return DMSYS._cstr; +} +function _dmSysGetUserPreferredLanguage(defaultlang) { + var jsdefault = UTF8ToString(defaultlang); + var preferred = navigator == undefined ? jsdefault : navigator.languages ? navigator.languages[0] || jsdefault : navigator.language || navigator.userLanguage || navigator.browserLanguage || navigator.systemLanguage || jsdefault; + var buffer = stringToNewUTF8(preferred); + return buffer; +} +var JSEvents = { + removeAllEventListeners: function removeAllEventListeners() { + while (JSEvents.eventHandlers.length) { + JSEvents._removeHandler(JSEvents.eventHandlers.length - 1); + } + JSEvents.deferredCalls = []; + }, + inEventHandler: 0, + deferredCalls: [], + deferCall: function deferCall(targetFunction, precedence, argsList) { + function arraysHaveEqualContent(arrA, arrB) { + if (arrA.length != arrB.length) return false; + for (var i in arrA) { + if (arrA[i] != arrB[i]) return false; + } + return true; + } + for (var i in JSEvents.deferredCalls) { + var call = JSEvents.deferredCalls[i]; + if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { + return; + } + } + JSEvents.deferredCalls.push({ + targetFunction: targetFunction, + precedence: precedence, + argsList: argsList + }); + JSEvents.deferredCalls.sort(function (x, y) { + return x.precedence < y.precedence; + }); + }, + removeDeferredCalls: function removeDeferredCalls(targetFunction) { + for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { + if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { + JSEvents.deferredCalls.splice(i, 1); + --i; + } + } + }, + canPerformEventHandlerRequests: function canPerformEventHandlerRequests() { + if (navigator.userActivation) { + return navigator.userActivation.isActive; + } + return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; + }, + runDeferredCalls: function runDeferredCalls() { + if (!JSEvents.canPerformEventHandlerRequests()) { + return; + } + for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { + var _call; + var call = JSEvents.deferredCalls[i]; + JSEvents.deferredCalls.splice(i, 1); + --i; + (_call = call).targetFunction.apply(_call, _toConsumableArray(call.argsList)); + } + }, + eventHandlers: [], + removeAllHandlersOnTarget: function removeAllHandlersOnTarget(target, eventTypeString) { + for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + JSEvents._removeHandler(i--); + } + } + }, + _removeHandler: function _removeHandler(i) { + var h = JSEvents.eventHandlers[i]; + h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); + JSEvents.eventHandlers.splice(i, 1); + }, + registerOrRemoveHandler: function registerOrRemoveHandler(eventHandler) { + if (!eventHandler.target) { + return -4; + } + if (eventHandler.callbackfunc) { + eventHandler.eventListenerFunc = function (event) { + ++JSEvents.inEventHandler; + JSEvents.currentEventHandler = eventHandler; + JSEvents.runDeferredCalls(); + eventHandler.handlerFunc(event); + JSEvents.runDeferredCalls(); + --JSEvents.inEventHandler; + }; + eventHandler.target.addEventListener(eventHandler.eventTypeString, eventHandler.eventListenerFunc, eventHandler.useCapture); + JSEvents.eventHandlers.push(eventHandler); + } else { + for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { + if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { + JSEvents._removeHandler(i--); + } + } + } + return 0; + }, + getNodeNameForTarget: function getNodeNameForTarget(target) { + if (!target) return ""; + if (target == window) return "#window"; + if (target == screen) return "#screen"; + return (target === null || target === void 0 ? void 0 : target.nodeName) || ""; + }, + fullscreenEnabled: function fullscreenEnabled() { + return document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled; + } +}; +function _dmSysOpenURL(url, target) { + var jsurl = UTF8ToString(url); + var jstarget = UTF8ToString(target); + if (jstarget == 0) { + jstarget = "_self"; + } + if (window.open(jsurl, jstarget) == null) { + window.location = jsurl; + } + return true; +} +var readEmAsmArgsArray = []; +var readEmAsmArgs = function readEmAsmArgs(sigPtr, buf) { + readEmAsmArgsArray.length = 0; + var ch; + while (ch = HEAPU8[sigPtr++]) { + var wide = ch != 105; + wide &= ch != 112; + buf += wide && buf % 8 ? 4 : 0; + readEmAsmArgsArray.push(ch == 112 ? HEAPU32[buf >> 2] : ch == 105 ? HEAP32[buf >> 2] : HEAPF64[buf >> 3]); + buf += wide ? 8 : 4; + } + return readEmAsmArgsArray; +}; +var runEmAsmFunction = function runEmAsmFunction(code, sigPtr, argbuf) { + var args = readEmAsmArgs(sigPtr, argbuf); + return ASM_CONSTS[code].apply(ASM_CONSTS, _toConsumableArray(args)); +}; +var _emscripten_asm_const_int = function _emscripten_asm_const_int(code, sigPtr, argbuf) { + return runEmAsmFunction(code, sigPtr, argbuf); +}; +var _emscripten_set_main_loop_timing = function _emscripten_set_main_loop_timing(mode, value) { + Browser.mainLoop.timingMode = mode; + Browser.mainLoop.timingValue = value; + if (!Browser.mainLoop.func) { + return 1; + } + if (!Browser.mainLoop.running) { + Browser.mainLoop.running = true; + } + if (mode == 0) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setTimeout() { + var timeUntilNextTick = Math.max(0, Browser.mainLoop.tickStartTime + value - _emscripten_get_now()) | 0; + setTimeout(Browser.mainLoop.runner, timeUntilNextTick); + }; + Browser.mainLoop.method = "timeout"; + } else if (mode == 1) { + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_rAF() { + Browser.requestAnimationFrame(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = "rAF"; + } else if (mode == 2) { + if (typeof Browser.setImmediate == "undefined") { + if (typeof setImmediate == "undefined") { + var setImmediates = []; + var emscriptenMainLoopMessageId = "setimmediate"; + var Browser_setImmediate_messageHandler = function Browser_setImmediate_messageHandler(event) { + if (event.data === emscriptenMainLoopMessageId || event.data.target === emscriptenMainLoopMessageId) { + event.stopPropagation(); + setImmediates.shift()(); + } + }; + addEventListener("message", Browser_setImmediate_messageHandler, true); + Browser.setImmediate = function Browser_emulated_setImmediate(func) { + setImmediates.push(func); + if (ENVIRONMENT_IS_WORKER) { + if (Module["setImmediates"] === undefined) Module["setImmediates"] = []; + Module["setImmediates"].push(func); + postMessage({ + target: emscriptenMainLoopMessageId + }); + } else postMessage(emscriptenMainLoopMessageId, "*"); + }; + } else { + Browser.setImmediate = setImmediate; + } + } + Browser.mainLoop.scheduler = function Browser_mainLoop_scheduler_setImmediate() { + Browser.setImmediate(Browser.mainLoop.runner); + }; + Browser.mainLoop.method = "immediate"; + } + return 0; +}; +var _emscripten_get_now; +_emscripten_get_now = function _emscripten_get_now() { + return performance.now(); +}; +var setMainLoop = function setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg, noSetTiming) { + Browser.mainLoop.func = browserIterationFunc; + Browser.mainLoop.arg = arg; + var thisMainLoopId = Browser.mainLoop.currentlyRunningMainloop; + function checkIsRunning() { + if (thisMainLoopId < Browser.mainLoop.currentlyRunningMainloop) { + return false; + } + return true; + } + Browser.mainLoop.running = false; + Browser.mainLoop.runner = function Browser_mainLoop_runner() { + var _SDL$audio, _SDL$audio$queueNewAu; + if (ABORT) return; + if (Browser.mainLoop.queue.length > 0) { + var start = Date.now(); + var blocker = Browser.mainLoop.queue.shift(); + blocker.func(blocker.arg); + if (Browser.mainLoop.remainingBlockers) { + var remaining = Browser.mainLoop.remainingBlockers; + var next = remaining % 1 == 0 ? remaining - 1 : Math.floor(remaining); + if (blocker.counted) { + Browser.mainLoop.remainingBlockers = next; + } else { + next = next + .5; + Browser.mainLoop.remainingBlockers = (8 * remaining + next) / 9; + } + } + Browser.mainLoop.updateStatus(); + if (!checkIsRunning()) return; + setTimeout(Browser.mainLoop.runner, 0); + return; + } + if (!checkIsRunning()) return; + Browser.mainLoop.currentFrameNumber = Browser.mainLoop.currentFrameNumber + 1 | 0; + if (Browser.mainLoop.timingMode == 1 && Browser.mainLoop.timingValue > 1 && Browser.mainLoop.currentFrameNumber % Browser.mainLoop.timingValue != 0) { + Browser.mainLoop.scheduler(); + return; + } else if (Browser.mainLoop.timingMode == 0) { + Browser.mainLoop.tickStartTime = _emscripten_get_now(); + } + Browser.mainLoop.runIter(browserIterationFunc); + if (!checkIsRunning()) return; + if ((typeof SDL === "undefined" ? "undefined" : _typeof(SDL)) == "object") (_SDL$audio = SDL.audio) === null || _SDL$audio === void 0 || (_SDL$audio$queueNewAu = _SDL$audio.queueNewAudioData) === null || _SDL$audio$queueNewAu === void 0 || _SDL$audio$queueNewAu.call(_SDL$audio); + Browser.mainLoop.scheduler(); + }; + if (!noSetTiming) { + if (fps && fps > 0) { + _emscripten_set_main_loop_timing(0, 1e3 / fps); + } else { + _emscripten_set_main_loop_timing(1, 1); + } + Browser.mainLoop.scheduler(); + } + if (simulateInfiniteLoop) { + throw "unwind"; + } +}; +var handleException = function handleException(e) { + if (e instanceof ExitStatus || e == "unwind") { + return EXITSTATUS; + } + quit_(1, e); +}; +var runtimeKeepaliveCounter = 0; +var keepRuntimeAlive = function keepRuntimeAlive() { + return noExitRuntime || runtimeKeepaliveCounter > 0; +}; +var _proc_exit = function _proc_exit(code) { + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + var _Module$onExit; + (_Module$onExit = Module["onExit"]) === null || _Module$onExit === void 0 || _Module$onExit.call(Module, code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); +}; +var exitJS = function exitJS(status, implicit) { + EXITSTATUS = status; + _proc_exit(status); +}; +var _exit = exitJS; +var maybeExit = function maybeExit() { + if (!keepRuntimeAlive()) { + try { + _exit(EXITSTATUS); + } catch (e) { + handleException(e); + } + } +}; +var callUserCallback = function callUserCallback(func) { + if (ABORT) { + return; + } + try { + func(); + maybeExit(); + } catch (e) { + handleException(e); + } +}; +var _safeSetTimeout = function safeSetTimeout(func, timeout) { + return setTimeout(function () { + callUserCallback(func); + }, timeout); +}; +var warnOnce = function warnOnce(text) { + warnOnce.shown || (warnOnce.shown = {}); + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) text = "warning: " + text; + err(text); + } +}; +var Browser = { + mainLoop: { + running: false, + scheduler: null, + method: "", + currentlyRunningMainloop: 0, + func: null, + arg: 0, + timingMode: 0, + timingValue: 0, + currentFrameNumber: 0, + queue: [], + pause: function pause() { + Browser.mainLoop.scheduler = null; + Browser.mainLoop.currentlyRunningMainloop++; + }, + resume: function resume() { + Browser.mainLoop.currentlyRunningMainloop++; + var timingMode = Browser.mainLoop.timingMode; + var timingValue = Browser.mainLoop.timingValue; + var func = Browser.mainLoop.func; + Browser.mainLoop.func = null; + setMainLoop(func, 0, false, Browser.mainLoop.arg, true); + _emscripten_set_main_loop_timing(timingMode, timingValue); + Browser.mainLoop.scheduler(); + }, + updateStatus: function updateStatus() { + if (Module["setStatus"]) { + var message = Module["statusMessage"] || "Please wait..."; + var remaining = Browser.mainLoop.remainingBlockers; + var expected = Browser.mainLoop.expectedBlockers; + if (remaining) { + if (remaining < expected) { + Module["setStatus"]("{message} ({expected - remaining}/{expected})"); + } else { + Module["setStatus"](message); + } + } else { + Module["setStatus"](""); + } + } + }, + runIter: function runIter(func) { + var _Module$postMainLoop; + if (ABORT) return; + if (Module["preMainLoop"]) { + var preRet = Module["preMainLoop"](); + if (preRet === false) { + return; + } + } + callUserCallback(func); + (_Module$postMainLoop = Module["postMainLoop"]) === null || _Module$postMainLoop === void 0 || _Module$postMainLoop.call(Module); + } + }, + isFullscreen: false, + pointerLock: false, + moduleContextCreatedCallbacks: [], + workers: [], + init: function init() { + if (Browser.initted) return; + Browser.initted = true; + var imagePlugin = {}; + imagePlugin["canHandle"] = function imagePlugin_canHandle(name) { + return !Module.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(name); + }; + imagePlugin["handle"] = function imagePlugin_handle(byteArray, name, onload, onerror) { + var b = new Blob([byteArray], { + type: Browser.getMimetype(name) + }); + if (b.size !== byteArray.length) { + b = new Blob([new Uint8Array(byteArray).buffer], { + type: Browser.getMimetype(name) + }); + } + var url = URL.createObjectURL(b); + var img = new Image(); + img.onload = function () { + var canvas = document.createElement("canvas"); + canvas.width = img.width; + canvas.height = img.height; + var ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0); + preloadedImages[name] = canvas; + URL.revokeObjectURL(url); + onload === null || onload === void 0 || onload(byteArray); + }; + img.onerror = function (event) { + err("Image ".concat(url, " could not be decoded")); + onerror === null || onerror === void 0 || onerror(); + }; + img.src = url; + }; + preloadPlugins.push(imagePlugin); + var audioPlugin = {}; + audioPlugin["canHandle"] = function audioPlugin_canHandle(name) { + return !Module.noAudioDecoding && name.substr(-4) in { + ".ogg": 1, + ".wav": 1, + ".mp3": 1 + }; + }; + audioPlugin["handle"] = function audioPlugin_handle(byteArray, name, onload, onerror) { + var done = false; + function finish(audio) { + if (done) return; + done = true; + preloadedAudios[name] = audio; + onload === null || onload === void 0 || onload(byteArray); + } + var b = new Blob([byteArray], { + type: Browser.getMimetype(name) + }); + var url = URL.createObjectURL(b); + var audio = new Audio(); + audio.addEventListener("canplaythrough", function () { + return finish(audio); + }, false); + audio.onerror = function audio_onerror(event) { + if (done) return; + err("warning: browser could not fully decode audio ".concat(name, ", trying slower base64 approach")); + function encode64(data) { + var BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var PAD = "="; + var ret = ""; + var leftchar = 0; + var leftbits = 0; + for (var i = 0; i < data.length; i++) { + leftchar = leftchar << 8 | data[i]; + leftbits += 8; + while (leftbits >= 6) { + var curr = leftchar >> leftbits - 6 & 63; + leftbits -= 6; + ret += BASE[curr]; + } + } + if (leftbits == 2) { + ret += BASE[(leftchar & 3) << 4]; + ret += PAD + PAD; + } else if (leftbits == 4) { + ret += BASE[(leftchar & 15) << 2]; + ret += PAD; + } + return ret; + } + audio.src = "data:audio/x-" + name.substr(-3) + ";base64," + encode64(byteArray); + finish(audio); + }; + audio.src = url; + _safeSetTimeout(function () { + finish(audio); + }, 1e4); + }; + preloadPlugins.push(audioPlugin); + function pointerLockChange() { + Browser.pointerLock = document["pointerLockElement"] === Module["canvas"] || document["mozPointerLockElement"] === Module["canvas"] || document["webkitPointerLockElement"] === Module["canvas"] || document["msPointerLockElement"] === Module["canvas"]; + } + var canvas = Module["canvas"]; + if (canvas) { + canvas.requestPointerLock = canvas["requestPointerLock"] || canvas["mozRequestPointerLock"] || canvas["webkitRequestPointerLock"] || canvas["msRequestPointerLock"] || function () {}; + canvas.exitPointerLock = document["exitPointerLock"] || document["mozExitPointerLock"] || document["webkitExitPointerLock"] || document["msExitPointerLock"] || function () {}; + canvas.exitPointerLock = canvas.exitPointerLock.bind(document); + document.addEventListener("pointerlockchange", pointerLockChange, false); + document.addEventListener("mozpointerlockchange", pointerLockChange, false); + document.addEventListener("webkitpointerlockchange", pointerLockChange, false); + document.addEventListener("mspointerlockchange", pointerLockChange, false); + if (Module["elementPointerLock"]) { + canvas.addEventListener("click", function (ev) { + if (!Browser.pointerLock && Module["canvas"].requestPointerLock) { + Module["canvas"].requestPointerLock(); + ev.preventDefault(); + } + }, false); + } + } + }, + createContext: function createContext(canvas, useWebGL, setInModule, webGLContextAttributes) { + if (useWebGL && Module.ctx && canvas == Module.canvas) return Module.ctx; + var ctx; + var contextHandle; + if (useWebGL) { + var contextAttributes = { + antialias: false, + alpha: false, + majorVersion: typeof WebGL2RenderingContext != "undefined" ? 2 : 1 + }; + if (webGLContextAttributes) { + for (var attribute in webGLContextAttributes) { + contextAttributes[attribute] = webGLContextAttributes[attribute]; + } + } + if (typeof GL != "undefined") { + contextHandle = GL.createContext(canvas, contextAttributes); + if (contextHandle) { + ctx = GL.getContext(contextHandle).GLctx; + } + } + } else { + ctx = canvas.getContext("2d"); + } + if (!ctx) return null; + if (setInModule) { + Module.ctx = ctx; + if (useWebGL) GL.makeContextCurrent(contextHandle); + Module.useWebGL = useWebGL; + Browser.moduleContextCreatedCallbacks.forEach(function (callback) { + return callback(); + }); + Browser.init(); + } + return ctx; + }, + destroyContext: function destroyContext(canvas, useWebGL, setInModule) {}, + fullscreenHandlersInstalled: false, + lockPointer: undefined, + resizeCanvas: undefined, + requestFullscreen: function requestFullscreen(lockPointer, resizeCanvas) { + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + if (typeof Browser.lockPointer == "undefined") Browser.lockPointer = true; + if (typeof Browser.resizeCanvas == "undefined") Browser.resizeCanvas = false; + var canvas = Module["canvas"]; + function fullscreenChange() { + var _Module$onFullScreen, _Module$onFullscreen; + Browser.isFullscreen = false; + var canvasContainer = canvas.parentNode; + if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvasContainer) { + canvas.exitFullscreen = Browser.exitFullscreen; + if (Browser.lockPointer) canvas.requestPointerLock(); + Browser.isFullscreen = true; + if (Browser.resizeCanvas) { + Browser.setFullscreenCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } else { + canvasContainer.parentNode.insertBefore(canvas, canvasContainer); + canvasContainer.parentNode.removeChild(canvasContainer); + if (Browser.resizeCanvas) { + Browser.setWindowedCanvasSize(); + } else { + Browser.updateCanvasDimensions(canvas); + } + } + (_Module$onFullScreen = Module["onFullScreen"]) === null || _Module$onFullScreen === void 0 || _Module$onFullScreen.call(Module, Browser.isFullscreen); + (_Module$onFullscreen = Module["onFullscreen"]) === null || _Module$onFullscreen === void 0 || _Module$onFullscreen.call(Module, Browser.isFullscreen); + } + if (!Browser.fullscreenHandlersInstalled) { + Browser.fullscreenHandlersInstalled = true; + document.addEventListener("fullscreenchange", fullscreenChange, false); + document.addEventListener("mozfullscreenchange", fullscreenChange, false); + document.addEventListener("webkitfullscreenchange", fullscreenChange, false); + document.addEventListener("MSFullscreenChange", fullscreenChange, false); + } + var canvasContainer = document.createElement("div"); + canvas.parentNode.insertBefore(canvasContainer, canvas); + canvasContainer.appendChild(canvas); + canvasContainer.requestFullscreen = canvasContainer["requestFullscreen"] || canvasContainer["mozRequestFullScreen"] || canvasContainer["msRequestFullscreen"] || (canvasContainer["webkitRequestFullscreen"] ? function () { + return canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"]); + } : null) || (canvasContainer["webkitRequestFullScreen"] ? function () { + return canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"]); + } : null); + canvasContainer.requestFullscreen(); + }, + exitFullscreen: function exitFullscreen() { + if (!Browser.isFullscreen) { + return false; + } + var CFS = document["exitFullscreen"] || document["cancelFullScreen"] || document["mozCancelFullScreen"] || document["msExitFullscreen"] || document["webkitCancelFullScreen"] || function () {}; + CFS.apply(document, []); + return true; + }, + nextRAF: 0, + fakeRequestAnimationFrame: function fakeRequestAnimationFrame(func) { + var now = Date.now(); + if (Browser.nextRAF === 0) { + Browser.nextRAF = now + 1e3 / 60; + } else { + while (now + 2 >= Browser.nextRAF) { + Browser.nextRAF += 1e3 / 60; + } + } + var delay = Math.max(Browser.nextRAF - now, 0); + setTimeout(func, delay); + }, + requestAnimationFrame: function (_requestAnimationFrame) { + function requestAnimationFrame(_x) { + return _requestAnimationFrame.apply(this, arguments); + } + requestAnimationFrame.toString = function () { + return _requestAnimationFrame.toString(); + }; + return requestAnimationFrame; + }(function (func) { + if (typeof requestAnimationFrame == "function") { + requestAnimationFrame(func); + return; + } + var RAF = Browser.fakeRequestAnimationFrame; + RAF(func); + }), + safeSetTimeout: function safeSetTimeout(func, timeout) { + return _safeSetTimeout(func, timeout); + }, + safeRequestAnimationFrame: function safeRequestAnimationFrame(func) { + return Browser.requestAnimationFrame(function () { + callUserCallback(func); + }); + }, + getMimetype: function getMimetype(name) { + return { + "jpg": "image/jpeg", + "jpeg": "image/jpeg", + "png": "image/png", + "bmp": "image/bmp", + "ogg": "audio/ogg", + "wav": "audio/wav", + "mp3": "audio/mpeg" + }[name.substr(name.lastIndexOf(".") + 1)]; + }, + getUserMedia: function getUserMedia(func) { + var _window; + (_window = window).getUserMedia || (_window.getUserMedia = navigator["getUserMedia"] || navigator["mozGetUserMedia"]); + window.getUserMedia(func); + }, + getMovementX: function getMovementX(event) { + return event["movementX"] || event["mozMovementX"] || event["webkitMovementX"] || 0; + }, + getMovementY: function getMovementY(event) { + return event["movementY"] || event["mozMovementY"] || event["webkitMovementY"] || 0; + }, + getMouseWheelDelta: function getMouseWheelDelta(event) { + var delta = 0; + switch (event.type) { + case "DOMMouseScroll": + delta = event.detail / 3; + break; + case "mousewheel": + delta = event.wheelDelta / 120; + break; + case "wheel": + delta = event.deltaY; + switch (event.deltaMode) { + case 0: + delta /= 100; + break; + case 1: + delta /= 3; + break; + case 2: + delta *= 80; + break; + default: + throw "unrecognized mouse wheel delta mode: " + event.deltaMode; + } + break; + default: + throw "unrecognized mouse wheel event: " + event.type; + } + return delta; + }, + mouseX: 0, + mouseY: 0, + mouseMovementX: 0, + mouseMovementY: 0, + touches: {}, + lastTouches: {}, + calculateMouseCoords: function calculateMouseCoords(pageX, pageY) { + var rect = Module["canvas"].getBoundingClientRect(); + var cw = Module["canvas"].width; + var ch = Module["canvas"].height; + var scrollX = typeof window.scrollX != "undefined" ? window.scrollX : window.pageXOffset; + var scrollY = typeof window.scrollY != "undefined" ? window.scrollY : window.pageYOffset; + var adjustedX = pageX - (scrollX + rect.left); + var adjustedY = pageY - (scrollY + rect.top); + adjustedX = adjustedX * (cw / rect.width); + adjustedY = adjustedY * (ch / rect.height); + return { + x: adjustedX, + y: adjustedY + }; + }, + setMouseCoords: function setMouseCoords(pageX, pageY) { + var _Browser$calculateMou = Browser.calculateMouseCoords(pageX, pageY), + x = _Browser$calculateMou.x, + y = _Browser$calculateMou.y; + Browser.mouseMovementX = x - Browser.mouseX; + Browser.mouseMovementY = y - Browser.mouseY; + Browser.mouseX = x; + Browser.mouseY = y; + }, + calculateMouseEvent: function calculateMouseEvent(event) { + if (Browser.pointerLock) { + if (event.type != "mousemove" && "mozMovementX" in event) { + Browser.mouseMovementX = Browser.mouseMovementY = 0; + } else { + Browser.mouseMovementX = Browser.getMovementX(event); + Browser.mouseMovementY = Browser.getMovementY(event); + } + if (typeof SDL != "undefined") { + Browser.mouseX = SDL.mouseX + Browser.mouseMovementX; + Browser.mouseY = SDL.mouseY + Browser.mouseMovementY; + } else { + Browser.mouseX += Browser.mouseMovementX; + Browser.mouseY += Browser.mouseMovementY; + } + } else { + if (event.type === "touchstart" || event.type === "touchend" || event.type === "touchmove") { + var touch = event.touch; + if (touch === undefined) { + return; + } + var coords = Browser.calculateMouseCoords(touch.pageX, touch.pageY); + if (event.type === "touchstart") { + Browser.lastTouches[touch.identifier] = coords; + Browser.touches[touch.identifier] = coords; + } else if (event.type === "touchend" || event.type === "touchmove") { + var last = Browser.touches[touch.identifier]; + last || (last = coords); + Browser.lastTouches[touch.identifier] = last; + Browser.touches[touch.identifier] = coords; + } + return; + } + Browser.setMouseCoords(event.pageX, event.pageY); + } + }, + resizeListeners: [], + updateResizeListeners: function updateResizeListeners() { + var canvas = Module["canvas"]; + Browser.resizeListeners.forEach(function (listener) { + return listener(canvas.width, canvas.height); + }); + }, + setCanvasSize: function setCanvasSize(width, height, noUpdates) { + var canvas = Module["canvas"]; + Browser.updateCanvasDimensions(canvas, width, height); + if (!noUpdates) Browser.updateResizeListeners(); + }, + windowedWidth: 0, + windowedHeight: 0, + setFullscreenCanvasSize: function setFullscreenCanvasSize() { + if (typeof SDL != "undefined") { + var flags = HEAPU32[SDL.screen >> 2]; + flags = flags | 8388608; + HEAP32[SDL.screen >> 2] = flags; + } + Browser.updateCanvasDimensions(Module["canvas"]); + Browser.updateResizeListeners(); + }, + setWindowedCanvasSize: function setWindowedCanvasSize() { + if (typeof SDL != "undefined") { + var flags = HEAPU32[SDL.screen >> 2]; + flags = flags & ~8388608; + HEAP32[SDL.screen >> 2] = flags; + } + Browser.updateCanvasDimensions(Module["canvas"]); + Browser.updateResizeListeners(); + }, + updateCanvasDimensions: function updateCanvasDimensions(canvas, wNative, hNative) { + if (wNative && hNative) { + canvas.widthNative = wNative; + canvas.heightNative = hNative; + } else { + wNative = canvas.widthNative; + hNative = canvas.heightNative; + } + var w = wNative; + var h = hNative; + if (Module["forcedAspectRatio"] && Module["forcedAspectRatio"] > 0) { + if (w / h < Module["forcedAspectRatio"]) { + w = Math.round(h * Module["forcedAspectRatio"]); + } else { + h = Math.round(w / Module["forcedAspectRatio"]); + } + } + if ((document["fullscreenElement"] || document["mozFullScreenElement"] || document["msFullscreenElement"] || document["webkitFullscreenElement"] || document["webkitCurrentFullScreenElement"]) === canvas.parentNode && typeof screen != "undefined") { + var factor = Math.min(screen.width / w, screen.height / h); + w = Math.round(w * factor); + h = Math.round(h * factor); + } + if (Browser.resizeCanvas) { + if (canvas.width != w) canvas.width = w; + if (canvas.height != h) canvas.height = h; + if (typeof canvas.style != "undefined") { + canvas.style.removeProperty("width"); + canvas.style.removeProperty("height"); + } + } else { + if (canvas.width != wNative) canvas.width = wNative; + if (canvas.height != hNative) canvas.height = hNative; + if (typeof canvas.style != "undefined") { + if (w != wNative || h != hNative) { + canvas.style.setProperty("width", w + "px", "important"); + canvas.style.setProperty("height", h + "px", "important"); + } else { + canvas.style.removeProperty("width"); + canvas.style.removeProperty("height"); + } + } + } + } +}; +var _emscripten_cancel_main_loop = function _emscripten_cancel_main_loop() { + Browser.mainLoop.pause(); + Browser.mainLoop.func = null; +}; +var _emscripten_date_now = function _emscripten_date_now() { + return Date.now(); +}; +var getHeapMax = function getHeapMax() { + return 2147483648; +}; +var _emscripten_get_heap_max = function _emscripten_get_heap_max() { + return getHeapMax(); +}; +var GL = { + counter: 1, + buffers: [], + programs: [], + framebuffers: [], + renderbuffers: [], + textures: [], + shaders: [], + vaos: [], + contexts: [], + offscreenCanvases: {}, + queries: [], + samplers: [], + transformFeedbacks: [], + syncs: [], + stringCache: {}, + stringiCache: {}, + unpackAlignment: 4, + recordError: function recordError(errorCode) { + if (!GL.lastError) { + GL.lastError = errorCode; + } + }, + getNewId: function getNewId(table) { + var ret = GL.counter++; + for (var i = table.length; i < ret; i++) { + table[i] = null; + } + return ret; + }, + genObject: function genObject(n, buffers, createFunction, objectTable) { + for (var i = 0; i < n; i++) { + var buffer = GLctx[createFunction](); + var id = buffer && GL.getNewId(objectTable); + if (buffer) { + buffer.name = id; + objectTable[id] = buffer; + } else { + GL.recordError(1282); + } + HEAP32[buffers + i * 4 >> 2] = id; + } + }, + getSource: function getSource(shader, count, string, length) { + var source = ""; + for (var i = 0; i < count; ++i) { + var len = length ? HEAPU32[length + i * 4 >> 2] : undefined; + source += UTF8ToString(HEAPU32[string + i * 4 >> 2], len); + } + return source; + }, + createContext: function createContext(canvas, webGLContextAttributes) { + function getChromeVersion() { + var chromeVersion = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./); + if (chromeVersion) return chromeVersion[2] | 0; + } + if (!canvas.getContextSafariWebGL2Fixed) { + var fixedGetContext = function fixedGetContext(ver, attrs) { + var gl = canvas.getContextSafariWebGL2Fixed(ver, attrs); + return ver == "webgl" == gl instanceof WebGLRenderingContext ? gl : null; + }; + canvas.getContextSafariWebGL2Fixed = canvas.getContext; + canvas.getContext = fixedGetContext; + } + var ctx = webGLContextAttributes.majorVersion > 1 ? !(getChromeVersion() <= 57) && canvas.getContext("webgl2", webGLContextAttributes) : canvas.getContext("webgl", webGLContextAttributes) || canvas.getContext("experimental-webgl", webGLContextAttributes); + if (!ctx) return 0; + var handle = GL.registerContext(ctx, webGLContextAttributes); + return handle; + }, + registerContext: function registerContext(ctx, webGLContextAttributes) { + var handle = GL.getNewId(GL.contexts); + var context = { + handle: handle, + attributes: webGLContextAttributes, + version: webGLContextAttributes.majorVersion, + GLctx: ctx + }; + if (ctx.canvas) ctx.canvas.GLctxObject = context; + GL.contexts[handle] = context; + return handle; + }, + makeContextCurrent: function makeContextCurrent(contextHandle) { + var _GL$currentContext; + GL.currentContext = GL.contexts[contextHandle]; + Module.ctx = GLctx = (_GL$currentContext = GL.currentContext) === null || _GL$currentContext === void 0 ? void 0 : _GL$currentContext.GLctx; + return !(contextHandle && !GLctx); + }, + getContext: function getContext(contextHandle) { + return GL.contexts[contextHandle]; + }, + deleteContext: function deleteContext(contextHandle) { + if (GL.currentContext === GL.contexts[contextHandle]) { + GL.currentContext = null; + } + if (_typeof(JSEvents) == "object") { + JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); + } + if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) { + GL.contexts[contextHandle].GLctx.canvas.GLctxObject = undefined; + } + GL.contexts[contextHandle] = null; + } +}; +var _glActiveTexture = function _glActiveTexture(x0) { + return GLctx.activeTexture(x0); +}; +var _emscripten_glActiveTexture = _glActiveTexture; +var _glAttachShader = function _glAttachShader(program, shader) { + GLctx.attachShader(GL.programs[program], GL.shaders[shader]); +}; +var _emscripten_glAttachShader = _glAttachShader; +var _glBeginQuery = function _glBeginQuery(target, id) { + GLctx.beginQuery(target, GL.queries[id]); +}; +var _emscripten_glBeginQuery = _glBeginQuery; +var _glBeginQueryEXT = function _glBeginQueryEXT(target, id) { + GLctx.disjointTimerQueryExt["beginQueryEXT"](target, GL.queries[id]); +}; +var _emscripten_glBeginQueryEXT = _glBeginQueryEXT; +var _glBeginTransformFeedback = function _glBeginTransformFeedback(x0) { + return GLctx.beginTransformFeedback(x0); +}; +var _emscripten_glBeginTransformFeedback = _glBeginTransformFeedback; +var _glBindAttribLocation = function _glBindAttribLocation(program, index, name) { + GLctx.bindAttribLocation(GL.programs[program], index, UTF8ToString(name)); +}; +var _emscripten_glBindAttribLocation = _glBindAttribLocation; +var _glBindBuffer = function _glBindBuffer(target, buffer) { + if (target == 35051) { + GLctx.currentPixelPackBufferBinding = buffer; + } else if (target == 35052) { + GLctx.currentPixelUnpackBufferBinding = buffer; + } + GLctx.bindBuffer(target, GL.buffers[buffer]); +}; +var _emscripten_glBindBuffer = _glBindBuffer; +var _glBindBufferBase = function _glBindBufferBase(target, index, buffer) { + GLctx.bindBufferBase(target, index, GL.buffers[buffer]); +}; +var _emscripten_glBindBufferBase = _glBindBufferBase; +var _glBindBufferRange = function _glBindBufferRange(target, index, buffer, offset, ptrsize) { + GLctx.bindBufferRange(target, index, GL.buffers[buffer], offset, ptrsize); +}; +var _emscripten_glBindBufferRange = _glBindBufferRange; +var _glBindFramebuffer = function _glBindFramebuffer(target, framebuffer) { + GLctx.bindFramebuffer(target, GL.framebuffers[framebuffer]); +}; +var _emscripten_glBindFramebuffer = _glBindFramebuffer; +var _glBindRenderbuffer = function _glBindRenderbuffer(target, renderbuffer) { + GLctx.bindRenderbuffer(target, GL.renderbuffers[renderbuffer]); +}; +var _emscripten_glBindRenderbuffer = _glBindRenderbuffer; +var _glBindSampler = function _glBindSampler(unit, sampler) { + GLctx.bindSampler(unit, GL.samplers[sampler]); +}; +var _emscripten_glBindSampler = _glBindSampler; +var _glBindTexture = function _glBindTexture(target, texture) { + GLctx.bindTexture(target, GL.textures[texture]); +}; +var _emscripten_glBindTexture = _glBindTexture; +var _glBindTransformFeedback = function _glBindTransformFeedback(target, id) { + GLctx.bindTransformFeedback(target, GL.transformFeedbacks[id]); +}; +var _emscripten_glBindTransformFeedback = _glBindTransformFeedback; +var _glBindVertexArray = function _glBindVertexArray(vao) { + GLctx.bindVertexArray(GL.vaos[vao]); +}; +var _emscripten_glBindVertexArray = _glBindVertexArray; +var _glBindVertexArrayOES = _glBindVertexArray; +var _emscripten_glBindVertexArrayOES = _glBindVertexArrayOES; +var _glBlendColor = function _glBlendColor(x0, x1, x2, x3) { + return GLctx.blendColor(x0, x1, x2, x3); +}; +var _emscripten_glBlendColor = _glBlendColor; +var _glBlendEquation = function _glBlendEquation(x0) { + return GLctx.blendEquation(x0); +}; +var _emscripten_glBlendEquation = _glBlendEquation; +var _glBlendEquationSeparate = function _glBlendEquationSeparate(x0, x1) { + return GLctx.blendEquationSeparate(x0, x1); +}; +var _emscripten_glBlendEquationSeparate = _glBlendEquationSeparate; +var _glBlendFunc = function _glBlendFunc(x0, x1) { + return GLctx.blendFunc(x0, x1); +}; +var _emscripten_glBlendFunc = _glBlendFunc; +var _glBlendFuncSeparate = function _glBlendFuncSeparate(x0, x1, x2, x3) { + return GLctx.blendFuncSeparate(x0, x1, x2, x3); +}; +var _emscripten_glBlendFuncSeparate = _glBlendFuncSeparate; +var _glBlitFramebuffer = function _glBlitFramebuffer(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9) { + return GLctx.blitFramebuffer(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9); +}; +var _emscripten_glBlitFramebuffer = _glBlitFramebuffer; +var _glBufferData = function _glBufferData(target, size, data, usage) { + if (GL.currentContext.version >= 2) { + if (data && size) { + GLctx.bufferData(target, HEAPU8, usage, data, size); + } else { + GLctx.bufferData(target, size, usage); + } + return; + } + GLctx.bufferData(target, data ? HEAPU8.subarray(data, data + size) : size, usage); +}; +var _emscripten_glBufferData = _glBufferData; +var _glBufferSubData = function _glBufferSubData(target, offset, size, data) { + if (GL.currentContext.version >= 2) { + size && GLctx.bufferSubData(target, offset, HEAPU8, data, size); + return; + } + GLctx.bufferSubData(target, offset, HEAPU8.subarray(data, data + size)); +}; +var _emscripten_glBufferSubData = _glBufferSubData; +var _glCheckFramebufferStatus = function _glCheckFramebufferStatus(x0) { + return GLctx.checkFramebufferStatus(x0); +}; +var _emscripten_glCheckFramebufferStatus = _glCheckFramebufferStatus; +var _glClear = function _glClear(x0) { + return GLctx.clear(x0); +}; +var _emscripten_glClear = _glClear; +var _glClearBufferfi = function _glClearBufferfi(x0, x1, x2, x3) { + return GLctx.clearBufferfi(x0, x1, x2, x3); +}; +var _emscripten_glClearBufferfi = _glClearBufferfi; +var _glClearBufferfv = function _glClearBufferfv(buffer, drawbuffer, value) { + GLctx.clearBufferfv(buffer, drawbuffer, HEAPF32, value >> 2); +}; +var _emscripten_glClearBufferfv = _glClearBufferfv; +var _glClearBufferiv = function _glClearBufferiv(buffer, drawbuffer, value) { + GLctx.clearBufferiv(buffer, drawbuffer, HEAP32, value >> 2); +}; +var _emscripten_glClearBufferiv = _glClearBufferiv; +var _glClearBufferuiv = function _glClearBufferuiv(buffer, drawbuffer, value) { + GLctx.clearBufferuiv(buffer, drawbuffer, HEAPU32, value >> 2); +}; +var _emscripten_glClearBufferuiv = _glClearBufferuiv; +var _glClearColor = function _glClearColor(x0, x1, x2, x3) { + return GLctx.clearColor(x0, x1, x2, x3); +}; +var _emscripten_glClearColor = _glClearColor; +var _glClearDepthf = function _glClearDepthf(x0) { + return GLctx.clearDepth(x0); +}; +var _emscripten_glClearDepthf = _glClearDepthf; +var _glClearStencil = function _glClearStencil(x0) { + return GLctx.clearStencil(x0); +}; +var _emscripten_glClearStencil = _glClearStencil; +var convertI32PairToI53 = function convertI32PairToI53(lo, hi) { + return (lo >>> 0) + hi * 4294967296; +}; +var _glClientWaitSync = function _glClientWaitSync(sync, flags, timeout_low, timeout_high) { + var timeout = convertI32PairToI53(timeout_low, timeout_high); + return GLctx.clientWaitSync(GL.syncs[sync], flags, timeout); +}; +var _emscripten_glClientWaitSync = _glClientWaitSync; +var _glColorMask = function _glColorMask(red, green, blue, alpha) { + GLctx.colorMask(!!red, !!green, !!blue, !!alpha); +}; +var _emscripten_glColorMask = _glColorMask; +var _glCompileShader = function _glCompileShader(shader) { + GLctx.compileShader(GL.shaders[shader]); +}; +var _emscripten_glCompileShader = _glCompileShader; +var _glCompressedTexImage2D = function _glCompressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data) { + if (GL.currentContext.version >= 2) { + if (GLctx.currentPixelUnpackBufferBinding || !imageSize) { + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, imageSize, data); + } else { + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, HEAPU8, data, imageSize); + } + return; + } + GLctx.compressedTexImage2D(target, level, internalFormat, width, height, border, data ? HEAPU8.subarray(data, data + imageSize) : null); +}; +var _emscripten_glCompressedTexImage2D = _glCompressedTexImage2D; +var _glCompressedTexImage3D = function _glCompressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.compressedTexImage3D(target, level, internalFormat, width, height, depth, border, imageSize, data); + } else { + GLctx.compressedTexImage3D(target, level, internalFormat, width, height, depth, border, HEAPU8, data, imageSize); + } +}; +var _emscripten_glCompressedTexImage3D = _glCompressedTexImage3D; +var _glCompressedTexSubImage2D = function _glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) { + if (GL.currentContext.version >= 2) { + if (GLctx.currentPixelUnpackBufferBinding || !imageSize) { + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); + } else { + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, HEAPU8, data, imageSize); + } + return; + } + GLctx.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data ? HEAPU8.subarray(data, data + imageSize) : null); +}; +var _emscripten_glCompressedTexSubImage2D = _glCompressedTexSubImage2D; +var _glCompressedTexSubImage3D = function _glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + } else { + GLctx.compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, HEAPU8, data, imageSize); + } +}; +var _emscripten_glCompressedTexSubImage3D = _glCompressedTexSubImage3D; +var _glCopyBufferSubData = function _glCopyBufferSubData(x0, x1, x2, x3, x4) { + return GLctx.copyBufferSubData(x0, x1, x2, x3, x4); +}; +var _emscripten_glCopyBufferSubData = _glCopyBufferSubData; +var _glCopyTexImage2D = function _glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { + return GLctx.copyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7); +}; +var _emscripten_glCopyTexImage2D = _glCopyTexImage2D; +var _glCopyTexSubImage2D = function _glCopyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { + return GLctx.copyTexSubImage2D(x0, x1, x2, x3, x4, x5, x6, x7); +}; +var _emscripten_glCopyTexSubImage2D = _glCopyTexSubImage2D; +var _glCopyTexSubImage3D = function _glCopyTexSubImage3D(x0, x1, x2, x3, x4, x5, x6, x7, x8) { + return GLctx.copyTexSubImage3D(x0, x1, x2, x3, x4, x5, x6, x7, x8); +}; +var _emscripten_glCopyTexSubImage3D = _glCopyTexSubImage3D; +var _glCreateProgram = function _glCreateProgram() { + var id = GL.getNewId(GL.programs); + var program = GLctx.createProgram(); + program.name = id; + program.maxUniformLength = program.maxAttributeLength = program.maxUniformBlockNameLength = 0; + program.uniformIdCounter = 1; + GL.programs[id] = program; + return id; +}; +var _emscripten_glCreateProgram = _glCreateProgram; +var _glCreateShader = function _glCreateShader(shaderType) { + var id = GL.getNewId(GL.shaders); + GL.shaders[id] = GLctx.createShader(shaderType); + return id; +}; +var _emscripten_glCreateShader = _glCreateShader; +var _glCullFace = function _glCullFace(x0) { + return GLctx.cullFace(x0); +}; +var _emscripten_glCullFace = _glCullFace; +var _glDeleteBuffers = function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[buffers + i * 4 >> 2]; + var buffer = GL.buffers[id]; + if (!buffer) continue; + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + if (id == GLctx.currentPixelPackBufferBinding) GLctx.currentPixelPackBufferBinding = 0; + if (id == GLctx.currentPixelUnpackBufferBinding) GLctx.currentPixelUnpackBufferBinding = 0; + } +}; +var _emscripten_glDeleteBuffers = _glDeleteBuffers; +var _glDeleteFramebuffers = function _glDeleteFramebuffers(n, framebuffers) { + for (var i = 0; i < n; ++i) { + var id = HEAP32[framebuffers + i * 4 >> 2]; + var framebuffer = GL.framebuffers[id]; + if (!framebuffer) continue; + GLctx.deleteFramebuffer(framebuffer); + framebuffer.name = 0; + GL.framebuffers[id] = null; + } +}; +var _emscripten_glDeleteFramebuffers = _glDeleteFramebuffers; +var _glDeleteProgram = function _glDeleteProgram(id) { + if (!id) return; + var program = GL.programs[id]; + if (!program) { + GL.recordError(1281); + return; + } + GLctx.deleteProgram(program); + program.name = 0; + GL.programs[id] = null; +}; +var _emscripten_glDeleteProgram = _glDeleteProgram; +var _glDeleteQueries = function _glDeleteQueries(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[ids + i * 4 >> 2]; + var query = GL.queries[id]; + if (!query) continue; + GLctx.deleteQuery(query); + GL.queries[id] = null; + } +}; +var _emscripten_glDeleteQueries = _glDeleteQueries; +var _glDeleteQueriesEXT = function _glDeleteQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[ids + i * 4 >> 2]; + var query = GL.queries[id]; + if (!query) continue; + GLctx.disjointTimerQueryExt["deleteQueryEXT"](query); + GL.queries[id] = null; + } +}; +var _emscripten_glDeleteQueriesEXT = _glDeleteQueriesEXT; +var _glDeleteRenderbuffers = function _glDeleteRenderbuffers(n, renderbuffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[renderbuffers + i * 4 >> 2]; + var renderbuffer = GL.renderbuffers[id]; + if (!renderbuffer) continue; + GLctx.deleteRenderbuffer(renderbuffer); + renderbuffer.name = 0; + GL.renderbuffers[id] = null; + } +}; +var _emscripten_glDeleteRenderbuffers = _glDeleteRenderbuffers; +var _glDeleteSamplers = function _glDeleteSamplers(n, samplers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[samplers + i * 4 >> 2]; + var sampler = GL.samplers[id]; + if (!sampler) continue; + GLctx.deleteSampler(sampler); + sampler.name = 0; + GL.samplers[id] = null; + } +}; +var _emscripten_glDeleteSamplers = _glDeleteSamplers; +var _glDeleteShader = function _glDeleteShader(id) { + if (!id) return; + var shader = GL.shaders[id]; + if (!shader) { + GL.recordError(1281); + return; + } + GLctx.deleteShader(shader); + GL.shaders[id] = null; +}; +var _emscripten_glDeleteShader = _glDeleteShader; +var _glDeleteSync = function _glDeleteSync(id) { + if (!id) return; + var sync = GL.syncs[id]; + if (!sync) { + GL.recordError(1281); + return; + } + GLctx.deleteSync(sync); + sync.name = 0; + GL.syncs[id] = null; +}; +var _emscripten_glDeleteSync = _glDeleteSync; +var _glDeleteTextures = function _glDeleteTextures(n, textures) { + for (var i = 0; i < n; i++) { + var id = HEAP32[textures + i * 4 >> 2]; + var texture = GL.textures[id]; + if (!texture) continue; + GLctx.deleteTexture(texture); + texture.name = 0; + GL.textures[id] = null; + } +}; +var _emscripten_glDeleteTextures = _glDeleteTextures; +var _glDeleteTransformFeedbacks = function _glDeleteTransformFeedbacks(n, ids) { + for (var i = 0; i < n; i++) { + var id = HEAP32[ids + i * 4 >> 2]; + var transformFeedback = GL.transformFeedbacks[id]; + if (!transformFeedback) continue; + GLctx.deleteTransformFeedback(transformFeedback); + transformFeedback.name = 0; + GL.transformFeedbacks[id] = null; + } +}; +var _emscripten_glDeleteTransformFeedbacks = _glDeleteTransformFeedbacks; +var _glDeleteVertexArrays = function _glDeleteVertexArrays(n, vaos) { + for (var i = 0; i < n; i++) { + var id = HEAP32[vaos + i * 4 >> 2]; + GLctx.deleteVertexArray(GL.vaos[id]); + GL.vaos[id] = null; + } +}; +var _emscripten_glDeleteVertexArrays = _glDeleteVertexArrays; +var _glDeleteVertexArraysOES = _glDeleteVertexArrays; +var _emscripten_glDeleteVertexArraysOES = _glDeleteVertexArraysOES; +var _glDepthFunc = function _glDepthFunc(x0) { + return GLctx.depthFunc(x0); +}; +var _emscripten_glDepthFunc = _glDepthFunc; +var _glDepthMask = function _glDepthMask(flag) { + GLctx.depthMask(!!flag); +}; +var _emscripten_glDepthMask = _glDepthMask; +var _glDepthRangef = function _glDepthRangef(x0, x1) { + return GLctx.depthRange(x0, x1); +}; +var _emscripten_glDepthRangef = _glDepthRangef; +var _glDetachShader = function _glDetachShader(program, shader) { + GLctx.detachShader(GL.programs[program], GL.shaders[shader]); +}; +var _emscripten_glDetachShader = _glDetachShader; +var _glDisable = function _glDisable(x0) { + return GLctx.disable(x0); +}; +var _emscripten_glDisable = _glDisable; +var _glDisableVertexAttribArray = function _glDisableVertexAttribArray(index) { + GLctx.disableVertexAttribArray(index); +}; +var _emscripten_glDisableVertexAttribArray = _glDisableVertexAttribArray; +var _glDrawArrays = function _glDrawArrays(mode, first, count) { + GLctx.drawArrays(mode, first, count); +}; +var _emscripten_glDrawArrays = _glDrawArrays; +var _glDrawArraysInstanced = function _glDrawArraysInstanced(mode, first, count, primcount) { + GLctx.drawArraysInstanced(mode, first, count, primcount); +}; +var _emscripten_glDrawArraysInstanced = _glDrawArraysInstanced; +var _glDrawArraysInstancedANGLE = _glDrawArraysInstanced; +var _emscripten_glDrawArraysInstancedANGLE = _glDrawArraysInstancedANGLE; +var _glDrawArraysInstancedARB = _glDrawArraysInstanced; +var _emscripten_glDrawArraysInstancedARB = _glDrawArraysInstancedARB; +var _glDrawArraysInstancedEXT = _glDrawArraysInstanced; +var _emscripten_glDrawArraysInstancedEXT = _glDrawArraysInstancedEXT; +var _glDrawArraysInstancedNV = _glDrawArraysInstanced; +var _emscripten_glDrawArraysInstancedNV = _glDrawArraysInstancedNV; +var tempFixedLengthArray = []; +var _glDrawBuffers = function _glDrawBuffers(n, bufs) { + var bufArray = tempFixedLengthArray[n]; + for (var i = 0; i < n; i++) { + bufArray[i] = HEAP32[bufs + i * 4 >> 2]; + } + GLctx.drawBuffers(bufArray); +}; +var _emscripten_glDrawBuffers = _glDrawBuffers; +var _glDrawBuffersEXT = _glDrawBuffers; +var _emscripten_glDrawBuffersEXT = _glDrawBuffersEXT; +var _glDrawBuffersWEBGL = _glDrawBuffers; +var _emscripten_glDrawBuffersWEBGL = _glDrawBuffersWEBGL; +var _glDrawElements = function _glDrawElements(mode, count, type, indices) { + GLctx.drawElements(mode, count, type, indices); +}; +var _emscripten_glDrawElements = _glDrawElements; +var _glDrawElementsInstanced = function _glDrawElementsInstanced(mode, count, type, indices, primcount) { + GLctx.drawElementsInstanced(mode, count, type, indices, primcount); +}; +var _emscripten_glDrawElementsInstanced = _glDrawElementsInstanced; +var _glDrawElementsInstancedANGLE = _glDrawElementsInstanced; +var _emscripten_glDrawElementsInstancedANGLE = _glDrawElementsInstancedANGLE; +var _glDrawElementsInstancedARB = _glDrawElementsInstanced; +var _emscripten_glDrawElementsInstancedARB = _glDrawElementsInstancedARB; +var _glDrawElementsInstancedEXT = _glDrawElementsInstanced; +var _emscripten_glDrawElementsInstancedEXT = _glDrawElementsInstancedEXT; +var _glDrawElementsInstancedNV = _glDrawElementsInstanced; +var _emscripten_glDrawElementsInstancedNV = _glDrawElementsInstancedNV; +var _glDrawRangeElements = function _glDrawRangeElements(mode, start, end, count, type, indices) { + _glDrawElements(mode, count, type, indices); +}; +var _emscripten_glDrawRangeElements = _glDrawRangeElements; +var _glEnable = function _glEnable(x0) { + return GLctx.enable(x0); +}; +var _emscripten_glEnable = _glEnable; +var _glEnableVertexAttribArray = function _glEnableVertexAttribArray(index) { + GLctx.enableVertexAttribArray(index); +}; +var _emscripten_glEnableVertexAttribArray = _glEnableVertexAttribArray; +var _glEndQuery = function _glEndQuery(x0) { + return GLctx.endQuery(x0); +}; +var _emscripten_glEndQuery = _glEndQuery; +var _glEndQueryEXT = function _glEndQueryEXT(target) { + GLctx.disjointTimerQueryExt["endQueryEXT"](target); +}; +var _emscripten_glEndQueryEXT = _glEndQueryEXT; +var _glEndTransformFeedback = function _glEndTransformFeedback() { + return GLctx.endTransformFeedback(); +}; +var _emscripten_glEndTransformFeedback = _glEndTransformFeedback; +var _glFenceSync = function _glFenceSync(condition, flags) { + var sync = GLctx.fenceSync(condition, flags); + if (sync) { + var id = GL.getNewId(GL.syncs); + sync.name = id; + GL.syncs[id] = sync; + return id; + } + return 0; +}; +var _emscripten_glFenceSync = _glFenceSync; +var _glFinish = function _glFinish() { + return GLctx.finish(); +}; +var _emscripten_glFinish = _glFinish; +var _glFlush = function _glFlush() { + return GLctx.flush(); +}; +var _emscripten_glFlush = _glFlush; +var _glFramebufferRenderbuffer = function _glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) { + GLctx.framebufferRenderbuffer(target, attachment, renderbuffertarget, GL.renderbuffers[renderbuffer]); +}; +var _emscripten_glFramebufferRenderbuffer = _glFramebufferRenderbuffer; +var _glFramebufferTexture2D = function _glFramebufferTexture2D(target, attachment, textarget, texture, level) { + GLctx.framebufferTexture2D(target, attachment, textarget, GL.textures[texture], level); +}; +var _emscripten_glFramebufferTexture2D = _glFramebufferTexture2D; +var _glFramebufferTextureLayer = function _glFramebufferTextureLayer(target, attachment, texture, level, layer) { + GLctx.framebufferTextureLayer(target, attachment, GL.textures[texture], level, layer); +}; +var _emscripten_glFramebufferTextureLayer = _glFramebufferTextureLayer; +var _glFrontFace = function _glFrontFace(x0) { + return GLctx.frontFace(x0); +}; +var _emscripten_glFrontFace = _glFrontFace; +var _glGenBuffers = function _glGenBuffers(n, buffers) { + GL.genObject(n, buffers, "createBuffer", GL.buffers); +}; +var _emscripten_glGenBuffers = _glGenBuffers; +var _glGenFramebuffers = function _glGenFramebuffers(n, ids) { + GL.genObject(n, ids, "createFramebuffer", GL.framebuffers); +}; +var _emscripten_glGenFramebuffers = _glGenFramebuffers; +var _glGenQueries = function _glGenQueries(n, ids) { + GL.genObject(n, ids, "createQuery", GL.queries); +}; +var _emscripten_glGenQueries = _glGenQueries; +var _glGenQueriesEXT = function _glGenQueriesEXT(n, ids) { + for (var i = 0; i < n; i++) { + var query = GLctx.disjointTimerQueryExt["createQueryEXT"](); + if (!query) { + GL.recordError(1282); + while (i < n) HEAP32[ids + i++ * 4 >> 2] = 0; + return; + } + var id = GL.getNewId(GL.queries); + query.name = id; + GL.queries[id] = query; + HEAP32[ids + i * 4 >> 2] = id; + } +}; +var _emscripten_glGenQueriesEXT = _glGenQueriesEXT; +var _glGenRenderbuffers = function _glGenRenderbuffers(n, renderbuffers) { + GL.genObject(n, renderbuffers, "createRenderbuffer", GL.renderbuffers); +}; +var _emscripten_glGenRenderbuffers = _glGenRenderbuffers; +var _glGenSamplers = function _glGenSamplers(n, samplers) { + GL.genObject(n, samplers, "createSampler", GL.samplers); +}; +var _emscripten_glGenSamplers = _glGenSamplers; +var _glGenTextures = function _glGenTextures(n, textures) { + GL.genObject(n, textures, "createTexture", GL.textures); +}; +var _emscripten_glGenTextures = _glGenTextures; +var _glGenTransformFeedbacks = function _glGenTransformFeedbacks(n, ids) { + GL.genObject(n, ids, "createTransformFeedback", GL.transformFeedbacks); +}; +var _emscripten_glGenTransformFeedbacks = _glGenTransformFeedbacks; +var _glGenVertexArrays = function _glGenVertexArrays(n, arrays) { + GL.genObject(n, arrays, "createVertexArray", GL.vaos); +}; +var _emscripten_glGenVertexArrays = _glGenVertexArrays; +var _glGenVertexArraysOES = _glGenVertexArrays; +var _emscripten_glGenVertexArraysOES = _glGenVertexArraysOES; +var _glGenerateMipmap = function _glGenerateMipmap(x0) { + return GLctx.generateMipmap(x0); +}; +var _emscripten_glGenerateMipmap = _glGenerateMipmap; +var __glGetActiveAttribOrUniform = function __glGetActiveAttribOrUniform(funcName, program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx[funcName](program, index); + if (info) { + var numBytesWrittenExclNull = name && stringToUTF8(info.name, name, bufSize); + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; + if (size) HEAP32[size >> 2] = info.size; + if (type) HEAP32[type >> 2] = info.type; + } +}; +var _glGetActiveAttrib = function _glGetActiveAttrib(program, index, bufSize, length, size, type, name) { + __glGetActiveAttribOrUniform("getActiveAttrib", program, index, bufSize, length, size, type, name); +}; +var _emscripten_glGetActiveAttrib = _glGetActiveAttrib; +var _glGetActiveUniform = function _glGetActiveUniform(program, index, bufSize, length, size, type, name) { + __glGetActiveAttribOrUniform("getActiveUniform", program, index, bufSize, length, size, type, name); +}; +var _emscripten_glGetActiveUniform = _glGetActiveUniform; +var _glGetActiveUniformBlockName = function _glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName) { + program = GL.programs[program]; + var result = GLctx.getActiveUniformBlockName(program, uniformBlockIndex); + if (!result) return; + if (uniformBlockName && bufSize > 0) { + var numBytesWrittenExclNull = stringToUTF8(result, uniformBlockName, bufSize); + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; + } else { + if (length) HEAP32[length >> 2] = 0; + } +}; +var _emscripten_glGetActiveUniformBlockName = _glGetActiveUniformBlockName; +var _glGetActiveUniformBlockiv = function _glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + program = GL.programs[program]; + if (pname == 35393) { + var name = GLctx.getActiveUniformBlockName(program, uniformBlockIndex); + HEAP32[params >> 2] = name.length + 1; + return; + } + var result = GLctx.getActiveUniformBlockParameter(program, uniformBlockIndex, pname); + if (result === null) return; + if (pname == 35395) { + for (var i = 0; i < result.length; i++) { + HEAP32[params + i * 4 >> 2] = result[i]; + } + } else { + HEAP32[params >> 2] = result; + } +}; +var _emscripten_glGetActiveUniformBlockiv = _glGetActiveUniformBlockiv; +var _glGetActiveUniformsiv = function _glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + if (uniformCount > 0 && uniformIndices == 0) { + GL.recordError(1281); + return; + } + program = GL.programs[program]; + var ids = []; + for (var i = 0; i < uniformCount; i++) { + ids.push(HEAP32[uniformIndices + i * 4 >> 2]); + } + var result = GLctx.getActiveUniforms(program, ids, pname); + if (!result) return; + var len = result.length; + for (var i = 0; i < len; i++) { + HEAP32[params + i * 4 >> 2] = result[i]; + } +}; +var _emscripten_glGetActiveUniformsiv = _glGetActiveUniformsiv; +var _glGetAttachedShaders = function _glGetAttachedShaders(program, maxCount, count, shaders) { + var result = GLctx.getAttachedShaders(GL.programs[program]); + var len = result.length; + if (len > maxCount) { + len = maxCount; + } + HEAP32[count >> 2] = len; + for (var i = 0; i < len; ++i) { + var id = GL.shaders.indexOf(result[i]); + HEAP32[shaders + i * 4 >> 2] = id; + } +}; +var _emscripten_glGetAttachedShaders = _glGetAttachedShaders; +var _glGetAttribLocation = function _glGetAttribLocation(program, name) { + return GLctx.getAttribLocation(GL.programs[program], UTF8ToString(name)); +}; +var _emscripten_glGetAttribLocation = _glGetAttribLocation; +var writeI53ToI64 = function writeI53ToI64(ptr, num) { + HEAPU32[ptr >> 2] = num; + var lower = HEAPU32[ptr >> 2]; + HEAPU32[ptr + 4 >> 2] = (num - lower) / 4294967296; +}; +var getEmscriptenSupportedExtensions = function getEmscriptenSupportedExtensions(ctx) { + var supportedExtensions = ["ANGLE_instanced_arrays", "EXT_blend_minmax", "EXT_disjoint_timer_query", "EXT_frag_depth", "EXT_shader_texture_lod", "EXT_sRGB", "OES_element_index_uint", "OES_fbo_render_mipmap", "OES_standard_derivatives", "OES_texture_float", "OES_texture_half_float", "OES_texture_half_float_linear", "OES_vertex_array_object", "WEBGL_color_buffer_float", "WEBGL_depth_texture", "WEBGL_draw_buffers", "EXT_color_buffer_float", "EXT_conservative_depth", "EXT_disjoint_timer_query_webgl2", "EXT_texture_norm16", "NV_shader_noperspective_interpolation", "WEBGL_clip_cull_distance", "EXT_color_buffer_half_float", "EXT_depth_clamp", "EXT_float_blend", "EXT_texture_compression_bptc", "EXT_texture_compression_rgtc", "EXT_texture_filter_anisotropic", "KHR_parallel_shader_compile", "OES_texture_float_linear", "WEBGL_blend_func_extended", "WEBGL_compressed_texture_astc", "WEBGL_compressed_texture_etc", "WEBGL_compressed_texture_etc1", "WEBGL_compressed_texture_s3tc", "WEBGL_compressed_texture_s3tc_srgb", "WEBGL_debug_renderer_info", "WEBGL_debug_shaders", "WEBGL_lose_context", "WEBGL_multi_draw"]; + return (ctx.getSupportedExtensions() || []).filter(function (ext) { + return supportedExtensions.includes(ext); + }); +}; +var webglGetExtensions = function $webglGetExtensions() { + var exts = getEmscriptenSupportedExtensions(GLctx); + exts = exts.concat(exts.map(function (e) { + return "GL_" + e; + })); + return exts; +}; +var emscriptenWebGLGet = function emscriptenWebGLGet(name_, p, type) { + if (!p) { + GL.recordError(1281); + return; + } + var ret = undefined; + switch (name_) { + case 36346: + ret = 1; + break; + case 36344: + if (type != 0 && type != 1) { + GL.recordError(1280); + } + return; + case 34814: + case 36345: + ret = 0; + break; + case 34466: + var formats = GLctx.getParameter(34467); + ret = formats ? formats.length : 0; + break; + case 33309: + if (GL.currentContext.version < 2) { + GL.recordError(1282); + return; + } + ret = webglGetExtensions().length; + break; + case 33307: + case 33308: + if (GL.currentContext.version < 2) { + GL.recordError(1280); + return; + } + ret = name_ == 33307 ? 3 : 0; + break; + } + if (ret === undefined) { + var result = GLctx.getParameter(name_); + switch (_typeof(result)) { + case "number": + ret = result; + break; + case "boolean": + ret = result ? 1 : 0; + break; + case "string": + GL.recordError(1280); + return; + case "object": + if (result === null) { + switch (name_) { + case 34964: + case 35725: + case 34965: + case 36006: + case 36007: + case 32873: + case 34229: + case 36662: + case 36663: + case 35053: + case 35055: + case 36010: + case 35097: + case 35869: + case 32874: + case 36389: + case 35983: + case 35368: + case 34068: + { + ret = 0; + break; + } + default: + { + GL.recordError(1280); + return; + } + } + } else if (result instanceof Float32Array || result instanceof Uint32Array || result instanceof Int32Array || result instanceof Array) { + for (var i = 0; i < result.length; ++i) { + switch (type) { + case 0: + HEAP32[p + i * 4 >> 2] = result[i]; + break; + case 2: + HEAPF32[p + i * 4 >> 2] = result[i]; + break; + case 4: + HEAP8[p + i] = result[i] ? 1 : 0; + break; + } + } + return; + } else { + try { + ret = result.name | 0; + } catch (e) { + GL.recordError(1280); + err("GL_INVALID_ENUM in glGet".concat(type, "v: Unknown object returned from WebGL getParameter(").concat(name_, ")! (error: ").concat(e, ")")); + return; + } + } + break; + default: + GL.recordError(1280); + err("GL_INVALID_ENUM in glGet".concat(type, "v: Native code calling glGet").concat(type, "v(").concat(name_, ") and it returns ").concat(result, " of type ").concat(_typeof(result), "!")); + return; + } + } + switch (type) { + case 1: + writeI53ToI64(p, ret); + break; + case 0: + HEAP32[p >> 2] = ret; + break; + case 2: + HEAPF32[p >> 2] = ret; + break; + case 4: + HEAP8[p] = ret ? 1 : 0; + break; + } +}; +var _glGetBooleanv = function _glGetBooleanv(name_, p) { + return emscriptenWebGLGet(name_, p, 4); +}; +var _emscripten_glGetBooleanv = _glGetBooleanv; +var _glGetBufferParameteri64v = function _glGetBufferParameteri64v(target, value, data) { + if (!data) { + GL.recordError(1281); + return; + } + writeI53ToI64(data, GLctx.getBufferParameter(target, value)); +}; +var _emscripten_glGetBufferParameteri64v = _glGetBufferParameteri64v; +var _glGetBufferParameteriv = function _glGetBufferParameteriv(target, value, data) { + if (!data) { + GL.recordError(1281); + return; + } + HEAP32[data >> 2] = GLctx.getBufferParameter(target, value); +}; +var _emscripten_glGetBufferParameteriv = _glGetBufferParameteriv; +var _glGetError = function _glGetError() { + var error = GLctx.getError() || GL.lastError; + GL.lastError = 0; + return error; +}; +var _emscripten_glGetError = _glGetError; +var _glGetFloatv = function _glGetFloatv(name_, p) { + return emscriptenWebGLGet(name_, p, 2); +}; +var _emscripten_glGetFloatv = _glGetFloatv; +var _glGetFragDataLocation = function _glGetFragDataLocation(program, name) { + return GLctx.getFragDataLocation(GL.programs[program], UTF8ToString(name)); +}; +var _emscripten_glGetFragDataLocation = _glGetFragDataLocation; +var _glGetFramebufferAttachmentParameteriv = function _glGetFramebufferAttachmentParameteriv(target, attachment, pname, params) { + var result = GLctx.getFramebufferAttachmentParameter(target, attachment, pname); + if (result instanceof WebGLRenderbuffer || result instanceof WebGLTexture) { + result = result.name | 0; + } + HEAP32[params >> 2] = result; +}; +var _emscripten_glGetFramebufferAttachmentParameteriv = _glGetFramebufferAttachmentParameteriv; +var emscriptenWebGLGetIndexed = function emscriptenWebGLGetIndexed(target, index, data, type) { + if (!data) { + GL.recordError(1281); + return; + } + var result = GLctx.getIndexedParameter(target, index); + var ret; + switch (_typeof(result)) { + case "boolean": + ret = result ? 1 : 0; + break; + case "number": + ret = result; + break; + case "object": + if (result === null) { + switch (target) { + case 35983: + case 35368: + ret = 0; + break; + default: + { + GL.recordError(1280); + return; + } + } + } else if (result instanceof WebGLBuffer) { + ret = result.name | 0; + } else { + GL.recordError(1280); + return; + } + break; + default: + GL.recordError(1280); + return; + } + switch (type) { + case 1: + writeI53ToI64(data, ret); + break; + case 0: + HEAP32[data >> 2] = ret; + break; + case 2: + HEAPF32[data >> 2] = ret; + break; + case 4: + HEAP8[data] = ret ? 1 : 0; + break; + default: + throw "internal emscriptenWebGLGetIndexed() error, bad type: " + type; + } +}; +var _glGetInteger64i_v = function _glGetInteger64i_v(target, index, data) { + return emscriptenWebGLGetIndexed(target, index, data, 1); +}; +var _emscripten_glGetInteger64i_v = _glGetInteger64i_v; +var _glGetInteger64v = function _glGetInteger64v(name_, p) { + emscriptenWebGLGet(name_, p, 1); +}; +var _emscripten_glGetInteger64v = _glGetInteger64v; +var _glGetIntegeri_v = function _glGetIntegeri_v(target, index, data) { + return emscriptenWebGLGetIndexed(target, index, data, 0); +}; +var _emscripten_glGetIntegeri_v = _glGetIntegeri_v; +var _glGetIntegerv = function _glGetIntegerv(name_, p) { + return emscriptenWebGLGet(name_, p, 0); +}; +var _emscripten_glGetIntegerv = _glGetIntegerv; +var _glGetInternalformativ = function _glGetInternalformativ(target, internalformat, pname, bufSize, params) { + if (bufSize < 0) { + GL.recordError(1281); + return; + } + if (!params) { + GL.recordError(1281); + return; + } + var ret = GLctx.getInternalformatParameter(target, internalformat, pname); + if (ret === null) return; + for (var i = 0; i < ret.length && i < bufSize; ++i) { + HEAP32[params + i * 4 >> 2] = ret[i]; + } +}; +var _emscripten_glGetInternalformativ = _glGetInternalformativ; +var _glGetProgramBinary = function _glGetProgramBinary(program, bufSize, length, binaryFormat, binary) { + GL.recordError(1282); +}; +var _emscripten_glGetProgramBinary = _glGetProgramBinary; +var _glGetProgramInfoLog = function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = "(unknown error)"; + var numBytesWrittenExclNull = maxLength > 0 && infoLog ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; +}; +var _emscripten_glGetProgramInfoLog = _glGetProgramInfoLog; +var _glGetProgramiv = function _glGetProgramiv(program, pname, p) { + if (!p) { + GL.recordError(1281); + return; + } + if (program >= GL.counter) { + GL.recordError(1281); + return; + } + program = GL.programs[program]; + if (pname == 35716) { + var log = GLctx.getProgramInfoLog(program); + if (log === null) log = "(unknown error)"; + HEAP32[p >> 2] = log.length + 1; + } else if (pname == 35719) { + if (!program.maxUniformLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35718); ++i) { + program.maxUniformLength = Math.max(program.maxUniformLength, GLctx.getActiveUniform(program, i).name.length + 1); + } + } + HEAP32[p >> 2] = program.maxUniformLength; + } else if (pname == 35722) { + if (!program.maxAttributeLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35721); ++i) { + program.maxAttributeLength = Math.max(program.maxAttributeLength, GLctx.getActiveAttrib(program, i).name.length + 1); + } + } + HEAP32[p >> 2] = program.maxAttributeLength; + } else if (pname == 35381) { + if (!program.maxUniformBlockNameLength) { + for (var i = 0; i < GLctx.getProgramParameter(program, 35382); ++i) { + program.maxUniformBlockNameLength = Math.max(program.maxUniformBlockNameLength, GLctx.getActiveUniformBlockName(program, i).length + 1); + } + } + HEAP32[p >> 2] = program.maxUniformBlockNameLength; + } else { + HEAP32[p >> 2] = GLctx.getProgramParameter(program, pname); + } +}; +var _emscripten_glGetProgramiv = _glGetProgramiv; +var _glGetQueryObjecti64vEXT = function _glGetQueryObjecti64vEXT(id, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + var query = GL.queries[id]; + var param; + if (GL.currentContext.version < 2) { + param = GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query, pname); + } else { + param = GLctx.getQueryParameter(query, pname); + } + var ret; + if (typeof param == "boolean") { + ret = param ? 1 : 0; + } else { + ret = param; + } + writeI53ToI64(params, ret); +}; +var _emscripten_glGetQueryObjecti64vEXT = _glGetQueryObjecti64vEXT; +var _glGetQueryObjectivEXT = function _glGetQueryObjectivEXT(id, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + var query = GL.queries[id]; + var param = GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query, pname); + var ret; + if (typeof param == "boolean") { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[params >> 2] = ret; +}; +var _emscripten_glGetQueryObjectivEXT = _glGetQueryObjectivEXT; +var _glGetQueryObjectui64vEXT = _glGetQueryObjecti64vEXT; +var _emscripten_glGetQueryObjectui64vEXT = _glGetQueryObjectui64vEXT; +var _glGetQueryObjectuiv = function _glGetQueryObjectuiv(id, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + var query = GL.queries[id]; + var param = GLctx.getQueryParameter(query, pname); + var ret; + if (typeof param == "boolean") { + ret = param ? 1 : 0; + } else { + ret = param; + } + HEAP32[params >> 2] = ret; +}; +var _emscripten_glGetQueryObjectuiv = _glGetQueryObjectuiv; +var _glGetQueryObjectuivEXT = _glGetQueryObjectivEXT; +var _emscripten_glGetQueryObjectuivEXT = _glGetQueryObjectuivEXT; +var _glGetQueryiv = function _glGetQueryiv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAP32[params >> 2] = GLctx.getQuery(target, pname); +}; +var _emscripten_glGetQueryiv = _glGetQueryiv; +var _glGetQueryivEXT = function _glGetQueryivEXT(target, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAP32[params >> 2] = GLctx.disjointTimerQueryExt["getQueryEXT"](target, pname); +}; +var _emscripten_glGetQueryivEXT = _glGetQueryivEXT; +var _glGetRenderbufferParameteriv = function _glGetRenderbufferParameteriv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAP32[params >> 2] = GLctx.getRenderbufferParameter(target, pname); +}; +var _emscripten_glGetRenderbufferParameteriv = _glGetRenderbufferParameteriv; +var _glGetSamplerParameterfv = function _glGetSamplerParameterfv(sampler, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAPF32[params >> 2] = GLctx.getSamplerParameter(GL.samplers[sampler], pname); +}; +var _emscripten_glGetSamplerParameterfv = _glGetSamplerParameterfv; +var _glGetSamplerParameteriv = function _glGetSamplerParameteriv(sampler, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAP32[params >> 2] = GLctx.getSamplerParameter(GL.samplers[sampler], pname); +}; +var _emscripten_glGetSamplerParameteriv = _glGetSamplerParameteriv; +var _glGetShaderInfoLog = function _glGetShaderInfoLog(shader, maxLength, length, infoLog) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = "(unknown error)"; + var numBytesWrittenExclNull = maxLength > 0 && infoLog ? stringToUTF8(log, infoLog, maxLength) : 0; + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; +}; +var _emscripten_glGetShaderInfoLog = _glGetShaderInfoLog; +var _glGetShaderPrecisionFormat = function _glGetShaderPrecisionFormat(shaderType, precisionType, range, precision) { + var result = GLctx.getShaderPrecisionFormat(shaderType, precisionType); + HEAP32[range >> 2] = result.rangeMin; + HEAP32[range + 4 >> 2] = result.rangeMax; + HEAP32[precision >> 2] = result.precision; +}; +var _emscripten_glGetShaderPrecisionFormat = _glGetShaderPrecisionFormat; +var _glGetShaderSource = function _glGetShaderSource(shader, bufSize, length, source) { + var result = GLctx.getShaderSource(GL.shaders[shader]); + if (!result) return; + var numBytesWrittenExclNull = bufSize > 0 && source ? stringToUTF8(result, source, bufSize) : 0; + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; +}; +var _emscripten_glGetShaderSource = _glGetShaderSource; +var _glGetShaderiv = function _glGetShaderiv(shader, pname, p) { + if (!p) { + GL.recordError(1281); + return; + } + if (pname == 35716) { + var log = GLctx.getShaderInfoLog(GL.shaders[shader]); + if (log === null) log = "(unknown error)"; + var logLength = log ? log.length + 1 : 0; + HEAP32[p >> 2] = logLength; + } else if (pname == 35720) { + var source = GLctx.getShaderSource(GL.shaders[shader]); + var sourceLength = source ? source.length + 1 : 0; + HEAP32[p >> 2] = sourceLength; + } else { + HEAP32[p >> 2] = GLctx.getShaderParameter(GL.shaders[shader], pname); + } +}; +var _emscripten_glGetShaderiv = _glGetShaderiv; +var stringToNewUTF8 = function stringToNewUTF8(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _malloc(size); + if (ret) stringToUTF8(str, ret, size); + return ret; +}; +var _glGetString = function _glGetString(name_) { + var ret = GL.stringCache[name_]; + if (!ret) { + switch (name_) { + case 7939: + ret = stringToNewUTF8(webglGetExtensions().join(" ")); + break; + case 7936: + case 7937: + case 37445: + case 37446: + var s = GLctx.getParameter(name_); + if (!s) { + GL.recordError(1280); + } + ret = s ? stringToNewUTF8(s) : 0; + break; + case 7938: + var glVersion = GLctx.getParameter(7938); + if (GL.currentContext.version >= 2) glVersion = "OpenGL ES 3.0 (".concat(glVersion, ")");else { + glVersion = "OpenGL ES 2.0 (".concat(glVersion, ")"); + } + ret = stringToNewUTF8(glVersion); + break; + case 35724: + var glslVersion = GLctx.getParameter(35724); + var ver_re = /^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/; + var ver_num = glslVersion.match(ver_re); + if (ver_num !== null) { + if (ver_num[1].length == 3) ver_num[1] = ver_num[1] + "0"; + glslVersion = "OpenGL ES GLSL ES ".concat(ver_num[1], " (").concat(glslVersion, ")"); + } + ret = stringToNewUTF8(glslVersion); + break; + default: + GL.recordError(1280); + } + GL.stringCache[name_] = ret; + } + return ret; +}; +var _emscripten_glGetString = _glGetString; +var _glGetStringi = function _glGetStringi(name, index) { + if (GL.currentContext.version < 2) { + GL.recordError(1282); + return 0; + } + var stringiCache = GL.stringiCache[name]; + if (stringiCache) { + if (index < 0 || index >= stringiCache.length) { + GL.recordError(1281); + return 0; + } + return stringiCache[index]; + } + switch (name) { + case 7939: + var exts = webglGetExtensions().map(stringToNewUTF8); + stringiCache = GL.stringiCache[name] = exts; + if (index < 0 || index >= stringiCache.length) { + GL.recordError(1281); + return 0; + } + return stringiCache[index]; + default: + GL.recordError(1280); + return 0; + } +}; +var _emscripten_glGetStringi = _glGetStringi; +var _glGetSynciv = function _glGetSynciv(sync, pname, bufSize, length, values) { + if (bufSize < 0) { + GL.recordError(1281); + return; + } + if (!values) { + GL.recordError(1281); + return; + } + var ret = GLctx.getSyncParameter(GL.syncs[sync], pname); + if (ret !== null) { + HEAP32[values >> 2] = ret; + if (length) HEAP32[length >> 2] = 1; + } +}; +var _emscripten_glGetSynciv = _glGetSynciv; +var _glGetTexParameterfv = function _glGetTexParameterfv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAPF32[params >> 2] = GLctx.getTexParameter(target, pname); +}; +var _emscripten_glGetTexParameterfv = _glGetTexParameterfv; +var _glGetTexParameteriv = function _glGetTexParameteriv(target, pname, params) { + if (!params) { + GL.recordError(1281); + return; + } + HEAP32[params >> 2] = GLctx.getTexParameter(target, pname); +}; +var _emscripten_glGetTexParameteriv = _glGetTexParameteriv; +var _glGetTransformFeedbackVarying = function _glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name) { + program = GL.programs[program]; + var info = GLctx.getTransformFeedbackVarying(program, index); + if (!info) return; + if (name && bufSize > 0) { + var numBytesWrittenExclNull = stringToUTF8(info.name, name, bufSize); + if (length) HEAP32[length >> 2] = numBytesWrittenExclNull; + } else { + if (length) HEAP32[length >> 2] = 0; + } + if (size) HEAP32[size >> 2] = info.size; + if (type) HEAP32[type >> 2] = info.type; +}; +var _emscripten_glGetTransformFeedbackVarying = _glGetTransformFeedbackVarying; +var _glGetUniformBlockIndex = function _glGetUniformBlockIndex(program, uniformBlockName) { + return GLctx.getUniformBlockIndex(GL.programs[program], UTF8ToString(uniformBlockName)); +}; +var _emscripten_glGetUniformBlockIndex = _glGetUniformBlockIndex; +var _glGetUniformIndices = function _glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices) { + if (!uniformIndices) { + GL.recordError(1281); + return; + } + if (uniformCount > 0 && (uniformNames == 0 || uniformIndices == 0)) { + GL.recordError(1281); + return; + } + program = GL.programs[program]; + var names = []; + for (var i = 0; i < uniformCount; i++) names.push(UTF8ToString(HEAP32[uniformNames + i * 4 >> 2])); + var result = GLctx.getUniformIndices(program, names); + if (!result) return; + var len = result.length; + for (var i = 0; i < len; i++) { + HEAP32[uniformIndices + i * 4 >> 2] = result[i]; + } +}; +var _emscripten_glGetUniformIndices = _glGetUniformIndices; +var webglGetLeftBracePos = function webglGetLeftBracePos(name) { + return name.slice(-1) == "]" && name.lastIndexOf("["); +}; +var webglPrepareUniformLocationsBeforeFirstUse = function webglPrepareUniformLocationsBeforeFirstUse(program) { + var uniformLocsById = program.uniformLocsById, + uniformSizeAndIdsByName = program.uniformSizeAndIdsByName, + i, + j; + if (!uniformLocsById) { + program.uniformLocsById = uniformLocsById = {}; + program.uniformArrayNamesById = {}; + for (i = 0; i < GLctx.getProgramParameter(program, 35718); ++i) { + var u = GLctx.getActiveUniform(program, i); + var nm = u.name; + var sz = u.size; + var lb = webglGetLeftBracePos(nm); + var arrayName = lb > 0 ? nm.slice(0, lb) : nm; + var id = program.uniformIdCounter; + program.uniformIdCounter += sz; + uniformSizeAndIdsByName[arrayName] = [sz, id]; + for (j = 0; j < sz; ++j) { + uniformLocsById[id] = j; + program.uniformArrayNamesById[id++] = arrayName; + } + } + } +}; +var _glGetUniformLocation = function _glGetUniformLocation(program, name) { + name = UTF8ToString(name); + if (program = GL.programs[program]) { + webglPrepareUniformLocationsBeforeFirstUse(program); + var uniformLocsById = program.uniformLocsById; + var arrayIndex = 0; + var uniformBaseName = name; + var leftBrace = webglGetLeftBracePos(name); + if (leftBrace > 0) { + arrayIndex = jstoi_q(name.slice(leftBrace + 1)) >>> 0; + uniformBaseName = name.slice(0, leftBrace); + } + var sizeAndId = program.uniformSizeAndIdsByName[uniformBaseName]; + if (sizeAndId && arrayIndex < sizeAndId[0]) { + arrayIndex += sizeAndId[1]; + if (uniformLocsById[arrayIndex] = uniformLocsById[arrayIndex] || GLctx.getUniformLocation(program, name)) { + return arrayIndex; + } + } + } else { + GL.recordError(1281); + } + return -1; +}; +var _emscripten_glGetUniformLocation = _glGetUniformLocation; +var webglGetUniformLocation = function webglGetUniformLocation(location) { + var p = GLctx.currentProgram; + if (p) { + var webglLoc = p.uniformLocsById[location]; + if (typeof webglLoc == "number") { + p.uniformLocsById[location] = webglLoc = GLctx.getUniformLocation(p, p.uniformArrayNamesById[location] + (webglLoc > 0 ? "[".concat(webglLoc, "]") : "")); + } + return webglLoc; + } else { + GL.recordError(1282); + } +}; +var emscriptenWebGLGetUniform = function emscriptenWebGLGetUniform(program, location, params, type) { + if (!params) { + GL.recordError(1281); + return; + } + program = GL.programs[program]; + webglPrepareUniformLocationsBeforeFirstUse(program); + var data = GLctx.getUniform(program, webglGetUniformLocation(location)); + if (typeof data == "number" || typeof data == "boolean") { + switch (type) { + case 0: + HEAP32[params >> 2] = data; + break; + case 2: + HEAPF32[params >> 2] = data; + break; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: + HEAP32[params + i * 4 >> 2] = data[i]; + break; + case 2: + HEAPF32[params + i * 4 >> 2] = data[i]; + break; + } + } + } +}; +var _glGetUniformfv = function _glGetUniformfv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 2); +}; +var _emscripten_glGetUniformfv = _glGetUniformfv; +var _glGetUniformiv = function _glGetUniformiv(program, location, params) { + emscriptenWebGLGetUniform(program, location, params, 0); +}; +var _emscripten_glGetUniformiv = _glGetUniformiv; +var _glGetUniformuiv = function _glGetUniformuiv(program, location, params) { + return emscriptenWebGLGetUniform(program, location, params, 0); +}; +var _emscripten_glGetUniformuiv = _glGetUniformuiv; +var emscriptenWebGLGetVertexAttrib = function emscriptenWebGLGetVertexAttrib(index, pname, params, type) { + if (!params) { + GL.recordError(1281); + return; + } + var data = GLctx.getVertexAttrib(index, pname); + if (pname == 34975) { + HEAP32[params >> 2] = data && data["name"]; + } else if (typeof data == "number" || typeof data == "boolean") { + switch (type) { + case 0: + HEAP32[params >> 2] = data; + break; + case 2: + HEAPF32[params >> 2] = data; + break; + case 5: + HEAP32[params >> 2] = Math.fround(data); + break; + } + } else { + for (var i = 0; i < data.length; i++) { + switch (type) { + case 0: + HEAP32[params + i * 4 >> 2] = data[i]; + break; + case 2: + HEAPF32[params + i * 4 >> 2] = data[i]; + break; + case 5: + HEAP32[params + i * 4 >> 2] = Math.fround(data[i]); + break; + } + } + } +}; +var _glGetVertexAttribIiv = function _glGetVertexAttribIiv(index, pname, params) { + emscriptenWebGLGetVertexAttrib(index, pname, params, 0); +}; +var _emscripten_glGetVertexAttribIiv = _glGetVertexAttribIiv; +var _glGetVertexAttribIuiv = _glGetVertexAttribIiv; +var _emscripten_glGetVertexAttribIuiv = _glGetVertexAttribIuiv; +var _glGetVertexAttribPointerv = function _glGetVertexAttribPointerv(index, pname, pointer) { + if (!pointer) { + GL.recordError(1281); + return; + } + HEAP32[pointer >> 2] = GLctx.getVertexAttribOffset(index, pname); +}; +var _emscripten_glGetVertexAttribPointerv = _glGetVertexAttribPointerv; +var _glGetVertexAttribfv = function _glGetVertexAttribfv(index, pname, params) { + emscriptenWebGLGetVertexAttrib(index, pname, params, 2); +}; +var _emscripten_glGetVertexAttribfv = _glGetVertexAttribfv; +var _glGetVertexAttribiv = function _glGetVertexAttribiv(index, pname, params) { + emscriptenWebGLGetVertexAttrib(index, pname, params, 5); +}; +var _emscripten_glGetVertexAttribiv = _glGetVertexAttribiv; +var _glHint = function _glHint(x0, x1) { + return GLctx.hint(x0, x1); +}; +var _emscripten_glHint = _glHint; +var _glInvalidateFramebuffer = function _glInvalidateFramebuffer(target, numAttachments, attachments) { + var list = tempFixedLengthArray[numAttachments]; + for (var i = 0; i < numAttachments; i++) { + list[i] = HEAP32[attachments + i * 4 >> 2]; + } + GLctx.invalidateFramebuffer(target, list); +}; +var _emscripten_glInvalidateFramebuffer = _glInvalidateFramebuffer; +var _glInvalidateSubFramebuffer = function _glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height) { + var list = tempFixedLengthArray[numAttachments]; + for (var i = 0; i < numAttachments; i++) { + list[i] = HEAP32[attachments + i * 4 >> 2]; + } + GLctx.invalidateSubFramebuffer(target, list, x, y, width, height); +}; +var _emscripten_glInvalidateSubFramebuffer = _glInvalidateSubFramebuffer; +var _glIsBuffer = function _glIsBuffer(buffer) { + var b = GL.buffers[buffer]; + if (!b) return 0; + return GLctx.isBuffer(b); +}; +var _emscripten_glIsBuffer = _glIsBuffer; +var _glIsEnabled = function _glIsEnabled(x0) { + return GLctx.isEnabled(x0); +}; +var _emscripten_glIsEnabled = _glIsEnabled; +var _glIsFramebuffer = function _glIsFramebuffer(framebuffer) { + var fb = GL.framebuffers[framebuffer]; + if (!fb) return 0; + return GLctx.isFramebuffer(fb); +}; +var _emscripten_glIsFramebuffer = _glIsFramebuffer; +var _glIsProgram = function _glIsProgram(program) { + program = GL.programs[program]; + if (!program) return 0; + return GLctx.isProgram(program); +}; +var _emscripten_glIsProgram = _glIsProgram; +var _glIsQuery = function _glIsQuery(id) { + var query = GL.queries[id]; + if (!query) return 0; + return GLctx.isQuery(query); +}; +var _emscripten_glIsQuery = _glIsQuery; +var _glIsQueryEXT = function _glIsQueryEXT(id) { + var query = GL.queries[id]; + if (!query) return 0; + return GLctx.disjointTimerQueryExt["isQueryEXT"](query); +}; +var _emscripten_glIsQueryEXT = _glIsQueryEXT; +var _glIsRenderbuffer = function _glIsRenderbuffer(renderbuffer) { + var rb = GL.renderbuffers[renderbuffer]; + if (!rb) return 0; + return GLctx.isRenderbuffer(rb); +}; +var _emscripten_glIsRenderbuffer = _glIsRenderbuffer; +var _glIsSampler = function _glIsSampler(id) { + var sampler = GL.samplers[id]; + if (!sampler) return 0; + return GLctx.isSampler(sampler); +}; +var _emscripten_glIsSampler = _glIsSampler; +var _glIsShader = function _glIsShader(shader) { + var s = GL.shaders[shader]; + if (!s) return 0; + return GLctx.isShader(s); +}; +var _emscripten_glIsShader = _glIsShader; +var _glIsSync = function _glIsSync(sync) { + return GLctx.isSync(GL.syncs[sync]); +}; +var _emscripten_glIsSync = _glIsSync; +var _glIsTexture = function _glIsTexture(id) { + var texture = GL.textures[id]; + if (!texture) return 0; + return GLctx.isTexture(texture); +}; +var _emscripten_glIsTexture = _glIsTexture; +var _glIsTransformFeedback = function _glIsTransformFeedback(id) { + return GLctx.isTransformFeedback(GL.transformFeedbacks[id]); +}; +var _emscripten_glIsTransformFeedback = _glIsTransformFeedback; +var _glIsVertexArray = function _glIsVertexArray(array) { + var vao = GL.vaos[array]; + if (!vao) return 0; + return GLctx.isVertexArray(vao); +}; +var _emscripten_glIsVertexArray = _glIsVertexArray; +var _glIsVertexArrayOES = _glIsVertexArray; +var _emscripten_glIsVertexArrayOES = _glIsVertexArrayOES; +var _glLineWidth = function _glLineWidth(x0) { + return GLctx.lineWidth(x0); +}; +var _emscripten_glLineWidth = _glLineWidth; +var _glLinkProgram = function _glLinkProgram(program) { + program = GL.programs[program]; + GLctx.linkProgram(program); + program.uniformLocsById = 0; + program.uniformSizeAndIdsByName = {}; +}; +var _emscripten_glLinkProgram = _glLinkProgram; +var _glPauseTransformFeedback = function _glPauseTransformFeedback() { + return GLctx.pauseTransformFeedback(); +}; +var _emscripten_glPauseTransformFeedback = _glPauseTransformFeedback; +var _glPixelStorei = function _glPixelStorei(pname, param) { + if (pname == 3317) { + GL.unpackAlignment = param; + } + GLctx.pixelStorei(pname, param); +}; +var _emscripten_glPixelStorei = _glPixelStorei; +var _glPolygonOffset = function _glPolygonOffset(x0, x1) { + return GLctx.polygonOffset(x0, x1); +}; +var _emscripten_glPolygonOffset = _glPolygonOffset; +var _glProgramBinary = function _glProgramBinary(program, binaryFormat, binary, length) { + GL.recordError(1280); +}; +var _emscripten_glProgramBinary = _glProgramBinary; +var _glProgramParameteri = function _glProgramParameteri(program, pname, value) { + GL.recordError(1280); +}; +var _emscripten_glProgramParameteri = _glProgramParameteri; +var _glQueryCounterEXT = function _glQueryCounterEXT(id, target) { + GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.queries[id], target); +}; +var _emscripten_glQueryCounterEXT = _glQueryCounterEXT; +var _glReadBuffer = function _glReadBuffer(x0) { + return GLctx.readBuffer(x0); +}; +var _emscripten_glReadBuffer = _glReadBuffer; +var computeUnpackAlignedImageSize = function computeUnpackAlignedImageSize(width, height, sizePerPixel, alignment) { + function roundedToNextMultipleOf(x, y) { + return x + y - 1 & -y; + } + var plainRowSize = width * sizePerPixel; + var alignedRowSize = roundedToNextMultipleOf(plainRowSize, alignment); + return height * alignedRowSize; +}; +var colorChannelsInGlTextureFormat = function colorChannelsInGlTextureFormat(format) { + var colorChannels = { + 5: 3, + 6: 4, + 8: 2, + 29502: 3, + 29504: 4, + 26917: 2, + 26918: 2, + 29846: 3, + 29847: 4 + }; + return colorChannels[format - 6402] || 1; +}; +var heapObjectForWebGLType = function heapObjectForWebGLType(type) { + type -= 5120; + if (type == 0) return HEAP8; + if (type == 1) return HEAPU8; + if (type == 2) return HEAP16; + if (type == 4) return HEAP32; + if (type == 6) return HEAPF32; + if (type == 5 || type == 28922 || type == 28520 || type == 30779 || type == 30782) return HEAPU32; + return HEAPU16; +}; +var toTypedArrayIndex = function toTypedArrayIndex(pointer, heap) { + return pointer >>> 31 - Math.clz32(heap.BYTES_PER_ELEMENT); +}; +var emscriptenWebGLGetTexPixelData = function emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) { + var heap = heapObjectForWebGLType(type); + var sizePerPixel = colorChannelsInGlTextureFormat(format) * heap.BYTES_PER_ELEMENT; + var bytes = computeUnpackAlignedImageSize(width, height, sizePerPixel, GL.unpackAlignment); + return heap.subarray(toTypedArrayIndex(pixels, heap), toTypedArrayIndex(pixels + bytes, heap)); +}; +var _glReadPixels = function _glReadPixels(x, y, width, height, format, type, pixels) { + if (GL.currentContext.version >= 2) { + if (GLctx.currentPixelPackBufferBinding) { + GLctx.readPixels(x, y, width, height, format, type, pixels); + } else { + var heap = heapObjectForWebGLType(type); + var target = toTypedArrayIndex(pixels, heap); + GLctx.readPixels(x, y, width, height, format, type, heap, target); + } + return; + } + var pixelData = emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, format); + if (!pixelData) { + GL.recordError(1280); + return; + } + GLctx.readPixels(x, y, width, height, format, type, pixelData); +}; +var _emscripten_glReadPixels = _glReadPixels; +var _glReleaseShaderCompiler = function _glReleaseShaderCompiler() {}; +var _emscripten_glReleaseShaderCompiler = _glReleaseShaderCompiler; +var _glRenderbufferStorage = function _glRenderbufferStorage(x0, x1, x2, x3) { + return GLctx.renderbufferStorage(x0, x1, x2, x3); +}; +var _emscripten_glRenderbufferStorage = _glRenderbufferStorage; +var _glRenderbufferStorageMultisample = function _glRenderbufferStorageMultisample(x0, x1, x2, x3, x4) { + return GLctx.renderbufferStorageMultisample(x0, x1, x2, x3, x4); +}; +var _emscripten_glRenderbufferStorageMultisample = _glRenderbufferStorageMultisample; +var _glResumeTransformFeedback = function _glResumeTransformFeedback() { + return GLctx.resumeTransformFeedback(); +}; +var _emscripten_glResumeTransformFeedback = _glResumeTransformFeedback; +var _glSampleCoverage = function _glSampleCoverage(value, invert) { + GLctx.sampleCoverage(value, !!invert); +}; +var _emscripten_glSampleCoverage = _glSampleCoverage; +var _glSamplerParameterf = function _glSamplerParameterf(sampler, pname, param) { + GLctx.samplerParameterf(GL.samplers[sampler], pname, param); +}; +var _emscripten_glSamplerParameterf = _glSamplerParameterf; +var _glSamplerParameterfv = function _glSamplerParameterfv(sampler, pname, params) { + var param = HEAPF32[params >> 2]; + GLctx.samplerParameterf(GL.samplers[sampler], pname, param); +}; +var _emscripten_glSamplerParameterfv = _glSamplerParameterfv; +var _glSamplerParameteri = function _glSamplerParameteri(sampler, pname, param) { + GLctx.samplerParameteri(GL.samplers[sampler], pname, param); +}; +var _emscripten_glSamplerParameteri = _glSamplerParameteri; +var _glSamplerParameteriv = function _glSamplerParameteriv(sampler, pname, params) { + var param = HEAP32[params >> 2]; + GLctx.samplerParameteri(GL.samplers[sampler], pname, param); +}; +var _emscripten_glSamplerParameteriv = _glSamplerParameteriv; +var _glScissor = function _glScissor(x0, x1, x2, x3) { + return GLctx.scissor(x0, x1, x2, x3); +}; +var _emscripten_glScissor = _glScissor; +var _glShaderBinary = function _glShaderBinary(count, shaders, binaryformat, binary, length) { + GL.recordError(1280); +}; +var _emscripten_glShaderBinary = _glShaderBinary; +var _glShaderSource = function _glShaderSource(shader, count, string, length) { + var source = GL.getSource(shader, count, string, length); + GLctx.shaderSource(GL.shaders[shader], source); +}; +var _emscripten_glShaderSource = _glShaderSource; +var _glStencilFunc = function _glStencilFunc(x0, x1, x2) { + return GLctx.stencilFunc(x0, x1, x2); +}; +var _emscripten_glStencilFunc = _glStencilFunc; +var _glStencilFuncSeparate = function _glStencilFuncSeparate(x0, x1, x2, x3) { + return GLctx.stencilFuncSeparate(x0, x1, x2, x3); +}; +var _emscripten_glStencilFuncSeparate = _glStencilFuncSeparate; +var _glStencilMask = function _glStencilMask(x0) { + return GLctx.stencilMask(x0); +}; +var _emscripten_glStencilMask = _glStencilMask; +var _glStencilMaskSeparate = function _glStencilMaskSeparate(x0, x1) { + return GLctx.stencilMaskSeparate(x0, x1); +}; +var _emscripten_glStencilMaskSeparate = _glStencilMaskSeparate; +var _glStencilOp = function _glStencilOp(x0, x1, x2) { + return GLctx.stencilOp(x0, x1, x2); +}; +var _emscripten_glStencilOp = _glStencilOp; +var _glStencilOpSeparate = function _glStencilOpSeparate(x0, x1, x2, x3) { + return GLctx.stencilOpSeparate(x0, x1, x2, x3); +}; +var _emscripten_glStencilOpSeparate = _glStencilOpSeparate; +var _glTexImage2D = function _glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels) { + if (GL.currentContext.version >= 2) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels); + } else if (pixels) { + var heap = heapObjectForWebGLType(type); + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, heap, toTypedArrayIndex(pixels, heap)); + } else { + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, null); + } + return; + } + GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, internalFormat) : null); +}; +var _emscripten_glTexImage2D = _glTexImage2D; +var _glTexImage3D = function _glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); + } else if (pixels) { + var heap = heapObjectForWebGLType(type); + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, heap, toTypedArrayIndex(pixels, heap)); + } else { + GLctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, null); + } +}; +var _emscripten_glTexImage3D = _glTexImage3D; +var _glTexParameterf = function _glTexParameterf(x0, x1, x2) { + return GLctx.texParameterf(x0, x1, x2); +}; +var _emscripten_glTexParameterf = _glTexParameterf; +var _glTexParameterfv = function _glTexParameterfv(target, pname, params) { + var param = HEAPF32[params >> 2]; + GLctx.texParameterf(target, pname, param); +}; +var _emscripten_glTexParameterfv = _glTexParameterfv; +var _glTexParameteri = function _glTexParameteri(x0, x1, x2) { + return GLctx.texParameteri(x0, x1, x2); +}; +var _emscripten_glTexParameteri = _glTexParameteri; +var _glTexParameteriv = function _glTexParameteriv(target, pname, params) { + var param = HEAP32[params >> 2]; + GLctx.texParameteri(target, pname, param); +}; +var _emscripten_glTexParameteriv = _glTexParameteriv; +var _glTexStorage2D = function _glTexStorage2D(x0, x1, x2, x3, x4) { + return GLctx.texStorage2D(x0, x1, x2, x3, x4); +}; +var _emscripten_glTexStorage2D = _glTexStorage2D; +var _glTexStorage3D = function _glTexStorage3D(x0, x1, x2, x3, x4, x5) { + return GLctx.texStorage3D(x0, x1, x2, x3, x4, x5); +}; +var _emscripten_glTexStorage3D = _glTexStorage3D; +var _glTexSubImage2D = function _glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) { + if (GL.currentContext.version >= 2) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + } else if (pixels) { + var heap = heapObjectForWebGLType(type); + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, heap, toTypedArrayIndex(pixels, heap)); + return; + } + } + var pixelData = pixels ? emscriptenWebGLGetTexPixelData(type, format, width, height, pixels, 0) : null; + GLctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixelData); +}; +var _emscripten_glTexSubImage2D = _glTexSubImage2D; +var _glTexSubImage3D = function _glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) { + if (GLctx.currentPixelUnpackBufferBinding) { + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + } else if (pixels) { + var heap = heapObjectForWebGLType(type); + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, heap, toTypedArrayIndex(pixels, heap)); + } else { + GLctx.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, null); + } +}; +var _emscripten_glTexSubImage3D = _glTexSubImage3D; +var _glTransformFeedbackVaryings = function _glTransformFeedbackVaryings(program, count, varyings, bufferMode) { + program = GL.programs[program]; + var vars = []; + for (var i = 0; i < count; i++) vars.push(UTF8ToString(HEAP32[varyings + i * 4 >> 2])); + GLctx.transformFeedbackVaryings(program, vars, bufferMode); +}; +var _emscripten_glTransformFeedbackVaryings = _glTransformFeedbackVaryings; +var _glUniform1f = function _glUniform1f(location, v0) { + GLctx.uniform1f(webglGetUniformLocation(location), v0); +}; +var _emscripten_glUniform1f = _glUniform1f; +var miniTempWebGLFloatBuffers = []; +var _glUniform1fv = function _glUniform1fv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform1fv(webglGetUniformLocation(location), HEAPF32, value >> 2, count); + return; + } + if (count <= 288) { + var view = miniTempWebGLFloatBuffers[count - 1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAPF32[value + 4 * i >> 2]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 4 >> 2); + } + GLctx.uniform1fv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform1fv = _glUniform1fv; +var _glUniform1i = function _glUniform1i(location, v0) { + GLctx.uniform1i(webglGetUniformLocation(location), v0); +}; +var _emscripten_glUniform1i = _glUniform1i; +var miniTempWebGLIntBuffers = []; +var _glUniform1iv = function _glUniform1iv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform1iv(webglGetUniformLocation(location), HEAP32, value >> 2, count); + return; + } + if (count <= 288) { + var view = miniTempWebGLIntBuffers[count - 1]; + for (var i = 0; i < count; ++i) { + view[i] = HEAP32[value + 4 * i >> 2]; + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 4 >> 2); + } + GLctx.uniform1iv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform1iv = _glUniform1iv; +var _glUniform1ui = function _glUniform1ui(location, v0) { + GLctx.uniform1ui(webglGetUniformLocation(location), v0); +}; +var _emscripten_glUniform1ui = _glUniform1ui; +var _glUniform1uiv = function _glUniform1uiv(location, count, value) { + count && GLctx.uniform1uiv(webglGetUniformLocation(location), HEAPU32, value >> 2, count); +}; +var _emscripten_glUniform1uiv = _glUniform1uiv; +var _glUniform2f = function _glUniform2f(location, v0, v1) { + GLctx.uniform2f(webglGetUniformLocation(location), v0, v1); +}; +var _emscripten_glUniform2f = _glUniform2f; +var _glUniform2fv = function _glUniform2fv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform2fv(webglGetUniformLocation(location), HEAPF32, value >> 2, count * 2); + return; + } + if (count <= 144) { + var view = miniTempWebGLFloatBuffers[2 * count - 1]; + for (var i = 0; i < 2 * count; i += 2) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 8 >> 2); + } + GLctx.uniform2fv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform2fv = _glUniform2fv; +var _glUniform2i = function _glUniform2i(location, v0, v1) { + GLctx.uniform2i(webglGetUniformLocation(location), v0, v1); +}; +var _emscripten_glUniform2i = _glUniform2i; +var _glUniform2iv = function _glUniform2iv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform2iv(webglGetUniformLocation(location), HEAP32, value >> 2, count * 2); + return; + } + if (count <= 144) { + var view = miniTempWebGLIntBuffers[2 * count - 1]; + for (var i = 0; i < 2 * count; i += 2) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2]; + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 8 >> 2); + } + GLctx.uniform2iv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform2iv = _glUniform2iv; +var _glUniform2ui = function _glUniform2ui(location, v0, v1) { + GLctx.uniform2ui(webglGetUniformLocation(location), v0, v1); +}; +var _emscripten_glUniform2ui = _glUniform2ui; +var _glUniform2uiv = function _glUniform2uiv(location, count, value) { + count && GLctx.uniform2uiv(webglGetUniformLocation(location), HEAPU32, value >> 2, count * 2); +}; +var _emscripten_glUniform2uiv = _glUniform2uiv; +var _glUniform3f = function _glUniform3f(location, v0, v1, v2) { + GLctx.uniform3f(webglGetUniformLocation(location), v0, v1, v2); +}; +var _emscripten_glUniform3f = _glUniform3f; +var _glUniform3fv = function _glUniform3fv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform3fv(webglGetUniformLocation(location), HEAPF32, value >> 2, count * 3); + return; + } + if (count <= 96) { + var view = miniTempWebGLFloatBuffers[3 * count - 1]; + for (var i = 0; i < 3 * count; i += 3) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPF32[value + (4 * i + 8) >> 2]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 12 >> 2); + } + GLctx.uniform3fv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform3fv = _glUniform3fv; +var _glUniform3i = function _glUniform3i(location, v0, v1, v2) { + GLctx.uniform3i(webglGetUniformLocation(location), v0, v1, v2); +}; +var _emscripten_glUniform3i = _glUniform3i; +var _glUniform3iv = function _glUniform3iv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform3iv(webglGetUniformLocation(location), HEAP32, value >> 2, count * 3); + return; + } + if (count <= 96) { + var view = miniTempWebGLIntBuffers[3 * count - 1]; + for (var i = 0; i < 3 * count; i += 3) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAP32[value + (4 * i + 8) >> 2]; + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 12 >> 2); + } + GLctx.uniform3iv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform3iv = _glUniform3iv; +var _glUniform3ui = function _glUniform3ui(location, v0, v1, v2) { + GLctx.uniform3ui(webglGetUniformLocation(location), v0, v1, v2); +}; +var _emscripten_glUniform3ui = _glUniform3ui; +var _glUniform3uiv = function _glUniform3uiv(location, count, value) { + count && GLctx.uniform3uiv(webglGetUniformLocation(location), HEAPU32, value >> 2, count * 3); +}; +var _emscripten_glUniform3uiv = _glUniform3uiv; +var _glUniform4f = function _glUniform4f(location, v0, v1, v2, v3) { + GLctx.uniform4f(webglGetUniformLocation(location), v0, v1, v2, v3); +}; +var _emscripten_glUniform4f = _glUniform4f; +var _glUniform4fv = function _glUniform4fv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform4fv(webglGetUniformLocation(location), HEAPF32, value >> 2, count * 4); + return; + } + if (count <= 72) { + var view = miniTempWebGLFloatBuffers[4 * count - 1]; + var heap = HEAPF32; + value = value >> 2; + for (var i = 0; i < 4 * count; i += 4) { + var dst = value + i; + view[i] = heap[dst]; + view[i + 1] = heap[dst + 1]; + view[i + 2] = heap[dst + 2]; + view[i + 3] = heap[dst + 3]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 16 >> 2); + } + GLctx.uniform4fv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform4fv = _glUniform4fv; +var _glUniform4i = function _glUniform4i(location, v0, v1, v2, v3) { + GLctx.uniform4i(webglGetUniformLocation(location), v0, v1, v2, v3); +}; +var _emscripten_glUniform4i = _glUniform4i; +var _glUniform4iv = function _glUniform4iv(location, count, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniform4iv(webglGetUniformLocation(location), HEAP32, value >> 2, count * 4); + return; + } + if (count <= 72) { + var view = miniTempWebGLIntBuffers[4 * count - 1]; + for (var i = 0; i < 4 * count; i += 4) { + view[i] = HEAP32[value + 4 * i >> 2]; + view[i + 1] = HEAP32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAP32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAP32[value + (4 * i + 12) >> 2]; + } + } else { + var view = HEAP32.subarray(value >> 2, value + count * 16 >> 2); + } + GLctx.uniform4iv(webglGetUniformLocation(location), view); +}; +var _emscripten_glUniform4iv = _glUniform4iv; +var _glUniform4ui = function _glUniform4ui(location, v0, v1, v2, v3) { + GLctx.uniform4ui(webglGetUniformLocation(location), v0, v1, v2, v3); +}; +var _emscripten_glUniform4ui = _glUniform4ui; +var _glUniform4uiv = function _glUniform4uiv(location, count, value) { + count && GLctx.uniform4uiv(webglGetUniformLocation(location), HEAPU32, value >> 2, count * 4); +}; +var _emscripten_glUniform4uiv = _glUniform4uiv; +var _glUniformBlockBinding = function _glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) { + program = GL.programs[program]; + GLctx.uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); +}; +var _emscripten_glUniformBlockBinding = _glUniformBlockBinding; +var _glUniformMatrix2fv = function _glUniformMatrix2fv(location, count, transpose, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniformMatrix2fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 4); + return; + } + if (count <= 72) { + var view = miniTempWebGLFloatBuffers[4 * count - 1]; + for (var i = 0; i < 4 * count; i += 4) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPF32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAPF32[value + (4 * i + 12) >> 2]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 16 >> 2); + } + GLctx.uniformMatrix2fv(webglGetUniformLocation(location), !!transpose, view); +}; +var _emscripten_glUniformMatrix2fv = _glUniformMatrix2fv; +var _glUniformMatrix2x3fv = function _glUniformMatrix2x3fv(location, count, transpose, value) { + count && GLctx.uniformMatrix2x3fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 6); +}; +var _emscripten_glUniformMatrix2x3fv = _glUniformMatrix2x3fv; +var _glUniformMatrix2x4fv = function _glUniformMatrix2x4fv(location, count, transpose, value) { + count && GLctx.uniformMatrix2x4fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 8); +}; +var _emscripten_glUniformMatrix2x4fv = _glUniformMatrix2x4fv; +var _glUniformMatrix3fv = function _glUniformMatrix3fv(location, count, transpose, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniformMatrix3fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 9); + return; + } + if (count <= 32) { + var view = miniTempWebGLFloatBuffers[9 * count - 1]; + for (var i = 0; i < 9 * count; i += 9) { + view[i] = HEAPF32[value + 4 * i >> 2]; + view[i + 1] = HEAPF32[value + (4 * i + 4) >> 2]; + view[i + 2] = HEAPF32[value + (4 * i + 8) >> 2]; + view[i + 3] = HEAPF32[value + (4 * i + 12) >> 2]; + view[i + 4] = HEAPF32[value + (4 * i + 16) >> 2]; + view[i + 5] = HEAPF32[value + (4 * i + 20) >> 2]; + view[i + 6] = HEAPF32[value + (4 * i + 24) >> 2]; + view[i + 7] = HEAPF32[value + (4 * i + 28) >> 2]; + view[i + 8] = HEAPF32[value + (4 * i + 32) >> 2]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 36 >> 2); + } + GLctx.uniformMatrix3fv(webglGetUniformLocation(location), !!transpose, view); +}; +var _emscripten_glUniformMatrix3fv = _glUniformMatrix3fv; +var _glUniformMatrix3x2fv = function _glUniformMatrix3x2fv(location, count, transpose, value) { + count && GLctx.uniformMatrix3x2fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 6); +}; +var _emscripten_glUniformMatrix3x2fv = _glUniformMatrix3x2fv; +var _glUniformMatrix3x4fv = function _glUniformMatrix3x4fv(location, count, transpose, value) { + count && GLctx.uniformMatrix3x4fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 12); +}; +var _emscripten_glUniformMatrix3x4fv = _glUniformMatrix3x4fv; +var _glUniformMatrix4fv = function _glUniformMatrix4fv(location, count, transpose, value) { + if (GL.currentContext.version >= 2) { + count && GLctx.uniformMatrix4fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 16); + return; + } + if (count <= 18) { + var view = miniTempWebGLFloatBuffers[16 * count - 1]; + var heap = HEAPF32; + value = value >> 2; + for (var i = 0; i < 16 * count; i += 16) { + var dst = value + i; + view[i] = heap[dst]; + view[i + 1] = heap[dst + 1]; + view[i + 2] = heap[dst + 2]; + view[i + 3] = heap[dst + 3]; + view[i + 4] = heap[dst + 4]; + view[i + 5] = heap[dst + 5]; + view[i + 6] = heap[dst + 6]; + view[i + 7] = heap[dst + 7]; + view[i + 8] = heap[dst + 8]; + view[i + 9] = heap[dst + 9]; + view[i + 10] = heap[dst + 10]; + view[i + 11] = heap[dst + 11]; + view[i + 12] = heap[dst + 12]; + view[i + 13] = heap[dst + 13]; + view[i + 14] = heap[dst + 14]; + view[i + 15] = heap[dst + 15]; + } + } else { + var view = HEAPF32.subarray(value >> 2, value + count * 64 >> 2); + } + GLctx.uniformMatrix4fv(webglGetUniformLocation(location), !!transpose, view); +}; +var _emscripten_glUniformMatrix4fv = _glUniformMatrix4fv; +var _glUniformMatrix4x2fv = function _glUniformMatrix4x2fv(location, count, transpose, value) { + count && GLctx.uniformMatrix4x2fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 8); +}; +var _emscripten_glUniformMatrix4x2fv = _glUniformMatrix4x2fv; +var _glUniformMatrix4x3fv = function _glUniformMatrix4x3fv(location, count, transpose, value) { + count && GLctx.uniformMatrix4x3fv(webglGetUniformLocation(location), !!transpose, HEAPF32, value >> 2, count * 12); +}; +var _emscripten_glUniformMatrix4x3fv = _glUniformMatrix4x3fv; +var _glUseProgram = function _glUseProgram(program) { + program = GL.programs[program]; + GLctx.useProgram(program); + GLctx.currentProgram = program; +}; +var _emscripten_glUseProgram = _glUseProgram; +var _glValidateProgram = function _glValidateProgram(program) { + GLctx.validateProgram(GL.programs[program]); +}; +var _emscripten_glValidateProgram = _glValidateProgram; +var _glVertexAttrib1f = function _glVertexAttrib1f(x0, x1) { + return GLctx.vertexAttrib1f(x0, x1); +}; +var _emscripten_glVertexAttrib1f = _glVertexAttrib1f; +var _glVertexAttrib1fv = function _glVertexAttrib1fv(index, v) { + GLctx.vertexAttrib1f(index, HEAPF32[v >> 2]); +}; +var _emscripten_glVertexAttrib1fv = _glVertexAttrib1fv; +var _glVertexAttrib2f = function _glVertexAttrib2f(x0, x1, x2) { + return GLctx.vertexAttrib2f(x0, x1, x2); +}; +var _emscripten_glVertexAttrib2f = _glVertexAttrib2f; +var _glVertexAttrib2fv = function _glVertexAttrib2fv(index, v) { + GLctx.vertexAttrib2f(index, HEAPF32[v >> 2], HEAPF32[v + 4 >> 2]); +}; +var _emscripten_glVertexAttrib2fv = _glVertexAttrib2fv; +var _glVertexAttrib3f = function _glVertexAttrib3f(x0, x1, x2, x3) { + return GLctx.vertexAttrib3f(x0, x1, x2, x3); +}; +var _emscripten_glVertexAttrib3f = _glVertexAttrib3f; +var _glVertexAttrib3fv = function _glVertexAttrib3fv(index, v) { + GLctx.vertexAttrib3f(index, HEAPF32[v >> 2], HEAPF32[v + 4 >> 2], HEAPF32[v + 8 >> 2]); +}; +var _emscripten_glVertexAttrib3fv = _glVertexAttrib3fv; +var _glVertexAttrib4f = function _glVertexAttrib4f(x0, x1, x2, x3, x4) { + return GLctx.vertexAttrib4f(x0, x1, x2, x3, x4); +}; +var _emscripten_glVertexAttrib4f = _glVertexAttrib4f; +var _glVertexAttrib4fv = function _glVertexAttrib4fv(index, v) { + GLctx.vertexAttrib4f(index, HEAPF32[v >> 2], HEAPF32[v + 4 >> 2], HEAPF32[v + 8 >> 2], HEAPF32[v + 12 >> 2]); +}; +var _emscripten_glVertexAttrib4fv = _glVertexAttrib4fv; +var _glVertexAttribDivisor = function _glVertexAttribDivisor(index, divisor) { + GLctx.vertexAttribDivisor(index, divisor); +}; +var _emscripten_glVertexAttribDivisor = _glVertexAttribDivisor; +var _glVertexAttribDivisorANGLE = _glVertexAttribDivisor; +var _emscripten_glVertexAttribDivisorANGLE = _glVertexAttribDivisorANGLE; +var _glVertexAttribDivisorARB = _glVertexAttribDivisor; +var _emscripten_glVertexAttribDivisorARB = _glVertexAttribDivisorARB; +var _glVertexAttribDivisorEXT = _glVertexAttribDivisor; +var _emscripten_glVertexAttribDivisorEXT = _glVertexAttribDivisorEXT; +var _glVertexAttribDivisorNV = _glVertexAttribDivisor; +var _emscripten_glVertexAttribDivisorNV = _glVertexAttribDivisorNV; +var _glVertexAttribI4i = function _glVertexAttribI4i(x0, x1, x2, x3, x4) { + return GLctx.vertexAttribI4i(x0, x1, x2, x3, x4); +}; +var _emscripten_glVertexAttribI4i = _glVertexAttribI4i; +var _glVertexAttribI4iv = function _glVertexAttribI4iv(index, v) { + GLctx.vertexAttribI4i(index, HEAP32[v >> 2], HEAP32[v + 4 >> 2], HEAP32[v + 8 >> 2], HEAP32[v + 12 >> 2]); +}; +var _emscripten_glVertexAttribI4iv = _glVertexAttribI4iv; +var _glVertexAttribI4ui = function _glVertexAttribI4ui(x0, x1, x2, x3, x4) { + return GLctx.vertexAttribI4ui(x0, x1, x2, x3, x4); +}; +var _emscripten_glVertexAttribI4ui = _glVertexAttribI4ui; +var _glVertexAttribI4uiv = function _glVertexAttribI4uiv(index, v) { + GLctx.vertexAttribI4ui(index, HEAPU32[v >> 2], HEAPU32[v + 4 >> 2], HEAPU32[v + 8 >> 2], HEAPU32[v + 12 >> 2]); +}; +var _emscripten_glVertexAttribI4uiv = _glVertexAttribI4uiv; +var _glVertexAttribIPointer = function _glVertexAttribIPointer(index, size, type, stride, ptr) { + GLctx.vertexAttribIPointer(index, size, type, stride, ptr); +}; +var _emscripten_glVertexAttribIPointer = _glVertexAttribIPointer; +var _glVertexAttribPointer = function _glVertexAttribPointer(index, size, type, normalized, stride, ptr) { + GLctx.vertexAttribPointer(index, size, type, !!normalized, stride, ptr); +}; +var _emscripten_glVertexAttribPointer = _glVertexAttribPointer; +var _glViewport = function _glViewport(x0, x1, x2, x3) { + return GLctx.viewport(x0, x1, x2, x3); +}; +var _emscripten_glViewport = _glViewport; +var _glWaitSync = function _glWaitSync(sync, flags, timeout_low, timeout_high) { + var timeout = convertI32PairToI53(timeout_low, timeout_high); + GLctx.waitSync(GL.syncs[sync], flags, timeout); +}; +var _emscripten_glWaitSync = _glWaitSync; +var _emscripten_memcpy_js = Uint8Array.prototype.copyWithin ? function (dest, src, num) { + return HEAPU8.copyWithin(dest, src, src + num); +} : function (dest, src, num) { + return HEAPU8.set(HEAPU8.subarray(src, src + num), dest); +}; +var _emscripten_pause_main_loop = function _emscripten_pause_main_loop() { + Browser.mainLoop.pause(); +}; +var growMemory = function growMemory(size) { + var b = wasmMemory.buffer; + var pages = (size - b.byteLength + 65535) / 65536; + try { + wasmMemory.grow(pages); + updateMemoryViews(); + return 1; + } catch (e) {} +}; +var _emscripten_resize_heap = function _emscripten_resize_heap(requestedSize) { + var oldSize = HEAPU8.length; + requestedSize >>>= 0; + var maxHeapSize = getHeapMax(); + if (requestedSize > maxHeapSize) { + return false; + } + var alignUp = function alignUp(x, multiple) { + return x + (multiple - x % multiple) % multiple; + }; + for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { + var overGrownHeapSize = oldSize * (1 + .2 / cutDown); + overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); + var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); + var replacement = growMemory(newSize); + if (replacement) { + return true; + } + } + return false; +}; +var _emscripten_set_main_loop_arg = function _emscripten_set_main_loop_arg(func, arg, fps, simulateInfiniteLoop) { + var browserIterationFunc = function browserIterationFunc() { + return getWasmTableEntry(func)(arg); + }; + setMainLoop(browserIterationFunc, fps, simulateInfiniteLoop, arg); +}; +var webgl_enable_ANGLE_instanced_arrays = function webgl_enable_ANGLE_instanced_arrays(ctx) { + var ext = ctx.getExtension("ANGLE_instanced_arrays"); + if (ext) { + ctx["vertexAttribDivisor"] = function (index, divisor) { + return ext["vertexAttribDivisorANGLE"](index, divisor); + }; + ctx["drawArraysInstanced"] = function (mode, first, count, primcount) { + return ext["drawArraysInstancedANGLE"](mode, first, count, primcount); + }; + ctx["drawElementsInstanced"] = function (mode, count, type, indices, primcount) { + return ext["drawElementsInstancedANGLE"](mode, count, type, indices, primcount); + }; + return 1; + } +}; +var webgl_enable_OES_vertex_array_object = function webgl_enable_OES_vertex_array_object(ctx) { + var ext = ctx.getExtension("OES_vertex_array_object"); + if (ext) { + ctx["createVertexArray"] = function () { + return ext["createVertexArrayOES"](); + }; + ctx["deleteVertexArray"] = function (vao) { + return ext["deleteVertexArrayOES"](vao); + }; + ctx["bindVertexArray"] = function (vao) { + return ext["bindVertexArrayOES"](vao); + }; + ctx["isVertexArray"] = function (vao) { + return ext["isVertexArrayOES"](vao); + }; + return 1; + } +}; +var webgl_enable_WEBGL_draw_buffers = function webgl_enable_WEBGL_draw_buffers(ctx) { + var ext = ctx.getExtension("WEBGL_draw_buffers"); + if (ext) { + ctx["drawBuffers"] = function (n, bufs) { + return ext["drawBuffersWEBGL"](n, bufs); + }; + return 1; + } +}; +var webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance = function webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx) { + return !!(ctx.dibvbi = ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")); +}; +var webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance = function webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx) { + return !!(ctx.mdibvbi = ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")); +}; +var webgl_enable_WEBGL_multi_draw = function webgl_enable_WEBGL_multi_draw(ctx) { + return !!(ctx.multiDrawWebgl = ctx.getExtension("WEBGL_multi_draw")); +}; +var _emscripten_webgl_enable_extension = function _emscripten_webgl_enable_extension(contextHandle, extension) { + var context = GL.getContext(contextHandle); + var extString = UTF8ToString(extension); + if (extString.startsWith("GL_")) extString = extString.substr(3); + if (extString == "ANGLE_instanced_arrays") webgl_enable_ANGLE_instanced_arrays(GLctx); + if (extString == "OES_vertex_array_object") webgl_enable_OES_vertex_array_object(GLctx); + if (extString == "WEBGL_draw_buffers") webgl_enable_WEBGL_draw_buffers(GLctx); + if (extString == "WEBGL_draw_instanced_base_vertex_base_instance") webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx); + if (extString == "WEBGL_multi_draw_instanced_base_vertex_base_instance") webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx); + if (extString == "WEBGL_multi_draw") webgl_enable_WEBGL_multi_draw(GLctx); + var ext = context.GLctx.getExtension(extString); + return !!ext; +}; +var _emscripten_webgl_do_get_current_context = function _emscripten_webgl_do_get_current_context() { + return GL.currentContext ? GL.currentContext.handle : 0; +}; +var _emscripten_webgl_get_current_context = _emscripten_webgl_do_get_current_context; +var ENV = {}; +var getExecutableName = function getExecutableName() { + return thisProgram || "./this.program"; +}; +var getEnvStrings = function getEnvStrings() { + if (!getEnvStrings.strings) { + var lang = ((typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8"; + var env = { + "USER": "web_user", + "LOGNAME": "web_user", + "PATH": "/", + "PWD": "/", + "HOME": "/home/web_user", + "LANG": lang, + "_": getExecutableName() + }; + for (var x in ENV) { + if (ENV[x] === undefined) delete env[x];else env[x] = ENV[x]; + } + var strings = []; + for (var x in env) { + strings.push("".concat(x, "=").concat(env[x])); + } + getEnvStrings.strings = strings; + } + return getEnvStrings.strings; +}; +var stringToAscii = function stringToAscii(str, buffer) { + for (var i = 0; i < str.length; ++i) { + HEAP8[buffer++] = str.charCodeAt(i); + } + HEAP8[buffer] = 0; +}; +var _environ_get = function _environ_get(__environ, environ_buf) { + var bufSize = 0; + getEnvStrings().forEach(function (string, i) { + var ptr = environ_buf + bufSize; + HEAPU32[__environ + i * 4 >> 2] = ptr; + stringToAscii(string, ptr); + bufSize += string.length + 1; + }); + return 0; +}; +var _environ_sizes_get = function _environ_sizes_get(penviron_count, penviron_buf_size) { + var strings = getEnvStrings(); + HEAPU32[penviron_count >> 2] = strings.length; + var bufSize = 0; + strings.forEach(function (string) { + return bufSize += string.length + 1; + }); + HEAPU32[penviron_buf_size >> 2] = bufSize; + return 0; +}; +function _fd_close(fd) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + FS.close(stream); + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return e.errno; + } +} +var doReadv = function doReadv(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; + iov += 8; + var curr = FS.read(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (curr < len) break; + if (typeof offset !== "undefined") { + offset += curr; + } + } + return ret; +}; +function _fd_read(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = doReadv(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return e.errno; + } +} +function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + var offset = convertI32PairToI53Checked(offset_low, offset_high); + try { + if (isNaN(offset)) return 61; + var stream = SYSCALLS.getStreamFromFD(fd); + FS.llseek(stream, offset, whence); + tempI64 = [stream.position >>> 0, (tempDouble = stream.position, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? +Math.floor(tempDouble / 4294967296) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[newOffset >> 2] = tempI64[0], HEAP32[newOffset + 4 >> 2] = tempI64[1]; + if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return e.errno; + } +} +var doWritev = function doWritev(stream, iov, iovcnt, offset) { + var ret = 0; + for (var i = 0; i < iovcnt; i++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; + iov += 8; + var curr = FS.write(stream, HEAP8, ptr, len, offset); + if (curr < 0) return -1; + ret += curr; + if (typeof offset !== "undefined") { + offset += curr; + } + } + return ret; +}; +function _fd_write(fd, iov, iovcnt, pnum) { + try { + var stream = SYSCALLS.getStreamFromFD(fd); + var num = doWritev(stream, iov, iovcnt); + HEAPU32[pnum >> 2] = num; + return 0; + } catch (e) { + if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e; + return e.errno; + } +} +var _getaddrinfo = function _getaddrinfo(node, service, hint, out) { + var addr = 0; + var port = 0; + var flags = 0; + var family = 0; + var type = 0; + var proto = 0; + var ai; + function allocaddrinfo(family, type, proto, canon, addr, port) { + var sa, salen, ai; + var errno; + salen = family === 10 ? 28 : 16; + addr = family === 10 ? inetNtop6(addr) : inetNtop4(addr); + sa = _malloc(salen); + errno = writeSockaddr(sa, family, addr, port); + assert(!errno); + ai = _malloc(32); + HEAP32[ai + 4 >> 2] = family; + HEAP32[ai + 8 >> 2] = type; + HEAP32[ai + 12 >> 2] = proto; + HEAPU32[ai + 24 >> 2] = canon; + HEAPU32[ai + 20 >> 2] = sa; + if (family === 10) { + HEAP32[ai + 16 >> 2] = 28; + } else { + HEAP32[ai + 16 >> 2] = 16; + } + HEAP32[ai + 28 >> 2] = 0; + return ai; + } + if (hint) { + flags = HEAP32[hint >> 2]; + family = HEAP32[hint + 4 >> 2]; + type = HEAP32[hint + 8 >> 2]; + proto = HEAP32[hint + 12 >> 2]; + } + if (type && !proto) { + proto = type === 2 ? 17 : 6; + } + if (!type && proto) { + type = proto === 17 ? 2 : 1; + } + if (proto === 0) { + proto = 6; + } + if (type === 0) { + type = 1; + } + if (!node && !service) { + return -2; + } + if (flags & ~(1 | 2 | 4 | 1024 | 8 | 16 | 32)) { + return -1; + } + if (hint !== 0 && HEAP32[hint >> 2] & 2 && !node) { + return -1; + } + if (flags & 32) { + return -2; + } + if (type !== 0 && type !== 1 && type !== 2) { + return -7; + } + if (family !== 0 && family !== 2 && family !== 10) { + return -6; + } + if (service) { + service = UTF8ToString(service); + port = parseInt(service, 10); + if (isNaN(port)) { + if (flags & 1024) { + return -2; + } + return -8; + } + } + if (!node) { + if (family === 0) { + family = 2; + } + if ((flags & 1) === 0) { + if (family === 2) { + addr = _htonl2(2130706433); + } else { + addr = [0, 0, 0, 1]; + } + } + ai = allocaddrinfo(family, type, proto, null, addr, port); + HEAPU32[out >> 2] = ai; + return 0; + } + node = UTF8ToString(node); + addr = inetPton4(node); + if (addr !== null) { + if (family === 0 || family === 2) { + family = 2; + } else if (family === 10 && flags & 8) { + addr = [0, 0, _htonl2(65535), addr]; + family = 10; + } else { + return -2; + } + } else { + addr = inetPton6(node); + if (addr !== null) { + if (family === 0 || family === 10) { + family = 10; + } else { + return -2; + } + } + } + if (addr != null) { + ai = allocaddrinfo(family, type, proto, node, addr, port); + HEAPU32[out >> 2] = ai; + return 0; + } + if (flags & 4) { + return -2; + } + node = DNS.lookup_name(node); + addr = inetPton4(node); + if (family === 0) { + family = 2; + } else if (family === 10) { + addr = [0, 0, _htonl2(65535), addr]; + } + ai = allocaddrinfo(family, type, proto, null, addr, port); + HEAPU32[out >> 2] = ai; + return 0; +}; +var _getnameinfo = function _getnameinfo(sa, salen, node, nodelen, serv, servlen, flags) { + var info = readSockaddr(sa, salen); + if (info.errno) { + return -6; + } + var port = info.port; + var addr = info.addr; + var overflowed = false; + if (node && nodelen) { + var lookup; + if (flags & 1 || !(lookup = DNS.lookup_addr(addr))) { + if (flags & 8) { + return -2; + } + } else { + addr = lookup; + } + var numBytesWrittenExclNull = stringToUTF8(addr, node, nodelen); + if (numBytesWrittenExclNull + 1 >= nodelen) { + overflowed = true; + } + } + if (serv && servlen) { + port = "" + port; + var numBytesWrittenExclNull = stringToUTF8(port, serv, servlen); + if (numBytesWrittenExclNull + 1 >= servlen) { + overflowed = true; + } + } + if (overflowed) { + return -12; + } + return 0; +}; +var GLFW = { + keyFunc: null, + charFunc: null, + markedTextFunc: null, + gamepadFunc: null, + mouseButtonFunc: null, + mousePosFunc: null, + mouseWheelFunc: null, + resizeFunc: null, + closeFunc: null, + refreshFunc: null, + focusFunc: null, + iconifyFunc: null, + touchFunc: null, + params: null, + initTime: null, + wheelPos: 0, + buttons: 0, + keys: 0, + initWindowWidth: 640, + initWindowHeight: 480, + windowX: 0, + windowY: 0, + windowWidth: 0, + windowHeight: 0, + prevWidth: 0, + prevHeight: 0, + prevNonFSWidth: 0, + prevNonFSHeight: 0, + isFullscreen: false, + isPointerLocked: false, + dpi: 1, + mouseTouchId: null, + DOMToGLFWKeyCode: function DOMToGLFWKeyCode(keycode, code) { + switch (keycode) { + case 8: + return 295; + case 9: + return 293; + case 13: + return 294; + case 27: + return 257; + case 106: + return 313; + case 107: + return 315; + case 109: + return 314; + case 110: + return 316; + case 111: + return 312; + case 112: + return 258; + case 113: + return 259; + case 114: + return 260; + case 115: + return 261; + case 116: + return 262; + case 117: + return 263; + case 118: + return 264; + case 119: + return 265; + case 120: + return 266; + case 121: + return 267; + case 122: + return 268; + case 123: + return 269; + case 37: + return 285; + case 38: + return 283; + case 39: + return 286; + case 40: + return 284; + case 33: + return 298; + case 34: + return 299; + case 36: + return 300; + case 35: + return 301; + case 45: + return 296; + case 16: + return 287; + case 5: + return 287; + case 6: + return 288; + case 17: + return 289; + case 3: + return 289; + case 4: + return 290; + case 18: + return 291; + case 2: + return 291; + case 1: + return 292; + case 96: + return 302; + case 97: + return 303; + case 98: + return 304; + case 99: + return 305; + case 100: + return 306; + case 101: + return 307; + case 102: + return 308; + case 103: + return 309; + case 104: + return 310; + case 105: + return 311; + } + switch (code) { + case "Minus": + return 45; + case "Period": + return 46; + case "Comma": + return 44; + case "Slash": + return 47; + case "Backslash": + return 92; + case "IntlRo": + return 92; + case "IntlYen": + return 92; + case "IntlBackslash": + return 92; + case "Backquote": + return 96; + case "BracketLeft": + return 91; + case "BracketRight": + return 93; + case "Equal": + return 61; + case "Quote": + return 39; + case "Semicolon": + return 59; + case "NumpadComma": + return 316; + } + return keycode; + }, + DOMtoGLFWButton: function DOMtoGLFWButton(button) { + if (button == 1) { + button = 2; + } else if (button == 2) { + button = 1; + } + return button; + }, + getUnicodeChar: function getUnicodeChar(value) { + var output = ""; + if (value > 65535) { + value -= 65536; + output += String.fromCharCode(value >>> 10 & 1023 | 55296); + value = 56320 | value & 1023; + } + output += String.fromCharCode(value); + return output; + }, + addEventListener: function addEventListener(type, listener, useCapture) { + if (typeof window !== "undefined") { + window.addEventListener(type, listener, useCapture); + } + }, + removeEventListener: function removeEventListener(type, listener, useCapture) { + if (typeof window !== "undefined") { + window.removeEventListener(type, listener, useCapture); + } + }, + addEventListenerCanvas: function addEventListenerCanvas(type, listener, useCapture) { + if (typeof Module["canvas"] !== "undefined") { + Module["canvas"].addEventListener(type, listener, useCapture); + } + }, + removeEventListenerCanvas: function removeEventListenerCanvas(type, listener, useCapture) { + if (typeof Module["canvas"] !== "undefined") { + Module["canvas"].removeEventListener(type, listener, useCapture); + } + }, + isCanvasActive: function isCanvasActive(event) { + var res = typeof document.activeElement == "undefined" || document.activeElement == Module["canvas"]; + if (!res) { + res = event.target == Module["canvas"]; + } + if (event.target.focus) event.target.focus(); + return res; + }, + onKeyPress: function onKeyPress(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + if (event.charCode) { + var char = GLFW.getUnicodeChar(event.charCode); + if (char !== null && GLFW.charFunc) { + getWasmTableEntry(GLFW.charFunc)(event.charCode, 1); + } + } + }, + onKeyChanged: function onKeyChanged(event, status) { + if (!GLFW.isCanvasActive(event)) { + return; + } + var key = GLFW.DOMToGLFWKeyCode(event.keyCode, event.code); + if (key) { + GLFW.keys[key] = status; + if (GLFW.keyFunc) { + getWasmTableEntry(GLFW.keyFunc)(key, status); + } + } + }, + onKeydown: function onKeydown(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + switch (event.keyCode) { + case 37: + case 38: + case 39: + case 40: + case 32: + event.preventDefault(); + event.stopPropagation(); + default: + break; + } + GLFW.onKeyChanged(event, 1); + if (event.keyCode === 32) { + if (GLFW.charFunc) { + getWasmTableEntry(GLFW.charFunc)(32, 1); + event.preventDefault(); + } + } else if (event.keyCode === 8 || event.keyCode === 9 || event.keyCode === 13) { + event.preventDefault(); + } + }, + onKeyup: function onKeyup(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + GLFW.onKeyChanged(event, 0); + }, + onMousemove: function onMousemove(event) { + var lastX = Browser.mouseX; + var lastY = Browser.mouseY; + Browser.calculateMouseEvent(event); + var newX = Browser.mouseX; + var newY = Browser.mouseY; + if (event.target == Module["canvas"] && GLFW.mousePosFunc) { + event.preventDefault(); + getWasmTableEntry(GLFW.mousePosFunc)(lastX, lastY); + } + }, + onMouseButtonChanged: function onMouseButtonChanged(event, status) { + if (!GLFW.isCanvasActive(event)) { + return; + } + if (GLFW.mouseButtonFunc == null) { + return; + } + Browser.calculateMouseEvent(event); + if (event.target != Module["canvas"]) { + return; + } + if (status == 1) { + try { + event.target.setCapture(); + } catch (e) {} + } + event.preventDefault(); + var eventButton = GLFW.DOMtoGLFWButton(event["button"]); + getWasmTableEntry(GLFW.mouseButtonFunc)(eventButton, status); + }, + fillTouch: function fillTouch(id, x, y, phase) { + if (GLFW.touchFunc) { + getWasmTableEntry(GLFW.touchFunc)(id, x, y, phase); + } + }, + touchWasFinished: function touchWasFinished(event, phase) { + if (!GLFW.isCanvasActive(event)) { + return; + } + for (var i = 0; i < event.changedTouches.length; ++i) { + var touch = event.changedTouches[i]; + var coord = GLFW.convertCoordinatesFromMonitorToWebGLPixels(touch.clientX, touch.clientY); + var canvasX = coord[0]; + var canvasY = coord[1]; + GLFW.fillTouch(touch.identifier, canvasX, canvasY, phase); + if (touch.identifier == GLFW.mouseTouchId) { + GLFW.mouseTouchId = null; + GLFW.buttons &= ~(1 << 0); + } + } + if (event.touches.length == 0) { + GLFW.buttons &= ~(1 << 0); + } + if (typeof DefoldSoundDevice != "undefined" && DefoldSoundDevice != null) { + DefoldSoundDevice.TryResumeAudio(); + } + event.preventDefault(); + }, + onTouchEnd: function onTouchEnd(event) { + GLFW.touchWasFinished(event, GLFW.GLFW_PHASE_ENDED); + }, + onTouchCancel: function onTouchCancel(event) { + GLFW.touchWasFinished(event, GLFW.GLFW_PHASE_CANCELLED); + }, + convertCoordinatesFromMonitorToWebGLPixels: function convertCoordinatesFromMonitorToWebGLPixels(x, y) { + var rect = Module["canvas"].getBoundingClientRect(); + var canvasWidth = rect.right - rect.left; + var canvasHeight = rect.bottom - rect.top; + var canvasX = x - rect.left; + var canvasY = y - rect.top; + var canvasXNormalized = canvasX / canvasWidth; + var canvasYNormalized = canvasY / canvasHeight; + var finalX = Module["canvas"].width * canvasXNormalized; + var finalY = Module["canvas"].height * canvasYNormalized; + return [finalX, finalY]; + }, + onTouchMove: function onTouchMove(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + var e = event; + var touch; + var coord; + var canvasX; + var canvasY; + for (var i = 0; i < e.changedTouches.length; ++i) { + touch = e.changedTouches[i]; + coord = GLFW.convertCoordinatesFromMonitorToWebGLPixels(touch.clientX, touch.clientY); + canvasX = coord[0]; + canvasY = coord[1]; + if (touch.identifier == GLFW.mouseTouchId) { + Browser.mouseX = canvasX; + Browser.mouseY = canvasY; + } + GLFW.fillTouch(touch.identifier, canvasX, canvasY, GLFW.GLFW_PHASE_MOVED); + } + event.preventDefault(); + }, + onTouchStart: function onTouchStart(event) { + if (event.target != Module["canvas"]) { + return; + } + var e = event; + var touch; + var coord; + var canvasX; + var canvasY; + for (var i = 0; i < e.changedTouches.length; ++i) { + touch = e.changedTouches[i]; + coord = GLFW.convertCoordinatesFromMonitorToWebGLPixels(touch.clientX, touch.clientY); + canvasX = coord[0]; + canvasY = coord[1]; + if (i == 0 && GLFW.mouseTouchId == null) { + GLFW.mouseTouchId = touch.identifier; + GLFW.buttons |= 1 << 0; + Browser.mouseX = canvasX; + Browser.mouseY = canvasY; + } + GLFW.fillTouch(touch.identifier, canvasX, canvasY, GLFW.GLFW_PHASE_BEGAN); + } + event.preventDefault(); + }, + onMouseButtonDown: function onMouseButtonDown(event) { + if (event.target != Module["canvas"]) { + return; + } + GLFW.buttons |= 1 << event["button"]; + GLFW.onMouseButtonChanged(event, 1); + }, + onMouseButtonUp: function onMouseButtonUp(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + GLFW.buttons &= ~(1 << event["button"]); + GLFW.onMouseButtonChanged(event, 0); + if (typeof DefoldSoundDevice != "undefined" && DefoldSoundDevice != null) { + DefoldSoundDevice.TryResumeAudio(); + } + }, + onMouseWheel: function onMouseWheel(event) { + if (!GLFW.isCanvasActive(event)) { + return; + } + GLFW.wheelPos += Browser.getMouseWheelDelta(event); + if (event.target == Module["canvas"]) { + if (GLFW.mouseWheelFunc) { + getWasmTableEntry(GLFW.mouseWheelFunc)(GLFW.wheelPos); + } + if (event.cancelable) { + event.preventDefault(); + } + } + }, + onFocusChanged: function onFocusChanged(focus) { + if (focus == 0) { + for (var i = 0; i < GLFW.keys.length; i++) { + GLFW.keys[i] = 0; + } + GLFW.buttons = 0; + } + if (GLFW.focusFunc) { + getWasmTableEntry(GLFW.focusFunc)(focus); + } + }, + onFocus: function onFocus(event) { + GLFW.onFocusChanged(1); + }, + onBlur: function onBlur(event) { + GLFW.onFocusChanged(0); + }, + onFullScreenEventChange: function onFullScreenEventChange(event) { + GLFW.isFullscreen = document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"] || document["msIsFullScreen"]; + if (!GLFW.isFullscreen) { + document.removeEventListener("fullscreenchange", GLFW.onFullScreenEventChange, true); + document.removeEventListener("mozfullscreenchange", GLFW.onFullScreenEventChange, true); + document.removeEventListener("webkitfullscreenchange", GLFW.onFullScreenEventChange, true); + document.removeEventListener("msfullscreenchange", GLFW.onFullScreenEventChange, true); + } + GLFW.prevWidth = 0; + GLFW.prevHeight = 0; + }, + requestFullScreen: function requestFullScreen(element) { + element = element || Module["fullScreenContainer"] || Module["canvas"]; + if (!element) { + return; + } + document.addEventListener("fullscreenchange", GLFW.onFullScreenEventChange, true); + document.addEventListener("mozfullscreenchange", GLFW.onFullScreenEventChange, true); + document.addEventListener("webkitfullscreenchange", GLFW.onFullScreenEventChange, true); + document.addEventListener("msfullscreenchange", GLFW.onFullScreenEventChange, true); + var RFS = element["requestFullscreen"] || element["requestFullScreen"] || element["mozRequestFullScreen"] || element["webkitRequestFullScreen"] || element["msRequestFullScreen"] || function () {}; + RFS.apply(element, []); + }, + cancelFullScreen: function cancelFullScreen() { + var CFS = document["exitFullscreen"] || document["cancelFullScreen"] || document["mozCancelFullScreen"] || document["webkitCancelFullScreen"] || document["msExitFullscreen"] || function () {}; + CFS.apply(document, []); + }, + onJoystickConnected: function onJoystickConnected(event) { + GLFW.refreshJoysticks(); + }, + onJoystickDisconnected: function onJoystickDisconnected(event) { + GLFW.refreshJoysticks(true); + }, + onPointerLockEventChange: function onPointerLockEventChange(event) { + GLFW.isPointerLocked = !!document["pointerLockElement"]; + if (!GLFW.isPointerLocked) { + document.removeEventListener("pointerlockchange", GLFW.onPointerLockEventChange, true); + } + }, + requestPointerLock: function requestPointerLock(element) { + element = element || Module["canvas"]; + if (!element) { + return; + } + if (!GLFW.isPointerLocked) { + document.addEventListener("pointerlockchange", GLFW.onPointerLockEventChange, true); + var RPL = element.requestPointerLock || function () {}; + RPL.apply(element, []); + } + }, + cancelPointerLock: function cancelPointerLock() { + var EPL = document.exitPointerLock || function () {}; + EPL.apply(document, []); + }, + disconnectJoystick: function disconnectJoystick(joy) { + if (GLFW.gamepadFunc) { + _free(GLFW.joys[joy].id); + delete GLFW.joys[joy]; + getWasmTableEntry(GLFW.gamepadFunc)(joy, 0); + } + }, + joys: {}, + lastGamepadState: null, + lastGamepadStateFrame: null, + refreshJoysticks: function refreshJoysticks(forceUpdate) { + if (GLFW.gamepadFunc) { + if (forceUpdate || Browser.mainLoop.currentFrameNumber !== GLFW.lastGamepadStateFrame || !Browser.mainLoop.currentFrameNumber) { + GLFW.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null; + if (!GLFW.lastGamepadState) { + return; + } + GLFW.lastGamepadStateFrame = Browser.mainLoop.currentFrameNumber; + for (var joy = 0; joy < GLFW.lastGamepadState.length; ++joy) { + var gamepad = GLFW.lastGamepadState[joy]; + if (gamepad) { + var gamepad_id = gamepad.mapping == "standard" ? "Standard Gamepad" : gamepad.id; + if (!GLFW.joys[joy] || GLFW.joys[joy].id_string != gamepad_id) { + if (GLFW.joys[joy]) { + GLFW.disconnectJoystick(joy); + } + GLFW.joys[joy] = { + id: stringToNewUTF8(gamepad_id), + id_string: gamepad_id, + axesCount: gamepad.axes.length, + buttonsCount: gamepad.buttons.length + }; + getWasmTableEntry(GLFW.gamepadFunc)(joy, 1); + } + GLFW.joys[joy].buttons = gamepad.buttons; + GLFW.joys[joy].axes = gamepad.axes; + } else { + if (GLFW.joys[joy]) { + GLFW.disconnectJoystick(joy); + } + } + } + } + } + } +}; +function _glfwAccelerometerEnable() {} +function _glfwCloseWindow() { + if (GLFW.closeFunc) { + getWasmTableEntry(GLFW.closeFunc)(); + } + Module.ctx = Browser.destroyContext(Module["canvas"], true, true); +} +function _glfwDisable(token) { + GLFW.params[token] = false; + if (token == 196609) { + GLFW.requestPointerLock(); + } +} +function _glfwEnable(token) { + GLFW.params[token] = true; + if (token == 196609) { + GLFW.cancelPointerLock(); + } +} +function _glfwGetAcceleration(x, y, z) { + return 0; +} +function _glfwGetDefaultFramebuffer() { + return 0; +} +function _glfwGetDisplayScaleFactor() { + return 1; +} +function _glfwGetJoystickButtons(joy, buttons, numbuttons) { + GLFW.refreshJoysticks(); + var state = GLFW.joys[joy]; + if (!state || !state.buttons) { + for (var i = 0; i < numbuttons; i++) { + setValue(buttons + i, 0, "i8"); + } + return; + } + for (var i = 0; i < Math.min(numbuttons, state.buttonsCount); i++) { + setValue(buttons + i, state.buttons[i].pressed, "i8"); + } +} +function _glfwGetJoystickDeviceId(joy, device_id) { + if (GLFW.joys[joy]) { + setValue(device_id, GLFW.joys[joy].id, "*"); + return 1; + } else { + return 0; + } +} +function _glfwGetJoystickHats(joy, buttons, numhats) { + return 0; +} +function _glfwGetJoystickParam(joy, param) { + var result = 0; + if (GLFW.joys[joy]) { + switch (GLFW.params[param]) { + case 0: + result = 1; + break; + case 1: + result = GLFW.joys[joy].axesCount; + break; + case 2: + result = GLFW.joys[joy].buttonsCount; + break; + } + } + return result; +} +function _glfwGetJoystickPos(joy, pos, numaxes) { + GLFW.refreshJoysticks(); + var state = GLFW.joys[joy]; + if (!state || !state.axes) { + for (var i = 0; i < numaxes; i++) { + setValue(pos + i * 4, 0, "float"); + } + return; + } + for (var i = 0; i < numaxes; i++) { + setValue(pos + i * 4, state.axes[i], "float"); + } +} +function _glfwGetKey(key) { + return GLFW.keys[key]; +} +function _glfwGetMouseButton(button) { + return (GLFW.buttons & 1 << GLFW.DOMtoGLFWButton(button)) > 0; +} +function _glfwGetMouseLocked() { + return GLFW.isPointerLocked ? 1 : 0; +} +function _glfwGetMousePos(xpos, ypos) { + setValue(xpos, Browser.mouseX, "i32"); + setValue(ypos, Browser.mouseY, "i32"); +} +function _glfwGetMouseWheel() { + return GLFW.wheelPos; +} +function _glfwGetWindowParam(param) { + return GLFW.params[param]; +} +function _glfwGetWindowRefreshRate() { + return 0; +} +function _glfwGetWindowSize(width, height) { + setValue(width, Module["canvas"].width, "i32"); + setValue(height, Module["canvas"].height, "i32"); +} +function _glfwIconifyWindow() {} +function _glfwInitJS() { + GLFW.initTime = Date.now() / 1e3; + GLFW.addEventListener("gamepadconnected", GLFW.onJoystickConnected, true); + GLFW.addEventListener("gamepaddisconnected", GLFW.onJoystickDisconnected, true); + GLFW.addEventListener("keydown", GLFW.onKeydown, true); + GLFW.addEventListener("keypress", GLFW.onKeyPress, true); + GLFW.addEventListener("keyup", GLFW.onKeyup, true); + GLFW.addEventListener("mousemove", GLFW.onMousemove, true); + GLFW.addEventListener("mousedown", GLFW.onMouseButtonDown, true); + GLFW.addEventListener("mouseup", GLFW.onMouseButtonUp, true); + GLFW.addEventListener("DOMMouseScroll", GLFW.onMouseWheel, { + capture: true, + passive: false + }); + GLFW.addEventListener("mousewheel", GLFW.onMouseWheel, { + capture: true, + passive: false + }); + GLFW.addEventListenerCanvas("touchstart", GLFW.onTouchStart, true); + GLFW.addEventListenerCanvas("touchend", GLFW.onTouchEnd, true); + GLFW.addEventListenerCanvas("touchcancel", GLFW.onTouchCancel, true); + GLFW.addEventListenerCanvas("touchmove", GLFW.onTouchMove, true); + GLFW.addEventListenerCanvas("focus", GLFW.onFocus, true); + GLFW.addEventListenerCanvas("blur", GLFW.onBlur, true); + __ATEXIT__.push({ + func: function func() { + GLFW.removeEventListener("gamepadconnected", GLFW.onJoystickConnected, true); + GLFW.removeEventListener("gamepaddisconnected", GLFW.onJoystickDisconnected, true); + GLFW.removeEventListener("keydown", GLFW.onKeydown, true); + GLFW.removeEventListener("keypress", GLFW.onKeyPress, true); + GLFW.removeEventListener("keyup", GLFW.onKeyup, true); + GLFW.removeEventListener("mousemove", GLFW.onMousemove, true); + GLFW.removeEventListener("mousedown", GLFW.onMouseButtonDown, true); + GLFW.removeEventListener("mouseup", GLFW.onMouseButtonUp, true); + GLFW.removeEventListener("DOMMouseScroll", GLFW.onMouseWheel, { + capture: true, + passive: false + }); + GLFW.removeEventListener("mousewheel", GLFW.onMouseWheel, { + capture: true, + passive: false + }); + GLFW.removeEventListenerCanvas("touchstart", GLFW.onTouchStart, true); + GLFW.removeEventListenerCanvas("touchend", GLFW.onTouchEnd, true); + GLFW.removeEventListenerCanvas("touchcancel", GLFW.onTouchEnd, true); + GLFW.removeEventListenerCanvas("touchmove", GLFW.onTouchMove, true); + GLFW.removeEventListenerCanvas("focus", GLFW.onFocus, true); + GLFW.removeEventListenerCanvas("blur", GLFW.onBlur, true); + var canvas = Module["canvas"]; + if (typeof canvas !== "undefined") { + Module["canvas"].width = Module["canvas"].height = 1; + } + } + }); + GLFW.params = new Array(); + GLFW.params[196609] = true; + GLFW.params[196610] = false; + GLFW.params[196611] = true; + GLFW.params[196612] = false; + GLFW.params[196613] = false; + GLFW.params[196614] = true; + GLFW.params[131073] = true; + GLFW.params[131074] = true; + GLFW.params[131075] = false; + GLFW.params[131076] = true; + GLFW.params[131077] = 0; + GLFW.params[131078] = 0; + GLFW.params[131079] = 0; + GLFW.params[131080] = 0; + GLFW.params[131081] = 0; + GLFW.params[131082] = 0; + GLFW.params[131083] = 0; + GLFW.params[131084] = 0; + GLFW.params[131085] = 0; + GLFW.params[131086] = 0; + GLFW.params[131087] = 0; + GLFW.params[131088] = 0; + GLFW.params[131089] = 0; + GLFW.params[131090] = 0; + GLFW.params[131091] = 0; + GLFW.params[131092] = 0; + GLFW.params[131093] = 0; + GLFW.params[131094] = 0; + GLFW.params[131095] = 0; + GLFW.params[131096] = 0; + GLFW.params[327681] = 0; + GLFW.params[327682] = 1; + GLFW.params[327683] = 2; + GLFW.params[131097] = 0; + GLFW.keys = new Array(); + GLFW.GLFW_PHASE_BEGAN = 0; + GLFW.GLFW_PHASE_MOVED = 1; + GLFW.GLFW_PHASE_ENDED = 3; + GLFW.GLFW_PHASE_CANCELLED = 4; + return 1; +} +function _glfwOpenWindow(width, height, redbits, greenbits, bluebits, alphabits, depthbits, stencilbits, mode) { + if (width == 0 && height > 0) { + width = 4 * height / 3; + } + if (width > 0 && height == 0) { + height = 3 * width / 4; + } + GLFW.params[131077] = redbits; + GLFW.params[131078] = greenbits; + GLFW.params[131079] = bluebits; + GLFW.params[131080] = alphabits; + GLFW.params[131081] = depthbits; + GLFW.params[131082] = stencilbits; + if (mode == 65537) { + GLFW.initWindowWidth = width; + GLFW.initWindowHeight = height; + GLFW.params[196611] = true; + } else if (mode == 65538) { + GLFW.requestFullScreen(); + GLFW.params[196611] = false; + } else { + throw "Invalid glfwOpenWindow mode."; + } + var contextAttributes = { + antialias: GLFW.params[131091] > 1, + depth: GLFW.params[131081] > 0, + stencil: GLFW.params[131082] > 0 + }; + var iOSVersion = false; + try { + iOSVersion = parseFloat(("" + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ""])[1]).replace("undefined", "3_2").replace("_", ".").replace("_", "")) || false; + } catch (e) {} + if (iOSVersion && iOSVersion < 15.2) { + contextAttributes.majorVersion = 1; + } + Module.ctx = Browser.createContext(Module["canvas"], true, true, contextAttributes); + if (Module.ctx == null) { + contextAttributes.majorVersion = 1; + Module.ctx = Browser.createContext(Module["canvas"], true, true, contextAttributes); + } + return 1; +} +function _glfwOpenWindowHint(target, hint) { + GLFW.params[target] = hint; + if (target == 131097) { + if (hint != 0) { + GLFW.dpi = window.devicePixelRatio || 1; + } + } +} +function _glfwPollEvents() {} +function _glfwResetKeyboard() {} +function _glfwSetCharCallback(cbfun) { + GLFW.charFunc = cbfun; + return 1; +} +function _glfwSetDeviceChangedCallback(cbfun) { + return 1; +} +function _glfwSetGamepadCallback(cbfun) { + GLFW.gamepadFunc = cbfun; + try { + GLFW.refreshJoysticks(); + return 1; + } catch (e) { + GLFW.gamepadFunc = null; + return 0; + } +} +function _glfwSetMarkedTextCallback(cbfun) { + GLFW.markedTextFunc = cbfun; + return 1; +} +function _glfwSetTouchCallback(cbfun) { + GLFW.touchFunc = cbfun; + return 1; +} +function _glfwSetWindowBackgroundColor() {} +function _glfwSetWindowCloseCallback(cbfun) { + GLFW.closeFunc = cbfun; +} +function _glfwSetWindowFocusCallback(cbfun) { + GLFW.focusFunc = cbfun; +} +function _glfwSetWindowIconifyCallback(cbfun) { + GLFW.iconifyFunc = cbfun; +} +function _glfwSetWindowSize(width, height) { + Browser.setCanvasSize(width, height); + if (GLFW.resizeFunc) { + getWasmTableEntry(GLFW.resizeFunc)(width, height); + } +} +function _glfwSetWindowSizeCallback(cbfun) { + GLFW.resizeFunc = cbfun; +} +function _glfwShowKeyboard(show_keyboard) { + Module["canvas"].contentEditable = show_keyboard ? true : false; + if (show_keyboard) { + Module["canvas"].focus(); + } +} +function _glfwSwapBuffers() { + var width = Module["canvas"].width; + var height = Module["canvas"].height; + if (GLFW.prevWidth != width || GLFW.prevHeight != height) { + if (GLFW.isFullscreen) { + width = Math.floor(window.innerWidth * GLFW.dpi); + height = Math.floor(window.innerHeight * GLFW.dpi); + } + GLFW.prevWidth = width; + GLFW.prevHeight = height; + _glfwSetWindowSize(width, height); + } +} +function _glfwSwapInterval(interval) {} +function _glfwTerminate() {} +var arraySum = function arraySum(array, index) { + var sum = 0; + for (var i = 0; i <= index; sum += array[i++]) {} + return sum; +}; +var MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var addDays = function addDays(date, days) { + var newDate = new Date(date.getTime()); + while (days > 0) { + var leap = isLeapYear(newDate.getFullYear()); + var currentMonth = newDate.getMonth(); + var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth]; + if (days > daysInCurrentMonth - newDate.getDate()) { + days -= daysInCurrentMonth - newDate.getDate() + 1; + newDate.setDate(1); + if (currentMonth < 11) { + newDate.setMonth(currentMonth + 1); + } else { + newDate.setMonth(0); + newDate.setFullYear(newDate.getFullYear() + 1); + } + } else { + newDate.setDate(newDate.getDate() + days); + return newDate; + } + } + return newDate; +}; +var writeArrayToMemory = function writeArrayToMemory(array, buffer) { + HEAP8.set(array, buffer); +}; +var _strftime = function _strftime(s, maxsize, format, tm) { + var tm_zone = HEAPU32[tm + 40 >> 2]; + var date = { + tm_sec: HEAP32[tm >> 2], + tm_min: HEAP32[tm + 4 >> 2], + tm_hour: HEAP32[tm + 8 >> 2], + tm_mday: HEAP32[tm + 12 >> 2], + tm_mon: HEAP32[tm + 16 >> 2], + tm_year: HEAP32[tm + 20 >> 2], + tm_wday: HEAP32[tm + 24 >> 2], + tm_yday: HEAP32[tm + 28 >> 2], + tm_isdst: HEAP32[tm + 32 >> 2], + tm_gmtoff: HEAP32[tm + 36 >> 2], + tm_zone: tm_zone ? UTF8ToString(tm_zone) : "" + }; + var pattern = UTF8ToString(format); + var EXPANSION_RULES_1 = { + "%c": "%a %b %d %H:%M:%S %Y", + "%D": "%m/%d/%y", + "%F": "%Y-%m-%d", + "%h": "%b", + "%r": "%I:%M:%S %p", + "%R": "%H:%M", + "%T": "%H:%M:%S", + "%x": "%m/%d/%y", + "%X": "%H:%M:%S", + "%Ec": "%c", + "%EC": "%C", + "%Ex": "%m/%d/%y", + "%EX": "%H:%M:%S", + "%Ey": "%y", + "%EY": "%Y", + "%Od": "%d", + "%Oe": "%e", + "%OH": "%H", + "%OI": "%I", + "%Om": "%m", + "%OM": "%M", + "%OS": "%S", + "%Ou": "%u", + "%OU": "%U", + "%OV": "%V", + "%Ow": "%w", + "%OW": "%W", + "%Oy": "%y" + }; + for (var rule in EXPANSION_RULES_1) { + pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_1[rule]); + } + var WEEKDAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + function leadingSomething(value, digits, character) { + var str = typeof value == "number" ? value.toString() : value || ""; + while (str.length < digits) { + str = character[0] + str; + } + return str; + } + function leadingNulls(value, digits) { + return leadingSomething(value, digits, "0"); + } + function compareByDay(date1, date2) { + function sgn(value) { + return value < 0 ? -1 : value > 0 ? 1 : 0; + } + var compare; + if ((compare = sgn(date1.getFullYear() - date2.getFullYear())) === 0) { + if ((compare = sgn(date1.getMonth() - date2.getMonth())) === 0) { + compare = sgn(date1.getDate() - date2.getDate()); + } + } + return compare; + } + function getFirstWeekStartDate(janFourth) { + switch (janFourth.getDay()) { + case 0: + return new Date(janFourth.getFullYear() - 1, 11, 29); + case 1: + return janFourth; + case 2: + return new Date(janFourth.getFullYear(), 0, 3); + case 3: + return new Date(janFourth.getFullYear(), 0, 2); + case 4: + return new Date(janFourth.getFullYear(), 0, 1); + case 5: + return new Date(janFourth.getFullYear() - 1, 11, 31); + case 6: + return new Date(janFourth.getFullYear() - 1, 11, 30); + } + } + function getWeekBasedYear(date) { + var thisDate = addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday); + var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4); + var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4); + var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); + var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); + if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) { + if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) { + return thisDate.getFullYear() + 1; + } + return thisDate.getFullYear(); + } + return thisDate.getFullYear() - 1; + } + var EXPANSION_RULES_2 = { + "%a": function a(date) { + return WEEKDAYS[date.tm_wday].substring(0, 3); + }, + "%A": function A(date) { + return WEEKDAYS[date.tm_wday]; + }, + "%b": function b(date) { + return MONTHS[date.tm_mon].substring(0, 3); + }, + "%B": function B(date) { + return MONTHS[date.tm_mon]; + }, + "%C": function C(date) { + var year = date.tm_year + 1900; + return leadingNulls(year / 100 | 0, 2); + }, + "%d": function d(date) { + return leadingNulls(date.tm_mday, 2); + }, + "%e": function e(date) { + return leadingSomething(date.tm_mday, 2, " "); + }, + "%g": function g(date) { + return getWeekBasedYear(date).toString().substring(2); + }, + "%G": getWeekBasedYear, + "%H": function H(date) { + return leadingNulls(date.tm_hour, 2); + }, + "%I": function I(date) { + var twelveHour = date.tm_hour; + if (twelveHour == 0) twelveHour = 12;else if (twelveHour > 12) twelveHour -= 12; + return leadingNulls(twelveHour, 2); + }, + "%j": function j(date) { + return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year + 1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon - 1), 3); + }, + "%m": function m(date) { + return leadingNulls(date.tm_mon + 1, 2); + }, + "%M": function M(date) { + return leadingNulls(date.tm_min, 2); + }, + "%n": function n() { + return "\n"; + }, + "%p": function p(date) { + if (date.tm_hour >= 0 && date.tm_hour < 12) { + return "AM"; + } + return "PM"; + }, + "%S": function S(date) { + return leadingNulls(date.tm_sec, 2); + }, + "%t": function t() { + return "\t"; + }, + "%u": function u(date) { + return date.tm_wday || 7; + }, + "%U": function U(date) { + var days = date.tm_yday + 7 - date.tm_wday; + return leadingNulls(Math.floor(days / 7), 2); + }, + "%V": function V(date) { + var val = Math.floor((date.tm_yday + 7 - (date.tm_wday + 6) % 7) / 7); + if ((date.tm_wday + 371 - date.tm_yday - 2) % 7 <= 2) { + val++; + } + if (!val) { + val = 52; + var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7; + if (dec31 == 4 || dec31 == 5 && isLeapYear(date.tm_year % 400 - 1)) { + val++; + } + } else if (val == 53) { + var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7; + if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year))) val = 1; + } + return leadingNulls(val, 2); + }, + "%w": function w(date) { + return date.tm_wday; + }, + "%W": function W(date) { + var days = date.tm_yday + 7 - (date.tm_wday + 6) % 7; + return leadingNulls(Math.floor(days / 7), 2); + }, + "%y": function y(date) { + return (date.tm_year + 1900).toString().substring(2); + }, + "%Y": function Y(date) { + return date.tm_year + 1900; + }, + "%z": function z(date) { + var off = date.tm_gmtoff; + var ahead = off >= 0; + off = Math.abs(off) / 60; + off = off / 60 * 100 + off % 60; + return (ahead ? "+" : "-") + String("0000" + off).slice(-4); + }, + "%Z": function Z(date) { + return date.tm_zone; + }, + "%%": function _() { + return "%"; + } + }; + pattern = pattern.replace(/%%/g, "\0\0"); + for (var rule in EXPANSION_RULES_2) { + if (pattern.includes(rule)) { + pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_2[rule](date)); + } + } + pattern = pattern.replace(/\0\0/g, "%"); + var bytes = intArrayFromString(pattern, false); + if (bytes.length > maxsize) { + return 0; + } + writeArrayToMemory(bytes, s); + return bytes.length - 1; +}; +var stringToUTF8OnStack = function stringToUTF8OnStack(str) { + var size = lengthBytesUTF8(str) + 1; + var ret = _stackAlloc(size); + stringToUTF8(str, ret, size); + return ret; +}; +var getCFunc = function getCFunc(ident) { + var func = Module["_" + ident]; + return func; +}; +var ccall = function ccall(ident, returnType, argTypes, args, opts) { + var toC = { + "string": function string(str) { + var ret = 0; + if (str !== null && str !== undefined && str !== 0) { + ret = stringToUTF8OnStack(str); + } + return ret; + }, + "array": function array(arr) { + var ret = _stackAlloc(arr.length); + writeArrayToMemory(arr, ret); + return ret; + } + }; + function convertReturnValue(ret) { + if (returnType === "string") { + return UTF8ToString(ret); + } + if (returnType === "boolean") return Boolean(ret); + return ret; + } + var func = getCFunc(ident); + var cArgs = []; + var stack = 0; + if (args) { + for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = _stackSave(); + cArgs[i] = converter(args[i]); + } else { + cArgs[i] = args[i]; + } + } + } + var ret = func.apply(void 0, cArgs); + function onDone(ret) { + if (stack !== 0) _stackRestore(stack); + return convertReturnValue(ret); + } + ret = onDone(ret); + return ret; +}; +function jsStackTrace() { + return new Error().stack.toString(); +} +function stackTrace() { + var js = jsStackTrace(); + if (Module["extraStackTrace"]) js += "\n" + Module["extraStackTrace"](); + return js; +} +FS.createPreloadedFile = FS_createPreloadedFile; +FS.staticInit(); +Module["requestFullscreen"] = Browser.requestFullscreen; +Module["requestAnimationFrame"] = Browser.requestAnimationFrame; +Module["setCanvasSize"] = Browser.setCanvasSize; +Module["pauseMainLoop"] = Browser.mainLoop.pause; +Module["resumeMainLoop"] = Browser.mainLoop.resume; +Module["getUserMedia"] = Browser.getUserMedia; +Module["createContext"] = Browser.createContext; +var preloadedImages = {}; +var preloadedAudios = {}; +var GLctx; +for (var i = 0; i < 32; ++i) tempFixedLengthArray.push(new Array(i)); +var miniTempWebGLFloatBuffersStorage = new Float32Array(288); +for (var i = 0; i < 288; ++i) { + miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i + 1); +} +var miniTempWebGLIntBuffersStorage = new Int32Array(288); +for (var i = 0; i < 288; ++i) { + miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i + 1); +} +var wasmImports = { + b: ___assert_fail, + Ph: ___syscall__newselect, + Oh: ___syscall_accept4, + Nh: ___syscall_bind, + Mh: ___syscall_connect, + Lh: ___syscall_dup3, + g: ___syscall_fcntl64, + Kh: ___syscall_getpeername, + Jh: ___syscall_getsockname, + aa: ___syscall_getsockopt, + Ih: ___syscall_ioctl, + Hh: ___syscall_listen, + Gh: ___syscall_mkdirat, + $: ___syscall_openat, + Fh: ___syscall_poll, + Eh: ___syscall_readlinkat, + Dh: ___syscall_recvfrom, + Ch: ___syscall_renameat, + Bh: ___syscall_rmdir, + Ah: ___syscall_sendto, + va: ___syscall_socket, + zh: ___syscall_stat64, + _: ___syscall_unlinkat, + wh: __emscripten_get_now_is_monotonic, + vh: __emscripten_lookup_name, + uh: __emscripten_system, + th: __emscripten_throw_longjmp, + Ba: __gmtime_js, + Aa: __localtime_js, + za: __mktime_js, + sh: __tzset_js, + F: _abort, + rh: _dmDeviceJSFreeBufferSlots, + qh: _dmDeviceJSOpen, + ph: _dmDeviceJSQueue, + oh: _dmGetDeviceSampleRate, + nh: _dmScriptHttpRequestAsync, + mh: _dmSysGetApplicationPath, + lh: _dmSysGetUserAgent, + kh: _dmSysGetUserPersistentDataRoot, + jh: _dmSysGetUserPreferredLanguage, + ih: _dmSysOpenURL, + E: _emscripten_asm_const_int, + hh: _emscripten_cancel_main_loop, + D: _emscripten_date_now, + gh: _emscripten_get_heap_max, + ta: _emscripten_get_now, + fh: _emscripten_glActiveTexture, + eh: _emscripten_glAttachShader, + dh: _emscripten_glBeginQuery, + ch: _emscripten_glBeginQueryEXT, + bh: _emscripten_glBeginTransformFeedback, + ah: _emscripten_glBindAttribLocation, + $g: _emscripten_glBindBuffer, + _g: _emscripten_glBindBufferBase, + Zg: _emscripten_glBindBufferRange, + Yg: _emscripten_glBindFramebuffer, + Xg: _emscripten_glBindRenderbuffer, + Wg: _emscripten_glBindSampler, + Vg: _emscripten_glBindTexture, + Ug: _emscripten_glBindTransformFeedback, + Tg: _emscripten_glBindVertexArray, + Sg: _emscripten_glBindVertexArrayOES, + Rg: _emscripten_glBlendColor, + Qg: _emscripten_glBlendEquation, + Pg: _emscripten_glBlendEquationSeparate, + Og: _emscripten_glBlendFunc, + Ng: _emscripten_glBlendFuncSeparate, + Mg: _emscripten_glBlitFramebuffer, + Lg: _emscripten_glBufferData, + Kg: _emscripten_glBufferSubData, + Jg: _emscripten_glCheckFramebufferStatus, + Ig: _emscripten_glClear, + Hg: _emscripten_glClearBufferfi, + Gg: _emscripten_glClearBufferfv, + Fg: _emscripten_glClearBufferiv, + Eg: _emscripten_glClearBufferuiv, + Dg: _emscripten_glClearColor, + Cg: _emscripten_glClearDepthf, + Bg: _emscripten_glClearStencil, + Ag: _emscripten_glClientWaitSync, + zg: _emscripten_glColorMask, + yg: _emscripten_glCompileShader, + xg: _emscripten_glCompressedTexImage2D, + wg: _emscripten_glCompressedTexImage3D, + vg: _emscripten_glCompressedTexSubImage2D, + ug: _emscripten_glCompressedTexSubImage3D, + tg: _emscripten_glCopyBufferSubData, + sg: _emscripten_glCopyTexImage2D, + rg: _emscripten_glCopyTexSubImage2D, + qg: _emscripten_glCopyTexSubImage3D, + pg: _emscripten_glCreateProgram, + og: _emscripten_glCreateShader, + ng: _emscripten_glCullFace, + mg: _emscripten_glDeleteBuffers, + lg: _emscripten_glDeleteFramebuffers, + kg: _emscripten_glDeleteProgram, + jg: _emscripten_glDeleteQueries, + ig: _emscripten_glDeleteQueriesEXT, + hg: _emscripten_glDeleteRenderbuffers, + gg: _emscripten_glDeleteSamplers, + fg: _emscripten_glDeleteShader, + eg: _emscripten_glDeleteSync, + dg: _emscripten_glDeleteTextures, + cg: _emscripten_glDeleteTransformFeedbacks, + bg: _emscripten_glDeleteVertexArrays, + ag: _emscripten_glDeleteVertexArraysOES, + $f: _emscripten_glDepthFunc, + _f: _emscripten_glDepthMask, + Zf: _emscripten_glDepthRangef, + Yf: _emscripten_glDetachShader, + Xf: _emscripten_glDisable, + Wf: _emscripten_glDisableVertexAttribArray, + Vf: _emscripten_glDrawArrays, + Uf: _emscripten_glDrawArraysInstanced, + Tf: _emscripten_glDrawArraysInstancedANGLE, + Sf: _emscripten_glDrawArraysInstancedARB, + Rf: _emscripten_glDrawArraysInstancedEXT, + Qf: _emscripten_glDrawArraysInstancedNV, + Pf: _emscripten_glDrawBuffers, + Of: _emscripten_glDrawBuffersEXT, + Nf: _emscripten_glDrawBuffersWEBGL, + Mf: _emscripten_glDrawElements, + Lf: _emscripten_glDrawElementsInstanced, + Kf: _emscripten_glDrawElementsInstancedANGLE, + Jf: _emscripten_glDrawElementsInstancedARB, + If: _emscripten_glDrawElementsInstancedEXT, + Hf: _emscripten_glDrawElementsInstancedNV, + Gf: _emscripten_glDrawRangeElements, + Ff: _emscripten_glEnable, + Ef: _emscripten_glEnableVertexAttribArray, + Df: _emscripten_glEndQuery, + Cf: _emscripten_glEndQueryEXT, + Bf: _emscripten_glEndTransformFeedback, + Af: _emscripten_glFenceSync, + zf: _emscripten_glFinish, + yf: _emscripten_glFlush, + xf: _emscripten_glFramebufferRenderbuffer, + wf: _emscripten_glFramebufferTexture2D, + vf: _emscripten_glFramebufferTextureLayer, + uf: _emscripten_glFrontFace, + tf: _emscripten_glGenBuffers, + sf: _emscripten_glGenFramebuffers, + rf: _emscripten_glGenQueries, + qf: _emscripten_glGenQueriesEXT, + pf: _emscripten_glGenRenderbuffers, + of: _emscripten_glGenSamplers, + nf: _emscripten_glGenTextures, + mf: _emscripten_glGenTransformFeedbacks, + lf: _emscripten_glGenVertexArrays, + kf: _emscripten_glGenVertexArraysOES, + jf: _emscripten_glGenerateMipmap, + hf: _emscripten_glGetActiveAttrib, + gf: _emscripten_glGetActiveUniform, + ff: _emscripten_glGetActiveUniformBlockName, + ef: _emscripten_glGetActiveUniformBlockiv, + df: _emscripten_glGetActiveUniformsiv, + cf: _emscripten_glGetAttachedShaders, + bf: _emscripten_glGetAttribLocation, + af: _emscripten_glGetBooleanv, + $e: _emscripten_glGetBufferParameteri64v, + _e: _emscripten_glGetBufferParameteriv, + Ze: _emscripten_glGetError, + Ye: _emscripten_glGetFloatv, + Xe: _emscripten_glGetFragDataLocation, + We: _emscripten_glGetFramebufferAttachmentParameteriv, + Ve: _emscripten_glGetInteger64i_v, + Ue: _emscripten_glGetInteger64v, + Te: _emscripten_glGetIntegeri_v, + Se: _emscripten_glGetIntegerv, + Re: _emscripten_glGetInternalformativ, + Qe: _emscripten_glGetProgramBinary, + Pe: _emscripten_glGetProgramInfoLog, + Oe: _emscripten_glGetProgramiv, + Ne: _emscripten_glGetQueryObjecti64vEXT, + Me: _emscripten_glGetQueryObjectivEXT, + Le: _emscripten_glGetQueryObjectui64vEXT, + Ke: _emscripten_glGetQueryObjectuiv, + Je: _emscripten_glGetQueryObjectuivEXT, + Ie: _emscripten_glGetQueryiv, + He: _emscripten_glGetQueryivEXT, + Ge: _emscripten_glGetRenderbufferParameteriv, + Fe: _emscripten_glGetSamplerParameterfv, + Ee: _emscripten_glGetSamplerParameteriv, + De: _emscripten_glGetShaderInfoLog, + Ce: _emscripten_glGetShaderPrecisionFormat, + Be: _emscripten_glGetShaderSource, + Ae: _emscripten_glGetShaderiv, + ze: _emscripten_glGetString, + ye: _emscripten_glGetStringi, + xe: _emscripten_glGetSynciv, + we: _emscripten_glGetTexParameterfv, + ve: _emscripten_glGetTexParameteriv, + ue: _emscripten_glGetTransformFeedbackVarying, + te: _emscripten_glGetUniformBlockIndex, + se: _emscripten_glGetUniformIndices, + re: _emscripten_glGetUniformLocation, + qe: _emscripten_glGetUniformfv, + pe: _emscripten_glGetUniformiv, + oe: _emscripten_glGetUniformuiv, + ne: _emscripten_glGetVertexAttribIiv, + me: _emscripten_glGetVertexAttribIuiv, + le: _emscripten_glGetVertexAttribPointerv, + ke: _emscripten_glGetVertexAttribfv, + je: _emscripten_glGetVertexAttribiv, + ie: _emscripten_glHint, + he: _emscripten_glInvalidateFramebuffer, + ge: _emscripten_glInvalidateSubFramebuffer, + fe: _emscripten_glIsBuffer, + ee: _emscripten_glIsEnabled, + de: _emscripten_glIsFramebuffer, + ce: _emscripten_glIsProgram, + be: _emscripten_glIsQuery, + ae: _emscripten_glIsQueryEXT, + $d: _emscripten_glIsRenderbuffer, + _d: _emscripten_glIsSampler, + Zd: _emscripten_glIsShader, + Yd: _emscripten_glIsSync, + Xd: _emscripten_glIsTexture, + Wd: _emscripten_glIsTransformFeedback, + Vd: _emscripten_glIsVertexArray, + Ud: _emscripten_glIsVertexArrayOES, + Td: _emscripten_glLineWidth, + Sd: _emscripten_glLinkProgram, + Rd: _emscripten_glPauseTransformFeedback, + Qd: _emscripten_glPixelStorei, + Pd: _emscripten_glPolygonOffset, + Od: _emscripten_glProgramBinary, + Nd: _emscripten_glProgramParameteri, + Md: _emscripten_glQueryCounterEXT, + Ld: _emscripten_glReadBuffer, + Kd: _emscripten_glReadPixels, + Jd: _emscripten_glReleaseShaderCompiler, + Id: _emscripten_glRenderbufferStorage, + Hd: _emscripten_glRenderbufferStorageMultisample, + Gd: _emscripten_glResumeTransformFeedback, + Fd: _emscripten_glSampleCoverage, + Ed: _emscripten_glSamplerParameterf, + Dd: _emscripten_glSamplerParameterfv, + Cd: _emscripten_glSamplerParameteri, + Bd: _emscripten_glSamplerParameteriv, + Ad: _emscripten_glScissor, + zd: _emscripten_glShaderBinary, + yd: _emscripten_glShaderSource, + xd: _emscripten_glStencilFunc, + wd: _emscripten_glStencilFuncSeparate, + vd: _emscripten_glStencilMask, + ud: _emscripten_glStencilMaskSeparate, + td: _emscripten_glStencilOp, + sd: _emscripten_glStencilOpSeparate, + rd: _emscripten_glTexImage2D, + qd: _emscripten_glTexImage3D, + pd: _emscripten_glTexParameterf, + od: _emscripten_glTexParameterfv, + nd: _emscripten_glTexParameteri, + md: _emscripten_glTexParameteriv, + ld: _emscripten_glTexStorage2D, + kd: _emscripten_glTexStorage3D, + jd: _emscripten_glTexSubImage2D, + id: _emscripten_glTexSubImage3D, + hd: _emscripten_glTransformFeedbackVaryings, + gd: _emscripten_glUniform1f, + fd: _emscripten_glUniform1fv, + ed: _emscripten_glUniform1i, + dd: _emscripten_glUniform1iv, + cd: _emscripten_glUniform1ui, + bd: _emscripten_glUniform1uiv, + ad: _emscripten_glUniform2f, + $c: _emscripten_glUniform2fv, + _c: _emscripten_glUniform2i, + Zc: _emscripten_glUniform2iv, + Yc: _emscripten_glUniform2ui, + Xc: _emscripten_glUniform2uiv, + Wc: _emscripten_glUniform3f, + Vc: _emscripten_glUniform3fv, + Uc: _emscripten_glUniform3i, + Tc: _emscripten_glUniform3iv, + Sc: _emscripten_glUniform3ui, + Rc: _emscripten_glUniform3uiv, + Qc: _emscripten_glUniform4f, + Pc: _emscripten_glUniform4fv, + Oc: _emscripten_glUniform4i, + Nc: _emscripten_glUniform4iv, + Mc: _emscripten_glUniform4ui, + Lc: _emscripten_glUniform4uiv, + Kc: _emscripten_glUniformBlockBinding, + Jc: _emscripten_glUniformMatrix2fv, + Ic: _emscripten_glUniformMatrix2x3fv, + Hc: _emscripten_glUniformMatrix2x4fv, + Gc: _emscripten_glUniformMatrix3fv, + Fc: _emscripten_glUniformMatrix3x2fv, + Ec: _emscripten_glUniformMatrix3x4fv, + Dc: _emscripten_glUniformMatrix4fv, + Cc: _emscripten_glUniformMatrix4x2fv, + Bc: _emscripten_glUniformMatrix4x3fv, + Ac: _emscripten_glUseProgram, + zc: _emscripten_glValidateProgram, + yc: _emscripten_glVertexAttrib1f, + xc: _emscripten_glVertexAttrib1fv, + wc: _emscripten_glVertexAttrib2f, + vc: _emscripten_glVertexAttrib2fv, + uc: _emscripten_glVertexAttrib3f, + tc: _emscripten_glVertexAttrib3fv, + sc: _emscripten_glVertexAttrib4f, + rc: _emscripten_glVertexAttrib4fv, + qc: _emscripten_glVertexAttribDivisor, + pc: _emscripten_glVertexAttribDivisorANGLE, + oc: _emscripten_glVertexAttribDivisorARB, + nc: _emscripten_glVertexAttribDivisorEXT, + mc: _emscripten_glVertexAttribDivisorNV, + lc: _emscripten_glVertexAttribI4i, + kc: _emscripten_glVertexAttribI4iv, + jc: _emscripten_glVertexAttribI4ui, + ic: _emscripten_glVertexAttribI4uiv, + hc: _emscripten_glVertexAttribIPointer, + gc: _emscripten_glVertexAttribPointer, + fc: _emscripten_glViewport, + ec: _emscripten_glWaitSync, + dc: _emscripten_memcpy_js, + cc: _emscripten_pause_main_loop, + bc: _emscripten_resize_heap, + Y: _emscripten_set_main_loop_arg, + d: _emscripten_webgl_enable_extension, + ac: _emscripten_webgl_get_current_context, + yh: _environ_get, + xh: _environ_sizes_get, + X: _exit, + G: _fd_close, + ua: _fd_read, + Ca: _fd_seek, + Z: _fd_write, + t: _getaddrinfo, + o: _getnameinfo, + sa: _glActiveTexture, + W: _glAttachShader, + e: _glBindBuffer, + ra: _glBindBufferBase, + V: _glBindFramebuffer, + s: _glBindRenderbuffer, + n: _glBindTexture, + $b: _glBlendFunc, + Q: _glBufferData, + qa: _glBufferSubData, + P: _glCheckFramebufferStatus, + _b: _glClear, + Zb: _glClearColor, + Yb: _glClearDepthf, + Xb: _glClearStencil, + Wb: _glColorMask, + C: _glCompileShader, + m: _glCompressedTexImage2D, + pa: _glCompressedTexImage3D, + l: _glCompressedTexSubImage2D, + Vb: _glCompressedTexSubImage3D, + oa: _glCreateProgram, + O: _glCreateShader, + Ub: _glCullFace, + na: _glDeleteBuffers, + Tb: _glDeleteFramebuffers, + U: _glDeleteProgram, + k: _glDeleteRenderbuffers, + B: _glDeleteShader, + ma: _glDeleteTextures, + Sb: _glDepthFunc, + Rb: _glDepthMask, + Qb: _glDisable, + Pb: _glDisableVertexAttribArray, + Ob: _glDrawArrays, + Nb: _glDrawBuffers, + Mb: _glDrawElements, + Lb: _glEnable, + Kb: _glEnableVertexAttribArray, + Jb: _glFlush, + Ib: _glFramebufferRenderbuffer, + Hb: _glFramebufferTexture2D, + Gb: _glFrontFace, + T: _glGenBuffers, + Fb: _glGenFramebuffers, + A: _glGenRenderbuffers, + la: _glGenTextures, + Eb: _glGetActiveAttrib, + Db: _glGetActiveUniform, + N: _glGetActiveUniformBlockiv, + ka: _glGetActiveUniformsiv, + Cb: _glGetAttribLocation, + c: _glGetError, + Bb: _glGetFloatv, + z: _glGetIntegerv, + ja: _glGetProgramInfoLog, + r: _glGetProgramiv, + ia: _glGetShaderInfoLog, + M: _glGetShaderiv, + y: _glGetString, + Ab: _glGetUniformBlockIndex, + zb: _glGetUniformLocation, + L: _glLinkProgram, + ha: _glPixelStorei, + yb: _glPolygonOffset, + xb: _glReadPixels, + S: _glRenderbufferStorage, + wb: _glScissor, + x: _glShaderSource, + vb: _glStencilFunc, + ub: _glStencilFuncSeparate, + tb: _glStencilMask, + sb: _glStencilOp, + rb: _glStencilOpSeparate, + i: _glTexImage2D, + qb: _glTexImage3D, + pb: _glTexParameterf, + K: _glTexParameteri, + j: _glTexSubImage2D, + ob: _glTexSubImage3D, + nb: _glUniform1i, + mb: _glUniform4fv, + lb: _glUniformBlockBinding, + kb: _glUniformMatrix4fv, + ga: _glUseProgram, + jb: _glVertexAttribPointer, + ib: _glViewport, + hb: _glfwAccelerometerEnable, + gb: _glfwCloseWindow, + fb: _glfwDisable, + eb: _glfwEnable, + db: _glfwGetAcceleration, + fa: _glfwGetDefaultFramebuffer, + cb: _glfwGetDisplayScaleFactor, + bb: _glfwGetJoystickButtons, + ab: _glfwGetJoystickDeviceId, + $a: _glfwGetJoystickHats, + J: _glfwGetJoystickParam, + _a: _glfwGetJoystickPos, + Za: _glfwGetKey, + h: _glfwGetMouseButton, + Ya: _glfwGetMouseLocked, + Xa: _glfwGetMousePos, + Wa: _glfwGetMouseWheel, + Va: _glfwGetWindowParam, + Ua: _glfwGetWindowRefreshRate, + ea: _glfwGetWindowSize, + Ta: _glfwIconifyWindow, + Sa: _glfwInitJS, + da: _glfwOpenWindow, + w: _glfwOpenWindowHint, + Ra: _glfwPollEvents, + Qa: _glfwResetKeyboard, + Pa: _glfwSetCharCallback, + Oa: _glfwSetDeviceChangedCallback, + Na: _glfwSetGamepadCallback, + Ma: _glfwSetMarkedTextCallback, + La: _glfwSetTouchCallback, + Ka: _glfwSetWindowBackgroundColor, + Ja: _glfwSetWindowCloseCallback, + Ia: _glfwSetWindowFocusCallback, + Ha: _glfwSetWindowIconifyCallback, + Ga: _glfwSetWindowSize, + Fa: _glfwSetWindowSizeCallback, + I: _glfwShowKeyboard, + Ea: _glfwSwapBuffers, + ca: _glfwSwapInterval, + Da: _glfwTerminate, + v: invoke_ii, + q: invoke_iii, + R: invoke_iiii, + ya: invoke_ji, + xa: invoke_jii, + H: invoke_vi, + u: invoke_vii, + ba: invoke_viii, + f: invoke_viiii, + p: invoke_viiiii, + a: wasmMemory, + wa: _strftime +}; +var wasmExports = createWasm(); +var _wasm_call_ctors = function ___wasm_call_ctors() { + return (_wasm_call_ctors = wasmExports["Qh"])(); +}; +var _main = Module["_main"] = function (a0, a1) { + return (_main = Module["_main"] = wasmExports["Rh"])(a0, a1); +}; +var _dmExportedSymbols = Module["_dmExportedSymbols"] = function () { + return (_dmExportedSymbols = Module["_dmExportedSymbols"] = wasmExports["Sh"])(); +}; +var _malloc = Module["_malloc"] = function (a0) { + return (_malloc = Module["_malloc"] = wasmExports["Th"])(a0); +}; +var _free = Module["_free"] = function (a0) { + return (_free = Module["_free"] = wasmExports["Uh"])(a0); +}; +var _htonl2 = function _htonl(a0) { + return (_htonl2 = wasmExports["Wh"])(a0); +}; +var _dmScript_Html5ReportOperationSuccess = Module["_dmScript_Html5ReportOperationSuccess"] = function (a0) { + return (_dmScript_Html5ReportOperationSuccess = Module["_dmScript_Html5ReportOperationSuccess"] = wasmExports["Xh"])(a0); +}; +var _dmScript_RunInteractionCallback = Module["_dmScript_RunInteractionCallback"] = function () { + return (_dmScript_RunInteractionCallback = Module["_dmScript_RunInteractionCallback"] = wasmExports["Yh"])(); +}; +var _setTempRet = function setTempRet0(a0) { + return (_setTempRet = wasmExports["Zh"])(a0); +}; +var _htons2 = function _htons(a0) { + return (_htons2 = wasmExports["_h"])(a0); +}; +var _ntohs2 = function _ntohs(a0) { + return (_ntohs2 = wasmExports["$h"])(a0); +}; +var _JSWriteDump = Module["_JSWriteDump"] = function (a0) { + return (_JSWriteDump = Module["_JSWriteDump"] = wasmExports["ai"])(a0); +}; +var _setThrew2 = function _setThrew(a0, a1) { + return (_setThrew2 = wasmExports["bi"])(a0, a1); +}; +var _stackSave = function stackSave() { + return (_stackSave = wasmExports["ci"])(); +}; +var _stackRestore = function stackRestore(a0) { + return (_stackRestore = wasmExports["di"])(a0); +}; +var _stackAlloc = function stackAlloc(a0) { + return (_stackAlloc = wasmExports["ei"])(a0); +}; +var dynCall_ji = Module["dynCall_ji"] = function (a0, a1) { + return (dynCall_ji = Module["dynCall_ji"] = wasmExports["fi"])(a0, a1); +}; +var dynCall_jii = Module["dynCall_jii"] = function (a0, a1, a2) { + return (dynCall_jii = Module["dynCall_jii"] = wasmExports["gi"])(a0, a1, a2); +}; +function invoke_vii(index, a1, a2) { + var sp = _stackSave(); + try { + getWasmTableEntry(index)(a1, a2); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_ii(index, a1) { + var sp = _stackSave(); + try { + return getWasmTableEntry(index)(a1); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_viiiii(index, a1, a2, a3, a4, a5) { + var sp = _stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3, a4, a5); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_viiii(index, a1, a2, a3, a4) { + var sp = _stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3, a4); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_viii(index, a1, a2, a3) { + var sp = _stackSave(); + try { + getWasmTableEntry(index)(a1, a2, a3); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_iiii(index, a1, a2, a3) { + var sp = _stackSave(); + try { + return getWasmTableEntry(index)(a1, a2, a3); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_iii(index, a1, a2) { + var sp = _stackSave(); + try { + return getWasmTableEntry(index)(a1, a2); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_vi(index, a1) { + var sp = _stackSave(); + try { + getWasmTableEntry(index)(a1); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_ji(index, a1) { + var sp = _stackSave(); + try { + return dynCall_ji(index, a1); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +function invoke_jii(index, a1, a2) { + var sp = _stackSave(); + try { + return dynCall_jii(index, a1, a2); + } catch (e) { + _stackRestore(sp); + if (e !== e + 0) throw e; + _setThrew2(1, 0); + } +} +Module["callMain"] = callMain; +Module["ccall"] = ccall; +Module["UTF8ToString"] = UTF8ToString; +Module["stringToNewUTF8"] = stringToNewUTF8; +Module["stackTrace"] = stackTrace; +var calledRun; +dependenciesFulfilled = function runCaller() { + if (!calledRun) run(); + if (!calledRun) dependenciesFulfilled = runCaller; +}; +function callMain() { + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var entryFunction = _main; + args.unshift(thisProgram); + var argc = args.length; + var argv = _stackAlloc((argc + 1) * 4); + var argv_ptr = argv; + args.forEach(function (arg) { + HEAPU32[argv_ptr >> 2] = stringToUTF8OnStack(arg); + argv_ptr += 4; + }); + HEAPU32[argv_ptr >> 2] = 0; + try { + var ret = entryFunction(argc, argv); + exitJS(ret, true); + return ret; + } catch (e) { + return handleException(e); + } +} +function run() { + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : arguments_; + if (runDependencies > 0) { + return; + } + preRun(); + if (runDependencies > 0) { + return; + } + function doRun() { + if (calledRun) return; + calledRun = true; + Module["calledRun"] = true; + if (ABORT) return; + initRuntime(); + preMain(); + if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); + if (shouldRunNow) callMain(args); + postRun(); + } + if (Module["setStatus"]) { + Module["setStatus"]("Running..."); + setTimeout(function () { + setTimeout(function () { + Module["setStatus"](""); + }, 1); + doRun(); + }, 1); + } else { + doRun(); + } +} +if (Module["preInit"]) { + if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; + while (Module["preInit"].length > 0) { + Module["preInit"].pop()(); + } +} +var shouldRunNow = true; +if (Module["noInitialRun"]) shouldRunNow = false; +run(); diff --git a/docs/druid/index.html b/docs/druid/index.html index bf51272d..4b59f5b0 100644 --- a/docs/druid/index.html +++ b/docs/druid/index.html @@ -7,7 +7,7 @@ - druid 0.11.718 + Druid 1.0.0 -

+
+ +
- +
- - diff --git a/docs/index.html b/docs/index.html index fac221e0..33a43b45 100644 --- a/docs/index.html +++ b/docs/index.html @@ -40,7 +40,6 @@

Modules

  • StaticGrid
  • Text
  • BaseComponent
  • -
  • PinKnob
  • RichInput
  • RichText
  • Druid
  • @@ -109,10 +108,6 @@

    Modules

    BaseComponent Basic class for all Druid components. - - PinKnob - Druid pin knob custom component. - RichInput Druid Rich Input custom component. diff --git a/docs/modules/BackHandler.html b/docs/modules/BackHandler.html index df93b56c..ce9e0459 100644 --- a/docs/modules/BackHandler.html +++ b/docs/modules/BackHandler.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/BaseComponent.html b/docs/modules/BaseComponent.html index 4d4d649c..5a31811d 100644 --- a/docs/modules/BaseComponent.html +++ b/docs/modules/BaseComponent.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Blocker.html b/docs/modules/Blocker.html index 00ed7cde..34f80291 100644 --- a/docs/modules/Blocker.html +++ b/docs/modules/Blocker.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Button.html b/docs/modules/Button.html index a451bac0..077b35bb 100644 --- a/docs/modules/Button.html +++ b/docs/modules/Button.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Checkbox.html b/docs/modules/Checkbox.html index 57e1d532..fd0aef12 100644 --- a/docs/modules/Checkbox.html +++ b/docs/modules/Checkbox.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/CheckboxGroup.html b/docs/modules/CheckboxGroup.html index 3a3914b1..5ff8ec1c 100644 --- a/docs/modules/CheckboxGroup.html +++ b/docs/modules/CheckboxGroup.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/DataList.html b/docs/modules/DataList.html index 68df37ad..bcc72b9c 100644 --- a/docs/modules/DataList.html +++ b/docs/modules/DataList.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -358,7 +357,7 @@

    Parameters:

    The Scroll instance for Data List component
  • grid - StaticGrid or DynamicGrid + StaticGrid The StaticGrid or DynamicGrid instance for Data List component
  • create_function @@ -552,7 +551,7 @@

    Fields

    diff --git a/docs/modules/Drag.html b/docs/modules/Drag.html index f61f06cd..3620b38e 100644 --- a/docs/modules/Drag.html +++ b/docs/modules/Drag.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Druid.html b/docs/modules/Druid.html index cd3aad30..1857c9f9 100644 --- a/docs/modules/Druid.html +++ b/docs/modules/Druid.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/DruidEvent.html b/docs/modules/DruidEvent.html index 5ed980d2..2c68f105 100644 --- a/docs/modules/DruidEvent.html +++ b/docs/modules/DruidEvent.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/DruidInstance.html b/docs/modules/DruidInstance.html index 5007e3c9..0e1e3fed 100644 --- a/docs/modules/DruidInstance.html +++ b/docs/modules/DruidInstance.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -493,7 +492,7 @@

    Parameters:

    The Scroll instance for Data List component
  • druid_grid - StaticGrid or DynamicGrid + StaticGrid The StaticGrid or DynamicGrid instance for Data List component
  • create_function diff --git a/docs/modules/DynamicGrid.html b/docs/modules/DynamicGrid.html index 52d84583..aa4d6952 100644 --- a/docs/modules/DynamicGrid.html +++ b/docs/modules/DynamicGrid.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Helper.html b/docs/modules/Helper.html index f465d57f..d1b72919 100644 --- a/docs/modules/Helper.html +++ b/docs/modules/Helper.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Hotkey.html b/docs/modules/Hotkey.html index 68e40151..7691f115 100644 --- a/docs/modules/Hotkey.html +++ b/docs/modules/Hotkey.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Hover.html b/docs/modules/Hover.html index daaa26db..3fff30dd 100644 --- a/docs/modules/Hover.html +++ b/docs/modules/Hover.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Input.html b/docs/modules/Input.html index 86eac1a8..468bca69 100644 --- a/docs/modules/Input.html +++ b/docs/modules/Input.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -605,10 +604,6 @@

    Fields:

    function (self, button_node) Callback on wrong user input -
  • button_style - table - Custom button style for input node -
  • diff --git a/docs/modules/LangText.html b/docs/modules/LangText.html index 0d02aba3..176a98f3 100644 --- a/docs/modules/LangText.html +++ b/docs/modules/LangText.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Layout.html b/docs/modules/Layout.html index c8f41408..ed078b49 100644 --- a/docs/modules/Layout.html +++ b/docs/modules/Layout.html @@ -56,7 +56,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Progress.html b/docs/modules/Progress.html index cec89887..466e847c 100644 --- a/docs/modules/Progress.html +++ b/docs/modules/Progress.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/RadioGroup.html b/docs/modules/RadioGroup.html index 7445394f..41f2b107 100644 --- a/docs/modules/RadioGroup.html +++ b/docs/modules/RadioGroup.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/RichInput.html b/docs/modules/RichInput.html index 0c709361..3199a3d6 100644 --- a/docs/modules/RichInput.html +++ b/docs/modules/RichInput.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -118,6 +117,18 @@

    Fields

    On input field text change to empty string callback(self, input_text) + cursor_position + On input field text change to empty string callback(self, input_text) + + + cursor_text + On input field text change to empty string callback(self, input_text) + + + drag + On input field text change to empty string callback(self, input_text) + + druid The component druid instance @@ -126,13 +137,25 @@

    Fields

    On input field text change callback(self, input_text) + input_text + On input field text change to empty string callback(self, input_text) + + placeholder On input field text change to max length string callback(self, input_text) + placeholder + On input field text change to empty string callback(self, input_text) + + root Root node + + text_position + On input field text change to empty string callback(self, input_text) +
    @@ -356,6 +379,66 @@

    Fields

    + +
    + + cursor_position +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • cursor_position + vector3 + +
    • +
    + + + + + +
    +
    + + cursor_text +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • cursor_text + node + +
    • +
    + + + + + +
    +
    + + drag +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • drag + druid.drag + +
    • +
    + + + + +
    @@ -396,6 +479,26 @@

    Fields

    + +
    + + input_text +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • input_text + druid.text + +
    • +
    + + + + +
    @@ -416,6 +519,26 @@

    Fields

    + +
    + + placeholder +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • placeholder + druid.text + +
    • +
    + + + + +
    @@ -436,6 +559,26 @@

    Fields

    + +
    + + text_position +
    +
    + On input field text change to empty string callback(self, input_text) + + +
      +
    • text_position + vector3 + +
    • +
    + + + + +
    diff --git a/docs/modules/RichText.html b/docs/modules/RichText.html index ec185a87..766141c9 100644 --- a/docs/modules/RichText.html +++ b/docs/modules/RichText.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -184,10 +183,6 @@

    Fields

    The component druid instance - icon_prefab - The icon prefab node - - root The root node of the Rich Text @@ -513,26 +508,6 @@

    Fields

    - -
    - - icon_prefab -
    -
    - The icon prefab node - - -
      -
    • icon_prefab - node - -
    • -
    - - - - -
    diff --git a/docs/modules/Scroll.html b/docs/modules/Scroll.html index dcf5180b..a50317d1 100644 --- a/docs/modules/Scroll.html +++ b/docs/modules/Scroll.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • @@ -270,7 +269,7 @@

    Parameters:

    Scroll
  • grid - StaticGrid or DynamicGrid + StaticGrid Druid grid component
  • diff --git a/docs/modules/Slider.html b/docs/modules/Slider.html index 94fc9f08..5fa3565d 100644 --- a/docs/modules/Slider.html +++ b/docs/modules/Slider.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/StaticGrid.html b/docs/modules/StaticGrid.html index 076f3bb0..e4fdedec 100644 --- a/docs/modules/StaticGrid.html +++ b/docs/modules/StaticGrid.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Swipe.html b/docs/modules/Swipe.html index da20bb1f..e263a1f1 100644 --- a/docs/modules/Swipe.html +++ b/docs/modules/Swipe.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Text.html b/docs/modules/Text.html index 4f7d1967..af0f7809 100644 --- a/docs/modules/Text.html +++ b/docs/modules/Text.html @@ -58,7 +58,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/docs/modules/Timer.html b/docs/modules/Timer.html index 9dca7a5f..e0ee8cb3 100644 --- a/docs/modules/Timer.html +++ b/docs/modules/Timer.html @@ -57,7 +57,6 @@

    Modules

  • Input
  • LangText
  • Layout
  • -
  • PinKnob
  • Progress
  • RadioGroup
  • RichInput
  • diff --git a/druid/annotations.lua b/druid/annotations.lua index 4c9e4c71..dc08e0d6 100644 --- a/druid/annotations.lua +++ b/druid/annotations.lua @@ -311,7 +311,7 @@ function druid__checkbox_group.set_state(self, indexes, is_instant) end ---@class druid.data_list : druid.base_component ----@field grid druid.static_grid|druid.dynamic_grid The Druid Grid component +---@field grid druid.static_grid The Druid Grid component ---@field last_index number The current last index of visual elements ---@field on_element_add druid.event On DataList visual element created Event callback(self, index, node, instance) ---@field on_element_remove druid.event On DataList visual element created Event callback(self, index) @@ -356,7 +356,7 @@ function druid__data_list.get_index(self, data) end --- The @{DataList} constructor ---@param self druid.data_list @{DataList} ---@param scroll druid.scroll The @{Scroll} instance for Data List component ----@param grid druid.static_grid|druid.dynamic_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component +---@param grid druid.static_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component ---@param create_function function The create function callback(self, data, index, data_list). Function should return (node, [component]) function druid__data_list.init(self, scroll, grid, create_function) end @@ -834,34 +834,6 @@ function druid__lang_text.translate(self, locale_id, a, b, c, d, e, f, g) end local druid__layout = {} ----@class druid.pin_knob : druid.base_component ----@field druid druid_instance The component druid instance ----@field is_drag boolean Is currently under user control ----@field node node The pin node -local druid__pin_knob = {} - ---- The @{PinKnob} constructor ----@param self druid.pin_knob @{PinKnob} ----@param callback function Callback(self, value) on value changed ----@param template string The template string name ----@param nodes table Nodes table from gui.clone_tree -function druid__pin_knob.init(self, callback, template, nodes) end - ---- Set current and min/max angles for component ----@param self druid.pin_knob @{PinKnob} ----@param cur_value number The new value for pin knob ----@param min number The minimum value for pin knob ----@param max number The maximum value for pin knob ----@return druid.pin_knob @{PinKnob} -function druid__pin_knob.set_angle(self, cur_value, min, max) end - ---- Set current and min/max angles for component ----@param self druid.pin_knob @{PinKnob} ----@param value number|nil The spin speed multiplier. Default: 1 ----@return druid.pin_knob @{PinKnob} -function druid__pin_knob.set_friction(self, value) end - - ---@class druid.progress : druid.base_component ---@field key string The progress bar direction. ---@field max_size number Maximum size of progress bar @@ -948,10 +920,16 @@ function druid__radio_group.set_state(self, index, is_instant) end ---@class druid.rich_input ---@field cursor node On input field text change to empty string callback(self, input_text) +---@field cursor_position vector3 On input field text change to empty string callback(self, input_text) +---@field cursor_text node On input field text change to empty string callback(self, input_text) +---@field drag druid.drag On input field text change to empty string callback(self, input_text) ---@field druid druid_instance The component druid instance ---@field input druid.input On input field text change callback(self, input_text) +---@field input_text druid.text On input field text change to empty string callback(self, input_text) ---@field placeholder druid.text On input field text change to max length string callback(self, input_text) +---@field placeholder druid.text On input field text change to empty string callback(self, input_text) ---@field root node Root node +---@field text_position vector3 On input field text change to empty string callback(self, input_text) local druid__rich_input = {} --- Set input field text @@ -995,7 +973,6 @@ function druid__rich_input.set_text(self, text) end ---@class druid.rich_text : druid.base_component ---@field druid druid_instance The component druid instance ----@field icon_prefab node The icon prefab node ---@field root node The root node of the Rich Text ---@field style druid.rich_text.style Component style params. ---@field text_prefab node The text prefab node @@ -1071,7 +1048,7 @@ local druid__scroll = {} --- Bind the grid component (Static or Dynamic) to recalculate scroll size on grid changes ---@param self druid.scroll @{Scroll} ----@param grid druid.static_grid|druid.dynamic_grid Druid grid component +---@param grid druid.static_grid Druid grid component ---@return druid.scroll Current scroll instance function druid__scroll.bind_grid(self, grid) end @@ -1595,7 +1572,7 @@ function druid_instance.new_checkbox_group(self, nodes, callback, click_nodes) e --- Create @{DataList} component ---@param self druid_instance ---@param druid_scroll druid.scroll The Scroll instance for Data List component ----@param druid_grid druid.static_grid|druid.dynamic_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component +---@param druid_grid druid.static_grid The @{StaticGrid} or @{DynamicGrid} instance for Data List component ---@param create_function function The create function callback(self, data, index, data_list). Function should return (node, [component]) ---@return druid.data_list @{DataList} component function druid_instance.new_data_list(self, druid_scroll, druid_grid, create_function) end diff --git a/example/assets/druid.atlas b/example/assets/druid.atlas new file mode 100644 index 00000000..e1cda805 --- /dev/null +++ b/example/assets/druid.atlas @@ -0,0 +1,40 @@ +images { + image: "/example/assets/images/empty.png" +} +images { + image: "/example/assets/images/icon_cross.png" +} +images { + image: "/example/assets/images/pixel.png" +} +images { + image: "/example/assets/images/ui_circle_8.png" +} +images { + image: "/example/assets/images/ui_circle_16.png" +} +images { + image: "/example/assets/images/ui_circle_32.png" +} +images { + image: "/example/assets/images/ui_circle_64.png" +} +images { + image: "/example/assets/images/ui_rounded_top_32.png" +} +images { + image: "/example/assets/images/icon_arrow.png" +} +images { + image: "/example/assets/images/icon_check.png" +} +images { + image: "/example/assets/images/rect_round2_width1.png" +} +images { + image: "/example/assets/images/ui_circle_64_blur_8.png" +} +images { + image: "/example/assets/images/icon_heart.png" +} +extrude_borders: 2 diff --git a/example/assets/druid_logo.atlas b/example/assets/druid_logo.atlas new file mode 100644 index 00000000..7dd2b369 --- /dev/null +++ b/example/assets/druid_logo.atlas @@ -0,0 +1,16 @@ +images { + image: "/example/assets/images/icon_druid.png" +} +images { + image: "/example/assets/images/logo_druid.png" +} +images { + image: "/example/assets/images/sponsor_coffee.png" +} +images { + image: "/example/assets/images/sponsor_github.png" +} +images { + image: "/example/assets/images/sponsor_kofi.png" +} +extrude_borders: 2 diff --git a/example/assets/fonts/Exo2-LightItalic.ttf b/example/assets/fonts/Exo2-LightItalic.ttf deleted file mode 100644 index ecd1459b..00000000 Binary files a/example/assets/fonts/Exo2-LightItalic.ttf and /dev/null differ diff --git a/example/assets/fonts/Exo2-Regular.ttf b/example/assets/fonts/Exo2-Regular.ttf deleted file mode 100644 index 63bc4bb0..00000000 Binary files a/example/assets/fonts/Exo2-Regular.ttf and /dev/null differ diff --git a/example/assets/fonts/Roboto-Bold.ttf b/example/assets/fonts/Roboto-Bold.ttf new file mode 100644 index 00000000..e64db796 Binary files /dev/null and b/example/assets/fonts/Roboto-Bold.ttf differ diff --git a/example/assets/fonts/Roboto-Regular.ttf b/example/assets/fonts/Roboto-Regular.ttf new file mode 100644 index 00000000..2d116d92 Binary files /dev/null and b/example/assets/fonts/Roboto-Regular.ttf differ diff --git a/example/assets/fonts/RobotoCJKSC-Bold.ttf b/example/assets/fonts/RobotoCJKSC-Bold.ttf new file mode 100644 index 00000000..767fec55 Binary files /dev/null and b/example/assets/fonts/RobotoCJKSC-Bold.ttf differ diff --git a/example/assets/fonts/RobotoCJKSC-Regular.ttf b/example/assets/fonts/RobotoCJKSC-Regular.ttf new file mode 100644 index 00000000..b9d12bac Binary files /dev/null and b/example/assets/fonts/RobotoCJKSC-Regular.ttf differ diff --git a/example/assets/fonts/exo2.ttf b/example/assets/fonts/exo2.ttf deleted file mode 100755 index 49f0b491..00000000 Binary files a/example/assets/fonts/exo2.ttf and /dev/null differ diff --git a/example/assets/fonts/game.font b/example/assets/fonts/game.font deleted file mode 100644 index 461d4f62..00000000 --- a/example/assets/fonts/game.font +++ /dev/null @@ -1,17 +0,0 @@ -font: "/example/assets/fonts/exo2.ttf" -material: "/builtins/fonts/font-df.material" -size: 40 -antialias: 1 -alpha: 1.0 -outline_alpha: 1.0 -outline_width: 2.0 -shadow_alpha: 1.0 -shadow_blur: 0 -shadow_x: 3.0 -shadow_y: -4.0 -extra_characters: "\342\204\226%;" -output_format: TYPE_DISTANCE_FIELD -all_chars: true -cache_width: 0 -cache_height: 0 -render_mode: MODE_MULTI_LAYER diff --git a/example/assets/fonts/game_thin.font b/example/assets/fonts/game_thin.font deleted file mode 100644 index dfd0834e..00000000 --- a/example/assets/fonts/game_thin.font +++ /dev/null @@ -1,17 +0,0 @@ -font: "/example/assets/fonts/Exo2-Regular.ttf" -material: "/builtins/fonts/font-df.material" -size: 40 -antialias: 1 -alpha: 1.0 -outline_alpha: 0.0 -outline_width: 0.0 -shadow_alpha: 0.0 -shadow_blur: 0 -shadow_x: 0.0 -shadow_y: 0.0 -extra_characters: "" -output_format: TYPE_DISTANCE_FIELD -all_chars: false -cache_width: 0 -cache_height: 0 -render_mode: MODE_MULTI_LAYER diff --git a/example/assets/fonts/game_thin_italic.font b/example/assets/fonts/game_thin_italic.font deleted file mode 100644 index 986ff688..00000000 --- a/example/assets/fonts/game_thin_italic.font +++ /dev/null @@ -1,17 +0,0 @@ -font: "/example/assets/fonts/Exo2-LightItalic.ttf" -material: "/builtins/fonts/font-df.material" -size: 40 -antialias: 1 -alpha: 1.0 -outline_alpha: 0.0 -outline_width: 0.0 -shadow_alpha: 0.0 -shadow_blur: 0 -shadow_x: 0.0 -shadow_y: 0.0 -extra_characters: "" -output_format: TYPE_DISTANCE_FIELD -all_chars: false -cache_width: 0 -cache_height: 0 -render_mode: MODE_MULTI_LAYER diff --git a/example/assets/fonts/text_bold.font b/example/assets/fonts/text_bold.font new file mode 100644 index 00000000..f5c97ff5 --- /dev/null +++ b/example/assets/fonts/text_bold.font @@ -0,0 +1,10 @@ +font: "/example/assets/fonts/RobotoCJKSC-Bold.ttf" +material: "/builtins/fonts/font-df.material" +size: 40 +outline_alpha: 1.0 +outline_width: 2.0 +shadow_alpha: 1.0 +shadow_blur: 2 +output_format: TYPE_DISTANCE_FIELD +render_mode: MODE_MULTI_LAYER +characters: "\302\241\302\253\302\273\302\277\303\200\303\202\303\206\303\207\303\210\303\211\303\212\303\213\303\216\303\217\303\224\303\231\303\233\303\234\303\237\303\240\303\241\303\242\303\243\303\244\303\246\303\247\303\250\303\251\303\252\303\253\303\255\303\256\303\257\303\261\303\262\303\263\303\264\303\265\303\266\303\271\303\273\303\274\303\277\305\222\305\223\305\270\320\201\320\220\320\221\320\222\320\223\320\224\320\225\320\226\320\227\320\230\320\231\320\232\320\233\320\234\320\235\320\236\320\237\320\240\320\241\320\242\320\243\320\244\320\245\320\246\320\247\320\250\320\251\320\252\320\253\320\254\320\255\320\256\320\257\320\260\320\261\320\262\320\263\320\264\320\265\320\266\320\267\320\270\320\271\320\272\320\273\320\274\320\275\320\276\320\277\321\200\321\201\321\202\321\203\321\204\321\205\321\206\321\207\321\210\321\211\321\212\321\213\321\214\321\215\321\216\321\217\321\221\342\200\224\343\200\201\343\200\202\343\200\214\343\200\215\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212\343\201\213\343\201\214\343\201\215\343\201\217\343\201\223\343\201\225\343\201\227\343\201\230\343\201\231\343\201\233\343\201\237\343\201\240\343\201\244\343\201\246\343\201\247\343\201\250\343\201\251\343\201\252\343\201\253\343\201\256\343\201\257\343\201\263\343\201\276\343\202\200\343\202\201\343\202\202\343\202\210\343\202\211\343\202\212\343\202\213\343\202\214\343\202\222\343\202\223\343\202\241\343\202\242\343\202\243\343\202\244\343\202\246\343\202\250\343\202\251\343\202\254\343\202\255\343\202\257\343\202\260\343\202\261\343\202\262\343\202\263\343\202\265\343\202\267\343\202\270\343\202\271\343\202\272\343\202\273\343\202\277\343\203\200\343\203\201\343\203\203\343\203\206\343\203\207\343\203\210\343\203\211\343\203\213\343\203\215\343\203\216\343\203\220\343\203\221\343\203\224\343\203\225\343\203\226\343\203\227\343\203\231\343\203\233\343\203\234\343\203\235\343\203\236\343\203\240\343\203\241\343\203\242\343\203\243\343\203\245\343\203\247\343\203\251\343\203\252\343\203\253\343\203\254\343\203\255\343\203\257\343\203\263\343\203\274\344\270\200\344\270\207\344\270\212\344\270\213\344\270\215\344\270\216\344\270\241\344\270\244\344\270\252\344\270\255\344\270\272\344\271\211\344\271\260\344\272\213\344\272\216\344\273\213\344\273\216\344\273\230\344\273\243\344\273\245\344\273\254\344\273\266\344\275\206\344\275\223\344\275\225\344\275\234\344\275\240\344\275\277\344\276\213\344\277\241\345\200\244\345\200\274\345\201\234\345\205\203\345\205\205\345\205\245\345\205\266\345\206\205\345\207\246\345\207\272\345\207\273\345\210\206\345\210\227\345\210\233\345\210\235\345\210\240\345\210\245\345\210\260\345\210\266\345\211\212\345\211\215\345\211\252\345\212\233\345\212\237\345\212\240\345\212\250\345\212\271\345\214\272\345\215\225\345\215\230\345\217\214\345\217\221\345\217\226\345\217\243\345\217\246\345\217\257\345\220\210\345\220\214\345\220\221\345\220\227\345\220\253\345\220\257\345\222\214\345\231\250\345\233\236\345\234\250\345\235\227\345\236\202\345\236\213\345\237\237\345\237\272\345\240\261\345\241\253\345\244\204\345\244\232\345\244\247\345\245\275\345\246\202\345\247\213\345\255\227\345\255\230\345\256\203\345\256\232\345\257\206\345\257\214\345\257\271\345\260\206\345\260\217\345\260\261\345\261\200\345\261\217\345\261\236\345\267\245\345\270\203\345\270\246\345\271\225\345\271\263\345\271\266\345\272\246\345\273\272\345\274\200\345\274\271\345\276\227\345\277\205\345\277\253\346\200\201\346\200\247\346\201\257\346\202\254\346\203\205\346\210\217\346\210\220\346\211\200\346\211\213\346\212\236\346\212\274\346\213\226\346\213\251\346\214\201\346\214\211\346\215\256\346\215\267\346\216\247\346\217\203\346\220\255\346\221\270\346\223\215\346\224\257\346\224\276\346\225\210\346\225\260\346\225\264\346\226\207\346\226\271\346\227\245\346\227\266\346\230\216\346\230\257\346\230\276\346\233\264\346\234\200\346\234\211\346\234\254\346\235\206\346\235\241\346\236\220\346\237\204\346\237\245\346\240\207\346\240\274\346\243\200\346\251\237\346\254\241\346\255\244\346\255\245\346\260\264\346\261\275\346\262\241\346\263\225\346\264\262\346\265\213\346\266\210\346\267\267\346\267\273\346\270\205\346\270\270\346\273\221\346\273\232\347\202\271\347\211\210\347\216\207\347\220\206\347\224\250\347\224\273\347\225\260\347\231\276\347\232\204\347\233\264\347\233\270\347\234\213\347\240\201\347\241\200\347\241\256\347\242\272\347\244\272\347\247\222\347\247\273\347\252\227\347\253\257\347\255\276\347\256\200\347\260\241\347\261\273\347\264\224\347\264\240\347\264\271\347\272\265\347\273\204\347\273\215\347\273\221\347\274\223\347\274\251\347\275\221\347\275\256\347\276\216\347\276\251\350\203\275\350\211\257\350\211\262\350\212\202\350\216\267\350\241\214\350\241\250\350\243\201\350\244\207\350\246\201\350\246\213\350\247\246\350\250\200\350\250\255\350\252\215\350\252\236\350\252\254\350\252\277\350\256\241\350\256\244\350\256\276\350\257\225\350\257\255\350\257\264\350\257\267\350\260\203\350\261\271\350\263\274\350\264\255\350\267\235\350\273\212\350\273\270\350\275\246\350\275\264\350\276\223\350\276\271\350\277\207\350\277\231\350\277\233\350\277\275\351\200\211\351\200\232\351\201\270\351\205\215\351\207\214\351\222\256\351\224\256\351\225\267\351\225\277\351\231\244\351\234\200\351\235\231\351\235\242\351\240\230\351\242\204\351\242\234\351\252\244\351\253\230\351\274\240\351\275\220\352\260\200\352\260\204\352\260\222\352\260\231\352\260\234\352\261\260\352\262\203\352\262\214\352\262\240\352\263\204\352\263\240\352\263\274\352\265\254\352\265\255\352\267\270\352\270\200\352\270\260\352\271\214\352\273\230\352\274\264\353\202\230\353\202\264\353\204\214\353\205\270\353\206\223\353\210\204\353\212\224\353\212\245\353\213\210\353\213\244\353\213\250\353\213\254\353\213\271\353\214\200\353\215\224\353\215\260\353\217\204\353\217\231\353\220\230\353\220\234\353\220\251\353\221\220\353\223\234\353\223\244\353\224\251\353\225\214\353\226\273\353\235\274\353\236\230\353\236\265\353\237\254\353\240\210\353\240\244\353\240\245\353\240\254\353\241\234\353\241\235\353\241\244\353\245\264\353\245\270\353\245\274\353\246\254\353\246\255\353\247\210\353\247\214\353\247\216\353\247\244\353\250\270\353\251\224\353\251\264\353\252\205\353\252\250\353\252\251\353\260\200\353\260\217\353\260\224\353\260\233\353\260\251\353\260\260\353\260\261\353\262\204\353\262\210\353\262\225\353\262\227\353\262\244\353\263\264\353\263\270\353\270\224\353\271\204\354\202\254\354\203\201\354\203\211\354\204\234\354\204\240\354\204\244\354\204\261\354\204\270\354\205\230\354\206\214\354\206\215\354\210\230\354\212\244\354\212\254\354\212\265\354\213\234\354\213\240\354\213\255\354\225\204\354\225\240\354\226\221\354\226\264\354\226\270\354\227\206\354\227\220\354\227\254\354\227\255\354\230\201\354\230\210\354\230\244\354\230\254\354\231\200\354\232\224\354\232\251\354\232\260\354\233\203\354\234\204\354\234\210\354\234\240\354\234\250\354\234\274\354\235\200\354\235\204\354\235\214\354\235\230\354\235\264\354\235\270\354\235\274\354\236\204\354\236\205\354\236\210\354\236\220\354\236\221\354\236\230\354\236\245\354\240\201\354\240\204\354\240\225\354\240\234\354\241\260\354\242\213\354\244\221\354\247\200\354\247\201\354\247\204\354\247\210\354\260\250\354\260\275\354\262\230\354\264\210\354\265\234\354\266\224\354\266\225\354\266\234\354\267\250\354\271\230\354\272\220\354\273\250\354\273\264\354\274\200\354\275\224\354\275\234\355\201\254\355\201\264\355\202\244\355\203\200\355\203\204\355\203\234\355\203\235\355\204\260\355\205\214\355\205\215\355\212\270\355\212\274\355\213\261\355\214\214\355\214\250\355\214\254\355\217\211\355\217\254\355\221\234\355\224\204\355\224\274\355\225\204\355\225\221\355\225\230\355\225\234\355\225\240\355\225\250\355\225\251\355\225\264\355\226\211\355\230\225\355\230\270\355\230\274\355\231\224\355\231\225\355\231\234\355\232\250\357\274\201\357\274\214\357\274\237 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}" diff --git a/example/assets/fonts/text_regular.font b/example/assets/fonts/text_regular.font new file mode 100644 index 00000000..2cd36734 --- /dev/null +++ b/example/assets/fonts/text_regular.font @@ -0,0 +1,8 @@ +font: "/example/assets/fonts/RobotoCJKSC-Regular.ttf" +material: "/builtins/fonts/font-df.material" +size: 40 +outline_alpha: 1.0 +outline_width: 2.0 +output_format: TYPE_DISTANCE_FIELD +render_mode: MODE_MULTI_LAYER +characters: "\302\241\302\253\302\273\302\277\303\200\303\202\303\206\303\207\303\210\303\211\303\212\303\213\303\216\303\217\303\224\303\231\303\233\303\234\303\237\303\240\303\241\303\242\303\243\303\244\303\246\303\247\303\250\303\251\303\252\303\253\303\255\303\256\303\257\303\261\303\262\303\263\303\264\303\265\303\266\303\271\303\273\303\274\303\277\305\222\305\223\305\270\320\201\320\220\320\221\320\222\320\223\320\224\320\225\320\226\320\227\320\230\320\231\320\232\320\233\320\234\320\235\320\236\320\237\320\240\320\241\320\242\320\243\320\244\320\245\320\246\320\247\320\250\320\251\320\252\320\253\320\254\320\255\320\256\320\257\320\260\320\261\320\262\320\263\320\264\320\265\320\266\320\267\320\270\320\271\320\272\320\273\320\274\320\275\320\276\320\277\321\200\321\201\321\202\321\203\321\204\321\205\321\206\321\207\321\210\321\211\321\212\321\213\321\214\321\215\321\216\321\217\321\221\342\200\224\343\200\201\343\200\202\343\200\214\343\200\215\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212\343\201\213\343\201\214\343\201\215\343\201\217\343\201\223\343\201\225\343\201\227\343\201\230\343\201\231\343\201\233\343\201\237\343\201\240\343\201\244\343\201\246\343\201\247\343\201\250\343\201\251\343\201\252\343\201\253\343\201\256\343\201\257\343\201\263\343\201\276\343\202\200\343\202\201\343\202\202\343\202\210\343\202\211\343\202\212\343\202\213\343\202\214\343\202\222\343\202\223\343\202\241\343\202\242\343\202\243\343\202\244\343\202\246\343\202\250\343\202\251\343\202\254\343\202\255\343\202\257\343\202\260\343\202\261\343\202\262\343\202\263\343\202\265\343\202\267\343\202\270\343\202\271\343\202\272\343\202\273\343\202\277\343\203\200\343\203\201\343\203\203\343\203\206\343\203\207\343\203\210\343\203\211\343\203\213\343\203\215\343\203\216\343\203\220\343\203\221\343\203\224\343\203\225\343\203\226\343\203\227\343\203\231\343\203\233\343\203\234\343\203\235\343\203\236\343\203\240\343\203\241\343\203\242\343\203\243\343\203\245\343\203\247\343\203\251\343\203\252\343\203\253\343\203\254\343\203\255\343\203\257\343\203\263\343\203\274\344\270\200\344\270\207\344\270\212\344\270\213\344\270\215\344\270\216\344\270\241\344\270\244\344\270\252\344\270\255\344\270\272\344\271\211\344\271\260\344\272\213\344\272\216\344\273\213\344\273\216\344\273\230\344\273\243\344\273\245\344\273\254\344\273\266\344\275\206\344\275\223\344\275\225\344\275\234\344\275\240\344\275\277\344\276\213\344\277\241\345\200\244\345\200\274\345\201\234\345\205\203\345\205\205\345\205\245\345\205\266\345\206\205\345\207\246\345\207\272\345\207\273\345\210\206\345\210\227\345\210\233\345\210\235\345\210\240\345\210\245\345\210\260\345\210\266\345\211\212\345\211\215\345\211\252\345\212\233\345\212\237\345\212\240\345\212\250\345\212\271\345\214\272\345\215\225\345\215\230\345\217\214\345\217\221\345\217\226\345\217\243\345\217\246\345\217\257\345\220\210\345\220\214\345\220\221\345\220\227\345\220\253\345\220\257\345\222\214\345\231\250\345\233\236\345\234\250\345\235\227\345\236\202\345\236\213\345\237\237\345\237\272\345\240\261\345\241\253\345\244\204\345\244\232\345\244\247\345\245\275\345\246\202\345\247\213\345\255\227\345\255\230\345\256\203\345\256\232\345\257\206\345\257\214\345\257\271\345\260\206\345\260\217\345\260\261\345\261\200\345\261\217\345\261\236\345\267\245\345\270\203\345\270\246\345\271\225\345\271\263\345\271\266\345\272\246\345\273\272\345\274\200\345\274\271\345\276\227\345\277\205\345\277\253\346\200\201\346\200\247\346\201\257\346\202\254\346\203\205\346\210\217\346\210\220\346\211\200\346\211\213\346\212\236\346\212\274\346\213\226\346\213\251\346\214\201\346\214\211\346\215\256\346\215\267\346\216\247\346\217\203\346\220\255\346\221\270\346\223\215\346\224\257\346\224\276\346\225\210\346\225\260\346\225\264\346\226\207\346\226\271\346\227\245\346\227\266\346\230\216\346\230\257\346\230\276\346\233\264\346\234\200\346\234\211\346\234\254\346\235\206\346\235\241\346\236\220\346\237\204\346\237\245\346\240\207\346\240\274\346\243\200\346\251\237\346\254\241\346\255\244\346\255\245\346\260\264\346\261\275\346\262\241\346\263\225\346\264\262\346\265\213\346\266\210\346\267\267\346\267\273\346\270\205\346\270\270\346\273\221\346\273\232\347\202\271\347\211\210\347\216\207\347\220\206\347\224\250\347\224\273\347\225\260\347\231\276\347\232\204\347\233\264\347\233\270\347\234\213\347\240\201\347\241\200\347\241\256\347\242\272\347\244\272\347\247\222\347\247\273\347\252\227\347\253\257\347\255\276\347\256\200\347\260\241\347\261\273\347\264\224\347\264\240\347\264\271\347\272\265\347\273\204\347\273\215\347\273\221\347\274\223\347\274\251\347\275\221\347\275\256\347\276\216\347\276\251\350\203\275\350\211\257\350\211\262\350\212\202\350\216\267\350\241\214\350\241\250\350\243\201\350\244\207\350\246\201\350\246\213\350\247\246\350\250\200\350\250\255\350\252\215\350\252\236\350\252\254\350\252\277\350\256\241\350\256\244\350\256\276\350\257\225\350\257\255\350\257\264\350\257\267\350\260\203\350\261\271\350\263\274\350\264\255\350\267\235\350\273\212\350\273\270\350\275\246\350\275\264\350\276\223\350\276\271\350\277\207\350\277\231\350\277\233\350\277\275\351\200\211\351\200\232\351\201\270\351\205\215\351\207\214\351\222\256\351\224\256\351\225\267\351\225\277\351\231\244\351\234\200\351\235\231\351\235\242\351\240\230\351\242\204\351\242\234\351\252\244\351\253\230\351\274\240\351\275\220\352\260\200\352\260\204\352\260\222\352\260\231\352\260\234\352\261\260\352\262\203\352\262\214\352\262\240\352\263\204\352\263\240\352\263\274\352\265\254\352\265\255\352\267\270\352\270\200\352\270\260\352\271\214\352\273\230\352\274\264\353\202\230\353\202\264\353\204\214\353\205\270\353\206\223\353\210\204\353\212\224\353\212\245\353\213\210\353\213\244\353\213\250\353\213\254\353\213\271\353\214\200\353\215\224\353\215\260\353\217\204\353\217\231\353\220\230\353\220\234\353\220\251\353\221\220\353\223\234\353\223\244\353\224\251\353\225\214\353\226\273\353\235\274\353\236\230\353\236\265\353\237\254\353\240\210\353\240\244\353\240\245\353\240\254\353\241\234\353\241\235\353\241\244\353\245\264\353\245\270\353\245\274\353\246\254\353\246\255\353\247\210\353\247\214\353\247\216\353\247\244\353\250\270\353\251\224\353\251\264\353\252\205\353\252\250\353\252\251\353\260\200\353\260\217\353\260\224\353\260\233\353\260\251\353\260\260\353\260\261\353\262\204\353\262\210\353\262\225\353\262\227\353\262\244\353\263\264\353\263\270\353\270\224\353\271\204\354\202\254\354\203\201\354\203\211\354\204\234\354\204\240\354\204\244\354\204\261\354\204\270\354\205\230\354\206\214\354\206\215\354\210\230\354\212\244\354\212\254\354\212\265\354\213\234\354\213\240\354\213\255\354\225\204\354\225\240\354\226\221\354\226\264\354\226\270\354\227\206\354\227\220\354\227\254\354\227\255\354\230\201\354\230\210\354\230\244\354\230\254\354\231\200\354\232\224\354\232\251\354\232\260\354\233\203\354\234\204\354\234\210\354\234\240\354\234\250\354\234\274\354\235\200\354\235\204\354\235\214\354\235\230\354\235\264\354\235\270\354\235\274\354\236\204\354\236\205\354\236\210\354\236\220\354\236\221\354\236\230\354\236\245\354\240\201\354\240\204\354\240\225\354\240\234\354\241\260\354\242\213\354\244\221\354\247\200\354\247\201\354\247\204\354\247\210\354\260\250\354\260\275\354\262\230\354\264\210\354\265\234\354\266\224\354\266\225\354\266\234\354\267\250\354\271\230\354\272\220\354\273\250\354\273\264\354\274\200\354\275\224\354\275\234\355\201\254\355\201\264\355\202\244\355\203\200\355\203\204\355\203\234\355\203\235\355\204\260\355\205\214\355\205\215\355\212\270\355\212\274\355\213\261\355\214\214\355\214\250\355\214\254\355\217\211\355\217\254\355\221\234\355\224\204\355\224\274\355\225\204\355\225\221\355\225\230\355\225\234\355\225\240\355\225\250\355\225\251\355\225\264\355\226\211\355\230\225\355\230\270\355\230\274\355\231\224\355\231\225\355\231\234\355\232\250\357\274\201\357\274\214\357\274\237 !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}" diff --git a/example/assets/images/back/back_blue.png b/example/assets/images/back/back_blue.png deleted file mode 100755 index 73dcfd09..00000000 Binary files a/example/assets/images/back/back_blue.png and /dev/null differ diff --git a/example/assets/images/back/back_gray.png b/example/assets/images/back/back_gray.png deleted file mode 100755 index 3d6f82c5..00000000 Binary files a/example/assets/images/back/back_gray.png and /dev/null differ diff --git a/example/assets/images/back/back_green.png b/example/assets/images/back/back_green.png deleted file mode 100755 index 8ec85482..00000000 Binary files a/example/assets/images/back/back_green.png and /dev/null differ diff --git a/example/assets/images/back/back_red.png b/example/assets/images/back/back_red.png deleted file mode 100755 index e771c392..00000000 Binary files a/example/assets/images/back/back_red.png and /dev/null differ diff --git a/example/assets/images/buttons/button_blue.png b/example/assets/images/buttons/button_blue.png deleted file mode 100755 index 5ec356ab..00000000 Binary files a/example/assets/images/buttons/button_blue.png and /dev/null differ diff --git a/example/assets/images/buttons/button_green.png b/example/assets/images/buttons/button_green.png deleted file mode 100755 index 1da6a098..00000000 Binary files a/example/assets/images/buttons/button_green.png and /dev/null differ diff --git a/example/assets/images/buttons/button_red.png b/example/assets/images/buttons/button_red.png deleted file mode 100755 index 7263038f..00000000 Binary files a/example/assets/images/buttons/button_red.png and /dev/null differ diff --git a/example/assets/images/buttons/button_yellow.png b/example/assets/images/buttons/button_yellow.png deleted file mode 100755 index e00e7e3e..00000000 Binary files a/example/assets/images/buttons/button_yellow.png and /dev/null differ diff --git a/example/assets/images/empty.png b/example/assets/images/empty.png index 5da9ec09..36b4ff13 100755 Binary files a/example/assets/images/empty.png and b/example/assets/images/empty.png differ diff --git a/example/assets/images/icon_arrow.png b/example/assets/images/icon_arrow.png new file mode 100644 index 00000000..80b29f29 Binary files /dev/null and b/example/assets/images/icon_arrow.png differ diff --git a/example/assets/images/icon_check.png b/example/assets/images/icon_check.png new file mode 100644 index 00000000..d32bb3f1 Binary files /dev/null and b/example/assets/images/icon_check.png differ diff --git a/example/assets/images/icon_cross.png b/example/assets/images/icon_cross.png new file mode 100644 index 00000000..5f227ffe Binary files /dev/null and b/example/assets/images/icon_cross.png differ diff --git a/example/assets/images/icon_druid.png b/example/assets/images/icon_druid.png new file mode 100644 index 00000000..22a26ce2 Binary files /dev/null and b/example/assets/images/icon_druid.png differ diff --git a/example/assets/images/icon_heart.png b/example/assets/images/icon_heart.png new file mode 100644 index 00000000..840ce217 Binary files /dev/null and b/example/assets/images/icon_heart.png differ diff --git a/example/assets/images/kenney.atlas b/example/assets/images/kenney.atlas deleted file mode 100644 index ead7b5af..00000000 --- a/example/assets/images/kenney.atlas +++ /dev/null @@ -1,71 +0,0 @@ -images { - image: "/example/assets/images/back/back_blue.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/back/back_green.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/back/back_red.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/buttons/button_green.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/buttons/button_red.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/buttons/button_yellow.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/empty.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/progress/progress_back.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/progress/progress_fill_yellow.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/radio/check_back_circle.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/radio/check_back_square.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/radio/checkmark.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/radio/tick.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/slider/slider_back.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/slider/slider_move.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/buttons/button_blue.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -images { - image: "/example/assets/images/logo.png" - sprite_trim_mode: SPRITE_TRIM_MODE_OFF -} -margin: 0 -extrude_borders: 2 -inner_padding: 0 diff --git a/example/assets/images/logo.png b/example/assets/images/logo.png deleted file mode 100644 index 7a56d26e..00000000 Binary files a/example/assets/images/logo.png and /dev/null differ diff --git a/example/assets/images/logo_druid.png b/example/assets/images/logo_druid.png new file mode 100644 index 00000000..094c0580 Binary files /dev/null and b/example/assets/images/logo_druid.png differ diff --git a/example/assets/images/pixel.png b/example/assets/images/pixel.png new file mode 100755 index 00000000..9619df88 Binary files /dev/null and b/example/assets/images/pixel.png differ diff --git a/example/assets/images/progress/progress_back.png b/example/assets/images/progress/progress_back.png deleted file mode 100755 index 662b16a0..00000000 Binary files a/example/assets/images/progress/progress_back.png and /dev/null differ diff --git a/example/assets/images/progress/progress_fill_green.png b/example/assets/images/progress/progress_fill_green.png deleted file mode 100755 index 195fa3b5..00000000 Binary files a/example/assets/images/progress/progress_fill_green.png and /dev/null differ diff --git a/example/assets/images/progress/progress_fill_red.png b/example/assets/images/progress/progress_fill_red.png deleted file mode 100755 index 32f5f4c8..00000000 Binary files a/example/assets/images/progress/progress_fill_red.png and /dev/null differ diff --git a/example/assets/images/progress/progress_fill_yellow.png b/example/assets/images/progress/progress_fill_yellow.png deleted file mode 100755 index 70ee7203..00000000 Binary files a/example/assets/images/progress/progress_fill_yellow.png and /dev/null differ diff --git a/example/assets/images/radio/check_back_circle.png b/example/assets/images/radio/check_back_circle.png deleted file mode 100755 index 877a3e06..00000000 Binary files a/example/assets/images/radio/check_back_circle.png and /dev/null differ diff --git a/example/assets/images/radio/check_back_square.png b/example/assets/images/radio/check_back_square.png deleted file mode 100755 index f17bb8f1..00000000 Binary files a/example/assets/images/radio/check_back_square.png and /dev/null differ diff --git a/example/assets/images/radio/checkmark.png b/example/assets/images/radio/checkmark.png deleted file mode 100755 index 3ad298eb..00000000 Binary files a/example/assets/images/radio/checkmark.png and /dev/null differ diff --git a/example/assets/images/radio/tick.png b/example/assets/images/radio/tick.png deleted file mode 100755 index f0c945d3..00000000 Binary files a/example/assets/images/radio/tick.png and /dev/null differ diff --git a/example/assets/images/rect_round2_width1.png b/example/assets/images/rect_round2_width1.png new file mode 100644 index 00000000..bbde0a65 Binary files /dev/null and b/example/assets/images/rect_round2_width1.png differ diff --git a/example/assets/images/slider/slider_back.png b/example/assets/images/slider/slider_back.png deleted file mode 100755 index d28abb91..00000000 Binary files a/example/assets/images/slider/slider_back.png and /dev/null differ diff --git a/example/assets/images/slider/slider_move.png b/example/assets/images/slider/slider_move.png deleted file mode 100755 index 04018c52..00000000 Binary files a/example/assets/images/slider/slider_move.png and /dev/null differ diff --git a/example/assets/images/sponsor_coffee.png b/example/assets/images/sponsor_coffee.png new file mode 100644 index 00000000..899870f4 Binary files /dev/null and b/example/assets/images/sponsor_coffee.png differ diff --git a/example/assets/images/sponsor_github.png b/example/assets/images/sponsor_github.png new file mode 100644 index 00000000..c1aa5bf6 Binary files /dev/null and b/example/assets/images/sponsor_github.png differ diff --git a/example/assets/images/sponsor_kofi.png b/example/assets/images/sponsor_kofi.png new file mode 100644 index 00000000..5e8d3cec Binary files /dev/null and b/example/assets/images/sponsor_kofi.png differ diff --git a/example/assets/images/ui_circle_16.png b/example/assets/images/ui_circle_16.png new file mode 100644 index 00000000..559c77cd Binary files /dev/null and b/example/assets/images/ui_circle_16.png differ diff --git a/example/assets/images/ui_circle_32.png b/example/assets/images/ui_circle_32.png new file mode 100644 index 00000000..82932ca8 Binary files /dev/null and b/example/assets/images/ui_circle_32.png differ diff --git a/example/assets/images/ui_circle_64.png b/example/assets/images/ui_circle_64.png new file mode 100644 index 00000000..c74547d0 Binary files /dev/null and b/example/assets/images/ui_circle_64.png differ diff --git a/example/assets/images/ui_circle_64_blur_8.png b/example/assets/images/ui_circle_64_blur_8.png new file mode 100644 index 00000000..23e68978 Binary files /dev/null and b/example/assets/images/ui_circle_64_blur_8.png differ diff --git a/example/assets/images/ui_circle_8.png b/example/assets/images/ui_circle_8.png new file mode 100644 index 00000000..0d49e703 Binary files /dev/null and b/example/assets/images/ui_circle_8.png differ diff --git a/example/assets/images/ui_rounded_top_32.png b/example/assets/images/ui_rounded_top_32.png new file mode 100644 index 00000000..3585730f Binary files /dev/null and b/example/assets/images/ui_rounded_top_32.png differ diff --git a/example/assets/sounds/click.ogg b/example/assets/sounds/click.ogg deleted file mode 100755 index 4f17f1cd..00000000 Binary files a/example/assets/sounds/click.ogg and /dev/null differ diff --git a/example/components/container/container.lua b/example/components/container/container.lua new file mode 100644 index 00000000..7f71ba44 --- /dev/null +++ b/example/components/container/container.lua @@ -0,0 +1,528 @@ +--- Container component +-- Container setup in GUI +-- parent container - container that contains this container. If not, then it's a window default container +-- container pivot - the point of the parent container that will be used as a pivot point for positioning +-- node_offset - position offset from parent container pivot point (vector4 - offset in pixels from each side) +-- adjust mode FIT - container will keep it's size and will be positioned inside parent container +-- adjust mode STRETCH - container will have percentage of parent container size +-- adjust mode STRETCH_X - container will have percentage of parent container size (only x side) +-- adjust mode STRETCH_Y - container will have percentage of parent container size (only y side) +-- Adjust Stretch and x_anchor == None: container will be positioned by pivot point with one side fixed margin, stretched to pivot side by percentage +-- Adjust stretch and x_anchor ~= None: container will be positioned by pivot point, stretched to pivot side by percentage, but with fixed margins +-- Inner container should be inside other container + +local const = require("druid.const") +local helper = require("druid.helper") +local component = require("druid.component") +local Event = require("druid.event") + +---@class druid.container: druid.base_component +---@field node node +---@field druid druid_instance +---@field node_offset vector4 +---@field origin_size vector3 +---@field size vector3 +---@field origin_position vector3 +---@field position vector3 +---@field pivot_offset vector3 +---@field center_offset vector3 +---@field mode string +---@field fit_size vector3 +---@field min_size_x number|nil +---@field min_size_y number|nil +---@field on_size_changed druid.event @function on_size_changed(size) +---@field _parent_container druid.container +---@field _containers table +---@field _draggable_corners table +local Container = component.create("container") + +local abs = math.abs +local min = math.min +local max = math.max + +local CORNER_PIVOTS = { + gui.PIVOT_NE, + gui.PIVOT_NW, + gui.PIVOT_SE, + gui.PIVOT_SW, +} + + +--- The Container init +---@param node node Gui node +---@param mode string Layout mode +---@param callback fun(self: druid.container, size: vector3) Callback on size changed +function Container:init(node, mode, callback) + self.node = self:get_node(node) + self.druid = self:get_druid() + + self.min_size_x = 0 + self.min_size_y = 0 + self._containers = {} + self._draggable_corners = {} + self.node_offset = vmath.vector4(0) + self.node_fill_x = nil + self.node_fill_y = nil + self._position = gui.get_position(self.node) + local x_koef, y_koef = helper.get_screen_aspect_koef() + self.x_koef = x_koef + self.y_koef = y_koef + + self.x_anchor = gui.get_xanchor(self.node) + self.y_anchor = gui.get_yanchor(self.node) + + -- Can be changed + self.origin_size = gui.get_size(self.node) + self.size = gui.get_size(self.node) + self.position = gui.get_position(self.node) + self.origin_position = gui.get_position(self.node) + + local adjust_mode = gui.get_adjust_mode(self.node) + self.mode = mode or (adjust_mode == gui.ADJUST_FIT) and const.LAYOUT_MODE.FIT or const.LAYOUT_MODE.STRETCH + + gui.set_size_mode(self.node, gui.SIZE_MODE_MANUAL) + gui.set_adjust_mode(self.node, gui.ADJUST_FIT) + + self.on_size_changed = Event(callback) + + self.pivot_offset = helper.get_pivot_offset(gui.get_pivot(self.node)) + self.center_offset = -vmath.vector3(self.size.x * self.pivot_offset.x, self.size.y * self.pivot_offset.y, 0) + self:set_size(self.size.x, self.size.y) +end + + +function Container:on_late_init() + if not gui.get_parent(self.node) then + -- TODO: Scale issue here, in fit into window! + self:fit_into_window() + end +end + + +function Container:on_remove() + self:clear_draggable_corners() +end + + +function Container:refresh_origins() + self.origin_size = gui.get_size(self.node) + self.origin_position = gui.get_position(self.node) + self:set_pivot(gui.get_pivot(self.node)) +end + + +---@param pivot constant +function Container:set_pivot(pivot) + gui.set_pivot(self.node, pivot) + self.pivot_offset = helper.get_pivot_offset(pivot) + self.center_offset = -vmath.vector3(self.size.x * self.pivot_offset.x, self.size.y * self.pivot_offset.y, 0) +end + + +--- Component style params. +-- You can override this component styles params in Druid styles table +-- or create your own style +-- @table style +-- @tfield[opt=vector3(24, 24, 0)] vector3 DRAGGABLE_CORNER_SIZE Size of box node for debug draggable corners +-- @tfield[opt=vector4(1)] vector4 DRAGGABLE_CORNER_COLOR Color of debug draggable corners +function Container:on_style_change(style) + self.style = {} + self.style.DRAGGABLE_CORNER_SIZE = style.DRAGGABLE_CORNER_SIZE or vmath.vector3(24, 24, 0) + self.style.DRAGGABLE_CORNER_COLOR = style.DRAGGABLE_CORNER_COLOR or vmath.vector4(10) +end + + +--- Set new size of layout node +---@param width number|nil +---@param height number|nil +---@return druid.container @{Container} +function Container:set_size(width, height) + width = width or self.size.x + height = height or self.size.y + + if self.min_size_x then + width = max(width, self.min_size_x) + end + if self.min_size_y then + height = max(height, self.min_size_y) + end + + if (width and width ~= self.size.x) or (height and height ~= self.size.y) then + self.center_offset.x = -width * self.pivot_offset.x + self.center_offset.y = -height * self.pivot_offset.y + self.size.x = width + self.size.y = height + self.size.z = 0 + gui.set_size(self.node, self.size) + + self:update_child_containers() + self.on_size_changed:trigger(self:get_context(), self.size) + end + + return self +end + + +---@param pos_x number +---@param pos_y number +function Container:set_position(pos_x, pos_y) + if self._position.x == pos_x and self._position.y == pos_y then + return + end + + self._position.x = pos_x + self._position.y = pos_y + gui.set_position(self.node, self._position) +end + + +---Get current size of layout node +---@return vector3 size +function Container:get_size() + return self.size +end + + +---Get current scale of layout node +---@return vector3 scale +function Container:get_scale() + return helper.get_scene_scale(self.node, true) --[[@as vector3]] +end + + +--- Set size for layout node to fit inside it +---@param target_size vector3 +---@return druid.container @{Container} +function Container:fit_into_size(target_size) + self.fit_size = target_size + self:refresh() + return self +end + + +--- Set current size for layout node to fit inside it +---@return druid.container @{Container} +function Container:fit_into_window() + return self:fit_into_size(vmath.vector3(gui.get_width(), gui.get_height(), 0)) +end + + +---@param self druid.container +function Container:on_window_resized() + local x_koef, y_koef = helper.get_screen_aspect_koef() + self.x_koef = x_koef + self.y_koef = y_koef + + if not self._parent_container then + self:refresh() + end +end + + +---@param node_or_container node|string|druid.container|table +---@param mode string|nil stretch, fit, stretch_x, stretch_y. Default: Pick from node, "fit" or "stretch" +---@param on_resize_callback fun(self: userdata, size: vector3)|nil +---@return druid.container @{Container} New created layout instance +function Container:add_container(node_or_container, mode, on_resize_callback) + local container = nil + local node = node_or_container + + -- Check it's a container components instead of node + if type(node_or_container) == "table" and node_or_container._component then + node = node_or_container.node + container = node_or_container + mode = mode or container.mode + end + + -- Covert node_id to node if needed + node = self:get_node(node) + + container = container or self.druid:new(Container, node, mode) + container:set_parent_container(self) + if on_resize_callback then + container.on_size_changed:subscribe(on_resize_callback) + end + table.insert(self._containers, container) + + return container +end + + +---@return druid.container|nil +function Container:remove_container_by_node(node) + for index = 1, #self._containers do + local container = self._containers[index] + if container.node == node then + table.remove(self._containers, index) + self.druid:remove(container) + return container + end + end + + return nil +end + + +---@param parent_container druid.container|nil +function Container:set_parent_container(parent_container) + if not parent_container then + self._parent_container = nil + gui.set_parent(self.node, nil) + self:refresh() + return + end + + -- TODO: Just check it's already parent + gui.set_parent(self.node, parent_container.node, true) + + -- Node offset - fixed distance from parent side to the child side + local parent_left = parent_container.center_offset.x - parent_container.origin_size.x * 0.5 + local parent_right = parent_container.center_offset.x + parent_container.origin_size.x * 0.5 + local parent_top = parent_container.center_offset.y + parent_container.origin_size.y * 0.5 + local parent_bottom = parent_container.center_offset.y - parent_container.origin_size.y * 0.5 + + local node_left = self.origin_position.x + self.center_offset.x - self.origin_size.x * 0.5 + local node_right = self.origin_position.x + self.center_offset.x + self.origin_size.x * 0.5 + local node_top = self.origin_position.y + self.center_offset.y + self.origin_size.y * 0.5 + local node_bottom = self.origin_position.y + self.center_offset.y - self.origin_size.y * 0.5 + + self.node_offset.x = node_left - parent_left + self.node_offset.y = node_top - parent_top + self.node_offset.z = node_right - parent_right + self.node_offset.w = node_bottom - parent_bottom + self._parent_container = parent_container + + local offset_x = (self.node_offset.x + self.node_offset.z)/2 + local offset_y = (self.node_offset.y + self.node_offset.w)/2 + + if self.pivot_offset.x < 0 then + offset_x = self.node_offset.x + end + if self.pivot_offset.x > 0 then + offset_x = self.node_offset.z + end + if self.pivot_offset.y < 0 then + offset_y = self.node_offset.w + end + if self.pivot_offset.y > 0 then + offset_y = self.node_offset.y + end + + local koef_x = (parent_container.origin_size.x - abs(offset_x)) + self.node_fill_x = koef_x ~= 0 and self.origin_size.x / koef_x or 1 + local x_anchor = gui.get_xanchor(self.node) + if x_anchor ~= gui.ANCHOR_NONE then + self.node_fill_x = 1 + end + + local koef_y = (parent_container.origin_size.y - abs(offset_y)) + self.node_fill_y = koef_y ~= 0 and self.origin_size.y / koef_y or 1 + local y_anchor = gui.get_yanchor(self.node) + if y_anchor ~= gui.ANCHOR_NONE then + self.node_fill_y = 1 + end + + self:refresh() +end + + +-- Glossary +-- Center Offset - vector from node position to visual center of node +function Container:refresh() + local x_koef, y_koef = self.x_koef, self.y_koef + self:refresh_scale() + + if self._parent_container then + local parent = self._parent_container + local offset_x = (self.node_offset.x + self.node_offset.z) / 2 + local offset_y = (self.node_offset.y + self.node_offset.w) / 2 + + if self.pivot_offset.x < 0 then + offset_x = self.node_offset.x + end + if self.pivot_offset.x > 0 then + offset_x = self.node_offset.z + end + if self.pivot_offset.y < 0 then + offset_y = self.node_offset.w + end + if self.pivot_offset.y > 0 then + offset_y = self.node_offset.y + end + + local stretch_side_x = parent.size.x - abs(offset_x) + local stretch_side_y = parent.size.y - abs(offset_y) + + do + local parent_pivot_x = parent.center_offset.x + (parent.size.x * self.pivot_offset.x) + local parent_pivot_y = parent.center_offset.y + (parent.size.y * self.pivot_offset.y) + local pos_x = parent_pivot_x + offset_x + local pos_y = parent_pivot_y + offset_y + self:set_position(pos_x, pos_y) + end + + do + if self.x_anchor ~= gui.ANCHOR_NONE then + stretch_side_x = parent.size.x - (abs(self.node_offset.x) + abs(self.node_offset.z)) + end + + if self.y_anchor ~= gui.ANCHOR_NONE then + stretch_side_y = parent.size.y - (abs(self.node_offset.y) + abs(self.node_offset.w)) + end + + ---- Size Update (for stretch) + if self.mode == const.LAYOUT_MODE.STRETCH then + self:set_size( + abs(stretch_side_x * self.node_fill_x), + abs(stretch_side_y * self.node_fill_y)) + end + + if self.mode == const.LAYOUT_MODE.STRETCH_X then + self:set_size(abs(stretch_side_x * self.node_fill_x), nil) + end + + if self.mode == const.LAYOUT_MODE.STRETCH_Y then + self:set_size(nil, abs(stretch_side_y * self.node_fill_y)) + end + end + else + if self.fit_size then + x_koef = self.fit_size.x / self.origin_size.x * x_koef + y_koef = self.fit_size.y / self.origin_size.y * y_koef + + if self.mode == const.LAYOUT_MODE.STRETCH then + self:set_size(self.origin_size.x * x_koef, self.origin_size.y * y_koef) + end + end + end + + self:update_child_containers() +end + + +function Container:refresh_scale() + if self._fit_node then + local fit_node_size = gui.get_size(self._fit_node) + + local scale = vmath.vector3(1) + scale.x = min(fit_node_size.x / self.size.x, 1) + scale.y = min(fit_node_size.y / self.size.y, 1) + + scale.x = min(scale.x, scale.y) + scale.y = min(scale.x, scale.y) + + gui.set_scale(self.node, scale) + end +end + + +function Container:update_child_containers() + for index = 1, #self._containers do + self._containers[index]:refresh() + end +end + + +---@return druid.container @{Container} +function Container:create_draggable_corners() + self:clear_draggable_corners() + + for _, corner_pivot in pairs(CORNER_PIVOTS) do + local corner_offset = helper.get_pivot_offset(corner_pivot) + local anchor_position = vmath.vector3( + self.center_offset.x + (self.size.x) * corner_offset.x, + self.center_offset.y + (self.size.y) * corner_offset.y, + 0) + + local new_draggable_node = gui.new_box_node(anchor_position, self.style.DRAGGABLE_CORNER_SIZE) + gui.set_color(new_draggable_node, self.style.DRAGGABLE_CORNER_COLOR) + gui.set_pivot(new_draggable_node, corner_pivot) + gui.set_parent(new_draggable_node, self.node) + self:add_container(new_draggable_node) + + ---@type druid.drag + local drag = self.druid:new_drag(new_draggable_node, function(_, x, y) + self:_on_corner_drag(x, y, corner_offset) + end) + table.insert(self._draggable_corners, drag) + + drag.style.DRAG_DEADZONE = 0 + end + + return self +end + + +---@return druid.container @{Container} +function Container:clear_draggable_corners() + for index = 1, #self._draggable_corners do + local drag_component = self._draggable_corners[index] + self.druid:remove(drag_component) + self:remove_container_by_node(drag_component.node) + gui.delete_node(drag_component.node) + end + + self._draggable_corners = {} + + return self +end + + +function Container:_on_corner_drag(x, y, corner_offset) + x = corner_offset.x >= 0 and x or -x + y = corner_offset.y >= 0 and y or -y + + local size = self:get_size() + if self.min_size_x and size.x + x < self.min_size_x then + x = self.min_size_x - size.x + end + if self.min_size_y and size.y + y < self.min_size_y then + y = self.min_size_y - size.y + end + + if corner_offset.x < 0 then + self.node_offset.x = self.node_offset.x - x + end + if corner_offset.x > 0 then + self.node_offset.z = self.node_offset.z - x + end + if corner_offset.y < 0 then + self.node_offset.w = self.node_offset.w - y + end + if corner_offset.y > 0 then + self.node_offset.y = self.node_offset.y - y + end + + local pivot = gui.get_pivot(self.node) + local pivot_offset = helper.get_pivot_offset(pivot) + + local center_pos_x = self._position.x + (x * (pivot_offset.x + corner_offset.x)) + local center_pos_y = self._position.y + (y * (pivot_offset.y + corner_offset.y)) + + self:set_position(center_pos_x, center_pos_y) + self:set_size(size.x + x, size.y + y) +end + + +--- Set node for layout node to fit inside it. Pass nil to reset +---@param node string|node The node_id or gui.get_node(node_id) +---@return druid.container @{Layout} +function Container:fit_into_node(node) + self._fit_node = self:get_node(node) + self:refresh_scale() + return self +end + + +---@param min_size_x number|nil +---@param min_size_y number|nil +function Container:set_min_size(min_size_x, min_size_y) + self.min_size_x = min_size_x or self.min_size_x + self.min_size_y = min_size_y or self.min_size_y + self:refresh() + + return self +end + + +return Container diff --git a/example/examples/general/data_list/data_list.gui b/example/components/druid_logo/druid_logo.gui similarity index 70% rename from example/examples/general/data_list/data_list.gui rename to example/components/druid_logo/druid_logo.gui index bc72836e..15b549de 100644 --- a/example/examples/general/data_list/data_list.gui +++ b/example/components/druid_logo/druid_logo.gui @@ -1,11 +1,15 @@ -script: "/example/examples/general/data_list/data_list.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid_logo" + texture: "/example/assets/druid_logo.atlas" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +19,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,26 +37,26 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 400.0 + y: 170.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/pixel" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - layer: "" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -60,83 +64,24 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_NONE + clipping_mode: CLIPPING_MODE_STENCIL clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 360.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 800.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "The default DataList component. Click on node to mark checkbox. The mark info is saved in element data" - font: "game" - id: "text_hint" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 + x: 200.0 y: 0.0 z: 0.0 w: 1.0 } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 300.0 - z: 0.0 - w: 1.0 - } rotation { x: 0.0 y: 0.0 @@ -150,13 +95,13 @@ nodes { w: 1.0 } size { - x: 500.0 - y: 650.0 + x: 16.0 + y: 16.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 @@ -164,11 +109,11 @@ nodes { type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA texture: "" - id: "data_list_view" + id: "E_Anchor" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT + pivot: PIVOT_E + adjust_mode: ADJUST_MODE_STRETCH parent: "root" layer: "" inherit_alpha: true @@ -178,16 +123,20 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 + x: 10.0 y: 0.0 z: 0.0 w: 1.0 @@ -205,27 +154,27 @@ nodes { w: 1.0 } size { - x: 500.0 - y: 650.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 - z: 0.8 + z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_content" + texture: "druid_logo/icon_druid" + id: "icon_druid_right" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_view" - layer: "" + parent: "E_Anchor" + layer: "druid_logo" inherit_alpha: true slice9 { x: 0.0 @@ -236,13 +185,17 @@ nodes { clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false - alpha: 1.0 + alpha: 0.5 template_node_child: false - size_mode: SIZE_MODE_MANUAL + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 + x: -200.0 y: 0.0 z: 0.0 w: 1.0 @@ -260,8 +213,8 @@ nodes { w: 1.0 } size { - x: 450.0 - y: 80.0 + x: 16.0 + y: 16.0 z: 0.0 w: 1.0 } @@ -273,19 +226,19 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "prefab" + texture: "" + id: "W_Anchor" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_STRETCH parent: "root" layer: "" inherit_alpha: true slice9 { - x: 20.0 - y: 20.0 - z: 20.0 + x: 0.0 + y: 0.0 + z: 0.0 w: 0.0 } clipping_mode: CLIPPING_MODE_NONE @@ -294,11 +247,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -50.0 - y: 8.0 + x: -10.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -315,8 +272,8 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -326,42 +283,38 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Record: 1" - font: "game" - id: "text" + texture: "druid_logo/icon_druid" + id: "icon_druid_left" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "prefab" - layer: "" + parent: "W_Anchor" + layer: "druid_logo" inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 0.5 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 175.0 - y: 6.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -378,8 +331,8 @@ nodes { w: 1.0 } size { - x: 49.0 - y: 49.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -391,14 +344,14 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/back_green" - id: "icon" + texture: "druid_logo/logo_druid" + id: "icon_logo" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "prefab" - layer: "" + parent: "root" + layer: "druid_logo" inherit_alpha: true slice9 { x: 0.0 @@ -412,11 +365,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 2.0 + y: -50.0 z: 0.0 w: 1.0 } @@ -427,52 +384,67 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.6 + y: 0.6 z: 1.0 w: 1.0 } size { - x: 21.0 - y: 20.0 + x: 400.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox" + text: "Defold UI Framework" + font: "text_regular" + id: "text_description" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "icon" - layer: "" + line_break: false + parent: "root" + layer: "text_regular" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_AUTO + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "druid" } layers { - name: "image" + name: "druid_logo" } layers { - name: "text" + name: "text_regular" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/druid_logo/druid_logo.lua b/example/components/druid_logo/druid_logo.lua new file mode 100644 index 00000000..4784a807 --- /dev/null +++ b/example/components/druid_logo/druid_logo.lua @@ -0,0 +1,48 @@ +local panthera = require("panthera.panthera") +local component = require("druid.component") + +local druid_logo_panthera = require("example.components.druid_logo.druid_logo_panthera") +local container = require("example.components.container.container") + +---@class druid_logo: druid.base_component +---@field root druid.container +---@field text_description druid.text +---@field druid druid_instance +local DruidLogo = component.create("druid_logo") + + +---@param template string +---@param nodes table +function DruidLogo:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("E_Anchor") + self.root:add_container("W_Anchor") + + self.druid:new_button("root", self.on_click):set_style(nil) + + self.animation = panthera.create_gui(druid_logo_panthera, self:get_template(), nodes) + panthera.play(self.animation, "idle", { is_loop = true }) + + self.animation_hover = panthera.clone_state(self.animation) + self.hover = self.druid:new_hover("root") + self.hover.on_mouse_hover:subscribe(self.on_mouse_hover) +end + + +function DruidLogo:on_click() + sys.open_url("https://github.com/Insality/druid", { target = "_blank" }) +end + + +function DruidLogo:on_mouse_hover(is_hover) + if is_hover then + panthera.play(self.animation_hover, "on_hover_in") + else + panthera.play(self.animation_hover, "on_hover_out", { is_skip_init = true }) + end +end + + +return DruidLogo diff --git a/example/components/druid_logo/druid_logo_panthera.lua b/example/components/druid_logo/druid_logo_panthera.lua new file mode 100644 index 00000000..8178fac0 --- /dev/null +++ b/example/components/druid_logo/druid_logo_panthera.lua @@ -0,0 +1,268 @@ +return { + version = 1, + format = "json", + data = { + animations = { + { + duration = 12, + animation_id = "idle", + animation_keys = { + { + node_id = "icon_druid_left", + duration = 3, + end_value = -5, + easing = "outsine", + key_type = "tween", + property_id = "position_y", + }, + { + node_id = "icon_druid_right", + duration = 3, + end_value = -5, + easing = "outsine", + key_type = "tween", + property_id = "position_y", + }, + { + node_id = "icon_logo", + duration = 4, + end_value = 5, + easing = "outsine", + key_type = "tween", + property_id = "position_y", + }, + { + start_time = 3, + duration = 3, + start_value = -5, + easing = "outsine", + key_type = "tween", + node_id = "icon_druid_left", + end_value = 5, + property_id = "position_y", + }, + { + start_time = 3, + duration = 3, + start_value = -5, + easing = "outsine", + key_type = "tween", + node_id = "icon_druid_right", + end_value = 5, + property_id = "position_y", + }, + { + start_time = 4, + duration = 8, + start_value = 5, + easing = "insine", + key_type = "tween", + node_id = "icon_logo", + property_id = "position_y", + }, + { + start_time = 6, + duration = 6, + start_value = 5, + easing = "outsine", + key_type = "tween", + node_id = "icon_druid_left", + property_id = "position_y", + }, + { + start_time = 6, + duration = 6, + start_value = 5, + easing = "outsine", + key_type = "tween", + node_id = "icon_druid_right", + property_id = "position_y", + }, + }, + }, + { + duration = 0.6, + animation_id = "on_hover_in", + animation_keys = { + { + node_id = "W_Anchor", + duration = 0.6, + end_value = -220, + easing = "outsine", + key_type = "tween", + start_value = -200, + property_id = "position_x", + }, + { + node_id = "text_description", + duration = 0.6, + end_value = -60, + easing = "outsine", + key_type = "tween", + start_value = -50, + property_id = "position_y", + }, + { + node_id = "icon_druid_left", + duration = 0.6, + end_value = 0.7, + easing = "outsine", + key_type = "tween", + start_value = 0.5, + property_id = "color_a", + }, + { + node_id = "icon_druid_right", + duration = 0.6, + end_value = 0.7, + easing = "outsine", + key_type = "tween", + start_value = 0.5, + property_id = "color_a", + }, + { + node_id = "icon_logo", + duration = 0.6, + end_value = 1.1, + easing = "outsine", + key_type = "tween", + start_value = 1, + property_id = "scale_x", + }, + { + node_id = "icon_logo", + duration = 0.6, + end_value = 1.1, + easing = "outsine", + key_type = "tween", + start_value = 1, + property_id = "scale_y", + }, + { + node_id = "icon_logo", + duration = 0.6, + end_value = 1.7, + easing = "outsine", + key_type = "tween", + start_value = 1, + property_id = "color_a", + }, + { + node_id = "E_Anchor", + duration = 0.6, + end_value = 220, + easing = "outsine", + key_type = "tween", + start_value = 200, + property_id = "position_x", + }, + }, + }, + { + duration = 0.3, + animation_id = "on_hover_out", + animation_keys = { + { + node_id = "W_Anchor", + duration = 0.3, + end_value = -200, + easing = "outback", + key_type = "tween", + start_value = -200, + property_id = "position_x", + }, + { + node_id = "text_description", + duration = 0.3, + end_value = -50, + easing = "outback", + key_type = "tween", + start_value = -50, + property_id = "position_y", + }, + { + node_id = "icon_druid_left", + duration = 0.3, + end_value = 0.5, + easing = "outsine", + key_type = "tween", + start_value = 0.5, + property_id = "color_a", + }, + { + node_id = "icon_druid_right", + duration = 0.3, + end_value = 0.5, + easing = "outsine", + key_type = "tween", + start_value = 0.5, + property_id = "color_a", + }, + { + node_id = "icon_logo", + duration = 0.3, + end_value = 1, + easing = "outsine", + key_type = "tween", + start_value = 1, + property_id = "color_a", + }, + { + node_id = "icon_logo", + duration = 0.3, + end_value = 1, + easing = "outback", + key_type = "tween", + start_value = 1, + property_id = "scale_x", + }, + { + node_id = "icon_logo", + duration = 0.3, + end_value = 1, + easing = "outback", + key_type = "tween", + start_value = 1, + property_id = "scale_y", + }, + { + node_id = "E_Anchor", + duration = 0.3, + end_value = 200, + easing = "outback", + key_type = "tween", + start_value = 200, + property_id = "position_x", + }, + }, + }, + }, + metadata = { + gui_path = "/example/components/druid_logo/druid_logo.gui", + settings = { + font_size = 40, + }, + gizmo_steps = { + time = 0.1, + }, + layers = { + { + name = "druid", + color = "73E84C", + }, + { + name = "druid_logo", + color = "90D2F6", + }, + { + name = "text_regular", + color = "C379F0", + }, + }, + fps = 60, + }, + nodes = { + }, + }, + type = "animation_editor", +} \ No newline at end of file diff --git a/example/components/example_scene/example_scene.gui b/example/components/example_scene/example_scene.gui new file mode 100644 index 00000000..93d78778 --- /dev/null +++ b/example/components/example_scene/example_scene.gui @@ -0,0 +1,146 @@ +script: "" +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 1080.0 + y: 1030.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_STRETCH + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -530.0 + y: 505.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.5 + y: 0.5 + z: 1.0 + w: 1.0 + } + size { + x: 1080.0 + y: 520.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Entities: 8\n" + "Top Index: 1\n" + "Bottom Index: 10\n" + "Scroll Size: 200x400\n" + "Grid Size: 400x800" + font: "text_regular" + id: "text_debug_info" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "text_regular" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "text_regular" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/components/example_scene/example_scene.lua b/example/components/example_scene/example_scene.lua new file mode 100644 index 00000000..3a93144c --- /dev/null +++ b/example/components/example_scene/example_scene.lua @@ -0,0 +1,29 @@ +local component = require("druid.component") +local container = require("example.components.container.container") + +---@class example_scene: druid.base_component +---@field root druid.container +---@field text_debug_info druid.text +---@field druid druid_instance +local M = component.create("example_scene") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("text_debug_info") + + self.text_debug_info = self.druid:new_text("text_debug_info") +end + + +---@param info string +function M:set_debug_info(info) + self.text_debug_info:set_to(info) +end + + +return M diff --git a/example/examples/data_list/with_component/with_component.gui b/example/components/examples_list_view/examples_list_view.gui similarity index 63% rename from example/examples/data_list/with_component/with_component.gui rename to example/components/examples_list_view/examples_list_view.gui index 54992cc2..750684c2 100644 --- a/example/examples/data_list/with_component/with_component.gui +++ b/example/components/examples_list_view/examples_list_view.gui @@ -1,11 +1,11 @@ -script: "/example/examples/data_list/with_component/with_component.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,26 +33,26 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 400.0 + y: 910.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/pixel" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" + adjust_mode: ADJUST_MODE_STRETCH + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -67,11 +67,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 370.0 + x: -190.0 + y: 445.0 z: 0.0 w: 1.0 } @@ -82,35 +85,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 700.0 + x: 250.0 y: 60.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Click to select component in DataList" - font: "game" - id: "text_hint_horizontal" + text: "Examples" + font: "text_regular" + id: "text_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -122,20 +125,23 @@ nodes { adjust_mode: ADJUST_MODE_FIT line_break: false parent: "root" - layer: "" + layer: "text_regular" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 200.0 + x: -200.0 + y: 395.0 z: 0.0 w: 1.0 } @@ -152,27 +158,27 @@ nodes { w: 1.0 } size { - x: 450.0 - y: 400.0 + x: 400.0 + y: 850.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_view" + texture: "druid/empty" + id: "scroll_view" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH parent: "root" - layer: "" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -187,6 +193,9 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -208,27 +217,27 @@ nodes { w: 1.0 } size { - x: 450.0 - y: 400.0 + x: 400.0 + y: 850.0 z: 0.0 w: 1.0 } color { x: 1.0 - y: 0.6 - z: 0.4 + y: 1.0 + z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_content" + texture: "druid/empty" + id: "scroll_content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "data_list_view" - layer: "" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "scroll_view" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -243,11 +252,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 157.0 + y: -52.0 z: 0.0 w: 1.0 } @@ -276,14 +288,15 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_component" - parent: "root" + id: "examples_list_view_item" + parent: "scroll_content" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/examples/data_list/with_component/button_component/button_component.gui" + template: "/example/components/examples_list_view/examples_list_view_item.gui" template_node_child: false custom_type: 0 + enabled: true } nodes { position { @@ -305,32 +318,32 @@ nodes { w: 1.0 } size { - x: 450.0 - y: 80.0 + x: 400.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_component/root" + texture: "druid/empty" + id: "examples_list_view_item/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_component" - layer: "" + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_STRETCH + parent: "examples_list_view_item" + layer: "druid" inherit_alpha: true slice9 { - x: 20.0 - y: 20.0 - z: 20.0 + x: 0.0 + y: 0.0 + z: 0.0 w: 0.0 } clipping_mode: CLIPPING_MODE_NONE @@ -340,11 +353,14 @@ nodes { template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -50.0 - y: 8.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -361,54 +377,49 @@ nodes { w: 1.0 } size { - x: 300.0 + x: 400.0 y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Record: 1" - font: "game" - id: "button_component/text" + texture: "druid/pixel" + id: "examples_list_view_item/panel_highlight" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } + pivot: PIVOT_W adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_component/root" - layer: "" + parent: "examples_list_view_item/root" + layer: "druid" inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 0.0 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 175.0 - y: 6.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -425,27 +436,27 @@ nodes { w: 1.0 } size { - x: 49.0 - y: 49.0 + x: 4.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.894 + y: 0.506 + z: 0.333 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/back_green" - id: "button_component/icon" + texture: "druid/pixel" + id: "examples_list_view_item/panel_selected" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W adjust_mode: ADJUST_MODE_FIT - parent: "button_component/root" - layer: "" + parent: "examples_list_view_item/root" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -458,13 +469,16 @@ nodes { clipping_inverted: false alpha: 1.0 template_node_child: true - size_mode: SIZE_MODE_AUTO + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: false + visible: true + material: "" } nodes { position { - x: 0.0 - y: 2.0 + x: 18.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -475,33 +489,33 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.6 + y: 0.6 z: 1.0 w: 1.0 } size { - x: 21.0 - y: 20.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.851 + y: 0.851 + z: 0.851 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "button_component/checkbox" + texture: "druid/icon_arrow" + id: "examples_list_view_item/icon" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_component/icon" - layer: "" + parent: "examples_list_view_item/root" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -516,12 +530,82 @@ nodes { template_node_child: true size_mode: SIZE_MODE_AUTO custom_type: 0 + enabled: false + visible: true + material: "" +} +nodes { + position { + x: 36.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.7 + y: 0.7 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 60.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Basic" + font: "text_bold" + id: "examples_list_view_item/text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "examples_list_view_item/root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_regular" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/examples_list_view/examples_list_view.lua b/example/components/examples_list_view/examples_list_view.lua new file mode 100644 index 00000000..26c1dca9 --- /dev/null +++ b/example/components/examples_list_view/examples_list_view.lua @@ -0,0 +1,172 @@ +local event = require("druid.event") +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") +local storage = require("saver.storage") + +local examples_list_view_item = require("example.components.examples_list_view.examples_list_view_item") + +---@class examples_list_view: druid.base_component +---@field root druid.container +---@field druid druid_instance +---@field scroll druid.scroll +---@field grid druid.static_grid +local M = component.create("examples_list_view") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("text_header") + + self.druid:new(lang_text, "text_header", "ui_examples") + self.druid:new(examples_list_view_item, "examples_list_view_item") + + self.prefab = self:get_node("examples_list_view_item/root") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") + self.grid = self.druid:new_static_grid("scroll_content", self.prefab, 1) + self.scroll:bind_grid(self.grid) + + self.root:add_container("scroll_view", nil, function(_, size) + self.scroll:set_view_size(size) + self.scroll:set_size(self.grid:get_size()) + end) + + self.selected_example = nil + self.examples = {} + self.on_debug_info = event() + self.on_set_information = event() + self.add_log_text = event() + + timer.delay(0.1, true, function() + self:update_debug_info() + end) +end + + +---@param examples druid.examples +---@param druid_example druid.example @The main GUI component +function M:add_example(examples, druid_example) + local example_name_id = examples.example_name_id + local examples_list = examples.examples_list + + if false then + do -- Add section name + local nodes = gui.clone_tree(self.prefab) + local item = self.druid:new(examples_list_view_item, "examples_list_view_item", nodes) --[[@as examples_list_view_item]] + gui.set_enabled(item.root.node, true) + item.text:translate(example_name_id) + item:set_fold_icon_enabled(true) + + item.on_click:subscribe(function() + item:set_fold_status(not item:is_folded()) + end) + + self.grid:add(item.root.node) + end + end + + for index = 1, #examples_list do + local example_data = examples_list[index] + local nodes = gui.clone_tree(self.prefab) + local item = self.druid:new(examples_list_view_item, "examples_list_view_item", nodes) --[[@as examples_list_view_item]] + gui.set_enabled(item.root.node, true) + item.text:translate(example_data.name_id) + item:set_fold_icon_enabled(false) + + item.on_click:subscribe(function() + if self.selected_example then + self.selected_example.list_item:set_selected(false) + druid_example.druid:remove(self.selected_example.instance) + gui.set_enabled(self.selected_example.root, false) + + self.selected_example = nil + end + + local root = gui.get_node(example_data.root) + gui.set_enabled(root, true) + local instance = druid_example.druid:new(example_data.component_class, example_data.template) + + self.selected_example = { + data = example_data, + list_item = item, + instance = instance, + root = root + } + item:set_selected(true) + + druid_example.output_list:clear() + if example_data.on_create then + example_data.on_create(instance, druid_example.output_list) + end + + if example_data.information_text_id then + self.on_set_information(example_data.information_text_id) + else + self.on_set_information("") + end + + druid_example.properties_panel:clear() + if example_data.properties_control then + example_data.properties_control(instance, druid_example.properties_panel) + end + + storage.set("last_selected_example", example_data.name_id) + if html5 then + local command = string.format('window.history.replaceState(null, null, "?example=%s")', example_data.name_id) + html5.run(command) + end + end) + + self.grid:add(item.root.node) + table.insert(self.examples, { + data = example_data, + list_item = item + }) + end +end + + +---@param name_id string +---@return boolean @true if example was found and selected +function M:select_example_by_name_id(name_id) + for index = 1, #self.examples do + local example = self.examples[index] + + -- Scroll to the element + self.scroll:scroll_to(gui.get_position(example.list_item.root.node), true) + + -- Select the element + if example.data.name_id == name_id then + example.list_item.on_click:trigger() + return true + end + end + + return false +end + + +function M:update_debug_info() + if not self.selected_example then + self.on_debug_info:trigger("") + return + end + + local data = self.selected_example.data + if data.get_debug_info then + local info = data.get_debug_info(self.selected_example.instance) + self.on_debug_info:trigger(info) + return + end + + self.on_debug_info:trigger("") +end + + +return M diff --git a/example/components/examples_list_view/examples_list_view_item.gui b/example/components/examples_list_view/examples_list_view_item.gui new file mode 100644 index 00000000..2cef9285 --- /dev/null +++ b/example/components/examples_list_view/examples_list_view_item.gui @@ -0,0 +1,326 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_STRETCH + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "panel_highlight" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 0.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 4.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.894 + y: 0.506 + z: 0.333 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "panel_selected" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: false + visible: true + material: "" +} +nodes { + position { + x: 18.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.6 + y: 0.6 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.851 + y: 0.851 + z: 0.851 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/icon_arrow" + id: "icon" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: false + visible: true + material: "" +} +nodes { + position { + x: 36.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.7 + y: 0.7 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 60.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Basic" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "druid" +} +layers { + name: "text_bold" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/components/examples_list_view/examples_list_view_item.lua b/example/components/examples_list_view/examples_list_view_item.lua new file mode 100644 index 00000000..4793fb58 --- /dev/null +++ b/example/components/examples_list_view/examples_list_view_item.lua @@ -0,0 +1,74 @@ +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + +---@class examples_list_view_item: druid.base_component +---@field root druid.container +---@field text druid.lang_text +---@field druid druid_instance +---@field on_click druid.event +local M = component.create("examples_list_view_item") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.text = self.druid:new(lang_text, "text") --[[ @as druid.lang_text]] + self.icon = self:get_node("icon") + self.selected = self:get_node("panel_selected") + self.highlight = self:get_node("panel_highlight") + + self.color_not_selected = gui.get_color(self.text.node) + self.color_selected = gui.get_outline(self.text.node) + self.color_selected.w = 1 + self._is_folded = true + + self.button = self.druid:new_button("root") + self.button:set_style(nil) + + local hover = self.druid:new_hover("root") + hover.on_mouse_hover:subscribe(self.on_hover) + + -- External Events + self.on_click = self.button.on_click +end + + +---@param is_enabled boolean +function M:set_fold_icon_enabled(is_enabled) + gui.set_enabled(self.icon, is_enabled) +end + + +---@param is_folded boolean +function M:set_fold_status(is_folded) + self._is_folded = is_folded + gui.animate(self.icon, "euler.z", is_folded and 0 or -90, gui.EASING_OUTQUAD, 0.2) +end + + +function M:is_folded() + return self._is_folded +end + + +function M:set_selected(is_selected) + gui.set_enabled(self.selected, is_selected) + + local color = is_selected and self.color_selected or self.color_not_selected + gui.set_color(self.text.node, color) +end + + +function M:on_hover(is_hover) + if is_hover then + gui.animate(self.highlight, "color.w", 1, gui.EASING_OUTQUAD, 0.2) + else + gui.animate(self.highlight, "color.w", 0, gui.EASING_OUTQUAD, 0.1) + end +end + + +return M diff --git a/example/components/output_list/output_list.gui b/example/components/output_list/output_list.gui new file mode 100644 index 00000000..ba1540de --- /dev/null +++ b/example/components/output_list/output_list.gui @@ -0,0 +1,397 @@ +script: "" +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 440.0 + y: 280.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_STRETCH + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -210.0 + y: 130.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.9 + y: 0.9 + z: 1.0 + w: 1.0 + } + size { + x: 245.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Output" + font: "text_regular" + id: "text_header" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "text_regular" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -200.0 + y: 80.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 220.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "scroll_view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 220.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "scroll_content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "scroll_view" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.7 + y: 0.7 + z: 1.0 + w: 1.0 + } + size { + x: 571.4286 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Log text" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "scroll_content" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 140.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 440.0 + y: 4.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "separator" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "druid" +} +layers { + name: "text_regular" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/components/output_list/output_list.lua b/example/components/output_list/output_list.lua new file mode 100644 index 00000000..1a6be69c --- /dev/null +++ b/example/components/output_list/output_list.lua @@ -0,0 +1,68 @@ +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + +---@class output_list: druid.base_component +---@field root druid.container +---@field text_header druid.text +---@field scroll druid.scroll +---@field druid druid_instance +local M = component.create("output_list") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("text_header") + self.root:add_container("separator") + + self.created_texts = {} + self.prefab = self:get_node("text") + gui.set_enabled(self.prefab, false) + + self.grid = self.druid:new_static_grid("scroll_content", "text", 1) + self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") + self.scroll:bind_grid(self.grid) + self.scroll:set_horizontal_scroll(false) + + self.druid:new(lang_text, "text_header", "ui_output") +end + + +---@param text string +function M:add_log_text(text) + local text_node = gui.clone(self.prefab) + gui.set_enabled(text_node, true) + + local text_instance = self.druid:new_text(text_node, text) + self.grid:add(text_instance.node) + table.insert(self.created_texts, text_instance) + + self.scroll:scroll_to_percent(vmath.vector3(0, 0, 0)) + + if #self.created_texts > 64 then + self.grid:remove(1) + self.druid:remove(self.created_texts[1]) + gui.delete_node(self.created_texts[1].node) + table.remove(self.created_texts, 1) + end +end + + +function M:clear() + for index = 1, #self.created_texts do + self.druid:remove(self.created_texts[index]) + end + + local nodes = self.grid.nodes + for index = 1, #nodes do + gui.delete_node(nodes[index]) + end + self.created_texts = {} + self.grid:clear() +end + + +return M diff --git a/example/examples/general/progress_bar/progress_bar.gui b/example/components/panel_druid_profiler/panel_druid_profiler.gui similarity index 68% rename from example/examples/general/progress_bar/progress_bar.gui rename to example/components/panel_druid_profiler/panel_druid_profiler.gui index 24c3154b..e157c467 100644 --- a/example/examples/general/progress_bar/progress_bar.gui +++ b/example/components/panel_druid_profiler/panel_druid_profiler.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/progress_bar/progress_bar.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,25 +33,25 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1080.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT + adjust_mode: ADJUST_MODE_STRETCH layer: "" inherit_alpha: true slice9 { @@ -67,11 +67,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -150.0 - y: 100.0 + x: -530.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -88,8 +91,8 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 45.0 + x: 16.0 + y: 50.0 z: 0.0 w: 1.0 } @@ -101,14 +104,14 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "progress_back_x" + texture: "" + id: "group_memory" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_W adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "image" + layer: "" inherit_alpha: true slice9 { x: 0.0 @@ -123,10 +126,13 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 + x: 89.0 y: 0.0 z: 0.0 w: 1.0 @@ -138,52 +144,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 300.0 - y: 45.0 + x: 200.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.306 + y: 0.31 + z: 0.314 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_fill_yellow" - id: "progress_fill_x" + text: "Memory" + font: "text_bold" + id: "text_memory" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "progress_back_x" - layer: "image" + line_break: false + parent: "group_memory" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 10.0 - y: 0.0 - z: 10.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 150.0 - y: 2.0 + x: 199.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -194,35 +211,35 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 60.0 + x: 200.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "15%" - font: "game" - id: "text_progress_amount_x" + text: "2048" + font: "text_bold" + id: "text_memory_amount" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -233,21 +250,24 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "progress_back_x" - layer: "text" + parent: "group_memory" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -195.0 - y: 123.0 + x: 273.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -258,51 +278,62 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 45.0 - y: 300.0 + x: 200.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.306 + y: 0.31 + z: 0.314 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "progress_back_y" + text: "KB" + font: "text_bold" + id: "text_memory_kb" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" + line_break: false + parent: "group_memory" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 0.0 - y: 10.0 - z: 0.0 - w: 10.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 + x: -130.0 y: 0.0 z: 0.0 w: 1.0 @@ -320,8 +351,8 @@ nodes { w: 1.0 } size { - x: 45.0 - y: 300.0 + x: 16.0 + y: 50.0 z: 0.0 w: 1.0 } @@ -333,20 +364,20 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_fill_yellow" - id: "progress_fill_y" + texture: "druid/empty" + id: "group_fps" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "progress_back_y" - layer: "image" + parent: "root" + layer: "" inherit_alpha: true slice9 { - x: 10.0 - y: 10.0 - z: 10.0 - w: 10.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -355,50 +386,53 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 - y: -150.0 + x: -50.0 + y: 0.0 z: 0.0 w: 1.0 } rotation { x: 0.0 y: 0.0 - z: 90.0 + z: 0.0 w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 60.0 + x: 120.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.306 + y: 0.31 + z: 0.314 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "15%" - font: "game" - id: "text_progress_amount_y" + text: "FPS" + font: "text_bold" + id: "text_fps" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -409,21 +443,24 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "progress_back_y" - layer: "text" + parent: "group_fps" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -150.0 - y: 200.0 + x: 17.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -434,93 +471,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { x: 200.0 - y: 100.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_set_0" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "60" + font: "text_bold" + id: "text_fps_amount" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_S + outline { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { + shadow { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_set_0/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_set_0" - layer: "image" + line_break: false + parent: "group_fps" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 7.0 + x: 65.0 + y: -17.5 z: 0.0 w: 1.0 } @@ -531,31 +538,31 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.6 + y: 0.6 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 100.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Set 0" - font: "game" - id: "button_set_0/text" + text: "/60" + font: "text_bold" + id: "text_fps_min" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_S outline { x: 1.0 y: 1.0 @@ -563,69 +570,30 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_set_0/button" - layer: "text" + parent: "group_fps" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true + shadow_alpha: 0.0 + template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add_25" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 + x: 130.0 y: 0.0 z: 0.0 w: 1.0 @@ -643,8 +611,8 @@ nodes { w: 1.0 } size { - x: 130.0 - y: 60.0 + x: 16.0 + y: 50.0 z: 0.0 w: 1.0 } @@ -656,33 +624,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_25/button" + texture: "druid/empty" + id: "group_components" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_add_25" - layer: "image" + parent: "root" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: true + template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 - y: 7.0 + x: -50.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -693,28 +664,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 350.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.306 + y: 0.31 + z: 0.314 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add 25" - font: "game" - id: "button_add_25/text" + text: "Components" + font: "text_bold" + id: "text_components" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -725,29 +696,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_add_25/button" - layer: "text" + parent: "group_components" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true + shadow_alpha: 0.0 + template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 150.0 - y: 200.0 + x: 90.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -758,36 +731,62 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { x: 200.0 - y: 100.0 + y: 50.0 z: 0.0 w: 1.0 } color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "2004" + font: "text_bold" + id: "text_components_amount" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_set_100" - parent: "root" - layer: "" + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "group_components" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 + x: 530.0 y: 0.0 z: 0.0 w: 1.0 @@ -805,8 +804,8 @@ nodes { w: 1.0 } size { - x: 130.0 - y: 60.0 + x: 16.0 + y: 50.0 z: 0.0 w: 1.0 } @@ -818,33 +817,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_set_100/button" + texture: "" + id: "group_events" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_E adjust_mode: ADJUST_MODE_FIT - parent: "button_set_100" - layer: "image" + parent: "root" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: true + template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 - y: 7.0 + x: -163.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -855,28 +857,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { x: 200.0 - y: 100.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.306 + y: 0.31 + z: 0.314 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Set 100" - font: "game" - id: "button_set_100/text" + text: "Events" + font: "text_bold" + id: "text_events" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -887,29 +889,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_set_100/button" - layer: "text" + parent: "group_events" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true + shadow_alpha: 0.0 + template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 40.0 + x: -59.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -920,35 +924,35 @@ nodes { w: 1.0 } scale { - x: 0.5 - y: 0.5 + x: 0.8 + y: 0.8 z: 1.0 w: 1.0 } size { - x: 500.0 - y: 100.0 + x: 200.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Last step triggered: none" - font: "game" - id: "text_x_hint" + text: "6000" + font: "text_bold" + id: "text_events_amount" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -958,23 +962,26 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" + line_break: false + parent: "group_events" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 0.75 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_bold" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/panel_druid_profiler/panel_druid_profiler.lua b/example/components/panel_druid_profiler/panel_druid_profiler.lua new file mode 100644 index 00000000..974aaf3c --- /dev/null +++ b/example/components/panel_druid_profiler/panel_druid_profiler.lua @@ -0,0 +1,180 @@ +local event = require("druid.event") +local helper = require("druid.helper") +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + + +---@class panel_druid_profiler: druid.base_component +---@field root druid.container +---@field druid druid_instance +local M = component.create("panel_druid_profiler") +local FPS_SAMPLES = 60 + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.group_memory = self.root:add_container("group_memory") + self.group_fps = self.root:add_container("group_fps") + self.group_components = self.root:add_container("group_components") + self.group_events = self.root:add_container("group_events") + + self.druid:new_button("group_memory", self.run_collectgarbage) + + self.group_memory:set_min_size(270, nil) + self.group_fps:set_min_size(270, nil) + self.group_components:set_min_size(270, nil) + self.group_events:set_min_size(270, nil) + + self.text_memory_amount = self.druid:new_text("text_memory_amount") + self.text_fps_amount = self.druid:new_text("text_fps_amount") + self.text_fps_min = self.druid:new_text("text_fps_min") + self.text_components_amount = self.druid:new_text("text_components_amount") + self.text_events_amount = self.druid:new_text("text_events_amount") + + self.druid:new(lang_text, "text_memory", "ui_profiler_memory") + self.druid:new(lang_text, "text_fps", "ui_profiler_fps") + self.druid:new(lang_text, "text_components", "ui_profiler_components") + self.druid:new(lang_text, "text_events", "ui_profiler_events") + + self.previous_time = nil + self.fps_samples = {} + + self.nodes_memory = { + self:get_node("text_memory"), + self:get_node("text_memory_amount"), + self:get_node("text_memory_kb"), + } + self.nodes_fps = { + self:get_node("text_fps"), + self:get_node("text_fps_amount"), + self:get_node("text_fps_min"), + } + self.nodes_components = { + self:get_node("text_components"), + self:get_node("text_components_amount"), + } + self.nodes_events = { + self:get_node("text_events"), + self:get_node("text_events_amount"), + } + + timer.delay(0.16, true, function() + self:update_memory() + self:update_fps() + self:update_components() + self:update_events() + self:align_fps_components() + end) +end + + +function M:on_language_change() + self:update_memory() + self:update_fps() + self:update_components() + self:update_events() + self:align_fps_components() +end + + +function M:update_memory() + local memory = collectgarbage("count") + self.text_memory_amount:set_to(tostring(math.ceil(memory))) + + local width = helper.centrate_nodes(2, unpack(self.nodes_memory)) + for index = 1, #self.nodes_memory do + local node = self.nodes_memory[index] + local position_x = gui.get(node, "position.x") + gui.set(node, "position.x", position_x + width/2) + end + self.group_memory:set_size(width, nil) +end + + +function M:update_fps() + local average_frame_time = 0 + local max_frame_time = 0 + for index = 1, #self.fps_samples do + average_frame_time = average_frame_time + self.fps_samples[index] + max_frame_time = math.max(max_frame_time, self.fps_samples[index]) + end + average_frame_time = average_frame_time / #self.fps_samples + + self.text_fps_amount:set_to(tostring(math.ceil(1 / average_frame_time))) + self.text_fps_min:set_to("/ " .. tostring(math.ceil(1 / max_frame_time))) + + local width = helper.centrate_nodes(2, unpack(self.nodes_fps)) + self.group_fps:set_size(width, nil) +end + + +function M:update_components() + ---@diagnostic disable-next-line: undefined-field + local components = #self.druid.components_all + + self.text_components_amount:set_to(tostring(components)) + local width = helper.centrate_nodes(2, unpack(self.nodes_components)) + self.group_components:set_size(width, nil) +end + + +function M:update_events() + self.text_events_amount:set_to(tostring(event.COUNTER)) + + local width = helper.centrate_nodes(2, unpack(self.nodes_events)) + for index = 1, #self.nodes_events do + local node = self.nodes_events[index] + local position_x = gui.get(node, "position.x") + gui.set(node, "position.x", position_x - width/2) + end + self.group_events:set_size(width, nil) +end + + +function M:align_fps_components() + local pos_x_memory = gui.get(self.group_memory.node, "position.x") + gui.get(self.group_memory.node, "size.x") + local pos_x_events = gui.get(self.group_events.node, "position.x") - gui.get(self.group_events.node, "size.x") + local width = pos_x_events - pos_x_memory + + -- Align FPS and Components + local fps_size = gui.get(self.group_fps.node, "size.x") + local components_size = gui.get(self.group_components.node, "size.x") + + local free_width = width - fps_size - components_size + gui.set(self.group_fps.node, "position.x", pos_x_memory + fps_size/2 + free_width/3) + gui.set(self.group_components.node, "position.x", pos_x_events - components_size/2 - free_width/3) +end + + +function M:update() + self:sample_fps() +end + + +function M:sample_fps() + if not self.previous_time then + self.previous_time = socket.gettime() + return + end + + local current_time = socket.gettime() + local delta_time = current_time - self.previous_time + self.previous_time = current_time + + table.insert(self.fps_samples, delta_time) + if #self.fps_samples > FPS_SAMPLES then + table.remove(self.fps_samples, 1) + end +end + + +function M:run_collectgarbage() + collectgarbage("collect") +end + + +return M diff --git a/example/components/panel_information/panel_information.gui b/example/components/panel_information/panel_information.gui new file mode 100644 index 00000000..e9df7b8d --- /dev/null +++ b/example/components/panel_information/panel_information.gui @@ -0,0 +1,259 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 440.0 + y: 450.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/pixel" + id: "root" + adjust_mode: ADJUST_MODE_STRETCH + layer: "druid" + inherit_alpha: true +} +nodes { + position { + x: -210.0 + y: 215.0 + } + scale { + x: 0.9 + y: 0.9 + } + size { + x: 245.0 + y: 50.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_TEXT + text: "Information" + font: "text_regular" + id: "text_header" + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "root" + layer: "text_regular" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + y: -225.0 + } + size { + x: 16.0 + y: 16.0 + } + type: TYPE_BOX + id: "S_Anchor" + pivot: PIVOT_S + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 60.0 + } + type: TYPE_TEMPLATE + id: "button_view_code" + parent: "S_Anchor" + inherit_alpha: true + template: "/example/templates/button_text_blue.gui" +} +nodes { + size { + x: 240.0 + y: 80.0 + } + type: TYPE_BOX + id: "button_view_code/root" + parent: "button_view_code" + overridden_fields: 4 + template_node_child: true +} +nodes { + scale { + x: 0.75 + y: 0.75 + } + type: TYPE_TEXT + text: "View code" + id: "button_view_code/text" + parent: "button_view_code/root" + overridden_fields: 3 + overridden_fields: 8 + template_node_child: true +} +nodes { + position { + x: 220.0 + y: 225.0 + } + size { + x: 16.0 + y: 16.0 + } + type: TYPE_BOX + id: "NE_Anchor" + pivot: PIVOT_NE + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -85.0 + y: -32.5 + } + type: TYPE_TEMPLATE + id: "button_profiler" + parent: "NE_Anchor" + inherit_alpha: true + template: "/example/templates/button_text_yellow.gui" +} +nodes { + size { + x: 130.0 + y: 35.0 + } + type: TYPE_BOX + texture: "druid/ui_circle_8" + id: "button_profiler/root" + parent: "button_profiler" + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + overridden_fields: 4 + overridden_fields: 9 + overridden_fields: 22 + template_node_child: true +} +nodes { + scale { + x: 0.6 + y: 0.6 + } + size { + x: 190.0 + y: 50.0 + } + type: TYPE_TEXT + text: "Profiler" + id: "button_profiler/text" + parent: "button_profiler/root" + overridden_fields: 3 + overridden_fields: 4 + overridden_fields: 8 + template_node_child: true +} +nodes { + position { + x: -200.0 + y: 150.0 + } + size { + x: 400.0 + y: 250.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "scroll_view" + pivot: PIVOT_NW + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + size { + x: 400.0 + y: 250.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "scroll_content" + pivot: PIVOT_NW + parent: "scroll_view" + inherit_alpha: true + visible: false +} +nodes { + scale { + x: 0.75 + y: 0.75 + } + size { + x: 535.0 + y: 270.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_TEXT + text: "The default example how to use the button and bind the callbacks on them" + font: "text_regular" + id: "text_description" + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + line_break: true + parent: "scroll_content" + layer: "text_bold" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +layers { + name: "druid" +} +layers { + name: "text_bold" +} +layers { + name: "text_regular" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/panel_information/panel_information.lua b/example/components/panel_information/panel_information.lua new file mode 100644 index 00000000..fd0a35ef --- /dev/null +++ b/example/components/panel_information/panel_information.lua @@ -0,0 +1,62 @@ +local lang = require("lang.lang") +local component = require("druid.component") + +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") +local rich_text = require("druid.custom.rich_text.rich_text") + +---@class panel_information: druid.base_component +---@field root druid.container +---@field text_header druid.lang_text +---@field rich_text druid.rich_text +---@field druid druid_instance +local PanelInformation = component.create("panel_information") + +---@param template string +---@param nodes table +function PanelInformation:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("text_header") + self.root:add_container("scroll_view") + self.root:add_container("S_Anchor") + self.root:add_container("NE_Anchor") + + self.druid:new(lang_text, "text_header", "ui_information") + self.druid:new(lang_text, "button_profiler/text", "ui_profiler") + + --self.text_description = self.druid:new(lang_text, "text_description", "") --[[@as druid.lang_text]] + self.rich_text = self.druid:new(rich_text, "text_description") + self.button_profiler = self.druid:new_button("button_profiler/root", self.on_profiler_click) + self.button_profiler:set_key_trigger("key_p") + self.button_view_code = self.druid:new_button("button_view_code/root") + + -- Disable profiler button for HTML5 + gui.set_enabled(self.button_profiler.node, not html5) +end + + +function PanelInformation:set_text(text_id) + local text = lang.txt(text_id) + self.rich_text:set_text(text) +end + + +function PanelInformation:on_profiler_click() + if self._profiler_mode == nil then + self._profiler_mode = profiler.VIEW_MODE_MINIMIZED + profiler.enable_ui(true) + profiler.set_ui_view_mode(self._profiler_mode) + elseif self._profiler_mode == profiler.VIEW_MODE_MINIMIZED then + self._profiler_mode = profiler.VIEW_MODE_FULL + profiler.enable_ui(true) + profiler.set_ui_view_mode(self._profiler_mode) + else + self._profiler_mode = nil + profiler.enable_ui(false) + end +end + + +return PanelInformation diff --git a/example/components/properties_panel/properties/property_button.gui b/example/components/properties_panel/properties/property_button.gui new file mode 100644 index 00000000..20e46808 --- /dev/null +++ b/example/components/properties_panel/properties/property_button.gui @@ -0,0 +1,328 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.65 + y: 0.65 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Button" + font: "text_bold" + id: "text_name" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 267.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 226.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/rect_round2_width1" + id: "button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 226.0 + y: 4.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.894 + y: 0.506 + z: 0.333 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "selected" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_S + adjust_mode: ADJUST_MODE_STRETCH + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.65 + y: 0.65 + z: 1.0 + w: 1.0 + } + size { + x: 250.0 + y: 30.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Button" + font: "text_bold" + id: "text_button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/components/properties_panel/properties/property_button.lua b/example/components/properties_panel/properties/property_button.lua new file mode 100644 index 00000000..9ffa273d --- /dev/null +++ b/example/components/properties_panel/properties/property_button.lua @@ -0,0 +1,33 @@ +local component = require("druid.component") +local lang_text = require("druid.extended.lang_text") + +---@class property_button: druid.base_component +---@field root node +---@field text_name druid.lang_text +---@field button druid.button +---@field text_button druid.text +---@field druid druid_instance +local M = component.create("property_button") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.text_name = self.druid:new(lang_text, "text_name") --[[@as druid.lang_text]] + self.selected = self:get_node("selected") + gui.set_alpha(self.selected, 0) + + self.button = self.druid:new_button("button", self.on_click) + self.text_button = self.druid:new_text("text_button") +end + + +function M:on_click() + gui.set_alpha(self.selected, 1) + gui.animate(self.selected, "color.w", 0, gui.EASING_INSINE, 0.16) +end + + +return M diff --git a/example/components/properties_panel/properties/property_checkbox.gui b/example/components/properties_panel/properties/property_checkbox.gui new file mode 100644 index 00000000..69de5019 --- /dev/null +++ b/example/components/properties_panel/properties/property_checkbox.gui @@ -0,0 +1,320 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.65 + y: 0.65 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Checkbox" + font: "text_bold" + id: "text_name" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 174.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 40.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/rect_round2_width1" + id: "button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/icon_check" + id: "icon" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: -20.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 40.0 + y: 4.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.894 + y: 0.506 + z: 0.333 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "selected" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_S + adjust_mode: ADJUST_MODE_STRETCH + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/components/properties_panel/properties/property_checkbox.lua b/example/components/properties_panel/properties/property_checkbox.lua new file mode 100644 index 00000000..aec6c9fe --- /dev/null +++ b/example/components/properties_panel/properties/property_checkbox.lua @@ -0,0 +1,54 @@ +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + +---@class property_checkbox: druid.base_component +---@field druid druid_instance +---@field root druid.container +---@field text_name druid.lang_text +---@field button druid.button +---@field selected node +local M = component.create("property_checkbox") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.root = self.druid:new(container, "root") --[[@as druid.container]] + + self.icon = self:get_node("icon") + gui.set_enabled(self.icon, false) + + self.selected = self:get_node("selected") + gui.set_alpha(self.selected, 0) + + self.text_name = self.druid:new(lang_text, "text_name") --[[@as druid.lang_text]] + + self.button = self.druid:new_button("button") +end + + +---@param value boolean +function M:set_value(value, is_instant) + if self._value == value then + return + end + + self._value = value + gui.set_enabled(self.icon, value) + + if not is_instant then + gui.set_alpha(self.selected, 1) + gui.animate(self.selected, "color.w", 0, gui.EASING_INSINE, 0.16) + end +end + + +---@return boolean +function M:get_value() + return self._value +end + + +return M diff --git a/example/examples/data_list/dynamic_grid/dynamic_grid.gui b/example/components/properties_panel/properties/property_slider.gui similarity index 69% rename from example/examples/data_list/dynamic_grid/dynamic_grid.gui rename to example/components/properties_panel/properties/property_slider.gui index e72acc66..111ff614 100644 --- a/example/examples/data_list/dynamic_grid/dynamic_grid.gui +++ b/example/components/properties_panel/properties/property_slider.gui @@ -1,11 +1,11 @@ -script: "/example/examples/data_list/dynamic_grid/dynamic_grid.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 400.0 + y: 40.0 z: 0.0 w: 1.0 } @@ -46,12 +46,12 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH layer: "" inherit_alpha: true slice9 { @@ -66,11 +66,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 380.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -81,35 +85,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 0.65 + y: 0.65 z: 1.0 w: 1.0 } size { - x: 700.0 - y: 60.0 + x: 200.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Data List with vertical Dynamic Grid:" - font: "game" - id: "text_hint_vertical" + text: "Checkbox" + font: "text_bold" + id: "text_name" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -124,16 +128,20 @@ nodes { layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 350.0 + x: 400.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -150,25 +158,25 @@ nodes { w: 1.0 } size { - x: 250.0 - y: 450.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_vertical" + texture: "druid/empty" + id: "E_Anchor" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT + pivot: PIVOT_E + adjust_mode: ADJUST_MODE_STRETCH parent: "root" layer: "" inherit_alpha: true @@ -178,16 +186,20 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 + x: -20.0 y: 0.0 z: 0.0 w: 1.0 @@ -205,33 +217,33 @@ nodes { w: 1.0 } size { - x: 250.0 - y: 450.0 + x: 60.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 0.8 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "data_list_vertical_content" + texture: "druid/rect_round2_width1" + id: "button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_E adjust_mode: ADJUST_MODE_FIT - parent: "data_list_vertical" + parent: "E_Anchor" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -239,11 +251,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: -162.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -254,59 +270,55 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 700.0 - y: 60.0 + x: 60.0 + y: 4.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.894 + y: 0.506 + z: 0.333 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Data List with horizontal Dynamic Grid:" - font: "game" - id: "text_hint_horizontal" + texture: "druid/pixel" + id: "selected" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { + pivot: PIVOT_SE + adjust_mode: ADJUST_MODE_STRETCH + parent: "button" + layer: "" + inherit_alpha: true + slice9 { x: 0.0 y: 0.0 z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 + w: 0.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: -200.0 + x: -30.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -317,51 +329,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.55 + y: 0.55 z: 1.0 w: 1.0 } size { - x: 600.0 - y: 120.0 + x: 100.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_horizontal" + text: "25 %" + font: "text_bold" + id: "text_value" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "root" + line_break: false + parent: "button" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -300.0 - y: -60.0 + x: 234.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -378,26 +402,26 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 120.0 + x: 160.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 0.8 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "data_list_horizontal_content" + texture: "druid/empty" + id: "slider" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_horizontal" + parent: "root" layer: "" inherit_alpha: true slice9 { @@ -412,11 +436,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 636.0 - y: -78.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -433,33 +461,33 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 60.0 + x: 160.0 + y: 8.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab" + texture: "druid/ui_circle_8" + id: "slider_back" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" + parent: "slider" + layer: "" inherit_alpha: true slice9 { - x: 20.0 - y: 10.0 - z: 20.0 - w: 20.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -467,11 +495,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 4.0 + x: -68.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -482,60 +514,50 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 50.0 + x: 24.0 + y: 24.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Record 1" - font: "game" - id: "text" + texture: "druid/ui_circle_8" + id: "slider_pin" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.3019608 - y: 0.4 - z: 0.8 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "prefab" - layer: "text" + parent: "slider" + layer: "" inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/properties_panel/properties/property_slider.lua b/example/components/properties_panel/properties/property_slider.lua new file mode 100644 index 00000000..d5ada5f7 --- /dev/null +++ b/example/components/properties_panel/properties/property_slider.lua @@ -0,0 +1,75 @@ +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") +local slider = require("druid.extended.slider") + +---@class property_slider: druid.base_component +---@field druid druid_instance +---@field root druid.container +---@field text_name druid.lang_text +---@field text_value druid.text +---@field slider druid.slider +local M = component.create("property_slider") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.selected = self:get_node("selected") + gui.set_alpha(self.selected, 0) + self._value = 0 + + self.text_name = self.druid:new(lang_text, "text_name") --[[@as druid.lang_text]] + self.text_value = self.druid:new_text("text_value") + self.slider = self.druid:new(slider, "slider_pin", vmath.vector3(68, 0, 0), self._on_slider_change_by_user) --[[@as druid.slider]] + self.slider:set_input_node("slider") + + self:set_text_function(function(value) + return math.floor(value * 100) .. "%" + end) +end + + +---@param callback fun(value:number):string +function M:set_text_function(callback) + self._text_function = callback + self.text_value:set_to(self._text_function(self._value)) +end + + +---@param value number +function M:set_value(value, is_instant) + if self._value == value then + return + end + + self._value = value + self.slider:set(value, true) + self.text_value:set_to(self._text_function(value)) + + if not is_instant then + gui.set_alpha(self.selected, 1) + gui.animate(self.selected, "color.w", 0, gui.EASING_INSINE, 0.16) + end +end + + +---@return number +function M:get_value() + return self._value +end + + +function M:_on_slider_change_by_user(value) + self._value = value + self.text_value:set_to(self._text_function(value)) + + gui.set_alpha(self.selected, 1) + gui.animate(self.selected, "color.w", 0, gui.EASING_INSINE, 0.16) +end + + +return M diff --git a/example/examples/data_list/navigate/navigate.gui b/example/components/properties_panel/properties_panel.gui similarity index 68% rename from example/examples/data_list/navigate/navigate.gui rename to example/components/properties_panel/properties_panel.gui index 2c12bb25..49cc6009 100644 --- a/example/examples/data_list/navigate/navigate.gui +++ b/example/components/properties_panel/properties_panel.gui @@ -1,11 +1,11 @@ -script: "/example/examples/data_list/navigate/navigate.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,26 +33,26 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 440.0 + y: 350.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/pixel" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" + adjust_mode: ADJUST_MODE_STRETCH + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -66,11 +66,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 359.0 + x: -210.0 + y: 165.0 z: 0.0 w: 1.0 } @@ -81,51 +85,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 1.0 - y: 1.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_static" + text: "Properties" + font: "text_regular" + id: "text_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT + line_break: false parent: "root" - layer: "" + layer: "text_regular" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_AUTO + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 4.0 + x: -200.0 + y: 115.0 z: 0.0 w: 1.0 } @@ -136,14 +152,14 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 700.0 - y: 60.0 + x: 400.0 + y: 290.0 z: 0.0 w: 1.0 } @@ -153,42 +169,38 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Simple navigate, static grid" - font: "game" - id: "text_hint_horizontal" - xanchor: XANCHOR_NONE + texture: "druid/empty" + id: "scroll_view" + xanchor: XANCHOR_LEFT yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "root" + layer: "druid" + inherit_alpha: true + slice9 { x: 0.0 y: 0.0 z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 + w: 0.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_static" - layer: "" - inherit_alpha: true + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -2.0 - y: -103.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -206,26 +218,26 @@ nodes { } size { x: 400.0 - y: 100.0 + y: 290.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_simple" + texture: "druid/empty" + id: "scroll_content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "info_static" - layer: "" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "scroll_view" + layer: "druid" inherit_alpha: true slice9 { x: 0.0 @@ -233,17 +245,21 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -200.0 - y: -50.0 + x: 0.0 + y: -35.0 z: 0.0 w: 1.0 } @@ -261,25 +277,25 @@ nodes { } size { x: 400.0 - y: 100.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 - z: 0.8 + z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA texture: "" - id: "data_list_simple_content" + id: "item_size" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_NW adjust_mode: ADJUST_MODE_FIT - parent: "data_list_simple" + parent: "scroll_content" layer: "" inherit_alpha: true slice9 { @@ -294,11 +310,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 450.0 - y: -83.0 + x: 0.0 + y: 175.0 z: 0.0 w: 1.0 } @@ -315,32 +335,32 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 70.0 + x: 440.0 + y: 4.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab_square" + texture: "druid/pixel" + id: "separator" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "info_static" - layer: "image" + parent: "root" + layer: "druid" inherit_alpha: true slice9 { - x: 20.0 + x: 0.0 y: 0.0 - z: 20.0 + z: 0.0 w: 0.0 } clipping_mode: CLIPPING_MODE_NONE @@ -349,11 +369,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 4.0 + x: -200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -364,14 +388,14 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 70.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -381,42 +405,38 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "001" - font: "game" - id: "text_square" + texture: "druid/empty" + id: "propeties" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.3019608 - y: 0.4 - z: 0.8 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "prefab_square" - layer: "text" + parent: "root" + layer: "" inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -110.0 - y: -63.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -445,13 +465,15 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_simple_first" - parent: "info_static" + id: "property_slider" + parent: "propeties" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/components/properties_panel/properties/property_slider.gui" template_node_child: false + custom_type: 0 + enabled: true } nodes { position { @@ -473,8 +495,8 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 400.0 + y: 40.0 z: 0.0 w: 1.0 } @@ -486,33 +508,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_first/button" + texture: "druid/empty" + id: "property_slider/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_first" - layer: "image" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_slider" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -523,31 +548,31 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.65 + y: 0.65 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 200.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "First" - font: "game" - id: "button_simple_first/text" + text: "Checkbox" + font: "text_bold" + id: "property_slider/text_name" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W outline { x: 1.0 y: 1.0 @@ -555,29 +580,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_simple_first/button" - layer: "text" + parent: "property_slider/root" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 + shadow_alpha: 0.0 template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: -63.0 + x: 400.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -605,18 +632,37 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_simple_hundred" - parent: "info_static" + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "property_slider/E_Anchor" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_E + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_slider/root" layer: "" inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false + template_node_child: true + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 0.0 + x: -20.0 y: 0.0 z: 0.0 w: 1.0 @@ -634,46 +680,49 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 60.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_hundred/button" + texture: "druid/rect_round2_width1" + id: "property_slider/button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_E adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_hundred" - layer: "image" + parent: "property_slider/E_Anchor" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -684,28 +733,87 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 5.0 - y: 100.0 + x: 60.0 + y: 4.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.894 + y: 0.506 + z: 0.333 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "property_slider/selected" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_SE + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_slider/button" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -30.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 0.55 + y: 0.55 z: 1.0 w: 1.0 } + size { + x: 100.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "100" - font: "game" - id: "button_simple_hundred/text" + text: "25 %" + font: "text_bold" + id: "property_slider/text_value" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -716,29 +824,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_simple_hundred/button" - layer: "text" + parent: "property_slider/button" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 + shadow_alpha: 0.0 template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 110.0 - y: -63.0 + x: 234.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -755,86 +865,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 160.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_simple_last" - parent: "info_static" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 90.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_last/button" + texture: "druid/empty" + id: "property_slider/slider" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_last" - layer: "image" + parent: "property_slider/root" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -845,61 +918,55 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 160.0 + y: 8.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.129 + y: 0.141 + z: 0.157 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Last" - font: "game" - id: "button_simple_last/text" + texture: "druid/ui_circle_8" + id: "property_slider/slider_back" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_simple_last/button" - layer: "text" + parent: "property_slider/slider" + layer: "" inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: -219.0 + x: -68.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -916,45 +983,49 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 4.0 + x: 24.0 + y: 24.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "scroll_slider" + texture: "druid/ui_circle_8" + id: "property_slider/slider_pin" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "info_static" - layer: "image" + parent: "property_slider/slider" + layer: "" inherit_alpha: true slice9 { - x: 10.0 - y: 0.0 - z: 10.0 - w: 0.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -200.0 - y: 0.0 + x: 0.0 + y: -50.0 z: 0.0 w: 1.0 } @@ -965,14 +1036,14 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 36.0 - y: 36.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -982,34 +1053,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "grid_scroll_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "scroll_slider" - layer: "image" + type: TYPE_TEMPLATE + id: "property_checkbox" + parent: "propeties" + layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/components/properties_panel/properties/property_checkbox.gui" template_node_child: false - size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true } nodes { position { x: 0.0 - y: -50.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1026,8 +1084,8 @@ nodes { w: 1.0 } size { - x: 1.0 - y: 1.0 + x: 400.0 + y: 40.0 z: 0.0 w: 1.0 } @@ -1039,13 +1097,13 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_dynamic" + texture: "druid/empty" + id: "property_checkbox/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_checkbox" layer: "" inherit_alpha: true slice9 { @@ -1058,13 +1116,17 @@ nodes { clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 4.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1075,35 +1137,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 0.65 + y: 0.65 z: 1.0 w: 1.0 } size { - x: 700.0 - y: 60.0 + x: 200.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Simple navigate with DynamicGrid" - font: "game" - id: "text_hint_dynamic" + text: "Checkbox" + font: "text_bold" + id: "property_checkbox/text_name" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -1114,20 +1176,24 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "info_dynamic" + parent: "property_checkbox/root" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -2.0 - y: -103.0 + x: 174.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1144,45 +1210,49 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 100.0 + x: 40.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_dynamic" + texture: "druid/rect_round2_width1" + id: "property_checkbox/button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "info_dynamic" + parent: "property_checkbox/root" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -200.0 - y: -50.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1199,26 +1269,26 @@ nodes { w: 1.0 } size { - x: 400.0 + x: 200.0 y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 0.8 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_dynamic_content" + texture: "druid/icon_check" + id: "property_checkbox/icon" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_dynamic" + parent: "property_checkbox/button" layer: "" inherit_alpha: true slice9 { @@ -1231,53 +1301,17 @@ nodes { clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -110.0 - y: -63.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_dynamic_first" - parent: "info_dynamic" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false + template_node_child: true + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1294,111 +1328,49 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 40.0 + y: 4.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.894 + y: 0.506 + z: 0.333 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_dynamic_first/button" + texture: "druid/pixel" + id: "property_checkbox/selected" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_dynamic_first" - layer: "image" + pivot: PIVOT_S + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_checkbox/button" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "First" - font: "game" - id: "button_dynamic_first/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_dynamic_first/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -63.0 + y: -100.0 z: 0.0 w: 1.0 } @@ -1427,13 +1399,15 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_dynamic_hundred" - parent: "info_dynamic" + id: "property_button" + parent: "propeties" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/components/properties_panel/properties/property_button.gui" template_node_child: false + custom_type: 0 + enabled: true } nodes { position { @@ -1455,8 +1429,8 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 400.0 + y: 40.0 z: 0.0 w: 1.0 } @@ -1468,33 +1442,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_dynamic_hundred/button" + texture: "druid/empty" + id: "property_button/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_dynamic_hundred" - layer: "image" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_button" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1505,31 +1482,31 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.65 + y: 0.65 z: 1.0 w: 1.0 } size { - x: 5.0 - y: 100.0 + x: 200.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "100" - font: "game" - id: "button_dynamic_hundred/text" + text: "Button" + font: "text_bold" + id: "property_button/text_name" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W outline { x: 1.0 y: 1.0 @@ -1537,29 +1514,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_dynamic_hundred/button" - layer: "text" + parent: "property_button/root" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 + shadow_alpha: 0.0 template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 110.0 - y: -63.0 + x: 267.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1576,30 +1555,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 226.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_dynamic_last" - parent: "info_dynamic" + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/rect_round2_width1" + id: "property_button/button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "property_button/root" layer: "" inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -20.0 z: 0.0 w: 1.0 } @@ -1616,46 +1614,49 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 226.0 + y: 4.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.894 + y: 0.506 + z: 0.333 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_dynamic_last/button" + texture: "druid/pixel" + id: "property_button/selected" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_dynamic_last" - layer: "image" + pivot: PIVOT_S + adjust_mode: ADJUST_MODE_STRETCH + parent: "property_button/button" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1666,28 +1667,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.65 + y: 0.65 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 250.0 + y: 30.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Last" - font: "game" - id: "button_dynamic_last/text" + text: "Button" + font: "text_bold" + id: "property_button/text_button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -1698,29 +1699,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_dynamic_last/button" - layer: "text" + parent: "property_button/button" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 + shadow_alpha: 0.0 template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: -219.0 + x: -200.0 + y: 115.0 z: 0.0 w: 1.0 } @@ -1731,107 +1734,64 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.7 + y: 0.7 z: 1.0 w: 1.0 } size { - x: 400.0 - y: 4.0 + x: 570.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "dynamic_slider" + text: "No properties for this example" + font: "text_regular" + id: "text_no_properties" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_dynamic" - layer: "image" - inherit_alpha: true - slice9 { - x: 10.0 - y: 0.0 - z: 10.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -200.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { + shadow { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "grid_scroll_dynamic_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "dynamic_slider" - layer: "image" + line_break: false + parent: "root" + layer: "text_regular" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_AUTO + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_regular" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/components/properties_panel/properties_panel.lua b/example/components/properties_panel/properties_panel.lua new file mode 100644 index 00000000..ace064da --- /dev/null +++ b/example/components/properties_panel/properties_panel.lua @@ -0,0 +1,128 @@ +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + +local property_checkbox = require("example.components.properties_panel.properties.property_checkbox") +local property_slider = require("example.components.properties_panel.properties.property_slider") +local property_button = require("example.components.properties_panel.properties.property_button") + +---@class properties_panel: druid.base_component +---@field root druid.container +---@field text_no_properties druid.lang_text +---@field scroll druid.scroll +---@field druid druid_instance +local M = component.create("properties_panel") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self.druid:new(container, "root") --[[@as druid.container]] + self.root:add_container("text_header") + self.root:add_container("separator") + --self.root:add_container("scroll_view", nil, function() + -- self.scroll:update_view_size() + --end) + + self.properties = {} + + self.druid:new(lang_text, "text_header", "ui_properties_panel") + self.text_no_properties = self.druid:new(lang_text, "text_no_properties", "ui_no_properties") --[[@as druid.lang_text]] + + self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") + self.grid = self.druid:new_static_grid("scroll_content", "item_size", 1) + self.scroll:bind_grid(self.grid) + + self.property_checkbox_prefab = self:get_node("property_checkbox/root") + gui.set_enabled(self.property_checkbox_prefab, false) + + self.property_slider_prefab = self:get_node("property_slider/root") + gui.set_enabled(self.property_slider_prefab, false) + + self.property_button_prefab = self:get_node("property_button/root") + gui.set_enabled(self.property_button_prefab, false) +end + + +function M:clear() + for index = 1, #self.properties do + self.druid:remove(self.properties[index]) + end + self.properties = {} + + local nodes = self.grid.nodes + for index = 1, #nodes do + gui.delete_node(nodes[index]) + end + self.grid:clear() + + gui.set_enabled(self.text_no_properties.text.node, true) +end + + +---@param text_id string +---@param initial_value boolean +---@param on_change_callback function +---@return property_checkbox +function M:add_checkbox(text_id, initial_value, on_change_callback) + local nodes = gui.clone_tree(self.property_checkbox_prefab) + local instance = self.druid:new(property_checkbox, "property_checkbox", nodes) --[[@as property_checkbox]] + instance.text_name:translate(text_id) + instance:set_value(initial_value, true) + instance.button.on_click:subscribe(function() + instance:set_value(not instance:get_value()) + on_change_callback(instance:get_value()) + end) + + gui.set_enabled(instance.root.node, true) + self.grid:add(instance.root.node) + table.insert(self.properties, instance) + gui.set_enabled(self.text_no_properties.text.node, false) + + return instance +end + + +---@param text_id string +---@param initial_value number +---@param on_change_callback function +---@return property_slider +function M:add_slider(text_id, initial_value, on_change_callback) + local nodes = gui.clone_tree(self.property_slider_prefab) + local instance = self.druid:new(property_slider, "property_slider", nodes) --[[@as property_slider]] + instance.text_name:translate(text_id) + instance:set_value(initial_value, true) + + gui.set_enabled(instance.root.node, true) + self.grid:add(instance.root.node) + table.insert(self.properties, instance) + gui.set_enabled(self.text_no_properties.text.node, false) + + instance.slider.on_change_value:subscribe(function(_, value) + on_change_callback(value) + end) + + return instance +end + + +---@param text_id string +---@param on_click_callback function +function M:add_button(text_id, on_click_callback) + local nodes = gui.clone_tree(self.property_button_prefab) + local instance = self.druid:new(property_button, "property_button", nodes) --[[@as property_button]] + instance.text_name:translate(text_id) + + gui.set_enabled(instance.root, true) + self.grid:add(instance.root) + table.insert(self.properties, instance) + gui.set_enabled(self.text_no_properties.text.node, false) + + instance.button.on_click:subscribe(on_click_callback) + + return instance +end + + +return M diff --git a/example/custom.display_profiles b/example/custom.display_profiles deleted file mode 100644 index 921fa6a8..00000000 --- a/example/custom.display_profiles +++ /dev/null @@ -1,14 +0,0 @@ -profiles { - name: "Landscape" - qualifiers { - width: 900 - height: 600 - } -} -profiles { - name: "Portrait" - qualifiers { - width: 600 - height: 900 - } -} diff --git a/example/custom.texture_profiles b/example/custom.texture_profiles deleted file mode 100644 index 5b0d7762..00000000 --- a/example/custom.texture_profiles +++ /dev/null @@ -1,18 +0,0 @@ -path_settings { - path: "**" - profile: "Default" -} -profiles { - name: "Default" - platforms { - os: OS_ID_GENERIC - formats { - format: TEXTURE_FORMAT_RGBA - compression_level: BEST - compression_type: COMPRESSION_TYPE_DEFAULT - } - mipmaps: false - max_texture_size: 0 - premultiply_alpha: true - } -} diff --git a/example/examples/general/hover/hover.collection b/example/druid.collection similarity index 81% rename from example/examples/general/hover/hover.collection rename to example/druid.collection index e7a70b01..5273ec07 100644 --- a/example/examples/general/hover/hover.collection +++ b/example/druid.collection @@ -1,10 +1,10 @@ -name: "hover" +name: "example" scale_along_z: 0 embedded_instances { id: "go" data: "components {\n" - " id: \"hover\"\n" - " component: \"/example/examples/general/hover/hover.gui\"\n" + " id: \"druid\"\n" + " component: \"/example/druid.gui\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" diff --git a/example/druid.gui b/example/druid.gui new file mode 100644 index 00000000..c6ba7a0f --- /dev/null +++ b/example/druid.gui @@ -0,0 +1,3610 @@ +script: "/example/druid.gui_script" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +textures { + name: "druid_logo" + texture: "/example/assets/druid_logo.atlas" +} +nodes { + position { + x: 960.0 + y: 540.0 + } + size { + x: 1920.0 + y: 1080.0 + } + type: TYPE_BOX + id: "root" + adjust_mode: ADJUST_MODE_STRETCH + inherit_alpha: true + visible: false +} +nodes { + position { + x: -960.0 + } + size { + x: 400.0 + y: 1080.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_left" + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_STRETCH + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 540.0 + } + size { + x: 400.0 + y: 170.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_logo" + pivot: PIVOT_NW + parent: "container_left" + inherit_alpha: true + visible: false +} +nodes { + position { + x: 200.0 + y: -85.0 + } + type: TYPE_TEMPLATE + id: "druid_logo" + parent: "container_logo" + inherit_alpha: true + template: "/example/components/druid_logo/druid_logo.gui" +} +nodes { + type: TYPE_BOX + id: "druid_logo/root" + parent: "druid_logo" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "druid_logo/E_Anchor" + parent: "druid_logo/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "druid_logo/icon_druid_right" + parent: "druid_logo/E_Anchor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "druid_logo/W_Anchor" + parent: "druid_logo/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "druid_logo/icon_druid_left" + parent: "druid_logo/W_Anchor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "druid_logo/icon_logo" + parent: "druid_logo/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "druid_logo/text_description" + parent: "druid_logo/root" + template_node_child: true +} +nodes { + position { + y: 370.0 + } + size { + x: 400.0 + y: 910.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_examples" + pivot: PIVOT_NW + adjust_mode: ADJUST_MODE_STRETCH + parent: "container_left" + inherit_alpha: true + visible: false +} +nodes { + position { + x: 200.0 + y: -455.0 + } + type: TYPE_TEMPLATE + id: "examples_list_view" + parent: "container_examples" + inherit_alpha: true + template: "/example/components/examples_list_view/examples_list_view.gui" +} +nodes { + type: TYPE_BOX + id: "examples_list_view/root" + parent: "examples_list_view" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "examples_list_view/text_header" + parent: "examples_list_view/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/scroll_view" + parent: "examples_list_view/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/scroll_content" + parent: "examples_list_view/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "examples_list_view/examples_list_view_item" + parent: "examples_list_view/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/examples_list_view_item/root" + parent: "examples_list_view/examples_list_view_item" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/examples_list_view_item/panel_highlight" + parent: "examples_list_view/examples_list_view_item/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/examples_list_view_item/panel_selected" + parent: "examples_list_view/examples_list_view_item/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "examples_list_view/examples_list_view_item/icon" + parent: "examples_list_view/examples_list_view_item/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "examples_list_view/examples_list_view_item/text" + parent: "examples_list_view/examples_list_view_item/root" + template_node_child: true +} +nodes { + position { + x: 960.0 + } + size { + x: 440.0 + y: 1080.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_right" + pivot: PIVOT_E + adjust_mode: ADJUST_MODE_STRETCH + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 540.0 + } + size { + x: 440.0 + y: 450.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_info" + pivot: PIVOT_NE + adjust_mode: ADJUST_MODE_STRETCH + parent: "container_right" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -220.0 + y: -225.0 + } + type: TYPE_TEMPLATE + id: "panel_information" + parent: "container_info" + inherit_alpha: true + template: "/example/components/panel_information/panel_information.gui" +} +nodes { + type: TYPE_BOX + id: "panel_information/root" + parent: "panel_information" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_information/text_header" + parent: "panel_information/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/S_Anchor" + parent: "panel_information/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "panel_information/button_view_code" + parent: "panel_information/S_Anchor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/button_view_code/root" + parent: "panel_information/button_view_code" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_information/button_view_code/text" + parent: "panel_information/button_view_code/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/NE_Anchor" + parent: "panel_information/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "panel_information/button_profiler" + parent: "panel_information/NE_Anchor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/button_profiler/root" + parent: "panel_information/button_profiler" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_information/button_profiler/text" + parent: "panel_information/button_profiler/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/scroll_view" + parent: "panel_information/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_information/scroll_content" + parent: "panel_information/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_information/text_description" + parent: "panel_information/scroll_content" + template_node_child: true +} +nodes { + position { + y: -540.0 + } + size { + x: 440.0 + y: 630.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_group_settings_output" + pivot: PIVOT_SE + adjust_mode: ADJUST_MODE_STRETCH + parent: "container_right" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 630.0 + } + size { + x: 440.0 + y: 350.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_settings" + pivot: PIVOT_NE + adjust_mode: ADJUST_MODE_STRETCH + parent: "container_group_settings_output" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -220.0 + y: -175.0 + } + type: TYPE_TEMPLATE + id: "properties_panel" + parent: "container_settings" + inherit_alpha: true + template: "/example/components/properties_panel/properties_panel.gui" +} +nodes { + type: TYPE_BOX + id: "properties_panel/root" + parent: "properties_panel" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/text_header" + parent: "properties_panel/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/scroll_view" + parent: "properties_panel/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/scroll_content" + parent: "properties_panel/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/item_size" + parent: "properties_panel/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/separator" + parent: "properties_panel/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/propeties" + parent: "properties_panel/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "properties_panel/property_slider" + parent: "properties_panel/propeties" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/root" + parent: "properties_panel/property_slider" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/property_slider/text_name" + parent: "properties_panel/property_slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/E_Anchor" + parent: "properties_panel/property_slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/button" + parent: "properties_panel/property_slider/E_Anchor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/selected" + parent: "properties_panel/property_slider/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/property_slider/text_value" + parent: "properties_panel/property_slider/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/slider" + parent: "properties_panel/property_slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/slider_back" + parent: "properties_panel/property_slider/slider" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_slider/slider_pin" + parent: "properties_panel/property_slider/slider" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "properties_panel/property_checkbox" + parent: "properties_panel/propeties" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_checkbox/root" + parent: "properties_panel/property_checkbox" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/property_checkbox/text_name" + parent: "properties_panel/property_checkbox/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_checkbox/button" + parent: "properties_panel/property_checkbox/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_checkbox/icon" + parent: "properties_panel/property_checkbox/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_checkbox/selected" + parent: "properties_panel/property_checkbox/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "properties_panel/property_button" + parent: "properties_panel/propeties" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_button/root" + parent: "properties_panel/property_button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/property_button/text_name" + parent: "properties_panel/property_button/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_button/button" + parent: "properties_panel/property_button/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "properties_panel/property_button/selected" + parent: "properties_panel/property_button/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/property_button/text_button" + parent: "properties_panel/property_button/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "properties_panel/text_no_properties" + parent: "properties_panel/root" + template_node_child: true +} +nodes { + size { + x: 440.0 + y: 280.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_output" + pivot: PIVOT_SE + adjust_mode: ADJUST_MODE_STRETCH + parent: "container_group_settings_output" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -220.0 + y: 140.0 + } + type: TYPE_TEMPLATE + id: "output_list" + parent: "container_output" + inherit_alpha: true + template: "/example/components/output_list/output_list.gui" +} +nodes { + type: TYPE_BOX + id: "output_list/root" + parent: "output_list" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "output_list/text_header" + parent: "output_list/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "output_list/scroll_view" + parent: "output_list/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "output_list/scroll_content" + parent: "output_list/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "output_list/text" + parent: "output_list/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "output_list/separator" + parent: "output_list/root" + template_node_child: true +} +nodes { + position { + x: -20.0 + y: 25.0 + } + size { + x: 1080.0 + y: 1030.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_center" + xanchor: XANCHOR_LEFT + yanchor: YANCHOR_BOTTOM + adjust_mode: ADJUST_MODE_STRETCH + parent: "root" + inherit_alpha: true + clipping_mode: CLIPPING_MODE_STENCIL +} +nodes { + type: TYPE_TEMPLATE + id: "example_scene" + parent: "container_center" + inherit_alpha: true + template: "/example/components/example_scene/example_scene.gui" +} +nodes { + type: TYPE_BOX + id: "example_scene/root" + parent: "example_scene" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "example_scene/text_debug_info" + parent: "example_scene/root" + template_node_child: true +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "examples" + parent: "container_center" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_BOX + texture: "druid/empty" + id: "intro_examples" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "intro" + parent: "intro_examples" + inherit_alpha: true + template: "/example/examples/intro/intro/intro.gui" +} +nodes { + type: TYPE_BOX + id: "intro/root" + parent: "intro" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/icon_druid_left" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/icon_druid_right" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "intro/text_hello" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "intro/text_description" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "intro/text_support" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/icon_heart1" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/icon_heart2" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/icon_heart3" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/sponsor" + parent: "intro/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/sponsor_github" + parent: "intro/sponsor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/sponsor_coffee" + parent: "intro/sponsor" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "intro/sponsor_kofi" + parent: "intro/sponsor" + template_node_child: true +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "basic" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "basic_button" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/button/basic_button.gui" +} +nodes { + type: TYPE_BOX + id: "basic_button/root" + parent: "basic_button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_button/button" + parent: "basic_button/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_button/button/root" + parent: "basic_button/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_button/button/text" + parent: "basic_button/button/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_text" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/text/basic_text.gui" +} +nodes { + type: TYPE_BOX + id: "basic_text/root" + parent: "basic_text" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_text/text_area" + parent: "basic_text/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_text/text" + parent: "basic_text/text_area" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "multiline_text" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/text/multiline_text.gui" +} +nodes { + type: TYPE_BOX + id: "multiline_text/root" + parent: "multiline_text" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "multiline_text/text_area" + parent: "multiline_text/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "multiline_text/text" + parent: "multiline_text/text_area" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/scroll/scroll.gui" +} +nodes { + type: TYPE_BOX + id: "scroll/root" + parent: "scroll" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll/scroll_view" + parent: "scroll/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll/scroll_content" + parent: "scroll/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll/button_tutorial" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll/button_tutorial/root" + parent: "scroll/button_tutorial" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/button_tutorial/text" + parent: "scroll/button_tutorial/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/ui_scroll_text_1" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/ui_scroll_text_2" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/ui_scroll_text_3" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/ui_scroll_text_4" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/ui_scroll_text_5" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll/button_stencil" + parent: "scroll/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll/button_stencil/root" + parent: "scroll/button_stencil" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll/button_stencil/text" + parent: "scroll/button_stencil/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "grid" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/grid/grid.gui" +} +nodes { + type: TYPE_BOX + id: "grid/root" + parent: "grid" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "grid/grid" + parent: "grid/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "grid/prefab" + parent: "grid/grid" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "grid/panel" + parent: "grid/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "grid/text" + parent: "grid/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_bind_grid" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui" +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid/root" + parent: "scroll_bind_grid" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid/view" + parent: "scroll_bind_grid/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid/content" + parent: "scroll_bind_grid/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid/prefab" + parent: "scroll_bind_grid/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid/panel" + parent: "scroll_bind_grid/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_bind_grid/text" + parent: "scroll_bind_grid/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_bind_grid_horizontal" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui" +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_horizontal/root" + parent: "scroll_bind_grid_horizontal" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_horizontal/view" + parent: "scroll_bind_grid_horizontal/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_horizontal/content" + parent: "scroll_bind_grid_horizontal/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_horizontal/prefab" + parent: "scroll_bind_grid_horizontal/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_horizontal/panel" + parent: "scroll_bind_grid_horizontal/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_bind_grid_horizontal/text" + parent: "scroll_bind_grid_horizontal/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "hover" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/hover/hover.gui" +} +nodes { + type: TYPE_BOX + id: "hover/root" + parent: "hover" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "hover/button_mouse_hover" + parent: "hover/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "hover/button_mouse_hover/root" + parent: "hover/button_mouse_hover" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "hover/button_mouse_hover/text" + parent: "hover/button_mouse_hover/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "hover/button_mobile_hover" + parent: "hover/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "hover/button_mobile_hover/root" + parent: "hover/button_mobile_hover" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "hover/button_mobile_hover/text" + parent: "hover/button_mobile_hover/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "drag" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/drag/drag.gui" +} +nodes { + type: TYPE_BOX + id: "drag/root" + parent: "drag" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "drag/drag" + parent: "drag/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "drag/drag/root" + parent: "drag/drag" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "drag/drag/text" + parent: "drag/drag/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_input" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/input/basic_input.gui" +} +nodes { + type: TYPE_BOX + id: "basic_input/root" + parent: "basic_input" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_input/input" + parent: "basic_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_input/input/root" + parent: "basic_input/input" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_input/input/text" + parent: "basic_input/input/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_input/input_2" + parent: "basic_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_input/input_2/root" + parent: "basic_input/input_2" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_input/input_2/text" + parent: "basic_input/input_2/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_rich_input" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/input/rich_input.gui" +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/root" + parent: "basic_rich_input" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_rich_input/rich_input" + parent: "basic_rich_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input/root" + parent: "basic_rich_input/rich_input" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input/button" + parent: "basic_rich_input/rich_input/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input/placeholder_text" + parent: "basic_rich_input/rich_input/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input/input_text" + parent: "basic_rich_input/rich_input/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input/cursor_node" + parent: "basic_rich_input/rich_input/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input/cursor_text" + parent: "basic_rich_input/rich_input/cursor_node" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_rich_input/rich_input_2" + parent: "basic_rich_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input_2/root" + parent: "basic_rich_input/rich_input_2" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input_2/button" + parent: "basic_rich_input/rich_input_2/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input_2/placeholder_text" + parent: "basic_rich_input/rich_input_2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input_2/input_text" + parent: "basic_rich_input/rich_input_2/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_rich_input/rich_input_2/cursor_node" + parent: "basic_rich_input/rich_input_2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_input/rich_input_2/cursor_text" + parent: "basic_rich_input/rich_input_2/cursor_node" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_rich_text" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/rich_text/basic_rich_text.gui" +} +nodes { + type: TYPE_BOX + id: "basic_rich_text/root" + parent: "basic_rich_text" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_rich_text/text" + parent: "basic_rich_text/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/slider/basic_slider.gui" +} +nodes { + type: TYPE_BOX + id: "basic_slider/root" + parent: "basic_slider" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider/slider" + parent: "basic_slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider/slider/root" + parent: "basic_slider/slider" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider/slider/slider_back" + parent: "basic_slider/slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider/slider/slider_pin" + parent: "basic_slider/slider/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_slider/slider_value" + parent: "basic_slider/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_progress_bar" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/progress_bar/basic_progress_bar.gui" +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar/root" + parent: "basic_progress_bar" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar/progress_bar_back" + parent: "basic_progress_bar/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar/progress_bar_fill" + parent: "basic_progress_bar/progress_bar_back" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_progress_bar/progress_value" + parent: "basic_progress_bar/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/scroll_slider/scroll_slider.gui" +} +nodes { + type: TYPE_BOX + id: "scroll_slider/root" + parent: "scroll_slider" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/scroll_view" + parent: "scroll_slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/scroll_content" + parent: "scroll_slider/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button1" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button1/root" + parent: "scroll_slider/button1" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button1/text" + parent: "scroll_slider/button1/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button2" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button2/root" + parent: "scroll_slider/button2" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button2/text" + parent: "scroll_slider/button2/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button3" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button3/root" + parent: "scroll_slider/button3" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button3/text" + parent: "scroll_slider/button3/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button4" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button4/root" + parent: "scroll_slider/button4" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button4/text" + parent: "scroll_slider/button4/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button5" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button5/root" + parent: "scroll_slider/button5" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button5/text" + parent: "scroll_slider/button5/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button6" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button6/root" + parent: "scroll_slider/button6" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button6/text" + parent: "scroll_slider/button6/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button7" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button7/root" + parent: "scroll_slider/button7" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button7/text" + parent: "scroll_slider/button7/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button8" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button8/root" + parent: "scroll_slider/button8" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button8/text" + parent: "scroll_slider/button8/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button9" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button9/root" + parent: "scroll_slider/button9" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button9/text" + parent: "scroll_slider/button9/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button10" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button10/root" + parent: "scroll_slider/button10" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button10/text" + parent: "scroll_slider/button10/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button11" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button11/root" + parent: "scroll_slider/button11" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button11/text" + parent: "scroll_slider/button11/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button12" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button12/root" + parent: "scroll_slider/button12" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button12/text" + parent: "scroll_slider/button12/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_slider/button13" + parent: "scroll_slider/scroll_content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/button13/root" + parent: "scroll_slider/button13" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_slider/button13/text" + parent: "scroll_slider/button13/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/slider_back" + parent: "scroll_slider/scroll_view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_slider/slider_pin" + parent: "scroll_slider/slider_back" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider_stepped" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/slider/basic_slider_stepped.gui" +} +nodes { + type: TYPE_BOX + id: "basic_slider_stepped/root" + parent: "basic_slider_stepped" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider_stepped/slider" + parent: "basic_slider_stepped/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_stepped/slider/root" + parent: "basic_slider_stepped/slider" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_stepped/slider/slider_back" + parent: "basic_slider_stepped/slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_stepped/slider/slider_pin" + parent: "basic_slider_stepped/slider/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_slider_stepped/slider_value" + parent: "basic_slider_stepped/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_swipe" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/swipe/basic_swipe.gui" +} +nodes { + type: TYPE_BOX + id: "basic_swipe/root" + parent: "basic_swipe" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_swipe/swipe_hint" + parent: "basic_swipe/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "rich_text_tags" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/rich_text/rich_text_tags.gui" +} +nodes { + type: TYPE_BOX + id: "rich_text_tags/root" + parent: "rich_text_tags" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "rich_text_tags/background" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags/rich_text_color" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags/rich_text_breaks" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags/rich_text_size" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags/rich_text_font" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags/rich_text_image" + parent: "rich_text_tags/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "rich_text_tags_custom" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/rich_text/rich_text_tags_custom.gui" + enabled: false +} +nodes { + type: TYPE_BOX + id: "rich_text_tags_custom/root" + parent: "rich_text_tags_custom" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags_custom/rich_text_link" + parent: "rich_text_tags_custom/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags_custom/rich_text_characters" + parent: "rich_text_tags_custom/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "rich_text_tags_custom/rich_text_custom" + parent: "rich_text_tags_custom/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_progress_bar_slice9" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui" +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar_slice9/root" + parent: "basic_progress_bar_slice9" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar_slice9/progress_bar_back" + parent: "basic_progress_bar_slice9/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_progress_bar_slice9/progress_bar_fill" + parent: "basic_progress_bar_slice9/progress_bar_back" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_progress_bar_slice9/progress_value" + parent: "basic_progress_bar_slice9/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_timer" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/timer/basic_timer.gui" +} +nodes { + type: TYPE_BOX + id: "basic_timer/root" + parent: "basic_timer" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_timer/text" + parent: "basic_timer/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_hotkey" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/hotkey/basic_hotkey.gui" +} +nodes { + type: TYPE_BOX + id: "basic_hotkey/root" + parent: "basic_hotkey" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_hotkey/text" + parent: "basic_hotkey/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_button_double_click" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/button/basic_button_double_click.gui" +} +nodes { + type: TYPE_BOX + id: "basic_button_double_click/root" + parent: "basic_button_double_click" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_button_double_click/button" + parent: "basic_button_double_click/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_button_double_click/button/root" + parent: "basic_button_double_click/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_button_double_click/button/text" + parent: "basic_button_double_click/button/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_button_hold" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/button/basic_button_hold.gui" +} +nodes { + type: TYPE_BOX + id: "basic_button_hold/root" + parent: "basic_button_hold" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_button_hold/button" + parent: "basic_button_hold/root" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "basic_button_hold/mask" + parent: "basic_button_hold/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_button_hold/button_image" + parent: "basic_button_hold/mask" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_button_hold/text" + parent: "basic_button_hold/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "input_password" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/input/input_password.gui" +} +nodes { + type: TYPE_BOX + id: "input_password/root" + parent: "input_password" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "input_password/input" + parent: "input_password/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "input_password/input/root" + parent: "input_password/input" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "input_password/input/text" + parent: "input_password/input/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "drag_to_node" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/drag/drag_to_node.gui" +} +nodes { + type: TYPE_BOX + id: "drag_to_node/root" + parent: "drag_to_node" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "drag_to_node/drag" + parent: "drag_to_node/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "drag_to_node/drag/root" + parent: "drag_to_node/drag" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "drag_to_node/drag/text" + parent: "drag_to_node/drag/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "drag_to_node/zone" + parent: "drag_to_node/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "drag_to_node/text_hint" + parent: "drag_to_node/zone" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "drag_to_node/text_counter" + parent: "drag_to_node/zone" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider_vertical" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/slider/basic_slider_vertical.gui" +} +nodes { + type: TYPE_BOX + id: "basic_slider_vertical/root" + parent: "basic_slider_vertical" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_slider_vertical/slider" + parent: "basic_slider_vertical/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_vertical/slider/root" + parent: "basic_slider_vertical/slider" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_vertical/slider/slider_back" + parent: "basic_slider_vertical/slider/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_slider_vertical/slider/slider_pin" + parent: "basic_slider_vertical/slider/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_slider_vertical/slider_value" + parent: "basic_slider_vertical/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "scroll_bind_grid_points" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui" +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_points/root" + parent: "scroll_bind_grid_points" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_points/view" + parent: "scroll_bind_grid_points/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_points/content" + parent: "scroll_bind_grid_points/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_points/prefab" + parent: "scroll_bind_grid_points/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "scroll_bind_grid_points/panel" + parent: "scroll_bind_grid_points/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "scroll_bind_grid_points/text" + parent: "scroll_bind_grid_points/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_blocker" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/blocker/basic_blocker.gui" +} +nodes { + type: TYPE_BOX + id: "basic_blocker/root" + parent: "basic_blocker" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_blocker/blocker" + parent: "basic_blocker/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_blocker/button" + parent: "basic_blocker/blocker" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_blocker/button/root" + parent: "basic_blocker/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_blocker/button/text" + parent: "basic_blocker/button/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_blocker/text" + parent: "basic_blocker/blocker" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_back_handler" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/back_handler/basic_back_handler.gui" +} +nodes { + type: TYPE_BOX + id: "basic_back_handler/root" + parent: "basic_back_handler" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_back_handler/text" + parent: "basic_back_handler/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_checkbox" + parent: "basic" + inherit_alpha: true + template: "/example/examples/basic/checkbox/basic_checkbox.gui" +} +nodes { + type: TYPE_BOX + id: "basic_checkbox/root" + parent: "basic_checkbox" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_checkbox/button" + parent: "basic_checkbox/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_checkbox/icon" + parent: "basic_checkbox/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_checkbox/selected" + parent: "basic_checkbox/button" + template_node_child: true +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "windows" + adjust_mode: ADJUST_MODE_STRETCH + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "window_language" + parent: "windows" + inherit_alpha: true + template: "/example/examples/windows/window_language/window_language.gui" +} +nodes { + type: TYPE_BOX + id: "window_language/root" + parent: "window_language" + overridden_fields: 1 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/window" + parent: "window_language/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/panel_header" + parent: "window_language/window" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_language/text_header" + parent: "window_language/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/button_close" + parent: "window_language/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/icon_close" + parent: "window_language/button_close" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/content" + parent: "window_language/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/button_prefab" + parent: "window_language/content" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_language/button" + parent: "window_language/button_prefab" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_language/button/root" + parent: "window_language/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_language/button/text" + parent: "window_language/button/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_confirmation" + parent: "windows" + inherit_alpha: true + template: "/example/examples/windows/window_confirmation/window_confirmation.gui" +} +nodes { + type: TYPE_BOX + id: "window_confirmation/root" + parent: "window_confirmation" + overridden_fields: 1 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/window" + parent: "window_confirmation/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/panel_header" + parent: "window_confirmation/window" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_confirmation/text_header" + parent: "window_confirmation/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/button_close" + parent: "window_confirmation/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/icon_close" + parent: "window_confirmation/button_close" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/content" + parent: "window_confirmation/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_confirmation/text" + parent: "window_confirmation/content" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_confirmation/button_accept" + parent: "window_confirmation/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/button_accept/root" + parent: "window_confirmation/button_accept" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_confirmation/button_accept/text" + parent: "window_confirmation/button_accept/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_confirmation/button_decline" + parent: "window_confirmation/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_confirmation/button_decline/root" + parent: "window_confirmation/button_decline" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_confirmation/button_decline/text" + parent: "window_confirmation/button_decline/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_info" + parent: "windows" + inherit_alpha: true + template: "/example/examples/windows/window_info/window_info.gui" +} +nodes { + type: TYPE_BOX + id: "window_info/root" + parent: "window_info" + overridden_fields: 1 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/window" + parent: "window_info/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/panel_header" + parent: "window_info/window" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_info/text_header" + parent: "window_info/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/button_close" + parent: "window_info/panel_header" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/icon_close" + parent: "window_info/button_close" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/content" + parent: "window_info/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_info/text" + parent: "window_info/content" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "window_info/button_accept" + parent: "window_info/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "window_info/button_accept/root" + parent: "window_info/button_accept" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "window_info/button_accept/text" + parent: "window_info/button_accept/root" + template_node_child: true +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "data_list" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "data_list_basic" + parent: "data_list" + inherit_alpha: true + template: "/example/examples/data_list/basic/data_list_basic.gui" +} +nodes { + type: TYPE_BOX + id: "data_list_basic/root" + parent: "data_list_basic" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_basic/view" + parent: "data_list_basic/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_basic/content" + parent: "data_list_basic/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_basic/prefab" + parent: "data_list_basic/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_basic/panel" + parent: "data_list_basic/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "data_list_basic/text" + parent: "data_list_basic/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "data_list_horizontal_basic" + parent: "data_list" + inherit_alpha: true + template: "/example/examples/data_list/basic/data_list_horizontal_basic.gui" +} +nodes { + type: TYPE_BOX + id: "data_list_horizontal_basic/root" + parent: "data_list_horizontal_basic" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_horizontal_basic/view" + parent: "data_list_horizontal_basic/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_horizontal_basic/content" + parent: "data_list_horizontal_basic/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_horizontal_basic/prefab" + parent: "data_list_horizontal_basic/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_horizontal_basic/panel" + parent: "data_list_horizontal_basic/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "data_list_horizontal_basic/text" + parent: "data_list_horizontal_basic/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "data_list_add_remove_clear" + parent: "data_list" + inherit_alpha: true + template: "/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui" +} +nodes { + type: TYPE_BOX + id: "data_list_add_remove_clear/root" + parent: "data_list_add_remove_clear" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_add_remove_clear/view" + parent: "data_list_add_remove_clear/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_add_remove_clear/content" + parent: "data_list_add_remove_clear/view" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_add_remove_clear/prefab" + parent: "data_list_add_remove_clear/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_add_remove_clear/panel" + parent: "data_list_add_remove_clear/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "data_list_add_remove_clear/text" + parent: "data_list_add_remove_clear/prefab" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "data_list_cache_with_component" + parent: "data_list" + inherit_alpha: true + template: "/example/examples/data_list/cache_with_component/cache_with_component.gui" +} +nodes { + type: TYPE_BOX + id: "data_list_cache_with_component/root" + parent: "data_list_cache_with_component" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_cache_with_component/view" + parent: "data_list_cache_with_component/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_cache_with_component/content" + parent: "data_list_cache_with_component/view" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "data_list_cache_with_component/button_component" + parent: "data_list_cache_with_component/content" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_cache_with_component/button_component/root" + parent: "data_list_cache_with_component/button_component" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "data_list_cache_with_component/button_component/panel" + parent: "data_list_cache_with_component/button_component/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "data_list_cache_with_component/button_component/text" + parent: "data_list_cache_with_component/button_component/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + texture: "druid/empty" + id: "gamepad" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester" + parent: "gamepad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/gamepad_tester.gui" +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/root" + parent: "gamepad_tester" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/gamepad" + parent: "gamepad_tester/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/stick_left" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/root" + parent: "gamepad_tester/stick_left" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "gamepad_tester/stick_left/background_mask" + parent: "gamepad_tester/stick_left/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/background" + parent: "gamepad_tester/stick_left/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/stick_root" + parent: "gamepad_tester/stick_left/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/stick_shadow" + parent: "gamepad_tester/stick_left/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/stick" + parent: "gamepad_tester/stick_left/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/dot_1" + parent: "gamepad_tester/stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/dot_2" + parent: "gamepad_tester/stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/dot_3" + parent: "gamepad_tester/stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_left/dot_4" + parent: "gamepad_tester/stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/stick_right" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/root" + parent: "gamepad_tester/stick_right" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "gamepad_tester/stick_right/background_mask" + parent: "gamepad_tester/stick_right/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/background" + parent: "gamepad_tester/stick_right/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/stick_root" + parent: "gamepad_tester/stick_right/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/stick_shadow" + parent: "gamepad_tester/stick_right/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/stick" + parent: "gamepad_tester/stick_right/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/dot_1" + parent: "gamepad_tester/stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/dot_2" + parent: "gamepad_tester/stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/dot_3" + parent: "gamepad_tester/stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/stick_right/dot_4" + parent: "gamepad_tester/stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/dpad" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_left" + parent: "gamepad_tester/dpad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_left/button" + parent: "gamepad_tester/button_left" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_left/text" + parent: "gamepad_tester/button_left/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_left/icon" + parent: "gamepad_tester/button_left/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_up" + parent: "gamepad_tester/dpad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_up/button" + parent: "gamepad_tester/button_up" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_up/text" + parent: "gamepad_tester/button_up/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_up/icon" + parent: "gamepad_tester/button_up/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_right" + parent: "gamepad_tester/dpad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_right/button" + parent: "gamepad_tester/button_right" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_right/text" + parent: "gamepad_tester/button_right/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_right/icon" + parent: "gamepad_tester/button_right/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_down" + parent: "gamepad_tester/dpad" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_down/button" + parent: "gamepad_tester/button_down" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_down/text" + parent: "gamepad_tester/button_down/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_down/icon" + parent: "gamepad_tester/button_down/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/buttons" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_x" + parent: "gamepad_tester/buttons" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_x/button" + parent: "gamepad_tester/button_x" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_x/text" + parent: "gamepad_tester/button_x/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_x/icon" + parent: "gamepad_tester/button_x/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_y" + parent: "gamepad_tester/buttons" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_y/button" + parent: "gamepad_tester/button_y" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_y/text" + parent: "gamepad_tester/button_y/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_y/icon" + parent: "gamepad_tester/button_y/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_b" + parent: "gamepad_tester/buttons" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_b/button" + parent: "gamepad_tester/button_b" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_b/text" + parent: "gamepad_tester/button_b/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_b/icon" + parent: "gamepad_tester/button_b/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_a" + parent: "gamepad_tester/buttons" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_a/button" + parent: "gamepad_tester/button_a" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_a/text" + parent: "gamepad_tester/button_a/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_a/icon" + parent: "gamepad_tester/button_a/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/buttons_system" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_back" + parent: "gamepad_tester/buttons_system" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_back/button" + parent: "gamepad_tester/button_back" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_back/text" + parent: "gamepad_tester/button_back/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_back/icon" + parent: "gamepad_tester/button_back/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_start" + parent: "gamepad_tester/buttons_system" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_start/button" + parent: "gamepad_tester/button_start" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_start/text" + parent: "gamepad_tester/button_start/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_start/icon" + parent: "gamepad_tester/button_start/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_left_bump" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_l1" + parent: "gamepad_tester/button_left_bump" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_l1/button" + parent: "gamepad_tester/button_l1" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_l1/text" + parent: "gamepad_tester/button_l1/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_l1/icon" + parent: "gamepad_tester/button_l1/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_l2" + parent: "gamepad_tester/button_left_bump" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_l2/button" + parent: "gamepad_tester/button_l2" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_l2/fill" + parent: "gamepad_tester/button_l2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_l2/text" + parent: "gamepad_tester/button_l2/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_right_bump" + parent: "gamepad_tester/gamepad" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_r1" + parent: "gamepad_tester/button_right_bump" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_r1/button" + parent: "gamepad_tester/button_r1" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_r1/text" + parent: "gamepad_tester/button_r1/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_r1/icon" + parent: "gamepad_tester/button_r1/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "gamepad_tester/button_r2" + parent: "gamepad_tester/button_right_bump" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_r2/button" + parent: "gamepad_tester/button_r2" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "gamepad_tester/button_r2/fill" + parent: "gamepad_tester/button_r2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "gamepad_tester/button_r2/text" + parent: "gamepad_tester/button_r2/button" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_control" + parent: "gamepad" + inherit_alpha: true + template: "/example/examples/gamepad/on_screen_control/on_screen_control.gui" +} +nodes { + type: TYPE_BOX + id: "on_screen_control/root" + parent: "on_screen_control" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/character" + parent: "on_screen_control/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/eye_left" + parent: "on_screen_control/character" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/eye_left_blick" + parent: "on_screen_control/eye_left" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/eye_right" + parent: "on_screen_control/character" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/eye_right_blick" + parent: "on_screen_control/eye_right" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_control/on_screen_input" + parent: "on_screen_control/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/root" + parent: "on_screen_control/on_screen_input" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_control/on_screen_input/on_screen_stick" + parent: "on_screen_control/on_screen_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/root" + parent: "on_screen_control/on_screen_input/on_screen_stick" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "on_screen_control/on_screen_input/on_screen_stick/background_mask" + parent: "on_screen_control/on_screen_input/on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/background" + parent: "on_screen_control/on_screen_input/on_screen_stick/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/stick_root" + parent: "on_screen_control/on_screen_input/on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/stick_shadow" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/stick" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/dot_1" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/dot_2" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/dot_3" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_stick/dot_4" + parent: "on_screen_control/on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/on_screen_button" + parent: "on_screen_control/on_screen_input/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_control/on_screen_input/button_action" + parent: "on_screen_control/on_screen_input/on_screen_button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/button_action/button" + parent: "on_screen_control/on_screen_input/button_action" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "on_screen_control/on_screen_input/button_action/text" + parent: "on_screen_control/on_screen_input/button_action/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_control/on_screen_input/button_action/icon" + parent: "on_screen_control/on_screen_input/button_action/button" + template_node_child: true +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "panthera" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "animation_blend" + parent: "panthera" + inherit_alpha: true + template: "/example/examples/panthera/animation_blend/animation_blend.gui" +} +nodes { + type: TYPE_BOX + id: "animation_blend/root" + parent: "animation_blend" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/character" + parent: "animation_blend/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/body" + parent: "animation_blend/character" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/eyes" + parent: "animation_blend/body" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/eye_left" + parent: "animation_blend/eyes" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/brow_left" + parent: "animation_blend/eye_left" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/eye_right" + parent: "animation_blend/eyes" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/brow_right" + parent: "animation_blend/eye_right" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/mouth" + parent: "animation_blend/body" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/hand_left" + parent: "animation_blend/body" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "animation_blend/hand_right" + parent: "animation_blend/body" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "animation_blend/text_hint" + parent: "animation_blend/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "animation_blend/rich_text_kenney" + parent: "animation_blend/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_animation" + parent: "panthera" + inherit_alpha: true + template: "/example/examples/panthera/basic_animation/basic_animation.gui" +} +nodes { + type: TYPE_BOX + id: "basic_animation/root" + parent: "basic_animation" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "basic_animation/button" + parent: "basic_animation/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_animation/button/root" + parent: "basic_animation/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "basic_animation/button/text" + parent: "basic_animation/button/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + texture: "druid/empty" + id: "layout" + parent: "examples" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "basic_layout" + parent: "layout" + inherit_alpha: true + template: "/example/examples/layout/basic/basic_layout.gui" +} +nodes { + type: TYPE_BOX + id: "basic_layout/root" + parent: "basic_layout" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_layout/layout" + parent: "basic_layout/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "basic_layout/prefab" + parent: "basic_layout/layout" + template_node_child: true +} +nodes { + position { + x: -20.0 + y: -540.0 + } + size { + x: 1080.0 + y: 50.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "container_status" + xanchor: XANCHOR_LEFT + pivot: PIVOT_S + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 25.0 + } + type: TYPE_TEMPLATE + id: "panel_druid_profiler" + parent: "container_status" + inherit_alpha: true + template: "/example/components/panel_druid_profiler/panel_druid_profiler.gui" +} +nodes { + type: TYPE_BOX + id: "panel_druid_profiler/root" + parent: "panel_druid_profiler" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_druid_profiler/group_memory" + parent: "panel_druid_profiler/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_memory" + parent: "panel_druid_profiler/group_memory" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_memory_amount" + parent: "panel_druid_profiler/group_memory" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_memory_kb" + parent: "panel_druid_profiler/group_memory" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_druid_profiler/group_fps" + parent: "panel_druid_profiler/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_fps" + parent: "panel_druid_profiler/group_fps" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_fps_amount" + parent: "panel_druid_profiler/group_fps" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_fps_min" + parent: "panel_druid_profiler/group_fps" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_druid_profiler/group_components" + parent: "panel_druid_profiler/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_components" + parent: "panel_druid_profiler/group_components" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_components_amount" + parent: "panel_druid_profiler/group_components" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "panel_druid_profiler/group_events" + parent: "panel_druid_profiler/root" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_events" + parent: "panel_druid_profiler/group_events" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "panel_druid_profiler/text_events_amount" + parent: "panel_druid_profiler/group_events" + template_node_child: true +} +layers { + name: "druid" +} +layers { + name: "druid_logo" +} +layers { + name: "text_regular" +} +layers { + name: "text_bold" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 2048 diff --git a/example/druid.gui_script b/example/druid.gui_script new file mode 100644 index 00000000..91e9120b --- /dev/null +++ b/example/druid.gui_script @@ -0,0 +1,210 @@ +local lang = require("lang.lang") +local saver = require("saver.saver") +local storage = require("saver.storage") +local druid = require("druid.druid") + +local container = require("example.components.container.container") +local druid_logo = require("example.components.druid_logo.druid_logo") +local panel_information = require("example.components.panel_information.panel_information") +local example_scene = require("example.components.example_scene.example_scene") +local panel_druid_profiler = require("example.components.panel_druid_profiler.panel_druid_profiler") +local examples_list_view = require("example.components.examples_list_view.examples_list_view") +local properties_panel = require("example.components.properties_panel.properties_panel") +local output_list = require("example.components.output_list.output_list") + +local druid_examples = require("example.examples.druid_examples") + +---@class druid.example +---@field druid druid_instance +---@field container_root druid.container +---@field container_left druid.container +---@field container_logo druid.container +---@field container_examples druid.container +---@field container_right druid.container +---@field container_info druid.container +---@field container_group_settings_output druid.container +---@field container_settings druid.container +---@field container_output druid.container +---@field container_center druid.container +---@field container_status druid.container +---@field druid_logo druid_logo +---@field panel_information panel_information +---@field example_scene example_scene +---@field panel_druid_profiler panel_druid_profiler +---@field examples_list_view examples_list_view +---@field properties_panel properties_panel +---@field output_list output_list + + +--- Generic setup that should be done once per application +---@param self druid.example +local function setup_druid(self) + saver.init() + saver.bind_save_state("lang", lang.state) + + lang.init() + lang.set_lang("en") -- Force default start language to EN, switch through the UI to check + druid.set_text_function(lang.txp) + + window.set_listener(function(_, event) + druid.on_window_callback(event) + end) +end + + +--- Containers is a layout of the GUI scene. Inside this containers I will place a logic components +--- This allow easily move components in the GUI scene and change the size of each section +---@param self druid.example +local function setup_layout(self) + self.container_root = self.druid:new(container, "root") --[[@as druid.container]] + self.container_left = self.container_root:add_container("container_left", "stretch_y") + self.container_logo = self.container_left:add_container("container_logo") + self.container_examples = self.container_left:add_container("container_examples") + + self.container_right = self.container_root:add_container("container_right", "stretch_y") + self.container_info = self.container_right:add_container("container_info") + + self.container_group_settings_output = self.container_right:add_container("container_group_settings_output") + self.container_settings = self.container_group_settings_output:add_container("container_settings") + self.container_output = self.container_group_settings_output:add_container("container_output") + + self.container_center = self.container_root:add_container("container_center") + self.container_status = self.container_root:add_container("container_status", "stretch_x") +end + + +---@param self druid.example +local function setup_components(self) + self.druid_logo = self.druid:new(druid_logo, "druid_logo") --[[@as druid_logo]] + self.container_logo:add_container(self.druid_logo.root) + + self.panel_information = self.druid:new(panel_information, "panel_information") --[[@as panel_information]] + self.container_info:add_container(self.panel_information.root) + + self.example_scene = self.druid:new(example_scene, "example_scene") --[[@as example_scene]] + self.container_center:add_container(self.example_scene.root) + + self.panel_druid_profiler = self.druid:new(panel_druid_profiler, "panel_druid_profiler") --[[@as panel_druid_profiler]] + self.container_status:add_container(self.panel_druid_profiler.root) + + self.examples_list_view = self.druid:new(examples_list_view, "examples_list_view") --[[@as examples_list_view]] + self.container_examples:add_container(self.examples_list_view.root) + + self.properties_panel = self.druid:new(properties_panel, "properties_panel") --[[@as properties_panel]] + self.container_settings:add_container(self.properties_panel.root) + + self.output_list = self.druid:new(output_list, "output_list") --[[@as output_list]] + self.container_output:add_container(self.output_list.root) + + do -- Component bindings + self.examples_list_view.on_debug_info:subscribe(function(info) + self.example_scene:set_debug_info(info) + end) + self.examples_list_view.add_log_text:subscribe(function(log) + self.output_list:add_log_text(log) + end) + self.examples_list_view.on_set_information:subscribe(function(text_id) + self.panel_information:set_text(text_id) + end) + + self.panel_information.button_view_code.on_click:subscribe(function() + local selected_example = self.examples_list_view.selected_example + if not selected_example then + return + end + + local code_url = selected_example.data.code_url + if not code_url then + return + end + + local url_prefix = "https://github.com/Insality/druid/blob/master/" + sys.open_url(url_prefix .. code_url, { target = "_blank" }) + end) + end +end + + +---@param self druid.example +local function select_start_example(self) + if html5 then + -- Try load example from URL + local example_name = html5.run("new URLSearchParams(window.location.search).get('example')") + if example_name then + local is_selected self.examples_list_view:select_example_by_name_id(example_name) + if is_selected then + return + end + end + end + + -- If we have last selected example in cache, select it again + local last_selected_example_name = storage.get_string("last_selected_example", "") + if last_selected_example_name ~= "" then + self.examples_list_view:select_example_by_name_id(last_selected_example_name) + end +end + + +---@param self druid.example +local function setup_examples(self) + local examples = druid_examples.get_examples() + + do -- Disable all examples by default + for index = 1, #examples do + local example = examples[index] + local examples_list = example.examples_list + for example_index = 1, #examples_list do + gui.set_enabled(gui.get_node(examples_list[example_index].root), false) + end + end + end + + for index = 1, #examples do + local example = examples[index] + self.examples_list_view:add_example(example, self) + end + + select_start_example(self) +end + + +---@param self druid.example +function init(self) + setup_druid(self) + + self.druid = druid.new(self) + setup_layout(self) + setup_components(self) + setup_examples(self) +end + + +---@param self druid.example +function final(self) + self.druid:final() +end + + +---@param self druid.example +---@param dt number +function update(self, dt) + self.druid:update(dt) +end + + +---@param self druid.example +---@param message_id hash +---@param message table +---@param sender url +function on_message(self, message_id, message, sender) + self.druid:on_message(message_id, message, sender) +end + + +---@param self druid.example +---@param action_id hash +---@param action action +function on_input(self, action_id, action) + return self.druid:on_input(action_id, action) +end \ No newline at end of file diff --git a/example/engine_template.html b/example/engine_template.html deleted file mode 100644 index c3819280..00000000 --- a/example/engine_template.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - {{project.title}} {{project.version}} - - - - -
    -
    - -
    -
    -{{#html5.show_fullscreen_button}} -
    Fullscreen
    -{{/html5.show_fullscreen_button}} -{{#html5.show_made_with_defold}} - -{{/html5.show_made_with_defold}} -
    -
    - - - - - - - - diff --git a/example/example.collection b/example/example.collection deleted file mode 100644 index 46513392..00000000 --- a/example/example.collection +++ /dev/null @@ -1,903 +0,0 @@ -name: "example" -scale_along_z: 0 -embedded_instances { - id: "gui" - data: "components {\n" - " id: \"main\"\n" - " component: \"/example/example.gui\"\n" - "}\n" - "" -} -embedded_instances { - id: "system" - data: "components {\n" - " id: \"init\"\n" - " component: \"/example/init.script\"\n" - "}\n" - "" -} -embedded_instances { - id: "sound" - data: "embedded_components {\n" - " id: \"click\"\n" - " type: \"sound\"\n" - " data: \"sound: \\\"/example/assets/sounds/click.ogg\\\"\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_overview" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_overview\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/overview/overview.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_buttons" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_buttons\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/buttons/buttons.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "texts_general" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"texts_general\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/texts/texts_general/texts_general.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_sliders" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_sliders\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/sliders/sliders.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_grid" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_grid\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/grid/grid.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_input" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_input\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/input/input.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_scroll" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_scroll\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/scroll/scroll.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_data_list" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_data_list\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/data_list/data_list.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_static_grid" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_static_grid\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/static_grid/static_grid.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_dynamic_grid" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_dynamic_grid\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/dynamic_grid/dynamic_grid.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_navigate" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_navigate\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/navigate/navigate.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_add_remove_nodes" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_add_remove_nodes\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/add_remove_nodes/add_remove_nodes.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "grid_static_grid" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"grid_static_grid\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/grid/static_grid/static_grid.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "grid_animations" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"grid_animations\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/grid/grid_animations/grid_animations.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "grid_static_grid_dynamic_pos" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"grid_static_grid_dynamic_pos\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "system_whitelist_blacklist" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"system_whitelist_blacklist\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/system/whitelist_blacklist/whitelist_blacklist.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "texts_adjust" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"texts_adjust\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/texts/texts_adjust/texts_adjust.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "system_message_input" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"system_message_input\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/system/message_input/message_input.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "custom_rich_input" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"custom_rich_input\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/custom/rich_input/rich_input.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "system_inner_templates" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"system_inner_templates\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/system/inner_templates/inner_templates.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_swipe" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_swipe\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/swipe/swipe.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_drag" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_drag\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/drag/drag.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_checkboxes" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_checkboxes\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/checkboxes/checkboxes.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_reinit_data" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_reinit_data\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/reinit_data/reinit_data.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_layout" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_layout\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/layout/layout.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_hotkey" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_hotkey\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/hotkey/hotkey.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_with_component" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_with_component\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/with_component/with_component.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "layout_fit" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"layout_fit\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/layout/layout_fit/layout_fit.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_progress_bar" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_progress_bar\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/progress_bar/progress_bar.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "system_late_init_check" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"system_late_init_check\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/system/late_init_check/late_init_check.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "general_hover" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"general_hover\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/general/hover/hover.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "texts_lang_text" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"texts_lang_text\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/texts/lang_text/lang_text.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "custom_rich_text" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"custom_rich_text\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/custom/rich_text/rich_text.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "data_list_manage_data" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"data_list_manage_data\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/data_list/manage_data/manage_data.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} -embedded_instances { - id: "rich_text_texts" - data: "components {\n" - " id: \"screen_factory\"\n" - " component: \"/monarch/screen_factory.script\"\n" - " properties {\n" - " id: \"screen_id\"\n" - " value: \"rich_text_texts\"\n" - " type: PROPERTY_TYPE_HASH\n" - " }\n" - " properties {\n" - " id: \"popup\"\n" - " value: \"true\"\n" - " type: PROPERTY_TYPE_BOOLEAN\n" - " }\n" - "}\n" - "embedded_components {\n" - " id: \"collectionfactory\"\n" - " type: \"collectionfactory\"\n" - " data: \"prototype: \\\"/example/examples/rich_text/rich_text_texts/rich_text_texts.collection\\\"\\n" - "load_dynamically: true\\n" - "\"\n" - "}\n" - "" -} diff --git a/example/example.gui b/example/example.gui deleted file mode 100644 index ef72f7e4..00000000 --- a/example/example.gui +++ /dev/null @@ -1,1384 +0,0 @@ -script: "/example/example.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 450.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 900.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "C_Anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 380.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "lobby" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - parent: "C_Anchor" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "lobby_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_STRETCH - parent: "lobby" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "lobby_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "lobby_view" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -59.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "prefabs" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "lobby" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "prefab_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "prefabs" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -13.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.9 - y: 0.9 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Title of component" - font: "game" - id: "prefab_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "prefab_header" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -74.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 460.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "prefab_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "prefabs" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 55.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "icon_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "prefab_button" - layer: "" - inherit_alpha: true - slice9 { - x: 20.0 - y: 20.0 - z: 20.0 - w: 20.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 450.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Button name" - font: "game" - id: "text_button_lobby" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "icon_button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 450.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "N_Anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 70.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "panel_top" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_STRETCH - parent: "N_Anchor" - layer: "image_top" - inherit_alpha: true - slice9 { - x: 20.0 - y: 20.0 - z: 20.0 - w: 20.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: -240.0 - y: -35.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_menu" - parent: "panel_top" - layer: "image_top" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 - enabled: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 80.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_menu/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_menu" - layer: "image_top" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - overridden_fields: 20 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 3.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "MENU" - font: "game" - id: "button_menu/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_menu/button" - layer: "text_top" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 1 - overridden_fields: 3 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 20 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 240.0 - y: -35.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_api" - parent: "panel_top" - layer: "image_top" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 - enabled: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 80.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_api/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_api" - layer: "image_top" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - overridden_fields: 20 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 3.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "API" - font: "game" - id: "button_api/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_api/button" - layer: "text_top" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 1 - overridden_fields: 3 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 20 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 240.0 - y: -35.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_code" - parent: "panel_top" - layer: "image_top" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 - enabled: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 80.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_code/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_code" - layer: "image_top" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - overridden_fields: 20 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 3.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "CODE" - font: "game" - id: "button_code/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_code/button" - layer: "text_top" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 1 - overridden_fields: 3 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 20 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -30.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 360.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Title" - font: "game" - id: "text_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "panel_top" - layer: "text_top" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 1.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -layers { - name: "image" -} -layers { - name: "text" -} -layers { - name: "image_top" -} -layers { - name: "text_top" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 1024 diff --git a/example/example.gui_script b/example/example.gui_script deleted file mode 100644 index 098b9fca..00000000 --- a/example/example.gui_script +++ /dev/null @@ -1,315 +0,0 @@ ----@type druid -local druid = require("druid.druid") -local monarch = require("monarch.monarch") -local default_style = require("druid.styles.default.style") - -local checkbox = require("druid.extended.checkbox") -local checkbox_group = require("druid.extended.checkbox_group") -local dynamic_grid = require("druid.extended.dynamic_grid") -local input = require("druid.extended.input") -local lang_text = require("druid.extended.lang_text") -local progress = require("druid.extended.progress") -local radio_group = require("druid.extended.radio_group") -local slider = require("druid.extended.slider") -local timer_component = require("druid.extended.timer") -local data_list = require("druid.extended.data_list") - -local cache_path = sys.get_save_file("druid", "cache") - - -local function save_cache(self) - sys.save(cache_path, self.cache) -end - - --- Change current browser URL to share the examples ----@param self userdata ----@param scene_name string -local function set_scene_url(self, scene_name) - if not html5 then - return - end - - local command - if scene_name then - command = string.format('window.history.replaceState(null, null, "?example=%s")', scene_name) - else - command = 'window.history.replaceState(null, null, "index.html")' - end - html5.run(command) -end - - -local function back_to_lobby(self) - if gui.set_enabled(self.button_menu.node) then - return - end - - monarch.back() - gui.set_enabled(gui.get_node("C_Anchor"), true) - gui.set_enabled(self.button_menu.node, false) - gui.set_enabled(self.button_code.node, false) - gui.set_enabled(self.button_api.node, true) - - self.text_header:set_to("Druid") - - self.cache.last_scene = nil - save_cache(self) - set_scene_url(self, nil) -end - - -local function show_scene(self, scene_name, text_header) - print("Show scene:", scene_name) - - self.current_script_url = self.scene_urls[scene_name] - monarch.show(scene_name) - gui.set_enabled(gui.get_node("C_Anchor"), false) - gui.set_enabled(self.button_menu.node, true) - gui.set_enabled(self.button_code.node, true) - gui.set_enabled(self.button_api.node, false) - - self.text_header:set_to(text_header) - - self.cache.last_scene = scene_name - save_cache(self) - set_scene_url(self, scene_name) -end - - -local function init_top_panel(self) - self.druid:new_blocker("panel_top") - - self.button_menu = self.druid:new_button("button_menu/button", back_to_lobby) - self.druid:new_back_handler(back_to_lobby) - gui.set_enabled(self.button_menu.node, false) - - self.button_api = self.druid:new_button("button_api/button", function() - sys.open_url("https://insality.github.io/druid/modules/Druid.html") - end) - - self.button_code = self.druid:new_button("button_code/button", function() - local example_url = string.format("https://github.com/Insality/druid/blob/master/example/examples%s", self.current_script_url) - sys.open_url(example_url) - end) - gui.set_enabled(self.button_code.node, false) - - self.text_header = self.druid:new_text("text_header", "Druid") -end - - -local function on_window_callback(self, event, data) - druid.on_window_callback(event, data) -end - - -local function get_title(self, text) - local prefab = gui.get_node("prefab_header") - local nodes = gui.clone_tree(prefab) - local root = nodes["prefab_header"] - gui.set_enabled(root, true) - gui.set_text(nodes["prefab_text"], text) - return root -end - - -local function get_button(self, text, scene_name, script_url) - local prefab = gui.get_node("prefab_button") - local nodes = gui.clone_tree(prefab) - local root = nodes["prefab_button"] - gui.set_enabled(root, true) - - self.scene_names[scene_name] = text - self.scene_urls[scene_name] = script_url - - self.druid:new_button(root, function() - show_scene(self, scene_name, text) - end):set_click_zone(self.lobby_scroll.view_node) - - gui.set_text(nodes["text_button_lobby"], text) - - return root -end - - -local function get_button_disabled(self, text) - local prefab = gui.get_node("prefab_button") - local nodes = gui.clone_tree(prefab) - local root = nodes["prefab_button"] - gui.play_flipbook(nodes["icon_button"], "progress_back") - gui.set_enabled(root, true) - gui.set_text(nodes["text_button_lobby"], text) - - return root -end - - -local function init_lobby(self) - gui.set_enabled(gui.get_node("prefabs"), false) - self.scene_names = {} - self.scene_urls = {} - - self.lobby_scroll = self.druid:new_scroll("lobby_view", "lobby_content") - self.lobby_grid = self.druid:new_dynamic_grid("lobby_content") - self.lobby_scroll:bind_grid(self.lobby_grid) - self.lobby_scroll.style.WHEEL_SCROLL_SPEED = 20 - - self.lobby_grid:add(get_title(self, "General examples")) - self.lobby_grid:add(get_button(self, "Overview", "general_overview", "/general/overview/overview.gui_script")) - self.lobby_grid:add(get_button(self, "Buttons", "general_buttons", "/general/buttons/buttons.gui_script")) - self.lobby_grid:add(get_button(self, "Sliders", "general_sliders", "/general/sliders/sliders.gui_script")) - self.lobby_grid:add(get_button(self, "Scrolls", "general_scroll", "/general/scroll/scroll.gui_script")) - self.lobby_grid:add(get_button(self, "Grids", "general_grid", "/general/grid/grid.gui_script")) - self.lobby_grid:add(get_button(self, "Progress Bar", "general_progress_bar", "/general/progress_bar/progress_bar.gui_script")) - self.lobby_grid:add(get_button(self, "Data List", "general_data_list", "/general/data_list/data_list.gui_script")) - self.lobby_grid:add(get_button(self, "Checkboxes", "general_checkboxes", "/general/checkboxes/checkboxes.gui_script")) - self.lobby_grid:add(get_button(self, "Input text", "general_input", "/general/input/input.gui_script")) - self.lobby_grid:add(get_button(self, "Layout", "general_layout", "/general/layout/layout.gui_script")) - self.lobby_grid:add(get_button(self, "Hover", "general_hover", "/general/hover/hover.gui_script")) - self.lobby_grid:add(get_button(self, "Swipe", "general_swipe", "/general/swipe/swipe.gui_script")) - self.lobby_grid:add(get_button(self, "Drag", "general_drag", "/general/drag/drag.gui_script")) - self.lobby_grid:add(get_button(self, "Hotkey", "general_hotkey", "/general/hotkey/hotkey.gui_script")) - - self.lobby_grid:add(get_title(self, "Texts")) - self.lobby_grid:add(get_button(self, "Texts", "texts_general", "/texts/texts_general/texts_general.gui_script")) - self.lobby_grid:add(get_button(self, "Adjust types", "texts_adjust", "/texts/texts_adjust/texts_adjust.gui_script")) - self.lobby_grid:add(get_button(self, "Lang Text", "texts_lang_text", "/texts/lang_text/lang_text.gui_script")) - - self.lobby_grid:add(get_title(self, "Scrolls")) - self.lobby_grid:add(get_button_disabled(self, "Nested scrolls", "scroll_scene")) - self.lobby_grid:add(get_button_disabled(self, "With points of interest", "scroll_scene")) - self.lobby_grid:add(get_button_disabled(self, "Without inertion", "scroll_scene")) - - self.lobby_grid:add(get_title(self, "Grids")) - self.lobby_grid:add(get_button(self, "Static grid", "grid_static_grid", "/grid/static_grid/static_grid.gui_script")) - self.lobby_grid:add(get_button(self, "Static with dynamic pos", "grid_static_grid_dynamic_pos", "/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Dynamic grid", "scroll_scene")) - self.lobby_grid:add(get_button_disabled(self, "Scroll binding", "scroll_scene")) - self.lobby_grid:add(get_button(self, "Add/Remove animations", "grid_animations", "/grid/grid_animations/grid_animations.gui_script")) - - self.lobby_grid:add(get_title(self, "Data list | Infinity scroll")) - self.lobby_grid:add(get_button(self, "With static grid", "data_list_static_grid", "/data_list/static_grid/static_grid.gui_script")) - self.lobby_grid:add(get_button(self, "With dynamic grid", "data_list_dynamic_grid", "/data_list/dynamic_grid/dynamic_grid.gui_script")) - self.lobby_grid:add(get_button(self, "Navigate over elements", "data_list_navigate", "/data_list/navigate/navigate.gui_script")) - self.lobby_grid:add(get_button(self, "Reinit data", "data_list_reinit_data", "/data_list/reinit_data/reinit_data.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Add / remove data", "data_list_manage_data", "/data_list/manage_data/manage_data.gui_script")) - self.lobby_grid:add(get_button(self, "With component", "data_list_with_component", "/data_list/with_component/with_component.gui_script")) - - self.lobby_grid:add(get_title(self, "Layouts")) - self.lobby_grid:add(get_button(self, "Layout fit", "layout_fit", "/layout/layout_fit/layout_fit.gui_script")) - - self.lobby_grid:add(get_title(self, "Custom components")) - self.lobby_grid:add(get_button(self, "Rich Input", "custom_rich_input", "/custom/rich_input/rich_input.gui_script")) - self.lobby_grid:add(get_button(self, "Pin Knob", "custom_pin_knob", "/custom/pin_knob/pin_knob.gui_script")) - self.lobby_grid:add(get_button(self, "Rich Text", "custom_rich_text", "/custom/rich_text/rich_text.gui_script")) - - self.lobby_grid:add(get_title(self, "Rich Texts")) - self.lobby_grid:add(get_button(self, "Rich Text Texts", "rich_text_texts", "/custom/rich_text_texts/rich_text_texts.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Rich Text Images"))--, "rich_text_images", "/custom/rich_text_texts/rich_text_texts.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Rich Text Tags"))--, "rich_text_images", "/custom/rich_text_texts/rich_text_texts.gui_script")) - - self.lobby_grid:add(get_title(self, "System")) - self.lobby_grid:add(get_button_disabled(self, "Styles")) - self.lobby_grid:add(get_button(self, "Whitelist / Blacklist", "system_whitelist_blacklist", "/system/whitelist_blacklist/whitelist_blacklist.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Component interests")) - self.lobby_grid:add(get_button_disabled(self, "Nested Druids")) - self.lobby_grid:add(get_button(self, "Message input", "system_message_input", "/system/message_input/message_input.gui_script")) - self.lobby_grid:add(get_button_disabled(self, "Input priority")) - self.lobby_grid:add(get_button(self, "Inner templates", "system_inner_templates", "/system/inner_templates/inner_templates.gui_script")) - self.lobby_grid:add(get_button(self, "Late init check", "system_late_init_check", "/system/late_init_check/late_init_check.gui_script")) -end - - -local function check_url(self) - if not html5 then - return - end - - local example_arg = html5.run("new URLSearchParams(window.location.search).get('example')") - if example_arg and self.scene_names[example_arg] then - print("Start example: ", example_arg) - show_scene(self, example_arg, self.scene_names[example_arg] or "unknown") - return true - end -end - - -local function check_cache(self) - local scroll_position = self.cache.scroll_position - if scroll_position then - self.lobby_scroll:scroll_to_percent(vmath.vector3(0, scroll_position, 0), true) - end - - local last_scene = self.cache.last_scene - if last_scene then - show_scene(self, last_scene, self.scene_names[last_scene] or "unknown") - return true - end -end - - -local function check_loading(self) - if check_url(self) then - return - end - - if check_cache(self) then - return - end -end - - -local function register_druid_extended_components(self) - druid.register("checkbox", checkbox) - druid.register("checkbox_group", checkbox_group) - druid.register("dynamic_grid", dynamic_grid) - druid.register("input", input) - druid.register("lang_text", lang_text) - druid.register("progress", progress) - druid.register("radio_group", radio_group) - druid.register("slider", slider) - druid.register("timer", timer_component) - druid.register("data_list", data_list) -end - - - -function init(self) - -- Main lobby have more render priority (top panel) - gui.set_render_order(10) - - window.set_listener(on_window_callback) - druid.set_default_style(default_style) - register_druid_extended_components(self) - self.druid = druid.new(self) - self.cache = sys.load(cache_path) or {} - - init_top_panel(self) - init_lobby(self) - self.current_script_url = "" - - timer.delay(0, false, check_loading) -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function final(self) - self.cache.scroll_position = self.lobby_scroll:get_percent().y - save_cache(self) - - self.druid:final() -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/basic/back_handler/basic_back_handler.gui b/example/examples/basic/back_handler/basic_back_handler.gui new file mode 100644 index 00000000..06c7705e --- /dev/null +++ b/example/examples/basic/back_handler/basic_back_handler.gui @@ -0,0 +1,50 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + size { + x: 700.0 + y: 100.0 + } + color { + x: 0.522 + y: 0.522 + z: 0.522 + } + type: TYPE_TEXT + text: "Press \"back\" to trigger a callback" + font: "text_bold" + id: "text" + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/back_handler/basic_back_handler.lua b/example/examples/basic/back_handler/basic_back_handler.lua new file mode 100644 index 00000000..4b9ee3a1 --- /dev/null +++ b/example/examples/basic/back_handler/basic_back_handler.lua @@ -0,0 +1,24 @@ +local component = require("druid.component") + +---@class basic_back_handler: druid.base_component +---@field druid druid_instance +local M = component.create("basic_back_handler") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.druid:new_back_handler(self.on_back) +end + + +function M:on_back() + local node = self:get_node("text") + gui.animate(node, gui.PROP_SCALE, vmath.vector3(1.2), gui.EASING_OUTELASTIC, 0.5, 0, function() + gui.animate(node, gui.PROP_SCALE, vmath.vector3(1), gui.EASING_OUTELASTIC, 0.5) + end) +end + + +return M diff --git a/example/examples/basic/blocker/basic_blocker.gui b/example/examples/basic/blocker/basic_blocker.gui new file mode 100644 index 00000000..96a18866 --- /dev/null +++ b/example/examples/basic/blocker/basic_blocker.gui @@ -0,0 +1,91 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + size { + x: 512.0 + y: 512.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "blocker" + parent: "root" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } +} +nodes { + type: TYPE_TEMPLATE + id: "button" + parent: "blocker" + inherit_alpha: true + template: "/example/templates/button_text_green.gui" +} +nodes { + type: TYPE_BOX + id: "button/root" + parent: "button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button/text" + parent: "button/root" + template_node_child: true +} +nodes { + position { + x: -246.0 + y: 246.0 + } + size { + x: 300.0 + y: 50.0 + } + type: TYPE_TEXT + text: "Blocker" + font: "text_bold" + id: "text" + pivot: PIVOT_NW + parent: "blocker" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/blocker/basic_blocker.lua b/example/examples/basic/blocker/basic_blocker.lua new file mode 100644 index 00000000..1885d91f --- /dev/null +++ b/example/examples/basic/blocker/basic_blocker.lua @@ -0,0 +1,34 @@ +local component = require("druid.component") + +---@class basic_blocker: druid.component +---@field druid druid_instance +---@field root node +---@field blocker druid.blocker +local M = component.create("basic_blocker") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + + self.button_root = self.druid:new_button(self.root, self.on_root_click) + -- This blocker forbid input to all previous nodes in node zone + self.blocker = self.druid:new_blocker("blocker") + self.button = self.druid:new_button("button/root", self.on_button_click) +end + + +function M:on_root_click() + print("Root click") +end + + +function M:on_button_click() + print("Button click") +end + + +return M diff --git a/example/examples/basic/button/basic_button.gui b/example/examples/basic/button/basic_button.gui new file mode 100644 index 00000000..d96efe62 --- /dev/null +++ b/example/examples/basic/button/basic_button.gui @@ -0,0 +1,236 @@ +script: "" +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button" + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "button/root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "druid" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 245.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Confirm" + font: "text_bold" + id: "button/text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button/root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/button/basic_button.lua b/example/examples/basic/button/basic_button.lua new file mode 100644 index 00000000..79172d65 --- /dev/null +++ b/example/examples/basic/button/basic_button.lua @@ -0,0 +1,19 @@ +local component = require("druid.component") + +---@class basic_button: druid.base_component +---@field druid druid_instance +---@field button druid.button +local M = component.create("basic_button") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.button = self.druid:new_button("button/root", function() + print("Button pressed") + end) +end + + +return M diff --git a/example/examples/basic/button/basic_button_double_click.gui b/example/examples/basic/button/basic_button_double_click.gui new file mode 100644 index 00000000..d96efe62 --- /dev/null +++ b/example/examples/basic/button/basic_button_double_click.gui @@ -0,0 +1,236 @@ +script: "" +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button" + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "button/root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "druid" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 245.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Confirm" + font: "text_bold" + id: "button/text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button/root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/button/basic_button_double_click.lua b/example/examples/basic/button/basic_button_double_click.lua new file mode 100644 index 00000000..1889fe53 --- /dev/null +++ b/example/examples/basic/button/basic_button_double_click.lua @@ -0,0 +1,23 @@ +local component = require("druid.component") + +---@class basic_button_double_click: druid.base_component +---@field druid druid_instance +---@field button druid.button +local M = component.create("basic_button_double_click") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.button = self.druid:new_button("button/root", function() + print("Click") + end) + + self.button.on_double_click:subscribe(function() + print("Double click") + end) +end + + +return M diff --git a/example/examples/basic/button/basic_button_hold.gui b/example/examples/basic/button/basic_button_hold.gui new file mode 100644 index 00000000..0be34c1a --- /dev/null +++ b/example/examples/basic/button/basic_button_hold.gui @@ -0,0 +1,107 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + size { + x: 280.0 + y: 90.0 + } + color { + x: 0.902 + y: 0.875 + z: 0.624 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "button" + parent: "root" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } +} +nodes { + size { + x: 400.0 + y: 400.0 + } + type: TYPE_PIE + id: "mask" + parent: "button" + inherit_alpha: true + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: false + size_mode: SIZE_MODE_AUTO +} +nodes { + size { + x: 280.0 + y: 90.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "button_image" + parent: "mask" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } +} +nodes { + size { + x: 245.0 + y: 50.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_TEXT + text: "Confirm" + font: "text_bold" + id: "text" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "button" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/button/basic_button_hold.lua b/example/examples/basic/button/basic_button_hold.lua new file mode 100644 index 00000000..97d1a5b2 --- /dev/null +++ b/example/examples/basic/button/basic_button_hold.lua @@ -0,0 +1,49 @@ +local component = require("druid.component") +local panthera = require("panthera.panthera") + +local animation = require("example.examples.basic.button.basic_button_hold_panthera") + +---@class basic_button_hold: druid.base_component +---@field druid druid_instance +---@field button druid.button +local M = component.create("basic_button_hold") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.animation = panthera.create_gui(animation, self:get_template(), nodes) + + self.button = self.druid:new_button("button", function() + print("Click") + end) + + self.button:set_style({}) + self.button.style.AUTOHOLD_TRIGGER = 2 + self.button.style.LONGTAP_TIME = 0 + + self.button.on_hold_callback:subscribe(function(_, _, _, time) + local start_time = self.button.style.LONGTAP_TIME + local max_time = self.button.style.AUTOHOLD_TRIGGER + local progress = (time - start_time) / (max_time - start_time) + panthera.set_time(self.animation, "hold", progress) + end) + + self.button.on_long_click:subscribe(function() + panthera.play(self.animation, "complete") + end) + + self.button.hover.on_mouse_hover:subscribe(function(_, state) + if not state then + panthera.set_time(self.animation, "hold", 0) + end + end) + + self.button.on_click_outside:subscribe(function() + panthera.set_time(self.animation, "hold", 0) + end) +end + + +return M diff --git a/example/examples/basic/button/basic_button_hold_panthera.lua b/example/examples/basic/button/basic_button_hold_panthera.lua new file mode 100644 index 00000000..b63a4e20 --- /dev/null +++ b/example/examples/basic/button/basic_button_hold_panthera.lua @@ -0,0 +1,266 @@ +return { + type = "animation_editor", + format = "json", + data = { + nodes = { + }, + animations = { + { + animation_id = "default", + duration = 1, + animation_keys = { + }, + }, + { + animation_id = "hold", + duration = 1, + animation_keys = { + { + end_value = -90, + easing = "outsine", + property_id = "rotation_z", + node_id = "button_image", + key_type = "tween", + }, + { + end_value = 90, + easing = "outsine", + property_id = "rotation_z", + node_id = "mask", + key_type = "tween", + }, + { + end_value = 1.1, + easing = "outsine", + property_id = "scale_x", + duration = 0.15, + key_type = "tween", + node_id = "button", + start_value = 1, + }, + { + end_value = 1.1, + easing = "outsine", + property_id = "scale_y", + duration = 0.15, + key_type = "tween", + node_id = "button", + start_value = 1, + }, + { + end_value = 1.3, + easing = "outsine", + property_id = "scale_x", + duration = 0.15, + key_type = "tween", + node_id = "text", + start_value = 1, + }, + { + end_value = 1.3, + easing = "outsine", + property_id = "scale_y", + duration = 0.15, + key_type = "tween", + node_id = "text", + start_value = 1, + }, + { + start_value = 360, + easing = "outsine", + property_id = "fill_angle", + duration = 1, + node_id = "mask", + key_type = "tween", + }, + { + end_value = 1, + easing = "incirc", + property_id = "scale_x", + duration = 0.85, + start_value = 1.1, + key_type = "tween", + node_id = "button", + start_time = 0.15, + }, + { + end_value = 1, + easing = "incirc", + property_id = "scale_y", + duration = 0.85, + start_value = 1.1, + key_type = "tween", + node_id = "button", + start_time = 0.15, + }, + { + end_value = 1, + easing = "outsine", + property_id = "scale_x", + duration = 0.51, + start_value = 1.3, + key_type = "tween", + node_id = "text", + start_time = 0.49, + }, + { + end_value = 1, + easing = "outsine", + property_id = "scale_y", + duration = 0.51, + start_value = 1.3, + key_type = "tween", + node_id = "text", + start_time = 0.49, + }, + }, + }, + { + animation_id = "complete", + duration = 0.4, + animation_keys = { + { + easing = "linear", + property_id = "inherit_alpha", + data = "false", + key_type = "trigger", + node_id = "text", + start_data = "true", + }, + { + end_value = 0.624, + easing = "outsine", + property_id = "color_b", + key_type = "tween", + node_id = "button_image", + start_value = 0.62, + }, + { + end_value = 0.875, + easing = "outsine", + property_id = "color_g", + key_type = "tween", + node_id = "button_image", + start_value = 0.835, + }, + { + end_value = 0.902, + easing = "outsine", + property_id = "color_r", + key_type = "tween", + node_id = "button_image", + start_value = 0.557, + }, + { + end_value = 1.1, + easing = "outsine", + property_id = "color_a", + duration = 0.17, + key_type = "tween", + node_id = "root", + start_value = 1, + }, + { + end_value = 1.2, + easing = "outsine", + property_id = "scale_x", + duration = 0.17, + key_type = "tween", + node_id = "root", + start_value = 1, + }, + { + end_value = 1.2, + easing = "outsine", + property_id = "scale_y", + duration = 0.17, + key_type = "tween", + node_id = "root", + start_value = 1, + }, + { + end_value = 0.557, + easing = "outsine", + property_id = "color_r", + duration = 0.38, + start_value = 0.902, + key_type = "tween", + node_id = "button_image", + start_time = 0.02, + }, + { + end_value = 0.62, + easing = "outsine", + property_id = "color_b", + duration = 0.38, + start_value = 0.624, + key_type = "tween", + node_id = "button_image", + start_time = 0.02, + }, + { + end_value = 0.835, + easing = "outsine", + property_id = "color_g", + duration = 0.38, + start_value = 0.875, + key_type = "tween", + node_id = "button_image", + start_time = 0.02, + }, + { + end_value = 1, + easing = "outsine", + property_id = "color_a", + duration = 0.22, + start_value = 1.1, + key_type = "tween", + node_id = "root", + start_time = 0.17, + }, + { + end_value = 1, + easing = "outsine", + property_id = "scale_x", + duration = 0.22, + start_value = 1.2, + key_type = "tween", + node_id = "root", + start_time = 0.17, + }, + { + end_value = 1, + easing = "outsine", + property_id = "scale_y", + duration = 0.22, + start_value = 1.2, + key_type = "tween", + node_id = "root", + start_time = 0.17, + }, + { + easing = "linear", + property_id = "inherit_alpha", + start_data = "false", + data = "true", + key_type = "trigger", + node_id = "text", + start_time = 0.39, + }, + }, + }, + }, + metadata = { + layers = { + }, + gui_path = "/example/examples/basic/button/basic_button_hold.gui", + gizmo_steps = { + }, + settings = { + font_size = 40, + }, + fps = 60, + }, + }, + version = 1, +} \ No newline at end of file diff --git a/example/examples/basic/checkbox/basic_checkbox.gui b/example/examples/basic/checkbox/basic_checkbox.gui new file mode 100644 index 00000000..b0f0f4f7 --- /dev/null +++ b/example/examples/basic/checkbox/basic_checkbox.gui @@ -0,0 +1,77 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + size { + x: 40.0 + y: 40.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_BOX + texture: "druid/rect_round2_width1" + id: "button" + parent: "root" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } +} +nodes { + color { + x: 0.722 + y: 0.741 + z: 0.761 + } + type: TYPE_BOX + texture: "druid/icon_check" + id: "icon" + parent: "button" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -20.0 + } + size { + x: 40.0 + y: 4.0 + } + color { + x: 0.894 + y: 0.506 + z: 0.333 + } + type: TYPE_BOX + texture: "druid/pixel" + id: "selected" + pivot: PIVOT_S + adjust_mode: ADJUST_MODE_STRETCH + parent: "button" + inherit_alpha: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/checkbox/basic_checkbox.lua b/example/examples/basic/checkbox/basic_checkbox.lua new file mode 100644 index 00000000..aaa7bfa9 --- /dev/null +++ b/example/examples/basic/checkbox/basic_checkbox.lua @@ -0,0 +1,41 @@ +local component = require("druid.component") + +---@class basic_checkbox: druid.base_component +---@field druid druid_instance +---@field button druid.button +local M = component.create("basic_checkbox") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.button = self.druid:new_button("button", self.on_checkbox_click) -- Button to handle checkbox + self.icon = self:get_node("icon") -- Checkbox icon to hide/show + self.selected = self:get_node("selected") -- Selected effect to show when checkbox is changed + gui.set_alpha(self.selected, 0) + + self:set_state(false) +end + + +function M:on_checkbox_click() + self:set_state(not self.is_enabled) +end + + +function M:set_state(is_enabled) + if self.is_enabled == is_enabled then + return + end + + self.is_enabled = is_enabled + gui.set_enabled(self.icon, self.is_enabled) + + gui.set_alpha(self.selected, 1) + gui.animate(self.selected, "color.w", 0, gui.EASING_INSINE, 0.16) +end + + +return M diff --git a/example/examples/general/hover/hover.gui b/example/examples/basic/drag/drag.gui similarity index 76% rename from example/examples/general/hover/hover.gui rename to example/examples/basic/drag/drag.gui index fa7239ab..80572e38 100644 --- a/example/examples/general/hover/hover.gui +++ b/example/examples/basic/drag/drag.gui @@ -1,11 +1,7 @@ -script: "/example/examples/general/hover/hover.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} +script: "" textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +11,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +29,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } @@ -46,7 +42,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -68,7 +64,8 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false + material: "" } nodes { position { @@ -102,12 +99,12 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "hover_node" + id: "drag" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/button_text_blue.gui" template_node_child: false custom_type: 0 enabled: true @@ -132,49 +129,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 80.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "hover_node/button" + texture: "druid/ui_circle_32" + id: "drag/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "hover_node" - layer: "image" + parent: "drag" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -185,28 +182,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Hover me!" - font: "game" - id: "hover_node/text" + text: "Drag Me" + font: "text_bold" + id: "drag/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -217,19 +214,19 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "hover_node/button" - layer: "text" + parent: "drag/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 + shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true text_leading: 1.0 @@ -237,12 +234,7 @@ nodes { custom_type: 0 enabled: true visible: true -} -layers { - name: "image" -} -layers { - name: "text" + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/drag/drag.lua b/example/examples/basic/drag/drag.lua new file mode 100644 index 00000000..fa51ad4f --- /dev/null +++ b/example/examples/basic/drag/drag.lua @@ -0,0 +1,29 @@ +local component = require("druid.component") + +---@class drag: druid.base_component +---@field druid druid_instance +local M = component.create("drag") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + -- Init drag and move the drag node on drag callback + self.drag = self.druid:new_drag("drag/root", function(_, dx, dy) + local position_x = gui.get(self.drag.node, "position.x") + local position_y = gui.get(self.drag.node, "position.y") + gui.set(self.drag.node, "position.x", position_x + dx) + gui.set(self.drag.node, "position.y", position_y + dy) + end) + + -- Save start position for animation + self.start_position = gui.get_position(self.drag.node) + self.drag.on_drag_end:subscribe(function() + gui.animate(self.drag.node, "position", self.start_position, gui.EASING_OUTBACK, 0.3) + end) +end + + +return M diff --git a/example/examples/basic/drag/drag_to_node.gui b/example/examples/basic/drag/drag_to_node.gui new file mode 100644 index 00000000..ec8257a9 --- /dev/null +++ b/example/examples/basic/drag/drag_to_node.gui @@ -0,0 +1,124 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "drag" + parent: "root" + inherit_alpha: true + template: "/example/templates/button_text_blue.gui" +} +nodes { + type: TYPE_BOX + id: "drag/root" + parent: "drag" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "Drag Me" + id: "drag/text" + parent: "drag/root" + overridden_fields: 8 + template_node_child: true +} +nodes { + position { + y: 300.0 + } + size { + x: 300.0 + y: 300.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "zone" + parent: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + position { + y: 100.0 + } + size { + x: 300.0 + y: 100.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_TEXT + text: "Drop Item Here" + font: "text_bold" + id: "text_hint" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "zone" + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + scale { + x: 2.0 + y: 2.0 + } + size { + x: 100.0 + y: 100.0 + } + type: TYPE_TEXT + text: "0" + font: "text_bold" + id: "text_counter" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "zone" + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/drag/drag_to_node.lua b/example/examples/basic/drag/drag_to_node.lua new file mode 100644 index 00000000..34fec174 --- /dev/null +++ b/example/examples/basic/drag/drag_to_node.lua @@ -0,0 +1,62 @@ +local component = require("druid.component") + +---@class drag_to_node: druid.base_component +---@field druid druid_instance +local M = component.create("drag_to_node") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.zone = self:get_node("zone") + self.counter = 0 + self.text_counter = self:get_node("text_counter") + gui.set_text(self.text_counter, self.counter) + + -- Init drag and move the drag node on drag callback + self.drag = self.druid:new_drag("drag/root", self.on_drag_start) + self.drag.on_drag_end:subscribe(self.on_drag_end) + + -- Save start position for animation + self.start_position = gui.get_position(self.drag.node) +end + + +function M:on_drag_start(dx, dy, x, y, touch) + local position_x = gui.get(self.drag.node, "position.x") + local position_y = gui.get(self.drag.node, "position.y") + gui.set(self.drag.node, "position.x", position_x + dx) + gui.set(self.drag.node, "position.y", position_y + dy) + + local is_pick_zone = gui.pick_node(self.zone, touch.x, touch.y) + self:on_hover_pick_zone(is_pick_zone) +end + + +function M:on_drag_end(x, y, touch) + gui.animate(self.drag.node, "position", self.start_position, gui.EASING_OUTBACK, 0.3) + + local is_pick_zone = gui.pick_node(self.zone, touch.x, touch.y) + if is_pick_zone then + self.counter = self.counter + 1 + gui.set_text(self.text_counter, self.counter) + self:on_drop_to_zone() + end + self:on_hover_pick_zone(false) +end + + +function M:on_hover_pick_zone(is_pick_zone) + local target_alpha = is_pick_zone and 1.5 or 1 + gui.animate(self.zone, "color.w", target_alpha, gui.EASING_OUTSINE, 0.3) +end + + +function M:on_drop_to_zone() + gui.set_scale(self.zone, vmath.vector3(1.2)) + gui.animate(self.zone, "scale", vmath.vector3(1), gui.EASING_OUTBACK, 0.3) +end + + +return M diff --git a/example/examples/basic/examples_list.lua b/example/examples/basic/examples_list.lua new file mode 100644 index 00000000..70483e09 --- /dev/null +++ b/example/examples/basic/examples_list.lua @@ -0,0 +1,721 @@ +local const = require("druid.const") +local helper = require("druid.helper") +local M = {} + +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_basic_button", + information_text_id = "ui_example_basic_button_description", + template = "basic_button", + root = "basic_button/root", + code_url = "example/examples/basic/button/basic_button.lua", + component_class = require("example.examples.basic.button.basic_button"), + properties_control = function(instance, properties_panel) + ---@cast instance basic_button + + local checkbox = properties_panel:add_checkbox("ui_enabled", false, function(value) + instance.button:set_enabled(value) + end) + checkbox:set_value(true) + end, + on_create = function(instance, output_log) + ---@cast instance basic_button + instance.button.on_click:subscribe(function() + output_log:add_log_text("Button Clicked") + end) + end, + }, + { + name_id = "ui_example_basic_button_double_click", + information_text_id = "ui_example_basic_button_double_click_description", + template = "basic_button_double_click", + root = "basic_button_double_click/root", + code_url = "example/examples/basic/button/basic_button_double_click.lua", + component_class = require("example.examples.basic.button.basic_button_double_click"), + on_create = function(instance, output_log) + ---@cast instance basic_button_double_click + instance.button.on_click:subscribe(function() + output_log:add_log_text("Clicked") + end) + instance.button.on_double_click:subscribe(function() + output_log:add_log_text("Double Clicked") + end) + end, + }, + { + name_id = "ui_example_basic_button_hold", + information_text_id = "ui_example_basic_button_hold_description", + template = "basic_button_hold", + root = "basic_button_hold/root", + code_url = "example/examples/basic/button/basic_button_hold.lua", + component_class = require("example.examples.basic.button.basic_button_hold"), + on_create = function(instance, output_log) + ---@cast instance basic_button_hold + instance.button.on_click:subscribe(function() + output_log:add_log_text("Clicked") + end) + instance.button.on_long_click:subscribe(function() + output_log:add_log_text("On long click") + end) + end, + }, + { + name_id = "ui_example_basic_text", + information_text_id = "ui_example_basic_text_description", + template = "basic_text", + root = "basic_text/root", + code_url = "example/examples/basic/text/basic_text.lua", + component_class = require("example.examples.basic.text.basic_text"), + properties_control = function(instance, properties_panel) + ---@cast instance basic_text + + local adjust_index = 1 + local adjust_types = { + const.TEXT_ADJUST.DOWNSCALE, + const.TEXT_ADJUST.DOWNSCALE_LIMITED, + --const.TEXT_ADJUST.SCALE_THEN_SCROLL, -- works bad with container for some reason + --const.TEXT_ADJUST.SCROLL, -- works bad with container for some reason + const.TEXT_ADJUST.TRIM, + } + properties_panel:add_button("ui_adjust_next", function() + adjust_index = adjust_index + 1 + if adjust_index > #adjust_types then + adjust_index = 1 + end + instance.text:set_text_adjust(adjust_types[adjust_index], 0.5) + end) + + local pivot_index = 1 + local pivot_list = { + gui.PIVOT_CENTER, + gui.PIVOT_W, + gui.PIVOT_SW, + gui.PIVOT_S, + gui.PIVOT_SE, + gui.PIVOT_E, + gui.PIVOT_NE, + gui.PIVOT_N, + gui.PIVOT_NW, + } + + ---@cast instance rich_text_tags + properties_panel:add_button("ui_pivot_next", function() + pivot_index = pivot_index + 1 + if pivot_index > #pivot_list then + pivot_index = 1 + end + instance:set_pivot(pivot_list[pivot_index]) + end) + end, + get_debug_info = function(instance) + ---@cast instance multiline_text + local info = "" + + info = info .. "Text Adjust: " .. instance.text.adjust_type .. "\n" + info = info .. "Pivot: " .. gui.get_pivot(instance.text.node) .. "\n" + + return info + end + }, + { + name_id = "ui_example_basic_multiline_text", + information_text_id = "ui_example_basic_multiline_text_description", + template = "multiline_text", + root = "multiline_text/root", + code_url = "example/examples/basic/text/multiline_text.lua", + component_class = require("example.examples.basic.text.multiline_text"), + properties_control = function(instance, properties_panel) + ---@cast instance multiline_text + + local adjust_index = 1 + local adjust_types = { + const.TEXT_ADJUST.DOWNSCALE, + const.TEXT_ADJUST.DOWNSCALE_LIMITED, + --const.TEXT_ADJUST.SCALE_THEN_SCROLL, -- works bad with container for some reason + --const.TEXT_ADJUST.SCROLL, -- works bad with container for some reason + const.TEXT_ADJUST.TRIM, + } + properties_panel:add_button("ui_adjust_next", function() + adjust_index = adjust_index + 1 + if adjust_index > #adjust_types then + adjust_index = 1 + end + instance.text:set_text_adjust(adjust_types[adjust_index], 0.8) + end) + end, + get_debug_info = function(instance) + ---@cast instance multiline_text + local info = "" + + info = info .. "Text Adjust: " .. instance.text.adjust_type .. "\n" + info = info .. "Pivot: " .. gui.get_pivot(instance.text.node) .. "\n" + + return info + end + }, + { + name_id = "ui_example_basic_hover", + information_text_id = "ui_example_basic_hover_description", + template = "hover", + root = "hover/root", + code_url = "example/examples/basic/hover/hover.lua", + component_class = require("example.examples.basic.hover.hover"), + }, + { + name_id = "ui_example_basic_drag", + information_text_id = "ui_example_basic_drag_description", + template = "drag", + root = "drag/root", + code_url = "example/examples/basic/drag/drag.lua", + component_class = require("example.examples.basic.drag.drag"), + }, + { + name_id = "ui_example_basic_drag_to_node", + information_text_id = "ui_example_basic_drag_to_node_description", + template = "drag_to_node", + root = "drag_to_node/root", + code_url = "example/examples/basic/drag/drag_to_node.lua", + component_class = require("example.examples.basic.drag.drag_to_node"), + }, + { + name_id = "ui_example_basic_slider", + information_text_id = "ui_example_basic_slider_description", + template = "basic_slider", + root = "basic_slider/root", + code_url = "example/examples/basic/slider/basic_slider.lua", + component_class = require("example.examples.basic.slider.basic_slider"), + on_create = function(instance, output_log) + ---@cast instance basic_slider + instance.slider.on_change_value:subscribe(function(_, value) + local value = helper.round(value, 2) + output_log:add_log_text("Slider Value: " .. value) + end) + end, + }, + { + name_id = "ui_example_basic_slider_vertical", + information_text_id = "ui_example_basic_slider_vertical_description", + template = "basic_slider_vertical", + root = "basic_slider_vertical/root", + code_url = "example/examples/basic/slider/basic_slider_vertical.lua", + component_class = require("example.examples.basic.slider.basic_slider_vertical"), + on_create = function(instance, output_log) + ---@cast instance basic_slider_vertical + instance.slider.on_change_value:subscribe(function(_, value) + local value = helper.round(value, 2) + output_log:add_log_text("Slider Value: " .. value) + end) + end, + }, + { + name_id = "ui_example_basic_slider_stepped", + information_text_id = "ui_example_basic_slider_stepped_description", + template = "basic_slider_stepped", + root = "basic_slider_stepped/root", + code_url = "example/examples/basic/slider/basic_slider_stepped.lua", + component_class = require("example.examples.basic.slider.basic_slider_stepped"), + on_create = function(instance, output_log) + ---@cast instance basic_slider + instance.slider.on_change_value:subscribe(function(_, value) + local value = helper.round(value, 2) + output_log:add_log_text("Slider Value: " .. value) + end) + end, + }, + { + name_id = "ui_example_basic_progress_bar", + information_text_id = "ui_example_basic_progress_bar_description", + template = "basic_progress_bar", + root = "basic_progress_bar/root", + code_url = "example/examples/basic/progress_bar/basic_progress_bar.lua", + component_class = require("example.examples.basic.progress_bar.basic_progress_bar"), + properties_control = function(instance, properties_panel) + ---@cast instance basic_progress_bar + properties_panel:add_slider("ui_value", 1, function(value) + instance:set_value(value) + end) + end, + }, + { + name_id = "ui_example_basic_progress_bar_slice9", + information_text_id = "ui_example_basic_progress_bar_slice9_description", + template = "basic_progress_bar_slice9", + root = "basic_progress_bar_slice9/root", + code_url = "example/examples/basic/progress_bar/basic_progress_bar_slice9.lua", + component_class = require("example.examples.basic.progress_bar.basic_progress_bar_slice9"), + properties_control = function(instance, properties_panel) + ---@cast instance basic_progress_bar_slice9 + properties_panel:add_slider("ui_value", 1, function(value) + instance:set_value(value) + end) + end, + }, + { + name_id = "ui_example_basic_blocker", + information_text_id = "ui_example_basic_blocker_description", + template = "basic_blocker", + root = "basic_blocker/root", + code_url = "example/examples/basic/blocker/basic_blocker.lua", + component_class = require("example.examples.basic.blocker.basic_blocker"), + on_create = function(instance, output_log) + ---@cast instance basic_blocker + instance.button_root.on_click:subscribe(function() + output_log:add_log_text("Root Clicked") + end) + instance.button.on_click:subscribe(function() + output_log:add_log_text("Button Clicked") + end) + end, + }, + { + name_id = "ui_example_basic_back_handler", + information_text_id = "ui_example_basic_back_handler_description", + template = "basic_back_handler", + root = "basic_back_handler/root", + code_url = "example/examples/basic/back_handler/basic_back_handler.lua", + component_class = require("example.examples.basic.back_handler.basic_back_handler"), + }, + { + name_id = "ui_example_basic_timer", + information_text_id = "ui_example_basic_timer_description", + template = "basic_timer", + root = "basic_timer/root", + code_url = "example/examples/basic/timer/basic_timer.lua", + component_class = require("example.examples.basic.timer.basic_timer"), + on_create = function(instance, output_log) + ---@cast instance basic_timer + instance.on_cycle_end:subscribe(function() + output_log:add_log_text("Timer Cycle End") + end) + end, + }, + { + name_id = "ui_example_basic_hotkey", + information_text_id = "ui_example_basic_hotkey_description", + template = "basic_hotkey", + root = "basic_hotkey/root", + code_url = "example/examples/basic/hotkey/basic_hotkey.lua", + component_class = require("example.examples.basic.hotkey.basic_hotkey"), + on_create = function(instance, output_log) + ---@cast instance basic_hotkey + instance.hotkey.on_hotkey_released:subscribe(function() + output_log:add_log_text("Hotkey Released") + end) + end, + }, + { + name_id = "ui_example_basic_scroll", + information_text_id = "ui_example_basic_scroll_description", + template = "scroll", + root = "scroll/root", + code_url = "example/examples/basic/scroll/scroll.lua", + component_class = require("example.examples.basic.scroll.scroll"), + on_create = function(instance, output_log) + ---@cast instance scroll + instance.button_tutorial.on_click:subscribe(function() + output_log:add_log_text("Button Tutorial Clicked") + end) + instance.button_stencil.on_click:subscribe(function() + output_log:add_log_text("Button Stencil Clicked") + end) + end, + properties_control = function(instance, properties_panel) + ---@cast instance scroll + local is_stretch = instance.scroll.style.EXTRA_STRETCH_SIZE > 0 + properties_panel:add_checkbox("ui_elastic_scroll", is_stretch, function(value) + instance.scroll:set_extra_stretch_size(value and 100 or 0) + end) + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + end, + get_debug_info = function(instance) + ---@cast instance scroll + local info = "" + + local s = instance.scroll + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + + return info + end + }, + { + name_id = "ui_example_basic_scroll_slider", + information_text_id = "ui_example_basic_scroll_slider_description", + template = "scroll_slider", + root = "scroll_slider/root", + code_url = "example/examples/basic/scroll_slider/scroll_slider.lua", + component_class = require("example.examples.basic.scroll_slider.scroll_slider"), + get_debug_info = function(instance) + ---@cast instance scroll_slider + local info = "" + + local s = instance.scroll + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + + return info + end + }, + { + name_id = "ui_example_basic_grid", + information_text_id = "ui_example_basic_grid_description", + template = "grid", + root = "grid/root", + code_url = "example/examples/basic/grid/grid.lua", + component_class = require("example.examples.basic.grid.grid"), + properties_control = function(instance, properties_panel) + ---@cast instance grid + + local slider = properties_panel:add_slider("ui_grid_in_row", 0.3, function(value) + local in_row_amount = math.ceil(value * 10) + in_row_amount = math.max(1, in_row_amount) + instance.grid:set_in_row(in_row_amount) + end) + slider:set_text_function(function(value) + return tostring(math.ceil(value * 10)) + end) + + properties_panel:add_button("ui_add_element", function() + if #instance.created_nodes >= 36 then + return + end + instance:add_element() + end) + + properties_panel:add_button("ui_remove_element", function() + instance:remove_element() + end) + + properties_panel:add_button("ui_clear_elements", function() + instance:clear() + end) + end, + }, + { + name_id = "ui_example_basic_scroll_bind_grid", + information_text_id = "ui_example_basic_scroll_bind_grid_description", + template = "scroll_bind_grid", + root = "scroll_bind_grid/root", + code_url = "example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua", + component_class = require("example.examples.basic.scroll_bind_grid.scroll_bind_grid"), + properties_control = function(instance, properties_panel) + ---@cast instance scroll_bind_grid + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + properties_panel:add_button("ui_add_element", function() + if #instance.created_nodes >= 100 then + return + end + instance:add_element() + end) + + properties_panel:add_button("ui_remove_element", function() + instance:remove_element() + end) + + properties_panel:add_button("ui_clear_elements", function() + instance:clear() + end) + end, + get_debug_info = function(instance) + ---@cast instance scroll_bind_grid + local info = "" + + local s = instance.scroll + local view_node_size = gui.get(s.view_node, "size.y") + local scroll_position = -s.position + local scroll_bottom_position = vmath.vector3(scroll_position.x, scroll_position.y - view_node_size, scroll_position.z) + + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + info = info .. "Grid Items: " .. #instance.grid.nodes .. "\n" + info = info .. "Grid Item Size: " .. instance.grid.node_size.x .. " x " .. instance.grid.node_size.y .. "\n" + info = info .. "Top Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_position) .. "\n" + info = info .. "Bottm Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_bottom_position) .. "\n" + + + return info + end + }, + { + name_id = "ui_example_basic_scroll_bind_grid_horizontal", + information_text_id = "ui_example_basic_scroll_bind_grid_horizontal_description", + template = "scroll_bind_grid_horizontal", + root = "scroll_bind_grid_horizontal/root", + code_url = "example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua", + component_class = require("example.examples.basic.scroll_bind_grid.scroll_bind_grid_horizontal"), + properties_control = function(instance, properties_panel) + ---@cast instance scroll_bind_grid_horizontal + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + + properties_panel:add_button("ui_add_element", function() + if #instance.created_nodes >= 100 then + return + end + instance:add_element() + end) + + properties_panel:add_button("ui_remove_element", function() + instance:remove_element() + end) + + properties_panel:add_button("ui_clear_elements", function() + instance:clear() + end) + end, + get_debug_info = function(instance) + ---@cast instance scroll_bind_grid_horizontal + local info = "" + + local s = instance.scroll + local view_node_size = gui.get(s.view_node, "size.x") + local scroll_position = -s.position + local scroll_bottom_position = vmath.vector3(scroll_position.x + view_node_size, scroll_position.y, scroll_position.z) + + info = info .. "View Size X: " .. gui.get(s.view_node, "size.x") .. "\n" + info = info .. "Content Size X: " .. gui.get(s.content_node, "size.x") .. "\n" + info = info .. "Content position X: " .. math.ceil(s.position.x) .. "\n" + info = info .. "Content Range X: " .. s.available_pos.x .. " - " .. s.available_pos.z .. "\n" + info = info .. "Grid Items: " .. #instance.grid.nodes .. "\n" + info = info .. "Grid Item Size: " .. instance.grid.node_size.x .. " x " .. instance.grid.node_size.y .. "\n" + info = info .. "Left Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_position) .. "\n" + info = info .. "Right Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_bottom_position) .. "\n" + + return info + end + }, + { + name_id = "ui_example_basic_scroll_bind_grid_points", + information_text_id = "ui_example_basic_scroll_bind_grid_points_description", + template = "scroll_bind_grid_points", + root = "scroll_bind_grid_points/root", + code_url = "example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua", + component_class = require("example.examples.basic.scroll_bind_grid.scroll_bind_grid_points"), + properties_control = function(instance, properties_panel) + ---@cast instance scroll_bind_grid_points + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + properties_panel:add_button("ui_add_element", function() + if #instance.created_nodes >= 100 then + return + end + instance:add_element() + end) + + properties_panel:add_button("ui_remove_element", function() + instance:remove_element() + end) + + properties_panel:add_button("ui_clear_elements", function() + instance:clear() + end) + end, + get_debug_info = function(instance) + ---@cast instance scroll_bind_grid_points + local info = "" + + local s = instance.scroll + local view_node_size = gui.get(s.view_node, "size.y") + local scroll_position = -s.position + local scroll_bottom_position = vmath.vector3(scroll_position.x, scroll_position.y - view_node_size, scroll_position.z) + + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + info = info .. "Grid Items: " .. #instance.grid.nodes .. "\n" + info = info .. "Grid Item Size: " .. instance.grid.node_size.x .. " x " .. instance.grid.node_size.y .. "\n" + info = info .. "Top Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_position) .. "\n" + info = info .. "Bottm Scroll Pos Grid Index: " .. instance.grid:get_index(scroll_bottom_position) .. "\n" + + + return info + end + }, + { + name_id = "ui_example_basic_input", + information_text_id = "ui_example_basic_input_description", + template = "basic_input", + root = "basic_input/root", + code_url = "example/examples/basic/input/basic_input.lua", + component_class = require("example.examples.basic.input.basic_input"), + on_create = function(instance, output_log) + ---@cast instance basic_input + instance.input.on_input_unselect:subscribe(function(_, text) + output_log:add_log_text("Input: " .. text) + end) + instance.input_2.on_input_unselect:subscribe(function(_, text) + output_log:add_log_text("Input 2: " .. text) + end) + end, + }, + { + name_id = "ui_example_input_password", + information_text_id = "ui_example_input_password_description", + template = "input_password", + root = "input_password/root", + code_url = "example/examples/basic/input/input_password.lua", + component_class = require("example.examples.basic.input.input_password"), + on_create = function(instance, output_log) + ---@cast instance input_password + instance.input.on_input_unselect:subscribe(function(_, text) + output_log:add_log_text("Input: " .. text) + end) + end, + }, + { + name_id = "ui_example_basic_rich_input", + information_text_id = "ui_example_basic_rich_input_description", + template = "basic_rich_input", + root = "basic_rich_input/root", + code_url = "example/examples/basic/input/rich_input.lua", + component_class = require("example.examples.basic.input.rich_input"), + on_create = function(instance, output_log) + ---@cast instance rich_input + instance.rich_input.input.on_input_unselect:subscribe(function(_, text) + output_log:add_log_text("Input: " .. text) + end) + instance.rich_input_2.input.on_input_unselect:subscribe(function(_, text) + output_log:add_log_text("Input 2: " .. text) + end) + end, + }, + { + name_id = "ui_example_basic_rich_text", + information_text_id = "ui_example_basic_rich_text_description", + template = "basic_rich_text", + root = "basic_rich_text/root", + code_url = "example/examples/basic/rich_text/basic_rich_text.lua", + component_class = require("example.examples.basic.rich_text.basic_rich_text"), + }, + { + name_id = "ui_example_rich_text_tags", + information_text_id = "ui_example_rich_text_tags_description", + template = "rich_text_tags", + root = "rich_text_tags/root", + code_url = "example/examples/basic/rich_text/rich_text_tags.lua", + component_class = require("example.examples.basic.rich_text.rich_text_tags"), + properties_control = function(instance, properties_panel) + local pivot_index = 1 + local pivot_list = { + gui.PIVOT_CENTER, + gui.PIVOT_W, + gui.PIVOT_SW, + gui.PIVOT_S, + gui.PIVOT_SE, + gui.PIVOT_E, + gui.PIVOT_NE, + gui.PIVOT_N, + gui.PIVOT_NW, + } + + ---@cast instance rich_text_tags + properties_panel:add_button("ui_pivot_next", function() + pivot_index = pivot_index + 1 + if pivot_index > #pivot_list then + pivot_index = 1 + end + instance:set_pivot(pivot_list[pivot_index]) + end) + end + }, + --{ + -- name_id = "ui_example_rich_text_tags_custom", + -- information_text_id = "ui_example_rich_text_tags_custom_description", + -- template = "rich_text_tags_custom", + -- root = "rich_text_tags_custom/root", + -- code_url = "example/examples/basic/rich_text/rich_text_tags_custom.lua", + -- component_class = require("example.examples.basic.rich_text.rich_text_tags_custom"), + -- properties_control = function(instance, properties_panel) + -- local pivot_index = 1 + -- local pivot_list = { + -- gui.PIVOT_CENTER, + -- gui.PIVOT_W, + -- gui.PIVOT_SW, + -- gui.PIVOT_S, + -- gui.PIVOT_SE, + -- gui.PIVOT_E, + -- gui.PIVOT_NE, + -- gui.PIVOT_N, + -- gui.PIVOT_NW, + -- } + + -- ---@cast instance rich_text_tags_custom + -- properties_panel:add_button("ui_pivot_next", function() + -- pivot_index = pivot_index + 1 + -- if pivot_index > #pivot_list then + -- pivot_index = 1 + -- end + -- instance:set_pivot(pivot_list[pivot_index]) + -- end) + -- end, + + -- on_create = function(instance, output_log) + -- ---@cast instance rich_text_tags_custom + -- instance.on_link_click:subscribe(function(text) + -- output_log:add_log_text("Custom Link: " .. text) + -- end) + -- end + --}, + { + name_id = "ui_example_basic_swipe", + information_text_id = "ui_example_basic_swipe_description", + template = "basic_swipe", + root = "basic_swipe/root", + code_url = "example/examples/basic/swipe/basic_swipe.lua", + component_class = require("example.examples.basic.swipe.basic_swipe"), + on_create = function(instance, output_log) + ---@cast instance basic_swipe + instance.swipe.on_swipe:subscribe(function(_, side, dist, delta_time) + output_log:add_log_text("Swipe Side: " .. side) + end) + end, + }, + { + name_id = "ui_example_basic_checkbox", + information_text_id = "ui_example_basic_checkbox_description", + template = "basic_checkbox", + root = "basic_checkbox/root", + code_url = "example/examples/basic/checkbox/basic_checkbox.lua", + component_class = require("example.examples.basic.checkbox.basic_checkbox"), + on_create = function(instance, output_log) + ---@cast instance basic_checkbox + instance.button.on_click:subscribe(function() + output_log:add_log_text("Checkbox Clicked: " .. tostring(instance.is_enabled)) + end) + end, + }, + } +end + +return M \ No newline at end of file diff --git a/example/examples/general/swipe/swipe.gui b/example/examples/basic/grid/grid.gui similarity index 71% rename from example/examples/general/swipe/swipe.gui rename to example/examples/basic/grid/grid.gui index 9b78d36a..c649b07f 100644 --- a/example/examples/general/swipe/swipe.gui +++ b/example/examples/basic/grid/grid.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/swipe/swipe.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -67,11 +67,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 225.0 + y: 300.0 z: 0.0 w: 1.0 } @@ -82,60 +85,55 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 40.0 + x: 600.0 + y: 600.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Swipe:" - font: "game" - id: "text_header" + texture: "druid/ui_circle_32" + id: "grid" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 155.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -152,8 +150,8 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 50.0 + x: 100.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -163,43 +161,38 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Swipe:" - font: "game" - id: "text_value" + texture: "" + id: "prefab" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { + adjust_mode: ADJUST_MODE_FIT + parent: "grid" + layer: "" + inherit_alpha: true + slice9 { x: 0.0 y: 0.0 z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 + w: 0.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: -78.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -216,33 +209,33 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 200.0 + x: 90.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "swipe_node" + texture: "druid/ui_circle_32" + id: "panel" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "prefab" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -251,6 +244,9 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -266,35 +262,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 200.0 + x: 50.0 y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "=swipe here=" - font: "game" - id: "text_swipe" + text: "1" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -305,22 +301,19 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "swipe_node" + parent: "prefab" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/grid/grid.lua b/example/examples/basic/grid/grid.lua new file mode 100644 index 00000000..b9928b51 --- /dev/null +++ b/example/examples/basic/grid/grid.lua @@ -0,0 +1,66 @@ +local component = require("druid.component") + +---@class grid: druid.base_component +---@field grid druid.static_grid +---@field text druid.text +---@field druid druid_instance +local M = component.create("grid") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.created_nodes = {} + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.grid = self.druid:new_static_grid("grid", "prefab", 3) + + for index = 1, 9 do + self:add_element() + end +end + + +function M:on_remove() + self:clear() +end + + +function M:add_element() + local prefab_nodes = gui.clone_tree(self.prefab) + local root = prefab_nodes[self:get_template() .. "/prefab"] + local text = prefab_nodes[self:get_template() .. "/text"] + table.insert(self.created_nodes, root) + gui.set_text(text, #self.created_nodes) + gui.set_enabled(root, true) + + self.grid:add(root) +end + + +function M:remove_element() + local last_node = table.remove(self.created_nodes) + if last_node == nil then + return + end + + gui.delete_node(last_node) + local grid_index = self.grid:get_index_by_node(last_node) + self.grid:remove(grid_index) +end + + +function M:clear() + for _, node in ipairs(self.created_nodes) do + gui.delete_node(node) + end + self.created_nodes = {} + self.grid:clear() +end + + +return M diff --git a/example/examples/basic/hotkey/basic_hotkey.gui b/example/examples/basic/hotkey/basic_hotkey.gui new file mode 100644 index 00000000..7fd411c9 --- /dev/null +++ b/example/examples/basic/hotkey/basic_hotkey.gui @@ -0,0 +1,36 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + size { + x: 700.0 + y: 100.0 + } + color { + x: 0.522 + y: 0.522 + z: 0.522 + } + type: TYPE_TEXT + text: "Press \"SHIFT\" + \"X\" to trigger hotkey" + font: "text_bold" + id: "text" + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/hotkey/basic_hotkey.lua b/example/examples/basic/hotkey/basic_hotkey.lua new file mode 100644 index 00000000..d0036999 --- /dev/null +++ b/example/examples/basic/hotkey/basic_hotkey.lua @@ -0,0 +1,29 @@ +local hotkey = require("druid.extended.hotkey") + +local component = require("druid.component") + +---@class basic_hotkey: druid.base_component +---@field druid druid_instance +---@field root node +---@field text druid.text +local M = component.create("basic_hotkey") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.hotkey = self.druid:new(hotkey, { "key_lshift", "key_x" }, self.on_hotkey) +end + + +function M:on_hotkey() + gui.animate(self.root, gui.PROP_SCALE, vmath.vector3(1.2), gui.EASING_OUTELASTIC, 0.5, 0, function() + gui.animate(self.root, gui.PROP_SCALE, vmath.vector3(1), gui.EASING_OUTELASTIC, 0.5) + end) +end + + +return M diff --git a/example/examples/texts/lang_text/lang_text.gui b/example/examples/basic/hover/hover.gui similarity index 60% rename from example/examples/texts/lang_text/lang_text.gui rename to example/examples/basic/hover/hover.gui index 5c4429cf..45adecd6 100644 --- a/example/examples/texts/lang_text/lang_text.gui +++ b/example/examples/basic/hover/hover.gui @@ -1,11 +1,7 @@ -script: "/example/examples/texts/lang_text/lang_text.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} +script: "" textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +11,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +29,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } @@ -46,7 +42,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -68,12 +64,13 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false + material: "" } nodes { position { - x: 6.0 - y: 241.0 + x: 0.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -102,12 +99,12 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_change_lang" + id: "button_mouse_hover" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/button_text_green.gui" template_node_child: false custom_type: 0 enabled: true @@ -132,49 +129,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 60.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_change_lang/button" + texture: "druid/ui_circle_32" + id: "button_mouse_hover/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_change_lang" - layer: "image" + parent: "button_mouse_hover" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -185,28 +182,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Change lang" - font: "game" - id: "button_change_lang/text" + text: "Mouse Hover" + font: "text_bold" + id: "button_mouse_hover/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -217,20 +214,19 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_change_lang/button" - layer: "text" + parent: "button_mouse_hover/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 2 + shadow_alpha: 0.0 overridden_fields: 8 template_node_child: true text_leading: 1.0 @@ -238,11 +234,12 @@ nodes { custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 147.0 + y: -100.0 z: 0.0 w: 1.0 } @@ -253,13 +250,13 @@ nodes { w: 1.0 } scale { - x: 0.6 - y: 0.6 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 500.0 + x: 200.0 y: 100.0 z: 0.0 w: 1.0 @@ -270,45 +267,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Current lang: en" - font: "game" - id: "text_current_lang" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false + type: TYPE_TEMPLATE + id: "button_mobile_hover" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 custom_type: 0 enabled: true - visible: true } nodes { position { x: 0.0 - y: -20.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -325,56 +298,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Example 1" - font: "game" - id: "text_example_1" + texture: "druid/ui_circle_32" + id: "button_mobile_hover/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" + parent: "button_mobile_hover" + layer: "druid" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: -150.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -391,97 +357,31 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Example 2" - font: "game" - id: "text_example_2" + text: "Mobile Hover" + font: "text_bold" + id: "button_mobile_hover/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -270.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Example 3" - font: "game" - id: "text_example_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } shadow { x: 1.0 y: 1.0 @@ -489,25 +389,21 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" + line_break: false + parent: "button_mobile_hover/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 8 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true -} -layers { - name: "image" -} -layers { - name: "text" + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/hover/hover.lua b/example/examples/basic/hover/hover.lua new file mode 100644 index 00000000..3044b855 --- /dev/null +++ b/example/examples/basic/hover/hover.lua @@ -0,0 +1,34 @@ +local component = require("druid.component") + +---@class hover: druid.base_component +---@field druid druid_instance +---@field hover druid.hover +---@field hover_pressed druid.hover +local M = component.create("hover") + +---Color: #E6DF9F +local HOVERED_COLOR = vmath.vector4(230/255, 223/255, 159/255, 1.0) + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + -- Default hover callback is `on_hover`, designed for mobile devices + -- It's only hover if touch action is above the node + self.hover_default = self.druid:new_hover("button_mobile_hover/root", self.on_hover) + + -- If you wan't to use mouse hover, you can use `on_mouse_hover` callback + -- It's checks the `action_id` == nil (mouse events) + self.hover = self.druid:new_hover("button_mouse_hover/root", nil, self.on_hover) + + self.default_color = gui.get_color(self.hover.node) +end + + +function M:on_hover(is_hover, hover_instance) + gui.animate(hover_instance.node, "color", is_hover and HOVERED_COLOR or self.default_color, gui.EASING_LINEAR, 0.2) +end + + +return M diff --git a/example/examples/system/late_init_check/late_init_check.gui b/example/examples/basic/input/basic_input.gui similarity index 73% rename from example/examples/system/late_init_check/late_init_check.gui rename to example/examples/basic/input/basic_input.gui index 98692617..c4405a89 100644 --- a/example/examples/system/late_init_check/late_init_check.gui +++ b/example/examples/basic/input/basic_input.gui @@ -1,12 +1,4 @@ -script: "/example/examples/system/late_init_check/late_init_check.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} +script: "" background_color { x: 0.0 y: 0.0 @@ -15,8 +7,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +25,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } @@ -46,7 +38,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -68,12 +60,13 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 200.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -90,7 +83,7 @@ nodes { w: 1.0 } size { - x: 500.0 + x: 200.0 y: 100.0 z: 0.0 w: 1.0 @@ -101,22 +94,121 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_TEMPLATE + id: "input" + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/input.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 80.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Late init system check\n" - "\n" - "Should capture input only after create first input component" - font: "game" - id: "text_hint" + texture: "druid/rect_round2_width1" + id: "input/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { + adjust_mode: ADJUST_MODE_FIT + parent: "input" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -240.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 480.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Tap me to input" + font: "text_bold" + id: "input/text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } shadow { x: 1.0 y: 1.0 @@ -124,24 +216,25 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" + line_break: false + parent: "input/root" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: -46.0 + y: -150.0 z: 0.0 w: 1.0 } @@ -170,12 +263,12 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "prefab_button" + id: "input_2" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/input.gui" template_node_child: false custom_type: 0 enabled: true @@ -200,49 +293,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 60.0 + x: 500.0 + y: 80.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab_button/button" + texture: "druid/rect_round2_width1" + id: "input_2/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "prefab_button" - layer: "image" + parent: "input_2" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -253,28 +346,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 480.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Tap me!" - font: "game" - id: "prefab_button/text" + text: "Tap me to input" + font: "text_bold" + id: "input_2/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -285,89 +378,28 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "prefab_button/button" - layer: "text" + parent: "input_2/root" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 + shadow_alpha: 0.0 + overridden_fields: 1 + overridden_fields: 14 template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 300.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -layers { - name: "image" -} -layers { - name: "text" + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/input/basic_input.lua b/example/examples/basic/input/basic_input.lua new file mode 100644 index 00000000..36481910 --- /dev/null +++ b/example/examples/basic/input/basic_input.lua @@ -0,0 +1,26 @@ +local component = require("druid.component") +local input = require("druid.extended.input") + +---@class basic_input: druid.base_component +---@field druid druid_instance +---@field input druid.input +local M = component.create("basic_input") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.input = self.druid:new(input, "input/root", "input/text") + + self.input_2 = self.druid:new(input, "input_2/root", "input_2/text") --[[@as druid.input]] + + -- you can set custom style for input and their components + -- Check in the example, how long tap on bottom input will erase text + self.input_2.style.IS_LONGTAP_ERASE = true + self.input_2.button.style.AUTOHOLD_TRIGGER = 1.5 +end + + +return M diff --git a/example/examples/basic/input/input_password.gui b/example/examples/basic/input/input_password.gui new file mode 100644 index 00000000..c93752a5 --- /dev/null +++ b/example/examples/basic/input/input_password.gui @@ -0,0 +1,33 @@ +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "input" + parent: "root" + inherit_alpha: true + template: "/example/templates/input.gui" +} +nodes { + type: TYPE_BOX + id: "input/root" + parent: "input" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "input/text" + parent: "input/root" + overridden_fields: 1 + overridden_fields: 14 + template_node_child: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/input/input_password.lua b/example/examples/basic/input/input_password.lua new file mode 100644 index 00000000..d56760a5 --- /dev/null +++ b/example/examples/basic/input/input_password.lua @@ -0,0 +1,25 @@ +local component = require("druid.component") +local input = require("druid.extended.input") + +---@class input_password: druid.component +---@field druid druid_instance +---@field root node +local M = component.create("input_password") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.input = self.druid:new(input, "input/root", "input/text", gui.KEYBOARD_TYPE_PASSWORD) + self.input:set_text("") + + self.input.on_input_unselect:subscribe(function(_, text) + print(text) + end) +end + + +return M diff --git a/example/examples/data_list/static_grid/static_grid.gui b/example/examples/basic/input/rich_input.gui similarity index 66% rename from example/examples/data_list/static_grid/static_grid.gui rename to example/examples/basic/input/rich_input.gui index 2d5ab2df..108dc416 100644 --- a/example/examples/data_list/static_grid/static_grid.gui +++ b/example/examples/basic/input/rich_input.gui @@ -1,11 +1,7 @@ -script: "/example/examples/data_list/static_grid/static_grid.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} +script: "" textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +11,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +29,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } @@ -46,7 +42,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -66,11 +62,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 380.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -81,59 +81,38 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 700.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Data List with vertical Static Grid:" - font: "game" - id: "text_hint_vertical" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 + size { + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } - shadow { + color { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false + type: TYPE_TEMPLATE + id: "rich_input" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 + template: "/example/templates/rich_input.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + custom_type: 0 + enabled: true } nodes { position { x: 0.0 - y: 350.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -150,13 +129,13 @@ nodes { w: 1.0 } size { - x: 250.0 - y: 240.0 + x: 500.0 + y: 80.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 @@ -164,12 +143,12 @@ nodes { type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA texture: "" - id: "data_list_vertical" + id: "rich_input/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "rich_input" layer: "" inherit_alpha: true slice9 { @@ -178,12 +157,16 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -205,45 +188,49 @@ nodes { w: 1.0 } size { - x: 250.0 - y: 240.0 + x: 500.0 + y: 80.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 - z: 0.8 + z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_vertical_content" + texture: "druid/rect_round2_width1" + id: "rich_input/button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_vertical" + parent: "rich_input/root" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 70.0 + x: -240.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -254,36 +241,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 700.0 + x: 480.0 y: 60.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Data List with horizontal Static Grid,\n" - "without buttons:" - font: "game" - id: "text_hint_horizontal" + text: "Placeholder" + font: "text_bold" + id: "rich_input/placeholder_text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_W outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 0.4 + y: 0.4 + z: 0.4 w: 1.0 } shadow { @@ -294,20 +280,26 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "root" + parent: "rich_input/button" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 1 + overridden_fields: 14 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -2.0 - y: 30.0 + x: -240.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -324,45 +316,59 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 100.0 + x: 480.0 + y: 60.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_horizontal" + text: "User input" + font: "text_bold" + id: "rich_input/input_text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { + pivot: PIVOT_W + outline { x: 0.0 y: 0.0 z: 0.0 - w: 0.0 + w: 1.0 } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "rich_input/button" + layer: "" + inherit_alpha: true alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 1 + overridden_fields: 14 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -200.0 - y: -50.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -379,45 +385,50 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 100.0 + x: 16.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 0.8 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_horizontal_content" + texture: "druid/ui_circle_16" + id: "rich_input/cursor_node" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_horizontal" + parent: "rich_input/button" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false - alpha: 1.0 - template_node_child: false + alpha: 0.5 + overridden_fields: 1 + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: -120.0 + y: 4.0 z: 0.0 w: 1.0 } @@ -428,28 +439,28 @@ nodes { w: 1.0 } scale { - x: 0.65 - y: 0.65 + x: 1.2 + y: 1.2 z: 1.0 w: 1.0 } size { - x: 800.0 - y: 60.0 + x: 20.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Data List with vertical Static Grid 3 in row" - font: "game" - id: "text_hint_vertical3" + text: "|" + font: "text_bold" + id: "rich_input/cursor_text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -467,15 +478,19 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "root" + parent: "rich_input/cursor_node" layer: "" - inherit_alpha: true + inherit_alpha: false alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -497,40 +512,27 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 240.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_matrix_vertical" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT + type: TYPE_TEMPLATE + id: "rich_input_2" parent: "root" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/rich_input.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true } nodes { position { @@ -552,26 +554,26 @@ nodes { w: 1.0 } size { - x: 270.0 - y: 240.0 + x: 500.0 + y: 80.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 y: 1.0 - z: 0.8 + z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "data_list_matrix_vertical_content" + texture: "" + id: "rich_input_2/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_matrix_vertical" + parent: "rich_input_2" layer: "" inherit_alpha: true slice9 { @@ -584,12 +586,16 @@ nodes { clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: 449.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -607,8 +613,8 @@ nodes { w: 1.0 } size { - x: 170.0 - y: 60.0 + x: 500.0 + y: 80.0 z: 0.0 w: 1.0 } @@ -620,32 +626,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab" + texture: "druid/rect_round2_width1" + id: "rich_input_2/button" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" + parent: "rich_input_2/root" + layer: "" inherit_alpha: true slice9 { - x: 20.0 - y: 0.0 - z: 20.0 - w: 0.0 + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 4.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -656,35 +666,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 50.0 + x: 480.0 + y: 60.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Record 1" - font: "game" - id: "text" + text: "Placeholder" + font: "text_bold" + id: "rich_input_2/placeholder_text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.3019608 + x: 0.4 y: 0.4 - z: 0.8 + z: 0.4 w: 1.0 } shadow { @@ -695,20 +705,24 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "prefab" - layer: "text" + parent: "rich_input_2/button" + layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 450.0 - y: -103.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -725,40 +739,112 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 70.0 + x: 480.0 + y: 60.0 z: 0.0 w: 1.0 } color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "User input" + font: "text_bold" + id: "rich_input_2/input_text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "rich_input_2/button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } + size { + x: 16.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab_square" + texture: "druid/ui_circle_16" + id: "rich_input_2/cursor_node" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" + parent: "rich_input_2/button" + layer: "" inherit_alpha: true slice9 { - x: 20.0 - y: 0.0 - z: 20.0 - w: 0.0 + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false - alpha: 1.0 - template_node_child: false + alpha: 0.5 + overridden_fields: 1 + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -774,35 +860,35 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.2 + y: 1.2 z: 1.0 w: 1.0 } size { - x: 70.0 - y: 50.0 + x: 20.0 + y: 40.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "001" - font: "game" - id: "text_square" + text: "|" + font: "text_bold" + id: "rich_input_2/cursor_text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.3019608 - y: 0.4 - z: 0.8 + x: 0.0 + y: 0.0 + z: 0.0 w: 1.0 } shadow { @@ -813,21 +899,19 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "prefab_square" - layer: "text" - inherit_alpha: true + parent: "rich_input_2/cursor_node" + layer: "" + inherit_alpha: false alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/input/rich_input.lua b/example/examples/basic/input/rich_input.lua new file mode 100644 index 00000000..cef718c3 --- /dev/null +++ b/example/examples/basic/input/rich_input.lua @@ -0,0 +1,22 @@ +local component = require("druid.component") +local rich_input = require("druid.custom.rich_input.rich_input") + +---@class rich_input: druid.base_component +---@field druid druid_instance +---@field rich_input druid.rich_input +local M = component.create("rich_input") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.rich_input = self.druid:new(rich_input, "rich_input") --[[@as druid.rich_input]] + self.rich_input:set_placeholder("Enter text") + + self.rich_input_2 = self.druid:new(rich_input, "rich_input_2") --[[@as druid.rich_input]] + self.rich_input_2:set_placeholder("Enter text") +end + + +return M diff --git a/example/examples/basic/progress_bar/basic_progress_bar.gui b/example/examples/basic/progress_bar/basic_progress_bar.gui new file mode 100644 index 00000000..975d78c1 --- /dev/null +++ b/example/examples/basic/progress_bar/basic_progress_bar.gui @@ -0,0 +1,89 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -150.0 + } + size { + x: 300.0 + y: 32.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_BOX + texture: "druid/pixel" + id: "progress_bar_back" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true +} +nodes { + size { + x: 300.0 + y: 32.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + } + type: TYPE_BOX + texture: "druid/pixel" + id: "progress_bar_fill" + pivot: PIVOT_W + parent: "progress_bar_back" + inherit_alpha: true +} +nodes { + position { + y: 50.0 + } + size { + x: 150.0 + y: 50.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + } + type: TYPE_TEXT + text: "0 %" + font: "text_bold" + id: "progress_value" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/progress_bar/basic_progress_bar.lua b/example/examples/basic/progress_bar/basic_progress_bar.lua new file mode 100644 index 00000000..6681d019 --- /dev/null +++ b/example/examples/basic/progress_bar/basic_progress_bar.lua @@ -0,0 +1,28 @@ +local component = require("druid.component") +local progress = require("druid.extended.progress") + +---@class basic_progress_bar: druid.base_component +---@field druid druid_instance +---@field progress druid.progress +local M = component.create("basic_progress_bar") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.progress = self.druid:new(progress, "progress_bar_fill", "x") + self.text_value = self:get_node("progress_value") + + self:set_value(self.progress:get()) +end + + +function M:set_value(value) + gui.set_text(self.text_value, math.ceil(value * 100) .. "%") + self.progress:set_to(value) +end + + +return M diff --git a/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui b/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui new file mode 100644 index 00000000..cfeff261 --- /dev/null +++ b/example/examples/basic/progress_bar/basic_progress_bar_slice9.gui @@ -0,0 +1,101 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -150.0 + } + size { + x: 300.0 + y: 32.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "progress_bar_back" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true + slice9 { + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 + } +} +nodes { + size { + x: 300.0 + y: 32.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "progress_bar_fill" + pivot: PIVOT_W + parent: "progress_bar_back" + inherit_alpha: true + slice9 { + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 + } +} +nodes { + position { + y: 50.0 + } + size { + x: 150.0 + y: 50.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + } + type: TYPE_TEXT + text: "0 %" + font: "text_bold" + id: "progress_value" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/progress_bar/basic_progress_bar_slice9.lua b/example/examples/basic/progress_bar/basic_progress_bar_slice9.lua new file mode 100644 index 00000000..9a73c0d5 --- /dev/null +++ b/example/examples/basic/progress_bar/basic_progress_bar_slice9.lua @@ -0,0 +1,28 @@ +local component = require("druid.component") +local progress = require("druid.extended.progress") + +---@class basic_progress_bar_slice9: druid.base_component +---@field druid druid_instance +---@field progress druid.progress +local M = component.create("basic_progress_bar_slice9") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.progress = self.druid:new(progress, "progress_bar_fill", "x") + self.text_value = self:get_node("progress_value") + + self:set_value(self.progress:get()) +end + + +function M:set_value(value) + gui.set_text(self.text_value, math.ceil(value * 100) .. "%") + self.progress:set_to(value) +end + + +return M diff --git a/example/examples/basic/rich_text/basic_rich_text.gui b/example/examples/basic/rich_text/basic_rich_text.gui new file mode 100644 index 00000000..773f2d29 --- /dev/null +++ b/example/examples/basic/rich_text/basic_rich_text.gui @@ -0,0 +1,46 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Hello I\'m a Rich Text!" + font: "text_regular" + id: "text" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/rich_text/basic_rich_text.lua b/example/examples/basic/rich_text/basic_rich_text.lua new file mode 100644 index 00000000..3abb6322 --- /dev/null +++ b/example/examples/basic/rich_text/basic_rich_text.lua @@ -0,0 +1,18 @@ +local component = require("druid.component") +local rich_text = require("druid.custom.rich_text.rich_text") + +---@class basic_rich_text: druid.base_component +---@field druid druid_instance +---@field rich_text druid.rich_text +local M = component.create("basic_rich_text") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.druid:new(rich_text, "text", "Hello, I'm a Rich Text!") +end + + +return M diff --git a/example/examples/basic/rich_text/rich_text_tags.gui b/example/examples/basic/rich_text/rich_text_tags.gui new file mode 100644 index 00000000..de6d63e7 --- /dev/null +++ b/example/examples/basic/rich_text/rich_text_tags.gui @@ -0,0 +1,167 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +textures { + name: "druid_logo" + texture: "/example/assets/druid_logo.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + size { + x: 400.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "background" + parent: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + position { + x: -200.0 + y: 400.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_color" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + y: 200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_breaks" + pivot: PIVOT_W + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: 200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_size" + pivot: PIVOT_SE + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + y: -200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_font" + pivot: PIVOT_W + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + y: -400.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_image" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/rich_text/rich_text_tags.lua b/example/examples/basic/rich_text/rich_text_tags.lua new file mode 100644 index 00000000..69f65cba --- /dev/null +++ b/example/examples/basic/rich_text/rich_text_tags.lua @@ -0,0 +1,76 @@ +local component = require("druid.component") +local rich_text = require("druid.custom.rich_text.rich_text") +local helper = require("druid.helper") + +---@class rich_text_tags: druid.base_component +---@field druid druid_instance +---@field rich_text druid.rich_text +local M = component.create("rich_text_tags") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.rich_text_color = self.druid:new(rich_text, "rich_text_color") --[[@as druid.rich_text]] + self.rich_text_color:set_text("Hello, I'm a Rich Text and it's nested color tag") + + self.rich_text_font = self.druid:new(rich_text, "rich_text_font") --[[@as druid.rich_text]] + self.rich_text_font:set_text("Hello, I'm a Rich Text and this is bold text") + + self.rich_text_size = self.druid:new(rich_text, "rich_text_size") --[[@as druid.rich_text]] + self.rich_text_size:set_text("Hello, I'm have East Pivot and different text scale") + + self.rich_text_breaks = self.druid:new(rich_text, "rich_text_breaks") --[[@as druid.rich_text]] + self.rich_text_breaks:set_text("Hello, I'm Rich Text
    With \"Line Breaks\"\nEnabled in GUI") + + self.rich_text_image = self.druid:new(rich_text, "rich_text_image") --[[@as druid.rich_text]] + self.rich_text_image:set_text("Hello, I'mRich Text ") + + self.position = { + [self.rich_text_color] = gui.get_position(self.rich_text_color.root), + [self.rich_text_font] = gui.get_position(self.rich_text_font.root), + [self.rich_text_size] = gui.get_position(self.rich_text_size.root), + [self.rich_text_breaks] = gui.get_position(self.rich_text_breaks.root), + [self.rich_text_image] = gui.get_position(self.rich_text_image.root), + } + -- Adjust positions with pivots + for rich_text, pos in pairs(self.position) do + local size_x = gui.get(rich_text.root, "size.x") + local size_y = gui.get(rich_text.root, "size.y") + local parent_pivot = gui.get_pivot(rich_text.root) + local pivot_offset = helper.get_pivot_offset(parent_pivot) + local offset_x = size_x * pivot_offset.x + local offset_y = size_y * pivot_offset.y + pos.x = pos.x - offset_x + pos.y = pos.y - offset_y + end +end + + +function M:set_pivot(pivot) + local rich_texts = { + self.rich_text_color, + self.rich_text_font, + self.rich_text_size, + self.rich_text_breaks, + self.rich_text_image, + } + + for _, rich_text in ipairs(rich_texts) do + gui.set_pivot(rich_text.root, pivot) + local pos = self.position[rich_text] + local size_x = gui.get(rich_text.root, "size.x") + local size_y = gui.get(rich_text.root, "size.y") + local parent_pivot = gui.get_pivot(rich_text.root) + local pivot_offset = helper.get_pivot_offset(parent_pivot) + local offset_x = size_x * pivot_offset.x + local offset_y = size_y * pivot_offset.y + gui.set_position(rich_text.root, vmath.vector3(pos.x + offset_x, pos.y + offset_y, pos.z)) + rich_text:set_text(rich_text:get_text()) + end +end + + +return M diff --git a/example/examples/basic/rich_text/rich_text_tags_custom.gui b/example/examples/basic/rich_text/rich_text_tags_custom.gui new file mode 100644 index 00000000..3c17183e --- /dev/null +++ b/example/examples/basic/rich_text/rich_text_tags_custom.gui @@ -0,0 +1,92 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_link" + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_characters" + pivot: PIVOT_W + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + y: -200.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_regular" + id: "rich_text_custom" + pivot: PIVOT_W + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/rich_text/rich_text_tags_custom.lua b/example/examples/basic/rich_text/rich_text_tags_custom.lua new file mode 100644 index 00000000..14d92e29 --- /dev/null +++ b/example/examples/basic/rich_text/rich_text_tags_custom.lua @@ -0,0 +1,67 @@ +local component = require("druid.component") +local rich_text = require("druid.custom.rich_text.rich_text") +local helper = require("druid.helper") +local event = require("druid.event") + +---@class rich_text_tags_custom: druid.base_component +---@field druid druid_instance +---@field rich_text druid.rich_text +local M = component.create("rich_text_tags_custom") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + do -- Init rich text with links example + self.rich_text_link = self.druid:new(rich_text, "rich_text_link") --[[@as druid.rich_text]] + self.rich_text_link:set_text("Hello, I'm a Custom Link") + + local tagged = self.rich_text_link:tagged("custom_link") + for index = 1, #tagged do + local word = tagged[index] + self.druid:new_button(word.node, function() + self.on_link_click:trigger(word.text) + end) + end + end + + self.rich_text_characters = self.druid:new(rich_text, "rich_text_characters") --[[@as druid.rich_text]] + self.rich_text_characters:set_text("Hello, I'm a have a splitted characters") + + self.rich_text_custom = self.druid:new(rich_text, "rich_text_custom") --[[@as druid.rich_text]] + self.rich_text_custom:set_text("Hello, I'm have South Text Pivot to adjust different text scale") + + self.position = { + [self.rich_text_link] = gui.get_position(self.rich_text_link.root), + [self.rich_text_characters] = gui.get_position(self.rich_text_characters.root), + [self.rich_text_custom] = gui.get_position(self.rich_text_custom.root), + } + + self.on_link_click = event.create() +end + + +function M:set_pivot(pivot) + local pivot_offset = helper.get_pivot_offset(pivot) + local rich_texts = { + self.rich_text_link, + self.rich_text_characters, + self.rich_text_custom, + } + + for _, rich_text in ipairs(rich_texts) do + gui.set_pivot(rich_text.root, pivot) + local pos = self.position[rich_text] + local size_x = gui.get(rich_text.root, "size.x") + local size_y = gui.get(rich_text.root, "size.y") + local offset_x = size_x * pivot_offset.x + local offset_y = size_y * pivot_offset.y + gui.set_position(rich_text.root, vmath.vector3(pos.x + offset_x, pos.y + offset_y, pos.z)) + rich_text:set_text(rich_text:get_text()) + end +end + + +return M diff --git a/example/examples/data_list/manage_data/manage_data.gui b/example/examples/basic/scroll/scroll.gui similarity index 63% rename from example/examples/data_list/manage_data/manage_data.gui rename to example/examples/basic/scroll/scroll.gui index 8b06a008..f7120b76 100644 --- a/example/examples/data_list/manage_data/manage_data.gui +++ b/example/examples/basic/scroll/scroll.gui @@ -1,11 +1,11 @@ -script: "/example/examples/data_list/manage_data/manage_data.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -68,12 +68,13 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 370.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -84,62 +85,55 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 700.0 - y: 60.0 + x: 400.0 + y: 1000.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Add nodes and remove it by click on them" - font: "game" - id: "text_hint_horizontal" + texture: "druid/ui_circle_32" + id: "scroll_view" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: true parent: "root" layer: "" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 200.0 + y: 500.0 z: 0.0 w: 1.0 } @@ -156,35 +150,35 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 400.0 + x: 400.0 + y: 1700.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_view" + texture: "druid/empty" + id: "scroll_content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "scroll_view" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 @@ -192,12 +186,13 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -946.0 z: 0.0 w: 1.0 } @@ -214,48 +209,91 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 400.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.8 + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button_tutorial" + parent: "scroll_content" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 y: 1.0 - z: 0.8 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_content" + texture: "druid/ui_circle_32" + id: "button_tutorial/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "data_list_view" - layer: "" + parent: "button_tutorial" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { - x: -110.0 - y: 270.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -272,31 +310,57 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "I do nothing!" + font: "text_bold" + id: "button_tutorial/text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_add_first" - parent: "root" - layer: "" + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button_tutorial/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 8 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 + x: -185.0 y: 0.0 z: 0.0 w: 1.0 @@ -308,55 +372,69 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.75 + y: 0.75 z: 1.0 w: 1.0 } size { - x: 150.0 - y: 60.0 + x: 500.0 + y: 900.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_first/button" + text: "To setup scroll in your scene\n" + "\n" + "- Place \"View\" box node\n" + "\n" + "- Put \"Content\" node inside \"Scroll View\"\n" + "\n" + "- Init scroll with `druid:new_scroll(\"view\", \"content\")" + font: "text_bold" + id: "ui_scroll_text_1" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "button_add_first" - layer: "image" + line_break: true + parent: "scroll_content" + layer: "" inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - overridden_fields: 4 - template_node_child: true - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true visible: true + material: "" } nodes { position { - x: 0.0 - y: 7.0 + x: -185.0 + y: -482.0 z: 0.0 w: 1.0 } @@ -367,31 +445,31 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.75 + y: 0.75 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 500.0 + y: 400.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add First" - font: "game" - id: "button_add_first/text" + text: "Now your content node can be scrollable in View node borders. In this example the content node contains this tutorial text" + font: "text_bold" + id: "ui_scroll_text_2" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW outline { x: 1.0 y: 1.0 @@ -399,33 +477,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_first/button" - layer: "text" + line_break: true + parent: "scroll_content" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true + material: "" } nodes { position { - x: 110.0 - y: 270.0 + x: -185.0 + y: -713.0 z: 0.0 w: 1.0 } @@ -436,38 +512,65 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.75 + y: 0.75 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 500.0 + y: 400.0 z: 0.0 w: 1.0 } color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "All other components are placed as usual.\n" + "\n" + "For example, button:" + font: "text_bold" + id: "ui_scroll_text_3" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NW + outline { x: 1.0 y: 1.0 z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_add_last" - parent: "root" + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: true + parent: "scroll_content" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 0.0 + x: -185.0 + y: -1042.0 z: 0.0 w: 1.0 } @@ -478,55 +581,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.75 + y: 0.75 z: 1.0 w: 1.0 } size { - x: 150.0 - y: 60.0 + x: 500.0 + y: 400.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_last/button" + text: "You probably wish to add \"stencil\" to your view node to clip all content what outside scroll" + font: "text_bold" + id: "ui_scroll_text_4" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "button_add_last" - layer: "image" + line_break: true + parent: "scroll_content" + layer: "" inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - overridden_fields: 4 - template_node_child: true - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true visible: true + material: "" } nodes { position { - x: 0.0 - y: 7.0 + x: -185.0 + y: -1257.0 z: 0.0 w: 1.0 } @@ -537,31 +648,31 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 0.75 + y: 0.75 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 500.0 + y: 400.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add Last" - font: "game" - id: "button_add_last/text" + text: "Druid automatically checks the stencil nodes to add a \"click zone\" for input elements like buttons to prevent the input if they are outside of stencil nodes" + font: "text_bold" + id: "ui_scroll_text_5" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_NW outline { x: 1.0 y: 1.0 @@ -569,33 +680,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_last/button" - layer: "text" + line_break: true + parent: "scroll_content" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true + material: "" } nodes { position { - x: 385.0 - y: 139.0 + x: 0.0 + y: -1605.0 z: 0.0 w: 1.0 } @@ -624,12 +733,12 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_prefab" - parent: "root" + id: "button_stencil" + parent: "scroll_content" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/button_text_green.gui" template_node_child: false custom_type: 0 enabled: true @@ -654,49 +763,49 @@ nodes { w: 1.0 } size { - x: 140.0 - y: 140.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_prefab/button" + texture: "druid/ui_circle_32" + id: "button_stencil/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_prefab" - layer: "image" + parent: "button_stencil" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -707,28 +816,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 150.0 + x: 245.0 y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Element" - font: "game" - id: "button_prefab/text" + text: "Try click me outside" + font: "text_bold" + id: "button_stencil/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -739,35 +848,28 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: true - parent: "button_prefab/button" - layer: "text" + parent: "button_stencil/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 + shadow_alpha: 0.0 overridden_fields: 8 overridden_fields: 18 - overridden_fields: 36 template_node_child: true - text_leading: 0.8 + text_leading: 1.0 text_tracking: 0.0 custom_type: 0 enabled: true visible: true -} -layers { - name: "image" -} -layers { - name: "text" + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/scroll/scroll.lua b/example/examples/basic/scroll/scroll.lua new file mode 100644 index 00000000..65efe8c7 --- /dev/null +++ b/example/examples/basic/scroll/scroll.lua @@ -0,0 +1,21 @@ +local component = require("druid.component") + +---@class scroll: druid.base_component +---@field root node +---@field scroll druid.scroll +---@field druid druid_instance +local M = component.create("scroll") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") + + self.button_tutorial = self.druid:new_button("button_tutorial/root") + self.button_stencil = self.druid:new_button("button_stencil/root") +end + + +return M diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui new file mode 100644 index 00000000..f713ea61 --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.gui @@ -0,0 +1,379 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 1000.0 + y: 1000.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 400.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 800.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 400.0 + y: 800.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -400.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "content" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "prefab" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 240.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Grid Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "prefab" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua new file mode 100644 index 00000000..ba62a6ee --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid.lua @@ -0,0 +1,69 @@ +local component = require("druid.component") + +---@class scroll_bind_grid: druid.base_component +---@field scroll druid.scroll +---@field grid druid.static_grid +---@field text druid.text +---@field druid druid_instance +local M = component.create("scroll_bind_grid") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.created_nodes = {} + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", "prefab", 1) + self.scroll:bind_grid(self.grid) + + for index = 1, 20 do + self:add_element() + end +end + + +function M:on_remove() + self:clear() +end + + +function M:add_element() + local prefab_nodes = gui.clone_tree(self.prefab) + local root = prefab_nodes[self:get_template() .. "/prefab"] + local text = prefab_nodes[self:get_template() .. "/text"] + table.insert(self.created_nodes, root) + gui.set_text(text, "Grid Item " .. #self.created_nodes) + gui.set_enabled(root, true) + + self.grid:add(root) +end + + +function M:remove_element() + local last_node = table.remove(self.created_nodes) + if last_node == nil then + return + end + + gui.delete_node(last_node) + local grid_index = self.grid:get_index_by_node(last_node) + self.grid:remove(grid_index) +end + + +function M:clear() + for _, node in ipairs(self.created_nodes) do + gui.delete_node(node) + end + self.created_nodes = {} + self.grid:clear() +end + + +return M diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui new file mode 100644 index 00000000..7165b820 --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.gui @@ -0,0 +1,379 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 1000.0 + y: 1000.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: -450.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 900.0 + y: 360.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 900.0 + y: 360.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 450.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 270.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "content" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 190.0 + y: 250.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "prefab" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 150.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Grid Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: true + parent: "prefab" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua new file mode 100644 index 00000000..ce762f54 --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_horizontal.lua @@ -0,0 +1,69 @@ +local component = require("druid.component") + +---@class scroll_bind_grid_horizontal: druid.base_component +---@field scroll druid.scroll +---@field grid druid.static_grid +---@field text druid.text +---@field druid druid_instance +local M = component.create("scroll_bind_grid_horizontal") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.created_nodes = {} + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", "prefab", 99999) + self.scroll:bind_grid(self.grid) + + for index = 1, 30 do + self:add_element() + end +end + + +function M:on_remove() + self:clear() +end + + +function M:add_element() + local prefab_nodes = gui.clone_tree(self.prefab) + local root = prefab_nodes[self:get_template() .. "/prefab"] + local text = prefab_nodes[self:get_template() .. "/text"] + table.insert(self.created_nodes, root) + gui.set_text(text, "Grid Item " .. #self.created_nodes) + gui.set_enabled(root, true) + + self.grid:add(root) +end + + +function M:remove_element() + local last_node = table.remove(self.created_nodes) + if last_node == nil then + return + end + + gui.delete_node(last_node) + local grid_index = self.grid:get_index_by_node(last_node) + self.grid:remove(grid_index) +end + + +function M:clear() + for _, node in ipairs(self.created_nodes) do + gui.delete_node(node) + end + self.created_nodes = {} + self.grid:clear() +end + + +return M diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui new file mode 100644 index 00000000..165fbf28 --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.gui @@ -0,0 +1,126 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + y: 400.0 + } + size { + x: 400.0 + y: 800.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "view" + pivot: PIVOT_N + parent: "root" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_STENCIL +} +nodes { + size { + x: 400.0 + y: 800.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "content" + pivot: PIVOT_N + parent: "view" + inherit_alpha: true + visible: false +} +nodes { + position { + y: -400.0 + } + size { + x: 300.0 + y: 400.0 + } + type: TYPE_BOX + id: "prefab" + parent: "content" + inherit_alpha: true + visible: false +} +nodes { + size { + x: 300.0 + y: 90.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "panel" + parent: "prefab" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } +} +nodes { + size { + x: 240.0 + y: 50.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_TEXT + text: "Grid Item 1" + font: "text_bold" + id: "text" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "prefab" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua new file mode 100644 index 00000000..d1d6ccc2 --- /dev/null +++ b/example/examples/basic/scroll_bind_grid/scroll_bind_grid_points.lua @@ -0,0 +1,75 @@ +local component = require("druid.component") + +---@class scroll_bind_grid_points: druid.base_component +---@field scroll druid.scroll +---@field grid druid.static_grid +---@field text druid.text +---@field druid druid_instance +local M = component.create("scroll_bind_grid_points") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.created_nodes = {} + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", "prefab", 1) + self.scroll:bind_grid(self.grid) + + for index = 1, 20 do + self:add_element() + end + + local points = self.grid:get_all_pos() + for _, point in ipairs(points) do + point.y = point.y + self.scroll.view_size.y/2 + end + self.scroll:set_points(points) +end + + +function M:on_remove() + self:clear() +end + + +function M:add_element() + local prefab_nodes = gui.clone_tree(self.prefab) + local root = prefab_nodes[self:get_template() .. "/prefab"] + local text = prefab_nodes[self:get_template() .. "/text"] + table.insert(self.created_nodes, root) + gui.set_text(text, "Grid Item " .. #self.created_nodes) + gui.set_enabled(root, true) + + self.grid:add(root) +end + + +function M:remove_element() + local last_node = table.remove(self.created_nodes) + if last_node == nil then + return + end + + gui.delete_node(last_node) + local grid_index = self.grid:get_index_by_node(last_node) + self.grid:remove(grid_index) +end + + +function M:clear() + for _, node in ipairs(self.created_nodes) do + gui.delete_node(node) + end + self.created_nodes = {} + self.grid:clear() +end + + +return M diff --git a/example/examples/general/scroll/scroll.gui b/example/examples/basic/scroll_slider/scroll_slider.gui similarity index 65% rename from example/examples/general/scroll/scroll.gui rename to example/examples/basic/scroll_slider/scroll_slider.gui index 886e9899..caf0a414 100644 --- a/example/examples/general/scroll/scroll.gui +++ b/example/examples/basic/scroll_slider/scroll_slider.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/scroll/scroll.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -60,7 +60,7 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 @@ -68,13 +68,13 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false material: "" } nodes { position { x: 0.0 - y: 415.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -91,35 +91,35 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 1900.0 + x: 400.0 + y: 1000.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "scroll_page_content" + texture: "druid/ui_circle_32" + id: "scroll_view" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT parent: "root" - layer: "image" + layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } - clipping_mode: CLIPPING_MODE_NONE + clipping_mode: CLIPPING_MODE_STENCIL clipping_visible: true clipping_inverted: false alpha: 1.0 @@ -133,7 +133,7 @@ nodes { nodes { position { x: 0.0 - y: -173.0 + y: 500.0 z: 0.0 w: 1.0 } @@ -150,35 +150,35 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 300.0 + x: 400.0 + y: 2600.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "simple_scroll_input" + texture: "druid/empty" + id: "scroll_content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + parent: "scroll_view" + layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 @@ -186,12 +186,54 @@ nodes { size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true + visible: false material: "" } nodes { position { - x: 300.0 + x: 0.0 + y: -100.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button1" + parent: "scroll_content" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -209,39 +251,39 @@ nodes { w: 1.0 } size { - x: 1200.0 - y: 300.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 0.5019608 - y: 0.4 - z: 0.8 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "simple_scroll_content" + texture: "druid/ui_circle_32" + id: "button1/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "simple_scroll_input" - layer: "image" + parent: "button1" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -250,8 +292,8 @@ nodes { } nodes { position { - x: -489.0 - y: 91.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -262,35 +304,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Hello!" - font: "game" - id: "content1" + text: "Tap to scroll 1" + font: "text_bold" + id: "button1/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -300,14 +342,17 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "simple_scroll_content" - layer: "text" + line_break: true + parent: "button1/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 1.0 - template_node_child: false + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -317,8 +362,8 @@ nodes { } nodes { position { - x: 220.0 - y: 71.0 + x: 0.0 + y: -300.0 z: 0.0 w: 1.0 } @@ -346,46 +391,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Hello!" - font: "game" - id: "content4" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "simple_scroll_content" - layer: "text" + type: TYPE_TEMPLATE + id: "button2" + parent: "scroll_content" + layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { - x: -128.0 - y: -54.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -402,48 +422,40 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Hello!" - font: "game" - id: "content2" + texture: "druid/ui_circle_32" + id: "button2/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "simple_scroll_content" - layer: "text" + parent: "button2" + layer: "druid" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 1.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true visible: true @@ -451,8 +463,8 @@ nodes { } nodes { position { - x: 466.0 - y: -73.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -463,35 +475,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Hello!" - font: "game" - id: "content3" + text: "Tap to scroll 2" + font: "text_bold" + id: "button2/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -501,14 +513,17 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "simple_scroll_content" - layer: "text" + line_break: true + parent: "button2/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 1.0 - template_node_child: false + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -519,7 +534,7 @@ nodes { nodes { position { x: 0.0 - y: -503.0 + y: -500.0 z: 0.0 w: 1.0 } @@ -536,8 +551,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 300.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -547,38 +562,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "scroll_with_grid_size" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + type: TYPE_TEMPLATE + id: "button3" + parent: "scroll_content" + layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { - x: -300.0 - y: 150.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -595,39 +593,39 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 300.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 0.6 - z: 0.4 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_content" + texture: "druid/ui_circle_32" + id: "button3/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_NW + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_grid_size" - layer: "image" + parent: "button3" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -637,7 +635,7 @@ nodes { nodes { position { x: 0.0 - y: -653.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -648,46 +646,57 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 600.0 - y: 4.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "grid_scroll_slider" + text: "Tap to scroll 3" + font: "text_bold" + id: "button3/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + line_break: true + parent: "button3/root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 10.0 - y: 0.0 - z: 10.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true visible: true @@ -695,8 +704,8 @@ nodes { } nodes { position { - x: -287.0 - y: 0.0 + x: 0.0 + y: -700.0 z: 0.0 w: 1.0 } @@ -707,8 +716,8 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } @@ -724,38 +733,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "grid_scroll_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "grid_scroll_slider" - layer: "image" + type: TYPE_TEMPLATE + id: "button4" + parent: "scroll_content" + layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_AUTO custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { - x: -180.0 - y: -423.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -772,39 +764,39 @@ nodes { w: 1.0 } size { - x: 240.0 - y: 150.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_prefab" + texture: "druid/ui_circle_32" + id: "button4/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + parent: "button4" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -825,46 +817,57 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "grid_button" + text: "Tap to scroll 4" + font: "text_bold" + id: "button4/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "grid_prefab" - layer: "image" + line_break: true + parent: "button4/root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 10.0 - y: 10.0 - z: 10.0 - w: 10.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true visible: true @@ -873,7 +876,7 @@ nodes { nodes { position { x: 0.0 - y: 5.0 + y: -900.0 z: 0.0 w: 1.0 } @@ -890,8 +893,8 @@ nodes { w: 1.0 } size { - x: 180.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -901,46 +904,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Just text" - font: "game" - id: "grid_prefab_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.2 - y: 0.3019608 - z: 0.7019608 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "grid_button" - layer: "text" + type: TYPE_TEMPLATE + id: "button5" + parent: "scroll_content" + layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { x: 0.0 - y: -833.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -957,39 +935,39 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 300.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "children_scroll" + texture: "druid/ui_circle_32" + id: "button5/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + parent: "button5" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -998,7 +976,7 @@ nodes { } nodes { position { - x: 300.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1010,46 +988,57 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 1200.0 - y: 300.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 0.9019608 - y: 0.9019608 - z: 0.5019608 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "children_scroll_content" + text: "Tap to scroll 5" + font: "text_bold" + id: "button5/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll" - layer: "image" + line_break: true + parent: "button5/root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 enabled: true visible: true @@ -1057,8 +1046,8 @@ nodes { } nodes { position { - x: -500.0 - y: 0.0 + x: 0.0 + y: -1100.0 z: 0.0 w: 1.0 } @@ -1076,48 +1065,31 @@ nodes { } size { x: 200.0 - y: 300.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.9019608 - y: 0.3019608 - z: 0.3019608 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "children_scroll_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_content" + type: TYPE_TEMPLATE + id: "button6" + parent: "scroll_content" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { x: 0.0 - y: 150.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1134,39 +1106,39 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 600.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "children_scroll_content_1" + texture: "druid/ui_circle_32" + id: "button6/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_1" - layer: "" + parent: "button6" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1176,7 +1148,7 @@ nodes { nodes { position { x: 0.0 - y: -320.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1187,38 +1159,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Scroll me up!\n" - "\n" - "\n" - "Scroll me down!" - font: "game" - id: "children_scroll_text_1" + text: "Tap to scroll 6" + font: "text_bold" + id: "button6/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -1229,13 +1198,16 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: true - parent: "children_scroll_content_1" - layer: "" + parent: "button6/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -1246,7 +1218,7 @@ nodes { nodes { position { x: 0.0 - y: 0.0 + y: -1300.0 z: 0.0 w: 1.0 } @@ -1264,48 +1236,31 @@ nodes { } size { x: 200.0 - y: 300.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.5019608 - y: 0.3019608 - z: 0.5019608 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "children_scroll_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_content" + type: TYPE_TEMPLATE + id: "button7" + parent: "scroll_content" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { x: 0.0 - y: 150.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1322,39 +1277,39 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 600.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "children_scroll_content_2" + texture: "druid/ui_circle_32" + id: "button7/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_2" - layer: "" + parent: "button7" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1364,7 +1319,7 @@ nodes { nodes { position { x: 0.0 - y: -320.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1375,38 +1330,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Scroll me up!\n" - "\n" - "\n" - "Scroll me down!" - font: "game" - id: "children_scroll_text_2" + text: "Tap to scroll 7" + font: "text_bold" + id: "button7/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -1417,13 +1369,16 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: true - parent: "children_scroll_content_2" - layer: "" + parent: "button7/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -1433,8 +1388,8 @@ nodes { } nodes { position { - x: 500.0 - y: 0.0 + x: 0.0 + y: -1500.0 z: 0.0 w: 1.0 } @@ -1452,48 +1407,31 @@ nodes { } size { x: 200.0 - y: 300.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 0.6 - y: 0.3019608 - z: 0.4 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "children_scroll_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_content" + type: TYPE_TEMPLATE + id: "button8" + parent: "scroll_content" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { x: 0.0 - y: 150.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1510,39 +1448,39 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 600.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "children_scroll_content_3" + texture: "druid/ui_circle_32" + id: "button8/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_N + pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "children_scroll_3" - layer: "" + parent: "button8" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1552,7 +1490,7 @@ nodes { nodes { position { x: 0.0 - y: -320.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1563,38 +1501,35 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Scroll me up!\n" - "\n" - "\n" - "Scroll me down!" - font: "game" - id: "children_scroll_text_3" + text: "Tap to scroll 8" + font: "text_bold" + id: "button8/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -1605,13 +1540,16 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: true - parent: "children_scroll_content_3" - layer: "" + parent: "button8/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -1622,7 +1560,7 @@ nodes { nodes { position { x: 0.0 - y: -1173.0 + y: -1700.0 z: 0.0 w: 1.0 } @@ -1639,8 +1577,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 300.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -1650,28 +1588,70 @@ nodes { z: 1.0 w: 1.0 } + type: TYPE_TEMPLATE + id: "button9" + parent: "scroll_content" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + w: 1.0 + } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "scroll_with_points" + texture: "druid/ui_circle_32" + id: "button9/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "image" + parent: "button9" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } - clipping_mode: CLIPPING_MODE_STENCIL + clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1680,7 +1660,7 @@ nodes { } nodes { position { - x: -300.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1692,54 +1672,107 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 2400.0 - y: 300.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 0.9019608 - y: 0.5019608 - z: 0.3019608 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "scroll_with_points_content" + text: "Tap to scroll 9" + font: "text_bold" + id: "button9/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_points" - layer: "image" + line_break: true + parent: "button9/root" + layer: "text_bold" inherit_alpha: true - slice9 { + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: -1900.0 + z: 0.0 + w: 1.0 + } + rotation { x: 0.0 y: 0.0 z: 0.0 - w: 0.0 + w: 1.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button10" + parent: "scroll_content" + layer: "" + inherit_alpha: true alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { - x: 300.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1757,39 +1790,39 @@ nodes { w: 1.0 } size { - x: 500.0 - y: 250.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 0.9019608 - y: 0.7019608 - z: 0.9019608 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "intereset_point_1" + texture: "druid/ui_circle_32" + id: "button10/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_points_content" - layer: "" + parent: "button10" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1798,7 +1831,7 @@ nodes { } nodes { position { - x: 900.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1810,54 +1843,107 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 500.0 - y: 250.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 0.7019608 - z: 0.7019608 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "intereset_point_2" + text: "Tap to scroll 10" + font: "text_bold" + id: "button10/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_points_content" - layer: "" + line_break: true + parent: "button10/root" + layer: "text_bold" inherit_alpha: true - slice9 { + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: -2100.0 + z: 0.0 + w: 1.0 + } + rotation { x: 0.0 y: 0.0 z: 0.0 - w: 0.0 + w: 1.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button11" + parent: "scroll_content" + layer: "" + inherit_alpha: true alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { - x: 1500.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1875,39 +1961,39 @@ nodes { w: 1.0 } size { - x: 500.0 - y: 250.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 0.9019608 - z: 0.7019608 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "intereset_point_3" + texture: "druid/ui_circle_32" + id: "button11/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_points_content" - layer: "" + parent: "button11" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -1916,7 +2002,7 @@ nodes { } nodes { position { - x: 2100.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -1928,55 +2014,108 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 500.0 - y: 250.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 0.6 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "intereset_point_4" + text: "Tap to scroll 11" + font: "text_bold" + id: "button11/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "scroll_with_points_content" - layer: "" + line_break: true + parent: "button11/root" + layer: "text_bold" inherit_alpha: true - slice9 { + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: -2300.0 + z: 0.0 + w: 1.0 + } + rotation { x: 0.0 y: 0.0 z: 0.0 - w: 0.0 + w: 1.0 } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button12" + parent: "scroll_content" + layer: "" + inherit_alpha: true alpha: 1.0 + template: "/example/templates/button_text_green.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true - visible: true - material: "" } nodes { position { x: 0.0 - y: -1623.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -1993,39 +2132,39 @@ nodes { w: 1.0 } size { - x: 550.0 - y: 500.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 0.5019608 - y: 0.2 - z: 0.3019608 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "scroll_smaller_view" + texture: "druid/ui_circle_32" + id: "button12/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_page_content" - layer: "" + parent: "button12" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -2034,8 +2173,8 @@ nodes { } nodes { position { - x: -197.0 - y: 223.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -2046,28 +2185,28 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "View" - font: "game" - id: "scroll_smaller_view_hint" + text: "Tap to scroll 12" + font: "text_bold" + id: "button12/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -2084,14 +2223,17 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "scroll_smaller_view" - layer: "" + line_break: true + parent: "button12/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -2102,7 +2244,7 @@ nodes { nodes { position { x: 0.0 - y: 0.0 + y: -2500.0 z: 0.0 w: 1.0 } @@ -2120,38 +2262,80 @@ nodes { } size { x: 200.0 - y: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "button13" + parent: "scroll_content" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 0.4 - y: 0.3019608 - z: 0.7019608 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "scroll_smaller_content" + texture: "druid/ui_circle_32" + id: "button13/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "scroll_smaller_view" - layer: "" + parent: "button13" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false - alpha: 0.5 - template_node_child: false + alpha: 1.0 + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 enabled: true @@ -2172,28 +2356,28 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 0.9 + y: 0.9 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Content" - font: "game" - id: "scroll_smaller_content_hint" + text: "Tap to scroll 13" + font: "text_bold" + id: "button13/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -2210,14 +2394,17 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "scroll_smaller_content" - layer: "" + line_break: true + parent: "button13/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + overridden_fields: 3 + overridden_fields: 8 + overridden_fields: 18 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 @@ -2225,11 +2412,123 @@ nodes { visible: true material: "" } -layers { - name: "image" +nodes { + position { + x: 200.0 + y: 500.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 16.0 + y: 1000.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "slider_back" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_NE + adjust_mode: ADJUST_MODE_FIT + parent: "scroll_view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } -layers { - name: "text" +nodes { + position { + x: -8.0 + y: -24.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 16.0 + y: 48.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_16" + id: "slider_pin" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider_back" + layer: "" + inherit_alpha: true + slice9 { + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/scroll_slider/scroll_slider.lua b/example/examples/basic/scroll_slider/scroll_slider.lua new file mode 100644 index 00000000..79723efd --- /dev/null +++ b/example/examples/basic/scroll_slider/scroll_slider.lua @@ -0,0 +1,54 @@ +local component = require("druid.component") +local slider = require("druid.extended.slider") + +---@class scroll_slider: druid.base_component +---@field root node +---@field scroll druid.scroll +---@field slider druid.slider +---@field druid druid_instance +local M = component.create("scroll_slider") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.scroll = self.druid:new_scroll("scroll_view", "scroll_content") + self.scroll.on_scroll:subscribe(self.on_scroll) + + self.slider = self.druid:new(slider, "slider_pin", vmath.vector3(-8, -976, 0), self.on_slider) --[[@as druid.slider]] + self.slider:set_input_node("slider_back") + + self.druid:new_hover("slider_back", nil, self.on_slider_back_hover) + + for index = 1, 13 do + self.druid:new_button("button" .. index .. "/root", self.on_button_click) + end +end + + +function M:on_scroll() + local scroll_percent = self.scroll:get_percent() + self.slider:set(1 - scroll_percent.y, true) +end + + +function M:on_slider(value) + self.scroll:scroll_to_percent(vmath.vector3(0, 1 - value, 0), true) +end + + +---@param button druid.button +function M:on_button_click(_, button) + local node = button.node + self.scroll:scroll_to(gui.get_position(node)) +end + + +function M:on_slider_back_hover(is_hover) + local node = self:get_node("slider_pin") + gui.animate(node, "color.w", is_hover and 1.5 or 1, gui.EASING_OUTSINE, 0.2) +end + + +return M diff --git a/example/examples/basic/slider/basic_slider.gui b/example/examples/basic/slider/basic_slider.gui new file mode 100644 index 00000000..a8f132ad --- /dev/null +++ b/example/examples/basic/slider/basic_slider.gui @@ -0,0 +1,362 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 1000.0 + y: 1000.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_64" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "slider" + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/slider.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "slider/root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 8.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider/slider_back" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider/root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -118.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 24.0 + y: 24.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider/slider_pin" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider/root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 150.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "0 %" + font: "text_bold" + id: "slider_value" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/slider/basic_slider.lua b/example/examples/basic/slider/basic_slider.lua new file mode 100644 index 00000000..05fcabc6 --- /dev/null +++ b/example/examples/basic/slider/basic_slider.lua @@ -0,0 +1,30 @@ +local component = require("druid.component") +local slider = require("druid.extended.slider") + +---@class basic_slider: druid.base_component +---@field druid druid_instance +---@field root node +---@field slider druid.slider +local M = component.create("basic_slider") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.slider = self.druid:new(slider, "slider/slider_pin", vmath.vector3(118, 0, 0), self.on_slider_change) --[[@as druid.slider]] + + -- To add input across all slider widget add a root node to acquire additional input + self.slider:set_input_node("slider/root") + + self.text_value = self:get_node("slider_value") +end + + +function M:on_slider_change(value) + gui.set_text(self.text_value, math.ceil(value * 100) .. "%") +end + + +return M diff --git a/example/examples/basic/slider/basic_slider_stepped.gui b/example/examples/basic/slider/basic_slider_stepped.gui new file mode 100644 index 00000000..a8f132ad --- /dev/null +++ b/example/examples/basic/slider/basic_slider_stepped.gui @@ -0,0 +1,362 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 1000.0 + y: 1000.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_64" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_TEMPLATE + id: "slider" + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/slider.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "slider/root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 8.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider/slider_back" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider/root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -118.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 24.0 + y: 24.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider/slider_pin" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "slider/root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: true + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 150.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "0 %" + font: "text_bold" + id: "slider_value" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/basic/slider/basic_slider_stepped.lua b/example/examples/basic/slider/basic_slider_stepped.lua new file mode 100644 index 00000000..02becaf0 --- /dev/null +++ b/example/examples/basic/slider/basic_slider_stepped.lua @@ -0,0 +1,32 @@ +local component = require("druid.component") +local slider = require("druid.extended.slider") + +---@class basic_slider_stepped: druid.base_component +---@field druid druid_instance +---@field root node +---@field slider druid.slider +local M = component.create("basic_slider_stepped") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.slider = self.druid:new(slider, "slider/slider_pin", vmath.vector3(118, 0, 0), self.on_slider_change) --[[@as druid.slider]] + + -- To add input across all slider widget add a root node to acquire additional input + self.slider:set_input_node("slider/root") + + self.slider:set_steps({0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}) + + self.text_value = self:get_node("slider_value") +end + + +function M:on_slider_change(value) + gui.set_text(self.text_value, math.ceil(value * 100) .. "%") +end + + +return M diff --git a/example/examples/basic/slider/basic_slider_vertical.gui b/example/examples/basic/slider/basic_slider_vertical.gui new file mode 100644 index 00000000..5b22951a --- /dev/null +++ b/example/examples/basic/slider/basic_slider_vertical.gui @@ -0,0 +1,102 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + type: TYPE_TEMPLATE + id: "slider" + parent: "root" + inherit_alpha: true + template: "/example/templates/slider.gui" +} +nodes { + size { + x: 40.0 + y: 260.0 + } + type: TYPE_BOX + id: "slider/root" + parent: "slider" + overridden_fields: 4 + template_node_child: true +} +nodes { + size { + x: 9.0 + y: 260.0 + } + type: TYPE_BOX + id: "slider/slider_back" + parent: "slider/root" + overridden_fields: 4 + template_node_child: true +} +nodes { + position { + y: 118.0 + } + type: TYPE_BOX + id: "slider/slider_pin" + parent: "slider/root" + overridden_fields: 1 + template_node_child: true +} +nodes { + position { + y: 160.0 + } + size { + x: 150.0 + y: 50.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + } + type: TYPE_TEXT + text: "0 %" + font: "text_bold" + id: "slider_value" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/slider/basic_slider_vertical.lua b/example/examples/basic/slider/basic_slider_vertical.lua new file mode 100644 index 00000000..ba3eff72 --- /dev/null +++ b/example/examples/basic/slider/basic_slider_vertical.lua @@ -0,0 +1,30 @@ +local component = require("druid.component") +local slider = require("druid.extended.slider") + +---@class basic_slider_vertical: druid.base_component +---@field druid druid_instance +---@field root node +---@field slider druid.slider +local M = component.create("basic_slider_vertical") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.slider = self.druid:new(slider, "slider/slider_pin", vmath.vector3(0, -118, 0), self.on_slider_change) --[[@as druid.slider]] + + -- To add input across all slider widget add a root node to acquire additional input + self.slider:set_input_node("slider/root") + + self.text_value = self:get_node("slider_value") +end + + +function M:on_slider_change(value) + gui.set_text(self.text_value, math.ceil(value * 100) .. "%") +end + + +return M diff --git a/example/examples/template/template.gui b/example/examples/basic/swipe/basic_swipe.gui similarity index 72% rename from example/examples/template/template.gui rename to example/examples/basic/swipe/basic_swipe.gui index b069aca4..8faba60c 100644 --- a/example/examples/template/template.gui +++ b/example/examples/basic/swipe/basic_swipe.gui @@ -1,11 +1,11 @@ -script: "/example/examples/template/template.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,20 +33,20 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 1000.0 + y: 1000.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/ui_circle_64" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -55,10 +55,10 @@ nodes { layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -66,6 +66,10 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -87,29 +91,29 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 600.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.722 + y: 0.741 + z: 0.761 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Hello!" - font: "game" - id: "text_hint" + text: "Swipe across area to action" + font: "text_bold" + id: "swipe_hint" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -124,17 +128,15 @@ nodes { layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/swipe/basic_swipe.lua b/example/examples/basic/swipe/basic_swipe.lua new file mode 100644 index 00000000..e8d768ad --- /dev/null +++ b/example/examples/basic/swipe/basic_swipe.lua @@ -0,0 +1,34 @@ +local component = require("druid.component") +local swipe = require("druid.extended.swipe") + +---@class basic_swipe: druid.base_component +---@field druid druid_instance +local M = component.create("basic_swipe") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.swipe = self.druid:new(swipe, "root", self.on_swipe) --[[@as druid.swipe]] + + self.text_hint = self:get_node("swipe_hint") +end + + +function M:on_swipe(swipe_side, dist, delta_time) + print("Swipe side:", swipe_side, "Distance:", dist, "Time:", delta_time) + + if swipe_side == "up" then + gui.animate(self.text_hint, gui.PROP_POSITION, vmath.vector3(0, 200, 0), gui.EASING_OUTBACK, 0.4) + elseif swipe_side == "down" then + gui.animate(self.text_hint, gui.PROP_POSITION, vmath.vector3(0, -200, 0), gui.EASING_OUTBACK, 0.4) + elseif swipe_side == "left" then + gui.animate(self.text_hint, gui.PROP_POSITION, vmath.vector3(-200, 0, 0), gui.EASING_OUTBACK, 0.4) + elseif swipe_side == "right" then + gui.animate(self.text_hint, gui.PROP_POSITION, vmath.vector3(200, 0, 0), gui.EASING_OUTBACK, 0.4) + end +end + + +return M diff --git a/example/examples/system/inner_templates/inner_button.gui b/example/examples/basic/text/basic_text.gui similarity index 77% rename from example/examples/system/inner_templates/inner_button.gui rename to example/examples/basic/text/basic_text.gui index ab6ecf66..185debbb 100644 --- a/example/examples/system/inner_templates/inner_button.gui +++ b/example/examples/basic/text/basic_text.gui @@ -1,11 +1,11 @@ script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 1.0 - y: 1.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -66,6 +66,10 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -87,21 +91,21 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 49.0 + x: 600.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button" + texture: "druid/ui_circle_32" + id: "text_area" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -110,10 +114,10 @@ nodes { layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -121,11 +125,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 4.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -136,27 +144,27 @@ nodes { w: 1.0 } scale { - x: 0.8 - y: 0.8 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 230.0 - y: 40.0 + x: 600.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" + text: "Example text with default adjust" + font: "text_bold" id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -175,7 +183,7 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button" + parent: "text_area" layer: "" inherit_alpha: true alpha: 1.0 @@ -184,6 +192,10 @@ nodes { template_node_child: false text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/text/basic_text.lua b/example/examples/basic/text/basic_text.lua new file mode 100644 index 00000000..63889c51 --- /dev/null +++ b/example/examples/basic/text/basic_text.lua @@ -0,0 +1,42 @@ +local helper = require("druid.helper") +local component = require("druid.component") +local container = require("example.components.container.container") +local lang_text = require("druid.extended.lang_text") + +---@class basic_text: druid.base_component +---@field druid druid_instance +---@field text druid.text +local M = component.create("basic_text") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.text = self.druid:new_text("text") + + -- This code is for adjustable text area with mouse + self.container = self.druid:new(container, "text_area", nil, function(_, size) + self.text:set_size(size) + self:refresh_text_position() + end) --[[@as druid.container]] + + self.container:create_draggable_corners() +end + + +function M:set_pivot(pivot) + self.text:set_pivot(pivot) + self:refresh_text_position() +end + + +function M:refresh_text_position() + -- Need to update text position with different pivot + local pivot = gui.get_pivot(self.text.node) + local pivot_offset = helper.get_pivot_offset(pivot) + gui.set_position(self.text.node, vmath.vector3(pivot_offset.x * self.text.start_size.x, pivot_offset.y * self.text.start_size.y, 0)) +end + + +return M diff --git a/example/examples/general/hotkey/hotkey.gui b/example/examples/basic/text/multiline_text.gui similarity index 73% rename from example/examples/general/hotkey/hotkey.gui rename to example/examples/basic/text/multiline_text.gui index 34d0b7ca..3a661711 100644 --- a/example/examples/general/hotkey/hotkey.gui +++ b/example/examples/basic/text/multiline_text.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/hotkey/hotkey.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -65,8 +65,11 @@ nodes { clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + size_mode: SIZE_MODE_AUTO custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -88,54 +91,49 @@ nodes { w: 1.0 } size { - x: 400.0 + x: 600.0 y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.463 + y: 0.475 + z: 0.49 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Use Ctrl + G or Cmd + G to tirgger the hotkey" - font: "game" - id: "text_hint" + texture: "druid/ui_circle_32" + id: "text_area" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: true parent: "root" layer: "" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: -140.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -152,29 +150,29 @@ nodes { w: 1.0 } size { - x: 400.0 + x: 600.0 y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Counter: 0" - font: "game" - id: "text_counter" + text: "Example multiline text with default adjust" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -185,22 +183,19 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: true - parent: "root" + parent: "text_area" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/text/multiline_text.lua b/example/examples/basic/text/multiline_text.lua new file mode 100644 index 00000000..15c19c88 --- /dev/null +++ b/example/examples/basic/text/multiline_text.lua @@ -0,0 +1,26 @@ +local component = require("druid.component") +local container = require("example.components.container.container") + +---@class multiline_text: druid.base_component +---@field root node +---@field druid druid_instance +local M = component.create("multiline_text") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.text = self.druid:new_text("text") + + -- This code is for adjustable text area with mouse + self.container = self.druid:new(container, "text_area", nil, function(_, size) + self.text:set_size(size) + end) --[[@as druid.container]] + + self.container:create_draggable_corners() +end + + +return M diff --git a/example/examples/basic/timer/basic_timer.gui b/example/examples/basic/timer/basic_timer.gui new file mode 100644 index 00000000..f3b59e3d --- /dev/null +++ b/example/examples/basic/timer/basic_timer.gui @@ -0,0 +1,35 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + scale { + x: 2.0 + y: 2.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "5:09" + font: "text_bold" + id: "text" + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/basic/timer/basic_timer.lua b/example/examples/basic/timer/basic_timer.lua new file mode 100644 index 00000000..72fcca4d --- /dev/null +++ b/example/examples/basic/timer/basic_timer.lua @@ -0,0 +1,33 @@ +local event = require("druid.event") +local timer = require("druid.extended.timer") + +local component = require("druid.component") + +---@class basic_timer: druid.component +---@field druid druid_instance +---@field root node +---@field text druid.text +local M = component.create("basic_timer") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.timer = self.druid:new(timer, "text") + + local time = 5 + self.timer:set_interval(time, 0) + self.timer.on_timer_end:subscribe(function() + time = time + 5 + self.timer:set_interval(time, 0) + self.on_cycle_end:trigger() + end) + + self.on_cycle_end = event.create() +end + + +return M diff --git a/example/examples/custom/rich_input/rich_input.collection b/example/examples/custom/rich_input/rich_input.collection deleted file mode 100644 index c836cedf..00000000 --- a/example/examples/custom/rich_input/rich_input.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "rich_input" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"rich_input\"\n" - " component: \"/example/examples/custom/rich_input/rich_input.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/custom/rich_input/rich_input.gui b/example/examples/custom/rich_input/rich_input.gui deleted file mode 100644 index 51c3ec72..00000000 --- a/example/examples/custom/rich_input/rich_input.gui +++ /dev/null @@ -1,535 +0,0 @@ -script: "/example/examples/custom/rich_input/rich_input.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 700.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Rich Input custom component" - font: "game" - id: "text_hint_horizontal" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 230.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "rich_input" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/druid/custom/rich_input/rich_input.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "rich_input/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "rich_input" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "rich_input/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "rich_input/root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.9490196 - y: 0.9490196 - z: 0.9490196 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Placeholder" - font: "game" - id: "rich_input/placeholder_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.4 - y: 0.4 - z: 0.4 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "rich_input/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "User input" - font: "game" - id: "rich_input/input_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "rich_input/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 67.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "rich_input/cursor_node" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "rich_input/button" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 2.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 20.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.2 - y: 0.2 - z: 0.2 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "|" - font: "game" - id: "rich_input/cursor_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "rich_input/cursor_node" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/custom/rich_input/rich_input.gui_script b/example/examples/custom/rich_input/rich_input.gui_script deleted file mode 100644 index 73fe666f..00000000 --- a/example/examples/custom/rich_input/rich_input.gui_script +++ /dev/null @@ -1,32 +0,0 @@ -local druid = require("druid.druid") - -local rich_input = require("druid.custom.rich_input.rich_input") - - -function init(self) - self.druid = druid.new(self) - - ---@type druid.rich_input - self.rich_input = self.druid:new(rich_input, "rich_input") - self.rich_input:set_placeholder("Enter text here") -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/custom/rich_text/rich_text.gui b/example/examples/custom/rich_text/rich_text.gui deleted file mode 100644 index 0762a48d..00000000 --- a/example/examples/custom/rich_text/rich_text.gui +++ /dev/null @@ -1,94 +0,0 @@ -script: "/example/examples/custom/rich_text/rich_text.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -nodes { - position { - x: 300.0 - y: 415.0 - } - size { - x: 600.0 - y: 830.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "root" - inherit_alpha: true -} -nodes { - position { - y: 415.0 - } - size { - x: 600.0 - y: 830.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "scroll_view" - pivot: PIVOT_N - parent: "root" - inherit_alpha: true - visible: false -} -nodes { - size { - x: 600.0 - y: 1800.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "scroll_content" - pivot: PIVOT_N - parent: "scroll_view" - inherit_alpha: true - visible: false -} -nodes { - scale { - x: 0.8 - y: 0.8 - } - size { - x: 500.0 - y: 100.0 - } - color { - x: 0.9490196 - y: 0.9490196 - z: 0.9490196 - } - type: TYPE_TEXT - text: "This is the example page of Rich Text component" - font: "game" - id: "hint1" - pivot: PIVOT_N - outline { - x: 0.2 - z: 0.2 - } - shadow { - x: 0.2 - y: 0.2 - z: 0.2 - } - line_break: true - parent: "scroll_content" - inherit_alpha: true - outline_alpha: 0.75 - shadow_alpha: 0.25 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/custom/rich_text/rich_text.gui_script b/example/examples/custom/rich_text/rich_text.gui_script deleted file mode 100644 index 5304074d..00000000 --- a/example/examples/custom/rich_text/rich_text.gui_script +++ /dev/null @@ -1,92 +0,0 @@ -local druid = require("druid.druid") -local helper = require("druid.helper") - -local RichText = require("druid.custom.rich_text.rich_text") - - -local function highlight_nodes(words) - for index = 1, #words do - local node = words[index].node - local cloned = gui.clone(gui.get_node("highlight")) - gui.set_color(cloned, vmath.vector4(math.random(), math.random(), math.random(), 0.4)) - gui.set_screen_position(cloned, gui.get_screen_position(node)) - gui.set_size(cloned, gui.get_size(node)) - gui.set_scale(cloned, gui.get_scale(node)) - gui.set_pivot(cloned, gui.get_pivot(node)) - gui.animate(cloned, "color.w", 0, gui.EASING_INOUTSINE, 3, 0, nil, gui.PLAYBACK_LOOP_PINGPONG) - if words[index].text then - local text_metrics = helper.get_text_metrics_from_node(node) - gui.set_size(cloned, vmath.vector3(text_metrics.width, text_metrics.height, 0)) - end - end -end - - -function init(self) - self.druid = druid.new(self) - - self.druid:new_scroll("scroll_view", "scroll_content") - - self.rich_text = self.druid:new(RichText, "rich_text_1") - self.rich_text:set_text("Here is basic Rich Text without any text settings") - - self.rich_text_2 = self.druid:new(RichText, "rich_text_2") - self.rich_text_2:set_text("Here is example to compare Rich Text posing with usual GUI Text Node.") - local rich_text_2_root = self.rich_text_2.root - gui.animate(rich_text_2_root, "color.w", 0, gui.EASING_LINEAR, 4, 0, nil, gui.PLAYBACK_LOOP_PINGPONG) - gui.animate(gui.get_node("text_case_2"), "color.w", 1, gui.EASING_LINEAR, 4, 0, nil, gui.PLAYBACK_LOOP_PINGPONG) - --highlight_nodes(words2) - - self.rich_text_3 = self.druid:new(RichText, "rich_text_3") - local words3 = self.rich_text_3:set_text("This example highlight every text node in Rich Text") - highlight_nodes(words3) - - self.druid:new(RichText, "rich_text_4_1"):set_text("Text with image at center") - self.druid:new(RichText, "rich_text_4_2"):set_text("Text with image scaled in GUI") - self.druid:new(RichText, "rich_text_4_3"):set_text("Text with image with fixed height") - - -- Docs: For images vertical anchor takes from ImagePrefab - self.druid:new(RichText, "rich_text_5_NW"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_N"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_NE"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_W"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_C"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_E"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_SW"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_S"):set_text("Example text for pivots ") - self.druid:new(RichText, "rich_text_5_SE"):set_text("Example text for pivots ") - - --self.rich_text_3 = self.druid:new(RichText, "rich_text_3") - --local words3 = self.rich_text_3:set_text("Energy is full. To restore") - --highlight_nodes(words3) - self.rich_text_6 = self.druid:new(RichText, "rich_text_6") - self.rich_text_6:set_text("Example text with clickable tagged words") - local tagged = self.rich_text_6:tagged("customlink") - for index = 1, #tagged do - ---@type rich_text.word - local word = tagged[index] - self.druid:new_button(word.node, function() - print("on click tagged") - end) - end -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui new file mode 100644 index 00000000..c45c867c --- /dev/null +++ b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.gui @@ -0,0 +1,379 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 350.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 350.0 + y: 700.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 350.0 + y: 700.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -400.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "content" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "prefab" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 250.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Data Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "prefab" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua new file mode 100644 index 00000000..bdc6ecaf --- /dev/null +++ b/example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua @@ -0,0 +1,70 @@ +local event = require("druid.event") +local component = require("druid.component") +local data_list = require("druid.extended.data_list") + +---@class data_list_add_remove_clear: druid.base_component +---@field druid druid_instance +---@field data_list druid.data_list +local M = component.create("data_list_add_remove_clear") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] + + local data = {} + for index = 1, 20 do + table.insert(data, {}) + end + self.data_list:set_data(data) + + self.on_item_click = event() +end + + +---@param item_data table +---@param index number +---@return node, druid.base_component +function M:create_item_callback(item_data, index) + local nodes = gui.clone_tree(self.prefab) + + local root = nodes[self:get_template() .. "/prefab"] + local text = nodes[self:get_template() .. "/text"] + gui.set_enabled(root, true) + gui.set_text(text, "Data Item " .. index) + + local button = self.druid:new_button(root, self.on_button_click, index) + return root, button +end + + +function M:on_button_click(index) + self.on_item_click:trigger(index) +end + + +function M:add_item(index) + self.data_list:add({}, index) +end + + +function M:remove_item(index) + print("Want to remove item", index) + self.data_list:remove(index) +end + + +function M:clear() + self.data_list:clear() +end + + +return M diff --git a/example/examples/data_list/add_remove_nodes/add_remove_nodes.collection b/example/examples/data_list/add_remove_nodes/add_remove_nodes.collection deleted file mode 100644 index 0156ee0f..00000000 --- a/example/examples/data_list/add_remove_nodes/add_remove_nodes.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "add_remove_nodes" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"add_remove_nodes\"\n" - " component: \"/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui_script b/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui_script deleted file mode 100644 index 383cd75b..00000000 --- a/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui_script +++ /dev/null @@ -1,70 +0,0 @@ -local druid = require("druid.druid") - - -local function create_simple_element(self, data, index, data_list) - -- Here we will create elements without druid components, just nodes - local instance = gui.clone_tree(self.prefab_square) - gui.set_enabled(instance["prefab_square"], true) - gui.set_text(instance["text_square"], data) - - local button = self.druid:new_button(instance["prefab_square"], function() - self.data_list:remove(index) - end) - button:set_click_zone(data_list.scroll.view_node) - - return instance["prefab_square"], button -end - - -function init(self) - self.druid = druid.new(self) - - self.data_set = {} - for i = 1, 50 do - table.insert(self.data_set, i) - end - - self.prefab_square = gui.get_node("prefab_square") - gui.set_enabled(self.prefab_square, false) - - local scroll_simple = self.druid:new_scroll("data_list_simple", "data_list_simple_content") - :set_vertical_scroll(false) - - --- The 999999 number in row - is kind of hack for single line static grid - local grid_simple = self.druid:new_static_grid("data_list_simple_content", "prefab_square", 999999) - - self.data_list = self.druid:new_data_list(scroll_simple, grid_simple, create_simple_element) - self.data_list:set_data(self.data_set) - - self.druid:new_button("button_simple_add_first/button", function() - local first_index = self.data_list:get_first_index() - self.data_list:add(first_index - 1, first_index - 1) - end) - self.druid:new_button("button_simple_add_10/button", function() - self.data_list:add(10, 10) - end) - self.druid:new_button("button_simple_add_last/button", function() - local last_index = self.data_list:get_last_index() - self.data_list:add(last_index + 1, last_index + 1) - end) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/basic/data_list_basic.gui b/example/examples/data_list/basic/data_list_basic.gui new file mode 100644 index 00000000..c45c867c --- /dev/null +++ b/example/examples/data_list/basic/data_list_basic.gui @@ -0,0 +1,379 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 350.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 350.0 + y: 700.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 350.0 + y: 700.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: -400.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "content" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "prefab" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 250.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Data Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "prefab" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/data_list/basic/data_list_basic.lua b/example/examples/data_list/basic/data_list_basic.lua new file mode 100644 index 00000000..b3a3d814 --- /dev/null +++ b/example/examples/data_list/basic/data_list_basic.lua @@ -0,0 +1,53 @@ +local event = require("druid.event") +local component = require("druid.component") +local data_list = require("druid.extended.data_list") + +---@class data_list_basic: druid.base_component +---@field druid druid_instance +local M = component.create("data_list_basic") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] + + local data = {} + for index = 1, 1000 do + table.insert(data, {}) + end + self.data_list:set_data(data) + + self.on_item_click = event() +end + + +---@param item_data table +---@param index number +---@return node, druid.base_component +function M:create_item_callback(item_data, index) + local nodes = gui.clone_tree(self.prefab) + + local root = nodes[self:get_template() .. "/prefab"] + local text = nodes[self:get_template() .. "/text"] + gui.set_enabled(root, true) + gui.set_text(text, "Data Item " .. index) + + local button = self.druid:new_button(root, self.on_button_click, index) + return root, button +end + + +function M:on_button_click(index) + self.on_item_click:trigger(index) +end + + +return M diff --git a/example/examples/data_list/basic/data_list_horizontal_basic.gui b/example/examples/data_list/basic/data_list_horizontal_basic.gui new file mode 100644 index 00000000..31f48230 --- /dev/null +++ b/example/examples/data_list/basic/data_list_horizontal_basic.gui @@ -0,0 +1,379 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: -450.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 900.0 + y: 350.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/pixel" + id: "view" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 900.0 + y: 350.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "content" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "view" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 450.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 270.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "content" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 190.0 + y: 250.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "prefab" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 150.0 + y: 200.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Data Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: true + parent: "prefab" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/data_list/basic/data_list_horizontal_basic.lua b/example/examples/data_list/basic/data_list_horizontal_basic.lua new file mode 100644 index 00000000..0f21fc73 --- /dev/null +++ b/example/examples/data_list/basic/data_list_horizontal_basic.lua @@ -0,0 +1,46 @@ +local component = require("druid.component") +local data_list = require("druid.extended.data_list") + +---@class data_list_horizontal_basic: druid.base_component +---@field druid druid_instance +local M = component.create("data_list_horizontal_basic") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", self.prefab, 1000) + self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] + + local data = {} + for index = 1, 100 do + table.insert(data, {}) + end + self.data_list:set_data(data) +end + + +function M:create_item_callback(item_data, index) + local nodes = gui.clone_tree(self.prefab) + local root = nodes[self:get_template() .. "/prefab"] + local text = nodes[self:get_template() .. "/text"] + gui.set_enabled(root, true) + gui.set_text(text, "Data Item " .. index) + + local button = self.druid:new_button(root, self.on_button_click, index) + return root, button +end + + +function M:on_button_click(index) + print("Button clicked", index) +end + + +return M diff --git a/example/examples/data_list/cache_with_component/button_component.gui b/example/examples/data_list/cache_with_component/button_component.gui new file mode 100644 index 00000000..f3c86237 --- /dev/null +++ b/example/examples/data_list/cache_with_component/button_component.gui @@ -0,0 +1,202 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 300.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "panel" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 250.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Data Item 1" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/data_list/cache_with_component/button_component.lua b/example/examples/data_list/cache_with_component/button_component.lua new file mode 100644 index 00000000..4719caf6 --- /dev/null +++ b/example/examples/data_list/cache_with_component/button_component.lua @@ -0,0 +1,35 @@ +local component = require("druid.component") + +---@class button_component: druid.base_component +---@field root node +---@field druid druid_instance +---@field text druid.text +---@field data any +local M = component.create("button_component") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.root = self:get_node("root") + + self.button = self.druid:new_button(self.root) + self.text = self.druid:new_text("text") + + self.data = nil +end + + +---@param data any +function M:set_data(data) + self.data = data +end + + +function M:get_data() + return self.data +end + + +return M diff --git a/example/examples/general/drag/drag.gui b/example/examples/data_list/cache_with_component/cache_with_component.gui similarity index 68% rename from example/examples/general/drag/drag.gui rename to example/examples/data_list/cache_with_component/cache_with_component.gui index a0c145ad..f39b9332 100644 --- a/example/examples/general/drag/drag.gui +++ b/example/examples/data_list/cache_with_component/cache_with_component.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/drag/drag.gui_script" +script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -65,13 +65,16 @@ nodes { clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + size_mode: SIZE_MODE_AUTO custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: -170.0 + y: 350.0 z: 0.0 w: 1.0 } @@ -88,24 +91,24 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 200.0 + x: 350.0 + y: 700.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.173 + y: 0.184 + z: 0.204 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "drag_node" + texture: "druid/pixel" + id: "view" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "" @@ -116,13 +119,16 @@ nodes { z: 0.0 w: 0.0 } - clipping_mode: CLIPPING_MODE_NONE + clipping_mode: CLIPPING_MODE_STENCIL clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -144,8 +150,8 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 50.0 + x: 350.0 + y: 700.0 z: 0.0 w: 1.0 } @@ -155,79 +161,15 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Drag Here" - font: "game" - id: "text_swipe" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "drag_node" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 170.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 150.0 - y: 150.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.8 - y: 0.5019608 - z: 0.6 - w: 1.0 - } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "icon_box" + texture: "druid/empty" + id: "content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "view" layer: "" inherit_alpha: true slice9 { @@ -243,11 +185,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -300.0 z: 0.0 w: 1.0 } @@ -264,8 +209,8 @@ nodes { w: 1.0 } size { - x: 140.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -275,43 +220,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Box" - font: "game" - id: "text_box" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "icon_box" + type: TYPE_TEMPLATE + id: "button_component" + parent: "content" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 + template: "/example/examples/data_list/cache_with_component/button_component.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 custom_type: 0 + enabled: true } nodes { position { x: 0.0 - y: -344.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -328,7 +251,7 @@ nodes { w: 1.0 } size { - x: 200.0 + x: 300.0 y: 100.0 z: 0.0 w: 1.0 @@ -339,15 +262,33 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_drag" - parent: "root" + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "button_component/root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button_component" layer: "" inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false + template_node_child: true + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -370,46 +311,48 @@ nodes { } size { x: 300.0 - y: 60.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_drag/button" + texture: "druid/ui_circle_32" + id: "button_component/panel" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_drag" - layer: "image" + parent: "button_component/root" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -420,28 +363,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 250.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Toggle Drag Enabled" - font: "game" - id: "button_drag/text" + text: "Data Item 1" + font: "text_bold" + id: "button_component/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -452,30 +395,26 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_drag/button" - layer: "text" + parent: "button_component/root" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 + shadow_alpha: 0.0 template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/data_list/cache_with_component/cache_with_component.lua b/example/examples/data_list/cache_with_component/cache_with_component.lua new file mode 100644 index 00000000..ca308e26 --- /dev/null +++ b/example/examples/data_list/cache_with_component/cache_with_component.lua @@ -0,0 +1,73 @@ +local event = require("druid.event") +local component = require("druid.component") +local data_list = require("druid.extended.data_list") + +local button_component = require("example.examples.data_list.cache_with_component.button_component") + +---@class data_list_cache_with_component: druid.base_component +---@field druid druid_instance +local M = component.create("data_list_cache_with_component") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.prefab = self:get_node("button_component/root") + gui.set_enabled(self.prefab, false) + + self.scroll = self.druid:new_scroll("view", "content") + self.grid = self.druid:new_static_grid("content", self.prefab, 1) + self.data_list = self.druid:new(data_list, self.scroll, self.grid, self.create_item_callback) --[[@as druid.data_list]] + self.data_list:set_use_cache(true) + self.data_list.on_element_add:subscribe(self.on_element_add) + self.data_list.on_element_remove:subscribe(self.on_element_remove) + + local data = {} + for index = 1, 1000 do + table.insert(data, {}) + end + self.data_list:set_data(data) + + self.on_item_click = event() +end + + +---@param item_data table +---@param index number +---@return node, druid.base_component +function M:create_item_callback(item_data, index) + local nodes = gui.clone_tree(self.prefab) + + local instance = self.druid:new(button_component, "button_component", nodes) + gui.set_enabled(instance.root, true) + + return instance.root, instance +end + + +---@param index number +---@param node node +---@param instance button_component +---@param data table +function M:on_element_add(index, node, instance, data) + instance.text:set_to("Data Item " .. index) + instance.button.on_click:subscribe(self.on_button_click, self) + instance:set_data(index) +end + + +function M:on_element_remove(index, node, instance, data) + instance.button.on_click:unsubscribe(self.on_button_click, self) +end + + +---@param instance button_component +function M:on_button_click(instance) + local data = instance:get_data() + self.on_item_click:trigger(data) +end + + +return M diff --git a/example/examples/data_list/dynamic_grid/dynamic_grid.collection b/example/examples/data_list/dynamic_grid/dynamic_grid.collection deleted file mode 100644 index 42d42005..00000000 --- a/example/examples/data_list/dynamic_grid/dynamic_grid.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "dynamic_grid" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"dynamic_grid\"\n" - " component: \"/example/examples/data_list/dynamic_grid/dynamic_grid.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/dynamic_grid/dynamic_grid.gui_script b/example/examples/data_list/dynamic_grid/dynamic_grid.gui_script deleted file mode 100644 index 452f8762..00000000 --- a/example/examples/data_list/dynamic_grid/dynamic_grid.gui_script +++ /dev/null @@ -1,95 +0,0 @@ -local druid = require("druid.druid") - - -local buttons = { - "button_blue", - "button_red", - "button_green", - "button_yellow", -} - - -local function create_vertical(self, data, index, data_list) - local instance = gui.clone_tree(self.prefab) - gui.set_enabled(instance["prefab"], true) - gui.set_text(instance["text"], "Record " .. data) - - gui.set_size(instance["prefab"], vmath.vector3(200, 50 + math.random(100), 0)) - gui.play_flipbook(instance["prefab"], buttons[math.random(#buttons)]) - - -- Since we have only 1 component, we can return this one - -- If we have several components, we should create custom component to - -- union them all - local button = self.druid:new_button(instance["prefab"], function() - print("Data list element click on", data) - end) - button:set_click_zone(data_list.scroll.view_node) - - return instance["prefab"], button -end - - -local function create_horizontal(self, data, index, data_list) - local instance = gui.clone_tree(self.prefab) - gui.set_enabled(instance["prefab"], true) - gui.set_text(instance["text"], "N. " .. data) - - gui.set_size(instance["prefab"], vmath.vector3(120 + math.random(100), 80, 0)) - gui.play_flipbook(instance["prefab"], buttons[math.random(#buttons)]) - - local button = self.druid:new_button(instance["prefab"], function() - print("Data list element click on", data) - end) - button:set_click_zone(data_list.scroll.view_node) - - return instance["prefab"], button -end - - -function init(self) - self.druid = druid.new(self) - - self.data_set = {} - for i = 1, 9999 do - table.insert(self.data_set, i) - end - - self.prefab = gui.get_node("prefab") - gui.set_enabled(self.prefab, false) - - - local scroll_vertical = self.druid:new_scroll("data_list_vertical", "data_list_vertical_content") - :set_horizontal_scroll(false) - local grid_vertical = self.druid:new_dynamic_grid("data_list_vertical_content") - - self.data_list_vertical = self.druid:new_data_list(scroll_vertical, grid_vertical, create_vertical) - self.data_list_vertical:set_data(self.data_set) - - - local scroll_horizontal = self.druid:new_scroll("data_list_horizontal", "data_list_horizontal_content") - :set_vertical_scroll(false) - local grid_horizontal = self.druid:new_dynamic_grid("data_list_horizontal_content") - - self.data_list_horizontal = self.druid:new_data_list(scroll_horizontal, grid_horizontal, create_horizontal) - self.data_list_horizontal:set_data(self.data_set) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/examples_list.lua b/example/examples/data_list/examples_list.lua new file mode 100644 index 00000000..5c2992da --- /dev/null +++ b/example/examples/data_list/examples_list.lua @@ -0,0 +1,203 @@ +local M = {} + +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_data_list_basic", + information_text_id = "ui_example_data_list_basic_description", + template = "data_list_basic", + root = "data_list_basic/root", + code_url = "example/examples/data_list/basic/data_list_basic.lua", + component_class = require("example.examples.data_list.basic.data_list_basic"), + on_create = function(instance, output_list) + ---@cast instance data_list_basic + instance.on_item_click:subscribe(function(index) + output_list:add_log_text("Item clicked: " .. index) + end) + end, + properties_control = function(instance, properties_panel) + ---@cast instance data_list_basic + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + properties_panel:add_slider("ui_scroll", 0, function(value) + instance.scroll:scroll_to_percent(vmath.vector3(0, 1 - value, 0), true) + end) + end, + get_debug_info = function(instance) + ---@cast instance data_list_basic + local data_list = instance.data_list + + local data = data_list:get_data() + local info = "" + info = info .. "Data length: " .. #data .. "\n" + info = info .. "First Visual Index: " .. data_list.top_index .. "\n" + info = info .. "Last Visual Index: " .. data_list.last_index .. "\n" + + local s = instance.scroll + info = info .. "\n" + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + + return info + end + }, + + { + name_id = "ui_example_data_list_horizontal_basic", + information_text_id = "ui_example_data_list_horizontal_basic_description", + template = "data_list_horizontal_basic", + root = "data_list_horizontal_basic/root", + code_url = "example/examples/data_list/basic/data_list_horizontal_basic.lua", + component_class = require("example.examples.data_list.basic.data_list_horizontal_basic"), + properties_control = function(instance, properties_panel) + ---@cast instance data_list_horizontal_basic + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + end, + get_debug_info = function(instance) + ---@cast instance data_list_horizontal_basic + local data_list = instance.data_list + + local data = data_list:get_data() + local info = "" + info = info .. "Data length: " .. #data .. "\n" + info = info .. "First Visual Index: " .. data_list.top_index .. "\n" + info = info .. "Last Visual Index: " .. data_list.last_index .. "\n" + + local s = instance.scroll + info = info .. "\n" + info = info .. "View Size X: " .. gui.get(s.view_node, "size.x") .. "\n" + info = info .. "Content Size X: " .. gui.get(s.content_node, "size.x") .. "\n" + info = info .. "Content position X: " .. math.ceil(s.position.x) .. "\n" + info = info .. "Content Range X: " .. s.available_pos.x .. " - " .. s.available_pos.z .. "\n" + + return info + end + }, + + { + name_id = "ui_example_data_list_add_remove_clear", + information_text_id = "ui_example_data_list_add_remove_clear_description", + template = "data_list_add_remove_clear", + root = "data_list_add_remove_clear/root", + code_url = "example/examples/data_list/add_remove_clear/data_list_add_remove_clear.lua", + component_class = require("example.examples.data_list.add_remove_clear.data_list_add_remove_clear"), + on_create = function(instance, output_list) + ---@cast instance data_list_add_remove_clear + instance.on_item_click:subscribe(function(index) + instance:remove_item(index) + output_list:add_log_text("Item removed: " .. index) + end) + end, + properties_control = function(instance, properties_panel) + ---@cast instance data_list_add_remove_clear + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + properties_panel:add_slider("ui_scroll", 0, function(value) + instance.scroll:scroll_to_percent(vmath.vector3(0, 1 - value, 0), true) + end) + + properties_panel:add_button("ui_add_item", function() + instance:add_item() + end) + + properties_panel:add_button("ui_remove_item", function() + instance:remove_item() + end) + + properties_panel:add_button("ui_clear_items", function() + instance.data_list:clear() + end) + end, + get_debug_info = function(instance) + ---@cast instance data_list_add_remove_clear + local data_list = instance.data_list + + local data = data_list:get_data() + local info = "" + info = info .. "Data length: " .. #data .. "\n" + info = info .. "First Visual Index: " .. data_list.top_index .. "\n" + info = info .. "Last Visual Index: " .. data_list.last_index .. "\n" + + local s = instance.scroll + info = info .. "\n" + info = info .. "View Size X: " .. gui.get(s.view_node, "size.x") .. "\n" + info = info .. "Content Size X: " .. gui.get(s.content_node, "size.x") .. "\n" + info = info .. "Content position X: " .. math.ceil(s.position.x) .. "\n" + info = info .. "Content Range X: " .. s.available_pos.x .. " - " .. s.available_pos.z .. "\n" + + return info + end + }, + + { + name_id = "ui_example_data_list_cache_with_component", + information_text_id = "ui_example_data_list_cache_with_component_description", + template = "data_list_cache_with_component", + root = "data_list_cache_with_component/root", + code_url = "example/examples/data_list/cache_with_component/cache_with_component.lua", + component_class = require("example.examples.data_list.cache_with_component.cache_with_component"), + on_create = function(instance, output_list) + ---@cast instance data_list_cache_with_component + instance.on_item_click:subscribe(function(index) + output_list:add_log_text("Item clicked: " .. index) + end) + end, + properties_control = function(instance, properties_panel) + ---@cast instance data_list_cache_with_component + + local view_node = instance.scroll.view_node + local is_stencil = gui.get_clipping_mode(view_node) == gui.CLIPPING_MODE_STENCIL + + properties_panel:add_checkbox("ui_clipping", is_stencil, function(value) + gui.set_clipping_mode(view_node, value and gui.CLIPPING_MODE_STENCIL or gui.CLIPPING_MODE_NONE) + end) + + properties_panel:add_slider("ui_scroll", 0, function(value) + instance.scroll:scroll_to_percent(vmath.vector3(0, 1 - value, 0), true) + end) + end, + get_debug_info = function(instance) + ---@cast instance data_list_cache_with_component + local data_list = instance.data_list + + local data = data_list:get_data() + local info = "" + info = info .. "Data length: " .. #data .. "\n" + info = info .. "First Visual Index: " .. data_list.top_index .. "\n" + info = info .. "Last Visual Index: " .. data_list.last_index .. "\n" + + local s = instance.scroll + info = info .. "\n" + info = info .. "View Size Y: " .. gui.get(s.view_node, "size.y") .. "\n" + info = info .. "Content Size Y: " .. gui.get(s.content_node, "size.y") .. "\n" + info = info .. "Content position Y: " .. math.ceil(s.position.y) .. "\n" + info = info .. "Content Range Y: " .. s.available_pos.y .. " - " .. s.available_pos.w .. "\n" + + return info + end + }, + } +end + +return M \ No newline at end of file diff --git a/example/examples/data_list/manage_data/manage_data.gui_script b/example/examples/data_list/manage_data/manage_data.gui_script deleted file mode 100644 index adfd6019..00000000 --- a/example/examples/data_list/manage_data/manage_data.gui_script +++ /dev/null @@ -1,78 +0,0 @@ -local druid = require("druid.druid") - - ----@class script_manage_data ----@field data_list druid.data_list ----@field grid druid.static_grid - ----@param self script_manage_data -local function create_element(self, data) - local nodes = gui.clone_tree(self.prefab) - local root = nodes["button_prefab/button"] - gui.set_text(nodes["button_prefab/text"], "Element " .. data) - gui.set_enabled(root, true) - - local button = self.druid:new_button(root, function() - self.data_list:remove_by_data(data) - end) - button:set_click_zone(self.scroll.view_node) - return root, button -end - - -local index = 0 ----@param self script_manage_data -local function on_add_first(self) - --index = index + 1 - --self.data_list:add(index, 1) -end - - ----@param self script_manage_data -local function on_add_last(self) - index = index + 1 - self.data_list:add(index) -end - - ----@param self script_manage_data -function init(self) - self.druid = druid.new(self) - - self.prefab = gui.get_node("button_prefab/button") - gui.set_enabled(self.prefab, false) - - self.scroll = self.druid:new_scroll("data_list_view", "data_list_content") - self.scroll:set_horizontal_scroll(false) - self.grid = self.druid:new_static_grid("data_list_content", self.prefab, 2) - self.grid:set_position_function(function(node, position) - gui.animate(node, "position", position, gui.EASING_OUTSINE, 0.6) - end) - self.data_list = self.druid:new_data_list(self.scroll, self.grid, create_element) - self.data_list:set_debug(true) - - self.druid:new_button("button_add_first/button", on_add_first) - local button = self.druid:new_button("button_add_last/button", on_add_last) -end - - ----@param self script_manage_data -function final(self) - self.druid:final() -end - - ----@param self script_manage_data -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/navigate/navigate.collection b/example/examples/data_list/navigate/navigate.collection deleted file mode 100644 index 2a52de35..00000000 --- a/example/examples/data_list/navigate/navigate.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "navigate" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"navigate\"\n" - " component: \"/example/examples/data_list/navigate/navigate.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/navigate/navigate.gui_script b/example/examples/data_list/navigate/navigate.gui_script deleted file mode 100644 index 47ceba4f..00000000 --- a/example/examples/data_list/navigate/navigate.gui_script +++ /dev/null @@ -1,104 +0,0 @@ -local druid = require("druid.druid") - - -local function create_element(self, data, index, data_list) - -- Here we will create elements without druid components, just nodes - local instance = gui.clone_tree(self.prefab_square) - gui.set_enabled(instance["prefab_square"], true) - gui.set_text(instance["text_square"], data) - return instance["prefab_square"] -end - - -local function init_data_list_with_static_grid(self) - local scroll_simple = self.druid:new_scroll("data_list_simple", "data_list_simple_content") - :set_vertical_scroll(false) - - --- The 999999 number in row - is kind of hack for single line static grid - local grid_simple = self.druid:new_static_grid("data_list_simple_content", "prefab_square", 999999) - - self.data_list_simple = self.druid:new_data_list(scroll_simple, grid_simple, create_element) - self.data_list_simple:set_data(self.data_set) - - self.slider_simple = self.druid:new_slider("grid_scroll_pin", vmath.vector3(200, 0, 0)) - -- Disable slider input, now we can not use slider with data list - self.slider_simple:set_input_enabled(false) - self.data_list_simple.on_scroll_progress_change:subscribe(function(_, progress) - self.slider_simple:set(progress, true) - end) - - self.druid:new_button("button_simple_first/button", function() - self.data_list_simple:scroll_to_index(1) - end) - self.druid:new_button("button_simple_hundred/button", function() - self.data_list_simple:scroll_to_index(100) - end) - self.druid:new_button("button_simple_last/button", function() - self.data_list_simple:scroll_to_index(#self.data_set) - end) -end - - -local function init_data_list_with_dynamic_grid(self) - local scroll_dynamic = self.druid:new_scroll("data_list_dynamic", "data_list_dynamic_content") - :set_vertical_scroll(false) - - local grid_dynamic = self.druid:new_dynamic_grid("data_list_dynamic_content") - - self.data_list_dynamic = self.druid:new_data_list(scroll_dynamic, grid_dynamic, create_element) - self.data_list_dynamic:set_data(self.data_set) - - self.slider_dynamic = self.druid:new_slider("grid_scroll_dynamic_pin", vmath.vector3(200, 0, 0)) - -- Disable slider input, now we can not use slider with data list - self.slider_dynamic:set_input_enabled(false) - self.data_list_dynamic.on_scroll_progress_change:subscribe(function(_, progress) - self.slider_dynamic:set(progress, true) - end) - - self.druid:new_button("button_dynamic_first/button", function() - self.data_list_dynamic:scroll_to_index(1) - end) - self.druid:new_button("button_dynamic_hundred/button", function() - self.data_list_dynamic:scroll_to_index(100) - end) - self.druid:new_button("button_dynamic_last/button", function() - self.data_list_dynamic:scroll_to_index(#self.data_set) - end) -end - - -function init(self) - self.druid = druid.new(self) - - self.data_set = {} - for i = 1, 999 do - table.insert(self.data_set, i) - end - - self.prefab_square = gui.get_node("prefab_square") - gui.set_enabled(self.prefab_square, false) - - - init_data_list_with_static_grid(self) - init_data_list_with_dynamic_grid(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/reinit_data/reinit_data.collection b/example/examples/data_list/reinit_data/reinit_data.collection deleted file mode 100644 index 94eec043..00000000 --- a/example/examples/data_list/reinit_data/reinit_data.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "data_list_reinit" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"data_list_reinit\"\n" - " component: \"/example/examples/data_list/reinit_data/reinit_data.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/reinit_data/reinit_data.gui b/example/examples/data_list/reinit_data/reinit_data.gui deleted file mode 100644 index 5e891356..00000000 --- a/example/examples/data_list/reinit_data/reinit_data.gui +++ /dev/null @@ -1,751 +0,0 @@ -script: "/example/examples/data_list/reinit_data/reinit_data.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 700.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Press button to set data or clear data" - font: "game" - id: "text_hint_horizontal" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.8 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.8 - y: 1.0 - z: 0.8 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "data_list_view" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: -110.0 - y: 270.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_fill" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 90.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_fill/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_fill" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Fill" - font: "game" - id: "button_fill/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_fill/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 110.0 - y: 270.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_clear" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 90.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_clear/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_clear" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Clear" - font: "game" - id: "button_clear/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_clear/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 385.0 - y: 139.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_prefab" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 140.0 - y: 140.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_prefab/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_prefab" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 4 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 150.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Element" - font: "game" - id: "button_prefab/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "button_prefab/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 18 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 - text_tracking: 0.0 - custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/data_list/reinit_data/reinit_data.gui_script b/example/examples/data_list/reinit_data/reinit_data.gui_script deleted file mode 100644 index 3e256896..00000000 --- a/example/examples/data_list/reinit_data/reinit_data.gui_script +++ /dev/null @@ -1,65 +0,0 @@ -local druid = require("druid.druid") - - -local function create_element(self, data) - local nodes = gui.clone_tree(self.prefab) - local root = nodes["button_prefab/button"] - gui.set_text(nodes["button_prefab/text"], "Element " .. data) - gui.set_enabled(root, true) - - local button = self.druid:new_button(root, function()end) - button:set_click_zone(self.scroll.view_node) - return root, button -end - - -local function on_fill(self) - self.data_list:set_data(self.data) -end - - -local function on_clear(self) - self.data_list:set_data() -end - - -function init(self) - self.druid = druid.new(self) - - self.prefab = gui.get_node("button_prefab/button") - gui.set_enabled(self.prefab, false) - - self.scroll = self.druid:new_scroll("data_list_view", "data_list_content") - self.scroll:set_horizontal_scroll(false) - self.grid = self.druid:new_static_grid("data_list_content", self.prefab, 2) - self.data_list = self.druid:new_data_list(self.scroll, self.grid, create_element) - self.data_list:set_debug(true) - - self.data = {} - for i = 1, 30 do - table.insert(self.data, i) - end - - self.druid:new_button("button_fill/button", on_fill) - self.druid:new_button("button_clear/button", on_clear) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/static_grid/static_grid.collection b/example/examples/data_list/static_grid/static_grid.collection deleted file mode 100644 index c18cef5d..00000000 --- a/example/examples/data_list/static_grid/static_grid.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "static_grid" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"static_grid\"\n" - " component: \"/example/examples/data_list/static_grid/static_grid.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/static_grid/static_grid.gui_script b/example/examples/data_list/static_grid/static_grid.gui_script deleted file mode 100644 index 2bcbedfa..00000000 --- a/example/examples/data_list/static_grid/static_grid.gui_script +++ /dev/null @@ -1,103 +0,0 @@ -local druid = require("druid.druid") - - -local function create_vertical_element(self, data, index, data_list) - local instance = gui.clone_tree(self.prefab) - gui.set_enabled(instance["prefab"], true) - gui.set_text(instance["text"], "Record " .. data) - - -- Since we have only 1 component, we can return this one - -- If we have several components, we should create custom component to - -- union them all - local button = self.druid:new_button(instance["prefab"], function() - print("Data list element click on", data) - end) - button:set_click_zone(data_list.scroll.view_node) - - return instance["prefab"], button -end - - -local function create_horizontal_element(self, data, index, data_list) - -- Here we will create elements without druid components, just nodes - local instance = gui.clone_tree(self.prefab_square) - gui.set_enabled(instance["prefab_square"], true) - gui.set_text(instance["text_square"], data) - return instance["prefab_square"] -end - - -local function create_matrix_element(self, data, index, data_list) - local instance = gui.clone_tree(self.prefab_square) - gui.set_enabled(instance["prefab_square"], true) - gui.set_text(instance["text_square"], data) - - local button = self.druid:new_button(instance["prefab_square"], function() - print("Data list element click on", data) - end) - button:set_click_zone(data_list.scroll.view_node) - - return instance["prefab_square"], button -end - - -function init(self) - self.druid = druid.new(self) - - self.data_set = {} - for i = 1, 9999 do - table.insert(self.data_set, i) - end - - self.prefab = gui.get_node("prefab") - gui.set_enabled(self.prefab, false) - - self.prefab_square = gui.get_node("prefab_square") - gui.set_enabled(self.prefab_square, false) - - - -- Data list initialization - local scroll_vertical = self.druid:new_scroll("data_list_vertical", "data_list_vertical_content") - :set_horizontal_scroll(false) - local grid_vertical = self.druid:new_static_grid("data_list_vertical_content", "prefab", 1) - - -- We pass already created scroll and grid components with create function - self.data_list_vertical = self.druid:new_data_list(scroll_vertical, grid_vertical, create_vertical_element) - self.data_list_vertical:set_data(self.data_set) - - - local scroll_horizontal = self.druid:new_scroll("data_list_horizontal", "data_list_horizontal_content") - :set_vertical_scroll(false) - local grid_horizontal = self.druid:new_static_grid("data_list_horizontal_content", "prefab_square", 999) - - self.data_list_horizontal = self.druid:new_data_list(scroll_horizontal, grid_horizontal, create_horizontal_element) - self.data_list_horizontal:set_data(self.data_set) - - - local scroll_matrix = self.druid:new_scroll("data_list_matrix_vertical", "data_list_matrix_vertical_content") - :set_horizontal_scroll(false) - local grid_matrix = self.druid:new_static_grid("data_list_matrix_vertical_content", "prefab_square", 3) - - self.data_list_matrix = self.druid:new_data_list(scroll_matrix, grid_matrix, create_matrix_element) - self.data_list_matrix:set_data(self.data_set) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/data_list/with_component/button_component/button_component.lua b/example/examples/data_list/with_component/button_component/button_component.lua deleted file mode 100644 index 2609c8ef..00000000 --- a/example/examples/data_list/with_component/button_component/button_component.lua +++ /dev/null @@ -1,67 +0,0 @@ ---- For component interest functions ---- see https://github.com/Insality/druid/blob/develop/docs_md/02-creating_custom_components.md ---- Require this component in you gui file: ---- local ButtonComponent = require("example.examples.data_list.with_component.button_component.button_component") ---- And create this component via: ---- self.button_component = self.druid:new(ButtonComponent, template, nodes) - -local Event = require("druid.event") -local component = require("druid.component") - ----@class button_component: druid.base_component ----@field root node ----@field text druid.text ----@field druid druid_instance -local ButtonComponent = component.create("button_component") - - ----@param template string ----@param nodes table -function ButtonComponent:init(template, nodes) - self.druid = self:get_druid(template, nodes) - - self.root = self:get_node("root") - self.text = self.druid:new_text("text") - self.checkbox = self:get_node("checkbox") - - self.button = self.druid:new_button(self.root, self._on_click) - - self.on_click = Event() -end - - -function ButtonComponent:set_data(data) - self._data = data - self.text:set_to("Element: " .. data.value) - self:set_checked(self._data.is_checked) -end - - -function ButtonComponent:get_data() - return self._data -end - - -function ButtonComponent:set_checked(state) - self._data.is_checked = state - gui.set_enabled(self.checkbox, state) -end - - -function ButtonComponent:set_click_zone(node) - self.button:set_click_zone(node) -end - - -function ButtonComponent:on_remove() - self.on_click:clear() -end - - -function ButtonComponent:_on_click() - self.on_click:trigger(self) -end - - - -return ButtonComponent diff --git a/example/examples/data_list/with_component/with_component.collection b/example/examples/data_list/with_component/with_component.collection deleted file mode 100644 index 18df2491..00000000 --- a/example/examples/data_list/with_component/with_component.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "data_list_with_component" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"data_list_with_component\"\n" - " component: \"/example/examples/data_list/with_component/with_component.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/data_list/with_component/with_component.gui_script b/example/examples/data_list/with_component/with_component.gui_script deleted file mode 100644 index 7a143cd7..00000000 --- a/example/examples/data_list/with_component/with_component.gui_script +++ /dev/null @@ -1,89 +0,0 @@ -local druid = require("druid.druid") - -local ButtonComponent = require("example.examples.data_list.with_component.button_component.button_component") - - -local function on_element_add(self, index, node, instance) - print("Add element from DataList at index", index, node) -end - - -local function on_element_remove(self, index) - print("Remove element from DataList at index", index) -end - - -local function on_button_click(self, button) - -- Since we change data of other records, we need to change raw data and change state of - -- created components - local data = self.data_list:get_data() - for _, entry in pairs(data) do - entry.is_checked = false - end - - -- This is way to access all current created DataList components - local components = self.data_list:get_created_components() - for _, component in pairs(components) do - component:set_checked(component == button) - end -end - - -local function create_element(self, data) - local nodes = gui.clone_tree(self.prefab) - -- Create custom component to pass it to DataList - local button = self.druid:new(ButtonComponent, "button_component", nodes) - -- Prefab is disabled, so need to enable it for new component - gui.set_enabled(button.root, true) - button:set_data(data) - button:set_click_zone(self.scroll.view_node) - button.on_click:subscribe(on_button_click, self) - - return button.root, button -end - - -function init(self) - self.druid = druid.new(self) - - self.prefab = gui.get_node("button_component/root") - gui.set_enabled(self.prefab, false) - - self.scroll = self.druid:new_scroll("data_list_view", "data_list_content") - self.scroll:set_horizontal_scroll(false) - self.grid = self.druid:new_static_grid("data_list_content", self.prefab, 1) - self.data_list = self.druid:new_data_list(self.scroll, self.grid, create_element) - - self.data = {} - for i = 1, 100 do - table.insert(self.data, { - is_checked = false, - value = i - }) - end - - self.data_list:set_data(self.data) - -- Custom callbacks for more management in DataList - self.data_list.on_element_add:subscribe(on_element_add) - self.data_list.on_element_remove:subscribe(on_element_remove) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/druid_examples.lua b/example/examples/druid_examples.lua new file mode 100644 index 00000000..6aa7f9bc --- /dev/null +++ b/example/examples/druid_examples.lua @@ -0,0 +1,49 @@ +local intro_examples = require("example.examples.intro.examples_list") +local basic_examples = require("example.examples.basic.examples_list") +local data_list_examples = require("example.examples.data_list.examples_list") +local layout_examples = require("example.examples.layout.examples_list") +local gamepad_examples = require("example.examples.gamepad.examples_list") +local window_examples = require("example.examples.windows.examples_list") +local panthera_examples = require("example.examples.panthera.examples_list") + +local M = {} + +---@class druid.examples +---@field example_name_id string +---@field examples_list druid.example.data[] + +---@class druid.example.data +---@field name_id string +---@field root string +---@field template string|nil +---@field code_url string|nil @URL to the source code +---@field component_class druid.base_component +---@field on_create fun(instance: druid.base_component, output_list: output_list)|nil +---@field get_debug_info (fun(instance: druid.base_component):string)|nil +---@field properties_control (fun(instance: druid.base_component, properties_panel: properties_panel))|nil +---@field information_text_id string|nil + + +local function add_examples(examples, example_name_id, examples_list) + table.insert(examples, { + example_name_id = example_name_id, + examples_list = examples_list + }) +end + +---@return druid.examples[] +function M.get_examples() + local examples = {} + + add_examples(examples, "ui_examples_intro", intro_examples.get_examples()) + add_examples(examples, "ui_examples_basic", basic_examples.get_examples()) + add_examples(examples, "ui_examples_data_list", data_list_examples.get_examples()) + add_examples(examples, "ui_examples_layout", layout_examples.get_examples()) + add_examples(examples, "ui_examples_gamepad", gamepad_examples.get_examples()) + add_examples(examples, "ui_examples_window", window_examples.get_examples()) + add_examples(examples, "ui_examples_panthera", panthera_examples.get_examples()) + + return examples +end + +return M \ No newline at end of file diff --git a/example/examples/gamepad/examples_list.lua b/example/examples/gamepad/examples_list.lua new file mode 100644 index 00000000..aba51c0a --- /dev/null +++ b/example/examples/gamepad/examples_list.lua @@ -0,0 +1,72 @@ +local M = {} + +---@return druid.example.data[] +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_gamepad_tester", + information_text_id = "ui_example_gamepad_tester_description", + template = "gamepad_tester", + root = "gamepad_tester/root", + code_url = "example/examples/gamepad/gamepad_tester/gamepad_tester.lua", + component_class = require("example.examples.gamepad.gamepad_tester.gamepad_tester"), + on_create = function(instance, output_list) + ---@cast instance gamepad_tester + instance.button_left.on_click:subscribe(function() + output_list:add_log_text("Button Left Clicked") + end) + instance.button_right.on_click:subscribe(function() + output_list:add_log_text("Button Right Clicked") + end) + instance.button_up.on_click:subscribe(function() + output_list:add_log_text("Button Up Clicked") + end) + instance.button_down.on_click:subscribe(function() + output_list:add_log_text("Button Down Clicked") + end) + instance.button_a.on_click:subscribe(function() + output_list:add_log_text("Button A Clicked") + end) + instance.button_b.on_click:subscribe(function() + output_list:add_log_text("Button B Clicked") + end) + instance.button_x.on_click:subscribe(function() + output_list:add_log_text("Button X Clicked") + end) + instance.button_y.on_click:subscribe(function() + output_list:add_log_text("Button Y Clicked") + end) + instance.button_back.on_click:subscribe(function() + output_list:add_log_text("Button Back Clicked") + end) + instance.button_start.on_click:subscribe(function() + output_list:add_log_text("Button Start Clicked") + end) + instance.button_l1.on_click:subscribe(function() + output_list:add_log_text("Button L1 Clicked") + end) + instance.button_r1.on_click:subscribe(function() + output_list:add_log_text("Button R1 Clicked") + end) + instance.button_stick_left.on_click:subscribe(function() + output_list:add_log_text("Button Stick Left Clicked") + end) + instance.button_stick_right.on_click:subscribe(function() + output_list:add_log_text("Button Stick Right Clicked") + end) + end, + }, + + { + name_id = "ui_example_on_screen_control", + information_text_id = "ui_example_on_screen_control_description", + template = "on_screen_control", + root = "on_screen_control/root", + code_url = "example/examples/gamepad/on_screen_control/on_screen_control.lua", + component_class = require("example.examples.gamepad.on_screen_control.on_screen_control"), + } + } +end + +return M \ No newline at end of file diff --git a/example/examples/gamepad/gamepad_tester/gamepad_tester.gui b/example/examples/gamepad/gamepad_tester/gamepad_tester.gui new file mode 100644 index 00000000..a6904ed6 --- /dev/null +++ b/example/examples/gamepad/gamepad_tester/gamepad_tester.gui @@ -0,0 +1,725 @@ +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "root" + inherit_alpha: true + visible: false +} +nodes { + size { + x: 200.0 + y: 100.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "gamepad" + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -200.0 + y: -300.0 + } + type: TYPE_TEMPLATE + id: "stick_left" + parent: "gamepad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui" +} +nodes { + type: TYPE_BOX + id: "stick_left/root" + parent: "stick_left" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "stick_left/background_mask" + parent: "stick_left/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/background" + parent: "stick_left/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/stick_root" + parent: "stick_left/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/stick_shadow" + parent: "stick_left/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/stick" + parent: "stick_left/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/dot_1" + parent: "stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/dot_2" + parent: "stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/dot_3" + parent: "stick_left/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_left/dot_4" + parent: "stick_left/stick" + template_node_child: true +} +nodes { + position { + x: 200.0 + y: -300.0 + } + type: TYPE_TEMPLATE + id: "stick_right" + parent: "gamepad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui" +} +nodes { + type: TYPE_BOX + id: "stick_right/root" + parent: "stick_right" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "stick_right/background_mask" + parent: "stick_right/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/background" + parent: "stick_right/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/stick_root" + parent: "stick_right/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/stick_shadow" + parent: "stick_right/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/stick" + parent: "stick_right/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/dot_1" + parent: "stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/dot_2" + parent: "stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/dot_3" + parent: "stick_right/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "stick_right/dot_4" + parent: "stick_right/stick" + template_node_child: true +} +nodes { + position { + x: -330.0 + y: 24.0 + } + size { + x: 290.0 + y: 290.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "dpad" + parent: "gamepad" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -100.0 + } + type: TYPE_TEMPLATE + id: "button_left" + parent: "dpad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_left/button" + parent: "button_left" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_left/text" + parent: "button_left/button" + overridden_fields: 45 + overridden_fields: 46 + template_node_child: true + enabled: false + visible: false +} +nodes { + rotation { + z: 180.0 + } + type: TYPE_BOX + id: "button_left/icon" + parent: "button_left/button" + overridden_fields: 2 + template_node_child: true +} +nodes { + position { + y: 100.0 + } + type: TYPE_TEMPLATE + id: "button_up" + parent: "dpad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_up/button" + parent: "button_up" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_up/text" + parent: "button_up/button" + overridden_fields: 45 + overridden_fields: 46 + template_node_child: true + enabled: false + visible: false +} +nodes { + rotation { + z: 90.0 + } + type: TYPE_BOX + id: "button_up/icon" + parent: "button_up/button" + overridden_fields: 2 + template_node_child: true +} +nodes { + position { + x: 100.0 + } + type: TYPE_TEMPLATE + id: "button_right" + parent: "dpad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_right/button" + parent: "button_right" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_right/text" + parent: "button_right/button" + overridden_fields: 45 + overridden_fields: 46 + template_node_child: true + enabled: false + visible: false +} +nodes { + type: TYPE_BOX + id: "button_right/icon" + parent: "button_right/button" + template_node_child: true +} +nodes { + position { + y: -100.0 + } + type: TYPE_TEMPLATE + id: "button_down" + parent: "dpad" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_down/button" + parent: "button_down" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_down/text" + parent: "button_down/button" + overridden_fields: 45 + overridden_fields: 46 + template_node_child: true + enabled: false + visible: false +} +nodes { + rotation { + z: -90.0 + } + type: TYPE_BOX + id: "button_down/icon" + parent: "button_down/button" + overridden_fields: 2 + template_node_child: true +} +nodes { + position { + x: 330.0 + y: 24.0 + } + size { + x: 290.0 + y: 290.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "buttons" + parent: "gamepad" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -100.0 + } + type: TYPE_TEMPLATE + id: "button_x" + parent: "buttons" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_x/button" + parent: "button_x" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_x/text" + parent: "button_x/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_x/icon" + parent: "button_x/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + y: 100.0 + } + type: TYPE_TEMPLATE + id: "button_y" + parent: "buttons" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_y/button" + parent: "button_y" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "Y" + id: "button_y/text" + parent: "button_y/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_y/icon" + parent: "button_y/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + x: 100.0 + } + type: TYPE_TEMPLATE + id: "button_b" + parent: "buttons" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_b/button" + parent: "button_b" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "B" + id: "button_b/text" + parent: "button_b/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_b/icon" + parent: "button_b/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + y: -100.0 + } + type: TYPE_TEMPLATE + id: "button_a" + parent: "buttons" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_a/button" + parent: "button_a" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "A" + id: "button_a/text" + parent: "button_a/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_a/icon" + parent: "button_a/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + y: 160.0 + } + size { + x: 290.0 + y: 290.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "buttons_system" + parent: "gamepad" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -110.0 + } + type: TYPE_TEMPLATE + id: "button_back" + parent: "buttons_system" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + size { + x: 180.0 + y: 90.0 + } + type: TYPE_BOX + id: "button_back/button" + parent: "button_back" + overridden_fields: 4 + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "Back" + id: "button_back/text" + parent: "button_back/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_back/icon" + parent: "button_back/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + x: 110.0 + } + type: TYPE_TEMPLATE + id: "button_start" + parent: "buttons_system" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + size { + x: 180.0 + y: 90.0 + } + type: TYPE_BOX + id: "button_start/button" + parent: "button_start" + overridden_fields: 4 + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "Start" + id: "button_start/text" + parent: "button_start/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_start/icon" + parent: "button_start/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + x: -330.0 + y: 360.0 + } + size { + x: 200.0 + y: 200.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "button_left_bump" + parent: "gamepad" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -3.0 + y: -57.0 + } + type: TYPE_TEMPLATE + id: "button_l1" + parent: "button_left_bump" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + size { + x: 180.0 + y: 90.0 + } + type: TYPE_BOX + id: "button_l1/button" + parent: "button_l1" + overridden_fields: 4 + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "L1" + id: "button_l1/text" + parent: "button_l1/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_l1/icon" + parent: "button_l1/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + y: 60.0 + } + type: TYPE_TEMPLATE + id: "button_l2" + parent: "button_left_bump" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui" +} +nodes { + type: TYPE_BOX + id: "button_l2/button" + parent: "button_l2" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_l2/fill" + parent: "button_l2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "L2" + id: "button_l2/text" + parent: "button_l2/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + position { + x: 330.0 + y: 360.0 + } + size { + x: 200.0 + y: 200.0 + } + type: TYPE_BOX + texture: "druid/empty" + id: "button_right_bump" + parent: "gamepad" + inherit_alpha: true + visible: false +} +nodes { + position { + y: -60.0 + } + type: TYPE_TEMPLATE + id: "button_r1" + parent: "button_right_bump" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + size { + x: 180.0 + y: 90.0 + } + type: TYPE_BOX + id: "button_r1/button" + parent: "button_r1" + overridden_fields: 4 + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "R1" + id: "button_r1/text" + parent: "button_r1/button" + overridden_fields: 8 + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_r1/icon" + parent: "button_r1/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +nodes { + position { + y: 60.0 + } + type: TYPE_TEMPLATE + id: "button_r2" + parent: "button_right_bump" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui" +} +nodes { + type: TYPE_BOX + id: "button_r2/button" + parent: "button_r2" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_r2/fill" + parent: "button_r2/button" + template_node_child: true +} +nodes { + type: TYPE_TEXT + text: "R2" + id: "button_r2/text" + parent: "button_r2/button" + overridden_fields: 8 + template_node_child: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/gamepad/gamepad_tester/gamepad_tester.lua b/example/examples/gamepad/gamepad_tester/gamepad_tester.lua new file mode 100644 index 00000000..af59cab1 --- /dev/null +++ b/example/examples/gamepad/gamepad_tester/gamepad_tester.lua @@ -0,0 +1,87 @@ +local component = require("druid.component") +local progress = require("druid.extended.progress") + +---@class gamepad_tester: druid.base_component +---@field root node +---@field buttons druid.button +---@field buttons_system druid.button +---@field button_left_bump druid.button +---@field button_right_bump druid.button +---@field druid druid_instance +local M = component.create("gamepad_tester") + +local STICK_DISTANCE = 50 + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + + self.button_left = self.druid:new_button("button_left/button"):set_key_trigger("gamepad_lpad_left") + self.button_right = self.druid:new_button("button_right/button"):set_key_trigger("gamepad_lpad_right") + self.button_up = self.druid:new_button("button_up/button"):set_key_trigger("gamepad_lpad_up") + self.button_down = self.druid:new_button("button_down/button"):set_key_trigger("gamepad_lpad_down") + + self.button_x = self.druid:new_button("button_x/button"):set_key_trigger("gamepad_rpad_left") + self.button_b = self.druid:new_button("button_b/button"):set_key_trigger("gamepad_rpad_right") + self.button_y = self.druid:new_button("button_y/button"):set_key_trigger("gamepad_rpad_up") + self.button_a = self.druid:new_button("button_a/button"):set_key_trigger("gamepad_rpad_down") + + self.button_l1 = self.druid:new_button("button_l1/button"):set_key_trigger("gamepad_lshoulder") + self.button_r1 = self.druid:new_button("button_r1/button"):set_key_trigger("gamepad_rshoulder") + + self.button_stick_left = self.druid:new_button("stick_left/root"):set_key_trigger("gamepad_lstick_click") + self.button_stick_right = self.druid:new_button("stick_right/root"):set_key_trigger("gamepad_rstick_click") + + self.button_start = self.druid:new_button("button_start/button"):set_key_trigger("gamepad_start") + self.button_back = self.druid:new_button("button_back/button"):set_key_trigger("gamepad_back") + + self.trigger_l2 = self.druid:new(progress, "button_l2/fill", "x", 0) --[[@as druid.progress]] + self.trigger_r2 = self.druid:new(progress, "button_r2/fill", "x", 0) --[[@as druid.progress]] + + self.stick_left = self:get_node("stick_left/stick_root") + self.stick_right = self:get_node("stick_right/stick_root") +end + + +function M:on_input(action_id, action) + if action_id == hash("gamepad_ltrigger") then + self.trigger_l2:set_to(action.value) + end + if action_id == hash("gamepad_rtrigger") then + self.trigger_r2:set_to(action.value) + end + + -- Left Stick + if action_id == hash("gamepad_lstick_left") then + gui.set(self.stick_left, "position.x", -action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_lstick_right") then + gui.set(self.stick_left, "position.x", action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_lstick_up") then + gui.set(self.stick_left, "position.y", action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_lstick_down") then + gui.set(self.stick_left, "position.y", -action.value * STICK_DISTANCE) + end + + -- Right Stick + if action_id == hash("gamepad_rstick_left") then + gui.set(self.stick_right, "position.x", -action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_rstick_right") then + gui.set(self.stick_right, "position.x", action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_rstick_up") then + gui.set(self.stick_right, "position.y", action.value * STICK_DISTANCE) + end + if action_id == hash("gamepad_rstick_down") then + gui.set(self.stick_right, "position.y", -action.value * STICK_DISTANCE) + end +end + + +return M diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui new file mode 100644 index 00000000..a7f8b559 --- /dev/null +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui @@ -0,0 +1,202 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 90.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.5 + y: 1.5 + z: 1.0 + w: 1.0 + } + size { + x: 40.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "X" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 200.0 + y: 100.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/icon_arrow" + id: "icon" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui new file mode 100644 index 00000000..ffa86d2a --- /dev/null +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui @@ -0,0 +1,191 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 12.0 + y: 12.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/empty" + id: "root" + inherit_alpha: true +} +nodes { + size { + x: 256.0 + y: 256.0 + } + type: TYPE_PIE + id: "background_mask" + parent: "root" + inherit_alpha: true + perimeterVertices: 64 + clipping_mode: CLIPPING_MODE_STENCIL + clipping_visible: false + size_mode: SIZE_MODE_AUTO +} +nodes { + size { + x: 256.0 + y: 256.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/pixel" + id: "background" + parent: "background_mask" + inherit_alpha: true + slice9 { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } +} +nodes { + type: TYPE_BOX + texture: "druid/empty" + id: "stick_root" + parent: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + scale { + x: 2.0 + y: 2.0 + } + color { + x: 0.0 + y: 0.0 + z: 0.0 + } + type: TYPE_BOX + texture: "druid/ui_circle_64_blur_8" + id: "stick_shadow" + parent: "stick_root" + inherit_alpha: true + alpha: 0.25 + size_mode: SIZE_MODE_AUTO +} +nodes { + scale { + x: 2.0 + y: 2.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "stick" + parent: "stick_root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: -22.0 + } + scale { + x: 0.5 + y: 0.5 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "dot_1" + parent: "stick" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: 22.0 + } + scale { + x: 0.5 + y: 0.5 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "dot_2" + parent: "stick" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 22.0 + } + scale { + x: 0.5 + y: 0.5 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "dot_3" + parent: "stick" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -22.0 + } + scale { + x: 0.5 + y: 0.5 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_BOX + texture: "druid/ui_circle_16" + id: "dot_4" + parent: "stick" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui b/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui new file mode 100644 index 00000000..ffe202d2 --- /dev/null +++ b/example/examples/gamepad/gamepad_tester/templates/gamepad_trigger.gui @@ -0,0 +1,202 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 180.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -90.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 180.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "fill" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.5 + y: 1.5 + z: 1.0 + w: 1.0 + } + size { + x: 40.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.941 + y: 0.984 + z: 1.0 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "X" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/gamepad/on_screen_control/on_screen_control.gui b/example/examples/gamepad/on_screen_control/on_screen_control.gui new file mode 100644 index 00000000..63c4bf50 --- /dev/null +++ b/example/examples/gamepad/on_screen_control/on_screen_control.gui @@ -0,0 +1,227 @@ +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + size { + x: 128.0 + y: 128.0 + } + color { + x: 0.902 + y: 0.875 + z: 0.624 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "character" + parent: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + position { + x: -25.0 + y: 21.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "eye_left" + parent: "character" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: -8.0 + y: 8.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_BOX + texture: "druid/ui_circle_8" + id: "eye_left_blick" + parent: "eye_left" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 25.0 + y: 21.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + } + type: TYPE_BOX + texture: "druid/ui_circle_32" + id: "eye_right" + parent: "character" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: -8.0 + y: 8.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_BOX + texture: "druid/ui_circle_8" + id: "eye_right_blick" + parent: "eye_right" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -300.0 + } + type: TYPE_TEMPLATE + id: "on_screen_input" + parent: "root" + inherit_alpha: true + template: "/example/examples/gamepad/on_screen_control/on_screen_input.gui" +} +nodes { + type: TYPE_BOX + id: "on_screen_input/root" + parent: "on_screen_input" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_input/on_screen_stick" + parent: "on_screen_input/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/root" + parent: "on_screen_input/on_screen_stick" + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "on_screen_input/on_screen_stick/background_mask" + parent: "on_screen_input/on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/background" + parent: "on_screen_input/on_screen_stick/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/stick_root" + parent: "on_screen_input/on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/stick_shadow" + parent: "on_screen_input/on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/stick" + parent: "on_screen_input/on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/dot_1" + parent: "on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/dot_2" + parent: "on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/dot_3" + parent: "on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_stick/dot_4" + parent: "on_screen_input/on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/on_screen_button" + parent: "on_screen_input/root" + template_node_child: true +} +nodes { + type: TYPE_TEMPLATE + id: "on_screen_input/button_action" + parent: "on_screen_input/on_screen_button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/button_action/button" + parent: "on_screen_input/button_action" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "on_screen_input/button_action/text" + parent: "on_screen_input/button_action/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_input/button_action/icon" + parent: "on_screen_input/button_action/button" + template_node_child: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/gamepad/on_screen_control/on_screen_control.lua b/example/examples/gamepad/on_screen_control/on_screen_control.lua new file mode 100644 index 00000000..321c78ff --- /dev/null +++ b/example/examples/gamepad/on_screen_control/on_screen_control.lua @@ -0,0 +1,59 @@ +local component = require("druid.component") +local on_screen_input = require("example.examples.gamepad.on_screen_control.on_screen_input") + +---@class on_screen_control: druid.base_component +---@field druid druid_instance +---@field on_screen_input on_screen_input +local M = component.create("on_screen_control") + +local CHARACTER_SPEED = 700 + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.character = self:get_node("character") + self.character_position = gui.get_position(self.character) + + self.character_eye_left = self:get_node("eye_left") + self.character_eye_right = self:get_node("eye_right") + + self.on_screen_input = self.druid:new(on_screen_input, "on_screen_input") --[[@as on_screen_input]] + + self.on_screen_input.on_action:subscribe(self.on_action_button, self) + self.on_screen_input.on_movement:subscribe(self.on_movement, self) + self.on_screen_input.on_movement_stop:subscribe(self.on_movement_stop, self) +end + + +function M:on_action_button() + gui.set_scale(self.character, vmath.vector3(1.5)) + gui.animate(self.character, gui.PROP_SCALE, vmath.vector3(1), gui.EASING_INSINE, 0.2) +end + + +function M:on_movement(x, y, dt) + self.character_position.x = self.character_position.x + x * CHARACTER_SPEED * dt + self.character_position.y = self.character_position.y + y * CHARACTER_SPEED * dt + + -- Clamp to -436, 436, area of the screen + self.character_position.x = math.min(436, math.max(-436, self.character_position.x)) + self.character_position.y = math.min(436, math.max(-436, self.character_position.y)) + + gui.set_position(self.character, self.character_position) + + -- Adjust angle of the eyes + local angle = math.deg(math.atan2(y, x)) - 135 + gui.set(self.character_eye_left, "euler.z", angle) + gui.set(self.character_eye_right, "euler.z", angle) +end + + +function M:on_movement_stop() + gui.set(self.character_eye_left, "euler.z", 0) + gui.set(self.character_eye_right, "euler.z", 0) +end + + +return M diff --git a/example/examples/gamepad/on_screen_control/on_screen_input.gui b/example/examples/gamepad/on_screen_control/on_screen_input.gui new file mode 100644 index 00000000..b1d34886 --- /dev/null +++ b/example/examples/gamepad/on_screen_control/on_screen_input.gui @@ -0,0 +1,132 @@ +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 400.0 + } + type: TYPE_BOX + id: "root" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -300.0 + } + type: TYPE_TEMPLATE + id: "on_screen_stick" + parent: "root" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_stick.gui" +} +nodes { + size { + x: 400.0 + y: 400.0 + } + type: TYPE_BOX + id: "on_screen_stick/root" + parent: "on_screen_stick" + overridden_fields: 4 + template_node_child: true +} +nodes { + type: TYPE_PIE + id: "on_screen_stick/background_mask" + parent: "on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/background" + parent: "on_screen_stick/background_mask" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/stick_root" + parent: "on_screen_stick/root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/stick_shadow" + parent: "on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/stick" + parent: "on_screen_stick/stick_root" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/dot_1" + parent: "on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/dot_2" + parent: "on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/dot_3" + parent: "on_screen_stick/stick" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "on_screen_stick/dot_4" + parent: "on_screen_stick/stick" + template_node_child: true +} +nodes { + position { + x: 300.0 + } + size { + x: 400.0 + y: 400.0 + } + type: TYPE_BOX + id: "on_screen_button" + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + type: TYPE_TEMPLATE + id: "button_action" + parent: "on_screen_button" + inherit_alpha: true + template: "/example/examples/gamepad/gamepad_tester/templates/gamepad_button.gui" +} +nodes { + type: TYPE_BOX + id: "button_action/button" + parent: "button_action" + template_node_child: true +} +nodes { + type: TYPE_TEXT + id: "button_action/text" + parent: "button_action/button" + template_node_child: true +} +nodes { + type: TYPE_BOX + id: "button_action/icon" + parent: "button_action/button" + overridden_fields: 45 + template_node_child: true + enabled: false +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/gamepad/on_screen_control/on_screen_input.lua b/example/examples/gamepad/on_screen_control/on_screen_input.lua new file mode 100644 index 00000000..41d1d218 --- /dev/null +++ b/example/examples/gamepad/on_screen_control/on_screen_input.lua @@ -0,0 +1,107 @@ +local const = require("druid.const") +local event = require("druid.event") +local helper = require("druid.helper") +local component = require("druid.component") + +---@class on_screen_input: druid.base_component +---@field druid druid_instance +---@field on_action druid.event @() +---@field on_movement druid.event @(x: number, y: number, dt: number) X/Y values are in range -1..1 +---@field on_movement_stop druid.event @() +local M = component.create("on_screen_input") + +local STICK_DISTANCE = 80 + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.button_action = self:get_node("on_screen_button") + self.on_screen_control = self:get_node("on_screen_stick/root") + + self.stick_root = self:get_node("on_screen_stick/stick_root") + self.stick_position = gui.get_position(self.stick_root) + + self.on_action = event() + self.on_movement = event() + self.on_movement_stop = event() + + self.is_multitouch = helper.is_multitouch_supported() +end + + +---@param action_id hash +---@param action action +function M:on_input(action_id, action) + if self.is_multitouch then + if action_id == const.ACTION_MULTITOUCH then + for _, touch in ipairs(action.touch) do + self:process_touch(touch) + end + end + else + if action_id == const.ACTION_TOUCH then + self:process_touch(action) + end + end + + return false +end + + +---@param action action|touch +function M:process_touch(action) + if action.pressed and gui.pick_node(self.button_action, action.x, action.y) then + self.on_action:trigger() + + gui.animate(self.button_action, gui.PROP_SCALE, vmath.vector3(1.2), gui.EASING_OUTSINE, 0.1, 0, function() + gui.animate(self.button_action, gui.PROP_SCALE, vmath.vector3(1), gui.EASING_INSINE, 0.2, 0.05) + end) + end + + if gui.pick_node(self.on_screen_control, action.x, action.y) then + self._is_stick_drag = action.id or true + end + + local is_the_same_touch_id = not action.id or action.id == self._is_stick_drag + if self._is_stick_drag and is_the_same_touch_id then + -- action.dx and action.dy are broken inside touches for some reason, manual calculations seems fine + local dx = action.x - (self._prev_x or action.x) + local dy = action.y - (self._prev_y or action.y) + self._prev_x = action.x + self._prev_y = action.y + + self.stick_position.x = self.stick_position.x + dx + self.stick_position.y = self.stick_position.y + dy + + -- Limit to STICK_DISTANCE + local length = vmath.length(self.stick_position) + if length > STICK_DISTANCE then + self.stick_position.x = self.stick_position.x / length * STICK_DISTANCE + self.stick_position.y = self.stick_position.y / length * STICK_DISTANCE + end + + gui.set_position(self.stick_root, self.stick_position) + end + + if action.released and is_the_same_touch_id then + self._is_stick_drag = false + self.stick_position.x = 0 + self.stick_position.y = 0 + self._prev_x = nil + self._prev_y = nil + gui.animate(self.stick_root, gui.PROP_POSITION, self.stick_position, gui.EASING_OUTBACK, 0.3) + self.on_movement_stop:trigger() + end +end + + +function M:update(dt) + if self.stick_position.x ~= 0 or self.stick_position.y ~= 0 then + self.on_movement:trigger(self.stick_position.x / STICK_DISTANCE, self.stick_position.y / STICK_DISTANCE, dt) + end +end + + +return M diff --git a/example/examples/general/buttons/buttons.collection b/example/examples/general/buttons/buttons.collection deleted file mode 100644 index 9f8499ef..00000000 --- a/example/examples/general/buttons/buttons.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "buttons" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"buttons\"\n" - " component: \"/example/examples/general/buttons/buttons.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/buttons/buttons.gui b/example/examples/general/buttons/buttons.gui deleted file mode 100644 index a1f67793..00000000 --- a/example/examples/general/buttons/buttons.gui +++ /dev/null @@ -1,1602 +0,0 @@ -script: "/example/examples/general/buttons/buttons.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -200.0 - y: 280.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_usual" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_usual/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_usual" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Usual" - font: "game" - id: "button_usual/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_usual/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -200.0 - y: 180.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_custom_style" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_custom_style/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_custom_style" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Custom Style" - font: "game" - id: "button_custom_style/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_custom_style/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -200.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_long_tap" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_long_tap/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_long_tap" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Long tap" - font: "game" - id: "button_long_tap/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_long_tap/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -200.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_repeated_tap" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_repeated_tap/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_repeated_tap" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Repeated" - font: "game" - id: "button_repeated_tap/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_repeated_tap/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -200.0 - y: -120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_double_tap" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_double_tap/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_double_tap" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Double tap" - font: "game" - id: "button_double_tap/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_double_tap/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -200.0 - y: -220.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_key_trigger" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_key_trigger/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_key_trigger" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Press Space" - font: "game" - id: "button_key_trigger/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_key_trigger/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 280.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_anim" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_anim/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_anim" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Anim node" - font: "game" - id: "button_anim/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_anim/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 62.0 - y: 305.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "anim_node_icon" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 2.0 - y: 2.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 40.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "?" - font: "game" - id: "anim_node_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "anim_node_icon" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 200.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_custom_check" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_custom_check/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_custom_check" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Check func" - font: "game" - id: "button_custom_check/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_custom_check/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - overridden_fields: 18 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 200.0 - y: 180.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Button with additional check function." - font: "game" - id: "text_custom_check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 200.0 - y: -20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Failure callback: false" - font: "game" - id: "text_custom_result" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/buttons/buttons.gui_script b/example/examples/general/buttons/buttons.gui_script deleted file mode 100644 index 144c2376..00000000 --- a/example/examples/general/buttons/buttons.gui_script +++ /dev/null @@ -1,98 +0,0 @@ -local druid = require("druid.druid") - - -local function usual_callback() - print("Usual callback") -end - - -local function long_tap_callback(self, params, button, hold_time) - print("Long tap callback", hold_time) -end - - -local function hold_callback(self, params, button, hold_time) - print("On hold callback", hold_time) -end - - -local function repeated_callback(self, params, button, click_in_row) - print("Repeated callback", click_in_row) -end - - -local function double_tap_callback(self, params, button, click_in_row) - print("Double tap callback", click_in_row) -end - - -local function check_function(self) - self._some_test_value = self._some_test_value or 0 - self._some_test_value = self._some_test_value + 1 - - return self._some_test_value % 2 == 0 -end - - -local function failure_check_callback(self) - gui.set_text(gui.get_node("text_custom_result"), "Failure callback: true") -end - - -local function check_clicked_callback(self) - local node = gui.get_node("text_custom_result") - gui.set_text(node, "Failure callback: false") - - gui.set_scale(node, vmath.vector3(0.75)) - gui.animate(node, gui.PROP_SCALE, 0.5, gui.EASING_OUTSINE, 0.2) -end - - -local function setup_buttons(self) - self.druid:new_button("button_usual/button", usual_callback) - - local long_button = self.druid:new_button("button_long_tap/button", usual_callback) - long_button.on_hold_callback:subscribe(hold_callback) - long_button.on_long_click:subscribe(long_tap_callback) - self.druid:new_button("button_repeated_tap/button", usual_callback) - .on_repeated_click:subscribe(repeated_callback) - self.druid:new_button("button_double_tap/button", usual_callback) - .on_double_click:subscribe(double_tap_callback) - - local button_space = self.druid:new_button("button_key_trigger/button", usual_callback) - button_space:set_key_trigger("key_space") - button_space.on_long_click:subscribe(long_tap_callback) - button_space.on_double_click:subscribe(double_tap_callback) - - -- Button with another node for animating - self.druid:new_button("button_anim/button", usual_callback, nil, "anim_node_icon") - - self.druid:new_button("button_custom_check/button", check_clicked_callback) - :set_check_function(check_function, failure_check_callback) -end - - -function init(self) - self.druid = druid.new(self) - setup_buttons(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/checkboxes/checkboxes.collection b/example/examples/general/checkboxes/checkboxes.collection deleted file mode 100644 index fc95004b..00000000 --- a/example/examples/general/checkboxes/checkboxes.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "checkboxes" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"checkboxes\"\n" - " component: \"/example/examples/general/checkboxes/checkboxes.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/checkboxes/checkboxes.gui b/example/examples/general/checkboxes/checkboxes.gui deleted file mode 100644 index 8998a799..00000000 --- a/example/examples/general/checkboxes/checkboxes.gui +++ /dev/null @@ -1,1454 +0,0 @@ -script: "/example/examples/general/checkboxes/checkboxes.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: -10.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Single checkbox" - font: "game" - id: "text_simple" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 60.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -10.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Group checkboxes" - font: "game" - id: "text_group" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 60.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "checkbox_group" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox1" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox1/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox1" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox1/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox1/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 70.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox2" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox2/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox2" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox2/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox2/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 140.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox3" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox3/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox3" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox3/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox3/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -10.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 260.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Radio group" - font: "game" - id: "text_radiogroup" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 60.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "radio_group" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio1" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio1/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio1" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio1/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio1/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 70.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio2" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio2/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio2" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio2/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio2/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 140.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio3" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio3/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio3" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio3/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio3/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/checkboxes/checkboxes.gui_script b/example/examples/general/checkboxes/checkboxes.gui_script deleted file mode 100644 index a5a44f9e..00000000 --- a/example/examples/general/checkboxes/checkboxes.gui_script +++ /dev/null @@ -1,45 +0,0 @@ -local druid = require("druid.druid") - - -local function on_single_checkbox(self, value) - print("Single checkbox callback. Value:", value) -end - - -function init(self) - self.druid = druid.new(self) - - local single_checkbox = self.druid:new_checkbox("checkbox/check", on_single_checkbox) - - local radio_group = self.druid:new_radio_group( - {"radio1/check", "radio2/check", "radio3/check"}, - nil, - {"radio1/back", "radio2/back", "radio3/back"}) -- last row optional. It's input node (default - click node) - radio_group:set_state(2, true) - - local checkbox_group = self.druid:new_checkbox_group( - {"checkbox1/check", "checkbox2/check", "checkbox3/check"}, - nil, - {"checkbox1/back", "checkbox2/back", "checkbox3/back"}) -- last row optional. It's input node (default - click node) - checkbox_group:set_state({true, false, true}, true) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/data_list/data_list.collection b/example/examples/general/data_list/data_list.collection deleted file mode 100644 index b00f1246..00000000 --- a/example/examples/general/data_list/data_list.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "data_list" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"data_list\"\n" - " component: \"/example/examples/general/data_list/data_list.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/data_list/data_list.gui_script b/example/examples/general/data_list/data_list.gui_script deleted file mode 100644 index 9d057222..00000000 --- a/example/examples/general/data_list/data_list.gui_script +++ /dev/null @@ -1,69 +0,0 @@ -local druid = require("druid.druid") - - -local function create_function(self, data, index, data_list) - -- In data list create funtion we made all init stuff for this node - local nodes = gui.clone_tree(self.prefab) - local root = nodes["prefab"] - gui.set_enabled(root, true) - gui.set_enabled(nodes["checkbox"], data.is_checked) - gui.set_text(nodes["text"], "Record " .. data.value) - - -- Since we have only 1 component, we can return this one - -- If we have several components, we should create custom component to - -- union them all - local button = self.druid:new_button(root, function() - data.is_checked = not data.is_checked - gui.set_enabled(nodes["checkbox"], data.is_checked) - end) - button:set_click_zone(data_list.scroll.view_node) - - -- We should return in this function root node and optionally - Druid component - return root, button -end - - -function init(self) - self.druid = druid.new(self) - - self.prefab = gui.get_node("prefab") - gui.set_enabled(self.prefab, false) - - local data = {} - - for i = 1, 999 do - table.insert(data, { - is_checked = false, - value = i - }) - end - - self.scroll = self.druid:new_scroll("data_list_view", "data_list_content") - self.scroll:set_horizontal_scroll(false) - self.grid = self.druid:new_static_grid("data_list_content", "prefab", 1) - - -- Pass already created scroll and grid components to data_list: - self.data_list = self.druid:new_data_list(self.scroll, self.grid, create_function) - - self.data_list:set_data(data) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/drag/drag.collection b/example/examples/general/drag/drag.collection deleted file mode 100644 index d2e1e32d..00000000 --- a/example/examples/general/drag/drag.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "drag" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"drag\"\n" - " component: \"/example/examples/general/drag/drag.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/drag/drag.gui_script b/example/examples/general/drag/drag.gui_script deleted file mode 100644 index 06e35848..00000000 --- a/example/examples/general/drag/drag.gui_script +++ /dev/null @@ -1,54 +0,0 @@ -local druid = require("druid.druid") - - -local function on_drag_callback(self, dx, dy, total_x, total_y) - self.position.x = self.position.x + dx - self.position.y = self.position.y + dy - print("Total drag:", total_x, total_y) - gui.set_position(self.box, self.position) -end - - -local function on_drag_end(self) - self.position.x = 0 - self.position.y = 170 - gui.animate(self.box, "position", self.position, gui.EASING_OUTSINE, 0.3) -end - - -local function on_drag_toggle(self) - self.drag:set_enabled(not self.drag:is_enabled()) -end - - -function init(self) - self.druid = druid.new(self) - - self.box = gui.get_node("icon_box") - self.position = gui.get_position(self.box) - self.drag = self.druid:new_drag("drag_node", on_drag_callback) - - self.drag.on_drag_end:subscribe(on_drag_end, self) - - self.druid:new_button("button_drag/button", on_drag_toggle) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/grid/grid.collection b/example/examples/general/grid/grid.collection deleted file mode 100644 index 8efd8c50..00000000 --- a/example/examples/general/grid/grid.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "grid" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"overview\"\n" - " component: \"/example/examples/general/grid/grid.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/grid/grid.gui b/example/examples/general/grid/grid.gui deleted file mode 100644 index e79a591a..00000000 --- a/example/examples/general/grid/grid.gui +++ /dev/null @@ -1,2058 +0,0 @@ -script: "/example/examples/general/grid/grid.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 1750.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_page_content" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: -81.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 700.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Tap on node for remove\n" - "Long tap on node for remove without node shift" - font: "game" - id: "text_grid_hint" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "grid_page_content" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 109.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_grid_static" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "grid_page_content" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: -354.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.8 - y: 1.0 - z: 0.8 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_nodes_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_static" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 400.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.5019608 - y: 0.3019608 - z: 0.5019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_nodes" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "grid_nodes_view" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -80.0 - y: -304.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add" - parent: "info_grid_static" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_add" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Add" - font: "game" - id: "button_add/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 80.0 - y: -304.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_clear" - parent: "info_grid_static" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_clear/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_clear" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Clear" - font: "game" - id: "button_clear/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_clear/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -160.0 - y: -394.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 80.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_nodes_prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_static" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.5 - y: 1.5 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "grid_nodes_dot" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "grid_nodes_prefab" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 1.0 - y: 2.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 50.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "X" - font: "game" - id: "grid_nodes_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "grid_nodes_dot" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -744.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 800.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "This Dynamic Grid have pivot on South\n" - "\n" - "Nodes closer to the bottom, like in message app" - font: "game" - id: "text_grid_hint1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "grid_page_content" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 0.7 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -826.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_grid_dynamic" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "grid_page_content" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: -567.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 500.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.9019608 - y: 0.9019608 - z: 0.7019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_dynamic_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_dynamic" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 500.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_dynamic_nodes" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_FIT - parent: "grid_dynamic_view" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: -111.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_red" - id: "grid_dynamic_prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_dynamic" - layer: "image" - inherit_alpha: true - slice9 { - x: 20.0 - y: 20.0 - z: 20.0 - w: 20.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -60.0 - y: -31.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add_start_dynamic" - parent: "info_grid_dynamic" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_start_dynamic/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_add_start_dynamic" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Add First" - font: "game" - id: "button_add_start_dynamic/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_start_dynamic/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 60.0 - y: -31.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add_end_dynamic" - parent: "info_grid_dynamic" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_end_dynamic/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_add_end_dynamic" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Add Last" - font: "game" - id: "button_add_end_dynamic/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_end_dynamic/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -1474.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 700.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Horizontal Dynamic Grid Example\n" - "Pivot point at West" - font: "game" - id: "text_grid_hint2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "grid_page_content" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -1528.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_grid_dynamic_hor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "grid_page_content" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: -126.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.9019608 - y: 0.9019608 - z: 0.7019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_dynamic_hor_view" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_dynamic_hor" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.8 - y: 0.4 - z: 0.2 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid_dynamic_hor_nodes" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "grid_dynamic_hor_view" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: -135.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_red" - id: "grid_dynamic_hor_prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_grid_dynamic_hor" - layer: "" - inherit_alpha: true - slice9 { - x: 20.0 - y: 20.0 - z: 20.0 - w: 20.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -60.0 - y: -37.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add_start_dynamic_hor" - parent: "info_grid_dynamic_hor" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_start_dynamic_hor/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_add_start_dynamic_hor" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Add First" - font: "game" - id: "button_add_start_dynamic_hor/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_start_dynamic_hor/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 60.0 - y: -37.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_add_end_dynamic_hor" - parent: "info_grid_dynamic_hor" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add_end_dynamic_hor/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_add_end_dynamic_hor" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Add Last" - font: "game" - id: "button_add_end_dynamic_hor/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_add_end_dynamic_hor/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/grid/grid.gui_script b/example/examples/general/grid/grid.gui_script deleted file mode 100644 index 606cc39b..00000000 --- a/example/examples/general/grid/grid.gui_script +++ /dev/null @@ -1,224 +0,0 @@ -local druid = require("druid.druid") -local const = require("druid.const") - -local function simple_animate(node, pos) - gui.animate(node, "position", pos, gui.EASING_OUTSINE, 0.2) -end - - -local function remove_node(self, button, no_shift) - gui.delete_node(button.node) - - self.druid:remove(button) - local index = self.grid_static_grid:get_index_by_node(button.node) - self.grid_static_grid:remove(index, no_shift and const.SHIFT.NO_SHIFT or const.SHIFT.RIGHT) - for i = 1, #self.grid_node_buttons do - if self.grid_node_buttons[i] == button then - table.remove(self.grid_node_buttons, i) - break - end - end -end - - -local function add_node(self, index) - local prefab = gui.get_node("grid_nodes_prefab") - local cloned = gui.clone_tree(prefab) - gui.set_enabled(cloned["grid_nodes_prefab"], true) - - local button = self.druid:new_button(cloned["grid_nodes_prefab"], function(_, params, button) - remove_node(self, button) - end) - button.on_long_click:subscribe(function() - remove_node(self, button, true) - end) - button:set_click_zone(self.grid_static_scroll.view_node) - - table.insert(self.grid_node_buttons, button) - - self.grid_static_grid:add(cloned["grid_nodes_prefab"], index) -end - - -local function clear_nodes(self) - local nodes = self.grid_static_grid.nodes - for i, node in pairs(nodes) do - gui.delete_node(node) - end - - for i = 1, #self.grid_node_buttons do - self.druid:remove(self.grid_node_buttons[i]) - end - self.grid_node_buttons = {} - - self.grid_static_grid:clear() -end - - -local function init_static_grid(self) - self.grid_node_buttons = {} - gui.set_enabled(gui.get_node("grid_nodes_prefab"), false) - - for i = 1, 15 do - add_node(self, i) - end - - self.druid:new_button("button_add/button", function() - add_node(self) - end) - self.druid:new_button("button_clear/button", function() - clear_nodes(self) - end) -end - - -local function remove_dynamic_node(self, button, shift_policy) - gui.delete_node(button.node) - - self.druid:remove(button) - local index = self.grid_dynamic_grid:get_index_by_node(button.node) - self.grid_dynamic_grid:remove(index, shift_policy) - for i = 1, #self.dynamic_node_buttons do - if self.dynamic_node_buttons[i] == button then - table.remove(self.dynamic_node_buttons, i) - break - end - end -end - - -local function add_node_dynamic(self, index, is_shift_left) - local node = gui.clone(self.prefab_dynamic) - gui.set_color(node, vmath.vector4(math.random() * 0.2 + 0.8)) - gui.set_enabled(node, true) - gui.set_size(node, vmath.vector3(250, math.random(60, 150), 0)) - self.grid_dynamic_grid:add(node, index, is_shift_left) - - local button = self.druid:new_button(node, function(_, params, button) - remove_dynamic_node(self, button) - end) - button.on_long_click:subscribe(function() - remove_dynamic_node(self, button, const.SHIFT.LEFT) - end) - button:set_click_zone(self.grid_dynamic_scroll.view_node) - table.insert(self.dynamic_node_buttons, button) -end - - -local function remove_dynamic_hor_node(self, button, shift_policy) - gui.delete_node(button.node) - - self.druid:remove(button) - local index = self.grid_dynamic_hor_grid:get_index_by_node(button.node) - self.grid_dynamic_hor_grid:remove(index, shift_policy) - for i = 1, #self.dynamic_node_hor_buttons do - if self.dynamic_node_hor_buttons[i] == button then - table.remove(self.dynamic_node_hor_buttons, i) - break - end - end -end - - -local function add_node_dynamic_hor(self, index) - local node = gui.clone(self.prefab_hor_dynamic) - gui.set_color(node, vmath.vector4(math.random() * 0.2 + 0.8)) - gui.set_enabled(node, true) - gui.set_size(node, vmath.vector3(80 + math.random(0, 80), 80, 0)) - - local button = self.druid:new_button(node, function(_, params, button) - remove_dynamic_hor_node(self, button) - end) - button.on_long_click:subscribe(function() - remove_dynamic_hor_node(self, button, const.SHIFT.LEFT) - end) - button:set_click_zone(self.grid_dynamic_hor_scroll.view_node) - - self.grid_dynamic_hor_grid:add(node, index) - table.insert(self.dynamic_node_hor_buttons, button) -end - - -local function init_dynamic_grid(self) - -- Vertical horizontal grid - self.dynamic_node_buttons = {} - self.dynamic_node_hor_buttons = {} - - self.prefab_dynamic = gui.get_node("grid_dynamic_prefab") - gui.set_enabled(self.prefab_dynamic, false) - - for i = 1, 10 do - add_node_dynamic(self, i) - end - self.druid:new_button("button_add_start_dynamic/button", function() - local start_index = self.grid_dynamic_grid.first_index or 1 - add_node_dynamic(self, start_index) - end) - self.druid:new_button("button_add_end_dynamic/button", function() - add_node_dynamic(self) - end) - - -- Horizontal dynamic grid - self.prefab_hor_dynamic = gui.get_node("grid_dynamic_hor_prefab") - gui.set_enabled(self.prefab_hor_dynamic, false) - - for i = 1, 10 do - add_node_dynamic_hor(self, i) - end - - self.druid:new_button("button_add_start_dynamic_hor/button", function() - local start_index = self.grid_dynamic_hor_grid.first_index or 1 - add_node_dynamic_hor(self, start_index) - end) - self.druid:new_button("button_add_end_dynamic_hor/button", function() - add_node_dynamic_hor(self) - end) -end - - -function init(self) - self.druid = druid.new(self) - - self.druid:new_scroll("root", "grid_page_content") - - self.grid_static_grid = self.druid:new_static_grid("grid_nodes", "grid_nodes_prefab", 5) - :set_position_function(simple_animate) - self.grid_static_scroll = self.druid:new_scroll("grid_nodes_view", "grid_nodes") - :set_horizontal_scroll(false) - :bind_grid(self.grid_static_grid) - - self.grid_dynamic_grid = self.druid:new_dynamic_grid("grid_dynamic_nodes") - :set_position_function(simple_animate) - self.grid_dynamic_scroll = self.druid:new_scroll("grid_dynamic_view", "grid_dynamic_nodes") - :set_horizontal_scroll(false) - :bind_grid(self.grid_dynamic_grid) - - self.grid_dynamic_hor_grid = self.druid:new_dynamic_grid("grid_dynamic_hor_nodes") - :set_position_function(simple_animate) - self.grid_dynamic_hor_scroll = self.druid:new_scroll("grid_dynamic_hor_view", "grid_dynamic_hor_nodes") - :set_vertical_scroll(false) - :bind_grid(self.grid_dynamic_hor_grid) - - init_static_grid(self) - init_dynamic_grid(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/hotkey/hotkey.collection b/example/examples/general/hotkey/hotkey.collection deleted file mode 100644 index 0b416851..00000000 --- a/example/examples/general/hotkey/hotkey.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "hotkey" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"template\"\n" - " component: \"/example/examples/general/hotkey/hotkey.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/hotkey/hotkey.gui_script b/example/examples/general/hotkey/hotkey.gui_script deleted file mode 100644 index 2b920d61..00000000 --- a/example/examples/general/hotkey/hotkey.gui_script +++ /dev/null @@ -1,38 +0,0 @@ -local hotkey = require("druid.extended.hotkey") -local druid = require("druid.druid") - - -local function on_hotkey(self) - self.counter = self.counter + 1 - gui.set_text(gui.get_node("text_counter"), "Counter: " .. self.counter) -end - - -function init(self) - druid.register("hotkey", hotkey) - self.druid = druid.new(self) - self.counter = 0 - - self.hotkey = self.druid:new_hotkey({ "key_lsuper", "key_g" }, on_hotkey) - self.hotkey:add_hotkey({ "key_lctrl", "key_g"}) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/hover/hover.gui_script b/example/examples/general/hover/hover.gui_script deleted file mode 100644 index 6b18a7ee..00000000 --- a/example/examples/general/hover/hover.gui_script +++ /dev/null @@ -1,41 +0,0 @@ -local druid = require("druid.druid") - - -function init(self) - self.druid = druid.new(self) - - local hover = self.druid:new_hover("hover_node/button") - - -- Usual hover respect to touch action on mobiles. On desktop we will use mouse hover - hover.on_mouse_hover:subscribe(function(_, is_hover, hover_instance) - print("is hover", is_hover) - local node = hover_instance.node - gui.animate(node, gui.PROP_SCALE, is_hover and vmath.vector3(1.2) or vmath.vector3(1), gui.EASING_OUTSINE, 0.2) - end) - - local button = self.druid:new_button("hover_node/button", function() - print("Button clicked") - end) - -- Remove all animations from button, including button hover animations - button:set_style() -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/input/input.collection b/example/examples/general/input/input.collection deleted file mode 100644 index d2ab48a9..00000000 --- a/example/examples/general/input/input.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "input" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"overview\"\n" - " component: \"/example/examples/general/input/input.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/input/input.gui b/example/examples/general/input/input.gui deleted file mode 100644 index 7878dbac..00000000 --- a/example/examples/general/input/input.gui +++ /dev/null @@ -1,1022 +0,0 @@ -script: "/example/examples/general/input/input.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "input_usual" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Usual input:" - font: "game" - id: "input_usual_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_usual" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "input_box_usual" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "input_usual" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Initial text" - font: "game" - id: "input_text_usual" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_box_usual" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "input_password" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Password:" - font: "game" - id: "input_password_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_password" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "input_box_password" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "input_password" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "" - font: "game" - id: "input_text_password" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_box_password" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "input_email" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Email:" - font: "game" - id: "input_email_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_email" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "input_box_email" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "input_email" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "" - font: "game" - id: "input_text_email" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_box_email" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "input_numpad" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Numpad:" - font: "game" - id: "input_numbad_header" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_numpad" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "input_box_numpad" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "input_numpad" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "" - font: "game" - id: "input_text_numpad" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_box_numpad" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/input/input.gui_script b/example/examples/general/input/input.gui_script deleted file mode 100644 index ff4501b6..00000000 --- a/example/examples/general/input/input.gui_script +++ /dev/null @@ -1,31 +0,0 @@ -local druid = require("druid.druid") - -function init(self) - self.druid = druid.new(self) - - self.druid:new_input("input_box_usual", "input_text_usual") - self.druid:new_input("input_box_password", "input_text_password", gui.KEYBOARD_TYPE_PASSWORD) - self.druid:new_input("input_box_email", "input_text_email", gui.KEYBOARD_TYPE_EMAIL) - self.druid:new_input("input_box_numpad", "input_text_numpad", gui.KEYBOARD_TYPE_NUMBER_PAD) - :set_allowed_characters("[%d,.]") -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/layout/layout.collection b/example/examples/general/layout/layout.collection deleted file mode 100644 index 3269796e..00000000 --- a/example/examples/general/layout/layout.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "layout" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"layout\"\n" - " component: \"/example/examples/general/layout/layout.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/layout/layout.gui_script b/example/examples/general/layout/layout.gui_script deleted file mode 100644 index a5adf93b..00000000 --- a/example/examples/general/layout/layout.gui_script +++ /dev/null @@ -1,33 +0,0 @@ -local druid = require("druid.druid") -local const_druid = require("druid.const") -local layout = require("druid.extended.layout") - -function init(self) - druid.register("layout", layout) - self.druid = druid.new(self) - - self.druid:new_layout("node_layout_stretch", const_druid.LAYOUT_MODE.STRETCH) - self.druid:new_layout("node_layout_stretch_x", const_druid.LAYOUT_MODE.STRETCH_X) - self.druid:new_layout("node_layout_stretch_y", const_druid.LAYOUT_MODE.STRETCH_Y) - self.druid:new_layout("node_layout_stretch_y_anchor_w", const_druid.LAYOUT_MODE.STRETCH_X) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/overview/overview.collection b/example/examples/general/overview/overview.collection deleted file mode 100644 index 4776ccb8..00000000 --- a/example/examples/general/overview/overview.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "overview" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"overview\"\n" - " component: \"/example/examples/general/overview/overview.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/overview/overview.gui b/example/examples/general/overview/overview.gui deleted file mode 100644 index 2d510767..00000000 --- a/example/examples/general/overview/overview.gui +++ /dev/null @@ -1,3478 +0,0 @@ -script: "/example/examples/general/overview/overview.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 16.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 320.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_button" - font: "game" - id: "text_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 6.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_template" - parent: "section_button" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_template/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_template" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Tap me!" - font: "game" - id: "button_template/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_template/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 156.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "button_simple" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "section_button" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 5.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 5.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 150.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Change Lang" - font: "game" - id: "text_button_lang" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "button_simple" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 0.8 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 230.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_text" - font: "game" - id: "text_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_text" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Translated" - font: "game" - id: "text_translated" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_text" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Simple" - font: "game" - id: "text_simple" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_text" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 140.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_timer" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_timer" - font: "game" - id: "text_timer" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_timer" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 220.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "12:20" - font: "game" - id: "timer" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_timer" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_progress" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_progress" - font: "game" - id: "text_progress" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_progress" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 30.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "progress_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "section_progress" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_fill_yellow" - id: "progress_fill" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "progress_back" - layer: "image" - inherit_alpha: true - slice9 { - x: 10.0 - y: 0.0 - z: 10.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 95.0 - y: 2.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "15%" - font: "game" - id: "text_progress_amount" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "progress_back" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -40.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_slider" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_slider" - font: "game" - id: "text_slider" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_slider" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "slider_back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "section_slider" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -95.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "slider_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "50%" - font: "game" - id: "text_progress_slider" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "slider_back" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_radio" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_radio" - font: "game" - id: "text_radio" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_radio" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 60.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "radio_group" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "section_radio" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio1" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio1/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio1" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio1/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio1/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 70.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio2" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio2/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio2" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio2/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio2/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 140.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "radio3" - parent: "radio_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/radio.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "radio3/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio3" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -0.5 - y: 0.5 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "radio3/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "radio3/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: -220.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_checkbox" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_checkbox" - font: "game" - id: "text_checkbox" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_checkbox" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 60.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "checkbox_group" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "section_checkbox" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox1" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox1/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox1" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox1/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox1/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 70.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox2" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox2/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox2" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox2/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox2/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 140.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "checkbox3" - parent: "checkbox_group" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/checkbox.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 38.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "checkbox3/back" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox3" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 21.0 - y: 20.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox3/check" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "checkbox3/back" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: -310.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -250.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ui_section_input" - font: "game" - id: "text_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "section_input" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 130.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/progress_back" - id: "input_box" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "section_input" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Hello" - font: "game" - id: "input_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "input_box" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -layouts { - name: "Landscape" - nodes { - position { - x: -50.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: -50.0 - y: -30.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: -50.0 - y: -120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_timer" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: -50.0 - y: -210.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_progress" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: 350.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_slider" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: 350.0 - y: -30.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_radio" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: 350.0 - y: -120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_checkbox" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } - nodes { - position { - x: 350.0 - y: -210.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "section_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "anchor" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 1 - overridden_fields: 3 - template_node_child: false - size_mode: SIZE_MODE_AUTO - } -} -layouts { - name: "Portrait" -} -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/overview/overview.gui_script b/example/examples/general/overview/overview.gui_script deleted file mode 100644 index f0ded90b..00000000 --- a/example/examples/general/overview/overview.gui_script +++ /dev/null @@ -1,117 +0,0 @@ ---- @type druid -local druid = require("druid.druid") -local lang = require("example.lang") - -local function empty_callback(self, param) - print("Empty callback. Param", param) -end - - -local function random_progress(progress, text) - local rnd = math.random() - - gui.set_text(text, math.ceil(rnd * 100) .. "%") - progress:to(rnd) -end - - -local function setup_button(self) - local b = self.druid:new_button("button_simple", lang.toggle_locale, "button_param") - self.druid:new_button("button_template/button", function() - print(b:is_enabled()) - b:set_enabled(not b:is_enabled()) - end, "button_param") -end - - -local function setup_texts(self) - self.druid:new_lang_text("text_button") - self.druid:new_lang_text("text_text") - self.druid:new_lang_text("text_timer") - self.druid:new_lang_text("text_progress") - self.druid:new_lang_text("text_slider") - self.druid:new_lang_text("text_radio") - self.druid:new_lang_text("text_checkbox") - self.druid:new_lang_text("text_input") - - self.druid:new_lang_text("text_translated", "ui_text_example") - self.druid:new_lang_text("text_button_lang", "ui_text_change_lang") - self.druid:new_text("text_simple", "Simple") -end - - -local function setup_progress(self) - self.progress = self.druid:new_progress("progress_fill", "x", 0.4) - random_progress(self.progress, gui.get_node("text_progress_amount")) - timer.delay(2, true, function() - random_progress(self.progress, gui.get_node("text_progress_amount")) - end) -end - - -local function setup_slider(self) - local slider = self.druid:new_slider("slider_pin", vmath.vector3(95, 0, 0), function(_, value) - gui.set_text(gui.get_node("text_progress_slider"), math.ceil(value * 100) .. "%") - end) - - slider:set(0.2) -end - - -local function setup_checkbox(self) - local radio_group = self.druid:new_radio_group( - {"radio1/check", "radio2/check", "radio3/check"}, - nil, - {"radio1/back", "radio2/back", "radio3/back"}) - - local checkbox_group = self.druid:new_checkbox_group( - {"checkbox1/check", "checkbox2/check", "checkbox3/check"}, - nil, - {"checkbox1/back", "checkbox2/back", "checkbox3/back"}) - - radio_group:set_state(2, true) - checkbox_group:set_state({true, false, true}, true) -end - - -local function setup_timer(self) - self.timer = self.druid:new_timer("timer", 300, 0, empty_callback) -end - - -local function setup_input(self) - local input = self.druid:new_input("input_box", "input_text") - input:set_text("hello!") -end - - -function init(self) - self.druid = druid.new(self) - setup_texts(self) - setup_button(self) - setup_progress(self) - setup_timer(self) - setup_checkbox(self) - setup_slider(self) - setup_input(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/progress_bar/progress_bar.collection b/example/examples/general/progress_bar/progress_bar.collection deleted file mode 100644 index 022f8075..00000000 --- a/example/examples/general/progress_bar/progress_bar.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "progress_bar" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"progress_bar\"\n" - " component: \"/example/examples/general/progress_bar/progress_bar.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/progress_bar/progress_bar.gui_script b/example/examples/general/progress_bar/progress_bar.gui_script deleted file mode 100644 index 1026d588..00000000 --- a/example/examples/general/progress_bar/progress_bar.gui_script +++ /dev/null @@ -1,66 +0,0 @@ -local druid = require("druid.druid") - - -local function on_button_set_0(self) - self.progress_x:to(0) - self.progress_y:set_to(0) -end - - -local function on_button_add_25(self) - self.progress_x:to(self.progress_x:get() + 0.25) - self.progress_y:set_to(self.progress_y:get() + 0.25) -end - - -local function on_button_set_100(self) - self.progress_x:to(1) - self.progress_y:set_to(1) -end - - -local function on_progress_step(self, value) - gui.set_text(gui.get_node("text_x_hint"), "Last step triggered: " .. value) -end - - -function init(self) - self.druid = druid.new(self) - - self.progress_x = self.druid:new_progress("progress_fill_x", "x", 0.4) - self.progress_x:set_steps({0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, on_progress_step) - self.progress_x.on_change:subscribe(function(_, value) - value = math.floor(value * 100) - gui.set_text(gui.get_node("text_progress_amount_x"), value .. "%") - end) - - self.progress_y = self.druid:new_progress("progress_fill_y", "y", 0.6) - self.progress_y.on_change:subscribe(function(_, value) - value = math.floor(value * 100) - gui.set_text(gui.get_node("text_progress_amount_y"), value .. "%") - end) - - self.druid:new_button("button_set_0/button", on_button_set_0) - self.druid:new_button("button_add_25/button", on_button_add_25) - self.druid:new_button("button_set_100/button", on_button_set_100) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/scroll/scroll.collection b/example/examples/general/scroll/scroll.collection deleted file mode 100644 index 691e039e..00000000 --- a/example/examples/general/scroll/scroll.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "scroll" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"scroll\"\n" - " component: \"/example/examples/general/scroll/scroll.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/scroll/scroll.gui_script b/example/examples/general/scroll/scroll.gui_script deleted file mode 100644 index f9a5468a..00000000 --- a/example/examples/general/scroll/scroll.gui_script +++ /dev/null @@ -1,90 +0,0 @@ -local druid = require("druid.druid") - - -local function init_scroll_with_grid(self) - local prefab = gui.get_node("grid_prefab") - - local grid_scroll = self.druid:new_scroll("scroll_with_grid_size", "grid_content") - local grid = self.druid:new_static_grid("grid_content", "grid_prefab", 20) - - for i = 1, 40 do - local clone_prefab = gui.clone_tree(prefab) - - grid:add(clone_prefab["grid_prefab"]) - gui.set_text(clone_prefab["grid_prefab_text"], "Node " .. i) - - local button = self.druid:new_button(clone_prefab["grid_button"], function() - local position = gui.get_position(clone_prefab["grid_prefab"]) - grid_scroll:scroll_to(position) - end) - end - - gui.set_enabled(prefab, false) - - grid_scroll:set_size(grid:get_size()) - - local scroll_slider = self.druid:new_slider("grid_scroll_pin", vmath.vector3(287, 0, 0), function(_, value) - grid_scroll:scroll_to_percent(vmath.vector3(value, 0, 0), true) - end) - - grid_scroll.on_scroll:subscribe(function(_, point) - scroll_slider:set(grid_scroll:get_percent().x, true) - end) -end - - -function init(self) - self.druid = druid.new(self) - - -- Usual scroll for whole page - self.druid:new_scroll("root", "scroll_page_content") - - -- Simple scroll with no adjust - self.druid:new_scroll("simple_scroll_input", "simple_scroll_content") - - -- Scroll with grid example - init_scroll_with_grid(self) - - -- Scroll contain children scrolls: - -- Parent scroll - self.druid:new_scroll("children_scroll", "children_scroll_content") - -- Childre scrolls - self.druid:new_scroll("children_scroll_1", "children_scroll_content_1") - self.druid:new_scroll("children_scroll_2", "children_scroll_content_2") - self.druid:new_scroll("children_scroll_3", "children_scroll_content_3") - - -- Content with less size than view - local small_scroll = self.druid:new_scroll("scroll_smaller_view", "scroll_smaller_content") --[[@as druid.scroll]] - small_scroll.style.SMALL_CONTENT_SCROLL = true - small_scroll:set_extra_stretch_size(0) -- it also update scroll size due the change of SMALL_CONTENT_SCROLL - small_scroll:set_inert(false) - - -- Scroll with points of interests - self.druid:new_scroll("scroll_with_points", "scroll_with_points_content") - :set_points({ - vmath.vector3(300, 0, 0), - vmath.vector3(900, 0, 0), - vmath.vector3(1500, 0, 0), - vmath.vector3(2100, 0, 0), - }) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/sliders/sliders.collection b/example/examples/general/sliders/sliders.collection deleted file mode 100644 index 9e5b59d7..00000000 --- a/example/examples/general/sliders/sliders.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "sliders" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"sliders\"\n" - " component: \"/example/examples/general/sliders/sliders.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/sliders/sliders.gui b/example/examples/general/sliders/sliders.gui deleted file mode 100644 index 2f634764..00000000 --- a/example/examples/general/sliders/sliders.gui +++ /dev/null @@ -1,1215 +0,0 @@ -script: "/example/examples/general/sliders/sliders.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "slider_back_simple" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -95.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "slider_simple_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back_simple" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 30.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "50%" - font: "game" - id: "slider_simple_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "slider_back_simple" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "slider_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back_simple" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 50.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 190.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_back" - id: "slider_back_notched" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "notches" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back_notched" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -95.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_0" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -76.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -57.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -38.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -19.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_4" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_5" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 19.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_6" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 38.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_7" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 57.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_8" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 76.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_9" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 95.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.1 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 17.0 - y: 17.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "notch_10" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "notches" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.5 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: -95.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 36.0 - y: 36.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "slider_notched_pin" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back_notched" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 30.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "50%" - font: "game" - id: "slider_notched_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "slider_back_notched" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 45.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "slider_notched_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "slider_back_notched" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/general/sliders/sliders.gui_script b/example/examples/general/sliders/sliders.gui_script deleted file mode 100644 index bf196e33..00000000 --- a/example/examples/general/sliders/sliders.gui_script +++ /dev/null @@ -1,41 +0,0 @@ -local druid = require("druid.druid") - - -function init(self) - self.druid = druid.new(self) - - local slider = self.druid:new_slider("slider_simple_pin", vmath.vector3(95, 0, 0), function(_, value) - gui.set_text(gui.get_node("slider_simple_text"), math.ceil(value * 100) .. "%") - end) - - slider:set(0.2) - slider:set_input_node("slider_input") - - local slider_notched = self.druid:new_slider("slider_notched_pin", vmath.vector3(95, 0, 0), function(_, value) - gui.set_text(gui.get_node("slider_notched_text"), math.ceil(value * 100) .. "%") - end) - - slider_notched:set_steps({0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}) - slider_notched:set(0.2) - slider_notched:set_input_node("slider_notched_input") -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/general/swipe/swipe.collection b/example/examples/general/swipe/swipe.collection deleted file mode 100644 index 12c832e8..00000000 --- a/example/examples/general/swipe/swipe.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "general_swipe" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"swipe\"\n" - " component: \"/example/examples/general/swipe/swipe.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/general/swipe/swipe.gui_script b/example/examples/general/swipe/swipe.gui_script deleted file mode 100644 index 508bafcb..00000000 --- a/example/examples/general/swipe/swipe.gui_script +++ /dev/null @@ -1,37 +0,0 @@ -local druid = require("druid.druid") - -local Swipe = require("druid.extended.swipe") - - -local function on_swipe_callback(self, direction, distance, swipe_time) - self.text:set_to(direction) - print(direction, distance, swipe_time) -end - - -function init(self) - self.druid = druid.new(self) - - self.text = self.druid:new_text("text_value") - self.swipe = self.druid:new(Swipe, "swipe_node", on_swipe_callback) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/grid/grid_animations/grid_animations.collection b/example/examples/grid/grid_animations/grid_animations.collection deleted file mode 100644 index 76f1b4ec..00000000 --- a/example/examples/grid/grid_animations/grid_animations.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "grid_animations" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"grid_animations\"\n" - " component: \"/example/examples/grid/grid_animations/grid_animations.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/grid/grid_animations/grid_animations.gui_script b/example/examples/grid/grid_animations/grid_animations.gui_script deleted file mode 100644 index a1b6e380..00000000 --- a/example/examples/grid/grid_animations/grid_animations.gui_script +++ /dev/null @@ -1,65 +0,0 @@ -local druid = require("druid.druid") - - -local function add_element(self) - -- Limit up to 10 nodes in this example - if #self.grid.nodes >= 10 then - return - end - - -- Make new element to insert into the grid - local nodes = gui.clone_tree(self.prefab) - gui.set_enabled(nodes["prefab"], true) - self.grid:add(nodes["prefab"]) - gui.set_text(nodes["prefab_text"], #self.grid.nodes) - - -- Animate new element after _grid:add_ - -- Note, what Grid component take care of node position, so we can't - -- animate position of the root node. We need insert one more anchor node to make - -- it possible. In this example it is "prefab_icon" - gui.animate(nodes["prefab_icon"], "position.y", 20, gui.EASING_OUTSINE, 0.4, 0, nil, gui.PLAYBACK_ONCE_BACKWARD) - gui.animate(nodes["prefab_icon"], "color.w", 0, gui.EASING_OUTSINE, 0.3, 0, nil, gui.PLAYBACK_ONCE_BACKWARD) -end - - -local function remove_element(self) - if #self.grid.nodes > 0 then - local root = self.grid:remove(#self.grid.nodes) - -- We should instant remove element from the grid, but node itself delete after the animation - gui.animate(root, "color.w", 0, gui.EASING_OUTSINE, 0.2, 0, function() - gui.delete_node(root) - end) - end -end - - -function init(self) - self.druid = druid.new(self) - self.grid = self.druid:new_static_grid("grid", "prefab", 5) - - self.prefab = gui.get_node("prefab") - gui.set_enabled(self.prefab, false) - - self.druid:new_button("button_add/button", add_element) - self.druid:new_button("button_remove/button", remove_element) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/grid/static_grid/static_grid.collection b/example/examples/grid/static_grid/static_grid.collection deleted file mode 100644 index 049e652f..00000000 --- a/example/examples/grid/static_grid/static_grid.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "static_grid" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"static_grid\"\n" - " component: \"/example/examples/grid/static_grid/static_grid.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/grid/static_grid/static_grid.gui b/example/examples/grid/static_grid/static_grid.gui deleted file mode 100644 index c7f876f9..00000000 --- a/example/examples/grid/static_grid/static_grid.gui +++ /dev/null @@ -1,628 +0,0 @@ -script: "/example/examples/grid/static_grid/static_grid.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 409.0 - y: 360.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 49.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.8 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -270.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_NW_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_NE_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NE - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_N_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -270.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_SW_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_SW - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_SE_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_SE - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_S_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -270.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_W_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_C_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_E_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/grid/static_grid/static_grid.gui_script b/example/examples/grid/static_grid/static_grid.gui_script deleted file mode 100644 index 2579bda7..00000000 --- a/example/examples/grid/static_grid/static_grid.gui_script +++ /dev/null @@ -1,87 +0,0 @@ -local druid = require("druid.druid") - - -function init(self) - self.druid = druid.new(self) - local prefab = gui.get_node("prefab") - gui.set_enabled(prefab, false) - - local grid_nw = self.druid:new_static_grid("grid_NW_anchor", prefab, 3) - local grid_ne = self.druid:new_static_grid("grid_NE_anchor", prefab, 3) - local grid_n = self.druid:new_static_grid("grid_N_anchor", prefab, 3) - local grid_sw = self.druid:new_static_grid("grid_SW_anchor", prefab, 3) - local grid_se = self.druid:new_static_grid("grid_SE_anchor", prefab, 3) - local grid_s = self.druid:new_static_grid("grid_S_anchor", prefab, 3) - local grid_w = self.druid:new_static_grid("grid_C_anchor", prefab, 3) - local grid_e = self.druid:new_static_grid("grid_W_anchor", prefab, 3) - local grid_c = self.druid:new_static_grid("grid_E_anchor", prefab, 3) - - local update_pos_func = function(node, pos) gui.animate(node, "position", pos, gui.EASING_OUTSINE, 0.2) end - grid_nw:set_position_function(update_pos_func) - grid_ne:set_position_function(update_pos_func) - grid_n:set_position_function(update_pos_func) - grid_sw:set_position_function(update_pos_func) - grid_se:set_position_function(update_pos_func) - grid_s:set_position_function(update_pos_func) - grid_w:set_position_function(update_pos_func) - grid_e:set_position_function(update_pos_func) - grid_c:set_position_function(update_pos_func) - - local grids = { - grid_nw, - grid_ne, - grid_n, - grid_sw, - grid_se, - grid_s, - grid_c, - grid_w, - grid_e, - } - - for i = 1, #grids do - grids[i].style.IS_DYNAMIC_NODE_POSES = false - end - - - local animate_grides = function() - for _, grid in ipairs(grids) do - for i = 1, #grid.nodes do - gui.delete_node(grid.nodes[i]) - end - grid:clear() - - for i = 1, 9 do - timer.delay(i, false, function() - local node = gui.clone(prefab) - gui.set_enabled(node, true) - grid:add(node) - end) - end - end - end - - animate_grides() - timer.delay(10, true, animate_grides) - -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.collection b/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.collection deleted file mode 100644 index a6277f55..00000000 --- a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "static_grid_dynamic_pos" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"static_grid_dynamic_pos\"\n" - " component: \"/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui b/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui deleted file mode 100644 index 6e975da9..00000000 --- a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui +++ /dev/null @@ -1,628 +0,0 @@ -script: "/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 409.0 - y: 360.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 49.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.8 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -270.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_NW_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NW - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_NE_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_NE - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 370.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_N_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -270.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_SW_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_SW - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_SE_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_SE - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: -130.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_S_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_S - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -270.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_W_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_C_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 270.0 - y: 120.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 100.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.4 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "grid_E_anchor" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_E - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui_script b/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui_script deleted file mode 100644 index 2112513f..00000000 --- a/example/examples/grid/static_grid_dynamic_pos/static_grid_dynamic_pos.gui_script +++ /dev/null @@ -1,87 +0,0 @@ -local druid = require("druid.druid") - - -function init(self) - self.druid = druid.new(self) - local prefab = gui.get_node("prefab") - gui.set_enabled(prefab, false) - - local grid_nw = self.druid:new_static_grid("grid_NW_anchor", prefab, 3) - local grid_ne = self.druid:new_static_grid("grid_NE_anchor", prefab, 3) - local grid_n = self.druid:new_static_grid("grid_N_anchor", prefab, 3) - local grid_sw = self.druid:new_static_grid("grid_SW_anchor", prefab, 3) - local grid_se = self.druid:new_static_grid("grid_SE_anchor", prefab, 3) - local grid_s = self.druid:new_static_grid("grid_S_anchor", prefab, 3) - local grid_w = self.druid:new_static_grid("grid_C_anchor", prefab, 3) - local grid_e = self.druid:new_static_grid("grid_W_anchor", prefab, 3) - local grid_c = self.druid:new_static_grid("grid_E_anchor", prefab, 3) - - local update_pos_func = function(node, pos) gui.animate(node, "position", pos, gui.EASING_OUTSINE, 0.2) end - grid_nw:set_position_function(update_pos_func) - grid_ne:set_position_function(update_pos_func) - grid_n:set_position_function(update_pos_func) - grid_sw:set_position_function(update_pos_func) - grid_se:set_position_function(update_pos_func) - grid_s:set_position_function(update_pos_func) - grid_w:set_position_function(update_pos_func) - grid_e:set_position_function(update_pos_func) - grid_c:set_position_function(update_pos_func) - - local grids = { - grid_nw, - grid_ne, - grid_n, - grid_sw, - grid_se, - grid_s, - grid_c, - grid_w, - grid_e, - } - - for i = 1, #grids do - grids[i].style.IS_DYNAMIC_NODE_POSES = true - end - - - local animate_grides = function() - for _, grid in ipairs(grids) do - for i = 1, #grid.nodes do - gui.delete_node(grid.nodes[i]) - end - grid:clear() - - for i = 1, 9 do - timer.delay(i, false, function() - local node = gui.clone(prefab) - gui.set_enabled(node, true) - grid:add(node) - end) - end - end - end - - animate_grides() - timer.delay(10, true, animate_grides) - -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/intro/examples_list.lua b/example/examples/intro/examples_list.lua new file mode 100644 index 00000000..0366886e --- /dev/null +++ b/example/examples/intro/examples_list.lua @@ -0,0 +1,18 @@ +local helper = require "druid.helper" +local M = {} + +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_intro", + information_text_id = "ui_example_intro_description", + template = "intro", + root = "intro/root", + code_url = "example/examples/intro/intro/intro.lua", + component_class = require("example.examples.intro.intro.intro"), + }, + } +end + +return M \ No newline at end of file diff --git a/example/examples/intro/intro/intro.gui b/example/examples/intro/intro/intro.gui new file mode 100644 index 00000000..834e285b --- /dev/null +++ b/example/examples/intro/intro/intro.gui @@ -0,0 +1,257 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +fonts { + name: "text_regular" + font: "/example/assets/fonts/text_regular.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +textures { + name: "druid_logo" + texture: "/example/assets/druid_logo.atlas" +} +nodes { + size { + x: 600.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + position { + x: -180.0 + y: 375.0 + } + type: TYPE_BOX + texture: "druid_logo/icon_druid" + id: "icon_druid_left" + parent: "root" + layer: "druid_logo" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 180.0 + y: 375.0 + } + type: TYPE_BOX + texture: "druid_logo/icon_druid" + id: "icon_druid_right" + parent: "root" + layer: "druid_logo" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: 255.0 + } + scale { + x: 2.0 + y: 2.0 + } + size { + x: 200.0 + y: 40.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Hello!" + font: "text_bold" + id: "text_hello" + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -210.0 + y: 191.0 + } + scale { + x: 0.7 + y: 0.7 + } + size { + x: 600.0 + y: 400.0 + } + color { + x: 0.525 + y: 0.525 + z: 0.525 + } + type: TYPE_TEXT + text: "Welcome to Druid Example Page\n" + "\n" + "Navigate over examples on the left\n" + "\n" + "Check example info on the right" + font: "text_bold" + id: "text_description" + pivot: PIVOT_NW + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -210.0 + y: -189.0 + } + scale { + x: 0.7 + y: 0.7 + } + size { + x: 600.0 + y: 300.0 + } + color { + x: 0.525 + y: 0.525 + z: 0.525 + } + type: TYPE_TEXT + text: "Your donation helps me stay engaged in creating valuable projects for Defold.\n" + "\n" + "If you appreciate what I\'m doing, please consider supporting me!" + font: "text_bold" + id: "text_support" + pivot: PIVOT_W + line_break: true + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -170.0 + y: -364.0 + } + type: TYPE_BOX + texture: "druid/icon_heart" + id: "icon_heart1" + parent: "root" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -364.0 + } + type: TYPE_BOX + texture: "druid/icon_heart" + id: "icon_heart2" + parent: "root" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 170.0 + y: -364.0 + } + type: TYPE_BOX + texture: "druid/icon_heart" + id: "icon_heart3" + parent: "root" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -450.0 + } + size { + x: 500.0 + y: 80.0 + } + type: TYPE_BOX + id: "sponsor" + parent: "root" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO + visible: false +} +nodes { + position { + x: -196.0 + y: -3.0 + } + type: TYPE_BOX + texture: "druid_logo/sponsor_github" + id: "sponsor_github" + parent: "sponsor" + layer: "druid_logo" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 21.0 + y: -3.0 + } + type: TYPE_BOX + texture: "druid_logo/sponsor_coffee" + id: "sponsor_coffee" + parent: "sponsor" + layer: "druid_logo" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 217.0 + y: -3.0 + } + type: TYPE_BOX + texture: "druid_logo/sponsor_kofi" + id: "sponsor_kofi" + parent: "sponsor" + layer: "druid_logo" + inherit_alpha: true + alpha: 0.75 + size_mode: SIZE_MODE_AUTO +} +layers { + name: "druid_logo" +} +layers { + name: "text_regular" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/intro/intro/intro.lua b/example/examples/intro/intro/intro.lua new file mode 100644 index 00000000..4473ba18 --- /dev/null +++ b/example/examples/intro/intro/intro.lua @@ -0,0 +1,40 @@ +local component = require("druid.component") +local rich_text = require("druid.custom.rich_text.rich_text") +local layout = require("druid.extended.layout") +local panthera = require("panthera.panthera") +local intro_panthera = require("example.examples.intro.intro.intro_panthera") + +---@class intro: druid.base_component +---@field druid druid_instance +---@field root node +local M = component.create("intro") + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + self.root = self:get_node("root") + + self.druid:new(rich_text, "text_hello", "Hello!") + + self.druid:new_button("sponsor_github", self.open_link, "https://github.com/sponsors/insality") + self.druid:new_button("sponsor_coffee", self.open_link, "https://www.buymeacoffee.com/insality") + self.druid:new_button("sponsor_kofi", self.open_link, "https://ko-fi.com/insality") + + self.druid:new(layout, "sponsor") + :add("sponsor_github") + :add("sponsor_coffee") + :add("sponsor_kofi") + :set_margin(8, 0) + + self.animation = panthera.create_gui(intro_panthera, self:get_template(), nodes) + panthera.play(self.animation, "idle", { is_loop = true }) +end + + +function M:open_link(link) + sys.open_url(link, { target = "_blank" }) +end + + +return M diff --git a/example/examples/intro/intro/intro_panthera.lua b/example/examples/intro/intro/intro_panthera.lua new file mode 100644 index 00000000..4574b4d5 --- /dev/null +++ b/example/examples/intro/intro/intro_panthera.lua @@ -0,0 +1,560 @@ +return { + version = 1, + format = "json", + type = "animation_editor", + data = { + metadata = { + fps = 60, + layers = { + { + name = "druid_logo", + color = "73E84C", + }, + { + name = "text_regular", + color = "90D2F6", + }, + }, + gui_path = "/example/examples/intro/intro/intro.gui", + settings = { + font_size = 40, + }, + gizmo_steps = { + }, + }, + nodes = { + }, + animations = { + { + animation_id = "default", + duration = 1, + animation_keys = { + }, + }, + { + animation_id = "idle", + duration = 10, + animation_keys = { + { + node_id = "icon_druid_left", + property_id = "position_y", + duration = 2, + easing = "outsine", + start_value = 375, + key_type = "tween", + end_value = 370, + }, + { + node_id = "icon_druid_right", + property_id = "position_y", + duration = 2, + easing = "outsine", + start_value = 375, + key_type = "tween", + end_value = 370, + }, + { + end_value = 0.737, + node_id = "icon_heart1", + property_id = "color_b", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 0.38, + node_id = "icon_heart1", + property_id = "color_g", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 0.941, + node_id = "icon_heart1", + property_id = "color_r", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "color_a", + duration = 0.7, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 1.1, + node_id = "icon_heart1", + property_id = "scale_x", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 1.1, + node_id = "icon_heart1", + property_id = "scale_y", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 1.2, + node_id = "sponsor_github", + property_id = "color_a", + start_value = 0.75, + easing = "outsine", + duration = 0.7, + key_type = "tween", + start_time = 0.7, + }, + { + end_value = 0.75, + node_id = "icon_heart1", + property_id = "color_a", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "color_b", + duration = 1, + easing = "insine", + start_value = 0.737, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "color_g", + duration = 1, + easing = "insine", + start_value = 0.38, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "color_r", + duration = 1, + easing = "insine", + start_value = 0.941, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "scale_x", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "icon_heart1", + property_id = "scale_y", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 1, + node_id = "sponsor_github", + property_id = "color_a", + start_value = 1.2, + easing = "insine", + duration = 1, + key_type = "tween", + start_time = 1.4, + }, + { + end_value = 380, + node_id = "icon_druid_left", + property_id = "position_y", + duration = 2.5, + easing = "outsine", + start_value = 370, + key_type = "tween", + start_time = 2, + }, + { + end_value = 380, + node_id = "icon_druid_right", + property_id = "position_y", + duration = 2.5, + easing = "outsine", + start_value = 370, + key_type = "tween", + start_time = 2, + }, + { + end_value = 0.353, + node_id = "icon_heart2", + property_id = "color_b", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_g", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_r", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_a", + duration = 0.7, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1.1, + node_id = "icon_heart2", + property_id = "scale_x", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1.1, + node_id = "icon_heart2", + property_id = "scale_y", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1.2, + node_id = "sponsor_coffee", + property_id = "color_a", + duration = 0.7, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 3.7, + }, + { + end_value = 1.2, + node_id = "icon_druid_left", + property_id = "color_a", + duration = 0.35, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 4.15, + }, + { + end_value = 1.2, + node_id = "icon_druid_right", + property_id = "color_a", + duration = 0.35, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 4.15, + }, + { + end_value = 0.75, + node_id = "icon_heart2", + property_id = "color_a", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_b", + duration = 1, + easing = "insine", + start_value = 0.353, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_g", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "color_r", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "scale_x", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "icon_heart2", + property_id = "scale_y", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 1, + node_id = "sponsor_coffee", + property_id = "color_a", + duration = 1, + easing = "insine", + start_value = 1.2, + key_type = "tween", + start_time = 4.4, + }, + { + end_value = 0.75, + node_id = "icon_druid_left", + property_id = "color_a", + duration = 1.15, + easing = "outsine", + start_value = 1.2, + key_type = "tween", + start_time = 4.5, + }, + { + end_value = 0.75, + node_id = "icon_druid_right", + property_id = "color_a", + duration = 1.15, + easing = "outsine", + start_value = 1.2, + key_type = "tween", + start_time = 4.5, + }, + { + end_value = 375, + node_id = "icon_druid_left", + property_id = "position_y", + duration = 5.5, + easing = "insine", + start_value = 380, + key_type = "tween", + start_time = 4.5, + }, + { + end_value = 375, + node_id = "icon_druid_right", + property_id = "position_y", + duration = 5.5, + easing = "insine", + start_value = 380, + key_type = "tween", + start_time = 4.5, + }, + { + end_value = 0.478, + node_id = "icon_heart3", + property_id = "color_b", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 0.494, + node_id = "icon_heart3", + property_id = "color_g", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "color_r", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "color_a", + duration = 0.7, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 1.1, + node_id = "icon_heart3", + property_id = "scale_x", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 1.1, + node_id = "icon_heart3", + property_id = "scale_y", + duration = 0.7, + easing = "outsine", + start_value = 1, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 1.2, + node_id = "sponsor_kofi", + property_id = "color_a", + duration = 0.7, + easing = "outsine", + start_value = 0.75, + key_type = "tween", + start_time = 6.7, + }, + { + end_value = 0.75, + node_id = "icon_heart3", + property_id = "color_a", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "color_b", + duration = 1, + easing = "insine", + start_value = 0.478, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "color_g", + duration = 1, + easing = "insine", + start_value = 0.494, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "color_r", + duration = 1, + easing = "insine", + start_value = 1, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "scale_x", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "icon_heart3", + property_id = "scale_y", + duration = 1, + easing = "insine", + start_value = 1.1, + key_type = "tween", + start_time = 7.4, + }, + { + end_value = 1, + node_id = "sponsor_kofi", + property_id = "color_a", + duration = 1, + easing = "insine", + start_value = 1.2, + key_type = "tween", + start_time = 7.4, + }, + }, + }, + }, + }, +} \ No newline at end of file diff --git a/example/examples/layout/basic/basic_layout.gui b/example/examples/layout/basic/basic_layout.gui new file mode 100644 index 00000000..4bb12aff --- /dev/null +++ b/example/examples/layout/basic/basic_layout.gui @@ -0,0 +1,190 @@ +script: "" +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 500.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_64" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 500.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "layout" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 70.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_16" + id: "prefab" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "layout" + layer: "" + inherit_alpha: true + slice9 { + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/examples/layout/basic/basic_layout.lua b/example/examples/layout/basic/basic_layout.lua new file mode 100644 index 00000000..f6805e17 --- /dev/null +++ b/example/examples/layout/basic/basic_layout.lua @@ -0,0 +1,76 @@ +local helper = require("druid.helper") +local component = require("druid.component") +local layout = require("druid.extended.layout") + +---@class basic_layout: druid.base_component +---@field druid druid_instance +---@field root node +local M = component.create("basic_layout") + +local PIVOTS = { + gui.PIVOT_CENTER, + gui.PIVOT_N, + gui.PIVOT_NE, + gui.PIVOT_E, + gui.PIVOT_SE, + gui.PIVOT_S, + gui.PIVOT_SW, + gui.PIVOT_W, + gui.PIVOT_NW, +} + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.layout = self.druid:new(layout, "layout", "horizontal_wrap") + + self.prefab = self:get_node("prefab") + gui.set_enabled(self.prefab, false) + local default_size = gui.get_size(self.prefab) + + self.nodes = {} + + for _ = 1, 12 do + local node = gui.clone(self.prefab) + + -- Set different size for some nodes + if math.random() > 0.5 then + local size = vmath.vector3(default_size.x * 2, default_size.y, 0) + gui.set_size(node, size) + end + + -- Set random pivot point for each node + local pivot = PIVOTS[math.random(1, #PIVOTS)] + gui.set_pivot(node, pivot) + + gui.set_enabled(node, true) + self.layout:add(node) + table.insert(self.nodes, node) + end +end + + +function M:set_pivot(pivot) + local offset = helper.get_pivot_offset(pivot) + local size = gui.get_size(self.root) + local pos = vmath.vector3(size.x * offset.x, size.y * offset.y, 0) + gui.set_position(self.layout.node, pos) + gui.set_pivot(self.layout.node, pivot) + + self.layout:refresh_layout() +end + + +function M:on_remove() + self.layout:clear_layout() + for _, node in ipairs(self.nodes) do + gui.delete_node(node) + end +end + + +return M diff --git a/example/examples/layout/examples_list.lua b/example/examples/layout/examples_list.lua new file mode 100644 index 00000000..3dc15ba9 --- /dev/null +++ b/example/examples/layout/examples_list.lua @@ -0,0 +1,91 @@ +local M = {} + +---@return druid.example.data[] +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_layout_basic", + information_text_id = "ui_example_layout_basic_description", + template = "basic_layout", + root = "basic_layout/root", + code_url = "example/examples/layout/basic/basic_layout.lua", + component_class = require("example.examples.layout.basic.basic_layout"), + properties_control = function(instance, properties_panel) + ---@cast instance basic_layout + + properties_panel:add_slider("ui_padding", 0, function(value) + local padding = math.floor((value * 64) * 100) / 100 + instance.layout:set_padding(vmath.vector4(padding)) + end) + + properties_panel:add_slider("ui_margin_x", 0, function(value) + local margin = math.floor((value * 64) * 100) / 100 + instance.layout:set_margin(margin, nil) + end) + + properties_panel:add_slider("ui_margin_y", 0, function(value) + local margin = math.floor((value * 64) * 100) / 100 + instance.layout:set_margin(nil, margin) + end) + + properties_panel:add_checkbox("ui_justify", false, function(value) + instance.layout:set_justify(value) + end) + + local pivot_index = 1 + local pivot_list = { + gui.PIVOT_CENTER, + gui.PIVOT_W, + gui.PIVOT_SW, + gui.PIVOT_S, + gui.PIVOT_SE, + gui.PIVOT_E, + gui.PIVOT_NE, + gui.PIVOT_N, + gui.PIVOT_NW, + } + + properties_panel:add_button("ui_pivot_next", function() + pivot_index = pivot_index + 1 + if pivot_index > #pivot_list then + pivot_index = 1 + end + instance:set_pivot(pivot_list[pivot_index]) + end) + + + local type_index = 1 + local type_list = { + "horizontal_wrap", + "horizontal", + "vertical", + } + + properties_panel:add_button("ui_type_next", function() + type_index = type_index + 1 + if type_index > #type_list then + type_index = 1 + end + instance.layout:set_type(type_list[type_index]) + end) + end, + get_debug_info = function(instance) + ---@cast instance basic_layout + local layout = instance.layout + local p = layout.padding + local info = "" + info = info .. "Layout: " .. layout.type .. "\n" + info = info .. "Padding: " .. math.floor(p.x) .. " " .. math.floor(p.y) .. " " .. math.floor(p.z) .. " " .. math.floor(p.w) .. "\n" + info = info .. "Margin: " .. layout.margin.x .. " " .. layout.margin.y .. "\n" + info = info .. "Justify: " .. tostring(layout.is_justify) .. "\n" + info = info .. "Pivot: " .. tostring(gui.get_pivot(layout.node)) .. "\n" + + return info + end + } + } +end + + +return M \ No newline at end of file diff --git a/example/examples/layout/layout_fit/layout_fit.collection b/example/examples/layout/layout_fit/layout_fit.collection deleted file mode 100644 index d8e2914f..00000000 --- a/example/examples/layout/layout_fit/layout_fit.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "layout_fit" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"layout_fit\"\n" - " component: \"/example/examples/layout/layout_fit/layout_fit.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/layout/layout_fit/layout_fit.gui b/example/examples/layout/layout_fit/layout_fit.gui deleted file mode 100644 index 0bfca9b8..00000000 --- a/example/examples/layout/layout_fit/layout_fit.gui +++ /dev/null @@ -1,1355 +0,0 @@ -script: "/example/examples/layout/layout_fit/layout_fit.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.7019608 - y: 0.8 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "node_zoom_test" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 274.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: -185.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Original image:" - font: "game" - id: "text_hint_" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "image" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: -185.0 - y: 69.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_1" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "STRECH" - font: "game" - id: "text_hint_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_1" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 69.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_2" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ZOOM MAX" - font: "game" - id: "text_hint_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_2" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 185.0 - y: 69.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_3" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "ZOOM MIN" - font: "game" - id: "text_hint_3" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_3" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: -185.0 - y: -192.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_4" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_4" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_4" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "STRECH X" - font: "game" - id: "text_hint_4" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_4" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -192.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_5" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_5" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_5" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "STRECH Y" - font: "game" - id: "text_hint_5" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_5" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 185.0 - y: -192.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 96.0 - y: 96.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 0.3019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "back_6" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/logo" - id: "image_6" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "back_6" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.75 - template_node_child: false - size_mode: SIZE_MODE_AUTO - custom_type: 0 - enabled: true - visible: true -} -nodes { - position { - x: 0.0 - y: -106.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "FIT" - font: "game" - id: "text_hint_6" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "back_6" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.75 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 - enabled: true - visible: true -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/layout/layout_fit/layout_fit.gui_script b/example/examples/layout/layout_fit/layout_fit.gui_script deleted file mode 100644 index 9a1c5383..00000000 --- a/example/examples/layout/layout_fit/layout_fit.gui_script +++ /dev/null @@ -1,44 +0,0 @@ -local druid = require("druid.druid") -local const_druid = require("druid.const") -local layout = require("druid.extended.layout") - -function init(self) - druid.register("layout", layout) - self.druid = druid.new(self) - - self.druid:new_layout("node_zoom_test", const_druid.LAYOUT_MODE.STRETCH) - :fit_into_window() - - self.druid:new_layout("image_1", const_druid.LAYOUT_MODE.STRETCH) - :fit_into_node(gui.get_node("back_1")) - self.druid:new_layout("image_2", const_druid.LAYOUT_MODE.ZOOM_MAX) - :fit_into_node(gui.get_node("back_2")) - self.druid:new_layout("image_3", const_druid.LAYOUT_MODE.ZOOM_MIN) - :fit_into_node(gui.get_node("back_3")) - self.druid:new_layout("image_4", const_druid.LAYOUT_MODE.STRETCH_X) - :fit_into_node(gui.get_node("back_4")) - self.druid:new_layout("image_5", const_druid.LAYOUT_MODE.STRETCH_Y) - :fit_into_node(gui.get_node("back_5")) - self.druid:new_layout("image_6", const_druid.LAYOUT_MODE.FIT) - :fit_into_node(gui.get_node("back_6")) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/panthera/animation_blend/animation_blend.gui b/example/examples/panthera/animation_blend/animation_blend.gui new file mode 100644 index 00000000..eb98b38e --- /dev/null +++ b/example/examples/panthera/animation_blend/animation_blend.gui @@ -0,0 +1,218 @@ +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "animation_blend" + texture: "/example/examples/panthera/animation_blend/assets/animation_blend.atlas" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +nodes { + size { + x: 1000.0 + y: 1000.0 + } + color { + x: 0.173 + y: 0.184 + z: 0.204 + } + type: TYPE_BOX + texture: "druid/ui_circle_64" + id: "root" + inherit_alpha: true + slice9 { + x: 32.0 + y: 32.0 + z: 32.0 + w: 32.0 + } +} +nodes { + size { + x: 100.0 + y: 100.0 + } + type: TYPE_BOX + id: "character" + parent: "root" + inherit_alpha: true + visible: false +} +nodes { + type: TYPE_BOX + texture: "animation_blend/pink_body_squircle" + id: "body" + parent: "character" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: 2.0 + } + size { + x: 100.0 + y: 40.0 + } + type: TYPE_BOX + id: "eyes" + parent: "body" + inherit_alpha: true + visible: false +} +nodes { + position { + x: -32.0 + } + type: TYPE_BOX + texture: "animation_blend/facial_part_eye_open" + id: "eye_left" + parent: "eyes" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: 34.0 + } + rotation { + z: 5.0 + } + type: TYPE_BOX + texture: "animation_blend/facial_part_eyebrow_b" + id: "brow_left" + parent: "eye_left" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 32.0 + } + type: TYPE_BOX + texture: "animation_blend/facial_part_eye_open" + id: "eye_right" + parent: "eyes" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: 34.0 + } + rotation { + z: -5.0 + } + scale { + x: -1.0 + } + type: TYPE_BOX + texture: "animation_blend/facial_part_eyebrow_b" + id: "brow_right" + parent: "eye_right" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -35.0 + } + type: TYPE_BOX + texture: "animation_blend/facial_part_mouth_happy" + id: "mouth" + parent: "body" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 130.0 + } + rotation { + z: -10.0 + } + type: TYPE_BOX + texture: "animation_blend/pink_hand_open" + id: "hand_left" + parent: "body" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: -130.0 + } + rotation { + z: 10.0 + } + scale { + x: -1.0 + } + type: TYPE_BOX + texture: "animation_blend/pink_hand_open" + id: "hand_right" + parent: "body" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + y: -445.0 + } + size { + x: 600.0 + y: 100.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + } + type: TYPE_TEXT + text: "Hover mouse over this area" + font: "text_bold" + id: "text_hint" + outline { + x: 1.0 + y: 1.0 + z: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + } + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +nodes { + position { + x: -200.0 + y: 430.0 + } + size { + x: 400.0 + y: 100.0 + } + color { + x: 0.941 + y: 0.984 + } + type: TYPE_TEXT + text: "Rich text" + font: "text_bold" + id: "rich_text_kenney" + pivot: PIVOT_W + parent: "root" + inherit_alpha: true + outline_alpha: 0.0 + shadow_alpha: 0.0 +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/panthera/animation_blend/animation_blend.lua b/example/examples/panthera/animation_blend/animation_blend.lua new file mode 100644 index 00000000..cbd5ea69 --- /dev/null +++ b/example/examples/panthera/animation_blend/animation_blend.lua @@ -0,0 +1,75 @@ +local panthera = require("panthera.panthera") +local component = require("druid.component") +local helper = require("druid.helper") +local event = require("druid.event") +local lang_text = require("druid.extended.lang_text") +local rich_text = require("druid.custom.rich_text.rich_text") + +local character_animation_blend = require("example.examples.panthera.animation_blend.character_animation_blend") + +---@class animation_blend: druid.base_component +---@field root node +---@field druid druid_instance +local M = component.create("animation_blend") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.root = self:get_node("root") + self.root_size = gui.get_size(self.root) + self.druid:new(lang_text, "text_hint", "ui_example_panthera_animation_blend_hint") + + self.animation_idle = panthera.create_gui(character_animation_blend, self:get_template(), nodes) + self.animation_vertical = panthera.create_gui(character_animation_blend, self:get_template(), nodes) + self.animation_horizontal = panthera.create_gui(character_animation_blend, self:get_template(), nodes) + + panthera.play(self.animation_idle, "idle", { + is_loop = true, + }) + + self:setup_rich_text() + self.on_update = event() +end + + +---@param action_id hash +---@param action action +function M:on_input(action_id, action) + if action_id == nil and gui.pick_node(self.root, action.x, action.y) then + local root_screen_pos = gui.get_screen_position(self.root) + local gui_scale = helper.get_gui_scale() + + local dx = (action.screen_x - root_screen_pos.x) / gui_scale -- -root_size.x / 2 .. root_size.x / 2 + local animation_progress_x = (dx + self.root_size.x / 2) / self.root_size.x -- 0 .. 1 + panthera.set_time(self.animation_horizontal, "horizontal", animation_progress_x) + + local dy = (action.screen_y - root_screen_pos.y) / gui_scale -- -root_size.y / 2 .. root_size.y / 2 + local animation_progress_y = (dy + self.root_size.y / 2) / self.root_size.y -- 0 .. 1 + panthera.set_time(self.animation_vertical, "vertical", animation_progress_y) + end +end + + +function M:update() + self.on_update:trigger() +end + + +function M:setup_rich_text() + self.rich_text = self.druid:new(rich_text, "rich_text_kenney", "Character assets by Kenney") + + local tagged = self.rich_text:tagged("link") + for index = 1, #tagged do + ---@type druid.rich_text.word + local word = tagged[index] + self.druid:new_button(word.node, function() + sys.open_url("https://kenney.nl/") + end) + end +end + + +return M diff --git a/example/examples/panthera/animation_blend/assets/animation_blend.atlas b/example/examples/panthera/animation_blend/assets/animation_blend.atlas new file mode 100644 index 00000000..5ce1d2b3 --- /dev/null +++ b/example/examples/panthera/animation_blend/assets/animation_blend.atlas @@ -0,0 +1,46 @@ +images { + image: "/example/examples/panthera/animation_blend/assets/facial_part_eye_open.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/facial_part_eyebrow_b.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/facial_part_mouth_happy.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/facial_part_mouth_smirk.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/pink_body_squircle.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/pink_hand_closed.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/pink_hand_open.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/pink_hand_point.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/shadow.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +images { + image: "/example/examples/panthera/animation_blend/assets/facial_part_eye_half_top.png" + sprite_trim_mode: SPRITE_TRIM_MODE_OFF +} +margin: 0 +extrude_borders: 2 +inner_padding: 0 +max_page_width: 0 +max_page_height: 0 +rename_patterns: "" diff --git a/example/examples/panthera/animation_blend/assets/facial_part_eye_half_top.png b/example/examples/panthera/animation_blend/assets/facial_part_eye_half_top.png new file mode 100644 index 00000000..4f7c09f4 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/facial_part_eye_half_top.png differ diff --git a/example/examples/panthera/animation_blend/assets/facial_part_eye_open.png b/example/examples/panthera/animation_blend/assets/facial_part_eye_open.png new file mode 100644 index 00000000..ab2251f0 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/facial_part_eye_open.png differ diff --git a/example/examples/panthera/animation_blend/assets/facial_part_eyebrow_b.png b/example/examples/panthera/animation_blend/assets/facial_part_eyebrow_b.png new file mode 100644 index 00000000..b498ffb6 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/facial_part_eyebrow_b.png differ diff --git a/example/examples/panthera/animation_blend/assets/facial_part_mouth_happy.png b/example/examples/panthera/animation_blend/assets/facial_part_mouth_happy.png new file mode 100644 index 00000000..acb0b1c4 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/facial_part_mouth_happy.png differ diff --git a/example/examples/panthera/animation_blend/assets/facial_part_mouth_smirk.png b/example/examples/panthera/animation_blend/assets/facial_part_mouth_smirk.png new file mode 100644 index 00000000..1c8455a3 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/facial_part_mouth_smirk.png differ diff --git a/example/examples/panthera/animation_blend/assets/pink_body_squircle.png b/example/examples/panthera/animation_blend/assets/pink_body_squircle.png new file mode 100644 index 00000000..a261a36b Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/pink_body_squircle.png differ diff --git a/example/examples/panthera/animation_blend/assets/pink_hand_closed.png b/example/examples/panthera/animation_blend/assets/pink_hand_closed.png new file mode 100644 index 00000000..6d3c950d Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/pink_hand_closed.png differ diff --git a/example/examples/panthera/animation_blend/assets/pink_hand_open.png b/example/examples/panthera/animation_blend/assets/pink_hand_open.png new file mode 100644 index 00000000..cb400fae Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/pink_hand_open.png differ diff --git a/example/examples/panthera/animation_blend/assets/pink_hand_point.png b/example/examples/panthera/animation_blend/assets/pink_hand_point.png new file mode 100644 index 00000000..1d0b707f Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/pink_hand_point.png differ diff --git a/example/examples/panthera/animation_blend/assets/shadow.png b/example/examples/panthera/animation_blend/assets/shadow.png new file mode 100644 index 00000000..68f07f59 Binary files /dev/null and b/example/examples/panthera/animation_blend/assets/shadow.png differ diff --git a/example/examples/panthera/animation_blend/character_animation_blend.lua b/example/examples/panthera/animation_blend/character_animation_blend.lua new file mode 100644 index 00000000..7f356702 --- /dev/null +++ b/example/examples/panthera/animation_blend/character_animation_blend.lua @@ -0,0 +1,633 @@ +return { + data = { + animations = { + { + animation_id = "default", + duration = 1, + animation_keys = { + }, + }, + { + animation_id = "horizontal", + duration = 1, + animation_keys = { + { + key_type = "tween", + node_id = "eyes", + easing = "outsine", + end_value = -20, + property_id = "position_x", + }, + { + key_type = "tween", + node_id = "mouth", + easing = "outsine", + end_value = -20, + property_id = "position_x", + }, + { + key_type = "tween", + node_id = "mouth", + easing = "outsine", + end_value = -4, + property_id = "rotation_z", + }, + { + key_type = "tween", + node_id = "hand_right", + start_value = -1, + end_value = -0.8, + easing = "outsine", + property_id = "scale_x", + }, + { + key_type = "tween", + node_id = "eye_left", + start_value = 1, + end_value = 0.8, + easing = "outsine", + property_id = "scale_x", + }, + { + key_type = "tween", + node_id = "eye_left", + start_value = 1, + end_value = 0.8, + easing = "outsine", + property_id = "scale_y", + }, + { + key_type = "tween", + node_id = "hand_right", + start_value = 1, + end_value = 0.8, + easing = "outsine", + property_id = "scale_y", + }, + { + key_type = "tween", + node_id = "mouth", + start_value = 1, + end_value = 0.9, + easing = "outsine", + property_id = "scale_x", + }, + { + key_type = "tween", + node_id = "mouth", + start_value = 1, + end_value = 0.9, + easing = "outsine", + property_id = "scale_y", + }, + { + key_type = "tween", + node_id = "hand_left", + start_value = 1, + end_value = 1.2, + easing = "outsine", + property_id = "color_a", + }, + { + key_type = "tween", + node_id = "hand_left", + start_value = 1, + end_value = 1.5, + easing = "outsine", + property_id = "scale_x", + }, + { + key_type = "tween", + node_id = "hand_left", + start_value = 1, + end_value = 1.5, + easing = "outsine", + property_id = "scale_y", + }, + { + key_type = "tween", + node_id = "eye_left", + easing = "outsine", + end_value = 2, + property_id = "position_y", + }, + { + key_type = "tween", + node_id = "hand_left", + start_value = 130, + end_value = 110, + easing = "outsine", + property_id = "position_x", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_left", + easing = "outsine", + start_value = 2, + property_id = "position_y", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_left", + easing = "outsine", + end_value = 1, + start_value = 0.8, + property_id = "scale_x", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_left", + easing = "outsine", + end_value = 1, + start_value = 0.8, + property_id = "scale_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "linear", + end_value = -110, + start_value = -130, + property_id = "position_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "outsine", + end_value = -1.5, + start_value = -0.8, + property_id = "scale_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "outsine", + end_value = 0.8, + start_value = 1.5, + property_id = "scale_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "outsine", + end_value = 0.8, + start_value = 1.5, + property_id = "scale_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "outsine", + end_value = 1, + start_value = 1.2, + property_id = "color_a", + }, + { + duration = 1, + key_type = "tween", + node_id = "mouth", + easing = "inoutsine", + end_value = 1.1, + start_value = 0.9, + property_id = "scale_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "mouth", + easing = "inoutsine", + end_value = 1.1, + start_value = 0.9, + property_id = "scale_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "outsine", + end_value = 1.2, + start_value = 1, + property_id = "color_a", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "outsine", + end_value = 1.5, + start_value = 0.8, + property_id = "scale_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "mouth", + easing = "inoutsine", + end_value = 4, + start_value = -4, + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "eyes", + easing = "inoutsine", + end_value = 20, + start_value = -20, + property_id = "position_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "mouth", + easing = "inoutsine", + end_value = 20, + start_value = -20, + property_id = "position_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "linear", + end_value = 130, + start_value = 110, + property_id = "position_x", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_right", + easing = "outsine", + start_value = 1, + end_value = 0.8, + start_time = 0.25, + property_id = "scale_x", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_right", + easing = "outsine", + start_value = 1, + end_value = 0.8, + start_time = 0.25, + property_id = "scale_y", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "eye_right", + easing = "outsine", + end_value = 2, + start_time = 0.25, + property_id = "position_y", + }, + }, + }, + { + animation_id = "vertical", + duration = 1, + animation_keys = { + { + key_type = "tween", + node_id = "mouth", + start_value = -35, + end_value = -50, + easing = "outsine", + property_id = "position_y", + }, + { + key_type = "tween", + node_id = "hand_left", + easing = "outsine", + end_value = -35, + property_id = "position_y", + }, + { + key_type = "tween", + node_id = "hand_left", + start_value = -10, + end_value = -35, + easing = "outsine", + property_id = "rotation_z", + }, + { + key_type = "tween", + node_id = "hand_right", + easing = "outsine", + end_value = -35, + property_id = "position_y", + }, + { + key_type = "tween", + node_id = "eyes", + start_value = 2, + end_value = -10, + easing = "outsine", + property_id = "position_y", + }, + { + key_type = "tween", + node_id = "brow_left", + start_value = 5, + easing = "outsine", + property_id = "rotation_z", + }, + { + key_type = "tween", + node_id = "brow_right", + start_value = -5, + easing = "outsine", + property_id = "rotation_z", + }, + { + key_type = "trigger", + node_id = "hand_left", + easing = "linear", + data = "animation_blend/pink_hand_point", + start_data = "animation_blend/pink_hand_open", + property_id = "texture", + }, + { + key_type = "trigger", + node_id = "hand_right", + easing = "linear", + data = "animation_blend/pink_hand_point", + start_data = "animation_blend/pink_hand_open", + property_id = "texture", + }, + { + key_type = "trigger", + node_id = "mouth", + easing = "linear", + data = "animation_blend/facial_part_mouth_smirk", + start_data = "animation_blend/facial_part_mouth_happy", + property_id = "texture", + }, + { + key_type = "tween", + node_id = "hand_right", + start_value = 10, + end_value = 35, + easing = "outsine", + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "mouth", + easing = "inoutsine", + end_value = -20, + start_value = -50, + property_id = "position_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "brow_right", + easing = "outsine", + end_value = -10, + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "brow_left", + easing = "outsine", + end_value = -5, + property_id = "position_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "outsine", + start_value = -35, + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "outsine", + start_value = 35, + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "character", + easing = "outsine", + end_value = 0.96, + start_value = 1, + property_id = "scale_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "character", + easing = "outsine", + end_value = 1.04, + start_value = 1, + property_id = "scale_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "brow_right", + easing = "outsine", + end_value = 5, + property_id = "position_x", + }, + { + duration = 1, + key_type = "tween", + node_id = "brow_left", + easing = "outsine", + end_value = 15, + property_id = "rotation_z", + }, + { + duration = 1, + key_type = "tween", + node_id = "eyes", + easing = "inoutsine", + end_value = 25, + start_value = -10, + property_id = "position_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_left", + easing = "insine", + end_value = 100, + start_value = -35, + property_id = "position_y", + }, + { + duration = 1, + key_type = "tween", + node_id = "hand_right", + easing = "insine", + end_value = 100, + start_value = -35, + property_id = "position_y", + }, + { + start_time = 0.4, + key_type = "trigger", + node_id = "hand_left", + easing = "linear", + data = "animation_blend/pink_hand_closed", + start_data = "animation_blend/pink_hand_point", + property_id = "texture", + }, + { + start_time = 0.4, + key_type = "trigger", + node_id = "hand_right", + easing = "linear", + data = "animation_blend/pink_hand_closed", + start_data = "animation_blend/pink_hand_point", + property_id = "texture", + }, + { + start_time = 0.41, + key_type = "trigger", + node_id = "mouth", + easing = "linear", + data = "animation_blend/facial_part_mouth_happy", + start_data = "animation_blend/facial_part_mouth_smirk", + property_id = "texture", + }, + { + start_time = 0.62, + key_type = "trigger", + node_id = "eye_left", + easing = "linear", + data = "animation_blend/facial_part_eye_half_top", + start_data = "animation_blend/facial_part_eye_open", + property_id = "texture", + }, + { + start_time = 0.62, + key_type = "trigger", + node_id = "eye_right", + easing = "linear", + data = "animation_blend/facial_part_eye_half_top", + start_data = "animation_blend/facial_part_eye_open", + property_id = "texture", + }, + { + start_time = 0.78, + key_type = "trigger", + node_id = "hand_left", + easing = "linear", + data = "animation_blend/pink_hand_open", + start_data = "animation_blend/pink_hand_closed", + property_id = "texture", + }, + { + start_time = 0.78, + key_type = "trigger", + node_id = "hand_right", + easing = "linear", + data = "animation_blend/pink_hand_open", + start_data = "animation_blend/pink_hand_closed", + property_id = "texture", + }, + }, + }, + { + animation_id = "idle", + duration = 3, + animation_keys = { + { + duration = 0.75, + key_type = "tween", + node_id = "body", + easing = "outsine", + end_value = 0.98, + start_value = 1, + property_id = "scale_y", + }, + { + duration = 0.75, + key_type = "tween", + node_id = "body", + easing = "outsine", + end_value = 1.02, + start_value = 1, + property_id = "scale_x", + }, + { + duration = 1.37, + key_type = "tween", + node_id = "body", + easing = "outsine", + start_value = 1.02, + end_value = 0.98, + start_time = 0.75, + property_id = "scale_x", + }, + { + duration = 1.37, + key_type = "tween", + node_id = "body", + easing = "outsine", + start_value = 0.98, + end_value = 1.02, + start_time = 0.75, + property_id = "scale_y", + }, + { + duration = 0.88, + key_type = "tween", + node_id = "body", + easing = "outsine", + start_value = 0.98, + end_value = 1, + start_time = 2.12, + property_id = "scale_x", + }, + { + duration = 0.88, + key_type = "tween", + node_id = "body", + easing = "outsine", + start_value = 1.02, + end_value = 1, + start_time = 2.12, + property_id = "scale_y", + }, + }, + }, + }, + metadata = { + gui_path = "/example/examples/panthera/animation_blend/animation_blend.gui", + gizmo_steps = { + }, + layers = { + }, + fps = 60, + settings = { + font_size = 40, + }, + }, + nodes = { + }, + }, + version = 1, + type = "animation_editor", + format = "json", +} \ No newline at end of file diff --git a/example/examples/data_list/with_component/button_component/button_component.gui b/example/examples/panthera/basic_animation/basic_animation.gui similarity index 72% rename from example/examples/data_list/with_component/button_component/button_component.gui rename to example/examples/panthera/basic_animation/basic_animation.gui index f2c721f3..fef1c911 100644 --- a/example/examples/data_list/with_component/button_component/button_component.gui +++ b/example/examples/panthera/basic_animation/basic_animation.gui @@ -1,11 +1,7 @@ script: "" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -33,8 +29,8 @@ nodes { w: 1.0 } size { - x: 450.0 - y: 80.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -46,7 +42,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" + texture: "" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -55,9 +51,9 @@ nodes { layer: "" inherit_alpha: true slice9 { - x: 20.0 - y: 20.0 - z: 20.0 + x: 0.0 + y: 0.0 + z: 0.0 w: 0.0 } clipping_mode: CLIPPING_MODE_NONE @@ -65,13 +61,16 @@ nodes { clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + size_mode: SIZE_MODE_AUTO custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -50.0 - y: 8.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -88,8 +87,8 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -99,43 +98,21 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Record: 1" - font: "game" - id: "text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false + type: TYPE_TEMPLATE + id: "button" parent: "root" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 + template: "/example/templates/button_text_blue.gui" template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 custom_type: 0 + enabled: true } nodes { position { - x: 175.0 - y: 6.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -152,46 +129,49 @@ nodes { w: 1.0 } size { - x: 49.0 - y: 49.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/back_green" - id: "icon" + texture: "druid/ui_circle_32" + id: "button/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" + parent: "button" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO + template_node_child: true + size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 2.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -208,41 +188,53 @@ nodes { w: 1.0 } size { - x: 21.0 - y: 20.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "checkbox" + text: "Hover Me!" + font: "text_bold" + id: "button/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "icon" - layer: "" + line_break: false + parent: "button/root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO + outline_alpha: 0.0 + shadow_alpha: 0.0 + overridden_fields: 8 + template_node_child: true + text_leading: 1.0 + text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/panthera/basic_animation/basic_animation.lua b/example/examples/panthera/basic_animation/basic_animation.lua new file mode 100644 index 00000000..b1792075 --- /dev/null +++ b/example/examples/panthera/basic_animation/basic_animation.lua @@ -0,0 +1,37 @@ +local panthera = require("panthera.panthera") +local component = require("druid.component") + +local basic_animation_panthera = require("example.examples.panthera.basic_animation.basic_animation_panthera") + +---@class basic_animation: druid.base_component +---@field druid druid_instance +local M = component.create("basic_animation") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.animation = panthera.create_gui(basic_animation_panthera, self:get_template(), nodes) + + self.button = self.druid:new_button("button/root", function() + panthera.play(self.animation, "on_click", { + is_skip_init = true + }) + end) + self.button:set_style(nil) -- Reset all button style animations + + self.button.hover.on_mouse_hover:subscribe(function(_, is_hover) + if is_hover then + panthera.play(self.animation, "on_hover") + else + panthera.play(self.animation, "reset", { + is_skip_init = true + }) + end + end) +end + + +return M diff --git a/example/examples/panthera/basic_animation/basic_animation_panthera.lua b/example/examples/panthera/basic_animation/basic_animation_panthera.lua new file mode 100644 index 00000000..bddbc6f2 --- /dev/null +++ b/example/examples/panthera/basic_animation/basic_animation_panthera.lua @@ -0,0 +1,319 @@ +return { + version = 1, + format = "json", + data = { + animations = { + { + duration = 0.35, + animation_keys = { + { + key_type = "trigger", + data = "C", + property_id = "text", + start_data = "Hover Me!", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.624, + property_id = "color_b", + start_value = 0.961, + duration = 0.35, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.875, + property_id = "color_g", + start_value = 0.843, + duration = 0.35, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.902, + property_id = "color_r", + start_value = 0.631, + duration = 0.35, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outback", + end_value = 1.3, + property_id = "scale_x", + start_value = 1, + duration = 0.35, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outback", + end_value = 1.3, + property_id = "scale_y", + start_value = 1, + duration = 0.35, + }, + { + key_type = "trigger", + start_time = 0.047, + data = "Cl", + start_data = "C", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.1, + data = "Cli", + start_data = "Cl", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.145, + data = "Clic", + start_data = "Cli", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.195, + data = "Click", + start_data = "Clic", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.24, + data = "Click M", + start_data = "Click", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.293, + data = "Click Me", + start_data = "Click M", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "trigger", + start_time = 0.34, + data = "Click Me!", + start_data = "Click Me", + property_id = "text", + easing = "linear", + node_id = "button/text", + }, + }, + animation_id = "on_hover", + }, + { + duration = 0.35, + initial_state = "on_hover", + animation_id = "on_click", + animation_keys = { + { + key_type = "trigger", + data = "BOOM", + property_id = "text", + start_data = "Click Me!", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "tween", + node_id = "button/text", + easing = "outsine", + end_value = 1.3, + property_id = "scale_x", + start_value = 1, + duration = 0.1, + }, + { + key_type = "tween", + node_id = "button/text", + easing = "outsine", + end_value = 1.3, + property_id = "scale_y", + start_value = 1, + duration = 0.1, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.608, + property_id = "color_b", + start_value = 0.624, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.608, + property_id = "color_g", + start_value = 0.875, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.957, + property_id = "color_r", + start_value = 0.902, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outback", + end_value = 1.6, + property_id = "scale_x", + start_value = 1.3, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outback", + end_value = 1.6, + property_id = "scale_y", + start_value = 1.3, + duration = 0.2, + }, + { + node_id = "button/text", + key_type = "tween", + start_time = 0.1, + easing = "outsine", + end_value = 1, + property_id = "scale_x", + start_value = 1.3, + duration = 0.13, + }, + { + node_id = "button/text", + key_type = "tween", + start_time = 0.1, + easing = "outsine", + end_value = 1, + property_id = "scale_y", + start_value = 1.3, + duration = 0.13, + }, + }, + }, + { + duration = 0.5, + animation_keys = { + { + key_type = "trigger", + data = "Hover Me!", + property_id = "text", + start_data = "BOOM", + easing = "linear", + node_id = "button/text", + }, + { + key_type = "tween", + node_id = "button/text", + easing = "outsine", + end_value = 1, + property_id = "scale_x", + start_value = 1, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/text", + easing = "outsine", + end_value = 1, + property_id = "scale_y", + start_value = 1, + duration = 0.2, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.627, + property_id = "color_r", + start_value = 0.957, + duration = 0.5, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.839, + property_id = "color_g", + start_value = 0.608, + duration = 0.5, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 0.961, + property_id = "color_b", + start_value = 0.608, + duration = 0.5, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 1, + property_id = "scale_x", + start_value = 1.5, + duration = 0.5, + }, + { + key_type = "tween", + node_id = "button/root", + easing = "outsine", + end_value = 1, + property_id = "scale_y", + start_value = 1.5, + duration = 0.5, + }, + }, + animation_id = "reset", + }, + }, + metadata = { + gui_path = "/example/examples/panthera/basic_animation/basic_animation.gui", + layers = { + }, + fps = 60, + gizmo_steps = { + }, + settings = { + font_size = 40, + }, + }, + nodes = { + }, + }, + type = "animation_editor", +} \ No newline at end of file diff --git a/example/examples/panthera/examples_list.lua b/example/examples/panthera/examples_list.lua new file mode 100644 index 00000000..7f401ee9 --- /dev/null +++ b/example/examples/panthera/examples_list.lua @@ -0,0 +1,45 @@ +local panthera = require("panthera.panthera") + +local M = {} + +function M.get_examples() + return { + { + name_id = "ui_example_panthera_basic_animation", + information_text_id = "ui_example_panthera_basic_animation_description", + template = "basic_animation", + root = "basic_animation/root", + code_url = "example/examples/panthera/basic_animation/basic_animation.lua", + component_class = require("example.examples.panthera.basic_animation.basic_animation"), + }, + { + name_id = "ui_example_panthera_animation_blend", + information_text_id = "ui_example_panthera_animation_blend_description", + template = "animation_blend", + root = "animation_blend/root", + code_url = "example/examples/panthera/animation_blend/animation_blend.lua", + component_class = require("example.examples.panthera.animation_blend.animation_blend"), + properties_control = function(instance, properties_panel) + ---@cast instance animation_blend + local vertical_time = panthera.get_time(instance.animation_vertical) + + local vertical_slider = properties_panel:add_slider("ui_animation_vertical", vertical_time, function(value) + panthera.set_time(instance.animation_vertical, "vertical", value) + end) + + local horizontal_time = panthera.get_time(instance.animation_horizontal) + + local horizontal_slider = properties_panel:add_slider("ui_animation_horizontal", horizontal_time, function(value) + panthera.set_time(instance.animation_horizontal, "horizontal", value) + end) + + instance.on_update:subscribe(function() + vertical_slider:set_value(panthera.get_time(instance.animation_vertical)) + horizontal_slider:set_value(panthera.get_time(instance.animation_horizontal)) + end) + end, + } + } +end + +return M \ No newline at end of file diff --git a/example/examples/rich_text/rich_text_texts/prefab_example_rich_text.gui b/example/examples/rich_text/rich_text_texts/prefab_example_rich_text.gui deleted file mode 100644 index aa377e32..00000000 --- a/example/examples/rich_text/rich_text_texts/prefab_example_rich_text.gui +++ /dev/null @@ -1,72 +0,0 @@ -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -nodes { - size { - x: 600.0 - y: 200.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "root" - pivot: PIVOT_N - inherit_alpha: true - visible: false -} -nodes { - scale { - x: 0.8 - y: 0.8 - } - size { - x: 750.0 - y: 100.0 - } - color { - z: 0.9411765 - } - type: TYPE_TEXT - text: "Here is simple example with text" - font: "game" - id: "hint" - pivot: PIVOT_N - outline { - x: 0.101960786 - y: 0.101960786 - z: 0.101960786 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - } - line_break: true - parent: "root" - inherit_alpha: true - outline_alpha: 0.7 - shadow_alpha: 0.0 -} -nodes { - position { - y: -60.0 - } - size { - x: 600.0 - y: 130.0 - } - color { - z: 0.9411765 - } - type: TYPE_BOX - id: "area" - pivot: PIVOT_N - parent: "root" - inherit_alpha: true -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/rich_text/rich_text_texts/rich_text_texts.collection b/example/examples/rich_text/rich_text_texts/rich_text_texts.collection deleted file mode 100644 index 6ecfc0b4..00000000 --- a/example/examples/rich_text/rich_text_texts/rich_text_texts.collection +++ /dev/null @@ -1,39 +0,0 @@ -name: "rich_text_texts" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"rich_text_texts\"\n" - " component: \"/example/examples/rich_text/rich_text_texts/rich_text_texts.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - " property_decls {\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/rich_text/rich_text_texts/rich_text_texts.gui b/example/examples/rich_text/rich_text_texts/rich_text_texts.gui deleted file mode 100644 index 63541160..00000000 --- a/example/examples/rich_text/rich_text_texts/rich_text_texts.gui +++ /dev/null @@ -1,56 +0,0 @@ -script: "/example/examples/rich_text/rich_text_texts/rich_text_texts.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -fonts { - name: "game_thin" - font: "/example/assets/fonts/game_thin.font" -} -fonts { - name: "game_thin_italic" - font: "/example/assets/fonts/game_thin_italic.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -nodes { - position { - x: 300.0 - y: 415.0 - } - size { - x: 600.0 - y: 830.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "root" - inherit_alpha: true -} -nodes { - position { - y: 415.0 - } - size { - x: 600.0 - y: 1200.0 - } - type: TYPE_BOX - texture: "kenney/empty" - id: "content" - pivot: PIVOT_N - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" - inherit_alpha: true - visible: false -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/rich_text/rich_text_texts/rich_text_texts.gui_script b/example/examples/rich_text/rich_text_texts/rich_text_texts.gui_script deleted file mode 100644 index 29122991..00000000 --- a/example/examples/rich_text/rich_text_texts/rich_text_texts.gui_script +++ /dev/null @@ -1,47 +0,0 @@ -local druid = require("druid.druid") - -local RichText = require("druid.custom.rich_text.rich_text") - - -function init(self) - self.druid = druid.new(self) - self.druid:new_scroll("root", "content") - - self.rich_text_1 = self.druid:new(RichText, "case1/rich_text") - self.rich_text_1:set_text("Here is basic Rich Text without any text settings") - - self.rich_text_2 = self.druid:new(RichText, "case2/rich_text") - self.rich_text_2:set_text("Here is color example for Rich Text. You can adjust the color, shadow or outline") - - self.rich_text_3 = self.druid:new(RichText, "case3/rich_text") - self.rich_text_3:set_text("Here font change example. Can be usedfor bold and italic fonts or other one") - - self.rich_text_4 = self.druid:new(RichText, "case4/rich_text") - self.rich_text_4:set_text("Hello! Here are new line
    and this long text will be without any new line until nobr is end he
    re text with br too") - - self.rich_text_5 = self.druid:new(RichText, "case5/rich_text") - self.rich_text_5:set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.") - - self.rich_text_6 = self.druid:new(RichText, "case6/rich_text") - self.rich_text_6:set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.") -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/system/inner_templates/inner_button.lua b/example/examples/system/inner_templates/inner_button.lua deleted file mode 100644 index 644152c3..00000000 --- a/example/examples/system/inner_templates/inner_button.lua +++ /dev/null @@ -1,25 +0,0 @@ -local component = require("druid.component") - ----@class inner_button : druid.base_component -local InnerButton = component.create("inner_button") - -local SCHEME = { - ROOT = "root", - BUTTON = "button", - TEXT = "text", -} - - -function InnerButton:init(template, nodes) - self:set_template(template) - self:set_nodes(nodes) - self.root = self:get_node(SCHEME.ROOT) - self.druid = self:get_druid() - - local value = math.random(0, 99) - self.button = self.druid:new_button(SCHEME.BUTTON, function() print(value) end) - self.text = self.druid:new_text(SCHEME.TEXT, value) -end - - -return InnerButton diff --git a/example/examples/system/inner_templates/inner_panel.gui b/example/examples/system/inner_templates/inner_panel.gui deleted file mode 100644 index 7ee8b412..00000000 --- a/example/examples/system/inner_templates/inner_panel.gui +++ /dev/null @@ -1,762 +0,0 @@ -script: "" -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 270.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/back_red" - id: "background" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_button_1" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_button_1/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_1" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_button_1/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_1/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_button_1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_button_1/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_button_2" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_button_2/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_2" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_button_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_2/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_button_2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_button_2/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_button_prefab" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_button_prefab/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_prefab" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_button_prefab/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_button_prefab/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_button_prefab/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_button_prefab/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/system/inner_templates/inner_panel.lua b/example/examples/system/inner_templates/inner_panel.lua deleted file mode 100644 index 85895da5..00000000 --- a/example/examples/system/inner_templates/inner_panel.lua +++ /dev/null @@ -1,39 +0,0 @@ -local component = require("druid.component") - -local InnerButton = require("example.examples.system.inner_templates.inner_button") - ----@class inner_panel : druid.base_component -local InnerPanel = component.create("inner_panel") - -local SCHEME = { - ROOT = "root", - BACKGROUND = "background", - INNER_BUTTON_1 = "inner_button_1", - INNER_BUTTON_2 = "inner_button_2", - INNER_BUTTON_PREFAB = "inner_button_prefab", - INNER_BUTTON_PREFAB_ROOT = "inner_button_prefab/root", -} - - -function InnerPanel:init(template, nodes) - self:set_template(template) - self:set_nodes(nodes) - self.root = self:get_node(SCHEME.ROOT) - self.druid = self:get_druid() - - self.button1 = self.druid:new(InnerButton, SCHEME.INNER_BUTTON_1, nodes) - self.button2 = self.druid:new(InnerButton, SCHEME.INNER_BUTTON_2, nodes) - - local prefab = self:get_node(SCHEME.INNER_BUTTON_PREFAB_ROOT) - local button_nodes = gui.clone_tree(prefab) - self.button3 = self.druid:new(InnerButton, SCHEME.INNER_BUTTON_PREFAB, button_nodes) - - gui.set_enabled(prefab, false) -end - - -function InnerPanel:on_remove() -end - - -return InnerPanel diff --git a/example/examples/system/inner_templates/inner_templates.collection b/example/examples/system/inner_templates/inner_templates.collection deleted file mode 100644 index 920c807d..00000000 --- a/example/examples/system/inner_templates/inner_templates.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "inner_templates" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"inner_templates\"\n" - " component: \"/example/examples/system/inner_templates/inner_templates.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/system/inner_templates/inner_templates.gui b/example/examples/system/inner_templates/inner_templates.gui deleted file mode 100644 index 8bbd35eb..00000000 --- a/example/examples/system/inner_templates/inner_templates.gui +++ /dev/null @@ -1,1011 +0,0 @@ -script: "/example/examples/system/inner_templates/inner_templates.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: -125.0 - y: 150.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_panel" - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_panel.gui" - template_node_child: false - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_panel/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 270.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/back_red" - id: "inner_panel/background" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_panel/inner_button_1" - parent: "inner_panel/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: true - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_panel/inner_button_1/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_1" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_panel/inner_button_1/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_1/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_panel/inner_button_1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_panel/inner_button_1/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_panel/inner_button_2" - parent: "inner_panel/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: true - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_panel/inner_button_2/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_2" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_panel/inner_button_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_2/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_panel/inner_button_2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_panel/inner_button_2/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: -80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "inner_panel/inner_button_prefab" - parent: "inner_panel/root" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/examples/system/inner_templates/inner_button.gui" - template_node_child: true - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "inner_panel/inner_button_prefab/root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_prefab" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_AUTO - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 49.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "inner_panel/inner_button_prefab/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "inner_panel/inner_button_prefab/root" - layer: "" - inherit_alpha: true - slice9 { - x: 15.0 - y: 0.0 - z: 15.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 4.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 230.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Some text" - font: "game" - id: "inner_panel/inner_button_prefab/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "inner_panel/inner_button_prefab/button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: -125.0 - y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Template from scene" - font: "game" - id: "text_hint_1" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 125.0 - y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 400.0 - y: 40.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Template from gui.clone_tree" - font: "game" - id: "text_hint_2" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/system/inner_templates/inner_templates.gui_script b/example/examples/system/inner_templates/inner_templates.gui_script deleted file mode 100644 index b8c65327..00000000 --- a/example/examples/system/inner_templates/inner_templates.gui_script +++ /dev/null @@ -1,38 +0,0 @@ -local druid = require("druid.druid") - -local InnerPanel = require("example.examples.system.inner_templates.inner_panel") - -function init(self) - self.druid = druid.new(self) - local root = gui.get_node("inner_panel/root") - - local nodes = gui.clone_tree(root) - self.inner_panel_2 = self.druid:new(InnerPanel, "inner_panel", nodes) - gui.set_position(self.inner_panel_2.root, vmath.vector3(125, 150, 0)) - - local nodes3 = gui.clone_tree(root) - self.inner_panel_3 = self.druid:new(InnerPanel, "inner_panel", nodes3) - gui.set_position(self.inner_panel_3.root, vmath.vector3(125, -150, 0)) - - self.inner_panel = self.druid:new(InnerPanel, "inner_panel") -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/system/late_init_check/late_init_check.gui_script b/example/examples/system/late_init_check/late_init_check.gui_script deleted file mode 100644 index 28200298..00000000 --- a/example/examples/system/late_init_check/late_init_check.gui_script +++ /dev/null @@ -1,46 +0,0 @@ -local druid = require("druid.druid") - - -local function create_button(self, index) - local cloned = gui.clone_tree(self.prefab) - local root = cloned["prefab_button/button"] - self.grid:add(root) - gui.set_enabled(root, true) - - local button = self.druid:new_button(root, function() - print("Created button with timer delay:", index) - end) - -- Override to check calls, don't do it in production ;) - button.on_late_init = function() - print("Late init button check", index) - end - - print("Button created, is input inited now?", self.druid.input_inited) -end - - -function init(self) - self.druid = druid.new(self) - - self.prefab = gui.get_node("prefab_button/button") - gui.set_enabled(self.prefab, false) - - self.grid = self.druid:new_static_grid("grid", self.prefab, 1) - - create_button(self, 0) - for index = 1, 4 do - timer.delay(index, false, function() - create_button(self, index) - end) - end -end - - -function final(self) - self.druid:final() -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/system/message_input/message_input.collection b/example/examples/system/message_input/message_input.collection deleted file mode 100644 index 8e223c6b..00000000 --- a/example/examples/system/message_input/message_input.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "message_input" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"message_input\"\n" - " component: \"/example/examples/system/message_input/message_input.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/system/message_input/message_input.gui b/example/examples/system/message_input/message_input.gui deleted file mode 100644 index cf05adfd..00000000 --- a/example/examples/system/message_input/message_input.gui +++ /dev/null @@ -1,1335 +0,0 @@ -script: "/example/examples/system/message_input/message_input.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Message Input:" - font: "game" - id: "text_message_input" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 250.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -100.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_test" - parent: "info_button" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_test/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_test" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Button" - font: "game" - id: "button_test/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_test/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 100.0 - y: 6.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.8 - y: 0.8 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Value: 0" - font: "game" - id: "text_random" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_button" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Send input message" - font: "game" - id: "text_input_message" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_blacklist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -100.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_trigger_click" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_trigger_click/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_trigger_click" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Click" - font: "game" - id: "button_trigger_click/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_trigger_click/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -100.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_trigger_double" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_trigger_double/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_trigger_double" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.5 - y: 0.5 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Double click" - font: "game" - id: "button_trigger_double/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_trigger_double/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -100.0 - y: -200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_trigger_long" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_trigger_long/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_trigger_long" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.6 - y: 0.6 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Long click" - font: "game" - id: "button_trigger_long/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_trigger_long/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 3 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -100.0 - y: -300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_trigger_repeated" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_trigger_repeated/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_trigger_repeated" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Repeated" - font: "game" - id: "button_trigger_repeated/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_trigger_repeated/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 100.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_text_random" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "button_text_random/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_text_random" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - overridden_fields: 9 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Set Text" - font: "game" - id: "button_text_random/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.3019608 - z: 0.3019608 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_text_random/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - overridden_fields: 16 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/system/message_input/message_input.gui_script b/example/examples/system/message_input/message_input.gui_script deleted file mode 100644 index 96203be6..00000000 --- a/example/examples/system/message_input/message_input.gui_script +++ /dev/null @@ -1,76 +0,0 @@ -local druid = require("druid.druid") -local const = require("druid.const") - - -local function click_callback(self, text, some) - print("Button tap callback:", text, some) -end - - -local function trigger_callback(self, params) - msg.post(".", const.ON_MESSAGE_INPUT, params) -end - - -local function set_random_text_callback(self, params) - params.value = "Value: " .. math.random(0, 99) - - trigger_callback(self, params) -end - - -function init(self) - self.druid = druid.new(self) - - self.button_test = self.druid:new_button("button_test/button", click_callback) - self.button_test.on_long_click:subscribe(function() print("long click") end) - self.button_test.on_double_click:subscribe(function() print("double click") end) - self.button_test.on_repeated_click:subscribe(function() print("repeated_click") end) - - self.druid:new_text("text_random") - - self.druid:new_button("button_trigger_click/button", trigger_callback, { - node_id = "button_test/button", - action = const.MESSAGE_INPUT.BUTTON_CLICK - }) - - self.druid:new_button("button_trigger_double/button", trigger_callback, { - node_id = "button_test/button", - action = const.MESSAGE_INPUT.BUTTON_DOUBLE_CLICK - }) - - self.druid:new_button("button_trigger_long/button", trigger_callback, { - node_id = "button_test/button", - action = const.MESSAGE_INPUT.BUTTON_LONG_CLICK - }) - - self.druid:new_button("button_trigger_repeated/button", trigger_callback, { - node_id = "button_test/button", - action = const.MESSAGE_INPUT.BUTTON_REPEATED_CLICK - }) - - self.druid:new_button("button_text_random/button", set_random_text_callback, { - node_id = "text_random", - action = const.MESSAGE_INPUT.TEXT_SET - }) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/system/whitelist_blacklist/whitelist_blacklist.collection b/example/examples/system/whitelist_blacklist/whitelist_blacklist.collection deleted file mode 100644 index fa06cb5f..00000000 --- a/example/examples/system/whitelist_blacklist/whitelist_blacklist.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "whitelist_blacklist" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"whitelist_blacklist\"\n" - " component: \"/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui b/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui deleted file mode 100644 index ff36a944..00000000 --- a/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui +++ /dev/null @@ -1,1864 +0,0 @@ -script: "/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 350.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Whitelist first button" - font: "game" - id: "text_whitelist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 250.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_whitelist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_whitelist_1" - parent: "info_whitelist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_whitelist_1/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_whitelist_1" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Left" - font: "game" - id: "button_whitelist_1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_whitelist_1/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_whitelist_2" - parent: "info_whitelist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_whitelist_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_whitelist_2" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Middle" - font: "game" - id: "button_whitelist_2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_whitelist_2/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_whitelist_3" - parent: "info_whitelist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_whitelist_3/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_whitelist_3" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Right" - font: "game" - id: "button_whitelist_3/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_whitelist_3/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Blacklist first button" - font: "game" - id: "text_blacklist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_blacklist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_blacklist_1" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_blacklist_1/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_blacklist_1" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Left" - font: "game" - id: "button_blacklist_1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_blacklist_1/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_blacklist_2" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_blacklist_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_blacklist_2" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Middle\n" - "" - font: "game" - id: "button_blacklist_2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_blacklist_2/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_blacklist_3" - parent: "info_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_blacklist_3/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_blacklist_3" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Right" - font: "game" - id: "button_blacklist_3/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_blacklist_3/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -150.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 500.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Whitelist and Blacklist first" - font: "game" - id: "text_whitelist_blacklist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -250.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_whitelist_blacklist" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: -180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_wb_1" - parent: "info_whitelist_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_wb_1/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_wb_1" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Left" - font: "game" - id: "button_wb_1/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_wb_1/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_wb_2" - parent: "info_whitelist_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_wb_2/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_wb_2" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Middle" - font: "game" - id: "button_wb_2/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_wb_2/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 180.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEMPLATE - id: "button_wb_3" - parent: "info_whitelist_blacklist" - layer: "" - inherit_alpha: true - alpha: 1.0 - template: "/example/templates/button.gui" - template_node_child: false -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 130.0 - y: 60.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_wb_3/button" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "button_wb_3" - layer: "image" - inherit_alpha: true - slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 7.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Right" - font: "game" - id: "button_wb_3/text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_wb_3/button" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui_script b/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui_script deleted file mode 100644 index e17c9c99..00000000 --- a/example/examples/system/whitelist_blacklist/whitelist_blacklist.gui_script +++ /dev/null @@ -1,66 +0,0 @@ -local druid = require("druid.druid") - - -local function click_callback(self) - print("Just tap callback") -end - - -function init(self) - self.druid_whitelist = druid.new(self) - - -- Whitelist - self.button_wl_left = self.druid_whitelist:new_button("button_whitelist_1/button", click_callback) - self.button_wl_middle = self.druid_whitelist:new_button("button_whitelist_2/button", click_callback) - self.button_wl_right = self.druid_whitelist:new_button("button_whitelist_3/button", click_callback) - self.druid_whitelist:set_whitelist(self.button_wl_left) - - - self.druid_blacklist = druid.new(self) - - -- Blacklist - self.button_bl_left = self.druid_blacklist:new_button("button_blacklist_1/button", click_callback) - self.button_bl_middle = self.druid_blacklist:new_button("button_blacklist_2/button", click_callback) - self.button_bl_right = self.druid_blacklist:new_button("button_blacklist_3/button", click_callback) - self.druid_blacklist:set_blacklist(self.button_bl_left) - - - self.druid_wb = druid.new(self) - - -- Blacklist and Whitelist - self.button_wb_left = self.druid_wb:new_button("button_wb_1/button", click_callback) - self.button_wb_middle = self.druid_wb:new_button("button_wb_2/button", click_callback) - self.button_wb_right = self.druid_wb:new_button("button_wb_3/button", click_callback) - self.druid_wb:set_whitelist(self.button_wb_left) - self.druid_wb:set_blacklist(self.button_wb_left) -end - - -function final(self) - self.druid_whitelist:final() - self.druid_blacklist:final() - self.druid_wb:final() -end - - -function update(self, dt) - self.druid_whitelist:update(dt) - self.druid_blacklist:update(dt) - self.druid_wb:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid_whitelist:on_message(message_id, message, sender) - self.druid_blacklist:on_message(message_id, message, sender) - self.druid_wb:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - local result_1 = self.druid_whitelist:on_input(action_id, action) - local result_2 = self.druid_blacklist:on_input(action_id, action) - local result_3 = self.druid_wb:on_input(action_id, action) - - return result_1 or result_2 or result_3 -end diff --git a/example/examples/template/template.collection b/example/examples/template/template.collection deleted file mode 100644 index e5037cfc..00000000 --- a/example/examples/template/template.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "template" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"template\"\n" - " component: \"/example/examples/template/template.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/template/template.gui_script b/example/examples/template/template.gui_script deleted file mode 100644 index 91f9d3f4..00000000 --- a/example/examples/template/template.gui_script +++ /dev/null @@ -1,26 +0,0 @@ -local druid = require("druid.druid") - - -function init(self) - self.druid = druid.new(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/texts/lang_text/lang_text.collection b/example/examples/texts/lang_text/lang_text.collection deleted file mode 100644 index aec17389..00000000 --- a/example/examples/texts/lang_text/lang_text.collection +++ /dev/null @@ -1,39 +0,0 @@ -name: "lang_text" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"lang_text\"\n" - " component: \"/example/examples/texts/lang_text/lang_text.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - " property_decls {\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/texts/lang_text/lang_text.gui_script b/example/examples/texts/lang_text/lang_text.gui_script deleted file mode 100644 index f62a95f5..00000000 --- a/example/examples/texts/lang_text/lang_text.gui_script +++ /dev/null @@ -1,50 +0,0 @@ -local druid = require("druid.druid") -local druid_const = require("druid.const") -local lang = require("example.lang") - - -local function refresh_lang_text(self) - self.text_current:format(lang.get_locale("ui_lang")) -end - - -function init(self) - self.druid = druid.new(self) - - self.text_current = self.druid:new_lang_text("text_current_lang", "ui_current_lang") - self.text_example_1 = self.druid:new_lang_text("text_example_1", "ui_example_1") - self.text_example_2 = self.druid:new_lang_text("text_example_2", "ui_example_2") - self.text_example_3 = self.druid:new_lang_text("text_example_3", "ui_example_3") - self.text_example_3:format(10, 20, 30) - - refresh_lang_text(self) - - self.current_lang = lang.get_locale() - self.druid:new_button("button_change_lang/button", lang.toggle_locale) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - -- If we have localized text in text formatting, we should update it manually - -- If we have non localized text, the lang_text:format or :translate will update text manually again - if message_id == hash(druid_const.ON_LANGUAGE_CHANGE) then - refresh_lang_text(self) - end - - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/texts/texts_adjust/texts_adjust.collection b/example/examples/texts/texts_adjust/texts_adjust.collection deleted file mode 100644 index f78b5bf5..00000000 --- a/example/examples/texts/texts_adjust/texts_adjust.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "texts_adjust" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"texts_adjust\"\n" - " component: \"/example/examples/texts/texts_adjust/texts_adjust.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/texts/texts_adjust/texts_adjust.gui b/example/examples/texts/texts_adjust/texts_adjust.gui deleted file mode 100644 index df40a37e..00000000 --- a/example/examples/texts/texts_adjust/texts_adjust.gui +++ /dev/null @@ -1,1109 +0,0 @@ -script: "/example/examples/texts/texts_adjust/texts_adjust.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 160.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_texts" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 2000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.9019608 - z: 0.6 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "text_width" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_texts" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 0.0 - y: 300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "I\'m text with scale adjust" - font: "game" - id: "text_scale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "I trim all text, what is outside of my zone" - font: "game" - id: "text_trim" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "This text is without any adjust, like simple Text node" - font: "game" - id: "text_no_adjust" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "I have limit to downscale, when like no adjust" - font: "game" - id: "text_scale_limited" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 0.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 300.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "stencil_for_text_scroll" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_texts" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_STENCIL - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -125.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "This text scroll horizontally, when size is bigger of defined" - font: "game" - id: "text_scroll" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "stencil_for_text_scroll" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "I\'m first downscale, then scroll behaviour" - font: "game" - id: "text_scroll_scale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "stencil_for_text_scroll" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -160.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 1.0 - y: 1.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "info_texts_types" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_AUTO -} -nodes { - position { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 2000.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 0.7019608 - z: 0.6 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "background_color_text" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "info_texts_types" - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -125.0 - y: 300.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Scale (default):" - font: "game" - id: "text_type_scale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: 200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Trim:" - font: "game" - id: "text_type_trim" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "No adjust:" - font: "game" - id: "text_type_no_adjust" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Scale limited:" - font: "game" - id: "text_type_scale_limited" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: -100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Scroll:" - font: "game" - id: "text_type_scroll" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -125.0 - y: -200.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.75 - y: 0.75 - z: 1.0 - w: 1.0 - } - size { - x: 250.0 - y: 80.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Scroll then scale:" - font: "game" - id: "text_type_scroll_scale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "info_texts_types" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/texts/texts_adjust/texts_adjust.gui_script b/example/examples/texts/texts_adjust/texts_adjust.gui_script deleted file mode 100644 index d72b7301..00000000 --- a/example/examples/texts/texts_adjust/texts_adjust.gui_script +++ /dev/null @@ -1,59 +0,0 @@ -local druid = require("druid.druid") -local const = require("druid.const") - - -function init(self) - self.druid = druid.new(self) - - self.texts = { - self.druid:new_text("text_scale", nil, const.TEXT_ADJUST.DOWNSCALE), - self.druid:new_text("text_trim", nil, const.TEXT_ADJUST.TRIM), - self.druid:new_text("text_no_adjust", nil, const.TEXT_ADJUST.NO_ADJUST), - self.druid:new_text("text_scale_limited", nil, const.TEXT_ADJUST.DOWNSCALE_LIMITED) - :set_minimal_scale(0.5), - self.druid:new_text("text_scroll", nil, const.TEXT_ADJUST.SCROLL), - self.druid:new_text("text_scroll_scale", nil, const.TEXT_ADJUST.SCALE_THEN_SCROLL) - :set_minimal_scale(0.5) - } - - local initial_texts = {} - local text_sizes = {} - for _, text in pairs(self.texts) do - initial_texts[text] = text.last_value - text_sizes[text] = 0 - end - - - timer.delay(0.25, true, function() - for _, text in pairs(self.texts) do - local text_string = string.sub(initial_texts[text], 1, text_sizes[text]) - text_sizes[text] = text_sizes[text] + 1 - - if text_sizes[text] > #initial_texts[text] then - text_sizes[text] = 0 - end - - text:set_to(text_string) - end - end) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/texts/texts_general/texts_general.collection b/example/examples/texts/texts_general/texts_general.collection deleted file mode 100644 index d42582bb..00000000 --- a/example/examples/texts/texts_general/texts_general.collection +++ /dev/null @@ -1,37 +0,0 @@ -name: "texts" -scale_along_z: 0 -embedded_instances { - id: "go" - data: "components {\n" - " id: \"texts\"\n" - " component: \"/example/examples/texts/texts_general/texts_general.gui\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" - "}\n" - "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } -} diff --git a/example/examples/texts/texts_general/texts_general.gui b/example/examples/texts/texts_general/texts_general.gui deleted file mode 100644 index 8f5cc193..00000000 --- a/example/examples/texts/texts_general/texts_general.gui +++ /dev/null @@ -1,1070 +0,0 @@ -script: "/example/examples/texts/texts_general/texts_general.gui_script" -fonts { - name: "game" - font: "/example/assets/fonts/game.font" -} -textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" -} -background_color { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 -} -nodes { - position { - x: 300.0 - y: 415.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 600.0 - y: 830.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "root" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - layer: "" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -250.0 - y: -80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Locale:" - font: "game" - id: "locale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.7019608 - y: 0.8 - z: 1.0 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "anchoring_zone_visual" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 1.0 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: -250.0 - y: 10.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "No adjust:" - font: "game" - id: "no_adjust" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -250.0 - y: -260.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Max height:" - font: "game" - id: "max_height" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: 280.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Simple inline text" - font: "game" - id: "text_inline" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -250.0 - y: -170.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Max Width:" - font: "game" - id: "max_width" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -250.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Anchoring:" - font: "game" - id: "anchoring" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: 190.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Simple multiline text with smth" - font: "game" - id: "text_multiline" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: -260.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 0.7019608 - y: 0.7019608 - z: 0.7019608 - w: 1.0 - } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "text_max_height_visual" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" - inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false - alpha: 0.7 - template_node_child: false - size_mode: SIZE_MODE_MANUAL -} -nodes { - position { - x: 150.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Anchoring" - font: "game" - id: "text_anchoring" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: -170.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Max Width:" - font: "game" - id: "text_max_width" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: 10.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "No adjust:" - font: "game" - id: "text_no_adjust" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: -80.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Locale:" - font: "game" - id: "text_locale" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: 150.0 - y: -260.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 300.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Max height:" - font: "game" - id: "text_max_height" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -250.0 - y: 280.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Inline:" - font: "game" - id: "inline" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -250.0 - y: 190.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.7 - y: 0.7 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Multiline:" - font: "game" - id: "multiline" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_W - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "root" - layer: "text" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -layers { - name: "image" -} -layers { - name: "text" -} -material: "/builtins/materials/gui.material" -adjust_reference: ADJUST_REFERENCE_PARENT -max_nodes: 512 diff --git a/example/examples/texts/texts_general/texts_general.gui_script b/example/examples/texts/texts_general/texts_general.gui_script deleted file mode 100644 index 495a956b..00000000 --- a/example/examples/texts/texts_general/texts_general.gui_script +++ /dev/null @@ -1,73 +0,0 @@ -local druid = require("druid.druid") -local const = require("druid.const") - -local pivots = { - gui.PIVOT_CENTER, - gui.PIVOT_N, - gui.PIVOT_NE, - gui.PIVOT_E, - gui.PIVOT_SE, - gui.PIVOT_S, - gui.PIVOT_SW, - gui.PIVOT_W, - gui.PIVOT_NW -} - - -local function setup_texts(self) - self.druid:new_text("text_inline") - self.druid:new_text("text_multiline") - local anchoring = self.druid:new_text("text_anchoring") - self.druid:new_text("text_no_adjust", "Without adjust size", const.TEXT_ADJUST.NO_ADJUST) - self.druid:new_lang_text("text_locale", "ui_text_example") - - local big_text = "Check max size" - local width = self.druid:new_text("text_max_width", big_text) - local height = self.druid:new_text("text_max_height", big_text) - - local pivot_index = 1 - timer.delay(0.3, true, function() - anchoring:set_pivot(pivots[pivot_index]) - - pivot_index = pivot_index + 1 - if pivot_index > #pivots then - pivot_index = 1 - end - end) - - timer.delay(0.3, true, function() - big_text = big_text .. " m a x" - width:set_to(big_text) - height:set_to(big_text) - - if #big_text > 120 then - big_text = "Check max size" - end - end) -end - - -function init(self) - self.druid = druid.new(self) - setup_texts(self) -end - - -function final(self) - self.druid:final() -end - - -function update(self, dt) - self.druid:update(dt) -end - - -function on_message(self, message_id, message, sender) - self.druid:on_message(message_id, message, sender) -end - - -function on_input(self, action_id, action) - return self.druid:on_input(action_id, action) -end diff --git a/example/examples/windows/examples_list.lua b/example/examples/windows/examples_list.lua new file mode 100644 index 00000000..d4efb1d2 --- /dev/null +++ b/example/examples/windows/examples_list.lua @@ -0,0 +1,66 @@ +local M = {} + +---@return druid.example.data[] +function M.get_examples() + ---@type druid.example.data[] + return { + { + name_id = "ui_example_window_language", + template = "window_language", + root = "window_language/root", + code_url = "example/examples/windows/window_language/window_language.lua", + component_class = require("example.examples.windows.window_language.window_language"), + on_create = function(instance, output_list) + ---@cast instance window_language + instance.on_language_change:subscribe(function(language) + output_list:add_log_text("Language changed to " .. language) + end) + end + }, + { + name_id = "ui_example_window_confirmation", + template = "window_confirmation", + root = "window_confirmation/root", + information_text_id = "ui_example_window_language_description", + code_url = "example/examples/windows/window_confirmation/window_confirmation.lua", + component_class = require("example.examples.windows.window_confirmation.window_confirmation"), + on_create = function(instance, output_list) + ---@cast instance window_confirmation + instance.text_header:translate("ui_confirmation") + instance.text_button_accept:translate("ui_confirm") + instance.text_button_decline:translate("ui_cancel") + instance.text_description:translate("ui_confirmation_description") + + instance.button_accept.on_click:subscribe(function() + output_list:add_log_text("Confirmation Accepted") + end) + instance.button_decline.on_click:subscribe(function() + output_list:add_log_text("Confirmation Declined") + end) + end, + get_debug_info = function(instance) + return "Any info we want" + end + }, + { + name_id = "ui_example_window_information", + template = "window_info", + root = "window_info/root", + information_text_id = "ui_example_window_information_description", + code_url = "example/examples/windows/window_info/window_info.lua", + component_class = require("example.examples.windows.window_info.window_info"), + on_create = function(instance, output_list) + ---@cast instance window_info + instance.text_header:translate("ui_information") + instance.text_button_accept:translate("ui_confirm") + instance.text_description:translate("ui_example_window_information_text") + + instance.button_accept.on_click:subscribe(function() + output_list:add_log_text("Information Accepted") + end) + end + } + } +end + +return M \ No newline at end of file diff --git a/example/examples/windows/window_animation_panthera.lua b/example/examples/windows/window_animation_panthera.lua new file mode 100644 index 00000000..ea4bad6c --- /dev/null +++ b/example/examples/windows/window_animation_panthera.lua @@ -0,0 +1,176 @@ +return { + version = 1, + format = "json", + data = { + nodes = { + }, + metadata = { + fps = 60, + gizmo_steps = { + }, + gui_path = "/example/examples/windows/window_language/window_language.gui", + layers = { + { + name = "druid", + color = "73E84C", + }, + { + name = "text_bold", + color = "90D2F6", + }, + }, + settings = { + font_size = 40, + }, + }, + animations = { + { + animation_id = "open", + animation_keys = { + { + start_value = 1, + node_id = "content", + easing = "outsine", + property_id = "color_a", + key_type = "tween", + }, + { + start_value = 1, + node_id = "root", + easing = "outsine", + property_id = "color_a", + key_type = "tween", + }, + { + start_value = 1, + node_id = "root", + easing = "outsine", + property_id = "scale_x", + key_type = "tween", + }, + { + start_value = 1, + node_id = "root", + easing = "outsine", + property_id = "scale_y", + key_type = "tween", + }, + { + start_value = 1, + end_value = 1, + node_id = "button_close", + easing = "outsine", + property_id = "color_a", + key_type = "tween", + }, + { + end_value = 5, + node_id = "root", + easing = "outsine", + property_id = "rotation_z", + key_type = "tween", + }, + { + end_value = 1, + property_id = "color_a", + node_id = "root", + easing = "outsine", + duration = 0.3, + key_type = "tween", + }, + { + end_value = 1, + property_id = "scale_x", + node_id = "root", + easing = "outsine", + duration = 0.3, + key_type = "tween", + }, + { + end_value = 1, + property_id = "scale_y", + node_id = "root", + easing = "outsine", + duration = 0.3, + key_type = "tween", + }, + { + start_value = 5, + property_id = "rotation_z", + node_id = "root", + easing = "outback", + duration = 0.5, + key_type = "tween", + }, + { + end_value = 1, + duration = 0.25, + property_id = "color_a", + node_id = "content", + easing = "outsine", + start_time = 0.15, + key_type = "tween", + }, + }, + duration = 1, + }, + { + animation_id = "close", + animation_keys = { + { + start_value = 1, + property_id = "color_a", + node_id = "button_close", + easing = "outsine", + duration = 0.15, + key_type = "tween", + }, + { + start_value = 1, + property_id = "color_a", + node_id = "content", + easing = "outsine", + duration = 0.15, + key_type = "tween", + }, + { + end_value = -5, + property_id = "rotation_z", + node_id = "root", + easing = "insine", + duration = 0.3, + key_type = "tween", + }, + { + start_value = 1, + property_id = "color_a", + node_id = "root", + easing = "insine", + duration = 0.3, + key_type = "tween", + }, + { + start_value = 1, + end_value = 0.1, + property_id = "scale_x", + node_id = "root", + easing = "inback", + duration = 0.3, + key_type = "tween", + }, + { + start_value = 1, + end_value = 0.1, + property_id = "scale_y", + node_id = "root", + easing = "inback", + duration = 0.3, + key_type = "tween", + }, + }, + duration = 1, + }, + }, + }, + type = "animation_editor", +} \ No newline at end of file diff --git a/example/examples/data_list/manage_data/manage_data.collection b/example/examples/windows/window_confirmation/window_confirmation.collection similarity index 74% rename from example/examples/data_list/manage_data/manage_data.collection rename to example/examples/windows/window_confirmation/window_confirmation.collection index b783bf92..6017d36d 100644 --- a/example/examples/data_list/manage_data/manage_data.collection +++ b/example/examples/windows/window_confirmation/window_confirmation.collection @@ -1,10 +1,10 @@ -name: "data_list_manage_data" +name: "window_confirmation" scale_along_z: 0 embedded_instances { id: "go" data: "components {\n" - " id: \"data_list_manage_data\"\n" - " component: \"/example/examples/data_list/manage_data/manage_data.gui\"\n" + " id: \"window_confirmation\"\n" + " component: \"/example/examples/windows/window_confirmation/window_confirmation.gui\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" diff --git a/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui b/example/examples/windows/window_confirmation/window_confirmation.gui similarity index 69% rename from example/examples/data_list/add_remove_nodes/add_remove_nodes.gui rename to example/examples/windows/window_confirmation/window_confirmation.gui index b5809901..27ed7fca 100644 --- a/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui +++ b/example/examples/windows/window_confirmation/window_confirmation.gui @@ -1,11 +1,11 @@ -script: "/example/examples/data_list/add_remove_nodes/add_remove_nodes.gui_script" +script: "/example/examples/windows/window_confirmation/window_confirmation.gui_script" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 960.0 + y: 540.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 700.0 + y: 500.0 z: 0.0 w: 1.0 } @@ -46,19 +46,19 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT + adjust_mode: ADJUST_MODE_STRETCH layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -66,11 +66,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 370.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -81,60 +85,55 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { x: 700.0 - y: 60.0 + y: 500.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Add data to DataList\n" - "To remove element - click on it" - font: "game" - id: "text_hint_horizontal" + texture: "druid/ui_circle_32" + id: "window" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false parent: "root" layer: "" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -2.0 - y: 242.0 + x: 0.0 + y: 250.0 z: 0.0 w: 1.0 } @@ -151,33 +150,33 @@ nodes { w: 1.0 } size { - x: 400.0 - y: 100.0 + x: 700.0 + y: 92.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 1.0 + x: 0.902 + y: 0.875 + z: 0.624 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_simple" + texture: "druid/ui_rounded_top_32" + id: "panel_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "window" layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -185,11 +184,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -200.0 - y: -50.0 + x: 0.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -200,51 +203,63 @@ nodes { w: 1.0 } scale { - x: 1.0 - y: 1.0 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 400.0 - y: 100.0 + x: 300.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 0.8 - y: 1.0 - z: 0.8 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "" - id: "data_list_simple_content" + text: "Confirmation" + font: "text_bold" + id: "text_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "data_list_simple" + line_break: false + parent: "panel_header" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_MANUAL + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 450.0 - y: 300.0 + x: 300.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -261,8 +276,8 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 70.0 + x: 100.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -274,19 +289,19 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "prefab_square" + texture: "" + id: "button_close" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" - layer: "image" + parent: "panel_header" + layer: "" inherit_alpha: true slice9 { - x: 20.0 + x: 0.0 y: 0.0 - z: 20.0 + z: 0.0 w: 0.0 } clipping_mode: CLIPPING_MODE_NONE @@ -295,11 +310,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 4.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -310,99 +329,55 @@ nodes { w: 1.0 } scale { - x: 0.75 - y: 0.75 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 70.0 - y: 50.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "001" - font: "game" - id: "text_square" + texture: "druid/icon_cross" + id: "icon_close" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 0.3019608 - y: 0.4 - z: 0.8 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "prefab_square" - layer: "text" + parent: "button_close" + layer: "" inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 -} -nodes { - position { - x: -110.0 - y: 282.0 - z: 0.0 - w: 1.0 - } - rotation { + slice9 { x: 0.0 y: 0.0 z: 0.0 - w: 1.0 - } - scale { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - size { - x: 200.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 + w: 0.0 } - type: TYPE_TEMPLATE - id: "button_simple_add_first" - parent: "root" - layer: "" - inherit_alpha: true + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -45.0 z: 0.0 w: 1.0 } @@ -419,8 +394,8 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 700.0 + y: 400.0 z: 0.0 w: 1.0 } @@ -432,33 +407,36 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_add_first/button" + texture: "" + id: "content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_add_first" - layer: "image" + parent: "root" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 - template_node_child: true + template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 75.0 z: 0.0 w: 1.0 } @@ -469,29 +447,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 100.0 - y: 50.0 + x: 420.0 + y: 140.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add\n" - "First" - font: "game" - id: "button_simple_add_first/text" + text: "Do you agree with selected action?" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -502,30 +479,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_simple_add_first/button" - layer: "text" + line_break: true + parent: "content" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 - template_node_child: true - text_leading: 0.8 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: 282.0 + x: -160.0 + y: -100.0 z: 0.0 w: 1.0 } @@ -554,13 +532,15 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_simple_add_10" - parent: "root" + id: "button_accept" + parent: "content" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/button_text_green.gui" template_node_child: false + custom_type: 0 + enabled: true } nodes { position { @@ -582,46 +562,49 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.557 + y: 0.835 + z: 0.62 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_add_10/button" + texture: "druid/ui_circle_32" + id: "button_accept/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_add_10" - layer: "image" + parent: "button_accept" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -632,29 +615,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 5.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add\n" - "at 10" - font: "game" - id: "button_simple_add_10/text" + text: "Confirm" + font: "text_bold" + id: "button_accept/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -665,30 +647,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_simple_add_10/button" - layer: "text" + parent: "button_accept/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 + shadow_alpha: 0.0 template_node_child: true - text_leading: 0.8 + text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 110.0 - y: 282.0 + x: 160.0 + y: -100.0 z: 0.0 w: 1.0 } @@ -717,13 +700,15 @@ nodes { w: 1.0 } type: TYPE_TEMPLATE - id: "button_simple_add_last" - parent: "root" + id: "button_decline" + parent: "content" layer: "" inherit_alpha: true alpha: 1.0 - template: "/example/templates/button.gui" + template: "/example/templates/button_text_red.gui" template_node_child: false + custom_type: 0 + enabled: true } nodes { position { @@ -745,46 +730,49 @@ nodes { w: 1.0 } size { - x: 90.0 - y: 60.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.957 + y: 0.608 + z: 0.608 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_simple_add_last/button" + texture: "druid/ui_circle_32" + id: "button_decline/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_simple_add_last" - layer: "image" + parent: "button_decline" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - overridden_fields: 4 template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -795,29 +783,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 100.0 + x: 245.0 y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add\n" - "Last" - font: "game" - id: "button_simple_add_last/text" + text: "Cancel" + font: "text_bold" + id: "button_decline/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -828,31 +815,32 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_simple_add_last/button" - layer: "text" + parent: "button_decline/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 4 - overridden_fields: 8 - overridden_fields: 36 + shadow_alpha: 0.0 template_node_child: true - text_leading: 0.8 + text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_bold" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/windows/window_confirmation/window_confirmation.gui_script b/example/examples/windows/window_confirmation/window_confirmation.gui_script new file mode 100644 index 00000000..82f2b0cd --- /dev/null +++ b/example/examples/windows/window_confirmation/window_confirmation.gui_script @@ -0,0 +1,44 @@ +local lang = require("lang.lang") +local druid = require("druid.druid") + +local window_confirmation = require("example.examples.windows.window_confirmation.window_confirmation") + + +local function debug_stub(self) + if msg.url().socket ~= hash("window_confirmation") then + return + end + + lang.init() + druid.set_text_function(lang.txp) +end + + +function init(self) + debug_stub(self) + + -- Using component instead put all inside gui_script to + -- allow use it as example and as separate collection + self.druid = druid.new(self) + self.druid:new(window_confirmation) +end + + +function final(self) + self.druid:final() +end + + +function update(self, dt) + self.druid:update(dt) +end + + +function on_message(self, message_id, message, sender) + self.druid:on_message(message_id, message, sender) +end + + +function on_input(self, action_id, action) + return self.druid:on_input(action_id, action) +end \ No newline at end of file diff --git a/example/examples/windows/window_confirmation/window_confirmation.lua b/example/examples/windows/window_confirmation/window_confirmation.lua new file mode 100644 index 00000000..a59bcd9a --- /dev/null +++ b/example/examples/windows/window_confirmation/window_confirmation.lua @@ -0,0 +1,41 @@ +local component = require("druid.component") +local lang_text = require("druid.extended.lang_text") +local panthera = require("panthera.panthera") + +local window_animation_panthera = require("example.examples.windows.window_animation_panthera") + +---@class window_confirmation: druid.base_component +---@field druid druid_instance +---@field text_header druid.lang_text +---@field text_button_accept druid.lang_text +---@field text_button_decline druid.lang_text +---@field text_description druid.lang_text +---@field button_close druid.button +local M = component.create("window_confirmation") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.text_header = self.druid:new(lang_text, "text_header", "ui_confirmation") --[[@as druid.lang_text]] + self.text_button_accept = self.druid:new(lang_text, "button_accept/text", "ui_accept") --[[@as druid.lang_text]] + self.text_button_decline = self.druid:new(lang_text, "button_decline/text", "ui_decline") --[[@as druid.lang_text]] + self.text_description = self.druid:new(lang_text, "text") --[[@as druid.lang_text]] + + self.button_close = self.druid:new_button("button_close", self.on_button_close) + self.button_accept = self.druid:new_button("button_accept/root") + self.button_decline = self.druid:new_button("button_decline/root") + + self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), nodes) + panthera.play(self.animation, "open") +end + + +function M:on_button_close() + panthera.play(self.animation, "close") +end + + +return M diff --git a/example/examples/custom/rich_text/rich_text.collection b/example/examples/windows/window_info/window_info.collection similarity index 78% rename from example/examples/custom/rich_text/rich_text.collection rename to example/examples/windows/window_info/window_info.collection index 1a3756e9..67908210 100644 --- a/example/examples/custom/rich_text/rich_text.collection +++ b/example/examples/windows/window_info/window_info.collection @@ -1,10 +1,10 @@ -name: "rich_text" +name: "window_info" scale_along_z: 0 embedded_instances { id: "go" data: "components {\n" - " id: \"rich_text\"\n" - " component: \"/example/examples/custom/rich_text/rich_text.gui\"\n" + " id: \"window_info\"\n" + " component: \"/example/examples/windows/window_info/window_info.gui\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" diff --git a/example/examples/general/layout/layout.gui b/example/examples/windows/window_info/window_info.gui similarity index 70% rename from example/examples/general/layout/layout.gui rename to example/examples/windows/window_info/window_info.gui index 385aaff0..1d45e4fd 100644 --- a/example/examples/general/layout/layout.gui +++ b/example/examples/windows/window_info/window_info.gui @@ -1,11 +1,11 @@ -script: "/example/examples/general/layout/layout.gui_script" +script: "/example/examples/windows/window_info/window_info.gui_script" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 960.0 + y: 540.0 z: 0.0 w: 1.0 } @@ -33,8 +33,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 830.0 + x: 700.0 + y: 500.0 z: 0.0 w: 1.0 } @@ -46,7 +46,7 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -55,10 +55,10 @@ nodes { layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -67,11 +67,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 250.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -88,33 +91,33 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 100.0 + x: 700.0 + y: 500.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "node_stretch" + texture: "druid/ui_circle_32" + id: "window" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH + adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "" inherit_alpha: true slice9 { - x: 17.0 - y: 17.0 - z: 17.0 - w: 17.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -123,75 +126,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale { - x: 0.65 - y: 0.65 - z: 1.0 - w: 1.0 - } - size { - x: 450.0 - y: 100.0 - z: 0.0 - w: 1.0 - } - color { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - type: TYPE_TEXT - blend_mode: BLEND_MODE_ALPHA - text: "Regular Stretch Mode" - font: "game" - id: "text_regular" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - outline { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "node_stretch" - layer: "" - inherit_alpha: true - alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 - template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 - custom_type: 0 -} -nodes { - position { - x: 0.0 - y: 100.0 + y: 250.0 z: 0.0 w: 1.0 } @@ -208,33 +150,33 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 100.0 + x: 700.0 + y: 92.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "node_layout_stretch" + texture: "druid/ui_rounded_top_32" + id: "panel_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" + pivot: PIVOT_N + adjust_mode: ADJUST_MODE_FIT + parent: "window" layer: "" inherit_alpha: true slice9 { - x: 17.0 - y: 17.0 - z: 17.0 - w: 17.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -243,11 +185,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -258,35 +203,35 @@ nodes { w: 1.0 } scale { - x: 0.65 - y: 0.65 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 450.0 - y: 100.0 + x: 300.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Layout Stretch" - font: "game" - id: "text_layout_stretch" + text: "Information" + font: "text_bold" + id: "text_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -297,21 +242,24 @@ nodes { } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "node_layout_stretch" + parent: "panel_header" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 0.0 - y: -50.0 + x: 300.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -328,7 +276,7 @@ nodes { w: 1.0 } size { - x: 300.0 + x: 100.0 y: 100.0 z: 0.0 w: 1.0 @@ -341,20 +289,20 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "node_layout_stretch_x" + texture: "" + id: "button_close" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" + adjust_mode: ADJUST_MODE_FIT + parent: "panel_header" layer: "" inherit_alpha: true slice9 { - x: 17.0 - y: 17.0 - z: 17.0 - w: 17.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -363,6 +311,9 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -378,60 +329,55 @@ nodes { w: 1.0 } scale { - x: 0.65 - y: 0.65 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 450.0 + x: 200.0 y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Layout Stretch by X" - font: "game" - id: "text_layout_stretch1" + texture: "druid/icon_cross" + id: "icon_close" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { + adjust_mode: ADJUST_MODE_FIT + parent: "button_close" + layer: "" + inherit_alpha: true + slice9 { x: 0.0 y: 0.0 z: 0.0 - w: 1.0 - } - shadow { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 + w: 0.0 } - adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "node_layout_stretch_x" - layer: "" - inherit_alpha: true + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 1.0 - shadow_alpha: 0.0 template_node_child: false - text_leading: 1.0 - text_tracking: 0.0 + size_mode: SIZE_MODE_AUTO custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: -200.0 + y: -45.0 z: 0.0 w: 1.0 } @@ -448,8 +394,8 @@ nodes { w: 1.0 } size { - x: 300.0 - y: 100.0 + x: 700.0 + y: 400.0 z: 0.0 w: 1.0 } @@ -461,20 +407,20 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "node_layout_stretch_y" + texture: "" + id: "content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_STRETCH + adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "" inherit_alpha: true slice9 { - x: 17.0 - y: 17.0 - z: 17.0 - w: 17.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -483,11 +429,14 @@ nodes { template_node_child: false size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: 75.0 z: 0.0 w: 1.0 } @@ -498,35 +447,35 @@ nodes { w: 1.0 } scale { - x: 0.65 - y: 0.65 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 450.0 - y: 100.0 + x: 420.0 + y: 140.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Layout Stretch by Y" - font: "game" - id: "text_layout_stretch2" + text: "You are the best!" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -536,22 +485,25 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "node_layout_stretch_y" + line_break: true + parent: "content" layer: "" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -250.0 - y: -350.0 + x: 0.0 + y: -100.0 z: 0.0 w: 1.0 } @@ -568,7 +520,7 @@ nodes { w: 1.0 } size { - x: 300.0 + x: 200.0 y: 100.0 z: 0.0 w: 1.0 @@ -579,34 +531,79 @@ nodes { z: 1.0 w: 1.0 } + type: TYPE_TEMPLATE + id: "button_accept" + parent: "content" + layer: "" + inherit_alpha: true + alpha: 1.0 + template: "/example/templates/button_text_green.gui" + template_node_child: false + custom_type: 0 + enabled: true +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + w: 1.0 + } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/slider_move" - id: "node_layout_stretch_y_anchor_w" + texture: "druid/ui_circle_32" + id: "button_accept/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_W - adjust_mode: ADJUST_MODE_STRETCH - parent: "root" - layer: "" + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button_accept" + layer: "druid" inherit_alpha: true slice9 { - x: 17.0 - y: 17.0 - z: 17.0 - w: 17.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + template_node_child: true size_mode: SIZE_MODE_MANUAL custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 150.0 + x: 0.0 y: 0.0 z: 0.0 w: 1.0 @@ -618,35 +615,35 @@ nodes { w: 1.0 } scale { - x: 0.65 - y: 0.65 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 450.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Layout Stretch by X Anchor W" - font: "game" - id: "text_layout_stretch3" + text: "Confirm" + font: "text_bold" + id: "button_accept/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER outline { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } shadow { @@ -656,23 +653,26 @@ nodes { w: 1.0 } adjust_mode: ADJUST_MODE_FIT - line_break: true - parent: "node_layout_stretch_y_anchor_w" - layer: "" + line_break: false + parent: "button_accept/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 - outline_alpha: 1.0 + outline_alpha: 0.0 shadow_alpha: 0.0 - template_node_child: false + template_node_child: true text_leading: 1.0 text_tracking: 0.0 custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_bold" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/windows/window_info/window_info.gui_script b/example/examples/windows/window_info/window_info.gui_script new file mode 100644 index 00000000..9c4e5e94 --- /dev/null +++ b/example/examples/windows/window_info/window_info.gui_script @@ -0,0 +1,44 @@ +local lang = require("lang.lang") +local druid = require("druid.druid") + +local window_info = require("example.examples.windows.window_info.window_info") + + +local function debug_stub(self) + if msg.url().socket ~= hash("window_info") then + return + end + + lang.init() + druid.set_text_function(lang.txp) +end + + +function init(self) + debug_stub(self) + + -- Using component instead put all inside gui_script to + -- allow use it as example and as separate collection + self.druid = druid.new(self) + self.druid:new(window_info) +end + + +function final(self) + self.druid:final() +end + + +function update(self, dt) + self.druid:update(dt) +end + + +function on_message(self, message_id, message, sender) + self.druid:on_message(message_id, message, sender) +end + + +function on_input(self, action_id, action) + return self.druid:on_input(action_id, action) +end \ No newline at end of file diff --git a/example/examples/windows/window_info/window_info.lua b/example/examples/windows/window_info/window_info.lua new file mode 100644 index 00000000..26c36c17 --- /dev/null +++ b/example/examples/windows/window_info/window_info.lua @@ -0,0 +1,38 @@ +local component = require("druid.component") +local panthera = require("panthera.panthera") +local lang_text = require("druid.extended.lang_text") + +local window_animation_panthera = require("example.examples.windows.window_animation_panthera") + +---@class window_info: druid.base_component +---@field text_header druid.lang_text +---@field text_button_accept druid.lang_text +---@field text_description druid.lang_text +---@field button_close druid.button +---@field druid druid_instance +local M = component.create("window_info") + + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.text_header = self.druid:new(lang_text, "text_header", "ui_information") --[[@as druid.lang_text]] + self.text_button_accept = self.druid:new(lang_text, "button_accept/text", "ui_accept") --[[@as druid.lang_text]] + self.text_description = self.druid:new(lang_text, "text") --[[@as druid.lang_text]] + + self.button_close = self.druid:new_button("button_close", self.on_button_close) + self.button_accept = self.druid:new_button("button_accept/root") + + self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), nodes) + panthera.play(self.animation, "open") +end + + +function M:on_button_close() + panthera.play(self.animation, "close") +end + + +return M diff --git a/example/examples/system/late_init_check/late_init_check.collection b/example/examples/windows/window_language/window_language.collection similarity index 76% rename from example/examples/system/late_init_check/late_init_check.collection rename to example/examples/windows/window_language/window_language.collection index 9700af5c..b4797532 100644 --- a/example/examples/system/late_init_check/late_init_check.collection +++ b/example/examples/windows/window_language/window_language.collection @@ -1,10 +1,10 @@ -name: "late_init_check" +name: "window_language" scale_along_z: 0 embedded_instances { id: "go" data: "components {\n" - " id: \"late_init_check\"\n" - " component: \"/example/examples/system/late_init_check/late_init_check.gui\"\n" + " id: \"window_language\"\n" + " component: \"/example/examples/windows/window_language/window_language.gui\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" diff --git a/example/examples/grid/grid_animations/grid_animations.gui b/example/examples/windows/window_language/window_language.gui similarity index 69% rename from example/examples/grid/grid_animations/grid_animations.gui rename to example/examples/windows/window_language/window_language.gui index b2d39c0d..10763524 100644 --- a/example/examples/grid/grid_animations/grid_animations.gui +++ b/example/examples/windows/window_language/window_language.gui @@ -1,11 +1,11 @@ -script: "/example/examples/grid/grid_animations/grid_animations.gui_script" +script: "/example/examples/windows/window_language/window_language.gui_script" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -15,8 +15,8 @@ background_color { } nodes { position { - x: 300.0 - y: 415.0 + x: 960.0 + y: 540.0 z: 0.0 w: 1.0 } @@ -34,7 +34,7 @@ nodes { } size { x: 600.0 - y: 830.0 + y: 580.0 z: 0.0 w: 1.0 } @@ -46,19 +46,19 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" + texture: "druid/empty" id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT + adjust_mode: ADJUST_MODE_STRETCH layer: "" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -66,11 +66,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { - x: -100.0 - y: -200.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -87,30 +91,49 @@ nodes { w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 600.0 + y: 580.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_add" + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "window" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT parent: "root" layer: "" inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 0.0 + y: 290.0 z: 0.0 w: 1.0 } @@ -127,45 +150,49 @@ nodes { w: 1.0 } size { - x: 130.0 - y: 60.0 + x: 600.0 + y: 92.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_add/button" + texture: "druid/ui_rounded_top_32" + id: "panel_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER + pivot: PIVOT_N adjust_mode: ADJUST_MODE_FIT - parent: "button_add" - layer: "image" + parent: "window" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: true + template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -176,29 +203,28 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.5 + y: 1.5 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 300.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Add\n" - "" - font: "game" - id: "button_add/text" + text: "Language" + font: "text_bold" + id: "text_header" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -209,28 +235,31 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button_add/button" - layer: "text" + parent: "panel_header" + layer: "" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true + shadow_alpha: 0.0 + template_node_child: false text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: 100.0 - y: -200.0 + x: 250.0 + y: -46.0 z: 0.0 w: 1.0 } @@ -247,7 +276,7 @@ nodes { w: 1.0 } size { - x: 200.0 + x: 100.0 y: 100.0 z: 0.0 w: 1.0 @@ -258,14 +287,33 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEMPLATE - id: "button_remove" - parent: "root" + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "button_close" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "panel_header" layer: "" inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - template: "/example/templates/button.gui" template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -287,45 +335,49 @@ nodes { w: 1.0 } size { - x: 130.0 - y: 60.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button_remove/button" + texture: "druid/icon_cross" + id: "icon_close" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "button_remove" - layer: "image" + parent: "button_close" + layer: "" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: true - size_mode: SIZE_MODE_MANUAL + template_node_child: false + size_mode: SIZE_MODE_AUTO + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: -45.0 z: 0.0 w: 1.0 } @@ -336,14 +388,14 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 600.0 + y: 470.0 z: 0.0 w: 1.0 } @@ -353,44 +405,38 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_TEXT + type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - text: "Remove\n" - "" - font: "game" - id: "button_remove/text" + texture: "" + id: "content" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER - outline { - x: 1.0 - y: 1.0 - z: 1.0 - w: 1.0 - } - shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 - w: 1.0 - } adjust_mode: ADJUST_MODE_FIT - line_break: false - parent: "button_remove/button" - layer: "text" + parent: "root" + layer: "" inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false alpha: 1.0 - outline_alpha: 0.0 - shadow_alpha: 0.78 - overridden_fields: 8 - template_node_child: true - text_leading: 1.0 - text_tracking: 0.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { x: 0.0 - y: 108.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -407,8 +453,8 @@ nodes { w: 1.0 } size { - x: 600.0 - y: 200.0 + x: 260.0 + y: 90.0 z: 0.0 w: 1.0 } @@ -420,13 +466,13 @@ nodes { } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "grid" + texture: "" + id: "button_prefab" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "root" + parent: "content" layer: "" inherit_alpha: true slice9 { @@ -441,6 +487,10 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" } nodes { position { @@ -462,8 +512,8 @@ nodes { w: 1.0 } size { - x: 80.0 - y: 110.0 + x: 200.0 + y: 100.0 z: 0.0 w: 1.0 } @@ -473,29 +523,16 @@ nodes { z: 1.0 w: 1.0 } - type: TYPE_BOX - blend_mode: BLEND_MODE_ALPHA - texture: "kenney/empty" - id: "prefab" - xanchor: XANCHOR_NONE - yanchor: YANCHOR_NONE - pivot: PIVOT_CENTER - adjust_mode: ADJUST_MODE_FIT - parent: "root" + type: TYPE_TEMPLATE + id: "button" + parent: "button_prefab" layer: "" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + template: "/example/templates/button_text_white.gui" template_node_child: false - size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true } nodes { position { @@ -517,45 +554,50 @@ nodes { w: 1.0 } size { - x: 80.0 - y: 110.0 + x: 240.0 + y: 70.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_green" - id: "prefab_icon" + texture: "druid/ui_circle_32" + id: "button/root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - parent: "prefab" - layer: "" + parent: "button" + layer: "druid" inherit_alpha: true slice9 { - x: 10.0 - y: 10.0 - z: 10.0 - w: 10.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 - template_node_child: false + overridden_fields: 4 + template_node_child: true size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -2.0 - y: 8.0 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -566,28 +608,28 @@ nodes { w: 1.0 } scale { - x: 1.5 - y: 1.5 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 30.0 - y: 30.0 + x: 220.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 0.9019608 - z: 0.6 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "1" - font: "game" - id: "prefab_text" + text: "English" + font: "text_bold" + id: "button/text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER @@ -598,28 +640,34 @@ nodes { w: 1.0 } shadow { - x: 0.0 - y: 0.0 - z: 0.0 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "prefab_icon" - layer: "" + parent: "button/root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.5 - template_node_child: false + shadow_alpha: 0.0 + overridden_fields: 4 + overridden_fields: 8 + template_node_child: true text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_bold" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/examples/windows/window_language/window_language.gui_script b/example/examples/windows/window_language/window_language.gui_script new file mode 100644 index 00000000..d213f31b --- /dev/null +++ b/example/examples/windows/window_language/window_language.gui_script @@ -0,0 +1,44 @@ +local lang = require("lang.lang") +local druid = require("druid.druid") + +local window_language = require("example.examples.windows.window_language.window_language") + + +local function debug_stub(self) + if msg.url().socket ~= hash("window_language") then + return + end + + lang.init() + druid.set_text_function(lang.txp) +end + + +function init(self) + debug_stub(self) + + -- Using component instead put all inside gui_script to + -- allow use it as example and as separate collection + self.druid = druid.new(self) + self.druid:new(window_language) +end + + +function final(self) + self.druid:final() +end + + +function update(self, dt) + self.druid:update(dt) +end + + +function on_message(self, message_id, message, sender) + self.druid:on_message(message_id, message, sender) +end + + +function on_input(self, action_id, action) + return self.druid:on_input(action_id, action) +end \ No newline at end of file diff --git a/example/examples/windows/window_language/window_language.lua b/example/examples/windows/window_language/window_language.lua new file mode 100644 index 00000000..f5f41207 --- /dev/null +++ b/example/examples/windows/window_language/window_language.lua @@ -0,0 +1,117 @@ +local lang = require("lang.lang") +local druid = require("druid.druid") +local event = require("druid.event") +local component = require("druid.component") +local lang_text = require("druid.extended.lang_text") +local panthera = require("panthera.panthera") + +local window_animation_panthera = require("example.examples.windows.window_animation_panthera") + +---@class window_language: druid.base_component +---@field text_header druid.text +---@field button_close druid.button +---@field druid druid_instance +---@field lang_buttons table +---@field grid druid.static_grid +---@field on_language_change druid.event +local M = component.create("window_language") + +---Color: #F0FBFF +local DEFAULT_LANGUAGE_COLOR = vmath.vector4(240/255, 251/255, 255/255, 1.0) +---Color: #E6DF9F +local SELECTED_LANGUAGE_COLOR = vmath.vector4(230/255, 223/255, 159/255, 1.0) + +---@param template string +---@param nodes table +function M:init(template, nodes) + self.druid = self:get_druid(template, nodes) + + self.lang_buttons = {} + self.created_nodes = {} + self.prefab = self:get_node("button_prefab") + gui.set_enabled(self.prefab, false) + + self._current_lang_id = lang.get_lang() + + self.button_close = self.druid:new_button("button_close", self.on_button_close) + + self.druid:new(lang_text, "text_header", "ui_language") + self.grid = self.druid:new_static_grid("content", self.prefab, 2) + self.grid.style.IS_DYNAMIC_NODE_POSES = true + + self.animation = panthera.create_gui(window_animation_panthera, self:get_template(), nodes) + panthera.play(self.animation, "open") + + self:load_langs() + + self.on_language_change = event() +end + + +function M:on_remove() + for index = 1, #self.created_nodes do + local nodes = self.created_nodes[index] + for _, node in pairs(nodes) do + gui.delete_node(node) + end + end +end + + +function M:load_langs() + local languages = lang.get_langs() + for index = 1, #languages do + local lang_id = languages[index] + + local template = self:get_template() + if template and template ~= "" then + template = template .. "/" + end + local prefab_nodes = gui.clone_tree(self.prefab) + local root = prefab_nodes[template .. "button_prefab"] + local button_node = prefab_nodes[template .. "button/root"] + local text = prefab_nodes[template .. "button/text"] + + local button = self.druid:new_button(button_node, self.on_language_button, lang_id) + self.druid:new(lang_text, text, "ui_language_" .. lang_id) + gui.set_enabled(root, true) + self.grid:add(root) + + self.lang_buttons[lang_id] = button + table.insert(self.created_nodes, prefab_nodes) + end + + do -- Update window size to fit all languages + local height = self.grid:get_size().y + gui.set(self:get_node("window"), "size.y", height + 110) + gui.set(self:get_node("panel_header"), "position.y", (height + 110)/2) + end + + do -- Select current language button + local current_lang_button = self.lang_buttons[self._current_lang_id] + gui.animate(current_lang_button.node, "color", SELECTED_LANGUAGE_COLOR, gui.EASING_OUTQUAD, 0.2) + end +end + + +function M:on_button_close() + panthera.play(self.animation, "close") +end + + +function M:on_language_button(lang_id) + local current_lang_button = self.lang_buttons[self._current_lang_id] + local new_lang_button = self.lang_buttons[lang_id] + + self._current_lang_id = lang_id + lang.set_lang(lang_id) + druid.on_language_change() + + self.on_language_change:trigger(lang_id) + + gui.animate(current_lang_button.node, "color", DEFAULT_LANGUAGE_COLOR, gui.EASING_OUTQUAD, 0.2) + gui.animate(new_lang_button.node, "color", SELECTED_LANGUAGE_COLOR, gui.EASING_OUTQUAD, 0.2) +end + + +return M diff --git a/example/game.appmanifest b/example/game.appmanifest deleted file mode 100644 index 9fd87074..00000000 --- a/example/game.appmanifest +++ /dev/null @@ -1,76 +0,0 @@ -platforms: - armv7-ios: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - arm64-ios: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - x86_64-ios: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - armv7-android: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeJars: [] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - arm64-android: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeJars: [] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - arm64-osx: - context: - excludeLibs: [physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx, liveupdate] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, record_null, liveupdate_null] - x86_64-osx: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - x86_64-linux: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - x86-win32: - context: - excludeLibs: [libliveupdate, libphysics, libLinearMath, libBulletDynamics, libBulletCollision, libBox2D, libscript_box2d, librecord, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [libphysics_null.lib, libliveupdate_null.lib, librecord_null.lib] - linkFlags: [] - x86_64-win32: - context: - excludeLibs: [libliveupdate, libphysics, libLinearMath, libBulletDynamics, libBulletCollision, libBox2D, libscript_box2d, librecord, vpx] - excludeSymbols: [ScriptBox2DExt] - libs: [libphysics_null.lib, libliveupdate_null.lib, librecord_null.lib] - linkFlags: [] - js-web: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeJsLibs: [] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] - wasm-web: - context: - excludeLibs: [liveupdate, physics, LinearMath, BulletDynamics, BulletCollision, Box2D, script_box2d, record, vpx] - excludeJsLibs: [] - excludeSymbols: [ScriptBox2DExt] - libs: [physics_null, liveupdate_null, record_null] - linkFlags: [] diff --git a/example/init.script b/example/init.script deleted file mode 100644 index b4cc51c5..00000000 --- a/example/init.script +++ /dev/null @@ -1,21 +0,0 @@ -local druid = require("druid.druid") -local lang = require("example.lang") - - -local function setup_druid() - druid.set_sound_function(function(name) - sound.play("example:/sound#" .. name) - end) - - druid.set_text_function(function(lang_id, ...) - return lang.get_locale(lang_id, ...) - end) - - druid.on_language_change() -end - - -function init(self) - setup_druid() - msg.post("@render:", "clear_color", { color = vmath.vector4(0.8, 0.9, 0.85, 1) }) -end diff --git a/example/lang.lua b/example/lang.lua deleted file mode 100644 index a790951b..00000000 --- a/example/lang.lua +++ /dev/null @@ -1,78 +0,0 @@ -local druid = require("druid.druid") - -local M = {} - -local en = { - ui_lang = "En", - ui_current_lang = "Current lang: %s", - main_page = "Main page", - texts_page = "Text page", - button_page = "Button page", - scroll_page = "Scroll page", - slider_page = "Slider page", - input_page = "Input page", - grid_page = "Grid page", - infinity_page = "Infinity scroll", - ui_section_button = "Button", - ui_section_text = "Text", - ui_section_timer = "Timer", - ui_section_progress = "Progress", - ui_section_slider = "Slider", - ui_section_radio = "Radio", - ui_section_checkbox = "Checkbox", - ui_section_input = "Input", - ui_text_example = "Translated", - ui_text_change_lang = "Change lang", - ui_example_1 = "Some text example", - ui_example_2 = "Lang text with different length to be adjusted", - ui_example_3 = "Text with 3 params: %s, %s and %s", -} - -local ru = { - ui_lang = "Ру", - ui_current_lang = "Текущий язык: %s", - main_page = "Основное", - texts_page = "Текст", - button_page = "Кнопки", - scroll_page = "Скролл", - slider_page = "Слайдеры", - input_page = "Текст. ввод", - grid_page = "Сетка", - infinity_page = "Беск. скролл", - ui_section_button = "Кнопка", - ui_section_text = "Текст", - ui_section_timer = "Таймер", - ui_section_progress = "Прогресс", - ui_section_slider = "Слайдер", - ui_section_radio = "Выбор", - ui_section_checkbox = "Мн. выбор", - ui_section_input = "Ввод текста", - ui_text_example = "Переведен", - ui_text_change_lang = "Сменить язык", - ui_example_1 = "Пример текста", - ui_example_2 = "Короткий текст", - ui_example_3 = "Текст с 3 параметрами: %s, %s и %s", -} - - -local data = en - - -function M.get_locale(lang_id, ...) - local localized_text = data[lang_id] or lang_id - - if #{...} > 0 then - localized_text = string.format(localized_text, ...) - end - - return localized_text -end - - -function M.toggle_locale() - data = data == en and ru or en - druid.on_language_change() -end - - -return M diff --git a/example/light_theme.css b/example/light_theme.css deleted file mode 100644 index 3b658db4..00000000 --- a/example/light_theme.css +++ /dev/null @@ -1,85 +0,0 @@ - .canvas-app-progress { - position: absolute; - background-color: #d1dbeb; - height: 6px; - margin-top: -6px; - width: 100%; - } - - .canvas-app-progress-bar { - font-size: 12px; - height: 6px; - color: rgb(255, 255, 255); - background-color: #1a72eb; - text-align: center; - line-height: 20px; - } -{{#html5.show_fullscreen_button}} - .button { - background-image: url("data:image/svg+xml,%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg xmlns='http://www.w3.org/2000/svg' baseProfile='full' width='16' height='16' viewBox='0 0 16 16' version='1.1' xml:space='preserve'%3E%3Ctitle%3Eic-16-fullscreen%3C/title%3E%3Cg id='ic-16-fullscreen' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M3,11.5 C3,11.776 3.224,12 3.5,12 L12.5,12 C12.776,12 13,11.776 13,11.5 L13,4.5 C13,4.224 12.776,4 12.5,4 L3.5,4 C3.224,4 3,4.224 3,4.5 L3,11.5 Z M14,11 L14,13 L12,13 C11.724,13 11.5,13.224 11.5,13.5 C11.5,13.776 11.724,14 12,14 L14.5,14 C14.776,14 15,13.776 15,13.5 L15,11 C15,10.724 14.776,10.5 14.5,10.5 C14.224,10.5 14,10.724 14,11 Z M12,2 C11.724,2 11.5,2.224 11.5,2.5 C11.5,2.776 11.724,3 12,3 L14,3 L14,5 C14,5.276 14.224,5.5 14.5,5.5 C14.776,5.5 15,5.276 15,5 L15,2.5 C15,2.224 14.776,2 14.5,2 L12,2 Z M2,13 L2,11 C2,10.724 1.776,10.5 1.5,10.5 C1.224,10.5 1,10.724 1,11 L1,13.5 C1,13.776 1.224,14 1.5,14 L4,14 C4.276,14 4.5,13.776 4.5,13.5 C4.5,13.224 4.276,13 4,13 L2,13 Z M1,2.5 C1,2.224 1.224,2 1.5,2 L4,2 C4.276,2 4.5,2.224 4.5,2.5 C4.5,2.776 4.276,3 4,3 L2,3 L2,5 C2,5.276 1.776,5.5 1.5,5.5 C1.224,5.5 1,5.276 1,5 L1,2.5 Z ' id='fill_1' fill='%23006fff'%3E%3C/path%3E%3C/g%3E%3C/svg%3E"); - background-repeat: no-repeat; - border-color: transparent; - float: left; - color: #006fff; - padding-left: 50%; - padding: 0px 0px 0px 20px; - cursor:pointer; - background-position: left bottom; - margin-left: 2px; - } -{{/html5.show_fullscreen_button}} -{{#html5.show_made_with_defold}} - .link { - text-align: right; - color: #4e5258; - margin-right: 2px; - } - a { - font-weight: 600; - color: #006fff; - text-decoration: none; - } -{{/html5.show_made_with_defold}} - .link, .button { - font-family: sans-serif; - font-size: 14px; - font-weight: normal; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: 0px; - padding-top: 12px; - } - - .buttons-background { - background-color: #ffffff; - width: 100%; - height: 42px; - } - - body { - background-color: #ffffff; - } - - .canvas-app-container { - background: rgba(250,252,255,1); - background: -moz-linear-gradient(-45deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 50%, rgba(245,249,255,1) 50%, rgba(245,249,255,1) 100%); - background: -webkit-gradient(left top, right bottom, color-stop(0%, rgba(250,252,255,1)), color-stop(50%, rgba(250,252,255,1)), color-stop(50%, rgba(245,249,255,1)), color-stop(100%, rgba(245,249,255,1))); - background: -webkit-linear-gradient(-45deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 50%, rgba(245,249,255,1) 50%, rgba(245,249,255,1) 100%); - background: -o-linear-gradient(-45deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 50%, rgba(245,249,255,1) 50%, rgba(245,249,255,1) 100%); - background: -ms-linear-gradient(-45deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 50%, rgba(245,249,255,1) 50%, rgba(245,249,255,1) 100%); - background: linear-gradient(135deg, rgba(250,252,255,1) 0%, rgba(250,252,255,1) 50%, rgba(245,249,255,1) 50%, rgba(245,249,255,1) 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafcff', endColorstr='#f5f9ff', GradientType=1 ); - } - - .canvas-app-canvas { - background-repeat:no-repeat; - background-position: center center; - background-size: contain; -{{#DEFOLD_SPLASH_IMAGE}} - background-image: url("{{DEFOLD_SPLASH_IMAGE}}"); -{{/DEFOLD_SPLASH_IMAGE}} -{{^DEFOLD_SPLASH_IMAGE}} - background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='300px' height='64px' viewBox='-2467.5 2469 300 64' style='enable-background:new -2467.5 2469 300 64;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%2315244A;%7D .st1%7Bfill:url(%23SVGID_1_);%7D .st2%7Bfill:url(%23SVGID_2_);%7D%0A%3C/style%3E%3Ctitle%3Edefold-logo-html5-splash%3C/title%3E%3Cpolygon class='st0' points='-2177,2482.9 -2175.5,2482.9 -2175.5,2486.7 -2174.4,2486.7 -2174.4,2482.9 -2173.2,2482.9 -2173.2,2481.9 -2177,2481.9 '/%3E%3Cpolygon class='st0' points='-2169.8,2484.1 -2171,2482.1 -2172.1,2482.1 -2172.1,2486.7 -2171,2486.7 -2171,2483.5 -2169.7,2485.6 -2169.7,2485.6 -2168.5,2483.5 -2168.5,2486.7 -2167.5,2486.7 -2167.5,2482.1 -2168.6,2482.1 '/%3E%3Cpath class='st0' d='M-2376,2482h-13.8v38h13.6c6.6,0,12.2-1.9,16.1-5.5c3.8-3.5,5.8-8.5,5.7-13.7v-0.1 C-2354.5,2489.3-2362.9,2482-2376,2482z M-2364,2501.2c0,6.7-4.5,10.9-11.8,10.9h-4.7v-22h4.7c7.3,0,11.8,4.2,11.8,10.9 L-2364,2501.2z'/%3E%3Cpolygon class='st0' points='-2340.9,2505 -2325.1,2505 -2325.1,2497.4 -2340.9,2497.4 -2340.9,2489.6 -2322.4,2489.6 -2322.4,2481.9 -2350.1,2481.9 -2350.1,2520 -2322.2,2520 -2322.2,2512.4 -2340.9,2512.4 '/%3E%3Cpolygon class='st0' points='-2317.1,2481.9 -2317.1,2520 -2307.9,2520 -2307.9,2505.9 -2293,2505.9 -2293,2498.4 -2307.9,2498.4 -2307.9,2489.9 -2289.6,2489.9 -2289.6,2481.9 '/%3E%3Cpolygon class='st0' points='-2233,2482.1 -2242.2,2482.1 -2242.2,2520 -2216.3,2520 -2216.3,2512.2 -2233,2512.2 '/%3E%3Cpath class='st0' d='M-2197.1,2482h-13.7v38h13.5c6.7,0,12.2-1.9,16.1-5.5c3.8-3.5,5.8-8.5,5.7-13.7v-0.1 C-2175.5,2489.3-2184,2482-2197.1,2482z M-2185.1,2501.2c0,6.7-4.5,10.9-11.8,10.9h-4.7v-22h4.7c7.3,0,11.8,4.2,11.8,10.9V2501.2z' /%3E%3Cpath class='st0' d='M-2267.5,2481.7c-10.8,0-19.6,8.8-19.6,19.7c0,10.8,8.8,19.6,19.7,19.6c10.8,0,19.6-8.8,19.6-19.6l0,0 C-2247.8,2490.5-2256.6,2481.7-2267.5,2481.7C-2267.5,2481.7-2267.5,2481.7-2267.5,2481.7z M-2258,2507.9l-8.8,5.1 c-0.5,0.3-1.2,0.3-1.8,0l-8.8-5.1c-0.5-0.3-0.9-0.9-0.9-1.5v-10.2c0-0.6,0.3-1.2,0.9-1.5l8.8-5.1c0.5-0.3,1.2-0.3,1.8,0l8.8,5.1 c0.5,0.3,0.9,0.9,0.9,1.5v10.2C-2257.1,2507-2257.4,2507.6-2258,2507.9z'/%3E%3Cpath class='st0' d='M-2423.2,2494.6l-11.1,6.4l-11.1-6.4l11.1-6.4L-2423.2,2494.6z M-2412.1,2501v12.8l11.1-6.4L-2412.1,2501z M-2467.5,2507.4l11.1,6.4V2501L-2467.5,2507.4z M-2434.3,2526.6l11.1,6.4l11.1-6.4l-11.1-6.4l11.1-6.4l-11.1-6.4l-11.1,6.4 l-11.1-6.4l-11.1,6.4l11.1,6.4l-11.1,6.4l11.1,6.4L-2434.3,2526.6z'/%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='-2451.2178' y1='2525.4604' x2='-2406.2178' y2='2499.6304' gradientTransform='matrix(1 0 0 -1 0 5004)'%3E%3Cstop offset='0' style='stop-color:%231C68EC'/%3E%3Cstop offset='1' style='stop-color:%2300E9DF'/%3E%3C/linearGradient%3E%3Cpath class='st1' d='M-2412.1,2513.8v12.8l-11.1-6.4L-2412.1,2513.8z M-2434.3,2513.8V2501l-11.1-6.4v12.8L-2434.3,2513.8z M-2445.4,2469v12.8l11.1-6.4L-2445.4,2469z M-2412.1,2488.2L-2412.1,2488.2 M-2423.2,2507.4l11.1,6.4V2501l11.1,6.4v-12.8 l-11.1-6.4v-12.8l0,0l-11.1-6.4v12.8l-11.1-6.4v12.8l11.1,6.4V2507.4z'/%3E%3ClinearGradient id='SVGID_2_' gradientUnits='userSpaceOnUse' x1='-2465.9385' y1='2521.2493' x2='-2423.5085' y2='2496.7893' gradientTransform='matrix(1 0 0 -1 0 5004)'%3E%3Cstop offset='0' style='stop-color:%23FF3C2A'/%3E%3Cstop offset='1' style='stop-color:%23FFD215'/%3E%3C/linearGradient%3E%3Cpath class='st2' d='M-2434.3,2513.8V2501l11.1-6.4v12.8L-2434.3,2513.8z M-2434.3,2475.4l11.1,6.4V2469L-2434.3,2475.4z M-2456.5,2488.2L-2456.5,2488.2 M-2445.4,2494.6l11.1-6.4v-12.8l-11.1,6.4V2469l-11.1,6.4l0,0v12.8l-11.1,6.4v12.8l11.1-6.4v12.8 l11.1-6.4V2494.6z M-2456.5,2513.8v12.8l11.1-6.4L-2456.5,2513.8z'/%3E%3C/svg%3E%0A"); -{{/DEFOLD_SPLASH_IMAGE}} - } diff --git a/example/locales/de.json b/example/locales/de.json new file mode 100644 index 00000000..d87ed884 --- /dev/null +++ b/example/locales/de.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Beispiele", + "ui_properties_panel": "Eigenschaften", + "ui_output": "Ausgabe", + "ui_view_code": "Code anzeigen", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Speicher", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Komponenten", + "ui_profiler_events": "Ereignisse", + "ui_confirm": "Bestätigen", + "ui_cancel": "Abbrechen", + "ui_value": "Wert", + "ui_scroll": "Scrollen", + "ui_clipping": "Zuschneiden", + "ui_no_properties": "Keine Eigenschaften für dieses Beispiel", + "ui_padding": "Innenabstand", + "ui_margin_x": "Außenabstand X", + "ui_margin_y": "Außenabstand Y", + "ui_justify": "Ausrichten", + "ui_pivot_next": "Nächster Pivot", + "ui_type_next": "Nächster Typ", + "ui_adjust_next": "Nächste Anpassung", + "ui_enabled": "Aktiviert", + + "ui_examples_basic": "Basis", + "ui_examples_data_list": "Datenliste", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Fenster", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Einführung", + "ui_example_intro_description": "Hier wird eine kurze Beschreibung des ausgewählten Beispiels stehen.", + + "ui_example_basic_button": "Schaltfläche", + "ui_example_basic_button_description": "Beispiel für eine grundlegende Druid-Schaltfläche", + + "ui_example_basic_button_double_click": "Doppelklick", + "ui_example_basic_button_double_click_description": "Wie man Doppelklick-Funktionalität zur Schaltfläche hinzufügt.", + + "ui_example_basic_button_hold": "Halten", + "ui_example_basic_button_hold_description": "Wie man Halte- und Triggerfunktionalität für die Schaltfläche erstellt.", + + "ui_example_basic_text": "Text", + "ui_example_basic_text_description": "Überprüfen Sie, wie Text mit verschiedenen Eigenschaften angepasst wird.", + + "ui_example_basic_multiline_text": "Mehrzeiliger Text", + "ui_example_basic_multiline_text_description": "Überprüfen Sie, wie mehrzeiliger Text mit verschiedenen Eigenschaften angepasst wird.", + + "ui_example_basic_hover": "Hover", + "ui_example_basic_hover_description": "Hover hat zwei Hover-Ereignisse. Eines für die Maus und eines für den Touch. Verwenden Sie mouse_callback für Mausereignisse.", + + "ui_example_basic_drag": "Ziehen", + "ui_example_basic_drag_description": "Wie man einen einfachen Zieh-Knoten erstellt", + + "ui_example_basic_drag_to_node": "Ziehen zu Knoten", + "ui_example_basic_drag_to_node_description": "Wie man einen Knoten zu einem anderen Knoten zieht und Rückrufe erhält", + + "ui_example_basic_slider": "Schieberegler", + "ui_example_basic_slider_description": "Wie man einen einfachen Schieberegler erstellt", + + "ui_example_basic_slider_vertical": "Vertikaler Schieberegler", + "ui_example_basic_slider_vertical_description": "Wie man einen einfachen vertikalen Schieberegler erstellt", + + "ui_example_basic_slider_stepped": "Schieberegler mit Schritten", + "ui_example_basic_slider_stepped_description": "Schieberegler können eine \"Schritte\"-Eigenschaft haben, um ihn gestuft zu machen", + + "ui_example_basic_progress_bar": "Fortschrittsanzeige", + "ui_example_basic_progress_bar_description": "Wie man eine einfache Fortschrittsanzeige erstellt", + + "ui_example_basic_progress_bar_slice9": "Fortschrittsanzeige Slice9", + "ui_example_basic_progress_bar_slice9_description": "Die Fortschrittskomponente kann die Eigenschaft slice9 verarbeiten, um sie am Anfang skalierbar zu machen", + + "ui_example_basic_timer": "Timer", + "ui_example_basic_timer_description": "Die Timer-Komponente wird verwendet, um einen Sekunden-Timer mit einem Rückruf anzuzeigen", + + "ui_example_basic_hotkey": "Tastenkombination", + "ui_example_basic_hotkey_description": "Wie man eine Tastenkombination für einen Rückruf erstellt", + + "ui_example_basic_scroll": "Scrollen", + "ui_example_basic_scroll_description": "Wie man einfaches Scrollen erstellt", + "ui_elastic_scroll": "Elastisches Scrollen", + + "ui_example_basic_scroll_slider": "Scrollen mit Schieberegler", + "ui_example_basic_scroll_slider_description": "Wie man eine Schieberegler-Steuerung zum Scrollen hinzufügt und sie verwendet", + + "ui_example_basic_grid": "Statische Gitter", + "ui_example_basic_grid_description": "Wie man Knoten in einem Gitter platziert", + "ui_grid_in_row": "Elemente in Zeile", + "ui_add_element": "Element hinzufügen", + "ui_remove_element": "Element entfernen", + "ui_clear_elements": "Elemente löschen", + + "ui_example_basic_scroll_bind_grid": "Scrollen mit gebundenem Gitter", + "ui_example_basic_scroll_bind_grid_description": "Scrollen funktioniert gut mit Gittern und vordefinierten Größen, dies ist ein Beispiel für ein gebundenes Scrollgitter.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Scrollen mit gebundenem horizontalem Gitter", + "ui_example_basic_scroll_bind_grid_horizontal_description": "Scrollen funktioniert gut mit Gittern und vordefinierten Größen, dies ist ein Beispiel für ein gebundenes horizontales Scrollgitter.", + + "ui_example_basic_input": "Eingabe", + "ui_example_basic_input_description": "Wie man die einfachste Eingabe in Druid macht", + + "ui_example_input_password": "Passworteingabe", + "ui_example_input_password_description": "Wie die Passworteingabe funktioniert", + + "ui_example_basic_rich_input": "Reiche Eingabe", + "ui_example_basic_rich_input_description": "Wie man eine reiche Eingabe in Druid erstellt", + + "ui_example_basic_rich_text": "Reicher Text", + "ui_example_basic_rich_text_description": "Wie man einen reichen Text in Druid erstellt", + + "ui_example_rich_text_tags": "Tags für reichen Text", + "ui_example_rich_text_tags_description": "Hier ist ein einfaches Beispiel für reichen Text mit Tags\n - Farbe\n - Schriftart\n - Größe\n - br\n - img", + + "ui_example_basic_swipe": "Wischen", + "ui_example_basic_swipe_description": "Wie man Rückrufe für Wischereignisse hinzufügt", + + "ui_example_data_list_basic": "Einfache Datenliste", + "ui_example_data_list_basic_description": "Wie man eine einfache Datenliste erstellt", + + "ui_example_data_list_horizontal_basic": "Einfache horizontale Datenliste", + "ui_example_data_list_horizontal_basic_description": "Wie man eine einfache horizontale Datenliste erstellt", + + "ui_example_data_list_add_remove_clear": "Datenliste hinzufügen, entfernen, löschen", + "ui_example_data_list_add_remove_clear_description": "Wie die Funktionen Hinzufügen, Entfernen und Löschen in der Datenliste funktionieren", + + "ui_example_data_list_cache_with_component": "Gecachte Version der Datenliste", + "ui_example_data_list_cache_with_component_description": "Die gecachte Version erfordert mehr Einrichtung für Rückrufe zum Hinzufügen/Entfernen, ist aber speichereffizienter", + + "ui_language": "Sprache", + "ui_example_window_language": "Fenster Sprache", + "ui_example_window_language_description": "Hier ist ein einfaches Beispiel für ein Fenster mit Sprachenauswahl.", + + "ui_confirmation": "Bestätigung", + "ui_example_window_confirmation": "Fensterbestätigung", + "ui_confirmation_description": "Bestätigen Sie den Kauf des Autos für eine Million Dollar?", + + "ui_information": "Information", + "ui_example_window_information": "Fensterinformation", + "ui_example_window_information_text": "Du bist der Beste der Besten!", + "ui_example_window_information_description": "Hier ist ein einfaches Beispiel für ein Fenster mit Informationsnachricht.", + + "ui_example_gamepad_tester": "Gamepad-Tester", + "ui_example_gamepad_tester_description": "Testen Sie hier Ihr Gamepad, um Tasten und Achsen zu binden", + + "ui_example_on_screen_control": "Bildschirmsteuerung", + "ui_example_on_screen_control_description": "Hier ist ein einfaches Beispiel für eine Bildschirmsteuerung. Die on_screen_input hier ist ein einfacher Joystick mit einem Rückruf als Druid-Komponente", + + "ui_example_layout_basic": "Layout", + "ui_example_layout_basic_description": "Dieses Layout kann so angepasst werden, dass es mit Figma übereinstimmt", + + "ui_example_panthera_basic_animation": "Panthera Grundanimation", + "ui_example_panthera_basic_animation_description": "Hier ist ein einfaches Beispiel für die Grundanimation von Panthera.", + + "ui_example_panthera_animation_blend": "Panthera Animationsmischung", + "ui_example_panthera_animation_blend_description": "Hier ist ein einfaches Beispiel für die Animationsmischung von Panthera.", + "ui_example_panthera_animation_blend_hint": "Bewege die Maus über diesen Bereich", + + "ui_animation_vertical": "Vertikal", + "ui_animation_horizontal": "Horizontal", + + "ui_language_en": "Englisch", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/en.json b/example/locales/en.json new file mode 100644 index 00000000..8e7cb01f --- /dev/null +++ b/example/locales/en.json @@ -0,0 +1,184 @@ +{ + "additional_characters": "\"&! :%1234567890*абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯÀàÂâÆæÇçÈèÉéÊêËëÎîÏïÔôŒœÙùÛûÜüŸÿ", + "ui_examples": "Examples", + "ui_properties_panel": "Properties", + "ui_output": "Output", + "ui_view_code": "View code", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Memory", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Components", + "ui_profiler_events": "Events", + "ui_confirm": "Confirm", + "ui_cancel": "Cancel", + "ui_value": "Value", + "ui_scroll": "Scroll", + "ui_clipping": "Clipping", + "ui_no_properties": "No properties for this example", + "ui_padding": "Padding", + "ui_margin_x": "Margin X", + "ui_margin_y": "Margin Y", + "ui_justify": "Justify", + "ui_pivot_next": "Next Pivot", + "ui_type_next": "Next Type", + "ui_adjust_next": "Next Adjust", + "ui_enabled": "Enabled", + + "ui_examples_basic": "Basic", + "ui_examples_data_list": "Data List", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Windows", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Introduction", + "ui_example_intro_description": "Here will be a brief description of the selected example.", + + "ui_example_basic_button": "Button", + "ui_example_basic_button_description": "Basic Druid button example", + + "ui_example_basic_button_double_click": "Button Double Click", + "ui_example_basic_button_double_click_description": "How to add double click functionality to the button.", + + "ui_example_basic_button_hold": "Button Hold", + "ui_example_basic_button_hold_description": "How to make hold and trigger functionality for the button.", + + "ui_example_basic_text": "Text", + "ui_example_basic_text_description": "Check how text is adjusted with different properties.", + + "ui_example_basic_multiline_text": "Multiline Text", + "ui_example_basic_multiline_text_description": "Check how multiline text is adjusted with different properties.", + + "ui_example_basic_hover": "Hover", + "ui_example_basic_hover_description": "Hover have two hover events. One for mouse and one for touch. Use mouse_callback for mouse events", + + "ui_example_basic_drag": "Drag", + "ui_example_basic_drag_description": "How to make simple drag node", + + "ui_example_basic_drag_to_node": "Drag To Node", + "ui_example_basic_drag_to_node_description": "How to make drag node to another node and get callbacks", + + "ui_example_basic_slider": "Slider", + "ui_example_basic_slider_description": "How to make simple slider", + + "ui_example_basic_slider_vertical": "Slider Vertical", + "ui_example_basic_slider_vertical_description": "How to make simple vertical slider", + + "ui_example_basic_slider_stepped": "Slider Steps", + "ui_example_basic_slider_stepped_description": "Sliders can have a \"steps\" property to make it stepped", + + "ui_example_basic_progress_bar": "Progress Bar", + "ui_example_basic_progress_bar_description": "How to make simple progress bar", + + "ui_example_basic_progress_bar_slice9": "Progress Bar Slice9", + "ui_example_basic_progress_bar_slice9_description": "The progress component can handle slice9 property to make it scalable at the beginning", + + "ui_example_basic_blocker": "Blocker", + "ui_example_basic_blocker_description": "How to make a blocker from a node to interrupt the input", + + "ui_example_basic_back_handler": "Back Handler", + "ui_example_basic_back_handler_description": "How to create back handler. Is used to shorthand for back button or backspace to call a callback", + + "ui_example_basic_timer": "Timer", + "ui_example_basic_timer_description": "The Timer component is used to display a second timer with a callback", + + "ui_example_basic_hotkey": "Hotkey", + "ui_example_basic_hotkey_description": "How to create a hotkey for a callback", + + "ui_example_basic_scroll": "Scroll", + "ui_example_basic_scroll_description": "How to make simple scroll", + "ui_elastic_scroll": "Elastic Scroll", + + "ui_example_basic_scroll_slider": "Scroll with Slider", + "ui_example_basic_scroll_slider_description": "How to add a slider control to the scroll and use them", + + "ui_example_basic_grid": "Static Grid", + "ui_example_basic_grid_description": "How to place nodes in a grid", + "ui_grid_in_row": "Elements In Row", + "ui_add_element": "Add Element", + "ui_remove_element": "Remove Element", + "ui_clear_elements": "Clear Elements", + + "ui_example_basic_scroll_bind_grid": "Scroll Grid", + "ui_example_basic_scroll_bind_grid_description": "Scroll works good with grids and predefined sizes, this is an example of scroll bind grid.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Scroll Grid Horizontal", + "ui_example_basic_scroll_bind_grid_horizontal_description": "Scroll works good with grids and predefined sizes, this is an example of scroll bind grid horizontal.", + + "ui_example_basic_scroll_bind_grid_points": "Scroll Grid Points", + + "ui_example_basic_input": "Input", + "ui_example_basic_input_description": "How to make most simple input in Druid", + + "ui_example_input_password": "Input Password", + "ui_example_input_password_description": "How the password input works", + + "ui_example_basic_rich_input": "Rich Input", + "ui_example_basic_rich_input_description": "How to make a rich input in Druid", + + "ui_example_basic_rich_text": "Rich Text", + "ui_example_basic_rich_text_description": "How to create a rich text in Druid", + + "ui_example_rich_text_tags": "Rich Text Tags", + "ui_example_rich_text_tags_description": "Here is a simple example of rich text with tags\n - color\n - font\n - size\n - br\n - img", + + "ui_example_basic_swipe": "Swipe", + "ui_example_basic_swipe_description": "How to add callbacks on swipe events", + + "ui_example_basic_checkbox": "Checkbox", + "ui_example_basic_checkbox_description": "How to make a simple checkbox using Druid Button", + + "ui_example_data_list_basic": "Data List Basic", + "ui_example_data_list_basic_description": "How to make a simple data list", + + "ui_example_data_list_horizontal_basic": "Data List Horizontal Basic", + "ui_example_data_list_horizontal_basic_description": "How to make a simple horizontal data list", + + "ui_example_data_list_add_remove_clear": "Data List Add Remove Clear", + "ui_example_data_list_add_remove_clear_description": "How the add, remove and clear functions work in the data list", + + "ui_example_data_list_cache_with_component": "Data List Cached Version", + "ui_example_data_list_cache_with_component_description": "Cached version requires more setup for add/remove callbacks, but it's more memory performant", + + "ui_language": "Language", + "ui_example_window_language": "Window Language", + "ui_example_window_language_description": "Here is a simple example of window with language selection.", + + "ui_confirmation": "Confirmation", + "ui_example_window_confirmation": "Window Confirmation", + "ui_confirmation_description": "Confirm buy the one million dollar car?", + + "ui_information": "Information", + "ui_example_window_information": "Window Information", + "ui_example_window_information_text": "You are the best of the best!", + "ui_example_window_information_description": "Here is a simple example of window with information message.", + + "ui_example_gamepad_tester": "Gamepad Tester", + "ui_example_gamepad_tester_description": "Test your gamepad here to bind buttons and axes", + + "ui_example_on_screen_control": "On Screen Control", + "ui_example_on_screen_control_description": "Here is a simple example of on screen control. The on_screen_input here is a simple joystick with a callback as Druid component", + + "ui_example_layout_basic": "Layout", + "ui_example_layout_basic_description": "This layout can be adjusted to be the same as in Figma", + + "ui_example_panthera_basic_animation": "Panthera Basic Animation", + "ui_example_panthera_basic_animation_description": "Here is a simple example of Panthera Basic Animation.", + + "ui_example_panthera_animation_blend": "Panthera Animation Blend", + "ui_example_panthera_animation_blend_description": "Here is a simple example of Panthera Animation Blend.", + "ui_example_panthera_animation_blend_hint": "Hover mouse over this area", + + "ui_animation_vertical": "Vertical", + "ui_animation_horizontal": "Horizontal", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} \ No newline at end of file diff --git a/example/locales/es.json b/example/locales/es.json new file mode 100644 index 00000000..8c097d01 --- /dev/null +++ b/example/locales/es.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Ejemplos", + "ui_properties_panel": "Propiedades", + "ui_output": "Salida", + "ui_view_code": "Ver código", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Memoria", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Componentes", + "ui_profiler_events": "Eventos", + "ui_confirm": "Confirmar", + "ui_cancel": "Cancelar", + "ui_value": "Valor", + "ui_scroll": "Desplazamiento", + "ui_clipping": "Recorte", + "ui_no_properties": "No hay propiedades para este ejemplo", + "ui_padding": "Relleno", + "ui_margin_x": "Margen X", + "ui_margin_y": "Margen Y", + "ui_justify": "Justificar", + "ui_pivot_next": "Siguiente pivote", + "ui_type_next": "Siguiente tipo", + "ui_adjust_next": "Siguiente ajuste", + "ui_enabled": "Habilitado", + + "ui_examples_basic": "Básico", + "ui_examples_data_list": "Lista de datos", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Ventanas", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Introducción", + "ui_example_intro_description": "Aquí habrá una breve descripción del ejemplo seleccionado.", + + "ui_example_basic_button": "Botón", + "ui_example_basic_button_description": "Ejemplo de botón básico de Druid", + + "ui_example_basic_button_double_click": "Doble clic", + "ui_example_basic_button_double_click_description": "Cómo agregar funcionalidad de doble clic al botón.", + + "ui_example_basic_button_hold": "Mantener", + "ui_example_basic_button_hold_description": "Cómo hacer funcionalidad de mantener y activar para el botón.", + + "ui_example_basic_text": "Texto", + "ui_example_basic_text_description": "Verifique cómo se ajusta el texto con diferentes propiedades.", + + "ui_example_basic_multiline_text": "Texto multilinea", + "ui_example_basic_multiline_text_description": "Verifique cómo se ajusta el texto multilinea con diferentes propiedades.", + + "ui_example_basic_hover": "Hover", + "ui_example_basic_hover_description": "Hover tiene dos eventos de hover. Uno para el ratón y otro para el tacto. Use mouse_callback para eventos de ratón.", + + "ui_example_basic_drag": "Arrastrar", + "ui_example_basic_drag_description": "Cómo hacer un nodo de arrastre simple", + + "ui_example_basic_drag_to_node": "Arrastrar a nodo", + "ui_example_basic_drag_to_node_description": "Cómo arrastrar un nodo a otro nodo y obtener callbacks", + + "ui_example_basic_slider": "Deslizador", + "ui_example_basic_slider_description": "Cómo hacer un deslizador simple", + + "ui_example_basic_slider_vertical": "Deslizador vertical", + "ui_example_basic_slider_vertical_description": "Cómo hacer un deslizador vertical simple", + + "ui_example_basic_slider_stepped": "Deslizador con pasos", + "ui_example_basic_slider_stepped_description": "Los deslizadores pueden tener una propiedad \"pasos\" para hacer que sea escalonado", + + "ui_example_basic_progress_bar": "Barra de progreso", + "ui_example_basic_progress_bar_description": "Cómo hacer una barra de progreso simple", + + "ui_example_basic_progress_bar_slice9": "Barra de progreso Slice9", + "ui_example_basic_progress_bar_slice9_description": "El componente de progreso puede manejar la propiedad slice9 para hacerlo escalable desde el principio", + + "ui_example_basic_timer": "Temporizador", + "ui_example_basic_timer_description": "El componente Temporizador se usa para mostrar un temporizador de segundos con un callback", + + "ui_example_basic_hotkey": "Tecla de acceso rápido", + "ui_example_basic_hotkey_description": "Cómo crear una tecla de acceso rápido para un callback", + + "ui_example_basic_scroll": "Desplazamiento", + "ui_example_basic_scroll_description": "Cómo hacer un desplazamiento simple", + "ui_elastic_scroll": "Desplazamiento elástico", + + "ui_example_basic_scroll_slider": "Desplazamiento con deslizador", + "ui_example_basic_scroll_slider_description": "Cómo agregar un control deslizante al desplazamiento y usarlos", + + "ui_example_basic_grid": "Cuadrícula estática", + "ui_example_basic_grid_description": "Cómo colocar nodos en una cuadrícula", + "ui_grid_in_row": "Elementos en fila", + "ui_add_element": "Agregar elemento", + "ui_remove_element": "Eliminar elemento", + "ui_clear_elements": "Limpiar elementos", + + "ui_example_basic_scroll_bind_grid": "Desplazamiento vinculado a cuadrícula", + "ui_example_basic_scroll_bind_grid_description": "El desplazamiento funciona bien con cuadrículas y tamaños predefinidos, este es un ejemplo de desplazamiento vinculado a cuadrícula.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Desplazamiento vinculado a cuadrícula horizontal", + "ui_example_basic_scroll_bind_grid_horizontal_description": "El desplazamiento funciona bien con cuadrículas y tamaños predefinidos, este es un ejemplo de desplazamiento vinculado a cuadrícula horizontal.", + + "ui_example_basic_input": "Entrada", + "ui_example_basic_input_description": "Cómo hacer la entrada más simple en Druid", + + "ui_example_input_password": "Entrada de contraseña", + "ui_example_input_password_description": "Cómo funciona la entrada de contraseña", + + "ui_example_basic_rich_input": "Entrada enriquecida", + "ui_example_basic_rich_input_description": "Cómo hacer una entrada enriquecida en Druid", + + "ui_example_basic_rich_text": "Texto enriquecido", + "ui_example_basic_rich_text_description": "Cómo crear un texto enriquecido en Druid", + + "ui_example_rich_text_tags": "Etiquetas de texto enriquecido", + "ui_example_rich_text_tags_description": "Aquí hay un ejemplo simple de texto enriquecido con etiquetas\n - color\n - fuente\n - tamaño\n - br\n - img", + + "ui_example_basic_swipe": "Deslizar", + "ui_example_basic_swipe_description": "Cómo agregar callbacks en eventos de deslizar", + + "ui_example_data_list_basic": "Lista de datos básica", + "ui_example_data_list_basic_description": "Cómo hacer una lista de datos simple", + + "ui_example_data_list_horizontal_basic": "Lista de datos horizontal básica", + "ui_example_data_list_horizontal_basic_description": "Cómo hacer una lista de datos horizontal simple", + + "ui_example_data_list_add_remove_clear": "Lista de datos agregar, eliminar, limpiar", + "ui_example_data_list_add_remove_clear_description": "Cómo funcionan las funciones agregar, eliminar y limpiar en la lista de datos", + + "ui_example_data_list_cache_with_component": "Versión en caché de la lista de datos", + "ui_example_data_list_cache_with_component_description": "La versión en caché requiere más configuración para callbacks de agregar/eliminar, pero es más eficiente en memoria", + + "ui_language": "Idioma", + "ui_example_window_language": "Ventana de idioma", + "ui_example_window_language_description": "Aquí hay un ejemplo simple de una ventana con selección de idioma.", + + "ui_confirmation": "Confirmación", + "ui_example_window_confirmation": "Ventana de confirmación", + "ui_confirmation_description": "¿Confirmar la compra del coche de un millón de dólares?", + + "ui_information": "Información", + "ui_example_window_information": "Ventana de información", + "ui_example_window_information_text": "¡Eres el mejor de los mejores!", + "ui_example_window_information_description": "Aquí hay un ejemplo simple de una ventana con un mensaje de información.", + + "ui_example_gamepad_tester": "Tester de gamepad", + "ui_example_gamepad_tester_description": "Prueba tu gamepad aquí para vincular botones y ejes", + + "ui_example_on_screen_control": "Control en pantalla", + "ui_example_on_screen_control_description": "Aquí hay un ejemplo simple de control en pantalla. La entrada en pantalla aquí es un joystick simple con un callback como componente Druid", + + "ui_example_layout_basic": "Diseño", + "ui_example_layout_basic_description": "Este diseño se puede ajustar para que sea igual al de Figma", + + "ui_example_panthera_basic_animation": "Animación básica de Panthera", + "ui_example_panthera_basic_animation_description": "Aquí hay un ejemplo simple de la animación básica de Panthera.", + + "ui_example_panthera_animation_blend": "Mezcla de animaciones de Panthera", + "ui_example_panthera_animation_blend_description": "Aquí hay un ejemplo simple de mezcla de animaciones de Panthera.", + "ui_example_panthera_animation_blend_hint": "Pasa el ratón sobre esta área", + + "ui_animation_vertical": "Vertical", + "ui_animation_horizontal": "Horizontal", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/fr.json b/example/locales/fr.json new file mode 100644 index 00000000..0e6def55 --- /dev/null +++ b/example/locales/fr.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Exemples", + "ui_properties_panel": "Propriétés", + "ui_output": "Sortie", + "ui_view_code": "Voir le code", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Mémoire", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Composants", + "ui_profiler_events": "Événements", + "ui_confirm": "Confirmer", + "ui_cancel": "Annuler", + "ui_value": "Valeur", + "ui_scroll": "Défilement", + "ui_clipping": "Découpe", + "ui_no_properties": "Aucune propriété pour cet exemple", + "ui_padding": "Marge intérieure", + "ui_margin_x": "Marge X", + "ui_margin_y": "Marge Y", + "ui_justify": "Justifier", + "ui_pivot_next": "Prochain pivot", + "ui_type_next": "Prochain type", + "ui_adjust_next": "Prochain ajustement", + "ui_enabled": "Activé", + + "ui_examples_basic": "De base", + "ui_examples_data_list": "Liste de données", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Fenêtres", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Introduction", + "ui_example_intro_description": "Voici une brève description de l'exemple sélectionné.", + + "ui_example_basic_button": "Bouton", + "ui_example_basic_button_description": "Exemple de bouton de base Druid", + + "ui_example_basic_button_double_click": "Double clic", + "ui_example_basic_button_double_click_description": "Comment ajouter une fonctionnalité de double clic au bouton.", + + "ui_example_basic_button_hold": "Maintenir", + "ui_example_basic_button_hold_description": "Comment créer une fonctionnalité de maintien et de déclenchement pour le bouton.", + + "ui_example_basic_text": "Texte", + "ui_example_basic_text_description": "Vérifiez comment le texte est ajusté avec différentes propriétés.", + + "ui_example_basic_multiline_text": "Texte multiligne", + "ui_example_basic_multiline_text_description": "Vérifiez comment le texte multiligne est ajusté avec différentes propriétés.", + + "ui_example_basic_hover": "Survol", + "ui_example_basic_hover_description": "Le survol a deux événements de survol. Un pour la souris et un pour le toucher. Utilisez mouse_callback pour les événements de la souris.", + + "ui_example_basic_drag": "Glisser", + "ui_example_basic_drag_description": "Comment créer un nœud de glissement simple", + + "ui_example_basic_drag_to_node": "Glisser vers le nœud", + "ui_example_basic_drag_to_node_description": "Comment glisser un nœud vers un autre nœud et obtenir des rappels", + + "ui_example_basic_slider": "Curseur", + "ui_example_basic_slider_description": "Comment créer un curseur simple", + + "ui_example_basic_slider_vertical": "Curseur vertical", + "ui_example_basic_slider_vertical_description": "Comment créer un curseur vertical simple", + + "ui_example_basic_slider_stepped": "Curseur à étapes", + "ui_example_basic_slider_stepped_description": "Les curseurs peuvent avoir une propriété \"étapes\" pour les rendre à étapes", + + "ui_example_basic_progress_bar": "Barre de progression", + "ui_example_basic_progress_bar_description": "Comment créer une barre de progression simple", + + "ui_example_basic_progress_bar_slice9": "Barre de progression Slice9", + "ui_example_basic_progress_bar_slice9_description": "Le composant de progression peut gérer la propriété slice9 pour le rendre évolutif dès le début", + + "ui_example_basic_timer": "Minuteur", + "ui_example_basic_timer_description": "Le composant Minuteur est utilisé pour afficher un minuteur en secondes avec un rappel", + + "ui_example_basic_hotkey": "Raccourci", + "ui_example_basic_hotkey_description": "Comment créer un raccourci pour un rappel", + + "ui_example_basic_scroll": "Défilement", + "ui_example_basic_scroll_description": "Comment créer un défilement simple", + "ui_elastic_scroll": "Défilement élastique", + + "ui_example_basic_scroll_slider": "Défilement avec curseur", + "ui_example_basic_scroll_slider_description": "Comment ajouter un contrôle de curseur au défilement et les utiliser", + + "ui_example_basic_grid": "Grille statique", + "ui_example_basic_grid_description": "Comment placer des nœuds dans une grille", + "ui_grid_in_row": "Éléments dans la ligne", + "ui_add_element": "Ajouter un élément", + "ui_remove_element": "Supprimer un élément", + "ui_clear_elements": "Effacer les éléments", + + "ui_example_basic_scroll_bind_grid": "Défilement lié à la grille", + "ui_example_basic_scroll_bind_grid_description": "Le défilement fonctionne bien avec les grilles et les tailles prédéfinies, voici un exemple de défilement lié à une grille.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Défilement lié à la grille horizontale", + "ui_example_basic_scroll_bind_grid_horizontal_description": "Le défilement fonctionne bien avec les grilles et les tailles prédéfinies, voici un exemple de défilement lié à une grille horizontale.", + + "ui_example_basic_input": "Entrée", + "ui_example_basic_input_description": "Comment créer l'entrée la plus simple dans Druid", + + "ui_example_input_password": "Entrée de mot de passe", + "ui_example_input_password_description": "Comment fonctionne l'entrée de mot de passe", + + "ui_example_basic_rich_input": "Entrée riche", + "ui_example_basic_rich_input_description": "Comment créer une entrée riche dans Druid", + + "ui_example_basic_rich_text": "Texte riche", + "ui_example_basic_rich_text_description": "Comment créer un texte riche dans Druid", + + "ui_example_rich_text_tags": "Étiquettes de texte riche", + "ui_example_rich_text_tags_description": "Voici un exemple simple de texte riche avec des étiquettes\n - couleur\n - police\n - taille\n - br\n - img", + + "ui_example_basic_swipe": "Glissement", + "ui_example_basic_swipe_description": "Comment ajouter des rappels aux événements de glissement", + + "ui_example_data_list_basic": "Liste de données de base", + "ui_example_data_list_basic_description": "Comment créer une liste de données simple", + + "ui_example_data_list_horizontal_basic": "Liste de données horizontale de base", + "ui_example_data_list_horizontal_basic_description": "Comment créer une liste de données horizontale simple", + + "ui_example_data_list_add_remove_clear": "Liste de données ajouter, supprimer, effacer", + "ui_example_data_list_add_remove_clear_description": "Comment fonctionnent les fonctions ajouter, supprimer et effacer dans la liste de données", + + "ui_example_data_list_cache_with_component": "Version mise en cache de la liste de données", + "ui_example_data_list_cache_with_component_description": "La version mise en cache nécessite plus de configuration pour les rappels d'ajout/suppression, mais est plus efficace en mémoire", + + "ui_language": "Langue", + "ui_example_window_language": "Fenêtre de langue", + "ui_example_window_language_description": "Voici un exemple simple d'une fenêtre avec sélection de langue.", + + "ui_confirmation": "Confirmation", + "ui_example_window_confirmation": "Fenêtre de confirmation", + "ui_confirmation_description": "Confirmer l'achat de la voiture d'un million de dollars ?", + + "ui_information": "Information", + "ui_example_window_information": "Fenêtre d'information", + "ui_example_window_information_text": "Vous êtes le meilleur des meilleurs !", + "ui_example_window_information_description": "Voici un exemple simple d'une fenêtre avec un message d'information.", + + "ui_example_gamepad_tester": "Testeur de gamepad", + "ui_example_gamepad_tester_description": "Testez votre gamepad ici pour lier des boutons et des axes", + + "ui_example_on_screen_control": "Contrôle à l'écran", + "ui_example_on_screen_control_description": "Voici un exemple simple de contrôle à l'écran. L'entrée à l'écran ici est un joystick simple avec un rappel en tant que composant Druid", + + "ui_example_layout_basic": "Mise en page", + "ui_example_layout_basic_description": "Cette mise en page peut être ajustée pour correspondre à celle de Figma", + + "ui_example_panthera_basic_animation": "Animation de base de Panthera", + "ui_example_panthera_basic_animation_description": "Voici un exemple simple de l'animation de base de Panthera.", + + "ui_example_panthera_animation_blend": "Mélange d'animations de Panthera", + "ui_example_panthera_animation_blend_description": "Voici un exemple simple de mélange d'animations de Panthera.", + "ui_example_panthera_animation_blend_hint": "Survolez cette zone avec la souris", + + "ui_animation_vertical": "Vertical", + "ui_animation_horizontal": "Horizontal", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/it.json b/example/locales/it.json new file mode 100644 index 00000000..9785b103 --- /dev/null +++ b/example/locales/it.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Esempi", + "ui_properties_panel": "Proprietà", + "ui_output": "Uscita", + "ui_view_code": "Visualizza codice", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Memoria", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Componenti", + "ui_profiler_events": "Eventi", + "ui_confirm": "Conferma", + "ui_cancel": "Annulla", + "ui_value": "Valore", + "ui_scroll": "Scorrimento", + "ui_clipping": "Ritaglio", + "ui_no_properties": "Nessuna proprietà per questo esempio", + "ui_padding": "Padding", + "ui_margin_x": "Margine X", + "ui_margin_y": "Margine Y", + "ui_justify": "Giustifica", + "ui_pivot_next": "Prossimo Pivot", + "ui_type_next": "Prossimo Tipo", + "ui_adjust_next": "Prossimo Regolazione", + "ui_enabled": "Abilitato", + + "ui_examples_basic": "Base", + "ui_examples_data_list": "Lista di dati", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Finestre", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Introduzione", + "ui_example_intro_description": "Qui ci sarà una breve descrizione dell'esempio selezionato.", + + "ui_example_basic_button": "Pulsante", + "ui_example_basic_button_description": "Esempio di pulsante base di Druid", + + "ui_example_basic_button_double_click": "Doppio clic", + "ui_example_basic_button_double_click_description": "Come aggiungere la funzionalità di doppio clic al pulsante.", + + "ui_example_basic_button_hold": "Tieni premuto", + "ui_example_basic_button_hold_description": "Come creare la funzionalità di mantenimento e attivazione per il pulsante.", + + "ui_example_basic_text": "Testo", + "ui_example_basic_text_description": "Controlla come il testo viene regolato con diverse proprietà.", + + "ui_example_basic_multiline_text": "Testo multiriga", + "ui_example_basic_multiline_text_description": "Controlla come il testo multiriga viene regolato con diverse proprietà.", + + "ui_example_basic_hover": "Hover", + "ui_example_basic_hover_description": "L'hover ha due eventi di hover. Uno per il mouse e uno per il tocco. Usa mouse_callback per gli eventi del mouse.", + + "ui_example_basic_drag": "Trascina", + "ui_example_basic_drag_description": "Come creare un nodo di trascinamento semplice", + + "ui_example_basic_drag_to_node": "Trascina al nodo", + "ui_example_basic_drag_to_node_description": "Come trascinare un nodo su un altro nodo e ottenere callback", + + "ui_example_basic_slider": "Slider", + "ui_example_basic_slider_description": "Come creare uno slider semplice", + + "ui_example_basic_slider_vertical": "Slider verticale", + "ui_example_basic_slider_vertical_description": "Come creare uno slider verticale semplice", + + "ui_example_basic_slider_stepped": "Slider a passi", + "ui_example_basic_slider_stepped_description": "Gli slider possono avere una proprietà \"passi\" per renderli a scatti", + + "ui_example_basic_progress_bar": "Barra di avanzamento", + "ui_example_basic_progress_bar_description": "Come creare una barra di avanzamento semplice", + + "ui_example_basic_progress_bar_slice9": "Barra di avanzamento Slice9", + "ui_example_basic_progress_bar_slice9_description": "Il componente di avanzamento può gestire la proprietà slice9 per renderlo scalabile dall'inizio", + + "ui_example_basic_timer": "Timer", + "ui_example_basic_timer_description": "Il componente Timer viene utilizzato per visualizzare un timer di secondi con un callback", + + "ui_example_basic_hotkey": "Tasto di scelta rapida", + "ui_example_basic_hotkey_description": "Come creare un tasto di scelta rapida per un callback", + + "ui_example_basic_scroll": "Scorrimento", + "ui_example_basic_scroll_description": "Come creare uno scorrimento semplice", + "ui_elastic_scroll": "Scorrimento elastico", + + "ui_example_basic_scroll_slider": "Scorrimento con slider", + "ui_example_basic_scroll_slider_description": "Come aggiungere un controllo slider allo scorrimento e usarli", + + "ui_example_basic_grid": "Griglia statica", + "ui_example_basic_grid_description": "Come posizionare nodi in una griglia", + "ui_grid_in_row": "Elementi nella riga", + "ui_add_element": "Aggiungi elemento", + "ui_remove_element": "Rimuovi elemento", + "ui_clear_elements": "Pulisci elementi", + + "ui_example_basic_scroll_bind_grid": "Scorrimento con griglia vincolata", + "ui_example_basic_scroll_bind_grid_description": "Lo scorrimento funziona bene con le griglie e le dimensioni predefinite, questo è un esempio di scorrimento con griglia vincolata.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Scorrimento con griglia vincolata orizzontale", + "ui_example_basic_scroll_bind_grid_horizontal_description": "Lo scorrimento funziona bene con le griglie e le dimensioni predefinite, questo è un esempio di scorrimento con griglia vincolata orizzontale.", + + "ui_example_basic_input": "Input", + "ui_example_basic_input_description": "Come creare l'input più semplice in Druid", + + "ui_example_input_password": "Input password", + "ui_example_input_password_description": "Come funziona l'input della password", + + "ui_example_basic_rich_input": "Input ricco", + "ui_example_basic_rich_input_description": "Come creare un input ricco in Druid", + + "ui_example_basic_rich_text": "Testo ricco", + "ui_example_basic_rich_text_description": "Come creare un testo ricco in Druid", + + "ui_example_rich_text_tags": "Tag di testo ricco", + "ui_example_rich_text_tags_description": "Ecco un semplice esempio di testo ricco con tag\n - colore\n - font\n - dimensione\n - br\n - img", + + "ui_example_basic_swipe": "Scorrere", + "ui_example_basic_swipe_description": "Come aggiungere callback agli eventi di scorrimento", + + "ui_example_data_list_basic": "Lista dati di base", + "ui_example_data_list_basic_description": "Come creare una semplice lista di dati", + + "ui_example_data_list_horizontal_basic": "Lista dati orizzontale di base", + "ui_example_data_list_horizontal_basic_description": "Come creare una semplice lista di dati orizzontale", + + "ui_example_data_list_add_remove_clear": "Lista dati aggiungi, rimuovi, cancella", + "ui_example_data_list_add_remove_clear_description": "Come funzionano le funzioni di aggiunta, rimozione e cancellazione nella lista di dati", + + "ui_example_data_list_cache_with_component": "Versione cache della lista dati", + "ui_example_data_list_cache_with_component_description": "La versione cache richiede più configurazione per i callback di aggiunta/rimozione, ma è più efficiente in termini di memoria", + + "ui_language": "Lingua", + "ui_example_window_language": "Finestra di selezione lingua", + "ui_example_window_language_description": "Ecco un semplice esempio di finestra con selezione della lingua.", + + "ui_confirmation": "Conferma", + "ui_example_window_confirmation": "Finestra di conferma", + "ui_confirmation_description": "Confermare l'acquisto dell'auto da un milione di dollari?", + + "ui_information": "Informazione", + "ui_example_window_information": "Finestra di informazione", + "ui_example_window_information_text": "Sei il migliore del migliore!", + "ui_example_window_information_description": "Ecco un semplice esempio di finestra con un messaggio informativo.", + + "ui_example_gamepad_tester": "Tester di gamepad", + "ui_example_gamepad_tester_description": "Prova qui il tuo gamepad per collegare pulsanti e assi", + + "ui_example_on_screen_control": "Controllo a schermo", + "ui_example_on_screen_control_description": "Ecco un semplice esempio di controllo a schermo. L'input a schermo qui è un joystick semplice con un callback come componente Druid", + + "ui_example_layout_basic": "Layout", + "ui_example_layout_basic_description": "Questo layout può essere regolato per essere uguale a quello di Figma", + + "ui_example_panthera_basic_animation": "Animazione base di Panthera", + "ui_example_panthera_basic_animation_description": "Ecco un semplice esempio dell'animazione base di Panthera.", + + "ui_example_panthera_animation_blend": "Mischia di animazioni di Panthera", + "ui_example_panthera_animation_blend_description": "Ecco un semplice esempio di mischia di animazioni di Panthera.", + "ui_example_panthera_animation_blend_hint": "Passa il mouse su quest'area", + + "ui_animation_vertical": "Verticale", + "ui_animation_horizontal": "Orizzontale", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/ja.json b/example/locales/ja.json new file mode 100644 index 00000000..cc045297 --- /dev/null +++ b/example/locales/ja.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "例", + "ui_properties_panel": "プロパティ", + "ui_output": "出力", + "ui_view_code": "コードを見る", + "ui_profiler": "プロファイラ", + "ui_profiler_memory": "メモリ", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "コンポーネント", + "ui_profiler_events": "イベント", + "ui_confirm": "確認", + "ui_cancel": "キャンセル", + "ui_value": "値", + "ui_scroll": "スクロール", + "ui_clipping": "クリッピング", + "ui_no_properties": "この例にプロパティはありません", + "ui_padding": "パディング", + "ui_margin_x": "マージン X", + "ui_margin_y": "マージン Y", + "ui_justify": "両端揃え", + "ui_pivot_next": "次のピボット", + "ui_type_next": "次のタイプ", + "ui_adjust_next": "次の調整", + "ui_enabled": "有効", + + "ui_examples_basic": "基本", + "ui_examples_data_list": "データリスト", + "ui_examples_gamepad": "ゲームパッド", + "ui_examples_window": "ウィンドウ", + "ui_examples_panthera": "パンテラ", + + "ui_example_intro": "紹介", + "ui_example_intro_description": "ここには、選択された例の簡単な説明が表示されます。", + + "ui_example_basic_button": "ボタン", + "ui_example_basic_button_description": "Druid の基本的なボタンの例", + + "ui_example_basic_button_double_click": "ダブルクリック", + "ui_example_basic_button_double_click_description": "ボタンにダブルクリック機能を追加する方法。", + + "ui_example_basic_button_hold": "長押し", + "ui_example_basic_button_hold_description": "ボタンの長押しとトリガー機能を作成する方法。", + + "ui_example_basic_text": "テキスト", + "ui_example_basic_text_description": "異なるプロパティでテキストがどのように調整されるかを確認します。", + + "ui_example_basic_multiline_text": "複数行テキスト", + "ui_example_basic_multiline_text_description": "異なるプロパティで複数行のテキストがどのように調整されるかを確認します。", + + "ui_example_basic_hover": "ホバー", + "ui_example_basic_hover_description": "ホバーには2つのホバーイベントがあります。マウス用とタッチ用です。マウスイベントには mouse_callback を使用してください。", + + "ui_example_basic_drag": "ドラッグ", + "ui_example_basic_drag_description": "簡単なドラッグノードを作成する方法", + + "ui_example_basic_drag_to_node": "ノードにドラッグ", + "ui_example_basic_drag_to_node_description": "ノードを別のノードにドラッグしてコールバックを取得する方法", + + "ui_example_basic_slider": "スライダー", + "ui_example_basic_slider_description": "簡単なスライダーを作成する方法", + + "ui_example_basic_slider_vertical": "垂直スライダー", + "ui_example_basic_slider_vertical_description": "簡単な垂直スライダーを作成する方法", + + "ui_example_basic_slider_stepped": "ステップ付きスライダー", + "ui_example_basic_slider_stepped_description": "スライダーには「ステップ」プロパティがあり、ステップ付きにすることができます。", + + "ui_example_basic_progress_bar": "プログレスバー", + "ui_example_basic_progress_bar_description": "簡単なプログレスバーを作成する方法", + + "ui_example_basic_progress_bar_slice9": "プログレスバー Slice9", + "ui_example_basic_progress_bar_slice9_description": "プログレスコンポーネントは、最初からスケーラブルにするために slice9 プロパティを処理できます。", + + "ui_example_basic_timer": "タイマー", + "ui_example_basic_timer_description": "タイマーコンポーネントは、コールバック付きの秒数のタイマーを表示するために使用されます。", + + "ui_example_basic_hotkey": "ホットキー", + "ui_example_basic_hotkey_description": "コールバック用のホットキーを作成する方法", + + "ui_example_basic_scroll": "スクロール", + "ui_example_basic_scroll_description": "簡単なスクロールを作成する方法", + "ui_elastic_scroll": "エラスティックスクロール", + + "ui_example_basic_scroll_slider": "スライダー付きスクロール", + "ui_example_basic_scroll_slider_description": "スクロールにスライダーコントロールを追加して使用する方法", + + "ui_example_basic_grid": "静的グリッド", + "ui_example_basic_grid_description": "ノードをグリッドに配置する方法", + "ui_grid_in_row": "行の要素", + "ui_add_element": "要素を追加", + "ui_remove_element": "要素を削除", + "ui_clear_elements": "要素をクリア", + + "ui_example_basic_scroll_bind_grid": "スクロールバインドグリッド", + "ui_example_basic_scroll_bind_grid_description": "スクロールはグリッドと事前定義されたサイズでうまく機能します。これはスクロールバインドグリッドの例です。", + + "ui_example_basic_scroll_bind_grid_horizontal": "水平スクロールバインドグリッド", + "ui_example_basic_scroll_bind_grid_horizontal_description": "スクロールはグリッドと事前定義されたサイズでうまく機能します。これは水平スクロールバインドグリッドの例です。", + + "ui_example_basic_input": "入力", + "ui_example_basic_input_description": "Druid で最も単純な入力を作成する方法", + + "ui_example_input_password": "パスワード入力", + "ui_example_input_password_description": "パスワード入力がどのように機能するか", + + "ui_example_basic_rich_input": "リッチ入力", + "ui_example_basic_rich_input_description": "Druid でリッチ入力を作成する方法", + + "ui_example_basic_rich_text": "リッチテキスト", + "ui_example_basic_rich_text_description": "Druid でリッチテキストを作成する方法", + + "ui_example_rich_text_tags": "リッチテキストタグ", + "ui_example_rich_text_tags_description": "ここにタグ付きリッチテキストの簡単な例があります\n - 色\n - フォント\n - サイズ\n - br\n - img", + + "ui_example_basic_swipe": "スワイプ", + "ui_example_basic_swipe_description": "スワイプイベントにコールバックを追加する方法", + + "ui_example_data_list_basic": "基本データリスト", + "ui_example_data_list_basic_description": "シンプルなデータリストを作成する方法", + + "ui_example_data_list_horizontal_basic": "基本水平データリスト", + "ui_example_data_list_horizontal_basic_description": "シンプルな水平データリストを作成する方法", + + "ui_example_data_list_add_remove_clear": "データリストの追加、削除、クリア", + "ui_example_data_list_add_remove_clear_description": "データリスト内の追加、削除、およびクリア機能がどのように機能するか", + + "ui_example_data_list_cache_with_component": "キャッシュされたデータリスト", + "ui_example_data_list_cache_with_component_description": "キャッシュされたバージョンは、追加/削除のコールバックにより多くの設定が必要ですが、メモリ効率が向上します。", + + "ui_language": "言語", + "ui_example_window_language": "ウィンドウ言語", + "ui_example_window_language_description": "言語選択のあるウィンドウの簡単な例です。", + + "ui_confirmation": "確認", + "ui_example_window_confirmation": "ウィンドウ確認", + "ui_confirmation_description": "100万ドルの車を購入することを確認しますか?", + + "ui_information": "情報", + "ui_example_window_information": "ウィンドウ情報", + "ui_example_window_information_text": "あなたは最高の中の最高です!", + "ui_example_window_information_description": "情報メッセージを含むウィンドウの簡単な例です。", + + "ui_example_gamepad_tester": "ゲームパッドテスター", + "ui_example_gamepad_tester_description": "ここでゲームパッドをテストして、ボタンと軸をバインドします", + + "ui_example_on_screen_control": "画面上のコントロール", + "ui_example_on_screen_control_description": "画面上のコントロールの簡単な例です。ここでの on_screen_input はコールバックを持つシンプルなジョイスティックです。Druid コンポーネントとして", + + "ui_example_layout_basic": "レイアウト", + "ui_example_layout_basic_description": "このレイアウトは、Figma と同じになるように調整できます。", + + "ui_example_panthera_basic_animation": "パンテラ基本アニメーション", + "ui_example_panthera_basic_animation_description": "ここにパンテラ基本アニメーションの簡単な例があります。", + + "ui_example_panthera_animation_blend": "パンテラアニメーションブレンド", + "ui_example_panthera_animation_blend_description": "ここにパンテラアニメーションブレンドの簡単な例があります。", + "ui_example_panthera_animation_blend_hint": "この領域にマウスをホバーします。", + + "ui_animation_vertical": "垂直", + "ui_animation_horizontal": "水平", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/kr.json b/example/locales/kr.json new file mode 100644 index 00000000..915c70e9 --- /dev/null +++ b/example/locales/kr.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "예시", + "ui_properties_panel": "속성", + "ui_output": "출력", + "ui_view_code": "코드 보기", + "ui_profiler": "프로파일러", + "ui_profiler_memory": "메모리", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "구성 요소", + "ui_profiler_events": "이벤트", + "ui_confirm": "확인", + "ui_cancel": "취소", + "ui_value": "값", + "ui_scroll": "스크롤", + "ui_clipping": "클리핑", + "ui_no_properties": "이 예제에 대한 속성이 없습니다.", + "ui_padding": "패딩", + "ui_margin_x": "여백 X", + "ui_margin_y": "여백 Y", + "ui_justify": "정렬", + "ui_pivot_next": "다음 피벗", + "ui_type_next": "다음 유형", + "ui_adjust_next": "다음 조정", + "ui_enabled": "활성화", + + "ui_examples_basic": "기본", + "ui_examples_data_list": "데이터 목록", + "ui_examples_gamepad": "게임패드", + "ui_examples_window": "윈도우", + "ui_examples_panthera": "팬테라", + + "ui_example_intro": "소개", + "ui_example_intro_description": "여기에는 선택한 예제에 대한 간략한 설명이 표시됩니다.", + + "ui_example_basic_button": "버튼", + "ui_example_basic_button_description": "Druid의 기본 버튼 예시", + + "ui_example_basic_button_double_click": "더블 클릭", + "ui_example_basic_button_double_click_description": "버튼에 더블 클릭 기능을 추가하는 방법입니다.", + + "ui_example_basic_button_hold": "버튼 누르기", + "ui_example_basic_button_hold_description": "버튼에 대해 누르기 및 트리거 기능을 만드는 방법입니다.", + + "ui_example_basic_text": "텍스트", + "ui_example_basic_text_description": "텍스트가 다양한 속성으로 어떻게 조정되는지 확인하십시오.", + + "ui_example_basic_multiline_text": "다중 행 텍스트", + "ui_example_basic_multiline_text_description": "다중 행 텍스트가 다양한 속성으로 어떻게 조정되는지 확인하십시오.", + + "ui_example_basic_hover": "호버", + "ui_example_basic_hover_description": "호버에는 두 개의 호버 이벤트가 있습니다. 하나는 마우스용이고, 다른 하나는 터치용입니다. 마우스 이벤트에는 mouse_callback을 사용하십시오.", + + "ui_example_basic_drag": "드래그", + "ui_example_basic_drag_description": "간단한 드래그 노드를 만드는 방법입니다.", + + "ui_example_basic_drag_to_node": "노드로 드래그", + "ui_example_basic_drag_to_node_description": "노드를 다른 노드로 드래그하고 콜백을 받는 방법입니다.", + + "ui_example_basic_slider": "슬라이더", + "ui_example_basic_slider_description": "간단한 슬라이더를 만드는 방법입니다.", + + "ui_example_basic_slider_vertical": "수직 슬라이더", + "ui_example_basic_slider_vertical_description": "간단한 수직 슬라이더를 만드는 방법입니다.", + + "ui_example_basic_slider_stepped": "단계 슬라이더", + "ui_example_basic_slider_stepped_description": "슬라이더는 \"단계\" 속성을 가질 수 있어 단계를 만들 수 있습니다.", + + "ui_example_basic_progress_bar": "진행 바", + "ui_example_basic_progress_bar_description": "간단한 진행 바를 만드는 방법입니다.", + + "ui_example_basic_progress_bar_slice9": "진행 바 Slice9", + "ui_example_basic_progress_bar_slice9_description": "진행 컴포넌트는 시작할 때 스케일 가능하도록 slice9 속성을 처리할 수 있습니다.", + + "ui_example_basic_timer": "타이머", + "ui_example_basic_timer_description": "타이머 구성 요소는 콜백이 있는 초 타이머를 표시하는 데 사용됩니다.", + + "ui_example_basic_hotkey": "단축키", + "ui_example_basic_hotkey_description": "콜백에 대한 단축키를 만드는 방법입니다.", + + "ui_example_basic_scroll": "스크롤", + "ui_example_basic_scroll_description": "간단한 스크롤을 만드는 방법입니다.", + "ui_elastic_scroll": "탄력 스크롤", + + "ui_example_basic_scroll_slider": "슬라이더와 함께 스크롤", + "ui_example_basic_scroll_slider_description": "스크롤에 슬라이더 컨트롤을 추가하고 사용하는 방법입니다.", + + "ui_example_basic_grid": "정적 그리드", + "ui_example_basic_grid_description": "그리드에 노드를 배치하는 방법입니다.", + "ui_grid_in_row": "행 내 요소", + "ui_add_element": "요소 추가", + "ui_remove_element": "요소 제거", + "ui_clear_elements": "요소 지우기", + + "ui_example_basic_scroll_bind_grid": "스크롤 바인드 그리드", + "ui_example_basic_scroll_bind_grid_description": "스크롤은 그리드 및 사전 정의된 크기와 잘 작동합니다. 이것은 스크롤 바인드 그리드의 예입니다.", + + "ui_example_basic_scroll_bind_grid_horizontal": "수평 스크롤 바인드 그리드", + "ui_example_basic_scroll_bind_grid_horizontal_description": "스크롤은 그리드 및 사전 정의된 크기와 잘 작동합니다. 이것은 수평 스크롤 바인드 그리드의 예입니다.", + + "ui_example_basic_input": "입력", + "ui_example_basic_input_description": "Druid에서 가장 간단한 입력을 만드는 방법입니다.", + + "ui_example_input_password": "비밀번호 입력", + "ui_example_input_password_description": "비밀번호 입력이 어떻게 작동하는지입니다.", + + "ui_example_basic_rich_input": "리치 입력", + "ui_example_basic_rich_input_description": "Druid에서 리치 입력을 만드는 방법입니다.", + + "ui_example_basic_rich_text": "리치 텍스트", + "ui_example_basic_rich_text_description": "Druid에서 리치 텍스트를 만드는 방법입니다.", + + "ui_example_rich_text_tags": "리치 텍스트 태그", + "ui_example_rich_text_tags_description": "여기에는 태그가 있는 리치 텍스트의 간단한 예가 있습니다\n - 색상\n - 글꼴\n - 크기\n - br\n - img", + + "ui_example_basic_swipe": "스와이프", + "ui_example_basic_swipe_description": "스와이프 이벤트에 콜백을 추가하는 방법입니다.", + + "ui_example_data_list_basic": "기본 데이터 목록", + "ui_example_data_list_basic_description": "간단한 데이터 목록을 만드는 방법입니다.", + + "ui_example_data_list_horizontal_basic": "수평 기본 데이터 목록", + "ui_example_data_list_horizontal_basic_description": "간단한 수평 데이터 목록을 만드는 방법입니다.", + + "ui_example_data_list_add_remove_clear": "데이터 목록 추가, 제거, 지우기", + "ui_example_data_list_add_remove_clear_description": "데이터 목록에서 추가, 제거 및 지우기 기능이 어떻게 작동하는지입니다.", + + "ui_example_data_list_cache_with_component": "캐시된 데이터 목록 버전", + "ui_example_data_list_cache_with_component_description": "캐시된 버전은 추가/제거 콜백에 대해 더 많은 설정이 필요하지만 메모리 효율이 더 좋습니다.", + + "ui_language": "언어", + "ui_example_window_language": "창 언어", + "ui_example_window_language_description": "언어 선택이 있는 창의 간단한 예입니다.", + + "ui_confirmation": "확인", + "ui_example_window_confirmation": "창 확인", + "ui_confirmation_description": "100만 달러 자동차 구매를 확인하시겠습니까?", + + "ui_information": "정보", + "ui_example_window_information": "정보 창", + "ui_example_window_information_text": "당신은 최고 중의 최고입니다!", + "ui_example_window_information_description": "정보 메시지를 포함한 창의 간단한 예입니다.", + + "ui_example_gamepad_tester": "게임패드 테스터", + "ui_example_gamepad_tester_description": "여기에서 게임패드를 테스트하여 버튼과 축을 바인딩합니다.", + + "ui_example_on_screen_control": "화면 위의 제어", + "ui_example_on_screen_control_description": "화면 위의 제어에 대한 간단한 예입니다. 여기의 on_screen_input은 Druid 구성 요소로서 콜백이 있는 간단한 조이스틱입니다.", + + "ui_example_layout_basic": "레이아웃", + "ui_example_layout_basic_description": "이 레이아웃은 Figma와 같도록 조정할 수 있습니다.", + + "ui_example_panthera_basic_animation": "팬테라 기본 애니메이션", + "ui_example_panthera_basic_animation_description": "여기에는 팬테라 기본 애니메이션의 간단한 예가 있습니다.", + + "ui_example_panthera_animation_blend": "팬테라 애니메이션 혼합", + "ui_example_panthera_animation_blend_description": "여기에는 팬테라 애니메이션 혼합의 간단한 예가 있습니다.", + "ui_example_panthera_animation_blend_hint": "이 영역 위에 마우스를 올려 놓으세요.", + + "ui_animation_vertical": "수직", + "ui_animation_horizontal": "수평", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/pt.json b/example/locales/pt.json new file mode 100644 index 00000000..c5722298 --- /dev/null +++ b/example/locales/pt.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Exemplos", + "ui_properties_panel": "Propriedades", + "ui_output": "Saída", + "ui_view_code": "Ver código", + "ui_profiler": "Profiler", + "ui_profiler_memory": "Memória", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Componentes", + "ui_profiler_events": "Eventos", + "ui_confirm": "Confirmar", + "ui_cancel": "Cancelar", + "ui_value": "Valor", + "ui_scroll": "Rolagem", + "ui_clipping": "Recorte", + "ui_no_properties": "Sem propriedades para este exemplo", + "ui_padding": "Preenchimento", + "ui_margin_x": "Margem X", + "ui_margin_y": "Margem Y", + "ui_justify": "Justificar", + "ui_pivot_next": "Próximo Ponto de Pivô", + "ui_type_next": "Próximo Tipo", + "ui_adjust_next": "Próxima Ajuste", + "ui_enabled": "Habilitado", + + "ui_examples_basic": "Básico", + "ui_examples_data_list": "Lista de dados", + "ui_examples_gamepad": "Gamepad", + "ui_examples_window": "Janelas", + "ui_examples_panthera": "Panthera", + + "ui_example_intro": "Introdução", + "ui_example_intro_description": "Aqui haverá uma breve descrição do exemplo selecionado.", + + "ui_example_basic_button": "Botão", + "ui_example_basic_button_description": "Exemplo de botão básico do Druid", + + "ui_example_basic_button_double_click": "Duplo Clique", + "ui_example_basic_button_double_click_description": "Como adicionar funcionalidade de duplo clique ao botão.", + + "ui_example_basic_button_hold": "Manter Botão", + "ui_example_basic_button_hold_description": "Como fazer a funcionalidade de manter e acionar para o botão.", + + "ui_example_basic_text": "Texto", + "ui_example_basic_text_description": "Verifique como o texto é ajustado com diferentes propriedades.", + + "ui_example_basic_multiline_text": "Texto Multilinha", + "ui_example_basic_multiline_text_description": "Verifique como o texto multilinha é ajustado com diferentes propriedades.", + + "ui_example_basic_hover": "Hover", + "ui_example_basic_hover_description": "O hover possui dois eventos de hover. Um para o mouse e um para toque. Use mouse_callback para eventos de mouse.", + + "ui_example_basic_drag": "Arrastar", + "ui_example_basic_drag_description": "Como criar um nó de arrastar simples", + + "ui_example_basic_drag_to_node": "Arrastar para Nó", + "ui_example_basic_drag_to_node_description": "Como arrastar um nó para outro nó e obter callbacks", + + "ui_example_basic_slider": "Slider", + "ui_example_basic_slider_description": "Como fazer um slider simples", + + "ui_example_basic_slider_vertical": "Slider Vertical", + "ui_example_basic_slider_vertical_description": "Como fazer um slider vertical simples", + + "ui_example_basic_slider_stepped": "Slider com Passos", + "ui_example_basic_slider_stepped_description": "Os sliders podem ter uma propriedade \"passos\" para torná-los escalonados.", + + "ui_example_basic_progress_bar": "Barra de Progresso", + "ui_example_basic_progress_bar_description": "Como fazer uma barra de progresso simples", + + "ui_example_basic_progress_bar_slice9": "Barra de Progresso Slice9", + "ui_example_basic_progress_bar_slice9_description": "O componente de progresso pode lidar com a propriedade slice9 para torná-lo escalável desde o início.", + + "ui_example_basic_timer": "Temporizador", + "ui_example_basic_timer_description": "O componente Temporizador é usado para exibir um temporizador de segundos com um callback.", + + "ui_example_basic_hotkey": "Tecla de Atalho", + "ui_example_basic_hotkey_description": "Como criar uma tecla de atalho para um callback.", + + "ui_example_basic_scroll": "Rolagem", + "ui_example_basic_scroll_description": "Como fazer uma rolagem simples.", + "ui_elastic_scroll": "Rolagem Elástica", + + "ui_example_basic_scroll_slider": "Rolagem com Slider", + "ui_example_basic_scroll_slider_description": "Como adicionar um controle deslizante à rolagem e usá-lo.", + + "ui_example_basic_grid": "Grade Estática", + "ui_example_basic_grid_description": "Como posicionar nós em uma grade.", + "ui_grid_in_row": "Elementos na Linha", + "ui_add_element": "Adicionar Elemento", + "ui_remove_element": "Remover Elemento", + "ui_clear_elements": "Limpar Elementos", + + "ui_example_basic_scroll_bind_grid": "Rolagem com Grade Vinculada", + "ui_example_basic_scroll_bind_grid_description": "A rolagem funciona bem com grades e tamanhos predefinidos; este é um exemplo de rolagem com grade vinculada.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Rolagem com Grade Vinculada Horizontal", + "ui_example_basic_scroll_bind_grid_horizontal_description": "A rolagem funciona bem com grades e tamanhos predefinidos; este é um exemplo de rolagem com grade vinculada horizontal.", + + "ui_example_basic_input": "Entrada", + "ui_example_basic_input_description": "Como fazer a entrada mais simples no Druid.", + + "ui_example_input_password": "Entrada de Senha", + "ui_example_input_password_description": "Como funciona a entrada de senha.", + + "ui_example_basic_rich_input": "Entrada Rica", + "ui_example_basic_rich_input_description": "Como fazer uma entrada rica no Druid.", + + "ui_example_basic_rich_text": "Texto Rico", + "ui_example_basic_rich_text_description": "Como criar um texto rico no Druid.", + + "ui_example_rich_text_tags": "Tags de Texto Rico", + "ui_example_rich_text_tags_description": "Aqui está um exemplo simples de texto rico com tags\n - cor\n - fonte\n - tamanho\n - br\n - img", + + "ui_example_basic_swipe": "Deslizar", + "ui_example_basic_swipe_description": "Como adicionar callbacks em eventos de deslizar.", + + "ui_example_data_list_basic": "Lista de Dados Básica", + "ui_example_data_list_basic_description": "Como fazer uma lista de dados simples.", + + "ui_example_data_list_horizontal_basic": "Lista de Dados Horizontal Básica", + "ui_example_data_list_horizontal_basic_description": "Como fazer uma lista de dados horizontal simples.", + + "ui_example_data_list_add_remove_clear": "Adicionar, Remover e Limpar na Lista de Dados", + "ui_example_data_list_add_remove_clear_description": "Como as funções de adicionar, remover e limpar funcionam na lista de dados.", + + "ui_example_data_list_cache_with_component": "Versão em Cache da Lista de Dados", + "ui_example_data_list_cache_with_component_description": "A versão em cache requer mais configuração para callbacks de adicionar/remover, mas é mais eficiente em memória.", + + "ui_language": "Idioma", + "ui_example_window_language": "Janela de Idioma", + "ui_example_window_language_description": "Aqui está um exemplo simples de uma janela com seleção de idioma.", + + "ui_confirmation": "Confirmação", + "ui_example_window_confirmation": "Janela de Confirmação", + "ui_confirmation_description": "Confirmar a compra do carro de um milhão de dólares?", + + "ui_information": "Informação", + "ui_example_window_information": "Janela de Informação", + "ui_example_window_information_text": "Você é o melhor dos melhores!", + "ui_example_window_information_description": "Aqui está um exemplo simples de uma janela com uma mensagem de informação.", + + "ui_example_gamepad_tester": "Testador de Gamepad", + "ui_example_gamepad_tester_description": "Teste seu gamepad aqui para vincular botões e eixos.", + + "ui_example_on_screen_control": "Controle na Tela", + "ui_example_on_screen_control_description": "Aqui está um exemplo simples de controle na tela. A entrada na tela aqui é um joystick simples com um callback como componente do Druid.", + + "ui_example_layout_basic": "Layout", + "ui_example_layout_basic_description": "Este layout pode ser ajustado para ser igual ao do Figma.", + + "ui_example_panthera_basic_animation": "Animação Básica da Panthera", + "ui_example_panthera_basic_animation_description": "Aqui está um exemplo simples da animação básica da Panthera.", + + "ui_example_panthera_animation_blend": "Mistura de Animações da Panthera", + "ui_example_panthera_animation_blend_description": "Aqui está um exemplo simples da mistura de animações da Panthera.", + "ui_example_panthera_animation_blend_hint": "Passe o mouse sobre esta área.", + + "ui_animation_vertical": "Vertical", + "ui_animation_horizontal": "Horizontal", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/ru.json b/example/locales/ru.json new file mode 100644 index 00000000..d3b1f758 --- /dev/null +++ b/example/locales/ru.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "Примеры", + "ui_properties_panel": "Свойства", + "ui_output": "Вывод", + "ui_view_code": "Просмотр кода", + "ui_profiler": "Профайлер", + "ui_profiler_memory": "Память", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "Компоненты", + "ui_profiler_events": "События", + "ui_confirm": "Подтвердить", + "ui_cancel": "Отмена", + "ui_value": "Значение", + "ui_scroll": "Прокрутка", + "ui_clipping": "Обрезка", + "ui_no_properties": "Нет свойств для этого примера", + "ui_padding": "Отступ", + "ui_margin_x": "Отступ по X", + "ui_margin_y": "Отступ по Y", + "ui_justify": "Выровнять", + "ui_pivot_next": "След. якорь", + "ui_type_next": "След. тип", + "ui_adjust_next": "След. тип сжатия", + "ui_enabled": "Включено", + + "ui_examples_basic": "Основные", + "ui_examples_data_list": "Список данных", + "ui_examples_gamepad": "Геймпад", + "ui_examples_window": "Окна", + "ui_examples_panthera": "Пантера", + + "ui_example_intro": "Введение", + "ui_example_intro_description": "Здесь будет краткое описание выбранного примера.", + + "ui_example_basic_button": "Кнопка", + "ui_example_basic_button_description": "Пример базовой кнопки Druid", + + "ui_example_basic_button_double_click": "Двойной щелчок", + "ui_example_basic_button_double_click_description": "Как добавить функциональность двойного щелчка к кнопке.", + + "ui_example_basic_button_hold": "Удержание кнопки", + "ui_example_basic_button_hold_description": "Как сделать функционал удержания и триггера для кнопки.", + + "ui_example_basic_text": "Текст", + "ui_example_basic_text_description": "Проверьте, как текст настраивается с различными свойствами.", + + "ui_example_basic_multiline_text": "Многострочный текст", + "ui_example_basic_multiline_text_description": "Проверьте, как многострочный текст настраивается с различными свойствами.", + + "ui_example_basic_hover": "Наведение", + "ui_example_basic_hover_description": "Наведение имеет два события. Одно для мыши и одно для касания. Используйте mouse_callback для событий мыши.", + + "ui_example_basic_drag": "Перетаскивание", + "ui_example_basic_drag_description": "Как создать простой узел перетаскивания.", + + "ui_example_basic_drag_to_node": "Перетаскивание к узлу", + "ui_example_basic_drag_to_node_description": "Как перетащить узел к другому узлу и получить обратные вызовы.", + + "ui_example_basic_slider": "Слайдер", + "ui_example_basic_slider_description": "Как сделать простой слайдер.", + + "ui_example_basic_slider_vertical": "Вертикальный слайдер", + "ui_example_basic_slider_vertical_description": "Как сделать простой вертикальный слайдер.", + + "ui_example_basic_slider_stepped": "Слайдер с шагами", + "ui_example_basic_slider_stepped_description": "Слайдеры могут иметь свойство «шаги», чтобы сделать их пошаговыми.", + + "ui_example_basic_progress_bar": "Полоса прогресса", + "ui_example_basic_progress_bar_description": "Как сделать простую полосу прогресса.", + + "ui_example_basic_progress_bar_slice9": "Полоса прогресса Slice9", + "ui_example_basic_progress_bar_slice9_description": "Компонент прогресса может обрабатывать свойство slice9, чтобы сделать его масштабируемым с самого начала.", + + "ui_example_basic_timer": "Таймер", + "ui_example_basic_timer_description": "Компонент Таймера используется для отображения секундомера с обратным вызовом.", + + "ui_example_basic_hotkey": "Горячая клавиша", + "ui_example_basic_hotkey_description": "Как создать горячую клавишу для обратного вызова.", + + "ui_example_basic_scroll": "Прокрутка", + "ui_example_basic_scroll_description": "Как сделать простую прокрутку.", + "ui_elastic_scroll": "Эластичная прокрутка", + + "ui_example_basic_scroll_slider": "Прокрутка со слайдером", + "ui_example_basic_scroll_slider_description": "Как добавить элемент управления слайдером к прокрутке и использовать их.", + + "ui_example_basic_grid": "Статическая сетка", + "ui_example_basic_grid_description": "Как разместить узлы в сетке.", + "ui_grid_in_row": "Элементы в строке", + "ui_add_element": "Добавить элемент", + "ui_remove_element": "Удалить элемент", + "ui_clear_elements": "Очистить элементы", + + "ui_example_basic_scroll_bind_grid": "Прокрутка с привязанной сеткой", + "ui_example_basic_scroll_bind_grid_description": "Прокрутка хорошо работает с сетками и заранее заданными размерами, это пример привязанной прокрутки с сеткой.", + + "ui_example_basic_scroll_bind_grid_horizontal": "Горизонтальная привязанная прокрутка", + "ui_example_basic_scroll_bind_grid_horizontal_description": "Прокрутка хорошо работает с сетками и заранее заданными размерами, это пример горизонтальной привязанной прокрутки с сеткой.", + + "ui_example_basic_input": "Ввод", + "ui_example_basic_input_description": "Как сделать самый простой ввод в Druid.", + + "ui_example_input_password": "Ввод пароля", + "ui_example_input_password_description": "Как работает ввод пароля.", + + "ui_example_basic_rich_input": "Расширенный ввод", + "ui_example_basic_rich_input_description": "Как сделать расширенный ввод в Druid.", + + "ui_example_basic_rich_text": "Расширенный текст", + "ui_example_basic_rich_text_description": "Как создать расширенный текст в Druid.", + + "ui_example_rich_text_tags": "Теги расширенного текста", + "ui_example_rich_text_tags_description": "Здесь простой пример расширенного текста с тегами\n - цвет\n - шрифт\n - размер\n - br\n - img", + + "ui_example_basic_swipe": "Свайп", + "ui_example_basic_swipe_description": "Как добавить обратные вызовы на события свайпа.", + + "ui_example_data_list_basic": "Основной список данных", + "ui_example_data_list_basic_description": "Как сделать простой список данных.", + + "ui_example_data_list_horizontal_basic": "Горизонтальный основной список данных", + "ui_example_data_list_horizontal_basic_description": "Как сделать простой горизонтальный список данных.", + + "ui_example_data_list_add_remove_clear": "Добавление, удаление и очистка в списке данных", + "ui_example_data_list_add_remove_clear_description": "Как работают функции добавления, удаления и очистки в списке данных.", + + "ui_example_data_list_cache_with_component": "Кэшированная версия списка данных", + "ui_example_data_list_cache_with_component_description": "Кэшированная версия требует большего количества настроек для обратных вызовов добавления/удаления, но более эффективна с точки зрения памяти.", + + "ui_language": "Язык", + "ui_example_window_language": "Окно выбора языка", + "ui_example_window_language_description": "Здесь простой пример окна с выбором языка.", + + "ui_confirmation": "Подтверждение", + "ui_example_window_confirmation": "Окно подтверждения", + "ui_confirmation_description": "Подтвердить покупку автомобиля за миллион долларов?", + + "ui_information": "Информация", + "ui_example_window_information": "Окно информации", + "ui_example_window_information_text": "Ты лучший из лучших!", + "ui_example_window_information_description": "Здесь простой пример окна с информационным сообщением.", + + "ui_example_gamepad_tester": "Тестер геймпада", + "ui_example_gamepad_tester_description": "Проверьте здесь свой геймпад, чтобы настроить кнопки и оси.", + + "ui_example_on_screen_control": "Наэкранное управление", + "ui_example_on_screen_control_description": "Здесь простой пример наэкранного управления. Наэкранный ввод здесь — это простой джойстик с обратным вызовом в качестве компонента Druid.", + + "ui_example_layout_basic": "Макет", + "ui_example_layout_basic_description": "Этот макет может быть настроен так, как в Figma.", + + "ui_example_panthera_basic_animation": "Базовая анимация Panthera", + "ui_example_panthera_basic_animation_description": "Здесь простой пример базовой анимации Panthera.", + + "ui_example_panthera_animation_blend": "Смешивание анимаций Panthera", + "ui_example_panthera_animation_blend_description": "Здесь простой пример смешивания анимаций Panthera.", + "ui_example_panthera_animation_blend_hint": "Наведите мышь на эту область.", + + "ui_animation_vertical": "Вертикальная", + "ui_animation_horizontal": "Горизонтальная", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/locales/zh.json b/example/locales/zh.json new file mode 100644 index 00000000..949eb766 --- /dev/null +++ b/example/locales/zh.json @@ -0,0 +1,172 @@ +{ + "ui_examples": "示例", + "ui_properties_panel": "属性", + "ui_output": "输出", + "ui_view_code": "查看代码", + "ui_profiler": "分析器", + "ui_profiler_memory": "内存", + "ui_profiler_fps": "FPS", + "ui_profiler_components": "组件", + "ui_profiler_events": "事件", + "ui_confirm": "确认", + "ui_cancel": "取消", + "ui_value": "值", + "ui_scroll": "滚动", + "ui_clipping": "裁剪", + "ui_no_properties": "此示例没有属性", + "ui_padding": "填充", + "ui_margin_x": "边距 X", + "ui_margin_y": "边距 Y", + "ui_justify": "对齐", + "ui_pivot_next": "下一个支点", + "ui_type_next": "下一个类型", + "ui_adjust_next": "下一个调整", + "ui_enabled": "启用", + + "ui_examples_basic": "基础", + "ui_examples_data_list": "数据列表", + "ui_examples_gamepad": "游戏手柄", + "ui_examples_window": "窗口", + "ui_examples_panthera": "美洲豹", + + "ui_example_intro": "介绍", + "ui_example_intro_description": "这里将有所选示例的简要说明。", + + "ui_example_basic_button": "按钮", + "ui_example_basic_button_description": "Druid 的基本按钮示例", + + "ui_example_basic_button_double_click": "双击", + "ui_example_basic_button_double_click_description": "如何向按钮添加双击功能。", + + "ui_example_basic_button_hold": "长按按钮", + "ui_example_basic_button_hold_description": "如何为按钮创建长按和触发功能。", + + "ui_example_basic_text": "文本", + "ui_example_basic_text_description": "检查文本如何通过不同的属性进行调整。", + + "ui_example_basic_multiline_text": "多行文本", + "ui_example_basic_multiline_text_description": "检查多行文本如何通过不同的属性进行调整。", + + "ui_example_basic_hover": "悬停", + "ui_example_basic_hover_description": "悬停有两个悬停事件。一个用于鼠标,一个用于触摸。请使用 mouse_callback 处理鼠标事件。", + + "ui_example_basic_drag": "拖动", + "ui_example_basic_drag_description": "如何创建简单的拖动节点。", + + "ui_example_basic_drag_to_node": "拖动到节点", + "ui_example_basic_drag_to_node_description": "如何将节点拖动到另一个节点并获取回调。", + + "ui_example_basic_slider": "滑块", + "ui_example_basic_slider_description": "如何创建简单的滑块。", + + "ui_example_basic_slider_vertical": "垂直滑块", + "ui_example_basic_slider_vertical_description": "如何创建简单的垂直滑块。", + + "ui_example_basic_slider_stepped": "分步滑块", + "ui_example_basic_slider_stepped_description": "滑块可以有一个 \"步骤\" 属性,使其分步。", + + "ui_example_basic_progress_bar": "进度条", + "ui_example_basic_progress_bar_description": "如何创建简单的进度条。", + + "ui_example_basic_progress_bar_slice9": "进度条 Slice9", + "ui_example_basic_progress_bar_slice9_description": "进度组件可以处理 slice9 属性,使其从一开始就可缩放。", + + "ui_example_basic_timer": "计时器", + "ui_example_basic_timer_description": "计时器组件用于显示带有回调的秒表。", + + "ui_example_basic_hotkey": "快捷键", + "ui_example_basic_hotkey_description": "如何为回调创建快捷键。", + + "ui_example_basic_scroll": "滚动", + "ui_example_basic_scroll_description": "如何创建简单的滚动。", + "ui_elastic_scroll": "弹性滚动", + + "ui_example_basic_scroll_slider": "带滑块的滚动", + "ui_example_basic_scroll_slider_description": "如何将滑块控件添加到滚动中并使用它们。", + + "ui_example_basic_grid": "静态网格", + "ui_example_basic_grid_description": "如何将节点放置在网格中。", + "ui_grid_in_row": "行中的元素", + "ui_add_element": "添加元素", + "ui_remove_element": "移除元素", + "ui_clear_elements": "清除元素", + + "ui_example_basic_scroll_bind_grid": "滚动绑定网格", + "ui_example_basic_scroll_bind_grid_description": "滚动与网格和预定义大小搭配使用良好,这是滚动绑定网格的示例。", + + "ui_example_basic_scroll_bind_grid_horizontal": "水平滚动绑定网格", + "ui_example_basic_scroll_bind_grid_horizontal_description": "滚动与网格和预定义大小搭配使用良好,这是水平滚动绑定网格的示例。", + + "ui_example_basic_input": "输入", + "ui_example_basic_input_description": "如何在 Druid 中创建最简单的输入。", + + "ui_example_input_password": "密码输入", + "ui_example_input_password_description": "密码输入如何工作。", + + "ui_example_basic_rich_input": "富输入", + "ui_example_basic_rich_input_description": "如何在 Druid 中创建富输入。", + + "ui_example_basic_rich_text": "富文本", + "ui_example_basic_rich_text_description": "如何在 Druid 中创建富文本。", + + "ui_example_rich_text_tags": "富文本标签", + "ui_example_rich_text_tags_description": "这是一个带有标签的富文本简单示例\n - 颜色\n - 字体\n - 大小\n - br\n - img", + + "ui_example_basic_swipe": "滑动", + "ui_example_basic_swipe_description": "如何在滑动事件上添加回调。", + + "ui_example_data_list_basic": "基本数据列表", + "ui_example_data_list_basic_description": "如何创建简单的数据列表。", + + "ui_example_data_list_horizontal_basic": "基本水平数据列表", + "ui_example_data_list_horizontal_basic_description": "如何创建简单的水平数据列表。", + + "ui_example_data_list_add_remove_clear": "数据列表添加、删除、清除", + "ui_example_data_list_add_remove_clear_description": "数据列表中的添加、删除和清除功能如何工作。", + + "ui_example_data_list_cache_with_component": "缓存版本数据列表", + "ui_example_data_list_cache_with_component_description": "缓存版本需要更多设置以添加/删除回调,但在内存上更高效。", + + "ui_language": "语言", + "ui_example_window_language": "窗口语言", + "ui_example_window_language_description": "这里是一个带有语言选择的窗口简单示例。", + + "ui_confirmation": "确认", + "ui_example_window_confirmation": "窗口确认", + "ui_confirmation_description": "确认购买一百万美元的汽车吗?", + + "ui_information": "信息", + "ui_example_window_information": "窗口信息", + "ui_example_window_information_text": "你是最好的中的最好!", + "ui_example_window_information_description": "这是一个带有信息消息的窗口简单示例。", + + "ui_example_gamepad_tester": "游戏手柄测试器", + "ui_example_gamepad_tester_description": "在这里测试你的游戏手柄以绑定按钮和轴。", + + "ui_example_on_screen_control": "屏幕控制", + "ui_example_on_screen_control_description": "这里是一个简单的屏幕控制示例。这里的屏幕输入是一个简单的操纵杆,带有 Druid 组件的回调。", + + "ui_example_layout_basic": "布局", + "ui_example_layout_basic_description": "此布局可以调整为与 Figma 相同。", + + "ui_example_panthera_basic_animation": "美洲豹基本动画", + "ui_example_panthera_basic_animation_description": "这里是美洲豹基本动画的简单示例。", + + "ui_example_panthera_animation_blend": "美洲豹动画混合", + "ui_example_panthera_animation_blend_description": "这里是美洲豹动画混合的简单示例。", + "ui_example_panthera_animation_blend_hint": "将鼠标悬停在此区域。", + + "ui_animation_vertical": "垂直", + "ui_animation_horizontal": "水平", + + "ui_language_en": "English", + "ui_language_ru": "Русский", + "ui_language_es": "Español", + "ui_language_de": "Deutsch", + "ui_language_fr": "Français", + "ui_language_ja": "日本語", + "ui_language_pt": "Português", + "ui_language_it": "Italiano", + "ui_language_kr": "한국어", + "ui_language_zh": "中文" +} diff --git a/example/templates/radio.gui b/example/templates/button_text_blue.gui similarity index 60% rename from example/templates/radio.gui rename to example/templates/button_text_blue.gui index 1564295f..ca446712 100644 --- a/example/templates/radio.gui +++ b/example/templates/button_text_blue.gui @@ -1,7 +1,11 @@ script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -29,44 +33,48 @@ nodes { w: 1.0 } size { - x: 36.0 - y: 36.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.631 + y: 0.843 + z: 0.961 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_circle" - id: "back" + texture: "druid/ui_circle_32" + id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - layer: "image" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_AUTO + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { - x: -0.5 - y: 0.5 + x: 0.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -83,44 +91,59 @@ nodes { w: 1.0 } size { - x: 17.0 - y: 17.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/tick" - id: "check" + text: "Info" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "back" - layer: "image" + line_break: false + parent: "root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_AUTO -} -layers { - name: "image" + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT max_nodes: 512 +layers { + name: "druid" +} +layers { + name: "text_bold" +} diff --git a/example/templates/button_text_green.gui b/example/templates/button_text_green.gui new file mode 100644 index 00000000..41d3b0f9 --- /dev/null +++ b/example/templates/button_text_green.gui @@ -0,0 +1,149 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.557 + y: 0.835 + z: 0.62 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "druid" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 245.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Confirm" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "druid" +} +layers { + name: "text_bold" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/templates/button_text_red.gui b/example/templates/button_text_red.gui new file mode 100644 index 00000000..737878b7 --- /dev/null +++ b/example/templates/button_text_red.gui @@ -0,0 +1,149 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 280.0 + y: 90.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.957 + y: 0.608 + z: 0.608 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_32" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "druid" + inherit_alpha: true + slice9 { + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 245.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Cancel" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "text_bold" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +layers { + name: "druid" +} +layers { + name: "text_bold" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/templates/button.gui b/example/templates/button_text_white.gui similarity index 70% rename from example/templates/button.gui rename to example/templates/button_text_white.gui index 5e9eaf1c..2935f42b 100644 --- a/example/templates/button.gui +++ b/example/templates/button_text_white.gui @@ -1,11 +1,11 @@ script: "" fonts { - name: "game" - font: "/example/assets/fonts/game.font" + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" } textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -33,32 +33,32 @@ nodes { w: 1.0 } size { - x: 130.0 - y: 60.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 + x: 0.941 + y: 0.984 z: 1.0 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/button_blue" - id: "button" + texture: "druid/ui_circle_32" + id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - layer: "image" + layer: "druid" inherit_alpha: true slice9 { - x: 15.0 - y: 15.0 - z: 15.0 - w: 15.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true @@ -66,11 +66,15 @@ nodes { alpha: 1.0 template_node_child: false size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { x: 0.0 - y: 7.0 + y: 0.0 z: 0.0 w: 1.0 } @@ -81,27 +85,27 @@ nodes { w: 1.0 } scale { - x: 0.7 - y: 0.7 + x: 1.0 + y: 1.0 z: 1.0 w: 1.0 } size { - x: 200.0 - y: 100.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - text: "Tap me!" - font: "game" + text: "Action" + font: "text_bold" id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE @@ -113,28 +117,32 @@ nodes { w: 1.0 } shadow { - x: 0.101960786 - y: 0.2 - z: 0.6 + x: 1.0 + y: 1.0 + z: 1.0 w: 1.0 } adjust_mode: ADJUST_MODE_FIT line_break: false - parent: "button" - layer: "text" + parent: "root" + layer: "text_bold" inherit_alpha: true alpha: 1.0 outline_alpha: 0.0 - shadow_alpha: 0.78 + shadow_alpha: 0.0 template_node_child: false text_leading: 1.0 text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } layers { - name: "image" + name: "druid" } layers { - name: "text" + name: "text_bold" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/example/templates/checkbox.gui b/example/templates/button_text_yellow.gui similarity index 60% rename from example/templates/checkbox.gui rename to example/templates/button_text_yellow.gui index 1c9c5066..99593a57 100644 --- a/example/templates/checkbox.gui +++ b/example/templates/button_text_yellow.gui @@ -1,7 +1,11 @@ script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} textures { - name: "kenney" - texture: "/example/assets/images/kenney.atlas" + name: "druid" + texture: "/example/assets/druid.atlas" } background_color { x: 0.0 @@ -29,39 +33,43 @@ nodes { w: 1.0 } size { - x: 38.0 - y: 36.0 + x: 280.0 + y: 90.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.902 + y: 0.875 + z: 0.624 w: 1.0 } type: TYPE_BOX blend_mode: BLEND_MODE_ALPHA - texture: "kenney/check_back_square" - id: "back" + texture: "druid/ui_circle_32" + id: "root" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER adjust_mode: ADJUST_MODE_FIT - layer: "image" + layer: "druid" inherit_alpha: true slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 + x: 16.0 + y: 16.0 + z: 16.0 + w: 16.0 } clipping_mode: CLIPPING_MODE_NONE clipping_visible: true clipping_inverted: false alpha: 1.0 template_node_child: false - size_mode: SIZE_MODE_AUTO + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" } nodes { position { @@ -83,44 +91,59 @@ nodes { w: 1.0 } size { - x: 21.0 - y: 20.0 + x: 245.0 + y: 50.0 z: 0.0 w: 1.0 } color { - x: 1.0 - y: 1.0 - z: 1.0 + x: 0.31 + y: 0.318 + z: 0.322 w: 1.0 } - type: TYPE_BOX + type: TYPE_TEXT blend_mode: BLEND_MODE_ALPHA - texture: "kenney/checkmark" - id: "check" + text: "Warn" + font: "text_bold" + id: "text" xanchor: XANCHOR_NONE yanchor: YANCHOR_NONE pivot: PIVOT_CENTER + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } adjust_mode: ADJUST_MODE_FIT - parent: "back" - layer: "image" + line_break: false + parent: "root" + layer: "text_bold" inherit_alpha: true - slice9 { - x: 0.0 - y: 0.0 - z: 0.0 - w: 0.0 - } - clipping_mode: CLIPPING_MODE_NONE - clipping_visible: true - clipping_inverted: false alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 template_node_child: false - size_mode: SIZE_MODE_AUTO -} -layers { - name: "image" + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" } material: "/builtins/materials/gui.material" adjust_reference: ADJUST_REFERENCE_PARENT max_nodes: 512 +layers { + name: "druid" +} +layers { + name: "text_bold" +} diff --git a/example/templates/input.gui b/example/templates/input.gui new file mode 100644 index 00000000..776bbbfb --- /dev/null +++ b/example/templates/input.gui @@ -0,0 +1,143 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 80.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.463 + y: 0.475 + z: 0.49 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/rect_round2_width1" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -240.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 480.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Tap me to input" + font: "text_bold" + id: "text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_W + outline { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "root" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/templates/rich_input.gui b/example/templates/rich_input.gui new file mode 100644 index 00000000..5467ee96 --- /dev/null +++ b/example/templates/rich_input.gui @@ -0,0 +1,395 @@ +script: "" +fonts { + name: "text_bold" + font: "/example/assets/fonts/text_bold.font" +} +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 80.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: false + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 500.0 + y: 80.0 + z: 0.0 + w: 1.0 + } + color { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/rect_round2_width1" + id: "button" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 480.0 + y: 60.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.31 + y: 0.318 + z: 0.322 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "Placeholder" + font: "text_bold" + id: "placeholder_text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 0.4 + y: 0.4 + z: 0.4 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 480.0 + y: 60.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "User input" + font: "text_bold" + id: "input_text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "button" + layer: "" + inherit_alpha: true + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 118.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 16.0 + y: 50.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.631 + y: 0.843 + z: 0.961 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_16" + id: "cursor_node" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "button" + layer: "" + inherit_alpha: true + slice9 { + x: 8.0 + y: 8.0 + z: 8.0 + w: 8.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 0.5 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 4.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.2 + y: 1.2 + z: 1.0 + w: 1.0 + } + size { + x: 20.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_TEXT + blend_mode: BLEND_MODE_ALPHA + text: "|" + font: "text_bold" + id: "cursor_text" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + outline { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + shadow { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + adjust_mode: ADJUST_MODE_FIT + line_break: false + parent: "cursor_node" + layer: "" + inherit_alpha: false + alpha: 1.0 + outline_alpha: 0.0 + shadow_alpha: 0.0 + template_node_child: false + text_leading: 1.0 + text_tracking: 0.0 + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/example/templates/slider.gui b/example/templates/slider.gui new file mode 100644 index 00000000..ac7f71eb --- /dev/null +++ b/example/templates/slider.gui @@ -0,0 +1,190 @@ +script: "" +textures { + name: "druid" + texture: "/example/assets/druid.atlas" +} +background_color { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 40.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/empty" + id: "root" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + layer: "" + inherit_alpha: true + slice9 { + x: 0.0 + y: 0.0 + z: 0.0 + w: 0.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 260.0 + y: 8.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.129 + y: 0.141 + z: 0.157 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider_back" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +nodes { + position { + x: -118.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + rotation { + x: 0.0 + y: 0.0 + z: 0.0 + w: 1.0 + } + scale { + x: 1.0 + y: 1.0 + z: 1.0 + w: 1.0 + } + size { + x: 24.0 + y: 24.0 + z: 0.0 + w: 1.0 + } + color { + x: 0.722 + y: 0.741 + z: 0.761 + w: 1.0 + } + type: TYPE_BOX + blend_mode: BLEND_MODE_ALPHA + texture: "druid/ui_circle_8" + id: "slider_pin" + xanchor: XANCHOR_NONE + yanchor: YANCHOR_NONE + pivot: PIVOT_CENTER + adjust_mode: ADJUST_MODE_FIT + parent: "root" + layer: "" + inherit_alpha: true + slice9 { + x: 4.0 + y: 4.0 + z: 4.0 + w: 4.0 + } + clipping_mode: CLIPPING_MODE_NONE + clipping_visible: true + clipping_inverted: false + alpha: 1.0 + template_node_child: false + size_mode: SIZE_MODE_MANUAL + custom_type: 0 + enabled: true + visible: true + material: "" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +max_nodes: 512 diff --git a/game.project b/game.project index 3df48887..85a33f1a 100644 --- a/game.project +++ b/game.project @@ -1,23 +1,28 @@ [bootstrap] -main_collection = /test/test.collectionc +main_collection = /example/druid.collectionc [script] shared_state = 1 [display] -width = 600 -height = 900 -display_profiles = /example/custom.display_profilesc +width = 1920 +height = 1080 +display_profiles = /builtins/render/default.display_profilesc dynamic_orientation = 1 high_dpi = 1 [project] -title = druid -version = 0.11.0 +title = Druid +version = 1.0.0 publisher = Insality developer = Maksim Tuprikov +custom_resources = /example/locales dependencies#0 = https://github.com/insalitygames/deftest/archive/master.zip dependencies#1 = https://github.com/britzl/monarch/archive/refs/tags/3.3.0.zip +dependencies#2 = https://github.com/Insality/defold-saver/archive/refs/tags/1.zip +dependencies#3 = https://github.com/Insality/defold-tweener/archive/refs/tags/3.zip +dependencies#4 = https://github.com/Insality/panthera/archive/refs/heads/develop.zip +dependencies#5 = https://github.com/Insality/defold-lang/archive/refs/tags/3.zip [library] include_dirs = druid @@ -25,6 +30,7 @@ include_dirs = druid [input] gamepads = /builtins/input/default.gamepadsc use_accelerometer = 0 +game_binding = /builtins/input/all.input_bindingc [druid] no_auto_input = 0 @@ -45,16 +51,17 @@ input_scroll_down = mouse_wheel_down engine_arguments = --verify-graphics-calls=false heap_size = 64 splash_image = /media/druid_logo.png -scale_mode = fit +scale_mode = stretch show_fullscreen_button = 0 show_made_with_defold = 0 -cssfile = /example/light_theme.css +cssfile = /builtins/manifests/web/dark_theme.css +show_console_banner = 0 [native_extension] -app_manifest = /example/game.appmanifest +app_manifest = [graphics] -texture_profiles = /example/custom.texture_profiles +texture_profiles = /builtins/graphics/default.texture_profiles max_draw_calls = 128 verify_graphics_calls = 0 @@ -92,3 +99,11 @@ max_count = 64 [collection] max_instances = 128 +[saver] +autosave_timer = 2 + +[lang] +path = /example/locales +langs = en,ru,es,de,fr,ja,pt,it,kr,zh +default = es + diff --git a/settings_deployer b/settings_deployer index 07634c7e..448e40da 100644 --- a/settings_deployer +++ b/settings_deployer @@ -2,7 +2,7 @@ bob_folder=./ # You can point bob version for project in format "filename:sha" -bob_sha="181:fd1ad4c17bfdcd890ea7176f2672c35102384419" +bob_sha="193:e4aaff11f49c941fde1dd93883cf69c6b8abebe4" # Select Defold channel. Values: stable, beta, alpha bob_channel="stable"