diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..096746c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..663a60c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 160 +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0b62dae --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Yannick Deubel (https://github.com/yandeu) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/assets/fbx/BodyJabCross.fbx b/assets/fbx/BodyJabCross.fbx new file mode 100644 index 0000000..cca3fd2 Binary files /dev/null and b/assets/fbx/BodyJabCross.fbx differ diff --git a/assets/fbx/HipHopDancing.fbx b/assets/fbx/HipHopDancing.fbx new file mode 100644 index 0000000..7e25a59 Binary files /dev/null and b/assets/fbx/HipHopDancing.fbx differ diff --git a/assets/fbx/Idle.fbx b/assets/fbx/Idle.fbx new file mode 100644 index 0000000..3cab46b Binary files /dev/null and b/assets/fbx/Idle.fbx differ diff --git a/assets/fbx/Jumping.fbx b/assets/fbx/Jumping.fbx new file mode 100644 index 0000000..991e3b5 Binary files /dev/null and b/assets/fbx/Jumping.fbx differ diff --git a/assets/fbx/LookingAround.fbx b/assets/fbx/LookingAround.fbx new file mode 100644 index 0000000..b963f8d Binary files /dev/null and b/assets/fbx/LookingAround.fbx differ diff --git a/assets/fbx/Running.fbx b/assets/fbx/Running.fbx new file mode 100644 index 0000000..f408454 Binary files /dev/null and b/assets/fbx/Running.fbx differ diff --git a/assets/fbx/Walking.fbx b/assets/fbx/Walking.fbx new file mode 100644 index 0000000..7fb4c19 Binary files /dev/null and b/assets/fbx/Walking.fbx differ diff --git a/assets/glb/box_man.glb b/assets/glb/box_man.glb new file mode 100644 index 0000000..c9159d8 Binary files /dev/null and b/assets/glb/box_man.glb differ diff --git a/assets/heightmap/heightmap-island.png b/assets/heightmap/heightmap-island.png new file mode 100644 index 0000000..92f617f Binary files /dev/null and b/assets/heightmap/heightmap-island.png differ diff --git a/assets/heightmap/heightmap-simple.png b/assets/heightmap/heightmap-simple.png new file mode 100644 index 0000000..62f3cbd Binary files /dev/null and b/assets/heightmap/heightmap-simple.png differ diff --git a/assets/img/grass.jpg b/assets/img/grass.jpg new file mode 100644 index 0000000..ed6c7f8 Binary files /dev/null and b/assets/img/grass.jpg differ diff --git a/assets/img/grass.md b/assets/img/grass.md new file mode 100644 index 0000000..0e3c87d --- /dev/null +++ b/assets/img/grass.md @@ -0,0 +1,9 @@ +Textures from: +http://opengameart.org/ +http://opengameart.org/content/dark-grass + +Licensed under a Creative Commons Attribution 3.0 Unported License: +http://creativecommons.org/licenses/by/3.0/ + +Copied from: +https://github.com/mrdoob/three.js/tree/master/examples/textures/terrain diff --git a/assets/svg/bridge.svg b/assets/svg/bridge.svg new file mode 100644 index 0000000..03dc07d --- /dev/null +++ b/assets/svg/bridge.svg @@ -0,0 +1,62 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/css/examples.css b/css/examples.css new file mode 100644 index 0000000..adb7a60 --- /dev/null +++ b/css/examples.css @@ -0,0 +1,47 @@ +* { + margin: 0; + padding: 0; + font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Helvetica, Arial, + sans-serif; +} + +body { + color: #1b1b1b; + overflow: hidden; +} + +div#info-text { + position: relative; + justify-content: center; + font-size: 18px; + height: 0; + top: 36px; + z-index: 1; + margin: 0px 48px; + text-align: center; +} + +div#link-to-github { + position: absolute; + background: white; + bottom: 36px; + right: 36px; + width: 60px; + height: 60px; + border-radius: 50%; + cursor: pointer; + + -webkit-box-shadow: 5px 5px 5px 0px rgb(0, 0, 0, 0.1); + -moz-box-shadow: 5px 5px 5px 0px rgb(0, 0, 0, 0.1); + box-shadow: 5px 5px 5px 0px rgb(0, 0, 0, 0.1); +} + +div#link-to-github div { + color: #464646; + font-size: 24px; + width: 60px; + height: 60px; + position: relative; + top: 14px; + left: 10px; +} diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..7d0f043 --- /dev/null +++ b/css/style.css @@ -0,0 +1,61 @@ +* { + margin: 0; + padding: 0; + font-family: BlinkMacSystemFont, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Helvetica, Arial, + sans-serif; + color: #363636; +} + +section, +footer { + padding: 2em 3em; +} + +header { + padding: 0em 1em; + -webkit-box-shadow: 0px 10px 10px 0px rgba(235, 235, 235, 1); + -moz-box-shadow: 0px 10px 10px 0px rgba(235, 235, 235, 1); + box-shadow: 0px 10px 10px 0px rgba(235, 235, 235, 1); +} + +section { + min-height: calc(100vh - 280px); +} + +footer { + background-color: #f4f4f4; + min-height: 5em; + text-align: center; +} + +#logo img { + max-width: 250px; +} + +h1, +h2, +h3, +h4, +p, +ol, +ul { + margin-bottom: 1em; +} + +a { + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.content a:before { + content: '\1F517'; +} + +ul { + list-style-type: none; +} + +li { + line-height: 2.5; +} diff --git a/examples.html b/examples.html new file mode 100644 index 0000000..63ff55c --- /dev/null +++ b/examples.html @@ -0,0 +1,128 @@ + + + + + + + enable3d • 3D extension for Phaser 3 + + + + + +
+ + + +
+
+

Examples

+ +
+ + + diff --git a/examples/3rd-person-camera.html b/examples/3rd-person-camera.html new file mode 100644 index 0000000..d29e889 --- /dev/null +++ b/examples/3rd-person-camera.html @@ -0,0 +1,261 @@ + + + + + + + 3rd Person Camera + + + + + + + +
Use WASD, SPACE and your Mouse.
Try to play it on your mobile device :)
+ + + diff --git a/examples/camera-lerping-and-player-controls.html b/examples/camera-lerping-and-player-controls.html new file mode 100644 index 0000000..c8e194e --- /dev/null +++ b/examples/camera-lerping-and-player-controls.html @@ -0,0 +1,146 @@ + + + + + + + Camera Lerping and Player Controls + + + + + + + +
+ Use WASD to move the player, change the camera with SPACE. +
+ + + diff --git a/examples/collision-detection.html b/examples/collision-detection.html new file mode 100644 index 0000000..78f9d82 --- /dev/null +++ b/examples/collision-detection.html @@ -0,0 +1,63 @@ + + + + + + + Collision Detection + + + + + + + +
Open your console to see the collision logs.
+ + + diff --git a/examples/constructive-solid-geometry-physics-and-breakable.html b/examples/constructive-solid-geometry-physics-and-breakable.html new file mode 100644 index 0000000..5b86a3e --- /dev/null +++ b/examples/constructive-solid-geometry-physics-and-breakable.html @@ -0,0 +1,85 @@ + + + + + + + Constructive Solid Geometry (with Physics and Breakable) + + + + + + + + + + diff --git a/examples/constructive-solid-geometry-physics.html b/examples/constructive-solid-geometry-physics.html new file mode 100644 index 0000000..274a4cf --- /dev/null +++ b/examples/constructive-solid-geometry-physics.html @@ -0,0 +1,83 @@ + + + + + + + Constructive Solid Geometry (with Physics) + + + + + + + + + + diff --git a/examples/constructive-solid-geometry.html b/examples/constructive-solid-geometry.html new file mode 100644 index 0000000..088672e --- /dev/null +++ b/examples/constructive-solid-geometry.html @@ -0,0 +1,78 @@ + + + + + + + Constructive Solid Geometry + + + + + + + + + + diff --git a/examples/convex-objects-breaking.html b/examples/convex-objects-breaking.html new file mode 100644 index 0000000..f29964b --- /dev/null +++ b/examples/convex-objects-breaking.html @@ -0,0 +1,247 @@ + + + + + + + Convex Objects Breaking + + + + + + + + + + diff --git a/examples/create-3d-geometry-from-2d-path.html b/examples/create-3d-geometry-from-2d-path.html new file mode 100644 index 0000000..861189f --- /dev/null +++ b/examples/create-3d-geometry-from-2d-path.html @@ -0,0 +1,107 @@ + + + + + + + Create 3D Geometry from 2D Path + + + + + + + + + + diff --git a/examples/create-3d-geometry-from-png-file.html b/examples/create-3d-geometry-from-png-file.html new file mode 100644 index 0000000..f35b044 --- /dev/null +++ b/examples/create-3d-geometry-from-png-file.html @@ -0,0 +1,78 @@ + + + + + + + Create 3D Geometry from PNG file (heightmap) + + + + + + + +
+ This heightmap has been created from + this png file. +
+ + + diff --git a/examples/create-3d-geometry-from-svg-file.html b/examples/create-3d-geometry-from-svg-file.html new file mode 100644 index 0000000..8b14a88 --- /dev/null +++ b/examples/create-3d-geometry-from-svg-file.html @@ -0,0 +1,90 @@ + + + + + + + Create 3D Geometry from SVG file + + + + + + + +
+ This bridge has been created from + this svg file. +
+ + + diff --git a/examples/custom-setup.html b/examples/custom-setup.html new file mode 100644 index 0000000..0b7bd1f --- /dev/null +++ b/examples/custom-setup.html @@ -0,0 +1,105 @@ + + + + + + + Custom Setup + + + + + + + + + + diff --git a/examples/dash-and-blast-prototype.html b/examples/dash-and-blast-prototype.html new file mode 100644 index 0000000..bea4ba4 --- /dev/null +++ b/examples/dash-and-blast-prototype.html @@ -0,0 +1,210 @@ + + + + + + + Dash and Blast prototype + + + + + + + + + + diff --git a/examples/debug-bodies.html b/examples/debug-bodies.html new file mode 100644 index 0000000..629d9cb --- /dev/null +++ b/examples/debug-bodies.html @@ -0,0 +1,104 @@ + + + + + + + Debug Bodies + + + + + + + +
DebugMode: 1
+ + + diff --git a/examples/enemy-patrols-on-platform.html b/examples/enemy-patrols-on-platform.html new file mode 100644 index 0000000..4a5fb0e --- /dev/null +++ b/examples/enemy-patrols-on-platform.html @@ -0,0 +1,127 @@ + + + + + + + Enemy Patrols on Platform + + + + + + + + + + diff --git a/examples/fbx-loader-and-animations.html b/examples/fbx-loader-and-animations.html new file mode 100644 index 0000000..729a35c --- /dev/null +++ b/examples/fbx-loader-and-animations.html @@ -0,0 +1,95 @@ + + + + + + + FBX Loader and Animations + + + + + + + + + + diff --git a/examples/heightmap-with-color-scale.html b/examples/heightmap-with-color-scale.html new file mode 100644 index 0000000..de19320 --- /dev/null +++ b/examples/heightmap-with-color-scale.html @@ -0,0 +1,83 @@ + + + + + + + Heightmap with Color Scale + + + + + + + +
+ This heightmap has been created from + this png file. +
+ + + diff --git a/examples/kinematic-body-orbiting-around-sun.html b/examples/kinematic-body-orbiting-around-sun.html new file mode 100644 index 0000000..46a5fc4 --- /dev/null +++ b/examples/kinematic-body-orbiting-around-sun.html @@ -0,0 +1,123 @@ + + + + + + + Kinematic Body Orbiting around Sun + + + + + + + +
The Sun and the Earth are Kinematic Objects.
+ + + diff --git a/examples/load-and-use-textures.html b/examples/load-and-use-textures.html new file mode 100644 index 0000000..b1c027a --- /dev/null +++ b/examples/load-and-use-textures.html @@ -0,0 +1,61 @@ + + + + + + + Load and Use Textures + + + + + + + + + + diff --git a/examples/material-showcase.html b/examples/material-showcase.html new file mode 100644 index 0000000..fb2f4b0 --- /dev/null +++ b/examples/material-showcase.html @@ -0,0 +1,76 @@ + + + + + + + Material Showcase + + + + + + + + + + diff --git a/examples/shape-showcase.html b/examples/shape-showcase.html new file mode 100644 index 0000000..f6d187a --- /dev/null +++ b/examples/shape-showcase.html @@ -0,0 +1,81 @@ + + + + + + + Shape Showcase + + + + + + + + + + diff --git a/examples/simple-setup.html b/examples/simple-setup.html new file mode 100644 index 0000000..d93bbbb --- /dev/null +++ b/examples/simple-setup.html @@ -0,0 +1,52 @@ + + + + + + + Simple Setup + + + + + + + + + + diff --git a/examples/use-native-three-code.html b/examples/use-native-three-code.html new file mode 100644 index 0000000..67496ea --- /dev/null +++ b/examples/use-native-three-code.html @@ -0,0 +1,70 @@ + + + + + + + Use "native" three.js code + + + + + + + + +
Import three.min.js to use "native" three.js code
+ + + diff --git a/examples/virtual-reality.html b/examples/virtual-reality.html new file mode 100644 index 0000000..609870f --- /dev/null +++ b/examples/virtual-reality.html @@ -0,0 +1,80 @@ + + + + + + + Virtual Reality + + + + + + + +
+ Get your Phone, click Enter VR, tab on the screen and look around. +
+ + + diff --git a/examples/water.html b/examples/water.html new file mode 100644 index 0000000..ef6bfbd --- /dev/null +++ b/examples/water.html @@ -0,0 +1,51 @@ + + + + + + + Water + + + + + + + + + + diff --git a/examples/work-with-objects-factory.html b/examples/work-with-objects-factory.html new file mode 100644 index 0000000..8d3da78 --- /dev/null +++ b/examples/work-with-objects-factory.html @@ -0,0 +1,84 @@ + + + + + + + Work with Objects Factory + + + + + + + + + + diff --git a/img/enable3d-logo-square.png b/img/enable3d-logo-square.png new file mode 100644 index 0000000..78f01d0 Binary files /dev/null and b/img/enable3d-logo-square.png differ diff --git a/img/enable3d-logo.png b/img/enable3d-logo.png new file mode 100644 index 0000000..3771867 Binary files /dev/null and b/img/enable3d-logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..4cba412 --- /dev/null +++ b/index.html @@ -0,0 +1,56 @@ + + + + + + + enable3d • 3D extension for Phaser 3 + + + + + +
+ + + +
+
+

About

+

+ enable3d is a 3D extension for Phaser 3. It is written in TypeScript, uses three.js and ammo.js. +

+

Examples

+ Go to the examples +
+ + + diff --git a/js/examples.js b/js/examples.js new file mode 100644 index 0000000..4465fe1 --- /dev/null +++ b/js/examples.js @@ -0,0 +1,16 @@ +'use strict' + +window.addEventListener('load', function() { + var repo = 'https://github.com/yandeu/enable3d-website/tree/master' + var pathname = window.location.pathname + var node = document.createElement('DIV') + node.innerHTML += '') + document.body.appendChild(node) +}) + +window.addEventListener('load', function() { + var node = document.createElement('DIV') + node.innerHTML += + ' ' + document.body.appendChild(node) +}) diff --git a/lib/ammo.js b/lib/ammo.js new file mode 100644 index 0000000..f481a78 --- /dev/null +++ b/lib/ammo.js @@ -0,0 +1,688 @@ + + // This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed. + +var Ammo = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + return ( +function(Ammo) { + Ammo = Ammo || {}; + +var c;var d;d||(d=typeof Ammo !== 'undefined' ? Ammo : {});var aa={},ba;for(ba in d)d.hasOwnProperty(ba)&&(aa[ba]=d[ba]);var ca=!1,da=!1,ea=!1,fa=!1,ha=!1;ca="object"===typeof window;da="function"===typeof importScripts;ea=(fa="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)&&!ca&&!da;ha=!ca&&!ea&&!da;var ia="",ka,la,ma; +if(ea){ia=__dirname+"/";var na,oa;ka=function(a,b){var e=pa(a);e||(na||(na=require("fs")),oa||(oa=require("path")),a=oa.normalize(a),e=na.readFileSync(a));return b?e:e.toString()};ma=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1=f);)++e;if(16h?f+=String.fromCharCode(h):(h-=65536,f+=String.fromCharCode(55296|h>>10,56320|h&1023))}}else f+=String.fromCharCode(h)}return f}"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le"); +var buffer,Aa,Ba,Ca,Da,Ea=d.TOTAL_MEMORY||67108864;buffer=d.buffer?d.buffer:new ArrayBuffer(Ea);Ea=buffer.byteLength;var Fa=buffer;buffer=Fa;d.HEAP8=Aa=new Int8Array(Fa);d.HEAP16=new Int16Array(Fa);d.HEAP32=Ca=new Int32Array(Fa);d.HEAPU8=Ba=new Uint8Array(Fa);d.HEAPU16=new Uint16Array(Fa);d.HEAPU32=new Uint32Array(Fa);d.HEAPF32=Da=new Float32Array(Fa);d.HEAPF64=new Float64Array(Fa);Ca[6940]=5270672; +function Ga(a){for(;0>>16)*f+e*(b>>>16)<<16)|0}); +Math.clz32||(Math.clz32=function(a){var b=32,e=a>>16;e&&(b-=16,a=e);if(e=a>>8)b-=8,a=e;if(e=a>>4)b-=4,a=e;if(e=a>>2)b-=2,a=e;return a>>1?b-2:b-a});Math.trunc||(Math.trunc=function(a){return 0>a?Math.ceil(a):Math.floor(a)});var Na=0,Oa=null,Pa=null;d.preloadedImages={};d.preloadedAudios={}; +var sa=null,Qa="data:application/octet-stream;base64,",Ra=[function(a,b,e,f,h,n,B,S){a=d.getCache(d.ConcreteContactResultCallback)[a];if(!a.hasOwnProperty("addSingleResult"))throw"a JSImplementation must implement all functions, you forgot ConcreteContactResultCallback::addSingleResult.";return a.addSingleResult(b,e,f,h,n,B,S)},function(a,b,e,f){a=d.getCache(d.DebugDrawer)[a];if(!a.hasOwnProperty("drawLine"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::drawLine."; +a.drawLine(b,e,f)},function(a,b,e,f,h,n){a=d.getCache(d.DebugDrawer)[a];if(!a.hasOwnProperty("drawContactPoint"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::drawContactPoint.";a.drawContactPoint(b,e,f,h,n)},function(a,b){a=d.getCache(d.DebugDrawer)[a];if(!a.hasOwnProperty("reportErrorWarning"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::reportErrorWarning.";a.reportErrorWarning(b)},function(a,b,e){a=d.getCache(d.DebugDrawer)[a]; +if(!a.hasOwnProperty("draw3dText"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::draw3dText.";a.draw3dText(b,e)},function(a,b){a=d.getCache(d.DebugDrawer)[a];if(!a.hasOwnProperty("setDebugMode"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::setDebugMode.";a.setDebugMode(b)},function(a){a=d.getCache(d.DebugDrawer)[a];if(!a.hasOwnProperty("getDebugMode"))throw"a JSImplementation must implement all functions, you forgot DebugDrawer::getDebugMode."; +return a.getDebugMode()}];Ia.push({Ca:function(){Sa()}});sa="data:application/octet-stream;base64,AAAAAAAAAAARAAoAERERAAAAAAUAAAAAAAAJAAAAAAsAAAAAAAAAABEADwoREREDCgcAARMJCwsAAAkGCwAACwAGEQAAABEREQAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAARAAoKERERAAoAAAIACQsAAAAJAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAA0AAAAEDQAAAAAJDgAAAAAADgAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAPAAAAAA8AAAAACRAAAAAAABAAABAAABIAAAASEhIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAABISEgAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAoAAAAACgAAAAAJCwAAAAAACwAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAwAAAAACQwAAAAAAAwAAAwAADAxMjM0NTY3ODlBQkNERUYEKgAApioAACwqAAB0KgAA8AEAAAAAAAAEKgAAACsAACwqAADRKgAACAIAAAAAAAAEKgAAKCsAAAQqAABUKwAALCoAAD0rAAAoAgAAAAAAAAQqAAB6KwAALCoAAGQrAABAAgAAAAAAACwqAACWKwAACAIAAAAAAAAEKgAA5SsAACwqAADFKwAAaAIAAAAAAAAEKgAARy0AACwqAAA5LQAAgAIAAAAAAAAsKgAAyDIAAKgCAAAAAAAABCoAAOIyAAAsKgAA9TIAACAGAAAAAAAALCoAACEzAADQAgAAAAAAAAQqAABcMwAALCoAAH0zAADQAgAAAAAAACwqAACxMwAA0AIAAAAAAAAsKgAA3zMAANACAAAAAAAALCoAAMc0AADQBQAAAAAAACwqAADUNAAAKAMAAAAAAAAEKgAA9DQAAAQqAAAHNQAALCoAABw1AAAwAwAAAAAAACwqAAA7NQAAcAoAAAAAAAAsKgAAzDUAAHgDAAAAAAAALCoAAK41AADgCQAAAAAAACwqAADuNQAAKAMAAAAAAAAsKgAADzYAACgDAAAAAAAALCoAADI2AAAoAwAAAAAAACwqAABUNgAAeAMAAAAAAAAsKgAAdjYAAMgDAAAAAAAABCoAAJY2AAAsKgAAojcAAMgDAAAAAAAALCoAAOU2AAAQCgAAAAAAACwqAAC2NgAAqAkAAAAAAAAEKgAAyDYAACwqAACFNwAAEAoAAAAAAAAsKgAAVjgAAHAEAAAAAAAALCoAAAc4AAA4BAAAAAAAACwqAAAhOAAASAQAAAAAAAAEKgAAOzgAACwqAABxOAAAyAMAAAAAAAAsKgAApTgAANAFAAAAAAAALCoAAFU6AACQBAAAAAAAACwqAAA3OQAA+AEAAAAAAAAsKgAAbzoAAEgHAAAAAAAALCoAAIE6AACwBAAAAAAAAAQqAACfOgAALCoAAM06AAD4BAAAAAAAACwqAAD9OgAA+AQAAAAAAAAsKgAAOTsAAMgEAAAAAAAALCoAAHo7AAD4BAAAAAAAAFQqAACvOwAAAAAAAAEAAAAQBQAAAgQAAAQqAADDOwAALCoAAOo7AAD4BAAAAAAAACwqAAAZPAAA+AQAAAAAAAAsKgAATDwAAPgEAAAAAAAALCoAAKo8AABYBQAAAAAAAAQqAADQPAAALCoAAOU8AABwBQAAAAAAAAQqAAD4PAAALCoAAAw9AAAgAgAAAAAAACwqAABWPQAAqAUAAAAAAAAsKgAAKD0AAPgBAAAAAAAALCoAAHc9AABwBQAAAAAAACwqAACYPQAAyAUAAAAAAAAEKgAAsT0AAAQqAADbPQAALCoAAO89AADQBQAAAAAAACwqAAD/PQAA2AUAAAAAAAAsKgAASD4AAMgLAAAAAAAALCoAABo+AAAYBgAAAAAAAAQqAAA0PgAALCoAAGA+AAAwBgAAAAAAAAQqAACCPgAALCoAAJ0+AADQAgAAAAAAACwqAADNPgAA0AIAAAAAAAAsKgAA+D4AANACAAAAAAAALCoAACs/AADQAgAAAAAAACwqAABcPwAA0AIAAAAAAAAsKgAAfT8AANACAAAAAAAALCoAALE/AADQAgAAAAAAACwqAADmPwAA0AIAAAAAAAAsKgAAE0AAANACAAAAAAAALCoAAExAAADQAgAAAAAAAAQqAAB+QAAALCoAAMVAAADIAwAAAAAAACwqAACgQQAAeAwAAAAAAAAsKgAA50AAABAKAAAAAAAALCoAAIVBAAAQCgAAAAAAACwqAADEQQAAeAwAAAAAAAAsKgAA4UEAAEAHAAAAAAAABCoAAPRBAAAEKgAAm0UAACwqAACLRAAAOAQAAAAAAAAsKgAAYEIAAAgCAAAAAAAALCoAAOVCAAAoAwAAAAAAACwqAABjQwAA2AsAAAAAAAAsKgAA+EMAANgLAAAAAAAAVCoAAKFEAAAAAAAAAgAAABAKAAACAAAAGAoAAAIEAAAsKgAAwkUAAPABAAAAAAAALCoAAF9GAADoCwAAAAAAACwqAAAQRwAA6AsAAAAAAAAsKgAAz0cAADgEAAAAAAAALCoAAAFIAABIBAAAAAAAACwqAADnRwAAMAcAAAAAAAAsKgAAG0gAAHgMAAAAAAAALCoAAIdJAADQAgAAAAAAACwqAABtSQAAeAwAAAAAAAAsKgAAQEgAADAHAAAAAAAALCoAAFtIAABABwAAAAAAACwqAADoSAAAQAcAAAAAAAAsKgAAyEkAAHgMAAAAAAAALCoAAK9JAAAoAwAAAAAAACwqAAAISgAAeAwAAAAAAAAsKgAA50kAACgDAAAAAAAALCoAAGVKAADICQAAAAAAACwqAACMSgAA4AkAAAAAAAAsKgAAoEoAANAIAAAAAAAALCoAALVKAADQCAAAAAAAACwqAAD7SgAA8AkAAAAAAAAsKgAAF0sAAOAJAAAAAAAALCoAANVLAABoCQAAAAAAACwqAAAnSwAAQAkAAAAAAAAEKgAAlUsAACwqAADuSwAAQAkAAAAAAAAsKgAAVkwAAEAJAAAAAAAALCoAAFJNAABwCgAAAAAAACwqAADHTAAAEAoAAAAAAAAsKgAA30wAABgKAAAAAAAALCoAAItNAABwCgAAAAAAACwqAACgTQAA4AkAAAAAAAAsKgAAuk0AAKgJAAAAAAAABCoAAPRNAAAsKgAAB04AAMgJAAAAAAAALCoAABdOAADQCQAAAAAAACwqAAAvTgAA4AkAAAAAAAAsKgAAb04AALgJAAAAAAAABCoAAINOAAAEKgAAmE4AACwqAADaTgAA4AkAAAAAAAAsKgAA9E4AACAKAAAAAAAALCoAAA9PAAAgCgAAAAAAACwqAABMTwAAuAkAAAAAAAAsKgAAIU8AABgKAAAAAAAALCoAAGhPAADICQAAAAAAACwqAAB9TwAAqAkAAAAAAAAsKgAAik8AANALAAAAAAAALCoAAJtPAAAYCgAAAAAAACwqAAD2TwAAGAoAAAAAAAAsKgAAZlAAAHAKAAAAAAAALCoAAKBQAADgCQAAAAAAACwqAAC8UAAA0AoAAAAAAAAsKgAA2VAAANAKAAAAAAAALCoAAOxQAADYDAAAAAAAACwqAAAvUQAAIAsAAAAAAAAsKgAA/VAAADALAAAAAAAABCoAABdRAAAsKgAAPlEAAEgLAAAAAAAALCoAAFBRAABAAgAAAAAAACwqAABYUgAASAsAAAAAAAAsKgAAaVEAABgGAAAAAAAALCoAANdRAAAYBgAAAAAAACwqAAC5UgAAMAsAAAAAAAAsKgAAd1IAACgDAAAAAAAALCoAAIxSAAAoAwAAAAAAACwqAACjUgAAKAMAAAAAAAAEKgAAzFIAAAQqAAA2UwAALCoAAEdTAAAQCgAAAAAAACwqAABjUwAAEAoAAAAAAAAsKgAALVQAABgMAAAAAAAALCoAAIJTAABABwAAAAAAAAQqAABRVAAALCoAAHJUAAAYDAAAAAAAACwqAACmVAAAyAUAAAAAAAAsKgAAk1QAAEAHAAAAAAAALCoAALhUAADIBQAAAAAAACwqAADWVAAAcAwAAAAAAAAEKgAA6lQAACwqAAARVQAAyAMAAAAAAAAsKgAAMlUAAMgDAAAAAAAALCoAAEVVAAB4DAAAAAAAACwqAABoVQAAcAwAAAAAAAAsKgAAe1UAAHAMAAAAAAAABCoAAJRVAAAEKgAArlUAACwqAADDVQAA6AwAAAAAAAAEKgAAc1YAAAUAAAAAAAAAAAAAAGoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMAAAAXAAAArWsAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAP//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwqAAAlVwAAkA0AAAAAAAAsKgAA0lYAAKANAAAAAAAABCoAAPNWAAAsKgAAAFcAAIANAAAAAAAALCoAAHtXAACQDQAAAAAAACwqAACdVwAAuA0AAAAAAAAsKgAAwVcAAIANAAAAAAAAAAAAAPgBAAABAAAAAgAAAAEAAAABAAAAAAAAAPABAAADAAAABAAAAAEAAAABAAAAAAAAABACAAAFAAAABgAAAAIAAAACAAAAAAAAAAgCAAAHAAAACAAAAAIAAAABAAAAAAAAACACAAAJAAAACgAAAAEAAAAAAAAAMAIAAAsAAAAMAAAAAQAAAAIAAAAAAAAAKAIAAA0AAAAOAAAAAQAAAAEAAAAAAAAASAIAAA8AAAAQAAAAAQAAAAEAAAABAAAAAAAAAEACAAARAAAAEgAAAAEAAAABAAAAAQAAAAAAAABYAgAAEwAAABQAAAACAAAAAwAAAAAAAABwAgAAFQAAABYAAAADAAAAAQAAAAAAAABoAgAAFwAAABgAAAADAAAAAQAAAAAAAACIAgAAGQAAABoAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAwAAAAIAAAAEAAAAAQAAAAIAAAABAAAAAQAAAAEAAAADAAAAAgAAAAEAAAACAAAAAwAAAAEAAAAAAAAAgAIAABsAAAAcAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAACAAAAAQAAAAEAAAABAAAAAwAAAAIAAAABAAAAAgAAAAMAAAABAAAAAAAAAJgCAAAdAAAAHgAAAAIAAAADAAAAAwAAAAUAAAABAAAAAgAAAB8AAAAEAAAABQAAAAYAAAAEAAAABwAAAAUAAAAGAAAAAAAAALACAAAgAAAAIQAAAAYAAAAHAAAAAgAAAAgAAAAAAAAA+AIAACIAAAAjAAAAAgAAAAAAAADoAgAAIgAAACQAAAADAAAAAAAAANgCAAAiAAAAJQAAAAQAAAAAAAAAwAIAACIAAAAmAAAABQAAAAAAAAAIAwAABAAAACcAAAAoAAAACAAAAAkAAAADAAAACQAAAAcAAAAAAAAAGAMAACkAAAAqAAAACAAAAAoAAAACAAAABQAAAAYAAAAAAAAAOAMAACsAAAAsAAAAAQAAAAEAAAADAAAACgAAAAAAAABIAwAALQAAAC4AAAAEAAAACQAAAAEAAAABAAAACwAAAAsAAAACAAAADAAAAAwAAAAEAAAAAgAAAA0AAAAEAAAADQAAAAUAAAAAAAAAiAMAACkAAAAvAAAACAAAAA4AAAACAAAABQAAAAYAAAAAAAAAWAMAACkAAAAwAAAACAAAAA8AAAACAAAABQAAAAYAAAAAAAAAaAMAADEAAAAyAAAABgAAAAkAAAABAAAAAQAAABAAAAAOAAAAAwAAAA8AAAAMAAAABQAAAAMAAAAQAAAABQAAAA0AAAAKAAAACwAAAAMAAAAHAAAACAAAABEAAAAMAAAAEgAAAAAAAACoAwAAKQAAADMAAAANAAAAEQAAAAIAAAAFAAAABgAAAAAAAACYAwAAKQAAADQAAAAOAAAAEQAAAAIAAAAFAAAABgAAAAAAAAC4AwAANQAAADYAAAAEAAAAAQAAABIAAAAAAAAA0AMAADcAAAA4AAAABQAAAAIAAAATAAAAAAAAAOADAAA5AAAAOgAAAAkAAAAAAAAAAAQAAAYAAAAUAAAADwAAADsAAAA8AAAAAAAAAPADAAA9AAAAPgAAAAoAAAAJAAAAAQAAAAEAAAAQAAAADgAAAAQAAAATAAAADAAAAAcAAAAEAAAAEAAAAAUAAAANAAAAEAAAABEAAAADAAAACwAAAAgAAAAUAAAAEgAAAAcAAAAVAAAAFgAAAAwAAAATAAAAFwAAAA0AAAABAAAADgAAAAAAAAAIBAAAPwAAAEAAAAAPAAAAAAAAABgEAABBAAAAQgAAAEMAAABEAAAAFQAAABgAAABFAAAAEAAAABEAAAASAAAAFgAAAEYAAAAXAAAAAQAAABQAAAAYAAAAGQAAABoAAAAbAAAAHAAAAEcAAAAdAAAAEwAAAB4AAAAfAAAAGQAAABoAAAAIAAAACQAAABsAAABIAAAAIAAAACEAAAAiAAAAIwAAAAgAAAAJAAAASQAAACQAAAAKAAAACwAAAAwAAABKAAAAJQAAAA0AAAAAAAAAKAQAAEsAAABMAAAACgAAAAAAAABQBAAATQAAAE4AAAAGAAAAAwAAACYAAAAAAAAAYAQAAAsAAABPAAAAUAAAACcAAAAcAAAABgAAACgAAAAAAAAAcAQAAFEAAABSAAAAQwAAAEQAAAAVAAAAGAAAAFMAAAAQAAAAFAAAABIAAAApAAAARgAAACoAAAABAAAAFAAAABgAAAAZAAAAGgAAABsAAAAcAAAARwAAAB0AAAATAAAAHgAAAB8AAAAZAAAAGgAAAAgAAAAJAAAAHQAAAEgAAAAgAAAAIQAAACIAAAAjAAAADgAAAAkAAABJAAAAJAAAAAoAAAAPAAAADAAAAEoAAAAlAAAADQAAAAAAAACABAAAAwAAAFQAAAAMAAAABAAAAAAAAACgBAAAVQAAAFYAAAABAAAAAAAAALgEAABXAAAAWAAAAFkAAAABAAAAKwAAACwAAAABAAAAAgAAAAUAAAAeAAAABwAAAAAAAADIBAAAWgAAAFsAAABcAAAAAQAAAC0AAAAuAAAAAQAAAAMAAAAGAAAAHwAAAAgAAABdAAAAAAAAANgEAABaAAAAXgAAAFwAAAABAAAALQAAAC8AAAABAAAAAwAAAAYAAAAgAAAACQAAAF0AAAAVAAAAAAAAAOgEAABaAAAAXwAAAGAAAAABAAAAMAAAADEAAAABAAAABAAAAAcAAAAhAAAACgAAAAAAAAD4BAAAWgAAAGEAAABZAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAHgAAAAcAAAAAAAAAGAUAAFoAAABiAAAAWQAAAAEAAAAyAAAAMwAAAAEAAAAFAAAACAAAACIAAAALAAAAAAAAACgFAABaAAAAYwAAAGQAAAABAAAANAAAADUAAAACAAAABgAAAAkAAAAjAAAADAAAABYAAAAAAAAAOAUAAFoAAABlAAAAZgAAAAEAAAA2AAAANwAAAAEAAAAHAAAACgAAACQAAAANAAAAAAAAAEgFAABnAAAAaAAAABcAAAABAAAAGAAAAGkAAAAlAAAAFQAAAAEAAAABAAAAAgAAAAEAAAACAAAAAAAAAGAFAABqAAAAawAAAAMAAAA4AAAAEAAAABEAAAAWAAAAAAAAAHgFAAAJAAAAbAAAAAYAAAAAAAAAiAUAAG0AAABuAAAABAAAADkAAAA6AAAABQAAADsAAAA8AAAAPQAAAAYAAAAmAAAAbwAAACcAAAA+AAAAAAAAAJgFAAADAAAAcAAAAAEAAAALAAAAAAAAALgFAABxAAAAcgAAAAEAAAABAAAAAgAAAAAAAAACAAAAAAAAAAEAAAAAAAAA0AUAAAQAAABzAAAAdAAAACcAAAAoAAAADgAAAAkAAAAAAAAA2AUAAAQAAAB1AAAAdgAAACcAAAAoAAAADgAAAAkAAAAZAAAAFwAAAAAAAADoBQAABAAAAHcAAAB4AAAAJwAAACgAAAAOAAAACQAAABoAAAAYAAAAAAAAAPgFAAB5AAAAegAAAAcAAAAPAAAAPwAAAEAAAAAQAAAAEQAAABkAAAApAAAADQAAACoAAAArAAAALAAAAA4AAABBAAAAAAAAAAgGAAB7AAAAfAAAAA8AAAAAAAAAIAYAAH0AAAB+AAAABgAAAAcAAAASAAAACAAAAAAAAADIBgAAIgAAAH8AAAAIAAAAAAAAALgGAAAiAAAAgAAAAAkAAAAAAAAAqAYAACIAAACBAAAACgAAAAAAAACYBgAAIgAAAIIAAAALAAAAAAAAAIgGAAAiAAAAgwAAAAwAAAAAAAAAeAYAACIAAACEAAAADQAAAAAAAABoBgAAIgAAAIUAAAAOAAAAAAAAAFgGAAAiAAAAhgAAAA8AAAAAAAAASAYAACIAAACHAAAAEAAAAAAAAAA4BgAAIgAAAIgAAAARAAAAAAAAANgGAACJAAAAigAAABsAAABCAAAAAAAAAOAGAACLAAAAjAAAAAcAAAAEAAAAQwAAAAAAAADwBgAAjQAAAI4AAAAIAAAABQAAAEQAAAAAAAAAAAcAADkAAACPAAAAGgAAAAAAAAAQBwAAkAAAAJEAAAAbAAAAAAAAACAHAACSAAAAkwAAAAkAAAAGAAAARQAAAAAAAAAwBwAAlAAAAJUAAAAcAAAAHQAAAAMAAAAAAAAASAcAAJYAAACXAAAAQwAAAEQAAAAVAAAAGAAAAJgAAAAQAAAAFAAAABwAAABGAAAARgAAAEcAAAAAAAAAUAcAAEsAAACZAAAAEAAAAAAAAACQBwAAOQAAAJoAAAAdAAAAAQAAAAAAAACABwAAOQAAAJsAAAAdAAAAAgAAAAAAAABwBwAAKQAAAJwAAAAIAAAASAAAAAIAAAAFAAAABgAAAAAAAABgBwAABwAAAJ0AAAARAAAADAAAAAAAAACgBwAAngAAAJ8AAAAeAAAAHwAAAPz///+gBwAAoAAAAKEAAAAgAAAAAAAAAOAHAAA5AAAAogAAACEAAAABAAAAAAAAANAHAAA5AAAAowAAACEAAAACAAAAAAAAAMAHAAADAAAApAAAABIAAAANAAAAAAAAAPAHAABLAAAApQAAABMAAAAAAAAAAAgAAEsAAACmAAAAFAAAAAAAAAAQCAAAlAAAAKcAAAAcAAAAHQAAAAQAAAAAAAAAIAgAAKgAAACpAAAACgAAAAcAAABJAAAAAAAAADAIAACqAAAAqwAAABIAAAAAAAAAQAgAAKwAAACtAAAACwAAAAgAAABKAAAAAAAAAHAIAACUAAAArgAAAB4AAAAfAAAABQAAAAAAAABgCAAAlAAAAK8AAAAgAAAAIQAAAAYAAAAAAAAAUAgAAJQAAACwAAAAHAAAAB0AAAAHAAAAAAAAAIAIAACxAAAAsgAAAAwAAAAJAAAASwAAAAAAAACQCAAAKQAAALMAAAAIAAAATAAAAAIAAAAFAAAABgAAAAAAAACgCAAAtAAAALUAAAANAAAACgAAAE0AAAAAAAAAsAgAACkAAAC2AAAAIgAAABEAAAACAAAABQAAAAYAAAAAAAAAwAgAALcAAAC4AAAAIgAAAAkAAAABAAAAAQAAAE4AAAAtAAAABQAAAC4AAAAMAAAAEgAAAAUAAAAvAAAAEwAAAA0AAABPAAAAuQAAAAAAAADQCAAAMQAAALoAAAAjAAAACQAAAAEAAAABAAAAUAAAAA4AAAAGAAAAMAAAAFEAAAAHAAAABAAAADEAAAAUAAAADQAAACMAAAAkAAAAAwAAACQAAAAIAAAAEQAAAAwAAAAAAAAA4AgAADEAAAC7AAAAIwAAAAkAAAABAAAAAQAAAFAAAAAOAAAABgAAADIAAABSAAAABwAAAAQAAAAxAAAAFAAAAA0AAAAjAAAAJAAAAAMAAAAkAAAACAAAABEAAAAMAAAAAAAAAPAIAAAxAAAAvAAAACMAAAAJAAAAAQAAAAEAAABQAAAADgAAAAYAAAAzAAAAUwAAAAcAAAAEAAAAMQAAABQAAAANAAAAIwAAACQAAAADAAAAJAAAAAgAAAARAAAADAAAAAAAAAAACQAAvQAAAL4AAAAlAAAACQAAAAEAAAABAAAAVAAAAA4AAAAHAAAANAAAAAwAAAAHAAAABAAAADUAAAAVAAAADQAAABAAAAAlAAAAAwAAACYAAAAIAAAAEQAAAAwAAAAAAAAAEAkAADEAAAC/AAAAJwAAAAkAAAABAAAAAQAAABAAAAAOAAAACAAAADYAAAAMAAAAEwAAAAYAAAAQAAAABQAAAA0AAAAmAAAAJwAAAAMAAAAoAAAACAAAABEAAAAMAAAAAAAAACAJAADAAAAAwQAAACkAAAAJAAAAAQAAAAEAAABVAAAANwAAAAkAAAA4AAAADAAAAAQAAAACAAAAOQAAABYAAAANAAAAKgAAACgAAAApAAAAVgAAAFcAAAAAAAAAMAkAAMIAAADDAAAAKgAAAAAAAABICQAAwgAAAMQAAAArAAAAAAAAAFgJAADCAAAAxQAAACwAAAAAAAAAaAkAAMYAAADHAAAAKQAAAAkAAAABAAAAAQAAAFgAAAA3AAAACQAAADoAAAAMAAAABAAAAAIAAAANAAAABAAAAA0AAAArAAAAKAAAACkAAAAAAAAAeAkAADkAAADIAAAALAAAAAAAAACICQAAyQAAAMoAAAAtAAAAAAAAAJgJAADLAAAAzAAAAC4AAAAJAAAAAQAAAAEAAABZAAAAOwAAAAoAAAA8AAAADAAAAAQAAAACAAAAPQAAABcAAAANAAAALwAAAAAAAACoCQAAPQAAAM0AAAAjAAAACQAAAAEAAAABAAAAEAAAAA4AAAALAAAAAQAAAAwAAAAHAAAABAAAABAAAAAFAAAADQAAABAAAAAtAAAAAwAAADAAAAAIAAAAEQAAAAwAAAAHAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAAAAADgCQAAMQAAAM4AAAAjAAAACQAAAAEAAAABAAAAEAAAAA4AAAABAAAAAQAAAAwAAAAHAAAABAAAABAAAAAFAAAADQAAABAAAAABAAAAAwAAAAEAAAAIAAAAEQAAAAwAAAAAAAAAAAoAAM8AAADQAAAAMQAAAAkAAAABAAAAAQAAAFoAAAAOAAAACwAAAD4AAAAMAAAABwAAAAQAAAA/AAAAGAAAAA0AAAAuAAAALwAAAAMAAAAyAAAACAAAABEAAAAMAAAABwAAAEAAAABBAAAAMwAAADAAAABCAAAANAAAAAIAAAABAAAAAAAAACAKAAAxAAAA0QAAADUAAAAJAAAAAQAAAAEAAABbAAAADgAAAAwAAABDAAAAXAAAABQAAAAEAAAARAAAABkAAAANAAAAEAAAADEAAAADAAAANgAAAAgAAAARAAAADAAAAAAAAAAwCgAAMQAAANIAAAA1AAAACQAAAAEAAAABAAAAWwAAAA4AAAAMAAAARQAAAFwAAAAUAAAABAAAAEQAAAAZAAAADQAAABAAAAAxAAAAAwAAADYAAAAIAAAAEQAAAAwAAAAAAAAAQAoAADEAAADTAAAANQAAAAkAAAABAAAAAQAAAFsAAAAOAAAADAAAAEYAAABcAAAAFAAAAAQAAABEAAAAGQAAAA0AAAAQAAAAMQAAAAMAAAA2AAAACAAAABEAAAAMAAAAAAAAAFAKAAA9AAAA1AAAADEAAAAJAAAAAQAAAAEAAABdAAAARwAAAAsAAABIAAAADAAAAAcAAAAEAAAAEAAAAAUAAAANAAAAMgAAADMAAAADAAAANwAAAAgAAAARAAAADAAAAAcAAABJAAAASgAAADgAAAA0AAAASwAAADkAAAADAAAAAAAAAGAKAADJAAAA1QAAADoAAAAAAAAAgAoAAD0AAADWAAAAOwAAAAkAAAABAAAAAQAAAF4AAAAOAAAADQAAAEwAAAAMAAAAFQAAAAQAAAAQAAAABQAAAA0AAAA1AAAANgAAAAMAAAA8AAAACAAAAE0AAAA3AAAABwAAAE4AAABPAAAAPQAAADgAAABQAAAAPgAAAAQAAAA5AAAAAAAAAJAKAADXAAAA2AAAABMAAABRAAAAGgAAAF8AAABgAAAAFAAAAAAAAACwCgAAyQAAANkAAAA/AAAAAAAAAKAKAADJAAAA2gAAAEAAAAAAAAAAwAoAANsAAADcAAAAQQAAAAkAAAABAAAAAQAAAGEAAABSAAAADgAAAFMAAAAMAAAABAAAAAIAAAANAAAABAAAAA0AAABCAAAADgAAAAAAAADQCgAAMQAAAN0AAABDAAAACQAAAAEAAAABAAAAYgAAAA4AAAAPAAAAVAAAAGMAAAAWAAAABAAAAFUAAAAbAAAADQAAADoAAAA7AAAAAwAAAEQAAAAIAAAAEQAAAAwAAAAHAAAAAAAAAOAKAAAxAAAA3gAAAEMAAAAJAAAAAQAAAAEAAABiAAAADgAAAA8AAABWAAAAYwAAABYAAAAEAAAAVQAAABsAAAANAAAAOgAAADwAAAADAAAARQAAAAgAAAARAAAADAAAAAgAAAAAAAAA8AoAADEAAADfAAAAQwAAAAkAAAABAAAAAQAAAGIAAAAOAAAADwAAAFcAAABjAAAAFgAAAAQAAABVAAAAGwAAAA0AAAA6AAAAPQAAAAMAAABGAAAACAAAABEAAAAMAAAACQAAAAAAAAAACwAA4AAAAOEAAABHAAAAAQAAAAIAAABkAAAAZQAAAFgAAABmAAAAZwAAAFkAAAA+AAAAPwAAAFoAAAAcAAAAAAAAABALAADiAAAA4wAAAAEAAABAAAAADgAAAEgAAAACAAAASQAAAGgAAABbAAAAXAAAAEEAAABpAAAA5AAAAAAAAAAgCwAA4gAAAOUAAAABAAAAQAAAAA4AAABIAAAAAgAAAEkAAABoAAAAWwAAAFwAAABBAAAAaQAAAOQAAAAAAAAAOAsAAOYAAADnAAAAHQAAABUAAABCAAAAXQAAAF4AAABfAAAAQwAAAGAAAABEAAAAagAAAEUAAAAeAAAAYQAAAGsAAABsAAAAAAAAAFgLAADoAAAA6QAAAB8AAAAWAAAARgAAAGIAAABjAAAAZAAAAEcAAABlAAAASAAAAG0AAABJAAAAIAAAAGYAAABuAAAAbwAAAAAAAABoCwAAewAAAOoAAAAVAAAAAAAAAHgLAAB7AAAA6wAAABYAAAAAAAAAiAsAAOwAAADtAAAAAgAAAEoAAAAPAAAASgAAAAMAAABLAAAAcAAAAGcAAABoAAAASwAAAHEAAADuAAAAAAAAAJgLAAApAAAA7wAAAEwAAAByAAAAAgAAAAUAAAAGAAAAAAAAAKgLAAApAAAA8AAAAAgAAABzAAAAAgAAAAUAAAAGAAAAAAAAALgLAAApAAAA8QAAAAgAAAB0AAAAAgAAAAUAAAAGAAAAAAAAANALAADyAAAA8wAAABMAAABRAAAAGgAAAF8AAABgAAAAAAAAAOgLAAA5AAAA9AAAACEAAAABAAAAAAAAAPgLAAD1AAAA9gAAAAEAAAAAAAAACAwAAJQAAAD3AAAATQAAAE4AAAAIAAAAAAAAACAMAAD1AAAA+AAAAAIAAAAAAAAAMAwAAHEAAAD5AAAAAgAAAAAAAABADAAAlAAAAPoAAABPAAAAUAAAAAkAAAAAAAAAUAwAAHEAAAD7AAAAAwAAAAAAAABgDAAA/AAAAP0AAAAQAAAAAAAAAIgMAAD+AAAA/wAAABEAAAALAAAAdQAAAAAAAACYDAAAAAEAAAEBAAASAAAADAAAAHYAAAAAAAAAqAwAAPwAAAACAQAAEwAAAAAAAAC4DAAA/AAAAAMBAAAUAAAAAAAAAMgMAAAEAQAABQEAACEAAAAiAAAAaQAAAAAAAADQDAAABgEAAAcBAAAAAAAA2AwAAAgBAAAJAQAARwAAAAEAAAACAAAAZAAAAGUAAABYAAAAdwAAAHgAAABZAAAAPgAAAD8AAABaAAAAHAAAAEBpAAD/////AAAAAIANAAAKAQAACwEAAAwBAAANAQAAJAAAAAQAAAAVAAAATAAAAAAAAACoDQAACgEAAA4BAAAMAQAADQEAACQAAAAFAAAAFgAAAE0AAAAAAAAA2A0AAAoBAAAPAQAADAEAAA0BAAAkAAAABgAAABcAAABOAAAATjE2YnRDb2xsaXNpb25Xb3JsZDI3Q2xvc2VzdENvbnZleFJlc3VsdENhbGxiYWNrRQBOMTZidENvbGxpc2lvbldvcmxkMjBDb252ZXhSZXN1bHRDYWxsYmFja0UATjE2YnRDb2xsaXNpb25Xb3JsZDI0QWxsSGl0c1JheVJlc3VsdENhbGxiYWNrRQBOMTZidENvbGxpc2lvbldvcmxkMTdSYXlSZXN1bHRDYWxsYmFja0UAMThidFZlaGljbGVSYXljYXN0ZXIAMjBidERlZmF1bHRNb3Rpb25TdGF0ZQAxM2J0TW90aW9uU3RhdGUAMTlidEdob3N0UGFpckNhbGxiYWNrADI1YnRPdmVybGFwcGluZ1BhaXJDYWxsYmFjawBOMTZidENvbGxpc2lvbldvcmxkMjRDbG9zZXN0UmF5UmVzdWx0Q2FsbGJhY2tFADI5Q29uY3JldGVDb250YWN0UmVzdWx0Q2FsbGJhY2sATjE2YnRDb2xsaXNpb25Xb3JsZDIxQ29udGFjdFJlc3VsdENhbGxiYWNrRQB7IHZhciBzZWxmID0gTW9kdWxlWydnZXRDYWNoZSddKE1vZHVsZVsnQ29uY3JldGVDb250YWN0UmVzdWx0Q2FsbGJhY2snXSlbJDBdOyBpZiAoIXNlbGYuaGFzT3duUHJvcGVydHkoJ2FkZFNpbmdsZVJlc3VsdCcpKSB0aHJvdyAnYSBKU0ltcGxlbWVudGF0aW9uIG11c3QgaW1wbGVtZW50IGFsbCBmdW5jdGlvbnMsIHlvdSBmb3Jnb3QgQ29uY3JldGVDb250YWN0UmVzdWx0Q2FsbGJhY2s6OmFkZFNpbmdsZVJlc3VsdC4nOyByZXR1cm4gc2VsZlsnYWRkU2luZ2xlUmVzdWx0J10oJDEsJDIsJDMsJDQsJDUsJDYsJDcpOyB9ADExRGVidWdEcmF3ZXIAMTJidElEZWJ1Z0RyYXcAeyB2YXIgc2VsZiA9IE1vZHVsZVsnZ2V0Q2FjaGUnXShNb2R1bGVbJ0RlYnVnRHJhd2VyJ10pWyQwXTsgaWYgKCFzZWxmLmhhc093blByb3BlcnR5KCdkcmF3TGluZScpKSB0aHJvdyAnYSBKU0ltcGxlbWVudGF0aW9uIG11c3QgaW1wbGVtZW50IGFsbCBmdW5jdGlvbnMsIHlvdSBmb3Jnb3QgRGVidWdEcmF3ZXI6OmRyYXdMaW5lLic7IHNlbGZbJ2RyYXdMaW5lJ10oJDEsJDIsJDMpOyB9AHsgdmFyIHNlbGYgPSBNb2R1bGVbJ2dldENhY2hlJ10oTW9kdWxlWydEZWJ1Z0RyYXdlciddKVskMF07IGlmICghc2VsZi5oYXNPd25Qcm9wZXJ0eSgnZHJhd0NvbnRhY3RQb2ludCcpKSB0aHJvdyAnYSBKU0ltcGxlbWVudGF0aW9uIG11c3QgaW1wbGVtZW50IGFsbCBmdW5jdGlvbnMsIHlvdSBmb3Jnb3QgRGVidWdEcmF3ZXI6OmRyYXdDb250YWN0UG9pbnQuJzsgc2VsZlsnZHJhd0NvbnRhY3RQb2ludCddKCQxLCQyLCQzLCQ0LCQ1KTsgfQB7IHZhciBzZWxmID0gTW9kdWxlWydnZXRDYWNoZSddKE1vZHVsZVsnRGVidWdEcmF3ZXInXSlbJDBdOyBpZiAoIXNlbGYuaGFzT3duUHJvcGVydHkoJ3JlcG9ydEVycm9yV2FybmluZycpKSB0aHJvdyAnYSBKU0ltcGxlbWVudGF0aW9uIG11c3QgaW1wbGVtZW50IGFsbCBmdW5jdGlvbnMsIHlvdSBmb3Jnb3QgRGVidWdEcmF3ZXI6OnJlcG9ydEVycm9yV2FybmluZy4nOyBzZWxmWydyZXBvcnRFcnJvcldhcm5pbmcnXSgkMSk7IH0AeyB2YXIgc2VsZiA9IE1vZHVsZVsnZ2V0Q2FjaGUnXShNb2R1bGVbJ0RlYnVnRHJhd2VyJ10pWyQwXTsgaWYgKCFzZWxmLmhhc093blByb3BlcnR5KCdkcmF3M2RUZXh0JykpIHRocm93ICdhIEpTSW1wbGVtZW50YXRpb24gbXVzdCBpbXBsZW1lbnQgYWxsIGZ1bmN0aW9ucywgeW91IGZvcmdvdCBEZWJ1Z0RyYXdlcjo6ZHJhdzNkVGV4dC4nOyBzZWxmWydkcmF3M2RUZXh0J10oJDEsJDIpOyB9AHsgdmFyIHNlbGYgPSBNb2R1bGVbJ2dldENhY2hlJ10oTW9kdWxlWydEZWJ1Z0RyYXdlciddKVskMF07IGlmICghc2VsZi5oYXNPd25Qcm9wZXJ0eSgnc2V0RGVidWdNb2RlJykpIHRocm93ICdhIEpTSW1wbGVtZW50YXRpb24gbXVzdCBpbXBsZW1lbnQgYWxsIGZ1bmN0aW9ucywgeW91IGZvcmdvdCBEZWJ1Z0RyYXdlcjo6c2V0RGVidWdNb2RlLic7IHNlbGZbJ3NldERlYnVnTW9kZSddKCQxKTsgfQB7IHZhciBzZWxmID0gTW9kdWxlWydnZXRDYWNoZSddKE1vZHVsZVsnRGVidWdEcmF3ZXInXSlbJDBdOyBpZiAoIXNlbGYuaGFzT3duUHJvcGVydHkoJ2dldERlYnVnTW9kZScpKSB0aHJvdyAnYSBKU0ltcGxlbWVudGF0aW9uIG11c3QgaW1wbGVtZW50IGFsbCBmdW5jdGlvbnMsIHlvdSBmb3Jnb3QgRGVidWdEcmF3ZXI6OmdldERlYnVnTW9kZS4nOyByZXR1cm4gc2VsZlsnZ2V0RGVidWdNb2RlJ10oKTsgfQAyM2J0RGVmYXVsdFNvZnRCb2R5U29sdmVyADE2YnRTb2Z0Qm9keVNvbHZlcgA0MWJ0U29mdEJvZHlSaWdpZEJvZHlDb2xsaXNpb25Db25maWd1cmF0aW9uAE4zNWJ0U29mdEJvZHlDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtMTdTd2FwcGVkQ3JlYXRlRnVuY0UAMzBidENvbGxpc2lvbkFsZ29yaXRobUNyZWF0ZUZ1bmMATjM1YnRTb2Z0Qm9keUNvbmNhdmVDb2xsaXNpb25BbGdvcml0aG0xMENyZWF0ZUZ1bmNFAE4yOWJ0U29mdFJpZ2lkQ29sbGlzaW9uQWxnb3JpdGhtMTBDcmVhdGVGdW5jRQBOMjhidFNvZnRTb2Z0Q29sbGlzaW9uQWxnb3JpdGhtMTBDcmVhdGVGdW5jRQBTb2Z0Qm9keU1hdGVyaWFsRGF0YQBTb2Z0Qm9keU5vZGVEYXRhAFNvZnRCb2R5TGlua0RhdGEAU29mdEJvZHlGYWNlRGF0YQBTb2Z0Qm9keVRldHJhRGF0YQBTb2Z0UmlnaWRBbmNob3JEYXRhAFNvZnRCb2R5UG9zZURhdGEAU29mdEJvZHlDbHVzdGVyRGF0YQBidFNvZnRCb2R5Sm9pbnREYXRhAGJ0U29mdEJvZHlGbG9hdERhdGEAMTBidFNvZnRCb2R5AE4xMGJ0U29mdEJvZHkxNVJheUZyb21Ub0Nhc3RlckUATjZidERidnQ4SUNvbGxpZGVFAE4xMGJ0U29mdEJvZHk1Sm9pbnRFAE4xMGJ0U29mdEJvZHk2Q0pvaW50RQBTb2Z0Qm9keQAyNGJ0U29mdEJvZHlDb2xsaXNpb25TaGFwZQBVcGRhdGVDbHVzdGVycwBTb2Z0Qm9keSBhcHBseUZvcmNlcwBBcHBseUNsdXN0ZXJzAGJ0Q29udmV4SW50ZXJuYWxTaGFwZURhdGEAU09GVENMVVNURVIAMjdidFNvZnRDbHVzdGVyQ29sbGlzaW9uU2hhcGUATjE1YnRTb2Z0Q29sbGlkZXJzMTJDb2xsaWRlQ0xfUlNFAE4xNWJ0U29mdENvbGxpZGVyczExQ2x1c3RlckJhc2VFAE4xNWJ0U29mdENvbGxpZGVyczEzQ29sbGlkZVNERl9SU0UATjE1YnRTb2Z0Q29sbGlkZXJzMTJDb2xsaWRlVkZfU1NFAE4xNWJ0U29mdENvbGxpZGVyczEyQ29sbGlkZUNMX1NTRQAyOWJ0U29mdFJpZ2lkQ29sbGlzaW9uQWxnb3JpdGhtADIwYnRDb2xsaXNpb25BbGdvcml0aG0AVHJpYW5nbGUAMTVidFRyaWFuZ2xlU2hhcGUATjEyYnRDb252ZXhDYXN0MTBDYXN0UmVzdWx0RQBaTjM1YnRTb2Z0Qm9keUNvbmNhdmVDb2xsaXNpb25BbGdvcml0aG0yMWNhbGN1bGF0ZVRpbWVPZkltcGFjdEVQMTdidENvbGxpc2lvbk9iamVjdFMxX1JLMTZidERpc3BhdGNoZXJJbmZvUDE2YnRNYW5pZm9sZFJlc3VsdEUzMUxvY2FsVHJpYW5nbGVTcGhlcmVDYXN0Q2FsbGJhY2sAMjZidFNvZnRCb2R5VHJpYW5nbGVDYWxsYmFjawAzNWJ0U29mdEJvZHlDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtAHNvbHZlU29mdENvbnN0cmFpbnRzAHByZWRpY3RVbmNvbnN0cmFpbnRNb3Rpb25Tb2Z0Qm9keQByYXlUZXN0ADIzYnRTb2Z0U2luZ2xlUmF5Q2FsbGJhY2sAMjNidEJyb2FkcGhhc2VSYXlDYWxsYmFjawAyNGJ0QnJvYWRwaGFzZUFhYmJDYWxsYmFjawAyNGJ0U29mdFJpZ2lkRHluYW1pY3NXb3JsZAAyOGJ0U29mdFNvZnRDb2xsaXNpb25BbGdvcml0aG0AYnRSaWdpZEJvZHlGbG9hdERhdGEAMTFidFJpZ2lkQm9keQBpbnRlcm5hbFNpbmdsZVN0ZXBTaW11bGF0aW9uAHVwZGF0ZUFjdGlvbnMAY3JlYXRlUHJlZGljdGl2ZUNvbnRhY3RzAHJlbGVhc2UgcHJlZGljdGl2ZSBjb250YWN0IG1hbmlmb2xkcwBwcmVkaWN0aXZlIGNvbnZleFN3ZWVwVGVzdAAzNGJ0Q2xvc2VzdE5vdE1lQ29udmV4UmVzdWx0Q2FsbGJhY2sAdXBkYXRlQWN0aXZhdGlvblN0YXRlAHNvbHZlQ29uc3RyYWludHMAY2FsY3VsYXRlU2ltdWxhdGlvbklzbGFuZHMAaW50ZWdyYXRlVHJhbnNmb3JtcwBDQ0QgbW90aW9uIGNsYW1waW5nAGFwcGx5IHNwZWN1bGF0aXZlIGNvbnRhY3QgcmVzdGl0dXRpb24AcHJlZGljdFVuY29uc3RyYWludE1vdGlvbgBzeW5jaHJvbml6ZU1vdGlvblN0YXRlcwBzdGVwU2ltdWxhdGlvbgBidER5bmFtaWNzV29ybGRGbG9hdERhdGEAZGVidWdEcmF3V29ybGQAMjNidERpc2NyZXRlRHluYW1pY3NXb3JsZAAxNWJ0RHluYW1pY3NXb3JsZAAyN0lucGxhY2VTb2x2ZXJJc2xhbmRDYWxsYmFjawBOMjVidFNpbXVsYXRpb25Jc2xhbmRNYW5hZ2VyMTRJc2xhbmRDYWxsYmFja0UAMTdidEZpeGVkQ29uc3RyYWludABidEdlbmVyaWM2RG9mQ29uc3RyYWludERhdGEAMjNidEdlbmVyaWM2RG9mQ29uc3RyYWludABidEdlbmVyaWM2RG9mU3ByaW5nQ29uc3RyYWludERhdGEAMjlidEdlbmVyaWM2RG9mU3ByaW5nQ29uc3RyYWludABidFBvaW50MlBvaW50Q29uc3RyYWludEZsb2F0RGF0YQAyM2J0UG9pbnQyUG9pbnRDb25zdHJhaW50AGJ0VHlwZWRDb25zdHJhaW50RmxvYXREYXRhADE3YnRUeXBlZENvbnN0cmFpbnQAMTNidFR5cGVkT2JqZWN0AGJ0U2xpZGVyQ29uc3RyYWludERhdGEAMThidFNsaWRlckNvbnN0cmFpbnQAYnRDb25lVHdpc3RDb25zdHJhaW50RGF0YQAyMWJ0Q29uZVR3aXN0Q29uc3RyYWludABidEhpbmdlQ29uc3RyYWludEZsb2F0RGF0YQAxN2J0SGluZ2VDb25zdHJhaW50AHNvbHZlR3JvdXBDYWNoZUZyaWVuZGx5SXRlcmF0aW9ucwBzb2x2ZUdyb3VwQ2FjaGVGcmllbmRseVNldHVwAHNvbHZlR3JvdXAAMzVidFNlcXVlbnRpYWxJbXB1bHNlQ29uc3RyYWludFNvbHZlcgAxOGJ0Q29uc3RyYWludFNvbHZlcgAxNmJ0UmF5Y2FzdFZlaGljbGUAMTdidEFjdGlvbkludGVyZmFjZQAyNWJ0RGVmYXVsdFZlaGljbGVSYXljYXN0ZXIANDNidEtpbmVtYXRpY0Nsb3Nlc3ROb3RNZUNvbnZleFJlc3VsdENhbGxiYWNrADMwYnRLaW5lbWF0aWNDaGFyYWN0ZXJDb250cm9sbGVyADMwYnRDaGFyYWN0ZXJDb250cm9sbGVySW50ZXJmYWNlADIyYnRTdWJzaW1wbGV4Q29udmV4Q2FzdAAxMmJ0Q29udmV4Q2FzdABidENvbGxpc2lvbk9iamVjdEZsb2F0RGF0YQAxN2J0Q29sbGlzaW9uT2JqZWN0ADEzYnRHaG9zdE9iamVjdAAyNGJ0UGFpckNhY2hpbmdHaG9zdE9iamVjdAAyM2J0Q29sbGlzaW9uUGFpckNhbGxiYWNrADE3YnRPdmVybGFwQ2FsbGJhY2sAMjFidENvbGxpc2lvbkRpc3BhdGNoZXIAMzFidERlZmF1bHRDb2xsaXNpb25Db25maWd1cmF0aW9uADI0YnRDb2xsaXNpb25Db25maWd1cmF0aW9uAE4zMWJ0Q29udmV4UGxhbmVDb2xsaXNpb25BbGdvcml0aG0xMENyZWF0ZUZ1bmNFAE4yNmJ0Qm94Qm94Q29sbGlzaW9uQWxnb3JpdGhtMTBDcmVhdGVGdW5jRQBOMzRidFNwaGVyZVRyaWFuZ2xlQ29sbGlzaW9uQWxnb3JpdGhtMTBDcmVhdGVGdW5jRQBOMzJidFNwaGVyZVNwaGVyZUNvbGxpc2lvbkFsZ29yaXRobTEwQ3JlYXRlRnVuY0UATjE2YnRFbXB0eUFsZ29yaXRobTEwQ3JlYXRlRnVuY0UATjI4YnRDb21wb3VuZENvbGxpc2lvbkFsZ29yaXRobTE3U3dhcHBlZENyZWF0ZUZ1bmNFAE4zNmJ0Q29tcG91bmRDb21wb3VuZENvbGxpc2lvbkFsZ29yaXRobTEwQ3JlYXRlRnVuY0UATjI4YnRDb21wb3VuZENvbGxpc2lvbkFsZ29yaXRobTEwQ3JlYXRlRnVuY0UATjMzYnRDb252ZXhDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtMTdTd2FwcGVkQ3JlYXRlRnVuY0UATjMzYnRDb252ZXhDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtMTBDcmVhdGVGdW5jRQAyNWJ0U2ltdWxhdGlvbklzbGFuZE1hbmFnZXIAaXNsYW5kVW5pb25GaW5kQW5kUXVpY2tTb3J0AHByb2Nlc3NJc2xhbmRzADMxYnRDb252ZXhQbGFuZUNvbGxpc2lvbkFsZ29yaXRobQBaTjMzYnRDb252ZXhDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtMjFjYWxjdWxhdGVUaW1lT2ZJbXBhY3RFUDE3YnRDb2xsaXNpb25PYmplY3RTMV9SSzE2YnREaXNwYXRjaGVySW5mb1AxNmJ0TWFuaWZvbGRSZXN1bHRFMzFMb2NhbFRyaWFuZ2xlU3BoZXJlQ2FzdENhbGxiYWNrADI0YnRDb252ZXhUcmlhbmdsZUNhbGxiYWNrADMzYnRDb252ZXhDb25jYXZlQ29sbGlzaW9uQWxnb3JpdGhtADI2YnRCb3hCb3hDb2xsaXNpb25BbGdvcml0aG0AMTZidE1hbmlmb2xkUmVzdWx0AE4zNmJ0RGlzY3JldGVDb2xsaXNpb25EZXRlY3RvckludGVyZmFjZTZSZXN1bHRFAHBlcmZvcm1EaXNjcmV0ZUNvbGxpc2lvbkRldGVjdGlvbgBkaXNwYXRjaEFsbENvbGxpc2lvblBhaXJzAFpOMTZidENvbGxpc2lvbldvcmxkMjFyYXlUZXN0U2luZ2xlSW50ZXJuYWxFUksxMWJ0VHJhbnNmb3JtUzJfUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclJOU18xN1JheVJlc3VsdENhbGxiYWNrRUUxNUxvY2FsSW5mb0FkZGVyMgBaTjE2YnRDb2xsaXNpb25Xb3JsZDIxcmF5VGVzdFNpbmdsZUludGVybmFsRVJLMTFidFRyYW5zZm9ybVMyX1BLMjRidENvbGxpc2lvbk9iamVjdFdyYXBwZXJSTlNfMTdSYXlSZXN1bHRDYWxsYmFja0VFOVJheVRlc3RlcgBaTjE2YnRDb2xsaXNpb25Xb3JsZDIxcmF5VGVzdFNpbmdsZUludGVybmFsRVJLMTFidFRyYW5zZm9ybVMyX1BLMjRidENvbGxpc2lvbk9iamVjdFdyYXBwZXJSTlNfMTdSYXlSZXN1bHRDYWxsYmFja0VFMjlCcmlkZ2VUcmlhbmdsZVJheWNhc3RDYWxsYmFja18wAFpOMTZidENvbGxpc2lvbldvcmxkMjFyYXlUZXN0U2luZ2xlSW50ZXJuYWxFUksxMWJ0VHJhbnNmb3JtUzJfUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclJOU18xN1JheVJlc3VsdENhbGxiYWNrRUUyOUJyaWRnZVRyaWFuZ2xlUmF5Y2FzdENhbGxiYWNrADE5YnRTaW5nbGVSYXlDYWxsYmFjawAxN0RlYnVnRHJhd2NhbGxiYWNrAGNhbGN1bGF0ZU92ZXJsYXBwaW5nUGFpcnMAdXBkYXRlQWFiYnMAAU92ZXJmbG93IGluIEFBQkIsIG9iamVjdCByZW1vdmVkIGZyb20gc2ltdWxhdGlvbgBJZiB5b3UgY2FuIHJlcHJvZHVjZSB0aGlzLCBwbGVhc2UgZW1haWwgYnVnc0Bjb250aW51b3VzcGh5c2ljcy5jb20KAFBsZWFzZSBpbmNsdWRlIGFib3ZlIGluZm9ybWF0aW9uLCB5b3VyIFBsYXRmb3JtLCB2ZXJzaW9uIG9mIE9TLgoAVGhhbmtzLgoAMTZidENvbGxpc2lvbldvcmxkAGNvbnZleFN3ZWVwQ29tcG91bmQAWk4xNmJ0Q29sbGlzaW9uV29ybGQyNW9iamVjdFF1ZXJ5U2luZ2xlSW50ZXJuYWxFUEsxM2J0Q29udmV4U2hhcGVSSzExYnRUcmFuc2Zvcm1TNV9QSzI0YnRDb2xsaXNpb25PYmplY3RXcmFwcGVyUk5TXzIwQ29udmV4UmVzdWx0Q2FsbGJhY2tFZkUxNExvY2FsSW5mb0FkZGVyAFpOMTZidENvbGxpc2lvbldvcmxkMjVvYmplY3RRdWVyeVNpbmdsZUludGVybmFsRVBLMTNidENvbnZleFNoYXBlUksxMWJ0VHJhbnNmb3JtUzVfUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclJOU18yMENvbnZleFJlc3VsdENhbGxiYWNrRWZFMzJCcmlkZ2VUcmlhbmdsZUNvbnZleGNhc3RDYWxsYmFja18wAFpOMTZidENvbGxpc2lvbldvcmxkMjVvYmplY3RRdWVyeVNpbmdsZUludGVybmFsRVBLMTNidENvbnZleFNoYXBlUksxMWJ0VHJhbnNmb3JtUzVfUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclJOU18yMENvbnZleFJlc3VsdENhbGxiYWNrRWZFMzJCcmlkZ2VUcmlhbmdsZUNvbnZleGNhc3RDYWxsYmFjawBjb252ZXhTd2VlcFRlc3QAMjFidFNpbmdsZVN3ZWVwQ2FsbGJhY2sAMjNidEJyaWRnZWRNYW5pZm9sZFJlc3VsdAAyM2J0U2luZ2xlQ29udGFjdENhbGxiYWNrADM0YnRTcGhlcmVUcmlhbmdsZUNvbGxpc2lvbkFsZ29yaXRobQAyNGJ0UGVydHVyYmVkQ29udGFjdFJlc3VsdABaTjIzYnRDb252ZXhDb252ZXhBbGdvcml0aG0xNnByb2Nlc3NDb2xsaXNpb25FUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclMyX1JLMTZidERpc3BhdGNoZXJJbmZvUDE2YnRNYW5pZm9sZFJlc3VsdEUyMWJ0V2l0aG91dE1hcmdpblJlc3VsdABaTjIzYnRDb252ZXhDb252ZXhBbGdvcml0aG0xNnByb2Nlc3NDb2xsaXNpb25FUEsyNGJ0Q29sbGlzaW9uT2JqZWN0V3JhcHBlclMyX1JLMTZidERpc3BhdGNoZXJJbmZvUDE2YnRNYW5pZm9sZFJlc3VsdEUxM2J0RHVtbXlSZXN1bHQAMjNidENvbnZleENvbnZleEFsZ29yaXRobQBOMjNidENvbnZleENvbnZleEFsZ29yaXRobTEwQ3JlYXRlRnVuY0UAMjJidENvbXBvdW5kTGVhZkNhbGxiYWNrADI4YnRDb21wb3VuZENvbGxpc2lvbkFsZ29yaXRobQAzMGJ0Q29tcG91bmRDb21wb3VuZExlYWZDYWxsYmFjawAzNmJ0Q29tcG91bmRDb21wb3VuZENvbGxpc2lvbkFsZ29yaXRobQBidENvbXBvdW5kU2hhcGVDaGlsZERhdGEAYnRDb21wb3VuZFNoYXBlRGF0YQBDb21wb3VuZAAxNWJ0Q29tcG91bmRTaGFwZQBidENvbmVTaGFwZURhdGEAQ29uZQAxMWJ0Q29uZVNoYXBlAENvbmVaADEyYnRDb25lU2hhcGVaAENvbmVYADEyYnRDb25lU2hhcGVYAGJ0UG9zaXRpb25BbmRSYWRpdXMAYnRNdWx0aVNwaGVyZVNoYXBlRGF0YQBNdWx0aVNwaGVyZQAxOGJ0TXVsdGlTcGhlcmVTaGFwZQBTUEhFUkUAMTNidFNwaGVyZVNoYXBlAFpOSzIyYnRCdmhUcmlhbmdsZU1lc2hTaGFwZTE5cHJvY2Vzc0FsbFRyaWFuZ2xlc0VQMThidFRyaWFuZ2xlQ2FsbGJhY2tSSzlidFZlY3RvcjNTNF9FMjFNeU5vZGVPdmVybGFwQ2FsbGJhY2sAMjFidE5vZGVPdmVybGFwQ2FsbGJhY2sAYnRUcmlhbmdsZU1lc2hTaGFwZURhdGEAQlZIVFJJQU5HTEVNRVNIADIyYnRCdmhUcmlhbmdsZU1lc2hTaGFwZQBaTjIyYnRCdmhUcmlhbmdsZU1lc2hTaGFwZTE0cGVyZm9ybVJheWNhc3RFUDE4YnRUcmlhbmdsZUNhbGxiYWNrUks5YnRWZWN0b3IzUzRfRTIxTXlOb2RlT3ZlcmxhcENhbGxiYWNrAFpOMjJidEJ2aFRyaWFuZ2xlTWVzaFNoYXBlMTdwZXJmb3JtQ29udmV4Y2FzdEVQMThidFRyaWFuZ2xlQ2FsbGJhY2tSSzlidFZlY3RvcjNTNF9TNF9TNF9FMjFNeU5vZGVPdmVybGFwQ2FsbGJhY2sAMjFTdXBwb3J0VmVydGV4Q2FsbGJhY2sAWk5LMTlidFRyaWFuZ2xlTWVzaFNoYXBlMTlwcm9jZXNzQWxsVHJpYW5nbGVzRVAxOGJ0VHJpYW5nbGVDYWxsYmFja1JLOWJ0VmVjdG9yM1M0X0UxNkZpbHRlcmVkQ2FsbGJhY2sAVFJJQU5HTEVNRVNIADE5YnRUcmlhbmdsZU1lc2hTaGFwZQBidFN0YXRpY1BsYW5lU2hhcGVEYXRhAFNUQVRJQ1BMQU5FADE4YnRTdGF0aWNQbGFuZVNoYXBlADIzYnRQb2x5aGVkcmFsQ29udmV4U2hhcGUAMzRidFBvbHloZWRyYWxDb252ZXhBYWJiQ2FjaGluZ1NoYXBlAGJ0Q29sbGlzaW9uU2hhcGVEYXRhADE2YnRDb2xsaXNpb25TaGFwZQAxM2J0Q29udmV4U2hhcGUAMjFidENvbnZleEludGVybmFsU2hhcGUAMzJidENvbnZleEludGVybmFsQWFiYkNhY2hpbmdTaGFwZQBidENvbnZleEh1bGxTaGFwZURhdGEAQ29udmV4ADE3YnRDb252ZXhIdWxsU2hhcGUAMThidFRyaWFuZ2xlQ2FsbGJhY2sAMzFidEludGVybmFsVHJpYW5nbGVJbmRleENhbGxiYWNrAGJ0Q2Fwc3VsZVNoYXBlRGF0YQBDYXBzdWxlU2hhcGUAMTRidENhcHN1bGVTaGFwZQBDYXBzdWxlWAAxNWJ0Q2Fwc3VsZVNoYXBlWABDYXBzdWxlWgAxNWJ0Q2Fwc3VsZVNoYXBlWgAyNkxvY2FsU3VwcG9ydFZlcnRleENhbGxiYWNrAENvbnZleFRyaW1lc2gAMjVidENvbnZleFRyaWFuZ2xlTWVzaFNoYXBlADE0YnRDb25jYXZlU2hhcGUAQm94ADEwYnRCb3hTaGFwZQAxNGJ0T3B0aW1pemVkQnZoAFpOMTRidE9wdGltaXplZEJ2aDVidWlsZEVQMjNidFN0cmlkaW5nTWVzaEludGVyZmFjZWJSSzlidFZlY3RvcjNTNF9FMjBOb2RlVHJpYW5nbGVDYWxsYmFjawBaTjE0YnRPcHRpbWl6ZWRCdmg1YnVpbGRFUDIzYnRTdHJpZGluZ01lc2hJbnRlcmZhY2ViUks5YnRWZWN0b3IzUzRfRTI5UXVhbnRpemVkTm9kZVRyaWFuZ2xlQ2FsbGJhY2sASEVJR0hURklFTEQAMjVidEhlaWdodGZpZWxkVGVycmFpblNoYXBlAGJ0Q3lsaW5kZXJTaGFwZURhdGEAQ3lsaW5kZXJZADE1YnRDeWxpbmRlclNoYXBlAEN5bGluZGVyWAAxNmJ0Q3lsaW5kZXJTaGFwZVgAQ3lsaW5kZXJaADE2YnRDeWxpbmRlclNoYXBlWgAxNGJ0VHJpYW5nbGVNZXNoADIwYnRBeGlzU3dlZXAzSW50ZXJuYWxJdEUAMjFidEJyb2FkcGhhc2VJbnRlcmZhY2UAMTJidEF4aXNTd2VlcDMAMTVidE51bGxQYWlyQ2FjaGUAMjJidE92ZXJsYXBwaW5nUGFpckNhY2hlAFpOMjhidEhhc2hlZE92ZXJsYXBwaW5nUGFpckNhY2hlMTljbGVhblByb3h5RnJvbVBhaXJzRVAxN2J0QnJvYWRwaGFzZVByb3h5UDEyYnREaXNwYXRjaGVyRTE3Q2xlYW5QYWlyQ2FsbGJhY2sAWk4yOGJ0SGFzaGVkT3ZlcmxhcHBpbmdQYWlyQ2FjaGUzN3JlbW92ZU92ZXJsYXBwaW5nUGFpcnNDb250YWluaW5nUHJveHlFUDE3YnRCcm9hZHBoYXNlUHJveHlQMTJidERpc3BhdGNoZXJFMThSZW1vdmVQYWlyQ2FsbGJhY2sAMjhidEhhc2hlZE92ZXJsYXBwaW5nUGFpckNhY2hlADE4YnREYnZ0VHJlZUNvbGxpZGVyADIwQnJvYWRwaGFzZUFhYmJUZXN0ZXIAMTlCcm9hZHBoYXNlUmF5VGVzdGVyADE2YnREYnZ0QnJvYWRwaGFzZQAxMmJ0RGlzcGF0Y2hlcgBidE9wdGltaXplZEJ2aE5vZGVEYXRhAGJ0UXVhbnRpemVkQnZoTm9kZURhdGEAYnRCdmhTdWJ0cmVlSW5mb0RhdGEAYnRRdWFudGl6ZWRCdmhGbG9hdERhdGEAMTRidFF1YW50aXplZEJ2aAAyNWJ0VHJpYW5nbGVSYXljYXN0Q2FsbGJhY2sAMjhidFRyaWFuZ2xlQ29udmV4Y2FzdENhbGxiYWNrAFpOMzNidE1pbmtvd3NraVBlbmV0cmF0aW9uRGVwdGhTb2x2ZXIxMmNhbGNQZW5EZXB0aEVSMjJidFZvcm9ub2lTaW1wbGV4U29sdmVyUEsxM2J0Q29udmV4U2hhcGVTNF9SSzExYnRUcmFuc2Zvcm1TN19SOWJ0VmVjdG9yM1M5X1M5X1AxMmJ0SURlYnVnRHJhd0UyMGJ0SW50ZXJtZWRpYXRlUmVzdWx0ADMzYnRNaW5rb3dza2lQZW5ldHJhdGlvbkRlcHRoU29sdmVyADMwYnRDb252ZXhQZW5ldHJhdGlvbkRlcHRoU29sdmVyADMwYnRHamtFcGFQZW5ldHJhdGlvbkRlcHRoU29sdmVyADE2YnRQb2ludENvbGxlY3RvcgAxNWJ0R2prQ29udmV4Q2FzdAAyN2J0Q29udGludW91c0NvbnZleENvbGxpc2lvbgAxN2J0R2prUGFpckRldGVjdG9yADM2YnREaXNjcmV0ZUNvbGxpc2lvbkRldGVjdG9ySW50ZXJmYWNlADMwYnRBY3RpdmF0aW5nQ29sbGlzaW9uQWxnb3JpdGhtADE2YnRFbXB0eUFsZ29yaXRobQAzMmJ0U3BoZXJlU3BoZXJlQ29sbGlzaW9uQWxnb3JpdGhtADE2YnRCb3hCb3hEZXRlY3RvcgAyMlNwaGVyZVRyaWFuZ2xlRGV0ZWN0b3IAMjNidEhhc2hlZFNpbXBsZVBhaXJDYWNoZQAxOGJ0Q29udmV4UG9seWhlZHJvbgAyNmJ0VHJpYW5nbGVJbmRleFZlcnRleEFycmF5AGJ0SW50SW5kZXhEYXRhAGJ0U2hvcnRJbnRJbmRleFRyaXBsZXREYXRhAGJ0Q2hhckluZGV4VHJpcGxldERhdGEAYnRWZWN0b3IzRmxvYXREYXRhAGJ0VmVjdG9yM0RvdWJsZURhdGEAYnRNZXNoUGFydERhdGEAYnRTdHJpZGluZ01lc2hJbnRlcmZhY2VEYXRhADIzYnRTdHJpZGluZ01lc2hJbnRlcmZhY2UAUm9vdAAtKyAgIDBYMHgAKG51bGwpAC0wWCswWCAwWC0weCsweCAweABpbmYASU5GAG5hbgBOQU4AdGVybWluYXRpbmcATjEwX19jeHhhYml2MTE2X19zaGltX3R5cGVfaW5mb0UAU3Q5dHlwZV9pbmZvAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTdfX2NsYXNzX3R5cGVfaW5mb0UAdGVybWluYXRlX2hhbmRsZXIgdW5leHBlY3RlZGx5IHJldHVybmVkAGludABmbG9hdAAuAE4xMF9fY3h4YWJpdjExN19fcGJhc2VfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMjFfX3ZtaV9jbGFzc190eXBlX2luZm9F"; +function Ta(a){return a.replace(/\b__Z[\w\d_]+/g,function(a){return a===a?a:a+" ["+a+"]"})}function Ua(){var a=Error();if(!a.stack){try{throw Error(0);}catch(b){a=b}if(!a.stack)return"(no stack trace available)"}return a.stack.toString()}var Va={},Wa=[];function Xa(a){a&&Va[a].Zf++}function Ya(a){if(!a||Va[a])return a;for(var b in Va)for(var e=+b,f=Va[e].Yf,h=f.length,n=0;n>2]}var cb={};function db(){qa("OOM")}var eb=!1;function ra(a){for(var b=[],e=0;e>4; +h=(h&15)<<4|n>>2;var S=(n&3)<<6|B;b+=String.fromCharCode(f);64!==n&&(b+=String.fromCharCode(h));64!==B&&(b+=String.fromCharCode(S))}while(e> +2]=a);return a},k:function(a,b){ab=b;try{return cb.Da(),bb(),bb(),bb(),bb(),0}catch(e){return qa(e),-e.za}},l:function(a,b){ab=b;try{var e=bb(),f=bb(),h=bb();for(b=a=0;b>2],B=Ca[f+(8*b+4)>>2],S=0;S>2]=b/1E3|0;Ca[a+4>>2]=b%1E3*1E3|0;return 0},y:function(){qa("trap!")},z:db,A:function(a){return a},B:Ta,C:function(){var a=d._fflush;a&&a(0);Za[1].length&&$a(1,10);Za[2].length&&$a(2,10)},D:Ua,E:function(){var a=Ua();d.extraStackTrace&& +(a+="\n"+d.extraStackTrace());return Ta(a)},F:27776,G:27760};// EMSCRIPTEN_START_ASM +var g=(/** @suppress {uselessCode} */ function(global,env,buffer) { +"use asm";var a=new global.Int8Array(buffer),b=new global.Int16Array(buffer),c=new global.Int32Array(buffer),d=new global.Uint8Array(buffer),e=new global.Uint16Array(buffer),f=new global.Float32Array(buffer),g=new global.Float64Array(buffer),h=env.F|0,i=env.G|0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=global.Math.abs,s=global.Math.sqrt,t=global.Math.pow,u=global.Math.cos,v=global.Math.sin,w=global.Math.acos,x=global.Math.asin,y=global.Math.atan2,z=global.Math.imul,A=global.Math.clz32,B=env.a,C=env.b,D=env.c,E=env.d,F=env.e,G=env.f,H=env.g,I=env.h,J=env.i,K=env.j,L=env.k,M=env.l,N=env.m,O=env.n,P=env.o,Q=env.p,R=env.q,S=env.r,T=env.s,U=env.t,V=env.u,W=env.v,X=env.w,Y=env.x,Z=env.y,_=env.z,$=env.A,aa=env.B,ba=env.C,ca=env.D,da=env.E,ea=27792,fa=5270672,ga=0.0; +// EMSCRIPTEN_START_FUNCS +function ge(b){b=b|0;var d=0,e=0;c[b>>2]=6336;if(a[b+20>>0]|0){d=c[b+16>>2]|0;e=c[d+16>>2]|0;if(e){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);d=c[b+16>>2]|0}if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}}if(a[b+12>>0]|0){d=c[b+8>>2]|0;e=c[d+16>>2]|0;if(e){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);d=c[b+8>>2]|0}if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}}d=c[b+32>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+32>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+36>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+36>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+40>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+40>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+44>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+44>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+48>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+48>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+52>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+52>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+56>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+56>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+60>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+60>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+76>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+76>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+80>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+80>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+72>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+72>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+88>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+88>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+84>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+84>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+24>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+28>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+28>>2]|0;if(!d)return;c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);return}function he(b,d){b=b|0;d=+d;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,u=0.0;r=ea;ea=ea+16|0;Fi(14828);e=c[b+232>>2]|0;if((e|0)>0){q=0;do{p=c[(c[b+240>>2]|0)+(q<<2)>>2]|0;if(!(c[p+204>>2]&3)){n=+f[p+444>>2];j=+t(+(1.0-n),+d);g=+f[p+312>>2]*j;f[p+312>>2]=g;h=j*+f[p+316>>2];f[p+316>>2]=h;j=j*+f[p+320>>2];f[p+320>>2]=j;o=+f[p+448>>2];i=+t(+(1.0-o),+d);l=+f[p+328>>2]*i;f[p+328>>2]=l;k=i*+f[p+332>>2];f[p+332>>2]=k;i=i*+f[p+336>>2];f[p+336>>2]=i;do if(a[p+452>>0]|0){if(l*l+k*k+i*i<+f[p+464>>2]?g*g+h*h+j*j<+f[p+460>>2]:0){u=+f[p+456>>2];f[p+328>>2]=l*u;f[p+332>>2]=k*u;f[p+336>>2]=i*u;f[p+312>>2]=g*u;f[p+316>>2]=h*u;f[p+320>>2]=j*u;g=g*u;m=h*u;j=j*u;l=l*u;k=k*u;i=i*u}else m=h;h=+s(+(g*g+m*m+j*j));do if(h.004999999888241291){f[p+312>>2]=g-g*(1.0/h)*.004999999888241291;f[p+316>>2]=m-m*(1.0/h)*.004999999888241291;f[p+320>>2]=j-j*(1.0/h)*.004999999888241291;break}else{c[p+312>>2]=0;c[p+312+4>>2]=0;c[p+312+8>>2]=0;c[p+312+12>>2]=0;break}while(0);g=+s(+(l*l+k*k+i*i));if(g.004999999888241291){f[p+328>>2]=l-l*(1.0/g)*.004999999888241291;f[p+332>>2]=k-k*(1.0/g)*.004999999888241291;f[p+336>>2]=i-i*(1.0/g)*.004999999888241291;break}else{c[p+328>>2]=0;c[p+328+4>>2]=0;c[p+328+8>>2]=0;c[p+328+12>>2]=0;break}}while(0);ag(p+4|0,+f[p+312>>2],+f[p+316>>2],+f[p+320>>2],p+328|0,d,p+68|0);e=c[b+232>>2]|0}q=q+1|0}while((q|0)<(e|0))}e=c[2685]|0;b=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=b;if(b|0){ea=r;return}do if(c[e+4>>2]|0){Y(r|0,0)|0;b=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[r+4>>2]|0)-(c[b+4>>2]|0)+(((c[r>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[e+16>>2]|0)){e=c[2685]|0;break}else{ea=r;return}}while(0);c[2685]=c[e+20>>2];ea=r;return}function ie(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;c[b+16>>2]=c[a+4>>2];c[b+20>>2]=c[a+8>>2];c[b+24>>2]=c[a+12>>2];c[b+28>>2]=c[a+16>>2];c[b+32>>2]=c[a+20>>2];c[b+36>>2]=c[a+24>>2];c[b+40>>2]=c[a+28>>2];c[b+44>>2]=c[a+32>>2];c[b+48>>2]=c[a+36>>2];c[b+52>>2]=c[a+40>>2];c[b+56>>2]=c[a+44>>2];c[b+60>>2]=c[a+48>>2];c[b+64>>2]=c[a+52>>2];c[b+68>>2]=c[a+56>>2];c[b+72>>2]=c[a+60>>2];c[b+76>>2]=c[a+64>>2];c[b+80>>2]=c[a+68>>2];c[b+84>>2]=c[a+72>>2];c[b+88>>2]=c[a+76>>2];c[b+92>>2]=c[a+80>>2];c[b+96>>2]=c[a+84>>2];c[b+100>>2]=c[a+88>>2];c[b+104>>2]=c[a+92>>2];c[b+108>>2]=c[a+96>>2];c[b+112>>2]=c[a+100>>2];c[b+116>>2]=c[a+104>>2];c[b+120>>2]=c[a+108>>2];c[b+124>>2]=c[a+112>>2];c[b+128>>2]=c[a+116>>2];c[b+132>>2]=c[a+120>>2];c[b+136>>2]=c[a+124>>2];c[b+140>>2]=c[a+128>>2];c[b+144>>2]=c[a+132>>2];c[b+148>>2]=c[a+136>>2];c[b+152>>2]=c[a+140>>2];c[b+156>>2]=c[a+144>>2];c[b+160>>2]=c[a+148>>2];c[b+164>>2]=c[a+152>>2];c[b+168>>2]=c[a+156>>2];c[b+172>>2]=c[a+160>>2];c[b+176>>2]=c[a+164>>2];c[b+180>>2]=c[a+168>>2];c[b+184>>2]=c[a+172>>2];c[b+188>>2]=c[a+176>>2];c[b+224>>2]=c[a+180>>2];c[b+192>>2]=c[a+184>>2];c[b>>2]=0;c[b+4>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[a+192>>2]|0)|0;c[b+8>>2]=0;c[b+228>>2]=c[a+204>>2];c[b+232>>2]=c[a+208>>2];c[b+236>>2]=c[a+212>>2];c[b+240>>2]=c[a+216>>2];c[b+196>>2]=c[a+220>>2];c[b+200>>2]=c[a+224>>2];c[b+204>>2]=c[a+232>>2];c[b+208>>2]=c[a+228>>2];c[b+244>>2]=c[a+236>>2];e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b+12>>2]=f;if(!f){d=a+244|0;d=c[d>>2]|0;f=b+212|0;c[f>>2]=d;f=a+248|0;f=c[f>>2]|0;d=b+216|0;c[d>>2]=f;d=a+252|0;d=c[d>>2]|0;f=b+220|0;c[f>>2]=d;a=a+256|0;a=c[a>>2]|0;f=b+248|0;c[f>>2]=a;return 15808}Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);d=a+244|0;d=c[d>>2]|0;f=b+212|0;c[f>>2]=d;f=a+248|0;f=c[f>>2]|0;d=b+216|0;c[d>>2]=f;d=a+252|0;d=c[d>>2]|0;f=b+220|0;c[f>>2]=d;a=a+256|0;a=c[a>>2]|0;f=b+248|0;c[f>>2]=a;return 15808}function je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0,j=0.0,k=0.0,l=0,m=0,n=0.0;if(!(c[a>>2]|0)){c[a>>2]=d;c[d+32>>2]=0;return}e=c[b+40>>2]|0;if(!e)m=b;else{h=+f[d>>2]+ +f[d+16>>2];k=+f[d+4>>2]+ +f[d+20>>2];j=+f[d+8>>2]+ +f[d+24>>2];do{m=c[b+36>>2]|0;n=+r(+(h-(+f[m>>2]+ +f[m+16>>2])))+ +r(+(k-(+f[m+4>>2]+ +f[m+20>>2])))+ +r(+(j-(+f[m+8>>2]+ +f[m+24>>2])));b=c[b+36+((!(n<+r(+(h-(+f[e>>2]+ +f[e+16>>2])))+ +r(+(k-(+f[e+4>>2]+ +f[e+20>>2])))+ +r(+(j-(+f[e+8>>2]+ +f[e+24>>2]))))&1)<<2)>>2]|0;e=c[b+40>>2]|0}while((e|0)!=0);m=b}l=m+32|0;g=c[l>>2]|0;b=c[a+4>>2]|0;if(!b){c[6747]=(c[6747]|0)+1;e=kb(63)|0;if(!e)b=0;else{c[(e+4+15&-16)+-4>>2]=e;b=e+4+15&-16}e=b;i=e+44|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(i|0))}else c[a+4>>2]=0;c[b+32>>2]=g;c[b+36>>2]=0;e=b+40|0;c[e>>2]=0;n=+f[d>>2];k=+f[m>>2];f[b>>2]=n>2];n=+f[m+16>>2];f[b+16>>2]=k>n?k:n;n=+f[d+4>>2];k=+f[m+4>>2];f[b+4>>2]=n>2];n=+f[m+20>>2];f[b+20>>2]=k>n?k:n;n=+f[d+8>>2];k=+f[m+8>>2];f[b+8>>2]=n>2];n=+f[m+24>>2];f[b+24>>2]=k>n?k:n;if(!g){c[b+36>>2]=m;c[l>>2]=b;c[e>>2]=d;c[d+32>>2]=b;c[a>>2]=b;return}c[g+36+(((c[(c[l>>2]|0)+40>>2]|0)==(m|0)&1)<<2)>>2]=b;c[b+36>>2]=m;c[l>>2]=b;c[e>>2]=d;c[d+32>>2]=b;h=+f[b>>2];while(1){e=g+4|0;if(((((+f[g>>2]<=h?+f[e>>2]<=+f[b+4>>2]:0)?+f[g+8>>2]<=+f[b+8>>2]:0)?+f[g+16>>2]>=+f[b+16>>2]:0)?+f[g+20>>2]>=+f[b+20>>2]:0)?+f[g+24>>2]>=+f[b+24>>2]:0){e=21;break}d=c[g+36>>2]|0;a=c[g+40>>2]|0;k=+f[d>>2];h=+f[a>>2];h=k>2]=h;k=+f[d+16>>2];n=+f[a+16>>2];f[g+16>>2]=k>n?k:n;n=+f[d+4>>2];k=+f[a+4>>2];f[e>>2]=n>2];n=+f[a+20>>2];f[g+20>>2]=k>n?k:n;n=+f[d+8>>2];k=+f[a+8>>2];f[g+8>>2]=n>2];n=+f[a+24>>2];f[g+24>>2]=k>n?k:n;e=c[g+32>>2]|0;if(!e){e=21;break}else{b=g;g=e}}if((e|0)==21)return}function ke(b,d){b=b|0;d=d|0;var e=0,g=0.0,i=0.0,j=0.0,k=0,l=0.0,m=0.0;if(a[b+48>>0]|0){c[d>>2]=0;c[d+4>>2]=0;return}c[d>>2]=4;c[d+4>>2]=2;Zb(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);f[b+1088>>2]=0.0;a[b+297>>0]=0;l=+f[b+192>>2];m=+f[b+196>>2];do if(l<=m){i=+f[b+892>>2];j=+f[b+908>>2];g=+f[b+924>>2];g=+y(+(+f[b+832>>2]*i+ +f[b+848>>2]*j+ +f[b+864>>2]*g),+(+f[b+828>>2]*i+ +f[b+844>>2]*j+ +f[b+860>>2]*g));do if(!(l>=m)){if(g3.1415927410125732)i=(l-g)%6.2831854820251465+-6.2831854820251465;else i=(l-g)%6.2831854820251465;else i=(l-g)%6.2831854820251465+6.2831854820251465;i=+r(+i);if(!((m-g)%6.2831854820251465<-3.1415927410125732))if((m-g)%6.2831854820251465>3.1415927410125732)j=(m-g)%6.2831854820251465+-6.2831854820251465;else j=(m-g)%6.2831854820251465;else j=(m-g)%6.2831854820251465+6.2831854820251465;k=i<+r(+j);g=k?g:g+6.2831854820251465;break}if(g>m){if(!((g-m)%6.2831854820251465<-3.1415927410125732))if((g-m)%6.2831854820251465>3.1415927410125732)i=(g-m)%6.2831854820251465+-6.2831854820251465;else i=(g-m)%6.2831854820251465;else i=(g-m)%6.2831854820251465+6.2831854820251465;i=+r(+i);if(!((g-l)%6.2831854820251465<-3.1415927410125732))if((g-l)%6.2831854820251465>3.1415927410125732)j=(g-l)%6.2831854820251465+-6.2831854820251465;else j=(g-l)%6.2831854820251465;else j=(g-l)%6.2831854820251465+6.2831854820251465;k=+r(+j)>2]=g;if(g>2]=g-l;a[b+297>>0]=1;k=1;break}if(g>m){f[b+1088>>2]=g-m;a[b+297>>0]=1;k=1}else k=0}else k=0;while(0);a[b+296>>0]=0;e=c[b+1032>>2]|0;c[b+1080>>2]=e;g=+f[b+184>>2];i=+f[b+188>>2];j=(c[h>>2]=e,+f[h>>2]);do if(!(g<=i))e=32;else{if(!(ij)){e=32;break}}else g=i;f[b+1032>>2]=j-g;a[b+296>>0]=1;e=34}while(0);if((e|0)==32?(f[b+1032>>2]=0.0,a[b+1096>>0]|0):0)e=34;if((e|0)==34){c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1}if(k<<24>>24==0?(a[b+1112>>0]|0)==0:0)return;c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1;return}function le(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0;k=ea;ea=ea+128|0;a=c[a+16>>2]|0;n=+f[a+892>>2];x=+f[a+896>>2];y=+f[a+900>>2];w=+f[a+908>>2];l=+f[a+912>>2];h=+f[a+916>>2];v=+f[b>>2];u=+f[b+4>>2];t=+f[b+8>>2];r=+f[b+16>>2];q=+f[b+20>>2];p=+f[b+24>>2];m=+f[b+32>>2];g=+f[b+36>>2];i=+f[b+40>>2];s=+f[b+48>>2];o=+f[b+52>>2];j=+f[b+56>>2];f[k>>2]=n*v+x*u+y*t+s;f[k+4>>2]=n*r+x*q+y*p+o;f[k+8>>2]=n*m+x*g+y*i+j;f[k+12>>2]=0.0;f[k+16>>2]=w*v+x*u+y*t+s;f[k+20>>2]=w*r+x*q+y*p+o;f[k+24>>2]=w*m+x*g+y*i+j;f[k+28>>2]=0.0;f[k+32>>2]=w*v+l*u+y*t+s;f[k+36>>2]=w*r+l*q+y*p+o;f[k+40>>2]=w*m+l*g+y*i+j;f[k+44>>2]=0.0;f[k+48>>2]=n*v+l*u+y*t+s;f[k+52>>2]=n*r+l*q+y*p+o;f[k+56>>2]=n*m+l*g+y*i+j;f[k+60>>2]=0.0;f[k+64>>2]=n*v+x*u+h*t+s;f[k+68>>2]=n*r+x*q+h*p+o;f[k+72>>2]=n*m+x*g+h*i+j;f[k+76>>2]=0.0;f[k+80>>2]=w*v+x*u+h*t+s;f[k+84>>2]=w*r+x*q+h*p+o;f[k+88>>2]=w*m+x*g+h*i+j;f[k+92>>2]=0.0;f[k+96>>2]=w*v+l*u+h*t+s;f[k+100>>2]=w*r+l*q+h*p+o;f[k+104>>2]=w*m+l*g+h*i+j;f[k+108>>2]=0.0;f[k+112>>2]=n*v+l*u+h*t+s;f[k+116>>2]=n*r+l*q+h*p+o;f[k+120>>2]=n*m+l*g+h*i+j;f[k+124>>2]=0.0;c[e>>2]=c[k>>2];c[e+4>>2]=c[k+4>>2];c[e+8>>2]=c[k+8>>2];c[e+12>>2]=c[k+12>>2];c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];b=1;do{g=+f[k+(b<<4)>>2];if(g<+f[d>>2])f[d>>2]=g;h=+f[k+(b<<4)+4>>2];if(h<+f[d+4>>2])f[d+4>>2]=h;i=+f[k+(b<<4)+8>>2];if(i<+f[d+8>>2])f[d+8>>2]=i;j=+f[k+(b<<4)+12>>2];if(j<+f[d+12>>2])f[d+12>>2]=j;if(+f[e>>2]>2]=g;if(+f[e+4>>2]>2]=h;if(+f[e+8>>2]>2]=i;if(+f[e+12>>2]>2]=j;b=b+1|0}while((b|0)!=8);ea=k;return}function me(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0;q=ea;ea=ea+64|0;Yf(c[b+116>>2]|0,d,0);e=+f[d+204>>2]+ +f[d+212>>2];o=e*+f[d+56>>2]+ +f[d+40>>2];p=e*+f[d+60>>2]+ +f[d+44>>2];f[d+16>>2]=+f[d+52>>2]*e+ +f[d+36>>2];f[d+20>>2]=o;f[d+24>>2]=p;f[d+28>>2]=0.0;f[q+32>>2]=-1.0;r=c[b+100>>2]|0;r=wa[c[(c[r>>2]|0)+8>>2]&31](r,d+36|0,d+16|0,q)|0;c[d+88>>2]=0;if(!r){c[d+32>>2]=c[d+204>>2];f[d+272>>2]=0.0;p=-+f[d+56>>2];o=-+f[d+60>>2];f[d>>2]=-+f[d+52>>2];f[d+4>>2]=p;f[d+8>>2]=o;f[d+12>>2]=0.0;o=1.0;p=-1.0;r=d+268|0;f[r>>2]=o;ea=q;return +p}p=e*+f[q+32>>2];c[d>>2]=c[q+16>>2];c[d+4>>2]=c[q+16+4>>2];c[d+8>>2]=c[q+16+8>>2];c[d+12>>2]=c[q+16+12>>2];a[d+84>>0]=1;if((a[24952]|0)==0?DC(24952)|0:0){c[q+40>>2]=0;c[q+40+4>>2]=0;c[q+40+8>>2]=0;c[q+40+12>>2]=0;sf(26260,0.0,0,0,q+40|0);PB(24952)}c[6616]=c[6616]|1;f[6651]=0.0;o=+f[6661]*0.0;e=+f[6662]*0.0;f[6656]=+f[6660]*0.0;f[6657]=o;f[6658]=e;f[6659]=0.0;c[6664]=0;c[6665]=0;c[6666]=0;c[6667]=0;e=+f[6653]*0.0;o=+f[6654]*0.0;f[6705]=+f[6652]*0.0;f[6706]=e;f[6707]=o;f[6708]=0.0;c[d+88>>2]=26260;o=p-+f[d+212>>2];f[d+32>>2]=o;e=+f[d+204>>2];h=+f[d+208>>2]*.009999999776482582;g=oe+h)f[d+32>>2]=g>e+h?e+h:g;c[d+16>>2]=c[q>>2];c[d+16+4>>2]=c[q+4>>2];c[d+16+8>>2]=c[q+8>>2];c[d+16+12>>2]=c[q+12>>2];l=+f[d>>2];m=+f[d+4>>2];n=+f[d+8>>2];o=l*+f[d+52>>2]+m*+f[d+56>>2]+n*+f[d+60>>2];b=c[b+116>>2]|0;i=+f[d+16>>2]-+f[b+52>>2];k=+f[d+20>>2]-+f[b+56>>2];j=+f[d+24>>2]-+f[b+60>>2];e=+f[b+332>>2];g=+f[b+336>>2];h=+f[b+328>>2];if(!(o>=-.10000000149011612)){f[d+272>>2]=-1.0/o*(l*(e*j-k*g+ +f[b+312>>2])+m*(i*g-j*h+ +f[b+316>>2])+n*(k*h-i*e+ +f[b+320>>2]));o=-1.0/o;r=d+268|0;f[r>>2]=o;ea=q;return +p}else{f[d+272>>2]=0.0;o=10.0;r=d+268|0;f[r>>2]=o;ea=q;return +p}return 0.0}function ne(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;v=+f[b>>2];u=+f[b+4>>2];t=+f[b+8>>2];r=1.0/+s(+(v*v+u*u+t*t));z=+f[d>>2];y=+f[d+4>>2];x=+f[d+8>>2];w=1.0/+s(+(z*z+y*y+x*x));C=t*r*(y*w)-u*r*(x*w);B=v*r*(x*w)-t*r*(z*w);A=u*r*(z*w)-v*r*(y*w);d=c[a+28>>2]|0;e=+f[d+4>>2];h=+f[d+20>>2];j=+f[d+36>>2];g=+f[d+8>>2];i=+f[d+24>>2];k=+f[d+40>>2];l=+f[d+12>>2];n=+f[d+28>>2];p=+f[d+44>>2];m=-+f[d+52>>2];o=-+f[d+56>>2];q=-+f[d+60>>2];f[a+48>>2]=j*A+(e*C+h*B);f[a+52>>2]=j*(x*w)+(e*(z*w)+h*(y*w));f[a+56>>2]=e*(v*r)+u*r*h+t*r*j;f[a+60>>2]=0.0;f[a+64>>2]=A*k+(g*C+i*B);f[a+68>>2]=z*w*g+y*w*i+x*w*k;f[a+72>>2]=v*r*g+u*r*i+t*r*k;f[a+76>>2]=0.0;f[a+80>>2]=C*l+B*n+A*p;f[a+84>>2]=z*w*l+y*w*n+x*w*p;f[a+88>>2]=v*r*l+u*r*n+t*r*p;f[a+92>>2]=0.0;f[a+96>>2]=e*0.0+h*0.0+j*0.0+(e*m+h*o+j*q);f[a+100>>2]=g*0.0+i*0.0+k*0.0+(g*m+i*o+k*q);f[a+104>>2]=l*0.0+n*0.0+p*0.0+(l*m+n*o+p*q);f[a+108>>2]=0.0;d=c[a+32>>2]|0;q=+f[d+4>>2];p=+f[d+20>>2];o=+f[d+36>>2];n=+f[d+8>>2];m=+f[d+24>>2];l=+f[d+40>>2];k=+f[d+12>>2];i=+f[d+28>>2];g=+f[d+44>>2];j=-+f[d+52>>2];h=-+f[d+56>>2];e=-+f[d+60>>2];f[a+112>>2]=C*q+B*p+A*o;f[a+116>>2]=z*w*q+y*w*p+x*w*o;f[a+120>>2]=v*r*q+u*r*p+t*r*o;f[a+124>>2]=0.0;f[a+128>>2]=C*n+B*m+A*l;f[a+132>>2]=z*w*n+y*w*m+x*w*l;f[a+136>>2]=v*r*n+u*r*m+t*r*l;f[a+140>>2]=0.0;f[a+144>>2]=C*k+B*i+A*g;f[a+148>>2]=z*w*k+y*w*i+x*w*g;f[a+152>>2]=v*r*k+u*r*i+t*r*g;f[a+156>>2]=0.0;f[a+160>>2]=q*0.0+p*0.0+o*0.0+(q*j+p*h+o*e);f[a+164>>2]=n*0.0+m*0.0+l*0.0+(n*j+m*h+l*e);f[a+168>>2]=k*0.0+i*0.0+g*0.0+(k*j+i*h+g*e);f[a+172>>2]=0.0;gc(a,(c[a+28>>2]|0)+4|0,(c[a+32>>2]|0)+4|0);return}function oe(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;a:do if(!(rt(b,c[d+8>>2]|0,g)|0)){if(!(rt(b,c[d>>2]|0,g)|0)){i=c[b+12>>2]|0;An(b+16|0,d,e,f,g);if((i|0)<=1)break;h=c[b+8>>2]|0;if((h&2|0)==0?(c[d+36>>2]|0)!=1:0){if(!(h&1)){h=b+24|0;while(1){if(a[d+54>>0]|0)break a;if((c[d+36>>2]|0)==1)break a;An(h,d,e,f,g);h=h+8|0;if(h>>>0>=(b+16+(i<<3)|0)>>>0)break a}}h=b+24|0;while(1){if(a[d+54>>0]|0)break a;if((c[d+36>>2]|0)==1?(c[d+24>>2]|0)==1:0)break a;An(h,d,e,f,g);h=h+8|0;if(h>>>0>=(b+16+(i<<3)|0)>>>0)break a}}h=b+24|0;while(1){if(a[d+54>>0]|0)break a;An(h,d,e,f,g);h=h+8|0;if(h>>>0>=(b+16+(i<<3)|0)>>>0)break a}}if((c[d+16>>2]|0)!=(e|0)?(c[d+20>>2]|0)!=(e|0):0){c[d+32>>2]=f;if((c[d+44>>2]|0)!=4){f=b+16+(c[b+12>>2]<<3)|0;h=0;i=0;j=b+16|0;b:while(1){if(j>>>0>=f>>>0){f=18;break}a[d+52>>0]=0;a[d+53>>0]=0;hn(j,d,e,e,1,g);if(a[d+54>>0]|0){f=18;break}do if(a[d+53>>0]|0){if(!(a[d+52>>0]|0))if(!(c[b+8>>2]&1)){f=19;break b}else{i=1;break}if((c[d+24>>2]|0)==1){h=1;f=19;break b}if(!(c[b+8>>2]&2)){h=1;f=19;break b}else{h=1;i=1}}while(0);j=j+8|0}if((f|0)==18)if(i)f=19;else i=4;if((f|0)==19)i=3;c[d+44>>2]=i;if(h&1)break}c[d+20>>2]=e;c[d+40>>2]=(c[d+40>>2]|0)+1;if((c[d+36>>2]|0)!=1)break;if((c[d+24>>2]|0)!=2)break;a[d+54>>0]=1;break}if((f|0)==1)c[d+32>>2]=1}else Jr(d,e,f);while(0);return}function pe(b){b=b|0;var d=0.0,e=0.0,g=0.0,h=0,i=0,j=0,k=0;h=ea;ea=ea+16|0;if(!(a[b+1308>>0]|0)){ea=h;return}f[b+928>>2]=0.0;f[b+992>>2]=0.0;f[b+1056>>2]=0.0;c[b+712>>2]=0;c[b+712+4>>2]=0;c[b+712+8>>2]=0;c[b+712+12>>2]=0;gc(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);Ca[c[(c[b>>2]|0)+44>>2]&511](b);d=+f[b+1284>>2];e=+f[b+1288>>2];g=+f[b+1292>>2];if(+f[b+696>>2]>=+f[b+680>>2]){k=(a[b+1300>>0]|0)==0;i=c[(k?b+1160|0:b+1096|0)>>2]|0;j=c[(k?b+1144|0:b+1080|0)>>2]|0;c[h>>2]=c[(k?b+1128|0:b+1064|0)>>2];c[h+4>>2]=j;c[h+8>>2]=i;f[h+12>>2]=0.0;Mg(c[b+28>>2]|0,c[b+32>>2]|0,b+176|0,h,d,e,g,d,e,g)}if(+f[b+700>>2]>=+f[b+684>>2]){i=(a[b+1300>>0]|0)==0;k=c[(i?b+1164|0:b+1100|0)>>2]|0;j=c[(i?b+1148|0:b+1084|0)>>2]|0;c[h>>2]=c[(i?b+1132|0:b+1068|0)>>2];c[h+4>>2]=j;c[h+8>>2]=k;f[h+12>>2]=0.0;Mg(c[b+28>>2]|0,c[b+32>>2]|0,b+260|0,h,d,e,g,d,e,g)}if(+f[b+704>>2]>=+f[b+688>>2]){i=(a[b+1300>>0]|0)==0;k=c[(i?b+1168|0:b+1104|0)>>2]|0;j=c[(i?b+1152|0:b+1088|0)>>2]|0;c[h>>2]=c[(i?b+1136|0:b+1072|0)>>2];c[h+4>>2]=j;c[h+8>>2]=k;f[h+12>>2]=0.0;Mg(c[b+28>>2]|0,c[b+32>>2]|0,b+344|0,h,d,e,g,d,e,g)}if(df(b,0)|0){c[h>>2]=c[b+1208>>2];c[h+4>>2]=c[b+1208+4>>2];c[h+8>>2]=c[b+1208+8>>2];c[h+12>>2]=c[b+1208+12>>2];Sf(c[b+28>>2]|0,c[b+32>>2]|0,b+428|0,h)}if(df(b,1)|0){c[h>>2]=c[b+1224>>2];c[h+4>>2]=c[b+1224+4>>2];c[h+8>>2]=c[b+1224+8>>2];c[h+12>>2]=c[b+1224+12>>2];Sf(c[b+28>>2]|0,c[b+32>>2]|0,b+512|0,h)}if(df(b,2)|0){c[h>>2]=c[b+1240>>2];c[h+4>>2]=c[b+1240+4>>2];c[h+8>>2]=c[b+1240+8>>2];c[h+12>>2]=c[b+1240+12>>2];Sf(c[b+28>>2]|0,c[b+32>>2]|0,b+596|0,h)}ea=h;return}function qe(d,e,f){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;c[6725]=(c[6725]|0)+1;g=c[d+24>>2]|0;if(!g){if(!((b[f+6>>1]&b[e+4>>1])<<16>>16)){d=0;return d|0}if(!((b[e+6>>1]&b[f+4>>1])<<16>>16)){d=0;return d|0}}else if(!(va[c[(c[g>>2]|0)+8>>2]&63](g,e,f)|0)){d=0;return d|0}l=(c[e+12>>2]|0)>(c[f+12>>2]|0);m=l?f:e;i=c[m+12>>2]|0;l=l?e:f;f=c[l+12>>2]|0;k=(f<<16|i)+~((f<<16|i)<<15)|0;k=((10?k>>10:k)^k)*9|0;k=(6?k>>6:k)^k;k=(16?k+~(k<<11)>>16:k+~(k<<11)|0)^k+~(k<<11);j=c[d+12>>2]|0;g=c[(c[d+44>>2]|0)+((k&j+-1)<<2)>>2]|0;a:do if((g|0)!=-1){h=c[d+16>>2]|0;e=g;while(1){g=h+(e<<4)|0;if((c[(c[g>>2]|0)+12>>2]|0)==(i|0)?(c[(c[h+(e<<4)+4>>2]|0)+12>>2]|0)==(f|0):0)break;e=c[(c[d+64>>2]|0)+(e<<2)>>2]|0;if((e|0)==-1)break a}return g|0}while(0);i=c[d+8>>2]|0;if((i|0)==(j|0)){g=(j|0)==0?1:j<<1;if((j|0)<(g|0)){if(!g){f=j;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((g<<4|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}f=c[d+8>>2]|0;h=e}if((f|0)>0){e=0;do{n=c[d+16>>2]|0;c[h+(e<<4)>>2]=c[n+(e<<4)>>2];c[h+(e<<4)+4>>2]=c[n+(e<<4)+4>>2];c[h+(e<<4)+8>>2]=c[n+(e<<4)+8>>2];c[h+(e<<4)+12>>2]=c[n+(e<<4)+12>>2];e=e+1|0}while((e|0)!=(f|0))}e=c[d+16>>2]|0;if(e|0){if(a[d+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[d+16>>2]=0}a[d+20>>0]=1;c[d+16>>2]=h;c[d+12>>2]=g;e=c[d+8>>2]|0}else{e=j;g=j}}else{e=i;g=j}c[d+8>>2]=e+1;f=c[d+16>>2]|0;e=c[d+72>>2]|0;if(e){va[c[(c[e>>2]|0)+8>>2]&63](e,m,l)|0;g=c[d+12>>2]|0}if((j|0)<(g|0)){Fe(d);g=(c[d+12>>2]|0)+-1&k}else g=k&j+-1;n=(c[m+12>>2]|0)<(c[l+12>>2]|0);c[f+(i<<4)>>2]=n?m:l;c[f+(i<<4)+4>>2]=n?l:m;c[f+(i<<4)+8>>2]=0;c[f+(i<<4)+8+4>>2]=0;n=(c[d+44>>2]|0)+(g<<2)|0;c[(c[d+64>>2]|0)+(i<<2)>>2]=c[n>>2];c[n>>2]=i;n=f+(i<<4)|0;return n|0}function re(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0;x=ea;ea=ea+32|0;r=c[a+12>>2]|0;s=+f[r+(((e+d|0)/2|0)*24|0)>>2];u=+f[r+(((e+d|0)/2|0)*24|0)+4>>2];v=+f[r+(((e+d|0)/2|0)*24|0)+8>>2];w=+f[r+(((e+d|0)/2|0)*24|0)+16>>2];t=c[r+(((e+d|0)/2|0)*24|0)+20>>2]|0;g=d;h=e;while(1){n=+f[b>>2];o=+f[b+4>>2];p=+f[b+8>>2];q=(s-n)*(s-n)+(u-o)*(u-o)+(v-p)*(v-p);a:while(1){m=r+(g*24|0)|0;i=+f[r+(g*24|0)+16>>2];do if(i!=w){if(!(i>2]-n;k=+f[r+(g*24|0)+4>>2]-o;j=+f[r+(g*24|0)+8>>2]-p;if(i*i+k*k+j*j!=q)if(i*i+k*k+j*j>2]|0)<(t|0))break;else break a}while(0);g=g+1|0}b:while(1){l=r+(h*24|0)|0;i=+f[r+(h*24|0)+16>>2];do if(w!=i){if(!(w>2]-n;k=+f[r+(h*24|0)+4>>2]-o;j=+f[r+(h*24|0)+8>>2]-p;if(q!=i*i+k*k+j*j)if(q>2]|0))break;else break b}while(0);h=h+-1|0}if((g|0)<=(h|0)){c[x>>2]=c[m>>2];c[x+4>>2]=c[m+4>>2];c[x+8>>2]=c[m+8>>2];c[x+12>>2]=c[m+12>>2];c[x+16>>2]=c[m+16>>2];c[x+20>>2]=c[m+20>>2];c[m>>2]=c[l>>2];c[m+4>>2]=c[l+4>>2];c[m+8>>2]=c[l+8>>2];c[m+12>>2]=c[l+12>>2];c[m+16>>2]=c[l+16>>2];c[m+20>>2]=c[l+20>>2];r=(c[a+12>>2]|0)+(h*24|0)|0;c[r>>2]=c[x>>2];c[r+4>>2]=c[x+4>>2];c[r+8>>2]=c[x+8>>2];c[r+12>>2]=c[x+12>>2];c[r+16>>2]=c[x+16>>2];c[r+20>>2]=c[x+20>>2];g=g+1|0;h=h+-1|0}if((g|0)>(h|0))break;r=c[a+12>>2]|0}if((h|0)>(d|0))re(a,b,d,h);if((g|0)>=(e|0)){ea=x;return}re(a,b,g,e);ea=x;return}function se(a,b){a=a|0;b=b|0;var d=0.0,e=0,g=0.0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;j=c[a+28>>2]|0;k=c[a+32>>2]|0;h=c[b+8>>2]|0;f[h>>2]=1.0;e=c[b+24>>2]|0;f[h+(e+1<<2)>>2]=1.0;f[h+((e<<1)+2<<2)>>2]=1.0;l=+f[a+300>>2];q=+f[a+304>>2];g=+f[a+308>>2];o=+f[j+4>>2]*l+ +f[j+8>>2]*q+ +f[j+12>>2]*g;m=l*+f[j+20>>2]+q*+f[j+24>>2]+g*+f[j+28>>2];g=l*+f[j+36>>2]+q*+f[j+40>>2]+g*+f[j+44>>2];h=c[b+12>>2]|0;c[h>>2]=0;f[h+4>>2]=g;f[h+8>>2]=-m;f[h+12>>2]=0.0;f[h+(e<<2)>>2]=-g;c[h+(e<<2)+4>>2]=0;f[h+(e<<2)+8>>2]=o;f[h+(e<<2)+12>>2]=0.0;f[h+(e<<1<<2)>>2]=m;f[h+(e<<1<<2)+4>>2]=-o;c[h+(e<<1<<2)+8>>2]=0;f[h+(e<<1<<2)+12>>2]=0.0;h=c[b+16>>2]|0;f[h>>2]=-1.0;f[h+(e+1<<2)>>2]=-1.0;f[h+((e<<1)+2<<2)>>2]=-1.0;q=+f[a+316>>2];l=+f[a+320>>2];d=+f[a+324>>2];p=+f[k+4>>2]*q+ +f[k+8>>2]*l+ +f[k+12>>2]*d;n=q*+f[k+20>>2]+l*+f[k+24>>2]+d*+f[k+28>>2];d=q*+f[k+36>>2]+l*+f[k+40>>2]+d*+f[k+44>>2];h=c[b+20>>2]|0;c[h>>2]=0;f[h+4>>2]=-d;f[h+8>>2]=n;f[h+12>>2]=0.0;f[h+(e<<2)>>2]=d;c[h+(e<<2)+4>>2]=0;f[h+(e<<2)+8>>2]=-p;f[h+(e<<2)+12>>2]=0.0;f[h+(e<<1<<2)>>2]=-n;f[h+(e<<1<<2)+4>>2]=p;c[h+(e<<1<<2)+8>>2]=0;f[h+(e<<1<<2)+12>>2]=0.0;h=c[a+332>>2]|0;l=+f[((h&1|0)==0?b+4|0:a+336|0)>>2]*+f[b>>2];i=c[b+28>>2]|0;f[i>>2]=l*(p+ +f[k+52>>2]-o-+f[j+52>>2]);f[i+(e<<2)>>2]=l*(n+ +f[k+56>>2]-m-+f[j+56>>2]);f[i+(e<<1<<2)>>2]=l*(d+ +f[k+60>>2]-g-+f[j+60>>2]);if(h&2|0){k=c[b+32>>2]|0;c[k>>2]=c[a+340>>2];c[k+(e<<2)>>2]=c[a+340>>2];c[k+(e<<1<<2)>>2]=c[a+340>>2]}g=+f[a+356>>2];if(g>0.0){f[c[b+36>>2]>>2]=-g;f[c[b+40>>2]>>2]=g;d=+f[a+356>>2]}else d=g;if(d>0.0){f[(c[b+36>>2]|0)+(e<<2)>>2]=-g;f[(c[b+40>>2]|0)+(e<<2)>>2]=g;d=+f[a+356>>2]}if(!(d>0.0)){j=a+352|0;j=c[j>>2]|0;k=b+52|0;c[k>>2]=j;return}f[(c[b+36>>2]|0)+(e<<1<<2)>>2]=-g;f[(c[b+40>>2]|0)+(e<<1<<2)>>2]=g;j=a+352|0;j=c[j>>2]|0;k=b+52|0;c[k>>2]=j;return}function te(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0,y=0.0,z=0.0,A=0,B=0.0,C=0,D=0.0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0;j=(a[b+28>>0]|0)!=0;C=j?e:d;j=j?d:e;d=c[b+12>>2]|0;if((d|0)<=0){B=1.0;return +B}l=(c[C+192>>2]|0)+24|0;m=+f[C+4>>2];y=+f[C+8>>2];z=+f[C+12>>2];A=c[C+16>>2]|0;B=+f[C+20>>2];n=+f[C+24>>2];o=+f[C+28>>2];p=c[C+32>>2]|0;q=+f[C+36>>2];r=+f[C+40>>2];s=+f[C+44>>2];t=c[C+48>>2]|0;u=+f[C+52>>2];v=+f[C+56>>2];w=+f[C+60>>2];x=c[C+64>>2]|0;e=c[C+260>>2]|0;i=1.0;k=0;do{E=c[l>>2]|0;P=+f[E+(k*80|0)>>2];O=+f[E+(k*80|0)+16>>2];N=+f[E+(k*80|0)+32>>2];M=+f[E+(k*80|0)+4>>2];L=+f[E+(k*80|0)+20>>2];K=+f[E+(k*80|0)+36>>2];J=+f[E+(k*80|0)+8>>2];I=+f[E+(k*80|0)+24>>2];H=+f[E+(k*80|0)+40>>2];G=+f[E+(k*80|0)+48>>2];F=+f[E+(k*80|0)+52>>2];D=+f[E+(k*80|0)+56>>2];c[C+260>>2]=e+1;f[C+4>>2]=m*P+y*O+z*N;f[C+8>>2]=m*M+y*L+z*K;f[C+12>>2]=m*J+y*I+z*H;f[C+16>>2]=0.0;f[C+20>>2]=B*P+n*O+o*N;f[C+24>>2]=B*M+n*L+o*K;f[C+28>>2]=B*J+n*I+o*H;f[C+32>>2]=0.0;f[C+36>>2]=q*P+r*O+s*N;f[C+40>>2]=q*M+r*L+s*K;f[C+44>>2]=q*J+r*I+s*H;f[C+48>>2]=0.0;f[C+52>>2]=u+(m*G+y*F+z*D);f[C+56>>2]=v+(B*G+n*F+o*D);f[C+60>>2]=w+(q*G+r*F+s*D);f[C+64>>2]=0.0;E=c[(c[b+20>>2]|0)+(k<<2)>>2]|0;D=+na[c[(c[E>>2]|0)+12>>2]&15](E,C,j,g,h);i=D>2]|0)+1|0;c[C+260>>2]=e;f[C+4>>2]=m;f[C+8>>2]=y;f[C+12>>2]=z;c[C+16>>2]=A;f[C+20>>2]=B;f[C+24>>2]=n;f[C+28>>2]=o;c[C+32>>2]=p;f[C+36>>2]=q;f[C+40>>2]=r;f[C+44>>2]=s;c[C+48>>2]=t;f[C+52>>2]=u;f[C+56>>2]=v;f[C+60>>2]=w;c[C+64>>2]=x;k=k+1|0}while((k|0)!=(d|0));return +i}function ue(a,b,d,e){a=a|0;b=b|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;c[6724]=(c[6724]|0)+1;j=(c[b+12>>2]|0)>(c[d+12>>2]|0);l=j?d:b;h=c[l+12>>2]|0;j=j?b:d;g=c[j+12>>2]|0;i=(g<<16|h)+~((g<<16|h)<<15)|0;i=((10?i>>10:i)^i)*9|0;i=(6?i>>6:i)^i;i=((16?i+~(i<<11)>>16:i+~(i<<11)|0)^i+~(i<<11))&(c[a+12>>2]|0)+-1;b=c[(c[a+44>>2]|0)+(i<<2)>>2]|0;if((b|0)==-1){o=0;return o|0}f=c[a+16>>2]|0;while(1){d=f+(b<<4)|0;if((c[(c[d>>2]|0)+12>>2]|0)==(h|0)?(c[(c[f+(b<<4)+4>>2]|0)+12>>2]|0)==(g|0):0)break;b=c[(c[a+64>>2]|0)+(b<<2)>>2]|0;if((b|0)==-1){b=0;o=25;break}}if((o|0)==25)return b|0;Ma[c[(c[a>>2]|0)+32>>2]&127](a,d,e);n=c[f+(b<<4)+12>>2]|0;m=d-(c[a+16>>2]|0)|0;m=4?m>>4:m;h=(c[a+44>>2]|0)+(i<<2)|0;b=c[h>>2]|0;d=c[a+64>>2]|0;if((b|0)!=(m|0)){g=b;while(1){f=d+(g<<2)|0;b=c[f>>2]|0;if((b|0)==(m|0))break;else g=b}b=c[d+(m<<2)>>2]|0;if((g|0)==-1)o=12;else c[f>>2]=b}else{b=c[d+(m<<2)>>2]|0;o=12}if((o|0)==12)c[h>>2]=b;k=(c[a+8>>2]|0)+-1|0;b=c[a+72>>2]|0;if(b|0)wa[c[(c[b>>2]|0)+12>>2]&31](b,l,j,e)|0;if((k|0)==(m|0)){c[a+8>>2]=(c[a+8>>2]|0)+-1;o=n;return o|0}h=c[a+16>>2]|0;i=c[(c[h+(k<<4)+4>>2]|0)+12>>2]<<16|c[(c[h+(k<<4)>>2]|0)+12>>2];i=((10?i+~(i<<15)>>10:i+~(i<<15)|0)^i+~(i<<15))*9|0;i=(6?i>>6:i)^i;i=((16?i+~(i<<11)>>16:i+~(i<<11)|0)^i+~(i<<11))&(c[a+12>>2]|0)+-1;j=(c[a+44>>2]|0)+(i<<2)|0;b=c[j>>2]|0;d=c[a+64>>2]|0;if((b|0)!=(k|0)){g=b;while(1){f=d+(g<<2)|0;b=c[f>>2]|0;if((b|0)==(k|0))break;else g=b}b=c[d+(k<<2)>>2]|0;if((g|0)==-1)o=23;else c[f>>2]=b}else{b=c[d+(k<<2)>>2]|0;o=23}if((o|0)==23)c[j>>2]=b;c[h+(m<<4)>>2]=c[h+(k<<4)>>2];c[h+(m<<4)+4>>2]=c[h+(k<<4)+4>>2];c[h+(m<<4)+8>>2]=c[h+(k<<4)+8>>2];c[h+(m<<4)+12>>2]=c[h+(k<<4)+12>>2];o=(c[a+44>>2]|0)+(i<<2)|0;c[(c[a+64>>2]|0)+(m<<2)>>2]=c[o>>2];c[o>>2]=m;c[a+8>>2]=(c[a+8>>2]|0)+-1;o=n;return o|0}function ve(b,d){b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0;o=ea;ea=ea+64|0;e=c[d+192>>2]|0;Pa[c[(c[e>>2]|0)+8>>2]&127](e,d+4|0,o+48|0,o+32|0);k=+f[o+48>>2]+-.019999999552965164;f[o+48>>2]=k;l=+f[o+48+4>>2]+-.019999999552965164;f[o+48+4>>2]=l;j=+f[o+48+8>>2]+-.019999999552965164;f[o+48+8>>2]=j;g=+f[o+32>>2]+.019999999552965164;f[o+32>>2]=g;h=+f[o+32+4>>2]+.019999999552965164;f[o+32+4>>2]=h;i=+f[o+32+8>>2]+.019999999552965164;f[o+32+8>>2]=i;if(((a[b+44>>0]|0)!=0?(c[d+236>>2]|0)==2:0)?(c[d+204>>2]&3|0)==0:0){e=c[d+192>>2]|0;Pa[c[(c[e>>2]|0)+8>>2]&127](e,d+68|0,o+16|0,o);k=+f[o+16>>2]+-.019999999552965164;f[o+16>>2]=k;l=+f[o+16+4>>2]+-.019999999552965164;f[o+16+4>>2]=l;h=+f[o+16+8>>2]+-.019999999552965164;f[o+16+8>>2]=h;i=+f[o>>2]+.019999999552965164;f[o>>2]=i;j=+f[o+4>>2]+.019999999552965164;f[o+4>>2]=j;m=+f[o+8>>2]+.019999999552965164;f[o+8>>2]=m;g=+f[o+48>>2];if(k>2]=k;else k=g;g=+f[o+48+4>>2];if(l>2]=l;else l=g;g=+f[o+48+8>>2];if(h>2]=h;n=h}else n=g;g=+f[o+16+12>>2];if(g<+f[o+48+12>>2])f[o+48+12>>2]=g;g=+f[o+32>>2];if(g>2]=i;g=i}h=+f[o+32+4>>2];if(h>2]=j;h=j}i=+f[o+32+8>>2];if(i>2]=m;i=m}j=+f[o+12>>2];if(+f[o+32+12>>2]>2]=j;j=n}e=c[b+68>>2]|0;if((c[d+204>>2]&1|0)==0?(k=g-k,m=h-l,n=i-j,!(k*k+m*m+n*n<999999995904.0)):0){if((c[d+216>>2]&-2|0)!=4)c[d+216>>2]=5;if(!(a[17627]|0)){ea=o;return}e=c[b+72>>2]|0;if(!e){ea=o;return}a[17627]=0;Ia[c[(c[e>>2]|0)+36>>2]&127](e,17628);d=c[b+72>>2]|0;Ia[c[(c[d>>2]|0)+36>>2]&127](d,17677);d=c[b+72>>2]|0;Ia[c[(c[d>>2]|0)+36>>2]&127](d,17745);b=c[b+72>>2]|0;Ia[c[(c[b>>2]|0)+36>>2]&127](b,17810);ea=o;return}Ta[c[(c[e>>2]|0)+16>>2]&31](e,c[d+188>>2]|0,o+48|0,o+32|0,c[b+24>>2]|0);ea=o;return}function we(a,b,e){a=a|0;b=b|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0;ch(a,b,e)|0;c[b+52>>2]=c[a+552>>2];c[b+56>>2]=c[a+556>>2];c[b+60>>2]=c[a+560>>2];c[b+64>>2]=c[a+564>>2];c[b+68>>2]=c[a+568>>2];c[b+72>>2]=c[a+572>>2];c[b+76>>2]=c[a+576>>2];c[b+80>>2]=c[a+580>>2];c[b+84>>2]=c[a+584>>2];c[b+88>>2]=c[a+588>>2];c[b+92>>2]=c[a+592>>2];c[b+96>>2]=c[a+596>>2];c[b+100>>2]=c[a+600>>2];c[b+104>>2]=c[a+604>>2];c[b+108>>2]=c[a+608>>2];c[b+112>>2]=c[a+612>>2];c[b+116>>2]=c[a+616>>2];c[b+120>>2]=c[a+620>>2];c[b+124>>2]=c[a+624>>2];c[b+128>>2]=c[a+628>>2];c[b+132>>2]=c[a+632>>2];c[b+136>>2]=c[a+636>>2];c[b+140>>2]=c[a+640>>2];c[b+144>>2]=c[a+644>>2];c[b+148>>2]=c[a+648>>2];c[b+152>>2]=c[a+652>>2];c[b+156>>2]=c[a+656>>2];c[b+160>>2]=c[a+660>>2];c[b+164>>2]=c[a+664>>2];c[b+168>>2]=c[a+668>>2];c[b+172>>2]=c[a+672>>2];c[b+176>>2]=c[a+676>>2];c[b+184>>2]=d[a+736>>0];c[b+188>>2]=d[a+737>>0];c[b+196>>2]=c[a+684>>2];c[b+192>>2]=c[a+680>>2];c[b+180>>2]=d[a+740>>0];g=+f[a+688>>2];h=+f[a+692>>2];if(!((g-h)%6.2831854820251465<-3.1415927410125732))if((g-h)%6.2831854820251465>3.1415927410125732)i=(g-h)%6.2831854820251465+-6.2831854820251465;else i=(g-h)%6.2831854820251465;else i=(g-h)%6.2831854820251465+6.2831854820251465;f[b+200>>2]=i;if((g+h)%6.2831854820251465<-3.1415927410125732){i=(g+h)%6.2831854820251465+6.2831854820251465;e=b+204|0;f[e>>2]=i;e=a+696|0;e=c[e>>2]|0;j=b+208|0;c[j>>2]=e;j=a+700|0;j=c[j>>2]|0;e=b+212|0;c[e>>2]=j;e=a+704|0;e=c[e>>2]|0;a=b+216|0;c[a>>2]=e;return 15409}if(!((g+h)%6.2831854820251465>3.1415927410125732)){i=(g+h)%6.2831854820251465;j=b+204|0;f[j>>2]=i;j=a+696|0;j=c[j>>2]|0;e=b+208|0;c[e>>2]=j;e=a+700|0;e=c[e>>2]|0;j=b+212|0;c[j>>2]=e;a=a+704|0;a=c[a>>2]|0;j=b+216|0;c[j>>2]=a;return 15409}i=(g+h)%6.2831854820251465+-6.2831854820251465;j=b+204|0;f[j>>2]=i;j=a+696|0;j=c[j>>2]|0;e=b+208|0;c[e>>2]=j;e=a+700|0;e=c[e>>2]|0;j=b+212|0;c[j>>2]=e;a=a+704|0;a=c[a>>2]|0;j=b+216|0;c[j>>2]=a;return 15409}function xe(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;i=Bs()|0;c[i+4>>2]=7;c[i+8>>2]=-1;c[i+12>>2]=-1;f[i+16>>2]=3402823466385288598117041.0e14;a[i+20>>0]=1;a[i+21>>0]=0;c[i+24>>2]=-1;c[i+28>>2]=b;c[i+32>>2]=d;f[i+36>>2]=0.0;f[i+40>>2]=.30000001192092896;c[i+44>>2]=0;c[i>>2]=5712;a[i+48>>0]=0;c[i+52>>2]=c[e>>2];c[i+52+4>>2]=c[e+4>>2];c[i+52+8>>2]=c[e+8>>2];c[i+52+12>>2]=c[e+12>>2];c[i+68>>2]=c[e+16>>2];c[i+68+4>>2]=c[e+16+4>>2];c[i+68+8>>2]=c[e+16+8>>2];c[i+68+12>>2]=c[e+16+12>>2];c[i+84>>2]=c[e+32>>2];c[i+84+4>>2]=c[e+32+4>>2];c[i+84+8>>2]=c[e+32+8>>2];c[i+84+12>>2]=c[e+32+12>>2];c[i+100>>2]=c[e+48>>2];c[i+100+4>>2]=c[e+48+4>>2];c[i+100+8>>2]=c[e+48+8>>2];c[i+100+12>>2]=c[e+48+12>>2];c[i+116>>2]=c[g>>2];c[i+116+4>>2]=c[g+4>>2];c[i+116+8>>2]=c[g+8>>2];c[i+116+12>>2]=c[g+12>>2];c[i+132>>2]=c[g+16>>2];c[i+132+4>>2]=c[g+16+4>>2];c[i+132+8>>2]=c[g+16+8>>2];c[i+132+12>>2]=c[g+16+12>>2];c[i+148>>2]=c[g+32>>2];c[i+148+4>>2]=c[g+32+4>>2];c[i+148+8>>2]=c[g+32+8>>2];c[i+148+12>>2]=c[g+32+12>>2];c[i+164>>2]=c[g+48>>2];c[i+164+4>>2]=c[g+48+4>>2];c[i+164+8>>2]=c[g+48+8>>2];c[i+164+12>>2]=c[g+48+12>>2];a[i+180>>0]=h&1;f[i+184>>2]=1.0;f[i+188>>2]=-1.0;f[i+192>>2]=0.0;f[i+196>>2]=0.0;f[i+200>>2]=1.0;f[i+204>>2]=.699999988079071;f[i+208>>2]=0.0;f[i+212>>2]=0.0;f[i+216>>2]=1.0;f[i+220>>2]=.699999988079071;f[i+224>>2]=0.0;f[i+228>>2]=0.0;f[i+264>>2]=1.0;f[i+268>>2]=.699999988079071;f[i+272>>2]=1.0;f[i+276>>2]=0.0;f[i+280>>2]=1.0;f[i+284>>2]=.699999988079071;f[i+288>>2]=1.0;f[i+292>>2]=0.0;f[i+232>>2]=1.0;f[i+236>>2]=.699999988079071;f[i+240>>2]=1.0;f[i+244>>2]=0.0;f[i+248>>2]=1.0;f[i+252>>2]=.699999988079071;f[i+256>>2]=1.0;f[i+260>>2]=0.0;a[i+1096>>0]=0;f[i+1116>>2]=0.0;f[i+1120>>2]=0.0;f[i+1124>>2]=0.0;c[i+300>>2]=0;c[i+1100>>2]=0;c[i+1100+4>>2]=0;c[i+1100+8>>2]=0;a[i+1100+12>>0]=0;a[i+49>>0]=1;Zb(i,(c[i+28>>2]|0)+4|0,(c[i+32>>2]|0)+4|0);return i|0}function ye(b,d){b=b|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;o=ea;ea=ea+32|0;a[o+16>>0]=1;c[o+12>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;if((c[b+8>>2]|0)>0){g=0;f=0;e=0;h=0;m=0;do{k=c[b+16>>2]|0;l=k+(m<<4)|0;if((g|0)==(f|0)){j=(f|0)==0?1:f<<1;if((f|0)<(j|0)){if(j){c[6747]=(c[6747]|0)+1;e=kb((j<<4|3)+16|0)|0;if(!e){f=g;h=0}else{c[(e+4+15&-16)+-4>>2]=e;f=g;h=e+4+15&-16}}else h=0;if((f|0)>0){e=0;do{i=c[o+12>>2]|0;c[h+(e<<4)>>2]=c[i+(e<<4)>>2];c[h+(e<<4)+4>>2]=c[i+(e<<4)+4>>2];c[h+(e<<4)+8>>2]=c[i+(e<<4)+8>>2];c[h+(e<<4)+12>>2]=c[i+(e<<4)+12>>2];e=e+1|0}while((e|0)!=(f|0))}e=c[o+12>>2]|0;if(!e)g=f;else{if(!(a[o+16>>0]|0))g=f;else{c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[o+12>>2]=0}a[o+16>>0]=1;c[o+12>>2]=h;e=h;i=g;f=j;h=j}else i=f}else i=g;c[e+(i<<4)>>2]=c[l>>2];c[e+(i<<4)+4>>2]=c[k+(m<<4)+4>>2];c[e+(i<<4)+8>>2]=c[k+(m<<4)+8>>2];c[e+(i<<4)+12>>2]=c[k+(m<<4)+12>>2];g=i+1|0;m=m+1|0}while((m|0)<(c[b+8>>2]|0));c[o+4>>2]=g;c[o+8>>2]=h;if((i|0)>-1){e=c[o+12>>2]|0;f=0;while(1){wa[c[(c[b>>2]|0)+12>>2]&31](b,c[e+(f<<4)>>2]|0,c[e+(f<<4)+4>>2]|0,d)|0;if((f|0)<(i|0))f=f+1|0;else break}}}else g=0;if((c[b+56>>2]|0)>0){e=c[b+64>>2]|0;f=0;do{c[e+(f<<2)>>2]=-1;f=f+1|0}while((f|0)<(c[b+56>>2]|0))}if((g|0)<=1)if((g|0)<=0){e=c[o+12>>2]|0;if(!e){ea=o;return}}else n=26;else{qd(o,0,g+-1|0);n=26}if((n|0)==26){e=c[o+12>>2]|0;f=0;do{va[c[(c[b>>2]|0)+8>>2]&63](b,c[e+(f<<4)>>2]|0,c[e+(f<<4)+4>>2]|0)|0;f=f+1|0}while((f|0)<(g|0))}c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);c[o+12>>2]=0;ea=o;return}function ze(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0.0,j=0.0,k=0,l=0,m=0.0;c[6721]=(c[6721]|0)+1;if(!(c[b+4>>2]&2))j=.019999999552965164;else{k=c[d+192>>2]|0;i=+ia[c[(c[k>>2]|0)+20>>2]&1](k,.019999999552965164);k=c[e+192>>2]|0;j=+ia[c[(c[k>>2]|0)+20>>2]&1](k,.019999999552965164);j=i>2];i=+f[e+184>>2];i=m>2]|0;h=c[g+8>>2]|0;if(!h){if(c[b+4>>2]&4|0){b=0;return b|0}c[6747]=(c[6747]|0)+1;g=kb(791)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}h=g;k=g}else{k=c[g+12>>2]|0;c[g+12>>2]=c[k>>2];c[g+8>>2]=h+-1;h=k}c[h>>2]=1025;c[k+116>>2]=0;a[k+120>>0]=0;g=k+124|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;c[k+300>>2]=0;a[k+304>>0]=0;g=k+308|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;c[k+484>>2]=0;a[k+488>>0]=0;g=k+492|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;c[k+668>>2]=0;a[k+672>>0]=0;g=k+676|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[g+20>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;c[k+740>>2]=d;c[k+744>>2]=e;c[k+748>>2]=0;f[k+752>>2]=j;f[k+756>>2]=i;e=k;g=c[b+12>>2]|0;c[k+768>>2]=g;if((g|0)==(c[b+16>>2]|0)?(l=(g|0)==0?1:g<<1,(g|0)<(l|0)):0){if(!l)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((l<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+12>>2]|0}if((g|0)>0){d=0;do{c[h+(d<<2)>>2]=c[(c[b+20>>2]|0)+(d<<2)>>2];d=d+1|0}while((d|0)!=(g|0))}d=c[b+20>>2]|0;if(d){if(a[b+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);g=c[b+12>>2]|0}c[b+20>>2]=0}a[b+24>>0]=1;c[b+20>>2]=h;c[b+16>>2]=l}c[(c[b+20>>2]|0)+(g<<2)>>2]=e;c[b+12>>2]=g+1;b=k;return b|0}function Ae(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;i=js(460)|0;Yc(i,b,d,e);c[i>>2]=4936;a[i+340>>0]=1;c[i+336>>2]=0;c[i+328>>2]=0;c[i+332>>2]=0;f[i+352>>2]=1.2000000476837158;f[i+356>>2]=0.0;f[i+360>>2]=0.0;f[i+364>>2]=1.0e3;c[i+368>>2]=0;c[i+368+4>>2]=0;c[i+368+8>>2]=0;c[i+368+12>>2]=0;c[i+368+16>>2]=0;c[i+368+20>>2]=0;c[i+368+24>>2]=0;c[i+396>>2]=-1054867456;c[i+400>>2]=0;f[i+404>>2]=0.0;a[i+424>>0]=1;c[i+420>>2]=0;c[i+412>>2]=0;c[i+416>>2]=0;c[i+452>>2]=h;a[i+456>>0]=0;if(!h){c[6747]=(c[6747]|0)+1;g=kb(59)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}f[g+12>>2]=1.0;c[g+8>>2]=0;c[g+4>>2]=5;c[g>>2]=4060;a[g+36>>0]=1;c[g+32>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;a[g+16>>0]=1;c[i+452>>2]=g;a[i+456>>0]=1}c[i+344>>2]=4302;a[i+348>>0]=1;a[i+349>>0]=0;a[i+350>>0]=0;c[i+384>>2]=d;c[i+388>>2]=b;Ih(i+408|0);e=c[i+412>>2]|0;if((e|0)<=0){d=i+428|0;f[d>>2]=.25;d=i+432|0;c[d>>2]=0;d=i+436|0;c[d>>2]=0;d=i+444|0;c[d>>2]=1;d=i+448|0;c[d>>2]=1;f[i+352>>2]=1.2000000476837158;f[i+356>>2]=0.0;f[i+360>>2]=0.0;d=i+392|0;c[d>>2]=0;c[i+368>>2]=0;c[i+368+4>>2]=0;c[i+368+8>>2]=0;c[i+368+12>>2]=0;c[i+396>>2]=-1054867456;c[i+400>>2]=0;f[i+404>>2]=0.0;Ih(i+408|0);return i|0}h=0;do{d=(c[i+420>>2]|0)+(h<<2)|0;g=c[d>>2]|0;c[d>>2]=0;if(g|0)do{d=g;g=c[g+280>>2]|0;LJ(d)}while((g|0)!=0);h=h+1|0}while((h|0)!=(e|0));d=i+428|0;f[d>>2]=.25;d=i+432|0;c[d>>2]=0;d=i+436|0;c[d>>2]=0;d=i+444|0;c[d>>2]=1;d=i+448|0;c[d>>2]=1;f[i+352>>2]=1.2000000476837158;f[i+356>>2]=0.0;f[i+360>>2]=0.0;d=i+392|0;c[d>>2]=0;c[i+368>>2]=0;c[i+368+4>>2]=0;c[i+368+8>>2]=0;c[i+368+12>>2]=0;c[i+396>>2]=-1054867456;c[i+400>>2]=0;f[i+404>>2]=0.0;Ih(i+408|0);return i|0}function Be(a,b,e){a=a|0;b=b|0;e=e|0;ch(a,b,e)|0;c[b+52>>2]=c[a+48>>2];c[b+56>>2]=c[a+52>>2];c[b+60>>2]=c[a+56>>2];c[b+64>>2]=c[a+60>>2];c[b+68>>2]=c[a+64>>2];c[b+72>>2]=c[a+68>>2];c[b+76>>2]=c[a+72>>2];c[b+80>>2]=c[a+76>>2];c[b+84>>2]=c[a+80>>2];c[b+88>>2]=c[a+84>>2];c[b+92>>2]=c[a+88>>2];c[b+96>>2]=c[a+92>>2];c[b+100>>2]=c[a+96>>2];c[b+104>>2]=c[a+100>>2];c[b+108>>2]=c[a+104>>2];c[b+112>>2]=c[a+108>>2];c[b+116>>2]=c[a+112>>2];c[b+120>>2]=c[a+116>>2];c[b+124>>2]=c[a+120>>2];c[b+128>>2]=c[a+124>>2];c[b+132>>2]=c[a+128>>2];c[b+136>>2]=c[a+132>>2];c[b+140>>2]=c[a+136>>2];c[b+144>>2]=c[a+140>>2];c[b+148>>2]=c[a+144>>2];c[b+152>>2]=c[a+148>>2];c[b+156>>2]=c[a+152>>2];c[b+160>>2]=c[a+156>>2];c[b+164>>2]=c[a+160>>2];c[b+168>>2]=c[a+164>>2];c[b+172>>2]=c[a+168>>2];c[b+176>>2]=c[a+172>>2];c[b+228>>2]=c[a+868>>2];c[b+212>>2]=c[a+872>>2];c[b+196>>2]=c[a+680>>2];c[b+180>>2]=c[a+696>>2];c[b+232>>2]=c[a+932>>2];c[b+216>>2]=c[a+936>>2];c[b+200>>2]=c[a+684>>2];c[b+184>>2]=c[a+700>>2];c[b+236>>2]=c[a+996>>2];c[b+220>>2]=c[a+1e3>>2];c[b+204>>2]=c[a+688>>2];c[b+188>>2]=c[a+704>>2];c[b+244>>2]=d[a+1300>>0];c[b+248>>2]=d[a+1301>>0];c[b+276>>2]=c[a+1316>>2];c[b+324>>2]=c[a+1364>>2];c[b+252>>2]=d[a+1309>>0];c[b+300>>2]=c[a+1340>>2];c[b+280>>2]=c[a+1320>>2];c[b+328>>2]=c[a+1368>>2];c[b+256>>2]=d[a+1310>>0];c[b+304>>2]=c[a+1344>>2];c[b+284>>2]=c[a+1324>>2];c[b+332>>2]=c[a+1372>>2];c[b+260>>2]=d[a+1311>>0];c[b+308>>2]=c[a+1348>>2];c[b+288>>2]=c[a+1328>>2];c[b+336>>2]=c[a+1376>>2];c[b+264>>2]=d[a+1312>>0];c[b+312>>2]=c[a+1352>>2];c[b+292>>2]=c[a+1332>>2];c[b+340>>2]=c[a+1380>>2];c[b+268>>2]=d[a+1313>>0];c[b+316>>2]=c[a+1356>>2];c[b+296>>2]=c[a+1336>>2];c[b+344>>2]=c[a+1384>>2];c[b+272>>2]=d[a+1314>>0];c[b+320>>2]=c[a+1360>>2];return 15127}function Ce(a,b,d){a=a|0;b=b|0;d=+d;var e=0.0,g=0.0,h=0.0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;i=ea;ea=ea+32|0;k=+f[a+56>>2];p=+f[a+72>>2]-k;j=+f[a+60>>2];n=+f[a+76>>2]-j;l=+f[a+64>>2];q=+f[a+80>>2]-l;m=+f[a+88>>2]-k;o=+f[a+92>>2]-j;g=+f[a+96>>2]-l;h=1.0/+s(+((p*o-n*m)*(p*o-n*m)+((n*g-q*o)*(n*g-q*o)+(q*m-p*g)*(q*m-p*g))));e=(n*g-q*o)*h;g=(q*m-p*g)*h;h=(p*o-n*m)*h;j=+f[b+8>>2]*h+(+f[b>>2]*e+ +f[b+4>>2]*g)-(l*h+(k*e+j*g));if(!(j>=-d)|!(j<=d)){a=0;ea=i;return a|0}Pa[c[(c[a>>2]|0)+104>>2]&127](a,0,i+16|0,i);l=+f[i+16>>2];p=+f[i>>2]-l;n=+f[i+16+4>>2];m=+f[i+4>>2]-n;k=+f[i+16+8>>2];o=+f[i+8>>2]-k;q=1.0/+s(+((g*p-e*m)*(g*p-e*m)+((h*m-g*o)*(h*m-g*o)+(e*o-h*p)*(e*o-h*p))));if(+f[b+8>>2]*((g*p-e*m)*q)+(+f[b>>2]*((h*m-g*o)*q)+ +f[b+4>>2]*((e*o-h*p)*q))-(k*((g*p-e*m)*q)+(l*((h*m-g*o)*q)+n*((e*o-h*p)*q)))<-d){a=0;ea=i;return a|0}Pa[c[(c[a>>2]|0)+104>>2]&127](a,1,i+16|0,i);l=+f[i+16>>2];p=+f[i>>2]-l;n=+f[i+16+4>>2];m=+f[i+4>>2]-n;k=+f[i+16+8>>2];o=+f[i+8>>2]-k;q=1.0/+s(+((g*p-e*m)*(g*p-e*m)+((h*m-g*o)*(h*m-g*o)+(e*o-h*p)*(e*o-h*p))));if(+f[b+8>>2]*((g*p-e*m)*q)+(+f[b>>2]*((h*m-g*o)*q)+ +f[b+4>>2]*((e*o-h*p)*q))-(k*((g*p-e*m)*q)+(l*((h*m-g*o)*q)+n*((e*o-h*p)*q)))<-d){a=0;ea=i;return a|0}Pa[c[(c[a>>2]|0)+104>>2]&127](a,2,i+16|0,i);l=+f[i+16>>2];p=+f[i>>2]-l;n=+f[i+16+4>>2];m=+f[i+4>>2]-n;k=+f[i+16+8>>2];o=+f[i+8>>2]-k;q=1.0/+s(+((g*p-e*m)*(g*p-e*m)+((h*m-g*o)*(h*m-g*o)+(e*o-h*p)*(e*o-h*p))));if(+f[b+8>>2]*((g*p-e*m)*q)+(+f[b>>2]*((h*m-g*o)*q)+ +f[b+4>>2]*((e*o-h*p)*q))-(k*((g*p-e*m)*q)+(l*((h*m-g*o)*q)+n*((e*o-h*p)*q)))<-d){a=0;ea=i;return a|0}a=1;ea=i;return a|0}function De(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;i=c[b+4>>2]|0;if((i|0)==(c[b+8>>2]|0)?(h=(i|0)==0?1:i<<1,(i|0)<(h|0)):0){if(!h){f=i;g=0}else{c[6747]=(c[6747]|0)+1;e=kb((h*244|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}f=c[b+4>>2]|0;g=e}if((f|0)>0){e=0;do{k=g+(e*244|0)|0;j=c[b+12>>2]|0;l=j+(e*244|0)|0;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];k=j+(e*244|0)+16|0;l=g+(e*244|0)+16|0;c[l>>2]=c[k>>2];c[l+4>>2]=c[k+4>>2];c[l+8>>2]=c[k+8>>2];c[l+12>>2]=c[k+12>>2];l=j+(e*244|0)+32|0;k=g+(e*244|0)+32|0;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];k=g+(e*244|0)+48|0;l=j+(e*244|0)+48|0;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];vh(g+(e*244|0)+64|0,j+(e*244|0)+64|0,180)|0;e=e+1|0}while((e|0)!=(f|0))}e=c[b+12>>2]|0;if(e|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=g;c[b+8>>2]=h;e=c[b+4>>2]|0}else e=i;c[b+4>>2]=e+1;l=c[b+12>>2]|0;c[l+(i*244|0)>>2]=c[d>>2];c[l+(i*244|0)+4>>2]=c[d+4>>2];c[l+(i*244|0)+8>>2]=c[d+8>>2];c[l+(i*244|0)+12>>2]=c[d+12>>2];c[l+(i*244|0)+16>>2]=c[d+16>>2];c[l+(i*244|0)+16+4>>2]=c[d+16+4>>2];c[l+(i*244|0)+16+8>>2]=c[d+16+8>>2];c[l+(i*244|0)+16+12>>2]=c[d+16+12>>2];c[l+(i*244|0)+32>>2]=c[d+32>>2];c[l+(i*244|0)+32+4>>2]=c[d+32+4>>2];c[l+(i*244|0)+32+8>>2]=c[d+32+8>>2];c[l+(i*244|0)+32+12>>2]=c[d+32+12>>2];c[l+(i*244|0)+48>>2]=c[d+48>>2];c[l+(i*244|0)+48+4>>2]=c[d+48+4>>2];c[l+(i*244|0)+48+8>>2]=c[d+48+8>>2];c[l+(i*244|0)+48+12>>2]=c[d+48+12>>2];vh(l+(i*244|0)+64|0,d+64|0,180)|0;return (c[b+12>>2]|0)+(i*244|0)|0}function Ee(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0;k=ea;ea=ea+64|0;m=+f[a+20>>2];u=+f[a+40>>2];o=+f[a+24>>2];r=+f[a+36>>2];t=+f[a+32>>2];l=+f[a+16>>2];j=+f[a>>2];i=+f[a+4>>2];p=+f[a+8>>2];h=1.0/((m*u-o*r)*j+i*(o*t-u*l)+(r*l-m*t)*p);A=+f[b>>2];z=+f[b+4>>2];B=+f[b+8>>2];y=+f[b+16>>2];x=+f[b+20>>2];v=+f[b+24>>2];q=+f[b+32>>2];n=+f[b+36>>2];g=+f[b+40>>2];f[k+16>>2]=B*((r*l-m*t)*h)+(A*((m*u-o*r)*h)+z*((o*t-u*l)*h));f[k+16+4>>2]=B*((t*i-r*j)*h)+(A*((r*p-u*i)*h)+z*((u*j-t*p)*h));f[k+16+8>>2]=B*((m*j-l*i)*h)+(A*((o*i-m*p)*h)+z*((l*p-o*j)*h));f[k+16+12>>2]=0.0;f[k+16+16>>2]=(m*u-o*r)*h*y+(o*t-u*l)*h*x+(r*l-m*t)*h*v;f[k+16+20>>2]=(r*p-u*i)*h*y+(u*j-t*p)*h*x+(t*i-r*j)*h*v;f[k+16+24>>2]=(o*i-m*p)*h*y+(l*p-o*j)*h*x+(m*j-l*i)*h*v;f[k+16+28>>2]=0.0;f[k+16+32>>2]=(m*u-o*r)*h*q+(o*t-u*l)*h*n+(r*l-m*t)*h*g;f[k+16+36>>2]=(r*p-u*i)*h*q+(u*j-t*p)*h*n+(t*i-r*j)*h*g;f[k+16+40>>2]=(o*i-m*p)*h*q+(l*p-o*j)*h*n+(m*j-l*i)*h*g;f[k+16+44>>2]=0.0;Gg(k+16|0,k);g=+f[k>>2];h=+f[k+4>>2];i=+f[k+8>>2];l=+f[k+12>>2];j=1.0/+s(+(g*g+h*h+i*i+l*l));f[k>>2]=g*j;f[k+4>>2]=h*j;f[k+8>>2]=i*j;f[k+12>>2]=l*j;l=l*j<-1.0?-1.0:l*j;f[e>>2]=+w(+(l>1.0?1.0:l))*2.0;f[d>>2]=g*j;f[d+4>>2]=h*j;f[d+8>>2]=i*j;f[d+12>>2]=0.0;if(g*j*(g*j)+h*j*(h*j)+i*j*(i*j)<1.4210854715202004e-14){c[d>>2]=1065353216;c[d+4>>2]=0;c[d+8>>2]=0;f[d+12>>2]=0.0;ea=k;return}else{B=1.0/+s(+(g*j*(g*j)+h*j*(h*j)+i*j*(i*j)));f[d>>2]=g*j*B;f[d+4>>2]=h*j*B;f[d+8>>2]=i*j*B;ea=k;return}}function Fe(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=c[b+12>>2]|0;k=c[b+36>>2]|0;if((k|0)>=(j|0))return;do if((c[b+40>>2]|0)<(j|0)){if(!j){g=k;d=0}else{c[6747]=(c[6747]|0)+1;d=kb((j<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}g=c[b+36>>2]|0}e=c[b+44>>2]|0;if((g|0)<=0){if(!e){a[b+48>>0]=1;c[b+44>>2]=d;c[b+40>>2]=j;i=b+44|0;break}}else{f=0;do{c[d+(f<<2)>>2]=c[e+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0))}if(a[b+48>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a[b+48>>0]=1;c[b+44>>2]=d;c[b+40>>2]=j;i=b+44|0}else{d=c[b+44>>2]|0;i=b+44|0}while(0);hk(d+(k<<2)|0,0,(j<<2)-(k<<2)|0)|0;c[b+36>>2]=j;h=c[b+56>>2]|0;if((h|0)<(j|0)){do if((c[b+60>>2]|0)<(j|0)){if(!j){g=h;d=0}else{c[6747]=(c[6747]|0)+1;d=kb((j<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}g=c[b+56>>2]|0}e=c[b+64>>2]|0;if((g|0)<=0){if(!e){a[b+68>>0]=1;c[b+64>>2]=d;c[b+60>>2]=j;break}}else{f=0;do{c[d+(f<<2)>>2]=c[e+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0))}if(a[b+68>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a[b+68>>0]=1;c[b+64>>2]=d;c[b+60>>2]=j}else d=c[b+64>>2]|0;while(0);hk(d+(h<<2)|0,0,(j<<2)-(h<<2)|0)|0}c[b+56>>2]=j;if((j|0)>0){hk(c[i>>2]|0,-1,j<<2|0)|0;hk(c[b+64>>2]|0,-1,j<<2|0)|0}if((k|0)<=0)return;g=c[b+16>>2]|0;d=c[i>>2]|0;e=c[b+64>>2]|0;f=0;do{j=c[(c[g+(f<<4)+4>>2]|0)+12>>2]<<16|c[(c[g+(f<<4)>>2]|0)+12>>2];j=((10?j+~(j<<15)>>10:j+~(j<<15)|0)^j+~(j<<15))*9|0;j=(6?j>>6:j)^j;j=d+((((16?j+~(j<<11)>>16:j+~(j<<11)|0)^j+~(j<<11))&(c[b+12>>2]|0)+-1)<<2)|0;c[e+(f<<2)>>2]=c[j>>2];c[j>>2]=f;f=f+1|0}while((f|0)!=(k|0));return}function Ge(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;g=Hs()|0;c[g+4>>2]=4;c[g>>2]=5660;c[g+8>>2]=-1;c[g+12>>2]=-1;f[g+16>>2]=3402823466385288598117041.0e14;a[g+20>>0]=1;a[g+21>>0]=0;c[g+24>>2]=-1;c[g+28>>2]=b;Jk();c[g+32>>2]=25640;f[g+36>>2]=0.0;f[g+40>>2]=.30000001192092896;c[g+44>>2]=0;c[g>>2]=5820;c[g+552>>2]=c[d>>2];c[g+552+4>>2]=c[d+4>>2];c[g+552+8>>2]=c[d+8>>2];c[g+552+12>>2]=c[d+12>>2];c[g+568>>2]=c[d+16>>2];c[g+568+4>>2]=c[d+16+4>>2];c[g+568+8>>2]=c[d+16+8>>2];c[g+568+12>>2]=c[d+16+12>>2];c[g+584>>2]=c[d+32>>2];c[g+584+4>>2]=c[d+32+4>>2];c[g+584+8>>2]=c[d+32+8>>2];c[g+584+12>>2]=c[d+32+12>>2];c[g+600>>2]=c[d+48>>2];c[g+600+4>>2]=c[d+48+4>>2];c[g+600+8>>2]=c[d+48+8>>2];c[g+600+12>>2]=c[d+48+12>>2];c[g+616>>2]=c[d>>2];c[g+616+4>>2]=c[d+4>>2];c[g+616+8>>2]=c[d+8>>2];c[g+616+12>>2]=c[d+12>>2];c[g+632>>2]=c[d+16>>2];c[g+632+4>>2]=c[d+16+4>>2];c[g+632+8>>2]=c[d+16+8>>2];c[g+632+12>>2]=c[d+16+12>>2];c[g+648>>2]=c[d+32>>2];c[g+648+4>>2]=c[d+32+4>>2];c[g+648+8>>2]=c[d+32+8>>2];c[g+648+12>>2]=c[d+32+12>>2];c[g+664>>2]=c[d+48>>2];c[g+664+4>>2]=c[d+48+4>>2];c[g+664+8>>2]=c[d+48+8>>2];c[g+664+12>>2]=c[d+48+12>>2];f[g+688>>2]=0.0;f[g+692>>2]=-1.0;f[g+696>>2]=.8999999761581421;f[g+700>>2]=.30000001192092896;f[g+704>>2]=1.0;f[g+708>>2]=0.0;f[g+712>>2]=0.0;a[g+716>>0]=0;a[g+736>>0]=0;a[g+737>>0]=0;a[g+738>>0]=0;a[g+739>>0]=1;a[g+740>>0]=e&1;c[g+748>>2]=0;d=c[g+28>>2]|0;l=+f[g+600>>2];k=+f[g+604>>2];j=+f[g+608>>2];i=l*+f[d+20>>2]+k*+f[d+24>>2]+j*+f[d+28>>2]+ +f[d+56>>2];h=l*+f[d+36>>2]+k*+f[d+40>>2]+j*+f[d+44>>2]+ +f[d+60>>2];f[g+664>>2]=l*+f[d+4>>2]+k*+f[d+8>>2]+j*+f[d+12>>2]+ +f[d+52>>2];f[g+668>>2]=i;f[g+672>>2]=h;f[g+676>>2]=0.0;f[g+732>>2]=e?-1.0:1.0;return g|0}function He(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;j=c[b+12>>2]|0;k=c[b+32>>2]|0;if((k|0)>=(j|0))return;do if((c[b+36>>2]|0)<(j|0)){if(!j){g=k;d=0}else{c[6747]=(c[6747]|0)+1;d=kb((j<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}g=c[b+32>>2]|0}e=c[b+40>>2]|0;if((g|0)<=0){if(!e){a[b+44>>0]=1;c[b+40>>2]=d;c[b+36>>2]=j;i=b+40|0;break}}else{f=0;do{c[d+(f<<2)>>2]=c[e+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0))}if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a[b+44>>0]=1;c[b+40>>2]=d;c[b+36>>2]=j;i=b+40|0}else{d=c[b+40>>2]|0;i=b+40|0}while(0);hk(d+(k<<2)|0,0,(j<<2)-(k<<2)|0)|0;c[b+32>>2]=j;h=c[b+52>>2]|0;if((h|0)<(j|0)){do if((c[b+56>>2]|0)<(j|0)){if(!j){g=h;d=0}else{c[6747]=(c[6747]|0)+1;d=kb((j<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}g=c[b+52>>2]|0}e=c[b+60>>2]|0;if((g|0)<=0){if(!e){a[b+64>>0]=1;c[b+60>>2]=d;c[b+56>>2]=j;break}}else{f=0;do{c[d+(f<<2)>>2]=c[e+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0))}if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a[b+64>>0]=1;c[b+60>>2]=d;c[b+56>>2]=j}else d=c[b+60>>2]|0;while(0);hk(d+(h<<2)|0,0,(j<<2)-(h<<2)|0)|0}c[b+52>>2]=j;if((j|0)>0){hk(c[i>>2]|0,-1,j<<2|0)|0;hk(c[b+60>>2]|0,-1,j<<2|0)|0}if((k|0)<=0)return;g=c[b+16>>2]|0;d=c[i>>2]|0;e=c[b+60>>2]|0;f=0;do{j=c[g+(f*12|0)+4>>2]<<16|c[g+(f*12|0)>>2];j=((10?j+~(j<<15)>>10:j+~(j<<15)|0)^j+~(j<<15))*9|0;j=(6?j>>6:j)^j;j=d+((((16?j+~(j<<11)>>16:j+~(j<<11)|0)^j+~(j<<11))&(c[b+12>>2]|0)+-1)<<2)|0;c[e+(f<<2)>>2]=c[j>>2];c[j>>2]=f;f=f+1|0}while((f|0)!=(k|0));return}function Ie(b,d){b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=Hs()|0;c[e+4>>2]=4;c[e>>2]=5660;c[e+8>>2]=-1;c[e+12>>2]=-1;f[e+16>>2]=3402823466385288598117041.0e14;a[e+20>>0]=1;a[e+21>>0]=0;c[e+24>>2]=-1;c[e+28>>2]=b;Jk();c[e+32>>2]=25640;f[e+36>>2]=0.0;f[e+40>>2]=.30000001192092896;c[e+44>>2]=0;c[e>>2]=5820;c[e+552>>2]=c[d>>2];c[e+552+4>>2]=c[d+4>>2];c[e+552+8>>2]=c[d+8>>2];c[e+552+12>>2]=c[d+12>>2];c[e+568>>2]=c[d+16>>2];c[e+568+4>>2]=c[d+16+4>>2];c[e+568+8>>2]=c[d+16+8>>2];c[e+568+12>>2]=c[d+16+12>>2];c[e+584>>2]=c[d+32>>2];c[e+584+4>>2]=c[d+32+4>>2];c[e+584+8>>2]=c[d+32+8>>2];c[e+584+12>>2]=c[d+32+12>>2];c[e+600>>2]=c[d+48>>2];c[e+600+4>>2]=c[d+48+4>>2];c[e+600+8>>2]=c[d+48+8>>2];c[e+600+12>>2]=c[d+48+12>>2];c[e+616>>2]=c[d>>2];c[e+616+4>>2]=c[d+4>>2];c[e+616+8>>2]=c[d+8>>2];c[e+616+12>>2]=c[d+12>>2];c[e+632>>2]=c[d+16>>2];c[e+632+4>>2]=c[d+16+4>>2];c[e+632+8>>2]=c[d+16+8>>2];c[e+632+12>>2]=c[d+16+12>>2];c[e+648>>2]=c[d+32>>2];c[e+648+4>>2]=c[d+32+4>>2];c[e+648+8>>2]=c[d+32+8>>2];c[e+648+12>>2]=c[d+32+12>>2];c[e+664>>2]=c[d+48>>2];c[e+664+4>>2]=c[d+48+4>>2];c[e+664+8>>2]=c[d+48+8>>2];c[e+664+12>>2]=c[d+48+12>>2];f[e+688>>2]=0.0;f[e+692>>2]=-1.0;f[e+696>>2]=.8999999761581421;f[e+700>>2]=.30000001192092896;f[e+704>>2]=1.0;f[e+708>>2]=0.0;f[e+712>>2]=0.0;a[e+716>>0]=0;a[e+736>>0]=0;a[e+737>>0]=0;a[e+738>>0]=0;a[e+739>>0]=1;a[e+740>>0]=0;c[e+748>>2]=0;d=c[e+28>>2]|0;k=+f[e+600>>2];j=+f[e+604>>2];i=+f[e+608>>2];h=k*+f[d+20>>2]+j*+f[d+24>>2]+i*+f[d+28>>2]+ +f[d+56>>2];g=k*+f[d+36>>2]+j*+f[d+40>>2]+i*+f[d+44>>2]+ +f[d+60>>2];f[e+664>>2]=k*+f[d+4>>2]+j*+f[d+8>>2]+i*+f[d+12>>2]+ +f[d+52>>2];f[e+668>>2]=h;f[e+672>>2]=g;f[e+676>>2]=0.0;f[e+732>>2]=1.0;return e|0}function Je(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=ea;ea=ea+384|0;h=c[(c[a>>2]|0)+8>>2]|0;g=NJ(b)|0;qs(f+368|0,g,g+4|0,g+8|0);d=NJ(d)|0;qs(f+352|0,d,g+4|0,g+8|0);Pa[h&127](a,f+368|0,f+352|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+336|0,d,g+4|0,g+8|0);qs(f+320|0,d,d+4|0,g+8|0);Pa[b&127](a,f+336|0,f+320|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+304|0,d,d+4|0,g+8|0);qs(f+288|0,g,d+4|0,g+8|0);Pa[b&127](a,f+304|0,f+288|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+272|0,g,d+4|0,g+8|0);qs(f+256|0,g,g+4|0,g+8|0);Pa[b&127](a,f+272|0,f+256|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+240|0,g,g+4|0,g+8|0);qs(f+224|0,g,g+4|0,d+8|0);Pa[b&127](a,f+240|0,f+224|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+208|0,d,g+4|0,g+8|0);qs(f+192|0,d,g+4|0,d+8|0);Pa[b&127](a,f+208|0,f+192|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+176|0,d,d+4|0,g+8|0);qs(f+160|0,d,d+4|0,d+8|0);Pa[b&127](a,f+176|0,f+160|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+144|0,g,d+4|0,g+8|0);qs(f+128|0,g,d+4|0,d+8|0);Pa[b&127](a,f+144|0,f+128|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+112|0,g,g+4|0,d+8|0);qs(f+96|0,d,g+4|0,d+8|0);Pa[b&127](a,f+112|0,f+96|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+80|0,d,g+4|0,d+8|0);qs(f+64|0,d,d+4|0,d+8|0);Pa[b&127](a,f+80|0,f+64|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+48|0,d,d+4|0,d+8|0);qs(f+32|0,g,d+4|0,d+8|0);Pa[b&127](a,f+48|0,f+32|0,e);b=c[(c[a>>2]|0)+8>>2]|0;qs(f+16|0,g,d+4|0,d+8|0);qs(f,g,g+4|0,d+8|0);Pa[b&127](a,f+16|0,f,e);ea=f;return}function Ke(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;g=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=g;if(g|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+20>>2]=c[a+72>>2];e=c[a+16>>2]|0;c[b+16>>2]=e;c[b+12>>2]=0;if(!e)return 19016;g=va[c[(c[d>>2]|0)+16>>2]&63](d,76,e)|0;e=c[g+8>>2]|0;c[b+12>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;if((c[b+16>>2]|0)>0){f=0;while(1){h=c[a+24>>2]|0;c[e+72>>2]=c[h+(f*80|0)+72>>2];c[e+64>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[h+(f*80|0)+64>>2]|0)|0;if(!(ta[c[(c[d>>2]|0)+24>>2]&31](d,c[(c[a+24>>2]|0)+(f*80|0)+64>>2]|0)|0)){h=c[(c[d>>2]|0)+16>>2]|0;i=c[(c[a+24>>2]|0)+(f*80|0)+64>>2]|0;i=ra[c[(c[i>>2]|0)+52>>2]&127](i)|0;i=va[h&63](d,i,1)|0;h=c[(c[a+24>>2]|0)+(f*80|0)+64>>2]|0;h=va[c[(c[h>>2]|0)+56>>2]&63](h,c[i+8>>2]|0,d)|0;Ta[c[(c[d>>2]|0)+20>>2]&31](d,i,h,1346455635,c[(c[a+24>>2]|0)+(f*80|0)+64>>2]|0)}i=c[a+24>>2]|0;c[e+68>>2]=c[i+(f*80|0)+68>>2];c[e>>2]=c[i+(f*80|0)>>2];c[e+4>>2]=c[i+(f*80|0)+4>>2];c[e+8>>2]=c[i+(f*80|0)+8>>2];c[e+12>>2]=c[i+(f*80|0)+12>>2];c[e+16>>2]=c[i+(f*80|0)+16>>2];c[e+20>>2]=c[i+(f*80|0)+20>>2];c[e+24>>2]=c[i+(f*80|0)+24>>2];c[e+28>>2]=c[i+(f*80|0)+28>>2];c[e+32>>2]=c[i+(f*80|0)+32>>2];c[e+36>>2]=c[i+(f*80|0)+36>>2];c[e+40>>2]=c[i+(f*80|0)+40>>2];c[e+44>>2]=c[i+(f*80|0)+44>>2];c[e+48>>2]=c[i+(f*80|0)+48>>2];c[e+52>>2]=c[i+(f*80|0)+52>>2];c[e+56>>2]=c[i+(f*80|0)+56>>2];c[e+60>>2]=c[i+(f*80|0)+60>>2];f=f+1|0;if((f|0)>=(c[b+16>>2]|0)){e=d;break}else e=e+76|0}}else e=d;Ta[c[(c[e>>2]|0)+20>>2]&31](d,g,18991,1497453121,c[g+8>>2]|0);return 19016}function Le(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0;g=ea;ea=ea+256|0;c[g+32>>2]=6804;k=g+32+36|0;c[k>>2]=c[b>>2];c[k+4>>2]=c[b+4>>2];c[k+8>>2]=c[b+8>>2];c[k+12>>2]=c[b+12>>2];l=g+32+52|0;c[l>>2]=c[d>>2];c[l+4>>2]=c[d+4>>2];c[l+8>>2]=c[d+8>>2];c[l+12>>2]=c[d+12>>2];c[g+32+212>>2]=a;c[g+32+216>>2]=e;c[g+32+68>>2]=1065353216;c[g+32+72>>2]=0;c[g+32+72+4>>2]=0;c[g+32+72+8>>2]=0;c[g+32+72+12>>2]=0;c[g+32+88>>2]=1065353216;c[g+32+92>>2]=0;c[g+32+92+4>>2]=0;c[g+32+92+8>>2]=0;c[g+32+92+12>>2]=0;c[g+32+108>>2]=1065353216;c[g+32+112>>2]=0;c[g+32+116>>2]=c[k>>2];c[g+32+116+4>>2]=c[k+4>>2];c[g+32+116+8>>2]=c[k+8>>2];c[g+32+116+12>>2]=c[k+12>>2];c[g+32+132>>2]=1065353216;c[g+32+136>>2]=0;c[g+32+136+4>>2]=0;c[g+32+136+8>>2]=0;c[g+32+136+12>>2]=0;c[g+32+152>>2]=1065353216;c[g+32+156>>2]=0;c[g+32+156+4>>2]=0;c[g+32+156+8>>2]=0;c[g+32+156+12>>2]=0;c[g+32+172>>2]=1065353216;c[g+32+176>>2]=0;c[g+32+180>>2]=c[d>>2];c[g+32+180+4>>2]=c[d+4>>2];c[g+32+180+8>>2]=c[d+8>>2];c[g+32+180+12>>2]=c[d+12>>2];m=+f[d>>2]-+f[b>>2];j=+f[d+4>>2]-+f[b+4>>2];i=+f[d+8>>2]-+f[b+8>>2];h=1.0/+s(+(m*m+j*j+i*i));p=m*h==0.0?999999984306749440.0:1.0/(m*h);f[g+32+4>>2]=p;o=j*h==0.0?999999984306749440.0:1.0/(j*h);f[g+32+8>>2]=o;n=i*h==0.0?999999984306749440.0:1.0/(i*h);f[g+32+12>>2]=n;c[g+32+20>>2]=p<0.0&1;c[g+32+24>>2]=o<0.0&1;c[g+32+28>>2]=n<0.0&1;f[g+32+32>>2]=m*h*(+f[l>>2]-+f[k>>2])+j*h*(+f[g+32+56>>2]-+f[g+32+40>>2])+i*h*(+f[g+32+60>>2]-+f[g+32+44>>2]);a=c[a+68>>2]|0;e=c[(c[a>>2]|0)+24>>2]|0;c[g+16>>2]=0;c[g+16+4>>2]=0;c[g+16+8>>2]=0;c[g+16+12>>2]=0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;Va[e&7](a,b,d,g+32|0,g+16|0,g);ea=g;return}function Me(a,b,c,d,e,g,h,i){a=a|0;b=+b;c=+c;d=+d;e=e|0;g=+g;h=+h;i=+i;var j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0;z=+f[e>>2];y=+f[e+16>>2];x=+f[e+32>>2];w=+f[e+4>>2];v=+f[e+20>>2];u=+f[e+36>>2];t=+f[e+8>>2];s=+f[e+24>>2];r=+f[e+40>>2];j=d-((z*0.0+y*-i+x*h)*0.0+(w*0.0+v*-i+u*h)*i+(t*0.0+s*-i+r*h)*-h)+c;o=0.0-((z*0.0+y*-i+x*h)*-i+(w*0.0+v*-i+u*h)*0.0+(t*0.0+s*-i+r*h)*g)+0.0;l=0.0-((z*0.0+y*-i+x*h)*h+(w*0.0+v*-i+u*h)*-g+(t*0.0+s*-i+r*h)*0.0)+0.0;m=0.0-((z*i+y*0.0+x*-g)*0.0+(w*i+v*0.0+u*-g)*i+(t*i+s*0.0+r*-g)*-h)+0.0;n=d-((z*i+y*0.0+x*-g)*-i+(w*i+v*0.0+u*-g)*0.0+(t*i+s*0.0+r*-g)*g)+c;k=0.0-((z*i+y*0.0+x*-g)*h+(w*i+v*0.0+u*-g)*-g+(t*i+s*0.0+r*-g)*0.0)+0.0;p=0.0-((z*-h+y*g+x*0.0)*0.0+(w*-h+v*g+u*0.0)*i+(t*-h+s*g+r*0.0)*-h)+0.0;q=0.0-((z*-h+y*g+x*0.0)*-i+(w*-h+v*g+u*0.0)*0.0+(t*-h+s*g+r*0.0)*g)+0.0;h=d-((z*-h+y*g+x*0.0)*h+(w*-h+v*g+u*0.0)*-g+(t*-h+s*g+r*0.0)*0.0)+c;i=1.0/(l*(q*m-n*p)+(j*(n*h-k*q)+o*(k*p-h*m)));f[a>>2]=(q*m-n*p)*i*0.0+(1.0/b*((n*h-k*q)*i)+(k*p-h*m)*i*0.0);f[a+4>>2]=(p*o-q*j)*i*0.0+(1.0/b*((q*l-h*o)*i)+(h*j-p*l)*i*0.0);f[a+8>>2]=(n*j-m*o)*i*0.0+(1.0/b*((k*o-n*l)*i)+(m*l-k*j)*i*0.0);f[a+12>>2]=0.0;f[a+16>>2]=(q*m-n*p)*i*0.0+((n*h-k*q)*i*0.0+1.0/b*((k*p-h*m)*i));f[a+20>>2]=(p*o-q*j)*i*0.0+((q*l-h*o)*i*0.0+1.0/b*((h*j-p*l)*i));f[a+24>>2]=(n*j-m*o)*i*0.0+((k*o-n*l)*i*0.0+1.0/b*((m*l-k*j)*i));f[a+28>>2]=0.0;f[a+32>>2]=1.0/b*((q*m-n*p)*i)+((n*h-k*q)*i*0.0+(k*p-h*m)*i*0.0);f[a+36>>2]=1.0/b*((p*o-q*j)*i)+((q*l-h*o)*i*0.0+(h*j-p*l)*i*0.0);f[a+40>>2]=1.0/b*((n*j-m*o)*i)+((k*o-n*l)*i*0.0+(m*l-k*j)*i*0.0);f[a+44>>2]=0.0;return}function Ne(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;h=ea;ea=ea+128|0;if(!b){ea=h;return}if(c[b+40>>2]|0){Ne(a,c[b+36>>2]|0,d+1|0,e,g);Ne(a,c[b+40>>2]|0,d+1|0,e,g)}if((d|0)<0){ea=h;return}l=+f[b>>2];q=+f[b+16>>2];j=+f[b+4>>2];p=+f[b+20>>2];i=+f[b+8>>2];o=+f[b+24>>2];k=(l+q)*.5-(q-l)*.5;m=(j+p)*.5-(p-j)*.5;n=(i+o)*.5-(o-i)*.5;l=(l+q)*.5+(q-l)*.5;j=(j+p)*.5+(p-j)*.5;i=(i+o)*.5+(o-i)*.5;b=(c[b+40>>2]|0)==0?g:e;f[h>>2]=k;f[h+4>>2]=m;f[h+8>>2]=n;f[h+12>>2]=0.0;f[h+16>>2]=l;f[h+20>>2]=m;f[h+24>>2]=n;f[h+28>>2]=0.0;f[h+32>>2]=l;f[h+36>>2]=j;f[h+40>>2]=n;f[h+44>>2]=0.0;f[h+48>>2]=k;f[h+52>>2]=j;f[h+56>>2]=n;f[h+60>>2]=0.0;f[h+64>>2]=k;f[h+68>>2]=m;f[h+72>>2]=i;f[h+76>>2]=0.0;f[h+80>>2]=l;f[h+84>>2]=m;f[h+88>>2]=i;f[h+92>>2]=0.0;f[h+96>>2]=l;f[h+100>>2]=j;f[h+104>>2]=i;f[h+108>>2]=0.0;f[h+112>>2]=k;f[h+116>>2]=j;f[h+120>>2]=i;f[h+124>>2]=0.0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,h,h+16|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+16|0,h+32|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+32|0,h+48|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+48|0,h,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+64|0,h+80|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+80|0,h+96|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+96|0,h+112|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+112|0,h+64|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h,h+64|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+16|0,h+80|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+32|0,h+96|0,b);Pa[c[(c[a>>2]|0)+8>>2]&127](a,h+48|0,h+112|0,b);ea=h;return}function Oe(b,d,e,g,h,i){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0;q=ea;ea=ea+96|0;m=q;n=m+96|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(n|0));if(!i)p=c[c[b+880>>2]>>2]|0;else p=i;i=c[b+772>>2]|0;if((i|0)==(c[b+776>>2]|0)?(o=(i|0)==0?1:i<<1,(i|0)<(o|0)):0){if(!o)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((o*104|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+772>>2]|0}if((i|0)>0){k=0;do{m=j+(k*104|0)|0;l=(c[b+780>>2]|0)+(k*104|0)|0;n=m+104|0;do{c[m>>2]=c[l>>2];m=m+4|0;l=l+4|0}while((m|0)<(n|0));k=k+1|0}while((k|0)!=(i|0))}i=c[b+780>>2]|0;if(i|0){if(a[b+784>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+780>>2]=0}a[b+784>>0]=1;c[b+780>>2]=j;c[b+776>>2]=o;i=c[b+772>>2]|0}m=c[b+780>>2]|0;c[m+(i*104|0)>>2]=0;c[m+(i*104|0)+4>>2]=p;m=m+(i*104|0)+8|0;l=q;n=m+96|0;do{c[m>>2]=c[l>>2];m=m+4|0;l=l+4|0}while((m|0)<(n|0));p=c[b+772>>2]|0;c[b+772>>2]=p+1;o=c[b+780>>2]|0;k=c[b+720>>2]|0;c[o+(p*104|0)+8>>2]=k+(d*104|0);n=c[b+720>>2]|0;c[o+(p*104|0)+12>>2]=n+(e*104|0);l=c[b+720>>2]|0;c[o+(p*104|0)+16>>2]=l+(g*104|0);m=c[b+720>>2]|0;c[o+(p*104|0)+20>>2]=m+(h*104|0);y=+f[k+(d*104|0)+8>>2];v=+f[k+(d*104|0)+12>>2];z=+f[k+(d*104|0)+16>>2];s=+f[l+(g*104|0)+8>>2]-y;x=+f[l+(g*104|0)+12>>2]-v;u=+f[l+(g*104|0)+16>>2]-z;t=+f[m+(h*104|0)+8>>2]-y;w=+f[m+(h*104|0)+12>>2]-v;r=+f[m+(h*104|0)+16>>2]-z;f[o+(p*104|0)+24>>2]=(+f[n+(e*104|0)+16>>2]-z)*(s*w-x*t)+((+f[n+(e*104|0)+8>>2]-y)*(x*r-u*w)+(+f[n+(e*104|0)+12>>2]-v)*(u*t-s*r));a[b+924>>0]=1;ea=q;return}function Pe(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0.0;g=ea;ea=ea+784|0;c[g+712>>2]=1065353216;c[g+712+4>>2]=0;c[g+712+4+4>>2]=0;c[g+712+4+8>>2]=0;c[g+712+4+12>>2]=0;c[g+712+20>>2]=1065353216;c[g+712+24>>2]=0;c[g+712+24+4>>2]=0;c[g+712+24+8>>2]=0;c[g+712+24+12>>2]=0;c[g+712+40>>2]=1065353216;e=g+712+44|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[g+536>>2]=4752;c[g+536+168>>2]=0;f[g+536+172>>2]=0.0;c[g+536+164>>2]=c[b+200>>2];e=c[b+196>>2]|0;c[g+480+8>>2]=0;c[g+480+12>>2]=1065353216;c[g+480+16>>2]=1065353216;c[g+480+20>>2]=1065353216;f[g+480+24>>2]=0.0;c[g+480>>2]=7884;c[g+480+4>>2]=8;c[g+480+28>>2]=e;c[g+480+44>>2]=e;c[g+376+8>>2]=0;c[g+376+12>>2]=1065353216;c[g+376+16>>2]=1065353216;c[g+376+20>>2]=1065353216;f[g+376+24>>2]=0.0;f[g+376+44>>2]=.03999999910593033;c[g+376+52>>2]=0;c[g+376>>2]=4780;c[g+376+4>>2]=1;c[g+376+56>>2]=c[d>>2];c[g+376+56+4>>2]=c[d+4>>2];c[g+376+56+8>>2]=c[d+8>>2];c[g+376+56+12>>2]=c[d+12>>2];c[g+376+72>>2]=c[d+16>>2];c[g+376+72+4>>2]=c[d+16+4>>2];c[g+376+72+8>>2]=c[d+16+8>>2];c[g+376+72+12>>2]=c[d+16+12>>2];c[g+376+88>>2]=c[d+32>>2];c[g+376+88+4>>2]=c[d+32+4>>2];c[g+376+88+8>>2]=c[d+32+8>>2];c[g+376+88+12>>2]=c[d+32+12>>2];f[g+16+308>>2]=9.999999747378752e-05;a[g+16+332>>0]=0;c[g>>2]=6076;c[g+4>>2]=g+16;c[g+8>>2]=g+480;c[g+12>>2]=g+376;if(dc(g,b+4|0,b+68|0,g+712|0,g+712|0,g+536|0)|0?(h=+f[g+536+164>>2],+f[b+200>>2]>h):0)f[b+200>>2]=h;c[g+376>>2]=8336;e=c[g+376+52>>2]|0;if(!e){ea=g;return}Ca[c[c[e>>2]>>2]&511](e);e=c[g+376+52>>2]|0;if(!e){ea=g;return}c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);ea=g;return}function Qe(d,e,f,g,h,i,j,k,l){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0;n=ea;ea=ea+48|0;c[6747]=(c[6747]|0)+1;g=kb(83)|0;if(!g)m=0;else{c[(g+4+15&-16)+-4>>2]=g;m=g+4+15&-16}c[m>>2]=h;b[m+4>>1]=i;b[m+6>>1]=j;i=m+16|0;c[i>>2]=c[e>>2];c[i+4>>2]=c[e+4>>2];c[i+8>>2]=c[e+8>>2];c[i+12>>2]=c[e+12>>2];i=m+32|0;c[i>>2]=c[f>>2];c[i+4>>2]=c[f+4>>2];c[i+8>>2]=c[f+8>>2];c[i+12>>2]=c[f+12>>2];c[m+8>>2]=0;i=m+56|0;c[i>>2]=0;j=m+52|0;c[j>>2]=0;c[n+16>>2]=c[e>>2];c[n+16+4>>2]=c[e+4>>2];c[n+16+8>>2]=c[e+8>>2];c[n+16+12>>2]=c[e+12>>2];c[n+16+16>>2]=c[f>>2];c[n+16+16+4>>2]=c[f+4>>2];c[n+16+16+8>>2]=c[f+8>>2];c[n+16+16+12>>2]=c[f+12>>2];c[m+60>>2]=c[d+144>>2];g=(c[d+188>>2]|0)+1|0;c[d+188>>2]=g;c[m+12>>2]=g;g=c[d+8>>2]|0;if(!g){c[6747]=(c[6747]|0)+1;g=kb(63)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}k=g;l=k+44|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(l|0))}else c[d+8>>2]=0;c[g+32>>2]=0;c[g+36>>2]=m;c[g+40>>2]=0;c[g>>2]=c[n+16>>2];c[g+4>>2]=c[n+16+4>>2];c[g+8>>2]=c[n+16+8>>2];c[g+12>>2]=c[n+16+12>>2];c[g+16>>2]=c[n+16+16>>2];c[g+20>>2]=c[n+16+20>>2];c[g+24>>2]=c[n+16+24>>2];c[g+28>>2]=c[n+16+28>>2];je(d+4|0,c[d+4>>2]|0,g);c[d+16>>2]=(c[d+16>>2]|0)+1;c[m+48>>2]=g;k=d+124+(c[d+144>>2]<<2)|0;c[j>>2]=0;c[i>>2]=c[k>>2];g=c[k>>2]|0;if(g|0)c[g+52>>2]=m;c[k>>2]=m;if(a[d+193>>0]|0){ea=n;return m|0}c[n>>2]=10216;c[n+4>>2]=d;c[n+8>>2]=m;Zd(c[d+4>>2]|0,n+16|0,n);Zd(c[d+64>>2]|0,n+16|0,n);ea=n;return m|0}function Re(a,b,d){a=a|0;b=+b;d=+d;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0,y=0.0;x=c[a+832>>2]|0;if((x|0)<=0)return;a=c[a+840>>2]|0;q=0;do{l=c[a+(q*56|0)>>2]|0;o=c[a+(q*56|0)+4>>2]|0;m=c[o+8>>2]|0;n=c[o+12>>2]|0;o=c[o+16>>2]|0;r=a+(q*56|0)+8|0;j=+f[r>>2];s=a+(q*56|0)+12|0;i=+f[s>>2];t=a+(q*56|0)+16|0;v=+f[t>>2];b=+f[m+8>>2]*j+ +f[n+8>>2]*i+ +f[o+8>>2]*v;e=+f[m+12>>2]*j+ +f[n+12>>2]*i+ +f[o+12>>2]*v;d=+f[m+16>>2]*j+ +f[n+16>>2]*i+ +f[o+16>>2]*v;p=+f[l+8>>2];g=+f[l+12>>2];h=+f[l+16>>2];u=p-+f[l+24>>2]-(b-(j*+f[m+24>>2]+i*+f[n+24>>2]+v*+f[o+24>>2]));w=g-+f[l+28>>2]-(e-(j*+f[m+28>>2]+i*+f[n+28>>2]+v*+f[o+28>>2]));v=h-+f[l+32>>2]-(d-(j*+f[m+32>>2]+i*+f[n+32>>2]+v*+f[o+32>>2]));i=+f[a+(q*56|0)+24>>2];j=+f[a+(q*56|0)+28>>2];k=+f[a+(q*56|0)+32>>2];if(u*i+w*j+v*k<0.0){e=+f[a+(q*56|0)+40>>2]-(p*i+g*j+h*k-(b*i+e*j+d*k));b=i*e+0.0;d=j*e+0.0;e=k*e+0.0}else{b=0.0;d=0.0;e=0.0}y=+f[a+(q*56|0)+44>>2];b=b-y*(u-i*(u*i+w*j+v*k));d=d-y*(w-j*(u*i+w*j+v*k));v=e-y*(v-k*(u*i+w*j+v*k));w=+f[a+(q*56|0)+48>>2];f[l+8>>2]=p+w*b;f[l+12>>2]=g+w*d;f[l+16>>2]=h+w*v;l=a+(q*56|0)+52|0;w=+f[l>>2]*+f[r>>2];f[m+8>>2]=+f[m+8>>2]-b*w;f[m+12>>2]=+f[m+12>>2]-d*w;f[m+16>>2]=+f[m+16>>2]-v*w;w=+f[l>>2]*+f[s>>2];f[n+8>>2]=+f[n+8>>2]-b*w;f[n+12>>2]=+f[n+12>>2]-d*w;f[n+16>>2]=+f[n+16>>2]-v*w;w=+f[l>>2]*+f[t>>2];f[o+8>>2]=+f[o+8>>2]-b*w;f[o+12>>2]=+f[o+12>>2]-d*w;f[o+16>>2]=+f[o+16>>2]-v*w;q=q+1|0}while((q|0)!=(x|0));return}function Se(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;k=ea;ea=ea+160|0;i=c[b+12>>2]|0;if(!i){ea=k;return}l=(a[b+16>>0]|0)!=0;m=l?e:d;e=l?d:e;o=c[m+4>>2]|0;n=c[e+4>>2]|0;c[h+4>>2]=i;d=c[i+752>>2]|0;c[k+136>>2]=10616;c[k+136+4>>2]=o;c[k+136+8>>2]=n;c[k+136+12>>2]=d;f[k+128>>2]=999999984306749440.0;d=c[m+12>>2]|0;c[k>>2]=c[d>>2];c[k+4>>2]=c[d+4>>2];c[k+8>>2]=c[d+8>>2];c[k+12>>2]=c[d+12>>2];c[k+16>>2]=c[d+16>>2];c[k+16+4>>2]=c[d+16+4>>2];c[k+16+8>>2]=c[d+16+8>>2];c[k+16+12>>2]=c[d+16+12>>2];c[k+32>>2]=c[d+32>>2];c[k+32+4>>2]=c[d+32+4>>2];c[k+32+8>>2]=c[d+32+8>>2];c[k+32+12>>2]=c[d+32+12>>2];c[k+48>>2]=c[d+48>>2];c[k+48+4>>2]=c[d+48+4>>2];c[k+48+8>>2]=c[d+48+8>>2];c[k+48+12>>2]=c[d+48+12>>2];e=c[e+12>>2]|0;c[k+64>>2]=c[e>>2];c[k+64+4>>2]=c[e+4>>2];c[k+64+8>>2]=c[e+8>>2];c[k+64+12>>2]=c[e+12>>2];c[k+80>>2]=c[e+16>>2];c[k+80+4>>2]=c[e+16+4>>2];c[k+80+8>>2]=c[e+16+8>>2];c[k+80+12>>2]=c[e+16+12>>2];c[k+96>>2]=c[e+32>>2];c[k+96+4>>2]=c[e+32+4>>2];c[k+96+8>>2]=c[e+32+8>>2];c[k+96+12>>2]=c[e+32+12>>2];c[k+112>>2]=c[e+48>>2];c[k+112+4>>2]=c[e+48+4>>2];c[k+112+8>>2]=c[e+48+8>>2];c[k+112+12>>2]=c[e+48+12>>2];Sc(k+136|0,k,h,c[g+20>>2]|0,l);do if(a[b+8>>0]|0?(j=c[h+4>>2]|0,c[j+748>>2]|0):0){i=c[j+740>>2]|0;d=c[(c[h+8>>2]|0)+8>>2]|0;if((i|0)==(d|0)){Hd(j,i+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(j,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,d+4|0);break}}while(0);ea=k;return}function Te(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0;g=ea;ea=ea+608|0;o=+f[d+116>>2]-+f[d+52>>2];n=+f[d+120>>2]-+f[d+56>>2];m=+f[d+124>>2]-+f[d+60>>2];i=+f[e+116>>2]-+f[e+52>>2];k=+f[e+120>>2]-+f[e+56>>2];j=+f[e+124>>2]-+f[e+60>>2];l=+f[d+252>>2];if(o*o+n*n+m*m>2],i*i+k*k+j*j>2]|0;h=c[e+248>>2]|0;c[g+552+8>>2]=0;c[g+552+12>>2]=1065353216;c[g+552+16>>2]=1065353216;c[g+552+20>>2]=1065353216;f[g+552+24>>2]=0.0;c[g+552>>2]=7884;c[g+552+4>>2]=8;c[g+552+28>>2]=h;c[g+552+44>>2]=h;c[g+376>>2]=4752;f[g+376+164>>2]=999999984306749440.0;c[g+376+168>>2]=0;f[g+376+172>>2]=0.0;f[g+16+308>>2]=9.999999747378752e-05;a[g+16+332>>0]=0;c[g>>2]=10452;c[g+4>>2]=g+16;c[g+8>>2]=b;c[g+12>>2]=g+552;if(yc(g,d+4|0,d+68|0,e+4|0,e+68|0,g+376|0)|0){i=+f[g+376+164>>2];if(+f[d+244>>2]>i)f[d+244>>2]=i;if(+f[e+244>>2]>i)f[e+244>>2]=i;if(i<1.0)j=i;else j=1.0}else j=1.0;b=c[e+192>>2]|0;h=c[d+248>>2]|0;c[g+552+8>>2]=0;c[g+552+12>>2]=1065353216;c[g+552+16>>2]=1065353216;c[g+552+20>>2]=1065353216;f[g+552+24>>2]=0.0;c[g+552>>2]=7884;c[g+552+4>>2]=8;c[g+552+28>>2]=h;c[g+552+44>>2]=h;c[g+376>>2]=4752;f[g+376+164>>2]=999999984306749440.0;c[g+376+168>>2]=0;f[g+376+172>>2]=0.0;f[g+16+308>>2]=9.999999747378752e-05;a[g+16+332>>0]=0;c[g>>2]=10452;c[g+4>>2]=g+16;c[g+8>>2]=g+552;c[g+12>>2]=b;if(yc(g,d+4|0,d+68|0,e+4|0,e+68|0,g+376|0)|0){i=+f[g+376+164>>2];if(+f[d+244>>2]>i)f[d+244>>2]=i;if(+f[e+244>>2]>i)f[e+244>>2]=i;if(!(j>i))i=j}else i=j;o=i;ea=g;return +o}function Ue(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=c[a+56>>2]|0;if(!e){e=c[a+52>>2]|0;if(!e){c[6747]=(c[6747]|0)+1;e=kb(31)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}f=c[a+60>>2]|0;c[e+4>>2]=f;g=e+8|0;c[g>>2]=0;c[6747]=(c[6747]|0)+1;f=kb((f*24|3)+16|0)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}c[e>>2]=f;c[g>>2]=c[a+48>>2];c[a+48>>2]=e}else c[a+52>>2]=c[e+8>>2];h=c[e>>2]|0;e=c[e+4>>2]|0;if((e|0)>0?(c[h>>2]=(e|0)!=1?h+24|0:0,(e|0)!=1):0){f=1;g=h+24|0;do{f=f+1|0;i=(f|0)<(e|0);j=g;g=g+24|0;c[j>>2]=i?g:0}while(i)}}else h=e;c[a+56>>2]=c[h>>2];c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;e=c[a+56>>2]|0;if(!e){e=c[a+52>>2]|0;if(!e){c[6747]=(c[6747]|0)+1;e=kb(31)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[a+60>>2]|0;c[f+4>>2]=e;g=f+8|0;c[g>>2]=0;c[6747]=(c[6747]|0)+1;e=kb((e*24|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[f>>2]=e;c[g>>2]=c[a+48>>2];c[a+48>>2]=f}else{c[a+52>>2]=c[e+8>>2];f=e}e=c[f>>2]|0;f=c[f+4>>2]|0;if((f|0)>0?(c[e>>2]=(f|0)!=1?e+24|0:0,(f|0)!=1):0){g=1;i=e+24|0;do{g=g+1|0;j=(g|0)<(f|0);k=i;i=i+24|0;c[k>>2]=j?i:0}while(j)}}c[a+56>>2]=c[e>>2];k=e;c[k>>2]=0;c[k+4>>2]=0;c[h+8>>2]=e;c[e+8>>2]=h;k=c[a+100>>2]|0;c[h+20>>2]=k;c[e+20>>2]=k;c[h+12>>2]=d;c[e+12>>2]=b;c[h+16>>2]=0;c[e+16>>2]=0;e=c[a+116>>2]|0;c[a+116>>2]=e+1;if((e|0)<(c[a+120>>2]|0))return h|0;c[a+120>>2]=e+1;return h|0}function Ve(a,d){a=a|0;d=d|0;var e=0,g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0;e=ea;ea=ea+128|0;F=c[(c[a+8>>2]|0)+24>>2]|0;h=c[F+(d*80|0)+64>>2]|0;g=c[a+12>>2]|0;w=+f[F+(d*80|0)>>2];C=+f[g>>2];v=+f[F+(d*80|0)+16>>2];B=+f[g+4>>2];u=+f[F+(d*80|0)+32>>2];A=+f[g+8>>2];t=+f[F+(d*80|0)+4>>2];s=+f[F+(d*80|0)+20>>2];r=+f[F+(d*80|0)+36>>2];q=+f[F+(d*80|0)+8>>2];o=+f[F+(d*80|0)+24>>2];m=+f[F+(d*80|0)+40>>2];z=+f[g+16>>2];y=+f[g+20>>2];x=+f[g+24>>2];p=+f[g+32>>2];n=+f[g+36>>2];l=+f[g+40>>2];E=+f[F+(d*80|0)+48>>2];D=+f[F+(d*80|0)+52>>2];i=+f[F+(d*80|0)+56>>2];k=+f[g+48>>2]+(C*E+B*D+A*i);j=z*E+y*D+x*i+ +f[g+52>>2];i=p*E+n*D+l*i+ +f[g+56>>2];f[e+56>>2]=w*C+v*B+u*A;f[e+56+4>>2]=C*t+B*s+A*r;f[e+56+8>>2]=C*q+B*o+A*m;f[e+56+12>>2]=0.0;f[e+56+16>>2]=w*z+v*y+u*x;f[e+56+20>>2]=t*z+s*y+r*x;f[e+56+24>>2]=q*z+o*y+m*x;f[e+56+28>>2]=0.0;f[e+56+32>>2]=w*p+v*n+u*l;f[e+56+36>>2]=t*p+s*n+r*l;f[e+56+40>>2]=q*p+o*n+m*l;f[e+56+44>>2]=0.0;f[e+56+48>>2]=k;f[e+56+52>>2]=j;f[e+56+56>>2]=i;f[e+56+60>>2]=0.0;g=c[a+4>>2]|0;c[e+32>>2]=0;c[e+32+4>>2]=h;c[e+32+8>>2]=g;c[e+32+12>>2]=e+56;c[e+32+16>>2]=-1;c[e+32+20>>2]=d;g=c[a+24>>2]|0;f[e+4>>2]=1.0;c[e+8>>2]=0;b[e+12>>1]=1;b[e+14>>1]=-1;c[e+16>>2]=0;c[e>>2]=6908;c[e+20>>2]=g;c[e+24>>2]=d;c[e+4>>2]=c[g+4>>2];c[e+16>>2]=c[g+16>>2];Nb(c[a+16>>2]|0,c[a+20>>2]|0,e+32|0,e);ea=e;return}function We(b,d,e,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0;q=ea;ea=ea+80|0;f[q+16+60>>2]=0.0;f[q+16+8>>2]=0.0;f[q+16+12>>2]=.10000000149011612;f[q+16+16>>2]=300.0;f[q+16>>2]=1.0;f[q+16+4>>2]=-1.0;f[q+16+28>>2]=0.0;f[q+16+32>>2]=.20000000298023224;f[q+16+36>>2]=0.0;f[q+16+40>>2]=0.0;f[q+16+20>>2]=1.0;f[q+16+24>>2]=.5;c[q+16+56>>2]=0;f[q+16+48>>2]=0.0;a[q+16+44>>0]=0;o=0;do{n=c[b+856+(o<<2)>>2]|0;m=a[b+788+o>>0]|0;if(!n){if(m<<24>>24){m=1;p=5}}else p=5;if((p|0)==5){p=0;f[q+16+40>>2]=0.0;c[q+16+56>>2]=n;c[q+16+52>>2]=c[b+840+(o<<2)>>2];c[q+16+48>>2]=c[b+824+(o<<2)>>2];c[q+16+20>>2]=c[b+732>>2];a[q+16+44>>0]=m;c[q+16+4>>2]=c[b+696+(o<<2)>>2];c[q+16+24>>2]=c[b+728>>2];c[q+16>>2]=c[b+680+(o<<2)>>2];f[q+16+16>>2]=0.0;c[q+16+12>>2]=c[b+808+(o<<2)>>2];c[q+16+8>>2]=c[b+792+(o<<2)>>2];c[q>>2]=c[b+1064+(o<<2)>>2];c[q+4>>2]=c[b+1080+(o<<2)>>2];c[q+8>>2]=c[b+1096+(o<<2)>>2];f[q+12>>2]=0.0;n=c[b+1304>>2]|0;m=o*3|0;n=m?n>>m:n;if(!(n&1))m=c[d+32>>2]|0;else m=b+740+(o<<2)|0;c[q+16+28>>2]=c[m>>2];if(!(n&2))m=c[d+32>>2]|0;else m=b+772+(o<<2)|0;c[q+16+36>>2]=c[m>>2];c[q+16+32>>2]=c[((n&4|0)==0?d+4|0:b+756+(o<<2)|0)>>2];if(a[b+1301>>0]|0){n=o+1|0;if(!(c[b+868+(((n|0)==3?0:n)<<6)+56>>2]|0))m=1;else m=(c[b+868+((((o+2|0)>>>0)%3|0)<<6)+56>>2]|0)==0&1}else m=0;e=(xc(b,q+16|0,g,h,i,j,k,l,d,e,q,0,m)|0)+e|0}o=o+1|0}while((o|0)!=3);ea=q;return e|0}function Xe(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0;i=ea;ea=ea+80|0;g=+ha[c[(c[a>>2]|0)+48>>2]&15](a);h=0;do{p=i+64+(h<<2)|0;c[i+64>>2]=0;c[i+64+4>>2]=0;c[i+64+8>>2]=0;c[i+64+12>>2]=0;f[p>>2]=1.0;j=c[(c[a>>2]|0)+64>>2]|0;k=+f[i+64>>2];l=+f[i+64+4>>2];m=+f[i+64+8>>2];n=k*+f[b+4>>2]+l*+f[b+20>>2]+m*+f[b+36>>2];o=k*+f[b+8>>2]+l*+f[b+24>>2]+m*+f[b+40>>2];f[i+32>>2]=+f[b>>2]*k+ +f[b+16>>2]*l+ +f[b+32>>2]*m;f[i+32+4>>2]=n;f[i+32+8>>2]=o;f[i+32+12>>2]=0.0;Ma[j&127](i+48|0,a,i+32|0);o=+f[i+48>>2];n=+f[i+48+4>>2];m=+f[i+48+8>>2];l=o*+f[b+16>>2]+n*+f[b+20>>2]+m*+f[b+24>>2]+ +f[b+52>>2];k=o*+f[b+32>>2]+n*+f[b+36>>2]+m*+f[b+40>>2]+ +f[b+56>>2];f[i+32>>2]=o*+f[b>>2]+n*+f[b+4>>2]+m*+f[b+8>>2]+ +f[b+48>>2];f[i+32+4>>2]=l;f[i+32+8>>2]=k;f[i+32+12>>2]=0.0;j=i+32+(h<<2)|0;f[e+(h<<2)>>2]=g+ +f[j>>2];f[p>>2]=-1.0;p=c[(c[a>>2]|0)+64>>2]|0;k=+f[i+64>>2];l=+f[i+64+4>>2];m=+f[i+64+8>>2];n=k*+f[b+4>>2]+l*+f[b+20>>2]+m*+f[b+36>>2];o=k*+f[b+8>>2]+l*+f[b+24>>2]+m*+f[b+40>>2];f[i>>2]=+f[b>>2]*k+ +f[b+16>>2]*l+ +f[b+32>>2]*m;f[i+4>>2]=n;f[i+8>>2]=o;f[i+12>>2]=0.0;Ma[p&127](i+16|0,a,i);o=+f[i+16>>2];n=+f[i+16+4>>2];m=+f[i+16+8>>2];l=o*+f[b+16>>2]+n*+f[b+20>>2]+m*+f[b+24>>2]+ +f[b+52>>2];k=o*+f[b+32>>2]+n*+f[b+36>>2]+m*+f[b+40>>2]+ +f[b+56>>2];f[i+32>>2]=o*+f[b>>2]+n*+f[b+4>>2]+m*+f[b+8>>2]+ +f[b+48>>2];f[i+32+4>>2]=l;f[i+32+8>>2]=k;f[i+32+12>>2]=0.0;f[d+(h<<2)>>2]=+f[j>>2]-g;h=h+1|0}while((h|0)!=3);ea=i;return}function Ye(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;k=ea;ea=ea+144|0;i=c[b+12>>2]|0;if(!i){ea=k;return}m=c[d+4>>2]|0;l=c[e+4>>2]|0;c[h+4>>2]=i;f[k+12+128>>2]=999999984306749440.0;d=c[d+12>>2]|0;c[k+12>>2]=c[d>>2];c[k+12+4>>2]=c[d+4>>2];c[k+12+8>>2]=c[d+8>>2];c[k+12+12>>2]=c[d+12>>2];c[k+12+16>>2]=c[d+16>>2];c[k+12+16+4>>2]=c[d+16+4>>2];c[k+12+16+8>>2]=c[d+16+8>>2];c[k+12+16+12>>2]=c[d+16+12>>2];c[k+12+32>>2]=c[d+32>>2];c[k+12+32+4>>2]=c[d+32+4>>2];c[k+12+32+8>>2]=c[d+32+8>>2];c[k+12+32+12>>2]=c[d+32+12>>2];c[k+12+48>>2]=c[d+48>>2];c[k+12+48+4>>2]=c[d+48+4>>2];c[k+12+48+8>>2]=c[d+48+8>>2];c[k+12+48+12>>2]=c[d+48+12>>2];e=c[e+12>>2]|0;c[k+12+64>>2]=c[e>>2];c[k+12+64+4>>2]=c[e+4>>2];c[k+12+64+8>>2]=c[e+8>>2];c[k+12+64+12>>2]=c[e+12>>2];c[k+12+80>>2]=c[e+16>>2];c[k+12+80+4>>2]=c[e+16+4>>2];c[k+12+80+8>>2]=c[e+16+8>>2];c[k+12+80+12>>2]=c[e+16+12>>2];c[k+12+96>>2]=c[e+32>>2];c[k+12+96+4>>2]=c[e+32+4>>2];c[k+12+96+8>>2]=c[e+32+8>>2];c[k+12+96+12>>2]=c[e+32+12>>2];c[k+12+112>>2]=c[e+48>>2];c[k+12+112+4>>2]=c[e+48+4>>2];c[k+12+112+8>>2]=c[e+48+8>>2];c[k+12+112+12>>2]=c[e+48+12>>2];c[k>>2]=10596;c[k+4>>2]=m;c[k+8>>2]=l;ib(k,k+12|0,h,c[g+20>>2]|0,0);do if(a[b+8>>0]|0?(j=c[h+4>>2]|0,c[j+748>>2]|0):0){d=c[j+740>>2]|0;i=c[(c[h+8>>2]|0)+8>>2]|0;if((d|0)==(i|0)){Hd(j,d+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(j,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,i+4|0);break}}while(0);ea=k;return}function Ze(a){a=a|0;var b=0,d=0,e=0,g=0,h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0;b=c[a+752>>2]|0;if((b|0)>0){d=c[a+760>>2]|0;e=0;do{g=c[d+(e*44|0)+8>>2]|0;h=c[d+(e*44|0)+12>>2]|0;i=c[d+(e*44|0)+16>>2]|0;l=+f[g+8>>2];n=+f[g+12>>2];j=+f[g+16>>2];k=+f[h+8>>2]-l;o=+f[h+12>>2]-n;m=+f[h+16>>2]-j;l=+f[i+8>>2]-l;n=+f[i+12>>2]-n;j=+f[i+16>>2]-j;f[d+(e*44|0)+36>>2]=+s(+((k*n-o*l)*(k*n-o*l)+((o*j-m*n)*(o*j-m*n)+(m*l-k*j)*(m*l-k*j))));e=e+1|0}while((e|0)!=(b|0))}d=c[a+712>>2]|0;if((d|0)>0){c[6747]=(c[6747]|0)+1;b=kb((d<<2|3)+16|0)|0;if(!b)g=0;else{c[(b+4+15&-16)+-4>>2]=b;g=b+4+15&-16}hk(g|0,0,d<<2|0)|0;d=c[a+712>>2]|0;if((d|0)>0){b=c[a+720>>2]|0;e=0;do{f[b+(e*104|0)+92>>2]=0.0;e=e+1|0}while((e|0)!=(d|0));i=g;h=g}else{i=g;h=g}}else{i=0;h=0}g=c[a+752>>2]|0;if((g|0)>0){b=c[a+760>>2]|0;d=c[a+720>>2]|0;e=0;do{o=+r(+(+f[b+(e*44|0)+36>>2]));p=c[b+(e*44|0)+8>>2]|0;q=h+(((p-d|0)/104|0)<<2)|0;c[q>>2]=(c[q>>2]|0)+1;f[p+92>>2]=o+ +f[p+92>>2];p=c[b+(e*44|0)+12>>2]|0;q=h+(((p-d|0)/104|0)<<2)|0;c[q>>2]=(c[q>>2]|0)+1;f[p+92>>2]=o+ +f[p+92>>2];p=c[b+(e*44|0)+16>>2]|0;q=h+(((p-d|0)/104|0)<<2)|0;c[q>>2]=(c[q>>2]|0)+1;f[p+92>>2]=o+ +f[p+92>>2];e=e+1|0}while((e|0)!=(g|0));d=c[a+712>>2]|0}if((d|0)>0){e=0;do{b=c[h+(e<<2)>>2]|0;if((b|0)>0){q=(c[a+720>>2]|0)+(e*104|0)+92|0;f[q>>2]=+f[q>>2]/+(b|0)}else f[(c[a+720>>2]|0)+(e*104|0)+92>>2]=0.0;e=e+1|0}while((e|0)!=(d|0));if(!i)return}else if((h|0)==0|(i|0)==0)return;c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);return}function _e(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=+h;var i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0;B=ea;ea=ea+96|0;m=+f[e+4>>2];s=+f[e+20>>2];t=+f[e+36>>2];u=+f[e+8>>2];v=+f[e+24>>2];w=+f[e+40>>2];x=+f[e+12>>2];n=+f[e+28>>2];o=+f[e+44>>2];y=-+f[e+52>>2];z=-+f[e+56>>2];A=-+f[e+60>>2];k=c[b+720>>2]|0;p=+f[k+(d*104|0)+8>>2];q=+f[k+(d*104|0)+12>>2];r=+f[k+(d*104|0)+16>>2];a:do if(g){g=c[b+268>>2]|0;b:do if((g|0)>0){j=c[b+276>>2]|0;i=0;while(1){if((c[j+(i<<2)>>2]|0)==(e|0))break;i=i+1|0;if((i|0)>=(g|0))break b}if((i|0)!=(g|0)){g=k;break a}}while(0);if((g|0)==(c[b+272>>2]|0)?(l=(g|0)==0?1:g<<1,(g|0)<(l|0)):0){if(!l)i=0;else{c[6747]=(c[6747]|0)+1;g=kb((l<<2|3)+16|0)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}g=c[b+268>>2]|0}if((g|0)>0){j=0;do{c[i+(j<<2)>>2]=c[(c[b+276>>2]|0)+(j<<2)>>2];j=j+1|0}while((j|0)!=(g|0))}j=c[b+276>>2]|0;if(j){if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);g=c[b+268>>2]|0}c[b+276>>2]=0}a[b+280>>0]=1;c[b+276>>2]=i;c[b+272>>2]=l}c[(c[b+276>>2]|0)+(g<<2)>>2]=e;c[b+268>>2]=g+1;g=c[b+720>>2]|0}else g=k;while(0);c[B>>2]=g+(d*104|0);c[B+20>>2]=e;f[B+4>>2]=m*y+s*z+t*A+(m*p+s*q+t*r);f[B+8>>2]=u*y+v*z+w*A+(u*p+v*q+w*r);f[B+12>>2]=x*y+n*z+o*A+(x*p+n*q+o*r);f[B+16>>2]=0.0;d=g+(d*104|0)+100|0;a[d>>0]=a[d>>0]|1;f[B+24>>2]=h;_m(b+788|0,B);ea=B;return}function $e(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0;H=ea;ea=ea+32|0;j=+f[b+16>>2];g=+f[b>>2];k=+f[b+20>>2];h=+f[b+4>>2];n=+f[b+24>>2];i=+f[b+8>>2];t=+f[b+32>>2];x=+f[b+36>>2];y=+f[b+40>>2];E=(k-h)*(y-i)-(n-i)*(x-h);F=(n-i)*(t-g)-(j-g)*(y-i);G=(j-g)*(x-h)-(k-h)*(t-g);f[H+16>>2]=E;f[H+16+4>>2]=F;f[H+16+8>>2]=G;f[H+16+12>>2]=0.0;o=+f[a+4>>2];q=+f[a+8>>2];v=+f[a+12>>2];D=E*o+F*q+G*v-(i*G+(g*E+h*F));m=+f[a+20>>2];r=+f[a+24>>2];w=+f[a+28>>2];if(D*(E*m+F*r+G*w-(i*G+(g*E+h*F)))>=0.0){ea=H;return}B=c[a+36>>2]|0;if(D<=0.0&(B&1|0)!=0){ea=H;return}C=D/(D-(E*m+F*r+G*w-(i*G+(g*E+h*F))));if(!(C<+f[a+40>>2])){ea=H;return}A=(G*G+(E*E+F*F))*-9.999999747378752e-05;z=g-(m*C+o*(1.0-C));u=h-(r*C+q*(1.0-C));p=i-(w*C+v*(1.0-C));l=j-(m*C+o*(1.0-C));k=k-(r*C+q*(1.0-C));j=n-(w*C+v*(1.0-C));if(!(G*(k*z-u*l)+(E*(u*j-p*k)+F*(p*l-j*z))>=A)){ea=H;return}i=t-(m*C+o*(1.0-C));h=x-(r*C+q*(1.0-C));g=y-(w*C+v*(1.0-C));if(!(G*(h*l-k*i)+(E*(k*g-j*h)+F*(j*i-g*l))>=A)){ea=H;return}if(!(G*(u*i-h*z)+(E*(h*p-g*u)+F*(g*z-p*i))>=A)){ea=H;return}g=1.0/+s(+(G*G+(E*E+F*F)));f[H+16>>2]=E*g;f[H+16+4>>2]=F*g;f[H+16+8>>2]=G*g;b=c[(c[a>>2]|0)+12>>2]|0;if(D<=0.0&(B&2|0)==0){f[H>>2]=-(E*g);f[H+4>>2]=-(F*g);f[H+8>>2]=-(G*g);f[H+12>>2]=0.0;f[a+40>>2]=+ja[b&3](a,H,C,d,e);ea=H;return}else{f[a+40>>2]=+ja[b&3](a,H+16|0,C,d,e);ea=H;return}}function af(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0;p=ea;ea=ea+48|0;if((g|0)==(d|0)|((d|0)==(e|0)|(e|0)==(g|0))){ea=p;return}l=p;m=l+36|0;do{c[l>>2]=0;l=l+4|0}while((l|0)<(m|0));if(!h)o=c[c[b+880>>2]>>2]|0;else o=h;h=c[b+752>>2]|0;if((h|0)==(c[b+756>>2]|0)?(n=(h|0)==0?1:h<<1,(h|0)<(n|0)):0){if(!n)i=0;else{c[6747]=(c[6747]|0)+1;h=kb((n*44|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[b+752>>2]|0}if((h|0)>0){j=0;do{l=i+(j*44|0)|0;k=(c[b+760>>2]|0)+(j*44|0)|0;m=l+44|0;do{c[l>>2]=c[k>>2];l=l+4|0;k=k+4|0}while((l|0)<(m|0));j=j+1|0}while((j|0)!=(h|0))}h=c[b+760>>2]|0;if(h|0){if(a[b+764>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[b+760>>2]=0}a[b+764>>0]=1;c[b+760>>2]=i;c[b+756>>2]=n;h=c[b+752>>2]|0}l=c[b+760>>2]|0;c[l+(h*44|0)>>2]=0;c[l+(h*44|0)+4>>2]=o;l=l+(h*44|0)+8|0;k=p;m=l+36|0;do{c[l>>2]=c[k>>2];l=l+4|0;k=k+4|0}while((l|0)<(m|0));o=c[b+752>>2]|0;c[b+752>>2]=o+1;n=c[b+760>>2]|0;k=c[b+720>>2]|0;c[n+(o*44|0)+8>>2]=k+(d*104|0);l=c[b+720>>2]|0;c[n+(o*44|0)+12>>2]=l+(e*104|0);m=c[b+720>>2]|0;c[n+(o*44|0)+16>>2]=m+(g*104|0);t=+f[k+(d*104|0)+8>>2];v=+f[k+(d*104|0)+12>>2];q=+f[k+(d*104|0)+16>>2];r=+f[l+(e*104|0)+8>>2]-t;w=+f[l+(e*104|0)+12>>2]-v;u=+f[l+(e*104|0)+16>>2]-q;t=+f[m+(g*104|0)+8>>2]-t;v=+f[m+(g*104|0)+12>>2]-v;q=+f[m+(g*104|0)+16>>2]-q;f[n+(o*44|0)+36>>2]=+s(+((r*v-w*t)*(r*v-w*t)+((w*q-u*v)*(w*q-u*v)+(u*t-r*q)*(u*t-r*q))));a[b+924>>0]=1;ea=p;return}function bf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;i=ea;ea=ea+64|0;h=c[a+24>>2]|0;c[h+(b*80|0)>>2]=c[d>>2];c[h+(b*80|0)+4>>2]=c[d+4>>2];c[h+(b*80|0)+8>>2]=c[d+8>>2];c[h+(b*80|0)+12>>2]=c[d+12>>2];c[h+(b*80|0)+16>>2]=c[d+16>>2];c[h+(b*80|0)+16+4>>2]=c[d+16+4>>2];c[h+(b*80|0)+16+8>>2]=c[d+16+8>>2];c[h+(b*80|0)+16+12>>2]=c[d+16+12>>2];c[h+(b*80|0)+32>>2]=c[d+32>>2];c[h+(b*80|0)+32+4>>2]=c[d+32+4>>2];c[h+(b*80|0)+32+8>>2]=c[d+32+8>>2];c[h+(b*80|0)+32+12>>2]=c[d+32+12>>2];c[h+(b*80|0)+48>>2]=c[d+48>>2];c[h+(b*80|0)+48+4>>2]=c[d+48+4>>2];c[h+(b*80|0)+48+8>>2]=c[d+48+8>>2];c[h+(b*80|0)+48+12>>2]=c[d+48+12>>2];if(!(c[a+64>>2]|0)){h=c[a>>2]|0;h=h+68|0;h=c[h>>2]|0;Ca[h&511](a);ea=i;return}h=c[(c[a+24>>2]|0)+(b*80|0)+64>>2]|0;Pa[c[(c[h>>2]|0)+8>>2]&127](h,d,i+48|0,i+32|0);c[i>>2]=c[i+48>>2];c[i+4>>2]=c[i+48+4>>2];c[i+8>>2]=c[i+48+8>>2];c[i+12>>2]=c[i+48+12>>2];c[i+16>>2]=c[i+32>>2];c[i+16+4>>2]=c[i+32+4>>2];c[i+16+8>>2]=c[i+32+8>>2];c[i+16+12>>2]=c[i+32+12>>2];h=c[a+64>>2]|0;g=c[(c[a+24>>2]|0)+(b*80|0)+76>>2]|0;d=jg(h,g)|0;a:do if(d){e=c[h+8>>2]|0;if((e|0)<=-1){d=c[h>>2]|0;break}if(e){f=0;b=d;while(1){d=c[b+32>>2]|0;f=f+1|0;if(!d){d=b;break a}if((f|0)>=(e|0))break;else b=d}}}else d=0;while(0);c[g>>2]=c[i>>2];c[g+4>>2]=c[i+4>>2];c[g+8>>2]=c[i+8>>2];c[g+12>>2]=c[i+12>>2];c[g+16>>2]=c[i+16>>2];c[g+20>>2]=c[i+20>>2];c[g+24>>2]=c[i+24>>2];c[g+28>>2]=c[i+28>>2];je(h,d,g);h=c[a>>2]|0;h=h+68|0;h=c[h>>2]|0;Ca[h&511](a);ea=i;return}function cf(a,b,d,e,g,h,i,j,k,l,m){a=a|0;b=b|0;d=d|0;e=e|0;g=+g;h=+h;i=+i;j=+j;k=k|0;l=l|0;m=+m;var n=0,o=0.0,p=0.0,q=0,r=0.0,s=0.0;q=ea;ea=ea+208|0;Ko(q+192|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],+f[e>>2],+f[e+4>>2],+f[e+8>>2]);n=(~~((j-i)/(m*.01745329238474369))|0)==0?1:~~((j-i)/(m*.01745329238474369));$y(q+128|0,g,+f[e>>2],+f[e+4>>2],+f[e+8>>2]);m=+DJ(i);_p(q+144|0,+f[q+128>>2],+f[q+128+4>>2],+f[q+128+8>>2],m);vp(q+160|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[q+144>>2],+f[q+144+4>>2],+f[q+144+8>>2]);m=+f[q+192>>2];o=+f[q+192+4>>2];p=+f[q+192+8>>2];$y(q+96|0,h,m,o,p);r=+CJ(i);_p(q+112|0,+f[q+96>>2],+f[q+96+4>>2],+f[q+96+8>>2],r);vp(q+176|0,+f[q+160>>2],+f[q+160+4>>2],+f[q+160+8>>2],+f[q+112>>2],+f[q+112+4>>2],+f[q+112+8>>2]);if(l)Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,q+176|0,k);d=1;while(1){if((d|0)>(n|0))break;r=(j-i)*+(d|0)/+(n|0)+i;$y(q+32|0,g,+f[e>>2],+f[e+4>>2],+f[e+8>>2]);s=+DJ(r);_p(q+48|0,+f[q+32>>2],+f[q+32+4>>2],+f[q+32+8>>2],s);vp(q+64|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[q+48>>2],+f[q+48+4>>2],+f[q+48+8>>2]);$y(q,h,m,o,p);r=+CJ(r);_p(q+16|0,+f[q>>2],+f[q+4>>2],+f[q+8>>2],r);vp(q+80|0,+f[q+64>>2],+f[q+64+4>>2],+f[q+64+8>>2],+f[q+16>>2],+f[q+16+4>>2],+f[q+16+8>>2]);Pa[c[(c[a>>2]|0)+8>>2]&127](a,q+176|0,q+80|0,k);c[q+176>>2]=c[q+80>>2];c[q+176+4>>2]=c[q+80+4>>2];c[q+176+8>>2]=c[q+80+8>>2];c[q+176+12>>2]=c[q+80+12>>2];d=d+1|0}if(!l){ea=q;return}Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,q+176|0,k);ea=q;return}function df(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0;e=+f[b+1192+(d<<2)>>2];i=+f[b+868+(d<<6)>>2];j=+f[b+868+(d<<6)+4>>2];do if(!(i>=j)){if(e3.1415927410125732)g=(i-e)%6.2831854820251465+-6.2831854820251465;else g=(i-e)%6.2831854820251465;else g=(i-e)%6.2831854820251465+6.2831854820251465;g=+r(+g);if(!((j-e)%6.2831854820251465<-3.1415927410125732))if((j-e)%6.2831854820251465>3.1415927410125732)h=(j-e)%6.2831854820251465+-6.2831854820251465;else h=(j-e)%6.2831854820251465;else h=(j-e)%6.2831854820251465+6.2831854820251465;m=g<+r(+h);e=m?e:e+6.2831854820251465;break}if(e>j){if(!((e-j)%6.2831854820251465<-3.1415927410125732))if((e-j)%6.2831854820251465>3.1415927410125732)g=(e-j)%6.2831854820251465+-6.2831854820251465;else g=(e-j)%6.2831854820251465;else g=(e-j)%6.2831854820251465+6.2831854820251465;g=+r(+g);if(!((e-i)%6.2831854820251465<-3.1415927410125732))if((e-i)%6.2831854820251465>3.1415927410125732)h=(e-i)%6.2831854820251465+-6.2831854820251465;else h=(e-i)%6.2831854820251465;else h=(e-i)%6.2831854820251465+6.2831854820251465;m=+r(+h)>2]=e;do if(!(i>j)){if(i>e){c[b+868+(d<<6)+56>>2]=1;e=e-i;f[b+868+(d<<6)+48>>2]=e;if(e>3.1415927410125732){f[b+868+(d<<6)+48>>2]=e+-6.2831854820251465;break}if(!(e<-3.1415927410125732))break;f[b+868+(d<<6)+48>>2]=e+6.2831854820251465;break}if(j>2]=2;e=e-j;f[b+868+(d<<6)+48>>2]=e;if(e>3.1415927410125732){f[b+868+(d<<6)+48>>2]=e+-6.2831854820251465;break}if(e<-3.1415927410125732)f[b+868+(d<<6)+48>>2]=e+6.2831854820251465}else{k=b+868+(d<<6)+56|0;l=34}}else{k=b+868+(d<<6)+56|0;l=34}while(0);if((l|0)==34?(c[k>>2]=0,(a[b+868+(d<<6)+44>>0]|0)==0):0){m=0;return m|0}m=1;return m|0}function ef(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;j=ea;ea=ea+64|0;i=c[a+24>>2]|0;c[i+(b*80|0)>>2]=c[d>>2];c[i+(b*80|0)+4>>2]=c[d+4>>2];c[i+(b*80|0)+8>>2]=c[d+8>>2];c[i+(b*80|0)+12>>2]=c[d+12>>2];c[i+(b*80|0)+16>>2]=c[d+16>>2];c[i+(b*80|0)+16+4>>2]=c[d+16+4>>2];c[i+(b*80|0)+16+8>>2]=c[d+16+8>>2];c[i+(b*80|0)+16+12>>2]=c[d+16+12>>2];c[i+(b*80|0)+32>>2]=c[d+32>>2];c[i+(b*80|0)+32+4>>2]=c[d+32+4>>2];c[i+(b*80|0)+32+8>>2]=c[d+32+8>>2];c[i+(b*80|0)+32+12>>2]=c[d+32+12>>2];c[i+(b*80|0)+48>>2]=c[d+48>>2];c[i+(b*80|0)+48+4>>2]=c[d+48+4>>2];c[i+(b*80|0)+48+8>>2]=c[d+48+8>>2];c[i+(b*80|0)+48+12>>2]=c[d+48+12>>2];if(c[a+64>>2]|0){i=c[(c[a+24>>2]|0)+(b*80|0)+64>>2]|0;Pa[c[(c[i>>2]|0)+8>>2]&127](i,d,j+48|0,j+32|0);c[j>>2]=c[j+48>>2];c[j+4>>2]=c[j+48+4>>2];c[j+8>>2]=c[j+48+8>>2];c[j+12>>2]=c[j+48+12>>2];c[j+16>>2]=c[j+32>>2];c[j+16+4>>2]=c[j+32+4>>2];c[j+16+8>>2]=c[j+32+8>>2];c[j+16+12>>2]=c[j+32+12>>2];i=c[a+64>>2]|0;h=c[(c[a+24>>2]|0)+(b*80|0)+76>>2]|0;d=jg(i,h)|0;a:do if(d){f=c[i+8>>2]|0;if((f|0)<=-1){d=c[i>>2]|0;break}if(f){g=0;b=d;while(1){d=c[b+32>>2]|0;g=g+1|0;if(!d){d=b;break a}if((g|0)>=(f|0))break;else b=d}}}else d=0;while(0);c[h>>2]=c[j>>2];c[h+4>>2]=c[j+4>>2];c[h+8>>2]=c[j+8>>2];c[h+12>>2]=c[j+12>>2];c[h+16>>2]=c[j+16>>2];c[h+20>>2]=c[j+20>>2];c[h+24>>2]=c[j+24>>2];c[h+28>>2]=c[j+28>>2];je(i,d,h)}if(!e){ea=j;return}Ca[c[(c[a>>2]|0)+68>>2]&511](a);ea=j;return}function ff(b,d){b=b|0;d=+d;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0;l=ea;ea=ea+16|0;Fi(14684);e=c[b+232>>2]|0;if((e|0)>0){k=(a[27556]|0)==0;j=0;do{i=c[(c[b+240>>2]|0)+(j<<2)>>2]|0;a:do if(i){g=c[i+216>>2]|0;b:do switch(g|0){case 4:case 2:{if((g|0)==4)break a;break}default:{p=+f[i+312>>2];o=+f[i+316>>2];n=+f[i+320>>2];m=+f[i+472>>2];if(p*p+o*o+n*n>2],n=+f[i+332>>2],o=+f[i+336>>2],p=+f[i+476>>2],m*m+n*n+o*o>2]=+f[i+220>>2]+d;break b}f[i+220>>2]=0.0;if((g&-2|0)!=4){c[i+216>>2]=0;g=0}}}while(0);h=g&-2;do if(k){if((h|0)!=2?!(+f[i+220>>2]>2.0):0)break;if(c[i+204>>2]&3|0){if((h|0)==4)break a;c[i+216>>2]=2;break a}if((g|0)==1){c[i+216>>2]=3;break a}if((g|0)!=2)break a;e=(c[i+260>>2]|0)+2|0;c[i+328>>2]=0;c[i+328+4>>2]=0;c[i+328+8>>2]=0;c[i+328+12>>2]=0;c[i+260>>2]=e;c[i+312>>2]=0;c[i+312+4>>2]=0;c[i+312+8>>2]=0;c[i+312+12>>2]=0;e=c[b+232>>2]|0;break a}while(0);if((h|0)!=4)c[i+216>>2]=1}while(0);j=j+1|0}while((j|0)<(e|0))}e=c[2685]|0;k=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=k;if(k|0){ea=l;return}do if(c[e+4>>2]|0){Y(l|0,0)|0;k=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[l+4>>2]|0)-(c[k+4>>2]|0)+(((c[l>>2]|0)-(c[k>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[e+16>>2]|0)){e=c[2685]|0;break}else{ea=l;return}}while(0);c[2685]=c[e+20>>2];ea=l;return}function gf(b){b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=c[b+4>>2]|0;if((m|0)<=0)return;d=c[b+12>>2]|0;e=0;j=0;do{l=c[(c[d+(e<<2)>>2]|0)+384>>2]|0;j=(j|0)>(l|0)?j:l;e=e+1|0}while((e|0)!=(m|0));e=0;while(1){d=c[d+(e<<2)>>2]|0;if((c[d+852>>2]|0)>0){g=0;do{l=c[(c[d+860>>2]|0)+(g<<2)>>2]|0;Ga[c[(c[l>>2]|0)+8>>2]&15](l,+f[d+452>>2],j);g=g+1|0}while((g|0)<(c[d+852>>2]|0))}e=e+1|0;if((e|0)==(m|0))break;d=c[b+12>>2]|0}if((j|0)>0){h=0;do{i=0;do{d=c[(c[b+12>>2]|0)+(i<<2)>>2]|0;e=c[d+852>>2]|0;if((e|0)>0){g=0;do{l=c[(c[d+860>>2]|0)+(g<<2)>>2]|0;Ea[c[(c[l>>2]|0)+12>>2]&7](l,+f[d+452>>2],1.0);g=g+1|0}while((g|0)!=(e|0))}i=i+1|0}while((i|0)!=(m|0));h=h+1|0}while((h|0)!=(j|0))}l=0;do{k=c[(c[b+12>>2]|0)+(l<<2)>>2]|0;if((c[k+852>>2]|0)>0){g=0;do{d=c[(c[k+860>>2]|0)+(g<<2)>>2]|0;Da[c[(c[d>>2]|0)+16>>2]&31](d,+f[k+452>>2]);d=c[k+860>>2]|0;e=c[d+(g<<2)>>2]|0;a:do if(a[e+152>>0]|0){if(!e)j=d;else{c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);j=c[k+860>>2]|0}d=g+-1|0;e=c[k+852>>2]|0;if((e|0)>0){i=c[j+(g<<2)>>2]|0;g=0;while(1){h=j+(g<<2)|0;if((c[h>>2]|0)==(i|0))break;g=g+1|0;if((g|0)>=(e|0))break a}if((g|0)<(e|0)){c[h>>2]=c[j+(e+-1<<2)>>2];c[(c[k+860>>2]|0)+(e+-1<<2)>>2]=i;c[k+852>>2]=e+-1;e=e+-1|0}}}else{e=c[k+852>>2]|0;d=g}while(0);g=d+1|0}while((g|0)<(e|0))}l=l+1|0}while((l|0)!=(m|0));return}function hf(a,b,d){a=a|0;b=+b;d=+d;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0;u=ea;ea=ea+16|0;k=+f[a+452>>2];p=c[a+192>>2]|0;r=+ha[c[(c[p>>2]|0)+48>>2]&15](p);p=c[a+812>>2]|0;if((p|0)<=0){ea=u;return}s=0;do{q=c[a+820>>2]|0;t=c[q+(s*104|0)>>2]|0;t=(c[t+236>>2]&2|0)==0?0:t;if(t|0){o=+f[t+332>>2];e=+f[q+(s*104|0)+84>>2];j=+f[t+336>>2];m=+f[q+(s*104|0)+80>>2];g=+f[q+(s*104|0)+76>>2];n=+f[t+328>>2];d=k*(o*e-j*m+ +f[t+312>>2]);e=k*(+f[t+316>>2]+(j*g-e*n));g=k*(m*n-o*g+ +f[t+320>>2])}else{d=0.0;e=0.0;g=0.0}l=c[q+(s*104|0)+24>>2]|0;m=+f[l+8>>2];n=+f[l+12>>2];o=+f[l+16>>2];j=m-+f[l+24>>2]-d;i=n-+f[l+28>>2]-e;h=o-+f[l+32>>2]-g;d=+f[q+(s*104|0)+4>>2];e=+f[q+(s*104|0)+8>>2];g=+f[q+(s*104|0)+12>>2];if(j*d+i*e+h*g<=1.1920928955078125e-07?(x=m*d+n*e+o*g+ +f[q+(s*104|0)+20>>2],y=+f[q+(s*104|0)+96>>2],x=(x>2],w=(j-(j-d*(j*d+i*e+h*g))*y+d*x)*b,v=(i-(i-e*(j*d+i*e+h*g))*y+e*x)*b,i=(h-(h-g*(j*d+i*e+h*g))*y+g*x)*b,g=+f[q+(s*104|0)+36>>2]*i+(+f[q+(s*104|0)+28>>2]*w+ +f[q+(s*104|0)+32>>2]*v),h=w*+f[q+(s*104|0)+44>>2]+v*+f[q+(s*104|0)+48>>2]+i*+f[q+(s*104|0)+52>>2],i=w*+f[q+(s*104|0)+60>>2]+v*+f[q+(s*104|0)+64>>2]+i*+f[q+(s*104|0)+68>>2],f[u>>2]=g,f[u+4>>2]=h,f[u+8>>2]=i,f[u+12>>2]=0.0,j=+f[q+(s*104|0)+92>>2],f[l+8>>2]=m-g*j,f[l+12>>2]=n-h*j,f[l+16>>2]=o-i*j,t|0):0)uk(t,u,q+(s*104|0)+76|0);s=s+1|0}while((s|0)!=(p|0));ea=u;return}function jf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0.0;g=ea;ea=ea+224|0;xp(g+192|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],+f[b>>2],+f[b+4>>2],+f[b+8>>2]);_p(g+208|0,+f[g+192>>2],+f[g+192+4>>2],+f[g+192+8>>2],.5);vp(g+160|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],+f[b>>2],+f[b+4>>2],+f[b+8>>2]);_p(g+176|0,+f[g+160>>2],+f[g+160+4>>2],+f[g+160+8>>2],.5);f[g+136>>2]=1.0;f[g+132>>2]=1.0;f[g+128>>2]=1.0;qs(g+144|0,g+136|0,g+132|0,g+128|0);b=0;while(1){if((b|0)==4)break;d=0;while(1){if((d|0)==3)break;i=NJ(g+144|0)|0;k=+f[i>>2];h=NJ(g+208|0)|0;f[g+72>>2]=k*+f[h>>2];f[g+68>>2]=+f[i+4>>2]*+f[h+4>>2];f[g+64>>2]=+f[i+8>>2]*+f[h+8>>2];qs(g+80|0,g+72|0,g+68|0,g+64|0);c[g+112>>2]=c[g+80>>2];c[g+112+4>>2]=c[g+80+4>>2];c[g+112+8>>2]=c[g+80+8>>2];c[g+112+12>>2]=c[g+80+12>>2];Lr(g+112|0,g+176|0)|0;j=i+(((d>>>0)%3|0)<<2)|0;f[j>>2]=-+f[j>>2];f[g+40>>2]=+f[i>>2]*+f[h>>2];f[g+36>>2]=+f[i+4>>2]*+f[h+4>>2];f[g+32>>2]=+f[i+8>>2]*+f[h+8>>2];qs(g+48|0,g+40|0,g+36|0,g+32|0);c[g+96>>2]=c[g+48>>2];c[g+96+4>>2]=c[g+48+4>>2];c[g+96+8>>2]=c[g+48+8>>2];c[g+96+12>>2]=c[g+48+12>>2];Lr(g+96|0,g+176|0)|0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,g+112|0,g+96|0,e);d=d+1|0}f[g+8>>2]=-1.0;f[g+4>>2]=-1.0;f[g>>2]=-1.0;qs(g+16|0,g+8|0,g+4|0,g);c[g+144>>2]=c[g+16>>2];c[g+144+4>>2]=c[g+16+4>>2];c[g+144+8>>2]=c[g+16+8>>2];c[g+144+12>>2]=c[g+16+12>>2];if(b>>>0<3){j=(NJ(g+144|0)|0)+(b<<2)|0;f[j>>2]=-+f[j>>2]}b=b+1|0}ea=g;return}function kf(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0;c[b+4>>2]=1065353216;c[b+8>>2]=1065353216;c[b+12>>2]=1065353216;f[b+16>>2]=0.0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;c[b+48>>2]=0;c[b>>2]=9764;a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;a[b+140>>0]=1;c[b+136>>2]=0;c[b+128>>2]=0;c[b+132>>2]=0;a[b+160>>0]=1;c[b+156>>2]=0;c[b+148>>2]=0;c[b+152>>2]=0;a[b+164>>0]=d&1;a[b+165>>0]=e&1;f[b+168>>2]=0.0;c[6747]=(c[6747]|0)+1;d=kb(51)|0;if(!d)g=0;else{c[(d+4+15&-16)+-4>>2]=d;g=d+4+15&-16}d=c[b+24>>2]|0;if((d|0)>0){e=0;do{h=g+(e<<5)|0;i=(c[b+32>>2]|0)+(e<<5)|0;c[h>>2]=c[i>>2];c[h+4>>2]=c[i+4>>2];c[h+8>>2]=c[i+8>>2];c[h+12>>2]=c[i+12>>2];c[h+16>>2]=c[i+16>>2];c[h+20>>2]=c[i+20>>2];c[h+24>>2]=c[i+24>>2];c[h+28>>2]=c[i+28>>2];e=e+1|0}while((e|0)!=(d|0))}d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=g;c[b+28>>2]=1;i=c[b+24>>2]|0;c[g+(i<<5)>>2]=0;c[g+(i<<5)+4>>2]=0;c[g+(i<<5)+8>>2]=12;c[g+(i<<5)+12>>2]=0;c[g+(i<<5)+16>>2]=0;c[g+(i<<5)+20>>2]=16;c[g+(i<<5)+24>>2]=2;c[g+(i<<5)+28>>2]=0;c[b+24>>2]=(c[b+24>>2]|0)+1;i=(a[b+164>>0]|0)==0;d=c[b+32>>2]|0;c[d>>2]=(c[(i?b+148|0:b+128|0)>>2]|0)/3|0;c[d+4>>2]=0;c[d+24>>2]=i?3:2;c[d+8>>2]=i?6:12;if(!(a[b+165>>0]|0)){h=12;b=(c[b+108>>2]|0)/3|0;i=d+12|0;c[i>>2]=b;i=d+16|0;c[i>>2]=0;i=d+20|0;c[i>>2]=h;return}else{h=16;b=c[b+88>>2]|0;i=d+12|0;c[i>>2]=b;i=d+16|0;c[i>>2]=0;i=d+20|0;c[i>>2]=h;return}}function lf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=ea;ea=ea+32|0;if((b|0)<0)b=c[a+12>>2]|0;d=c[a>>2]|0;if(!((b|0)>0&(d|0)!=0)){ea=m;return}while(1){e=d+40|0;if(c[e>>2]|0){l=0;while(1){k=d+32|0;f=c[k>>2]|0;if(f>>>0>d>>>0){i=(c[f+40>>2]|0)==(d|0);g=c[f+36+(((i^1)&1)<<2)>>2]|0;h=c[f+32>>2]|0;if(!h)j=a;else j=h+36+(((c[h+40>>2]|0)==(f|0)&1)<<2)|0;c[j>>2]=d;c[g+32>>2]=d;c[f+32>>2]=d;c[k>>2]=h;k=d+36|0;c[f+36>>2]=c[k>>2];c[f+40>>2]=c[e>>2];c[(c[k>>2]|0)+32>>2]=f;c[(c[e>>2]|0)+32>>2]=f;c[d+36+((i&1)<<2)>>2]=f;c[d+36+(((i^1)&1)<<2)>>2]=g;c[m>>2]=c[f>>2];c[m+4>>2]=c[f+4>>2];c[m+8>>2]=c[f+8>>2];c[m+12>>2]=c[f+12>>2];c[m+16>>2]=c[f+16>>2];c[m+20>>2]=c[f+20>>2];c[m+24>>2]=c[f+24>>2];c[m+28>>2]=c[f+28>>2];c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];c[f+8>>2]=c[d+8>>2];c[f+12>>2]=c[d+12>>2];c[f+16>>2]=c[d+16>>2];c[f+20>>2]=c[d+20>>2];c[f+24>>2]=c[d+24>>2];c[f+28>>2]=c[d+28>>2];c[d>>2]=c[m>>2];c[d+4>>2]=c[m+4>>2];c[d+8>>2]=c[m+8>>2];c[d+12>>2]=c[m+12>>2];c[d+16>>2]=c[m+16>>2];c[d+20>>2]=c[m+20>>2];c[d+24>>2]=c[m+24>>2];c[d+28>>2]=c[m+28>>2];d=f}e=c[a+16>>2]|0;d=c[d+36+(((l?e>>>l:e)&1)<<2)>>2]|0;e=d+40|0;if(!(c[e>>2]|0))break;else l=l+1&31}}if(!(jg(a,d)|0))e=0;else e=c[a>>2]|0;je(a,e,d);c[a+16>>2]=(c[a+16>>2]|0)+1;b=b+-1|0;if(!b)break;d=c[a>>2]|0}ea=m;return}function mf(b){b=b|0;var d=0,e=0.0,g=0,h=0,i=0.0,j=0.0,k=0;k=ea;ea=ea+64|0;Fi(14854);a:do if(!(a[b+274>>0]|0)){d=c[b+232>>2]|0;if((d|0)>0){h=0;while(1){g=c[(c[b+240>>2]|0)+(h<<2)>>2]|0;switch(c[g+216>>2]|0){case 2:case 5:break;default:if((c[g+480>>2]|0)!=0?(c[g+204>>2]&3|0)==0:0){if((a[b+300>>0]|0)!=0?(j=+f[b+268>>2],j!=0.0):0)e=+f[b+264>>2]-j;else e=+f[b+264>>2]*+f[g+244>>2];ag(g+68|0,+f[g+132>>2],+f[g+136>>2],+f[g+140>>2],g+148|0,e,k);d=c[g+480>>2]|0;Ia[c[(c[d>>2]|0)+12>>2]&127](d,k);d=c[b+232>>2]|0}}h=h+1|0;if((h|0)>=(d|0))break a}}}else{d=c[b+8>>2]|0;if((d|0)>0){h=0;do{g=c[(c[b+16>>2]|0)+(h<<2)>>2]|0;if((!((g|0)==0?1:(c[g+236>>2]&2|0)==0)?(c[g+480>>2]|0)!=0:0)?(c[g+204>>2]&3|0)==0:0){if((a[b+300>>0]|0)!=0?(i=+f[b+268>>2],i!=0.0):0)e=+f[b+264>>2]-i;else e=+f[b+264>>2]*+f[g+244>>2];ag(g+68|0,+f[g+132>>2],+f[g+136>>2],+f[g+140>>2],g+148|0,e,k);d=c[g+480>>2]|0;Ia[c[(c[d>>2]|0)+12>>2]&127](d,k);d=c[b+8>>2]|0}h=h+1|0}while((h|0)<(d|0))}}while(0);d=c[2685]|0;b=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=b;if(b|0){ea=k;return}do if(c[d+4>>2]|0){Y(k|0,0)|0;b=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[k+4>>2]|0)-(c[b+4>>2]|0)+(((c[k>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=k;return}}while(0);c[2685]=c[d+20>>2];ea=k;return}function nf(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0;i=ea;ea=ea+32|0;d=(a[b+8>>0]|0)==0?e:d;if(((c[(c[d+4>>2]|0)+4>>2]|0)+-21|0)>>>0>=9){ea=i;return}e=c[(c[d+8>>2]|0)+192>>2]|0;w=+ha[c[(c[e>>2]|0)+48>>2]&15](e);c[b+64>>2]=g;f[b+68>>2]=w+.05999999865889549;c[b+56>>2]=h;h=c[b+16>>2]|0;Ma[c[(c[h>>2]|0)+28>>2]&127](h,i+16|0,i);w=+f[i>>2];v=+f[i+16>>2];q=+f[i+4>>2];p=+f[i+16+4>>2];y=+f[i+8>>2];x=+f[i+16+8>>2];h=c[d+12>>2]|0;C=+f[h>>2];B=+f[h+16>>2];n=+f[h+32>>2];A=+f[h+4>>2];z=+f[h+20>>2];l=+f[h+36>>2];u=+f[h+8>>2];t=+f[h+24>>2];s=+f[h+40>>2];D=-+f[h+48>>2];j=-+f[h+52>>2];k=-+f[h+56>>2];o=(w+v)*.5*C+(q+p)*.5*B+(y+x)*.5*n+(C*D+B*j+n*k);m=(w+v)*.5*A+(q+p)*.5*z+(y+x)*.5*l+(A*D+z*j+l*k);k=(w+v)*.5*u+(q+p)*.5*t+(y+x)*.5*s+(u*D+t*j+s*k);j=+f[b+68>>2];n=+r(+(n+(C*0.0+B*0.0)))*((y-x)*.5+j)+(+r(+(C+B*0.0+n*0.0))*((w-v)*.5+j)+ +r(+(C*0.0+B+n*0.0))*((q-p)*.5+j));l=+r(+(l+(A*0.0+z*0.0)))*((y-x)*.5+j)+(+r(+(A+z*0.0+l*0.0))*((w-v)*.5+j)+ +r(+(A*0.0+z+l*0.0))*((q-p)*.5+j));j=+r(+(s+(u*0.0+t*0.0)))*((y-x)*.5+j)+(+r(+(u+t*0.0+s*0.0))*((w-v)*.5+j)+ +r(+(u*0.0+t+s*0.0))*((q-p)*.5+j));f[b+24>>2]=o-n;f[b+28>>2]=m-l;f[b+32>>2]=k-j;f[b+36>>2]=0.0;f[b+40>>2]=o+n;f[b+44>>2]=m+l;f[b+48>>2]=k+j;f[b+52>>2]=0.0;Pa[c[(c[e>>2]|0)+64>>2]&127](e,b+12|0,b+24|0,b+40|0);ea=i;return}function of(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;k=ea;ea=ea+16|0;c[b+8>>2]=0;c[b+12>>2]=1065353216;c[b+16>>2]=1065353216;c[b+20>>2]=1065353216;f[b+24>>2]=0.0;f[b+44>>2]=.03999999910593033;c[b+52>>2]=0;c[b+56>>2]=1065353216;c[b+60>>2]=1065353216;c[b+64>>2]=1065353216;f[b+68>>2]=0.0;c[b+72>>2]=-1082130432;c[b+76>>2]=-1082130432;c[b+80>>2]=-1082130432;f[b+84>>2]=0.0;a[b+88>>0]=0;c[b>>2]=8568;a[b+108>>0]=1;c[b+104>>2]=0;c[b+96>>2]=0;c[b+100>>2]=0;c[b+4>>2]=4;if((e|0)<=0){c[b+96>>2]=e;Bi(b);ea=k;return}c[6747]=(c[6747]|0)+1;h=kb((e<<4|3)+16|0)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}h=c[b+96>>2]|0;if((h|0)>0){i=0;do{l=j+(i<<4)|0;m=(c[b+104>>2]|0)+(i<<4)|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];i=i+1|0}while((i|0)!=(h|0))}h=c[b+104>>2]|0;if(h|0){if(a[b+108>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[b+104>>2]=0}a[b+108>>0]=1;c[b+104>>2]=j;c[b+100>>2]=e;c[j>>2]=c[k>>2];c[j+4>>2]=c[k+4>>2];c[j+8>>2]=c[k+8>>2];c[j+12>>2]=c[k+12>>2];if((e|0)!=1){h=1;do{m=(c[b+104>>2]|0)+(h<<4)|0;c[m>>2]=c[k>>2];c[m+4>>2]=c[k+4>>2];c[m+8>>2]=c[k+8>>2];c[m+12>>2]=c[k+12>>2];h=h+1|0}while((h|0)!=(e|0))}c[b+96>>2]=e;i=0;h=d;while(1){d=c[h+4>>2]|0;l=c[h+8>>2]|0;m=c[b+104>>2]|0;c[m+(i<<4)>>2]=c[h>>2];c[m+(i<<4)+4>>2]=d;c[m+(i<<4)+8>>2]=l;f[m+(i<<4)+12>>2]=0.0;i=i+1|0;if((i|0)==(e|0))break;else h=h+g|0}Bi(b);ea=k;return}function pf(b,d,e,f,g,h,i,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0;m=ea;ea=ea+16|0;if(!((c[b+924>>2]|0)==0?(a[b+912>>0]|0)==0:0)){c[m>>2]=c[b+1208>>2];c[m+4>>2]=c[b+1208+4>>2];c[m+8>>2]=c[b+1208+8>>2];c[m+12>>2]=c[b+1208+12>>2];l=c[b+1304>>2]|0;if(!(l&512))c[b+896>>2]=c[c[d+32>>2]>>2];if(!(l&1024))c[b+904>>2]=c[c[d+32>>2]>>2];if(!(l&2048))c[b+900>>2]=c[d+4>>2];e=(xc(b,b+868|0,f,g,h,i,j,k,d,e,m,1,0)|0)+e|0}if(!((c[b+988>>2]|0)==0?(a[b+976>>0]|0)==0:0)){c[m>>2]=c[b+1224>>2];c[m+4>>2]=c[b+1224+4>>2];c[m+8>>2]=c[b+1224+8>>2];c[m+12>>2]=c[b+1224+12>>2];l=c[b+1304>>2]|0;if(!(l&4096))c[b+960>>2]=c[c[d+32>>2]>>2];if(!(l&8192))c[b+968>>2]=c[c[d+32>>2]>>2];if(!(l&16384))c[b+964>>2]=c[d+4>>2];e=(xc(b,b+932|0,f,g,h,i,j,k,d,e,m,1,0)|0)+e|0}if((c[b+1052>>2]|0)==0?(a[b+1040>>0]|0)==0:0){g=e;ea=m;return g|0}c[m>>2]=c[b+1240>>2];c[m+4>>2]=c[b+1240+4>>2];c[m+8>>2]=c[b+1240+8>>2];c[m+12>>2]=c[b+1240+12>>2];l=c[b+1304>>2]|0;if(!(l&32768))c[b+1024>>2]=c[c[d+32>>2]>>2];if(!(l&65536))c[b+1032>>2]=c[c[d+32>>2]>>2];if(!(l&131072))c[b+1028>>2]=c[d+4>>2];g=(xc(b,b+996|0,f,g,h,i,j,k,d,e,m,1,0)|0)+e|0;ea=m;return g|0}function qf(b){b=b|0;var d=0;c[b>>2]=5872;d=c[b+176>>2]|0;if(d|0){if(a[b+180>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+176>>2]=0}a[b+180>>0]=1;c[b+176>>2]=0;c[b+168>>2]=0;c[b+172>>2]=0;d=c[b+156>>2]|0;if(d|0){if(a[b+160>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+156>>2]=0}a[b+160>>0]=1;c[b+156>>2]=0;c[b+148>>2]=0;c[b+152>>2]=0;d=c[b+136>>2]|0;if(d|0){if(a[b+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+136>>2]=0}a[b+140>>0]=1;c[b+136>>2]=0;c[b+128>>2]=0;c[b+132>>2]=0;d=c[b+116>>2]|0;if(d|0){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+116>>2]=0}a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;d=c[b+96>>2]|0;if(d|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;d=c[b+76>>2]|0;if(d|0){if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+76>>2]=0}a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;c[b+72>>2]=0;d=c[b+56>>2]|0;if(d|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function rf(a,b,e){a=a|0;b=b|0;e=e|0;ie(a,b,e)|0;c[b+256>>2]=c[a+264>>2];c[b+260>>2]=c[a+268>>2];c[b+264>>2]=c[a+272>>2];c[b+268>>2]=c[a+276>>2];c[b+272>>2]=c[a+280>>2];c[b+276>>2]=c[a+284>>2];c[b+280>>2]=c[a+288>>2];c[b+284>>2]=c[a+292>>2];c[b+288>>2]=c[a+296>>2];c[b+292>>2]=c[a+300>>2];c[b+296>>2]=c[a+304>>2];c[b+300>>2]=c[a+308>>2];c[b+304>>2]=c[a+312>>2];c[b+308>>2]=c[a+316>>2];c[b+312>>2]=c[a+320>>2];c[b+316>>2]=c[a+324>>2];c[b+320>>2]=c[a+328>>2];c[b+324>>2]=c[a+332>>2];c[b+328>>2]=c[a+336>>2];c[b+332>>2]=c[a+340>>2];c[b+448>>2]=c[a+344>>2];c[b+336>>2]=c[a+544>>2];c[b+340>>2]=c[a+548>>2];c[b+344>>2]=c[a+552>>2];c[b+348>>2]=c[a+556>>2];c[b+352>>2]=c[a+348>>2];c[b+356>>2]=c[a+352>>2];c[b+360>>2]=c[a+356>>2];c[b+364>>2]=c[a+360>>2];c[b+368>>2]=c[a+364>>2];c[b+372>>2]=c[a+368>>2];c[b+376>>2]=c[a+372>>2];c[b+380>>2]=c[a+376>>2];c[b+384>>2]=c[a+380>>2];c[b+388>>2]=c[a+384>>2];c[b+392>>2]=c[a+388>>2];c[b+396>>2]=c[a+392>>2];c[b+400>>2]=c[a+396>>2];c[b+404>>2]=c[a+400>>2];c[b+408>>2]=c[a+404>>2];c[b+412>>2]=c[a+408>>2];c[b+416>>2]=c[a+412>>2];c[b+420>>2]=c[a+416>>2];c[b+424>>2]=c[a+420>>2];c[b+428>>2]=c[a+424>>2];c[b+432>>2]=c[a+428>>2];c[b+436>>2]=c[a+432>>2];c[b+440>>2]=c[a+436>>2];c[b+444>>2]=c[a+440>>2];c[b+452>>2]=c[a+444>>2];c[b+456>>2]=c[a+448>>2];c[b+484>>2]=d[a+452>>0];c[b+460>>2]=c[a+456>>2];c[b+464>>2]=c[a+460>>2];c[b+468>>2]=c[a+464>>2];c[b+472>>2]=c[a+468>>2];c[b+476>>2]=c[a+472>>2];c[b+480>>2]=c[a+476>>2];return 14480}function sf(b,d,e,g,h){b=b|0;d=+d;e=e|0;g=g|0;h=h|0;var i=0;i=ea;ea=ea+144|0;c[b+164>>2]=1065353216;c[b+168>>2]=1065353216;c[b+172>>2]=1065353216;f[b+176>>2]=0.0;c[b+180>>2]=0;f[b+184>>2]=999999984306749440.0;c[b+188>>2]=0;c[b+188+4>>2]=0;c[b+188+8>>2]=0;c[b+188+12>>2]=0;c[b+204>>2]=1;c[b+208>>2]=-1;c[b+212>>2]=-1;c[b+216>>2]=1;f[b+220>>2]=0.0;f[b+224>>2]=.5;f[b+228>>2]=0.0;f[b+232>>2]=0.0;c[b+236>>2]=1;c[b+240>>2]=0;f[b+244>>2]=1.0;c[b+248>>2]=0;c[b+248+4>>2]=0;c[b+248+8>>2]=0;c[b+248+12>>2]=0;c[b+4>>2]=1065353216;c[b+8>>2]=0;c[b+8+4>>2]=0;c[b+8+8>>2]=0;c[b+8+12>>2]=0;c[b+24>>2]=1065353216;c[b+28>>2]=0;c[b+28+4>>2]=0;c[b+28+8>>2]=0;c[b+28+12>>2]=0;c[b+44>>2]=1065353216;c[b+48>>2]=0;c[b+48+4>>2]=0;c[b+48+8>>2]=0;c[b+48+12>>2]=0;c[b+48+16>>2]=0;c[b>>2]=5172;a[b+500>>0]=1;c[b+496>>2]=0;c[b+488>>2]=0;c[b+492>>2]=0;f[i>>2]=d;c[i+4>>2]=e;c[i+72>>2]=g;c[i+76>>2]=c[h>>2];c[i+76+4>>2]=c[h+4>>2];c[i+76+8>>2]=c[h+8>>2];c[i+76+12>>2]=c[h+12>>2];f[i+92>>2]=0.0;f[i+96>>2]=0.0;f[i+100>>2]=.5;f[i+104>>2]=0.0;f[i+108>>2]=0.0;f[i+112>>2]=.800000011920929;f[i+116>>2]=1.0;a[i+120>>0]=0;f[i+124>>2]=.004999999888241291;f[i+128>>2]=.009999999776482582;f[i+132>>2]=.009999999776482582;f[i+136>>2]=.009999999776482582;c[i+8>>2]=1065353216;c[i+12>>2]=0;c[i+12+4>>2]=0;c[i+12+8>>2]=0;c[i+12+12>>2]=0;c[i+28>>2]=1065353216;c[i+32>>2]=0;c[i+32+4>>2]=0;c[i+32+8>>2]=0;c[i+32+12>>2]=0;c[i+48>>2]=1065353216;c[i+52>>2]=0;c[i+52+4>>2]=0;c[i+52+8>>2]=0;c[i+52+12>>2]=0;c[i+52+16>>2]=0;Cc(b,i);ea=i;return}function tf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0;y=ea;ea=ea+48|0;u=+f[e>>2];v=+f[d>>2];w=+f[e+4>>2];x=+f[d+4>>2];t=+f[e+8>>2];i=+f[d+8>>2];j=+s(+((u-v)*.5*((u-v)*.5)+(w-x)*.5*((w-x)*.5)+(t-i)*.5*((t-i)*.5)));k=+f[a+56>>2];if(+r(+k)>.7071067690849304){z=+f[a+52>>2];q=1.0/+s(+(k*k+z*z));A=+f[a+48>>2];g=A;h=z;l=A*-(k*q);m=0.0;n=-(k*q);o=z*q;p=(k*k+z*z)*q;q=-(A*(z*q))}else{p=+f[a+48>>2];A=+f[a+52>>2];q=1.0/+s(+(p*p+A*A));g=p;h=A;l=(p*p+A*A)*q;m=-(A*q);n=p*q;o=0.0;p=-(k*(p*q));q=k*-(A*q)}A=k*((t+i)*.5)+((u+v)*.5*g+(w+x)*.5*h)-+f[a+64>>2];w=(w+x)*.5-h*A;h=(u+v)*.5-g*A;m=j*m;v=j*n;z=j*o;p=j*p;u=j*q;x=j*l;f[y>>2]=p+(m+h);f[y+4>>2]=u+(v+w);f[y+8>>2]=x+(z+((t+i)*.5-k*A));f[y+12>>2]=0.0;f[y+16>>2]=m+h-p;f[y+20>>2]=v+w-u;f[y+24>>2]=z+((t+i)*.5-k*A)-x;f[y+28>>2]=0.0;f[y+32>>2]=h-m-p;f[y+36>>2]=w-v-u;f[y+40>>2]=(t+i)*.5-k*A-z-x;f[y+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,y,0,0);f[y>>2]=h-m-p;f[y+4>>2]=w-v-u;f[y+8>>2]=(t+i)*.5-k*A-z-x;f[y+12>>2]=0.0;f[y+16>>2]=p+(h-m);f[y+20>>2]=u+(w-v);f[y+24>>2]=x+((t+i)*.5-k*A-z);f[y+28>>2]=0.0;f[y+32>>2]=p+(m+h);f[y+36>>2]=u+(v+w);f[y+40>>2]=x+(z+((t+i)*.5-k*A));f[y+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,y,0,1);ea=y;return}function uf(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;Uc(b,d);c[b>>2]=4132;c[6747]=(c[6747]|0)+1;e=kb(27)|0;i=e+4+15&-16;c[i+-4>>2]=e;a[i+4>>0]=0;c[(e+4+15&-16)>>2]=4164;c[b+92>>2]=i;c[6747]=(c[6747]|0)+1;i=kb(27)|0;e=i+4+15&-16;c[e+-4>>2]=i;a[e+4>>0]=0;c[(i+4+15&-16)>>2]=4184;c[b+96>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e>>2]=4184;c[b+100>>2]=e;a[e+4>>0]=1;c[6747]=(c[6747]|0)+1;i=kb(27)|0;e=i+4+15&-16;c[e+-4>>2]=i;a[e+4>>0]=0;c[(i+4+15&-16)>>2]=4204;c[b+104>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e>>2]=4224;c[b+108>>2]=e;a[e+4>>0]=1;if(!(a[b+20>>0]|0))return;e=c[b+16>>2]|0;if(!e)return;if((c[e>>2]|0)>=156)return;f=c[e+16>>2]|0;if(f){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0);e=c[b+16>>2]|0;if(!e)i=b+16|0;else{f=b+16|0;g=11}}else{f=b+16|0;g=11}if((g|0)==11){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);i=f}c[6747]=(c[6747]|0)+1;e=kb(39)|0;if(!e)h=0;else{c[(e+4+15&-16)+-4>>2]=e;h=e+4+15&-16}e=c[d+12>>2]|0;c[h>>2]=156;f=h+4|0;c[f>>2]=e;c[6747]=(c[6747]|0)+1;e=kb((e*156|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[h+16>>2]=e;c[h+12>>2]=e;f=c[f>>2]|0;c[h+8>>2]=f;if(f+-1|0){b=c[h>>2]|0;g=f+-1|0;d=e;do{j=d;d=d+b|0;c[j>>2]=d;g=g+-1|0}while((g|0)!=0);e=e+(z(b,f+-1|0)|0)|0}c[e>>2]=0;c[i>>2]=h;return}function vf(b,d,e,f){b=b|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;l=c[d>>2]|0;l=ta[c[(c[l>>2]|0)+56>>2]&31](l,48)|0;c[l+4>>2]=c[d>>2];c[l>>2]=7340;a[l+28>>0]=1;c[l+24>>2]=0;c[l+16>>2]=0;c[l+20>>2]=0;c[l+32>>2]=c[d+4>>2];a[l+36>>0]=0;c[6747]=(c[6747]|0)+1;b=kb(87)|0;if(!b)k=0;else{c[(b+4+15&-16)+-4>>2]=b;k=b+4+15&-16}c[k>>2]=10636;h=k+20|0;a[h>>0]=1;j=k+16|0;c[j>>2]=0;d=k+8|0;c[d>>2]=0;i=k+12|0;c[i>>2]=0;a[k+24>>0]=0;a[k+44>>0]=1;c[k+40>>2]=0;c[k+32>>2]=0;c[k+36>>2]=0;a[k+64>>0]=1;c[k+60>>2]=0;c[k+52>>2]=0;c[k+56>>2]=0;c[6747]=(c[6747]|0)+1;b=kb(43)|0;if(!b)g=0;else{c[(b+4+15&-16)+-4>>2]=b;g=b+4+15&-16}b=c[d>>2]|0;if((b|0)>0){d=0;do{m=g+(d*12|0)|0;n=(c[j>>2]|0)+(d*12|0)|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];d=d+1|0}while((d|0)!=(b|0))}b=c[j>>2]|0;if(!b){a[h>>0]=1;c[j>>2]=g;c[i>>2]=2;He(k);n=l+8|0;c[n>>2]=k;n=e+4|0;n=c[n>>2]|0;n=n+68|0;n=c[n>>2]|0;m=l+40|0;c[m>>2]=n;m=f+4|0;m=c[m>>2]|0;m=m+68|0;m=c[m>>2]|0;n=l+44|0;c[n>>2]=m;return l|0}if(a[h>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}c[j>>2]=0;a[h>>0]=1;c[j>>2]=g;c[i>>2]=2;He(k);n=l+8|0;c[n>>2]=k;n=e+4|0;n=c[n>>2]|0;n=n+68|0;n=c[n>>2]|0;m=l+40|0;c[m>>2]=n;m=f+4|0;m=c[m>>2]|0;m=m+68|0;m=c[m>>2]|0;n=l+44|0;c[n>>2]=m;return l|0}function wf(a,b,d){a=a|0;b=b|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;c[6733]=(c[6733]|0)+1;g=(d<<16|b)+~((d<<16|b)<<15)|0;g=((10?g>>10:g)^g)*9|0;g=(6?g>>6:g)^g;l=c[a+40>>2]|0;g=l+(((c[a+12>>2]|0)+-1&((16?g+~(g<<11)>>16:g+~(g<<11)|0)^g+~(g<<11)))<<2)|0;f=c[g>>2]|0;if((f|0)==-1){n=0;return n|0}m=c[a+16>>2]|0;e=f;while(1){k=m+(e*12|0)|0;if((c[k>>2]|0)==(b|0)?(c[m+(e*12|0)+4>>2]|0)==(d|0):0)break;e=c[(c[a+60>>2]|0)+(e<<2)>>2]|0;if((e|0)==-1){e=0;n=23;break}}if((n|0)==23)return e|0;if(!k){n=0;return n|0}j=c[m+(e*12|0)+8>>2]|0;i=(e*12|0)/12|0;h=c[a+60>>2]|0;if((f|0)!=(i|0)){d=f;while(1){b=h+(d<<2)|0;e=c[b>>2]|0;if((e|0)==(i|0))break;else d=e}e=c[h+(i<<2)>>2]|0;if((d|0)==-1)n=12;else c[b>>2]=e}else{e=c[h+(f<<2)>>2]|0;n=12}if((n|0)==12)c[g>>2]=e;g=(c[a+8>>2]|0)+-1|0;if((g|0)==(i|0)){c[a+8>>2]=i;n=j;return n|0}f=c[m+(g*12|0)+4>>2]<<16|c[m+(g*12|0)>>2];f=((10?f+~(f<<15)>>10:f+~(f<<15)|0)^f+~(f<<15))*9|0;f=(6?f>>6:f)^f;f=((16?f+~(f<<11)>>16:f+~(f<<11)|0)^f+~(f<<11))&(c[a+12>>2]|0)+-1;e=c[l+(f<<2)>>2]|0;if((e|0)!=(g|0)){d=e;while(1){b=h+(d<<2)|0;e=c[b>>2]|0;if((e|0)==(g|0))break;else d=e}e=c[h+(g<<2)>>2]|0;if((d|0)==-1)n=21;else c[b>>2]=e}else{e=c[h+(g<<2)>>2]|0;n=21}if((n|0)==21)c[l+(f<<2)>>2]=e;c[k>>2]=c[m+(g*12|0)>>2];c[k+4>>2]=c[m+(g*12|0)+4>>2];c[k+8>>2]=c[m+(g*12|0)+8>>2];n=(c[a+40>>2]|0)+(f<<2)|0;c[(c[a+60>>2]|0)+(i<<2)>>2]=c[n>>2];c[n>>2]=i;c[a+8>>2]=(c[a+8>>2]|0)+-1;n=j;return n|0}function xf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;Ca[c[(c[b>>2]|0)+32>>2]&511](b);e=va[c[(c[b>>2]|0)+16>>2]&63](b,104,1)|0;d=c[e+8>>2]|0;f=d;g=f+104|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[d+88>>2]=c[a+248>>2];c[d+92>>2]=c[a+252>>2];c[d+96>>2]=c[a+256>>2];c[d+100>>2]=c[a+260>>2];c[d>>2]=c[a+92>>2];c[d+4>>2]=c[a+96>>2];c[d+8>>2]=c[a+100>>2];c[d+12>>2]=c[a+104>>2];c[d+16>>2]=c[a+108>>2];c[d+20>>2]=c[a+116>>2];c[d+24>>2]=c[a+120>>2];c[d+28>>2]=c[a+124>>2];c[d+32>>2]=c[a+128>>2];c[d+36>>2]=c[a+132>>2];c[d+40>>2]=c[a+140>>2];c[d+44>>2]=c[a+144>>2];c[d+48>>2]=c[a+148>>2];c[d+52>>2]=c[a+152>>2];c[d+56>>2]=c[a+168>>2];c[d+60>>2]=c[a+172>>2];c[d+64>>2]=c[a+112>>2];c[d+68>>2]=c[a+156>>2];c[d+72>>2]=c[a+160>>2];c[d+76>>2]=c[a+164>>2];c[d+80>>2]=c[a+136>>2];Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,14893,1145853764,d);d=c[a+8>>2]|0;if((d|0)<=0){ri(a,b);nc(a,b);a=c[b>>2]|0;a=a+36|0;a=c[a>>2]|0;Ca[a&511](b);return}f=0;do{e=c[(c[a+16>>2]|0)+(f<<2)>>2]|0;if(c[e+236>>2]&8){g=ra[c[(c[e>>2]|0)+16>>2]&127](e)|0;g=va[c[(c[b>>2]|0)+16>>2]&63](b,g,1)|0;d=va[c[(c[e>>2]|0)+20>>2]&63](e,c[g+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,g,d,1497645651,e);d=c[a+8>>2]|0}f=f+1|0}while((f|0)<(d|0));ri(a,b);nc(a,b);a=c[b>>2]|0;a=a+36|0;a=c[a>>2]|0;Ca[a&511](b);return}function yf(a,b){a=a|0;b=+b;var d=0,e=0,g=0,h=0,i=0.0,j=0.0,k=0.0;h=ea;ea=ea+32|0;d=c[a+8>>2]|0;if((d|0)<=0){ea=h;return}g=0;do{e=c[(c[a+16>>2]|0)+(g<<2)>>2]|0;if((!((e|0)==0?1:(c[e+236>>2]&2|0)==0)?(c[e+216>>2]|0)!=2:0)?!(b==0.0?1:(c[e+204>>2]&2|0)==0):0){d=c[e+480>>2]|0;if(!d)d=e+4|0;else{Ia[c[(c[d>>2]|0)+8>>2]&127](d,e+4|0);d=e+4|0}j=1.0/b*(+f[e+56>>2]-+f[e+120>>2]);k=1.0/b*(+f[e+60>>2]-+f[e+124>>2]);f[e+312>>2]=1.0/b*(+f[e+52>>2]-+f[e+116>>2]);f[e+316>>2]=j;f[e+320>>2]=k;f[e+324>>2]=0.0;Ee(e+68|0,d,h+8|0,h);k=+f[h>>2];j=1.0/b*(k*+f[h+8+4>>2]);i=1.0/b*(k*+f[h+8+8>>2]);f[e+328>>2]=1.0/b*(+f[h+8>>2]*k);f[e+332>>2]=j;f[e+336>>2]=i;f[e+340>>2]=0.0;c[e+132>>2]=c[e+312>>2];c[e+132+4>>2]=c[e+312+4>>2];c[e+132+8>>2]=c[e+312+8>>2];c[e+132+12>>2]=c[e+312+12>>2];c[e+148>>2]=c[e+328>>2];c[e+148+4>>2]=c[e+328+4>>2];c[e+148+8>>2]=c[e+328+8>>2];c[e+148+12>>2]=c[e+328+12>>2];c[e+68>>2]=c[d>>2];c[e+68+4>>2]=c[d+4>>2];c[e+68+8>>2]=c[d+8>>2];c[e+68+12>>2]=c[d+12>>2];c[e+84>>2]=c[e+20>>2];c[e+84+4>>2]=c[e+20+4>>2];c[e+84+8>>2]=c[e+20+8>>2];c[e+84+12>>2]=c[e+20+12>>2];c[e+100>>2]=c[e+36>>2];c[e+100+4>>2]=c[e+36+4>>2];c[e+100+8>>2]=c[e+36+8>>2];c[e+100+12>>2]=c[e+36+12>>2];c[e+116>>2]=c[e+52>>2];c[e+116+4>>2]=c[e+52+4>>2];c[e+116+8>>2]=c[e+52+8>>2];c[e+116+12>>2]=c[e+52+12>>2];d=c[a+8>>2]|0}g=g+1|0}while((g|0)<(d|0));ea=h;return}function zf(b,d){b=b|0;d=d|0;var e=0;e=xs()|0;c[e+4>>2]=5;c[e>>2]=5660;c[e+8>>2]=-1;c[e+12>>2]=-1;f[e+16>>2]=3402823466385288598117041.0e14;a[e+20>>0]=1;a[e+21>>0]=0;c[e+24>>2]=-1;c[e+28>>2]=b;Jk();c[e+32>>2]=25640;f[e+36>>2]=0.0;f[e+40>>2]=.30000001192092896;c[e+44>>2]=0;c[e>>2]=5764;c[e+300>>2]=c[d>>2];c[e+300+4>>2]=c[d+4>>2];c[e+300+8>>2]=c[d+8>>2];c[e+300+12>>2]=c[d+12>>2];c[e+316>>2]=c[d+16>>2];c[e+316+4>>2]=c[d+16+4>>2];c[e+316+8>>2]=c[d+16+8>>2];c[e+316+12>>2]=c[d+16+12>>2];c[e+332>>2]=c[d+32>>2];c[e+332+4>>2]=c[d+32+4>>2];c[e+332+8>>2]=c[d+32+8>>2];c[e+332+12>>2]=c[d+32+12>>2];c[e+348>>2]=c[d+48>>2];c[e+348+4>>2]=c[d+48+4>>2];c[e+348+8>>2]=c[d+48+8>>2];c[e+348+12>>2]=c[d+48+12>>2];a[e+527>>0]=0;c[e+364>>2]=c[e+300>>2];c[e+364+4>>2]=c[e+300+4>>2];c[e+364+8>>2]=c[e+300+8>>2];c[e+364+12>>2]=c[e+300+12>>2];c[e+380>>2]=c[e+316>>2];c[e+380+4>>2]=c[e+316+4>>2];c[e+380+8>>2]=c[e+316+8>>2];c[e+380+12>>2]=c[e+316+12>>2];c[e+396>>2]=c[e+332>>2];c[e+396+4>>2]=c[e+332+4>>2];c[e+396+8>>2]=c[e+332+8>>2];c[e+396+12>>2]=c[e+332+12>>2];a[e+524>>0]=0;a[e+525>>0]=0;a[e+526>>0]=0;a[e+552>>0]=0;c[e+412>>2]=0;c[e+412+4>>2]=0;c[e+412+8>>2]=0;c[e+412+12>>2]=0;f[e+572>>2]=-1.0;f[e+444>>2]=999999984306749440.0;f[e+448>>2]=999999984306749440.0;f[e+452>>2]=999999984306749440.0;f[e+428>>2]=1.0;f[e+432>>2]=.30000001192092896;f[e+436>>2]=1.0;f[e+440>>2]=.009999999776482582;f[e+456>>2]=.05000000074505806;c[e+592>>2]=0;f[e+596>>2]=0.0;f[e+600>>2]=.699999988079071;f[e+604>>2]=0.0;return e|0}function Af(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,t=0;t=ea;ea=ea+32|0;r=c[a+12>>2]|0;if(!r){ea=t;return}c[g+4>>2]=r;a=c[b+4>>2]|0;e=c[d+4>>2]|0;b=c[b+12>>2]|0;d=c[d+12>>2]|0;n=+f[d+48>>2];h=+f[b+48>>2]-n;o=+f[d+52>>2];i=+f[b+52>>2]-o;l=+f[d+56>>2];k=+f[b+56>>2]-l;m=+s(+(h*h+i*i+k*k));q=+f[e+28>>2]*+f[e+12>>2];p=+f[a+28>>2]*+f[a+12>>2]+q;if(m>p){if(!(c[r+748>>2]|0)){ea=t;return}e=c[r+740>>2]|0;a=c[(c[g+8>>2]|0)+8>>2]|0;if((e|0)==(a|0)){Hd(r,e+4|0,(c[(c[g+12>>2]|0)+8>>2]|0)+4|0);ea=t;return}else{Hd(r,(c[(c[g+12>>2]|0)+8>>2]|0)+4|0,a+4|0);ea=t;return}}c[t+16>>2]=1065353216;c[t+16+4>>2]=0;c[t+16+8>>2]=0;f[t+16+12>>2]=0.0;if(m>1.1920928955078125e-07){f[t+16>>2]=h*(1.0/m);f[t+16+4>>2]=i*(1.0/m);f[t+16+8>>2]=k*(1.0/m);f[t+16+12>>2]=0.0;j=h*(1.0/m);i=i*(1.0/m);h=k*(1.0/m)}else{j=1.0;i=0.0;h=0.0}f[t>>2]=n+q*j;f[t+4>>2]=o+q*i;f[t+8>>2]=l+q*h;f[t+12>>2]=0.0;Na[c[(c[g>>2]|0)+16>>2]&15](g,t+16|0,t,m-p);e=c[g+4>>2]|0;do if(c[e+748>>2]|0){a=c[e+740>>2]|0;b=c[(c[g+8>>2]|0)+8>>2]|0;if((a|0)==(b|0)){Hd(e,a+4|0,(c[(c[g+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(e,(c[(c[g+12>>2]|0)+8>>2]|0)+4|0,b+4|0);break}}while(0);ea=t;return}function Bf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=c[b+236>>2]|0;if((b|0)==0|(d|0)!=8){if(!((b|0)==0|(d&2|0)==0)){Ia[c[(c[a>>2]|0)+92>>2]&127](a,b);return}d=c[b+188>>2]|0;if(d|0){h=c[a+68>>2]|0;h=ra[c[(c[h>>2]|0)+36>>2]&127](h)|0;Ma[c[(c[h>>2]|0)+40>>2]&127](h,d,c[a+24>>2]|0);h=c[a+68>>2]|0;Ma[c[(c[h>>2]|0)+12>>2]&127](h,d,c[a+24>>2]|0);c[b+188>>2]=0}d=c[a+8>>2]|0;if((d|0)<=0)return;e=c[a+16>>2]|0;g=0;while(1){f=e+(g<<2)|0;if((c[f>>2]|0)==(b|0))break;h=g+1|0;if((h|0)<(d|0))g=h;else{i=26;break}}if((i|0)==26)return;if((g|0)>=(d|0))return;c[f>>2]=c[e+(d+-1<<2)>>2];c[(c[a+16>>2]|0)+(d+-1<<2)>>2]=b;c[a+8>>2]=d+-1;return}f=c[a+328>>2]|0;a:do if((f|0)>0){g=c[a+336>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0))break a}if((d|0)<(f|0)){c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+336>>2]|0)+(f+-1<<2)>>2]=b;c[a+328>>2]=f+-1}}while(0);d=c[b+188>>2]|0;if(d|0){h=c[a+68>>2]|0;h=ra[c[(c[h>>2]|0)+36>>2]&127](h)|0;Ma[c[(c[h>>2]|0)+40>>2]&127](h,d,c[a+24>>2]|0);h=c[a+68>>2]|0;Ma[c[(c[h>>2]|0)+12>>2]&127](h,d,c[a+24>>2]|0);c[b+188>>2]=0}d=c[a+8>>2]|0;if((d|0)<=0)return;e=c[a+16>>2]|0;g=0;while(1){f=e+(g<<2)|0;if((c[f>>2]|0)==(b|0))break;h=g+1|0;if((h|0)<(d|0))g=h;else{i=26;break}}if((i|0)==26)return;if((g|0)>=(d|0))return;c[f>>2]=c[e+(d+-1<<2)>>2];c[(c[a+16>>2]|0)+(d+-1<<2)>>2]=b;c[a+8>>2]=d+-1;return}function Cf(b,d,e,g){b=b|0;d=+d;e=e|0;g=+g;var h=0,i=0.0,j=0,k=0;k=ea;ea=ea+16|0;Y(c[6746]|0,0)|0;mr(26944);c[6737]=(c[6737]|0)+1;j=c[6740]|0;c[6740]=j+1;if(!j){Y(k|0,0)|0;j=c[6746]|0;c[6739]=(c[k+4>>2]|0)-(c[j+4>>2]|0)+(((c[k>>2]|0)-(c[j>>2]|0)|0)*1e6|0)}c[6745]=0;Y(k|0,0)|0;Fi(14878);if(e){f[b+268>>2]=g;i=+f[b+264>>2]+d;f[b+264>>2]=i;if(!(i>=g)){d=g;j=0}else{f[b+264>>2]=i-+(~~(i/g)|0)*g;d=g;j=~~(i/g)}}else{f[b+264>>2]=(a[b+300>>0]|0)==0?d:0.0;f[b+268>>2]=0.0;j=!(+r(+d)<1.1920928955078125e-07)&1;e=j}if(ra[c[(c[b>>2]|0)+20>>2]&127](b)|0){h=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;h=ra[c[(c[h>>2]|0)+48>>2]&127](h)|0;a[27556]=(4?h>>>4:h)&1}if(j){e=(j|0)>(e|0)?e:j;Da[c[(c[b>>2]|0)+164>>2]&31](b,d*+(e|0));Ca[c[(c[b>>2]|0)+168>>2]&511](b);if((e|0)>0){h=0;do{Da[c[(c[b>>2]|0)+160>>2]&31](b,d);Ca[c[(c[b>>2]|0)+80>>2]&511](b);h=h+1|0}while((h|0)<(e|0));e=b}else e=b}else{Ca[c[(c[b>>2]|0)+80>>2]&511](b);e=b}Ca[c[(c[e>>2]|0)+120>>2]&511](b);c[6745]=(c[6745]|0)+1;e=c[2685]|0;b=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=b;if(b|0){ea=k;return j|0}do if(c[e+4>>2]|0){Y(k|0,0)|0;b=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[k+4>>2]|0)-(c[b+4>>2]|0)+(((c[k>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[e+16>>2]|0)){e=c[2685]|0;break}else{ea=k;return j|0}}while(0);c[2685]=c[e+20>>2];ea=k;return j|0}function Df(a,b,d){a=a|0;b=b|0;d=+d;var e=0,g=0,h=0;e=ea;ea=ea+288|0;f[e+280>>2]=d;h=MI(b)|0;c[e+264>>2]=c[h>>2];c[e+264+4>>2]=c[h+4>>2];c[e+264+8>>2]=c[h+8>>2];c[e+264+12>>2]=c[h+12>>2];h=c[(c[a>>2]|0)+8>>2]|0;g=NJ(b)|0;f[e+212>>2]=0.0;f[e+208>>2]=0.0;qs(e+216|0,e+280|0,e+212|0,e+208|0);ql(e+232|0,g,+f[e+216>>2],+f[e+216+4>>2],+f[e+216+8>>2]);vp(e+248|0,+f[e+264>>2],+f[e+264+4>>2],+f[e+264+8>>2],+f[e+232>>2],+f[e+232+4>>2],+f[e+232+8>>2]);f[e+184>>2]=.699999988079071;f[e+180>>2]=0.0;f[e+176>>2]=0.0;qs(e+192|0,e+184|0,e+180|0,e+176|0);Pa[h&127](a,e+264|0,e+248|0,e+192|0);b=c[(c[a>>2]|0)+8>>2]|0;f[e+124>>2]=0.0;f[e+120>>2]=0.0;qs(e+128|0,e+124|0,e+280|0,e+120|0);ql(e+144|0,g,+f[e+128>>2],+f[e+128+4>>2],+f[e+128+8>>2]);vp(e+160|0,+f[e+264>>2],+f[e+264+4>>2],+f[e+264+8>>2],+f[e+144>>2],+f[e+144+4>>2],+f[e+144+8>>2]);f[e+96>>2]=0.0;f[e+92>>2]=.699999988079071;f[e+88>>2]=0.0;qs(e+104|0,e+96|0,e+92|0,e+88|0);Pa[b&127](a,e+264|0,e+160|0,e+104|0);b=c[(c[a>>2]|0)+8>>2]|0;f[e+36>>2]=0.0;f[e+32>>2]=0.0;qs(e+40|0,e+36|0,e+32|0,e+280|0);ql(e+56|0,g,+f[e+40>>2],+f[e+40+4>>2],+f[e+40+8>>2]);vp(e+72|0,+f[e+264>>2],+f[e+264+4>>2],+f[e+264+8>>2],+f[e+56>>2],+f[e+56+4>>2],+f[e+56+8>>2]);f[e+8>>2]=0.0;f[e+4>>2]=0.0;f[e>>2]=.699999988079071;qs(e+16|0,e+8|0,e+4|0,e);Pa[b&127](a,e+264|0,e+72|0,e+16|0);ea=e;return}function Ef(a){a=a|0;var b=0,d=0,e=0.0,g=0.0,h=0.0,i=0.0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0.0;b=c[a+712>>2]|0;if((b|0)>0){d=0;do{l=(c[a+720>>2]|0)+(d*104|0)+72|0;d=d+1|0;c[l>>2]=0;c[l+4>>2]=0;c[l+8>>2]=0;c[l+12>>2]=0}while((d|0)!=(b|0))}b=c[a+752>>2]|0;if((b|0)>0){d=0;do{o=c[a+760>>2]|0;k=c[o+(d*44|0)+12>>2]|0;j=c[o+(d*44|0)+8>>2]|0;i=+f[j+8>>2];e=+f[k+8>>2]-i;g=+f[j+12>>2];h=+f[k+12>>2]-g;m=+f[j+16>>2];n=+f[k+16>>2]-m;l=c[o+(d*44|0)+16>>2]|0;i=+f[l+8>>2]-i;g=+f[l+12>>2]-g;m=+f[l+16>>2]-m;p=1.0/+s(+((e*g-h*i)*(e*g-h*i)+((h*m-n*g)*(h*m-n*g)+(n*i-e*m)*(n*i-e*m))));f[o+(d*44|0)+20>>2]=(h*m-n*g)*p;f[o+(d*44|0)+24>>2]=(n*i-e*m)*p;f[o+(d*44|0)+28>>2]=(e*g-h*i)*p;c[o+(d*44|0)+32>>2]=0;f[j+72>>2]=h*m-n*g+ +f[j+72>>2];f[j+76>>2]=n*i-e*m+ +f[j+76>>2];f[j+80>>2]=e*g-h*i+ +f[j+80>>2];f[k+72>>2]=h*m-n*g+ +f[k+72>>2];f[k+76>>2]=n*i-e*m+ +f[k+76>>2];f[k+80>>2]=e*g-h*i+ +f[k+80>>2];f[l+72>>2]=h*m-n*g+ +f[l+72>>2];f[l+76>>2]=n*i-e*m+ +f[l+76>>2];f[l+80>>2]=e*g-h*i+ +f[l+80>>2];d=d+1|0}while((d|0)!=(b|0))}l=c[a+712>>2]|0;if((l|0)<=0)return;b=c[a+720>>2]|0;k=0;do{d=b+(k*104|0)+72|0;e=+f[d>>2];j=b+(k*104|0)+76|0;g=+f[j>>2];a=b+(k*104|0)+80|0;h=+f[a>>2];i=+s(+(e*e+g*g+h*h));if(i>1.1920928955078125e-07){f[d>>2]=e*(1.0/i);f[j>>2]=g*(1.0/i);f[a>>2]=h*(1.0/i)}k=k+1|0}while((k|0)!=(l|0));return}function Ff(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;h=+f[d+100>>2];j=+f[d+16>>2];k=+f[d+20>>2];l=+f[d+24>>2];e=+f[d+108>>2];e=+f[d+112>>2]-h*+f[d+116>>2]-(j*+f[a+64>>2]+k*+f[a+68>>2]+l*+f[a+72>>2]+(+f[d>>2]*+f[a+80>>2]+ +f[d+4>>2]*+f[a+84>>2]+ +f[d+8>>2]*+f[a+88>>2]))*e-e*(+f[d+48>>2]*+f[b+64>>2]+ +f[d+52>>2]*+f[b+68>>2]+ +f[d+56>>2]*+f[b+72>>2]+(+f[d+32>>2]*+f[b+80>>2]+ +f[d+36>>2]*+f[b+84>>2]+ +f[d+40>>2]*+f[b+88>>2]));g=+f[d+120>>2];if(!(h+e>2];if(h+e>g){i=g;e=g-h}else i=h+e}else{i=g;e=g-h}f[d+100>>2]=i;if(c[a+240>>2]|0){i=e*(k*+f[a+132>>2])*+f[a+116>>2];k=e*(l*+f[a+136>>2])*+f[a+120>>2];f[a+64>>2]=+f[a+112>>2]*(e*(j*+f[a+128>>2]))+ +f[a+64>>2];f[a+68>>2]=i+ +f[a+68>>2];f[a+72>>2]=k+ +f[a+72>>2];k=e*+f[a+100>>2]*+f[d+68>>2];l=e*+f[a+104>>2]*+f[d+72>>2];f[a+80>>2]=e*+f[a+96>>2]*+f[d+64>>2]+ +f[a+80>>2];f[a+84>>2]=k+ +f[a+84>>2];f[a+88>>2]=l+ +f[a+88>>2]}if(!(c[b+240>>2]|0))return;l=e*(+f[d+52>>2]*+f[b+132>>2])*+f[b+116>>2];k=e*(+f[d+56>>2]*+f[b+136>>2])*+f[b+120>>2];f[b+64>>2]=+f[b+112>>2]*(e*(+f[d+48>>2]*+f[b+128>>2]))+ +f[b+64>>2];f[b+68>>2]=l+ +f[b+68>>2];f[b+72>>2]=k+ +f[b+72>>2];k=e*+f[b+100>>2]*+f[d+84>>2];l=e*+f[b+104>>2]*+f[d+88>>2];f[b+80>>2]=e*+f[b+96>>2]*+f[d+80>>2]+ +f[b+80>>2];f[b+84>>2]=k+ +f[b+84>>2];f[b+88>>2]=l+ +f[b+88>>2];return}function Gf(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0;h=xs()|0;c[h+4>>2]=5;c[h+8>>2]=-1;c[h+12>>2]=-1;f[h+16>>2]=3402823466385288598117041.0e14;a[h+20>>0]=1;a[h+21>>0]=0;c[h+24>>2]=-1;c[h+28>>2]=b;c[h+32>>2]=d;f[h+36>>2]=0.0;f[h+40>>2]=.30000001192092896;c[h+44>>2]=0;c[h>>2]=5764;c[h+300>>2]=c[e>>2];c[h+300+4>>2]=c[e+4>>2];c[h+300+8>>2]=c[e+8>>2];c[h+300+12>>2]=c[e+12>>2];c[h+316>>2]=c[e+16>>2];c[h+316+4>>2]=c[e+16+4>>2];c[h+316+8>>2]=c[e+16+8>>2];c[h+316+12>>2]=c[e+16+12>>2];c[h+332>>2]=c[e+32>>2];c[h+332+4>>2]=c[e+32+4>>2];c[h+332+8>>2]=c[e+32+8>>2];c[h+332+12>>2]=c[e+32+12>>2];c[h+348>>2]=c[e+48>>2];c[h+348+4>>2]=c[e+48+4>>2];c[h+348+8>>2]=c[e+48+8>>2];c[h+348+12>>2]=c[e+48+12>>2];c[h+364>>2]=c[g>>2];c[h+364+4>>2]=c[g+4>>2];c[h+364+8>>2]=c[g+8>>2];c[h+364+12>>2]=c[g+12>>2];c[h+380>>2]=c[g+16>>2];c[h+380+4>>2]=c[g+16+4>>2];c[h+380+8>>2]=c[g+16+8>>2];c[h+380+12>>2]=c[g+16+12>>2];c[h+396>>2]=c[g+32>>2];c[h+396+4>>2]=c[g+32+4>>2];c[h+396+8>>2]=c[g+32+8>>2];c[h+396+12>>2]=c[g+32+12>>2];c[h+412>>2]=c[g+48>>2];c[h+412+4>>2]=c[g+48+4>>2];c[h+412+8>>2]=c[g+48+8>>2];c[h+412+12>>2]=c[g+48+12>>2];a[h+552>>0]=0;c[h+524>>2]=0;f[h+572>>2]=-1.0;f[h+444>>2]=999999984306749440.0;f[h+448>>2]=999999984306749440.0;f[h+452>>2]=999999984306749440.0;f[h+428>>2]=1.0;f[h+432>>2]=.30000001192092896;f[h+436>>2]=1.0;f[h+440>>2]=.009999999776482582;f[h+456>>2]=.05000000074505806;c[h+592>>2]=0;f[h+596>>2]=0.0;f[h+600>>2]=.699999988079071;f[h+604>>2]=0.0;return h|0}function Hf(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0.0;l=ea;ea=ea+672|0;c[l+568+8>>2]=0;c[l+568+12>>2]=1065353216;c[l+568+16>>2]=1065353216;c[l+568+20>>2]=1065353216;f[l+568+24>>2]=0.0;c[l+568+52>>2]=0;c[l+568>>2]=4780;c[l+568+4>>2]=1;c[l+568+56>>2]=c[d>>2];c[l+568+56+4>>2]=c[d+4>>2];c[l+568+56+8>>2]=c[d+8>>2];c[l+568+56+12>>2]=c[d+12>>2];c[l+568+72>>2]=c[d+16>>2];c[l+568+72+4>>2]=c[d+16+4>>2];c[l+568+72+8>>2]=c[d+16+8>>2];c[l+568+72+12>>2]=c[d+16+12>>2];c[l+568+88>>2]=c[d+32>>2];c[l+568+88+4>>2]=c[d+32+4>>2];c[l+568+88+8>>2]=c[d+32+8>>2];c[l+568+88+12>>2]=c[d+32+12>>2];c[l+568+44>>2]=c[b+204>>2];f[l+208+308>>2]=9.999999747378752e-05;a[l+208+332>>0]=0;c[l+200>>2]=10432;d=c[b+4>>2]|0;c[l+176>>2]=10500;c[l+176+4>>2]=l+208;c[l+176+8>>2]=l+200;c[l+176+12>>2]=d;c[l+176+16>>2]=l+568;c[l+176+20>>2]=0;c[l>>2]=4752;c[l+168>>2]=0;f[l+164>>2]=1.0;c[l+172>>2]=c[b+208>>2];if((Rc(l+176|0,b+8|0,b+72|0,b+136|0,b+136|0,l)|0?(j=+f[l+132>>2],k=+f[l+136>>2],h=+f[l+140>>2],j*j+k*k+h*h>9.999999747378752e-05):0)?(i=+f[l+164>>2],i<+f[b+200>>2]):0){m=1.0/+s(+(j*j+k*k+h*h));f[l+132>>2]=j*m;f[l+136>>2]=k*m;f[l+140>>2]=h*m;+la[c[(c[b>>2]|0)+12>>2]&3](b,l+132|0,l+148|0,i,e,g)}c[l+568>>2]=8336;e=c[l+568+52>>2]|0;if(!e){ea=l;return}Ca[c[c[e>>2]>>2]&511](e);e=c[l+568+52>>2]|0;if(!e){ea=l;return}c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);ea=l;return}function If(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;e=+f[d+128>>2];if(!(e!=0.0))return;c[6564]=(c[6564]|0)+1;k=+f[d+96>>2];g=+f[d+16>>2];h=+f[d+20>>2];i=+f[d+24>>2];j=+f[d+108>>2];j=e-k*+f[d+116>>2]-(g*+f[a+144>>2]+h*+f[a+148>>2]+i*+f[a+152>>2]+(+f[d>>2]*+f[a+160>>2]+ +f[d+4>>2]*+f[a+164>>2]+ +f[d+8>>2]*+f[a+168>>2]))*j-j*(+f[d+48>>2]*+f[b+144>>2]+ +f[d+52>>2]*+f[b+148>>2]+ +f[d+56>>2]*+f[b+152>>2]+(+f[d+32>>2]*+f[b+160>>2]+ +f[d+36>>2]*+f[b+164>>2]+ +f[d+40>>2]*+f[b+168>>2]));l=+f[d+120>>2];e=k+j>2]=k+j>2]|0){l=e*(h*+f[a+132>>2])*+f[a+116>>2];k=e*(i*+f[a+136>>2])*+f[a+120>>2];f[a+144>>2]=+f[a+112>>2]*(e*(g*+f[a+128>>2]))+ +f[a+144>>2];f[a+148>>2]=l+ +f[a+148>>2];f[a+152>>2]=k+ +f[a+152>>2];k=e*+f[a+100>>2]*+f[d+68>>2];l=e*+f[a+104>>2]*+f[d+72>>2];f[a+160>>2]=e*+f[a+96>>2]*+f[d+64>>2]+ +f[a+160>>2];f[a+164>>2]=k+ +f[a+164>>2];f[a+168>>2]=l+ +f[a+168>>2]}if(!(c[b+240>>2]|0))return;l=e*(+f[d+52>>2]*+f[b+132>>2])*+f[b+116>>2];k=e*(+f[d+56>>2]*+f[b+136>>2])*+f[b+120>>2];f[b+144>>2]=+f[b+112>>2]*(e*(+f[d+48>>2]*+f[b+128>>2]))+ +f[b+144>>2];f[b+148>>2]=l+ +f[b+148>>2];f[b+152>>2]=k+ +f[b+152>>2];k=e*+f[b+100>>2]*+f[d+84>>2];l=e*+f[b+104>>2]*+f[d+88>>2];f[b+160>>2]=e*+f[b+96>>2]*+f[d+80>>2]+ +f[b+160>>2];f[b+164>>2]=k+ +f[b+164>>2];f[b+168>>2]=l+ +f[b+168>>2];return}function Jf(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!(a[d+164>>0]|0)){f=c[d+148>>2]|0;if((f|0)==(c[d+152>>2]|0)?(k=(f|0)==0?1:f<<1,(f|0)<(k|0)):0){if(!k)g=0;else{c[6747]=(c[6747]|0)+1;f=kb((k<<1)+19|0)|0;if(!f)g=0;else{c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}f=c[d+148>>2]|0}i=c[d+156>>2]|0;if((f|0)<=0)if(!i)h=d+160|0;else l=29;else{h=0;do{b[g+(h<<1)>>1]=b[i+(h<<1)>>1]|0;h=h+1|0}while((h|0)!=(f|0));l=29}if((l|0)==29){if(a[d+160>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);f=c[d+148>>2]|0}c[d+156>>2]=0;h=d+160|0}a[h>>0]=1;c[d+156>>2]=g;c[d+152>>2]=k}l=c[d+156>>2]|0;b[l+(f<<1)>>1]=e;c[d+148>>2]=f+1;c[(c[d+32>>2]|0)+4>>2]=l;return}else{f=c[d+128>>2]|0;if((f|0)==(c[d+132>>2]|0)?(j=(f|0)==0?1:f<<1,(f|0)<(j|0)):0){if(!j)g=0;else{c[6747]=(c[6747]|0)+1;f=kb((j<<2|3)+16|0)|0;if(!f)g=0;else{c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}f=c[d+128>>2]|0}i=c[d+136>>2]|0;if((f|0)<=0)if(!i)h=d+140|0;else l=13;else{h=0;do{c[g+(h<<2)>>2]=c[i+(h<<2)>>2];h=h+1|0}while((h|0)!=(f|0));l=13}if((l|0)==13){if(a[d+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[d+136>>2]=0;f=c[d+128>>2]|0;h=d+140|0}a[h>>0]=1;c[d+136>>2]=g;c[d+132>>2]=j}l=c[d+136>>2]|0;c[l+(f<<2)>>2]=e;c[d+128>>2]=(c[d+128>>2]|0)+1;c[(c[d+32>>2]|0)+4>>2]=l;return}}function Kf(a,b,d){a=a|0;b=+b;d=+d;var e=0,g=0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0;h=ea;ea=ea+16|0;b=+f[a+336>>2]*b;d=+f[a+452>>2];e=c[a+792>>2]|0;if((e|0)<=0){ea=h;return}g=0;do{s=c[a+800>>2]|0;j=c[s+(g*96|0)+20>>2]|0;n=c[s+(g*96|0)>>2]|0;x=+f[s+(g*96|0)+4>>2];w=+f[s+(g*96|0)+8>>2];v=+f[s+(g*96|0)+12>>2];i=s+(g*96|0)+76|0;u=+f[j+332>>2];o=+f[s+(g*96|0)+84>>2];y=+f[j+336>>2];l=+f[s+(g*96|0)+80>>2];k=+f[i>>2];m=+f[j+328>>2];r=+f[n+8>>2];q=+f[n+12>>2];p=+f[n+16>>2];t=b*(x*+f[j+4>>2]+w*+f[j+8>>2]+v*+f[j+12>>2]+ +f[j+52>>2]-r)+(d*(u*o-y*l+ +f[j+312>>2])-(r-+f[n+24>>2]));o=b*(x*+f[j+20>>2]+w*+f[j+24>>2]+v*+f[j+28>>2]+ +f[j+56>>2]-q)+(d*(+f[j+316>>2]+(y*k-o*m))-(q-+f[n+28>>2]));k=b*(x*+f[j+36>>2]+w*+f[j+40>>2]+v*+f[j+44>>2]+ +f[j+60>>2]-p)+(d*(l*m-u*k+ +f[j+320>>2])-(p-+f[n+32>>2]));u=+f[s+(g*96|0)+24>>2];m=(t*+f[s+(g*96|0)+28>>2]+o*+f[s+(g*96|0)+32>>2]+ +f[s+(g*96|0)+36>>2]*k)*u;l=(t*+f[s+(g*96|0)+44>>2]+o*+f[s+(g*96|0)+48>>2]+k*+f[s+(g*96|0)+52>>2])*u;k=u*(t*+f[s+(g*96|0)+60>>2]+o*+f[s+(g*96|0)+64>>2]+k*+f[s+(g*96|0)+68>>2]);o=+f[s+(g*96|0)+92>>2];f[n+8>>2]=r+m*o;f[n+12>>2]=q+o*l;f[n+16>>2]=p+o*k;f[h>>2]=-m;f[h+4>>2]=-l;f[h+8>>2]=-k;f[h+12>>2]=0.0;uk(j,h,i);g=g+1|0}while((g|0)!=(e|0));ea=h;return}function Lf(b,d,e){b=b|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;c[6734]=(c[6734]|0)+1;l=(e<<16|d)+~((e<<16|d)<<15)|0;l=((10?l>>10:l)^l)*9|0;l=(6?l>>6:l)^l;l=(16?l+~(l<<11)>>16:l+~(l<<11)|0)^l+~(l<<11);k=c[b+12>>2]|0;f=c[(c[b+40>>2]|0)+((k+-1&l)<<2)>>2]|0;a:do if((f|0)!=-1){h=c[b+16>>2]|0;while(1){g=h+(f*12|0)|0;if((c[g>>2]|0)==(d|0)?(c[h+(f*12|0)+4>>2]|0)==(e|0):0)break;f=c[(c[b+60>>2]|0)+(f<<2)>>2]|0;if((f|0)==-1)break a}if(g|0){b=g;return b|0}}while(0);j=c[b+8>>2]|0;if((j|0)==(k|0)){h=(k|0)==0?1:k<<1;if((k|0)<(h|0)){if(!h){g=k;i=0}else{c[6747]=(c[6747]|0)+1;f=kb((h*12|3)+16|0)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[b+8>>2]|0;i=f}if((g|0)>0){f=0;do{m=i+(f*12|0)|0;n=(c[b+16>>2]|0)+(f*12|0)|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];f=f+1|0}while((f|0)!=(g|0))}f=c[b+16>>2]|0;if(f|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=i;c[b+12>>2]=h;f=c[b+8>>2]|0}else{f=k;h=k}}else{f=j;h=k}c[b+8>>2]=f+1;g=c[b+16>>2]|0;if((k|0)<(h|0)){He(b);f=(c[b+12>>2]|0)+-1&l}else f=k+-1&l;c[g+(j*12|0)>>2]=d;c[g+(j*12|0)+4>>2]=e;c[g+(j*12|0)+8>>2]=0;n=(c[b+40>>2]|0)+(f<<2)|0;c[(c[b+60>>2]|0)+(j<<2)>>2]=c[n>>2];c[n>>2]=j;n=g+(j*12|0)|0;return n|0}function Mf(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;i=Hs()|0;c[i+4>>2]=4;c[i+8>>2]=-1;c[i+12>>2]=-1;f[i+16>>2]=3402823466385288598117041.0e14;a[i+20>>0]=1;a[i+21>>0]=0;c[i+24>>2]=-1;c[i+28>>2]=b;c[i+32>>2]=d;f[i+36>>2]=0.0;f[i+40>>2]=.30000001192092896;c[i+44>>2]=0;c[i>>2]=5820;c[i+552>>2]=c[e>>2];c[i+552+4>>2]=c[e+4>>2];c[i+552+8>>2]=c[e+8>>2];c[i+552+12>>2]=c[e+12>>2];c[i+568>>2]=c[e+16>>2];c[i+568+4>>2]=c[e+16+4>>2];c[i+568+8>>2]=c[e+16+8>>2];c[i+568+12>>2]=c[e+16+12>>2];c[i+584>>2]=c[e+32>>2];c[i+584+4>>2]=c[e+32+4>>2];c[i+584+8>>2]=c[e+32+8>>2];c[i+584+12>>2]=c[e+32+12>>2];c[i+600>>2]=c[e+48>>2];c[i+600+4>>2]=c[e+48+4>>2];c[i+600+8>>2]=c[e+48+8>>2];c[i+600+12>>2]=c[e+48+12>>2];c[i+616>>2]=c[g>>2];c[i+616+4>>2]=c[g+4>>2];c[i+616+8>>2]=c[g+8>>2];c[i+616+12>>2]=c[g+12>>2];c[i+632>>2]=c[g+16>>2];c[i+632+4>>2]=c[g+16+4>>2];c[i+632+8>>2]=c[g+16+8>>2];c[i+632+12>>2]=c[g+16+12>>2];c[i+648>>2]=c[g+32>>2];c[i+648+4>>2]=c[g+32+4>>2];c[i+648+8>>2]=c[g+32+8>>2];c[i+648+12>>2]=c[g+32+12>>2];c[i+664>>2]=c[g+48>>2];c[i+664+4>>2]=c[g+48+4>>2];c[i+664+8>>2]=c[g+48+8>>2];c[i+664+12>>2]=c[g+48+12>>2];f[i+688>>2]=0.0;f[i+692>>2]=-1.0;f[i+696>>2]=.8999999761581421;f[i+700>>2]=.30000001192092896;f[i+704>>2]=1.0;f[i+708>>2]=0.0;f[i+712>>2]=0.0;a[i+716>>0]=0;a[i+736>>0]=0;a[i+737>>0]=0;a[i+738>>0]=0;a[i+739>>0]=1;a[i+740>>0]=h&1;c[i+748>>2]=0;f[i+732>>2]=h?-1.0:1.0;return i|0}function Nf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;g=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=g;if(g|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];g=c[a+48>>2]|0;va[c[(c[g>>2]|0)+56>>2]&63](g,b+12|0,d)|0;c[b+52>>2]=c[a+12>>2];do if((c[a+52>>2]|0)!=0?((ra[c[(c[d>>2]|0)+52>>2]&127](d)|0)&1|0)==0:0){e=ta[c[(c[d>>2]|0)+24>>2]&31](d,c[a+52>>2]|0)|0;if(!e){c[b+40>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[a+52>>2]|0)|0;c[b+44>>2]=0;e=c[a+52>>2]|0;e=ra[c[(c[e>>2]|0)+12>>2]&127](e)|0;e=va[c[(c[d>>2]|0)+16>>2]&63](d,e,1)|0;g=c[a+52>>2]|0;g=va[c[(c[g>>2]|0)+16>>2]&63](g,c[e+8>>2]|0,d)|0;Ta[c[(c[d>>2]|0)+20>>2]&31](d,e,g,1213612625,c[a+52>>2]|0);break}else{c[b+40>>2]=e;c[b+44>>2]=0;break}}else f=8;while(0);if((f|0)==8){c[b+40>>2]=0;c[b+44>>2]=0}if(c[a+56>>2]|0?((ra[c[(c[d>>2]|0)+52>>2]&127](d)|0)&2|0)==0:0){e=ta[c[(c[d>>2]|0)+24>>2]&31](d,c[a+56>>2]|0)|0;if(!e){c[b+48>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[a+56>>2]|0)|0;b=c[a+56>>2]|0;b=ra[c[(c[b>>2]|0)+8>>2]&127](b)|0;b=va[c[(c[d>>2]|0)+16>>2]&63](d,b,1)|0;g=c[a+56>>2]|0;g=va[c[(c[g>>2]|0)+12>>2]&63](g,c[b+8>>2]|0,d)|0;Ta[c[(c[d>>2]|0)+20>>2]&31](d,b,g,1346456916,c[a+56>>2]|0);return 19373}else{c[b+48>>2]=e;return 19373}}c[b+48>>2]=0;return 19373}function Of(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0;x=ea;ea=ea+2048|0;if((e|0)<=0){ea=x;return}v=0;do{q=c[a+92>>2]|0;if((q|0)>0){r=b+(v<<4)|0;u=b+(v<<4)+4|0;s=b+(v<<4)+8|0;t=d+(v<<4)|0;w=0;p=-999999984306749440.0;j=c[a+100>>2]|0;i=c[a+120>>2]|0;while(1){k=q-w|0;o=(k|0)<128?k:128;if((k|0)>0){l=+f[r>>2];m=+f[u>>2];n=+f[s>>2];h=0;do{y=+f[i>>2];A=+f[j>>2]+l*+f[a+12>>2]*y;z=m*+f[a+16>>2]*y+ +f[j+4>>2];y=y*(n*+f[a+20>>2])+ +f[j+8>>2];g=+ha[c[(c[a>>2]|0)+48>>2]&15](a);l=+f[r>>2];m=+f[u>>2];n=+f[s>>2];f[x+(h<<4)>>2]=A-g*l;f[x+(h<<4)+4>>2]=z-g*m;f[x+(h<<4)+8>>2]=y-g*n;f[x+(h<<4)+12>>2]=0.0;j=j+16|0;i=i+4|0;h=h+1|0}while((h|0)<(o|0));k=0;g=-3402823466385288598117041.0e14;h=-1;do{A=l*+f[x+(k<<4)>>2]+m*+f[x+(k<<4)+4>>2]+n*+f[x+(k<<4)+8>>2];B=A>g;h=B?k:h;g=B?A:g;k=k+1|0}while((k|0)!=(o|0))}else{g=-3402823466385288598117041.0e14;h=-1}if(g>p){B=x+(h<<4)|0;c[t>>2]=c[B>>2];c[t+4>>2]=c[B+4>>2];c[t+8>>2]=c[B+8>>2];c[t+12>>2]=c[B+12>>2]}else g=p;w=w+128|0;if((q|0)<=(w|0))break;else p=g}}v=v+1|0}while((v|0)!=(e|0));ea=x;return}function Pf(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0;h=Hs()|0;c[h+4>>2]=4;c[h+8>>2]=-1;c[h+12>>2]=-1;f[h+16>>2]=3402823466385288598117041.0e14;a[h+20>>0]=1;a[h+21>>0]=0;c[h+24>>2]=-1;c[h+28>>2]=b;c[h+32>>2]=d;f[h+36>>2]=0.0;f[h+40>>2]=.30000001192092896;c[h+44>>2]=0;c[h>>2]=5820;c[h+552>>2]=c[e>>2];c[h+552+4>>2]=c[e+4>>2];c[h+552+8>>2]=c[e+8>>2];c[h+552+12>>2]=c[e+12>>2];c[h+568>>2]=c[e+16>>2];c[h+568+4>>2]=c[e+16+4>>2];c[h+568+8>>2]=c[e+16+8>>2];c[h+568+12>>2]=c[e+16+12>>2];c[h+584>>2]=c[e+32>>2];c[h+584+4>>2]=c[e+32+4>>2];c[h+584+8>>2]=c[e+32+8>>2];c[h+584+12>>2]=c[e+32+12>>2];c[h+600>>2]=c[e+48>>2];c[h+600+4>>2]=c[e+48+4>>2];c[h+600+8>>2]=c[e+48+8>>2];c[h+600+12>>2]=c[e+48+12>>2];c[h+616>>2]=c[g>>2];c[h+616+4>>2]=c[g+4>>2];c[h+616+8>>2]=c[g+8>>2];c[h+616+12>>2]=c[g+12>>2];c[h+632>>2]=c[g+16>>2];c[h+632+4>>2]=c[g+16+4>>2];c[h+632+8>>2]=c[g+16+8>>2];c[h+632+12>>2]=c[g+16+12>>2];c[h+648>>2]=c[g+32>>2];c[h+648+4>>2]=c[g+32+4>>2];c[h+648+8>>2]=c[g+32+8>>2];c[h+648+12>>2]=c[g+32+12>>2];c[h+664>>2]=c[g+48>>2];c[h+664+4>>2]=c[g+48+4>>2];c[h+664+8>>2]=c[g+48+8>>2];c[h+664+12>>2]=c[g+48+12>>2];f[h+688>>2]=0.0;f[h+692>>2]=-1.0;f[h+696>>2]=.8999999761581421;f[h+700>>2]=.30000001192092896;f[h+704>>2]=1.0;f[h+708>>2]=0.0;f[h+712>>2]=0.0;a[h+716>>0]=0;a[h+736>>0]=0;a[h+737>>0]=0;a[h+738>>0]=0;a[h+739>>0]=1;a[h+740>>0]=0;c[h+748>>2]=0;f[h+732>>2]=1.0;return h|0}function Qf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;k=+f[d+100>>2];e=+f[d+16>>2];g=+f[d+20>>2];h=+f[d+24>>2];j=+f[d+108>>2];j=+f[d+112>>2]-k*+f[d+116>>2]-(e*+f[a+64>>2]+g*+f[a+68>>2]+h*+f[a+72>>2]+(+f[d>>2]*+f[a+80>>2]+ +f[d+4>>2]*+f[a+84>>2]+ +f[d+8>>2]*+f[a+88>>2]))*j-j*(+f[d+48>>2]*+f[b+64>>2]+ +f[d+52>>2]*+f[b+68>>2]+ +f[d+56>>2]*+f[b+72>>2]+(+f[d+32>>2]*+f[b+80>>2]+ +f[d+36>>2]*+f[b+84>>2]+ +f[d+40>>2]*+f[b+88>>2]));l=+f[d+120>>2];i=k+j>2]=k+j>2]|0){l=i*(g*+f[a+132>>2])*+f[a+116>>2];k=i*(h*+f[a+136>>2])*+f[a+120>>2];f[a+64>>2]=+f[a+112>>2]*(i*(e*+f[a+128>>2]))+ +f[a+64>>2];f[a+68>>2]=l+ +f[a+68>>2];f[a+72>>2]=k+ +f[a+72>>2];k=i*+f[a+100>>2]*+f[d+68>>2];l=i*+f[a+104>>2]*+f[d+72>>2];f[a+80>>2]=i*+f[a+96>>2]*+f[d+64>>2]+ +f[a+80>>2];f[a+84>>2]=k+ +f[a+84>>2];f[a+88>>2]=l+ +f[a+88>>2]}if(!(c[b+240>>2]|0))return;l=i*(+f[d+52>>2]*+f[b+132>>2])*+f[b+116>>2];k=i*(+f[d+56>>2]*+f[b+136>>2])*+f[b+120>>2];f[b+64>>2]=+f[b+112>>2]*(i*(+f[d+48>>2]*+f[b+128>>2]))+ +f[b+64>>2];f[b+68>>2]=l+ +f[b+68>>2];f[b+72>>2]=k+ +f[b+72>>2];k=i*+f[b+100>>2]*+f[d+84>>2];l=i*+f[b+104>>2]*+f[d+88>>2];f[b+80>>2]=i*+f[b+96>>2]*+f[d+80>>2]+ +f[b+80>>2];f[b+84>>2]=k+ +f[b+84>>2];f[b+88>>2]=l+ +f[b+88>>2];return}function Rf(b,d,e,g,h,i){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0;c[6747]=(c[6747]|0)+1;b=kb((h+2|0)>>>0>268435455?18:(h+2<<4|3)+16|0)|0;if(!b)k=0;else{c[(b+4+15&-16)+-4>>2]=b;k=b+4+15&-16}j=GJ((h+2|0)>>>0>1073741823?-1:h+2<<2)|0;if((h|0)>-2){b=0;do{p=+(b|0)/+(h+1|0);o=+f[e>>2];n=+f[e+4>>2];n=n+p*(+f[g+4>>2]-n);m=+f[e+8>>2];m=m+p*(+f[g+8>>2]-m);f[k+(b<<4)>>2]=o+p*(+f[g>>2]-o);f[k+(b<<4)+4>>2]=n;f[k+(b<<4)+8>>2]=m;f[k+(b<<4)+12>>2]=0.0;f[j+(b<<2)>>2]=1.0;b=b+1|0}while((b|0)<(h+2|0))}c[6747]=(c[6747]|0)+1;b=kb(1271)|0;if(!b)l=0;else{c[(b+4+15&-16)+-4>>2]=b;l=b+4+15&-16}ub(l,d,h+2|0,k,j);if(i&1|0){f[(c[l+720>>2]|0)+88>>2]=0.0;a[l+924>>0]=1}if(i&2|0){f[(c[l+720>>2]|0)+((h+1|0)*104|0)+88>>2]=0.0;a[l+924>>0]=1}if(k|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}HJ(j);if((h|0)<=-1)return l|0;k=l+720|0;g=l+732|0;e=l+740|0;b=l+924|0;j=1;do{r=j+-1|0;q=c[k>>2]|0;mh(l,0);d=(c[g>>2]|0)+-1|0;i=c[e>>2]|0;c[i+(d*52|0)+8>>2]=q+(r*104|0);c[i+(d*52|0)+12>>2]=q+(j*104|0);n=+f[q+(r*104|0)+8>>2]-+f[q+(j*104|0)+8>>2];o=+f[q+(r*104|0)+12>>2]-+f[q+(j*104|0)+12>>2];p=+f[q+(r*104|0)+16>>2]-+f[q+(j*104|0)+16>>2];f[i+(d*52|0)+16>>2]=+s(+(n*n+o*o+p*p));a[b>>0]=1;j=j+1|0}while((j|0)<(h+2|0));return l|0}function Sf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;J=+f[a+4>>2];I=+f[a+20>>2];H=+f[a+36>>2];F=+f[a+8>>2];E=+f[a+24>>2];D=+f[a+40>>2];B=+f[a+12>>2];z=+f[a+28>>2];x=+f[a+44>>2];u=+f[b+4>>2];t=+f[b+20>>2];s=+f[b+36>>2];q=+f[b+8>>2];p=+f[b+24>>2];o=+f[b+40>>2];m=+f[b+12>>2];k=+f[b+28>>2];i=+f[b+44>>2];c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;A=+f[e>>2];y=+f[e+4>>2];w=+f[e+8>>2];f[d+16>>2]=J*A+I*y+H*w;f[d+20>>2]=F*A+E*y+D*w;f[d+24>>2]=B*A+z*y+x*w;f[d+28>>2]=0.0;l=-+f[e>>2];j=-+f[e+4>>2];h=-+f[e+8>>2];f[d+32>>2]=u*l+t*j+s*h;f[d+36>>2]=q*l+p*j+o*h;f[d+40>>2]=m*l+k*j+i*h;f[d+44>>2]=0.0;G=(J*A+I*y+H*w)*+f[a+396>>2];C=(F*A+E*y+D*w)*+f[a+400>>2];v=(B*A+z*y+x*w)*+f[a+404>>2];f[d+48>>2]=G;f[d+52>>2]=C;f[d+56>>2]=v;f[d+60>>2]=0.0;r=(u*l+t*j+s*h)*+f[b+396>>2];n=(q*l+p*j+o*h)*+f[b+400>>2];g=(m*l+k*j+i*h)*+f[b+404>>2];f[d+64>>2]=r;f[d+68>>2]=n;f[d+72>>2]=g;f[d+76>>2]=0.0;f[d+80>>2]=(J*A+I*y+H*w)*G+(F*A+E*y+D*w)*C+(B*A+z*y+x*w)*v+((u*l+t*j+s*h)*r+(q*l+p*j+o*h)*n+(m*l+k*j+i*h)*g);return}function Tf(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;k=ea;ea=ea+96|0;g=c[b+8>>2]|0;if((g|0)==(c[b+12>>2]|0)?(j=(g|0)==0?1:g<<1,(g|0)<(j|0)):0){if(!j)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((j<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+8>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[b+16>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[b+16>>2]|0;if(i){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[b+8>>2]|0}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=h;c[b+12>>2]=j}c[(c[b+16>>2]|0)+(g<<2)>>2]=d;c[b+8>>2]=g+1;c[k+32>>2]=c[d+4>>2];c[k+32+4>>2]=c[d+4+4>>2];c[k+32+8>>2]=c[d+4+8>>2];c[k+32+12>>2]=c[d+4+12>>2];c[k+32+16>>2]=c[d+20>>2];c[k+32+16+4>>2]=c[d+20+4>>2];c[k+32+16+8>>2]=c[d+20+8>>2];c[k+32+16+12>>2]=c[d+20+12>>2];c[k+32+32>>2]=c[d+36>>2];c[k+32+32+4>>2]=c[d+36+4>>2];c[k+32+32+8>>2]=c[d+36+8>>2];c[k+32+32+12>>2]=c[d+36+12>>2];c[k+32+48>>2]=c[d+52>>2];c[k+32+48+4>>2]=c[d+52+4>>2];c[k+32+48+8>>2]=c[d+52+8>>2];c[k+32+48+12>>2]=c[d+52+12>>2];j=c[d+192>>2]|0;Pa[c[(c[j>>2]|0)+8>>2]&127](j,k+32|0,k+16|0,k);j=c[b+68>>2]|0;c[d+188>>2]=za[c[(c[j>>2]|0)+8>>2]&3](j,k+16|0,k,c[(c[d+192>>2]|0)+4>>2]|0,d,e,f,c[b+24>>2]|0,0)|0;ea=k;return}function Uf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0;w=ea;ea=ea+16|0;g=c[a+52>>2]|0;v=+f[a+28+(((g+2|0)%3|0)<<2)>>2];if((e|0)<=0){ea=w;return}h=0;while(1){c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;c[w+(g<<2)>>2]=c[a+28+(g<<2)>>2];g=b+(h<<4)|0;t=b+(h<<4)+4|0;u=b+(h<<4)+8|0;l=v*+f[g>>2]+ +f[w>>2];n=v*+f[t>>2]+ +f[w+4>>2];m=v*+f[u>>2]+ +f[w+8>>2];o=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+f[g>>2];j=+f[t>>2];k=+f[u>>2];if(i*(l-o*i)+j*(n-o*j)+k*(m-o*k)>-999999984306749440.0){f[d+(h<<4)>>2]=l-o*i;f[d+(h<<4)+4>>2]=n-o*j;f[d+(h<<4)+8>>2]=m-o*k;f[d+(h<<4)+12>>2]=0.0;p=+f[g>>2];r=+f[t>>2];s=+f[u>>2];q=i*(l-o*i)+j*(n-o*j)+k*(m-o*k)}else{p=i;r=j;s=k;q=-999999984306749440.0}c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;x=c[a+52>>2]|0;f[w+(x<<2)>>2]=-+f[a+28+(x<<2)>>2];o=v*p+ +f[w>>2];n=v*r+ +f[w+4>>2];l=v*s+ +f[w+8>>2];m=+ha[c[(c[a>>2]|0)+48>>2]&15](a);k=+f[g>>2];j=+f[t>>2];i=+f[u>>2];if(k*(o-m*k)+j*(n-m*j)+i*(l-m*i)>q){f[d+(h<<4)>>2]=o-m*k;f[d+(h<<4)+4>>2]=n-m*j;f[d+(h<<4)+8>>2]=l-m*i;f[d+(h<<4)+12>>2]=0.0}h=h+1|0;if((h|0)==(e|0))break;g=c[a+52>>2]|0}ea=w;return}function Vf(b){b=b|0;var d=0,e=0,f=0;c[b>>2]=5208;if(a[b+272>>0]|0?(d=c[b+204>>2]|0,Ca[c[c[d>>2]>>2]&511](d),d=c[b+204>>2]|0,d|0):0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+196>>2]|0;if(d|0?(Ca[c[c[d>>2]>>2]&511](d),f=c[b+196>>2]|0,f|0):0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}if(a[b+273>>0]|0?(e=c[b+200>>2]|0,Ca[c[c[e>>2]>>2]&511](e),e=c[b+200>>2]|0,e|0):0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}d=c[b+316>>2]|0;if(d|0){if(a[b+320>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+316>>2]=0}a[b+320>>0]=1;c[b+316>>2]=0;c[b+308>>2]=0;c[b+312>>2]=0;d=c[b+288>>2]|0;if(d|0){if(a[b+292>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+288>>2]=0}a[b+292>>0]=1;c[b+288>>2]=0;c[b+280>>2]=0;c[b+284>>2]=0;d=c[b+240>>2]|0;if(d|0){if(a[b+244>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+240>>2]=0}a[b+244>>0]=1;c[b+240>>2]=0;c[b+232>>2]=0;c[b+236>>2]=0;d=c[b+220>>2]|0;if(d|0){if(a[b+224>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+220>>2]=0}a[b+224>>0]=1;c[b+220>>2]=0;c[b+212>>2]=0;c[b+216>>2]=0;d=c[b+188>>2]|0;if(!d){a[b+192>>0]=1;c[b+188>>2]=0;c[b+180>>2]=0;f=b+184|0;c[f>>2]=0;Zi(b);return}if(a[b+192>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+188>>2]=0;a[b+192>>0]=1;c[b+188>>2]=0;c[b+180>>2]=0;f=b+184|0;c[f>>2]=0;Zi(b);return}function Wf(b,d,e,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;g=+g;h=+h;i=+i;j=j|0;k=k|0;l=l|0;var m=0.0,n=0.0,o=0.0,p=0;p=rs()|0;c[p+8>>2]=0;f[p+12>>2]=0.0;c[p>>2]=9372;c[p+4>>2]=24;c[p+64>>2]=b;c[p+68>>2]=d;f[p+72>>2]=h;f[p+76>>2]=i;f[p+80>>2]=+(b+-1|0);f[p+84>>2]=+(d+-1|0);f[p+88>>2]=g;c[p+92>>2]=e;c[p+96>>2]=k;a[p+100>>0]=l&1;a[p+101>>0]=0;a[p+102>>0]=0;c[p+104>>2]=j;c[p+108>>2]=1065353216;c[p+112>>2]=1065353216;c[p+116>>2]=1065353216;f[p+120>>2]=0.0;switch(j|0){case 0:{f[p+16>>2]=h;c[p+20>>2]=0;c[p+24>>2]=0;f[p+28>>2]=0.0;f[p+32>>2]=i;f[p+36>>2]=+(b+-1|0);f[p+40>>2]=+(d+-1|0);f[p+44>>2]=0.0;n=+(b+-1|0);o=0.0;g=+(d+-1|0);m=h;h=0.0;break}case 1:{c[p+16>>2]=0;f[p+20>>2]=h;c[p+24>>2]=0;f[p+28>>2]=0.0;f[p+32>>2]=+(b+-1|0);f[p+36>>2]=i;f[p+40>>2]=+(d+-1|0);f[p+44>>2]=0.0;n=i;o=0.0;g=+(d+-1|0);m=0.0;i=+(b+-1|0);break}case 2:{c[p+16>>2]=0;c[p+20>>2]=0;f[p+24>>2]=h;f[p+28>>2]=0.0;f[p+32>>2]=+(b+-1|0);f[p+36>>2]=+(d+-1|0);f[p+40>>2]=i;f[p+44>>2]=0.0;n=+(d+-1|0);o=h;g=i;m=0.0;i=+(b+-1|0);h=0.0;break}default:{n=+f[p+36>>2];o=+f[p+24>>2];g=+f[p+40>>2];m=+f[p+16>>2];i=+f[p+32>>2];h=+f[p+20>>2]}}f[p+48>>2]=(m+i)*.5;f[p+52>>2]=(h+n)*.5;f[p+56>>2]=(o+g)*.5;f[p+60>>2]=0.0;return p|0}function Xf(a,b,d){a=a|0;b=b|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;while(1){m=c[a+12>>2]|0;n=c[m+(((b+d|0)/2|0)<<2)>>2]|0;e=b;f=d;while(1){l=c[(c[n+740>>2]|0)+208>>2]|0;if((l|0)>-1)while(1){i=m+(e<<2)|0;h=c[i>>2]|0;g=c[(c[h+740>>2]|0)+208>>2]|0;if((g|0)<=-1)g=c[(c[h+744>>2]|0)+208>>2]|0;if((g|0)<(l|0))e=e+1|0;else{k=i;break}}else{j=c[(c[n+744>>2]|0)+208>>2]|0;while(1){i=m+(e<<2)|0;h=c[i>>2]|0;g=c[(c[h+740>>2]|0)+208>>2]|0;if((g|0)<=-1)g=c[(c[h+744>>2]|0)+208>>2]|0;if((g|0)<(j|0))e=e+1|0;else{k=i;break}}}if((l|0)>-1)while(1){g=m+(f<<2)|0;i=c[g>>2]|0;h=c[(c[i+740>>2]|0)+208>>2]|0;if((h|0)<=-1)h=c[(c[i+744>>2]|0)+208>>2]|0;if((l|0)<(h|0))f=f+-1|0;else break}else{j=c[(c[n+744>>2]|0)+208>>2]|0;while(1){g=m+(f<<2)|0;i=c[g>>2]|0;h=c[(c[i+740>>2]|0)+208>>2]|0;if((h|0)<=-1)h=c[(c[i+744>>2]|0)+208>>2]|0;if((j|0)<(h|0))f=f+-1|0;else break}}if((e|0)<=(f|0)){m=c[k>>2]|0;c[k>>2]=c[g>>2];c[(c[a+12>>2]|0)+(f<<2)>>2]=m;e=e+1|0;f=f+-1|0}if((e|0)>(f|0))break;m=c[a+12>>2]|0}if((f|0)>(b|0))Xf(a,b,f);if((e|0)<(d|0))b=e;else break}return}function Yf(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0;h=ea;ea=ea+64|0;a[d+84>>0]=0;c[h>>2]=c[b+4>>2];c[h+4>>2]=c[b+4+4>>2];c[h+8>>2]=c[b+4+8>>2];c[h+12>>2]=c[b+4+12>>2];c[h+16>>2]=c[b+20>>2];c[h+16+4>>2]=c[b+20+4>>2];c[h+16+8>>2]=c[b+20+8>>2];c[h+16+12>>2]=c[b+20+12>>2];c[h+32>>2]=c[b+36>>2];c[h+32+4>>2]=c[b+36+4>>2];c[h+32+8>>2]=c[b+36+8>>2];c[h+32+12>>2]=c[b+36+12>>2];c[h+48>>2]=c[b+52>>2];c[h+48+4>>2]=c[b+52+4>>2];c[h+48+8>>2]=c[b+52+8>>2];c[h+48+12>>2]=c[b+52+12>>2];if(e?(g=c[b+480>>2]|0,g|0):0)Ia[c[(c[g>>2]|0)+8>>2]&127](g,h);v=+f[d+156>>2];t=+f[h>>2];u=+f[d+160>>2];s=+f[h+4>>2];m=+f[d+164>>2];r=+f[h+8>>2];q=+f[h+16>>2];p=+f[h+20>>2];o=+f[h+24>>2];n=+f[h+32>>2];l=+f[h+36>>2];j=+f[h+40>>2];k=v*q+u*p+m*o+ +f[h+52>>2];i=v*n+u*l+m*j+ +f[h+56>>2];f[d+36>>2]=v*t+u*s+m*r+ +f[h+48>>2];f[d+40>>2]=k;f[d+44>>2]=i;f[d+48>>2]=0.0;i=+f[d+172>>2];k=+f[d+176>>2];m=+f[d+180>>2];f[d+52>>2]=t*i+s*k+r*m;f[d+56>>2]=i*q+k*p+m*o;f[d+60>>2]=i*n+k*l+m*j;f[d+64>>2]=0.0;m=+f[d+188>>2];k=+f[d+192>>2];i=+f[d+196>>2];f[d+68>>2]=t*m+s*k+r*i;f[d+72>>2]=q*m+p*k+o*i;f[d+76>>2]=n*m+l*k+j*i;f[d+80>>2]=0.0;ea=h;return}function Zf(a,b,d){a=a|0;b=b|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;while(1){m=c[a+12>>2]|0;n=c[m+(((b+d|0)/2|0)<<2)>>2]|0;e=b;f=d;while(1){l=c[(c[n+28>>2]|0)+208>>2]|0;if((l|0)>-1)while(1){i=m+(e<<2)|0;h=c[i>>2]|0;g=c[(c[h+28>>2]|0)+208>>2]|0;if((g|0)<=-1)g=c[(c[h+32>>2]|0)+208>>2]|0;if((g|0)<(l|0))e=e+1|0;else{k=i;break}}else{j=c[(c[n+32>>2]|0)+208>>2]|0;while(1){i=m+(e<<2)|0;h=c[i>>2]|0;g=c[(c[h+28>>2]|0)+208>>2]|0;if((g|0)<=-1)g=c[(c[h+32>>2]|0)+208>>2]|0;if((g|0)<(j|0))e=e+1|0;else{k=i;break}}}if((l|0)>-1)while(1){g=m+(f<<2)|0;i=c[g>>2]|0;h=c[(c[i+28>>2]|0)+208>>2]|0;if((h|0)<=-1)h=c[(c[i+32>>2]|0)+208>>2]|0;if((l|0)<(h|0))f=f+-1|0;else break}else{j=c[(c[n+32>>2]|0)+208>>2]|0;while(1){g=m+(f<<2)|0;i=c[g>>2]|0;h=c[(c[i+28>>2]|0)+208>>2]|0;if((h|0)<=-1)h=c[(c[i+32>>2]|0)+208>>2]|0;if((j|0)<(h|0))f=f+-1|0;else break}}if((e|0)<=(f|0)){m=c[k>>2]|0;c[k>>2]=c[g>>2];c[(c[a+12>>2]|0)+(f<<2)>>2]=m;e=e+1|0;f=f+-1|0}if((e|0)>(f|0))break;m=c[a+12>>2]|0}if((f|0)>(b|0))Zf(a,b,f);if((e|0)<(d|0))b=e;else break}return}function _f(a,b,d,e,g,h,i,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=+j;k=k|0;l=+l;var m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0;c[a>>2]=c[h>>2];c[a+4>>2]=c[h+4>>2];c[a+8>>2]=c[h+8>>2];c[a+12>>2]=c[h+12>>2];t=+f[e+4>>2];q=+f[a+8>>2];o=+f[e+8>>2];u=+f[a+4>>2];n=+f[a>>2];w=+f[e>>2];x=(t*q-o*u)*+f[b>>2]+ +f[b+4>>2]*(o*n-q*w)+(u*w-t*n)*+f[b+8>>2];v=(t*q-o*u)*+f[b+16>>2]+(o*n-q*w)*+f[b+20>>2]+(u*w-t*n)*+f[b+24>>2];t=(t*q-o*u)*+f[b+32>>2]+(o*n-q*w)*+f[b+36>>2]+(u*w-t*n)*+f[b+40>>2];f[a+16>>2]=x;f[a+20>>2]=v;f[a+24>>2]=t;f[a+28>>2]=0.0;w=+f[g+4>>2];o=+f[g+8>>2];s=+f[g>>2];r=+f[d>>2]*(w*-q-o*-u)+ +f[d+4>>2]*(o*-n-s*-q)+(s*-u-w*-n)*+f[d+8>>2];p=(w*-q-o*-u)*+f[d+16>>2]+(o*-n-s*-q)*+f[d+20>>2]+(s*-u-w*-n)*+f[d+24>>2];n=(w*-q-o*-u)*+f[d+32>>2]+(o*-n-s*-q)*+f[d+36>>2]+(s*-u-w*-n)*+f[d+40>>2];f[a+32>>2]=r;f[a+36>>2]=p;f[a+40>>2]=n;f[a+44>>2]=0.0;w=+f[i>>2]*x;u=+f[i+4>>2]*v;s=+f[i+8>>2]*t;f[a+48>>2]=w;f[a+52>>2]=u;f[a+56>>2]=s;f[a+60>>2]=0.0;q=+f[k>>2]*r;o=+f[k+4>>2]*p;m=+f[k+8>>2]*n;f[a+64>>2]=q;f[a+68>>2]=o;f[a+72>>2]=m;f[a+76>>2]=0.0;f[a+80>>2]=x*w+v*u+t*s+j+l+(r*q+p*o+n*m);return}function $f(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0;v=ea;ea=ea+2048|0;if((e|0)<=0){ea=v;return}g=0;do{f[d+(g<<4)+12>>2]=-999999984306749440.0;g=g+1|0}while((g|0)!=(e|0));s=0;do{if((ra[c[(c[a>>2]|0)+96>>2]&127](a)|0)>0){o=b+(s<<4)|0;r=b+(s<<4)+4|0;n=b+(s<<4)+8|0;q=d+(s<<4)+12|0;p=d+(s<<4)|0;t=0;do{if(((ra[c[(c[a>>2]|0)+96>>2]&127](a)|0)-t|0)<128){g=(ra[c[(c[a>>2]|0)+96>>2]&127](a)|0)-t|0;if((g|0)>0)u=11;else{i=-3402823466385288598117041.0e14;g=-1}}else{g=128;u=11}if((u|0)==11){u=0;h=0;do{Ma[c[(c[a>>2]|0)+108>>2]&127](a,h,v+(h<<4)|0);h=h+1|0}while((h|0)!=(g|0));j=+f[o>>2];k=+f[r>>2];l=+f[n>>2];m=0;i=-3402823466385288598117041.0e14;h=-1;do{w=j*+f[v+(m<<4)>>2]+k*+f[v+(m<<4)+4>>2]+l*+f[v+(m<<4)+8>>2];x=w>i;h=x?m:h;i=x?w:i;m=m+1|0}while((m|0)!=(g|0));g=h}if(i>+f[q>>2]){x=v+(g<<4)|0;c[p>>2]=c[x>>2];c[p+4>>2]=c[x+4>>2];c[p+8>>2]=c[x+8>>2];c[p+12>>2]=c[x+12>>2];f[q>>2]=i}t=t+128|0}while((t|0)<(ra[c[(c[a>>2]|0)+96>>2]&127](a)|0))}s=s+1|0}while((s|0)!=(e|0));ea=v;return}function ag(a,b,c,d,e,g,h){a=a|0;b=+b;c=+c;d=+d;e=e|0;g=+g;h=h|0;var i=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;k=ea;ea=ea+16|0;j=c*g+ +f[a+52>>2];i=d*g+ +f[a+56>>2];f[h+48>>2]=b*g+ +f[a+48>>2];f[h+52>>2]=j;f[h+56>>2]=i;f[h+60>>2]=0.0;i=+f[e>>2];j=+f[e+4>>2];b=+f[e+8>>2];c=+s(+(i*i+j*j+b*b));c=c*g>.7853981852531433?.7853981852531433/g:c;if(c<1.0000000474974513e-03)d=g*.5-c*(g*g*g*.02083333395421505*c);else d=+v(+(c*.5*g))/c;b=b*d;m=j*d;o=i*d;q=+u(+(c*g*.5));Gg(a,k);n=+f[k>>2];p=+f[k+12>>2];i=+f[k+8>>2];g=+f[k+4>>2];c=1.0/+s(+((q*p-o*n-m*g-b*i)*(q*p-o*n-m*g-b*i)+((b*p+q*i+o*g-m*n)*(b*p+q*i+o*g-m*n)+((q*n+o*p+m*i-b*g)*(q*n+o*p+m*i-b*g)+(b*n+(m*p+q*g)-o*i)*(b*n+(m*p+q*g)-o*i)))));d=(q*n+o*p+m*i-b*g)*c;j=(b*n+(m*p+q*g)-o*i)*c;l=(b*p+q*i+o*g-m*n)*c;c=(q*p-o*n-m*g-b*i)*c;i=d*(2.0/(c*c+(l*l+(d*d+j*j))));g=j*(2.0/(c*c+(l*l+(d*d+j*j))));b=l*(2.0/(c*c+(l*l+(d*d+j*j))));f[h>>2]=1.0-(j*g+l*b);f[h+4>>2]=d*g-c*b;f[h+8>>2]=d*b+c*g;f[h+12>>2]=0.0;f[h+16>>2]=d*g+c*b;f[h+20>>2]=1.0-(d*i+l*b);f[h+24>>2]=j*b-c*i;f[h+28>>2]=0.0;f[h+32>>2]=d*b-c*g;f[h+36>>2]=j*b+c*i;f[h+40>>2]=1.0-(d*i+j*g);f[h+44>>2]=0.0;ea=k;return}function bg(b,d,e){b=b|0;d=+d;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;g=c[b+8>>2]|0;if(g|0?(c[g+204>>2]&3|0)==0:0){if((c[g+216>>2]&-2|0)!=4)c[g+216>>2]=1;f[g+220>>2]=0.0}g=c[b+12>>2]|0;if(g|0?(c[g+204>>2]&3|0)==0:0){if((c[g+216>>2]&-2|0)!=4)c[g+216>>2]=1;f[g+220>>2]=0.0}g=c[b+20>>2]|0;if(g|0?(c[g+204>>2]&3|0)==0:0){if((c[g+216>>2]&-2|0)!=4)c[g+216>>2]=1;f[g+220>>2]=0.0}g=c[b+24>>2]|0;if(g|0?(c[g+204>>2]&3|0)==0:0){if((c[g+216>>2]&-2|0)!=4)c[g+216>>2]=1;f[g+220>>2]=0.0}g=c[b+156>>2]|0;c[b+156>>2]=g+1;a[b+152>>0]=(g|0)>=(c[b+160>>2]|0)&1;if(g|0){c[b+72>>2]=0;c[b+72+4>>2]=0;c[b+72+8>>2]=0;c[b+72+12>>2]=0;c[b+72+16>>2]=0;c[b+72+20>>2]=0;c[b+72+24>>2]=0;c[b+72+28>>2]=0;return}j=+f[b+64>>2];i=1.0/d*(+f[b+72>>2]*j);h=1.0/d*(j*+f[b+76>>2]);d=1.0/d*(j*+f[b+80>>2]);f[b+72>>2]=i;f[b+76>>2]=h;f[b+80>>2]=d;f[b+84>>2]=0.0;j=+f[b+68>>2];if(j>0.0){l=j*i*+f[b+120>>2]+j*h*+f[b+124>>2]+j*d*+f[b+128>>2];k=j*i*+f[b+136>>2]+j*h*+f[b+140>>2]+j*d*+f[b+144>>2];f[b+88>>2]=j*i*+f[b+104>>2]+j*h*+f[b+108>>2]+j*d*+f[b+112>>2];f[b+92>>2]=l;f[b+96>>2]=k;f[b+100>>2]=0.0;f[b+72>>2]=(1.0-j)*i;f[b+76>>2]=(1.0-j)*h;f[b+80>>2]=(1.0-j)*d;i=(1.0-j)*i;h=(1.0-j)*h;d=(1.0-j)*d}f[b+72>>2]=1.0/+(e|0)*i;f[b+76>>2]=1.0/+(e|0)*h;f[b+80>>2]=1.0/+(e|0)*d;return}function cg(a,b,d,e,g,i,j){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;var k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0;q=ea;ea=ea+16|0;f[e>>2]=3402823466385288598117041.0e14;f[g>>2]=-3402823466385288598117041.0e14;l=c[a+96>>2]|0;if((l|0)>0){p=0;do{s=c[a+104>>2]|0;r=+f[s+(p<<4)>>2]*+f[a+12>>2];m=+f[s+(p<<4)+4>>2]*+f[a+16>>2];n=+f[s+(p<<4)+8>>2]*+f[a+20>>2];k=r*+f[b>>2]+m*+f[b+4>>2]+n*+f[b+8>>2]+ +f[b+48>>2];o=r*+f[b+16>>2]+m*+f[b+20>>2]+n*+f[b+24>>2]+ +f[b+52>>2];n=r*+f[b+32>>2]+m*+f[b+36>>2]+n*+f[b+40>>2]+ +f[b+56>>2];m=k*+f[d>>2]+o*+f[d+4>>2]+n*+f[d+8>>2];if(m<+f[e>>2]){f[e>>2]=m;f[i>>2]=k;f[i+4>>2]=o;f[i+8>>2]=n;f[i+12>>2]=0.0}if(m>+f[g>>2]){f[g>>2]=m;f[j>>2]=k;f[j+4>>2]=o;f[j+8>>2]=n;f[j+12>>2]=0.0}p=p+1|0}while((p|0)!=(l|0));m=+f[g>>2];l=(f[h>>2]=m,c[h>>2]|0)}else{l=-8388609;m=-3402823466385288598117041.0e14}k=+f[e>>2];if(!(k>m)){ea=q;return}c[e>>2]=l;f[g>>2]=k;c[q>>2]=c[i>>2];c[q+4>>2]=c[i+4>>2];c[q+8>>2]=c[i+8>>2];c[q+12>>2]=c[i+12>>2];c[i>>2]=c[j>>2];c[i+4>>2]=c[j+4>>2];c[i+8>>2]=c[j+8>>2];c[i+12>>2]=c[j+12>>2];c[j>>2]=c[q>>2];c[j+4>>2]=c[q+4>>2];c[j+8>>2]=c[q+8>>2];c[j+12>>2]=c[q+12>>2];ea=q;return}function dg(a,b){a=a|0;b=b|0;var d=0,e=0;d=ea;ea=ea+48|0;e=(c[a+48>>2]|0)+4|0;c[e>>2]=c[b>>2];c[e+4>>2]=c[b+4>>2];c[e+8>>2]=c[b+8>>2];c[e+12>>2]=c[b+12>>2];b=d+32+4|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;f[d+32>>2]=1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d+16|0,a,d+32|0);f[a+32>>2]=+f[d+16>>2]+ +f[a+12>>2];f[d+32>>2]=-1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d,a,d+32|0);c[d+16>>2]=c[d>>2];c[d+16+4>>2]=c[d+4>>2];c[d+16+8>>2]=c[d+8>>2];c[d+16+12>>2]=c[d+12>>2];f[a+16>>2]=+f[d+16>>2]-+f[a+12>>2];c[d+32>>2]=0;c[d+32+4>>2]=0;c[d+32+8>>2]=0;c[d+32+12>>2]=0;f[b>>2]=1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d+16|0,a,d+32|0);f[a+36>>2]=+f[d+16+4>>2]+ +f[a+12>>2];f[b>>2]=-1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d,a,d+32|0);c[d+16>>2]=c[d>>2];c[d+16+4>>2]=c[d+4>>2];c[d+16+8>>2]=c[d+8>>2];c[d+16+12>>2]=c[d+12>>2];f[a+20>>2]=+f[d+16+4>>2]-+f[a+12>>2];c[d+32>>2]=0;c[d+32+4>>2]=0;c[d+32+8>>2]=0;c[d+32+12>>2]=0;f[d+32+8>>2]=1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d+16|0,a,d+32|0);f[a+40>>2]=+f[d+16+8>>2]+ +f[a+12>>2];f[d+32+8>>2]=-1.0;Ma[c[(c[a>>2]|0)+68>>2]&127](d,a,d+32|0);c[d+16>>2]=c[d>>2];c[d+16+4>>2]=c[d+4>>2];c[d+16+8>>2]=c[d+8>>2];c[d+16+12>>2]=c[d+12>>2];f[a+24>>2]=+f[d+16+8>>2]-+f[a+12>>2];ea=d;return}function eg(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0.0,i=0.0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0;j=ea;ea=ea+48|0;m=+f[d>>2];n=+f[d+4>>2];l=+f[d+8>>2];o=m*+f[b+4>>2]+n*+f[b+20>>2]+l*+f[b+36>>2];p=m*+f[b+8>>2]+n*+f[b+24>>2]+l*+f[b+40>>2];f[j+32>>2]=+f[b>>2]*m+ +f[b+16>>2]*n+ +f[b+32>>2]*l;f[j+32+4>>2]=o;f[j+32+8>>2]=p;f[j+32+12>>2]=0.0;Ma[c[(c[a>>2]|0)+64>>2]&127](j+16|0,a,j+32|0);p=+f[j+16>>2];o=+f[j+16+4>>2];l=+f[j+16+8>>2];n=p*+f[b>>2]+o*+f[b+4>>2]+l*+f[b+8>>2]+ +f[b+48>>2];m=p*+f[b+16>>2]+o*+f[b+20>>2]+l*+f[b+24>>2]+ +f[b+52>>2];l=p*+f[b+32>>2]+o*+f[b+36>>2]+l*+f[b+40>>2]+ +f[b+56>>2];q=c[(c[a>>2]|0)+64>>2]|0;o=-+f[j+32+4>>2];p=-+f[j+32+8>>2];f[j>>2]=-+f[j+32>>2];f[j+4>>2]=o;f[j+8>>2]=p;f[j+12>>2]=0.0;Ma[q&127](j+16|0,a,j);p=+f[j+16>>2];o=+f[j+16+4>>2];i=+f[j+16+8>>2];k=p*+f[b>>2]+o*+f[b+4>>2]+i*+f[b+8>>2]+ +f[b+48>>2];h=p*+f[b+16>>2]+o*+f[b+20>>2]+i*+f[b+24>>2]+ +f[b+52>>2];i=p*+f[b+32>>2]+o*+f[b+36>>2]+i*+f[b+40>>2]+ +f[b+56>>2];f[e>>2]=n*+f[d>>2]+m*+f[d+4>>2]+l*+f[d+8>>2];i=k*+f[d>>2]+h*+f[d+4>>2]+i*+f[d+8>>2];f[g>>2]=i;h=+f[e>>2];if(!(h>i)){ea=j;return}f[e>>2]=i;f[g>>2]=h;ea=j;return}function fg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0,r=0.0,t=0.0,u=0.0,v=0;q=ea;ea=ea+2048|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;e=+f[d>>2];g=+f[d+4>>2];h=+f[d+8>>2];if(e*e+g*g+h*h<1.4210854715202004e-14){p=1.0;o=0.0;h=0.0}else{r=1.0/+s(+(e*e+g*g+h*h));p=e*r;o=g*r;h=h*r}m=c[b+92>>2]|0;if((m|0)<=0){ea=q;return}n=0;g=-999999984306749440.0;i=c[b+100>>2]|0;j=c[b+120>>2]|0;while(1){k=m-n|0;l=(k|0)<128?k:128;if((k|0)>0){d=0;do{e=+f[j>>2];u=+f[i>>2]+p*+f[b+12>>2]*e;t=o*+f[b+16>>2]*e+ +f[i+4>>2];e=e*(h*+f[b+20>>2])+ +f[i+8>>2];r=+ha[c[(c[b>>2]|0)+48>>2]&15](b);f[q+(d<<4)>>2]=u-p*r;f[q+(d<<4)+4>>2]=t-o*r;f[q+(d<<4)+8>>2]=e-h*r;f[q+(d<<4)+12>>2]=0.0;i=i+16|0;j=j+4|0;d=d+1|0}while((d|0)<(l|0));k=0;e=-3402823466385288598117041.0e14;d=-1;do{u=p*+f[q+(k<<4)>>2]+o*+f[q+(k<<4)+4>>2]+h*+f[q+(k<<4)+8>>2];v=u>e;d=v?k:d;e=v?u:e;k=k+1|0}while((k|0)!=(l|0))}else{e=-3402823466385288598117041.0e14;d=-1}if(e>g){v=q+(d<<4)|0;c[a>>2]=c[v>>2];c[a+4>>2]=c[v+4>>2];c[a+8>>2]=c[v+8>>2];c[a+12>>2]=c[v+12>>2]}else e=g;n=n+128|0;if((m|0)<=(n|0))break;else g=e}ea=q;return}function gg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,h=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{e=(c[d>>2]|0)+(4-1)&~(4-1);b=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=b;break a}case 10:{b=(c[d>>2]|0)+(4-1)&~(4-1);e=c[b>>2]|0;c[d>>2]=b+4;c[a>>2]=e;c[a+4>>2]=((e|0)<0)<<31>>31;break a}case 11:{b=(c[d>>2]|0)+(4-1)&~(4-1);e=c[b>>2]|0;c[d>>2]=b+4;c[a>>2]=e;c[a+4>>2]=0;break a}case 12:{f=(c[d>>2]|0)+(8-1)&~(8-1);b=c[f>>2]|0;e=c[f+4>>2]|0;c[d>>2]=f+8;c[a>>2]=b;c[a+4>>2]=e;break a}case 13:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=(f&65535)<<16>>16;c[a+4>>2]=(((f&65535)<<16>>16|0)<0)<<31>>31;break a}case 14:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=f&65535;c[a+4>>2]=0;break a}case 15:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=(f&255)<<24>>24;c[a+4>>2]=(((f&255)<<24>>24|0)<0)<<31>>31;break a}case 16:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=f&255;c[a+4>>2]=0;break a}case 17:{f=(c[d>>2]|0)+(8-1)&~(8-1);h=+g[f>>3];c[d>>2]=f+8;g[a>>3]=h;break a}case 18:{hu(a,d);break a}default:break a}while(0);while(0);return}function hg(a,b,d){a=a|0;b=b|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;n=ea;ea=ea+16|0;j=c[a+12>>2]|0;k=c[j+(((d+b|0)/2|0)<<4)>>2]|0;l=c[j+(((d+b|0)/2|0)<<4)+4>>2]|0;m=c[j+(((d+b|0)/2|0)<<4)+8>>2]|0;e=b;f=d;while(1){while(1){i=j+(e<<4)|0;g=c[j+(e<<4)+4>>2]|0;if((g|0)>=(l|0)){if((g|0)!=(l|0))break;g=c[i>>2]|0;if((g|0)>=(k|0)){if((g|0)!=(k|0))break;if((c[j+(e<<4)+8>>2]|0)>=(m|0))break}}e=e+1|0}while(1){h=j+(f<<4)|0;g=c[j+(f<<4)+4>>2]|0;if((l|0)>=(g|0)){if((l|0)!=(g|0))break;g=c[h>>2]|0;if((k|0)>=(g|0)){if((k|0)!=(g|0))break;if((m|0)>=(c[j+(f<<4)+8>>2]|0))break}}f=f+-1|0}if((e|0)<=(f|0)){c[n>>2]=c[i>>2];c[n+4>>2]=c[i+4>>2];c[n+8>>2]=c[i+8>>2];c[n+12>>2]=c[i+12>>2];c[i>>2]=c[h>>2];c[i+4>>2]=c[h+4>>2];c[i+8>>2]=c[h+8>>2];c[i+12>>2]=c[h+12>>2];j=(c[a+12>>2]|0)+(f<<4)|0;c[j>>2]=c[n>>2];c[j+4>>2]=c[n+4>>2];c[j+8>>2]=c[n+8>>2];c[j+12>>2]=c[n+12>>2];e=e+1|0;f=f+-1|0}if((e|0)>(f|0))break;j=c[a+12>>2]|0}if((f|0)>(b|0))hg(a,b,f);if((e|0)>=(d|0)){ea=n;return}hg(a,e,d);ea=n;return}function ig(a){a=a|0;var b=0,d=0,e=0.0,g=0.0,h=0.0,i=0,j=0;i=c[a+28>>2]|0;e=0.0;g=0.0;h=0.0;j=0;a:while(1){switch(j&2147483647|0){case 0:{e=+f[a+80>>2]+ +f[a+64>>2];g=+f[a+84>>2]+ +f[a+68>>2];h=+f[a+88>>2]+ +f[a+72>>2];break}case 1:{e=+f[a+80>>2]+ +f[a+64>>2];g=+f[a+84>>2]+ +f[a+68>>2];h=+f[a+72>>2]-+f[a+88>>2];break}case 2:{e=+f[a+80>>2]+ +f[a+64>>2];g=+f[a+68>>2]-+f[a+84>>2];h=+f[a+88>>2]+ +f[a+72>>2];break}case 3:{e=+f[a+80>>2]+ +f[a+64>>2];g=+f[a+68>>2]-+f[a+84>>2];h=+f[a+72>>2]-+f[a+88>>2];break}case 4:{e=+f[a+64>>2]-+f[a+80>>2];g=+f[a+84>>2]+ +f[a+68>>2];h=+f[a+88>>2]+ +f[a+72>>2];break}case 5:{e=+f[a+64>>2]-+f[a+80>>2];g=+f[a+84>>2]+ +f[a+68>>2];h=+f[a+72>>2]-+f[a+88>>2];break}case 6:{e=+f[a+64>>2]-+f[a+80>>2];g=+f[a+68>>2]-+f[a+84>>2];h=+f[a+88>>2]+ +f[a+72>>2];break}case 7:{e=+f[a+64>>2]-+f[a+80>>2];g=+f[a+68>>2]-+f[a+84>>2];h=+f[a+72>>2]-+f[a+88>>2];break}default:{}}if((i|0)>0){b=c[a+36>>2]|0;d=0;do{if(+f[b+(d*36|0)+32>>2]+(e*+f[b+(d*36|0)+20>>2]+g*+f[b+(d*36|0)+24>>2]+h*+f[b+(d*36|0)+28>>2])>0.0){b=0;d=16;break a}d=d+1|0}while((d|0)<(i|0))}j=j+1|0;if(j>>>0>=8){b=1;d=16;break}}if((d|0)==16)return b|0;return 0}function jg(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0;if((c[a>>2]|0)==(b|0)){c[a>>2]=0;a=0;return a|0}e=c[b+32>>2]|0;d=c[e+32>>2]|0;b=c[e+36+(((c[e+40>>2]|0)!=(b|0)&1)<<2)>>2]|0;if(!d){c[a>>2]=b;c[b+32>>2]=0;d=c[a+4>>2]|0;if(!d)d=b;else{c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[a>>2]|0}c[a+4>>2]=e;a=d;return a|0}c[d+36+(((c[d+40>>2]|0)==(e|0)&1)<<2)>>2]=b;c[b+32>>2]=d;b=c[a+4>>2]|0;if(b|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}c[a+4>>2]=e;do{q=+f[d>>2];x=d+4|0;o=+f[x>>2];v=d+8|0;m=+f[v>>2];y=d+16|0;s=+f[y>>2];w=d+20|0;k=+f[w>>2];e=d+24|0;i=+f[e>>2];u=c[d+36>>2]|0;b=c[d+40>>2]|0;t=+f[u>>2];p=+f[b>>2];p=t>2]=p;t=+f[u+16>>2];r=+f[b+16>>2];r=t>r?t:r;f[y>>2]=r;t=+f[u+4>>2];n=+f[b+4>>2];n=t>2]=n;t=+f[u+20>>2];j=+f[b+20>>2];j=t>j?t:j;f[w>>2]=j;t=+f[u+8>>2];l=+f[b+8>>2];l=t>2]=l;t=+f[u+24>>2];h=+f[b+24>>2];h=t>h?t:h;f[e>>2]=h;if(!(s!=r|(q!=p|o!=n|m!=l))?!(k!=j|i!=h):0){g=14;break}d=c[d+32>>2]|0}while((d|0)!=0);if((g|0)==14)return d|0;y=c[a>>2]|0;return y|0}function kg(a,b,d,e,g,i,j){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;var k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0.0,s=0;q=ea;ea=ea+16|0;f[e>>2]=3402823466385288598117041.0e14;f[g>>2]=-3402823466385288598117041.0e14;l=c[a+8>>2]|0;if((l|0)>0){p=0;do{s=c[a+16>>2]|0;r=+f[s+(p<<4)>>2];m=+f[s+(p<<4)+4>>2];n=+f[s+(p<<4)+8>>2];k=r*+f[b>>2]+m*+f[b+4>>2]+n*+f[b+8>>2]+ +f[b+48>>2];o=r*+f[b+16>>2]+m*+f[b+20>>2]+n*+f[b+24>>2]+ +f[b+52>>2];n=r*+f[b+32>>2]+m*+f[b+36>>2]+n*+f[b+40>>2]+ +f[b+56>>2];m=k*+f[d>>2]+o*+f[d+4>>2]+n*+f[d+8>>2];if(m<+f[e>>2]){f[e>>2]=m;f[i>>2]=k;f[i+4>>2]=o;f[i+8>>2]=n;f[i+12>>2]=0.0}if(m>+f[g>>2]){f[g>>2]=m;f[j>>2]=k;f[j+4>>2]=o;f[j+8>>2]=n;f[j+12>>2]=0.0}p=p+1|0}while((p|0)!=(l|0));m=+f[g>>2];l=(f[h>>2]=m,c[h>>2]|0)}else{l=-8388609;m=-3402823466385288598117041.0e14}k=+f[e>>2];if(!(k>m)){ea=q;return}c[e>>2]=l;f[g>>2]=k;c[q>>2]=c[i>>2];c[q+4>>2]=c[i+4>>2];c[q+8>>2]=c[i+8>>2];c[q+12>>2]=c[i+12>>2];c[i>>2]=c[j>>2];c[i+4>>2]=c[j+4>>2];c[i+8>>2]=c[j+8>>2];c[i+12>>2]=c[j+12>>2];c[j>>2]=c[q>>2];c[j+4>>2]=c[q+4>>2];c[j+8>>2]=c[q+8>>2];c[j+12>>2]=c[q+12>>2];ea=q;return}function lg(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0;m=ea;ea=ea+16|0;if((g|0)>-3){c[6747]=(c[6747]|0)+1;a=kb((g+3<<4|3)+16|0)|0;if(!a)l=0;else{c[(a+4+15&-16)+-4>>2]=a;l=a+4+15&-16}a=0;do{i=l+(a<<4)|0;c[i>>2]=c[m>>2];c[i+4>>2]=c[m+4>>2];c[i+8>>2]=c[m+8>>2];c[i+12>>2]=c[m+12>>2];a=a+1|0}while((a|0)!=(g+3|0));h=0;i=l;while(1){if(!h)j=0.0;else{a=h;k=.5;j=0.0;while(1){j=(a&1|0)==0?j:j+k;a=1?a>>1:a;if(!a)break;else k=k*.5}}k=j*2.0+-1.0;o=(+(h<<1|0)*3.1415927410125732+3.1415927410125732)/+(g+3|0);n=+s(+(1.0-k*k));j=+v(+o)*n;f[i>>2]=+u(+o)*n;f[i+4>>2]=j;f[i+8>>2]=k;f[i+12>>2]=0.0;h=h+1|0;if((h|0)==(g+3|0))break;else i=i+16|0}a=0;do{p=l+(a<<4)|0;h=l+(a<<4)+4|0;i=l+(a<<4)+8|0;n=+f[h>>2]*+f[e+4>>2]+ +f[d+4>>2];o=+f[i>>2]*+f[e+8>>2]+ +f[d+8>>2];f[p>>2]=+f[p>>2]*+f[e>>2]+ +f[d>>2];f[h>>2]=n;f[i>>2]=o;f[l+(a<<4)+12>>2]=0.0;a=a+1|0}while((a|0)<(g+3|0));i=l;h=l}else{i=0;h=0}a=wc(b,h,g+3|0,1)|0;if((h|0)==0|(i|0)==0){ea=m;return a|0}c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);ea=m;return a|0}function mg(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=ea;ea=ea+32|0;j=(a[b+28>>0]|0)!=0;k=j?e:d;j=j?d:e;h=c[k+4>>2]|0;i=c[h+16>>2]|0;g=c[b+12>>2]|0;if((g|0)<(i|0)){if((c[b+16>>2]|0)<(i|0)){if(!i){e=g;f=0}else{c[6747]=(c[6747]|0)+1;d=kb((i<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}e=c[b+12>>2]|0;f=d}if((e|0)>0){d=0;do{c[f+(d<<2)>>2]=c[(c[b+20>>2]|0)+(d<<2)>>2];d=d+1|0}while((d|0)!=(e|0))}d=c[b+20>>2]|0;if(d|0){if(a[b+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+20>>2]=0}a[b+24>>0]=1;c[b+20>>2]=f;c[b+16>>2]=i;e=b+20|0}else e=b+20|0;d=g;do{c[(c[e>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(i|0))}c[b+12>>2]=i;if((i|0)<=0){ea=l;return}d=0;do{if(!(c[h+64>>2]|0)){e=c[(c[h+24>>2]|0)+(d*80|0)+64>>2]|0;f=c[k+8>>2]|0;g=c[k+12>>2]|0;c[l>>2]=k;c[l+4>>2]=e;c[l+8>>2]=f;c[l+12>>2]=g;c[l+16>>2]=-1;c[l+20>>2]=d;g=c[b+4>>2]|0;g=wa[c[(c[g>>2]|0)+8>>2]&31](g,l,j,c[b+32>>2]|0)|0;c[(c[b+20>>2]|0)+(d<<2)>>2]=g}else c[(c[b+20>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(i|0));ea=l;return}function ng(a,b,e){a=a|0;b=b|0;e=e|0;ch(a,b,e)|0;c[b+52>>2]=c[a+48>>2];c[b+56>>2]=c[a+52>>2];c[b+60>>2]=c[a+56>>2];c[b+64>>2]=c[a+60>>2];c[b+68>>2]=c[a+64>>2];c[b+72>>2]=c[a+68>>2];c[b+76>>2]=c[a+72>>2];c[b+80>>2]=c[a+76>>2];c[b+84>>2]=c[a+80>>2];c[b+88>>2]=c[a+84>>2];c[b+92>>2]=c[a+88>>2];c[b+96>>2]=c[a+92>>2];c[b+100>>2]=c[a+96>>2];c[b+104>>2]=c[a+100>>2];c[b+108>>2]=c[a+104>>2];c[b+112>>2]=c[a+108>>2];c[b+116>>2]=c[a+112>>2];c[b+120>>2]=c[a+116>>2];c[b+124>>2]=c[a+120>>2];c[b+128>>2]=c[a+124>>2];c[b+132>>2]=c[a+128>>2];c[b+136>>2]=c[a+132>>2];c[b+140>>2]=c[a+136>>2];c[b+144>>2]=c[a+140>>2];c[b+148>>2]=c[a+144>>2];c[b+152>>2]=c[a+148>>2];c[b+156>>2]=c[a+152>>2];c[b+160>>2]=c[a+156>>2];c[b+164>>2]=c[a+160>>2];c[b+168>>2]=c[a+164>>2];c[b+172>>2]=c[a+168>>2];c[b+176>>2]=c[a+172>>2];c[b+228>>2]=c[a+868>>2];c[b+212>>2]=c[a+872>>2];c[b+196>>2]=c[a+680>>2];c[b+180>>2]=c[a+696>>2];c[b+232>>2]=c[a+932>>2];c[b+216>>2]=c[a+936>>2];c[b+200>>2]=c[a+684>>2];c[b+184>>2]=c[a+700>>2];c[b+236>>2]=c[a+996>>2];c[b+220>>2]=c[a+1e3>>2];c[b+204>>2]=c[a+688>>2];c[b+188>>2]=c[a+704>>2];c[b+244>>2]=d[a+1300>>0];c[b+248>>2]=d[a+1301>>0];return 15073}function og(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[b+32>>2]|0;if(!d)g=0;else g=c[b+40>>2]|0;e=c[b+52>>2]|0;if(!e)h=0;else h=c[b+60>>2]|0;f=c[b+72>>2]|0;if(!f)i=0;else i=c[b+80>>2]|0;j=c[b+8>>2]|0;+qa[c[(c[j>>2]|0)+12>>2]&3](j,g,d,h,e,i,f,c[b+4>>2]|0,c[b+20>>2]|0,c[b+24>>2]|0);d=c[b+32>>2]|0;if((d|0)<0){if((c[b+36>>2]|0)<0){e=c[b+40>>2]|0;if(e|0){if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+40>>2]=0}a[b+44>>0]=1;c[b+40>>2]=0;c[b+36>>2]=0}do{c[(c[b+40>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=0)}c[b+32>>2]=0;d=c[b+52>>2]|0;if((d|0)<0){if((c[b+56>>2]|0)<0){e=c[b+60>>2]|0;if(e|0){if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+60>>2]=0}a[b+64>>0]=1;c[b+60>>2]=0;c[b+56>>2]=0}do{c[(c[b+60>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=0)}c[b+52>>2]=0;d=c[b+72>>2]|0;if((d|0)>=0){c[b+72>>2]=0;return}if((c[b+76>>2]|0)<0){e=c[b+80>>2]|0;if(e|0){if(a[b+84>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+80>>2]=0}a[b+84>>0]=1;c[b+80>>2]=0;c[b+76>>2]=0}do{c[(c[b+80>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=0);c[b+72>>2]=0;return}function pg(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;c[6747]=(c[6747]|0)+1;d=kb(39)|0;if(!d)i=0;else{c[(d+4+15&-16)+-4>>2]=d;i=d+4+15&-16}g=i;c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0;if((c[b+872>>2]|0)>0){h=c[c[b+880>>2]>>2]|0;c[i>>2]=c[h>>2];c[i+4>>2]=c[h+4>>2];c[i+8>>2]=c[h+8>>2];c[i+12>>2]=c[h+12>>2];c[i+16>>2]=c[h+16>>2]}else{c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0}d=c[b+872>>2]|0;if((d|0)!=(c[b+876>>2]|0)){h=d;f=b+880|0;f=c[f>>2]|0;f=f+(h<<2)|0;c[f>>2]=g;h=h+1|0;c[b+872>>2]=h;return i|0}h=(d|0)==0?1:d<<1;if((d|0)>=(h|0)){h=d;f=b+880|0;f=c[f>>2]|0;f=f+(h<<2)|0;c[f>>2]=g;h=h+1|0;c[b+872>>2]=h;return i|0}if(!h)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((h<<2|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[b+872>>2]|0}if((d|0)>0){f=0;do{c[e+(f<<2)>>2]=c[(c[b+880>>2]|0)+(f<<2)>>2];f=f+1|0}while((f|0)!=(d|0))}f=c[b+880>>2]|0;if(f){if(a[b+884>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0);d=c[b+872>>2]|0}c[b+880>>2]=0}a[b+884>>0]=1;c[b+880>>2]=e;c[b+876>>2]=h;h=d;f=b+880|0;f=c[f>>2]|0;f=f+(h<<2)|0;c[f>>2]=g;h=h+1|0;c[b+872>>2]=h;return i|0}function qg(b,d){b=b|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;e=c[b+4>>2]|0;if((e|0)==(c[b+8>>2]|0)){Gm(b,(e|0)==0?1:e<<1);e=c[b+4>>2]|0}o=c[b+12>>2]|0;l=o+(e*36|0)+16|0;a[l>>0]=1;k=o+(e*36|0)+12|0;c[k>>2]=0;m=o+(e*36|0)+4|0;c[m>>2]=0;j=o+(e*36|0)+8|0;c[j>>2]=0;p=c[d+4>>2]|0;if((p|0)<=0){c[m>>2]=p;p=o+(e*36|0)+20|0;d=d+20|0;c[p>>2]=c[d>>2];c[p+4>>2]=c[d+4>>2];c[p+8>>2]=c[d+8>>2];c[p+12>>2]=c[d+12>>2];d=c[b+4>>2]|0;d=d+1|0;c[b+4>>2]=d;return}c[6747]=(c[6747]|0)+1;f=kb((p<<2|3)+16|0)|0;if(!f)i=0;else{c[(f+4+15&-16)+-4>>2]=f;i=f+4+15&-16}g=c[m>>2]|0;h=c[k>>2]|0;if((g|0)<=0){if(h|0)n=10}else{f=0;do{c[i+(f<<2)>>2]=c[h+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0));n=10}if((n|0)==10?a[l>>0]|0:0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}a[l>>0]=1;c[k>>2]=i;c[j>>2]=p;hk(i|0,0,p<<2|0)|0;c[m>>2]=p;f=c[k>>2]|0;g=c[d+12>>2]|0;h=0;do{c[f+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(p|0));p=o+(e*36|0)+20|0;d=d+20|0;c[p>>2]=c[d>>2];c[p+4>>2]=c[d+4>>2];c[p+8>>2]=c[d+8>>2];c[p+12>>2]=c[d+12>>2];d=c[b+4>>2]|0;d=d+1|0;c[b+4>>2]=d;return}function rg(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=+g;var h=0,i=0.0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;l=+f[d>>2];if(+f[b>>2]<=l){i=+f[d+4>>2];if((((+f[b+4>>2]<=i?+f[b+8>>2]<=+f[d+8>>2]:0)?+f[b+16>>2]>=+f[d+16>>2]:0)?+f[b+20>>2]>=+f[d+20>>2]:0)?+f[b+24>>2]>=+f[d+24>>2]:0){d=0;return d|0}else h=d+4|0}else{i=+f[d+4>>2];h=d+4|0}f[d>>2]=l-g;n=i-g;f[h>>2]=n;i=+f[d+8>>2]-g;f[d+8>>2]=i;q=+f[d+16>>2]+g;f[d+16>>2]=q;o=+f[d+20>>2]+g;f[d+20>>2]=o;m=+f[d+24>>2]+g;f[d+24>>2]=m;p=+f[e>>2];f[(p>0.0?d+16|0:d)>>2]=(p>0.0?q:l-g)+p;g=+f[e+4>>2];f[(g>0.0?d+20|0:h)>>2]=(g>0.0?o:n)+g;g=+f[e+8>>2];f[(g>0.0?d+24|0:d+8|0)>>2]=(g>0.0?m:i)+g;h=jg(a,b)|0;a:do if(h){j=c[a+8>>2]|0;if((j|0)<=-1){h=c[a>>2]|0;break}if(j){k=0;e=h;while(1){h=c[e+32>>2]|0;k=k+1|0;if(!h){h=e;break a}if((k|0)>=(j|0))break;else e=h}}}else h=0;while(0);c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];je(a,h,b);d=1;return d|0}function sg(a,b,d,e,g,i){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,g,i);l=c[i>>2]|0;o=c[i+4>>2]|0;j=c[i+8>>2]|0;m=c[g>>2]|0;k=c[g+4>>2]|0;b=c[g+8>>2]|0;n=+f[d>>2];p=+f[d+4>>2];q=+f[d+8>>2];if(n>0.0)l=(f[h>>2]=n+(c[h>>2]=l,+f[h>>2]),c[h>>2]|0);else m=(f[h>>2]=n+(c[h>>2]=m,+f[h>>2]),c[h>>2]|0);if(p>0.0)d=(f[h>>2]=p+(c[h>>2]=o,+f[h>>2]),c[h>>2]|0);else{d=o;k=(f[h>>2]=p+(c[h>>2]=k,+f[h>>2]),c[h>>2]|0)}if(q>0.0)j=(f[h>>2]=q+(c[h>>2]=j,+f[h>>2]),c[h>>2]|0);else b=(f[h>>2]=q+(c[h>>2]=b,+f[h>>2]),c[h>>2]|0);n=+f[e>>2];p=+f[e+4>>2];q=+f[e+8>>2];q=+s(+(n*n+p*p+q*q));q=q*+ha[c[(c[a>>2]|0)+16>>2]&15](a);c[g>>2]=m;c[g+4>>2]=k;c[g+8>>2]=b;f[g+12>>2]=0.0;c[i>>2]=l;c[i+4>>2]=d;c[i+8>>2]=j;f[i+12>>2]=0.0;f[g>>2]=+f[g>>2]-q;f[g+4>>2]=+f[g+4>>2]-q;f[g+8>>2]=+f[g+8>>2]-q;f[i>>2]=q+ +f[i>>2];f[i+4>>2]=q+ +f[i+4>>2];f[i+8>>2]=q+ +f[i+8>>2];return}function tg(b,d,e){b=b|0;d=+d;e=e|0;var g=0,h=0.0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;j=c[b+712>>2]|0;if(e){if((j|0)>0){e=c[b+720>>2]|0;g=0;do{f[e+(g*104|0)+88>>2]=0.0;g=g+1|0}while((g|0)!=(j|0))}e=c[b+752>>2]|0;if((e|0)>0){g=c[b+760>>2]|0;i=0;do{m=c[g+(i*44|0)+8>>2]|0;l=c[g+(i*44|0)+12>>2]|0;k=c[g+(i*44|0)+16>>2]|0;o=+f[m+8>>2];q=+f[m+12>>2];h=+f[m+16>>2];n=+f[l+8>>2]-o;r=+f[l+12>>2]-q;p=+f[l+16>>2]-h;o=+f[k+8>>2]-o;q=+f[k+12>>2]-q;h=+f[k+16>>2]-h;h=+s(+((n*q-r*o)*(n*q-r*o)+((r*h-p*q)*(r*h-p*q)+(p*o-n*h)*(p*o-n*h))));f[m+88>>2]=h+ +f[m+88>>2];f[l+88>>2]=h+ +f[l+88>>2];f[k+88>>2]=h+ +f[k+88>>2];i=i+1|0}while((i|0)!=(e|0))}if((j|0)<=0){m=b+924|0;a[m>>0]=1;return}e=c[b+720>>2]|0;g=0;do{m=e+(g*104|0)+88|0;f[m>>2]=1.0/+f[m>>2];g=g+1|0}while((g|0)!=(j|0))}if((j|0)<=0){m=b+924|0;a[m>>0]=1;return}g=c[b+720>>2]|0;e=0;h=0.0;do{r=+f[g+(e*104|0)+88>>2];h=h+(r>0.0?1.0/r:0.0);e=e+1|0}while((e|0)!=(j|0));h=1.0/h*d;e=0;do{m=g+(e*104|0)+88|0;f[m>>2]=+f[m>>2]/h;e=e+1|0}while((e|0)!=(j|0));m=b+924|0;a[m>>0]=1;return}function ug(b,d){b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0,j=0,k=0.0,l=0.0;e=c[d+204>>2]|0;if((e&3|0)==0?(c[d+504>>2]&1|0)==0:0){h=+f[d+344>>2];if(h!=0.0){l=1.0/h*+f[b+252>>2];k=1.0/h*+f[b+256>>2];f[d+364>>2]=1.0/h*+f[b+248>>2];f[d+368>>2]=l;f[d+372>>2]=k;f[d+376>>2]=0.0}c[d+380>>2]=c[b+248>>2];c[d+380+4>>2]=c[b+248+4>>2];c[d+380+8>>2]=c[b+248+8>>2];c[d+380+12>>2]=c[b+248+12>>2]}if(!(c[d+192>>2]|0))return;if(e&1)if((c[d+216>>2]&-2|0)==4)e=e&3;else{c[d+216>>2]=2;e=e&3}else{g=c[b+232>>2]|0;if((g|0)==(c[b+236>>2]|0)?(j=(g|0)==0?1:g<<1,(g|0)<(j|0)):0){if(!j)e=0;else{c[6747]=(c[6747]|0)+1;e=kb((j<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+232>>2]|0}if((g|0)>0){i=0;do{c[e+(i<<2)>>2]=c[(c[b+240>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[b+240>>2]|0;if(i){if(a[b+244>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[b+232>>2]|0}c[b+240>>2]=0}a[b+244>>0]=1;c[b+240>>2]=e;c[b+236>>2]=j;e=c[d+204>>2]&3}else e=e&3;c[(c[b+240>>2]|0)+(g<<2)>>2]=d;c[b+232>>2]=g+1}j=(e|0)!=0;Pa[c[(c[b>>2]|0)+36>>2]&127](b,d,j?2:1,j?-3:-1);return}function vg(a,b,d,e,g){a=a|0;b=b|0;d=+d;e=e|0;g=g|0;var h=0,i=0.0,j=0.0;h=ea;ea=ea+240|0;_p(h+224|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],d);rj(b,h+208|0,h+192|0);_p(h+160|0,+f[h+208>>2],+f[h+208+4>>2],+f[h+208+8>>2],100.0);j=+f[h+224>>2];i=+f[h+224+4>>2];d=+f[h+224+8>>2];vp(h+176|0,j,i,d,+f[h+160>>2],+f[h+160+4>>2],+f[h+160+8>>2]);_p(h+128|0,+f[h+208>>2],+f[h+208+4>>2],+f[h+208+8>>2],100.0);xp(h+144|0,j,i,d,+f[h+128>>2],+f[h+128+4>>2],+f[h+128+8>>2]);_p(h+96|0,+f[h+192>>2],+f[h+192+4>>2],+f[h+192+8>>2],100.0);vp(h+112|0,j,i,d,+f[h+96>>2],+f[h+96+4>>2],+f[h+96+8>>2]);_p(h+64|0,+f[h+192>>2],+f[h+192+4>>2],+f[h+192+8>>2],100.0);xp(h+80|0,j,i,d,+f[h+64>>2],+f[h+64+4>>2],+f[h+64+8>>2]);b=c[(c[a>>2]|0)+8>>2]|0;dw(h+48|0,e,+f[h+176>>2],+f[h+176+4>>2],+f[h+176+8>>2]);dw(h+32|0,e,+f[h+144>>2],+f[h+144+4>>2],+f[h+144+8>>2]);Pa[b&127](a,h+48|0,h+32|0,g);b=c[(c[a>>2]|0)+8>>2]|0;dw(h+16|0,e,+f[h+112>>2],+f[h+112+4>>2],+f[h+112+8>>2]);dw(h,e,+f[h+80>>2],+f[h+80+4>>2],+f[h+80+8>>2]);Pa[b&127](a,h+16|0,h,g);ea=h;return}function wg(a,b,d,e,g,h,i,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0.0,n=0.0;l=ea;ea=ea+80|0;n=+f[h+52>>2]-+f[g+52>>2];m=+f[h+56>>2]-+f[g+56>>2];f[l+56>>2]=+f[h+48>>2]-+f[g+48>>2];f[l+56+4>>2]=n;f[l+56+8>>2]=m;f[l+56+12>>2]=0.0;if(Bb(d,g,e,h,l+56|0,l,1)|0){c[j>>2]=c[l+4>>2];c[j+4>>2]=c[l+4+4>>2];c[j+8>>2]=c[l+4+8>>2];c[j+12>>2]=c[l+4+12>>2];c[k>>2]=c[l+20>>2];c[k+4>>2]=c[l+20+4>>2];c[k+8>>2]=c[l+20+8>>2];c[k+12>>2]=c[l+20+12>>2];c[i>>2]=c[l+36>>2];c[i+4>>2]=c[l+36+4>>2];c[i+8>>2]=c[l+36+8>>2];c[i+12>>2]=c[l+36+12>>2];k=1;ea=l;return k|0}if(!(Fc(d,g,e,h,l+56|0,l)|0)){k=0;ea=l;return k|0}c[j>>2]=c[l+4>>2];c[j+4>>2]=c[l+4+4>>2];c[j+8>>2]=c[l+4+8>>2];c[j+12>>2]=c[l+4+12>>2];c[k>>2]=c[l+20>>2];c[k+4>>2]=c[l+20+4>>2];c[k+8>>2]=c[l+20+8>>2];c[k+12>>2]=c[l+20+12>>2];c[i>>2]=c[l+36>>2];c[i+4>>2]=c[l+36+4>>2];c[i+8>>2]=c[l+36+8>>2];c[i+12>>2]=c[l+36+12>>2];k=0;ea=l;return k|0}function xg(b,e,g,h,i,j){b=b|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0;if((d[h+55>>0]|0|0)==(e|0)){h=0;return h|0}k=c[6088+(i<<2)>>2]|0;if(+f[h>>2]*+f[g+16>>2]+ +f[h+4>>2]*+f[g+20>>2]+ +f[h+8>>2]*+f[g+24>>2]-+f[h+16>>2]<-9.999999747378752e-06){k=Ud(b,c[h+20+(k<<2)>>2]|0,c[h+20+(i<<2)>>2]|0,g,0)|0;if(!k){h=0;return h|0}a[k+52>>0]=i;c[k+32>>2]=h;a[h+52+i>>0]=0;c[h+32+(i<<2)>>2]=k;i=c[j>>2]|0;if(!i)c[j+4>>2]=k;else{a[i+53>>0]=2;c[i+36>>2]=k;a[k+54>>0]=1;c[k+40>>2]=i}c[j>>2]=k;c[j+8>>2]=(c[j+8>>2]|0)+1;h=1;return h|0}i=c[6100+(i<<2)>>2]|0;a[h+55>>0]=e;if(!(xg(b,e,g,c[h+32+(k<<2)>>2]|0,d[h+52+k>>0]|0,j)|0)){h=0;return h|0}if(!(xg(b,e,g,c[h+32+(i<<2)>>2]|0,d[h+52+i>>0]|0,j)|0)){h=0;return h|0}i=c[h+48>>2]|0;if(i|0)c[i+44>>2]=c[h+44>>2];i=c[h+44>>2]|0;if(i|0)c[i+48>>2]=c[h+48>>2];if((c[b+9280>>2]|0)==(h|0))c[b+9280>>2]=c[h+48>>2];c[b+9284>>2]=(c[b+9284>>2]|0)+-1;c[h+44>>2]=0;c[h+48>>2]=c[b+9288>>2];i=c[b+9288>>2]|0;if(i|0)c[i+44>>2]=h;c[b+9288>>2]=h;c[b+9292>>2]=(c[b+9292>>2]|0)+1;h=1;return h|0}function yg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0.0,q=0;o=ea;ea=ea+2048|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;g=+f[d>>2];h=+f[d+4>>2];e=+f[d+8>>2];if(g*g+h*h+e*e<9.999999747378752e-05){m=0.0;l=1.0;h=0.0}else{p=1.0/+s(+(g*g+h*h+e*e));m=e*p;l=g*p;h=h*p}if((ra[c[(c[b>>2]|0)+96>>2]&127](b)|0)<=0){ea=o;return}k=0;g=-999999984306749440.0;while(1){if(((ra[c[(c[b>>2]|0)+96>>2]&127](b)|0)-k|0)<128){d=(ra[c[(c[b>>2]|0)+96>>2]&127](b)|0)-k|0;if((d|0)>0)n=8;else{e=-3402823466385288598117041.0e14;d=-1}}else{d=128;n=8}if((n|0)==8){n=0;i=0;do{Ma[c[(c[b>>2]|0)+108>>2]&127](b,i,o+(i<<4)|0);i=i+1|0}while((i|0)!=(d|0));j=0;e=-3402823466385288598117041.0e14;i=-1;do{p=l*+f[o+(j<<4)>>2]+h*+f[o+(j<<4)+4>>2]+m*+f[o+(j<<4)+8>>2];q=p>e;i=q?j:i;e=q?p:e;j=j+1|0}while((j|0)!=(d|0));d=i}if(e>g){q=o+(d<<4)|0;c[a>>2]=c[q>>2];c[a+4>>2]=c[q+4>>2];c[a+8>>2]=c[q+8>>2];c[a+12>>2]=c[q+12>>2]}else e=g;k=k+128|0;if((k|0)>=(ra[c[(c[b>>2]|0)+96>>2]&127](b)|0))break;else g=e}ea=o;return}function zg(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;i=c[a+68+(d<<2)>>2]|0;h=b[i+((f&65535)<<2)+-4>>1]|0;if((e[i+((f&65535)<<2)>>1]|0)>=(h&65535))return;j=c[a+60>>2]|0;o=j+((e[i+((f&65535)<<2)+2>>1]|0)<<6)+54+(d<<1)|0;k=i+((f&65535)<<2)|0;f=i+((f&65535)<<2)+-4|0;while(1){i=e[k+-2>>1]|0;if(!(h&1)){h=e[k+2>>1]|0;if(((((e[j+(h<<6)+54+((1<>1]|0)>=(e[j+(i<<6)+48+((1<>1]|0)?(e[j+(i<<6)+54+((1<>1]|0)>=(e[j+(h<<6)+48+((1<>1]|0):0)?(e[j+(h<<6)+54+((1<<(1<>1]|0)>=(e[j+(i<<6)+48+((1<<(1<>1]|0):0)?(e[j+(i<<6)+54+((1<<(1<>1]|0)>=(e[j+(h<<6)+48+((1<<(1<>1]|0):0)?(n=c[a+92>>2]|0,l=j+(h<<6)|0,m=j+(i<<6)|0,wa[c[(c[n>>2]|0)+12>>2]&31](n,l,m,g)|0,n=c[a+96>>2]|0,n|0):0)wa[c[(c[n>>2]|0)+12>>2]&31](n,l,m,g)|0;h=j+(i<<6)+48+(d<<1)|0}else h=j+(i<<6)+54+(d<<1)|0;b[h>>1]=(b[h>>1]|0)+1<<16>>16;b[o>>1]=(b[o>>1]|0)+-1<<16>>16;i=e[k>>1]|e[k+2>>1]<<16;h=e[f>>1]|e[f+2>>1]<<16;b[k>>1]=h;b[k+2>>1]=h>>>16;b[f>>1]=i;b[f+2>>1]=i>>>16;i=k+-4|0;f=f+-4|0;h=b[f>>1]|0;if((e[i>>1]|0)>=(h&65535))break;j=c[a+60>>2]|0;k=i}return}function Ag(a,d,f,g){a=a|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=c[a+68+(d<<2)>>2]|0;h=b[i+((f&65535)<<2)+6>>1]|0;if(!(h<<16>>16))return;n=(c[a+60>>2]|0)+((e[i+((f&65535)<<2)+2>>1]|0)<<6)+48+(d<<1)|0;k=i+((f&65535)<<2)|0;while(1){l=k;k=k+4|0;i=b[k>>1]|0;if((e[l>>1]|0)<(i&65535)){h=14;break}j=c[a+60>>2]|0;f=h&65535;if(!(i&1))h=j+(f<<6)+48+(d<<1)|0;else{h=e[l+2>>1]|0;if(((((e[j+(h<<6)+54+((1<>1]|0)>=(e[j+(f<<6)+48+((1<>1]|0)?(e[j+(f<<6)+54+((1<>1]|0)>=(e[j+(h<<6)+48+((1<>1]|0):0)?(e[j+(h<<6)+54+((1<<(1<>1]|0)>=(e[j+(f<<6)+48+((1<<(1<>1]|0):0)?(e[j+(f<<6)+54+((1<<(1<>1]|0)>=(e[j+(h<<6)+48+((1<<(1<>1]|0):0)?(m=c[a+92>>2]|0,wa[c[(c[m>>2]|0)+12>>2]&31](m,j+(h<<6)|0,j+(f<<6)|0,g)|0,m=c[a+96>>2]|0,m|0):0)wa[c[(c[m>>2]|0)+12>>2]&31](m,j+(h<<6)|0,j+(f<<6)|0,g)|0;h=j+(f<<6)+54+(d<<1)|0}b[h>>1]=(b[h>>1]|0)+-1<<16>>16;b[n>>1]=(b[n>>1]|0)+1<<16>>16;h=e[l>>1]|e[l+2>>1]<<16;j=e[k>>1]|e[k+2>>1]<<16;b[l>>1]=j;b[l+2>>1]=j>>>16;b[k>>1]=h;b[k+2>>1]=h>>>16;h=b[l+10>>1]|0;if(!(h<<16>>16)){h=14;break}}if((h|0)==14)return}function Bg(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0,k=0,l=0,m=0.0,n=0.0;h=c[d+204>>2]|0;if((h&3|0)==0?(c[d+504>>2]&1|0)==0:0){i=+f[d+344>>2];if(i!=0.0){n=1.0/i*+f[b+252>>2];m=1.0/i*+f[b+256>>2];f[d+364>>2]=1.0/i*+f[b+248>>2];f[d+368>>2]=n;f[d+372>>2]=m;f[d+376>>2]=0.0}c[d+380>>2]=c[b+248>>2];c[d+380+4>>2]=c[b+248+4>>2];c[d+380+8>>2]=c[b+248+8>>2];c[d+380+12>>2]=c[b+248+12>>2]}if(!(c[d+192>>2]|0))return;if(h&1){if((c[d+216>>2]&-2|0)!=4)c[d+216>>2]=2}else{h=c[b+232>>2]|0;if((h|0)==(c[b+236>>2]|0)?(l=(h|0)==0?1:h<<1,(h|0)<(l|0)):0){if(!l)j=0;else{c[6747]=(c[6747]|0)+1;h=kb((l<<2|3)+16|0)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}h=c[b+232>>2]|0}if((h|0)>0){k=0;do{c[j+(k<<2)>>2]=c[(c[b+240>>2]|0)+(k<<2)>>2];k=k+1|0}while((k|0)!=(h|0))}k=c[b+240>>2]|0;if(k){if(a[b+244>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);h=c[b+232>>2]|0}c[b+240>>2]=0}a[b+244>>0]=1;c[b+240>>2]=j;c[b+236>>2]=l}c[(c[b+240>>2]|0)+(h<<2)>>2]=d;c[b+232>>2]=h+1}Pa[c[(c[b>>2]|0)+36>>2]&127](b,d,e,g);return}function Cg(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=c[a+68+(d<<2)>>2]|0;k=c[a+60>>2]|0;n=e[h+((f&65535)<<2)+2>>1]|0;g=b[h+((f&65535)<<2)+6>>1]|0;if(!(g<<16>>16))return;i=h+((f&65535)<<2)|0;while(1){j=i;i=i+4|0;h=b[i>>1]|0;if((e[j>>1]|0)<(h&65535)){g=14;break}f=c[a+60>>2]|0;g=g&65535;if(!(h&1)){if(((((e[k+(n<<6)+54+((1<>1]|0)>=(e[f+(g<<6)+48+((1<>1]|0)?(e[f+(g<<6)+54+((1<>1]|0)>=(e[k+(n<<6)+48+((1<>1]|0):0)?(e[k+(n<<6)+54+((1<<(1<>1]|0)>=(e[f+(g<<6)+48+((1<<(1<>1]|0):0)?(e[f+(g<<6)+54+((1<<(1<>1]|0)>=(e[k+(n<<6)+48+((1<<(1<>1]|0):0)?(m=c[a+92>>2]|0,l=f+((e[j+2>>1]|0)<<6)|0,va[c[(c[m>>2]|0)+8>>2]&63](m,l,f+(g<<6)|0)|0,m=c[a+96>>2]|0,m|0):0)va[c[(c[m>>2]|0)+8>>2]&63](m,l,f+(g<<6)|0)|0;g=f+(g<<6)+48+(d<<1)|0}else g=f+(g<<6)+54+(d<<1)|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[k+(n<<6)+54+(d<<1)>>1]=(b[k+(n<<6)+54+(d<<1)>>1]|0)+1<<16>>16;g=e[j>>1]|e[j+2>>1]<<16;f=e[i>>1]|e[i+2>>1]<<16;b[j>>1]=f;b[j+2>>1]=f>>>16;b[i>>1]=g;b[i+2>>1]=g>>>16;g=b[j+10>>1]|0;if(!(g<<16>>16)){g=14;break}}if((g|0)==14)return}function Dg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0;o=(+f[a+32>>2]-+f[a+16>>2])*.5;l=(+f[a+36>>2]-+f[a+20>>2])*.5;i=(+f[a+40>>2]-+f[a+24>>2])*.5;n=+ha[c[(c[a>>2]|0)+48>>2]&15](a);k=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=i+ +ha[c[(c[a>>2]|0)+48>>2]&15](a);C=(+f[a+32>>2]+ +f[a+16>>2])*.5;A=(+f[a+36>>2]+ +f[a+20>>2])*.5;y=(+f[a+40>>2]+ +f[a+24>>2])*.5;G=+f[b>>2];x=+r(+G);F=+f[b+4>>2];w=+r(+F);u=+f[b+8>>2];v=+r(+u);E=+f[b+16>>2];t=+r(+E);D=+f[b+20>>2];s=+r(+D);p=+f[b+24>>2];q=+r(+p);B=+f[b+32>>2];m=+r(+B);z=+f[b+36>>2];j=+r(+z);g=+f[b+40>>2];h=+r(+g);u=C*G+A*F+y*u+ +f[b+48>>2];p=C*E+A*D+y*p+ +f[b+52>>2];g=C*B+A*z+y*g+ +f[b+56>>2];f[d>>2]=u-((o+n)*x+(l+k)*w+i*v);f[d+4>>2]=p-((o+n)*t+(l+k)*s+i*q);f[d+8>>2]=g-((o+n)*m+(l+k)*j+i*h);f[d+12>>2]=0.0;f[e>>2]=(o+n)*x+(l+k)*w+i*v+u;f[e+4>>2]=(o+n)*t+(l+k)*s+i*q+p;f[e+8>>2]=(o+n)*m+(l+k)*j+i*h+g;f[e+12>>2]=0.0;return}function Eg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0.0,I=0.0;I=+f[a+48>>2];A=+f[a+32>>2];H=+f[a+52>>2];y=+f[a+36>>2];F=+f[a+56>>2];w=+f[a+40>>2];G=(c[a+16>>2]|0)==0;m=+ha[c[(c[a>>2]|0)+48>>2]&15](a);k=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);m=(G?0.0:(I-A)*.5)+m;k=(G?0.0:(H-y)*.5)+k;i=(G?0.0:(F-w)*.5)+i;E=+f[b>>2];v=+r(+E);D=+f[b+4>>2];u=+r(+D);s=+f[b+8>>2];t=+r(+s);C=+f[b+16>>2];q=+r(+C);B=+f[b+20>>2];p=+r(+B);n=+f[b+24>>2];o=+r(+n);z=+f[b+32>>2];l=+r(+z);x=+f[b+36>>2];j=+r(+x);g=+f[b+40>>2];h=+r(+g);A=G?0.0:(I+A)*.5;y=G?0.0:(H+y)*.5;w=G?0.0:(F+w)*.5;s=A*E+y*D+w*s+ +f[b+48>>2];n=A*C+y*B+w*n+ +f[b+52>>2];g=A*z+y*x+w*g+ +f[b+56>>2];f[d>>2]=s-(m*v+k*u+i*t);f[d+4>>2]=n-(m*q+k*p+i*o);f[d+8>>2]=g-(m*l+k*j+i*h);f[d+12>>2]=0.0;f[e>>2]=m*v+k*u+i*t+s;f[e+4>>2]=m*q+k*p+i*o+n;f[e+8>>2]=m*l+k*j+i*h+g;f[e+12>>2]=0.0;return}function Fg(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=c[a+68+(d<<2)>>2]|0;k=c[a+60>>2]|0;n=e[h+((f&65535)<<2)+2>>1]|0;g=b[h+((f&65535)<<2)+-4>>1]|0;if((e[h+((f&65535)<<2)>>1]|0)>=(g&65535))return;j=k;i=h+((f&65535)<<2)|0;f=h+((f&65535)<<2)+-4|0;while(1){h=e[i+-2>>1]|0;if(!(g&1))g=j+(h<<6)+48+(d<<1)|0;else{if(((((e[k+(n<<6)+54+((1<>1]|0)>=(e[j+(h<<6)+48+((1<>1]|0)?(e[j+(h<<6)+54+((1<>1]|0)>=(e[k+(n<<6)+48+((1<>1]|0):0)?(e[k+(n<<6)+54+((1<<(1<>1]|0)>=(e[j+(h<<6)+48+((1<<(1<>1]|0):0)?(e[j+(h<<6)+54+((1<<(1<>1]|0)>=(e[k+(n<<6)+48+((1<<(1<>1]|0):0)?(m=c[a+92>>2]|0,l=j+(h<<6)|0,va[c[(c[m>>2]|0)+8>>2]&63](m,k+(n<<6)|0,l)|0,m=c[a+96>>2]|0,m|0):0)va[c[(c[m>>2]|0)+8>>2]&63](m,k+(n<<6)|0,l)|0;g=j+(h<<6)+54+(d<<1)|0}b[g>>1]=(b[g>>1]|0)+1<<16>>16;b[k+(n<<6)+48+(d<<1)>>1]=(b[k+(n<<6)+48+(d<<1)>>1]|0)+-1<<16>>16;h=e[i>>1]|e[i+2>>1]<<16;g=e[f>>1]|e[f+2>>1]<<16;b[i>>1]=g;b[i+2>>1]=g>>>16;b[f>>1]=h;b[f+2>>1]=h>>>16;h=i+-4|0;f=f+-4|0;g=b[f>>1]|0;if((e[h>>1]|0)>=(g&65535))break;j=c[a+60>>2]|0;i=h}return}function Gg(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0,g=0,h=0,i=0,j=0;g=ea;ea=ea+16|0;c=+f[(NJ(a)|0)>>2];d=+f[(sJ(a+16|0)|0)>>2];e=+f[(rJ(a+32|0)|0)>>2];if(c+d+e>0.0){e=+AJ(c+d+e+1.0);f[g+12>>2]=e*.5;d=+f[(sJ(a+32|0)|0)>>2];f[g>>2]=(d-+f[(rJ(a+16|0)|0)>>2])*(.5/e);d=+f[(rJ(a)|0)>>2];f[g+4>>2]=(d-+f[(NJ(a+32|0)|0)>>2])*(.5/e);d=+f[(NJ(a+16|0)|0)>>2];f[g+8>>2]=(d-+f[(sJ(a)|0)>>2])*(.5/e);j=g;i=g+4|0;h=g+8|0;a=g+12|0;zr(b,j,i,h,a);ea=g;return}else{h=c>2];j=NJ(a+((((h+1|0)>>>0)%3|0)<<4)|0)|0;e=e-+f[j+((((h+1|0)>>>0)%3|0)<<2)>>2];a=NJ(a+((((h+2|0)>>>0)%3|0)<<4)|0)|0;e=+AJ(e-+f[a+((((h+2|0)>>>0)%3|0)<<2)>>2]+1.0);f[g+(h<<2)>>2]=e*.5;f[g+12>>2]=(+f[a+((((h+1|0)>>>0)%3|0)<<2)>>2]-+f[j+((((h+2|0)>>>0)%3|0)<<2)>>2])*(.5/e);f[g+((((h+1|0)>>>0)%3|0)<<2)>>2]=(+f[j+(h<<2)>>2]+ +f[i+((((h+1|0)>>>0)%3|0)<<2)>>2])*(.5/e);f[g+((((h+2|0)>>>0)%3|0)<<2)>>2]=(+f[a+(h<<2)>>2]+ +f[i+((((h+2|0)>>>0)%3|0)<<2)>>2])*(.5/e);a=g;h=g+4|0;i=g+8|0;j=g+12|0;zr(b,a,h,i,j);ea=g;return}}function Hg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=c[a+212>>2]|0;a:do if((f|0)>0){g=c[a+220>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0))break a}if((d|0)<(f|0)){c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+220>>2]|0)+(f+-1<<2)>>2]=b;c[a+212>>2]=f+-1}}while(0);a=c[b+28>>2]|0;d=c[a+488>>2]|0;b:do if((d|0)>0){g=c[a+496>>2]|0;e=0;while(1){f=g+(e<<2)|0;if((c[f>>2]|0)==(b|0))break;e=e+1|0;if((e|0)>=(d|0))break b}if((e|0)<(d|0)){c[f>>2]=c[g+(d+-1<<2)>>2];c[(c[a+496>>2]|0)+(d+-1<<2)>>2]=b;c[a+488>>2]=d+-1;d=d+-1|0}}while(0);c[a+256>>2]=(d|0)>0&1;a=c[b+32>>2]|0;d=c[a+488>>2]|0;if((d|0)<=0){b=d;b=(b|0)>0;b=b&1;h=a+256|0;c[h>>2]=b;return}g=c[a+496>>2]|0;e=0;while(1){f=g+(e<<2)|0;if((c[f>>2]|0)==(b|0))break;e=e+1|0;if((e|0)>=(d|0)){h=19;break}}if((h|0)==19){b=(d|0)>0;b=b&1;h=a+256|0;c[h>>2]=b;return}if((e|0)>=(d|0)){b=d;b=(b|0)>0;b=b&1;h=a+256|0;c[h>>2]=b;return}c[f>>2]=c[g+(d+-1<<2)>>2];c[(c[a+496>>2]|0)+(d+-1<<2)>>2]=b;c[a+488>>2]=d+-1;b=d+-1|0;b=(b|0)>0;b=b&1;h=a+256|0;c[h>>2]=b;return}function Ig(b,d){b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0;j=ra[c[(c[b>>2]|0)+28>>2]&127](b)|0;i=+f[j>>2]-+f[d>>2];h=+f[j+4>>2]-+f[d+4>>2];g=+f[j+8>>2]-+f[d+8>>2];if(!(i*i+h*h+g*g>1.1920928955078125e-07))return;dg(b,d);if((a[b+61>>0]|0)!=0?(e=c[b+52>>2]|0,Ca[c[c[e>>2]>>2]&511](e),e=c[b+52>>2]|0,(e|0)!=0):0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);d=b+52|0}else d=b+52|0;c[6747]=(c[6747]|0)+1;e=kb(191)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e+52>>2]=282;a[e+60>>0]=0;a[e+80>>0]=1;c[e+76>>2]=0;c[e+68>>2]=0;c[e+72>>2]=0;a[e+100>>0]=1;c[e+96>>2]=0;c[e+88>>2]=0;c[e+92>>2]=0;a[e+120>>0]=1;c[e+116>>2]=0;c[e+108>>2]=0;c[e+112>>2]=0;a[e+140>>0]=1;c[e+136>>2]=0;c[e+128>>2]=0;c[e+132>>2]=0;c[e+144>>2]=0;a[e+164>>0]=1;c[e+160>>2]=0;c[e+152>>2]=0;c[e+156>>2]=0;c[e+168>>2]=0;c[e+4>>2]=-8388609;c[e+8>>2]=-8388609;c[e+12>>2]=-8388609;f[e+16>>2]=0.0;c[e+20>>2]=2139095039;c[e+24>>2]=2139095039;c[e+28>>2]=2139095039;f[e+32>>2]=0.0;c[e>>2]=9292;c[d>>2]=e;cc(e,c[b+48>>2]|0,(a[b+60>>0]|0)!=0,b+16|0,b+32|0);a[b+61>>0]=1;return}function Jg(b,d){b=b|0;d=d|0;var e=0.0,g=0.0;if(a[b+1309>>0]|0){e=(+f[b+1256>>2]-+f[b+1316>>2])*+f[b+1340>>2];f[b+792>>2]=e*(+f[d>>2]*+f[b+1364>>2]/+(c[d+48>>2]|0));e=+r(+e);f[b+808>>2]=e/+f[d>>2]}if(a[b+1310>>0]|0){e=(+f[b+1260>>2]-+f[b+1320>>2])*+f[b+1344>>2];f[b+796>>2]=e*(+f[d>>2]*+f[b+1368>>2]/+(c[d+48>>2]|0));e=+r(+e);f[b+812>>2]=e/+f[d>>2]}if(a[b+1311>>0]|0){e=(+f[b+1264>>2]-+f[b+1324>>2])*+f[b+1348>>2];f[b+800>>2]=e*(+f[d>>2]*+f[b+1372>>2]/+(c[d+48>>2]|0));e=+r(+e);f[b+816>>2]=e/+f[d>>2]}if(a[b+1312>>0]|0){g=-((+f[b+1192>>2]-+f[b+1328>>2])*+f[b+1352>>2]);e=+f[d>>2];f[b+876>>2]=e*+f[b+1376>>2]/+(c[d+48>>2]|0)*g;f[b+880>>2]=+r(+g)/e}if(a[b+1313>>0]|0){e=-((+f[b+1196>>2]-+f[b+1332>>2])*+f[b+1356>>2]);g=+f[d>>2];f[b+940>>2]=g*+f[b+1380>>2]/+(c[d+48>>2]|0)*e;f[b+944>>2]=+r(+e)/g}if(!(a[b+1314>>0]|0)){sj(b,d);return}e=-((+f[b+1200>>2]-+f[b+1336>>2])*+f[b+1360>>2]);g=+f[d>>2];f[b+1004>>2]=g*+f[b+1384>>2]/+(c[d+48>>2]|0)*e;f[b+1008>>2]=+r(+e)/g;sj(b,d);return}function Kg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0.0,j=0.0;e=ea;ea=ea+160|0;c[e+136>>2]=0;c[e+136+4>>2]=0;c[e+136+8>>2]=0;c[e+136+12>>2]=0;c[e+136+16>>2]=0;c[e+32>>2]=8220;g=e+32+4|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[e+32+20>>2]=1065353216;c[e+32+24>>2]=0;c[e+32+24+4>>2]=0;c[e+32+24+8>>2]=0;c[e+32+24+12>>2]=0;c[e+32+40>>2]=1065353216;c[e+32+44>>2]=0;c[e+32+44+4>>2]=0;c[e+32+44+8>>2]=0;c[e+32+44+12>>2]=0;c[e+32+60>>2]=1065353216;c[e+32+64>>2]=0;c[e+32+68>>2]=c[e+136+4>>2];c[e+32+68+4>>2]=c[e+136+4+4>>2];c[e+32+68+8>>2]=c[e+136+4+8>>2];c[e+32+68+12>>2]=c[e+136+4+12>>2];f[e+32+84>>2]=-999999984306749440.0;j=+f[d>>2];i=+f[d+4>>2];h=+f[d+8>>2];f[e+32+88>>2]=j+i*0.0+h*0.0;f[e+32+92>>2]=j*0.0+i+h*0.0;f[e+32+96>>2]=j*0.0+i*0.0+h;f[e+32+100>>2]=0.0;c[e+16>>2]=1566444395;c[e+16+4>>2]=1566444395;c[e+16+8>>2]=1566444395;f[e+16+12>>2]=0.0;d=c[(c[b>>2]|0)+64>>2]|0;f[e>>2]=-999999984306749440.0;f[e+4>>2]=-999999984306749440.0;f[e+8>>2]=-999999984306749440.0;f[e+12>>2]=0.0;Pa[d&127](b,e+32|0,e,e+16|0);c[a>>2]=c[g>>2];c[a+4>>2]=c[g+4>>2];c[a+8>>2]=c[g+8>>2];c[a+12>>2]=c[g+12>>2];ea=e;return}function Lg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0;p=ea;ea=ea+16|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;e=+f[d>>2];g=+f[d+4>>2];h=+f[d+8>>2];if(e*e+g*g+h*h<9.999999747378752e-05){o=1.0;n=0.0;m=0.0}else{m=1.0/+s(+(e*e+g*g+h*h));o=e*m;n=g*m;m=h*m}d=c[b+52>>2]|0;l=+f[b+28+(((d+2|0)%3|0)<<2)>>2];c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[p+(d<<2)>>2]=c[b+28+(d<<2)>>2];j=o*l;k=n*l;l=m*l;g=j+ +f[p>>2];i=k+ +f[p+4>>2];e=l+ +f[p+8>>2];h=+ha[c[(c[b>>2]|0)+48>>2]&15](b);g=g-o*h;i=i-n*h;h=e-m*h;e=m*h+(o*g+n*i);if(e>-999999984306749440.0){f[a>>2]=g;f[a+4>>2]=i;f[a+8>>2]=h;f[a+12>>2]=0.0;i=e}else i=-999999984306749440.0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;d=c[b+52>>2]|0;f[p+(d<<2)>>2]=-+f[b+28+(d<<2)>>2];e=j+ +f[p>>2];h=k+ +f[p+4>>2];l=l+ +f[p+8>>2];g=+ha[c[(c[b>>2]|0)+48>>2]&15](b);e=e-o*g;h=h-n*g;g=l-m*g;if(!(m*g+(o*e+n*h)>i)){ea=p;return}f[a>>2]=e;f[a+4>>2]=h;f[a+8>>2]=g;f[a+12>>2]=0.0;ea=p;return}function Mg(a,b,d,e,g,h,i,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;var m=0;m=ea;ea=ea+128|0;c[m+80>>2]=c[a+4>>2];c[m+80+4>>2]=c[a+20>>2];c[m+80+8>>2]=c[a+36>>2];f[m+80+12>>2]=0.0;c[m+80+16>>2]=c[a+8>>2];c[m+80+20>>2]=c[a+24>>2];c[m+80+24>>2]=c[a+40>>2];f[m+80+28>>2]=0.0;c[m+80+32>>2]=c[a+12>>2];c[m+80+36>>2]=c[a+28>>2];c[m+80+40>>2]=c[a+44>>2];f[m+80+44>>2]=0.0;c[m+32>>2]=c[b+4>>2];c[m+32+4>>2]=c[b+20>>2];c[m+32+8>>2]=c[b+36>>2];f[m+32+12>>2]=0.0;c[m+32+16>>2]=c[b+8>>2];c[m+32+20>>2]=c[b+24>>2];c[m+32+24>>2]=c[b+40>>2];f[m+32+28>>2]=0.0;c[m+32+32>>2]=c[b+12>>2];c[m+32+36>>2]=c[b+28>>2];c[m+32+40>>2]=c[b+44>>2];f[m+32+44>>2]=0.0;h=h-+f[a+56>>2];i=i-+f[a+60>>2];f[m+16>>2]=g-+f[a+52>>2];f[m+16+4>>2]=h;f[m+16+8>>2]=i;f[m+16+12>>2]=0.0;k=k-+f[b+56>>2];l=l-+f[b+60>>2];f[m>>2]=j-+f[b+52>>2];f[m+4>>2]=k;f[m+8>>2]=l;f[m+12>>2]=0.0;_f(d,m+80|0,m+32|0,m+16|0,m,e,a+396|0,+f[a+344>>2],b+396|0,+f[b+344>>2]);ea=m;return}function Ng(b){b=b|0;var d=0,e=0;if(!b)return;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;d=c[b+12>>2]|0;do if(d){if(!(a[b+16>>0]|0)){a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=b+8|0;e=14;break}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+32>>2]|0;a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;if(d){if(!(a[b+36>>0]|0)){a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;d=b+8|0;break}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+12>>2]|0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;if(!d)d=b+8|0;else{if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+12>>2]=0;d=b+8|0}}else{d=b+8|0;e=14}}else{a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=b+8|0;e=14}while(0);if((e|0)==14){a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0}a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[d>>2]=0;uy(b);return}function Og(a,b,d,e,g){a=a|0;b=+b;d=+d;e=+e;g=g|0;var h=0,i=0,j=0,k=0,l=0.0,m=0.0;j=ea;ea=ea+48|0;l=1.0/+s(+(b*b+d*d+e*e));f[g>>2]=l*b;f[g+4>>2]=l*d;f[g+8>>2]=l*e;f[g+12>>2]=0.0;h=c[a+120>>2]|0;k=c[a+124>>2]|0;i=(c[a>>2]|0)+(1?k>>1:k)|0;if(k&1)h=c[(c[i>>2]|0)+h>>2]|0;Ma[h&127](j,i,g);b=-+f[g>>2];d=-+f[g+4>>2];e=-+f[g+8>>2];h=c[a+120>>2]|0;k=c[a+124>>2]|0;i=(c[a+4>>2]|0)+(1?k>>1:k)|0;if(k&1)h=c[(c[i>>2]|0)+h>>2]|0;l=+f[a+24>>2]*b+ +f[a+28>>2]*d+ +f[a+32>>2]*e;m=+f[a+40>>2]*b+ +f[a+44>>2]*d+ +f[a+48>>2]*e;f[j+16>>2]=+f[a+8>>2]*b+ +f[a+12>>2]*d+ +f[a+16>>2]*e;f[j+16+4>>2]=l;f[j+16+8>>2]=m;f[j+16+12>>2]=0.0;Ma[h&127](j+32|0,i,j+16|0);m=+f[j+32>>2];b=+f[j+32+4>>2];d=+f[j+32+8>>2];e=+f[j+4>>2]-(m*+f[a+72>>2]+b*+f[a+76>>2]+d*+f[a+80>>2]+ +f[a+108>>2]);l=+f[j+8>>2]-(m*+f[a+88>>2]+b*+f[a+92>>2]+d*+f[a+96>>2]+ +f[a+112>>2]);f[g+16>>2]=+f[j>>2]-(m*+f[a+56>>2]+b*+f[a+60>>2]+d*+f[a+64>>2]+ +f[a+104>>2]);f[g+20>>2]=e;f[g+24>>2]=l;f[g+28>>2]=0.0;ea=j;return}function Pg(a,b,c,d,e,g,h,i,j,k,l,m,n,o){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;o=+o;var p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;q=(j-g)*(n-h)-(k-h)*(m-g);s=(k-h)*(l-e)-(i-e)*(n-h);t=(i-e)*(m-g)-(j-g)*(l-e);if(+r(+(t*d+(q*b+s*c)))<1.1920928955078125e-07){t=-1.0;return +t}u=+f[a>>2];w=+f[a+4>>2];v=+f[a+8>>2];p=-(q*u+s*w+t*v-(t*h+(q*e+s*g)))/(t*d+(q*b+s*c));if(((p>1.1920928955078125e-06&p-1.1920928955078125e-06:0)?t*((m-(w+p*c))*(i-(u+p*b))-(j-(w+p*c))*(l-(u+p*b)))+(q*((j-(w+p*c))*(n-(v+p*d))-(k-(v+p*d))*(m-(w+p*c)))+s*((k-(v+p*d))*(l-(u+p*b))-(n-(v+p*d))*(i-(u+p*b))))>-1.1920928955078125e-06:0)?t*((g-(w+p*c))*(l-(u+p*b))-(m-(w+p*c))*(e-(u+p*b)))+(q*((m-(w+p*c))*(h-(v+p*d))-(n-(v+p*d))*(g-(w+p*c)))+s*((n-(v+p*d))*(e-(u+p*b))-(h-(v+p*d))*(l-(u+p*b))))>-1.1920928955078125e-06:0){w=p;return +w}w=-1.0;return +w}function Qg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=c[b>>2]|0;if((e|0)==(c[a+80>>2]|0)){i=1.0;return +i}if(c[e+204>>2]&4|0){i=1.0;return +i}if(d){g=+f[b+8>>2];h=+f[b+12>>2];i=+f[b+16>>2]}else{k=+f[b+8>>2];j=+f[b+12>>2];i=+f[b+16>>2];g=+f[e+4>>2]*k+ +f[e+8>>2]*j+ +f[e+12>>2]*i;h=k*+f[e+20>>2]+j*+f[e+24>>2]+i*+f[e+28>>2];i=k*+f[e+36>>2]+j*+f[e+40>>2]+i*+f[e+44>>2]}if(g*+f[a+84>>2]+h*+f[a+88>>2]+i*+f[a+92>>2]<+f[a+100>>2]){k=1.0;return +k}c[a+4>>2]=c[b+40>>2];c[a+76>>2]=e;if(d){c[a+44>>2]=c[b+8>>2];c[a+44+4>>2]=c[b+8+4>>2];c[a+44+8>>2]=c[b+8+8>>2];c[a+44+12>>2]=c[b+8+12>>2]}else{g=+f[b+8>>2];h=+f[b+12>>2];i=+f[b+16>>2];j=g*+f[e+20>>2]+h*+f[e+24>>2]+i*+f[e+28>>2];k=g*+f[e+36>>2]+h*+f[e+40>>2]+i*+f[e+44>>2];f[a+44>>2]=+f[e+4>>2]*g+ +f[e+8>>2]*h+ +f[e+12>>2]*i;f[a+48>>2]=j;f[a+52>>2]=k;f[a+56>>2]=0.0}c[a+60>>2]=c[b+24>>2];c[a+60+4>>2]=c[b+24+4>>2];c[a+60+8>>2]=c[b+24+8>>2];c[a+60+12>>2]=c[b+24+12>>2];k=+f[b+40>>2];return +k}function Rg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;if(a[b+165>>0]|0){if((c[b+92>>2]|0)>=(d|0))return;if((d|0)!=0?(c[6747]=(c[6747]|0)+1,f=kb((d<<4|3)+16|0)|0,(f|0)!=0):0){c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}else g=0;e=c[b+88>>2]|0;if((e|0)>0){f=0;do{i=g+(f<<4)|0;h=(c[b+96>>2]|0)+(f<<4)|0;c[i>>2]=c[h>>2];c[i+4>>2]=c[h+4>>2];c[i+8>>2]=c[h+8>>2];c[i+12>>2]=c[h+12>>2];f=f+1|0}while((f|0)!=(e|0))}e=c[b+96>>2]|0;if(e|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=g;c[b+92>>2]=d;return}if((c[b+112>>2]|0)>=(d|0))return;if((d|0)!=0?(c[6747]=(c[6747]|0)+1,e=kb((d<<2|3)+16|0)|0,(e|0)!=0):0){c[(e+4+15&-16)+-4>>2]=e;h=e+4+15&-16}else h=0;f=c[b+108>>2]|0;g=c[b+116>>2]|0;if((f|0)<=0)if(!g)e=b+120|0;else i=23;else{e=0;do{c[h+(e<<2)>>2]=c[g+(e<<2)>>2];e=e+1|0}while((e|0)!=(f|0));i=23}if((i|0)==23){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+116>>2]=0;e=b+120|0}a[e>>0]=1;c[b+116>>2]=h;c[b+112>>2]=d;return}function Sg(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;if(!(c[i+44>>2]|0))return;b=c[i+20>>2]|0;if(!(c[i+64>>2]&256)){if((b|0)<=0)return;j=0;do{g=c[a+28>>2]|0;if((g|0)>0){b=0;do{f=c[(c[a+116>>2]|0)+(b<<2)>>2]|0;h=c[a+36>>2]|0;d=c[a+16>>2]|0;If(d+((c[h+(f*152|0)+144>>2]|0)*244|0)|0,d+((c[h+(f*152|0)+148>>2]|0)*244|0)|0,h+(f*152|0)|0);b=b+1|0}while((b|0)!=(g|0));b=c[i+20>>2]|0}j=j+1|0}while((j|0)<(b|0));return}else{if((b|0)<=0)return;j=0;do{g=c[a+28>>2]|0;if((g|0)>0){b=0;do{f=c[(c[a+116>>2]|0)+(b<<2)>>2]|0;h=c[a+36>>2]|0;d=c[a+16>>2]|0;If(d+((c[h+(f*152|0)+144>>2]|0)*244|0)|0,d+((c[h+(f*152|0)+148>>2]|0)*244|0)|0,h+(f*152|0)|0);b=b+1|0}while((b|0)!=(g|0));b=c[i+20>>2]|0}j=j+1|0}while((j|0)<(b|0));return}}function Tg(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!(a[d+164>>0]|0)){if((c[d+152>>2]|0)>=(e|0))return;if((e|0)!=0?(c[6747]=(c[6747]|0)+1,f=kb((e<<1)+19|0)|0,(f|0)!=0):0){c[(f+4+15&-16)+-4>>2]=f;i=f+4+15&-16}else i=0;g=c[d+148>>2]|0;h=c[d+156>>2]|0;if((g|0)<=0)if(!h)f=d+160|0;else j=24;else{f=0;do{b[i+(f<<1)>>1]=b[h+(f<<1)>>1]|0;f=f+1|0}while((f|0)!=(g|0));j=24}if((j|0)==24){if(a[d+160>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+156>>2]=0;f=d+160|0}a[f>>0]=1;c[d+156>>2]=i;c[d+152>>2]=e;return}else{if((c[d+132>>2]|0)>=(e|0))return;if((e|0)!=0?(c[6747]=(c[6747]|0)+1,g=kb((e<<2|3)+16|0)|0,(g|0)!=0):0){c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}else i=0;g=c[d+128>>2]|0;h=c[d+136>>2]|0;if((g|0)<=0)if(!h)f=d+140|0;else j=11;else{f=0;do{c[i+(f<<2)>>2]=c[h+(f<<2)>>2];f=f+1|0}while((f|0)!=(g|0));j=11}if((j|0)==11){if(a[d+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+136>>2]=0;f=d+140|0}a[f>>0]=1;c[d+136>>2]=i;c[d+132>>2]=e;return}}function Ug(a,b,d){a=a|0;b=b|0;d=d|0;ch(a,b,d)|0;c[b+52>>2]=c[a+300>>2];c[b+56>>2]=c[a+304>>2];c[b+60>>2]=c[a+308>>2];c[b+64>>2]=c[a+312>>2];c[b+68>>2]=c[a+316>>2];c[b+72>>2]=c[a+320>>2];c[b+76>>2]=c[a+324>>2];c[b+80>>2]=c[a+328>>2];c[b+84>>2]=c[a+332>>2];c[b+88>>2]=c[a+336>>2];c[b+92>>2]=c[a+340>>2];c[b+96>>2]=c[a+344>>2];c[b+100>>2]=c[a+348>>2];c[b+104>>2]=c[a+352>>2];c[b+108>>2]=c[a+356>>2];c[b+112>>2]=c[a+360>>2];c[b+116>>2]=c[a+364>>2];c[b+120>>2]=c[a+368>>2];c[b+124>>2]=c[a+372>>2];c[b+128>>2]=c[a+376>>2];c[b+132>>2]=c[a+380>>2];c[b+136>>2]=c[a+384>>2];c[b+140>>2]=c[a+388>>2];c[b+144>>2]=c[a+392>>2];c[b+148>>2]=c[a+396>>2];c[b+152>>2]=c[a+400>>2];c[b+156>>2]=c[a+404>>2];c[b+160>>2]=c[a+408>>2];c[b+164>>2]=c[a+412>>2];c[b+168>>2]=c[a+416>>2];c[b+172>>2]=c[a+420>>2];c[b+176>>2]=c[a+424>>2];c[b+180>>2]=c[a+444>>2];c[b+184>>2]=c[a+448>>2];c[b+188>>2]=c[a+452>>2];c[b+192>>2]=c[a+428>>2];c[b+196>>2]=c[a+432>>2];c[b+200>>2]=c[a+436>>2];c[b+204>>2]=c[a+440>>2];return 15359}function Vg(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;c[6747]=(c[6747]|0)+1;h=kb(55)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}c[j>>2]=d;c[j+4>>2]=e;c[j+8>>2]=g;c[j+12>>2]=-1;c[j+16>>2]=-1;c[j+20>>2]=-1;c[j+28>>2]=-1;f[j+32>>2]=0.0;g=j;h=c[b+4>>2]|0;c[j+24>>2]=h;if((h|0)!=(c[b+8>>2]|0)){i=h;e=b+12|0;e=c[e>>2]|0;e=e+(i<<2)|0;c[e>>2]=g;i=i+1|0;c[b+4>>2]=i;return j|0}i=(h|0)==0?1:h<<1;if((h|0)>=(i|0)){i=h;e=b+12|0;e=c[e>>2]|0;e=e+(i<<2)|0;c[e>>2]=g;i=i+1|0;c[b+4>>2]=i;return j|0}if(!i)d=0;else{c[6747]=(c[6747]|0)+1;h=kb((i<<2|3)+16|0)|0;if(!h)d=0;else{c[(h+4+15&-16)+-4>>2]=h;d=h+4+15&-16}h=c[b+4>>2]|0}if((h|0)>0){e=0;do{c[d+(e<<2)>>2]=c[(c[b+12>>2]|0)+(e<<2)>>2];e=e+1|0}while((e|0)!=(h|0))}e=c[b+12>>2]|0;if(e){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);h=c[b+4>>2]|0}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=d;c[b+8>>2]=i;i=h;e=b+12|0;e=c[e>>2]|0;e=e+(i<<2)|0;c[e>>2]=g;i=i+1|0;c[b+4>>2]=i;return j|0}function Wg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0;o=+ha[c[(c[a>>2]|0)+48>>2]&15](a);v=+f[a+72>>2];u=+f[a+56>>2];s=+f[a+76>>2];q=+f[a+60>>2];n=+f[a+80>>2];m=+f[a+64>>2];F=+f[b>>2];z=+r(+F);E=+f[b+4>>2];y=+r(+E);k=+f[b+8>>2];l=+r(+k);D=+f[b+16>>2];x=+r(+D);C=+f[b+20>>2];w=+r(+C);i=+f[b+24>>2];j=+r(+i);B=+f[b+32>>2];t=+r(+B);A=+f[b+36>>2];p=+r(+A);g=+f[b+40>>2];h=+r(+g);k=(v+u)*.5*F+(s+q)*.5*E+(n+m)*.5*k+ +f[b+48>>2];i=(v+u)*.5*D+(s+q)*.5*C+(n+m)*.5*i+ +f[b+52>>2];g=(v+u)*.5*B+(s+q)*.5*A+(n+m)*.5*g+ +f[b+56>>2];l=(o+(v-u)*.5)*z+(o+(s-q)*.5)*y+(o+(n-m)*.5)*l;j=(o+(v-u)*.5)*x+(o+(s-q)*.5)*w+(o+(n-m)*.5)*j;h=(o+(v-u)*.5)*t+(o+(s-q)*.5)*p+(o+(n-m)*.5)*h;f[d>>2]=k-l;f[d+4>>2]=i-j;f[d+8>>2]=g-h;f[d+12>>2]=0.0;f[e>>2]=l+k;f[e+4>>2]=j+i;f[e+8>>2]=h+g;f[e+12>>2]=0.0;return}function Xg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0;o=+ha[c[(c[a>>2]|0)+48>>2]&15](a);v=+f[a+68>>2];u=+f[a+52>>2];s=+f[a+72>>2];q=+f[a+56>>2];n=+f[a+76>>2];m=+f[a+60>>2];F=+f[b>>2];z=+r(+F);E=+f[b+4>>2];y=+r(+E);k=+f[b+8>>2];l=+r(+k);D=+f[b+16>>2];x=+r(+D);C=+f[b+20>>2];w=+r(+C);i=+f[b+24>>2];j=+r(+i);B=+f[b+32>>2];t=+r(+B);A=+f[b+36>>2];p=+r(+A);g=+f[b+40>>2];h=+r(+g);k=(v+u)*.5*F+(s+q)*.5*E+(n+m)*.5*k+ +f[b+48>>2];i=(v+u)*.5*D+(s+q)*.5*C+(n+m)*.5*i+ +f[b+52>>2];g=(v+u)*.5*B+(s+q)*.5*A+(n+m)*.5*g+ +f[b+56>>2];l=(o+(v-u)*.5)*z+(o+(s-q)*.5)*y+(o+(n-m)*.5)*l;j=(o+(v-u)*.5)*x+(o+(s-q)*.5)*w+(o+(n-m)*.5)*j;h=(o+(v-u)*.5)*t+(o+(s-q)*.5)*p+(o+(n-m)*.5)*h;f[d>>2]=k-l;f[d+4>>2]=i-j;f[d+8>>2]=g-h;f[d+12>>2]=0.0;f[e>>2]=l+k;f[e+4>>2]=j+i;f[e+8>>2]=h+g;f[e+12>>2]=0.0;return}function Yg(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;if(a[d+32>>0]&1){g=c[b+4>>2]|0;if(g|0)uk(g,d,e);g=c[b>>2]|0;if(g|0){n=+f[d>>2];l=+f[g+128>>2];m=+f[d+4>>2];k=+f[d+8>>2];h=+f[e+4>>2];p=+f[e+8>>2];o=+f[e>>2];j=+f[g+180>>2]*(k*h-m*p)+ +f[g+184>>2]*(n*p-k*o)+(m*o-n*h)*+f[g+188>>2];i=(k*h-m*p)*+f[g+196>>2]+(n*p-k*o)*+f[g+200>>2]+(m*o-n*h)*+f[g+204>>2];h=(k*h-m*p)*+f[g+212>>2]+(n*p-k*o)*+f[g+216>>2]+(m*o-n*h)*+f[g+220>>2];f[g+244>>2]=n*l+ +f[g+244>>2];f[g+248>>2]=l*m+ +f[g+248>>2];f[g+252>>2]=l*k+ +f[g+252>>2];f[g+316>>2]=n*l+ +f[g+316>>2];f[g+320>>2]=l*m+ +f[g+320>>2];f[g+324>>2]=l*k+ +f[g+324>>2];f[g+260>>2]=j+ +f[g+260>>2];f[g+264>>2]=i+ +f[g+264>>2];f[g+268>>2]=h+ +f[g+268>>2];f[g+332>>2]=j+ +f[g+332>>2];f[g+336>>2]=i+ +f[g+336>>2];f[g+340>>2]=h+ +f[g+340>>2];c[g+308>>2]=(c[g+308>>2]|0)+1}}if(!(a[d+32>>0]&2))return;oi(b,d+16|0,e);return}function Zg(a){a=a|0;var b=0,d=0,e=0,g=0;d=ea;ea=ea+16|0;Fi(16932);Ca[c[(c[a>>2]|0)+8>>2]&511](a);Ca[c[(c[a>>2]|0)+12>>2]&511](a);b=c[a+24>>2]|0;Fi(16966);if(b|0){g=c[(c[b>>2]|0)+32>>2]|0;e=c[a+68>>2]|0;e=ra[c[(c[e>>2]|0)+36>>2]&127](e)|0;Pa[g&127](b,e,a+28|0,c[a+24>>2]|0)}a=c[2685]|0;g=(c[a+16>>2]|0)+-1|0;c[a+16>>2]=g;do if(!g){if(c[a+4>>2]|0){Y(d|0,0)|0;b=c[6746]|0;f[a+8>>2]=+f[a+8>>2]+ +(((c[d+4>>2]|0)-(c[b+4>>2]|0)+(((c[d>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[a+12>>2]|0)|0)>>>0)/1.0e3;b=c[2685]|0;if(c[a+16>>2]|0)break}else b=a;b=c[b+20>>2]|0;c[2685]=b}else b=a;while(0);a=b+16|0;g=(c[a>>2]|0)+-1|0;c[a>>2]=g;if(g|0){ea=d;return}do if(c[b+4>>2]|0){Y(d|0,0)|0;e=c[6746]|0;g=b+8|0;f[g>>2]=+f[g>>2]+ +(((c[d+4>>2]|0)-(c[e+4>>2]|0)+(((c[d>>2]|0)-(c[e>>2]|0)|0)*1e6|0)-(c[b+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[a>>2]|0)){b=c[2685]|0;break}else{ea=d;return}}while(0);c[2685]=c[b+20>>2];ea=d;return}function _g(b,d){b=b|0;d=d|0;var e=0;c[b>>2]=10152;a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=-1;c[b+16>>2]=0;c[b+20>>2]=0;a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;c[b+64>>2]=0;c[b+68>>2]=0;c[b+72>>2]=-1;c[b+76>>2]=0;c[b+80>>2]=0;a[b+193>>0]=0;a[b+194>>0]=1;a[b+192>>0]=((d|0)!=0^1)&1;f[b+140>>2]=0.0;c[b+144>>2]=0;c[b+164>>2]=0;c[b+148>>2]=1;c[b+152>>2]=0;c[b+156>>2]=10;c[b+160>>2]=1;c[b+168>>2]=0;c[b+172>>2]=0;f[b+176>>2]=0.0;if(d|0){e=d;d=b+136|0;c[d>>2]=e;d=b+188|0;c[d>>2]=0;d=b+180|0;c[d>>2]=0;d=b+184|0;c[d>>2]=0;b=b+124|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;return}c[6747]=(c[6747]|0)+1;d=kb(95)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}Oh(d);e=b+136|0;c[e>>2]=d;e=b+188|0;c[e>>2]=0;e=b+180|0;c[e>>2]=0;e=b+184|0;c[e>>2]=0;e=b+124|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;return}function $g(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[b+16>>2]|0;if(d|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;d=c[b+40>>2]|0;if(d|0){if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+40>>2]=0}a[b+44>>0]=1;c[b+40>>2]=0;c[b+32>>2]=0;c[b+36>>2]=0;d=c[b+60>>2]|0;if(d|0){if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+60>>2]=0}a[b+64>>0]=1;c[b+60>>2]=0;c[b+52>>2]=0;c[b+56>>2]=0;if((c[b+12>>2]|0)>=2){He(b);return}c[6747]=(c[6747]|0)+1;d=kb(43)|0;if(!d)f=0;else{c[(d+4+15&-16)+-4>>2]=d;f=d+4+15&-16}d=c[b+8>>2]|0;if((d|0)>0){e=0;do{g=f+(e*12|0)|0;h=(c[b+16>>2]|0)+(e*12|0)|0;c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];e=e+1|0}while((e|0)!=(d|0))}d=c[b+16>>2]|0;if(d|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=f;c[b+12>>2]=2;He(b);return}function ah(a,b,e){a=a|0;b=b|0;e=e|0;ch(a,b,e)|0;c[b+52>>2]=c[a+52>>2];c[b+56>>2]=c[a+56>>2];c[b+60>>2]=c[a+60>>2];c[b+64>>2]=c[a+64>>2];c[b+68>>2]=c[a+68>>2];c[b+72>>2]=c[a+72>>2];c[b+76>>2]=c[a+76>>2];c[b+80>>2]=c[a+80>>2];c[b+84>>2]=c[a+84>>2];c[b+88>>2]=c[a+88>>2];c[b+92>>2]=c[a+92>>2];c[b+96>>2]=c[a+96>>2];c[b+100>>2]=c[a+100>>2];c[b+104>>2]=c[a+104>>2];c[b+108>>2]=c[a+108>>2];c[b+112>>2]=c[a+112>>2];c[b+116>>2]=c[a+116>>2];c[b+120>>2]=c[a+120>>2];c[b+124>>2]=c[a+124>>2];c[b+128>>2]=c[a+128>>2];c[b+132>>2]=c[a+132>>2];c[b+136>>2]=c[a+136>>2];c[b+140>>2]=c[a+140>>2];c[b+144>>2]=c[a+144>>2];c[b+148>>2]=c[a+148>>2];c[b+152>>2]=c[a+152>>2];c[b+156>>2]=c[a+156>>2];c[b+160>>2]=c[a+160>>2];c[b+164>>2]=c[a+164>>2];c[b+168>>2]=c[a+168>>2];c[b+172>>2]=c[a+172>>2];c[b+176>>2]=c[a+176>>2];c[b+180>>2]=c[a+188>>2];c[b+184>>2]=c[a+184>>2];c[b+188>>2]=c[a+196>>2];c[b+192>>2]=c[a+192>>2];c[b+196>>2]=d[a+180>>0];c[b+200>>2]=d[a+49>>0];return 15315}function bh(a,b){a=a|0;b=+b;var d=0,e=0,g=0;e=ea;ea=ea+16|0;d=c[a+452>>2]|0;Ma[c[(c[d>>2]|0)+16>>2]&127](d,a+324|0,0);d=c[a+452>>2]|0;ra[c[(c[d>>2]|0)+12>>2]&127](d)|0;Lb(a,b);Fi(14280);if(c[a+328>>2]|0)gf(a+324|0);d=c[a+452>>2]|0;Da[c[(c[d>>2]|0)+28>>2]&31](d,+f[d+12>>2]*b);d=c[2685]|0;g=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=g;do if(!g){if(c[d+4>>2]|0){Y(e|0,0)|0;g=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[e+4>>2]|0)-(c[g+4>>2]|0)+(((c[e>>2]|0)-(c[g>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(c[d+16>>2]|0)break;d=c[2685]|0}c[2685]=c[d+20>>2]}while(0);if((c[a+328>>2]|0)<=0){g=c[a+452>>2]|0;a=c[g>>2]|0;a=a+32|0;a=c[a>>2]|0;Ca[a&511](g);ea=e;return}d=0;do{g=c[(c[a+336>>2]|0)+(d<<2)>>2]|0;kh(g,g);d=d+1|0}while((d|0)<(c[a+328>>2]|0));g=c[a+452>>2]|0;a=c[g>>2]|0;a=a+32|0;a=c[a>>2]|0;Ca[a&511](g);ea=e;return}function ch(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0;c[b>>2]=ta[c[(c[e>>2]|0)+28>>2]&31](e,c[a+28>>2]|0)|0;c[b+4>>2]=ta[c[(c[e>>2]|0)+28>>2]&31](e,c[a+32>>2]|0)|0;f=ta[c[(c[e>>2]|0)+40>>2]&31](e,a)|0;g=ta[c[(c[e>>2]|0)+28>>2]&31](e,f)|0;c[b+8>>2]=g;if(g|0)Ia[c[(c[e>>2]|0)+48>>2]&127](e,f);c[b+12>>2]=c[a+4>>2];c[b+24>>2]=d[a+21>>0];c[b+40>>2]=c[a+24>>2];c[b+44>>2]=c[a+16>>2];c[b+48>>2]=d[a+20>>0];c[b+20>>2]=c[a+12>>2];c[b+16>>2]=c[a+8>>2];c[b+28>>2]=c[a+36>>2];c[b+32>>2]=c[a+40>>2];c[b+36>>2]=0;f=c[a+28>>2]|0;g=c[f+488>>2]|0;if((g|0)>0){f=c[f+496>>2]|0;if((c[f>>2]|0)==(a|0))c[b+36>>2]=1;if((g|0)>1){e=1;do{if((c[f+(e<<2)>>2]|0)==(a|0))c[b+36>>2]=1;e=e+1|0}while((e|0)!=(g|0))}}f=c[a+32>>2]|0;g=c[f+488>>2]|0;if((g|0)<=0)return 15252;f=c[f+496>>2]|0;if((c[f>>2]|0)==(a|0))c[b+36>>2]=1;if((g|0)<=1)return 15252;e=1;do{if((c[f+(e<<2)>>2]|0)==(a|0))c[b+36>>2]=1;e=e+1|0}while((e|0)!=(g|0));return 15252}function dh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0;g=ea;ea=ea+16|0;x=c[a+52>>2]|0;m=+f[a+28+(((x+2|0)%3|0)<<2)>>2];f[g>>2]=m;f[g+4>>2]=m;f[g+8>>2]=m;f[g+12>>2]=0.0;f[g+(x<<2)>>2]=m+ +f[a+28+(x<<2)>>2];m=+ha[c[(c[a>>2]|0)+48>>2]&15](a);k=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);m=m+ +f[g>>2];f[g>>2]=m;k=k+ +f[g+4>>2];f[g+4>>2]=k;i=i+ +f[g+8>>2];w=+r(+(+f[b>>2]));v=+r(+(+f[b+4>>2]));u=+r(+(+f[b+8>>2]));s=+r(+(+f[b+16>>2]));q=+r(+(+f[b+20>>2]));p=+r(+(+f[b+24>>2]));l=+r(+(+f[b+32>>2]));j=+r(+(+f[b+36>>2]));h=+r(+(+f[b+40>>2]));t=+f[b+48>>2];o=+f[b+52>>2];n=+f[b+56>>2];f[d>>2]=t-(m*w+k*v+i*u);f[d+4>>2]=o-(m*s+k*q+i*p);f[d+8>>2]=n-(m*l+k*j+i*h);f[d+12>>2]=0.0;f[e>>2]=m*w+k*v+i*u+t;f[e+4>>2]=m*s+k*q+i*p+o;f[e+8>>2]=n+(m*l+k*j+i*h);f[e+12>>2]=0.0;ea=g;return}function eh(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if(rt(b,c[d+8>>2]|0,h)|0)xk(d,e,f,g);else{k=a[d+52>>0]|0;i=a[d+53>>0]|0;n=c[b+12>>2]|0;a[d+52>>0]=0;a[d+53>>0]=0;hn(b+16|0,d,e,f,g,h);l=a[d+52>>0]|0;j=a[d+53>>0]|0;a:do if((n|0)>1){m=j;o=l;j=j|i;i=l|k;k=b+24|0;do{j=j&1;i=i&1;if(a[d+54>>0]|0)break a;if(!(o<<24>>24)){if(m<<24>>24?(c[b+8>>2]&1|0)==0:0)break a}else{if((c[d+24>>2]|0)==1)break a;if(!(c[b+8>>2]&2))break a}a[d+52>>0]=0;a[d+53>>0]=0;hn(k,d,e,f,g,h);o=a[d+52>>0]|0;i=o|i;m=a[d+53>>0]|0;j=m|j;k=k+8|0}while(k>>>0<(b+16+(n<<3)|0)>>>0)}else{j=j|i;i=l|k}while(0);a[d+52>>0]=i<<24>>24!=0&1;a[d+53>>0]=j<<24>>24!=0&1}return}function fh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;h=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=h;if(h|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];g=c[a+92>>2]|0;if(!g){c[b+52>>2]=0;c[b+56>>2]=0;return 19160}c[b+52>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[a+100>>2]|0)|0;c[b+56>>2]=g;h=va[c[(c[d>>2]|0)+16>>2]&63](d,20,g)|0;if((g|0)>0){e=c[a+100>>2]|0;b=c[a+120>>2]|0;a=0;f=c[h+8>>2]|0;while(1){c[f>>2]=c[e+(a<<4)>>2];c[f+4>>2]=c[e+(a<<4)+4>>2];c[f+8>>2]=c[e+(a<<4)+8>>2];c[f+12>>2]=c[e+(a<<4)+12>>2];c[f+16>>2]=c[b+(a<<2)>>2];a=a+1|0;if((a|0)==(g|0))break;else f=f+20|0}}else e=c[a+100>>2]|0;Ta[c[(c[d>>2]|0)+20>>2]&31](d,h,19140,1497453121,e);return 19160}function gh(){var b=0,d=0,e=0;b=js(288)|0;c[b+164>>2]=1065353216;c[b+168>>2]=1065353216;c[b+172>>2]=1065353216;f[b+176>>2]=0.0;c[b+180>>2]=0;f[b+184>>2]=999999984306749440.0;c[b+188>>2]=0;c[b+188+4>>2]=0;c[b+188+8>>2]=0;c[b+188+12>>2]=0;c[b+204>>2]=1;c[b+208>>2]=-1;c[b+212>>2]=-1;c[b+216>>2]=1;f[b+220>>2]=0.0;f[b+224>>2]=.5;f[b+228>>2]=0.0;f[b+232>>2]=0.0;c[b+240>>2]=0;f[b+244>>2]=1.0;c[b+248>>2]=0;c[b+248+4>>2]=0;c[b+248+8>>2]=0;c[b+248+12>>2]=0;c[b+4>>2]=1065353216;c[b+8>>2]=0;c[b+8+4>>2]=0;c[b+8+8>>2]=0;c[b+8+12>>2]=0;c[b+24>>2]=1065353216;c[b+28>>2]=0;c[b+28+4>>2]=0;c[b+28+8>>2]=0;c[b+28+12>>2]=0;c[b+44>>2]=1065353216;c[b+48>>2]=0;c[b+48+4>>2]=0;c[b+48+8>>2]=0;c[b+48+12>>2]=0;c[b+48+16>>2]=0;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;c[b+272>>2]=0;c[b+236>>2]=4;c[b>>2]=6200;c[6747]=(c[6747]|0)+1;d=kb(95)|0;if(!d){e=0;Oh(e);d=b+284|0;c[d>>2]=e;return b|0}c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16;Oh(d);e=b+284|0;c[e>>2]=d;return b|0}function hh(a,d,e,g){a=a|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0;h=ea;ea=ea+96|0;f[h+4>>2]=1.0;c[h+8>>2]=0;b[h+12>>1]=1;b[h+14>>1]=-1;c[h+16>>2]=0;c[h>>2]=3788;c[h+20>>2]=c[d>>2];c[h+20+4>>2]=c[d+4>>2];c[h+20+8>>2]=c[d+8>>2];c[h+20+12>>2]=c[d+12>>2];c[h+36>>2]=c[e>>2];c[h+36+4>>2]=c[e+4>>2];c[h+36+8>>2]=c[e+8>>2];c[h+36+12>>2]=c[e+12>>2];a=c[a+4>>2]|0;Pa[c[(c[a>>2]|0)+32>>2]&127](a,d,e,h);d=c[h+8>>2]|0;if(!d){g=0;ea=h;return g|0}if(!(c[d+236>>2]&2)){g=0;ea=h;return g|0}if(c[d+204>>2]&4|0){g=0;ea=h;return g|0}c[g>>2]=c[h+68>>2];c[g+4>>2]=c[h+68+4>>2];c[g+8>>2]=c[h+68+8>>2];c[g+12>>2]=c[h+68+12>>2];c[g+16>>2]=c[h+52>>2];c[g+16+4>>2]=c[h+52+4>>2];c[g+16+8>>2]=c[h+52+8>>2];c[g+16+12>>2]=c[h+52+12>>2];l=+f[g+16>>2];k=+f[g+20>>2];j=+f[g+24>>2];i=1.0/+s(+(l*l+k*k+j*j));f[g+16>>2]=l*i;f[g+20>>2]=k*i;f[g+24>>2]=j*i;c[g+32>>2]=c[h+4>>2];g=d;ea=h;return g|0}function ih(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;Ca[c[(c[b>>2]|0)+32>>2]&511](b);e=va[c[(c[b>>2]|0)+16>>2]&63](b,104,1)|0;d=c[e+8>>2]|0;f=d;g=f+104|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[d+88>>2]=c[a+248>>2];c[d+92>>2]=c[a+252>>2];c[d+96>>2]=c[a+256>>2];c[d+100>>2]=c[a+260>>2];c[d>>2]=c[a+92>>2];c[d+4>>2]=c[a+96>>2];c[d+8>>2]=c[a+100>>2];c[d+12>>2]=c[a+104>>2];c[d+16>>2]=c[a+108>>2];c[d+20>>2]=c[a+116>>2];c[d+24>>2]=c[a+120>>2];c[d+28>>2]=c[a+124>>2];c[d+32>>2]=c[a+128>>2];c[d+36>>2]=c[a+132>>2];c[d+40>>2]=c[a+140>>2];c[d+44>>2]=c[a+144>>2];c[d+48>>2]=c[a+148>>2];c[d+52>>2]=c[a+152>>2];c[d+56>>2]=c[a+168>>2];c[d+60>>2]=c[a+172>>2];c[d+64>>2]=c[a+112>>2];c[d+68>>2]=c[a+156>>2];c[d+72>>2]=c[a+160>>2];c[d+76>>2]=c[a+164>>2];c[d+80>>2]=c[a+136>>2];Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,14893,1145853764,d);ri(a,b);nc(a,b);Ca[c[(c[b>>2]|0)+36>>2]&511](b);return}function jh(b,d){b=b|0;d=d|0;if((c[b+16>>2]|0)!=(0-(c[b+76>>2]|0)|0))return;d=c[b+4>>2]|0;if(d|0)Hm(b+4|0,d);d=c[b+8>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+8>>2]=0;c[b+12>>2]=-1;d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;c[b+20>>2]=0;d=c[b+64>>2]|0;if(d|0)Hm(b+64|0,d);d=c[b+68>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+68>>2]=0;c[b+72>>2]=-1;d=c[b+96>>2]|0;if(d|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;c[b+80>>2]=0;a[b+193>>0]=0;a[b+194>>0]=1;c[b+144>>2]=0;c[b+164>>2]=0;c[b+148>>2]=1;c[b+152>>2]=0;c[b+156>>2]=10;c[b+160>>2]=1;c[b+124>>2]=0;c[b+124+4>>2]=0;c[b+124+8>>2]=0;c[b+168>>2]=0;c[b+168+4>>2]=0;c[b+168+8>>2]=0;c[b+168+12>>2]=0;c[b+168+16>>2]=0;c[b+168+20>>2]=0;return}function kh(a,b){a=a|0;b=b|0;var d=0,e=0,g=0.0,h=0.0;e=ea;ea=ea+32|0;d=c[b+388>>2]|0;switch(c[a+388>>2]&48&d&63){case 32:{if((a|0)==(b|0)&(d&64|0)==0){ea=e;return}f[e+4>>2]=1.0;c[e+8+4>>2]=0;c[e+8+4+4>>2]=0;c[e+8+4+8>>2]=0;c[e>>2]=4604;c[e+8>>2]=c[a+456>>2];d=c[a+192>>2]|0;h=+ha[c[(c[d>>2]|0)+48>>2]&15](d);d=c[b+192>>2]|0;f[e+12>>2]=h+ +ha[c[(c[d>>2]|0)+48>>2]&15](d);h=+f[a+316>>2];g=+f[b+316>>2];f[e+16>>2]=h>2]=a;c[e+28>>2]=b;Cd(c[a+1048>>2]|0,c[b+1048>>2]|0,e);ea=e;return}case 16:{if((a|0)==(b|0)){ea=e;return}c[e>>2]=4640;d=c[a+192>>2]|0;h=+ha[c[(c[d>>2]|0)+48>>2]&15](d);d=c[b+192>>2]|0;f[e+12>>2]=h+ +ha[c[(c[d>>2]|0)+48>>2]&15](d);c[e+4>>2]=a;c[e+8>>2]=b;Cd(c[a+928>>2]|0,c[b+988>>2]|0,e);c[e+4>>2]=b;c[e+8>>2]=a;Cd(c[b+928>>2]|0,c[a+988>>2]|0,e);ea=e;return}default:{ea=e;return}}}function lh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0,j=0.0;i=ea;ea=ea+32|0;c[i+16>>2]=c[d>>2];c[i+16+4>>2]=c[d+4>>2];c[i+16+8>>2]=c[d+8>>2];c[i+16+12>>2]=c[d+12>>2];e=+f[i+16>>2];h=+f[i+16+4>>2];g=+f[i+16+8>>2];if(e*e+h*h+g*g<1.4210854715202004e-14){c[i+16>>2]=-1082130432;c[i+16+4>>2]=-1082130432;c[i+16+8>>2]=-1082130432;f[i+16+12>>2]=0.0;e=-1.0;h=-1.0;g=-1.0}j=1.0/+s(+(e*e+h*h+g*g));f[i+16>>2]=e*j;f[i+16+4>>2]=h*j;f[i+16+8>>2]=g*j;Ac(i,b,i+16|0);switch(c[b+4>>2]|0){case 8:{e=+f[b+28>>2]*+f[b+12>>2];break}case 0:{e=+f[b+44>>2];break}case 1:{e=+f[b+44>>2];break}case 13:{e=+f[b+44>>2];break}case 11:{e=+f[b+44>>2];break}case 10:{e=+f[b+44>>2];break}case 4:case 5:{e=+f[b+44>>2];break}default:e=+ha[c[(c[b>>2]|0)+48>>2]&15](b)}h=e*+f[i+16+4>>2]+ +f[i+4>>2];j=e*+f[i+16+8>>2]+ +f[i+8>>2];f[a>>2]=e*+f[i+16>>2]+ +f[i>>2];f[a+4>>2]=h;f[a+8>>2]=j;f[a+12>>2]=0.0;ea=i;return}function mh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=ea;ea=ea+48|0;h=l;i=h+44|0;do{c[h>>2]=0;h=h+4|0}while((h|0)<(i|0));if(!d)k=c[c[b+880>>2]>>2]|0;else k=d;d=c[b+732>>2]|0;if((d|0)==(c[b+736>>2]|0)?(j=(d|0)==0?1:d<<1,(d|0)<(j|0)):0){if(!j)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((j*52|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[b+732>>2]|0}if((d|0)>0){f=0;do{h=e+(f*52|0)|0;g=(c[b+740>>2]|0)+(f*52|0)|0;i=h+52|0;do{c[h>>2]=c[g>>2];h=h+4|0;g=g+4|0}while((h|0)<(i|0));f=f+1|0}while((f|0)!=(d|0))}d=c[b+740>>2]|0;if(d|0){if(a[b+744>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+740>>2]=0}a[b+744>>0]=1;c[b+740>>2]=e;c[b+736>>2]=j;d=c[b+732>>2]|0}h=c[b+740>>2]|0;c[h+(d*52|0)>>2]=0;c[h+(d*52|0)+4>>2]=k;h=h+(d*52|0)+8|0;g=l;i=h+44|0;do{c[h>>2]=c[g>>2];h=h+4|0;g=g+4|0}while((h|0)<(i|0));c[b+732>>2]=(c[b+732>>2]|0)+1;ea=l;return}function nh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,i=0,j=0.0,k=0,l=0,m=0,n=0.0;l=ea;ea=ea+80|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;e=+f[d>>2];g=+f[d+4>>2];j=+f[d+8>>2];if(e*e+g*g+j*j<9.999999747378752e-05){k=1065353216;i=0;e=0.0;d=0}else{n=1.0/+s(+(e*e+g*g+j*j));k=(f[h>>2]=e*n,c[h>>2]|0);m=(f[h>>2]=g*n,c[h>>2]|0);i=(f[h>>2]=j*n,c[h>>2]|0);e=+f[d+12>>2];d=m}c[l+32>>2]=9136;m=l+32+4|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;f[l+32+20>>2]=-999999984306749440.0;c[l+32+24>>2]=k;c[l+32+28>>2]=d;c[l+32+32>>2]=i;f[l+32+36>>2]=e;c[l+16>>2]=1566444395;c[l+16+4>>2]=1566444395;c[l+16+8>>2]=1566444395;f[l+16+12>>2]=0.0;b=c[b+92>>2]|0;k=c[(c[b>>2]|0)+8>>2]|0;f[l>>2]=-999999984306749440.0;f[l+4>>2]=-999999984306749440.0;f[l+8>>2]=-999999984306749440.0;f[l+12>>2]=0.0;Pa[k&127](b,l+32|0,l,l+16|0);c[a>>2]=c[m>>2];c[a+4>>2]=c[m+4>>2];c[a+8>>2]=c[m+8>>2];c[a+12>>2]=c[m+12>>2];ea=l;return}function oh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0,i=0.0,j=0.0,k=0,l=0.0,m=0.0;l=+f[b+60>>2]*.5;h=c[b+68>>2]|0;g=+f[d>>2];i=+f[d+4>>2];j=+f[d+8>>2];j=+s(+(g*g+i*i+j*j));k=c[b+64>>2]|0;do if(!(+f[d+(h<<2)>>2]>+f[b+52>>2]*j)){g=+f[d+(k<<2)>>2];e=c[b+72>>2]|0;i=+f[d+(e<<2)>>2];j=+s(+(g*g+i*i));if(j>1.1920928955078125e-07){j=+f[b+56>>2]/j;f[a+(k<<2)>>2]=g*j;f[a+(h<<2)>>2]=-l;g=i*j;break}else{f[a+(k<<2)>>2]=0.0;f[a+(h<<2)>>2]=-l;g=0.0;break}}else{f[a+(k<<2)>>2]=0.0;f[a+(h<<2)>>2]=l;g=0.0;e=c[b+72>>2]|0}while(0);f[a+(e<<2)>>2]=g;if(!(+ha[c[(c[b>>2]|0)+48>>2]&15](b)!=0.0))return;i=+f[d>>2];l=+f[d+4>>2];j=+f[d+8>>2];m=i*i+l*l+j*j<1.4210854715202004e-14?-1.0:i;g=i*i+l*l+j*j<1.4210854715202004e-14?-1.0:l;j=i*i+l*l+j*j<1.4210854715202004e-14?-1.0:j;l=1.0/+s(+(j*j+(m*m+g*g)));i=+ha[c[(c[b>>2]|0)+48>>2]&15](b);f[a>>2]=+f[a>>2]+i*(m*l);f[a+4>>2]=+f[a+4>>2]+i*(g*l);f[a+8>>2]=+f[a+8>>2]+i*(j*l);return}function ph(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;g=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=g;if(g|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];f=c[a+96>>2]|0;c[b+60>>2]=f;if(!f){c[b+52>>2]=0;c[b+56>>2]=0;return 20050}c[b+52>>2]=ta[c[(c[d>>2]|0)+28>>2]&31](d,c[a+104>>2]|0)|0;c[b+56>>2]=0;g=va[c[(c[d>>2]|0)+16>>2]&63](d,16,f)|0;if((f|0)>0){e=c[a+104>>2]|0;b=0;a=c[g+8>>2]|0;while(1){c[a>>2]=c[e+(b<<4)>>2];c[a+4>>2]=c[e+(b<<4)+4>>2];c[a+8>>2]=c[e+(b<<4)+8>>2];c[a+12>>2]=c[e+(b<<4)+12>>2];b=b+1|0;if((b|0)==(f|0))break;else a=a+16|0}}else e=c[a+104>>2]|0;Ta[c[(c[d>>2]|0)+20>>2]&31](d,g,22049,1497453121,e);return 20050}function qh(a,b,d){a=a|0;b=b|0;d=d|0;c[a+300>>2]=c[b>>2];c[a+300+4>>2]=c[b+4>>2];c[a+300+8>>2]=c[b+8>>2];c[a+300+12>>2]=c[b+12>>2];c[a+316>>2]=c[b+16>>2];c[a+316+4>>2]=c[b+16+4>>2];c[a+316+8>>2]=c[b+16+8>>2];c[a+316+12>>2]=c[b+16+12>>2];c[a+332>>2]=c[b+32>>2];c[a+332+4>>2]=c[b+32+4>>2];c[a+332+8>>2]=c[b+32+8>>2];c[a+332+12>>2]=c[b+32+12>>2];c[a+348>>2]=c[b+48>>2];c[a+348+4>>2]=c[b+48+4>>2];c[a+348+8>>2]=c[b+48+8>>2];c[a+348+12>>2]=c[b+48+12>>2];c[a+364>>2]=c[d>>2];c[a+364+4>>2]=c[d+4>>2];c[a+364+8>>2]=c[d+8>>2];c[a+364+12>>2]=c[d+12>>2];c[a+380>>2]=c[d+16>>2];c[a+380+4>>2]=c[d+16+4>>2];c[a+380+8>>2]=c[d+16+8>>2];c[a+380+12>>2]=c[d+16+12>>2];c[a+396>>2]=c[d+32>>2];c[a+396+4>>2]=c[d+32+4>>2];c[a+396+8>>2]=c[d+32+8>>2];c[a+396+12>>2]=c[d+32+12>>2];c[a+412>>2]=c[d+48>>2];c[a+412+4>>2]=c[d+48+4>>2];c[a+412+8>>2]=c[d+48+8>>2];c[a+412+12>>2]=c[d+48+12>>2];Ca[c[(c[a>>2]|0)+8>>2]&511](a);return}function rh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0.0;m=c[a+4>>2]|0;a=c[a+64>>2]|0;do if(!m)if(!a){e=0.0;n=0.0;j=0.0;l=0.0;h=0.0;k=0.0;i=0.0;g=0.0}else{e=+f[a>>2];n=+f[a+12>>2];j=+f[a+16>>2];l=+f[a+20>>2];h=+f[a+24>>2];k=+f[a+28>>2];i=+f[a+4>>2];g=+f[a+8>>2]}else{e=+f[m>>2];if(!a){n=+f[m+12>>2];j=+f[m+16>>2];l=+f[m+20>>2];h=+f[m+24>>2];k=+f[m+28>>2];i=+f[m+4>>2];g=+f[m+8>>2];break}k=+f[a>>2];e=e>2];j=+f[a+16>>2];j=k>j?k:j;k=+f[m+4>>2];i=+f[a+4>>2];i=k>2];l=+f[a+20>>2];l=k>l?k:l;k=+f[m+8>>2];g=+f[a+8>>2];g=k>2];h=+f[a+24>>2];if(k>h){n=0.0;h=k;k=0.0}else{n=0.0;k=0.0}}while(0);f[b>>2]=e;f[b+4>>2]=i;f[b+8>>2]=g;f[b+12>>2]=n;f[d>>2]=j;f[d+4>>2]=l;f[d+8>>2]=h;f[d+12>>2]=k;return}function sh(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;c=ea;ea=ea+48|0;Gg(a+364|0,c+16|0);h=-+f[c+16>>2];e=-+f[c+16+4>>2];l=-+f[c+16+8>>2];k=+f[c+16+12>>2];g=+f[b>>2];m=+f[b+12>>2];j=+f[b+8>>2];i=+f[b+4>>2];Gg(a+300|0,c);o=+f[c>>2];p=+f[c+12>>2];d=+f[c+8>>2];n=+f[c+4>>2];f[c+32>>2]=(k*m-g*h-i*e-j*l)*o+(k*g+m*h+j*e-i*l)*p+(g*l+(m*e+k*i)-j*h)*d-(m*l+k*j+i*h-g*e)*n;f[c+32+4>>2]=o*(m*l+k*j+i*h-g*e)+(p*(g*l+(m*e+k*i)-j*h)+(k*m-g*h-i*e-j*l)*n)-(k*g+m*h+j*e-i*l)*d;f[c+32+8>>2]=(m*l+k*j+i*h-g*e)*p+(k*m-g*h-i*e-j*l)*d+(k*g+m*h+j*e-i*l)*n-o*(g*l+(m*e+k*i)-j*h);f[c+32+12>>2]=(k*m-g*h-i*e-j*l)*p-(k*g+m*h+j*e-i*l)*o-(g*l+(m*e+k*i)-j*h)*n-(m*l+k*j+i*h-g*e)*d;Vd(a,c+32|0);ea=c;return}function th(b){b=b|0;var d=0;d=c[b>>2]|0;if(d|0)Hm(b,d);d=c[b+4>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+4>>2]=0;c[b+8>>2]=-1;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;c[b+16>>2]=0;d=c[b+52>>2]|0;if(!d){a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}if(!(a[b+56>>0]|0)){a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+32>>2]|0;a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;if(!d){a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}function uh(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;i=ea;ea=ea+32|0;h=Gs()|0;c[h+4>>2]=11;c[h+8>>2]=-1;c[h+12>>2]=-1;f[h+16>>2]=3402823466385288598117041.0e14;a[h+20>>0]=1;a[h+21>>0]=0;c[h+24>>2]=-1;c[h+28>>2]=b;c[h+32>>2]=d;f[h+36>>2]=0.0;f[h+40>>2]=.30000001192092896;c[h+44>>2]=0;c[h>>2]=5440;c[h+48>>2]=c[e+48>>2];c[h+48+4>>2]=c[e+48+4>>2];c[h+48+8>>2]=c[e+48+8>>2];c[h+48+12>>2]=c[e+48+12>>2];c[h+64>>2]=c[g+48>>2];c[h+64+4>>2]=c[g+48+4>>2];c[h+64+8>>2]=c[g+48+8>>2];c[h+64+12>>2]=c[g+48+12>>2];Gg(e,i+16|0);Gg(g,i);n=-+f[i>>2];l=-+f[i+4>>2];j=-+f[i+8>>2];q=+f[i+12>>2];p=+f[i+16+12>>2];o=+f[i+16>>2];m=+f[i+16+4>>2];k=+f[i+16+8>>2];f[h+80>>2]=p*n+q*o+m*j-k*l;f[h+84>>2]=k*n+(p*l+q*m)-o*j;f[h+88>>2]=o*l+(p*j+q*k)-m*n;f[h+92>>2]=q*p-o*n-m*l-k*j;ea=i;return h|0}function vh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192){W(b|0,d|0,e|0)|0;return b|0}h=b|0;g=b+e|0;if((b&3)==(d&3)){while(b&3){if(!e)return h|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((b|0)<=(f|0)){c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];c[b+8>>2]=c[d+8>>2];c[b+12>>2]=c[d+12>>2];c[b+16>>2]=c[d+16>>2];c[b+20>>2]=c[d+20>>2];c[b+24>>2]=c[d+24>>2];c[b+28>>2]=c[d+28>>2];c[b+32>>2]=c[d+32>>2];c[b+36>>2]=c[d+36>>2];c[b+40>>2]=c[d+40>>2];c[b+44>>2]=c[d+44>>2];c[b+48>>2]=c[d+48>>2];c[b+52>>2]=c[d+52>>2];c[b+56>>2]=c[d+56>>2];c[b+60>>2]=c[d+60>>2];b=b+64|0;d=d+64|0}while((b|0)<(e|0)){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0}}else{e=g-4|0;while((b|0)<(e|0)){a[b>>0]=a[d>>0]|0;a[b+1>>0]=a[d+1>>0]|0;a[b+2>>0]=a[d+2>>0]|0;a[b+3>>0]=a[d+3>>0]|0;b=b+4|0;d=d+4|0}}while((b|0)<(g|0)){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0}return h|0}function wh(b){b=b|0;var d=0;if((a[24904]|0)==0?DC(24904)|0:0){if((a[24880]|0)==0?DC(24880)|0:0){if((a[24888]|0)==0?DC(24888)|0:0){c[6348]=1065353216;c[6349]=0;c[6350]=0;c[6351]=0;c[6352]=0;c[6353]=1065353216;c[6354]=0;c[6355]=0;c[6356]=0;c[6357]=0;c[6358]=1065353216;f[6359]=0.0;PB(24888)}c[6332]=c[6348];c[6333]=c[6349];c[6334]=c[6350];c[6335]=c[6351];c[6336]=c[6352];c[6337]=c[6353];c[6338]=c[6354];c[6339]=c[6355];c[6340]=c[6356];c[6341]=c[6357];c[6342]=c[6358];c[6343]=c[6359];c[6344]=0;c[6345]=0;c[6346]=0;c[6347]=0;PB(24880)}c[6372]=c[6332];c[6373]=c[6333];c[6374]=c[6334];c[6375]=c[6335];c[6376]=c[6336];c[6377]=c[6337];c[6378]=c[6338];c[6379]=c[6339];c[6380]=c[6340];c[6381]=c[6341];c[6382]=c[6342];c[6383]=c[6343];c[6384]=c[6344];c[6385]=c[6345];c[6386]=c[6346];c[6387]=c[6347];PB(24904)}d=c[b+8>>2]|0;if(!d){b=c[b>>2]|0;return ((b|0)==0?25488:b+60|0)|0}else return d+4|0;return 0}function xh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if(!e)e=c[b+188>>2]|0;i=c[d>>2]|0;f=c[b+268>>2]|0;a:do if((f|0)>0){h=c[b+276>>2]|0;g=0;while(1){if((c[h+(g<<2)>>2]|0)==(i|0))break;g=g+1|0;if((g|0)>=(f|0))break a}if((g|0)!=(f|0))return}while(0);if((f|0)==(c[b+272>>2]|0)?(j=(f|0)==0?1:f<<1,(f|0)<(j|0)):0){if(!j)g=0;else{c[6747]=(c[6747]|0)+1;f=kb((j<<2|3)+16|0)|0;if(!f)g=0;else{c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}f=c[b+268>>2]|0}if((f|0)>0){h=0;do{c[g+(h<<2)>>2]=c[(c[b+276>>2]|0)+(h<<2)>>2];h=h+1|0}while((h|0)!=(f|0))}h=c[b+276>>2]|0;if(h){if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);f=c[b+268>>2]|0}c[b+276>>2]=0}a[b+280>>0]=1;c[b+276>>2]=g;c[b+272>>2]=j}c[(c[b+276>>2]|0)+(f<<2)>>2]=i;c[b+268>>2]=f+1;b=c[b+284>>2]|0;va[c[(c[b>>2]|0)+8>>2]&63](b,e,d)|0;return}function yh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(ra[c[(c[d>>2]|0)+16>>2]&127](d)|0)return;j=c[b+712>>2]|0;i=ra[c[(c[d>>2]|0)+36>>2]&127](d)|0;if(ra[c[(c[d>>2]|0)+8>>2]&127](d)|0?(f=ra[c[(c[d>>2]|0)+20>>2]&127](d)|0,h=ra[c[(c[d>>2]|0)+24>>2]&127](d)|0,(j|0)>0):0){e=c[b+720>>2]|0;g=0;a=i+(f<<2)|0;while(1){k=c[e+(g*104|0)+12>>2]|0;f=c[e+(g*104|0)+16>>2]|0;c[a>>2]=c[e+(g*104|0)+8>>2];c[a+4>>2]=k;c[a+8>>2]=f;g=g+1|0;if((g|0)==(j|0))break;else a=a+(h<<2)|0}}if(!(ra[c[(c[d>>2]|0)+12>>2]&127](d)|0))return;a=ra[c[(c[d>>2]|0)+28>>2]&127](d)|0;g=ra[c[(c[d>>2]|0)+32>>2]&127](d)|0;if((j|0)<=0)return;f=c[b+720>>2]|0;a=i+(a<<2)|0;e=0;while(1){b=c[f+(e*104|0)+76>>2]|0;k=c[f+(e*104|0)+80>>2]|0;c[a>>2]=c[f+(e*104|0)+72>>2];c[a+4>>2]=b;c[a+8>>2]=k;e=e+1|0;if((e|0)==(j|0))break;else a=a+(g<<2)|0}return}function zh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;c[b>>2]=10664;d=c[b+56>>2]|0;if(d|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;e=c[b+28>>2]|0;if((e|0)>0){h=0;do{f=c[b+36>>2]|0;j=f+(h*36|0)+4|0;i=f+(h*36|0)+12|0;g=c[i>>2]|0;d=f+(h*36|0)+16|0;if(g|0){if(a[d>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[i>>2]=0}a[d>>0]=1;c[i>>2]=0;c[j>>2]=0;c[f+(h*36|0)+8>>2]=0;h=h+1|0}while((h|0)!=(e|0))}d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function Ah(b){b=b|0;var d=0;c[b>>2]=9764;d=c[b+156>>2]|0;if(d|0){if(a[b+160>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+156>>2]=0}a[b+160>>0]=1;c[b+156>>2]=0;c[b+148>>2]=0;c[b+152>>2]=0;d=c[b+136>>2]|0;if(d|0){if(a[b+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+136>>2]=0}a[b+140>>0]=1;c[b+136>>2]=0;c[b+128>>2]=0;c[b+132>>2]=0;d=c[b+116>>2]|0;if(d|0){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+116>>2]=0}a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;d=c[b+96>>2]|0;if(d|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;c[b>>2]=10680;d=c[b+32>>2]|0;if(!d){a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;b=b+28|0;c[b>>2]=0;return}if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;b=b+28|0;c[b>>2]=0;return}function Bh(b){b=b|0;var d=0;c[b>>2]=10324;d=c[b+160>>2]|0;if(d|0){if(a[b+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+160>>2]=0}a[b+164>>0]=1;c[b+160>>2]=0;c[b+152>>2]=0;c[b+156>>2]=0;d=c[b+136>>2]|0;if(d|0){if(a[b+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+136>>2]=0}a[b+140>>0]=1;c[b+136>>2]=0;c[b+128>>2]=0;c[b+132>>2]=0;d=c[b+116>>2]|0;if(d|0){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+116>>2]=0}a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;d=c[b+96>>2]|0;if(d|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;d=c[b+76>>2]|0;if(!d){a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;b=b+72|0;c[b>>2]=0;return}if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+76>>2]=0;a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;b=b+72|0;c[b>>2]=0;return}function Ch(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0,j=0.0,k=0.0,l=0,m=0.0,n=0,o=0;o=ea;ea=ea+16|0;if((e|0)<=0){ea=o;return}n=0;do{m=+f[a+60>>2]*.5;i=c[a+68>>2]|0;h=+f[b+(n<<4)>>2];j=+f[b+(n<<4)+4>>2];k=+f[b+(n<<4)+8>>2];k=+s(+(h*h+j*j+k*k));l=c[a+64>>2]|0;do if(!(+f[b+(n<<4)+(i<<2)>>2]>+f[a+52>>2]*k)){h=+f[b+(n<<4)+(l<<2)>>2];g=c[a+72>>2]|0;j=+f[b+(n<<4)+(g<<2)>>2];k=+s(+(h*h+j*j));if(k>1.1920928955078125e-07){k=+f[a+56>>2]/k;f[o+(l<<2)>>2]=h*k;f[o+(i<<2)>>2]=-m;h=j*k;break}else{f[o+(l<<2)>>2]=0.0;f[o+(i<<2)>>2]=-m;h=0.0;break}}else{f[o+(l<<2)>>2]=0.0;f[o+(i<<2)>>2]=m;h=0.0;g=c[a+72>>2]|0}while(0);f[o+(g<<2)>>2]=h;l=d+(n<<4)|0;c[l>>2]=c[o>>2];c[l+4>>2]=c[o+4>>2];c[l+8>>2]=c[o+8>>2];c[l+12>>2]=c[o+12>>2];n=n+1|0}while((n|0)!=(e|0));ea=o;return}function Dh(b){b=b|0;var d=0;c[b>>2]=5932;d=c[b+144>>2]|0;if(d|0){if(a[b+148>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+144>>2]=0}a[b+148>>0]=1;c[b+144>>2]=0;c[b+136>>2]=0;c[b+140>>2]=0;d=c[b+76>>2]|0;if(d|0){if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+76>>2]=0}a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;c[b+72>>2]=0;d=c[b+56>>2]|0;if(d|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function Eh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0;o=(+f[a+32>>2]-+f[a+16>>2])*+f[a+108>>2]*.5;m=(+f[a+36>>2]-+f[a+20>>2])*+f[a+112>>2]*.5;k=(+f[a+40>>2]-+f[a+24>>2])*+f[a+116>>2]*.5;u=+r(+(+f[b>>2]));t=+r(+(+f[b+4>>2]));s=+r(+(+f[b+8>>2]));n=+r(+(+f[b+16>>2]));l=+r(+(+f[b+20>>2]));j=+r(+(+f[b+24>>2]));x=+r(+(+f[b+32>>2]));w=+r(+(+f[b+36>>2]));g=+r(+(+f[b+40>>2]));v=+f[b+48>>2];p=+f[b+52>>2];h=+f[b+56>>2];q=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);g=o*x+m*w+k*g+ +ha[c[(c[a>>2]|0)+48>>2]&15](a);f[d>>2]=v-(o*u+m*t+k*s+q);f[d+4>>2]=p-(o*n+m*l+k*j+i);f[d+8>>2]=h-g;f[d+12>>2]=0.0;f[e>>2]=v+(o*u+m*t+k*s+q);f[e+4>>2]=p+(o*n+m*l+k*j+i);f[e+8>>2]=h+g;f[e+12>>2]=0.0;return}function Fh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=c[b>>2]|0;if((e|0)==(c[a+80>>2]|0)){g=1.0;return +g}if(c[e+204>>2]&4|0){g=1.0;return +g}if((+f[a+28>>2]-+f[a+12>>2])*+f[b+8>>2]+(+f[a+32>>2]-+f[a+16>>2])*+f[b+12>>2]+(+f[a+36>>2]-+f[a+20>>2])*+f[b+16>>2]>=-+f[a+84>>2]){g=1.0;return +g}c[a+4>>2]=c[b+40>>2];c[a+76>>2]=e;if(d){c[a+44>>2]=c[b+8>>2];c[a+44+4>>2]=c[b+8+4>>2];c[a+44+8>>2]=c[b+8+8>>2];c[a+44+12>>2]=c[b+8+12>>2]}else{k=+f[b+8>>2];j=+f[b+12>>2];i=+f[b+16>>2];h=k*+f[e+20>>2]+j*+f[e+24>>2]+i*+f[e+28>>2];g=k*+f[e+36>>2]+j*+f[e+40>>2]+i*+f[e+44>>2];f[a+44>>2]=+f[e+4>>2]*k+ +f[e+8>>2]*j+ +f[e+12>>2]*i;f[a+48>>2]=h;f[a+52>>2]=g;f[a+56>>2]=0.0}c[a+60>>2]=c[b+24>>2];c[a+60+4>>2]=c[b+24+4>>2];c[a+60+8>>2]=c[b+24+8>>2];c[a+60+12>>2]=c[b+24+12>>2];k=+f[b+40>>2];return +k}function Gh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=ea;ea=ea+48|0;g=c[a+28>>2]|0;c[i>>2]=g;g=(c[a+20>>2]|0)-g|0;c[i+4>>2]=g;c[i+8>>2]=b;c[i+12>>2]=d;c[i+16>>2]=c[a+60>>2];c[i+16+4>>2]=i;c[i+16+8>>2]=2;b=eI(M(146,i+16|0)|0)|0;a:do if((g+d|0)!=(b|0)){e=i;f=2;g=g+d|0;while(1){if((b|0)<0)break;g=g-b|0;j=c[e+4>>2]|0;k=b>>>0>j>>>0;e=k?e+8|0:e;f=f+(k<<31>>31)|0;j=b-(k?j:0)|0;c[e>>2]=(c[e>>2]|0)+j;c[e+4>>2]=(c[e+4>>2]|0)-j;c[i+32>>2]=c[a+60>>2];c[i+32+4>>2]=e;c[i+32+8>>2]=f;b=eI(M(146,i+32|0)|0)|0;if((g|0)==(b|0)){h=3;break a}}c[a+16>>2]=0;c[a+28>>2]=0;c[a+20>>2]=0;c[a>>2]=c[a>>2]|32;if((f|0)==2)d=0;else d=d-(c[e+4>>2]|0)|0}else h=3;while(0);if((h|0)==3){k=c[a+44>>2]|0;c[a+16>>2]=k+(c[a+48>>2]|0);c[a+28>>2]=k;c[a+20>>2]=k}ea=i;return d|0}function Hh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;i=ea;ea=ea+80|0;if((e|0)<=0){ea=i;return}g=0;do{f[d+(g<<4)+12>>2]=-999999984306749440.0;g=g+1|0}while((g|0)!=(e|0));h=i+32+4|0;g=0;do{j=b+(g<<4)|0;c[i+32>>2]=9136;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;f[i+32+20>>2]=-999999984306749440.0;c[i+32+24>>2]=c[j>>2];c[i+32+24+4>>2]=c[j+4>>2];c[i+32+24+8>>2]=c[j+8>>2];c[i+32+24+12>>2]=c[j+12>>2];c[i+16>>2]=1566444395;c[i+16+4>>2]=1566444395;c[i+16+8>>2]=1566444395;f[i+16+12>>2]=0.0;j=c[a+92>>2]|0;k=c[(c[j>>2]|0)+8>>2]|0;f[i>>2]=-999999984306749440.0;f[i+4>>2]=-999999984306749440.0;f[i+8>>2]=-999999984306749440.0;f[i+12>>2]=0.0;Pa[k&127](j,i+32|0,i,i+16|0);j=d+(g<<4)|0;c[j>>2]=c[h>>2];c[j+4>>2]=c[h+4>>2];c[j+8>>2]=c[h+8>>2];c[j+12>>2]=c[h+12>>2];g=g+1|0}while((g|0)<(e|0));ea=i;return}function Ih(b){b=b|0;var d=0,e=0,g=0,h=0;c[b+32>>2]=262144;h=c[b+4>>2]|0;if((h|0)<2383){if((c[b+8>>2]|0)<2383){c[6747]=(c[6747]|0)+1;d=kb(9551)|0;if(!d)g=0;else{c[(d+4+15&-16)+-4>>2]=d;g=d+4+15&-16}d=c[b+4>>2]|0;if((d|0)>0){e=0;do{c[g+(e<<2)>>2]=c[(c[b+12>>2]|0)+(e<<2)>>2];e=e+1|0}while((e|0)!=(d|0))}d=c[b+12>>2]|0;if(d|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=g;c[b+8>>2]=2383;e=b+12|0}else e=b+12|0;d=h;do{c[(c[e>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=2383)}c[b+4>>2]=2383;e=0;do{h=(c[b+12>>2]|0)+(e<<2)|0;d=c[h>>2]|0;c[h>>2]=0;if(d|0)do{h=d;d=c[d+280>>2]|0;LJ(h)}while((d|0)!=0);e=e+1|0}while((e|0)!=2383);f[b+20>>2]=.25;c[b+24>>2]=0;c[b+28>>2]=0;c[b+36>>2]=1;c[b+40>>2]=1;return}function Jh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=c[b+96>>2]|0;if((f|0)==(c[b+100>>2]|0)?(i=(f|0)==0?1:f<<1,(f|0)<(i|0)):0){if(!i)g=0;else{c[6747]=(c[6747]|0)+1;f=kb((i<<4|3)+16|0)|0;if(!f)g=0;else{c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}f=c[b+96>>2]|0}if((f|0)>0){h=0;do{j=g+(h<<4)|0;k=(c[b+104>>2]|0)+(h<<4)|0;c[j>>2]=c[k>>2];c[j+4>>2]=c[k+4>>2];c[j+8>>2]=c[k+8>>2];c[j+12>>2]=c[k+12>>2];h=h+1|0}while((h|0)!=(f|0))}f=c[b+104>>2]|0;if(f|0){if(a[b+108>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[b+104>>2]=0}a[b+108>>0]=1;c[b+104>>2]=g;c[b+100>>2]=i;f=c[b+96>>2]|0}k=(c[b+104>>2]|0)+(f<<4)|0;c[k>>2]=c[d>>2];c[k+4>>2]=c[d+4>>2];c[k+8>>2]=c[d+8>>2];c[k+12>>2]=c[d+12>>2];c[b+96>>2]=(c[b+96>>2]|0)+1;if(!e)return;Bi(b);return}function Kh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=c[d+4>>2]|0;f=c[b+24>>2]|0;if((f|0)<(i|0)){if((c[b+28>>2]|0)<(i|0)){if(!i){g=f;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((i<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+24>>2]|0;h=e}if((g|0)>0){e=0;do{c[h+(e<<2)>>2]=c[(c[b+32>>2]|0)+(e<<2)>>2];e=e+1|0}while((e|0)!=(g|0))}e=c[b+32>>2]|0;if(e|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=h;c[b+28>>2]=i;e=b+32|0}else e=b+32|0;do{c[(c[e>>2]|0)+(f<<2)>>2]=0;f=f+1|0}while((f|0)!=(i|0))}else e=b+32|0;c[b+24>>2]=i;e=c[e>>2]|0;if((i|0)<=0)return;f=0;do{c[e+(f<<2)>>2]=c[(c[d+12>>2]|0)+(f<<2)>>2];f=f+1|0}while((f|0)!=(i|0));return}function Lh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=ea;ea=ea+96|0;b=c[b>>2]|0;if((b|0)==(c[a+4>>2]|0)){ea=d;return 1}e=c[a+12>>2]|0;if(!(ta[c[(c[e>>2]|0)+8>>2]&31](e,c[b+188>>2]|0)|0)){ea=d;return 1}e=c[a+4>>2]|0;f=c[e+192>>2]|0;c[d+64>>2]=0;c[d+64+4>>2]=f;c[d+64+8>>2]=e;c[d+64+12>>2]=e+4;c[d+64+16>>2]=-1;c[d+64+20>>2]=-1;e=c[b+192>>2]|0;c[d+40>>2]=0;c[d+40+4>>2]=e;c[d+40+8>>2]=b;c[d+40+12>>2]=b+4;c[d+40+16>>2]=-1;c[d+40+20>>2]=-1;b=c[(c[a+8>>2]|0)+24>>2]|0;b=wa[c[(c[b>>2]|0)+8>>2]&31](b,d+64|0,d+40|0,0)|0;if(b|0){f=c[a+12>>2]|0;c[d+4>>2]=0;c[d+8>>2]=d+64;c[d+12>>2]=d+40;c[d>>2]=7088;c[d+32>>2]=f;Ta[c[(c[b>>2]|0)+8>>2]&31](b,d+64|0,d+40|0,(c[a+8>>2]|0)+28|0,d);Ca[c[c[b>>2]>>2]&511](b);f=c[(c[a+8>>2]|0)+24>>2]|0;Ia[c[(c[f>>2]|0)+60>>2]&127](f,b)}ea=d;return 1}function Mh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,h=0,i=0,j=0,k=0;k=ea;ea=ea+80|0;h=c[c[a>>2]>>2]|0;i=c[c[a+4>>2]>>2]|0;if(!(va[c[(c[b>>2]|0)+24>>2]&63](b,h,i)|0)){ea=k;return}g=c[h+192>>2]|0;c[k+56>>2]=0;c[k+56+4>>2]=g;c[k+56+8>>2]=h;c[k+56+12>>2]=h+4;c[k+56+16>>2]=-1;c[k+56+20>>2]=-1;g=c[i+192>>2]|0;c[k+32>>2]=0;c[k+32+4>>2]=g;c[k+32+8>>2]=i;c[k+32+12>>2]=i+4;c[k+32+16>>2]=-1;c[k+32+20>>2]=-1;g=c[a+8>>2]|0;if(!g){g=wa[c[(c[b>>2]|0)+8>>2]&31](b,k+56|0,k+32|0,0)|0;c[a+8>>2]=g;if(g|0)j=4}else j=4;if((j|0)==4){c[k>>2]=6716;c[k+4>>2]=0;c[k+8>>2]=k+56;c[k+12>>2]=k+32;if((c[d+8>>2]|0)!=1){e=+na[c[(c[g>>2]|0)+12>>2]&15](g,h,i,d,k);if(+f[d+12>>2]>e)f[d+12>>2]=e}else Ta[c[(c[g>>2]|0)+8>>2]&31](g,k+56|0,k+32|0,d,k)}ea=k;return}function Nh(a,b,c,d,e,g,h,i,j,k,l){a=a|0;b=b|0;c=+c;d=+d;e=+e;g=+g;h=+h;i=+i;j=j|0;k=k|0;l=+l;var m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0;x=+f[a>>2]*g+ +f[a+16>>2]*h+ +f[a+32>>2]*i;v=+f[a+4>>2]*g+ +f[a+20>>2]*h+ +f[a+36>>2]*i;t=+f[a+8>>2]*g+ +f[a+24>>2]*h+ +f[a+40>>2]*i;s=+f[b>>2]*g+ +f[b+16>>2]*h+ +f[b+32>>2]*i;q=+f[b+4>>2]*g+ +f[b+20>>2]*h+ +f[b+36>>2]*i;o=+f[b+8>>2]*g+ +f[b+24>>2]*h+ +f[b+40>>2]*i;w=+f[j+80>>2];u=+f[j+84>>2];p=+f[j+88>>2];r=+f[k+80>>2];m=+f[k+84>>2];n=+f[k+88>>2];p=x*(x<0.0?-w:w)+v*(v<0.0?-u:u)+t*(t<0.0?-p:p);n=s*(s<0.0?-r:r)+q*(q<0.0?-m:m)+o*(o<0.0?-n:n);o=+f[j+96>>2];m=+f[k+96>>2];m=(p>o?p:o)+(n>m?n:m);return !((c*g+d*h+e*i+ml)|0}function Oh(b){b=b|0;var d=0,e=0,f=0,g=0;c[b>>2]=10036;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+24>>2]=0;a[b+28>>0]=0;a[b+48>>0]=1;c[b+44>>2]=0;c[b+36>>2]=0;c[b+40>>2]=0;a[b+68>>0]=1;c[b+64>>2]=0;c[b+56>>2]=0;c[b+60>>2]=0;c[b+72>>2]=0;c[6747]=(c[6747]|0)+1;d=kb(51)|0;if(!d)f=0;else{c[(d+4+15&-16)+-4>>2]=d;f=d+4+15&-16}d=c[b+8>>2]|0;if((d|0)>0){e=0;do{g=c[b+16>>2]|0;c[f+(e<<4)>>2]=c[g+(e<<4)>>2];c[f+(e<<4)+4>>2]=c[g+(e<<4)+4>>2];c[f+(e<<4)+8>>2]=c[g+(e<<4)+8>>2];c[f+(e<<4)+12>>2]=c[g+(e<<4)+12>>2];e=e+1|0}while((e|0)!=(d|0))}d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=f;c[b+12>>2]=2;Fe(b);return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=f;c[b+12>>2]=2;Fe(b);return}function Ph(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[b+488>>2]|0;a:do if((e|0)>0){g=c[b+496>>2]|0;f=0;while(1){if((c[g+(f<<2)>>2]|0)==(d|0))break;f=f+1|0;if((f|0)>=(e|0))break a}if((f|0)!=(e|0)){b=b+256|0;c[b>>2]=1;return}}while(0);if((e|0)==(c[b+492>>2]|0)?(h=(e|0)==0?1:e<<1,(e|0)<(h|0)):0){if(!h)f=0;else{c[6747]=(c[6747]|0)+1;e=kb((h<<2|3)+16|0)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[b+488>>2]|0}if((e|0)>0){g=0;do{c[f+(g<<2)>>2]=c[(c[b+496>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0))}g=c[b+496>>2]|0;if(g){if(a[b+500>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[b+488>>2]|0}c[b+496>>2]=0}a[b+500>>0]=1;c[b+496>>2]=f;c[b+492>>2]=h}c[(c[b+496>>2]|0)+(e<<2)>>2]=d;c[b+488>>2]=e+1;b=b+256|0;c[b>>2]=1;return} +function xc(b,d,e,g,h,i,j,k,l,m,n,o,p){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;o=o|0;p=p|0;var q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0;B=z(c[l+24>>2]|0,m)|0;y=a[d+44>>0]|0;C=c[d+56>>2]|0;if(!(y<<24>>24!=0|(C|0)!=0)){d=0;return d|0}D=c[(o|0?l+12|0:l+8|0)>>2]|0;m=c[(o|0?l+20|0:l+16|0)>>2]|0;c[D+(B<<2)>>2]=c[n>>2];c[D+(B+1<<2)>>2]=c[n+4>>2];c[D+(B+2<<2)>>2]=c[n+8>>2];f[m+(B<<2)>>2]=-+f[n>>2];f[m+(B+1<<2)>>2]=-+f[n+4>>2];f[m+(B+2<<2)>>2]=-+f[n+8>>2];do if(!o){q=+f[b+1176>>2];if(!(a[b+1301>>0]|0)){t=q-+f[e+48>>2];w=+f[b+1180>>2]-+f[e+52>>2];x=+f[b+1184>>2]-+f[e+56>>2];v=+f[n+8>>2];s=+f[n+4>>2];u=+f[n>>2];D=c[l+12>>2]|0;f[D+(B<<2)>>2]=w*v-x*s;f[D+(B+1<<2)>>2]=x*u-t*v;f[D+(B+2<<2)>>2]=t*s-w*u;u=+f[b+1176>>2]-+f[g+48>>2];w=+f[b+1180>>2]-+f[g+52>>2];s=+f[b+1184>>2]-+f[g+56>>2];t=+f[n+8>>2];v=+f[n+4>>2];x=+f[n>>2];D=c[l+20>>2]|0;f[D+(B<<2)>>2]=-(w*t-s*v);f[D+(B+1<<2)>>2]=-(s*x-u*t);f[D+(B+2<<2)>>2]=-(u*v-w*x);break}J=q-+f[g+48>>2];H=+f[b+1180>>2]-+f[g+52>>2];F=+f[b+1184>>2]-+f[g+56>>2];I=+f[n>>2];G=+f[n+4>>2];E=+f[n+8>>2];L=+f[b+1112>>2]-+f[e+48>>2];u=+f[b+1116>>2]-+f[e+52>>2];q=+f[b+1120>>2]-+f[e+56>>2];v=+f[d+52>>2]-+f[d+48>>2];K=I*(I*L+G*u+E*q)+I*v-I*(J*I+H*G+F*E);t=G*(I*L+G*u+E*q)+G*v-G*(J*I+H*G+F*E);v=E*(I*L+G*u+E*q)+E*v-E*(J*I+H*G+F*E);x=+f[b+1272>>2];w=+f[b+1276>>2];s=E*(u-G*(I*L+G*u+E*q)+x*t)-G*(q-E*(I*L+G*u+E*q)+x*v);r=I*(q-E*(I*L+G*u+E*q)+x*v)-E*(L-I*(I*L+G*u+E*q)+x*K);q=G*(L-I*(I*L+G*u+E*q)+x*K)-I*(u-G*(I*L+G*u+E*q)+x*t);u=E*(H-G*(J*I+H*G+F*E)-w*t)-G*(F-E*(J*I+H*G+F*E)-w*v);v=I*(F-E*(J*I+H*G+F*E)-w*v)-E*(J-I*(J*I+H*G+F*E)-w*K);t=G*(J-I*(J*I+H*G+F*E)-w*K)-I*(H-G*(J*I+H*G+F*E)-w*t);if(!((p|0)!=0|(a[b+1280>>0]|0)==0)){u=w*u;v=w*v;t=w*t;s=x*s;r=x*r;q=x*q}D=(c[l+12>>2]|0)+(B<<2)|0;f[D>>2]=s;f[D+4>>2]=r;f[D+8>>2]=q;D=c[l+20>>2]|0;f[D+(B<<2)>>2]=-u;f[D+(B+1<<2)>>2]=-v;f[D+(B+2<<2)>>2]=-t}while(0);if(C|0?+f[d>>2]==+f[d+4>>2]:0){m=(c[l+28>>2]|0)+(B<<2)|0;f[m>>2]=0.0;q=0.0}else A=11;do if((A|0)==11){m=(c[l+28>>2]|0)+(B<<2)|0;f[m>>2]=0.0;if(!(y<<24>>24)){if(C|0){q=0.0;break}else k=1;return k|0}c[(c[l+32>>2]|0)+(B<<2)>>2]=c[d+28>>2];if(C|0){q=+f[m>>2];break}v=+f[d+8>>2];t=o|0?v:-v;q=+f[d+52>>2];r=+f[d>>2];s=+f[d+4>>2];u=+f[l>>2]*+f[d+32>>2];do if(!(r>s))if(!(r==s)){if(t/u<0.0)if(q>=r?r-t/u>q:0){q=(r-q)/(t/u);break}else{q=q0.0)if(q<=s?s-t/us?0.0:1.0;break}else q=0.0}else q=0.0;else q=1.0;while(0);f[m>>2]=q*v+ +f[m>>2];f[(c[l+36>>2]|0)+(B<<2)>>2]=-+f[d+12>>2];c[(c[l+40>>2]|0)+(B<<2)>>2]=c[d+12>>2];D=1;return D|0}while(0);L=+f[l>>2]*+f[d+32>>2]*+f[d+48>>2];f[m>>2]=q+(o|0?-L:L);c[(c[l+32>>2]|0)+(B<<2)>>2]=c[d+36>>2];if(+f[d>>2]==+f[d+4>>2]){f[(c[l+36>>2]|0)+(B<<2)>>2]=-3402823466385288598117041.0e14;f[(c[l+40>>2]|0)+(B<<2)>>2]=3402823466385288598117041.0e14;D=1;return D|0}f[(c[l+36>>2]|0)+(B<<2)>>2]=(C|0)==1?0.0:-3402823466385288598117041.0e14;f[(c[l+40>>2]|0)+(B<<2)>>2]=(C|0)==1?3402823466385288598117041.0e14:0.0;v=+f[d+40>>2];if(!(v>0.0)){D=1;return D|0}if(o|0){L=+f[n>>2];u=+f[n+4>>2];q=+f[n+8>>2];r=q;s=u;t=L;u=+f[j>>2]*L+ +f[j+4>>2]*u;q=+f[j+8>>2]*q}else{L=+f[n>>2];u=+f[n+4>>2];q=+f[n+8>>2];r=q;s=u;t=L;u=+f[h>>2]*L+ +f[h+4>>2]*u;k=i;q=+f[h+8>>2]*q}q=u+q-(t*+f[k>>2]+s*+f[k+4>>2]+r*+f[k+8>>2]);if((C|0)==1){if(!(q<0.0)){D=1;return D|0}if(!(+f[m>>2]<-(v*q))){D=1;return D|0}f[m>>2]=-(v*q);D=1;return D|0}else{if(!(q>0.0)){D=1;return D|0}if(!(+f[m>>2]>-(v*q))){D=1;return D|0}f[m>>2]=-(v*q);D=1;return D|0}return 0}function yc(b,d,e,g,i,j){b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;var k=0.0,l=0,m=0.0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,v=0.0;t=ea;ea=ea+288|0;p=c[b+4>>2]|0;a[p+312>>0]=0;c[p>>2]=0;a[p+356>>0]=1;c[p+292>>2]=1566444395;c[p+296>>2]=1566444395;c[p+300>>2]=1566444395;f[p+304>>2]=0.0;c[p+336>>2]=0;c[p+336+4>>2]=0;c[p+336+8>>2]=0;c[p+336+12>>2]=0;a[p+336+16>>0]=0;a[p+332>>0]=a[p+332>>0]&-16;q=+f[e+48>>2]-+f[d+48>>2]-(+f[i+48>>2]-+f[g+48>>2]);s=+f[e+52>>2]-+f[d+52>>2]-(+f[i+52>>2]-+f[g+52>>2]);r=+f[e+56>>2]-+f[d+56>>2]-(+f[i+56>>2]-+f[g+56>>2]);c[t+216>>2]=10472;f[t+216+36>>2]=999999984306749440.0;a[t+216+40>>0]=0;p=c[b+8>>2]|0;o=c[b+12>>2]|0;n=c[b+4>>2]|0;c[t+136>>2]=10520;c[t+136+4>>2]=0;c[t+136+8>>2]=1065353216;c[t+136+12>>2]=0;f[t+136+16>>2]=0.0;c[t+136+20>>2]=0;c[t+136+24>>2]=n;c[t+136+28>>2]=p;c[t+136+32>>2]=o;c[t+136+36>>2]=c[p+4>>2];c[t+136+40>>2]=c[o+4>>2];f[t+136+44>>2]=+ha[c[(c[p>>2]|0)+48>>2]&15](p);f[t+136+48>>2]=+ha[c[(c[o>>2]|0)+48>>2]&15](o);a[t+136+52>>0]=0;c[t+136+60>>2]=-1;c[t+136+72>>2]=1;c[t+136+76>>2]=1;f[t+128>>2]=999999984306749440.0;c[t>>2]=c[d>>2];c[t+4>>2]=c[d+4>>2];c[t+8>>2]=c[d+8>>2];c[t+12>>2]=c[d+12>>2];c[t+16>>2]=c[d+16>>2];c[t+16+4>>2]=c[d+16+4>>2];c[t+16+8>>2]=c[d+16+8>>2];c[t+16+12>>2]=c[d+16+12>>2];c[t+32>>2]=c[d+32>>2];c[t+32+4>>2]=c[d+32+4>>2];c[t+32+8>>2]=c[d+32+8>>2];c[t+32+12>>2]=c[d+32+12>>2];c[t+48>>2]=c[d+48>>2];c[t+48+4>>2]=c[d+48+4>>2];c[t+48+8>>2]=c[d+48+8>>2];c[t+48+12>>2]=c[d+48+12>>2];c[t+64>>2]=c[g>>2];c[t+64+4>>2]=c[g+4>>2];c[t+64+8>>2]=c[g+8>>2];c[t+64+12>>2]=c[g+12>>2];c[t+80>>2]=c[g+16>>2];c[t+80+4>>2]=c[g+16+4>>2];c[t+80+8>>2]=c[g+16+8>>2];c[t+80+12>>2]=c[g+16+12>>2];c[t+96>>2]=c[g+32>>2];c[t+96+4>>2]=c[g+32+4>>2];c[t+96+8>>2]=c[g+32+8>>2];c[t+96+12>>2]=c[g+32+12>>2];c[t+112>>2]=c[g+48>>2];c[t+112+4>>2]=c[g+48+4>>2];c[t+112+8>>2]=c[g+48+8>>2];c[t+112+12>>2]=c[g+48+12>>2];Hb(t+136|0,t,t+216|0,0,0);o=(a[t+216+40>>0]|0)==0;p=t+216+20|0;c[t+264>>2]=c[p>>2];c[t+264+4>>2]=c[p+4>>2];c[t+264+8>>2]=c[p+8>>2];c[t+264+12>>2]=c[p+12>>2];if(o){j=0;ea=t;return j|0}m=+f[t+216+36>>2];k=+f[t+216+16>>2];b=c[t+216+12>>2]|0;l=c[t+216+8>>2]|0;n=c[t+216+4>>2]|0;do if(m>1.0000000474974513e-03){k=0.0;o=0;while(1){if(o>>>0>31){b=0;o=13;break}v=q*(c[h>>2]=n,+f[h>>2]);v=s*(c[h>>2]=l,+f[h>>2])+v;u=k;k=k-m/(r*(c[h>>2]=b,+f[h>>2])+v);if(!(!(k<=u)&(!(k<0.0)&!(k>1.0)))){b=0;o=13;break}Da[c[c[j>>2]>>2]&31](j,k);v=1.0-k;f[t+48>>2]=v*+f[d+48>>2]+k*+f[e+48>>2];f[t+52>>2]=v*+f[d+52>>2]+k*+f[e+52>>2];f[t+56>>2]=v*+f[d+56>>2]+k*+f[e+56>>2];f[t+112>>2]=v*+f[g+48>>2]+k*+f[i+48>>2];f[t+116>>2]=v*+f[g+52>>2]+k*+f[i+52>>2];f[t+120>>2]=v*+f[g+56>>2]+k*+f[i+56>>2];Hb(t+136|0,t,t+216|0,0,0);if(!(a[t+216+40>>0]|0)){b=0;o=13;break}m=+f[t+216+36>>2];if(m<0.0){o=8;break}c[t+264>>2]=c[p>>2];c[t+264+4>>2]=c[p+4>>2];c[t+264+8>>2]=c[p+8>>2];c[t+264+12>>2]=c[p+12>>2];b=c[t+216+12>>2]|0;l=c[t+216+8>>2]|0;n=c[t+216+4>>2]|0;if(!(m>1.0000000474974513e-03)){o=10;break}else o=o+1|0}if((o|0)==8){f[j+164>>2]=k;g=c[t+216+8>>2]|0;e=c[t+216+12>>2]|0;i=c[t+216+16>>2]|0;c[j+132>>2]=c[t+216+4>>2];c[j+136>>2]=g;c[j+140>>2]=e;c[j+144>>2]=i;c[j+148>>2]=c[p>>2];c[j+148+4>>2]=c[p+4>>2];c[j+148+8>>2]=c[p+8>>2];c[j+148+12>>2]=c[p+12>>2];j=1;ea=t;return j|0}else if((o|0)==10){m=k;k=+f[t+216+16>>2];break}else if((o|0)==13){ea=t;return b|0}}else m=0.0;while(0);v=q*(c[h>>2]=n,+f[h>>2]);v=s*(c[h>>2]=l,+f[h>>2])+v;if(r*(c[h>>2]=b,+f[h>>2])+v>=-+f[j+172>>2]){j=0;ea=t;return j|0}f[j+164>>2]=m;c[j+132>>2]=n;c[j+136>>2]=l;c[j+140>>2]=b;f[j+144>>2]=k;c[j+148>>2]=c[t+264>>2];c[j+148+4>>2]=c[t+264+4>>2];c[j+148+8>>2]=c[t+264+8>>2];c[j+148+12>>2]=c[t+264+12>>2];j=1;ea=t;return j|0}function zc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0;l=ea;ea=ea+240|0;c[a+4>>2]=(c[a+4>>2]|0)+1;j=c[b+36>>2]|0;i=c[d+36>>2]|0;J=c[a+8>>2]|0;g=c[a+12>>2]|0;K=c[(c[J+4>>2]|0)+24>>2]|0;d=c[K+(j*80|0)+64>>2]|0;b=(c[g+4>>2]|0)+24|0;e=c[(c[b>>2]|0)+(i*80|0)+64>>2]|0;J=c[J+12>>2]|0;m=+f[J>>2];H=+f[J+4>>2];I=+f[J+8>>2];p=+f[J+16>>2];r=+f[J+20>>2];t=+f[J+24>>2];q=+f[J+32>>2];u=+f[J+36>>2];C=+f[J+40>>2];v=+f[K+(j*80|0)>>2];w=+f[K+(j*80|0)+16>>2];x=+f[K+(j*80|0)+32>>2];y=+f[K+(j*80|0)+4>>2];z=+f[K+(j*80|0)+20>>2];A=+f[K+(j*80|0)+36>>2];s=+f[K+(j*80|0)+8>>2];B=+f[K+(j*80|0)+24>>2];D=+f[K+(j*80|0)+40>>2];n=+f[K+(j*80|0)+48>>2];o=+f[K+(j*80|0)+52>>2];G=+f[K+(j*80|0)+56>>2];E=+f[J+48>>2]+(m*n+H*o+I*G);F=+f[J+52>>2]+(p*n+r*o+t*G);G=+f[J+56>>2]+(q*n+u*o+C*G);f[l+176>>2]=m*v+H*w+I*x;f[l+176+4>>2]=m*y+H*z+I*A;f[l+176+8>>2]=m*s+H*B+I*D;f[l+176+12>>2]=0.0;f[l+176+16>>2]=p*v+r*w+t*x;f[l+176+20>>2]=p*y+r*z+t*A;f[l+176+24>>2]=p*s+r*B+t*D;f[l+176+28>>2]=0.0;f[l+176+32>>2]=q*v+u*w+C*x;f[l+176+36>>2]=q*y+u*z+C*A;f[l+176+40>>2]=q*s+u*B+C*D;f[l+176+44>>2]=0.0;f[l+176+48>>2]=E;f[l+176+52>>2]=F;f[l+176+56>>2]=G;f[l+176+60>>2]=0.0;g=c[g+12>>2]|0;G=+f[g>>2];F=+f[g+4>>2];E=+f[g+8>>2];D=+f[g+16>>2];C=+f[g+20>>2];B=+f[g+24>>2];u=+f[g+32>>2];s=+f[g+36>>2];q=+f[g+40>>2];b=c[b>>2]|0;A=+f[b+(i*80|0)>>2];z=+f[b+(i*80|0)+16>>2];y=+f[b+(i*80|0)+32>>2];x=+f[b+(i*80|0)+4>>2];w=+f[b+(i*80|0)+20>>2];v=+f[b+(i*80|0)+36>>2];t=+f[b+(i*80|0)+8>>2];r=+f[b+(i*80|0)+24>>2];p=+f[b+(i*80|0)+40>>2];I=+f[b+(i*80|0)+48>>2];H=+f[b+(i*80|0)+52>>2];m=+f[b+(i*80|0)+56>>2];o=+f[g+48>>2]+(G*I+F*H+E*m);n=+f[g+52>>2]+(D*I+C*H+B*m);m=+f[g+56>>2]+(u*I+s*H+q*m);f[l+112>>2]=G*A+F*z+E*y;f[l+112+4>>2]=G*x+F*w+E*v;f[l+112+8>>2]=G*t+F*r+E*p;f[l+112+12>>2]=0.0;f[l+112+16>>2]=D*A+C*z+B*y;f[l+112+20>>2]=D*x+C*w+B*v;f[l+112+24>>2]=D*t+C*r+B*p;f[l+112+28>>2]=0.0;f[l+112+32>>2]=u*A+s*z+q*y;f[l+112+36>>2]=u*x+s*w+q*v;f[l+112+40>>2]=u*t+s*r+q*p;f[l+112+44>>2]=0.0;f[l+112+48>>2]=o;f[l+112+52>>2]=n;f[l+112+56>>2]=m;f[l+112+60>>2]=0.0;Pa[c[(c[d>>2]|0)+8>>2]&127](d,l+176|0,l+96|0,l+80|0);Pa[c[(c[e>>2]|0)+8>>2]&127](e,l+112|0,l+64|0,l+48|0);if(!(+f[l+96>>2]>+f[l+48>>2])?!(+f[l+80>>2]<+f[l+64>>2]):0)b=1;else b=0;if(!(!(+f[l+96+8>>2]>+f[l+48+8>>2])?!(+f[l+80+8>>2]<+f[l+64+8>>2]):0))b=0;if(+f[l+96+4>>2]>+f[l+48+4>>2]){ea=l;return}if(+f[l+80+4>>2]<+f[l+64+4>>2]|b^1){ea=l;return}g=c[a+8>>2]|0;b=c[g+8>>2]|0;c[l+24>>2]=g;c[l+24+4>>2]=d;c[l+24+8>>2]=b;c[l+24+12>>2]=l+176;c[l+24+16>>2]=-1;c[l+24+20>>2]=j;b=c[a+12>>2]|0;g=c[b+8>>2]|0;c[l>>2]=b;c[l+4>>2]=e;c[l+8>>2]=g;c[l+12>>2]=l+112;c[l+16>>2]=-1;c[l+20>>2]=i;g=c[a+28>>2]|0;c[6735]=(c[6735]|0)+1;b=(i<<16|j)+~((i<<16|j)<<15)|0;b=((10?b>>10:b)^b)*9|0;b=(6?b>>6:b)^b;b=(c[g+12>>2]|0)+-1&((16?b+~(b<<11)>>16:b+~(b<<11)|0)^b+~(b<<11));a:do if((b|0)<(c[g+32>>2]|0)?(h=c[(c[g+40>>2]|0)+(b<<2)>>2]|0,(h|0)!=-1):0){e=c[g+16>>2]|0;b=h;while(1){d=e+(b*12|0)|0;if((c[d>>2]|0)==(j|0)?(c[e+(b*12|0)+4>>2]|0)==(i|0):0)break;b=c[(c[g+60>>2]|0)+(b<<2)>>2]|0;if((b|0)==-1){k=16;break a}}if(d)b=c[e+(b*12|0)+8>>2]|0;else k=16}else k=16;while(0);if((k|0)==16){b=c[a+16>>2]|0;b=wa[c[(c[b>>2]|0)+8>>2]&31](b,l+24|0,l,c[a+32>>2]|0)|0;K=c[a+28>>2]|0;c[(va[c[(c[K>>2]|0)+12>>2]&63](K,j,i)|0)+8>>2]=b}K=c[a+24>>2]|0;k=c[K+8>>2]|0;J=c[K+12>>2]|0;c[K+8>>2]=l+24;c[K+12>>2]=l;Ma[c[(c[K>>2]|0)+8>>2]&127](K,-1,j);K=c[a+24>>2]|0;Ma[c[(c[K>>2]|0)+12>>2]&127](K,-1,i);Ta[c[(c[b>>2]|0)+8>>2]&31](b,l+24|0,l,c[a+20>>2]|0,c[a+24>>2]|0);K=c[a+24>>2]|0;c[K+8>>2]=k;c[K+12>>2]=J;ea=l;return}function Ac(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0.0,q=0.0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0;z=ea;ea=ea+48|0;switch(c[b+4>>2]|0){case 8:{c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;ea=z;return}case 0:{w=+f[b+28>>2];x=+f[b+28+4>>2];x=+f[d+4>>2]>=0.0?x:-x;y=+f[b+28+8>>2];y=+f[d+8>>2]>=0.0?y:-y;f[a>>2]=+f[d>>2]>=0.0?w:-w;f[a+4>>2]=x;f[a+8>>2]=y;f[a+12>>2]=0.0;ea=z;return}case 1:{u=+f[d>>2];v=+f[d+4>>2];y=+f[d+8>>2];x=u*+f[b+56>>2]+v*+f[b+56+4>>2]+y*+f[b+56+8>>2];w=u*+f[b+56+16>>2]+v*+f[b+56+20>>2]+y*+f[b+56+24>>2];y=u*+f[b+56+32>>2]+v*+f[b+56+36>>2]+y*+f[b+56+40>>2];n=x>2]|0;r=c[b+56+(n<<4)+8>>2]|0;c[a>>2]=c[b+56+(n<<4)>>2];c[a+4>>2]=o;c[a+8>>2]=r;f[a+12>>2]=0.0;ea=z;return}case 13:{c[z+32>>2]=c[b+28>>2];c[z+32+4>>2]=c[b+28+4>>2];c[z+32+8>>2]=c[b+28+8>>2];c[z+32+12>>2]=c[b+28+12>>2];c[z+16>>2]=c[d>>2];g=c[d+4>>2]|0;c[z+16+4>>2]=g;r=c[d+8>>2]|0;c[z+16+8>>2]=r;f[z+16+12>>2]=0.0;d=c[b+52>>2]|0;e=(c[h>>2]=r,+f[h>>2]);switch(d|0){case 2:{e=(c[h>>2]=g,+f[h>>2]);g=0;b=2;n=1;break}case 1:{g=0;b=1;n=2;break}default:{g=1;b=0;n=2}}m=+f[z+32+(g<<2)>>2];i=+f[z+32+(d<<2)>>2];k=+f[z+16+(g<<2)>>2];l=+s(+(k*k+e*e));if(l!=0.0){j=e*(m/l);i=+f[z+16+(b<<2)>>2]<0.0?-i:i;e=k*(m/l)}else{j=0.0;i=+f[z+16+(b<<2)>>2]<0.0?-i:i;e=m}f[z+(g<<2)>>2]=e;f[z+(b<<2)>>2]=i;f[z+(n<<2)>>2]=j;c[a>>2]=c[z>>2];c[a+4>>2]=c[z+4>>2];c[a+8>>2]=c[z+8>>2];f[a+12>>2]=0.0;ea=z;return}case 10:{e=+f[d>>2];i=+f[d+4>>2];j=+f[d+8>>2];g=c[b+52>>2]|0;x=+f[b+28+(g<<2)>>2];k=+f[b+28+(((g+2|0)%3|0)<<2)>>2];if(e*e+i*i+j*j<9.999999747378752e-05){y=1.0;w=0.0;v=0.0}else{v=1.0/+s(+(e*e+i*i+j*j));y=e*v;w=i*v;v=j*v}c[z+32>>2]=0;c[z+32+4>>2]=0;c[z+32+8>>2]=0;c[z+32+12>>2]=0;f[z+32+(g<<2)>>2]=x;t=k*y;u=k*w;q=k*v;p=+f[b+44>>2];l=y*p;m=w*p;p=v*p;k=t+ +f[z+32>>2]-l;j=u+ +f[z+32+4>>2]-m;i=q+ +f[z+32+8>>2]-p;e=v*i+(y*k+w*j);if(e>-999999984306749440.0){o=(f[h>>2]=i,c[h>>2]|0);r=(f[h>>2]=j,c[h>>2]|0);i=e;n=(f[h>>2]=k,c[h>>2]|0)}else{i=-999999984306749440.0;n=0;o=0;r=0}c[z+32>>2]=0;c[z+32+4>>2]=0;c[z+32+8>>2]=0;c[z+32+12>>2]=0;f[z+32+(g<<2)>>2]=-x;t=t+ +f[z+32>>2]-l;x=u+ +f[z+32+4>>2]-m;e=q+ +f[z+32+8>>2]-p;b=y*t+w*x+v*e>i;g=(f[h>>2]=t,c[h>>2]|0);d=(f[h>>2]=x,c[h>>2]|0);o=b?(f[h>>2]=e,c[h>>2]|0):o;c[a>>2]=b?g:n;c[a+4>>2]=b?d:r;c[a+8>>2]=o;f[a+12>>2]=0.0;ea=z;return}case 5:{o=c[b+92>>2]|0;n=c[b+96>>2]|0;p=+f[b+12>>2];q=+f[b+16>>2];m=+f[b+20>>2];k=+f[d>>2]*p;l=+f[d+4>>2]*q;j=+f[d+8>>2]*m;if((n|0)>0){b=0;i=-3402823466385288598117041.0e14;g=-1;while(1){e=k*+f[o+(b<<4)>>2]+l*+f[o+(b<<4)+4>>2]+j*+f[o+(b<<4)+8>>2];d=e>i;g=d?b:g;b=b+1|0;if((b|0)==(n|0))break;else i=d?e:i}}else g=-1;x=q*+f[o+(g<<4)+4>>2];y=m*+f[o+(g<<4)+8>>2];f[a>>2]=p*+f[o+(g<<4)>>2];f[a+4>>2]=x;f[a+8>>2]=y;f[a+12>>2]=0.0;ea=z;return}case 4:{o=c[b+104>>2]|0;n=c[b+96>>2]|0;p=+f[b+12>>2];q=+f[b+16>>2];m=+f[b+20>>2];k=+f[d>>2]*p;l=+f[d+4>>2]*q;j=+f[d+8>>2]*m;if((n|0)>0){b=0;i=-3402823466385288598117041.0e14;g=-1;while(1){e=k*+f[o+(b<<4)>>2]+l*+f[o+(b<<4)+4>>2]+j*+f[o+(b<<4)+8>>2];d=e>i;g=d?b:g;b=b+1|0;if((b|0)==(n|0))break;else i=d?e:i}}else g=-1;x=q*+f[o+(g<<4)+4>>2];y=m*+f[o+(g<<4)+8>>2];f[a>>2]=p*+f[o+(g<<4)>>2];f[a+4>>2]=x;f[a+8>>2]=y;f[a+12>>2]=0.0;ea=z;return}default:{Ma[c[(c[b>>2]|0)+68>>2]&127](a,b,d);ea=z;return}}}function Bc(b,d,e,g,i,j){b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;var k=0,l=0,m=0.0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0;D=c[b+88>>2]|0;if((D|0)==(c[b+92>>2]|0)?(o=(D|0)==0?1:D<<1,(D|0)<(o|0)):0){if(!o){l=D;n=0}else{c[6747]=(c[6747]|0)+1;k=kb((o*152|3)+16|0)|0;if(!k)k=0;else{c[(k+4+15&-16)+-4>>2]=k;k=k+4+15&-16}l=c[b+88>>2]|0;n=k}if((l|0)>0){k=0;do{vh(n+(k*152|0)|0,(c[b+96>>2]|0)+(k*152|0)|0,152)|0;k=k+1|0}while((k|0)!=(l|0))}k=c[b+96>>2]|0;if(k|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=n;c[b+92>>2]=o;k=c[b+88>>2]|0}else k=D;c[b+88>>2]=k+1;C=c[b+96>>2]|0;c[C+(D*152|0)+140>>2]=i;c[C+(D*152|0)+16>>2]=0;c[C+(D*152|0)+16+4>>2]=0;c[C+(D*152|0)+16+8>>2]=0;c[C+(D*152|0)+16+12>>2]=0;f[C+(D*152|0)+48>>2]=-0.0;f[C+(D*152|0)+52>>2]=-0.0;f[C+(D*152|0)+56>>2]=-0.0;f[C+(D*152|0)+60>>2]=0.0;b=c[b+16>>2]|0;o=c[b+(e*244|0)+240>>2]|0;B=c[b+(g*244|0)+240>>2]|0;c[C+(D*152|0)+144>>2]=e;c[C+(D*152|0)+148>>2]=g;i=c[j+88>>2]|0;c[C+(D*152|0)+104>>2]=i;c[C+(D*152|0)+132>>2]=0;f[C+(D*152|0)+100>>2]=0.0;f[C+(D*152|0)+96>>2]=0.0;x=-+f[d>>2];y=-+f[d+4>>2];z=-+f[d+8>>2];f[C+(D*152|0)>>2]=x;f[C+(D*152|0)+4>>2]=y;f[C+(D*152|0)+8>>2]=z;f[C+(D*152|0)+12>>2]=0.0;A=(c[h>>2]=i,+f[h>>2]);if(o|0){k=(f[h>>2]=(+f[o+264>>2]*x+ +f[o+268>>2]*y+ +f[o+272>>2]*z)*+f[o+544>>2],c[h>>2]|0);l=(f[h>>2]=(+f[o+280>>2]*x+ +f[o+284>>2]*y+ +f[o+288>>2]*z)*+f[o+548>>2],c[h>>2]|0);n=(f[h>>2]=(+f[o+296>>2]*x+ +f[o+300>>2]*y+ +f[o+304>>2]*z)*+f[o+552>>2],c[h>>2]|0)}else{k=0;l=0;n=0}c[C+(D*152|0)+64>>2]=k;c[C+(D*152|0)+68>>2]=l;c[C+(D*152|0)+72>>2]=n;f[C+(D*152|0)+76>>2]=0.0;u=+f[d>>2];v=+f[d+4>>2];w=+f[d+8>>2];d=c[d+12>>2]|0;f[C+(D*152|0)+32>>2]=u;f[C+(D*152|0)+36>>2]=v;f[C+(D*152|0)+40>>2]=w;c[C+(D*152|0)+44>>2]=d;if(B|0){k=(f[h>>2]=(u*+f[B+264>>2]+v*+f[B+268>>2]+w*+f[B+272>>2])*+f[B+544>>2],c[h>>2]|0);l=(f[h>>2]=(u*+f[B+280>>2]+v*+f[B+284>>2]+w*+f[B+288>>2])*+f[B+548>>2],c[h>>2]|0);n=(f[h>>2]=(u*+f[B+296>>2]+v*+f[B+300>>2]+w*+f[B+304>>2])*+f[B+552>>2],c[h>>2]|0)}else{k=0;l=0;n=0}c[C+(D*152|0)+80>>2]=k;c[C+(D*152|0)+84>>2]=l;c[C+(D*152|0)+88>>2]=n;f[C+(D*152|0)+92>>2]=0.0;if(o|0){m=+f[o+264>>2]*x+ +f[o+268>>2]*y+ +f[o+272>>2]*z;p=+f[o+280>>2]*x+ +f[o+284>>2]*y+ +f[o+288>>2]*z;q=+f[o+296>>2]*x+ +f[o+300>>2]*y+ +f[o+304>>2]*z}else{m=0.0;p=0.0;q=0.0}if(B|0){r=+f[B+264>>2]*u+ +f[B+268>>2]*v+ +f[B+272>>2]*w;s=u*+f[B+280>>2]+v*+f[B+284>>2]+w*+f[B+288>>2];t=u*+f[B+296>>2]+v*+f[B+300>>2]+w*+f[B+304>>2]}else{r=0.0;s=0.0;t=0.0}s=1.0/(m*x+p*y+q*z+0.0+(r*u+s*v+t*w));f[C+(D*152|0)+108>>2]=s;if(o|0){p=+f[b+(e*244|0)+192>>2];q=+f[b+(e*244|0)+196>>2];r=+f[b+(e*244|0)+200>>2];m=(+f[b+(e*244|0)+176>>2]+ +f[b+(e*244|0)+208>>2])*0.0+(+f[b+(e*244|0)+180>>2]+ +f[b+(e*244|0)+212>>2])*0.0+(+f[b+(e*244|0)+184>>2]+ +f[b+(e*244|0)+216>>2])*0.0}else{p=0.0;q=0.0;r=0.0;m=0.0}m=m+(r*z+(q*y+p*x));if(!B){z=0.0;t=0.0;x=0.0;y=-0.0;z=u*z;v=v*t;z=v+z;x=w*x;z=x+z;z=y+z;z=m+z;z=0.0-z;z=s*z;g=C+(D*152|0)+112|0;f[g>>2]=z;g=C+(D*152|0)+116|0;f[g>>2]=0.0;A=-A;g=C+(D*152|0)+120|0;f[g>>2]=A;g=C+(D*152|0)+124|0;c[g>>2]=i;return}z=+f[b+(g*244|0)+192>>2];t=+f[b+(g*244|0)+196>>2];x=+f[b+(g*244|0)+200>>2];y=(+f[b+(g*244|0)+176>>2]+ +f[b+(g*244|0)+208>>2])*-0.0+(+f[b+(g*244|0)+180>>2]+ +f[b+(g*244|0)+212>>2])*-0.0+(+f[b+(g*244|0)+184>>2]+ +f[b+(g*244|0)+216>>2])*-0.0;z=u*z;v=v*t;z=v+z;x=w*x;z=x+z;z=y+z;z=m+z;z=0.0-z;z=s*z;g=C+(D*152|0)+112|0;f[g>>2]=z;g=C+(D*152|0)+116|0;f[g>>2]=0.0;A=-A;g=C+(D*152|0)+120|0;f[g>>2]=A;g=C+(D*152|0)+124|0;c[g>>2]=i;return}function Cc(b,d){b=b|0;d=d|0;var e=0,g=0.0,i=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0;m=ea;ea=ea+16|0;c[b+236>>2]=2;c[b+312>>2]=0;c[b+312+4>>2]=0;c[b+312+8>>2]=0;c[b+312+12>>2]=0;c[b+312+16>>2]=0;c[b+312+20>>2]=0;c[b+312+24>>2]=0;c[b+312+28>>2]=0;c[b+544>>2]=1065353216;c[b+548>>2]=1065353216;c[b+552>>2]=1065353216;f[b+556>>2]=0.0;c[b+348>>2]=1065353216;c[b+352>>2]=1065353216;c[b+356>>2]=1065353216;e=b+360|0;i=e+36|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(i|0));c[b+412>>2]=0;c[b+412+4>>2]=0;c[b+412+8>>2]=0;c[b+412+12>>2]=0;c[b+412+16>>2]=0;c[b+412+20>>2]=0;c[b+412+24>>2]=0;c[b+412+28>>2]=0;g=+f[d+92>>2];l=+f[d+96>>2];f[m+12>>2]=g;f[m+8>>2]=l;f[m+4>>2]=0.0;f[m>>2]=1.0;c[b+444>>2]=c[(g<0.0?m+4|0:g>1.0?m:m+12|0)>>2];f[m+4>>2]=0.0;f[m>>2]=1.0;c[b+448>>2]=c[(l<0.0?m+4|0:l>1.0?m:m+8|0)>>2];c[b+472>>2]=c[d+112>>2];c[b+476>>2]=c[d+116>>2];e=c[d+4>>2]|0;c[b+480>>2]=e;c[b+608>>2]=0;c[b+612>>2]=0;a[b+452>>0]=a[d+120>>0]|0;c[b+456>>2]=c[d+124>>2];c[b+460>>2]=c[d+128>>2];c[b+464>>2]=c[d+132>>2];c[b+468>>2]=c[d+136>>2];if(!e){c[b+4>>2]=c[d+8>>2];c[b+4+4>>2]=c[d+8+4>>2];c[b+4+8>>2]=c[d+8+8>>2];c[b+4+12>>2]=c[d+8+12>>2];c[b+20>>2]=c[d+24>>2];c[b+20+4>>2]=c[d+24+4>>2];c[b+20+8>>2]=c[d+24+8>>2];c[b+20+12>>2]=c[d+24+12>>2];c[b+36>>2]=c[d+40>>2];c[b+36+4>>2]=c[d+40+4>>2];c[b+36+8>>2]=c[d+40+8>>2];c[b+36+12>>2]=c[d+40+12>>2];c[b+52>>2]=c[d+56>>2];c[b+52+4>>2]=c[d+56+4>>2];c[b+52+8>>2]=c[d+56+8>>2];c[b+52+12>>2]=c[d+56+12>>2];e=b+20|0;i=b+36|0;j=b+52|0;k=b+4|0}else{Ia[c[(c[e>>2]|0)+8>>2]&127](e,b+4|0);e=b+20|0;i=b+36|0;j=b+52|0;k=b+4|0}c[b+68>>2]=c[k>>2];c[b+68+4>>2]=c[k+4>>2];c[b+68+8>>2]=c[k+8>>2];c[b+68+12>>2]=c[k+12>>2];c[b+84>>2]=c[e>>2];c[b+84+4>>2]=c[e+4>>2];c[b+84+8>>2]=c[e+8>>2];c[b+84+12>>2]=c[e+12>>2];c[b+100>>2]=c[i>>2];c[b+100+4>>2]=c[i+4>>2];c[b+100+8>>2]=c[i+8>>2];c[b+100+12>>2]=c[i+12>>2];c[b+116>>2]=c[j>>2];c[b+116+4>>2]=c[j+4>>2];c[b+116+8>>2]=c[j+8>>2];c[b+116+12>>2]=c[j+12>>2];c[b+132>>2]=0;c[b+132+4>>2]=0;c[b+132+8>>2]=0;c[b+132+12>>2]=0;c[b+132+16>>2]=0;c[b+132+20>>2]=0;c[b+132+24>>2]=0;c[b+132+28>>2]=0;c[b+224>>2]=c[d+100>>2];c[b+232>>2]=c[d+104>>2];c[b+228>>2]=c[d+108>>2];Ia[c[(c[b>>2]|0)+12>>2]&127](b,c[d+72>>2]|0);e=c[6408]|0;c[6408]=e+1;c[b+508>>2]=e;g=+f[d>>2];e=c[b+204>>2]|0;if(g==0.0){c[b+204>>2]=e|1;l=0.0}else{c[b+204>>2]=e&-2;l=1.0/g}f[b+344>>2]=l;o=g*+f[b+384>>2];n=g*+f[b+388>>2];f[b+364>>2]=g*+f[b+380>>2];f[b+368>>2]=o;f[b+372>>2]=n;f[b+376>>2]=0.0;g=+f[d+76>>2];i=g!=0.0?(f[h>>2]=1.0/g,c[h>>2]|0):0;g=+f[d+80>>2];e=g!=0.0?(f[h>>2]=1.0/g,c[h>>2]|0):0;g=+f[d+84>>2];d=g!=0.0?(f[h>>2]=1.0/g,c[h>>2]|0):0;c[b+396>>2]=i;c[b+400>>2]=e;c[b+404>>2]=d;f[b+408>>2]=0.0;q=l*+f[b+352>>2];x=l*+f[b+356>>2];f[b+560>>2]=l*+f[b+348>>2];f[b+564>>2]=q;f[b+568>>2]=x;f[b+572>>2]=0.0;x=+f[b+4>>2];q=(c[h>>2]=i,+f[h>>2]);w=+f[b+8>>2];g=(c[h>>2]=e,+f[h>>2]);v=+f[b+12>>2];n=(c[h>>2]=d,+f[h>>2]);u=+f[b+20>>2];t=+f[b+24>>2];s=+f[b+28>>2];r=+f[b+36>>2];p=+f[b+40>>2];o=+f[b+44>>2];f[b+264>>2]=x*(x*q)+w*(w*g)+v*(v*n);f[b+268>>2]=x*q*u+w*g*t+v*n*s;f[b+272>>2]=x*q*r+w*g*p+v*n*o;f[b+276>>2]=0.0;f[b+280>>2]=x*(u*q)+w*(t*g)+v*(s*n);f[b+284>>2]=u*(u*q)+t*(t*g)+s*(s*n);f[b+288>>2]=u*q*r+t*g*p+s*n*o;f[b+292>>2]=0.0;f[b+296>>2]=x*(r*q)+w*(p*g)+v*(o*n);f[b+300>>2]=u*(r*q)+t*(p*g)+s*(o*n);f[b+304>>2]=r*(r*q)+p*(p*g)+o*(o*n);f[b+308>>2]=0.0;c[b+504>>2]=0;c[b+512>>2]=0;c[b+512+4>>2]=0;c[b+512+8>>2]=0;c[b+512+12>>2]=0;c[b+512+16>>2]=0;c[b+512+20>>2]=0;c[b+512+24>>2]=0;c[b+512+28>>2]=0;n=l*+f[b+352>>2];o=l*+f[b+356>>2];f[b+560>>2]=l*+f[b+348>>2];f[b+564>>2]=n;f[b+568>>2]=o;e=b+572|0;i=e+36|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(i|0));ea=m;return}function Dc(a,b,d,e,g,h){a=a|0;b=+b;d=+d;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0;p=ea;ea=ea+704|0;l=MI(g)|0;m=+f[l>>2];n=+f[l+4>>2];o=+f[l+8>>2];f[p+680>>2]=0.0;f[p+676>>2]=0.0;f[p+672>>2]=0.0;qs(p+688|0,p+680|0,p+676|0,p+672|0);f[(NJ(p+688|0)|0)+(e<<2)>>2]=d*.5;f[p+648>>2]=0.0;f[p+644>>2]=0.0;f[p+640>>2]=0.0;qs(p+656|0,p+648|0,p+644|0,p+640|0);f[(NJ(p+656|0)|0)+(((e+1|0)%3|0)<<2)>>2]=b;f[p+616>>2]=0.0;f[p+612>>2]=0.0;f[p+608>>2]=0.0;qs(p+624|0,p+616|0,p+612|0,p+608|0);f[(NJ(p+624|0)|0)+(((e+2|0)%3|0)<<2)>>2]=b;f[p+584>>2]=0.0;f[p+580>>2]=0.0;f[p+576>>2]=0.0;qs(p+592|0,p+584|0,p+580|0,p+576|0);l=NJ(p+592|0)|0;f[l+(e<<2)>>2]=-(d*.5);j=p+688+4|0;k=p+688+8|0;i=0;while(1){if(i>>>0>=360)break;d=+(i|0)*.01745329238474369;f[l+(((e+1|0)%3|0)<<2)>>2]=+CJ(d)*b;f[l+(((e+2|0)%3|0)<<2)>>2]=+DJ(d)*b;q=c[(c[a>>2]|0)+8>>2]|0;r=NJ(g)|0;ql(p+544|0,r,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+560|0,m,n,o,+f[p+544>>2],+f[p+544+4>>2],+f[p+544+8>>2]);ql(p+512|0,r,+f[p+592>>2],+f[p+592+4>>2],+f[p+592+8>>2]);vp(p+528|0,m,n,o,+f[p+512>>2],+f[p+512+4>>2],+f[p+512+8>>2]);Pa[q&127](a,p+560|0,p+528|0,h);i=i+30|0}r=c[(c[a>>2]|0)+8>>2]|0;q=NJ(g)|0;ql(p+480|0,q,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+496|0,m,n,o,+f[p+480>>2],+f[p+480+4>>2],+f[p+480+8>>2]);Sq(p+416|0,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+432|0,+f[p+416>>2],+f[p+416+4>>2],+f[p+416+8>>2],+f[p+656>>2],+f[p+656+4>>2],+f[p+656+8>>2]);ql(p+448|0,q,+f[p+432>>2],+f[p+432+4>>2],+f[p+432+8>>2]);vp(p+464|0,m,n,o,+f[p+448>>2],+f[p+448+4>>2],+f[p+448+8>>2]);Pa[r&127](a,p+496|0,p+464|0,h);r=c[(c[a>>2]|0)+8>>2]|0;ql(p+384|0,q,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+400|0,m,n,o,+f[p+384>>2],+f[p+384+4>>2],+f[p+384+8>>2]);Sq(p+320|0,+f[p+688>>2],+f[j>>2],+f[k>>2]);xp(p+336|0,+f[p+320>>2],+f[p+320+4>>2],+f[p+320+8>>2],+f[p+656>>2],+f[p+656+4>>2],+f[p+656+8>>2]);ql(p+352|0,q,+f[p+336>>2],+f[p+336+4>>2],+f[p+336+8>>2]);vp(p+368|0,m,n,o,+f[p+352>>2],+f[p+352+4>>2],+f[p+352+8>>2]);Pa[r&127](a,p+400|0,p+368|0,h);r=c[(c[a>>2]|0)+8>>2]|0;ql(p+288|0,q,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+304|0,m,n,o,+f[p+288>>2],+f[p+288+4>>2],+f[p+288+8>>2]);Sq(p+224|0,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+240|0,+f[p+224>>2],+f[p+224+4>>2],+f[p+224+8>>2],+f[p+624>>2],+f[p+624+4>>2],+f[p+624+8>>2]);ql(p+256|0,q,+f[p+240>>2],+f[p+240+4>>2],+f[p+240+8>>2]);vp(p+272|0,m,n,o,+f[p+256>>2],+f[p+256+4>>2],+f[p+256+8>>2]);Pa[r&127](a,p+304|0,p+272|0,h);r=c[(c[a>>2]|0)+8>>2]|0;ql(p+192|0,q,+f[p+688>>2],+f[j>>2],+f[k>>2]);vp(p+208|0,m,n,o,+f[p+192>>2],+f[p+192+4>>2],+f[p+192+8>>2]);Sq(p+128|0,+f[p+688>>2],+f[j>>2],+f[k>>2]);xp(p+144|0,+f[p+128>>2],+f[p+128+4>>2],+f[p+128+8>>2],+f[p+624>>2],+f[p+624+4>>2],+f[p+624+8>>2]);ql(p+160|0,q,+f[p+144>>2],+f[p+144+4>>2],+f[p+144+8>>2]);vp(p+176|0,m,n,o,+f[p+160>>2],+f[p+160+4>>2],+f[p+160+8>>2]);Pa[r&127](a,p+208|0,p+176|0,h);f[p+104>>2]=0.0;f[p+100>>2]=0.0;f[p+96>>2]=0.0;qs(p+112|0,p+104|0,p+100|0,p+96|0);f[(NJ(p+112|0)|0)+(e<<2)>>2]=1.0;f[p+72>>2]=0.0;f[p+68>>2]=0.0;f[p+64>>2]=0.0;qs(p+80|0,p+72|0,p+68|0,p+64|0);f[(NJ(p+80|0)|0)+(((e+1|0)%3|0)<<2)>>2]=1.0;r=c[(c[a>>2]|0)+60>>2]|0;ql(p+32|0,q,+f[p+688>>2],+f[j>>2],+f[k>>2]);xp(p+48|0,m,n,o,+f[p+32>>2],+f[p+32+4>>2],+f[p+32+8>>2]);ql(p+16|0,q,+f[p+112>>2],+f[p+112+4>>2],+f[p+112+8>>2]);ql(p,q,+f[p+80>>2],+f[p+80+4>>2],+f[p+80+8>>2]);Sa[r&1](a,p+48|0,p+16|0,p,b,b,0.0,6.2831854820251465,h,0,10.0);ea=p;return}function Ec(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0,L=0,M=0,N=0;h=ea;ea=ea+240|0;if(!(c[b+16>>2]|0)){J=c[b+12>>2]|0;b=c[b+20>>2]|0;w=+f[d>>2];p=+f[d+4>>2];t=+f[d+8>>2];j=+f[d+16>>2];q=+f[d+20>>2];i=+f[d+24>>2];l=+f[d+32>>2];r=+f[d+36>>2];m=+f[d+40>>2];E=+f[d+48>>2];D=+f[d+52>>2];C=+f[d+56>>2];I=+f[e>>2];H=+f[e+16>>2];y=+f[e+32>>2];G=+f[e+4>>2];F=+f[e+20>>2];x=+f[e+36>>2];u=+f[e+8>>2];k=+f[e+24>>2];o=+f[e+40>>2];B=-+f[e+48>>2];A=-+f[e+52>>2];v=-+f[e+56>>2];d=c[(c[J>>2]|0)+64>>2]|0;z=-+f[b+48>>2];s=-+f[b+52>>2];n=-+f[b+56>>2];f[h+16>>2]=(w*I+j*H+l*y)*z+(w*G+j*F+l*x)*s+(w*u+j*k+l*o)*n;f[h+16+4>>2]=(p*I+q*H+r*y)*z+(p*G+q*F+r*x)*s+(p*u+q*k+r*o)*n;f[h+16+8>>2]=(t*I+i*H+m*y)*z+(t*G+i*F+m*x)*s+(t*u+i*k+m*o)*n;f[h+16+12>>2]=0.0;Ma[d&127](h+152|0,J,h+16|0);n=+f[h+152>>2];s=+f[h+152+4>>2];z=+f[h+152+8>>2];y=E*I+D*H+C*y+(I*B+H*A+y*v)+((w*I+j*H+l*y)*n+(p*I+q*H+r*y)*s+(t*I+i*H+m*y)*z);x=E*G+D*F+C*x+(G*B+F*A+x*v)+((w*G+j*F+l*x)*n+(p*G+q*F+r*x)*s+(t*G+i*F+m*x)*z);z=E*u+D*k+C*o+(u*B+k*A+o*v)+((w*u+j*k+l*o)*n+(p*u+q*k+r*o)*s+(t*u+i*k+m*o)*z);o=+f[b+48>>2];m=+f[b+52>>2];k=+f[b+56>>2];i=k*z+(o*y+m*x)-+f[b+64>>2];u=+f[e>>2];t=+f[e+4>>2];s=+f[e+8>>2];r=+f[e+16>>2];q=+f[e+20>>2];p=+f[e+24>>2];n=+f[e+32>>2];l=+f[e+36>>2];j=+f[e+40>>2];w=(y-o*i)*r+(x-m*i)*q+(z-k*i)*p+ +f[e+52>>2];v=(y-o*i)*n+(x-m*i)*l+(z-k*i)*j+ +f[e+56>>2];f[h+16>>2]=s*(z-k*i)+(u*(y-o*i)+t*(x-m*i))+ +f[e+48>>2];f[h+16+4>>2]=w;f[h+16+8>>2]=v;f[h+16+12>>2]=0.0;f[h>>2]=o*u+m*t+k*s;f[h+4>>2]=o*r+m*q+k*p;f[h+8>>2]=o*n+m*l+k*j;f[h+12>>2]=0.0;Na[c[(c[g>>2]|0)+16>>2]&15](g,h,h+16|0,i);ea=h;return}else{M=c[b+4>>2]|0;a[M+312>>0]=0;c[M>>2]=0;a[M+356>>0]=1;c[M+292>>2]=1566444395;c[M+296>>2]=1566444395;c[M+300>>2]=1566444395;f[M+304>>2]=0.0;c[M+336>>2]=0;c[M+336+4>>2]=0;c[M+336+8>>2]=0;c[M+336+12>>2]=0;a[M+336+16>>0]=0;a[M+332>>0]=a[M+332>>0]&-16;M=c[b+12>>2]|0;L=c[b+16>>2]|0;K=c[M+4>>2]|0;J=c[L+4>>2]|0;H=+ha[c[(c[M>>2]|0)+48>>2]&15](M);N=c[b+16>>2]|0;I=+ha[c[(c[N>>2]|0)+48>>2]&15](N);N=c[b+4>>2]|0;b=c[b+8>>2]|0;c[h+152>>2]=10520;c[h+152+4>>2]=0;c[h+152+8>>2]=1065353216;c[h+152+12>>2]=0;f[h+152+16>>2]=0.0;c[h+152+20>>2]=b;c[h+152+24>>2]=N;c[h+152+28>>2]=M;c[h+152+32>>2]=L;c[h+152+36>>2]=K;c[h+152+40>>2]=J;f[h+152+44>>2]=H;f[h+152+48>>2]=I;a[h+152+52>>0]=0;c[h+152+60>>2]=-1;c[h+152+72>>2]=1;c[h+152+76>>2]=1;f[h+16+128>>2]=999999984306749440.0;c[h+16>>2]=c[d>>2];c[h+16+4>>2]=c[d+4>>2];c[h+16+8>>2]=c[d+8>>2];c[h+16+12>>2]=c[d+12>>2];c[h+16+16>>2]=c[d+16>>2];c[h+16+16+4>>2]=c[d+16+4>>2];c[h+16+16+8>>2]=c[d+16+8>>2];c[h+16+16+12>>2]=c[d+16+12>>2];c[h+16+32>>2]=c[d+32>>2];c[h+16+32+4>>2]=c[d+32+4>>2];c[h+16+32+8>>2]=c[d+32+8>>2];c[h+16+32+12>>2]=c[d+32+12>>2];c[h+16+48>>2]=c[d+48>>2];c[h+16+48+4>>2]=c[d+48+4>>2];c[h+16+48+8>>2]=c[d+48+8>>2];c[h+16+48+12>>2]=c[d+48+12>>2];c[h+16+64>>2]=c[e>>2];c[h+16+64+4>>2]=c[e+4>>2];c[h+16+64+8>>2]=c[e+8>>2];c[h+16+64+12>>2]=c[e+12>>2];c[h+16+80>>2]=c[e+16>>2];c[h+16+80+4>>2]=c[e+16+4>>2];c[h+16+80+8>>2]=c[e+16+8>>2];c[h+16+80+12>>2]=c[e+16+12>>2];c[h+16+96>>2]=c[e+32>>2];c[h+16+96+4>>2]=c[e+32+4>>2];c[h+16+96+8>>2]=c[e+32+8>>2];c[h+16+96+12>>2]=c[e+32+12>>2];c[h+16+112>>2]=c[e+48>>2];c[h+16+112+4>>2]=c[e+48+4>>2];c[h+16+112+8>>2]=c[e+48+8>>2];c[h+16+112+12>>2]=c[e+48+12>>2];Hb(h+152|0,h+16|0,g,0,0);ea=h;return}}function Fc(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0;v=ea;ea=ea+544|0;j=h;k=j+36|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0));c[v+384>>2]=a;c[v+384+4>>2]=d;A=+f[e>>2];G=+f[b>>2];z=+f[e+16>>2];F=+f[b+16>>2];y=+f[e+32>>2];E=+f[b+32>>2];D=+f[b+4>>2];C=+f[b+20>>2];B=+f[b+36>>2];l=+f[b+8>>2];n=+f[b+24>>2];p=+f[b+40>>2];x=+f[e+4>>2];w=+f[e+20>>2];i=+f[e+36>>2];m=+f[e+8>>2];o=+f[e+24>>2];q=+f[e+40>>2];f[v+384+8>>2]=A*G+z*F+y*E;f[v+384+12>>2]=A*D+z*C+y*B;f[v+384+16>>2]=A*l+z*n+y*p;f[v+384+20>>2]=0.0;f[v+384+24>>2]=G*x+F*w+E*i;f[v+384+28>>2]=D*x+C*w+B*i;f[v+384+32>>2]=l*x+n*w+p*i;f[v+384+36>>2]=0.0;f[v+384+40>>2]=G*m+F*o+E*q;f[v+384+44>>2]=D*m+C*o+B*q;f[v+384+48>>2]=l*m+n*o+p*q;f[v+384+52>>2]=0.0;I=+f[e+48>>2]-+f[b+48>>2];H=+f[e+52>>2]-+f[b+52>>2];u=+f[e+56>>2]-+f[b+56>>2];r=I*+f[b>>2]+H*+f[b+16>>2]+u*+f[b+32>>2];t=I*+f[b+4>>2]+H*+f[b+20>>2]+u*+f[b+36>>2];u=I*+f[b+8>>2]+H*+f[b+24>>2]+u*+f[b+40>>2];f[v+384+56>>2]=A*G+z*F+y*E;f[v+384+60>>2]=G*x+F*w+E*i;f[v+384+64>>2]=G*m+F*o+E*q;f[v+384+68>>2]=0.0;f[v+384+72>>2]=A*D+z*C+y*B;f[v+384+76>>2]=D*x+C*w+B*i;f[v+384+80>>2]=D*m+C*o+B*q;f[v+384+84>>2]=0.0;f[v+384+88>>2]=A*l+z*n+y*p;f[v+384+92>>2]=l*x+n*w+p*i;f[v+384+96>>2]=l*m+n*o+p*q;f[v+384+100>>2]=0.0;f[v+384+104>>2]=r;f[v+384+108>>2]=t;f[v+384+112>>2]=u;f[v+384+116>>2]=0.0;c[v+384+120>>2]=82;c[v+384+124>>2]=0;c[v+364>>2]=0;c[v+128>>2]=0;c[v+128+4>>2]=0;c[v+128+8>>2]=0;c[v+128+12>>2]=0;c[v+376>>2]=2;c[v+368>>2]=0;f[v+144>>2]=0.0;g=Db(v,v+384|0,g)|0;if(g|0){c[h>>2]=(g|0)==1?1:2;b=0;ea=v;return b|0}g=c[v+372>>2]|0;if(!(c[g+32>>2]|0)){p=0.0;o=0.0;n=0.0;m=0.0;l=0.0;i=0.0}else{i=0.0;l=0.0;m=0.0;n=0.0;o=0.0;p=0.0;e=0;do{u=+f[g+16+(e<<2)>>2];a=c[v+384+120>>2]|0;k=c[v+384+124>>2]|0;d=(c[v+384>>2]|0)+(1?k>>1:k)|0;if(k&1)a=c[(c[d>>2]|0)+a>>2]|0;Ma[a&127](v+528|0,d,c[g+(e<<2)>>2]|0);n=n+u*+f[v+528>>2];o=o+u*+f[v+528+4>>2];p=p+u*+f[v+528+8>>2];g=c[(c[v+372>>2]|0)+(e<<2)>>2]|0;q=-+f[g>>2];r=-+f[g+4>>2];t=-+f[g+8>>2];g=c[v+384+120>>2]|0;k=c[v+384+124>>2]|0;a=(c[v+384+4>>2]|0)+(1?k>>1:k)|0;if(k&1)g=c[(c[a>>2]|0)+g>>2]|0;H=+f[v+384+24>>2]*q+ +f[v+384+28>>2]*r+ +f[v+384+32>>2]*t;G=+f[v+384+40>>2]*q+ +f[v+384+44>>2]*r+ +f[v+384+48>>2]*t;f[v+512>>2]=+f[v+384+8>>2]*q+ +f[v+384+12>>2]*r+ +f[v+384+16>>2]*t;f[v+512+4>>2]=H;f[v+512+8>>2]=G;f[v+512+12>>2]=0.0;Ma[g&127](v+528|0,a,v+512|0);G=+f[v+528>>2];H=+f[v+528+4>>2];I=+f[v+528+8>>2];i=i+u*(G*+f[v+384+56>>2]+H*+f[v+384+60>>2]+I*+f[v+384+64>>2]+ +f[v+384+104>>2]);l=l+u*(G*+f[v+384+72>>2]+H*+f[v+384+76>>2]+I*+f[v+384+80>>2]+ +f[v+384+108>>2]);m=m+u*(G*+f[v+384+88>>2]+H*+f[v+384+92>>2]+I*+f[v+384+96>>2]+ +f[v+384+112>>2]);e=e+1|0;g=c[v+372>>2]|0}while(e>>>0<(c[g+32>>2]|0)>>>0)}F=n*+f[b+16>>2]+o*+f[b+20>>2]+p*+f[b+24>>2]+ +f[b+52>>2];G=n*+f[b+32>>2]+o*+f[b+36>>2]+p*+f[b+40>>2]+ +f[b+56>>2];f[h+4>>2]=n*+f[b>>2]+o*+f[b+4>>2]+p*+f[b+8>>2]+ +f[b+48>>2];f[h+8>>2]=F;f[h+12>>2]=G;f[h+16>>2]=0.0;G=i*+f[b+16>>2]+l*+f[b+20>>2]+m*+f[b+24>>2]+ +f[b+52>>2];F=i*+f[b+32>>2]+l*+f[b+36>>2]+m*+f[b+40>>2]+ +f[b+56>>2];f[h+20>>2]=i*+f[b>>2]+l*+f[b+4>>2]+m*+f[b+8>>2]+ +f[b+48>>2];f[h+24>>2]=G;f[h+28>>2]=F;f[h+32>>2]=0.0;F=n-i;G=o-l;H=p-m;f[h+48>>2]=0.0;I=+s(+(F*F+G*G+H*H));f[h+52>>2]=I;I=I>9.999999747378752e-05?1.0/I:1.0;f[h+36>>2]=F*I;f[h+40>>2]=G*I;f[h+44>>2]=H*I;b=1;ea=v;return b|0}function Gc(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=+h;var i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,t=0.0;i=ea;ea=ea+464|0;Fi(18367);c[i+128>>2]=c[d>>2];c[i+128+4>>2]=c[d+4>>2];c[i+128+8>>2]=c[d+8>>2];c[i+128+12>>2]=c[d+12>>2];c[i+128+16>>2]=c[d+16>>2];c[i+128+16+4>>2]=c[d+16+4>>2];c[i+128+16+8>>2]=c[d+16+8>>2];c[i+128+16+12>>2]=c[d+16+12>>2];c[i+128+32>>2]=c[d+32>>2];c[i+128+32+4>>2]=c[d+32+4>>2];c[i+128+32+8>>2]=c[d+32+8>>2];c[i+128+32+12>>2]=c[d+32+12>>2];k=i+128+48|0;c[k>>2]=c[d+48>>2];c[k+4>>2]=c[d+48+4>>2];c[k+8>>2]=c[d+48+8>>2];c[k+12>>2]=c[d+48+12>>2];c[i+64>>2]=c[e>>2];c[i+64+4>>2]=c[e+4>>2];c[i+64+8>>2]=c[e+8>>2];c[i+64+12>>2]=c[e+12>>2];c[i+64+16>>2]=c[e+16>>2];c[i+64+16+4>>2]=c[e+16+4>>2];c[i+64+16+8>>2]=c[e+16+8>>2];c[i+64+16+12>>2]=c[e+16+12>>2];c[i+64+32>>2]=c[e+32>>2];c[i+64+32+4>>2]=c[e+32+4>>2];c[i+64+32+8>>2]=c[e+32+8>>2];c[i+64+32+12>>2]=c[e+32+12>>2];j=i+64+48|0;c[j>>2]=c[e+48>>2];c[j+4>>2]=c[e+48+4>>2];c[j+8>>2]=c[e+48+8>>2];c[j+12>>2]=c[e+48+12>>2];Ee(i+128|0,i+64|0,i+256|0,i+192|0);t=+f[i+192>>2];l=t*+f[i+256+4>>2];q=t*+f[i+256+8>>2];f[i+16>>2]=+f[i+256>>2]*t;f[i+16+4>>2]=l;f[i+16+8>>2]=q;f[i+16+12>>2]=0.0;c[i+256>>2]=0;c[i+256+4>>2]=0;c[i+256+8>>2]=0;c[i+256+12>>2]=0;c[i+192+48>>2]=0;c[i+192+48+4>>2]=0;c[i+192+48+8>>2]=0;c[i+192+48+12>>2]=0;Gg(i+128|0,i);q=+f[i>>2];l=+f[i+4>>2];t=+f[i+8>>2];p=+f[i+12>>2];n=q*(2.0/(q*q+l*l+t*t+p*p));m=l*(2.0/(q*q+l*l+t*t+p*p));o=t*(2.0/(q*q+l*l+t*t+p*p));f[i+192>>2]=1.0-(l*m+t*o);f[i+192+4>>2]=q*m-p*o;f[i+192+8>>2]=q*o+p*m;f[i+192+12>>2]=0.0;f[i+192+16>>2]=q*m+p*o;f[i+192+20>>2]=1.0-(q*n+t*o);f[i+192+24>>2]=l*o-p*n;f[i+192+28>>2]=0.0;f[i+192+32>>2]=q*o-p*m;f[i+192+36>>2]=l*o+p*n;f[i+192+40>>2]=1.0-(q*n+l*m);f[i+192+44>>2]=0.0;sg(b,i+192|0,i+256|0,i+16|0,i+48|0,i+32|0);c[i+256>>2]=7048;c[i+256+36>>2]=c[d>>2];c[i+256+36+4>>2]=c[d+4>>2];c[i+256+36+8>>2]=c[d+8>>2];c[i+256+36+12>>2]=c[d+12>>2];c[i+256+52>>2]=c[d+16>>2];c[i+256+52+4>>2]=c[d+16+4>>2];c[i+256+52+8>>2]=c[d+16+8>>2];c[i+256+52+12>>2]=c[d+16+12>>2];c[i+256+68>>2]=c[d+32>>2];c[i+256+68+4>>2]=c[d+32+4>>2];c[i+256+68+8>>2]=c[d+32+8>>2];c[i+256+68+12>>2]=c[d+32+12>>2];r=i+256+84|0;c[r>>2]=c[d+48>>2];c[r+4>>2]=c[d+48+4>>2];c[r+8>>2]=c[d+48+8>>2];c[r+12>>2]=c[d+48+12>>2];c[i+256+100>>2]=c[e>>2];c[i+256+100+4>>2]=c[e+4>>2];c[i+256+100+8>>2]=c[e+8>>2];c[i+256+100+12>>2]=c[e+12>>2];c[i+256+116>>2]=c[e+16>>2];c[i+256+116+4>>2]=c[e+16+4>>2];c[i+256+116+8>>2]=c[e+16+8>>2];c[i+256+116+12>>2]=c[e+16+12>>2];c[i+256+132>>2]=c[e+32>>2];c[i+256+132+4>>2]=c[e+32+4>>2];c[i+256+132+8>>2]=c[e+32+8>>2];c[i+256+132+12>>2]=c[e+32+12>>2];d=i+256+148|0;c[d>>2]=c[e+48>>2];c[d+4>>2]=c[e+48+4>>2];c[d+8>>2]=c[e+48+8>>2];c[d+12>>2]=c[e+48+12>>2];c[i+256+180>>2]=a;c[i+256+184>>2]=g;f[i+256+188>>2]=h;c[i+256+192>>2]=b;m=+f[d>>2]-+f[r>>2];l=+f[i+256+152>>2]-+f[i+256+88>>2];n=+f[i+256+156>>2]-+f[i+256+92>>2];h=1.0/+s(+(m*m+l*l+n*n));q=m*h==0.0?999999984306749440.0:1.0/(m*h);f[i+256+4>>2]=q;p=l*h==0.0?999999984306749440.0:1.0/(l*h);f[i+256+8>>2]=p;o=n*h==0.0?999999984306749440.0:1.0/(n*h);f[i+256+12>>2]=o;c[i+256+20>>2]=q<0.0&1;c[i+256+24>>2]=p<0.0&1;c[i+256+28>>2]=o<0.0&1;f[i+256+32>>2]=n*(n*h)+(m*(m*h)+l*(l*h));b=c[a+68>>2]|0;Va[c[(c[b>>2]|0)+24>>2]&7](b,k,j,i+256|0,i+48|0,i+32|0);b=c[2685]|0;a=(c[b+16>>2]|0)+-1|0;c[b+16>>2]=a;if(a|0){ea=i;return}do if(c[b+4>>2]|0){Y(i+256|0,0)|0;r=c[6746]|0;f[b+8>>2]=+f[b+8>>2]+ +(((c[i+256+4>>2]|0)-(c[r+4>>2]|0)+(((c[i+256>>2]|0)-(c[r>>2]|0)|0)*1e6|0)-(c[b+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[b+16>>2]|0)){b=c[2685]|0;break}else{ea=i;return}}while(0);c[2685]=c[b+20>>2];ea=i;return}function Hc(d,e,f){d=d|0;e=e|0;f=f|0;var 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;s=ea;ea=ea+32|0;h=ra[c[(c[d>>2]|0)+28>>2]&127](d)|0;c[e+20>>2]=h;c[e>>2]=0;if(!h){r=d+4|0;f=e+4|0;r=c[r>>2]|0;c[f>>2]=r;f=d+8|0;f=c[f>>2]|0;r=e+8|0;c[r>>2]=f;r=d+12|0;r=c[r>>2]|0;f=e+12|0;c[f>>2]=r;f=d+16|0;f=c[f>>2]|0;d=e+16|0;c[d>>2]=f;ea=s;return 22103}r=va[c[(c[f>>2]|0)+16>>2]&63](f,32,h)|0;h=c[r+8>>2]|0;c[e>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,h)|0;q=ra[c[(c[d>>2]|0)+28>>2]&127](d)|0;a:do if((q|0)>0){p=0;while(1){Za[c[(c[d>>2]|0)+16>>2]&3](d,s+28|0,s+4|0,s+16|0,s+8|0,s+24|0,s+20|0,s,s+12|0,p);i=c[s>>2]|0;c[h+24>>2]=i;c[h+28>>2]=c[s+4>>2];j=h+12|0;l=h+16|0;o=h+4|0;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;switch(c[s+12>>2]|0){case 2:{if(i|0){k=va[c[(c[f>>2]|0)+16>>2]&63](f,4,i*3|0)|0;i=c[k+8>>2]|0;c[h+8>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,i)|0;if((c[s>>2]|0)>0){j=c[s+24>>2]|0;l=0;do{m=j+(z(c[s+20>>2]|0,l)|0)|0;n=l*3|0;c[i+(n<<2)>>2]=c[m>>2];c[i+(n+1<<2)>>2]=c[m+4>>2];c[i+(n+2<<2)>>2]=c[m+8>>2];l=l+1|0}while((l|0)<(c[s>>2]|0))}Ta[c[(c[f>>2]|0)+20>>2]&31](f,k,21984,1497453121,c[k+8>>2]|0)}break}case 3:{if(i|0){n=va[c[(c[f>>2]|0)+16>>2]&63](f,8,i)|0;m=c[n+8>>2]|0;c[j>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,m)|0;i=c[s>>2]|0;if((i|0)>0){j=c[s+24>>2]|0;k=c[s+20>>2]|0;l=0;do{t=j+(z(k,l)|0)|0;b[m+(l<<3)>>1]=b[t>>1]|0;b[m+(l<<3)+2>>1]=b[t+2>>1]|0;b[m+(l<<3)+4>>1]=b[t+4>>1]|0;l=l+1|0}while((l|0)!=(i|0))}Ta[c[(c[f>>2]|0)+20>>2]&31](f,n,21999,1497453121,c[n+8>>2]|0)}break}case 5:{if(i|0){k=va[c[(c[f>>2]|0)+16>>2]&63](f,4,i)|0;j=c[k+8>>2]|0;c[l>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,j)|0;if((c[s>>2]|0)>0){i=0;do{t=(c[s+24>>2]|0)+(z(c[s+20>>2]|0,i)|0)|0;a[j+(i<<2)>>0]=a[t>>0]|0;a[j+(i<<2)+1>>0]=a[t+1>>0]|0;a[j+(i<<2)+2>>0]=a[t+2>>0]|0;i=i+1|0}while((i|0)<(c[s>>2]|0))}Ta[c[(c[f>>2]|0)+20>>2]&31](f,k,22026,1497453121,c[k+8>>2]|0)}break}default:{}}switch(c[s+16>>2]|0){case 0:{i=c[s+4>>2]|0;if(i|0){m=va[c[(c[f>>2]|0)+16>>2]&63](f,16,i)|0;i=c[m+8>>2]|0;c[h>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,i)|0;j=c[s+4>>2]|0;if((j|0)>0){k=c[s+28>>2]|0;l=c[s+8>>2]|0;n=0;do{t=k+(z(l,n)|0)|0;c[i+(n<<4)>>2]=c[t>>2];c[i+(n<<4)+4>>2]=c[t+4>>2];c[i+(n<<4)+8>>2]=c[t+8>>2];n=n+1|0}while((n|0)!=(j|0))}Ta[c[(c[f>>2]|0)+20>>2]&31](f,m,22049,1497453121,c[m+8>>2]|0)}break}case 1:{i=c[s+4>>2]|0;if(i|0){n=va[c[(c[f>>2]|0)+16>>2]&63](f,32,i)|0;m=c[n+8>>2]|0;c[o>>2]=ta[c[(c[f>>2]|0)+28>>2]&31](f,m)|0;i=c[s+4>>2]|0;if((i|0)>0){j=c[s+28>>2]|0;k=c[s+8>>2]|0;l=0;do{t=j+(z(k,l)|0)|0;g[m+(l<<5)>>3]=+g[t>>3];g[m+(l<<5)+8>>3]=+g[t+8>>3];g[m+(l<<5)+16>>3]=+g[t+16>>3];l=l+1|0}while((l|0)!=(i|0))}Ta[c[(c[f>>2]|0)+20>>2]&31](f,n,22068,1497453121,c[n+8>>2]|0)}break}default:{}}Ia[c[(c[d>>2]|0)+24>>2]&127](d,p);p=p+1|0;if((p|0)==(q|0)){h=f;break a}else h=h+32|0}}else h=f;while(0);Ta[c[(c[h>>2]|0)+20>>2]&31](f,r,22088,1497453121,c[r+8>>2]|0);f=d+4|0;t=e+4|0;f=c[f>>2]|0;c[t>>2]=f;t=d+8|0;t=c[t>>2]|0;f=e+8|0;c[f>>2]=t;f=d+12|0;f=c[f>>2]|0;t=e+12|0;c[t>>2]=f;d=d+16|0;d=c[d>>2]|0;t=e+16|0;c[t>>2]=d;ea=s;return 22103}function Ic(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0;i=c[a+192>>2]|0;n=+ha[c[(c[i>>2]|0)+48>>2]&15](i);i=c[a+712>>2]|0;if((i|0)>0){o=0;do{j=c[a+720>>2]|0;g=j+(o*104|0)+8|0;q=+f[g>>2];h=j+(o*104|0)+12|0;p=+f[h>>2];d=j+(o*104|0)+16|0;l=+f[d>>2];k=q*+f[b>>2]+p*+f[b+4>>2]+l*+f[b+8>>2]+ +f[b+48>>2];m=q*+f[b+16>>2]+p*+f[b+20>>2]+l*+f[b+24>>2]+ +f[b+52>>2];l=q*+f[b+32>>2]+p*+f[b+36>>2]+l*+f[b+40>>2]+ +f[b+56>>2];f[g>>2]=k;f[h>>2]=m;f[d>>2]=l;f[j+(o*104|0)+20>>2]=0.0;d=j+(o*104|0)+24|0;p=+f[d>>2];h=j+(o*104|0)+28|0;q=+f[h>>2];g=j+(o*104|0)+32|0;r=+f[g>>2];t=p*+f[b+16>>2]+q*+f[b+20>>2]+r*+f[b+24>>2]+ +f[b+52>>2];u=p*+f[b+32>>2]+q*+f[b+36>>2]+r*+f[b+40>>2]+ +f[b+56>>2];f[d>>2]=p*+f[b>>2]+q*+f[b+4>>2]+r*+f[b+8>>2]+ +f[b+48>>2];f[h>>2]=t;f[g>>2]=u;f[j+(o*104|0)+36>>2]=0.0;g=j+(o*104|0)+72|0;u=+f[g>>2];h=j+(o*104|0)+76|0;t=+f[h>>2];d=j+(o*104|0)+80|0;r=+f[d>>2];q=u*+f[b+16>>2]+t*+f[b+20>>2]+r*+f[b+24>>2];p=u*+f[b+32>>2]+t*+f[b+36>>2]+r*+f[b+40>>2];f[g>>2]=+f[b>>2]*u+ +f[b+4>>2]*t+ +f[b+8>>2]*r;f[h>>2]=q;f[d>>2]=p;f[j+(o*104|0)+84>>2]=0.0;j=c[j+(o*104|0)+96>>2]|0;d=jg(a+928|0,j)|0;a:do if(d){g=c[a+936>>2]|0;if((g|0)<=-1){d=c[a+928>>2]|0;break}if(g){h=0;e=d;while(1){d=c[e+32>>2]|0;h=h+1|0;if(!d){d=e;break a}if((h|0)>=(g|0))break;else e=d}}}else d=0;while(0);f[j>>2]=k-n;f[j+4>>2]=m-n;f[j+8>>2]=l-n;f[j+12>>2]=0.0;f[j+16>>2]=n+k;f[j+20>>2]=n+m;f[j+24>>2]=n+l;f[j+28>>2]=0.0;je(a+928|0,d,j);o=o+1|0}while((o|0)!=(i|0))}Ef(a);d=c[a+928>>2]|0;if(d){o=c[a+192>>2]|0;r=+ha[c[(c[o>>2]|0)+48>>2]&15](o);u=+f[d+4>>2]-r;t=+f[d+8>>2]-r;f[a+892>>2]=+f[d>>2]-r;f[a+896>>2]=u;f[a+900>>2]=t;f[a+904>>2]=0.0;t=r+ +f[d+20>>2];u=r+ +f[d+24>>2];f[a+908>>2]=r+ +f[d+16>>2];f[a+912>>2]=t;f[a+916>>2]=u;f[a+920>>2]=0.0;d=c[a+188>>2]|0;if(d|0){o=c[a+684>>2]|0;j=c[o+32>>2]|0;Ta[c[(c[j>>2]|0)+16>>2]&31](j,d,a+892|0,a+908|0,c[o+36>>2]|0)}}else{c[a+892>>2]=0;c[a+892+4>>2]=0;c[a+892+8>>2]=0;c[a+892+12>>2]=0;c[a+892+16>>2]=0;c[a+892+20>>2]=0;c[a+892+24>>2]=0;c[a+892+28>>2]=0}e=c[a+732>>2]|0;if((e|0)<=0){Ze(a);o=a+1148|0;c[o>>2]=c[b>>2];c[o+4>>2]=c[b+4>>2];c[o+8>>2]=c[b+8>>2];c[o+12>>2]=c[b+12>>2];o=b+16|0;j=a+1164|0;c[j>>2]=c[o>>2];c[j+4>>2]=c[o+4>>2];c[j+8>>2]=c[o+8>>2];c[j+12>>2]=c[o+12>>2];j=b+32|0;o=a+1180|0;c[o>>2]=c[j>>2];c[o+4>>2]=c[j+4>>2];c[o+8>>2]=c[j+8>>2];c[o+12>>2]=c[j+12>>2];o=b+48|0;b=a+1196|0;c[b>>2]=c[o>>2];c[b+4>>2]=c[o+4>>2];c[b+8>>2]=c[o+8>>2];c[b+12>>2]=c[o+12>>2];return}g=c[a+740>>2]|0;d=0;do{j=c[g+(d*52|0)+8>>2]|0;o=c[g+(d*52|0)+12>>2]|0;r=+f[j+8>>2]-+f[o+8>>2];t=+f[j+12>>2]-+f[o+12>>2];u=+f[j+16>>2]-+f[o+16>>2];u=+s(+(r*r+t*t+u*u));f[g+(d*52|0)+16>>2]=u;f[g+(d*52|0)+28>>2]=u*u;d=d+1|0}while((d|0)!=(e|0));d=0;do{f[g+(d*52|0)+24>>2]=(+f[(c[g+(d*52|0)+8>>2]|0)+88>>2]+ +f[(c[g+(d*52|0)+12>>2]|0)+88>>2])/+f[(c[g+(d*52|0)+4>>2]|0)+4>>2];d=d+1|0}while((d|0)!=(e|0));Ze(a);o=a+1148|0;c[o>>2]=c[b>>2];c[o+4>>2]=c[b+4>>2];c[o+8>>2]=c[b+8>>2];c[o+12>>2]=c[b+12>>2];o=b+16|0;j=a+1164|0;c[j>>2]=c[o>>2];c[j+4>>2]=c[o+4>>2];c[j+8>>2]=c[o+8>>2];c[j+12>>2]=c[o+12>>2];j=b+32|0;o=a+1180|0;c[o>>2]=c[j>>2];c[o+4>>2]=c[j+4>>2];c[o+8>>2]=c[j+8>>2];c[o+12>>2]=c[j+12>>2];o=b+48|0;b=a+1196|0;c[b>>2]=c[o>>2];c[b+4>>2]=c[o+4>>2];c[b+8>>2]=c[o+8>>2];c[b+12>>2]=c[o+12>>2];return}function Jc(b,d,e,g,h,i){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0.0,A=0.0,B=0.0,C=0;x=ea;ea=ea+64|0;if((h|0)>0){j=0;b=0;do{w=c[g+(j<<2)>>2]|0;b=(w|0)>(b|0)?w:b;j=j+1|0}while((j|0)<(h*3|0))}else b=0;t=b+1|0;k=z(t,t)|0;if(!k)j=0;else{c[6747]=(c[6747]|0)+1;j=kb(k+19|0)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}hk(j|0,0,k|0)|0}if((b|0)>-1){c[6747]=(c[6747]|0)+1;b=kb((t<<4|3)+16|0)|0;if(!b)l=0;else{c[(b+4+15&-16)+-4>>2]=b;l=b+4+15&-16}b=0;do{w=l+(b<<4)|0;c[w>>2]=c[x>>2];c[w+4>>2]=c[x+4>>2];c[w+8>>2]=c[x+8>>2];c[w+12>>2]=c[x+12>>2];b=b+1|0}while((b|0)!=(t|0));b=0;k=0;while(1){v=c[e+(b+1<<2)>>2]|0;w=c[e+(b+2<<2)>>2]|0;c[l+(k<<4)>>2]=c[e+(b<<2)>>2];c[l+(k<<4)+4>>2]=v;c[l+(k<<4)+8>>2]=w;f[l+(k<<4)+12>>2]=0.0;b=b+3|0;if((b|0)>=(t*3|0)){w=l;v=l;break}else k=k+1|0}}else{w=0;v=0}c[6747]=(c[6747]|0)+1;b=kb(1271)|0;if(!b)u=0;else{c[(b+4+15&-16)+-4>>2]=b;u=b+4+15&-16}ub(u,d,t,v,0);if((h|0)>0){p=u+720|0;r=u+732|0;q=u+740|0;e=u+924|0;o=0;do{d=c[g+(o<<2)>>2]|0;m=c[g+(o+1<<2)>>2]|0;n=c[g+(o+2<<2)>>2]|0;l=z(d,t)|0;b=j+(l+n)|0;if(!(a[b>>0]|0)){a[b>>0]=1;a[j+((z(n,t)|0)+d)>>0]=1;C=c[p>>2]|0;mh(u,0);k=(c[r>>2]|0)+-1|0;b=c[q>>2]|0;c[b+(k*52|0)+8>>2]=C+(n*104|0);c[b+(k*52|0)+12>>2]=C+(d*104|0);B=+f[C+(n*104|0)+8>>2]-+f[C+(d*104|0)+8>>2];A=+f[C+(n*104|0)+12>>2]-+f[C+(d*104|0)+12>>2];y=+f[C+(n*104|0)+16>>2]-+f[C+(d*104|0)+16>>2];f[b+(k*52|0)+16>>2]=+s(+(B*B+A*A+y*y));a[e>>0]=1}k=z(m,t)|0;b=j+(k+d)|0;if(!(a[b>>0]|0)){a[b>>0]=1;a[j+(l+m)>>0]=1;b=c[p>>2]|0;mh(u,0);C=(c[r>>2]|0)+-1|0;l=c[q>>2]|0;c[l+(C*52|0)+8>>2]=b+(d*104|0);c[l+(C*52|0)+12>>2]=b+(m*104|0);y=+f[b+(d*104|0)+8>>2]-+f[b+(m*104|0)+8>>2];A=+f[b+(d*104|0)+12>>2]-+f[b+(m*104|0)+12>>2];B=+f[b+(d*104|0)+16>>2]-+f[b+(m*104|0)+16>>2];f[l+(C*52|0)+16>>2]=+s(+(y*y+A*A+B*B));a[e>>0]=1}b=j+((z(n,t)|0)+m)|0;if(!(a[b>>0]|0)){a[b>>0]=1;a[j+(k+n)>>0]=1;k=c[p>>2]|0;mh(u,0);C=(c[r>>2]|0)+-1|0;l=c[q>>2]|0;c[l+(C*52|0)+8>>2]=k+(m*104|0);c[l+(C*52|0)+12>>2]=k+(n*104|0);y=+f[k+(m*104|0)+8>>2]-+f[k+(n*104|0)+8>>2];A=+f[k+(m*104|0)+12>>2]-+f[k+(n*104|0)+12>>2];B=+f[k+(m*104|0)+16>>2]-+f[k+(n*104|0)+16>>2];f[l+(C*52|0)+16>>2]=+s(+(y*y+A*A+B*B));a[e>>0]=1}af(u,d,m,n,0);o=o+3|0}while((o|0)<(h*3|0))}if(i){k=c[u+732>>2]|0;if((k|0)>0){m=u+740|0;d=0;b=243703;do{l=c[m>>2]|0;e=l+(d*52|0)|0;b=(z(b,1664525)|0)+1013904223|0;n=x;o=e;p=n+52|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));n=e;o=l+(((b>>>0)%(k>>>0)|0)*52|0)|0;p=n+52|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));n=l+(((b>>>0)%(k>>>0)|0)*52|0)|0;o=x;p=n+52|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));d=d+1|0}while((d|0)!=(k|0))}else b=243703;e=c[u+752>>2]|0;if((e|0)>0){m=u+760|0;d=0;do{k=c[m>>2]|0;l=k+(d*44|0)|0;b=(z(b,1664525)|0)+1013904223|0;k=k+(((b>>>0)%(e>>>0)|0)*44|0)|0;n=x;o=l;p=n+44|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));n=l;o=k;p=n+44|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));n=k;o=x;p=n+44|0;do{c[n>>2]=c[o>>2];n=n+4|0;o=o+4|0}while((n|0)<(p|0));d=d+1|0}while((d|0)!=(e|0))}}if(!((v|0)==0|(w|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[w+-4>>2]|0)}if(!j){ea=x;return u|0}c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);ea=x;return u|0}function Kc(a,b,d){a=a|0;b=b|0;d=+d;var e=0,g=0,h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;i=ea;ea=ea+256|0;e=c[b+212>>2]|0;if((e|0)>-1){b=e;ea=i;return b|0}h=(c[b+236>>2]&2|0)==0;e=h?0:b;do if(!h){if(!(+f[e+344>>2]!=0.0)?(c[e+204>>2]&2|0)==0:0)break;h=c[a+8>>2]|0;hk(i|0,0,244)|0;a=De(a+4|0,i)|0;g=(c[b+236>>2]&2|0)==0;e=g?0:b;c[a+64>>2]=0;c[a+64+4>>2]=0;c[a+64+8>>2]=0;c[a+64+12>>2]=0;c[a+64+16>>2]=0;c[a+64+20>>2]=0;c[a+64+24>>2]=0;c[a+64+28>>2]=0;c[a+144>>2]=0;c[a+144+4>>2]=0;c[a+144+8>>2]=0;c[a+144+12>>2]=0;c[a+144+16>>2]=0;c[a+144+20>>2]=0;c[a+144+24>>2]=0;c[a+144+28>>2]=0;if(g){c[a>>2]=1065353216;c[a+4>>2]=0;c[a+4+4>>2]=0;c[a+4+8>>2]=0;c[a+4+12>>2]=0;c[a+20>>2]=1065353216;c[a+24>>2]=0;c[a+24+4>>2]=0;c[a+24+8>>2]=0;c[a+24+12>>2]=0;c[a+40>>2]=1065353216;c[a+44>>2]=0;c[a+44+4>>2]=0;c[a+44+8>>2]=0;c[a+44+12>>2]=0;c[a+44+16>>2]=0;c[a+240>>2]=0;c[a+128>>2]=0;c[a+128+4>>2]=0;c[a+128+8>>2]=0;c[a+128+12>>2]=0;c[a+96>>2]=1065353216;c[a+100>>2]=1065353216;c[a+104>>2]=1065353216;f[a+108>>2]=0.0;c[a+112>>2]=1065353216;c[a+116>>2]=1065353216;c[a+120>>2]=1065353216;f[a+124>>2]=0.0;e=a+176|0;g=e+60|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0))}else{c[a>>2]=c[e+4>>2];c[a+4>>2]=c[e+4+4>>2];c[a+8>>2]=c[e+4+8>>2];c[a+12>>2]=c[e+4+12>>2];c[a+16>>2]=c[e+20>>2];c[a+16+4>>2]=c[e+20+4>>2];c[a+16+8>>2]=c[e+20+8>>2];c[a+16+12>>2]=c[e+20+12>>2];c[a+32>>2]=c[e+36>>2];c[a+32+4>>2]=c[e+36+4>>2];c[a+32+8>>2]=c[e+36+8>>2];c[a+32+12>>2]=c[e+36+12>>2];c[a+48>>2]=c[e+52>>2];c[a+48+4>>2]=c[e+52+4>>2];c[a+48+8>>2]=c[e+52+8>>2];c[a+48+12>>2]=c[e+52+12>>2];n=+f[e+344>>2];m=n*+f[e+352>>2];l=n*+f[e+356>>2];f[a+128>>2]=n*+f[e+348>>2];f[a+132>>2]=m;f[a+136>>2]=l;f[a+140>>2]=0.0;c[a+240>>2]=e;c[a+96>>2]=c[e+544>>2];c[a+96+4>>2]=c[e+544+4>>2];c[a+96+8>>2]=c[e+544+8>>2];c[a+96+12>>2]=c[e+544+12>>2];c[a+112>>2]=c[e+348>>2];c[a+112+4>>2]=c[e+348+4>>2];c[a+112+8>>2]=c[e+348+8>>2];c[a+112+12>>2]=c[e+348+12>>2];c[a+176>>2]=c[e+312>>2];c[a+176+4>>2]=c[e+312+4>>2];c[a+176+8>>2]=c[e+312+8>>2];c[a+176+12>>2]=c[e+312+12>>2];c[a+192>>2]=c[e+328>>2];c[a+192+4>>2]=c[e+328+4>>2];c[a+192+8>>2]=c[e+328+8>>2];c[a+192+12>>2]=c[e+328+12>>2];l=+f[e+344>>2];m=l*+f[e+416>>2]*d;n=l*+f[e+420>>2]*d;f[a+208>>2]=l*+f[e+412>>2]*d;f[a+212>>2]=m;f[a+216>>2]=n;f[a+220>>2]=0.0;n=+f[e+428>>2];m=+f[e+432>>2];l=+f[e+436>>2];k=(n*+f[e+268>>2]+m*+f[e+284>>2]+l*+f[e+300>>2])*d;j=(n*+f[e+272>>2]+m*+f[e+288>>2]+l*+f[e+304>>2])*d;f[a+224>>2]=(+f[e+264>>2]*n+ +f[e+280>>2]*m+ +f[e+296>>2]*l)*d;f[a+228>>2]=k;f[a+232>>2]=j}f[a+236>>2]=0.0;c[b+212>>2]=h;b=h;ea=i;return b|0}while(0);e=c[a+188>>2]|0;if((e|0)>=0){b=e;ea=i;return b|0}c[a+188>>2]=c[a+8>>2];hk(i|0,0,244)|0;e=De(a+4|0,i)|0;c[e+64>>2]=0;c[e+64+4>>2]=0;c[e+64+8>>2]=0;c[e+64+12>>2]=0;c[e+64+16>>2]=0;c[e+64+20>>2]=0;c[e+64+24>>2]=0;c[e+64+28>>2]=0;c[e+144>>2]=0;c[e+144+4>>2]=0;c[e+144+8>>2]=0;c[e+144+12>>2]=0;c[e+144+16>>2]=0;c[e+144+20>>2]=0;c[e+144+24>>2]=0;c[e+144+28>>2]=0;c[e>>2]=1065353216;c[e+4>>2]=0;c[e+4+4>>2]=0;c[e+4+8>>2]=0;c[e+4+12>>2]=0;c[e+20>>2]=1065353216;c[e+24>>2]=0;c[e+24+4>>2]=0;c[e+24+8>>2]=0;c[e+24+12>>2]=0;c[e+40>>2]=1065353216;c[e+44>>2]=0;c[e+44+4>>2]=0;c[e+44+8>>2]=0;c[e+44+12>>2]=0;c[e+44+16>>2]=0;c[e+240>>2]=0;c[e+128>>2]=0;c[e+128+4>>2]=0;c[e+128+8>>2]=0;c[e+128+12>>2]=0;c[e+96>>2]=1065353216;c[e+100>>2]=1065353216;c[e+104>>2]=1065353216;f[e+108>>2]=0.0;c[e+112>>2]=1065353216;c[e+116>>2]=1065353216;c[e+120>>2]=1065353216;f[e+124>>2]=0.0;e=e+176|0;g=e+64|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));b=c[a+188>>2]|0;ea=i;return b|0}function Lc(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0;if(a[b+165>>0]|0){g=c[b+88>>2]|0;a:do if((g|0)>0&e){h=c[b+96>>2]|0;k=+f[d>>2];l=+f[d+4>>2];m=+f[d+8>>2];n=+f[b+168>>2];e=0;while(1){r=+f[h+(e<<4)>>2]-k;q=+f[h+(e<<4)+4>>2]-l;p=+f[h+(e<<4)+8>>2]-m;if(r*r+q*q+p*p<=n)break;e=e+1|0;if((e|0)>=(g|0))break a}return e|0}while(0);o=(c[b+32>>2]|0)+12|0;c[o>>2]=(c[o>>2]|0)+1;if((g|0)==(c[b+92>>2]|0)?(i=(g|0)==0?1:g<<1,(g|0)<(i|0)):0){if(!i)h=0;else{c[6747]=(c[6747]|0)+1;e=kb((i<<4|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+88>>2]|0;h=e}if((g|0)>0){e=0;do{o=h+(e<<4)|0;j=(c[b+96>>2]|0)+(e<<4)|0;c[o>>2]=c[j>>2];c[o+4>>2]=c[j+4>>2];c[o+8>>2]=c[j+8>>2];c[o+12>>2]=c[j+12>>2];e=e+1|0}while((e|0)!=(g|0))}e=c[b+96>>2]|0;if(e|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=h;c[b+92>>2]=i;e=c[b+88>>2]|0}else e=g;o=(c[b+96>>2]|0)+(e<<4)|0;c[o>>2]=c[d>>2];c[o+4>>2]=c[d+4>>2];c[o+8>>2]=c[d+8>>2];c[o+12>>2]=c[d+12>>2];d=c[b+88>>2]|0;c[b+88>>2]=d+1;c[(c[b+32>>2]|0)+16>>2]=c[b+96>>2];return d|0}g=c[b+108>>2]|0;b:do if((g|0)>0&e){e=c[b+116>>2]|0;k=+f[d>>2];l=+f[d+4>>2];m=+f[d+8>>2];n=+f[b+168>>2];i=0;while(1){p=+f[e+(i<<2)>>2]-k;q=+f[e+(i+1<<2)>>2]-l;r=+f[e+(i+2<<2)>>2]-m;h=i+3|0;if(p*p+q*q+r*r<=n)break;if((h|0)<(g|0))i=h;else break b}d=(i>>>0)/3|0;return d|0}while(0);e=c[b+112>>2]|0;if((g|0)==(e|0)){e=(g|0)==0?1:g<<1;if((g|0)<(e|0)){if(!e)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((e<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+108>>2]|0}j=c[b+116>>2]|0;if((g|0)<=0)if(!j)i=b+120|0;else o=36;else{i=0;do{c[h+(i<<2)>>2]=c[j+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0));o=36}if((o|0)==36){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);g=c[b+108>>2]|0}c[b+116>>2]=0;i=b+120|0}a[i>>0]=1;c[b+116>>2]=h;c[b+112>>2]=e;h=g}else{h=g;e=g}}else h=g;g=c[b+116>>2]|0;c[g+(h<<2)>>2]=c[d>>2];h=h+1|0;c[b+108>>2]=h;if((h|0)==(e|0)){j=(e|0)==0?1:e<<1;if((e|0)<(j|0)){if(!j)i=0;else{c[6747]=(c[6747]|0)+1;e=kb((j<<2|3)+16|0)|0;if(!e)h=0;else{c[(e+4+15&-16)+-4>>2]=e;h=e+4+15&-16}e=c[b+108>>2]|0;g=c[b+116>>2]|0;i=h}if((e|0)<=0)if(!g)g=b+120|0;else o=51;else{h=0;do{c[i+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(e|0));o=51}if((o|0)==51){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[b+108>>2]|0}c[b+116>>2]=0;g=b+120|0}a[g>>0]=1;c[b+116>>2]=i;c[b+112>>2]=j;g=i;h=e;e=j}else h=e}c[g+(h<<2)>>2]=c[d+4>>2];h=h+1|0;c[b+108>>2]=h;if((h|0)==(e|0)){j=(e|0)==0?1:e<<1;if((e|0)<(j|0)){if(!j)i=0;else{c[6747]=(c[6747]|0)+1;e=kb((j<<2|3)+16|0)|0;if(!e)h=0;else{c[(e+4+15&-16)+-4>>2]=e;h=e+4+15&-16}e=c[b+108>>2]|0;g=c[b+116>>2]|0;i=h}if((e|0)<=0)if(!g)g=b+120|0;else o=66;else{h=0;do{c[i+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(e|0));o=66}if((o|0)==66){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[b+108>>2]|0}c[b+116>>2]=0;g=b+120|0}a[g>>0]=1;c[b+116>>2]=i;c[b+112>>2]=j;g=i}}else e=h;c[g+(e<<2)>>2]=c[d+8>>2];d=e+1|0;c[b+108>>2]=d;b=c[b+32>>2]|0;c[b+12>>2]=(c[b+12>>2]|0)+1;c[b+16>>2]=g;d=((d|0)/3|0)+-1|0;return d|0}function Mc(a,b){a=a|0;b=b|0;var d=0.0,e=0,g=0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0;x=ea;ea=ea+64|0;g=c[a+28>>2]|0;h=c[a+32>>2]|0;i=c[b+8>>2]|0;f[i>>2]=1.0;j=c[b+24>>2]|0;f[i+(j+1<<2)>>2]=1.0;f[i+((j<<1)+2<<2)>>2]=1.0;u=+f[a+48>>2];v=+f[a+52>>2];d=+f[a+56>>2];l=+f[g+4>>2]*u+ +f[g+8>>2]*v+ +f[g+12>>2]*d;k=u*+f[g+20>>2]+v*+f[g+24>>2]+d*+f[g+28>>2];d=u*+f[g+36>>2]+v*+f[g+40>>2]+d*+f[g+44>>2];i=c[b+12>>2]|0;c[i>>2]=0;f[i+4>>2]=d;f[i+8>>2]=-k;f[i+12>>2]=0.0;f[i+(j<<2)>>2]=-d;c[i+(j<<2)+4>>2]=0;f[i+(j<<2)+8>>2]=l;f[i+(j<<2)+12>>2]=0.0;f[i+(j<<1<<2)>>2]=k;f[i+(j<<1<<2)+4>>2]=-l;c[i+(j<<1<<2)+8>>2]=0;f[i+(j<<1<<2)+12>>2]=0.0;e=c[b+16>>2]|0;if(e|0){f[e>>2]=-1.0;f[e+(j+1<<2)>>2]=-1.0;f[e+((j<<1)+2<<2)>>2]=-1.0}q=+f[a+64>>2];v=+f[a+68>>2];u=+f[a+72>>2];r=+f[h+4>>2]*q+ +f[h+8>>2]*v+ +f[h+12>>2]*u;t=q*+f[h+20>>2]+v*+f[h+24>>2]+u*+f[h+28>>2];u=q*+f[h+36>>2]+v*+f[h+40>>2]+u*+f[h+44>>2];e=c[b+20>>2]|0;c[e>>2]=0;f[e+4>>2]=-u;f[e+8>>2]=t;f[e+12>>2]=0.0;f[e+(j<<2)>>2]=u;c[e+(j<<2)+4>>2]=0;f[e+(j<<2)+8>>2]=-r;f[e+(j<<2)+12>>2]=0.0;f[e+(j<<1<<2)>>2]=-t;f[e+(j<<1<<2)+4>>2]=r;c[e+(j<<1<<2)+8>>2]=0;f[e+(j<<1<<2)+12>>2]=0.0;v=+f[b>>2]*+f[b+4>>2];t=v*(t+ +f[h+56>>2]-k-+f[g+56>>2]);u=v*(u+ +f[h+60>>2]-d-+f[g+60>>2]);y=c[b+28>>2]|0;f[y>>2]=v*(r+ +f[h+52>>2]-l-+f[g+52>>2]);f[y+(j<<2)>>2]=t;f[y+(j<<1<<2)>>2]=u;f[i+(j*3<<2)>>2]=1.0;f[i+((j<<2|1)<<2)>>2]=1.0;f[i+((j*5|0)+2<<2)>>2]=1.0;if(e|0){f[e+(j*3<<2)>>2]=-1.0;f[e+((j<<2|1)<<2)>>2]=-1.0;f[e+((j*5|0)+2<<2)>>2]=-1.0}l=+f[h+24>>2];A=+f[h+44>>2];m=+f[h+28>>2];n=+f[h+40>>2];z=+f[h+36>>2];k=+f[h+20>>2];u=+f[h+4>>2];t=+f[h+8>>2];p=+f[h+12>>2];d=1.0/((l*A-m*n)*u+t*(m*z-A*k)+(n*k-l*z)*p);F=+f[g+4>>2];E=+f[g+8>>2];G=+f[g+12>>2];D=+f[g+20>>2];C=+f[g+24>>2];B=+f[g+28>>2];o=+f[g+36>>2];q=+f[g+40>>2];r=+f[g+44>>2];f[x+16>>2]=G*((n*k-l*z)*d)+(F*((l*A-m*n)*d)+E*((m*z-A*k)*d));f[x+16+4>>2]=G*((z*t-n*u)*d)+(F*((n*p-A*t)*d)+E*((A*u-z*p)*d));f[x+16+8>>2]=G*((l*u-k*t)*d)+(F*((m*t-l*p)*d)+E*((k*p-m*u)*d));f[x+16+12>>2]=0.0;f[x+16+16>>2]=(l*A-m*n)*d*D+(m*z-A*k)*d*C+(n*k-l*z)*d*B;f[x+16+20>>2]=(n*p-A*t)*d*D+(A*u-z*p)*d*C+(z*t-n*u)*d*B;f[x+16+24>>2]=(m*t-l*p)*d*D+(k*p-m*u)*d*C+(l*u-k*t)*d*B;f[x+16+28>>2]=0.0;f[x+16+32>>2]=(l*A-m*n)*d*o+(m*z-A*k)*d*q+(n*k-l*z)*d*r;f[x+16+36>>2]=(n*p-A*t)*d*o+(A*u-z*p)*d*q+(z*t-n*u)*d*r;f[x+16+40>>2]=(m*t-l*p)*d*o+(k*p-m*u)*d*q+(l*u-k*t)*d*r;f[x+16+44>>2]=0.0;Gg(x+16|0,x);r=+f[a+80>>2];d=+f[x>>2];t=+f[a+84>>2];k=+f[x+4>>2];u=+f[a+88>>2];l=+f[x+8>>2];q=+f[a+92>>2];m=+f[x+12>>2];if(!((r-d)*(r-d)+(t-k)*(t-k)+(u-l)*(u-l)+(q-m)*(q-m)<(r+d)*(r+d)+(t+k)*(t+k)+(u+l)*(u+l)+(q+m)*(q+m))){d=-d;k=-k;l=-l;m=-m}n=k*-u+(m*-r+d*q)-l*-t;o=l*-r+(m*-t+k*q)-d*-u;p=d*-t+(m*-u+l*q)-k*-r;d=m*q-d*-r-k*-t-l*-u;d=d<-1.0?-1.0:d;d=+w(+(d>1.0?1.0:d))*2.0;if(n*n+o*o+p*p<1.4210854715202004e-14){E=1.0;F=0.0;D=0.0;G=-d;E=E*G;F=F*G;G=D*G;a=c[b+28>>2]|0;y=c[b+24>>2]|0;E=v*E;b=y*3|0;b=a+(b<<2)|0;f[b>>2]=E;F=v*F;b=y<<2;b=a+(b<<2)|0;f[b>>2]=F;G=v*G;y=y*5|0;y=a+(y<<2)|0;f[y>>2]=G;ea=x;return}D=1.0/+s(+(n*n+o*o+p*p));E=n*D;F=o*D;D=p*D;G=-d;E=E*G;F=F*G;G=D*G;a=c[b+28>>2]|0;y=c[b+24>>2]|0;E=v*E;b=y*3|0;b=a+(b<<2)|0;f[b>>2]=E;F=v*F;b=y<<2;b=a+(b<<2)|0;f[b>>2]=F;G=v*G;y=y*5|0;y=a+(y<<2)|0;f[y>>2]=G;ea=x;return}function Nc(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0;l=ea;ea=ea+384|0;g=c[d+36>>2]|0;d=c[e+36>>2]|0;e=c[b+24>>2]|0;if(((e|0)==(c[b+28>>2]|0)?c[e+1132>>2]|0:0)?(j=(z(c[d+380>>2]|0,c[e+1112>>2]|0)|0)+(c[g+380>>2]|0)|0,a[(c[e+1140>>2]|0)+j>>0]|0):0){c[6407]=(c[6407]|0)+1;ea=l;return}c[l+328+4>>2]=35;c[l+328+8>>2]=0;c[l+328+12>>2]=1065353216;c[l+328+16>>2]=1065353216;c[l+328+20>>2]=1065353216;f[l+328+24>>2]=0.0;c[l+328>>2]=4500;c[l+328+52>>2]=g;f[l+328+44>>2]=0.0;c[l+272+4>>2]=35;c[l+272+8>>2]=0;c[l+272+12>>2]=1065353216;c[l+272+16>>2]=1065353216;c[l+272+20>>2]=1065353216;f[l+272+24>>2]=0.0;c[l+272>>2]=4500;c[l+272+52>>2]=d;f[l+272+44>>2]=0.0;if((a[24880]|0)==0?DC(24880)|0:0){if((a[24888]|0)==0?DC(24888)|0:0){c[6348]=1065353216;c[6349]=0;c[6350]=0;c[6351]=0;c[6352]=0;c[6353]=1065353216;c[6354]=0;c[6355]=0;c[6356]=0;c[6357]=0;c[6358]=1065353216;f[6359]=0.0;PB(24888)}c[6332]=c[6348];c[6333]=c[6349];c[6334]=c[6350];c[6335]=c[6351];c[6336]=c[6352];c[6337]=c[6353];c[6338]=c[6354];c[6339]=c[6355];c[6340]=c[6356];c[6341]=c[6357];c[6342]=c[6358];c[6343]=c[6359];c[6344]=0;c[6345]=0;c[6346]=0;c[6347]=0;PB(24880)}if((a[24880]|0)==0?DC(24880)|0:0){if((a[24888]|0)==0?DC(24888)|0:0){c[6348]=1065353216;c[6349]=0;c[6350]=0;c[6351]=0;c[6352]=0;c[6353]=1065353216;c[6354]=0;c[6355]=0;c[6356]=0;c[6357]=0;c[6358]=1065353216;f[6359]=0.0;PB(24888)}c[6332]=c[6348];c[6333]=c[6349];c[6334]=c[6350];c[6335]=c[6351];c[6336]=c[6352];c[6337]=c[6353];c[6338]=c[6354];c[6339]=c[6355];c[6340]=c[6356];c[6341]=c[6357];c[6342]=c[6358];c[6343]=c[6359];c[6344]=0;c[6345]=0;c[6346]=0;c[6347]=0;PB(24880)}n=+f[g+232>>2]-+f[d+232>>2];m=+f[g+236>>2]-+f[d+236>>2];f[l>>2]=+f[g+228>>2]-+f[d+228>>2];f[l+4>>2]=n;f[l+8>>2]=m;f[l+12>>2]=0.0;if(!(!(Fc(l+328|0,25328,l+272|0,25328,l,l+216|0)|0)?!(Bb(l+328|0,25328,l+272|0,25328,l,l+216|0,0)|0):0))h=19;if((h|0)==19?(c[l+4>>2]=0,c[l+4+4>>2]=0,c[l+4+8>>2]=0,c[l+4+12>>2]=0,c[l+4+16>>2]=0,c[l+4+20>>2]=0,a[l+152>>0]=0,c[l>>2]=4320,Yb(b,l+216|0,g,0,0,d,0,0,l)|0):0){c[6747]=(c[6747]|0)+1;d=kb(235)|0;if(!d)j=0;else{c[(d+4+15&-16)+-4>>2]=d;j=d+4+15&-16}e=j+4|0;d=j+152|0;hk(e|0,0,212)|0;c[j>>2]=4320;g=l+4|0;h=e+100|0;do{c[e>>2]=c[g>>2];e=e+4|0;g=g+4|0}while((e|0)<(h|0));e=j+104|0;c[e>>2]=c[l+104>>2];c[e+4>>2]=c[l+104+4>>2];c[e+8>>2]=c[l+104+8>>2];c[e+12>>2]=c[l+104+12>>2];e=j+120|0;c[e>>2]=c[l+120>>2];c[e+4>>2]=c[l+120+4>>2];c[e+8>>2]=c[l+120+8>>2];c[e+12>>2]=c[l+120+12>>2];e=j+136|0;c[e>>2]=c[l+136>>2];c[e+4>>2]=c[l+136+4>>2];c[e+8>>2]=c[l+136+8>>2];c[e+12>>2]=c[l+136+12>>2];a[d>>0]=a[l+152>>0]|0;e=j+156|0;g=l+156|0;h=e+60|0;do{c[e>>2]=c[g>>2];e=e+4|0;g=g+4|0}while((e|0)<(h|0));h=c[b+24>>2]|0;i=j;d=c[h+852>>2]|0;if((d|0)==(c[h+856>>2]|0)?(k=(d|0)==0?1:d<<1,(d|0)<(k|0)):0){if(!k)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((k<<2|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[h+852>>2]|0}if((d|0)>0){g=0;do{c[e+(g<<2)>>2]=c[(c[h+860>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(d|0))}g=c[h+860>>2]|0;if(g){if(a[h+864>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);d=c[h+852>>2]|0}c[h+860>>2]=0}a[h+864>>0]=1;c[h+860>>2]=e;c[h+856>>2]=k}c[(c[h+860>>2]|0)+(d<<2)>>2]=i;c[h+852>>2]=d+1;i=c[b+24>>2]|0;k=c[b+28>>2]|0;m=+f[i+348>>2];n=+f[k+348>>2];b=j+64|0;f[b>>2]=+f[b>>2]*(m>n?m:n);b=j+68|0;f[b>>2]=+f[b>>2]*((+f[i+360>>2]+ +f[k+360>>2])*.5)}ea=l;return}function Oc(b,d,e){b=b|0;d=d|0;e=e|0;var g=0.0,h=0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0;o=ea;ea=ea+128|0;c[b+68>>2]=(c[b+68>>2]|0)+1;c[o>>2]=c[d>>2];c[o+4>>2]=c[d+4>>2];c[o+8>>2]=c[d+8>>2];c[o+12>>2]=c[d+12>>2];c[o+16>>2]=c[d+16>>2];c[o+16+4>>2]=c[d+16+4>>2];c[o+16+8>>2]=c[d+16+8>>2];c[o+16+12>>2]=c[d+16+12>>2];c[o+32>>2]=c[d+32>>2];c[o+32+4>>2]=c[d+32+4>>2];c[o+32+8>>2]=c[d+32+8>>2];c[o+32+12>>2]=c[d+32+12>>2];c[o+48>>2]=c[d+48>>2];c[o+48+4>>2]=c[d+48+4>>2];c[o+48+8>>2]=c[d+48+8>>2];c[o+48+12>>2]=c[d+48+12>>2];m=c[e+4>>2]|0;n=+ha[c[(c[e>>2]|0)+48>>2]&15](e);Pa[c[(c[e>>2]|0)+8>>2]&127](e,d,o+112|0,o+96|0);g=+f[o+112>>2];if(+f[b+32>>2]>g)f[b+32>>2]=g;g=+f[o+96>>2];if(+f[b+48>>2]>2]=g;g=+f[o+112+4>>2];if(+f[b+36>>2]>g)f[b+36>>2]=g;g=+f[o+96+4>>2];if(+f[b+52>>2]>2]=g;g=+f[o+112+8>>2];if(+f[b+40>>2]>g)f[b+40>>2]=g;g=+f[o+96+8>>2];if(+f[b+56>>2]>2]=g;k=c[b+64>>2]|0;if(!k){j=0;k=b+16|0}else{c[o+64>>2]=c[o+112>>2];c[o+64+4>>2]=c[o+112+4>>2];c[o+64+8>>2]=c[o+112+8>>2];c[o+64+12>>2]=c[o+112+12>>2];c[o+64+16>>2]=c[o+96>>2];c[o+64+16+4>>2]=c[o+96+4>>2];c[o+64+16+8>>2]=c[o+96+8>>2];c[o+64+16+12>>2]=c[o+96+12>>2];j=c[b+16>>2]|0;d=c[k+4>>2]|0;if(!d){c[6747]=(c[6747]|0)+1;d=kb(63)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}h=d;i=h+44|0;do{c[h>>2]=0;h=h+4|0}while((h|0)<(i|0))}else c[k+4>>2]=0;c[d+32>>2]=0;c[d+36>>2]=j;c[d+40>>2]=0;c[d>>2]=c[o+64>>2];c[d+4>>2]=c[o+64+4>>2];c[d+8>>2]=c[o+64+8>>2];c[d+12>>2]=c[o+64+12>>2];c[d+16>>2]=c[o+64+16>>2];c[d+20>>2]=c[o+64+20>>2];c[d+24>>2]=c[o+64+24>>2];c[d+28>>2]=c[o+64+28>>2];je(k,c[k>>2]|0,d);c[k+12>>2]=(c[k+12>>2]|0)+1;j=d;k=b+16|0}d=c[k>>2]|0;if((d|0)==(c[b+20>>2]|0)?(l=(d|0)==0?1:d<<1,(d|0)<(l|0)):0){if(!l)h=0;else{c[6747]=(c[6747]|0)+1;d=kb((l*80|3)+16|0)|0;if(!d)h=0;else{c[(d+4+15&-16)+-4>>2]=d;h=d+4+15&-16}d=c[k>>2]|0}if((d|0)>0){i=0;do{p=h+(i*80|0)|0;q=c[b+24>>2]|0;r=q+(i*80|0)|0;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];p=q+(i*80|0)+16|0;r=h+(i*80|0)+16|0;c[r>>2]=c[p>>2];c[r+4>>2]=c[p+4>>2];c[r+8>>2]=c[p+8>>2];c[r+12>>2]=c[p+12>>2];r=q+(i*80|0)+32|0;p=h+(i*80|0)+32|0;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];p=h+(i*80|0)+48|0;r=q+(i*80|0)+48|0;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];p=h+(i*80|0)+64|0;q=q+(i*80|0)+64|0;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];i=i+1|0}while((i|0)!=(d|0))}d=c[b+24>>2]|0;if(d|0){if(a[b+28>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+24>>2]=0}a[b+28>>0]=1;c[b+24>>2]=h;c[b+20>>2]=l;d=c[k>>2]|0}r=c[b+24>>2]|0;q=r+(d*80|0)|0;c[q>>2]=c[o>>2];c[q+4>>2]=c[o+4>>2];c[q+8>>2]=c[o+8>>2];c[q+12>>2]=c[o+12>>2];q=r+(d*80|0)+16|0;c[q>>2]=c[o+16>>2];c[q+4>>2]=c[o+16+4>>2];c[q+8>>2]=c[o+16+8>>2];c[q+12>>2]=c[o+16+12>>2];q=r+(d*80|0)+32|0;c[q>>2]=c[o+32>>2];c[q+4>>2]=c[o+32+4>>2];c[q+8>>2]=c[o+32+8>>2];c[q+12>>2]=c[o+32+12>>2];q=r+(d*80|0)+48|0;c[q>>2]=c[o+48>>2];c[q+4>>2]=c[o+48+4>>2];c[q+8>>2]=c[o+48+8>>2];c[q+12>>2]=c[o+48+12>>2];r=r+(d*80|0)+64|0;c[r>>2]=e;c[r+4>>2]=m;f[r+8>>2]=n;c[r+12>>2]=j;c[k>>2]=(c[k>>2]|0)+1;ea=o;return}function Pc(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;var h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;z=ea;ea=ea+192|0;j=c[b+4>>2]|0;q=+f[j+752>>2];if(q>2]|0;x=c[(c[b+8>>2]|0)+8>>2]|0;l=+f[e>>2];n=+f[d>>2]*g+l;m=+f[e+4>>2];p=+f[d+4>>2]*g+m;k=+f[e+8>>2];o=+f[d+8>>2]*g+k;if((w|0)!=(x|0)){y=c[(c[b+12>>2]|0)+8>>2]|0;B=n-+f[y+52>>2];A=p-+f[y+56>>2];v=o-+f[y+60>>2];h=x;t=B*+f[y+4>>2]+A*+f[y+20>>2]+v*+f[y+36>>2];u=B*+f[y+8>>2]+A*+f[y+24>>2]+v*+f[y+40>>2];v=B*+f[y+12>>2]+A*+f[y+28>>2]+v*+f[y+44>>2];y=b+12|0}else{A=n-+f[w+52>>2];B=p-+f[w+56>>2];v=o-+f[w+60>>2];h=c[(c[b+12>>2]|0)+8>>2]|0;t=A*+f[w+4>>2]+B*+f[w+20>>2]+v*+f[w+36>>2];u=A*+f[w+8>>2]+B*+f[w+24>>2]+v*+f[w+40>>2];v=A*+f[w+12>>2]+B*+f[w+28>>2]+v*+f[w+44>>2];y=b+12|0}C=l-+f[h+52>>2];l=m-+f[h+56>>2];B=k-+f[h+60>>2];m=C*+f[h+4>>2]+l*+f[h+20>>2]+B*+f[h+36>>2];A=C*+f[h+8>>2]+l*+f[h+24>>2]+B*+f[h+40>>2];B=C*+f[h+12>>2]+l*+f[h+28>>2]+B*+f[h+44>>2];f[z>>2]=t;f[z+4>>2]=u;f[z+8>>2]=v;f[z+12>>2]=0.0;f[z+16>>2]=m;f[z+20>>2]=A;f[z+24>>2]=B;f[z+28>>2]=0.0;c[z+64>>2]=c[d>>2];c[z+64+4>>2]=c[d+4>>2];c[z+64+8>>2]=c[d+8>>2];c[z+64+12>>2]=c[d+12>>2];f[z+80>>2]=g;f[z+84>>2]=0.0;f[z+88>>2]=0.0;f[z+92>>2]=0.0;c[z+112>>2]=0;a[z+116>>0]=0;c[z+120>>2]=0;c[z+120+4>>2]=0;c[z+120+8>>2]=0;c[z+120+12>>2]=0;c[z+120+16>>2]=0;c[z+120+20>>2]=0;c[z+120+24>>2]=0;c[z+120+28>>2]=0;f[z+48>>2]=n;f[z+52>>2]=p;f[z+56>>2]=o;f[z+60>>2]=0.0;c[z+32>>2]=c[e>>2];c[z+32+4>>2]=c[e+4>>2];c[z+32+8>>2]=c[e+8>>2];c[z+32+12>>2]=c[e+12>>2];e=c[j+748>>2]|0;if((e|0)>0){i=0;d=-1;k=q*q;while(1){l=+f[j+4+(i*184|0)>>2]-t;n=+f[j+4+(i*184|0)+4>>2]-u;m=+f[j+4+(i*184|0)+8>>2]-v;h=l*l+n*n+m*m>2]|0)+8>>2]|0;j=c[(c[y>>2]|0)+8>>2]|0;k=+f[i+224>>2]*+f[j+224>>2];k=k<-10.0?-10.0:k;f[z+84>>2]=k>10.0?10.0:k;f[z+92>>2]=+f[i+228>>2]*+f[j+228>>2];k=+f[i+232>>2]*+f[j+232>>2];k=k<-10.0?-10.0:k;f[z+88>>2]=k>10.0?10.0:k;k=+f[z+72>>2];if(+r(+k)>.7071067690849304){B=+f[z+68>>2];C=1.0/+s(+(k*k+B*B));A=+f[z+64>>2];l=B*C;m=A*-(k*C);n=0.0;o=-(k*C);p=(k*k+B*B)*C;k=-(A*(B*C))}else{p=+f[z+64>>2];B=+f[z+68>>2];C=1.0/+s(+(p*p+B*B));l=0.0;m=(p*p+B*B)*C;n=-(B*C);o=p*C;p=-(k*(p*C));k=k*-(B*C)}f[z+152>>2]=n;f[z+156>>2]=o;f[z+160>>2]=l;f[z+168>>2]=p;f[z+172>>2]=k;f[z+176>>2]=m;if((w|0)!=(x|0)){h=b+24|0;e=b+28|0;i=b+16|0;j=b+20|0}else{h=b+28|0;e=b+24|0;i=b+20|0;j=b+16|0}h=c[h>>2]|0;e=c[e>>2]|0;i=c[i>>2]|0;c[z+96>>2]=c[j>>2];c[z+100>>2]=i;c[z+104>>2]=e;c[z+108>>2]=h;h=c[b+4>>2]|0;if((d|0)>-1){j=h+4+(d*184|0)+148|0;i=c[j>>2]|0;G=h+4+(d*184|0)+120|0;H=c[G>>2]|0;E=h+4+(d*184|0)+124|0;F=c[E>>2]|0;e=h+4+(d*184|0)+128|0;D=c[e>>2]|0;I=h+4+(d*184|0)+112|0;J=c[I>>2]|0;vh(h+4+(d*184|0)|0,z|0,184)|0;c[I>>2]=J;c[G>>2]=H;c[E>>2]=F;c[e>>2]=D;c[j>>2]=i}else d=Rd(h,z)|0;h=c[6722]|0;do if(h|0){if((c[(c[(c[b+8>>2]|0)+8>>2]|0)+204>>2]&8|0)==0?(c[(c[(c[y>>2]|0)+8>>2]|0)+204>>2]&8|0)==0:0)break;ya[h&0]((c[b+4>>2]|0)+4+(d*184|0)|0,c[((w|0)!=(x|0)?y:b+8|0)>>2]|0,c[z+96>>2]|0,c[z+104>>2]|0,c[((w|0)!=(x|0)?b+8|0:y)>>2]|0,c[z+100>>2]|0,c[z+108>>2]|0)|0}while(0);ea=z;return}function Qc(a,b){a=a|0;b=b|0;var d=0,e=0.0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;F=ea;ea=ea+16|0;Fi(13690);E=c[a+712>>2]|0;if((E|0)>0){c[6747]=(c[6747]|0)+1;d=kb((E<<4|3)+16|0)|0;if(!d)h=0;else{c[(d+4+15&-16)+-4>>2]=d;h=d+4+15&-16}hk(h|0,0,E<<4|0)|0;g=c[a+712>>2]|0;if((g|0)>0){c[6747]=(c[6747]|0)+1;d=kb((g<<2|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}hk(d|0,0,g<<2|0)|0;C=d;D=h;A=h;z=d}else{C=0;D=h;A=h;z=0}}else{C=0;D=0;A=0;z=0}y=c[a+1112>>2]|0;if(b){if((y|0)>0){g=c[a+1120>>2]|0;i=0;do{h=c[g+(i<<2)>>2]|0;d=c[h+312>>2]|0;if(d|0){f[h+276>>2]=1.0/+(d|0)*+f[h+276>>2];f[h+280>>2]=1.0/+(d|0)*+f[h+280>>2];f[h+284>>2]=1.0/+(d|0)*+f[h+284>>2];f[h+292>>2]=1.0/+(d|0)*+f[h+292>>2];f[h+296>>2]=1.0/+(d|0)*+f[h+296>>2];f[h+300>>2]=1.0/+(d|0)*+f[h+300>>2]}i=i+1|0}while((i|0)!=(y|0));B=14}}else B=14;if((B|0)==14?(y|0)>0:0){k=c[a+1120>>2]|0;if(b){b=0;do{d=c[k+(b<<2)>>2]|0;if((c[d+312>>2]|0)>0?(v=+f[a+452>>2],p=+f[d+276>>2]*v,t=v*+f[d+280>>2],x=v*+f[d+284>>2],n=v*+f[d+292>>2],r=v*+f[d+296>>2],v=v*+f[d+300>>2],l=c[d+24>>2]|0,(l|0)>0):0){g=c[d+32>>2]|0;h=c[a+720>>2]|0;i=c[d+12>>2]|0;j=0;do{m=c[g+(j<<2)>>2]|0;w=+f[i+(j<<2)>>2];u=+f[m+8>>2]-+f[d+228>>2];s=+f[m+12>>2]-+f[d+232>>2];q=+f[m+16>>2]-+f[d+236>>2];G=A+(((m-h|0)/104|0)<<4)|0;f[G>>2]=+f[G>>2]+w*(p+(r*q-v*s));G=A+(((m-h|0)/104|0)<<4)+4|0;f[G>>2]=+f[G>>2]+w*(t+(v*u-n*q));G=A+(((m-h|0)/104|0)<<4)+8|0;f[G>>2]=w*(x+(n*s-r*u))+ +f[G>>2];m=z+(((m-h|0)/104|0)<<2)|0;f[m>>2]=w+ +f[m>>2];j=j+1|0}while((j|0)!=(l|0))}b=b+1|0}while((b|0)!=(y|0))}else{b=0;do{d=c[k+(b<<2)>>2]|0;if((c[d+308>>2]|0)>0?(u=+f[a+452>>2],o=+f[d+244>>2]*u,s=u*+f[d+248>>2],w=u*+f[d+252>>2],e=u*+f[d+260>>2],q=u*+f[d+264>>2],u=u*+f[d+268>>2],m=c[d+24>>2]|0,(m|0)>0):0){g=c[d+32>>2]|0;h=c[a+720>>2]|0;i=c[d+12>>2]|0;j=0;do{G=c[g+(j<<2)>>2]|0;x=+f[i+(j<<2)>>2];v=+f[G+8>>2]-+f[d+228>>2];t=+f[G+12>>2]-+f[d+232>>2];r=+f[G+16>>2]-+f[d+236>>2];l=A+(((G-h|0)/104|0)<<4)|0;f[l>>2]=+f[l>>2]+x*(o+(q*r-u*t));l=A+(((G-h|0)/104|0)<<4)+4|0;f[l>>2]=+f[l>>2]+x*(s+(u*v-e*r));l=A+(((G-h|0)/104|0)<<4)+8|0;f[l>>2]=x*(w+(e*t-q*v))+ +f[l>>2];G=z+(((G-h|0)/104|0)<<2)|0;f[G>>2]=x+ +f[G>>2];j=j+1|0}while((j|0)!=(m|0))}b=b+1|0}while((b|0)!=(y|0))}}if((E|0)>0){d=0;do{e=+f[z+(d<<2)>>2];if(e>0.0){w=1.0/e*+f[A+(d<<4)+4>>2];x=1.0/e*+f[A+(d<<4)+8>>2];G=c[a+720>>2]|0;y=G+(d*104|0)+8|0;f[y>>2]=1.0/e*+f[A+(d<<4)>>2]+ +f[y>>2];y=G+(d*104|0)+12|0;f[y>>2]=w+ +f[y>>2];G=G+(d*104|0)+16|0;f[G>>2]=x+ +f[G>>2]}d=d+1|0}while((d|0)!=(E|0));if(C|0)B=35}else if(!((z|0)==0|(C|0)==0))B=35;if((B|0)==35){c[6748]=(c[6748]|0)+1;uc(c[C+-4>>2]|0)}if(!((A|0)==0|(D|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[D+-4>>2]|0)}d=c[2685]|0;G=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=G;if(G|0){ea=F;return}do if(c[d+4>>2]|0){Y(F|0,0)|0;G=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[F+4>>2]|0)-(c[G+4>>2]|0)+(((c[F>>2]|0)-(c[G>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=F;return}}while(0);c[2685]=c[d+20>>2];ea=F;return}function Rc(b,d,e,g,i,j){b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;var k=0,l=0.0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0;C=ea;ea=ea+272|0;z=+f[e+48>>2]-+f[d+48>>2];B=+f[e+52>>2]-+f[d+52>>2];A=+f[e+56>>2]-+f[d+56>>2];Ee(d,e,C+256|0,C+208|0);v=+f[C+208>>2];t=+f[C+256>>2]*v;u=v*+f[C+256+4>>2];v=v*+f[C+256+8>>2];f[C+192>>2]=t;f[C+192+4>>2]=u;f[C+192+8>>2]=v;f[C+192+12>>2]=0.0;w=+f[i+48>>2]-+f[g+48>>2];y=+f[i+52>>2]-+f[g+52>>2];x=+f[i+56>>2]-+f[g+56>>2];Ee(g,i,C+256|0,C+208|0);r=+f[C+208>>2];p=+f[C+256>>2]*r;q=r*+f[C+256+4>>2];r=r*+f[C+256+8>>2];f[C+176>>2]=p;f[C+176+4>>2]=q;f[C+176+8>>2]=r;f[C+176+12>>2]=0.0;e=c[b+12>>2]|0;o=+ha[c[(c[e>>2]|0)+16>>2]&15](e);e=c[b+16>>2]|0;if(!e)l=0.0;else l=+ha[c[(c[e>>2]|0)+16>>2]&15](e);r=o*+s(+(t*t+u*u+v*v))+l*+s(+(p*p+q*q+r*r));if(r+ +s(+((w-z)*(w-z)+(y-B)*(y-B)+(x-A)*(x-A)))==0.0){j=0;ea=C;return j|0}c[C+208>>2]=10472;f[C+208+36>>2]=999999984306749440.0;a[C+208+40>>0]=0;Ec(b,d,g,C+208|0);i=(a[C+208+40>>0]|0)==0;c[C+256>>2]=c[C+208+20>>2];c[C+256+4>>2]=c[C+208+20+4>>2];c[C+256+8>>2]=c[C+208+20+8>>2];c[C+256+12>>2]=c[C+208+20+12>>2];a:do if(!i?(n=c[C+208+4>>2]|0,k=c[C+208+8>>2]|0,m=c[C+208+12>>2]|0,v=(w-z)*(c[h>>2]=n,+f[h>>2]),v=v+(y-B)*(c[h>>2]=k,+f[h>>2]),!(r+(v+(x-A)*(c[h>>2]=m,+f[h>>2]))<=1.1920928955078125e-07)):0){l=+f[C+208+16>>2];o=+f[j+172>>2]+ +f[C+208+36>>2];b:do if(o>1.0000000474974513e-03){p=o;q=0.0;i=0;while(1){e=c[j+168>>2]|0;if(e|0){D=c[(c[e>>2]|0)+20>>2]|0;c[C+112>>2]=1065353216;c[C+112+4>>2]=1065353216;c[C+112+8>>2]=1065353216;f[C+112+12>>2]=0.0;Ka[D&7](e,C+256|0,.20000000298023224,C+112|0)}l=(w-z)*(c[h>>2]=n,+f[h>>2]);l=l+(y-B)*(c[h>>2]=k,+f[h>>2]);l=r+(l+(x-A)*(c[h>>2]=m,+f[h>>2]));if(l<=1.1920928955078125e-07){k=0;break a}o=q+p/l;if(!(!(o<=q)&(!(o<0.0)&!(o>1.0)))){k=0;break a}ag(d,z,B,A,C+192|0,o,C+112|0);ag(g,w,y,x,C+176|0,o,C+48|0);k=c[j+168>>2]|0;if(k|0){D=c[(c[k>>2]|0)+20>>2]|0;c[C>>2]=1065353216;c[C+4>>2]=0;c[C+8>>2]=0;f[C+12>>2]=0.0;Ka[D&7](k,C+112+48|0,.20000000298023224,C)}Da[c[c[j>>2]>>2]&31](j,o);c[C>>2]=10472;f[C+36>>2]=999999984306749440.0;a[C+40>>0]=0;Ec(b,C+112|0,C+48|0,C);if(!(a[C+40>>0]|0)){k=17;break}p=+f[C+36>>2]+ +f[j+172>>2];c[C+256>>2]=c[C+20>>2];c[C+256+4>>2]=c[C+20+4>>2];c[C+256+8>>2]=c[C+20+8>>2];c[C+256+12>>2]=c[C+20+12>>2];n=c[C+4>>2]|0;k=c[C+8>>2]|0;m=c[C+12>>2]|0;e=i+1|0;if(i>>>0>63){k=18;break}if(!(p>1.0000000474974513e-03)){l=+f[C+16>>2];break b}else{q=o;i=e}}if((k|0)==17)Ma[c[(c[j>>2]|0)+8>>2]&127](j,-1,i);else if((k|0)==18)Ma[c[(c[j>>2]|0)+8>>2]&127](j,-2,e);k=0;break a}else o=0.0;while(0);f[j+164>>2]=o;c[j+132>>2]=n;c[j+136>>2]=k;c[j+140>>2]=m;f[j+144>>2]=l;c[j+148>>2]=c[C+256>>2];c[j+148+4>>2]=c[C+256+4>>2];c[j+148+8>>2]=c[C+256+8>>2];c[j+148+12>>2]=c[C+256+12>>2];k=1}else k=0;while(0);D=k;ea=C;return D|0}function Sc(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0;E=ea;ea=ea+32|0;A=+f[b+48>>2]-+f[b+112>>2];h=+f[b+52>>2]-+f[b+116>>2];D=+f[b+56>>2]-+f[b+120>>2];B=A*+f[b+64>>2]+h*+f[b+80>>2]+D*+f[b+96>>2];C=A*+f[b+68>>2]+h*+f[b+84>>2]+D*+f[b+100>>2];D=A*+f[b+72>>2]+h*+f[b+88>>2]+D*+f[b+104>>2];e=c[a+8>>2]|0;z=c[a+4>>2]|0;h=+f[z+28>>2]*+f[z+12>>2];A=h+ +f[a+12>>2];o=+f[e+72>>2];p=+f[e+56>>2];q=+f[e+76>>2];r=+f[e+60>>2];t=+f[e+80>>2];u=+f[e+64>>2];v=+f[e+88>>2];w=+f[e+92>>2];x=+f[e+96>>2];j=(q-r)*(x-u)-(t-u)*(w-r);l=(t-u)*(v-p)-(o-p)*(x-u);n=(o-p)*(w-r)-(q-r)*(v-p);m=1.0/+s(+(n*n+(j*j+l*l)));i=(D-u)*(n*m)+((B-p)*(j*m)+(C-r)*(l*m));if(i<0.0){y=-i;k=-(j*m);i=-(l*m);j=-(n*m)}else{y=i;k=j*m;i=l*m;j=n*m}if(!(y0.0&(n>0.0&t>0.0)|x<=0.0&(n<=0.0&t<=0.0))){if((ra[c[(c[e>>2]|0)+100>>2]&127](e)|0)<=0){ea=E;return}n=0.0;m=0.0;l=0.0;e=0;z=0;do{F=c[a+8>>2]|0;Pa[c[(c[F>>2]|0)+104>>2]&127](F,z,E+16|0,E);o=+f[E+16>>2];w=+f[E+16+4>>2];u=+f[E+16+8>>2];t=+f[E>>2]-o;x=+f[E+4>>2]-w;v=+f[E+8>>2]-u;do if((B-o)*t+(C-w)*x+(D-u)*v>0.0)if((B-o)*t+(C-w)*x+(D-u)*v>2]|0}while((z|0)<(ra[c[(c[F>>2]|0)+100>>2]&127](F)|0));if(!(e&1)){ea=E;return}else{r=n;q=m;p=l;m=A*A}}else{r=B-y*k;q=D-y*j;p=C-y*i;m=A*A}n=B-r;o=C-p;l=D-q;if(!(n*n+o*o+l*l1.1920928955078125e-07){i=+s(+(n*n+o*o+l*l));h=h-i;k=n*(1.0/i);j=l*(1.0/i);i=o*(1.0/i)}h=-h;if(g){x=+f[b+64>>2];y=+f[b+68>>2];A=+f[b+72>>2];B=x*k+y*i+A*j;n=+f[b+80>>2];o=+f[b+84>>2];t=+f[b+88>>2];C=k*n+i*o+j*t;u=+f[b+96>>2];v=+f[b+100>>2];w=+f[b+104>>2];D=k*u+i*v+j*w;f[E+16>>2]=-B;f[E+16+4>>2]=-C;f[E+16+8>>2]=-D;f[E+16+12>>2]=0.0;C=r*n+p*o+q*t+ +f[b+116>>2]+C*h;D=r*u+p*v+q*w+ +f[b+120>>2]+D*h;f[E>>2]=r*x+p*y+q*A+ +f[b+112>>2]+B*h;f[E+4>>2]=C;f[E+8>>2]=D;f[E+12>>2]=0.0;Na[c[(c[d>>2]|0)+16>>2]&15](d,E+16|0,E,h);ea=E;return}else{F=c[(c[d>>2]|0)+16>>2]|0;y=+f[b+64>>2];A=+f[b+68>>2];B=+f[b+72>>2];u=+f[b+80>>2];v=+f[b+84>>2];C=+f[b+88>>2];w=+f[b+96>>2];x=+f[b+100>>2];D=+f[b+104>>2];f[E+16>>2]=y*k+A*i+B*j;f[E+16+4>>2]=k*u+i*v+j*C;f[E+16+8>>2]=k*w+i*x+j*D;f[E+16+12>>2]=0.0;C=r*u+p*v+q*C+ +f[b+116>>2];D=r*w+p*x+q*D+ +f[b+120>>2];f[E>>2]=r*y+p*A+q*B+ +f[b+112>>2];f[E+4>>2]=C;f[E+8>>2]=D;f[E+12>>2]=0.0;Na[F&15](d,E+16|0,E,h);ea=E;return}}function Tc(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;h=ea;ea=ea+768|0;j=c[(c[a>>2]|0)+8>>2]|0;i=NJ(b)|0;qs(h+736|0,i,i+4|0,i+8|0);dw(h+752|0,e,+f[h+736>>2],+f[h+736+4>>2],+f[h+736+8>>2]);d=NJ(d)|0;qs(h+704|0,d,i+4|0,i+8|0);dw(h+720|0,e,+f[h+704>>2],+f[h+704+4>>2],+f[h+704+8>>2]);Pa[j&127](a,h+752|0,h+720|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+672|0,d,i+4|0,i+8|0);dw(h+688|0,e,+f[h+672>>2],+f[h+672+4>>2],+f[h+672+8>>2]);qs(h+640|0,d,d+4|0,i+8|0);dw(h+656|0,e,+f[h+640>>2],+f[h+640+4>>2],+f[h+640+8>>2]);Pa[b&127](a,h+688|0,h+656|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+608|0,d,d+4|0,i+8|0);dw(h+624|0,e,+f[h+608>>2],+f[h+608+4>>2],+f[h+608+8>>2]);qs(h+576|0,i,d+4|0,i+8|0);dw(h+592|0,e,+f[h+576>>2],+f[h+576+4>>2],+f[h+576+8>>2]);Pa[b&127](a,h+624|0,h+592|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+544|0,i,d+4|0,i+8|0);dw(h+560|0,e,+f[h+544>>2],+f[h+544+4>>2],+f[h+544+8>>2]);qs(h+512|0,i,i+4|0,i+8|0);dw(h+528|0,e,+f[h+512>>2],+f[h+512+4>>2],+f[h+512+8>>2]);Pa[b&127](a,h+560|0,h+528|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+480|0,i,i+4|0,i+8|0);dw(h+496|0,e,+f[h+480>>2],+f[h+480+4>>2],+f[h+480+8>>2]);qs(h+448|0,i,i+4|0,d+8|0);dw(h+464|0,e,+f[h+448>>2],+f[h+448+4>>2],+f[h+448+8>>2]);Pa[b&127](a,h+496|0,h+464|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+416|0,d,i+4|0,i+8|0);dw(h+432|0,e,+f[h+416>>2],+f[h+416+4>>2],+f[h+416+8>>2]);qs(h+384|0,d,i+4|0,d+8|0);dw(h+400|0,e,+f[h+384>>2],+f[h+384+4>>2],+f[h+384+8>>2]);Pa[b&127](a,h+432|0,h+400|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+352|0,d,d+4|0,i+8|0);dw(h+368|0,e,+f[h+352>>2],+f[h+352+4>>2],+f[h+352+8>>2]);qs(h+320|0,d,d+4|0,d+8|0);dw(h+336|0,e,+f[h+320>>2],+f[h+320+4>>2],+f[h+320+8>>2]);Pa[b&127](a,h+368|0,h+336|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+288|0,i,d+4|0,i+8|0);dw(h+304|0,e,+f[h+288>>2],+f[h+288+4>>2],+f[h+288+8>>2]);qs(h+256|0,i,d+4|0,d+8|0);dw(h+272|0,e,+f[h+256>>2],+f[h+256+4>>2],+f[h+256+8>>2]);Pa[b&127](a,h+304|0,h+272|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+224|0,i,i+4|0,d+8|0);dw(h+240|0,e,+f[h+224>>2],+f[h+224+4>>2],+f[h+224+8>>2]);qs(h+192|0,d,i+4|0,d+8|0);dw(h+208|0,e,+f[h+192>>2],+f[h+192+4>>2],+f[h+192+8>>2]);Pa[b&127](a,h+240|0,h+208|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+160|0,d,i+4|0,d+8|0);dw(h+176|0,e,+f[h+160>>2],+f[h+160+4>>2],+f[h+160+8>>2]);qs(h+128|0,d,d+4|0,d+8|0);dw(h+144|0,e,+f[h+128>>2],+f[h+128+4>>2],+f[h+128+8>>2]);Pa[b&127](a,h+176|0,h+144|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+96|0,d,d+4|0,d+8|0);dw(h+112|0,e,+f[h+96>>2],+f[h+96+4>>2],+f[h+96+8>>2]);qs(h+64|0,i,d+4|0,d+8|0);dw(h+80|0,e,+f[h+64>>2],+f[h+64+4>>2],+f[h+64+8>>2]);Pa[b&127](a,h+112|0,h+80|0,g);b=c[(c[a>>2]|0)+8>>2]|0;qs(h+32|0,i,d+4|0,d+8|0);dw(h+48|0,e,+f[h+32>>2],+f[h+32+4>>2],+f[h+32+8>>2]);qs(h,i,i+4|0,d+8|0);dw(h+16|0,e,+f[h>>2],+f[h+4>>2],+f[h+8>>2]);Pa[b&127](a,h+48|0,h+16|0,g);ea=h;return}function Uc(b,d){b=b|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c[b>>2]=6336;c[6747]=(c[6747]|0)+1;e=kb(379)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}f[e+308>>2]=9.999999747378752e-05;l=e+332|0;a[l>>0]=a[l>>0]&-16;c[b+24>>2]=e;l=(c[d+20>>2]|0)==0;c[6747]=(c[6747]|0)+1;e=kb(23)|0;c[(e+4+15&-16)+-4>>2]=e;c[(e+4+15&-16)>>2]=l?10384:10432;c[b+28>>2]=e+4+15&-16;c[6747]=(c[6747]|0)+1;e=kb(43)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}k=c[b+24>>2]|0;l=c[b+28>>2]|0;a[e+4>>0]=0;c[e>>2]=7144;c[e+16>>2]=0;c[e+20>>2]=3;c[e+12>>2]=k;c[e+8>>2]=l;c[b+32>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6368;c[b+36>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6388;c[b+40>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6408;c[b+44>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6428;c[b+48>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6448;c[b+52>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6468;c[b+56>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6488;c[b+60>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6508;c[b+76>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e>>2]=6508;c[b+80>>2]=e;a[e+4>>0]=1;c[6747]=(c[6747]|0)+1;e=kb(27)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6528;c[b+72>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(35)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}a[e+4>>0]=0;c[e>>2]=6548;c[e+8>>2]=1;c[e+12>>2]=0;c[b+88>>2]=e;c[6747]=(c[6747]|0)+1;e=kb(35)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e>>2]=6548;c[e+8>>2]=1;c[e+12>>2]=0;c[b+84>>2]=e;a[e+4>>0]=1;l=c[d+16>>2]|0;l=(l|0)>80?l:80;e=c[d>>2]|0;if(!e){a[b+12>>0]=1;c[6747]=(c[6747]|0)+1;e=kb(39)|0;if(!e)k=0;else{c[(e+4+15&-16)+-4>>2]=e;k=e+4+15&-16}e=c[d+8>>2]|0;c[k>>2]=772;g=k+4|0;c[g>>2]=e;c[6747]=(c[6747]|0)+1;e=kb((e*772|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[k+16>>2]=e;c[k+12>>2]=e;g=c[g>>2]|0;c[k+8>>2]=g;if(g+-1|0){h=c[k>>2]|0;i=g+-1|0;j=e;do{m=j;j=j+h|0;c[m>>2]=j;i=i+-1|0}while((i|0)!=0);e=e+(z(h,g+-1|0)|0)|0}c[e>>2]=0;c[b+8>>2]=k}else{a[b+12>>0]=0;c[b+8>>2]=e}e=c[d+4>>2]|0;if(e|0){a[b+20>>0]=0;c[b+16>>2]=e;return}a[b+20>>0]=1;c[6747]=(c[6747]|0)+1;e=kb(39)|0;if(!e)k=0;else{c[(e+4+15&-16)+-4>>2]=e;k=e+4+15&-16}e=c[d+12>>2]|0;c[k>>2]=l;g=k+4|0;c[g>>2]=e;e=z(e,l)|0;c[6747]=(c[6747]|0)+1;e=kb(e+19|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[k+16>>2]=e;c[k+12>>2]=e;g=c[g>>2]|0;c[k+8>>2]=g;if(g+-1|0){h=c[k>>2]|0;i=g+-1|0;j=e;do{m=j;j=j+h|0;c[m>>2]=j;i=i+-1|0}while((i|0)!=0);e=e+(z(h,g+-1|0)|0)|0}c[e>>2]=0;c[b+16>>2]=k;return}function Vc(b,d,e,g,h,i,j,k){b=b|0;d=d|0;e=e|0;g=g|0;h=+h;i=+i;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;v=ea;ea=ea+288|0;c[v+208>>2]=c[d>>2];c[v+208+4>>2]=c[d+4>>2];c[v+208+8>>2]=c[d+8>>2];c[v+208+12>>2]=c[d+12>>2];n=v+208+16|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2];d=v+208+32|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];p=c[j>>2]|0;q=c[j+4>>2]|0;r=c[j+8>>2]|0;s=c[j+16>>2]|0;t=c[j+12>>2]|0;o=c[j+20>>2]|0;c[v+156>>2]=c[v+208>>2];c[v+156+4>>2]=c[v+208+4>>2];c[v+156+8>>2]=c[v+208+8>>2];c[v+156+12>>2]=c[v+208+12>>2];c[v+172>>2]=c[n>>2];c[v+172+4>>2]=c[n+4>>2];c[v+172+8>>2]=c[n+8>>2];c[v+172+12>>2]=c[n+12>>2];c[v+188>>2]=c[d>>2];c[v+188+4>>2]=c[d+4>>2];c[v+188+8>>2]=c[d+8>>2];c[v+188+12>>2]=c[d+12>>2];d=c[b+136>>2]|0;if((d|0)==(c[b+140>>2]|0)?(u=(d|0)==0?1:d<<1,(d|0)<(u|0)):0){if(!u)g=0;else{c[6747]=(c[6747]|0)+1;d=kb((u*284|3)+16|0)|0;if(!d)g=0;else{c[(d+4+15&-16)+-4>>2]=d;g=d+4+15&-16}d=c[b+136>>2]|0}if((d|0)>0){j=0;do{e=c[b+144>>2]|0;l=g+(j*284|0)|0;m=e+(j*284|0)|0;n=l+92|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));l=g+(j*284|0)+92|0;m=e+(j*284|0)+92|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];l=e+(j*284|0)+108|0;m=g+(j*284|0)+108|0;c[m>>2]=c[l>>2];c[m+4>>2]=c[l+4>>2];c[m+8>>2]=c[l+8>>2];c[m+12>>2]=c[l+12>>2];m=e+(j*284|0)+124|0;l=g+(j*284|0)+124|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];l=g+(j*284|0)+140|0;m=e+(j*284|0)+140|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];l=g+(j*284|0)+156|0;m=e+(j*284|0)+156|0;n=l+128|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));j=j+1|0}while((j|0)!=(d|0))}d=c[b+144>>2]|0;if(d|0){if(a[b+148>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+144>>2]=0}a[b+148>>0]=1;c[b+144>>2]=g;c[b+140>>2]=u;d=c[b+136>>2]|0}g=c[b+144>>2]|0;l=g+(d*284|0)|0;m=v;n=l+92|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));l=g+(d*284|0)+92|0;c[l>>2]=c[v+92>>2];c[l+4>>2]=c[v+92+4>>2];c[l+8>>2]=c[v+92+8>>2];c[l+12>>2]=c[v+92+12>>2];l=g+(d*284|0)+108|0;c[l>>2]=c[v+108>>2];c[l+4>>2]=c[v+108+4>>2];c[l+8>>2]=c[v+108+8>>2];c[l+12>>2]=c[v+108+12>>2];l=g+(d*284|0)+124|0;c[l>>2]=c[v+124>>2];c[l+4>>2]=c[v+124+4>>2];c[l+8>>2]=c[v+124+8>>2];c[l+12>>2]=c[v+124+12>>2];l=g+(d*284|0)+140|0;c[l>>2]=c[v+140>>2];c[l+4>>2]=c[v+140+4>>2];c[l+8>>2]=c[v+140+8>>2];c[l+12>>2]=c[v+140+12>>2];d=g+(d*284|0)+156|0;l=d;m=v+156|0;n=l+48|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));f[d+48>>2]=h;c[d+52>>2]=t;f[d+56>>2]=i;c[d+60>>2]=p;c[d+64>>2]=q;c[d+68>>2]=r;c[d+72>>2]=s;f[d+76>>2]=0.0;f[d+80>>2]=0.0;f[d+84>>2]=0.0;f[d+88>>2]=.10000000149011612;c[d+92>>2]=o;f[d+96>>2]=0.0;f[d+100>>2]=0.0;a[d+104>>0]=k&1;l=d+105|0;m=v+256|0;n=l+23|0;do{a[l>>0]=a[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));k=c[b+136>>2]|0;c[b+136>>2]=k+1;k=(c[b+144>>2]|0)+(k*284|0)|0;Yf(c[b+116>>2]|0,k,0);ud(c[b+116>>2]|0,c[b+144>>2]|0,(c[b+136>>2]|0)+-1|0,0);ea=v;return k|0}function Wc(d,g,h,i){d=d|0;g=g|0;h=h|0;i=i|0;var 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.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0;v=ea;ea=ea+80|0;u=c[d+48>>2]|0;c[v>>2]=8076;c[v+4>>2]=u;c[v+8>>2]=g;u=c[d+52>>2]|0;if(!(a[u+60>>0]|0)){g=c[u+56>>2]|0;if((g|0)>0){d=g;n=0;o=c[u+96>>2]|0;g=0;while(1){g=g+1|0;if(!(+f[h>>2]>+f[o+16>>2])?!(+f[i>>2]<+f[o>>2]):0)j=1;else j=0;if(!(!(+f[h+8>>2]>+f[o+24>>2])?!(+f[i+8>>2]<+f[o+8>>2]):0))j=0;if(!(+f[h+4>>2]>+f[o+20>>2])?!(+f[i+4>>2]<+f[o+4>>2]):0){k=c[o+32>>2]|0;if(j&(k|0)==-1){Ma[c[(c[v>>2]|0)+8>>2]&127](v,c[o+36>>2]|0,c[o+40>>2]|0);d=c[u+56>>2]|0;m=44}else{l=k;k=(k|0)==-1;m=43}}else{k=c[o+32>>2]|0;l=k;k=(k|0)==-1;j=0;m=43}if((m|0)==43){m=0;if(k|j)m=44;else{k=l+n|0;j=o+(l<<6)|0}}if((m|0)==44){k=n+1|0;j=o+64|0}if((k|0)<(d|0)){n=k;o=j}else break}}else g=0;if((c[6727]|0)>=(g|0)){ea=v;return}c[6727]=g;ea=v;return}x=+f[h>>2];B=+f[h+4>>2];F=+f[h+8>>2];E=+f[u+4>>2];x=x>2];B=B>2];F=F>2];C=+f[u+24>>2];y=+f[u+28>>2];H=+f[u+36>>2];D=+f[u+40>>2];z=+f[u+44>>2];r=~~(((G>1]=r;s=~~(((C>1]=s;b[v+66+4>>1]=t;F=+f[i>>2];B=+f[i+4>>2];x=+f[i+8>>2];F=F>1]=i;p=~~(D*((C>1]=p;b[v+60+4>>1]=q;switch(c[u+144>>2]|0){case 0:{n=c[u+56>>2]|0;if((n|0)>0){d=0;j=c[u+136>>2]|0;g=0;do{g=g+1|0;l=((i&65535)>=(e[j>>1]|0)?(r&65535)<=(e[j+6>>1]|0):0)&(t&65535)<=(e[j+10>>1]|0)&(q&65535)>=(e[j+4>>1]|0)&(s&65535)<=(e[j+8>>1]|0)&(p&65535)>=(e[j+2>>1]|0);m=j+12|0;k=c[m>>2]|0;if((k|0)>-1&l)Ma[c[(c[v>>2]|0)+8>>2]&127](v,21?k>>>21:k,k&2097151);if(l|(k|0)>-1){d=d+1|0;j=j+16|0}else{u=c[m>>2]|0;d=d-u|0;j=j+(0-u<<4)|0}}while((d|0)<(n|0))}else g=0;if((c[6727]|0)<(g|0))c[6727]=g;break}case 1:{if((c[u+152>>2]|0)>0){h=0;do{g=c[u+160>>2]|0;if(((i&65535)>=(e[g+(h<<5)>>1]|0)?(r&65535)<=(e[g+(h<<5)+6>>1]|0):0)&(t&65535)<=(e[g+(h<<5)+10>>1]|0)&(q&65535)>=(e[g+(h<<5)+4>>1]|0)&(s&65535)<=(e[g+(h<<5)+8>>1]|0)&(p&65535)>=(e[g+(h<<5)+2>>1]|0)){o=c[g+(h<<5)+12>>2]|0;n=c[g+(h<<5)+16>>2]|0;a:do if((n|0)>0){d=o;j=(c[u+136>>2]|0)+(o<<4)|0;g=0;while(1){g=g+1|0;l=((i&65535)>=(e[j>>1]|0)?(r&65535)<=(e[j+6>>1]|0):0)&(t&65535)<=(e[j+10>>1]|0)&(q&65535)>=(e[j+4>>1]|0)&(s&65535)<=(e[j+8>>1]|0)&(p&65535)>=(e[j+2>>1]|0);m=j+12|0;k=c[m>>2]|0;if((k|0)>-1&l)Ma[c[(c[v>>2]|0)+8>>2]&127](v,21?k>>>21:k,k&2097151);if(l|(k|0)>-1){d=d+1|0;j=j+16|0}else{m=c[m>>2]|0;d=d-m|0;j=j+(0-m<<4)|0}if((d|0)>=(n+o|0))break a}}else g=0;while(0);if((c[6727]|0)<(g|0))c[6727]=g}h=h+1|0}while((h|0)<(c[u+152>>2]|0))}break}case 2:{Pj(c[u+136>>2]|0,v,v+66|0,v+60|0);break}default:{}}ea=v;return}function Xc(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((h|0)<0){h=c[b+8>>2]|0;+qa[c[(c[h>>2]|0)+12>>2]&3](h,d,e,f,g,c[b+12>>2]|0,c[b+16>>2]|0,c[b+4>>2]|0,c[b+20>>2]|0,c[b+24>>2]|0);return}o=c[b+16>>2]|0;a:do if((o|0)>0){l=c[b+12>>2]|0;i=0;while(1){m=l+(i<<2)|0;k=c[m>>2]|0;j=c[(c[k+28>>2]|0)+208>>2]|0;if((j|0)<=-1)j=c[(c[k+32>>2]|0)+208>>2]|0;if((j|0)==(h|0))break a;i=i+1|0;if((i|0)>=(o|0)){m=0;break}}}else{i=0;m=0}while(0);if((i|0)<(o|0)){n=c[b+12>>2]|0;j=0;do{l=c[n+(i<<2)>>2]|0;k=c[(c[l+28>>2]|0)+208>>2]|0;if((k|0)<=-1)k=c[(c[l+32>>2]|0)+208>>2]|0;j=j+((k|0)==(h|0)&1)|0;i=i+1|0}while((i|0)!=(o|0));h=j}else h=0;i=c[b+4>>2]|0;if((c[i+72>>2]|0)<2){o=c[b+8>>2]|0;+qa[c[(c[o>>2]|0)+12>>2]&3](o,d,e,f,g,m,h,i,c[b+20>>2]|0,c[b+24>>2]|0);return}if((e|0)>0){j=c[b+32>>2]|0;i=c[b+36>>2]|0;o=0;do{n=d+(o<<2)|0;if((j|0)==(i|0)){l=(i|0)==0?1:i<<1;if((i|0)<(l|0)){if(!l)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((l<<2|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+32>>2]|0}if((i|0)>0){k=0;do{c[j+(k<<2)>>2]=c[(c[b+40>>2]|0)+(k<<2)>>2];k=k+1|0}while((k|0)!=(i|0))}k=c[b+40>>2]|0;if(k){if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);i=c[b+32>>2]|0}c[b+40>>2]=0}a[b+44>>0]=1;c[b+40>>2]=j;c[b+36>>2]=l;j=i;i=l}else j=i}c[(c[b+40>>2]|0)+(j<<2)>>2]=c[n>>2];j=j+1|0;c[b+32>>2]=j;o=o+1|0}while((o|0)!=(e|0))}if((g|0)>0){j=c[b+52>>2]|0;i=c[b+56>>2]|0;o=0;do{n=f+(o<<2)|0;if((j|0)==(i|0)){l=(i|0)==0?1:i<<1;if((i|0)<(l|0)){if(!l)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((l<<2|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+52>>2]|0}if((i|0)>0){k=0;do{c[j+(k<<2)>>2]=c[(c[b+60>>2]|0)+(k<<2)>>2];k=k+1|0}while((k|0)!=(i|0))}k=c[b+60>>2]|0;if(k){if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);i=c[b+52>>2]|0}c[b+60>>2]=0}a[b+64>>0]=1;c[b+60>>2]=j;c[b+56>>2]=l;j=i;i=l}else j=i}c[(c[b+60>>2]|0)+(j<<2)>>2]=c[n>>2];j=j+1|0;c[b+52>>2]=j;o=o+1|0}while((o|0)!=(g|0))}if(!h)i=c[b+72>>2]|0;else{i=c[b+72>>2]|0;j=c[b+76>>2]|0;o=0;do{n=m+(o<<2)|0;if((i|0)==(j|0)){l=(j|0)==0?1:j<<1;if((j|0)<(l|0)){if(!l){i=j;j=0}else{c[6747]=(c[6747]|0)+1;i=kb((l<<2|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+72>>2]|0}if((i|0)>0){k=0;do{c[j+(k<<2)>>2]=c[(c[b+80>>2]|0)+(k<<2)>>2];k=k+1|0}while((k|0)!=(i|0))}k=c[b+80>>2]|0;if(k){if(a[b+84>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);i=c[b+72>>2]|0}c[b+80>>2]=0}a[b+84>>0]=1;c[b+80>>2]=j;c[b+76>>2]=l;j=l}else i=j}c[(c[b+80>>2]|0)+(i<<2)>>2]=c[n>>2];i=i+1|0;c[b+72>>2]=i;o=o+1|0}while((o|0)!=(h|0))}if(((c[b+52>>2]|0)+i|0)<=(c[(c[b+4>>2]|0)+72>>2]|0))return;og(b);return}function Yc(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+24>>2]=d;f[b+28>>2]=0.0;c[b+32>>2]=0;c[b+36>>2]=1;f[b+40>>2]=1.0;a[b+44>>0]=1;c[b+48>>2]=0;a[b+52>>0]=0;a[b+53>>0]=1;a[b+54>>0]=1;f[b+56>>2]=.03999999910593033;a[b+60>>0]=0;f[b+64>>2]=0.0;c[b+68>>2]=e;c[b+72>>2]=0;a[b+76>>0]=1;c[b+80>>2]=0;c[b+84>>2]=0;c[b+88>>2]=0;f[b+92>>2]=.6000000238418579;f[b+96>>2]=1.0;f[b+100>>2]=.30000001192092896;f[b+104>>2]=.01666666753590107;f[b+108>>2]=0.0;f[b+116>>2]=20.0;c[b+112>>2]=10;f[b+124>>2]=.20000000298023224;f[b+128>>2]=.800000011920929;f[b+132>>2]=0.0;f[b+120>>2]=1.0;c[b+136>>2]=1;f[b+140>>2]=-.03999999910593033;f[b+144>>2]=.10000000149011612;f[b+148>>2]=0.0;f[b+152>>2]=.8500000238418579;c[b+156>>2]=260;c[b+160>>2]=2;c[b+164>>2]=128;f[b+168>>2]=100.0;f[b+172>>2]=1000000015047466219876688.0e6;c[b>>2]=5208;a[b+192>>0]=1;c[b+188>>2]=0;c[b+180>>2]=0;c[b+184>>2]=0;c[b+196>>2]=0;c[b+200>>2]=g;a[b+224>>0]=1;c[b+220>>2]=0;c[b+212>>2]=0;c[b+216>>2]=0;a[b+244>>0]=1;c[b+240>>2]=0;c[b+232>>2]=0;c[b+236>>2]=0;c[b+248>>2]=0;c[b+252>>2]=-1054867456;a[b+274>>0]=0;a[b+275>>0]=0;c[b+256>>2]=0;c[b+256+4>>2]=0;c[b+256+8>>2]=0;c[b+256+12>>2]=0;a[b+292>>0]=1;c[b+288>>2]=0;c[b+280>>2]=0;c[b+284>>2]=0;c[b+296>>2]=0;a[b+300>>0]=1;a[b+320>>0]=1;c[b+316>>2]=0;c[b+308>>2]=0;c[b+312>>2]=0;if(!g){c[6747]=(c[6747]|0)+1;g=kb(215)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}c[g>>2]=5872;a[g+20>>0]=1;c[g+16>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;a[g+40>>0]=1;c[g+36>>2]=0;c[g+28>>2]=0;c[g+32>>2]=0;a[g+60>>0]=1;c[g+56>>2]=0;c[g+48>>2]=0;c[g+52>>2]=0;a[g+80>>0]=1;c[g+76>>2]=0;c[g+68>>2]=0;c[g+72>>2]=0;a[g+100>>0]=1;c[g+96>>2]=0;c[g+88>>2]=0;c[g+92>>2]=0;a[g+120>>0]=1;c[g+116>>2]=0;c[g+108>>2]=0;c[g+112>>2]=0;a[g+140>>0]=1;c[g+136>>2]=0;c[g+128>>2]=0;c[g+132>>2]=0;a[g+160>>0]=1;c[g+156>>2]=0;c[g+148>>2]=0;c[g+152>>2]=0;a[g+180>>0]=1;c[g+176>>2]=0;c[g+168>>2]=0;c[g+172>>2]=0;c[g+192>>2]=0;c[b+200>>2]=g;g=1}else g=0;a[b+273>>0]=g;c[6747]=(c[6747]|0)+1;g=kb(87)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}c[g>>2]=6568;a[g+20>>0]=1;c[g+16>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;a[g+40>>0]=1;c[g+36>>2]=0;c[g+28>>2]=0;c[g+32>>2]=0;a[g+60>>0]=1;c[g+56>>2]=0;c[g+48>>2]=0;c[g+52>>2]=0;a[g+64>>0]=1;c[b+204>>2]=g;a[b+272>>0]=1;c[6747]=(c[6747]|0)+1;g=kb(107)|0;if(!g){e=0;h=c[b+200>>2]|0;c[e>>2]=5420;g=e+4|0;c[g>>2]=0;g=e+8|0;c[g>>2]=h;g=e+12|0;c[g>>2]=0;g=e+16|0;c[g>>2]=0;g=e+20|0;c[g>>2]=0;g=e+24|0;c[g>>2]=d;d=e+44|0;a[d>>0]=1;d=e+40|0;c[d>>2]=0;d=e+32|0;c[d>>2]=0;d=e+36|0;c[d>>2]=0;d=e+64|0;a[d>>0]=1;d=e+60|0;c[d>>2]=0;d=e+52|0;c[d>>2]=0;d=e+56|0;c[d>>2]=0;d=e+84|0;a[d>>0]=1;d=e+80|0;c[d>>2]=0;d=e+72|0;c[d>>2]=0;d=e+76|0;c[d>>2]=0;c[b+196>>2]=e;return}c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16;g=c[b+200>>2]|0;c[h>>2]=5420;e=h+4|0;c[e>>2]=0;e=h+8|0;c[e>>2]=g;e=h+12|0;c[e>>2]=0;e=h+16|0;c[e>>2]=0;e=h+20|0;c[e>>2]=0;e=h+24|0;c[e>>2]=d;d=h+44|0;a[d>>0]=1;d=h+40|0;c[d>>2]=0;d=h+32|0;c[d>>2]=0;d=h+36|0;c[d>>2]=0;d=h+64|0;a[d>>0]=1;d=h+60|0;c[d>>2]=0;d=h+52|0;c[d>>2]=0;d=h+56|0;c[d>>2]=0;d=h+84|0;a[d>>0]=1;d=h+80|0;c[d>>2]=0;d=h+72|0;c[d>>2]=0;d=h+76|0;c[d>>2]=0;c[b+196>>2]=h;return}function Zc(b,d){b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0,j=0.0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0;t=ea;ea=ea+96|0;r=c[b+12>>2]|0;Pa[c[(c[r>>2]|0)+8>>2]&127](r,(c[b+8>>2]|0)+4|0,t+80|0,t+64|0);r=c[d+68>>2]|0;Ta[c[(c[r>>2]|0)+16>>2]&31](r,c[(c[b+8>>2]|0)+188>>2]|0,t+80|0,t+64|0,c[d+24>>2]|0);r=c[d+24>>2]|0;Pa[c[(c[r>>2]|0)+32>>2]&127](r,c[(c[b+8>>2]|0)+284>>2]|0,d+28|0,r);r=c[b+8>>2]|0;c[b+92>>2]=c[r+52>>2];c[b+92+4>>2]=c[r+52+4>>2];c[b+92+8>>2]=c[r+52+8>>2];c[b+92+12>>2]=c[r+52+12>>2];r=c[r+284>>2]|0;if((ra[c[(c[r>>2]|0)+36>>2]&127](r)|0)>0){r=0;h=0.0;d=0;do{e=c[b+132>>2]|0;if((e|0)<0){if((c[b+136>>2]|0)<0){g=c[b+140>>2]|0;if(g|0){if(a[b+144>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+140>>2]=0}a[b+144>>0]=1;c[b+140>>2]=0;c[b+136>>2]=0}do{c[(c[b+140>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[b+132>>2]=0;e=c[(c[b+8>>2]|0)+284>>2]|0;e=c[(ra[c[(c[e>>2]|0)+28>>2]&127](e)|0)+12>>2]|0;q=c[c[e+(r<<4)>>2]>>2]|0;g=c[c[e+(r<<4)+4>>2]>>2]|0;if(!((q|0)!=0?(c[q+204>>2]&4|0)!=0:0))s=15;do if((s|0)==15){s=0;if(g|0?c[g+204>>2]&4|0:0)break;e=c[e+(r<<4)+8>>2]|0;if(e|0)Ia[c[(c[e>>2]|0)+16>>2]&127](e,b+128|0);p=c[b+132>>2]|0;if((p|0)>0){n=c[b+140>>2]|0;o=c[b+8>>2]|0;q=0;do{l=c[n+(q<<2)>>2]|0;m=(c[l+740>>2]|0)==(o|0)?-1.0:1.0;e=c[l+748>>2]|0;if((e|0)>0){k=0;do{j=+f[l+4+(k*184|0)+80>>2];if(j<0.0){i=l+4+(k*184|0)+64|0;if(j>2];g=l+4+(k*184|0)+72|0;h=m*+f[g>>2];f[b+152>>2]=m*+f[i>>2];f[b+156>>2]=u;f[b+160>>2]=h;f[b+164>>2]=0.0;e=c[l+748>>2]|0;h=j}else{d=l+4+(k*184|0)+68|0;g=l+4+(k*184|0)+72|0}v=j*(m*+f[d>>2])*.20000000298023224;u=j*(m*+f[g>>2])*.20000000298023224;f[b+92>>2]=j*(m*+f[i>>2])*.20000000298023224+ +f[b+92>>2];f[b+96>>2]=v+ +f[b+96>>2];f[b+100>>2]=u+ +f[b+100>>2];d=1}k=k+1|0}while((k|0)<(e|0))}q=q+1|0}while((q|0)!=(p|0))}}while(0);r=r+1|0;q=c[(c[b+8>>2]|0)+284>>2]|0}while((r|0)<(ra[c[(c[q>>2]|0)+36>>2]&127](q)|0))}else d=0;s=c[b+8>>2]|0;c[t>>2]=c[s+4>>2];c[t+4>>2]=c[s+4+4>>2];c[t+8>>2]=c[s+4+8>>2];c[t+12>>2]=c[s+4+12>>2];c[t+16>>2]=c[s+20>>2];c[t+16+4>>2]=c[s+20+4>>2];c[t+16+8>>2]=c[s+20+8>>2];c[t+16+12>>2]=c[s+20+12>>2];c[t+32>>2]=c[s+36>>2];c[t+32+4>>2]=c[s+36+4>>2];c[t+32+8>>2]=c[s+36+8>>2];c[t+32+12>>2]=c[s+36+12>>2];c[t+48>>2]=c[b+92>>2];c[t+48+4>>2]=c[b+92+4>>2];c[t+48+8>>2]=c[b+92+8>>2];c[t+48+12>>2]=c[b+92+12>>2];c[s+260>>2]=(c[s+260>>2]|0)+1;c[s+4>>2]=c[t>>2];c[s+4+4>>2]=c[t+4>>2];c[s+4+8>>2]=c[t+8>>2];c[s+4+12>>2]=c[t+12>>2];c[s+20>>2]=c[t+16>>2];c[s+20+4>>2]=c[t+16+4>>2];c[s+20+8>>2]=c[t+16+8>>2];c[s+20+12>>2]=c[t+16+12>>2];c[s+36>>2]=c[t+32>>2];c[s+36+4>>2]=c[t+32+4>>2];c[s+36+8>>2]=c[t+32+8>>2];c[s+36+12>>2]=c[t+32+12>>2];c[s+52>>2]=c[t+48>>2];c[s+52+4>>2]=c[t+48+4>>2];c[s+52+8>>2]=c[t+48+8>>2];c[s+52+12>>2]=c[t+48+12>>2];ea=t;return d|0}function _c(b,d,e){b=b|0;d=+d;e=+e;var g=0,h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,t=0.0,u=0.0,v=0.0,w=0.0;r=ea;ea=ea+80|0;g=c[b+8>>2]|0;if(!g){g=c[b+4>>2]|0;if(!g){k=0.0;n=0.0;l=0.0;d=0.0;j=0.0;m=0.0}else{q=+f[g+336>>2];j=+f[b+172>>2];t=+f[g+340>>2];o=+f[b+168>>2];m=+f[b+164>>2];p=+f[g+332>>2];k=+f[g+316>>2];n=+f[g+320>>2];l=+f[g+324>>2];d=q*j-t*o;j=t*m-j*p;m=o*p-q*m}}else{t=+f[g+332>>2];j=+f[b+172>>2];o=+f[g+336>>2];p=+f[b+168>>2];m=+f[b+164>>2];q=+f[g+328>>2];k=+f[g+312>>2];n=+f[g+316>>2];l=+f[g+320>>2];d=t*j-o*p;j=o*m-j*q;m=p*q-t*m}o=k+d;q=n+j;p=l+m;g=c[b+20>>2]|0;if(!g){g=c[b+16>>2]|0;if(!g){k=0.0;m=0.0;l=0.0;d=0.0;j=0.0;n=0.0}else{t=+f[g+336>>2];j=+f[b+188>>2];w=+f[g+340>>2];v=+f[b+184>>2];n=+f[b+180>>2];u=+f[g+332>>2];k=+f[g+316>>2];m=+f[g+320>>2];l=+f[g+324>>2];d=t*j-w*v;j=w*n-j*u;n=v*u-t*n}}else{w=+f[g+332>>2];j=+f[b+188>>2];t=+f[g+336>>2];u=+f[b+184>>2];n=+f[b+180>>2];v=+f[g+328>>2];k=+f[g+312>>2];m=+f[g+316>>2];l=+f[g+320>>2];d=w*j-t*u;j=t*n-j*v;n=u*v-w*n}o=o-(k+d);m=q-(m+j);l=p-(l+n);d=+f[b+196>>2];j=+f[b+200>>2];k=+f[b+204>>2];a[r+36+32>>0]=1;c[r+36+16>>2]=0;c[r+36+16+4>>2]=0;c[r+36+16+8>>2]=0;c[r+36+16+12>>2]=0;c[r+36>>2]=c[b+72>>2];c[r+36+4>>2]=c[b+72+4>>2];c[r+36+8>>2]=c[b+72+8>>2];c[r+36+12>>2]=c[b+72+12>>2];if(d*o+m*j+l*k<0.0){u=+f[b+212>>2];v=+f[r+36>>2]+(d*(d*o+m*j+l*k)+(o-d*(d*o+m*j+l*k))*u);f[r+36>>2]=v;w=j*(d*o+m*j+l*k)+(m-j*(d*o+m*j+l*k))*u+ +f[r+36+4>>2];f[r+36+4>>2]=w;k=k*(d*o+m*j+l*k)+(l-k*(d*o+m*j+l*k))*u+ +f[r+36+8>>2];f[r+36+8>>2]=k;d=v;j=w;g=r+36+8|0;h=r+36|0;i=r+36+4|0}else{d=+f[r+36>>2];j=+f[r+36+4>>2];k=+f[r+36+8>>2];g=r+36+8|0;h=r+36|0;i=r+36+4|0}l=(+f[b+104>>2]*d+ +f[b+108>>2]*j+ +f[b+112>>2]*k)*e;m=(d*+f[b+120>>2]+j*+f[b+124>>2]+k*+f[b+128>>2])*e;d=(d*+f[b+136>>2]+j*+f[b+140>>2]+k*+f[b+144>>2])*e;f[h>>2]=l;f[i>>2]=m;f[g>>2]=d;f[r+36+12>>2]=0.0;g=c[b+4>>2]|0;if((g|0)!=(c[b+16>>2]|0)){g=r;h=r+36|0;i=g+36|0;do{c[g>>2]=c[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));w=-+f[r+4>>2];v=-+f[r+8>>2];f[r>>2]=-+f[r>>2];f[r+4>>2]=w;f[r+8>>2]=v;f[r+12>>2]=0.0;v=-+f[r+20>>2];w=-+f[r+24>>2];f[r+16>>2]=-+f[r+16>>2];f[r+20>>2]=v;f[r+24>>2]=w;f[r+28>>2]=0.0;Yg(b+4|0,r,b+164|0);Yg(b+16|0,r+36|0,b+180|0);ea=r;return}if(!(l==l&m==m&(d==d&0.0==0.0))){ea=r;return}w=+s(+(l*l+m*m+d*d));if(w<+f[g+368>>2]){ea=r;return}h=c[r+36+32>>2]|0;w=+f[g+372>>2];f[r+12>>2]=0.0;f[r+28>>2]=0.0;c[r+32>>2]=h;f[r>>2]=-(l*w);f[r+4>>2]=-(m*w);f[r+8>>2]=-(d*w);f[r+16>>2]=w*-0.0;f[r+20>>2]=w*-0.0;f[r+24>>2]=w*-0.0;Yg(b+4|0,r,b+164|0);d=+f[(c[b+4>>2]|0)+372>>2];g=r;h=r+36|0;i=g+36|0;do{c[g>>2]=c[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));f[r>>2]=d*+f[r>>2];f[r+4>>2]=d*+f[r+4>>2];f[r+8>>2]=d*+f[r+8>>2];f[r+16>>2]=d*+f[r+16>>2];f[r+20>>2]=d*+f[r+20>>2];f[r+24>>2]=d*+f[r+24>>2];Yg(b+16|0,r,b+180|0);ea=r;return}function $c(d,e,g,h,i){d=d|0;e=e|0;g=+g;h=+h;i=+i;var j=0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0;m=ea;ea=ea+240|0;k=+f[d+96>>2]+h;l=+f[d+100>>2]+i;f[d+112>>2]=+f[d+92>>2]+g;f[d+116>>2]=k;f[d+120>>2]=l;f[d+124>>2]=0.0;c[m+168>>2]=1065353216;c[m+168+4>>2]=0;c[m+168+4+4>>2]=0;c[m+168+4+8>>2]=0;c[m+168+4+12>>2]=0;c[m+168+20>>2]=1065353216;c[m+168+24>>2]=0;c[m+168+24+4>>2]=0;c[m+168+24+8>>2]=0;c[m+168+24+12>>2]=0;c[m+168+40>>2]=1065353216;j=m+168+44|0;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]=0;c[m+104>>2]=1065353216;c[m+104+4>>2]=0;c[m+104+4+4>>2]=0;c[m+104+4+8>>2]=0;c[m+104+4+12>>2]=0;c[m+104+20>>2]=1065353216;c[m+104+24>>2]=0;c[m+104+24+4>>2]=0;c[m+104+24+8>>2]=0;c[m+104+24+12>>2]=0;c[m+104+40>>2]=1065353216;j=m+104+44|0;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]=0;l=1.0;j=10;while(1){if(!j){j=15;break}j=j+-1|0;c[m+168+48>>2]=c[d+92>>2];c[m+168+48+4>>2]=c[d+92+4>>2];c[m+168+48+8>>2]=c[d+92+8>>2];c[m+168+48+12>>2]=c[d+92+12>>2];c[m+104+48>>2]=c[d+112>>2];c[m+104+48+4>>2]=c[d+112+4>>2];c[m+104+48+8>>2]=c[d+112+8>>2];c[m+104+48+12>>2]=c[d+112+12>>2];i=+f[d+92>>2]-+f[d+112>>2];k=+f[d+96>>2]-+f[d+116>>2];g=+f[d+100>>2]-+f[d+120>>2];n=c[d+8>>2]|0;f[m+4>>2]=1.0;c[m+76>>2]=0;c[m+12>>2]=0;c[m+12+4>>2]=0;c[m+12+8>>2]=0;c[m+12+12>>2]=0;c[m+12+16>>2]=0;c[m+12+20>>2]=0;c[m+12+24>>2]=0;c[m+12+28>>2]=0;c[m>>2]=6052;c[m+80>>2]=n;f[m+84>>2]=i;f[m+88>>2]=k;f[m+92>>2]=g;f[m+96>>2]=0.0;f[m+100>>2]=0.0;n=c[n+188>>2]|0;b[m+8>>1]=b[n+4>>1]|0;b[m+10>>1]=b[n+6>>1]|0;n=c[d+12>>2]|0;g=+ha[c[(c[n>>2]|0)+48>>2]&15](n);n=c[d+12>>2]|0;Da[c[(c[n>>2]|0)+44>>2]&31](n,g+ +f[d+56>>2]);if(!(a[d+170>>0]|0))Gc(e,c[d+12>>2]|0,m+168|0,m+104|0,m,+f[e+56>>2]);else mc(c[d+8>>2]|0,c[d+12>>2]|0,m+168|0,m+104|0,m,+f[e+56>>2]);n=c[d+12>>2]|0;Da[c[(c[n>>2]|0)+44>>2]&31](n,g);k=+f[m+4>>2];l=l-k;if(k<1.0){h=+f[d+112>>2]-+f[d+92>>2];k=+f[d+116>>2]-+f[d+96>>2];i=+f[d+120>>2]-+f[d+100>>2];g=+s(+(h*h+k*k+i*i));if(g>1.1920928955078125e-07){o=+f[m+44>>2];u=+f[m+48>>2];q=+f[m+52>>2];t=(h*(1.0/g)*o+k*(1.0/g)*u+i*(1.0/g)*q)*2.0;r=1.0/+s(+((i*(1.0/g)-q*t)*(i*(1.0/g)-q*t)+((h*(1.0/g)-o*t)*(h*(1.0/g)-o*t)+(k*(1.0/g)-u*t)*(k*(1.0/g)-u*t))));p=q*((i*(1.0/g)-q*t)*r)+(o*((h*(1.0/g)-o*t)*r)+u*((k*(1.0/g)-u*t)*r));c[d+112>>2]=c[d+92>>2];c[d+112+4>>2]=c[d+92+4>>2];c[d+112+8>>2]=c[d+92+8>>2];c[d+112+12>>2]=c[d+92+12>>2];o=g*((h*(1.0/g)-o*t)*r-o*p)+ +f[d+112>>2];f[d+112>>2]=o;h=g*((k*(1.0/g)-u*t)*r-u*p)+ +f[d+116>>2];f[d+116>>2]=h;i=g*((i*(1.0/g)-q*t)*r-q*p)+ +f[d+120>>2];f[d+120>>2]=i;g=o}else{g=+f[d+112>>2];h=+f[d+116>>2];i=+f[d+120>>2]}k=g-+f[d+92>>2];h=h-+f[d+96>>2];g=i-+f[d+100>>2];if(!(k*k+h*h+g*g>1.1920928955078125e-07)){j=13;break}u=1.0/+s(+(k*k+h*h+g*g));if(k*u*+f[d+76>>2]+h*u*+f[d+80>>2]+g*u*+f[d+84>>2]<=0.0){j=13;break}}else{c[d+92>>2]=c[d+112>>2];c[d+92+4>>2]=c[d+112+4>>2];c[d+92+8>>2]=c[d+112+8>>2];c[d+92+12>>2]=c[d+112+12>>2]}if(!(l>.009999999776482582)){j=15;break}}if((j|0)==13){ea=m;return}else if((j|0)==15){ea=m;return}}function ad(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0.0;r=ea;ea=ea+48|0;c[r+16>>2]=c[e>>2];c[r+16+4>>2]=c[e+4>>2];c[r+16+8>>2]=c[e+8>>2];c[r+16+12>>2]=c[e+12>>2];c[r+16+16>>2]=c[g>>2];c[r+16+16+4>>2]=c[g+4>>2];c[r+16+16+8>>2]=c[g+8>>2];c[r+16+16+12>>2]=c[g+12>>2];do if((c[d+60>>2]|0)==2){h=c[d+48>>2]|0;jg(b+64|0,h)|0;i=c[b+68>>2]|0;if(i|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+68>>2]=h;c[b+76>>2]=(c[b+76>>2]|0)+-1;h=c[b+8>>2]|0;if(!h){c[6747]=(c[6747]|0)+1;h=kb(63)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=h;j=i+44|0;do{c[i>>2]=0;i=i+4|0}while((i|0)<(j|0))}else c[b+8>>2]=0;c[h+32>>2]=0;c[h+36>>2]=d;c[h+40>>2]=0;c[h>>2]=c[r+16>>2];c[h+4>>2]=c[r+16+4>>2];c[h+8>>2]=c[r+16+8>>2];c[h+12>>2]=c[r+16+12>>2];c[h+16>>2]=c[r+16+16>>2];c[h+20>>2]=c[r+16+20>>2];c[h+24>>2]=c[r+16+24>>2];c[h+28>>2]=c[r+16+28>>2];je(b+4|0,c[b+4>>2]|0,h);c[b+16>>2]=(c[b+16>>2]|0)+1;c[d+48>>2]=h;j=1}else{c[b+168>>2]=(c[b+168>>2]|0)+1;q=c[d+48>>2]|0;if(((((+f[q>>2]<=+f[r+16+16>>2]?+f[q+16>>2]>=+f[r+16>>2]:0)?+f[q+4>>2]<=+f[r+16+20>>2]:0)?+f[q+20>>2]>=+f[r+16+4>>2]:0)?+f[q+8>>2]<=+f[r+16+24>>2]:0)?+f[q+24>>2]>=+f[r+16+8>>2]:0){l=+f[d+16>>2];s=+f[e>>2]-l;m=+f[d+20>>2];p=+f[e+4>>2]-m;n=+f[d+24>>2];o=+f[e+8>>2]-n;t=+f[b+140>>2];l=(+f[d+32>>2]-l)*.5*t;m=t*((+f[d+36>>2]-m)*.5);n=t*((+f[d+40>>2]-n)*.5);f[r>>2]=l;f[r+4>>2]=m;f[r+8>>2]=n;f[r+12>>2]=0.0;if(s<0.0)f[r>>2]=-l;if(p<0.0)f[r+4>>2]=-m;if(o<0.0)f[r+8>>2]=-n;if(rg(b+4|0,q,r+16|0,r,.05000000074505806)|0){c[b+172>>2]=(c[b+172>>2]|0)+1;h=1}else h=0;j=h;break}h=jg(b+4|0,q)|0;a:do if(h){j=c[b+12>>2]|0;if((j|0)<=-1){h=c[b+4>>2]|0;break}if(j){k=0;i=h;while(1){h=c[i+32>>2]|0;k=k+1|0;if(!h){h=i;break a}if((k|0)>=(j|0))break;else i=h}}}else h=0;while(0);c[q>>2]=c[r+16>>2];c[q+4>>2]=c[r+16+4>>2];c[q+8>>2]=c[r+16+8>>2];c[q+12>>2]=c[r+16+12>>2];c[q+16>>2]=c[r+16+16>>2];c[q+20>>2]=c[r+16+20>>2];c[q+24>>2]=c[r+16+24>>2];c[q+28>>2]=c[r+16+28>>2];je(b+4|0,h,q);c[b+172>>2]=(c[b+172>>2]|0)+1;j=1}while(0);h=c[d+52>>2]|0;if(!h)h=b+124+(c[d+60>>2]<<2)|0;else h=h+56|0;c[h>>2]=c[d+56>>2];h=c[d+56>>2]|0;if(h|0)c[h+52>>2]=c[d+52>>2];c[d+16>>2]=c[e>>2];c[d+16+4>>2]=c[e+4>>2];c[d+16+8>>2]=c[e+8>>2];c[d+16+12>>2]=c[e+12>>2];c[d+32>>2]=c[g>>2];c[d+32+4>>2]=c[g+4>>2];c[d+32+8>>2]=c[g+8>>2];c[d+32+12>>2]=c[g+12>>2];h=c[b+144>>2]|0;c[d+60>>2]=h;c[d+52>>2]=0;c[d+56>>2]=c[b+124+(h<<2)>>2];i=c[b+124+(h<<2)>>2]|0;if(i|0)c[i+52>>2]=d;c[b+124+(h<<2)>>2]=d;if(!j){ea=r;return}a[b+194>>0]=1;if(a[b+193>>0]|0){ea=r;return}c[r>>2]=10216;c[r+4>>2]=b;md(b+64|0,c[b+64>>2]|0,c[d+48>>2]|0,r);md(b+4|0,c[b+4>>2]|0,c[d+48>>2]|0,r);ea=r;return}function bd(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var i=0.0,j=0.0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0;x=+f[a>>2];y=+f[b>>2];z=+f[a+4>>2];A=+f[b+4>>2];B=+f[a+8>>2];C=+f[b+8>>2];D=+f[d>>2];E=+f[d+4>>2];F=+f[d+8>>2];G=(z-A)*(C-F)-(B-C)*(A-E);H=(B-C)*(y-D)-(x-y)*(C-F);I=(x-y)*(A-E)-(z-A)*(y-D);if(!(I*I+(G*G+H*H)>0.0)){I=-1.0;return +I}if(x*(I*(z-A)-H*(B-C))+z*(G*(B-C)-I*(x-y))+(H*(x-y)-G*(z-A))*B>0.0){do if((y-x)*(y-x)+(A-z)*(A-z)+(C-B)*(C-B)>0.0){j=-(x*(y-x)+z*(A-z)+B*(C-B))/((y-x)*(y-x)+(A-z)*(A-z)+(C-B)*(C-B));if(j>=1.0){i=y*y+A*A+C*C;m=2;l=0;k=1065353216;break}if(!(j<=0.0)){k=(f[h>>2]=j,c[h>>2]|0);i=(B+(C-B)*j)*(B+(C-B)*j)+((x+(y-x)*j)*(x+(y-x)*j)+(z+(A-z)*j)*(z+(A-z)*j));m=3;l=(f[h>>2]=1.0-j,c[h>>2]|0);break}else{i=x*x+z*z+B*B;m=1;l=1065353216;k=0;break}}else{i=-1.0;m=0;l=0;k=0}while(0);c[g>>2]=m;c[e>>2]=l;c[e+4>>2]=k;f[e+8>>2]=0.0;u=+f[b>>2];v=+f[b+4>>2];w=+f[b+8>>2]}else{u=y;v=A;w=C;i=-1.0;m=0;l=0;k=0}if(u*(I*(A-E)-H*(C-F))+v*(G*(C-F)-I*(y-D))+(H*(y-D)-G*(A-E))*w>0.0){j=+f[d>>2];q=j-u;o=+f[d+4>>2];t=o-v;p=+f[d+8>>2];r=p-w;do if(q*q+t*t+r*r>0.0){n=-(u*q+v*t+w*r)/(q*q+t*t+r*r);if(n>=1.0){j=j*j+o*o+p*p;m=2;l=0;k=1065353216;break}if(!(n<=0.0)){k=(f[h>>2]=n,c[h>>2]|0);u=u+q*n;j=v+t*n;w=w+r*n;j=w*w+(u*u+j*j);m=3;l=(f[h>>2]=1.0-n,c[h>>2]|0);break}else{j=u*u+v*v+w*w;m=1;l=1065353216;k=0;break}}else j=-1.0;while(0);if(i<0.0|j>2]=m<<1&6;c[e+4>>2]=l;c[e+8>>2]=k;f[e>>2]=0.0;i=j}}j=+f[d>>2];o=+f[d+4>>2];p=+f[d+8>>2];if(j*(I*(E-z)-H*(F-B))+o*(G*(F-B)-I*(D-x))+(H*(D-x)-G*(E-z))*p>0.0){q=+f[a>>2];r=+f[a+4>>2];t=+f[a+8>>2];do if((q-j)*(q-j)+(r-o)*(r-o)+(t-p)*(t-p)>0.0){n=-(j*(q-j)+o*(r-o)+p*(t-p))/((q-j)*(q-j)+(r-o)*(r-o)+(t-p)*(t-p));if(n>=1.0){j=q*q+r*r+t*t;m=2;l=0;k=1065353216;break}if(!(n<=0.0)){k=(f[h>>2]=n,c[h>>2]|0);j=(p+(t-p)*n)*(p+(t-p)*n)+((j+(q-j)*n)*(j+(q-j)*n)+(o+(r-o)*n)*(o+(r-o)*n));m=3;l=(f[h>>2]=1.0-n,c[h>>2]|0);break}else{j=j*j+o*o+p*p;m=1;l=1065353216;k=0;break}}else j=-1.0;while(0);if(i<0.0|j>2]=m<<2&4|(1?m>>>1:m)&1;c[e+8>>2]=l;c[e>>2]=k;f[e+4>>2]=0.0;i=j}}if(!(i<0.0)){I=i;return +I}v=+s(+(I*I+(G*G+H*H)));w=(G*+f[a>>2]+H*+f[a+4>>2]+I*+f[a+8>>2])/(I*I+(G*G+H*H));c[g>>2]=7;t=+f[b>>2]-G*w;r=+f[b+4>>2]-H*w;u=+f[b+8>>2]-I*w;C=+s(+(((y-D)*r-(A-E)*t)*((y-D)*r-(A-E)*t)+(((A-E)*u-(C-F)*r)*((A-E)*u-(C-F)*r)+((C-F)*t-(y-D)*u)*((C-F)*t-(y-D)*u))))/v;f[e>>2]=C;y=+f[d>>2]-G*w;u=+f[d+4>>2]-H*w;A=+f[d+8>>2]-I*w;F=+s(+(((D-x)*u-(E-z)*y)*((D-x)*u-(E-z)*y)+(((E-z)*A-(F-B)*u)*((E-z)*A-(F-B)*u)+((F-B)*y-(D-x)*A)*((F-B)*y-(D-x)*A))))/v;f[e+4>>2]=F;f[e+8>>2]=1.0-(C+F);I=I*w*(I*w)+(G*w*(G*w)+H*w*(H*w));return +I}function cd(b){b=b|0;var d=0.0,e=0,g=0,h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0;p=ea;ea=ea+80|0;if((ra[c[(c[b>>2]|0)+20>>2]&127](b)|0?(j=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,(ra[c[(c[j>>2]|0)+48>>2]&127](j)|0)&8|0):0)?(g=c[b+24>>2]|0,g=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0,c[p+64>>2]=1065353216,c[p+64+4>>2]=1065353216,c[p+64+8>>2]=0,f[p+64+12>>2]=0.0,(g|0)>0):0){i=0;do{h=c[b+24>>2]|0;h=ta[c[(c[h>>2]|0)+40>>2]&31](h,i)|0;e=c[h+748>>2]|0;if((e|0)>0){j=0;do{q=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Oa[c[(c[q>>2]|0)+32>>2]&1](q,h+4+(j*184|0)+32|0,h+4+(j*184|0)+64|0,+f[h+4+(j*184|0)+80>>2],c[h+4+(j*184|0)+148>>2]|0,p+64|0);j=j+1|0}while((j|0)!=(e|0))}i=i+1|0}while((i|0)!=(g|0))}if(!(ra[c[(c[b>>2]|0)+20>>2]&127](b)|0)){ea=p;return}q=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;if(!((ra[c[(c[q>>2]|0)+48>>2]&127](q)|0)&3)){ea=p;return}if((c[b+8>>2]|0)<=0){ea=p;return}j=0;do{i=c[(c[b+16>>2]|0)+(j<<2)>>2]|0;if(!(c[i+204>>2]&32)){if(ra[c[(c[b>>2]|0)+20>>2]&127](b)|0?(q=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,(ra[c[(c[q>>2]|0)+48>>2]&127](q)|0)&1|0):0){c[p+64>>2]=1065353216;c[p+64+4>>2]=1065353216;c[p+64+8>>2]=1065353216;f[p+64+12>>2]=0.0;switch(c[i+216>>2]|0){case 1:{e=1065353216;g=1065353216;h=1065353216;break}case 2:{e=0;g=1065353216;h=0;break}case 3:{e=1065353216;g=1065353216;h=0;break}case 4:{e=0;g=0;h=1065353216;break}case 5:{e=0;g=1065353216;h=1065353216;break}default:{e=0;g=0;h=1065353216}}c[p+64>>2]=h;c[p+64+4>>2]=g;c[p+64+8>>2]=e;f[p+64+12>>2]=0.0;Pa[c[(c[b>>2]|0)+28>>2]&127](b,i+4|0,c[i+192>>2]|0,p+64|0)}e=c[b+72>>2]|0;if(e|0?(ra[c[(c[e>>2]|0)+48>>2]&127](e)|0)&2|0:0){c[p+32>>2]=1065353216;c[p+32+4>>2]=0;c[p+32+8>>2]=0;f[p+32+12>>2]=0.0;q=c[i+192>>2]|0;Pa[c[(c[q>>2]|0)+8>>2]&127](q,i+4|0,p+64|0,p+48|0);f[p+64>>2]=+f[p+64>>2]+-.019999999552965164;f[p+64+4>>2]=+f[p+64+4>>2]+-.019999999552965164;f[p+64+8>>2]=+f[p+64+8>>2]+-.019999999552965164;f[p+48>>2]=+f[p+48>>2]+.019999999552965164;f[p+48+4>>2]=+f[p+48+4>>2]+.019999999552965164;f[p+48+8>>2]=+f[p+48+8>>2]+.019999999552965164;do if((a[b+44>>0]|0?(c[i+236>>2]|0)==2:0)?(c[i+204>>2]&3|0)==0:0){q=c[i+192>>2]|0;Pa[c[(c[q>>2]|0)+8>>2]&127](q,i+68|0,p+16|0,p);d=+f[p+16>>2]+-.019999999552965164;f[p+16>>2]=d;l=+f[p+16+4>>2]+-.019999999552965164;f[p+16+4>>2]=l;k=+f[p+16+8>>2]+-.019999999552965164;f[p+16+8>>2]=k;m=+f[p>>2]+.019999999552965164;f[p>>2]=m;o=+f[p+4>>2]+.019999999552965164;f[p+4>>2]=o;n=+f[p+8>>2]+.019999999552965164;f[p+8>>2]=n;if(d<+f[p+64>>2])f[p+64>>2]=d;if(l<+f[p+64+4>>2])f[p+64+4>>2]=l;if(k<+f[p+64+8>>2])f[p+64+8>>2]=k;d=+f[p+16+12>>2];if(d<+f[p+64+12>>2])f[p+64+12>>2]=d;if(+f[p+48>>2]>2]=m;if(+f[p+48+4>>2]>2]=o;if(+f[p+48+8>>2]>2]=n;d=+f[p+12>>2];if(!(+f[p+48+12>>2]>2]=d}while(0);q=c[b+72>>2]|0;Pa[c[(c[q>>2]|0)+52>>2]&127](q,p+64|0,p+48|0,p+32|0)}}j=j+1|0}while((j|0)<(c[b+8>>2]|0));ea=p;return}function dd(a,b,d){a=a|0;b=b|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;l=c[b>>2]|0;m=c[b+4>>2]|0;i=c[b+8>>2]|0;n=c[a+4>>2]|0;p=Vg(a,d,m,i)|0;c[p+12>>2]=c[b+12>>2];c[p+16>>2]=n+1;c[p+20>>2]=n+2;h=c[(c[a+12>>2]|0)+(c[b+12>>2]<<2)>>2]|0;e=c[h>>2]|0;f=c[h+4>>2]|0;do if((e|0)==(m|0)&(f|0)==(i|0)){e=2;o=2}else{if(!((e|0)==(i|0)&(f|0)==(m|0))){g=c[h+8>>2]|0;if((f|0)==(m|0)&(g|0)==(i|0)){e=0;o=2;break}if(!((f|0)==(i|0)&(g|0)==(m|0))){if(!((g|0)!=(m|0)|(e|0)==(i|0)^1)){e=1;o=2;break}if((g|0)!=(i|0)|(e|0)==(m|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=h+12+(e<<2)|0}while(0);if((o|0)==2)e=h+12+(e<<2)|0;c[e>>2]=n;k=Vg(a,d,i,l)|0;c[k+12>>2]=c[b+12+4>>2];c[k+16>>2]=n+2;c[k+20>>2]=n;h=c[(c[a+12>>2]|0)+(c[b+12+4>>2]<<2)>>2]|0;e=c[h>>2]|0;f=c[h+4>>2]|0;do if((e|0)==(i|0)&(f|0)==(l|0)){e=2;o=10}else{if(!((e|0)==(l|0)&(f|0)==(i|0))){g=c[h+8>>2]|0;if((f|0)==(i|0)&(g|0)==(l|0)){e=0;o=10;break}if(!((f|0)==(l|0)&(g|0)==(i|0))){if(!((g|0)!=(i|0)|(e|0)==(l|0)^1)){e=1;o=10;break}if((g|0)!=(l|0)|(e|0)==(i|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=h+12+(e<<2)|0}while(0);if((o|0)==10)e=h+12+(e<<2)|0;c[e>>2]=n+1;j=Vg(a,d,l,m)|0;c[j+12>>2]=c[b+12+8>>2];c[j+16>>2]=n;c[j+20>>2]=n+1;f=c[a+12>>2]|0;i=c[f+(c[b+12+8>>2]<<2)>>2]|0;e=c[i>>2]|0;g=c[i+4>>2]|0;do if((e|0)==(l|0)&(g|0)==(m|0)){e=2;o=18}else{if(!((e|0)==(m|0)&(g|0)==(l|0))){h=c[i+8>>2]|0;if((g|0)==(l|0)&(h|0)==(m|0)){e=0;o=18;break}if(!((g|0)==(m|0)&(h|0)==(l|0))){if(!((h|0)!=(l|0)|(e|0)==(m|0)^1)){e=1;o=18;break}if((h|0)!=(m|0)|(e|0)==(l|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=i+12+(e<<2)|0}while(0);if((o|0)==18)e=i+12+(e<<2)|0;c[e>>2]=n+2;e=c[f+(c[p+12>>2]<<2)>>2]|0;if(!(((c[e>>2]|0)!=(d|0)?(c[e+4>>2]|0)!=(d|0):0)?(c[e+8>>2]|0)!=(d|0):0)){jd(f,p,e);c[(c[a+12>>2]|0)+(c[p+24>>2]<<2)>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[p+-4>>2]|0);c[(c[a+12>>2]|0)+(c[e+24>>2]<<2)>>2]=0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}f=c[a+12>>2]|0}e=c[f+(c[k+12>>2]<<2)>>2]|0;if(!(((c[e>>2]|0)!=(d|0)?(c[e+4>>2]|0)!=(d|0):0)?(c[e+8>>2]|0)!=(d|0):0)){jd(f,k,e);c[(c[a+12>>2]|0)+(c[k+24>>2]<<2)>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);c[(c[a+12>>2]|0)+(c[e+24>>2]<<2)>>2]=0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}f=c[a+12>>2]|0}e=c[f+(c[j+12>>2]<<2)>>2]|0;if(((c[e>>2]|0)!=(d|0)?(c[e+4>>2]|0)!=(d|0):0)?(c[e+8>>2]|0)!=(d|0):0){a=f;d=b+24|0;d=c[d>>2]|0;d=a+(d<<2)|0;c[d>>2]=0;d=c[6748]|0;d=d+1|0;c[6748]=d;d=b+-4|0;d=c[d>>2]|0;uc(d);return}jd(f,j,e);c[(c[a+12>>2]|0)+(c[j+24>>2]<<2)>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);c[(c[a+12>>2]|0)+(c[e+24>>2]<<2)>>2]=0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a=c[a+12>>2]|0;d=b+24|0;d=c[d>>2]|0;d=a+(d<<2)|0;c[d>>2]=0;d=c[6748]|0;d=d+1|0;c[6748]=d;d=b+-4|0;d=c[d>>2]|0;uc(d);return}function ed(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0;o=ea;ea=ea+144|0;if((c[a+16>>2]|0)<=0){n=a+76|0;c[n>>2]=c[b>>2];c[n+4>>2]=c[b+4>>2];c[n+8>>2]=c[b+8>>2];c[n+12>>2]=c[b+12>>2];b=c[a>>2]|0;b=b+68|0;b=c[b>>2]|0;Ca[b&511](a);ea=o;return}l=o+16+16|0;k=o+16+32|0;n=o+16+48|0;m=0;do{j=c[a+24>>2]|0;i=j+(m*80|0)|0;c[o+16>>2]=c[i>>2];c[o+16+4>>2]=c[i+4>>2];c[o+16+8>>2]=c[i+8>>2];c[o+16+12>>2]=c[i+12>>2];i=j+(m*80|0)+16|0;c[l>>2]=c[i>>2];c[l+4>>2]=c[i+4>>2];c[l+8>>2]=c[i+8>>2];c[l+12>>2]=c[i+12>>2];i=j+(m*80|0)+32|0;c[k>>2]=c[i>>2];c[k+4>>2]=c[i+4>>2];c[k+8>>2]=c[i+8>>2];c[k+12>>2]=c[i+12>>2];i=j+(m*80|0)+48|0;c[n>>2]=c[i>>2];c[n+4>>2]=c[i+4>>2];c[n+8>>2]=c[i+8>>2];c[n+12>>2]=c[i+12>>2];j=c[j+(m*80|0)+64>>2]|0;j=ra[c[(c[j>>2]|0)+28>>2]&127](j)|0;c[o>>2]=c[j>>2];c[o+4>>2]=c[j+4>>2];c[o+8>>2]=c[j+8>>2];p=+f[o+4>>2]*+f[b+4>>2]/+f[a+80>>2];q=+f[o+8>>2]*+f[b+8>>2]/+f[a+84>>2];f[o>>2]=+f[o>>2]*+f[b>>2]/+f[a+76>>2];f[o+4>>2]=p;f[o+8>>2]=q;f[o+12>>2]=0.0;j=c[(c[a+24>>2]|0)+(m*80|0)+64>>2]|0;Ia[c[(c[j>>2]|0)+24>>2]&127](j,o);q=+f[o+16+52>>2]*+f[b+4>>2]/+f[a+80>>2];p=+f[o+16+56>>2]*+f[b+8>>2]/+f[a+84>>2];f[o+16+48>>2]=+f[n>>2]*+f[b>>2]/+f[a+76>>2];f[o+16+52>>2]=q;f[o+16+56>>2]=p;f[o+16+60>>2]=0.0;j=c[a+24>>2]|0;i=j+(m*80|0)|0;c[i>>2]=c[o+16>>2];c[i+4>>2]=c[o+16+4>>2];c[i+8>>2]=c[o+16+8>>2];c[i+12>>2]=c[o+16+12>>2];i=j+(m*80|0)+16|0;c[i>>2]=c[l>>2];c[i+4>>2]=c[l+4>>2];c[i+8>>2]=c[l+8>>2];c[i+12>>2]=c[l+12>>2];i=j+(m*80|0)+32|0;c[i>>2]=c[k>>2];c[i+4>>2]=c[k+4>>2];c[i+8>>2]=c[k+8>>2];c[i+12>>2]=c[k+12>>2];j=j+(m*80|0)+48|0;c[j>>2]=c[n>>2];c[j+4>>2]=c[n+4>>2];c[j+8>>2]=c[n+8>>2];c[j+12>>2]=c[n+12>>2];if(c[a+64>>2]|0){i=c[(c[a+24>>2]|0)+(m*80|0)+64>>2]|0;Pa[c[(c[i>>2]|0)+8>>2]&127](i,o+16|0,o+128|0,o+112|0);c[o+80>>2]=c[o+128>>2];c[o+80+4>>2]=c[o+128+4>>2];c[o+80+8>>2]=c[o+128+8>>2];c[o+80+12>>2]=c[o+128+12>>2];c[o+80+16>>2]=c[o+112>>2];c[o+80+16+4>>2]=c[o+112+4>>2];c[o+80+16+8>>2]=c[o+112+8>>2];c[o+80+16+12>>2]=c[o+112+12>>2];i=c[a+64>>2]|0;j=c[(c[a+24>>2]|0)+(m*80|0)+76>>2]|0;d=jg(i,j)|0;a:do if(d){g=c[i+8>>2]|0;if((g|0)<=-1){d=c[i>>2]|0;break}if(g){h=0;e=d;while(1){d=c[e+32>>2]|0;h=h+1|0;if(!d){d=e;break a}if((h|0)>=(g|0))break;else e=d}}}else d=0;while(0);c[j>>2]=c[o+80>>2];c[j+4>>2]=c[o+80+4>>2];c[j+8>>2]=c[o+80+8>>2];c[j+12>>2]=c[o+80+12>>2];c[j+16>>2]=c[o+80+16>>2];c[j+20>>2]=c[o+80+20>>2];c[j+24>>2]=c[o+80+24>>2];c[j+28>>2]=c[o+80+28>>2];je(i,d,j)}m=m+1|0}while((m|0)<(c[a+16>>2]|0));n=a+76|0;c[n>>2]=c[b>>2];c[n+4>>2]=c[b+4>>2];c[n+8>>2]=c[b+8>>2];c[n+12>>2]=c[b+12>>2];b=c[a>>2]|0;b=b+68|0;b=c[b>>2]|0;Ca[b&511](a);ea=o;return}function fd(d,g,h,i,j,k){d=d|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0.0,m=0.0,n=0.0;c[d>>2]=9896;b[d+4>>1]=-2;b[d+6>>1]=-1;c[d+92>>2]=j;c[d+96>>2]=0;a[d+100>>0]=0;c[d+104>>2]=0;c[d+108>>2]=0;if(!j){c[6747]=(c[6747]|0)+1;j=kb(95)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}Oh(j);c[d+92>>2]=j;a[d+100>>0]=1}if(!k){c[6747]=(c[6747]|0)+1;j=kb(43)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}k=j+4|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;c[k+12>>2]=0;c[k+16>>2]=0;c[j>>2]=9960;a[j+20>>0]=1;c[j+16>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[d+112>>2]=j;c[6747]=(c[6747]|0)+1;j=kb(215)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}_g(j,c[d+112>>2]|0);c[d+108>>2]=j;a[j+193>>0]=1}c[d+8>>2]=c[g>>2];c[d+8+4>>2]=c[g+4>>2];c[d+8+8>>2]=c[g+8>>2];c[d+8+12>>2]=c[g+12>>2];c[d+24>>2]=c[h>>2];c[d+24+4>>2]=c[h+4>>2];c[d+24+8>>2]=c[h+8>>2];c[d+24+12>>2]=c[h+12>>2];n=+(e[d+6>>1]|0);m=n/(+f[d+28>>2]-+f[d+12>>2]);l=n/(+f[d+32>>2]-+f[d+16>>2]);f[d+40>>2]=n/(+f[d+24>>2]-+f[d+8>>2]);f[d+44>>2]=m;f[d+48>>2]=l;f[d+52>>2]=0.0;g=i+1&65535;c[6747]=(c[6747]|0)+1;j=kb(g<<6|19)|0;if(!j)h=0;else{c[(j+4+15&-16)+-4>>2]=j;h=j+4+15&-16}if(i+1<<16>>16<<16>>16){k=h+(g<<6)|0;j=h;do{c[j>>2]=0;c[j+8>>2]=0;j=j+64|0}while((j|0)!=(k|0))}c[d+60>>2]=h;b[d+58>>1]=(i&65535)+1;b[d+56>>1]=0;b[d+64>>1]=1;if((i+1&65535)>1?(b[h+112>>1]=2,i+1<<16>>16<<16>>16!=2):0){j=2;do{i=j;j=j+1|0;b[h+(i<<6)+48>>1]=j}while((j|0)!=(g|0))}b[h+(g+-1<<6)+48>>1]=0;c[6747]=(c[6747]|0)+1;j=kb((g<<3|3)+16|0)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}c[d+80>>2]=j;c[d+68>>2]=j;c[6747]=(c[6747]|0)+1;j=kb((g<<3|3)+16|0)|0;if(!j)j=0;else{c[(j+4+15&-16)+-4>>2]=j;j=j+4+15&-16}c[d+84>>2]=j;c[d+72>>2]=j;c[6747]=(c[6747]|0)+1;j=kb((g<<3|3)+16|0)|0;if(!j){h=0;i=d+88|0;c[i>>2]=h;i=d+76|0;c[i>>2]=h;h=c[d+60>>2]|0;c[h>>2]=0;g=h+48|0;b[g>>1]=0;g=h+54|0;b[g>>1]=1;g=c[d+68>>2]|0;b[g>>1]=0;k=g+2|0;b[k>>1]=0;k=b[d+6>>1]|0;j=g+4|0;b[j>>1]=k;g=g+6|0;b[g>>1]=0;g=h+50|0;b[g>>1]=0;g=h+56|0;b[g>>1]=1;g=c[d+72>>2]|0;b[g>>1]=0;j=g+2|0;b[j>>1]=0;j=b[d+6>>1]|0;k=g+4|0;b[k>>1]=j;g=g+6|0;b[g>>1]=0;g=h+52|0;b[g>>1]=0;h=h+58|0;b[h>>1]=1;i=c[i>>2]|0;b[i>>1]=0;h=i+2|0;b[h>>1]=0;h=b[d+6>>1]|0;g=i+4|0;b[g>>1]=h;i=i+6|0;b[i>>1]=0;c[d>>2]=9832;return}c[(j+4+15&-16)+-4>>2]=j;h=j+4+15&-16;i=d+88|0;c[i>>2]=h;i=d+76|0;c[i>>2]=h;h=c[d+60>>2]|0;c[h>>2]=0;g=h+48|0;b[g>>1]=0;g=h+54|0;b[g>>1]=1;g=c[d+68>>2]|0;b[g>>1]=0;k=g+2|0;b[k>>1]=0;k=b[d+6>>1]|0;j=g+4|0;b[j>>1]=k;g=g+6|0;b[g>>1]=0;g=h+50|0;b[g>>1]=0;g=h+56|0;b[g>>1]=1;g=c[d+72>>2]|0;b[g>>1]=0;j=g+2|0;b[j>>1]=0;j=b[d+6>>1]|0;k=g+4|0;b[k>>1]=j;g=g+6|0;b[g>>1]=0;g=h+52|0;b[g>>1]=0;h=h+58|0;b[h>>1]=1;i=c[i>>2]|0;b[i>>1]=0;h=i+2|0;b[h>>1]=0;h=b[d+6>>1]|0;g=i+4|0;b[g>>1]=h;i=i+6|0;b[i>>1]=0;c[d>>2]=9832;return}function gd(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;Jk();c[b+4>>2]=6;c[b+8>>2]=-1;c[b+12>>2]=-1;f[b+16>>2]=3402823466385288598117041.0e14;a[b+20>>0]=1;a[b+21>>0]=0;c[b+24>>2]=-1;c[b+28>>2]=25640;c[b+32>>2]=d;f[b+36>>2]=0.0;f[b+40>>2]=.30000001192092896;c[b+44>>2]=0;c[b>>2]=5492;c[b+112>>2]=c[e>>2];c[b+112+4>>2]=c[e+4>>2];c[b+112+8>>2]=c[e+8>>2];c[b+112+12>>2]=c[e+12>>2];c[b+128>>2]=c[e+16>>2];c[b+128+4>>2]=c[e+16+4>>2];c[b+128+8>>2]=c[e+16+8>>2];c[b+128+12>>2]=c[e+16+12>>2];c[b+144>>2]=c[e+32>>2];c[b+144+4>>2]=c[e+32+4>>2];c[b+144+8>>2]=c[e+32+8>>2];c[b+144+12>>2]=c[e+32+12>>2];c[b+160>>2]=c[e+48>>2];c[b+160+4>>2]=c[e+48+4>>2];c[b+160+8>>2]=c[e+48+8>>2];c[b+160+12>>2]=c[e+48+12>>2];e=b+680|0;h=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(h|0));c[b+740>>2]=0;c[b+740+4>>2]=0;c[b+740+8>>2]=0;c[b+740+12>>2]=0;c[b+756>>2]=1045220557;c[b+760>>2]=1045220557;c[b+764>>2]=1045220557;c[b+768>>2]=0;c[b+768+4>>2]=0;c[b+768+8>>2]=0;c[b+768+12>>2]=0;c[b+768+16>>2]=0;f[b+728>>2]=.699999988079071;f[b+732>>2]=1.0;f[b+736>>2]=.5;a[b+788>>0]=0;a[b+788+1>>0]=0;a[b+788+2>>0]=0;c[b+792>>2]=0;c[b+792+4>>2]=0;c[b+792+8>>2]=0;c[b+808>>2]=0;c[b+808+4>>2]=0;c[b+808+8>>2]=0;f[b+928>>2]=0.0;f[b+876>>2]=0.0;f[b+880>>2]=.10000000149011612;f[b+884>>2]=300.0;f[b+868>>2]=1.0;f[b+872>>2]=-1.0;f[b+896>>2]=0.0;f[b+900>>2]=.20000000298023224;f[b+904>>2]=0.0;f[b+908>>2]=0.0;f[b+888>>2]=1.0;f[b+892>>2]=.5;c[b+924>>2]=0;f[b+916>>2]=0.0;a[b+912>>0]=0;f[b+992>>2]=0.0;f[b+940>>2]=0.0;f[b+944>>2]=.10000000149011612;f[b+948>>2]=300.0;f[b+932>>2]=1.0;f[b+936>>2]=-1.0;f[b+960>>2]=0.0;f[b+964>>2]=.20000000298023224;f[b+968>>2]=0.0;f[b+972>>2]=0.0;f[b+952>>2]=1.0;f[b+956>>2]=.5;c[b+988>>2]=0;f[b+980>>2]=0.0;a[b+976>>0]=0;f[b+1056>>2]=0.0;f[b+1004>>2]=0.0;f[b+1008>>2]=.10000000149011612;f[b+1012>>2]=300.0;f[b+996>>2]=1.0;f[b+1e3>>2]=-1.0;f[b+1024>>2]=0.0;f[b+1028>>2]=.20000000298023224;f[b+1032>>2]=0.0;f[b+1036>>2]=0.0;f[b+1016>>2]=1.0;f[b+1020>>2]=.5;c[b+1052>>2]=0;f[b+1044>>2]=0.0;a[b+1040>>0]=0;a[b+1300>>0]=g&1;a[b+1301>>0]=1;c[b+1304>>2]=0;a[b+1308>>0]=0;w=+f[b+112>>2];C=+f[d+4>>2];v=+f[b+128>>2];B=+f[d+8>>2];u=+f[b+144>>2];A=+f[d+12>>2];t=+f[b+116>>2];s=+f[b+132>>2];r=+f[b+148>>2];q=+f[b+120>>2];o=+f[b+136>>2];m=+f[b+152>>2];z=+f[d+20>>2];y=+f[d+24>>2];x=+f[d+28>>2];p=+f[d+36>>2];n=+f[d+40>>2];l=+f[d+44>>2];E=+f[b+160>>2];D=+f[b+164>>2];i=+f[b+168>>2];k=+f[d+52>>2]+(C*E+B*D+A*i);j=z*E+y*D+x*i+ +f[d+56>>2];i=p*E+n*D+l*i+ +f[d+60>>2];f[b+48>>2]=w*C+v*B+u*A;f[b+52>>2]=C*t+B*s+A*r;f[b+56>>2]=C*q+B*o+A*m;f[b+60>>2]=0.0;f[b+64>>2]=w*z+v*y+u*x;f[b+68>>2]=t*z+s*y+r*x;f[b+72>>2]=q*z+o*y+m*x;f[b+76>>2]=0.0;f[b+80>>2]=w*p+v*n+u*l;f[b+84>>2]=t*p+s*n+r*l;f[b+88>>2]=q*p+o*n+m*l;f[b+92>>2]=0.0;f[b+96>>2]=k;f[b+100>>2]=j;f[b+104>>2]=i;f[b+108>>2]=0.0;gc(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);return}function hd(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0,W=0.0,X=0.0;V=ea;ea=ea+240|0;g=(a[b+8>>0]|0)!=0;h=g?e:d;g=g?d:e;R=+f[h+116>>2]-+f[h+52>>2];S=+f[h+120>>2]-+f[h+56>>2];T=+f[h+124>>2]-+f[h+60>>2];U=+f[h+252>>2];if(R*R+S*S+T*T>2];o=+f[g+20>>2];p=+f[g+36>>2];q=+f[g+8>>2];r=+f[g+24>>2];s=+f[g+40>>2];t=+f[g+12>>2];u=+f[g+28>>2];v=+f[g+44>>2];j=-+f[g+52>>2];k=-+f[g+56>>2];l=-+f[g+60>>2];w=+f[h+4>>2];x=+f[h+20>>2];y=+f[h+36>>2];z=+f[h+8>>2];A=+f[h+24>>2];B=+f[h+40>>2];C=+f[h+12>>2];D=+f[h+28>>2];E=+f[h+44>>2];G=+f[h+52>>2];F=+f[h+56>>2];S=+f[h+60>>2];Q=O*j+o*k+p*l+(O*G+o*F+p*S);U=q*j+r*k+s*l+(q*G+r*F+s*S);S=t*j+u*k+v*l+(t*G+u*F+v*S);F=+f[h+68>>2];G=+f[h+84>>2];H=+f[h+100>>2];I=+f[h+72>>2];J=+f[h+88>>2];K=+f[h+104>>2];L=+f[h+76>>2];M=+f[h+92>>2];N=+f[h+108>>2];m=+f[h+116>>2];n=+f[h+120>>2];R=+f[h+124>>2];P=O*j+o*k+p*l+(O*m+o*n+p*R);T=q*j+r*k+s*l+(q*m+r*n+s*R);R=t*j+u*k+v*l+(t*m+u*n+v*R);g=c[g+192>>2]|0;if(((c[g+4>>2]|0)+-21|0)>>>0>=9){W=1.0;ea=V;return +W}f[V+224>>2]=Q;f[V+224+4>>2]=U;f[V+224+8>>2]=S;f[V+224+12>>2]=0.0;if(P>2]=P;i=P}else i=Q;if(T>2]=T;j=T}else j=U;if(R>2]=R;k=R}else k=S;f[V+208>>2]=Q;f[V+208+4>>2]=U;f[V+208+8>>2]=S;f[V+208+12>>2]=0.0;if(Q>2]=P;l=P}else l=Q;if(U>2]=T;m=T}else m=U;if(S>2]=R;n=R}else n=S;X=+f[h+248>>2];f[V+224>>2]=i-X;f[V+224+4>>2]=j-X;f[V+224+8>>2]=k-X;f[V+208>>2]=X+l;f[V+208+4>>2]=X+m;f[V+208+8>>2]=X+n;c[V>>2]=4732;f[V+4>>2]=O*w+o*x+p*y;f[V+8>>2]=O*z+o*A+p*B;f[V+12>>2]=O*C+o*D+p*E;f[V+16>>2]=0.0;f[V+20>>2]=q*w+r*x+s*y;f[V+24>>2]=q*z+r*A+s*B;f[V+28>>2]=q*C+r*D+s*E;f[V+32>>2]=0.0;f[V+36>>2]=t*w+u*x+v*y;f[V+40>>2]=t*z+u*A+v*B;f[V+44>>2]=t*C+u*D+v*E;f[V+48>>2]=0.0;f[V+52>>2]=Q;f[V+56>>2]=U;f[V+60>>2]=S;f[V+64>>2]=0.0;f[V+68>>2]=O*F+o*G+p*H;f[V+72>>2]=O*I+o*J+p*K;f[V+76>>2]=O*L+o*M+p*N;f[V+80>>2]=0.0;f[V+84>>2]=q*F+r*G+s*H;f[V+88>>2]=q*I+r*J+s*K;f[V+92>>2]=q*L+r*M+s*N;f[V+96>>2]=0.0;f[V+100>>2]=t*F+u*G+v*H;f[V+104>>2]=t*I+u*J+v*K;f[V+108>>2]=t*L+u*M+v*N;f[V+112>>2]=0.0;f[V+116>>2]=P;f[V+120>>2]=T;f[V+124>>2]=R;f[V+128>>2]=0.0;f[V+196>>2]=X;c[V+200>>2]=c[h+244>>2];if(g|0?(Pa[c[(c[g>>2]|0)+64>>2]&127](g,V,V+224|0,V+208|0),W=+f[V+200>>2],W<+f[h+244>>2]):0){f[h+244>>2]=W;X=W;ea=V;return +X}X=1.0;ea=V;return +X}function id(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0,W=0.0,X=0.0;V=ea;ea=ea+240|0;g=(a[b+8>>0]|0)!=0;h=g?e:d;g=g?d:e;R=+f[h+116>>2]-+f[h+52>>2];S=+f[h+120>>2]-+f[h+56>>2];T=+f[h+124>>2]-+f[h+60>>2];U=+f[h+252>>2];if(R*R+S*S+T*T>2];o=+f[g+20>>2];p=+f[g+36>>2];q=+f[g+8>>2];r=+f[g+24>>2];s=+f[g+40>>2];t=+f[g+12>>2];u=+f[g+28>>2];v=+f[g+44>>2];j=-+f[g+52>>2];k=-+f[g+56>>2];l=-+f[g+60>>2];w=+f[h+4>>2];x=+f[h+20>>2];y=+f[h+36>>2];z=+f[h+8>>2];A=+f[h+24>>2];B=+f[h+40>>2];C=+f[h+12>>2];D=+f[h+28>>2];E=+f[h+44>>2];G=+f[h+52>>2];F=+f[h+56>>2];S=+f[h+60>>2];Q=O*j+o*k+p*l+(O*G+o*F+p*S);U=q*j+r*k+s*l+(q*G+r*F+s*S);S=t*j+u*k+v*l+(t*G+u*F+v*S);F=+f[h+68>>2];G=+f[h+84>>2];H=+f[h+100>>2];I=+f[h+72>>2];J=+f[h+88>>2];K=+f[h+104>>2];L=+f[h+76>>2];M=+f[h+92>>2];N=+f[h+108>>2];m=+f[h+116>>2];n=+f[h+120>>2];R=+f[h+124>>2];P=O*j+o*k+p*l+(O*m+o*n+p*R);T=q*j+r*k+s*l+(q*m+r*n+s*R);R=t*j+u*k+v*l+(t*m+u*n+v*R);g=c[g+192>>2]|0;if(((c[g+4>>2]|0)+-21|0)>>>0>=9){W=1.0;ea=V;return +W}f[V+224>>2]=Q;f[V+224+4>>2]=U;f[V+224+8>>2]=S;f[V+224+12>>2]=0.0;if(P>2]=P;i=P}else i=Q;if(T>2]=T;j=T}else j=U;if(R>2]=R;k=R}else k=S;f[V+208>>2]=Q;f[V+208+4>>2]=U;f[V+208+8>>2]=S;f[V+208+12>>2]=0.0;if(Q>2]=P;l=P}else l=Q;if(U>2]=T;m=T}else m=U;if(S>2]=R;n=R}else n=S;X=+f[h+248>>2];f[V+224>>2]=i-X;f[V+224+4>>2]=j-X;f[V+224+8>>2]=k-X;f[V+208>>2]=X+l;f[V+208+4>>2]=X+m;f[V+208+8>>2]=X+n;c[V>>2]=6648;f[V+4>>2]=O*w+o*x+p*y;f[V+8>>2]=O*z+o*A+p*B;f[V+12>>2]=O*C+o*D+p*E;f[V+16>>2]=0.0;f[V+20>>2]=q*w+r*x+s*y;f[V+24>>2]=q*z+r*A+s*B;f[V+28>>2]=q*C+r*D+s*E;f[V+32>>2]=0.0;f[V+36>>2]=t*w+u*x+v*y;f[V+40>>2]=t*z+u*A+v*B;f[V+44>>2]=t*C+u*D+v*E;f[V+48>>2]=0.0;f[V+52>>2]=Q;f[V+56>>2]=U;f[V+60>>2]=S;f[V+64>>2]=0.0;f[V+68>>2]=O*F+o*G+p*H;f[V+72>>2]=O*I+o*J+p*K;f[V+76>>2]=O*L+o*M+p*N;f[V+80>>2]=0.0;f[V+84>>2]=q*F+r*G+s*H;f[V+88>>2]=q*I+r*J+s*K;f[V+92>>2]=q*L+r*M+s*N;f[V+96>>2]=0.0;f[V+100>>2]=t*F+u*G+v*H;f[V+104>>2]=t*I+u*J+v*K;f[V+108>>2]=t*L+u*M+v*N;f[V+112>>2]=0.0;f[V+116>>2]=P;f[V+120>>2]=T;f[V+124>>2]=R;f[V+128>>2]=0.0;f[V+196>>2]=X;c[V+200>>2]=c[h+244>>2];if(g|0?(Pa[c[(c[g>>2]|0)+64>>2]&127](g,V,V+224|0,V+208|0),W=+f[V+200>>2],W<+f[h+244>>2]):0){f[h+244>>2]=W;X=W;ea=V;return +X}X=1.0;ea=V;return +X}function jd(a,b,d){a=a|0;b=b|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;m=0;do{k=m;m=m+1|0;l=(m|0)==3;j=c[b+((l?0:m)<<2)>>2]|0;k=c[b+((((k+2|0)>>>0)%3|0)<<2)>>2]|0;e=c[d>>2]|0;f=c[d+4>>2]|0;do if((e|0)==(k|0)&(f|0)==(j|0)){e=2;n=3}else{if(!((e|0)==(j|0)&(f|0)==(k|0))){g=c[d+8>>2]|0;if((f|0)==(k|0)&(g|0)==(j|0)){e=0;n=3;break}if(!((f|0)==(j|0)&(g|0)==(k|0))){if(!((g|0)!=(k|0)|(e|0)==(j|0)^1)){e=1;n=3;break}if((g|0)!=(j|0)|(e|0)==(k|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=d+12+(e<<2)|0}while(0);if((n|0)==3){n=0;e=d+12+(e<<2)|0}i=c[e>>2]|0;e=c[b>>2]|0;f=c[b+4>>2]|0;do if((e|0)==(j|0)&(f|0)==(k|0)){e=2;n=11}else{if(!((e|0)==(k|0)&(f|0)==(j|0))){g=c[b+8>>2]|0;if((f|0)==(j|0)&(g|0)==(k|0)){e=0;n=11;break}if(!((f|0)==(k|0)&(g|0)==(j|0))){if(!((g|0)!=(j|0)|(e|0)==(k|0)^1)){e=1;n=11;break}if((g|0)!=(k|0)|(e|0)==(j|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=b+12+(e<<2)|0}while(0);if((n|0)==11){n=0;e=b+12+(e<<2)|0}h=c[a+(c[e>>2]<<2)>>2]|0;e=c[h>>2]|0;f=c[h+4>>2]|0;do if((e|0)==(k|0)&(f|0)==(j|0)){e=2;n=19}else{if(!((e|0)==(j|0)&(f|0)==(k|0))){g=c[h+8>>2]|0;if((f|0)==(k|0)&(g|0)==(j|0)){e=0;n=19;break}if(!((f|0)==(j|0)&(g|0)==(k|0))){if(!((g|0)!=(k|0)|(e|0)==(j|0)^1)){e=1;n=19;break}if((g|0)!=(j|0)|(e|0)==(k|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=h+12+(e<<2)|0}while(0);if((n|0)==19){n=0;e=h+12+(e<<2)|0}c[e>>2]=i;e=c[b>>2]|0;f=c[b+4>>2]|0;do if((e|0)==(j|0)&(f|0)==(k|0)){e=2;n=27}else{if(!((e|0)==(k|0)&(f|0)==(j|0))){g=c[b+8>>2]|0;if((f|0)==(j|0)&(g|0)==(k|0)){e=0;n=27;break}if(!((f|0)==(k|0)&(g|0)==(j|0))){if(!((g|0)!=(j|0)|(e|0)==(k|0)^1)){e=1;n=27;break}if((g|0)!=(k|0)|(e|0)==(j|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=b+12+(e<<2)|0}while(0);if((n|0)==27){n=0;e=b+12+(e<<2)|0}i=c[e>>2]|0;e=c[d>>2]|0;f=c[d+4>>2]|0;do if((e|0)==(k|0)&(f|0)==(j|0)){e=2;n=35}else{if(!((e|0)==(j|0)&(f|0)==(k|0))){g=c[d+8>>2]|0;if((f|0)==(k|0)&(g|0)==(j|0)){e=0;n=35;break}if(!((f|0)==(j|0)&(g|0)==(k|0))){if(!((g|0)!=(k|0)|(e|0)==(j|0)^1)){e=1;n=35;break}if((g|0)!=(j|0)|(e|0)==(k|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=d+12+(e<<2)|0}while(0);if((n|0)==35){n=0;e=d+12+(e<<2)|0}h=c[a+(c[e>>2]<<2)>>2]|0;e=c[h>>2]|0;f=c[h+4>>2]|0;do if((e|0)==(j|0)&(f|0)==(k|0)){e=2;n=43}else{if(!((e|0)==(k|0)&(f|0)==(j|0))){g=c[h+8>>2]|0;if((f|0)==(j|0)&(g|0)==(k|0)){e=0;n=43;break}if(!((f|0)==(k|0)&(g|0)==(j|0))){if(!((g|0)!=(j|0)|(e|0)==(k|0)^1)){e=1;n=43;break}if((g|0)!=(k|0)|(e|0)==(j|0)^1){e=10744;break}else e=1}else e=0}else e=2;e=h+12+(e<<2)|0}while(0);if((n|0)==43){n=0;e=h+12+(e<<2)|0}c[e>>2]=i}while(!l);return}function kd(d,e,g,i){d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0.0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0;o=+f[e>>2];k=(f[h>>2]=o,c[h>>2]|0);u=o<999999984306749440.0?k:1566444395;m=+f[e+4>>2];n=(f[h>>2]=m,c[h>>2]|0);v=m<999999984306749440.0?n:1566444395;y=+f[e+8>>2];q=(f[h>>2]=y,c[h>>2]|0);w=y<999999984306749440.0?q:1566444395;k=o>-999999984306749440.0?k:-581039253;n=m>-999999984306749440.0?n:-581039253;q=y>-999999984306749440.0?q:-581039253;y=+f[e+16>>2];t=y<(c[h>>2]=u,+f[h>>2]);j=(f[h>>2]=y,c[h>>2]|0);u=t?j:u;m=+f[e+20>>2];t=m<(c[h>>2]=v,+f[h>>2]);l=(f[h>>2]=m,c[h>>2]|0);v=t?l:v;o=+f[e+24>>2];t=o<(c[h>>2]=w,+f[h>>2]);p=(f[h>>2]=o,c[h>>2]|0);w=t?p:w;k=y>(c[h>>2]=k,+f[h>>2])?j:k;j=m>(c[h>>2]=n,+f[h>>2])?l:n;r=o>(c[h>>2]=q,+f[h>>2])?p:q;y=+f[e+32>>2];s=y<(c[h>>2]=u,+f[h>>2]);p=(f[h>>2]=y,c[h>>2]|0);m=+f[e+36>>2];t=m<(c[h>>2]=v,+f[h>>2]);q=(f[h>>2]=m,c[h>>2]|0);o=+f[e+40>>2];n=o<(c[h>>2]=w,+f[h>>2]);l=(f[h>>2]=o,c[h>>2]|0);k=y>(c[h>>2]=k,+f[h>>2])?p:k;j=m>(c[h>>2]=j,+f[h>>2])?q:j;r=o>(c[h>>2]=r,+f[h>>2])?l:r;G=(c[h>>2]=k,+f[h>>2]);H=(c[h>>2]=s?p:u,+f[h>>2]);C=(c[h>>2]=j,+f[h>>2]);D=(c[h>>2]=t?q:v,+f[h>>2]);m=(c[h>>2]=r,+f[h>>2]);z=(c[h>>2]=n?l:w,+f[h>>2]);p=c[d+8>>2]|0;F=+f[p+4>>2];B=+f[p+8>>2];o=+f[p+12>>2];E=+f[p+36>>2];A=+f[p+40>>2];y=+f[p+44>>2];p=~~(((G-H<2.0000000949949026e-03?H+-1.0000000474974513e-03:H)-F)*E)&65535&-2;q=~~(((C-D<2.0000000949949026e-03?D+-1.0000000474974513e-03:D)-B)*A)&65535&-2;r=~~(((m-z<2.0000000949949026e-03?z+-1.0000000474974513e-03:z)-o)*y)&65535&-2;s=~~(((G-H<2.0000000949949026e-03?G+1.0000000474974513e-03:G)-F)*E+1.0)&65535|1;t=~~(((C-D<2.0000000949949026e-03?C+1.0000000474974513e-03:C)-B)*A+1.0)&65535|1;e=~~(((m-z<2.0000000949949026e-03?m+1.0000000474974513e-03:m)-o)*y+1.0)&65535|1;n=c[d+4>>2]|0;j=c[n+4>>2]|0;if((j|0)==(c[n+8>>2]|0)?(x=(j|0)==0?1:j<<1,(j|0)<(x|0)):0){if(!x)k=0;else{c[6747]=(c[6747]|0)+1;j=kb((x<<4|3)+16|0)|0;if(!j)k=0;else{c[(j+4+15&-16)+-4>>2]=j;k=j+4+15&-16}j=c[n+4>>2]|0}if((j|0)>0){l=0;do{d=k+(l<<4)|0;w=(c[n+12>>2]|0)+(l<<4)|0;c[d>>2]=c[w>>2];c[d+4>>2]=c[w+4>>2];c[d+8>>2]=c[w+8>>2];c[d+12>>2]=c[w+12>>2];l=l+1|0}while((l|0)!=(j|0))}j=c[n+12>>2]|0;if(j|0){if(a[n+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[n+12>>2]=0}a[n+16>>0]=1;c[n+12>>2]=k;c[n+8>>2]=x;j=c[n+4>>2]|0}x=c[n+12>>2]|0;b[x+(j<<4)>>1]=p;b[x+(j<<4)+2>>1]=q;b[x+(j<<4)+4>>1]=r;b[x+(j<<4)+6>>1]=s;b[x+(j<<4)+8>>1]=t;b[x+(j<<4)+10>>1]=e;c[x+(j<<4)+12>>2]=g<<21|i;c[n+4>>2]=(c[n+4>>2]|0)+1;return}function ld(b,d){b=b|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;l=ea;ea=ea+336|0;d=c[d+36>>2]|0;c[l+272+4>>2]=35;c[l+272+8>>2]=0;c[l+272+12>>2]=1065353216;c[l+272+16>>2]=1065353216;c[l+272+20>>2]=1065353216;f[l+272+24>>2]=0.0;c[l+272>>2]=4500;c[l+272+52>>2]=d;f[l+272+44>>2]=0.0;j=c[b+28>>2]|0;g=c[j+4>>2]|0;if(c[(c[j+8>>2]|0)+204>>2]&3|0?a[d+376>>0]|0:0){ea=l;return}if((a[24880]|0)==0?DC(24880)|0:0){if((a[24888]|0)==0?DC(24888)|0:0){c[6348]=1065353216;c[6349]=0;c[6350]=0;c[6351]=0;c[6352]=0;c[6353]=1065353216;c[6354]=0;c[6355]=0;c[6356]=0;c[6357]=0;c[6358]=1065353216;f[6359]=0.0;PB(24888)}c[6332]=c[6348];c[6333]=c[6349];c[6334]=c[6350];c[6335]=c[6351];c[6336]=c[6352];c[6337]=c[6353];c[6338]=c[6354];c[6339]=c[6355];c[6340]=c[6356];c[6341]=c[6357];c[6342]=c[6358];c[6343]=c[6359];c[6344]=0;c[6345]=0;c[6346]=0;c[6347]=0;PB(24880)}e=c[(c[b+28>>2]|0)+12>>2]|0;c[l>>2]=1065353216;c[l+4>>2]=0;c[l+8>>2]=0;f[l+12>>2]=0.0;if(!(!(Fc(l+272|0,25328,g,e,l,l+216|0)|0)?!(Bb(l+272|0,25328,g,e,l,l+216|0,0)|0):0))h=12;if((h|0)==12?(c[l+4>>2]=0,c[l+4+4>>2]=0,c[l+4+8>>2]=0,c[l+4+12>>2]=0,c[l+4+16>>2]=0,c[l+4+20>>2]=0,a[l+152>>0]=0,c[l>>2]=4320,j=c[(c[b+28>>2]|0)+8>>2]|0,Yb(b,l+216|0,d,0,0,0,(c[j+236>>2]&2|0)==0?0:j,j,l)|0):0){c[6747]=(c[6747]|0)+1;d=kb(235)|0;if(!d)j=0;else{c[(d+4+15&-16)+-4>>2]=d;j=d+4+15&-16}e=j+4|0;d=j+152|0;hk(e|0,0,212)|0;c[j>>2]=4320;g=l+4|0;h=e+100|0;do{c[e>>2]=c[g>>2];e=e+4|0;g=g+4|0}while((e|0)<(h|0));e=j+104|0;c[e>>2]=c[l+104>>2];c[e+4>>2]=c[l+104+4>>2];c[e+8>>2]=c[l+104+8>>2];c[e+12>>2]=c[l+104+12>>2];e=j+120|0;c[e>>2]=c[l+120>>2];c[e+4>>2]=c[l+120+4>>2];c[e+8>>2]=c[l+120+8>>2];c[e+12>>2]=c[l+120+12>>2];e=j+136|0;c[e>>2]=c[l+136>>2];c[e+4>>2]=c[l+136+4>>2];c[e+8>>2]=c[l+136+8>>2];c[e+12>>2]=c[l+136+12>>2];a[d>>0]=a[l+152>>0]|0;e=j+156|0;g=l+156|0;h=e+60|0;do{c[e>>2]=c[g>>2];e=e+4|0;g=g+4|0}while((e|0)<(h|0));h=c[b+24>>2]|0;i=j;d=c[h+852>>2]|0;if((d|0)==(c[h+856>>2]|0)?(k=(d|0)==0?1:d<<1,(d|0)<(k|0)):0){if(!k)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((k<<2|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[h+852>>2]|0}if((d|0)>0){g=0;do{c[e+(g<<2)>>2]=c[(c[h+860>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(d|0))}g=c[h+860>>2]|0;if(g){if(a[h+864>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);d=c[h+852>>2]|0}c[h+860>>2]=0}a[h+864>>0]=1;c[h+860>>2]=e;c[h+856>>2]=k}c[(c[h+860>>2]|0)+(d<<2)>>2]=i;c[h+852>>2]=d+1;d=c[b+24>>2]|0;if(!(c[(c[(c[b+28>>2]|0)+8>>2]|0)+204>>2]&3)){b=j+64|0;f[b>>2]=+f[d+340>>2]*+f[b>>2];d=d+352|0}else{b=j+64|0;f[b>>2]=+f[d+344>>2]*+f[b>>2];d=d+356|0}b=j+68|0;f[b>>2]=+f[d>>2]*+f[b>>2]}ea=l;return}function md(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if(!((d|0)!=0&(e|0)!=0))return;if((c[b+24>>2]|0)<128?(c[b+28>>2]|0)<128:0){c[6747]=(c[6747]|0)+1;h=kb(1043)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}h=c[b+24>>2]|0;if((h|0)>0){i=0;do{k=(c[b+32>>2]|0)+(i<<3)|0;l=c[k+4>>2]|0;m=j+(i<<3)|0;c[m>>2]=c[k>>2];c[m+4>>2]=l;i=i+1|0}while((i|0)!=(h|0))}h=c[b+32>>2]|0;if(h|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=j;c[b+28>>2]=128}c[b+24>>2]=128;k=c[b+32>>2]|0;c[k>>2]=d;c[k+4>>2]=e;k=1;j=124;while(1){h=k+-1|0;i=c[b+32>>2]|0;l=c[i+(h<<3)>>2]|0;m=c[i+(h<<3)+4>>2]|0;if((h|0)>(j|0)){e=c[b+24>>2]|0;if((e|0)<(e<<1|0)?(c[b+28>>2]|0)<(e<<1|0):0){if(e){c[6747]=(c[6747]|0)+1;i=kb((e<<4|3)+16|0)|0;if(!i)d=0;else{c[(i+4+15&-16)+-4>>2]=i;d=i+4+15&-16}i=c[b+24>>2]|0;if((i|0)>0){j=0;do{p=(c[b+32>>2]|0)+(j<<3)|0;o=c[p+4>>2]|0;n=d+(j<<3)|0;c[n>>2]=c[p>>2];c[n+4>>2]=o;j=j+1|0}while((j|0)!=(i|0));i=d}else i=d}else{i=0;d=0}j=c[b+32>>2]|0;if(j|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=d;c[b+28>>2]=e<<1}c[b+24>>2]=e<<1;j=(e<<1)+-4|0}do if((l|0)==(m|0)){if(c[l+40>>2]|0){p=c[l+36>>2]|0;c[i+(h<<3)>>2]=p;c[i+(h<<3)+4>>2]=p;p=c[l+40>>2]|0;h=k+1|0;o=c[b+32>>2]|0;c[o+(k<<3)>>2]=p;c[o+(k<<3)+4>>2]=p;o=c[l+40>>2]|0;p=c[b+32>>2]|0;c[p+(h<<3)>>2]=c[l+36>>2];c[p+(h<<3)+4>>2]=o;h=k+2|0}}else if(((((+f[l>>2]<=+f[m+16>>2]?+f[l+16>>2]>=+f[m>>2]:0)?+f[l+4>>2]<=+f[m+20>>2]:0)?+f[l+20>>2]>=+f[m+4>>2]:0)?+f[l+8>>2]<=+f[m+24>>2]:0)?+f[l+24>>2]>=+f[m+8>>2]:0){e=(c[m+40>>2]|0)!=0;if(!(c[l+40>>2]|0))if(e){p=c[m+36>>2]|0;c[i+(h<<3)>>2]=l;c[i+(h<<3)+4>>2]=p;p=c[m+40>>2]|0;h=c[b+32>>2]|0;c[h+(k<<3)>>2]=l;c[h+(k<<3)+4>>2]=p;h=k+1|0;break}else{Ma[c[(c[g>>2]|0)+8>>2]&127](g,l,m);break}else{d=c[l+36>>2]|0;if(e){o=c[m+36>>2]|0;c[i+(h<<3)>>2]=d;c[i+(h<<3)+4>>2]=o;h=c[m+36>>2]|0;o=k+1|0;n=c[b+32>>2]|0;c[n+(k<<3)>>2]=c[l+40>>2];c[n+(k<<3)+4>>2]=h;n=c[m+40>>2]|0;h=k+2|0;p=c[b+32>>2]|0;c[p+(o<<3)>>2]=c[l+36>>2];c[p+(o<<3)+4>>2]=n;o=c[m+40>>2]|0;p=c[b+32>>2]|0;c[p+(h<<3)>>2]=c[l+40>>2];c[p+(h<<3)+4>>2]=o;h=k+3|0;break}else{c[i+(h<<3)>>2]=d;c[i+(h<<3)+4>>2]=m;h=c[b+32>>2]|0;c[h+(k<<3)>>2]=c[l+40>>2];c[h+(k<<3)+4>>2]=m;h=k+1|0;break}}}while(0);if(!h)break;else k=h}return}function nd(b,d){b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=c[b+92>>2]|0;if(!(ra[c[(c[o>>2]|0)+56>>2]&127](o)|0))return;o=c[b+92>>2]|0;o=ra[c[(c[o>>2]|0)+28>>2]&127](o)|0;f=c[o+4>>2]|0;if((f|0)>1){qd(o,0,f+-1|0);j=c[o+4>>2]|0}else j=f;m=c[b+104>>2]|0;f=j-m|0;if((m|0)<0){if((c[o+8>>2]|0)<(f|0)){if(!f){h=j;i=0}else{c[6747]=(c[6747]|0)+1;g=kb((f<<4|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}h=c[o+4>>2]|0;i=g}if((h|0)>0){g=0;do{m=c[o+12>>2]|0;c[i+(g<<4)>>2]=c[m+(g<<4)>>2];c[i+(g<<4)+4>>2]=c[m+(g<<4)+4>>2];c[i+(g<<4)+8>>2]=c[m+(g<<4)+8>>2];c[i+(g<<4)+12>>2]=c[m+(g<<4)+12>>2];g=g+1|0}while((g|0)!=(h|0))}g=c[o+12>>2]|0;if(g|0){if(a[o+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[o+12>>2]=0}a[o+16>>0]=1;c[o+12>>2]=i;c[o+8>>2]=f;h=o+12|0}else h=o+12|0;g=j;do{m=(c[h>>2]|0)+(g<<4)|0;g=g+1|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0}while((g|0)!=(f|0))}c[o+4>>2]=f;c[b+104>>2]=0;if((f|0)>0){g=0;l=0;m=0;i=0;while(1){k=c[o+12>>2]|0;j=k+(l<<4)|0;p=m;m=c[j>>2]|0;k=k+(l<<4)+4|0;h=c[k>>2]|0;if(!((m|0)==(p|0)&(h|0)==(i|0))){p=m+54|0;i=m+48|0;if(!((((((e[p>>1]|0)>=(e[h+48>>1]|0)?(e[h+54>>1]|0)>=(e[i>>1]|0):0)?(e[p+2>>1]|0)>=(e[h+48+2>>1]|0):0)?(e[h+54+2>>1]|0)>=(e[i+2>>1]|0):0)?(e[p+4>>1]|0)>=(e[h+52>>1]|0):0)?(e[h+54+4>>1]|0)>=(e[m+52>>1]|0):0))n=30}else{h=i;n=30}if((n|0)==30){n=0;g=c[b+92>>2]|0;Ma[c[(c[g>>2]|0)+32>>2]&127](g,j,d);c[j>>2]=0;c[k>>2]=0;g=(c[b+104>>2]|0)+1|0;c[b+104>>2]=g;c[6723]=(c[6723]|0)+-1;f=c[o+4>>2]|0}l=l+1|0;if((l|0)>=(f|0))break;else i=h}if((f|0)>1){qd(o,0,f+-1|0);f=c[o+4>>2]|0;g=c[b+104>>2]|0}j=f-g|0;if((g|0)<0){if((c[o+8>>2]|0)<(j|0)){if(!j){h=f;i=0}else{c[6747]=(c[6747]|0)+1;g=kb((j<<4|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}h=c[o+4>>2]|0;i=g}if((h|0)>0){g=0;do{p=c[o+12>>2]|0;c[i+(g<<4)>>2]=c[p+(g<<4)>>2];c[i+(g<<4)+4>>2]=c[p+(g<<4)+4>>2];c[i+(g<<4)+8>>2]=c[p+(g<<4)+8>>2];c[i+(g<<4)+12>>2]=c[p+(g<<4)+12>>2];g=g+1|0}while((g|0)!=(h|0))}g=c[o+12>>2]|0;if(g|0){if(a[o+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[o+12>>2]=0}a[o+16>>0]=1;c[o+12>>2]=i;c[o+8>>2]=j}do{p=(c[o+12>>2]|0)+(f<<4)|0;f=f+1|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0}while((f|0)!=(j|0));f=j}else f=j}c[o+4>>2]=f;c[b+104>>2]=0;return}function od(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;g=ea;ea=ea+80|0;c[a+68>>2]=(c[a+68>>2]|0)+1;d=c[a+64>>2]|0;if(d|0){e=c[(c[a+24>>2]|0)+(b*80|0)+76>>2]|0;jg(d,e)|0;f=c[d+4>>2]|0;if(f|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[d+4>>2]=e;c[d+12>>2]=(c[d+12>>2]|0)+-1}f=(c[a+16>>2]|0)+-1|0;e=c[a+24>>2]|0;c[g>>2]=c[e+(b*80|0)>>2];c[g+4>>2]=c[e+(b*80|0)+4>>2];c[g+8>>2]=c[e+(b*80|0)+8>>2];c[g+12>>2]=c[e+(b*80|0)+12>>2];c[g+16>>2]=c[e+(b*80|0)+16>>2];c[g+16+4>>2]=c[e+(b*80|0)+16+4>>2];c[g+16+8>>2]=c[e+(b*80|0)+16+8>>2];c[g+16+12>>2]=c[e+(b*80|0)+16+12>>2];c[g+32>>2]=c[e+(b*80|0)+32>>2];c[g+32+4>>2]=c[e+(b*80|0)+32+4>>2];c[g+32+8>>2]=c[e+(b*80|0)+32+8>>2];c[g+32+12>>2]=c[e+(b*80|0)+32+12>>2];c[g+48>>2]=c[e+(b*80|0)+48>>2];c[g+48+4>>2]=c[e+(b*80|0)+48+4>>2];c[g+48+8>>2]=c[e+(b*80|0)+48+8>>2];c[g+48+12>>2]=c[e+(b*80|0)+48+12>>2];c[g+64>>2]=c[e+(b*80|0)+64>>2];c[g+64+4>>2]=c[e+(b*80|0)+64+4>>2];c[g+64+8>>2]=c[e+(b*80|0)+64+8>>2];c[g+64+12>>2]=c[e+(b*80|0)+64+12>>2];c[e+(b*80|0)>>2]=c[e+(f*80|0)>>2];c[e+(b*80|0)+4>>2]=c[e+(f*80|0)+4>>2];c[e+(b*80|0)+8>>2]=c[e+(f*80|0)+8>>2];c[e+(b*80|0)+12>>2]=c[e+(f*80|0)+12>>2];c[e+(b*80|0)+16>>2]=c[e+(f*80|0)+16>>2];c[e+(b*80|0)+16+4>>2]=c[e+(f*80|0)+16+4>>2];c[e+(b*80|0)+16+8>>2]=c[e+(f*80|0)+16+8>>2];c[e+(b*80|0)+16+12>>2]=c[e+(f*80|0)+16+12>>2];c[e+(b*80|0)+32>>2]=c[e+(f*80|0)+32>>2];c[e+(b*80|0)+32+4>>2]=c[e+(f*80|0)+32+4>>2];c[e+(b*80|0)+32+8>>2]=c[e+(f*80|0)+32+8>>2];c[e+(b*80|0)+32+12>>2]=c[e+(f*80|0)+32+12>>2];c[e+(b*80|0)+48>>2]=c[e+(f*80|0)+48>>2];c[e+(b*80|0)+48+4>>2]=c[e+(f*80|0)+48+4>>2];c[e+(b*80|0)+48+8>>2]=c[e+(f*80|0)+48+8>>2];c[e+(b*80|0)+48+12>>2]=c[e+(f*80|0)+48+12>>2];c[e+(b*80|0)+64>>2]=c[e+(f*80|0)+64>>2];c[e+(b*80|0)+64+4>>2]=c[e+(f*80|0)+64+4>>2];c[e+(b*80|0)+64+8>>2]=c[e+(f*80|0)+64+8>>2];c[e+(b*80|0)+64+12>>2]=c[e+(f*80|0)+64+12>>2];e=c[a+24>>2]|0;c[e+(f*80|0)>>2]=c[g>>2];c[e+(f*80|0)+4>>2]=c[g+4>>2];c[e+(f*80|0)+8>>2]=c[g+8>>2];c[e+(f*80|0)+12>>2]=c[g+12>>2];c[e+(f*80|0)+16>>2]=c[g+16>>2];c[e+(f*80|0)+16+4>>2]=c[g+16+4>>2];c[e+(f*80|0)+16+8>>2]=c[g+16+8>>2];c[e+(f*80|0)+16+12>>2]=c[g+16+12>>2];c[e+(f*80|0)+32>>2]=c[g+32>>2];c[e+(f*80|0)+32+4>>2]=c[g+32+4>>2];c[e+(f*80|0)+32+8>>2]=c[g+32+8>>2];c[e+(f*80|0)+32+12>>2]=c[g+32+12>>2];c[e+(f*80|0)+48>>2]=c[g+48>>2];c[e+(f*80|0)+48+4>>2]=c[g+48+4>>2];c[e+(f*80|0)+48+8>>2]=c[g+48+8>>2];c[e+(f*80|0)+48+12>>2]=c[g+48+12>>2];c[e+(f*80|0)+64>>2]=c[g+64>>2];c[e+(f*80|0)+64+4>>2]=c[g+64+4>>2];c[e+(f*80|0)+64+8>>2]=c[g+64+8>>2];c[e+(f*80|0)+64+12>>2]=c[g+64+12>>2];if(!(c[a+64>>2]|0)){b=c[a+16>>2]|0;b=b+-1|0;c[a+16>>2]=b;ea=g;return}c[(c[(c[a+24>>2]|0)+(b*80|0)+76>>2]|0)+36>>2]=b;b=c[a+16>>2]|0;b=b+-1|0;c[a+16>>2]=b;ea=g;return}function pd(a,d,g,h,i,j,k,l,m){a=a|0;d=d|0;g=g|0;h=+h;i=+i;j=+j;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0;U=ea;ea=ea+32|0;D=+f[g>>2];E=+f[g+4>>2];G=+f[g+8>>2];Q=1.0/+s(+((h-D)*(h-D)+(i-E)*(i-E)+(j-G)*(j-G)));N=(h-D)*Q==0.0?999999984306749440.0:1.0/((h-D)*Q);O=(i-E)*Q==0.0?999999984306749440.0:1.0/((i-E)*Q);P=(j-G)*Q==0.0?999999984306749440.0:1.0/((j-G)*Q);da=(D>h?h:D)+ +f[k>>2];ca=(E>i?i:E)+ +f[k+4>>2];ba=(G>j?j:G)+ +f[k+8>>2];$=(D>2];X=(E>2];t=(G>2];_=+f[a+4>>2];da=da<_?_:da;W=+f[a+8>>2];ca=ca>2];ba=ba>2];Y=+f[a+24>>2];r=+f[a+28>>2];Z=+f[a+36>>2];V=+f[a+40>>2];v=+f[a+44>>2];F=~~(((aa0){o=0;p=c[a+136>>2]|0;n=0;do{n=n+1|0;y=p+6|0;q=b[p>>1]|0;z=p+10|0;w=b[p+4>>1]|0;A=p+8|0;x=b[p+2>>1]|0;C=p+12|0;B=(c[C>>2]|0)>-1;do if(((J&65535)>=(q&65535)?(F&65535)<=(e[y>>1]|0):0)&(I&65535)<=(e[z>>1]|0)&(L&65535)>=(w&65535)&(H&65535)<=(e[A>>1]|0)&(K&65535)>=(x&65535)){$=+f[a+36>>2];ba=+f[a+40>>2];da=+f[a+44>>2];aa=+f[a+4>>2];ca=+f[a+8>>2];u=+f[a+12>>2];f[U+12>>2]=0.0;v=aa+ +(e[y>>1]|0)/$;r=ca+ +(e[A>>1]|0)/ba;t=u+ +(e[z>>1]|0)/da;f[U+28>>2]=0.0;f[U>>2]=+(q&65535)/$+aa-+f[l>>2];f[U+4>>2]=+(x&65535)/ba+ca-+f[l+4>>2];f[U+8>>2]=+(w&65535)/da+u-+f[l+8>>2];f[U+16>>2]=v-+f[k>>2];f[U+20>>2]=r-+f[k+4>>2];f[U+24>>2]=t-+f[k+8>>2];t=+f[g>>2];r=N*(+f[U+((N<0.0&1)<<4)>>2]-t);t=N*(+f[U+(((N<0.0^1)&1)<<4)>>2]-t);v=+f[g+4>>2];u=O*(+f[U+((O<0.0&1)<<4)+4>>2]-v);v=O*(+f[U+(((O<0.0^1)&1)<<4)+4>>2]-v);if(!(u>t|r>v)?(M=u>r?u:r,T=v>2],R=P*(+f[U+((P<0.0&1)<<4)+8>>2]-S),S=P*(+f[U+(((P<0.0^1)&1)<<4)+8>>2]-S),!(R>T|M>S)):0){q=(S0.0?(R>M?R:M)<(j-G)*((j-G)*Q)+((h-D)*((h-D)*Q)+(i-E)*((i-E)*Q)):0;if(!(B&q)){w=9;break}w=c[C>>2]|0;Ma[c[(c[d>>2]|0)+8>>2]&127](d,21?w>>21:w,w&2097151);w=10;break}q=0;w=9}else{q=0;w=9}while(0);if((w|0)==9){w=0;if(B|q)w=10;else{C=c[C>>2]|0;o=o-C|0;p=p+(0-C<<4)|0}}if((w|0)==10){o=o+1|0;p=p+16|0}}while((o|0)<(m|0))}else n=0;if((c[6727]|0)>=(n|0)){ea=U;return}c[6727]=n;ea=U;return}function qd(a,b,d){a=a|0;b=b|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,q=0,r=0;while(1){r=c[a+12>>2]|0;q=(b+d|0)/2|0;o=c[r+(q<<4)>>2]|0;p=c[r+(q<<4)+4>>2]|0;q=c[r+(q<<4)+8>>2]|0;e=b;f=d;while(1){a:do if(!o)while(1){l=r+(e<<4)|0;j=c[l>>2]|0;if(!j)g=-1;else g=c[j+12>>2]|0;k=c[r+(e<<4)+4>>2]|0;if(!k)h=-1;else h=c[k+12>>2]|0;if(!p)i=-1;else i=c[p+12>>2]|0;do if((g|0)<=-1){g=(h|0)>(i|0);if(g|(j|0)==0^1)if((j|0)==0&g)break;else break a;if((k|0)!=(p|0))break a;if((c[r+(e<<4)+8>>2]|0)>>>0<=q>>>0)break a}while(0);e=e+1|0}else{m=c[o+12>>2]|0;while(1){l=r+(e<<4)|0;j=c[l>>2]|0;if(!j)g=-1;else g=c[j+12>>2]|0;k=c[r+(e<<4)+4>>2]|0;if(!k)h=-1;else h=c[k+12>>2]|0;if(!p)i=-1;else i=c[p+12>>2]|0;do if((g|0)<=(m|0)){g=(h|0)>(i|0);if(g|(j|0)==(o|0)^1)if((j|0)==(o|0)&g)break;else break a;if((k|0)!=(p|0))break a;if((c[r+(e<<4)+8>>2]|0)>>>0<=q>>>0)break a}while(0);e=e+1|0}}while(0);b:do if(!o)while(1){g=r+(f<<4)|0;k=c[g>>2]|0;if(!k)h=-1;else h=c[k+12>>2]|0;if(!p)i=-1;else i=c[p+12>>2]|0;m=c[r+(f<<4)+4>>2]|0;if(!m)j=-1;else j=c[m+12>>2]|0;do if((h|0)>=-1){h=(i|0)>(j|0);if(h|(k|0)==0^1)if((k|0)==0&h)break;else break b;if((p|0)!=(m|0))break b;if((c[r+(f<<4)+8>>2]|0)>>>0>=q>>>0)break b}while(0);f=f+-1|0}else{n=c[o+12>>2]|0;while(1){g=r+(f<<4)|0;k=c[g>>2]|0;if(!k)h=-1;else h=c[k+12>>2]|0;if(!p)i=-1;else i=c[p+12>>2]|0;m=c[r+(f<<4)+4>>2]|0;if(!m)j=-1;else j=c[m+12>>2]|0;do if((n|0)<=(h|0)){h=(i|0)>(j|0);if(h|(o|0)==(k|0)^1)if((o|0)==(k|0)&h)break;else break b;if((p|0)!=(m|0))break b;if((c[r+(f<<4)+8>>2]|0)>>>0>=q>>>0)break b}while(0);f=f+-1|0}}while(0);if((e|0)<=(f|0)){j=c[l>>2]|0;k=c[r+(e<<4)+4>>2]|0;m=c[r+(e<<4)+8>>2]|0;n=c[r+(e<<4)+12>>2]|0;c[l>>2]=c[g>>2];c[l+4>>2]=c[g+4>>2];c[l+8>>2]=c[g+8>>2];c[l+12>>2]=c[g+12>>2];r=c[a+12>>2]|0;c[r+(f<<4)>>2]=j;c[r+(f<<4)+4>>2]=k;c[r+(f<<4)+8>>2]=m;c[r+(f<<4)+12>>2]=n;e=e+1|0;f=f+-1|0}if((e|0)>(f|0))break;r=c[a+12>>2]|0}if((f|0)>(b|0))qd(a,b,f);if((e|0)<(d|0))b=e;else break}return}function rd(b,d,e,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=+i;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0.0;C=ea;ea=ea+32|0;if(!d){ea=C;return}p=c[b+44>>2]|0;if((p|0)<128){if((c[b+48>>2]|0)<128){c[6747]=(c[6747]|0)+1;m=kb(531)|0;if(!m)o=0;else{c[(m+4+15&-16)+-4>>2]=m;o=m+4+15&-16}m=c[b+44>>2]|0;if((m|0)>0){n=0;do{c[o+(n<<2)>>2]=c[(c[b+52>>2]|0)+(n<<2)>>2];n=n+1|0}while((n|0)!=(m|0))}m=c[b+52>>2]|0;if(m|0){if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0)}c[b+52>>2]=0}a[b+56>>0]=1;c[b+52>>2]=o;c[b+48>>2]=128;n=b+52|0}else n=b+52|0;m=p;do{c[(c[n>>2]|0)+(m<<2)>>2]=0;m=m+1|0}while((m|0)!=128);x=b+48|0}else{x=b+48|0;n=b+52|0}c[b+44>>2]=128;c[c[n>>2]>>2]=d;w=1;m=126;while(1){o=w+-1|0;p=c[n>>2]|0;v=c[p+(o<<2)>>2]|0;r=+f[v+4>>2]-+f[k+4>>2];t=+f[v+8>>2]-+f[k+8>>2];f[C>>2]=+f[v>>2]-+f[k>>2];f[C+4>>2]=r;f[C+8>>2]=t;f[C+12>>2]=0.0;t=+f[v+20>>2]-+f[j+4>>2];r=+f[v+24>>2]-+f[j+8>>2];f[C+16>>2]=+f[v+16>>2]-+f[j>>2];f[C+20>>2]=t;f[C+24>>2]=r;f[C+28>>2]=0.0;u=c[h>>2]|0;r=+f[e>>2];t=+f[g>>2];q=(+f[C+(u<<4)>>2]-r)*t;r=t*(+f[C+(1-u<<4)>>2]-r);u=c[h+4>>2]|0;t=+f[e+4>>2];D=+f[g+4>>2];s=(+f[C+(u<<4)+4>>2]-t)*D;t=D*(+f[C+(1-u<<4)+4>>2]-t);do if((!(s>r|q>t)?(y=s>q?s:q,B=t>2]|0,A=+f[e+8>>2],D=+f[g+8>>2],z=(+f[C+(u<<4)+8>>2]-A)*D,A=D*(+f[C+(1-u<<4)+8>>2]-A),!(z>B|y>A)):0)?((A0.0?(z>y?z:y)>2]|0)){Ia[c[(c[l>>2]|0)+12>>2]&127](l,v);break}if((o|0)>(m|0)){u=c[b+44>>2]|0;if((u|0)<(u<<1|0)){if((c[x>>2]|0)<(u<<1|0)){if(u){c[6747]=(c[6747]|0)+1;m=kb((u<<3|3)+16|0)|0;if(!m)d=0;else{c[(m+4+15&-16)+-4>>2]=m;d=m+4+15&-16}m=c[b+44>>2]|0;if((m|0)>0){p=0;do{c[d+(p<<2)>>2]=c[(c[n>>2]|0)+(p<<2)>>2];p=p+1|0}while((p|0)!=(m|0));m=d}else m=d}else{m=0;d=0}p=c[n>>2]|0;if(p|0){if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[p+-4>>2]|0)}c[n>>2]=0}a[b+56>>0]=1;c[n>>2]=d;c[x>>2]=u<<1}else m=p;p=u;do{c[m+(p<<2)>>2]=0;p=p+1|0;m=c[n>>2]|0}while((p|0)!=(u<<1|0));m=m+(o<<2)|0}else m=p+(o<<2)|0;c[b+44>>2]=u<<1;o=m;m=(u<<1)+-2|0}else o=p+(o<<2)|0;c[o>>2]=c[v+36>>2];c[(c[n>>2]|0)+(w<<2)>>2]=c[v+40>>2];o=w+1|0}while(0);if(!o)break;else w=o}ea=C;return}function sd(a,b,d,e,g,h,i,j,k,l,m,n){a=a|0;b=b|0;d=d|0;e=e|0;g=+g;h=+h;i=+i;j=+j;k=+k;l=l|0;m=+m;n=n|0;var o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0,E=0;E=ea;ea=ea+2560|0;_p(E+2528|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],g);vp(E+2544|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[E+2528>>2],+f[E+2528+4>>2],+f[E+2528+8>>2]);_p(E+2496|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],g);xp(E+2512|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[E+2496>>2],+f[E+2496+4>>2],+f[E+2496+8>>2]);Ko(E+2464|0,+f[d>>2],+f[d+4>>2],+f[d+8>>2],+f[e>>2],+f[e+4>>2],+f[e+8>>2]);p=!(h<=-1.5707963705062866)?h:m*.01745329238474369+-1.5707963705062866;o=!(i>=1.5707963705062866)?i:1.5707963705062866-m*.01745329238474369;if(p>o){D=1;C=1;h=1.5707963705062866-m*.01745329238474369;p=m*.01745329238474369+-1.5707963705062866}else{D=!(h<=-1.5707963705062866)^1;C=!(i>=1.5707963705062866)^1;h=o}B=h-p;A=(~~(B/(m*.01745329238474369))|0)<1?2:~~(B/(m*.01745329238474369))+1|0;if(!(j>k))if(!(k-j>=6.2831854820251465)){z=0;h=k}else{z=1;h=k}else{z=1;h=3.1415927410125732;j=m*.01745329238474369+-3.1415927410125732}o=h-j;w=(~~(o/(m*.01745329238474369))|0)<1?2:~~(o/(m*.01745329238474369))+1|0;s=0;u=E+1184|0;v=E;while(1){if((s|0)>=(A|0))break;i=p+B/+(A+-1|0)*+(s|0);h=+CJ(i)*g;i=+DJ(i)*g;x=(s|0)==0;r=(s|0)==(A+-1|0);t=0;while(1){if((t|0)>=(w|0))break;k=j+o/+(w+-1|0)*+(t|0);m=+CJ(k);k=i*+DJ(k);$y(E+2400|0,k,+f[e>>2],+f[e+4>>2],+f[e+8>>2]);vp(E+2416|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[E+2400>>2],+f[E+2400+4>>2],+f[E+2400+8>>2]);$y(E+2384|0,i*m,+f[E+2464>>2],+f[E+2464+4>>2],+f[E+2464+8>>2]);vp(E+2432|0,+f[E+2416>>2],+f[E+2416+4>>2],+f[E+2416+8>>2],+f[E+2384>>2],+f[E+2384+4>>2],+f[E+2384+8>>2]);$y(E+2368|0,h,+f[d>>2],+f[d+4>>2],+f[d+8>>2]);vp(E+2448|0,+f[E+2432>>2],+f[E+2432+4>>2],+f[E+2432+8>>2],+f[E+2368>>2],+f[E+2368+4>>2],+f[E+2368+8>>2]);q=v+(t<<4)|0;c[q>>2]=c[E+2448>>2];c[q+4>>2]=c[E+2448+4>>2];c[q+8>>2]=c[E+2448+8>>2];c[q+12>>2]=c[E+2448+12>>2];if(x){if(C)Pa[c[(c[a>>2]|0)+8>>2]&127](a,E+2512|0,q,l)}else Pa[c[(c[a>>2]|0)+8>>2]&127](a,u+(t<<4)|0,q,l);y=(t|0)==0;if(y){c[E+2480>>2]=c[v>>2];c[E+2480+4>>2]=c[v+4>>2];c[E+2480+8>>2]=c[v+8>>2];c[E+2480+12>>2]=c[v+12>>2]}else Pa[c[(c[a>>2]|0)+8>>2]&127](a,v+(t+-1<<4)|0,q,l);if(r&D)Pa[c[(c[a>>2]|0)+8>>2]&127](a,E+2544|0,q,l);do if(n)if(z){if((t|0)!=(w+-1|0))break;Pa[c[(c[a>>2]|0)+8>>2]&127](a,E+2480|0,v+(w+-1<<4)|0,l);break}else{if(!((x|r)&(y|(t|0)==(w+-1|0))))break;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,q,l);break}while(0);t=t+1|0}y=v;s=s+1|0;v=u;u=y}ea=E;return}function td(a,b,d){a=a|0;b=b|0;d=d|0;var h=0.0,i=0,j=0.0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0;r=ea;ea=ea+80|0;o=c[a+4>>2]|0;Za[c[(c[o>>2]|0)+16>>2]&3](o,r+76|0,r+72|0,r+68|0,r+64|0,r+60|0,r+56|0,r+52|0,r+48|0,b);o=(c[r+60>>2]|0)+(z(c[r+56>>2]|0,d)|0)|0;q=c[a+4>>2]|0;p=(c[r+68>>2]|0)==0;n=c[r+76>>2]|0;if((c[r+48>>2]|0)==3){m=c[r+64>>2]|0;i=n+(z(m,e[o+4>>1]|0)|0)|0;if(p){k=i+8|0;j=+f[q+12>>2];l=+f[i>>2]*+f[q+4>>2];h=+f[i+4>>2]*+f[q+8>>2]}else{k=q+12|0;j=+g[i+16>>3];l=+f[q+4>>2]*+g[i>>3];h=+f[q+8>>2]*+g[i+8>>3]}j=+f[k>>2]*j;f[r+32>>2]=l;f[r+36>>2]=h;f[r+40>>2]=j;f[r+44>>2]=0.0;i=n+(z(m,e[o+2>>1]|0)|0)|0;if(p){k=i+8|0;j=+f[q+12>>2];l=+f[i>>2]*+f[q+4>>2];h=+f[i+4>>2]*+f[q+8>>2]}else{k=q+12|0;j=+g[i+16>>3];l=+f[q+4>>2]*+g[i>>3];h=+f[q+8>>2]*+g[i+8>>3]}j=+f[k>>2]*j;f[r+16>>2]=l;f[r+20>>2]=h;f[r+24>>2]=j;f[r+28>>2]=0.0;k=n+(z(m,e[o>>1]|0)|0)|0;if(p){i=k+8|0;j=+f[q+12>>2];l=+f[k>>2]*+f[q+4>>2];h=+f[k+4>>2]*+f[q+8>>2]}else{i=q+12|0;j=+g[k+16>>3];l=+f[q+4>>2]*+g[k>>3];h=+f[q+8>>2]*+g[k+8>>3]}s=l;l=+f[i>>2]*j;f[r>>2]=s;q=r+4|0;f[q>>2]=h;q=r+8|0;f[q>>2]=l;q=r+12|0;f[q>>2]=0.0;q=a+8|0;q=c[q>>2]|0;p=c[q>>2]|0;p=p+8|0;p=c[p>>2]|0;Pa[p&127](q,r,b,d);a=c[a+4>>2]|0;d=c[a>>2]|0;d=d+24|0;d=c[d>>2]|0;Ia[d&127](a,b);ea=r;return}else{m=c[r+64>>2]|0;i=n+(z(m,c[o+8>>2]|0)|0)|0;if(p){k=i+8|0;j=+f[q+12>>2];l=+f[i>>2]*+f[q+4>>2];h=+f[i+4>>2]*+f[q+8>>2]}else{k=q+12|0;j=+g[i+16>>3];l=+f[q+4>>2]*+g[i>>3];h=+f[q+8>>2]*+g[i+8>>3]}s=+f[k>>2]*j;f[r+32>>2]=l;f[r+36>>2]=h;f[r+40>>2]=s;f[r+44>>2]=0.0;i=n+(z(m,c[o+4>>2]|0)|0)|0;if(p){k=i+8|0;j=+f[q+12>>2];l=+f[i>>2]*+f[q+4>>2];h=+f[i+4>>2]*+f[q+8>>2]}else{k=q+12|0;j=+g[i+16>>3];l=+f[q+4>>2]*+g[i>>3];h=+f[q+8>>2]*+g[i+8>>3]}s=+f[k>>2]*j;f[r+16>>2]=l;f[r+20>>2]=h;f[r+24>>2]=s;f[r+28>>2]=0.0;k=n+(z(m,c[o>>2]|0)|0)|0;if(p){i=k+8|0;j=+f[q+12>>2];l=+f[k>>2]*+f[q+4>>2];h=+f[k+4>>2]*+f[q+8>>2]}else{i=q+12|0;j=+g[k+16>>3];l=+f[q+4>>2]*+g[k>>3];h=+f[q+8>>2]*+g[k+8>>3]}t=l;l=h;s=+f[i>>2]*j;f[r>>2]=t;q=r+4|0;f[q>>2]=l;q=r+8|0;f[q>>2]=s;q=r+12|0;f[q>>2]=0.0;q=a+8|0;q=c[q>>2]|0;p=c[q>>2]|0;p=p+8|0;p=c[p>>2]|0;Pa[p&127](q,r,b,d);a=c[a+4>>2]|0;d=c[a>>2]|0;d=d+24|0;d=c[d>>2]|0;Ia[d&127](a,b);ea=r;return}}function ud(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;Yf(a,b+(c*284|0)|0,d);i=+f[b+(c*284|0)+52>>2];g=+f[b+(c*284|0)+56>>2];e=+f[b+(c*284|0)+60>>2];J=+f[b+(c*284|0)+76>>2];A=+f[b+(c*284|0)+72>>2];C=+f[b+(c*284|0)+68>>2];z=1.0/+s(+((A*-i-C*-g)*(A*-i-C*-g)+((J*-g-A*-e)*(J*-g-A*-e)+(C*-e-J*-i)*(C*-e-J*-i))));y=(J*-g-A*-e)*z;x=(C*-e-J*-i)*z;z=(A*-i-C*-g)*z;j=+f[b+(c*284|0)+232>>2]*.5;n=+v(+j)/+s(+(i*i+g*g+e*e));j=+u(+j);m=2.0/(j*j+(n*-e*(n*-e)+(n*-i*(n*-i)+n*-g*(n*-g))));H=1.0-(n*-g*(n*-g*m)+n*-e*(n*-e*m));G=n*-i*(n*-g*m)-j*(n*-e*m);I=n*-i*(n*-e*m)+j*(n*-g*m);E=n*-i*(n*-g*m)+j*(n*-e*m);D=1.0-(n*-i*(n*-i*m)+n*-e*(n*-e*m));F=n*-g*(n*-e*m)-j*(n*-i*m);l=n*-i*(n*-e*m)-j*(n*-g*m);j=n*-g*(n*-e*m)+j*(n*-i*m);m=1.0-(n*-i*(n*-i*m)+n*-g*(n*-g*m));n=+f[b+(c*284|0)+236>>2]*-.5;B=+v(+n)/+s(+(J*J+(A*A+C*C)));n=+u(+n);r=2.0/(n*n+(J*B*(J*B)+(C*B*(C*B)+A*B*(A*B))));o=1.0-(A*B*(A*B*r)+J*B*(J*B*r));k=C*B*(A*B*r)-n*(J*B*r);w=C*B*(J*B*r)+n*(A*B*r);p=C*B*(A*B*r)+n*(J*B*r);h=1.0-(C*B*(C*B*r)+J*B*(J*B*r));t=A*B*(J*B*r)-n*(C*B*r);q=C*B*(J*B*r)-n*(A*B*r);n=A*B*(J*B*r)+n*(C*B*r);r=1.0-(C*B*(C*B*r)+A*B*(A*B*r));B=+f[b+(c*284|0)+68>>2];A=+f[b+(c*284|0)+72>>2];C=+f[b+(c*284|0)+76>>2];f[b+(c*284|0)+92>>2]=C*(H*w+G*t+I*r)+(B*(I*q+(G*p+H*o))+A*(I*n+(H*k+G*h)));f[b+(c*284|0)+96>>2]=z*(H*w+G*t+I*r)+(y*(I*q+(G*p+H*o))+x*(I*n+(H*k+G*h)));f[b+(c*284|0)+100>>2]=(H*w+G*t+I*r)*-e+((I*q+(G*p+H*o))*-i+(I*n+(H*k+G*h))*-g);f[b+(c*284|0)+104>>2]=0.0;f[b+(c*284|0)+108>>2]=C*(E*w+t*D+F*r)+(B*(F*q+(p*D+E*o))+A*(F*n+(E*k+D*h)));f[b+(c*284|0)+112>>2]=z*(E*w+t*D+F*r)+(y*(F*q+(p*D+E*o))+x*(F*n+(E*k+D*h)));f[b+(c*284|0)+116>>2]=(E*w+t*D+F*r)*-e+((F*q+(p*D+E*o))*-i+(F*n+(E*k+D*h))*-g);f[b+(c*284|0)+120>>2]=0.0;f[b+(c*284|0)+124>>2]=C*(l*w+j*t+m*r)+(B*(q*m+(j*p+l*o))+A*(n*m+(l*k+j*h)));f[b+(c*284|0)+128>>2]=z*(l*w+j*t+m*r)+(y*(q*m+(j*p+l*o))+x*(n*m+(l*k+j*h)));f[b+(c*284|0)+132>>2]=(l*w+j*t+m*r)*-e+((q*m+(j*p+l*o))*-i+(n*m+(l*k+j*h))*-g);f[b+(c*284|0)+136>>2]=0.0;h=+f[b+(c*284|0)+32>>2];g=g*h+ +f[b+(c*284|0)+40>>2];e=e*h+ +f[b+(c*284|0)+44>>2];f[b+(c*284|0)+140>>2]=+f[b+(c*284|0)+36>>2]+i*h;f[b+(c*284|0)+144>>2]=g;f[b+(c*284|0)+148>>2]=e;f[b+(c*284|0)+152>>2]=0.0;return}function vd(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0.0;C=ea;ea=ea+32|0;p=+f[d>>2];j=(f[h>>2]=p,c[h>>2]|0);s=p<999999984306749440.0?j:1566444395;o=+f[d+4>>2];l=(f[h>>2]=o,c[h>>2]|0);t=o<999999984306749440.0?l:1566444395;D=+f[d+8>>2];n=(f[h>>2]=D,c[h>>2]|0);v=D<999999984306749440.0?n:1566444395;r=+f[d+12>>2];x=r<0.0?r:0.0;j=p>-999999984306749440.0?j:-581039253;l=o>-999999984306749440.0?l:-581039253;n=D>-999999984306749440.0?n:-581039253;r=r>0.0?r:0.0;D=+f[d+16>>2];A=D<(c[h>>2]=s,+f[h>>2]);i=(f[h>>2]=D,c[h>>2]|0);s=A?i:s;o=+f[d+20>>2];A=o<(c[h>>2]=t,+f[h>>2]);k=(f[h>>2]=o,c[h>>2]|0);t=A?k:t;p=+f[d+24>>2];A=p<(c[h>>2]=v,+f[h>>2]);m=(f[h>>2]=p,c[h>>2]|0);v=A?m:v;q=+f[d+28>>2];x=q(c[h>>2]=j,+f[h>>2])?i:j;u=o>(c[h>>2]=l,+f[h>>2])?k:l;l=p>(c[h>>2]=n,+f[h>>2])?m:n;r=r>2];A=D<(c[h>>2]=s,+f[h>>2]);i=(f[h>>2]=D,c[h>>2]|0);A=A?i:s;p=+f[d+36>>2];z=p<(c[h>>2]=t,+f[h>>2]);j=(f[h>>2]=p,c[h>>2]|0);z=z?j:t;q=+f[d+40>>2];y=q<(c[h>>2]=v,+f[h>>2]);k=(f[h>>2]=q,c[h>>2]|0);y=y?k:v;o=+f[d+44>>2];x=o(c[h>>2]=w,+f[h>>2])?i:w;u=p>(c[h>>2]=u,+f[h>>2])?j:u;t=q>(c[h>>2]=l,+f[h>>2])?k:l;o=r>2]|0;i=c[s+4>>2]|0;if((i|0)==(c[s+8>>2]|0)?(B=(i|0)==0?1:i<<1,(i|0)<(B|0)):0){if(!B)j=0;else{c[6747]=(c[6747]|0)+1;i=kb(B<<6|19)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[s+4>>2]|0}if((i|0)>0){k=0;do{l=j+(k<<6)|0;m=(c[s+12>>2]|0)+(k<<6)|0;n=l+64|0;do{c[l>>2]=c[m>>2];l=l+4|0;m=m+4|0}while((l|0)<(n|0));k=k+1|0}while((k|0)!=(i|0))}i=c[s+12>>2]|0;if(i|0){if(a[s+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[s+12>>2]=0}a[s+16>>0]=1;c[s+12>>2]=j;c[s+8>>2]=B;i=c[s+4>>2]|0}B=c[s+12>>2]|0;c[B+(i<<6)>>2]=A;c[B+(i<<6)+4>>2]=z;c[B+(i<<6)+8>>2]=y;f[B+(i<<6)+12>>2]=x;c[B+(i<<6)+16>>2]=v;c[B+(i<<6)+20>>2]=u;c[B+(i<<6)+24>>2]=t;f[B+(i<<6)+28>>2]=o;c[B+(i<<6)+32>>2]=-1;c[B+(i<<6)+36>>2]=e;c[B+(i<<6)+40>>2]=g;g=B+(i<<6)+44|0;c[g>>2]=c[C>>2];c[g+4>>2]=c[C+4>>2];c[g+8>>2]=c[C+8>>2];c[g+12>>2]=c[C+12>>2];c[g+16>>2]=c[C+16>>2];c[s+4>>2]=(c[s+4>>2]|0)+1;ea=C;return}function wd(b,d){b=b|0;d=+d;var e=0,g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0;r=ea;ea=ea+32|0;e=c[b+136>>2]|0;if((e|0)>0){g=0;do{ud(c[b+116>>2]|0,c[b+144>>2]|0,g,0);g=g+1|0;e=c[b+136>>2]|0}while((g|0)<(e|0))}q=c[b+116>>2]|0;l=+f[q+312>>2];m=+f[q+316>>2];h=+f[q+320>>2];h=+s(+(l*l+m*m+h*h))*3.5999999046325684;f[b+112>>2]=h;p=c[b+128>>2]|0;if(+f[q+4+(p<<2)>>2]*+f[q+312>>2]+ +f[q+20+(p<<2)>>2]*+f[q+316>>2]+ +f[q+36+(p<<2)>>2]*+f[q+320>>2]<0.0)f[b+112>>2]=-h;if((e|0)>0){e=0;do{+me(b,(c[b+144>>2]|0)+(e*284|0)|0);e=e+1|0;g=c[b+136>>2]|0}while((e|0)<(g|0));i=1.0/+f[(c[b+116>>2]|0)+344>>2];if((g|0)>0){g=0;do{e=c[b+144>>2]|0;if(!(a[e+(g*284|0)+84>>0]|0))h=0.0;else{h=+f[e+(g*284|0)+272>>2];h=i*(+f[e+(g*284|0)+216>>2]*(+f[e+(g*284|0)+204>>2]-+f[e+(g*284|0)+32>>2])*+f[e+(g*284|0)+268>>2]-h*+f[(h<0.0?e+(g*284|0)+220|0:e+(g*284|0)+224|0)>>2]);h=h<0.0?0.0:h}f[e+(g*284|0)+276>>2]=h;g=g+1|0;e=c[b+136>>2]|0}while((g|0)<(e|0));if((e|0)>0){e=0;do{p=c[b+144>>2]|0;k=+f[p+(e*284|0)+276>>2];m=+f[p+(e*284|0)+248>>2];k=k>m?m:k;m=k*+f[p+(e*284|0)+4>>2]*d;l=k*+f[p+(e*284|0)+8>>2]*d;f[r+16>>2]=+f[p+(e*284|0)>>2]*k*d;f[r+16+4>>2]=m;f[r+16+8>>2]=l;f[r+16+12>>2]=0.0;q=c[b+116>>2]|0;l=+f[p+(e*284|0)+20>>2]-+f[q+56>>2];m=+f[p+(e*284|0)+24>>2]-+f[q+60>>2];f[r>>2]=+f[p+(e*284|0)+16>>2]-+f[q+52>>2];f[r+4>>2]=l;f[r+8>>2]=m;f[r+12>>2]=0.0;uk(q,r+16|0,r);e=e+1|0}while((e|0)<(c[b+136>>2]|0))}}}Da[c[(c[b>>2]|0)+20>>2]&31](b,d);n=c[b+136>>2]|0;if((n|0)<=0){ea=r;return}o=c[b+144>>2]|0;p=c[b+116>>2]|0;q=0;do{k=+f[o+(q*284|0)+36>>2]-+f[p+52>>2];m=+f[o+(q*284|0)+40>>2]-+f[p+56>>2];l=+f[o+(q*284|0)+44>>2]-+f[p+60>>2];h=+f[p+332>>2];i=+f[p+336>>2];j=+f[p+328>>2];if(!(a[o+(q*284|0)+84>>0]|0)){e=o+(q*284|0)+240|0;j=+f[e>>2];g=o+(q*284|0)+236|0;h=j;i=+f[g>>2]}else{e=c[b+128>>2]|0;y=+f[p+4+(e<<2)>>2];w=+f[p+20+(e<<2)>>2];u=+f[p+36+(e<<2)>>2];x=+f[o+(q*284|0)>>2];v=+f[o+(q*284|0)+4>>2];t=+f[o+(q*284|0)+8>>2];j=((m*j-k*h+ +f[p+320>>2])*(u-t*(y*x+w*v+u*t))+((h*l-m*i+ +f[p+312>>2])*(y-x*(y*x+w*v+u*t))+(k*i-l*j+ +f[p+316>>2])*(w-v*(y*x+w*v+u*t))))*d/+f[o+(q*284|0)+212>>2];e=o+(q*284|0)+240|0;f[e>>2]=j;g=o+(q*284|0)+236|0;h=+f[g>>2];i=j}f[g>>2]=h+i;f[e>>2]=j*.9900000095367432;q=q+1|0}while((q|0)!=(n|0));ea=r;return}function xd(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;var h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0;n=ea;ea=ea+16|0;i=+f[d>>2];j=+f[d+4>>2];k=+f[d+8>>2];l=+f[e>>2];m=+f[e+4>>2];h=+f[e+8>>2];if(!(a[b+228>>0]|0)){y=+f[b+100>>2];v=+f[b+116>>2];B=+f[b+132>>2];x=+f[b+104>>2];t=+f[b+120>>2];A=+f[b+136>>2];w=+f[b+108>>2];r=+f[b+124>>2];z=+f[b+140>>2];E=-+f[b+148>>2];D=-+f[b+152>>2];C=-+f[b+156>>2];I=+f[b+164>>2];H=+f[b+168>>2];q=+f[b+172>>2];G=+f[b+180>>2];F=+f[b+184>>2];p=+f[b+188>>2];u=+f[b+196>>2];s=+f[b+200>>2];o=+f[b+204>>2];q=h*(B*I+A*H+z*q)+(l*(y*I+x*H+w*q)+m*(v*I+t*H+r*q))+(I*(y*E+v*D+B*C)+(x*E+t*D+A*C)*H+(w*E+r*D+z*C)*q+ +f[b+212>>2]);p=h*(B*G+A*F+z*p)+(l*(y*G+x*F+w*p)+m*(v*G+t*F+r*p))+((y*E+v*D+B*C)*G+(x*E+t*D+A*C)*F+(w*E+r*D+z*C)*p+ +f[b+216>>2]);o=(y*E+v*D+B*C)*u+(x*E+t*D+A*C)*s+(w*E+r*D+z*C)*o+ +f[b+220>>2]+(h*(B*u+A*s+z*o)+(l*(y*u+x*s+w*o)+m*(v*u+t*s+r*o)));f[n>>2]=q;f[n+4>>2]=p;f[n+8>>2]=o;g=i*(i*g+l-q)+j*(j*g+m-p)+k*(k*g+h-o);e=n+12|0;f[e>>2]=0.0;b=b+32|0;b=c[b>>2]|0;e=c[b>>2]|0;e=e+16|0;e=c[e>>2]|0;Na[e&15](b,d,n,g);ea=n;return}else{y=+f[b+36>>2];B=+f[b+52>>2];v=+f[b+68>>2];z=+f[b+40>>2];D=+f[b+56>>2];w=+f[b+72>>2];A=+f[b+44>>2];F=+f[b+60>>2];x=+f[b+76>>2];s=-+f[b+84>>2];t=-+f[b+88>>2];u=-+f[b+92>>2];o=+f[b+164>>2];p=+f[b+168>>2];G=+f[b+172>>2];q=+f[b+180>>2];r=+f[b+184>>2];H=+f[b+188>>2];C=+f[b+196>>2];E=+f[b+200>>2];I=+f[b+204>>2];G=(k*g+h)*(v*o+w*p+x*G)+((i*g+l)*(y*o+z*p+A*G)+(j*g+m)*(B*o+D*p+F*G))+(o*(y*s+B*t+v*u)+(z*s+D*t+w*u)*p+(A*s+F*t+x*u)*G+ +f[b+212>>2]);H=(k*g+h)*(v*q+w*r+x*H)+((i*g+l)*(y*q+z*r+A*H)+(j*g+m)*(B*q+D*r+F*H))+((y*s+B*t+v*u)*q+(z*s+D*t+w*u)*r+(A*s+F*t+x*u)*H+ +f[b+216>>2]);I=(y*s+B*t+v*u)*C+(z*s+D*t+w*u)*E+(A*s+F*t+x*u)*I+ +f[b+220>>2]+((k*g+h)*(v*C+w*E+x*I)+((i*g+l)*(y*C+z*E+A*I)+(j*g+m)*(B*C+D*E+F*I)));f[n>>2]=G+i*(i*(G-l)+j*(H-m)+k*(I-h));f[n+4>>2]=H+j*(i*(G-l)+j*(H-m)+k*(I-h));f[n+8>>2]=I+k*(i*(G-l)+j*(H-m)+k*(I-h));I=i*(G-l)+j*(H-m)+k*(I-h);e=n+12|0;f[e>>2]=0.0;b=b+32|0;b=c[b>>2]|0;e=c[b>>2]|0;e=e+16|0;e=c[e>>2]|0;Na[e&15](b,d,n,I);ea=n;return}}function yd(b,d,e,g,i,j,k,l){b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0;c[b+4>>2]=4;c[b+8>>2]=-1;c[b+12>>2]=-1;f[b+16>>2]=3402823466385288598117041.0e14;a[b+20>>0]=1;a[b+21>>0]=0;c[b+24>>2]=-1;c[b+28>>2]=d;c[b+32>>2]=e;f[b+36>>2]=0.0;f[b+40>>2]=.30000001192092896;c[b+44>>2]=0;c[b>>2]=5820;f[b+688>>2]=0.0;f[b+692>>2]=-1.0;f[b+696>>2]=.8999999761581421;f[b+700>>2]=.30000001192092896;f[b+704>>2]=1.0;f[b+708>>2]=0.0;f[b+712>>2]=0.0;a[b+716>>0]=0;a[b+736>>0]=0;a[b+737>>0]=0;a[b+738>>0]=0;a[b+739>>0]=1;a[b+740>>0]=l&1;c[b+748>>2]=0;c[b+600>>2]=c[g>>2];c[b+600+4>>2]=c[g+4>>2];c[b+600+8>>2]=c[g+8>>2];c[b+600+12>>2]=c[g+12>>2];o=+f[d+4>>2];p=+f[d+20>>2];m=+f[d+36>>2];q=+f[j>>2];t=+f[j+4>>2];n=+f[j+8>>2];do if(!(o*q+p*t+m*n>=.9999998807907104))if(!(o*q+p*t+m*n<=-.9999998807907104)){u=(f[h>>2]=m*t-p*n,c[h>>2]|0);g=(f[h>>2]=o*n-m*q,c[h>>2]|0);z=n*(o*n-m*q)-t*(p*q-o*t);A=q*(p*q-o*t)-n*(m*t-p*n);y=t*(m*t-p*n)-q*(o*n-m*q);e=(f[h>>2]=p*q-o*t,c[h>>2]|0);break}else{z=+f[d+12>>2];A=+f[d+28>>2];y=+f[d+44>>2];u=c[d+8>>2]|0;e=c[d+40>>2]|0;g=c[d+24>>2]|0;break}else{z=-+f[d+12>>2];A=-+f[d+28>>2];y=-+f[d+44>>2];u=c[d+8>>2]|0;e=c[d+40>>2]|0;g=c[d+24>>2]|0}while(0);f[b+552>>2]=z;c[b+556>>2]=u;c[b+560>>2]=c[j>>2];f[b+564>>2]=0.0;f[b+568>>2]=A;c[b+572>>2]=g;c[b+576>>2]=c[j+4>>2];f[b+580>>2]=0.0;f[b+584>>2]=y;c[b+588>>2]=e;c[b+592>>2]=c[j+8>>2];f[b+596>>2]=0.0;m=+f[j+4>>2];v=+f[k+8>>2];p=+f[j+8>>2];w=+f[k+4>>2];x=+f[k>>2];n=+f[j>>2];do if(v*p+(m*w+x*n)<-.9999998807907104)if(+r(+p)>.7071067690849304){n=1.0/+s(+(m*m+p*p));q=0.0;t=m*n;o=0.0;m=-(p*n);break}else{p=1.0/+s(+(m*m+n*n));q=0.0;t=0.0;o=-(m*p);m=n*p;break}else{B=+s(+((v*p+(m*w+x*n)+1.0)*2.0));q=B*.5;t=(w*n-m*x)*(1.0/B);o=(m*v-p*w)*(1.0/B);m=(p*x-v*n)*(1.0/B)}while(0);D=z*q+y*m-A*t;p=A*q+z*t-y*o;n=y*q+A*o-z*m;C=-(z*o)-A*m-y*t;z=-o;o=-m;y=-t;B=p*y+(q*D+C*z)-n*o;A=n*z+(q*p+C*o)-D*y;z=D*o+(C*y+q*n)-p*z;c[b+664>>2]=c[i>>2];c[b+664+4>>2]=c[i+4>>2];c[b+664+8>>2]=c[i+8>>2];c[b+664+12>>2]=c[i+12>>2];f[b+616>>2]=B;f[b+620>>2]=w*z-v*A;c[b+624>>2]=c[k>>2];f[b+628>>2]=0.0;f[b+632>>2]=A;f[b+636>>2]=v*B-x*z;c[b+640>>2]=c[k+4>>2];f[b+644>>2]=0.0;f[b+648>>2]=z;f[b+652>>2]=x*A-w*B;c[b+656>>2]=c[k+8>>2];f[b+660>>2]=0.0;f[b+732>>2]=l?-1.0:1.0;return}function zd(b){b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=ea;ea=ea+16|0;Fi(14723);j=c[b+204>>2]|0;Ma[c[(c[j>>2]|0)+8>>2]&127](j,b,c[b+24>>2]|0);j=c[b+308>>2]|0;if((j|0)>0){k=c[b+316>>2]|0;l=0;do{e=c[k+(l<<2)>>2]|0;d=c[e+740>>2]|0;e=c[e+744>>2]|0;if((d|0?(e|0?(c[d+204>>2]&3|0)==0:0):0)?(c[e+204>>2]&3|0)==0:0){g=c[d+208>>2]|0;d=c[e+208>>2]|0;i=c[(c[b+204>>2]|0)+16>>2]|0;e=c[i+(g<<3)>>2]|0;if((e|0)!=(g|0)){c[i+(g<<3)>>2]=c[i+(e<<3)>>2];g=c[i+(e<<3)>>2]|0;e=c[i+(g<<3)>>2]|0;if((g|0)!=(e|0)){h=i+(g<<3)|0;do{g=i+(e<<3)|0;c[h>>2]=c[g>>2];g=c[g>>2]|0;h=i+(g<<3)|0;e=c[h>>2]|0}while((g|0)!=(e|0))}}e=c[i+(d<<3)>>2]|0;if((e|0)!=(d|0)){c[i+(d<<3)>>2]=c[i+(e<<3)>>2];d=c[i+(e<<3)>>2]|0;e=c[i+(d<<3)>>2]|0;if((d|0)!=(e|0)){h=i+(d<<3)|0;do{d=i+(e<<3)|0;c[h>>2]=c[d>>2];d=c[d>>2]|0;h=i+(d<<3)|0;e=c[h>>2]|0}while((d|0)!=(e|0))}}if((g|0)!=(d|0)){c[i+(g<<3)>>2]=d;h=i+(d<<3)+4|0;c[h>>2]=(c[h>>2]|0)+(c[i+(g<<3)+4>>2]|0)}}l=l+1|0}while((l|0)!=(j|0))}j=c[b+212>>2]|0;if((j|0)>0){k=c[b+220>>2]|0;l=0;do{d=c[k+(l<<2)>>2]|0;if((a[d+20>>0]|0?(m=c[d+28>>2]|0,(c[m+204>>2]&3|0)==0):0)?(n=c[d+32>>2]|0,(c[n+204>>2]&3|0)==0):0){e=c[m+208>>2]|0;d=c[n+208>>2]|0;i=c[(c[b+204>>2]|0)+16>>2]|0;g=c[i+(e<<3)>>2]|0;if((g|0)!=(e|0)){c[i+(e<<3)>>2]=c[i+(g<<3)>>2];e=c[i+(g<<3)>>2]|0;g=c[i+(e<<3)>>2]|0;if((e|0)!=(g|0)){h=i+(e<<3)|0;do{e=i+(g<<3)|0;c[h>>2]=c[e>>2];e=c[e>>2]|0;h=i+(e<<3)|0;g=c[h>>2]|0}while((e|0)!=(g|0))}}g=c[i+(d<<3)>>2]|0;if((g|0)!=(d|0)){c[i+(d<<3)>>2]=c[i+(g<<3)>>2];d=c[i+(g<<3)>>2]|0;g=c[i+(d<<3)>>2]|0;if((d|0)!=(g|0)){h=i+(d<<3)|0;do{d=i+(g<<3)|0;c[h>>2]=c[d>>2];d=c[d>>2]|0;h=i+(d<<3)|0;g=c[h>>2]|0}while((d|0)!=(g|0))}}if((e|0)!=(d|0)){c[i+(e<<3)>>2]=d;h=i+(d<<3)+4|0;c[h>>2]=(c[h>>2]|0)+(c[i+(e<<3)+4>>2]|0)}}l=l+1|0}while((l|0)!=(j|0))}d=c[b+204>>2]|0;Ia[c[(c[d>>2]|0)+12>>2]&127](d,b);d=c[2685]|0;b=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=b;if(b|0){ea=o;return}do if(c[d+4>>2]|0){Y(o|0,0)|0;b=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[o+4>>2]|0)-(c[b+4>>2]|0)+(((c[o>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=o;return}}while(0);c[2685]=c[d+20>>2];ea=o;return}function Ad(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;var h=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0.0,x=0,y=0;t=ea;ea=ea+192|0;i=c[(c[b+4>>2]|0)+740>>2]|0;j=c[(c[b+8>>2]|0)+8>>2]|0;k=+f[e>>2];n=+f[d>>2]*g+k;l=+f[e+4>>2];p=+f[d+4>>2]*g+l;m=+f[e+8>>2];o=+f[d+8>>2]*g+m;if((i|0)!=(j|0)){u=c[(c[b+12>>2]|0)+8>>2]|0;w=n-+f[u+52>>2];v=p-+f[u+56>>2];s=o-+f[u+60>>2];h=j;q=w*+f[u+4>>2]+v*+f[u+20>>2]+s*+f[u+36>>2];r=w*+f[u+8>>2]+v*+f[u+24>>2]+s*+f[u+40>>2];s=w*+f[u+12>>2]+v*+f[u+28>>2]+s*+f[u+44>>2]}else{v=n-+f[i+52>>2];w=p-+f[i+56>>2];s=o-+f[i+60>>2];h=c[(c[b+12>>2]|0)+8>>2]|0;q=v*+f[i+4>>2]+w*+f[i+20>>2]+s*+f[i+36>>2];r=v*+f[i+8>>2]+w*+f[i+24>>2]+s*+f[i+40>>2];s=v*+f[i+12>>2]+w*+f[i+28>>2]+s*+f[i+44>>2]}k=k-+f[h+52>>2];l=l-+f[h+56>>2];w=m-+f[h+60>>2];m=k*+f[h+4>>2]+l*+f[h+20>>2]+w*+f[h+36>>2];v=k*+f[h+8>>2]+l*+f[h+24>>2]+w*+f[h+40>>2];w=k*+f[h+12>>2]+l*+f[h+28>>2]+w*+f[h+44>>2];f[t>>2]=q;f[t+4>>2]=r;f[t+8>>2]=s;f[t+12>>2]=0.0;f[t+16>>2]=m;f[t+20>>2]=v;f[t+24>>2]=w;f[t+28>>2]=0.0;c[t+64>>2]=c[d>>2];c[t+64+4>>2]=c[d+4>>2];c[t+64+8>>2]=c[d+8>>2];c[t+64+12>>2]=c[d+12>>2];f[t+80>>2]=g;f[t+84>>2]=0.0;f[t+88>>2]=0.0;f[t+92>>2]=0.0;c[t+112>>2]=0;a[t+116>>0]=0;c[t+120>>2]=0;c[t+120+4>>2]=0;c[t+120+8>>2]=0;c[t+120+12>>2]=0;c[t+120+16>>2]=0;c[t+120+20>>2]=0;c[t+120+24>>2]=0;c[t+120+28>>2]=0;f[t+48>>2]=n;f[t+52>>2]=p;f[t+56>>2]=o;f[t+60>>2]=0.0;c[t+32>>2]=c[e>>2];c[t+32+4>>2]=c[e+4>>2];c[t+32+8>>2]=c[e+8>>2];c[t+32+12>>2]=c[e+12>>2];if((i|0)!=(j|0)){u=b+24|0;h=b+28|0;e=b+16|0;x=b+20|0;u=c[u>>2]|0;h=c[h>>2]|0;e=c[e>>2]|0;x=c[x>>2]|0;d=t+96|0;c[d>>2]=x;d=t+100|0;c[d>>2]=e;d=t+104|0;c[d>>2]=h;d=t+108|0;c[d>>2]=u;d=b+12|0;y=(i|0)!=(j|0)?d:b+8|0;y=c[y>>2]|0;d=(i|0)!=(j|0)?b+8|0:d;d=c[d>>2]|0;b=b+32|0;b=c[b>>2]|0;j=c[b>>2]|0;j=j+12|0;j=c[j>>2]|0;+oa[j&1](b,t,y,x,h,d,e,u);ea=t;return}else{y=b+28|0;e=b+24|0;x=b+20|0;d=b+16|0;y=c[y>>2]|0;e=c[e>>2]|0;x=c[x>>2]|0;d=c[d>>2]|0;u=t+96|0;c[u>>2]=d;u=t+100|0;c[u>>2]=x;u=t+104|0;c[u>>2]=e;u=t+108|0;c[u>>2]=y;u=b+12|0;h=(i|0)!=(j|0)?u:b+8|0;h=c[h>>2]|0;u=(i|0)!=(j|0)?b+8|0:u;u=c[u>>2]|0;b=b+32|0;b=c[b>>2]|0;j=c[b>>2]|0;j=j+12|0;j=c[j>>2]|0;+oa[j&1](b,t,h,d,e,u,x,y);ea=t;return}}function Bd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0.0;d=ea;ea=ea+96|0;k=+f[b>>2];l=+f[a+28>>2];x=+f[b+4>>2];y=+f[a+32>>2];z=+f[b+8>>2];A=+f[a+36>>2];B=+f[a+44>>2];C=+f[a+48>>2];D=+f[a+52>>2];E=+f[a+60>>2];m=+f[a+64>>2];n=+f[a+68>>2];o=+f[a+76>>2];p=+f[a+80>>2];q=+f[a+84>>2];f[d+80>>2]=k*l+x*y+z*A+o;f[d+80+4>>2]=k*B+x*C+z*D+p;f[d+80+8>>2]=k*E+x*m+z*n+q;f[d+80+12>>2]=0.0;r=+f[b+16>>2];t=+f[b+20>>2];u=+f[b+24>>2];f[d+64>>2]=o+(l*r+y*t+A*u);f[d+64+4>>2]=p+(B*r+C*t+D*u);f[d+64+8>>2]=q+(E*r+m*t+n*u);f[d+64+12>>2]=0.0;v=+f[b+32>>2];w=+f[b+36>>2];g=+f[b+40>>2];f[d+48>>2]=o+(l*v+y*w+A*g);f[d+48+4>>2]=p+(B*v+C*w+D*g);f[d+48+8>>2]=q+(E*v+m*w+n*g);f[d+48+12>>2]=0.0;h=(k*l+x*y+z*A+o+(o+(l*r+y*t+A*u))+(o+(l*v+y*w+A*g)))*.3333333432674408;i=(k*B+x*C+z*D+p+(p+(B*r+C*t+D*u))+(p+(B*v+C*w+D*g)))*.3333333432674408;j=(k*E+x*m+z*n+q+(q+(E*r+m*t+n*u))+(q+(E*v+m*w+n*g)))*.3333333432674408;f[d+32>>2]=h;f[d+32+4>>2]=i;f[d+32+8>>2]=j;f[d+32+12>>2]=0.0;b=c[a+8>>2]|0;if(!((ra[c[(c[b>>2]|0)+48>>2]&127](b)|0)&16384)){e=c[a+8>>2]|0;F=c[e>>2]|0;F=F+8|0;F=c[F>>2]|0;b=a+12|0;Pa[F&127](e,d+80|0,d+64|0,b);e=c[a+8>>2]|0;F=c[e>>2]|0;F=F+8|0;F=c[F>>2]|0;Pa[F&127](e,d+64|0,d+48|0,b);a=c[a+8>>2]|0;e=c[a>>2]|0;e=e+8|0;e=c[e>>2]|0;Pa[e&127](a,d+48|0,d+80|0,b);ea=d;return}I=+f[d+80>>2];H=p+(B*r+C*t+D*u)-(k*B+x*C+z*D+p);G=q+(E*r+m*t+n*u)-(k*E+x*m+z*n+q);B=p+(B*v+C*w+D*g)-(k*B+x*C+z*D+p);z=q+(E*v+m*w+n*g)-(k*E+x*m+z*n+q);C=G*(o+(l*v+y*w+A*g)-I)-(o+(l*r+y*t+A*u)-I)*z;D=(o+(l*r+y*t+A*u)-I)*B-H*(o+(l*v+y*w+A*g)-I);E=1.0/+s(+(D*D+((H*z-G*B)*(H*z-G*B)+C*C)));c[d+16>>2]=1065353216;c[d+16+4>>2]=1065353216;c[d+16+8>>2]=0;f[d+16+12>>2]=0.0;b=c[a+8>>2]|0;e=c[(c[b>>2]|0)+8>>2]|0;f[d>>2]=(H*z-G*B)*E+h;f[d+4>>2]=C*E+i;f[d+8>>2]=D*E+j;f[d+12>>2]=0.0;Pa[e&127](b,d+32|0,d,d+16|0);b=c[a+8>>2]|0;e=c[b>>2]|0;e=e+8|0;e=c[e>>2]|0;F=a+12|0;Pa[e&127](b,d+80|0,d+64|0,F);b=c[a+8>>2]|0;e=c[b>>2]|0;e=e+8|0;e=c[e>>2]|0;Pa[e&127](b,d+64|0,d+48|0,F);a=c[a+8>>2]|0;b=c[a>>2]|0;b=b+8|0;b=c[b>>2]|0;Pa[b&127](a,d+48|0,d+80|0,F);ea=d;return}function Cd(a,b,d){a=a|0;b=b|0;d=d|0;var e=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;if(!((a|0)!=0&(b|0)!=0))return;c[6747]=(c[6747]|0)+1;e=kb(1043)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}c[e>>2]=a;c[e+4>>2]=b;j=e;g=e;h=e;q=1;a=128;m=e;k=128;e=124;while(1){n=q+-1|0;o=c[m+(n<<3)>>2]|0;p=c[m+(n<<3)+4>>2]|0;if((n|0)>(e|0)){i=k<<1;do if((k|0)<(i|0)&(a|0)<(i|0)){if(k){c[6747]=(c[6747]|0)+1;e=kb((k<<4|3)+16|0)|0;if(!e)a=0;else{c[(e+4+15&-16)+-4>>2]=e;a=e+4+15&-16}if((k|0)>0){e=0;do{g=m+(e<<3)|0;h=c[g+4>>2]|0;l=a+(e<<3)|0;c[l>>2]=c[g>>2];c[l+4>>2]=h;e=e+1|0}while((e|0)!=(k|0));b=a;e=a}else{b=a;e=a;r=13}}else{b=0;e=0;r=13}if((r|0)==13){r=0;if(!m){g=e;h=e;a=i;break}}if(!j){g=e;h=e;a=i}else{c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);g=e;h=e;a=i}}else{e=j;b=m}while(0);j=e;l=a;k=i;i=i+-4|0}else{l=a;b=m;i=e}do if((o|0)==(p|0))if(!(c[o+40>>2]|0))e=n;else{p=c[o+36>>2]|0;c[b+(n<<3)>>2]=p;c[b+(n<<3)+4>>2]=p;p=c[o+40>>2]|0;e=q+1|0;c[b+(q<<3)>>2]=p;c[b+(q<<3)+4>>2]=p;p=c[o+40>>2]|0;c[b+(e<<3)>>2]=c[o+36>>2];c[b+(e<<3)+4>>2]=p;e=q+2|0}else if(((((+f[o>>2]<=+f[p+16>>2]?+f[o+16>>2]>=+f[p>>2]:0)?+f[o+4>>2]<=+f[p+20>>2]:0)?+f[o+20>>2]>=+f[p+4>>2]:0)?+f[o+8>>2]<=+f[p+24>>2]:0)?+f[o+24>>2]>=+f[p+8>>2]:0){a=(c[p+40>>2]|0)!=0;if(!(c[o+40>>2]|0))if(a){e=c[p+36>>2]|0;c[b+(n<<3)>>2]=o;c[b+(n<<3)+4>>2]=e;e=c[p+40>>2]|0;c[b+(q<<3)>>2]=o;c[b+(q<<3)+4>>2]=e;e=q+1|0;break}else{Ma[c[(c[d>>2]|0)+8>>2]&127](d,o,p);e=n;break}else{e=c[o+36>>2]|0;if(a){m=c[p+36>>2]|0;c[b+(n<<3)>>2]=e;c[b+(n<<3)+4>>2]=m;m=c[p+36>>2]|0;n=q+1|0;c[b+(q<<3)>>2]=c[o+40>>2];c[b+(q<<3)+4>>2]=m;m=c[p+40>>2]|0;e=q+2|0;c[b+(n<<3)>>2]=c[o+36>>2];c[b+(n<<3)+4>>2]=m;p=c[p+40>>2]|0;c[b+(e<<3)>>2]=c[o+40>>2];c[b+(e<<3)+4>>2]=p;e=q+3|0;break}else{c[b+(n<<3)>>2]=e;c[b+(n<<3)+4>>2]=p;c[b+(q<<3)>>2]=c[o+40>>2];c[b+(q<<3)+4>>2]=p;e=q+1|0;break}}}else e=n;while(0);if(!e)break;else{q=e;a=l;m=b;e=i}}if((b|0)==0|(g|0)==0)return;c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);return}function Dd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0;J=ea;ea=ea+32|0;if(!a){ea=J;return}F=+f[d>>2]-+f[b>>2];G=+f[d+4>>2]-+f[b+4>>2];B=+f[d+8>>2]-+f[b+8>>2];A=1.0/+s(+(F*F+G*G+B*B));x=F*A==0.0?999999984306749440.0:1.0/(F*A);y=G*A==0.0?999999984306749440.0:1.0/(G*A);z=B*A==0.0?999999984306749440.0:1.0/(B*A);c[6747]=(c[6747]|0)+1;d=kb(531)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}hk(d+4|0,0,508)|0;c[d>>2]=a;t=d;o=d;p=d;w=1;a=128;v=d;m=128;l=126;while(1){q=w+-1|0;n=v+(q<<2)|0;u=c[n>>2]|0;c[J>>2]=c[u>>2];c[J+4>>2]=c[u+4>>2];c[J+8>>2]=c[u+8>>2];c[J+12>>2]=c[u+12>>2];c[J+16>>2]=c[u+16>>2];c[J+16+4>>2]=c[u+16+4>>2];c[J+16+8>>2]=c[u+16+8>>2];c[J+16+12>>2]=c[u+16+12>>2];i=+f[b>>2];h=x*(+f[J+((x<0.0&1)<<4)>>2]-i);i=x*(+f[J+(((x<0.0^1)&1)<<4)>>2]-i);k=+f[b+4>>2];j=y*(+f[J+((y<0.0&1)<<4)+4>>2]-k);k=y*(+f[J+(((y<0.0^1)&1)<<4)+4>>2]-k);do if((!(j>i|h>k)?(C=j>h?j:h,H=k>2],D=z*(+f[J+((z<0.0&1)<<4)+8>>2]-E),E=z*(+f[J+(((z<0.0^1)&1)<<4)+8>>2]-E),!(D>H|C>E)):0)?((E0.0?(D>C?D:C)>2]|0)){Ia[c[(c[e>>2]|0)+12>>2]&127](e,u);d=t;n=q;g=v;break}if((q|0)>(l|0)){r=m<<1;if((m|0)<(r|0)){do if((a|0)<(r|0)){if(m){c[6747]=(c[6747]|0)+1;d=kb((m<<3|3)+16|0)|0;if(!d)a=0;else{c[(d+4+15&-16)+-4>>2]=d;a=d+4+15&-16}if((m|0)>0){d=0;do{c[a+(d<<2)>>2]=c[v+(d<<2)>>2];d=d+1|0}while((d|0)!=(m|0));g=a;d=a}else{g=a;d=a;I=18}}else{g=0;d=0;I=18}if((I|0)==18){I=0;if(!v){o=d;l=d;a=r;break}}if(!t){o=d;l=d;a=r}else{c[6748]=(c[6748]|0)+1;uc(c[t+-4>>2]|0);o=d;l=d;a=r}}else{l=p;d=t;g=v}while(0);hk(g+(m<<2)|0,0,m<<2|0)|0;n=g+(q<<2)|0;m=o}else{m=o;l=p;d=t;g=v}o=m;p=l;m=r;l=r+-2|0}else{d=t;g=v}c[n>>2]=c[u+36>>2];c[g+(w<<2)>>2]=c[u+40>>2];n=w+1|0}else{d=t;n=q;g=v}while(0);if(!n)break;t=d;w=n;v=g}if((g|0)==0|(o|0)==0){ea=J;return}c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0);ea=J;return}function Ed(b,d,e,g,h,i){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;c[b+4>>2]=6;c[b+8>>2]=-1;c[b+12>>2]=-1;f[b+16>>2]=3402823466385288598117041.0e14;a[b+20>>0]=1;a[b+21>>0]=0;c[b+24>>2]=-1;c[b+28>>2]=d;c[b+32>>2]=e;f[b+36>>2]=0.0;f[b+40>>2]=.30000001192092896;c[b+44>>2]=0;c[b>>2]=5492;c[b+48>>2]=c[g>>2];c[b+48+4>>2]=c[g+4>>2];c[b+48+8>>2]=c[g+8>>2];c[b+48+12>>2]=c[g+12>>2];c[b+64>>2]=c[g+16>>2];c[b+64+4>>2]=c[g+16+4>>2];c[b+64+8>>2]=c[g+16+8>>2];c[b+64+12>>2]=c[g+16+12>>2];c[b+80>>2]=c[g+32>>2];c[b+80+4>>2]=c[g+32+4>>2];c[b+80+8>>2]=c[g+32+8>>2];c[b+80+12>>2]=c[g+32+12>>2];c[b+96>>2]=c[g+48>>2];c[b+96+4>>2]=c[g+48+4>>2];c[b+96+8>>2]=c[g+48+8>>2];c[b+96+12>>2]=c[g+48+12>>2];c[b+112>>2]=c[h>>2];c[b+112+4>>2]=c[h+4>>2];c[b+112+8>>2]=c[h+8>>2];c[b+112+12>>2]=c[h+12>>2];c[b+128>>2]=c[h+16>>2];c[b+128+4>>2]=c[h+16+4>>2];c[b+128+8>>2]=c[h+16+8>>2];c[b+128+12>>2]=c[h+16+12>>2];c[b+144>>2]=c[h+32>>2];c[b+144+4>>2]=c[h+32+4>>2];c[b+144+8>>2]=c[h+32+8>>2];c[b+144+12>>2]=c[h+32+12>>2];c[b+160>>2]=c[h+48>>2];c[b+160+4>>2]=c[h+48+4>>2];c[b+160+8>>2]=c[h+48+8>>2];c[b+160+12>>2]=c[h+48+12>>2];g=b+680|0;h=g+48|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(h|0));c[b+740>>2]=0;c[b+740+4>>2]=0;c[b+740+8>>2]=0;c[b+740+12>>2]=0;c[b+756>>2]=1045220557;c[b+760>>2]=1045220557;c[b+764>>2]=1045220557;c[b+768>>2]=0;c[b+768+4>>2]=0;c[b+768+8>>2]=0;c[b+768+12>>2]=0;c[b+768+16>>2]=0;f[b+728>>2]=.699999988079071;f[b+732>>2]=1.0;f[b+736>>2]=.5;a[b+788>>0]=0;a[b+788+1>>0]=0;a[b+788+2>>0]=0;c[b+792>>2]=0;c[b+792+4>>2]=0;c[b+792+8>>2]=0;c[b+808>>2]=0;c[b+808+4>>2]=0;c[b+808+8>>2]=0;f[b+928>>2]=0.0;f[b+876>>2]=0.0;f[b+880>>2]=.10000000149011612;f[b+884>>2]=300.0;f[b+868>>2]=1.0;f[b+872>>2]=-1.0;f[b+896>>2]=0.0;f[b+900>>2]=.20000000298023224;f[b+904>>2]=0.0;f[b+908>>2]=0.0;f[b+888>>2]=1.0;f[b+892>>2]=.5;c[b+924>>2]=0;f[b+916>>2]=0.0;a[b+912>>0]=0;f[b+992>>2]=0.0;f[b+940>>2]=0.0;f[b+944>>2]=.10000000149011612;f[b+948>>2]=300.0;f[b+932>>2]=1.0;f[b+936>>2]=-1.0;f[b+960>>2]=0.0;f[b+964>>2]=.20000000298023224;f[b+968>>2]=0.0;f[b+972>>2]=0.0;f[b+952>>2]=1.0;f[b+956>>2]=.5;c[b+988>>2]=0;f[b+980>>2]=0.0;a[b+976>>0]=0;f[b+1056>>2]=0.0;f[b+1004>>2]=0.0;f[b+1008>>2]=.10000000149011612;f[b+1012>>2]=300.0;f[b+996>>2]=1.0;f[b+1e3>>2]=-1.0;f[b+1024>>2]=0.0;f[b+1028>>2]=.20000000298023224;f[b+1032>>2]=0.0;f[b+1036>>2]=0.0;f[b+1016>>2]=1.0;f[b+1020>>2]=.5;c[b+1052>>2]=0;f[b+1044>>2]=0.0;a[b+1040>>0]=0;a[b+1300>>0]=i&1;a[b+1301>>0]=1;c[b+1304>>2]=0;a[b+1308>>0]=0;gc(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);return}function Fd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0,i=0,j=0.0;a=ea;ea=ea+144|0;switch(c[b+388>>2]&15){case 1:{c[a+112>>2]=4428;h=c[d+8>>2]|0;h=(c[h+236>>2]&2|0)==0?0:h;i=c[d+12>>2]|0;j=+f[i+48>>2];e=+f[i+52>>2];g=+f[i+56>>2];g=+s(+((j-j)*(j-j)+(e-e)*(e-e)+(g-g)*(g-g)));i=c[b+192>>2]|0;e=+ha[c[(c[i>>2]|0)+48>>2]&15](i);i=c[d+4>>2]|0;Pa[c[(c[i>>2]|0)+8>>2]&127](i,c[d+12>>2]|0,a+96|0,a+64|0);c[a>>2]=c[a+96>>2];c[a+4>>2]=c[a+96+4>>2];c[a+8>>2]=c[a+96+8>>2];c[a+12>>2]=c[a+96+12>>2];c[a+16>>2]=c[a+64>>2];c[a+16+4>>2]=c[a+64+4>>2];c[a+16+8>>2]=c[a+64+8>>2];c[a+16+12>>2]=c[a+64+12>>2];c[a+32>>2]=c[a>>2];c[a+32+4>>2]=c[a+4>>2];c[a+32+8>>2]=c[a+8>>2];c[a+32+12>>2]=c[a+12>>2];c[a+32+16>>2]=c[a+16>>2];c[a+32+20>>2]=c[a+20>>2];c[a+32+24>>2]=c[a+24>>2];c[a+32+28>>2]=c[a+28>>2];f[a+32>>2]=+f[a+32>>2]-e;f[a+32+4>>2]=+f[a+32+4>>2]-e;f[a+32+8>>2]=+f[a+32+8>>2]-e;f[a+32+16>>2]=e+ +f[a+32+16>>2];f[a+32+20>>2]=e+ +f[a+32+20>>2];f[a+32+24>>2]=e+ +f[a+32+24>>2];c[a+112+4>>2]=b;c[a+112+8>>2]=d;c[a+112+12>>2]=h;f[a+112+16>>2]=e+g;f[a+112+20>>2]=e;Zd(c[b+928>>2]|0,a+32|0,a+112|0);ea=a;return}case 2:{f[a+4>>2]=1.0;c[a+8+4>>2]=0;c[a+8+4+4>>2]=0;c[a+8+4+8>>2]=0;c[a>>2]=4464;c[a+24>>2]=b;c[a+28>>2]=d;c[a+8>>2]=c[b+456>>2];i=c[d+4>>2]|0;j=+ha[c[(c[i>>2]|0)+48>>2]&15](i);i=c[b+192>>2]|0;j=j+ +ha[c[(c[i>>2]|0)+48>>2]&15](i);f[a+12>>2]=j;g=+f[(c[d+8>>2]|0)+224>>2];f[a+112>>2]=g;c[a+16>>2]=c[(+f[b+316>>2]>2];i=c[d+4>>2]|0;Pa[c[(c[i>>2]|0)+8>>2]&127](i,c[d+12>>2]|0,a+112|0,a+96|0);c[a+32>>2]=c[a+112>>2];c[a+32+4>>2]=c[a+112+4>>2];c[a+32+8>>2]=c[a+112+8>>2];c[a+32+12>>2]=c[a+112+12>>2];c[a+32+16>>2]=c[a+96>>2];c[a+32+16+4>>2]=c[a+96+4>>2];c[a+32+16+8>>2]=c[a+96+8>>2];c[a+32+16+12>>2]=c[a+96+12>>2];c[a+64>>2]=c[a+32>>2];c[a+64+4>>2]=c[a+32+4>>2];c[a+64+8>>2]=c[a+32+8>>2];c[a+64+12>>2]=c[a+32+12>>2];c[a+64+16>>2]=c[a+32+16>>2];c[a+64+20>>2]=c[a+32+20>>2];c[a+64+24>>2]=c[a+32+24>>2];c[a+64+28>>2]=c[a+32+28>>2];f[a+64>>2]=+f[a+64>>2]-j;f[a+64+4>>2]=+f[a+64+4>>2]-j;f[a+64+8>>2]=+f[a+64+8>>2]-j;f[a+64+16>>2]=j+ +f[a+64+16>>2];f[a+64+20>>2]=j+ +f[a+64+20>>2];f[a+64+24>>2]=j+ +f[a+64+24>>2];Zd(c[b+1048>>2]|0,a+64|0,a);ea=a;return}default:{ea=a;return}}}function Gd(a,e,f){a=a|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;c[e+16>>2]=c[a+20>>2];c[e+20>>2]=c[a+24>>2];c[e+24>>2]=c[a+28>>2];c[e+28>>2]=c[a+32>>2];c[e>>2]=c[a+4>>2];c[e+4>>2]=c[a+8>>2];c[e+8>>2]=c[a+12>>2];c[e+12>>2]=c[a+16>>2];c[e+32>>2]=c[a+36>>2];c[e+36>>2]=c[a+40>>2];c[e+40>>2]=c[a+44>>2];c[e+44>>2]=c[a+48>>2];c[e+48>>2]=c[a+56>>2];c[e+52>>2]=d[a+60>>0];k=c[a+88>>2]|0;c[e+56>>2]=k;if(k){k=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[a+96>>2]|0)|0;c[e+64>>2]=k;if(k|0){h=c[a+88>>2]|0;k=va[c[(c[f>>2]|0)+16>>2]&63](f,48,h)|0;if((h|0)>0){g=c[a+96>>2]|0;i=0;j=c[k+8>>2]|0;while(1){c[j+16>>2]=c[g+(i<<6)+16>>2];c[j+20>>2]=c[g+(i<<6)+20>>2];c[j+24>>2]=c[g+(i<<6)+24>>2];c[j+28>>2]=c[g+(i<<6)+28>>2];c[j>>2]=c[g+(i<<6)>>2];c[j+4>>2]=c[g+(i<<6)+4>>2];c[j+8>>2]=c[g+(i<<6)+8>>2];c[j+12>>2]=c[g+(i<<6)+12>>2];c[j+32>>2]=c[g+(i<<6)+32>>2];c[j+36>>2]=c[g+(i<<6)+36>>2];c[j+40>>2]=c[g+(i<<6)+40>>2];i=i+1|0;if((i|0)==(h|0))break;else j=j+48|0}}else g=c[a+96>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,k,21211,1497453121,g)}}else c[e+64>>2]=0;k=c[a+128>>2]|0;c[e+60>>2]=k;if(k){k=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[a+136>>2]|0)|0;c[e+68>>2]=k;if(k|0){h=c[a+128>>2]|0;k=va[c[(c[f>>2]|0)+16>>2]&63](f,16,h)|0;if((h|0)>0){g=c[a+136>>2]|0;i=0;j=c[k+8>>2]|0;while(1){c[j+12>>2]=c[g+(i<<4)+12>>2];b[j+6>>1]=b[g+(i<<4)+6>>1]|0;b[j+8>>1]=b[g+(i<<4)+8>>1]|0;b[j+10>>1]=b[g+(i<<4)+10>>1]|0;b[j>>1]=b[g+(i<<4)>>1]|0;b[j+2>>1]=b[g+(i<<4)+2>>1]|0;b[j+4>>1]=b[g+(i<<4)+4>>1]|0;i=i+1|0;if((i|0)==(h|0))break;else j=j+16|0}}else g=c[a+136>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,k,21234,1497453121,g)}}else c[e+68>>2]=0;c[e+76>>2]=c[a+144>>2];k=c[a+152>>2]|0;c[e+80>>2]=k;if(!k){c[e+72>>2]=0;return 21278}k=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[a+160>>2]|0)|0;c[e+72>>2]=k;if(!k)return 21278;j=c[a+152>>2]|0;k=va[c[(c[f>>2]|0)+16>>2]&63](f,20,j)|0;if((j|0)>0){g=c[a+160>>2]|0;h=0;i=c[k+8>>2]|0;while(1){b[i+14>>1]=b[g+(h<<5)+6>>1]|0;b[i+16>>1]=b[g+(h<<5)+8>>1]|0;b[i+18>>1]=b[g+(h<<5)+10>>1]|0;b[i+8>>1]=b[g+(h<<5)>>1]|0;b[i+10>>1]=b[g+(h<<5)+2>>1]|0;b[i+12>>1]=b[g+(h<<5)+4>>1]|0;c[i>>2]=c[g+(h<<5)+12>>2];c[i+4>>2]=c[g+(h<<5)+16>>2];h=h+1|0;if((h|0)==(j|0))break;else i=i+20|0}}else g=c[a+160>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,k,21257,1497453121,g);return 21278}function Hd(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0;g=c[b+748>>2]|0;if((g|0)<=0)return;do{k=g;g=g+-1|0;r=+f[b+4+(g*184|0)>>2];s=+f[b+4+(g*184|0)+4>>2];h=+f[b+4+(g*184|0)+8>>2];q=r*+f[d>>2]+s*+f[d+4>>2]+h*+f[d+8>>2]+ +f[d+48>>2];o=r*+f[d+16>>2]+s*+f[d+20>>2]+h*+f[d+24>>2]+ +f[d+52>>2];h=r*+f[d+32>>2]+s*+f[d+36>>2]+h*+f[d+40>>2]+ +f[d+56>>2];f[b+4+(g*184|0)+48>>2]=q;f[b+4+(g*184|0)+52>>2]=o;f[b+4+(g*184|0)+56>>2]=h;f[b+4+(g*184|0)+60>>2]=0.0;s=+f[b+4+(g*184|0)+16>>2];r=+f[b+4+(g*184|0)+20>>2];i=+f[b+4+(g*184|0)+24>>2];p=s*+f[e>>2]+r*+f[e+4>>2]+i*+f[e+8>>2]+ +f[e+48>>2];n=s*+f[e+16>>2]+r*+f[e+20>>2]+i*+f[e+24>>2]+ +f[e+52>>2];i=s*+f[e+32>>2]+r*+f[e+36>>2]+i*+f[e+40>>2]+ +f[e+56>>2];f[b+4+(g*184|0)+32>>2]=p;f[b+4+(g*184|0)+36>>2]=n;f[b+4+(g*184|0)+40>>2]=i;f[b+4+(g*184|0)+44>>2]=0.0;f[b+4+(g*184|0)+80>>2]=(q-p)*+f[b+4+(g*184|0)+64>>2]+(o-n)*+f[b+4+(g*184|0)+68>>2]+(h-i)*+f[b+4+(g*184|0)+72>>2];j=b+4+(g*184|0)+148|0;c[j>>2]=(c[j>>2]|0)+1}while((k|0)>1);g=c[b+748>>2]|0;if((g|0)<=0)return;do{k=g;g=g+-1|0;j=b+4+(g*184|0)|0;h=+f[b+4+(g*184|0)+80>>2];i=+f[b+752>>2];do if(!(h<=i)){e=b+4+(g*184|0)+112|0;d=c[e>>2]|0;if(d|0?(l=c[6719]|0,l|0):0){ra[l&127](d)|0;c[e>>2]=0}d=(c[b+748>>2]|0)+-1|0;if((d|0)==(g|0))d=g;else{vh(j|0,b+4+(d*184|0)|0,184)|0;c[b+4+(d*184|0)+112>>2]=0;f[b+4+(d*184|0)+120>>2]=0.0;a[b+4+(d*184|0)+116>>0]=0;f[b+4+(d*184|0)+124>>2]=0.0;f[b+4+(d*184|0)+128>>2]=0.0;c[b+4+(d*184|0)+148>>2]=0;d=(c[b+748>>2]|0)+-1|0}c[b+748>>2]=d}else{q=+f[b+4+(g*184|0)+32>>2]-(+f[b+4+(g*184|0)+48>>2]-+f[b+4+(g*184|0)+64>>2]*h);r=+f[b+4+(g*184|0)+36>>2]-(+f[b+4+(g*184|0)+52>>2]-h*+f[b+4+(g*184|0)+68>>2]);s=+f[b+4+(g*184|0)+40>>2]-(+f[b+4+(g*184|0)+56>>2]-h*+f[b+4+(g*184|0)+72>>2]);if(!(q*q+r*r+s*s>i*i)){d=c[6720]|0;if(!d)break;va[d&63](j,c[b+740>>2]|0,c[b+744>>2]|0)|0;break}e=b+4+(g*184|0)+112|0;d=c[e>>2]|0;if(d|0?(m=c[6719]|0,m|0):0){ra[m&127](d)|0;c[e>>2]=0}d=(c[b+748>>2]|0)+-1|0;if((d|0)==(g|0))d=g;else{vh(j|0,b+4+(d*184|0)|0,184)|0;c[b+4+(d*184|0)+112>>2]=0;f[b+4+(d*184|0)+120>>2]=0.0;a[b+4+(d*184|0)+116>>0]=0;f[b+4+(d*184|0)+124>>2]=0.0;f[b+4+(d*184|0)+128>>2]=0.0;c[b+4+(d*184|0)+148>>2]=0;d=(c[b+748>>2]|0)+-1|0}c[b+748>>2]=d}while(0)}while((k|0)>1);return}function Id(a,d,g,h,i){a=a|0;d=d|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c[d+16>>2]=c[g>>2];c[d+16+4>>2]=c[g+4>>2];c[d+16+8>>2]=c[g+8>>2];c[d+16+12>>2]=c[g+12>>2];c[d+32>>2]=c[h>>2];c[d+32+4>>2]=c[h+4>>2];c[d+32+8>>2]=c[h+8>>2];c[d+32+12>>2]=c[h+12>>2];B=c[a+60>>2]|0;D=c[d+12>>2]&65535;q=+f[a+8>>2];t=+f[a+12>>2];w=+f[a+16>>2];r=+f[a+40>>2];n=(+f[g>>2]-q)*r;u=+f[a+44>>2];o=(+f[g+4>>2]-t)*u;v=+f[a+48>>2];p=(+f[g+8>>2]-w)*v;if(!(n<=0.0)){z=b[a+6>>1]|0;z=b[a+4>>1]&(!(n>=+(z&65535))?~~n&65535:z)}else z=0;if(!(o<=0.0)){A=b[a+6>>1]|0;A=b[a+4>>1]&(!(o>=+(A&65535))?~~o&65535:A)}else A=0;if(!(p<=0.0)){C=b[a+6>>1]|0;C=b[a+4>>1]&(!(p>=+(C&65535))?~~p&65535:C)}else C=0;p=(+f[h>>2]-q)*r;o=(+f[h+4>>2]-t)*u;n=(+f[h+8>>2]-w)*v;if(!(p<=0.0)){s=b[a+6>>1]|0;s=b[a+4>>1]&(!(p>=+(s&65535))?~~p&65535:s)|1}else s=1;if(!(o<=0.0)){x=b[a+6>>1]|0;x=b[a+4>>1]&(!(o>=+(x&65535))?~~o&65535:x)|1}else x=1;if(!(n<=0.0)){y=b[a+6>>1]|0;y=b[a+4>>1]&(!(n>=+(y&65535))?~~n&65535:y)|1}else y=1;j=b[B+(D<<6)+48>>1]|0;k=b[B+(D<<6)+54>>1]|0;E=c[a+68>>2]|0;l=(z&65535)-(e[E+((j&65535)<<2)>>1]|0)|0;m=(s&65535)-(e[E+((k&65535)<<2)>>1]|0)|0;b[E+((j&65535)<<2)>>1]=z;b[E+((k&65535)<<2)>>1]=s;if((l|0)<0)Fg(a,0,j);if((m|0)>0)Cg(a,0,k);if((l|0)>0)Ag(a,0,j,i);if((m|0)<0)zg(a,0,k,i);j=b[B+(D<<6)+50>>1]|0;k=b[B+(D<<6)+56>>1]|0;E=c[a+72>>2]|0;l=(A&65535)-(e[E+((j&65535)<<2)>>1]|0)|0;m=(x&65535)-(e[E+((k&65535)<<2)>>1]|0)|0;b[E+((j&65535)<<2)>>1]=A;b[E+((k&65535)<<2)>>1]=x;if((l|0)<0)Fg(a,1,j);if((m|0)>0)Cg(a,1,k);if((l|0)>0)Ag(a,1,j,i);if((m|0)<0)zg(a,1,k,i);m=b[B+(D<<6)+52>>1]|0;j=b[B+(D<<6)+58>>1]|0;E=c[a+76>>2]|0;k=(C&65535)-(e[E+((m&65535)<<2)>>1]|0)|0;l=(y&65535)-(e[E+((j&65535)<<2)>>1]|0)|0;b[E+((m&65535)<<2)>>1]=C;b[E+((j&65535)<<2)>>1]=y;if((k|0)<0)Fg(a,2,m);if((l|0)>0)Cg(a,2,j);if((k|0)>0)Ag(a,2,m,i);if((l|0)<0)zg(a,2,j,i);j=c[a+108>>2]|0;if(!j)return;Ta[c[(c[j>>2]|0)+16>>2]&31](j,c[d+60>>2]|0,g,h,i);return}function Jd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0;z=+f[a+452>>2];u=+f[a+304>>2];r=+f[a+300>>2];if(u>0.0|r>0.0)g=(c[a+288>>2]|0)<4;else g=0;E=c[a+720>>2]|0;C=+f[E+(d*104|0)+88>>2];if(!(C>0.0))return;o=c[c[a+684>>2]>>2]|0;if(!g)return;D=+f[E+(d*104|0)+40>>2];m=D-+f[b>>2];A=+f[E+(d*104|0)+44>>2];n=A-+f[b+4>>2];B=+f[E+(d*104|0)+48>>2];l=B-+f[b+8>>2];k=+s(+(m*m+n*n+l*l));if(!(m*m+n*n+l*l>1.1920928955078125e-07))return;v=m*(1.0/k);x=n*(1.0/k);y=l*(1.0/k);q=+f[E+(d*104|0)+72>>2];t=+f[E+(d*104|0)+76>>2];w=+f[E+(d*104|0)+80>>2];switch(c[a+288>>2]|0){case 2:{p=m*q+n*t+l*w<0.0?-1.0:1.0;i=y*(w*p)+(v*(q*p)+x*(t*p));j=+f[E+(d*104|0)+92>>2]*.5;e=(c[h>>2]=o,+f[h>>2]);n=i*(r*.5*e*(m*m+n*n+l*l)*j);if(i>0.0&i<.9847999811172485){k=+s(+(1.0-i*i))*(u*.5*e*k*j);l=(y*(v*(w*p)-y*(q*p))-x*(x*(q*p)-v*(t*p)))*k;m=(v*(x*(q*p)-v*(t*p))-y*(y*(t*p)-x*(w*p)))*k;k=(x*(y*(t*p)-x*(w*p))-v*(v*(w*p)-y*(q*p)))*k}else{l=0.0;m=0.0;k=0.0}e=z*(C*-(y*n))*(z*(C*-(y*n)))+(z*(C*-(v*n))*(z*(C*-(v*n)))+z*(C*-(x*n))*(z*(C*-(x*n))));if(e>0.0?e>=D*D+A*A+B*B:0){e=+s(+(D*D+A*A+B*B))/+s(+e)*.800000011920929;j=e*-(v*n);i=e*-(y*n);e=e*-(x*n)}else{j=-(v*n);i=-(y*n);e=-(x*n)}C=e+ +f[E+(d*104|0)+60>>2];D=i+ +f[E+(d*104|0)+64>>2];f[E+(d*104|0)+56>>2]=l+(j+ +f[E+(d*104|0)+56>>2]);f[E+(d*104|0)+60>>2]=m+C;f[E+(d*104|0)+64>>2]=k+D;return}case 1:case 3:case 0:{e=m*q+n*t+l*w<0.0?-1.0:1.0;if(!(l*(w*e)+(m*(q*e)+n*(t*e))>0.0))return;p=-((m*m+n*n+l*l)*((l*(w*e)+(m*(q*e)+n*(t*e)))*+f[E+(d*104|0)+92>>2])*.5*(c[h>>2]=o,+f[h>>2]));j=v*(r*p)+(q*e*(u*p)+0.0);i=x*(r*p)+(t*e*(u*p)+0.0);e=y*(r*p)+(w*e*(u*p)+0.0);if(z*C*e*(z*C*e)+(z*C*j*(z*C*j)+z*C*i*(z*C*i))>D*D+A*A+B*B){y=1.0/+s(+(e*e+(j*j+i*i)));f[E+(d*104|0)+56>>2]=+f[E+(d*104|0)+56>>2]-1.0/(z*C)*(j*y*(B*(e*y)+(D*(j*y)+A*(i*y))));f[E+(d*104|0)+60>>2]=+f[E+(d*104|0)+60>>2]-1.0/(z*C)*(i*y*(B*(e*y)+(D*(j*y)+A*(i*y))));f[E+(d*104|0)+64>>2]=+f[E+(d*104|0)+64>>2]-1.0/(z*C)*(e*y*(B*(e*y)+(D*(j*y)+A*(i*y))));return}else{f[E+(d*104|0)+56>>2]=j+ +f[E+(d*104|0)+56>>2];f[E+(d*104|0)+60>>2]=i+ +f[E+(d*104|0)+60>>2];f[E+(d*104|0)+64>>2]=e+ +f[E+(d*104|0)+64>>2];return}}default:return}}function Kd(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0;g=Bs()|0;Jk();c[g+4>>2]=7;c[g+8>>2]=-1;c[g+12>>2]=-1;f[g+16>>2]=3402823466385288598117041.0e14;a[g+20>>0]=1;a[g+21>>0]=0;c[g+24>>2]=-1;c[g+28>>2]=25640;c[g+32>>2]=b;f[g+36>>2]=0.0;f[g+40>>2]=.30000001192092896;c[g+44>>2]=0;c[g>>2]=5712;a[g+48>>0]=0;c[g+116>>2]=c[d>>2];c[g+116+4>>2]=c[d+4>>2];c[g+116+8>>2]=c[d+8>>2];c[g+116+12>>2]=c[d+12>>2];c[g+132>>2]=c[d+16>>2];c[g+132+4>>2]=c[d+16+4>>2];c[g+132+8>>2]=c[d+16+8>>2];c[g+132+12>>2]=c[d+16+12>>2];c[g+148>>2]=c[d+32>>2];c[g+148+4>>2]=c[d+32+4>>2];c[g+148+8>>2]=c[d+32+8>>2];c[g+148+12>>2]=c[d+32+12>>2];c[g+164>>2]=c[d+48>>2];c[g+164+4>>2]=c[d+48+4>>2];c[g+164+8>>2]=c[d+48+8>>2];c[g+164+12>>2]=c[d+48+12>>2];a[g+180>>0]=e&1;v=+f[g+116>>2];B=+f[b+4>>2];u=+f[g+132>>2];A=+f[b+8>>2];t=+f[g+148>>2];z=+f[b+12>>2];s=+f[g+120>>2];r=+f[g+136>>2];q=+f[g+152>>2];p=+f[g+124>>2];n=+f[g+140>>2];l=+f[g+156>>2];y=+f[b+20>>2];x=+f[b+24>>2];w=+f[b+28>>2];o=+f[b+36>>2];m=+f[b+40>>2];k=+f[b+44>>2];D=+f[g+164>>2];C=+f[g+168>>2];h=+f[g+172>>2];j=+f[b+52>>2]+(B*D+A*C+z*h);i=y*D+x*C+w*h+ +f[b+56>>2];h=o*D+m*C+k*h+ +f[b+60>>2];f[g+52>>2]=v*B+u*A+t*z;f[g+56>>2]=B*s+A*r+z*q;f[g+60>>2]=B*p+A*n+z*l;f[g+64>>2]=0.0;f[g+68>>2]=v*y+u*x+t*w;f[g+72>>2]=s*y+r*x+q*w;f[g+76>>2]=p*y+n*x+l*w;f[g+80>>2]=0.0;f[g+84>>2]=v*o+u*m+t*k;f[g+88>>2]=s*o+r*m+q*k;f[g+92>>2]=p*o+n*m+l*k;f[g+96>>2]=0.0;f[g+100>>2]=j;f[g+104>>2]=i;f[g+108>>2]=h;f[g+112>>2]=0.0;f[g+184>>2]=1.0;f[g+188>>2]=-1.0;f[g+192>>2]=0.0;f[g+196>>2]=0.0;f[g+200>>2]=1.0;f[g+204>>2]=.699999988079071;f[g+208>>2]=0.0;f[g+212>>2]=0.0;f[g+216>>2]=1.0;f[g+220>>2]=.699999988079071;f[g+224>>2]=0.0;f[g+228>>2]=0.0;f[g+264>>2]=1.0;f[g+268>>2]=.699999988079071;f[g+272>>2]=1.0;f[g+276>>2]=0.0;f[g+280>>2]=1.0;f[g+284>>2]=.699999988079071;f[g+288>>2]=1.0;f[g+292>>2]=0.0;f[g+232>>2]=1.0;f[g+236>>2]=.699999988079071;f[g+240>>2]=1.0;f[g+244>>2]=0.0;f[g+248>>2]=1.0;f[g+252>>2]=.699999988079071;f[g+256>>2]=1.0;f[g+260>>2]=0.0;a[g+1096>>0]=0;f[g+1116>>2]=0.0;f[g+1120>>2]=0.0;f[g+1124>>2]=0.0;c[g+300>>2]=0;c[g+1100>>2]=0;c[g+1100+4>>2]=0;c[g+1100+8>>2]=0;a[g+1100+12>>0]=0;a[g+49>>0]=1;Zb(g,(c[g+28>>2]|0)+4|0,(c[g+32>>2]|0)+4|0);return g|0}function Ld(a,b,d,e,g,h,i,j){a=a|0;b=b|0;d=d|0;e=+e;g=+g;h=+h;i=i|0;j=j|0;var k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0;U=ea;ea=ea+32|0;Q=+f[d>>2];S=+f[d+4>>2];R=+f[d+8>>2];r=+f[i>>2];t=+f[i+4>>2];u=+f[i+8>>2];n=+f[j>>2];p=+f[j+4>>2];q=+f[j+8>>2];J=1.0/+s(+((e-Q)*(e-Q)+(g-S)*(g-S)+(h-R)*(h-R)));G=(e-Q)*J==0.0?999999984306749440.0:1.0/((e-Q)*J);H=(g-S)*J==0.0?999999984306749440.0:1.0/((g-S)*J);I=(h-R)*J==0.0?999999984306749440.0:1.0/((h-R)*J);B=(Q>e?e:Q)+r;F=(S>g?g:S)+t;D=(R>h?h:R)+u;A=(Q>2]|0;a:do if((l|0)>0){x=0;y=c[a+96>>2]|0;k=0;while(1){k=k+1|0;c[U>>2]=c[y>>2];c[U+4>>2]=c[y+4>>2];c[U+8>>2]=c[y+8>>2];c[U+12>>2]=c[y+12>>2];w=y+16|0;c[U+16>>2]=c[w>>2];c[U+16+4>>2]=c[w+4>>2];c[U+16+8>>2]=c[w+8>>2];c[U+16+12>>2]=c[w+12>>2];f[U>>2]=+f[U>>2]-n;f[U+4>>2]=+f[U+4>>2]-p;f[U+8>>2]=+f[U+8>>2]-q;f[U+16>>2]=+f[U+16>>2]-r;f[U+20>>2]=+f[U+20>>2]-t;f[U+24>>2]=+f[U+24>>2]-u;if(!(B>+f[w>>2])?!(A<+f[y>>2]):0)m=1;else m=0;if(!(!(D>+f[y+24>>2])?!(C<+f[y+8>>2]):0))m=0;if(((!(F>+f[y+20>>2])?!(E<+f[y+4>>2]|m^1):0)?(L=+f[d>>2],K=G*(+f[U+((G<0.0&1)<<4)>>2]-L),L=G*(+f[U+(((G<0.0^1)&1)<<4)>>2]-L),N=+f[d+4>>2],M=H*(+f[U+((H<0.0&1)<<4)+4>>2]-N),N=H*(+f[U+(((H<0.0^1)&1)<<4)+4>>2]-N),!(M>L|K>N)):0)?(z=M>K?M:K,T=N>2],O=I*(+f[U+((I<0.0&1)<<4)+8>>2]-P),P=I*(+f[U+(((I<0.0^1)&1)<<4)+8>>2]-P),!(O>T|z>P)):0){o=(P0.0?(O>z?O:z)<(h-R)*((h-R)*J)+((e-Q)*((e-Q)*J)+(g-S)*((g-S)*J)):0;m=c[y+32>>2]|0;if(o&(m|0)==-1){Ma[c[(c[b>>2]|0)+8>>2]&127](b,c[y+36>>2]|0,c[y+40>>2]|0);l=c[a+56>>2]|0;w=17}else{v=m;m=(m|0)==-1;w=16}}else{m=c[y+32>>2]|0;v=m;m=(m|0)==-1;o=0;w=16}if((w|0)==16){w=0;if(m|o)w=17;else{o=v+x|0;m=y+(v<<6)|0}}if((w|0)==17){o=x+1|0;m=y+64|0}if((o|0)>=(l|0))break a;n=+f[j>>2];p=+f[j+4>>2];q=+f[j+8>>2];r=+f[i>>2];t=+f[i+4>>2];u=+f[i+8>>2];x=o;y=m}}else k=0;while(0);if((c[6727]|0)>=(k|0)){ea=U;return}c[6727]=k;ea=U;return}function Md(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;if(!(c[a+204>>2]&2)){c[a+68>>2]=c[b>>2];c[a+68+4>>2]=c[b+4>>2];c[a+68+8>>2]=c[b+8>>2];c[a+68+12>>2]=c[b+12>>2];c[a+84>>2]=c[b+16>>2];c[a+84+4>>2]=c[b+16+4>>2];c[a+84+8>>2]=c[b+16+8>>2];c[a+84+12>>2]=c[b+16+12>>2];c[a+100>>2]=c[b+32>>2];c[a+100+4>>2]=c[b+32+4>>2];c[a+100+8>>2]=c[b+32+8>>2];c[a+100+12>>2]=c[b+32+12>>2];c[a+116>>2]=c[b+48>>2];c[a+116+4>>2]=c[b+48+4>>2];c[a+116+8>>2]=c[b+48+8>>2];c[a+116+12>>2]=c[b+48+12>>2];e=b;g=a+20|0;h=b+16|0;i=a+36|0;j=b+32|0;k=a+52|0;b=b+48|0;d=a+4|0}else{c[a+68>>2]=c[a+4>>2];c[a+68+4>>2]=c[a+4+4>>2];c[a+68+8>>2]=c[a+4+8>>2];c[a+68+12>>2]=c[a+4+12>>2];c[a+84>>2]=c[a+20>>2];c[a+84+4>>2]=c[a+20+4>>2];c[a+84+8>>2]=c[a+20+8>>2];c[a+84+12>>2]=c[a+20+12>>2];c[a+100>>2]=c[a+36>>2];c[a+100+4>>2]=c[a+36+4>>2];c[a+100+8>>2]=c[a+36+8>>2];c[a+100+12>>2]=c[a+36+12>>2];c[a+116>>2]=c[a+52>>2];c[a+116+4>>2]=c[a+52+4>>2];c[a+116+8>>2]=c[a+52+8>>2];c[a+116+12>>2]=c[a+52+12>>2];e=b;g=a+20|0;h=b+16|0;i=a+36|0;j=b+32|0;k=a+52|0;b=b+48|0;d=a+4|0}c[a+132>>2]=c[a+312>>2];c[a+132+4>>2]=c[a+312+4>>2];c[a+132+8>>2]=c[a+312+8>>2];c[a+132+12>>2]=c[a+312+12>>2];c[a+148>>2]=c[a+328>>2];c[a+148+4>>2]=c[a+328+4>>2];c[a+148+8>>2]=c[a+328+8>>2];c[a+148+12>>2]=c[a+328+12>>2];c[d>>2]=c[e>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];c[d+12>>2]=c[e+12>>2];c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];c[g+12>>2]=c[h+12>>2];c[i>>2]=c[j>>2];c[i+4>>2]=c[j+4>>2];c[i+8>>2]=c[j+8>>2];c[i+12>>2]=c[j+12>>2];c[k>>2]=c[b>>2];c[k+4>>2]=c[b+4>>2];c[k+8>>2]=c[b+8>>2];c[k+12>>2]=c[b+12>>2];w=+f[a+4>>2];q=+f[a+396>>2];v=+f[a+8>>2];o=+f[a+400>>2];u=+f[a+12>>2];m=+f[a+404>>2];t=+f[a+20>>2];s=+f[a+24>>2];r=+f[a+28>>2];p=+f[a+36>>2];n=+f[a+40>>2];l=+f[a+44>>2];f[a+264>>2]=w*(w*q)+v*(v*o)+u*(u*m);f[a+268>>2]=w*q*t+v*o*s+u*m*r;f[a+272>>2]=w*q*p+v*o*n+u*m*l;f[a+276>>2]=0.0;f[a+280>>2]=w*(q*t)+v*(o*s)+u*(m*r);f[a+284>>2]=t*(q*t)+s*(o*s)+r*(m*r);f[a+288>>2]=q*t*p+o*s*n+m*r*l;f[a+292>>2]=0.0;f[a+296>>2]=w*(q*p)+v*(o*n)+u*(m*l);f[a+300>>2]=t*(q*p)+s*(o*n)+r*(m*l);f[a+304>>2]=p*(q*p)+n*(o*n)+l*(m*l);f[a+308>>2]=0.0;return}function Nd(a){a=a|0;var b=0,d=0,e=0,g=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=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;d=ea;ea=ea+144|0;f[a+36>>2]=0.0;c[d+128>>2]=0;c[d+128+4>>2]=0;c[d+128+8>>2]=0;c[d+128+12>>2]=0;b=0;do{e=d+128+(b<<2)|0;f[e>>2]=1.0;i=c[a+28>>2]|0;H=c[i+4>>2]|0;c[d+80>>2]=H;E=c[i+20>>2]|0;c[d+80+4>>2]=E;B=c[i+36>>2]|0;c[d+80+8>>2]=B;f[d+80+12>>2]=0.0;G=c[i+8>>2]|0;c[d+80+16>>2]=G;D=c[i+24>>2]|0;c[d+80+20>>2]=D;A=c[i+40>>2]|0;c[d+80+24>>2]=A;f[d+80+28>>2]=0.0;F=c[i+12>>2]|0;c[d+80+32>>2]=F;C=c[i+28>>2]|0;c[d+80+36>>2]=C;z=c[i+44>>2]|0;c[d+80+40>>2]=z;f[d+80+44>>2]=0.0;g=c[a+32>>2]|0;y=c[g+4>>2]|0;c[d+32>>2]=y;v=c[g+20>>2]|0;c[d+32+4>>2]=v;s=c[g+36>>2]|0;c[d+32+8>>2]=s;f[d+32+12>>2]=0.0;x=c[g+8>>2]|0;c[d+32+16>>2]=x;u=c[g+24>>2]|0;c[d+32+20>>2]=u;r=c[g+40>>2]|0;c[d+32+24>>2]=r;f[d+32+28>>2]=0.0;w=c[g+12>>2]|0;c[d+32+32>>2]=w;t=c[g+28>>2]|0;c[d+32+36>>2]=t;o=c[g+44>>2]|0;c[d+32+40>>2]=o;f[d+32+44>>2]=0.0;p=+f[a+300>>2];l=p*(c[h>>2]=H,+f[h>>2]);j=+f[a+304>>2];l=l+j*(c[h>>2]=G,+f[h>>2]);k=+f[a+308>>2];l=l+k*(c[h>>2]=F,+f[h>>2]);q=p*(c[h>>2]=E,+f[h>>2]);q=q+j*(c[h>>2]=D,+f[h>>2]);q=q+k*(c[h>>2]=C,+f[h>>2]);p=p*(c[h>>2]=B,+f[h>>2]);j=p+j*(c[h>>2]=A,+f[h>>2]);p=+f[i+52>>2];n=+f[i+56>>2];m=+f[i+60>>2];m=j+k*(c[h>>2]=z,+f[h>>2])+m-m;f[d+16>>2]=l+p-p;f[d+16+4>>2]=q+n-n;f[d+16+8>>2]=m;f[d+16+12>>2]=0.0;m=+f[a+316>>2];n=m*(c[h>>2]=y,+f[h>>2]);q=+f[a+320>>2];n=n+q*(c[h>>2]=x,+f[h>>2]);p=+f[a+324>>2];n=n+p*(c[h>>2]=w,+f[h>>2]);l=m*(c[h>>2]=v,+f[h>>2]);l=l+q*(c[h>>2]=u,+f[h>>2]);l=l+p*(c[h>>2]=t,+f[h>>2]);m=m*(c[h>>2]=s,+f[h>>2]);q=m+q*(c[h>>2]=r,+f[h>>2]);m=+f[g+52>>2];k=+f[g+56>>2];j=+f[g+60>>2];j=q+p*(c[h>>2]=o,+f[h>>2])+j-j;f[d>>2]=n+m-m;f[d+4>>2]=l+k-k;f[d+8>>2]=j;f[d+12>>2]=0.0;_f(a+48+(b*84|0)|0,d+80|0,d+32|0,d+16|0,d,d+128|0,i+396|0,+f[i+344>>2],g+396|0,+f[g+344>>2]);f[e>>2]=0.0;b=b+1|0}while((b|0)!=3);ea=d;return}function Od(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,t=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0,G=0,H=0.0;a:while(1){F=c[e+12>>2]|0;if((b|0)>0){h=+f[d>>2];i=+f[d+4>>2];j=+f[d+8>>2];k=0;g=-1;do{do if(c[F+(k<<2)>>2]|0){if((g|0)!=-1?!(h*+f[a+(k<<4)>>2]+i*+f[a+(k<<4)+4>>2]+j*+f[a+(k<<4)+8>>2]>h*+f[a+(g<<4)>>2]+i*+f[a+(g<<4)+4>>2]+j*+f[a+(g<<4)+8>>2]):0)break;g=k}while(0);k=k+1|0}while((k|0)!=(b|0))}else g=-1;E=F+(g<<2)|0;if((c[E>>2]|0)==3){G=40;break}z=+f[d+4>>2];A=+f[d+8>>2];B=+f[d>>2];h=+s(+((z-A*0.0)*(z-A*0.0)+(A*0.0-B)*(A*0.0-B)+(B*0.0-z*0.0)*(B*0.0-z*0.0)));i=+s(+((B-z*0.0)*(B-z*0.0)+((z*0.0-A)*(z*0.0-A)+(A*0.0-B*0.0)*(A*0.0-B*0.0))));if(h>i){C=(z-A*0.0)*(1.0/h);D=(B*0.0-z*0.0)*(1.0/h);x=(A*0.0-B)*(1.0/h)}else{C=(z*0.0-A)*(1.0/i);D=(B-z*0.0)*(1.0/i);x=(A*0.0-B*0.0)*(1.0/i)}r=A*x-z*D;t=B*D-A*C;w=z*C-B*x;p=(g|0)==-1;k=-1;y=0;while(1){q=+(y|0);o=+v(+(q*.01745329238474369));i=+u(+(q*.01745329238474369));h=B+(C*o+r*i)*.02500000037252903;j=z+(x*o+t*i)*.02500000037252903;i=A+(D*o+w*i)*.02500000037252903;if((b|0)>0){m=0;l=-1;do{do if(c[F+(m<<2)>>2]|0){if((l|0)!=-1?!(h*+f[a+(m<<4)>>2]+j*+f[a+(m<<4)+4>>2]+i*+f[a+(m<<4)+8>>2]>h*+f[a+(l<<4)>>2]+j*+f[a+(l<<4)+4>>2]+i*+f[a+(l<<4)+8>>2]):0)break;l=m}while(0);m=m+1|0}while((m|0)!=(b|0))}else l=-1;if((k|0)==(g|0)&(l|0)==(g|0))break a;b:do if(!((k|0)==-1|(k|0)==(l|0))?q+-40.0<=q:0){if((b|0)<=0){h=q+-40.0;while(1){if((k|0)==(g|0)&p){g=-1;break a}h=h+5.0;if(!(h<=q))break b;else k=-1}}o=q+-40.0;while(1){i=o*.01745329238474369;H=+v(+i);i=+u(+i);h=B+(C*H+r*i)*.02500000037252903;j=z+(x*H+t*i)*.02500000037252903;i=A+(D*H+w*i)*.02500000037252903;n=0;m=-1;do{do if(c[F+(n<<2)>>2]|0){if((m|0)!=-1?!(h*+f[a+(n<<4)>>2]+j*+f[a+(n<<4)+4>>2]+i*+f[a+(n<<4)+8>>2]>h*+f[a+(m<<4)>>2]+j*+f[a+(m<<4)+4>>2]+i*+f[a+(m<<4)+8>>2]):0)break;m=n}while(0);n=n+1|0}while((n|0)!=(b|0));if((k|0)==(g|0)&(m|0)==(g|0))break a;o=o+5.0;if(!(o<=q))break;else k=m}}while(0);y=y+45|0;if(y>>>0>360)break;else k=l}c[E>>2]=0}if((G|0)==40)return g|0;c[E>>2]=3;G=g;return G|0}function Pd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;h=ea;ea=ea+160|0;e=c[a+4>>2]|0;g=c[e+12>>2]|0;C=+f[g>>2];B=+f[g+4>>2];A=+f[g+8>>2];z=+f[g+16>>2];y=+f[g+20>>2];x=+f[g+24>>2];q=+f[g+32>>2];o=+f[g+36>>2];m=+f[g+40>>2];e=c[(c[e+4>>2]|0)+24>>2]|0;w=+f[e+(d*80|0)>>2];v=+f[e+(d*80|0)+16>>2];u=+f[e+(d*80|0)+32>>2];t=+f[e+(d*80|0)+4>>2];s=+f[e+(d*80|0)+20>>2];r=+f[e+(d*80|0)+36>>2];p=+f[e+(d*80|0)+8>>2];n=+f[e+(d*80|0)+24>>2];l=+f[e+(d*80|0)+40>>2];E=+f[e+(d*80|0)+48>>2];D=+f[e+(d*80|0)+52>>2];i=+f[e+(d*80|0)+56>>2];k=+f[g+48>>2]+(C*E+B*D+A*i);j=+f[g+52>>2]+(z*E+y*D+x*i);i=+f[g+56>>2]+(q*E+o*D+m*i);f[h+88>>2]=C*w+B*v+A*u;f[h+88+4>>2]=C*t+B*s+A*r;f[h+88+8>>2]=C*p+B*n+A*l;f[h+88+12>>2]=0.0;f[h+88+16>>2]=z*w+y*v+x*u;f[h+88+20>>2]=z*t+y*s+x*r;f[h+88+24>>2]=z*p+y*n+x*l;f[h+88+28>>2]=0.0;f[h+88+32>>2]=q*w+o*v+m*u;f[h+88+36>>2]=q*t+o*s+m*r;f[h+88+40>>2]=q*p+o*n+m*l;f[h+88+44>>2]=0.0;f[h+88+48>>2]=k;f[h+88+52>>2]=j;f[h+88+56>>2]=i;f[h+88+60>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,h+88|0,h+72|0,h+56|0);g=c[a+8>>2]|0;e=c[g+4>>2]|0;Pa[c[(c[e>>2]|0)+8>>2]&127](e,c[g+12>>2]|0,h+40|0,h+24|0);if(!(+f[h+72>>2]>+f[h+24>>2])?!(+f[h+56>>2]<+f[h+40>>2]):0)e=1;else e=0;if(!(!(+f[h+72+8>>2]>+f[h+24+8>>2])?!(+f[h+56+8>>2]<+f[h+40+8>>2]):0))e=0;if(+f[h+72+4>>2]>+f[h+24+4>>2]){ea=h;return}if(+f[h+56+4>>2]<+f[h+40+4>>2]|e^1){ea=h;return}e=c[a+4>>2]|0;g=c[e+8>>2]|0;c[h>>2]=e;c[h+4>>2]=b;c[h+8>>2]=g;c[h+12>>2]=h+88;c[h+16>>2]=-1;c[h+20>>2]=d;if(!(c[(c[a+24>>2]|0)+(d<<2)>>2]|0)){g=c[a+12>>2]|0;g=wa[c[(c[g>>2]|0)+8>>2]&31](g,h,c[a+8>>2]|0,c[a+28>>2]|0)|0;c[(c[a+24>>2]|0)+(d<<2)>>2]=g;g=(c[a+4>>2]|0)+8|0}else g=e+8|0;b=c[a+20>>2]|0;e=c[b+8>>2]|0;if((c[e+8>>2]|0)==(c[g>>2]|0)){c[b+8>>2]=h;Ma[c[(c[b>>2]|0)+8>>2]&127](b,-1,d)}else{e=c[b+12>>2]|0;c[b+12>>2]=h;Ma[c[(c[b>>2]|0)+12>>2]&127](b,-1,d)}d=c[(c[a+24>>2]|0)+(d<<2)>>2]|0;Ta[c[(c[d>>2]|0)+8>>2]&31](d,h,c[a+8>>2]|0,c[a+16>>2]|0,c[a+20>>2]|0);d=c[a+20>>2]|0;c[((c[(c[d+8>>2]|0)+8>>2]|0)==(c[(c[a+4>>2]|0)+8>>2]|0)?d+8|0:d+12|0)>>2]=e;ea=h;return}function Qd(){if(a[24992]|0)return;if(!(DC(24992)|0))return;c[5948]=0;c[5949]=-2147483648;c[5950]=-1082130432;f[5951]=0.0;c[5952]=1060716128;c[5953]=-1090087446;c[5954]=-1092290076;f[5955]=0.0;c[5956]=-1098022214;c[5957]=-1084636126;c[5958]=-1092290076;f[5959]=0.0;c[5960]=-1083901670;c[5961]=-2147483648;c[5962]=-1092290177;f[5963]=0.0;c[5964]=-1098022214;c[5965]=1062847522;c[5966]=-1092290043;f[5967]=0.0;c[5968]=1060716128;c[5969]=1057396202;c[5970]=-1092290076;f[5971]=0.0;c[5972]=1049461434;c[5973]=-1084636126;c[5974]=1055193605;f[5975]=0.0;c[5976]=-1086767520;c[5977]=-1090087446;c[5978]=1055193572;f[5979]=0.0;c[5980]=-1086767520;c[5981]=1057396202;c[5982]=1055193572;f[5983]=0.0;c[5984]=1049461434;c[5985]=1062847522;c[5986]=1055193572;f[5987]=0.0;c[5988]=1063581978;c[5989]=0;c[5990]=1055193471;f[5991]=0.0;c[5992]=-2147483648;c[5993]=0;c[5994]=1065353216;f[5995]=0.0;c[5996]=1054458864;c[5997]=-1096927567;c[5998]=-1084636042;f[5999]=0.0;c[6e3]=-1104782626;c[6001]=-1090519208;c[6002]=-1084636042;f[6003]=0.0;c[6004]=1049007812;c[6005]=-1085334679;c[6006]=-1090087228;f[6007]=0.0;c[6008]=1054458864;c[6009]=1050556081;c[6010]=-1084636042;f[6011]=0.0;c[6012]=1062847505;c[6013]=-2147483648;c[6014]=-1090087262;f[6015]=0.0;c[6016]=-1090087362;c[6017]=-2147483648;c[6018]=-1084636076;f[6019]=0.0;c[6020]=-1087361736;c[6021]=-1090519141;c[6022]=-1090087262;f[6023]=0.0;c[6024]=-1104782626;c[6025]=1056964440;c[6026]=-1084636042;f[6027]=0.0;c[6028]=-1087361736;c[6029]=1056964507;c[6030]=-1090087262;f[6031]=0.0;c[6032]=1049007812;c[6033]=1062148969;c[6034]=-1090087228;f[6035]=0.0;c[6036]=1064532105;c[6037]=1050556148;c[6038]=0;f[6039]=0.0;c[6040]=1064532105;c[6041]=-1096927500;c[6042]=0;f[6043]=0.0;c[6044]=1058437413;c[6045]=-1085334595;c[6046]=0;f[6047]=0.0;c[6048]=0;c[6049]=-1082130432;c[6050]=0;f[6051]=0.0;c[6052]=-1089046235;c[6053]=-1085334595;c[6054]=0;f[6055]=0.0;c[6056]=-1082951543;c[6057]=-1096927500;c[6058]=-2147483648;f[6059]=0.0;c[6060]=-1082951543;c[6061]=1050556148;c[6062]=-2147483648;f[6063]=0.0;c[6064]=-1089046235;c[6065]=1062149053;c[6066]=-2147483648;f[6067]=0.0;c[6068]=-2147483648;c[6069]=1065353216;c[6070]=-2147483648;f[6071]=0.0;c[6072]=1058437413;c[6073]=1062149053;c[6074]=-2147483648;f[6075]=0.0;c[6076]=1060121912;c[6077]=-1090519141;c[6078]=1057396386;f[6079]=0.0;c[6080]=-1098475836;c[6081]=-1085334679;c[6082]=1057396420;f[6083]=0.0;c[6084]=-1084636143;c[6085]=0;c[6086]=1057396386;f[6087]=0.0;c[6088]=-1098475836;c[6089]=1062148969;c[6090]=1057396420;f[6091]=0.0;c[6092]=1060121912;c[6093]=1056964507;c[6094]=1057396386;f[6095]=0.0;c[6096]=1057396286;c[6097]=0;c[6098]=1062847572;f[6099]=0.0;c[6100]=1042701022;c[6101]=-1090519208;c[6102]=1062847606;f[6103]=0.0;c[6104]=-1093024784;c[6105]=-1096927567;c[6106]=1062847606;f[6107]=0.0;c[6108]=-1093024784;c[6109]=1050556081;c[6110]=1062847606;f[6111]=0.0;c[6112]=1042701022;c[6113]=1056964440;c[6114]=1062847606;f[6115]=0.0;PB(24992);return}function Rd(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;d=c[a+748>>2]|0;if((d|0)!=4){c[a+748>>2]=d+1;g=d;e=(g|0)>0;g=e?g:0;a=a+4+(g*184|0)|0;vh(a|0,b|0,184)|0;return g|0}C=+f[b+80>>2];B=+f[a+84>>2];A=B>2];y=z>2];g=+f[a+636>>2]<(x>31;C=+f[b>>2];if(d){h=+f[a+188>>2];n=+f[b+4>>2];i=+f[a+192>>2];p=+f[b+8>>2];j=+f[a+196>>2];l=+f[a+556>>2];t=+f[a+372>>2];m=+f[a+560>>2];y=+f[a+376>>2];o=+f[a+564>>2];w=+f[a+380>>2];k=((C-h)*(m-y)-(n-i)*(l-t))*((C-h)*(m-y)-(n-i)*(l-t))+(((n-i)*(o-w)-(p-j)*(m-y))*((n-i)*(o-w)-(p-j)*(m-y))+((p-j)*(l-t)-(C-h)*(o-w))*((p-j)*(l-t)-(C-h)*(o-w)));if((d|0)==1){v=l;x=m;u=i;q=j;s=w;w=y;j=0.0;m=C-+f[a+4>>2];l=p-+f[a+12>>2];i=n-+f[a+8>>2];e=7}else{u=i;i=n;s=w;z=o;B=y;x=m;A=t;v=l;q=l-t;o=o-w;n=m-y;e=6}}else{t=+f[a+556>>2];q=+f[a+372>>2];y=+f[a+560>>2];n=+f[a+376>>2];w=+f[a+564>>2];o=+f[a+380>>2];h=+f[a+188>>2];u=+f[a+192>>2];j=+f[a+196>>2];i=+f[b+4>>2];p=+f[b+8>>2];s=o;z=w;B=n;x=y;A=q;v=t;k=0.0;q=t-q;o=w-o;n=y-n;e=6}if((e|0)==6){m=C-+f[a+4>>2];i=i-+f[a+8>>2];l=p-+f[a+12>>2];y=i*o-l*n;p=l*q-m*o;n=m*n-i*q;if((d|0)==2){t=A;x=h;v=B;q=j;h=0.0;j=n*n+(y*y+p*p);e=8}else{o=z;q=j;w=B;t=A;j=n*n+(y*y+p*p);e=7}}if((e|0)==7){p=v-h;C=x-u;o=o-q;n=i*o-l*C;o=l*p-m*o;p=m*C-i*p;if(g){h=p*p+(n*n+o*o);i=0.0}else{x=h;v=w;h=p*p+(n*n+o*o);e=8}}if((e|0)==8){A=t-x;z=v-u;C=s-q;B=i*C-l*z;C=l*A-m*C;i=m*z-i*A;i=i*i+(B*B+C*C)}C=+r(+k);A=+r(+j);y=+r(+h);x=+r(+i);B=C>-999999984306749440.0?C:-999999984306749440.0;z=A>B?A:B;g=x>(y>z?y:z)?3:y>z?2:A>B?1:(C>-999999984306749440.0^1)<<31>>31;d=c[a+4+(g*184|0)+112>>2]|0;if(!d){e=(g|0)>0;g=e?g:0;a=a+4+(g*184|0)|0;vh(a|0,b|0,184)|0;return g|0}e=c[6719]|0;if(!e){e=(g|0)>0;g=e?g:0;a=a+4+(g*184|0)|0;vh(a|0,b|0,184)|0;return g|0}ra[e&127](d)|0;c[a+4+(g*184|0)+112>>2]=0;e=(g|0)>0;g=e?g:0;a=a+4+(g*184|0)|0;vh(a|0,b|0,184)|0;return g|0}function Sd(){if(a[24968]|0)return;if(!(DC(24968)|0))return;c[5652]=0;c[5653]=-2147483648;c[5654]=-1082130432;f[5655]=0.0;c[5656]=1060716128;c[5657]=-1090087446;c[5658]=-1092290076;f[5659]=0.0;c[5660]=-1098022214;c[5661]=-1084636126;c[5662]=-1092290076;f[5663]=0.0;c[5664]=-1083901670;c[5665]=-2147483648;c[5666]=-1092290177;f[5667]=0.0;c[5668]=-1098022214;c[5669]=1062847522;c[5670]=-1092290043;f[5671]=0.0;c[5672]=1060716128;c[5673]=1057396202;c[5674]=-1092290076;f[5675]=0.0;c[5676]=1049461434;c[5677]=-1084636126;c[5678]=1055193605;f[5679]=0.0;c[5680]=-1086767520;c[5681]=-1090087446;c[5682]=1055193572;f[5683]=0.0;c[5684]=-1086767520;c[5685]=1057396202;c[5686]=1055193572;f[5687]=0.0;c[5688]=1049461434;c[5689]=1062847522;c[5690]=1055193572;f[5691]=0.0;c[5692]=1063581978;c[5693]=0;c[5694]=1055193471;f[5695]=0.0;c[5696]=-2147483648;c[5697]=0;c[5698]=1065353216;f[5699]=0.0;c[5700]=1054458864;c[5701]=-1096927567;c[5702]=-1084636042;f[5703]=0.0;c[5704]=-1104782626;c[5705]=-1090519208;c[5706]=-1084636042;f[5707]=0.0;c[5708]=1049007812;c[5709]=-1085334679;c[5710]=-1090087228;f[5711]=0.0;c[5712]=1054458864;c[5713]=1050556081;c[5714]=-1084636042;f[5715]=0.0;c[5716]=1062847505;c[5717]=-2147483648;c[5718]=-1090087262;f[5719]=0.0;c[5720]=-1090087362;c[5721]=-2147483648;c[5722]=-1084636076;f[5723]=0.0;c[5724]=-1087361736;c[5725]=-1090519141;c[5726]=-1090087262;f[5727]=0.0;c[5728]=-1104782626;c[5729]=1056964440;c[5730]=-1084636042;f[5731]=0.0;c[5732]=-1087361736;c[5733]=1056964507;c[5734]=-1090087262;f[5735]=0.0;c[5736]=1049007812;c[5737]=1062148969;c[5738]=-1090087228;f[5739]=0.0;c[5740]=1064532105;c[5741]=1050556148;c[5742]=0;f[5743]=0.0;c[5744]=1064532105;c[5745]=-1096927500;c[5746]=0;f[5747]=0.0;c[5748]=1058437413;c[5749]=-1085334595;c[5750]=0;f[5751]=0.0;c[5752]=0;c[5753]=-1082130432;c[5754]=0;f[5755]=0.0;c[5756]=-1089046235;c[5757]=-1085334595;c[5758]=0;f[5759]=0.0;c[5760]=-1082951543;c[5761]=-1096927500;c[5762]=-2147483648;f[5763]=0.0;c[5764]=-1082951543;c[5765]=1050556148;c[5766]=-2147483648;f[5767]=0.0;c[5768]=-1089046235;c[5769]=1062149053;c[5770]=-2147483648;f[5771]=0.0;c[5772]=-2147483648;c[5773]=1065353216;c[5774]=-2147483648;f[5775]=0.0;c[5776]=1058437413;c[5777]=1062149053;c[5778]=-2147483648;f[5779]=0.0;c[5780]=1060121912;c[5781]=-1090519141;c[5782]=1057396386;f[5783]=0.0;c[5784]=-1098475836;c[5785]=-1085334679;c[5786]=1057396420;f[5787]=0.0;c[5788]=-1084636143;c[5789]=0;c[5790]=1057396386;f[5791]=0.0;c[5792]=-1098475836;c[5793]=1062148969;c[5794]=1057396420;f[5795]=0.0;c[5796]=1060121912;c[5797]=1056964507;c[5798]=1057396386;f[5799]=0.0;c[5800]=1057396286;c[5801]=0;c[5802]=1062847572;f[5803]=0.0;c[5804]=1042701022;c[5805]=-1090519208;c[5806]=1062847606;f[5807]=0.0;c[5808]=-1093024784;c[5809]=-1096927567;c[5810]=1062847606;f[5811]=0.0;c[5812]=-1093024784;c[5813]=1050556081;c[5814]=1062847606;f[5815]=0.0;c[5816]=1042701022;c[5817]=1056964440;c[5818]=1062847606;f[5819]=0.0;PB(24968);return}function Td(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=ea;ea=ea+16|0;l=Es()|0;c[l+8>>2]=0;c[l+12>>2]=1065353216;c[l+16>>2]=1065353216;c[l+20>>2]=1065353216;f[l+24>>2]=0.0;f[l+44>>2]=.03999999910593033;c[l+52>>2]=1065353216;c[l+56>>2]=1065353216;c[l+60>>2]=1065353216;f[l+64>>2]=0.0;c[l+68>>2]=-1082130432;c[l+72>>2]=-1082130432;c[l+76>>2]=-1082130432;f[l+80>>2]=0.0;a[l+84>>0]=0;c[l>>2]=7784;a[l+104>>0]=1;c[l+100>>2]=0;c[l+92>>2]=0;c[l+96>>2]=0;a[l+124>>0]=1;c[l+120>>2]=0;c[l+112>>2]=0;c[l+116>>2]=0;c[l+4>>2]=9;if((e|0)>0){c[6747]=(c[6747]|0)+1;g=kb((e<<4|3)+16|0)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}g=c[l+92>>2]|0;if((g|0)>0){h=0;do{k=i+(h<<4)|0;j=(c[l+100>>2]|0)+(h<<4)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];c[k+12>>2]=c[j+12>>2];h=h+1|0}while((h|0)!=(g|0))}g=c[l+100>>2]|0;if(g|0){if(a[l+104>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[l+100>>2]=0}a[l+104>>0]=1;c[l+100>>2]=i;c[l+96>>2]=e;c[i>>2]=c[m>>2];c[i+4>>2]=c[m+4>>2];c[i+8>>2]=c[m+8>>2];c[i+12>>2]=c[m+12>>2];if((e|0)!=1){g=1;do{k=(c[l+100>>2]|0)+(g<<4)|0;c[k>>2]=c[m>>2];c[k+4>>2]=c[m+4>>2];c[k+8>>2]=c[m+8>>2];c[k+12>>2]=c[m+12>>2];g=g+1|0}while((g|0)!=(e|0))}k=c[l+112>>2]|0}else k=0;c[l+92>>2]=e;if((k|0)<(e|0)){do if((c[l+116>>2]|0)<(e|0)){if(!e){j=k;g=0}else{c[6747]=(c[6747]|0)+1;g=kb((e<<2|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}j=c[l+112>>2]|0}h=c[l+120>>2]|0;if((j|0)<=0){if(!h){a[l+124>>0]=1;c[l+120>>2]=g;c[l+116>>2]=e;break}}else{i=0;do{c[g+(i<<2)>>2]=c[h+(i<<2)>>2];i=i+1|0}while((i|0)!=(j|0))}if(a[l+124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}a[l+124>>0]=1;c[l+120>>2]=g;c[l+116>>2]=e}else g=c[l+120>>2]|0;while(0);hk(g+(k<<2)|0,0,e-k<<2|0)|0}c[l+112>>2]=e;if((e|0)<=0){Ci(l);ea=m;return l|0}g=0;do{j=b+(g<<4)|0;k=(c[l+100>>2]|0)+(g<<4)|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];c[k+12>>2]=c[j+12>>2];c[(c[l+120>>2]|0)+(g<<2)>>2]=c[d+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0));Ci(l);ea=m;return l|0}function Ud(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;k=c[b+9288>>2]|0;if(!k){c[b>>2]=5;b=0;return b|0}i=c[k+48>>2]|0;if(i|0)c[i+44>>2]=c[k+44>>2];i=c[k+44>>2]|0;if(i|0)c[i+48>>2]=c[k+48>>2];if((c[b+9288>>2]|0)==(k|0))c[b+9288>>2]=c[k+48>>2];c[b+9292>>2]=(c[b+9292>>2]|0)+-1;c[k+44>>2]=0;c[k+48>>2]=c[b+9280>>2];i=c[b+9280>>2]|0;if(i|0)c[i+44>>2]=k;c[b+9280>>2]=k;c[b+9284>>2]=(c[b+9284>>2]|0)+1;a[k+55>>0]=0;c[k+20>>2]=d;c[k+24>>2]=e;c[k+28>>2]=g;j=+f[d+16>>2];n=+f[e+16>>2]-j;m=+f[d+20>>2];l=+f[e+20>>2]-m;o=+f[d+24>>2];p=+f[e+24>>2]-o;j=+f[g+16>>2]-j;m=+f[g+20>>2]-m;o=+f[g+24>>2]-o;f[k>>2]=l*o-p*m;f[k+4>>2]=p*j-n*o;f[k+8>>2]=n*m-l*j;f[k+12>>2]=0.0;j=+s(+((l*o-p*m)*(l*o-p*m)+(p*j-n*o)*(p*j-n*o)+(n*m-l*j)*(n*m-l*j)));if(!(j>9.999999747378752e-05)){c[b>>2]=2;i=c[k+48>>2]|0;if(i|0)c[i+44>>2]=c[k+44>>2];i=c[k+44>>2]|0;if(i|0)c[i+48>>2]=c[k+48>>2];if((c[b+9280>>2]|0)==(k|0))c[b+9280>>2]=c[k+48>>2];c[b+9284>>2]=(c[b+9284>>2]|0)+-1;c[k+44>>2]=0;c[k+48>>2]=c[b+9288>>2];i=c[b+9288>>2]|0;if(i|0)c[i+44>>2]=k;c[b+9288>>2]=k;c[b+9292>>2]=(c[b+9292>>2]|0)+1;b=0;return b|0}if((!(ik(+f[k>>2],+f[k+4>>2],+f[k+8>>2],+f[d+16>>2],+f[d+20>>2],+f[d+24>>2],+f[e+16>>2],+f[e+20>>2],+f[e+24>>2],k+16|0)|0)?!(ik(+f[k>>2],+f[k+4>>2],+f[k+8>>2],+f[e+16>>2],+f[e+20>>2],+f[e+24>>2],+f[g+16>>2],+f[g+20>>2],+f[g+24>>2],k+16|0)|0):0)?!(ik(+f[k>>2],+f[k+4>>2],+f[k+8>>2],+f[g+16>>2],+f[g+20>>2],+f[g+24>>2],+f[d+16>>2],+f[d+20>>2],+f[d+24>>2],k+16|0)|0):0)f[k+16>>2]=(+f[d+16>>2]*+f[k>>2]+ +f[d+20>>2]*+f[k+4>>2]+ +f[d+24>>2]*+f[k+8>>2])/j;f[k>>2]=1.0/j*+f[k>>2];f[k+4>>2]=1.0/j*+f[k+4>>2];f[k+8>>2]=1.0/j*+f[k+8>>2];if(h){b=k;return b|0}if(+f[k+16>>2]>=-9.999999747378752e-06){b=k;return b|0}c[b>>2]=3;i=c[k+48>>2]|0;if(i|0)c[i+44>>2]=c[k+44>>2];i=c[k+44>>2]|0;if(i|0)c[i+48>>2]=c[k+48>>2];if((c[b+9280>>2]|0)==(k|0))c[b+9280>>2]=c[k+48>>2];c[b+9284>>2]=(c[b+9284>>2]|0)+-1;c[k+44>>2]=0;c[k+48>>2]=c[b+9288>>2];i=c[b+9288>>2]|0;if(i|0)c[i+44>>2]=k;c[b+9288>>2]=k;c[b+9292>>2]=(c[b+9292>>2]|0)+1;b=0;return b|0}function Vd(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,x=0.0;c[a+556>>2]=c[b>>2];c[a+556+4>>2]=c[b+4>>2];c[a+556+8>>2]=c[b+8>>2];c[a+556+12>>2]=c[b+12>>2];k=+f[a+568>>2];l=+f[a+560>>2];m=+f[a+564>>2];n=+f[a+556>>2];g=-n-l*0.0-m*0.0;e=(m+k*0.0-n*0.0)*-m+(k*(k+l*0.0-m*0.0)+g*-n)-(k*0.0+n*0.0-l)*-l;d=(k*0.0+n*0.0-l)*-n+(k*(m+k*0.0-n*0.0)+g*-l)-(k+l*0.0-m*0.0)*-m;g=(k+l*0.0-m*0.0)*-l+(g*-m+k*(k*0.0+n*0.0-l))-(m+k*0.0-n*0.0)*-n;if(g*0.0+(d*0.0+e)<-.9999998807907104){h=-0.0;i=0.0;j=0.0;d=1.0}else{x=+s(+((g*0.0+(d*0.0+e)+1.0)*2.0));h=(g*0.0-d*0.0)*(1.0/x);i=(d-e*0.0)*(1.0/x);j=x*.5;d=(e*0.0-g)*(1.0/x)}o=1.0/+s(+(h*h+d*d+i*i+j*j));t=h*o;x=d*o;p=i*o;o=j*o;e=1.0/+s(+((k*o-n*-t-l*-x-m*-p)*(k*o-n*-t-l*-x-m*-p)+((l*-t+(m*o+k*-p)-n*-x)*(l*-t+(m*o+k*-p)-n*-x)+((m*-x+(n*o+k*-t)-l*-p)*(m*-x+(n*o+k*-t)-l*-p)+(n*-p+(k*-x+l*o)-m*-t)*(n*-p+(k*-x+l*o)-m*-t)))));h=(m*-x+(n*o+k*-t)-l*-p)*e;d=(n*-p+(k*-x+l*o)-m*-t)*e;g=(l*-t+(m*o+k*-p)-n*-x)*e;n=(k*o-n*-t-l*-x-m*-p)*e;e=+f[a+444>>2];if(e>=.05000000074505806?(q=+f[a+448>>2],q>=.05000000074505806):0){j=o<-1.0?-1.0:o;j=+w(+(j>1.0?1.0:j))*2.0;if(j>1.1920928955078125e-07){i=1.0/+s(+(p*p+(t*t+x*x)));if(+r(+(x*i))>1.1920928955078125e-07){e=+s(+((p*i*(p*i)/(x*i*(x*i))+1.0)/(p*i*(p*i)/(x*i*(x*i))/(e*e)+1.0/(q*q))));k=t*i;l=x*i;i=p*i}else{k=t*i;l=x*i;i=p*i}}else{e=0.0;k=0.0;l=0.0;i=0.0}if(+r(+j)>1.1920928955078125e-07){if(!(j>e)){e=-e;if(!(j>2];if(l>=.05000000074505806){e=n<-1.0?-1.0:n;e=+w(+(e>1.0?1.0:e))*2.0;if(e>3.1415927410125732){e=-n<-1.0?-1.0:-n;i=-h;j=-d;k=-g;e=+w(+(e>1.0?1.0:e))*2.0}else{i=h;j=d;k=g}if(e>1.1920928955078125e-07){x=1.0/+s(+(i*i+j*j+k*k));i=i*x;j=j*x;k=k*x}if(+r(+e)>1.1920928955078125e-07){if(!(e>l))if(e<-l)d=-l;else d=e;else d=l;e=d*.5;d=+v(+e)/+s(+(k*k+(j*j+i*i)));h=i*d;g=k*d;e=+u(+e);d=j*d}else e=n}else e=n;f[a+556>>2]=m*g+(o*h+t*e)-p*d;f[a+560>>2]=p*h+(o*d+m*e)-t*g;f[a+564>>2]=t*d+(o*g+p*e)-m*h;f[a+568>>2]=o*e-t*h-m*d-p*g;return}function Wd(a,b,d,e,g,h){a=a|0;b=+b;d=+d;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0;o=ea;ea=ea+352|0;k=MI(g)|0;l=+f[k>>2];m=+f[k+4>>2];n=+f[k+8>>2];f[o+328>>2]=0.0;f[o+324>>2]=0.0;f[o+320>>2]=0.0;qs(o+336|0,o+328|0,o+324|0,o+320|0);f[(NJ(o+336|0)|0)+(e<<2)>>2]=d;f[o+296>>2]=0.0;f[o+292>>2]=0.0;f[o+288>>2]=0.0;qs(o+304|0,o+296|0,o+292|0,o+288|0);k=NJ(o+304|0)|0;f[k+(e<<2)>>2]=-d;f[o+264>>2]=0.0;f[o+260>>2]=0.0;f[o+256>>2]=0.0;qs(o+272|0,o+264|0,o+260|0,o+256|0);j=NJ(o+272|0)|0;f[j+(e<<2)>>2]=d;i=0;while(1){if(i>>>0>=360)break;d=+(i|0)*.01745329238474369;r=+CJ(d)*b;f[k+(((e+1|0)%3|0)<<2)>>2]=r;f[j+(((e+1|0)%3|0)<<2)>>2]=r;d=+DJ(d)*b;f[k+(((e+2|0)%3|0)<<2)>>2]=d;f[j+(((e+2|0)%3|0)<<2)>>2]=d;p=c[(c[a>>2]|0)+8>>2]|0;q=NJ(g)|0;ql(o+224|0,q,+f[o+304>>2],+f[o+304+4>>2],+f[o+304+8>>2]);vp(o+240|0,l,m,n,+f[o+224>>2],+f[o+224+4>>2],+f[o+224+8>>2]);ql(o+192|0,q,+f[o+272>>2],+f[o+272+4>>2],+f[o+272+8>>2]);vp(o+208|0,l,m,n,+f[o+192>>2],+f[o+192+4>>2],+f[o+192+8>>2]);Pa[p&127](a,o+240|0,o+208|0,h);i=i+30|0}f[o+168>>2]=0.0;f[o+164>>2]=0.0;f[o+160>>2]=0.0;qs(o+176|0,o+168|0,o+164|0,o+160|0);f[(NJ(o+176|0)|0)+(e<<2)>>2]=1.0;f[o+136>>2]=0.0;f[o+132>>2]=0.0;f[o+128>>2]=0.0;qs(o+144|0,o+136|0,o+132|0,o+128|0);f[(NJ(o+144|0)|0)+(((e+1|0)%3|0)<<2)>>2]=1.0;q=c[(c[a>>2]|0)+60>>2]|0;p=NJ(g)|0;ql(o+96|0,p,+f[o+336>>2],+f[o+336+4>>2],+f[o+336+8>>2]);xp(o+112|0,l,m,n,+f[o+96>>2],+f[o+96+4>>2],+f[o+96+8>>2]);ql(o+80|0,p,+f[o+176>>2],+f[o+176+4>>2],+f[o+176+8>>2]);ql(o+64|0,p,+f[o+144>>2],+f[o+144+4>>2],+f[o+144+8>>2]);Sa[q&1](a,o+112|0,o+80|0,o+64|0,b,b,0.0,6.2831854820251465,h,0,10.0);q=c[(c[a>>2]|0)+60>>2]|0;ql(o+32|0,p,+f[o+336>>2],+f[o+336+4>>2],+f[o+336+8>>2]);vp(o+48|0,l,m,n,+f[o+32>>2],+f[o+32+4>>2],+f[o+32+8>>2]);ql(o+16|0,p,+f[o+176>>2],+f[o+176+4>>2],+f[o+176+8>>2]);ql(o,p,+f[o+144>>2],+f[o+144+4>>2],+f[o+144+8>>2]);Sa[q&1](a,o+48|0,o+16|0,o,b,b,0.0,6.2831854820251465,h,0,10.0);ea=o;return}function Xd(a,b){a=a|0;b=b|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0.0;i=c[a+192>>2]|0;k=+ha[c[(c[i>>2]|0)+48>>2]&15](i);i=c[a+712>>2]|0;if((i|0)>0){l=0;do{j=c[a+720>>2]|0;d=j+(l*104|0)+8|0;m=+f[b>>2]*+f[d>>2];f[d>>2]=m;d=j+(l*104|0)+12|0;o=+f[b+4>>2]*+f[d>>2];f[d>>2]=o;d=j+(l*104|0)+16|0;n=+f[b+8>>2]*+f[d>>2];f[d>>2]=n;d=j+(l*104|0)+24|0;f[d>>2]=+f[b>>2]*+f[d>>2];d=j+(l*104|0)+28|0;f[d>>2]=+f[b+4>>2]*+f[d>>2];d=j+(l*104|0)+32|0;f[d>>2]=+f[b+8>>2]*+f[d>>2];j=c[j+(l*104|0)+96>>2]|0;d=jg(a+928|0,j)|0;a:do if(d){g=c[a+936>>2]|0;if((g|0)<=-1){d=c[a+928>>2]|0;break}if(g){h=0;e=d;while(1){d=c[e+32>>2]|0;h=h+1|0;if(!d){d=e;break a}if((h|0)>=(g|0))break;else e=d}}}else d=0;while(0);f[j>>2]=m-k;f[j+4>>2]=o-k;f[j+8>>2]=n-k;f[j+12>>2]=0.0;f[j+16>>2]=k+m;f[j+20>>2]=k+o;f[j+24>>2]=k+n;f[j+28>>2]=0.0;je(a+928|0,d,j);l=l+1|0}while((l|0)!=(i|0))}Ef(a);d=c[a+928>>2]|0;if(d){b=c[a+192>>2]|0;m=+ha[c[(c[b>>2]|0)+48>>2]&15](b);o=+f[d+4>>2]-m;n=+f[d+8>>2]-m;f[a+892>>2]=+f[d>>2]-m;f[a+896>>2]=o;f[a+900>>2]=n;f[a+904>>2]=0.0;n=m+ +f[d+20>>2];o=m+ +f[d+24>>2];f[a+908>>2]=m+ +f[d+16>>2];f[a+912>>2]=n;f[a+916>>2]=o;f[a+920>>2]=0.0;d=c[a+188>>2]|0;if(d|0){b=c[a+684>>2]|0;l=c[b+32>>2]|0;Ta[c[(c[l>>2]|0)+16>>2]&31](l,d,a+892|0,a+908|0,c[b+36>>2]|0)}}else{c[a+892>>2]=0;c[a+892+4>>2]=0;c[a+892+8>>2]=0;c[a+892+12>>2]=0;c[a+892+16>>2]=0;c[a+892+20>>2]=0;c[a+892+24>>2]=0;c[a+892+28>>2]=0}e=c[a+732>>2]|0;if((e|0)<=0){Ze(a);return}g=c[a+740>>2]|0;d=0;do{l=c[g+(d*52|0)+8>>2]|0;b=c[g+(d*52|0)+12>>2]|0;m=+f[l+8>>2]-+f[b+8>>2];n=+f[l+12>>2]-+f[b+12>>2];o=+f[l+16>>2]-+f[b+16>>2];o=+s(+(m*m+n*n+o*o));f[g+(d*52|0)+16>>2]=o;f[g+(d*52|0)+28>>2]=o*o;d=d+1|0}while((d|0)!=(e|0));d=0;do{f[g+(d*52|0)+24>>2]=(+f[(c[g+(d*52|0)+8>>2]|0)+88>>2]+ +f[(c[g+(d*52|0)+12>>2]|0)+88>>2])/+f[(c[g+(d*52|0)+4>>2]|0)+4>>2];d=d+1|0}while((d|0)!=(e|0));Ze(a);return}function Yd(a,b,d,e,f){a=a|0;b=b|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,o=0,p=0;if(!b)if(!e){if(f|0){c[f>>2]=(a>>>0)%(d>>>0);c[f+4>>2]=0}e=0;f=(a>>>0)/(d>>>0)>>>0;return (C(e|0),f)|0}else{if(!f){e=0;f=0;return (C(e|0),f)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;e=0;f=0;return (C(e|0),f)|0}do if(d){if(e|0){h=(A(e|0)|0)-(A(b|0)|0)|0;if(h>>>0<=31){n=h+1|0;i=a>>>((h+1|0)>>>0)&h-31>>31|b<<31-h;m=b>>>((h+1|0)>>>0)&h-31>>31;g=0;h=a<<31-h;break}if(!f){e=0;f=0;return (C(e|0),f)|0}c[f>>2]=a|0;c[f+4>>2]=b|b&0;e=0;f=0;return (C(e|0),f)|0}if(d-1&d|0){h=(A(d|0)|0)+33-(A(b|0)|0)|0;n=h;i=32-h-1>>31&b>>>((h-32|0)>>>0)|(b<<32-h|a>>>(h>>>0))&h-32>>31;m=h-32>>31&b>>>(h>>>0);g=a<<64-h&32-h>>31;h=(b<<64-h|a>>>((h-32|0)>>>0))&32-h>>31|a<<32-h&h-33>>31;break}if(f|0){c[f>>2]=d-1&a;c[f+4>>2]=0}if((d|0)==1){e=b|b&0;f=a|0|0;return (C(e|0),f)|0}else{f=dG(d|0)|0;e=b>>>(f>>>0)|0;f=b<<32-f|a>>>(f>>>0)|0;return (C(e|0),f)|0}}else{if(!e){if(f|0){c[f>>2]=(b>>>0)%(d>>>0);c[f+4>>2]=0}e=0;f=(b>>>0)/(d>>>0)>>>0;return (C(e|0),f)|0}if(!a){if(f|0){c[f>>2]=0;c[f+4>>2]=(b>>>0)%(e>>>0)}d=0;f=(b>>>0)/(e>>>0)>>>0;return (C(d|0),f)|0}if(!(e-1&e)){if(f|0){c[f>>2]=a|0;c[f+4>>2]=e-1&b|b&0}d=0;f=b>>>((dG(e|0)|0)>>>0);return (C(d|0),f)|0}h=(A(e|0)|0)-(A(b|0)|0)|0;if(h>>>0<=30){n=h+1|0;i=b<<31-h|a>>>((h+1|0)>>>0);m=b>>>((h+1|0)>>>0);g=0;h=a<<31-h;break}if(!f){e=0;f=0;return (C(e|0),f)|0}c[f>>2]=a|0;c[f+4>>2]=b|b&0;e=0;f=0;return (C(e|0),f)|0}while(0);if(!n){j=h;b=m;a=0;h=0}else{k=Lv(d|0|0,e|e&0|0,-1,-1)|0;l=D()|0;j=h;b=m;a=n;h=0;do{p=j;j=g>>>31|j<<1;g=h|g<<1;p=i<<1|p>>>31|0;o=i>>>31|b<<1|0;tv(k|0,l|0,p|0,o|0)|0;n=D()|0;m=n>>31|((n|0)<0?-1:0)<<1;h=m&1;i=tv(p|0,o|0,m&(d|0)|0,(((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1)&(e|e&0)|0)|0;b=D()|0;a=a-1|0}while((a|0)!=0);a=0}if(f|0){c[f>>2]=i;c[f+4>>2]=b}o=(g|0)>>>31|j<<1|(0<<1|g>>>31)&0|a;p=(g<<1|0>>>31)&-2|h;return (C(o|0),p)|0}function Zd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0;if(!a)return;u=+f[b>>2];v=+f[b+4>>2];w=+f[b+8>>2];x=+f[b+16>>2];y=+f[b+20>>2];q=+f[b+24>>2];c[6747]=(c[6747]|0)+1;b=kb(275)|0;if(!b)b=0;else{c[(b+4+15&-16)+-4>>2]=b;b=b+4+15&-16}c[b>>2]=a;m=b;l=b;g=b;h=b;n=64;e=1;a=b;while(1){j=e+-1|0;p=c[a+(j<<2)>>2]|0;do if(((((+f[p>>2]<=x?+f[p+16>>2]>=u:0)?+f[p+4>>2]<=y:0)?+f[p+20>>2]>=v:0)?+f[p+8>>2]<=q:0)?+f[p+24>>2]>=w:0){if(!(c[p+40>>2]|0)){Ia[c[(c[d>>2]|0)+12>>2]&127](d,p);k=l;b=m;i=n;e=j;break}o=c[p+36>>2]|0;do if((j|0)==(n|0)){k=(n|0)==0?1:n<<1;if((e|0)<=(k|0)){if((k|0)!=0?(c[6747]=(c[6747]|0)+1,s=kb((k<<2|3)+16|0)|0,(s|0)!=0):0){c[(s+4+15&-16)+-4>>2]=s;i=s+4+15&-16}else i=0;if((e|0)<=1){if(!a){j=0;h=i;e=i;g=i;b=i;n=k;m=i;break}}else{b=0;do{c[i+(b<<2)>>2]=c[a+(b<<2)>>2];b=b+1|0}while((b|0)!=(n|0))}if(!m){j=n;h=i;e=i;g=i;b=i;n=k;m=i}else{c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0);j=n;h=i;e=i;g=i;b=i;n=k;m=i}}else{j=n;e=l;b=m;m=a}}else{e=l;b=m;m=a}while(0);c[m+(j<<2)>>2]=o;l=j+1|0;k=c[p+40>>2]|0;do if((l|0)==(n|0)?(t=(n|0)==0?1:n<<1,(n|0)<(t|0)):0){if((t|0)!=0?(c[6747]=(c[6747]|0)+1,r=kb((t<<2|3)+16|0)|0,(r|0)!=0):0){c[(r+4+15&-16)+-4>>2]=r;a=r+4+15&-16}else a=0;if((j|0)>-1){b=0;do{c[a+(b<<2)>>2]=c[m+(b<<2)>>2];b=b+1|0}while((b|0)!=(n|0));if(!h){e=a;g=a;h=a;b=a;i=t;break}}else if((m|0)==0|(h|0)==0){e=a;g=a;h=a;b=a;i=t;break}c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);e=a;g=a;h=a;b=a;i=t}else{i=n;a=m}while(0);c[a+(l<<2)>>2]=k;k=e;e=j+2|0}else{k=l;b=m;i=n;e=j}while(0);if((e|0)<=0)break;m=b;l=k;n=i}if((a|0)==0|(k|0)==0)return;c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);return}function _d(a,b,d,e,g,h){a=a|0;b=+b;d=+d;e=e|0;g=g|0;h=h|0;var i=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0;n=ea;ea=ea+400|0;f[n+376>>2]=0.0;f[n+372>>2]=0.0;f[n+368>>2]=0.0;qs(n+384|0,n+376|0,n+372|0,n+368|0);l=NJ(n+384|0)|0;f[l+(e<<2)>>2]=-d;f[n+344>>2]=0.0;f[n+340>>2]=0.0;f[n+336>>2]=0.0;qs(n+352|0,n+344|0,n+340|0,n+336|0);m=NJ(n+352|0)|0;f[m+(e<<2)>>2]=d;Kq(n+272|0,g);dw(n+256|0,g,+f[n+384>>2],+f[n+384+4>>2],+f[n+384+8>>2]);i=MI(n+272|0)|0;c[i>>2]=c[n+256>>2];c[i+4>>2]=c[n+256+4>>2];c[i+8>>2]=c[n+256+8>>2];c[i+12>>2]=c[n+256+12>>2];c[n+240>>2]=c[n+256>>2];c[n+240+4>>2]=c[n+256+4>>2];c[n+240+8>>2]=c[n+256+8>>2];c[n+240+12>>2]=c[n+256+12>>2];i=NJ(n+272|0)|0;ir(n+224|0,i,(e+1|0)%3|0);ir(n+192|0,i,e);Sq(n+208|0,+f[n+192>>2],+f[n+192+4>>2],+f[n+192+8>>2]);Ra[c[(c[a>>2]|0)+64>>2]&1](a,n+240|0,n+224|0,n+208|0,b,-1.5707963705062866,1.5707963705062866,-1.5707963705062866,1.5707963705062866,h,30.0,0);Kq(n+128|0,g);dw(n+112|0,g,+f[n+352>>2],+f[n+352+4>>2],+f[n+352+8>>2]);i=MI(n+128|0)|0;c[i>>2]=c[n+112>>2];c[i+4>>2]=c[n+112+4>>2];c[i+8>>2]=c[n+112+8>>2];c[i+12>>2]=c[n+112+12>>2];c[n+96>>2]=c[n+112>>2];c[n+96+4>>2]=c[n+112+4>>2];c[n+96+8>>2]=c[n+112+8>>2];c[n+96+12>>2]=c[n+112+12>>2];i=NJ(n+128|0)|0;ir(n+80|0,i,(e+1|0)%3|0);ir(n+64|0,i,e);Ra[c[(c[a>>2]|0)+64>>2]&1](a,n+96|0,n+80|0,n+64|0,b,-1.5707963705062866,1.5707963705062866,-1.5707963705062866,1.5707963705062866,h,30.0,0);i=MI(g)|0;d=+f[i>>2];j=+f[i+4>>2];k=+f[i+8>>2];i=0;while(1){if(i>>>0>=360)break;q=+(i|0)*.01745329238474369;r=+CJ(q)*b;f[l+(((e+1|0)%3|0)<<2)>>2]=r;f[m+(((e+1|0)%3|0)<<2)>>2]=r;q=+DJ(q)*b;f[l+(((e+2|0)%3|0)<<2)>>2]=q;f[m+(((e+2|0)%3|0)<<2)>>2]=q;o=c[(c[a>>2]|0)+8>>2]|0;p=NJ(g)|0;ql(n+32|0,p,+f[n+384>>2],+f[n+384+4>>2],+f[n+384+8>>2]);vp(n+48|0,d,j,k,+f[n+32>>2],+f[n+32+4>>2],+f[n+32+8>>2]);ql(n,p,+f[n+352>>2],+f[n+352+4>>2],+f[n+352+8>>2]);vp(n+16|0,d,j,k,+f[n>>2],+f[n+4>>2],+f[n+8>>2]);Pa[o&127](a,n+48|0,n+16|0,h);i=i+30|0}ea=n;return}function $d(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=c[d+8>>2]|0;if((g|0)>0){h=c[d+16>>2]|0;j=0;e=0;do{i=c[h+(j<<2)>>2]|0;if(!(c[i+204>>2]&3)){c[i+208>>2]=e;e=e+1|0}c[i+212>>2]=-1;f[i+244>>2]=1.0;j=j+1|0}while((j|0)!=(g|0));j=e}else j=0;i=c[b+8>>2]|0;if((i|0)<(j|0)){if((c[b+12>>2]|0)<(j|0)){if(!j){g=i;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((j<<3|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+8>>2]|0;h=e}if((g|0)>0){e=0;do{m=(c[b+16>>2]|0)+(e<<3)|0;k=c[m+4>>2]|0;l=h+(e<<3)|0;c[l>>2]=c[m>>2];c[l+4>>2]=k;e=e+1|0}while((e|0)!=(g|0))}e=c[b+16>>2]|0;if(e|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=h;c[b+12>>2]=j;g=b+16|0}else g=b+16|0;e=i;do{m=(c[g>>2]|0)+(e<<3)|0;c[m>>2]=0;c[m+4>>2]=0;e=e+1|0}while((e|0)!=(j|0))}c[b+8>>2]=j;if((j|0)>0){e=c[b+16>>2]|0;g=0;do{c[e+(g<<3)>>2]=g;c[e+(g<<3)+4>>2]=1;g=g+1|0}while((g|0)!=(j|0))}e=c[d+68>>2]|0;e=ra[c[(c[e>>2]|0)+36>>2]&127](e)|0;l=ra[c[(c[e>>2]|0)+36>>2]&127](e)|0;if(!l)return;d=ra[c[(c[e>>2]|0)+20>>2]&127](e)|0;if((l|0)<=0)return;k=0;do{e=c[c[d+(k<<4)>>2]>>2]|0;g=c[c[d+(k<<4)+4>>2]>>2]|0;if((e|0?(g|0?(c[e+204>>2]&7|0)==0:0):0)?(c[g+204>>2]&7|0)==0:0){h=c[e+208>>2]|0;e=c[g+208>>2]|0;j=c[b+16>>2]|0;g=c[j+(h<<3)>>2]|0;if((g|0)!=(h|0)){c[j+(h<<3)>>2]=c[j+(g<<3)>>2];h=c[j+(g<<3)>>2]|0;g=c[j+(h<<3)>>2]|0;if((h|0)!=(g|0)){i=j+(h<<3)|0;do{h=j+(g<<3)|0;c[i>>2]=c[h>>2];h=c[h>>2]|0;i=j+(h<<3)|0;g=c[i>>2]|0}while((h|0)!=(g|0))}}g=c[j+(e<<3)>>2]|0;if((g|0)!=(e|0)){c[j+(e<<3)>>2]=c[j+(g<<3)>>2];e=c[j+(g<<3)>>2]|0;g=c[j+(e<<3)>>2]|0;if((e|0)!=(g|0)){i=j+(e<<3)|0;do{e=j+(g<<3)|0;c[i>>2]=c[e>>2];e=c[e>>2]|0;i=j+(e<<3)|0;g=c[i>>2]|0}while((e|0)!=(g|0))}}if((h|0)!=(e|0)){c[j+(h<<3)>>2]=e;m=j+(e<<3)+4|0;c[m>>2]=(c[m>>2]|0)+(c[j+(h<<3)+4>>2]|0)}}k=k+1|0}while((k|0)!=(l|0));return}function ae(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0;h=ea;ea=ea+48|0;c[b+8>>2]=0;f[b+12>>2]=0.0;c[b>>2]=8136;c[b+48>>2]=d;c[b+4>>2]=21;if(ra[c[(c[d>>2]|0)+40>>2]&127](d)|0)Ma[c[(c[d>>2]|0)+48>>2]&127](d,b+16|0,b+32|0);else{d=h+32+4|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;f[h+32>>2]=1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h+16|0,b,h+32|0);f[b+32>>2]=+f[h+16>>2]+ +f[b+12>>2];f[h+32>>2]=-1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h,b,h+32|0);c[h+16>>2]=c[h>>2];c[h+16+4>>2]=c[h+4>>2];c[h+16+8>>2]=c[h+8>>2];c[h+16+12>>2]=c[h+12>>2];f[b+16>>2]=+f[h+16>>2]-+f[b+12>>2];c[h+32>>2]=0;c[h+32+4>>2]=0;c[h+32+8>>2]=0;c[h+32+12>>2]=0;f[d>>2]=1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h+16|0,b,h+32|0);f[b+36>>2]=+f[h+16+4>>2]+ +f[b+12>>2];f[d>>2]=-1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h,b,h+32|0);c[h+16>>2]=c[h>>2];c[h+16+4>>2]=c[h+4>>2];c[h+16+8>>2]=c[h+8>>2];c[h+16+12>>2]=c[h+12>>2];f[b+20>>2]=+f[h+16+4>>2]-+f[b+12>>2];c[h+32>>2]=0;c[h+32+4>>2]=0;c[h+32+8>>2]=0;c[h+32+12>>2]=0;f[h+32+8>>2]=1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h+16|0,b,h+32|0);f[b+40>>2]=+f[h+16+8>>2]+ +f[b+12>>2];f[h+32+8>>2]=-1.0;Ma[c[(c[b>>2]|0)+68>>2]&127](h,b,h+32|0);c[h+16>>2]=c[h>>2];c[h+16+4>>2]=c[h+4>>2];c[h+16+8>>2]=c[h+8>>2];c[h+16+12>>2]=c[h+12>>2];f[b+24>>2]=+f[h+16+8>>2]-+f[b+12>>2]}c[b>>2]=7984;c[b+52>>2]=0;c[b+56>>2]=0;a[b+60>>0]=e&1;a[b+61>>0]=0;c[b+4>>2]=21;if(!g){ea=h;return}c[6747]=(c[6747]|0)+1;g=kb(191)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}c[g+52>>2]=282;a[g+60>>0]=0;a[g+80>>0]=1;c[g+76>>2]=0;c[g+68>>2]=0;c[g+72>>2]=0;a[g+100>>0]=1;c[g+96>>2]=0;c[g+88>>2]=0;c[g+92>>2]=0;a[g+120>>0]=1;c[g+116>>2]=0;c[g+108>>2]=0;c[g+112>>2]=0;a[g+140>>0]=1;c[g+136>>2]=0;c[g+128>>2]=0;c[g+132>>2]=0;c[g+144>>2]=0;a[g+164>>0]=1;c[g+160>>2]=0;c[g+152>>2]=0;c[g+156>>2]=0;c[g+168>>2]=0;c[g+4>>2]=-8388609;c[g+8>>2]=-8388609;c[g+12>>2]=-8388609;f[g+16>>2]=0.0;c[g+20>>2]=2139095039;c[g+24>>2]=2139095039;c[g+28>>2]=2139095039;f[g+32>>2]=0.0;c[g>>2]=9292;c[b+52>>2]=g;cc(g,c[b+48>>2]|0,(a[b+60>>0]|0)!=0,b+16|0,b+32|0);a[b+61>>0]=1;ea=h;return}function be(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;j=ea;ea=ea+64|0;k=(a[b+8>>0]|0)!=0;i=k?e:d;e=k?d:e;d=c[e+4>>2]|0;if(((c[d+4>>2]|0)+-21|0)>>>0>=9){ea=j;return}if((c[(c[i+4>>2]|0)+4>>2]|0)>=20){ea=j;return}l=+ha[c[(c[d>>2]|0)+48>>2]&15](d);c[h+4>>2]=c[b+76>>2];c[b+16>>2]=i;c[b+20>>2]=e;c[b+64>>2]=g;f[b+68>>2]=l;c[b+56>>2]=h;k=c[e+12>>2]|0;A=+f[k>>2];z=+f[k+16>>2];y=+f[k+32>>2];x=+f[k+4>>2];w=+f[k+20>>2];v=+f[k+36>>2];r=+f[k+8>>2];p=+f[k+24>>2];n=+f[k+40>>2];u=-+f[k+48>>2];t=-+f[k+52>>2];s=-+f[k+56>>2];k=c[i+12>>2]|0;J=+f[k>>2];I=+f[k+16>>2];H=+f[k+32>>2];G=+f[k+4>>2];F=+f[k+20>>2];E=+f[k+36>>2];D=+f[k+8>>2];C=+f[k+24>>2];B=+f[k+40>>2];q=+f[k+48>>2];o=+f[k+52>>2];m=+f[k+56>>2];f[j>>2]=A*J+z*I+y*H;f[j+4>>2]=A*G+z*F+y*E;f[j+8>>2]=A*D+z*C+y*B;f[j+12>>2]=0.0;f[j+16>>2]=x*J+w*I+v*H;f[j+20>>2]=x*G+w*F+v*E;f[j+24>>2]=x*D+w*C+v*B;f[j+28>>2]=0.0;f[j+32>>2]=r*J+p*I+n*H;f[j+36>>2]=r*G+p*F+n*E;f[j+40>>2]=r*D+p*C+n*B;f[j+44>>2]=0.0;f[j+48>>2]=A*u+z*t+y*s+(A*q+z*o+y*m);f[j+52>>2]=x*u+w*t+v*s+(x*q+w*o+v*m);f[j+56>>2]=r*u+p*t+n*s+(r*q+p*o+n*m);f[j+60>>2]=0.0;k=c[i+4>>2]|0;Pa[c[(c[k>>2]|0)+8>>2]&127](k,j,b+24|0,b+40|0);f[b+40>>2]=+f[b+40>>2]+l;f[b+44>>2]=+f[b+44>>2]+l;f[b+48>>2]=+f[b+48>>2]+l;f[b+24>>2]=+f[b+24>>2]-l;f[b+28>>2]=+f[b+28>>2]-l;f[b+32>>2]=+f[b+32>>2]-l;k=c[b+76>>2]|0;g=c[e+8>>2]|0;c[k+740>>2]=c[i+8>>2];c[k+744>>2]=g;Pa[c[(c[d>>2]|0)+64>>2]&127](d,b+12|0,b+24|0,b+40|0);d=c[h+4>>2]|0;do if(c[d+748>>2]|0){e=c[d+740>>2]|0;i=c[(c[h+8>>2]|0)+8>>2]|0;if((e|0)==(i|0)){Hd(d,e+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(d,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,i+4|0);break}}while(0);c[b+16>>2]=0;c[b+20>>2]=0;ea=j;return}function ce(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0;n=ea;ea=ea+128|0;h=+f[b>>2];i=+f[b+16>>2];o=h>2];if((o+f[a+28>>2]){ea=n;return}l=h>i?b:b+16|0;if(+f[(+f[l>>2]>j?l:b+32|0)>>2]<+f[a+12>>2]){ea=n;return}j=+f[b+8>>2];h=+f[b+24>>2];o=j>2];if((o+f[a+36>>2]){ea=n;return}l=j>h?b+8|0:b+24|0;if(+f[(+f[l>>2]>i?l:b+40|0)>>2]<+f[a+20>>2]){ea=n;return}h=+f[b+4>>2];i=+f[b+20>>2];o=h>2];if((o+f[a+32>>2]){ea=n;return}l=h>i?b+4|0:b+20|0;if(+f[(+f[l>>2]>j?l:b+36|0)>>2]<+f[a+16>>2]){ea=n;return}g=c[a+4>>2]|0;if((c[(c[g+4>>2]|0)+4>>2]|0)>=20){ea=n;return}l=c[a+48>>2]|0;c[n+24+8>>2]=0;c[n+24+12>>2]=1065353216;c[n+24+16>>2]=1065353216;c[n+24+20>>2]=1065353216;f[n+24+24>>2]=0.0;c[n+24+52>>2]=0;c[n+24>>2]=4780;c[n+24+4>>2]=1;c[n+24+56>>2]=c[b>>2];c[n+24+56+4>>2]=c[b+4>>2];c[n+24+56+8>>2]=c[b+8>>2];c[n+24+56+12>>2]=c[b+12>>2];c[n+24+72>>2]=c[b+16>>2];c[n+24+72+4>>2]=c[b+16+4>>2];c[n+24+72+8>>2]=c[b+16+8>>2];c[n+24+72+12>>2]=c[b+16+12>>2];c[n+24+88>>2]=c[b+32>>2];c[n+24+88+4>>2]=c[b+32+4>>2];c[n+24+88+8>>2]=c[b+32+8>>2];c[n+24+88+12>>2]=c[b+32+12>>2];c[n+24+44>>2]=c[a+56>>2];p=c[a+8>>2]|0;b=c[p+8>>2]|0;k=c[p+12>>2]|0;c[n>>2]=p;c[n+4>>2]=n+24;c[n+8>>2]=b;c[n+12>>2]=k;c[n+16>>2]=d;c[n+20>>2]=e;k=wa[c[(c[l>>2]|0)+8>>2]&31](l,g,n,c[a+64>>2]|0)|0;b=c[a+44>>2]|0;g=c[b+8>>2]|0;if((c[g+8>>2]|0)==(c[(c[a+8>>2]|0)+8>>2]|0)){c[b+8>>2]=n;Ma[c[(c[b>>2]|0)+8>>2]&127](b,d,e)}else{g=c[b+12>>2]|0;c[b+12>>2]=n;Ma[c[(c[b>>2]|0)+12>>2]&127](b,d,e)}Ta[c[(c[k>>2]|0)+8>>2]&31](k,c[a+4>>2]|0,n,c[a+52>>2]|0,c[a+44>>2]|0);p=c[a+44>>2]|0;c[((c[(c[p+8>>2]|0)+8>>2]|0)==(c[(c[a+8>>2]|0)+8>>2]|0)?p+8|0:p+12|0)>>2]=g;Ca[c[c[k>>2]>>2]&511](k);Ia[c[(c[l>>2]|0)+60>>2]&127](l,k);c[n+24>>2]=8336;g=c[n+24+52>>2]|0;if(g|0?(Ca[c[c[g>>2]>>2]&511](g),m=c[n+24+52>>2]|0,m|0):0){c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0)}ea=n;return}function de(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0.0,z=0.0;x=a[h+16>>0]&-16;a[h+16>>0]=x;n=+f[e>>2];o=+f[d>>2];p=+f[e+4>>2];q=+f[d+4>>2];r=+f[e+8>>2];s=+f[d+8>>2];t=+f[g>>2];u=+f[g+4>>2];v=+f[g+8>>2];l=+f[b>>2];m=+f[b+4>>2];i=+f[b+8>>2];z=(n-o)*(l-o)+(p-q)*(m-q)+(r-s)*(i-s);y=(t-o)*(l-o)+(u-q)*(m-q)+(v-s)*(i-s);do if(z<=0.0&y<=0.0){c[h>>2]=c[d>>2];c[h+4>>2]=c[d+4>>2];c[h+8>>2]=c[d+8>>2];c[h+12>>2]=c[d+12>>2];a[h+16>>0]=x|1;j=0.0;k=0.0;i=1.0}else{w=(n-o)*(l-n)+(p-q)*(m-p)+(r-s)*(i-r);k=(t-o)*(l-n)+(u-q)*(m-p)+(v-s)*(i-r);if(!(!(w>=0.0)|!(k<=w))){c[h>>2]=c[e>>2];c[h+4>>2]=c[e+4>>2];c[h+8>>2]=c[e+8>>2];c[h+12>>2]=c[e+12>>2];a[h+16>>0]=x|2;j=0.0;k=1.0;i=0.0;break}if(w<=0.0&(z>=0.0?z*k-w*y<=0.0:0)){f[h>>2]=o+(n-o)*(z/(z-w));f[h+4>>2]=q+(p-q)*(z/(z-w));f[h+8>>2]=s+(r-s)*(z/(z-w));f[h+12>>2]=0.0;a[h+16>>0]=x|3;j=0.0;k=z/(z-w);i=1.0-z/(z-w);break}j=(n-o)*(l-t)+(p-q)*(m-u)+(r-s)*(i-v);i=(t-o)*(l-t)+(u-q)*(m-u)+(v-s)*(i-v);if(!(!(i>=0.0)|!(j<=i))){c[h>>2]=c[g>>2];c[h+4>>2]=c[g+4>>2];c[h+8>>2]=c[g+8>>2];c[h+12>>2]=c[g+12>>2];a[h+16>>0]=x|4;j=1.0;k=0.0;i=0.0;break}if(i<=0.0&(y>=0.0?j*y-z*i<=0.0:0)){f[h>>2]=o+(t-o)*(y/(y-i));f[h+4>>2]=q+(u-q)*(y/(y-i));f[h+8>>2]=s+(v-s)*(y/(y-i));f[h+12>>2]=0.0;a[h+16>>0]=x|5;j=y/(y-i);k=0.0;i=1.0-y/(y-i);break}if((w*i-j*k<=0.0?k-w>=0.0:0)?j-i>=0.0:0){k=(k-w)/(k-w+(j-i));f[h>>2]=n+(t-n)*k;f[h+4>>2]=p+(u-p)*k;f[h+8>>2]=r+(v-r)*k;f[h+12>>2]=0.0;a[h+16>>0]=x|6;j=k;k=1.0-k;i=0.0;break}l=1.0/(z*k-w*y+(w*i-j*k+(j*y-z*i)));m=(j*y-z*i)*l;i=(z*k-w*y)*l;f[h>>2]=(t-o)*i+(o+(n-o)*m);f[h+4>>2]=(u-q)*i+(q+(p-q)*m);f[h+8>>2]=(v-s)*i+(s+(r-s)*m);f[h+12>>2]=0.0;a[h+16>>0]=x|7;j=i;k=m;i=1.0-m-i}while(0);f[h+20>>2]=i;f[h+24>>2]=k;f[h+28>>2]=j;f[h+32>>2]=0.0;return}function ee(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0;g=ea;ea=ea+256|0;Fi(14335);c[g+32>>2]=5124;k=g+32+36|0;c[k>>2]=c[b>>2];c[k+4>>2]=c[b+4>>2];c[k+8>>2]=c[b+8>>2];c[k+12>>2]=c[b+12>>2];l=g+32+52|0;c[l>>2]=c[d>>2];c[l+4>>2]=c[d+4>>2];c[l+8>>2]=c[d+8>>2];c[l+12>>2]=c[d+12>>2];c[g+32+212>>2]=a;c[g+32+216>>2]=e;c[g+32+68>>2]=1065353216;c[g+32+72>>2]=0;c[g+32+72+4>>2]=0;c[g+32+72+8>>2]=0;c[g+32+72+12>>2]=0;c[g+32+88>>2]=1065353216;c[g+32+92>>2]=0;c[g+32+92+4>>2]=0;c[g+32+92+8>>2]=0;c[g+32+92+12>>2]=0;c[g+32+108>>2]=1065353216;c[g+32+112>>2]=0;c[g+32+116>>2]=c[k>>2];c[g+32+116+4>>2]=c[k+4>>2];c[g+32+116+8>>2]=c[k+8>>2];c[g+32+116+12>>2]=c[k+12>>2];c[g+32+132>>2]=1065353216;c[g+32+136>>2]=0;c[g+32+136+4>>2]=0;c[g+32+136+8>>2]=0;c[g+32+136+12>>2]=0;c[g+32+152>>2]=1065353216;c[g+32+156>>2]=0;c[g+32+156+4>>2]=0;c[g+32+156+8>>2]=0;c[g+32+156+12>>2]=0;c[g+32+172>>2]=1065353216;c[g+32+176>>2]=0;c[g+32+180>>2]=c[d>>2];c[g+32+180+4>>2]=c[d+4>>2];c[g+32+180+8>>2]=c[d+8>>2];c[g+32+180+12>>2]=c[d+12>>2];m=+f[d>>2]-+f[b>>2];j=+f[d+4>>2]-+f[b+4>>2];i=+f[d+8>>2]-+f[b+8>>2];h=1.0/+s(+(m*m+j*j+i*i));p=m*h==0.0?1000000015047466219876688.0e6:1.0/(m*h);f[g+32+4>>2]=p;o=j*h==0.0?1000000015047466219876688.0e6:1.0/(j*h);f[g+32+8>>2]=o;n=i*h==0.0?1000000015047466219876688.0e6:1.0/(i*h);f[g+32+12>>2]=n;c[g+32+20>>2]=p<0.0&1;c[g+32+24>>2]=o<0.0&1;c[g+32+28>>2]=n<0.0&1;f[g+32+32>>2]=m*h*(+f[l>>2]-+f[k>>2])+j*h*(+f[g+32+56>>2]-+f[g+32+40>>2])+i*h*(+f[g+32+60>>2]-+f[g+32+44>>2]);a=c[a+68>>2]|0;e=c[(c[a>>2]|0)+24>>2]|0;c[g+16>>2]=0;c[g+16+4>>2]=0;c[g+16+8>>2]=0;c[g+16+12>>2]=0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;Va[e&7](a,b,d,g+32|0,g+16|0,g);b=c[2685]|0;a=(c[b+16>>2]|0)+-1|0;c[b+16>>2]=a;if(a|0){ea=g;return}do if(c[b+4>>2]|0){Y(g+32|0,0)|0;l=c[6746]|0;f[b+8>>2]=+f[b+8>>2]+ +(((c[g+32+4>>2]|0)-(c[l+4>>2]|0)+(((c[g+32>>2]|0)-(c[l>>2]|0)|0)*1e6|0)-(c[b+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[b+16>>2]|0)){b=c[2685]|0;break}else{ea=g;return}}while(0);c[2685]=c[b+20>>2];ea=g;return}function fe(a,b,h){a=a|0;b=b|0;h=h|0;var i=0,j=0.0,k=0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0;t=ea;ea=ea+32|0;o=c[a+4>>2]|0;Za[c[(c[o>>2]|0)+16>>2]&3](o,t+28|0,t+24|0,t+20|0,t+16|0,t+12|0,t+8|0,t+4|0,t,b);o=(c[t+12>>2]|0)+(z(c[t+8>>2]|0,h)|0)|0;r=c[a+4>>2]|0;n=c[t>>2]|0;switch(n|0){case 3:{i=e[o+4>>1]|0;break}case 2:{i=c[o+8>>2]|0;break}default:i=d[o+2>>0]|0}s=(c[t+20>>2]|0)==0;p=c[t+28>>2]|0;q=c[t+16>>2]|0;i=p+(z(q,i)|0)|0;if(s){k=i+8|0;l=+f[r+12>>2];m=+f[i>>2]*+f[r+4>>2];j=+f[i+4>>2]*+f[r+8>>2]}else{k=r+12|0;l=+g[i+16>>3];m=+f[r+4>>2]*+g[i>>3];j=+f[r+8>>2]*+g[i+8>>3]}l=+f[k>>2]*l;f[a+44>>2]=m;f[a+48>>2]=j;f[a+52>>2]=l;f[a+56>>2]=0.0;switch(n|0){case 3:{i=e[o+2>>1]|0;break}case 2:{i=c[o+4>>2]|0;break}default:i=d[o+1>>0]|0}i=p+(z(q,i)|0)|0;if(s){k=i+8|0;l=+f[r+12>>2];m=+f[i>>2]*+f[r+4>>2];j=+f[i+4>>2]*+f[r+8>>2]}else{k=r+12|0;l=+g[i+16>>3];m=+f[r+4>>2]*+g[i>>3];j=+f[r+8>>2]*+g[i+8>>3]}l=+f[k>>2]*l;f[a+28>>2]=m;f[a+32>>2]=j;f[a+36>>2]=l;f[a+40>>2]=0.0;switch(n|0){case 3:{i=e[o>>1]|0;break}case 2:{i=c[o>>2]|0;break}default:i=d[o>>0]|0}i=p+(z(q,i)|0)|0;if(s){q=i+8|0;m=+f[r+12>>2];j=+f[i>>2]*+f[r+4>>2];l=+f[i+4>>2]*+f[r+8>>2];u=+f[q>>2];m=u*m;r=a+12|0;f[r>>2]=j;r=a+16|0;f[r>>2]=l;r=a+20|0;f[r>>2]=m;r=a+24|0;f[r>>2]=0.0;r=a+8|0;r=c[r>>2]|0;q=c[r>>2]|0;q=q+8|0;q=c[q>>2]|0;s=a+12|0;Pa[q&127](r,s,b,h);a=c[a+4>>2]|0;h=c[a>>2]|0;h=h+24|0;h=c[h>>2]|0;Ia[h&127](a,b);ea=t;return}else{q=r+12|0;u=+g[i+16>>3];l=+f[r+4>>2]*+g[i>>3];m=+f[r+8>>2]*+g[i+8>>3];j=+f[q>>2];u=j*u;r=a+12|0;f[r>>2]=l;r=a+16|0;f[r>>2]=m;r=a+20|0;f[r>>2]=u;r=a+24|0;f[r>>2]=0.0;r=a+8|0;r=c[r>>2]|0;q=c[r>>2]|0;q=q+8|0;q=c[q>>2]|0;s=a+12|0;Pa[q&127](r,s,b,h);a=c[a+4>>2]|0;h=c[a>>2]|0;h=h+24|0;h=c[h>>2]|0;Ia[h&127](a,b);ea=t;return}} +function ib(a,b,d,e,g){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;var i=0.0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0,O=0.0,P=0,Q=0,R=0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ia=0.0,ja=0.0,ka=0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0,Ba=0.0,Ca=0.0,Da=0,Ea=0,Fa=0;Fa=ea;ea=ea+480|0;c[Fa+48>>2]=c[b>>2];c[Fa>>2]=c[b+64>>2];k=Fa+48+4|0;c[k>>2]=c[b+4>>2];c[Fa+4>>2]=c[b+68>>2];e=Fa+48+8|0;c[e>>2]=c[b+8>>2];c[Fa+8>>2]=c[b+72>>2];G=Fa+48+16|0;c[G>>2]=c[b+16>>2];c[Fa+16>>2]=c[b+80>>2];B=Fa+48+20|0;c[B>>2]=c[b+20>>2];c[Fa+20>>2]=c[b+84>>2];R=Fa+48+24|0;c[R>>2]=c[b+24>>2];c[Fa+24>>2]=c[b+88>>2];F=Fa+48+32|0;c[F>>2]=c[b+32>>2];c[Fa+32>>2]=c[b+96>>2];m=Fa+48+36|0;c[m>>2]=c[b+36>>2];c[Fa+36>>2]=c[b+100>>2];g=Fa+48+40|0;c[g>>2]=c[b+40>>2];c[Fa+40>>2]=c[b+104>>2];Ea=c[a+4>>2]|0;xa=+f[Ea+28>>2];ya=+f[Ea+32>>2];wa=+f[Ea+36>>2];ua=+ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea);va=+ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea);wa=(wa+ +ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea))*2.0;Ea=c[a+8>>2]|0;Ba=+f[Ea+28>>2];Ca=+f[Ea+32>>2];Y=+f[Ea+36>>2];za=+ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea);Aa=+ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea);Y=(Y+ +ha[c[(c[Ea>>2]|0)+48>>2]&15](Ea))*2.0;aa=+f[b+112>>2]-+f[b+48>>2];da=+f[b+116>>2]-+f[b+52>>2];ca=+f[b+120>>2]-+f[b+56>>2];ta=+f[Fa+48>>2];oa=+f[G>>2];pa=+f[F>>2];na=+f[k>>2];la=+f[B>>2];ma=+f[m>>2];L=+f[e>>2];E=+f[R>>2];K=+f[g>>2];f[Fa+468>>2]=(xa+ua)*2.0*.5;f[Fa+468+4>>2]=(ya+va)*2.0*.5;f[Fa+468+8>>2]=wa*.5;f[Fa+456>>2]=(Ba+za)*2.0*.5;f[Fa+456+4>>2]=(Ca+Aa)*2.0*.5;f[Fa+456+8>>2]=Y*.5;U=+f[Fa>>2];S=+f[Fa+16>>2];T=+f[Fa+32>>2];$=+f[Fa+4>>2];Z=+f[Fa+20>>2];_=+f[Fa+36>>2];sa=+f[Fa+8>>2];qa=+f[Fa+24>>2];ra=+f[Fa+40>>2];M=+r(+(ta*U+oa*S+pa*T));V=+r(+(ta*$+oa*Z+pa*_));fa=+r(+(ta*sa+oa*qa+pa*ra));O=+r(+(na*U+la*S+ma*T));W=+r(+(na*$+la*Z+ma*_));ga=+r(+(na*sa+la*qa+ma*ra));ia=+r(+(L*U+E*S+K*T));ja=+r(+(L*$+E*Z+K*_));X=+r(+(L*sa+E*qa+K*ra));l=+r(+(aa*ta+da*oa+ca*pa))-((xa+ua)*2.0*.5+(Ba+za)*2.0*.5*M+(Ca+Aa)*2.0*.5*V+Y*.5*fa);if(l>0.0){ea=Fa;return}if(l>-3402823466385288598117041.0e14){a=1;H=aa*ta+da*oa+ca*pa<0.0&1;I=Fa+48|0}else{a=0;H=0;I=0;l=-3402823466385288598117041.0e14}i=+r(+(aa*na+da*la+ca*ma))-((ya+va)*2.0*.5+(Ba+za)*2.0*.5*O+(Ca+Aa)*2.0*.5*W+Y*.5*ga);if(i>0.0){ea=Fa;return}if(i>l){a=2;H=aa*na+da*la+ca*ma<0.0&1;I=k;l=i}i=+r(+(aa*L+da*E+ca*K))-(wa*.5+(Ba+za)*2.0*.5*ia+(Ca+Aa)*2.0*.5*ja+Y*.5*X);if(i>0.0){ea=Fa;return}if(i>l){a=3;H=aa*L+da*E+ca*K<0.0&1;I=e;l=i}i=+r(+(aa*U+da*S+ca*T))-((Ba+za)*2.0*.5+(wa*.5*ia+((xa+ua)*2.0*.5*M+(ya+va)*2.0*.5*O)));if(i>0.0){ea=Fa;return}if(i>l){a=4;H=aa*U+da*S+ca*T<0.0&1;I=Fa;l=i}i=+r(+(aa*$+da*Z+ca*_))-((Ca+Aa)*2.0*.5+(wa*.5*ja+((xa+ua)*2.0*.5*V+(ya+va)*2.0*.5*W)));if(i>0.0){ea=Fa;return}if(i>l){a=5;H=aa*$+da*Z+ca*_<0.0&1;I=Fa+4|0;l=i}i=+r(+(aa*sa+da*qa+ca*ra))-(Y*.5+(wa*.5*X+((xa+ua)*2.0*.5*fa+(ya+va)*2.0*.5*ga)));if(i>0.0){ea=Fa;return}if(i>l){a=6;H=aa*sa+da*qa+ca*ra<0.0&1;I=Fa+8|0;l=i}o=(aa*L+da*E+ca*K)*(na*U+la*S+ma*T)-(aa*na+da*la+ca*ma)*(L*U+E*S+K*T);q=+r(+o)-(Y*.5*(V+9.999999747378752e-06)+((ya+va)*2.0*.5*(ia+9.999999747378752e-06)+wa*.5*(O+9.999999747378752e-06)+(Ca+Aa)*2.0*.5*(fa+9.999999747378752e-06)));if(q>1.1920928955078125e-07){ea=Fa;return}t=(L*U+E*S+K*T)*(L*U+E*S+K*T)+0.0;A=(na*U+la*S+ma*T)*(na*U+la*S+ma*T);p=+s(+(A+t));if(p>1.1920928955078125e-07?q/p*1.0499999523162842>l:0){n=0.0/p;j=-(L*U+E*S+K*T)/p;i=(na*U+la*S+ma*T)/p;a=7;H=o<0.0&1;I=0;l=q/p}else{n=0.0;j=0.0;i=0.0}o=(aa*L+da*E+ca*K)*(na*$+la*Z+ma*_)-(aa*na+da*la+ca*ma)*(L*$+E*Z+K*_);q=+r(+o)-(Y*.5*(M+9.999999747378752e-06)+((ya+va)*2.0*.5*(ja+9.999999747378752e-06)+wa*.5*(W+9.999999747378752e-06)+(Ba+za)*2.0*.5*(fa+9.999999747378752e-06)));if(q>1.1920928955078125e-07){ea=Fa;return}u=(L*$+E*Z+K*_)*(L*$+E*Z+K*_)+0.0;C=(na*$+la*Z+ma*_)*(na*$+la*Z+ma*_);p=+s(+(C+u));if(p>1.1920928955078125e-07?q/p*1.0499999523162842>l:0){n=0.0/p;j=-(L*$+E*Z+K*_)/p;i=(na*$+la*Z+ma*_)/p;a=8;H=o<0.0&1;I=0;l=q/p}o=(aa*L+da*E+ca*K)*(na*sa+la*qa+ma*ra)-(aa*na+da*la+ca*ma)*(L*sa+E*qa+K*ra);q=+r(+o)-((Ca+Aa)*2.0*.5*(M+9.999999747378752e-06)+((Ba+za)*2.0*.5*(V+9.999999747378752e-06)+((ya+va)*2.0*.5*(X+9.999999747378752e-06)+wa*.5*(ga+9.999999747378752e-06))));if(q>1.1920928955078125e-07){ea=Fa;return}w=(L*sa+E*qa+K*ra)*(L*sa+E*qa+K*ra)+0.0;D=(na*sa+la*qa+ma*ra)*(na*sa+la*qa+ma*ra);p=+s(+(D+w));if(p>1.1920928955078125e-07?q/p*1.0499999523162842>l:0){n=0.0/p;j=-(L*sa+E*qa+K*ra)/p;i=(na*sa+la*qa+ma*ra)/p;a=9;H=o<0.0&1;I=0;l=q/p}o=(aa*ta+da*oa+ca*pa)*(L*U+E*S+K*T)-(aa*L+da*E+ca*K)*(ta*U+oa*S+pa*T);q=+r(+o)-(Y*.5*(W+9.999999747378752e-06)+((xa+ua)*2.0*.5*(ia+9.999999747378752e-06)+wa*.5*(M+9.999999747378752e-06)+(Ca+Aa)*2.0*.5*(ga+9.999999747378752e-06)));if(q>1.1920928955078125e-07){ea=Fa;return}x=(ta*U+oa*S+pa*T)*(ta*U+oa*S+pa*T);p=+s(+(x+t));do if(p>1.1920928955078125e-07){if(!(q/p*1.0499999523162842>l))break;n=(L*U+E*S+K*T)/p;j=0.0/p;i=-(ta*U+oa*S+pa*T)/p;a=10;H=o<0.0&1;I=0;l=q/p}while(0);o=(aa*ta+da*oa+ca*pa)*(L*$+E*Z+K*_)-(aa*L+da*E+ca*K)*(ta*$+oa*Z+pa*_);q=+r(+o)-(Y*.5*(O+9.999999747378752e-06)+((xa+ua)*2.0*.5*(ja+9.999999747378752e-06)+wa*.5*(V+9.999999747378752e-06)+(Ba+za)*2.0*.5*(ga+9.999999747378752e-06)));if(q>1.1920928955078125e-07){ea=Fa;return}v=(ta*$+oa*Z+pa*_)*(ta*$+oa*Z+pa*_);p=+s(+(v+u));do if(p>1.1920928955078125e-07){if(!(q/p*1.0499999523162842>l))break;n=(L*$+E*Z+K*_)/p;j=0.0/p;i=-(ta*$+oa*Z+pa*_)/p;a=11;H=o<0.0&1;I=0;l=q/p}while(0);o=(aa*ta+da*oa+ca*pa)*(L*sa+E*qa+K*ra)-(aa*L+da*E+ca*K)*(ta*sa+oa*qa+pa*ra);q=+r(+o)-((Ca+Aa)*2.0*.5*(O+9.999999747378752e-06)+((Ba+za)*2.0*.5*(W+9.999999747378752e-06)+((xa+ua)*2.0*.5*(X+9.999999747378752e-06)+wa*.5*(fa+9.999999747378752e-06))));if(q>1.1920928955078125e-07){ea=Fa;return}t=(ta*sa+oa*qa+pa*ra)*(ta*sa+oa*qa+pa*ra);p=+s(+(t+w));do if(p>1.1920928955078125e-07){if(!(q/p*1.0499999523162842>l))break;n=(L*sa+E*qa+K*ra)/p;j=0.0/p;i=-(ta*sa+oa*qa+pa*ra)/p;a=12;H=o<0.0&1;I=0;l=q/p}while(0);p=(aa*na+da*la+ca*ma)*(ta*U+oa*S+pa*T)-(aa*ta+da*oa+ca*pa)*(na*U+la*S+ma*T);q=+r(+p)-(Y*.5*(ja+9.999999747378752e-06)+((xa+ua)*2.0*.5*(O+9.999999747378752e-06)+(ya+va)*2.0*.5*(M+9.999999747378752e-06)+(Ca+Aa)*2.0*.5*(X+9.999999747378752e-06)));if(q>1.1920928955078125e-07){ea=Fa;return}o=+s(+(A+x+0.0));do if(o>1.1920928955078125e-07){if(!(q/o*1.0499999523162842>l))break;n=-(na*U+la*S+ma*T)/o;j=(ta*U+oa*S+pa*T)/o;i=0.0/o;a=13;H=p<0.0&1;I=0;l=q/o}while(0);q=(aa*na+da*la+ca*ma)*(ta*$+oa*Z+pa*_)-(aa*ta+da*oa+ca*pa)*(na*$+la*Z+ma*_);p=+r(+q)-(Y*.5*(ia+9.999999747378752e-06)+((xa+ua)*2.0*.5*(W+9.999999747378752e-06)+(ya+va)*2.0*.5*(V+9.999999747378752e-06)+(Ba+za)*2.0*.5*(X+9.999999747378752e-06)));if(p>1.1920928955078125e-07){ea=Fa;return}o=+s(+(C+v+0.0));do if(o>1.1920928955078125e-07){if(!(p/o*1.0499999523162842>l))break;n=-(na*$+la*Z+ma*_)/o;j=(ta*$+oa*Z+pa*_)/o;i=0.0/o;a=14;H=q<0.0&1;I=0;l=p/o}while(0);q=(aa*na+da*la+ca*ma)*(ta*sa+oa*qa+pa*ra)-(aa*ta+da*oa+ca*pa)*(na*sa+la*qa+ma*ra);p=+r(+q)-((Ca+Aa)*2.0*.5*(ia+9.999999747378752e-06)+((Ba+za)*2.0*.5*(ja+9.999999747378752e-06)+((xa+ua)*2.0*.5*(ga+9.999999747378752e-06)+(ya+va)*2.0*.5*(fa+9.999999747378752e-06))));if(p>1.1920928955078125e-07){ea=Fa;return}o=+s(+(D+t+0.0));do if(o>1.1920928955078125e-07){if(!(p/o*1.0499999523162842>l)){P=55;break}n=-(na*sa+la*qa+ma*ra)/o;j=(ta*sa+oa*qa+pa*ra)/o;i=0.0/o;a=15;H=q<0.0&1;l=p/o;P=58}else P=55;while(0);do if((P|0)==55){if(!a){ea=Fa;return}if(!I){P=58;break}Da=c[I>>2]|0;Ea=c[I+16>>2]|0;J=c[I+32>>2]|0;i=(c[h>>2]=Da,+f[h>>2]);j=(c[h>>2]=Ea,+f[h>>2]);n=(c[h>>2]=J,+f[h>>2]);Q=a;a=Da;I=Ea;O=l}while(0);if((P|0)==58){sa=ta*n+j*+f[k>>2]+i*+f[e>>2];J=(f[h>>2]=sa,c[h>>2]|0);ta=n*+f[G>>2]+j*+f[B>>2]+i*+f[R>>2];I=(f[h>>2]=ta,c[h>>2]|0);O=n*+f[F>>2]+j*+f[m>>2]+i*+f[g>>2];i=sa;j=ta;n=O;Q=a;a=J;J=(f[h>>2]=O,c[h>>2]|0);O=l}if(H){a=(f[h>>2]=-i,c[h>>2]|0);I=(f[h>>2]=-j,c[h>>2]|0);J=(f[h>>2]=-n,c[h>>2]|0)}if((Q|0)>6){M=(c[h>>2]=a,+f[h>>2]);L=(c[h>>2]=I,+f[h>>2]);K=(c[h>>2]=J,+f[h>>2]);u=+f[Fa+48>>2];w=+f[G>>2];o=+f[F>>2];i=(u*M+w*L+o*K>0.0?1.0:-1.0)*((xa+ua)*2.0*.5);j=+f[k>>2];v=+f[B>>2];t=+f[m>>2];x=(j*M+v*L+t*K>0.0?1.0:-1.0)*((ya+va)*2.0*.5);E=+f[e>>2];C=+f[R>>2];D=+f[g>>2];l=(E*M+C*L+D*K>0.0?1.0:-1.0)*(wa*.5);E=+f[b+48>>2]+i*u+x*j+l*E;C=+f[b+52>>2]+i*w+x*v+l*C;D=+f[b+56>>2]+i*o+x*t+l*D;c[Fa+352>>2]=c[b+112>>2];c[Fa+352+4>>2]=c[b+112+4>>2];c[Fa+352+8>>2]=c[b+112+8>>2];l=+f[Fa>>2];t=+f[Fa+16>>2];x=+f[Fa+32>>2];o=(l*M+t*L+x*K>0.0?-1.0:1.0)*((Ba+za)*2.0*.5);i=+f[Fa+4>>2];v=+f[Fa+20>>2];w=+f[Fa+36>>2];j=(i*M+v*L+w*K>0.0?-1.0:1.0)*((Ca+Aa)*2.0*.5);v=+f[Fa+352+4>>2]+o*t+j*v;w=+f[Fa+352+8>>2]+o*x+j*w;x=+f[Fa+8>>2];t=+f[Fa+24>>2];u=+f[Fa+40>>2];A=(x*M+t*L+u*K>0.0?-1.0:1.0)*+f[Fa+456+8>>2];x=+f[Fa+352>>2]+o*l+j*i+A*x;f[Fa+352>>2]=x;f[Fa+352+4>>2]=v+A*t;f[Fa+352+8>>2]=w+A*u;Ea=Q+-7|0;i=+f[Fa+48+(((Ea|0)/3|0)<<2)>>2];j=+f[Fa+48+(((Ea|0)/3|0)+4<<2)>>2];l=+f[Fa+48+(((Ea|0)/3|0)+8<<2)>>2];Ea=Ea+(z((Ea|0)/3|0,-3)|0)|0;o=+f[Fa+(Ea<<2)>>2];p=+f[Fa+(Ea+4<<2)>>2];q=+f[Fa+(Ea+8<<2)>>2];n=1.0-(i*o+j*p+l*q)*(i*o+j*p+l*q);if(!(n<=9.999999747378752e-05))i=(((x-E)*i+(v+A*t-C)*j+(w+A*u-D)*l)*(i*o+j*p+l*q)-((x-E)*o+(v+A*t-C)*p+(w+A*u-D)*q))*(1.0/n);else i=0.0;f[Fa+352>>2]=x+i*o;f[Fa+352+4>>2]=v+A*t+i*p;f[Fa+352+8>>2]=w+A*u+i*q;Ea=c[(c[d>>2]|0)+16>>2]|0;f[Fa+320>>2]=-M;f[Fa+320+4>>2]=-L;f[Fa+320+8>>2]=-K;f[Fa+320+12>>2]=0.0;Na[Ea&15](d,Fa+320|0,Fa+352|0,O);ea=Fa;return}Da=(Q|0)<4;ga=(c[h>>2]=a,+f[h>>2]);if(Da){da=(c[h>>2]=I,+f[h>>2]);fa=(c[h>>2]=J,+f[h>>2]);N=Fa+48|0;G=Fa+16|0;F=Fa+32|0;ka=Fa;ba=Fa+468|0;P=Fa+456|0;B=Fa+20|0;m=Fa+36|0;k=Fa+4|0;a=Fa+24|0;g=Fa+40|0;e=Fa+8|0;ca=ga;Ea=b+48|0;H=b+112|0}else{da=-(c[h>>2]=I,+f[h>>2]);fa=-(c[h>>2]=J,+f[h>>2]);N=Fa;ka=Fa+48|0;ba=Fa+456|0;P=Fa+468|0;a=R;ca=-ga;Ea=b+112|0;H=b+48|0}x=ca*+f[ka>>2]+da*+f[G>>2]+fa*+f[F>>2];f[Fa+440>>2]=x;A=ca*+f[k>>2]+da*+f[B>>2]+fa*+f[m>>2];f[Fa+440+4>>2]=A;C=ca*+f[e>>2]+da*+f[a>>2]+fa*+f[g>>2];f[Fa+440+8>>2]=C;x=+r(+x);A=+r(+A);C=+r(+C);e=A>x?(A>C?1:2):x>C?0:2;b=(A>x?A>C:x>C)?2:1;l=+f[P+(e<<2)>>2];j=+f[H>>2]-+f[Ea>>2];i=l*+f[ka+(e<<2)>>2];if(+f[Fa+440+(e<<2)>>2]<0.0){$=j+i;aa=+f[H+4>>2]-+f[Ea+4>>2]+l*+f[ka+((e|4)<<2)>>2];_=+f[H+8>>2]-+f[Ea+8>>2]+l*+f[ka+((e|8)<<2)>>2]}else{$=j-i;aa=+f[H+4>>2]-+f[Ea+4>>2]-l*+f[ka+((e|4)<<2)>>2];_=+f[H+8>>2]-+f[Ea+8>>2]-l*+f[ka+((e|8)<<2)>>2]}Q=(Da?-1:-4)+Q|0;switch(Q|0){case 0:{e=1;g=2;break}case 1:{e=0;g=2;break}default:{e=0;g=1}}R=N+(e<<2)|0;Y=+f[R>>2];W=+f[R+16>>2];X=+f[R+32>>2];Z=$*Y+aa*W+_*X;N=N+(g<<2)|0;K=+f[N>>2];D=+f[N+16>>2];E=+f[N+32>>2];V=$*K+aa*D+_*E;N=ka+((x>C&(A>x^1)&1)<<2)|0;O=+f[N>>2];L=+f[N+16>>2];M=+f[N+32>>2];R=ka+(b<<2)|0;U=+f[R>>2];S=+f[R+16>>2];T=+f[R+32>>2];w=+f[P+((x>C&(A>x^1)&1)<<2)>>2];v=+f[P+(b<<2)>>2];u=(Y*U+W*S+X*T)*v;v=(K*U+D*S+E*T)*v;q=Z-(Y*O+W*L+X*M)*w-u;t=V-(K*O+D*L+E*M)*w-v;l=Z-(Y*O+W*L+X*M)*w+u;f[Fa+416>>2]=l;n=V-(K*O+D*L+E*M)*w+v;o=Z+(Y*O+W*L+X*M)*w+u;p=V+(K*O+D*L+E*M)*w+v;u=Z+(Y*O+W*L+X*M)*w-u;v=V+(K*O+D*L+E*M)*w-v;G=c[ba+(e<<2)>>2]|0;H=c[ba+(g<<2)>>2]|0;w=(c[h>>2]=G,+f[h>>2]);do if(!(w>-q))if(w>-l){a=1;i=-l;e=1;g=Fa+256|0;P=78}else{j=l;i=-l;e=0;g=Fa+256|0;P=153}else{f[Fa+256>>2]=q;f[Fa+256+4>>2]=t;if(!(w>-l)){a=w>-l;i=-l;e=2;g=Fa+256+8|0;P=78;break}f[Fa+256+8>>2]=l;f[Fa+256+8+4>>2]=n;e=2;g=Fa+256+8|0;P=152}while(0);do if((P|0)==78){f[g+4>>2]=t+(-w-q)*((n-t)/(l-q));f[g>>2]=-w;g=g+8|0;if(!a){j=l;P=153;break}f[g>>2]=l;f[g+4>>2]=n;if(!(e+1&8)){e=e+1|0;P=152}else{e=e+1|0;P=102}}while(0);if((P|0)==152){i=+f[Fa+416>>2];j=i;i=-i;g=g+8|0;P=153}a:do if((P|0)==153){if(i-o){f[g+4>>2]=n+(-w-j)*((p-n)/(o-j));f[g>>2]=-w;e=e+1|0;if(!(e&8))g=g+8|0;else{P=102;break}}if(w>-o){f[g>>2]=o;f[g+4>>2]=p;e=e+1|0;if(e&8|0){P=102;break}g=g+8|0;if(w>-o^w>-u){a=w>-u;P=159}else{a=w>-u;P=161}}else if(w>-o^w>-u){a=w>-u;P=159}else{a=w>-u;P=161}if((P|0)==159){f[g+4>>2]=p+(-w-o)*((v-p)/(u-o));f[g>>2]=-w;e=e+1|0;if(e&8|0){P=102;break}g=g+8|0;if(a)P=162;else P=163}else if((P|0)==161)if(a)P=162;else P=163;do if((P|0)==162){f[g>>2]=u;f[g+4>>2]=v;e=e+1|0;if(e&8|0){P=102;break a}if(a^w>-q){g=g+8|0;P=165}else P=167}else if((P|0)==163){if(w>-q){P=165;break}if((e|0)>0)P=167;else{e=0;P=79}}while(0);if((P|0)==165){f[g+4>>2]=v+(-w-u)*((t-v)/(q-u));f[g>>2]=-w;e=e+1|0;if(!(e&8))P=167;else{P=102;break}}b:do if((P|0)==167){B=e;e=0;F=Fa+256|0;g=Fa+352|0;while(1){i=+f[F>>2];if(i>2]=i;c[g+4>>2]=c[F+4>>2];e=e+1|0;if(e&8|0){P=79;break b}i=+f[F>>2];g=g+8|0}m=(B|0)>1;k=F;F=F+8|0;a=m?F:Fa+256|0;j=+f[a>>2];if(i>2];f[g+4>>2]=Ca+(w-i)*((+f[a+4>>2]-Ca)/(j-i));c[g>>2]=G;e=e+1|0;if(!(e&8))g=g+8|0;else{P=79;break b}}if(!m)break;else B=B+-1|0}if((e|0)<=0){e=0;P=79;break}n=(c[h>>2]=H,+f[h>>2]);g=0;F=Fa+352|0;a=Fa+256|0;while(1){k=F+4|0;i=+f[k>>2];if(n>-i){c[a>>2]=c[F>>2];c[a+4>>2]=c[k>>2];g=g+1|0;if(g&8|0){e=g;break b}j=+f[k>>2];l=j;j=-j;a=a+8|0}else{l=i;j=-i}B=(e|0)>1;m=F;F=F+8|0;k=B?F:Fa+352|0;i=+f[k+4>>2];if(j-i){Ca=+f[m>>2];f[a>>2]=Ca+(-n-l)*((+f[k>>2]-Ca)/(i-l));f[a+4>>2]=-n;g=g+1|0;if(!(g&8))a=a+8|0;else{e=g;break b}}if(!B)break;else e=e+-1|0}if((g|0)<=0){e=0;P=79;break}e=0;F=Fa+256|0;a=Fa+352|0;while(1){k=F+4|0;i=+f[k>>2];if(i>2]=c[F>>2];c[a+4>>2]=c[k>>2];e=e+1|0;if(e&8|0){P=79;break b}i=+f[k>>2];a=a+8|0}B=(g|0)>1;m=F;F=F+8|0;k=B?F:Fa+256|0;j=+f[k+4>>2];if(i>2];f[a>>2]=Ca+(n-i)*((+f[k>>2]-Ca)/(j-i));c[a+4>>2]=H;e=e+1|0;if(!(e&8))a=a+8|0;else{P=79;break b}}if(!B){P=79;break}else g=g+-1|0}}while(0);if((P|0)==79)vh(Fa+256|0,Fa+352|0,e<<3|0)|0;if((e|0)>=1)P=104}while(0);if((P|0)==102)P=104;if((P|0)==104){v=1.0/((Y*O+W*L+X*M)*(K*U+D*S+E*T)-(K*O+D*L+E*M)*(Y*U+W*S+X*T));u=+f[ba+(Q<<2)>>2];t=+f[N>>2];o=+f[R>>2];p=+f[ka+((x>C&(A>x^1)&1|4)<<2)>>2];q=+f[ka+((b|4)<<2)>>2];n=+f[ka+((x>C&(A>x^1)&1|8)<<2)>>2];l=+f[ka+((b|8)<<2)>>2];B=0;a=0;do{g=a<<1;i=+f[Fa+256+(g<<2)>>2];j=+f[Fa+256+((g|1)<<2)>>2];za=(K*U+D*S+E*T)*v*(i-Z)-(Y*U+W*S+X*T)*v*(j-V);Ca=(Y*O+W*L+X*M)*v*(j-V)-(K*O+D*L+E*M)*v*(i-Z);g=B*3|0;Aa=$+za*t+Ca*o;f[Fa+160+(g<<2)>>2]=Aa;Ba=aa+za*p+Ca*q;f[Fa+160+(g+1<<2)>>2]=Ba;Ca=_+za*n+Ca*l;f[Fa+160+(g+2<<2)>>2]=Ca;Ca=u-(ca*Aa+da*Ba+fa*Ca);f[Fa+128+(B<<2)>>2]=Ca;g=B<<1;if(Ca>=0.0){f[Fa+256+(g<<2)>>2]=i;f[Fa+256+((g|1)<<2)>>2]=j;B=B+1|0}a=a+1|0}while((a|0)!=(e|0));c:do if((B|0)>=1){G=(B|0)<4?B:4;H=(G|0)>1?G:1;if((B|0)<=(H|0))if(Da){g=Ea+4|0;a=Ea+8|0;j=-(c[h>>2]=I,+f[h>>2]);i=-(c[h>>2]=J,+f[h>>2]);e=0;while(1){Da=e*3|0;f[Fa+352>>2]=+f[Fa+160+(Da<<2)>>2]+ +f[Ea>>2];f[Fa+352+4>>2]=+f[Fa+160+(Da+1<<2)>>2]+ +f[g>>2];f[Fa+352+8>>2]=+f[Fa+160+(Da+2<<2)>>2]+ +f[a>>2];Da=c[(c[d>>2]|0)+16>>2]|0;f[Fa+320>>2]=-ga;f[Fa+320+4>>2]=j;f[Fa+320+8>>2]=i;f[Fa+320+12>>2]=0.0;Na[Da&15](d,Fa+320|0,Fa+352|0,-+f[Fa+128+(e<<2)>>2]);e=e+1|0;if((e|0)==(B|0))break c}}else{g=Ea+4|0;a=Ea+8|0;j=(c[h>>2]=I,+f[h>>2]);i=(c[h>>2]=J,+f[h>>2]);e=0;while(1){Da=e*3|0;Ca=+f[Fa+128+(e<<2)>>2];f[Fa+352>>2]=+f[Fa+160+(Da<<2)>>2]+ +f[Ea>>2]-Ca*ga;f[Fa+352+4>>2]=+f[Fa+160+(Da+1<<2)>>2]+ +f[g>>2]-Ca*j;f[Fa+352+8>>2]=+f[Fa+160+(Da+2<<2)>>2]+ +f[a>>2]-Ca*i;Da=c[(c[d>>2]|0)+16>>2]|0;f[Fa+320>>2]=-ga;f[Fa+320+4>>2]=-j;f[Fa+320+8>>2]=-i;f[Fa+320+12>>2]=0.0;Na[Da&15](d,Fa+320|0,Fa+352|0,-Ca);e=e+1|0;if((e|0)==(B|0))break c}}d:do if((B|0)>1){g=1;k=0;j=+f[Fa+128>>2];while(1){i=+f[Fa+128+(g<<2)>>2];e=i>j;k=e?g:k;g=g+1|0;if((g|0)==(B|0))break;else j=e?i:j}switch(B|0){case 1:{e=Fa+96|0;g=Fa+96|0;a=1;P=120;break d}case 2:{e=Fa+96|0;g=Fa+96|0;a=2;j=(+f[Fa+256>>2]+ +f[Fa+256+8>>2])*.5;i=(+f[Fa+256+4>>2]+ +f[Fa+256+12>>2])*.5;P=124;break d}default:{}}g=B+-1|0;i=0.0;j=0.0;q=0.0;e=0;do{ka=e<<1;za=+f[Fa+256+(ka<<2)>>2];Aa=+f[Fa+256+(ka+3<<2)>>2];Ba=+f[Fa+256+(ka+2<<2)>>2];Ca=+f[Fa+256+((ka|1)<<2)>>2];i=i+(za*Aa-Ba*Ca);j=j+(za+Ba)*(za*Aa-Ba*Ca);q=q+(Aa+Ca)*(za*Aa-Ba*Ca);e=e+1|0}while((e|0)!=(g|0));ka=B<<1;l=+f[Fa+256+(ka+-2<<2)>>2];n=+f[Fa+256+4>>2];o=+f[Fa+256>>2];p=+f[Fa+256+(ka+-1<<2)>>2];i=i+(l*n-o*p);ka=+r(+i)>1.1920928955078125e-07;i=ka?1.0/(i*3.0):999999984306749440.0;if((B|0)>0){m=Fa+96|0;F=Fa+352|0;g=Fa+96|0;a=B;j=(j+(l+o)*(l*n-o*p))*i;i=(q+(n+p)*(l*n-o*p))*i;P=127;break}g=Fa+96|0;e=0}else{e=Fa+96|0;g=Fa+96|0;a=B;k=0;P=120}while(0);if((P|0)==120){j=+f[Fa+256>>2];i=+f[Fa+256+4>>2];P=124}if((P|0)==124){m=e;F=Fa+352|0;P=127}if((P|0)==127){e=0;do{ka=e<<1;f[Fa+352+(e<<2)>>2]=+y(+(+f[Fa+256+((ka|1)<<2)>>2]-i),+(+f[Fa+256+(ka<<2)>>2]-j));e=e+1|0}while((e|0)!=(a|0));e=0;do{c[Fa+320+(e<<2)>>2]=1;e=e+1|0}while((e|0)!=(a|0));e=1;B=a}a=Fa+320+(k<<2)|0;c[a>>2]=0;c[g>>2]=k;e:do if((G|0)>1){n=+f[Fa+352+(k<<2)>>2];if(!e){e=Fa+96+4|0;g=1;while(1){c[e>>2]=k;c[a>>2]=0;g=g+1|0;if((g|0)==(H|0))break e;else e=e+4|0}}a=Fa+96+4|0;m=1;while(1){l=6.2831854820251465/+(H|0)*+(m|0)+n;l=l>3.1415927410125732?l+-6.2831854820251465:l;c[a>>2]=k;e=k;g=0;j=1.0e9;while(1){do if(!(c[Fa+320+(g<<2)>>2]|0))i=j;else{i=+r(+(+f[Fa+352+(g<<2)>>2]-l));i=i>3.1415927410125732?6.2831854820251465-i:i;if(!(i>2]=g;e=g}while(0);g=g+1|0;if((g|0)==(B|0))break;else j=i}c[Fa+320+(e<<2)>>2]=0;m=m+1|0;if((m|0)==(H|0))break;else a=a+4|0}}while(0);if((H|0)>0){g=Ea+4|0;a=Ea+8|0;j=(c[h>>2]=I,+f[h>>2]);i=(c[h>>2]=J,+f[h>>2]);if(Da){e=0;do{Da=c[Fa+96+(e<<2)>>2]|0;f[Fa+352>>2]=+f[Fa+160+(Da*3<<2)>>2]+ +f[Ea>>2];f[Fa+352+4>>2]=+f[Fa+160+((Da*3|0)+1<<2)>>2]+ +f[g>>2];f[Fa+352+8>>2]=+f[Fa+160+((Da*3|0)+2<<2)>>2]+ +f[a>>2];ka=c[(c[d>>2]|0)+16>>2]|0;f[Fa+320>>2]=-ga;f[Fa+320+4>>2]=-j;f[Fa+320+8>>2]=-i;f[Fa+320+12>>2]=0.0;Na[ka&15](d,Fa+320|0,Fa+352|0,-+f[Fa+128+(Da<<2)>>2]);e=e+1|0}while(e>>>0>>0)}else{e=0;do{ka=c[Fa+96+(e<<2)>>2]|0;za=+f[Fa+160+(ka*3<<2)>>2]+ +f[Ea>>2];f[Fa+352>>2]=za;Aa=+f[Fa+160+((ka*3|0)+1<<2)>>2]+ +f[g>>2];f[Fa+352+4>>2]=Aa;Ba=+f[Fa+160+((ka*3|0)+2<<2)>>2]+ +f[a>>2];f[Fa+352+8>>2]=Ba;Da=c[(c[d>>2]|0)+16>>2]|0;f[Fa+320>>2]=-ga;f[Fa+320+4>>2]=-j;f[Fa+320+8>>2]=-i;f[Fa+320+12>>2]=0.0;Ca=+f[Fa+128+(ka<<2)>>2];f[Fa+424>>2]=za-Ca*ga;f[Fa+424+4>>2]=Aa-Ca*j;f[Fa+424+8>>2]=Ba-Ca*i;f[Fa+424+12>>2]=0.0;Na[Da&15](d,Fa+320|0,Fa+424|0,-Ca);e=e+1|0}while(e>>>0>>0)}}}while(0)}ea=Fa;return}function jb(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;var i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0;P=ea;ea=ea+448|0;if(!(a[b+527>>0]|0)){ea=P;return}J=c[b+28>>2]|0;I=+f[b+348>>2];H=+f[b+352>>2];B=+f[b+356>>2];k=+f[J+52>>2];z=I*+f[J+4>>2]+H*+f[J+8>>2]+B*+f[J+12>>2]+k;l=+f[J+56>>2];D=I*+f[J+20>>2]+H*+f[J+24>>2]+B*+f[J+28>>2]+l;m=+f[J+60>>2];B=I*+f[J+36>>2]+H*+f[J+40>>2]+B*+f[J+44>>2]+m;K=c[b+32>>2]|0;H=+f[b+412>>2];I=+f[b+416>>2];C=+f[b+420>>2];n=+f[K+52>>2];A=H*+f[K+4>>2]+I*+f[K+8>>2]+C*+f[K+12>>2]+n;q=+f[K+56>>2];E=H*+f[K+20>>2]+I*+f[K+24>>2]+C*+f[K+28>>2]+q;t=+f[K+60>>2];C=H*+f[K+36>>2]+I*+f[K+40>>2]+C*+f[K+44>>2]+t;if(!(a[b+524>>0]|0)){v=+f[d+192>>2]+ +f[d+80>>2];w=+f[d+196>>2]+ +f[d+84>>2];u=+f[d+200>>2]+ +f[d+88>>2];H=+f[e+192>>2]+ +f[e+80>>2];G=+f[e+196>>2]+ +f[e+84>>2];I=+f[e+200>>2]+ +f[e+88>>2];F=+f[d+176>>2]+ +f[d+64>>2]+((B-m)*w-(D-l)*u)-(+f[e+176>>2]+ +f[e+64>>2]+((C-t)*G-(E-q)*I));I=+f[d+180>>2]+ +f[d+68>>2]+((z-k)*u-(B-m)*v)-(+f[e+180>>2]+ +f[e+68>>2]+((A-n)*I-(C-t)*H));G=+f[d+184>>2]+ +f[d+72>>2]+((D-l)*v-(z-k)*w)-(+f[e+184>>2]+ +f[e+72>>2]+((E-q)*H-(A-n)*G));y=(c[d+240>>2]|0)==0;x=(c[e+240>>2]|0)==0;r=0;do{w=1.0/+f[b+48+(r*84|0)+80>>2];i=b+48+(r*84|0)|0;v=+f[i>>2];p=b+48+(r*84|0)+4|0;u=+f[p>>2];o=b+48+(r*84|0)+8|0;H=+f[o>>2];H=w*(((z-A)*v+(D-E)*u+(B-C)*H)*-.30000001192092896/g)-w*(F*v+I*u+G*H);f[b+36>>2]=+f[b+36>>2]+H;u=+f[o>>2];v=+f[p>>2];w=+f[i>>2];j=+f[J+344>>2];if(!y){S=((D-l)*u-(B-m)*v)*+f[J+296>>2]+((B-m)*w-(z-k)*u)*+f[J+300>>2]+((z-k)*v-(D-l)*w)*+f[J+304>>2];Q=((D-l)*u-(B-m)*v)*+f[J+280>>2]+((B-m)*w-(z-k)*u)*+f[J+284>>2]+((z-k)*v-(D-l)*w)*+f[J+288>>2];R=((D-l)*u-(B-m)*v)*+f[J+264>>2]+((B-m)*w-(z-k)*u)*+f[J+268>>2]+((z-k)*v-(D-l)*w)*+f[J+272>>2];U=H*(v*j)*+f[d+116>>2];T=H*(u*j)*+f[d+120>>2];f[d+64>>2]=H*(w*j)*+f[d+112>>2]+ +f[d+64>>2];f[d+68>>2]=U+ +f[d+68>>2];f[d+72>>2]=T+ +f[d+72>>2];Q=Q*(H*+f[d+100>>2]);j=S*(H*+f[d+104>>2]);f[d+80>>2]=R*(H*+f[d+96>>2])+ +f[d+80>>2];f[d+84>>2]=Q+ +f[d+84>>2];f[d+88>>2]=j+ +f[d+88>>2]}j=+f[K+344>>2];if(!x){U=((E-q)*u-(C-t)*v)*+f[K+296>>2]+((C-t)*w-(A-n)*u)*+f[K+300>>2]+((A-n)*v-(E-q)*w)*+f[K+304>>2];T=((E-q)*u-(C-t)*v)*+f[K+280>>2]+((C-t)*w-(A-n)*u)*+f[K+284>>2]+((A-n)*v-(E-q)*w)*+f[K+288>>2];S=((E-q)*u-(C-t)*v)*+f[K+264>>2]+((C-t)*w-(A-n)*u)*+f[K+268>>2]+((A-n)*v-(E-q)*w)*+f[K+272>>2];Q=j*+f[p>>2]*-H*+f[e+116>>2];R=j*+f[o>>2]*-H*+f[e+120>>2];f[e+64>>2]=+f[e+112>>2]*(j*+f[i>>2]*-H)+ +f[e+64>>2];f[e+68>>2]=Q+ +f[e+68>>2];f[e+72>>2]=R+ +f[e+72>>2];T=T*(+f[e+100>>2]*-H);U=U*(+f[e+104>>2]*-H);f[e+80>>2]=S*(+f[e+96>>2]*-H)+ +f[e+80>>2];f[e+84>>2]=T+ +f[e+84>>2];f[e+88>>2]=U+ +f[e+88>>2]}r=r+1|0}while((r|0)!=3)}do if(!(a[b+552>>0]|0)){j=+f[b+440>>2];if(!(j>1.1920928955078125e-07)){r=e+192|0;i=d+192|0;y=e+200|0;p=d+200|0;M=e+88|0;J=d+88|0;N=e+80|0;K=d+80|0;x=e+196|0;o=d+196|0;O=e+84|0;L=d+84|0;break}u=+f[d+80>>2];v=+f[d+84>>2];w=+f[d+88>>2];k=+f[e+192>>2]+ +f[e+80>>2]-(+f[d+192>>2]+u);n=+f[e+196>>2]+ +f[e+84>>2]-(+f[d+196>>2]+v);t=+f[e+200>>2]+ +f[e+88>>2]-(+f[d+200>>2]+w);if(k*k+n*n+t*t>1.1920928955078125e-07){m=1.0/+s(+(k*k+n*n+t*t));z=+f[J+264>>2];A=+f[J+280>>2];B=+f[J+296>>2];C=+f[J+268>>2];D=+f[J+284>>2];E=+f[J+300>>2];F=+f[J+272>>2];G=+f[J+288>>2];q=+f[J+304>>2];j=j*(1.0/(k*m*(k*m*z+n*m*A+t*m*B)+n*m*(k*m*C+n*m*D+t*m*E)+t*m*(k*m*F+n*m*G+t*m*q)+(k*m*(k*m*+f[K+264>>2]+n*m*+f[K+280>>2]+t*m*+f[K+296>>2])+n*m*(k*m*+f[K+268>>2]+n*m*+f[K+284>>2]+t*m*+f[K+300>>2])+t*m*(k*m*+f[K+272>>2]+n*m*+f[K+288>>2]+t*m*+f[K+304>>2]))));m=+s(+(t*j*(t*j)+(k*j*(k*j)+n*j*(n*j))));l=k*j*(1.0/m);k=n*j*(1.0/m);j=t*j*(1.0/m);if(c[d+240>>2]|0){U=m*0.0*+f[d+116>>2];T=m*0.0*+f[d+120>>2];f[d+64>>2]=m*0.0*+f[d+112>>2]+ +f[d+64>>2];f[d+68>>2]=U+ +f[d+68>>2];f[d+72>>2]=T+ +f[d+72>>2];T=(l*A+k*D+j*G)*(m*+f[d+100>>2]);U=(l*B+k*E+j*q)*(m*+f[d+104>>2]);f[d+80>>2]=u+(l*z+k*C+j*F)*(m*+f[d+96>>2]);f[d+84>>2]=v+T;f[d+88>>2]=w+U}if(c[e+240>>2]|0){U=l*+f[K+296>>2]+k*+f[K+300>>2]+j*+f[K+304>>2];T=l*+f[K+280>>2]+k*+f[K+284>>2]+j*+f[K+288>>2];S=l*+f[K+264>>2]+k*+f[K+268>>2]+j*+f[K+272>>2];Q=m*-0.0*+f[e+116>>2];R=m*-0.0*+f[e+120>>2];f[e+64>>2]=m*-0.0*+f[e+112>>2]+ +f[e+64>>2];f[e+68>>2]=Q+ +f[e+68>>2];f[e+72>>2]=R+ +f[e+72>>2];T=T*(+f[e+100>>2]*-m);U=U*(+f[e+104>>2]*-m);f[e+80>>2]=S*(+f[e+96>>2]*-m)+ +f[e+80>>2];f[e+84>>2]=T+ +f[e+84>>2];f[e+88>>2]=U+ +f[e+88>>2];r=e+192|0;i=d+192|0;y=e+200|0;p=d+200|0;M=e+88|0;J=d+88|0;N=e+80|0;K=d+80|0;x=e+196|0;o=d+196|0;O=e+84|0;L=d+84|0}else{r=e+192|0;i=d+192|0;y=e+200|0;p=d+200|0;M=e+88|0;J=d+88|0;N=e+80|0;K=d+80|0;x=e+196|0;o=d+196|0;O=e+84|0;L=d+84|0}}else{r=e+192|0;i=d+192|0;y=e+200|0;p=d+200|0;M=e+88|0;J=d+88|0;N=e+80|0;K=d+80|0;x=e+196|0;o=d+196|0;O=e+84|0;L=d+84|0}}else{c[P+352>>2]=c[J+4>>2];c[P+352+4>>2]=c[J+4+4>>2];c[P+352+8>>2]=c[J+4+8>>2];c[P+352+12>>2]=c[J+4+12>>2];c[P+352+16>>2]=c[J+20>>2];c[P+352+16+4>>2]=c[J+20+4>>2];c[P+352+16+8>>2]=c[J+20+8>>2];c[P+352+16+12>>2]=c[J+20+12>>2];c[P+352+32>>2]=c[J+36>>2];c[P+352+32+4>>2]=c[J+36+4>>2];c[P+352+32+8>>2]=c[J+36+8>>2];c[P+352+32+12>>2]=c[J+36+12>>2];c[P+352+48>>2]=c[J+52>>2];c[P+352+48+4>>2]=c[J+52+4>>2];c[P+352+48+8>>2]=c[J+52+8>>2];c[P+352+48+12>>2]=c[J+52+12>>2];c[P+288>>2]=c[K+4>>2];c[P+288+4>>2]=c[K+4+4>>2];c[P+288+8>>2]=c[K+4+8>>2];c[P+288+12>>2]=c[K+4+12>>2];c[P+288+16>>2]=c[K+20>>2];c[P+288+16+4>>2]=c[K+20+4>>2];c[P+288+16+8>>2]=c[K+20+8>>2];c[P+288+16+12>>2]=c[K+20+12>>2];c[P+288+32>>2]=c[K+36>>2];c[P+288+32+4>>2]=c[K+36+4>>2];c[P+288+32+8>>2]=c[K+36+8>>2];c[P+288+32+12>>2]=c[K+36+12>>2];c[P+288+48>>2]=c[K+52>>2];c[P+288+48+4>>2]=c[K+52+4>>2];c[P+288+48+8>>2]=c[K+52+8>>2];c[P+288+48+12>>2]=c[K+52+12>>2];S=+f[d+196>>2]+ +f[d+84>>2];u=+f[d+200>>2]+ +f[d+88>>2];f[P+272>>2]=+f[d+192>>2]+ +f[d+80>>2];f[P+272+4>>2]=S;f[P+272+8>>2]=u;f[P+272+12>>2]=0.0;u=+f[e+196>>2]+ +f[e+84>>2];S=+f[e+200>>2]+ +f[e+88>>2];f[P+256>>2]=+f[e+192>>2]+ +f[e+80>>2];f[P+256+4>>2]=u;f[P+256+8>>2]=S;f[P+256+12>>2]=0.0;c[P+192>>2]=1065353216;N=P+192+4|0;c[N>>2]=0;c[N+4>>2]=0;c[N+8>>2]=0;c[N+12>>2]=0;c[P+192+20>>2]=1065353216;O=P+192+24|0;c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;c[O+12>>2]=0;c[P+192+40>>2]=1065353216;L=P+192+44|0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[L+16>>2]=0;ag(P+352|0,0.0,0.0,0.0,P+272|0,g,P+192|0);c[P+128>>2]=1065353216;L=P+128+4|0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[P+128+20>>2]=1065353216;M=P+128+24|0;c[M>>2]=0;c[M+4>>2]=0;c[M+8>>2]=0;c[M+12>>2]=0;c[P+128+40>>2]=1065353216;K=P+128+44|0;c[K>>2]=0;c[K+4>>2]=0;c[K+8>>2]=0;c[K+12>>2]=0;c[K+16>>2]=0;ag(P+288|0,0.0,0.0,0.0,P+256|0,g,P+128|0);S=+f[b+556>>2];u=+f[b+560>>2];T=+f[b+564>>2];v=+f[b+568>>2];G=S*(2.0/(S*S+u*u+T*T+v*v));A=u*(2.0/(S*S+u*u+T*T+v*v));H=T*(2.0/(S*S+u*u+T*T+v*v));W=+f[b+364>>2];V=+f[b+368>>2];Z=+f[b+372>>2];k=Z*(S*H-v*A)+(V*(S*A+v*H)+W*(1.0-(u*A+T*H)));l=Z*(u*H+v*G)+(W*(S*A-v*H)+V*(1.0-(S*G+T*H)));m=W*(S*H+v*A)+V*(u*H-v*G)+Z*(1.0-(S*G+u*A));j=+f[b+380>>2];F=+f[b+384>>2];D=+f[b+388>>2];n=(S*H-v*A)*D+(F*(S*A+v*H)+j*(1.0-(u*A+T*H)));q=(u*H+v*G)*D+(j*(S*A-v*H)+F*(1.0-(S*G+T*H)));t=j*(S*H+v*A)+F*(u*H-v*G)+D*(1.0-(S*G+u*A));Q=+f[b+396>>2];C=+f[b+400>>2];B=+f[b+404>>2];R=(1.0-(u*A+T*H))*Q+(S*A+v*H)*C+(S*H-v*A)*B;T=(S*A-v*H)*Q+(1.0-(S*G+T*H))*C+(u*H+v*G)*B;A=(S*H+v*A)*Q+(u*H-v*G)*C+(1.0-(S*G+u*A))*B;u=+f[b+300>>2];G=+f[b+316>>2];S=+f[b+332>>2];v=+f[b+304>>2];H=+f[b+320>>2];U=+f[b+336>>2];E=+f[b+308>>2];I=+f[b+324>>2];w=+f[b+340>>2];z=-+f[b+348>>2];aa=-+f[b+352>>2];Y=-+f[b+356>>2];Z=W*0.0+V*0.0+Z*0.0+ +f[b+412>>2]+(m*(E*z+I*aa+w*Y)+(k*(u*z+G*aa+S*Y)+l*(v*z+H*aa+U*Y)));D=j*0.0+F*0.0+D*0.0+ +f[b+416>>2]+(t*(E*z+I*aa+w*Y)+(n*(u*z+G*aa+S*Y)+q*(v*z+H*aa+U*Y)));Y=Q*0.0+C*0.0+B*0.0+ +f[b+420>>2]+(A*(E*z+I*aa+w*Y)+(R*(u*z+G*aa+S*Y)+T*(v*z+H*aa+U*Y)));aa=+f[P+128>>2];z=+f[L>>2];B=+f[P+128+8>>2];C=+f[P+128+16>>2];Q=+f[P+128+20>>2];F=+f[M>>2];j=+f[P+128+32>>2];V=+f[P+128+36>>2];W=+f[P+128+40>>2];X=B*Y+(aa*Z+z*D)+ +f[P+128+48>>2];_=C*Z+D*Q+Y*F+ +f[P+128+52>>2];$=Z*j+D*V+Y*W+ +f[P+128+56>>2];f[P+64>>2]=(k*u+l*v+m*E)*aa+(n*u+q*v+t*E)*z+(R*u+T*v+A*E)*B;f[P+64+4>>2]=(k*G+l*H+m*I)*aa+(n*G+q*H+t*I)*z+(R*G+T*H+A*I)*B;f[P+64+8>>2]=(k*S+l*U+m*w)*aa+(n*S+q*U+t*w)*z+(R*S+T*U+A*w)*B;f[P+64+12>>2]=0.0;f[P+64+16>>2]=(k*u+l*v+m*E)*C+(n*u+q*v+t*E)*Q+(R*u+T*v+A*E)*F;f[P+64+20>>2]=(k*G+l*H+m*I)*C+(n*G+q*H+t*I)*Q+(R*G+T*H+A*I)*F;f[P+64+24>>2]=(k*S+l*U+m*w)*C+(n*S+q*U+t*w)*Q+(R*S+T*U+A*w)*F;f[P+64+28>>2]=0.0;f[P+64+32>>2]=(k*u+l*v+m*E)*j+(n*u+q*v+t*E)*V+(R*u+T*v+A*E)*W;f[P+64+36>>2]=(k*G+l*H+m*I)*j+(n*G+q*H+t*I)*V+(R*G+T*H+A*I)*W;f[P+64+40>>2]=(k*S+l*U+m*w)*j+(n*S+q*U+t*w)*V+(R*S+T*U+A*w)*W;f[P+64+44>>2]=0.0;f[P+64+48>>2]=X;f[P+64+52>>2]=_;f[P+64+56>>2]=$;f[P+64+60>>2]=0.0;$=(R*u+T*v+A*E)*-Y+((k*u+l*v+m*E)*-Z+(n*u+q*v+t*E)*-D);_=(R*G+T*H+A*I)*-Y+((k*G+l*H+m*I)*-Z+(n*G+q*H+t*I)*-D);D=(R*S+T*U+A*w)*-Y+((k*S+l*U+m*w)*-Z+(n*S+q*U+t*w)*-D);Z=+f[P+192>>2];Y=+f[N>>2];X=+f[P+192+8>>2];W=+f[P+192+16>>2];V=+f[P+192+20>>2];j=+f[O>>2];F=+f[P+192+32>>2];Q=+f[P+192+36>>2];C=+f[P+192+40>>2];B=$*Z+_*Y+D*X+ +f[P+192+48>>2];z=$*W+_*V+D*j+ +f[P+192+52>>2];D=$*F+_*Q+D*C+ +f[P+192+56>>2];f[P>>2]=(k*u+l*v+m*E)*Z+(k*G+l*H+m*I)*Y+(k*S+l*U+m*w)*X;f[P+4>>2]=(n*u+q*v+t*E)*Z+(n*G+q*H+t*I)*Y+(n*S+q*U+t*w)*X;f[P+8>>2]=(R*u+T*v+A*E)*Z+(R*G+T*H+A*I)*Y+(R*S+T*U+A*w)*X;f[P+12>>2]=0.0;f[P+16>>2]=(k*u+l*v+m*E)*W+(k*G+l*H+m*I)*V+(k*S+l*U+m*w)*j;f[P+20>>2]=(n*u+q*v+t*E)*W+(n*G+q*H+t*I)*V+(n*S+q*U+t*w)*j;f[P+24>>2]=(R*u+T*v+A*E)*W+(R*G+T*H+A*I)*V+(R*S+T*U+A*w)*j;f[P+28>>2]=0.0;f[P+32>>2]=(k*u+l*v+m*E)*F+(k*G+l*H+m*I)*Q+(k*S+l*U+m*w)*C;f[P+36>>2]=(n*u+q*v+t*E)*F+(n*G+q*H+t*I)*Q+(n*S+q*U+t*w)*C;f[P+40>>2]=(R*u+T*v+A*E)*F+(R*G+T*H+A*I)*Q+(R*S+T*U+A*w)*C;f[P+44>>2]=0.0;f[P+48>>2]=B;f[P+52>>2]=z;f[P+56>>2]=D;f[P+60>>2]=0.0;Ee(P+352|0,P+64|0,P+424|0,P+416|0);D=+f[P+416>>2];z=1.0/g*(+f[P+424>>2]*D);B=1.0/g*(D*+f[P+424+4>>2]);D=1.0/g*(D*+f[P+424+8>>2]);Ee(P+288|0,P,P+424|0,P+416|0);C=+f[P+416>>2];z=z-+f[P+272>>2];B=B-+f[P+272+4>>2];D=D-+f[P+272+8>>2];w=1.0/g*(+f[P+424>>2]*C)-+f[P+256>>2];A=1.0/g*(C*+f[P+424+4>>2])-+f[P+256+4>>2];C=1.0/g*(C*+f[P+424+8>>2])-+f[P+256+8>>2];if(z*z+B*B+D*D>1.1920928955078125e-07){t=1.0/+s(+(z*z+B*B+D*D));O=c[b+28>>2]|0;j=z*t;l=B*t;n=D*t;t=z*t*(z*t*+f[O+264>>2]+B*t*+f[O+280>>2]+D*t*+f[O+296>>2])+B*t*(z*t*+f[O+268>>2]+B*t*+f[O+284>>2]+D*t*+f[O+300>>2])+D*t*(z*t*+f[O+272>>2]+B*t*+f[O+288>>2]+D*t*+f[O+304>>2])}else{j=0.0;l=0.0;n=0.0;t=0.0}if(w*w+A*A+C*C>1.1920928955078125e-07){u=1.0/+s(+(w*w+A*A+C*C));O=c[b+32>>2]|0;k=w*u;m=A*u;q=C*u;u=w*u*(w*u*+f[O+264>>2]+A*u*+f[O+280>>2]+C*u*+f[O+296>>2])+A*u*(w*u*+f[O+268>>2]+A*u*+f[O+284>>2]+C*u*+f[O+300>>2])+C*u*(w*u*+f[O+272>>2]+A*u*+f[O+288>>2]+C*u*+f[O+304>>2])}else{k=0.0;m=0.0;q=0.0;u=0.0}v=t*j+u*k;k=t*l+u*m;j=t*n+u*q;if(v*v+k*k+j*j>1.1920928955078125e-07){n=1.0/+s(+(v*v+k*k+j*j));i=c[b+28>>2]|0;l=v*n*(v*n*+f[i+264>>2]+k*n*+f[i+280>>2]+j*n*+f[i+296>>2])+k*n*(v*n*+f[i+268>>2]+k*n*+f[i+284>>2]+j*n*+f[i+300>>2])+j*n*(v*n*+f[i+272>>2]+k*n*+f[i+288>>2]+j*n*+f[i+304>>2]);o=c[b+32>>2]|0;n=v*n*(v*n*+f[o+264>>2]+k*n*+f[o+280>>2]+j*n*+f[o+296>>2])+k*n*(v*n*+f[o+268>>2]+k*n*+f[o+284>>2]+j*n*+f[o+300>>2])+j*n*(v*n*+f[o+272>>2]+k*n*+f[o+288>>2]+j*n*+f[o+304>>2]);k=(z*l-w*n)*(1.0/((l+n)*(l+n)));z=(B*l-A*n)*(1.0/((l+n)*(l+n)));n=(D*l-C*n)*(1.0/((l+n)*(l+n)));j=+f[b+572>>2];if(!(j>=0.0))j=z;else{t=(a[b+553>>0]|0)==0?j:j/l;j=+f[b+576>>2];m=+f[b+580>>2];l=+f[b+584>>2];q=+s(+((k+j)*(k+j)+(z+m)*(z+m)+(n+l)*(n+l)));if(q>t){u=j+(t*((k+j)*(1.0/q))-j);v=l+(t*((n+l)*(1.0/q))-l);w=m+(t*((z+m)*(1.0/q))-m);k=t*((k+j)*(1.0/q))-j;n=t*((n+l)*(1.0/q))-l;j=t*((z+m)*(1.0/q))-m}else{u=k+j;v=n+l;w=z+m;j=z}f[b+576>>2]=u;f[b+580>>2]=w;f[b+584>>2]=v}m=+s(+(k*k+j*j+n*n));l=k*(1.0/m);k=j*(1.0/m);j=n*(1.0/m);if(c[d+240>>2]|0){aa=l*+f[i+296>>2]+k*+f[i+300>>2]+j*+f[i+304>>2];$=l*+f[i+280>>2]+k*+f[i+284>>2]+j*+f[i+288>>2];_=l*+f[i+264>>2]+k*+f[i+268>>2]+j*+f[i+272>>2];Y=m*0.0*+f[d+116>>2];Z=m*0.0*+f[d+120>>2];f[d+64>>2]=m*0.0*+f[d+112>>2]+ +f[d+64>>2];f[d+68>>2]=Y+ +f[d+68>>2];f[d+72>>2]=Z+ +f[d+72>>2];$=$*(m*+f[d+100>>2]);aa=aa*(m*+f[d+104>>2]);f[d+80>>2]=_*(m*+f[d+96>>2])+ +f[d+80>>2];f[d+84>>2]=$+ +f[d+84>>2];f[d+88>>2]=aa+ +f[d+88>>2]}if(c[e+240>>2]|0){aa=l*+f[o+296>>2]+k*+f[o+300>>2]+j*+f[o+304>>2];$=l*+f[o+280>>2]+k*+f[o+284>>2]+j*+f[o+288>>2];_=l*+f[o+264>>2]+k*+f[o+268>>2]+j*+f[o+272>>2];Y=m*-0.0*+f[e+116>>2];Z=m*-0.0*+f[e+120>>2];f[e+64>>2]=m*-0.0*+f[e+112>>2]+ +f[e+64>>2];f[e+68>>2]=Y+ +f[e+68>>2];f[e+72>>2]=Z+ +f[e+72>>2];$=$*(+f[e+100>>2]*-m);aa=aa*(+f[e+104>>2]*-m);f[e+80>>2]=_*(+f[e+96>>2]*-m)+ +f[e+80>>2];f[e+84>>2]=$+ +f[e+84>>2];f[e+88>>2]=aa+ +f[e+88>>2]}}r=e+192|0;i=d+192|0;y=e+200|0;p=d+200|0;M=e+88|0;J=d+88|0;N=e+80|0;K=d+80|0;x=e+196|0;o=d+196|0;O=e+84|0;L=d+84|0}while(0);z=+f[i>>2]+ +f[K>>2];w=+f[o>>2]+ +f[L>>2];v=+f[p>>2]+ +f[J>>2];u=+f[r>>2]+ +f[N>>2];t=+f[x>>2]+ +f[O>>2];q=+f[y>>2]+ +f[M>>2];if(a[b+526>>0]|0){k=+f[b+528>>2];j=k*+f[b+504>>2]*+f[b+432>>2]/g;l=+f[b+460>>2];m=+f[b+464>>2];n=+f[b+468>>2];if((u-z)*l+(t-w)*m+(q-v)*n>0.0)j=j+k*((u-z)*l+(t-w)*m+(q-v)*n)*+f[b+436>>2];$=+f[b+516>>2];Z=$+j*+f[b+492>>2];f[P+424>>2]=Z;f[P+416>>2]=0.0;i=c[(Z>0.0?P+424|0:P+416|0)>>2]|0;c[b+516>>2]=i;$=(c[h>>2]=i,+f[h>>2])-$;Z=+f[b+536>>2];_=+f[b+540>>2];j=+f[b+544>>2];k=l*$-Z*(l*$*Z+m*$*_+n*$*j);aa=m*$-_*(l*$*Z+m*$*_+n*$*j);m=n*$-j*(l*$*Z+m*$*_+n*$*j);j=+s(+(m*m+(k*k+aa*aa)));k=k*(1.0/j);l=aa*(1.0/j);m=m*(1.0/j);i=c[b+28>>2]|0;if(c[d+240>>2]|0){aa=k*+f[i+296>>2]+l*+f[i+300>>2]+m*+f[i+304>>2];$=k*+f[i+280>>2]+l*+f[i+284>>2]+m*+f[i+288>>2];_=k*+f[i+264>>2]+l*+f[i+268>>2]+m*+f[i+272>>2];Y=j*0.0*+f[d+116>>2];Z=j*0.0*+f[d+120>>2];f[d+64>>2]=j*0.0*+f[d+112>>2]+ +f[d+64>>2];f[d+68>>2]=Y+ +f[d+68>>2];f[d+72>>2]=Z+ +f[d+72>>2];$=$*(j*+f[d+100>>2]);aa=aa*(j*+f[d+104>>2]);f[K>>2]=_*(j*+f[d+96>>2])+ +f[K>>2];f[L>>2]=$+ +f[L>>2];f[J>>2]=aa+ +f[J>>2]}i=c[b+32>>2]|0;if(c[e+240>>2]|0){aa=k*+f[i+296>>2]+l*+f[i+300>>2]+m*+f[i+304>>2];$=k*+f[i+280>>2]+l*+f[i+284>>2]+m*+f[i+288>>2];_=k*+f[i+264>>2]+l*+f[i+268>>2]+m*+f[i+272>>2];Y=j*-0.0*+f[e+116>>2];Z=j*-0.0*+f[e+120>>2];f[e+64>>2]=j*-0.0*+f[e+112>>2]+ +f[e+64>>2];f[e+68>>2]=Y+ +f[e+68>>2];f[e+72>>2]=Z+ +f[e+72>>2];$=$*(+f[e+100>>2]*-j);aa=aa*(+f[e+104>>2]*-j);f[N>>2]=_*(+f[e+96>>2]*-j)+ +f[N>>2];f[O>>2]=$+ +f[O>>2];f[M>>2]=aa+ +f[M>>2]}}if(!(a[b+525>>0]|0)){ea=P;return}n=+f[b+532>>2];m=n*+f[b+508>>2]*+f[b+432>>2]/g;l=+f[b+476>>2];k=+f[b+480>>2];j=+f[b+484>>2];if((u-z)*l+(t-w)*k+(q-v)*j>0.0)m=m+n*((u-z)*l+(t-w)*k+(q-v)*j)*+f[b+436>>2];aa=+f[b+520>>2];m=aa+m*+f[b+496>>2];f[P+424>>2]=m;f[P+416>>2]=0.0;i=c[(m>0.0?P+424|0:P+416|0)>>2]|0;c[b+520>>2]=i;m=(c[h>>2]=i,+f[h>>2])-aa;i=c[b+28>>2]|0;if(c[d+240>>2]|0){aa=l*+f[i+296>>2]+k*+f[i+300>>2]+j*+f[i+304>>2];$=l*+f[i+280>>2]+k*+f[i+284>>2]+j*+f[i+288>>2];j=l*+f[i+264>>2]+k*+f[i+268>>2]+j*+f[i+272>>2];l=m*0.0*+f[d+116>>2];k=m*0.0*+f[d+120>>2];f[d+64>>2]=m*0.0*+f[d+112>>2]+ +f[d+64>>2];f[d+68>>2]=l+ +f[d+68>>2];f[d+72>>2]=k+ +f[d+72>>2];k=$*(m*+f[d+100>>2]);l=aa*(m*+f[d+104>>2]);f[K>>2]=j*(m*+f[d+96>>2])+ +f[K>>2];f[L>>2]=k+ +f[L>>2];f[J>>2]=l+ +f[J>>2];l=+f[b+476>>2];k=+f[b+480>>2];j=+f[b+484>>2]}i=c[b+32>>2]|0;if(!(c[e+240>>2]|0)){ea=P;return}aa=l*+f[i+296>>2]+k*+f[i+300>>2]+j*+f[i+304>>2];$=l*+f[i+280>>2]+k*+f[i+284>>2]+j*+f[i+288>>2];_=l*+f[i+264>>2]+k*+f[i+268>>2]+j*+f[i+272>>2];Y=m*-0.0*+f[e+116>>2];Z=m*-0.0*+f[e+120>>2];f[e+64>>2]=m*-0.0*+f[e+112>>2]+ +f[e+64>>2];f[e+68>>2]=Y+ +f[e+68>>2];f[e+72>>2]=Z+ +f[e+72>>2];$=$*(+f[e+100>>2]*-m);aa=aa*(+f[e+104>>2]*-m);f[N>>2]=_*(+f[e+96>>2]*-m)+ +f[N>>2];f[O>>2]=$+ +f[O>>2];f[M>>2]=aa+ +f[M>>2];ea=P;return}function kb(a){a=a|0;var b=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;s=ea;ea=ea+16|0;do if(a>>>0<245){m=a>>>0<11?16:a+11&-8;e=3?m>>>3:m;l=c[6765]|0;f=e?l>>>e:l;if(f&3|0){d=27100+((f&1^1)+e<<1<<2)|0;a=c[d+8>>2]|0;b=c[a+8>>2]|0;if((b|0)==(d|0))c[6765]=l&~(1<<(f&1^1)+e);else{c[b+12>>2]=d;c[d+8>>2]=b}c[a+4>>2]=(f&1^1)+e<<3|3;c[a+((f&1^1)+e<<3)+4>>2]=c[a+((f&1^1)+e<<3)+4>>2]|1;r=a+8|0;ea=s;return r|0}k=c[6767]|0;if(m>>>0>k>>>0){if(f|0){g=(f<>>12:g)&16;g=q?g>>>q:g;p=(5?g>>>5:g)&8;g=p?g>>>p:g;r=(2?g>>>2:g)&4;g=r?g>>>r:g;a=(1?g>>>1:g)&2;g=a?g>>>a:g;f=(1?g>>>1:g)&1;g=(p|q|r|a|f)+(f?g>>>f:g)|0;f=c[27100+(g<<1<<2)+8>>2]|0;a=c[f+8>>2]|0;if((a|0)==(27100+(g<<1<<2)|0)){c[6765]=l&~(1<>2]=27100+(g<<1<<2);c[27100+(g<<1<<2)+8>>2]=a;a=l}c[f+4>>2]=m|3;c[f+m+4>>2]=(g<<3)-m|1;c[f+(g<<3)>>2]=(g<<3)-m;if(k|0){e=c[6770]|0;d=3?k>>>3:k;if(!(a&1<>2]|0}c[a>>2]=e;c[b+12>>2]=e;c[e+8>>2]=b;c[e+12>>2]=27100+(d<<1<<2)}c[6767]=(g<<3)-m;c[6770]=f+m;r=f+8|0;ea=s;return r|0}g=c[6766]|0;if(g){f=(12?((g&0-g)+-1|0)>>>12:(g&0-g)+-1|0)&16;j=f?((g&0-g)+-1|0)>>>f:(g&0-g)+-1|0;e=(5?j>>>5:j)&8;j=e?j>>>e:j;h=(2?j>>>2:j)&4;j=h?j>>>h:j;b=(1?j>>>1:j)&2;j=b?j>>>b:j;i=(1?j>>>1:j)&1;j=c[27364+((e|f|h|b|i)+(i?j>>>i:j)<<2)>>2]|0;i=(c[j+4>>2]&-8)-m|0;b=j;while(1){a=c[b+16>>2]|0;if(!a){a=c[b+20>>2]|0;if(!a)break}b=(c[a+4>>2]&-8)-m|0;h=b>>>0>>0;i=h?b:i;b=a;j=h?a:j}h=j+m|0;if(h>>>0>j>>>0){f=c[j+24>>2]|0;a=c[j+12>>2]|0;do if((a|0)==(j|0)){b=j+20|0;a=c[b>>2]|0;if(!a){b=j+16|0;a=c[b>>2]|0;if(!a){b=0;break}}while(1){e=a+20|0;d=c[e>>2]|0;if(!d){e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;b=e}}else{a=d;b=e}}c[b>>2]=0;b=a}else{b=c[j+8>>2]|0;c[b+12>>2]=a;c[a+8>>2]=b;b=a}while(0);do if(f|0){a=c[j+28>>2]|0;if((j|0)==(c[27364+(a<<2)>>2]|0)){c[27364+(a<<2)>>2]=b;if(!b){c[6766]=g&~(1<>2]|0)==(j|0)?f+16|0:f+20|0)>>2]=b;if(!b)break}c[b+24>>2]=f;a=c[j+16>>2]|0;if(a|0){c[b+16>>2]=a;c[a+24>>2]=b}a=c[j+20>>2]|0;if(a|0){c[b+20>>2]=a;c[a+24>>2]=b}}while(0);if(i>>>0<16){r=i+m|0;c[j+4>>2]=r|3;r=j+r+4|0;c[r>>2]=c[r>>2]|1}else{c[j+4>>2]=m|3;c[h+4>>2]=i|1;c[h+i>>2]=i;if(k|0){e=c[6770]|0;d=3?k>>>3:k;if(!(1<>2]|0}c[a>>2]=e;c[b+12>>2]=e;c[e+8>>2]=b;c[e+12>>2]=27100+(d<<1<<2)}c[6767]=i;c[6770]=h}r=j+8|0;ea=s;return r|0}}}}else if(a>>>0<=4294967231){m=a+11&-8;e=c[6766]|0;if(e){a=8?(a+11|0)>>>8:a+11|0;if(a)if(m>>>0>16777215)i=31;else{l=(16?(a+1048320|0)>>>16:a+1048320|0)&8;q=(16?((a<>>16:(a<>>16:(a<>>15:a<>>(i+7|0):m)&1|i<<1}else i=0;a=c[27364+(i<<2)>>2]|0;a:do if(!a){d=0-m|0;b=0;a=0;q=61}else{d=0-m|0;b=0;h=m<<((i|0)==31?0:25-(1?i>>>1:i)|0);g=0;while(1){f=(c[a+4>>2]&-8)-m|0;if(f>>>0>>0)if(!f){d=0;b=a;q=65;break a}else{d=f;g=a}q=c[a+20>>2]|0;a=c[a+16+((31?h>>>31:h)<<2)>>2]|0;b=(q|0)==0|(q|0)==(a|0)?b:q;if(!a){a=g;q=61;break}else h=h<<1}}while(0);if((q|0)==61){if((b|0)==0&(a|0)==0){a=2<>>12:b)&16;b=i?b>>>i:b;h=(5?b>>>5:b)&8;b=h?b>>>h:b;k=(2?b>>>2:b)&4;b=k?b>>>k:b;l=(1?b>>>1:b)&2;b=l?b>>>l:b;a=(1?b>>>1:b)&1;b=c[27364+((h|i|k|l|a)+(a?b>>>a:b)<<2)>>2]|0;a=0}if(!b){h=d;i=a}else q=65}if((q|0)==65)while(1){l=(c[b+4>>2]&-8)-m|0;f=l>>>0>>0;d=f?l:d;f=f?b:a;a=c[b+16>>2]|0;if(!a)a=c[b+20>>2]|0;if(!a){h=d;i=f;break}else{b=a;a=f}}if(((i|0)!=0?h>>>0<((c[6767]|0)-m|0)>>>0:0)?(j=i+m|0,j>>>0>i>>>0):0){g=c[i+24>>2]|0;a=c[i+12>>2]|0;do if((a|0)==(i|0)){b=i+20|0;a=c[b>>2]|0;if(!a){b=i+16|0;a=c[b>>2]|0;if(!a){a=0;break}}while(1){f=a+20|0;d=c[f>>2]|0;if(!d){f=a+16|0;d=c[f>>2]|0;if(!d)break;else{a=d;b=f}}else{a=d;b=f}}c[b>>2]=0}else{r=c[i+8>>2]|0;c[r+12>>2]=a;c[a+8>>2]=r}while(0);do if(g){b=c[i+28>>2]|0;if((i|0)==(c[27364+(b<<2)>>2]|0)){c[27364+(b<<2)>>2]=a;if(!a){c[6766]=e&~(1<>2]|0)==(i|0)?g+16|0:g+20|0)>>2]=a;if(!a)break}c[a+24>>2]=g;b=c[i+16>>2]|0;if(b|0){c[a+16>>2]=b;c[b+24>>2]=a}b=c[i+20>>2]|0;if(b){c[a+20>>2]=b;c[b+24>>2]=a}}while(0);b:do if(h>>>0<16){r=h+m|0;c[i+4>>2]=r|3;r=i+r+4|0;c[r>>2]=c[r>>2]|1}else{c[i+4>>2]=m|3;c[j+4>>2]=h|1;c[j+h>>2]=h;d=3?h>>>3:h;if(h>>>0<256){a=c[6765]|0;if(!(a&1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=27100+(d<<1<<2);break}a=8?h>>>8:h;if(a)if(h>>>0>16777215)d=31;else{q=(16?(a+1048320|0)>>>16:a+1048320|0)&8;r=(16?((a<>>16:(a<>>16:(a<>>15:a<>>(d+7|0):h)&1|d<<1}else d=0;a=27364+(d<<2)|0;c[j+28>>2]=d;c[j+16+4>>2]=0;c[j+16>>2]=0;b=1<>2]=j;c[j+24>>2]=a;c[j+12>>2]=j;c[j+8>>2]=j;break}a=c[a>>2]|0;c:do if((c[a+4>>2]&-8|0)!=(h|0)){e=h<<((d|0)==31?0:25-(1?d>>>1:d)|0);while(1){d=a+16+((31?e>>>31:e)<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(h|0)){a=b;break c}else{e=e<<1;a=b}}c[d>>2]=j;c[j+24>>2]=a;c[j+12>>2]=j;c[j+8>>2]=j;break b}while(0);q=a+8|0;r=c[q>>2]|0;c[r+12>>2]=j;c[q>>2]=j;c[j+8>>2]=r;c[j+12>>2]=a;c[j+24>>2]=0}while(0);r=i+8|0;ea=s;return r|0}}}else m=-1;while(0);d=c[6767]|0;if(d>>>0>=m>>>0){b=d-m|0;a=c[6770]|0;if(b>>>0>15){r=a+m|0;c[6770]=r;c[6767]=b;c[r+4>>2]=b|1;c[a+d>>2]=b;c[a+4>>2]=m|3}else{c[6767]=0;c[6770]=0;c[a+4>>2]=d|3;c[a+d+4>>2]=c[a+d+4>>2]|1}r=a+8|0;ea=s;return r|0}f=c[6768]|0;if(f>>>0>m>>>0){p=f-m|0;c[6768]=p;r=c[6771]|0;q=r+m|0;c[6771]=q;c[q+4>>2]=p|1;c[r+4>>2]=m|3;r=r+8|0;ea=s;return r|0}if(!(c[6883]|0)){c[6885]=4096;c[6884]=4096;c[6886]=-1;c[6887]=-1;c[6888]=0;c[6876]=0;c[6883]=s&-16^1431655768;a=4096}else a=c[6885]|0;g=m+48|0;h=m+47|0;j=a+h|0;i=0-a|0;if((j&i)>>>0<=m>>>0){r=0;ea=s;return r|0}a=c[6875]|0;if(a|0?(l=c[6873]|0,(l+(j&i)|0)>>>0<=l>>>0?1:(l+(j&i)|0)>>>0>a>>>0):0){r=0;ea=s;return r|0}d:do if(!(c[6876]&4)){b=c[6771]|0;e:do if(b){d=27508;while(1){a=c[d>>2]|0;if(a>>>0<=b>>>0?(o=d+4|0,(a+(c[o>>2]|0)|0)>>>0>b>>>0):0)break;a=c[d+8>>2]|0;if(!a){q=128;break e}else d=a}if((j-f&i)>>>0<2147483647){a=bo(j-f&i|0)|0;if((a|0)==((c[d>>2]|0)+(c[o>>2]|0)|0))if((a|0)==(-1|0))a=j-f&i;else{h=a;g=j-f&i;break d}else{e=a;d=j-f&i;q=136}}else a=0}else q=128;while(0);do if((q|0)==128){b=bo(0)|0;if((b|0)!=(-1|0)?(p=c[6884]|0,p=((p+-1&b|0)==0?0:(p+-1+b&0-p)-b|0)+(j&i)|0,n=c[6873]|0,p>>>0>m>>>0&p>>>0<2147483647):0){o=c[6875]|0;if(o|0?(p+n|0)>>>0<=n>>>0|(p+n|0)>>>0>o>>>0:0){a=0;break}a=bo(p|0)|0;if((a|0)==(b|0)){h=b;g=p;break d}else{e=a;d=p;q=136}}else a=0}while(0);do if((q|0)==136){b=0-d|0;if(!(g>>>0>d>>>0&(d>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){a=0;break}else{h=e;g=d;break d}a=c[6885]|0;a=h-d+a&0-a;if(a>>>0>=2147483647){h=e;g=d;break d}if((bo(a|0)|0)==(-1|0)){bo(b|0)|0;a=0;break}else{h=e;g=a+d|0;break d}}while(0);c[6876]=c[6876]|4;q=143}else{a=0;q=143}while(0);if((q|0)==143){if((j&i)>>>0>=2147483647){r=0;ea=s;return r|0}b=bo(j&i|0)|0;d=bo(0)|0;e=(d-b|0)>>>0>(m+40|0)>>>0;if((b|0)==(-1|0)|e^1|b>>>0>>0&((b|0)!=(-1|0)&(d|0)!=(-1|0))^1){r=0;ea=s;return r|0}else{h=b;g=e?d-b|0:a}}a=(c[6873]|0)+g|0;c[6873]=a;if(a>>>0>(c[6874]|0)>>>0)c[6874]=a;j=c[6771]|0;f:do if(j){f=27508;while(1){a=c[f>>2]|0;e=f+4|0;b=c[e>>2]|0;if((h|0)==(a+b|0)){q=154;break}d=c[f+8>>2]|0;if(!d)break;else f=d}if(((q|0)==154?(c[f+12>>2]&8|0)==0:0)?h>>>0>j>>>0&a>>>0<=j>>>0:0){c[e>>2]=b+g;r=(c[6768]|0)+g|0;q=(j+8&7|0)==0?0:0-(j+8)&7;c[6771]=j+q;c[6768]=r-q;c[j+q+4>>2]=r-q|1;c[j+r+4>>2]=40;c[6772]=c[6887];break}if(h>>>0<(c[6769]|0)>>>0)c[6769]=h;d=h+g|0;b=27508;while(1){if((c[b>>2]|0)==(d|0)){q=162;break}a=c[b+8>>2]|0;if(!a)break;else b=a}if((q|0)==162?(c[b+12>>2]&8|0)==0:0){c[b>>2]=h;l=b+4|0;c[l>>2]=(c[l>>2]|0)+g;l=h+8|0;l=h+((l&7|0)==0?0:0-l&7)|0;a=d+((d+8&7|0)==0?0:0-(d+8)&7)|0;k=l+m|0;i=a-l-m|0;c[l+4>>2]=m|3;g:do if((j|0)==(a|0)){r=(c[6768]|0)+i|0;c[6768]=r;c[6771]=k;c[k+4>>2]=r|1}else{if((c[6770]|0)==(a|0)){r=(c[6767]|0)+i|0;c[6767]=r;c[6770]=k;c[k+4>>2]=r|1;c[k+r>>2]=r;break}h=c[a+4>>2]|0;if((h&3|0)==1){e=3?h>>>3:h;h:do if(h>>>0<256){b=c[a+8>>2]|0;d=c[a+12>>2]|0;if((d|0)==(b|0)){c[6765]=c[6765]&~(1<>2]=d;c[d+8>>2]=b;break}}else{g=c[a+24>>2]|0;b=c[a+12>>2]|0;do if((b|0)==(a|0)){b=c[a+16+4>>2]|0;if(!b){b=c[a+16>>2]|0;if(!b){b=0;break}else d=a+16|0}else d=a+16+4|0;while(1){f=b+20|0;e=c[f>>2]|0;if(!e){f=b+16|0;e=c[f>>2]|0;if(!e)break;else{b=e;d=f}}else{b=e;d=f}}c[d>>2]=0}else{r=c[a+8>>2]|0;c[r+12>>2]=b;c[b+8>>2]=r}while(0);if(!g)break;d=c[a+28>>2]|0;do if((c[27364+(d<<2)>>2]|0)!=(a|0)){c[((c[g+16>>2]|0)==(a|0)?g+16|0:g+20|0)>>2]=b;if(!b)break h}else{c[27364+(d<<2)>>2]=b;if(b|0)break;c[6766]=c[6766]&~(1<>2]=g;d=c[a+16>>2]|0;if(d|0){c[b+16>>2]=d;c[d+24>>2]=b}d=c[a+16+4>>2]|0;if(!d)break;c[b+20>>2]=d;c[d+24>>2]=b}while(0);a=a+(h&-8)|0;f=(h&-8)+i|0}else f=i;d=a+4|0;c[d>>2]=c[d>>2]&-2;c[k+4>>2]=f|1;c[k+f>>2]=f;d=3?f>>>3:f;if(f>>>0<256){a=c[6765]|0;if(!(a&1<>2]|0}c[a>>2]=k;c[b+12>>2]=k;c[k+8>>2]=b;c[k+12>>2]=27100+(d<<1<<2);break}a=8?f>>>8:f;do if(!a)e=0;else{if(f>>>0>16777215){e=31;break}q=(16?(a+1048320|0)>>>16:a+1048320|0)&8;r=(16?((a<>>16:(a<>>16:(a<>>15:a<>>(e+7|0):f)&1|e<<1}while(0);b=27364+(e<<2)|0;c[k+28>>2]=e;c[k+16+4>>2]=0;c[k+16>>2]=0;a=c[6766]|0;d=1<>2]=k;c[k+24>>2]=b;c[k+12>>2]=k;c[k+8>>2]=k;break}a=c[b>>2]|0;i:do if((c[a+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(1?e>>>1:e)|0);while(1){d=a+16+((31?e>>>31:e)<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(f|0)){a=b;break i}else{e=e<<1;a=b}}c[d>>2]=k;c[k+24>>2]=a;c[k+12>>2]=k;c[k+8>>2]=k;break g}while(0);q=a+8|0;r=c[q>>2]|0;c[r+12>>2]=k;c[q>>2]=k;c[k+8>>2]=r;c[k+12>>2]=a;c[k+24>>2]=0}while(0);r=l+8|0;ea=s;return r|0}b=27508;while(1){a=c[b>>2]|0;if(a>>>0<=j>>>0?(r=a+(c[b+4>>2]|0)|0,r>>>0>j>>>0):0)break;b=c[b+8>>2]|0}f=r+-47+((r+-47+8&7|0)==0?0:0-(r+-47+8)&7)|0;f=f>>>0<(j+16|0)>>>0?j:f;a=g+-40|0;p=h+8|0;p=(p&7|0)==0?0:0-p&7;q=h+p|0;c[6771]=q;c[6768]=a-p;c[q+4>>2]=a-p|1;c[h+a+4>>2]=40;c[6772]=c[6887];c[f+4>>2]=27;c[f+8>>2]=c[6877];c[f+8+4>>2]=c[6878];c[f+8+8>>2]=c[6879];c[f+8+12>>2]=c[6880];c[6877]=h;c[6878]=g;c[6880]=0;c[6879]=f+8;a=f+24|0;do{q=a;a=a+4|0;c[a>>2]=7}while((q+8|0)>>>0>>0);if((f|0)!=(j|0)){c[f+4>>2]=c[f+4>>2]&-2;c[j+4>>2]=f-j|1;c[f>>2]=f-j;d=3?(f-j|0)>>>3:f-j|0;if((f-j|0)>>>0<256){a=c[6765]|0;if(!(a&1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=27100+(d<<1<<2);break}a=8?(f-j|0)>>>8:f-j|0;if(a)if((f-j|0)>>>0>16777215)e=31;else{q=(16?(a+1048320|0)>>>16:a+1048320|0)&8;r=(16?((a<>>16:(a<>>16:(a<>>15:a<>>(e+7|0):f-j|0)&1|e<<1}else e=0;b=27364+(e<<2)|0;c[j+28>>2]=e;c[j+20>>2]=0;c[j+16>>2]=0;a=c[6766]|0;d=1<>2]=j;c[j+24>>2]=b;c[j+12>>2]=j;c[j+8>>2]=j;break}a=c[b>>2]|0;j:do if((c[a+4>>2]&-8|0)!=(f-j|0)){e=f-j<<((e|0)==31?0:25-(1?e>>>1:e)|0);while(1){d=a+16+((31?e>>>31:e)<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(f-j|0)){a=b;break j}else{e=e<<1;a=b}}c[d>>2]=j;c[j+24>>2]=a;c[j+12>>2]=j;c[j+8>>2]=j;break f}while(0);q=a+8|0;r=c[q>>2]|0;c[r+12>>2]=j;c[q>>2]=j;c[j+8>>2]=r;c[j+12>>2]=a;c[j+24>>2]=0}}else{r=c[6769]|0;if((r|0)==0|h>>>0>>0)c[6769]=h;c[6877]=h;c[6878]=g;c[6880]=0;c[6774]=c[6883];c[6773]=-1;c[6778]=27100;c[6777]=27100;c[6780]=27108;c[6779]=27108;c[6782]=27116;c[6781]=27116;c[6784]=27124;c[6783]=27124;c[6786]=27132;c[6785]=27132;c[6788]=27140;c[6787]=27140;c[6790]=27148;c[6789]=27148;c[6792]=27156;c[6791]=27156;c[6794]=27164;c[6793]=27164;c[6796]=27172;c[6795]=27172;c[6798]=27180;c[6797]=27180;c[6800]=27188;c[6799]=27188;c[6802]=27196;c[6801]=27196;c[6804]=27204;c[6803]=27204;c[6806]=27212;c[6805]=27212;c[6808]=27220;c[6807]=27220;c[6810]=27228;c[6809]=27228;c[6812]=27236;c[6811]=27236;c[6814]=27244;c[6813]=27244;c[6816]=27252;c[6815]=27252;c[6818]=27260;c[6817]=27260;c[6820]=27268;c[6819]=27268;c[6822]=27276;c[6821]=27276;c[6824]=27284;c[6823]=27284;c[6826]=27292;c[6825]=27292;c[6828]=27300;c[6827]=27300;c[6830]=27308;c[6829]=27308;c[6832]=27316;c[6831]=27316;c[6834]=27324;c[6833]=27324;c[6836]=27332;c[6835]=27332;c[6838]=27340;c[6837]=27340;c[6840]=27348;c[6839]=27348;r=g+-40|0;p=h+8|0;p=(p&7|0)==0?0:0-p&7;q=h+p|0;c[6771]=q;c[6768]=r-p;c[q+4>>2]=r-p|1;c[h+r+4>>2]=40;c[6772]=c[6887]}while(0);a=c[6768]|0;if(a>>>0<=m>>>0){r=0;ea=s;return r|0}p=a-m|0;c[6768]=p;r=c[6771]|0;q=r+m|0;c[6771]=q;c[q+4>>2]=p|1;c[r+4>>2]=m|3;r=r+8|0;ea=s;return r|0}function lb(a,b,d,e,f){a=a|0;b=b|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,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=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;T=c[e>>2]|0;da=c[f>>2]|0;if(T|0)g=c[T+12>>2]|0;else g=b;h=c[g+88>>2]|0;i=c[g+92>>2]|0;m=c[g+96>>2]|0;if(!da)g=d;else g=c[da+12>>2]|0;s=c[g+88>>2]|0;n=c[g+92>>2]|0;t=c[g+96>>2]|0;U=c[b+88>>2]|0;ba=(c[d+88>>2]|0)-U|0;v=c[b+92>>2]|0;ca=(c[d+92>>2]|0)-v|0;b=c[b+96>>2]|0;aa=(c[d+96>>2]|0)-b|0;$=c[(T|0?T:da)+12>>2]|0;V=(c[$+88>>2]|0)-U|0;S=(c[$+92>>2]|0)-v|0;$=(c[$+96>>2]|0)-b|0;_=(z(S,aa)|0)-(z($,ca)|0)|0;$=(z($,ba)|0)-(z(V,aa)|0)|0;S=(z(V,ca)|0)-(z(S,ba)|0)|0;U=Yr(_|0,((_|0)<0)<<31>>31|0,U|0,((U|0)<0)<<31>>31|0)|0;V=D()|0;v=Yr($|0,(($|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0;u=D()|0;b=Yr(S|0,((S|0)<0)<<31>>31|0,b|0,((b|0)<0)<<31>>31|0)|0;b=Lv(U|0,V|0,b|0,D()|0)|0;u=Lv(b|0,D()|0,v|0,u|0)|0;v=D()|0;b=Yr(S|0,((S|0)<0)<<31>>31|0,ca|0,((ca|0)<0)<<31>>31|0)|0;V=D()|0;U=Yr($|0,(($|0)<0)<<31>>31|0,aa|0,((aa|0)<0)<<31>>31|0)|0;U=tv(b|0,V|0,U|0,D()|0)|0;V=D()|0;b=Yr(_|0,((_|0)<0)<<31>>31|0,aa|0,((aa|0)<0)<<31>>31|0)|0;X=D()|0;W=Yr(S|0,((S|0)<0)<<31>>31|0,ba|0,((ba|0)<0)<<31>>31|0)|0;W=tv(b|0,X|0,W|0,D()|0)|0;X=D()|0;b=Yr($|0,(($|0)<0)<<31>>31|0,ba|0,((ba|0)<0)<<31>>31|0)|0;Z=D()|0;Y=Yr(_|0,((_|0)<0)<<31>>31|0,ca|0,((ca|0)<0)<<31>>31|0)|0;Y=tv(b|0,Z|0,Y|0,D()|0)|0;Z=D()|0;b=Yr(U|0,V|0,h|0,((h|0)<0)<<31>>31|0)|0;R=D()|0;g=Yr(W|0,X|0,i|0,((i|0)<0)<<31>>31|0)|0;R=Lv(g|0,D()|0,b|0,R|0)|0;b=D()|0;g=Yr(Y|0,Z|0,m|0,((m|0)<0)<<31>>31|0)|0;g=Lv(R|0,b|0,g|0,D()|0)|0;b=D()|0;if((T|0)!=0?(c[T+12>>2]|0)!=0:0){p=T;q=h;o=i;while(1){p=c[(c[p+8>>2]|0)+4>>2]|0;k=p+12|0;i=c[k>>2]|0;d=c[i+88>>2]|0;Q=Yr(d|0,((d|0)<0)<<31>>31|0,_|0,((_|0)<0)<<31>>31|0)|0;P=D()|0;h=c[i+92>>2]|0;R=Yr(h|0,((h|0)<0)<<31>>31|0,$|0,(($|0)<0)<<31>>31|0)|0;P=Lv(R|0,D()|0,Q|0,P|0)|0;Q=D()|0;i=c[i+96>>2]|0;R=Yr(i|0,((i|0)<0)<<31>>31|0,S|0,((S|0)<0)<<31>>31|0)|0;R=Lv(P|0,Q|0,R|0,D()|0)|0;Q=D()|0;if((Q|0)<(v|0)|(Q|0)==(v|0)&R>>>0>>0){d=q;i=o;h=m;break}if((c[p+20>>2]|0)==(c[a+100>>2]|0)){d=q;i=o;h=m;break}l=Yr(U|0,V|0,d|0,((d|0)<0)<<31>>31|0)|0;R=D()|0;j=Yr(W|0,X|0,h|0,((h|0)<0)<<31>>31|0)|0;R=Lv(j|0,D()|0,l|0,R|0)|0;l=D()|0;j=Yr(Y|0,Z|0,i|0,((i|0)<0)<<31>>31|0)|0;j=Lv(R|0,l|0,j|0,D()|0)|0;l=D()|0;if(!((l|0)>(b|0)|(l|0)==(b|0)&j>>>0>g>>>0)){d=q;i=o;h=m;break}c[e>>2]=p;R=c[k>>2]|0;d=c[R+88>>2]|0;i=c[R+92>>2]|0;h=c[R+96>>2]|0;if(!R){g=j;b=l;break}else{b=l;g=j;q=d;o=i;m=h}}p=c[f>>2]|0;R=d;m=h}else{p=da;R=h}h=Yr(U|0,V|0,s|0,((s|0)<0)<<31>>31|0)|0;Q=D()|0;d=Yr(W|0,X|0,n|0,((n|0)<0)<<31>>31|0)|0;Q=Lv(d|0,D()|0,h|0,Q|0)|0;h=D()|0;d=Yr(Y|0,Z|0,t|0,((t|0)<0)<<31>>31|0)|0;d=Lv(Q|0,h|0,d|0,D()|0)|0;h=D()|0;a:do if(p)if(!(c[p+12>>2]|0)){k=s;o=t}else{r=p;q=s;o=t;while(1){p=c[c[r+8>>2]>>2]|0;l=c[p+12>>2]|0;j=c[l+88>>2]|0;P=Yr(j|0,((j|0)<0)<<31>>31|0,_|0,((_|0)<0)<<31>>31|0)|0;O=D()|0;k=c[l+92>>2]|0;Q=Yr(k|0,((k|0)<0)<<31>>31|0,$|0,(($|0)<0)<<31>>31|0)|0;O=Lv(Q|0,D()|0,P|0,O|0)|0;P=D()|0;l=c[l+96>>2]|0;Q=Yr(l|0,((l|0)<0)<<31>>31|0,S|0,((S|0)<0)<<31>>31|0)|0;Q=Lv(O|0,P|0,Q|0,D()|0)|0;P=D()|0;if((P|0)<(v|0)|(P|0)==(v|0)&Q>>>0>>0){p=r;k=q;break a}if((c[p+20>>2]|0)==(c[a+100>>2]|0)){p=r;k=q;break a}Q=Yr(U|0,V|0,j|0,((j|0)<0)<<31>>31|0)|0;P=D()|0;j=Yr(W|0,X|0,k|0,((k|0)<0)<<31>>31|0)|0;P=Lv(j|0,D()|0,Q|0,P|0)|0;Q=D()|0;j=Yr(Y|0,Z|0,l|0,((l|0)<0)<<31>>31|0)|0;j=Lv(P|0,Q|0,j|0,D()|0)|0;l=D()|0;if(!((l|0)>(h|0)|(l|0)==(h|0)&j>>>0>d>>>0)){p=r;k=q;break a}c[f>>2]=p;Q=c[p+12>>2]|0;k=c[Q+88>>2]|0;n=c[Q+92>>2]|0;o=c[Q+96>>2]|0;if(!Q){d=j;h=l;break}else{r=p;h=l;d=j;q=k}}}else{p=0;k=s;o=t}while(0);j=tv(d|0,h|0,g|0,b|0)|0;b=D()|0;if((b|0)>0|(b|0)==0&j>>>0>0){P=tv(0,0,S|0,((S|0)<0)<<31>>31|0)|0;Q=D()|0;q=j;g=b;d=R;h=i;l=m;K=k;L=n;M=o;while(1){J=c[e>>2]|0;O=g;b:while(1){N=(z(L-h|0,ca)|0)+(z(K-d|0,ba)|0)+(z(M-l|0,aa)|0)|0;if(!J)break;if(!(c[J+12>>2]|0))break;F=c[(c[J>>2]|0)+8>>2]|0;if((c[F+20>>2]|0)<=(c[a+100>>2]|0))break;I=c[F+12>>2]|0;G=c[I+88>>2]|0;E=G-d|0;H=c[I+92>>2]|0;C=H-h|0;I=c[I+96>>2]|0;g=I-l|0;s=Yr(U|0,V|0,E|0,((E|0)<0)<<31>>31|0)|0;B=D()|0;r=Yr(W|0,X|0,C|0,((C|0)<0)<<31>>31|0)|0;B=Lv(r|0,D()|0,s|0,B|0)|0;s=D()|0;r=Yr(Y|0,Z|0,g|0,((g|0)<0)<<31>>31|0)|0;r=Lv(B|0,s|0,r|0,D()|0)|0;s=D()|0;g=(z(C,ca)|0)+(z(E,ba)|0)+(z(g,aa)|0)|0;do if((r|0)==0&(s|0)==0){if((g|0)>=0)break b}else{if((s|0)>=0)break b;if((g|0)>0){E=-1;v=g;u=((g|0)<0)<<31>>31}else{v=tv(0,0,g|0,((g|0)<0)<<31>>31|0)|0;u=D()|0;E=(g|0)!=0&1;v=g|0?v:0;u=g|0?u:0}y=tv(0,0,r|0,s|0)|0;A=D()|0;if((N|0)>0){r=-1;B=N;C=((N|0)<0)<<31>>31;g=1}else{B=tv(0,0,N|0,((N|0)<0)<<31>>31|0)|0;C=D()|0;r=(N|0)!=0&1;B=N|0?B:0;C=N|0?C:0;g=((N|0)!=0)<<31>>31}if((O|0)>0|(O|0)==0&q>>>0>0){s=q;t=O}else{x=(q|0)!=0|(O|0)!=0;s=tv(0,0,q|0,O|0)|0;t=D()|0;s=x?s:0;t=x?t:0;g=x?r:g}if((E|0)==(g|0)){if(!E)break;fa=Yr(s|0,0,v|0,0)|0;g=D()|0;r=Yr(t|0,0,v|0,0)|0;ga=D()|0;w=Yr(s|0,0,u|0,0)|0;x=D()|0;v=Yr(t|0,0,u|0,0)|0;u=D()|0;w=Lv(r|0,0,w|0,0)|0;r=D()|0;u=Lv(ga|0,0,v|0,u|0)|0;x=Lv(u|0,D()|0,x|0,0)|0;r=Lv(x|0,D()|0,r|0,0)|0;x=D()|0;u=Lv(0,w|0,fa|0,g|0)|0;v=D()|0;w=Lv(r|0,x|0,(v>>>0>>0|(v|0)==(w|0)&u>>>0<0)&1|0,0)|0;x=D()|0;r=Yr(B|0,0,y|0,0)|0;g=D()|0;fa=Yr(C|0,0,y|0,0)|0;y=D()|0;s=Yr(B|0,0,A|0,0)|0;t=D()|0;A=Yr(C|0,0,A|0,0)|0;B=D()|0;s=Lv(fa|0,0,s|0,0)|0;C=D()|0;B=Lv(y|0,0,A|0,B|0)|0;t=Lv(B|0,D()|0,t|0,0)|0;C=Lv(t|0,D()|0,C|0,0)|0;t=D()|0;g=Lv(0,s|0,r|0,g|0)|0;r=D()|0;s=Lv(C|0,t|0,(r>>>0>>0|(r|0)==(s|0)&g>>>0<0)&1|0,0)|0;t=D()|0;if(x>>>0>>0|(x|0)==(t|0)&w>>>0>>0)g=-1;else g=x>>>0>t>>>0|(x|0)==(t|0)&w>>>0>s>>>0?1:v>>>0>>0|(v|0)==(r|0)&u>>>0>>0?-1:(v>>>0>r>>>0|(v|0)==(r|0)&u>>>0>g>>>0)&1;g=z(g,E)|0}else g=E-g|0;if((g|0)<=-1)break b}while(0);O=K-G|0;h=L-H|0;q=M-I|0;O=Yr(U|0,V|0,O|0,((O|0)<0)<<31>>31|0)|0;d=D()|0;h=Yr(W|0,X|0,h|0,((h|0)<0)<<31>>31|0)|0;d=Lv(h|0,D()|0,O|0,d|0)|0;O=D()|0;q=Yr(Y|0,Z|0,q|0,((q|0)<0)<<31>>31|0)|0;q=Lv(d|0,O|0,q|0,D()|0)|0;O=D()|0;d=(J|0)==(T|0)?0:F;c[e>>2]=d;J=d;d=G;h=H;l=I}g=c[f>>2]|0;if(!g){g=110;break}if(!(c[g+12>>2]|0)){g=110;break}G=c[c[g+8>>2]>>2]|0;if((c[G+20>>2]|0)<=(c[a+100>>2]|0)){g=110;break}s=c[G+12>>2]|0;v=c[s+88>>2]|0;t=v-K|0;u=c[s+92>>2]|0;r=u-L|0;s=c[s+96>>2]|0;g=s-M|0;ga=Yr(t|0,((t|0)<0)<<31>>31|0,_|0,((_|0)<0)<<31>>31|0)|0;M=D()|0;fa=Yr(r|0,((r|0)<0)<<31>>31|0,$|0,(($|0)<0)<<31>>31|0)|0;M=Lv(fa|0,D()|0,ga|0,M|0)|0;ga=D()|0;fa=Yr(P|0,Q|0,g|0,((g|0)<0)<<31>>31|0)|0;if(!((M|0)==(fa|0)&(ga|0)==(D()|0))){g=110;break}x=Yr(U|0,V|0,t|0,((t|0)<0)<<31>>31|0)|0;F=D()|0;w=Yr(W|0,X|0,r|0,((r|0)<0)<<31>>31|0)|0;F=Lv(w|0,D()|0,x|0,F|0)|0;x=D()|0;w=Yr(Y|0,Z|0,g|0,((g|0)<0)<<31>>31|0)|0;w=Lv(F|0,x|0,w|0,D()|0)|0;x=D()|0;g=(z(r,ca)|0)+(z(t,ba)|0)+(z(g,aa)|0)|0;F=v-d|0;fa=u-h|0;E=s-l|0;F=Yr(U|0,V|0,F|0,((F|0)<0)<<31>>31|0)|0;ga=D()|0;fa=Yr(W|0,X|0,fa|0,((fa|0)<0)<<31>>31|0)|0;ga=Lv(fa|0,D()|0,F|0,ga|0)|0;F=D()|0;E=Yr(Y|0,Z|0,E|0,((E|0)<0)<<31>>31|0)|0;E=Lv(ga|0,F|0,E|0,D()|0)|0;F=D()|0;if(!((F|0)>0|(F|0)==0&E>>>0>0)){g=110;break}if((w|0)==0&(x|0)==0){if((g|0)>=0){g=110;break}}else{if((x|0)>=0){g=110;break}if((g|0)>0){C=-1;u=g;t=((g|0)<0)<<31>>31}else{u=tv(0,0,g|0,((g|0)<0)<<31>>31|0)|0;t=D()|0;C=(g|0)!=0&1;u=g|0?u:0;t=g|0?t:0}x=tv(0,0,w|0,x|0)|0;y=D()|0;if((N|0)>0){s=-1;A=N;B=((N|0)<0)<<31>>31;g=1}else{A=tv(0,0,N|0,((N|0)<0)<<31>>31|0)|0;B=D()|0;s=(N|0)!=0&1;A=N|0?A:0;B=N|0?B:0;g=((N|0)!=0)<<31>>31}if((O|0)>0|(O|0)==0&q>>>0>0)r=O;else{ga=(q|0)!=0|(O|0)!=0;q=tv(0,0,q|0,O|0)|0;r=D()|0;q=ga?q:0;r=ga?r:0;g=ga?s:g}if((C|0)==(g|0)){if(!C){g=110;break}ga=Yr(q|0,0,u|0,0)|0;g=D()|0;s=Yr(r|0,0,u|0,0)|0;N=D()|0;v=Yr(q|0,0,t|0,0)|0;w=D()|0;u=Yr(r|0,0,t|0,0)|0;t=D()|0;v=Lv(s|0,0,v|0,0)|0;q=D()|0;t=Lv(N|0,0,u|0,t|0)|0;w=Lv(t|0,D()|0,w|0,0)|0;q=Lv(w|0,D()|0,q|0,0)|0;w=D()|0;t=Lv(0,v|0,ga|0,g|0)|0;u=D()|0;v=Lv(q|0,w|0,(u>>>0>>0|(u|0)==(v|0)&t>>>0<0)&1|0,0)|0;w=D()|0;q=Yr(A|0,0,x|0,0)|0;g=D()|0;ga=Yr(B|0,0,x|0,0)|0;N=D()|0;r=Yr(A|0,0,y|0,0)|0;s=D()|0;O=Yr(B|0,0,y|0,0)|0;fa=D()|0;r=Lv(ga|0,0,r|0,0)|0;ga=D()|0;fa=Lv(N|0,0,O|0,fa|0)|0;s=Lv(fa|0,D()|0,s|0,0)|0;ga=Lv(s|0,D()|0,ga|0,0)|0;s=D()|0;g=Lv(0,r|0,q|0,g|0)|0;q=D()|0;r=Lv(ga|0,s|0,(q>>>0>>0|(q|0)==(r|0)&g>>>0<0)&1|0,0)|0;s=D()|0;if(w>>>0>>0|(w|0)==(s|0)&v>>>0>>0)g=-1;else g=w>>>0>s>>>0|(w|0)==(s|0)&v>>>0>r>>>0?1:u>>>0>>0|(u|0)==(q|0)&t>>>0>>0?-1:(u>>>0>q>>>0|(u|0)==(q|0)&t>>>0>g>>>0)&1;g=z(g,C)|0}else g=C-g|0;if((g|0)<=0){g=110;break}}c[f>>2]=G;M=c[G+12>>2]|0;q=E;g=F;K=c[M+88>>2]|0;L=c[M+92>>2]|0;M=c[M+96>>2]|0}if((g|0)==110)return}if((b|0)>=0)return;G=tv(0,0,S|0,((S|0)<0)<<31>>31|0)|0;H=D()|0;h=p;d=R;g=m;F=k;c:while(1){x=h;E=b;C=j;y=d;A=g;d:while(1){B=(z(n-i|0,ca)|0)+(z(F-y|0,ba)|0)+(z(o-A|0,aa)|0)|0;do if((x|0?c[x+12>>2]|0:0)?(ea=c[(c[x+4>>2]|0)+8>>2]|0,(c[ea+20>>2]|0)>(c[a+100>>2]|0)):0){w=c[ea+12>>2]|0;u=c[w+88>>2]|0;ga=u-F|0;v=c[w+92>>2]|0;fa=v-n|0;w=c[w+96>>2]|0;g=w-o|0;d=Yr(U|0,V|0,ga|0,((ga|0)<0)<<31>>31|0)|0;T=D()|0;b=Yr(W|0,X|0,fa|0,((fa|0)<0)<<31>>31|0)|0;T=Lv(b|0,D()|0,d|0,T|0)|0;d=D()|0;b=Yr(Y|0,Z|0,g|0,((g|0)<0)<<31>>31|0)|0;b=Lv(T|0,d|0,b|0,D()|0)|0;d=D()|0;g=(z(fa,ca)|0)+(z(ga,ba)|0)+(z(g,aa)|0)|0;if((b|0)==0&(d|0)==0)if((g|0)>0)break d;else break;if((d|0)<0){if((g|0)>0){t=-1;k=g;j=((g|0)<0)<<31>>31}else{k=tv(0,0,g|0,((g|0)<0)<<31>>31|0)|0;j=D()|0;t=(g|0)!=0&1;k=g|0?k:0;j=g|0?j:0}p=tv(0,0,b|0,d|0)|0;q=D()|0;if((B|0)>0){b=-1;r=B;s=((B|0)<0)<<31>>31;g=1}else{r=tv(0,0,B|0,((B|0)<0)<<31>>31|0)|0;s=D()|0;b=(B|0)!=0&1;r=B|0?r:0;s=B|0?s:0;g=((B|0)!=0)<<31>>31}if((E|0)>0|(E|0)==0&C>>>0>0){d=C;h=E}else{ga=(C|0)!=0|(E|0)!=0;d=tv(0,0,C|0,E|0)|0;h=D()|0;d=ga?d:0;h=ga?h:0;g=ga?b:g}if((t|0)==(g|0)){if(!t)break d;ga=Yr(d|0,0,k|0,0)|0;g=D()|0;b=Yr(h|0,0,k|0,0)|0;S=D()|0;l=Yr(d|0,0,j|0,0)|0;m=D()|0;k=Yr(h|0,0,j|0,0)|0;j=D()|0;l=Lv(b|0,0,l|0,0)|0;b=D()|0;j=Lv(S|0,0,k|0,j|0)|0;m=Lv(j|0,D()|0,m|0,0)|0;b=Lv(m|0,D()|0,b|0,0)|0;m=D()|0;j=Lv(0,l|0,ga|0,g|0)|0;k=D()|0;l=Lv(b|0,m|0,(k>>>0>>0|(k|0)==(l|0)&j>>>0<0)&1|0,0)|0;m=D()|0;b=Yr(r|0,0,p|0,0)|0;g=D()|0;ga=Yr(s|0,0,p|0,0)|0;S=D()|0;d=Yr(r|0,0,q|0,0)|0;h=D()|0;T=Yr(s|0,0,q|0,0)|0;fa=D()|0;d=Lv(ga|0,0,d|0,0)|0;ga=D()|0;fa=Lv(S|0,0,T|0,fa|0)|0;h=Lv(fa|0,D()|0,h|0,0)|0;ga=Lv(h|0,D()|0,ga|0,0)|0;h=D()|0;g=Lv(0,d|0,b|0,g|0)|0;b=D()|0;d=Lv(ga|0,h|0,(b>>>0>>0|(b|0)==(d|0)&g>>>0<0)&1|0,0)|0;h=D()|0;if(m>>>0>>0|(m|0)==(h|0)&l>>>0>>0)g=-1;else g=m>>>0>h>>>0|(m|0)==(h|0)&l>>>0>d>>>0?1:k>>>0>>0|(k|0)==(b|0)&j>>>0>>0?-1:(k>>>0>b>>>0|(k|0)==(b|0)&j>>>0>g>>>0)&1;g=z(g,t)|0}else g=t-g|0;if((g|0)<1)break d}}while(0);g=c[e>>2]|0;if(!g){g=110;break c}if(!(c[g+12>>2]|0)){g=110;break c}v=c[(c[g+8>>2]|0)+4>>2]|0;if((c[v+20>>2]|0)<=(c[a+100>>2]|0)){g=110;break c}d=c[v+12>>2]|0;k=c[d+88>>2]|0;h=k-y|0;j=c[d+92>>2]|0;b=j-i|0;d=c[d+96>>2]|0;g=d-A|0;ga=Yr(h|0,((h|0)<0)<<31>>31|0,_|0,((_|0)<0)<<31>>31|0)|0;T=D()|0;fa=Yr(b|0,((b|0)<0)<<31>>31|0,$|0,(($|0)<0)<<31>>31|0)|0;T=Lv(fa|0,D()|0,ga|0,T|0)|0;ga=D()|0;fa=Yr(G|0,H|0,g|0,((g|0)<0)<<31>>31|0)|0;if(!((T|0)==(fa|0)&(ga|0)==(D()|0))){g=110;break c}l=Yr(U|0,V|0,h|0,((h|0)<0)<<31>>31|0)|0;u=D()|0;i=Yr(W|0,X|0,b|0,((b|0)<0)<<31>>31|0)|0;u=Lv(i|0,D()|0,l|0,u|0)|0;l=D()|0;i=Yr(Y|0,Z|0,g|0,((g|0)<0)<<31>>31|0)|0;i=Lv(u|0,l|0,i|0,D()|0)|0;l=D()|0;g=(z(b,ca)|0)+(z(h,ba)|0)+(z(g,aa)|0)|0;u=F-k|0;fa=n-j|0;t=o-d|0;u=Yr(U|0,V|0,u|0,((u|0)<0)<<31>>31|0)|0;ga=D()|0;fa=Yr(W|0,X|0,fa|0,((fa|0)<0)<<31>>31|0)|0;ga=Lv(fa|0,D()|0,u|0,ga|0)|0;u=D()|0;t=Yr(Y|0,Z|0,t|0,((t|0)<0)<<31>>31|0)|0;t=Lv(ga|0,u|0,t|0,D()|0)|0;u=D()|0;if((u|0)>=0){g=110;break c}if((i|0)==0&(l|0)==0){if((g|0)<=0){g=110;break c}}else{if((l|0)>=0){g=110;break c}if((g|0)>0){s=-1;k=g;j=((g|0)<0)<<31>>31}else{k=tv(0,0,g|0,((g|0)<0)<<31>>31|0)|0;j=D()|0;s=(g|0)!=0&1;k=g|0?k:0;j=g|0?j:0}m=tv(0,0,i|0,l|0)|0;p=D()|0;if((B|0)>0){h=-1;q=B;r=((B|0)<0)<<31>>31;g=1}else{q=tv(0,0,B|0,((B|0)<0)<<31>>31|0)|0;r=D()|0;h=(B|0)!=0&1;q=B|0?q:0;r=B|0?r:0;g=((B|0)!=0)<<31>>31}if((E|0)>0|(E|0)==0&C>>>0>0){d=C;b=E}else{ga=(C|0)!=0|(E|0)!=0;d=tv(0,0,C|0,E|0)|0;b=D()|0;d=ga?d:0;b=ga?b:0;g=ga?h:g}if((s|0)==(g|0)){if(!s){g=110;break c}g=Yr(d|0,0,k|0,0)|0;i=D()|0;h=Yr(b|0,0,k|0,0)|0;S=D()|0;k=Yr(d|0,0,j|0,0)|0;l=D()|0;ga=Yr(b|0,0,j|0,0)|0;j=D()|0;k=Lv(h|0,0,k|0,0)|0;b=D()|0;j=Lv(S|0,0,ga|0,j|0)|0;l=Lv(j|0,D()|0,l|0,0)|0;b=Lv(l|0,D()|0,b|0,0)|0;l=D()|0;i=Lv(0,k|0,g|0,i|0)|0;j=D()|0;k=Lv(b|0,l|0,(j>>>0>>0|(j|0)==(k|0)&i>>>0<0)&1|0,0)|0;l=D()|0;b=Yr(q|0,0,m|0,0)|0;g=D()|0;ga=Yr(r|0,0,m|0,0)|0;S=D()|0;d=Yr(q|0,0,p|0,0)|0;h=D()|0;T=Yr(r|0,0,p|0,0)|0;fa=D()|0;d=Lv(ga|0,0,d|0,0)|0;ga=D()|0;fa=Lv(S|0,0,T|0,fa|0)|0;h=Lv(fa|0,D()|0,h|0,0)|0;ga=Lv(h|0,D()|0,ga|0,0)|0;h=D()|0;g=Lv(0,d|0,b|0,g|0)|0;b=D()|0;d=Lv(ga|0,h|0,(b>>>0>>0|(b|0)==(d|0)&g>>>0<0)&1|0,0)|0;h=D()|0;if(l>>>0>>0|(l|0)==(h|0)&k>>>0>>0)g=-1;else g=l>>>0>h>>>0|(l|0)==(h|0)&k>>>0>d>>>0?1:j>>>0>>0|(j|0)==(b|0)&i>>>0>>0?-1:(j>>>0>b>>>0|(j|0)==(b|0)&i>>>0>g>>>0)&1;g=z(g,s)|0}else g=s-g|0;if((g|0)>=0){g=110;break c}}c[e>>2]=v;A=c[v+12>>2]|0;x=c[f>>2]|0;E=u;C=t;y=c[A+88>>2]|0;i=c[A+92>>2]|0;A=c[A+96>>2]|0}b=u-y|0;d=v-i|0;j=w-A|0;b=Yr(U|0,V|0,b|0,((b|0)<0)<<31>>31|0)|0;h=D()|0;d=Yr(W|0,X|0,d|0,((d|0)<0)<<31>>31|0)|0;h=Lv(d|0,D()|0,b|0,h|0)|0;b=D()|0;j=Yr(Y|0,Z|0,j|0,((j|0)<0)<<31>>31|0)|0;j=Lv(h|0,b|0,j|0,D()|0)|0;b=D()|0;h=(x|0)==(da|0)?0:ea;c[f>>2]=h;d=y;g=A;F=u;n=v;o=w}if((g|0)==110)return}function mb(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0.0,l=0,m=0,n=0.0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0,u=0.0,v=0,w=0,x=0,y=0.0,A=0.0,B=0.0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;I=ea;ea=ea+176|0;if((e|0)<1){g=c[b+12>>2]|0;if(g|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;g=c[b+32>>2]|0;if(g|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;g=c[b+52>>2]|0;if(g|0){if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+52>>2]=0}a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;ea=I;return}c[I+32>>2]=0;c[I+36>>2]=0;c[I+40>>2]=0;c[I+44>>2]=256;c[I+48>>2]=0;c[I+52>>2]=0;c[I+56>>2]=0;c[I+60>>2]=256;c[I+64>>2]=0;c[I+68>>2]=0;c[I+72>>2]=0;c[I+76>>2]=256;a[I+96>>0]=1;c[I+92>>2]=0;c[I+84>>2]=0;c[I+88>>2]=0;l=0;m=-246811958;t=-246811958;w=-246811958;q=1900671690;v=1900671690;x=1900671690;o=d;while(1){g=c[o>>2]|0;i=c[o+4>>2]|0;j=c[o+8>>2]|0;k=(c[h>>2]=g,+f[h>>2]);q=k<(c[h>>2]=q,+f[h>>2])?g:q;n=(c[h>>2]=i,+f[h>>2]);v=n<(c[h>>2]=v,+f[h>>2])?i:v;p=(c[h>>2]=j,+f[h>>2]);x=p<(c[h>>2]=x,+f[h>>2])?j:x;m=(c[h>>2]=m,+f[h>>2])>2]=t,+f[h>>2])>2]=w,+f[h>>2])>2]=m,+f[h>>2]);s=(c[h>>2]=q,+f[h>>2]);r=(c[h>>2]=t,+f[h>>2]);p=(c[h>>2]=v,+f[h>>2]);n=(c[h>>2]=w,+f[h>>2]);k=(c[h>>2]=x,+f[h>>2]);i=u-s>2]=i;g=u-s>>0)%3|0;c[I+104>>2]=g;t=(i^3)-g|0;c[I+108>>2]=t;y=((t+1|0)%3|0|0)==(i|0)?(u-s)*9.788566967472434e-05:-((u-s)*9.788566967472434e-05);A=((t+1|0)%3|0|0)==(i|0)?(r-p)*9.788566967472434e-05:-((r-p)*9.788566967472434e-05);B=((t+1|0)%3|0|0)==(i|0)?(n-k)*9.788566967472434e-05:-((n-k)*9.788566967472434e-05);f[I>>2]=y;f[I+4>>2]=A;f[I+8>>2]=B;f[I+12>>2]=0.0;y=y!=0.0?1.0/y:y;A=A!=0.0?1.0/A:A;B=B!=0.0?1.0/B:B;f[I+16>>2]=(u+s)*.5;f[I+20>>2]=(r+p)*.5;f[I+24>>2]=(n+k)*.5;f[I+28>>2]=0.0;t=I+144+16|0;a[t>>0]=1;q=I+144+12|0;c[q>>2]=0;c[I+144+4>>2]=0;c[I+144+8>>2]=0;c[6747]=(c[6747]|0)+1;g=kb((e<<4|3)+16|0)|0;if(!g)l=0;else{c[(g+4+15&-16)+-4>>2]=g;l=g+4+15&-16}j=c[I+144+4>>2]|0;i=c[q>>2]|0;if((j|0)<=0){if(i|0)H=25}else{g=0;do{H=l+(g<<4)|0;F=i+(g<<4)|0;c[H>>2]=c[F>>2];c[H+4>>2]=c[F+4>>2];c[H+8>>2]=c[F+8>>2];c[H+12>>2]=c[F+12>>2];g=g+1|0}while((g|0)!=(j|0));H=25}if((H|0)==25){if(a[t>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[q>>2]=0}a[t>>0]=1;c[q>>2]=l;c[I+144+8>>2]=e;c[l>>2]=c[I+128>>2];c[l+4>>2]=c[I+128+4>>2];c[l+8>>2]=c[I+128+8>>2];c[l+12>>2]=c[I+128+12>>2];if((e|0)!=1){g=1;do{F=(c[q>>2]|0)+(g<<4)|0;c[F>>2]=c[I+128>>2];c[F+4>>2]=c[I+128+4>>2];c[F+8>>2]=c[I+128+8>>2];c[F+12>>2]=c[I+128+12>>2];g=g+1|0}while((g|0)!=(e|0))}c[I+144+4>>2]=e;j=I+128+(c[I+108>>2]<<2)|0;i=c[q>>2]|0;l=I+128+(c[I+112>>2]<<2)|0;m=I+128+(c[I+104>>2]<<2)|0;k=+f[I+16>>2];n=+f[I+20>>2];p=+f[I+24>>2];o=0;g=d;while(1){s=A*(+f[g+4>>2]-n);u=B*(+f[g+8>>2]-p);f[I+128>>2]=y*(+f[g>>2]-k);f[I+128+4>>2]=s;f[I+128+8>>2]=u;f[I+128+12>>2]=0.0;c[i+(o<<4)>>2]=~~+f[j>>2];c[i+(o<<4)+4>>2]=~~+f[l>>2];c[i+(o<<4)+8>>2]=~~+f[m>>2];c[i+(o<<4)+12>>2]=o;o=o+1|0;if((o|0)==(e|0))break;else g=g+16|0}if((e|0)>1)hg(I+144|0,0,e+-1|0);c[I+36>>2]=c[I+32>>2];c[I+40>>2]=0;c[I+44>>2]=e;g=c[I+84>>2]|0;if((g|0)<(e|0)){if((c[I+88>>2]|0)<(e|0)){if(!e){j=g;l=0}else{c[6747]=(c[6747]|0)+1;i=kb((e<<2|3)+16|0)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=c[I+84>>2]|0;l=i}if((j|0)>0){i=0;do{c[l+(i<<2)>>2]=c[(c[I+92>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(j|0))}i=c[I+92>>2]|0;if(i|0){if(a[I+96>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[I+92>>2]=0}a[I+96>>0]=1;c[I+92>>2]=l;c[I+88>>2]=e}do{c[(c[I+92>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(e|0))}c[I+84>>2]=e;m=0;do{g=c[I+40>>2]|0;if(!g){g=c[I+36>>2]|0;if(!g){c[6747]=(c[6747]|0)+1;g=kb(31)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}g=c[I+44>>2]|0;c[i+4>>2]=g;j=i+8|0;c[j>>2]=0;c[6747]=(c[6747]|0)+1;g=kb((g*112|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}c[i>>2]=g;c[j>>2]=c[I+32>>2];c[I+32>>2]=i}else{c[I+36>>2]=c[g+8>>2];i=g}g=c[i>>2]|0;i=c[i+4>>2]|0;if((i|0)>0?(c[g>>2]=(i|0)!=1?g+112|0:0,(i|0)!=1):0){j=1;l=g+112|0;do{j=j+1|0;F=(j|0)<(i|0);E=l;l=l+112|0;c[E>>2]=F?l:0}while(F)}}c[I+40>>2]=c[g>>2];F=g+104|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[g+16>>2]=0;c[F>>2]=-1;c[g+8>>2]=0;D=(c[q>>2]|0)+(m<<4)|0;E=g+88|0;c[E>>2]=c[D>>2];c[E+4>>2]=c[D+4>>2];c[E+8>>2]=c[D+8>>2];c[E+12>>2]=c[D+12>>2];c[F>>2]=-1;c[(c[I+92>>2]|0)+(m<<2)>>2]=g;m=m+1|0}while((m|0)<(e|0));g=c[q>>2]|0;if(g|0){if(a[t>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[q>>2]=0}a[t>>0]=1;c[q>>2]=0;c[I+144+4>>2]=0;c[I+144+8>>2]=0;c[I+52>>2]=c[I+48>>2];c[I+56>>2]=0;c[I+60>>2]=e*6;c[I+116>>2]=0;c[I+120>>2]=0;c[I+100>>2]=-3;c[I+128>>2]=0;c[I+128+4>>2]=0;c[I+128+8>>2]=0;c[I+128+12>>2]=0;hb(I,0,e,I+128|0);c[I+124>>2]=c[I+128>>2];g=c[q>>2]|0;if(g|0){if(a[t>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[q>>2]=0}g=c[b+4>>2]|0;if((g|0)<0){if((c[b+8>>2]|0)<0){i=c[b+12>>2]|0;if(i|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=0;c[b+8>>2]=0}do{F=(c[b+12>>2]|0)+(g<<4)|0;c[F>>2]=c[I+144>>2];c[F+4>>2]=c[I+144+4>>2];c[F+8>>2]=c[I+144+8>>2];c[F+12>>2]=c[I+144+12>>2];g=g+1|0}while((g|0)!=0)}c[b+4>>2]=0;c[I+144>>2]=0;c[I+144+4>>2]=0;c[I+144+8>>2]=0;g=c[b+24>>2]|0;if((g|0)<0){if((c[b+28>>2]|0)<0){i=c[b+32>>2]|0;if(i|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+28>>2]=0}do{F=(c[b+32>>2]|0)+(g*12|0)|0;c[F>>2]=c[I+144>>2];c[F+4>>2]=c[I+144+4>>2];c[F+8>>2]=c[I+144+8>>2];g=g+1|0}while((g|0)!=0)}c[b+24>>2]=0;i=c[b+44>>2]|0;if((i|0)<0){g=c[b+52>>2]|0;if((c[b+48>>2]|0)<0){if(g|0?a[b+56>>0]|0:0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}a[b+56>>0]=1;c[b+52>>2]=0;c[b+48>>2]=0;g=0}hk(g+(i<<2)|0,0,z(i,-4)|0)|0}c[b+44>>2]=0;i=c[I+124>>2]|0;if((c[i+104>>2]|0)<0){c[i+104>>2]=0;c[6747]=(c[6747]|0)+1;g=kb(23)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}c[g>>2]=i;o=g;q=g;F=0;t=1;v=g;j=1;while(1){if((c[i+100>>2]|0)>-1){f[I+144+(c[I+108>>2]<<2)>>2]=+(c[i+88>>2]|0);f[I+144+(c[I+112>>2]<<2)>>2]=+(c[i+92>>2]|0);k=+(c[i+96>>2]|0)}else{k=+nk(i+24|0);E=i+72|0;k=k/+nk(E);f[I+144+(c[I+108>>2]<<2)>>2]=k;k=+nk(i+40|0);k=k/+nk(E);f[I+144+(c[I+112>>2]<<2)>>2]=k;k=+nk(i+56|0);k=k/+nk(E)}f[I+144+(c[I+104>>2]<<2)>>2]=k;k=+f[I+144>>2]*+f[I>>2]+ +f[I+16>>2];p=+f[I+144+4>>2]*+f[I+4>>2]+ +f[I+20>>2];n=+f[I+144+8>>2]*+f[I+8>>2]+ +f[I+24>>2];g=c[b+4>>2]|0;if((g|0)==(c[b+8>>2]|0)?(G=(g|0)==0?1:g<<1,(g|0)<(G|0)):0){if(!G)l=0;else{c[6747]=(c[6747]|0)+1;g=kb((G<<4|3)+16|0)|0;if(!g)l=0;else{c[(g+4+15&-16)+-4>>2]=g;l=g+4+15&-16}g=c[b+4>>2]|0}if((g|0)>0){m=0;do{E=l+(m<<4)|0;D=(c[b+12>>2]|0)+(m<<4)|0;c[E>>2]=c[D>>2];c[E+4>>2]=c[D+4>>2];c[E+8>>2]=c[D+8>>2];c[E+12>>2]=c[D+12>>2];m=m+1|0}while((m|0)!=(g|0))}g=c[b+12>>2]|0;if(g|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=l;c[b+8>>2]=G;g=c[b+4>>2]|0}E=c[b+12>>2]|0;f[E+(g<<4)>>2]=k;f[E+(g<<4)+4>>2]=p;f[E+(g<<4)+8>>2]=n;f[E+(g<<4)+12>>2]=0.0;c[b+4>>2]=(c[b+4>>2]|0)+1;E=c[i+8>>2]|0;if(!E){x=q;l=o;m=t;w=v}else{l=o;w=q;D=E;i=-1;m=t;e=v;C=-1;while(1){d=D+20|0;g=c[d>>2]|0;if((g|0)<0){x=c[b+24>>2]|0;c[I+144>>2]=0;c[I+144+4>>2]=0;c[I+144+8>>2]=0;do if((x|0)==(c[b+28>>2]|0)){t=(x|0)==0?1:x<<1;if((x|0)>=(t|0)){g=x;break}if(!t){o=x;q=0}else{c[6747]=(c[6747]|0)+1;g=kb((t*12|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}o=c[b+24>>2]|0;q=g}if((o|0)>0){g=0;do{v=q+(g*12|0)|0;J=(c[b+32>>2]|0)+(g*12|0)|0;c[v>>2]=c[J>>2];c[v+4>>2]=c[J+4>>2];c[v+8>>2]=c[J+8>>2];g=g+1|0}while((g|0)!=(o|0))}g=c[b+32>>2]|0;if(g|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=q;c[b+28>>2]=t;g=c[b+24>>2]|0}else g=x;while(0);g=(c[b+32>>2]|0)+(g*12|0)|0;c[g>>2]=c[I+144>>2];c[g+4>>2]=c[I+144+4>>2];c[g+8>>2]=c[I+144+8>>2];g=(c[b+24>>2]|0)+1|0;c[b+24>>2]=g;c[I+144>>2]=0;c[I+144+4>>2]=0;c[I+144+8>>2]=0;do if((g|0)==(c[b+28>>2]|0)){t=(g|0)==0?1:g<<1;if((g|0)>=(t|0))break;if(!t)o=0;else{c[6747]=(c[6747]|0)+1;g=kb((t*12|3)+16|0)|0;if(!g)o=0;else{c[(g+4+15&-16)+-4>>2]=g;o=g+4+15&-16}g=c[b+24>>2]|0}if((g|0)>0){q=0;do{J=o+(q*12|0)|0;v=(c[b+32>>2]|0)+(q*12|0)|0;c[J>>2]=c[v>>2];c[J+4>>2]=c[v+4>>2];c[J+8>>2]=c[v+8>>2];q=q+1|0}while((q|0)!=(g|0))}g=c[b+32>>2]|0;if(g|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=o;c[b+28>>2]=t;g=c[b+24>>2]|0}while(0);v=(c[b+32>>2]|0)+(g*12|0)|0;c[v>>2]=c[I+144>>2];c[v+4>>2]=c[I+144+4>>2];c[v+8>>2]=c[I+144+8>>2];c[b+24>>2]=(c[b+24>>2]|0)+1;v=c[b+32>>2]|0;c[d>>2]=x;c[(c[D+8>>2]|0)+20>>2]=x+1;c[v+(x*12|0)+4>>2]=1;c[v+((x+1|0)*12|0)+4>>2]=-1;t=c[D+12>>2]|0;g=c[t+104>>2]|0;if((g|0)<0){c[t+104>>2]=j;do if((j|0)==(m|0)){q=(m|0)==0?1:m<<1;if((m|0)>=(q|0)){g=w;o=e;break}do if(!q)o=0;else{c[6747]=(c[6747]|0)+1;g=kb((q<<2|3)+16|0)|0;if(!g){o=0;break}c[(g+4+15&-16)+-4>>2]=g;o=g+4+15&-16}while(0);if((m|0)>0){g=0;do{c[o+(g<<2)>>2]=c[e+(g<<2)>>2];g=g+1|0}while((g|0)!=(m|0));if(!l){g=o;l=o;m=q;break}}else if((e|0)==0|(l|0)==0){g=o;l=o;m=q;break}c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);g=o;l=o;m=q}else{g=w;o=e}while(0);c[o+(j<<2)>>2]=t;q=g;g=j;j=j+1|0}else{q=w;o=e}c[v+(x*12|0)+8>>2]=g;c[v+((x+1|0)*12|0)+8>>2]=F;g=c[d>>2]|0}else{q=w;o=e}if((C|0)>-1)c[(c[b+32>>2]|0)+(g*12|0)>>2]=C-g;else i=g;D=c[D>>2]|0;if((D|0)==(E|0))break;else{w=q;e=o;C=g}}c[(c[b+32>>2]|0)+(i*12|0)>>2]=g-i;x=q;w=o}g=F+1|0;if((g|0)>=(j|0))break;i=c[w+(g<<2)>>2]|0;o=l;q=x;F=g;t=m;v=w}v=0;while(1){q=c[(c[w+(v<<2)>>2]|0)+8>>2]|0;if(q|0){t=q;do{o=t+20|0;g=c[o>>2]|0;if((g|0)>-1){i=c[b+44>>2]|0;do if((i|0)==(c[b+48>>2]|0)){m=(i|0)==0?1:i<<1;if((i|0)>=(m|0))break;if(!m){g=i;i=0}else{c[6747]=(c[6747]|0)+1;g=kb((m<<2|3)+16|0)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}g=c[b+44>>2]|0}l=c[b+52>>2]|0;if((g|0)<=0){if(l)H=186}else{j=0;do{c[i+(j<<2)>>2]=c[l+(j<<2)>>2];j=j+1|0}while((j|0)!=(g|0));H=186}if((H|0)==186){H=0;if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[b+52>>2]=0;g=c[b+44>>2]|0}a[b+56>>0]=1;c[b+52>>2]=i;c[b+48>>2]=m;i=g;g=c[o>>2]|0}while(0);c[(c[b+52>>2]|0)+(i<<2)>>2]=g;c[b+44>>2]=(c[b+44>>2]|0)+1;g=t;do{c[g+20>>2]=-1;g=c[(c[g+8>>2]|0)+4>>2]|0}while((g|0)!=(t|0))}t=c[t>>2]|0}while((t|0)!=(q|0))}if((v|0)==(F|0))break;else v=v+1|0}if(!((w|0)==0|(x|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[x+-4>>2]|0)}}_h(I);ea=I;return}function nb(b){b=b|0;var d=0,e=0.0,g=0.0,h=0,i=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0;I=ea;ea=ea+64|0;if(!(a[b+356>>0]|0)){b=a[b+312>>0]|0;b=b<<24>>24!=0;ea=I;return b|0}c[b+336>>2]=0;c[b+336+4>>2]=0;c[b+336+8>>2]=0;c[b+336+12>>2]=0;a[b+336+16>>0]=0;k=a[b+332>>0]|0;a[b+332>>0]=k&-16;a[b+356>>0]=0;switch(c[b>>2]|0){case 0:{a[b+312>>0]=0;b=0;b=b<<24>>24!=0;ea=I;return b|0}case 1:{c[b+244>>2]=c[b+84>>2];c[b+244+4>>2]=c[b+84+4>>2];c[b+244+8>>2]=c[b+84+8>>2];c[b+244+12>>2]=c[b+84+12>>2];c[b+260>>2]=c[b+164>>2];c[b+260+4>>2]=c[b+164+4>>2];c[b+260+8>>2]=c[b+164+8>>2];c[b+260+12>>2]=c[b+164+12>>2];E=+f[b+248>>2]-+f[b+264>>2];F=+f[b+252>>2]-+f[b+268>>2];f[b+276>>2]=+f[b+244>>2]-+f[b+260>>2];f[b+280>>2]=E;f[b+284>>2]=F;f[b+288>>2]=0.0;a[b+352>>0]=0;a[b+332>>0]=k&-16;f[b+336>>2]=1.0;f[b+340>>2]=0.0;f[b+344>>2]=0.0;f[b+348>>2]=0.0;a[b+312>>0]=1;b=1;b=b<<24>>24!=0;ea=I;return b|0}case 2:{e=+f[b+4>>2];g=+f[b+8>>2];j=+f[b+12>>2];l=+f[b+20>>2]-e;n=+f[b+24>>2]-g;m=+f[b+28>>2]-j;if((0.0-e)*l+(0.0-g)*n+(0.0-j)*m>0.0)if((0.0-e)*l+(0.0-g)*n+(0.0-j)*m>0]=k&-16|h;e=1.0-g;f[b+336>>2]=e;f[b+340>>2]=g;f[b+344>>2]=0.0;f[b+348>>2]=0.0;A=+f[b+84>>2];C=+f[b+88>>2];E=+f[b+92>>2];A=A+g*(+f[b+100>>2]-A);C=C+g*(+f[b+104>>2]-C);E=E+g*(+f[b+108>>2]-E);f[b+244>>2]=A;f[b+248>>2]=C;f[b+252>>2]=E;f[b+256>>2]=0.0;B=+f[b+164>>2];D=+f[b+168>>2];F=+f[b+172>>2];B=B+g*(+f[b+180>>2]-B);D=D+g*(+f[b+184>>2]-D);F=F+g*(+f[b+188>>2]-F);f[b+260>>2]=B;f[b+264>>2]=D;f[b+268>>2]=F;f[b+272>>2]=0.0;f[b+276>>2]=A-B;f[b+280>>2]=C-D;f[b+284>>2]=E-F;f[b+288>>2]=0.0;if(!(h&2)){c[b>>2]=1;d=0}else d=1;if(!(h&1)){q=b+4+(d<<4)|0;G=b+84+(d<<4)|0;H=b+164+(d<<4)|0;c[b>>2]=d;c[b+4>>2]=c[q>>2];c[b+4+4>>2]=c[q+4>>2];c[b+4+8>>2]=c[q+8>>2];c[b+4+12>>2]=c[q+12>>2];c[b+84>>2]=c[G>>2];c[b+84+4>>2]=c[G+4>>2];c[b+84+8>>2]=c[G+8>>2];c[b+84+12>>2]=c[G+12>>2];c[b+164>>2]=c[H>>2];c[b+164+4>>2]=c[H+4>>2];c[b+164+8>>2]=c[H+8>>2];c[b+164+12>>2]=c[H+12>>2]}H=g>=0.0&e>=0.0&1;a[b+312>>0]=H;b=H;b=b<<24>>24!=0;ea=I;return b|0}case 3:{c[I+16>>2]=0;c[I+16+4>>2]=0;c[I+16+8>>2]=0;c[I+16+12>>2]=0;de(I+16|0,b+4|0,b+20|0,b+36|0,b+316|0);F=+f[b+336>>2];e=+f[b+340>>2];g=+f[b+344>>2];A=+f[b+84>>2]*F+ +f[b+100>>2]*e+ +f[b+116>>2]*g;C=F*+f[b+88>>2]+e*+f[b+104>>2]+g*+f[b+120>>2];E=F*+f[b+92>>2]+e*+f[b+108>>2]+g*+f[b+124>>2];f[b+244>>2]=A;f[b+248>>2]=C;f[b+252>>2]=E;f[b+256>>2]=0.0;B=F*+f[b+164>>2]+e*+f[b+180>>2]+g*+f[b+196>>2];D=F*+f[b+168>>2]+e*+f[b+184>>2]+g*+f[b+200>>2];F=F*+f[b+172>>2]+e*+f[b+188>>2]+g*+f[b+204>>2];f[b+260>>2]=B;f[b+264>>2]=D;f[b+268>>2]=F;f[b+272>>2]=0.0;f[b+276>>2]=A-B;f[b+280>>2]=C-D;f[b+284>>2]=E-F;f[b+288>>2]=0.0;k=c[b>>2]|0;do if((k|0)>3){d=a[b+332>>0]|0;if(!(d&8)){h=b+164+(k+-1<<4)|0;i=b+84+(k+-1<<4)|0;H=b+4+(k+-1<<4)|0;c[b>>2]=k+-1;c[b+52>>2]=c[H>>2];c[b+52+4>>2]=c[H+4>>2];c[b+52+8>>2]=c[H+8>>2];c[b+52+12>>2]=c[H+12>>2];c[b+132>>2]=c[i>>2];c[b+132+4>>2]=c[i+4>>2];c[b+132+8>>2]=c[i+8>>2];c[b+132+12>>2]=c[i+12>>2];c[b+212>>2]=c[h>>2];c[b+212+4>>2]=c[h+4>>2];c[b+212+8>>2]=c[h+8>>2];c[b+212+12>>2]=c[h+12>>2];h=b+332|0;k=k+-1|0;i=d;H=19}else{h=b+332|0;i=d;H=19}}else{if((k|0)==3){h=b+332|0;k=3;i=a[b+332>>0]|0;H=19;break}if((k|0)<=1){if((k|0)==1){d=1;H=26}}else{d=2;H=22}}while(0);if((H|0)==19){d=k+-1|0;if(!(i&4)){c[b>>2]=d;c[b+36>>2]=c[b+4+(d<<4)>>2];c[b+36+4>>2]=c[b+4+(d<<4)+4>>2];c[b+36+8>>2]=c[b+4+(d<<4)+8>>2];c[b+36+12>>2]=c[b+4+(d<<4)+12>>2];c[b+116>>2]=c[b+84+(d<<4)>>2];c[b+116+4>>2]=c[b+84+(d<<4)+4>>2];c[b+116+8>>2]=c[b+84+(d<<4)+8>>2];c[b+116+12>>2]=c[b+84+(d<<4)+12>>2];c[b+196>>2]=c[b+164+(d<<4)>>2];c[b+196+4>>2]=c[b+164+(d<<4)+4>>2];c[b+196+8>>2]=c[b+164+(d<<4)+8>>2];c[b+196+12>>2]=c[b+164+(d<<4)+12>>2];H=23}else{d=k;H=22}}if((H|0)==22){h=b+332|0;H=23}if((H|0)==23){i=d+-1|0;if(!(a[h>>0]&2)){c[b>>2]=i;c[b+20>>2]=c[b+4+(i<<4)>>2];c[b+20+4>>2]=c[b+4+(i<<4)+4>>2];c[b+20+8>>2]=c[b+4+(i<<4)+8>>2];c[b+20+12>>2]=c[b+4+(i<<4)+12>>2];c[b+100>>2]=c[b+84+(i<<4)>>2];c[b+100+4>>2]=c[b+84+(i<<4)+4>>2];c[b+100+8>>2]=c[b+84+(i<<4)+8>>2];c[b+100+12>>2]=c[b+84+(i<<4)+12>>2];c[b+180>>2]=c[b+164+(i<<4)>>2];c[b+180+4>>2]=c[b+164+(i<<4)+4>>2];c[b+180+8>>2]=c[b+164+(i<<4)+8>>2];c[b+180+12>>2]=c[b+164+(i<<4)+12>>2];o=h;H=27}else H=26}if((H|0)==26){o=b+332|0;i=d;H=27}if((H|0)==27?(p=i+-1|0,(a[o>>0]&1)==0):0){c[b>>2]=p;c[b+4>>2]=c[b+4+(p<<4)>>2];c[b+4+4>>2]=c[b+4+(p<<4)+4>>2];c[b+4+8>>2]=c[b+4+(p<<4)+8>>2];c[b+4+12>>2]=c[b+4+(p<<4)+12>>2];c[b+84>>2]=c[b+84+(p<<4)>>2];c[b+84+4>>2]=c[b+84+(p<<4)+4>>2];c[b+84+8>>2]=c[b+84+(p<<4)+8>>2];c[b+84+12>>2]=c[b+84+(p<<4)+12>>2];c[b+164>>2]=c[b+164+(p<<4)>>2];c[b+164+4>>2]=c[b+164+(p<<4)+4>>2];c[b+164+8>>2]=c[b+164+(p<<4)+8>>2];c[b+164+12>>2]=c[b+164+(p<<4)+12>>2]}if((e>=0.0?!(+f[b+336>>2]>=0.0):1)|!(g>=0.0))d=0;else d=+f[b+348>>2]>=0.0&1;a[b+312>>0]=d;b=d;b=b<<24>>24!=0;ea=I;return b|0}case 4:{c[I>>2]=0;c[I+4>>2]=0;c[I+8>>2]=0;c[I+12>>2]=0;q=I+16+16|0;a[q>>0]=0;c[b+316>>2]=0;c[b+316+4>>2]=0;c[b+316+8>>2]=0;c[b+316+12>>2]=0;a[b+332>>0]=k|15;K=+f[b+20>>2];T=+f[b+4>>2];Q=+f[b+24>>2];J=+f[b+8>>2];M=+f[b+28>>2];U=+f[b+12>>2];P=+f[b+36>>2];R=+f[b+40>>2];N=+f[b+44>>2];L=+f[b+52>>2];S=+f[b+56>>2];O=+f[b+60>>2];V=((Q-J)*(N-U)-(M-U)*(R-J))*(L-T)+((M-U)*(P-T)-(K-T)*(N-U))*(S-J)+((K-T)*(R-J)-(Q-J)*(P-T))*(O-U);i=V*V<9.99999905104687e-09?-1:((0.0-T)*((Q-J)*(N-U)-(M-U)*(R-J))+(0.0-J)*((M-U)*(P-T)-(K-T)*(N-U))+((K-T)*(R-J)-(Q-J)*(P-T))*(0.0-U))*V<0.0&1;V=(M-U)*((P-T)*(S-J)-(R-J)*(L-T))+((K-T)*((R-J)*(O-U)-(N-U)*(S-J))+(Q-J)*((N-U)*(L-T)-(P-T)*(O-U)));k=V*V<9.99999905104687e-09?-1:((0.0-U)*((P-T)*(S-J)-(R-J)*(L-T))+((0.0-T)*((R-J)*(O-U)-(N-U)*(S-J))+(0.0-J)*((N-U)*(L-T)-(P-T)*(O-U))))*V<0.0&1;V=(N-U)*((Q-J)*(L-T)-(K-T)*(S-J))+((P-T)*((M-U)*(S-J)-(Q-J)*(O-U))+(R-J)*((K-T)*(O-U)-(M-U)*(L-T)));o=V*V<9.99999905104687e-09?-1:((0.0-U)*((Q-J)*(L-T)-(K-T)*(S-J))+((0.0-T)*((M-U)*(S-J)-(Q-J)*(O-U))+(0.0-J)*((K-T)*(O-U)-(M-U)*(L-T))))*V<0.0&1;J=(U-M)*((R-Q)*(L-K)-(P-K)*(S-Q))+((T-K)*((N-M)*(S-Q)-(R-Q)*(O-M))+(J-Q)*((P-K)*(O-M)-(N-M)*(L-K)));p=J*J<9.99999905104687e-09?-1:((0.0-M)*((R-Q)*(L-K)-(P-K)*(S-Q))+((0.0-K)*((N-M)*(S-Q)-(R-Q)*(O-M))+(0.0-Q)*((P-K)*(O-M)-(N-M)*(L-K))))*J<0.0&1;do if((k|i|o|p|0)<0){a[b+352>>0]=1;d=b+312|0;H=68}else{if(!(k|i|o|p)){if(a[b+352>>0]|0){d=b+312|0;H=68;break}a[b+312>>0]=1;c[b+276>>2]=0;c[b+276+4>>2]=0;c[b+276+8>>2]=0;c[b+276+12>>2]=0;d=1;break}if((i|0)!=0?(de(I,b+4|0,b+20|0,b+36|0,I+16|0),e=+f[I+16>>2],g=+f[I+16+4>>2],j=+f[I+16+8>>2],l=e-+f[I>>2],n=g-+f[I+4>>2],m=j-+f[I+8>>2],l*l+n*n+m*m<3402823466385288598117041.0e14):0){W=c[I+16+12>>2]|0;f[b+316>>2]=e;f[b+320>>2]=g;f[b+324>>2]=j;c[b+328>>2]=W;W=a[q>>0]|0;a[b+332>>0]=W&1|a[b+332>>0]&-16|W&2|W&4;W=c[I+16+24>>2]|0;i=c[I+16+28>>2]|0;c[b+336>>2]=c[I+16+20>>2];c[b+340>>2]=W;c[b+344>>2]=i;f[b+348>>2]=0.0;e=l*l+n*n+m*m}else e=3402823466385288598117041.0e14;if((k|0)!=0?(de(I,b+4|0,b+36|0,b+52|0,I+16|0),r=+f[I+16>>2],s=+f[I+16+4>>2],t=+f[I+16+8>>2],u=r-+f[I>>2],w=s-+f[I+4>>2],v=t-+f[I+8>>2],u*u+w*w+v*v>2]|0;f[b+316>>2]=r;f[b+320>>2]=s;f[b+324>>2]=t;c[b+328>>2]=k;k=a[q>>0]|0;a[b+332>>0]=k&1|a[b+332>>0]&-16|k<<1&4|k<<1&8;k=c[I+16+24>>2]|0;W=c[I+16+28>>2]|0;c[b+336>>2]=c[I+16+20>>2];f[b+340>>2]=0.0;c[b+344>>2]=k;c[b+348>>2]=W;e=u*u+w*w+v*v}if((o|0)!=0?(de(I,b+4|0,b+52|0,b+20|0,I+16|0),x=+f[I+16>>2],y=+f[I+16+4>>2],z=+f[I+16+8>>2],A=x-+f[I>>2],C=y-+f[I+4>>2],B=z-+f[I+8>>2],A*A+C*C+B*B>2]|0;f[b+316>>2]=x;f[b+320>>2]=y;f[b+324>>2]=z;c[b+328>>2]=o;o=a[q>>0]|0;a[b+332>>0]=o&1|a[b+332>>0]&-16|(1?(o&255)>>>1:o&255)&2|o<<2&8;o=c[I+16+28>>2]|0;W=c[I+16+24>>2]|0;c[b+336>>2]=c[I+16+20>>2];c[b+340>>2]=o;f[b+344>>2]=0.0;c[b+348>>2]=W;e=A*A+C*C+B*B}if(p|0?(de(I,b+20|0,b+52|0,b+36|0,I+16|0),D=+f[I+16>>2],E=+f[I+16+4>>2],F=+f[I+16+8>>2],T=D-+f[I>>2],U=E-+f[I+4>>2],V=F-+f[I+8>>2],T*T+U*U+V*V>2]|0;f[b+316>>2]=D;f[b+320>>2]=E;f[b+324>>2]=F;c[b+328>>2]=p;p=a[q>>0]|0;a[b+332>>0]=p&4|a[b+332>>0]&-16|p<<1&2|p<<2&8;p=c[I+16+20>>2]|0;q=c[I+16+28>>2]|0;W=c[I+16+24>>2]|0;f[b+336>>2]=0.0;c[b+340>>2]=p;c[b+344>>2]=q;c[b+348>>2]=W}O=+f[b+336>>2];P=+f[b+340>>2];V=+f[b+344>>2];e=+f[b+348>>2];Q=+f[b+84>>2]*O+ +f[b+100>>2]*P+ +f[b+116>>2]*V+ +f[b+132>>2]*e;S=O*+f[b+88>>2]+P*+f[b+104>>2]+V*+f[b+120>>2]+e*+f[b+136>>2];U=O*+f[b+92>>2]+P*+f[b+108>>2]+V*+f[b+124>>2]+e*+f[b+140>>2];f[b+244>>2]=Q;f[b+248>>2]=S;f[b+252>>2]=U;f[b+256>>2]=0.0;R=O*+f[b+164>>2]+P*+f[b+180>>2]+V*+f[b+196>>2]+e*+f[b+212>>2];T=O*+f[b+168>>2]+P*+f[b+184>>2]+V*+f[b+200>>2]+e*+f[b+216>>2];V=O*+f[b+172>>2]+P*+f[b+188>>2]+V*+f[b+204>>2]+e*+f[b+220>>2];f[b+260>>2]=R;f[b+264>>2]=T;f[b+268>>2]=V;f[b+272>>2]=0.0;f[b+276>>2]=Q-R;f[b+280>>2]=S-T;f[b+284>>2]=U-V;f[b+288>>2]=0.0;i=c[b>>2]|0;do if((i|0)>3){d=a[b+332>>0]|0;if(!(d&8)){h=b+164+(i+-1<<4)|0;k=b+84+(i+-1<<4)|0;H=b+4+(i+-1<<4)|0;c[b>>2]=i+-1;c[b+52>>2]=c[H>>2];c[b+52+4>>2]=c[H+4>>2];c[b+52+8>>2]=c[H+8>>2];c[b+52+12>>2]=c[H+12>>2];c[b+132>>2]=c[k>>2];c[b+132+4>>2]=c[k+4>>2];c[b+132+8>>2]=c[k+8>>2];c[b+132+12>>2]=c[k+12>>2];c[b+212>>2]=c[h>>2];c[b+212+4>>2]=c[h+4>>2];c[b+212+8>>2]=c[h+8>>2];c[b+212+12>>2]=c[h+12>>2];h=b+332|0;k=i+-1|0;i=d;H=52}else{h=b+332|0;k=i;i=d;H=52}}else{if((i|0)==3){h=b+332|0;k=3;i=a[b+332>>0]|0;H=52;break}if((i|0)<=1){if((i|0)==1){d=1;H=59}}else{d=2;H=55}}while(0);if((H|0)==52){d=k+-1|0;if(!(i&4)){c[b>>2]=d;c[b+36>>2]=c[b+4+(d<<4)>>2];c[b+36+4>>2]=c[b+4+(d<<4)+4>>2];c[b+36+8>>2]=c[b+4+(d<<4)+8>>2];c[b+36+12>>2]=c[b+4+(d<<4)+12>>2];c[b+116>>2]=c[b+84+(d<<4)>>2];c[b+116+4>>2]=c[b+84+(d<<4)+4>>2];c[b+116+8>>2]=c[b+84+(d<<4)+8>>2];c[b+116+12>>2]=c[b+84+(d<<4)+12>>2];c[b+196>>2]=c[b+164+(d<<4)>>2];c[b+196+4>>2]=c[b+164+(d<<4)+4>>2];c[b+196+8>>2]=c[b+164+(d<<4)+8>>2];c[b+196+12>>2]=c[b+164+(d<<4)+12>>2];H=56}else{d=k;H=55}}if((H|0)==55){h=b+332|0;H=56}if((H|0)==56){i=d+-1|0;if(!(a[h>>0]&2)){c[b>>2]=i;c[b+20>>2]=c[b+4+(i<<4)>>2];c[b+20+4>>2]=c[b+4+(i<<4)+4>>2];c[b+20+8>>2]=c[b+4+(i<<4)+8>>2];c[b+20+12>>2]=c[b+4+(i<<4)+12>>2];c[b+100>>2]=c[b+84+(i<<4)>>2];c[b+100+4>>2]=c[b+84+(i<<4)+4>>2];c[b+100+8>>2]=c[b+84+(i<<4)+8>>2];c[b+100+12>>2]=c[b+84+(i<<4)+12>>2];c[b+180>>2]=c[b+164+(i<<4)>>2];c[b+180+4>>2]=c[b+164+(i<<4)+4>>2];c[b+180+8>>2]=c[b+164+(i<<4)+8>>2];c[b+180+12>>2]=c[b+164+(i<<4)+12>>2];d=i;H=60}else H=59}if((H|0)==59){h=b+332|0;H=60}if((H|0)==60?(G=d+-1|0,(a[h>>0]&1)==0):0){c[b>>2]=G;c[b+4>>2]=c[b+4+(G<<4)>>2];c[b+4+4>>2]=c[b+4+(G<<4)+4>>2];c[b+4+8>>2]=c[b+4+(G<<4)+8>>2];c[b+4+12>>2]=c[b+4+(G<<4)+12>>2];c[b+84>>2]=c[b+84+(G<<4)>>2];c[b+84+4>>2]=c[b+84+(G<<4)+4>>2];c[b+84+8>>2]=c[b+84+(G<<4)+8>>2];c[b+84+12>>2]=c[b+84+(G<<4)+12>>2];c[b+164>>2]=c[b+164+(G<<4)>>2];c[b+164+4>>2]=c[b+164+(G<<4)+4>>2];c[b+164+8>>2]=c[b+164+(G<<4)+8>>2];c[b+164+12>>2]=c[b+164+(G<<4)+12>>2]}if((+f[b+336>>2]>=0.0?+f[b+340>>2]>=0.0:0)?+f[b+344>>2]>=0.0:0)d=e>=0.0&1;else d=0;a[b+312>>0]=d}while(0);if((H|0)==68){a[d>>0]=0;d=0}W=d;W=W<<24>>24!=0;ea=I;return W|0}default:{a[b+312>>0]=0;W=0;W=W<<24>>24!=0;ea=I;return W|0}}return 0}function ob(b,d,e,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0.0,q=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0;_=ea;ea=ea+256|0;c[b+188>>2]=-1;Fi(15490);c[b+184>>2]=0;if((e|0)>0){l=0;do{c[(c[d+(l<<2)>>2]|0)+212>>2]=-1;l=l+1|0}while((l|0)!=(e|0))}l=c[b+12>>2]|0;if((l|0)>(e|0))n=b+8|0;else{if((e+1|0)!=0?(c[6747]=(c[6747]|0)+1,m=kb(((e+1|0)*244|3)+16|0)|0,(m|0)!=0):0){c[(m+4+15&-16)+-4>>2]=m;n=m+4+15&-16}else n=0;l=c[b+8>>2]|0;if((l|0)>0){m=0;do{W=n+(m*244|0)|0;X=c[b+16>>2]|0;V=X+(m*244|0)|0;c[W>>2]=c[V>>2];c[W+4>>2]=c[V+4>>2];c[W+8>>2]=c[V+8>>2];c[W+12>>2]=c[V+12>>2];W=X+(m*244|0)+16|0;V=n+(m*244|0)+16|0;c[V>>2]=c[W>>2];c[V+4>>2]=c[W+4>>2];c[V+8>>2]=c[W+8>>2];c[V+12>>2]=c[W+12>>2];V=X+(m*244|0)+32|0;W=n+(m*244|0)+32|0;c[W>>2]=c[V>>2];c[W+4>>2]=c[V+4>>2];c[W+8>>2]=c[V+8>>2];c[W+12>>2]=c[V+12>>2];W=n+(m*244|0)+48|0;V=X+(m*244|0)+48|0;c[W>>2]=c[V>>2];c[W+4>>2]=c[V+4>>2];c[W+8>>2]=c[V+8>>2];c[W+12>>2]=c[V+12>>2];vh(n+(m*244|0)+64|0,X+(m*244|0)+64|0,180)|0;m=m+1|0}while((m|0)!=(l|0))}l=c[b+16>>2]|0;if(l|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=n;c[b+12>>2]=e+1;l=e+1|0;n=b+8|0}hk(_|0,0,244)|0;m=c[n>>2]|0;if((m|0)<0){if((l|0)<0){l=c[b+16>>2]|0;if(l|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=0;c[b+12>>2]=0}l=m;do{X=c[b+16>>2]|0;W=X+(l*244|0)|0;c[W>>2]=c[_>>2];c[W+4>>2]=c[_+4>>2];c[W+8>>2]=c[_+8>>2];c[W+12>>2]=c[_+12>>2];W=X+(l*244|0)+16|0;c[W>>2]=c[_+16>>2];c[W+4>>2]=c[_+16+4>>2];c[W+8>>2]=c[_+16+8>>2];c[W+12>>2]=c[_+16+12>>2];W=X+(l*244|0)+32|0;c[W>>2]=c[_+32>>2];c[W+4>>2]=c[_+32+4>>2];c[W+8>>2]=c[_+32+8>>2];c[W+12>>2]=c[_+32+12>>2];W=X+(l*244|0)+48|0;c[W>>2]=c[_+48>>2];c[W+4>>2]=c[_+48+4>>2];c[W+8>>2]=c[_+48+8>>2];c[W+12>>2]=c[_+48+12>>2];vh(X+(l*244|0)+64|0,_+64|0,180)|0;l=l+1|0}while((l|0)!=0)}c[n>>2]=0;if((e|0)>0){n=0;do{l=d+(n<<2)|0;m=Kc(b,c[l>>2]|0,+f[k+12>>2])|0;l=c[l>>2]|0;if((!((l|0)==0?1:(c[l+236>>2]&2|0)==0)?+f[l+344>>2]!=0.0:0)?(o=c[b+16>>2]|0,c[l+504>>2]&2|0):0){p=+f[k+76>>2];N=1.0/+f[l+396>>2];P=1.0/+f[l+400>>2];t=1.0/+f[l+404>>2];H=+f[l+4>>2];I=+f[l+8>>2];J=+f[l+12>>2];K=+f[l+20>>2];L=+f[l+24>>2];M=+f[l+28>>2];O=+f[l+36>>2];Q=+f[l+40>>2];v=+f[l+44>>2];x=+f[l+328>>2];y=+f[l+332>>2];u=+f[l+336>>2];A=(N*H*H+P*I*I+t*J*J)*x+(N*H*K+P*I*L+t*J*M)*y+(N*H*O+P*I*Q+t*J*v)*u;z=(N*K*H+P*L*I+t*M*J)*x+(N*K*K+P*L*L+t*M*M)*y+(N*K*O+P*L*Q+t*M*v)*u;v=(N*O*H+P*Q*I+t*v*J)*x+(N*O*K+P*Q*L+t*v*M)*y+(N*O*O+P*Q*Q+t*v*v)*u;t=(x*z-y*A)*(x*z-y*A)+((y*v-u*z)*(y*v-u*z)+(u*A-x*v)*(u*A-x*v));if(t>p*p){p=1.0/+s(+t)*p;w=(y*v-u*z)*p;t=(u*A-x*v)*p;p=(x*z-y*A)*p}else{w=y*v-u*z;t=u*A-x*v;p=x*z-y*A}O=+f[k+12>>2];P=(w*+f[l+268>>2]+t*+f[l+284>>2]+p*+f[l+300>>2])*O;Q=O*(w*+f[l+272>>2]+t*+f[l+288>>2]+p*+f[l+304>>2]);f[o+(m*244|0)+224>>2]=+f[o+(m*244|0)+224>>2]-(w*+f[l+264>>2]+t*+f[l+280>>2]+p*+f[l+296>>2])*O;f[o+(m*244|0)+228>>2]=+f[o+(m*244|0)+228>>2]-P;f[o+(m*244|0)+232>>2]=+f[o+(m*244|0)+232>>2]-Q}n=n+1|0}while((n|0)!=(e|0))}if((j|0)>0){l=0;do{X=c[i+(l<<2)>>2]|0;Ca[c[(c[X>>2]|0)+8>>2]&511](X);f[X+36>>2]=0.0;l=l+1|0}while((l|0)<(j|0))}l=c[b+168>>2]|0;if((l|0)<(j|0)?(c[b+172>>2]|0)<(j|0):0){if(!j)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((j<<3|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+168>>2]|0}if((l|0)>0){n=0;do{V=(c[b+176>>2]|0)+(n<<3)|0;W=c[V+4>>2]|0;X=m+(n<<3)|0;c[X>>2]=c[V>>2];c[X+4>>2]=W;n=n+1|0}while((n|0)!=(l|0))}l=c[b+176>>2]|0;if(l|0){if(a[b+180>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[b+176>>2]=0}a[b+180>>0]=1;c[b+176>>2]=m;c[b+172>>2]=j}c[b+168>>2]=j;if((j|0)>0){q=0;l=0;do{d=c[b+176>>2]|0;e=d+(q<<3)|0;o=i+(q<<2)|0;m=c[o>>2]|0;n=c[m+44>>2]|0;if(n){m=n+64|0;do{c[n>>2]=0;n=n+4|0}while((n|0)<(m|0));m=c[o>>2]|0}if(!(a[m+20>>0]|0)){c[e>>2]=0;c[d+(q<<3)+4>>2]=0;m=0}else{Ia[c[(c[m>>2]|0)+16>>2]&127](m,e);m=c[e>>2]|0}l=m+l|0;q=q+1|0}while((q|0)<(j|0));o=l}else o=0;l=c[b+48>>2]|0;if((l|0)<(o|0)?(c[b+52>>2]|0)<(o|0):0){if(!o)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((o*152|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+48>>2]|0}if((l|0)>0){n=0;do{vh(m+(n*152|0)|0,(c[b+56>>2]|0)+(n*152|0)|0,152)|0;n=n+1|0}while((n|0)!=(l|0))}l=c[b+56>>2]|0;if(l|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=m;c[b+52>>2]=o}c[b+48>>2]=o;if((j|0)>0){l=c[b+176>>2]|0;W=0;X=0;while(1){V=l+(X<<3)|0;if(!(c[V>>2]|0))m=0;else{l=c[b+56>>2]|0;R=l+(W*152|0)|0;S=i+(X<<2)|0;o=c[S>>2]|0;d=c[o+28>>2]|0;e=c[o+32>>2]|0;T=Kc(b,d,+f[k+12>>2])|0;U=Kc(b,e,+f[k+12>>2])|0;q=c[b+16>>2]|0;m=c[o+24>>2]|0;m=(m|0)>0?m:c[k+20>>2]|0;if((m|0)>(c[b+184>>2]|0))c[b+184>>2]=m;if((c[V>>2]|0)>0){n=0;do{hk(R+(n*152|0)|0,0,152)|0;f[R+(n*152|0)+120>>2]=-3402823466385288598117041.0e14;f[R+(n*152|0)+124>>2]=3402823466385288598117041.0e14;f[R+(n*152|0)+100>>2]=0.0;f[R+(n*152|0)+96>>2]=0.0;c[R+(n*152|0)+144>>2]=T;c[R+(n*152|0)+148>>2]=U;c[R+(n*152|0)+136>>2]=m;n=n+1|0}while((n|0)<(c[V>>2]|0))}c[q+(T*244|0)+64>>2]=0;c[q+(T*244|0)+64+4>>2]=0;c[q+(T*244|0)+64+8>>2]=0;c[q+(T*244|0)+64+12>>2]=0;c[q+(T*244|0)+64+16>>2]=0;c[q+(T*244|0)+64+20>>2]=0;c[q+(T*244|0)+64+24>>2]=0;c[q+(T*244|0)+64+28>>2]=0;c[q+(T*244|0)+144>>2]=0;c[q+(T*244|0)+144+4>>2]=0;c[q+(T*244|0)+144+8>>2]=0;c[q+(T*244|0)+144+12>>2]=0;c[q+(T*244|0)+144+16>>2]=0;c[q+(T*244|0)+144+20>>2]=0;c[q+(T*244|0)+144+24>>2]=0;c[q+(T*244|0)+144+28>>2]=0;c[q+(U*244|0)+64>>2]=0;c[q+(U*244|0)+64+4>>2]=0;c[q+(U*244|0)+64+8>>2]=0;c[q+(U*244|0)+64+12>>2]=0;c[q+(U*244|0)+64+16>>2]=0;c[q+(U*244|0)+64+20>>2]=0;c[q+(U*244|0)+64+24>>2]=0;c[q+(U*244|0)+64+28>>2]=0;c[q+(U*244|0)+144>>2]=0;c[q+(U*244|0)+144+4>>2]=0;c[q+(U*244|0)+144+8>>2]=0;c[q+(U*244|0)+144+12>>2]=0;c[q+(U*244|0)+144+16>>2]=0;c[q+(U*244|0)+144+20>>2]=0;c[q+(U*244|0)+144+24>>2]=0;c[q+(U*244|0)+144+28>>2]=0;f[_>>2]=1.0/+f[k+12>>2];c[_+4>>2]=c[k+32>>2];c[_+8>>2]=l+(W*152|0)+16;c[_+12>>2]=R;c[_+16>>2]=l+(W*152|0)+48;c[_+20>>2]=l+(W*152|0)+32;c[_+24>>2]=38;c[_+28>>2]=l+(W*152|0)+112;n=l+(W*152|0)+116|0;c[n>>2]=c[k+40>>2];c[_+52>>2]=c[k+4>>2];c[_+32>>2]=n;c[_+36>>2]=l+(W*152|0)+120;c[_+40>>2]=l+(W*152|0)+124;c[_+48>>2]=c[k+20>>2];n=c[S>>2]|0;Ia[c[(c[n>>2]|0)+20>>2]&127](n,_);if((c[V>>2]|0)>0){m=0;do{l=R+(m*152|0)+124|0;p=+f[(c[S>>2]|0)+16>>2];if(+f[l>>2]>=p)f[l>>2]=p;l=R+(m*152|0)+120|0;if(+f[l>>2]<=-p)f[l>>2]=-p;c[R+(m*152|0)+132>>2]=o;n=R+(m*152|0)|0;l=c[o+28>>2]|0;p=+f[n>>2];t=+f[n+4>>2];u=+f[n+8>>2];w=(p*+f[l+280>>2]+t*+f[l+284>>2]+u*+f[l+288>>2])*+f[l+548>>2];v=(p*+f[l+296>>2]+t*+f[l+300>>2]+u*+f[l+304>>2])*+f[l+552>>2];n=R+(m*152|0)+64|0;f[n>>2]=(+f[l+264>>2]*p+ +f[l+268>>2]*t+ +f[l+272>>2]*u)*+f[l+544>>2];f[n+4>>2]=w;f[n+8>>2]=v;f[n+12>>2]=0.0;n=R+(m*152|0)+32|0;l=c[o+32>>2]|0;v=+f[n>>2];w=+f[n+4>>2];x=+f[n+8>>2];y=(v*+f[l+280>>2]+w*+f[l+284>>2]+x*+f[l+288>>2])*+f[l+548>>2];P=(v*+f[l+296>>2]+w*+f[l+300>>2]+x*+f[l+304>>2])*+f[l+552>>2];n=R+(m*152|0)+80|0;f[n>>2]=(+f[l+264>>2]*v+ +f[l+268>>2]*w+ +f[l+272>>2]*x)*+f[l+544>>2];f[n+4>>2]=y;f[n+8>>2]=P;f[n+12>>2]=0.0;n=R+(m*152|0)+16|0;P=+f[d+344>>2];y=+f[n>>2];z=+f[n+4>>2];A=+f[n+8>>2];n=R+(m*152|0)+48|0;Q=+f[e+344>>2];B=+f[n>>2];C=+f[n+4>>2];D=+f[n+8>>2];Q=y*(P*y)+z*(P*z)+A*(P*A)+(p*(p*+f[d+264>>2]+t*+f[d+268>>2]+u*+f[d+272>>2])+t*(p*+f[d+280>>2]+t*+f[d+284>>2]+u*+f[d+288>>2])+u*(p*+f[d+296>>2]+t*+f[d+300>>2]+u*+f[d+304>>2]))+(B*(Q*B)+C*(Q*C)+D*(Q*D))+(v*(v*+f[e+264>>2]+w*+f[e+268>>2]+x*+f[e+272>>2])+w*(v*+f[e+280>>2]+w*+f[e+284>>2]+x*+f[e+288>>2])+x*(v*+f[e+296>>2]+w*+f[e+300>>2]+x*+f[e+304>>2]));n=+r(+Q)>1.1920928955078125e-07;Q=n?1.0/Q:0.0;f[R+(m*152|0)+108>>2]=Q;if(!(c[q+(T*244|0)+240>>2]|0)){E=0.0;F=0.0;G=0.0;H=0.0;I=0.0;J=0.0}else{E=+f[q+(T*244|0)+208>>2];F=+f[q+(T*244|0)+212>>2];G=+f[q+(T*244|0)+216>>2];H=+f[q+(T*244|0)+224>>2];I=+f[q+(T*244|0)+228>>2];J=+f[q+(T*244|0)+232>>2]}if(!(c[q+(U*244|0)+240>>2]|0)){K=0.0;L=0.0;M=0.0;N=0.0;O=0.0;P=0.0}else{K=+f[q+(U*244|0)+208>>2];L=+f[q+(U*244|0)+212>>2];M=+f[q+(U*244|0)+216>>2];N=+f[q+(U*244|0)+224>>2];O=+f[q+(U*244|0)+228>>2];P=+f[q+(U*244|0)+232>>2]}n=R+(m*152|0)+112|0;f[n>>2]=Q*+f[n>>2]+Q*(0.0-+f[_+52>>2]*(y*(E+ +f[d+312>>2])+z*(F+ +f[d+316>>2])+A*(G+ +f[d+320>>2])+(p*(H+ +f[d+328>>2])+t*(I+ +f[d+332>>2])+u*(J+ +f[d+336>>2]))+(B*(K+ +f[e+312>>2])+C*(L+ +f[e+316>>2])+D*(M+ +f[e+320>>2])+(v*(N+ +f[e+328>>2])+w*(O+ +f[e+332>>2])+x*(P+ +f[e+336>>2])))));f[R+(m*152|0)+100>>2]=0.0;m=m+1|0}while((m|0)<(c[V>>2]|0))}l=c[b+176>>2]|0;m=c[l+(X<<3)>>2]|0}X=X+1|0;if((X|0)>=(j|0))break;else W=m+W|0}}Pa[c[(c[b>>2]|0)+28>>2]&127](b,g,h,k);d=c[b+48>>2]|0;e=c[b+28>>2]|0;q=c[b+68>>2]|0;l=c[b+128>>2]|0;if((l|0)<(d|0)?(c[b+132>>2]|0)<(d|0):0){if(!d)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((d<<2|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+128>>2]|0}o=c[b+136>>2]|0;if((l|0)<=0)if(!o)l=b+140|0;else Z=106;else{n=0;do{c[m+(n<<2)>>2]=c[o+(n<<2)>>2];n=n+1|0}while((n|0)!=(l|0));Z=106}if((Z|0)==106){if(a[b+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}c[b+136>>2]=0;l=b+140|0}a[l>>0]=1;c[b+136>>2]=m;c[b+132>>2]=d}c[b+128>>2]=d;if(!(c[k+64>>2]&16)){l=c[b+108>>2]|0;if((l|0)<(e|0)?(c[b+112>>2]|0)<(e|0):0){if(!e)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((e<<2|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+108>>2]|0}o=c[b+116>>2]|0;if((l|0)<=0)if(!o)l=b+120|0;else Z=138;else{n=0;do{c[m+(n<<2)>>2]=c[o+(n<<2)>>2];n=n+1|0}while((n|0)!=(l|0));Z=138}if((Z|0)==138){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}c[b+116>>2]=0;l=b+120|0}a[l>>0]=1;c[b+116>>2]=m;c[b+112>>2]=e}c[b+108>>2]=e}else{l=c[b+108>>2]|0;if((l|0)<(e<<1|0)?(c[b+112>>2]|0)<(e<<1|0):0){if(!e)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((e<<3|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+108>>2]|0}o=c[b+116>>2]|0;if((l|0)<=0)if(!o)l=b+120|0;else Z=122;else{n=0;do{c[m+(n<<2)>>2]=c[o+(n<<2)>>2];n=n+1|0}while((n|0)!=(l|0));Z=122}if((Z|0)==122){if(a[b+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}c[b+116>>2]=0;l=b+120|0}a[l>>0]=1;c[b+116>>2]=m;c[b+112>>2]=e<<1}c[b+108>>2]=e<<1}l=c[b+148>>2]|0;if((l|0)<(q|0)?(c[b+152>>2]|0)<(q|0):0){if(!q)m=0;else{c[6747]=(c[6747]|0)+1;l=kb((q<<2|3)+16|0)|0;if(!l)m=0;else{c[(l+4+15&-16)+-4>>2]=l;m=l+4+15&-16}l=c[b+148>>2]|0}o=c[b+156>>2]|0;if((l|0)<=0)if(!o)l=b+160|0;else Z=154;else{n=0;do{c[m+(n<<2)>>2]=c[o+(n<<2)>>2];n=n+1|0}while((n|0)!=(l|0));Z=154}if((Z|0)==154){if(a[b+160>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}c[b+156>>2]=0;l=b+160|0}a[l>>0]=1;c[b+156>>2]=m;c[b+152>>2]=q}c[b+148>>2]=q;if((d|0)>0){l=c[b+136>>2]|0;m=0;do{c[l+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(d|0))}if((e|0)>0){l=c[b+116>>2]|0;m=0;do{c[l+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(e|0))}if((q|0)>0){l=c[b+156>>2]|0;m=0;do{c[l+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(q|0))}l=c[2685]|0;b=(c[l+16>>2]|0)+-1|0;c[l+16>>2]=b;if(b|0){ea=_;return 0.0}do if(c[l+4>>2]|0){Y(_|0,0)|0;b=c[6746]|0;f[l+8>>2]=+f[l+8>>2]+ +(((c[_+4>>2]|0)-(c[b+4>>2]|0)+(((c[_>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[l+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[l+16>>2]|0)){l=c[2685]|0;break}else{ea=_;return 0.0}}while(0);c[2685]=c[l+20>>2];ea=_;return 0.0}function pb(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,x=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0;ma=ea;ea=ea+80|0;f[b+504>>2]=0.0;f[b+500>>2]=0.0;a[b+525>>0]=0;a[b+526>>0]=0;if(a[b+552>>0]|0?(a[b+527>>0]|0)==0:0){sa=+f[b+556>>2];qa=+f[b+560>>2];la=+f[b+564>>2];pa=+f[b+568>>2];$=sa*(2.0/(sa*sa+qa*qa+la*la+pa*pa));ra=qa*(2.0/(sa*sa+qa*qa+la*la+pa*pa));oa=la*(2.0/(sa*sa+qa*qa+la*la+pa*pa));aa=+f[b+300>>2];S=+f[d>>2];ba=+f[b+316>>2];T=+f[d+4>>2];ca=+f[b+332>>2];U=+f[d+8>>2];fa=+f[b+304>>2];ha=+f[b+320>>2];ja=+f[b+336>>2];Y=+f[b+308>>2];Z=+f[b+324>>2];_=+f[b+340>>2];V=+f[d+16>>2];W=+f[d+20>>2];X=+f[d+24>>2];ga=+f[d+32>>2];ia=+f[d+36>>2];ka=+f[d+40>>2];q=+f[b+348>>2];p=+f[b+352>>2];o=+f[b+356>>2];A=+f[b+364>>2];na=+f[e>>2];B=+f[b+380>>2];l=+f[e+4>>2];C=+f[b+396>>2];k=+f[e+8>>2];D=+f[b+368>>2];E=+f[b+384>>2];F=+f[b+400>>2];t=+f[b+372>>2];x=+f[b+388>>2];z=+f[b+404>>2];m=+f[e+16>>2];n=+f[e+20>>2];j=+f[e+24>>2];G=+f[e+32>>2];I=+f[e+36>>2];K=+f[e+40>>2];H=+f[b+412>>2];J=+f[b+416>>2];i=+f[b+420>>2];M=(1.0-(qa*ra+la*oa))*(A*na+B*l+C*k)+(sa*ra+pa*oa)*(na*D+l*E+k*F)+(sa*oa-pa*ra)*(na*t+l*x+k*z);N=(sa*ra-pa*oa)*(A*na+B*l+C*k)+(1.0-(sa*$+la*oa))*(na*D+l*E+k*F)+(qa*oa+pa*$)*(na*t+l*x+k*z);L=(sa*oa+pa*ra)*(A*na+B*l+C*k)+(qa*oa-pa*$)*(na*D+l*E+k*F)+(1.0-(sa*$+qa*ra))*(na*t+l*x+k*z);P=(sa*oa-pa*ra)*(t*m+x*n+z*j)+((1.0-(qa*ra+la*oa))*(A*m+B*n+C*j)+(sa*ra+pa*oa)*(D*m+E*n+F*j));R=(qa*oa+pa*$)*(t*m+x*n+z*j)+((sa*ra-pa*oa)*(A*m+B*n+C*j)+(1.0-(sa*$+la*oa))*(D*m+E*n+F*j));O=(1.0-(sa*$+qa*ra))*(t*m+x*n+z*j)+((sa*oa+pa*ra)*(A*m+B*n+C*j)+(qa*oa-pa*$)*(D*m+E*n+F*j));da=(sa*oa-pa*ra)*(t*G+x*I+z*K)+((1.0-(qa*ra+la*oa))*(A*G+B*I+C*K)+(sa*ra+pa*oa)*(D*G+E*I+F*K));la=(qa*oa+pa*$)*(t*G+x*I+z*K)+((sa*ra-pa*oa)*(A*G+B*I+C*K)+(1.0-(sa*$+la*oa))*(D*G+E*I+F*K));$=(1.0-(sa*$+qa*ra))*(t*G+x*I+z*K)+((sa*oa+pa*ra)*(A*G+B*I+C*K)+(qa*oa-pa*$)*(D*G+E*I+F*K));pa=-(+f[d+48>>2]+(S*q+T*p+U*o));oa=-(V*q+W*p+X*o+ +f[d+52>>2]);o=-(ga*q+ia*p+ka*o+ +f[d+56>>2]);p=(aa*S+ba*T+ca*U)*pa+(aa*V+ba*W+ca*X)*oa+(aa*ga+ba*ia+ca*ka)*o;q=(S*fa+T*ha+U*ja)*pa+(fa*V+ha*W+ja*X)*oa+(fa*ga+ha*ia+ja*ka)*o;o=(S*Y+T*Z+U*_)*pa+(Y*V+Z*W+_*X)*oa+(Y*ga+Z*ia+_*ka)*o;k=o*L+(p*M+q*N)+((A*na+B*l+C*k)*0.0+(na*D+l*E+k*F)*0.0+(na*t+l*x+k*z)*0.0+(+f[e+48>>2]+(na*H+l*J+k*i)));j=o*O+(p*P+q*R)+((t*m+x*n+z*j)*0.0+((A*m+B*n+C*j)*0.0+(D*m+E*n+F*j)*0.0)+(m*H+n*J+j*i+ +f[e+52>>2]));i=o*$+(p*da+q*la)+((t*G+x*I+z*K)*0.0+((A*G+B*I+C*K)*0.0+(D*G+E*I+F*K)*0.0)+(G*H+I*J+K*i+ +f[e+56>>2]));f[ma+16>>2]=(S*Y+T*Z+U*_)*L+((aa*S+ba*T+ca*U)*M+(S*fa+T*ha+U*ja)*N);f[ma+16+4>>2]=(Y*V+Z*W+_*X)*L+((aa*V+ba*W+ca*X)*M+(fa*V+ha*W+ja*X)*N);f[ma+16+8>>2]=(Y*ga+Z*ia+_*ka)*L+((aa*ga+ba*ia+ca*ka)*M+(fa*ga+ha*ia+ja*ka)*N);f[ma+16+12>>2]=0.0;f[ma+16+16>>2]=(S*Y+T*Z+U*_)*O+((aa*S+ba*T+ca*U)*P+(S*fa+T*ha+U*ja)*R);f[ma+16+20>>2]=(Y*V+Z*W+_*X)*O+((aa*V+ba*W+ca*X)*P+(fa*V+ha*W+ja*X)*R);f[ma+16+24>>2]=(Y*ga+Z*ia+_*ka)*O+((aa*ga+ba*ia+ca*ka)*P+(fa*ga+ha*ia+ja*ka)*R);f[ma+16+28>>2]=0.0;f[ma+16+32>>2]=(S*Y+T*Z+U*_)*$+((aa*S+ba*T+ca*U)*da+(S*fa+T*ha+U*ja)*la);f[ma+16+36>>2]=(Y*V+Z*W+_*X)*$+((aa*V+ba*W+ca*X)*da+(fa*V+ha*W+ja*X)*la);f[ma+16+40>>2]=(Y*ga+Z*ia+_*ka)*$+((aa*ga+ba*ia+ca*ka)*da+(fa*ga+ha*ia+ja*ka)*la);f[ma+16+44>>2]=0.0;f[ma+16+48>>2]=k;f[ma+16+52>>2]=j;f[ma+16+56>>2]=i;f[ma+16+60>>2]=0.0;Gg(ma+16|0,ma);i=+f[ma>>2];j=+f[ma+4>>2];k=+f[ma+8>>2];if(!(+r(+(i*i+j*j+k*k))<1.1920928955078125e-07)?(f[b+472>>2]=0.0,sa=1.0/+s(+(i*i+j*j+k*k)),f[b+460>>2]=sa*i,f[b+464>>2]=sa*j,f[b+468>>2]=sa*k,sa=+f[ma+12>>2],sa=sa<-1.0?-1.0:sa,sa=+w(+(sa>1.0?1.0:sa))*2.0,f[b+504>>2]=sa,!(+r(+sa)<1.1920928955078125e-07)):0)a[b+526>>0]=1;ea=ma;return}Gg(d,ma+16|0);Gg(b+300|0,ma);U=+f[ma+16+12>>2];V=+f[ma>>2];W=+f[ma+16>>2];X=+f[ma+12>>2];Y=+f[ma+16+4>>2];Z=+f[ma+8>>2];_=+f[ma+16+8>>2];$=+f[ma+4>>2];Gg(e,ma+16|0);Gg(b+364|0,ma);aa=+f[ma+16+12>>2];ba=+f[ma>>2];ca=+f[ma+16>>2];da=+f[ma+12>>2];fa=+f[ma+16+4>>2];ga=+f[ma+8>>2];ha=+f[ma+16+8>>2];ia=+f[ma+4>>2];ja=-(aa*ba+ca*da+fa*ga-ha*ia);ka=-(ba*ha+(da*fa+aa*ia)-ca*ga);la=-(aa*ga+da*ha+ca*ia-ba*fa);p=(U*X-V*W-Y*$-Z*_)*ja+(U*V+W*X+Y*Z-_*$)*(aa*da-ba*ca-fa*ia-ga*ha)+(U*Z+X*_+W*$-V*Y)*ka-(V*_+(X*Y+U*$)-W*Z)*la;q=(U*V+W*X+Y*Z-_*$)*la+((V*_+(X*Y+U*$)-W*Z)*(aa*da-ba*ca-fa*ia-ga*ha)+(U*X-V*W-Y*$-Z*_)*ka)-(U*Z+X*_+W*$-V*Y)*ja;t=(V*_+(X*Y+U*$)-W*Z)*ja+((U*Z+X*_+W*$-V*Y)*(aa*da-ba*ca-fa*ia-ga*ha)+(U*X-V*W-Y*$-Z*_)*la)-(U*V+W*X+Y*Z-_*$)*ka;x=(U*X-V*W-Y*$-Z*_)*(aa*da-ba*ca-fa*ia-ga*ha)-(U*V+W*X+Y*Z-_*$)*ja-(V*_+(X*Y+U*$)-W*Z)*ka-(U*Z+X*_+W*$-V*Y)*la;l=-p-q*0.0-t*0.0;k=(t+x*0.0-p*0.0)*-t+(x*(x+q*0.0-t*0.0)+l*-p)-(x*0.0+p*0.0-q)*-q;i=(x*0.0+p*0.0-q)*-p+(x*(t+x*0.0-p*0.0)+l*-q)-(x+q*0.0-t*0.0)*-t;l=(x+q*0.0-t*0.0)*-q+(x*(x*0.0+p*0.0-q)+l*-t)-(t+x*0.0-p*0.0)*-p;j=1.0/+s(+(l*l+(k*k+i*i)));if(l*j*0.0+(i*j*0.0+k*j)<-.9999998807907104){m=-0.0;n=0.0;o=0.0;i=1.0}else{sa=+s(+((l*j*0.0+(i*j*0.0+k*j)+1.0)*2.0));m=(l*j*0.0-i*j*0.0)*(1.0/sa);n=(i*j-k*j*0.0)*(1.0/sa);o=sa*.5;i=(k*j*0.0-l*j)*(1.0/sa)}k=1.0/+s(+(m*m+i*i+n*n+o*o));z=m*k;A=i*k;m=n*k;k=o*k;T=1.0/+s(+((x*k-p*-z-q*-A-t*-m)*(x*k-p*-z-q*-A-t*-m)+((q*-z+(t*k+x*-m)-p*-A)*(q*-z+(t*k+x*-m)-p*-A)+((t*-A+(p*k+x*-z)-q*-m)*(t*-A+(p*k+x*-z)-q*-m)+(p*-m+(x*-A+q*k)-t*-z)*(p*-m+(x*-A+q*k)-t*-z)))));j=(t*-A+(p*k+x*-z)-q*-m)*T;l=(p*-m+(x*-A+q*k)-t*-z)*T;i=(q*-z+(t*k+x*-m)-p*-A)*T;T=(x*k-p*-z-q*-A-t*-m)*T;S=+f[b+444>>2];R=+f[b+456>>2];if(S>=R?(B=+f[b+448>>2],B>=R):0){t=k<-1.0?-1.0:k;t=+w(+(t>1.0?1.0:t))*2.0;if(t>1.1920928955078125e-07){k=1.0/+s(+(m*m+(z*z+A*A)));if(+r(+(A*k))>1.1920928955078125e-07){q=+s(+((m*k*(m*k)/(A*k*(A*k))+1.0)/(m*k*(m*k)/(A*k*(A*k))/(S*S)+1.0/(B*B))));n=z*k;m=m*k;k=A*k}else{q=S;n=z*k;m=m*k;k=A*k}}else{q=0.0;n=0.0;m=0.0;k=0.0}o=+f[b+428>>2];p=q*o;if(t>p){a[b+526>>0]=1;if(t>2]=o;f[b+504>>2]=t-p;if(+r(+k)>1.1920928955078125e-07){sa=+r(+(k*(B/S*(-m/k))));m=m<-0.0?sa:-sa;sa=1.0/+s(+(n*n+k*k+m*m));n=n*sa;m=-(m*sa);k=k*sa}ra=-n;qa=-k;oa=-m;na=(aa*da-ba*ca-fa*ia-ga*ha)*ra+(ba*ha+(da*fa+aa*ia)-ca*ga)*oa-(aa*ga+da*ha+ca*ia-ba*fa)*qa;sa=(aa*ga+da*ha+ca*ia-ba*fa)*ra+(aa*da-ba*ca-fa*ia-ga*ha)*qa-(aa*ba+ca*da+fa*ga-ha*ia)*oa;pa=(aa*ba+ca*da+fa*ga-ha*ia)*qa+(aa*da-ba*ca-fa*ia-ga*ha)*oa-(ba*ha+(da*fa+aa*ia)-ca*ga)*ra;oa=-((aa*ba+ca*da+fa*ga-ha*ia)*ra)-(ba*ha+(da*fa+aa*ia)-ca*ga)*qa-(aa*ga+da*ha+ca*ia-ba*fa)*oa;qa=sa*la+(oa*ja+(aa*da-ba*ca-fa*ia-ga*ha)*na)-pa*ka;ra=pa*ja+((aa*da-ba*ca-fa*ia-ga*ha)*sa+oa*ka)-na*la;sa=na*ka+(oa*la+(aa*da-ba*ca-fa*ia-ga*ha)*pa)-sa*ja;f[b+460>>2]=qa;f[b+464>>2]=ra;f[b+468>>2]=sa;f[b+472>>2]=0.0;c[b+536>>2]=0;c[b+536+4>>2]=0;c[b+536+8>>2]=0;c[b+536+12>>2]=0;f[b+492>>2]=1.0/(qa*(+f[g>>2]*qa+ +f[g+16>>2]*ra+ +f[g+32>>2]*sa)+ra*(qa*+f[g+4>>2]+ra*+f[g+20>>2]+sa*+f[g+36>>2])+sa*(qa*+f[g+8>>2]+ra*+f[g+24>>2]+sa*+f[g+40>>2])+(qa*(qa*+f[h>>2]+ra*+f[h+16>>2]+sa*+f[h+32>>2])+ra*(qa*+f[h+4>>2]+ra*+f[h+20>>2]+sa*+f[h+36>>2])+sa*(qa*+f[h+8>>2]+ra*+f[h+24>>2]+sa*+f[h+40>>2])))}}else Q=20;a:do if((Q|0)==20){F=+f[b+300>>2];G=+f[b+316>>2];H=+f[b+332>>2];I=+f[d>>2];J=+f[d+4>>2];K=+f[d+8>>2];L=+f[d+16>>2];M=+f[d+20>>2];N=+f[d+24>>2];O=+f[d+32>>2];P=+f[d+36>>2];q=+f[d+40>>2];t=+f[b+304>>2];x=+f[b+320>>2];z=+f[b+336>>2];A=+f[b+308>>2];B=+f[b+324>>2];C=+f[b+340>>2];m=+f[b+364>>2];n=+f[b+380>>2];p=+f[b+396>>2];E=m*+f[e>>2]+n*+f[e+4>>2]+p*+f[e+8>>2];D=m*+f[e+16>>2]+n*+f[e+20>>2]+p*+f[e+24>>2];p=m*+f[e+32>>2]+n*+f[e+36>>2]+p*+f[e+40>>2];n=(F*I+G*J+H*K)*E+(F*L+G*M+H*N)*D+(F*O+G*P+H*q)*p;m=(I*t+J*x+K*z)*E+(L*t+M*x+N*z)*D+(O*t+P*x+q*z)*p;k=(I*A+J*B+K*C)*E+(L*A+M*B+N*C)*D+(O*A+P*B+q*C)*p;do if(S>2];if(o>0]=1;f[b+460>>2]=-((F*O+G*P+H*q)*D-(F*L+G*M+H*N)*p);f[b+464>>2]=-((F*I+G*J+H*K)*p-(F*O+G*P+H*q)*E);f[b+468>>2]=-((F*L+G*M+H*N)*E-(F*I+G*J+H*K)*D);f[b+472>>2]=0.0;break a}if(!(+r(+n)<1.1920928955078125e-07&+r(+k)<1.1920928955078125e-07)?(a[b+526>>0]=1,o>=R):0){m=+y(+k,+n);if(m>o){n=+u(+o);m=0.0;k=+v(+o);break}if(m<-o){n=+u(+o);m=0.0;k=-+v(+o)}else m=0.0}}else if(!(+r(+n)<1.1920928955078125e-07&+r(+m)<1.1920928955078125e-07)?(a[b+526>>0]=1,S>=R):0){k=+y(+m,+n);if(k>S){n=+u(+S);m=+v(+S);k=0.0;break}if(k<-S){n=+u(+S);m=-+v(+S);k=0.0}else k=0.0}while(0);qa=(I*A+J*B+K*C)*k+((I*t+J*x+K*z)*m+(F*I+G*J+H*K)*n);pa=(L*A+M*B+N*C)*k+((L*t+M*x+N*z)*m+(F*L+G*M+H*N)*n);oa=(O*A+P*B+q*C)*k+((O*t+P*x+q*z)*m+(F*O+G*P+H*q)*n);ra=1.0/+s(+(oa*oa+(qa*qa+pa*pa)));f[b+472>>2]=0.0;sa=+s(+((D*(oa*ra)-p*(pa*ra))*(D*(oa*ra)-p*(pa*ra))+(p*(qa*ra)-E*(oa*ra))*(p*(qa*ra)-E*(oa*ra))+(E*(pa*ra)-D*(qa*ra))*(E*(pa*ra)-D*(qa*ra))));f[b+504>>2]=sa;f[b+460>>2]=-((D*(oa*ra)-p*(pa*ra))*(1.0/sa));f[b+464>>2]=-((p*(qa*ra)-E*(oa*ra))*(1.0/sa));f[b+468>>2]=-((E*(pa*ra)-D*(qa*ra))*(1.0/sa))}while(0);o=+f[b+452>>2];if(!(o>=0.0)){f[b+512>>2]=0.0;ea=ma;return}k=T<-1.0?-1.0:T;k=+w(+(k>1.0?1.0:k))*2.0;if(k>3.1415927410125732){n=-T<-1.0?-1.0:-T;j=-j;l=-l;i=-i;n=+w(+(n>1.0?1.0:n))*2.0}else n=k;f[b+512>>2]=n;if(n>1.1920928955078125e-07){sa=1.0/+s(+(j*j+l*l+i*i));j=j*sa;m=i*sa;l=l*sa}else m=i;i=+f[b+428>>2];if(n>o*i){a[b+525>>0]=1;k=n-o*i;if(n>2]=i;f[b+508>>2]=k;ra=-j;qa=-l;oa=-m;na=(aa*da-ba*ca-fa*ia-ga*ha)*ra+(ba*ha+(da*fa+aa*ia)-ca*ga)*oa-(aa*ga+da*ha+ca*ia-ba*fa)*qa;sa=(aa*ga+da*ha+ca*ia-ba*fa)*ra+(aa*da-ba*ca-fa*ia-ga*ha)*qa-(aa*ba+ca*da+fa*ga-ha*ia)*oa;pa=(aa*ba+ca*da+fa*ga-ha*ia)*qa+(aa*da-ba*ca-fa*ia-ga*ha)*oa-(ba*ha+(da*fa+aa*ia)-ca*ga)*ra;oa=-((aa*ba+ca*da+fa*ga-ha*ia)*ra)-(ba*ha+(da*fa+aa*ia)-ca*ga)*qa-(aa*ga+da*ha+ca*ia-ba*fa)*oa;qa=sa*la+(oa*ja+(aa*da-ba*ca-fa*ia-ga*ha)*na)-pa*ka;ra=pa*ja+((aa*da-ba*ca-fa*ia-ga*ha)*sa+oa*ka)-na*la;sa=na*ka+(oa*la+(aa*da-ba*ca-fa*ia-ga*ha)*pa)-sa*ja;f[b+476>>2]=qa;f[b+480>>2]=ra;f[b+484>>2]=sa;f[b+488>>2]=0.0;f[b+496>>2]=1.0/(qa*(+f[g>>2]*qa+ +f[g+16>>2]*ra+ +f[g+32>>2]*sa)+ra*(qa*+f[g+4>>2]+ra*+f[g+20>>2]+sa*+f[g+36>>2])+sa*(qa*+f[g+8>>2]+ra*+f[g+24>>2]+sa*+f[g+40>>2])+(qa*(qa*+f[h>>2]+ra*+f[h+16>>2]+sa*+f[h+32>>2])+ra*(qa*+f[h+4>>2]+ra*+f[h+20>>2]+sa*+f[h+36>>2])+sa*(qa*+f[h+8>>2]+ra*+f[h+24>>2]+sa*+f[h+40>>2])))}if(!(a[b+526>>0]|0)){ea=ma;return}na=-j;sa=-l;oa=-m;la=(U*X-V*W-Y*$-Z*_)*na+(V*_+(X*Y+U*$)-W*Z)*oa-(U*Z+X*_+W*$-V*Y)*sa;ra=(U*Z+X*_+W*$-V*Y)*na+(U*X-V*W-Y*$-Z*_)*sa-(U*V+W*X+Y*Z-_*$)*oa;qa=(U*V+W*X+Y*Z-_*$)*sa+(U*X-V*W-Y*$-Z*_)*oa-(V*_+(X*Y+U*$)-W*Z)*na;oa=-((U*V+W*X+Y*Z-_*$)*na)-(V*_+(X*Y+U*$)-W*Z)*sa-(U*Z+X*_+W*$-V*Y)*oa;sa=-(U*V+W*X+Y*Z-_*$);na=-(V*_+(X*Y+U*$)-W*Z);pa=-(U*Z+X*_+W*$-V*Y);f[b+536>>2]=ra*pa+(oa*sa+(U*X-V*W-Y*$-Z*_)*la)-qa*na;f[b+540>>2]=qa*sa+((U*X-V*W-Y*$-Z*_)*ra+oa*na)-la*pa;f[b+544>>2]=la*na+(oa*pa+(U*X-V*W-Y*$-Z*_)*qa)-ra*sa;f[b+548>>2]=0.0;ea=ma;return}function qb(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,h=0,i=0.0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0,p=0.0,q=0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0,ma=0,na=0;ma=c[b+28>>2]|0;na=c[b+32>>2]|0;la=c[d+24>>2]|0;if(!(a[b+739>>0]|0)){k=+f[b+552>>2];R=+f[ma+4>>2];l=+f[b+568>>2];S=+f[ma+8>>2];n=+f[b+584>>2];T=+f[ma+12>>2];p=+f[b+556>>2];t=+f[b+572>>2];u=+f[b+588>>2];U=+f[b+560>>2];V=+f[b+576>>2];W=+f[b+592>>2];X=+f[ma+20>>2];Y=+f[ma+24>>2];Z=+f[ma+28>>2];_=+f[ma+36>>2];$=+f[ma+40>>2];aa=+f[ma+44>>2];v=+f[b+600>>2];w=+f[b+604>>2];x=+f[b+608>>2];y=+f[ma+52>>2];z=+f[ma+56>>2];A=+f[ma+60>>2];B=+f[na+4>>2];C=+f[na+8>>2];D=+f[na+12>>2];E=+f[b+624>>2];F=+f[b+640>>2];G=+f[b+656>>2];H=+f[na+20>>2];I=+f[na+24>>2];J=+f[na+28>>2];K=+f[na+36>>2];L=+f[na+40>>2];M=+f[na+44>>2];ja=+f[b+664>>2];ka=+f[b+668>>2];O=+f[b+672>>2];N=+f[na+52>>2]+(B*ja+C*ka+D*O);P=H*ja+I*ka+J*O+ +f[na+56>>2];O=K*ja+L*ka+M*O+ +f[na+60>>2];j=(a[b+736>>0]|0)==0;if(j){h=c[d+8>>2]|0;f[h>>2]=1.0;f[h+(la+1<<2)>>2]=1.0;f[h+((la<<1)+2<<2)>>2]=1.0;h=c[d+16>>2]|0;f[h>>2]=-1.0;f[h+(la+1<<2)>>2]=-1.0;f[h+((la<<1)+2<<2)>>2]=-1.0;e=+f[ma+52>>2];g=+f[ma+56>>2];i=+f[ma+60>>2];h=la<<1}else{e=y;g=z;i=A;h=la<<1}e=y+(R*v+S*w+T*x)-e;ka=X*v+Y*w+Z*x+z-g;ja=_*v+$*w+aa*x+A-i;m=c[d+12>>2]|0;o=m+(h<<2)|0;c[m>>2]=0;f[m+4>>2]=ja;f[m+8>>2]=-ka;f[m+12>>2]=0.0;f[m+(la<<2)>>2]=-ja;c[m+(la<<2)+4>>2]=0;f[m+(la<<2)+8>>2]=e;f[m+(la<<2)+12>>2]=0.0;f[o>>2]=ka;f[o+4>>2]=-e;c[o+8>>2]=0;f[o+12>>2]=0.0;e=N-+f[na+52>>2];ka=P-+f[na+56>>2];ja=O-+f[na+60>>2];o=c[d+20>>2]|0;Q=o+(h<<2)|0;c[o>>2]=0;f[o+4>>2]=-ja;f[o+8>>2]=ka;f[o+12>>2]=0.0;f[o+(la<<2)>>2]=ja;c[o+(la<<2)+4>>2]=0;f[o+(la<<2)+8>>2]=-e;f[o+(la<<2)+12>>2]=0.0;f[Q>>2]=-ka;f[Q+4>>2]=e;c[Q+8>>2]=0;f[Q+12>>2]=0.0;e=+f[d>>2]*+f[d+4>>2];Q=c[d+28>>2]|0;if(j){f[Q>>2]=e*(N-(y+(R*v+S*w+T*x)));f[Q+(la<<2)>>2]=e*(P-(X*v+Y*w+Z*x+z));f[Q+(la<<1<<2)>>2]=e*(O-(_*v+$*w+aa*x+A))}f[m+(la*3<<2)>>2]=k*R+l*S+n*T;f[m+((la*3|0)+1<<2)>>2]=k*X+l*Y+n*Z;f[m+((la*3|0)+2<<2)>>2]=k*_+l*$+n*aa;f[m+(la<<2<<2)>>2]=R*p+S*t+T*u;f[m+((la<<2|1)<<2)>>2]=p*X+t*Y+u*Z;f[m+((la<<2|2)<<2)>>2]=p*_+t*$+u*aa;f[o+(la*3<<2)>>2]=-(k*R+l*S+n*T);f[o+((la*3|0)+1<<2)>>2]=-(k*X+l*Y+n*Z);f[o+((la*3|0)+2<<2)>>2]=-(k*_+l*$+n*aa);f[o+(la<<2<<2)>>2]=-(R*p+S*t+T*u);f[o+((la<<2|1)<<2)>>2]=-(p*X+t*Y+u*Z);f[o+((la<<2|2)<<2)>>2]=-(p*_+t*$+u*aa);ja=(U*X+V*Y+W*Z)*(E*K+F*L+G*M)-(U*_+V*$+W*aa)*(E*H+F*I+G*J);ka=(U*_+V*$+W*aa)*(B*E+C*F+D*G)-(R*U+S*V+T*W)*(E*K+F*L+G*M);ia=(R*U+S*V+T*W)*(E*H+F*I+G*J)-(U*X+V*Y+W*Z)*(B*E+C*F+D*G);f[Q+(la*3<<2)>>2]=((k*_+l*$+n*aa)*ia+((k*R+l*S+n*T)*ja+(k*X+l*Y+n*Z)*ka))*e;f[Q+(la<<2<<2)>>2]=((p*_+t*$+u*aa)*ia+((R*p+S*t+T*u)*ja+(p*X+t*Y+u*Z)*ka))*e;if(!(a[b+716>>0]|0)){r=0;p=0.0}else{p=+f[b+708>>2]*+f[b+732>>2];r=p>0.0?1:2}h=a[b+737>>0]|0;q=(r|0)!=0;if(!(r|h&255))return;f[m+(la*5<<2)>>2]=R*U+S*V+T*W;f[m+((la*5|0)+1<<2)>>2]=U*X+V*Y+W*Z;f[m+((la*5|0)+2<<2)>>2]=U*_+V*$+W*aa;f[o+(la*5<<2)>>2]=-(R*U+S*V+T*W);f[o+((la*5|0)+1<<2)>>2]=-(U*X+V*Y+W*Z);f[o+((la*5|0)+2<<2)>>2]=-(U*_+V*$+W*aa);e=+f[b+688>>2];g=+f[b+692>>2];if(!((e-g)%6.2831854820251465<-3.1415927410125732))if((e-g)%6.2831854820251465>3.1415927410125732)n=(e-g)%6.2831854820251465+-6.2831854820251465;else n=(e-g)%6.2831854820251465;else n=(e-g)%6.2831854820251465+6.2831854820251465;if(!((e+g)%6.2831854820251465<-3.1415927410125732))if((e+g)%6.2831854820251465>3.1415927410125732)l=(e+g)%6.2831854820251465+-6.2831854820251465;else l=(e+g)%6.2831854820251465;else l=(e+g)%6.2831854820251465+6.2831854820251465;m=n==l;o=Q+(la*5<<2)|0;f[o>>2]=0.0;j=c[b+748>>2]|0;k=+f[((j&2|0)==0?d+4|0:b+760|0)>>2];if(!(h<<24>>24==0|q&m)){if(j&4|0)c[(c[d+32>>2]|0)+(la*5<<2)>>2]=c[b+752>>2];g=+f[b+728>>2];i=+f[b+680>>2];e=n>l?1.0:0.0;do if(!(n>=l)){e=i/(k*+f[d>>2]);if(e<0.0)if(g>=n&n-e>g){e=(n-g)/e;break}else{e=g0.0)if(g<=l&l-el?0.0:1.0;break}else e=0.0}while(0);f[o>>2]=e*i*+f[b+732>>2]+ +f[o>>2];f[(c[d+36>>2]|0)+(la*5<<2)>>2]=-+f[b+684>>2];c[(c[d+40>>2]|0)+(la*5<<2)>>2]=c[b+684>>2]}if(!q)return;f[o>>2]=+f[o>>2]+p*(k*+f[d>>2]);if(j&1|0)c[(c[d+32>>2]|0)+(la*5<<2)>>2]=c[b+756>>2];do if(!m){h=(c[d+36>>2]|0)+(la*5<<2)|0;if((r|0)==1){f[h>>2]=0.0;e=3402823466385288598117041.0e14;break}else{f[h>>2]=-3402823466385288598117041.0e14;e=0.0;break}}else{f[(c[d+36>>2]|0)+(la*5<<2)>>2]=-3402823466385288598117041.0e14;e=3402823466385288598117041.0e14}while(0);f[(c[d+40>>2]|0)+(la*5<<2)>>2]=e;g=+f[b+704>>2];do if(g>0.0){e=(R*U+S*V+T*W)*+f[ma+328>>2]+(U*X+V*Y+W*Z)*+f[ma+332>>2]+(U*_+V*$+W*aa)*+f[ma+336>>2]-((R*U+S*V+T*W)*+f[na+328>>2]+(U*X+V*Y+W*Z)*+f[na+332>>2]+(U*_+V*$+W*aa)*+f[na+336>>2]);if((r|0)==1){if(!(e<0.0))break;if(!(+f[o>>2]<-(g*e)))break;f[o>>2]=-(g*e);break}else{if(!(e>0.0))break;if(!(+f[o>>2]>-(g*e)))break;f[o>>2]=-(g*e);break}}while(0);f[o>>2]=+f[b+700>>2]*+f[o>>2];return}ea=+f[ma+4>>2];fa=+f[ma+8>>2];ga=+f[ma+12>>2];n=+f[b+556>>2];p=+f[b+572>>2];t=+f[b+588>>2];K=+f[b+560>>2];L=+f[b+576>>2];M=+f[b+592>>2];N=+f[ma+20>>2];O=+f[ma+24>>2];P=+f[ma+28>>2];R=+f[ma+36>>2];S=+f[ma+40>>2];T=+f[ma+44>>2];B=+f[b+600>>2];D=+f[b+604>>2];C=+f[b+608>>2];g=+f[ma+52>>2];u=+f[ma+56>>2];k=+f[ma+60>>2];U=+f[na+4>>2];V=+f[na+8>>2];W=+f[na+12>>2];X=+f[b+624>>2];Y=+f[b+640>>2];Z=+f[b+656>>2];_=+f[na+20>>2];$=+f[na+24>>2];aa=+f[na+28>>2];ba=+f[na+36>>2];ca=+f[na+40>>2];da=+f[na+44>>2];A=+f[b+664>>2];z=+f[b+668>>2];e=+f[b+672>>2];i=+f[na+52>>2];v=+f[na+56>>2];l=+f[na+60>>2];F=i+(U*A+V*z+W*e)-(g+(ea*B+fa*D+ga*C));H=_*A+$*z+aa*e+v-(N*B+O*D+P*C+u);G=ba*A+ca*z+da*e+l-(R*B+S*D+T*C+k);w=+f[(c[b+28>>2]|0)+344>>2];x=+f[(c[b+32>>2]|0)+344>>2];E=w+x>0.0?x/(w+x):.5;ha=(ea*K+fa*L+ga*M)*E+(U*X+V*Y+W*Z)*(1.0-E);ja=(K*N+L*O+M*P)*E+(X*_+Y*$+Z*aa)*(1.0-E);ia=(K*R+L*S+M*T)*E+(X*ba+Y*ca+Z*da)*(1.0-E);ka=1.0/+s(+(ia*ia+(ha*ha+ja*ja)));y=(ba*A+ca*z+da*e+l-l)*(ia*ka)+((i+(U*A+V*z+W*e)-i)*(ha*ka)+(_*A+$*z+aa*e+v-v)*(ja*ka));i=i+(U*A+V*z+W*e)-i-ha*ka*y;v=_*A+$*z+aa*e+v-v-ja*ka*y;l=ba*A+ca*z+da*e+l-l-ia*ka*y;e=(R*B+S*D+T*C+k-k)*(ia*ka)+((g+(ea*B+fa*D+ga*C)-g)*(ha*ka)+(N*B+O*D+P*C+u-u)*(ja*ka));g=g+(ea*B+fa*D+ga*C)-g-ha*ka*e;u=N*B+O*D+P*C+u-u-ja*ka*e;k=R*B+S*D+T*C+k-k-ia*ka*e;C=g+E*(ha*ka*e-ha*ka*y);D=u+E*(ja*ka*e-ja*ka*y);B=k+E*(ia*ka*e-ia*ka*y);z=i-(1.0-E)*(ha*ka*e-ha*ka*y);A=v-(1.0-E)*(ja*ka*e-ja*ka*y);y=l-(1.0-E)*(ia*ka*e-ia*ka*y);e=(E*l+(1.0-E)*k)*(E*l+(1.0-E)*k)+((E*i+(1.0-E)*g)*(E*i+(1.0-E)*g)+(E*v+(1.0-E)*u)*(E*v+(1.0-E)*u));if(e>1.1920928955078125e-07){p=1.0/+s(+e);J=(E*i+(1.0-E)*g)*p;I=(E*l+(1.0-E)*k)*p;p=(E*v+(1.0-E)*u)*p}else{J=ea*n+fa*p+ga*t;I=n*R+p*S+t*T;p=n*N+p*O+t*P}t=ja*ka*I-ia*ka*p;u=ia*ka*J-ha*ka*I;v=ha*ka*p-ja*ka*J;Q=c[d+12>>2]|0;f[Q>>2]=D*I-B*p;f[Q+4>>2]=B*J-C*I;f[Q+8>>2]=C*p-D*J;Q=c[d+20>>2]|0;f[Q>>2]=-(A*I-y*p);f[Q+4>>2]=-(y*J-z*I);f[Q+8>>2]=-(z*p-A*J);if(w<1.1920928955078125e-07|x<1.1920928955078125e-07?(a[b+716>>0]|0)!=0:0){e=(1.0-E)*(A*v-y*u);g=(1.0-E)*(y*t-z*v);i=(1.0-E)*(z*u-A*t);k=E*(D*v-B*u);l=E*(B*t-C*v);n=E*(C*u-D*t)}else{e=A*v-y*u;g=y*t-z*v;i=z*u-A*t;k=D*v-B*u;l=B*t-C*v;n=C*u-D*t}Q=(c[d+12>>2]|0)+(la<<2)|0;f[Q>>2]=k;f[Q+4>>2]=l;f[Q+8>>2]=n;Q=c[d+20>>2]|0;f[Q+(la<<2)>>2]=-e;f[Q+(la+1<<2)>>2]=-g;f[Q+(la+2<<2)>>2]=-i;if(w<1.1920928955078125e-07|x<1.1920928955078125e-07){n=(1.0-E)*(A*(ia*ka)-y*(ja*ka));l=(1.0-E)*(y*(ha*ka)-z*(ia*ka));k=(1.0-E)*(z*(ja*ka)-A*(ha*ka));i=E*(D*(ia*ka)-B*(ja*ka));g=E*(B*(ha*ka)-C*(ia*ka));e=E*(C*(ja*ka)-D*(ha*ka))}else{n=A*(ia*ka)-y*(ja*ka);l=y*(ha*ka)-z*(ia*ka);k=z*(ja*ka)-A*(ha*ka);i=D*(ia*ka)-B*(ja*ka);g=B*(ha*ka)-C*(ia*ka);e=C*(ja*ka)-D*(ha*ka)}h=(c[d+12>>2]|0)+(la<<1<<2)|0;f[h>>2]=i;f[h+4>>2]=g;f[h+8>>2]=e;h=c[d+20>>2]|0;f[h+(la<<1<<2)>>2]=-n;f[h+((la<<1|1)<<2)>>2]=-l;f[h+((la<<1)+2<<2)>>2]=-k;e=+f[d>>2]*+f[d+4>>2];if(!(a[b+736>>0]|0)){o=c[d+8>>2]|0;f[o>>2]=J;f[o+4>>2]=p;f[o+8>>2]=I;o=(c[d+8>>2]|0)+(la<<2)|0;f[o>>2]=t;f[o+4>>2]=u;f[o+8>>2]=v;o=(c[d+8>>2]|0)+(la<<1<<2)|0;f[o>>2]=ha*ka;f[o+4>>2]=ja*ka;f[o+8>>2]=ia*ka;o=c[d+16>>2]|0;g=-J;f[o>>2]=g;f[o+4>>2]=-p;f[o+8>>2]=-I;f[o+(la<<2)>>2]=-t;f[o+(la+1<<2)>>2]=-u;f[o+(la+2<<2)>>2]=-v;f[o+(la<<1<<2)>>2]=-(ha*ka);f[o+((la<<1|1)<<2)>>2]=-(ja*ka);f[o+((la<<1)+2<<2)>>2]=-(ia*ka);o=c[d+28>>2]|0;f[o>>2]=e*(F*J+H*p+G*I);f[o+(la<<2)>>2]=e*(F*t+H*u+G*v);f[o+(la<<1<<2)>>2]=e*(F*(ha*ka)+H*(ja*ka)+G*(ia*ka));m=c[d+20>>2]|0;e=g;g=-t;i=-u;k=-v}else{m=h;o=c[d+28>>2]|0;e=-J;g=-t;i=-u;k=-v}j=c[d+12>>2]|0;f[j+(la*3<<2)>>2]=J;f[j+((la*3|0)+1<<2)>>2]=p;f[j+((la*3|0)+2<<2)>>2]=I;f[j+(la<<2<<2)>>2]=t;f[j+((la<<2|1)<<2)>>2]=u;f[j+((la<<2|2)<<2)>>2]=v;f[m+(la*3<<2)>>2]=e;f[m+((la*3|0)+1<<2)>>2]=-p;f[m+((la*3|0)+2<<2)>>2]=-I;f[m+(la<<2<<2)>>2]=g;f[m+((la<<2|1)<<2)>>2]=i;f[m+((la<<2|2)<<2)>>2]=k;G=+f[d>>2]*+f[d+4>>2];H=(K*N+L*O+M*P)*(X*ba+Y*ca+Z*da)-(K*R+L*S+M*T)*(X*_+Y*$+Z*aa);da=(K*R+L*S+M*T)*(U*X+V*Y+W*Z)-(ea*K+fa*L+ga*M)*(X*ba+Y*ca+Z*da);ga=(ea*K+fa*L+ga*M)*(X*_+Y*$+Z*aa)-(K*N+L*O+M*P)*(U*X+V*Y+W*Z);f[o+(la*3<<2)>>2]=G*(H*J+da*p+ga*I);f[o+(la<<2<<2)>>2]=G*(H*t+da*u+ga*v);if(!(a[b+716>>0]|0)){r=0;p=0.0}else{p=+f[b+708>>2]*+f[b+732>>2];r=p>0.0?1:2}h=a[b+737>>0]|0;q=(r|0)!=0;if(!(r|h&255))return;f[j+(la*5<<2)>>2]=ha*ka;f[j+((la*5|0)+1<<2)>>2]=ja*ka;f[j+((la*5|0)+2<<2)>>2]=ia*ka;f[m+(la*5<<2)>>2]=-(ha*ka);f[m+((la*5|0)+1<<2)>>2]=-(ja*ka);f[m+((la*5|0)+2<<2)>>2]=-(ia*ka);e=+f[b+688>>2];g=+f[b+692>>2];if(!((e-g)%6.2831854820251465<-3.1415927410125732))if((e-g)%6.2831854820251465>3.1415927410125732)n=(e-g)%6.2831854820251465+-6.2831854820251465;else n=(e-g)%6.2831854820251465;else n=(e-g)%6.2831854820251465+6.2831854820251465;if(!((e+g)%6.2831854820251465<-3.1415927410125732))if((e+g)%6.2831854820251465>3.1415927410125732)l=(e+g)%6.2831854820251465+-6.2831854820251465;else l=(e+g)%6.2831854820251465;else l=(e+g)%6.2831854820251465+6.2831854820251465;m=n==l;o=o+(la*5<<2)|0;f[o>>2]=0.0;j=c[b+748>>2]|0;k=+f[((j&2|0)==0?d+4|0:b+760|0)>>2];if(!(h<<24>>24==0|q&m)){if(j&4|0)c[(c[d+32>>2]|0)+(la*5<<2)>>2]=c[b+752>>2];g=+f[b+728>>2];i=+f[b+680>>2];e=n>l?1.0:0.0;do if(!(n>=l)){e=i/(k*+f[d>>2]);if(e<0.0)if(g>=n&n-e>g){e=(n-g)/e;break}else{e=g0.0)if(g<=l&l-el?0.0:1.0;break}else e=0.0}while(0);f[o>>2]=e*i*+f[b+732>>2]+ +f[o>>2];f[(c[d+36>>2]|0)+(la*5<<2)>>2]=-+f[b+684>>2];c[(c[d+40>>2]|0)+(la*5<<2)>>2]=c[b+684>>2]}if(!q)return;f[o>>2]=+f[o>>2]+p*(k*+f[d>>2]);if(j&1|0)c[(c[d+32>>2]|0)+(la*5<<2)>>2]=c[b+756>>2];do if(!m){h=(c[d+36>>2]|0)+(la*5<<2)|0;if((r|0)==1){f[h>>2]=0.0;e=3402823466385288598117041.0e14;break}else{f[h>>2]=-3402823466385288598117041.0e14;e=0.0;break}}else{f[(c[d+36>>2]|0)+(la*5<<2)>>2]=-3402823466385288598117041.0e14;e=3402823466385288598117041.0e14}while(0);f[(c[d+40>>2]|0)+(la*5<<2)>>2]=e;g=+f[b+704>>2];do if(g>0.0){e=+f[ma+328>>2]*(ha*ka)+ +f[ma+332>>2]*(ja*ka)+ +f[ma+336>>2]*(ia*ka)-(+f[na+328>>2]*(ha*ka)+ +f[na+332>>2]*(ja*ka)+ +f[na+336>>2]*(ia*ka));if((r|0)==1){if(!(e<0.0))break;if(!(+f[o>>2]<-(g*e)))break;f[o>>2]=-(g*e);break}else{if(!(e>0.0))break;if(!(+f[o>>2]>-(g*e)))break;f[o>>2]=-(g*e);break}}while(0);f[o>>2]=+f[b+700>>2]*+f[o>>2];return}function rb(d,e,g,h,i,j){d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=+j;var k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0;F=ea;ea=ea+896|0;E=c[h+4>>2]|0;D=c[h+12>>2]|0;k=c[E+4>>2]|0;if((k|0)<20){c[F+712>>2]=4752;c[F+712+168>>2]=0;f[F+712+172>>2]=j;c[F+712+164>>2]=c[i+4>>2];f[F+352+308>>2]=9.999999747378752e-05;a[F+352+332>>0]=0;c[F+288>>2]=10432;c[F+64>>2]=10500;c[F+64+4>>2]=F+352;c[F+64+8>>2]=F+288;c[F+64+12>>2]=d;c[F+64+16>>2]=E;c[F+64+20>>2]=0;if((Rc(F+64|0,e,g,D,D,F+712|0)|0?(v=F+712+132|0,t=+f[v>>2],l=+f[F+712+136>>2],m=+f[F+712+140>>2],t*t+l*l+m*m>9.999999747378752e-05):0)?(n=+f[F+712+164>>2],n<+f[i+4>>2]):0){j=1.0/+s(+(t*t+l*l+m*m));f[v>>2]=t*j;f[F+712+136>>2]=l*j;f[F+712+140>>2]=m*j;c[F+16>>2]=c[h+8>>2];c[F+16+4>>2]=0;c[F+16+8>>2]=c[v>>2];c[F+16+8+4>>2]=c[v+4>>2];c[F+16+8+8>>2]=c[v+8>>2];c[F+16+8+12>>2]=c[v+12>>2];c[F+16+24>>2]=c[F+712+148>>2];c[F+16+24+4>>2]=c[F+712+148+4>>2];c[F+16+24+8>>2]=c[F+712+148+8>>2];c[F+16+24+12>>2]=c[F+712+148+12>>2];f[F+16+40>>2]=n;+ka[c[(c[i>>2]|0)+12>>2]&15](i,F+16|0,1)}ea=F;return}if((k+-21|0)>>>0>=9){if((k|0)!=31){ea=F;return}Fi(17838);if((c[E+16>>2]|0)>0){k=0;do{v=c[E+24>>2]|0;l=+f[v+(k*80|0)>>2];o=+f[v+(k*80|0)+4>>2];r=+f[v+(k*80|0)+8>>2];m=+f[v+(k*80|0)+16>>2];p=+f[v+(k*80|0)+20>>2];u=+f[v+(k*80|0)+24>>2];n=+f[v+(k*80|0)+32>>2];q=+f[v+(k*80|0)+36>>2];y=+f[v+(k*80|0)+40>>2];N=+f[v+(k*80|0)+48>>2];M=+f[v+(k*80|0)+52>>2];C=+f[v+(k*80|0)+56>>2];v=c[v+(k*80|0)+64>>2]|0;L=+f[D>>2];K=+f[D+4>>2];J=+f[D+8>>2];I=+f[D+16>>2];H=+f[D+20>>2];G=+f[D+24>>2];t=+f[D+32>>2];x=+f[D+36>>2];z=+f[D+40>>2];A=N*L+M*K+C*J+ +f[D+48>>2];B=N*I+M*H+C*G+ +f[D+52>>2];C=N*t+M*x+C*z+ +f[D+56>>2];f[F+712>>2]=l*L+m*K+n*J;f[F+712+4>>2]=o*L+p*K+q*J;f[F+712+8>>2]=r*L+u*K+y*J;f[F+712+12>>2]=0.0;f[F+712+16>>2]=l*I+m*H+n*G;f[F+712+20>>2]=o*I+p*H+q*G;f[F+712+24>>2]=r*I+u*H+y*G;f[F+712+28>>2]=0.0;f[F+712+32>>2]=l*t+m*x+n*z;f[F+712+36>>2]=o*t+p*x+q*z;f[F+712+40>>2]=r*t+u*x+y*z;f[F+712+44>>2]=0.0;f[F+712+48>>2]=A;f[F+712+52>>2]=B;f[F+712+56>>2]=C;f[F+712+60>>2]=0.0;b[F+352+8>>1]=1;b[F+352+10>>1]=-1;c[F+352>>2]=7024;c[F+352+12>>2]=i;c[F+352+16>>2]=k;c[F+352+4>>2]=c[i+4>>2];w=c[h+8>>2]|0;c[F+288>>2]=h;c[F+288+4>>2]=v;c[F+288+8>>2]=w;c[F+288+12>>2]=F+712;c[F+288+16>>2]=-1;c[F+288+20>>2]=k;rb(d,e,g,F+288|0,F+352|0,j);k=k+1|0}while((k|0)<(c[E+16>>2]|0))}k=c[2685]|0;E=(c[k+16>>2]|0)+-1|0;c[k+16>>2]=E;if(E|0){ea=F;return}do if(c[k+4>>2]|0){Y(F+712|0,0)|0;E=c[6746]|0;f[k+8>>2]=+f[k+8>>2]+ +(((c[F+712+4>>2]|0)-(c[E+4>>2]|0)+(((c[F+712>>2]|0)-(c[E>>2]|0)|0)*1e6|0)-(c[k+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[k+16>>2]|0)){k=c[2685]|0;break}else{ea=F;return}}while(0);c[2685]=c[k+20>>2];ea=F;return}switch(k|0){case 21:{l=+f[D>>2];m=+f[D+16>>2];n=+f[D+32>>2];o=+f[D+4>>2];p=+f[D+20>>2];q=+f[D+36>>2];r=+f[D+8>>2];t=+f[D+24>>2];u=+f[D+40>>2];A=-+f[D+48>>2];B=-+f[D+52>>2];C=-+f[D+56>>2];z=+f[e+48>>2];y=+f[e+52>>2];x=+f[e+56>>2];f[F+352>>2]=l*A+m*B+n*C+(l*z+m*y+n*x);f[F+352+4>>2]=o*A+p*B+q*C+(o*z+p*y+q*x);f[F+352+8>>2]=r*A+t*B+u*C+(r*z+t*y+u*x);f[F+352+12>>2]=0.0;x=+f[g+48>>2];y=+f[g+52>>2];z=+f[g+56>>2];O=+f[g>>2];G=+f[g+16>>2];H=+f[g+32>>2];I=+f[g+4>>2];J=+f[g+20>>2];K=+f[g+36>>2];L=+f[g+8>>2];M=+f[g+24>>2];N=+f[g+40>>2];f[F+288>>2]=l*O+m*G+n*H;f[F+288+4>>2]=l*I+m*J+n*K;f[F+288+8>>2]=l*L+m*M+n*N;f[F+288+12>>2]=0.0;f[F+288+16>>2]=o*O+p*G+q*H;f[F+288+20>>2]=o*I+p*J+q*K;f[F+288+24>>2]=o*L+p*M+q*N;f[F+288+28>>2]=0.0;f[F+288+32>>2]=r*O+t*G+u*H;f[F+288+36>>2]=r*I+t*J+u*K;f[F+288+40>>2]=r*L+t*M+u*N;k=F+288+44|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;c[k+12>>2]=0;c[k+16>>2]=0;k=c[h+8>>2]|0;N=+ha[c[(c[E>>2]|0)+48>>2]&15](E);c[F+64>>2]=10360;c[F+64+4>>2]=d;c[F+64+8>>2]=c[e>>2];c[F+64+8+4>>2]=c[e+4>>2];c[F+64+8+8>>2]=c[e+8>>2];c[F+64+8+12>>2]=c[e+12>>2];c[F+64+24>>2]=c[e+16>>2];c[F+64+24+4>>2]=c[e+16+4>>2];c[F+64+24+8>>2]=c[e+16+8>>2];c[F+64+24+12>>2]=c[e+16+12>>2];c[F+64+40>>2]=c[e+32>>2];c[F+64+40+4>>2]=c[e+32+4>>2];c[F+64+40+8>>2]=c[e+32+8>>2];c[F+64+40+12>>2]=c[e+32+12>>2];c[F+64+56>>2]=c[e+48>>2];c[F+64+56+4>>2]=c[e+48+4>>2];c[F+64+56+8>>2]=c[e+48+8>>2];c[F+64+56+12>>2]=c[e+48+12>>2];c[F+64+72>>2]=c[g>>2];c[F+64+72+4>>2]=c[g+4>>2];c[F+64+72+8>>2]=c[g+8>>2];c[F+64+72+12>>2]=c[g+12>>2];c[F+64+88>>2]=c[g+16>>2];c[F+64+88+4>>2]=c[g+16+4>>2];c[F+64+88+8>>2]=c[g+16+8>>2];c[F+64+88+12>>2]=c[g+16+12>>2];c[F+64+104>>2]=c[g+32>>2];c[F+64+104+4>>2]=c[g+32+4>>2];c[F+64+104+8>>2]=c[g+32+8>>2];c[F+64+104+12>>2]=c[g+32+12>>2];c[F+64+120>>2]=c[g+48>>2];c[F+64+120+4>>2]=c[g+48+4>>2];c[F+64+120+8>>2]=c[g+48+8>>2];c[F+64+120+12>>2]=c[g+48+12>>2];c[F+64+136>>2]=c[D>>2];c[F+64+136+4>>2]=c[D+4>>2];c[F+64+136+8>>2]=c[D+8>>2];c[F+64+136+12>>2]=c[D+12>>2];c[F+64+152>>2]=c[D+16>>2];c[F+64+152+4>>2]=c[D+16+4>>2];c[F+64+152+8>>2]=c[D+16+8>>2];c[F+64+152+12>>2]=c[D+16+12>>2];c[F+64+168>>2]=c[D+32>>2];c[F+64+168+4>>2]=c[D+32+4>>2];c[F+64+168+8>>2]=c[D+32+8>>2];c[F+64+168+12>>2]=c[D+32+12>>2];c[F+64+184>>2]=c[D+48>>2];c[F+64+184+4>>2]=c[D+48+4>>2];c[F+64+184+8>>2]=c[D+48+8>>2];c[F+64+184+12>>2]=c[D+48+12>>2];f[F+64+204>>2]=N;c[F+64>>2]=6976;c[F+64+212>>2]=i;c[F+64+216>>2]=k;c[F+64+220>>2]=E;c[F+64+200>>2]=c[i+4>>2];f[F+64+208>>2]=j;Pa[c[(c[d>>2]|0)+8>>2]&127](d,F+288|0,F+16|0,F);k=c[E+48>>2]|0;c[F+712>>2]=8116;c[F+712+4>>2]=k;c[F+712+8>>2]=F+64;k=c[E+52>>2]|0;if(!(a[k+60>>0]|0))Ld(k,F+712|0,F+352|0,l*A+m*B+n*C+(l*x+m*y+n*z),o*A+p*B+q*C+(o*x+p*y+q*z),r*A+t*B+u*C+(r*x+t*y+u*z),F+16|0,F);else pd(k,F+712|0,F+352|0,l*A+m*B+n*C+(l*x+m*y+n*z),o*A+p*B+q*C+(o*x+p*y+q*z),r*A+t*B+u*C+(r*x+t*y+u*z),F+16|0,F,c[k+56>>2]|0);ea=F;return}case 28:{c[F+712>>2]=4752;c[F+712+168>>2]=0;f[F+712+172>>2]=j;c[F+712+164>>2]=c[i+4>>2];c[F+352>>2]=10500;c[F+352+4>>2]=0;c[F+352+8>>2]=0;c[F+352+12>>2]=d;c[F+352+16>>2]=0;c[F+352+20>>2]=E;if((Rc(F+352|0,e,g,D,D,F+712|0)|0?(w=F+712+132|0,o=+f[w>>2],p=+f[F+712+136>>2],q=+f[F+712+140>>2],o*o+p*p+q*q>9.999999747378752e-05):0)?(r=+f[F+712+164>>2],r<+f[i+4>>2]):0){O=1.0/+s(+(o*o+p*p+q*q));f[w>>2]=o*O;f[F+712+136>>2]=p*O;f[F+712+140>>2]=q*O;c[F+288>>2]=c[h+8>>2];c[F+288+4>>2]=0;c[F+288+8>>2]=c[w>>2];c[F+288+8+4>>2]=c[w+4>>2];c[F+288+8+8>>2]=c[w+8>>2];c[F+288+8+12>>2]=c[w+12>>2];c[F+288+24>>2]=c[F+712+148>>2];c[F+288+24+4>>2]=c[F+712+148+4>>2];c[F+288+24+8>>2]=c[F+712+148+8>>2];c[F+288+24+12>>2]=c[F+712+148+12>>2];f[F+288+40>>2]=r;+ka[c[(c[i>>2]|0)+12>>2]&15](i,F+288|0,1)}ea=F;return}default:{o=+f[D>>2];p=+f[D+16>>2];q=+f[D+32>>2];x=+f[D+4>>2];y=+f[D+20>>2];z=+f[D+36>>2];J=+f[D+8>>2];L=+f[D+24>>2];N=+f[D+40>>2];H=-+f[D+48>>2];G=-+f[D+52>>2];C=-+f[D+56>>2];A=+f[e+48>>2];B=+f[e+52>>2];u=+f[e+56>>2];r=o*H+p*G+q*C+(o*A+p*B+q*u);t=x*H+y*G+z*C+(x*A+y*B+z*u);u=J*H+L*G+N*C+(J*A+L*B+N*u);B=+f[g+48>>2];A=+f[g+52>>2];l=+f[g+56>>2];n=o*H+p*G+q*C+(o*B+p*A+q*l);m=x*H+y*G+z*C+(x*B+y*A+z*l);l=J*H+L*G+N*C+(J*B+L*A+N*l);A=+f[g>>2];B=+f[g+16>>2];C=+f[g+32>>2];G=+f[g+4>>2];H=+f[g+20>>2];I=+f[g+36>>2];K=+f[g+8>>2];M=+f[g+24>>2];O=+f[g+40>>2];f[F+712>>2]=o*A+p*B+q*C;f[F+712+4>>2]=o*G+p*H+q*I;f[F+712+8>>2]=o*K+p*M+q*O;f[F+712+12>>2]=0.0;f[F+712+16>>2]=x*A+y*B+z*C;f[F+712+20>>2]=x*G+y*H+z*I;f[F+712+24>>2]=x*K+y*M+z*O;f[F+712+28>>2]=0.0;f[F+712+32>>2]=J*A+L*B+N*C;f[F+712+36>>2]=J*G+L*H+N*I;f[F+712+40>>2]=J*K+L*M+N*O;w=F+712+44|0;c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;c[w+12>>2]=0;c[w+16>>2]=0;h=c[h+8>>2]|0;O=+ha[c[(c[E>>2]|0)+48>>2]&15](E);c[F+352>>2]=10360;c[F+352+4>>2]=d;c[F+352+8>>2]=c[e>>2];c[F+352+8+4>>2]=c[e+4>>2];c[F+352+8+8>>2]=c[e+8>>2];c[F+352+8+12>>2]=c[e+12>>2];c[F+352+24>>2]=c[e+16>>2];c[F+352+24+4>>2]=c[e+16+4>>2];c[F+352+24+8>>2]=c[e+16+8>>2];c[F+352+24+12>>2]=c[e+16+12>>2];c[F+352+40>>2]=c[e+32>>2];c[F+352+40+4>>2]=c[e+32+4>>2];c[F+352+40+8>>2]=c[e+32+8>>2];c[F+352+40+12>>2]=c[e+32+12>>2];c[F+352+56>>2]=c[e+48>>2];c[F+352+56+4>>2]=c[e+48+4>>2];c[F+352+56+8>>2]=c[e+48+8>>2];c[F+352+56+12>>2]=c[e+48+12>>2];c[F+352+72>>2]=c[g>>2];c[F+352+72+4>>2]=c[g+4>>2];c[F+352+72+8>>2]=c[g+8>>2];c[F+352+72+12>>2]=c[g+12>>2];c[F+352+88>>2]=c[g+16>>2];c[F+352+88+4>>2]=c[g+16+4>>2];c[F+352+88+8>>2]=c[g+16+8>>2];c[F+352+88+12>>2]=c[g+16+12>>2];c[F+352+104>>2]=c[g+32>>2];c[F+352+104+4>>2]=c[g+32+4>>2];c[F+352+104+8>>2]=c[g+32+8>>2];c[F+352+104+12>>2]=c[g+32+12>>2];c[F+352+120>>2]=c[g+48>>2];c[F+352+120+4>>2]=c[g+48+4>>2];c[F+352+120+8>>2]=c[g+48+8>>2];c[F+352+120+12>>2]=c[g+48+12>>2];c[F+352+136>>2]=c[D>>2];c[F+352+136+4>>2]=c[D+4>>2];c[F+352+136+8>>2]=c[D+8>>2];c[F+352+136+12>>2]=c[D+12>>2];c[F+352+152>>2]=c[D+16>>2];c[F+352+152+4>>2]=c[D+16+4>>2];c[F+352+152+8>>2]=c[D+16+8>>2];c[F+352+152+12>>2]=c[D+16+12>>2];c[F+352+168>>2]=c[D+32>>2];c[F+352+168+4>>2]=c[D+32+4>>2];c[F+352+168+8>>2]=c[D+32+8>>2];c[F+352+168+12>>2]=c[D+32+12>>2];c[F+352+184>>2]=c[D+48>>2];c[F+352+184+4>>2]=c[D+48+4>>2];c[F+352+184+8>>2]=c[D+48+8>>2];c[F+352+184+12>>2]=c[D+48+12>>2];f[F+352+204>>2]=O;c[F+352>>2]=7e3;c[F+352+212>>2]=i;c[F+352+216>>2]=h;c[F+352+220>>2]=E;c[F+352+200>>2]=c[i+4>>2];f[F+352+208>>2]=j;Pa[c[(c[d>>2]|0)+8>>2]&127](d,F+712|0,F+288|0,F+64|0);f[F+16>>2]=r;f[F+16+4>>2]=t;f[F+16+8>>2]=u;f[F+16+12>>2]=0.0;if(n>2]=n;o=n}else o=r;if(m>2]=m;p=m}else p=t;if(l>2]=l;q=l}else q=u;f[F>>2]=r;f[F+4>>2]=t;f[F+8>>2]=u;f[F+12>>2]=0.0;if(r>2]=n;else n=r;if(t>2]=m;else m=t;if(u>2]=l;else l=u;f[F+16>>2]=+f[F+288>>2]+o;f[F+16+4>>2]=+f[F+288+4>>2]+p;f[F+16+8>>2]=+f[F+288+8>>2]+q;f[F>>2]=+f[F+64>>2]+n;f[F+4>>2]=+f[F+64+4>>2]+m;f[F+8>>2]=+f[F+64+8>>2]+l;Pa[c[(c[E>>2]|0)+64>>2]&127](E,F+352|0,F+16|0,F);ea=F;return}}}function sb(d,e,g){d=d|0;e=e|0;g=+g;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0.0,q=0.0,s=0.0,t=0,u=0;t=ea;ea=ea+528|0;if((a[d+171>>0]|0)==0?+f[d+172>>2]<=0.0:0){ea=t;return}a[d+168>>0]=(ra[c[(c[d>>2]|0)+48>>2]&127](d)|0)&1;k=+f[d+16>>2]-+f[d+44>>2]*g;f[d+16>>2]=k;if(k>0.0?(j=+f[d+28>>2],k>j):0)f[d+16>>2]=j;else j=k;if(j<0.0?(q=+r(+j),l=+r(+(+f[d+24>>2])),q>l):0){f[d+16>>2]=-l;j=-l}f[d+20>>2]=j*g;o=c[d+8>>2]|0;c[t>>2]=c[o+4>>2];c[t+4>>2]=c[o+4+4>>2];c[t+8>>2]=c[o+4+8>>2];c[t+12>>2]=c[o+4+12>>2];c[t+16>>2]=c[o+20>>2];c[t+16+4>>2]=c[o+20+4>>2];c[t+16+8>>2]=c[o+20+8>>2];c[t+16+12>>2]=c[o+20+12>>2];c[t+32>>2]=c[o+36>>2];c[t+32+4>>2]=c[o+36+4>>2];c[t+32+8>>2]=c[o+36+8>>2];c[t+32+12>>2]=c[o+36+12>>2];c[t+48>>2]=c[o+52>>2];c[t+48+4>>2]=c[o+52+4>>2];c[t+48+8>>2]=c[o+52+8>>2];c[t+48+12>>2]=c[o+52+12>>2];if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}o=c[d+176>>2]|0;l=+f[d+20>>2];l=+f[d+52>>2]+(l>0.0?l:0.0);p=+f[22560+(o<<4)+4>>2]*l+ +f[d+96>>2];q=l*+f[22560+(o<<4)+8>>2]+ +f[d+100>>2];f[d+112>>2]=+f[d+92>>2]+ +f[22560+(o<<4)>>2]*l;f[d+116>>2]=p;f[d+120>>2]=q;f[d+124>>2]=0.0;c[t+456>>2]=1065353216;c[t+456+4>>2]=0;c[t+456+4+4>>2]=0;c[t+456+4+8>>2]=0;c[t+456+4+12>>2]=0;c[t+456+20>>2]=1065353216;c[t+456+24>>2]=0;c[t+456+24+4>>2]=0;c[t+456+24+8>>2]=0;c[t+456+24+12>>2]=0;c[t+456+40>>2]=1065353216;o=t+456+44|0;c[o>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;c[o+12>>2]=0;c[o+16>>2]=0;c[t+392>>2]=1065353216;c[t+392+4>>2]=0;c[t+392+4+4>>2]=0;c[t+392+4+8>>2]=0;c[t+392+4+12>>2]=0;c[t+392+20>>2]=1065353216;c[t+392+24>>2]=0;c[t+392+24+4>>2]=0;c[t+392+24+8>>2]=0;c[t+392+24+12>>2]=0;c[t+392+40>>2]=1065353216;o=t+392+44|0;c[o>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;c[o+12>>2]=0;c[o+16>>2]=0;if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}h=c[d+176>>2]|0;o=c[d+12>>2]|0;l=+ha[c[(c[o>>2]|0)+48>>2]&15](o);l=l+ +f[d+56>>2];p=l*+f[22560+(h<<4)+4>>2]+ +f[d+96>>2];q=l*+f[22560+(h<<4)+8>>2]+ +f[d+100>>2];f[t+456+48>>2]=+f[22560+(h<<4)>>2]*l+ +f[d+92>>2];f[t+456+52>>2]=p;f[t+456+56>>2]=q;f[t+456+60>>2]=0.0;c[t+392+48>>2]=c[d+112>>2];c[t+392+48+4>>2]=c[d+112+4>>2];c[t+392+48+8>>2]=c[d+112+8>>2];c[t+392+48+12>>2]=c[d+112+12>>2];h=c[d+8>>2]|0;if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}o=c[d+176>>2]|0;l=-+f[22560+(o<<4)>>2];p=-+f[22560+(o<<4)+4>>2];q=-+f[22560+(o<<4)+8>>2];f[t+288+4>>2]=1.0;o=t+288+12|0;c[t+288+76>>2]=0;c[o>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;c[o+12>>2]=0;c[o+16>>2]=0;c[o+20>>2]=0;c[o+24>>2]=0;c[o+28>>2]=0;c[t+288>>2]=6052;c[t+288+80>>2]=h;f[t+288+84>>2]=l;f[t+288+88>>2]=p;f[t+288+92>>2]=q;f[t+288+96>>2]=0.0;f[t+288+100>>2]=.707099974155426;h=c[d+8>>2]|0;o=c[h+188>>2]|0;b[t+288+8>>1]=b[o+4>>1]|0;b[t+288+10>>1]=b[o+6>>1]|0;if(!(a[d+170>>0]|0))Gc(e,c[d+12>>2]|0,t+456|0,t+392|0,t+288|0,0.0);else mc(h,c[d+12>>2]|0,t+456|0,t+392|0,t+288|0,+f[e+56>>2]);if(+f[t+288+4>>2]<1.0){if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}o=c[d+176>>2]|0;do if(+f[t+288+44>>2]*+f[22560+(o<<4)>>2]+ +f[t+288+48>>2]*+f[22560+(o<<4)+4>>2]+ +f[t+288+52>>2]*+f[22560+(o<<4)+8>>2]>0.0){j=+f[t+288+4>>2];f[d+108>>2]=+f[d+52>>2]*j;if(!(a[d+180>>0]|0)){c[d+92>>2]=c[d+112>>2];c[d+92+4>>2]=c[d+112+4>>2];c[d+92+8>>2]=c[d+112+8>>2];c[d+92+12>>2]=c[d+112+12>>2];break}else{f[d+92>>2]=(1.0-j)*+f[d+92>>2]+j*+f[d+112>>2];f[d+96>>2]=(1.0-j)*+f[d+96>>2]+j*+f[d+116>>2];f[d+100>>2]=(1.0-j)*+f[d+100>>2]+j*+f[d+120>>2];break}}while(0);f[d+16>>2]=0.0;f[d+20>>2]=0.0}else{c[d+108>>2]=c[d+52>>2];c[d+92>>2]=c[d+112>>2];c[d+92+4>>2]=c[d+112+4>>2];c[d+92+8>>2]=c[d+112+8>>2];c[d+92+12>>2]=c[d+112+12>>2]}if(!(a[d+171>>0]|0)){p=+f[d+172>>2];q=p>g?g:p;f[d+172>>2]=p-g;$c(d,e,q*+f[d+60>>2],q*+f[d+64>>2],q*+f[d+68>>2])}else $c(d,e,+f[d+60>>2],+f[d+64>>2],+f[d+68>>2]);c[t+272>>2]=c[d+112>>2];c[t+272+4>>2]=c[d+112+4>>2];c[t+272+8>>2]=c[d+112+8>>2];c[t+272+12>>2]=c[d+112+12>>2];j=+f[d+16>>2];j=(j<0.0?-j:0.0)*g;do if(j>0.0?(i=+f[d+24>>2],j>i):0){if((a[d+168>>0]|0)==0?a[d+169>>0]|0:0){i=j;break}}else i=j;while(0);if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}h=c[d+176>>2]|0;q=i+ +f[d+108>>2];l=+f[22560+(h<<4)>>2]*q;p=q*+f[22560+(h<<4)+4>>2];q=q*+f[22560+(h<<4)+8>>2];f[d+112>>2]=+f[d+112>>2]-l;f[d+116>>2]=+f[d+116>>2]-p;f[d+120>>2]=+f[d+120>>2]-q;h=c[d+8>>2]|0;if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}m=22560+(c[d+176>>2]<<4)|0;n=c[d+40>>2]|0;o=t+168+4|0;f[o>>2]=1.0;u=t+168+12|0;c[t+168+76>>2]=0;c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;c[u+20>>2]=0;c[u+24>>2]=0;c[u+28>>2]=0;c[t+168>>2]=6052;c[t+168+80>>2]=h;c[t+168+84>>2]=c[m>>2];c[t+168+84+4>>2]=c[m+4>>2];c[t+168+84+8>>2]=c[m+8>>2];c[t+168+84+12>>2]=c[m+12>>2];c[t+168+100>>2]=n;h=c[d+8>>2]|0;n=c[h+188>>2]|0;b[t+168+8>>1]=b[n+4>>1]|0;b[t+168+10>>1]=b[n+6>>1]|0;if((a[24960]|0)==0?DC(24960)|0:0){c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}n=22560+(c[d+176>>2]<<4)|0;u=c[d+40>>2]|0;f[t+64+4>>2]=1.0;m=t+64+12|0;c[t+64+76>>2]=0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[m+20>>2]=0;c[m+24>>2]=0;c[m+28>>2]=0;c[t+64>>2]=6052;c[t+64+80>>2]=h;c[t+64+84>>2]=c[n>>2];c[t+64+84+4>>2]=c[n+4>>2];c[t+64+84+8>>2]=c[n+8>>2];c[t+64+84+12>>2]=c[n+12>>2];c[t+64+100>>2]=u;h=c[(c[d+8>>2]|0)+188>>2]|0;b[t+64+8>>1]=b[h+4>>1]|0;b[t+64+10>>1]=b[h+6>>1]|0;i=+f[d+112>>2];j=+f[d+116>>2];k=+f[d+120>>2];h=0;while(1){c[t+456>>2]=1065353216;c[t+456+4>>2]=0;c[t+456+4+4>>2]=0;c[t+456+4+8>>2]=0;c[t+456+4+12>>2]=0;c[t+456+20>>2]=1065353216;c[t+456+24>>2]=0;c[t+456+24+4>>2]=0;c[t+456+24+8>>2]=0;c[t+456+24+12>>2]=0;c[t+456+40>>2]=1065353216;c[t+456+44>>2]=0;c[t+392>>2]=1065353216;c[t+392+4>>2]=0;c[t+392+4+4>>2]=0;c[t+392+4+8>>2]=0;c[t+392+4+12>>2]=0;c[t+392+20>>2]=1065353216;c[t+392+24>>2]=0;c[t+392+24+4>>2]=0;c[t+392+24+8>>2]=0;c[t+392+24+12>>2]=0;c[t+392+40>>2]=1065353216;c[t+392+44>>2]=0;c[t+288>>2]=1065353216;c[t+288+4>>2]=0;c[t+288+4+4>>2]=0;c[t+288+4+8>>2]=0;c[t+288+4+12>>2]=0;c[t+288+20>>2]=1065353216;c[t+288+24>>2]=0;c[t+288+24+4>>2]=0;c[t+288+24+8>>2]=0;c[t+288+24+12>>2]=0;c[t+288+40>>2]=1065353216;c[t+288+44>>2]=0;c[t+456+48>>2]=c[d+92>>2];c[t+456+48+4>>2]=c[d+92+4>>2];c[t+456+48+8>>2]=c[d+92+8>>2];c[t+456+48+12>>2]=c[d+92+12>>2];c[t+392+48>>2]=c[d+112>>2];c[t+392+48+4>>2]=c[d+112+4>>2];c[t+392+48+8>>2]=c[d+112+8>>2];c[t+392+48+12>>2]=c[d+112+12>>2];f[t+288+48>>2]=i-l;f[t+288+52>>2]=j-p;f[t+288+56>>2]=k-q;f[t+288+60>>2]=0.0;if(!(a[d+170>>0]|0)){Gc(e,c[d+12>>2]|0,t+456|0,t+392|0,t+168|0,+f[e+56>>2]);if(!(+f[o>>2]<1.0))Gc(e,c[d+12>>2]|0,t+456|0,t+288|0,t+64|0,+f[e+56>>2])}else{mc(c[d+8>>2]|0,c[d+12>>2]|0,t+456|0,t+392|0,t+168|0,+f[e+56>>2]);if(!(+f[o>>2]<1.0))mc(c[d+8>>2]|0,c[d+12>>2]|0,t+456|0,t+288|0,t+64|0,+f[e+56>>2])}j=+f[d+16>>2];j=(j<0.0?-j:0.0)*g;n=(a[d+182>>0]|0)==0;if(!n?+f[o>>2]<1.0:0)m=1;else m=+f[t+64+4>>2]<1.0;if(!(j>0.0))break;i=+f[d+52>>2];if(h|(!(j>0]|0)==0?a[d+169>>0]|0:0){h=0;break}c[d+112>>2]=c[t+272>>2];c[d+112+4>>2]=c[t+272+4>>2];c[d+112+8>>2]=c[t+272+8>>2];c[d+112+12>>2]=c[t+272+12>>2];do if(!(a[24960]|0)){if(!(DC(24960)|0))break;c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}while(0);h=c[d+176>>2]|0;i=i+ +f[d+108>>2];j=i*+f[22560+(h<<4)+4>>2];k=i*+f[22560+(h<<4)+8>>2];i=+f[d+112>>2]-+f[22560+(h<<4)>>2]*i;f[d+112>>2]=i;j=+f[d+116>>2]-j;f[d+116>>2]=j;k=+f[d+120>>2]-k;f[d+120>>2]=k;h=1}k=+f[o>>2];if(h|k<1.0){i=+f[d+96>>2];j=(i-+f[t+168+64>>2])*.5;do if(!n)if(!(a[d+181>>0]|0)){f[d+92>>2]=(1.0-j)*+f[d+92>>2]+j*+f[d+112>>2];f[d+96>>2]=i*(1.0-j)+j*+f[d+116>>2];f[d+100>>2]=(1.0-j)*+f[d+100>>2]+j*+f[d+120>>2];h=d+181|0;break}else{f[d+92>>2]=(1.0-k)*+f[d+92>>2]+k*+f[d+112>>2];f[d+96>>2]=i*(1.0-k)+k*+f[d+116>>2];f[d+100>>2]=(1.0-k)*+f[d+100>>2]+k*+f[d+120>>2];h=d+181|0;break}else{f[d+92>>2]=(1.0-k)*+f[d+92>>2]+k*+f[d+112>>2];f[d+96>>2]=i*(1.0-k)+k*+f[d+116>>2];f[d+100>>2]=(1.0-k)*+f[d+100>>2]+k*+f[d+120>>2];h=d+181|0}while(0);a[h>>0]=0;f[d+16>>2]=0.0;f[d+20>>2]=0.0;a[d+169>>0]=0}else{a[d+181>>0]=1;do if(!n?(s=+f[d+24>>2],j>s):0){if((a[d+168>>0]|0)==0?a[d+169>>0]|0:0)break;f[d+112>>2]=l+ +f[d+112>>2];f[d+116>>2]=p+ +f[d+116>>2];f[d+120>>2]=q+ +f[d+120>>2];do if(!(a[24960]|0)){if(!(DC(24960)|0))break;c[5640]=1065353216;c[5641]=0;c[5642]=0;c[5643]=0;c[5644]=0;c[5645]=1065353216;c[5646]=0;c[5647]=0;c[5648]=0;c[5649]=0;c[5650]=1065353216;f[5651]=0.0;PB(24960)}while(0);u=c[d+176>>2]|0;q=s+ +f[d+108>>2];g=q*+f[22560+(u<<4)+4>>2];s=q*+f[22560+(u<<4)+8>>2];f[d+112>>2]=+f[d+112>>2]-+f[22560+(u<<4)>>2]*q;f[d+116>>2]=+f[d+116>>2]-g;f[d+120>>2]=+f[d+120>>2]-s}while(0);c[d+92>>2]=c[d+112>>2];c[d+92+4>>2]=c[d+112+4>>2];c[d+92+8>>2]=c[d+112+8>>2];c[d+92+12>>2]=c[d+112+12>>2]}c[t+48>>2]=c[d+92>>2];c[t+48+4>>2]=c[d+92+4>>2];c[t+48+8>>2]=c[d+92+8>>2];c[t+48+12>>2]=c[d+92+12>>2];u=c[d+8>>2]|0;c[u+260>>2]=(c[u+260>>2]|0)+1;c[u+4>>2]=c[t>>2];c[u+4+4>>2]=c[t+4>>2];c[u+4+8>>2]=c[t+8>>2];c[u+4+12>>2]=c[t+12>>2];c[u+20>>2]=c[t+16>>2];c[u+20+4>>2]=c[t+16+4>>2];c[u+20+8>>2]=c[t+16+8>>2];c[u+20+12>>2]=c[t+16+12>>2];c[u+36>>2]=c[t+32>>2];c[u+36+4>>2]=c[t+32+4>>2];c[u+36+8>>2]=c[t+32+8>>2];c[u+36+12>>2]=c[t+32+12>>2];c[u+52>>2]=c[t+48>>2];c[u+52+4>>2]=c[t+48+4>>2];c[u+52+8>>2]=c[t+48+8>>2];c[u+52+12>>2]=c[t+48+12>>2];ea=t;return}function tb(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0,y=0,A=0,B=0.0,C=0.0,D=0,E=0,F=0.0,G=0,H=0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0,R=0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0.0;ca=c[b+28>>2]|0;da=c[b+32>>2]|0;V=+f[ca+344>>2];W=+f[da+344>>2];ba=c[d+24>>2]|0;ea=(a[b+180>>0]|0)==0?-1.0:1.0;S=+f[b+936>>2]-+f[b+872>>2];U=+f[b+940>>2]-+f[b+876>>2];T=+f[b+944>>2]-+f[b+880>>2];X=V+W>0.0?W/(V+W):.5;D=c[b+824>>2]|0;E=c[b+840>>2]|0;G=c[b+856>>2]|0;H=c[b+888>>2]|0;I=c[b+904>>2]|0;J=c[b+920>>2]|0;Y=(a[b+49>>0]|0)==0;if(Y){A=c[b+828>>2]|0;x=c[b+844>>2]|0;t=c[b+860>>2]|0;y=c[b+832>>2]|0;j=c[b+848>>2]|0;i=c[b+864>>2]|0;o=(c[h>>2]=A,+f[h>>2]);p=(c[h>>2]=x,+f[h>>2]);q=(c[h>>2]=t,+f[h>>2]);u=(c[h>>2]=y,+f[h>>2]);n=(c[h>>2]=j,+f[h>>2]);g=(c[h>>2]=i,+f[h>>2]);_=D;$=E;aa=G}else{l=X*(c[h>>2]=D,+f[h>>2]);n=X*(c[h>>2]=E,+f[h>>2]);e=X*(c[h>>2]=G,+f[h>>2]);k=(1.0-X)*(c[h>>2]=H,+f[h>>2]);m=(1.0-X)*(c[h>>2]=I,+f[h>>2]);e=e+(1.0-X)*(c[h>>2]=J,+f[h>>2]);g=1.0/+s(+((l+k)*(l+k)+(n+m)*(n+m)+e*e));i=(f[h>>2]=(l+k)*g,c[h>>2]|0);j=(f[h>>2]=(n+m)*g,c[h>>2]|0);t=(f[h>>2]=e*g,c[h>>2]|0);if(+r(+(e*g))>.7071067690849304){P=1.0/+s(+(e*g*(e*g)+(n+m)*g*((n+m)*g)));q=(n+m)*g*P;v=(l+k)*g*-(e*g*P);o=0.0;p=-(e*g*P);u=(e*g*(e*g)+(n+m)*g*((n+m)*g))*P;e=-((l+k)*g*((n+m)*g*P))}else{v=(l+k)*g*((l+k)*g)+(n+m)*g*((n+m)*g);P=1.0/+s(+v);q=0.0;v=v*P;o=-((n+m)*g*P);p=(l+k)*g*P;u=-(e*g*((l+k)*g*P));e=e*g*-((n+m)*g*P)}A=(f[h>>2]=o,c[h>>2]|0);x=(f[h>>2]=p,c[h>>2]|0);Q=(f[h>>2]=q,c[h>>2]|0);y=(f[h>>2]=u,c[h>>2]|0);R=(f[h>>2]=e,c[h>>2]|0);n=e;g=v;_=i;$=j;aa=t;t=Q;i=(f[h>>2]=v,c[h>>2]|0);j=R}R=c[d+12>>2]|0;c[R>>2]=A;c[R+4>>2]=x;c[R+8>>2]=t;c[R+(ba<<2)>>2]=y;c[R+(ba+1<<2)>>2]=j;c[R+(ba+2<<2)>>2]=i;k=-o;x=c[d+20>>2]|0;f[x>>2]=k;f[x+4>>2]=-p;f[x+8>>2]=-q;f[x+(ba<<2)>>2]=-u;f[x+(ba+1<<2)>>2]=-n;f[x+(ba+2<<2)>>2]=-g;Q=c[b+300>>2]|0;e=+f[b+280>>2];if(!(Q&128))e=e*+f[d+4>>2];F=e*+f[d>>2];O=(c[h>>2]=E,+f[h>>2]);L=(c[h>>2]=J,+f[h>>2]);K=(c[h>>2]=G,+f[h>>2]);N=(c[h>>2]=I,+f[h>>2]);P=(c[h>>2]=H,+f[h>>2]);M=(c[h>>2]=D,+f[h>>2]);D=c[d+28>>2]|0;f[D>>2]=F*((O*L-K*N)*o+(K*P-M*L)*p+(M*N-O*P)*q);f[D+(ba<<2)>>2]=F*((O*L-K*N)*u+(K*P-M*L)*n+(M*N-O*P)*g);if(Q&64|0){J=c[d+32>>2]|0;c[J>>2]=c[b+292>>2];c[J+(ba<<2)>>2]=c[b+292>>2]}C=+f[ca+52>>2];w=+f[ca+56>>2];B=+f[ca+60>>2];m=+f[da+52>>2];e=+f[da+56>>2];l=+f[da+60>>2];if(Y){v=(e-w)*q-(l-B)*p;P=(l-B)*o-(m-C)*q;O=(m-C)*p-(e-w)*o;f[R+(ba<<1<<2)>>2]=X*v;f[R+((ba<<1|1)<<2)>>2]=X*P;f[R+((ba<<1)+2<<2)>>2]=X*O;f[x+(ba<<1<<2)>>2]=(1.0-X)*v;f[x+((ba<<1|1)<<2)>>2]=(1.0-X)*P;f[x+((ba<<1)+2<<2)>>2]=(1.0-X)*O;O=(e-w)*g-(l-B)*n;P=(l-B)*u-(m-C)*g;v=(m-C)*n-(e-w)*u;f[R+(ba*3<<2)>>2]=X*O;f[R+((ba*3|0)+1<<2)>>2]=X*P;f[R+((ba*3|0)+2<<2)>>2]=X*v;f[x+(ba*3<<2)>>2]=(1.0-X)*O;f[x+((ba*3|0)+1<<2)>>2]=(1.0-X)*P;f[x+((ba*3|0)+2<<2)>>2]=(1.0-X)*v;j=c[d+8>>2]|0;f[j+(ba<<1<<2)>>2]=o;f[j+((ba<<1|1)<<2)>>2]=p;f[j+((ba<<1)+2<<2)>>2]=q;f[j+(ba*3<<2)>>2]=u;f[j+((ba*3|0)+1<<2)>>2]=n;f[j+((ba*3|0)+2<<2)>>2]=g;i=c[d+16>>2]|0;f[i+(ba<<1<<2)>>2]=k;f[i+((ba<<1|1)<<2)>>2]=-p;f[i+((ba<<1)+2<<2)>>2]=-q;f[i+(ba*3<<2)>>2]=-u;f[i+((ba*3|0)+1<<2)>>2]=-n;v=n;t=i;P=0.0;O=0.0;M=0.0;L=0.0;K=0.0;F=0.0;n=e-w;l=l-B;k=m-C;i=i+((ba*3|0)+2<<2)|0}else{v=+f[b+936>>2]-m;M=+f[b+940>>2]-e;N=+f[b+944>>2]-l;n=(c[h>>2]=_,+f[h>>2]);p=(c[h>>2]=$,+f[h>>2]);m=(c[h>>2]=aa,+f[h>>2]);O=+f[b+872>>2]-C;P=+f[b+876>>2]-w;k=+f[b+880>>2]-B;K=+f[b+1080>>2]-+f[b+1032>>2];F=(O*n+P*p+k*m)*n+K*n-(v*n+M*p+N*m)*n;L=(O*n+P*p+k*m)*p+K*p-(v*n+M*p+N*m)*p;K=(O*n+P*p+k*m)*m+K*m-(v*n+M*p+N*m)*m;C=O-(O*n+P*p+k*m)*n+X*F;w=P-(O*n+P*p+k*m)*p+X*L;B=k-(O*n+P*p+k*m)*m+X*K;F=v-(v*n+M*p+N*m)*n-(1.0-X)*F;L=M-(v*n+M*p+N*m)*p-(1.0-X)*L;K=N-(v*n+M*p+N*m)*m-(1.0-X)*K;g=X*(v-(v*n+M*p+N*m)*n)+(1.0-X)*(O-(O*n+P*p+k*m)*n);e=X*(M-(v*n+M*p+N*m)*p)+(1.0-X)*(P-(O*n+P*p+k*m)*p);k=X*(N-(v*n+M*p+N*m)*m)+(1.0-X)*(k-(O*n+P*p+k*m)*m);if(k*k+(g*g+e*e)>1.1920928955078125e-07){P=1.0/+s(+(k*k+(g*g+e*e)));j=(f[h>>2]=e*P,c[h>>2]|0);t=(f[h>>2]=k*P,c[h>>2]|0);l=e*P;o=g*P;i=(f[h>>2]=g*P,c[h>>2]|0);e=k*P}else{i=c[b+828>>2]|0;j=c[b+844>>2]|0;t=c[b+860>>2]|0;e=(c[h>>2]=t,+f[h>>2]);l=(c[h>>2]=j,+f[h>>2]);o=(c[h>>2]=i,+f[h>>2])}u=e*p-l*m;v=o*m-e*n;N=l*n-o*p;f[R+(ba<<1<<2)>>2]=w*e-B*l;f[R+(ba<<1<<2)+4>>2]=B*o-C*e;f[R+(ba<<1<<2)+8>>2]=C*l-w*o;f[x+(ba<<1<<2)>>2]=-(L*e-K*l);f[x+((ba<<1|1)<<2)>>2]=-(K*o-F*e);f[x+((ba<<1)+2<<2)>>2]=-(F*l-L*o);if(V<1.1920928955078125e-07|W<1.1920928955078125e-07?(a[b+297>>0]|0)!=0:0){e=(1.0-X)*(L*N-K*v);g=(1.0-X)*(K*u-F*N);k=(1.0-X)*(F*v-L*u);l=X*(w*N-B*v);m=X*(C*v-w*u);n=X*(B*u-C*N)}else{e=L*N-K*v;g=K*u-F*N;k=F*v-L*u;l=w*N-B*v;m=C*v-w*u;n=B*u-C*N}f[R+(ba*3<<2)>>2]=l;f[R+(ba*3<<2)+4>>2]=n;f[R+(ba*3<<2)+8>>2]=m;f[x+(ba*3<<2)>>2]=-e;f[x+((ba*3|0)+1<<2)>>2]=-g;f[x+((ba*3|0)+2<<2)>>2]=-k;J=c[d+8>>2]|0;c[J+(ba<<1<<2)>>2]=i;c[J+((ba<<1|1)<<2)>>2]=j;c[J+((ba<<1)+2<<2)>>2]=t;f[J+(ba*3<<2)>>2]=u;f[J+((ba*3|0)+1<<2)>>2]=v;f[J+((ba*3|0)+2<<2)>>2]=N;i=c[d+16>>2]|0;f[i+(ba<<1<<2)>>2]=-o;p=(c[h>>2]=j,+f[h>>2]);f[i+((ba<<1|1)<<2)>>2]=-p;q=(c[h>>2]=t,+f[h>>2]);f[i+((ba<<1)+2<<2)>>2]=-q;f[i+(ba*3<<2)>>2]=-u;f[i+((ba*3|0)+1<<2)>>2]=-v;j=J;t=i;P=w;O=B;M=C;n=0.0;l=0.0;k=0.0;i=i+((ba*3|0)+2<<2)|0;g=N}f[i>>2]=-g;e=+f[b+264>>2];if(!(Q&32))e=e*+f[d+4>>2];N=e*+f[d>>2];f[D+(ba<<1<<2)>>2]=N*(S*o+U*p+T*q);f[D+(ba*3<<2)>>2]=N*(S*u+U*v+T*g);if(Q&16|0){J=c[d+32>>2]|0;c[J+(ba<<1<<2)>>2]=c[b+276>>2];c[J+(ba*3<<2)>>2]=c[b+276>>2]}if(!(a[b+296>>0]|0)){A=0;o=0.0}else{o=ea*+f[b+1032>>2];A=o>0.0?2:1}i=a[b+1096>>0]|0;y=(A|0)!=0;if(A|i&255){c[j+(ba<<2<<2)>>2]=_;c[j+((ba<<2|1)<<2)>>2]=$;c[j+((ba<<2|2)<<2)>>2]=aa;p=(c[h>>2]=_,+f[h>>2]);f[t+(ba<<2<<2)>>2]=-p;q=(c[h>>2]=$,+f[h>>2]);f[t+((ba<<2|1)<<2)>>2]=-q;u=(c[h>>2]=aa,+f[h>>2]);f[t+((ba<<2|2)<<2)>>2]=-u;if(!Y){if(!(V<1.1920928955078125e-07|W<1.1920928955078125e-07)){f[R+(ba<<2<<2)>>2]=P*u-O*q;f[R+((ba<<2|1)<<2)>>2]=O*p-M*u;f[R+((ba<<2|2)<<2)>>2]=M*q-P*p;f[x+(ba<<2<<2)>>2]=-(L*u-K*q);f[x+((ba<<2|1)<<2)>>2]=-(K*p-F*u);e=-(F*q-L*p);Z=31}}else{V=n*u-l*q;W=l*p-k*u;e=k*q-n*p;f[R+(ba<<2<<2)>>2]=X*V;f[R+((ba<<2|1)<<2)>>2]=X*W;f[R+((ba<<2|2)<<2)>>2]=X*e;f[x+(ba<<2<<2)>>2]=(1.0-X)*V;f[x+((ba<<2|1)<<2)>>2]=(1.0-X)*W;e=(1.0-X)*e;Z=31}if((Z|0)==31)f[x+((ba<<2|2)<<2)>>2]=e;x=+f[b+184>>2]==+f[b+188>>2];f[D+(ba<<2<<2)>>2]=0.0;j=(c[d+36>>2]|0)+(ba<<2<<2)|0;f[j>>2]=0.0;t=(c[d+40>>2]|0)+(ba<<2<<2)|0;f[t>>2]=0.0;n=+f[((Q&512|0)==0?d+4|0:b+232|0)>>2];if(!(i<<24>>24==0|y&x)){if(Q&1|0)c[(c[d+32>>2]|0)+(ba<<2<<2)>>2]=c[b+212>>2];m=+f[b+1100>>2];e=+f[b+1080>>2];g=+f[b+184>>2];k=+f[b+188>>2];l=n*+f[d>>2];do if(!(g>k))if(!(g==k)){if(m/l<0.0)if(e>=g?g-m/l>e:0){e=(g-e)/(m/l);break}else{e=e0.0)if(e<=k?k-m/lk?0.0:1.0;break}else e=0.0}else e=0.0;else e=1.0;while(0);Z=(c[d+28>>2]|0)+(ba<<2<<2)|0;f[Z>>2]=+f[Z>>2]-ea*e*m;f[j>>2]=+f[j>>2]-+f[b+1104>>2]*+f[d>>2];f[t>>2]=+f[b+1104>>2]*+f[d>>2]+ +f[t>>2]}if(y){i=(c[d+28>>2]|0)+(ba<<2<<2)|0;f[i>>2]=+f[i>>2]+o*(n*+f[d>>2]);if(c[b+300>>2]&256|0)c[(c[d+32>>2]|0)+(ba<<2<<2)>>2]=c[b+244>>2];do if(!x)if((A|0)==1){f[j>>2]=-3402823466385288598117041.0e14;e=0.0;break}else{f[j>>2]=0.0;e=3402823466385288598117041.0e14;break}else{f[j>>2]=-3402823466385288598117041.0e14;e=3402823466385288598117041.0e14}while(0);f[t>>2]=e;X=1.0-+f[b+240>>2];g=+r(+X);do if(!(X!=X|0.0!=0.0|X==0.0)){e=ea*(+f[ca+312>>2]*p+ +f[ca+316>>2]*q+ +f[ca+320>>2]*u-(+f[da+312>>2]*p+ +f[da+316>>2]*q+ +f[da+320>>2]*u));if((A|0)==1){if(!(e<0.0))break;if(!(+f[i>>2]<-(g*e)))break;f[i>>2]=-(g*e);break}else{if(!(e>0.0))break;if(!(+f[i>>2]>-(g*e)))break;f[i>>2]=-(g*e);break}}while(0);f[i>>2]=+f[b+232>>2]*+f[i>>2];i=5}else i=5}else i=4;if(!(a[b+297>>0]|0)){y=0;v=0.0}else{v=+f[b+1088>>2];y=v>0.0?1:2}j=a[b+1112>>0]|0;t=(y|0)!=0;if(!(y|j&255))return;x=z(c[d+24>>2]|0,i)|0;i=c[d+12>>2]|0;c[i+(x<<2)>>2]=_;c[i+(x+1<<2)>>2]=$;c[i+(x+2<<2)>>2]=aa;w=(c[h>>2]=_,+f[h>>2]);i=c[d+20>>2]|0;f[i+(x<<2)>>2]=-w;u=(c[h>>2]=$,+f[h>>2]);f[i+(x+1<<2)>>2]=-u;q=(c[h>>2]=aa,+f[h>>2]);f[i+(x+2<<2)>>2]=-q;n=+f[b+192>>2];o=+f[b+196>>2];i=c[b+300>>2]|0;p=+f[((i&2048|0)==0?d+4|0:b+248|0)>>2];if(!(j<<24>>24==0|t&n==o)){if(!(i&4)){g=n;k=o}else{c[(c[d+32>>2]|0)+(x<<2)>>2]=c[b+228>>2];g=+f[b+192>>2];k=+f[b+196>>2]}e=+f[b+1084>>2];m=+f[b+1116>>2];l=p*+f[d>>2];do if(!(g>k))if(!(g==k)){if(m/l<0.0)if(e>=g?g-m/l>e:0){e=(g-e)/(m/l);break}else{e=e0.0)if(e<=k?k-m/lk?0.0:1.0;break}else e=0.0}else e=0.0;else e=1.0;while(0);f[(c[d+28>>2]|0)+(x<<2)>>2]=e*m;f[(c[d+36>>2]|0)+(x<<2)>>2]=-(+f[b+1120>>2]*+f[d>>2]);f[(c[d+40>>2]|0)+(x<<2)>>2]=+f[b+1120>>2]*+f[d>>2]}if(!t)return;j=(c[d+28>>2]|0)+(x<<2)|0;f[j>>2]=+f[j>>2]+v*(p*+f[d>>2]);if(i&1024|0)c[(c[d+32>>2]|0)+(x<<2)>>2]=c[b+260>>2];do if(!(n==o)){i=(c[d+36>>2]|0)+(x<<2)|0;if((y|0)==1){f[i>>2]=0.0;e=3402823466385288598117041.0e14;break}else{f[i>>2]=-3402823466385288598117041.0e14;e=0.0;break}}else{f[(c[d+36>>2]|0)+(x<<2)>>2]=-3402823466385288598117041.0e14;e=3402823466385288598117041.0e14}while(0);f[(c[d+40>>2]|0)+(x<<2)>>2]=e;ea=1.0-+f[b+256>>2];g=+r(+ea);do if(!(ea!=ea|0.0!=0.0|ea==0.0)){da=c[b+28>>2]|0;d=c[b+32>>2]|0;e=+f[da+328>>2]*w+ +f[da+332>>2]*u+ +f[da+336>>2]*q-(+f[d+328>>2]*w+ +f[d+332>>2]*u+ +f[d+336>>2]*q);if((y|0)==1){if(!(e<0.0))break;if(!(+f[j>>2]<-(g*e)))break;f[j>>2]=-(g*e);break}else{if(!(e>0.0))break;if(!(+f[j>>2]>-(g*e)))break;f[j>>2]=-(g*e);break}}while(0);f[j>>2]=+f[b+248>>2]*+f[j>>2];return}function ub(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0.0,z=0;z=ea;ea=ea+112|0;c[b+164>>2]=1065353216;c[b+168>>2]=1065353216;c[b+172>>2]=1065353216;f[b+176>>2]=0.0;c[b+180>>2]=0;f[b+184>>2]=999999984306749440.0;c[b+188>>2]=0;c[b+188+4>>2]=0;c[b+188+8>>2]=0;c[b+188+12>>2]=0;c[b+204>>2]=1;c[b+208>>2]=-1;c[b+212>>2]=-1;c[b+216>>2]=1;f[b+220>>2]=0.0;f[b+224>>2]=.5;f[b+228>>2]=0.0;f[b+232>>2]=0.0;c[b+236>>2]=1;c[b+240>>2]=0;f[b+244>>2]=1.0;c[b+248>>2]=0;c[b+248+4>>2]=0;c[b+248+8>>2]=0;c[b+248+12>>2]=0;c[b+4>>2]=1065353216;c[b+8>>2]=0;c[b+8+4>>2]=0;c[b+8+8>>2]=0;c[b+8+12>>2]=0;c[b+24>>2]=1065353216;c[b+28>>2]=0;c[b+28+4>>2]=0;c[b+28+8>>2]=0;c[b+28+12>>2]=0;c[b+44>>2]=1065353216;c[b+48>>2]=0;c[b+48+4>>2]=0;c[b+48+8>>2]=0;c[b+48+12>>2]=0;c[b+48+16>>2]=0;c[b>>2]=4244;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;c[b+272>>2]=0;c[b+284>>2]=0;a[b+408>>0]=1;c[b+404>>2]=0;c[b+396>>2]=0;c[b+400>>2]=0;a[b+428>>0]=1;c[b+424>>2]=0;c[b+416>>2]=0;c[b+420>>2]=0;a[b+448>>0]=1;c[b+444>>2]=0;c[b+436>>2]=0;c[b+440>>2]=0;a[b+496>>0]=1;c[b+492>>2]=0;c[b+484>>2]=0;c[b+488>>2]=0;a[b+516>>0]=1;c[b+512>>2]=0;c[b+504>>2]=0;c[b+508>>2]=0;c[b+684>>2]=d;a[b+704>>0]=1;c[b+700>>2]=0;c[b+692>>2]=0;c[b+696>>2]=0;a[b+724>>0]=1;c[b+720>>2]=0;c[b+712>>2]=0;c[b+716>>2]=0;a[b+744>>0]=1;c[b+740>>2]=0;c[b+732>>2]=0;c[b+736>>2]=0;a[b+764>>0]=1;c[b+760>>2]=0;c[b+752>>2]=0;c[b+756>>2]=0;a[b+784>>0]=1;c[b+780>>2]=0;c[b+772>>2]=0;c[b+776>>2]=0;a[b+804>>0]=1;c[b+800>>2]=0;c[b+792>>2]=0;c[b+796>>2]=0;a[b+824>>0]=1;c[b+820>>2]=0;c[b+812>>2]=0;c[b+816>>2]=0;a[b+844>>0]=1;c[b+840>>2]=0;c[b+832>>2]=0;c[b+836>>2]=0;a[b+864>>0]=1;c[b+860>>2]=0;c[b+852>>2]=0;c[b+856>>2]=0;a[b+884>>0]=1;c[b+880>>2]=0;c[b+872>>2]=0;c[b+876>>2]=0;a[b+964>>0]=1;c[b+960>>2]=0;c[b+952>>2]=0;c[b+956>>2]=0;a[b+984>>0]=1;c[b+980>>2]=0;c[b+972>>2]=0;c[b+976>>2]=0;c[b+928>>2]=0;c[b+932>>2]=0;c[b+936>>2]=-1;c[b+940>>2]=0;c[b+944>>2]=0;a[b+1024>>0]=1;c[b+1020>>2]=0;c[b+1012>>2]=0;c[b+1016>>2]=0;a[b+1044>>0]=1;c[b+1040>>2]=0;c[b+1032>>2]=0;c[b+1036>>2]=0;c[b+988>>2]=0;c[b+992>>2]=0;c[b+996>>2]=-1;c[b+1e3>>2]=0;c[b+1004>>2]=0;a[b+1084>>0]=1;c[b+1080>>2]=0;c[b+1072>>2]=0;c[b+1076>>2]=0;a[b+1104>>0]=1;c[b+1100>>2]=0;c[b+1092>>2]=0;c[b+1096>>2]=0;c[b+1048>>2]=0;c[b+1052>>2]=0;c[b+1056>>2]=-1;c[b+1060>>2]=0;c[b+1064>>2]=0;a[b+1124>>0]=1;c[b+1120>>2]=0;c[b+1112>>2]=0;c[b+1116>>2]=0;a[b+1144>>0]=1;c[b+1140>>2]=0;c[b+1132>>2]=0;c[b+1136>>2]=0;a[b+1248>>0]=1;c[b+1244>>2]=0;c[b+1236>>2]=0;c[b+1240>>2]=0;c[b+236>>2]=8;c[b+288>>2]=0;f[b+292>>2]=1.0;c[b+296>>2]=0;c[b+296+4>>2]=0;c[b+296+8>>2]=0;c[b+296+12>>2]=0;c[b+296+16>>2]=0;f[b+316>>2]=.20000000298023224;f[b+320>>2]=0.0;f[b+324>>2]=1.0;f[b+328>>2]=.10000000149011612;f[b+332>>2]=1.0;f[b+336>>2]=.699999988079071;f[b+340>>2]=.10000000149011612;f[b+344>>2]=1.0;f[b+348>>2]=.5;f[b+352>>2]=.5;f[b+356>>2]=.5;f[b+360>>2]=.5;f[b+364>>2]=1.0;f[b+368>>2]=1.0;c[b+372>>2]=0;c[b+376>>2]=1;c[b+380>>2]=0;c[b+384>>2]=4;c[b+388>>2]=1;a[b+472>>0]=0;a[b+473>>0]=0;f[b+476>>2]=0.0;c[b+520>>2]=0;c[b+520+4>>2]=0;c[b+520+8>>2]=0;c[b+520+12>>2]=0;c[b+536>>2]=1065353216;c[b+540>>2]=0;c[b+540+4>>2]=0;c[b+540+8>>2]=0;c[b+540+12>>2]=0;c[b+556>>2]=1065353216;c[b+560>>2]=0;c[b+560+4>>2]=0;c[b+560+8>>2]=0;c[b+560+12>>2]=0;c[b+576>>2]=1065353216;f[b+580>>2]=0.0;c[b+584>>2]=1065353216;c[b+588>>2]=0;c[b+588+4>>2]=0;c[b+588+8>>2]=0;c[b+588+12>>2]=0;c[b+604>>2]=1065353216;c[b+608>>2]=0;c[b+608+4>>2]=0;c[b+608+8>>2]=0;c[b+608+12>>2]=0;c[b+624>>2]=1065353216;f[b+628>>2]=0.0;c[b+680>>2]=0;f[b+888>>2]=0.0;a[b+924>>0]=1;c[b+892>>2]=0;c[b+892+4>>2]=0;c[b+892+8>>2]=0;c[b+892+12>>2]=0;c[b+892+16>>2]=0;c[b+892+20>>2]=0;c[b+892+24>>2]=0;c[b+892+28>>2]=0;c[b+4>>2]=1065353216;c[b+8>>2]=0;c[b+8+4>>2]=0;c[b+8+8>>2]=0;c[b+8+12>>2]=0;c[b+24>>2]=1065353216;c[b+28>>2]=0;c[b+28+4>>2]=0;c[b+28+8>>2]=0;c[b+28+12>>2]=0;c[b+44>>2]=1065353216;c[b+48>>2]=0;c[b+48+4>>2]=0;c[b+48+8>>2]=0;c[b+48+12>>2]=0;c[b+48+16>>2]=0;d=c[b+404>>2]|0;if(d|0){if(a[b+408>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+404>>2]=0}a[b+408>>0]=1;c[b+404>>2]=0;c[b+396>>2]=0;c[b+400>>2]=0;d=c[b+424>>2]|0;if(d|0){if(a[b+428>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=0;c[b+416>>2]=0;c[b+420>>2]=0;d=c[b+444>>2]|0;do if(d){if(!(a[b+448>>0]|0)){c[b+444>>2]=0;a[b+448>>0]=1;c[b+444>>2]=0;c[b+436>>2]=0;c[b+440>>2]=0;d=1;u=17;break}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);i=c[b+416>>2]|0;d=c[b+420>>2]|0;c[b+444>>2]=0;a[b+448>>0]=1;c[b+444>>2]=0;c[b+436>>2]=0;c[b+440>>2]=0;if((i|0)==(d|0))if(d)if((d|0)<(d<<1|0))if(!(d<<1)){i=d;d=d<<1;j=0;u=20}else{d=d<<1;u=17}else i=d;else{d=1;u=17}}else{a[b+448>>0]=1;c[b+444>>2]=0;c[b+436>>2]=0;c[b+440>>2]=0;d=1;u=17}while(0);if((u|0)==17){c[6747]=(c[6747]|0)+1;i=kb((d<<2|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+416>>2]|0;u=20}if((u|0)==20){l=c[b+424>>2]|0;if((i|0)<=0){if(l)u=24}else{k=0;do{c[j+(k<<2)>>2]=c[l+(k<<2)>>2];k=k+1|0}while((k|0)!=(i|0));u=24}if((u|0)==24){if(a[b+428>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);i=c[b+416>>2]|0}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=j;c[b+420>>2]=d}k=c[b+424>>2]|0;c[k+(i<<2)>>2]=1;j=i+1|0;c[b+416>>2]=j;if((j|0)==(d|0)){l=(d|0)==0?1:d<<1;if((d|0)<(l|0)){if(!l)i=0;else{c[6747]=(c[6747]|0)+1;d=kb((l<<2|3)+16|0)|0;if(!d)i=0;else{c[(d+4+15&-16)+-4>>2]=d;i=d+4+15&-16}d=c[b+416>>2]|0;k=c[b+424>>2]|0}if((d|0)<=0){if(k)u=38}else{j=0;do{c[i+(j<<2)>>2]=c[k+(j<<2)>>2];j=j+1|0}while((j|0)!=(d|0));u=38}if((u|0)==38){if(a[b+428>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);d=c[b+416>>2]|0}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=i;c[b+420>>2]=l;j=d;d=l}else{i=k;j=d}}else i=k;c[i+(j<<2)>>2]=2;j=j+1|0;c[b+416>>2]=j;if((j|0)==(d|0)){l=(d|0)==0?1:d<<1;if((d|0)<(l|0)){if(!l)k=0;else{c[6747]=(c[6747]|0)+1;d=kb((l<<2|3)+16|0)|0;if(!d)j=0;else{c[(d+4+15&-16)+-4>>2]=d;j=d+4+15&-16}d=c[b+416>>2]|0;i=c[b+424>>2]|0;k=j}if((d|0)<=0){if(i)u=52}else{j=0;do{c[k+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(d|0));u=52}if((u|0)==52){if(a[b+428>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);d=c[b+416>>2]|0}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=k;c[b+420>>2]=l;i=k;j=d;d=l}else j=d}c[i+(j<<2)>>2]=3;j=j+1|0;c[b+416>>2]=j;if((j|0)==(d|0)){l=(d|0)==0?1:d<<1;if((d|0)<(l|0)){if(!l)k=0;else{c[6747]=(c[6747]|0)+1;d=kb((l<<2|3)+16|0)|0;if(!d)j=0;else{c[(d+4+15&-16)+-4>>2]=d;j=d+4+15&-16}d=c[b+416>>2]|0;i=c[b+424>>2]|0;k=j}if((d|0)<=0){if(i)u=66}else{j=0;do{c[k+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(d|0));u=66}if((u|0)==66){if(a[b+428>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);d=c[b+416>>2]|0}c[b+424>>2]=0}a[b+428>>0]=1;c[b+424>>2]=k;c[b+420>>2]=l;i=k}}else d=j;c[i+(d<<2)>>2]=0;c[b+416>>2]=d+1;c[6747]=(c[6747]|0)+1;d=kb(39)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}c[d+8>>2]=0;c[d>>2]=4352;c[d+4>>2]=32;c[d+16>>2]=b;c[b+192>>2]=d;f[d+12>>2]=.25;c[b+1148>>2]=1065353216;c[b+1152>>2]=0;c[b+1152+4>>2]=0;c[b+1152+8>>2]=0;c[b+1152+12>>2]=0;c[b+1168>>2]=1065353216;c[b+1172>>2]=0;c[b+1172+4>>2]=0;c[b+1172+8>>2]=0;c[b+1172+12>>2]=0;c[b+1188>>2]=1065353216;u=b+1192|0;v=u+36|0;do{c[u>>2]=0;u=u+4|0}while((u|0)<(v|0));f[b+1228>>2]=1.0;x=pg(b)|0;f[x+4>>2]=1.0;f[x+8>>2]=1.0;f[x+12>>2]=1.0;c[x+16>>2]=1;u=c[b+192>>2]|0;y=+ha[c[(c[u>>2]|0)+48>>2]&15](u);u=z;v=u+100|0;do{c[u>>2]=0;u=u+4|0}while((u|0)<(v|0));l=c[b+712>>2]|0;if((l|0)<(e|0)){if((c[b+716>>2]|0)<(e|0)){if(!e){i=l;j=0}else{c[6747]=(c[6747]|0)+1;d=kb((e*104|3)+16|0)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}i=c[b+712>>2]|0;j=d}if((i|0)>0){d=0;do{u=j+(d*104|0)|0;k=(c[b+720>>2]|0)+(d*104|0)|0;v=u+104|0;do{c[u>>2]=c[k>>2];u=u+4|0;k=k+4|0}while((u|0)<(v|0));d=d+1|0}while((d|0)!=(i|0))}d=c[b+720>>2]|0;if(d|0){if(a[b+724>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+720>>2]=0}a[b+724>>0]=1;c[b+720>>2]=j;c[b+716>>2]=e}d=l;do{u=c[b+720>>2]|0;c[u+(d*104|0)>>2]=0;u=u+(d*104|0)+4|0;k=z;v=u+100|0;do{c[u>>2]=c[k>>2];u=u+4|0;k=k+4|0}while((u|0)<(v|0));d=d+1|0}while((d|0)!=(e|0))}c[b+712>>2]=e;if((e|0)>0){w=0;i=h;d=g;while(1){k=c[b+720>>2]|0;l=k+(w*104|0)|0;u=l;v=u+104|0;do{c[u>>2]=0;u=u+4|0}while((u|0)<(v|0));if(!d){p=0.0;n=0.0;o=0.0;m=0.0;d=0}else{p=+f[d+8>>2];n=+f[d>>2];o=+f[d+4>>2];m=+f[d+12>>2];d=d+16|0}h=k+(w*104|0)+8|0;f[h>>2]=n;f[k+(w*104|0)+12>>2]=o;f[k+(w*104|0)+16>>2]=p;f[k+(w*104|0)+20>>2]=m;g=k+(w*104|0)+24|0;c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];c[g+12>>2]=c[h+12>>2];if(!i){m=1.0;j=0}else{m=+f[i>>2];j=i+4|0}f[k+(w*104|0)+88>>2]=m>0.0?1.0/m:0.0;r=n-y;t=o-y;s=p-y;q=y+n;n=y+o;m=y+p;i=c[b+932>>2]|0;if(!i){c[6747]=(c[6747]|0)+1;i=kb(63)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}u=i;v=u+44|0;do{c[u>>2]=0;u=u+4|0}while((u|0)<(v|0))}else c[b+932>>2]=0;c[i+32>>2]=0;c[i+36>>2]=l;c[i+40>>2]=0;f[i>>2]=r;f[i+4>>2]=t;f[i+8>>2]=s;f[i+12>>2]=0.0;f[i+16>>2]=q;f[i+20>>2]=n;f[i+24>>2]=m;f[i+28>>2]=0.0;je(b+928|0,c[b+928>>2]|0,i);c[b+940>>2]=(c[b+940>>2]|0)+1;c[k+(w*104|0)+96>>2]=i;c[k+(w*104|0)+4>>2]=x;w=w+1|0;if((w|0)==(e|0))break;else i=j}}d=c[b+928>>2]|0;if(!d){c[b+892>>2]=0;c[b+892+4>>2]=0;c[b+892+8>>2]=0;c[b+892+12>>2]=0;c[b+892+16>>2]=0;c[b+892+20>>2]=0;c[b+892+24>>2]=0;c[b+892+28>>2]=0;ea=z;return}e=c[b+192>>2]|0;s=+ha[c[(c[e>>2]|0)+48>>2]&15](e);y=+f[d+4>>2]-s;t=+f[d+8>>2]-s;f[b+892>>2]=+f[d>>2]-s;f[b+896>>2]=y;f[b+900>>2]=t;f[b+904>>2]=0.0;t=s+ +f[d+20>>2];y=s+ +f[d+24>>2];f[b+908>>2]=s+ +f[d+16>>2];f[b+912>>2]=t;f[b+916>>2]=y;f[b+920>>2]=0.0;d=c[b+188>>2]|0;if(!d){ea=z;return}e=c[b+684>>2]|0;g=c[e+32>>2]|0;Ta[c[(c[g>>2]|0)+16>>2]&31](g,d,b+892|0,b+908|0,c[e+36>>2]|0);ea=z;return}function vb(d,g,h){d=d|0;g=g|0;h=h|0;var i=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0.0,M=0.0;J=ea;ea=ea+96|0;G=c[d+56>>2]|0;if((h-g|0)==1){if(!(a[d+60>>0]|0)){p=(c[d+96>>2]|0)+(G<<6)|0;q=(c[d+76>>2]|0)+(g<<6)|0;r=p+64|0;do{c[p>>2]=c[q>>2];p=p+4|0;q=q+4|0}while((p|0)<(r|0))}else{H=(c[d+116>>2]|0)+(g<<4)|0;I=(c[d+136>>2]|0)+(G<<4)|0;c[I>>2]=c[H>>2];c[I+4>>2]=c[H+4>>2];c[I+8>>2]=c[H+8>>2];c[I+12>>2]=c[H+12>>2]}c[d+56>>2]=(c[d+56>>2]|0)+1;ea=J;return}if((h|0)>(g|0)){n=(a[d+60>>0]|0)==0;if(n){i=c[d+76>>2]|0;l=0.0;k=0.0;m=0.0;j=g;do{k=k+(+f[i+(j<<6)+16>>2]+ +f[i+(j<<6)>>2])*.5;m=m+(+f[i+(j<<6)+20>>2]+ +f[i+(j<<6)+4>>2])*.5;l=l+(+f[i+(j<<6)+24>>2]+ +f[i+(j<<6)+8>>2])*.5;j=j+1|0}while((j|0)!=(h|0))}else{i=c[d+116>>2]|0;o=+f[d+36>>2];s=+f[d+40>>2];t=+f[d+44>>2];w=+f[d+4>>2];x=+f[d+8>>2];y=+f[d+12>>2];k=0.0;m=0.0;l=0.0;j=g;do{k=k+(+(e[i+(j<<4)+6>>1]|0)/o+w+(+(e[i+(j<<4)>>1]|0)/o+w))*.5;m=m+(+(e[i+(j<<4)+8>>1]|0)/s+x+(+(e[i+(j<<4)+2>>1]|0)/s+x))*.5;l=l+(+(e[i+(j<<4)+10>>1]|0)/t+y+(+(e[i+(j<<4)+4>>1]|0)/t+y))*.5;j=j+1|0}while((j|0)!=(h|0))}B=1.0/+(h-g|0);D=B*k;C=B*m;B=B*l;if(n){i=c[d+76>>2]|0;k=0.0;m=0.0;o=0.0;j=g;do{w=(+f[i+(j<<6)+16>>2]+ +f[i+(j<<6)>>2])*.5-D;x=(+f[i+(j<<6)+20>>2]+ +f[i+(j<<6)+4>>2])*.5-C;y=(+f[i+(j<<6)+24>>2]+ +f[i+(j<<6)+8>>2])*.5-B;k=k+w*w;m=m+x*x;o=o+y*y;j=j+1|0}while((j|0)!=(h|0));l=+(h-g|0)}else{i=c[d+116>>2]|0;l=+f[d+36>>2];s=+f[d+40>>2];t=+f[d+44>>2];w=+f[d+4>>2];x=+f[d+8>>2];y=+f[d+12>>2];k=0.0;m=0.0;o=0.0;j=g;do{M=(+(e[i+(j<<4)+6>>1]|0)/l+w+(+(e[i+(j<<4)>>1]|0)/l+w))*.5-D;L=(+(e[i+(j<<4)+8>>1]|0)/s+x+(+(e[i+(j<<4)+2>>1]|0)/s+x))*.5-C;K=(+(e[i+(j<<4)+10>>1]|0)/t+y+(+(e[i+(j<<4)+4>>1]|0)/t+y))*.5-B;k=k+M*M;m=m+L*L;o=o+K*K;j=j+1|0}while((j|0)!=(h|0));l=+(h-g|0)}}else{o=0.0;m=0.0;k=0.0;l=+(h-g|0)}M=1.0/(l+-1.0);L=M*k;K=M*m;M=M*o;v=L>2]=0;c[J+16+4>>2]=0;c[J+16+8>>2]=0;c[J+16+12>>2]=0;if((h|0)>(g|0)){if(!(a[d+60>>0]|0)){i=c[d+76>>2]|0;l=0.0;k=0.0;m=0.0;j=g;do{m=(+f[i+(j<<6)+16>>2]+ +f[i+(j<<6)>>2])*.5+m;l=(+f[i+(j<<6)+20>>2]+ +f[i+(j<<6)+4>>2])*.5+l;k=(+f[i+(j<<6)+24>>2]+ +f[i+(j<<6)+8>>2])*.5+k;j=j+1|0}while((j|0)!=(h|0))}else{i=c[d+116>>2]|0;o=+f[d+36>>2];s=+f[d+40>>2];t=+f[d+44>>2];w=+f[d+4>>2];x=+f[d+8>>2];y=+f[d+12>>2];l=0.0;k=0.0;m=0.0;j=g;do{m=(+(e[i+(j<<4)+6>>1]|0)/o+w+(+(e[i+(j<<4)>>1]|0)/o+w))*.5+m;l=(+(e[i+(j<<4)+8>>1]|0)/s+x+(+(e[i+(j<<4)+2>>1]|0)/s+x))*.5+l;k=(+(e[i+(j<<4)+10>>1]|0)/t+y+(+(e[i+(j<<4)+4>>1]|0)/t+y))*.5+k;j=j+1|0}while((j|0)!=(h|0))}f[J+16>>2]=m;f[J+16+4>>2]=l;f[J+16+8>>2]=k;i=J+16|0}else{m=0.0;l=0.0;k=0.0;i=J+16|0}f[i>>2]=1.0/+(h-g|0)*m;f[J+16+4>>2]=1.0/+(h-g|0)*l;f[J+16+8>>2]=1.0/+(h-g|0)*k;w=+f[J+16+(v<<2)>>2];if((h|0)>(g|0)){u=g;i=g;do{j=(a[d+60>>0]|0)==0;if(j){F=c[d+76>>2]|0;k=+f[F+(u<<6)+16>>2];l=+f[F+(u<<6)+20>>2];m=+f[F+(u<<6)+24>>2];o=+f[F+(u<<6)>>2];s=+f[F+(u<<6)+4>>2];t=+f[F+(u<<6)+8>>2]}else{F=c[d+116>>2]|0;K=+f[d+36>>2];L=+f[d+40>>2];M=+f[d+44>>2];o=+f[d+4>>2];s=+f[d+8>>2];t=+f[d+12>>2];k=+(e[F+(u<<4)+6>>1]|0)/K+o;l=+(e[F+(u<<4)+8>>1]|0)/L+s;m=+(e[F+(u<<4)+10>>1]|0)/M+t;o=+(e[F+(u<<4)>>1]|0)/K+o;s=+(e[F+(u<<4)+2>>1]|0)/L+s;t=+(e[F+(u<<4)+4>>1]|0)/M+t}f[J>>2]=(k+o)*.5;f[J+4>>2]=(l+s)*.5;f[J+8>>2]=(m+t)*.5;f[J+12>>2]=0.0;if(+f[J+(v<<2)>>2]>w){if(j){j=c[d+76>>2]|0;n=j+(u<<6)|0;p=J+32|0;q=n;r=p+64|0;do{c[p>>2]=c[q>>2];p=p+4|0;q=q+4|0}while((p|0)<(r|0));p=n;q=j+(i<<6)|0;r=p+64|0;do{c[p>>2]=c[q>>2];p=p+4|0;q=q+4|0}while((p|0)<(r|0));p=(c[d+76>>2]|0)+(i<<6)|0;q=J+32|0;r=p+64|0;do{c[p>>2]=c[q>>2];p=p+4|0;q=q+4|0}while((p|0)<(r|0))}else{E=c[d+116>>2]|0;F=E+(u<<4)|0;c[J+32>>2]=c[F>>2];c[J+32+4>>2]=c[F+4>>2];c[J+32+8>>2]=c[F+8>>2];c[J+32+12>>2]=c[F+12>>2];E=E+(i<<4)|0;c[F>>2]=c[E>>2];c[F+4>>2]=c[E+4>>2];c[F+8>>2]=c[E+8>>2];c[F+12>>2]=c[E+12>>2];F=(c[d+116>>2]|0)+(i<<4)|0;c[F>>2]=c[J+32>>2];c[F+4>>2]=c[J+32+4>>2];c[F+8>>2]=c[J+32+8>>2];c[F+12>>2]=c[J+32+12>>2]}i=i+1|0}u=u+1|0}while((u|0)!=(h|0))}else i=g;if(!((i|0)>(((h-g|0)/3|0)+g|0)?(i|0)<(h+-1-((h-g|0)/3|0)|0):0))i=(1?h-g>>1:h-g|0)+g|0;F=c[d+56>>2]|0;if(!(a[d+60>>0]|0)){E=(c[d+96>>2]|0)+(F<<6)|0;c[E>>2]=c[d+20>>2];c[E+4>>2]=c[d+20+4>>2];c[E+8>>2]=c[d+20+8>>2];c[E+12>>2]=c[d+20+12>>2]}else{E=c[d+136>>2]|0;L=(+f[d+24>>2]-+f[d+8>>2])*+f[d+40>>2];M=(+f[d+28>>2]-+f[d+12>>2])*+f[d+44>>2];b[E+(F<<4)>>1]=~~((+f[d+20>>2]-+f[d+4>>2])*+f[d+36>>2])&65535&-2;b[E+(F<<4)+2>>1]=~~L&65535&-2;b[E+(F<<4)+4>>1]=~~M&65535&-2}j=c[d+56>>2]|0;if(!(a[d+60>>0]|0)){E=(c[d+96>>2]|0)+(j<<6)+16|0;c[E>>2]=c[d+4>>2];c[E+4>>2]=c[d+4+4>>2];c[E+8>>2]=c[d+4+8>>2];c[E+12>>2]=c[d+4+12>>2]}else{E=c[d+136>>2]|0;K=+f[d+4>>2];L=+f[d+8>>2];M=+f[d+12>>2];L=(L-L)*+f[d+40>>2];M=(M-M)*+f[d+44>>2];b[E+(j<<4)+6>>1]=~~((K-K)*+f[d+36>>2]+1.0)&65535|1;b[E+(j<<4)+8>>1]=~~(L+1.0)&65535|1;b[E+(j<<4)+10>>1]=~~(M+1.0)&65535|1}E=c[d+56>>2]|0;if((h|0)>(g|0)){z=a[d+60>>0]|0;A=g;do{if(!(z<<24>>24)){j=c[d+76>>2]|0;k=+f[j+(A<<6)>>2];m=+f[j+(A<<6)+4>>2];o=+f[j+(A<<6)+8>>2];l=+f[j+(A<<6)+12>>2];s=+f[j+(A<<6)+16>>2];x=+f[j+(A<<6)+20>>2];t=+f[j+(A<<6)+24>>2];w=+f[j+(A<<6)+28>>2];j=c[d+96>>2]|0;if(k<+f[j+(E<<6)>>2])f[j+(E<<6)>>2]=k;if(m<+f[j+(E<<6)+4>>2])f[j+(E<<6)+4>>2]=m;if(o<+f[j+(E<<6)+8>>2])f[j+(E<<6)+8>>2]=o;if(l<+f[j+(E<<6)+12>>2])f[j+(E<<6)+12>>2]=l;if(+f[j+(E<<6)+16>>2]>2]=s;if(+f[j+(E<<6)+20>>2]>2]=x;if(+f[j+(E<<6)+24>>2]>2]=t;if(+f[j+(E<<6)+28>>2]>2]=w}else{u=c[d+116>>2]|0;s=+f[d+36>>2];y=+f[d+40>>2];K=+f[d+44>>2];t=+f[d+4>>2];B=+f[d+8>>2];L=+f[d+12>>2];w=+f[d+4>>2];C=+f[d+8>>2];M=+f[d+12>>2];o=+f[d+36>>2];x=+f[d+40>>2];D=+f[d+44>>2];j=~~((+(e[u+(A<<4)>>1]|0)/s+t-w)*o)&65535&-2;n=~~((+(e[u+(A<<4)+2>>1]|0)/y+B-C)*x)&65535&-2;p=~~((+(e[u+(A<<4)+4>>1]|0)/K+L-M)*D)&65535&-2;q=~~(o*(+(e[u+(A<<4)+6>>1]|0)/s+t-w)+1.0)&65535|1;r=~~(x*(+(e[u+(A<<4)+8>>1]|0)/y+B-C)+1.0)&65535|1;u=~~(D*(+(e[u+(A<<4)+10>>1]|0)/K+L-M)+1.0)&65535|1;v=c[d+136>>2]|0;if((e[v+(E<<4)>>1]|0)>(j&65535))b[v+(E<<4)>>1]=j;if((e[v+(E<<4)+6>>1]|0)<(q&65535))b[v+(E<<4)+6>>1]=q;if((e[v+(E<<4)+2>>1]|0)>(n&65535))b[v+(E<<4)+2>>1]=n;if((e[v+(E<<4)+8>>1]|0)<(r&65535))b[v+(E<<4)+8>>1]=r;if((e[v+(E<<4)+4>>1]|0)>(p&65535))b[v+(E<<4)+4>>1]=p;if((e[v+(E<<4)+10>>1]|0)<(u&65535))b[v+(E<<4)+10>>1]=u}A=A+1|0}while((A|0)!=(h|0))}c[d+56>>2]=E+1;vb(d,g,i);z=c[d+56>>2]|0;vb(d,i,h);v=(c[d+56>>2]|0)-G|0;i=a[d+60>>0]|0;if(i<<24>>24!=0&(v|0)>128){r=c[d+136>>2]|0;q=c[r+(E+1<<4)+12>>2]|0;q=(q|0)>-1?1:0-q|0;u=c[r+(z<<4)+12>>2]|0;u=(u|0)>-1?1:0-u|0;if((q|0)<129){p=c[d+152>>2]|0;if((p|0)==(c[d+156>>2]|0)?(H=(p|0)==0?1:p<<1,(p|0)<(H|0)):0){if(!H){j=p;n=0}else{c[6747]=(c[6747]|0)+1;i=kb(H<<5|19)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=c[d+152>>2]|0;n=i}if((j|0)>0){i=0;do{h=n+(i<<5)|0;G=(c[d+160>>2]|0)+(i<<5)|0;c[h>>2]=c[G>>2];c[h+4>>2]=c[G+4>>2];c[h+8>>2]=c[G+8>>2];c[h+12>>2]=c[G+12>>2];c[h+16>>2]=c[G+16>>2];c[h+20>>2]=c[G+20>>2];c[h+24>>2]=c[G+24>>2];c[h+28>>2]=c[G+28>>2];i=i+1|0}while((i|0)!=(j|0))}i=c[d+160>>2]|0;if(i|0){if(a[d+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=n;c[d+156>>2]=H;i=c[d+152>>2]|0}else i=p;c[d+152>>2]=i+1;H=(c[d+160>>2]|0)+(p<<5)|0;c[H>>2]=c[J+32>>2];c[H+4>>2]=c[J+32+4>>2];c[H+8>>2]=c[J+32+8>>2];c[H+12>>2]=c[J+32+12>>2];c[H+16>>2]=c[J+32+16>>2];c[H+20>>2]=c[J+32+20>>2];c[H+24>>2]=c[J+32+24>>2];c[H+28>>2]=c[J+32+28>>2];H=c[d+160>>2]|0;b[H+(p<<5)>>1]=b[r+(E+1<<4)>>1]|0;b[H+(p<<5)+2>>1]=b[r+(E+1<<4)+2>>1]|0;b[H+(p<<5)+4>>1]=b[r+(E+1<<4)+4>>1]|0;b[H+(p<<5)+6>>1]=b[r+(E+1<<4)+6>>1]|0;b[H+(p<<5)+8>>1]=b[r+(E+1<<4)+8>>1]|0;b[H+(p<<5)+10>>1]=b[r+(E+1<<4)+10>>1]|0;c[H+(p<<5)+12>>2]=E+1;c[H+(p<<5)+16>>2]=q}if((u|0)<129){p=c[d+152>>2]|0;if((p|0)==(c[d+156>>2]|0)?(I=(p|0)==0?1:p<<1,(p|0)<(I|0)):0){if(!I){j=p;n=0}else{c[6747]=(c[6747]|0)+1;i=kb(I<<5|19)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=c[d+152>>2]|0;n=i}if((j|0)>0){i=0;do{H=n+(i<<5)|0;h=(c[d+160>>2]|0)+(i<<5)|0;c[H>>2]=c[h>>2];c[H+4>>2]=c[h+4>>2];c[H+8>>2]=c[h+8>>2];c[H+12>>2]=c[h+12>>2];c[H+16>>2]=c[h+16>>2];c[H+20>>2]=c[h+20>>2];c[H+24>>2]=c[h+24>>2];c[H+28>>2]=c[h+28>>2];i=i+1|0}while((i|0)!=(j|0))}i=c[d+160>>2]|0;if(i|0){if(a[d+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=n;c[d+156>>2]=I;i=c[d+152>>2]|0}else i=p;c[d+152>>2]=i+1;i=(c[d+160>>2]|0)+(p<<5)|0;c[i>>2]=c[J+32>>2];c[i+4>>2]=c[J+32+4>>2];c[i+8>>2]=c[J+32+8>>2];c[i+12>>2]=c[J+32+12>>2];c[i+16>>2]=c[J+32+16>>2];c[i+20>>2]=c[J+32+20>>2];c[i+24>>2]=c[J+32+24>>2];c[i+28>>2]=c[J+32+28>>2];i=c[d+160>>2]|0;b[i+(p<<5)>>1]=b[r+(z<<4)>>1]|0;b[i+(p<<5)+2>>1]=b[r+(z<<4)+2>>1]|0;b[i+(p<<5)+4>>1]=b[r+(z<<4)+4>>1]|0;b[i+(p<<5)+6>>1]=b[r+(z<<4)+6>>1]|0;b[i+(p<<5)+8>>1]=b[r+(z<<4)+8>>1]|0;b[i+(p<<5)+10>>1]=b[r+(z<<4)+10>>1]|0;c[i+(p<<5)+12>>2]=z;c[i+(p<<5)+16>>2]=u;i=d+152|0}else i=d+152|0;c[d+168>>2]=c[i>>2];i=a[d+60>>0]|0}if(!(i<<24>>24)){c[(c[d+96>>2]|0)+(F<<6)+32>>2]=v;ea=J;return}else{c[(c[d+136>>2]|0)+(F<<4)+12>>2]=0-v;ea=J;return}}function wb(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var 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.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0,ba=0,ca=0,da=0,fa=0,ga=0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0;ga=ea;ea=ea+176|0;ca=c[d+4>>2]|0;da=c[e+4>>2]|0;if((c[ca+68>>2]|0)==(c[b+40>>2]|0)?(c[da+68>>2]|0)==(c[b+44>>2]|0):0)ba=b+8|0;else{i=c[b+8>>2]|0;j=c[i+8>>2]|0;if((j|0)>0){l=0;do{k=c[(c[i+16>>2]|0)+(l*12|0)+8>>2]|0;if(k|0){Ca[c[c[k>>2]>>2]&511](k);ba=c[b+4>>2]|0;Ia[c[(c[ba>>2]|0)+60>>2]&127](ba,k)}l=l+1|0}while((l|0)!=(j|0));i=c[b+8>>2]|0}$g(i);ba=b+8|0}a[ga+128+16>>0]=1;o=ga+128+12|0;c[o>>2]=0;c[ga+128+4>>2]=0;c[ga+128+8>>2]=0;n=c[ba>>2]|0;i=c[n+8>>2]|0;if((i|0)>0){m=0;do{j=c[(c[n+16>>2]|0)+(m*12|0)+8>>2]|0;if(j){Ia[c[(c[j>>2]|0)+16>>2]&127](j,ga+128|0);i=c[ga+128+4>>2]|0;if((i|0)>0){l=0;do{k=c[(c[o>>2]|0)+(l<<2)>>2]|0;if(c[k+748>>2]|0){c[h+4>>2]=k;i=c[k+740>>2]|0;j=c[(c[h+8>>2]|0)+8>>2]|0;if((i|0)==(j|0))Hd(k,i+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);else Hd(k,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,j+4|0);c[h+4>>2]=0;i=c[ga+128+4>>2]|0}l=l+1|0}while((l|0)<(i|0))}if((i|0)<0){if((c[ga+128+8>>2]|0)<0){j=c[o>>2]|0;if(j|0){if(a[ga+128+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[o>>2]=0}a[ga+128+16>>0]=1;c[o>>2]=0;c[ga+128+8>>2]=0}do{c[(c[o>>2]|0)+(i<<2)>>2]=0;i=i+1|0}while((i|0)!=0)}c[ga+128+4>>2]=0;i=c[n+8>>2]|0}m=m+1|0}while((m|0)<(i|0));i=c[o>>2]|0;if(i|0){if(a[ga+128+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[o>>2]=0}}j=c[ca+64>>2]|0;k=c[da+64>>2]|0;s=c[b+4>>2]|0;t=c[ba>>2]|0;u=c[b+32>>2]|0;c[ga+128>>2]=7368;c[ga+128+4>>2]=0;c[ga+128+8>>2]=d;c[ga+128+12>>2]=e;c[ga+128+16>>2]=s;c[ga+128+20>>2]=g;c[ga+128+24>>2]=h;c[ga+128+28>>2]=t;c[ga+128+32>>2]=u;u=c[d+12>>2]|0;E=+f[u>>2];F=+f[u+16>>2];G=+f[u+32>>2];H=+f[u+4>>2];I=+f[u+20>>2];J=+f[u+36>>2];K=+f[u+8>>2];L=+f[u+24>>2];M=+f[u+40>>2];Z=-+f[u+48>>2];_=-+f[u+52>>2];$=-+f[u+56>>2];u=c[e+12>>2]|0;N=+f[u>>2];O=+f[u+16>>2];P=+f[u+32>>2];Q=+f[u+4>>2];R=+f[u+20>>2];S=+f[u+36>>2];T=+f[u+8>>2];U=+f[u+24>>2];V=+f[u+40>>2];W=+f[u+48>>2];X=+f[u+52>>2];Y=+f[u+56>>2];j=c[j>>2]|0;k=c[k>>2]|0;if((j|0)!=0&(k|0)!=0){c[6747]=(c[6747]|0)+1;i=kb(1043)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}c[i>>2]=j;c[i+4>>2]=k;v=+r(+(E*N+F*O+G*P));w=+r(+(E*Q+F*R+G*S));x=+r(+(E*T+F*U+G*V));y=+r(+(H*N+I*O+J*P));z=+r(+(H*Q+I*R+J*S));A=+r(+(H*T+I*U+J*V));B=+r(+(K*N+L*O+M*P));C=+r(+(K*Q+L*R+M*S));D=+r(+(K*T+L*U+M*V));m=i;o=i;n=i;u=1;j=128;q=i;l=128;i=124;while(1){g=u+-1|0;s=c[q+(g<<3)>>2]|0;t=c[q+(g<<3)+4>>2]|0;ra=+f[t+16>>2];qa=+f[t>>2];pa=+f[t+20>>2];oa=+f[t+4>>2];na=+f[t+24>>2];ha=+f[t+8>>2];ma=E*Z+F*_+G*$+(E*W+F*X+G*Y)+((E*N+F*O+G*P)*((ra+qa)*.5)+(E*Q+F*R+G*S)*((pa+oa)*.5)+(E*T+F*U+G*V)*((na+ha)*.5));ka=H*Z+I*_+J*$+(H*W+I*X+J*Y)+((H*N+I*O+J*P)*((ra+qa)*.5)+(H*Q+I*R+J*S)*((pa+oa)*.5)+(H*T+I*U+J*V)*((na+ha)*.5));ia=K*Z+L*_+M*$+(K*W+L*X+M*Y)+((K*N+L*O+M*P)*((ra+qa)*.5)+(K*Q+L*R+M*S)*((pa+oa)*.5)+(K*T+L*U+M*V)*((na+ha)*.5));la=v*((ra-qa)*.5+0.0)+w*((pa-oa)*.5+0.0)+x*((na-ha)*.5+0.0);ja=y*((ra-qa)*.5+0.0)+z*((pa-oa)*.5+0.0)+A*((na-ha)*.5+0.0);ha=B*((ra-qa)*.5+0.0)+C*((pa-oa)*.5+0.0)+D*((na-ha)*.5+0.0);do if(((((+f[s>>2]<=la+ma?+f[s+16>>2]>=ma-la:0)?+f[s+4>>2]<=ja+ka:0)?+f[s+20>>2]>=ka-ja:0)?+f[s+8>>2]<=ha+ia:0)?+f[s+24>>2]>=ia-ha:0){if((g|0)>(i|0)){h=l<<1;do if((l|0)<(h|0)&(j|0)<(h|0)){do if(!l){k=0;i=0;aa=55}else{c[6747]=(c[6747]|0)+1;i=kb((l<<4|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}if((l|0)<=0){k=j;i=j;aa=55;break}i=0;do{n=q+(i<<3)|0;o=c[n+4>>2]|0;p=j+(i<<3)|0;c[p>>2]=c[n>>2];c[p+4>>2]=o;i=i+1|0}while((i|0)!=(l|0));k=j;i=j}while(0);if((aa|0)==55){aa=0;if(!q){l=i;n=i;j=h;break}}if(!m){l=i;n=i;j=h}else{c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0);l=i;n=i;j=h}}else{l=o;i=m;k=q}while(0);o=l;m=i;p=j;l=h;h=h+-4|0}else{p=j;k=q;h=i}j=(c[t+40>>2]|0)!=0;if(!(c[s+40>>2]|0))if(j){j=c[t+36>>2]|0;c[k+(g<<3)>>2]=s;c[k+(g<<3)+4>>2]=j;g=c[t+40>>2]|0;c[k+(u<<3)>>2]=s;c[k+(u<<3)+4>>2]=g;g=u+1|0;j=p;i=h;break}else{Ma[c[(c[ga+128>>2]|0)+8>>2]&127](ga+128|0,s,t);j=p;i=h;break}else{i=c[s+36>>2]|0;if(j){j=c[t+36>>2]|0;c[k+(g<<3)>>2]=i;c[k+(g<<3)+4>>2]=j;i=c[t+36>>2]|0;j=u+1|0;c[k+(u<<3)>>2]=c[s+40>>2];c[k+(u<<3)+4>>2]=i;i=c[t+40>>2]|0;g=u+2|0;c[k+(j<<3)>>2]=c[s+36>>2];c[k+(j<<3)+4>>2]=i;j=c[t+40>>2]|0;c[k+(g<<3)>>2]=c[s+40>>2];c[k+(g<<3)+4>>2]=j;g=u+3|0;j=p;i=h;break}else{c[k+(g<<3)>>2]=i;c[k+(g<<3)+4>>2]=t;c[k+(u<<3)>>2]=c[s+40>>2];c[k+(u<<3)+4>>2]=t;g=u+1|0;j=p;i=h;break}}}else k=q;while(0);if(!g)break;else{u=g;q=k}}if(!((k|0)==0|(o|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}}n=c[ba>>2]|0;if((c[n+8>>2]|0)>0){o=0;do{i=c[n+16>>2]|0;j=c[i+(o*12|0)+8>>2]|0;do if(j|0){aa=c[i+(o*12|0)>>2]|0;u=c[ca+24>>2]|0;t=c[u+(aa*80|0)+64>>2]|0;s=c[d+12>>2]|0;ra=+f[s>>2];R=+f[s+4>>2];Q=+f[s+8>>2];oa=+f[s+16>>2];ma=+f[s+20>>2];ka=+f[s+24>>2];na=+f[s+32>>2];ja=+f[s+36>>2];W=+f[s+40>>2];ia=+f[u+(aa*80|0)>>2];ha=+f[u+(aa*80|0)+16>>2];$=+f[u+(aa*80|0)+32>>2];_=+f[u+(aa*80|0)+4>>2];Z=+f[u+(aa*80|0)+20>>2];Y=+f[u+(aa*80|0)+36>>2];la=+f[u+(aa*80|0)+8>>2];X=+f[u+(aa*80|0)+24>>2];V=+f[u+(aa*80|0)+40>>2];qa=+f[u+(aa*80|0)+48>>2];pa=+f[u+(aa*80|0)+52>>2];S=+f[u+(aa*80|0)+56>>2];U=+f[s+48>>2]+(ra*qa+R*pa+Q*S);T=+f[s+52>>2]+(oa*qa+ma*pa+ka*S);S=+f[s+56>>2]+(na*qa+ja*pa+W*S);f[ga>>2]=ra*ia+R*ha+Q*$;f[ga+4>>2]=ra*_+R*Z+Q*Y;f[ga+8>>2]=ra*la+R*X+Q*V;f[ga+12>>2]=0.0;f[ga+16>>2]=oa*ia+ma*ha+ka*$;f[ga+20>>2]=oa*_+ma*Z+ka*Y;f[ga+24>>2]=oa*la+ma*X+ka*V;f[ga+28>>2]=0.0;f[ga+32>>2]=na*ia+ja*ha+W*$;f[ga+36>>2]=na*_+ja*Z+W*Y;f[ga+40>>2]=na*la+ja*X+W*V;f[ga+44>>2]=0.0;f[ga+48>>2]=U;f[ga+52>>2]=T;f[ga+56>>2]=S;f[ga+60>>2]=0.0;Pa[c[(c[t>>2]|0)+8>>2]&127](t,ga,ga+112|0,ga+96|0);t=c[(c[n+16>>2]|0)+(o*12|0)+4>>2]|0;s=c[da+24>>2]|0;aa=c[s+(t*80|0)+64>>2]|0;u=c[e+12>>2]|0;S=+f[u>>2];T=+f[u+4>>2];U=+f[u+8>>2];V=+f[u+16>>2];W=+f[u+20>>2];X=+f[u+24>>2];ja=+f[u+32>>2];la=+f[u+36>>2];na=+f[u+40>>2];Y=+f[s+(t*80|0)>>2];Z=+f[s+(t*80|0)+16>>2];_=+f[s+(t*80|0)+32>>2];$=+f[s+(t*80|0)+4>>2];ha=+f[s+(t*80|0)+20>>2];ia=+f[s+(t*80|0)+36>>2];ka=+f[s+(t*80|0)+8>>2];ma=+f[s+(t*80|0)+24>>2];oa=+f[s+(t*80|0)+40>>2];Q=+f[s+(t*80|0)+48>>2];R=+f[s+(t*80|0)+52>>2];ra=+f[s+(t*80|0)+56>>2];pa=+f[u+48>>2]+(S*Q+T*R+U*ra);qa=+f[u+52>>2]+(V*Q+W*R+X*ra);ra=+f[u+56>>2]+(ja*Q+la*R+na*ra);f[ga>>2]=S*Y+T*Z+U*_;f[ga+4>>2]=S*$+T*ha+U*ia;f[ga+8>>2]=S*ka+T*ma+U*oa;f[ga+12>>2]=0.0;f[ga+16>>2]=V*Y+W*Z+X*_;f[ga+20>>2]=V*$+W*ha+X*ia;f[ga+24>>2]=V*ka+W*ma+X*oa;f[ga+28>>2]=0.0;f[ga+32>>2]=ja*Y+la*Z+na*_;f[ga+36>>2]=ja*$+la*ha+na*ia;f[ga+40>>2]=ja*ka+la*ma+na*oa;f[ga+44>>2]=0.0;f[ga+48>>2]=pa;f[ga+52>>2]=qa;f[ga+56>>2]=ra;f[ga+60>>2]=0.0;Pa[c[(c[aa>>2]|0)+8>>2]&127](aa,ga,ga+80|0,ga+64|0);if(!(+f[ga+112>>2]>+f[ga+64>>2])?!(+f[ga+96>>2]<+f[ga+80>>2]):0)i=1;else i=0;if(!(!(+f[ga+112+8>>2]>+f[ga+64+8>>2])?!(+f[ga+96+8>>2]<+f[ga+80+8>>2]):0))i=0;if(!(+f[ga+112+4>>2]>+f[ga+64+4>>2])?!(+f[ga+96+4>>2]<+f[ga+80+4>>2]|i^1):0)break;Ca[c[c[j>>2]>>2]&511](j);m=c[b+4>>2]|0;Ia[c[(c[m>>2]|0)+60>>2]&127](m,j);m=c[n+16>>2]|0;l=c[m+(o*12|0)>>2]|0;m=c[m+(o*12|0)+4>>2]|0;i=c[b+16>>2]|0;if((i|0)==(c[b+20>>2]|0)?(fa=(i|0)==0?1:i<<1,(i|0)<(fa|0)):0){if(!fa)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((fa*12|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[b+16>>2]|0}if((i|0)>0){k=0;do{aa=j+(k*12|0)|0;u=(c[b+24>>2]|0)+(k*12|0)|0;c[aa>>2]=c[u>>2];c[aa+4>>2]=c[u+4>>2];c[aa+8>>2]=c[u+8>>2];k=k+1|0}while((k|0)!=(i|0))}i=c[b+24>>2]|0;if(i|0){if(a[b+28>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+24>>2]=0}a[b+28>>0]=1;c[b+24>>2]=j;c[b+20>>2]=fa;i=c[b+16>>2]|0}aa=c[b+24>>2]|0;c[aa+(i*12|0)>>2]=l;c[aa+(i*12|0)+4>>2]=m;c[aa+(i*12|0)+8>>2]=0;c[b+16>>2]=(c[b+16>>2]|0)+1}while(0);o=o+1|0}while((o|0)<(c[n+8>>2]|0));j=b+24|0;k=b+16|0}else{j=b+24|0;k=b+16|0}if((c[k>>2]|0)>0){i=0;do{e=c[ba>>2]|0;fa=c[j>>2]|0;va[c[(c[e>>2]|0)+8>>2]&63](e,c[fa+(i*12|0)>>2]|0,c[fa+(i*12|0)+4>>2]|0)|0;i=i+1|0}while((i|0)<(c[k>>2]|0))}i=c[j>>2]|0;if(!i){a[b+28>>0]=1;c[j>>2]=0;c[k>>2]=0;b=b+20|0;c[b>>2]=0;ea=ga;return}if(a[b+28>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[j>>2]=0;a[b+28>>0]=1;c[j>>2]=0;c[k>>2]=0;b=b+20|0;c[b>>2]=0;ea=ga;return}function xb(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0;s=ea;ea=ea+208|0;g=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Ja[c[(c[g>>2]|0)+56>>2]&7](g,b,1.0);g=c[d+4>>2]|0;switch(g|0){case 31:{g=c[d+16>>2]|0;if((g|0)<=0){ea=s;return}do{r=g;g=g+-1|0;q=c[d+24>>2]|0;D=+f[q+(g*80|0)>>2];A=+f[q+(g*80|0)+4>>2];x=+f[q+(g*80|0)+8>>2];C=+f[q+(g*80|0)+16>>2];z=+f[q+(g*80|0)+20>>2];v=+f[q+(g*80|0)+24>>2];B=+f[q+(g*80|0)+32>>2];y=+f[q+(g*80|0)+36>>2];t=+f[q+(g*80|0)+40>>2];L=+f[q+(g*80|0)+48>>2];K=+f[q+(g*80|0)+52>>2];k=+f[q+(g*80|0)+56>>2];q=c[q+(g*80|0)+64>>2]|0;p=c[(c[a>>2]|0)+28>>2]|0;J=+f[b>>2];I=+f[b+4>>2];H=+f[b+8>>2];G=+f[b+16>>2];F=+f[b+20>>2];E=+f[b+24>>2];w=+f[b+32>>2];u=+f[b+36>>2];h=+f[b+40>>2];i=L*J+K*I+k*H+ +f[b+48>>2];j=L*G+K*F+k*E+ +f[b+52>>2];k=L*w+K*u+k*h+ +f[b+56>>2];f[s+144>>2]=D*J+C*I+B*H;f[s+144+4>>2]=A*J+z*I+y*H;f[s+144+8>>2]=x*J+v*I+t*H;f[s+144+12>>2]=0.0;f[s+144+16>>2]=D*G+C*F+B*E;f[s+144+20>>2]=A*G+z*F+y*E;f[s+144+24>>2]=x*G+v*F+t*E;f[s+144+28>>2]=0.0;f[s+144+32>>2]=D*w+C*u+B*h;f[s+144+36>>2]=A*w+z*u+y*h;f[s+144+40>>2]=x*w+v*u+t*h;f[s+144+44>>2]=0.0;f[s+144+48>>2]=i;f[s+144+52>>2]=j;f[s+144+56>>2]=k;f[s+144+60>>2]=0.0;Pa[p&127](a,s+144|0,q,e)}while((r|0)>1);ea=s;return}case 0:{c[s+144>>2]=c[d+28>>2];c[s+144+4>>2]=c[d+28+4>>2];c[s+144+8>>2]=c[d+28+8>>2];c[s+144+12>>2]=c[d+28+12>>2];J=+ha[c[(c[d>>2]|0)+48>>2]&15](d);K=+ha[c[(c[d>>2]|0)+48>>2]&15](d);L=+ha[c[(c[d>>2]|0)+48>>2]&15](d);J=J+ +f[s+144>>2];f[s+144>>2]=J;K=K+ +f[s+144+4>>2];f[s+144+4>>2]=K;L=L+ +f[s+144+8>>2];f[s+144+8>>2]=L;a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;d=c[(c[a>>2]|0)+72>>2]|0;f[s+112>>2]=-J;f[s+112+4>>2]=-K;f[s+112+8>>2]=-L;f[s+112+12>>2]=0.0;Ta[d&31](a,s+112|0,s+144|0,b,e);ea=s;return}case 8:{L=+ha[c[(c[d>>2]|0)+48>>2]&15](d);a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Ha[c[(c[a>>2]|0)+16>>2]&1](a,L,b,e);ea=s;return}case 9:{g=c[d+92>>2]|0;if((g|0)<=0){ea=s;return}do{r=g;g=g+-1|0;q=c[d+100>>2]|0;x=+f[q+(g<<4)>>2];y=+f[q+(g<<4)+4>>2];K=+f[q+(g<<4)+8>>2];q=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;p=c[(c[q>>2]|0)+16>>2]|0;L=+f[(c[d+120>>2]|0)+(g<<2)>>2];A=+f[b>>2];B=+f[b+4>>2];z=+f[b+8>>2];D=+f[b+16>>2];E=+f[b+20>>2];C=+f[b+24>>2];G=+f[b+32>>2];H=+f[b+36>>2];F=+f[b+40>>2];I=x*A+y*B+K*z+ +f[b+48>>2];J=x*D+y*E+K*C+ +f[b+52>>2];K=x*G+y*H+K*F+ +f[b+56>>2];f[s+144>>2]=A+B*0.0+z*0.0;f[s+144+4>>2]=A*0.0+B+z*0.0;f[s+144+8>>2]=z+(A*0.0+B*0.0);f[s+144+12>>2]=0.0;f[s+144+16>>2]=D+E*0.0+C*0.0;f[s+144+20>>2]=D*0.0+E+C*0.0;f[s+144+24>>2]=C+(D*0.0+E*0.0);f[s+144+28>>2]=0.0;f[s+144+32>>2]=G+H*0.0+F*0.0;f[s+144+36>>2]=G*0.0+H+F*0.0;f[s+144+40>>2]=F+(G*0.0+H*0.0);f[s+144+44>>2]=0.0;f[s+144+48>>2]=I;f[s+144+52>>2]=J;f[s+144+56>>2]=K;f[s+144+60>>2]=0.0;Ha[p&1](q,L,s+144|0,e)}while((r|0)>1);ea=s;return}case 10:{r=c[d+52>>2]|0;K=+f[d+28+(((r+2|0)%3|0)<<2)>>2];L=+f[d+28+(r<<2)>>2];a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Fa[c[(c[a>>2]|0)+76>>2]&3](a,K,L,r,b,e);ea=s;return}case 11:{K=+f[d+56>>2];L=+f[d+60>>2];d=c[d+68>>2]|0;a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Fa[c[(c[a>>2]|0)+84>>2]&3](a,K,L,d,b,e);ea=s;return}case 13:{r=c[d+52>>2]|0;K=+ha[c[(c[d>>2]|0)+92>>2]&15](d);c[s+128>>2]=c[d+28>>2];c[s+128+4>>2]=c[d+28+4>>2];c[s+128+8>>2]=c[d+28+8>>2];c[s+128+12>>2]=c[d+28+12>>2];I=+ha[c[(c[d>>2]|0)+48>>2]&15](d);J=+ha[c[(c[d>>2]|0)+48>>2]&15](d);L=+ha[c[(c[d>>2]|0)+48>>2]&15](d);f[s+128>>2]=I+ +f[s+128>>2];f[s+128+4>>2]=J+ +f[s+128+4>>2];f[s+128+8>>2]=L+ +f[s+128+8>>2];L=+f[s+128+(r<<2)>>2];a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Fa[c[(c[a>>2]|0)+80>>2]&3](a,K,L,r,b,e);ea=s;return}case 28:{L=+f[d+64>>2];a=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;La[c[(c[a>>2]|0)+88>>2]&1](a,d+48|0,L,b,e);ea=s;return}default:{a:do if((g|0)<7){q=c[d+52>>2]|0;if(!q){if((ra[c[(c[d>>2]|0)+100>>2]&127](d)|0)<=0)break;g=0;while(1){Pa[c[(c[d>>2]|0)+104>>2]&127](d,g,s+144|0,s+112|0);L=+f[s+144>>2];y=+f[b>>2];J=+f[s+144+4>>2];z=+f[b+4>>2];H=+f[s+144+8>>2];A=+f[b+8>>2];C=+f[b+16>>2];D=+f[b+20>>2];E=+f[b+24>>2];G=+f[b+32>>2];I=+f[b+36>>2];K=+f[b+40>>2];x=+f[b+48>>2];B=+f[b+52>>2];F=+f[b+56>>2];f[s+16>>2]=L*y+J*z+H*A+x;f[s+16+4>>2]=L*C+J*D+H*E+B;f[s+16+8>>2]=L*G+J*I+H*K+F;f[s+16+12>>2]=0.0;H=+f[s+112>>2];J=+f[s+112+4>>2];L=+f[s+112+8>>2];f[s>>2]=x+(y*H+z*J+A*L);f[s+4>>2]=B+(C*H+D*J+E*L);f[s+8>>2]=F+(G*H+I*J+K*L);f[s+12>>2]=0.0;r=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;Pa[c[(c[r>>2]|0)+8>>2]&127](r,s+16|0,s,e);g=g+1|0;if((g|0)>=(ra[c[(c[d>>2]|0)+100>>2]&127](d)|0))break a}}if((c[q+28>>2]|0)>0){r=0;do{g=c[q+36>>2]|0;p=c[g+(r*36|0)+4>>2]|0;b:do if((p|0)>0){n=c[g+(r*36|0)+12>>2]|0;l=n;h=0.0;i=0.0;j=0.0;n=c[n+(p+-1<<2)>>2]|0;g=0;while(1){o=c[l+(g<<2)>>2]|0;m=c[q+16>>2]|0;h=h+ +f[m+(o<<4)>>2];i=i+ +f[m+(o<<4)+4>>2];j=j+ +f[m+(o<<4)+8>>2];m=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;l=c[(c[m>>2]|0)+8>>2]|0;M=c[q+16>>2]|0;L=+f[M+(n<<4)>>2];y=+f[b>>2];J=+f[M+(n<<4)+4>>2];z=+f[b+4>>2];H=+f[M+(n<<4)+8>>2];A=+f[b+8>>2];C=+f[b+16>>2];D=+f[b+20>>2];E=+f[b+24>>2];G=+f[b+32>>2];I=+f[b+36>>2];K=+f[b+40>>2];x=+f[b+48>>2];B=+f[b+52>>2];F=+f[b+56>>2];f[s+144>>2]=L*y+J*z+H*A+x;f[s+144+4>>2]=L*C+J*D+H*E+B;f[s+144+8>>2]=L*G+J*I+H*K+F;f[s+144+12>>2]=0.0;H=+f[M+(o<<4)>>2];J=+f[M+(o<<4)+4>>2];L=+f[M+(o<<4)+8>>2];f[s+112>>2]=x+(y*H+z*J+A*L);f[s+112+4>>2]=B+(C*H+D*J+E*L);f[s+112+8>>2]=F+(G*H+I*J+K*L);f[s+112+12>>2]=0.0;Pa[l&127](m,s+144|0,s+112|0,e);m=g+1|0;g=c[q+36>>2]|0;if((m|0)>=(c[g+(r*36|0)+4>>2]|0))break b;l=c[g+(r*36|0)+12>>2]|0;n=o;g=m}}else{h=0.0;i=0.0;j=0.0}while(0);k=1.0/+(p|0)*h;i=1.0/+(p|0)*i;h=1.0/+(p|0)*j;M=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;if((ra[c[(c[M>>2]|0)+48>>2]&127](M)|0)&16384|0){c[s+144>>2]=1065353216;c[s+144+4>>2]=1065353216;c[s+144+8>>2]=0;f[s+144+12>>2]=0.0;M=c[q+36>>2]|0;F=+f[M+(r*36|0)+20>>2];H=+f[M+(r*36|0)+24>>2];J=+f[M+(r*36|0)+28>>2];M=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;p=c[(c[M>>2]|0)+8>>2]|0;x=+f[b>>2];y=+f[b+4>>2];z=+f[b+8>>2];B=+f[b+16>>2];C=+f[b+20>>2];D=+f[b+24>>2];G=+f[b+32>>2];I=+f[b+36>>2];K=+f[b+40>>2];A=+f[b+48>>2];E=+f[b+52>>2];L=+f[b+56>>2];f[s+112>>2]=k*x+i*y+h*z+A;f[s+112+4>>2]=k*B+i*C+h*D+E;f[s+112+8>>2]=k*G+i*I+h*K+L;f[s+112+12>>2]=0.0;f[s+16>>2]=(k+F)*x+(i+H)*y+(h+J)*z+A;f[s+16+4>>2]=(k+F)*B+(i+H)*C+(h+J)*D+E;f[s+16+8>>2]=(k+F)*G+(i+H)*I+(h+J)*K+L;f[s+16+12>>2]=0.0;Pa[p&127](M,s+112|0,s+16|0,s+144|0)}r=r+1|0}while((r|0)<(c[q+28>>2]|0))}}while(0);g=c[d+4>>2]|0;if((g+-21|0)>>>0<9){c[s+144>>2]=1566444395;c[s+144+4>>2]=1566444395;c[s+144+8>>2]=1566444395;f[s+144+12>>2]=0.0;c[s+112>>2]=-581039253;c[s+112+4>>2]=-581039253;c[s+112+8>>2]=-581039253;f[s+112+12>>2]=0.0;g=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;c[s+16>>2]=6932;c[s+16+4>>2]=6956;c[s+16+8>>2]=g;c[s+16+12>>2]=c[e>>2];c[s+16+12+4>>2]=c[e+4>>2];c[s+16+12+8>>2]=c[e+8>>2];c[s+16+12+12>>2]=c[e+12>>2];c[s+16+28>>2]=c[b>>2];c[s+16+28+4>>2]=c[b+4>>2];c[s+16+28+8>>2]=c[b+8>>2];c[s+16+28+12>>2]=c[b+12>>2];c[s+16+44>>2]=c[b+16>>2];c[s+16+44+4>>2]=c[b+16+4>>2];c[s+16+44+8>>2]=c[b+16+8>>2];c[s+16+44+12>>2]=c[b+16+12>>2];c[s+16+60>>2]=c[b+32>>2];c[s+16+60+4>>2]=c[b+32+4>>2];c[s+16+60+8>>2]=c[b+32+8>>2];c[s+16+60+12>>2]=c[b+32+12>>2];c[s+16+76>>2]=c[b+48>>2];c[s+16+76+4>>2]=c[b+48+4>>2];c[s+16+76+8>>2]=c[b+48+8>>2];c[s+16+76+12>>2]=c[b+48+12>>2];Pa[c[(c[d>>2]|0)+64>>2]&127](d,s+16|0,s+112|0,s+144|0);g=c[d+4>>2]|0}if((g|0)!=3){ea=s;return}c[s+144>>2]=1566444395;c[s+144+4>>2]=1566444395;c[s+144+8>>2]=1566444395;f[s+144+12>>2]=0.0;c[s+112>>2]=-581039253;c[s+112+4>>2]=-581039253;c[s+112+8>>2]=-581039253;f[s+112+12>>2]=0.0;M=ra[c[(c[a>>2]|0)+20>>2]&127](a)|0;c[s+16>>2]=6932;c[s+16+4>>2]=6956;c[s+16+8>>2]=M;c[s+16+12>>2]=c[e>>2];c[s+16+12+4>>2]=c[e+4>>2];c[s+16+12+8>>2]=c[e+8>>2];c[s+16+12+12>>2]=c[e+12>>2];c[s+16+28>>2]=c[b>>2];c[s+16+28+4>>2]=c[b+4>>2];c[s+16+28+8>>2]=c[b+8>>2];c[s+16+28+12>>2]=c[b+12>>2];c[s+16+44>>2]=c[b+16>>2];c[s+16+44+4>>2]=c[b+16+4>>2];c[s+16+44+8>>2]=c[b+16+8>>2];c[s+16+44+12>>2]=c[b+16+12>>2];c[s+16+60>>2]=c[b+32>>2];c[s+16+60+4>>2]=c[b+32+4>>2];c[s+16+60+8>>2]=c[b+32+8>>2];c[s+16+60+12>>2]=c[b+32+12>>2];c[s+16+76>>2]=c[b+48>>2];c[s+16+76+4>>2]=c[b+48+4>>2];c[s+16+76+8>>2]=c[b+48+8>>2];c[s+16+76+12>>2]=c[b+48+12>>2];M=c[d+92>>2]|0;Pa[c[(c[M>>2]|0)+8>>2]&127](M,s+16+4|0,s+112|0,s+144|0);ea=s;return}}}function yb(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0.0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0;t=ea;ea=ea+48|0;z=1.0/+f[b+108>>2];A=1.0/+f[b+112>>2];B=1.0/+f[b+116>>2];u=+f[b+48>>2];v=z*+f[e>>2]+u;o=+f[b+52>>2];k=A*+f[e+4>>2]+o;q=+f[b+56>>2];p=B*+f[e+8>>2]+q;u=z*+f[g>>2]+u;o=A*+f[g+4>>2]+o;q=B*+f[g+8>>2]+q;B=+f[b+16>>2];v=v>2];k=k>2];p=p>2];v=y>2];k=x>2];p=w>2]|0)+-1|0;e=(c[b+68>>2]|0)+-1|0;switch(c[b+104>>2]|0){case 0:{e=(g|0)<(e|0)?g:e;j=(i|0)<(j|0)?i:j;g=(l|0)>0?l:0;r=(n|0)>0?n:0;break}case 1:{e=(g|0)<(e|0)?g:e;j=(h|0)<(j|0)?h:j;g=(l|0)>0?l:0;r=(m|0)>0?m:0;break}case 2:{e=(i|0)<(e|0)?i:e;j=(h|0)<(j|0)?h:j;g=(n|0)>0?n:0;r=(m|0)>0?m:0;break}default:{g=0;r=0}}if((g|0)>=(e|0)){ea=t;return}n=(r|0)<(j|0);l=g;while(1){if(n){m=(l&1|0)==0;q=+(l|0);g=l+1|0;i=r;while(1){do if(!(a[b+100>>0]|0)){if(a[b+101>>0]|0?(i+l&1|0)==0:0){s=16;break}if(!(m&(a[b+102>>0]|0)!=0)){k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,i,l);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(i|0)-+f[b+80>>2]*.5;p=q-+f[b+84>>2]*.5;f[t>>2]=k;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;break}case 1:{B=+(i|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=q-+f[b+84>>2]*.5;f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}case 2:{B=+(i|0)-+f[b+80>>2]*.5;o=q-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}default:{k=+f[t>>2];o=+f[t+4>>2];p=+f[t+8>>2]}}f[t>>2]=k*+f[b+108>>2];f[t+4>>2]=o*+f[b+112>>2];f[t+8>>2]=p*+f[b+116>>2];k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,i,g);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(i|0)-+f[b+80>>2]*.5;p=+(g|0)-+f[b+84>>2]*.5;f[t+16>>2]=k;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;break}case 1:{B=+(i|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=+(g|0)-+f[b+84>>2]*.5;f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}case 2:{B=+(i|0)-+f[b+80>>2]*.5;o=+(g|0)-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}default:{k=+f[t+16>>2];o=+f[t+20>>2];p=+f[t+24>>2]}}f[t+16>>2]=k*+f[b+108>>2];f[t+20>>2]=o*+f[b+112>>2];f[t+24>>2]=p*+f[b+116>>2];h=i+1|0;k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,l);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=q-+f[b+84>>2]*.5;f[t+32>>2]=k;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=q-+f[b+84>>2]*.5;f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=q-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}default:{k=+f[t+32>>2];o=+f[t+36>>2];p=+f[t+40>>2]}}f[t+32>>2]=k*+f[b+108>>2];f[t+36>>2]=o*+f[b+112>>2];f[t+40>>2]=p*+f[b+116>>2];Pa[c[(c[d>>2]|0)+8>>2]&127](d,t,i,l);k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,l);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=q-+f[b+84>>2]*.5;f[t>>2]=k;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=q-+f[b+84>>2]*.5;f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=q-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}default:{k=+f[t>>2];o=+f[t+4>>2];p=+f[t+8>>2]}}f[t>>2]=k*+f[b+108>>2];f[t+4>>2]=o*+f[b+112>>2];f[t+8>>2]=p*+f[b+116>>2];k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,g);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=k;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=+(g|0)-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}default:{k=+f[t+32>>2];o=+f[t+36>>2];p=+f[t+40>>2]}}f[t+32>>2]=k*+f[b+108>>2];f[t+36>>2]=o*+f[b+112>>2];f[t+40>>2]=p*+f[b+116>>2];Pa[c[(c[d>>2]|0)+8>>2]&127](d,t,i,l)}else s=16}else s=16;while(0);if((s|0)==16){s=0;k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,i,l);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(i|0)-+f[b+80>>2]*.5;p=q-+f[b+84>>2]*.5;f[t>>2]=k;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;break}case 1:{B=+(i|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=q-+f[b+84>>2]*.5;f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}case 2:{B=+(i|0)-+f[b+80>>2]*.5;o=q-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t>>2]=B;f[t+4>>2]=o;f[t+8>>2]=p;f[t+12>>2]=0.0;k=B;break}default:{k=+f[t>>2];o=+f[t+4>>2];p=+f[t+8>>2]}}f[t>>2]=k*+f[b+108>>2];f[t+4>>2]=o*+f[b+112>>2];f[t+8>>2]=p*+f[b+116>>2];h=i+1|0;k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,l);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=q-+f[b+84>>2]*.5;f[t+16>>2]=k;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=q-+f[b+84>>2]*.5;f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=q-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}default:{k=+f[t+16>>2];o=+f[t+20>>2];p=+f[t+24>>2]}}f[t+16>>2]=k*+f[b+108>>2];f[t+20>>2]=o*+f[b+112>>2];f[t+24>>2]=p*+f[b+116>>2];k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,g);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=k;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=+(g|0)-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}default:{k=+f[t+32>>2];o=+f[t+36>>2];p=+f[t+40>>2]}}f[t+32>>2]=k*+f[b+108>>2];f[t+36>>2]=o*+f[b+112>>2];f[t+40>>2]=p*+f[b+116>>2];Pa[c[(c[d>>2]|0)+8>>2]&127](d,t,i,l);k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,h,g);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(h|0)-+f[b+80>>2]*.5;p=+(g|0)-+f[b+84>>2]*.5;f[t+16>>2]=k;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;break}case 1:{B=+(h|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=+(g|0)-+f[b+84>>2]*.5;f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}case 2:{B=+(h|0)-+f[b+80>>2]*.5;o=+(g|0)-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+16>>2]=B;f[t+20>>2]=o;f[t+24>>2]=p;f[t+28>>2]=0.0;k=B;break}default:{k=+f[t+16>>2];o=+f[t+20>>2];p=+f[t+24>>2]}}f[t+16>>2]=k*+f[b+108>>2];f[t+20>>2]=o*+f[b+112>>2];f[t+24>>2]=p*+f[b+116>>2];k=+ka[c[(c[b>>2]|0)+68>>2]&15](b,i,g);switch(c[b+104>>2]|0){case 0:{k=k-+f[b+48>>2];o=+(i|0)-+f[b+80>>2]*.5;p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=k;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;break}case 1:{B=+(i|0)-+f[b+80>>2]*.5;o=k-+f[b+52>>2];p=+(g|0)-+f[b+84>>2]*.5;f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}case 2:{B=+(i|0)-+f[b+80>>2]*.5;o=+(g|0)-+f[b+84>>2]*.5;p=k-+f[b+56>>2];f[t+32>>2]=B;f[t+36>>2]=o;f[t+40>>2]=p;f[t+44>>2]=0.0;k=B;break}default:{k=+f[t+32>>2];o=+f[t+36>>2];p=+f[t+40>>2]}}f[t+32>>2]=k*+f[b+108>>2];f[t+36>>2]=o*+f[b+112>>2];f[t+40>>2]=p*+f[b+116>>2];Pa[c[(c[d>>2]|0)+8>>2]&127](d,t,i,l)}if((h|0)==(j|0))break;else i=h}}else g=l+1|0;if((g|0)==(e|0))break;else l=g}ea=t;return}function zb(b,d){b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0.0,E=0.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.0;Q=ea;ea=ea+192|0;O=c[d+36>>2]|0;m=+f[(+f[O+88>>2]>0.0?b+16|0:b+20|0)>>2];if(a[O+100>>0]&1){ea=Q;return}M=c[b+8>>2]|0;t=c[M+4>>2]|0;N=c[M+12>>2]|0;I=c[(c[b+4>>2]|0)+684>>2]|0;D=+f[O+8>>2]-+f[N+48>>2];q=+f[O+12>>2]-+f[N+52>>2];E=+f[O+16>>2]-+f[N+56>>2];z=1.0/+f[I+76>>2];y=(D*+f[N>>2]+q*+f[N+16>>2]+E*+f[N+32>>2])*z/3.0;F=y<0.0?~~(1.0-y):0;J=~~((y+ +(F|0)-+(~~(y+ +(F|0))|0))*3.0);n=(y+ +(F|0)-+(~~(y+ +(F|0))|0))*3.0-+(J|0);F=~~(y+ +(F|0))-F|0;y=z*(D*+f[N+4>>2]+q*+f[N+20>>2]+E*+f[N+36>>2])/3.0;H=y<0.0?~~(1.0-y):0;L=~~((y+ +(H|0)-+(~~(y+ +(H|0))|0))*3.0);r=(y+ +(H|0)-+(~~(y+ +(H|0))|0))*3.0-+(L|0);H=~~(y+ +(H|0))-H|0;E=z*(D*+f[N+8>>2]+q*+f[N+24>>2]+E*+f[N+40>>2])/3.0;G=E<0.0?~~(1.0-E):0;K=~~((E+ +(G|0)-+(~~(E+ +(G|0))|0))*3.0);q=(E+ +(G|0)-+(~~(E+ +(G|0))|0))*3.0-+(K|0);G=~~(E+ +(G|0))-G|0;u=(16?F>>>16:F)<<11^(F&65535)+16^(F&65535)+16<<16;u=u+(H&65535)+(11?u>>>11:u)|0;u=u^(16?H>>>16:H)<<11^u<<16;u=u+(G&65535)+(11?u>>>11:u)|0;u=u^(16?G>>>16:G)<<11^u<<16;u=u+(t&65535)+(11?u>>>11:u)|0;u=u^(16?t>>>16:t)<<11^u<<16;u=(11?u>>>11:u)+u|0;u=(5?(u<<3^u)>>>5:u<<3^u)+(u<<3^u)|0;u=(17?(u<<4^u)>>>17:u<<4^u)+(u<<4^u)|0;u=(6?(u<<25^u)>>>6:u<<25^u)+(u<<25^u)|0;o=c[I+60>>2]|0;p=c[I+68>>2]|0;d=c[p+(((u>>>0)%(o>>>0)|0)<<2)>>2]|0;c[I+96>>2]=(c[I+96>>2]|0)+1;e=(c[I+92>>2]|0)+1|0;c[I+92>>2]=e;a:do if(!d)l=10;else while(1){if(((((c[d+272>>2]|0)==(u|0)?(c[d+256>>2]|0)==(F|0):0)?(c[d+260>>2]|0)==(H|0):0)?(c[d+264>>2]|0)==(G|0):0)?(c[d+276>>2]|0)==(t|0):0)break a;d=c[d+280>>2]|0;e=e+1|0;c[I+92>>2]=e;if(!d){l=10;break}}while(0);b:do if((l|0)==10){C=c[I+84>>2]|0;c[I+84>>2]=C+1;if((C|0)>=(c[I+88>>2]|0)){c[6394]=(c[6394]|0)+1;c:do if((o|0)>0){e=p;l=0;while(1){C=e+(l<<2)|0;d=c[C>>2]|0;c[C>>2]=0;if(d|0)do{C=d;d=c[d+280>>2]|0;LJ(C)}while((d|0)!=0);d=l+1|0;if((d|0)==(o|0))break c;e=c[I+68>>2]|0;l=d}}while(0);f[I+76>>2]=.25;c[I+80>>2]=0;c[I+84>>2]=0;c[I+92>>2]=1;c[I+96>>2]=1}d=GI(284)|0;hk(d|0,0,284)|0;c[d+280>>2]=c[p+(((u>>>0)%(o>>>0)|0)<<2)>>2];c[p+(((u>>>0)%(o>>>0)|0)<<2)>>2]=d;c[d+276>>2]=t;c[d+272>>2]=u;c[d+256>>2]=F;c[d+260>>2]=H;c[d+264>>2]=G;j=+f[I+76>>2];A=Q+120+4|0;B=Q+120+24|0;C=Q+120+44|0;g=j;e=0;while(1){i=j*(+(G|0)*3.0)+g*+(e|0);l=0;while(1){h=j*(+(H|0)*3.0)+g*+(l|0);f[Q+48>>2]=+(F|0)*3.0*j+g*0.0;f[Q+48+4>>2]=h;f[Q+48+8>>2]=i;f[Q+48+12>>2]=0.0;p=c[d+276>>2]|0;c[Q+120>>2]=1065353216;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;c[Q+120+20>>2]=1065353216;c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;c[Q+120+40>>2]=1065353216;c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;c[C+12>>2]=0;c[C+16>>2]=0;o=c[p+4>>2]|0;if((o|0)<20){g=+_b(Q+48|0,p,Q+120|0,Q+64|0);u=c[d+276>>2]|0;o=c[u+4>>2]|0;t=u;u=u+4|0}else{t=p;u=p+4|0;g=0.0}f[d+(l<<4)+(e<<2)>>2]=g;f[Q+48>>2]=+(F|0)*3.0*j+ +f[I+76>>2];f[Q+48+4>>2]=h;f[Q+48+8>>2]=i;f[Q+48+12>>2]=0.0;c[Q+120>>2]=1065353216;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;c[Q+120+20>>2]=1065353216;c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;c[Q+120+40>>2]=1065353216;c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;c[C+12>>2]=0;c[C+16>>2]=0;if((o|0)<20){g=+_b(Q+48|0,t,Q+120|0,Q+64|0);o=c[d+276>>2]|0;p=o;o=o+4|0}else{p=t;o=u;g=0.0}f[d+64+(l<<4)+(e<<2)>>2]=g;f[Q+48>>2]=+(F|0)*3.0*j+ +f[I+76>>2]*2.0;f[Q+48+4>>2]=h;f[Q+48+8>>2]=i;f[Q+48+12>>2]=0.0;c[Q+120>>2]=1065353216;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;c[Q+120+20>>2]=1065353216;c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;c[Q+120+40>>2]=1065353216;c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;c[C+12>>2]=0;c[C+16>>2]=0;if((c[o>>2]|0)<20){g=+_b(Q+48|0,p,Q+120|0,Q+64|0);o=c[d+276>>2]|0;p=o;o=o+4|0}else g=0.0;f[d+128+(l<<4)+(e<<2)>>2]=g;f[Q+48>>2]=+(F|0)*3.0*j+ +f[I+76>>2]*3.0;f[Q+48+4>>2]=h;f[Q+48+8>>2]=i;f[Q+48+12>>2]=0.0;c[Q+120>>2]=1065353216;c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;c[Q+120+20>>2]=1065353216;c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;c[B+12>>2]=0;c[Q+120+40>>2]=1065353216;c[C>>2]=0;c[C+4>>2]=0;c[C+8>>2]=0;c[C+12>>2]=0;c[C+16>>2]=0;if((c[o>>2]|0)<20)g=+_b(Q+48|0,p,Q+120|0,Q+64|0);else g=0.0;f[d+192+(l<<4)+(e<<2)>>2]=g;l=l+1|0;if((l|0)==4)break;g=+f[I+76>>2]}e=e+1|0;if((e|0)==4)break b;g=+f[I+76>>2]}}while(0);c[d+268>>2]=c[I+80>>2];g=+f[d+(J<<6)+(L<<4)+(K<<2)>>2];x=+f[d+(J+1<<6)+(L<<4)+(K<<2)>>2];v=+f[d+(J+1<<6)+(L+1<<4)+(K<<2)>>2];w=+f[d+(J<<6)+(L+1<<4)+(K<<2)>>2];E=+f[d+(J<<6)+(L<<4)+(K+1<<2)>>2];D=+f[d+(J+1<<6)+(L<<4)+(K+1<<2)>>2];y=+f[d+(J+1<<6)+(L+1<<4)+(K+1<<2)>>2];z=+f[d+(J<<6)+(L+1<<4)+(K+1<<2)>>2];j=x-g+r*(v-w-(x-g))+q*(D-E+r*(y-z-(D-E))-(x-g+r*(v-w-(x-g))));i=w-g+n*(v-x-(w-g))+q*(z-E+n*(y-D-(z-E))-(w-g+n*(v-x-(w-g))));h=E-g+n*(D-x-(E-g))+r*(z-w+n*(y-v-(z-w))-(E-g+n*(D-x-(E-g))));k=1.0/+s(+(h*h+(j*j+i*i)));g=g+n*(x-g)+r*(w+n*(v-w)-(g+n*(x-g)));g=g+q*(E+n*(D-E)+r*(z+n*(y-z)-(E+n*(D-E)))-g)-m;if(!(g<0.0)){ea=Q;return}t=c[M+8>>2]|0;E=+f[N>>2]*(j*k)+ +f[N+4>>2]*(i*k)+ +f[N+8>>2]*(h*k);D=j*k*+f[N+16>>2]+i*k*+f[N+20>>2]+h*k*+f[N+24>>2];z=j*k*+f[N+32>>2]+i*k*+f[N+36>>2]+h*k*+f[N+40>>2];y=-(E*(+f[O+8>>2]-g*E)+D*(+f[O+12>>2]-g*D)+z*(+f[O+16>>2]-g*z));r=+f[O+88>>2];d=c[b+12>>2]|0;if(!d)q=0.0;else q=+f[d+344>>2];if(!(r+q>0.0)){ea=Q;return}if(!d)l=(c[(c[b+8>>2]|0)+8>>2]|0)+4|0;else l=d+4|0;if((a[24928]|0)==0?DC(24928)|0:0){d=25580;e=d+48|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(e|0));PB(24928)}e=c[b+12>>2]|0;k=+f[O+8>>2];w=k-+f[l+48>>2];m=+f[O+12>>2];x=m-+f[l+52>>2];n=+f[O+16>>2];v=n-+f[l+56>>2];if(!e){N=c[b+4>>2]|0;g=0.0;h=0.0;i=0.0;d=N;j=+f[N+452>>2]}else{i=+f[e+332>>2];h=+f[e+336>>2];R=+f[e+328>>2];d=c[b+4>>2]|0;j=+f[d+452>>2];g=(v*i-x*h+ +f[e+312>>2])*j;h=(+f[e+316>>2]+(w*h-v*R))*j;i=(x*R-w*i+ +f[e+320>>2])*j}k=k-+f[O+24>>2]-g;m=m-+f[O+28>>2]-h;R=n-+f[O+32>>2]-i;g=+f[d+316>>2]*+f[(c[(c[b+8>>2]|0)+8>>2]|0)+224>>2];Me(Q+120|0,j,r,q,(e|0)==0?25580:e+264|0,w,x,v);c[Q+32>>2]=c[Q+120>>2];c[Q+32+4>>2]=c[Q+120+4>>2];c[Q+32+8>>2]=c[Q+120+8>>2];c[Q+32+12>>2]=c[Q+120+12>>2];c[Q+16>>2]=c[Q+120+16>>2];c[Q+16+4>>2]=c[Q+120+16+4>>2];c[Q+16+8>>2]=c[Q+120+16+8>>2];c[Q+16+12>>2]=c[Q+120+16+12>>2];c[Q>>2]=c[Q+120+32>>2];c[Q+4>>2]=c[Q+120+32+4>>2];c[Q+8>>2]=c[Q+120+32+8>>2];c[Q+12>>2]=c[Q+120+32+12>>2];p=c[b+4>>2]|0;h=r*+f[p+452>>2];g=(R-z*(k*E+m*D+R*z))*(R-z*(k*E+m*D+R*z))+((k-E*(k*E+m*D+R*z))*(k-E*(k*E+m*D+R*z))+(m-D*(k*E+m*D+R*z))*(m-D*(k*E+m*D+R*z)))>2]|0)+8>>2]|0)+204>>2]&3|0)==0?p+324|0:p+328|0)>>2]|0;d=c[p+812>>2]|0;if((d|0)==(c[p+816>>2]|0)?(P=(d|0)==0?1:d<<1,(d|0)<(P|0)):0){if(!P)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((P*104|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[p+812>>2]|0}if((d|0)>0){l=0;do{N=e+(l*104|0)|0;M=c[p+820>>2]|0;L=M+(l*104|0)|0;c[N>>2]=c[L>>2];c[N+4>>2]=c[L+4>>2];c[N+8>>2]=c[L+8>>2];c[N+12>>2]=c[L+12>>2];c[N+16>>2]=c[L+16>>2];c[N+20>>2]=c[L+20>>2];c[N+24>>2]=c[L+24>>2];N=e+(l*104|0)+28|0;L=M+(l*104|0)+28|0;c[N>>2]=c[L>>2];c[N+4>>2]=c[L+4>>2];c[N+8>>2]=c[L+8>>2];c[N+12>>2]=c[L+12>>2];N=M+(l*104|0)+44|0;L=e+(l*104|0)+44|0;c[L>>2]=c[N>>2];c[L+4>>2]=c[N+4>>2];c[L+8>>2]=c[N+8>>2];c[L+12>>2]=c[N+12>>2];L=M+(l*104|0)+60|0;N=e+(l*104|0)+60|0;c[N>>2]=c[L>>2];c[N+4>>2]=c[L+4>>2];c[N+8>>2]=c[L+8>>2];c[N+12>>2]=c[L+12>>2];N=e+(l*104|0)+76|0;M=M+(l*104|0)+76|0;c[N>>2]=c[M>>2];c[N+4>>2]=c[M+4>>2];c[N+8>>2]=c[M+8>>2];c[N+12>>2]=c[M+12>>2];c[N+16>>2]=c[M+16>>2];c[N+20>>2]=c[M+20>>2];c[N+24>>2]=c[M+24>>2];l=l+1|0}while((l|0)!=(d|0))}d=c[p+820>>2]|0;if(d|0){if(a[p+824>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[p+820>>2]=0}a[p+824>>0]=1;c[p+820>>2]=e;c[p+816>>2]=P;d=c[p+812>>2]|0}N=c[p+820>>2]|0;c[N+(d*104|0)>>2]=t;f[N+(d*104|0)+4>>2]=E;f[N+(d*104|0)+8>>2]=D;f[N+(d*104|0)+12>>2]=z;f[N+(d*104|0)+16>>2]=0.0;f[N+(d*104|0)+20>>2]=y;c[N+(d*104|0)+24>>2]=O;P=N+(d*104|0)+28|0;c[P>>2]=c[Q+32>>2];c[P+4>>2]=c[Q+32+4>>2];c[P+8>>2]=c[Q+32+8>>2];c[P+12>>2]=c[Q+32+12>>2];P=N+(d*104|0)+44|0;c[P>>2]=c[Q+16>>2];c[P+4>>2]=c[Q+16+4>>2];c[P+8>>2]=c[Q+16+8>>2];c[P+12>>2]=c[Q+16+12>>2];P=N+(d*104|0)+60|0;c[P>>2]=c[Q>>2];c[P+4>>2]=c[Q+4>>2];c[P+8>>2]=c[Q+8>>2];c[P+12>>2]=c[Q+12>>2];P=N+(d*104|0)+76|0;f[P>>2]=w;f[N+(d*104|0)+80>>2]=x;f[N+(d*104|0)+84>>2]=v;f[N+(d*104|0)+88>>2]=0.0;f[P+16>>2]=h;f[P+20>>2]=g;c[P+24>>2]=o;c[p+812>>2]=(c[p+812>>2]|0)+1;d=c[b+12>>2]|0;if(!d){ea=Q;return}if(c[d+204>>2]&3|0){ea=Q;return}if((c[d+216>>2]&-2|0)!=4)c[d+216>>2]=1;f[d+220>>2]=0.0;ea=Q;return}function Ab(b,d){b=b|0;d=+d;var e=0,g=0.0,h=0,i=0,j=0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0,q=0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0;q=ea;ea=ea+96|0;n=c[b+136>>2]|0;if(!n){ea=q;return}j=c[b+8>>2]|0;if((j|0)<(n|0)){if((c[b+12>>2]|0)<(n|0)){c[6747]=(c[6747]|0)+1;e=kb((n<<4|3)+16|0)|0;if(!e)i=0;else{c[(e+4+15&-16)+-4>>2]=e;i=e+4+15&-16}e=c[b+8>>2]|0;if((e|0)>0){h=0;do{m=i+(h<<4)|0;r=(c[b+16>>2]|0)+(h<<4)|0;c[m>>2]=c[r>>2];c[m+4>>2]=c[r+4>>2];c[m+8>>2]=c[r+8>>2];c[m+12>>2]=c[r+12>>2];h=h+1|0}while((h|0)!=(e|0))}e=c[b+16>>2]|0;if(e|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=i;c[b+12>>2]=n;h=b+16|0}else h=b+16|0;e=j;do{r=(c[h>>2]|0)+(e<<4)|0;c[r>>2]=c[q+48>>2];c[r+4>>2]=c[q+48+4>>2];c[r+8>>2]=c[q+48+8>>2];c[r+12>>2]=c[q+48+12>>2];e=e+1|0}while((e|0)!=(n|0))}c[b+8>>2]=n;j=c[b+28>>2]|0;if((j|0)<(n|0)){if((c[b+32>>2]|0)<(n|0)){c[6747]=(c[6747]|0)+1;e=kb((n<<4|3)+16|0)|0;if(!e)i=0;else{c[(e+4+15&-16)+-4>>2]=e;i=e+4+15&-16}e=c[b+28>>2]|0;if((e|0)>0){h=0;do{r=i+(h<<4)|0;m=(c[b+36>>2]|0)+(h<<4)|0;c[r>>2]=c[m>>2];c[r+4>>2]=c[m+4>>2];c[r+8>>2]=c[m+8>>2];c[r+12>>2]=c[m+12>>2];h=h+1|0}while((h|0)!=(e|0))}e=c[b+36>>2]|0;if(e|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=i;c[b+32>>2]=n;h=b+36|0}else h=b+36|0;e=j;do{r=(c[h>>2]|0)+(e<<4)|0;c[r>>2]=c[q+48>>2];c[r+4>>2]=c[q+48+4>>2];c[r+8>>2]=c[q+48+8>>2];c[r+12>>2]=c[q+48+12>>2];e=e+1|0}while((e|0)!=(n|0))}c[b+28>>2]=n;m=c[b+48>>2]|0;if((m|0)<(n|0)){do if((c[b+52>>2]|0)<(n|0)){c[6747]=(c[6747]|0)+1;e=kb((n<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}h=c[b+48>>2]|0;i=c[b+56>>2]|0;if((h|0)<=0){if(!i){a[b+60>>0]=1;c[b+56>>2]=e;c[b+52>>2]=n;h=n<<2;break}}else{j=0;do{c[e+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0))}if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[b+60>>0]=1;c[b+56>>2]=e;c[b+52>>2]=n;h=n<<2}else{h=n<<2;e=c[b+56>>2]|0}while(0);hk(e+(m<<2)|0,0,h-(m<<2)|0)|0}c[b+48>>2]=n;m=c[b+68>>2]|0;if((m|0)<(n|0)){do if((c[b+72>>2]|0)<(n|0)){c[6747]=(c[6747]|0)+1;e=kb((n<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}h=c[b+68>>2]|0;i=c[b+76>>2]|0;if((h|0)<=0){if(!i){a[b+80>>0]=1;c[b+76>>2]=e;c[b+72>>2]=n;h=n<<2;break}}else{j=0;do{c[e+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0))}if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[b+80>>0]=1;c[b+76>>2]=e;c[b+72>>2]=n;h=n<<2}else{h=n<<2;e=c[b+76>>2]|0}while(0);hk(e+(m<<2)|0,0,h-(m<<2)|0)|0}c[b+68>>2]=n;e=c[b+136>>2]|0;if((e|0)<=0){ea=q;return}h=c[b+76>>2]|0;i=c[b+56>>2]|0;j=0;do{f[h+(j<<2)>>2]=0.0;f[i+(j<<2)>>2]=0.0;j=j+1|0}while((j|0)!=(e|0));j=0;do{h=c[b+144>>2]|0;i=c[h+(j*284|0)+88>>2]|0;if(i){x=h+(j*284|0)+92|0;c[q+48>>2]=c[x>>2];c[q+48+4>>2]=c[x+4>>2];c[q+48+8>>2]=c[x+8>>2];c[q+48+12>>2]=c[x+12>>2];x=h+(j*284|0)+108|0;c[q+48+16>>2]=c[x>>2];c[q+48+16+4>>2]=c[x+4>>2];c[q+48+16+8>>2]=c[x+8>>2];c[q+48+16+12>>2]=c[x+12>>2];x=h+(j*284|0)+124|0;c[q+48+32>>2]=c[x>>2];c[q+48+32+4>>2]=c[x+4>>2];c[q+48+32+8>>2]=c[x+8>>2];c[q+48+32+12>>2]=c[x+12>>2];x=c[b+120>>2]|0;e=c[q+48+16+(x<<2)>>2]|0;y=c[q+48+32+(x<<2)>>2]|0;m=c[b+36>>2]|0;c[m+(j<<4)>>2]=c[q+48+(x<<2)>>2];c[m+(j<<4)+4>>2]=e;c[m+(j<<4)+8>>2]=y;f[m+(j<<4)+12>>2]=0.0;m=c[b+36>>2]|0;y=m+(j<<4)|0;z=+f[y>>2];e=h+(j*284|0)|0;g=+f[e>>2];x=m+(j<<4)+4|0;w=+f[x>>2];r=h+(j*284|0)+4|0;k=+f[r>>2];m=m+(j<<4)+8|0;t=+f[m>>2];n=h+(j*284|0)+8|0;v=+f[n>>2];l=z-g*(z*g+w*k+t*v);u=w-k*(z*g+w*k+t*v);v=t-v*(z*g+w*k+t*v);t=1.0/+s(+(v*v+(l*l+u*u)));f[y>>2]=l*t;f[x>>2]=u*t;f[m>>2]=v*t;k=+f[r>>2];w=+f[n>>2];g=+f[e>>2];e=c[b+16>>2]|0;f[e+(j<<4)>>2]=k*(v*t)-w*(u*t);f[e+(j<<4)+4>>2]=w*(l*t)-v*t*g;f[e+(j<<4)+8>>2]=u*t*g-k*(l*t);f[e+(j<<4)+12>>2]=0.0;e=c[b+16>>2]|0;n=e+(j<<4)|0;t=+f[n>>2];r=e+(j<<4)+4|0;l=+f[r>>2];e=e+(j<<4)+8|0;k=+f[e>>2];g=1.0/+s(+(t*t+l*l+k*k));f[n>>2]=t*g;f[r>>2]=l*g;f[e>>2]=k*g;e=c[b+116>>2]|0;r=c[b+36>>2]|0;g=+f[r+(j<<4)>>2];k=+f[r+(j<<4)+4>>2];l=+f[r+(j<<4)+8>>2];if(g*g+k*k+l*l>1.100000023841858)g=0.0;else{C=+f[h+(j*284|0)+16>>2];G=C-+f[e+52>>2];E=+f[h+(j*284|0)+20>>2];I=E-+f[e+56>>2];J=+f[h+(j*284|0)+24>>2];L=J-+f[e+60>>2];C=C-+f[i+52>>2];E=E-+f[i+56>>2];J=J-+f[i+60>>2];F=+f[e+332>>2];M=+f[e+336>>2];H=+f[e+328>>2];B=+f[i+332>>2];K=+f[i+336>>2];D=+f[i+328>>2];A=(l*I-k*L)*+f[e+4>>2]+(g*L-l*G)*+f[e+20>>2]+(k*G-g*I)*+f[e+36>>2];t=(l*I-k*L)*+f[e+8>>2]+(g*L-l*G)*+f[e+24>>2]+(k*G-g*I)*+f[e+40>>2];u=(l*I-k*L)*+f[e+12>>2]+(g*L-l*G)*+f[e+28>>2]+(k*G-g*I)*+f[e+44>>2];v=(E*-l-J*-k)*+f[i+4>>2]+(J*-g-C*-l)*+f[i+20>>2]+(C*-k-E*-g)*+f[i+36>>2];w=(E*-l-J*-k)*+f[i+8>>2]+(J*-g-C*-l)*+f[i+24>>2]+(C*-k-E*-g)*+f[i+40>>2];z=(E*-l-J*-k)*+f[i+12>>2]+(J*-g-C*-l)*+f[i+28>>2]+(C*-k-E*-g)*+f[i+44>>2];g=(g*(L*F-I*M+ +f[e+312>>2]-(J*B-E*K+ +f[i+312>>2]))+k*(+f[e+316>>2]+(G*M-L*H)-(+f[i+316>>2]+(C*K-J*D)))+l*(I*H-G*F+ +f[e+320>>2]-(E*D-C*B+ +f[i+320>>2])))*-.20000000298023224*(1.0/(+f[i+344>>2]+(+f[e+344>>2]+(A*(A*+f[e+396>>2])+t*(t*+f[e+400>>2])+u*(u*+f[e+404>>2])))+(v*(v*+f[i+396>>2])+w*(w*+f[i+400>>2])+z*(z*+f[i+404>>2]))))}f[(c[b+76>>2]|0)+(j<<2)>>2]=g;e=c[b+136>>2]|0}j=j+1|0}while((j|0)<(e|0));if((e|0)<=0){ea=q;return}i=c[b+144>>2]|0;h=0;m=0;while(1){e=c[i+(m*284|0)+88>>2]|0;if(e){g=+f[i+(m*284|0)+252>>2];if(g!=0.0){e=i;g=g*d}else{M=+f[i+(m*284|0)+256>>2];M=M==0.0?0.0:M;y=c[b+116>>2]|0;x=c[b+16>>2]|0;G=+f[i+(m*284|0)+16>>2];E=+f[i+(m*284|0)+20>>2];A=+f[i+(m*284|0)+24>>2];w=+f[x+(m<<4)>>2];D=+f[x+(m<<4)+4>>2];g=+f[x+(m<<4)+8>>2];O=G-+f[y+52>>2];P=E-+f[y+56>>2];k=A-+f[y+60>>2];l=+f[y+264>>2]*(P*g-k*D)+ +f[y+280>>2]*(k*w-O*g)+(O*D-P*w)*+f[y+296>>2];Q=(P*g-k*D)*+f[y+268>>2]+(k*w-O*g)*+f[y+284>>2]+(O*D-P*w)*+f[y+300>>2];N=(P*g-k*D)*+f[y+272>>2]+(k*w-O*g)*+f[y+288>>2]+(O*D-P*w)*+f[y+304>>2];K=G-+f[e+52>>2];I=E-+f[e+56>>2];C=A-+f[e+60>>2];v=(D*K-w*I)*+f[e+296>>2]+(+f[e+264>>2]*(g*I-D*C)+ +f[e+280>>2]*(w*C-g*K));t=(g*I-D*C)*+f[e+268>>2]+(w*C-g*K)*+f[e+284>>2]+(D*K-w*I)*+f[e+300>>2];u=(g*I-D*C)*+f[e+272>>2]+(w*C-g*K)*+f[e+288>>2]+(D*K-w*I)*+f[e+304>>2];G=G-+f[y+52>>2];E=E-+f[y+56>>2];A=A-+f[y+60>>2];H=+f[y+332>>2];z=+f[y+336>>2];F=+f[y+328>>2];L=+f[e+332>>2];B=+f[e+336>>2];J=+f[e+328>>2];g=-(1.0/(+f[y+344>>2]+(g*(P*l-O*Q)+(w*(k*Q-P*N)+D*(O*N-k*l)))+(+f[e+344>>2]+(g*(I*v-K*t)+(w*(C*t-I*u)+D*(K*u-C*v)))))*((A*H-E*z+ +f[y+312>>2]-(C*L-I*B+ +f[e+312>>2]))*w+(+f[y+316>>2]+(G*z-A*F)-(+f[e+316>>2]+(K*B-C*J)))*D+(E*F-G*H+ +f[y+320>>2]-(I*J-K*L+ +f[e+320>>2]))*g));g=M>2]|0;g=g<-M?-M:g}y=(c[b+56>>2]|0)+(m<<2)|0;f[y>>2]=0.0;j=e+(m*284|0)+280|0;f[j>>2]=1.0;l=+f[i+(m*284|0)+276>>2]*d*+f[i+(m*284|0)+228>>2];f[y>>2]=g;k=g*.5;g=+f[(c[b+76>>2]|0)+(m<<2)>>2];if(k*k+g*g>l*l){Q=l/+s(+(k*k+g*g));f[j>>2]=Q*+f[j>>2];h=1}}else{f[(c[b+56>>2]|0)+(m<<2)>>2]=0.0;f[i+(m*284|0)+280>>2]=1.0;e=i}m=m+1|0;j=c[b+136>>2]|0;if((m|0)>=(j|0))break;else i=e}if(h&(j|0)>0){e=c[b+76>>2]|0;i=0;do{h=e+(i<<2)|0;if(+f[h>>2]!=0.0?(p=(c[b+144>>2]|0)+(i*284|0)+280|0,o=+f[p>>2],o<1.0):0){y=(c[b+56>>2]|0)+(i<<2)|0;f[y>>2]=o*+f[y>>2];f[h>>2]=+f[p>>2]*+f[h>>2]}i=i+1|0}while((i|0)!=(j|0))}if((j|0)<=0){ea=q;return}n=0;do{h=c[b+144>>2]|0;e=c[b+116>>2]|0;i=h+(n*284|0)+16|0;k=+f[i>>2]-+f[e+52>>2];m=h+(n*284|0)+20|0;d=+f[m>>2]-+f[e+56>>2];j=h+(n*284|0)+24|0;l=+f[j>>2]-+f[e+60>>2];f[q+48>>2]=k;f[q+48+4>>2]=d;f[q+48+8>>2]=l;f[q+48+12>>2]=0.0;g=+f[(c[b+56>>2]|0)+(n<<2)>>2];if(g!=0.0){y=c[b+16>>2]|0;P=g*+f[y+(n<<4)+4>>2];Q=g*+f[y+(n<<4)+8>>2];f[q+32>>2]=g*+f[y+(n<<4)>>2];f[q+32+4>>2]=P;f[q+32+8>>2]=Q;f[q+32+12>>2]=0.0;uk(e,q+32|0,q+48|0)}g=+f[(c[b+76>>2]|0)+(n<<2)>>2];if(g!=0.0){y=c[(c[b+144>>2]|0)+(n*284|0)+88>>2]|0;P=+f[m>>2]-+f[y+56>>2];O=+f[j>>2]-+f[y+60>>2];f[q+32>>2]=+f[i>>2]-+f[y+52>>2];f[q+32+4>>2]=P;f[q+32+8>>2]=O;f[q+32+12>>2]=0.0;x=c[b+36>>2]|0;O=+f[x+(n<<4)>>2]*g;P=g*+f[x+(n<<4)+4>>2];Q=g*+f[x+(n<<4)+8>>2];f[q+16>>2]=O;f[q+16+4>>2]=P;f[q+16+8>>2]=Q;f[q+16+12>>2]=0.0;x=c[b+116>>2]|0;r=c[b+124>>2]|0;K=+f[x+4+(r<<2)>>2];L=+f[x+20+(r<<2)>>2];M=+f[x+36+(r<<2)>>2];N=(K*k+L*d+M*l)*(1.0-+f[h+(n*284|0)+244>>2]);f[q+48>>2]=k-K*N;f[q+48+4>>2]=d-L*N;f[q+48+8>>2]=l-M*N;uk(x,q+16|0,q+48|0);f[q>>2]=-O;f[q+4>>2]=-P;f[q+8>>2]=-Q;f[q+12>>2]=0.0;uk(y,q,q+32|0)}n=n+1|0}while((n|0)<(c[b+136>>2]|0));ea=q;return}function Bb(b,e,g,h,i,j,k){b=b|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0;v=ea;ea=ea+9824|0;o=j;p=o+36|0;do{c[o>>2]=0;o=o+4|0}while((o|0)<(p|0));c[v+9680>>2]=b;c[v+9680+4>>2]=g;F=+f[h>>2];L=+f[e>>2];E=+f[h+16>>2];K=+f[e+16>>2];D=+f[h+32>>2];J=+f[e+32>>2];I=+f[e+4>>2];H=+f[e+20>>2];G=+f[e+36>>2];z=+f[e+8>>2];x=+f[e+24>>2];l=+f[e+40>>2];C=+f[h+4>>2];B=+f[h+20>>2];A=+f[h+36>>2];y=+f[h+8>>2];w=+f[h+24>>2];m=+f[h+40>>2];f[v+9680+8>>2]=F*L+E*K+D*J;f[v+9680+12>>2]=F*I+E*H+D*G;f[v+9680+16>>2]=F*z+E*x+D*l;f[v+9680+20>>2]=0.0;f[v+9680+24>>2]=L*C+K*B+J*A;f[v+9680+28>>2]=I*C+H*B+G*A;f[v+9680+32>>2]=z*C+x*B+l*A;f[v+9680+36>>2]=0.0;f[v+9680+40>>2]=L*y+K*w+J*m;f[v+9680+44>>2]=I*y+H*w+G*m;f[v+9680+48>>2]=z*y+x*w+l*m;f[v+9680+52>>2]=0.0;N=+f[h+48>>2]-+f[e+48>>2];M=+f[h+52>>2]-+f[e+52>>2];q=+f[h+56>>2]-+f[e+56>>2];n=N*+f[e>>2]+M*+f[e+16>>2]+q*+f[e+32>>2];r=N*+f[e+4>>2]+M*+f[e+20>>2]+q*+f[e+36>>2];q=N*+f[e+8>>2]+M*+f[e+24>>2]+q*+f[e+40>>2];f[v+9680+56>>2]=F*L+E*K+D*J;f[v+9680+60>>2]=L*C+K*B+J*A;f[v+9680+64>>2]=L*y+K*w+J*m;f[v+9680+68>>2]=0.0;f[v+9680+72>>2]=F*I+E*H+D*G;f[v+9680+76>>2]=I*C+H*B+G*A;f[v+9680+80>>2]=I*y+H*w+G*m;f[v+9680+84>>2]=0.0;f[v+9680+88>>2]=F*z+E*x+D*l;f[v+9680+92>>2]=z*C+x*B+l*A;f[v+9680+96>>2]=z*y+x*w+l*m;f[v+9680+100>>2]=0.0;f[v+9680+104>>2]=n;f[v+9680+108>>2]=r;f[v+9680+112>>2]=q;f[v+9680+116>>2]=0.0;c[v+9680+120>>2]=k?83:82;c[v+9680+124>>2]=0;c[v+9296+364>>2]=0;c[v+9296+128>>2]=0;c[v+9296+128+4>>2]=0;c[v+9296+128+8>>2]=0;c[v+9296+128+12>>2]=0;c[v+9296+376>>2]=2;c[v+9296+368>>2]=0;f[v+9296+144>>2]=0.0;q=-+f[i+4>>2];r=-+f[i+8>>2];f[v+9808>>2]=-+f[i>>2];f[v+9808+4>>2]=q;f[v+9808+8>>2]=r;f[v+9808+12>>2]=0.0;switch(Db(v+9296|0,v+9680|0,v+9808|0)|0){case 1:{c[v+9280>>2]=0;c[v+9280+4>>2]=0;c[v+9280+8>>2]=0;c[v+9280+12>>2]=0;c[v>>2]=9;c[v+9276>>2]=0;c[v+40>>2]=0;c[v+40+4>>2]=0;c[v+40+8>>2]=0;c[v+40+12>>2]=0;c[v+40+16>>2]=0;g=0;do{k=128-g+-1|0;c[v+2108+(k*56|0)+44>>2]=0;b=c[v+9288>>2]|0;c[v+2108+(k*56|0)+48>>2]=b;if(b|0)c[b+44>>2]=v+2108+(k*56|0);c[v+9288>>2]=v+2108+(k*56|0);g=g+1|0}while((g|0)!=128);c[v+9292>>2]=128;n=+f[i>>2];q=+f[i+4>>2];m=+f[i+8>>2];t=c[v+9296+372>>2]|0;do if((c[t+32>>2]|0)>>>0>1?Rb(v+9296|0)|0:0){b=c[v+9280>>2]|0;if(b|0){o=c[v+9284>>2]|0;p=c[v+9292>>2]|0;do{k=b+44|0;h=b+48|0;g=c[h>>2]|0;if(g|0)c[g+44>>2]=c[k>>2];g=c[k>>2]|0;if(g|0)c[g+48>>2]=c[h>>2];if((c[v+9280>>2]|0)==(b|0))c[v+9280>>2]=c[h>>2];o=o+-1|0;c[b+44>>2]=0;c[h>>2]=c[v+9288>>2];g=c[v+9288>>2]|0;if(g|0)c[g+44>>2]=b;c[v+9288>>2]=b;p=p+1|0;b=c[v+9280>>2]|0}while((b|0)!=0);c[v+9284>>2]=o;c[v+9292>>2]=p}c[v>>2]=0;c[v+9276>>2]=0;b=c[t>>2]|0;g=c[t+12>>2]|0;N=+f[g+16>>2];F=+f[b+16>>2]-N;H=+f[g+20>>2];I=+f[b+20>>2]-H;K=+f[g+24>>2];L=+f[b+24>>2]-K;g=c[t+4>>2]|0;J=+f[g+16>>2]-N;M=+f[g+20>>2]-H;G=+f[g+24>>2]-K;k=c[t+8>>2]|0;N=+f[k+16>>2]-N;H=+f[k+20>>2]-H;K=+f[k+24>>2]-K;if(F*M*K+(I*G*N+L*J*H-F*G*H-I*J*K)-L*M*N<0.0){c[t>>2]=g;c[t+4>>2]=b;h=c[t+16>>2]|0;c[t+16>>2]=c[t+20>>2];c[t+20>>2]=h;h=g}else{h=b;b=g}h=Ud(v,h,b,k,1)|0;o=Ud(v,c[t+4>>2]|0,c[t>>2]|0,c[t+12>>2]|0,1)|0;p=Ud(v,c[t+8>>2]|0,c[t+4>>2]|0,c[t+12>>2]|0,1)|0;i=Ud(v,c[t>>2]|0,c[t+8>>2]|0,c[t+12>>2]|0,1)|0;if((c[v+9284>>2]|0)==4){g=c[v+9280>>2]|0;l=+f[g+16>>2];b=c[g+48>>2]|0;if(b){m=l*l;k=g;while(1){l=+f[b+16>>2];g=l*l>2]|0;if(!b)break;else m=g?l*l:m}g=k;l=+f[k+16>>2]}r=+f[g>>2];q=+f[g+4>>2];n=+f[g+8>>2];m=+f[g+12>>2];b=c[g+20>>2]|0;k=c[g+24>>2]|0;t=c[g+28>>2]|0;a[h+52>>0]=0;c[h+32>>2]=o;a[o+52>>0]=0;c[o+32>>2]=h;a[h+53>>0]=0;c[h+36>>2]=p;a[p+52>>0]=1;c[p+32>>2]=h;a[h+54>>0]=0;c[h+40>>2]=i;a[i+52>>0]=2;c[i+32>>2]=h;a[o+53>>0]=2;c[o+36>>2]=i;a[i+54>>0]=1;c[i+40>>2]=o;a[o+54>>0]=1;c[o+40>>2]=p;a[p+53>>0]=2;c[p+36>>2]=o;a[p+54>>0]=1;c[p+40>>2]=i;a[i+53>>0]=2;c[i+36>>2]=p;c[v>>2]=0;i=g;o=b;h=k;p=t;t=0;while(1){b=c[v+9276>>2]|0;if(b>>>0>=64){u=45;break}c[v+9808>>2]=0;c[v+9808+4>>2]=0;c[v+9808+8>>2]=0;c[v+9276>>2]=b+1;t=t+1|0;a[i+55>>0]=t;g=i+4|0;k=i+8|0;Og(v+9296|0,+f[i>>2],+f[g>>2],+f[k>>2],v+60+(b<<5)|0);if(!(+f[i>>2]*+f[v+60+(b<<5)+16>>2]+ +f[g>>2]*+f[v+60+(b<<5)+20>>2]+ +f[k>>2]*+f[v+60+(b<<5)+24>>2]-+f[i+16>>2]>9.999999747378752e-05)){b=7;u=44;break}k=0;do{g=xg(v,t,v+60+(b<<5)|0,c[i+32+(k<<2)>>2]|0,d[i+52+k>>0]|0,v+9808|0)|0;k=k+1|0}while(g&k>>>0<3);if(!(g&(c[v+9808+8>>2]|0)>>>0>2)){b=4;u=44;break}k=c[v+9808>>2]|0;g=c[v+9808+4>>2]|0;a[k+53>>0]=2;c[k+36>>2]=g;a[g+54>>0]=1;c[g+40>>2]=k;g=i+44|0;k=i+48|0;b=c[k>>2]|0;if(b|0)c[b+44>>2]=c[g>>2];b=c[g>>2]|0;if(b|0)c[b+48>>2]=c[k>>2];if((c[v+9280>>2]|0)==(i|0))c[v+9280>>2]=c[k>>2];c[v+9284>>2]=(c[v+9284>>2]|0)+-1;c[i+44>>2]=0;c[k>>2]=c[v+9288>>2];b=c[v+9288>>2]|0;if(b|0)c[b+44>>2]=i;c[v+9288>>2]=i;c[v+9292>>2]=(c[v+9292>>2]|0)+1;g=c[v+9280>>2]|0;l=+f[g+16>>2];b=c[g+48>>2]|0;if(b){m=l*l;k=g;while(1){l=+f[b+16>>2];g=l*l>2]|0;if(!b)break;else m=g?l*l:m}g=k;l=+f[k+16>>2]}r=+f[g>>2];q=+f[g+4>>2];n=+f[g+8>>2];m=+f[g+12>>2];k=c[g+20>>2]|0;h=c[g+24>>2]|0;b=c[g+28>>2]|0;if(t>>>0>=255){g=h;break}else{i=g;o=k;p=b}}if((u|0)==44){c[v>>2]=b;k=o;g=h;b=p}else if((u|0)==45){c[v>>2]=6;k=o;g=h;b=p}J=r*l;H=q*l;N=n*l;f[v+40>>2]=r;f[v+44>>2]=q;f[v+48>>2]=n;f[v+52>>2]=m;f[v+56>>2]=l;c[v+36>>2]=3;c[v+4>>2]=k;c[v+8>>2]=g;c[v+12>>2]=b;t=g;K=+f[t+16>>2]-J;F=+f[t+20>>2]-H;I=+f[t+24>>2]-N;i=b;E=+f[i+16>>2]-J;G=+f[i+20>>2]-H;L=+f[i+24>>2]-N;L=+s(+((K*G-F*E)*(K*G-F*E)+((F*L-I*G)*(F*L-I*G)+(I*E-K*L)*(I*E-K*L))));f[v+20>>2]=L;K=+f[i+16>>2]-J;E=+f[i+20>>2]-H;I=+f[i+24>>2]-N;i=k;G=+f[i+16>>2]-J;F=+f[i+20>>2]-H;M=+f[i+24>>2]-N;M=+s(+((K*F-E*G)*(K*F-E*G)+((E*M-I*F)*(E*M-I*F)+(I*G-K*M)*(I*G-K*M))));f[v+24>>2]=M;K=+f[i+16>>2]-J;G=+f[i+20>>2]-H;I=+f[i+24>>2]-N;J=+f[t+16>>2]-J;H=+f[t+20>>2]-H;N=+f[t+24>>2]-N;N=+s(+((K*H-G*J)*(K*H-G*J)+((G*N-I*H)*(G*N-I*H)+(I*J-K*N)*(I*J-K*N))));f[v+20>>2]=L/(L+M+N);f[v+24>>2]=M/(L+M+N);f[v+28>>2]=N/(L+M+N);if((c[v>>2]|0)!=9)if(!(c[v+36>>2]|0)){n=0.0;m=0.0;l=0.0;break}else{h=v+36|0;u=54;break}c[j>>2]=3;e=0;ea=v;return e|0}else u=48}else u=48;while(0);if((u|0)==48){c[v>>2]=8;f[v+40>>2]=n;f[v+44>>2]=q;f[v+48>>2]=m;f[v+52>>2]=0.0;l=+s(+(n*n+q*q+m*m));if(l>0.0){f[v+40>>2]=1.0/l*n;f[v+44>>2]=1.0/l*q;f[v+48>>2]=1.0/l*m}else{c[v+40>>2]=1065353216;c[v+44>>2]=0;c[v+48>>2]=0}f[v+52>>2]=0.0;f[v+56>>2]=0.0;c[v+36>>2]=1;c[v+4>>2]=c[t>>2];f[v+20>>2]=1.0;h=v+36|0;u=54}if((u|0)==54){l=0.0;m=0.0;n=0.0;k=0;do{b=c[v+9680+120>>2]|0;u=c[v+9680+124>>2]|0;g=(c[v+9680>>2]|0)+(1?u>>1:u)|0;if(u&1)b=c[(c[g>>2]|0)+b>>2]|0;Ma[b&127](v+9808|0,g,c[v+4+(k<<2)>>2]|0);N=+f[v+20+(k<<2)>>2];l=l+ +f[v+9808>>2]*N;m=m+N*+f[v+9808+4>>2];n=n+N*+f[v+9808+8>>2];k=k+1|0}while(k>>>0<(c[h>>2]|0)>>>0)}c[j>>2]=1;N=l*+f[e+16>>2]+m*+f[e+20>>2]+n*+f[e+24>>2]+ +f[e+52>>2];K=l*+f[e+32>>2]+m*+f[e+36>>2]+n*+f[e+40>>2]+ +f[e+56>>2];f[j+4>>2]=l*+f[e>>2]+m*+f[e+4>>2]+n*+f[e+8>>2]+ +f[e+48>>2];f[j+8>>2]=N;f[j+12>>2]=K;f[j+16>>2]=0.0;K=+f[v+40>>2];N=+f[v+56>>2];L=+f[v+44>>2];M=+f[v+48>>2];F=l-K*N;G=m-N*L;H=n-N*M;I=F*+f[e+16>>2]+G*+f[e+20>>2]+H*+f[e+24>>2]+ +f[e+52>>2];J=F*+f[e+32>>2]+G*+f[e+36>>2]+H*+f[e+40>>2]+ +f[e+56>>2];f[j+20>>2]=F*+f[e>>2]+G*+f[e+4>>2]+H*+f[e+8>>2]+ +f[e+48>>2];f[j+24>>2]=I;f[j+28>>2]=J;f[j+32>>2]=0.0;f[j+36>>2]=-K;f[j+40>>2]=-L;f[j+44>>2]=-M;f[j+48>>2]=0.0;f[j+52>>2]=-N;e=1;ea=v;return e|0}case 2:{c[j>>2]=2;e=0;ea=v;return e|0}default:{e=0;ea=v;return e|0}}return 0}function Cb(b){b=b|0;var d=0.0,e=0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0;x=ea;ea=ea+176|0;if(!(a[b+738>>0]|0)){ea=x;return}f[b+36>>2]=0.0;f[b+744>>2]=0.0;if(!(a[b+736>>0]|0)){e=c[b+28>>2]|0;l=+f[b+600>>2];m=+f[b+604>>2];t=+f[b+608>>2];v=l*+f[e+20>>2]+m*+f[e+24>>2]+t*+f[e+28>>2]+ +f[e+56>>2];g=c[b+32>>2]|0;n=+f[b+664>>2];o=+f[b+668>>2];q=+f[b+672>>2];w=n*+f[g+20>>2]+o*+f[g+24>>2]+q*+f[g+28>>2]+ +f[g+56>>2];u=n*+f[g+36>>2]+o*+f[g+40>>2]+q*+f[g+44>>2]+ +f[g+60>>2];p=l*+f[e+4>>2]+m*+f[e+8>>2]+t*+f[e+12>>2]+ +f[e+52>>2];t=l*+f[e+36>>2]+m*+f[e+40>>2]+t*+f[e+44>>2]+ +f[e+60>>2];q=n*+f[g+4>>2]+o*+f[g+8>>2]+q*+f[g+12>>2]+ +f[g+52>>2];if((q-p)*(q-p)+(w-v)*(w-v)+(u-t)*(u-t)>1.1920928955078125e-07){k=1.0/+s(+((q-p)*(q-p)+(w-v)*(w-v)+(u-t)*(u-t)));f[x>>2]=(q-p)*k;f[x+4>>2]=(w-v)*k;f[x+8>>2]=(u-t)*k;c[x+12>>2]=0;j=(u-t)*k;d=(w-v)*k;k=(q-p)*k}else{c[x>>2]=1065353216;c[x+4>>2]=0;c[x+8>>2]=0;f[x+12>>2]=0.0;j=0.0;d=0.0;k=1.0}if(+r(+j)>.7071067690849304){y=j*j+d*d;o=1.0/+s(+y);n=-(j*o);d=d*o;i=d;l=k*n;m=0.0;o=y*o;d=-(k*d)}else{m=k*k+d*d;l=1.0/+s(+m);d=-(d*l);o=k*l;i=0.0;l=m*l;m=d;n=o;o=-(j*o);d=j*d}f[x+16>>2]=m;f[x+20>>2]=n;f[x+24>>2]=i;f[x+32>>2]=o;f[x+36>>2]=d;f[x+40>>2]=l;e=c[b+28>>2]|0;c[x+128>>2]=c[e+4>>2];c[x+128+4>>2]=c[e+20>>2];c[x+128+8>>2]=c[e+36>>2];f[x+128+12>>2]=0.0;c[x+128+16>>2]=c[e+8>>2];c[x+128+20>>2]=c[e+24>>2];c[x+128+24>>2]=c[e+40>>2];f[x+128+28>>2]=0.0;c[x+128+32>>2]=c[e+12>>2];c[x+128+36>>2]=c[e+28>>2];c[x+128+40>>2]=c[e+44>>2];f[x+128+44>>2]=0.0;g=c[b+32>>2]|0;c[x+80>>2]=c[g+4>>2];c[x+80+4>>2]=c[g+20>>2];c[x+80+8>>2]=c[g+36>>2];f[x+80+12>>2]=0.0;c[x+80+16>>2]=c[g+8>>2];c[x+80+20>>2]=c[g+24>>2];c[x+80+24>>2]=c[g+40>>2];f[x+80+28>>2]=0.0;c[x+80+32>>2]=c[g+12>>2];c[x+80+36>>2]=c[g+28>>2];c[x+80+40>>2]=c[g+44>>2];f[x+80+44>>2]=0.0;y=v-+f[e+56>>2];o=t-+f[e+60>>2];f[x+64>>2]=p-+f[e+52>>2];f[x+64+4>>2]=y;f[x+64+8>>2]=o;f[x+64+12>>2]=0.0;o=w-+f[g+56>>2];y=u-+f[g+60>>2];f[x+48>>2]=q-+f[g+52>>2];f[x+48+4>>2]=o;f[x+48+8>>2]=y;f[x+48+12>>2]=0.0;_f(b+48|0,x+128|0,x+80|0,x+64|0,x+48|0,x,e+396|0,+f[e+344>>2],g+396|0,+f[g+344>>2]);g=c[b+28>>2]|0;c[x+128>>2]=c[g+4>>2];c[x+128+4>>2]=c[g+20>>2];c[x+128+8>>2]=c[g+36>>2];f[x+128+12>>2]=0.0;c[x+128+16>>2]=c[g+8>>2];c[x+128+20>>2]=c[g+24>>2];c[x+128+24>>2]=c[g+40>>2];f[x+128+28>>2]=0.0;c[x+128+32>>2]=c[g+12>>2];c[x+128+36>>2]=c[g+28>>2];c[x+128+40>>2]=c[g+44>>2];f[x+128+44>>2]=0.0;e=c[b+32>>2]|0;c[x+80>>2]=c[e+4>>2];c[x+80+4>>2]=c[e+20>>2];c[x+80+8>>2]=c[e+36>>2];f[x+80+12>>2]=0.0;c[x+80+16>>2]=c[e+8>>2];c[x+80+20>>2]=c[e+24>>2];c[x+80+24>>2]=c[e+40>>2];f[x+80+28>>2]=0.0;c[x+80+32>>2]=c[e+12>>2];c[x+80+36>>2]=c[e+28>>2];c[x+80+40>>2]=c[e+44>>2];f[x+80+44>>2]=0.0;y=v-+f[g+56>>2];o=t-+f[g+60>>2];f[x+64>>2]=p-+f[g+52>>2];f[x+64+4>>2]=y;f[x+64+8>>2]=o;f[x+64+12>>2]=0.0;o=w-+f[e+56>>2];y=u-+f[e+60>>2];f[x+48>>2]=q-+f[e+52>>2];f[x+48+4>>2]=o;f[x+48+8>>2]=y;f[x+48+12>>2]=0.0;_f(b+132|0,x+128|0,x+80|0,x+64|0,x+48|0,x+16|0,g+396|0,+f[g+344>>2],e+396|0,+f[e+344>>2]);e=c[b+28>>2]|0;c[x+128>>2]=c[e+4>>2];c[x+128+4>>2]=c[e+20>>2];c[x+128+8>>2]=c[e+36>>2];f[x+128+12>>2]=0.0;c[x+128+16>>2]=c[e+8>>2];c[x+128+20>>2]=c[e+24>>2];c[x+128+24>>2]=c[e+40>>2];f[x+128+28>>2]=0.0;c[x+128+32>>2]=c[e+12>>2];c[x+128+36>>2]=c[e+28>>2];c[x+128+40>>2]=c[e+44>>2];f[x+128+44>>2]=0.0;g=c[b+32>>2]|0;c[x+80>>2]=c[g+4>>2];c[x+80+4>>2]=c[g+20>>2];c[x+80+8>>2]=c[g+36>>2];f[x+80+12>>2]=0.0;c[x+80+16>>2]=c[g+8>>2];c[x+80+20>>2]=c[g+24>>2];c[x+80+24>>2]=c[g+40>>2];f[x+80+28>>2]=0.0;c[x+80+32>>2]=c[g+12>>2];c[x+80+36>>2]=c[g+28>>2];c[x+80+40>>2]=c[g+44>>2];f[x+80+44>>2]=0.0;v=v-+f[e+56>>2];y=t-+f[e+60>>2];f[x+64>>2]=p-+f[e+52>>2];f[x+64+4>>2]=v;f[x+64+8>>2]=y;f[x+64+12>>2]=0.0;w=w-+f[g+56>>2];y=u-+f[g+60>>2];f[x+48>>2]=q-+f[g+52>>2];f[x+48+4>>2]=w;f[x+48+8>>2]=y;f[x+48+12>>2]=0.0;_f(b+216|0,x+128|0,x+80|0,x+64|0,x+48|0,x+32|0,e+396|0,+f[e+344>>2],g+396|0,+f[g+344>>2])}e=c[b+560>>2]|0;g=c[b+576>>2]|0;p=+f[b+592>>2];if(+r(+p)>.7071067690849304){n=(c[h>>2]=g,+f[h>>2]);o=1.0/+s(+(p*p+n*n));y=(c[h>>2]=e,+f[h>>2]);d=n;i=y;j=0.0;k=o*n;l=-(p*o);m=(p*p+n*n)*o;n=-(o*n*y);o=y*-(p*o)}else{w=(c[h>>2]=e,+f[h>>2]);y=(c[h>>2]=g,+f[h>>2]);o=1.0/+s(+(w*w+y*y));d=y;i=w;j=-(o*y);k=0.0;l=o*w;m=-(p*(o*w));n=p*-(o*y);o=(w*w+y*y)*o}e=c[b+28>>2]|0;Q=+f[e+4>>2];K=+f[e+8>>2];D=+f[e+12>>2];z=j*Q+l*K+k*D;P=+f[e+20>>2];B=+f[e+24>>2];I=+f[e+28>>2];q=j*P+l*B+k*I;O=+f[e+36>>2];t=+f[e+40>>2];F=+f[e+44>>2];M=j*O+l*t+k*F;E=m*Q+n*K+o*D;G=m*P+n*B+o*I;J=m*O+n*t+o*F;u=Q*i+K*d+p*D;w=P*i+B*d+p*I;i=O*i+t*d+p*F;g=c[b+32>>2]|0;A=+f[g+4>>2];j=+f[g+20>>2];k=+f[g+36>>2];o=+f[g+8>>2];p=+f[g+24>>2];v=+f[g+40>>2];H=+f[g+12>>2];m=+f[g+28>>2];L=+f[g+44>>2];c[b+300>>2]=0;c[b+300+4>>2]=0;c[b+300+8>>2]=0;c[b+300+12>>2]=0;f[b+316>>2]=z*Q+q*P+M*O;f[b+320>>2]=z*K+q*B+M*t;f[b+324>>2]=z*D+q*I+M*F;f[b+328>>2]=0.0;f[b+332>>2]=A*-z+j*-q+k*-M;f[b+336>>2]=o*-z+p*-q+v*-M;f[b+340>>2]=H*-z+m*-q+L*-M;f[b+344>>2]=0.0;l=(z*Q+q*P+M*O)*+f[e+396>>2];d=(z*K+q*B+M*t)*+f[e+400>>2];C=(z*D+q*I+M*F)*+f[e+404>>2];f[b+348>>2]=l;f[b+352>>2]=d;f[b+356>>2]=C;f[b+360>>2]=0.0;n=(A*-z+j*-q+k*-M)*+f[g+396>>2];y=(o*-z+p*-q+v*-M)*+f[g+400>>2];N=(H*-z+m*-q+L*-M)*+f[g+404>>2];f[b+364>>2]=n;f[b+368>>2]=y;f[b+372>>2]=N;f[b+376>>2]=0.0;f[b+380>>2]=(z*Q+q*P+M*O)*l+(z*K+q*B+M*t)*d+(z*D+q*I+M*F)*C+((A*-z+j*-q+k*-M)*n+(o*-z+p*-q+v*-M)*y+(H*-z+m*-q+L*-M)*N);N=+f[e+4>>2];M=+f[e+20>>2];L=+f[e+36>>2];q=+f[e+8>>2];m=+f[e+24>>2];z=+f[e+40>>2];H=+f[e+12>>2];y=+f[e+28>>2];v=+f[e+44>>2];p=+f[g+4>>2];o=+f[g+20>>2];n=+f[g+36>>2];k=+f[g+8>>2];j=+f[g+24>>2];A=+f[g+40>>2];C=+f[g+12>>2];F=+f[g+28>>2];I=+f[g+44>>2];c[b+384>>2]=0;c[b+384+4>>2]=0;c[b+384+8>>2]=0;c[b+384+12>>2]=0;f[b+400>>2]=E*N+G*M+J*L;f[b+404>>2]=E*q+G*m+J*z;f[b+408>>2]=E*H+G*y+J*v;f[b+412>>2]=0.0;f[b+416>>2]=p*-E+o*-G+n*-J;f[b+420>>2]=k*-E+j*-G+A*-J;f[b+424>>2]=C*-E+F*-G+I*-J;f[b+428>>2]=0.0;d=(E*N+G*M+J*L)*+f[e+396>>2];D=(E*q+G*m+J*z)*+f[e+400>>2];t=(E*H+G*y+J*v)*+f[e+404>>2];f[b+432>>2]=d;f[b+436>>2]=D;f[b+440>>2]=t;f[b+444>>2]=0.0;l=(p*-E+o*-G+n*-J)*+f[g+396>>2];B=(k*-E+j*-G+A*-J)*+f[g+400>>2];K=(C*-E+F*-G+I*-J)*+f[g+404>>2];f[b+448>>2]=l;f[b+452>>2]=B;f[b+456>>2]=K;f[b+460>>2]=0.0;f[b+464>>2]=(E*N+G*M+J*L)*d+(E*q+G*m+J*z)*D+(E*H+G*y+J*v)*t+((p*-E+o*-G+n*-J)*l+(k*-E+j*-G+A*-J)*B+(C*-E+F*-G+I*-J)*K);K=+f[e+4>>2];J=+f[e+20>>2];I=+f[e+36>>2];G=+f[e+8>>2];F=+f[e+24>>2];E=+f[e+40>>2];C=+f[e+12>>2];B=+f[e+28>>2];A=+f[e+44>>2];j=+f[g+4>>2];k=+f[g+20>>2];l=+f[g+36>>2];n=+f[g+8>>2];o=+f[g+24>>2];p=+f[g+40>>2];t=+f[g+12>>2];v=+f[g+28>>2];y=+f[g+44>>2];c[b+468>>2]=0;c[b+468+4>>2]=0;c[b+468+8>>2]=0;c[b+468+12>>2]=0;f[b+484>>2]=u*K+w*J+i*I;f[b+488>>2]=u*G+w*F+i*E;f[b+492>>2]=u*C+w*B+i*A;f[b+496>>2]=0.0;f[b+500>>2]=j*-u+k*-w+l*-i;f[b+504>>2]=n*-u+o*-w+p*-i;f[b+508>>2]=t*-u+v*-w+y*-i;f[b+512>>2]=0.0;H=(u*K+w*J+i*I)*+f[e+396>>2];D=(u*G+w*F+i*E)*+f[e+400>>2];z=(u*C+w*B+i*A)*+f[e+404>>2];f[b+516>>2]=H;f[b+520>>2]=D;f[b+524>>2]=z;f[b+528>>2]=0.0;m=(j*-u+k*-w+l*-i)*+f[g+396>>2];q=(n*-u+o*-w+p*-i)*+f[g+400>>2];d=(t*-u+v*-w+y*-i)*+f[g+404>>2];f[b+532>>2]=m;f[b+536>>2]=q;f[b+540>>2]=d;f[b+544>>2]=0.0;f[b+548>>2]=(u*K+w*J+i*I)*H+(u*G+w*F+i*E)*D+(u*C+w*B+i*A)*z+((j*-u+k*-w+l*-i)*m+(n*-u+o*-w+p*-i)*q+(t*-u+v*-w+y*-i)*d);f[b+724>>2]=0.0;d=+pi(b,e+4|0,g+4|0);f[b+728>>2]=d;f[b+708>>2]=0.0;f[b+712>>2]=0.0;a[b+716>>0]=0;i=+f[b+692>>2];do if(i>=0.0){d=(d-+f[b+688>>2])%6.2831854820251465;if(!(d<-3.1415927410125732)){if(d>3.1415927410125732)d=d+-6.2831854820251465}else d=d+6.2831854820251465;if(d<-i){a[b+716>>0]=1;f[b+708>>2]=-(i+d);f[b+712>>2]=1.0;break}if(d>i){a[b+716>>0]=1;f[b+708>>2]=i-d;f[b+712>>2]=-1.0}}while(0);e=c[b+28>>2]|0;M=+f[b+560>>2];N=+f[b+576>>2];Q=+f[b+592>>2];O=M*+f[e+4>>2]+N*+f[e+8>>2]+Q*+f[e+12>>2];P=M*+f[e+20>>2]+N*+f[e+24>>2]+Q*+f[e+28>>2];Q=M*+f[e+36>>2]+N*+f[e+40>>2]+Q*+f[e+44>>2];g=c[b+32>>2]|0;f[b+720>>2]=1.0/(O*(O*+f[e+264>>2]+P*+f[e+280>>2]+Q*+f[e+296>>2])+P*(O*+f[e+268>>2]+P*+f[e+284>>2]+Q*+f[e+300>>2])+Q*(O*+f[e+272>>2]+P*+f[e+288>>2]+Q*+f[e+304>>2])+(O*(O*+f[g+264>>2]+P*+f[g+280>>2]+Q*+f[g+296>>2])+P*(O*+f[g+268>>2]+P*+f[g+284>>2]+Q*+f[g+300>>2])+Q*(O*+f[g+272>>2]+P*+f[g+288>>2]+Q*+f[g+304>>2])));ea=x;return}function Db(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0.0,E=0,F=0,G=0.0,H=0.0,I=0,J=0,K=0;J=ea;ea=ea+112|0;c[a+348>>2]=a+220;c[a+352>>2]=a+252;c[a+356>>2]=a+284;c[a+360>>2]=a+316;c[a+364>>2]=4;c[a+368>>2]=0;c[a+376>>2]=0;F=c[b+4>>2]|0;c[a>>2]=c[b>>2];c[a+4>>2]=F;c[a+8>>2]=c[b+8>>2];c[a+8+4>>2]=c[b+8+4>>2];c[a+8+8>>2]=c[b+8+8>>2];c[a+8+12>>2]=c[b+8+12>>2];c[a+24>>2]=c[b+24>>2];c[a+24+4>>2]=c[b+24+4>>2];c[a+24+8>>2]=c[b+24+8>>2];c[a+24+12>>2]=c[b+24+12>>2];c[a+40>>2]=c[b+40>>2];c[a+40+4>>2]=c[b+40+4>>2];c[a+40+8>>2]=c[b+40+8>>2];c[a+40+12>>2]=c[b+40+12>>2];c[a+56>>2]=c[b+56>>2];c[a+56+4>>2]=c[b+56+4>>2];c[a+56+8>>2]=c[b+56+8>>2];c[a+56+12>>2]=c[b+56+12>>2];c[a+72>>2]=c[b+72>>2];c[a+72+4>>2]=c[b+72+4>>2];c[a+72+8>>2]=c[b+72+8>>2];c[a+72+12>>2]=c[b+72+12>>2];c[a+88>>2]=c[b+88>>2];c[a+88+4>>2]=c[b+88+4>>2];c[a+88+8>>2]=c[b+88+8>>2];c[a+88+12>>2]=c[b+88+12>>2];c[a+104>>2]=c[b+104>>2];c[a+104+4>>2]=c[b+104+4>>2];c[a+104+8>>2]=c[b+104+8>>2];c[a+104+12>>2]=c[b+104+12>>2];F=c[b+124>>2]|0;c[a+120>>2]=c[b+120>>2];c[a+124>>2]=F;f[a+144>>2]=0.0;c[a+180>>2]=0;c[a+128>>2]=c[d>>2];c[a+128+4>>2]=c[d+4>>2];c[a+128+8>>2]=c[d+8>>2];c[a+128+12>>2]=c[d+12>>2];e=+f[a+128>>2];k=+f[a+132>>2];l=+f[a+136>>2];if(e*e+k*k+l*l>0.0){f[a+164>>2]=0.0;c[a+364>>2]=3;c[a+148>>2]=a+316;c[a+180>>2]=1;Og(a,-e,-k,-l,a+316|0);d=a+164|0;b=a+148|0}else{f[a+164>>2]=0.0;c[a+364>>2]=3;c[a+148>>2]=a+316;c[a+180>>2]=1;Og(a,1.0,0.0,0.0,a+316|0);d=a+164|0;b=a+148|0}f[d>>2]=1.0;C=(c[b>>2]|0)+16|0;c[a+128>>2]=c[C>>2];c[a+128+4>>2]=c[C+4>>2];c[a+128+8>>2]=c[C+8>>2];c[a+128+12>>2]=c[C+12>>2];c[J+16+48>>2]=c[C>>2];c[J+16+48+4>>2]=c[C+4>>2];c[J+16+48+8>>2]=c[C+8>>2];c[J+16+48+12>>2]=c[C+12>>2];c[J+16+32>>2]=c[C>>2];c[J+16+32+4>>2]=c[C+4>>2];c[J+16+32+8>>2]=c[C+8>>2];c[J+16+32+12>>2]=c[C+12>>2];c[J+16+16>>2]=c[C>>2];c[J+16+16+4>>2]=c[C+4>>2];c[J+16+16+8>>2]=c[C+8>>2];c[J+16+16+12>>2]=c[C+12>>2];c[J+16>>2]=c[C>>2];c[J+16+4>>2]=c[C+4>>2];c[J+16+8>>2]=c[C+8>>2];c[J+16+12>>2]=c[C+12>>2];C=c[a+368>>2]|0;i=+f[a+128>>2];m=+f[a+132>>2];j=+f[a+136>>2];D=0.0;E=0;F=0;e=e*e+k*k+l*l;a:while(1){d=1-C|0;o=a+148+(C*36|0)|0;l=+s(+(i*i+m*m+j*j));if(l<9.999999747378752e-05){I=6;break}q=a+148+(C*36|0)+32|0;g=c[q>>2]|0;f[a+148+(C*36|0)+16+(g<<2)>>2]=0.0;b=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=b;b=c[a+348+(b<<2)>>2]|0;c[a+148+(C*36|0)+(g<<2)>>2]=b;c[q>>2]=g+1;Og(a,-i,-m,-j,b);b=c[q>>2]|0;g=c[a+148+(C*36|0)+(b+-1<<2)>>2]|0;i=+f[g+16>>2];j=+f[g+20>>2];k=+f[g+24>>2];z=i-+f[J+16>>2];A=j-+f[J+16+4>>2];B=k-+f[J+16+8>>2];if(z*z+A*A+B*B<9.999999747378752e-05){I=9;break}z=i-+f[J+16+16>>2];A=j-+f[J+16+20>>2];B=k-+f[J+16+24>>2];if(z*z+A*A+B*B<9.999999747378752e-05){I=9;break}z=i-+f[J+16+32>>2];A=j-+f[J+16+36>>2];B=k-+f[J+16+40>>2];if(z*z+A*A+B*B<9.999999747378752e-05){I=9;break}z=i-+f[J+16+48>>2];A=j-+f[J+16+52>>2];B=k-+f[J+16+56>>2];if(z*z+A*A+B*B<9.999999747378752e-05){I=9;break}E=E+1&3;p=J+16+(E<<4)|0;c[p>>2]=c[g+16>>2];c[p+4>>2]=c[g+16+4>>2];c[p+8>>2]=c[g+16+8>>2];c[p+12>>2]=c[g+16+12>>2];B=(+f[a+128>>2]*i+ +f[a+132>>2]*j+ +f[a+136>>2]*k)/l;D=B>D?B:D;if(l-D-l*9.999999747378752e-05<=0.0){I=10;break}c[J+80>>2]=0;b:do switch(b|0){case 2:{p=c[o>>2]|0;o=c[a+148+(C*36|0)+4>>2]|0;e=+f[o+16>>2];i=+f[p+16>>2];j=+f[o+20>>2];k=+f[p+20>>2];l=+f[o+24>>2];m=+f[p+24>>2];if(!((e-i)*(e-i)+(j-k)*(j-k)+(l-m)*(l-m)>0.0)){I=46;break a}n=-(i*(e-i)+k*(j-k)+m*(l-m))/((e-i)*(e-i)+(j-k)*(j-k)+(l-m)*(l-m));if(n>=1.0){f[J>>2]=0.0;f[J+4>>2]=1.0;c[J+80>>2]=2;e=e*e+j*j+l*l;break b}if(!(n<=0.0)){f[J+4>>2]=n;f[J>>2]=1.0-n;c[J+80>>2]=3;e=(m+(l-m)*n)*(m+(l-m)*n)+((i+(e-i)*n)*(i+(e-i)*n)+(k+(j-k)*n)*(k+(j-k)*n));break b}else{f[J>>2]=1.0;f[J+4>>2]=0.0;c[J+80>>2]=1;e=i*i+k*k+m*m;break b}}case 3:{e=+bd((c[o>>2]|0)+16|0,(c[a+148+(C*36|0)+4>>2]|0)+16|0,(c[a+148+(C*36|0)+8>>2]|0)+16|0,J,J+80|0);break}case 4:{b=c[o>>2]|0;g=c[a+148+(C*36|0)+4>>2]|0;o=c[a+148+(C*36|0)+8>>2]|0;p=c[a+148+(C*36|0)+12>>2]|0;r=+f[b+16>>2];t=+f[p+16>>2];u=+f[b+20>>2];v=+f[p+20>>2];w=+f[b+24>>2];x=+f[p+24>>2];i=+f[g+16>>2];j=+f[g+20>>2];k=+f[g+24>>2];y=+f[o+16>>2];z=+f[o+20>>2];A=+f[o+24>>2];B=(r-t)*(j-v)*(A-x)+((u-v)*(k-x)*(y-t)+(w-x)*(i-t)*(z-v)-(r-t)*(k-x)*(z-v)-(u-v)*(i-t)*(A-x))-(w-x)*(j-v)*(y-t);if(!(B==B&0.0==0.0&B!=0.0&B*(w*((u-j)*(i-y)-(r-i)*(j-z))+(r*((w-k)*(j-z)-(u-j)*(k-A))+u*((r-i)*(k-A)-(w-k)*(i-y))))<=0.0)){I=46;break a}c[J+88>>2]=0;c[J+88+4>>2]=0;c[J+88+8>>2]=0;c[J+84>>2]=0;if(B*(((u-v)*(k-x)-(w-x)*(j-v))*t+v*((w-x)*(i-t)-(r-t)*(k-x))+((r-t)*(j-v)-(u-v)*(i-t))*x)>0.0){e=+bd(b+16|0,g+16|0,p+16|0,J+88|0,J+84|0);K=c[J+84>>2]|0;c[J+80>>2]=K&2|K<<1&8|K&1;c[J>>2]=c[J+88>>2];c[J+4>>2]=c[J+88+4>>2];f[J+8>>2]=0.0;c[J+12>>2]=c[J+88+8>>2];l=+f[p+16>>2];m=+f[p+20>>2];n=+f[p+24>>2]}else{l=t;m=v;n=x;e=-1.0}if(B*(((j-v)*(A-x)-(k-x)*(z-v))*l+m*((k-x)*(y-t)-(A-x)*(i-t))+((z-v)*(i-t)-(j-v)*(y-t))*n)>0.0?(G=+bd(g+16|0,o+16|0,p+16|0,J+88|0,J+84|0),e<0.0|G>2]=c[J+84>>2]<<1&14;c[J+4>>2]=c[J+88>>2];c[J+8>>2]=c[J+88+4>>2];f[J>>2]=0.0;c[J+12>>2]=c[J+88+8>>2];e=G}if(B*(((z-v)*(w-x)-(A-x)*(u-v))*+f[p+16>>2]+ +f[p+20>>2]*((A-x)*(r-t)-(w-x)*(y-t))+((u-v)*(y-t)-(z-v)*(r-t))*+f[p+24>>2])>0.0?(H=+bd(o+16|0,b+16|0,p+16|0,J+88|0,J+84|0),e<0.0|H>2]|0;c[J+80>>2]=(1?K>>>1:K)&1|K<<1&8|K<<2&4;c[J+8>>2]=c[J+88>>2];c[J>>2]=c[J+88+4>>2];f[J+4>>2]=0.0;c[J+12>>2]=c[J+88+8>>2];e=H}if(e<0.0){c[J+80>>2]=15;r=+f[o+20>>2];A=+f[g+24>>2];z=+f[p+16>>2];m=+f[o+24>>2];y=+f[g+16>>2];t=+f[p+20>>2];n=+f[o+16>>2];x=+f[p+24>>2];v=+f[g+20>>2];f[J>>2]=(r*A*z+m*y*t-t*(A*n)-r*y*x+x*(n*v)-z*(m*v))/B;e=+f[b+20>>2];u=+f[b+24>>2];w=+f[b+16>>2];f[J+4>>2]=(e*m*z+u*n*t-t*(m*w)-e*n*x+x*(w*r)-z*(u*r))/B;f[J+8>>2]=(v*u*z+A*w*t-t*(u*y)-v*w*x+x*(y*e)-z*(A*e))/B;f[J+12>>2]=1.0-((r*A*z+m*y*t-t*(A*n)-r*y*x+x*(n*v)-z*(m*v))/B+(e*m*z+u*n*t-t*(m*w)-e*n*x+x*(w*r)-z*(u*r))/B+(v*u*z+A*w*t-t*(u*y)-v*w*x+x*(y*e)-z*(A*e))/B);e=0.0}break}default:{}}while(0);if(!(e>=0.0)){I=46;break}c[a+148+(d*36|0)+32>>2]=0;c[a+128>>2]=0;c[a+128+4>>2]=0;c[a+128+8>>2]=0;c[a+128+12>>2]=0;c[a+368>>2]=d;p=c[q>>2]|0;q=c[J+80>>2]|0;if(p){g=a+148+(C*36|0)|0;b=c[g>>2]|0;if(!(q&1)){K=c[a+364>>2]|0;c[a+364>>2]=K+1;c[a+348+(K<<2)>>2]=b;j=0.0;k=0.0;i=0.0}else{K=c[a+148+(d*36|0)+32>>2]|0;c[a+148+(d*36|0)+(K<<2)>>2]=b;o=c[J>>2]|0;c[a+148+(d*36|0)+32>>2]=K+1;c[a+148+(d*36|0)+16+(K<<2)>>2]=o;K=c[g>>2]|0;i=(c[h>>2]=o,+f[h>>2]);k=+f[K+20>>2]*i;j=+f[K+24>>2]*i;i=+f[K+16>>2]*i+ +f[a+128>>2];f[a+128>>2]=i;k=k+ +f[a+132>>2];f[a+132>>2]=k;j=j+ +f[a+136>>2];f[a+136>>2]=j}if((p|0)!=1){o=1;do{g=a+148+(C*36|0)+(o<<2)|0;b=c[g>>2]|0;if(!(q&1<>2]|0;c[a+364>>2]=K+1;c[a+348+(K<<2)>>2]=b}else{K=c[a+148+(d*36|0)+32>>2]|0;c[a+148+(d*36|0)+(K<<2)>>2]=b;b=c[J+(o<<2)>>2]|0;c[a+148+(d*36|0)+32>>2]=K+1;c[a+148+(d*36|0)+16+(K<<2)>>2]=b;K=c[g>>2]|0;i=(c[h>>2]=b,+f[h>>2]);k=+f[K+20>>2]*i;j=+f[K+24>>2]*i;i=+f[K+16>>2]*i+ +f[a+128>>2];f[a+128>>2]=i;k=k+ +f[a+132>>2];f[a+132>>2]=k;j=j+ +f[a+136>>2];f[a+136>>2]=j}o=o+1|0}while((o|0)!=(p|0))}}else{j=0.0;k=0.0;i=0.0}if((q|0)==15)c[a+376>>2]=1;F=F+1|0;if(F>>>0>=128){I=45;break}b=c[a+376>>2]|0;if(b|0)break;else{C=d;m=k}}if((I|0)==6){c[a+376>>2]=1;d=C;I=48}else if((I|0)==9){d=c[a+368>>2]|0;F=(c[a+148+(d*36|0)+32>>2]|0)+-1|0;c[a+148+(d*36|0)+32>>2]=F;F=c[a+148+(d*36|0)+(F<<2)>>2]|0;K=c[a+364>>2]|0;c[a+364>>2]=K+1;c[a+348+(K<<2)>>2]=F;I=48}else if((I|0)==10){d=c[a+368>>2]|0;F=(c[a+148+(d*36|0)+32>>2]|0)+-1|0;c[a+148+(d*36|0)+32>>2]=F;F=c[a+148+(d*36|0)+(F<<2)>>2]|0;K=c[a+364>>2]|0;c[a+364>>2]=K+1;c[a+348+(K<<2)>>2]=F;I=48}else if((I|0)==45){c[a+376>>2]=2;c[a+372>>2]=a+148+(d*36|0);K=2;ea=J;return K|0}else if((I|0)==46){d=c[a+368>>2]|0;F=(c[a+148+(d*36|0)+32>>2]|0)+-1|0;c[a+148+(d*36|0)+32>>2]=F;F=c[a+148+(d*36|0)+(F<<2)>>2]|0;K=c[a+364>>2]|0;c[a+364>>2]=K+1;c[a+348+(K<<2)>>2]=F;I=48}if((I|0)==48)b=c[a+376>>2]|0;c[a+372>>2]=a+148+(d*36|0);switch(b|0){case 0:{D=+f[a+128>>2];G=+f[a+132>>2];H=+f[a+136>>2];f[a+144>>2]=+s(+(D*D+G*G+H*H));K=0;ea=J;return K|0}case 1:{f[a+144>>2]=0.0;K=1;ea=J;return K|0}default:{K=b;ea=J;return K|0}}return 0} +function Eb(b,d){b=b|0;d=d|0;var e=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;t=ea;ea=ea+16|0;Fi(14706);j=c[b+212>>2]|0;i=c[b+180>>2]|0;if((i|0)<(j|0)){if((c[b+184>>2]|0)<(j|0)){if(!j){g=i;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((j<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+180>>2]|0;h=e}if((g|0)>0){e=0;do{c[h+(e<<2)>>2]=c[(c[b+188>>2]|0)+(e<<2)>>2];e=e+1|0}while((e|0)!=(g|0))}e=c[b+188>>2]|0;if(e|0){if(a[b+192>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+188>>2]=0}a[b+192>>0]=1;c[b+188>>2]=h;c[b+184>>2]=j;g=b+188|0}else g=b+188|0;e=i;do{c[(c[g>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=(j|0))}else g=b+188|0;c[b+180>>2]=j;e=0;while(1){if((e|0)>=(ra[c[(c[b>>2]|0)+104>>2]&127](b)|0))break;c[(c[g>>2]|0)+(e<<2)>>2]=c[(c[b+220>>2]|0)+(e<<2)>>2];e=e+1|0}e=c[b+180>>2]|0;if((e|0)>1)Zf(b+176|0,0,e+-1|0);if(!(ra[c[(c[b>>2]|0)+104>>2]&127](b)|0))e=0;else e=c[g>>2]|0;h=c[b+196>>2]|0;r=c[b+180>>2]|0;s=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;c[h+4>>2]=d;c[h+12>>2]=e;c[h+16>>2]=r;c[h+20>>2]=s;e=c[h+32>>2]|0;if((e|0)<0){if((c[h+36>>2]|0)<0){g=c[h+40>>2]|0;if(g|0){if(a[h+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[h+40>>2]=0}a[h+44>>0]=1;c[h+40>>2]=0;c[h+36>>2]=0}do{c[(c[h+40>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[h+32>>2]=0;e=c[h+52>>2]|0;if((e|0)<0){if((c[h+56>>2]|0)<0){g=c[h+60>>2]|0;if(g|0){if(a[h+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[h+60>>2]=0}a[h+64>>0]=1;c[h+60>>2]=0;c[h+56>>2]=0}do{c[(c[h+60>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[h+52>>2]=0;e=c[h+72>>2]|0;if((e|0)<0){if((c[h+76>>2]|0)<0){g=c[h+80>>2]|0;if(g|0){if(a[h+84>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[h+80>>2]=0}a[h+84>>0]=1;c[h+80>>2]=0;c[h+76>>2]=0}do{c[(c[h+80>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[h+72>>2]=0;s=c[b+200>>2]|0;e=c[(c[s>>2]|0)+8>>2]|0;p=c[b+8>>2]|0;r=c[b+24>>2]|0;r=ra[c[(c[r>>2]|0)+36>>2]&127](r)|0;Ma[e&127](s,p,r);r=c[b+204>>2]|0;p=c[b+24>>2]|0;s=c[b+196>>2]|0;Fi(16538);e=c[r+28>>2]|0;if((e|0)<0){if((c[r+32>>2]|0)<0){g=c[r+36>>2]|0;if(g|0){if(a[r+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[r+36>>2]=0}a[r+40>>0]=1;c[r+36>>2]=0;c[r+32>>2]=0}do{c[(c[r+36>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[r+28>>2]=0;i=c[r+8>>2]|0;if((i|0)>0){j=c[r+16>>2]|0;k=0;do{l=j+(k<<3)|0;e=c[l>>2]|0;if((e|0)!=(k|0)){c[l>>2]=c[j+(e<<3)>>2];e=c[j+(e<<3)>>2]|0;g=c[j+(e<<3)>>2]|0;if((e|0)!=(g|0)){h=j+(e<<3)|0;do{e=j+(g<<3)|0;c[h>>2]=c[e>>2];e=c[e>>2]|0;h=j+(e<<3)|0;g=c[h>>2]|0}while((e|0)!=(g|0))}}else e=k;c[l>>2]=e;k=k+1|0}while((k|0)!=(i|0));if((i|0)>1){Ji(r+4|0,0,i+-1|0);m=c[r+8>>2]|0}else m=i;if((m|0)>0){n=c[r+16>>2]|0;i=0;while(1){o=c[n+(i<<3)>>2]|0;e=i+1|0;a:do if((e|0)<(m|0)){g=i;h=e;while(1){if((c[n+(h<<3)>>2]|0)!=(o|0)){e=h;break a}e=h+1|0;if((e|0)<(m|0)){g=h;h=e}else{g=h;break}}}else g=i;while(0);b:do if((i|0)<=(g|0)){l=c[b+16>>2]|0;h=1;k=i;while(1){j=c[l+(c[n+(k<<3)+4>>2]<<2)>>2]|0;if((c[j+208>>2]|0)==(o|0)){j=c[j+216>>2]|0;h=(j|0)!=4&(h&(j|0)!=1)}if((k|0)<(g|0))k=k+1|0;else break}if(h)while(1){h=c[l+(c[n+(i<<3)+4>>2]<<2)>>2]|0;do if((c[h+208>>2]|0)==(o|0)){if((c[h+216>>2]&-2|0)==4)break;c[h+216>>2]=2}while(0);if((i|0)>=(g|0))break b;i=i+1|0}else while(1){h=c[l+(c[n+(i<<3)+4>>2]<<2)>>2]|0;do if((c[h+208>>2]|0)==(o|0)){if((c[h+216>>2]|0)!=2)break;c[h+216>>2]=3;f[h+220>>2]=0.0}while(0);if((i|0)>=(g|0))break b;i=i+1|0}}while(0);if((e|0)<(m|0))i=e;else break}}}j=ra[c[(c[p>>2]|0)+36>>2]&127](p)|0;if((j|0)>0){l=0;do{k=ta[c[(c[p>>2]|0)+40>>2]&31](p,l)|0;h=c[k+740>>2]|0;i=c[k+744>>2]|0;if((h|0)!=0?(c[h+216>>2]|0)!=2:0){e=c[h+204>>2]|0;if(!(e&2))g=111;else g=106}else g=101;if(((g|0)==101?(g=0,i|0):0)?(c[i+216>>2]|0)!=2:0){e=c[h+204>>2]|0;if((e&2|0)!=0?(c[h+216>>2]|0)!=2:0)g=106;else g=111}if((g|0)==106)if((e&4|0)==0?(c[i+204>>2]&3|0)==0:0){if((c[i+216>>2]&-2|0)!=4)c[i+216>>2]=1;f[i+220>>2]=0.0;g=111}else g=111;if((g|0)==111){o=c[i+204>>2]|0;if(o&2|0?((o&4|e&3|0)==0?(c[i+216>>2]|0)!=2:0):0){if((c[h+216>>2]&-2|0)!=4)c[h+216>>2]=1;f[h+220>>2]=0.0}if(a[r+64>>0]|0?va[c[(c[p>>2]|0)+28>>2]&63](p,h,i)|0:0){e=c[r+28>>2]|0;if((e|0)==(c[r+32>>2]|0)?(q=(e|0)==0?1:e<<1,(e|0)<(q|0)):0){if(!q)g=0;else{c[6747]=(c[6747]|0)+1;e=kb((q<<2|3)+16|0)|0;if(!e)g=0;else{c[(e+4+15&-16)+-4>>2]=e;g=e+4+15&-16}e=c[r+28>>2]|0}if((e|0)>0){h=0;do{c[g+(h<<2)>>2]=c[(c[r+36>>2]|0)+(h<<2)>>2];h=h+1|0}while((h|0)!=(e|0))}h=c[r+36>>2]|0;if(h){if(a[r+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);e=c[r+28>>2]|0}c[r+36>>2]=0}a[r+40>>0]=1;c[r+36>>2]=g;c[r+32>>2]=q}c[(c[r+36>>2]|0)+(e<<2)>>2]=k;c[r+28>>2]=e+1}}l=l+1|0}while((l|0)<(j|0))}e=c[2685]|0;q=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=q;do if(!q){if(c[e+4>>2]|0){Y(t|0,0)|0;q=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[t+4>>2]|0)-(c[q+4>>2]|0)+(((c[t>>2]|0)-(c[q>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(c[e+16>>2]|0)break;e=c[2685]|0}c[2685]=c[e+20>>2]}while(0);q=c[r+8>>2]|0;Fi(16566);if(a[r+64>>0]|0){o=c[r+28>>2]|0;if((o|0)>1)Xf(r+24|0,0,o+-1|0);if((q|0)>0){m=1;g=0;p=0;while(1){e=c[r+16>>2]|0;n=c[e+(g<<3)>>2]|0;c:do if((g|0)<(q|0)){j=c[r+48>>2]|0;i=c[r+52>>2]|0;l=1;while(1){k=c[(c[b+16>>2]|0)+(c[e+(g<<3)+4>>2]<<2)>>2]|0;do if((j|0)==(i|0)){j=(i|0)==0?1:i<<1;if((i|0)>=(j|0)){e=i;break}if(!j){e=i;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((j<<2|3)+16|0)|0;if(!e)h=0;else{c[(e+4+15&-16)+-4>>2]=e;h=e+4+15&-16}e=c[r+48>>2]|0}if((e|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[r+56>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(e|0))}i=c[r+56>>2]|0;if(i){if(a[r+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);e=c[r+48>>2]|0}c[r+56>>2]=0}a[r+60>>0]=1;c[r+56>>2]=h;c[r+52>>2]=j;i=j}else e=j;while(0);c[(c[r+56>>2]|0)+(e<<2)>>2]=k;j=e+1|0;c[r+48>>2]=j;h=c[k+216>>2]|0;h=l&((h|0)==5|(h|0)==2);g=g+1|0;if((g|0)>=(q|0)){l=g;k=h;break c}e=c[r+16>>2]|0;if((c[e+(g<<3)>>2]|0)!=(n|0)){l=g;k=h;break}else l=h}}else{l=g;k=1}while(0);if((p|0)<(o|0)){i=c[r+36>>2]|0;j=i+(p<<2)|0;g=c[j>>2]|0;e=c[(c[g+740>>2]|0)+208>>2]|0;if((e|0)<=-1)e=c[(c[g+744>>2]|0)+208>>2]|0;if((e|0)==(n|0)){e=p+1|0;d:do if((e|0)<(o|0))do{h=c[i+(e<<2)>>2]|0;g=c[(c[h+740>>2]|0)+208>>2]|0;if((g|0)<=-1)g=c[(c[h+744>>2]|0)+208>>2]|0;if((n|0)!=(g|0))break d;e=e+1|0}while((e|0)<(o|0));while(0);h=e;g=e-p|0;e=j}else{h=m;g=0;e=0}}else{h=m;g=0;e=0}if(!k)Va[c[(c[s>>2]|0)+8>>2]&7](s,c[r+56>>2]|0,c[r+48>>2]|0,e,g,n);p=(g|0)==0?p:h;e=c[r+48>>2]|0;if((e|0)<0){if((c[r+52>>2]|0)<0){g=c[r+56>>2]|0;if(g|0){if(a[r+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[r+56>>2]=0}a[r+60>>0]=1;c[r+56>>2]=0;c[r+52>>2]=0}do{c[(c[r+56>>2]|0)+(e<<2)>>2]=0;e=e+1|0}while((e|0)!=0)}c[r+48>>2]=0;if((l|0)>=(q|0))break;else{m=h;g=l}}}}else{q=ra[c[(c[p>>2]|0)+44>>2]&127](p)|0;r=ra[c[(c[p>>2]|0)+36>>2]&127](p)|0;Va[c[(c[s>>2]|0)+8>>2]&7](s,c[b+16>>2]|0,c[b+8>>2]|0,q,r,-1)}e=c[2685]|0;s=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=s;do if(!s){if(c[e+4>>2]|0){Y(t|0,0)|0;s=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[t+4>>2]|0)-(c[s+4>>2]|0)+(((c[t>>2]|0)-(c[s>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(c[e+16>>2]|0)break;e=c[2685]|0}c[2685]=c[e+20>>2]}while(0);og(c[b+196>>2]|0);e=c[b+200>>2]|0;Ma[c[(c[e>>2]|0)+16>>2]&127](e,d,c[b+72>>2]|0);e=c[2685]|0;b=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=b;if(b|0){ea=t;return}do if(c[e+4>>2]|0){Y(t|0,0)|0;b=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[t+4>>2]|0)-(c[b+4>>2]|0)+(((c[t>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[e+16>>2]|0)){e=c[2685]|0;break}else{ea=t;return}}while(0);c[2685]=c[e+20>>2];ea=t;return}function Fb(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0;r=ea;ea=ea+144|0;m=c[b+48>>2]|0;h=c[b+52>>2]|0;if((h|0?(j=c[h+20>>2]|0,j|0):0)?(ra[c[(c[j>>2]|0)+48>>2]&127](j)|0)&1|0:0){c[r>>2]=1065353216;c[r+4>>2]=1065353216;c[r+8>>2]=0;f[r+12>>2]=0.0;k=c[b+8>>2]|0;q=c[(c[b+52>>2]|0)+20>>2]|0;p=c[(c[q>>2]|0)+8>>2]|0;t=+f[d>>2];B=+f[d+4>>2];u=+f[d+8>>2];z=+f[k+20>>2];v=+f[k+24>>2];C=+f[k+28>>2];w=+f[k+36>>2];E=+f[k+40>>2];x=+f[k+44>>2];y=+f[k+52>>2];D=+f[k+56>>2];A=+f[k+60>>2];f[r+120>>2]=t*+f[k+4>>2]+B*+f[k+8>>2]+u*+f[k+12>>2]+y;f[r+120+4>>2]=t*z+B*v+u*C+D;f[r+120+8>>2]=t*w+B*E+u*x+A;f[r+120+12>>2]=0.0;u=+f[d+16>>2];B=+f[d+20>>2];t=+f[d+24>>2];f[r+96>>2]=y+(u*+f[k+4>>2]+B*+f[k+8>>2]+t*+f[k+12>>2]);f[r+96+4>>2]=D+(z*u+v*B+C*t);f[r+96+8>>2]=A+(w*u+E*B+x*t);f[r+96+12>>2]=0.0;Pa[p&127](q,r+120|0,r+96|0,r);q=c[(c[b+52>>2]|0)+20>>2]|0;p=c[(c[q>>2]|0)+8>>2]|0;t=+f[d+16>>2];x=+f[d+20>>2];B=+f[d+24>>2];E=+f[k+20>>2];u=+f[k+24>>2];w=+f[k+28>>2];A=+f[k+36>>2];C=+f[k+40>>2];v=+f[k+44>>2];z=+f[k+52>>2];D=+f[k+56>>2];y=+f[k+60>>2];f[r+120>>2]=t*+f[k+4>>2]+x*+f[k+8>>2]+B*+f[k+12>>2]+z;f[r+120+4>>2]=t*E+x*u+B*w+D;f[r+120+8>>2]=t*A+x*C+B*v+y;f[r+120+12>>2]=0.0;B=+f[d+32>>2];x=+f[d+36>>2];t=+f[d+40>>2];f[r+96>>2]=z+(B*+f[k+4>>2]+x*+f[k+8>>2]+t*+f[k+12>>2]);f[r+96+4>>2]=D+(E*B+u*x+w*t);f[r+96+8>>2]=y+(A*B+C*x+v*t);f[r+96+12>>2]=0.0;Pa[p&127](q,r+120|0,r+96|0,r);q=c[(c[b+52>>2]|0)+20>>2]|0;p=c[(c[q>>2]|0)+8>>2]|0;t=+f[d+32>>2];v=+f[d+36>>2];x=+f[d+40>>2];C=+f[k+20>>2];B=+f[k+24>>2];A=+f[k+28>>2];y=+f[k+36>>2];w=+f[k+40>>2];u=+f[k+44>>2];E=+f[k+52>>2];D=+f[k+56>>2];z=+f[k+60>>2];f[r+120>>2]=t*+f[k+4>>2]+v*+f[k+8>>2]+x*+f[k+12>>2]+E;f[r+120+4>>2]=t*C+v*B+x*A+D;f[r+120+8>>2]=t*y+v*w+x*u+z;f[r+120+12>>2]=0.0;x=+f[d>>2];v=+f[d+4>>2];t=+f[d+8>>2];f[r+96>>2]=E+(x*+f[k+4>>2]+v*+f[k+8>>2]+t*+f[k+12>>2]);f[r+96+4>>2]=D+(C*x+B*v+A*t);f[r+96+8>>2]=z+(y*x+w*v+u*t);f[r+96+12>>2]=0.0;Pa[p&127](q,r+120|0,r+96|0,r)}h=((10?(e<<21|g)+~(g<<15)>>10:(e<<21|g)+~(g<<15)|0)^(e<<21|g)+~(g<<15))*9|0;h=(6?h>>6:h)^h;h=(c[b+108>>2]|0)+-1&((16?h+~(h<<11)>>16:h+~(h<<11)|0)^h+~(h<<11));a:do if(h>>>0<(c[b+64>>2]|0)>>>0?(l=c[(c[b+72>>2]|0)+(h<<2)>>2]|0,(l|0)!=-1):0){k=c[b+132>>2]|0;j=l;while(1){if((e<<21|g|0)==(c[k+(j<<2)>>2]|0))break;h=c[(c[b+92>>2]|0)+(j<<2)>>2]|0;if((h|0)==-1)break a;else j=h}h=c[b+112>>2]|0;if(h+(j<<3)|0){p=c[h+(j<<3)+4>>2]|0;q=c[b+8>>2]|0;c[p+8>>2]=c[(c[q+192>>2]|0)+8>>2];o=c[b+4>>2]|0;n=c[o+192>>2]|0;c[r>>2]=0;c[r+4>>2]=n;c[r+8>>2]=o;c[r+12>>2]=o+4;c[r+16>>2]=-1;c[r+20>>2]=-1;c[r+120>>2]=0;c[r+120+4>>2]=p;c[r+120+8>>2]=q;c[r+120+12>>2]=q+4;c[r+120+16>>2]=e;c[r+120+20>>2]=g;q=wa[c[(c[m>>2]|0)+8>>2]&31](m,r,r+120|0,0)|0;Ta[c[(c[q>>2]|0)+8>>2]&31](q,r,r+120|0,c[b+52>>2]|0,c[b+44>>2]|0);Ca[c[c[q>>2]>>2]&511](q);Ia[c[(c[m>>2]|0)+60>>2]&127](m,q);ea=r;return}}while(0);v=+f[d+16>>2];F=+f[d>>2];w=+f[d+20>>2];t=+f[d+4>>2];x=+f[d+24>>2];u=+f[d+8>>2];y=+f[d+32>>2];A=+f[d+36>>2];C=+f[d+40>>2];z=(w-t)*(C-u)-(x-u)*(A-t);B=(x-u)*(y-F)-(v-F)*(C-u);D=(v-F)*(A-t)-(w-t)*(y-F);E=1.0/+s(+(D*D+(z*z+B*B)));f[r>>2]=F+z*E*.05999999865889549;f[r+4>>2]=t+B*E*.05999999865889549;f[r+8>>2]=u+D*E*.05999999865889549;f[r+12>>2]=0.0;f[r+16>>2]=v+z*E*.05999999865889549;f[r+20>>2]=w+B*E*.05999999865889549;f[r+24>>2]=x+D*E*.05999999865889549;f[r+28>>2]=0.0;f[r+32>>2]=y+z*E*.05999999865889549;f[r+36>>2]=A+B*E*.05999999865889549;f[r+40>>2]=C+D*E*.05999999865889549;f[r+44>>2]=0.0;f[r+48>>2]=F-z*E*.05999999865889549;f[r+52>>2]=t-B*E*.05999999865889549;f[r+56>>2]=u-D*E*.05999999865889549;f[r+60>>2]=0.0;f[r+64>>2]=v-z*E*.05999999865889549;f[r+68>>2]=w-B*E*.05999999865889549;f[r+72>>2]=x-D*E*.05999999865889549;f[r+76>>2]=0.0;f[r+80>>2]=y-z*E*.05999999865889549;f[r+84>>2]=A-B*E*.05999999865889549;f[r+88>>2]=C-D*E*.05999999865889549;f[r+92>>2]=0.0;c[6747]=(c[6747]|0)+1;h=kb(131)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}of(h,r,6,16);q=c[b+8>>2]|0;c[h+8>>2]=c[(c[q+192>>2]|0)+8>>2];d=c[b+4>>2]|0;p=c[d+192>>2]|0;c[r+120>>2]=0;c[r+120+4>>2]=p;c[r+120+8>>2]=d;c[r+120+12>>2]=d+4;c[r+120+16>>2]=-1;c[r+120+20>>2]=-1;c[r+96>>2]=0;c[r+96+4>>2]=h;c[r+96+8>>2]=q;c[r+96+12>>2]=q+4;c[r+96+16>>2]=e;c[r+96+20>>2]=g;q=wa[c[(c[m>>2]|0)+8>>2]&31](m,r+120|0,r+96|0,0)|0;Ta[c[(c[q>>2]|0)+8>>2]&31](q,r+120|0,r+96|0,c[b+52>>2]|0,c[b+44>>2]|0);Ca[c[c[q>>2]>>2]&511](q);Ia[c[(c[m>>2]|0)+60>>2]&127](m,q);q=((10?(e<<21|g)+~(g<<15)>>10:(e<<21|g)+~(g<<15)|0)^(e<<21|g)+~(g<<15))*9|0;q=(6?q>>6:q)^q;q=(16?q+~(q<<11)>>16:q+~(q<<11)|0)^q+~(q<<11);d=c[b+108>>2]|0;b:do if((q&d+-1)>>>0<(c[b+64>>2]|0)>>>0?(i=c[(c[b+72>>2]|0)+((q&d+-1)<<2)>>2]|0,(i|0)!=-1):0){j=c[b+132>>2]|0;while(1){if((e<<21|g|0)==(c[j+(i<<2)>>2]|0))break;i=c[(c[b+92>>2]|0)+(i<<2)>>2]|0;if((i|0)==-1){n=20;break b}}b=c[b+112>>2]|0;c[b+(i<<3)>>2]=e<<21|g;c[b+(i<<3)+4>>2]=h}else n=20;while(0);if((n|0)==20){p=c[b+104>>2]|0;if((p|0)==(d|0)){l=(d|0)==0?1:d<<1;if((d|0)<(l|0)){if(!l){j=d;k=0}else{c[6747]=(c[6747]|0)+1;i=kb((l<<3|3)+16|0)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=c[b+104>>2]|0;k=i}if((j|0)>0){i=0;do{H=(c[b+112>>2]|0)+(i<<3)|0;G=c[H+4>>2]|0;m=k+(i<<3)|0;c[m>>2]=c[H>>2];c[m+4>>2]=G;i=i+1|0}while((i|0)!=(j|0))}i=c[b+112>>2]|0;if(i|0){if(a[b+116>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+112>>2]=0}a[b+116>>0]=1;c[b+112>>2]=k;c[b+108>>2]=l;i=c[b+104>>2]|0}else i=d}else i=p;H=c[b+112>>2]|0;c[H+(i<<3)>>2]=e<<21|g;c[H+(i<<3)+4>>2]=h;c[b+104>>2]=(c[b+104>>2]|0)+1;h=c[b+124>>2]|0;if((h|0)==(c[b+128>>2]|0)?(o=(h|0)==0?1:h<<1,(h|0)<(o|0)):0){if(!o)i=0;else{c[6747]=(c[6747]|0)+1;h=kb((o<<2|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[b+124>>2]|0}k=c[b+132>>2]|0;if((h|0)<=0)if(!k)j=b+136|0;else n=45;else{j=0;do{c[i+(j<<2)>>2]=c[k+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0));n=45}if((n|0)==45){if(a[b+136>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[b+132>>2]=0;h=c[b+124>>2]|0;j=b+136|0}a[j>>0]=1;c[b+132>>2]=i;c[b+128>>2]=o}c[(c[b+132>>2]|0)+(h<<2)>>2]=e<<21|g;c[b+124>>2]=(c[b+124>>2]|0)+1;m=c[b+108>>2]|0;if((d|0)<(m|0)){n=c[b+64>>2]|0;if((n|0)<(m|0)){do if((c[b+68>>2]|0)<(m|0)){if(!m){k=n;h=0}else{c[6747]=(c[6747]|0)+1;h=kb((m<<2|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}k=c[b+64>>2]|0}i=c[b+72>>2]|0;if((k|0)<=0){if(!i){a[b+76>>0]=1;c[b+72>>2]=h;c[b+68>>2]=m;d=b+72|0;break}}else{j=0;do{c[h+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(k|0))}if(a[b+76>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[b+76>>0]=1;c[b+72>>2]=h;c[b+68>>2]=m;d=b+72|0}else{h=c[b+72>>2]|0;d=b+72|0}while(0);hk(h+(n<<2)|0,0,(m<<2)-(n<<2)|0)|0;c[b+64>>2]=m;l=c[b+84>>2]|0;if((l|0)<(m|0)){do if((c[b+88>>2]|0)<(m|0)){if(!m){k=l;h=0}else{c[6747]=(c[6747]|0)+1;h=kb((m<<2|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}k=c[b+84>>2]|0}i=c[b+92>>2]|0;if((k|0)<=0){if(!i){a[b+96>>0]=1;c[b+92>>2]=h;c[b+88>>2]=m;break}}else{j=0;do{c[h+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(k|0))}if(a[b+96>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[b+96>>0]=1;c[b+92>>2]=h;c[b+88>>2]=m}else h=c[b+92>>2]|0;while(0);hk(h+(l<<2)|0,0,(m<<2)-(l<<2)|0)|0}c[b+84>>2]=m;if((m|0)>0){hk(c[d>>2]|0,-1,m<<2|0)|0;hk(c[b+92>>2]|0,-1,m<<2|0)|0}if((n|0)>0){k=c[b+132>>2]|0;h=c[d>>2]|0;i=c[b+92>>2]|0;j=0;do{H=c[k+(j<<2)>>2]|0;H=((10?H+~(H<<15)>>10:H+~(H<<15)|0)^H+~(H<<15))*9|0;H=(6?H>>6:H)^H;H=h+((((16?H+~(H<<11)>>16:H+~(H<<11)|0)^H+~(H<<11))&(c[b+108>>2]|0)+-1)<<2)|0;c[i+(j<<2)>>2]=c[H>>2];c[H>>2]=j;j=j+1|0}while((j|0)!=(n|0))}}h=q&(c[b+108>>2]|0)+-1}else h=q&d+-1;H=(c[b+72>>2]|0)+(h<<2)|0;c[(c[b+92>>2]|0)+(p<<2)>>2]=c[H>>2];c[H>>2]=p}ea=r;return}function Gb(b,d,e,g,h,i,j){b=b|0;d=d|0;e=e|0;g=g|0;h=+h;i=+i;j=j|0;var k=0,l=0,m=0.0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0.0,J=0.0,K=0.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,$=0,aa=0;Z=ea;ea=ea+48|0;a[Z+16+16>>0]=1;Y=Z+16+12|0;c[Y>>2]=0;c[Z+16+4>>2]=0;c[Z+16+8>>2]=0;o=c[g+4>>2]|0;if((o|0)>0){c[6747]=(c[6747]|0)+1;k=kb((o<<4|3)+16|0)|0;if(!k)n=0;else{c[(k+4+15&-16)+-4>>2]=k;n=k+4+15&-16}k=c[Z+16+4>>2]|0;if((k|0)>0){l=0;do{X=n+(l<<4)|0;W=(c[Y>>2]|0)+(l<<4)|0;c[X>>2]=c[W>>2];c[X+4>>2]=c[W+4>>2];c[X+8>>2]=c[W+8>>2];c[X+12>>2]=c[W+12>>2];l=l+1|0}while((l|0)!=(k|0))}k=c[Y>>2]|0;if(k|0){if(a[Z+16+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[Y>>2]=0}a[Z+16+16>>0]=1;c[Y>>2]=n;c[Z+16+8>>2]=o}k=c[d+28>>2]|0;if((k|0)>0){W=c[d+36>>2]|0;C=+f[e>>2];D=+f[e+4>>2];E=+f[e+8>>2];F=+f[e+16>>2];G=+f[e+20>>2];q=+f[e+24>>2];v=+f[e+32>>2];p=+f[e+36>>2];m=+f[e+40>>2];r=+f[b>>2];s=+f[b+4>>2];w=+f[b+8>>2];X=-1;A=3402823466385288598117041.0e14;n=0;while(1){x=+f[W+(n*36|0)+20>>2];y=+f[W+(n*36|0)+24>>2];z=+f[W+(n*36|0)+28>>2];l=(x*C+y*D+z*E)*r+(x*F+y*G+z*q)*s+(x*v+y*p+z*m)*w=0){O=c[W+(X*36|0)+4>>2]|0;if((O|0)>0){P=W+(X*36|0)+12|0;n=W+(X*36|0)+20|0;Q=W+(X*36|0)+24|0;R=W+(X*36|0)+28|0;s=F;r=G;k=0;M=g;N=Z+16|0;while(1){H=c[P>>2]|0;B=c[H+(k<<2)>>2]|0;g=c[d+16>>2]|0;L=k+1|0;H=c[H+(((L|0)==(O|0)?0:L)<<2)>>2]|0;x=+f[g+(B<<4)>>2];w=x-+f[g+(H<<4)>>2];y=+f[g+(B<<4)+4>>2];_=y-+f[g+(H<<4)+4>>2];z=+f[g+(B<<4)+8>>2];F=z-+f[g+(H<<4)+8>>2];K=w*C+_*D+F*E;I=w*s+_*r+F*q;F=w*v+_*p+F*m;_=+f[n>>2];w=+f[Q>>2];A=+f[R>>2];J=C*_+D*w+E*A;G=s*_+r*w+q*A;A=v*_+p*w+m*A;v=(x*C+y*D+z*E+ +f[e+48>>2])*-(I*A-F*G)+(x*s+y*r+z*q+ +f[e+52>>2])*-(F*J-K*A)+(x*v+y*p+z*m+ +f[e+56>>2])*-(K*G-I*J);H=M;g=N;k=c[H+4>>2]|0;if((k|0)>=2){o=c[H+12>>2]|0;p=+f[o+(k+-1<<4)>>2];q=+f[o+(k+-1<<4)+4>>2];r=+f[o+(k+-1<<4)+8>>2];m=p*-(I*A-F*G)+q*-(F*J-K*A)+r*-(K*G-I*J)-v;B=0;while(1){x=+f[o+(B<<4)>>2];y=+f[o+(B<<4)+4>>2];z=+f[o+(B<<4)+8>>2];u=c[o+(B<<4)+12>>2]|0;w=x*-(I*A-F*G)+y*-(F*J-K*A)+z*-(K*G-I*J)-v;do if(m<0.0)if(w<0.0){l=c[g+4>>2]|0;if((l|0)==(c[g+8>>2]|0)?(T=(l|0)==0?1:l<<1,(l|0)<(T|0)):0){if(!T)o=0;else{c[6747]=(c[6747]|0)+1;l=kb((T<<4|3)+16|0)|0;if(!l)o=0;else{c[(l+4+15&-16)+-4>>2]=l;o=l+4+15&-16}l=c[g+4>>2]|0}if((l|0)>0){t=0;do{$=o+(t<<4)|0;aa=(c[g+12>>2]|0)+(t<<4)|0;c[$>>2]=c[aa>>2];c[$+4>>2]=c[aa+4>>2];c[$+8>>2]=c[aa+8>>2];c[$+12>>2]=c[aa+12>>2];t=t+1|0}while((t|0)!=(l|0))}l=c[g+12>>2]|0;if(l|0){if(a[g+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[g+12>>2]=0}a[g+16>>0]=1;c[g+12>>2]=o;c[g+8>>2]=T;l=c[g+4>>2]|0}t=c[g+12>>2]|0;f[t+(l<<4)>>2]=x;f[t+(l<<4)+4>>2]=y;f[t+(l<<4)+8>>2]=z;c[t+(l<<4)+12>>2]=u;t=83;break}else{m=m/(m-w);s=p+(x-p)*m;p=q+(y-q)*m;m=r+(z-r)*m;l=c[g+4>>2]|0;if((l|0)==(c[g+8>>2]|0)?(V=(l|0)==0?1:l<<1,(l|0)<(V|0)):0){if(!V)o=0;else{c[6747]=(c[6747]|0)+1;l=kb((V<<4|3)+16|0)|0;if(!l)o=0;else{c[(l+4+15&-16)+-4>>2]=l;o=l+4+15&-16}l=c[g+4>>2]|0}if((l|0)>0){t=0;do{aa=o+(t<<4)|0;$=(c[g+12>>2]|0)+(t<<4)|0;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];t=t+1|0}while((t|0)!=(l|0))}l=c[g+12>>2]|0;if(l|0){if(a[g+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[g+12>>2]=0}a[g+16>>0]=1;c[g+12>>2]=o;c[g+8>>2]=V;l=c[g+4>>2]|0}t=c[g+12>>2]|0;f[t+(l<<4)>>2]=s;f[t+(l<<4)+4>>2]=p;f[t+(l<<4)+8>>2]=m;f[t+(l<<4)+12>>2]=0.0;t=83;break}else if(w<0.0){m=m/(m-w);s=p+(x-p)*m;p=q+(y-q)*m;m=r+(z-r)*m;l=c[g+4>>2]|0;if((l|0)==(c[g+8>>2]|0)?(U=(l|0)==0?1:l<<1,(l|0)<(U|0)):0){if(!U)o=0;else{c[6747]=(c[6747]|0)+1;l=kb((U<<4|3)+16|0)|0;if(!l)o=0;else{c[(l+4+15&-16)+-4>>2]=l;o=l+4+15&-16}l=c[g+4>>2]|0}if((l|0)>0){t=0;do{aa=o+(t<<4)|0;$=(c[g+12>>2]|0)+(t<<4)|0;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];t=t+1|0}while((t|0)!=(l|0))}l=c[g+12>>2]|0;if(l|0){if(a[g+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[g+12>>2]=0}a[g+16>>0]=1;c[g+12>>2]=o;c[g+8>>2]=U;l=c[g+4>>2]|0}aa=c[g+12>>2]|0;f[aa+(l<<4)>>2]=s;f[aa+(l<<4)+4>>2]=p;f[aa+(l<<4)+8>>2]=m;f[aa+(l<<4)+12>>2]=0.0;l=(c[g+4>>2]|0)+1|0;c[g+4>>2]=l;if((l|0)==(c[g+8>>2]|0)?(S=(l|0)==0?1:l<<1,(l|0)<(S|0)):0){if(!S)o=0;else{c[6747]=(c[6747]|0)+1;l=kb((S<<4|3)+16|0)|0;if(!l)o=0;else{c[(l+4+15&-16)+-4>>2]=l;o=l+4+15&-16}l=c[g+4>>2]|0}if((l|0)>0){t=0;do{aa=o+(t<<4)|0;$=(c[g+12>>2]|0)+(t<<4)|0;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];t=t+1|0}while((t|0)!=(l|0))}l=c[g+12>>2]|0;if(l|0){if(a[g+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[g+12>>2]=0}a[g+16>>0]=1;c[g+12>>2]=o;c[g+8>>2]=S;l=c[g+4>>2]|0}t=c[g+12>>2]|0;f[t+(l<<4)>>2]=x;f[t+(l<<4)+4>>2]=y;f[t+(l<<4)+8>>2]=z;c[t+(l<<4)+12>>2]=u;t=83}while(0);if((t|0)==83){t=0;c[g+4>>2]=(c[g+4>>2]|0)+1}l=B+1|0;if((l|0)==(k|0))break;o=c[H+12>>2]|0;m=w;p=x;r=z;q=y;B=l}k=c[H+4>>2]|0}if((k|0)<0){if((c[H+8>>2]|0)<0){l=c[H+12>>2]|0;if(l|0){if(a[H+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[H+12>>2]=0}a[H+16>>0]=1;c[H+12>>2]=0;c[H+8>>2]=0}do{aa=(c[H+12>>2]|0)+(k<<4)|0;c[aa>>2]=c[Z>>2];c[aa+4>>2]=c[Z+4>>2];c[aa+8>>2]=c[Z+8>>2];c[aa+12>>2]=c[Z+12>>2];k=k+1|0}while((k|0)!=0)}c[H+4>>2]=0;if((L|0)>=(O|0))break;aa=N;C=+f[e>>2];D=+f[e+4>>2];E=+f[e+8>>2];s=+f[e+16>>2];r=+f[e+20>>2];q=+f[e+24>>2];v=+f[e+32>>2];p=+f[e+36>>2];m=+f[e+40>>2];k=L;N=M;M=aa}y=+f[e>>2];x=+f[e+4>>2];s=+f[e+8>>2];w=+f[e+16>>2];r=+f[e+20>>2];q=+f[e+24>>2];v=+f[e+32>>2];p=+f[e+36>>2];m=+f[e+40>>2];l=Q;k=R;t=e+56|0;u=e+48|0;o=e+52|0;B=g+4|0}else{y=C;x=D;s=E;w=F;r=G;n=W+(X*36|0)+20|0;l=W+(X*36|0)+24|0;k=W+(X*36|0)+28|0;t=e+56|0;u=e+48|0;o=e+52|0;B=g+4|0}J=+f[n>>2];K=+f[l>>2];_=+f[k>>2];s=J*y+K*x+_*s;r=J*w+K*r+_*q;q=J*v+K*p+_*m;p=+f[W+(X*36|0)+32>>2]-(s*+f[u>>2]+r*+f[o>>2]+q*+f[t>>2]);k=c[B>>2]|0;if((k|0)>0){o=g+12|0;n=0;do{aa=c[o>>2]|0;l=aa+(n<<4)|0;m=p+(s*+f[l>>2]+r*+f[aa+(n<<4)+4>>2]+q*+f[aa+(n<<4)+8>>2]);m=m<=h?h:m;if(m<=i){c[Z>>2]=c[l>>2];c[Z+4>>2]=c[l+4>>2];c[Z+8>>2]=c[l+8>>2];c[Z+12>>2]=c[l+12>>2];Na[c[(c[j>>2]|0)+16>>2]&15](j,b,Z,m);k=c[B>>2]|0}n=n+1|0}while((n|0)<(k|0))}}}k=c[Y>>2]|0;if(!k){ea=Z;return}if(a[Z+16+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[Y>>2]=0;ea=Z;return}function Hb(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0,P=0.0,Q=0.0,R=0.0,S=0;O=ea;ea=ea+208|0;f[b+56>>2]=0.0;M=O+192+4|0;N=O+192+8|0;c[O+192>>2]=0;c[O+192+4>>2]=0;c[O+192+8>>2]=0;c[O+192+12>>2]=0;c[O+128>>2]=c[d>>2];c[O+128+4>>2]=c[d+4>>2];c[O+128+8>>2]=c[d+8>>2];c[O+128+12>>2]=c[d+12>>2];c[O+128+16>>2]=c[d+16>>2];c[O+128+16+4>>2]=c[d+16+4>>2];c[O+128+16+8>>2]=c[d+16+8>>2];c[O+128+16+12>>2]=c[d+16+12>>2];c[O+128+32>>2]=c[d+32>>2];c[O+128+32+4>>2]=c[d+32+4>>2];c[O+128+32+8>>2]=c[d+32+8>>2];c[O+128+32+12>>2]=c[d+32+12>>2];D=O+128+48|0;c[D>>2]=c[d+48>>2];c[D+4>>2]=c[d+48+4>>2];c[D+8>>2]=c[d+48+8>>2];c[D+12>>2]=c[d+48+12>>2];c[O+64>>2]=c[d+64>>2];c[O+64+4>>2]=c[d+64+4>>2];c[O+64+8>>2]=c[d+64+8>>2];c[O+64+12>>2]=c[d+64+12>>2];c[O+64+16>>2]=c[d+80>>2];c[O+64+16+4>>2]=c[d+80+4>>2];c[O+64+16+8>>2]=c[d+80+8>>2];c[O+64+16+12>>2]=c[d+80+12>>2];c[O+64+32>>2]=c[d+96>>2];c[O+64+32+4>>2]=c[d+96+4>>2];c[O+64+32+8>>2]=c[d+96+8>>2];c[O+64+32+12>>2]=c[d+96+12>>2];E=O+64+48|0;c[E>>2]=c[d+112>>2];c[E+4>>2]=c[d+112+4>>2];c[E+8>>2]=c[d+112+8>>2];c[E+12>>2]=c[d+112+12>>2];G=+f[D>>2];H=+f[E>>2];I=+f[O+128+52>>2];J=+f[O+64+52>>2];K=+f[O+128+56>>2];L=+f[O+64+56>>2];f[D>>2]=G-(G+H)*.5;f[O+128+52>>2]=I-(I+J)*.5;f[O+128+56>>2]=K-(K+L)*.5;f[E>>2]=H-(G+H)*.5;f[O+64+52>>2]=J-(I+J)*.5;f[O+64+56>>2]=L-(K+L)*.5;if(((c[(c[b+28>>2]|0)+4>>2]|0)+-17|0)>>>0<2)D=((c[(c[b+32>>2]|0)+4>>2]|0)+-17|0)>>>0<2;else D=0;v=+f[b+44>>2];u=+f[b+48>>2];c[6732]=(c[6732]|0)+1;E=a[b+52>>0]|0;c[b+64>>2]=0;c[b+4>>2]=0;c[b+8>>2]=1065353216;c[b+12>>2]=0;f[b+16>>2]=0.0;c[b+68>>2]=0;c[b+60>>2]=-1;q=c[b+24>>2]|0;a[q+312>>0]=0;c[q>>2]=0;a[q+356>>0]=1;c[q+292>>2]=1566444395;c[q+296>>2]=1566444395;c[q+300>>2]=1566444395;f[q+304>>2]=0.0;c[q+336>>2]=0;c[q+336+4>>2]=0;c[q+336+8>>2]=0;c[q+336+12>>2]=0;a[q+336+16>>0]=0;a[q+332>>0]=a[q+332>>0]&-16;q=0;l=999999984306749440.0;do{o=+f[b+4>>2];m=+f[b+8>>2];j=+f[b+12>>2];p=+f[d+4>>2]*-o+ +f[d+20>>2]*-m+ +f[d+36>>2]*-j;r=+f[d+8>>2]*-o+ +f[d+24>>2]*-m+ +f[d+40>>2]*-j;f[O+48>>2]=+f[d>>2]*-o+ +f[d+16>>2]*-m+ +f[d+32>>2]*-j;f[O+48+4>>2]=p;f[O+48+8>>2]=r;f[O+48+12>>2]=0.0;r=o*+f[d+68>>2]+m*+f[d+84>>2]+j*+f[d+100>>2];p=o*+f[d+72>>2]+m*+f[d+88>>2]+j*+f[d+104>>2];f[O+32>>2]=o*+f[d+64>>2]+m*+f[d+80>>2]+j*+f[d+96>>2];f[O+32+4>>2]=r;f[O+32+8>>2]=p;f[O+32+12>>2]=0.0;Ac(O+16|0,c[b+28>>2]|0,O+48|0);Ac(O,c[b+32>>2]|0,O+32|0);p=+f[O+16>>2];r=+f[O+16+4>>2];j=+f[O+16+8>>2];m=p*+f[O+128>>2]+r*+f[O+128+4>>2]+j*+f[O+128+8>>2]+ +f[O+128+48>>2];o=p*+f[O+128+16>>2]+r*+f[O+128+20>>2]+j*+f[O+128+24>>2]+ +f[O+128+52>>2];j=p*+f[O+128+32>>2]+r*+f[O+128+36>>2]+j*+f[O+128+40>>2]+ +f[O+128+56>>2];r=+f[O>>2];p=+f[O+4>>2];t=+f[O+8>>2];k=r*+f[O+64>>2]+p*+f[O+64+4>>2]+t*+f[O+64+8>>2]+ +f[O+64+48>>2];n=r*+f[O+64+16>>2]+p*+f[O+64+20>>2]+t*+f[O+64+24>>2]+ +f[O+64+52>>2];t=r*+f[O+64+32>>2]+p*+f[O+64+36>>2]+t*+f[O+64+40>>2]+ +f[O+64+56>>2];p=D?0.0:t;r=D?0.0:j;t=D?0.0:j-t;j=(m-k)*+f[b+4>>2]+(o-n)*+f[b+8>>2]+t*+f[b+12>>2];if(j>0.0?j*j>l*+f[d+128>>2]:0){c[b+68>>2]=10;q=1;h=0}else S=7;do if((S|0)==7){S=0;B=c[b+24>>2]|0;C=c[B>>2]|0;if((C|0)>0){i=+f[B+308>>2];h=0;A=0;do{x=m-k-+f[B+4+(A<<4)>>2];y=o-n-+f[B+4+(A<<4)+4>>2];z=t-+f[B+4+(A<<4)+8>>2];h=h|x*x+y*y+z*z<=i;A=A+1|0}while((A|0)!=(C|0))}else h=0;if((+f[B+304>>2]==0.0?t==+f[B+300>>2]:0)?o-n==+f[B+296>>2]:0){if(m-k==+f[B+292>>2]|h)S=15}else S=14;if((S|0)==14?(S=0,h):0)S=15;if((S|0)==15){S=0;c[b+68>>2]=1;q=1;h=0;break}i=l-j;if(i<=l*9.999999974752427e-07){c[b+68>>2]=!(i<=0.0)?11:2;q=1;h=0;break}f[B+292>>2]=m-k;f[B+296>>2]=o-n;f[B+300>>2]=t;f[B+304>>2]=0.0;a[B+356>>0]=1;f[B+4+(C<<4)>>2]=m-k;f[B+4+(C<<4)+4>>2]=o-n;f[B+4+(C<<4)+8>>2]=t;f[B+4+(C<<4)+12>>2]=0.0;h=c[B>>2]|0;f[B+84+(h<<4)>>2]=m;f[B+84+(h<<4)+4>>2]=o;f[B+84+(h<<4)+8>>2]=r;f[B+84+(h<<4)+12>>2]=0.0;h=c[B>>2]|0;f[B+164+(h<<4)>>2]=k;f[B+164+(h<<4)+4>>2]=n;f[B+164+(h<<4)+8>>2]=p;f[B+164+(h<<4)+12>>2]=0.0;c[B>>2]=(c[B>>2]|0)+1;h=c[b+24>>2]|0;C=nb(h)|0;i=+f[h+276>>2];j=+f[h+280>>2];k=+f[h+284>>2];h=c[h+288>>2]|0;if(!C){c[b+68>>2]=3;q=1;h=0;break}if(i*i+j*j+k*k<9.999999974752427e-07){f[b+4>>2]=i;f[b+8>>2]=j;f[b+12>>2]=k;c[b+16>>2]=h;c[b+68>>2]=6;q=1;h=0;break}if(l-(i*i+j*j+k*k)<=l*1.1920928955078125e-07){c[b+68>>2]=12;q=1;h=0;l=i*i+j*j+k*k;break}f[b+4>>2]=i;f[b+8>>2]=j;f[b+12>>2]=k;c[b+16>>2]=h;C=c[b+64>>2]|0;c[b+64>>2]=C+1;if((C|0)<=1e3)if((c[c[b+24>>2]>>2]|0)==4){c[b+68>>2]=13;h=0;l=i*i+j*j+k*k}else{h=1;l=i*i+j*j+k*k}else{h=0;l=i*i+j*j+k*k}}while(0)}while(h);t=E<<24>>24==0?u:0.0;r=(E<<24>>24==0?v:0.0)+t;if(q){E=c[b+24>>2]|0;nb(E)|0;k=+f[E+260>>2];j=+f[E+264>>2];i=+f[E+268>>2];c[O+192>>2]=c[b+4>>2];c[O+192+4>>2]=c[b+4+4>>2];c[O+192+8>>2]=c[b+4+8>>2];c[O+192+12>>2]=c[b+4+12>>2];m=+f[b+4>>2];n=+f[b+8>>2];o=+f[b+12>>2];if(m*m+n*n+o*o<.0001)c[b+68>>2]=5;if(m*m+n*n+o*o>1.4210854715202004e-14){y=1.0/+s(+(m*m+n*n+o*o));f[O+192>>2]=y*+f[O+192>>2];f[M>>2]=y*+f[M>>2];f[N>>2]=y*+f[N>>2];z=t/+s(+l);h=1;l=1.0/y-r;q=1;k=z*m+k;j=z*n+j;i=z*o+i}else{h=2;l=0.0;q=0}c[b+60>>2]=h}else{l=0.0;q=0;k=0.0;j=0.0;i=0.0}if((c[b+72>>2]|0)!=0?(c[b+20>>2]|0)!=0:0)h=r+l<.01&(c[b+68>>2]|0)!=0;else h=0;A=q^1;do if(h|A?(F=c[b+20>>2]|0,(F|0)!=0):0){c[6731]=(c[6731]|0)+1;c[b+4>>2]=0;c[b+4+4>>2]=0;c[b+4+8>>2]=0;c[b+4+12>>2]=0;if(Aa[c[(c[F>>2]|0)+8>>2]&3](F,c[b+24>>2]|0,c[b+28>>2]|0,c[b+32>>2]|0,O+128|0,O+64|0,b+4|0,O+48|0,O+32|0,g)|0){n=+f[O+32>>2];o=+f[O+48>>2];p=+f[O+32+4>>2];r=+f[O+48+4>>2];t=+f[O+32+8>>2];u=+f[O+48+8>>2];if(!((n-o)*(n-o)+(p-r)*(p-r)+(t-u)*(t-u)<=1.4210854715202004e-14)){m=(n-o)*(n-o)+(p-r)*(p-r)+(t-u)*(t-u);w=n-o;x=t-u;y=0.0;z=p-r}else{w=+f[b+4>>2];z=+f[b+8>>2];x=+f[b+12>>2];m=w*w+z*z+x*x;y=+f[b+16>>2]}if(m>1.4210854715202004e-14){v=1.0/+s(+m);m=-+s(+((o-n)*(o-n)+(r-p)*(r-p)+(u-t)*(u-t)));if(l>m|A){k=+f[O+32>>2];j=+f[O+32+4>>2];i=+f[O+32+8>>2];f[O+192>>2]=w*v;f[M>>2]=z*v;f[N>>2]=x*v;f[O+192+12>>2]=y;c[b+60>>2]=3;l=m;break}else h=8}else h=9;c[b+60>>2]=h;if(q)break;ea=O;return}else{n=+f[b+4>>2];o=+f[b+8>>2];p=+f[b+12>>2];if(!(n*n+o*o+p*p>0.0)){if(q)break;ea=O;return}y=+f[O+48>>2]-+f[O+32>>2];z=+f[O+48+4>>2]-+f[O+32+4>>2];m=+f[O+48+8>>2]-+f[O+32+8>>2];m=+s(+(y*y+z*z+m*m))-r;if(m>2];j=t*o+ +f[O+32+4>>2];i=t*p+ +f[O+32+8>>2];c[O+192>>2]=c[b+4>>2];c[O+192+4>>2]=c[b+4+4>>2];c[O+192+8>>2]=c[b+4+8>>2];c[O+192+12>>2]=c[b+4+12>>2];x=+f[O+192>>2];y=+f[M>>2];z=+f[N>>2];l=1.0/+s(+(x*x+y*y+z*z));f[O+192>>2]=x*l;f[M>>2]=y*l;f[N>>2]=z*l;c[b+60>>2]=6;l=m;break}c[b+60>>2]=5;if(q)break;ea=O;return}}else S=51;while(0);if((S|0)==51)if(!q){ea=O;return}if(!(l<0.0)?!(l*l<+f[d+128>>2]):0){ea=O;return}if(c[b+76>>2]|0?(S=c[b+28>>2]|0,Pa[c[(c[S>>2]|0)+8>>2]&127](S,O+128|0,O+48|0,O+32|0),x=(+f[O+32>>2]+ +f[O+48>>2])*.5,y=(+f[O+32+4>>2]+ +f[O+48+4>>2])*.5,z=(+f[O+32+8>>2]+ +f[O+48+8>>2])*.5,S=c[b+32>>2]|0,Pa[c[(c[S>>2]|0)+8>>2]&127](S,O+64|0,O+48|0,O+32|0),P=+f[O+192>>2],Q=+f[M>>2],R=+f[N>>2],(x-(+f[O+48>>2]+ +f[O+32>>2])*.5)*P+(y-(+f[O+48+4>>2]+ +f[O+32+4>>2])*.5)*Q+(z-(+f[O+48+8>>2]+ +f[O+32+8>>2])*.5)*R<0.0):0){f[O+192>>2]=-P;f[M>>2]=-Q;f[N>>2]=-R}c[b+4>>2]=c[O+192>>2];c[b+4+4>>2]=c[O+192+4>>2];c[b+4+8>>2]=c[O+192+8>>2];c[b+4+12>>2]=c[O+192+12>>2];f[b+56>>2]=l;S=c[(c[e>>2]|0)+16>>2]|0;f[O+48>>2]=(G+H)*.5+k;f[O+48+4>>2]=(I+J)*.5+j;f[O+48+8>>2]=(K+L)*.5+i;f[O+48+12>>2]=0.0;Na[S&15](e,O+192|0,O+48|0,l);ea=O;return}function Ib(d,e,g,h){d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0;c[d+168>>2]=c[d+152>>2];c[e>>2]=10324;c[e+52>>2]=282;a[e+60>>0]=0;a[e+80>>0]=1;c[e+76>>2]=0;c[e+68>>2]=0;c[e+72>>2]=0;a[e+100>>0]=1;c[e+96>>2]=0;c[e+88>>2]=0;c[e+92>>2]=0;a[e+120>>0]=1;c[e+116>>2]=0;c[e+108>>2]=0;c[e+112>>2]=0;a[e+140>>0]=1;c[e+136>>2]=0;c[e+128>>2]=0;c[e+132>>2]=0;c[e+144>>2]=0;a[e+164>>0]=1;c[e+160>>2]=0;c[e+152>>2]=0;c[e+156>>2]=0;c[e+168>>2]=0;c[e+4>>2]=-8388609;c[e+8>>2]=-8388609;c[e+12>>2]=-8388609;f[e+16>>2]=0.0;c[e+20>>2]=2139095039;c[e+24>>2]=2139095039;c[e+28>>2]=2139095039;f[e+32>>2]=0.0;g=c[d+56>>2]|0;if(h){c[e+56>>2]=$B(g|0)|0;a[e+4>>0]=a[d+4+3>>0]|0;a[e+5>>0]=a[d+4+2>>0]|0;a[e+6>>0]=a[d+4+1>>0]|0;a[e+7>>0]=a[d+4>>0]|0;a[e+8>>0]=a[d+8+3>>0]|0;a[e+9>>0]=a[d+8+2>>0]|0;a[e+10>>0]=a[d+8+1>>0]|0;a[e+11>>0]=a[d+8>>0]|0;a[e+12>>0]=a[d+12+3>>0]|0;a[e+13>>0]=a[d+12+2>>0]|0;a[e+14>>0]=a[d+12+1>>0]|0;a[e+15>>0]=a[d+12>>0]|0;a[e+16>>0]=a[d+16+3>>0]|0;a[e+17>>0]=a[d+16+2>>0]|0;a[e+18>>0]=a[d+16+1>>0]|0;a[e+19>>0]=a[d+16>>0]|0;a[e+20>>0]=a[d+20+3>>0]|0;a[e+21>>0]=a[d+20+2>>0]|0;a[e+22>>0]=a[d+20+1>>0]|0;a[e+23>>0]=a[d+20>>0]|0;a[e+24>>0]=a[d+24+3>>0]|0;a[e+25>>0]=a[d+24+2>>0]|0;a[e+26>>0]=a[d+24+1>>0]|0;a[e+27>>0]=a[d+24>>0]|0;a[e+28>>0]=a[d+28+3>>0]|0;a[e+29>>0]=a[d+28+2>>0]|0;a[e+30>>0]=a[d+28+1>>0]|0;a[e+31>>0]=a[d+28>>0]|0;a[e+32>>0]=a[d+32+3>>0]|0;a[e+33>>0]=a[d+32+2>>0]|0;a[e+34>>0]=a[d+32+1>>0]|0;a[e+35>>0]=a[d+32>>0]|0;a[e+36>>0]=a[d+36+3>>0]|0;a[e+37>>0]=a[d+36+2>>0]|0;a[e+38>>0]=a[d+36+1>>0]|0;a[e+39>>0]=a[d+36>>0]|0;a[e+40>>0]=a[d+40+3>>0]|0;a[e+41>>0]=a[d+40+2>>0]|0;a[e+42>>0]=a[d+40+1>>0]|0;a[e+43>>0]=a[d+40>>0]|0;a[e+44>>0]=a[d+44+3>>0]|0;a[e+45>>0]=a[d+44+2>>0]|0;a[e+46>>0]=a[d+44+1>>0]|0;a[e+47>>0]=a[d+44>>0]|0;a[e+48>>0]=a[d+48+3>>0]|0;a[e+49>>0]=a[d+48+2>>0]|0;a[e+50>>0]=a[d+48+1>>0]|0;a[e+51>>0]=a[d+48>>0]|0;c[e+144>>2]=$B(c[d+144>>2]|0)|0;g=$B(c[d+168>>2]|0)|0}else{c[e+56>>2]=g;c[e+4>>2]=c[d+4>>2];c[e+4+4>>2]=c[d+4+4>>2];c[e+4+8>>2]=c[d+4+8>>2];c[e+4+12>>2]=c[d+4+12>>2];c[e+20>>2]=c[d+20>>2];c[e+20+4>>2]=c[d+20+4>>2];c[e+20+8>>2]=c[d+20+8>>2];c[e+20+12>>2]=c[d+20+12>>2];c[e+36>>2]=c[d+36>>2];c[e+36+4>>2]=c[d+36+4>>2];c[e+36+8>>2]=c[d+36+8>>2];c[e+36+12>>2]=c[d+36+12>>2];c[e+144>>2]=c[d+144>>2];g=c[d+168>>2]|0}c[e+168>>2]=g;a[e+60>>0]=a[d+60>>0]|0;k=c[d+56>>2]|0;if(!(a[d+60>>0]|0)){g=c[e+96>>2]|0;if(g|0){if(a[e+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[e+96>>2]=0}a[e+100>>0]=0;c[e+96>>2]=e+172;c[e+88>>2]=k;c[e+92>>2]=k;if(h)if((k|0)>0){i=c[d+96>>2]|0;g=e+172|0;j=0;do{l=i+(j<<6)|0;n=g+(j<<6)|0;a[n>>0]=a[l+3>>0]|0;a[n+1>>0]=a[l+2>>0]|0;a[n+2>>0]=a[l+1>>0]|0;a[n+3>>0]=a[l>>0]|0;n=i+(j<<6)+4|0;l=g+(j<<6)+4|0;a[l>>0]=a[n+3>>0]|0;a[l+1>>0]=a[n+2>>0]|0;a[l+2>>0]=a[n+1>>0]|0;a[l+3>>0]=a[n>>0]|0;l=i+(j<<6)+8|0;n=g+(j<<6)+8|0;a[n>>0]=a[l+3>>0]|0;a[n+1>>0]=a[l+2>>0]|0;a[n+2>>0]=a[l+1>>0]|0;a[n+3>>0]=a[l>>0]|0;n=i+(j<<6)+12|0;g=g+(j<<6)+12|0;a[g>>0]=a[n+3>>0]|0;a[g+1>>0]=a[n+2>>0]|0;a[g+2>>0]=a[n+1>>0]|0;a[g+3>>0]=a[n>>0]|0;g=c[d+96>>2]|0;n=g+(j<<6)+16|0;l=c[e+96>>2]|0;m=l+(j<<6)+16|0;a[m>>0]=a[n+3>>0]|0;a[m+1>>0]=a[n+2>>0]|0;a[m+2>>0]=a[n+1>>0]|0;a[m+3>>0]=a[n>>0]|0;m=g+(j<<6)+20|0;n=l+(j<<6)+20|0;a[n>>0]=a[m+3>>0]|0;a[n+1>>0]=a[m+2>>0]|0;a[n+2>>0]=a[m+1>>0]|0;a[n+3>>0]=a[m>>0]|0;n=g+(j<<6)+24|0;m=l+(j<<6)+24|0;a[m>>0]=a[n+3>>0]|0;a[m+1>>0]=a[n+2>>0]|0;a[m+2>>0]=a[n+1>>0]|0;a[m+3>>0]=a[n>>0]|0;g=g+(j<<6)+28|0;l=l+(j<<6)+28|0;a[l>>0]=a[g+3>>0]|0;a[l+1>>0]=a[g+2>>0]|0;a[l+2>>0]=a[g+1>>0]|0;a[l+3>>0]=a[g>>0]|0;i=c[d+96>>2]|0;l=$B(c[i+(j<<6)+32>>2]|0)|0;g=c[e+96>>2]|0;c[g+(j<<6)+32>>2]=l;c[g+(j<<6)+36>>2]=$B(c[i+(j<<6)+36>>2]|0)|0;c[g+(j<<6)+40>>2]=$B(c[i+(j<<6)+40>>2]|0)|0;j=j+1|0}while((j|0)!=(k|0));i=29}else i=28;else if((k|0)>0){i=c[d+96>>2]|0;g=e+172|0;j=0;do{m=i+(j<<6)|0;n=g+(j<<6)|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];n=(c[d+96>>2]|0)+(j<<6)+16|0;g=(c[e+96>>2]|0)+(j<<6)+16|0;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];c[g+12>>2]=c[n+12>>2];i=c[d+96>>2]|0;g=c[e+96>>2]|0;c[g+(j<<6)+32>>2]=c[i+(j<<6)+32>>2];c[g+(j<<6)+36>>2]=c[i+(j<<6)+36>>2];c[g+(j<<6)+40>>2]=c[i+(j<<6)+40>>2];j=j+1|0}while((j|0)!=(k|0));i=29}else i=28;if((i|0)==28){g=k<<6;i=32}else if((i|0)==29)if(g)if((a[e+100>>0]|0)==0|(g|0)==0){g=k<<6;i=32}else{c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);g=k<<6;i=32}else g=k<<6;if((i|0)==32)c[e+96>>2]=0;c[e+88>>2]=0;c[e+88+4>>2]=0;c[e+88+8>>2]=0;a[e+88+12>>0]=0}else{g=c[e+136>>2]|0;if(g|0){if(a[e+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[e+136>>2]=0}a[e+140>>0]=0;c[e+136>>2]=e+172;c[e+128>>2]=k;c[e+132>>2]=k;if(h){if((k|0)>0){g=c[d+136>>2]|0;i=0;do{b[e+172+(i<<4)>>1]=jI(b[g+(i<<4)>>1]|0)|0;b[e+172+(i<<4)+2>>1]=jI(b[g+(i<<4)+2>>1]|0)|0;b[e+172+(i<<4)+4>>1]=jI(b[g+(i<<4)+4>>1]|0)|0;b[e+172+(i<<4)+6>>1]=jI(b[g+(i<<4)+6>>1]|0)|0;b[e+172+(i<<4)+8>>1]=jI(b[g+(i<<4)+8>>1]|0)|0;b[e+172+(i<<4)+10>>1]=jI(b[g+(i<<4)+10>>1]|0)|0;c[e+172+(i<<4)+12>>2]=$B(c[g+(i<<4)+12>>2]|0)|0;i=i+1|0}while((i|0)!=(k|0))}}else if((k|0)>0){g=c[d+136>>2]|0;i=0;do{b[e+172+(i<<4)>>1]=b[g+(i<<4)>>1]|0;b[e+172+(i<<4)+2>>1]=b[g+(i<<4)+2>>1]|0;b[e+172+(i<<4)+4>>1]=b[g+(i<<4)+4>>1]|0;b[e+172+(i<<4)+6>>1]=b[g+(i<<4)+6>>1]|0;b[e+172+(i<<4)+8>>1]=b[g+(i<<4)+8>>1]|0;b[e+172+(i<<4)+10>>1]=b[g+(i<<4)+10>>1]|0;c[e+172+(i<<4)+12>>2]=c[g+(i<<4)+12>>2];i=i+1|0}while((i|0)!=(k|0))}c[e+128>>2]=0;c[e+128+4>>2]=0;c[e+128+8>>2]=0;a[e+128+12>>0]=0;g=k<<4}k=e+172+g|0;g=c[d+168>>2]|0;i=c[e+160>>2]|0;if(i|0){if(a[e+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[e+160>>2]=0}a[e+164>>0]=0;c[e+160>>2]=k;c[e+152>>2]=g;c[e+156>>2]=g;j=c[d+168>>2]|0;if(h){if((j|0)<=0){c[e>>2]=0;c[e+152>>2]=0;c[e+152+4>>2]=0;c[e+152+8>>2]=0;a[e+152+12>>0]=0;return 1}g=c[d+160>>2]|0;i=0;do{b[k+(i<<5)>>1]=jI(b[g+(i<<5)>>1]|0)|0;b[k+(i<<5)+2>>1]=jI(b[g+(i<<5)+2>>1]|0)|0;b[k+(i<<5)+4>>1]=jI(b[g+(i<<5)+4>>1]|0)|0;b[k+(i<<5)+6>>1]=jI(b[g+(i<<5)+6>>1]|0)|0;b[k+(i<<5)+8>>1]=jI(b[g+(i<<5)+8>>1]|0)|0;b[k+(i<<5)+10>>1]=jI(b[g+(i<<5)+10>>1]|0)|0;c[k+(i<<5)+12>>2]=$B(c[g+(i<<5)+12>>2]|0)|0;c[k+(i<<5)+16>>2]=$B(c[g+(i<<5)+16>>2]|0)|0;i=i+1|0}while((i|0)!=(j|0));c[e>>2]=0;c[e+152>>2]=0;c[e+152+4>>2]=0;c[e+152+8>>2]=0;a[e+152+12>>0]=0;return 1}else{if((j|0)<=0){c[e>>2]=0;c[e+152>>2]=0;c[e+152+4>>2]=0;c[e+152+8>>2]=0;a[e+152+12>>0]=0;return 1}g=c[d+160>>2]|0;i=0;do{b[k+(i<<5)>>1]=b[g+(i<<5)>>1]|0;b[k+(i<<5)+2>>1]=b[g+(i<<5)+2>>1]|0;b[k+(i<<5)+4>>1]=b[g+(i<<5)+4>>1]|0;b[k+(i<<5)+6>>1]=b[g+(i<<5)+6>>1]|0;b[k+(i<<5)+8>>1]=b[g+(i<<5)+8>>1]|0;b[k+(i<<5)+10>>1]=b[g+(i<<5)+10>>1]|0;c[k+(i<<5)+12>>2]=c[g+(i<<5)+12>>2];c[k+(i<<5)+16>>2]=c[g+(i<<5)+16>>2];c[k+(i<<5)+20>>2]=0;c[k+(i<<5)+24>>2]=0;c[k+(i<<5)+28>>2]=0;i=i+1|0}while((i|0)<(c[d+168>>2]|0));c[e>>2]=0;c[e+152>>2]=0;c[e+152+4>>2]=0;c[e+152+8>>2]=0;a[e+152+12>>0]=0;return 1}return 0}function Jb(b,d,e,g,h,i,j,k,l,m){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0.0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0;B=ea;ea=ea+4224|0;if(((c[e+4>>2]|0)+-17|0)>>>0<2)z=((c[g+4>>2]|0)+-17|0)>>>0<2;else z=0;b=0;do{Qd();u=+f[23792+(b<<4)>>2];v=+f[23792+(b<<4)+4>>2];w=+f[23792+(b<<4)+8>>2];y=+f[h+4>>2]*-u+ +f[h+20>>2]*-v+ +f[h+36>>2]*-w;x=+f[h+8>>2]*-u+ +f[h+24>>2]*-v+ +f[h+40>>2]*-w;f[B+992+(b<<4)>>2]=+f[h>>2]*-u+ +f[h+16>>2]*-v+ +f[h+32>>2]*-w;f[B+992+(b<<4)+4>>2]=y;f[B+992+(b<<4)+8>>2]=x;f[B+992+(b<<4)+12>>2]=0.0;x=u*+f[i+4>>2]+v*+f[i+20>>2]+w*+f[i+36>>2];y=u*+f[i+8>>2]+v*+f[i+24>>2]+w*+f[i+40>>2];f[B+(b<<4)>>2]=u*+f[i>>2]+v*+f[i+16>>2]+w*+f[i+32>>2];f[B+(b<<4)+4>>2]=x;f[B+(b<<4)+8>>2]=y;f[B+(b<<4)+12>>2]=0.0;b=b+1|0}while((b|0)!=42);b=ra[c[(c[e>>2]|0)+84>>2]&127](e)|0;if((b|0)>0){o=0;p=42;while(1){Ma[c[(c[e>>2]|0)+88>>2]&127](e,o,B+4144|0);x=+f[B+4144>>2];y=+f[B+4144+4>>2];w=+f[B+4144+8>>2];v=x*+f[h+16>>2]+y*+f[h+20>>2]+w*+f[h+24>>2];u=x*+f[h+32>>2]+y*+f[h+36>>2]+w*+f[h+40>>2];f[B+4144>>2]=+f[h>>2]*x+ +f[h+4>>2]*y+ +f[h+8>>2]*w;f[B+4144+4>>2]=v;f[B+4144+8>>2]=u;f[B+4144+12>>2]=0.0;Qd();q=23792+(p<<4)|0;c[q>>2]=c[B+4144>>2];c[q+4>>2]=c[B+4144+4>>2];c[q+8>>2]=c[B+4144+8>>2];c[q+12>>2]=c[B+4144+12>>2];u=+f[B+4144>>2];v=+f[B+4144+4>>2];w=+f[B+4144+8>>2];y=+f[h+4>>2]*-u+ +f[h+20>>2]*-v+ +f[h+36>>2]*-w;x=+f[h+8>>2]*-u+ +f[h+24>>2]*-v+ +f[h+40>>2]*-w;f[B+992+(p<<4)>>2]=+f[h>>2]*-u+ +f[h+16>>2]*-v+ +f[h+32>>2]*-w;f[B+992+(p<<4)+4>>2]=y;f[B+992+(p<<4)+8>>2]=x;f[B+992+(p<<4)+12>>2]=0.0;x=u*+f[i+4>>2]+v*+f[i+20>>2]+w*+f[i+36>>2];y=u*+f[i+8>>2]+v*+f[i+24>>2]+w*+f[i+40>>2];f[B+(p<<4)>>2]=u*+f[i>>2]+v*+f[i+16>>2]+w*+f[i+32>>2];f[B+(p<<4)+4>>2]=x;f[B+(p<<4)+8>>2]=y;f[B+(p<<4)+12>>2]=0.0;o=o+1|0;if((o|0)==(b|0))break;else p=p+1|0}p=b+42|0}else p=42;b=ra[c[(c[g>>2]|0)+84>>2]&127](g)|0;if((b|0)>0){o=0;q=p;while(1){Ma[c[(c[g>>2]|0)+88>>2]&127](g,o,B+4144|0);x=+f[B+4144>>2];y=+f[B+4144+4>>2];w=+f[B+4144+8>>2];v=x*+f[i+16>>2]+y*+f[i+20>>2]+w*+f[i+24>>2];u=x*+f[i+32>>2]+y*+f[i+36>>2]+w*+f[i+40>>2];f[B+4144>>2]=+f[i>>2]*x+ +f[i+4>>2]*y+ +f[i+8>>2]*w;f[B+4144+4>>2]=v;f[B+4144+8>>2]=u;f[B+4144+12>>2]=0.0;Qd();C=23792+(q<<4)|0;c[C>>2]=c[B+4144>>2];c[C+4>>2]=c[B+4144+4>>2];c[C+8>>2]=c[B+4144+8>>2];c[C+12>>2]=c[B+4144+12>>2];u=+f[B+4144>>2];v=+f[B+4144+4>>2];w=+f[B+4144+8>>2];y=+f[h+4>>2]*-u+ +f[h+20>>2]*-v+ +f[h+36>>2]*-w;x=+f[h+8>>2]*-u+ +f[h+24>>2]*-v+ +f[h+40>>2]*-w;f[B+992+(q<<4)>>2]=+f[h>>2]*-u+ +f[h+16>>2]*-v+ +f[h+32>>2]*-w;f[B+992+(q<<4)+4>>2]=y;f[B+992+(q<<4)+8>>2]=x;f[B+992+(q<<4)+12>>2]=0.0;x=u*+f[i+4>>2]+v*+f[i+20>>2]+w*+f[i+36>>2];y=u*+f[i+8>>2]+v*+f[i+24>>2]+w*+f[i+40>>2];f[B+(q<<4)>>2]=u*+f[i>>2]+v*+f[i+16>>2]+w*+f[i+32>>2];f[B+(q<<4)+4>>2]=x;f[B+(q<<4)+8>>2]=y;f[B+(q<<4)+12>>2]=0.0;o=o+1|0;if((o|0)==(b|0))break;else q=q+1|0}p=b+p|0}Pa[c[(c[e>>2]|0)+76>>2]&127](e,B+992|0,B+2976|0,p);Pa[c[(c[g>>2]|0)+76>>2]&127](g,B,B+1984|0,p);if((p|0)>0){n=0.0;v=0.0;u=0.0;b=0;t=0.0;r=999999984306749440.0;do{Qd();s=+f[23792+(b<<4)>>2];w=+f[23792+(b<<4)+4>>2];y=+f[23792+(b<<4)+12>>2];x=z?0.0:+f[23792+(b<<4)+8>>2];if(s*s+w*w+x*x>.01?(E=+f[B+2976+(b<<4)>>2],D=+f[B+2976+(b<<4)+4>>2],A=+f[B+2976+(b<<4)+8>>2],H=+f[B+1984+(b<<4)>>2],G=+f[B+1984+(b<<4)+4>>2],F=+f[B+1984+(b<<4)+8>>2],A=s*(H*+f[i>>2]+G*+f[i+4>>2]+F*+f[i+8>>2]+ +f[i+48>>2]-(E*+f[h>>2]+D*+f[h+4>>2]+A*+f[h+8>>2]+ +f[h+48>>2]))+w*(H*+f[i+16>>2]+G*+f[i+20>>2]+F*+f[i+24>>2]+ +f[i+52>>2]-(E*+f[h+16>>2]+D*+f[h+20>>2]+A*+f[h+24>>2]+ +f[h+52>>2]))+x*(z?0.0:H*+f[i+32>>2]+G*+f[i+36>>2]+F*+f[i+40>>2]+ +f[i+56>>2]-(E*+f[h+32>>2]+D*+f[h+36>>2]+A*+f[h+40>>2]+ +f[h+56>>2])),A>2]|0){case 4:case 5:case 10:case 11:case 13:case 1:case 0:case 8:break;default:+ha[c[(c[e>>2]|0)+48>>2]&15](e)}switch(c[g+4>>2]|0){case 4:case 5:case 10:case 11:case 13:case 1:case 0:case 8:break;default:+ha[c[(c[g>>2]|0)+48>>2]&15](g)}if(r<0.0){C=0;ea=B;return C|0}switch(c[e+4>>2]|0){case 8:{s=+f[e+28>>2]*+f[e+12>>2];break}case 0:{s=+f[e+44>>2];break}case 1:{s=+f[e+44>>2];break}case 13:{s=+f[e+44>>2];break}case 11:{s=+f[e+44>>2];break}case 10:{s=+f[e+44>>2];break}case 4:case 5:{s=+f[e+44>>2];break}default:s=+ha[c[(c[e>>2]|0)+48>>2]&15](e)}b=c[g+4>>2]|0;switch(b|0){case 8:{b=8;n=+f[g+28>>2]*+f[g+12>>2];break}case 0:{b=0;n=+f[g+44>>2];break}case 1:{b=1;n=+f[g+44>>2];break}case 13:{b=13;n=+f[g+44>>2];break}case 11:{b=11;n=+f[g+44>>2];break}case 10:{b=10;n=+f[g+44>>2];break}case 4:case 5:{n=+f[g+44>>2];break}default:{n=+ha[c[(c[g>>2]|0)+48>>2]&15](g);b=c[g+4>>2]|0}}n=r+(s+n+.5);c[B+4144>>2]=10520;c[B+4144+4>>2]=0;c[B+4144+8>>2]=1065353216;c[B+4144+12>>2]=0;f[B+4144+16>>2]=0.0;c[B+4144+20>>2]=0;c[B+4144+24>>2]=d;c[B+4144+28>>2]=e;c[B+4144+32>>2]=g;c[B+4144+36>>2]=c[e+4>>2];c[B+4144+40>>2]=b;f[B+4144+44>>2]=+ha[c[(c[e>>2]|0)+48>>2]&15](e);f[B+4144+48>>2]=+ha[c[(c[g>>2]|0)+48>>2]&15](g);a[B+4144+52>>0]=0;c[B+4144+60>>2]=-1;c[B+4144+72>>2]=1;c[B+4144+76>>2]=1;F=u*n+ +f[h+48>>2];G=v*n+ +f[h+52>>2];H=w*n+ +f[h+56>>2];c[B+4012>>2]=c[h>>2];c[B+4012+4>>2]=c[h+4>>2];c[B+4012+8>>2]=c[h+8>>2];c[B+4012+12>>2]=c[h+12>>2];c[B+4012+16>>2]=c[h+16>>2];c[B+4012+16+4>>2]=c[h+16+4>>2];c[B+4012+16+8>>2]=c[h+16+8>>2];c[B+4012+16+12>>2]=c[h+16+12>>2];c[B+4012+32>>2]=c[h+32>>2];c[B+4012+32+4>>2]=c[h+32+4>>2];c[B+4012+32+8>>2]=c[h+32+8>>2];c[B+4012+32+12>>2]=c[h+32+12>>2];f[B+4012+48>>2]=F;f[B+4012+52>>2]=G;f[B+4012+56>>2]=H;f[B+4012+60>>2]=0.0;c[B+4012+64>>2]=c[i>>2];c[B+4012+64+4>>2]=c[i+4>>2];c[B+4012+64+8>>2]=c[i+8>>2];c[B+4012+64+12>>2]=c[i+12>>2];c[B+4012+80>>2]=c[i+16>>2];c[B+4012+80+4>>2]=c[i+16+4>>2];c[B+4012+80+8>>2]=c[i+16+8>>2];c[B+4012+80+12>>2]=c[i+16+12>>2];c[B+4012+96>>2]=c[i+32>>2];c[B+4012+96+4>>2]=c[i+32+4>>2];c[B+4012+96+8>>2]=c[i+32+8>>2];c[B+4012+96+12>>2]=c[i+32+12>>2];c[B+4012+112>>2]=c[i+48>>2];c[B+4012+112+4>>2]=c[i+48+4>>2];c[B+4012+112+8>>2]=c[i+48+8>>2];c[B+4012+112+12>>2]=c[i+48+12>>2];f[B+4012+128>>2]=999999984306749440.0;c[B+3968>>2]=10404;a[B+3968+40>>0]=0;f[B+4144+4>>2]=-u;f[B+4144+8>>2]=-v;f[B+4144+12>>2]=-w;f[B+4144+16>>2]=0.0;Hb(B+4144|0,B+4012|0,B+3968|0,m,0);n=n-+f[B+3968+36>>2];b=a[B+3968+40>>0]|0;if(b<<24>>24){C=B+3968+20|0;G=+f[B+3968+24>>2]-v*n;H=+f[B+3968+28>>2]-w*n;f[k>>2]=+f[C>>2]-u*n;f[k+4>>2]=G;f[k+8>>2]=H;f[k+12>>2]=0.0;c[l>>2]=c[C>>2];c[l+4>>2]=c[C+4>>2];c[l+8>>2]=c[C+8>>2];c[l+12>>2]=c[C+12>>2];f[j>>2]=u;f[j+4>>2]=v;f[j+8>>2]=w;f[j+12>>2]=t}C=b<<24>>24!=0;ea=B;return C|0}function Kb(b){b=b|0;var d=0,e=0.0,g=0.0,h=0.0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;G=ea;ea=ea+192|0;Fi(13654);d=c[b+1112>>2]|0;if((d|0)>0){F=0;do{E=c[(c[b+1120>>2]|0)+(F<<2)>>2]|0;D=c[E+24>>2]|0;if(D){i=G+144+4|0;j=i+44|0;do{c[i>>2]=0;i=i+4|0}while((i|0)<(j|0));f[G+144>>2]=9.999999747378752e-05;f[G+144+20>>2]=1.9999999494757503e-04;f[G+144+40>>2]=2.9999998514540493e-04;if((D|0)>0){d=c[E+32>>2]|0;i=c[E+12>>2]|0;e=0.0;g=0.0;h=0.0;j=0;do{C=c[d+(j<<2)>>2]|0;B=+f[i+(j<<2)>>2];e=e+ +f[C+8>>2]*B;g=g+B*+f[C+12>>2];h=h+B*+f[C+16>>2];j=j+1|0}while((j|0)!=(D|0))}else{h=0.0;g=0.0;e=0.0}q=+f[E+128>>2];s=e*q;r=g*q;q=h*q;f[E+228>>2]=s;f[E+232>>2]=r;f[E+236>>2]=q;f[E+240>>2]=0.0;if((D|0)>0){d=c[E+32>>2]|0;i=c[E+52>>2]|0;e=9.999999747378752e-05;g=0.0;h=0.0;k=1.9999999494757503e-04;l=0.0;m=0.0;n=0.0;o=2.9999998514540493e-04;p=0.0;j=0;do{C=c[d+(j<<2)>>2]|0;w=+f[C+8>>2]-s;x=+f[C+12>>2]-r;A=+f[C+16>>2]-q;y=+f[i+(j<<4)>>2];z=+f[i+(j<<4)+4>>2];B=+f[i+(j<<4)+8>>2];e=w*y+e;g=w*z+g;h=w*B+h;p=x*y+p;k=x*z+k;l=x*B+l;m=A*y+m;n=A*z+n;o=A*B+o;j=j+1|0}while((j|0)!=(D|0));f[G+144>>2]=e;f[G+144+4>>2]=g;f[G+144+8>>2]=h;f[G+144+16>>2]=p;f[G+144+20>>2]=k;f[G+144+24>>2]=l;f[G+144+32>>2]=m;f[G+144+36>>2]=n;f[G+144+40>>2]=o}if((a[24920]|0)==0?DC(24920)|0:0){f[6392]=9.999999747378752e-05;c[6393]=16;PB(24920)}bc(G+144|0,G+96|0,G+48|0);c[E+108>>2]=c[E+228>>2];c[E+108+4>>2]=c[E+228+4>>2];c[E+108+8>>2]=c[E+228+8>>2];c[E+108+12>>2]=c[E+228+12>>2];c[E+60>>2]=c[G+96>>2];c[E+60+4>>2]=c[G+96+4>>2];c[E+60+8>>2]=c[G+96+8>>2];c[E+60+12>>2]=c[G+96+12>>2];c[E+76>>2]=c[G+96+16>>2];c[E+76+4>>2]=c[G+96+16+4>>2];c[E+76+8>>2]=c[G+96+16+8>>2];c[E+76+12>>2]=c[G+96+16+12>>2];c[E+92>>2]=c[G+96+32>>2];c[E+92+4>>2]=c[G+96+32+4>>2];c[E+92+8>>2]=c[G+96+32+8>>2];c[E+92+12>>2]=c[G+96+32+12>>2];l=+f[E+132>>2];J=+f[E+60>>2];m=+f[E+148>>2];I=+f[E+64>>2];n=+f[E+164>>2];x=+f[E+68>>2];o=+f[E+136>>2];p=+f[E+152>>2];q=+f[E+168>>2];r=+f[E+140>>2];s=+f[E+156>>2];t=+f[E+172>>2];H=+f[E+76>>2];e=+f[E+80>>2];w=+f[E+84>>2];k=+f[E+92>>2];h=+f[E+96>>2];g=+f[E+100>>2];v=(l*J+m*I+n*x)*J+(J*o+I*p+x*q)*I+(J*r+I*s+x*t)*x;u=(l*J+m*I+n*x)*H+(J*o+I*p+x*q)*e+(J*r+I*s+x*t)*w;B=(l*J+m*I+n*x)*k+(J*o+I*p+x*q)*h+(J*r+I*s+x*t)*g;A=(l*H+m*e+n*w)*J+(o*H+p*e+q*w)*I+(r*H+s*e+t*w)*x;z=(l*H+m*e+n*w)*H+(o*H+p*e+q*w)*e+(r*H+s*e+t*w)*w;y=(l*H+m*e+n*w)*k+(o*H+p*e+q*w)*h+(r*H+s*e+t*w)*g;x=J*(l*k+m*h+n*g)+(o*k+p*h+q*g)*I+(r*k+s*h+t*g)*x;w=H*(l*k+m*h+n*g)+(o*k+p*h+q*g)*e+(r*k+s*h+t*g)*w;t=(l*k+m*h+n*g)*k+(o*k+p*h+q*g)*h+(r*k+s*h+t*g)*g;f[E+180>>2]=v;f[E+184>>2]=u;f[E+188>>2]=B;f[E+192>>2]=0.0;f[E+196>>2]=A;f[E+200>>2]=z;f[E+204>>2]=y;f[E+208>>2]=0.0;f[E+212>>2]=x;f[E+216>>2]=w;f[E+220>>2]=t;f[E+224>>2]=0.0;c[E+316>>2]=0;c[E+316+4>>2]=0;c[E+316+8>>2]=0;c[E+316+12>>2]=0;c[E+316+16>>2]=0;c[E+316+20>>2]=0;c[E+316+24>>2]=0;c[E+316+28>>2]=0;if((D|0)>0){d=c[E+32>>2]|0;i=c[E+12>>2]|0;q=+f[E+228>>2];r=+f[E+232>>2];s=+f[E+236>>2];p=0.0;o=0.0;n=0.0;m=0.0;l=0.0;e=0.0;j=0;do{C=c[d+(j<<2)>>2]|0;L=+f[i+(j<<2)>>2];I=+f[C+40>>2]*L;K=L*+f[C+44>>2];L=L*+f[C+48>>2];p=I+p;f[E+316>>2]=p;o=K+o;f[E+320>>2]=o;n=L+n;f[E+324>>2]=n;H=+f[C+8>>2]-q;J=+f[C+12>>2]-r;M=+f[C+16>>2]-s;m=m+(L*J-K*M);f[E+332>>2]=m;l=I*M-L*H+l;f[E+336>>2]=l;e=K*H-I*J+e;f[E+340>>2]=e;j=j+1|0}while((j|0)!=(D|0));C=E+316|0;d=E+332|0}else{p=0.0;o=0.0;n=0.0;m=0.0;l=0.0;e=0.0;C=E+316|0;d=E+332|0}L=+f[E+128>>2];M=1.0-+f[E+356>>2];f[E+316>>2]=p*L*M;f[E+320>>2]=L*o*M;f[E+324>>2]=L*n*M;f[E+328>>2]=0.0;M=1.0-+f[E+360>>2];f[d>>2]=(v*m+u*l+B*e)*M;f[E+336>>2]=(m*A+l*z+e*y)*M;f[E+340>>2]=M*(m*x+l*w+e*t);f[E+344>>2]=0.0;i=E+244|0;j=i+72|0;do{c[i>>2]=0;i=i+4|0}while((i|0)<(j|0));e=+f[E+364>>2];a:do if(e>0.0?(c[E+24>>2]|0)>0:0){d=0;while(1){j=c[(c[E+32>>2]|0)+(d<<2)>>2]|0;i=c[E+52>>2]|0;H=+f[i+(d<<4)>>2];I=+f[i+(d<<4)+4>>2];J=+f[i+(d<<4)+8>>2];K=+f[j+8>>2];L=+f[j+12>>2];M=+f[j+16>>2];L=L+e*(H*+f[E+76>>2]+I*+f[E+80>>2]+J*+f[E+84>>2]+ +f[E+112>>2]-L);M=M+e*(H*k+I*h+J*g+ +f[E+116>>2]-M);f[j+8>>2]=K+e*(H*+f[E+60>>2]+I*+f[E+64>>2]+J*+f[E+68>>2]+ +f[E+108>>2]-K);f[j+12>>2]=L;f[j+16>>2]=M;f[j+20>>2]=0.0;d=d+1|0;if((d|0)>=(c[E+24>>2]|0))break a;k=+f[E+92>>2];h=+f[E+96>>2];g=+f[E+100>>2];e=+f[E+364>>2]}}while(0);if(a[E+377>>0]|0){d=c[E+32>>2]|0;j=c[d>>2]|0;e=+f[j+8>>2];p=+f[j+12>>2];q=+f[j+16>>2];g=+f[j+20>>2];if((D|0)>1){i=1;n=e;o=q;m=g;l=p;k=e;h=g;g=p;e=q;do{j=c[d+(i<<2)>>2]|0;J=+f[j+8>>2];n=J>2];l=K>2];o=L>2];m=M>2]=n;f[G+16+4>>2]=l;f[G+16+8>>2]=o;f[G+16+12>>2]=m;f[G+16+16>>2]=k;f[G+16+20>>2]=g;f[G+16+24>>2]=e;f[G+16+28>>2]=h;d=c[E+348>>2]|0;if(!d){d=c[b+1052>>2]|0;if(!d){c[6747]=(c[6747]|0)+1;d=kb(63)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}i=d;j=i+44|0;do{c[i>>2]=0;i=i+4|0}while((i|0)<(j|0))}else c[b+1052>>2]=0;c[d+32>>2]=0;c[d+36>>2]=E;c[d+40>>2]=0;c[d>>2]=c[G+16>>2];c[d+4>>2]=c[G+16+4>>2];c[d+8>>2]=c[G+16+8>>2];c[d+12>>2]=c[G+16+12>>2];c[d+16>>2]=c[G+16+16>>2];c[d+20>>2]=c[G+16+20>>2];c[d+24>>2]=c[G+16+24>>2];c[d+28>>2]=c[G+16+28>>2];je(b+1048|0,c[b+1048>>2]|0,d);c[b+1060>>2]=(c[b+1060>>2]|0)+1;c[E+348>>2]=d}else{K=+f[b+452>>2];L=K*+f[E+320>>2]*3.0;M=K*+f[E+324>>2]*3.0;f[G>>2]=+f[C>>2]*K*3.0;f[G+4>>2]=L;f[G+8>>2]=M;f[G+12>>2]=0.0;rg(b+1048|0,d,G+16|0,G,+f[b+464>>2])|0}}d=c[b+1112>>2]|0}F=F+1|0}while((F|0)<(d|0))}d=c[2685]|0;b=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=b;if(b|0){ea=G;return}do if(c[d+4>>2]|0){Y(G+144|0,0)|0;b=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[G+144+4>>2]|0)-(c[b+4>>2]|0)+(((c[G+144>>2]|0)-(c[b>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=G;return}}while(0);c[2685]=c[d+20>>2];ea=G;return}function Lb(d,e){d=d|0;e=+e;var g=0,h=0,i=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;A=ea;ea=ea+464|0;Fi(14515);g=c[d+84>>2]|0;if(g|0)Da[g&31](d,e);Da[c[(c[d>>2]|0)+140>>2]&31](d,e);f[d+28>>2]=e;c[d+32>>2]=0;c[d+48>>2]=ra[c[(c[d>>2]|0)+20>>2]&127](d)|0;Fi(14558);Fi(14583);g=c[d+316>>2]|0;if((c[d+308>>2]|0)>0){h=0;do{r=c[d+24>>2]|0;Ia[c[(c[r>>2]|0)+16>>2]&127](r,c[g+(h<<2)>>2]|0);h=h+1|0;g=c[d+316>>2]|0}while((h|0)<(c[d+308>>2]|0))}if(g|0){if(a[d+320>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+316>>2]=0}a[d+320>>0]=1;c[d+316>>2]=0;c[d+308>>2]=0;c[d+312>>2]=0;g=c[2685]|0;r=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=r;do if(!r){if(c[g+4>>2]|0){Y(A+368|0,0)|0;r=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[A+368+4>>2]|0)-(c[r+4>>2]|0)+(((c[A+368>>2]|0)-(c[r>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(c[g+16>>2]|0)break;g=c[2685]|0}c[2685]=c[g+20>>2]}while(0);a:do if((c[d+232>>2]|0)>0){r=A+304+48|0;q=A+368+44|0;p=0;while(1){j=c[(c[d+240>>2]|0)+(p<<2)>>2]|0;f[j+244>>2]=1.0;b:do switch(c[j+216>>2]|0){case 2:case 5:break;default:if(((c[j+204>>2]&3|0)==0?(ag(j+4|0,+f[j+312>>2],+f[j+316>>2],+f[j+320>>2],j+328|0,e,A+304|0),s=+f[r>>2],x=s-+f[j+52>>2],t=+f[A+304+52>>2],z=t-+f[j+56>>2],u=+f[A+304+56>>2],y=u-+f[j+60>>2],a[d+44>>0]|0):0)?(o=+f[j+252>>2],o*o!=0.0?o*o>2]|0)+4>>2]|0)<20?(c[6409]=(c[6409]|0)+1,i=c[d+68>>2]|0,i=ra[c[(c[i>>2]|0)+36>>2]&127](i)|0,l=c[d+24>>2]|0,f[A+368+4>>2]=1.0,c[A+368+12>>2]=c[j+52>>2],c[A+368+12+4>>2]=c[j+52+4>>2],c[A+368+12+8>>2]=c[j+52+8>>2],c[A+368+12+12>>2]=c[j+52+12>>2],c[A+368+28>>2]=c[r>>2],c[A+368+28+4>>2]=c[r+4>>2],c[A+368+28+8>>2]=c[r+8>>2],c[A+368+28+12>>2]=c[r+12>>2],c[A+368+76>>2]=0,c[A+368>>2]=5396,c[A+368+80>>2]=j,c[A+368+88>>2]=i,c[A+368+92>>2]=l,l=c[j+248>>2]|0,c[A+248+8>>2]=0,c[A+248+12>>2]=1065353216,c[A+248+16>>2]=1065353216,c[A+248+20>>2]=1065353216,f[A+248+24>>2]=0.0,c[A+248>>2]=7884,c[A+248+4>>2]=8,c[A+248+28>>2]=l,c[A+248+44>>2]=l,c[A+368+84>>2]=c[d+56>>2],l=c[j+188>>2]|0,b[A+368+8>>1]=b[l+4>>1]|0,b[A+368+10>>1]=b[l+6>>1]|0,c[A+184+48>>2]=c[r>>2],c[A+184+48+4>>2]=c[r+4>>2],c[A+184+48+8>>2]=c[r+8>>2],c[A+184+48+12>>2]=c[r+12>>2],c[A+184>>2]=c[j+4>>2],c[A+184+4>>2]=c[j+4+4>>2],c[A+184+8>>2]=c[j+4+8>>2],c[A+184+12>>2]=c[j+4+12>>2],c[A+184+16>>2]=c[j+20>>2],c[A+184+16+4>>2]=c[j+20+4>>2],c[A+184+16+8>>2]=c[j+20+8>>2],c[A+184+16+12>>2]=c[j+20+12>>2],c[A+184+32>>2]=c[j+36>>2],c[A+184+32+4>>2]=c[j+36+4>>2],c[A+184+32+8>>2]=c[j+36+8>>2],c[A+184+32+12>>2]=c[j+36+12>>2],Gc(d,A+248|0,j+4|0,A+184|0,A+368|0,0.0),v=+f[A+368+4>>2],v<1.0):0){m=v*(s-+f[j+52>>2]);n=v*(t-+f[j+56>>2]);o=v*(u-+f[j+60>>2]);k=-(n*+f[A+368+48>>2])-m*+f[q>>2]-o*+f[A+368+52>>2];l=c[d+24>>2]|0;l=va[c[(c[l>>2]|0)+12>>2]&63](l,j,c[A+368+76>>2]|0)|0;g=c[d+308>>2]|0;if((g|0)==(c[d+312>>2]|0)?(w=(g|0)==0?1:g<<1,(g|0)<(w|0)):0){if(!w)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((w<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[d+308>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[d+316>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[d+316>>2]|0;if(i){if(a[d+320>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[d+308>>2]|0}c[d+316>>2]=0}a[d+320>>0]=1;c[d+316>>2]=h;c[d+312>>2]=w}c[(c[d+316>>2]|0)+(g<<2)>>2]=l;c[d+308>>2]=g+1;m=m+ +f[j+52>>2];n=n+ +f[j+56>>2];o=o+ +f[j+60>>2];i=c[A+368+76>>2]|0;M=+f[i+4>>2];L=+f[i+20>>2];K=+f[i+36>>2];J=+f[i+8>>2];I=+f[i+24>>2];H=+f[i+40>>2];G=+f[i+12>>2];E=+f[i+28>>2];C=+f[i+44>>2];F=-+f[i+52>>2];D=-+f[i+56>>2];B=-+f[i+60>>2];c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;f[A+16>>2]=m*M+n*L+o*K+(M*F+L*D+K*B);f[A+20>>2]=m*J+n*I+o*H+(J*F+I*D+H*B);f[A+24>>2]=m*G+n*E+o*C+(G*F+E*D+C*B);f[A+28>>2]=0.0;c[A+64>>2]=c[q>>2];c[A+64+4>>2]=c[q+4>>2];c[A+64+8>>2]=c[q+8>>2];c[A+64+12>>2]=c[q+12>>2];f[A+80>>2]=k;f[A+84>>2]=0.0;f[A+88>>2]=0.0;f[A+92>>2]=0.0;c[A+112>>2]=0;a[A+116>>0]=0;c[A+120>>2]=0;c[A+120+4>>2]=0;c[A+120+8>>2]=0;c[A+120+12>>2]=0;c[A+120+16>>2]=0;c[A+120+20>>2]=0;c[A+120+24>>2]=0;c[A+120+28>>2]=0;i=Rd(l,A)|0;f[l+4+(i*184|0)+92>>2]=0.0;k=+f[j+224>>2]*+f[(c[A+368+76>>2]|0)+224>>2];k=k<-10.0?-10.0:k;f[l+4+(i*184|0)+84>>2]=k>10.0?10.0:k;c[l+4+(i*184|0)+48>>2]=c[j+52>>2];c[l+4+(i*184|0)+48+4>>2]=c[j+52+4>>2];c[l+4+(i*184|0)+48+8>>2]=c[j+52+8>>2];c[l+4+(i*184|0)+48+12>>2]=c[j+52+12>>2];f[l+4+(i*184|0)+32>>2]=m;f[l+4+(i*184|0)+36>>2]=n;f[l+4+(i*184|0)+40>>2]=o;f[l+4+(i*184|0)+44>>2]=0.0}g=c[2685]|0;l=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=l;if(!l){if(c[g+4>>2]|0){Y(A+368|0,0)|0;l=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[A+368+4>>2]|0)-(c[l+4>>2]|0)+(((c[A+368>>2]|0)-(c[l>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(c[g+16>>2]|0)break b;g=c[2685]|0}c[2685]=c[g+20>>2]}}}while(0);p=p+1|0;if((p|0)>=(c[d+232>>2]|0))break a}}while(0);g=c[2685]|0;w=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=w;do if(!w){if(c[g+4>>2]|0){Y(A+368|0,0)|0;w=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[A+368+4>>2]|0)-(c[w+4>>2]|0)+(((c[A+368>>2]|0)-(c[w>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(c[g+16>>2]|0)break;g=c[2685]|0}c[2685]=c[g+20>>2]}while(0);Ca[c[(c[d>>2]|0)+44>>2]&511](d);Ca[c[(c[d>>2]|0)+148>>2]&511](d);f[d+104>>2]=e;Ia[c[(c[d>>2]|0)+152>>2]&127](d,d+92|0);Da[c[(c[d>>2]|0)+144>>2]&31](d,e);Fi(14544);if((c[d+280>>2]|0)>0){g=0;do{w=c[(c[d+288>>2]|0)+(g<<2)>>2]|0;Ja[c[(c[w>>2]|0)+8>>2]&7](w,d,e);g=g+1|0}while((g|0)<(c[d+280>>2]|0))}g=c[2685]|0;w=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=w;do if(!w){if(c[g+4>>2]|0){Y(A+368|0,0)|0;w=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[A+368+4>>2]|0)-(c[w+4>>2]|0)+(((c[A+368>>2]|0)-(c[w>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(c[g+16>>2]|0)break;g=c[2685]|0}c[2685]=c[g+20>>2]}while(0);Da[c[(c[d>>2]|0)+156>>2]&31](d,e);g=c[d+80>>2]|0;if(g|0)Da[g&31](d,e);g=c[2685]|0;d=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=d;if(d|0){ea=A;return}do if(c[g+4>>2]|0){Y(A+368|0,0)|0;d=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[A+368+4>>2]|0)-(c[d+4>>2]|0)+(((c[A+368>>2]|0)-(c[d>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[g+16>>2]|0)){g=c[2685]|0;break}else{ea=A;return}}while(0);c[2685]=c[g+20>>2];ea=A;return}function Mb(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0,aa=0,ba=0.0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0;L=ea;ea=ea+64|0;if(!(c[b+12>>2]|0)){ea=L;return}N=(a[b+16>>0]|0)!=0;i=N?e:d;N=N?d:e;g=c[i+4>>2]|0;K=c[N+4>>2]|0;i=c[i+12>>2]|0;_=+f[i>>2];Z=+f[i+16>>2];Y=+f[i+32>>2];X=+f[i+4>>2];W=+f[i+20>>2];C=+f[i+36>>2];j=+f[i+8>>2];E=+f[i+24>>2];w=+f[i+40>>2];R=+f[i+48>>2];Q=+f[i+52>>2];P=+f[i+56>>2];$=c[N+12>>2]|0;V=+f[$>>2];U=+f[$+16>>2];D=+f[$+32>>2];T=+f[$+4>>2];S=+f[$+20>>2];F=+f[$+36>>2];t=+f[$+8>>2];p=+f[$+24>>2];n=+f[$+40>>2];O=-+f[$+48>>2];G=-+f[$+52>>2];H=-+f[$+56>>2];I=+f[i>>2];J=+f[i+16>>2];B=+f[i+32>>2];z=+f[i+4>>2];y=+f[i+20>>2];x=+f[i+36>>2];q=+f[i+8>>2];o=+f[i+24>>2];m=+f[i+40>>2];i=c[(c[g>>2]|0)+64>>2]|0;l=-+f[K+48>>2];k=-+f[K+52>>2];A=-+f[K+56>>2];f[L+48>>2]=(_*V+Z*U+Y*D)*l+(_*T+Z*S+Y*F)*k+(_*t+Z*p+Y*n)*A;f[L+48+4>>2]=(X*V+W*U+C*D)*l+(X*T+W*S+C*F)*k+(X*t+W*p+C*n)*A;f[L+48+8>>2]=(j*V+E*U+w*D)*l+(j*T+E*S+w*F)*k+(j*t+E*p+w*n)*A;f[L+48+12>>2]=0.0;Ma[i&127](L,g,L+48|0);A=+f[L>>2];w=+f[L+4>>2];E=+f[L+8>>2];j=+f[K+48>>2];k=+f[K+52>>2];l=+f[K+56>>2];C=l*(R*t+Q*p+P*n+(t*O+p*G+n*H)+((t*I+p*J+n*B)*A+(t*z+p*y+n*x)*w+(t*q+p*o+n*m)*E))+(j*(R*V+Q*U+P*D+(V*O+U*G+D*H)+((V*I+U*J+D*B)*A+(V*z+U*y+D*x)*w+(V*q+U*o+D*m)*E))+k*(R*T+Q*S+P*F+(T*O+S*G+F*H)+((T*I+S*J+F*B)*A+(T*z+S*y+F*x)*w+(T*q+S*o+F*m)*E)))-+f[K+64>>2];D=R*V+Q*U+P*D+(V*O+U*G+D*H)+((V*I+U*J+D*B)*A+(V*z+U*y+D*x)*w+(V*q+U*o+D*m)*E)-j*C;F=R*T+Q*S+P*F+(T*O+S*G+F*H)+((T*I+S*J+F*B)*A+(T*z+S*y+F*x)*w+(T*q+S*o+F*m)*E)-k*C;E=R*t+Q*p+P*n+(t*O+p*G+n*H)+((t*I+p*J+n*B)*A+(t*z+p*y+n*x)*w+(t*q+p*o+n*m)*E)-l*C;N=c[N+12>>2]|0;m=+f[N>>2];n=+f[N+4>>2];o=+f[N+8>>2];p=+f[N+16>>2];q=+f[N+20>>2];t=+f[N+24>>2];w=+f[N+32>>2];x=+f[N+36>>2];y=+f[N+40>>2];z=+f[N+48>>2];A=+f[N+52>>2];B=+f[N+56>>2];N=c[b+12>>2]|0;i=C<+f[N+752>>2];c[h+4>>2]=N;if(i){f[L+48>>2]=m*j+n*k+o*l;f[L+48+4>>2]=j*p+k*q+l*t;f[L+48+8>>2]=j*w+k*x+l*y;f[L+48+12>>2]=0.0;f[L+32>>2]=o*E+(m*D+n*F)+z;f[L+32+4>>2]=D*p+F*q+E*t+A;f[L+32+8>>2]=D*w+F*x+E*y+B;f[L+32+12>>2]=0.0;Na[c[(c[h>>2]|0)+16>>2]&15](h,L+48|0,L+32|0,C)}if((c[g+4>>2]|0)<7?(c[(c[h+4>>2]|0)+748>>2]|0)<(c[b+24>>2]|0):0){j=+f[K+56>>2];if(+r(+j)>.7071067690849304){l=+f[K+52>>2];_=1.0/+s(+(j*j+l*l));k=0.0;l=l*_;j=-(j*_)}else{_=+f[K+48>>2];k=+f[K+52>>2];j=1.0/+s(+(_*_+k*k));k=-(k*j);l=0.0;j=_*j}G=.019999999552965164/+ha[c[(c[g>>2]|0)+16>>2]&15](g);G=(G>.39269909262657166?.39269909262657166:G)*.5;H=+v(+G)/+s(+(k*k+j*j+l*l));J=k*H;I=j*H;H=l*H;G=+u(+G);g=c[b+20>>2]|0;if((g|0)>0){i=0;do{p=+f[K+48>>2];_=+f[K+52>>2];z=+f[K+56>>2];x=6.2831854820251465/+(g|0)*+(i|0)*.5;Z=+v(+x)/+s(+(p*p+_*_+z*z));x=+u(+x);y=H*-(_*Z)+(J*x+G*-(p*Z))-I*-(z*Z);t=J*-(z*Z)+(I*x+G*-(_*Z))-H*-(p*Z);ca=I*-(p*Z)+(H*x+G*-(z*Z))-J*-(_*Z);B=G*x-J*-(p*Z)-I*-(_*Z)-H*-(z*Z);ja=z*Z*t+(p*Z*B+x*y)-_*Z*ca;ia=p*Z*ca+(x*t+_*Z*B)-z*Z*y;ma=_*Z*y+(z*Z*B+x*ca)-p*Z*t;ca=x*B-p*Z*y-_*Z*t-z*Z*ca;N=(a[b+16>>0]|0)!=0;aa=N?e:d;N=N?d:e;g=c[aa+4>>2]|0;$=c[N+4>>2]|0;aa=c[aa+12>>2]|0;Z=+f[aa>>2];z=+f[aa+4>>2];t=+f[aa+8>>2];_=+f[aa+16>>2];y=+f[aa+20>>2];p=+f[aa+24>>2];B=+f[aa+32>>2];x=+f[aa+36>>2];n=+f[aa+40>>2];T=+f[aa+48>>2];U=+f[aa+52>>2];V=+f[aa+56>>2];aa=c[N+12>>2]|0;P=+f[aa>>2];Q=+f[aa+16>>2];C=+f[aa+32>>2];R=+f[aa+4>>2];S=+f[aa+20>>2];F=+f[aa+36>>2];q=+f[aa+8>>2];o=+f[aa+24>>2];m=+f[aa+40>>2];W=-+f[aa+48>>2];X=-+f[aa+52>>2];Y=-+f[aa+56>>2];ga=ja*(2.0/(ja*ja+ia*ia+ma*ma+ca*ca));l=ia*(2.0/(ja*ja+ia*ia+ma*ma+ca*ca));ba=ma*(2.0/(ja*ja+ia*ia+ma*ma+ca*ca));oa=t*(ja*ba-ca*l)+(z*(ja*l+ca*ba)+Z*(1.0-(ia*l+ma*ba)));la=t*(ia*ba+ca*ga)+(Z*(ja*l-ca*ba)+z*(1.0-(ja*ga+ma*ba)));j=Z*(ja*ba+ca*l)+z*(ia*ba-ca*ga)+t*(1.0-(ja*ga+ia*l));na=p*(ja*ba-ca*l)+(y*(ja*l+ca*ba)+_*(1.0-(ia*l+ma*ba)));ka=p*(ia*ba+ca*ga)+(_*(ja*l-ca*ba)+y*(1.0-(ja*ga+ma*ba)));w=_*(ja*ba+ca*l)+y*(ia*ba-ca*ga)+p*(1.0-(ja*ga+ia*l));pa=n*(ja*ba-ca*l)+(x*(ja*l+ca*ba)+B*(1.0-(ia*l+ma*ba)));ma=n*(ia*ba+ca*ga)+(B*(ja*l-ca*ba)+x*(1.0-(ja*ga+ma*ba)));l=B*(ja*ba+ca*l)+x*(ia*ba-ca*ga)+n*(1.0-(ja*ga+ia*l));ia=+f[aa>>2];ga=+f[aa+16>>2];ja=+f[aa+32>>2];ca=+f[aa+4>>2];ba=+f[aa+20>>2];da=+f[aa+36>>2];k=+f[aa+8>>2];E=+f[aa+24>>2];D=+f[aa+40>>2];aa=c[(c[g>>2]|0)+64>>2]|0;fa=-+f[$+48>>2];O=-+f[$+52>>2];A=-+f[$+56>>2];f[L+32>>2]=(ja*pa+(ia*oa+ga*na))*fa+(da*pa+(ca*oa+ba*na))*O+(D*pa+(k*oa+E*na))*A;f[L+32+4>>2]=(ja*ma+(ia*la+ga*ka))*fa+(da*ma+(ca*la+ba*ka))*O+(D*ma+(k*la+E*ka))*A;f[L+32+8>>2]=(ja*l+(ia*j+ga*w))*fa+(da*l+(ca*j+ba*w))*O+(D*l+(k*j+E*w))*A;f[L+32+12>>2]=0.0;Ma[aa&127](L+48|0,g,L+32|0);A=+f[L+48>>2];w=+f[L+48+4>>2];E=+f[L+48+8>>2];j=+f[$+48>>2];k=+f[$+52>>2];l=+f[$+56>>2];D=l*(T*q+U*o+V*m+(q*W+o*X+m*Y)+((Z*q+_*o+B*m)*A+(z*q+y*o+x*m)*w+(t*q+p*o+n*m)*E))+(j*(T*P+U*Q+V*C+(P*W+Q*X+C*Y)+((Z*P+_*Q+B*C)*A+(z*P+y*Q+x*C)*w+(t*P+p*Q+n*C)*E))+k*(T*R+U*S+V*F+(R*W+S*X+F*Y)+((Z*R+_*S+B*F)*A+(z*R+y*S+x*F)*w+(t*R+p*S+n*F)*E)))-+f[$+64>>2];C=T*P+U*Q+V*C+(P*W+Q*X+C*Y)+((Z*P+_*Q+B*C)*A+(z*P+y*Q+x*C)*w+(t*P+p*Q+n*C)*E)-j*D;F=T*R+U*S+V*F+(R*W+S*X+F*Y)+((Z*R+_*S+B*F)*A+(z*R+y*S+x*F)*w+(t*R+p*S+n*F)*E)-k*D;E=T*q+U*o+V*m+(q*W+o*X+m*Y)+((Z*q+_*o+B*m)*A+(z*q+y*o+x*m)*w+(t*q+p*o+n*m)*E)-l*D;N=c[N+12>>2]|0;m=+f[N>>2];n=+f[N+4>>2];o=+f[N+8>>2];p=+f[N+16>>2];q=+f[N+20>>2];t=+f[N+24>>2];w=+f[N+32>>2];x=+f[N+36>>2];y=+f[N+40>>2];z=+f[N+48>>2];A=+f[N+52>>2];B=+f[N+56>>2];N=c[b+12>>2]|0;$=D<+f[N+752>>2];c[h+4>>2]=N;if($){f[L+32>>2]=m*j+n*k+o*l;f[L+32+4>>2]=j*p+k*q+l*t;f[L+32+8>>2]=j*w+k*x+l*y;f[L+32+12>>2]=0.0;f[L+16>>2]=o*E+(m*C+n*F)+z;f[L+16+4>>2]=C*p+F*q+E*t+A;f[L+16+8>>2]=C*w+F*x+E*y+B;f[L+16+12>>2]=0.0;Na[c[(c[h>>2]|0)+16>>2]&15](h,L+32|0,L+16|0,D)}i=i+1|0;g=c[b+20>>2]|0}while((i|0)<(g|0))}}do if((a[b+8>>0]|0?c[(c[b+12>>2]|0)+748>>2]|0:0)?(M=c[h+4>>2]|0,c[M+748>>2]|0):0){g=c[M+740>>2]|0;i=c[(c[h+8>>2]|0)+8>>2]|0;if((g|0)==(i|0)){Hd(M,g+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(M,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,i+4|0);break}}while(0);ea=L;return}function Nb(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0,F=0,G=0;G=ea;ea=ea+784|0;c[G+168+8>>2]=0;c[G+168+12>>2]=1065353216;c[G+168+16>>2]=1065353216;c[G+168+20>>2]=1065353216;f[G+168+24>>2]=0.0;c[G+168>>2]=7884;c[G+168+4>>2]=8;f[G+168+28>>2]=0.0;f[G+168+44>>2]=0.0;E=c[e+4>>2]|0;F=c[e+12>>2]|0;y=c[E+4>>2]|0;if((y|0)<20){c[G+600>>2]=4752;c[G+600+168>>2]=0;f[G+600+172>>2]=0.0;c[G+600+164>>2]=c[g+4>>2];f[G+240+308>>2]=9.999999747378752e-05;a[G+240+332>>0]=0;c[G+224>>2]=6076;c[G+224+4>>2]=G+240;c[G+224+8>>2]=G+168;c[G+224+12>>2]=E;c[G+152>>2]=10452;c[G+152+4>>2]=G+240;c[G+152+8>>2]=G+168;c[G+152+12>>2]=E;E=(c[g+16>>2]&8|0)==0?G+224|0:G+152|0;if((xa[c[(c[E>>2]|0)+8>>2]&3](E,b,d,F,F,G+600|0)|0?(h=G+600+132|0,j=+f[h>>2],k=+f[G+600+136>>2],l=+f[G+600+140>>2],j*j+k*k+l*l>9.999999747378752e-05):0)?(i=+f[G+600+164>>2],i<+f[g+4>>2]):0){D=1.0/+s(+(j*j+k*k+l*l));f[h>>2]=j*D;f[G+600+136>>2]=k*D;f[G+600+140>>2]=l*D;c[G+120>>2]=c[e+8>>2];c[G+120+4>>2]=0;c[G+120+8>>2]=c[h>>2];c[G+120+8+4>>2]=c[h+4>>2];c[G+120+8+8>>2]=c[h+8>>2];c[G+120+8+12>>2]=c[h+12>>2];f[G+120+24>>2]=i;+ka[c[(c[g>>2]|0)+12>>2]&15](g,G+120|0,1)}ea=G;return}if((y+-21|0)>>>0>=9){if((y|0)!=31){ea=G;return}h=c[E+64>>2]|0;e=c[e+8>>2]|0;c[G+600>>2]=6872;c[G+600+4>>2]=e;c[G+600+8>>2]=E;c[G+600+12>>2]=F;c[G+600+16>>2]=b;c[G+600+20>>2]=d;c[G+600+24>>2]=g;if(!h){h=c[E+16>>2]|0;if((h|0)>0){b=0;do{Ve(G+600|0,b);b=b+1|0}while((b|0)<(h|0))}}else{C=+f[F+48>>2];n=+f[b+48>>2]-C;B=+f[F+52>>2];o=+f[b+52>>2]-B;z=+f[F+56>>2];p=+f[b+56>>2]-z;t=+f[F>>2];r=+f[F+16>>2];q=+f[F+32>>2];w=+f[F+4>>2];v=+f[F+20>>2];u=+f[F+36>>2];D=+f[F+8>>2];A=+f[F+24>>2];x=+f[F+40>>2];f[G+240>>2]=n*t+o*r+p*q;f[G+240+4>>2]=n*w+o*v+p*u;f[G+240+8>>2]=n*D+o*A+p*x;f[G+240+12>>2]=0.0;C=+f[d+48>>2]-C;B=+f[d+52>>2]-B;z=+f[d+56>>2]-z;f[G+224>>2]=q*z+(r*B+C*t);f[G+224+4>>2]=u*z+(v*B+C*w);f[G+224+8>>2]=x*z+(A*B+C*D);f[G+224+12>>2]=0.0;Dd(c[h>>2]|0,G+240|0,G+224|0,G+600|0)}ea=G;return}i=+f[F>>2];q=+f[F+16>>2];r=+f[F+32>>2];k=+f[F+4>>2];u=+f[F+20>>2];v=+f[F+36>>2];j=+f[F+8>>2];z=+f[F+24>>2];A=+f[F+40>>2];B=-+f[F+48>>2];C=-+f[F+52>>2];D=-+f[F+56>>2];o=+f[b+48>>2];p=+f[b+52>>2];l=+f[b+56>>2];f[G+152>>2]=i*B+q*C+r*D+(i*o+q*p+r*l);f[G+152+4>>2]=k*B+u*C+v*D+(k*o+u*p+v*l);f[G+152+8>>2]=j*B+z*C+A*D+(j*o+z*p+A*l);f[G+152+12>>2]=0.0;w=+f[d+48>>2];x=+f[d+52>>2];t=+f[d+56>>2];i=i*B+q*C+r*D+(i*w+q*x+r*t);k=k*B+u*C+v*D+(k*w+u*x+v*t);j=j*B+z*C+A*D+(j*w+z*x+A*t);f[G+120>>2]=i;f[G+120+4>>2]=k;f[G+120+8>>2]=j;f[G+120+12>>2]=0.0;switch(y|0){case 21:{h=c[e+8>>2]|0;e=c[g+16>>2]|0;c[G+4>>2]=c[G+152>>2];c[G+4+4>>2]=c[G+152+4>>2];c[G+4+8>>2]=c[G+152+8>>2];c[G+4+12>>2]=c[G+152+12>>2];c[G+20>>2]=c[G+120>>2];c[G+20+4>>2]=c[G+120+4>>2];c[G+20+8>>2]=c[G+120+8>>2];c[G+20+12>>2]=c[G+120+12>>2];c[G+36>>2]=e;f[G+40>>2]=1.0;c[G>>2]=6824;c[G+44>>2]=g;c[G+48>>2]=h;c[G+52>>2]=E;c[G+56>>2]=c[F>>2];c[G+56+4>>2]=c[F+4>>2];c[G+56+8>>2]=c[F+8>>2];c[G+56+12>>2]=c[F+12>>2];c[G+72>>2]=c[F+16>>2];c[G+72+4>>2]=c[F+16+4>>2];c[G+72+8>>2]=c[F+16+8>>2];c[G+72+12>>2]=c[F+16+12>>2];c[G+88>>2]=c[F+32>>2];c[G+88+4>>2]=c[F+32+4>>2];c[G+88+8>>2]=c[F+32+8>>2];c[G+88+12>>2]=c[F+32+12>>2];c[G+104>>2]=c[F+48>>2];c[G+104+4>>2]=c[F+48+4>>2];c[G+104+8>>2]=c[F+48+8>>2];c[G+104+12>>2]=c[F+48+12>>2];c[G+40>>2]=c[g+4>>2];h=c[E+48>>2]|0;c[G+224>>2]=8096;c[G+224+4>>2]=h;c[G+224+8>>2]=G;h=c[E+52>>2]|0;c[G+600>>2]=0;c[G+600+4>>2]=0;c[G+600+8>>2]=0;c[G+600+12>>2]=0;c[G+240>>2]=0;c[G+240+4>>2]=0;c[G+240+8>>2]=0;c[G+240+12>>2]=0;if(!(a[h+60>>0]|0))Ld(h,G+224|0,G+152|0,i,k,j,G+600|0,G+240|0);else pd(h,G+224|0,G+152|0,i,k,j,G+600|0,G+240|0,c[h+56>>2]|0);break}case 25:{e=c[e+8>>2]|0;y=c[g+16>>2]|0;c[G+600+4>>2]=c[G+152>>2];c[G+600+4+4>>2]=c[G+152+4>>2];c[G+600+4+8>>2]=c[G+152+8>>2];c[G+600+4+12>>2]=c[G+152+12>>2];c[G+600+20>>2]=c[G+120>>2];c[G+600+20+4>>2]=c[G+120+4>>2];c[G+600+20+8>>2]=c[G+120+8>>2];c[G+600+20+12>>2]=c[G+120+12>>2];c[G+600+36>>2]=y;f[G+600+40>>2]=1.0;c[G+600>>2]=6824;c[G+600+44>>2]=g;c[G+600+48>>2]=e;c[G+600+52>>2]=E;c[G+600+56>>2]=c[F>>2];c[G+600+56+4>>2]=c[F+4>>2];c[G+600+56+8>>2]=c[F+8>>2];c[G+600+56+12>>2]=c[F+12>>2];c[G+600+72>>2]=c[F+16>>2];c[G+600+72+4>>2]=c[F+16+4>>2];c[G+600+72+8>>2]=c[F+16+8>>2];c[G+600+72+12>>2]=c[F+16+12>>2];c[G+600+88>>2]=c[F+32>>2];c[G+600+88+4>>2]=c[F+32+4>>2];c[G+600+88+8>>2]=c[F+32+8>>2];c[G+600+88+12>>2]=c[F+32+12>>2];c[G+600+104>>2]=c[F+48>>2];c[G+600+104+4>>2]=c[F+48+4>>2];c[G+600+104+8>>2]=c[F+48+8>>2];c[G+600+104+12>>2]=c[F+48+12>>2];c[G+600+40>>2]=c[g+4>>2];Pa[c[(c[E>>2]|0)+144>>2]&127](E,G+600|0,G+152|0,G+120|0);break}default:{k=+f[F>>2];j=+f[F+4>>2];i=+f[F+8>>2];m=r*l+(q*p+o*k)+(r*D+(q*C+k*B));n=v*l+(u*p+o*j)+(v*D+(u*C+j*B));l=A*l+(z*p+o*i)+(A*D+(z*C+i*B));k=r*t+(q*x+w*k)+(r*D+(q*C+k*B));j=v*t+(u*x+w*j)+(v*D+(u*C+j*B));i=A*t+(z*x+w*i)+(A*D+(z*C+i*B));e=c[e+8>>2]|0;y=c[g+16>>2]|0;f[G+600+4>>2]=m;f[G+600+8>>2]=n;f[G+600+12>>2]=l;f[G+600+16>>2]=0.0;f[G+600+20>>2]=k;f[G+600+24>>2]=j;f[G+600+28>>2]=i;f[G+600+32>>2]=0.0;c[G+600+36>>2]=y;f[G+600+40>>2]=1.0;c[G+600>>2]=6848;c[G+600+44>>2]=g;c[G+600+48>>2]=e;c[G+600+52>>2]=E;c[G+600+56>>2]=c[F>>2];c[G+600+56+4>>2]=c[F+4>>2];c[G+600+56+8>>2]=c[F+8>>2];c[G+600+56+12>>2]=c[F+12>>2];c[G+600+72>>2]=c[F+16>>2];c[G+600+72+4>>2]=c[F+16+4>>2];c[G+600+72+8>>2]=c[F+16+8>>2];c[G+600+72+12>>2]=c[F+16+12>>2];c[G+600+88>>2]=c[F+32>>2];c[G+600+88+4>>2]=c[F+32+4>>2];c[G+600+88+8>>2]=c[F+32+8>>2];c[G+600+88+12>>2]=c[F+32+12>>2];c[G+600+104>>2]=c[F+48>>2];c[G+600+104+4>>2]=c[F+48+4>>2];c[G+600+104+8>>2]=c[F+48+8>>2];c[G+600+104+12>>2]=c[F+48+12>>2];c[G+600+40>>2]=c[g+4>>2];f[G+240>>2]=m;f[G+240+4>>2]=n;f[G+240+8>>2]=l;f[G+240+12>>2]=0.0;if(k>2]=k;if(j>2]=j;if(i>2]=i;f[G+224>>2]=m;f[G+224+4>>2]=n;f[G+224+8>>2]=l;f[G+224+12>>2]=0.0;if(m>2]=k;if(n>2]=j;if(l>2]=i;Pa[c[(c[E>>2]|0)+64>>2]&127](E,G+600|0,G+240|0,G+224|0)}}ea=G;return}function Ob(b,d,e,g,h,i,j,k,l,m){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0;h=c[b+48>>2]|0;q=c[b+28>>2]|0;r=c[b+68>>2]|0;if(c[l+64>>2]&1|0){if((h|0)>0){i=c[b+136>>2]|0;m=c[b+192>>2]|0;p=0;do{o=i+(p<<2)|0;g=c[o>>2]|0;p=p+1|0;m=(z(m,1664525)|0)+1013904223|0;if(p>>>0<65537){e=(16?m>>>16:m)^m;if(p>>>0<257){e=(8?e>>>8:e)^e;if(p>>>0<17){e=(4?e>>>4:e)^e;u=(2?e>>>2:e)^e;e=p>>>0<5?(p>>>0<3?(1?u>>>1:u):0)^u:e}}}else e=m;u=i+(((e>>>0)%(p>>>0)|0)<<2)|0;c[o>>2]=c[u>>2];c[u>>2]=g}while((p|0)!=(h|0));c[b+192>>2]=m}if((c[l+20>>2]|0)>(d|0)){if((q|0)>0){g=c[b+116>>2]|0;i=c[b+192>>2]|0;o=0;do{m=g+(o<<2)|0;h=c[m>>2]|0;o=o+1|0;i=(z(i,1664525)|0)+1013904223|0;if(o>>>0<65537){e=(16?i>>>16:i)^i;if(o>>>0<257){e=(8?e>>>8:e)^e;if(o>>>0<17){e=(4?e>>>4:e)^e;u=(2?e>>>2:e)^e;e=o>>>0<5?(o>>>0<3?(1?u>>>1:u):0)^u:e}}}else e=i;u=g+(((e>>>0)%(o>>>0)|0)<<2)|0;c[m>>2]=c[u>>2];c[u>>2]=h}while((o|0)!=(q|0));c[b+192>>2]=i}if((r|0)>0){g=c[b+156>>2]|0;i=c[b+192>>2]|0;o=0;do{m=g+(o<<2)|0;h=c[m>>2]|0;o=o+1|0;i=(z(i,1664525)|0)+1013904223|0;if(o>>>0<65537){e=(16?i>>>16:i)^i;if(o>>>0<257){e=(8?e>>>8:e)^e;if(o>>>0<17){e=(4?e>>>4:e)^e;u=(2?e>>>2:e)^e;e=o>>>0<5?(o>>>0<3?(1?u>>>1:u):0)^u:e}}}else e=i;u=g+(((e>>>0)%(o>>>0)|0)<<2)|0;c[m>>2]=c[u>>2];c[u>>2]=h}while((o|0)!=(r|0));c[b+192>>2]=i}}}e=c[b+48>>2]|0;if(!(c[l+64>>2]&256)){if((e|0)>0){i=0;do{g=c[(c[b+136>>2]|0)+(i<<2)>>2]|0;h=c[b+56>>2]|0;if((c[h+(g*152|0)+136>>2]|0)>(d|0)){e=c[b+16>>2]|0;Ff(e+((c[h+(g*152|0)+144>>2]|0)*244|0)|0,e+((c[h+(g*152|0)+148>>2]|0)*244|0)|0,h+(g*152|0)|0);e=c[b+48>>2]|0}i=i+1|0}while((i|0)<(e|0))}if((c[l+20>>2]|0)<=(d|0))return 0.0;if((k|0)>0){h=0;do{g=j+(h<<2)|0;e=c[g>>2]|0;if(a[e+20>>0]|0){s=Kc(b,c[e+28>>2]|0,+f[l+12>>2])|0;u=Kc(b,c[(c[g>>2]|0)+32>>2]|0,+f[l+12>>2])|0;t=c[b+16>>2]|0;d=c[g>>2]|0;Na[c[(c[d>>2]|0)+24>>2]&15](d,t+(s*244|0)|0,t+(u*244|0)|0,+f[l+12>>2])}h=h+1|0}while((h|0)!=(k|0))}e=c[b+28>>2]|0;if((e|0)>0){g=0;do{u=c[(c[b+116>>2]|0)+(g<<2)>>2]|0;l=c[b+36>>2]|0;k=c[b+16>>2]|0;Qf(k+((c[l+(u*152|0)+144>>2]|0)*244|0)|0,k+((c[l+(u*152|0)+148>>2]|0)*244|0)|0,l+(u*152|0)|0);g=g+1|0}while((g|0)!=(e|0))}e=c[b+68>>2]|0;if((e|0)>0){i=0;do{g=c[(c[b+156>>2]|0)+(i<<2)>>2]|0;h=c[b+76>>2]|0;n=+f[(c[b+36>>2]|0)+((c[h+(g*152|0)+140>>2]|0)*152|0)+100>>2];if(n>0.0){n=n*+f[h+(g*152|0)+104>>2];f[h+(g*152|0)+120>>2]=-n;f[h+(g*152|0)+124>>2]=n;u=c[b+16>>2]|0;Ff(u+((c[h+(g*152|0)+144>>2]|0)*244|0)|0,u+((c[h+(g*152|0)+148>>2]|0)*244|0)|0,h+(g*152|0)|0)}i=i+1|0}while((i|0)!=(e|0))}e=c[b+88>>2]|0;if((e|0)<=0)return 0.0;h=0;do{g=c[b+96>>2]|0;n=+f[(c[b+36>>2]|0)+((c[g+(h*152|0)+140>>2]|0)*152|0)+100>>2];if(n>0.0){v=+f[g+(h*152|0)+104>>2];n=n*v>v?v:n*v;f[g+(h*152|0)+120>>2]=-n;f[g+(h*152|0)+124>>2]=n;u=c[b+16>>2]|0;Ff(u+((c[g+(h*152|0)+144>>2]|0)*244|0)|0,u+((c[g+(h*152|0)+148>>2]|0)*244|0)|0,g+(h*152|0)|0)}h=h+1|0}while((h|0)!=(e|0));return 0.0}if((e|0)>0){i=0;do{g=c[(c[b+136>>2]|0)+(i<<2)>>2]|0;h=c[b+56>>2]|0;if((c[h+(g*152|0)+136>>2]|0)>(d|0)){e=c[b+16>>2]|0;Ff(e+((c[h+(g*152|0)+144>>2]|0)*244|0)|0,e+((c[h+(g*152|0)+148>>2]|0)*244|0)|0,h+(g*152|0)|0);e=c[b+48>>2]|0}i=i+1|0}while((i|0)<(e|0))}if((c[l+20>>2]|0)<=(d|0))return 0.0;if((k|0)>0){h=0;do{g=j+(h<<2)|0;e=c[g>>2]|0;if(a[e+20>>0]|0){r=Kc(b,c[e+28>>2]|0,+f[l+12>>2])|0;u=Kc(b,c[(c[g>>2]|0)+32>>2]|0,+f[l+12>>2])|0;d=c[b+16>>2]|0;q=c[g>>2]|0;Na[c[(c[q>>2]|0)+24>>2]&15](q,d+(r*244|0)|0,d+(u*244|0)|0,+f[l+12>>2])}h=h+1|0}while((h|0)!=(k|0))}e=c[l+64>>2]|0;o=c[b+28>>2]|0;if(e&512|0){e=((4?e>>>4:e)&1)+1|0;if((o|0)<=0)return 0.0;i=0;do{m=c[(c[b+116>>2]|0)+(i<<2)>>2]|0;g=c[b+36>>2]|0;h=c[b+16>>2]|0;Qf(h+((c[g+(m*152|0)+144>>2]|0)*244|0)|0,h+((c[g+(m*152|0)+148>>2]|0)*244|0)|0,g+(m*152|0)|0);n=+f[g+(m*152|0)+100>>2];m=z(i,e)|0;g=c[(c[b+156>>2]|0)+(m<<2)>>2]|0;h=c[b+76>>2]|0;if(n>0.0){v=n*+f[h+(g*152|0)+104>>2];f[h+(g*152|0)+120>>2]=-v;f[h+(g*152|0)+124>>2]=v;u=c[b+16>>2]|0;Ff(u+((c[h+(g*152|0)+144>>2]|0)*244|0)|0,u+((c[h+(g*152|0)+148>>2]|0)*244|0)|0,h+(g*152|0)|0)}if(c[l+64>>2]&16|0?(s=c[(c[b+156>>2]|0)+(m+1<<2)>>2]|0,t=c[b+76>>2]|0,n>0.0):0){v=n*+f[t+(s*152|0)+104>>2];f[t+(s*152|0)+120>>2]=-v;f[t+(s*152|0)+124>>2]=v;u=c[b+16>>2]|0;Ff(u+((c[t+(s*152|0)+144>>2]|0)*244|0)|0,u+((c[t+(s*152|0)+148>>2]|0)*244|0)|0,t+(s*152|0)|0)}i=i+1|0}while((i|0)!=(o|0));return 0.0}if((o|0)>0){e=0;do{u=c[(c[b+116>>2]|0)+(e<<2)>>2]|0;l=c[b+36>>2]|0;k=c[b+16>>2]|0;Qf(k+((c[l+(u*152|0)+144>>2]|0)*244|0)|0,k+((c[l+(u*152|0)+148>>2]|0)*244|0)|0,l+(u*152|0)|0);e=e+1|0}while((e|0)!=(o|0))}e=c[b+68>>2]|0;if((e|0)>0){i=0;do{g=c[(c[b+156>>2]|0)+(i<<2)>>2]|0;h=c[b+76>>2]|0;n=+f[(c[b+36>>2]|0)+((c[h+(g*152|0)+140>>2]|0)*152|0)+100>>2];if(n>0.0){v=n*+f[h+(g*152|0)+104>>2];f[h+(g*152|0)+120>>2]=-v;f[h+(g*152|0)+124>>2]=v;u=c[b+16>>2]|0;Ff(u+((c[h+(g*152|0)+144>>2]|0)*244|0)|0,u+((c[h+(g*152|0)+148>>2]|0)*244|0)|0,h+(g*152|0)|0)}i=i+1|0}while((i|0)!=(e|0))}e=c[b+88>>2]|0;if((e|0)<=0)return 0.0;h=0;do{g=c[b+96>>2]|0;n=+f[(c[b+36>>2]|0)+((c[g+(h*152|0)+140>>2]|0)*152|0)+100>>2];if(n>0.0){v=+f[g+(h*152|0)+104>>2];v=n*v>v?v:n*v;f[g+(h*152|0)+120>>2]=-v;f[g+(h*152|0)+124>>2]=v;u=c[b+16>>2]|0;Ff(u+((c[g+(h*152|0)+144>>2]|0)*244|0)|0,u+((c[g+(h*152|0)+148>>2]|0)*244|0)|0,g+(h*152|0)|0)}h=h+1|0}while((h|0)!=(e|0));return 0.0}function Pb(b,e,f,g,h,i){b=b|0;e=+e;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0;A=ea;ea=ea+560|0;c[A+536>>2]=0;y=A+540+12|0;Fv(e)|0;j=D()|0;if((j|0)<0){Fv(-e)|0;j=D()|0;w=1;v=22179;e=-e}else{w=(h&2049|0)!=0&1;v=(h&2048|0)==0?((h&1|0)==0?22180:22185):22182}do if(0==0&(j&2146435072|0)==2146435072){j=w+3|0;wm(b,32,f,j,h&-65537);AA(b,v,w);AA(b,e!=e|0.0!=0.0?(i&32|0?22206:22210):i&32|0?22198:22202,3);wm(b,32,f,j,h^8192)}else{o=+Cl(e,A+536|0)*2.0;if(o!=0.0)c[A+536>>2]=(c[A+536>>2]|0)+-1;if((i|32|0)==97){p=(i&32|0)==0?v:v+9|0;n=w|2;do if(!(g>>>0>11|(12-g|0)==0)){j=12-g|0;e=8.0;do{j=j+-1|0;e=e*16.0}while((j|0)!=0);if((a[p>>0]|0)==45){e=-(e+(-o-e));break}else{e=o+e-e;break}}else e=o;while(0);k=c[A+536>>2]|0;j=(k|0)<0?0-k|0:k;j=rl(j,((j|0)<0)<<31>>31,y)|0;if((j|0)==(y|0)){a[A+540+11>>0]=48;j=A+540+11|0}a[j+-1>>0]=((31?k>>31:k)&2)+43;m=j+-2|0;a[m>>0]=i+15;k=A;while(1){x=~~e;j=k+1|0;a[k>>0]=i&32|d[480+x>>0];e=(e-+(x|0))*16.0;if((j-A|0)==1?!((h&8|0)==0&((g|0)<1&e==0.0)):0){a[j>>0]=46;j=k+2|0}if(!(e!=0.0))break;else k=j}l=j;if((g|0)!=0?(-2-A+l|0)<(g|0):0){g=g+2+y-m|0;j=y;k=m}else{g=y-A-m+l|0;j=y;k=m}y=g+n|0;wm(b,32,f,y,h);AA(b,p,n);wm(b,48,f,y,h^65536);AA(b,A,l-A|0);j=j-k|0;wm(b,48,g-(l-A+j)|0,0,0);AA(b,m,j);wm(b,32,f,y,h^8192);j=y;break}k=(g|0)<0?6:g;if(o!=0.0){g=(c[A+536>>2]|0)+-28|0;c[A+536>>2]=g;e=o*268435456.0}else{g=c[A+536>>2]|0;e=o}x=(g|0)<0?A+32|0:A+32+288|0;l=x;do{t=~~e>>>0;c[l>>2]=t;l=l+4|0;e=(e-+(t>>>0))*1.0e9}while(e!=0.0);if((g|0)>0){j=x;do{n=(g|0)<29?g:29;g=l+-4|0;if(g>>>0>=j>>>0){m=0;do{r=pt(c[g>>2]|0,0,n|0)|0;r=Lv(r|0,D()|0,m|0,0)|0;s=D()|0;m=GB(r|0,s|0,1e9,0)|0;t=Yr(m|0,D()|0,-1e9,-1)|0;t=Lv(r|0,s|0,t|0,D()|0)|0;D()|0;c[g>>2]=t;g=g+-4|0}while(g>>>0>=j>>>0);if(m){j=j+-4|0;c[j>>2]=m}}a:do if(l>>>0>j>>>0)while(1){g=l+-4|0;if(c[g>>2]|0)break a;if(g>>>0>j>>>0)l=g;else{l=g;break}}while(0);g=(c[A+536>>2]|0)-n|0;c[A+536>>2]=g}while((g|0)>0)}else j=x;if((g|0)<0)do{p=0-g|0;p=(p|0)<9?p:9;if(j>>>0>>0){m=p?1e9>>>p:1e9;n=0;g=j;do{t=c[g>>2]|0;c[g>>2]=(p?t>>>p:t)+n;n=z(t&(1<>>0>>0);j=(c[j>>2]|0)==0?j+4|0:j;if(!n)g=l;else{c[l>>2]=n;g=l+4|0}}else{j=(c[j>>2]|0)==0?j+4|0:j;g=l}l=(i|32|0)==102?x:j;t=g-l|0;l=((2?t>>2:t)|0)>(((k+25|0)/9|0)+1|0)?l+(((k+25|0)/9|0)+1<<2)|0:g;g=(c[A+536>>2]|0)+p|0;c[A+536>>2]=g}while((g|0)<0);if(j>>>0>>0){g=x-j|0;g=(2?g>>2:g)*9|0;n=c[j>>2]|0;if(n>>>0<10)m=g;else{m=10;do{m=m*10|0;g=g+1|0}while(n>>>0>=m>>>0);m=g}}else m=0;n=k-((i|32|0)==102?0:m)+(((k|0)!=0&(i|32|0)==103)<<31>>31)|0;t=l-x|0;if((n|0)<(((2?t>>2:t)*9|0)+-9|0)){g=x+4+(((n+9216|0)/9|0)+-1024<<2)|0;n=n+9216+(z((n+9216|0)/9|0,-9)|0)|0;if((n|0)<8){p=10;while(1){p=p*10|0;if((n|0)<7)n=n+1|0;else break}}else p=10;q=c[g>>2]|0;n=(q>>>0)/(p>>>0)|0;s=z(n,p)|0;r=(g+4|0)==(l|0);if(!(r&(q-s|0)==0)){o=(n&1|0)==0?9007199254740992.0:9007199254740994.0;t=1?p>>>1:p;e=(q-s|0)>>>0>>0?.5:r&(q-s|0)==(t|0)?1.0:1.5;if(w){t=(a[v>>0]|0)==45;o=t?-o:o;e=t?-e:e}c[g>>2]=s;if(o+e!=o){t=s+p|0;c[g>>2]=t;if(t>>>0>999999999)while(1){m=g+-4|0;c[g>>2]=0;if(m>>>0>>0){j=j+-4|0;c[j>>2]=0}t=(c[m>>2]|0)+1|0;c[m>>2]=t;if(t>>>0>999999999)g=m;else{g=m;break}}m=x-j|0;m=(2?m>>2:m)*9|0;p=c[j>>2]|0;if(p>>>0>=10){n=10;do{n=n*10|0;m=m+1|0}while(p>>>0>=n>>>0)}}}s=g+4|0;t=j;l=l>>>0>s>>>0?s:l}else t=j;p=0-m|0;b:do if(l>>>0>t>>>0)while(1){j=l+-4|0;if(c[j>>2]|0){r=1;s=l;break b}if(j>>>0>t>>>0)l=j;else{r=0;s=j;break}}else{r=0;s=l}while(0);do if((i|32|0)==103){if((m|0)>-5?(k+(((k|0)!=0^1)&1)|0)>(m|0):0){k=k+(((k|0)!=0^1)&1)+-1-m|0;l=i+-1|0}else{k=k+(((k|0)!=0^1)&1)+-1|0;l=i+-2|0}if(!(h&8)){if(r?(u=c[s+-4>>2]|0,(u|0)!=0):0)if(!((u>>>0)%10|0)){g=10;j=0;do{g=g*10|0;j=j+1|0}while(!((u>>>0)%(g>>>0)|0|0))}else j=0;else j=9;g=s-x|0;g=((2?g>>2:g)*9|0)+-9|0;if((l|32|0)==102){i=g-j|0;i=(i|0)>0?i:0;k=(k|0)<(i|0)?k:i;break}else{i=g+m-j|0;i=(i|0)>0?i:0;k=(k|0)<(i|0)?k:i;break}}}else l=i;while(0);q=(k|0)!=0;g=q?1:(3?h>>>3:h)&1;n=(l|32|0)==102;if(n){p=0;j=(m|0)>0?m:0}else{j=(m|0)<0?p:m;j=rl(j,((j|0)<0)<<31>>31,y)|0;if((y-j|0)<2)do{j=j+-1|0;a[j>>0]=48}while((y-j|0)<2);a[j+-1>>0]=((31?m>>31:m)&2)+43;j=j+-2|0;a[j>>0]=l;p=j;j=y-j|0}j=w+1+k+g+j|0;wm(b,32,f,j,h);AA(b,v,w);wm(b,48,f,j,h^65536);if(n){m=t>>>0>x>>>0?x:t;l=m;do{g=rl(c[l>>2]|0,0,A+9|0)|0;if((l|0)==(m|0)){if((g|0)==(A+9|0)){a[A+8>>0]=48;g=A+8|0}}else if(g>>>0>A>>>0){hk(A|0,48,g-A|0)|0;do g=g+-1|0;while(g>>>0>A>>>0)}AA(b,g,A+9-g|0);l=l+4|0}while(l>>>0<=x>>>0);if(!((h&8|0)==0&(q^1)))AA(b,22393,1);if(l>>>0>>0&(k|0)>0)while(1){g=rl(c[l>>2]|0,0,A+9|0)|0;if(g>>>0>A>>>0){hk(A|0,48,g-A|0)|0;do g=g+-1|0;while(g>>>0>A>>>0)}AA(b,g,(k|0)<9?k:9);l=l+4|0;g=k+-9|0;if(!(l>>>0>>0&(k|0)>9)){k=g;break}else k=g}wm(b,48,k+9|0,9,0)}else{n=r?s:t+4|0;if(t>>>0>>0&(k|0)>-1){m=t;do{g=rl(c[m>>2]|0,0,A+9|0)|0;if((g|0)==(A+9|0)){a[A+8>>0]=48;g=A+8|0}do if((m|0)==(t|0)){l=g+1|0;AA(b,g,1);if((h&8|0)==0&(k|0)<1){g=l;break}AA(b,22393,1);g=l}else{if(g>>>0<=A>>>0)break;hk(A|0,48,g+(0-A)|0)|0;do g=g+-1|0;while(g>>>0>A>>>0)}while(0);x=A+9-g|0;AA(b,g,(k|0)>(x|0)?x:k);k=k-x|0;m=m+4|0}while(m>>>0>>0&(k|0)>-1)}wm(b,48,k+18|0,18,0);AA(b,p,y-p|0)}wm(b,32,f,j,h^8192)}while(0);ea=A;return ((j|0)<(f|0)?f:j)|0}function Qb(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,s=0,t=0.0;o=ea;ea=ea+80|0;i=c[b+28>>2]|0;d=c[g+64>>2]|0;if((d&4|0)!=0&(i|0)>0){e=c[b+36>>2]|0;h=c[b+76>>2]|0;if(!(d&16)){d=0;do{k=c[e+(d*152|0)+132>>2]|0;c[k+120>>2]=c[e+(d*152|0)+100>>2];c[k+124>>2]=c[h+((c[e+(d*152|0)+140>>2]|0)*152|0)+100>>2];d=d+1|0}while((d|0)!=(i|0))}else{d=0;do{k=c[e+(d*152|0)+132>>2]|0;c[k+120>>2]=c[e+(d*152|0)+100>>2];j=c[e+(d*152|0)+140>>2]|0;c[k+124>>2]=c[h+(j*152|0)+100>>2];c[k+128>>2]=c[h+((j+1|0)*152|0)+100>>2];d=d+1|0}while((d|0)!=(i|0))}}e=c[b+48>>2]|0;if((e|0)>0){k=0;do{h=c[b+56>>2]|0;i=c[h+(k*152|0)+132>>2]|0;j=c[i+44>>2]|0;d=h+(k*152|0)+100|0;if(j|0){n=+f[d>>2];s=c[i+28>>2]|0;m=1.0/+f[g+12>>2];l=n*+f[h+(k*152|0)+20>>2]*+f[s+352>>2]*m;p=n*+f[h+(k*152|0)+24>>2]*+f[s+356>>2]*m;f[j>>2]=+f[j>>2]+ +f[h+(k*152|0)+16>>2]*n*+f[s+348>>2]*m;f[j+4>>2]=l+ +f[j+4>>2];f[j+8>>2]=p+ +f[j+8>>2];p=+f[d>>2];q=c[i+32>>2]|0;l=1.0/+f[g+12>>2];m=p*+f[h+(k*152|0)+52>>2]*+f[q+352>>2]*l;n=p*+f[h+(k*152|0)+56>>2]*+f[q+356>>2]*l;f[j+32>>2]=+f[j+32>>2]+ +f[h+(k*152|0)+48>>2]*p*+f[q+348>>2]*l;f[j+36>>2]=m+ +f[j+36>>2];f[j+40>>2]=n+ +f[j+40>>2];n=+f[d>>2];m=1.0/+f[g+12>>2];l=+f[h+(k*152|0)+4>>2]*+f[s+548>>2]*n*m;p=n*(+f[h+(k*152|0)+8>>2]*+f[s+552>>2])*m;f[j+16>>2]=+f[j+16>>2]+ +f[h+(k*152|0)>>2]*+f[s+544>>2]*n*m;f[j+20>>2]=l+ +f[j+20>>2];f[j+24>>2]=p+ +f[j+24>>2];p=+f[d>>2];l=1.0/+f[g+12>>2];m=+f[h+(k*152|0)+36>>2]*+f[q+548>>2]*p*l;n=p*(+f[h+(k*152|0)+40>>2]*+f[q+552>>2])*l;f[j+48>>2]=+f[j+48>>2]+ +f[h+(k*152|0)+32>>2]*+f[q+544>>2]*p*l;f[j+52>>2]=m+ +f[j+52>>2];f[j+56>>2]=n+ +f[j+56>>2]}p=+f[d>>2];f[i+36>>2]=p;p=+r(+p);if(p>=+f[i+16>>2])a[i+20>>0]=0;k=k+1|0}while((k|0)!=(e|0))}d=c[b+8>>2]|0;if((d|0)>0){e=c[b+16>>2]|0;j=0;do{h=e+(j*244|0)|0;i=c[e+(j*244|0)+240>>2]|0;if(i){if(!(c[g+44>>2]|0)){h=e+(j*244|0)+176|0;m=+f[e+(j*244|0)+64>>2]+ +f[h>>2];f[h>>2]=m;h=e+(j*244|0)+180|0;n=+f[e+(j*244|0)+68>>2]+ +f[h>>2];f[h>>2]=n;h=e+(j*244|0)+184|0;l=+f[e+(j*244|0)+72>>2]+ +f[h>>2];f[h>>2]=l;h=e+(j*244|0)+192|0;f[h>>2]=+f[e+(j*244|0)+80>>2]+ +f[h>>2];h=e+(j*244|0)+196|0;f[h>>2]=+f[e+(j*244|0)+84>>2]+ +f[h>>2];h=e+(j*244|0)+200|0;f[h>>2]=+f[e+(j*244|0)+88>>2]+ +f[h>>2];h=e;d=i}else{l=+f[g+12>>2];m=+f[g+52>>2];d=e+(j*244|0)+176|0;f[d>>2]=+f[e+(j*244|0)+64>>2]+ +f[d>>2];d=e+(j*244|0)+180|0;f[d>>2]=+f[e+(j*244|0)+68>>2]+ +f[d>>2];d=e+(j*244|0)+184|0;f[d>>2]=+f[e+(j*244|0)+72>>2]+ +f[d>>2];d=e+(j*244|0)+192|0;f[d>>2]=+f[e+(j*244|0)+80>>2]+ +f[d>>2];d=e+(j*244|0)+196|0;f[d>>2]=+f[e+(j*244|0)+84>>2]+ +f[d>>2];d=e+(j*244|0)+200|0;f[d>>2]=+f[e+(j*244|0)+88>>2]+ +f[d>>2];n=+f[e+(j*244|0)+144>>2];d=e+(j*244|0)+148|0;if(((((!(n!=0.0)?!(+f[d>>2]!=0.0):0)?!(+f[e+(j*244|0)+152>>2]!=0.0):0)?!(+f[e+(j*244|0)+160>>2]!=0.0):0)?!(+f[e+(j*244|0)+164>>2]!=0.0):0)?!(+f[e+(j*244|0)+168>>2]!=0.0):0)d=i;else{t=+f[e+(j*244|0)+164>>2]*m;p=+f[e+(j*244|0)+168>>2]*m;f[o>>2]=+f[e+(j*244|0)+160>>2]*m;f[o+4>>2]=t;f[o+8>>2]=p;f[o+12>>2]=0.0;ag(h,n,+f[d>>2],+f[e+(j*244|0)+152>>2],o,l,o+16|0);c[h>>2]=c[o+16>>2];c[h+4>>2]=c[o+16+4>>2];c[h+8>>2]=c[o+16+8>>2];c[h+12>>2]=c[o+16+12>>2];d=e+(j*244|0)+16|0;c[d>>2]=c[o+16+16>>2];c[d+4>>2]=c[o+16+16+4>>2];c[d+8>>2]=c[o+16+16+8>>2];c[d+12>>2]=c[o+16+16+12>>2];d=e+(j*244|0)+32|0;c[d>>2]=c[o+16+32>>2];c[d+4>>2]=c[o+16+32+4>>2];c[d+8>>2]=c[o+16+32+8>>2];c[d+12>>2]=c[o+16+32+12>>2];d=e+(j*244|0)+48|0;c[d>>2]=c[o+16+48>>2];c[d+4>>2]=c[o+16+48+4>>2];c[d+8>>2]=c[o+16+48+8>>2];c[d+12>>2]=c[o+16+48+12>>2];d=c[b+16>>2]|0;e=d;d=c[d+(j*244|0)+240>>2]|0}h=e;m=+f[e+(j*244|0)+176>>2];n=+f[e+(j*244|0)+180>>2];l=+f[e+(j*244|0)+184>>2]}t=m+ +f[h+(j*244|0)+208>>2];p=n+ +f[h+(j*244|0)+212>>2];n=l+ +f[h+(j*244|0)+216>>2];q=d+260|0;c[q>>2]=(c[q>>2]|0)+1;f[d+312>>2]=t;f[d+316>>2]=p;f[d+320>>2]=n;f[d+324>>2]=0.0;q=c[b+16>>2]|0;s=c[q+(j*244|0)+240>>2]|0;n=+f[q+(j*244|0)+192>>2]+ +f[q+(j*244|0)+224>>2];p=+f[q+(j*244|0)+196>>2]+ +f[q+(j*244|0)+228>>2];t=+f[q+(j*244|0)+200>>2]+ +f[q+(j*244|0)+232>>2];c[s+260>>2]=(c[s+260>>2]|0)+1;f[s+328>>2]=n;f[s+332>>2]=p;f[s+336>>2]=t;f[s+340>>2]=0.0;if(c[g+44>>2]|0){q=c[b+16>>2]|0;s=c[q+(j*244|0)+240>>2]|0;k=q+(j*244|0)|0;c[s+260>>2]=(c[s+260>>2]|0)+1;c[s+4>>2]=c[k>>2];c[s+4+4>>2]=c[k+4>>2];c[s+4+8>>2]=c[k+8>>2];c[s+4+12>>2]=c[k+12>>2];k=q+(j*244|0)+16|0;c[s+20>>2]=c[k>>2];c[s+20+4>>2]=c[k+4>>2];c[s+20+8>>2]=c[k+8>>2];c[s+20+12>>2]=c[k+12>>2];k=q+(j*244|0)+32|0;c[s+36>>2]=c[k>>2];c[s+36+4>>2]=c[k+4>>2];c[s+36+8>>2]=c[k+8>>2];c[s+36+12>>2]=c[k+12>>2];q=q+(j*244|0)+48|0;c[s+52>>2]=c[q>>2];c[s+52+4>>2]=c[q+4>>2];c[s+52+8>>2]=c[q+8>>2];c[s+52+12>>2]=c[q+12>>2]}e=c[b+16>>2]|0;c[(c[e+(j*244|0)+240>>2]|0)+212>>2]=-1;d=c[b+8>>2]|0}j=j+1|0}while((j|0)<(d|0))}if((c[b+28>>2]|0)<0?(c[b+32>>2]|0)<0:0){d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+32>>2]=0}c[b+28>>2]=0;if((c[b+48>>2]|0)<0?(c[b+52>>2]|0)<0:0){d=c[b+56>>2]|0;if(d|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=0;c[b+52>>2]=0}c[b+48>>2]=0;if((c[b+68>>2]|0)<0?(c[b+72>>2]|0)<0:0){d=c[b+76>>2]|0;if(d|0){if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+76>>2]=0}a[b+80>>0]=1;c[b+76>>2]=0;c[b+72>>2]=0}c[b+68>>2]=0;if((c[b+88>>2]|0)<0?(c[b+92>>2]|0)<0:0){d=c[b+96>>2]|0;if(d|0){if(a[b+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+96>>2]=0}a[b+100>>0]=1;c[b+96>>2]=0;c[b+92>>2]=0}c[b+88>>2]=0;if((c[b+8>>2]|0)>=0){c[b+8>>2]=0;ea=o;return 0.0}if((c[b+12>>2]|0)>=0){c[b+8>>2]=0;ea=o;return 0.0}d=c[b+16>>2]|0;if(d|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=0;c[b+12>>2]=0;c[b+8>>2]=0;ea=o;return 0.0}function Rb(a){a=a|0;var b=0.0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0;j=c[a+372>>2]|0;a:do switch(c[j+32>>2]|0){case 1:{f[j+20>>2]=0.0;k=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=k;k=c[a+348+(k<<2)>>2]|0;c[j+4>>2]=k;c[j+32>>2]=2;Og(a,1.0,0.0,0.0,k);if(Rb(a)|0){k=1;return k|0}j=c[a+372>>2]|0;k=(c[j+32>>2]|0)+-1|0;c[j+32>>2]=k;k=c[j+(k<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=k;j=c[a+372>>2]|0;l=c[j+32>>2]|0;f[j+16+(l<<2)>>2]=0.0;c[j+(l<<2)>>2]=k;c[j+32>>2]=l+1;Og(a,-1.0,-0.0,-0.0,k);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,0.0,1.0,0.0,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-0.0,-1.0,-0.0,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,0.0,0.0,1.0,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-0.0,-0.0,-1.0,l);if(Rb(a)|0){l=1;return l|0}else{l=c[a+372>>2]|0;k=(c[l+32>>2]|0)+-1|0;c[l+32>>2]=k;k=c[l+(k<<2)>>2]|0;l=c[a+364>>2]|0;c[a+364>>2]=l+1;c[a+348+(l<<2)>>2]=k;break a}}case 2:{k=c[j+4>>2]|0;l=c[j>>2]|0;d=+f[k+16>>2]-+f[l+16>>2];g=+f[k+20>>2]-+f[l+20>>2];e=+f[k+24>>2]-+f[l+24>>2];b=g*0.0-e*0.0;do if((d*0.0-g)*(d*0.0-g)+(b*b+(e-d*0.0)*(e-d*0.0))>0.0){f[j+24>>2]=0.0;l=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=l;l=c[a+348+(l<<2)>>2]|0;c[j+8>>2]=l;c[j+32>>2]=3;Og(a,b,e-d*0.0,d*0.0-g,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-b,-(e-d*0.0),-(d*0.0-g),l);if(Rb(a)|0){l=1;return l|0}else{l=c[a+372>>2]|0;k=(c[l+32>>2]|0)+-1|0;c[l+32>>2]=k;k=c[l+(k<<2)>>2]|0;l=c[a+364>>2]|0;c[a+364>>2]=l+1;c[a+348+(l<<2)>>2]=k;break}}while(0);b=e*0.0-d*0.0;do if((d-g*0.0)*(d-g*0.0)+((g*0.0-e)*(g*0.0-e)+b*b)>0.0){k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;l=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=l;l=c[a+348+(l<<2)>>2]|0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,g*0.0-e,b,d-g*0.0,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-(g*0.0-e),-b,-(d-g*0.0),l);if(Rb(a)|0){l=1;return l|0}else{l=c[a+372>>2]|0;k=(c[l+32>>2]|0)+-1|0;c[l+32>>2]=k;k=c[l+(k<<2)>>2]|0;l=c[a+364>>2]|0;c[a+364>>2]=l+1;c[a+348+(l<<2)>>2]=k;break}}while(0);b=d*0.0-g*0.0;if(b*b+((g-e*0.0)*(g-e*0.0)+(e*0.0-d)*(e*0.0-d))>0.0){k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;l=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=l;l=c[a+348+(l<<2)>>2]|0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,g-e*0.0,e*0.0-d,b,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-(g-e*0.0),-(e*0.0-d),-b,l);if(Rb(a)|0){l=1;return l|0}else{l=c[a+372>>2]|0;k=(c[l+32>>2]|0)+-1|0;c[l+32>>2]=k;k=c[l+(k<<2)>>2]|0;l=c[a+364>>2]|0;c[a+364>>2]=l+1;c[a+348+(l<<2)>>2]=k;break a}}break}case 3:{l=c[j+4>>2]|0;k=c[j>>2]|0;b=+f[k+16>>2];d=+f[l+16>>2]-b;h=+f[k+20>>2];i=+f[l+20>>2]-h;e=+f[k+24>>2];g=+f[l+24>>2]-e;l=c[j+8>>2]|0;b=+f[l+16>>2]-b;h=+f[l+20>>2]-h;e=+f[l+24>>2]-e;if((d*h-i*b)*(d*h-i*b)+((i*e-g*h)*(i*e-g*h)+(g*b-d*e)*(g*b-d*e))>0.0){f[j+28>>2]=0.0;l=(c[a+364>>2]|0)+-1|0;c[a+364>>2]=l;l=c[a+348+(l<<2)>>2]|0;c[j+12>>2]=l;c[j+32>>2]=4;Og(a,i*e-g*h,g*b-d*e,d*h-i*b,l);if(Rb(a)|0){l=1;return l|0}k=c[a+372>>2]|0;l=(c[k+32>>2]|0)+-1|0;c[k+32>>2]=l;l=c[k+(l<<2)>>2]|0;c[a+348+(c[a+364>>2]<<2)>>2]=l;k=c[a+372>>2]|0;j=c[k+32>>2]|0;f[k+16+(j<<2)>>2]=0.0;c[k+(j<<2)>>2]=l;c[k+32>>2]=j+1;Og(a,-(i*e-g*h),-(g*b-d*e),-(d*h-i*b),l);if(Rb(a)|0){l=1;return l|0}else{l=c[a+372>>2]|0;k=(c[l+32>>2]|0)+-1|0;c[l+32>>2]=k;k=c[l+(k<<2)>>2]|0;l=c[a+364>>2]|0;c[a+364>>2]=l+1;c[a+348+(l<<2)>>2]=k;break a}}break}case 4:{l=c[j>>2]|0;k=c[j+12>>2]|0;i=+f[k+16>>2];o=+f[l+16>>2]-i;m=+f[k+20>>2];b=+f[l+20>>2]-m;e=+f[k+24>>2];g=+f[l+24>>2]-e;l=c[j+4>>2]|0;d=+f[l+16>>2]-i;h=+f[l+20>>2]-m;n=+f[l+24>>2]-e;l=c[j+8>>2]|0;i=+f[l+16>>2]-i;m=+f[l+20>>2]-m;e=+f[l+24>>2]-e;if(!((0.0!=0.0?1:o*h*e+(b*n*i+g*d*m-o*n*m-b*d*e)-g*h*i!=o*h*e+(b*n*i+g*d*m-o*n*m-b*d*e)-g*h*i)|o*h*e+(b*n*i+g*d*m-o*n*m-b*d*e)-g*h*i==0.0)){l=1;return l|0}break}default:{}}while(0);l=0;return l|0}function Sb(d,e,f,h,i){d=d|0;e=e|0;f=f|0;h=h|0;i=i|0;var 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;w=ea;ea=ea+64|0;c[w+56>>2]=e;v=w+40|0;e=0;j=0;m=0;a:while(1){do{if((e|0)>-1)e=(j|0)>(2147483647-e|0)?-1:j+e|0;r=c[w+56>>2]|0;j=a[r>>0]|0;if(!(j<<24>>24)){u=89;break a}k=r;b:while(1){switch(j<<24>>24){case 37:{u=8;break b}case 0:{j=k;break b}default:{}}t=k+1|0;c[w+56>>2]=t;j=a[t>>0]|0;k=t}c:do if((u|0)==8){u=0;l=k;j=k;do{if((a[l+1>>0]|0)!=37)break c;j=j+1|0;l=l+2|0;c[w+56>>2]=l}while((a[l>>0]|0)==37)}while(0);j=j-r|0;if(d|0)AA(d,r,j)}while((j|0)!=0);l=c[w+56>>2]|0;j=a[l+1>>0]|0;if(!(VI(j)|0)){k=1;q=-1;o=m}else{o=(a[l+2>>0]|0)==36;k=o?3:1;q=o?j+-48|0:-1;o=o?1:m}k=l+k|0;c[w+56>>2]=k;j=a[k>>0]|0;if(((j<<24>>24)+-32|0)>>>0>31|(1<<(j<<24>>24)+-32&75913|0)==0)n=0;else{l=0;m=(j<<24>>24)+-32|0;do{l=1<>2]=k;j=a[k>>0]|0;m=(j<<24>>24)+-32|0}while(!(m>>>0>31|(1<>24==42){l=k+1|0;j=a[l>>0]|0;if((VI(j)|0)!=0?(a[k+2>>0]|0)==36:0){c[i+(j+-48<<2)>>2]=10;m=1;j=k+3|0;k=c[h+((a[l>>0]|0)+-48<<3)>>2]|0}else{if(o|0){e=-1;break}if(d|0){m=(c[f>>2]|0)+(4-1)&~(4-1);k=c[m>>2]|0;c[f>>2]=m+4;m=0;j=l}else{m=0;j=l;k=0}}c[w+56>>2]=j;s=(k|0)<0;l=j;n=s?n|8192:n;t=m;s=s?0-k|0:k}else{j=zo(w+56|0)|0;if((j|0)<0){e=-1;break}l=c[w+56>>2]|0;t=o;s=j}do if((a[l>>0]|0)==46){j=l+1|0;if((a[j>>0]|0)!=42){c[w+56>>2]=j;m=zo(w+56|0)|0;j=c[w+56>>2]|0;break}j=l+2|0;k=a[j>>0]|0;if(VI(k)|0?(a[l+3>>0]|0)==36:0){c[i+(k+-48<<2)>>2]=10;m=c[h+((a[j>>0]|0)+-48<<3)>>2]|0;j=l+4|0;c[w+56>>2]=j;break}if(t|0){e=-1;break a}if(d|0){p=(c[f>>2]|0)+(4-1)&~(4-1);k=c[p>>2]|0;c[f>>2]=p+4}else k=0;c[w+56>>2]=j;m=k}else{j=l;m=-1}while(0);p=0;while(1){if(((a[j>>0]|0)+-65|0)>>>0>57){e=-1;break a}k=j+1|0;c[w+56>>2]=k;l=a[(a[j>>0]|0)+-65+(16+(p*58|0))>>0]|0;if(((l&255)+-1|0)>>>0<8){j=k;p=l&255}else break}if(!(l<<24>>24)){e=-1;break}k=(q|0)>-1;do if(l<<24>>24==19)if(k){e=-1;break a}else u=50;else{if(k){c[i+(q<<2)>>2]=l&255;q=h+(q<<3)|0;u=c[q+4>>2]|0;c[w+40>>2]=c[q>>2];c[w+40+4>>2]=u;u=50;break}if(!d){e=0;break a}gg(w+40|0,l&255,f);u=51}while(0);if((u|0)==50){u=0;if(d|0)u=51;else j=0}d:do if((u|0)==51){u=0;l=a[j>>0]|0;l=(p|0)!=0&(l&15|0)==3?l&-33:l;j=n&-65537;o=(n&8192|0)==0?n:j;e:do switch(l|0){case 110:switch((p&255)<<24>>24){case 0:{c[c[w+40>>2]>>2]=e;j=0;break d}case 1:{c[c[w+40>>2]>>2]=e;j=0;break d}case 2:{j=c[w+40>>2]|0;c[j>>2]=e;c[j+4>>2]=((e|0)<0)<<31>>31;j=0;break d}case 3:{b[c[w+40>>2]>>1]=e;j=0;break d}case 4:{a[c[w+40>>2]>>0]=e;j=0;break d}case 6:{c[c[w+40>>2]>>2]=e;j=0;break d}case 7:{j=c[w+40>>2]|0;c[j>>2]=e;c[j+4>>2]=((e|0)<0)<<31>>31;j=0;break d}default:{j=0;break d}}case 112:{j=o|8;k=m>>>0>8?m:8;n=120;u=63;break}case 88:case 120:{j=o;k=m;n=l;u=63;break}case 111:{q=c[w+40>>2]|0;r=c[w+40+4>>2]|0;l=zq(q,r,w+40|0)|0;p=l;j=o;m=(o&8|0)==0|(m|0)>(v-l|0)?m:v-l+1|0;l=0;k=22162;u=69;break}case 105:case 100:{j=c[w+40>>2]|0;k=c[w+40+4>>2]|0;if((k|0)<0){j=tv(0,0,j|0,k|0)|0;k=D()|0;c[w+40>>2]=j;c[w+40+4>>2]=k;l=1;n=22162;u=68;break e}else{l=(o&2049|0)!=0&1;n=(o&2048|0)==0?((o&1|0)==0?22162:22164):22163;u=68;break e}}case 117:{j=c[w+40>>2]|0;k=c[w+40+4>>2]|0;l=0;n=22162;u=68;break}case 99:{a[w+39>>0]=c[w+40>>2];p=w+39|0;o=j;n=1;l=0;k=22162;j=v;break}case 115:{q=c[w+40>>2]|0;q=(q|0)==0?22172:q;r=Si(q,m)|0;p=q;o=j;n=(r|0)==0?m:r-q|0;l=0;k=22162;j=(r|0)==0?q+m|0:r;break}case 67:{c[w+48>>2]=c[w+40>>2];c[w+48+4>>2]=0;c[w+40>>2]=w+48;l=w+48|0;m=-1;u=76;break}case 83:if(!m){wm(d,32,s,0,o);j=0;u=86;break e}else{l=c[w+40>>2]|0;u=76;break e}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{j=Pb(d,+g[w+40>>3],s,m,o,l)|0;break d}default:{p=r;n=m;l=0;k=22162;j=v}}while(0);f:do if((u|0)==63){q=c[w+40>>2]|0;r=c[w+40+4>>2]|0;p=yp(q,r,w+40|0,n&32)|0;o=(j&8|0)==0|(q|0)==0&(r|0)==0;m=k;l=o?0:2;k=o?22162:22162+(4?n>>>4:n)|0;u=69}else if((u|0)==68){q=j;r=k;p=rl(j,k,w+40|0)|0;j=o;k=n;u=69}else if((u|0)==76){u=0;j=0;n=l;while(1){k=c[n>>2]|0;if(!k)break;k=XA(w+60|0,k)|0;if((k|0)<0|k>>>0>(m-j|0)>>>0){u=80;break}j=k+j|0;if(m>>>0>j>>>0)n=n+4|0;else break}if((u|0)==80){u=0;if((k|0)<0){e=-1;break a}}wm(d,32,s,j,o);if(!j){j=0;u=86}else{m=0;while(1){k=c[l>>2]|0;if(!k){u=86;break f}k=XA(w+60|0,k)|0;m=k+m|0;if((m|0)>(j|0)){u=86;break f}AA(d,w+60|0,k);if(m>>>0>=j>>>0){u=86;break}else l=l+4|0}}}while(0);if((u|0)==69){u=0;n=(q|0)!=0|(r|0)!=0;r=(m|0)!=0|n;n=v-p+((n^1)&1)|0;p=r?p:w+40|0;o=(m|0)>-1?j&-65537:j;n=r?((m|0)>(n|0)?m:n):0;j=v}else if((u|0)==86){u=0;wm(d,32,s,j,o^8192);j=(s|0)>(j|0)?s:j;break}q=j-p|0;n=(n|0)<(q|0)?q:n;r=n+l|0;j=(s|0)<(r|0)?r:s;wm(d,32,j,r,o);AA(d,k,l);wm(d,48,j,r,o^65536);wm(d,48,n,q,0);AA(d,p,q);wm(d,32,j,r,o^8192)}while(0);m=t}g:do if((u|0)==89)if(!d)if(!m)e=0;else{e=1;while(1){j=c[i+(e<<2)>>2]|0;if(!j)break;gg(h+(e<<3)|0,j,f);e=e+1|0;if(e>>>0>=10){e=1;break g}}j=0;while(1){e=e+1|0;if(j|0){e=-1;break g}if(e>>>0>=10){e=1;break g}j=c[i+(e<<2)>>2]|0}}while(0);ea=w;return e|0}function Tb(a,b){a=a|0;b=+b;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0,s=0.0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0;n=ea;ea=ea+48|0;d=c[a+24>>2]|0;if((d|0)<=0){ea=n;return}m=0;a:while(1){l=c[(c[a+32>>2]|0)+(m<<2)>>2]|0;switch(c[l+216>>2]|0){case 2:case 5:break;default:{Qc(l,0);d=c[l+732>>2]|0;if((d|0)>0){e=0;do{k=c[l+740>>2]|0;i=c[k+(e*52|0)+12>>2]|0;j=c[k+(e*52|0)+8>>2]|0;x=+f[i+24>>2]-+f[j+24>>2];w=+f[i+28>>2]-+f[j+28>>2];b=+f[i+32>>2]-+f[j+32>>2];f[k+(e*52|0)+36>>2]=x;f[k+(e*52|0)+40>>2]=w;f[k+(e*52|0)+44>>2]=b;f[k+(e*52|0)+48>>2]=0.0;f[k+(e*52|0)+32>>2]=1.0/(+f[k+(e*52|0)+24>>2]*(x*x+w*w+b*b));e=e+1|0}while((e|0)!=(d|0))}d=c[l+792>>2]|0;if((d|0)>0){b=+f[l+452>>2];g=0;do{k=c[l+800>>2]|0;e=k+(g*96|0)+20|0;i=c[e>>2]|0;A=+f[k+(g*96|0)+4>>2];z=+f[k+(g*96|0)+8>>2];x=+f[k+(g*96|0)+12>>2];y=+f[i+4>>2]*A+ +f[i+8>>2]*z+ +f[i+12>>2]*x;w=A*+f[i+20>>2]+z*+f[i+24>>2]+x*+f[i+28>>2];x=A*+f[i+36>>2]+z*+f[i+40>>2]+x*+f[i+44>>2];j=k+(g*96|0)|0;Me(n,b,+f[(c[j>>2]|0)+88>>2],+f[i+344>>2],i+264|0,y,w,x);i=k+(g*96|0)+28|0;c[i>>2]=c[n>>2];c[i+4>>2]=c[n+4>>2];c[i+8>>2]=c[n+8>>2];c[i+12>>2]=c[n+12>>2];i=k+(g*96|0)+44|0;c[i>>2]=c[n+16>>2];c[i+4>>2]=c[n+16+4>>2];c[i+8>>2]=c[n+16+8>>2];c[i+12>>2]=c[n+16+12>>2];i=k+(g*96|0)+60|0;c[i>>2]=c[n+32>>2];c[i+4>>2]=c[n+32+4>>2];c[i+8>>2]=c[n+32+8>>2];c[i+12>>2]=c[n+32+12>>2];f[k+(g*96|0)+76>>2]=y;f[k+(g*96|0)+80>>2]=w;f[k+(g*96|0)+84>>2]=x;f[k+(g*96|0)+88>>2]=0.0;b=+f[l+452>>2];f[k+(g*96|0)+92>>2]=b*+f[(c[j>>2]|0)+88>>2];e=c[e>>2]|0;if(!(c[e+204>>2]&3)){if((c[e+216>>2]&-2|0)!=4)c[e+216>>2]=1;f[e+220>>2]=0.0}g=g+1|0}while((g|0)!=(d|0))}d=c[l+372>>2]|0;if((d|0)>0){e=c[l+396>>2]|0;g=0;do{if((e|0)>0){d=0;do{Da[((c[(c[l+404>>2]|0)+(d<<2)>>2]|0)==0?23:0)&31](l,1.0);d=d+1|0;e=c[l+396>>2]|0}while((d|0)<(e|0));d=c[l+372>>2]|0}g=g+1|0}while((g|0)<(d|0));d=c[l+712>>2]|0;if((d|0)>0){e=0;do{k=c[l+720>>2]|0;y=+f[l+452>>2];z=y*+f[k+(e*104|0)+44>>2]+ +f[k+(e*104|0)+28>>2];A=y*+f[k+(e*104|0)+48>>2]+ +f[k+(e*104|0)+32>>2];f[k+(e*104|0)+8>>2]=+f[k+(e*104|0)+40>>2]*y+ +f[k+(e*104|0)+24>>2];f[k+(e*104|0)+12>>2]=z;f[k+(e*104|0)+16>>2]=A;f[k+(e*104|0)+20>>2]=0.0;e=e+1|0}while((e|0)!=(d|0))}}d=c[l+376>>2]|0;if((d|0)>0){e=c[l+416>>2]|0;h=0;do{b=+(h|0)/+(d|0);if((e|0)>0){g=0;do{switch(c[(c[l+424>>2]|0)+(g<<2)>>2]|0){case 1:{d=2;break}case 0:{d=3;break}case 2:{d=4;break}case 3:{d=5;break}default:{v=37;break a}}Ea[d&7](l,1.0,b);g=g+1|0;e=c[l+416>>2]|0}while((g|0)<(e|0));d=c[l+376>>2]|0}h=h+1|0}while((h|0)<(d|0));b=+f[l+456>>2]*(1.0-+f[l+296>>2]);d=c[l+712>>2]|0;if((d|0)>0){e=0;do{k=c[l+720>>2]|0;z=b*(+f[k+(e*104|0)+12>>2]-+f[k+(e*104|0)+28>>2]);A=b*(+f[k+(e*104|0)+16>>2]-+f[k+(e*104|0)+32>>2]);f[k+(e*104|0)+40>>2]=b*(+f[k+(e*104|0)+8>>2]-+f[k+(e*104|0)+24>>2]);f[k+(e*104|0)+44>>2]=z;f[k+(e*104|0)+48>>2]=A;k=k+(e*104|0)+52|0;e=e+1|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;c[k+12>>2]=0;c[k+16>>2]=0}while((e|0)!=(d|0))}}d=c[l+380>>2]|0;if((d|0)>0){b=+f[l+292>>2]*+f[l+456>>2];e=c[l+712>>2]|0;if((e|0)>0){d=0;do{k=c[l+720>>2]|0;j=k+(d*104|0)+8|0;k=k+(d*104|0)+24|0;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];c[k+12>>2]=c[j+12>>2];d=d+1|0}while((d|0)!=(e|0));d=c[l+380>>2]|0;if((d|0)>0)v=45}else v=45;if((v|0)==45){v=0;e=c[l+436>>2]|0;h=0;do{if((e|0)>0){g=0;do{switch(c[(c[l+444>>2]|0)+(g<<2)>>2]|0){case 1:{d=2;break}case 0:{d=3;break}case 2:{d=4;break}case 3:{d=5;break}default:{v=56;break a}}Ea[d&7](l,1.0,0.0);g=g+1|0;e=c[l+436>>2]|0}while((g|0)<(e|0));d=c[l+380>>2]|0}h=h+1|0}while((h|0)<(d|0))}d=c[l+712>>2]|0;if((d|0)>0){e=c[l+720>>2]|0;g=0;do{z=b*(+f[e+(g*104|0)+12>>2]-+f[e+(g*104|0)+28>>2]);A=b*(+f[e+(g*104|0)+16>>2]-+f[e+(g*104|0)+32>>2]);k=e+(g*104|0)+40|0;f[k>>2]=b*(+f[e+(g*104|0)+8>>2]-+f[e+(g*104|0)+24>>2])+ +f[k>>2];k=e+(g*104|0)+44|0;f[k>>2]=z+ +f[k>>2];k=e+(g*104|0)+48|0;f[k>>2]=A+ +f[k>>2];g=g+1|0}while((g|0)!=(d|0))}}g=c[l+1112>>2]|0;if((g|0)>0){h=c[l+1120>>2]|0;j=0;do{i=c[h+(j<<2)>>2]|0;if(+f[i+352>>2]>0.0?(r=c[i+24>>2]|0,(r|0)>0):0){d=c[i+32>>2]|0;k=0;do{e=c[d+(k<<2)>>2]|0;if(+f[e+88>>2]>0.0?(o=+f[e+24>>2]-+f[i+228>>2],q=+f[e+28>>2]-+f[i+232>>2],u=+f[e+32>>2]-+f[i+236>>2],t=+f[i+336>>2],A=+f[i+340>>2],p=+f[i+332>>2],s=+f[i+316>>2]+(t*u-q*A),u=+f[i+320>>2]+(o*A-u*p),t=q*p-o*t+ +f[i+324>>2],o=+f[e+40>>2],p=+f[e+44>>2],q=+f[e+48>>2],s*s+u*u+t*t<=o*o+p*p+q*q):0){A=+f[i+352>>2];f[e+40>>2]=o+(s-o)*A;f[e+44>>2]=p+(u-p)*A;f[e+48>>2]=q+(t-q)*A}k=k+1|0}while((k|0)!=(r|0))}j=j+1|0}while((j|0)!=(g|0))}Qc(l,1);d=c[a+24>>2]|0}}m=m+1|0;if((m|0)>=(d|0)){v=3;break}}if((v|0)==3){ea=n;return}}function Ub(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0.0,B=0.0,C=0.0;if((d|0)<=1){y=0;return y|0}x=c[b+712>>2]|0;y=z(x,x)|0;y=GJ(y>>>0>1073741823?-1:y<<2)|0;if((x|0)>0){j=0;do{k=z(j,x)|0;h=y+(j+k<<2)|0;i=0;do{g=y+((z(i,x)|0)+j<<2)|0;if((i|0)==(j|0)){c[g>>2]=0;c[h>>2]=0}else{c[g>>2]=2147483647;c[y+(i+k<<2)>>2]=2147483647}i=i+1|0}while((i|0)!=(x|0));j=j+1|0}while((j|0)!=(x|0))}g=c[b+732>>2]|0;if((g|0)>0){h=c[b+740>>2]|0;i=c[b+720>>2]|0;j=0;do{p=((c[h+(j*52|0)+8>>2]|0)-i|0)/104|0;u=((c[h+(j*52|0)+12>>2]|0)-i|0)/104|0;c[y+((z(u,x)|0)+p<<2)>>2]=1;c[y+((z(p,x)|0)+u<<2)>>2]=1;j=j+1|0}while((j|0)!=(g|0))}do if((d|0)!=2)if((x|0)>0){m=0;do{n=z(m,x)|0;k=0;do{l=k;k=k+1|0;if((k|0)<(x|0)){o=z(l,x)|0;h=y+(o+m<<2)|0;j=k;do{g=(c[h>>2]|0)+(c[y+(j+n<<2)>>2]|0)|0;i=y+(j+o<<2)|0;if((c[i>>2]|0)>>>0>g>>>0){c[y+((z(j,x)|0)+l<<2)>>2]=g;c[i>>2]=g}j=j+1|0}while((j|0)!=(x|0))}}while((k|0)!=(x|0));m=m+1|0}while((m|0)!=(x|0));q=97}else g=0;else{if((x|0)<0)Z();if((x|0)>0){c[6747]=(c[6747]|0)+1;g=kb((x*20|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=0;do{a[h+(g*20|0)+16>>0]=1;c[h+(g*20|0)+12>>2]=0;u=h+(g*20|0)+4|0;c[u>>2]=0;c[h+(g*20|0)+8>>2]=0;c[u>>2]=0;g=g+1|0}while((g|0)!=(x|0));u=h}else u=0;if((c[b+732>>2]|0)>0){n=0;do{m=c[b+740>>2]|0;p=c[b+720>>2]|0;o=((c[m+(n*52|0)+8>>2]|0)-p|0)/104|0;p=((c[m+(n*52|0)+12>>2]|0)-p|0)/104|0;m=u+(o*20|0)+4|0;g=c[m>>2]|0;a:do if((g|0)>0){i=c[u+(o*20|0)+12>>2]|0;h=0;while(1){if((c[i+(h<<2)>>2]|0)==(p|0))break;h=h+1|0;if((h|0)>=(g|0)){q=28;break a}}if((h|0)==(g|0))q=28}else q=28;while(0);if((q|0)==28){q=0;l=u+(o*20|0)+8|0;if((g|0)==(c[l>>2]|0)?(t=(g|0)==0?1:g<<1,(g|0)<(t|0)):0){if(!t)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((t<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[m>>2]|0}k=u+(o*20|0)+12|0;j=c[k>>2]|0;if((g|0)<=0)if(!j)i=u+(o*20|0)+16|0;else q=39;else{i=0;do{c[h+(i<<2)>>2]=c[j+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0));q=39}if((q|0)==39){q=0;i=u+(o*20|0)+16|0;if(a[i>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[k>>2]=0;g=c[m>>2]|0}a[i>>0]=1;c[k>>2]=h;c[l>>2]=t}c[(c[u+(o*20|0)+12>>2]|0)+(g<<2)>>2]=p;c[m>>2]=(c[m>>2]|0)+1}m=u+(p*20|0)+4|0;g=c[m>>2]|0;b:do if((g|0)>0){i=c[u+(p*20|0)+12>>2]|0;h=0;while(1){if((c[i+(h<<2)>>2]|0)==(o|0))break;h=h+1|0;if((h|0)>=(g|0)){q=49;break b}}if((h|0)==(g|0))q=49}else q=49;while(0);if((q|0)==49){q=0;l=u+(p*20|0)+8|0;if((g|0)==(c[l>>2]|0)?(r=(g|0)==0?1:g<<1,(g|0)<(r|0)):0){if(!r)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((r<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[m>>2]|0}k=u+(p*20|0)+12|0;j=c[k>>2]|0;if((g|0)<=0)if(!j)i=u+(p*20|0)+16|0;else q=60;else{i=0;do{c[h+(i<<2)>>2]=c[j+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0));q=60}if((q|0)==60){q=0;i=u+(p*20|0)+16|0;if(a[i>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[k>>2]=0;g=c[m>>2]|0}a[i>>0]=1;c[k>>2]=h;c[l>>2]=r}c[(c[u+(p*20|0)+12>>2]|0)+(g<<2)>>2]=o;c[m>>2]=(c[m>>2]|0)+1}n=n+1|0}while((n|0)<(c[b+732>>2]|0))}if((x|0)<=0){if(!u){g=0;break}}else{p=0;do{q=u+(p*20|0)+4|0;g=c[q>>2]|0;if((g|0)>0){r=z(p,x)|0;o=c[u+(p*20|0)+12>>2]|0;n=0;do{l=c[o+(n<<2)>>2]|0;m=u+(l*20|0)+4|0;h=c[m>>2]|0;if((h|0)>0){j=c[u+(l*20|0)+12>>2]|0;k=y+((z(l,x)|0)+p<<2)|0;i=0;do{g=c[j+(i<<2)>>2]|0;if((p|0)!=(g|0)?(w=z(g,x)|0,v=(c[y+(w+l<<2)>>2]|0)+(c[k>>2]|0)|0,w=y+(w+p<<2)|0,(c[w>>2]|0)>>>0>v>>>0):0){c[y+(g+r<<2)>>2]=v;c[w>>2]=v;h=c[m>>2]|0}i=i+1|0}while((i|0)<(h|0));g=c[q>>2]|0}n=n+1|0}while((n|0)<(g|0))}p=p+1|0}while((p|0)!=(x|0));i=0;do{k=u+(i*20|0)+4|0;j=u+(i*20|0)+12|0;h=c[j>>2]|0;g=u+(i*20|0)+16|0;if(h|0){if(a[g>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[j>>2]=0}a[g>>0]=1;c[j>>2]=0;c[k>>2]=0;c[u+(i*20|0)+8>>2]=0;i=i+1|0}while((i|0)!=(x|0))}c[6748]=(c[6748]|0)+1;uc(c[u+-4>>2]|0);q=97}while(0);if((q|0)==97)if((x|0)>0){k=0;g=0;do{i=k;k=k+1|0;if((k|0)<(x|0)){j=z(i,x)|0;h=k;do{if((c[y+(h+j<<2)>>2]|0)==(d|0)){u=c[b+720>>2]|0;mh(b,e);w=(c[b+732>>2]|0)+-1|0;v=c[b+740>>2]|0;c[v+(w*52|0)+8>>2]=u+(h*104|0);c[v+(w*52|0)+12>>2]=u+(i*104|0);C=+f[u+(h*104|0)+8>>2]-+f[u+(i*104|0)+8>>2];B=+f[u+(h*104|0)+12>>2]-+f[u+(i*104|0)+12>>2];A=+f[u+(h*104|0)+16>>2]-+f[u+(i*104|0)+16>>2];f[v+(w*52|0)+16>>2]=+s(+(C*C+B*B+A*A));a[b+924>>0]=1;w=(c[b+740>>2]|0)+(w*52|0)+20|0;a[w>>0]=a[w>>0]|1;g=g+1|0}h=h+1|0}while((h|0)!=(x|0))}}while((k|0)!=(x|0))}else g=0;HJ(y);y=g;return y|0}function Vb(d,e){d=d|0;e=+e;var g=0,h=0.0,i=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0.0,t=0;r=ea;ea=ea+304|0;Fi(14750);a:do if((c[d+232>>2]|0)>0){n=r+136+48|0;m=0;while(1){l=c[(c[d+240>>2]|0)+(m<<2)>>2]|0;f[l+244>>2]=1.0;b:do switch(c[l+216>>2]|0){case 2:case 5:break;default:if(!(c[l+204>>2]&3)){ag(l+4|0,+f[l+312>>2],+f[l+316>>2],+f[l+320>>2],l+328|0,e,r+136|0);h=+f[n>>2]-+f[l+52>>2];k=+f[r+136+52>>2]-+f[l+56>>2];j=+f[r+136+56>>2]-+f[l+60>>2];if(a[d+44>>0]|0?(s=+f[l+252>>2],s*s!=0.0?s*s>2]|0)+4>>2]|0)<20){c[6409]=(c[6409]|0)+1;g=c[d+68>>2]|0;g=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0;i=c[d+24>>2]|0;f[r+200+4>>2]=1.0;c[r+200+12>>2]=c[l+52>>2];c[r+200+12+4>>2]=c[l+52+4>>2];c[r+200+12+8>>2]=c[l+52+8>>2];c[r+200+12+12>>2]=c[l+52+12>>2];c[r+200+28>>2]=c[n>>2];c[r+200+28+4>>2]=c[n+4>>2];c[r+200+28+8>>2]=c[n+8>>2];c[r+200+28+12>>2]=c[n+12>>2];c[r+200+76>>2]=0;c[r+200>>2]=5396;c[r+200+80>>2]=l;c[r+200+88>>2]=g;c[r+200+92>>2]=i;i=c[l+248>>2]|0;c[r+80+8>>2]=0;c[r+80+12>>2]=1065353216;c[r+80+16>>2]=1065353216;c[r+80+20>>2]=1065353216;f[r+80+24>>2]=0.0;c[r+80>>2]=7884;c[r+80+4>>2]=8;c[r+80+28>>2]=i;c[r+80+44>>2]=i;c[r+200+84>>2]=c[d+56>>2];i=c[l+188>>2]|0;b[r+200+8>>1]=b[i+4>>1]|0;b[r+200+10>>1]=b[i+6>>1]|0;c[r+16+48>>2]=c[n>>2];c[r+16+48+4>>2]=c[n+4>>2];c[r+16+48+8>>2]=c[n+8>>2];c[r+16+48+12>>2]=c[n+12>>2];c[r+16>>2]=c[l+4>>2];c[r+16+4>>2]=c[l+4+4>>2];c[r+16+8>>2]=c[l+4+8>>2];c[r+16+12>>2]=c[l+4+12>>2];c[r+16+16>>2]=c[l+20>>2];c[r+16+16+4>>2]=c[l+20+4>>2];c[r+16+16+8>>2]=c[l+20+8>>2];c[r+16+16+12>>2]=c[l+20+12>>2];c[r+16+32>>2]=c[l+36>>2];c[r+16+32+4>>2]=c[l+36+4>>2];c[r+16+32+8>>2]=c[l+36+8>>2];c[r+16+32+12>>2]=c[l+36+12>>2];Gc(d,r+80|0,l+4|0,r+16|0,r+200|0,0.0);h=+f[r+200+4>>2];if(h<1.0){f[l+244>>2]=h;ag(l+4|0,+f[l+312>>2],+f[l+316>>2],+f[l+320>>2],l+328|0,h*e,r+136|0);f[l+244>>2]=0.0;Md(l,r+136|0);g=4}else g=0;if(!g)o=12}else o=12;if((o|0)==12){o=0;g=0}i=c[2685]|0;t=(c[i+16>>2]|0)+-1|0;c[i+16>>2]=t;do if(!t){if(c[i+4>>2]|0){Y(r+200|0,0)|0;t=c[6746]|0;f[i+8>>2]=+f[i+8>>2]+ +(((c[r+200+4>>2]|0)-(c[t+4>>2]|0)+(((c[r+200>>2]|0)-(c[t>>2]|0)|0)*1e6|0)-(c[i+12>>2]|0)|0)>>>0)/1.0e3;if(c[i+16>>2]|0)break;i=c[2685]|0}c[2685]=c[i+20>>2]}while(0);if(g|0)break b}Md(l,r+136|0)}}while(0);m=m+1|0;if((m|0)>=(c[d+232>>2]|0))break a}}while(0);do if(a[d+275>>0]|0){Fi(14790);if((c[d+308>>2]|0)>0){n=0;do{m=c[(c[d+316>>2]|0)+(n<<2)>>2]|0;l=c[m+740>>2]|0;l=(c[l+236>>2]&2|0)==0?0:l;o=c[m+744>>2]|0;o=(c[o+236>>2]&2|0)==0?0:o;g=c[m+748>>2]|0;if((g|0)>0)if(!l){i=0;do{h=+f[57]*+f[o+228>>2];if(h>0.0?(p=+f[m+4+(i*184|0)+120>>2],p!=0.0):0){k=h*(p*+f[m+4+(i*184|0)+64>>2]);e=h*(p*+f[m+4+(i*184|0)+68>>2]);s=h*(p*+f[m+4+(i*184|0)+72>>2]);h=+f[m+4+(i*184|0)+36>>2]-+f[o+56>>2];j=+f[m+4+(i*184|0)+40>>2]-+f[o+60>>2];f[r+16>>2]=+f[m+4+(i*184|0)+32>>2]-+f[o+52>>2];f[r+16+4>>2]=h;f[r+16+8>>2]=j;f[r+16+12>>2]=0.0;f[r>>2]=k;f[r+4>>2]=e;f[r+8>>2]=s;f[r+12>>2]=0.0;uk(o,r,r+16|0);g=c[m+748>>2]|0}i=i+1|0}while((i|0)<(g|0))}else{i=0;do{h=+f[l+228>>2]*+f[o+228>>2];if(h>0.0?(q=+f[m+4+(i*184|0)+120>>2],q!=0.0):0){k=h*(q*+f[m+4+(i*184|0)+64>>2]);e=h*(q*+f[m+4+(i*184|0)+68>>2]);s=h*(q*+f[m+4+(i*184|0)+72>>2]);f[r+200>>2]=-k;f[r+200+4>>2]=-e;f[r+200+8>>2]=-s;f[r+200+12>>2]=0.0;j=+f[m+4+(i*184|0)+52>>2]-+f[l+56>>2];h=+f[m+4+(i*184|0)+56>>2]-+f[l+60>>2];f[r+80>>2]=+f[m+4+(i*184|0)+48>>2]-+f[l+52>>2];f[r+80+4>>2]=j;f[r+80+8>>2]=h;f[r+80+12>>2]=0.0;h=+f[m+4+(i*184|0)+36>>2]-+f[o+56>>2];j=+f[m+4+(i*184|0)+40>>2]-+f[o+60>>2];f[r+16>>2]=+f[m+4+(i*184|0)+32>>2]-+f[o+52>>2];f[r+16+4>>2]=h;f[r+16+8>>2]=j;f[r+16+12>>2]=0.0;uk(l,r+200|0,r+80|0);f[r>>2]=k;f[r+4>>2]=e;f[r+8>>2]=s;f[r+12>>2]=0.0;uk(o,r,r+16|0);g=c[m+748>>2]|0}i=i+1|0}while((i|0)<(g|0))}n=n+1|0}while((n|0)<(c[d+308>>2]|0))}g=c[2685]|0;t=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=t;if(!t){if(c[g+4>>2]|0){Y(r+200|0,0)|0;t=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[r+200+4>>2]|0)-(c[t+4>>2]|0)+(((c[r+200>>2]|0)-(c[t>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(c[g+16>>2]|0)break;g=c[2685]|0}c[2685]=c[g+20>>2]}}while(0);g=c[2685]|0;t=(c[g+16>>2]|0)+-1|0;c[g+16>>2]=t;if(t|0){ea=r;return}do if(c[g+4>>2]|0){Y(r+200|0,0)|0;t=c[6746]|0;f[g+8>>2]=+f[g+8>>2]+ +(((c[r+200+4>>2]|0)-(c[t+4>>2]|0)+(((c[r+200>>2]|0)-(c[t>>2]|0)|0)*1e6|0)-(c[g+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[g+16>>2]|0)){g=c[2685]|0;break}else{ea=r;return}}while(0);c[2685]=c[g+20>>2];ea=r;return}function Wb(b,d){b=b|0;d=d|0;var e=0,g=0.0,i=0.0,j=0.0,k=0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0;H=ea;ea=ea+96|0;e=c[b+216>>2]|0;if(+f[e+4>>2]==0.0){G=0;ea=H;return G|0}G=c[d>>2]|0;if(!(ta[c[(c[e>>2]|0)+8>>2]&31](e,c[G+188>>2]|0)|0)){G=1;ea=H;return G|0}d=c[G+192>>2]|0;F=c[b+216>>2]|0;if((c[d+4>>2]|0)!=32){c[H+32>>2]=0;c[H+32+4>>2]=d;c[H+32+8>>2]=G;c[H+32+12>>2]=G+4;c[H+32+16>>2]=-1;c[H+32+20>>2]=-1;Nb(b+68|0,b+132|0,H+32|0,F);G=1;ea=H;return G|0}if((G|0)==0?1:(c[G+236>>2]|0)!=8){G=1;ea=H;return G|0}d=c[G+752>>2]|0;if(d)if(!(c[G+988>>2]|0)){d=c[G+988+4>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[G+988+4>>2]=0;c[G+988+8>>2]=-1;d=c[G+988+32>>2]|0;if(d|0){if(a[G+988+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[G+988+32>>2]=0}a[G+988+36>>0]=1;c[G+988+32>>2]=0;c[G+988+24>>2]=0;c[G+988+28>>2]=0;c[G+988+16>>2]=0;d=c[G+752>>2]|0;if((d|0)>0){t=0;do{l=c[G+760>>2]|0;n=l+(t*44|0)|0;k=c[l+(t*44|0)+8>>2]|0;u=c[l+(t*44|0)+12>>2]|0;d=c[l+(t*44|0)+16>>2]|0;g=+f[k+8>>2];j=+f[k+12>>2];i=+f[k+16>>2];q=+f[k+20>>2];B=+f[u+8>>2];m=B>2];r=E>2];o=D>2];p=C>2];m=C>2];r=D>2];o=E>2];p=B>2]|0;if(!d){c[6747]=(c[6747]|0)+1;d=kb(63)|0;if(!d)d=0;else{c[(d+4+15&-16)+-4>>2]=d;d=d+4+15&-16}e=d;k=e+44|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(k|0))}else c[G+988+4>>2]=0;c[d+32>>2]=0;c[d+36>>2]=n;c[d+40>>2]=0;f[d>>2]=m;f[d+4>>2]=r;f[d+8>>2]=o;f[d+12>>2]=p;f[d+16>>2]=g;f[d+20>>2]=j;f[d+24>>2]=i;f[d+28>>2]=q;je(G+988|0,c[G+988>>2]|0,d);c[G+988+12>>2]=(c[G+988+12>>2]|0)+1;c[l+(t*44|0)+40>>2]=d;t=t+1|0;d=c[G+752>>2]|0}while((t|0)<(d|0));e=G+988|0}else e=G+988|0}else e=G+988|0;else{e=G+988|0;d=0}C=+f[b+180>>2]-+f[b+116>>2];E=+f[b+184>>2]-+f[b+120>>2];D=+f[b+188>>2]-+f[b+124>>2];e=c[e>>2]|0;if(!e)if((d|0)>0){t=c[G+760>>2]|0;i=1.0;g=1.0;k=0;u=0;l=-1;n=1065353216;e=0;do{K=c[t+(u*44|0)+8>>2]|0;J=c[t+(u*44|0)+12>>2]|0;I=c[t+(u*44|0)+16>>2]|0;j=+Pg(b+116|0,C,E,D,+f[K+8>>2],+f[K+12>>2],+f[K+16>>2],+f[J+8>>2],+f[J+12>>2],+f[J+16>>2],+f[I+8>>2],+f[I+12>>2],+f[I+16>>2],i);if(j>0.0){g=j;i=j;k=k+1|0;l=u;n=(f[h>>2]=j,c[h>>2]|0);e=3}u=u+1|0}while((u|0)!=(d|0));d=k}else{g=1.0;d=0;l=-1;n=1065353216;e=0}else{c[H+32>>2]=4284;c[H+32+4>>2]=c[b+116>>2];c[H+32+4+4>>2]=c[b+116+4>>2];c[H+32+4+8>>2]=c[b+116+8>>2];c[H+32+4+12>>2]=c[b+116+12>>2];f[H+32+36>>2]=C;f[H+32+40>>2]=E;f[H+32+44>>2]=D;f[H+32+48>>2]=0.0;c[H+32+20>>2]=c[b+180>>2];c[H+32+20+4>>2]=c[b+180+4>>2];c[H+32+20+8>>2]=c[b+180+8>>2];c[H+32+20+12>>2]=c[b+180+12>>2];c[H+32+52>>2]=1065353216;c[H+32+56>>2]=0;c[H+32+60>>2]=0;Dd(e,b+116|0,b+180|0,H+32|0);d=c[H+32+56>>2]|0;if(!d){g=1.0;k=0;l=-1;n=1065353216;e=0}else{n=c[H+32+52>>2]|0;g=(c[h>>2]=n,+f[h>>2]);k=1;l=(d-(c[G+760>>2]|0)|0)/44|0;e=3}d=k}t=c[G+772>>2]|0;if((t|0)>0){u=c[G+780>>2]|0;k=0;do{K=c[u+(k*104|0)+8>>2]|0;w=+f[K+8>>2];x=+f[K+12>>2];y=+f[K+16>>2];K=c[u+(k*104|0)+12>>2]|0;m=+f[K+8>>2];o=+f[K+12>>2];p=+f[K+16>>2];K=c[u+(k*104|0)+16>>2]|0;z=+f[K+8>>2];A=+f[K+12>>2];B=+f[K+16>>2];i=(c[h>>2]=n,+f[h>>2]);j=+Pg(b+116|0,C,E,D,w,x,y,m,o,p,z,A,B,i);if(j>0.0){i=j;g=j;d=d+1|0;l=k;n=(f[h>>2]=j,c[h>>2]|0);e=4}K=c[u+(k*104|0)+20>>2]|0;q=+f[K+8>>2];r=+f[K+12>>2];v=+f[K+16>>2];i=+Pg(b+116|0,C,E,D,w,x,y,m,o,p,q,r,v,i);if(i>0.0){j=i;g=i;d=d+1|0;l=k;n=(f[h>>2]=i,c[h>>2]|0);e=4}else j=(c[h>>2]=n,+f[h>>2]);i=+Pg(b+116|0,C,E,D,m,o,p,z,A,B,q,r,v,j);if(i>0.0){j=i;g=i;d=d+1|0;l=k;n=(f[h>>2]=i,c[h>>2]|0);e=4}else j=(c[h>>2]=n,+f[h>>2]);i=+Pg(b+116|0,C,E,D,w,x,y,z,A,B,q,r,v,j);if(i>0.0){g=i;d=d+1|0;l=k;n=(f[h>>2]=i,c[h>>2]|0);e=4}k=k+1|0}while((k|0)!=(t|0));q=g}else q=g;if(!d){K=1;ea=H;return K|0}if(!(q<=+f[F+4>>2])){K=1;ea=H;return K|0}c[H+32>>2]=0;c[H+32+4>>2]=l;m=+f[b+180>>2]-+f[b+116>>2];p=+f[b+184>>2]-+f[b+120>>2];o=+f[b+188>>2]-+f[b+124>>2];g=1.0/+s(+(m*m+p*p+o*o));if((e|0)==3){d=c[G+748+12>>2]|0;g=+f[d+(l*44|0)+20>>2];j=+f[d+(l*44|0)+24>>2];i=+f[d+(l*44|0)+28>>2];if(m*g+p*j+o*i>0.0){m=-g;j=-j;i=-i;g=0.0}else{m=g;g=+f[d+(l*44|0)+32>>2]}}else{m=-(m*g);j=-(p*g);i=-(o*g);g=0.0}c[H>>2]=G;c[H+4>>2]=H+32;f[H+8>>2]=m;f[H+12>>2]=j;f[H+16>>2]=i;f[H+20>>2]=g;f[H+24>>2]=q;+ka[c[(c[F>>2]|0)+12>>2]&15](F,H,1);K=1;ea=H;return K|0}function Xb(b,d,e){b=b|0;d=d|0;e=+e;var g=0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0.0,q=0,r=0;r=ea;ea=ea+112|0;j=c[b+716>>2]|0;if((j|0)==(c[b+712>>2]|0)){a:do if(j){k=c[b+720>>2]|0;if((j|0)>0){h=k;i=0;while(1){g=c[h+(i*104|0)+96>>2]|0;if(g|0)c[g+36>>2]=i;g=i+1|0;if((g|0)==(j|0))break a;h=c[b+720>>2]|0;i=g}}}else k=0;while(0);g=c[b+732>>2]|0;if((g|0)>0){h=0;do{o=(c[b+740>>2]|0)+(h*52|0)+8|0;c[o>>2]=((c[o>>2]|0)-k|0)/104|0;o=(c[b+740>>2]|0)+(h*52|0)+12|0;c[o>>2]=((c[o>>2]|0)-k|0)/104|0;h=h+1|0}while((h|0)!=(g|0))}g=c[b+752>>2]|0;if((g|0)>0){i=0;do{h=(c[b+760>>2]|0)+(i*44|0)+8|0;c[h>>2]=((c[h>>2]|0)-k|0)/104|0;h=(c[b+760>>2]|0)+(i*44|0)+12|0;c[h>>2]=((c[h>>2]|0)-k|0)/104|0;h=(c[b+760>>2]|0)+(i*44|0)+16|0;c[h>>2]=((c[h>>2]|0)-k|0)/104|0;h=c[(c[b+760>>2]|0)+(i*44|0)+40>>2]|0;if(h|0)c[h+36>>2]=i;i=i+1|0}while((i|0)!=(g|0))}g=c[b+792>>2]|0;if((g|0)>0){h=c[b+800>>2]|0;i=0;do{o=h+(i*96|0)|0;c[o>>2]=((c[o>>2]|0)-k|0)/104|0;i=i+1|0}while((i|0)!=(g|0))}i=c[b+692>>2]|0;if((i|0)>0){g=c[b+700>>2]|0;j=0;do{if((c[g+(j*60|0)+24>>2]|0)>0){h=0;do{g=g+(j*60|0)+28+(h<<2)|0;c[g>>2]=((c[g>>2]|0)-k|0)/104|0;h=h+1|0;g=c[b+700>>2]|0}while((h|0)<(c[g+(j*60|0)+24>>2]|0))}j=j+1|0}while((j|0)!=(i|0))}i=c[b+712>>2]|0;if((c[b+716>>2]|0)<(i<<1|1|0)){c[6747]=(c[6747]|0)+1;g=kb(((i<<1|1)*104|3)+16|0)|0;if(!g)j=0;else{c[(g+4+15&-16)+-4>>2]=g;j=g+4+15&-16}g=c[b+712>>2]|0;if((g|0)>0){h=0;do{n=j+(h*104|0)|0;k=(c[b+720>>2]|0)+(h*104|0)|0;o=n+104|0;do{c[n>>2]=c[k>>2];n=n+4|0;k=k+4|0}while((n|0)<(o|0));h=h+1|0}while((h|0)!=(g|0))}g=c[b+720>>2]|0;if(g|0){if(a[b+724>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+720>>2]=0}a[b+724>>0]=1;c[b+720>>2]=j;c[b+716>>2]=i<<1|1;i=c[b+712>>2]|0}b:do if(i){j=c[b+720>>2]|0;if((i|0)>0){k=j;g=0;while(1){h=c[k+(g*104|0)+96>>2]|0;if(h|0)c[h+36>>2]=k+(g*104|0);g=g+1|0;if((g|0)==(i|0)){k=j;break b}k=c[b+720>>2]|0}}else k=j}else k=0;while(0);g=c[b+732>>2]|0;if((g|0)>0){h=0;do{o=(c[b+740>>2]|0)+(h*52|0)+8|0;c[o>>2]=k+((c[o>>2]|0)*104|0);o=(c[b+740>>2]|0)+(h*52|0)+12|0;c[o>>2]=k+((c[o>>2]|0)*104|0);h=h+1|0}while((h|0)!=(g|0))}g=c[b+752>>2]|0;if((g|0)>0){j=0;do{h=(c[b+760>>2]|0)+(j*44|0)+8|0;c[h>>2]=k+((c[h>>2]|0)*104|0);h=(c[b+760>>2]|0)+(j*44|0)+12|0;c[h>>2]=k+((c[h>>2]|0)*104|0);h=(c[b+760>>2]|0)+(j*44|0)+16|0;c[h>>2]=k+((c[h>>2]|0)*104|0);h=c[b+760>>2]|0;i=c[h+(j*44|0)+40>>2]|0;if(i|0)c[i+36>>2]=h+(j*44|0);j=j+1|0}while((j|0)!=(g|0))}h=c[b+792>>2]|0;if((h|0)>0){g=c[b+800>>2]|0;i=0;do{o=g+(i*96|0)|0;c[o>>2]=k+((c[o>>2]|0)*104|0);i=i+1|0}while((i|0)!=(h|0))}i=c[b+692>>2]|0;if((i|0)>0){g=c[b+700>>2]|0;j=0;do{if((c[g+(j*60|0)+24>>2]|0)>0){h=0;do{g=g+(j*60|0)+28+(h<<2)|0;c[g>>2]=k+((c[g>>2]|0)*104|0);h=h+1|0;g=c[b+700>>2]|0}while((h|0)<(c[g+(j*60|0)+24>>2]|0))}j=j+1|0}while((j|0)!=(i|0))}}n=c[b+192>>2]|0;p=+ha[c[(c[n>>2]|0)+48>>2]&15](n);n=r;o=n+100|0;do{c[n>>2]=0;n=n+4|0}while((n|0)<(o|0));g=c[b+712>>2]|0;if((g|0)==(c[b+716>>2]|0)?(q=(g|0)==0?1:g<<1,(g|0)<(q|0)):0){if(!q)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((q*104|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+712>>2]|0}if((g|0)>0){i=0;do{n=h+(i*104|0)|0;k=(c[b+720>>2]|0)+(i*104|0)|0;o=n+104|0;do{c[n>>2]=c[k>>2];n=n+4|0;k=k+4|0}while((n|0)<(o|0));i=i+1|0}while((i|0)!=(g|0))}g=c[b+720>>2]|0;if(g|0){if(a[b+724>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+720>>2]=0}a[b+724>>0]=1;c[b+720>>2]=h;c[b+716>>2]=q;g=c[b+712>>2]|0}n=c[b+720>>2]|0;c[n+(g*104|0)>>2]=0;n=n+(g*104|0)+4|0;k=r;o=n+100|0;do{c[n>>2]=c[k>>2];n=n+4|0;k=k+4|0}while((n|0)<(o|0));h=c[b+712>>2]|0;c[b+712>>2]=h+1;i=c[b+720>>2]|0;n=i+(h*104|0)|0;o=n+104|0;do{c[n>>2]=0;n=n+4|0}while((n|0)<(o|0));c[i+(h*104|0)+8>>2]=c[d>>2];c[i+(h*104|0)+8+4>>2]=c[d+4>>2];c[i+(h*104|0)+8+8>>2]=c[d+8>>2];c[i+(h*104|0)+8+12>>2]=c[d+12>>2];mp(i+(h*104|0)+24|0,d|0,16)|0;f[i+(h*104|0)+88>>2]=e>0.0?1.0/e:0.0;c[i+(h*104|0)+4>>2]=c[c[b+880>>2]>>2];e=+f[i+(h*104|0)+8>>2];l=+f[i+(h*104|0)+12>>2];m=+f[i+(h*104|0)+16>>2];g=c[b+932>>2]|0;if(g|0){c[b+932>>2]=0;d=g;q=d+32|0;c[q>>2]=0;q=d+36|0;c[q>>2]=i+(h*104|0);q=d+40|0;c[q>>2]=0;f[d>>2]=e-p;q=d+4|0;f[q>>2]=l-p;q=d+8|0;f[q>>2]=m-p;q=d+12|0;f[q>>2]=0.0;q=d+16|0;f[q>>2]=p+e;q=d+20|0;f[q>>2]=p+l;q=d+24|0;f[q>>2]=p+m;q=d+28|0;f[q>>2]=0.0;q=c[b+928>>2]|0;je(b+928|0,q,d);b=b+940|0;q=c[b>>2]|0;q=q+1|0;c[b>>2]=q;b=i+(h*104|0)+96|0;c[b>>2]=d;ea=r;return}c[6747]=(c[6747]|0)+1;g=kb(63)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}n=g;o=n+44|0;do{c[n>>2]=0;n=n+4|0}while((n|0)<(o|0));d=g;q=d+32|0;c[q>>2]=0;q=d+36|0;c[q>>2]=i+(h*104|0);q=d+40|0;c[q>>2]=0;f[d>>2]=e-p;q=d+4|0;f[q>>2]=l-p;q=d+8|0;f[q>>2]=m-p;q=d+12|0;f[q>>2]=0.0;q=d+16|0;f[q>>2]=p+e;q=d+20|0;f[q>>2]=p+l;q=d+24|0;f[q>>2]=p+m;q=d+28|0;f[q>>2]=0.0;q=c[b+928>>2]|0;je(b+928|0,q,d);b=b+940|0;q=c[b>>2]|0;q=q+1|0;c[b>>2]=q;b=i+(h*104|0)+96|0;c[b>>2]=d;ea=r;return}function Yb(b,d,e,g,h,i,j,k,l){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0;H=ea;ea=ea+32|0;c[H+12>>2]=i;c[H+12+4>>2]=j;c[H+12+8>>2]=k;c[H>>2]=e;c[H+4>>2]=g;c[H+8>>2]=h;if(!(+f[d+52>>2]<+f[b+12>>2])){l=0;ea=H;return l|0}x=+f[d+36>>2];z=+f[d+40>>2];y=+f[d+44>>2];h=c[d+48>>2]|0;w=1.0/+s(+(x*x+z*z+y*y));k=wh(H)|0;A=+f[d+4>>2]-+f[k+48>>2];E=+f[d+8>>2]-+f[k+52>>2];C=+f[d+12>>2]-+f[k+56>>2];k=wh(H+12|0)|0;B=+f[d+20>>2]-+f[k+48>>2];F=+f[d+24>>2]-+f[k+52>>2];D=+f[d+28>>2]-+f[k+56>>2];if(!g)if(!e){o=0.0;r=0.0;p=0.0;m=0.0;n=0.0;q=0.0}else{q=+f[e+336>>2];n=+f[e+340>>2];v=+f[e+332>>2];o=+f[e+316>>2];r=+f[e+320>>2];p=+f[e+324>>2];m=C*q-E*n;n=A*n-C*v;q=E*v-A*q}else{q=+f[g+332>>2];n=+f[g+336>>2];v=+f[g+328>>2];o=+f[g+312>>2];r=+f[g+316>>2];p=+f[g+320>>2];m=C*q-E*n;n=A*n-C*v;q=E*v-A*q}v=o+m;u=r+n;q=p+q;if(!j)if(!i){r=0.0;t=0.0;m=0.0;n=0.0;o=0.0;p=0.0}else{p=+f[i+336>>2];o=+f[i+340>>2];I=+f[i+332>>2];r=+f[i+316>>2];t=+f[i+320>>2];m=+f[i+324>>2];n=D*p-F*o;o=B*o-D*I;p=F*I-B*p}else{p=+f[j+332>>2];o=+f[j+336>>2];I=+f[j+328>>2];r=+f[j+312>>2];t=+f[j+316>>2];m=+f[j+320>>2];n=D*p-F*o;o=B*o-D*I;p=F*I-B*p}r=v-(r+n);u=u-(t+o);t=q-(m+p);v=y*w*t+(z*w*u+x*w*r);I=+f[d+52>>2]-+f[b+12>>2];c[l+4>>2]=c[H>>2];c[l+4+4>>2]=c[H+4>>2];c[l+4+8>>2]=c[H+8>>2];c[l+16>>2]=c[H+12>>2];c[l+16+4>>2]=c[H+12+4>>2];c[l+16+8>>2]=c[H+12+8>>2];d=wh(H)|0;q=A*+f[d+4>>2]+E*+f[d+20>>2]+C*+f[d+36>>2];p=A*+f[d+8>>2]+E*+f[d+24>>2]+C*+f[d+40>>2];f[l+28>>2]=A*+f[d>>2]+E*+f[d+16>>2]+C*+f[d+32>>2];f[l+32>>2]=q;f[l+36>>2]=p;f[l+40>>2]=0.0;d=wh(H+12|0)|0;p=B*+f[d+4>>2]+F*+f[d+20>>2]+D*+f[d+36>>2];q=B*+f[d+8>>2]+F*+f[d+24>>2]+D*+f[d+40>>2];f[l+44>>2]=B*+f[d>>2]+F*+f[d+16>>2]+D*+f[d+32>>2];f[l+48>>2]=p;f[l+52>>2]=q;f[l+56>>2]=0.0;f[l+164>>2]=A;f[l+168>>2]=E;f[l+172>>2]=C;f[l+176>>2]=0.0;f[l+180>>2]=B;f[l+184>>2]=F;f[l+188>>2]=D;f[l+192>>2]=0.0;f[l+60>>2]=1.0;f[l+64>>2]=1.0;c[l+156>>2]=0;c[l+160>>2]=0;f[l+68>>2]=1.0;f[l+72>>2]=x*w*I;f[l+76>>2]=z*w*I;f[l+80>>2]=y*w*I;f[l+84>>2]=0.0;f[l+196>>2]=x*w;f[l+200>>2]=z*w;f[l+204>>2]=y*w;c[l+208>>2]=h;a[l+152>>0]=0;I=+f[b+16>>2];f[l+212>>2]=(t-y*w*v)*(t-y*w*v)+((r-x*w*v)*(r-x*w*v)+(u-z*w*v)*(u-z*w*v))>2]|0;if(!h){h=c[H>>2]|0;if(!h)n=0.0;else{h=h+128|0;G=14}}else{h=h+344|0;G=14}if((G|0)==14)n=+f[h>>2];if((a[24896]|0)==0?DC(24896)|0:0){h=25440;k=h+48|0;do{c[h>>2]=0;h=h+4|0}while((h|0)<(k|0));PB(24896)}h=c[H+4>>2]|0;if(!h){e=c[H>>2]|0;e=(e|0)==0?25440:e+180|0}else e=h+264|0;h=c[H+12+4>>2]|0;if(!h){h=c[H+12>>2]|0;if(!h)m=0.0;else{h=h+128|0;G=25}}else{h=h+344|0;G=25}if((G|0)==25)m=+f[h>>2];if((a[24896]|0)==0?DC(24896)|0:0){h=25440;k=h+48|0;do{c[h>>2]=0;h=h+4|0}while((h|0)<(k|0));PB(24896)}h=c[H+12+4>>2]|0;if(!h){h=c[H+12>>2]|0;h=(h|0)==0?25440:h+180|0}else h=h+264|0;V=+f[l+172>>2];N=+f[l+168>>2];M=+f[l+164>>2];U=+f[e>>2];T=+f[e+16>>2];S=+f[e+32>>2];R=+f[e+4>>2];Q=+f[e+20>>2];P=+f[e+36>>2];O=+f[e+8>>2];L=+f[e+24>>2];K=+f[e+40>>2];B=+f[l+188>>2];v=+f[l+184>>2];w=+f[l+180>>2];J=+f[h>>2];o=+f[h+16>>2];p=+f[h+32>>2];q=+f[h+4>>2];r=+f[h+20>>2];t=+f[h+36>>2];u=+f[h+8>>2];I=+f[h+24>>2];x=+f[h+40>>2];D=n-((U*0.0+T*-V+N*S)*0.0+V*(R*0.0+Q*-V+N*P)+(O*0.0+L*-V+N*K)*-N)+(m-((J*0.0+o*-B+v*p)*0.0+B*(q*0.0+r*-B+v*t)+(u*0.0+I*-B+v*x)*-v));F=0.0-((U*0.0+T*-V+N*S)*-V+(R*0.0+Q*-V+N*P)*0.0+M*(O*0.0+L*-V+N*K))+(0.0-((J*0.0+o*-B+v*p)*-B+(q*0.0+r*-B+v*t)*0.0+w*(u*0.0+I*-B+v*x)));y=0.0-(N*(U*0.0+T*-V+N*S)+(R*0.0+Q*-V+N*P)*-M+(O*0.0+L*-V+N*K)*0.0)+(0.0-(v*(J*0.0+o*-B+v*p)+(q*0.0+r*-B+v*t)*-w+(u*0.0+I*-B+v*x)*0.0));E=0.0-((V*U+T*0.0+S*-M)*0.0+V*(V*R+Q*0.0+P*-M)+(V*O+L*0.0+K*-M)*-N)+(0.0-((B*J+o*0.0+p*-w)*0.0+B*(B*q+r*0.0+t*-w)+(B*u+I*0.0+x*-w)*-v));C=n-((V*U+T*0.0+S*-M)*-V+(V*R+Q*0.0+P*-M)*0.0+M*(V*O+L*0.0+K*-M))+(m-((B*J+o*0.0+p*-w)*-B+(B*q+r*0.0+t*-w)*0.0+w*(B*u+I*0.0+x*-w)));z=0.0-(N*(V*U+T*0.0+S*-M)+(V*R+Q*0.0+P*-M)*-M+(V*O+L*0.0+K*-M)*0.0)+(0.0-(v*(B*J+o*0.0+p*-w)+(B*q+r*0.0+t*-w)*-w+(B*u+I*0.0+x*-w)*0.0));A=0.0-((U*-N+M*T+S*0.0)*0.0+V*(R*-N+M*Q+P*0.0)+(O*-N+M*L+K*0.0)*-N)+(0.0-((J*-v+w*o+p*0.0)*0.0+B*(q*-v+w*r+t*0.0)+(u*-v+w*I+x*0.0)*-v));B=0.0-((U*-N+M*T+S*0.0)*-V+(R*-N+M*Q+P*0.0)*0.0+M*(O*-N+M*L+K*0.0))+(0.0-((J*-v+w*o+p*0.0)*-B+(q*-v+w*r+t*0.0)*0.0+w*(u*-v+w*I+x*0.0)));x=n-(N*(U*-N+M*T+S*0.0)+(R*-N+M*Q+P*0.0)*-M+(O*-N+M*L+K*0.0)*0.0)+(m-(v*(J*-v+w*o+p*0.0)+(q*-v+w*r+t*0.0)*-w+(u*-v+w*I+x*0.0)*0.0));I=1.0/(y*(B*E-C*A)+(D*(C*x-z*B)+F*(z*A-x*E)));f[l+104>>2]=(C*x-z*B)*I;f[l+108>>2]=(B*y-x*F)*I;f[l+112>>2]=(z*F-C*y)*I;f[l+116>>2]=0.0;f[l+120>>2]=(z*A-x*E)*I;f[l+124>>2]=(x*D-A*y)*I;f[l+128>>2]=(E*y-z*D)*I;f[l+132>>2]=0.0;f[l+136>>2]=(B*E-C*A)*I;f[l+140>>2]=(A*F-B*D)*I;f[l+144>>2]=(C*D-E*F)*I;f[l+148>>2]=0.0;l=1;ea=H;return l|0}function Zb(b,d,e){b=b|0;d=d|0;e=e|0;var g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;w=(a[b+180>>0]|0)==0;if(w?(a[b+48>>0]|0)!=0:0){s=+f[b+116>>2];v=+f[e>>2];z=+f[b+132>>2];y=+f[e+4>>2];B=+f[b+148>>2];A=+f[e+8>>2];q=+f[b+120>>2];E=+f[b+136>>2];F=+f[b+152>>2];o=+f[b+124>>2];J=+f[b+140>>2];p=+f[b+156>>2];x=+f[e+16>>2];m=+f[e+20>>2];n=+f[e+24>>2];I=+f[e+32>>2];r=+f[e+36>>2];C=+f[e+40>>2];i=+f[b+164>>2];g=+f[b+168>>2];H=+f[b+172>>2];G=+f[e+48>>2]+(v*i+y*g+A*H);D=x*i+m*g+n*H+ +f[e+52>>2];H=I*i+r*g+C*H+ +f[e+56>>2];f[b+824>>2]=s*v+z*y+B*A;f[b+828>>2]=v*q+y*E+A*F;f[b+832>>2]=v*o+y*J+A*p;f[b+836>>2]=0.0;f[b+840>>2]=s*x+z*m+B*n;f[b+844>>2]=q*x+E*m+F*n;f[b+848>>2]=o*x+J*m+p*n;f[b+852>>2]=0.0;f[b+856>>2]=s*I+z*r+B*C;f[b+860>>2]=q*I+E*r+F*C;f[b+864>>2]=o*I+J*r+p*C;f[b+868>>2]=0.0;f[b+872>>2]=G;f[b+876>>2]=D;f[b+880>>2]=H;f[b+884>>2]=0.0;H=+f[b+52>>2];D=+f[d>>2];G=+f[b+68>>2];C=+f[d+4>>2];p=+f[b+84>>2];r=+f[d+8>>2];J=+f[b+56>>2];I=+f[b+72>>2];o=+f[b+88>>2];F=+f[b+60>>2];E=+f[b+76>>2];q=+f[b+92>>2];B=+f[d+16>>2];z=+f[d+20>>2];s=+f[d+24>>2];n=+f[d+32>>2];m=+f[d+36>>2];x=+f[d+40>>2];A=+f[b+100>>2];y=+f[b+104>>2];v=+f[b+108>>2];g=n*A+m*y;i=F*n+E*m+q*x;j=D*J+C*I+r*o;k=H*D+G*C+p*r;l=J*n+I*m+o*x;m=H*n+G*m+p*x;n=F*B+E*z+q*s;o=J*B+I*z+o*s;p=H*B+G*z+p*s;q=D*F+C*E+r*q;r=D*A+C*y+r*v;s=B*A+z*y+s*v;t=b+856|0;u=b+840|0;v=x*v}else{s=+f[b+52>>2];v=+f[d>>2];H=+f[b+68>>2];I=+f[d+4>>2];F=+f[b+84>>2];G=+f[d+8>>2];q=+f[b+56>>2];C=+f[b+72>>2];B=+f[b+88>>2];o=+f[b+60>>2];x=+f[b+76>>2];p=+f[b+92>>2];J=+f[d+16>>2];m=+f[d+20>>2];n=+f[d+24>>2];y=+f[d+32>>2];r=+f[d+36>>2];E=+f[d+40>>2];i=+f[b+100>>2];g=+f[b+104>>2];z=+f[b+108>>2];A=+f[d+48>>2]+(v*i+I*g+G*z);D=J*i+m*g+n*z+ +f[d+52>>2];z=y*i+r*g+E*z+ +f[d+56>>2];f[b+824>>2]=s*v+H*I+F*G;f[b+828>>2]=v*q+I*C+G*B;f[b+832>>2]=v*o+I*x+G*p;f[b+836>>2]=0.0;f[b+840>>2]=s*J+H*m+F*n;f[b+844>>2]=q*J+C*m+B*n;f[b+848>>2]=o*J+x*m+p*n;f[b+852>>2]=0.0;f[b+856>>2]=s*y+H*r+F*E;f[b+860>>2]=q*y+C*r+B*E;f[b+864>>2]=o*y+x*r+p*E;f[b+868>>2]=0.0;f[b+872>>2]=A;f[b+876>>2]=D;f[b+880>>2]=z;f[b+884>>2]=0.0;z=+f[b+116>>2];D=+f[e>>2];A=+f[b+132>>2];E=+f[e+4>>2];p=+f[b+148>>2];r=+f[e+8>>2];x=+f[b+120>>2];y=+f[b+136>>2];o=+f[b+152>>2];B=+f[b+124>>2];C=+f[b+140>>2];q=+f[b+156>>2];F=+f[e+16>>2];H=+f[e+20>>2];s=+f[e+24>>2];n=+f[e+32>>2];m=+f[e+36>>2];J=+f[e+40>>2];G=+f[b+164>>2];I=+f[b+168>>2];v=+f[b+172>>2];g=n*G+m*I;i=B*n+C*m+q*J;j=D*x+E*y+r*o;k=z*D+A*E+p*r;l=x*n+y*m+o*J;m=z*n+A*m+p*J;n=B*F+C*H+q*s;o=x*F+y*H+o*s;p=z*F+A*H+p*s;q=D*B+E*C+r*q;r=D*G+E*I+r*v;s=F*G+H*I+s*v;t=b+856|0;u=b+840|0;v=J*v;d=e}I=+f[d+48>>2]+r;J=s+ +f[d+52>>2];g=g+v+ +f[d+56>>2];f[b+888>>2]=k;f[b+892>>2]=j;f[b+896>>2]=q;f[b+900>>2]=0.0;f[b+904>>2]=p;f[b+908>>2]=o;f[b+912>>2]=n;f[b+916>>2]=0.0;f[b+920>>2]=m;f[b+924>>2]=l;f[b+928>>2]=i;f[b+932>>2]=0.0;f[b+936>>2]=I;f[b+940>>2]=J;f[b+944>>2]=g;f[b+948>>2]=0.0;c[b+968>>2]=c[b+872>>2];c[b+968+4>>2]=c[b+872+4>>2];c[b+968+8>>2]=c[b+872+8>>2];c[b+968+12>>2]=c[b+872+12>>2];c[b+984>>2]=c[b+936>>2];c[b+984+4>>2]=c[b+936+4>>2];c[b+984+8>>2]=c[b+936+8>>2];c[b+984+12>>2]=c[b+936+12>>2];d=c[b+824>>2]|0;e=c[u>>2]|0;u=c[t>>2]|0;c[b+952>>2]=d;c[b+956>>2]=e;c[b+960>>2]=u;f[b+964>>2]=0.0;i=(c[h>>2]=d,+f[h>>2]);j=(c[h>>2]=e,+f[h>>2]);g=(c[h>>2]=u,+f[h>>2]);if(w?(a[b+48>>0]|0)==0:0){E=+f[b+968>>2];F=+f[b+972>>2];H=+f[b+976>>2];A=E;B=F;C=H;E=E-+f[b+984>>2];H=H-+f[b+992>>2];F=F-+f[b+988>>2];w=b+1016|0;f[w>>2]=E;w=b+1020|0;f[w>>2]=F;w=b+1024|0;f[w>>2]=H;w=b+1028|0;f[w>>2]=0.0;J=E*i;D=F*j;D=J+D;J=H*g;J=D+J;D=J*i;G=J*j;I=J*g;D=A+D;G=B+G;I=C+I;w=b+1e3|0;f[w>>2]=D;w=b+1004|0;f[w>>2]=G;w=b+1008|0;f[w>>2]=I;w=b+1012|0;f[w>>2]=0.0;w=b+1032|0;f[w>>2]=J;w=b+828|0;u=b+844|0;t=b+860|0;J=+f[w>>2];I=+f[u>>2];G=+f[t>>2];J=E*J;I=F*I;I=J+I;G=H*G;G=I+G;t=b+1036|0;f[t>>2]=G;t=b+832|0;u=b+848|0;w=b+864|0;G=+f[t>>2];I=+f[u>>2];J=+f[w>>2];G=E*G;I=F*I;I=G+I;J=H*J;J=I+J;w=b+1040|0;f[w>>2]=J;return}E=+f[b+968>>2];F=+f[b+972>>2];H=+f[b+976>>2];A=E;B=F;C=H;E=+f[b+984>>2]-E;H=+f[b+992>>2]-H;F=+f[b+988>>2]-F;w=b+1016|0;f[w>>2]=E;w=b+1020|0;f[w>>2]=F;w=b+1024|0;f[w>>2]=H;w=b+1028|0;f[w>>2]=0.0;J=E*i;D=F*j;D=J+D;J=H*g;J=D+J;D=J*i;G=J*j;I=J*g;D=A+D;G=B+G;I=C+I;w=b+1e3|0;f[w>>2]=D;w=b+1004|0;f[w>>2]=G;w=b+1008|0;f[w>>2]=I;w=b+1012|0;f[w>>2]=0.0;w=b+1032|0;f[w>>2]=J;w=b+828|0;u=b+844|0;t=b+860|0;J=+f[w>>2];I=+f[u>>2];G=+f[t>>2];J=E*J;I=F*I;I=J+I;G=H*G;G=I+G;t=b+1036|0;f[t>>2]=G;t=b+832|0;u=b+848|0;w=b+864|0;G=+f[t>>2];I=+f[u>>2];J=+f[w>>2];G=E*G;I=F*I;I=G+I;J=H*J;J=I+J;w=b+1040|0;f[w>>2]=J;return}function _b(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,t=0,u=0,v=0.0,w=0.0,x=0;u=ea;ea=ea+672|0;c[u+448+8>>2]=0;c[u+448+12>>2]=1065353216;c[u+448+16>>2]=1065353216;c[u+448+20>>2]=1065353216;f[u+448+24>>2]=0.0;c[u+448>>2]=7884;c[u+448+4>>2]=8;f[u+448+28>>2]=0.0;f[u+448+44>>2]=0.0;f[u+384>>2]=1.0;c[u+384+4>>2]=0;c[u+384+4+4>>2]=0;c[u+384+4+8>>2]=0;c[u+384+4+12>>2]=0;f[u+384+20>>2]=1.0;c[u+384+24>>2]=0;c[u+384+24+4>>2]=0;c[u+384+24+8>>2]=0;c[u+384+24+12>>2]=0;f[u+384+40>>2]=1.0;f[u+384+44>>2]=0.0;c[u+384+48>>2]=c[a>>2];c[u+384+48+4>>2]=c[a+4>>2];c[u+384+48+8>>2]=c[a+8>>2];c[u+384+48+12>>2]=c[a+12>>2];a=e;k=a+36|0;do{c[a>>2]=0;a=a+4|0}while((a|0)<(k|0));c[u+504>>2]=b;c[u+504+4>>2]=u+448;w=+f[d>>2];v=+f[d+16>>2];g=+f[d+32>>2];h=+f[d+4>>2];i=+f[d+20>>2];j=+f[d+36>>2];m=+f[d+8>>2];p=+f[d+24>>2];r=+f[d+40>>2];f[u+504+8>>2]=w+v*0.0+g*0.0;f[u+504+12>>2]=h+i*0.0+j*0.0;f[u+504+16>>2]=m+p*0.0+r*0.0;f[u+504+20>>2]=0.0;f[u+504+24>>2]=w*0.0+v+g*0.0;f[u+504+28>>2]=h*0.0+i+j*0.0;f[u+504+32>>2]=m*0.0+p+r*0.0;f[u+504+36>>2]=0.0;f[u+504+40>>2]=w*0.0+v*0.0+g;f[u+504+44>>2]=h*0.0+i*0.0+j;f[u+504+48>>2]=m*0.0+p*0.0+r;f[u+504+52>>2]=0.0;l=+f[u+384+48>>2]-+f[d+48>>2];n=+f[u+384+52>>2]-+f[d+52>>2];q=+f[u+384+56>>2]-+f[d+56>>2];f[u+504+56>>2]=w+v*0.0+g*0.0;f[u+504+60>>2]=w*0.0+v+g*0.0;f[u+504+64>>2]=w*0.0+v*0.0+g;f[u+504+68>>2]=0.0;f[u+504+72>>2]=h+i*0.0+j*0.0;f[u+504+76>>2]=h*0.0+i+j*0.0;f[u+504+80>>2]=h*0.0+i*0.0+j;f[u+504+84>>2]=0.0;f[u+504+88>>2]=m+p*0.0+r*0.0;f[u+504+92>>2]=m*0.0+p+r*0.0;f[u+504+96>>2]=m*0.0+p*0.0+r;f[u+504+100>>2]=0.0;f[u+504+104>>2]=l*w+n*v+q*g;f[u+504+108>>2]=l*h+n*i+q*j;f[u+504+112>>2]=l*m+n*p+q*r;f[u+504+116>>2]=0.0;c[u+504+120>>2]=82;c[u+504+124>>2]=0;c[u+364>>2]=0;c[u+128>>2]=0;c[u+128+4>>2]=0;c[u+128+8>>2]=0;c[u+128+12>>2]=0;c[u+376>>2]=2;c[u+368>>2]=0;f[u+144>>2]=0.0;c[u+648>>2]=1065353216;c[u+648+4>>2]=1065353216;c[u+648+8>>2]=1065353216;f[u+648+12>>2]=0.0;switch(Db(u,u+504|0,u+648|0)|0){case 0:{a=c[u+372>>2]|0;if(!(c[a+32>>2]|0)){j=0.0;i=0.0;g=0.0;p=0.0;n=0.0;h=0.0}else{g=0.0;i=0.0;j=0.0;h=0.0;n=0.0;p=0.0;t=0;do{r=+f[a+16+(t<<2)>>2];k=c[u+504+120>>2]|0;x=c[u+504+124>>2]|0;o=(c[u+504>>2]|0)+(1?x>>1:x)|0;if(x&1)k=c[(c[o>>2]|0)+k>>2]|0;Ma[k&127](u+648|0,o,c[a+(t<<2)>>2]|0);g=g+r*+f[u+648>>2];i=i+r*+f[u+648+4>>2];j=j+r*+f[u+648+8>>2];a=c[(c[u+372>>2]|0)+(t<<2)>>2]|0;l=-+f[a>>2];m=-+f[a+4>>2];q=-+f[a+8>>2];a=c[u+504+120>>2]|0;x=c[u+504+124>>2]|0;k=(c[u+504+4>>2]|0)+(1?x>>1:x)|0;if(x&1)a=c[(c[k>>2]|0)+a>>2]|0;w=+f[u+504+24>>2]*l+ +f[u+504+28>>2]*m+ +f[u+504+32>>2]*q;v=+f[u+504+40>>2]*l+ +f[u+504+44>>2]*m+ +f[u+504+48>>2]*q;f[u+632>>2]=+f[u+504+8>>2]*l+ +f[u+504+12>>2]*m+ +f[u+504+16>>2]*q;f[u+632+4>>2]=w;f[u+632+8>>2]=v;f[u+632+12>>2]=0.0;Ma[a&127](u+648|0,k,u+632|0);q=+f[u+648>>2];v=+f[u+648+4>>2];w=+f[u+648+8>>2];h=h+r*(q*+f[u+504+56>>2]+v*+f[u+504+60>>2]+w*+f[u+504+64>>2]+ +f[u+504+104>>2]);n=n+r*(q*+f[u+504+72>>2]+v*+f[u+504+76>>2]+w*+f[u+504+80>>2]+ +f[u+504+108>>2]);p=p+r*(q*+f[u+504+88>>2]+v*+f[u+504+92>>2]+w*+f[u+504+96>>2]+ +f[u+504+112>>2]);t=t+1|0;a=c[u+372>>2]|0}while(t>>>0<(c[a+32>>2]|0)>>>0)}q=g*+f[d>>2]+i*+f[d+4>>2]+j*+f[d+8>>2]+ +f[d+48>>2];r=g*+f[d+16>>2]+i*+f[d+20>>2]+j*+f[d+24>>2]+ +f[d+52>>2];l=g*+f[d+32>>2]+i*+f[d+36>>2]+j*+f[d+40>>2]+ +f[d+56>>2];f[e+4>>2]=q;f[e+8>>2]=r;f[e+12>>2]=l;f[e+16>>2]=0.0;j=h*+f[d>>2]+n*+f[d+4>>2]+p*+f[d+8>>2]+ +f[d+48>>2];m=h*+f[d+16>>2]+n*+f[d+20>>2]+p*+f[d+24>>2]+ +f[d+52>>2];i=h*+f[d+32>>2]+n*+f[d+36>>2]+p*+f[d+40>>2]+ +f[d+56>>2];f[e+20>>2]=j;f[e+24>>2]=m;f[e+28>>2]=i;f[e+32>>2]=0.0;switch(c[b+4>>2]|0){case 8:{g=+f[b+28>>2]*+f[b+12>>2];break}case 0:{g=+f[b+44>>2];break}case 1:{g=+f[b+44>>2];break}case 13:{g=+f[b+44>>2];break}case 11:{g=+f[b+44>>2];break}case 10:{g=+f[b+44>>2];break}case 4:case 5:{g=+f[b+44>>2];break}default:g=+ha[c[(c[b>>2]|0)+48>>2]&15](b)}switch(c[u+448+4>>2]|0){case 8:{h=+f[u+448+28>>2]*+f[u+448+12>>2];break}case 0:{h=+f[u+448+44>>2];break}case 1:{h=+f[u+448+44>>2];break}case 13:{h=+f[u+448+44>>2];break}case 11:{h=+f[u+448+44>>2];break}case 10:{h=+f[u+448+44>>2];break}case 4:case 5:{h=+f[u+448+44>>2];break}default:h=+ha[c[(c[u+448>>2]|0)+48>>2]&15](u+448|0)}w=g+h;v=+s(+((j-q)*(j-q)+(m-r)*(m-r)+(i-l)*(i-l)));f[e+36>>2]=(j-q)*(1.0/v);f[e+40>>2]=(m-r)*(1.0/v);f[e+44>>2]=(i-l)*(1.0/v);f[e+48>>2]=0.0;f[e+4>>2]=w*((j-q)*(1.0/v))+ +f[e+4>>2];f[e+8>>2]=w*((m-r)*(1.0/v))+ +f[e+8>>2];f[e+12>>2]=w*((i-l)*(1.0/v))+ +f[e+12>>2];w=v-w;ea=u;return +w}case 1:{if(!(Bb(b,d,u+448|0,u+384|0,u+128|0,e,1)|0)){w=3402823466385288598117041.0e14;ea=u;return +w}h=+f[e+4>>2]-+f[e+20>>2];j=+f[e+8>>2]-+f[e+24>>2];i=+f[e+12>>2]-+f[e+28>>2];g=+s(+(h*h+j*j+i*i));if(g>=1.1920928955078125e-07){f[e+36>>2]=h*(1.0/g);f[e+40>>2]=j*(1.0/g);f[e+44>>2]=i*(1.0/g);f[e+48>>2]=0.0}w=-g;ea=u;return +w}default:{w=3402823466385288598117041.0e14;ea=u;return +w}}return 0.0}function $b(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0;q=ea;ea=ea+224|0;p=(a[b+28>>0]|0)!=0;o=p?e:d;p=p?d:e;n=c[o+4>>2]|0;if((c[n+68>>2]|0)!=(c[b+40>>2]|0)){i=c[b+12>>2]|0;if((i|0)>0){k=0;do{j=c[(c[b+20>>2]|0)+(k<<2)>>2]|0;if(j|0){Ca[c[c[j>>2]>>2]&511](j);l=c[b+4>>2]|0;Ia[c[(c[l>>2]|0)+60>>2]&127](l,c[(c[b+20>>2]|0)+(k<<2)>>2]|0)}k=k+1|0}while((k|0)!=(i|0))}mg(b,d,e)}l=c[n+64>>2]|0;k=c[b+4>>2]|0;j=c[b+20>>2]|0;i=c[b+32>>2]|0;c[q+192>>2]=7304;c[q+192+4>>2]=o;c[q+192+8>>2]=p;c[q+192+12>>2]=k;c[q+192+16>>2]=g;c[q+192+20>>2]=h;c[q+192+24>>2]=j;c[q+192+28>>2]=i;a[q+128+16>>0]=1;g=q+128+12|0;c[g>>2]=0;c[q+128+4>>2]=0;c[q+128+8>>2]=0;i=c[b+12>>2]|0;if((i|0)>0){d=0;while(1){j=c[j+(d<<2)>>2]|0;if(j){Ia[c[(c[j>>2]|0)+16>>2]&127](j,q+128|0);i=c[q+128+4>>2]|0;if((i|0)>0){k=0;do{e=c[(c[g>>2]|0)+(k<<2)>>2]|0;if(c[e+748>>2]|0){c[h+4>>2]=e;i=c[e+740>>2]|0;j=c[(c[h+8>>2]|0)+8>>2]|0;if((i|0)==(j|0))Hd(e,i+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);else Hd(e,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,j+4|0);c[h+4>>2]=0;i=c[q+128+4>>2]|0}k=k+1|0}while((k|0)<(i|0))}if((i|0)<0){if((c[q+128+8>>2]|0)<0){j=c[g>>2]|0;if(j|0){if(a[q+128+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[g>>2]=0}a[q+128+16>>0]=1;c[g>>2]=0;c[q+128+8>>2]=0}do{c[(c[g>>2]|0)+(i<<2)>>2]=0;i=i+1|0}while((i|0)!=0)}c[q+128+4>>2]=0;i=c[b+12>>2]|0}d=d+1|0;if((d|0)>=(i|0))break;j=c[b+20>>2]|0}i=c[g>>2]|0;if(i|0){if(a[q+128+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[g>>2]=0}}if(!l){j=c[b+12>>2]|0;if((j|0)>0){i=0;do{Pd(q+192|0,c[(c[n+24>>2]|0)+(i*80|0)+64>>2]|0,i);i=i+1|0}while((i|0)<(j|0));m=40}}else{m=c[o+12>>2]|0;F=+f[m>>2];E=+f[m+16>>2];D=+f[m+32>>2];C=+f[m+4>>2];B=+f[m+20>>2];A=+f[m+36>>2];w=+f[m+8>>2];u=+f[m+24>>2];s=+f[m+40>>2];z=-+f[m+48>>2];y=-+f[m+52>>2];x=-+f[m+56>>2];m=c[p+12>>2]|0;O=+f[m>>2];N=+f[m+16>>2];M=+f[m+32>>2];L=+f[m+4>>2];K=+f[m+20>>2];J=+f[m+36>>2];I=+f[m+8>>2];H=+f[m+24>>2];G=+f[m+40>>2];v=+f[m+48>>2];t=+f[m+52>>2];r=+f[m+56>>2];f[q+48>>2]=F*O+E*N+D*M;f[q+48+4>>2]=F*L+E*K+D*J;f[q+48+8>>2]=F*I+E*H+D*G;f[q+48+12>>2]=0.0;f[q+48+16>>2]=C*O+B*N+A*M;f[q+48+20>>2]=C*L+B*K+A*J;f[q+48+24>>2]=C*I+B*H+A*G;f[q+48+28>>2]=0.0;f[q+48+32>>2]=w*O+u*N+s*M;f[q+48+36>>2]=w*L+u*K+s*J;f[q+48+40>>2]=w*I+u*H+s*G;f[q+48+44>>2]=0.0;f[q+48+48>>2]=F*z+E*y+D*x+(F*v+E*t+D*r);f[q+48+52>>2]=C*z+B*y+A*x+(C*v+B*t+A*r);f[q+48+56>>2]=w*z+u*y+s*x+(w*v+u*t+s*r);f[q+48+60>>2]=0.0;m=c[p+4>>2]|0;Pa[c[(c[m>>2]|0)+8>>2]&127](m,q+48|0,q+128|0,q+112|0);c[q+16>>2]=c[q+128>>2];c[q+16+4>>2]=c[q+128+4>>2];c[q+16+8>>2]=c[q+128+8>>2];c[q+16+12>>2]=c[q+128+12>>2];c[q+16+16>>2]=c[q+112>>2];c[q+16+16+4>>2]=c[q+112+4>>2];c[q+16+16+8>>2]=c[q+112+8>>2];c[q+16+16+12>>2]=c[q+112+12>>2];Zd(c[l>>2]|0,q+16|0,q+192|0);m=40}if((m|0)==40)j=c[b+12>>2]|0;if((j|0)<=0){ea=q;return}d=0;do{do if(c[(c[b+20>>2]|0)+(d<<2)>>2]|0){l=c[n+24>>2]|0;m=c[l+(d*80|0)+64>>2]|0;h=c[o+12>>2]|0;u=+f[h>>2];v=+f[h+4>>2];w=+f[h+8>>2];x=+f[h+16>>2];y=+f[h+20>>2];z=+f[h+24>>2];G=+f[h+32>>2];I=+f[h+36>>2];K=+f[h+40>>2];A=+f[l+(d*80|0)>>2];B=+f[l+(d*80|0)+16>>2];C=+f[l+(d*80|0)+32>>2];D=+f[l+(d*80|0)+4>>2];E=+f[l+(d*80|0)+20>>2];F=+f[l+(d*80|0)+36>>2];H=+f[l+(d*80|0)+8>>2];J=+f[l+(d*80|0)+24>>2];L=+f[l+(d*80|0)+40>>2];s=+f[l+(d*80|0)+48>>2];t=+f[l+(d*80|0)+52>>2];O=+f[l+(d*80|0)+56>>2];M=+f[h+48>>2]+(u*s+v*t+w*O);N=+f[h+52>>2]+(x*s+y*t+z*O);O=+f[h+56>>2]+(G*s+I*t+K*O);f[q+128>>2]=u*A+v*B+w*C;f[q+128+4>>2]=u*D+v*E+w*F;f[q+128+8>>2]=u*H+v*J+w*L;f[q+128+12>>2]=0.0;f[q+128+16>>2]=x*A+y*B+z*C;f[q+128+20>>2]=x*D+y*E+z*F;f[q+128+24>>2]=x*H+y*J+z*L;f[q+128+28>>2]=0.0;f[q+128+32>>2]=G*A+I*B+K*C;f[q+128+36>>2]=G*D+I*E+K*F;f[q+128+40>>2]=G*H+I*J+K*L;f[q+128+44>>2]=0.0;f[q+128+48>>2]=M;f[q+128+52>>2]=N;f[q+128+56>>2]=O;f[q+128+60>>2]=0.0;Pa[c[(c[m>>2]|0)+8>>2]&127](m,q+128|0,q+112|0,q+48|0);m=c[p+4>>2]|0;Pa[c[(c[m>>2]|0)+8>>2]&127](m,c[p+12>>2]|0,q+16|0,q);if(!(+f[q+112>>2]>+f[q>>2])?!(+f[q+48>>2]<+f[q+16>>2]):0)i=1;else i=0;if(!(!(+f[q+112+8>>2]>+f[q+8>>2])?!(+f[q+48+8>>2]<+f[q+16+8>>2]):0))i=0;if(!(+f[q+112+4>>2]>+f[q+4>>2])?!(+f[q+48+4>>2]<+f[q+16+4>>2]|i^1):0)break;m=c[(c[b+20>>2]|0)+(d<<2)>>2]|0;Ca[c[c[m>>2]>>2]&511](m);m=c[b+4>>2]|0;Ia[c[(c[m>>2]|0)+60>>2]&127](m,c[(c[b+20>>2]|0)+(d<<2)>>2]|0);c[(c[b+20>>2]|0)+(d<<2)>>2]=0}while(0);d=d+1|0}while((d|0)<(j|0));ea=q;return}function ac(a,b,h,i){a=a|0;b=b|0;h=h|0;i=i|0;var j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0,q=0,r=0,s=0,t=0;n=ea;ea=ea+80|0;h=ra[c[(c[a>>2]|0)+28>>2]&127](a)|0;j=+f[a+4>>2];k=+f[a+8>>2];l=+f[a+12>>2];if((h|0)<=0){ea=n;return}m=0;do{Za[c[(c[a>>2]|0)+16>>2]&3](a,n+76|0,n+52|0,n+64|0,n+56|0,n+72|0,n+68|0,n+48|0,n+60|0,m);a:do switch(c[n+64>>2]|0){case 0:{switch(c[n+60>>2]|0){case 2:{if((c[n+48>>2]|0)<=0)break a;i=0;do{r=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;s=c[n+76>>2]|0;q=c[n+56>>2]|0;t=s+(z(q,c[r>>2]|0)|0)|0;p=k*+f[t+4>>2];o=l*+f[t+8>>2];f[n>>2]=j*+f[t>>2];f[n+4>>2]=p;f[n+8>>2]=o;f[n+12>>2]=0.0;t=s+(z(c[r+4>>2]|0,q)|0)|0;o=k*+f[t+4>>2];p=l*+f[t+8>>2];f[n+16>>2]=j*+f[t>>2];f[n+20>>2]=o;f[n+24>>2]=p;f[n+28>>2]=0.0;q=s+(z(c[r+8>>2]|0,q)|0)|0;p=k*+f[q+4>>2];o=l*+f[q+8>>2];f[n+32>>2]=j*+f[q>>2];f[n+36>>2]=p;f[n+40>>2]=o;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}case 3:{if((c[n+48>>2]|0)<=0)break a;i=0;do{t=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;r=c[n+76>>2]|0;s=c[n+56>>2]|0;q=r+(z(s,e[t>>1]|0)|0)|0;o=k*+f[q+4>>2];p=l*+f[q+8>>2];f[n>>2]=j*+f[q>>2];f[n+4>>2]=o;f[n+8>>2]=p;f[n+12>>2]=0.0;q=r+(z(s,e[t+2>>1]|0)|0)|0;p=k*+f[q+4>>2];o=l*+f[q+8>>2];f[n+16>>2]=j*+f[q>>2];f[n+20>>2]=p;f[n+24>>2]=o;f[n+28>>2]=0.0;t=r+(z(s,e[t+4>>1]|0)|0)|0;o=k*+f[t+4>>2];p=l*+f[t+8>>2];f[n+32>>2]=j*+f[t>>2];f[n+36>>2]=o;f[n+40>>2]=p;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}case 5:{if((c[n+48>>2]|0)<=0)break a;i=0;do{t=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;r=c[n+76>>2]|0;s=c[n+56>>2]|0;q=r+(z(s,d[t>>0]|0)|0)|0;o=k*+f[q+4>>2];p=l*+f[q+8>>2];f[n>>2]=j*+f[q>>2];f[n+4>>2]=o;f[n+8>>2]=p;f[n+12>>2]=0.0;q=r+(z(s,d[t+1>>0]|0)|0)|0;p=k*+f[q+4>>2];o=l*+f[q+8>>2];f[n+16>>2]=j*+f[q>>2];f[n+20>>2]=p;f[n+24>>2]=o;f[n+28>>2]=0.0;t=r+(z(s,d[t+2>>0]|0)|0)|0;o=k*+f[t+4>>2];p=l*+f[t+8>>2];f[n+32>>2]=j*+f[t>>2];f[n+36>>2]=o;f[n+40>>2]=p;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}default:break a}break}case 1:{switch(c[n+60>>2]|0){case 2:{if((c[n+48>>2]|0)<=0)break a;i=0;do{s=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;r=c[n+76>>2]|0;t=c[n+56>>2]|0;q=r+(z(t,c[s>>2]|0)|0)|0;o=k*+g[q+8>>3];p=l*+g[q+16>>3];f[n>>2]=j*+g[q>>3];f[n+4>>2]=o;f[n+8>>2]=p;f[n+12>>2]=0.0;q=r+(z(c[s+4>>2]|0,t)|0)|0;p=k*+g[q+8>>3];o=l*+g[q+16>>3];f[n+16>>2]=j*+g[q>>3];f[n+20>>2]=p;f[n+24>>2]=o;f[n+28>>2]=0.0;t=r+(z(c[s+8>>2]|0,t)|0)|0;o=k*+g[t+8>>3];p=l*+g[t+16>>3];f[n+32>>2]=j*+g[t>>3];f[n+36>>2]=o;f[n+40>>2]=p;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}case 3:{if((c[n+48>>2]|0)<=0)break a;i=0;do{t=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;r=c[n+76>>2]|0;s=c[n+56>>2]|0;q=r+(z(s,e[t>>1]|0)|0)|0;o=k*+g[q+8>>3];p=l*+g[q+16>>3];f[n>>2]=j*+g[q>>3];f[n+4>>2]=o;f[n+8>>2]=p;f[n+12>>2]=0.0;q=r+(z(s,e[t+2>>1]|0)|0)|0;p=k*+g[q+8>>3];o=l*+g[q+16>>3];f[n+16>>2]=j*+g[q>>3];f[n+20>>2]=p;f[n+24>>2]=o;f[n+28>>2]=0.0;t=r+(z(s,e[t+4>>1]|0)|0)|0;o=k*+g[t+8>>3];p=l*+g[t+16>>3];f[n+32>>2]=j*+g[t>>3];f[n+36>>2]=o;f[n+40>>2]=p;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}case 5:{if((c[n+48>>2]|0)<=0)break a;i=0;do{t=(c[n+72>>2]|0)+(z(c[n+68>>2]|0,i)|0)|0;r=c[n+76>>2]|0;s=c[n+56>>2]|0;q=r+(z(s,d[t>>0]|0)|0)|0;o=k*+g[q+8>>3];p=l*+g[q+16>>3];f[n>>2]=j*+g[q>>3];f[n+4>>2]=o;f[n+8>>2]=p;f[n+12>>2]=0.0;q=r+(z(s,d[t+1>>0]|0)|0)|0;p=k*+g[q+8>>3];o=l*+g[q+16>>3];f[n+16>>2]=j*+g[q>>3];f[n+20>>2]=p;f[n+24>>2]=o;f[n+28>>2]=0.0;t=r+(z(s,d[t+2>>0]|0)|0)|0;o=k*+g[t+8>>3];p=l*+g[t+16>>3];f[n+32>>2]=j*+g[t>>3];f[n+36>>2]=o;f[n+40>>2]=p;f[n+44>>2]=0.0;Pa[c[(c[b>>2]|0)+8>>2]&127](b,n,m,i);i=i+1|0}while((i|0)<(c[n+48>>2]|0));break}default:break a}break}default:{}}while(0);Ia[c[(c[a>>2]|0)+24>>2]&127](a,m);m=m+1|0}while((m|0)!=(h|0));ea=n;return}function bc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0;c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];c[b+8>>2]=c[a+8>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+16+4>>2]=c[a+16+4>>2];c[b+16+8>>2]=c[a+16+8>>2];c[b+16+12>>2]=c[a+16+12>>2];c[b+32>>2]=c[a+32>>2];c[b+32+4>>2]=c[a+32+4>>2];c[b+32+8>>2]=c[a+32+8>>2];c[b+32+12>>2]=c[a+32+12>>2];s=+f[a+20>>2];m=+f[a+40>>2];p=+f[a+24>>2];n=+f[a+36>>2];o=+f[a+32>>2];u=+f[a+16>>2];v=+f[a>>2];w=+f[a+4>>2];q=+f[a+8>>2];x=1.0/((s*m-p*n)*v+w*(p*o-m*u)+(n*u-s*o)*q);f[d>>2]=(s*m-p*n)*x;f[d+4>>2]=(n*q-m*w)*x;f[d+8>>2]=(p*w-s*q)*x;f[d+12>>2]=0.0;f[d+16>>2]=(p*o-m*u)*x;f[d+20>>2]=(m*v-o*q)*x;f[d+24>>2]=(u*q-p*v)*x;f[d+28>>2]=0.0;f[d+32>>2]=(n*u-s*o)*x;f[d+36>>2]=(o*w-n*v)*x;f[d+40>>2]=(s*v-u*w)*x;f[d+44>>2]=0.0;a:do if(!(c[6393]|0)){e=b;g=b+40|0;h=b+24|0;i=b+8|0;j=b+36|0;k=b+20|0;l=b+4|0}else{F=(s*m-p*n)*x;G=(p*o-m*u)*x;H=(n*u-s*o)*x;I=(n*q-m*w)*x;E=(m*v-o*q)*x;C=(o*w-n*v)*x;D=(p*w-s*q)*x;B=(u*q-p*v)*x;n=(s*v-u*w)*x;e=0;while(1){p=+r(+F);o=+r(+G);N=+r(+H);W=+r(+I);O=+r(+E);M=+r(+C);Q=+r(+D);P=+r(+B);z=+r(+n);R=p+o+N>W+O+M?p+o+N:W+O+M;O=p+W+Q>o+O+P?p+W+Q:o+O+P;o=+f[b>>2];W=+r(+o);p=+f[b+16>>2];T=+r(+p);q=+f[b+32>>2];K=+r(+q);s=+f[b+4>>2];V=+r(+s);u=+f[b+20>>2];S=+r(+u);v=+f[b+36>>2];J=+r(+v);w=+f[b+8>>2];U=+r(+w);x=+f[b+24>>2];L=+r(+x);y=+f[b+40>>2];A=+r(+y);m=W+T+K>V+S+J?W+T+K:V+S+J;m=m>U+L+A?m:U+L+A;L=W+V+U>T+S+L?W+V+U:T+S+L;z=(R>Q+P+z?R:Q+P+z)*(O>N+M+z?O:N+M+z);A=m*(L>K+J+A?L:K+J+A);if(z<1.1920928955078125e-07|A<1.1920928955078125e-07){e=b;g=b+40|0;h=b+24|0;i=b+8|0;j=b+36|0;k=b+20|0;l=b+4|0;break a}W=+t(+(z/A),.25);O=(o*(W+-2.0)+1.0/W*F)*.5;Q=(s*(W+-2.0)+1.0/W*G)*.5;S=(w*(W+-2.0)+1.0/W*H)*.5;P=(p*(W+-2.0)+1.0/W*I)*.5;R=(u*(W+-2.0)+1.0/W*E)*.5;T=(x*(W+-2.0)+1.0/W*C)*.5;U=(q*(W+-2.0)+1.0/W*D)*.5;V=(v*(W+-2.0)+1.0/W*B)*.5;W=(y*(W+-2.0)+1.0/W*n)*.5;f[b>>2]=o+O;f[b+4>>2]=s+Q;f[b+8>>2]=w+S;f[b+12>>2]=0.0;f[b+16>>2]=p+P;f[b+20>>2]=u+R;f[b+24>>2]=x+T;f[b+28>>2]=0.0;f[b+32>>2]=q+U;f[b+36>>2]=v+V;f[b+40>>2]=y+W;f[b+44>>2]=0.0;N=1.0/((w+S)*((p+P)*(v+V)-(u+R)*(q+U))+((o+O)*((u+R)*(y+W)-(x+T)*(v+V))+(s+Q)*((x+T)*(q+U)-(p+P)*(y+W))));F=((u+R)*(y+W)-(x+T)*(v+V))*N;I=((w+S)*(v+V)-(s+Q)*(y+W))*N;D=((s+Q)*(x+T)-(w+S)*(u+R))*N;G=((x+T)*(q+U)-(p+P)*(y+W))*N;E=((o+O)*(y+W)-(w+S)*(q+U))*N;B=((w+S)*(p+P)-(o+O)*(x+T))*N;H=((p+P)*(v+V)-(u+R)*(q+U))*N;C=((s+Q)*(q+U)-(o+O)*(v+V))*N;n=((o+O)*(u+R)-(s+Q)*(p+P))*N;f[d>>2]=F;f[d+4>>2]=I;f[d+8>>2]=D;f[d+12>>2]=0.0;f[d+16>>2]=G;f[d+20>>2]=E;f[d+24>>2]=B;f[d+28>>2]=0.0;f[d+32>>2]=H;f[d+36>>2]=C;f[d+40>>2]=n;f[d+44>>2]=0.0;U=+r(+O)+ +r(+P)+ +r(+U);V=+r(+Q)+ +r(+R)+ +r(+V);W=+r(+S)+ +r(+T)+ +r(+W);V=U>V?U:V;if((V>W?V:W)<=m*+f[6392])break;e=e+1|0;if(e>>>0>=(c[6393]|0)>>>0){e=b;g=b+40|0;h=b+24|0;i=b+8|0;j=b+36|0;k=b+20|0;l=b+4|0;break a}}M=+f[b>>2];O=+f[b+16>>2];Q=+f[b+32>>2];K=+f[b+4>>2];L=+f[b+20>>2];S=+f[b+36>>2];F=+f[b+8>>2];G=+f[b+24>>2];U=+f[b+40>>2];N=+f[a>>2];P=+f[a+16>>2];R=+f[a+32>>2];H=+f[a+4>>2];I=+f[a+20>>2];J=+f[a+36>>2];C=+f[a+8>>2];D=+f[a+24>>2];E=+f[a+40>>2];W=F*C+G*D+U*E+(F*C+G*D+U*E);V=K*C+L*D+S*E+(F*H+G*I+U*J);T=K*H+L*I+S*J+(K*H+L*I+S*J);U=M*C+O*D+Q*E+(F*N+G*P+U*R);S=M*H+O*I+Q*J+(K*N+L*P+S*R);R=M*N+O*P+Q*R+(M*N+O*P+Q*R);V=V*.5;U=U*.5;S=S*.5;R=R*.5;f[d>>2]=R;f[d+4>>2]=S;f[d+8>>2]=U;f[d+12>>2]=0.0;f[d+16>>2]=S;T=T*.5;f[d+20>>2]=T;f[d+24>>2]=V;f[d+28>>2]=0.0;f[d+32>>2]=U;f[d+36>>2]=V;W=W*.5;f[d+40>>2]=W;f[d+44>>2]=0.0;return}while(0);M=+f[e>>2];O=+f[b+16>>2];Q=+f[b+32>>2];K=+f[l>>2];L=+f[k>>2];S=+f[j>>2];F=+f[i>>2];G=+f[h>>2];U=+f[g>>2];N=+f[a>>2];P=+f[a+16>>2];R=+f[a+32>>2];H=+f[a+4>>2];I=+f[a+20>>2];J=+f[a+36>>2];C=+f[a+8>>2];D=+f[a+24>>2];E=+f[a+40>>2];W=F*C+G*D+U*E+(F*C+G*D+U*E);V=K*C+L*D+S*E+(F*H+G*I+U*J);T=K*H+L*I+S*J+(K*H+L*I+S*J);U=M*C+O*D+Q*E+(F*N+G*P+U*R);S=M*H+O*I+Q*J+(K*N+L*P+S*R);R=M*N+O*P+Q*R+(M*N+O*P+Q*R);V=V*.5;U=U*.5;S=S*.5;R=R*.5;f[d>>2]=R;f[d+4>>2]=S;f[d+8>>2]=U;f[d+12>>2]=0.0;f[d+16>>2]=S;T=T*.5;f[d+20>>2]=T;f[d+24>>2]=V;f[d+28>>2]=0.0;f[d+32>>2]=U;f[d+36>>2]=V;W=W*.5;f[d+40>>2]=W;f[d+44>>2]=0.0;return}function cc(d,e,g,h,i){d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0.0,k=0,l=0.0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0;z=ea;ea=ea+128|0;a[d+60>>0]=g&1;if(g){q=+f[h>>2]+-1.0;t=+f[h+4>>2]+-1.0;s=+f[h+8>>2]+-1.0;f[d+4>>2]=q;f[d+8>>2]=t;f[d+12>>2]=s;f[d+16>>2]=0.0;v=+f[i>>2]+1.0;y=+f[i+4>>2]+1.0;x=+f[i+8>>2]+1.0;f[d+20>>2]=v;f[d+24>>2]=y;f[d+28>>2]=x;f[d+32>>2]=0.0;f[d+36>>2]=65533.0/(v-q);f[d+40>>2]=65533.0/(y-t);f[d+44>>2]=65533.0/(x-s);f[d+48>>2]=0.0;a[d+60>>0]=1;j=q+ +(~~((q-q)*(65533.0/(v-q)))&65535&-2&65535)/(65533.0/(v-q))+-1.0;l=t+ +(~~((t-t)*(65533.0/(y-t)))&65535&-2&65535)/(65533.0/(y-t))+-1.0;o=s+ +(~~((s-s)*(65533.0/(x-s)))&65535&-2&65535)/(65533.0/(x-s))+-1.0;if(j>2]=j;w=j}else w=q;if(l>2]=l;u=l}else u=t;if(o>2]=o;r=o;j=x-o}else{r=s;j=x-s}o=w+ +((~~(65533.0/(v-q)*(v-w)+1.0)&65535|1)&65535)/(65533.0/(v-q))+1.0;l=u+ +((~~(65533.0/(y-t)*(y-u)+1.0)&65535|1)&65535)/(65533.0/(y-t))+1.0;q=r+ +((~~(65533.0/(x-s)*j+1.0)&65535|1)&65535)/(65533.0/(x-s))+1.0;if(v>2]=o;else o=v;if(y>2]=l;else l=y;if(x>2]=q;j=q-r}f[d+36>>2]=65533.0/(o-w);f[d+40>>2]=65533.0/(l-u);f[d+44>>2]=65533.0/j;f[d+48>>2]=0.0;c[z+96>>2]=9332;c[z+96+4>>2]=d+104;c[z+96+8>>2]=d;Pa[c[(c[e>>2]|0)+8>>2]&127](e,z+96|0,d+4|0,d+20|0);g=c[d+108>>2]|0;c[z+80>>2]=0;c[z+80+4>>2]=0;c[z+80+8>>2]=0;c[z+80+12>>2]=0;k=c[d+128>>2]|0;if((k|0)<(g<<1|0)){if((c[d+132>>2]|0)<(g<<1|0)){if(!g){i=k;e=0}else{c[6747]=(c[6747]|0)+1;h=kb(g<<5|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[d+128>>2]|0;e=h}if((i|0)>0){h=0;do{p=e+(h<<4)|0;n=(c[d+136>>2]|0)+(h<<4)|0;c[p>>2]=c[n>>2];c[p+4>>2]=c[n+4>>2];c[p+8>>2]=c[n+8>>2];c[p+12>>2]=c[n+12>>2];h=h+1|0}while((h|0)!=(i|0))}h=c[d+136>>2]|0;if(h|0){if(a[d+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=e;c[d+132>>2]=g<<1;i=d+136|0}else i=d+136|0;h=k;do{p=(c[i>>2]|0)+(h<<4)|0;c[p>>2]=c[z+80>>2];c[p+4>>2]=c[z+80+4>>2];c[p+8>>2]=c[z+80+8>>2];c[p+12>>2]=c[z+80+12>>2];h=h+1|0}while((h|0)!=(g<<1|0))}c[d+128>>2]=g<<1}else{c[z+96>>2]=9352;c[z+96+4>>2]=d+64;c[z+80>>2]=-581039253;c[z+80+4>>2]=-581039253;c[z+80+8>>2]=-581039253;f[z+80+12>>2]=0.0;c[z+64>>2]=1566444395;c[z+64+4>>2]=1566444395;c[z+64+8>>2]=1566444395;f[z+64+12>>2]=0.0;Pa[c[(c[e>>2]|0)+8>>2]&127](e,z+96|0,z+80|0,z+64|0);g=c[d+68>>2]|0;k=z;n=k+64|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(n|0));p=c[d+88>>2]|0;if((p|0)<(g<<1|0)){if((c[d+92>>2]|0)<(g<<1|0)){if(!g){i=p;e=0}else{c[6747]=(c[6747]|0)+1;h=kb(g<<7|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[d+88>>2]|0;e=h}if((i|0)>0){h=0;do{k=e+(h<<6)|0;m=(c[d+96>>2]|0)+(h<<6)|0;n=k+64|0;do{c[k>>2]=c[m>>2];k=k+4|0;m=m+4|0}while((k|0)<(n|0));h=h+1|0}while((h|0)!=(i|0))}h=c[d+96>>2]|0;if(h|0){if(a[d+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=e;c[d+92>>2]=g<<1;i=d+96|0}else i=d+96|0;h=p;do{k=(c[i>>2]|0)+(h<<6)|0;m=z;n=k+64|0;do{c[k>>2]=c[m>>2];k=k+4|0;m=m+4|0}while((k|0)<(n|0));h=h+1|0}while((h|0)!=(g<<1|0))}c[d+88>>2]=g<<1}c[d+56>>2]=0;vb(d,0,g);if(a[d+60>>0]|0?(c[d+152>>2]|0)==0:0){if(!(c[d+156>>2]|0)){c[6747]=(c[6747]|0)+1;g=kb(51)|0;if(!g)e=0;else{c[(g+4+15&-16)+-4>>2]=g;e=g+4+15&-16}g=c[d+152>>2]|0;if((g|0)>0){h=0;do{p=e+(h<<5)|0;n=(c[d+160>>2]|0)+(h<<5)|0;c[p>>2]=c[n>>2];c[p+4>>2]=c[n+4>>2];c[p+8>>2]=c[n+8>>2];c[p+12>>2]=c[n+12>>2];c[p+16>>2]=c[n+16>>2];c[p+20>>2]=c[n+20>>2];c[p+24>>2]=c[n+24>>2];c[p+28>>2]=c[n+28>>2];h=h+1|0}while((h|0)!=(g|0))}g=c[d+160>>2]|0;if(g|0){if(a[d+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=e;c[d+156>>2]=1;i=(c[d+152>>2]|0)+1|0;g=e;h=d+160|0}else{i=1;g=c[d+160>>2]|0;h=d+160|0}c[d+152>>2]=i;c[g>>2]=c[z+96>>2];c[g+4>>2]=c[z+96+4>>2];c[g+8>>2]=c[z+96+8>>2];c[g+12>>2]=c[z+96+12>>2];c[g+16>>2]=c[z+96+16>>2];c[g+20>>2]=c[z+96+20>>2];c[g+24>>2]=c[z+96+24>>2];c[g+28>>2]=c[z+96+28>>2];p=c[h>>2]|0;n=c[d+136>>2]|0;b[p>>1]=b[n>>1]|0;b[p+2>>1]=b[n+2>>1]|0;b[p+4>>1]=b[n+4>>1]|0;b[p+6>>1]=b[n+6>>1]|0;b[p+8>>1]=b[n+8>>1]|0;b[p+10>>1]=b[n+10>>1]|0;c[p+12>>2]=0;n=c[n+12>>2]|0;c[p+16>>2]=(n|0)>-1?1:0-n|0}c[d+168>>2]=c[d+152>>2];g=c[d+116>>2]|0;if(g|0){if(a[d+120>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+116>>2]=0}a[d+120>>0]=1;c[d+116>>2]=0;c[d+108>>2]=0;c[d+112>>2]=0;g=c[d+76>>2]|0;if(!g){a[d+80>>0]=1;c[d+76>>2]=0;c[d+68>>2]=0;d=d+72|0;c[d>>2]=0;ea=z;return}if(a[d+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+76>>2]=0;a[d+80>>0]=1;c[d+76>>2]=0;c[d+68>>2]=0;d=d+72|0;c[d>>2]=0;ea=z;return}function dc(b,d,e,g,h,i){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0,ba=0.0,ca=0.0,da=0.0,fa=0,ga=0.0;fa=ea;ea=ea+32|0;J=c[b+4>>2]|0;a[J+312>>0]=0;c[J>>2]=0;a[J+356>>0]=1;c[J+292>>2]=1566444395;c[J+296>>2]=1566444395;c[J+300>>2]=1566444395;f[J+304>>2]=0.0;c[J+336>>2]=0;c[J+336+4>>2]=0;c[J+336+8>>2]=0;c[J+336+12>>2]=0;a[J+336+16>>0]=0;a[J+332>>0]=a[J+332>>0]&-16;k=+f[d+48>>2];o=+f[d+52>>2];p=+f[d+56>>2];q=+f[g+48>>2];r=+f[g+52>>2];t=+f[g+56>>2];K=+f[d>>2];Q=+f[d+4>>2];R=+f[d+8>>2];S=+f[d+16>>2];L=+f[d+20>>2];M=+f[d+24>>2];N=+f[d+32>>2];O=+f[d+36>>2];P=+f[d+40>>2];T=+f[g>>2];Z=+f[g+4>>2];_=+f[g+8>>2];$=+f[g+16>>2];U=+f[g+20>>2];V=+f[g+24>>2];W=+f[g+32>>2];X=+f[g+36>>2];Y=+f[g+40>>2];ba=+f[e+48>>2]-k-(+f[h+48>>2]-q);da=+f[e+52>>2]-o-(+f[h+52>>2]-r);ca=+f[e+56>>2]-p-(+f[h+56>>2]-t);J=c[b+8>>2]|0;A=c[(c[J>>2]|0)+64>>2]|0;f[fa>>2]=K*-ba+S*-da+N*-ca;f[fa+4>>2]=Q*-ba+L*-da+O*-ca;f[fa+8>>2]=R*-ba+M*-da+P*-ca;f[fa+12>>2]=0.0;Ma[A&127](fa+16|0,J,fa);H=+f[fa+16>>2];I=+f[fa+16+4>>2];G=+f[fa+16+8>>2];v=H*+f[d>>2]+I*+f[d+4>>2]+G*+f[d+8>>2]+ +f[d+48>>2];x=H*+f[d+16>>2]+I*+f[d+20>>2]+G*+f[d+24>>2]+ +f[d+52>>2];G=H*+f[d+32>>2]+I*+f[d+36>>2]+G*+f[d+40>>2]+ +f[d+56>>2];J=c[b+12>>2]|0;A=c[(c[J>>2]|0)+64>>2]|0;I=ba*+f[g+4>>2]+da*+f[g+20>>2]+ca*+f[g+36>>2];H=ba*+f[g+8>>2]+da*+f[g+24>>2]+ca*+f[g+40>>2];f[fa>>2]=ba*+f[g>>2]+da*+f[g+16>>2]+ca*+f[g+32>>2];f[fa+4>>2]=I;f[fa+8>>2]=H;f[fa+12>>2]=0.0;Ma[A&127](fa+16|0,J,fa);H=+f[fa+16>>2];I=+f[fa+16+4>>2];w=+f[fa+16+8>>2];v=v-(H*+f[g>>2]+I*+f[g+4>>2]+w*+f[g+8>>2]+ +f[g+48>>2]);x=x-(H*+f[g+16>>2]+I*+f[g+20>>2]+w*+f[g+24>>2]+ +f[g+52>>2]);w=G-(H*+f[g+32>>2]+I*+f[g+36>>2]+w*+f[g+40>>2]+ +f[g+56>>2]);a:do if(v*v+x*x+w*w>9.999999747378752e-05){m=0.0;l=0.0;n=0.0;I=k;k=0.0;J=32;j=0;u=0;B=x;while(1){if(!J)break a;J=J+-1|0;A=c[b+8>>2]|0;z=c[(c[A>>2]|0)+64>>2]|0;F=-v;ga=-B;x=-w;f[fa>>2]=K*F+S*ga+N*x;f[fa+4>>2]=Q*F+L*ga+O*x;f[fa+8>>2]=R*F+M*ga+P*x;f[fa+12>>2]=0.0;Ma[z&127](fa+16|0,A,fa);x=+f[fa+16>>2];ga=+f[fa+16+4>>2];F=+f[fa+16+8>>2];D=I+(K*x+Q*ga+R*F);H=o+(S*x+L*ga+M*F);F=p+(N*x+O*ga+P*F);A=c[b+12>>2]|0;z=c[(c[A>>2]|0)+64>>2]|0;f[fa>>2]=T*v+$*B+W*w;f[fa+4>>2]=Z*v+U*B+X*w;f[fa+8>>2]=_*v+V*B+Y*w;f[fa+12>>2]=0.0;Ma[z&127](fa+16|0,A,fa);ga=+f[fa+16>>2];x=+f[fa+16+4>>2];E=+f[fa+16+8>>2];C=q+(T*ga+Z*x+_*E);G=r+($*ga+U*x+V*E);E=t+(W*ga+X*x+Y*E);x=(D-C)*v+(H-G)*B+(F-E)*w;if(k>1.0){j=0;aa=24;break}if(x>0.0){l=ba*v+da*B+ca*w;if(l>=-1.4210854715202004e-14){j=0;aa=24;break}k=k-x/l;l=v;m=B;n=w;x=(1.0-k)*+f[d+48>>2]+k*+f[e+48>>2];o=(1.0-k)*+f[d+52>>2]+k*+f[e+52>>2];p=(1.0-k)*+f[d+56>>2]+k*+f[e+56>>2];q=(1.0-k)*+f[g+48>>2]+k*+f[h+48>>2];r=(1.0-k)*+f[g+52>>2]+k*+f[h+52>>2];t=(1.0-k)*+f[g+56>>2]+k*+f[h+56>>2];j=u}else x=I;z=c[b+4>>2]|0;A=c[z>>2]|0;if((A|0)>0){v=+f[z+308>>2];u=0;y=0;do{B=D-C-+f[z+4+(y<<4)>>2];I=H-G-+f[z+4+(y<<4)+4>>2];ga=F-E-+f[z+4+(y<<4)+8>>2];u=u|B*B+I*I+ga*ga<=v;y=y+1|0}while((y|0)!=(A|0))}else u=0;if((+f[z+304>>2]==0.0?F-E==+f[z+300>>2]:0)?H-G==+f[z+296>>2]:0){if(!(D-C==+f[z+292>>2]|u))aa=16}else if(!u)aa=16;if((aa|0)==16){aa=0;f[z+292>>2]=D-C;f[z+296>>2]=H-G;f[z+300>>2]=F-E;f[z+304>>2]=0.0;a[z+356>>0]=1;f[z+4+(A<<4)>>2]=D-C;f[z+4+(A<<4)+4>>2]=H-G;f[z+4+(A<<4)+8>>2]=F-E;f[z+4+(A<<4)+12>>2]=0.0;A=c[z>>2]|0;f[z+84+(A<<4)>>2]=D;f[z+84+(A<<4)+4>>2]=H;f[z+84+(A<<4)+8>>2]=F;f[z+84+(A<<4)+12>>2]=0.0;A=c[z>>2]|0;f[z+164+(A<<4)>>2]=C;f[z+164+(A<<4)+4>>2]=G;f[z+164+(A<<4)+8>>2]=E;f[z+164+(A<<4)+12>>2]=0.0;c[z>>2]=(c[z>>2]|0)+1;z=c[b+4>>2]|0}A=nb(z)|0;v=+f[z+276>>2];B=+f[z+280>>2];w=+f[z+284>>2];if(!A)break a;if(!(v*v+B*B+w*w>9.999999747378752e-05))break a;else{I=x;u=c[z+288>>2]|0}}if((aa|0)==24){ea=fa;return j|0}}else{n=0.0;m=0.0;l=0.0;k=0.0;j=0}while(0);f[i+164>>2]=k;k=l*l+m*m+n*n;if(!(k>=1.4210854715202004e-14)){c[i+132>>2]=0;c[i+132+4>>2]=0;c[i+132+8>>2]=0;c[i+132+12>>2]=0;k=0.0;l=0.0;m=0.0}else{ga=1.0/+s(+k);k=l*ga;l=m*ga;m=n*ga;f[i+132>>2]=k;f[i+136>>2]=l;f[i+140>>2]=m;c[i+144>>2]=j}if(ba*k+da*l+ca*m>=-+f[i+172>>2]){b=0;ea=fa;return b|0}b=c[b+4>>2]|0;nb(b)|0;mp(i+148|0,b+260|0,16)|0;b=1;ea=fa;return b|0}function ec(b,d,e,g,i,j,k,l,m,n,o){b=b|0;d=d|0;e=e|0;g=g|0;i=i|0;j=j|0;k=k|0;l=l|0;m=+m;n=+n;o=+o;var p=0,q=0,r=0.0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0.0,P=0.0,Q=0.0;N=c[b+68>>2]|0;if((N|0)==(c[b+72>>2]|0)?(t=(N|0)==0?1:N<<1,(N|0)<(t|0)):0){if(!t){q=N;s=0}else{c[6747]=(c[6747]|0)+1;p=kb((t*152|3)+16|0)|0;if(!p)p=0;else{c[(p+4+15&-16)+-4>>2]=p;p=p+4+15&-16}q=c[b+68>>2]|0;s=p}if((q|0)>0){p=0;do{vh(s+(p*152|0)|0,(c[b+76>>2]|0)+(p*152|0)|0,152)|0;p=p+1|0}while((p|0)!=(q|0))}p=c[b+76>>2]|0;if(p|0){if(a[b+80>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[p+-4>>2]|0)}c[b+76>>2]=0}a[b+80>>0]=1;c[b+76>>2]=s;c[b+72>>2]=t;p=c[b+68>>2]|0}else p=N;c[b+68>>2]=p+1;M=c[b+76>>2]|0;c[M+(N*152|0)+140>>2]=i;s=c[b+16>>2]|0;p=c[s+(e*244|0)+240>>2]|0;t=c[s+(g*244|0)+240>>2]|0;c[M+(N*152|0)+144>>2]=e;c[M+(N*152|0)+148>>2]=g;q=c[j+84>>2]|0;c[M+(N*152|0)+104>>2]=q;c[M+(N*152|0)+132>>2]=0;f[M+(N*152|0)+100>>2]=0.0;f[M+(N*152|0)+96>>2]=0.0;I=(c[h>>2]=q,+f[h>>2]);if(p|0){c[M+(N*152|0)+16>>2]=c[d>>2];c[M+(N*152|0)+16+4>>2]=c[d+4>>2];c[M+(N*152|0)+16+8>>2]=c[d+8>>2];c[M+(N*152|0)+16+12>>2]=c[d+12>>2];L=+f[k+4>>2];D=+f[M+(N*152|0)+24>>2];H=+f[k+8>>2];J=+f[M+(N*152|0)+20>>2];E=+f[M+(N*152|0)+16>>2];K=+f[k>>2];f[M+(N*152|0)>>2]=L*D-H*J;f[M+(N*152|0)+4>>2]=H*E-D*K;f[M+(N*152|0)+8>>2]=J*K-L*E;f[M+(N*152|0)+12>>2]=0.0;v=((L*D-H*J)*+f[p+264>>2]+(H*E-D*K)*+f[p+268>>2]+(J*K-L*E)*+f[p+272>>2])*+f[p+544>>2];r=((L*D-H*J)*+f[p+280>>2]+(H*E-D*K)*+f[p+284>>2]+(J*K-L*E)*+f[p+288>>2])*+f[p+548>>2];u=((L*D-H*J)*+f[p+296>>2]+(H*E-D*K)*+f[p+300>>2]+(J*K-L*E)*+f[p+304>>2])*+f[p+552>>2];f[M+(N*152|0)+64>>2]=v;f[M+(N*152|0)+68>>2]=r;f[M+(N*152|0)+72>>2]=u;f[M+(N*152|0)+76>>2]=0.0;z=E;A=J;B=D;C=L*D-H*J;D=H*E-D*K;E=J*K-L*E}else{c[M+(N*152|0)+64>>2]=0;c[M+(N*152|0)+64+4>>2]=0;c[M+(N*152|0)+64+8>>2]=0;c[M+(N*152|0)+64+12>>2]=0;c[M+(N*152|0)>>2]=0;c[M+(N*152|0)+4>>2]=0;c[M+(N*152|0)+8>>2]=0;c[M+(N*152|0)+12>>2]=0;c[M+(N*152|0)+16>>2]=0;c[M+(N*152|0)+20>>2]=0;c[M+(N*152|0)+24>>2]=0;c[M+(N*152|0)+28>>2]=0;r=0.0;u=0.0;v=0.0;z=0.0;A=0.0;B=0.0;C=0.0;D=0.0;E=0.0}if(t|0){J=-+f[d>>2];K=-+f[d+4>>2];L=-+f[d+8>>2];f[M+(N*152|0)+48>>2]=J;f[M+(N*152|0)+52>>2]=K;f[M+(N*152|0)+56>>2]=L;f[M+(N*152|0)+60>>2]=0.0;H=+f[l+4>>2];G=+f[l+8>>2];O=+f[l>>2];f[M+(N*152|0)+32>>2]=H*L-G*K;f[M+(N*152|0)+36>>2]=G*J-O*L;f[M+(N*152|0)+40>>2]=O*K-H*J;f[M+(N*152|0)+44>>2]=0.0;w=((H*L-G*K)*+f[t+264>>2]+(G*J-O*L)*+f[t+268>>2]+(O*K-H*J)*+f[t+272>>2])*+f[t+544>>2];x=((H*L-G*K)*+f[t+280>>2]+(G*J-O*L)*+f[t+284>>2]+(O*K-H*J)*+f[t+288>>2])*+f[t+548>>2];y=((H*L-G*K)*+f[t+296>>2]+(G*J-O*L)*+f[t+300>>2]+(O*K-H*J)*+f[t+304>>2])*+f[t+552>>2];f[M+(N*152|0)+80>>2]=w;f[M+(N*152|0)+84>>2]=x;f[M+(N*152|0)+88>>2]=y;f[M+(N*152|0)+92>>2]=0.0;F=H*L-G*K;G=G*J-O*L;H=O*K-H*J}else{c[M+(N*152|0)+80>>2]=0;c[M+(N*152|0)+80+4>>2]=0;c[M+(N*152|0)+80+8>>2]=0;c[M+(N*152|0)+80+12>>2]=0;c[M+(N*152|0)+32>>2]=0;c[M+(N*152|0)+32+4>>2]=0;c[M+(N*152|0)+32+8>>2]=0;c[M+(N*152|0)+32+12>>2]=0;c[M+(N*152|0)+32+16>>2]=0;c[M+(N*152|0)+32+20>>2]=0;c[M+(N*152|0)+32+24>>2]=0;c[M+(N*152|0)+32+28>>2]=0;F=0.0;G=0.0;H=0.0;w=0.0;x=0.0;y=0.0;J=0.0;K=0.0;L=0.0}if(p|0){Q=+f[k+8>>2];P=+f[k+4>>2];O=+f[k>>2];u=+f[p+344>>2]+((r*Q-u*P)*+f[d>>2]+(u*O-Q*v)*+f[d+4>>2]+(P*v-r*O)*+f[d+8>>2])}else u=0.0;if(t|0){P=-w;r=-x;x=-y;y=+f[l+8>>2];O=+f[l+4>>2];Q=+f[l>>2];r=+f[t+344>>2]+((y*r-O*x)*+f[d>>2]+(Q*x-y*P)*+f[d+4>>2]+(O*P-Q*r)*+f[d+8>>2])}else r=0.0;x=m/(u+r);f[M+(N*152|0)+108>>2]=x;if(p|0){u=+f[s+(e*244|0)+192>>2];v=+f[s+(e*244|0)+196>>2];w=+f[s+(e*244|0)+200>>2];r=(+f[s+(e*244|0)+176>>2]+ +f[s+(e*244|0)+208>>2])*z+(+f[s+(e*244|0)+180>>2]+ +f[s+(e*244|0)+212>>2])*A+(+f[s+(e*244|0)+184>>2]+ +f[s+(e*244|0)+216>>2])*B}else{u=0.0;v=0.0;w=0.0;r=z*0.0+A*0.0+B*0.0}r=r+(u*C+v*D+w*E);if(t|0){m=+f[s+(g*244|0)+192>>2];O=+f[s+(g*244|0)+196>>2];Q=+f[s+(g*244|0)+200>>2];P=(+f[s+(g*244|0)+176>>2]+ +f[s+(g*244|0)+208>>2])*J+(+f[s+(g*244|0)+180>>2]+ +f[s+(g*244|0)+212>>2])*K+(+f[s+(g*244|0)+184>>2]+ +f[s+(g*244|0)+216>>2])*L;m=m*F;O=O*G;O=m+O;Q=Q*H;Q=O+Q;Q=P+Q;Q=r+Q;Q=n-Q;Q=x*Q;g=M+(N*152|0)+112|0;f[g>>2]=Q;g=M+(N*152|0)+116|0;f[g>>2]=o;Q=-I;g=M+(N*152|0)+120|0;f[g>>2]=Q;g=M+(N*152|0)+124|0;c[g>>2]=q;return}else{m=0.0;O=0.0;Q=0.0;P=J*0.0+K*0.0+L*0.0;m=m*F;O=O*G;O=m+O;Q=Q*H;Q=O+Q;Q=P+Q;Q=r+Q;Q=n-Q;Q=x*Q;g=M+(N*152|0)+112|0;f[g>>2]=Q;g=M+(N*152|0)+116|0;f[g>>2]=o;Q=-I;g=M+(N*152|0)+120|0;f[g>>2]=Q;g=M+(N*152|0)+124|0;c[g>>2]=q;return}}function fc(b,d,e,g,h,i,j,k,l,m,n){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,A=0,B=0,C=0,D=0.0,E=0,F=0;if((j|0)<2|(k|0)<2){n=0;return n|0}x=z(k,j)|0;c[6747]=(c[6747]|0)+1;b=kb(x>>>0>268435455?18:(x<<4|3)+16|0)|0;if(!b)A=0;else{c[(b+4+15&-16)+-4>>2]=b;A=b+4+15&-16}y=GJ(x>>>0>1073741823?-1:x<<2)|0;o=0;do{D=+(o|0)/+(k+-1|0);q=+f[e>>2];q=q+D*(+f[h>>2]-q);r=+f[e+4>>2];r=r+D*(+f[h+4>>2]-r);t=+f[e+8>>2];t=t+D*(+f[h+8>>2]-t);u=+f[g>>2];v=+f[g+4>>2];w=+f[g+8>>2];u=u+D*(+f[i>>2]-u)-q;v=v+D*(+f[i+4>>2]-v)-r;w=w+D*(+f[i+8>>2]-w)-t;p=z(o,j)|0;b=0;do{D=+(b|0)/+(j+-1|0);C=b+p|0;f[A+(C<<4)>>2]=q+u*D;f[A+(C<<4)+4>>2]=r+v*D;f[A+(C<<4)+8>>2]=t+w*D;f[A+(C<<4)+12>>2]=0.0;f[y+(C<<2)>>2]=1.0;b=b+1|0}while((b|0)!=(j|0));o=o+1|0}while((o|0)!=(k|0));c[6747]=(c[6747]|0)+1;b=kb(1271)|0;if(!b)b=0;else{c[(b+4+15&-16)+-4>>2]=b;b=b+4+15&-16}ub(b,d,x,A,y);if(l&1|0){f[(c[b+720>>2]|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&2|0){f[(c[b+720>>2]|0)+((j+-1|0)*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&4|0){C=z(k+-1|0,j)|0;f[(c[b+720>>2]|0)+(C*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&8|0){C=j+-1+(z(k+-1|0,j)|0)|0;f[(c[b+720>>2]|0)+(C*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&16|0){f[(c[b+720>>2]|0)+(((j+-1|0)/2|0)*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&32|0){C=z((k+-1|0)/2|0,j)|0;f[(c[b+720>>2]|0)+(C*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&64|0){C=j+-1+(z((k+-1|0)/2|0,j)|0)|0;f[(c[b+720>>2]|0)+(C*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&128|0){C=(z(k+-1|0,j)|0)+((j+-1|0)/2|0)|0;f[(c[b+720>>2]|0)+(C*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(!(l&256)){B=b+924|0;C=b+720|0}else{B=(z((k+-1|0)/2|0,j)|0)+((j+-1|0)/2|0)|0;C=b+720|0;f[(c[C>>2]|0)+(B*104|0)+88>>2]=0.0;B=b+924|0;a[B>>0]=1}c[6748]=(c[6748]|0)+1;uc(c[A+-4>>2]|0);HJ(y);d=b+732|0;A=b+740|0;l=0;o=0;do{p=l;l=l+1|0;a:do if((j|0)>0){y=z(p,j)|0;x=z(l,j)|0;r=1.0/+(k+-1|0)*+(k+-1-p|0);q=1.0/+(k+-1|0)*+(k+-2-p|0);if((l|0)>=(k|0)){p=0;while(1){e=p;p=p+1|0;if((p|0)<(j|0)){g=p+y|0;h=c[C>>2]|0;mh(b,0);x=(c[d>>2]|0)+-1|0;i=c[A>>2]|0;c[i+(x*52|0)+8>>2]=h+((e+y|0)*104|0);c[i+(x*52|0)+12>>2]=h+(g*104|0);v=+f[h+((e+y|0)*104|0)+8>>2]-+f[h+(g*104|0)+8>>2];w=+f[h+((e+y|0)*104|0)+12>>2]-+f[h+(g*104|0)+12>>2];D=+f[h+((e+y|0)*104|0)+16>>2]-+f[h+(g*104|0)+16>>2];f[i+(x*52|0)+16>>2]=+s(+(v*v+w*w+D*D));a[B>>0]=1}if((p|0)==(j|0))break a}}i=0;do{g=i;i=i+1|0;e=i+y|0;h=i+x|0;p=c[C>>2]|0;if((i|0)<(j|0)){mh(b,0);F=(c[d>>2]|0)+-1|0;E=c[A>>2]|0;c[E+(F*52|0)+8>>2]=p+((g+y|0)*104|0);c[E+(F*52|0)+12>>2]=p+(e*104|0);D=+f[p+((g+y|0)*104|0)+8>>2]-+f[p+(e*104|0)+8>>2];w=+f[p+((g+y|0)*104|0)+12>>2]-+f[p+(e*104|0)+12>>2];v=+f[p+((g+y|0)*104|0)+16>>2]-+f[p+(e*104|0)+16>>2];f[E+(F*52|0)+16>>2]=+s(+(D*D+w*w+v*v));a[B>>0]=1;F=c[C>>2]|0;mh(b,0);p=(c[d>>2]|0)+-1|0;E=c[A>>2]|0;c[E+(p*52|0)+8>>2]=F+((g+y|0)*104|0);c[E+(p*52|0)+12>>2]=F+((g+x|0)*104|0);v=+f[F+((g+y|0)*104|0)+8>>2]-+f[F+((g+x|0)*104|0)+8>>2];w=+f[F+((g+y|0)*104|0)+12>>2]-+f[F+((g+x|0)*104|0)+12>>2];D=+f[F+((g+y|0)*104|0)+16>>2]-+f[F+((g+x|0)*104|0)+16>>2];f[E+(p*52|0)+16>>2]=+s(+(v*v+w*w+D*D));a[B>>0]=1;af(b,g+y|0,g+x|0,h,0);if(!n)af(b,h,e,g+y|0,0);else{D=1.0/+(j+-1|0)*+(g|0);f[n+(o<<2)>>2]=D;f[n+(o+1<<2)>>2]=r;f[n+(o+2<<2)>>2]=D;f[n+(o+3<<2)>>2]=q;w=1.0/+(j+-1|0)*+(i|0);f[n+(o+4<<2)>>2]=w;f[n+(o+5<<2)>>2]=q;af(b,h,e,g+y|0,0);f[n+(o+6<<2)>>2]=w;f[n+(o+7<<2)>>2]=q;f[n+(o+8<<2)>>2]=w;f[n+(o+9<<2)>>2]=r;f[n+(o+10<<2)>>2]=D;f[n+(o+11<<2)>>2]=r}if(m){e=c[C>>2]|0;mh(b,0);F=(c[d>>2]|0)+-1|0;E=c[A>>2]|0;c[E+(F*52|0)+8>>2]=e+((g+y|0)*104|0);c[E+(F*52|0)+12>>2]=e+(h*104|0);v=+f[e+((g+y|0)*104|0)+8>>2]-+f[e+(h*104|0)+8>>2];w=+f[e+((g+y|0)*104|0)+12>>2]-+f[e+(h*104|0)+12>>2];D=+f[e+((g+y|0)*104|0)+16>>2]-+f[e+(h*104|0)+16>>2];f[E+(F*52|0)+16>>2]=+s(+(v*v+w*w+D*D));a[B>>0]=1}o=o+12|0}else{mh(b,0);F=(c[d>>2]|0)+-1|0;E=c[A>>2]|0;c[E+(F*52|0)+8>>2]=p+((g+y|0)*104|0);c[E+(F*52|0)+12>>2]=p+((g+x|0)*104|0);v=+f[p+((g+y|0)*104|0)+8>>2]-+f[p+((g+x|0)*104|0)+8>>2];w=+f[p+((g+y|0)*104|0)+12>>2]-+f[p+((g+x|0)*104|0)+12>>2];D=+f[p+((g+y|0)*104|0)+16>>2]-+f[p+((g+x|0)*104|0)+16>>2];f[E+(F*52|0)+16>>2]=+s(+(v*v+w*w+D*D));a[B>>0]=1}}while((i|0)!=(j|0))}while(0)}while((l|0)!=(k|0));return b|0}function gc(b,d,e){b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0;D=+f[b+48>>2];h=+f[d>>2];E=+f[b+64>>2];j=+f[d+4>>2];J=+f[b+80>>2];p=+f[d+8>>2];t=+f[b+52>>2];r=+f[b+68>>2];q=+f[b+84>>2];z=+f[b+56>>2];I=+f[b+72>>2];A=+f[b+88>>2];w=+f[d+16>>2];v=+f[d+20>>2];u=+f[d+24>>2];H=+f[d+32>>2];F=+f[d+36>>2];G=+f[d+40>>2];k=+f[b+96>>2];g=+f[b+100>>2];C=+f[b+104>>2];B=+f[d+48>>2]+(h*k+j*g+p*C);i=w*k+v*g+u*C+ +f[d+52>>2];C=H*k+F*g+G*C+ +f[d+56>>2];f[b+1064>>2]=D*h+E*j+J*p;f[b+1068>>2]=h*t+j*r+p*q;f[b+1072>>2]=h*z+j*I+p*A;f[b+1076>>2]=0.0;f[b+1080>>2]=D*w+E*v+J*u;f[b+1084>>2]=t*w+r*v+q*u;f[b+1088>>2]=z*w+I*v+A*u;f[b+1092>>2]=0.0;f[b+1096>>2]=D*H+E*F+J*G;f[b+1100>>2]=t*H+r*F+q*G;f[b+1104>>2]=z*H+I*F+A*G;f[b+1108>>2]=0.0;f[b+1112>>2]=B;f[b+1116>>2]=i;f[b+1120>>2]=C;f[b+1124>>2]=0.0;C=+f[b+112>>2];i=+f[e>>2];B=+f[b+128>>2];G=+f[e+4>>2];A=+f[b+144>>2];F=+f[e+8>>2];I=+f[b+116>>2];H=+f[b+132>>2];z=+f[b+148>>2];q=+f[b+120>>2];r=+f[b+136>>2];t=+f[b+152>>2];J=+f[e+16>>2];E=+f[e+20>>2];D=+f[e+24>>2];u=+f[e+32>>2];v=+f[e+36>>2];w=+f[e+40>>2];p=+f[b+160>>2];j=+f[b+164>>2];h=+f[b+168>>2];g=+f[e+48>>2]+(i*p+G*j+F*h);k=J*p+E*j+D*h+ +f[e+52>>2];h=u*p+v*j+w*h+ +f[e+56>>2];f[b+1128>>2]=C*i+B*G+A*F;f[b+1132>>2]=i*I+G*H+F*z;f[b+1136>>2]=i*q+G*r+F*t;f[b+1140>>2]=0.0;f[b+1144>>2]=C*J+B*E+A*D;f[b+1148>>2]=I*J+H*E+z*D;f[b+1152>>2]=q*J+r*E+t*D;f[b+1156>>2]=0.0;f[b+1160>>2]=C*u+B*v+A*w;f[b+1164>>2]=I*u+H*v+z*w;f[b+1168>>2]=q*u+r*v+t*w;f[b+1172>>2]=0.0;f[b+1176>>2]=g;f[b+1180>>2]=k;f[b+1184>>2]=h;f[b+1188>>2]=0.0;g=g-+f[b+1112>>2];k=k-+f[b+1116>>2];h=h-+f[b+1120>>2];z=+f[b+1084>>2];H=+f[b+1104>>2];I=+f[b+1088>>2];A=+f[b+1100>>2];B=+f[b+1096>>2];C=+f[b+1080>>2];D=+f[b+1064>>2];E=+f[b+1068>>2];J=+f[b+1072>>2];F=1.0/((z*H-I*A)*D+E*(I*B-H*C)+(A*C-z*B)*J);G=(A*C-z*B)*F;i=h*((I*E-z*J)*F)+(g*((z*H-I*A)*F)+k*((A*J-H*E)*F));j=h*((C*J-I*D)*F)+(g*((I*B-H*C)*F)+k*((H*D-B*J)*F));k=h*((z*D-C*E)*F)+(g*G+k*((B*E-A*D)*F));f[b+1256>>2]=i;f[b+1260>>2]=j;f[b+1264>>2]=k;f[b+1268>>2]=0.0;f[b+840>>2]=i;g=+f[b+680>>2];h=+f[b+696>>2];do if(!(g>h)){if(g>i){c[b+856>>2]=2;g=i-g;break}if(h>2]=1;g=i-h;break}else{c[b+856>>2]=0;g=0.0;break}}else{c[b+856>>2]=0;g=0.0}while(0);f[b+824>>2]=g;f[b+844>>2]=j;g=+f[b+684>>2];h=+f[b+700>>2];do if(!(g>h)){if(g>j){c[b+860>>2]=2;g=j-g;break}if(h>2]=1;g=j-h;break}else{c[b+860>>2]=0;g=0.0;break}}else{c[b+860>>2]=0;g=0.0}while(0);f[b+828>>2]=g;f[b+848>>2]=k;g=+f[b+688>>2];h=+f[b+704>>2];do if(!(g>h)){if(g>k){c[b+864>>2]=2;g=k-g;break}if(h>2]=1;g=k-h;break}else{c[b+864>>2]=0;g=0.0;break}}else{c[b+864>>2]=0;g=0.0}while(0);f[b+832>>2]=g;n=+f[b+1128>>2];o=+f[b+1144>>2];p=+f[b+1160>>2];h=+f[b+1132>>2];i=+f[b+1148>>2];j=+f[b+1164>>2];k=(z*H-I*A)*F*h+(A*J-H*E)*F*i+(I*E-z*J)*F*j;m=h*((I*B-H*C)*F)+(H*D-B*J)*F*i+(C*J-I*D)*F*j;l=p*((z*D-C*E)*F)+(n*G+o*((B*E-A*D)*F));g=G*+f[b+1136>>2]+(B*E-A*D)*F*+f[b+1152>>2]+(z*D-C*E)*F*(q*u+r*v+t*w);do if(l<1.0)if(l>-1.0){f[b+1192>>2]=+y(+-(h*G+(B*E-A*D)*F*i+(z*D-C*E)*F*j),+g);g=l<-1.0?-1.0:l;f[b+1196>>2]=+x(+(g>1.0?1.0:g));g=+y(+-(p*((C*J-I*D)*F)+(n*((I*B-H*C)*F)+o*((H*D-B*J)*F))),+(p*((I*E-z*J)*F)+(n*((z*H-I*A)*F)+o*((A*J-H*E)*F))));break}else{f[b+1192>>2]=-+y(+k,+m);f[b+1196>>2]=-1.5707963705062866;g=0.0;break}else{f[b+1192>>2]=+y(+k,+m);f[b+1196>>2]=1.5707963705062866;g=0.0}while(0);f[b+1200>>2]=g;f[b+1236>>2]=0.0;A=H*(n*H-p*J)-I*(o*J-n*I);B=J*(o*J-n*I)-H*(p*I-o*H);C=I*(p*I-o*H)-J*(n*H-p*J);f[b+1220>>2]=0.0;E=o*(o*J-n*I)-p*(n*H-p*J);F=p*(p*I-o*H)-n*(o*J-n*I);G=n*(n*H-p*J)-o*(p*I-o*H);f[b+1252>>2]=0.0;D=1.0/+s(+(A*A+B*B+C*C));f[b+1208>>2]=A*D;f[b+1212>>2]=B*D;f[b+1216>>2]=C*D;D=1.0/+s(+((o*J-n*I)*(o*J-n*I)+((n*H-p*J)*(n*H-p*J)+(p*I-o*H)*(p*I-o*H))));f[b+1224>>2]=(p*I-o*H)*D;f[b+1228>>2]=(n*H-p*J)*D;f[b+1232>>2]=(o*J-n*I)*D;J=1.0/+s(+(E*E+F*F+G*G));f[b+1240>>2]=E*J;f[b+1244>>2]=F*J;f[b+1248>>2]=G*J;if(!(a[b+1301>>0]|0))return;I=+f[(c[b+28>>2]|0)+344>>2];J=+f[(c[b+32>>2]|0)+344>>2];a[b+1280>>0]=(I<1.1920928955078125e-07|J<1.1920928955078125e-07)&1;J=I+J>0.0?J/(I+J):.5;f[b+1272>>2]=J;f[b+1276>>2]=1.0-J;return}function hc(b,d){b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;q=ea;ea=ea+32|0;lf(b+4|0,((z(c[b+152>>2]|0,c[b+16>>2]|0)|0)/100|0)+1|0);if(c[b+164>>2]|0){o=((z(c[b+148>>2]|0,c[b+76>>2]|0)|0)/100|0)+1|0;lf(b+64|0,o);o=(c[b+164>>2]|0)-o|0;c[b+164>>2]=(o|0)>0?o:0}e=((c[b+144>>2]|0)+1|0)%2|0;c[b+144>>2]=e;e=c[b+124+(e<<2)>>2]|0;if(e|0){do{j=e+56|0;l=e;e=c[j>>2]|0;i=c[l+52>>2]|0;if(!i)i=b+124+(c[l+60>>2]<<2)|0;else i=i+56|0;c[i>>2]=e;i=c[j>>2]|0;if(i|0)c[i+52>>2]=c[l+52>>2];c[l+52>>2]=0;c[j>>2]=c[b+132>>2];i=c[b+132>>2]|0;if(i|0)c[i+52>>2]=l;c[b+132>>2]=l;i=c[l+48>>2]|0;jg(b+4|0,i)|0;j=c[b+8>>2]|0;if(j|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[b+8>>2]=i;c[b+16>>2]=(c[b+16>>2]|0)+-1;c[q>>2]=c[l+16>>2];c[q+4>>2]=c[l+16+4>>2];c[q+8>>2]=c[l+16+8>>2];c[q+12>>2]=c[l+16+12>>2];c[q+16>>2]=c[l+32>>2];c[q+16+4>>2]=c[l+32+4>>2];c[q+16+8>>2]=c[l+32+8>>2];c[q+16+12>>2]=c[l+32+12>>2];i=c[b+68>>2]|0;if(!i){c[6747]=(c[6747]|0)+1;i=kb(63)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=i;k=j+44|0;do{c[j>>2]=0;j=j+4|0}while((j|0)<(k|0))}else c[b+68>>2]=0;c[i+32>>2]=0;c[i+36>>2]=l;c[i+40>>2]=0;c[i>>2]=c[q>>2];c[i+4>>2]=c[q+4>>2];c[i+8>>2]=c[q+8>>2];c[i+12>>2]=c[q+12>>2];c[i+16>>2]=c[q+16>>2];c[i+20>>2]=c[q+20>>2];c[i+24>>2]=c[q+24>>2];c[i+28>>2]=c[q+28>>2];je(b+64|0,c[b+64>>2]|0,i);j=(c[b+76>>2]|0)+1|0;c[b+76>>2]=j;c[l+48>>2]=i;c[l+60>>2]=2}while((e|0)!=0);c[b+164>>2]=j;a[b+194>>0]=1}c[q>>2]=10216;c[q+4>>2]=b;if(a[b+193>>0]|0?(md(b+4|0,c[b+4>>2]|0,c[b+64>>2]|0,q),a[b+193>>0]|0):0){o=c[b+4>>2]|0;md(b+4|0,o,o,q)}if(a[b+194>>0]|0?(m=c[b+136>>2]|0,m=ra[c[(c[m>>2]|0)+28>>2]&127](m)|0,g=c[m+4>>2]|0,(g|0)>0):0){e=(z(c[b+156>>2]|0,g)|0)/100|0;o=c[b+160>>2]|0;e=(o|0)>(e|0)?o:e;e=(g|0)<(e|0)?g:e;if((e|0)>0){i=0;do{k=((c[b+184>>2]|0)+i|0)%(g|0)|0;n=c[m+12>>2]|0;j=c[n+(k<<4)>>2]|0;k=c[n+(k<<4)+4>>2]|0;n=c[j+48>>2]|0;o=c[k+48>>2]|0;if(!(((((+f[n>>2]<=+f[o+16>>2]?+f[n+16>>2]>=+f[o>>2]:0)?+f[n+4>>2]<=+f[o+20>>2]:0)?+f[n+20>>2]>=+f[o+4>>2]:0)?+f[n+8>>2]<=+f[o+24>>2]:0)?+f[n+24>>2]>=+f[o+8>>2]:0)){g=c[b+136>>2]|0;wa[c[(c[g>>2]|0)+12>>2]&31](g,j,k,d)|0;g=c[m+4>>2]|0;i=i+-1|0;e=e+-1|0}i=i+1|0}while((i|0)<(e|0));if((g|0)>0)p=37;else e=0}else p=37;if((p|0)==37)e=((c[b+184>>2]|0)+e|0)%(g|0)|0;c[b+184>>2]=e}c[b+180>>2]=(c[b+180>>2]|0)+1;c[b+160>>2]=1;a[b+194>>0]=0;g=c[b+168>>2]|0;e=c[b+172>>2]|0;if(!g)h=0.0;else h=+(e>>>0)/+(g>>>0);f[b+176>>2]=h;c[b+172>>2]=1?e>>>1:e;c[b+168>>2]=1?g>>>1:g;o=c[b+136>>2]|0;if(!(ra[c[(c[o>>2]|0)+56>>2]&127](o)|0)){ea=q;return}o=c[b+136>>2]|0;o=ra[c[(c[o>>2]|0)+28>>2]&127](o)|0;e=c[o+4>>2]|0;if((e|0)>1){qd(o,0,e+-1|0);e=c[o+4>>2]|0}if((e|0)>0){m=0;l=0;n=0;i=0;while(1){k=c[o+12>>2]|0;j=k+(m<<4)|0;r=n;n=c[j>>2]|0;k=k+(m<<4)+4|0;g=c[k>>2]|0;if(!((n|0)==(r|0)&(g|0)==(i|0))){i=c[n+48>>2]|0;r=c[g+48>>2]|0;if(((((+f[i>>2]<=+f[r+16>>2]?+f[i+16>>2]>=+f[r>>2]:0)?+f[i+4>>2]<=+f[r+20>>2]:0)?+f[i+20>>2]>=+f[r+4>>2]:0)?+f[i+8>>2]<=+f[r+24>>2]:0)?+f[i+24>>2]>=+f[r+8>>2]:0)i=l;else p=53}else{g=i;p=53}if((p|0)==53){p=0;e=c[b+136>>2]|0;Ma[c[(c[e>>2]|0)+32>>2]&127](e,j,d);c[j>>2]=0;c[k>>2]=0;e=c[o+4>>2]|0;i=l+1|0}m=m+1|0;if((m|0)>=(e|0))break;else{l=i;i=g}}if((e|0)>1){qd(o,0,e+-1|0);e=c[o+4>>2]|0}k=e-i|0;if((i|0)<0){if((c[o+8>>2]|0)<(k|0)){if(!k){i=e;j=0}else{c[6747]=(c[6747]|0)+1;g=kb((k<<4|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}i=c[o+4>>2]|0;j=g}if((i|0)>0){g=0;do{r=c[o+12>>2]|0;c[j+(g<<4)>>2]=c[r+(g<<4)>>2];c[j+(g<<4)+4>>2]=c[r+(g<<4)+4>>2];c[j+(g<<4)+8>>2]=c[r+(g<<4)+8>>2];c[j+(g<<4)+12>>2]=c[r+(g<<4)+12>>2];g=g+1|0}while((g|0)!=(i|0))}g=c[o+12>>2]|0;if(g|0){if(a[o+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[o+12>>2]=0}a[o+16>>0]=1;c[o+12>>2]=j;c[o+8>>2]=k}do{r=(c[o+12>>2]|0)+(e<<4)|0;e=e+1|0;c[r>>2]=0;c[r+4>>2]=0;c[r+8>>2]=0;c[r+12>>2]=0}while((e|0)!=(k|0));e=k}else e=k}c[o+4>>2]=e;ea=q;return}function ic(b){b=b|0;var d=0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0,w=0,x=0.0,y=0;v=ea;ea=ea+176|0;if(!(a[b+527>>0]|0)){ea=v;return}f[b+36>>2]=0.0;f[b+520>>2]=0.0;f[b+516>>2]=0.0;c[b+576>>2]=0;c[b+576+4>>2]=0;c[b+576+8>>2]=0;c[b+576+12>>2]=0;if(!(a[b+524>>0]|0)){w=c[b+28>>2]|0;j=+f[b+348>>2];k=+f[b+352>>2];q=+f[b+356>>2];u=j*+f[w+20>>2]+k*+f[w+24>>2]+q*+f[w+28>>2]+ +f[w+56>>2];d=c[b+32>>2]|0;l=+f[b+412>>2];m=+f[b+416>>2];n=+f[b+420>>2];t=l*+f[d+20>>2]+m*+f[d+24>>2]+n*+f[d+28>>2]+ +f[d+56>>2];p=l*+f[d+36>>2]+m*+f[d+40>>2]+n*+f[d+44>>2]+ +f[d+60>>2];o=j*+f[w+4>>2]+k*+f[w+8>>2]+q*+f[w+12>>2]+ +f[w+52>>2];q=j*+f[w+36>>2]+k*+f[w+40>>2]+q*+f[w+44>>2]+ +f[w+60>>2];n=l*+f[d+4>>2]+m*+f[d+8>>2]+n*+f[d+12>>2]+ +f[d+52>>2];if((n-o)*(n-o)+(t-u)*(t-u)+(p-q)*(p-q)>1.1920928955078125e-07){i=1.0/+s(+((n-o)*(n-o)+(t-u)*(t-u)+(p-q)*(p-q)));f[v>>2]=(n-o)*i;f[v+4>>2]=(t-u)*i;f[v+8>>2]=(p-q)*i;c[v+12>>2]=0;h=(p-q)*i;e=(t-u)*i;i=(n-o)*i}else{c[v>>2]=1065353216;c[v+4>>2]=0;c[v+8>>2]=0;f[v+12>>2]=0.0;h=0.0;e=0.0;i=1.0}if(+r(+h)>.7071067690849304){x=h*h+e*e;m=1.0/+s(+x);l=-(h*m);e=e*m;g=e;j=i*l;k=0.0;m=x*m;e=-(i*e)}else{k=i*i+e*e;j=1.0/+s(+k);e=-(e*j);m=i*j;g=0.0;j=k*j;k=e;l=m;m=-(h*m);e=h*e}f[v+16>>2]=k;f[v+20>>2]=l;f[v+24>>2]=g;f[v+32>>2]=m;f[v+36>>2]=e;f[v+40>>2]=j;w=c[b+28>>2]|0;c[v+128>>2]=c[w+4>>2];c[v+128+4>>2]=c[w+20>>2];c[v+128+8>>2]=c[w+36>>2];f[v+128+12>>2]=0.0;c[v+128+16>>2]=c[w+8>>2];c[v+128+20>>2]=c[w+24>>2];c[v+128+24>>2]=c[w+40>>2];f[v+128+28>>2]=0.0;c[v+128+32>>2]=c[w+12>>2];c[v+128+36>>2]=c[w+28>>2];c[v+128+40>>2]=c[w+44>>2];f[v+128+44>>2]=0.0;d=c[b+32>>2]|0;c[v+80>>2]=c[d+4>>2];c[v+80+4>>2]=c[d+20>>2];c[v+80+8>>2]=c[d+36>>2];f[v+80+12>>2]=0.0;c[v+80+16>>2]=c[d+8>>2];c[v+80+20>>2]=c[d+24>>2];c[v+80+24>>2]=c[d+40>>2];f[v+80+28>>2]=0.0;c[v+80+32>>2]=c[d+12>>2];c[v+80+36>>2]=c[d+28>>2];c[v+80+40>>2]=c[d+44>>2];f[v+80+44>>2]=0.0;x=u-+f[w+56>>2];m=q-+f[w+60>>2];f[v+64>>2]=o-+f[w+52>>2];f[v+64+4>>2]=x;f[v+64+8>>2]=m;f[v+64+12>>2]=0.0;m=t-+f[d+56>>2];x=p-+f[d+60>>2];f[v+48>>2]=n-+f[d+52>>2];f[v+48+4>>2]=m;f[v+48+8>>2]=x;f[v+48+12>>2]=0.0;_f(b+48|0,v+128|0,v+80|0,v+64|0,v+48|0,v,w+396|0,+f[w+344>>2],d+396|0,+f[d+344>>2]);d=c[b+28>>2]|0;c[v+128>>2]=c[d+4>>2];c[v+128+4>>2]=c[d+20>>2];c[v+128+8>>2]=c[d+36>>2];f[v+128+12>>2]=0.0;c[v+128+16>>2]=c[d+8>>2];c[v+128+20>>2]=c[d+24>>2];c[v+128+24>>2]=c[d+40>>2];f[v+128+28>>2]=0.0;c[v+128+32>>2]=c[d+12>>2];c[v+128+36>>2]=c[d+28>>2];c[v+128+40>>2]=c[d+44>>2];f[v+128+44>>2]=0.0;w=c[b+32>>2]|0;c[v+80>>2]=c[w+4>>2];c[v+80+4>>2]=c[w+20>>2];c[v+80+8>>2]=c[w+36>>2];f[v+80+12>>2]=0.0;c[v+80+16>>2]=c[w+8>>2];c[v+80+20>>2]=c[w+24>>2];c[v+80+24>>2]=c[w+40>>2];f[v+80+28>>2]=0.0;c[v+80+32>>2]=c[w+12>>2];c[v+80+36>>2]=c[w+28>>2];c[v+80+40>>2]=c[w+44>>2];f[v+80+44>>2]=0.0;x=u-+f[d+56>>2];m=q-+f[d+60>>2];f[v+64>>2]=o-+f[d+52>>2];f[v+64+4>>2]=x;f[v+64+8>>2]=m;f[v+64+12>>2]=0.0;m=t-+f[w+56>>2];x=p-+f[w+60>>2];f[v+48>>2]=n-+f[w+52>>2];f[v+48+4>>2]=m;f[v+48+8>>2]=x;f[v+48+12>>2]=0.0;_f(b+132|0,v+128|0,v+80|0,v+64|0,v+48|0,v+16|0,d+396|0,+f[d+344>>2],w+396|0,+f[w+344>>2]);w=c[b+28>>2]|0;c[v+128>>2]=c[w+4>>2];c[v+128+4>>2]=c[w+20>>2];c[v+128+8>>2]=c[w+36>>2];f[v+128+12>>2]=0.0;c[v+128+16>>2]=c[w+8>>2];c[v+128+20>>2]=c[w+24>>2];c[v+128+24>>2]=c[w+40>>2];f[v+128+28>>2]=0.0;c[v+128+32>>2]=c[w+12>>2];c[v+128+36>>2]=c[w+28>>2];c[v+128+40>>2]=c[w+44>>2];f[v+128+44>>2]=0.0;d=c[b+32>>2]|0;c[v+80>>2]=c[d+4>>2];c[v+80+4>>2]=c[d+20>>2];c[v+80+8>>2]=c[d+36>>2];f[v+80+12>>2]=0.0;c[v+80+16>>2]=c[d+8>>2];c[v+80+20>>2]=c[d+24>>2];c[v+80+24>>2]=c[d+40>>2];f[v+80+28>>2]=0.0;c[v+80+32>>2]=c[d+12>>2];c[v+80+36>>2]=c[d+28>>2];c[v+80+40>>2]=c[d+44>>2];f[v+80+44>>2]=0.0;x=u-+f[w+56>>2];u=q-+f[w+60>>2];f[v+64>>2]=o-+f[w+52>>2];f[v+64+4>>2]=x;f[v+64+8>>2]=u;f[v+64+12>>2]=0.0;u=t-+f[d+56>>2];x=p-+f[d+60>>2];f[v+48>>2]=n-+f[d+52>>2];f[v+48+4>>2]=u;f[v+48+8>>2]=x;f[v+48+12>>2]=0.0;_f(b+216|0,v+128|0,v+80|0,v+64|0,v+48|0,v+32|0,w+396|0,+f[w+344>>2],d+396|0,+f[d+344>>2]);d=b+32|0}else d=b+32|0;y=c[b+28>>2]|0;w=c[d>>2]|0;pb(b,y+4|0,w+4|0,y+264|0,w+264|0);ea=v;return}function jc(a,d,g,h,i,j,k,l,m){a=a|0;d=d|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0,E=0,F=0,G=0;w=+f[a+8>>2];y=+f[a+12>>2];A=+f[a+16>>2];x=+f[a+40>>2];r=(+f[d>>2]-w)*x;z=+f[a+44>>2];t=(+f[d+4>>2]-y)*z;B=+f[a+48>>2];u=(+f[d+8>>2]-A)*B;if(!(r<=0.0)){v=b[a+6>>1]|0;v=b[a+4>>1]&(!(r>=+(v&65535))?~~r&65535:v)}else v=0;if(!(t<=0.0)){s=b[a+6>>1]|0;s=b[a+4>>1]&(!(t>=+(s&65535))?~~t&65535:s)}else s=0;if(!(u<=0.0)){q=b[a+6>>1]|0;q=b[a+4>>1]&(!(u>=+(q&65535))?~~u&65535:q)}else q=0;u=(+f[g>>2]-w)*x;t=(+f[g+4>>2]-y)*z;r=(+f[g+8>>2]-A)*B;if(!(u<=0.0)){p=b[a+6>>1]|0;p=b[a+4>>1]&(!(u>=+(p&65535))?~~u&65535:p)|1}else p=1;if(!(t<=0.0)){o=b[a+6>>1]|0;o=b[a+4>>1]&(!(t>=+(o&65535))?~~t&65535:o)|1}else o=1;if(!(r<=0.0)){n=b[a+6>>1]|0;n=b[a+4>>1]&(!(r>=+(n&65535))?~~r&65535:n)|1}else n=1;D=b[a+64>>1]|0;C=c[a+60>>2]|0;b[a+64>>1]=b[C+((D&65535)<<6)+48>>1]|0;E=(b[a+56>>1]|0)+1<<16>>16;b[a+56>>1]=E;c[C+((D&65535)<<6)+12>>2]=D&65535;c[C+((D&65535)<<6)>>2]=i;b[C+((D&65535)<<6)+4>>1]=j;b[C+((D&65535)<<6)+6>>1]=k;c[C+((D&65535)<<6)+8>>2]=m;m=(E&65535)<<1&65534;b[C+54>>1]=(e[C+54>>1]|0)+2;F=c[a+68>>2]|0;G=e[F+(m+-1<<2)>>1]|e[F+(m+-1<<2)+2>>1]<<16;b[F+((m|1)<<2)>>1]=G;b[F+((m|1)<<2)+2>>1]=G>>>16;F=c[a+68>>2]|0;b[F+(m+-1<<2)>>1]=v;b[F+(m+-1<<2)+2>>1]=D;b[F+(m<<2)>>1]=p;b[F+(m<<2)+2>>1]=D;b[C+((D&65535)<<6)+48>>1]=m+-1;b[C+((D&65535)<<6)+54>>1]=(E&65535)<<1;p=(c[a+60>>2]|0)+56|0;b[p>>1]=(e[p>>1]|0)+2;p=c[a+72>>2]|0;v=e[p+(m+-1<<2)>>1]|e[p+(m+-1<<2)+2>>1]<<16;b[p+((m|1)<<2)>>1]=v;b[p+((m|1)<<2)+2>>1]=v>>>16;p=c[a+72>>2]|0;b[p+(m+-1<<2)>>1]=s;b[p+(m+-1<<2)+2>>1]=D;b[p+(m<<2)>>1]=o;b[p+(m<<2)+2>>1]=D;b[C+((D&65535)<<6)+50>>1]=m+-1;b[C+((D&65535)<<6)+56>>1]=(E&65535)<<1;p=(c[a+60>>2]|0)+58|0;b[p>>1]=(e[p>>1]|0)+2;p=c[a+76>>2]|0;s=e[p+(m+-1<<2)>>1]|e[p+(m+-1<<2)+2>>1]<<16;b[p+((m|1)<<2)>>1]=s;b[p+((m|1)<<2)+2>>1]=s>>>16;p=c[a+76>>2]|0;b[p+(m+-1<<2)>>1]=q;b[p+(m+-1<<2)+2>>1]=D;b[p+(m<<2)>>1]=n;b[p+(m<<2)+2>>1]=D;b[C+((D&65535)<<6)+52>>1]=m+-1;b[C+((D&65535)<<6)+58>>1]=(E&65535)<<1;p=c[a+68>>2]|0;s=e[C+((D&65535)<<6)+48>>1]|0;o=c[a+60>>2]|0;n=b[p+(s<<2)+-4>>1]|0;if((e[p+(s<<2)>>1]|0)<(n&65535)){v=o+((e[p+(s<<2)+2>>1]|0)<<6)+48|0;q=p+(s<<2)|0;p=p+(s<<2)+-4|0;while(1){G=e[q+-2>>1]|0;n=(n&1)==0?o+(G<<6)+48|0:o+(G<<6)+54|0;b[n>>1]=(b[n>>1]|0)+1<<16>>16;b[v>>1]=(b[v>>1]|0)+-1<<16>>16;n=e[q>>1]|e[q+2>>1]<<16;G=e[p>>1]|e[p+2>>1]<<16;b[q>>1]=G;b[q+2>>1]=G>>>16;b[p>>1]=n;b[p+2>>1]=n>>>16;q=q+-4|0;p=p+-4|0;n=b[p>>1]|0;if((e[q>>1]|0)>=(n&65535))break;o=c[a+60>>2]|0}n=c[a+68>>2]|0}else n=p;o=e[C+((D&65535)<<6)+54>>1]|0;s=n+(o<<2)|0;p=b[s+-4>>1]|0;a:do if((e[s>>1]|0)<(p&65535)){q=c[a+60>>2]|0;v=q+((e[n+(o<<2)+2>>1]|0)<<6)+54|0;n=p;p=s;o=s+-4|0;while(1){G=e[p+-2>>1]|0;n=(n&1)==0?q+(G<<6)+48|0:q+(G<<6)+54|0;b[n>>1]=(b[n>>1]|0)+1<<16>>16;b[v>>1]=(b[v>>1]|0)+-1<<16>>16;n=e[p>>1]|e[p+2>>1]<<16;G=e[o>>1]|e[o+2>>1]<<16;b[p>>1]=G;b[p+2>>1]=G>>>16;b[o>>1]=n;b[o+2>>1]=n>>>16;p=p+-4|0;o=o+-4|0;n=b[o>>1]|0;if((e[p>>1]|0)>=(n&65535))break a;q=c[a+60>>2]|0}}while(0);o=c[a+72>>2]|0;s=e[C+((D&65535)<<6)+50>>1]|0;p=c[a+60>>2]|0;n=b[o+(s<<2)+-4>>1]|0;if((e[o+(s<<2)>>1]|0)<(n&65535)){v=p+((e[o+(s<<2)+2>>1]|0)<<6)+50|0;q=o+(s<<2)|0;o=o+(s<<2)+-4|0;while(1){G=e[q+-2>>1]|0;n=(n&1)==0?p+(G<<6)+50|0:p+(G<<6)+56|0;b[n>>1]=(b[n>>1]|0)+1<<16>>16;b[v>>1]=(b[v>>1]|0)+-1<<16>>16;n=e[q>>1]|e[q+2>>1]<<16;G=e[o>>1]|e[o+2>>1]<<16;b[q>>1]=G;b[q+2>>1]=G>>>16;b[o>>1]=n;b[o+2>>1]=n>>>16;q=q+-4|0;o=o+-4|0;n=b[o>>1]|0;if((e[q>>1]|0)>=(n&65535))break;p=c[a+60>>2]|0}o=c[a+72>>2]|0}p=e[C+((D&65535)<<6)+56>>1]|0;s=o+(p<<2)|0;n=b[s+-4>>1]|0;b:do if((e[s>>1]|0)<(n&65535)){q=c[a+60>>2]|0;v=q+((e[o+(p<<2)+2>>1]|0)<<6)+56|0;p=s;o=s+-4|0;while(1){G=e[p+-2>>1]|0;n=(n&1)==0?q+(G<<6)+50|0:q+(G<<6)+56|0;b[n>>1]=(b[n>>1]|0)+1<<16>>16;b[v>>1]=(b[v>>1]|0)+-1<<16>>16;n=e[p>>1]|e[p+2>>1]<<16;G=e[o>>1]|e[o+2>>1]<<16;b[p>>1]=G;b[p+2>>1]=G>>>16;b[o>>1]=n;b[o+2>>1]=n>>>16;p=p+-4|0;o=o+-4|0;n=b[o>>1]|0;if((e[p>>1]|0)>=(n&65535))break b;q=c[a+60>>2]|0}}while(0);Fg(a,2,b[C+((D&65535)<<6)+52>>1]|0);zg(a,2,b[C+((D&65535)<<6)+58>>1]|0,l);o=c[a+60>>2]|0;n=c[a+108>>2]|0;if(!n){G=o+((D&65535)<<6)|0;return G|0}c[o+((D&65535)<<6)+60>>2]=za[c[(c[n>>2]|0)+8>>2]&3](n,d,g,h,i,j,k,l,0)|0;G=o+((D&65535)<<6)|0;return G|0}function kc(b,d){b=b|0;d=d|0;var e=0.0,g=0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0;h=c[b+28>>2]|0;k=c[b+32>>2]|0;pb(b,h+4|0,k+4|0,h+264|0,k+264|0);q=c[d+8>>2]|0;f[q>>2]=1.0;p=c[d+24>>2]|0;f[q+(p+1<<2)>>2]=1.0;f[q+((p<<1)+2<<2)>>2]=1.0;o=+f[b+348>>2];v=+f[b+352>>2];l=+f[b+356>>2];t=+f[h+4>>2]*o+ +f[h+8>>2]*v+ +f[h+12>>2]*l;n=o*+f[h+20>>2]+v*+f[h+24>>2]+l*+f[h+28>>2];l=o*+f[h+36>>2]+v*+f[h+40>>2]+l*+f[h+44>>2];q=c[d+12>>2]|0;c[q>>2]=0;f[q+4>>2]=l;f[q+8>>2]=-n;f[q+12>>2]=0.0;f[q+(p<<2)>>2]=-l;c[q+(p<<2)+4>>2]=0;f[q+(p<<2)+8>>2]=t;f[q+(p<<2)+12>>2]=0.0;f[q+(p<<1<<2)>>2]=n;f[q+(p<<1<<2)+4>>2]=-t;c[q+(p<<1<<2)+8>>2]=0;f[q+(p<<1<<2)+12>>2]=0.0;r=c[d+16>>2]|0;f[r>>2]=-1.0;f[r+(p+1<<2)>>2]=-1.0;f[r+((p<<1)+2<<2)>>2]=-1.0;v=+f[b+412>>2];o=+f[b+416>>2];e=+f[b+420>>2];u=+f[k+4>>2]*v+ +f[k+8>>2]*o+ +f[k+12>>2]*e;m=v*+f[k+20>>2]+o*+f[k+24>>2]+e*+f[k+28>>2];e=v*+f[k+36>>2]+o*+f[k+40>>2]+e*+f[k+44>>2];r=c[d+20>>2]|0;c[r>>2]=0;f[r+4>>2]=-e;f[r+8>>2]=m;f[r+12>>2]=0.0;f[r+(p<<2)>>2]=e;c[r+(p<<2)+4>>2]=0;f[r+(p<<2)+8>>2]=-u;f[r+(p<<2)+12>>2]=0.0;f[r+(p<<1<<2)>>2]=-m;f[r+(p<<1<<2)+4>>2]=u;c[r+(p<<1<<2)+8>>2]=0;f[r+(p<<1<<2)+12>>2]=0.0;s=c[b+592>>2]|0;o=+f[((s&2|0)==0?d+4|0:b+600|0)>>2]*+f[d>>2];i=c[d+28>>2]|0;g=c[d+36>>2]|0;j=c[d+40>>2]|0;f[i>>2]=o*(u+ +f[k+52>>2]-t-+f[h+52>>2]);f[g>>2]=-3402823466385288598117041.0e14;f[j>>2]=3402823466385288598117041.0e14;if(!(s&1)){f[i+(p<<2)>>2]=o*(m+ +f[k+56>>2]-n-+f[h+56>>2]);f[g+(p<<2)>>2]=-3402823466385288598117041.0e14;f[j+(p<<2)>>2]=3402823466385288598117041.0e14;f[i+(p<<1<<2)>>2]=o*(e+ +f[k+60>>2]-l-+f[h+60>>2]);f[g+(p<<1<<2)>>2]=-3402823466385288598117041.0e14;f[j+(p<<1<<2)>>2]=3402823466385288598117041.0e14}else{w=c[d+32>>2]|0;c[w>>2]=c[b+596>>2];f[i+(p<<2)>>2]=o*(m+ +f[k+56>>2]-n-+f[h+56>>2]);f[g+(p<<2)>>2]=-3402823466385288598117041.0e14;f[j+(p<<2)>>2]=3402823466385288598117041.0e14;c[w+(p<<2)>>2]=c[b+596>>2];f[i+(p<<1<<2)>>2]=o*(e+ +f[k+60>>2]-l-+f[h+60>>2]);f[g+(p<<1<<2)>>2]=-3402823466385288598117041.0e14;f[j+(p<<1<<2)>>2]=3402823466385288598117041.0e14;c[w+(p<<1<<2)>>2]=c[b+596>>2]}do if(!(a[b+526>>0]|0))h=p*3|0;else{v=+f[b+456>>2];if(+f[b+444>>2]>2]>2];z=+f[h+8>>2];y=+f[h+12>>2];E=+f[b+304>>2];D=+f[b+320>>2];C=+f[b+336>>2];m=+f[b+308>>2];o=+f[b+324>>2];u=+f[b+340>>2];x=+f[h+20>>2];e=+f[h+24>>2];l=+f[h+28>>2];n=+f[h+36>>2];t=+f[h+40>>2];v=+f[h+44>>2];f[q+(p*3<<2)>>2]=A*E+z*D+y*C;f[q+((p*3|0)+1<<2)>>2]=E*x+D*e+C*l;f[q+((p*3|0)+2<<2)>>2]=E*n+D*t+C*v;f[q+(p<<2<<2)>>2]=A*m+z*o+y*u;f[q+((p<<2|1)<<2)>>2]=m*x+o*e+u*l;f[q+((p<<2|2)<<2)>>2]=m*n+o*t+u*v;f[r+(p*3<<2)>>2]=-(A*E+z*D+y*C);f[r+((p*3|0)+1<<2)>>2]=-(E*x+D*e+C*l);f[r+((p*3|0)+2<<2)>>2]=-(E*n+D*t+C*v);f[r+(p<<2<<2)>>2]=-(A*m+z*o+y*u);f[r+((p<<2|1)<<2)>>2]=-(m*x+o*e+u*l);f[r+((p<<2|2)<<2)>>2]=-(m*n+o*t+u*v);B=+f[d>>2]*+f[b+436>>2];i=c[d+28>>2]|0;f[i+(p*3<<2)>>2]=B*((A*E+z*D+y*C)*+f[b+460>>2]+(E*x+D*e+C*l)*+f[b+464>>2]+(E*n+D*t+C*v)*+f[b+468>>2]);f[i+(p<<2<<2)>>2]=B*((A*m+z*o+y*u)*+f[b+460>>2]+(m*x+o*e+u*l)*+f[b+464>>2]+(m*n+o*t+u*v)*+f[b+468>>2]);g=c[d+36>>2]|0;f[g+(p*3<<2)>>2]=-3402823466385288598117041.0e14;j=c[d+40>>2]|0;f[j+(p*3<<2)>>2]=3402823466385288598117041.0e14;f[g+(p<<2<<2)>>2]=-3402823466385288598117041.0e14;f[j+(p<<2<<2)>>2]=3402823466385288598117041.0e14;h=p*5|0;break}E=+f[b+436>>2];C=E*(+f[b+460>>2]*E);D=E*(E*+f[b+464>>2]);E=E*(E*+f[b+468>>2]);f[q+(p*3<<2)>>2]=C;f[q+((p*3|0)+1<<2)>>2]=D;f[q+((p*3|0)+2<<2)>>2]=E;f[r+(p*3<<2)>>2]=-C;f[r+((p*3|0)+1<<2)>>2]=-D;f[r+((p*3|0)+2<<2)>>2]=-E;f[i+(p*3<<2)>>2]=+f[d>>2]*+f[b+432>>2]*+f[b+504>>2];if(s&4|0)c[(c[d+32>>2]|0)+(p*3<<2)>>2]=c[b+604>>2];f[g+(p*3<<2)>>2]=0.0;f[j+(p*3<<2)>>2]=3402823466385288598117041.0e14;h=p<<2}while(0);if(!(a[b+525>>0]|0))return;E=+f[b+436>>2];C=E*(+f[b+476>>2]*E);D=E*(E*+f[b+480>>2]);E=E*(E*+f[b+484>>2]);f[q+(h<<2)>>2]=C;p=h+1|0;f[q+(p<<2)>>2]=D;w=h+2|0;f[q+(w<<2)>>2]=E;f[r+(h<<2)>>2]=-C;f[r+(p<<2)>>2]=-D;f[r+(w<<2)>>2]=-E;f[i+(h<<2)>>2]=+f[d>>2]*+f[b+432>>2]*+f[b+508>>2];if(s&4|0)c[(c[d+32>>2]|0)+(h<<2)>>2]=c[b+604>>2];do if(+f[b+452>>2]>0.0){g=g+(h<<2)|0;if(+f[b+508>>2]>0.0){f[g>>2]=0.0;e=3402823466385288598117041.0e14;break}else{f[g>>2]=-3402823466385288598117041.0e14;e=0.0;break}}else{f[g+(h<<2)>>2]=-3402823466385288598117041.0e14;e=3402823466385288598117041.0e14}while(0);f[j+(h<<2)>>2]=e;return}function lc(b,d,e,g,h,i,j,k,l,m){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,A=0,B=0,C=0.0,D=0,E=0;if((j|0)<2|(k|0)<2){k=0;return k|0}p=z(k,j)|0;c[6747]=(c[6747]|0)+1;b=kb(p>>>0>268435455?18:(p<<4|3)+16|0)|0;if(!b)r=0;else{c[(b+4+15&-16)+-4>>2]=b;r=b+4+15&-16}q=GJ(p>>>0>1073741823?-1:p<<2)|0;n=0;do{C=+(n|0)/+(k+-1|0);t=+f[e>>2];t=t+C*(+f[h>>2]-t);u=+f[e+4>>2];u=u+C*(+f[h+4>>2]-u);v=+f[e+8>>2];v=v+C*(+f[h+8>>2]-v);w=+f[g>>2];x=+f[g+4>>2];y=+f[g+8>>2];w=w+C*(+f[i>>2]-w)-t;x=x+C*(+f[i+4>>2]-x)-u;y=y+C*(+f[i+8>>2]-y)-v;o=z(n,j)|0;b=0;do{C=+(b|0)/+(j+-1|0);B=b+o|0;f[r+(B<<4)>>2]=t+w*C;f[r+(B<<4)+4>>2]=u+x*C;f[r+(B<<4)+8>>2]=v+y*C;f[r+(B<<4)+12>>2]=0.0;f[q+(B<<2)>>2]=1.0;b=b+1|0}while((b|0)!=(j|0));n=n+1|0}while((n|0)!=(k|0));c[6747]=(c[6747]|0)+1;b=kb(1271)|0;if(!b)b=0;else{c[(b+4+15&-16)+-4>>2]=b;b=b+4+15&-16}ub(b,d,p,r,q);if(l&1|0){f[(c[b+720>>2]|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&2|0){f[(c[b+720>>2]|0)+((j+-1|0)*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(l&4|0){B=z(k+-1|0,j)|0;f[(c[b+720>>2]|0)+(B*104|0)+88>>2]=0.0;a[b+924>>0]=1}if(!(l&8)){A=b+924|0;B=b+720|0}else{A=j+-1+(z(k+-1|0,j)|0)|0;B=b+720|0;f[(c[B>>2]|0)+(A*104|0)+88>>2]=0.0;A=b+924|0;a[A>>0]=1}c[6748]=(c[6748]|0)+1;uc(c[r+-4>>2]|0);HJ(q);d=b+732|0;r=b+740|0;p=0;while(1){a:do if((j|0)>0){l=z(p,j)|0;n=p+1|0;q=z(n,j)|0;if((n|0)>=(k|0)){o=0;while(1){e=o;o=o+1|0;if((o|0)<(j|0)){i=o+l|0;g=c[B>>2]|0;mh(b,0);q=(c[d>>2]|0)+-1|0;p=c[r>>2]|0;c[p+(q*52|0)+8>>2]=g+((e+l|0)*104|0);c[p+(q*52|0)+12>>2]=g+(i*104|0);x=+f[g+((e+l|0)*104|0)+8>>2]-+f[g+(i*104|0)+8>>2];y=+f[g+((e+l|0)*104|0)+12>>2]-+f[g+(i*104|0)+12>>2];C=+f[g+((e+l|0)*104|0)+16>>2]-+f[g+(i*104|0)+16>>2];f[p+(q*52|0)+16>>2]=+s(+(x*x+y*y+C*C));a[A>>0]=1}if((o|0)==(j|0))break a}}g=0;do{o=g+l|0;i=g;g=g+1|0;do if((g|0)<(j|0)){e=g+l|0;D=c[B>>2]|0;mh(b,0);E=(c[d>>2]|0)+-1|0;h=c[r>>2]|0;c[h+(E*52|0)+8>>2]=D+(o*104|0);c[h+(E*52|0)+12>>2]=D+(e*104|0);C=+f[D+(o*104|0)+8>>2]-+f[D+(e*104|0)+8>>2];y=+f[D+(o*104|0)+12>>2]-+f[D+(e*104|0)+12>>2];x=+f[D+(o*104|0)+16>>2]-+f[D+(e*104|0)+16>>2];f[h+(E*52|0)+16>>2]=+s(+(C*C+y*y+x*x));a[A>>0]=1;E=c[B>>2]|0;mh(b,0);h=(c[d>>2]|0)+-1|0;D=c[r>>2]|0;c[D+(h*52|0)+8>>2]=E+(o*104|0);c[D+(h*52|0)+12>>2]=E+((i+q|0)*104|0);x=+f[E+(o*104|0)+8>>2]-+f[E+((i+q|0)*104|0)+8>>2];y=+f[E+(o*104|0)+12>>2]-+f[E+((i+q|0)*104|0)+12>>2];C=+f[E+(o*104|0)+16>>2]-+f[E+((i+q|0)*104|0)+16>>2];f[D+(h*52|0)+16>>2]=+s(+(x*x+y*y+C*C));a[A>>0]=1;if(!(i+p&1)){af(b,i+q|0,o,e,0);af(b,i+q|0,e,g+q|0,0);if(!m)break;h=c[B>>2]|0;mh(b,0);E=(c[d>>2]|0)+-1|0;D=c[r>>2]|0;c[D+(E*52|0)+8>>2]=h+(e*104|0);c[D+(E*52|0)+12>>2]=h+((i+q|0)*104|0);x=+f[h+(e*104|0)+8>>2]-+f[h+((i+q|0)*104|0)+8>>2];y=+f[h+(e*104|0)+12>>2]-+f[h+((i+q|0)*104|0)+12>>2];C=+f[h+(e*104|0)+16>>2]-+f[h+((i+q|0)*104|0)+16>>2];f[D+(E*52|0)+16>>2]=+s(+(x*x+y*y+C*C));a[A>>0]=1;break}else{h=g+q|0;af(b,o,e,h,0);af(b,o,h,i+q|0,0);if(!m)break;i=c[B>>2]|0;mh(b,0);E=(c[d>>2]|0)+-1|0;D=c[r>>2]|0;c[D+(E*52|0)+8>>2]=i+(o*104|0);c[D+(E*52|0)+12>>2]=i+(h*104|0);x=+f[i+(o*104|0)+8>>2]-+f[i+(h*104|0)+8>>2];y=+f[i+(o*104|0)+12>>2]-+f[i+(h*104|0)+12>>2];C=+f[i+(o*104|0)+16>>2]-+f[i+(h*104|0)+16>>2];f[D+(E*52|0)+16>>2]=+s(+(x*x+y*y+C*C));a[A>>0]=1;break}}else{h=c[B>>2]|0;mh(b,0);E=(c[d>>2]|0)+-1|0;D=c[r>>2]|0;c[D+(E*52|0)+8>>2]=h+(o*104|0);c[D+(E*52|0)+12>>2]=h+((i+q|0)*104|0);x=+f[h+(o*104|0)+8>>2]-+f[h+((i+q|0)*104|0)+8>>2];y=+f[h+(o*104|0)+12>>2]-+f[h+((i+q|0)*104|0)+12>>2];C=+f[h+(o*104|0)+16>>2]-+f[h+((i+q|0)*104|0)+16>>2];f[D+(E*52|0)+16>>2]=+s(+(x*x+y*y+C*C));a[A>>0]=1}while(0)}while((g|0)!=(j|0))}else n=p+1|0;while(0);if((n|0)==(k|0))break;else p=n}return b|0}function mc(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=+h;var i=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0;A=ea;ea=ea+272|0;c[A+128>>2]=c[d>>2];c[A+128+4>>2]=c[d+4>>2];c[A+128+8>>2]=c[d+8>>2];c[A+128+12>>2]=c[d+12>>2];c[A+128+16>>2]=c[d+16>>2];c[A+128+16+4>>2]=c[d+16+4>>2];c[A+128+16+8>>2]=c[d+16+8>>2];c[A+128+16+12>>2]=c[d+16+12>>2];c[A+128+32>>2]=c[d+32>>2];c[A+128+32+4>>2]=c[d+32+4>>2];c[A+128+32+8>>2]=c[d+32+8>>2];c[A+128+32+12>>2]=c[d+32+12>>2];c[A+128+48>>2]=c[d+48>>2];c[A+128+48+4>>2]=c[d+48+4>>2];c[A+128+48+8>>2]=c[d+48+8>>2];c[A+128+48+12>>2]=c[d+48+12>>2];c[A+64>>2]=c[e>>2];c[A+64+4>>2]=c[e+4>>2];c[A+64+8>>2]=c[e+8>>2];c[A+64+12>>2]=c[e+12>>2];c[A+64+16>>2]=c[e+16>>2];c[A+64+16+4>>2]=c[e+16+4>>2];c[A+64+16+8>>2]=c[e+16+8>>2];c[A+64+16+12>>2]=c[e+16+12>>2];c[A+64+32>>2]=c[e+32>>2];c[A+64+32+4>>2]=c[e+32+4>>2];c[A+64+32+8>>2]=c[e+32+8>>2];c[A+64+32+12>>2]=c[e+32+12>>2];c[A+64+48>>2]=c[e+48>>2];c[A+64+48+4>>2]=c[e+48+4>>2];c[A+64+48+8>>2]=c[e+48+8>>2];c[A+64+48+12>>2]=c[e+48+12>>2];i=+f[A+64+52>>2]-+f[A+128+52>>2];F=+f[A+64+56>>2]-+f[A+128+56>>2];f[A+16>>2]=+f[A+64+48>>2]-+f[A+128+48>>2];f[A+16+4>>2]=i;f[A+16+8>>2]=F;f[A+16+12>>2]=0.0;Ee(A+128|0,A+64|0,A+208|0,A+192|0);F=+f[A+192>>2];i=F*+f[A+208+4>>2];C=F*+f[A+208+8>>2];f[A>>2]=+f[A+208>>2]*F;f[A+4>>2]=i;f[A+8>>2]=C;f[A+12>>2]=0.0;c[A+208+48>>2]=0;c[A+208+48+4>>2]=0;c[A+208+48+8>>2]=0;c[A+208+48+12>>2]=0;Gg(A+128|0,A+192|0);C=+f[A+192>>2];i=+f[A+192+4>>2];F=+f[A+192+8>>2];D=+f[A+192+12>>2];B=C*(2.0/(C*C+i*i+F*F+D*D));j=i*(2.0/(C*C+i*i+F*F+D*D));E=F*(2.0/(C*C+i*i+F*F+D*D));f[A+208>>2]=1.0-(i*j+F*E);f[A+208+4>>2]=C*j-D*E;f[A+208+8>>2]=C*E+D*j;f[A+208+12>>2]=0.0;f[A+208+16>>2]=C*j+D*E;f[A+208+20>>2]=1.0-(C*B+F*E);f[A+208+24>>2]=i*E-D*B;f[A+208+28>>2]=0.0;f[A+208+32>>2]=C*E-D*j;f[A+208+36>>2]=i*E+D*B;f[A+208+40>>2]=1.0-(C*B+i*j);f[A+208+44>>2]=0.0;sg(b,A+208|0,A+16|0,A,A+48|0,A+32|0);if((c[a+268>>2]|0)<=0){ea=A;return}r=0;do{k=c[(c[a+276>>2]|0)+(r<<2)>>2]|0;if(ta[c[(c[g>>2]|0)+8>>2]&31](g,c[k+188>>2]|0)|0?(t=c[k+192>>2]|0,Pa[c[(c[t>>2]|0)+8>>2]&127](t,k+4|0,A+192|0,A+16|0),l=+f[A+192>>2]+ +f[A+48>>2],p=+f[A+192+4>>2]+ +f[A+48+4>>2],n=+f[A+192+8>>2]+ +f[A+48+8>>2],f[A+192>>2]=l,f[A+192+4>>2]=p,f[A+192+8>>2]=n,f[A+192+12>>2]=0.0,m=+f[A+16>>2]+ +f[A+32>>2],q=+f[A+16+4>>2]+ +f[A+32+4>>2],o=+f[A+16+8>>2]+ +f[A+32+8>>2],f[A+16>>2]=m,f[A+16+4>>2]=q,f[A+16+8>>2]=o,f[A+16+12>>2]=0.0,v=+f[d+48>>2]-(m+l)*.5,y=+f[d+52>>2]-(q+p)*.5,w=+f[d+56>>2]-(o+n)*.5,u=+f[e+48>>2]-(m+l)*.5,z=+f[e+52>>2]-(q+p)*.5,x=+f[e+56>>2]-(o+n)*.5,t=(v>(m-l)*.5?8:0)|v<-((m-l)*.5)|(y<-((q-p)*.5)?2:0)|(y>(q-p)*.5?16:0)|(w<-((o-n)*.5)?4:0)|(w>(o-n)*.5?32:0),s=(u>(m-l)*.5?8:0)|u<-((m-l)*.5)|(z<-((q-p)*.5)?2:0)|(z>(q-p)*.5?16:0)|(x<-((o-n)*.5)?4:0)|(x>(o-n)*.5?32:0),(s&t|0)==0):0){if(v<-((m-l)*.5))if(!((-v-(m-l)*.5)/(u-v)>=0.0)){i=1.0;j=0.0}else{i=1.0;j=(-v-(m-l)*.5)/(u-v)}else if(u<-((m-l)*.5)?(-v-(m-l)*.5)/(u-v)<1.0:0){i=(-v-(m-l)*.5)/(u-v);j=0.0}else{i=1.0;j=0.0}if(y<-((q-p)*.5)){if(j<=(-y-(q-p)*.5)/(z-y))j=(-y-(q-p)*.5)/(z-y)}else if(z<-((q-p)*.5)?(-y-(q-p)*.5)/(z-y)(m-l)*.5){if(j<=((m-l)*.5-v)/(u-v))j=((m-l)*.5-v)/(u-v)}else if(u>(m-l)*.5?((m-l)*.5-v)/(u-v)(q-p)*.5){if(j<=((q-p)*.5-y)/(z-y))j=((q-p)*.5-y)/(z-y)}else if(z>(q-p)*.5?((q-p)*.5-y)/(z-y)>2]|0;c[A+208>>2]=0;c[A+208+4>>2]=G;c[A+208+8>>2]=k;c[A+208+12>>2]=k+4;c[A+208+16>>2]=-1;c[A+208+20>>2]=-1;rb(b,A+128|0,A+64|0,A+208|0,g,h)}}r=r+1|0}while((r|0)<(c[a+268>>2]|0));ea=A;return}function nc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=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;d=c[a+8>>2]|0;if((d|0)<=0)return;f=0;do{e=c[(c[a+16>>2]|0)+(f<<2)>>2]|0;if((c[e+236>>2]|0)==1){Ia[c[(c[e>>2]|0)+24>>2]&127](e,b);d=c[a+8>>2]|0}f=f+1|0}while((f|0)<(d|0));if((d|0)<=0)return;t=0;l=0;k=d;z=0;m=0;r=0;q=0;g=0;f=0;p=0;w=0;j=0;e=0;y=0;u=0;d=0;while(1){x=c[(c[(c[a+16>>2]|0)+(z<<2)>>2]|0)+192>>2]|0;s=((10?~(x<<15)+x>>10:~(x<<15)+x|0)^~(x<<15)+x)*9|0;s=(6?s>>6:s)^s;s=(16?s+~(s<<11)>>16:s+~(s<<11)|0)^s+~(s<<11);h=s&u+-1;a:do if(h>>>0

>>0?(D=c[f+(h<<2)>>2]|0,(D|0)!=-1):0){h=D;while(1){if((c[g+(h<<3)>>2]|0)==(x|0))break;h=c[e+(h<<2)>>2]|0;if((h|0)==-1){F=14;break a}}if(d+(h<<2)|0){s=k;k=t;i=w;o=y;n=u}else F=14}else F=14;while(0);if((F|0)==14){F=0;n=s&u+-1;b:do if(n>>>0

>>0?(E=c[f+(n<<2)>>2]|0,(E|0)!=-1):0){h=E;while(1){if((c[g+(h<<3)>>2]|0)==(x|0))break;h=c[e+(h<<2)>>2]|0;if((h|0)==-1){F=20;break b}}c[d+(h<<2)>>2]=x;k=t;h=p;i=w;o=y;n=u}else F=20;while(0);if((F|0)==20){F=0;do if((y|0)==(u|0)){i=(u|0)==0?1:u<<1;if((u|0)<(i|0)){if((i|0)!=0?(c[6747]=(c[6747]|0)+1,A=kb((i<<2|3)+16|0)|0,(A|0)!=0):0){c[(A+4+15&-16)+-4>>2]=A;k=A+4+15&-16}else k=0;if((u|0)<=0){if(!d){h=u;v=i;d=k;break}}else{h=0;do{c[k+(h<<2)>>2]=c[d+(h<<2)>>2];h=h+1|0}while((h|0)!=(u|0))}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);h=u;v=i;d=k}else{h=u;v=u}}else{h=y;v=u}while(0);c[d+(h<<2)>>2]=x;o=h+1|0;do if((r|0)==(q|0)){h=(r|0)==0?1:r<<1;if((r|0)<(h|0)){if((h|0)!=0?(c[6747]=(c[6747]|0)+1,C=kb((h<<3|3)+16|0)|0,(C|0)!=0):0){c[(C+4+15&-16)+-4>>2]=C;k=C+4+15&-16}else k=0;if((r|0)<=0){if(!g){q=h;g=k;break}}else{i=0;do{H=g+(i<<3)|0;G=c[H+4>>2]|0;q=k+(i<<3)|0;c[q>>2]=c[H>>2];c[q+4>>2]=G;i=i+1|0}while((i|0)!=(r|0))}c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);q=h;g=k}else q=r}while(0);H=g+(r<<3)|0;c[H>>2]=x;c[H+4>>2]=0;r=r+1|0;if((u|0)<(v|0)){if((p|0)<(v|0)){do if((m|0)<(v|0)){if((v|0)!=0?(c[6747]=(c[6747]|0)+1,B=kb((v<<2|3)+16|0)|0,(B|0)!=0):0){c[(B+4+15&-16)+-4>>2]=B;i=B+4+15&-16}else i=0;if((p|0)<=0){if(!f){n=i;m=v;f=i;break}}else{h=0;do{c[i+(h<<2)>>2]=c[f+(h<<2)>>2];h=h+1|0}while((h|0)!=(p|0))}c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0);n=i;m=v;f=i}else n=l;while(0);l=v<<2;hk(f+(p<<2)|0,0,l-(p<<2)|0)|0;if((w|0)<(v|0)){do if((j|0)<(v|0)){do if(!v)i=0;else{c[6747]=(c[6747]|0)+1;h=kb((l|3)+16|0)|0;if(!h){i=0;break}c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}while(0);if((w|0)<=0){if(!e){h=i;j=v;e=i;break}}else{h=0;do{c[i+(h<<2)>>2]=c[e+(h<<2)>>2];h=h+1|0}while((h|0)!=(w|0))}c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);h=i;j=v;e=i}else h=t;while(0);hk(e+(w<<2)|0,0,l-(w<<2)|0)|0;k=h}else k=t;if((v|0)>0){hk(n|0,-1,l|0)|0;hk(k|0,-1,l|0)|0}if((p|0)>0){i=v+-1|0;h=0;do{H=c[g+(h<<3)>>2]|0;H=((10?H+~(H<<15)>>10:H+~(H<<15)|0)^H+~(H<<15))*9|0;H=(6?H>>6:H)^H;H=f+((((16?H+~(H<<11)>>16:H+~(H<<11)|0)^H+~(H<<11))&i)<<2)|0;c[e+(h<<2)>>2]=c[H>>2];c[H>>2]=h;h=h+1|0}while((h|0)!=(p|0));l=n;h=v;i=v}else{l=n;h=v;i=v}}else{k=t;h=p;i=w}n=s&v+-1}else{k=t;h=p;i=w}n=f+(n<<2)|0;c[e+(y<<2)>>2]=c[n>>2];c[n>>2]=y;n=v}Ia[c[(c[x>>2]|0)+60>>2]&127](x,b);s=c[a+8>>2]|0;p=h}h=z+1|0;if((h|0)>=(s|0))break;t=k;k=s;z=h;w=i;y=o;u=n}if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}if(!f)return;c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0);return}function oc(d,e){d=d|0;e=e|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=ea;ea=ea+64|0;f[d+20>>2]=+g[e+32>>3];f[d+24>>2]=+g[e+40>>3];f[d+28>>2]=+g[e+48>>3];f[d+32>>2]=+g[e+56>>3];f[d+4>>2]=+g[e>>3];f[d+8>>2]=+g[e+8>>3];f[d+12>>2]=+g[e+16>>3];f[d+16>>2]=+g[e+24>>3];f[d+36>>2]=+g[e+64>>3];f[d+40>>2]=+g[e+72>>3];f[d+44>>2]=+g[e+80>>3];f[d+48>>2]=+g[e+88>>3];c[d+56>>2]=c[e+96>>2];a[d+60>>0]=(c[e+100>>2]|0)!=0&1;o=c[e+104>>2]|0;k=p;m=k+64|0;do{c[k>>2]=0;k=k+4|0}while((k|0)<(m|0));n=c[d+88>>2]|0;if((n|0)<(o|0)){if((c[d+92>>2]|0)<(o|0)){if(!o){i=n;j=0}else{c[6747]=(c[6747]|0)+1;h=kb(o<<6|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[d+88>>2]|0;j=h}if((i|0)>0){h=0;do{k=j+(h<<6)|0;l=(c[d+96>>2]|0)+(h<<6)|0;m=k+64|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));h=h+1|0}while((h|0)!=(i|0))}h=c[d+96>>2]|0;if(h|0){if(a[d+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=j;c[d+92>>2]=o;i=d+96|0}else i=d+96|0;h=n;do{k=(c[i>>2]|0)+(h<<6)|0;l=p;m=k+64|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));h=h+1|0}while((h|0)!=(o|0))}c[d+88>>2]=o;if((o|0)>0){h=c[d+96>>2]|0;i=0;j=c[e+112>>2]|0;while(1){f[h+(i<<6)+16>>2]=+g[j+32>>3];f[h+(i<<6)+20>>2]=+g[j+40>>3];f[h+(i<<6)+24>>2]=+g[j+48>>3];f[h+(i<<6)+28>>2]=+g[j+56>>3];f[h+(i<<6)>>2]=+g[j>>3];f[h+(i<<6)+4>>2]=+g[j+8>>3];f[h+(i<<6)+8>>2]=+g[j+16>>3];f[h+(i<<6)+12>>2]=+g[j+24>>3];c[h+(i<<6)+32>>2]=c[j+64>>2];c[h+(i<<6)+36>>2]=c[j+68>>2];c[h+(i<<6)+40>>2]=c[j+72>>2];i=i+1|0;if((i|0)==(o|0))break;else j=j+80|0}}l=c[e+108>>2]|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;k=c[d+128>>2]|0;if((k|0)<(l|0)){if((c[d+132>>2]|0)<(l|0)){if(!l){i=k;j=0}else{c[6747]=(c[6747]|0)+1;h=kb((l<<4|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[d+128>>2]|0;j=h}if((i|0)>0){h=0;do{o=j+(h<<4)|0;n=(c[d+136>>2]|0)+(h<<4)|0;c[o>>2]=c[n>>2];c[o+4>>2]=c[n+4>>2];c[o+8>>2]=c[n+8>>2];c[o+12>>2]=c[n+12>>2];h=h+1|0}while((h|0)!=(i|0))}h=c[d+136>>2]|0;if(h|0){if(a[d+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=j;c[d+132>>2]=l;i=d+136|0}else i=d+136|0;h=k;do{o=(c[i>>2]|0)+(h<<4)|0;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];h=h+1|0}while((h|0)!=(l|0))}c[d+128>>2]=l;if((l|0)>0){h=c[d+136>>2]|0;i=0;j=c[e+116>>2]|0;while(1){c[h+(i<<4)+12>>2]=c[j+12>>2];b[h+(i<<4)+6>>1]=b[j+6>>1]|0;b[h+(i<<4)+8>>1]=b[j+8>>1]|0;b[h+(i<<4)+10>>1]=b[j+10>>1]|0;b[h+(i<<4)>>1]=b[j>>1]|0;b[h+(i<<4)+2>>1]=b[j+2>>1]|0;b[h+(i<<4)+4>>1]=b[j+4>>1]|0;i=i+1|0;if((i|0)==(l|0))break;else j=j+16|0}}c[d+144>>2]=c[e+120>>2];l=c[e+124>>2]|0;k=c[d+152>>2]|0;if((k|0)<(l|0)){if((c[d+156>>2]|0)<(l|0)){if(!l){i=k;j=0}else{c[6747]=(c[6747]|0)+1;h=kb(l<<5|19)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[d+152>>2]|0;j=h}if((i|0)>0){h=0;do{o=j+(h<<5)|0;n=(c[d+160>>2]|0)+(h<<5)|0;c[o>>2]=c[n>>2];c[o+4>>2]=c[n+4>>2];c[o+8>>2]=c[n+8>>2];c[o+12>>2]=c[n+12>>2];c[o+16>>2]=c[n+16>>2];c[o+20>>2]=c[n+20>>2];c[o+24>>2]=c[n+24>>2];c[o+28>>2]=c[n+28>>2];h=h+1|0}while((h|0)!=(i|0))}h=c[d+160>>2]|0;if(h|0){if(a[d+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=j;c[d+156>>2]=l;i=d+160|0}else i=d+160|0;h=k;do{o=(c[i>>2]|0)+(h<<5)|0;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];c[o+16>>2]=c[p+16>>2];c[o+20>>2]=c[p+20>>2];c[o+24>>2]=c[p+24>>2];c[o+28>>2]=c[p+28>>2];h=h+1|0}while((h|0)!=(l|0))}c[d+152>>2]=l;if((l|0)<=0){ea=p;return}i=c[d+160>>2]|0;j=0;h=c[e+128>>2]|0;while(1){b[i+(j<<5)+6>>1]=b[h+14>>1]|0;b[i+(j<<5)+8>>1]=b[h+16>>1]|0;b[i+(j<<5)+10>>1]=b[h+18>>1]|0;b[i+(j<<5)>>1]=b[h+8>>1]|0;b[i+(j<<5)+2>>1]=b[h+10>>1]|0;b[i+(j<<5)+4>>1]=b[h+12>>1]|0;c[i+(j<<5)+12>>2]=c[h>>2];c[i+(j<<5)+16>>2]=c[h+4>>2];j=j+1|0;if((j|0)==(l|0))break;else h=h+20|0}ea=p;return}function pc(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=c[a+108>>2]|0;if(g|0)Ma[c[(c[g>>2]|0)+12>>2]&127](g,c[d+60>>2]|0,f);o=c[d+12>>2]|0;m=c[a+60>>2]|0;n=c[a+92>>2]|0;if(!(ra[c[(c[n>>2]|0)+56>>2]&127](n)|0)){n=c[a+92>>2]|0;Ma[c[(c[n>>2]|0)+16>>2]&127](n,m+((o&65535)<<6)|0,f)}n=e[a+56>>1]|0;g=c[a+60>>2]|0;b[g+54>>1]=(e[g+54>>1]|0)+65534;b[g+56>>1]=(e[g+56>>1]|0)+65534;b[g+58>>1]=(e[g+58>>1]|0)+65534;l=c[a+68>>2]|0;d=b[a+6>>1]|0;h=e[m+((o&65535)<<6)+54>>1]|0;b[l+(h<<2)>>1]=d;f=b[l+(h<<2)+6>>1]|0;if(!(f<<16>>16)){g=d;d=l}else{j=g+((e[l+(h<<2)+2>>1]|0)<<6)+54|0;h=l+(h<<2)|0;while(1){i=h;h=h+4|0;g=b[h>>1]|0;if((d&65535)<(g&65535))break;d=c[a+60>>2]|0;k=f&65535;g=(g&1)==0?d+(k<<6)+48|0:d+(k<<6)+54|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[j>>1]=(b[j>>1]|0)+1<<16>>16;g=e[i>>1]|e[i+2>>1]<<16;k=e[h>>1]|e[h+2>>1]<<16;b[i>>1]=k;b[i+2>>1]=k>>>16;b[h>>1]=g;b[h+2>>1]=g>>>16;f=b[i+10>>1]|0;if(!(f<<16>>16))break;else d=g&65535}g=b[a+6>>1]|0;d=c[a+68>>2]|0}f=e[m+((o&65535)<<6)+48>>1]|0;b[l+(f<<2)>>1]=g;j=d+(f<<2)|0;h=b[j+6>>1]|0;if(h<<16>>16){k=(c[a+60>>2]|0)+((e[d+(f<<2)+2>>1]|0)<<6)+48|0;i=b[j>>1]|0;d=j;while(1){f=d;d=d+4|0;g=b[d>>1]|0;if((i&65535)<(g&65535))break;i=c[a+60>>2]|0;j=h&65535;g=(g&1)==0?i+(j<<6)+48|0:i+(j<<6)+54|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[k>>1]=(b[k>>1]|0)+1<<16>>16;g=e[f>>1]|e[f+2>>1]<<16;j=e[d>>1]|e[d+2>>1]<<16;b[f>>1]=j;b[f+2>>1]=j>>>16;b[d>>1]=g;b[d+2>>1]=g>>>16;h=b[f+10>>1]|0;if(!(h<<16>>16))break;else i=g&65535}g=b[a+6>>1]|0}b[l+((n<<1)+-1<<2)+2>>1]=0;b[l+((n<<1)+-1<<2)>>1]=g;l=c[a+72>>2]|0;f=e[m+((o&65535)<<6)+56>>1]|0;b[l+(f<<2)>>1]=g;d=b[l+(f<<2)+6>>1]|0;if(!(d<<16>>16))d=l;else{j=(c[a+60>>2]|0)+((e[l+(f<<2)+2>>1]|0)<<6)+56|0;h=l+(f<<2)|0;while(1){i=h;h=h+4|0;f=b[h>>1]|0;if((g&65535)<(f&65535))break;k=c[a+60>>2]|0;g=d&65535;g=(f&1)==0?k+(g<<6)+50|0:k+(g<<6)+56|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[j>>1]=(b[j>>1]|0)+1<<16>>16;g=e[i>>1]|e[i+2>>1]<<16;k=e[h>>1]|e[h+2>>1]<<16;b[i>>1]=k;b[i+2>>1]=k>>>16;b[h>>1]=g;b[h+2>>1]=g>>>16;d=b[i+10>>1]|0;if(!(d<<16>>16))break;else g=g&65535}g=b[a+6>>1]|0;d=c[a+72>>2]|0}f=e[m+((o&65535)<<6)+50>>1]|0;b[l+(f<<2)>>1]=g;j=d+(f<<2)|0;h=b[j+6>>1]|0;if(h<<16>>16){k=(c[a+60>>2]|0)+((e[d+(f<<2)+2>>1]|0)<<6)+50|0;i=b[j>>1]|0;d=j;while(1){f=d;d=d+4|0;g=b[d>>1]|0;if((i&65535)<(g&65535))break;i=c[a+60>>2]|0;j=h&65535;g=(g&1)==0?i+(j<<6)+50|0:i+(j<<6)+56|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[k>>1]=(b[k>>1]|0)+1<<16>>16;g=e[f>>1]|e[f+2>>1]<<16;j=e[d>>1]|e[d+2>>1]<<16;b[f>>1]=j;b[f+2>>1]=j>>>16;b[d>>1]=g;b[d+2>>1]=g>>>16;h=b[f+10>>1]|0;if(!(h<<16>>16))break;else i=g&65535}g=b[a+6>>1]|0}b[l+((n<<1)+-1<<2)+2>>1]=0;b[l+((n<<1)+-1<<2)>>1]=g;l=c[a+76>>2]|0;f=e[m+((o&65535)<<6)+58>>1]|0;b[l+(f<<2)>>1]=g;d=b[l+(f<<2)+6>>1]|0;if(!(d<<16>>16)){d=g;f=l}else{j=(c[a+60>>2]|0)+((e[l+(f<<2)+2>>1]|0)<<6)+58|0;h=l+(f<<2)|0;while(1){i=h;h=h+4|0;f=b[h>>1]|0;if((g&65535)<(f&65535))break;k=c[a+60>>2]|0;g=d&65535;g=(f&1)==0?k+(g<<6)+52|0:k+(g<<6)+58|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[j>>1]=(b[j>>1]|0)+1<<16>>16;g=e[i>>1]|e[i+2>>1]<<16;k=e[h>>1]|e[h+2>>1]<<16;b[i>>1]=k;b[i+2>>1]=k>>>16;b[h>>1]=g;b[h+2>>1]=g>>>16;d=b[i+10>>1]|0;if(!(d<<16>>16))break;else g=g&65535}d=b[a+6>>1]|0;f=c[a+76>>2]|0}g=e[m+((o&65535)<<6)+52>>1]|0;b[l+(g<<2)>>1]=d;j=f+(g<<2)|0;h=b[j+6>>1]|0;if(!(h<<16>>16)){k=d;m=l+((n<<1)+-1<<2)+2|0;b[m>>1]=0;m=l+((n<<1)+-1<<2)|0;b[m>>1]=k;m=c[a+60>>2]|0;n=a+64|0;l=b[n>>1]|0;m=m+((o&65535)<<6)+48|0;b[m>>1]=l;b[n>>1]=o;o=b[a+56>>1]|0;o=o+-1<<16>>16;b[a+56>>1]=o;return}k=(c[a+60>>2]|0)+((e[f+(g<<2)+2>>1]|0)<<6)+52|0;i=b[j>>1]|0;d=j;while(1){f=d;d=d+4|0;g=b[d>>1]|0;if((i&65535)<(g&65535))break;j=c[a+60>>2]|0;m=h&65535;g=(g&1)==0?j+(m<<6)+52|0:j+(m<<6)+58|0;b[g>>1]=(b[g>>1]|0)+-1<<16>>16;b[k>>1]=(b[k>>1]|0)+1<<16>>16;g=e[f>>1]|e[f+2>>1]<<16;m=e[d>>1]|e[d+2>>1]<<16;b[f>>1]=m;b[f+2>>1]=m>>>16;b[d>>1]=g;b[d+2>>1]=g>>>16;h=b[f+10>>1]|0;if(!(h<<16>>16))break;else i=g&65535}k=b[a+6>>1]|0;m=l+((n<<1)+-1<<2)+2|0;b[m>>1]=0;m=l+((n<<1)+-1<<2)|0;b[m>>1]=k;m=c[a+60>>2]|0;n=a+64|0;l=b[n>>1]|0;m=m+((o&65535)<<6)+48|0;b[m>>1]=l;b[n>>1]=o;o=b[a+56>>1]|0;o=o+-1<<16>>16;b[a+56>>1]=o;return}function qc(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0,X=0,Y=0;X=c[d+36>>2]|0;W=c[e+36>>2]|0;K=+f[X+8>>2];M=+f[X+12>>2];L=+f[X+16>>2];e=c[W+8>>2]|0;T=+f[e+8>>2];U=+f[e+12>>2];V=+f[e+16>>2];g=c[W+12>>2]|0;P=+f[g+8>>2];N=+f[g+12>>2];O=+f[g+16>>2];d=c[W+16>>2]|0;Q=+f[d+8>>2];R=+f[d+12>>2];S=+f[d+16>>2];x=P-K-(T-K);E=N-M-(U-M);z=O-L-(V-L);w=E*(S-L-(V-L))-z*(R-M-(U-M));D=z*(Q-K-(T-K))-x*(S-L-(V-L));B=x*(R-M-(U-M))-E*(Q-K-(T-K));do if(B*B+(w*w+D*D)>1.1920928955078125e-07?(H=1.0/+s(+(B*B+(w*w+D*D))),F=(V-L)*(B*H)+((T-K)*(w*H)+(U-M)*(D*H)),F*F<3402823466385288598117041.0e14):0){q=T-K-w*H*F;v=U-M-D*H*F;t=V-L-B*H*F;h=P-K-w*H*F;u=N-M-D*H*F;r=O-L-B*H*F;if((B*(u*q-v*h)+(w*(v*r-t*u)+D*(t*h-r*q))>0.0?(y=Q-K-w*H*F,C=R-M-D*H*F,A=S-L-B*H*F,B*(C*h-u*y)+(w*(u*A-r*C)+D*(r*y-A*h))>0.0):0)?B*(v*y-C*q)+(w*(C*t-A*v)+D*(A*q-t*y))>0.0:0){p=F*F;o=w*H*F;m=B*H*F;l=D*H*F;break}if(x*x+E*E+z*z>1.1920928955078125e-07?(G=-((T-K)*x+(U-M)*E+(V-L)*z)/(x*x+E*E+z*z),G=G<0.0?0.0:G>1.0?1.0:G,p=(V-L+z*G)*(V-L+z*G)+((T-K+x*G)*(T-K+x*G)+(U-M+E*G)*(U-M+E*G)),p<3402823466385288598117041.0e14):0){r=T-K+x*G;t=V-L+z*G;q=U-M+E*G}else{p=3402823466385288598117041.0e14;r=0.0;t=0.0;q=0.0}h=(Q-K-(P-K))*(Q-K-(P-K))+(R-M-(N-M))*(R-M-(N-M))+(S-L-(O-L))*(S-L-(O-L));if(h>1.1920928955078125e-07?(m=-((P-K)*(Q-K-(P-K))+(N-M)*(R-M-(N-M))+(O-L)*(S-L-(O-L)))/h,m=m<0.0?0.0:m>1.0?1.0:m,o=P-K+(Q-K-(P-K))*m,k=N-M+(R-M-(N-M))*m,m=O-L+(S-L-(O-L))*m,m*m+(o*o+k*k)1.1920928955078125e-07?(J=-((Q-K)*(T-K-(Q-K))+(R-M)*(U-M-(R-M))+(S-L)*(V-L-(S-L)))/h,J=J<0.0?0.0:J>1.0?1.0:J,I=Q-K+(T-K-(Q-K))*J,l=R-M+(U-M-(R-M))*J,J=S-L+(V-L-(S-L))*J,J*J+(I*I+l*l)>2];J=M-+f[X+28>>2];v=L-+f[X+32>>2];v=+f[b+12>>2]+ +s(+(I*I+J*J+v*v))*2.0;if(!(p>2];V=+f[e+88>>2];h=+f[g+88>>2];U=+f[d+88>>2];h=!(V<=0.0)&!(h<=0.0)&!(U<=0.0)?U*(u*(1.0/(r+(u+t))))+(V*(t*(1.0/(r+(u+t))))+h*(r*(1.0/(r+(u+t))))):0.0;if(!(k+h>0.0))return;V=1.0/-+s(+p);q=o*V;p=V*l;o=V*m;n=c[b+4>>2]|0;d=c[b+8>>2]|0;m=+f[n+316>>2];l=+f[d+316>>2];l=m>l?m:l;m=k/(k+h)*+f[n+332>>2];h=h/(k+h)*+f[d+332>>2];d=c[n+832>>2]|0;if((d|0)==(c[n+836>>2]|0)?(Y=(d|0)==0?1:d<<1,(d|0)<(Y|0)):0){if(!Y)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((Y*56|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[n+832>>2]|0}if((d|0)>0){g=0;do{b=e+(g*56|0)|0;i=(c[n+840>>2]|0)+(g*56|0)|0;j=b+56|0;do{c[b>>2]=c[i>>2];b=b+4|0;i=i+4|0}while((b|0)<(j|0));g=g+1|0}while((g|0)!=(d|0))}d=c[n+840>>2]|0;if(d|0){if(a[n+844>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[n+840>>2]=0}a[n+844>>0]=1;c[n+840>>2]=e;c[n+836>>2]=Y;d=c[n+832>>2]|0}Y=c[n+840>>2]|0;c[Y+(d*56|0)>>2]=X;c[Y+(d*56|0)+4>>2]=W;f[Y+(d*56|0)+8>>2]=t*(1.0/(r+(u+t)));f[Y+(d*56|0)+12>>2]=r*(1.0/(r+(u+t)));f[Y+(d*56|0)+16>>2]=u*(1.0/(r+(u+t)));f[Y+(d*56|0)+20>>2]=0.0;f[Y+(d*56|0)+24>>2]=q;f[Y+(d*56|0)+28>>2]=p;f[Y+(d*56|0)+32>>2]=o;f[Y+(d*56|0)+36>>2]=0.0;f[Y+(d*56|0)+40>>2]=v;f[Y+(d*56|0)+44>>2]=l;f[Y+(d*56|0)+48>>2]=m;f[Y+(d*56|0)+52>>2]=h;c[n+832>>2]=(c[n+832>>2]|0)+1;return}function rc(b,d){b=b|0;d=+d;var e=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;q=ea;ea=ea+1136|0;e=c[b+44>>2]|0;e=ra[c[(c[e>>2]|0)+84>>2]&127](e)|0;if((e|0)>0){g=0;h=42;while(1){o=c[b+44>>2]|0;Ma[c[(c[o>>2]|0)+88>>2]&127](o,g,q);Sd();o=22608+(h<<4)|0;c[o>>2]=c[q>>2];c[o+4>>2]=c[q+4>>2];c[o+8>>2]=c[q+8>>2];c[o+12>>2]=c[q+12>>2];g=g+1|0;if((g|0)==(e|0))break;else h=h+1|0}g=e+42|0}else g=42;e=0;do{o=c[b+44>>2]|0;n=c[(c[o>>2]|0)+64>>2]|0;Sd();Ma[n&127](q+1104|0,o,22608+(e<<4)|0);o=q+(e<<4)|0;c[o>>2]=c[q+1104>>2];c[o+4>>2]=c[q+1104+4>>2];c[o+8>>2]=c[q+1104+8>>2];c[o+12>>2]=c[q+1104+12>>2];e=e+1|0}while(e>>>0>>0);f[q+1104+16>>2]=1.0000000474974513e-03;c[q+1104+20>>2]=4096;c[q+1104+24>>2]=4096;c[q+1104>>2]=1;c[q+1104+4>>2]=g;c[q+1104+8>>2]=q;c[q+1104+12>>2]=16;a[q+1064+16>>0]=1;c[q+1064+12>>2]=0;c[q+1064+4>>2]=0;c[q+1064+8>>2]=0;a[q+1064+36>>0]=1;c[q+1064+32>>2]=0;c[q+1064+24>>2]=0;c[q+1064+28>>2]=0;a[q+1008+24>>0]=1;o=q+1008+20|0;c[o>>2]=0;c[q+1008+12>>2]=0;c[q+1008+16>>2]=0;n=q+1008+52|0;a[n>>0]=1;m=q+1008+48|0;c[m>>2]=0;c[q+1008+40>>2]=0;c[q+1008+44>>2]=0;a[q+1008>>0]=1;l=q+1008+4|0;c[l>>2]=0;c[q+1008+28>>2]=0;c[q+1008+32>>2]=0;if((ab(q+1064|0,q+1104|0,q+1008|0)|0)!=1){j=c[l>>2]|0;i=c[b+4>>2]|0;if((i|0)<(j|0)){if((c[b+8>>2]|0)<(j|0)){if(!j){g=i;h=0}else{c[6747]=(c[6747]|0)+1;e=kb((j<<4|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}g=c[b+4>>2]|0;h=e}if((g|0)>0){e=0;do{k=h+(e<<4)|0;r=(c[b+12>>2]|0)+(e<<4)|0;c[k>>2]=c[r>>2];c[k+4>>2]=c[r+4>>2];c[k+8>>2]=c[r+8>>2];c[k+12>>2]=c[r+12>>2];e=e+1|0}while((e|0)!=(g|0))}e=c[b+12>>2]|0;if(e|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=h;c[b+8>>2]=j;g=b+12|0}else g=b+12|0;e=i;do{r=(c[g>>2]|0)+(e<<4)|0;c[r>>2]=c[q+992>>2];c[r+4>>2]=c[q+992+4>>2];c[r+8>>2]=c[q+992+8>>2];c[r+12>>2]=c[q+992+12>>2];e=e+1|0}while((e|0)!=(j|0));e=c[l>>2]|0}else e=j;c[b+4>>2]=j;if((e|0)>0){e=c[o>>2]|0;g=0;do{k=e+(g<<4)|0;r=(c[b+12>>2]|0)+(g<<4)|0;c[r>>2]=c[k>>2];c[r+4>>2]=c[k+4>>2];c[r+8>>2]=c[k+8>>2];c[r+12>>2]=c[k+12>>2];g=g+1|0}while((g|0)<(c[l>>2]|0))}k=c[q+1008+32>>2]|0;c[b+40>>2]=k;j=c[b+24>>2]|0;if((k|0)>(j|0)){do if((c[b+28>>2]|0)<(k|0)){if(!k){i=j;e=0}else{c[6747]=(c[6747]|0)+1;e=kb((k<<2|3)+16|0)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}i=c[b+24>>2]|0}g=c[b+32>>2]|0;if((i|0)<=0){if(!g){a[b+36>>0]=1;c[b+32>>2]=e;c[b+28>>2]=k;break}}else{h=0;do{c[e+(h<<2)>>2]=c[g+(h<<2)>>2];h=h+1|0}while((h|0)!=(i|0))}if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}a[b+36>>0]=1;c[b+32>>2]=e;c[b+28>>2]=k}else e=c[b+32>>2]|0;while(0);hk(e+(j<<2)|0,0,k-j<<2|0)|0;e=c[b+40>>2]|0}else e=k;c[b+24>>2]=k;if((e|0)>0){e=c[m>>2]|0;g=c[b+32>>2]|0;h=0;do{c[g+(h<<2)>>2]=c[e+(h<<2)>>2];h=h+1|0}while((h|0)<(c[b+40>>2]|0))}if(c[q+1008+12>>2]|0){c[l>>2]=0;e=c[o>>2]|0;if(e|0){if(a[q+1008+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[o>>2]=0}a[q+1008+24>>0]=1;c[o>>2]=0;c[q+1008+12>>2]=0;c[q+1008+16>>2]=0}if(!(c[q+1008+40>>2]|0)){g=1;p=60}else{c[q+1008+32>>2]=0;e=c[m>>2]|0;if(e|0){if(a[n>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[m>>2]=0}a[n>>0]=1;c[m>>2]=0;c[q+1008+40>>2]=0;c[q+1008+44>>2]=0;g=1}}else{g=0;p=60}if((p|0)==60){e=c[m>>2]|0;if(e){if(a[n>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[m>>2]=0}}a[n>>0]=1;c[m>>2]=0;c[q+1008+40>>2]=0;c[q+1008+44>>2]=0;e=c[o>>2]|0;if(e|0){if(a[q+1008+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[o>>2]=0}e=c[q+1064+32>>2]|0;if(e|0){if(a[q+1064+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[q+1064+32>>2]=0}a[q+1064+36>>0]=1;c[q+1064+32>>2]=0;c[q+1064+24>>2]=0;c[q+1064+28>>2]=0;e=c[q+1064+12>>2]|0;if(!e){ea=q;return g|0}if(a[q+1064+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[q+1064+12>>2]=0;ea=q;return g|0}function sc(d,e){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;n=ea;ea=ea+64|0;c[d+20>>2]=c[e+16>>2];c[d+24>>2]=c[e+20>>2];c[d+28>>2]=c[e+24>>2];c[d+32>>2]=c[e+28>>2];c[d+4>>2]=c[e>>2];c[d+8>>2]=c[e+4>>2];c[d+12>>2]=c[e+8>>2];c[d+16>>2]=c[e+12>>2];c[d+36>>2]=c[e+32>>2];c[d+40>>2]=c[e+36>>2];c[d+44>>2]=c[e+40>>2];c[d+48>>2]=c[e+44>>2];c[d+56>>2]=c[e+48>>2];a[d+60>>0]=(c[e+52>>2]|0)!=0&1;m=c[e+56>>2]|0;i=n;k=i+64|0;do{c[i>>2]=0;i=i+4|0}while((i|0)<(k|0));l=c[d+88>>2]|0;if((l|0)<(m|0)){if((c[d+92>>2]|0)<(m|0)){if(!m){g=l;h=0}else{c[6747]=(c[6747]|0)+1;f=kb(m<<6|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+88>>2]|0;h=f}if((g|0)>0){f=0;do{i=h+(f<<6)|0;j=(c[d+96>>2]|0)+(f<<6)|0;k=i+64|0;do{c[i>>2]=c[j>>2];i=i+4|0;j=j+4|0}while((i|0)<(k|0));f=f+1|0}while((f|0)!=(g|0))}f=c[d+96>>2]|0;if(f|0){if(a[d+100>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[d+96>>2]=0}a[d+100>>0]=1;c[d+96>>2]=h;c[d+92>>2]=m;g=d+96|0}else g=d+96|0;f=l;do{i=(c[g>>2]|0)+(f<<6)|0;j=n;k=i+64|0;do{c[i>>2]=c[j>>2];i=i+4|0;j=j+4|0}while((i|0)<(k|0));f=f+1|0}while((f|0)!=(m|0))}c[d+88>>2]=m;if((m|0)>0){f=c[d+96>>2]|0;g=0;h=c[e+64>>2]|0;while(1){c[f+(g<<6)+16>>2]=c[h+16>>2];c[f+(g<<6)+20>>2]=c[h+20>>2];c[f+(g<<6)+24>>2]=c[h+24>>2];c[f+(g<<6)+28>>2]=c[h+28>>2];c[f+(g<<6)>>2]=c[h>>2];c[f+(g<<6)+4>>2]=c[h+4>>2];c[f+(g<<6)+8>>2]=c[h+8>>2];c[f+(g<<6)+12>>2]=c[h+12>>2];c[f+(g<<6)+32>>2]=c[h+32>>2];c[f+(g<<6)+36>>2]=c[h+36>>2];c[f+(g<<6)+40>>2]=c[h+40>>2];g=g+1|0;if((g|0)==(m|0))break;else h=h+48|0}}j=c[e+60>>2]|0;c[n>>2]=0;c[n+4>>2]=0;c[n+8>>2]=0;c[n+12>>2]=0;i=c[d+128>>2]|0;if((i|0)<(j|0)){if((c[d+132>>2]|0)<(j|0)){if(!j){g=i;h=0}else{c[6747]=(c[6747]|0)+1;f=kb((j<<4|3)+16|0)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+128>>2]|0;h=f}if((g|0)>0){f=0;do{m=h+(f<<4)|0;l=(c[d+136>>2]|0)+(f<<4)|0;c[m>>2]=c[l>>2];c[m+4>>2]=c[l+4>>2];c[m+8>>2]=c[l+8>>2];c[m+12>>2]=c[l+12>>2];f=f+1|0}while((f|0)!=(g|0))}f=c[d+136>>2]|0;if(f|0){if(a[d+140>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[d+136>>2]=0}a[d+140>>0]=1;c[d+136>>2]=h;c[d+132>>2]=j;g=d+136|0}else g=d+136|0;f=i;do{m=(c[g>>2]|0)+(f<<4)|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];c[m+12>>2]=c[n+12>>2];f=f+1|0}while((f|0)!=(j|0))}c[d+128>>2]=j;if((j|0)>0){f=c[d+136>>2]|0;g=0;h=c[e+68>>2]|0;while(1){c[f+(g<<4)+12>>2]=c[h+12>>2];b[f+(g<<4)+6>>1]=b[h+6>>1]|0;b[f+(g<<4)+8>>1]=b[h+8>>1]|0;b[f+(g<<4)+10>>1]=b[h+10>>1]|0;b[f+(g<<4)>>1]=b[h>>1]|0;b[f+(g<<4)+2>>1]=b[h+2>>1]|0;b[f+(g<<4)+4>>1]=b[h+4>>1]|0;g=g+1|0;if((g|0)==(j|0))break;else h=h+16|0}}c[d+144>>2]=c[e+76>>2];j=c[e+80>>2]|0;i=c[d+152>>2]|0;if((i|0)<(j|0)){if((c[d+156>>2]|0)<(j|0)){if(!j){g=i;h=0}else{c[6747]=(c[6747]|0)+1;f=kb(j<<5|19)|0;if(!f)f=0;else{c[(f+4+15&-16)+-4>>2]=f;f=f+4+15&-16}g=c[d+152>>2]|0;h=f}if((g|0)>0){f=0;do{m=h+(f<<5)|0;l=(c[d+160>>2]|0)+(f<<5)|0;c[m>>2]=c[l>>2];c[m+4>>2]=c[l+4>>2];c[m+8>>2]=c[l+8>>2];c[m+12>>2]=c[l+12>>2];c[m+16>>2]=c[l+16>>2];c[m+20>>2]=c[l+20>>2];c[m+24>>2]=c[l+24>>2];c[m+28>>2]=c[l+28>>2];f=f+1|0}while((f|0)!=(g|0))}f=c[d+160>>2]|0;if(f|0){if(a[d+164>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0)}c[d+160>>2]=0}a[d+164>>0]=1;c[d+160>>2]=h;c[d+156>>2]=j;g=d+160|0}else g=d+160|0;f=i;do{m=(c[g>>2]|0)+(f<<5)|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];c[m+12>>2]=c[n+12>>2];c[m+16>>2]=c[n+16>>2];c[m+20>>2]=c[n+20>>2];c[m+24>>2]=c[n+24>>2];c[m+28>>2]=c[n+28>>2];f=f+1|0}while((f|0)!=(j|0))}c[d+152>>2]=j;if((j|0)<=0){ea=n;return}g=c[d+160>>2]|0;h=0;f=c[e+72>>2]|0;while(1){b[g+(h<<5)+6>>1]=b[f+14>>1]|0;b[g+(h<<5)+8>>1]=b[f+16>>1]|0;b[g+(h<<5)+10>>1]=b[f+18>>1]|0;b[g+(h<<5)>>1]=b[f+8>>1]|0;b[g+(h<<5)+2>>1]=b[f+10>>1]|0;b[g+(h<<5)+4>>1]=b[f+12>>1]|0;c[g+(h<<5)+12>>2]=c[f>>2];c[g+(h<<5)+16>>2]=c[f+4>>2];h=h+1|0;if((h|0)==(j|0))break;else f=f+20|0}ea=n;return}function tc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;c[b>>2]=4244;d=c[b+192>>2]|0;if(d|0)Ca[c[(c[d>>2]|0)+4>>2]&511](d);a:do if((c[b+1112>>2]|0)>0)do{h=c[c[b+1120>>2]>>2]|0;d=c[h+348>>2]|0;if(d|0){jg(b+1048|0,d)|0;e=c[b+1052>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[b+1052>>2]=d;c[b+1060>>2]=(c[b+1060>>2]|0)+-1}d=c[h+52>>2]|0;if(d|0){if(a[h+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[h+52>>2]=0}a[h+56>>0]=1;c[h+52>>2]=0;c[h+44>>2]=0;c[h+48>>2]=0;d=c[h+32>>2]|0;if(d|0){if(a[h+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[h+32>>2]=0}a[h+36>>0]=1;c[h+32>>2]=0;c[h+24>>2]=0;c[h+28>>2]=0;d=c[h+12>>2]|0;if(d|0){if(a[h+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[h+12>>2]=0}a[h+16>>0]=1;c[h+12>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);d=c[b+1112>>2]|0;if((d|0)<=0)break a;g=c[b+1120>>2]|0;e=0;do{f=g+(e<<2)|0;if((c[f>>2]|0)==(h|0)){i=25;break}e=e+1|0}while((e|0)<(d|0));if((i|0)==25){i=0;if((e|0)<(d|0)){c[f>>2]=c[g+(d+-1<<2)>>2];c[(c[b+1120>>2]|0)+(d+-1<<2)>>2]=h;c[b+1112>>2]=d+-1;d=d+-1|0}}}while((d|0)>0);while(0);d=c[b+872>>2]|0;if((d|0)>0){f=0;do{e=c[(c[b+880>>2]|0)+(f<<2)>>2]|0;if(e){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);d=c[b+872>>2]|0}f=f+1|0}while((f|0)<(d|0))}d=c[b+852>>2]|0;if((d|0)>0){f=0;do{e=c[(c[b+860>>2]|0)+(f<<2)>>2]|0;if(e){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0);d=c[b+852>>2]|0}f=f+1|0}while((f|0)<(d|0))}d=c[b+1244>>2]|0;if(d|0){if(a[b+1248>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+1244>>2]=0}a[b+1248>>0]=1;c[b+1244>>2]=0;c[b+1236>>2]=0;c[b+1240>>2]=0;d=c[b+1140>>2]|0;if(d|0){if(a[b+1144>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+1140>>2]=0}a[b+1144>>0]=1;c[b+1140>>2]=0;c[b+1132>>2]=0;c[b+1136>>2]=0;d=c[b+1120>>2]|0;if(d|0){if(a[b+1124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+1120>>2]=0}a[b+1124>>0]=1;c[b+1120>>2]=0;c[b+1112>>2]=0;c[b+1116>>2]=0;th(b+1048|0);th(b+988|0);th(b+928|0);d=c[b+880>>2]|0;if(d|0){if(a[b+884>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+880>>2]=0}a[b+884>>0]=1;c[b+880>>2]=0;c[b+872>>2]=0;c[b+876>>2]=0;d=c[b+860>>2]|0;if(d|0){if(a[b+864>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+860>>2]=0}a[b+864>>0]=1;c[b+860>>2]=0;c[b+852>>2]=0;c[b+856>>2]=0;d=c[b+840>>2]|0;if(d|0){if(a[b+844>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+840>>2]=0}a[b+844>>0]=1;c[b+840>>2]=0;c[b+832>>2]=0;c[b+836>>2]=0;d=c[b+820>>2]|0;if(d|0){if(a[b+824>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+820>>2]=0}a[b+824>>0]=1;c[b+820>>2]=0;c[b+812>>2]=0;c[b+816>>2]=0;d=c[b+800>>2]|0;if(d|0){if(a[b+804>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+800>>2]=0}a[b+804>>0]=1;c[b+800>>2]=0;c[b+792>>2]=0;c[b+796>>2]=0;d=c[b+780>>2]|0;if(d|0){if(a[b+784>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+780>>2]=0}a[b+784>>0]=1;c[b+780>>2]=0;c[b+772>>2]=0;c[b+776>>2]=0;d=c[b+760>>2]|0;if(d|0){if(a[b+764>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+760>>2]=0}a[b+764>>0]=1;c[b+760>>2]=0;c[b+752>>2]=0;c[b+756>>2]=0;d=c[b+740>>2]|0;if(d|0){if(a[b+744>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+740>>2]=0}a[b+744>>0]=1;c[b+740>>2]=0;c[b+732>>2]=0;c[b+736>>2]=0;d=c[b+720>>2]|0;if(d|0){if(a[b+724>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+720>>2]=0}a[b+724>>0]=1;c[b+720>>2]=0;c[b+712>>2]=0;c[b+716>>2]=0;d=c[b+700>>2]|0;if(d|0){if(a[b+704>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+700>>2]=0}a[b+704>>0]=1;c[b+700>>2]=0;c[b+692>>2]=0;c[b+696>>2]=0;d=c[b+512>>2]|0;if(d|0){if(a[b+516>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+512>>2]=0}a[b+516>>0]=1;c[b+512>>2]=0;c[b+504>>2]=0;c[b+508>>2]=0;d=c[b+492>>2]|0;if(d|0){if(a[b+496>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+492>>2]=0}a[b+496>>0]=1;c[b+492>>2]=0;c[b+484>>2]=0;c[b+488>>2]=0;Eu(b+288|0);d=c[b+276>>2]|0;if(!d){a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;i=b+272|0;c[i>>2]=0;c[b>>2]=6120;return}if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+276>>2]=0;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;i=b+272|0;c[i>>2]=0;c[b>>2]=6120;return}function uc(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(!a)return;b=c[6769]|0;d=c[a+-4>>2]|0;k=a+-8+(d&-8)|0;do if(!(d&1)){e=c[a+-8>>2]|0;if(!(d&3))return;g=a+-8+(0-e)|0;h=e+(d&-8)|0;if(g>>>0>>0)return;if((c[6770]|0)==(g|0)){a=c[k+4>>2]|0;if((a&3|0)!=3){i=g;j=g;a=h;break}c[6767]=h;c[k+4>>2]=a&-2;c[g+4>>2]=h|1;c[g+h>>2]=h;return}d=3?e>>>3:e;if(e>>>0<256){a=c[g+8>>2]|0;b=c[g+12>>2]|0;if((b|0)==(a|0)){c[6765]=c[6765]&~(1<>2]=b;c[b+8>>2]=a;i=g;j=g;a=h;break}}f=c[g+24>>2]|0;a=c[g+12>>2]|0;do if((a|0)==(g|0)){a=c[g+16+4>>2]|0;if(!a){a=c[g+16>>2]|0;if(!a){a=0;break}else b=g+16|0}else b=g+16+4|0;while(1){e=a+20|0;d=c[e>>2]|0;if(!d){e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;b=e}}else{a=d;b=e}}c[b>>2]=0}else{j=c[g+8>>2]|0;c[j+12>>2]=a;c[a+8>>2]=j}while(0);if(f){b=c[g+28>>2]|0;if((c[27364+(b<<2)>>2]|0)==(g|0)){c[27364+(b<<2)>>2]=a;if(!a){c[6766]=c[6766]&~(1<>2]|0)==(g|0)?f+16|0:f+20|0)>>2]=a;if(!a){i=g;j=g;a=h;break}}c[a+24>>2]=f;b=c[g+16>>2]|0;if(b|0){c[a+16>>2]=b;c[b+24>>2]=a}b=c[g+16+4>>2]|0;if(b){c[a+20>>2]=b;c[b+24>>2]=a;i=g;j=g;a=h}else{i=g;j=g;a=h}}else{i=g;j=g;a=h}}else{i=a+-8|0;j=a+-8|0;a=d&-8}while(0);if(i>>>0>=k>>>0)return;b=c[k+4>>2]|0;if(!(b&1))return;if(!(b&2)){if((c[6771]|0)==(k|0)){k=(c[6768]|0)+a|0;c[6768]=k;c[6771]=j;c[j+4>>2]=k|1;if((j|0)!=(c[6770]|0))return;c[6770]=0;c[6767]=0;return}if((c[6770]|0)==(k|0)){k=(c[6767]|0)+a|0;c[6767]=k;c[6770]=i;c[j+4>>2]=k|1;c[i+k>>2]=k;return}f=(b&-8)+a|0;d=3?b>>>3:b;do if(b>>>0<256){b=c[k+8>>2]|0;a=c[k+12>>2]|0;if((a|0)==(b|0)){c[6765]=c[6765]&~(1<>2]=a;c[a+8>>2]=b;break}}else{g=c[k+24>>2]|0;a=c[k+12>>2]|0;do if((a|0)==(k|0)){a=c[k+16+4>>2]|0;if(!a){a=c[k+16>>2]|0;if(!a){b=0;break}else b=k+16|0}else b=k+16+4|0;while(1){e=a+20|0;d=c[e>>2]|0;if(!d){e=a+16|0;d=c[e>>2]|0;if(!d)break;else{a=d;b=e}}else{a=d;b=e}}c[b>>2]=0;b=a}else{b=c[k+8>>2]|0;c[b+12>>2]=a;c[a+8>>2]=b;b=a}while(0);if(g|0){a=c[k+28>>2]|0;if((c[27364+(a<<2)>>2]|0)==(k|0)){c[27364+(a<<2)>>2]=b;if(!b){c[6766]=c[6766]&~(1<>2]|0)==(k|0)?g+16|0:g+20|0)>>2]=b;if(!b)break}c[b+24>>2]=g;a=c[k+16>>2]|0;if(a|0){c[b+16>>2]=a;c[a+24>>2]=b}a=c[k+16+4>>2]|0;if(a|0){c[b+20>>2]=a;c[a+24>>2]=b}}}while(0);c[j+4>>2]=f|1;c[i+f>>2]=f;if((j|0)==(c[6770]|0)){c[6767]=f;return}}else{c[k+4>>2]=b&-2;c[j+4>>2]=a|1;c[i+a>>2]=a;f=a}d=3?f>>>3:f;if(f>>>0<256){a=c[6765]|0;if(!(a&1<>2]|0}c[a>>2]=j;c[b+12>>2]=j;c[j+8>>2]=b;c[j+12>>2]=27100+(d<<1<<2);return}a=8?f>>>8:f;if(a)if(f>>>0>16777215)e=31;else{i=(16?(a+1048320|0)>>>16:a+1048320|0)&8;k=(16?((a<>>16:(a<>>16:(a<>>15:a<>>(e+7|0):f)&1|e<<1}else e=0;b=27364+(e<<2)|0;c[j+28>>2]=e;c[j+20>>2]=0;c[j+16>>2]=0;a=c[6766]|0;d=1<>2]=j;c[j+24>>2]=b;c[j+12>>2]=j;c[j+8>>2]=j}else{a=c[b>>2]|0;b:do if((c[a+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(1?e>>>1:e)|0);while(1){d=a+16+((31?e>>>31:e)<<2)|0;b=c[d>>2]|0;if(!b)break;if((c[b+4>>2]&-8|0)==(f|0)){a=b;break b}else{e=e<<1;a=b}}c[d>>2]=j;c[j+24>>2]=a;c[j+12>>2]=j;c[j+8>>2]=j;break a}while(0);i=a+8|0;k=c[i>>2]|0;c[k+12>>2]=j;c[i>>2]=j;c[j+8>>2]=k;c[j+12>>2]=a;c[j+24>>2]=0}while(0);k=(c[6773]|0)+-1|0;c[6773]=k;if(k|0)return;a=27516;while(1){a=c[a>>2]|0;if(!a)break;else a=a+8|0}c[6773]=-1;return}function vc(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var 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,A=0,B=0,C=0,E=0,F=0,G=0,H=0,I=0;i=c[d+8>>2]|0;if(!i){a=0;return a|0}j=i;E=i;i=0;do{if((c[E+20>>2]|0)>(c[a+100>>2]|0)){y=c[E+12>>2]|0;w=c[y+88>>2]|0;A=w-(c[d+88>>2]|0)|0;x=c[y+92>>2]|0;B=x-(c[d+92>>2]|0)|0;y=c[y+96>>2]|0;C=y-(c[d+96>>2]|0)|0;k=Yr(c[g>>2]|0,c[g+4>>2]|0,A|0,((A|0)<0)<<31>>31|0)|0;n=D()|0;j=Yr(c[g+8>>2]|0,c[g+8+4>>2]|0,B|0,((B|0)<0)<<31>>31|0)|0;n=Lv(j|0,D()|0,k|0,n|0)|0;k=D()|0;j=Yr(c[g+16>>2]|0,c[g+16+4>>2]|0,C|0,((C|0)<0)<<31>>31|0)|0;j=Lv(n|0,k|0,j|0,D()|0)|0;k=D()|0;n=Yr(c[f>>2]|0,c[f+4>>2]|0,A|0,((A|0)<0)<<31>>31|0)|0;v=D()|0;m=Yr(c[f+8>>2]|0,c[f+8+4>>2]|0,B|0,((B|0)<0)<<31>>31|0)|0;v=Lv(m|0,D()|0,n|0,v|0)|0;n=D()|0;m=Yr(c[f+16>>2]|0,c[f+16+4>>2]|0,C|0,((C|0)<0)<<31>>31|0)|0;m=Lv(v|0,n|0,m|0,D()|0)|0;n=D()|0;if((k|0)>0|(k|0)==0&j>>>0>0){u=j;v=k;o=-1;l=1}else{u=tv(0,0,j|0,k|0)|0;v=D()|0;u=(j|0)!=0|(k|0)!=0?u:0;v=(j|0)!=0|(k|0)!=0?v:0;o=((j|0)!=0|(k|0)!=0)&1;l=((j|0)!=0|(k|0)!=0)<<31>>31}if(!((n|0)>0|(n|0)==0&m>>>0>0)){j=tv(0,0,m|0,n|0)|0;k=D()|0;j=(m|0)!=0|(n|0)!=0?j:0;k=(m|0)!=0|(n|0)!=0?k:0;if(!((((m|0)!=0|(n|0)!=0?o:l)|0)==0&((j|0)==0&(k|0)==0))){t=j;l=(m|0)!=0|(n|0)!=0?o:l;p=8}}else{t=m;k=n;p=8}a:do if((p|0)==8){p=0;if(!i){c[h>>2]=u;c[h+4>>2]=v;c[h+8>>2]=t;c[h+8+4>>2]=k;c[h+16>>2]=l;i=E;break}j=c[h+16>>2]|0;if((l|0)==(j|0)){if(l|0){n=c[h+8>>2]|0;q=c[h+8+4>>2]|0;m=Yr(n|0,0,u|0,0)|0;j=D()|0;r=Yr(q|0,0,u|0,0)|0;p=D()|0;n=Yr(n|0,0,v|0,0)|0;o=D()|0;q=Yr(q|0,0,v|0,0)|0;H=D()|0;n=Lv(r|0,0,n|0,0)|0;r=D()|0;H=Lv(p|0,0,q|0,H|0)|0;o=Lv(H|0,D()|0,o|0,0)|0;r=Lv(o|0,D()|0,r|0,0)|0;o=D()|0;j=Lv(0,n|0,m|0,j|0)|0;m=D()|0;n=Lv(r|0,o|0,(m>>>0>>0|(m|0)==(n|0)&j>>>0<0)&1|0,0)|0;o=D()|0;r=c[h>>2]|0;H=c[h+4>>2]|0;q=Yr(r|0,0,t|0,0)|0;p=D()|0;F=Yr(H|0,0,t|0,0)|0;I=D()|0;r=Yr(r|0,0,k|0,0)|0;s=D()|0;H=Yr(H|0,0,k|0,0)|0;G=D()|0;r=Lv(F|0,0,r|0,0)|0;F=D()|0;G=Lv(I|0,0,H|0,G|0)|0;s=Lv(G|0,D()|0,s|0,0)|0;F=Lv(s|0,D()|0,F|0,0)|0;s=D()|0;p=Lv(0,r|0,q|0,p|0)|0;q=D()|0;r=Lv(F|0,s|0,(q>>>0>>0|(q|0)==(r|0)&p>>>0<0)&1|0,0)|0;s=D()|0;if(!(o>>>0>>0|(o|0)==(s|0)&n>>>0>>0))if(o>>>0>s>>>0|(o|0)==(s|0)&n>>>0>r>>>0)j=1;else j=m>>>0>>0|(m|0)==(q|0)&j>>>0

>>0?-1:(m>>>0>q>>>0|(m|0)==(q|0)&j>>>0>p>>>0)&1;else j=-1;j=z(j,l)|0;p=17}}else{j=l-j|0;p=17}do if((p|0)==17){p=0;if((j|0)>=0)if(!j)break;else break a;else{c[h>>2]=u;c[h+4>>2]=v;c[h+8>>2]=t;c[h+8+4>>2]=k;c[h+16>>2]=l;i=E;break a}}while(0);j=(c[i+4>>2]|0)==(E|0);if((c[i>>2]|0)==(E|0))if(j){I=c[e+8>>2]|0;F=z(I,B)|0;u=c[e+4>>2]|0;F=F-(z(u,C)|0)|0;H=c[e>>2]|0;I=(z(H,C)|0)-(z(I,A)|0)|0;H=(z(u,A)|0)-(z(H,B)|0)|0;u=c[i+12>>2]|0;j=c[(c[E+8>>2]|0)+12>>2]|0;C=c[j+88>>2]|0;A=(c[u+88>>2]|0)-C|0;v=c[j+92>>2]|0;B=(c[u+92>>2]|0)-v|0;j=c[j+96>>2]|0;u=(c[u+96>>2]|0)-j|0;G=(z(y-j|0,B)|0)-(z(u,x-v|0)|0)|0;j=(z(u,w-C|0)|0)-(z(y-j|0,A)|0)|0;C=(z(x-v|0,A)|0)-(z(B,w-C|0)|0)|0;F=Yr(G|0,((G|0)<0)<<31>>31|0,F|0,((F|0)<0)<<31>>31|0)|0;G=D()|0;I=Yr(j|0,((j|0)<0)<<31>>31|0,I|0,((I|0)<0)<<31>>31|0)|0;j=D()|0;H=Yr(C|0,((C|0)<0)<<31>>31|0,H|0,((H|0)<0)<<31>>31|0)|0;H=Lv(F|0,G|0,H|0,D()|0)|0;j=Lv(H|0,D()|0,I|0,j|0)|0;I=D()|0;j=(I|0)>0|(I|0)==0&j>>>0>0?2:1}else j=2;else j=j&1;i=(j|0)==2^b?i:E}while(0);j=c[d+8>>2]|0}E=c[E>>2]|0}while((E|0)!=(j|0));return i|0}function wc(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,t=0,u=0.0,v=0.0,w=0.0,x=0;q=ea;ea=ea+176|0;c[q+96>>2]=1;c[q+96+4>>2]=e;c[q+96+8>>2]=d;c[q+96+12>>2]=16;f[q+96+16>>2]=1.0000000474974513e-03;a[q+40+24>>0]=1;p=q+40+20|0;c[p>>2]=0;c[q+40+12>>2]=0;c[q+40+16>>2]=0;o=q+40+52|0;a[o>>0]=1;n=q+40+48|0;c[n>>2]=0;c[q+40+40>>2]=0;c[q+40+44>>2]=0;a[q+40>>0]=1;c[q+40+4>>2]=0;c[q+40+28>>2]=0;c[q+40+32>>2]=0;a[q+16>>0]=1;c[q+12>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;a[q+36>>0]=1;c[q+32>>2]=0;c[q+24>>2]=0;c[q+28>>2]=0;c[q+96+20>>2]=e;ab(q,q+96|0,q+40|0)|0;c[6747]=(c[6747]|0)+1;d=kb(1271)|0;if(!d)m=0;else{c[(d+4+15&-16)+-4>>2]=d;m=d+4+15&-16}ub(m,b,c[q+40+4>>2]|0,c[p>>2]|0,0);if((c[q+40+28>>2]|0)>0){j=m+720|0;l=m+732|0;k=m+740|0;h=m+924|0;i=0;do{b=i*3|0;r=c[n>>2]|0;d=c[r+(b<<2)>>2]|0;e=c[r+(b+1<<2)>>2]|0;b=c[r+(b+2<<2)>>2]|0;if((d|0)<(e|0)){x=c[j>>2]|0;mh(m,0);r=(c[l>>2]|0)+-1|0;t=c[k>>2]|0;c[t+(r*52|0)+8>>2]=x+(d*104|0);c[t+(r*52|0)+12>>2]=x+(e*104|0);w=+f[x+(d*104|0)+8>>2]-+f[x+(e*104|0)+8>>2];v=+f[x+(d*104|0)+12>>2]-+f[x+(e*104|0)+12>>2];u=+f[x+(d*104|0)+16>>2]-+f[x+(e*104|0)+16>>2];f[t+(r*52|0)+16>>2]=+s(+(w*w+v*v+u*u));a[h>>0]=1}if((e|0)<(b|0)){r=c[j>>2]|0;mh(m,0);x=(c[l>>2]|0)+-1|0;t=c[k>>2]|0;c[t+(x*52|0)+8>>2]=r+(e*104|0);c[t+(x*52|0)+12>>2]=r+(b*104|0);u=+f[r+(e*104|0)+8>>2]-+f[r+(b*104|0)+8>>2];v=+f[r+(e*104|0)+12>>2]-+f[r+(b*104|0)+12>>2];w=+f[r+(e*104|0)+16>>2]-+f[r+(b*104|0)+16>>2];f[t+(x*52|0)+16>>2]=+s(+(u*u+v*v+w*w));a[h>>0]=1}if((b|0)<(d|0)){r=c[j>>2]|0;mh(m,0);x=(c[l>>2]|0)+-1|0;t=c[k>>2]|0;c[t+(x*52|0)+8>>2]=r+(b*104|0);c[t+(x*52|0)+12>>2]=r+(d*104|0);u=+f[r+(b*104|0)+8>>2]-+f[r+(d*104|0)+8>>2];v=+f[r+(b*104|0)+12>>2]-+f[r+(d*104|0)+12>>2];w=+f[r+(b*104|0)+16>>2]-+f[r+(d*104|0)+16>>2];f[t+(x*52|0)+16>>2]=+s(+(u*u+v*v+w*w));a[h>>0]=1}af(m,d,e,b,0);i=i+1|0}while((i|0)<(c[q+40+28>>2]|0))}if(c[q+40+12>>2]|0){c[q+40+4>>2]=0;d=c[p>>2]|0;if(d|0){if(a[q+40+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[p>>2]=0}a[q+40+24>>0]=1;c[p>>2]=0;c[q+40+12>>2]=0;c[q+40+16>>2]=0}if(c[q+40+40>>2]|0){c[q+40+32>>2]=0;d=c[n>>2]|0;if(d|0){if(a[o>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[n>>2]=0}a[o>>0]=1;c[n>>2]=0;c[q+40+40>>2]=0;c[q+40+44>>2]=0}if(g){e=c[m+732>>2]|0;if((e|0)>0){j=m+740|0;i=0;d=243703;do{b=c[j>>2]|0;h=b+(i*52|0)|0;d=(z(d,1664525)|0)+1013904223|0;k=q+124|0;l=h;g=k+52|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));k=h;l=b+(((d>>>0)%(e>>>0)|0)*52|0)|0;g=k+52|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));k=b+(((d>>>0)%(e>>>0)|0)*52|0)|0;l=q+124|0;g=k+52|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));i=i+1|0}while((i|0)!=(e|0))}else d=243703;h=c[m+752>>2]|0;if((h|0)>0){j=m+760|0;i=0;do{e=c[j>>2]|0;b=e+(i*44|0)|0;d=(z(d,1664525)|0)+1013904223|0;e=e+(((d>>>0)%(h>>>0)|0)*44|0)|0;k=q+124|0;l=b;g=k+44|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));k=b;l=e;g=k+44|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));k=e;l=q+124|0;g=k+44|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(g|0));i=i+1|0}while((i|0)!=(h|0))}}d=c[q+32>>2]|0;if(d|0){if(a[q+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[q+32>>2]=0}a[q+36>>0]=1;c[q+32>>2]=0;c[q+24>>2]=0;c[q+28>>2]=0;d=c[q+12>>2]|0;if(d|0){if(a[q+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[q+12>>2]=0}d=c[n>>2]|0;if(d|0){if(a[o>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[n>>2]=0}a[o>>0]=1;c[n>>2]=0;c[q+40+40>>2]=0;c[q+40+44>>2]=0;d=c[p>>2]|0;if(!d){ea=q;return m|0}if(a[q+40+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[p>>2]=0;ea=q;return m|0} +function Qh(a,b,d){a=a|0;b=b|0;d=d|0;do if(!((b|0)==32&(d|0)==32)){if((b|0)==32){if((d|0)<20){b=a+96|0;break}if((d+-21|0)>>>0<9){b=a+104|0;break}}else{if((b|0)<20&(d|0)==32){b=a+100|0;break}if((b+-21|0)>>>0<9&(d|0)==32){b=a+108|0;break}if((b|0)==8&(d|0)==8){b=a+60|0;break}if((b|0)==8&(d|0)==1){b=a+76|0;break}if((b|0)==1&(d|0)==8){b=a+80|0;break}}if(!(d|b)){b=a+72|0;break}if((b|0)<20&(d|0)==28){b=a+88|0;break}if((b|0)==28&(d|0)<20){b=a+84|0;break}if((b|0)<20){if((d|0)<20){b=a+32|0;break}if((d+-21|0)>>>0<9){b=a+36|0;break}}else{if((d|0)<20&(b+-21|0)>>>0<9){b=a+40|0;break}if((b|0)==31)if((d|0)==31){b=a+48|0;break}else{b=a+44|0;break}}if((d|0)==31){b=a+52|0;break}else{b=a+56|0;break}}else b=a+92|0;while(0);return c[b>>2]|0}function Rh(b){b=b|0;var d=0;d=js(616)|0;c[d+164>>2]=1065353216;c[d+168>>2]=1065353216;c[d+172>>2]=1065353216;f[d+176>>2]=0.0;c[d+180>>2]=0;f[d+184>>2]=999999984306749440.0;c[d+188>>2]=0;c[d+188+4>>2]=0;c[d+188+8>>2]=0;c[d+188+12>>2]=0;c[d+204>>2]=1;c[d+208>>2]=-1;c[d+212>>2]=-1;c[d+216>>2]=1;f[d+220>>2]=0.0;f[d+224>>2]=.5;f[d+228>>2]=0.0;f[d+232>>2]=0.0;c[d+236>>2]=1;c[d+240>>2]=0;f[d+244>>2]=1.0;c[d+248>>2]=0;c[d+248+4>>2]=0;c[d+248+8>>2]=0;c[d+248+12>>2]=0;c[d+4>>2]=1065353216;c[d+8>>2]=0;c[d+8+4>>2]=0;c[d+8+8>>2]=0;c[d+8+12>>2]=0;c[d+24>>2]=1065353216;c[d+28>>2]=0;c[d+28+4>>2]=0;c[d+28+8>>2]=0;c[d+28+12>>2]=0;c[d+44>>2]=1065353216;c[d+48>>2]=0;c[d+48+4>>2]=0;c[d+48+8>>2]=0;c[d+48+12>>2]=0;c[d+48+16>>2]=0;c[d>>2]=5172;a[d+500>>0]=1;c[d+496>>2]=0;c[d+488>>2]=0;c[d+492>>2]=0;Cc(d,b);return d|0}function Sh(a,b,d,e,g,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;var l=0,m=0,n=0;n=ea;ea=ea+16|0;Fi(15456);Ya[c[(c[a>>2]|0)+32>>2]&1](a,b,d,e,g,h,i,j,k);m=c[a+184>>2]|0;l=c[j+20>>2]|0;l=(m|0)>(l|0)?m:l;if((l|0)>0){m=0;do{+qa[c[(c[a>>2]|0)+40>>2]&3](a,m,b,d,e,g,h,i,j,k);m=m+1|0}while((m|0)<(l|0))}l=c[2685]|0;a=(c[l+16>>2]|0)+-1|0;c[l+16>>2]=a;if(a|0){ea=n;return 0.0}do if(c[l+4>>2]|0){Y(n|0,0)|0;a=c[6746]|0;f[l+8>>2]=+f[l+8>>2]+ +(((c[n+4>>2]|0)-(c[a+4>>2]|0)+(((c[n>>2]|0)-(c[a>>2]|0)|0)*1e6|0)-(c[l+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[l+16>>2]|0)){l=c[2685]|0;break}else{ea=n;return 0.0}}while(0);c[2685]=c[l+20>>2];ea=n;return 0.0}function Th(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0;if((e|0)<=0)return;g=0;do{f[d+(g<<4)+12>>2]=-999999984306749440.0;g=g+1|0}while((g|0)!=(e|0));r=0;do{i=+f[a+12>>2];n=+f[b+(r<<4)>>2]*i;j=+f[a+16>>2];p=+f[b+(r<<4)+4>>2]*j;k=+f[a+20>>2];o=+f[b+(r<<4)+8>>2]*k;g=c[a+96>>2]|0;if((g|0)>0){l=c[a+104>>2]|0;m=0;h=-3402823466385288598117041.0e14;q=-1;do{s=n*+f[l+(m<<4)>>2]+p*+f[l+(m<<4)+4>>2]+o*+f[l+(m<<4)+8>>2];t=s>h;q=t?m:q;h=t?s:h;m=m+1|0}while((m|0)!=(g|0));p=+f[l+(q<<4)+4>>2]*j;s=+f[l+(q<<4)+8>>2]*k;f[d+(r<<4)>>2]=+f[l+(q<<4)>>2]*i;f[d+(r<<4)+4>>2]=p;f[d+(r<<4)+8>>2]=s}else h=-999999984306749440.0;f[d+(r<<4)+12>>2]=h;r=r+1|0}while((r|0)!=(e|0));return}function Uh(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;a:do if(!(rt(b,c[d+8>>2]|0,g)|0)){if(!(rt(b,c[d>>2]|0,g)|0)){b=c[b+8>>2]|0;Ta[c[(c[b>>2]|0)+24>>2]&31](b,d,e,f,g);break}if((c[d+16>>2]|0)!=(e|0)?(c[d+20>>2]|0)!=(e|0):0){c[d+32>>2]=f;do if((c[d+44>>2]|0)!=4){a[d+52>>0]=0;a[d+53>>0]=0;b=c[b+8>>2]|0;Va[c[(c[b>>2]|0)+20>>2]&7](b,d,e,e,1,g);if(a[d+53>>0]|0){g=(a[d+52>>0]|0)==0;c[d+44>>2]=3;if(g)break;else break a}else{c[d+44>>2]=4;break}}while(0);c[d+20>>2]=e;c[d+40>>2]=(c[d+40>>2]|0)+1;if((c[d+36>>2]|0)!=1)break;if((c[d+24>>2]|0)!=2)break;a[d+54>>0]=1;break}if((f|0)==1)c[d+32>>2]=1}else Jr(d,e,f);while(0);return}function Vh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=c[a+232>>2]|0;a:do if((f|0)>0){g=c[a+240>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0))break a}if((d|0)<(f|0)){c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+240>>2]|0)+(f+-1<<2)>>2]=b;c[a+232>>2]=f+-1}}while(0);d=c[b+188>>2]|0;if(d|0){g=c[a+68>>2]|0;g=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0;Ma[c[(c[g>>2]|0)+40>>2]&127](g,d,c[a+24>>2]|0);g=c[a+68>>2]|0;Ma[c[(c[g>>2]|0)+12>>2]&127](g,d,c[a+24>>2]|0);c[b+188>>2]=0}f=c[a+8>>2]|0;if((f|0)<=0)return;g=c[a+16>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0)){h=15;break}}if((h|0)==15)return;if((d|0)>=(f|0))return;c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+16>>2]|0)+(f+-1<<2)>>2]=b;c[a+8>>2]=f+-1;return}function Wh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=c[d>>2]|0;d=c[b+268>>2]|0;a:do if((d|0)>0){f=c[b+276>>2]|0;e=0;while(1){if((c[f+(e<<2)>>2]|0)==(g|0))break;e=e+1|0;if((e|0)>=(d|0))break a}if((e|0)!=(d|0))return}while(0);if((d|0)==(c[b+272>>2]|0)?(h=(d|0)==0?1:d<<1,(d|0)<(h|0)):0){if(!h)e=0;else{c[6747]=(c[6747]|0)+1;d=kb((h<<2|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=c[b+268>>2]|0}if((d|0)>0){f=0;do{c[e+(f<<2)>>2]=c[(c[b+276>>2]|0)+(f<<2)>>2];f=f+1|0}while((f|0)!=(d|0))}f=c[b+276>>2]|0;if(f){if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[f+-4>>2]|0);d=c[b+268>>2]|0}c[b+276>>2]=0}a[b+280>>0]=1;c[b+276>>2]=e;c[b+272>>2]=h}c[(c[b+276>>2]|0)+(d<<2)>>2]=g;c[b+268>>2]=d+1;return}function Xh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=c[a+328>>2]|0;a:do if((f|0)>0){g=c[a+336>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0))break a}if((d|0)<(f|0)){c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+336>>2]|0)+(f+-1<<2)>>2]=b;c[a+328>>2]=f+-1}}while(0);d=c[b+188>>2]|0;if(d|0){g=c[a+68>>2]|0;g=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0;Ma[c[(c[g>>2]|0)+40>>2]&127](g,d,c[a+24>>2]|0);g=c[a+68>>2]|0;Ma[c[(c[g>>2]|0)+12>>2]&127](g,d,c[a+24>>2]|0);c[b+188>>2]=0}f=c[a+8>>2]|0;if((f|0)<=0)return;g=c[a+16>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0)){h=15;break}}if((h|0)==15)return;if((d|0)>=(f|0))return;c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+16>>2]|0)+(f+-1<<2)>>2]=b;c[a+8>>2]=f+-1;return}function Yh(b,d){b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=us()|0;c[e+4>>2]=3;c[e>>2]=5660;c[e+8>>2]=-1;c[e+12>>2]=-1;f[e+16>>2]=3402823466385288598117041.0e14;a[e+20>>0]=1;a[e+21>>0]=0;c[e+24>>2]=-1;c[e+28>>2]=b;Jk();c[e+32>>2]=25640;f[e+36>>2]=0.0;f[e+40>>2]=.30000001192092896;c[e+44>>2]=0;c[e>>2]=5608;c[e+300>>2]=c[d>>2];c[e+300+4>>2]=c[d+4>>2];c[e+300+8>>2]=c[d+8>>2];c[e+300+12>>2]=c[d+12>>2];k=+f[d>>2];j=+f[d+4>>2];i=+f[d+8>>2];h=k*+f[b+20>>2]+j*+f[b+24>>2]+i*+f[b+28>>2]+ +f[b+56>>2];g=k*+f[b+36>>2]+j*+f[b+40>>2]+i*+f[b+44>>2]+ +f[b+60>>2];f[e+316>>2]=k*+f[b+4>>2]+j*+f[b+8>>2]+i*+f[b+12>>2]+ +f[b+52>>2];f[e+320>>2]=h;f[e+324>>2]=g;f[e+328>>2]=0.0;c[e+332>>2]=0;a[e+344>>0]=0;f[e+348>>2]=.30000001192092896;f[e+352>>2]=1.0;f[e+356>>2]=0.0;return e|0}function Zh(a){a=a|0;var b=0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0;b=ct()|0;c[b+8>>2]=0;c[b+12>>2]=1065353216;c[b+16>>2]=1065353216;c[b+20>>2]=1065353216;f[b+24>>2]=0.0;f[b+44>>2]=.03999999910593033;c[b+52>>2]=0;c[b>>2]=9156;c[b+4>>2]=0;g=+f[a>>2];e=+f[a+4>>2];d=+f[a+8>>2];d=+f[a+((g>2]*.10000000149011612;if(d<.03999999910593033){i=+$G(b);h=+$G(b);g=+$G(b);i=i+ +f[b+28>>2];h=h+ +f[b+32>>2];g=g+ +f[b+36>>2];f[b+44>>2]=d;d=+$G(b);e=+$G(b);g=g-+$G(b);f[b+28>>2]=i-d;f[b+32>>2]=h-e;f[b+36>>2]=g;f[b+40>>2]=0.0}g=+$G(b);h=+$G(b);i=+$G(b);h=+f[a+4>>2]-h;i=+f[a+8>>2]-i;f[b+28>>2]=+f[a>>2]-g;f[b+32>>2]=h;f[b+36>>2]=i;f[b+40>>2]=0.0;return b|0}function _h(b){b=b|0;var d=0,e=0;d=c[b+92>>2]|0;if(d|0){if(a[b+96>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+92>>2]=0}a[b+96>>0]=1;c[b+92>>2]=0;c[b+84>>2]=0;c[b+88>>2]=0;d=c[b+64>>2]|0;if(d|0)do{c[b+64>>2]=c[d+8>>2];e=c[d>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+64>>2]|0}while((d|0)!=0);d=c[b+48>>2]|0;if(d|0)do{c[b+48>>2]=c[d+8>>2];e=c[d>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+48>>2]|0}while((d|0)!=0);d=c[b+32>>2]|0;if(!d)return;do{c[b+32>>2]=c[d+8>>2];e=c[d>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);d=c[b+32>>2]|0}while((d|0)!=0);return}function $h(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0;c[a+4>>2]=35;c[a+8>>2]=0;c[a+12>>2]=1065353216;c[a+16>>2]=1065353216;c[a+20>>2]=1065353216;f[a+24>>2]=0.0;f[a+44>>2]=.03999999910593033;c[a>>2]=9452;c[a+52>>2]=1;g=+f[b>>2];e=+f[b+4>>2];d=+f[b+8>>2];d=+f[b+((g>2]*.10000000149011612;if(d<.03999999910593033){i=+$G(a);h=+$G(a);g=+$G(a);i=i+ +f[a+28>>2];h=h+ +f[a+32>>2];g=g+ +f[a+36>>2];f[a+44>>2]=d;d=+$G(a);e=+$G(a);g=g-+$G(a);f[a+28>>2]=i-d;f[a+32>>2]=h-e;f[a+36>>2]=g;f[a+40>>2]=0.0}g=+$G(a);h=+$G(a);i=+$G(a);h=+f[b+4>>2]-h;i=+f[b+8>>2]-i;f[a+28>>2]=+f[b>>2]-g;f[a+32>>2]=h;f[a+36>>2]=i;f[a+40>>2]=0.0;c[a+4>>2]=13;return}function ai(a,b,d){a=a|0;b=+b;d=+d;var e=0.0,g=0.0,h=0.0;e=+f[a+692>>2];do if(e>0.0){g=+f[a+688>>2];if(!((b-g)%6.2831854820251465<-3.1415927410125732))if((b-g)%6.2831854820251465>3.1415927410125732)h=(b-g)%6.2831854820251465+-6.2831854820251465;else h=(b-g)%6.2831854820251465;else h=(b-g)%6.2831854820251465+6.2831854820251465;if(!(!(h<-e)&h<=e))if(h>0.0){if((e+g)%6.2831854820251465<-3.1415927410125732){b=(e+g)%6.2831854820251465+6.2831854820251465;break}if(!((e+g)%6.2831854820251465>3.1415927410125732)){b=(e+g)%6.2831854820251465;break}b=(e+g)%6.2831854820251465+-6.2831854820251465;break}else{if((g-e)%6.2831854820251465<-3.1415927410125732){b=(g-e)%6.2831854820251465+6.2831854820251465;break}if(!((g-e)%6.2831854820251465>3.1415927410125732)){b=(g-e)%6.2831854820251465;break}b=(g-e)%6.2831854820251465+-6.2831854820251465;break}}while(0);f[a+680>>2]=(b-+pi(a,(c[a+28>>2]|0)+4|0,(c[a+32>>2]|0)+4|0))/d;return}function bi(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;i=c[d>>2]|0;i=ta[c[(c[i>>2]|0)+56>>2]&31](i,28)|0;j=(a[b+4>>0]|0)==0;h=c[b+8>>2]|0;g=c[b+12>>2]|0;b=c[d>>2]|0;c[i+4>>2]=b;c[i>>2]=6592;a[i+8>>0]=0;c[i+12>>2]=0;if(j){a[i+16>>0]=0;c[i+20>>2]=h;c[i+24>>2]=g;if(!(va[c[(c[b>>2]|0)+24>>2]&63](b,c[e+8>>2]|0,c[f+8>>2]|0)|0))return i|0;j=c[i+4>>2]|0;c[i+12>>2]=va[c[(c[j>>2]|0)+12>>2]&63](j,c[e+8>>2]|0,c[f+8>>2]|0)|0;a[i+8>>0]=1;return i|0}else{a[i+16>>0]=1;c[i+20>>2]=h;c[i+24>>2]=g;if(!(va[c[(c[b>>2]|0)+24>>2]&63](b,c[f+8>>2]|0,c[e+8>>2]|0)|0))return i|0;j=c[i+4>>2]|0;c[i+12>>2]=va[c[(c[j>>2]|0)+12>>2]&63](j,c[f+8>>2]|0,c[e+8>>2]|0)|0;a[i+8>>0]=1;return i|0}return 0}function ci(a,b,d){a=a|0;b=+b;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0;e=ea;ea=ea+96|0;c[e+32>>2]=1065353216;c[e+32+4>>2]=0;c[e+32+4+4>>2]=0;c[e+32+4+8>>2]=0;c[e+32+4+12>>2]=0;c[e+32+20>>2]=1065353216;c[e+32+24>>2]=0;c[e+32+24+4>>2]=0;c[e+32+24+8>>2]=0;c[e+32+24+12>>2]=0;c[e+32+40>>2]=1065353216;k=e+32+44|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;c[k+12>>2]=0;c[k+16>>2]=0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,e+32|0,e+16|0,e);i=(+f[e>>2]-+f[e+16>>2])*.5;h=(+f[e+4>>2]-+f[e+16+4>>2])*.5;j=(+f[e+8>>2]-+f[e+16+8>>2])*.5;g=+ha[c[(c[a>>2]|0)+48>>2]&15](a);f[d>>2]=b*.0833333283662796*((h+g)*2.0*((h+g)*2.0)+(j+g)*2.0*((j+g)*2.0));f[d+4>>2]=b*.0833333283662796*((i+g)*2.0*((i+g)*2.0)+(j+g)*2.0*((j+g)*2.0));f[d+8>>2]=b*.0833333283662796*((i+g)*2.0*((i+g)*2.0)+(h+g)*2.0*((h+g)*2.0));f[d+12>>2]=0.0;ea=e;return}function di(){var b=0;b=js(284)|0;c[b+164>>2]=1065353216;c[b+168>>2]=1065353216;c[b+172>>2]=1065353216;f[b+176>>2]=0.0;c[b+180>>2]=0;f[b+184>>2]=999999984306749440.0;c[b+188>>2]=0;c[b+188+4>>2]=0;c[b+188+8>>2]=0;c[b+188+12>>2]=0;c[b+204>>2]=1;c[b+208>>2]=-1;c[b+212>>2]=-1;c[b+216>>2]=1;f[b+220>>2]=0.0;f[b+224>>2]=.5;f[b+228>>2]=0.0;f[b+232>>2]=0.0;c[b+240>>2]=0;f[b+244>>2]=1.0;c[b+248>>2]=0;c[b+248+4>>2]=0;c[b+248+8>>2]=0;c[b+248+12>>2]=0;c[b+4>>2]=1065353216;c[b+8>>2]=0;c[b+8+4>>2]=0;c[b+8+8>>2]=0;c[b+8+12>>2]=0;c[b+24>>2]=1065353216;c[b+28>>2]=0;c[b+28+4>>2]=0;c[b+28+8>>2]=0;c[b+28+12>>2]=0;c[b+44>>2]=1065353216;c[b+48>>2]=0;c[b+48+4>>2]=0;c[b+48+8>>2]=0;c[b+48+12>>2]=0;c[b+48+16>>2]=0;c[b>>2]=6156;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;c[b+272>>2]=0;c[b+236>>2]=4;return b|0}function ei(b,d){b=b|0;d=d|0;var e=0,g=0,h=0,i=0.0,j=0.0,k=0,l=0;g=ea;ea=ea+48|0;if((c[b+136>>2]|0)<=0){ea=g;return}e=0;do{l=c[b+144>>2]|0;c[g+32>>2]=(a[l+(e*284|0)+84>>0]|0)==0?1065353216:0;c[g+32+4>>2]=0;c[g+32+8>>2]=1065353216;f[g+32+12>>2]=0.0;k=l+(e*284|0)+140|0;c[g+16>>2]=c[k>>2];c[g+16+4>>2]=c[k+4>>2];c[g+16+8>>2]=c[k+8>>2];c[g+16+12>>2]=c[k+12>>2];k=c[b+120>>2]|0;h=c[(c[d>>2]|0)+8>>2]|0;j=+f[l+(e*284|0)+108+(k<<2)>>2]+ +f[g+16+4>>2];i=+f[l+(e*284|0)+124+(k<<2)>>2]+ +f[g+16+8>>2];f[g>>2]=+f[l+(e*284|0)+92+(k<<2)>>2]+ +f[g+16>>2];f[g+4>>2]=j;f[g+8>>2]=i;f[g+12>>2]=0.0;Pa[h&127](d,g+16|0,g,g+32|0);Pa[c[(c[d>>2]|0)+8>>2]&127](d,g+16|0,(c[b+144>>2]|0)+(e*284|0)+16|0,g+32|0);e=e+1|0}while((e|0)<(c[b+136>>2]|0));ea=g;return}function fi(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;switch(b|0){case 2:{if((e|0)<1){f[a+232>>2]=d;c[a+300>>2]=c[a+300>>2]|512;return}if((e|0)<3){f[a+264>>2]=d;c[a+300>>2]=c[a+300>>2]|32;return}if((e|0)==3){f[a+248>>2]=d;c[a+300>>2]=c[a+300>>2]|2048;return}if((e|0)>=6)return;f[a+280>>2]=d;c[a+300>>2]=c[a+300>>2]|128;return}case 3:{if((e|0)<1){f[a+212>>2]=d;c[a+300>>2]=c[a+300>>2]|1;return}if((e|0)!=3)return;f[a+228>>2]=d;c[a+300>>2]=c[a+300>>2]|4;return}case 4:{if((e|0)<1){f[a+244>>2]=d;c[a+300>>2]=c[a+300>>2]|256;return}if((e|0)<3){f[a+276>>2]=d;c[a+300>>2]=c[a+300>>2]|16;return}if((e|0)==3){f[a+260>>2]=d;c[a+300>>2]=c[a+300>>2]|1024;return}if((e|0)>=6)return;f[a+292>>2]=d;c[a+300>>2]=c[a+300>>2]|64;return}default:return}}function gi(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0;l=c[b+720>>2]|0;a:do if(h?(k=c[b+732>>2]|0,(k|0)>0):0){h=c[b+740>>2]|0;j=0;while(1){i=c[h+(j*52|0)+8>>2]|0;if((i|0)==(l+(d*104|0)|0)?(c[h+(j*52|0)+12>>2]|0)==(l+(e*104|0)|0):0){h=10;break}if((i|0)==(l+(e*104|0)|0)?(c[h+(j*52|0)+12>>2]|0)==(l+(d*104|0)|0):0){h=10;break}j=j+1|0;if((j|0)>=(k|0))break a}if((h|0)==10)return}while(0);mh(b,g);g=(c[b+732>>2]|0)+-1|0;k=c[b+740>>2]|0;c[k+(g*52|0)+8>>2]=l+(d*104|0);c[k+(g*52|0)+12>>2]=l+(e*104|0);o=+f[l+(d*104|0)+8>>2]-+f[l+(e*104|0)+8>>2];n=+f[l+(d*104|0)+12>>2]-+f[l+(e*104|0)+12>>2];m=+f[l+(d*104|0)+16>>2]-+f[l+(e*104|0)+16>>2];f[k+(g*52|0)+16>>2]=+s(+(o*o+n*n+m*m));a[b+924>>0]=1;return}function hi(){var b=0;b=zs()|0;c[b>>2]=1025;c[b+116>>2]=0;a[b+120>>0]=0;c[b+124>>2]=0;c[b+124+4>>2]=0;c[b+124+8>>2]=0;c[b+124+12>>2]=0;c[b+124+16>>2]=0;c[b+124+20>>2]=0;c[b+124+24>>2]=0;c[b+124+28>>2]=0;c[b+300>>2]=0;a[b+304>>0]=0;c[b+308>>2]=0;c[b+308+4>>2]=0;c[b+308+8>>2]=0;c[b+308+12>>2]=0;c[b+308+16>>2]=0;c[b+308+20>>2]=0;c[b+308+24>>2]=0;c[b+308+28>>2]=0;c[b+484>>2]=0;a[b+488>>0]=0;c[b+492>>2]=0;c[b+492+4>>2]=0;c[b+492+8>>2]=0;c[b+492+12>>2]=0;c[b+492+16>>2]=0;c[b+492+20>>2]=0;c[b+492+24>>2]=0;c[b+492+28>>2]=0;c[b+668>>2]=0;a[b+672>>0]=0;c[b+676>>2]=0;c[b+676+4>>2]=0;c[b+676+8>>2]=0;c[b+676+12>>2]=0;c[b+676+16>>2]=0;c[b+676+20>>2]=0;c[b+676+24>>2]=0;c[b+676+28>>2]=0;c[b+740>>2]=0;c[b+744>>2]=0;c[b+748>>2]=0;c[b+768>>2]=0;return b|0}function ii(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c[a>>2]=4916;if((c[a+104>>2]|0)<=0){a=a+60|0;vi(a);wi(a);return}k=0;do{i=c[(c[a+4>>2]|0)+684>>2]|0;j=(c[a+112>>2]|0)+(k<<3)+4|0;b=c[j>>2]|0;d=c[i+60>>2]|0;if((d|0)>0){h=0;do{g=(c[i+68>>2]|0)+(h<<2)|0;e=c[g>>2]|0;if(e){f=0;while(1){d=e;e=c[e+280>>2]|0;if((c[d+276>>2]|0)==(b|0)){c[((f|0)==0?g:f+280|0)>>2]=e;LJ(d);d=f}if(!e)break;else f=d}d=c[i+60>>2]|0}h=h+1|0}while((h|0)<(d|0));b=c[j>>2]|0}if(b|0)Ca[c[(c[b>>2]|0)+4>>2]&511](b);k=k+1|0}while((k|0)<(c[a+104>>2]|0));a=a+60|0;vi(a);wi(a);return}function ji(b,d,e){b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;if(!(a[b+84>>0]|0)){c[b+32>>2]=c[b+204>>2];f[b+272>>2]=0.0;o=-+f[b+56>>2];p=-+f[b+60>>2];f[b>>2]=-+f[b+52>>2];f[b+4>>2]=o;f[b+8>>2]=p;f[b+12>>2]=0.0;p=1.0;b=b+268|0;f[b>>2]=p;return}g=+f[b>>2];k=+f[b+4>>2];l=+f[b+8>>2];m=g*+f[b+52>>2]+k*+f[b+56>>2]+l*+f[b+60>>2];n=+f[b+16>>2]-+f[d+52>>2];p=+f[b+20>>2]-+f[d+56>>2];o=+f[b+24>>2]-+f[d+60>>2];h=+f[d+332>>2];i=+f[d+336>>2];j=+f[d+328>>2];if(!(m>=-.10000000149011612)){f[b+272>>2]=-1.0/m*(g*(h*o-p*i+ +f[d+312>>2])+k*(n*i-o*j+ +f[d+316>>2])+l*(p*j-n*h+ +f[d+320>>2]));p=-1.0/m;b=b+268|0;f[b>>2]=p;return}else{f[b+272>>2]=0.0;p=10.0;b=b+268|0;f[b>>2]=p;return}}function ki(b,d){b=b|0;d=d|0;var e=0,f=0;if(a[b+1308>>0]|0){c[d>>2]=0;c[d+4>>2]=0;return}gc(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);c[d>>2]=0;c[d+4>>2]=6;if((c[b+856>>2]|0)==0?(a[b+788>>0]|0)==0:0){e=0;f=6}else{c[d>>2]=1;c[d+4>>2]=5;e=1;f=5}if(!((c[b+860>>2]|0)==0?(a[b+789>>0]|0)==0:0)){e=e+1|0;c[d>>2]=e;f=f+-1|0;c[d+4>>2]=f}if(!((c[b+864>>2]|0)==0?!(a[b+790>>0]|0):0)){c[d>>2]=e+1;c[d+4>>2]=f+-1}if(df(b,0)|0){c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1}if(df(b,1)|0){c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1}if(!(df(b,2)|0))return;c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1;return}function li(a,b,d,e,g,h,i,j,k,l){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0;m=ea;ea=ea+16|0;Fi(15519);+pa[c[(c[a>>2]|0)+44>>2]&3](a,b,d,e,g,h,i,j,k);+pa[c[(c[a>>2]|0)+48>>2]&3](a,b,d,e,g,h,i,j,k);+ma[c[(c[a>>2]|0)+36>>2]&1](a,b,d,j);l=c[2685]|0;a=(c[l+16>>2]|0)+-1|0;c[l+16>>2]=a;if(a|0){ea=m;return 0.0}do if(c[l+4>>2]|0){Y(m|0,0)|0;a=c[6746]|0;f[l+8>>2]=+f[l+8>>2]+ +(((c[m+4>>2]|0)-(c[a+4>>2]|0)+(((c[m>>2]|0)-(c[a>>2]|0)|0)*1e6|0)-(c[l+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[l+16>>2]|0)){l=c[2685]|0;break}else{ea=m;return 0.0}}while(0);c[2685]=c[l+20>>2];ea=m;return 0.0}function mi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0;e=ea;ea=ea+96|0;j=+f[c>>2];k=+f[c+4>>2];l=+f[c+8>>2];_p(e+80|0,j,k,l,+yy(j,k,l,+f[b>>2],+f[b+4>>2],+f[b+8>>2]));l=+f[e+80>>2];k=+f[e+80+4>>2];j=+f[e+80+8>>2];xp(e+64|0,+f[b>>2],+f[b+4>>2],+f[b+8>>2],l,k,j);Ko(e+48|0,+f[c>>2],+f[c+4>>2],+f[c+8>>2],+f[b>>2],+f[b+4>>2],+f[b+8>>2]);i=+f[e+48>>2];h=+f[e+48+4>>2];g=+f[e+48+8>>2];m=+DJ(d);_p(e+16|0,+f[e+64>>2],+f[e+64+4>>2],+f[e+64+8>>2],m);vp(e+32|0,l,k,j,+f[e+16>>2],+f[e+16+4>>2],+f[e+16+8>>2]);_p(e,i,h,g,+CJ(d));vp(a,+f[e+32>>2],+f[e+32+4>>2],+f[e+32+8>>2],+f[e>>2],+f[e+4>>2],+f[e+8>>2]);ea=e;return}function ni(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=c[b+212>>2]|0;if((f|0)==(c[b+216>>2]|0)?(i=(f|0)==0?1:f<<1,(f|0)<(i|0)):0){if(!i)g=0;else{c[6747]=(c[6747]|0)+1;f=kb((i<<2|3)+16|0)|0;if(!f)g=0;else{c[(f+4+15&-16)+-4>>2]=f;g=f+4+15&-16}f=c[b+212>>2]|0}if((f|0)>0){h=0;do{c[g+(h<<2)>>2]=c[(c[b+220>>2]|0)+(h<<2)>>2];h=h+1|0}while((h|0)!=(f|0))}h=c[b+220>>2]|0;if(h){if(a[b+224>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);f=c[b+212>>2]|0}c[b+220>>2]=0}a[b+224>>0]=1;c[b+220>>2]=g;c[b+216>>2]=i}c[(c[b+220>>2]|0)+(f<<2)>>2]=d;c[b+212>>2]=f+1;if(!e)return;Ph(c[d+28>>2]|0,d);Ph(c[d+32>>2]|0,d);return}function oi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0;e=c[a+4>>2]|0;if(e|0)uk(e,b,d);e=c[a>>2]|0;if(!e)return;m=+f[b>>2];k=+f[e+128>>2];l=+f[b+4>>2];j=+f[b+8>>2];g=+f[d+4>>2];o=+f[d+8>>2];n=+f[d>>2];i=+f[e+180>>2]*(j*g-l*o)+ +f[e+184>>2]*(m*o-j*n)+(l*n-m*g)*+f[e+188>>2];h=(j*g-l*o)*+f[e+196>>2]+(m*o-j*n)*+f[e+200>>2]+(l*n-m*g)*+f[e+204>>2];g=(j*g-l*o)*+f[e+212>>2]+(m*o-j*n)*+f[e+216>>2]+(l*n-m*g)*+f[e+220>>2];f[e+276>>2]=m*k+ +f[e+276>>2];f[e+280>>2]=k*l+ +f[e+280>>2];f[e+284>>2]=k*j+ +f[e+284>>2];f[e+292>>2]=i+ +f[e+292>>2];f[e+296>>2]=h+ +f[e+296>>2];f[e+300>>2]=g+ +f[e+300>>2];c[e+312>>2]=(c[e+312>>2]|0)+1;return}function pi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0;v=+f[a+552>>2];u=+f[a+568>>2];t=+f[a+584>>2];s=+f[b>>2];r=+f[b+4>>2];q=+f[b+8>>2];o=+f[b+16>>2];n=+f[b+20>>2];m=+f[b+24>>2];k=+f[b+32>>2];i=+f[b+36>>2];g=+f[b+40>>2];j=+f[a+556>>2];h=+f[a+572>>2];e=+f[a+588>>2];x=+f[a+620>>2];w=+f[a+636>>2];d=+f[a+652>>2];p=x*+f[c>>2]+w*+f[c+4>>2]+d*+f[c+8>>2];l=x*+f[c+16>>2]+w*+f[c+20>>2]+d*+f[c+24>>2];d=x*+f[c+32>>2]+w*+f[c+36>>2]+d*+f[c+40>>2];d=+y(+((v*s+u*r+t*q)*p+(v*o+u*n+t*m)*l+(v*k+u*i+t*g)*d),+((s*j+r*h+q*e)*p+(o*j+n*h+m*e)*l+(k*j+i*h+g*e)*d));return +(d*+f[a+732>>2])}function qi(b){b=b|0;var d=0,e=0,g=0,h=0,i=0;i=ea;ea=ea+16|0;Fi(17615);d=c[b+8>>2]|0;if((d|0)>0){g=0;do{e=c[(c[b+16>>2]|0)+(g<<2)>>2]|0;if(!(a[b+76>>0]|0))switch(c[e+216>>2]|0){case 2:case 5:break;default:h=11}else h=11;if((h|0)==11){h=0;ve(b,e);d=c[b+8>>2]|0}g=g+1|0}while((g|0)<(d|0))}d=c[2685]|0;h=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=h;if(h|0){ea=i;return}do if(c[d+4>>2]|0){Y(i|0,0)|0;h=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[i+4>>2]|0)-(c[h+4>>2]|0)+(((c[i>>2]|0)-(c[h>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=i;return}}while(0);c[2685]=c[d+20>>2];ea=i;return}function ri(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=c[a+8>>2]|0;if((d|0)>0){f=0;do{e=c[(c[a+16>>2]|0)+(f<<2)>>2]|0;if(c[e+236>>2]&2){g=ra[c[(c[e>>2]|0)+16>>2]&127](e)|0;g=va[c[(c[b>>2]|0)+16>>2]&63](b,g,1)|0;d=va[c[(c[e>>2]|0)+20>>2]&63](e,c[g+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,g,d,1497645650,e);d=c[a+8>>2]|0}f=f+1|0}while((f|0)<(d|0))}if((c[a+212>>2]|0)<=0)return;d=0;do{g=c[(c[a+220>>2]|0)+(d<<2)>>2]|0;e=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0;e=va[c[(c[b>>2]|0)+16>>2]&63](b,e,1)|0;f=va[c[(c[g>>2]|0)+40>>2]&63](g,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,f,1397641027,g);d=d+1|0}while((d|0)<(c[a+212>>2]|0));return}function si(a){a=a|0;var b=0.0,d=0,e=0,g=0,h=0;e=ea;ea=ea+32|0;c[a+32>>2]=1566444395;c[a+36>>2]=1566444395;c[a+40>>2]=1566444395;f[a+44>>2]=0.0;c[a+48>>2]=-581039253;c[a+52>>2]=-581039253;c[a+56>>2]=-581039253;f[a+60>>2]=0.0;if((c[a+16>>2]|0)<=0){ea=e;return}d=0;do{g=c[a+24>>2]|0;h=c[g+(d*80|0)+64>>2]|0;Pa[c[(c[h>>2]|0)+8>>2]&127](h,g+(d*80|0)|0,e+16|0,e);b=+f[e+16>>2];if(+f[a+32>>2]>b)f[a+32>>2]=b;b=+f[e>>2];if(+f[a+48>>2]>2]=b;b=+f[e+16+4>>2];if(+f[a+36>>2]>b)f[a+36>>2]=b;b=+f[e+4>>2];if(+f[a+52>>2]>2]=b;b=+f[e+16+8>>2];if(+f[a+40>>2]>b)f[a+40>>2]=b;b=+f[e+8>>2];if(+f[a+56>>2]>2]=b;d=d+1|0}while((d|0)<(c[a+16>>2]|0));ea=e;return}function ti(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[b+12>>2]|0;if(!e)return;if(!(a[b+8>>0]|0))return;f=c[d+4>>2]|0;if((f|0)==(c[d+8>>2]|0)?(h=(f|0)==0?1:f<<1,(f|0)<(h|0)):0){if(!h){e=f;f=0}else{c[6747]=(c[6747]|0)+1;e=kb((h<<2|3)+16|0)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[d+4>>2]|0}if((e|0)>0){g=0;do{c[f+(g<<2)>>2]=c[(c[d+12>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0))}g=c[d+12>>2]|0;if(g){if(a[d+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[d+4>>2]|0}c[d+12>>2]=0}a[d+16>>0]=1;c[d+12>>2]=f;c[d+8>>2]=h;f=e;e=c[b+12>>2]|0}c[(c[d+12>>2]|0)+(f<<2)>>2]=e;c[d+4>>2]=f+1;return}function ui(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[b+20>>2]|0;if(!e)return;if(!(a[b+16>>0]|0))return;f=c[d+4>>2]|0;if((f|0)==(c[d+8>>2]|0)?(h=(f|0)==0?1:f<<1,(f|0)<(h|0)):0){if(!h){e=f;f=0}else{c[6747]=(c[6747]|0)+1;e=kb((h<<2|3)+16|0)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[d+4>>2]|0}if((e|0)>0){g=0;do{c[f+(g<<2)>>2]=c[(c[d+12>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0))}g=c[d+12>>2]|0;if(g){if(a[d+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[d+4>>2]|0}c[d+12>>2]=0}a[d+16>>0]=1;c[d+12>>2]=f;c[d+8>>2]=h;f=e;e=c[b+20>>2]|0}c[(c[d+12>>2]|0)+(f<<2)>>2]=e;c[d+4>>2]=f+1;return}function vi(b){b=b|0;var d=0;d=c[b+12>>2]|0;if(d|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;d=c[b+52>>2]|0;if(d|0){if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+52>>2]=0}a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;d=c[b+72>>2]|0;if(!d){a[b+76>>0]=1;c[b+72>>2]=0;c[b+64>>2]=0;b=b+68|0;c[b>>2]=0;return}if(a[b+76>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+72>>2]=0;a[b+76>>0]=1;c[b+72>>2]=0;c[b+64>>2]=0;b=b+68|0;c[b>>2]=0;return}function wi(b){b=b|0;var d=0;d=c[b+72>>2]|0;if(d|0){if(a[b+76>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+72>>2]=0}a[b+76>>0]=1;c[b+72>>2]=0;c[b+64>>2]=0;c[b+68>>2]=0;d=c[b+52>>2]|0;if(d|0){if(a[b+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+52>>2]=0}a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;d=c[b+12>>2]|0;if(!d){a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;b=b+8|0;c[b>>2]=0;return}if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+12>>2]=0;a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;b=b+8|0;c[b>>2]=0;return}function xi(a,b,d){a=a|0;b=+b;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0;e=ea;ea=ea+96|0;i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);c[e+32>>2]=1065353216;c[e+32+4>>2]=0;c[e+32+4+4>>2]=0;c[e+32+4+8>>2]=0;c[e+32+4+12>>2]=0;c[e+32+20>>2]=1065353216;c[e+32+24>>2]=0;c[e+32+24+4>>2]=0;c[e+32+24+8>>2]=0;c[e+32+24+12>>2]=0;c[e+32+40>>2]=1065353216;j=e+32+44|0;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]=0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,e+32|0,e+16|0,e);h=(i+(+f[e>>2]-+f[e+16>>2])*.5)*2.0;g=(i+(+f[e+4>>2]-+f[e+16+4>>2])*.5)*2.0;i=(i+(+f[e+8>>2]-+f[e+16+8>>2])*.5)*2.0;f[d>>2]=b*.0833333283662796*(g*g+i*i);f[d+4>>2]=b*.0833333283662796*(h*h+i*i);f[d+8>>2]=b*.0833333283662796*(h*h+g*g);f[d+12>>2]=0.0;ea=e;return}function yi(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0;i=ea;ea=ea+64|0;g=c[d>>2]|0;h=d+(c[g+-8>>2]|0)|0;g=c[g+-4>>2]|0;c[i>>2]=e;c[i+4>>2]=d;c[i+8>>2]=3472;d=i+12|0;f=d+40|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(f|0));b[i+12+40>>1]=0;a[i+12+42>>0]=0;a:do if(rt(g,e,0)|0){c[i+48>>2]=1;Va[c[(c[g>>2]|0)+20>>2]&7](g,i,h,h,1,0);d=(c[i+24>>2]|0)==1?h:0}else{Ta[c[(c[g>>2]|0)+24>>2]&31](g,i,h,1,0);switch(c[i+36>>2]|0){case 0:{d=((c[i+40>>2]|0)==1?(c[i+28>>2]|0)==1:0)&(c[i+32>>2]|0)==1?c[i+20>>2]|0:0;break a}case 1:break;default:{d=0;break a}}if((c[i+24>>2]|0)!=1?!(((c[i+40>>2]|0)==0?(c[i+28>>2]|0)==1:0)&(c[i+32>>2]|0)==1):0){d=0;break}d=c[i+16>>2]|0}while(0);ea=i;return d|0}function zi(a,b){a=a|0;b=+b;var d=0,e=0,g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0;e=c[a+732>>2]|0;if((e|0)<=0)return;a=c[a+740>>2]|0;d=0;do{n=c[a+(d*52|0)+8>>2]|0;g=c[a+(d*52|0)+12>>2]|0;s=+f[n+40>>2];q=+f[n+44>>2];o=+f[n+48>>2];k=a+(d*52|0)+36|0;r=+f[k>>2];m=a+(d*52|0)+40|0;p=+f[m>>2];l=a+(d*52|0)+44|0;h=+f[l>>2];j=-(+f[a+(d*52|0)+32>>2]*((s-+f[g+40>>2])*r+(q-+f[g+44>>2])*p+(o-+f[g+48>>2])*h)*b);i=+f[n+88>>2]*j;f[n+40>>2]=s+r*i;f[n+44>>2]=q+p*i;f[n+48>>2]=o+h*i;j=+f[g+88>>2]*j;i=j*+f[m>>2];h=j*+f[l>>2];f[g+40>>2]=+f[g+40>>2]-+f[k>>2]*j;f[g+44>>2]=+f[g+44>>2]-i;f[g+48>>2]=+f[g+48>>2]-h;d=d+1|0}while((d|0)!=(e|0));return}function Ai(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=c[b+328>>2]|0;if((g|0)==(c[b+332>>2]|0)?(j=(g|0)==0?1:g<<1,(g|0)<(j|0)):0){if(!j)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((j<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+328>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[b+336>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[b+336>>2]|0;if(i){if(a[b+340>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[b+328>>2]|0}c[b+336>>2]=0}a[b+340>>0]=1;c[b+336>>2]=h;c[b+332>>2]=j}c[(c[b+336>>2]|0)+(g<<2)>>2]=d;c[b+328>>2]=g+1;c[d+284>>2]=c[b+452>>2];Tf(b,d,e,f);return}function Bi(b){b=b|0;var d=0,e=0,g=0,h=0.0;e=ea;ea=ea+96|0;a[b+88>>0]=1;if((a[24976]|0)==0?DC(24976)|0:0){c[5900]=1065353216;c[5901]=0;c[5902]=0;c[5903]=0;c[5904]=0;c[5905]=1065353216;c[5906]=0;c[5907]=0;c[5908]=0;c[5909]=0;c[5910]=1065353216;f[5911]=0.0;c[5912]=-1082130432;c[5913]=0;c[5914]=0;c[5915]=0;c[5916]=0;c[5917]=-1082130432;c[5918]=0;c[5919]=0;c[5920]=0;c[5921]=0;c[5922]=-1082130432;f[5923]=0.0;PB(24976)}d=e;g=d+96|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(g|0));Pa[c[(c[b>>2]|0)+76>>2]&127](b,23600,e,6);h=+f[b+44>>2];f[b+72>>2]=+f[e>>2]+h;f[b+56>>2]=+f[e+48>>2]-h;f[b+76>>2]=+f[e+20>>2]+h;f[b+60>>2]=+f[e+68>>2]-h;f[b+80>>2]=+f[e+40>>2]+h;f[b+64>>2]=+f[e+88>>2]-h;ea=e;return}function Ci(b){b=b|0;var d=0,e=0,g=0,h=0.0;e=ea;ea=ea+96|0;a[b+84>>0]=1;if((a[24984]|0)==0?DC(24984)|0:0){c[5924]=1065353216;c[5925]=0;c[5926]=0;c[5927]=0;c[5928]=0;c[5929]=1065353216;c[5930]=0;c[5931]=0;c[5932]=0;c[5933]=0;c[5934]=1065353216;f[5935]=0.0;c[5936]=-1082130432;c[5937]=0;c[5938]=0;c[5939]=0;c[5940]=0;c[5941]=-1082130432;c[5942]=0;c[5943]=0;c[5944]=0;c[5945]=0;c[5946]=-1082130432;f[5947]=0.0;PB(24984)}d=e;g=d+96|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(g|0));Pa[c[(c[b>>2]|0)+76>>2]&127](b,23696,e,6);h=+f[b+44>>2];f[b+68>>2]=+f[e>>2]+h;f[b+52>>2]=+f[e+48>>2]-h;f[b+72>>2]=+f[e+20>>2]+h;f[b+56>>2]=+f[e+68>>2]-h;f[b+76>>2]=+f[e+40>>2]+h;f[b+60>>2]=+f[e+88>>2]-h;ea=e;return}function Di(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;i=+f[a+24>>2];j=+f[a+28>>2];k=+f[a+32>>2];h=i*+f[b>>2]+j*+f[b+4>>2]+k*+f[b+8>>2];g=+f[a+20>>2];if(h>g){f[a+20>>2]=h;c[a+4>>2]=c[b>>2];c[a+4+4>>2]=c[b+4>>2];c[a+4+8>>2]=c[b+8>>2];c[a+4+12>>2]=c[b+12>>2];g=h}h=i*+f[b+16>>2]+j*+f[b+20>>2]+k*+f[b+24>>2];if(h>g){f[a+20>>2]=h;c[a+4>>2]=c[b+16>>2];c[a+4+4>>2]=c[b+16+4>>2];c[a+4+8>>2]=c[b+16+8>>2];c[a+4+12>>2]=c[b+16+12>>2]}else h=g;g=i*+f[b+32>>2]+j*+f[b+36>>2]+k*+f[b+40>>2];if(!(g>h))return;f[a+20>>2]=g;c[a+4>>2]=c[b+32>>2];c[a+4+4>>2]=c[b+32+4>>2];c[a+4+8>>2]=c[b+32+8>>2];c[a+4+12>>2]=c[b+32+12>>2];return}function Ei(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[b+76>>2]|0;if(!e)return;f=c[d+4>>2]|0;if((f|0)==(c[d+8>>2]|0)?(h=(f|0)==0?1:f<<1,(f|0)<(h|0)):0){if(!h){e=f;f=0}else{c[6747]=(c[6747]|0)+1;e=kb((h<<2|3)+16|0)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[d+4>>2]|0}if((e|0)>0){g=0;do{c[f+(g<<2)>>2]=c[(c[d+12>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0))}g=c[d+12>>2]|0;if(g){if(a[d+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[d+4>>2]|0}c[d+12>>2]=0}a[d+16>>0]=1;c[d+12>>2]=f;c[d+8>>2]=h;f=e;e=c[b+76>>2]|0}c[(c[d+12>>2]|0)+(f<<2)>>2]=e;c[d+4>>2]=f+1;return}function Fi(a){a=a|0;var b=0,d=0,e=0,f=0;f=ea;ea=ea+16|0;b=c[2685]|0;if((c[b>>2]|0)!=(a|0)){d=c[b+24>>2]|0;a:do if(!d)e=6;else while(1){if((c[d>>2]|0)==(a|0)){b=d;break a}d=c[d+28>>2]|0;if(!d){e=6;break}}while(0);if((e|0)==6){e=GI(36)|0;c[e>>2]=a;c[e+4>>2]=0;c[e+4+4>>2]=0;c[e+4+8>>2]=0;c[e+4+12>>2]=0;c[e+20>>2]=b;c[e+24>>2]=0;c[e+28>>2]=0;c[e+32>>2]=0;mr(e);c[e+28>>2]=c[b+24>>2];c[b+24>>2]=e;b=e}c[2685]=b}a=b+4|0;c[a>>2]=(c[a>>2]|0)+1;a=b+16|0;e=c[a>>2]|0;c[a>>2]=e+1;if(e|0){ea=f;return}Y(f|0,0)|0;e=c[6746]|0;c[b+12>>2]=(c[f+4>>2]|0)-(c[e+4>>2]|0)+(((c[f>>2]|0)-(c[e>>2]|0)|0)*1e6|0);ea=f;return}function Gi(b){b=b|0;var d=0;d=Ls()|0;c[d+8>>2]=0;c[d>>2]=7404;a[d+28>>0]=1;c[d+24>>2]=0;c[d+16>>2]=0;c[d+20>>2]=0;c[d+32>>2]=1566444395;c[d+36>>2]=1566444395;c[d+40>>2]=1566444395;f[d+44>>2]=0.0;c[d+48>>2]=-581039253;c[d+52>>2]=-581039253;c[d+56>>2]=-581039253;f[d+60>>2]=0.0;c[d+64>>2]=0;c[d+68>>2]=1;f[d+72>>2]=0.0;c[d+76>>2]=1065353216;c[d+80>>2]=1065353216;c[d+84>>2]=1065353216;f[d+88>>2]=0.0;c[d+4>>2]=31;if(!b)return d|0;c[6747]=(c[6747]|0)+1;b=kb(79)|0;if(!b)b=0;else{c[(b+4+15&-16)+-4>>2]=b;b=b+4+15&-16}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=-1;c[b+12>>2]=0;c[b+16>>2]=0;c[d+64>>2]=b;return d|0}function Hi(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,s=0.0,t=0.0,u=0.0,v=0.0;h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);l=h+ +f[a+28>>2];j=h+ +f[a+32>>2];h=h+ +f[a+36>>2];v=+r(+(+f[b>>2]));u=+r(+(+f[b+4>>2]));t=+r(+(+f[b+8>>2]));q=+r(+(+f[b+16>>2]));p=+r(+(+f[b+20>>2]));o=+r(+(+f[b+24>>2]));k=+r(+(+f[b+32>>2]));i=+r(+(+f[b+36>>2]));g=+r(+(+f[b+40>>2]));s=+f[b+48>>2];n=+f[b+52>>2];m=+f[b+56>>2];f[d>>2]=s-(l*v+j*u+h*t);f[d+4>>2]=n-(l*q+j*p+h*o);f[d+8>>2]=m-(l*k+j*i+h*g);f[d+12>>2]=0.0;f[e>>2]=l*v+j*u+h*t+s;f[e+4>>2]=l*q+j*p+h*o+n;f[e+8>>2]=m+(l*k+j*i+h*g);f[e+12>>2]=0.0;return}function Ii(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;i=+f[a+88>>2];j=+f[a+92>>2];k=+f[a+96>>2];h=i*+f[b>>2]+j*+f[b+4>>2]+k*+f[b+8>>2];g=+f[a+84>>2];if(h>g){f[a+84>>2]=h;c[a+4>>2]=c[b>>2];c[a+4+4>>2]=c[b+4>>2];c[a+4+8>>2]=c[b+8>>2];c[a+4+12>>2]=c[b+12>>2];g=h}h=i*+f[b+16>>2]+j*+f[b+20>>2]+k*+f[b+24>>2];if(h>g){f[a+84>>2]=h;c[a+4>>2]=c[b+16>>2];c[a+4+4>>2]=c[b+16+4>>2];c[a+4+8>>2]=c[b+16+8>>2];c[a+4+12>>2]=c[b+16+12>>2]}else h=g;g=i*+f[b+32>>2]+j*+f[b+36>>2]+k*+f[b+40>>2];if(!(g>h))return;f[a+84>>2]=g;c[a+4>>2]=c[b+32>>2];c[a+4+4>>2]=c[b+32+4>>2];c[a+4+8>>2]=c[b+32+8>>2];c[a+4+12>>2]=c[b+32+12>>2];return}function Ji(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;while(1){l=c[a+12>>2]|0;k=c[l+(((b+d|0)/2|0)<<3)>>2]|0;e=b;f=d;while(1){while(1){h=l+(e<<3)|0;i=e+1|0;if((c[h>>2]|0)<(k|0))e=i;else break}j=f;while(1){g=l+(j<<3)|0;f=j+-1|0;if((c[g>>2]|0)>(k|0))j=f;else break}if((e|0)>(j|0))f=j;else{m=c[h>>2]|0;l=c[h+4>>2]|0;e=c[g+4>>2]|0;c[h>>2]=c[g>>2];c[h+4>>2]=e;e=(c[a+12>>2]|0)+(j<<3)|0;c[e>>2]=m;c[e+4>>2]=l;e=i}if((e|0)>(f|0))break;l=c[a+12>>2]|0}if((f|0)>(b|0))Ji(a,b,f);if((e|0)<(d|0))b=e;else break}return}function Ki(b){b=b|0;var d=0;c[b>>2]=9896;if(c[b+108>>2]|0){d=c[b+112>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+112>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+108>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+108>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}}d=c[b+88>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+84>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+80>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+60>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}if(!(a[b+100>>0]|0))return;d=c[b+92>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+92>>2]|0;if(!d)return;c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);return}function Li(a,b,d){a=a|0;b=+b;d=+d;var e=0,g=0,h=0.0,i=0.0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;g=c[a+732>>2]|0;if((g|0)<=0)return;a=c[a+740>>2]|0;e=0;do{d=+f[a+(e*52|0)+24>>2];if(d>0.0?(j=c[a+(e*52|0)+8>>2]|0,k=c[a+(e*52|0)+12>>2]|0,l=+f[j+8>>2],n=+f[k+8>>2]-l,m=+f[j+12>>2],p=+f[k+12>>2]-m,h=+f[j+16>>2],o=+f[k+16>>2]-h,i=+f[a+(e*52|0)+28>>2],i+(n*n+p*p+o*o)>1.1920928955078125e-07):0){d=(i-(n*n+p*p+o*o))/(d*(i+(n*n+p*p+o*o)))*b;q=d*+f[j+88>>2];f[j+8>>2]=l-n*q;f[j+12>>2]=m-p*q;f[j+16>>2]=h-o*q;d=d*+f[k+88>>2];f[k+8>>2]=+f[k+8>>2]+n*d;f[k+12>>2]=p*d+ +f[k+12>>2];f[k+16>>2]=o*d+ +f[k+16>>2]}e=e+1|0}while((e|0)!=(g|0));return}function Mi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0;e=ea;ea=ea+96|0;c[e+32>>2]=1065353216;c[e+32+4>>2]=0;c[e+32+4+4>>2]=0;c[e+32+4+8>>2]=0;c[e+32+4+12>>2]=0;c[e+32+20>>2]=1065353216;c[e+32+24>>2]=0;c[e+32+24+4>>2]=0;c[e+32+24+8>>2]=0;c[e+32+24+12>>2]=0;c[e+32+40>>2]=1065353216;m=e+32+44|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,e+32|0,e+16|0,e);l=+f[e>>2];k=+f[e+16>>2];j=+f[e+4>>2];i=+f[e+16+4>>2];h=+f[e+8>>2];g=+f[e+16+8>>2];f[d>>2]=+s(+((l-k)*(l-k)+(j-i)*(j-i)+(h-g)*(h-g)))*.5;f[b>>2]=(l+k)*.5;f[b+4>>2]=(j+i)*.5;f[b+8>>2]=(h+g)*.5;f[b+12>>2]=0.0;ea=e;return}function Ni(){var b=0,d=0;d=Ls()|0;c[d+8>>2]=0;c[d>>2]=7404;a[d+28>>0]=1;c[d+24>>2]=0;c[d+16>>2]=0;c[d+20>>2]=0;c[d+32>>2]=1566444395;c[d+36>>2]=1566444395;c[d+40>>2]=1566444395;f[d+44>>2]=0.0;c[d+48>>2]=-581039253;c[d+52>>2]=-581039253;c[d+56>>2]=-581039253;f[d+60>>2]=0.0;c[d+64>>2]=0;c[d+68>>2]=1;f[d+72>>2]=0.0;c[d+76>>2]=1065353216;c[d+80>>2]=1065353216;c[d+84>>2]=1065353216;f[d+88>>2]=0.0;c[d+4>>2]=31;c[6747]=(c[6747]|0)+1;b=kb(79)|0;if(!b)b=0;else{c[(b+4+15&-16)+-4>>2]=b;b=b+4+15&-16}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;a[b+56>>0]=1;c[b+52>>2]=0;c[b+44>>2]=0;c[b+48>>2]=0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=-1;c[b+12>>2]=0;c[b+16>>2]=0;c[d+64>>2]=b;return d|0}function Oi(a,d,g,h){a=a|0;d=d|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0;i=c[a+108>>2]|0;if(i|0){Pa[c[(c[i>>2]|0)+28>>2]&127](i,d,g,h);return}i=b[a+56>>1]|0;if(!(i<<16>>16))return;k=1;m=1;do{j=c[a+68>>2]|0;if(b[j+(k<<2)>>1]&1){l=c[a+60>>2]|0;k=e[j+(k<<2)+2>>1]|0;if(!(+f[d>>2]>+f[l+(k<<6)+32>>2])?!(+f[g>>2]<+f[l+(k<<6)+16>>2]):0)j=1;else j=0;if(!(!(+f[d+8>>2]>+f[l+(k<<6)+40>>2])?!(+f[g+8>>2]<+f[l+(k<<6)+24>>2]):0))j=0;if(!(+f[d+4>>2]>+f[l+(k<<6)+36>>2])?!(+f[g+4>>2]<+f[l+(k<<6)+20>>2]|j^1):0){ta[c[(c[h>>2]|0)+8>>2]&31](h,l+(k<<6)|0)|0;i=b[a+56>>1]|0}}m=m+1<<16>>16;k=m&65535}while(((i&65535)<<1|1)>>>0>k>>>0);return}function Pi(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0;g=+f[b>>2];h=+f[b+16>>2];j=g>2];if((j+f[a+24>>2])return;k=g>h?b:b+16|0;if(+f[(+f[k>>2]>i?k:b+32|0)>>2]<+f[a+8>>2])return;i=+f[b+8>>2];g=+f[b+24>>2];j=i>2];if((j+f[a+32>>2])return;k=i>g?b+8|0:b+24|0;if(+f[(+f[k>>2]>h?k:b+40|0)>>2]<+f[a+16>>2])return;g=+f[b+4>>2];h=+f[b+20>>2];j=g>2];if((j+f[a+28>>2])return;k=g>h?b+4|0:b+20|0;if(+f[(+f[k>>2]>i?k:b+36|0)>>2]<+f[a+12>>2])return;k=c[a+4>>2]|0;Pa[c[(c[k>>2]|0)+8>>2]&127](k,b,d,e);return}function Qi(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;var h=0,i=0.0,j=0.0,k=0.0;h=ea;ea=ea+16|0;f[b+32>>2]=g;c[b+8>>2]=c[d>>2];c[b+8+4>>2]=c[d+4>>2];c[b+8+8>>2]=c[d+8>>2];c[b+8+12>>2]=c[d+12>>2];i=+f[b+28>>2];k=+f[e+4>>2]-i*+f[d+4>>2];j=+f[e+8>>2]-i*+f[d+8>>2];f[h>>2]=+f[e>>2]-+f[d>>2]*i;f[h+4>>2]=k;f[h+8>>2]=j;f[h+12>>2]=0.0;g=i+ +f[b+24>>2]+g;f[b+32>>2]=g;if(!(g<0.0)){b=b+4|0;b=c[b>>2]|0;e=c[b>>2]|0;e=e+16|0;e=c[e>>2]|0;Na[e&15](b,d,h,g);ea=h;return}a[b+36>>0]=1;b=b+4|0;b=c[b>>2]|0;e=c[b>>2]|0;e=e+16|0;e=c[e>>2]|0;Na[e&15](b,d,h,g);ea=h;return}function Ri(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0,h=0.0;g=ea;ea=ea+16|0;c[a+4>>2]=c[b+24>>2];e=c[b>>2]|0;c[a+8>>2]=e;if(d){c[a+52>>2]=c[b+8>>2];c[a+52+4>>2]=c[b+8+4>>2];c[a+52+8>>2]=c[b+8+8>>2];c[a+52+12>>2]=c[b+8+12>>2];e=a+68|0;d=a+20|0;a=a+36|0;h=+f[b+24>>2];up(e,d,a,h);h=+f[b+24>>2];ea=g;return +h}else{e=NJ(sJ(e)|0)|0;ql(g,e,+f[b+8>>2],+f[b+12>>2],+f[b+16>>2]);c[a+52>>2]=c[g>>2];c[a+52+4>>2]=c[g+4>>2];c[a+52+8>>2]=c[g+8>>2];c[a+52+12>>2]=c[g+12>>2];e=a+68|0;d=a+20|0;a=a+36|0;h=+f[b+24>>2];up(e,d,a,h);h=+f[b+24>>2];ea=g;return +h}return 0.0}function Si(b,d){b=b|0;d=d|0;var e=0,f=0;a:do if((d|0)!=0&(b&3|0)!=0)while(1){if(!(a[b>>0]|0))break a;b=b+1|0;d=d+-1|0;if(!((d|0)!=0&(b&3|0)!=0)){e=d;d=(d|0)!=0;f=5;break}}else{e=d;d=(d|0)!=0;f=5}while(0);b:do if((f|0)==5){do if(d){if(!(a[b>>0]|0))if(!e)break;else break b;c:do if(e>>>0>3)while(1){d=c[b>>2]|0;if((d&-2139062144^-2139062144)&d+-16843009|0)break c;b=b+4|0;e=e+-4|0;if(e>>>0<=3){f=11;break}}else f=11;while(0);if((f|0)==11)if(!e)break;while(1){if(!(a[b>>0]|0))break b;e=e+-1|0;if(!e)break;else b=b+1|0}}while(0);b=0}while(0);return b|0}function Ti(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;c[b>>2]=7340;d=c[b+8>>2]|0;e=c[d+8>>2]|0;if((e|0)>0){g=0;do{f=c[(c[d+16>>2]|0)+(g*12|0)+8>>2]|0;if(f|0){Ca[c[c[f>>2]>>2]&511](f);h=c[b+4>>2]|0;Ia[c[(c[h>>2]|0)+60>>2]&127](h,f)}g=g+1|0}while((g|0)!=(e|0));d=c[b+8>>2]|0}$g(d);d=c[b+8>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+8>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+24>>2]|0;if(!d){a[b+28>>0]=1;c[b+24>>2]=0;c[b+16>>2]=0;h=b+20|0;c[h>>2]=0;return}if(a[b+28>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+24>>2]=0;a[b+28>>0]=1;c[b+24>>2]=0;c[b+16>>2]=0;h=b+20|0;c[h>>2]=0;return}function Ui(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;h=ea;ea=ea+224|0;f=h+160|0;g=f+40|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(g|0));c[h+208>>2]=c[e>>2];if((Sb(0,d,h+208|0,h+80|0,h+160|0)|0)<0)e=-1;else{g=c[b>>2]|0;if((a[b+74>>0]|0)<1)c[b>>2]=g&-33;if(!(c[b+48>>2]|0)){f=c[b+44>>2]|0;c[b+44>>2]=h;c[b+28>>2]=h;c[b+20>>2]=h;c[b+48>>2]=80;c[b+16>>2]=h+80;e=Sb(b,d,h+208|0,h+80|0,h+160|0)|0;if(f){va[c[b+36>>2]&63](b,0,0)|0;e=(c[b+20>>2]|0)==0?-1:e;c[b+44>>2]=f;c[b+48>>2]=0;c[b+16>>2]=0;c[b+28>>2]=0;c[b+20>>2]=0}}else e=Sb(b,d,h+208|0,h+80|0,h+160|0)|0;d=c[b>>2]|0;c[b>>2]=d|g&32;e=(d&32|0)==0?e:-1}ea=h;return e|0}function Vi(b,d){b=b|0;d=d|0;c[b+204>>2]=c[d+48>>2];c[b+208>>2]=c[d+52>>2];c[b+212>>2]=c[d+56>>2];c[b+216>>2]=c[d+60>>2];c[b+220>>2]=c[d+64>>2];c[b+224>>2]=c[d+68>>2];c[b+156>>2]=c[d>>2];c[b+156+4>>2]=c[d+4>>2];c[b+156+8>>2]=c[d+8>>2];c[b+156+12>>2]=c[d+12>>2];c[b+172>>2]=c[d+16>>2];c[b+172+4>>2]=c[d+16+4>>2];c[b+172+8>>2]=c[d+16+8>>2];c[b+172+12>>2]=c[d+16+12>>2];c[b+188>>2]=c[d+32>>2];c[b+188+4>>2]=c[d+32+4>>2];c[b+188+8>>2]=c[d+32+8>>2];c[b+188+12>>2]=c[d+32+12>>2];c[b+228>>2]=c[d+72>>2];f[b+232>>2]=0.0;f[b+252>>2]=0.0;f[b+236>>2]=0.0;f[b+240>>2]=0.0;f[b+256>>2]=0.0;f[b+244>>2]=.10000000149011612;a[b+260>>0]=a[d+80>>0]&1;c[b+248>>2]=c[d+76>>2];return}function Wi(a){a=a|0;var b=0;c[a>>2]=4132;b=c[a+92>>2]|0;Ca[c[c[b>>2]>>2]&511](b);b=c[a+92>>2]|0;if(b|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}b=c[a+96>>2]|0;Ca[c[c[b>>2]>>2]&511](b);b=c[a+96>>2]|0;if(b|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}b=c[a+100>>2]|0;Ca[c[c[b>>2]>>2]&511](b);b=c[a+100>>2]|0;if(b|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}b=c[a+104>>2]|0;Ca[c[c[b>>2]>>2]&511](b);b=c[a+104>>2]|0;if(b|0){c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0)}b=c[a+108>>2]|0;Ca[c[c[b>>2]>>2]&511](b);b=c[a+108>>2]|0;if(!b){ge(a);return}c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);ge(a);return}function Xi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;if((c[d+60>>2]|0)==2){f=c[d+48>>2]|0;jg(b+64|0,f)|0;g=c[b+68>>2]|0;if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+68>>2]=f;c[b+76>>2]=(c[b+76>>2]|0)+-1}else{f=c[d+48>>2]|0;jg(b+4|0,f)|0;g=c[b+8>>2]|0;if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[b+8>>2]=f;c[b+16>>2]=(c[b+16>>2]|0)+-1}f=c[d+52>>2]|0;if(!f)f=b+124+(c[d+60>>2]<<2)|0;else f=f+56|0;c[f>>2]=c[d+56>>2];f=c[d+56>>2]|0;if(f|0)c[f+52>>2]=c[d+52>>2];g=c[b+136>>2]|0;Ma[c[(c[g>>2]|0)+16>>2]&127](g,d,e);c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);a[b+194>>0]=1;return}function Yi(a){a=a|0;var b=0.0,c=0.0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;n=+f[a+4>>2];h=+f[a+396>>2];m=+f[a+8>>2];e=+f[a+400>>2];l=+f[a+12>>2];c=+f[a+404>>2];k=+f[a+20>>2];j=+f[a+24>>2];i=+f[a+28>>2];g=+f[a+36>>2];d=+f[a+40>>2];b=+f[a+44>>2];f[a+264>>2]=n*h*n+m*e*m+l*c*l;f[a+268>>2]=n*h*k+m*e*j+l*c*i;f[a+272>>2]=n*h*g+m*e*d+l*c*b;f[a+276>>2]=0.0;f[a+280>>2]=h*k*n+e*j*m+c*i*l;f[a+284>>2]=h*k*k+e*j*j+c*i*i;f[a+288>>2]=h*k*g+e*j*d+c*i*b;f[a+292>>2]=0.0;f[a+296>>2]=h*g*n+e*d*m+c*b*l;f[a+300>>2]=h*g*k+e*d*j+c*b*i;f[a+304>>2]=h*g*g+e*d*d+c*b*b;f[a+308>>2]=0.0;return}function Zi(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;c[b>>2]=6744;e=c[b+8>>2]|0;d=c[b+16>>2]|0;if((e|0)>0){h=0;do{g=(c[d+(h<<2)>>2]|0)+188|0;f=c[g>>2]|0;if(f){e=c[b+68>>2]|0;e=ra[c[(c[e>>2]|0)+36>>2]&127](e)|0;Ma[c[(c[e>>2]|0)+40>>2]&127](e,f,c[b+24>>2]|0);e=c[b+68>>2]|0;Ma[c[(c[e>>2]|0)+12>>2]&127](e,f,c[b+24>>2]|0);c[g>>2]=0;e=c[b+8>>2]|0;d=c[b+16>>2]|0}h=h+1|0}while((h|0)<(e|0))}if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function _i(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0,i=0.0,j=0,k=0,l=0.0,m=0.0;j=c[b+52>>2]|0;k=c[j+32>>2]|0;b=c[k>>2]|0;l=+f[d>>2];m=+f[d+4>>2];i=+f[d+8>>2];j=c[j+24>>2]|0;if((j|0)<=1){k=b;k=k+8|0;c[a>>2]=c[k>>2];c[a+4>>2]=c[k+4>>2];c[a+8>>2]=c[k+8>>2];c[a+12>>2]=c[k+12>>2];return}g=l*+f[b+8>>2]+m*+f[b+12>>2]+i*+f[b+16>>2];d=1;h=0;while(1){b=c[k+(d<<2)>>2]|0;e=l*+f[b+8>>2]+m*+f[b+12>>2]+i*+f[b+16>>2];b=e>g;h=b?d:h;d=d+1|0;if((d|0)==(j|0))break;else g=b?e:g}k=c[k+(h<<2)>>2]|0;k=k+8|0;c[a>>2]=c[k>>2];c[a+4>>2]=c[k+4>>2];c[a+8>>2]=c[k+8>>2];c[a+12>>2]=c[k+12>>2];return}function $i(a,b){a=a|0;b=b|0;var d=0,e=0.0,g=0,h=0,i=0.0,j=0.0;c[a+248>>2]=c[b>>2];c[a+248+4>>2]=c[b+4>>2];c[a+248+8>>2]=c[b+8>>2];c[a+248+12>>2]=c[b+12>>2];d=c[a+232>>2]|0;if((d|0)<=0)return;h=0;do{g=c[(c[a+240>>2]|0)+(h<<2)>>2]|0;switch(c[g+216>>2]|0){case 2:case 5:break;default:if(!(c[g+504>>2]&1)){e=+f[g+344>>2];if(e!=0.0){j=1.0/e*+f[b+4>>2];i=1.0/e*+f[b+8>>2];f[g+364>>2]=1.0/e*+f[b>>2];f[g+368>>2]=j;f[g+372>>2]=i;f[g+376>>2]=0.0}c[g+380>>2]=c[b>>2];c[g+380+4>>2]=c[b+4>>2];c[g+380+8>>2]=c[b+8>>2];c[g+380+12>>2]=c[b+12>>2];d=c[a+232>>2]|0}}h=h+1|0}while((h|0)<(d|0));return}function aj(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,h=0;if(a[b+738>>0]|0){c[d>>2]=0;c[d+4>>2]=0;return}c[d>>2]=5;c[d+4>>2]=1;e=+pi(b,(c[b+28>>2]|0)+4|0,(c[b+32>>2]|0)+4|0);f[b+728>>2]=e;f[b+708>>2]=0.0;f[b+712>>2]=0.0;a[b+716>>0]=0;g=+f[b+692>>2];do if(g>=0.0){e=(e-+f[b+688>>2])%6.2831854820251465;if(!(e<-3.1415927410125732)){if(e>3.1415927410125732)e=e+-6.2831854820251465}else e=e+6.2831854820251465;if(e<-g){a[b+716>>0]=1;f[b+708>>2]=-(g+e);f[b+712>>2]=1.0;break}if(e>g){a[b+716>>0]=1;f[b+708>>2]=g-e;f[b+712>>2]=-1.0}else h=12}else h=12;while(0);if((h|0)==12?(a[b+737>>0]|0)==0:0)return;c[d>>2]=6;c[d+4>>2]=0;return}function bj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=ea;ea=ea+96|0;g=c[b+192>>2]|0;c[f+64>>2]=0;c[f+64+4>>2]=g;c[f+64+8>>2]=b;c[f+64+12>>2]=b+4;c[f+64+16>>2]=-1;c[f+64+20>>2]=-1;b=c[d+192>>2]|0;c[f+40>>2]=0;c[f+40+4>>2]=b;c[f+40+8>>2]=d;c[f+40+12>>2]=d+4;c[f+40+16>>2]=-1;c[f+40+20>>2]=-1;b=c[a+24>>2]|0;b=wa[c[(c[b>>2]|0)+8>>2]&31](b,f+64|0,f+40|0,0)|0;if(!b){ea=f;return}c[f+4>>2]=0;c[f+8>>2]=f+64;c[f+12>>2]=f+40;c[f>>2]=7088;c[f+32>>2]=e;Ta[c[(c[b>>2]|0)+8>>2]&31](b,f+64|0,f+40|0,a+28|0,f);Ca[c[c[b>>2]>>2]&511](b);g=c[a+24>>2]|0;Ia[c[(c[g>>2]|0)+60>>2]&127](g,b);ea=f;return}function cj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=c[b+8>>2]|0;if((k|0)<=0)return;i=c[b+16>>2]|0;j=0;b=0;do{g=c[i+(j<<2)>>2]|0;if(!(c[g+204>>2]&3)){h=c[a+16>>2]|0;e=h+(b<<3)|0;d=c[e>>2]|0;if((d|0)!=(b|0)){c[e>>2]=c[h+(d<<3)>>2];d=c[h+(d<<3)>>2]|0;e=c[h+(d<<3)>>2]|0;if((d|0)!=(e|0)){f=h+(d<<3)|0;do{d=h+(e<<3)|0;c[f>>2]=c[d>>2];d=c[d>>2]|0;f=h+(d<<3)|0;e=c[f>>2]|0}while((d|0)!=(e|0))}}else d=b;c[g+208>>2]=d;c[h+(b<<3)+4>>2]=j;c[g+212>>2]=-1;b=b+1|0}else{c[g+208>>2]=-1;c[g+212>>2]=-2}j=j+1|0}while((j|0)!=(k|0));return}function dj(a,b,d){a=a|0;b=+b;d=d|0;var e=0,g=0,i=0.0,j=0.0,k=0.0;e=c[a+204>>2]|0;if(b==0.0){c[a+204>>2]=e|1;i=0.0}else{c[a+204>>2]=e&-2;i=1.0/b}f[a+344>>2]=i;k=+f[a+384>>2]*b;j=+f[a+388>>2]*b;f[a+364>>2]=+f[a+380>>2]*b;f[a+368>>2]=k;f[a+372>>2]=j;f[a+376>>2]=0.0;b=+f[d>>2];g=b!=0.0?(f[h>>2]=1.0/b,c[h>>2]|0):0;b=+f[d+4>>2];e=b!=0.0?(f[h>>2]=1.0/b,c[h>>2]|0):0;b=+f[d+8>>2];d=b!=0.0?(f[h>>2]=1.0/b,c[h>>2]|0):0;c[a+396>>2]=g;c[a+400>>2]=e;c[a+404>>2]=d;f[a+408>>2]=0.0;j=i*+f[a+352>>2];k=i*+f[a+356>>2];f[a+560>>2]=+f[a+348>>2]*i;f[a+564>>2]=j;f[a+568>>2]=k;f[a+572>>2]=0.0;return}function ej(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0,i=0.0,j=0,k=0,l=0.0;l=+f[b+60>>2]*.5;h=c[b+68>>2]|0;e=+f[d>>2];g=+f[d+4>>2];i=+f[d+8>>2];i=+s(+(e*e+g*g+i*i));k=c[b+64>>2]|0;if(+f[d+(h<<2)>>2]>+f[b+52>>2]*i){f[a+(k<<2)>>2]=0.0;f[a+(h<<2)>>2]=l;l=0.0;b=c[b+72>>2]|0;b=a+(b<<2)|0;f[b>>2]=l;return}i=+f[d+(k<<2)>>2];j=c[b+72>>2]|0;e=+f[d+(j<<2)>>2];g=+s(+(i*i+e*e));if(g>1.1920928955078125e-07){g=+f[b+56>>2]/g;f[a+(k<<2)>>2]=i*g;f[a+(h<<2)>>2]=-l;l=e*g;b=j;b=a+(b<<2)|0;f[b>>2]=l;return}else{f[a+(k<<2)>>2]=0.0;f[a+(h<<2)>>2]=-l;l=0.0;b=j;b=a+(b<<2)|0;f[b>>2]=l;return}}function fj(a,b,d){a=a|0;b=+b;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0;e=ea;ea=ea+96|0;c[e+32>>2]=1065353216;c[e+32+4>>2]=0;c[e+32+4+4>>2]=0;c[e+32+4+8>>2]=0;c[e+32+4+12>>2]=0;c[e+32+20>>2]=1065353216;c[e+32+24>>2]=0;c[e+32+24+4>>2]=0;c[e+32+24+8>>2]=0;c[e+32+24+12>>2]=0;c[e+32+40>>2]=1065353216;j=e+32+44|0;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[j+16>>2]=0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,e+32|0,e+16|0,e);h=(+f[e>>2]-+f[e+16>>2])*.5*2.0;g=(+f[e+4>>2]-+f[e+16+4>>2])*.5*2.0;i=(+f[e+8>>2]-+f[e+16+8>>2])*.5*2.0;f[d>>2]=b/12.0*(g*g+i*i);f[d+4>>2]=b/12.0*(h*h+i*i);f[d+8>>2]=b/12.0*(h*h+g*g);ea=e;return}function gj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=c[b+280>>2]|0;if((e|0)==(c[b+284>>2]|0)?(h=(e|0)==0?1:e<<1,(e|0)<(h|0)):0){if(!h)f=0;else{c[6747]=(c[6747]|0)+1;e=kb((h<<2|3)+16|0)|0;if(!e)f=0;else{c[(e+4+15&-16)+-4>>2]=e;f=e+4+15&-16}e=c[b+280>>2]|0}if((e|0)>0){g=0;do{c[f+(g<<2)>>2]=c[(c[b+288>>2]|0)+(g<<2)>>2];g=g+1|0}while((g|0)!=(e|0))}g=c[b+288>>2]|0;if(g){if(a[b+292>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);e=c[b+280>>2]|0}c[b+288>>2]=0}a[b+292>>0]=1;c[b+288>>2]=f;c[b+284>>2]=h}c[(c[b+288>>2]|0)+(e<<2)>>2]=d;c[b+280>>2]=e+1;return}function hj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=ea;ea=ea+16|0;Ma[c[(c[b>>2]|0)+68>>2]&127](e,b,d);c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]=c[e+8>>2];c[a+12>>2]=c[e+12>>2];if(!(+ha[c[(c[b>>2]|0)+48>>2]&15](b)!=0.0)){ea=e;return}i=+f[d>>2];g=+f[d+4>>2];h=+f[d+8>>2];k=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:i;j=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:g;h=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:h;g=1.0/+s(+(h*h+(k*k+j*j)));i=+ha[c[(c[b>>2]|0)+48>>2]&15](b);f[a>>2]=+f[a>>2]+i*(k*g);f[a+4>>2]=+f[a+4>>2]+i*(j*g);f[a+8>>2]=+f[a+8>>2]+i*(h*g);ea=e;return}function ij(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,h=0.0,i=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;k=c[b+96>>2]|0;if((k|0)<=0){c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;return}l=+f[b+12>>2];o=+f[d>>2]*l;m=+f[b+16>>2];p=+f[d+4>>2]*m;n=+f[b+20>>2];j=+f[d+8>>2]*n;d=c[b+104>>2]|0;g=0;h=-3402823466385288598117041.0e14;i=-1;while(1){e=o*+f[d+(g<<4)>>2]+p*+f[d+(g<<4)+4>>2]+j*+f[d+(g<<4)+8>>2];b=e>h;i=b?g:i;g=g+1|0;if((g|0)==(k|0))break;else h=b?e:h}o=m*+f[d+(i<<4)+4>>2];p=n*+f[d+(i<<4)+8>>2];f[a>>2]=l*+f[d+(i<<4)>>2];f[a+4>>2]=o;f[a+8>>2]=p;f[a+12>>2]=0.0;return}function jj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0;a:do switch(b|0){case 2:{if((c|0)<1){d=+f[a+232>>2];break a}if((c|0)<3){d=+f[a+264>>2];break a}if((c|0)==3){d=+f[a+248>>2];break a}if((c|0)<6)d=+f[a+280>>2];else d=3402823466385288598117041.0e14;break}case 3:{if((c|0)<1){d=+f[a+212>>2];break a}if((c|0)==3)d=+f[a+228>>2];else d=3402823466385288598117041.0e14;break}case 4:{if((c|0)<1){d=+f[a+244>>2];break a}if((c|0)<3){d=+f[a+276>>2];break a}if((c|0)==3){d=+f[a+260>>2];break a}if((c|0)<6)d=+f[a+292>>2];else d=3402823466385288598117041.0e14;break}default:d=3402823466385288598117041.0e14}while(0);return +d}function kj(a,b,d){a=a|0;b=+b;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;k=+f[a+28>>2];g=+f[a+32>>2];i=+f[a+36>>2];j=+ha[c[(c[a>>2]|0)+48>>2]&15](a);e=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+ha[c[(c[a>>2]|0)+48>>2]&15](a)+i;switch(c[a+52>>2]|0){case 0:{k=b*.25*((e+g)*(e+g))+b/12.0*((j+k)*((j+k)*4.0));h=k;g=b*.5*((e+g)*(e+g));e=k;break}case 2:{h=b*.5*((j+k)*(j+k));g=b*.25*((j+k)*(j+k))+b/12.0*(i*(i*4.0));e=b*.25*((j+k)*(j+k))+b/12.0*(i*(i*4.0));break}default:{g=b*.25*((j+k)*(j+k))+b/12.0*((e+g)*((e+g)*4.0));h=g;e=b*.5*((j+k)*(j+k))}}f[d>>2]=g;f[d+4>>2]=e;f[d+8>>2]=h;f[d+12>>2]=0.0;return}function lj(){var b=0;b=as()|0;c[b>>2]=5872;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;c[b+72>>2]=0;a[b+100>>0]=1;c[b+96>>2]=0;c[b+88>>2]=0;c[b+92>>2]=0;a[b+120>>0]=1;c[b+116>>2]=0;c[b+108>>2]=0;c[b+112>>2]=0;a[b+140>>0]=1;c[b+136>>2]=0;c[b+128>>2]=0;c[b+132>>2]=0;a[b+160>>0]=1;c[b+156>>2]=0;c[b+148>>2]=0;c[b+152>>2]=0;a[b+180>>0]=1;c[b+176>>2]=0;c[b+168>>2]=0;c[b+172>>2]=0;c[b+192>>2]=0;return b|0}function mj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;c[6726]=(c[6726]|0)+1;f=(c[b+12>>2]|0)>(c[d+12>>2]|0);g=c[(f?d:b)+12>>2]|0;f=c[(f?b:d)+12>>2]|0;b=(f<<16|g)+~((f<<16|g)<<15)|0;b=((10?b>>10:b)^b)*9|0;b=(6?b>>6:b)^b;b=((16?b+~(b<<11)>>16:b+~(b<<11)|0)^b+~(b<<11))&(c[a+12>>2]|0)+-1;if((b|0)>=(c[a+36>>2]|0)){a=0;return a|0}b=c[(c[a+44>>2]|0)+(b<<2)>>2]|0;if((b|0)==-1){a=0;return a|0}e=c[a+16>>2]|0;d=b;while(1){b=e+(d<<4)|0;if((c[(c[b>>2]|0)+12>>2]|0)==(g|0)?(c[(c[e+(d<<4)+4>>2]|0)+12>>2]|0)==(f|0):0){d=7;break}d=c[(c[a+64>>2]|0)+(d<<2)>>2]|0;if((d|0)==-1){b=0;d=7;break}}if((d|0)==7)return b|0;return 0}function nj(b){b=b|0;var d=0;c[b>>2]=4936;if(a[b+456>>0]|0?(d=c[b+452>>2]|0,Ca[c[c[d>>2]>>2]&511](d),d=c[b+452>>2]|0,d|0):0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}d=c[b+420>>2]|0;if(d|0){if(a[b+424>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+420>>2]=0}a[b+424>>0]=1;c[b+420>>2]=0;c[b+412>>2]=0;c[b+416>>2]=0;d=c[b+336>>2]|0;if(!d){a[b+340>>0]=1;c[b+336>>2]=0;c[b+328>>2]=0;d=b+332|0;c[d>>2]=0;Vf(b);return}if(a[b+340>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+336>>2]=0;a[b+340>>0]=1;c[b+336>>2]=0;c[b+328>>2]=0;d=b+332|0;c[d>>2]=0;Vf(b);return}function oj(a,b){a=a|0;b=b|0;var d=0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;d=ea;ea=ea+64|0;c[d+48>>2]=0;c[d+48+4>>2]=0;c[d+48+8>>2]=0;c[d+48+12>>2]=0;i=+f[b>>2];g=+f[b+4>>2];l=+f[b+8>>2];j=+f[b+12>>2];h=i*(2.0/(i*i+g*g+l*l+j*j));e=g*(2.0/(i*i+g*g+l*l+j*j));k=l*(2.0/(i*i+g*g+l*l+j*j));f[d>>2]=1.0-(g*e+l*k);f[d+4>>2]=i*e-j*k;f[d+8>>2]=i*k+j*e;f[d+12>>2]=0.0;f[d+16>>2]=i*e+j*k;f[d+20>>2]=1.0-(i*h+l*k);f[d+24>>2]=g*k-j*h;f[d+28>>2]=0.0;f[d+32>>2]=i*k-j*e;f[d+36>>2]=g*k+j*h;f[d+40>>2]=1.0-(i*h+g*e);f[d+44>>2]=0.0;Ic(a,d);ea=d;return}function pj(a,b){a=a|0;b=+b;var d=0,e=0,g=0;e=ea;ea=ea+16|0;Fi(14544);if((c[a+280>>2]|0)>0){d=0;do{g=c[(c[a+288>>2]|0)+(d<<2)>>2]|0;Ja[c[(c[g>>2]|0)+8>>2]&7](g,a,b);d=d+1|0}while((d|0)<(c[a+280>>2]|0))}d=c[2685]|0;g=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=g;if(g|0){ea=e;return}do if(c[d+4>>2]|0){Y(e|0,0)|0;g=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[e+4>>2]|0)-(c[g+4>>2]|0)+(((c[e>>2]|0)-(c[g>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=e;return}}while(0);c[2685]=c[d+20>>2];ea=e;return}function qj(b,d,e,g){b=b|0;d=d|0;e=+e;g=g|0;var h=0;h=fs()|0;c[h>>2]=5988;a[h+144>>0]=1;c[h+140>>2]=0;c[h+132>>2]=0;c[h+136>>2]=0;c[h+176>>2]=g;f[h+56>>2]=.019999999552965164;c[h+60>>2]=0;c[h+60+4>>2]=0;c[h+60+8>>2]=0;c[h+60+12>>2]=0;a[h+170>>0]=1;c[h+8>>2]=b;f[h+52>>2]=e;f[h+48>>2]=0.0;c[h+12>>2]=d;a[h+171>>0]=1;f[h+172>>2]=0.0;f[h+16>>2]=0.0;f[h+20>>2]=0.0;f[h+44>>2]=29.399999618530273;f[h+24>>2]=55.0;f[h+28>>2]=10.0;a[h+168>>0]=0;a[h+169>>0]=0;a[h+180>>0]=1;f[h+36>>2]=.7853981852531433;f[h+40>>2]=.7071067690849304;f[h+108>>2]=0.0;a[h+181>>0]=0;a[h+182>>0]=0;return h|0}function rj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0;a=NJ(a)|0;d=+f[a+8>>2];if(+BJ(d)>.7071067690849304){g=+f[a+4>>2];e=1.0/+AJ(g*g+d*d);b=NJ(b)|0;f[b>>2]=0.0;f[b+4>>2]=-(+f[a+8>>2]*e);f[b+8>>2]=+f[a+4>>2]*e;c=NJ(c)|0;f[c>>2]=(g*g+d*d)*e;f[c+4>>2]=-(+f[a>>2]*+f[b+8>>2]);f[c+8>>2]=+f[a>>2]*+f[b+4>>2];return}else{d=+f[a>>2];e=+f[a+4>>2];g=1.0/+AJ(d*d+e*e);b=NJ(b)|0;f[b>>2]=-(e*g);h=+f[a>>2]*g;f[b+4>>2]=h;f[b+8>>2]=0.0;h=-(+f[a+8>>2]*h);c=NJ(c)|0;f[c>>2]=h;f[c+4>>2]=+f[a+8>>2]*+f[b>>2];f[c+8>>2]=(d*d+e*e)*g;return}}function sj(b,d){b=b|0;d=d|0;var e=0,f=0;e=c[b+28>>2]|0;f=c[b+32>>2]|0;if(!(a[b+1301>>0]|0)){pf(b,d,We(b,d,0,e+4|0,f+4|0,e+312|0,f+312|0,e+328|0,f+328|0)|0,e+4|0,f+4|0,e+312|0,f+312|0,e+328|0,f+328|0)|0;return}else{We(b,d,pf(b,d,0,e+4|0,f+4|0,e+312|0,f+312|0,e+328|0,f+328|0)|0,e+4|0,f+4|0,e+312|0,f+312|0,e+328|0,f+328|0)|0;return}}function tj(a,b,d){a=a|0;b=b|0;d=d|0;do if(!((b|0)==8&(d|0)==8)){if((b|0)==8&(d|0)==1){b=a+76|0;break}if((b|0)==1&(d|0)==8){b=a+80|0;break}if(!(d|b)){b=a+72|0;break}if((b|0)<20&(d|0)==28){b=a+88|0;break}if((b|0)==28&(d|0)<20){b=a+84|0;break}if((b|0)<20){if((d|0)<20){b=a+32|0;break}if((d+-21|0)>>>0<9){b=a+36|0;break}}else{if((d|0)<20&(b+-21|0)>>>0<9){b=a+40|0;break}if((b|0)==31)if((d|0)==31){b=a+48|0;break}else{b=a+44|0;break}}if((d|0)==31){b=a+52|0;break}else{b=a+56|0;break}}else b=a+60|0;while(0);return c[b>>2]|0}function uj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0;g=ea;ea=ea+16|0;c[a+4>>2]=c[b+40>>2];e=c[b>>2]|0;c[a+76>>2]=e;if(d){c[a+44>>2]=c[b+8>>2];c[a+44+4>>2]=c[b+8+4>>2];c[a+44+8>>2]=c[b+8+8>>2];c[a+44+12>>2]=c[b+8+12>>2]}else{d=NJ(sJ(e)|0)|0;ql(g,d,+f[b+8>>2],+f[b+12>>2],+f[b+16>>2]);c[a+44>>2]=c[g>>2];c[a+44+4>>2]=c[g+4>>2];c[a+44+8>>2]=c[g+8>>2];c[a+44+12>>2]=c[g+12>>2]}c[a+60>>2]=c[b+24>>2];c[a+60+4>>2]=c[b+24+4>>2];c[a+60+8>>2]=c[b+24+8>>2];c[a+60+12>>2]=c[b+24+12>>2];ea=g;return +(+f[b+40>>2])}function vj(a,b,d,e,g){a=a|0;b=b|0;d=+d;e=e|0;g=g|0;var h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0;h=ea;ea=ea+48|0;c[h+32>>2]=e;c[h+32+4>>2]=g;m=+f[b>>2];l=+f[b+4>>2];i=+f[b+8>>2];k=+f[a+56>>2]*m+ +f[a+60>>2]*l+ +f[a+64>>2]*i;j=m*+f[a+72>>2]+l*+f[a+76>>2]+i*+f[a+80>>2];i=m*+f[a+88>>2]+l*+f[a+92>>2]+i*+f[a+96>>2];c[h>>2]=c[a+48>>2];c[h+4>>2]=h+32;f[h+8>>2]=k;f[h+12>>2]=j;f[h+16>>2]=i;f[h+20>>2]=0.0;f[h+24>>2]=d;g=c[a+44>>2]|0;d=+ka[c[(c[g>>2]|0)+12>>2]&15](g,h,1);ea=h;return +d}function wj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,i=0.0,j=0.0,k=0.0,l=0,m=0;g=ea;ea=ea+48|0;Ma[c[(c[a>>2]|0)+124>>2]&127](a,g+32|0,e);m=c[g+32>>2]|0;l=c[g+32+4>>2]|0;e=c[g+32+8>>2]|0;c[b>>2]=m;c[b+4>>2]=l;c[b+8>>2]=e;f[b+12>>2]=0.0;b=c[(c[a>>2]|0)+64>>2]|0;k=-(c[h>>2]=m,+f[h>>2]);j=-(c[h>>2]=l,+f[h>>2]);i=-(c[h>>2]=e,+f[h>>2]);f[g>>2]=k;f[g+4>>2]=j;f[g+8>>2]=i;f[g+12>>2]=0.0;Ma[b&127](g+16|0,a,g);c[d>>2]=c[g+16>>2];c[d+4>>2]=c[g+16+4>>2];c[d+8>>2]=c[g+16+8>>2];c[d+12>>2]=c[g+16+12>>2];ea=g;return}function xj(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;if(e>>>0<3)switch(b|0){case 2:{f[a+756+(e<<2)>>2]=d;c[a+1304>>2]=c[a+1304>>2]|4<>2]=d;c[a+1304>>2]=c[a+1304>>2]|2<>2]=d;c[a+1304>>2]=c[a+1304>>2]|1<>>0>=3)return;switch(b|0){case 2:{f[a+868+(e+-3<<6)+32>>2]=d;c[a+1304>>2]=c[a+1304>>2]|4<>2]=d;c[a+1304>>2]=c[a+1304>>2]|2<>2]=d;c[a+1304>>2]=c[a+1304>>2]|1<>2]=5988;a[g+144>>0]=1;c[g+140>>2]=0;c[g+132>>2]=0;c[g+136>>2]=0;c[g+176>>2]=1;f[g+56>>2]=.019999999552965164;c[g+60>>2]=0;c[g+60+4>>2]=0;c[g+60+8>>2]=0;c[g+60+12>>2]=0;a[g+170>>0]=1;c[g+8>>2]=b;f[g+52>>2]=e;f[g+48>>2]=0.0;c[g+12>>2]=d;a[g+171>>0]=1;f[g+172>>2]=0.0;f[g+16>>2]=0.0;f[g+20>>2]=0.0;f[g+44>>2]=29.399999618530273;f[g+24>>2]=55.0;f[g+28>>2]=10.0;a[g+168>>0]=0;a[g+169>>0]=0;a[g+180>>0]=1;f[g+36>>2]=.7853981852531433;f[g+40>>2]=.7071067690849304;f[g+108>>2]=0.0;a[g+181>>0]=0;a[g+182>>0]=0;return g|0}function zj(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0;c=ea;ea=ea+48|0;d=2.0/+cG(b);g=+f[(NJ(b)|0)>>2];e=+f[(sJ(b)|0)>>2];i=+f[(rJ(b)|0)>>2];h=+f[(qJ(b)|0)>>2];f[c+32>>2]=1.0-(e*(e*d)+i*(i*d));f[c+28>>2]=g*(e*d)-h*(i*d);f[c+24>>2]=g*(i*d)+h*(e*d);f[c+20>>2]=g*(e*d)+h*(i*d);f[c+16>>2]=1.0-(g*(g*d)+i*(i*d));f[c+12>>2]=e*(i*d)-h*(g*d);f[c+8>>2]=g*(i*d)-h*(e*d);f[c+4>>2]=e*(i*d)+h*(g*d);f[c>>2]=1.0-(g*(g*d)+e*(e*d));Oo(a,c+32|0,c+28|0,c+24|0,c+20|0,c+16|0,c+12|0,c+8|0,c+4|0,c);ea=c;return}function Aj(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0;h=us()|0;c[h+4>>2]=3;c[h+8>>2]=-1;c[h+12>>2]=-1;f[h+16>>2]=3402823466385288598117041.0e14;a[h+20>>0]=1;a[h+21>>0]=0;c[h+24>>2]=-1;c[h+28>>2]=b;c[h+32>>2]=d;f[h+36>>2]=0.0;f[h+40>>2]=.30000001192092896;c[h+44>>2]=0;c[h>>2]=5608;c[h+300>>2]=c[e>>2];c[h+300+4>>2]=c[e+4>>2];c[h+300+8>>2]=c[e+8>>2];c[h+300+12>>2]=c[e+12>>2];c[h+316>>2]=c[g>>2];c[h+316+4>>2]=c[g+4>>2];c[h+316+8>>2]=c[g+8>>2];c[h+316+12>>2]=c[g+12>>2];c[h+332>>2]=0;a[h+344>>0]=0;f[h+348>>2]=.30000001192092896;f[h+352>>2]=1.0;f[h+356>>2]=0.0;return h|0}function Bj(b){b=b|0;var d=0;c[b>>2]=10036;d=c[b+64>>2]|0;if(d|0){if(a[b+68>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+64>>2]=0}a[b+68>>0]=1;c[b+64>>2]=0;c[b+56>>2]=0;c[b+60>>2]=0;d=c[b+44>>2]|0;if(d|0){if(a[b+48>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+44>>2]=0}a[b+48>>0]=1;c[b+44>>2]=0;c[b+36>>2]=0;c[b+40>>2]=0;d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function Cj(b){b=b|0;var d=0;c[b>>2]=5420;d=c[b+80>>2]|0;if(d|0){if(a[b+84>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+80>>2]=0}a[b+84>>0]=1;c[b+80>>2]=0;c[b+72>>2]=0;c[b+76>>2]=0;d=c[b+60>>2]|0;if(d|0){if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+60>>2]=0}a[b+64>>0]=1;c[b+60>>2]=0;c[b+52>>2]=0;c[b+56>>2]=0;d=c[b+40>>2]|0;if(!d){a[b+44>>0]=1;c[b+40>>2]=0;c[b+32>>2]=0;b=b+36|0;c[b>>2]=0;return}if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+40>>2]=0;a[b+44>>0]=1;c[b+40>>2]=0;c[b+32>>2]=0;b=b+36|0;c[b>>2]=0;return}function Dj(b){b=b|0;var d=0;c[b>>2]=6568;d=c[b+56>>2]|0;if(d|0){if(a[b+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+56>>2]=0}a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;d=c[b+36>>2]|0;if(d|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;d=c[b+16>>2]|0;if(!d){d=b+12|0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[d>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;d=b+12|0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[d>>2]=0;return}function Ej(b){b=b|0;var d=0;c[b>>2]=10636;d=c[b+60>>2]|0;if(d|0){if(a[b+64>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+60>>2]=0}a[b+64>>0]=1;c[b+60>>2]=0;c[b+52>>2]=0;c[b+56>>2]=0;d=c[b+40>>2]|0;if(d|0){if(a[b+44>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+40>>2]=0}a[b+44>>0]=1;c[b+40>>2]=0;c[b+32>>2]=0;c[b+36>>2]=0;d=c[b+16>>2]|0;if(!d){a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;b=b+12|0;c[b>>2]=0;return}function Fj(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,156)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=4704;a[b+8>>0]=1;c[b+12>>2]=4916;c[b+60>>2]=d;c[b+64>>2]=0;a[b+88>>0]=1;c[b+84>>2]=0;c[b+76>>2]=0;c[b+80>>2]=0;a[b+108>>0]=1;c[b+104>>2]=0;c[b+96>>2]=0;c[b+100>>2]=0;a[b+128>>0]=1;c[b+124>>2]=0;c[b+116>>2]=0;c[b+120>>2]=0;a[b+148>>0]=1;c[b+144>>2]=0;c[b+136>>2]=0;c[b+140>>2]=0;c[b+16>>2]=c[f+8>>2];c[b+20>>2]=c[e+8>>2];vi(b+72|0);return b|0}function Gj(a,b,d,e){a=a|0;b=+b;d=d|0;e=e|0;var g=0,h=0;g=ea;ea=ea+64|0;h=MI(d)|0;c[g+48>>2]=c[h>>2];c[g+48+4>>2]=c[h+4>>2];c[g+48+8>>2]=c[h+8>>2];c[g+48+12>>2]=c[h+12>>2];d=NJ(d)|0;ir(g+32|0,d,1);ir(g+16|0,d,0);Ra[c[(c[a>>2]|0)+64>>2]&1](a,g+48|0,g+32|0,g+16|0,b,-1.5707963705062866,1.5707963705062866,-1.5707963705062866,1.5707963705062866,e,30.0,0);d=c[(c[a>>2]|0)+64>>2]|0;Sq(g,+f[g+16>>2],+f[g+16+4>>2],+f[g+16+8>>2]);Ra[d&1](a,g+48|0,g+32|0,g,b,-1.5707963705062866,1.5707963705062866,-1.5707963705062866,1.5707963705062866,e,30.0,0);ea=g;return}function Hj(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,156)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=4704;a[b+8>>0]=0;c[b+12>>2]=4916;c[b+60>>2]=d;c[b+64>>2]=0;a[b+88>>0]=1;c[b+84>>2]=0;c[b+76>>2]=0;c[b+80>>2]=0;a[b+108>>0]=1;c[b+104>>2]=0;c[b+96>>2]=0;c[b+100>>2]=0;a[b+128>>0]=1;c[b+124>>2]=0;c[b+116>>2]=0;c[b+120>>2]=0;a[b+148>>0]=1;c[b+144>>2]=0;c[b+136>>2]=0;c[b+140>>2]=0;c[b+16>>2]=c[e+8>>2];c[b+20>>2]=c[f+8>>2];vi(b+72|0);return b|0}function Ij(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=+e;g=g|0;h=h|0;var i=0;i=ea;ea=ea+64|0;c[i+48>>2]=g;c[i+48+4>>2]=h;g=c[a+212>>2]|0;if(!(+f[g+4>>2]>=e)){ea=i;return +e}c[i>>2]=c[a+216>>2];c[i+4>>2]=i+48;c[i+8>>2]=c[b>>2];c[i+8+4>>2]=c[b+4>>2];c[i+8+8>>2]=c[b+8>>2];c[i+8+12>>2]=c[b+12>>2];c[i+24>>2]=c[d>>2];c[i+24+4>>2]=c[d+4>>2];c[i+24+8>>2]=c[d+8>>2];c[i+24+12>>2]=c[d+12>>2];f[i+40>>2]=e;e=+ka[c[(c[g>>2]|0)+12>>2]&15](g,i,0);ea=i;return +e}function Jj(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=+e;g=g|0;h=h|0;var i=0;i=ea;ea=ea+64|0;c[i+48>>2]=g;c[i+48+4>>2]=h;g=c[a+212>>2]|0;if(!(+f[g+4>>2]>=e)){ea=i;return +e}c[i>>2]=c[a+216>>2];c[i+4>>2]=i+48;c[i+8>>2]=c[b>>2];c[i+8+4>>2]=c[b+4>>2];c[i+8+8>>2]=c[b+8>>2];c[i+8+12>>2]=c[b+12>>2];c[i+24>>2]=c[d>>2];c[i+24+4>>2]=c[d+4>>2];c[i+24+8>>2]=c[d+8>>2];c[i+24+12>>2]=c[d+12>>2];f[i+40>>2]=e;e=+ka[c[(c[g>>2]|0)+12>>2]&15](g,i,1);ea=i;return +e}function Kj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=c[e+16>>2]|0;if(!f){if(!(ho(e)|0)){f=c[e+16>>2]|0;g=5}}else g=5;a:do if((g|0)==5){g=c[e+20>>2]|0;if((f-g|0)>>>0>>0){va[c[e+36>>2]&63](e,b,d)|0;break}b:do if((a[e+75>>0]|0)<0|(d|0)==0)f=d;else{h=d;while(1){f=h+-1|0;if((a[b+f>>0]|0)==10)break;if(!f){f=d;break b}else h=f}if((va[c[e+36>>2]&63](e,b,h)|0)>>>0>>0)break a;g=c[e+20>>2]|0;f=d-h|0;b=b+h|0}while(0);vh(g|0,b|0,f|0)|0;c[e+20>>2]=(c[e+20>>2]|0)+f}while(0);return}function Lj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=ea;ea=ea+32|0;c[a+8>>2]=c[b>>2];On(a+20|0,b);if(d){c[e+16>>2]=c[b+8>>2];c[e+16+4>>2]=c[b+8+4>>2];c[e+16+8>>2]=c[b+8+8>>2];c[e+16+12>>2]=c[b+8+12>>2]}else{d=NJ(sJ(c[a+8>>2]|0)|0)|0;ql(e+16|0,d,+f[b+8>>2],+f[b+12>>2],+f[b+16>>2])}Tl(a+72|0,e+16|0);up(e,a+40|0,a+56|0,+f[b+24>>2]);Tl(a+92|0,e);On(a+112|0,b+24|0);ea=e;return +(+f[a+4>>2])}function Mj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;e=ea;ea=ea+16|0;Ma[c[(c[b>>2]|0)+68>>2]&127](e,b,d);c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]=c[e+8>>2];c[a+12>>2]=c[e+12>>2];i=+f[d>>2];g=+f[d+4>>2];h=+f[d+8>>2];k=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:i;j=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:g;h=i*i+g*g+h*h<1.4210854715202004e-14?-1.0:h;g=1.0/+s(+(h*h+(k*k+j*j)));i=+ha[c[(c[b>>2]|0)+48>>2]&15](b);f[a>>2]=+f[a>>2]+i*(k*g);f[a+4>>2]=+f[a+4>>2]+i*(j*g);f[a+8>>2]=+f[a+8>>2]+i*(h*g);ea=e;return}function Nj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=ea;ea=ea+48|0;e=wH(b,0)|0;f[d+32>>2]=+uo(c,e);f[d+28>>2]=+go(c,e);f[d+24>>2]=+fo(c,e);e=wH(b,1)|0;f[d+20>>2]=+uo(c,e);f[d+16>>2]=+go(c,e);f[d+12>>2]=+fo(c,e);b=wH(b,2)|0;f[d+8>>2]=+uo(c,b);f[d+4>>2]=+go(c,b);f[d>>2]=+fo(c,b);bq(a,d+32|0,d+28|0,d+24|0,d+20|0,d+16|0,d+12|0,d+8|0,d+4|0,d);ea=d;return}function Oj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[b+188>>2]|0;if(d|0){g=c[a+68>>2]|0;g=ra[c[(c[g>>2]|0)+36>>2]&127](g)|0;Ma[c[(c[g>>2]|0)+40>>2]&127](g,d,c[a+24>>2]|0);g=c[a+68>>2]|0;Ma[c[(c[g>>2]|0)+12>>2]&127](g,d,c[a+24>>2]|0);c[b+188>>2]=0}f=c[a+8>>2]|0;if((f|0)<=0)return;g=c[a+16>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0)){h=9;break}}if((h|0)==9)return;if((d|0)>=(f|0))return;c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+16>>2]|0)+(f+-1<<2)>>2]=b;c[a+8>>2]=f+-1;return}function Pj(a,b,d,f){a=a|0;b=b|0;d=d|0;f=f|0;var g=0,h=0,i=0;while(1){g=c[a+12>>2]|0;if(!(((e[f>>1]|0)>=(e[a>>1]|0)?(e[d>>1]|0)<=(e[a+6>>1]|0):0)&(e[d+4>>1]|0)<=(e[a+10>>1]|0)&(e[f+4>>1]|0)>=(e[a+4>>1]|0)&(e[d+2>>1]|0)<=(e[a+8>>1]|0)&(e[f+2>>1]|0)>=(e[a+2>>1]|0))){h=6;break}if((g|0)>-1)break;i=a+16|0;Pj(i,b,d,f);g=c[a+28>>2]|0;a=(g|0)>-1?a+32|0:i+(0-g<<4)|0}if((h|0)==6)return;Ma[c[(c[b>>2]|0)+8>>2]&127](b,21?g>>>21:g,g&2097151);return}function Qj(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;i=+u(+c);h=+v(+c);c=+f[b+444>>2];if(+r(+i)>1.1920928955078125e-07){e=+f[b+448>>2];c=+s(+((h*h/(i*i)+1.0)/(1.0/(e*e)+h*h/(i*i)/(c*c))));e=h*h;g=i*i}else{e=h*h;g=i*i}j=c*.5;g=+v(+j)/+s(+(e+(g+0.0)));j=+u(+j);k=j*d+i*g*0.0-h*g*-0.0;e=j*0.0-h*g*d-g*0.0*0.0;c=j*0.0+g*0.0*0.0-i*g*d;d=-(g*0.0*d)-i*g*0.0-h*g*-0.0;f[a>>2]=h*g*e+(j*k+d*-(g*0.0))-c*-(i*g);f[a+4>>2]=c*-(g*0.0)+(j*e+d*-(i*g))-h*g*k;f[a+8>>2]=k*-(i*g)+(h*g*d+j*c)-e*-(g*0.0);f[a+12>>2]=0.0;return}function Rj(b,d){b=b|0;d=d|0;var e=0,g=0,h=0;f[b+16>>2]=0.0;f[b+20>>2]=0.0;a[b+168>>0]=0;a[b+169>>0]=0;f[b+172>>2]=0.0;c[b+60>>2]=0;c[b+60+4>>2]=0;c[b+60+8>>2]=0;c[b+60+12>>2]=0;b=c[(c[b+8>>2]|0)+284>>2]|0;if((c[(ra[c[(c[b>>2]|0)+28>>2]&127](b)|0)+4>>2]|0)<=0)return;do{g=c[b>>2]|0;h=c[g+12>>2]|0;g=c[c[(ra[c[g+28>>2]&127](b)|0)+12>>2]>>2]|0;e=c[(c[(ra[c[(c[b>>2]|0)+28>>2]&127](b)|0)+12>>2]|0)+4>>2]|0;wa[h&31](b,g,e,c[d+24>>2]|0)|0}while((c[(ra[c[(c[b>>2]|0)+28>>2]&127](b)|0)+4>>2]|0)>0);return}function Sj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;c[6721]=(c[6721]|0)+-1;Ia[c[(c[a>>2]|0)+20>>2]&127](a,b);e=c[b+768>>2]|0;d=(c[a+12>>2]|0)+-1|0;g=c[a+20>>2]|0;f=c[g+(e<<2)>>2]|0;c[g+(e<<2)>>2]=c[g+(d<<2)>>2];c[(c[a+20>>2]|0)+(d<<2)>>2]=f;c[(c[(c[a+20>>2]|0)+(e<<2)>>2]|0)+768>>2]=e;c[a+12>>2]=d;a=c[a+68>>2]|0;if(!b)return;g=c[a+16>>2]|0;if(g>>>0<=b>>>0?(g+(z(c[a>>2]|0,c[a+4>>2]|0)|0)|0)>>>0>b>>>0:0){c[b>>2]=c[a+12>>2];c[a+12>>2]=b;c[a+8>>2]=(c[a+8>>2]|0)+1;return}c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Tj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;if((e|0)<=0)return;g=0;do{n=+f[b+(g<<4)>>2];m=+f[b+(g<<4)+4>>2];j=+f[b+(g<<4)+8>>2];k=n*+f[a+56>>2]+m*+f[a+60>>2]+j*+f[a+64>>2];l=n*+f[a+72>>2]+m*+f[a+76>>2]+j*+f[a+80>>2];j=n*+f[a+88>>2]+m*+f[a+92>>2]+j*+f[a+96>>2];i=a+56+((k>2]=c[i>>2];c[h+4>>2]=c[i+4>>2];c[h+8>>2]=c[i+8>>2];c[h+12>>2]=c[i+12>>2];g=g+1|0}while((g|0)!=(e|0));return}function Uj(a,b){a=a|0;b=+b;var d=0,e=0;d=ea;ea=ea+16|0;he(a,b);Fi(14301);a=c[a+452>>2]|0;Da[c[(c[a>>2]|0)+24>>2]&31](a,b);a=c[2685]|0;e=(c[a+16>>2]|0)+-1|0;c[a+16>>2]=e;if(e|0){ea=d;return}do if(c[a+4>>2]|0){Y(d|0,0)|0;e=c[6746]|0;f[a+8>>2]=+f[a+8>>2]+ +(((c[d+4>>2]|0)-(c[e+4>>2]|0)+(((c[d>>2]|0)-(c[e>>2]|0)|0)*1e6|0)-(c[a+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[a+16>>2]|0)){a=c[2685]|0;break}else{ea=d;return}}while(0);c[2685]=c[a+20>>2];ea=d;return}function Vj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;do switch(b|0){case 0:{b=0;f=1;break}case 1:{b=0;f=2;break}case 2:{b=1;f=3;break}case 3:{b=2;f=3;break}case 4:{b=0;f=4;break}case 5:{b=1;f=5;break}case 6:{b=2;f=6;break}case 7:{b=3;f=7;break}case 8:{b=4;f=5;break}case 9:{b=4;f=6;break}case 10:{b=5;f=7;break}case 11:{b=6;f=7;break}default:{b=0;f=0}}while(0);Ma[c[(c[a>>2]|0)+108>>2]&127](a,b,d);Ma[c[(c[a>>2]|0)+108>>2]&127](a,f,e);return}function Wj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0;h=+f[a+56>>2];k=+f[a+72>>2]-h;j=+f[a+60>>2];i=+f[a+76>>2]-j;l=+f[a+64>>2];m=+f[a+80>>2]-l;h=+f[a+88>>2]-h;j=+f[a+92>>2]-j;l=+f[a+96>>2]-l;f[d+12>>2]=0.0;g=1.0/+s(+((k*j-i*h)*(k*j-i*h)+((i*l-m*j)*(i*l-m*j)+(m*h-k*l)*(m*h-k*l))));f[d>>2]=(i*l-m*j)*g;f[d+4>>2]=(m*h-k*l)*g;f[d+8>>2]=(k*j-i*h)*g;c[e>>2]=c[a+56>>2];c[e+4>>2]=c[a+56+4>>2];c[e+8>>2]=c[a+56+8>>2];c[e+12>>2]=c[a+56+12>>2];return}function Xj(b){b=b|0;var d=0,e=0,f=0;c[b>>2]=7276;d=c[b+12>>2]|0;if((d|0)>0){f=0;do{e=c[(c[b+20>>2]|0)+(f<<2)>>2]|0;if(e|0){Ca[c[c[e>>2]>>2]&511](e);e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+60>>2]&127](e,c[(c[b+20>>2]|0)+(f<<2)>>2]|0)}f=f+1|0}while((f|0)!=(d|0))}d=c[b+20>>2]|0;if(!d){a[b+24>>0]=1;c[b+20>>2]=0;c[b+12>>2]=0;b=b+16|0;c[b>>2]=0;return}if(a[b+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+20>>2]=0;a[b+24>>0]=1;c[b+20>>2]=0;c[b+12>>2]=0;b=b+16|0;c[b>>2]=0;return}function Yj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;h=+f[a+56>>2];g=+f[a+72>>2]-h;k=+f[a+60>>2];j=+f[a+76>>2]-k;e=+f[a+64>>2];i=+f[a+80>>2]-e;h=+f[a+88>>2]-h;k=+f[a+92>>2]-k;e=+f[a+96>>2]-e;f[c+12>>2]=0.0;d=1.0/+s(+((g*k-j*h)*(g*k-j*h)+((j*e-i*k)*(j*e-i*k)+(i*h-g*e)*(i*h-g*e))));f[c>>2]=(j*e-i*k)*d;f[c+4>>2]=(i*h-g*e)*d;f[c+8>>2]=(g*k-j*h)*d;if(!b)return;f[c>>2]=-((j*e-i*k)*d);f[c+4>>2]=-((i*h-g*e)*d);f[c+8>>2]=-((g*k-j*h)*d);return}function Zj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;g=c[a+720>>2]|0;h=c[a+752>>2]|0;if((h|0)<=0){e=0;return e|0}a=c[a+760>>2]|0;f=0;while(1){i=c[a+(f*44|0)+8>>2]|0;if(((i|0)==(g+(e*104|0)|0)|((i|0)==(g+(b*104|0)|0)|(i|0)==(g+(d*104|0)|0))?(i=c[a+(f*44|0)+12>>2]|0,(i|0)==(g+(e*104|0)|0)|((i|0)==(g+(b*104|0)|0)|(i|0)==(g+(d*104|0)|0))):0)?(i=c[a+(f*44|0)+16>>2]|0,(i|0)==(g+(e*104|0)|0)|((i|0)==(g+(b*104|0)|0)|(i|0)==(g+(d*104|0)|0))):0){a=1;f=7;break}f=f+1|0;if((f|0)>=(h|0)){a=0;f=7;break}}if((f|0)==7)return a|0;return 0}function _j(b,d){b=b|0;d=d|0;do if(b){if(d>>>0<128){a[b>>0]=d;b=1;break}if(!(c[6759]|0)){if((d&-128|0)!=57216){b=-1;break}a[b>>0]=d;b=1;break}if(d>>>0<2048){a[b>>0]=(6?d>>>6:d)|192;a[b+1>>0]=d&63|128;b=2;break}if(d>>>0<55296|(d&-8192|0)==57344){a[b>>0]=(12?d>>>12:d)|224;a[b+1>>0]=(6?d>>>6:d)&63|128;a[b+2>>0]=d&63|128;b=3;break}if((d+-65536|0)>>>0<1048576){a[b>>0]=(18?d>>>18:d)|240;a[b+1>>0]=(12?d>>>12:d)&63|128;a[b+2>>0]=(6?d>>>6:d)&63|128;a[b+3>>0]=d&63|128;b=4}else b=-1}else b=1;while(0);return b|0}function $j(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+48|0;f[c+32>>2]=+uo(b,a);f[c+28>>2]=+go(b,a);f[c+24>>2]=+fo(b,a);f[c+20>>2]=+uo(b,a+16|0);f[c+16>>2]=+go(b,a+16|0);f[c+12>>2]=+fo(b,a+16|0);f[c+8>>2]=+uo(b,a+32|0);f[c+4>>2]=+go(b,a+32|0);f[c>>2]=+fo(b,a+32|0);Oo(a,c+32|0,c+28|0,c+24|0,c+20|0,c+16|0,c+12|0,c+8|0,c+4|0,c);ea=c;return}function ak(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0,j=0;i=c[a+96>>2]|0;j=c[a+104>>2]|0;g=+f[j+(((b|0)%(i|0)|0)<<4)+4>>2]*+f[a+16>>2];h=+f[j+(((b|0)%(i|0)|0)<<4)+8>>2]*+f[a+20>>2];f[d>>2]=+f[j+(((b|0)%(i|0)|0)<<4)>>2]*+f[a+12>>2];f[d+4>>2]=g;f[d+8>>2]=h;f[d+12>>2]=0.0;d=c[a+104>>2]|0;h=+f[d+(((b+1|0)%(i|0)|0)<<4)+4>>2]*+f[a+16>>2];g=+f[d+(((b+1|0)%(i|0)|0)<<4)+8>>2]*+f[a+20>>2];f[e>>2]=+f[d+(((b+1|0)%(i|0)|0)<<4)>>2]*+f[a+12>>2];f[e+4>>2]=h;f[e+8>>2]=g;f[e+12>>2]=0.0;return}function bk(a,b){a=a|0;b=b|0;var d=0,e=0,g=0.0,h=0,i=0;e=ea;ea=ea+32|0;d=c[a+184>>2]|0;if(+f[d+4>>2]==0.0){a=0;ea=e;return a|0}b=c[b>>2]|0;if(!(ta[c[(c[d>>2]|0)+8>>2]&31](d,c[b+188>>2]|0)|0)){a=1;ea=e;return a|0}h=c[a+192>>2]|0;i=c[b+192>>2]|0;d=c[a+184>>2]|0;g=+f[a+188>>2];c[e>>2]=0;c[e+4>>2]=i;c[e+8>>2]=b;c[e+12>>2]=b+4;c[e+16>>2]=-1;c[e+20>>2]=-1;rb(h,a+36|0,a+100|0,e,d,g);a=1;ea=e;return a|0}function ck(a,b){a=a|0;b=b|0;var d=0;d=ea;ea=ea+16|0;c[d>>2]=c[b>>2];c[d+4>>2]=c[b+4>>2];c[d+8>>2]=c[b+8>>2];c[d+12>>2]=c[b+12>>2];a=c[a+8>>2]|0;c[a+260>>2]=(c[a+260>>2]|0)+1;c[a+4>>2]=1065353216;c[a+8>>2]=0;c[a+8+4>>2]=0;c[a+8+8>>2]=0;c[a+8+12>>2]=0;c[a+24>>2]=1065353216;c[a+28>>2]=0;c[a+28+4>>2]=0;c[a+28+8>>2]=0;c[a+28+12>>2]=0;c[a+44>>2]=1065353216;c[a+48>>2]=0;c[a+52>>2]=c[d>>2];c[a+52+4>>2]=c[d+4>>2];c[a+52+8>>2]=c[d+8>>2];c[a+52+12>>2]=c[d+12>>2];ea=d;return}function dk(a){a=a|0;var b=0,d=0;b=ea;ea=ea+16|0;Fi(17589);d=c[a+68>>2]|0;Ia[c[(c[d>>2]|0)+32>>2]&127](d,c[a+24>>2]|0);a=c[2685]|0;d=(c[a+16>>2]|0)+-1|0;c[a+16>>2]=d;if(d|0){ea=b;return}do if(c[a+4>>2]|0){Y(b|0,0)|0;d=c[6746]|0;f[a+8>>2]=+f[a+8>>2]+ +(((c[b+4>>2]|0)-(c[d+4>>2]|0)+(((c[b>>2]|0)-(c[d>>2]|0)|0)*1e6|0)-(c[a+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[a+16>>2]|0)){a=c[2685]|0;break}else{ea=b;return}}while(0);c[2685]=c[a+20>>2];ea=b;return}function ek(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0;h=ea;ea=ea+64|0;if(!(rt(d,e,0)|0))if((e|0)!=0?(g=yi(e,3456)|0,(g|0)!=0):0){c[h>>2]=g;c[h+4>>2]=0;c[h+8>>2]=d;c[h+12>>2]=-1;d=h+16|0;e=d+36|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(e|0));b[h+16+36>>1]=0;a[h+16+38>>0]=0;c[h+48>>2]=1;Pa[c[(c[g>>2]|0)+28>>2]&127](g,h,c[f>>2]|0,1);if((c[h+24>>2]|0)==1){c[f>>2]=c[h+16>>2];d=1}else d=0}else d=0;else d=1;ea=h;return d|0}function fk(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0;k=+ha[c[(c[a>>2]|0)+48>>2]&15](a);h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);d=+ha[c[(c[a>>2]|0)+48>>2]&15](a);m=(k+ +f[a+28>>2])/+f[a+12>>2];j=(h+ +f[a+32>>2])/+f[a+16>>2];g=(d+ +f[a+36>>2])/+f[a+20>>2];l=+r(+(+f[b>>2]));i=+r(+(+f[b+4>>2]));e=+r(+(+f[b+8>>2]));f[a+12>>2]=l;f[a+16>>2]=i;f[a+20>>2]=e;f[a+24>>2]=0.0;f[a+28>>2]=m*l-k;f[a+32>>2]=j*i-h;f[a+36>>2]=g*e-d;f[a+40>>2]=0.0;return}function gk(b,d){b=b|0;d=d|0;var e=0,g=0,h=0.0,i=0,j=0;if(a[b+527>>0]|0){c[d>>2]=0;c[d+4>>2]=0;return}c[d>>2]=3;c[d+4>>2]=3;j=c[b+28>>2]|0;i=c[b+32>>2]|0;pb(b,j+4|0,i+4|0,j+264|0,i+264|0);if((a[b+526>>0]|0?(e=c[d>>2]|0,c[d>>2]=e+1,g=c[d+4>>2]|0,c[d+4>>2]=g+-1,h=+f[b+456>>2],+f[b+444>>2]>2]>2]=e+2;c[d+4>>2]=g+-2}if(!(a[b+525>>0]|0))return;c[d>>2]=(c[d>>2]|0)+1;c[d+4>>2]=(c[d+4>>2]|0)+-1;return}function hk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=b+e|0;d=d&255;if((e|0)>=67){while(b&3){a[b>>0]=d;b=b+1|0}g=d|d<<8|d<<16|d<<24;while((b|0)<=((f&-4)-64|0)){c[b>>2]=g;c[b+4>>2]=g;c[b+8>>2]=g;c[b+12>>2]=g;c[b+16>>2]=g;c[b+20>>2]=g;c[b+24>>2]=g;c[b+28>>2]=g;c[b+32>>2]=g;c[b+36>>2]=g;c[b+40>>2]=g;c[b+44>>2]=g;c[b+48>>2]=g;c[b+52>>2]=g;c[b+56>>2]=g;c[b+60>>2]=g;b=b+64|0}while((b|0)<(f&-4|0)){c[b>>2]=g;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return f-e|0}function ik(a,b,c,d,e,g,h,i,j,k){a=+a;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;i=+i;j=+j;k=k|0;if(!(((h-d)*b-(i-e)*a)*g+(((i-e)*c-(j-g)*b)*d+((j-g)*a-(h-d)*c)*e)<0.0)){k=0;return k|0}do if(!((h-d)*d+(i-e)*e+(j-g)*g>0.0))if((h-d)*h+(i-e)*i+(j-g)*j<0.0){d=h*h+i*i+j*j;break}else{d=((h*h+i*i+j*j)*(d*d+e*e+g*g)-(h*d+i*e+j*g)*(h*d+i*e+j*g))/((h-d)*(h-d)+(i-e)*(i-e)+(j-g)*(j-g));d=d>0.0?d:0.0;break}else d=d*d+e*e+g*g;while(0);f[k>>2]=+s(+d);k=1;return k|0}function jk(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0,h=0,i=0;b=c[b+36>>2]|0;i=c[b+8>>2]|0;h=c[b+12>>2]|0;g=c[b+16>>2]|0;e=+f[a+52>>2];d=+Pg(a+4|0,+f[a+36>>2],+f[a+40>>2],+f[a+44>>2],+f[i+8>>2],+f[i+12>>2],+f[i+16>>2],+f[h+8>>2],+f[h+12>>2],+f[h+16>>2],+f[g+8>>2],+f[g+12>>2],+f[g+16>>2],e);if(!(d>0.0&d>2]|0;h=h+1|0;c[i>>2]=h;return}f[a+52>>2]=d;c[a+56>>2]=b;i=a+60|0;h=c[i>>2]|0;h=h+1|0;c[i>>2]=h;return}function kk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;Ma[c[(c[b>>2]|0)+68>>2]&127](a,b,d);if(!(+ha[c[(c[b>>2]|0)+48>>2]&15](b)!=0.0))return;h=+f[d>>2];e=+f[d+4>>2];g=+f[d+8>>2];j=h*h+e*e+g*g<1.4210854715202004e-14?-1.0:h;i=h*h+e*e+g*g<1.4210854715202004e-14?-1.0:e;g=h*h+e*e+g*g<1.4210854715202004e-14?-1.0:g;e=1.0/+s(+(g*g+(j*j+i*i)));h=+ha[c[(c[b>>2]|0)+48>>2]&15](b);f[a>>2]=+f[a>>2]+h*(j*e);f[a+4>>2]=+f[a+4>>2]+h*(i*e);f[a+8>>2]=+f[a+8>>2]+h*(g*e);return}function lk(b,d,e){b=b|0;d=d|0;e=+e;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;a[b+171>>0]=0;c[b+60>>2]=c[d>>2];c[b+60+4>>2]=c[d+4>>2];c[b+60+8>>2]=c[d+8>>2];c[b+60+12>>2]=c[d+12>>2];g=+f[b+60>>2];h=+f[b+64>>2];j=+f[b+68>>2];i=1.0/+s(+(g*g+h*h+j*j));if(+s(+(j*i*(j*i)+(g*i*(g*i)+h*i*(h*i))))<1.1920928955078125e-07){k=0.0;h=0.0;g=0.0;d=0}else{k=g*i;h=h*i;g=j*i;d=c[b+72>>2]|0}f[b+76>>2]=k;f[b+80>>2]=h;f[b+84>>2]=g;c[b+88>>2]=d;f[b+172>>2]=+f[b+172>>2]+e;return}function mk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0;a:do if(c>>>0>=3)if((c+-3|0)>>>0<3)switch(b|0){case 2:{d=+f[a+868+(c+-3<<6)+32>>2];break a}case 4:{d=+f[a+868+(c+-3<<6)+36>>2];break a}case 3:{d=+f[a+868+(c+-3<<6)+28>>2];break a}default:{d=0.0;break a}}else d=0.0;else switch(b|0){case 2:{d=+f[a+756+(c<<2)>>2];break a}case 4:{d=+f[a+772+(c<<2)>>2];break a}case 3:{d=+f[a+740+(c<<2)>>2];break a}default:{d=0.0;break a}}while(0);return +d}function nk(a){a=a|0;var b=0,d=0,e=0,f=0.0,g=0,h=0,i=0;e=ea;ea=ea+16|0;b=c[a+8>>2]|0;d=c[a+8+4>>2]|0;if((d|0)>-1|(d|0)==-1&b>>>0>4294967295){f=(+(b>>>0)+4294967296.0*+(d>>>0))*18446744073709551616.0+(+((c[a>>2]|0)>>>0)+4294967296.0*+((c[a+4>>2]|0)>>>0));ea=e;return +f}else{i=c[a>>2]|0;a=c[a+4>>2]|0;h=tv(0,0,i|0,a|0)|0;g=D()|0;d=Lv((i|0)==0&(a|0)==0&1|0,0,~b|0,~d|0)|0;a=D()|0;c[e>>2]=h;c[e+4>>2]=g;c[e+8>>2]=d;c[e+8+4>>2]=a;f=-+nk(e);ea=e;return +f}return 0.0}function ok(b,d,e,g,h){b=b|0;d=+d;e=e|0;g=g|0;h=h|0;f[b>>2]=d;c[b+4>>2]=e;c[b+72>>2]=g;c[b+76>>2]=c[h>>2];c[b+76+4>>2]=c[h+4>>2];c[b+76+8>>2]=c[h+8>>2];c[b+76+12>>2]=c[h+12>>2];f[b+92>>2]=0.0;f[b+96>>2]=0.0;f[b+100>>2]=.5;f[b+104>>2]=0.0;f[b+108>>2]=0.0;f[b+112>>2]=.800000011920929;f[b+116>>2]=1.0;a[b+120>>0]=0;f[b+124>>2]=.004999999888241291;f[b+128>>2]=.009999999776482582;f[b+132>>2]=.009999999776482582;f[b+136>>2]=.009999999776482582;yq(b+8|0);return}function pk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a:do if(!(rt(b,c[d+8>>2]|0,0)|0)){g=c[b+12>>2]|0;an(b+16|0,d,e,f);if((g|0)>1){h=b+24|0;do{an(h,d,e,f);if(a[d+54>>0]|0)break a;h=h+8|0}while(h>>>0<(b+16+(g<<3)|0)>>>0)}}else qm(d,e,f);while(0);return}function qk(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;do if(!(rt(b,c[d+8>>2]|0,g)|0)){if(rt(b,c[d>>2]|0,g)|0){if((c[d+16>>2]|0)!=(e|0)?(c[d+20>>2]|0)!=(e|0):0){c[d+32>>2]=f;c[d+20>>2]=e;c[d+40>>2]=(c[d+40>>2]|0)+1;if((c[d+36>>2]|0)==1?(c[d+24>>2]|0)==2:0)a[d+54>>0]=1;c[d+44>>2]=4;break}if((f|0)==1)c[d+32>>2]=1}}else Jr(d,e,f);while(0);return}function rk(b,d,e){b=b|0;d=d|0;e=e|0;b=GI(152)|0;c[b>>2]=5932;a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;a[b+40>>0]=1;c[b+36>>2]=0;c[b+28>>2]=0;c[b+32>>2]=0;a[b+60>>0]=1;c[b+56>>2]=0;c[b+48>>2]=0;c[b+52>>2]=0;a[b+80>>0]=1;c[b+76>>2]=0;c[b+68>>2]=0;c[b+72>>2]=0;c[b+100>>2]=e;f[b+104>>2]=0.0;a[b+148>>0]=1;c[b+144>>2]=0;c[b+136>>2]=0;c[b+140>>2]=0;c[b+116>>2]=d;c[b+120>>2]=0;c[b+124>>2]=2;c[b+128>>2]=1;f[b+112>>2]=0.0;f[b+108>>2]=0.0;return b|0}function sk(b){b=b|0;var d=0,e=0,f=0;e=GI(5260)|0;c[e>>2]=6244;c[e+4>>2]=2;a[e+24>>0]=1;c[e+20>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+28>>2]=6716;c[e+5256>>2]=b;c[e+60>>2]=81;c[e+64>>2]=ra[c[(c[b>>2]|0)+12>>2]&127](b)|0;c[e+68>>2]=ra[c[(c[b>>2]|0)+8>>2]&127](b)|0;b=0;do{d=0;do{f=c[e+5256>>2]|0;c[e+72+(b*144|0)+(d<<2)>>2]=va[c[(c[f>>2]|0)+16>>2]&63](f,b,d)|0;d=d+1|0}while(d>>>0<36);b=b+1|0}while(b>>>0<36);return e|0}function tk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];c[b+52>>2]=c[a+52>>2];return 20610}function uk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=ea;ea=ea+32|0;if(!(+f[a+344>>2]!=0.0)){ea=d;return}Gn(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);if(!(NJ(a+544|0)|0)){ea=d;return}wp(d,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[a+348>>2],+f[a+352>>2],+f[a+356>>2]);Ko(d+16|0,+f[c>>2],+f[c+4>>2],+f[c+8>>2],+f[d>>2],+f[d+4>>2],+f[d+8>>2]);Hn(a,+f[d+16>>2],+f[d+16+4>>2],+f[d+16+8>>2]);ea=d;return}function vk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];c[b+52>>2]=c[a+52>>2];return 20154}function wk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];c[b+52>>2]=c[a+68>>2];return 19063}function xk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;a[b+53>>0]=1;do if((c[b+4>>2]|0)==(e|0)){a[b+52>>0]=1;e=c[b+16>>2]|0;if(!e){c[b+16>>2]=d;c[b+24>>2]=f;c[b+36>>2]=1;if(!((f|0)==1?(c[b+48>>2]|0)==1:0))break;a[b+54>>0]=1;break}if((e|0)!=(d|0)){c[b+36>>2]=(c[b+36>>2]|0)+1;a[b+54>>0]=1;break}e=c[b+24>>2]|0;if((e|0)==2){c[b+24>>2]=f;e=f}if((e|0)==1?(c[b+48>>2]|0)==1:0)a[b+54>>0]=1}while(0);return}function yk(a,b,d){a=a|0;b=+b;d=d|0;var e=0,g=0.0,h=0.0,i=0.0,j=0,k=0;e=ea;ea=ea+16|0;j=c[a+52>>2]|0;k=c[a+28+(((j+2|0)%3|0)<<2)>>2]|0;c[e>>2]=k;c[e+4>>2]=k;c[e+8>>2]=k;f[e+12>>2]=0.0;f[e+(j<<2)>>2]=+f[a+28+(j<<2)>>2]+ +f[e+(j<<2)>>2];h=(+f[e>>2]+.03999999910593033)*2.0;g=(+f[e+4>>2]+.03999999910593033)*2.0;i=(+f[e+8>>2]+.03999999910593033)*2.0;f[d>>2]=b*.0833333283662796*(g*g+i*i);f[d+4>>2]=b*.0833333283662796*(h*h+i*i);f[d+8>>2]=b*.0833333283662796*(h*h+g*g);ea=e;return}function zk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0;if((d|0)<=0)return;m=0;do{j=+f[a+32>>2];e=+f[a+28>>2];g=b+(m<<4)|0;h=+f[b+(m<<4)+4>>2];k=+f[b+(m<<4)+8>>2];l=+s(+(h*h+k*k));if(l!=0.0){i=+f[g>>2]<0.0?-e:e;h=h*(j/l);e=k*(j/l)}else{i=+f[g>>2]<0.0?-e:e;h=j;e=0.0}f[c+(m<<4)>>2]=i;f[c+(m<<4)+4>>2]=h;f[c+(m<<4)+8>>2]=e;m=m+1|0}while((m|0)!=(d|0));return}function Ak(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0;if((d|0)<=0)return;l=0;do{h=+f[a+28>>2];e=+f[a+36>>2];g=+f[b+(l<<4)>>2];i=+f[b+(l<<4)+4>>2];j=+s(+(g*g+i*i));if(j!=0.0){k=+f[b+(l<<4)+8>>2]<0.0?-e:e;g=g*(h/j);e=i*(h/j)}else{k=+f[b+(l<<4)+8>>2]<0.0?-e:e;g=h;e=0.0}f[c+(l<<4)>>2]=g;f[c+(l<<4)+4>>2]=e;f[c+(l<<4)+8>>2]=k;l=l+1|0}while((l|0)!=(d|0));return}function Bk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;j=c[b>>2]|0;if(!e)e=c[a+188>>2]|0;h=c[a+268>>2]|0;if((h|0)<=0)return;i=c[a+276>>2]|0;f=0;while(1){g=i+(f<<2)|0;if((c[g>>2]|0)==(j|0))break;f=f+1|0;if((f|0)>=(h|0)){k=9;break}}if((k|0)==9)return;if((f|0)>=(h|0))return;c[g>>2]=c[i+(h+-1<<2)>>2];c[a+268>>2]=h+-1;k=c[a+284>>2]|0;wa[c[(c[k>>2]|0)+12>>2]&31](k,e,b,d)|0;return}function Ck(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0;if((d|0)<=0)return;l=0;do{h=+f[a+28>>2];e=+f[a+32>>2];g=+f[b+(l<<4)>>2];i=+f[b+(l<<4)+8>>2];j=+s(+(g*g+i*i));if(j!=0.0){k=+f[b+(l<<4)+4>>2]<0.0?-e:e;g=g*(h/j);e=i*(h/j)}else{k=+f[b+(l<<4)+4>>2]<0.0?-e:e;g=h;e=0.0}f[c+(l<<4)>>2]=g;f[c+(l<<4)+4>>2]=k;f[c+(l<<4)+8>>2]=e;l=l+1|0}while((l|0)!=(d|0));return}function Dk(b,d){b=b|0;d=d|0;var e=0;e=Gs()|0;c[e+8>>2]=0;c[e+12>>2]=1065353216;c[e+16>>2]=1065353216;c[e+20>>2]=1065353216;f[e+24>>2]=0.0;f[e+44>>2]=.03999999910593033;c[e+52>>2]=0;c[e+56>>2]=1065353216;c[e+60>>2]=1065353216;c[e+64>>2]=1065353216;f[e+68>>2]=0.0;c[e+72>>2]=-1082130432;c[e+76>>2]=-1082130432;c[e+80>>2]=-1082130432;f[e+84>>2]=0.0;a[e+88>>0]=0;c[e>>2]=9004;c[e+92>>2]=b;c[e+4>>2]=3;if(!d)return e|0;Bi(e);return e|0}function Ek(a,b){a=a|0;b=b|0;var d=0,e=0,g=0;e=ea;ea=ea+32|0;d=c[a+216>>2]|0;if(+f[d+4>>2]==0.0){a=0;ea=e;return a|0}b=c[b>>2]|0;if(!(ta[c[(c[d>>2]|0)+8>>2]&31](d,c[b+188>>2]|0)|0)){a=1;ea=e;return a|0}g=c[b+192>>2]|0;d=c[a+216>>2]|0;c[e>>2]=0;c[e+4>>2]=g;c[e+8>>2]=b;c[e+12>>2]=b+4;c[e+16>>2]=-1;c[e+20>>2]=-1;Nb(a+68|0,a+132|0,e,d);a=1;ea=e;return a|0}function Fk(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;i=gs()|0;Ed(i,b,d,e,g,h);c[i>>2]=5548;c[i+4>>2]=9;a[i+1309>>0]=0;a[i+1309+1>>0]=0;a[i+1309+2>>0]=0;a[i+1309+3>>0]=0;a[i+1309+4>>0]=0;a[i+1309+5>>0]=0;e=i+1316|0;g=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[i+1364>>2]=1.0;f[i+1368>>2]=1.0;f[i+1372>>2]=1.0;f[i+1376>>2]=1.0;f[i+1380>>2]=1.0;f[i+1384>>2]=1.0;return i|0}function Gk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+28>>2]=c[a+28>>2];c[b+32>>2]=c[a+32>>2];c[b+36>>2]=c[a+36>>2];c[b+40>>2]=c[a+40>>2];c[b+12>>2]=c[a+12>>2];c[b+16>>2]=c[a+16>>2];c[b+20>>2]=c[a+20>>2];c[b+24>>2]=c[a+24>>2];c[b+44>>2]=c[a+44>>2];return 13704}function Hk(b,d){b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;a[b+171>>0]=1;c[b+60>>2]=c[d>>2];c[b+60+4>>2]=c[d+4>>2];c[b+60+8>>2]=c[d+8>>2];c[b+60+12>>2]=c[d+12>>2];e=+f[b+60>>2];g=+f[b+64>>2];i=+f[b+68>>2];h=1.0/+s(+(e*e+g*g+i*i));if(+s(+(i*h*(i*h)+(e*h*(e*h)+g*h*(g*h))))<1.1920928955078125e-07){j=0.0;g=0.0;e=0.0;d=0}else{j=e*h;g=g*h;e=i*h;d=c[b+72>>2]|0}f[b+76>>2]=j;f[b+80>>2]=g;f[b+84>>2]=e;c[b+88>>2]=d;return}function Ik(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];c[b+12>>2]=c[a+68>>2];c[b+16>>2]=c[a+72>>2];c[b+20>>2]=c[a+76>>2];c[b+24>>2]=c[a+80>>2];c[b+28>>2]=c[a+48>>2];c[b+32>>2]=c[a+52>>2];c[b+36>>2]=c[a+56>>2];c[b+40>>2]=c[a+60>>2];c[b+44>>2]=c[a+64>>2];return 19816}function Jk(){var b=0,d=0.0,e=0.0;b=ea;ea=ea+16|0;if((a[24944]|0)==0?DC(24944)|0:0){c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;sf(25640,0.0,0,0,b);PB(24944)}c[6461]=c[6461]|1;f[6496]=0.0;d=+f[6506]*0.0;e=+f[6507]*0.0;f[6501]=+f[6505]*0.0;f[6502]=d;f[6503]=e;f[6504]=0.0;c[6509]=0;c[6510]=0;c[6511]=0;c[6512]=0;e=+f[6498]*0.0;d=+f[6499]*0.0;f[6550]=+f[6497]*0.0;f[6551]=e;f[6552]=d;f[6553]=0.0;ea=b;return}function Kk(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0.0,h=0,i=0,j=0;j=c[a+68>>2]|0;i=c[a+64>>2]|0;h=c[a+72>>2]|0;e=+f[a+60>>2]*(+f[b+(j<<2)>>2]/+f[a+12+(j<<2)>>2]);f[a+60>>2]=e;g=+f[a+56>>2]*((+f[b+(i<<2)>>2]/+f[a+12+(i<<2)>>2]+ +f[b+(h<<2)>>2]/+f[a+12+(h<<2)>>2])*.5);f[a+56>>2]=g;f[a+52>>2]=g/+s(+(e*e+g*g));g=+r(+(+f[b>>2]));e=+r(+(+f[b+4>>2]));d=+r(+(+f[b+8>>2]));f[a+12>>2]=g;f[a+16>>2]=e;f[a+20>>2]=d;f[a+24>>2]=0.0;return}function Lk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+48|0;c[f+32>>2]=10252;c[f+32+4>>2]=e;c[f>>2]=c[b>>2];c[f+4>>2]=c[b+4>>2];c[f+8>>2]=c[b+8>>2];c[f+12>>2]=c[b+12>>2];c[f+16>>2]=c[d>>2];c[f+16+4>>2]=c[d+4>>2];c[f+16+8>>2]=c[d+8>>2];c[f+16+12>>2]=c[d+12>>2];Zd(c[a+4>>2]|0,f,f+32|0);Zd(c[a+64>>2]|0,f,f+32|0);ea=f;return}function Mk(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0,g=0.0,h=0.0,i=0.0;e=ea;ea=ea+48|0;g=+DJ(b);h=+DJ(c);i=+DJ(d);b=+CJ(b);c=+CJ(c);d=+CJ(d);f[e+32>>2]=h*i;f[e+28>>2]=c*(b*i)-g*d;f[e+24>>2]=c*(g*i)+b*d;f[e+20>>2]=h*d;f[e+16>>2]=c*(b*d)+g*i;f[e+12>>2]=c*(g*d)-b*i;f[e+8>>2]=-c;f[e+4>>2]=h*b;f[e>>2]=h*g;Oo(a,e+32|0,e+28|0,e+24|0,e+20|0,e+16|0,e+12|0,e+8|0,e+4|0,e);ea=e;return}function Nk(b,d){b=b|0;d=+d;var e=0,g=0.0,h=0;d=1.0/+f[(c[b+116>>2]|0)+344>>2];if((c[b+136>>2]|0)<=0)return;h=0;do{e=c[b+144>>2]|0;if(!(a[e+(h*284|0)+84>>0]|0))g=0.0;else{g=+f[e+(h*284|0)+272>>2];g=d*(+f[e+(h*284|0)+216>>2]*(+f[e+(h*284|0)+204>>2]-+f[e+(h*284|0)+32>>2])*+f[e+(h*284|0)+268>>2]-g*+f[(g<0.0?e+(h*284|0)+220|0:e+(h*284|0)+224|0)>>2]);g=g<0.0?0.0:g}f[e+(h*284|0)+276>>2]=g;h=h+1|0}while((h|0)<(c[b+136>>2]|0));return}function Ok(a,d,f,g,h,i){a=a|0;d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0;j=c[a+108>>2]|0;if(j|0){Va[c[(c[j>>2]|0)+24>>2]&7](j,d,f,g,h,i);return}j=b[a+56>>1]|0;if(!(j<<16>>16))return;h=1;d=1;do{i=c[a+68>>2]|0;if(b[i+(h<<2)>>1]&1){ta[c[(c[g>>2]|0)+8>>2]&31](g,(c[a+60>>2]|0)+((e[i+(h<<2)+2>>1]|0)<<6)|0)|0;j=b[a+56>>1]|0}d=d+1<<16>>16;h=d&65535}while(((j&65535)<<1|1)>>>0>h>>>0);return}function Pk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,80)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=6620;a[b+8>>0]=1;c[b+12>>2]=6668;c[b+60>>2]=d;c[b+64>>2]=0;c[b+16>>2]=f;c[b+20>>2]=e;d=va[c[(c[d>>2]|0)+12>>2]&63](d,c[f+8>>2]|0,c[e+8>>2]|0)|0;c[b+76>>2]=d;f=c[b+60>>2]|0;Ia[c[(c[f>>2]|0)+20>>2]&127](f,d);return b|0}function Qk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,h=0.0,i=0.0;e=+f[a+28>>2];i=+f[a+32>>2];h=+f[a+36>>2];switch(d|0){case 0:{a=0;d=0;g=1065353216;break}case 1:{a=0;d=0;g=-1082130432;break}case 2:{a=0;d=1065353216;g=0;e=i;break}case 3:{a=0;d=-1082130432;g=0;e=i;break}case 4:{a=1065353216;d=0;g=0;e=h;break}case 5:{a=-1082130432;d=0;g=0;e=h;break}default:return}c[b>>2]=g;c[b+4>>2]=d;c[b+8>>2]=a;f[b+12>>2]=-e;return}function Rk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,80)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=6620;a[b+8>>0]=0;c[b+12>>2]=6668;c[b+60>>2]=d;c[b+64>>2]=0;c[b+16>>2]=e;c[b+20>>2]=f;d=va[c[(c[d>>2]|0)+12>>2]&63](d,c[e+8>>2]|0,c[f+8>>2]|0)|0;c[b+76>>2]=d;f=c[b+60>>2]|0;Ia[c[(c[f>>2]|0)+20>>2]&127](f,d);return b|0}function Sk(b){b=b|0;var d=0;c[b>>2]=7784;d=c[b+120>>2]|0;if(d|0){if(a[b+124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+120>>2]=0}a[b+124>>0]=1;c[b+120>>2]=0;c[b+112>>2]=0;c[b+116>>2]=0;d=c[b+100>>2]|0;if(!d){a[b+104>>0]=1;c[b+100>>2]=0;c[b+92>>2]=0;b=b+96|0;c[b>>2]=0;return}if(a[b+104>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+100>>2]=0;a[b+104>>0]=1;c[b+100>>2]=0;c[b+92>>2]=0;b=b+96|0;c[b>>2]=0;return}function Tk(b){b=b|0;var d=0;c[b>>2]=6200;d=c[b+284>>2]|0;Ca[c[c[d>>2]>>2]&511](d);d=c[b+284>>2]|0;if(d|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b>>2]=6156;d=c[b+276>>2]|0;if(!d){a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;d=b+272|0;c[d>>2]=0;c[b>>2]=6120;return}if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+276>>2]=0;a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;d=b+272|0;c[d>>2]=0;c[b>>2]=6120;return}function Uk(a){a=a|0;var b=0,d=0,e=0,g=0.0,h=0.0;e=c[a+232>>2]|0;if((e|0)<=0)return;a=c[a+240>>2]|0;d=0;do{b=c[a+(d<<2)>>2]|0;switch(c[b+216>>2]|0){case 2:case 5:break;default:if(!(c[b+204>>2]&3)){h=+f[b+368>>2]*+f[b+352>>2];g=+f[b+372>>2]*+f[b+356>>2];f[b+412>>2]=+f[b+364>>2]*+f[b+348>>2]+ +f[b+412>>2];f[b+416>>2]=h+ +f[b+416>>2];f[b+420>>2]=g+ +f[b+420>>2]}}d=d+1|0}while((d|0)!=(e|0));return}function Vk(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0;c=ea;ea=ea+16|0;l=+f[a+12>>2];i=+f[(NJ(b)|0)>>2];j=+f[a>>2];k=+f[b+12>>2];h=+f[a+4>>2];d=+f[(rJ(b)|0)>>2];e=+f[a+8>>2];g=+f[(sJ(b)|0)>>2];f[c+12>>2]=l*i+j*k+h*d-e*g;f[c+8>>2]=l*g+h*k+e*i-j*d;f[c+4>>2]=l*d+e*k+j*g-h*i;f[c>>2]=l*k-j*i-h*g-e*d;zr(a,c+12|0,c+8|0,c+4|0,c);ea=c;return a|0}function Wk(b){b=b|0;var d=0;d=Gs()|0;c[d+8>>2]=0;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;c[d+52>>2]=0;c[d+56>>2]=1065353216;c[d+60>>2]=1065353216;c[d+64>>2]=1065353216;f[d+68>>2]=0.0;c[d+72>>2]=-1082130432;c[d+76>>2]=-1082130432;c[d+80>>2]=-1082130432;f[d+84>>2]=0.0;a[d+88>>0]=0;c[d>>2]=9004;c[d+92>>2]=b;c[d+4>>2]=3;Bi(d);return d|0}function Xk(a,b){a=a|0;b=+b;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0;h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);e=+ha[c[(c[a>>2]|0)+48>>2]&15](a);i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);h=h+ +f[a+28>>2];e=e+ +f[a+32>>2];i=i+ +f[a+36>>2];f[a+44>>2]=b;g=+ha[c[(c[a>>2]|0)+48>>2]&15](a);d=+ha[c[(c[a>>2]|0)+48>>2]&15](a);b=i-+ha[c[(c[a>>2]|0)+48>>2]&15](a);f[a+28>>2]=h-g;f[a+32>>2]=e-d;f[a+36>>2]=b;f[a+40>>2]=0.0;return}function Yk(b,d,e){b=b|0;d=d|0;e=e|0;var g=0;g=gs()|0;gd(g,b,d,e);c[g>>2]=5548;c[g+4>>2]=9;a[g+1309>>0]=0;a[g+1309+1>>0]=0;a[g+1309+2>>0]=0;a[g+1309+3>>0]=0;a[g+1309+4>>0]=0;a[g+1309+5>>0]=0;e=g+1316|0;b=e+48|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(b|0));f[g+1364>>2]=1.0;f[g+1368>>2]=1.0;f[g+1372>>2]=1.0;f[g+1376>>2]=1.0;f[g+1380>>2]=1.0;f[g+1384>>2]=1.0;return g|0}function Zk(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;g=(a[b+16>>0]|0)==0;h=c[(g?d:e)+8>>2]|0;e=g?e:d;g=c[e+8>>2]|0;b=c[h+268>>2]|0;a:do if((b|0)>0){d=c[h+276>>2]|0;f=0;while(1){if((c[d+(f<<2)>>2]|0)==(g|0))break;f=f+1|0;if((f|0)>=(b|0))break a}if((f|0)!=(b|0))return}while(0);d=c[h+284>>2]|0;Ma[c[(c[d>>2]|0)+36>>2]&127](d,h,e);return}function _k(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,16)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=6688;a[b+8>>0]=0;c[b+12>>2]=0;if(!(va[c[(c[d>>2]|0)+24>>2]&63](d,c[e+8>>2]|0,c[f+8>>2]|0)|0))return b|0;d=c[b+4>>2]|0;c[b+12>>2]=va[c[(c[d>>2]|0)+12>>2]&63](d,c[e+8>>2]|0,c[f+8>>2]|0)|0;a[b+8>>0]=1;return b|0}function $k(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0;i=+ha[c[(c[a>>2]|0)+48>>2]&15](a);h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);g=+ha[c[(c[a>>2]|0)+48>>2]&15](a);k=+f[b+52>>2]-h;j=+f[b+56>>2]-g;f[d>>2]=+f[b+48>>2]-i;f[d+4>>2]=k;f[d+8>>2]=j;f[d+12>>2]=0.0;h=h+ +f[b+52>>2];g=g+ +f[b+56>>2];f[e>>2]=i+ +f[b+48>>2];f[e+4>>2]=h;f[e+8>>2]=g;f[e+12>>2]=0.0;return}function al(b,d){b=b|0;d=d|0;var e=0;a[b+148>>0]=0;a:do if(Zc(b,d)|0){e=0;while(1){a[b+148>>0]=1;if(e>>>0>3)break a;if(Zc(b,d)|0)e=e+1|0;else break}}while(0);e=(c[b+8>>2]|0)+52|0;c[b+92>>2]=c[e>>2];c[b+92+4>>2]=c[e+4>>2];c[b+92+8>>2]=c[e+8>>2];c[b+92+12>>2]=c[e+12>>2];mp(b+112|0,e|0,16)|0;return}function bl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;g=c[a+720>>2]|0;h=c[a+732>>2]|0;if((h|0)<=0){d=0;return d|0}a=c[a+740>>2]|0;f=0;while(1){e=c[a+(f*52|0)+8>>2]|0;if((e|0)==(g+(b*104|0)|0)?(c[a+(f*52|0)+12>>2]|0)==(g+(d*104|0)|0):0){a=1;e=8;break}if((e|0)==(g+(d*104|0)|0)?(c[a+(f*52|0)+12>>2]|0)==(g+(b*104|0)|0):0){a=1;e=8;break}f=f+1|0;if((f|0)>=(h|0)){a=0;e=8;break}}if((e|0)==8)return a|0;return 0}function cl(a){a=a|0;var b=0,d=0,e=0.0,g=0.0;if((c[a+136>>2]|0)<=0)return;b=0;do{d=c[a+144>>2]|0;c[d+(b*284|0)+32>>2]=c[d+(b*284|0)+204>>2];f[d+(b*284|0)+272>>2]=0.0;g=-+f[d+(b*284|0)+56>>2];e=-+f[d+(b*284|0)+60>>2];f[d+(b*284|0)>>2]=-+f[d+(b*284|0)+52>>2];f[d+(b*284|0)+4>>2]=g;f[d+(b*284|0)+8>>2]=e;f[d+(b*284|0)+12>>2]=0.0;f[d+(b*284|0)+268>>2]=1.0;b=b+1|0}while((b|0)<(c[a+136>>2]|0));return}function dl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;j=+f[d>>2];i=+f[d+4>>2];e=+f[d+8>>2];g=j*+f[b+56>>2]+i*+f[b+60>>2]+e*+f[b+64>>2];h=j*+f[b+72>>2]+i*+f[b+76>>2]+e*+f[b+80>>2];e=j*+f[b+88>>2]+i*+f[b+92>>2]+e*+f[b+96>>2];b=b+56+((g>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];return}function el(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=c[d>>2]|0;g=ta[c[(c[g>>2]|0)+56>>2]&31](g,20)|0;h=c[d+4>>2]|0;b=a[b+4>>0]|0;d=c[d>>2]|0;c[g+4>>2]=d;c[g>>2]=7116;a[g+8>>0]=0;c[g+12>>2]=h;a[g+16>>0]=b;if(h|0)return g|0;c[g+12>>2]=va[c[(c[d>>2]|0)+12>>2]&63](d,c[e+8>>2]|0,c[f+8>>2]|0)|0;a[g+8>>0]=1;return g|0}function fl(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,44)|0;c[b+4>>2]=c[d>>2];c[b>>2]=7276;a[b+24>>0]=1;c[b+20>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;a[b+28>>0]=1;c[b+32>>2]=c[d+4>>2];a[b+36>>0]=0;c[b+40>>2]=c[(c[f+4>>2]|0)+68>>2];mg(b,e,f);return b|0}function gl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0,h=0.0,i=0.0,j=0.0,k=0.0;k=+f[a+28>>2];i=+f[a+32>>2];e=+f[a+36>>2];j=+ha[c[(c[a>>2]|0)+48>>2]&15](a);h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);e=e+ +ha[c[(c[a>>2]|0)+48>>2]&15](a);g=(1?b>>>1:b)&1;a=(2?b>>>2:b)&1;f[d>>2]=(k+j)*+(b&1^1|0)-(k+j)*+(b&1|0);f[d+4>>2]=(i+h)*+(g^1|0)-(i+h)*+(g|0);f[d+8>>2]=e*+(a^1|0)-e*+(a|0);f[d+12>>2]=0.0;return}function hl(a,b,d){a=a|0;b=+b;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;i=+f[a+28>>2];g=+f[a+32>>2];j=+f[a+36>>2];h=+ha[c[(c[a>>2]|0)+48>>2]&15](a);e=+ha[c[(c[a>>2]|0)+48>>2]&15](a);j=(j+ +ha[c[(c[a>>2]|0)+48>>2]&15](a))*2.0;f[d>>2]=b/12.0*((g+e)*2.0*((g+e)*2.0)+j*j);f[d+4>>2]=b/12.0*((i+h)*2.0*((i+h)*2.0)+j*j);f[d+8>>2]=b/12.0*((i+h)*2.0*((i+h)*2.0)+(g+e)*2.0*((g+e)*2.0));f[d+12>>2]=0.0;return}function il(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,44)|0;c[b+4>>2]=c[d>>2];c[b>>2]=7276;a[b+24>>0]=1;c[b+20>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;a[b+28>>0]=0;c[b+32>>2]=c[d+4>>2];a[b+36>>0]=0;c[b+40>>2]=c[(c[e+4>>2]|0)+68>>2];mg(b,e,f);return b|0}function jl(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+48|0;c[f>>2]=8240;c[f+4>>2]=b;c[f+8>>2]=c[d>>2];c[f+8+4>>2]=c[d+4>>2];c[f+8+8>>2]=c[d+8>>2];c[f+8+12>>2]=c[d+12>>2];c[f+24>>2]=c[e>>2];c[f+24+4>>2]=c[e+4>>2];c[f+24+8>>2]=c[e+8>>2];c[f+24+12>>2]=c[e+12>>2];a=c[a+48>>2]|0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,f,d,e);ea=f;return}function kl(a,b,d){a=a|0;b=b|0;d=d|0;ht(a);c[a>>2]=3616;CF(a+20|0);c[a+40>>2]=c[b>>2];c[a+40+4>>2]=c[b+4>>2];c[a+40+8>>2]=c[b+8>>2];c[a+40+12>>2]=c[b+12>>2];c[a+56>>2]=c[d>>2];c[a+56+4>>2]=c[d+4>>2];c[a+56+8>>2]=c[d+8>>2];c[a+56+12>>2]=c[d+12>>2];CF(a+72|0);CF(a+92|0);CF(a+112|0);return}function ll(a,b){a=a|0;b=+b;var d=0,e=0.0,g=0.0,h=0.0,i=0.0;d=Ds()|0;c[d+4>>2]=35;c[d+8>>2]=0;f[d+12>>2]=0.0;c[d>>2]=8260;i=+f[a>>2];h=+f[a+4>>2];g=+f[a+8>>2];a=c[a+12>>2]|0;e=1.0/+s(+(i*i+h*h+g*g));f[d+48>>2]=i*e;f[d+52>>2]=h*e;f[d+56>>2]=g*e;c[d+60>>2]=a;f[d+64>>2]=b;c[d+68>>2]=0;c[d+68+4>>2]=0;c[d+68+8>>2]=0;c[d+68+12>>2]=0;c[d+4>>2]=28;return d|0}function ml(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;f=c[d>>2]|0;f=ta[c[(c[f>>2]|0)+56>>2]&31](f,36)|0;g=c[d+4>>2]|0;i=c[b+12>>2]|0;h=c[b+8>>2]|0;e=c[b+16>>2]|0;b=c[b+20>>2]|0;c[f+4>>2]=c[d>>2];c[f>>2]=7164;c[f+8>>2]=i;c[f+12>>2]=h;a[f+16>>0]=0;c[f+20>>2]=g;a[f+24>>0]=0;c[f+28>>2]=e;c[f+32>>2]=b;return f|0}function nl(b){b=b|0;var d=0;c[b>>2]=7784;d=c[b+120>>2]|0;if(d|0){if(a[b+124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+120>>2]=0}a[b+124>>0]=1;c[b+120>>2]=0;c[b+112>>2]=0;c[b+116>>2]=0;d=c[b+100>>2]|0;if(d|0){if(a[b+104>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+100>>2]=0}a[b+104>>0]=1;c[b+100>>2]=0;c[b+92>>2]=0;c[b+96>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function ol(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=ea;ea=ea+32|0;Gp(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);wp(d,+f[b>>2],+f[b+4>>2],+f[b+8>>2],+f[a+348>>2],+f[a+352>>2],+f[a+356>>2]);Ko(d+16|0,+f[c>>2],+f[c+4>>2],+f[c+8>>2],+f[d>>2],+f[d+4>>2],+f[d+8>>2]);Lp(a,+f[d+16>>2],+f[d+16+4>>2],+f[d+16+8>>2]);ea=d;return}function pl(a,b){a=a|0;b=b|0;var d=0;d=ea;ea=ea+64|0;c[d>>2]=1065353216;c[d+4>>2]=0;c[d+4+4>>2]=0;c[d+4+8>>2]=0;c[d+4+12>>2]=0;c[d+20>>2]=1065353216;c[d+24>>2]=0;c[d+24+4>>2]=0;c[d+24+8>>2]=0;c[d+24+12>>2]=0;c[d+40>>2]=1065353216;c[d+44>>2]=0;c[d+48>>2]=c[b>>2];c[d+48+4>>2]=c[b+4>>2];c[d+48+8>>2]=c[b+8>>2];c[d+48+12>>2]=c[b+12>>2];Ic(a,d);ea=d;return}function ql(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;var g=0,h=0;g=ea;ea=ea+16|0;h=wH(b,0)|0;f[g+8>>2]=+yy(+f[h>>2],+f[h+4>>2],+f[h+8>>2],c,d,e);h=wH(b,1)|0;f[g+4>>2]=+yy(+f[h>>2],+f[h+4>>2],+f[h+8>>2],c,d,e);b=wH(b,2)|0;f[g>>2]=+yy(+f[b>>2],+f[b+4>>2],+f[b+8>>2],c,d,e);qs(a,g+8|0,g+4|0,g);ea=g;return}function rl(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;if(c>>>0>0|(c|0)==0&b>>>0>4294967295)do{e=b;b=GB(b|0,c|0,10,0)|0;f=c;c=D()|0;g=Yr(b|0,c|0,-10,-1)|0;g=Lv(e|0,f|0,g|0,D()|0)|0;D()|0;d=d+-1|0;a[d>>0]=g&255|48}while(f>>>0>9|(f|0)==9&e>>>0>4294967295);if(b)do{g=b;b=(b>>>0)/10|0;d=d+-1|0;a[d>>0]=g+(z(b,-10)|0)|48}while(g>>>0>=10);return d|0}function sl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;if((d|0)==0?1:(c[d+236>>2]&2|0)==0){d=1;return d|0}g=c[b+488>>2]|0;if((g|0)<=0){d=1;return d|0}b=c[b+496>>2]|0;f=0;while(1){e=c[b+(f<<2)>>2]|0;if(a[e+20>>0]|0){if((c[e+28>>2]|0)==(d|0)){b=0;e=8;break}if((c[e+32>>2]|0)==(d|0)){b=0;e=8;break}}f=f+1|0;if((f|0)>=(g|0)){b=1;e=8;break}}if((e|0)==8)return b|0;return 0}function tl(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;var g=0,h=0,i=0,j=0;g=ea;ea=ea+16|0;j=wH(b,0)|0;i=wH(b,1)|0;h=wH(b,2)|0;fm(g,c,d,e,+f[j>>2],+f[j+4>>2],+f[j+8>>2],+f[i>>2],+f[i+4>>2],+f[i+8>>2],+f[h>>2],+f[h+4>>2],+f[h+8>>2]);vp(a,+f[g>>2],+f[g+4>>2],+f[g+8>>2],+f[b+48>>2],+f[b+52>>2],+f[b+56>>2]);ea=g;return}function ul(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;i=+f[b+28>>2];j=+f[b+32>>2];e=+f[b+36>>2];h=+ha[c[(c[b>>2]|0)+48>>2]&15](b);g=+ha[c[(c[b>>2]|0)+48>>2]&15](b);e=e+ +ha[c[(c[b>>2]|0)+48>>2]&15](b);g=+f[d+4>>2]>=0.0?j+g:-(j+g);e=+f[d+8>>2]>=0.0?e:-e;f[a>>2]=+f[d>>2]>=0.0?i+h:-(i+h);f[a+4>>2]=g;f[a+8>>2]=e;f[a+12>>2]=0.0;return}function vl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0.0,h=0.0,i=0.0;if((d|0)<=0)return;e=0;do{i=+f[a+28>>2];h=+f[a+32>>2];h=+f[b+(e<<4)+4>>2]>=0.0?h:-h;g=+f[a+36>>2];g=+f[b+(e<<4)+8>>2]>=0.0?g:-g;f[c+(e<<4)>>2]=+f[b+(e<<4)>>2]>=0.0?i:-i;f[c+(e<<4)+4>>2]=h;f[c+(e<<4)+8>>2]=g;f[c+(e<<4)+12>>2]=0.0;e=e+1|0}while((e|0)!=(d|0));return}function wl(b){b=b|0;var d=0,e=0;c[b>>2]=7404;d=c[b+64>>2]|0;if(d|0?(th(d),e=c[b+64>>2]|0,e|0):0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}d=c[b+24>>2]|0;if(!d){a[b+28>>0]=1;c[b+24>>2]=0;c[b+16>>2]=0;b=b+20|0;c[b>>2]=0;return}if(a[b+28>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+24>>2]=0;a[b+28>>0]=1;c[b+24>>2]=0;c[b+16>>2]=0;b=b+20|0;c[b>>2]=0;return}function xl(a,b,d,e,f,g,h,i,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;a=c[a+32>>2]|0;c[d>>2]=c[a+(k<<5)+12>>2];c[b>>2]=c[a+(k<<5)+16>>2];c[e>>2]=c[a+(k<<5)+28>>2];c[f>>2]=c[a+(k<<5)+20>>2];c[i>>2]=c[a+(k<<5)>>2];c[g>>2]=c[a+(k<<5)+4>>2];c[h>>2]=c[a+(k<<5)+8>>2];c[j>>2]=c[a+(k<<5)+24>>2];return}function yl(b){b=b|0;var d=0,e=0;c[b>>2]=8568;d=c[b+104>>2]|0;if(d|0){if(a[b+108>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+104>>2]=0}a[b+108>>0]=1;c[b+104>>2]=0;c[b+96>>2]=0;c[b+100>>2]=0;c[b>>2]=8336;d=c[b+52>>2]|0;if(d|0?(Ca[c[c[d>>2]>>2]&511](d),e=c[b+52>>2]|0,e|0):0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function zl(a,b){a=+a;b=+b;var d=0;d=_s()|0;c[d+8>>2]=0;c[d>>2]=8468;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;f[d+56>>2]=a;f[d+60>>2]=b;c[d+4>>2]=11;f[d+52>>2]=a/+s(+(a*a+b*b));c[d>>2]=7584;c[d+64>>2]=0;c[d+68>>2]=2;c[d+72>>2]=1;f[d+28>>2]=a;f[d+36>>2]=b;f[d+32>>2]=a;return d|0}function Al(a,b){a=+a;b=+b;var d=0;d=_s()|0;c[d+8>>2]=0;c[d>>2]=8468;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;f[d+56>>2]=a;f[d+60>>2]=b;c[d+4>>2]=11;f[d+52>>2]=a/+s(+(a*a+b*b));c[d>>2]=7684;c[d+64>>2]=1;c[d+68>>2]=0;c[d+72>>2]=2;f[d+32>>2]=a;f[d+28>>2]=b;f[d+36>>2]=a;return d|0}function Bl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;switch(b|0){case 0:{b=0;a=0;e=1065353216;break}case 1:{b=0;a=0;e=-1082130432;break}case 2:{b=0;a=1065353216;e=0;break}case 3:{b=0;a=-1082130432;e=0;break}case 4:{b=1065353216;a=0;e=0;break}case 5:{b=-1082130432;a=0;e=0;break}default:return}c[d>>2]=e;c[d+4>>2]=a;c[d+8>>2]=b;f[d+12>>2]=0.0;return}function Cl(a,b){a=+a;b=b|0;var d=0,e=0,f=0;g[h>>3]=a;d=c[h>>2]|0;e=c[h+4>>2]|0;f=Ft(d|0,e|0,52)|0;D()|0;switch(f&2047){case 0:{if(a!=0.0){a=+Cl(a*18446744073709551616.0,b);d=(c[b>>2]|0)+-64|0}else d=0;c[b>>2]=d;break}case 2047:break;default:{c[b>>2]=(f&2047)+-1022;c[h>>2]=d;c[h+4>>2]=e&-2146435073|1071644672;a=+g[h>>3]}}return +a}function Dl(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;c[b+4>>2]=c[d>>2];c[b+4+4>>2]=c[d+4>>2];c[b+4+8>>2]=c[d+8>>2];c[b+4+12>>2]=c[d+12>>2];c[b+20>>2]=c[e>>2];c[b+20+4>>2]=c[e+4>>2];c[b+20+8>>2]=c[e+8>>2];c[b+20+12>>2]=c[e+12>>2];f[b+36>>2]=g;a[b+40>>0]=1;return}function El(a,e,g){a=a|0;e=e|0;g=g|0;var h=0.0;switch(c[a+96>>2]|0){case 0:{h=+f[(c[a+92>>2]|0)+((z(c[a+64>>2]|0,g)|0)+e<<2)>>2];return +h}case 5:{h=+(d[(c[a+92>>2]|0)+((z(c[a+64>>2]|0,g)|0)+e)>>0]|0)*+f[a+88>>2];return +h}case 3:{h=+(b[(c[a+92>>2]|0)+((z(c[a+64>>2]|0,g)|0)+e<<1)>>1]|0)*+f[a+88>>2];return +h}default:{h=0.0;return +h}}return 0.0}function Fl(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];c[a+16>>2]=c[b+16>>2];c[a+20>>2]=c[b+20>>2];c[a+24>>2]=c[b+24>>2];$l(a+28|0,b+28|0);c[a+76>>2]=c[b+76>>2];c[a+76+4>>2]=c[b+76+4>>2];c[a+76+8>>2]=c[b+76+8>>2];c[a+76+12>>2]=c[b+76+12>>2];c[a+76+16>>2]=c[b+76+16>>2];return}function Gl(){var b=0;b=ea;ea=ea+48|0;if(a[24888]|0){ea=b;return}if(!(DC(24888)|0)){ea=b;return}f[b+32>>2]=1.0;f[b+28>>2]=0.0;f[b+24>>2]=0.0;f[b+20>>2]=0.0;f[b+16>>2]=1.0;f[b+12>>2]=0.0;f[b+8>>2]=0.0;f[b+4>>2]=0.0;f[b>>2]=1.0;bq(25392,b+32|0,b+28|0,b+24|0,b+20|0,b+16|0,b+12|0,b+8|0,b+4|0,b);PB(24888);ea=b;return}function Hl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((c[a+8>>2]|0)<=0)return;e=0;do{f=c[a+16>>2]|0;g=f+(e<<4)|0;if(ta[c[(c[b>>2]|0)+8>>2]&31](b,g)|0){wa[c[(c[a>>2]|0)+12>>2]&31](a,c[g>>2]|0,c[f+(e<<4)+4>>2]|0,d)|0;c[6723]=(c[6723]|0)+-1}else e=e+1|0}while((e|0)<(c[a+8>>2]|0));return}function Il(a,b){a=a|0;b=b|0;var c=0.0,d=0;d=ea;ea=ea+32|0;c=+f[b+12>>2];if(1.0-c*c<1.1920928955078125e-06){f[d+20>>2]=1.0;f[d+16>>2]=0.0;f[d+12>>2]=0.0;qs(a,d+20|0,d+16|0,d+12|0);ea=d;return}else{c=1.0/+AJ(1.0-c*c);f[d+8>>2]=+f[b>>2]*c;f[d+4>>2]=+f[b+4>>2]*c;f[d>>2]=+f[b+8>>2]*c;qs(a,d+8|0,d+4|0,d);ea=d;return}}function Jl(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;d=ea;ea=ea+16|0;c[d>>2]=10288;c[d+4>>2]=e;rd(a+4|0,c[a+4>>2]|0,b,e+4|0,e+20|0,+f[e+32>>2],g,h,d);rd(a+64|0,c[a+64>>2]|0,b,e+4|0,e+20|0,+f[e+32>>2],g,h,d);ea=d;return}function Kl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;f=NJ(c[a+4>>2]|0)|0;if((f|0)>(b|0)){e=b;while(1){if((e|0)>=(f|0))break;QH((c[a+12>>2]|0)+(e*36|0)|0);e=e+1|0}c[a+4>>2]=b;return}if((f|0)<(b|0))Gm(a,b);e=f;while(1){if((e|0)>=(b|0))break;Cq((c[a+12>>2]|0)+(e*36|0)|0,d);e=e+1|0}c[a+4>>2]=b;return}function Ll(b){b=b|0;var d=0;c[b>>2]=8568;d=c[b+104>>2]|0;if(d|0){if(a[b+108>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+104>>2]=0}a[b+108>>0]=1;c[b+104>>2]=0;c[b+96>>2]=0;c[b+100>>2]=0;c[b>>2]=8336;d=c[b+52>>2]|0;if(!d)return;Ca[c[c[d>>2]>>2]&511](d);d=c[b+52>>2]|0;if(!d)return;c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);return}function Ml(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=NJ(c[a+4>>2]|0)|0;if((e|0)>(b|0)){c[a+4>>2]=b;return}if((e|0)<(b|0))Qn(a,b);while(1){if((e|0)>=(b|0))break;f=NJ((c[a+12>>2]|0)+(e<<4)|0)|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];c[f+8>>2]=c[d+8>>2];c[f+12>>2]=c[d+12>>2];e=e+1|0}c[a+4>>2]=b;return}function Nl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=NJ(c[a+4>>2]|0)|0;if((e|0)>(b|0)){c[a+4>>2]=b;return}if((e|0)<(b|0))un(a,b);while(1){if((e|0)>=(b|0))break;f=(c[a+12>>2]|0)+(e*104|0)|0;g=d;h=f+104|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));e=e+1|0}c[a+4>>2]=b;return}function Ol(a,b){a=+a;b=+b;var d=0;d=_s()|0;c[d+8>>2]=0;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;c[d>>2]=7484;f[d+56>>2]=a;f[d+60>>2]=b;c[d+4>>2]=11;c[d+64>>2]=0;c[d+68>>2]=1;c[d+72>>2]=2;f[d+28>>2]=a;f[d+32>>2]=b;f[d+36>>2]=a;f[d+52>>2]=a/+s(+(a*a+b*b));return d|0}function Pl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0;e=ea;ea=ea+16|0;c[e>>2]=-1;c[e+4>>2]=c[a+16>>2];if(!(c[b+4>>2]|0))c[b+4>>2]=e;g=c[a+12>>2]|0;f=+ka[c[(c[g>>2]|0)+12>>2]&15](g,b,d);c[a+4>>2]=c[(c[a+12>>2]|0)+4>>2];ea=e;return +f}function Ql(a,b){a=a|0;b=b|0;var d=0;d=ea;ea=ea+16|0;c[a+348>>2]=c[b>>2];c[a+348+4>>2]=c[b+4>>2];c[a+348+8>>2]=c[b+8>>2];c[a+348+12>>2]=c[b+12>>2];_p(d,+f[a+348>>2],+f[a+352>>2],+f[a+356>>2],+f[a+344>>2]);c[a+560>>2]=c[d>>2];c[a+560+4>>2]=c[d+4>>2];c[a+560+8>>2]=c[d+8>>2];c[a+560+12>>2]=c[d+12>>2];ea=d;return}function Rl(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;g=c[a+268>>2]|0;if((g|0)<=0)return;b=c[b>>2]|0;f=c[a+276>>2]|0;d=0;while(1){e=f+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(g|0)){h=7;break}}if((h|0)==7)return;if((d|0)>=(g|0))return;c[e>>2]=c[f+(g+-1<<2)>>2];c[a+268>>2]=g+-1;return}function Sl(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0,g=0.0,h=0.0,i=0.0;e=ea;ea=ea+16|0;g=+DJ(b*.5);b=+CJ(b*.5);h=+DJ(c*.5);c=+CJ(c*.5);i=+DJ(d*.5);d=+CJ(d*.5);f[e+12>>2]=d*h*g-i*c*b;f[e+8>>2]=i*c*g+d*h*b;f[e+4>>2]=i*h*b-d*c*g;f[e>>2]=i*h*g+d*c*b;zr(a,e+12|0,e+8|0,e+4|0,e);ea=e;return}function Tl(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+4>>2]|0;e=NJ(d)|0;if((e|0)==(NJ(c[a+8>>2]|0)|0)){Qn(a,LF(e)|0);d=c[a+4>>2]|0}e=NJ((c[a+12>>2]|0)+(d<<4)|0)|0;c[e>>2]=c[b>>2];c[e+4>>2]=c[b+4>>2];c[e+8>>2]=c[b+8>>2];c[e+12>>2]=c[b+12>>2];c[a+4>>2]=(c[a+4>>2]|0)+1;return}function Ul(a,b,d,e,g,h){a=a|0;b=b|0;d=d|0;e=e|0;g=g|0;h=+h;c[a>>2]=b;c[a+4>>2]=d;c[a+8>>2]=c[e>>2];c[a+8+4>>2]=c[e+4>>2];c[a+8+8>>2]=c[e+8>>2];c[a+8+12>>2]=c[e+12>>2];c[a+24>>2]=c[g>>2];c[a+24+4>>2]=c[g+4>>2];c[a+24+8>>2]=c[g+8>>2];c[a+24+12>>2]=c[g+12>>2];f[a+40>>2]=h;return}function Vl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;f=c[a+280>>2]|0;if((f|0)<=0)return;g=c[a+288>>2]|0;d=0;while(1){e=g+(d<<2)|0;if((c[e>>2]|0)==(b|0))break;d=d+1|0;if((d|0)>=(f|0)){h=7;break}}if((h|0)==7)return;if((d|0)>=(f|0))return;c[e>>2]=c[g+(f+-1<<2)>>2];c[(c[a+288>>2]|0)+(f+-1<<2)>>2]=b;c[a+280>>2]=f+-1;return}function Wl(a){a=a|0;var b=0;b=ea;ea=ea+32|0;f[a>>2]=1.2000000476837158;f[a+4>>2]=0.0;f[a+8>>2]=0.0;f[a+12>>2]=1.0e3;f[b+20>>2]=0.0;f[b+16>>2]=0.0;f[b+12>>2]=0.0;qs(a+16|0,b+20|0,b+16|0,b+12|0);c[a+32>>2]=0;c[a+36>>2]=0;f[b+8>>2]=0.0;f[b+4>>2]=-10.0;f[b>>2]=0.0;qs(a+40|0,b+8|0,b+4|0,b);RH(a+56|0);ea=b;return}function Xl(a,b){a=a|0;b=b|0;var d=0,e=0,g=0;e=c[a+712>>2]|0;if((e|0)<=0)return;a=c[a+720>>2]|0;d=0;do{if(+f[a+(d*104|0)+88>>2]>0.0){g=a+(d*104|0)+56|0;f[g>>2]=+f[b>>2]+ +f[g>>2];g=a+(d*104|0)+60|0;f[g>>2]=+f[b+4>>2]+ +f[g>>2];g=a+(d*104|0)+64|0;f[g>>2]=+f[b+8>>2]+ +f[g>>2]}d=d+1|0}while((d|0)!=(e|0));return}function Yl(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0.0;d=ea;ea=ea+16|0;e=+VA(+f[b>>2],+f[b+4>>2],+f[b+8>>2]);e=+CJ(c*.5)/e;f[d+12>>2]=+f[(NJ(b)|0)>>2]*e;f[d+8>>2]=+f[(sJ(b)|0)>>2]*e;f[d+4>>2]=+f[(rJ(b)|0)>>2]*e;f[d>>2]=+DJ(c*.5);zr(a,d+12|0,d+8|0,d+4|0,d);ea=d;return}function Zl(){var b=0,e=0,f=0;f=ea;ea=ea+16|0;a[f>>0]=10;b=c[832]|0;if(!b)if(!(ho(3312)|0)){b=c[832]|0;e=4}else b=-1;else e=4;do if((e|0)==4){e=c[833]|0;if(!(e>>>0>=b>>>0|(a[3387]|0)==10)){c[833]=e+1;a[e>>0]=10;b=10;break}if((va[c[3348>>2]&63](3312,f,1)|0)==1)b=d[f>>0]|0;else b=-1}while(0);ea=f;return b|0}function _l(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0;e=ea;ea=ea+16|0;c[e>>2]=-1;c[e+4>>2]=c[a+24>>2];if(!(c[b+4>>2]|0))c[b+4>>2]=e;g=c[a+20>>2]|0;f=+ka[c[(c[g>>2]|0)+12>>2]&15](g,b,d);c[a+4>>2]=c[(c[a+20>>2]|0)+4>>2];ea=e;return +f}function $l(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];c[a+16>>2]=c[b+16>>2];c[a+16+4>>2]=c[b+16+4>>2];c[a+16+8>>2]=c[b+16+8>>2];c[a+16+12>>2]=c[b+16+12>>2];c[a+32>>2]=c[b+32>>2];c[a+32+4>>2]=c[b+32+4>>2];c[a+32+8>>2]=c[b+32+8>>2];c[a+32+12>>2]=c[b+32+12>>2];return}function am(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0;a:do switch(b|0){case 2:case 1:{if(c>>>0<3){d=+f[a+600>>2];break a}if((c+-3|0)>>>0<3)d=+f[a+432>>2];else d=0.0;break}case 4:case 3:{if(c>>>0<3){d=+f[a+596>>2];break a}if((c+-3|0)>>>0<3)d=+f[a+604>>2];else d=0.0;break}default:d=0.0}while(0);return +d}function bm(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;b=c[d>>2]|0;b=ta[c[(c[b>>2]|0)+56>>2]&31](b,16)|0;d=c[d>>2]|0;c[b+4>>2]=d;c[b>>2]=10568;a[b+8>>0]=0;c[b+12>>2]=0;c[b+12>>2]=va[c[(c[d>>2]|0)+12>>2]&63](d,c[e+8>>2]|0,c[f+8>>2]|0)|0;a[b+8>>0]=1;return b|0}function cm(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+56>>2]|0;if(!d)return;e=ra[c[(c[d>>2]|0)+8>>2]&127](d)|0;e=va[c[(c[b>>2]|0)+16>>2]&63](b,e,1)|0;d=c[a+56>>2]|0;d=va[c[(c[d>>2]|0)+12>>2]&63](d,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,d,1346456916,c[a+56>>2]|0);return}function dm(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;switch(b|0){case 2:case 1:if(e>>>0<3){f[a+600>>2]=d;c[a+592>>2]=c[a+592>>2]|2;return}else{f[a+432>>2]=d;return}case 4:case 3:if(e>>>0<3){f[a+596>>2]=d;c[a+592>>2]=c[a+592>>2]|1;return}else{f[a+604>>2]=d;c[a+592>>2]=c[a+592>>2]|4;return}default:return}}function em(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+52>>2]|0;if(!d)return;e=ra[c[(c[d>>2]|0)+12>>2]&127](d)|0;e=va[c[(c[b>>2]|0)+16>>2]&63](b,e,1)|0;d=c[a+52>>2]|0;d=va[c[(c[d>>2]|0)+16>>2]&63](d,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,d,1213612625,c[a+52>>2]|0);return}function fm(a,b,c,d,e,g,h,i,j,k,l,m,n){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;i=+i;j=+j;k=+k;l=+l;m=+m;n=+n;var o=0;o=ea;ea=ea+16|0;f[o+8>>2]=+yy(b,c,d,e,g,h);f[o+4>>2]=+yy(b,c,d,i,j,k);f[o>>2]=+yy(b,c,d,l,m,n);qs(a,o+8|0,o+4|0,o);ea=o;return}function gm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;j=+f[b+28>>2];d=+f[b+36>>2];e=+f[c>>2];h=+f[c+4>>2];i=+s(+(e*e+h*h));if(i!=0.0){g=+f[c+8>>2]<0.0?-d:d;e=e*(j/i);d=h*(j/i)}else{g=+f[c+8>>2]<0.0?-d:d;e=j;d=0.0}f[a>>2]=e;f[a+8>>2]=g;f[a+4>>2]=d;return}function hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;j=+f[b+28>>2];d=+f[b+32>>2];e=+f[c>>2];h=+f[c+8>>2];i=+s(+(e*e+h*h));if(i!=0.0){g=+f[c+4>>2]<0.0?-d:d;e=e*(j/i);d=h*(j/i)}else{g=+f[c+4>>2]<0.0?-d:d;e=j;d=0.0}f[a>>2]=e;f[a+4>>2]=g;f[a+8>>2]=d;return}function im(a,b,c){a=a|0;b=b|0;c=+c;var d=0.0,e=0.0,g=0.0,h=0.0;e=+f[a+28>>2];g=+f[a+32>>2];h=+f[a+36>>2];d=+f[b>>2];if(!(d<=e+c)){b=0;return b|0}if(!(d>=-e-c)){b=0;return b|0}d=+f[b+4>>2];if(!(d<=g+c)){b=0;return b|0}if(!(d>=-g-c)){b=0;return b|0}d=+f[b+8>>2];if(!(d<=h+c)){b=0;return b|0}b=d>=-h-c;return b|0}function jm(a,b,d){a=a|0;b=b|0;d=d|0;Uv(a);c[a>>2]=3568;c[a+12>>2]=c[b>>2];c[a+12+4>>2]=c[b+4>>2];c[a+12+8>>2]=c[b+8>>2];c[a+12+12>>2]=c[b+12>>2];c[a+28>>2]=c[d>>2];c[a+28+4>>2]=c[d+4>>2];c[a+28+8>>2]=c[d+8>>2];c[a+28+12>>2]=c[d+12>>2];c[a+76>>2]=0;return}function km(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0,h=0.0,i=0.0,j=0.0;j=+f[b+32>>2];d=+f[b+28>>2];e=+f[c+4>>2];h=+f[c+8>>2];i=+s(+(e*e+h*h));if(i!=0.0){g=+f[c>>2]<0.0?-d:d;e=e*(j/i);d=h*(j/i)}else{g=+f[c>>2]<0.0?-d:d;e=j;d=0.0}f[a+4>>2]=e;f[a>>2]=g;f[a+8>>2]=d;return}function lm(b,d,e,g){b=b|0;d=d|0;e=e|0;g=+g;if(!(+f[b+36>>2]>g))return;a[b+40>>0]=1;c[b+4>>2]=c[d>>2];c[b+4+4>>2]=c[d+4>>2];c[b+4+8>>2]=c[d+8>>2];c[b+4+12>>2]=c[d+12>>2];c[b+20>>2]=c[e>>2];c[b+20+4>>2]=c[e+4>>2];c[b+20+8>>2]=c[e+8>>2];c[b+20+12>>2]=c[e+12>>2];f[b+36>>2]=g;return}function mm(a,b){a=a|0;b=+b;var c=0,d=0.0;c=ea;ea=ea+16|0;if(!(+f[a+68>>2]>0.0)){ea=c;return}d=-+f[a+92>>2];b=-+f[a+96>>2];f[c>>2]=-+f[a+88>>2];f[c+4>>2]=d;f[c+8>>2]=b;f[c+12>>2]=0.0;oi(a+4|0,c,a+164|0);oi(a+16|0,a+88|0,a+180|0);ea=c;return}function nm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;a=c[b+748>>2]|0;if((a|0)<=0){c[b+748>>2]=0;return}f=0;do{e=b+4+(f*184|0)+112|0;d=c[e>>2]|0;if((d|0)!=0?(g=c[6719]|0,(g|0)!=0):0){ra[g&127](d)|0;c[e>>2]=0;a=c[b+748>>2]|0}f=f+1|0}while((f|0)<(a|0));c[b+748>>2]=0;return}function om(a){a=a|0;var b=0.0,d=0.0,e=0.0;d=+f[(c[a+28>>2]|0)+344>>2];e=+f[(c[a+32>>2]|0)+344>>2];e=e==0.0?1.0:d/(d+e);d=+f[a+1116>>2]*e+(1.0-e)*+f[a+1180>>2];b=e*+f[a+1120>>2]+(1.0-e)*+f[a+1184>>2];f[a+1284>>2]=+f[a+1112>>2]*e+ +f[a+1176>>2]*(1.0-e);f[a+1288>>2]=d;f[a+1292>>2]=b;f[a+1296>>2]=0.0;return}function pm(a,b){a=a|0;b=b|0;var d=0.0,e=0.0,g=0.0;d=+f[a+344>>2];if(d!=0.0){g=1.0/d*+f[b+4>>2];e=1.0/d*+f[b+8>>2];f[a+364>>2]=1.0/d*+f[b>>2];f[a+368>>2]=g;f[a+372>>2]=e;f[a+376>>2]=0.0}c[a+380>>2]=c[b>>2];c[a+380+4>>2]=c[b+4>>2];c[a+380+8>>2]=c[b+8>>2];c[a+380+12>>2]=c[b+12>>2];return}function qm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=c[b+16>>2]|0;do if(f){if((f|0)!=(d|0)){c[b+36>>2]=(c[b+36>>2]|0)+1;c[b+24>>2]=2;a[b+54>>0]=1;break}if((c[b+24>>2]|0)==2)c[b+24>>2]=e}else{c[b+16>>2]=d;c[b+24>>2]=e;c[b+36>>2]=1}while(0);return}function rm(a,d){a=a|0;d=d|0;var e=0,f=0;e=c[d>>2]|0;f=c[a+80>>2]|0;if((e|0)==(f|0)){a=0;return a|0}if(!((b[a+10>>1]&b[d+4>>1])<<16>>16)){a=0;return a|0}if(!((b[d+6>>1]&b[a+8>>1])<<16>>16)){a=0;return a|0}a=c[a+92>>2]|0;a=va[c[(c[a>>2]|0)+28>>2]&63](a,f,e)|0;return a|0}function sm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;f=c[a+8>>2]|0;a=c[f+8>>2]|0;if((a|0)<=0)return;e=0;do{d=c[(c[f+16>>2]|0)+(e*12|0)+8>>2]|0;if(d){Ia[c[(c[d>>2]|0)+16>>2]&127](d,b);a=c[f+8>>2]|0}e=e+1|0}while((e|0)<(a|0));return}function tm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+32|0;c[f+8>>2]=c[a+60>>2];c[f+8+4>>2]=d;c[f+8+8>>2]=b;c[f+8+12>>2]=f;c[f+8+16>>2]=e;if((eI(L(140,f+8|0)|0)|0)<0){c[f>>2]=-1;c[f+4>>2]=-1;b=-1;d=-1}else{b=c[f+4>>2]|0;d=c[f>>2]|0}C(b|0);ea=f;return d|0}function um(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;switch(e|0){case 5:case -1:break;default:return}switch(b|0){case 2:{f[a+760>>2]=d;c[a+748>>2]=c[a+748>>2]|2;return}case 4:{f[a+756>>2]=d;c[a+748>>2]=c[a+748>>2]|1;return}case 3:{f[a+752>>2]=d;c[a+748>>2]=c[a+748>>2]|4;return}default:return}}function vm(a,b,d){a=a|0;b=b|0;d=d|0;ht(a);c[a>>2]=3788;c[a+20>>2]=c[b>>2];c[a+20+4>>2]=c[b+4>>2];c[a+20+8>>2]=c[b+8>>2];c[a+20+12>>2]=c[b+12>>2];c[a+36>>2]=c[d>>2];c[a+36+4>>2]=c[d+4>>2];c[a+36+8>>2]=c[d+8>>2];c[a+36+12>>2]=c[d+12>>2];return}function wm(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+256|0;if((c|0)>(d|0)&(e&73728|0)==0){hk(f|0,b<<24>>24|0,((c-d|0)>>>0<256?c-d|0:256)|0)|0;if((c-d|0)>>>0>255){b=c-d|0;do{AA(a,f,256);b=b+-256|0}while(b>>>0>255);b=c-d&255}else b=c-d|0;AA(a,f,b)}ea=f;return}function xm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=c[d>>2]|0;a=Ux(c[b>>2]|0)|0;f=Ux(f)|0;if(a|0)Pa[c[(c[a>>2]|0)+32>>2]&127](a,d,e,b);if(!f)return 0;Pa[c[(c[f>>2]|0)+32>>2]&127](f,b,e,d);return 0}function ym(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ea;ea=ea+48|0;f=c[b+192>>2]|0;Pa[c[(c[f>>2]|0)+8>>2]&127](f,b+4|0,e+32|0,e+16|0);c[e>>2]=7068;c[e+4>>2]=b;c[e+8>>2]=a;c[e+12>>2]=d;a=c[a+68>>2]|0;Pa[c[(c[a>>2]|0)+28>>2]&127](a,e+32|0,e+16|0,e);ea=e;return}function zm(){var b=0,d=0,e=0;do if((c[847]|0)>=0?(RJ()|0)!=0:0){if((a[3387]|0)!=10?(d=c[833]|0,d>>>0<(c[832]|0)>>>0):0){c[833]=d+1;a[d>>0]=10;break}Zl()|0}else e=3;while(0);do if((e|0)==3){if((a[3387]|0)!=10?(b=c[833]|0,b>>>0<(c[832]|0)>>>0):0){c[833]=b+1;a[b>>0]=10;break}Zl()|0}while(0);return}function Am(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=ea;ea=ea+112|0;d=NJ(c[b+4>>2]|0)|0;e=f;g=e+104|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));lH(f);Nl(a,d,f);Tn(b,d,c[a+12>>2]|0);ea=f;return}function Bm(a,b,d){a=a|0;b=b|0;d=d|0;a:do switch(c[b+216>>2]|0){case 2:case 5:{switch(c[d+216>>2]|0){case 2:case 5:{b=0;break}default:break a}return b|0}default:{}}while(0);if(c[b+256>>2]|0?!(ta[c[c[b>>2]>>2]&31](b,d)|0):0){a=0;return a|0}a=1;return a|0}function Cm(a,b,d){a=a|0;b=b|0;d=d|0;ch(a,b,d)|0;c[b+52>>2]=c[a+300>>2];c[b+56>>2]=c[a+304>>2];c[b+60>>2]=c[a+308>>2];c[b+64>>2]=c[a+312>>2];c[b+68>>2]=c[a+316>>2];c[b+72>>2]=c[a+320>>2];c[b+76>>2]=c[a+324>>2];c[b+80>>2]=c[a+328>>2];return 15193}function Dm(a){a=a|0;c[6272]=c[a>>2];c[6273]=c[a+4>>2];c[6274]=c[a+8>>2];c[6275]=c[a+12>>2];c[6276]=c[a+16>>2];c[6277]=c[a+20>>2];c[6278]=c[a+24>>2];$l(25116,a+28|0);c[6291]=c[a+76>>2];c[6292]=c[a+76+4>>2];c[6293]=c[a+76+8>>2];c[6294]=c[a+76+12>>2];c[6295]=c[a+76+16>>2];return}function Em(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0;e=ea;ea=ea+16|0;c=+cG(a);c=+AJ(c*+cG(b));d=+Ho(a,b);if(d<0.0){Un(e,b);d=+jB(+Ho(a,e)/c);d=d*2.0;ea=e;return +d}else{d=+jB(d/c);d=d*2.0;ea=e;return +d}return 0.0}function Fm(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;j=NJ(b)|0;i=NJ(b+16|0)|0;h=NJ(b+32|0)|0;g=sJ(b)|0;f=sJ(b+16|0)|0;e=sJ(b+32|0)|0;d=rJ(b)|0;c=rJ(b+16|0)|0;bq(a,j,i,h,g,f,e,d,c,rJ(b+32|0)|0);return}function Gm(b,d){b=b|0;d=d|0;var e=0;if((NJ(c[b+8>>2]|0)|0)>=(d|0))return;e=Hu(d)|0;Vq(b,NJ(c[b+4>>2]|0)|0,e);es(b,NJ(c[b+4>>2]|0)|0);Us(b);a[b+16>>0]=1;c[b+12>>2]=e;c[b+8>>2]=d;return}function Hm(a,b){a=a|0;b=b|0;var d=0;if(c[b+40>>2]|0){Hm(a,c[b+36>>2]|0);Hm(a,c[b+40>>2]|0)}if((c[a>>2]|0)==(b|0))c[a>>2]=0;d=c[a+4>>2]|0;if(!d){c[a+4>>2]=b;return}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);c[a+4>>2]=b;return}function Im(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;g=c[a+32>>2]|0;c[g>>2]=(c[g>>2]|0)+1;Jf(a,Lc(a,b,f)|0);Jf(a,Lc(a,d,f)|0);Jf(a,Lc(a,e,f)|0);return}function Jm(a){a=a|0;var b=0;b=ea;ea=ea+48|0;f[b+32>>2]=1.0;f[b+28>>2]=0.0;f[b+24>>2]=0.0;f[b+20>>2]=0.0;f[b+16>>2]=1.0;f[b+12>>2]=0.0;f[b+8>>2]=0.0;f[b+4>>2]=0.0;f[b>>2]=1.0;Oo(a,b+32|0,b+28|0,b+24|0,b+20|0,b+16|0,b+12|0,b+8|0,b+4|0,b);ea=b;return}function Km(a,b){a=a|0;b=b|0;var d=0,e=0;c[a+68>>2]=(c[a+68>>2]|0)+1;d=c[a+16>>2]|0;if((d|0)>0)do{e=d;d=d+-1|0;if((c[(c[a+24>>2]|0)+(d*80|0)+64>>2]|0)==(b|0))od(a,d)}while((e|0)>1);Ca[c[(c[a>>2]|0)+68>>2]&511](a);return}function Lm(a,b){a=+a;b=+b;var d=0;d=ct()|0;c[d+8>>2]=0;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;c[d+4>>2]=10;c[d>>2]=8904;c[d+52>>2]=2;f[d+28>>2]=a;f[d+32>>2]=a;f[d+36>>2]=b*.5;f[d+40>>2]=0.0;return d|0}function Mm(a,b){a=+a;b=+b;var d=0;d=ct()|0;c[d+8>>2]=0;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;c[d+4>>2]=10;c[d>>2]=8804;c[d+52>>2]=0;f[d+28>>2]=b*.5;f[d+32>>2]=a;f[d+36>>2]=a;f[d+40>>2]=0.0;return d|0}function Nm(a,b){a=+a;b=+b;var d=0;d=ct()|0;c[d+8>>2]=0;c[d+12>>2]=1065353216;c[d+16>>2]=1065353216;c[d+20>>2]=1065353216;f[d+24>>2]=0.0;f[d+44>>2]=.03999999910593033;c[d>>2]=8704;c[d+4>>2]=10;c[d+52>>2]=1;f[d+28>>2]=a;f[d+32>>2]=b*.5;f[d+36>>2]=a;f[d+40>>2]=0.0;return d|0}function Om(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0;a:do switch(c|0){case 5:case -1:switch(b|0){case 2:{d=+f[a+760>>2];break a}case 4:{d=+f[a+756>>2];break a}case 3:{d=+f[a+752>>2];break a}default:{d=0.0;break a}}default:d=0.0}while(0);return +d}function Pm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+16|0;c[f>>2]=a;c[f+4>>2]=e;a=c[a+72+((c[(c[b+4>>2]|0)+4>>2]|0)*144|0)+(c[(c[d+4>>2]|0)+4>>2]<<2)>>2]|0;a=wa[c[(c[a>>2]|0)+8>>2]&31](a,f,b,d)|0;ea=f;return a|0}function Qm(a,b,c){a=a|0;b=+b;c=c|0;var d=0.0,e=0.0,g=0.0;e=(+f[a+68>>2]-+f[a+52>>2])*.5*2.0;d=(+f[a+72>>2]-+f[a+56>>2])*.5*2.0;g=(+f[a+76>>2]-+f[a+60>>2])*.5*2.0;f[c>>2]=b/12.0*(d*d+g*g);f[c+4>>2]=b/12.0*(e*e+g*g);f[c+8>>2]=b/12.0*(e*e+d*d);f[c+12>>2]=0.0;return}function Rm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=NJ(c[a+4>>2]|0)|0;if((e|0)>(b|0)){c[a+4>>2]=b;return}if((e|0)<(b|0))on(a,b);while(1){if((e|0)>=(b|0))break;Fl((c[a+12>>2]|0)+(e*96|0)|0,d);e=e+1|0}c[a+4>>2]=b;return}function Sm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=ea;ea=ea+48|0;d=NJ(c[b+4>>2]|0)|0;e=f;g=e+36|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));RH(f);Kl(a,d,f);QH(f);Vq(b,d,c[a+12>>2]|0);ea=f;return}function Tm(a,b){a=a|0;b=b|0;var d=0;a=c[a+64>>2]|0;if(!b)return;d=c[a+16>>2]|0;if(d>>>0<=b>>>0?(d+(z(c[a>>2]|0,c[a+4>>2]|0)|0)|0)>>>0>b>>>0:0){c[b>>2]=c[a+12>>2];c[a+12>>2]=b;c[a+8>>2]=(c[a+8>>2]|0)+1;return}c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Um(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;f=ea;ea=ea+96|0;d=NJ(c[b+4>>2]|0)|0;e=f;g=e+96|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(g|0));Rm(a,d,f);hq(b,d,c[a+12>>2]|0);ea=f;return}function Vm(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if(rt(a,c[b+8>>2]|0,g)|0)xk(b,d,e,f);else{a=c[a+8>>2]|0;Va[c[(c[a>>2]|0)+20>>2]&7](a,b,d,e,f,g)}return}function Wm(a){a=a|0;var b=0,d=0;if((c[a+232>>2]|0)<=0)return;b=0;do{d=(c[(c[a+240>>2]|0)+(b<<2)>>2]|0)+412|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;c[d+16>>2]=0;c[d+20>>2]=0;c[d+24>>2]=0;c[d+28>>2]=0;b=b+1|0}while((b|0)<(c[a+232>>2]|0));return}function Xm(){var b=0;b=ea;ea=ea+32|0;if(a[24880]|0){ea=b;return}if(!(DC(24880)|0)){ea=b;return}Gl();f[b+8>>2]=0.0;f[b+4>>2]=0.0;f[b>>2]=0.0;qs(b+16|0,b+8|0,b+4|0,b);fq(25328,25392,b+16|0);PB(24880);ea=b;return}function Ym(a){a=a|0;gc(a,(c[a+28>>2]|0)+4|0,(c[a+32>>2]|0)+4|0);c[a+1316>>2]=c[a+1256>>2];c[a+1320>>2]=c[a+1260>>2];c[a+1324>>2]=c[a+1264>>2];c[a+1328>>2]=c[a+1192>>2];c[a+1332>>2]=c[a+1196>>2];c[a+1336>>2]=c[a+1200>>2];return}function Zm(a,d){a=a|0;d=d|0;var f=0,g=0;if(b[a+56>>1]|0)return;b[a+64>>1]=1;d=b[a+58>>1]|0;g=c[a+60>>2]|0;if((d&65535)>1){f=1;do{d=f;f=f+1|0;b[g+(d<<6)+48>>1]=f;d=e[a+58>>1]|0}while(f>>>0>>0)}else d=d&65535;b[g+(d+-1<<6)+48>>1]=0;return}function _m(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+4>>2]|0;e=NJ(d)|0;if((e|0)==(NJ(c[a+8>>2]|0)|0)){on(a,LF(e)|0);d=c[a+4>>2]|0}Fl((c[a+12>>2]|0)+(d*96|0)|0,b);c[a+4>>2]=(c[a+4>>2]|0)+1;return}function $m(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[a+12>>2]|0;if((d|0)<=0)return;f=0;do{e=c[(c[a+20>>2]|0)+(f<<2)>>2]|0;if(e){Ia[c[(c[e>>2]|0)+16>>2]&127](e,b);d=c[a+12>>2]|0}f=f+1|0}while((f|0)<(d|0));return}function an(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;g=c[a+4>>2]|0;if(d){f=8?g>>8:g;if(g&1)f=c[(c[d>>2]|0)+f>>2]|0}else f=0;a=c[a>>2]|0;Pa[c[(c[a>>2]|0)+28>>2]&127](a,b,d+f|0,(g&2|0)==0?2:e);return}function bn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=c[a+32>>2]|0;c[f>>2]=(c[f>>2]|0)+1;Jf(a,Lc(a,b,0)|0);Jf(a,Lc(a,d,0)|0);Jf(a,Lc(a,e,0)|0);return}function cn(a,b,d){a=a|0;b=b|0;d=d|0;c[a+52>>2]=c[b>>2];c[a+52+4>>2]=c[b+4>>2];c[a+52+8>>2]=c[b+8>>2];c[a+52+12>>2]=c[b+12>>2];c[a+68>>2]=c[d>>2];c[a+68+4>>2]=c[d+4>>2];c[a+68+8>>2]=c[d+8>>2];c[a+68+12>>2]=c[d+12>>2];c[a+48>>2]=1;return}function dn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[d>>2]|0;a=Ux(c[b>>2]|0)|0;e=Ux(e)|0;if(a|0)Ma[c[(c[a>>2]|0)+28>>2]&127](a,d,b);if(!e)return 0;Ma[c[(c[e>>2]|0)+28>>2]&127](e,b,d);return 0}function en(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;e=b;f=d+104|0;do{c[d>>2]=c[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(f|0));gx(a+104|0,b+104|0);hx(a+124|0,b+124|0);hx(a+144|0,b+144|0);return}function fn(a,b,c){a=+a;b=b|0;c=c|0;var d=0,e=0;e=ea;ea=ea+32|0;d=GI(140)|0;f[e+8>>2]=0.0;f[e+4>>2]=0.0;f[e>>2]=0.0;qs(e+16|0,e+8|0,e+4|0,e);ok(d,a,b,c,e+16|0);ea=e;return d|0}function gn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[d>>2]=c[b+16>>2];c[d+4>>2]=c[b+16+4>>2];c[d+8>>2]=c[b+16+8>>2];c[d+12>>2]=c[b+16+12>>2];c[e>>2]=c[b+32>>2];c[e+4>>2]=c[b+32+4>>2];c[e+8>>2]=c[b+32+8>>2];c[e+12>>2]=c[b+32+12>>2];return}function hn(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;i=c[a+4>>2]|0;h=8?i>>8:i;if(i&1)h=c[(c[e>>2]|0)+h>>2]|0;a=c[a>>2]|0;Va[c[(c[a>>2]|0)+20>>2]&7](a,b,d,e+h|0,(i&2|0)==0?2:f,g);return}function jn(a,b){a=a|0;b=b|0;var d=0;a=c[a+64>>2]|0;d=c[a+8>>2]|0;if(d|0){b=c[a+12>>2]|0;c[a+12>>2]=c[b>>2];c[a+8>>2]=d+-1;return b|0}c[6747]=(c[6747]|0)+1;a=kb(b+19|0)|0;if(!a){b=0;return b|0}c[(a+4+15&-16)+-4>>2]=a;b=a+4+15&-16;return b|0}function kn(a,b,d){a=a|0;b=b|0;d=d|0;a=c[a+720>>2]|0;if(!(+f[a+(d*104|0)+88>>2]>0.0))return;f[a+(d*104|0)+56>>2]=+f[b>>2]+ +f[a+(d*104|0)+56>>2];f[a+(d*104|0)+60>>2]=+f[b+4>>2]+ +f[a+(d*104|0)+60>>2];f[a+(d*104|0)+64>>2]=+f[b+8>>2]+ +f[a+(d*104|0)+64>>2];return}function ln(a,b,d){a=a|0;b=+b;d=+d;var e=0;e=ea;ea=ea+16|0;f[e+12>>2]=b;f[e+8>>2]=d;f[e+4>>2]=0.0;f[e>>2]=1.0;c[a+444>>2]=c[(b<0.0?e+4|0:b>1.0?e:e+12|0)>>2];f[e+4>>2]=0.0;f[e>>2]=1.0;c[a+448>>2]=c[(d<0.0?e+4|0:d>1.0?e:e+8|0)>>2];ea=e;return}function mn(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24816]|0)==0?DC(24816)|0:0)PB(24816);to(d,c[b+116>>2]|0,c[b+128>>2]|0);c[6268]=c[d>>2];c[6269]=c[d+4>>2];c[6270]=c[d+8>>2];c[6271]=c[d+12>>2];ea=d;return 25072}function nn(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[(c[b>>2]|0)+16>>2]|0;e=ra[c[(c[a>>2]|0)+16>>2]&127](a)|0;e=va[d&63](b,e,1)|0;d=va[c[(c[a>>2]|0)+20>>2]&63](a,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,d,1497645650,a);return}function on(b,d){b=b|0;d=d|0;var e=0;if((NJ(c[b+8>>2]|0)|0)>=(d|0))return;e=qt(d)|0;hq(b,NJ(c[b+4>>2]|0)|0,e);Us(b);a[b+16>>0]=1;c[b+12>>2]=e;c[b+8>>2]=d;return}function pn(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+32|0;ql(e,NJ(a+4|0)|0,b,c,d);wp(e+16|0,+f[e>>2],+f[e+4>>2],+f[e+8>>2],+f[a+348>>2],+f[a+352>>2],+f[a+356>>2]);Lr(a+412|0,e+16|0)|0;ea=e;return}function qn(a,b,c,d,e,g){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;f[a+692>>2]=(c-b)*.5;c=((c-b)*.5+b)%6.2831854820251465;if(!(c<-3.1415927410125732)){if(c>3.1415927410125732)c=c+-6.2831854820251465}else c=c+6.2831854820251465;f[a+688>>2]=c;f[a+696>>2]=d;f[a+700>>2]=e;f[a+704>>2]=g;return}function rn(a,b,c){a=a|0;b=b|0;c=+c;var d=0;d=ea;ea=ea+16|0;f[d+12>>2]=+f[(NJ(b)|0)>>2]*c;f[d+8>>2]=+f[(sJ(b)|0)>>2]*c;f[d+4>>2]=+f[(rJ(b)|0)>>2]*c;f[d>>2]=+f[b+12>>2]*c;Cv(a,d+12|0,d+8|0,d+4|0,d);ea=d;return}function sn(a,b,d){a=a|0;b=b|0;d=d|0;c[b>>2]=c[a+52>>2];c[b+4>>2]=c[a+52+4>>2];c[b+8>>2]=c[a+52+8>>2];c[b+12>>2]=c[a+52+12>>2];c[d>>2]=c[a+68>>2];c[d+4>>2]=c[a+68+4>>2];c[d+8>>2]=c[a+68+8>>2];c[d+12>>2]=c[a+68+12>>2];return}function tn(a){a=a|0;var b=0,d=0,e=0;b=c[a+24>>2]|0;if((b|0)<=0)return;e=0;do{d=c[(c[a+32>>2]|0)+(e<<2)>>2]|0;switch(c[d+216>>2]|0){case 2:case 5:break;default:{Ef(d);b=c[a+24>>2]|0}}e=e+1|0}while((e|0)<(b|0));return}function un(b,d){b=b|0;d=d|0;var e=0;if((NJ(c[b+8>>2]|0)|0)>=(d|0))return;e=wt(d)|0;Tn(b,NJ(c[b+4>>2]|0)|0,e);Us(b);a[b+16>>0]=1;c[b+12>>2]=e;c[b+8>>2]=d;return}function vn(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+32|0;ql(e,NJ(a+4|0)|0,b,c,d);wp(e+16|0,+f[e>>2],+f[e+4>>2],+f[e+8>>2],+f[a+544>>2],+f[a+548>>2],+f[a+552>>2]);Lr(a+428|0,e+16|0)|0;ea=e;return}function wn(a,b){a=a|0;b=b|0;var d=0,e=0;e=ra[c[(c[a>>2]|0)+16>>2]&127](a)|0;e=va[c[(c[b>>2]|0)+16>>2]&63](b,e,1)|0;d=va[c[(c[a>>2]|0)+20>>2]&63](a,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,d,1245859651,a);return}function xn(a,b,d){a=a|0;b=b|0;d=d|0;c[b>>2]=c[a+8>>2];c[b+4>>2]=c[a+8+4>>2];c[b+8>>2]=c[a+8+8>>2];c[b+12>>2]=c[a+8+12>>2];c[d>>2]=c[a+24>>2];c[d+4>>2]=c[a+24+4>>2];c[d+8>>2]=c[a+24+8>>2];c[d+12>>2]=c[a+24+12>>2];return}function yn(a,b){a=a|0;b=b|0;var d=0,e=0;e=ra[c[(c[a>>2]|0)+52>>2]&127](a)|0;e=va[c[(c[b>>2]|0)+16>>2]&63](b,e,1)|0;d=va[c[(c[a>>2]|0)+56>>2]&63](a,c[e+8>>2]|0,b)|0;Ta[c[(c[b>>2]|0)+20>>2]&31](b,e,d,1346455635,a);return}function zn(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+80|0;Fm(c+32|0,b);Sq(c,+f[b+48>>2],+f[b+52>>2],+f[b+56>>2]);ql(c+16|0,c+32|0,+f[c>>2],+f[c+4>>2],+f[c+8>>2]);fq(a,c+32|0,c+16|0);ea=c;return}function An(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;h=c[a+4>>2]|0;g=8?h>>8:h;if(h&1)g=c[(c[d>>2]|0)+g>>2]|0;a=c[a>>2]|0;Ta[c[(c[a>>2]|0)+24>>2]&31](a,b,d+g|0,(h&2|0)==0?2:e,f);return}function Bn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=0;while(1){if((e|0)>=(b|0))break;f=NJ(d+(e<<4)|0)|0;g=(c[a+12>>2]|0)+(e<<4)|0;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];e=e+1|0}return}function Cn(a,b,d){a=a|0;b=b|0;d=d|0;c[a+164>>2]=c[b>>2];c[a+164+4>>2]=c[b+4>>2];c[a+164+8>>2]=c[b+8>>2];c[a+164+12>>2]=c[b+12>>2];b=NJ(b)|0;if((!(+f[b>>2]!=1.0)?!(+f[b+4>>2]!=1.0):0)?!(+f[b+8>>2]!=1.0):0)d=0;c[a+180>>2]=d;return}function Dn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(rt(a,c[b+8>>2]|0,0)|0)qm(b,d,e);else{a=c[a+8>>2]|0;Pa[c[(c[a>>2]|0)+28>>2]&127](a,b,d,e)}return}function En(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=NJ(c[a+4>>2]|0)|0;if((e|0)>(b|0)){c[a+4>>2]=b;return}if((e|0)<(b|0))co(a,b);while(1){if((e|0)>=(b|0))break;c[(c[a+12>>2]|0)+(e<<2)>>2]=c[d>>2];e=e+1|0}c[a+4>>2]=b;return}function Fn(b){b=b|0;var d=0;c[b>>2]=6156;d=c[b+276>>2]|0;if(d|0){if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+276>>2]=0}a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;c[b+272>>2]=0;c[b>>2]=6120;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Gn(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+32|0;wp(e,b,c,d,+f[a+348>>2],+f[a+352>>2],+f[a+356>>2]);_p(e+16|0,+f[e>>2],+f[e+4>>2],+f[e+8>>2],+f[a+344>>2]);Lr(a+312|0,e+16|0)|0;ea=e;return}function Hn(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+32|0;ql(e,a+264|0,b,c,d);wp(e+16|0,+f[e>>2],+f[e+4>>2],+f[e+8>>2],+f[a+544>>2],+f[a+548>>2],+f[a+552>>2]);Lr(a+328|0,e+16|0)|0;ea=e;return}function In(b){b=b|0;var d=0;c[b>>2]=5172;d=c[b+496>>2]|0;if(d|0){if(a[b+500>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+496>>2]=0}a[b+500>>0]=1;c[b+496>>2]=0;c[b+488>>2]=0;c[b+492>>2]=0;c[b>>2]=6120;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Jn(a,b,d){a=a|0;b=b|0;d=d|0;c[b>>2]=c[a+892>>2];c[b+4>>2]=c[a+892+4>>2];c[b+8>>2]=c[a+892+8>>2];c[b+12>>2]=c[a+892+12>>2];c[d>>2]=c[a+908>>2];c[d+4>>2]=c[a+908+4>>2];c[d+8>>2]=c[a+908+8>>2];c[d+12>>2]=c[a+908+12>>2];return}function Kn(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24832]|0)==0?DC(24832)|0:0)PB(24832);Ia[c[(c[b>>2]|0)+76>>2]&127](d,b);c[6296]=c[d>>2];c[6297]=c[d+4>>2];c[6298]=c[d+8>>2];c[6299]=c[d+12>>2];ea=d;return 25184}function Ln(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0;a:do if((c|0)==-1)switch(b|0){case 2:case 1:{d=+f[a+336>>2];break a}case 4:case 3:{d=+f[a+340>>2];break a}default:{d=3402823466385288598117041.0e14;break a}}else d=3402823466385288598117041.0e14;while(0);return +d}function Mn(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24792]|0)==0?DC(24792)|0:0)PB(24792);Ia[c[(c[b>>2]|0)+76>>2]&127](d,b);c[6256]=c[d>>2];c[6257]=c[d+4>>2];c[6258]=c[d+8>>2];c[6259]=c[d+12>>2];ea=d;return 25024}function Nn(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,e=0.0,g=0.0;g=+f[b+28>>2];e=+f[b+32>>2];e=+f[c+4>>2]>=0.0?e:-e;d=+f[b+36>>2];d=+f[c+8>>2]>=0.0?d:-d;f[a>>2]=+f[c>>2]>=0.0?g:-g;f[a+4>>2]=e;f[a+8>>2]=d;f[a+12>>2]=0.0;return}function On(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+4>>2]|0;e=NJ(d)|0;if((e|0)==(NJ(c[a+8>>2]|0)|0)){co(a,LF(e)|0);d=c[a+4>>2]|0}c[(c[a+12>>2]|0)+(d<<2)>>2]=c[b>>2];c[a+4>>2]=(c[a+4>>2]|0)+1;return}function Pn(b){b=b|0;var d=0;c[b>>2]=5988;d=c[b+140>>2]|0;if(d|0){if(a[b+144>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+140>>2]=0}a[b+144>>0]=1;c[b+140>>2]=0;c[b+132>>2]=0;c[b+136>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Qn(b,d){b=b|0;d=d|0;var e=0;if((NJ(c[b+8>>2]|0)|0)>=(d|0))return;e=uu(d)|0;Bn(b,NJ(c[b+4>>2]|0)|0,e);Us(b);a[b+16>>0]=1;c[b+12>>2]=e;c[b+8>>2]=d;return}function Rn(b){b=b|0;var d=0;c[b>>2]=10680;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Sn(a,b){a=a|0;b=b|0;var d=0;d=c[a+4>>2]|0;if((c[b>>2]|0)!=(d|0)?(c[b+4>>2]|0)!=(d|0):0)return 0;d=c[a+8>>2]|0;Ma[c[(c[d>>2]|0)+32>>2]&127](d,b,c[a+12>>2]|0);return 0}function Tn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=0;while(1){if((e|0)>=(b|0))break;f=d+(e*104|0)|0;g=(c[a+12>>2]|0)+(e*104|0)|0;h=f+104|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(h|0));e=e+1|0}return}function Un(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+16|0;f[c+12>>2]=-+f[(NJ(b)|0)>>2];f[c+8>>2]=-+f[(sJ(b)|0)>>2];f[c+4>>2]=-+f[(rJ(b)|0)>>2];f[c>>2]=-+f[b+12>>2];Cv(a,c+12|0,c+8|0,c+4|0,c);ea=c;return}function Vn(b,d,e){b=b|0;d=d|0;e=+e;var f=0;f=ea;ea=ea+16|0;if((a[24808]|0)==0?DC(24808)|0:0)PB(24808);mi(f,b,d,e);c[6264]=c[f>>2];c[6265]=c[f+4>>2];c[6266]=c[f+8>>2];c[6267]=c[f+12>>2];ea=f;return 25056}function Wn(b,d,e){b=b|0;d=d|0;e=+e;var f=0;f=ea;ea=ea+16|0;if((a[24784]|0)==0?DC(24784)|0:0)PB(24784);mi(f,b,d,e);c[6252]=c[f>>2];c[6253]=c[f+4>>2];c[6254]=c[f+8>>2];c[6255]=c[f+12>>2];ea=f;return 25008}function Xn(a){a=a|0;var b=0.0,d=0.0;if(c[a+204>>2]&3|0)return;d=+f[a+368>>2]*+f[a+352>>2];b=+f[a+372>>2]*+f[a+356>>2];f[a+412>>2]=+f[a+364>>2]*+f[a+348>>2]+ +f[a+412>>2];f[a+416>>2]=d+ +f[a+416>>2];f[a+420>>2]=b+ +f[a+420>>2];return}function Yn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=ta[c[(c[d>>2]|0)+40>>2]&31](d,a)|0;f=ta[c[(c[d>>2]|0)+28>>2]&31](d,e)|0;c[b>>2]=f;if(f|0)Ia[c[(c[d>>2]|0)+48>>2]&127](d,e);c[b+4>>2]=c[a+4>>2];return 19935}function Zn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,g=0.0,h=0;h=c[a+104>>2]|0;g=+f[h+(b<<4)+4>>2]*+f[a+16>>2];e=+f[h+(b<<4)+8>>2]*+f[a+20>>2];f[d>>2]=+f[h+(b<<4)>>2]*+f[a+12>>2];f[d+4>>2]=g;f[d+8>>2]=e;f[d+12>>2]=0.0;return}function _n(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;f=c[d>>2]|0;f=ta[c[(c[f>>2]|0)+56>>2]&31](f,20)|0;b=a[b+4>>0]|0;c[f+4>>2]=c[d>>2];c[f>>2]=4676;a[f+16>>0]=b;return f|0}function $n(a,b){a=a|0;b=b|0;var c=0.0;c=+f[(NJ(b)|0)>>2];f[a>>2]=+f[a>>2]+c;c=+f[(sJ(b)|0)>>2];f[a+4>>2]=+f[a+4>>2]+c;c=+f[(rJ(b)|0)>>2];f[a+8>>2]=+f[a+8>>2]+c;f[a+12>>2]=+f[a+12>>2]+ +f[b+12>>2];return a|0}function ao(a,b){a=a|0;b=b|0;var c=0.0;c=+f[(NJ(b)|0)>>2];f[a>>2]=+f[a>>2]-c;c=+f[(sJ(b)|0)>>2];f[a+4>>2]=+f[a+4>>2]-c;c=+f[(rJ(b)|0)>>2];f[a+8>>2]=+f[a+8>>2]-c;f[a+12>>2]=+f[a+12>>2]-+f[b+12>>2];return a|0}function bo(a){a=a|0;var b=0,d=0;d=V()|0;b=c[i>>2]|0;if((a|0)>0&(b+a|0)<(b|0)|(b+a|0)<0){_(b+a|0)|0;K(12);return -1}if((b+a|0)>(d|0))if(!(X(b+a|0)|0)){K(12);return -1}c[i>>2]=b+a;return b|0}function co(b,d){b=b|0;d=d|0;var e=0;if((NJ(c[b+8>>2]|0)|0)>=(d|0))return;e=kv(d)|0;wr(b,NJ(c[b+4>>2]|0)|0,e);Us(b);a[b+16>>0]=1;c[b+12>>2]=e;c[b+8>>2]=d;return}function eo(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0;e=+r(+(+f[b>>2]));d=+r(+(+f[b+4>>2]));c=+r(+(+f[b+8>>2]));f[a+12>>2]=e;f[a+16>>2]=d;f[a+20>>2]=c;f[a+24>>2]=0.0;Ci(a);return}function fo(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+f[(rJ(a)|0)>>2];c=c*+f[(NJ(b)|0)>>2];d=+f[(rJ(a+16|0)|0)>>2];d=c+d*+f[(sJ(b)|0)>>2];c=+f[(rJ(a+32|0)|0)>>2];return +(d+c*+f[(rJ(b)|0)>>2])}function go(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+f[(sJ(a)|0)>>2];c=c*+f[(NJ(b)|0)>>2];d=+f[(sJ(a+16|0)|0)>>2];d=c+d*+f[(sJ(b)|0)>>2];c=+f[(sJ(a+32|0)|0)>>2];return +(d+c*+f[(rJ(b)|0)>>2])}function ho(b){b=b|0;var d=0;d=a[b+74>>0]|0;a[b+74>>0]=d+255|d;d=c[b>>2]|0;if(!(d&8)){c[b+8>>2]=0;c[b+4>>2]=0;d=c[b+44>>2]|0;c[b+28>>2]=d;c[b+20>>2]=d;c[b+16>>2]=d+(c[b+48>>2]|0);d=0}else{c[b>>2]=d|32;d=-1}return d|0}function io(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24840]|0)==0?DC(24840)|0:0)PB(24840);GA(d,b);c[6300]=c[d>>2];c[6301]=c[d+4>>2];c[6302]=c[d+8>>2];c[6303]=c[d+12>>2];ea=d;return 25200}function jo(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24856]|0)==0?DC(24856)|0:0)PB(24856);ez(d,b);c[6320]=c[d>>2];c[6321]=c[d+4>>2];c[6322]=c[d+8>>2];c[6323]=c[d+12>>2];ea=d;return 25280}function ko(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;if((e|0)!=-1)return;switch(b|0){case 2:case 1:{f[a+336>>2]=d;c[a+332>>2]=c[a+332>>2]|1;return}case 4:case 3:{f[a+340>>2]=d;c[a+332>>2]=c[a+332>>2]|2;return}default:return}}function lo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;if((b|0)==(d|0))return;e=c[(c[a+4>>2]|0)+136>>2]|0;va[c[(c[e>>2]|0)+8>>2]&63](e,c[b+36>>2]|0,c[d+36>>2]|0)|0;a=(c[a+4>>2]|0)+160|0;c[a>>2]=(c[a>>2]|0)+1;return}function mo(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24872]|0)==0?DC(24872)|0:0)PB(24872);zp(d,b);c[6328]=c[d>>2];c[6329]=c[d+4>>2];c[6330]=c[d+8>>2];c[6331]=c[d+12>>2];ea=d;return 25312}function no(b){b=b|0;var d=0;d=ea;ea=ea+16|0;if((a[24864]|0)==0?DC(24864)|0:0)PB(24864);Il(d,b);c[6324]=c[d>>2];c[6325]=c[d+4>>2];c[6326]=c[d+8>>2];c[6327]=c[d+12>>2];ea=d;return 25296}function oo(a){a=a|0;var b=0.0,d=0,e=0.0,g=0.0;d=ea;ea=ea+32|0;Ma[c[(c[a>>2]|0)+12>>2]&127](a,d+8|0,d);g=+f[d+8>>2];e=+f[d+8+4>>2];b=+f[d+8+8>>2];b=+s(+(g*g+e*e+b*b));ea=d;return +(+f[d>>2]+b)}function po(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=ea;ea=ea+16|0;c[f>>2]=6316;c[f+4>>2]=d;c[f+8>>2]=a;Ma[c[(c[b>>2]|0)+48>>2]&127](b,f,e);ea=f;return}function qo(b,c){b=b|0;c=c|0;var d=0,e=0;d=a[b>>0]|0;e=a[c>>0]|0;if(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24))do{b=b+1|0;c=c+1|0;d=a[b>>0]|0;e=a[c>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24));return (d&255)-(e&255)|0}function ro(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=+g;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,d,f);Pa[c[(c[a>>2]|0)+8>>2]&127](a,d,e,f);Pa[c[(c[a>>2]|0)+8>>2]&127](a,e,b,f);return}function so(a,b,d){a=a|0;b=b|0;d=d|0;a=c[b+8>>2]|0;if(!((d|0)!=0&(a|0)!=0))return;Ca[c[c[a>>2]>>2]&511](a);Ia[c[(c[d>>2]|0)+60>>2]&127](d,c[b+8>>2]|0);c[b+8>>2]=0;return}function to(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;b=NJ(b+4|0)|0;e=(NJ(wH(b,0)|0)|0)+(c<<2)|0;d=(NJ(wH(b,1)|0)|0)+(c<<2)|0;qs(a,e,d,(NJ(wH(b,2)|0)|0)+(c<<2)|0);return}function uo(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+f[(NJ(a)|0)>>2];c=c*+f[(NJ(b)|0)>>2];d=+f[(NJ(a+16|0)|0)>>2];d=c+d*+f[(sJ(b)|0)>>2];c=+f[(NJ(a+32|0)|0)>>2];return +(d+c*+f[(rJ(b)|0)>>2])}function vo(b){b=b|0;var d=0;c[b>>2]=6156;d=c[b+276>>2]|0;if(d|0){if(a[b+280>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+276>>2]=0}a[b+280>>0]=1;c[b+276>>2]=0;c[b+268>>2]=0;c[b+272>>2]=0;c[b>>2]=6120;return}function wo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=ea;ea=ea+16|0;c[e>>2]=10112;c[e+4>>2]=b;c[e+8>>2]=a;c[e+12>>2]=d;Ma[c[(c[a>>2]|0)+48>>2]&127](a,e,d);ea=e;return}function xo(b){b=b|0;var d=0;c[b>>2]=7984;if(a[b+61>>0]|0?(d=c[b+52>>2]|0,Ca[c[c[d>>2]>>2]&511](d),d=c[b+52>>2]|0,d|0):0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function yo(b){b=b|0;var d=0;c[b>>2]=5172;d=c[b+496>>2]|0;if(d|0){if(a[b+500>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+496>>2]=0}a[b+500>>0]=1;c[b+496>>2]=0;c[b+488>>2]=0;c[b+492>>2]=0;c[b>>2]=6120;return}function zo(b){b=b|0;var d=0,e=0,f=0;e=c[b>>2]|0;d=a[e>>0]|0;if(!(VI(d<<24>>24)|0))d=0;else{f=d;d=0;do{d=(d*10|0)+-48+(f<<24>>24)|0;e=e+1|0;c[b>>2]=e;f=a[e>>0]|0}while((VI(f<<24>>24)|0)!=0)}return d|0}function Ao(a,b,c,d){a=+a;b=+b;c=+c;d=+d;var e=0,g=0;g=ea;ea=ea+16|0;f[g+12>>2]=a;f[g+8>>2]=b;f[g+4>>2]=c;f[g>>2]=d;e=dt()|0;fu(e,g+12|0,g+8|0,g+4|0,g);ea=g;return e|0}function Bo(a,b,c,d){a=+a;b=+b;c=+c;d=+d;var e=0,g=0;g=ea;ea=ea+16|0;f[g+12>>2]=a;f[g+8>>2]=b;f[g+4>>2]=c;f[g>>2]=d;e=GI(16)|0;Cv(e,g+12|0,g+8|0,g+4|0,g);ea=g;return e|0}function Co(a){a=a|0;var b=0.0,d=0,e=0,g=0.0;e=c[a+712>>2]|0;if((e|0)<=0){b=0.0;return +b}a=c[a+720>>2]|0;d=0;b=0.0;do{g=+f[a+(d*104|0)+88>>2];b=b+(g>0.0?1.0/g:0.0);d=d+1|0}while((d|0)!=(e|0));return +b}function Do(a){a=a|0;var b=0;c[a>>2]=6620;c[a+12>>2]=6668;b=c[a+60>>2]|0;Ia[c[(c[b>>2]|0)+20>>2]&127](b,c[a+76>>2]|0);b=c[a+60>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,c[a+76>>2]|0);LJ(a);return}function Eo(b){b=b|0;var d=0;c[b>>2]=5988;d=c[b+140>>2]|0;if(d|0){if(a[b+144>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+140>>2]=0}a[b+144>>0]=1;c[b+140>>2]=0;c[b+132>>2]=0;c[b+136>>2]=0;return}function Fo(a,b){a=a|0;b=b|0;var d=0,e=0;d=ea;ea=ea+16|0;_w(a);e=NJ(c[b+4>>2]|0)|0;c[d>>2]=0;En(a,e,d);wr(b,e,c[a+12>>2]|0);ea=d;return}function Go(a,b,d){a=a|0;b=+b;d=d|0;b=b*.4000000059604645*+ha[c[(c[a>>2]|0)+48>>2]&15](a);b=b*+ha[c[(c[a>>2]|0)+48>>2]&15](a);f[d>>2]=b;f[d+4>>2]=b;f[d+8>>2]=b;f[d+12>>2]=0.0;return}function Ho(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+f[a>>2];c=c*+f[(NJ(b)|0)>>2];d=+f[a+4>>2];d=c+d*+f[(sJ(b)|0)>>2];c=+f[a+8>>2];c=d+c*+f[(rJ(b)|0)>>2];return +(c+ +f[a+12>>2]*+f[b+12>>2])}function Io(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;if(rt(a,c[b+8>>2]|0,g)|0)xk(b,d,e,f);return}function Jo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=c[b>>2]|0;a=ta[c[(c[a>>2]|0)+56>>2]&31](a,24)|0;c[a+4>>2]=c[b>>2];c[a>>2]=5144;return a|0}function Ko(a,b,c,d,e,g,h){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;var i=0;i=ea;ea=ea+16|0;f[i+8>>2]=c*h-d*g;f[i+4>>2]=d*e-b*h;f[i>>2]=b*g-c*e;qs(a,i+8|0,i+4|0,i);ea=i;return}function Lo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[d>>2]=-581039253;c[d+4>>2]=-581039253;c[d+8>>2]=-581039253;f[d+12>>2]=0.0;c[e>>2]=1566444395;c[e+4>>2]=1566444395;c[e+8>>2]=1566444395;f[e+12>>2]=0.0;return}function Mo(b){b=b|0;var d=0;c[b>>2]=10152;if(a[b+192>>0]|0?(d=c[b+136>>2]|0,Ca[c[c[d>>2]>>2]&511](d),d=c[b+136>>2]|0,d|0):0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}th(b+64|0);th(b+4|0);return}function No(b){b=b|0;var d=0;c[b>>2]=10680;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}function Oo(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;qs(a,b,c,d);qs(a+16|0,e,f,g);qs(a+32|0,h,i,j);return}function Po(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=ea;ea=ea+64|0;Nj(d+16|0,b,c);tl(d,b,+f[c+48>>2],+f[c+52>>2],+f[c+56>>2]);fq(a,d+16|0,d);ea=d;return}function Qo(a){a=a|0;var b=0;c[a>>2]=6620;c[a+12>>2]=6668;b=c[a+60>>2]|0;Ia[c[(c[b>>2]|0)+20>>2]&127](b,c[a+76>>2]|0);b=c[a+60>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,c[a+76>>2]|0);return}function Ro(b){b=b|0;var d=0;c[b>>2]=4060;d=c[b+32>>2]|0;if(d|0){if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+32>>2]=0}a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;return}function So(a){a=a|0;var b=0,d=0;c[a>>2]=8336;b=c[a+52>>2]|0;if(b|0?(Ca[c[c[b>>2]>>2]&511](b),d=c[a+52>>2]|0,d|0):0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function To(a,b){a=a|0;b=b|0;var d=0;d=(c[a+92>>2]|0)+4|0;c[d>>2]=c[b>>2];c[d+4>>2]=c[b+4>>2];c[d+8>>2]=c[b+8>>2];c[d+12>>2]=c[b+12>>2];Bi(a);return}function Uo(b,d){b=b|0;d=d|0;var e=0;if(a[b+273>>0]|0?(e=c[b+200>>2]|0,e|0):0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}a[b+273>>0]=0;c[b+200>>2]=d;c[(c[b+196>>2]|0)+8>>2]=d;return}function Vo(b){b=b|0;var d=0;c[b>>2]=6244;d=c[b+20>>2]|0;if(d|0){if(a[b+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+20>>2]=0}a[b+24>>0]=1;c[b+20>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;return}function Wo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;a=c[b>>2]|0;a=ta[c[(c[a>>2]|0)+56>>2]&31](a,8)|0;c[a+4>>2]=c[b>>2];c[a>>2]=10540;return a|0}function Xo(a,b){a=a|0;b=+b;c[a+8>>2]=0;c[a+12>>2]=1065353216;c[a+16>>2]=1065353216;c[a+20>>2]=1065353216;f[a+24>>2]=0.0;f[a+44>>2]=.03999999910593033;c[a>>2]=7884;c[a+4>>2]=8;hH(a+28|0,b);f[a+44>>2]=b;return}function Yo(b){b=b|0;var d=0;d=Zs()|0;c[d+44>>2]=b;a[d+16>>0]=1;c[d+12>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;a[d+36>>0]=1;c[d+32>>2]=0;c[d+24>>2]=0;c[d+28>>2]=0;c[d+40>>2]=0;return d|0}function Zo(a,b){a=a|0;b=b|0;var d=0,e=0;d=ea;ea=ea+16|0;e=NJ(c[b+4>>2]|0)|0;Ml(a,e,d);Bn(b,e,c[a+12>>2]|0);ea=d;return}function _o(a,b){a=a|0;b=b|0;gc(a,(c[a+28>>2]|0)+4|0,(c[a+32>>2]|0)+4|0);c[a+1316+(b<<2)>>2]=c[((b|0)<3?a+1256+(b<<2)|0:a+1192+(b+-3<<2)|0)>>2];return}function $o(b){b=b|0;var d=0;c[b>>2]=9960;d=c[b+16>>2]|0;if(d|0){if(a[b+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[b+16>>2]=0}a[b+20>>0]=1;c[b+16>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;return}function ap(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=+e;var g=0;g=ea;ea=ea+16|0;f[g+12>>2]=b;f[g+8>>2]=c;f[g+4>>2]=d;f[g>>2]=e;zr(a,g+12|0,g+8|0,g+4|0,g);ea=g;return}function bp(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;a=c[b+8>>2]|0;b=c[a+284>>2]|0;Ma[c[(c[b>>2]|0)+40>>2]&127](b,a,c[d+8>>2]|0);return}function cp(b){b=b|0;var d=0,e=0;c[b>>2]=7116;if(!(a[b+8>>0]|0)){LJ(b);return}d=c[b+12>>2]|0;if(!d){LJ(b);return}e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+16>>2]&127](e,d);LJ(b);return}function dp(b){b=b|0;var d=0,e=0;c[b>>2]=10568;if(!(a[b+8>>0]|0)){LJ(b);return}d=c[b+12>>2]|0;if(!d){LJ(b);return}e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+16>>2]&127](e,d);LJ(b);return}function ep(b){b=b|0;var d=0,e=0;c[b>>2]=6592;if(!(a[b+8>>0]|0)){LJ(b);return}d=c[b+12>>2]|0;if(!d){LJ(b);return}e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+16>>2]&127](e,d);LJ(b);return}function fp(a,b){a=a|0;b=b|0;var d=0,e=0;d=ea;ea=ea+16|0;e=NJ(c[b+4>>2]|0)|0;f[d>>2]=0.0;En(a,e,d);wr(b,e,c[a+12>>2]|0);ea=d;return}function gp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=ea;ea=ea+16|0;c[e>>2]=10132;c[e+4>>2]=b;Ma[c[(c[a>>2]|0)+48>>2]&127](a,e,d);ea=e;return}function hp(b){b=b|0;var d=0;c[b>>2]=7984;if(!(a[b+61>>0]|0))return;d=c[b+52>>2]|0;Ca[c[c[d>>2]>>2]&511](d);b=c[b+52>>2]|0;if(!b)return;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function ip(a,b){a=a|0;b=b|0;var d=0,e=0;d=ea;ea=ea+16|0;e=NJ(c[b+4>>2]|0)|0;c[d>>2]=0;En(a,e,d);wr(b,e,c[a+12>>2]|0);ea=d;return}function jp(b,d){b=b|0;d=d|0;if((a[24800]|0)==0?DC(24800)|0:0)PB(24800);d=wH(b,d)|0;c[6260]=c[d>>2];c[6261]=c[d+4>>2];c[6262]=c[d+8>>2];c[6263]=c[d+12>>2];return 25040}function kp(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=z(b&65535,a&65535)|0;e=(c>>>16)+(z(b&65535,a>>>16)|0)|0;d=z(b>>>16,a&65535)|0;return (C((e>>>16)+(z(b>>>16,a>>>16)|0)+(((e&65535)+d|0)>>>16)|0),e+d<<16|c&65535|0)|0}function lp(b){b=b|0;var d=0,e=0;c[b>>2]=6688;if(!(a[b+8>>0]|0)){LJ(b);return}d=c[b+12>>2]|0;if(!d){LJ(b);return}e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+16>>2]&127](e,d);LJ(b);return}function mp(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else vh(b,c,d)|0;return b|0}function np(){var a=0,b=0;b=ea;ea=ea+32|0;a=GI(112)|0;lt(b);uf(a,b);ea=b;return a|0}function op(b){b=b|0;var d=0,e=0;c[b>>2]=7164;if(!(a[b+16>>0]|0)){LJ(b);return}d=c[b+20>>2]|0;if(!d){LJ(b);return}e=c[b+4>>2]|0;Ia[c[(c[e>>2]|0)+16>>2]&127](e,d);LJ(b);return}function pp(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0;e=+r(+(+f[b>>2]));d=+r(+(+f[b+4>>2]));c=+r(+(+f[b+8>>2]));f[a+12>>2]=e;f[a+16>>2]=d;f[a+20>>2]=c;f[a+24>>2]=0.0;return}function qp(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;var f=0;f=ea;ea=ea+64|0;yq(f);Kr(f,b);Ha[c[(c[a>>2]|0)+16>>2]&1](a,d,f,e);ea=f;return}function rp(a,b){a=a|0;b=b|0;Ve(a,c[b+36>>2]|0);return}function sp(a){a=a|0;var b=0;c[a>>2]=6668;b=c[a+48>>2]|0;Ia[c[(c[b>>2]|0)+20>>2]&127](b,c[a+64>>2]|0);b=c[a+48>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,c[a+64>>2]|0);LJ(a);return}function tp(a,b,c,d,e,f,g,h,i,j,k,l,m){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=+g;h=+h;i=+i;j=+j;k=k|0;l=+l;m=m|0;Ra[a&1](b|0,c|0,d|0,e|0,+f,+g,+h,+i,+j,k|0,+l,m|0)}function up(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;f[a>>2]=(1.0-d)*+f[b>>2]+ +f[c>>2]*d;f[a+4>>2]=(1.0-d)*+f[b+4>>2]+ +f[c+4>>2]*d;f[a+8>>2]=(1.0-d)*+f[b+8>>2]+ +f[c+8>>2]*d;return}function vp(a,b,c,d,e,g,h){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;var i=0;i=ea;ea=ea+16|0;f[i+8>>2]=b+e;f[i+4>>2]=c+g;f[i>>2]=d+h;qs(a,i+8|0,i+4|0,i);ea=i;return}function wp(a,b,c,d,e,g,h){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;var i=0;i=ea;ea=ea+16|0;f[i+8>>2]=b*e;f[i+4>>2]=c*g;f[i>>2]=d*h;qs(a,i+8|0,i+4|0,i);ea=i;return}function xp(a,b,c,d,e,g,h){a=a|0;b=+b;c=+c;d=+d;e=+e;g=+g;h=+h;var i=0;i=ea;ea=ea+16|0;f[i+8>>2]=b-e;f[i+4>>2]=c-g;f[i>>2]=d-h;qs(a,i+8|0,i+4|0,i);ea=i;return}function yp(b,c,e,f){b=b|0;c=c|0;e=e|0;f=f|0;if(!((b|0)==0&(c|0)==0))do{e=e+-1|0;a[e>>0]=d[480+(b&15)>>0]|0|f;b=Ft(b|0,c|0,4)|0;c=D()|0}while(!((b|0)==0&(c|0)==0));return e|0}function zp(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+16|0;f[c+8>>2]=-+f[b>>2];f[c+4>>2]=-+f[b+4>>2];f[c>>2]=-+f[b+8>>2];Cv(a,c+8|0,c+4|0,c,b+12|0);ea=c;return}function Ap(a){a=a|0;var b=0;c[a>>2]=8336;b=c[a+52>>2]|0;if(!b)return;Ca[c[c[b>>2]>>2]&511](b);b=c[a+52>>2]|0;if(!b)return;c[6748]=(c[6748]|0)+1;uc(c[b+-4>>2]|0);return}function Bp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;if(rt(a,c[b+8>>2]|0,0)|0)qm(b,d,e);return}function Cp(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 +(+P(0,a|0,b|0,c|0,d|0,e|0,f|0,g|0,h|0))}function Dp(a,b){a=a|0;b=b|0;if((b|0)==0?1:(c[b+236>>2]&2|0)==0){Oj(a,b);return}else{Ia[c[(c[a>>2]|0)+92>>2]&127](a,b);return}}function Ep(a){a=a|0;var b=0;c[a>>2]=6668;b=c[a+48>>2]|0;Ia[c[(c[b>>2]|0)+20>>2]&127](b,c[a+64>>2]|0);b=c[a+48>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,c[a+64>>2]|0);return}function Fp(){var b=0;b=GI(40)|0;f[b+12>>2]=1.0;c[b+8>>2]=0;c[b+4>>2]=5;c[b>>2]=4060;a[b+36>>0]=1;c[b+32>>2]=0;c[b+24>>2]=0;c[b+28>>2]=0;a[b+16>>0]=1;return b|0}function Gp(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+16|0;wp(e,b,c,d,+f[a+348>>2],+f[a+352>>2],+f[a+356>>2]);Lr(a+412|0,e)|0;ea=e;return}function Hp(a,b,c){a=+a;b=+b;c=+c;var d=0,e=0;e=ea;ea=ea+16|0;f[e+8>>2]=a;f[e+4>>2]=b;f[e>>2]=c;d=dt()|0;qs(d,e+8|0,e+4|0,e);ea=e;return d|0}function Ip(a,b){a=a|0;b=b|0;c[a+12>>2]=c[b>>2];c[a+12+4>>2]=c[b+4>>2];c[a+12+8>>2]=c[b+8>>2];c[a+12+12>>2]=c[b+12>>2];Bi(a);return}function Jp(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;return Aa[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)|0}function Kp(a,b){a=a|0;b=b|0;a=c[a+12>>2]|0;return ta[c[(c[a>>2]|0)+8>>2]&31](a,b)|0}function Lp(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+16|0;wp(e,b,c,d,+f[a+544>>2],+f[a+548>>2],+f[a+552>>2]);Lr(a+428|0,e)|0;ea=e;return}function Mp(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;return +qa[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Np(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;h=Hs()|0;yd(h,a,b,c,d,e,f,g);return h|0}function Op(a,b,d){a=a|0;b=b|0;d=d|0;hA(a,b);c[a+48>>2]=c[d>>2];c[a+48+4>>2]=c[d+4>>2];c[a+48+8>>2]=c[d+8>>2];c[a+48+12>>2]=c[d+12>>2];return}function Pp(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+16|0;ql(c,a,+f[b+48>>2],+f[b+52>>2],+f[b+56>>2]);Lr(a+48|0,c)|0;$j(a,b);ea=c;return a|0}function Qp(a,b){a=a|0;b=b|0;c[a+260>>2]=(c[a+260>>2]|0)+1;c[a+328>>2]=c[b>>2];c[a+328+4>>2]=c[b+4>>2];c[a+328+8>>2]=c[b+8>>2];c[a+328+12>>2]=c[b+12>>2];return}function Rp(){var a=0,b=0;b=ea;ea=ea+32|0;a=GI(92)|0;lt(b);Uc(a,b);ea=b;return a|0}function Sp(a,b,d){a=a|0;b=b|0;d=d|0;c[d>>2]=c[a+56+(b<<4)>>2];c[d+4>>2]=c[a+56+(b<<4)+4>>2];c[d+8>>2]=c[a+56+(b<<4)+8>>2];c[d+12>>2]=c[a+56+(b<<4)+12>>2];return}function Tp(a,b){a=a|0;b=b|0;c[a+260>>2]=(c[a+260>>2]|0)+1;c[a+312>>2]=c[b>>2];c[a+312+4>>2]=c[b+4>>2];c[a+312+8>>2]=c[b+8>>2];c[a+312+12>>2]=c[b+12>>2];return}function Up(a,b){a=a|0;b=b|0;c[a+260>>2]=(c[a+260>>2]|0)+1;c[a+544>>2]=c[b>>2];c[a+544+4>>2]=c[b+4>>2];c[a+544+8>>2]=c[b+8>>2];c[a+544+12>>2]=c[b+12>>2];return}function Vp(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=+g;h=+h;i=+i;j=j|0;k=k|0;l=+l;Sa[a&1](b|0,c|0,d|0,e|0,+f,+g,+h,+i,j|0,k|0,+l)}function Wp(a){a=a|0;var b=0.0,d=0.0;d=+f[a+32>>2];+ha[c[(c[a>>2]|0)+48>>2]&15](a);b=+ha[c[(c[a>>2]|0)+48>>2]&15](a);+ha[c[(c[a>>2]|0)+48>>2]&15](a);return +(d+b)}function Xp(a){a=a|0;var b=0.0,d=0.0;d=+f[a+28>>2];b=+ha[c[(c[a>>2]|0)+48>>2]&15](a);+ha[c[(c[a>>2]|0)+48>>2]&15](a);+ha[c[(c[a>>2]|0)+48>>2]&15](a);return +(d+b)}function Yp(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;Za[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0,k|0)}function Zp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=ea;ea=ea+16|0;c[e>>2]=c[d>>2];a=va[c[(c[a>>2]|0)+16>>2]&63](a,b,e)|0;if(a)c[d>>2]=c[e>>2];ea=e;return a&1|0}function _p(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=+e;var g=0;g=ea;ea=ea+16|0;f[g+8>>2]=b*e;f[g+4>>2]=c*e;f[g>>2]=d*e;qs(a,g+8|0,g+4|0,g);ea=g;return}function $p(a,b){a=a|0;b=b|0;f[a>>2]=+f[a>>2]*+f[b>>2];f[a+4>>2]=+f[a+4>>2]*+f[b>>2];f[a+8>>2]=+f[a+8>>2]*+f[b>>2];f[a+12>>2]=+f[a+12>>2]*+f[b>>2];return a|0}function aq(){var a=0;a=GI(8)|0;c[6746]=a;Y(a|0,0)|0;c[6736]=22157;c[6737]=0;c[6738]=0;c[6739]=0;c[6740]=0;c[6741]=0;c[6742]=0;c[6743]=0;c[6744]=0;mr(26944);return}function bq(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;Oo(a,b,c,d,e,f,g,h,i,j);return}function cq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=js(324)|0;Yc(d,a,b,c);return d|0}function dq(b){b=b|0;var d=0;c[b>>2]=4060;d=c[b+32>>2]|0;if(!d){LJ(b);return}if(!(a[b+36>>0]|0)){LJ(b);return}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);LJ(b);return}function eq(a,b,d){a=a|0;b=b|0;d=d|0;a=c[b+204>>2]|0;if(a&4|0)return 0;b=c[d+204>>2]|0;if(!(b&4))return (a&3|0)==0|(b&3|0)==0|0;else return 0;return 0}function fq(a,b,d){a=a|0;b=b|0;d=d|0;$l(a,b);c[a+48>>2]=c[d>>2];c[a+48+4>>2]=c[d+4>>2];c[a+48+8>>2]=c[d+8>>2];c[a+48+12>>2]=c[d+12>>2];return}function gq(b){b=b|0;var d=0;c[b>>2]=7116;if(!(a[b+8>>0]|0))return;d=c[b+12>>2]|0;if(!d)return;b=c[b+4>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,d);return}function hq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=0;while(1){if((e|0)>=(b|0))break;Fl(d+(e*96|0)|0,(c[a+12>>2]|0)+(e*96|0)|0);e=e+1|0}return}function iq(b){b=b|0;var d=0;c[b>>2]=10568;if(!(a[b+8>>0]|0))return;d=c[b+12>>2]|0;if(!d)return;b=c[b+4>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,d);return}function jq(b){b=b|0;var d=0;c[b>>2]=6244;d=c[b+20>>2]|0;if(!d){LJ(b);return}if(!(a[b+24>>0]|0)){LJ(b);return}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);LJ(b);return}function kq(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+128|0;zn(c,a+68|0);Po(c+64|0,c,a+4|0);Kq(b,c+64|0);ea=c;return}function lq(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=Hs()|0;yd(g,a,b,c,d,e,f,0);return g|0}function mq(b){b=b|0;var d=0;c[b>>2]=6592;if(!(a[b+8>>0]|0))return;d=c[b+12>>2]|0;if(!d)return;b=c[b+4>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,d);return}function nq(b){b=b|0;var c=0;c=ea;ea=ea+64|0;if((a[24848]|0)==0?DC(24848)|0:0)PB(24848);zn(c,b);Kq(25216,c);ea=c;return 25216}function oq(a,b){a=a|0;b=b|0;a=c[a+4>>2]|0;return ((c[b>>2]|0)==(a|0)?1:(c[b+4>>2]|0)==(a|0))|0}function pq(b){b=b|0;if(a[24912]|0)return 25552;if(!(DC(24912)|0))return 25552;c[6388]=1065353216;c[6389]=1065353216;c[6390]=1065353216;f[6391]=0.0;PB(24912);return 25552}function qq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=ss()|0;Ed(f,a,b,c,d,e);return f|0}function rq(a,b){a=a|0;b=b|0;a=c[a+20>>2]|0;return ta[c[(c[a>>2]|0)+8>>2]&31](a,b)|0}function sq(b){b=b|0;var d=0;c[b>>2]=9960;d=c[b+16>>2]|0;if(!d){LJ(b);return}if(!(a[b+20>>0]|0)){LJ(b);return}c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);LJ(b);return}function tq(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+16|0;f[e+8>>2]=b;f[e+4>>2]=c;f[e>>2]=d;qs(a,e+8|0,e+4|0,e);ea=e;return}function uq(b){b=b|0;var d=0;c[b>>2]=6688;if(!(a[b+8>>0]|0))return;d=c[b+12>>2]|0;if(!d)return;b=c[b+4>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,d);return}function vq(a,b,d,e,f,g,h,i,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=+j;Ua[c[(c[a>>2]|0)+28>>2]&1](a,b,d,e,i,j);return}function wq(a,b,d){a=a|0;b=b|0;d=d|0;sI(a);c[a>>2]=3684;Kq(a+4|0,b);Kq(a+68|0,d);Kq(a+132|0,b);c[a+196>>2]=0;return}function xq(b){b=b|0;var d=0;c[b>>2]=7164;if(!(a[b+16>>0]|0))return;d=c[b+20>>2]|0;if(!d)return;b=c[b+4>>2]|0;Ia[c[(c[b>>2]|0)+16>>2]&127](b,d);return}function yq(a){a=a|0;var b=0;b=ea;ea=ea+16|0;Jm(a);f[b+8>>2]=0.0;f[b+4>>2]=0.0;f[b>>2]=0.0;qs(a+48|0,b+8|0,b+4|0,b);ea=b;return}function zq(b,c,d){b=b|0;c=c|0;d=d|0;if(!((b|0)==0&(c|0)==0))do{d=d+-1|0;a[d>>0]=b&7|48;b=Ft(b|0,c|0,3)|0;c=D()|0}while(!((b|0)==0&(c|0)==0));return d|0}function Aq(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;return za[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)|0}function Bq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;var f=0;f=GI(44)|0;Ul(f,a,b,c,d,e);return f|0}function Cq(a,b){a=a|0;b=b|0;Fo(a,b);c[a+20>>2]=c[b+20>>2];c[a+20+4>>2]=c[b+20+4>>2];c[a+20+8>>2]=c[b+20+8>>2];c[a+20+12>>2]=c[b+20+12>>2];return}function Dq(a,b,c){a=a|0;b=b|0;c=+c;switch(b|0){case 3:{f[a+452>>2]=c;return}case 4:{f[a+448>>2]=c;return}case 5:{f[a+444>>2]=c;return}default:return}}function Eq(a,b){a=a|0;b=b|0;var c=0;c=0;while(1){if((c|0)==3)break;f[a+868+(c<<6)+4>>2]=+Fs(+f[(NJ(b)|0)+(c<<2)>>2]);c=c+1|0}return}function Fq(a,b){a=a|0;b=b|0;b=c[b+36>>2]|0;Pd(a,c[(c[(c[(c[a+4>>2]|0)+4>>2]|0)+24>>2]|0)+(b*80|0)+64>>2]|0,b);return}function Gq(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;return +pa[a&3](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Hq(a,b){a=a|0;b=b|0;var c=0;c=0;while(1){if((c|0)==3)break;f[a+868+(c<<6)>>2]=+Fs(+f[(NJ(b)|0)+(c<<2)>>2]);c=c+1|0}return}function Iq(a,b,c,d){a=+a;b=b|0;c=c|0;d=d|0;var e=0;e=GI(140)|0;ok(e,a,b,c,d);return e|0}function Jq(a,b,d,e,f,g,h,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return +(+oa[c[(c[a>>2]|0)+12>>2]&1](a,b,d,e,f,g,h,i))}function Kq(a,b){a=a|0;b=b|0;$l(a,b);c[a+48>>2]=c[b+48>>2];c[a+48+4>>2]=c[b+48+4>>2];c[a+48+8>>2]=c[b+48+8>>2];c[a+48+12>>2]=c[b+48+12>>2];return}function Lq(b,d){b=b|0;d=d|0;if((a[24824]|0)==0?DC(24824)|0:0)PB(24824);Dm(rC(c[b+12>>2]|0,d)|0);return 25088}function Mq(a,b){a=a|0;b=b|0;qs(a,b,b+16|0,b+32|0);qs(a+16|0,b+4|0,b+20|0,b+36|0);qs(a+32|0,b+8|0,b+24|0,b+40|0);return}function Nq(a,b){a=a|0;b=b|0;Ca[c[(c[b>>2]|0)+32>>2]&511](b);nc(a,b);Ca[c[(c[b>>2]|0)+36>>2]&511](b);return}function Oq(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;Ya[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function Pq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Ma[c[(c[a>>2]|0)+108>>2]&127](a,b,d);Ma[c[(c[a>>2]|0)+108>>2]&127](a,(b+1|0)%3|0,e);return}function Qq(a){a=a|0;var b=0.0,c=0;c=+Ho(a,a)<0.0;b=+f[a+12>>2];if(c){b=+jB(b);b=b*2.0;return +b}else{b=+jB(-b);b=b*2.0;return +b}return 0.0}function Rq(){var a=0,b=0;b=Yr(c[6250]|0,c[6251]|0,1284865837,1481765933)|0;b=Lv(b|0,D()|0,1,0)|0;a=D()|0;c[6250]=b;c[6251]=a;a=Ft(b|0,a|0,33)|0;D()|0;return a|0}function Sq(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;var e=0;e=ea;ea=ea+16|0;f[e+8>>2]=-b;f[e+4>>2]=-c;f[e>>2]=-d;qs(a,e+8|0,e+4|0,e);ea=e;return}function Tq(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;f=vs()|0;fd(f,a,b,c&65535,d,e);return f|0}function Uq(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb((a*104|3)+16|0)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Vq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=0;while(1){if((e|0)>=(b|0))break;Cq(d+(e*36|0)|0,(c[a+12>>2]|0)+(e*36|0)|0);e=e+1|0}return}function Wq(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=+j;Xa[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,+j)}function Xq(a,b){a=a|0;b=b|0;c[a+12>>2]=c[b>>2];c[a+12+4>>2]=c[b+4>>2];c[a+12+8>>2]=c[b+8>>2];c[a+12+12>>2]=c[b+12>>2];return}function Yq(a,b){a=a|0;b=b|0;c[a+44>>2]=c[b>>2];c[a+44+4>>2]=c[b+4>>2];c[a+44+8>>2]=c[b+8>>2];c[a+44+12>>2]=c[b+12>>2];return}function Zq(a,c){a=a|0;c=c|0;if(!((b[c+4>>1]&b[a+6>>1])<<16>>16)){a=0;return a|0}a=(b[a+4>>1]&b[c+6>>1])<<16>>16!=0;return a|0}function _q(a,c){a=a|0;c=c|0;if(!((b[c+4>>1]&b[a+10>>1])<<16>>16)){a=0;return a|0}a=(b[a+8>>1]&b[c+6>>1])<<16>>16!=0;return a|0}function $q(a,b){a=a|0;b=b|0;c[a+696>>2]=c[b>>2];c[a+696+4>>2]=c[b+4>>2];c[a+696+8>>2]=c[b+8>>2];c[a+696+12>>2]=c[b+12>>2];return}function ar(a,b){a=a|0;b=b|0;c[a+680>>2]=c[b>>2];c[a+680+4>>2]=c[b+4>>2];c[a+680+8>>2]=c[b+8>>2];c[a+680+12>>2]=c[b+12>>2];return}function br(a,b){a=a|0;b=b|0;c[a+60>>2]=c[b>>2];c[a+60+4>>2]=c[b+4>>2];c[a+60+8>>2]=c[b+8>>2];c[a+60+12>>2]=c[b+12>>2];return}function cr(a,b){a=a|0;b=b|0;c[a+28>>2]=c[b>>2];c[a+28+4>>2]=c[b+4>>2];c[a+28+8>>2]=c[b+8>>2];c[a+28+12>>2]=c[b+12>>2];return}function dr(a){a=a|0;c[a>>2]=3616;uF(a+112|0);uF(a+92|0);uF(a+72|0);uF(a+20|0);return}function er(a,b){a=a|0;b=b|0;c[a+156>>2]=c[b>>2];c[a+156+4>>2]=c[b+4>>2];c[a+156+8>>2]=c[b+8>>2];c[a+156+12>>2]=c[b+12>>2];return}function fr(b,c,d){b=b|0;c=c|0;d=d|0;a[b+1309+c>>0]=d&1;if((c|0)<3){a[b+788+c>>0]=d&1;return}else{a[b+868+(c+-3<<6)+44>>0]=d&1;return}}function gr(a,c){a=a|0;c=c|0;if(!((b[c+4>>1]&b[a+14>>1])<<16>>16)){a=0;return a|0}a=(b[a+12>>1]&b[c+6>>1])<<16>>16!=0;return a|0}function hr(a,b){a=a|0;b=b|0;c[a+108>>2]=c[b>>2];c[a+108+4>>2]=c[b+4>>2];c[a+108+8>>2]=c[b+8>>2];c[a+108+12>>2]=c[b+12>>2];return}function ir(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=(NJ(b)|0)+(c<<2)|0;d=(NJ(b+16|0)|0)+(c<<2)|0;qs(a,e,d,(NJ(b+32|0)|0)+(c<<2)|0);return}function jr(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb(a*96|19)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function kr(a,b){a=a|0;b=b|0;c[a+20>>2]=c[b>>2];c[a+20+4>>2]=c[b+4>>2];c[a+20+8>>2]=c[b+8>>2];c[a+20+12>>2]=c[b+12>>2];return}function lr(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb((a<<4|3)+16|0)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function mr(a){a=a|0;var b=0;do{c[a+4>>2]=0;f[a+8>>2]=0.0;b=c[a+24>>2]|0;if(b|0)mr(b);a=c[a+28>>2]|0}while((a|0)!=0);return}function nr(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;Gc(a,b,c,d,e,f);return}function or(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb((a*36|3)+16|0)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function pr(a,b){a=a|0;b=b|0;c[a+172>>2]=c[b>>2];c[a+172+4>>2]=c[b+4>>2];c[a+172+8>>2]=c[b+8>>2];c[a+172+12>>2]=c[b+12>>2];return}function qr(a,b){a=a|0;b=b|0;c[a+32>>2]=c[b>>2];c[a+32+4>>2]=c[b+4>>2];c[a+32+8>>2]=c[b+8>>2];c[a+32+12>>2]=c[b+12>>2];return}function rr(a){a=a|0;f[a>>2]=5.880000114440918;f[a+4>>2]=.8299999833106995;f[a+8>>2]=.8799999952316284;f[a+12>>2]=500.0;f[a+16>>2]=10.5;f[a+20>>2]=6.0e3;return}function sr(a,b){a=a|0;b=b|0;c[a+316>>2]=c[b>>2];c[a+316+4>>2]=c[b+4>>2];c[a+316+8>>2]=c[b+8>>2];c[a+316+12>>2]=c[b+12>>2];return}function tr(a,b){a=a|0;b=b|0;c[a+300>>2]=c[b>>2];c[a+300+4>>2]=c[b+4>>2];c[a+300+8>>2]=c[b+8>>2];c[a+300+12>>2]=c[b+12>>2];return}function ur(a,b){a=a|0;b=b|0;c[a+64>>2]=c[b>>2];c[a+64+4>>2]=c[b+4>>2];c[a+64+8>>2]=c[b+8>>2];c[a+64+12>>2]=c[b+12>>2];return}function vr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=vs()|0;fd(e,a,b,c&65535,d,0);return e|0}function wr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=0;while(1){if((e|0)>=(b|0))break;c[d+(e<<2)>>2]=c[(c[a+12>>2]|0)+(e<<2)>>2];e=e+1|0}return}function xr(a,b){a=a|0;b=b|0;c[a+52>>2]=c[b>>2];c[a+52+4>>2]=c[b+4>>2];c[a+52+8>>2]=c[b+8>>2];c[a+52+12>>2]=c[b+12>>2];return}function yr(a,b){a=a|0;b=b|0;c[a+188>>2]=c[b>>2];c[a+188+4>>2]=c[b+4>>2];c[a+188+8>>2]=c[b+8>>2];c[a+188+12>>2]=c[b+12>>2];return}function zr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[d>>2];c[a+8>>2]=c[e>>2];c[a+12>>2]=c[f>>2];return}function Ar(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;return +oa[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0)}function Br(a,b){a=a|0;b=b|0;c[a+16>>2]=c[b>>2];c[a+16+4>>2]=c[b+4>>2];c[a+16+8>>2]=c[b+8>>2];c[a+16+12>>2]=c[b+12>>2];return}function Cr(a,b,d){a=a|0;b=b|0;d=+d;Ia[c[(c[a>>2]|0)+32>>2]&127](a,b);Ja[c[(c[a>>2]|0)+36>>2]&7](a,b,d);return}function Dr(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb((a<<2|3)+16|0)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Er(a,b){a=a|0;b=b|0;c[a+68>>2]=c[b>>2];c[a+68+4>>2]=c[b+4>>2];c[a+68+8>>2]=c[b+8>>2];c[a+68+12>>2]=c[b+12>>2];return}function Fr(a,b){a=a|0;b=b|0;c[a+36>>2]=c[b>>2];c[a+36+4>>2]=c[b+4>>2];c[a+36+8>>2]=c[b+8>>2];c[a+36+12>>2]=c[b+12>>2];return}function Gr(a,b){a=a|0;b=b|0;c[a>>2]=c[b+248>>2];c[a+4>>2]=c[b+248+4>>2];c[a+8>>2]=c[b+248+8>>2];c[a+12>>2]=c[b+248+12>>2];return}function Hr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=ss()|0;gd(d,a,b,c);return d|0}function Ir(){var a=0;a=As()|0;Xm();Xm();wq(a,25328,25328);return a|0}function Jr(a,b,d){a=a|0;b=b|0;d=d|0;if((c[a+4>>2]|0)==(b|0)?(c[a+28>>2]|0)!=1:0)c[a+28>>2]=d;return}function Kr(a,b){a=a|0;b=b|0;c[a+48>>2]=c[b>>2];c[a+48+4>>2]=c[b+4>>2];c[a+48+8>>2]=c[b+8>>2];c[a+48+12>>2]=c[b+12>>2];return}function Lr(a,b){a=a|0;b=b|0;f[a>>2]=+f[a>>2]+ +f[b>>2];f[a+4>>2]=+f[a+4>>2]+ +f[b+4>>2];f[a+8>>2]=+f[a+8>>2]+ +f[b+8>>2];return a|0}function Mr(a,b){a=a|0;b=b|0;f[a>>2]=+f[a>>2]-+f[b>>2];f[a+4>>2]=+f[a+4>>2]-+f[b+4>>2];f[a+8>>2]=+f[a+8>>2]-+f[b+8>>2];return a|0}function Nr(a,b){a=a|0;b=b|0;var c=0;c=ea;ea=ea+64|0;Po(c,b,a+68|0);Kq(a+4|0,c);ea=c;return}function Or(a){a=a|0;var b=0;b=GI(112)|0;uf(b,a);return b|0}function Pr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=vs()|0;fd(d,a,b,c&65535,0,0);return d|0}function Qr(a,b){a=a|0;b=b|0;c[a+76>>2]=c[b>>2];c[a+76+4>>2]=c[b+4>>2];c[a+76+8>>2]=c[b+8>>2];c[a+76+12>>2]=c[b+12>>2];return}function Rr(a,b){a=a|0;b=b|0;c[a+4>>2]=c[b>>2];c[a+4+4>>2]=c[b+4>>2];c[a+4+8>>2]=c[b+8>>2];c[a+4+12>>2]=c[b+12>>2];return}function Sr(a,b){a=a|0;b=b|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];return}function Tr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=js(1252)|0;ub(e,a,b,c,d);return e|0}function Ur(a,b){a=a|0;b=b|0;c[a+40>>2]=c[b>>2];c[a+40+4>>2]=c[b+4>>2];c[a+40+8>>2]=c[b+8>>2];c[a+40+12>>2]=c[b+12>>2];return}function Vr(a,b){a=a|0;b=b|0;c[a+24>>2]=c[b>>2];c[a+24+4>>2]=c[b+4>>2];c[a+24+8>>2]=c[b+8>>2];c[a+24+12>>2]=c[b+12>>2];return}function Wr(a,b){a=a|0;b=b|0;c[a+72>>2]=c[b>>2];c[a+72+4>>2]=c[b+4>>2];c[a+72+8>>2]=c[b+8>>2];c[a+72+12>>2]=c[b+12>>2];return}function Xr(a,b){a=a|0;b=b|0;c[a+56>>2]=c[b>>2];c[a+56+4>>2]=c[b+4>>2];c[a+56+8>>2]=c[b+8>>2];c[a+56+12>>2]=c[b+12>>2];return}function Yr(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=kp(a,c)|0;f=D()|0;return (C((z(b,c)|0)+(z(d,a)|0)+f|f&0|0),e|0|0)|0}function Zr(a,b){a=a|0;b=b|0;f[a>>2]=+f[a>>2]*+f[b>>2];f[a+4>>2]=+f[a+4>>2]*+f[b>>2];f[a+8>>2]=+f[a+8>>2]*+f[b>>2];return a|0}function _r(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;f[a+(c[b+52>>2]<<2)>>2]=1.0;return}function $r(a,b){a=a|0;b=b|0;c[a+8>>2]=c[b>>2];c[a+8+4>>2]=c[b+4>>2];c[a+8+8>>2]=c[b+8>>2];c[a+8+12>>2]=c[b+12>>2];return}function as(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(215)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function bs(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 ya[a&0](b|0,c|0,d|0,e|0,f|0,g|0,h|0)|0}function cs(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=_s()|0;ae(d,a,b,c);return d|0}function ds(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wc(b,c,d,e)|0}function es(a,b){a=a|0;b=b|0;var d=0;d=0;while(1){if((d|0)>=(b|0))break;QH((c[a+12>>2]|0)+(d*36|0)|0);d=d+1|0}return}function fs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(203)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function gs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(1407)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function hs(a){a=a|0;es(a,NJ(c[a+4>>2]|0)|0);Us(a);_w(a);return}function is(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=f|0;g=g|0;Oa[c[(c[a>>2]|0)+32>>2]&1](a,b,d,e,f,g);return}function js(a){a=a|0;c[6747]=(c[6747]|0)+1;a=kb(a+19|0)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ks(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;T(2,a|0,b|0,c|0,+d,e|0,f|0)|0;return}function ls(a){a=a|0;var b=0;b=As()|0;Xm();wq(b,a,25328);return b|0}function ms(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(191)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ns(a,b){a=a|0;b=b|0;if(!b?c[a+204>>2]&3|0:0)return;if((c[a+216>>2]&-2|0)!=4)c[a+216>>2]=1;f[a+220>>2]=0.0;return}function os(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a+-4>>2]|0)+8>>2]&127](a+-4|0,b,d,e);return}function ps(a,b){a=a|0;b=b|0;var c=0.0;c=+cG(a);c=+AJ(c*+cG(b));return +(+jB(+Ho(a,b)/c))}function qs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[d>>2];c[a+8>>2]=c[e>>2];f[a+12>>2]=0.0;return}function rs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(143)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ss(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(1331)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ts(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;Wa[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0)}function us(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(379)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function vs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(135)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ws(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return}function xs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(627)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function ys(a,b){a=a|0;b=b|0;var c=0;c=vs()|0;fd(c,a,b,16384,0,0);return c|0}function zs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(791)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function As(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(219)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Bs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(1147)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Cs(a,b){a=a|0;b=b|0;var c=0;c=GI(80)|0;jm(c,a,b);return c|0}function Ds(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(103)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Es(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(147)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Fs(a){a=+a;a=+cJ(a);if(a<-3.1415927410125732){a=a+6.2831854820251465;return +a}if(!(a>3.1415927410125732))return +a;a=a+-6.2831854820251465;return +a}function Gs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(115)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Hs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(783)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Is(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(131)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Js(a,b){a=a|0;b=b|0;c[a+348>>2]=c[b>>2];c[a+348+4>>2]=c[b+4>>2];c[a+348+8>>2]=c[b+8>>2];return}function Ks(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((d|0)<=0)return;hk(c|0,0,d<<4|0)|0;return}function Ls(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(111)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Ms(a,b){a=a|0;b=b|0;c[a+480>>2]=b;if(!b)return;Ia[c[(c[b>>2]|0)+8>>2]&127](b,a+4|0);return}function Ns(a,b){a=a|0;b=b|0;var c=0;c=_s()|0;ae(c,a,b,1);return c|0}function Os(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a+192>>2]|0;Pa[c[(c[e>>2]|0)+8>>2]&127](e,a+4|0,b,d);return}function Ps(a){a=a|0;var b=0;b=GI(92)|0;Uc(b,a);return b|0}function Qs(a,b){a=a|0;b=b|0;c[a>>2]=1065353216;c[a+4>>2]=1065353216;c[a+8>>2]=1065353216;f[a+12>>2]=0.0;return}function Rs(b){b=b|0;if(!(ra[c[(c[b>>2]|0)+40>>2]&127](b)|0))return;c[b+16>>2]=c[b+28>>2];a[b+169>>0]=1;return}function Ss(a){a=a|0;var b=0;b=ea;ea=ea+16|0;c[b>>2]=NJ(c[a+60>>2]|0)|0;a=eI(N(6,b|0)|0)|0;ea=b;return a|0}function Ts(a,b){a=a|0;b=b|0;var d=0;d=c[a+8>>2]|0;Ma[c[d+60>>2]&127](b,d,c[a+4>>2]|0);return 0}function Us(b){b=b|0;var d=0;d=c[b+12>>2]|0;if(!d)return;if(a[b+16>>0]&1)uy(d);c[b+12>>2]=0;return}function Vs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(71)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function Ws(a,b){a=a|0;b=b|0;var d=0;d=a+92|0;do{c[a>>2]=c[b>>2];a=a+4|0;b=b+4|0}while((a|0)<(d|0));return}function Xs(a,b){a=a|0;b=b|0;var c=0;c=GI(132)|0;kl(c,a,b);return c|0}function Ys(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Tf(a,b,c,d);return}function Zs(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(67)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function _s(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(95)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function $s(a,b){a=a|0;b=b|0;return +(+yy(+f[a>>2],+f[a+4>>2],+f[a+8>>2],+f[b>>2],+f[b+4>>2],+f[b+8>>2]))}function at(a,b){a=a|0;b=b|0;var c=0;c=GI(84)|0;vm(c,a,b);return c|0}function bt(a,b,d){a=a|0;b=b|0;d=d|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;return}function ct(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(75)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function dt(){var a=0;c[6747]=(c[6747]|0)+1;a=kb(35)|0;if(!a){a=0;return a|0}c[(a+4+15&-16)+-4>>2]=a;a=a+4+15&-16;return a|0}function et(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 xa[a&3](b|0,c|0,d|0,e|0,f|0,g|0)|0}function ft(a){a=a|0;qf(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function gt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,d,e);return}function ht(a){a=a|0;c[a>>2]=3640;f[a+4>>2]=1.0;c[a+8>>2]=0;b[a+12>>1]=1;b[a+14>>1]=-1;c[a+16>>2]=0;return}function it(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,d,e);return}function jt(a){a=a|0;var b=0;b=ct()|0;$h(b,a);c[b>>2]=9660;c[b+52>>2]=2;return b|0}function kt(a){a=a|0;var b=0;b=ct()|0;$h(b,a);c[b>>2]=9556;c[b+52>>2]=0;return b|0}function lt(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=4096;c[a+12>>2]=4096;c[a+16>>2]=0;c[a+20>>2]=1;return}function mt(a,b,d){a=a|0;b=b|0;d=d|0;ud(c[a+116>>2]|0,c[a+144>>2]|0,b,d);return}function nt(a,b){a=a|0;b=+b;var c=0;c=ea;ea=ea+16|0;f[c>>2]=b;a=$p(a,c)|0;ea=c;return a|0}function ot(a,b){a=a|0;b=b|0;var c=0;c=As()|0;wq(c,a,b);return c|0}function pt(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C(b<>>32-c|0);return a<>2]|0,c[b+4>>2]|0)|0)==0;else d=(a|0)==(b|0);return d|0}function st(a,b,d){a=a|0;b=b|0;d=d|0;Ma[c[(c[b>>2]|0)+64>>2]&127](a,b,d);return}function tt(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return 0.0}function ut(a,b,d){a=a|0;b=+b;d=d|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;return}function vt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+80>>2]&127](a,b,d,e);return}function wt(a){a=a|0;if(!a){a=0;return a|0}a=Uq(a)|0;return a|0}function xt(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=f|0;g=g|0;return +la[a&3](b|0,c|0,d|0,+e,f|0,g|0)}function yt(a,b){a=a|0;b=+b;var c=0;c=ea;ea=ea+16|0;f[c>>2]=b;a=Zr(a,c)|0;ea=c;return a|0}function zt(a){a=a|0;if(c[a+204>>2]&3|0)return;if((c[a+216>>2]&-2|0)!=4)c[a+216>>2]=1;f[a+220>>2]=0.0;return}function At(a,b){a=a|0;b=b|0;pn(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function Bt(){var a=0;a=GI(8)|0;c[a>>2]=0;c[a+4>>2]=0;vz(a);return a|0}function Ct(a,b){a=a|0;b=b|0;a=c[a+4>>2]|0;ta[c[(c[a>>2]|0)+8>>2]&31](a,c[b+36>>2]|0)|0;return}function Dt(a,b){a=a|0;b=b|0;Mq(a,b);qs(a+48|0,b+48|0,b+52|0,b+56|0);return}function Et(a,b,d){a=a|0;b=b|0;d=d|0;Yf(c[a+116>>2]|0,b,d);return}function Ft(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C(b>>>c|0);return a>>>c|(b&(1<>>c-32|0}function Gt(a,b){a=a|0;b=b|0;c[a+260>>2]=(c[a+260>>2]|0)+1;c[a+192>>2]=b;c[a+200>>2]=b;return}function Ht(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;Va[a&7](b|0,c|0,d|0,e|0,f|0,g|0)}function It(a,b,c,d,e,f,g,h,i,j,k,l){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=+i;j=j|0;k=+k;l=l|0;B(36)}function Jt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+24>>2]&127](a,b,d,e);return}function Kt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+88>>2]&127](a,b,d,e);return}function Lt(a,b,d){a=a|0;b=b|0;d=d|0;Ma[c[(c[b>>2]|0)+68>>2]&127](a,b,d);return}function Mt(b,d){b=b|0;d=d|0;b=(a[b+344>>0]|0)==0?3:0;c[d>>2]=b;c[d+4>>2]=b;return}function Nt(a,b){a=a|0;b=+b;var c=0;c=ea;ea=ea+16|0;f[c>>2]=1.0/b;a=$p(a,c)|0;ea=c;return a|0}function Ot(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+36>>2]&127](a,b,d,e);return}function Pt(a,b,d){a=a|0;b=+b;d=d|0;return sa[c[(c[a>>2]|0)+52>>2]&1](a,b,d,.01666666753590107)|0}function Qt(a,b,d){a=a|0;b=+b;d=d|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;return}function Rt(a,b){a=a|0;b=b|0;Gn(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function St(a,b,d,e){a=a|0;b=+b;d=d|0;e=+e;return sa[c[(c[a>>2]|0)+52>>2]&1](a,b,d,e)|0}function Tt(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=1065353216;f[a+12>>2]=0.0;return}function Ut(a,b){a=a|0;b=b|0;c[a>>2]=1065353216;c[a+4>>2]=0;c[a+8>>2]=0;f[a+12>>2]=0.0;return}function Vt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+28>>2]&127](a,b,d,e);return}function Wt(a,b){a=a|0;b=b|0;c[a>>2]=0;c[a+4>>2]=1065353216;c[a+8>>2]=0;f[a+12>>2]=0.0;return}function Xt(a,b){a=a|0;b=b|0;Ma[c[(c[a>>2]|0)+8>>2]&127](a,b,c[(c[a+8>>2]|0)+48>>2]|0);return}function Yt(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;Ua[a&1](b|0,c|0,d|0,e|0,f|0,+g)}function Zt(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=f|0;g=g|0;Oa[a&1](b|0,c|0,d|0,+e,f|0,g|0)}function _t(a,b){a=a|0;b=b|0;Hn(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function $t(b,d,e){b=b|0;d=d|0;e=+e;f[(c[b+720>>2]|0)+(d*104|0)+88>>2]=e>0.0?1.0/e:0.0;a[b+924>>0]=1;return}function au(a,b,d){a=a|0;b=b|0;d=+d;Ja[c[(c[a>>2]|0)+20>>2]&7](a,b,d);return}function bu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+124>>2]&127](a,e,b,d);return}function cu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;c[a+120>>2]=b;c[a+124>>2]=d;c[a+128>>2]=e;return}function du(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;wa[c[(c[a>>2]|0)+8>>2]&31](a,b,d,e)|0;return}function eu(a,b){a=a|0;b=b|0;Gp(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function fu(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;qs(a,b,d,e);c[a+12>>2]=c[f>>2];return}function gu(b,c,d,e){b=b|0;c=c|0;d=+d;e=+e;a[b+737>>0]=c&1;f[b+680>>2]=d;f[b+684>>2]=e;return}function hu(a,b){a=a|0;b=b|0;var d=0.0,e=0;e=(c[b>>2]|0)+(8-1)&~(8-1);d=+g[e>>3];c[b>>2]=e+8;g[a>>3]=d;return}function iu(a,b){a=a|0;b=b|0;vn(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function ju(a,b,c,d,e,f){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;qn(a,b,c,d,e,f);return}function ku(a){a=a|0;nj(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function lu(a){a=a|0;Tk(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function mu(a,b,c,d,e,f,g){a=a|0;b=b|0;c=+c;d=+d;e=e|0;f=f|0;g=g|0;Fa[a&3](b|0,+c,+d,e|0,f|0,g|0)}function nu(a,b,d){a=a|0;b=b|0;d=d|0;Pa[c[(c[a>>2]|0)+36>>2]&127](a,b,d,-3);return}function ou(a,b){a=a|0;b=b|0;var c=0;c=Is()|0;of(c,a,b,16);return c|0}function pu(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return 1.0}function qu(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return}function ru(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;B(19);return 0}function su(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+32>>2]&127](a,b,d,e);return}function tu(a){a=a|0;Vf(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function uu(a){a=a|0;if(!a){a=0;return a|0}a=lr(a)|0;return a|0}function vu(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;B(9);return 0.0}function wu(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;gi(a,b,c,d,e);return}function xu(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;af(a,b,c,d,e);return}function yu(a,b,d,e){a=a|0;b=b|0;d=+d;e=e|0;Ka[c[(c[a>>2]|0)+28>>2]&7](a,b,d,e);return}function zu(a,b){a=a|0;b=b|0;Vd(a,b);return}function Au(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;Pa[c[(c[a>>2]|0)+8>>2]&127](a,b,d,e);return}function Bu(a,b,c,d,e,f,g,h,i,j,k){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;i=i|0;j=j|0;k=+k;B(37)}function Cu(a,b){a=a|0;b=b|0;Yf(c[a+116>>2]|0,b,1);return}function Du(a,b){a=a|0;b=b|0;c[a+260>>2]=(c[a+260>>2]|0)+1;Kq(a+4|0,b);return}function Eu(a){a=a|0;uF(a+144|0);uF(a+124|0);uF(a+104|0);return}function Fu(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 +na[a&15](b|0,c|0,d|0,e|0,f|0)}function Gu(a,b){a=a|0;b=b|0;var c=0;c=ms()|0;kf(c,a,b);return c|0}function Hu(a){a=a|0;if(!a){a=0;return a|0}a=or(a)|0;return a|0}function Iu(a,b){a=a|0;b=b|0;Lp(a,+f[b>>2],+f[b+4>>2],+f[b+8>>2]);return}function Ju(a,b,d){a=a|0;b=b|0;d=d|0;Pa[c[(c[a>>2]|0)+36>>2]&127](a,b,d,-1);return}function Ku(a,b){a=a|0;b=+b;var c=0;c=ea;ea=ea+16|0;f[c>>2]=1.0/b;Zr(a,c)|0;ea=c;return}function Lu(a,b){a=a|0;b=+b;return sa[c[(c[a>>2]|0)+52>>2]&1](a,b,1,.01666666753590107)|0}function Mu(a){a=a|0;var b=0;b=GI(8)|0;Kv(b,a);return b|0}function Nu(a,b,d){a=a|0;b=b|0;d=d|0;Ma[c[(c[a>>2]|0)+56>>2]&127](a,b,d);return}function Ou(a,b,d){a=a|0;b=b|0;d=+d;Ja[c[(c[a>>2]|0)+36>>2]&7](a,b,d);return}function Pu(a){a=a|0;zh(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function Qu(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;B(44)}function Ru(a){a=a|0;Ki(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function Su(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=+e;qn(a,b,c,d,e,1.0);return}function Tu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;return +ja[a&3](b|0,c|0,+d,e|0,f|0)}function Uu(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;gu(a,b,c,d);return}function Vu(a){a=a|0;c[a>>2]=9372;if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function Wu(a,b){a=a|0;b=b|0;return c[(sC(c[a+24>>2]|0,b)|0)+64>>2]|0}function Xu(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Ta[a&31](b|0,c|0,d|0,e|0,f|0)}function Yu(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;U(1,a|0,b|0,c|0,d|0)|0;return}function Zu(a){a=a|0;if(!(c[a+12>>2]|0)){a=0;return a|0}a=c[a+20>>2]|0;return a|0}function _u(a){a=a|0;wl(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function $u(a,b){a=a|0;b=b|0;var c=0;c=GI(64)|0;Op(c,a,b);return c|0}function av(){var a=0;a=GI(24)|0;lt(a);return a|0}function bv(a,b,d){a=a|0;b=b|0;d=+d;Da[c[(c[a>>2]|0)+16>>2]&31](a,d);return}function cv(a,b,c){a=a|0;b=b|0;c=c|0;Cn(a,b,c);return}function dv(a,b){a=a|0;b=b|0;Pa[c[(c[a>>2]|0)+36>>2]&127](a,b,2,-3);return}function ev(a){a=a|0;var b=0;b=Is()|0;of(b,a,0,16);return b|0}function fv(a,b,d){a=a|0;b=+b;d=d|0;Ga[c[(c[a>>2]|0)+32>>2]&15](a,b,d);return}function gv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;return}function hv(a){a=a|0;Ah(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function iv(a){a=a|0;Bh(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function jv(a,b,d){a=a|0;b=b|0;d=d|0;return +(+ka[c[(c[a>>2]|0)+32>>2]&15](a,b,d))}function kv(a){a=a|0;if(!a){a=0;return a|0}a=Dr(a)|0;return a|0}function lv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;Qa[a&1](b|0,c|0,d|0,e|0,+f)}function mv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;La[a&1](b|0,c|0,+d,e|0,f|0)}function nv(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;B(18);return 0}function ov(a,b){a=a|0;b=b|0;Hx(a+20|0,b);return}function pv(a){a=a|0;if(!(+f[a+16>>2]==0.0)){a=0;return a|0}a=+f[a+20>>2]==0.0;return a|0}function qv(a){a=a|0;c[a>>2]=5660;if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function rv(a){a=a|0;c[a>>2]=6120;if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function sv(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;B(8);return 0.0}function tv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (C(d|0),a-c>>>0|0)|0}function uv(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+16>>2]&127](a,b);return}function vv(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+52>>2]&127](a,b);return}function wv(a,b){a=a|0;b=b|0;return ta[c[(c[a>>2]|0)+92>>2]&31](a,b)|0}function xv(a,b,d){a=a|0;b=b|0;d=+d;Ja[c[(c[a>>2]|0)+8>>2]&7](a,b,d);return}function yv(a,b){a=a|0;b=b|0;yA(a,b);return}function zv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ib(a,b,c,d)|0;return 1}function Av(a){a=a|0;var b=0;b=((c[a+52>>2]|0)+2|0)%3|0;return +(+f[(NJ(a+28|0)|0)+(b<<2)>>2])}function Bv(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+68>>2]&127](a,b);return}function Cv(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;zr(a,b,c,d,e);return}function Dv(a,b,d){a=a|0;b=b|0;d=d|0;Ma[c[(c[a>>2]|0)+40>>2]&127](a,b,d);return}function Ev(a,b){a=a|0;b=b|0;var d=0;d=ea;ea=ea+16|0;c[d>>2]=b;xE(3312,a,d)|0;zm();O()}function Fv(a){a=+a;var b=0;g[h>>3]=a;b=c[h>>2]|0;C(c[h+4>>2]|0);return b|0}function Gv(a){a=a|0;var b=0;b=ms()|0;kf(b,a,1);return b|0}function Hv(a,b,d){a=a|0;b=+b;d=d|0;f[(c[a+144>>2]|0)+(d*284|0)+232>>2]=b;return}function Iv(a,b,d){a=a|0;b=+b;d=d|0;f[(c[a+144>>2]|0)+(d*284|0)+252>>2]=b;return}function Jv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return}function Kv(a,b){a=a|0;b=b|0;$H(a);c[a>>2]=5968;c[a+4>>2]=b;return}function Lv(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return (C(b+d+(a+c>>>0>>>0>>0|0)>>>0|0),a+c>>>0|0)|0}function Mv(a,b){a=a|0;b=b|0;Eq(a,b);return}function Nv(a,b){a=a|0;b=b|0;Hq(a,b);return}function Ov(a,b){a=a|0;b=b|0;Pa[c[(c[a>>2]|0)+36>>2]&127](a,b,1,-1);return}function Pv(a,b,c){a=a|0;b=b|0;c=c|0;kh(b,c);return}function Qv(a,b){a=a|0;b=b|0;Um(a,b);return}function Rv(a){a=a|0;tc(a);if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function Sv(a,b){a=a|0;b=b|0;RE(b);return}function Tv(a,b){a=a|0;b=b|0;SE(b);return}function Uv(a){a=a|0;c[a>>2]=3592;f[a+4>>2]=1.0;b[a+8>>1]=1;b[a+10>>1]=-1;return}function Vv(a,b){a=a|0;b=b|0;if((c[a+216>>2]&-2|0)==4)return;c[a+216>>2]=b;return}function Wv(a,b){a=a|0;b=b|0;$q(a,b);return}function Xv(a,b){a=a|0;b=b|0;ar(a,b);return}function Yv(a,b){a=a|0;b=b|0;Ma[c[(c[a>>2]|0)+56>>2]&127](a,b,0);return}function Zv(a,b){a=a|0;b=+b;ey(a,b);return}function _v(a,b,c){a=a|0;b=b|0;c=c|0;return Lc(a,b,c)|0}function $v(a,b){a=a|0;b=b|0;return ta[c[(c[a>>2]|0)+40>>2]&31](a,b)|0}function aw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+60>>2]&127](a,b);return}function bw(a,b,d){a=a|0;b=b|0;d=+d;Ia[c[(c[a>>2]|0)+12>>2]&127](a,b);return}function cw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+92>>2]&127](a,b);return}function dw(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=+d;e=+e;tl(a,b,c,d,e);return}function ew(a,b){a=a|0;b=b|0;Am(a,b);return}function fw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return wa[a&31](b|0,c|0,d|0,e|0)|0}function gw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+32>>2]&127](a,b);return}function hw(a){a=a|0;var b=0;b=ct()|0;$h(b,a);return b|0}function iw(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;B(43)}function jw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+40>>2]&127](a,b);return}function kw(a,b){a=a|0;b=b|0;return c[(aG(c[a+276>>2]|0,b)|0)>>2]|0}function lw(a,b,c){a=a|0;b=b|0;c=c|0;Jd(a,b,c);return}function mw(a,b,d){a=a|0;b=+b;d=d|0;f[(c[a+144>>2]|0)+(d*284|0)+256>>2]=b;return}function nw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+84>>2]&127](a,b);return}function ow(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Sl(a,b,c,d);return}function pw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+28>>2]&127](a,b);return}function qw(a,b){a=a|0;b=b|0;Tx(a+72|0,b);return}function rw(a,b){a=a|0;b=+b;c[a+260>>2]=(c[a+260>>2]|0)+1;f[a+232>>2]=b;return}function sw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return +ma[a&1](b|0,c|0,d|0,e|0)}function tw(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=+i;B(42)}function uw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+72>>2]&127](a,b);return}function vw(a,b){a=a|0;b=b|0;BF(b);return}function ww(){var a=0;a=Is()|0;of(a,0,0,16);return a|0}function xw(a,b){a=a|0;b=b|0;Tx(a+92|0,b);return}function yw(a){a=a|0;var b=0;b=GI(284)|0;Vi(b,a);return b|0}function zw(a){a=a|0;if(!a)return;Ca[c[(c[a>>2]|0)+8>>2]&511](a);return}function Aw(a,b){a=a|0;b=+b;f[a+36>>2]=b;f[a+40>>2]=+u(+b);return}function Bw(a){a=a|0;if(!a)return;Ca[c[(c[a>>2]|0)+4>>2]&511](a);return}function Cw(a,b){a=a|0;b=+b;return +(+ha[c[(c[a>>2]|0)+16>>2]&15](a)*b)}function Dw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+64>>2]&127](a,b);return}function Ew(a){a=a|0;Ku(a,+VA(+f[a>>2],+f[a+4>>2],+f[a+8>>2]));return}function Fw(a,b){a=a|0;b=+b;TB(a,b);return}function Gw(a,b){a=a|0;b=b|0;ox(a+868|0,b);return}function Hw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+12>>2]&127](a,b);return}function Iw(a,b,c){a=a|0;b=b|0;c=+c;f[a+1316+(b<<2)>>2]=c;return}function Jw(a,b){a=a|0;b=+b;c[a+260>>2]=(c[a+260>>2]|0)+1;f[a+228>>2]=b;return}function Kw(a,b){a=a|0;b=b|0;Md(a,b);return}function Lw(a){a=a|0;return +(+(ra[c[(c[a>>2]|0)+36>>2]&127](a)|0))}function Mw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+8>>2]&127](a,b);return}function Nw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+16>>2]&127](a,b);return}function Ow(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+36>>2]&127](a,b);return}function Pw(a,b){a=a|0;b=b|0;b=(b|0)<2?b:2;c[a+176>>2]=(b|0)>0?b:0;return}function Qw(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;B(7);return 0.0}function Rw(a,b){a=a|0;b=b|0;return +(+f[(aG(c[a+12>>2]|0,b)|0)>>2])}function Sw(a,b,c){a=a|0;b=b|0;c=c|0;Jh(a,b,c);return}function Tw(a){a=a|0;var b=0;b=((NJ(c[a+236>>2]|0)|0)&2|0)==0;return (b?0:a)|0}function Uw(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Pa[a&127](b|0,c|0,d|0,e|0)}function Vw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+12>>2]&127](a,b);return}function Ww(a,b,c){a=a|0;b=b|0;c=c|0;uk(a,b,c);return}function Xw(a,b){a=a|0;b=b|0;return lE(c[a+12>>2]|0,b)|0}function Yw(a,b){a=a|0;b=b|0;ve(a,b);return}function Zw(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+68>>2]&127](a,b);return}function _w(b){b=b|0;a[b+16>>0]=1;c[b+12>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;return}function $w(a,b){a=a|0;b=+b;c[a+260>>2]=(c[a+260>>2]|0)+1;f[a+224>>2]=b;return}function ax(a,b,c){a=a|0;b=b|0;c=c|0;S(4,a|0,b|0,c|0)|0;return}function bx(){var a=0;a=ms()|0;kf(a,1,1);return a|0}function cx(a){a=a|0;return KF(c[a+204>>2]|0)|0}function dx(a,b,c){a=a|0;b=+b;c=+c;ay(a,b,c);return}function ex(a,b){a=a|0;b=+b;Da[c[(c[a>>2]|0)+20>>2]&31](a,b);return}function fx(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;Mk(a,b,c,d);return}function gx(a,b){a=a|0;b=b|0;ip(a,b);return}function hx(a,b){a=a|0;b=b|0;ip(a,b);return}function ix(a,b){a=a|0;b=b|0;c[b>>2]=6;c[b+4>>2]=6;return}function jx(a,b){a=a|0;b=b|0;Qv(a+788|0,b);return}function kx(a,b){a=a|0;b=+b;Da[c[(c[a>>2]|0)+16>>2]&31](a,b);return}function lx(a,b){a=a|0;b=b|0;return +(+f[(c[a+144>>2]|0)+(b*284|0)+232>>2])}function mx(){var a=0;a=GI(196)|0;_g(a,0);return a|0}function nx(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+24>>2]&127](a,b);return}function ox(a,b){a=a|0;b=b|0;ip(a,b);return}function px(a,b,d){a=a|0;b=b|0;d=d|0;c[a+20>>2]=b;c[a+28>>2]=d;return}function qx(a,b,d){a=a|0;b=b|0;d=d|0;c[a+16>>2]=b;c[a+24>>2]=d;return}function rx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return 0}function sx(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=d|0;e=+e;return sa[a&1](b|0,+c,d|0,+e)|0}function tx(a,b,c){a=a|0;b=b|0;c=+c;Yl(a,b,c);return}function ux(a,b){a=a|0;b=b|0;return c[(aG(c[a+12>>2]|0,b)|0)>>2]|0}function vx(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+64>>2]&127](a,b);return}function wx(a,b){a=a|0;b=b|0;Qz(a+112|0,b);return}function xx(a,b){a=a|0;b=b|0;return EC(c[a+12>>2]|0,b)|0}function yx(a,b,c){a=a|0;b=b|0;c=c|0;ol(a,b,c);return}function zx(a,b,c){a=a|0;b=b|0;c=+c;f[a+1340+(b<<2)>>2]=c;return}function Ax(a){a=a|0;if(!a)return;vD(a);LJ(a);return}function Bx(a,b){a=a|0;b=b|0;Ia[c[(c[a>>2]|0)+44>>2]&127](a,b);return}function Cx(a){a=a|0;var b=0;b=NJ(a+28|0)|0;return +(+f[b+(c[a+52>>2]<<2)>>2])}function Dx(a,b,c){a=a|0;b=b|0;c=c|0;return bb(a,b,c)|0}function Ex(a,b){a=a|0;b=b|0;Pw(a,b);return}function Fx(a,b,c){a=a|0;b=b|0;c=+c;Dq(a,b,c);return}function Gx(a){a=a|0;c[a>>2]=4704;ii(a+12|0);LJ(a);return}function Hx(a,b){a=a|0;b=b|0;ip(a,b);return}function Ix(a,b){a=a|0;b=b|0;_m(a,b);return}function Jx(a,b){a=a|0;b=b|0;ew(a+708|0,b);return}function Kx(a){a=a|0;if(!a)return;kH(a);LJ(a);return}function Lx(a,b,c){a=a|0;b=b|0;c=+c;f[a+1364+(b<<2)>>2]=c;return}function Mx(a,b){a=a|0;b=b|0;Tx(a+4|0,b);return}function Nx(a,b){a=a|0;b=b|0;od(a,b);return}function Ox(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;Na[a&15](b|0,c|0,d|0,+e)}function Px(a){a=+a;var b=0;b=Vs()|0;Xo(b,a);return b|0}function Qx(a,b){a=a|0;b=b|0;Du(a,b);return}function Rx(a,b){a=a|0;b=+b;f[a+132>>2]=b;return}function Sx(a,b){a=a|0;b=+b;nz(a,b);return}function Tx(a,b){a=a|0;b=b|0;Zo(a,b);return}function Ux(a){a=a|0;var b=0;b=(NJ(c[a+236>>2]|0)|0)==4;return (b?a:0)|0}function Vx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;Ka[a&7](b|0,c|0,+d,e|0)}function Wx(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;Ha[a&1](b|0,+c,d|0,e|0)}function Xx(a,b){a=a|0;b=+b;f[a+128>>2]=b;return}function Yx(a,b){a=a|0;b=b|0;NC(a,b);return}function Zx(a,b){a=a|0;b=b|0;sr(a,b);return}function _x(a,b){a=a|0;b=b|0;tr(a,b);return}function $x(a,b){a=a|0;b=b|0;c[a+24>>2]=b;return}function ay(a,b,c){a=a|0;b=+b;c=+c;f[a+472>>2]=b;f[a+476>>2]=c;return}function by(a,b){a=a|0;b=b|0;return YC(a,b)|0}function cy(a,b){a=a|0;b=b|0;f[a+48>>2]=+(b|0);return}function dy(a){a=a|0;var b=0;b=ea;ea=ea+16|0;Ba[a&3]();Ev(22343,b)}function ey(b,c){b=b|0;c=+c;f[b+572>>2]=c;a[b+553>>0]=1;return}function fy(a,b){a=a|0;b=b|0;return c[(c[a+20>>2]|0)+(b<<2)>>2]|0}function gy(a){a=a|0;var b=0;b=(NJ(c[a+236>>2]|0)|0)==8;return (b?a:0)|0}function hy(a){a=a|0;if(!a)return;uF(a);LJ(a);return}function iy(a){a=a|0;return +(+XI(+f[a+16>>2]))}function jy(a){a=a|0;return ra[c[(c[a>>2]|0)+40>>2]&127](a)|0}function ky(a,b){a=a|0;b=b|0;vy(a+24|0,b);return}function ly(a){a=a|0;Us(a);_w(a);return}function my(a){a=a|0;return +(+VA(+f[a>>2],+f[a+4>>2],+f[a+8>>2]))}function ny(a,b){a=a|0;b=+b;tC(a,b);return}function oy(a,b){a=a|0;b=b|0;$C(a,b);return}function py(a,b){a=a|0;b=b|0;qC(a,b);return}function qy(a,b){a=a|0;b=+b;Da[c[(c[a>>2]|0)+44>>2]&31](a,b);return}function ry(a,b){a=a|0;b=b|0;Qp(a,b);return}function sy(a,b){a=a|0;b=+b;f[a+136>>2]=b;return}function ty(a){a=a|0;return QG(+f[a+4>>2])|0}function uy(a){a=a|0;if(!a)return;c[6748]=(c[6748]|0)+1;uc(c[a+-4>>2]|0);return}function vy(a,b){a=a|0;b=b|0;Sm(a,b);return}function wy(a,b){a=a|0;b=b|0;return (c[a+144>>2]|0)+(b*284|0)+92|0}function xy(a,b){a=a|0;b=b|0;return kw(a,b)|0}function yy(a,b,c,d,e,f){a=+a;b=+b;c=+c;d=+d;e=+e;f=+f;return +(a*d+b*e+c*f)}function zy(a){a=a|0;c[a>>2]=3836;b[a+4>>1]=1;b[a+6>>1]=-1;return}function Ay(){var a=0;a=GI(24)|0;rr(a);return a|0}function By(a,b){a=a|0;b=b|0;Tp(a,b);return}function Cy(a,b){a=a|0;b=+b;pD(a,b);return}function Dy(a,b){a=a|0;b=b|0;return IE(c[a+12>>2]|0,b)|0}function Ey(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return}function Fy(a){a=a|0;f[a>>2]=.30000001192092896;f[a+4>>2]=1.0;f[a+8>>2]=0.0;return}function Gy(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;B(17);return 0}function Hy(a,b){a=a|0;b=+b;HC(a,b);return}function Iy(a){a=a|0;Ca[c[(c[a>>2]|0)+44>>2]&511](a);return}function Jy(a,b){a=a|0;b=b|0;Kq(a+4|0,b);return}function Ky(a){a=a|0;dr(a);LJ(a);return}function Ly(a){a=a|0;return nG(c[a+204>>2]|0)|0}function My(a,b){a=a|0;b=+b;wD(a,b);return}function Ny(a,b){a=a|0;b=+b;aA(a,b);return}function Oy(a,b){a=a|0;b=+b;xD(a,b);return}function Py(a,b){a=a|0;b=+b;bA(a,b);return}function Qy(a,b){a=a|0;b=b|0;Ms(a,b);return}function Ry(a,b){a=a|0;b=b|0;Up(a,b);return}function Sy(a){a=a|0;return +(+XI(+f[a+112>>2]))}function Ty(b,c){b=b|0;c=c|0;a[b+32>>0]=c&1;return}function Uy(a){a=a|0;return ra[c[(c[a>>2]|0)+96>>2]&127](a)|0}function Vy(a){a=a|0;return hG(c[a+8>>2]|0)|0}function Wy(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return va[a&63](b|0,c|0,d|0)|0}function Xy(a,b){a=a|0;b=b|0;return +(+Em(a,b))}function Yy(a,b){a=a|0;b=b|0;Jh(a,b,1);return}function Zy(a,b){a=a|0;b=b|0;SC(a,b);return}function _y(a){a=a|0;if(!a)a=0;else a=(yi(a,3528)|0)!=0&1;return a|0}function $y(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=+e;_p(a,c,d,e,b);return}function az(a){a=a|0;Wi(a);LJ(a);return}function bz(a,b){a=a|0;b=b|0;Ql(a,b);return}function cz(a,b){a=a|0;b=+b;f[a+116>>2]=b;return}function dz(a){a=a|0;return ra[c[(c[a>>2]|0)+20>>2]&127](a)|0}function ez(a,b){a=a|0;b=b|0;wB(a,b,+QE(b));return}function fz(a){a=a|0;c[a>>2]=4704;ii(a+12|0);return}function gz(a,b){a=a|0;b=b|0;oD(a,b);return}function hz(a,b){a=a|0;b=b|0;Dt(a,b);return}function iz(){var a=0;a=GI(100)|0;Wl(a);return a|0}function jz(a,b){a=a|0;b=+b;f[a+112>>2]=b;return}function kz(a,b){a=a|0;b=+b;f[a+124>>2]=b;return}function lz(a,b){a=a|0;b=b|0;ZC(a,b);return}function mz(a,b){a=a|0;b=b|0;return c[(c[a+220>>2]|0)+(b<<2)>>2]|0}function nz(b,c){b=b|0;c=+c;f[b+572>>2]=c;a[b+553>>0]=0;return}function oz(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return +ka[a&15](b|0,c|0,d|0)}function pz(a,b){a=a|0;b=b|0;_C(a,b);return}function qz(a,b){a=a|0;b=b|0;return bb(a,b,8192)|0}function rz(b,c){b=b|0;c=c|0;a[b+120>>0]=c&1;return}function sz(a){a=a|0;Ca[c[(c[a>>2]|0)+24>>2]&511](a);return}function tz(){var a=0;a=GI(12)|0;Fy(a);return a|0}function uz(a){a=a|0;if(!a)return;Eu(a);LJ(a);return}function vz(a){a=a|0;zy(a);c[a>>2]=3812;return}function wz(a){a=a|0;return SG(a)|0}function xz(a,b){a=a|0;b=+b;rw(a,b);return}function yz(a,b){a=a|0;b=b|0;return +(+me(a,b))}function zz(a){a=a|0;return +(+XI(+f[a+120>>2]))}function Az(){var a=0;a=GI(4)|0;hC(a);return a|0}function Bz(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return}function Cz(a){a=a|0;return MG(c[a+204>>2]|0)|0}function Dz(a,b){a=a|0;b=+b;aE(a,b);return}function Ez(a,b){a=a|0;b=b|0;Gg(a,b);return}function Fz(a){a=a|0;Bi(a);return}function Gz(a,b){a=a|0;b=+b;_D(a,b);return}function Hz(a){a=a|0;return ra[c[(c[a>>2]|0)+28>>2]&127](a)|0}function Iz(a){a=a|0;return oG(a)|0}function Jz(a,b){a=a|0;b=b|0;return Wu(a,b)|0}function Kz(){var a=0;a=GI(4)|0;c[a>>2]=0;OF(a);return a|0}function Lz(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return ua[a&7](b|0,c|0,+d)|0}function Mz(a){a=a|0;return +(+f[a+132>>2])}function Nz(a){a=a|0;return rA(c[a+68>>2]|0)|0}function Oz(a){a=a|0;return ra[c[(c[a>>2]|0)+48>>2]&127](a)|0}function Pz(a,b){a=a|0;b=b|0;ip(a,b);return}function Qz(a,b){a=a|0;b=b|0;fp(a,b);return}function Rz(b,c){b=b|0;c=c|0;a[b+80>>0]=c&1;return}function Sz(a,b){a=a|0;b=b|0;yD(a,b);return}function Tz(a){a=a|0;return +(+XI(+f[a+232>>2]))}function Uz(a){a=a|0;return +(+XI(+f[a+448>>2]))}function Vz(a){a=a|0;return +(+f[a+128>>2])}function Wz(a,b){a=a|0;b=b|0;return (c[a+144>>2]|0)+(b*284|0)|0}function Xz(a,b){a=a|0;b=b|0;DD(a,b);return}function Yz(a){a=a|0;c[a+4>>2]=(c[a+4>>2]|0)+-1;return}function Zz(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;B(41)}function _z(a){a=a|0;return +(+XI(+f[a+444>>2]))}function $z(a){a=a|0;return nD(a)|0}function aA(a,b){a=a|0;b=+b;f[a+196>>2]=+Fs(b);return}function bA(a,b){a=a|0;b=+b;f[a+192>>2]=+Fs(b);return}function cA(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ma[a&127](b|0,c|0,d|0)}function dA(a,b){a=a|0;b=b|0;Kq(a+92|0,b);return}function eA(a){a=a|0;Ti(a);LJ(a);return}function fA(a,b){a=a|0;b=+b;f[a+268>>2]=b;return}function gA(a){a=a|0;return +(+XI(+f[a+80>>2]))}function hA(a,b){a=a|0;b=b|0;zj(a,b);return}function iA(a,b){a=a|0;b=b|0;return wH(c[a+12>>2]|0,b)|0}function jA(a){a=a|0;return xH(a)|0}function kA(a,b){a=a|0;b=+b;Jw(a,b);return}function lA(a){a=a|0;return +(+XI(+f[a+228>>2]))}function mA(a,b){a=a|0;b=+b;f[a+96>>2]=b;return}function nA(a,b,c){a=a|0;b=b|0;c=+c;f[a+20+(b<<2)>>2]=c;return}function oA(a){a=a|0;return +(+ha[c[(c[a>>2]|0)+48>>2]&15](a))}function pA(a,c){a=a|0;c=c|0;b[a+10>>1]=c;return}function qA(a,c){a=a|0;c=c|0;b[a+8>>1]=c;return}function rA(a){a=a|0;return ra[c[(c[a>>2]|0)+36>>2]&127](a)|0}function sA(a){a=a|0;var b=0;b=ea;ea=ea+a|0;ea=ea+15&-16;return b|0}function tA(a,b){a=a|0;b=b|0;Rr(a,b);return}function uA(a,b){a=a|0;b=b|0;Ic(a,b);return}function vA(a,b){a=a|0;b=b|0;$D(a,b);return}function wA(a){a=a|0;return +(+f[a+136>>2])}function xA(b){b=b|0;return (a[b+32>>0]&1)!=0|0}function yA(b,c){b=b|0;c=c|0;a[b+170>>0]=c&1;return}function zA(a,b){a=a|0;b=b|0;R(3,a|0,b|0)|0;return}function AA(a,b,d){a=a|0;b=b|0;d=d|0;if(!(c[a>>2]&32))Kj(b,d,a);return}function BA(a,b){a=a|0;b=b|0;Kr(a,b);return}function CA(a,b){a=a|0;b=b|0;en(a+288|0,b);return}function DA(a,b){a=a|0;b=b|0;return Tw(b)|0}function EA(a,b){a=a|0;b=+b;f[a+108>>2]=b;return}function FA(a,c){a=a|0;c=c|0;b[a+12>>1]=c;return}function GA(a,b){a=a|0;b=b|0;Gg(b,a);return}function HA(a,b){a=a|0;b=+b;f[a+272>>2]=b;return}function IA(a){a=a|0;return +(+XI(+f[a+224>>2]))}function JA(a){a=a|0;return CH(a)|0}function KA(a){a=a|0;return DH(a)|0}function LA(a){a=a|0;return IH(a)|0}function MA(a){a=a|0;if(!a)return;QH(a);LJ(a);return}function NA(a,c){a=a|0;c=c|0;b[a+4>>1]=c;return}function OA(a,c){a=a|0;c=c|0;b[a+14>>1]=c;return}function PA(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(16);return 0}function QA(a){a=a|0;Yz(a);return}function RA(a,b){a=a|0;b=b|0;hA(a,b);return}function SA(a,b){a=a|0;b=b|0;return gy(b)|0}function TA(a,b){a=a|0;b=b|0;c[a+44>>2]=b&1;return}function UA(a,c){a=a|0;c=c|0;b[a+6>>1]=c;return}function VA(a,b,c){a=+a;b=+b;c=+c;return +(+AJ(+iB(a,b,c)))}function WA(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;Ga[a&15](b|0,+c,d|0)}function XA(a,b){a=a|0;b=b|0;if(!a)a=0;else a=_j(a,b)|0;return a|0}function YA(a,b){a=a|0;b=+b;f[a+220>>2]=b;return}function ZA(a,b){a=a|0;b=+b;f[a+100>>2]=b;return}function _A(b){b=b|0;return (a[b+120>>0]&1)!=0|0}function $A(a,b){a=a|0;b=b|0;c[a+112>>2]=b;return}function aB(b,c){b=b|0;c=c|0;a[b+24>>0]=c&1;return}function bB(a){a=a|0;return ~~+f[a+48>>2]|0}function cB(b,c){b=b|0;c=c|0;a[b+180>>0]=c&1;return}function dB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;Ja[a&7](b|0,c|0,+d)}function eB(a,b){a=a|0;b=+b;f[a+224>>2]=b;return}function fB(a,b){a=a|0;b=+b;$w(a,b);return}function gB(a){a=a|0;return oC(c[a+216>>2]|0)|0}function hB(a,b){a=a|0;b=b|0;Pz(a,b);return}function iB(a,b,c){a=+a;b=+b;c=+c;return +(+yy(a,b,c,a,b,c))}function jB(a){a=+a;if(!(a<-1.0)){if(a>1.0)a=1.0}else a=-1.0;return +(+w(+a))}function kB(a){a=a|0;return +(+f[a+116>>2])}function lB(a){a=a|0;return +(+Qq(a))}function mB(b,c){b=b|0;c=c|0;a[b+16>>0]=c&1;return}function nB(a){a=a|0;return oE(a)|0}function oB(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;B(4);return 0.0}function pB(a,b){a=a|0;b=+b;f[a+276>>2]=b;return}function qB(a,b){a=a|0;b=+b;f[a+204>>2]=b;return}function rB(a,b){a=a|0;b=+b;f[a+208>>2]=b;return}function sB(a){a=a|0;return +(+f[a+112>>2])}function tB(a){a=a|0;return +(+f[a+124>>2])}function uB(a,b,c){a=a|0;b=+b;c=c|0;return}function vB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return}function wB(a,b,c){a=a|0;b=b|0;c=+c;rn(a,b,1.0/c);return}function xB(a){a=a|0;ge(a);LJ(a);return}function yB(a,b){a=a|0;b=b|0;Jf(a,b);return}function zB(a){a=a|0;return NJ(c[a+8>>2]|0)|0}function AB(a,b){a=a|0;b=b|0;R(5,a|0,b|0)|0;return}function BB(a,b){a=a|0;b=+b;f[a+216>>2]=b;return}function CB(b){b=b|0;return (a[b+80>>0]&1)!=0|0}function DB(a){a=a|0;if(!a)return;uy(a);return}function EB(a,b){a=a|0;b=b|0;c[a+36>>2]=b;return}function FB(a,b){a=a|0;b=b|0;c[a+32>>2]=b;return}function GB(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Yd(a,b,c,d,0)|0}function HB(b,c){b=b|0;c=c|0;a[b+260>>0]=c&1;return}function IB(b,c){b=b|0;c=c|0;a[b+25>>0]=c&1;return}function JB(a,b,c){a=a|0;b=+b;c=c|0;return}function KB(a,b){a=a|0;b=b|0;c[a+72>>2]=b;return}function LB(a){a=a|0;Nt(a,+QE(a))|0;return}function MB(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;Ea[a&7](b|0,+c,+d)}function NB(a){a=a|0;return +(+fI(+f[a+12>>2]))}function OB(a,b){a=a|0;b=b|0;c[a+8>>2]=b;return}function PB(a){a=a|0;c[a>>2]=0;qD(a);return}function QB(a){a=a|0;return YH(a)|0}function RB(a){a=a|0;return NJ(c[a+84>>2]|0)|0}function SB(a,b){a=a|0;b=b|0;return +(+ps(a,b))}function TB(a,b){a=a|0;b=+b;f[a+16>>2]=b;return}function UB(){var a=0;a=ea;ea=ea+16|0;Ev(22214,a)}function VB(a,b){a=a|0;b=b|0;c[a+216>>2]=b;return}function WB(b,c){b=b|0;c=c|0;a[b+26>>0]=c&1;return}function XB(b,c){b=b|0;c=c|0;a[b+84>>0]=c&1;return}function YB(a){a=a|0;Bj(a);LJ(a);return}function ZB(a){a=a|0;Xj(a);LJ(a);return}function _B(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(40)}function $B(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function aC(a){a=a|0;return gI(a)|0}function bC(a){a=a|0;return NJ(c[a+88>>2]|0)|0}function cC(a){a=a|0;return HE(a)|0}function dC(a){a=a|0;return (c[a+116>>2]|0)+4|0}function eC(a){a=a|0;return NJ(c[a+748>>2]|0)|0}function fC(a,b){a=a|0;b=b|0;c[a+4>>2]=b;return}function gC(a,b){a=a|0;b=b|0;$l(a+28|0,b);return}function hC(a){a=a|0;iH(a);c[a>>2]=3732;return}function iC(a,b,c){a=a|0;b=b|0;c=c|0;return ta[a&31](b|0,c|0)|0}function jC(a,b){a=a|0;b=+b;f[a+244>>2]=b;return}function kC(a,b){a=a|0;b=+b;f[a+240>>2]=b;return}function lC(a){a=a|0;return +(+f[a+104>>2])}function mC(a,b){a=a|0;b=b|0;return Vk(a,b)|0}function nC(a){a=a|0;return oI(a)|0}function oC(a){a=a|0;a=NJ(a)|0;return (a|0)!=2&(a|0)!=5|0}function pC(a){a=a|0;Cj(a);LJ(a);return}function qC(b,c){b=b|0;c=c|0;a[b+524>>0]=c&1;return}function rC(a,b){a=a|0;b=b|0;return a+(b*96|0)|0}function sC(a,b){a=a|0;b=b|0;return a+(b*80|0)|0}function tC(a,b){a=a|0;b=+b;f[a+248>>2]=b;return}function uC(a,b){a=a|0;b=+b;f[a+212>>2]=b;return}function vC(a,b){a=a|0;b=+b;f[a+228>>2]=b;return}function wC(a){a=a|0;return +(+f[a+268>>2])}function xC(a){a=a|0;return UE(a)|0}function yC(a){a=a|0;return kI(a)|0}function zC(a,b){a=a|0;b=b|0;return ao(a,b)|0}function AC(a,b){a=a|0;b=b|0;return $n(a,b)|0}function BC(a,b){a=a|0;b=b|0;return +(+Ho(a,b))}function CC(a){a=a|0;return +(+Cx(a))}function DC(a){a=a|0;return ((WE(a)|0)^1)&1|0}function EC(a,b){a=a|0;b=b|0;return a+(b*104|0)|0}function FC(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;B(39)}function GC(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;f=f|0;B(33)}function HC(a,b){a=a|0;b=+b;f[a+252>>2]=b;return}function IC(a){a=a|0;return +(+f[a+96>>2])}function JC(a,b){a=a|0;b=b|0;return +(+f[a+20+(b<<2)>>2])}function KC(a){a=a|0;return xI(a)|0}function LC(a){a=a|0;return (c[a+44>>2]|0)!=0|0}function MC(a){a=a|0;ii(a);LJ(a);return}function NC(a,b){a=a|0;b=b|0;c[a+84>>2]=b;return}function OC(a,b){a=a|0;b=b|0;return Pp(a,b)|0}function PC(a){a=a|0;return nI(a)|0}function QC(a){a=a|0;return NJ(c[a+128>>2]|0)|0}function RC(b){b=b|0;return (a[b+24>>0]&1)!=0|0}function SC(b,c){b=b|0;c=c|0;a[b+552>>0]=c&1;return}function TC(a,b,c){a=a|0;b=b|0;c=c|0;return 0}function UC(a){a=a|0;return xG(a)|0}function VC(a){a=a|0;return NJ(c[a+188>>2]|0)|0}function WC(a){a=a|0;return +(+f[a+108>>2])}function XC(a){a=a|0;Dj(a);LJ(a);return}function YC(a,b){a=a|0;b=b|0;return a+4+(b*184|0)|0}function ZC(b,c){b=b|0;c=c|0;a[b+736>>0]=c&1;return}function _C(a,b){a=a|0;b=b|0;c[a+204>>2]=b;return}function $C(a,b){a=a|0;b=b|0;c[a+88>>2]=b;return}function aD(a,b,c,d,e,f){a=a|0;b=+b;c=+c;d=d|0;e=e|0;f=f|0;B(24)}function bD(a,b){a=a|0;b=+b;f[a+232>>2]=b;return}function cD(a,b){a=a|0;b=+b;f[a+280>>2]=b;return}function dD(a,b){a=a|0;b=+b;f[a+236>>2]=b;return}function eD(a){a=a|0;return +(+f[a+272>>2])}function fD(a){a=a|0;return NJ(c[a+116>>2]|0)|0}function gD(a){a=a|0;return NJ(c[a+120>>2]|0)|0}function hD(a,b){a=a|0;b=+b;return Nt(a,b)|0}function iD(a){a=a|0;return NJ(c[a+744>>2]|0)|0}function jD(a){a=a|0;return NJ(c[a+740>>2]|0)|0}function kD(b){b=b|0;return (a[b+16>>0]&1)!=0|0}function lD(a){a=a|0;return b[a+10>>1]|0}function mD(a){a=a|0;return b[a+8>>1]|0}function nD(a){a=a|0;return NJ(c[a+268>>2]|0)|0}function oD(b,c){b=b|0;c=c|0;a[b+21>>0]=c&1;return}function pD(a,b){a=a|0;b=+b;f[a+684>>2]=b;return}function qD(a){a=a|0;c[a>>2]=c[a>>2]|1;return}function rD(a){a=a|0;return NJ(c[a+192>>2]|0)|0}function sD(a){a=a|0;return NJ(c[a+204>>2]|0)|0}function tD(a){a=a|0;return NJ(c[a+24>>2]|0)|0}function uD(a){a=a|0;return NJ(c[a+68>>2]|0)|0}function vD(a){a=a|0;hs(a);return}function wD(a,b){a=a|0;b=+b;f[a+188>>2]=b;return}function xD(a,b){a=a|0;b=+b;f[a+184>>2]=b;return}function yD(a,b){a=a|0;b=b|0;c[a+240>>2]=b;return}function zD(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;B(6);return 0.0}function AD(a){a=a|0;return +(+f[a+220>>2])}function BD(a){a=a|0;return +(+f[a+100>>2])}function CD(a){a=a|0;return b[a+12>>1]|0}function DD(b,c){b=b|0;c=c|0;a[b+737>>0]=c&1;return}function ED(a,b){a=a|0;b=+b;f[a+256>>2]=b;return}function FD(a){a=a|0;return +(+f[a+224>>2])}function GD(a,b){a=a|0;b=b|0;return Mr(a,b)|0}function HD(a,b){a=a|0;b=b|0;return Lr(a,b)|0}function ID(a){a=a|0;return pg(a)|0}function JD(a){a=a|0;return NJ(c[a+480>>2]|0)|0}function KD(a){a=a|0;return NJ(c[a+124>>2]|0)|0}function LD(a){a=a|0;return b[a+4>>1]|0}function MD(a){a=a|0;return b[a+14>>1]|0}function ND(a,b){a=a|0;b=b|0;c[a+84>>2]=b;return}function OD(a,b){a=a|0;b=b|0;c[a+88>>2]=b;return}function PD(a,b){a=a|0;b=b|0;c[a+92>>2]=b;return}function QD(a,b){a=a|0;b=b|0;c[a+100>>2]=b;return}function RD(a,b){a=a|0;b=b|0;c[a+96>>2]=b;return}function SD(a){a=a|0;return (c[a+48>>2]|0)==1|0}function TD(a){a=a|0;Ej(a);LJ(a);return}function UD(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;return}function VD(b){b=b|0;return (a[b+260>>0]&1)!=0|0}function WD(a){a=a|0;return NJ(c[a+240>>2]|0)|0}function XD(b){b=b|0;return (a[b+25>>0]&1)!=0|0}function YD(a){a=a|0;return b[a+6>>1]|0}function ZD(a){a=a|0;return (c[a+92>>2]|0)+4|0}function _D(a,b){a=a|0;b=+b;f[a+440>>2]=b;return}function $D(a,b){a=a|0;b=b|0;c[a+240>>2]=b;return}function aE(a,b){a=a|0;b=+b;f[a+104>>2]=b;return}function bE(a,b,c){a=a|0;b=b|0;c=c|0;Ia[a&127](b|0,c|0)}function cE(a,b,c){a=a|0;b=b|0;c=+c;return +ia[a&1](b|0,+c)}function dE(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;B(2);return 0.0}function eE(a){a=a|0;return +(+f[a+276>>2])}function fE(a){a=a|0;return +(+f[a+208>>2])}function gE(a){a=a|0;return c[a+112>>2]|0}function hE(a){a=a|0;return +(+Av(a))}function iE(a,b){a=a|0;b=b|0;c[a+16>>2]=b;return}function jE(a,b){a=a|0;b=+b;f[a+64>>2]=b;return}function kE(a,b){a=a|0;b=+b;f[a+68>>2]=b;return}function lE(a,b){a=a|0;b=b|0;return a+(b<<5)|0}function mE(a){a=a|0;return NJ(c[a+52>>2]|0)|0}function nE(a){a=a|0;if(!a)return;LJ(a);return}function oE(a){a=a|0;return NJ(c[a+16>>2]|0)|0}function pE(a){a=a|0;return +(+f[a+216>>2])}function qE(a,b){a=a|0;b=+b;pG(a,b);return}function rE(b){b=b|0;return (a[b+26>>0]&1)!=0|0}function sE(b){b=b|0;return (a[b+84>>0]&1)!=0|0}function tE(a,b){a=a|0;b=+b;f[a+80>>2]=b;return}function uE(a,b){a=a|0;b=+b;f[a+76>>2]=b;return}function vE(a){a=a|0;return +(+f[a+28>>2]*+f[a+12>>2])}function wE(a,b,c){a=a|0;b=b|0;c=c|0;return}function xE(a,b,c){a=a|0;b=b|0;c=c|0;return Ui(a,b,c)|0}function yE(a){a=a|0;return +(+f[a+248>>2])}function zE(a){a=a|0;return zI(a)|0}function AE(a,b){a=a|0;b=+b;f[a+60>>2]=b;return}function BE(a,b){a=a|0;b=+b;f[a+52>>2]=b;return}function CE(a,b){a=a|0;b=+b;f[a+56>>2]=b;return}function DE(a,b){a=a|0;b=b|0;c[a+20>>2]=b;return}function EE(a,b,c){a=a|0;b=b|0;c=+c;return 0}function FE(a){a=a|0;return +(+f[a+204>>2])}function GE(a){a=a|0;yq(a);return}function HE(a){a=a|0;return NJ(c[a+136>>2]|0)|0}function IE(a,b){a=a|0;b=b|0;return a+(b*36|0)|0}function JE(a,b){a=a|0;b=b|0;return}function KE(a,b){a=a|0;b=+b;NG(a,b);return}function LE(a,b){a=a|0;b=+b;OG(a,b);return}function ME(a,b){a=a|0;b=+b;hH(a,b);return}function NE(a){a=a|0;return c[a+36>>2]|0}function OE(a){a=a|0;return c[a+32>>2]|0}function PE(a){a=a|0;return (c[a+48>>2]|0)+4|0}function QE(a){a=a|0;return +(+AJ(+cG(a)))}function RE(a){a=a|0;c[6720]=a;return}function SE(a){a=a|0;c[6719]=a;return}function TE(a){a=a|0;return a+44|0}function UE(a){a=a|0;return NJ(c[a+12>>2]|0)|0}function VE(a){a=a|0;return c[a+68>>2]|0}function WE(b){b=b|0;return (a[b>>0]|0)!=0|0}function XE(a,b,c){a=a|0;b=b|0;c=+c;Da[a&31](b|0,+c)}function YE(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;B(38)}function ZE(a){a=a|0;return +(+f[(rJ(a)|0)>>2])}function _E(a){a=a|0;return +(+f[(sJ(a)|0)>>2])}function $E(a){a=a|0;return +(+f[(qJ(a)|0)>>2])}function aF(a){a=a|0;return MI(a)|0}function bF(a){a=a|0;LB(a);return}function cF(a){a=a|0;return c[a+8>>2]|0}function dF(a,b){a=a|0;b=+b;f[a+92>>2]=b;return}function eF(a,b){a=a|0;b=+b;f[a+40>>2]=b;return}function fF(a,b){a=a|0;b=+b;f[a+36>>2]=b;return}function gF(a,b){a=a|0;b=+b;f[a+48>>2]=b;return}function hF(a){a=a|0;return a+60|0}function iF(a){a=a|0;return c[a+200>>2]|0}function jF(a){a=a|0;return +(+f[a+244>>2])}function kF(a){a=a|0;return +(+f[a+240>>2])}function lF(a){a=a|0;return +(+cG(a))}function mF(a,b){a=a|0;b=+b;f[a+24>>2]=b;return}function nF(a,b){a=a|0;b=+b;f[a+20>>2]=b;return}function oF(a,b){a=a|0;b=+b;f[a+32>>2]=b;return}function pF(a,b){a=a|0;b=+b;f[a+16>>2]=b;return}function qF(a,b){a=a|0;b=+b;f[a+28>>2]=b;return}function rF(a,b){a=a|0;b=b|0;c[a>>2]=b;return}function sF(a){a=a|0;return c[a+212>>2]|0}function tF(a){a=a|0;c[a+192>>2]=0;return}function uF(a){a=a|0;ly(a);return}function vF(a,b,c){a=a|0;b=b|0;c=c|0;return}function wF(a,b){a=a|0;b=+b;f[a+72>>2]=b;return}function xF(a){a=a|0;return +(+f[a+212>>2])}function yF(a){a=a|0;return +(+f[a+228>>2])}function zF(a,b){a=a|0;b=+b;f[a+88>>2]=b;return}function AF(a){a=a|0;return c[a+24>>2]|0}function BF(a){a=a|0;c[6722]=a;return}function CF(a){a=a|0;_w(a);return}function DF(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;B(35)}function EF(a,b,c,d,e){a=a|0;b=b|0;c=+c;d=d|0;e=e|0;B(30)}function FF(a){a=a|0;return +(+f[a+252>>2])}function GF(a){a=a|0;return sJ(a)|0}function HF(a){a=a|0;return +(+QE(a))}function IF(a){a=a|0;return a+112|0}function JF(a,b,c){a=a|0;b=b|0;c=c|0;return 0.0}function KF(a){a=a|0;return (a&3|0)!=0|0}function LF(a){a=a|0;return ((a|0)==0?1:a<<1)|0}function MF(a){a=a|0;return c[a+136>>2]|0}function NF(a,b){a=a|0;b=+b;f[a+44>>2]=b;return}function OF(a){a=a|0;vI(a);c[a>>2]=3860;return}function PF(a){a=a|0;return NJ(c[a+4>>2]|0)|0}function QF(a){a=a|0;return a+156|0}function RF(a){a=a|0;return Q(6,a|0)|0}function SF(a){a=a|0;Dh(a);LJ(a);return}function TF(a){a=a|0;Mo(a);LJ(a);return}function UF(a){a=a|0;Zi(a);LJ(a);return}function VF(a){a=a|0;return +(+f[a+232>>2])}function WF(a){a=a|0;return +(+f[a+280>>2])}function XF(a){a=a|0;return +(+f[a+236>>2])}function YF(a){a=a|0;return 348}function ZF(a){a=a|0;return c[a+12>>2]|0}function _F(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;B(15);return 0}function $F(a){a=a|0;Ew(a);return}function aG(a,b){a=a|0;b=b|0;return a+(b<<2)|0}function bG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;B(5);return 0.0}function cG(a){a=a|0;return +(+Ho(a,a))}function dG(a){a=a|0;return (a?31-(A(a^a-1)|0)|0:32)|0}function eG(a){a=a|0;return +(+f[a+256>>2])}function fG(a){a=a|0;return +(+f[(NJ(a)|0)>>2])}function gG(a){a=a|0;return +(+f[a>>2])}function hG(a){a=a|0;return (a|0)!=0|0}function iG(a,b){a=a|0;b=b|0;return ra[a&127](b|0)|0}function jG(a){a=a|0;E(a|0)|0;JJ()}function kG(a){a=a|0;return a+64|0}function lG(a){a=a|0;return +(+f[a+64>>2])}function mG(a){a=a|0;return +(+f[a+68>>2])}function nG(a){a=a|0;return (a&2|0)!=0|0}function oG(a){a=a|0;return a+20|0}function pG(a,b){a=a|0;b=+b;f[a+12>>2]=b;return}function qG(a){a=a|0;return a+172|0}function rG(a){a=a|0;return c[a+4>>2]|0}function sG(a){a=a|0;return c[a+84>>2]|0}function tG(a){a=a|0;return c[a+88>>2]|0}function uG(a){a=a|0;return c[a+92>>2]|0}function vG(a){a=a|0;return c[a+100>>2]|0}function wG(a){a=a|0;return 252}function xG(a){a=a|0;return c[a+240>>2]|0}function yG(a,b,c,d){a=a|0;b=+b;c=c|0;d=+d;B(11);return 0}function zG(a){a=a|0;return a+52|0}function AG(a){a=a|0;return +(+f[a+80>>2])}function BG(a){a=a|0;return 28}function CG(a){a=a|0;return c[a+72>>2]|0}function DG(a,b){a=a|0;b=b|0;return +ha[a&15](b|0)}function EG(a){a=a|0;return c[a+16>>2]|0}function FG(a){a=a|0;return +(+f[a+76>>2])}function GG(a){a=a|0;return +(+f[a+60>>2])}function HG(a){a=a|0;return +(+f[a+52>>2])}function IG(a){a=a|0;return +(+f[a+56>>2])}function JG(a){a=a|0;return a+108|0}function KG(a){a=a|0;return 212}function LG(a){a=a|0;return c[a+96>>2]|0}function MG(a){a=a|0;return (a&1|0)!=0|0}function NG(a,b){a=a|0;b=+b;f[a+8>>2]=b;return}function OG(a,b){a=a|0;b=+b;f[a+4>>2]=b;return}function PG(a){a=a|0;return a+16|0}function QG(a){a=+a;return a<1.0|0}function RG(a,b){a=a|0;b=b|0;return 1}function SG(a){a=a|0;return a+324|0}function TG(a,b){a=a|0;b=b|0;ea=a;fa=b}function UG(a){a=a|0;return a+188|0}function VG(a){a=a|0;return c[a+20>>2]|0}function WG(a){a=a|0;return 204}function XG(a,b){a=a|0;b=b|0;return}function YG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;B(34)}function ZG(a){a=a|0;return a+36|0}function _G(a){a=a|0;return +(+f[a+92>>2])}function $G(a){a=a|0;return +(+f[a+44>>2])}function aH(a){a=a|0;return +(+f[a+40>>2])}function bH(a){a=a|0;return +(+f[a+36>>2])}function cH(a){a=a|0;return +(+f[a+48>>2])}function dH(a){a=a|0;return 64}function eH(a){a=a|0;return 220}function fH(a){a=a|0;return 256} +function _a(d,g){d=d|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0,G=0,H=0.0,I=0,J=0.0,K=0.0,L=0.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.0,_=0,$=0,aa=0,ba=0,ca=0,da=0,fa=0,ga=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;ma=ea;ea=ea+192|0;i=c[d+52>>2]|0;if(i|0?(Ca[c[c[i>>2]>>2]&511](i),j=c[d+52>>2]|0,j|0):0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[6747]=(c[6747]|0)+1;i=kb(151)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}c[i>>2]=10664;a[i+20>>0]=1;c[i+16>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;a[i+40>>0]=1;c[i+36>>2]=0;c[i+28>>2]=0;c[i+32>>2]=0;a[i+60>>0]=1;c[i+56>>2]=0;c[i+48>>2]=0;c[i+52>>2]=0;c[d+52>>2]=i;k=0;o=0;n=0;la=0;I=0;while(1){if((o|0)>=(ra[c[(c[d>>2]|0)+96>>2]&127](d)|0))break;do if((I|0)==(n|0)){j=(n|0)==0?1:n<<1;if((n|0)<(j|0)){if((j|0)!=0?(c[6747]=(c[6747]|0)+1,u=kb((j<<4|3)+16|0)|0,(u|0)!=0):0){c[(u+4+15&-16)+-4>>2]=u;l=u+4+15&-16}else l=0;if((n|0)<=0){if(!la){m=n;k=l;i=l;break}}else{i=0;do{ka=l+(i<<4)|0;ja=la+(i<<4)|0;c[ka>>2]=c[ja>>2];c[ka+4>>2]=c[ja+4>>2];c[ka+8>>2]=c[ja+8>>2];c[ka+12>>2]=c[ja+12>>2];i=i+1|0}while((i|0)!=(n|0))}c[6748]=(c[6748]|0)+1;uc(c[la+-4>>2]|0);m=n;k=l;i=l}else{m=n;j=n;i=la}}else{m=I;j=n;i=la}while(0);n=i+(I<<4)|0;c[n>>2]=c[ma>>2];c[n+4>>2]=c[ma+4>>2];c[n+8>>2]=c[ma+8>>2];c[n+12>>2]=c[ma+12>>2];Ma[c[(c[d>>2]|0)+108>>2]&127](d,o,n);o=o+1|0;n=j;la=i;I=m+1|0}a[ma+124+16>>0]=1;ka=ma+124+12|0;c[ka>>2]=0;c[ma+124+4>>2]=0;c[ma+124+8>>2]=0;a[ma+124+36>>0]=1;ja=ma+124+32|0;c[ja>>2]=0;c[ma+124+24>>2]=0;c[ma+124+28>>2]=0;a[ma+124+56>>0]=1;ia=ma+124+52|0;c[ia>>2]=0;c[ma+124+44>>2]=0;c[ma+124+48>>2]=0;if(g){if((I|0)>0){G=0;j=0;l=0;k=0;while(1){i=G;G=G+1|0;a:do if((G|0)<(I|0)){C=la+(i<<4)|0;F=la+(i<<4)+4|0;B=la+(i<<4)+8|0;m=G;i=k;while(1){A=m+1|0;b:do if((A|0)<(I|0)){g=la+(m<<4)|0;z=la+(m<<4)+4|0;u=la+(m<<4)+8|0;k=A;while(1){p=+f[C>>2];J=+f[g>>2]-p;q=+f[F>>2];L=+f[z>>2]-q;t=+f[B>>2];E=+f[u>>2]-t;H=+f[la+(k<<4)>>2]-p;K=+f[la+(k<<4)+4>>2]-q;D=+f[la+(k<<4)+8>>2]-t;y=(J*K-L*H)*(J*K-L*H)+((L*D-E*K)*(L*D-E*K)+(E*H-J*D)*(E*H-J*D));c:do if(y>9.999999747378752e-05){x=1.0/+s(+y);v=(L*D-E*K)*x;w=(E*H-J*D)*x;x=(J*K-L*H)*x;d:do if((i|0)>0){m=0;while(1){if(v*+f[l+(m<<4)>>2]+w*+f[l+(m<<4)+4>>2]+x*+f[l+(m<<4)+8>>2]>.9990000128746033)break d;m=m+1|0;if((m|0)>=(i|0)){fa=34;break}}}else fa=34;while(0);e:do if((fa|0)==34){fa=0;m=0;do{if(v*+f[la+(m<<4)>>2]+w*+f[la+(m<<4)+4>>2]+x*+f[la+(m<<4)+8>>2]-(v*p+w*q+x*t)+-.009999999776482582>0.0)break e;m=m+1|0}while((m|0)<(I|0));do if((i|0)==(j|0)){n=(j|0)==0?1:j<<1;if((j|0)<(n|0)){do if(!n)o=0;else{c[6747]=(c[6747]|0)+1;m=kb((n<<4|3)+16|0)|0;if(!m){o=0;break}c[(m+4+15&-16)+-4>>2]=m;o=m+4+15&-16}while(0);if((j|0)<=0){if(!l){m=j;j=n;l=o;break}}else{m=0;do{da=o+(m<<4)|0;ca=l+(m<<4)|0;c[da>>2]=c[ca>>2];c[da+4>>2]=c[ca+4>>2];c[da+8>>2]=c[ca+8>>2];c[da+12>>2]=c[ca+12>>2];m=m+1|0}while((m|0)!=(j|0))}c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);m=j;j=n;l=o}else m=j}else m=i;while(0);f[l+(m<<4)>>2]=v;f[l+(m<<4)+4>>2]=w;f[l+(m<<4)+8>>2]=x;f[l+(m<<4)+12>>2]=-(v*p+w*q+x*t);i=i+1|0}while(0);if(y>9.999999747378752e-05){q=1.0/+s(+y);v=-((L*D-E*K)*q);t=-((E*H-J*D)*q);q=-((J*K-L*H)*q);if((i|0)>0){m=0;do{if(+f[l+(m<<4)>>2]*v+ +f[l+(m<<4)+4>>2]*t+ +f[l+(m<<4)+8>>2]*q>.9990000128746033)break c;m=m+1|0}while((m|0)<(i|0))}p=+f[C>>2]*v+ +f[F>>2]*t+ +f[B>>2]*q;m=0;do{if(+f[la+(m<<4)>>2]*v+ +f[la+(m<<4)+4>>2]*t+ +f[la+(m<<4)+8>>2]*q-p+-.009999999776482582>0.0)break c;m=m+1|0}while((m|0)<(I|0));do if((i|0)==(j|0)){n=(j|0)==0?1:j<<1;if((j|0)>=(n|0)){m=j;break}do if(!n)o=0;else{c[6747]=(c[6747]|0)+1;m=kb((n<<4|3)+16|0)|0;if(!m){o=0;break}c[(m+4+15&-16)+-4>>2]=m;o=m+4+15&-16}while(0);if((j|0)<=0){if(!l){m=j;j=n;l=o;break}}else{m=0;do{da=o+(m<<4)|0;ca=l+(m<<4)|0;c[da>>2]=c[ca>>2];c[da+4>>2]=c[ca+4>>2];c[da+8>>2]=c[ca+8>>2];c[da+12>>2]=c[ca+12>>2];m=m+1|0}while((m|0)!=(j|0))}c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);m=j;j=n;l=o}else m=i;while(0);f[l+(m<<4)>>2]=v;f[l+(m<<4)+4>>2]=t;f[l+(m<<4)+8>>2]=q;f[l+(m<<4)+12>>2]=-p;i=i+1|0}}while(0);k=k+1|0;if((k|0)==(I|0))break b}}while(0);if((A|0)==(I|0))break a;m=A}}else i=k;while(0);if((G|0)==(I|0))break;else k=i}if((i|0)>0){n=0;o=0;u=0;while(1){da=l+(u<<4)|0;c[ma>>2]=c[da>>2];c[ma+4>>2]=c[da+4>>2];c[ma+8>>2]=c[da+8>>2];p=+f[l+(u<<4)+12>>2];p=p-+ha[c[(c[d>>2]|0)+48>>2]&15](d);do if((u|0)==(n|0)){m=(n|0)==0?1:n<<1;if((n|0)<(m|0)){if((m|0)!=0?(c[6747]=(c[6747]|0)+1,M=kb((m<<4|3)+16|0)|0,(M|0)!=0):0){c[(M+4+15&-16)+-4>>2]=M;k=M+4+15&-16}else k=0;if((n|0)<=0){if(!o){j=n;break}}else{j=0;do{da=k+(j<<4)|0;ca=o+(j<<4)|0;c[da>>2]=c[ca>>2];c[da+4>>2]=c[ca+4>>2];c[da+8>>2]=c[ca+8>>2];c[da+12>>2]=c[ca+12>>2];j=j+1|0}while((j|0)!=(n|0))}c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0);j=n}else{j=n;m=n;k=o}}else{j=u;m=n;k=o}while(0);da=k+(j<<4)|0;c[da>>2]=c[ma>>2];c[da+4>>2]=c[ma+4>>2];c[da+8>>2]=c[ma+8>>2];f[k+(j<<4)+12>>2]=p;u=u+1|0;if((u|0)<(i|0)){n=m;o=k}else break}m=0;N=0;n=0;j=0;i=0;do{M=N;N=N+1|0;f:do if((N|0)<(u|0)){o=N;while(1){I=o+1|0;g:do if((I|0)<(u|0)){C=k+(o<<4)+4|0;G=k+(o<<4)+8|0;F=k+(o<<4)|0;B=k+(o<<4)+12|0;o=I;while(1){v=+f[C>>2];p=+f[k+(o<<4)+8>>2];q=+f[G>>2];w=+f[k+(o<<4)+4>>2];x=+f[k+(o<<4)>>2];y=+f[F>>2];t=+f[k+(M<<4)+8>>2];D=+f[k+(M<<4)+4>>2];E=+f[k+(M<<4)>>2];h:do if((((w*y-v*x)*(w*y-v*x)+((v*p-q*w)*(v*p-q*w)+(q*x-p*y)*(q*x-p*y))>9.999999747378752e-05?(x*D-w*E)*(x*D-w*E)+((w*t-p*D)*(w*t-p*D)+(p*E-x*t)*(p*E-x*t))>9.999999747378752e-05:0)?(v*E-y*D)*(v*E-y*D)+((q*D-v*t)*(q*D-v*t)+(y*t-q*E)*(y*t-q*E))>9.999999747378752e-05:0)?(Y=t*(w*y-v*x)+(D*(q*x-p*y)+(v*p-q*w)*E),+r(+Y)>9.999999974752427e-07):0){K=+f[k+(M<<4)+12>>2];L=+f[B>>2];J=+f[k+(o<<4)+12>>2];H=-1.0/Y*((q*D-v*t)*J+((v*p-q*w)*K+(w*t-p*D)*L));q=-1.0/Y*((y*t-q*E)*J+((q*x-p*y)*K+(p*E-x*t)*L));p=-1.0/Y*((v*E-y*D)*J+((w*y-v*x)*K+(x*D-w*E)*L));g=0;do{if(+f[k+(g<<4)+12>>2]+(H*+f[k+(g<<4)>>2]+q*+f[k+(g<<4)+4>>2]+p*+f[k+(g<<4)+8>>2])+-.009999999776482582>0.0)break h;g=g+1|0}while((g|0)<(u|0));do if((i|0)==(n|0)){A=(n|0)==0?1:n<<1;if((n|0)>=(A|0)){g=n;break}do if(!A)z=0;else{c[6747]=(c[6747]|0)+1;m=kb((A<<4|3)+16|0)|0;if(!m){z=0;break}c[(m+4+15&-16)+-4>>2]=m;z=m+4+15&-16}while(0);if((n|0)<=0){if(!j){m=z;g=n;n=A;j=z;break}}else{m=0;do{da=z+(m<<4)|0;ca=j+(m<<4)|0;c[da>>2]=c[ca>>2];c[da+4>>2]=c[ca+4>>2];c[da+8>>2]=c[ca+8>>2];c[da+12>>2]=c[ca+12>>2];m=m+1|0}while((m|0)!=(n|0))}c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);m=z;g=n;n=A;j=z}else g=i;while(0);f[j+(g<<4)>>2]=H;f[j+(g<<4)+4>>2]=q;f[j+(g<<4)+8>>2]=p;f[j+(g<<4)+12>>2]=0.0;i=i+1|0}while(0);o=o+1|0;if((o|0)==(u|0))break g}}while(0);if((I|0)==(u|0))break f;o=I}}while(0)}while((N|0)!=(u|0))}else{m=0;k=0;j=0;i=0}}else{m=0;l=0;k=0;j=0;i=0}mb(ma+124|0,m,i);if(j|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}if(k|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}if(l|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}}else mb(ma+124|0,k,I);G=c[ma+124+44>>2]|0;if((G|0)>0){c[6747]=(c[6747]|0)+1;i=kb((G<<4|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=0;do{da=j+(i<<4)|0;c[da>>2]=c[ma>>2];c[da+4>>2]=c[ma+4>>2];c[da+8>>2]=c[ma+8>>2];c[da+12>>2]=c[ma+12>>2];i=i+1|0}while((i|0)!=(G|0));da=j;ba=j}else{da=0;ba=0}a[ma+104+16>>0]=1;ca=ma+104+12|0;c[ca>>2]=0;aa=ma+104+4|0;c[aa>>2]=0;c[ma+104+8>>2]=0;k=ma;m=k+19|0;do{a[k>>0]=0;k=k+1|0}while((k|0)<(m|0));if((G|0)<0)Z();if(G|0){Gm(ma+104|0,G);i=c[ca>>2]|0;j=0;do{a[i+(j*36|0)+16>>0]=1;k=i+(j*36|0)+4|0;c[k>>2]=0;c[k+4>>2]=0;c[k+8>>2]=0;k=i+(j*36|0)+20|0;l=ma+3|0;m=k+16|0;do{a[k>>0]=a[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));j=j+1|0}while((j|0)!=(G|0))}c[aa>>2]=G;n=c[ma+124+4>>2]|0;m=c[d+52>>2]|0;l=c[m+8>>2]|0;if((l|0)<(n|0)){if((c[m+12>>2]|0)<(n|0)){if(!n){j=l;k=0}else{c[6747]=(c[6747]|0)+1;i=kb((n<<4|3)+16|0)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}j=c[m+8>>2]|0;k=i}if((j|0)>0){i=0;do{$=k+(i<<4)|0;_=(c[m+16>>2]|0)+(i<<4)|0;c[$>>2]=c[_>>2];c[$+4>>2]=c[_+4>>2];c[$+8>>2]=c[_+8>>2];c[$+12>>2]=c[_+12>>2];i=i+1|0}while((i|0)!=(j|0))}i=c[m+16>>2]|0;if(i|0){if(a[m+20>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[m+16>>2]=0}a[m+20>>0]=1;c[m+16>>2]=k;c[m+12>>2]=n;j=m+16|0}else j=m+16|0;i=l;do{$=(c[j>>2]|0)+(i<<4)|0;c[$>>2]=c[ma>>2];c[$+4>>2]=c[ma+4>>2];c[$+8>>2]=c[ma+8>>2];c[$+12>>2]=c[ma+12>>2];i=i+1|0}while((i|0)!=(n|0))}c[m+8>>2]=n;if((n|0)>0){i=0;do{_=(c[ka>>2]|0)+(i<<4)|0;$=(c[(c[d+52>>2]|0)+16>>2]|0)+(i<<4)|0;c[$>>2]=c[_>>2];c[$+4>>2]=c[_+4>>2];c[$+8>>2]=c[_+8>>2];c[$+12>>2]=c[_+12>>2];i=i+1|0}while((i|0)!=(n|0))}if((G|0)>0){F=0;do{A=(c[ja>>2]|0)+((c[(c[ia>>2]|0)+(F<<2)>>2]|0)*12|0)|0;B=A;i=0;do{C=B+4|0;z=c[B+((c[C>>2]|0)*12|0)+8>>2]|0;u=c[ca>>2]|0;g=u+(F*36|0)+4|0;j=c[g>>2]|0;o=u+(F*36|0)+8|0;if((j|0)==(c[o>>2]|0)?(O=(j|0)==0?1:j<<1,(j|0)<(O|0)):0){if(!O)k=0;else{c[6747]=(c[6747]|0)+1;j=kb((O<<2|3)+16|0)|0;if(!j)k=0;else{c[(j+4+15&-16)+-4>>2]=j;k=j+4+15&-16}j=c[g>>2]|0}n=u+(F*36|0)+12|0;m=c[n>>2]|0;if((j|0)<=0)if(!m)l=u+(F*36|0)+16|0;else fa=161;else{l=0;do{c[k+(l<<2)>>2]=c[m+(l<<2)>>2];l=l+1|0}while((l|0)!=(j|0));fa=161}if((fa|0)==161){fa=0;l=u+(F*36|0)+16|0;if(a[l>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0)}c[n>>2]=0;j=c[g>>2]|0}a[l>>0]=1;c[n>>2]=k;c[o>>2]=O}c[(c[u+(F*36|0)+12>>2]|0)+(j<<2)>>2]=z;c[g>>2]=(c[g>>2]|0)+1;_=c[B+8>>2]|0;$=c[ka>>2]|0;t=+f[$+(_<<4)>>2]-+f[$+(z<<4)>>2];v=+f[$+(_<<4)+4>>2]-+f[$+(z<<4)+4>>2];q=+f[$+(_<<4)+8>>2]-+f[$+(z<<4)+8>>2];p=1.0/+s(+(t*t+v*v+q*q));if((i|0)<2){f[ma+(i<<4)>>2]=t*p;f[ma+(i<<4)+4>>2]=v*p;f[ma+(i<<4)+8>>2]=q*p;f[ma+(i<<4)+12>>2]=0.0;i=i+1|0}$=B+((c[C>>2]|0)*12|0)|0;B=$+((c[$>>2]|0)*12|0)|0}while((B|0)!=(A|0));if((i|0)==2){H=+f[ma+4>>2];J=+f[ma+24>>2];K=+f[ma+8>>2];L=+f[ma+20>>2];E=+f[ma+16>>2];D=+f[ma>>2];_=ba+(F<<4)+4|0;$=ba+(F<<4)+8|0;f[ba+(F<<4)+12>>2]=0.0;Y=1.0/+s(+((L*D-H*E)*(L*D-H*E)+((H*J-K*L)*(H*J-K*L)+(K*E-J*D)*(K*E-J*D))));f[ba+(F<<4)>>2]=(H*J-K*L)*Y;f[_>>2]=(K*E-J*D)*Y;f[$>>2]=(L*D-H*E)*Y;m=c[ca>>2]|0;f[m+(F*36|0)+20>>2]=(H*J-K*L)*Y;c[m+(F*36|0)+24>>2]=c[_>>2];c[m+(F*36|0)+28>>2]=c[$>>2];f[m+(F*36|0)+32>>2]=1000000015047466219876688.0e6}else{m=ba+(F<<4)|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;m=c[ca>>2]|0}j=c[m+(F*36|0)+4>>2]|0;if((j|0)>0){k=c[(c[d+52>>2]|0)+16>>2]|0;q=+f[ba+(F<<4)>>2];t=+f[ba+(F<<4)+4>>2];v=+f[ba+(F<<4)+8>>2];l=c[m+(F*36|0)+12>>2]|0;$=c[l>>2]|0;p=+f[k+($<<4)>>2]*q+ +f[k+($<<4)+4>>2]*t+ +f[k+($<<4)+8>>2]*v;p=p<1000000015047466219876688.0e6?p:1000000015047466219876688.0e6;if((j|0)!=1){i=1;do{$=c[l+(i<<2)>>2]|0;Y=+f[k+($<<4)>>2]*q+ +f[k+($<<4)+4>>2]*t+ +f[k+($<<4)+8>>2]*v;p=p>Y?Y:p;i=i+1|0}while((i|0)<(j|0))}}else p=1000000015047466219876688.0e6;f[m+(F*36|0)+32>>2]=-p;F=F+1|0}while((F|0)!=(G|0))}i:do if((c[aa>>2]|0)>0){m=0;j=0;o=0;i=0;n=0;while(1){do if((o|0)==(i|0)){i=(o|0)==0;k=i?1:o<<1;if((o|0)<(k|0)){if((k|0)!=0?(c[6747]=(c[6747]|0)+1,P=kb((k<<2|3)+16|0)|0,(P|0)!=0):0){c[(P+4+15&-16)+-4>>2]=P;l=P+4+15&-16}else l=0;if(i){if(!n){Q=l;j=l;i=1;n=l;break}}else{i=0;do{c[l+(i<<2)>>2]=c[n+(i<<2)>>2];i=i+1|0}while((i|0)!=(o|0))}if(!m){Q=l;j=l;i=k;n=l}else{c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0);Q=l;j=l;i=k;n=l}}else{Q=j;j=m;i=o}}else{Q=j;j=m}while(0);c[n+(o<<2)>>2]=o;o=o+1|0;if((o|0)>=(c[aa>>2]|0))break;else{m=j;j=Q}}O=ma+84+12|0;P=ma+84+4|0;N=ma+48+12|0;i=o;while(1){m=i+-1|0;k=c[n+(m<<2)>>2]|0;c[6747]=(c[6747]|0)+1;j=kb(23)|0;if(!j)l=0;else{c[(j+4+15&-16)+-4>>2]=j;l=j+4+15&-16}c[l>>2]=k;j=c[ca>>2]|0;q=+f[j+(k*36|0)+20>>2];t=+f[j+(k*36|0)+24>>2];p=+f[j+(k*36|0)+28>>2];do if((i|0)>1){o=j;z=l;k=l;u=1;j=l;B=1;F=i+-2|0;C=m;while(1){A=c[n+(F<<2)>>2]|0;j:do if(q*+f[o+(A*36|0)+20>>2]+t*+f[o+(A*36|0)+24>>2]+p*+f[o+(A*36|0)+28>>2]>.9990000128746033){do if((B|0)==(u|0)){l=(u|0)==0?1:u<<1;if((u|0)>=(l|0)){g=k;break}do if(!l)k=0;else{c[6747]=(c[6747]|0)+1;i=kb((l<<2|3)+16|0)|0;if(!i){k=0;break}c[(i+4+15&-16)+-4>>2]=i;k=i+4+15&-16}while(0);if((u|0)>0){i=0;do{c[k+(i<<2)>>2]=c[j+(i<<2)>>2];i=i+1|0}while((i|0)!=(u|0));if(!z){g=k;z=k;u=l;j=k;break}}else if((j|0)==0|(z|0)==0){g=k;z=k;u=l;j=k;break}c[6748]=(c[6748]|0)+1;uc(c[z+-4>>2]|0);g=k;z=k;u=l;j=k}else g=k;while(0);c[j+(B<<2)>>2]=A;o=B+1|0;if((C|0)>0){m=0;while(1){k=n+(m<<2)|0;if((c[k>>2]|0)==(A|0))break;i=m+1|0;if((i|0)<(C|0))m=i;else{M=g;k=z;l=u;I=o;i=C;break j}}i=C+-1|0;l=n+(i<<2)|0;if((m|0)>=(C|0)){M=g;k=z;l=u;I=o;i=C;break}c[k>>2]=c[l>>2];c[l>>2]=A;M=g;k=z;l=u;I=o}else{M=g;k=z;l=u;I=o;i=C}}else{M=k;k=z;l=u;I=B;i=C}while(0);if((F|0)<=0)break;o=c[ca>>2]|0;z=k;k=M;u=l;B=I;F=F+-1|0;C=i}if((I|0)<=1)if((I|0)==1){k=M;B=1;fa=344;break}else{k=M;break}a[ma+84+16>>0]=1;c[O>>2]=0;c[P>>2]=0;c[ma+84+8>>2]=0;p=0.0;q=0.0;t=0.0;k=0;C=0;do{A=c[j+(C<<2)>>2]|0;B=c[ca>>2]|0;p=+f[B+(A*36|0)+20>>2]+p;q=+f[B+(A*36|0)+24>>2]+q;t=+f[B+(A*36|0)+28>>2]+t;l=c[B+(A*36|0)+4>>2]|0;if((l|0)>0){z=0;do{g=c[(c[B+(A*36|0)+12>>2]|0)+(z<<2)>>2]|0;$=(c[(c[d+52>>2]|0)+16>>2]|0)+(g<<4)|0;c[ma>>2]=c[$>>2];c[ma+4>>2]=c[$+4>>2];c[ma+8>>2]=c[$+8>>2];c[ma+12>>2]=c[$+12>>2];k:do if((k|0)>0){m=c[O>>2]|0;o=0;while(1){if((c[m+(o*24|0)+20>>2]|0)==(g|0))break k;o=o+1|0;if((o|0)>=(k|0)){fa=224;break}}}else fa=224;while(0);if((fa|0)==224){fa=0;c[ma+48>>2]=c[ma>>2];c[ma+48+4>>2]=c[ma+4>>2];c[ma+48+8>>2]=c[ma+8>>2];c[ma+48+12>>2]=c[ma+12>>2];do if((k|0)==(c[ma+84+8>>2]|0)){u=(k|0)==0?1:k<<1;if((k|0)>=(u|0))break;if(!u)l=0;else{c[6747]=(c[6747]|0)+1;k=kb((u*24|3)+16|0)|0;if(!k)l=0;else{c[(k+4+15&-16)+-4>>2]=k;l=k+4+15&-16}k=c[P>>2]|0}o=c[O>>2]|0;if((k|0)<=0){if(o)fa=234}else{m=0;do{fa=l+(m*24|0)|0;$=o+(m*24|0)|0;c[fa>>2]=c[$>>2];c[fa+4>>2]=c[$+4>>2];c[fa+8>>2]=c[$+8>>2];c[fa+12>>2]=c[$+12>>2];c[fa+16>>2]=c[$+16>>2];c[fa+20>>2]=c[$+20>>2];m=m+1|0}while((m|0)!=(k|0));fa=234}if((fa|0)==234){fa=0;if(a[ma+84+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0);k=c[P>>2]|0}c[O>>2]=0}a[ma+84+16>>0]=1;c[O>>2]=l;c[ma+84+8>>2]=u}while(0);l=c[O>>2]|0;$=l+(k*24|0)|0;c[$>>2]=c[ma+48>>2];c[$+4>>2]=c[ma+48+4>>2];c[$+8>>2]=c[ma+48+8>>2];c[$+12>>2]=c[ma+48+12>>2];c[$+16>>2]=c[ma+48+16>>2];c[l+(k*24|0)+20>>2]=g;k=(c[P>>2]|0)+1|0;c[P>>2]=k;l=c[B+(A*36|0)+4>>2]|0}z=z+1|0}while((z|0)<(l|0))}C=C+1|0}while((C|0)!=(I|0));a[ma+48+16>>0]=1;c[N>>2]=0;c[ma+48+4>>2]=0;c[ma+48+8>>2]=0;$=c[j>>2]|0;_=c[ca>>2]|0;c[ma+48+20>>2]=c[_+($*36|0)+20>>2];c[ma+48+24>>2]=c[_+($*36|0)+24>>2];c[ma+48+28>>2]=c[_+($*36|0)+28>>2];c[ma+48+32>>2]=c[_+($*36|0)+32>>2];y=1.0/+s(+(p*p+q*q+t*t));E=p*y;D=q*y;y=t*y;if(+r(+y)>.7071067690849304){x=1.0/+s(+(y*y+D*D));v=0.0;w=D*x;x=-(y*x)}else{x=1.0/+s(+(E*E+D*D));v=-(D*x);w=0.0;x=E*x}o=c[P>>2]|0;do if((o|0)<2)if((o|0)==1){m=1;l=0;o=0;k=0;do{A=c[O>>2]|0;do if((l|0)==(o|0)){z=(o|0)==0?1:o<<1;if((o|0)>=(z|0)){g=o;break}do if(!z)u=0;else{c[6747]=(c[6747]|0)+1;m=kb((z*24|3)+16|0)|0;if(!m){o=l;u=0;break}c[(m+4+15&-16)+-4>>2]=m;o=l;u=m+4+15&-16}while(0);if((o|0)<=0){if(k|0)fa=255}else{m=0;do{fa=u+(m*24|0)|0;$=k+(m*24|0)|0;c[fa>>2]=c[$>>2];c[fa+4>>2]=c[$+4>>2];c[fa+8>>2]=c[$+8>>2];c[fa+12>>2]=c[$+12>>2];c[fa+16>>2]=c[$+16>>2];c[fa+20>>2]=c[$+20>>2];m=m+1|0}while((m|0)!=(o|0));fa=255}if((fa|0)==255){fa=0;c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}g=l;m=c[P>>2]|0;o=z;k=u}else g=l;while(0);$=k+(g*24|0)|0;c[$>>2]=c[A>>2];c[$+4>>2]=c[A+4>>2];c[$+8>>2]=c[A+8>>2];c[$+12>>2]=c[A+12>>2];c[$+16>>2]=c[A+16>>2];c[$+20>>2]=c[A+20>>2];l=l+1|0}while((l|0)<(m|0));fa=289}else{k=0;fa=331}else{m=c[O>>2]|0;l=0;do{k=m+(l*24|0)|0;if(v*+f[k>>2]+x*+f[m+(l*24|0)+4>>2]+w*+f[m+(l*24|0)+8>>2]>2]+x*+f[m+4>>2]+w*+f[m+8>>2]){c[ma>>2]=c[m>>2];c[ma+4>>2]=c[m+4>>2];c[ma+8>>2]=c[m+8>>2];c[ma+12>>2]=c[m+12>>2];c[ma+16>>2]=c[m+16>>2];c[ma+20>>2]=c[m+20>>2];c[m>>2]=c[k>>2];c[m+4>>2]=c[k+4>>2];c[m+8>>2]=c[k+8>>2];c[m+12>>2]=c[k+12>>2];c[m+16>>2]=c[k+16>>2];c[m+20>>2]=c[k+20>>2];fa=m+(l*24|0)|0;c[fa>>2]=c[ma>>2];c[fa+4>>2]=c[ma+4>>2];c[fa+8>>2]=c[ma+8>>2];c[fa+12>>2]=c[ma+12>>2];c[fa+16>>2]=c[ma+16>>2];c[fa+20>>2]=c[ma+20>>2]}l=l+1|0}while((l|0)<(o|0));f[m+16>>2]=-1000000015047466219876688.0e6;if((o|0)>1){p=+f[m>>2];q=+f[m+4>>2];t=+f[m+8>>2];k=1;do{K=+f[m+(k*24|0)>>2]-p;L=+f[m+(k*24|0)+4>>2]-q;Y=+f[m+(k*24|0)+8>>2]-t;f[m+(k*24|0)+16>>2]=((v*L-x*K)*y+(E*(x*Y-w*L)+D*(w*K-v*Y)))/+s(+(K*K+L*L+Y*Y));k=k+1|0}while((k|0)!=(o|0))}c[ma>>2]=c[m>>2];c[ma+4>>2]=c[m+4>>2];c[ma+8>>2]=c[m+8>>2];c[ma+12>>2]=c[m+12>>2];re(ma+84|0,ma,1,o+-1|0);l=c[O>>2]|0;c[6747]=(c[6747]|0)+1;k=kb(43)|0;if(!k)o=0;else{c[(k+4+15&-16)+-4>>2]=k;o=k+4+15&-16}m=c[O>>2]|0;c[o>>2]=c[l>>2];c[o+4>>2]=c[l+4>>2];c[o+8>>2]=c[l+8>>2];c[o+12>>2]=c[l+12>>2];c[o+16>>2]=c[l+16>>2];c[o+20>>2]=c[l+20>>2];c[6747]=(c[6747]|0)+1;k=kb(67)|0;if(!k)k=0;else{c[(k+4+15&-16)+-4>>2]=k;k=k+4+15&-16}c[k>>2]=c[o>>2];c[k+4>>2]=c[o+4>>2];c[k+8>>2]=c[o+8>>2];c[k+12>>2]=c[o+12>>2];c[k+16>>2]=c[o+16>>2];c[k+20>>2]=c[o+20>>2];if(o|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}fa=k+24|0;c[fa>>2]=c[m+24>>2];c[fa+4>>2]=c[m+24+4>>2];c[fa+8>>2]=c[m+24+8>>2];c[fa+12>>2]=c[m+24+12>>2];c[fa+16>>2]=c[m+24+16>>2];c[fa+20>>2]=c[m+24+20>>2];m=c[P>>2]|0;if((m|0)==2){l=2;fa=289;break}u=2;l=2;o=2;A=2;do{l:do if((u|0)>1){fa=c[O>>2]|0;z=fa+(A*24|0)|0;p=+f[z>>2];q=+f[fa+(A*24|0)+4>>2];t=+f[fa+(A*24|0)+8>>2];while(1){fa=u+-2|0;g=u+-1|0;K=+f[k+(fa*24|0)>>2];L=K-+f[k+(g*24|0)>>2];H=+f[k+(fa*24|0)+4>>2];x=H-+f[k+(g*24|0)+4>>2];Y=+f[k+(fa*24|0)+8>>2];J=Y-+f[k+(g*24|0)+8>>2];if((L*(H-q)-x*(K-p))*y+(E*(x*(Y-t)-J*(H-q))+D*(J*(K-p)-L*(Y-t)))>0.0)break;if((u|0)>2){u=g;l=g}else{u=1;l=g;break l}}do if((u|0)==(o|0)){g=o<<1;if((o|0)>=(g|0)){u=o;g=o;break}c[6747]=(c[6747]|0)+1;m=kb((o*48|3)+16|0)|0;if(!m)o=0;else{c[(m+4+15&-16)+-4>>2]=m;o=m+4+15&-16}if((l|0)>0){m=0;do{fa=o+(m*24|0)|0;$=k+(m*24|0)|0;c[fa>>2]=c[$>>2];c[fa+4>>2]=c[$+4>>2];c[fa+8>>2]=c[$+8>>2];c[fa+12>>2]=c[$+12>>2];c[fa+16>>2]=c[$+16>>2];c[fa+20>>2]=c[$+20>>2];m=m+1|0}while((m|0)!=(l|0))}c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);m=c[P>>2]|0;u=l;k=o}else g=o;while(0);u=k+(u*24|0)|0;c[u>>2]=c[z>>2];c[u+4>>2]=c[z+4>>2];c[u+8>>2]=c[z+8>>2];c[u+12>>2]=c[z+12>>2];c[u+16>>2]=c[z+16>>2];c[u+20>>2]=c[z+20>>2];l=l+1|0;u=l;o=g}while(0);A=A+1|0}while((A|0)!=(m|0));if((l|0)>0)fa=289;else fa=291}while(0);if((fa|0)==289){fa=0;o=c[ma+48+4>>2]|0;m=c[ma+48+8>>2]|0;z=a[ma+48+16>>0]|0;G=0;while(1){F=k+(G*24|0)+20|0;do if((o|0)==(m|0)){B=(m|0)==0?1:m<<1;if((m|0)>=(B|0)){C=z;o=m;B=m;break}do if(!B)g=0;else{c[6747]=(c[6747]|0)+1;o=kb((B<<2|3)+16|0)|0;if(!o){g=0;break}c[(o+4+15&-16)+-4>>2]=o;g=o+4+15&-16}while(0);u=c[N>>2]|0;if((m|0)<=0){if(u)fa=321}else{o=0;do{c[g+(o<<2)>>2]=c[u+(o<<2)>>2];o=o+1|0}while((o|0)!=(m|0));fa=321}if((fa|0)==321){fa=0;if(z<<24>>24){c[6748]=(c[6748]|0)+1;uc(c[u+-4>>2]|0)}c[N>>2]=0;m=c[ma+48+4>>2]|0}c[N>>2]=g;c[ma+48+8>>2]=B;C=1;o=m}else{C=z;B=m}while(0);c[(c[N>>2]|0)+(o<<2)>>2]=c[F>>2];o=o+1|0;c[ma+48+4>>2]=o;m=c[P>>2]|0;m:do if((m|0)>0){A=c[O>>2]|0;u=c[F>>2]|0;g=0;while(1){z=A+(g*24|0)+20|0;g=g+1|0;if((c[z>>2]|0)==(u|0))break;if((g|0)>=(m|0))break m}c[z>>2]=-1}while(0);G=G+1|0;if((G|0)>=(l|0))break;else{m=B;z=C}}a[ma+48+16>>0]=C;fa=291}n:do if((fa|0)==291){fa=0;if((m|0)>0){z=c[O>>2]|0;A=c[aa>>2]|0;B=c[ca>>2]|0;F=(I|0)>0;if((A|0)<=0){fa=331;break}G=0;while(1){C=c[z+(G*24|0)+20>>2]|0;o:do if((C|0)!=-1){if(!F){u=0;while(1){l=c[B+(u*36|0)+4>>2]|0;if((l|0)>0){o=c[B+(u*36|0)+12>>2]|0;g=0;do{if((c[o+(g<<2)>>2]|0)==(C|0)){l=1;break n}g=g+1|0}while((g|0)<(l|0))}u=u+1|0;if((u|0)>=(A|0))break o}}g=0;do{l=0;while(1){if((c[j+(l<<2)>>2]|0)==(g|0))break;l=l+1|0;if((l|0)>=(I|0)){fa=306;break}}do if((fa|0)==306){fa=0;l=c[B+(g*36|0)+4>>2]|0;if((l|0)<=0)break;o=c[B+(g*36|0)+12>>2]|0;u=0;do{if((c[o+(u<<2)>>2]|0)==(C|0)){l=1;break n}u=u+1|0}while((u|0)<(l|0))}while(0);g=g+1|0}while((g|0)<(A|0))}while(0);G=G+1|0;if((G|0)>=(m|0)){fa=331;break}}}else fa=331}while(0);if((fa|0)==331){fa=0;qg((c[d+52>>2]|0)+24|0,ma+48|0);l=0}if(k|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}k=c[N>>2]|0;if(k|0){if(a[ma+48+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[N>>2]=0}k=c[O>>2]|0;if(k|0){if(a[ma+84+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[O>>2]=0}if(l&(I|0)>0){k=M;B=I;fa=344}else k=M}else{k=l;j=l;B=1;i=m;fa=344}while(0);if((fa|0)==344){fa=0;A=0;do{g=c[j+(A<<2)>>2]|0;z=c[ca>>2]|0;a[ma+16>>0]=1;c[ma+12>>2]=0;c[ma+4>>2]=0;c[ma+8>>2]=0;u=c[z+(g*36|0)+4>>2]|0;if((u|0)>0){c[6747]=(c[6747]|0)+1;m=kb((u<<2|3)+16|0)|0;do if(!m){o=0;l=0}else{c[(m+4+15&-16)+-4>>2]=m;l=c[ma+12>>2]|0;if((l|0)==0|(a[ma+16>>0]|0)==0){o=m+4+15&-16;l=m+4+15&-16;break}c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);o=m+4+15&-16;l=m+4+15&-16}while(0);a[ma+16>>0]=1;c[ma+12>>2]=l;c[ma+8>>2]=u;hk(l|0,0,u<<2|0)|0;c[ma+4>>2]=u;l=c[z+(g*36|0)+12>>2]|0;m=0;do{c[o+(m<<2)>>2]=c[l+(m<<2)>>2];m=m+1|0}while((m|0)!=(u|0));l=c[ma+12>>2]|0}else{c[ma+4>>2]=u;l=0}c[ma+20>>2]=c[z+(g*36|0)+20>>2];c[ma+20+4>>2]=c[z+(g*36|0)+20+4>>2];c[ma+20+8>>2]=c[z+(g*36|0)+20+8>>2];c[ma+20+12>>2]=c[z+(g*36|0)+20+12>>2];qg((c[d+52>>2]|0)+24|0,ma);if(l|0){if(a[ma+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}c[ma+12>>2]=0}A=A+1|0}while((A|0)<(B|0))}if(!((j|0)==0|(k|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}if(!i){$=Q;break i}}}else{$=0;n=0}while(0);_=c[d+52>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;i=c[_+28>>2]|0;if((i|0)>0){A=0;F=0;z=0;j=0;k=0;I=0;C=0;g=0;l=0;G=0;u=0;m=0;B=0;M=0;X=0;while(1){o=c[_+36>>2]|0;W=c[o+(X*36|0)+4>>2]|0;if((W|0)>0){U=X&65535;V=X|-65536;R=A;P=z;S=C;O=u;i=0;while(1){T=i+1|0;C=c[o+(X*36|0)+12>>2]|0;u=c[C+(i<<2)>>2]&65535;C=c[C+(((T|0)==(W|0)?0:T)<<2)>>2]&65535;Q=C<<16>>16>u<<16>>16?u:C;d=C<<16>>16>u<<16>>16?C:u;o=C<<16>>16>u<<16>>16?u:C;u=C<<16>>16>u<<16>>16?C:u;C=O+-1|0;p:do if((((o&65535)<<16)+(u<<16>>16)&C)>>>0>>0?(ga=c[k+((((o&65535)<<16)+(u<<16>>16)&C)<<2)>>2]|0,(ga|0)!=-1):0){i=ga;while(1){if(u<<16>>16==(b[j+(i<<2)>>1]|0)?o<<16>>16==(b[j+(i<<2)+2>>1]|0):0)break;i=c[l+(i<<2)>>2]|0;if((i|0)==-1){A=0;break p}}A=m+(i<<2)|0}else A=0;while(0);i=c[_+16>>2]|0;x=+f[i+(o<<16>>16<<4)>>2]-+f[i+(u<<16>>16<<4)>>2];y=+f[i+(o<<16>>16<<4)+4>>2]-+f[i+(u<<16>>16<<4)+4>>2];w=+f[i+(o<<16>>16<<4)+8>>2]-+f[i+(u<<16>>16<<4)+8>>2];v=1.0/+s(+(x*x+y*y+w*w));i=c[_+48>>2]|0;q:do if((i|0)>0){o=c[_+56>>2]|0;u=0;while(1){p=+f[o+(u<<4)>>2];q=+f[o+(u<<4)+4>>2];t=+f[o+(u<<4)+8>>2];do if(!(+r(+(p-x*v))>1.0e-06)){if(+r(+(q-y*v))>1.0e-06)break;if(!(+r(+(t-w*v))>1.0e-06))break q}while(0);do if(!(+r(+(x*v+p))>1.0e-06)){if(+r(+(y*v+q))>1.0e-06)break;if(!(+r(+(w*v+t))>1.0e-06))break q}while(0);u=u+1|0;if((u|0)>=(i|0)){fa=387;break}}}else fa=387;while(0);if((fa|0)==387){fa=0;do if((i|0)==(c[_+52>>2]|0)){z=(i|0)==0?1:i<<1;if((i|0)>=(z|0))break;if(!z)o=0;else{c[6747]=(c[6747]|0)+1;i=kb((z<<4|3)+16|0)|0;if(!i)o=0;else{c[(i+4+15&-16)+-4>>2]=i;o=i+4+15&-16}i=c[_+48>>2]|0}if((i|0)>0){u=0;do{N=o+(u<<4)|0;na=(c[_+56>>2]|0)+(u<<4)|0;c[N>>2]=c[na>>2];c[N+4>>2]=c[na+4>>2];c[N+8>>2]=c[na+8>>2];c[N+12>>2]=c[na+12>>2];u=u+1|0}while((u|0)!=(i|0))}i=c[_+56>>2]|0;if(i|0){if(a[_+60>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[_+56>>2]=0}a[_+60>>0]=1;c[_+56>>2]=o;c[_+52>>2]=z;i=c[_+48>>2]|0}while(0);na=c[_+56>>2]|0;f[na+(i<<4)>>2]=x*v;f[na+(i<<4)+4>>2]=y*v;f[na+(i<<4)+8>>2]=w*v;f[na+(i<<4)+12>>2]=0.0;c[_+48>>2]=(c[_+48>>2]|0)+1}r:do if(!A){i=((Q&65535)<<16)+(d<<16>>16)&C;s:do if(i>>>0>>0){o=c[k+(i<<2)>>2]|0;if((o|0)==-1)break;while(1){if(d<<16>>16==(b[j+(o<<2)>>1]|0)?Q<<16>>16==(b[j+(o<<2)+2>>1]|0):0)break;o=c[l+(o<<2)>>2]|0;if((o|0)==-1)break s}A=m+(o<<2)|0;b[A>>1]=V;b[A+2>>1]=V>>>16;A=R;z=P;C=S;u=O;break r}while(0);do if((G|0)==(O|0)){u=(G|0)==0?1:G<<1;if((G|0)>=(u|0)){u=G;break}do if(!u)z=0;else{c[6747]=(c[6747]|0)+1;o=kb((u<<2|3)+16|0)|0;if(!o){z=0;break}c[(o+4+15&-16)+-4>>2]=o;z=o+4+15&-16}while(0);if((G|0)<=0){if(!m){m=z;break}}else{o=0;do{na=z+(o<<2)|0;N=m+(o<<2)|0;N=e[N>>1]|e[N+2>>1]<<16;b[na>>1]=N;b[na+2>>1]=N>>>16;o=o+1|0}while((o|0)!=(G|0))}c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0);m=z}else u=O;while(0);N=m+(G<<2)|0;b[N>>1]=V;b[N+2>>1]=V>>>16;N=G+1|0;do if((M|0)==(P|0)){z=(M|0)==0?1:M<<1;if((M|0)>=(z|0)){z=M;break}do if(!z)A=0;else{c[6747]=(c[6747]|0)+1;o=kb((z<<2|3)+16|0)|0;if(!o){A=0;break}c[(o+4+15&-16)+-4>>2]=o;A=o+4+15&-16}while(0);if((M|0)<=0){if(!j){j=A;break}}else{o=0;do{na=A+(o<<2)|0;P=j+(o<<2)|0;P=e[P>>1]|e[P+2>>1]<<16;b[na>>1]=P;b[na+2>>1]=P>>>16;o=o+1|0}while((o|0)!=(M|0))}c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);j=A}else z=P;while(0);na=j+(M<<2)|0;b[na>>1]=(Q&65535)<<16|d&65535;b[na+2>>1]=((Q&65535)<<16|d&65535)>>>16;M=M+1|0;if((O|0)<(u|0)){do if((I|0)<(u|0)){do if((B|0)<(u|0)){do if(!u)o=0;else{c[6747]=(c[6747]|0)+1;i=kb((u<<2|3)+16|0)|0;if(!i){o=0;break}c[(i+4+15&-16)+-4>>2]=i;o=i+4+15&-16}while(0);if((I|0)<=0){if(!k){F=o;k=o;B=u;break}}else{i=0;do{c[o+(i<<2)>>2]=c[k+(i<<2)>>2];i=i+1|0}while((i|0)!=(I|0))}c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);F=o;k=o;B=u}while(0);C=u<<2;hk(k+(I<<2)|0,0,C-(I<<2)|0)|0;if((S|0)<(u|0)){do if((g|0)<(u|0)){do if(!u)o=0;else{c[6747]=(c[6747]|0)+1;i=kb((C|3)+16|0)|0;if(!i){o=0;break}c[(i+4+15&-16)+-4>>2]=i;o=i+4+15&-16}while(0);if((S|0)<=0){if(!l){i=o;g=u;l=o;break}}else{i=0;do{c[o+(i<<2)>>2]=c[l+(i<<2)>>2];i=i+1|0}while((i|0)!=(S|0))}c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);i=o;g=u;l=o}else i=R;while(0);hk(l+(S<<2)|0,0,C-(S<<2)|0)|0;A=i}else A=R;if((u|0)>0){hk(F|0,-1,C|0)|0;hk(A|0,-1,C|0)|0}if((I|0)<=0){o=u;C=u;i=B;break}o=u+-1|0;i=0;do{na=k+(((e[j+(i<<2)+2>>1]<<16)+(b[j+(i<<2)>>1]|0)&o)<<2)|0;c[l+(i<<2)>>2]=c[na>>2];c[na>>2]=i;i=i+1|0}while((i|0)!=(I|0));o=u;C=u;i=B}else{A=R;o=I;C=S;i=B}while(0);B=i;i=((Q&65535)<<16)+(d<<16>>16)&u+-1}else{A=R;o=I;C=S}I=k+(i<<2)|0;c[l+(G<<2)>>2]=c[I>>2];c[I>>2]=G;I=o;G=N}else{b[A+2>>1]=U;A=R;z=P;C=S;u=O}while(0);if((T|0)>=(W|0))break;o=c[_+36>>2]|0;R=A;P=z;S=C;O=u;i=T}i=c[_+28>>2]|0;o=M}else o=M;X=X+1|0;if((X|0)>=(i|0))break;else M=o}if((i|0)>0){A=c[_+36>>2]|0;B=c[_+16>>2]|0;p=0.0;C=0;do{u=c[A+(C*36|0)+4>>2]|0;g=c[A+(C*36|0)+12>>2]|0;z=c[g>>2]|0;if((u|0)>=3){q=+f[_+64>>2];t=+f[_+68>>2];v=+f[_+72>>2];o=1;do{ga=c[g+(o<<2)>>2]|0;o=o+1|0;na=c[g+(((o|0)%(u|0)|0)<<2)>>2]|0;w=+f[B+(z<<4)>>2];x=+f[B+(ga<<4)>>2];D=+f[B+(z<<4)+4>>2];E=+f[B+(ga<<4)+4>>2];J=+f[B+(z<<4)+8>>2];K=+f[B+(ga<<4)+8>>2];y=+f[B+(na<<4)>>2];H=+f[B+(na<<4)+4>>2];L=+f[B+(na<<4)+8>>2];Y=+s(+(((w-x)*(D-H)-(D-E)*(w-y))*((w-x)*(D-H)-(D-E)*(w-y))+(((D-E)*(J-L)-(J-K)*(D-H))*((D-E)*(J-L)-(J-K)*(D-H))+((J-K)*(w-y)-(w-x)*(J-L))*((J-K)*(w-y)-(w-x)*(J-L)))))*.5;q=q+(w+x+y)*.3333333432674408*Y;f[_+64>>2]=q;t=t+(D+E+H)*.3333333432674408*Y;f[_+68>>2]=t;v=v+(J+K+L)*.3333333432674408*Y;f[_+72>>2]=v;p=p+Y}while((o|0)!=(u+-1|0))}C=C+1|0}while((C|0)!=(i|0));o=_+64|0;u=1;z=j;g=k}else fa=365}else{j=0;k=0;l=0;m=0;fa=365}if((fa|0)==365){p=0.0;o=_+64|0;u=0;z=j;g=k}v=1.0/p;w=v*+f[o>>2];f[o>>2]=w;t=v*+f[_+68>>2];f[_+68>>2]=t;v=v*+f[_+72>>2];f[_+72>>2]=v;f[_+96>>2]=3402823466385288598117041.0e14;if(u){j=c[_+36>>2]|0;q=3402823466385288598117041.0e14;k=0;while(1){p=+r(+(+f[j+(k*36|0)+32>>2]+(w*+f[j+(k*36|0)+20>>2]+t*+f[j+(k*36|0)+24>>2]+v*+f[j+(k*36|0)+28>>2])));if(p>2]=p;else p=q;k=k+1|0;if((k|0)==(i|0))break;else q=p}}else p=3402823466385288598117041.0e14;i=c[_+8>>2]|0;if((i|0)>0){j=c[_+16>>2]|0;y=-3402823466385288598117041.0e14;x=-3402823466385288598117041.0e14;w=-3402823466385288598117041.0e14;v=3402823466385288598117041.0e14;t=3402823466385288598117041.0e14;q=3402823466385288598117041.0e14;k=0;do{Y=+f[j+(k<<4)>>2];v=Yy?Y:y;Y=+f[j+(k<<4)+4>>2];t=Yx?Y:x;Y=+f[j+(k<<4)+8>>2];q=Yw?Y:w;k=k+1|0}while((k|0)!=(i|0))}else{y=-3402823466385288598117041.0e14;x=-3402823466385288598117041.0e14;w=-3402823466385288598117041.0e14;v=3402823466385288598117041.0e14;t=3402823466385288598117041.0e14;q=3402823466385288598117041.0e14}f[_+100>>2]=v+y;f[_+104>>2]=t+x;f[_+108>>2]=q+w;f[_+112>>2]=0.0;Y=y-v;L=x-t;q=w-q;f[_+116>>2]=Y;f[_+120>>2]=L;f[_+124>>2]=q;f[_+128>>2]=0.0;t=p/1.7320507764816284;o=Y>2]*.5-t)*.0009765625;f[_+88>>2]=t;f[_+84>>2]=t;f[_+80>>2]=t;p=+f[_+116+(o<<2)>>2]*.5;f[_+80+(o<<2)>>2]=p;i=0;while(1){if(ig(_)|0){fa=478;break}p=p-q;f[_+80+(o<<2)>>2]=p;i=i+1|0;if(i>>>0>=1024){fa=477;break}}t:do if((fa|0)==477){f[_+88>>2]=t;f[_+84>>2]=t;f[_+80>>2]=t}else if((fa|0)==478){q=(+f[_+96>>2]-t)*.0009765625;j=c[_+80+((1<<(1<>2]|0;k=0;while(1){i=c[_+80+((1<>2]|0;f[_+80+((1<>2]=q+(c[h>>2]=i,+f[h>>2]);p=q+ +f[_+80+((1<<(1<>2];f[_+80+((1<<(1<>2]=p;k=k+1|0;if(!(ig(_)|0))break;if(k>>>0>=1024)break t;else j=(f[h>>2]=p,c[h>>2]|0)}c[_+80+((1<>2]=i;c[_+80+((1<<(1<>2]=j}while(0);if(z|0){c[6748]=(c[6748]|0)+1;uc(c[z+-4>>2]|0)}if(m|0){c[6748]=(c[6748]|0)+1;uc(c[m+-4>>2]|0)}if(l|0){c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0)}if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}if(!((n|0)==0|($|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[$+-4>>2]|0)}n=c[aa>>2]|0;o=c[ca>>2]|0;if((n|0)<=0){if(o|0)fa=500}else{k=0;do{m=o+(k*36|0)+4|0;l=o+(k*36|0)+12|0;j=c[l>>2]|0;i=o+(k*36|0)+16|0;if(j|0){if(a[i>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0)}c[l>>2]=0}a[i>>0]=1;c[l>>2]=0;c[m>>2]=0;c[o+(k*36|0)+8>>2]=0;k=k+1|0}while((k|0)!=(n|0));fa=500}if((fa|0)==500){if(a[ma+104+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[o+-4>>2]|0)}c[ca>>2]=0}if(!((ba|0)==0|(da|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[da+-4>>2]|0)}i=c[ia>>2]|0;if(i|0){if(a[ma+124+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[ia>>2]=0}a[ma+124+56>>0]=1;c[ia>>2]=0;c[ma+124+44>>2]=0;c[ma+124+48>>2]=0;i=c[ja>>2]|0;if(i|0){if(a[ma+124+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[ja>>2]=0}a[ma+124+36>>0]=1;c[ja>>2]=0;c[ma+124+24>>2]=0;c[ma+124+28>>2]=0;i=c[ka>>2]|0;if(i|0){if(a[ma+124+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[ka>>2]=0}if(!la){ea=ma;return 1}c[6748]=(c[6748]|0)+1;uc(c[la+-4>>2]|0);ea=ma;return 1}function $a(b,d,e,g,h){b=b|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,t=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0,I=0,J=0,K=0.0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0,T=0,U=0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0,oa=0.0,pa=0.0,qa=0.0,ra=0,sa=0.0,ta=0,ua=0,wa=0,xa=0;xa=ea;ea=ea+688|0;i=c[b+20>>2]|0;if(!i){i=c[b+4>>2]|0;i=va[c[(c[i>>2]|0)+12>>2]&63](i,c[d+8>>2]|0,c[e+8>>2]|0)|0;c[b+20>>2]=i;a[b+16>>0]=1}c[h+4>>2]=i;ta=c[d+4>>2]|0;ua=c[e+4>>2]|0;j=c[ta+4>>2]|0;k=c[ua+4>>2]|0;if((j|0)==10&(k|0)==10){R=+f[i+752>>2];ra=c[ta+52>>2]|0;w=+f[ta+28+(ra<<2)>>2];Q=+f[ta+28+(((ra+2|0)%3|0)<<2)>>2];wa=c[ua+52>>2]|0;m=+f[ua+28+(wa<<2)>>2];P=+f[ua+28+(((wa+2|0)%3|0)<<2)>>2];b=c[d+12>>2]|0;d=c[e+12>>2]|0;E=+f[b+(ra<<2)>>2];K=+f[b+16+(ra<<2)>>2];G=+f[b+32+(ra<<2)>>2];o=+f[d+(wa<<2)>>2];p=+f[d+16+(wa<<2)>>2];z=+f[d+32+(wa<<2)>>2];M=+f[d+48>>2];N=+f[d+52>>2];O=+f[d+56>>2];B=M-+f[b+48>>2];C=N-+f[b+52>>2];D=O-+f[b+56>>2];l=1.0-(E*o+K*p+G*z)*(E*o+K*p+G*z);if(!(l==0.0)){l=(E*B+K*C+G*D-(E*o+K*p+G*z)*(o*B+p*C+z*D))/l;if(!(l<-w)){if(l>w)l=w}else l=-w}else l=0.0;n=(E*o+K*p+G*z)*l-(o*B+p*C+z*D);if(n<-m){l=(E*o+K*p+G*z)*-m+(E*B+K*C+G*D);if(!(l<-w))if(l>w){l=w;m=-m}else m=-m;else{l=-w;m=-m}}else if(n>m){l=m*(E*o+K*p+G*z)+(E*B+K*C+G*D);if(!(l<-w)){if(l>w)l=w}else l=-w}else m=n;y=o*m;x=p*m;w=z*m;m=y+(B-E*l);p=x+(C-K*l);l=w+(D-G*l);o=+s(+(l*l+(m*m+p*p)));if(!(o-Q-P>R)){do if(l*l+(m*m+p*p)<=1.4210854715202004e-14)if(+r(+G)>.7071067690849304){l=1.0/+s(+(K*K+G*G));f[xa+280>>2]=0.0;f[xa+280+4>>2]=-(G*l);f[xa+280+8>>2]=K*l;n=0.0;m=-(G*l);l=K*l;break}else{m=1.0/+s(+(E*E+K*K));f[xa+280>>2]=-(K*m);f[xa+280+4>>2]=E*m;f[xa+280+8>>2]=0.0;n=-(K*m);m=E*m;l=0.0;break}else{f[xa+280>>2]=m*-(1.0/o);f[xa+280+4>>2]=p*-(1.0/o);f[xa+280+8>>2]=l*-(1.0/o);f[xa+280+12>>2]=0.0;n=m*-(1.0/o);m=p*-(1.0/o);l=l*-(1.0/o)}while(0);f[xa+264>>2]=M+y+P*n;f[xa+264+4>>2]=N+x+P*m;f[xa+264+8>>2]=O+w+P*l;f[xa+264+12>>2]=0.0}if(o-Q-P>2]|0)+16>>2]&15](h,xa+280|0,xa+264|0,o-Q-P);i=c[h+4>>2]|0;if(!(c[i+748>>2]|0)){ea=xa;return}j=c[i+740>>2]|0;k=c[(c[h+8>>2]|0)+8>>2]|0;if((j|0)==(k|0)){Hd(i,j+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);ea=xa;return}else{Hd(i,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,k+4|0);ea=xa;return}}f[xa+128+128>>2]=999999984306749440.0;i=c[b+8>>2]|0;A=c[b+12>>2]|0;c[xa+48>>2]=10520;c[xa+48+4>>2]=0;c[xa+48+8>>2]=1065353216;c[xa+48+12>>2]=0;f[xa+48+16>>2]=0.0;c[xa+48+20>>2]=A;c[xa+48+24>>2]=i;c[xa+48+28>>2]=ta;c[xa+48+32>>2]=ua;c[xa+48+36>>2]=j;c[xa+48+40>>2]=k;f[xa+48+44>>2]=+ha[c[(c[ta>>2]|0)+48>>2]&15](ta);f[xa+48+48>>2]=+ha[c[(c[ua>>2]|0)+48>>2]&15](ua);a[xa+48+52>>0]=0;c[xa+48+60>>2]=-1;c[xa+48+72>>2]=1;c[xa+48+76>>2]=1;c[xa+48+28>>2]=ta;c[xa+48+32>>2]=ua;qa=+ha[c[(c[ta>>2]|0)+48>>2]&15](ta);sa=+ha[c[(c[ua>>2]|0)+48>>2]&15](ua);sa=qa+sa+ +f[(c[b+20>>2]|0)+752>>2];f[xa+128+128>>2]=sa*sa;i=c[d+12>>2]|0;c[xa+128>>2]=c[i>>2];c[xa+128+4>>2]=c[i+4>>2];c[xa+128+8>>2]=c[i+8>>2];c[xa+128+12>>2]=c[i+12>>2];A=xa+128+16|0;c[A>>2]=c[i+16>>2];c[A+4>>2]=c[i+16+4>>2];c[A+8>>2]=c[i+16+8>>2];c[A+12>>2]=c[i+16+12>>2];k=xa+128+32|0;c[k>>2]=c[i+32>>2];c[k+4>>2]=c[i+32+4>>2];c[k+8>>2]=c[i+32+8>>2];c[k+12>>2]=c[i+32+12>>2];H=xa+128+48|0;c[H>>2]=c[i+48>>2];c[H+4>>2]=c[i+48+4>>2];c[H+8>>2]=c[i+48+8>>2];c[H+12>>2]=c[i+48+12>>2];i=c[e+12>>2]|0;J=xa+128+64|0;c[J>>2]=c[i>>2];c[J+4>>2]=c[i+4>>2];c[J+8>>2]=c[i+8>>2];c[J+12>>2]=c[i+12>>2];F=xa+128+80|0;c[F>>2]=c[i+16>>2];c[F+4>>2]=c[i+16+4>>2];c[F+8>>2]=c[i+16+8>>2];c[F+12>>2]=c[i+16+12>>2];t=xa+128+96|0;c[t>>2]=c[i+32>>2];c[t+4>>2]=c[i+32+4>>2];c[t+8>>2]=c[i+32+8>>2];c[t+12>>2]=c[i+32+12>>2];I=xa+128+112|0;c[I>>2]=c[i+48>>2];c[I+4>>2]=c[i+48+4>>2];c[I+8>>2]=c[i+48+8>>2];c[I+12>>2]=c[i+48+12>>2];i=c[ta+4>>2]|0;if((i|0)<7?(q=c[ua+4>>2]|0,(q|0)<7):0){c[xa+40>>2]=7192;if(!i){i=q;m=0.0}else{m=+ha[c[(c[ta>>2]|0)+48>>2]&15](ta);i=c[ua+4>>2]|0}if(!i)l=0.0;else l=+ha[c[(c[ua>>2]|0)+48>>2]&15](ua);c[xa>>2]=7220;c[xa+4>>2]=h;f[xa+24>>2]=m;f[xa+28>>2]=l;a[xa+36>>0]=0;U=c[ta+52>>2]|0;a:do if(U|0){na=c[ua+52>>2]|0;do if(!na){if((c[ua+4>>2]|0)!=1)break a;F=xa+624+16|0;a[F>>0]=1;A=xa+624+12|0;c[A>>2]=0;t=xa+624+4|0;c[t>>2]=0;q=xa+624+8|0;c[q>>2]=0;i=c[e+12>>2]|0;qa=+f[ua+56>>2];sa=+f[ua+56+4>>2];m=+f[ua+56+8>>2];l=qa*+f[i>>2]+sa*+f[i+4>>2]+m*+f[i+8>>2]+ +f[i+48>>2];n=qa*+f[i+16>>2]+sa*+f[i+20>>2]+m*+f[i+24>>2]+ +f[i+52>>2];m=qa*+f[i+32>>2]+sa*+f[i+36>>2]+m*+f[i+40>>2]+ +f[i+56>>2];c[6747]=(c[6747]|0)+1;i=kb(35)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[A>>2]|0;if(!i)i=0;else{c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);i=c[t>>2]|0;c[A>>2]=0}a[F>>0]=1;c[A>>2]=j;c[q>>2]=1;f[j+(i<<4)>>2]=l;f[j+(i<<4)+4>>2]=n;f[j+(i<<4)+8>>2]=m;f[j+(i<<4)+12>>2]=0.0;i=(c[t>>2]|0)+1|0;c[t>>2]=i;wa=c[e+12>>2]|0;qa=+f[ua+56+16>>2];sa=+f[ua+56+20>>2];m=+f[ua+56+24>>2];l=qa*+f[wa>>2]+sa*+f[wa+4>>2]+m*+f[wa+8>>2]+ +f[wa+48>>2];n=qa*+f[wa+16>>2]+sa*+f[wa+20>>2]+m*+f[wa+24>>2]+ +f[wa+52>>2];m=qa*+f[wa+32>>2]+sa*+f[wa+36>>2]+m*+f[wa+40>>2]+ +f[wa+56>>2];if((i|0)==(c[q>>2]|0)?(L=(i|0)==0?1:i<<1,(i|0)<(L|0)):0){if(!L)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((L<<4|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[t>>2]|0}if((i|0)>0){k=0;do{wa=j+(k<<4)|0;ra=(c[A>>2]|0)+(k<<4)|0;c[wa>>2]=c[ra>>2];c[wa+4>>2]=c[ra+4>>2];c[wa+8>>2]=c[ra+8>>2];c[wa+12>>2]=c[ra+12>>2];k=k+1|0}while((k|0)!=(i|0))}i=c[A>>2]|0;if(i|0){if(a[F>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[A>>2]=0}a[F>>0]=1;c[A>>2]=j;c[q>>2]=L;i=c[t>>2]|0}wa=c[A>>2]|0;f[wa+(i<<4)>>2]=l;f[wa+(i<<4)+4>>2]=n;f[wa+(i<<4)+8>>2]=m;f[wa+(i<<4)+12>>2]=0.0;i=(c[t>>2]|0)+1|0;c[t>>2]=i;wa=c[e+12>>2]|0;qa=+f[ua+56+32>>2];sa=+f[ua+56+36>>2];m=+f[ua+56+40>>2];l=qa*+f[wa>>2]+sa*+f[wa+4>>2]+m*+f[wa+8>>2]+ +f[wa+48>>2];n=qa*+f[wa+16>>2]+sa*+f[wa+20>>2]+m*+f[wa+24>>2]+ +f[wa+52>>2];m=qa*+f[wa+32>>2]+sa*+f[wa+36>>2]+m*+f[wa+40>>2]+ +f[wa+56>>2];if((i|0)==(c[q>>2]|0)?(S=(i|0)==0?1:i<<1,(i|0)<(S|0)):0){if(!S)j=0;else{c[6747]=(c[6747]|0)+1;i=kb((S<<4|3)+16|0)|0;if(!i)j=0;else{c[(i+4+15&-16)+-4>>2]=i;j=i+4+15&-16}i=c[t>>2]|0}if((i|0)>0){k=0;do{wa=j+(k<<4)|0;e=(c[A>>2]|0)+(k<<4)|0;c[wa>>2]=c[e>>2];c[wa+4>>2]=c[e+4>>2];c[wa+8>>2]=c[e+8>>2];c[wa+12>>2]=c[e+12>>2];k=k+1|0}while((k|0)!=(i|0))}i=c[A>>2]|0;if(i|0){if(a[F>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[A>>2]=0}a[F>>0]=1;c[A>>2]=j;c[q>>2]=S;i=c[t>>2]|0}wa=c[A>>2]|0;f[wa+(i<<4)>>2]=l;f[wa+(i<<4)+4>>2]=n;f[wa+(i<<4)+8>>2]=m;f[wa+(i<<4)+12>>2]=0.0;c[t>>2]=(c[t>>2]|0)+1;o=+f[(c[b+20>>2]|0)+752>>2];Hb(xa+48|0,xa+128|0,xa+40|0,c[g+20>>2]|0,0);l=+f[xa+48+4>>2];m=+f[xa+48+8>>2];n=+f[xa+48+12>>2];if(l*l+m*m+n*n>1.1920928955078125e-07){qa=1.0/(l*l+m*m+n*n);f[xa+384>>2]=l*qa;f[xa+384+4>>2]=m*qa;f[xa+384+8>>2]=n*qa;f[xa+384+12>>2]=0.0;qa=+f[xa+48+56>>2];sa=+ha[c[(c[ta>>2]|0)+48>>2]&15](ta);sa=qa-sa-+ha[c[(c[ua>>2]|0)+48>>2]&15](ua);Gb(xa+384|0,c[ta+52>>2]|0,c[d+12>>2]|0,xa+624|0,sa-o,o,h)}do if(a[b+16>>0]|0?(T=c[h+4>>2]|0,c[T+748>>2]|0):0){i=c[T+740>>2]|0;j=c[(c[h+8>>2]|0)+8>>2]|0;if((i|0)==(j|0)){Hd(T,i+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(T,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,j+4|0);break}}while(0);i=c[A>>2]|0;if(i|0){if(a[F>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[A>>2]=0}}else{sa=+f[(c[b+20>>2]|0)+752>>2];b:do if(!(a[g+24>>0]|0)){Hb(xa+48|0,xa+128|0,xa,c[g+20>>2]|0,0);l=+f[xa+32>>2];if(l<0.0&(a[xa+36>>0]|0)!=0){m=+f[xa+8>>2];n=+f[xa+12>>2];o=+f[xa+16>>2];i=c[xa+20>>2]|0;ra=112}}else{F=c[d+12>>2]|0;H=c[e+12>>2]|0;c[6730]=(c[6730]|0)+1;ia=+f[U+64>>2];ja=+f[U+68>>2];l=+f[F+4>>2];ka=+f[U+72>>2];m=+f[F+8>>2];n=+f[F+16>>2];o=+f[F+20>>2];p=+f[F+24>>2];w=+f[F+32>>2];x=+f[F+36>>2];y=+f[F+40>>2];la=+f[na+64>>2];ma=+f[na+68>>2];pa=+f[na+72>>2];oa=ia*+f[F>>2]+ja*l+ka*m+ +f[F+48>>2]-(la*+f[H>>2]+ma*+f[H+4>>2]+pa*+f[H+8>>2]+ +f[H+48>>2]);qa=ia*n+ja*o+ka*p+ +f[F+52>>2]-(la*+f[H+16>>2]+ma*+f[H+20>>2]+pa*+f[H+24>>2]+ +f[H+52>>2]);pa=ia*w+ja*x+ka*y+ +f[F+56>>2]-(la*+f[H+32>>2]+ma*+f[H+36>>2]+pa*+f[H+40>>2]+ +f[H+56>>2]);k=c[U+28>>2]|0;c:do if((k|0)>0){D=m;E=n;C=o;G=0.0;K=3402823466385288598117041.0e14;j=0;m=0.0;n=0.0;o=0.0;while(1){g=c[U+36>>2]|0;ka=+f[g+(j*36|0)+20>>2];la=+f[g+(j*36|0)+24>>2];ma=+f[g+(j*36|0)+28>>2];z=ka*+f[F>>2]+la*l+ma*D;p=ka*E+la*C+ma*p;l=ka*w+la*x+ma*y;f[xa+296>>2]=z;f[xa+296+4>>2]=p;f[xa+296+8>>2]=l;f[xa+296+12>>2]=0.0;if(z*oa+p*qa+l*pa<0.0){f[xa+296>>2]=-z;f[xa+296+4>>2]=-p;f[xa+296+8>>2]=-l;z=-z;B=-p;l=-l}else B=p;c[6728]=(c[6728]|0)+1;if(Nh(F,H,oa,qa,pa,z,B,l,U,na,K)|0){c[6729]=(c[6729]|0)+1;kg(U,F,xa+296|0,xa+624|0,xa+384|0,xa+360|0,xa+344|0);kg(na,H,xa+296|0,xa+380|0,xa+376|0,xa+328|0,xa+312|0);p=+f[xa+384>>2];w=+f[xa+380>>2];do if(p>2];y=+f[xa+624>>2];if(x=(k|0)){l=z;break c}l=+f[F+4>>2];D=+f[F+8>>2];E=+f[F+16>>2];C=+f[F+20>>2];p=+f[F+24>>2];w=+f[F+32>>2];x=+f[F+36>>2];y=+f[F+40>>2];G=B;K=z;j=i}break b}else{l=3402823466385288598117041.0e14;m=0.0;n=0.0;o=0.0}while(0);k=c[na+28>>2]|0;d:do if((k|0)>0){D=0.0;j=0;while(1){g=c[na+36>>2]|0;la=+f[g+(j*36|0)+20>>2];ma=+f[g+(j*36|0)+24>>2];x=+f[g+(j*36|0)+28>>2];p=la*+f[H>>2]+ma*+f[H+4>>2]+x*+f[H+8>>2];w=la*+f[H+16>>2]+ma*+f[H+20>>2]+x*+f[H+24>>2];x=la*+f[H+32>>2]+ma*+f[H+36>>2]+x*+f[H+40>>2];f[xa+296>>2]=p;f[xa+296+4>>2]=w;f[xa+296+8>>2]=x;f[xa+296+12>>2]=0.0;if(p*oa+w*qa+x*pa<0.0){f[xa+296>>2]=-p;f[xa+296+4>>2]=-w;f[xa+296+8>>2]=-x;p=-p;w=-w;x=-x}c[6728]=(c[6728]|0)+1;if(Nh(F,H,oa,qa,pa,p,w,x,U,na,l)|0){c[6729]=(c[6729]|0)+1;kg(U,F,xa+296|0,xa+624|0,xa+384|0,xa+360|0,xa+344|0);kg(na,H,xa+296|0,xa+380|0,xa+376|0,xa+328|0,xa+312|0);y=+f[xa+384>>2];z=+f[xa+380>>2];do if(y>2];C=+f[xa+624>>2];if(B=(k|0))break d;else D=y}break b}while(0);i=c[U+48>>2]|0;e:do if((i|0)>0){k=c[na+48>>2]|0;x=0.0;A=0;j=-1;q=-1;B=0.0;C=0.0;D=0.0;E=0.0;R=0.0;V=0.0;X=0.0;p=0.0;w=0.0;Q=0.0;P=0.0;O=0.0;K=0.0;M=0.0;N=0.0;y=0.0;z=0.0;G=0.0;f:while(1){g=c[U+56>>2]|0;ia=+f[g+(A<<4)>>2];ja=+f[g+(A<<4)+4>>2];ka=+f[g+(A<<4)+8>>2];ma=ia*+f[F>>2]+ja*+f[F+4>>2]+ka*+f[F+8>>2];la=ia*+f[F+16>>2]+ja*+f[F+20>>2]+ka*+f[F+24>>2];ka=ia*+f[F+32>>2]+ja*+f[F+36>>2]+ka*+f[F+40>>2];if((k|0)>0){W=x;t=0;ja=m;ia=n;ga=o;Z=B;$=C;ba=D;while(1){g=c[na+56>>2]|0;da=+f[g+(t<<4)>>2];fa=+f[g+(t<<4)+4>>2];aa=+f[g+(t<<4)+8>>2];Y=da*+f[H>>2]+fa*+f[H+4>>2]+aa*+f[H+8>>2];_=da*+f[H+16>>2]+fa*+f[H+20>>2]+aa*+f[H+24>>2];aa=da*+f[H+32>>2]+fa*+f[H+36>>2]+aa*+f[H+40>>2];f[xa+296>>2]=la*aa-ka*_;f[xa+296+4>>2]=ka*Y-ma*aa;f[xa+296+8>>2]=ma*_-la*Y;f[xa+296+12>>2]=0.0;do if(!(+r(+(la*aa-ka*_))>1.0e-06)){if(+r(+(ka*Y-ma*aa))>1.0e-06){ra=76;break}if(!(+r(+(ma*_-la*Y))>1.0e-06)){m=ja;n=ia;o=ga;ca=E;da=R;fa=V}else ra=76}else ra=76;while(0);do if((ra|0)==76){ra=0;o=1.0/+s(+((ma*_-la*Y)*(ma*_-la*Y)+((la*aa-ka*_)*(la*aa-ka*_)+(ka*Y-ma*aa)*(ka*Y-ma*aa))));m=(la*aa-ka*_)*o;f[xa+296>>2]=m;n=(ka*Y-ma*aa)*o;f[xa+296+4>>2]=n;o=(ma*_-la*Y)*o;f[xa+296+8>>2]=o;if(m*oa+n*qa+pa*o<0.0){f[xa+296>>2]=-m;f[xa+296+4>>2]=-n;f[xa+296+8>>2]=-o;m=-m;n=-n;o=-o}c[6728]=(c[6728]|0)+1;if(!(Nh(F,H,oa,qa,pa,m,n,o,U,na,l)|0)){m=ja;n=ia;o=ga;ca=E;da=R;fa=V;break}c[6729]=(c[6729]|0)+1;kg(U,F,xa+296|0,xa+624|0,xa+384|0,xa+360|0,xa+344|0);kg(na,H,xa+296|0,xa+380|0,xa+376|0,xa+328|0,xa+312|0);x=+f[xa+384>>2];B=+f[xa+380>>2];do if(!(x>2];D=+f[xa+624>>2];if(C>2];C=+f[xa+344+4>>2];D=+f[xa+344+8>>2];E=+f[xa+328>>2];R=+f[xa+328+4>>2];V=+f[xa+328+8>>2];break}else{x=C-D;i=1;B=+f[xa+360>>2];C=+f[xa+360+4>>2];D=+f[xa+360+8>>2];E=+f[xa+312>>2];R=+f[xa+312+4>>2];V=+f[xa+312+8>>2];break}}else{x=W;i=0;B=Z;C=$;D=ba}while(0);if(!i)break f;if(!(x>2]|0;if((t|0)>=(k|0))break;else{ja=m;ia=n;ga=o;E=ca;R=da;V=fa}}i=c[U+48>>2]|0;x=W;B=Z;C=$;D=ba;E=ca;R=da;V=fa;W=X}else W=X;A=A+1|0;if((A|0)>=(i|0)){i=q;l=W;break e}else X=W}break b}else{j=-1;i=-1;l=0.0;p=0.0;w=0.0;Q=0.0;P=0.0;O=0.0;K=0.0;M=0.0;N=0.0;y=0.0;z=0.0;G=0.0}while(0);if((i|j|0)>-1){C=Q-l;E=P-p;D=O-w;p=y*K+z*M+G*N;w=C*K+E*M+D*N;l=C*y+E*z+D*G;do if(1.0-p*p==0.0)x=0.0;else{if((w-l*p)/(1.0-p*p)<-1000000015047466219876688.0e6){x=-1000000015047466219876688.0e6;break}if(!((w-l*p)/(1.0-p*p)>1000000015047466219876688.0e6)){x=(w-l*p)/(1.0-p*p);break}x=1000000015047466219876688.0e6}while(0);l=p*x-l;do if(l<-1000000015047466219876688.0e6){if(w-p*1000000015047466219876688.0e6<-1000000015047466219876688.0e6){p=-1000000015047466219876688.0e6;l=-1000000015047466219876688.0e6;break}if(!(w-p*1000000015047466219876688.0e6>1000000015047466219876688.0e6)){p=w-p*1000000015047466219876688.0e6;l=-1000000015047466219876688.0e6;break}p=1000000015047466219876688.0e6;l=-1000000015047466219876688.0e6}else{if(!(l>1000000015047466219876688.0e6)){p=x;break}if(w+p*1000000015047466219876688.0e6<-1000000015047466219876688.0e6){p=-1000000015047466219876688.0e6;l=1000000015047466219876688.0e6;break}if(!(w+p*1000000015047466219876688.0e6>1000000015047466219876688.0e6)){p=w+p*1000000015047466219876688.0e6;l=1000000015047466219876688.0e6;break}p=1000000015047466219876688.0e6;l=1000000015047466219876688.0e6}while(0);B=y*l;z=z*l;y=G*l;x=B+(C-K*p);w=z+(E-M*p);p=y+(D-N*p);f[xa+624>>2]=x;f[xa+624+4>>2]=w;f[xa+624+8>>2]=p;f[xa+624+12>>2]=0.0;if(p*p+(x*x+w*w)>1.1920928955078125e-07){l=+s(+(p*p+(x*x+w*w)));f[xa+624>>2]=x*(1.0/l);f[xa+624+4>>2]=w*(1.0/l);f[xa+624+8>>2]=p*(1.0/l);if(x*(1.0/l)*oa+w*(1.0/l)*qa+p*(1.0/l)*pa<0.0){f[xa+624>>2]=-(x*(1.0/l));f[xa+624+4>>2]=-(w*(1.0/l));f[xa+624+8>>2]=-(p*(1.0/l))}f[xa+384>>2]=Q+B;f[xa+384+4>>2]=P+z;f[xa+384+8>>2]=O+y;f[xa+384+12>>2]=0.0;Na[c[(c[h>>2]|0)+16>>2]&15](h,xa+624|0,xa+384|0,-l)}}if(oa*m+qa*n+pa*o<0.0){l=-1000000015047466219876688.0e6;m=-m;n=-n;o=-o;i=0;ra=112}else{l=-1000000015047466219876688.0e6;i=0;ra=112}}while(0);if((ra|0)==112){U=c[ta+52>>2]|0;g=c[ua+52>>2]|0;T=c[d+12>>2]|0;S=c[e+12>>2]|0;N=l-sa;G=1.0/+s(+(m*m+n*n+o*o));M=m*G;K=n*G;G=o*G;f[xa+624>>2]=M;f[xa+624+4>>2]=K;f[xa+624+8>>2]=G;c[xa+624+12>>2]=i;j=c[g+28>>2]|0;t=c[g+36>>2]|0;if((j|0)>0){l=+f[S>>2];m=+f[S+4>>2];n=+f[S+8>>2];o=+f[S+16>>2];p=+f[S+20>>2];w=+f[S+24>>2];x=+f[S+32>>2];y=+f[S+36>>2];z=+f[S+40>>2];i=-1;E=-3402823466385288598117041.0e14;q=0;while(1){B=+f[t+(q*36|0)+20>>2];C=+f[t+(q*36|0)+24>>2];D=+f[t+(q*36|0)+28>>2];k=M*(B*l+C*m+D*n)+K*(B*o+C*p+D*w)+G*(B*x+C*y+D*z)>E;i=k?q:i;q=q+1|0;if((q|0)==(j|0)){I=i;break}else E=k?M*(B*l+C*m+D*n)+K*(B*o+C*p+D*w)+G*(B*x+C*y+D*z):E}}else I=-1;a[xa+384+16>>0]=1;L=xa+384+12|0;c[L>>2]=0;J=xa+384+4|0;c[J>>2]=0;c[xa+384+8>>2]=0;H=c[t+(I*36|0)+4>>2]|0;g:do if((H|0)>0){F=t+(I*36|0)+12|0;i=0;k=0;j=0;while(1){d=c[(c[F>>2]|0)+(j<<2)>>2]|0;e=c[g+16>>2]|0;pa=+f[e+(d<<4)>>2];qa=+f[e+(d<<4)+4>>2];m=+f[e+(d<<4)+8>>2];l=pa*+f[S>>2]+qa*+f[S+4>>2]+m*+f[S+8>>2]+ +f[S+48>>2];n=pa*+f[S+16>>2]+qa*+f[S+20>>2]+m*+f[S+24>>2]+ +f[S+52>>2];m=pa*+f[S+32>>2]+qa*+f[S+36>>2]+m*+f[S+40>>2]+ +f[S+56>>2];if((i|0)==(k|0)){A=(k|0)==0?1:k<<1;if((k|0)<(A|0)){if(!A){i=k;k=0}else{c[6747]=(c[6747]|0)+1;i=kb((A<<4|3)+16|0)|0;if(!i)k=0;else{c[(i+4+15&-16)+-4>>2]=i;k=i+4+15&-16}i=c[J>>2]|0}t=c[L>>2]|0;if((i|0)<=0){if(t)ra=128}else{q=0;do{d=k+(q<<4)|0;e=t+(q<<4)|0;c[d>>2]=c[e>>2];c[d+4>>2]=c[e+4>>2];c[d+8>>2]=c[e+8>>2];c[d+12>>2]=c[e+12>>2];q=q+1|0}while((q|0)!=(i|0));ra=128}if((ra|0)==128){ra=0;if(a[xa+384+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[t+-4>>2]|0);i=c[J>>2]|0}c[L>>2]=0}a[xa+384+16>>0]=1;c[L>>2]=k;c[xa+384+8>>2]=A}else i=k}d=c[L>>2]|0;f[d+(i<<4)>>2]=l;f[d+(i<<4)+4>>2]=n;f[d+(i<<4)+8>>2]=m;f[d+(i<<4)+12>>2]=0.0;i=(c[J>>2]|0)+1|0;c[J>>2]=i;j=j+1|0;if((j|0)>=(H|0))break g;k=c[xa+384+8>>2]|0}}while(0);if((I|0)>-1)Gb(xa+624|0,U,T,xa+384|0,N,sa,h);i=c[L>>2]|0;if(i|0){if(a[xa+384+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[L>>2]=0}}if(a[b+16>>0]|0?(wa=c[h+4>>2]|0,c[wa+748>>2]|0):0){i=c[wa+740>>2]|0;j=c[(c[h+8>>2]|0)+8>>2]|0;if((i|0)==(j|0)){Hd(wa,i+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);break}else{Hd(wa,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,j+4|0);break}}}while(0);ea=xa;return}while(0)}Hb(xa+48|0,xa+128|0,h,c[g+20>>2]|0,0);if((c[b+28>>2]|0?(c[(c[h+4>>2]|0)+748>>2]|0)<(c[b+32>>2]|0):0)?(G=+f[xa+48+4>>2],K=+f[xa+48+8>>2],M=+f[xa+48+12>>2],G*G+K*K+M*M>1.1920928955078125e-07):0){E=1.0/(G*G+K*K+M*M);if(+r(+(M*E))>.7071067690849304){n=1.0/+s(+(M*E*(M*E)+K*E*(K*E)));m=0.0;o=K*E*n;n=-(M*E*n)}else{n=1.0/+s(+(G*E*(G*E)+K*E*(K*E)));m=-(K*E*n);o=0.0;n=G*E*n}D=+ha[c[(c[ta>>2]|0)+16>>2]&15](ta);C=+ha[c[(c[ua>>2]|0)+16>>2]&15](ua);l=.019999999552965164/(D>2]=c[xa+128>>2];c[xa+624+4>>2]=c[xa+128+4>>2];c[xa+624+8>>2]=c[xa+128+8>>2];c[xa+624+12>>2]=c[xa+128+12>>2];c[xa+624+16>>2]=c[A>>2];c[xa+624+16+4>>2]=c[A+4>>2];c[xa+624+16+8>>2]=c[A+8>>2];c[xa+624+16+12>>2]=c[A+12>>2];c[xa+624+32>>2]=c[k>>2];c[xa+624+32+4>>2]=c[k+4>>2];c[xa+624+32+8>>2]=c[k+8>>2];c[xa+624+32+12>>2]=c[k+12>>2];c[xa+624+48>>2]=c[H>>2];c[xa+624+48+4>>2]=c[H+4>>2];c[xa+624+48+8>>2]=c[H+8>>2];c[xa+624+48+12>>2]=c[H+12>>2]}else{c[xa+624>>2]=c[J>>2];c[xa+624+4>>2]=c[J+4>>2];c[xa+624+8>>2]=c[J+8>>2];c[xa+624+12>>2]=c[J+12>>2];c[xa+624+16>>2]=c[F>>2];c[xa+624+16+4>>2]=c[F+4>>2];c[xa+624+16+8>>2]=c[F+8>>2];c[xa+624+16+12>>2]=c[F+12>>2];c[xa+624+32>>2]=c[t>>2];c[xa+624+32+4>>2]=c[t+4>>2];c[xa+624+32+8>>2]=c[t+8>>2];c[xa+624+32+12>>2]=c[t+12>>2];c[xa+624+48>>2]=c[I>>2];c[xa+624+48+4>>2]=c[I+4>>2];c[xa+624+48+8>>2]=c[I+8>>2];c[xa+624+48+12>>2]=c[I+12>>2]}i=c[b+28>>2]|0;if((i|0)>0){B=m*m+n*n+o*o;x=+s(+B);p=(l>.39269909262657166?.39269909262657166:l)*.5;x=+v(+p)/x;z=m*x;y=n*x;x=o*x;p=+u(+p);w=+s(+(M*E*(M*E)+(G*E*(G*E)+K*E*(K*E))));j=0;do{if(B>1.1920928955078125e-07){l=6.2831854820251465/+(i|0)*+(j|0)*.5;m=+v(+l)/w;n=G*E*m;o=K*E*m;m=M*E*m;l=+u(+l);if(D>2]|0;aa=+f[wa>>2];ba=+f[wa+16>>2];ca=+f[wa+32>>2];da=+f[wa+4>>2];fa=+f[wa+20>>2];ga=+f[wa+36>>2];ia=+f[wa+8>>2];la=+f[wa+24>>2];sa=+f[wa+40>>2];f[xa+128>>2]=(1.0-(pa*qa+$*ja))*aa+(ma*qa-ka*ja)*ba+(ma*ja+ka*qa)*ca;f[xa+128+4>>2]=(1.0-(pa*qa+$*ja))*da+(ma*qa-ka*ja)*fa+(ma*ja+ka*qa)*ga;f[xa+128+8>>2]=(1.0-(pa*qa+$*ja))*ia+(ma*qa-ka*ja)*la+(ma*ja+ka*qa)*sa;f[xa+128+12>>2]=0.0;f[xa+128+16>>2]=(ma*qa+ka*ja)*aa+(1.0-(ma*oa+$*ja))*ba+(pa*ja-ka*oa)*ca;f[xa+128+20>>2]=(ma*qa+ka*ja)*da+(1.0-(ma*oa+$*ja))*fa+(pa*ja-ka*oa)*ga;f[xa+128+24>>2]=(ma*qa+ka*ja)*ia+(1.0-(ma*oa+$*ja))*la+(pa*ja-ka*oa)*sa;f[xa+128+28>>2]=0.0;f[xa+128+32>>2]=(ma*ja-ka*qa)*aa+(pa*ja+ka*oa)*ba+(1.0-(ma*oa+pa*qa))*ca;f[xa+128+36>>2]=(ma*ja-ka*qa)*da+(pa*ja+ka*oa)*fa+(1.0-(ma*oa+pa*qa))*ga;f[xa+128+40>>2]=(ma*ja-ka*qa)*ia+(pa*ja+ka*oa)*la+(1.0-(ma*oa+pa*qa))*sa;f[xa+128+44>>2]=0.0;wa=c[e+12>>2]|0;c[J>>2]=c[wa>>2];c[J+4>>2]=c[wa+4>>2];c[J+8>>2]=c[wa+8>>2];c[J+12>>2]=c[wa+12>>2];c[F>>2]=c[wa+16>>2];c[F+4>>2]=c[wa+16+4>>2];c[F+8>>2]=c[wa+16+8>>2];c[F+12>>2]=c[wa+16+12>>2];c[t>>2]=c[wa+32>>2];c[t+4>>2]=c[wa+32+4>>2];c[t+8>>2]=c[wa+32+8>>2];c[t+12>>2]=c[wa+32+12>>2];c[I>>2]=c[wa+48>>2];c[I+4>>2]=c[wa+48+4>>2];c[I+8>>2]=c[wa+48+8>>2];c[I+12>>2]=c[wa+48+12>>2]}else{wa=c[d+12>>2]|0;c[xa+128>>2]=c[wa>>2];c[xa+128+4>>2]=c[wa+4>>2];c[xa+128+8>>2]=c[wa+8>>2];c[xa+128+12>>2]=c[wa+12>>2];c[A>>2]=c[wa+16>>2];c[A+4>>2]=c[wa+16+4>>2];c[A+8>>2]=c[wa+16+8>>2];c[A+12>>2]=c[wa+16+12>>2];c[k>>2]=c[wa+32>>2];c[k+4>>2]=c[wa+32+4>>2];c[k+8>>2]=c[wa+32+8>>2];c[k+12>>2]=c[wa+32+12>>2];c[H>>2]=c[wa+48>>2];c[H+4>>2]=c[wa+48+4>>2];c[H+8>>2]=c[wa+48+8>>2];c[H+12>>2]=c[wa+48+12>>2];ma=m*(z*-m+(y*l+p*-o)-x*-n)+(n*(p*l-z*-n-y*-o-x*-m)+l*(x*-o+(z*l+p*-n)-y*-m))-o*(y*-n+(x*l+p*-m)-z*-o);pa=n*(y*-n+(x*l+p*-m)-z*-o)+(l*(z*-m+(y*l+p*-o)-x*-n)+o*(p*l-z*-n-y*-o-x*-m))-m*(x*-o+(z*l+p*-n)-y*-m);$=o*(x*-o+(z*l+p*-n)-y*-m)+(m*(p*l-z*-n-y*-o-x*-m)+l*(y*-n+(x*l+p*-m)-z*-o))-n*(z*-m+(y*l+p*-o)-x*-n);ka=l*(p*l-z*-n-y*-o-x*-m)-n*(x*-o+(z*l+p*-n)-y*-m)-o*(z*-m+(y*l+p*-o)-x*-n)-m*(y*-n+(x*l+p*-m)-z*-o);oa=ma*(2.0/(ka*ka+($*$+(ma*ma+pa*pa))));qa=pa*(2.0/(ka*ka+($*$+(ma*ma+pa*pa))));ja=$*(2.0/(ka*ka+($*$+(ma*ma+pa*pa))));wa=c[e+12>>2]|0;aa=+f[wa>>2];ba=+f[wa+16>>2];ca=+f[wa+32>>2];da=+f[wa+4>>2];fa=+f[wa+20>>2];ga=+f[wa+36>>2];ia=+f[wa+8>>2];la=+f[wa+24>>2];sa=+f[wa+40>>2];f[xa+128+64>>2]=(1.0-(pa*qa+$*ja))*aa+(ma*qa-ka*ja)*ba+(ma*ja+ka*qa)*ca;f[xa+128+68>>2]=(1.0-(pa*qa+$*ja))*da+(ma*qa-ka*ja)*fa+(ma*ja+ka*qa)*ga;f[xa+128+72>>2]=(1.0-(pa*qa+$*ja))*ia+(ma*qa-ka*ja)*la+(ma*ja+ka*qa)*sa;f[xa+128+76>>2]=0.0;f[xa+128+80>>2]=(ma*qa+ka*ja)*aa+(1.0-(ma*oa+$*ja))*ba+(pa*ja-ka*oa)*ca;f[xa+128+84>>2]=(ma*qa+ka*ja)*da+(1.0-(ma*oa+$*ja))*fa+(pa*ja-ka*oa)*ga;f[xa+128+88>>2]=(ma*qa+ka*ja)*ia+(1.0-(ma*oa+$*ja))*la+(pa*ja-ka*oa)*sa;f[xa+128+92>>2]=0.0;f[xa+128+96>>2]=(ma*ja-ka*qa)*aa+(pa*ja+ka*oa)*ba+(1.0-(ma*oa+pa*qa))*ca;f[xa+128+100>>2]=(ma*ja-ka*qa)*da+(pa*ja+ka*oa)*fa+(1.0-(ma*oa+pa*qa))*ga;f[xa+128+104>>2]=(ma*ja-ka*qa)*ia+(pa*ja+ka*oa)*la+(1.0-(ma*oa+pa*qa))*sa;f[xa+128+108>>2]=0.0}i=c[g+20>>2]|0;c[xa+384>>2]=7248;c[xa+384+32>>2]=h;c[xa+384+36>>2]=c[xa+128>>2];c[xa+384+36+4>>2]=c[xa+128+4>>2];c[xa+384+36+8>>2]=c[xa+128+8>>2];c[xa+384+36+12>>2]=c[xa+128+12>>2];c[xa+384+52>>2]=c[A>>2];c[xa+384+52+4>>2]=c[A+4>>2];c[xa+384+52+8>>2]=c[A+8>>2];c[xa+384+52+12>>2]=c[A+12>>2];c[xa+384+68>>2]=c[k>>2];c[xa+384+68+4>>2]=c[k+4>>2];c[xa+384+68+8>>2]=c[k+8>>2];c[xa+384+68+12>>2]=c[k+12>>2];c[xa+384+84>>2]=c[H>>2];c[xa+384+84+4>>2]=c[H+4>>2];c[xa+384+84+8>>2]=c[H+8>>2];c[xa+384+84+12>>2]=c[H+12>>2];c[xa+384+100>>2]=c[J>>2];c[xa+384+100+4>>2]=c[J+4>>2];c[xa+384+100+8>>2]=c[J+8>>2];c[xa+384+100+12>>2]=c[J+12>>2];c[xa+384+116>>2]=c[F>>2];c[xa+384+116+4>>2]=c[F+4>>2];c[xa+384+116+8>>2]=c[F+8>>2];c[xa+384+116+12>>2]=c[F+12>>2];c[xa+384+132>>2]=c[t>>2];c[xa+384+132+4>>2]=c[t+4>>2];c[xa+384+132+8>>2]=c[t+8>>2];c[xa+384+132+12>>2]=c[t+12>>2];c[xa+384+148>>2]=c[I>>2];c[xa+384+148+4>>2]=c[I+4>>2];c[xa+384+148+8>>2]=c[I+8>>2];c[xa+384+148+12>>2]=c[I+12>>2];c[xa+384+164>>2]=c[xa+624>>2];c[xa+384+164+4>>2]=c[xa+624+4>>2];c[xa+384+164+8>>2]=c[xa+624+8>>2];c[xa+384+164+12>>2]=c[xa+624+12>>2];c[xa+384+180>>2]=c[xa+624+16>>2];c[xa+384+180+4>>2]=c[xa+624+16+4>>2];c[xa+384+180+8>>2]=c[xa+624+16+8>>2];c[xa+384+180+12>>2]=c[xa+624+16+12>>2];c[xa+384+196>>2]=c[xa+624+32>>2];c[xa+384+196+4>>2]=c[xa+624+32+4>>2];c[xa+384+196+8>>2]=c[xa+624+32+8>>2];c[xa+384+196+12>>2]=c[xa+624+32+12>>2];c[xa+384+212>>2]=c[xa+624+48>>2];c[xa+384+212+4>>2]=c[xa+624+48+4>>2];c[xa+384+212+8>>2]=c[xa+624+48+8>>2];c[xa+384+212+12>>2]=c[xa+624+48+12>>2];a[xa+384+228>>0]=D>2]=i;Hb(xa+48|0,xa+128|0,xa+384|0,i,0);i=c[b+28>>2]|0}j=j+1|0}while((j|0)<(i|0))}}if(!(a[b+16>>0]|0)){ea=xa;return}i=c[h+4>>2]|0;if(!(c[i+748>>2]|0)){ea=xa;return}j=c[i+740>>2]|0;k=c[(c[h+8>>2]|0)+8>>2]|0;if((j|0)==(k|0)){Hd(i,j+4|0,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0);ea=xa;return}else{Hd(i,(c[(c[h+12>>2]|0)+8>>2]|0)+4|0,k+4|0);ea=xa;return}}function ab(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0,A=0,B=0.0,C=0.0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.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;Z=ea;ea=ea+96|0;g=c[d+4>>2]|0;i=g>>>0>8?g:8;if((i|0)>0){c[6747]=(c[6747]|0)+1;g=kb((i<<4|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=0;do{Y=h+(g<<4)|0;c[Y>>2]=c[Z>>2];c[Y+4>>2]=c[Z+4>>2];c[Y+8>>2]=c[Z+8>>2];c[Y+12>>2]=c[Z+12>>2];g=g+1|0}while((g|0)!=(i|0));Y=h;g=c[d+4>>2]|0;X=h}else{Y=0;X=0}j=c[d+8>>2]|0;D=c[d+12>>2]|0;G=+f[d+16>>2];do if(!g){g=0;h=1}else{i=c[b+24>>2]|0;if((i|0)<0){h=c[b+32>>2]|0;if((c[b+28>>2]|0)<0){if(h|0?a[b+36>>0]|0:0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}a[b+36>>0]=1;c[b+32>>2]=0;c[b+28>>2]=0;h=0}hk(h+(i<<2)|0,0,z(i,-4)|0)|0}c[b+24>>2]=0;q=3402823466385288598117041.0e14;l=-3402823466385288598117041.0e14;t=3402823466385288598117041.0e14;m=-3402823466385288598117041.0e14;v=3402823466385288598117041.0e14;o=-3402823466385288598117041.0e14;h=0;i=j;while(1){L=+f[i>>2];q=Ll?L:l;L=+f[i+4>>2];t=Lm?L:m;L=+f[i+8>>2];v=Lo?L:o;h=h+1|0;if((h|0)==(g|0))break;else i=i+D|0}n=l-q;m=m-t;l=o-v;F=q+n*.5;C=t+m*.5;B=v+l*.5;do if(g>>>0<3|(n<9.999999974752427e-07|m<9.999999974752427e-07|l<9.999999974752427e-07)){o=n>9.999999974752427e-07&n<3402823466385288598117041.0e14?n:3402823466385288598117041.0e14;o=m>9.999999974752427e-07&m9.999999974752427e-07&l>2]=L;f[X+4>>2]=J;f[X+8>>2]=I;f[X+16>>2]=K;f[X+20>>2]=J;f[X+24>>2]=I;f[X+32>>2]=K;f[X+36>>2]=m;f[X+40>>2]=I;f[X+48>>2]=L;f[X+52>>2]=m;f[X+56>>2]=I;f[X+64>>2]=L;f[X+68>>2]=J;f[X+72>>2]=n;f[X+80>>2]=K;f[X+84>>2]=J;f[X+88>>2]=n;f[X+96>>2]=K;f[X+100>>2]=m;f[X+104>>2]=n;f[X+112>>2]=L;f[X+116>>2]=m;f[X+120>>2]=n;U=8;n=1.0;m=1.0;l=1.0;W=57}else{h=0;A=0;u=0;y=j;while(1){v=1.0/n*+f[y>>2];w=1.0/m*+f[y+4>>2];x=1.0/l*+f[y+8>>2];y=y+D|0;if(u){i=0;do{j=X+(i<<4)|0;o=+f[j>>2];k=X+(i<<4)+4|0;q=+f[k>>2];p=X+(i<<4)+8|0;t=+f[p>>2];if(+r(+(o-v))>>0>>0);if((W|0)==28){W=0;if((v-1.0/n*F)*(v-1.0/n*F)+(w-1.0/m*C)*(w-1.0/m*C)+(x-1.0/l*B)*(x-1.0/l*B)>(o-1.0/n*F)*(o-1.0/n*F)+(q-1.0/m*C)*(q-1.0/m*C)+(t-1.0/l*B)*(t-1.0/l*B)){f[j>>2]=v;f[k>>2]=w;f[p>>2]=x}}if((i|0)==(u|0))W=32;else{p=i;M=u}}else{i=0;W=32}if((W|0)==32){W=0;f[X+(i<<4)>>2]=v;f[X+(i<<4)+4>>2]=w;f[X+(i<<4)+8>>2]=x;p=i;M=i+1|0}if((h|0)==(c[b+28>>2]|0)?(E=(h|0)==0?1:h<<1,(h|0)<(E|0)):0){if(!E)i=0;else{c[6747]=(c[6747]|0)+1;h=kb((E<<2|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[b+24>>2]|0}k=c[b+32>>2]|0;if((h|0)<=0){if(k)W=43}else{j=0;do{c[i+(j<<2)>>2]=c[k+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0));W=43}if((W|0)==43){W=0;if(a[b+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}c[b+32>>2]=0;h=c[b+24>>2]|0}a[b+36>>0]=1;c[b+32>>2]=i;c[b+28>>2]=E}c[(c[b+32>>2]|0)+(h<<2)>>2]=p;h=(c[b+24>>2]|0)+1|0;c[b+24>>2]=h;A=A+1|0;if((A|0)==(g|0))break;else u=M}y=(M|0)==0;if(y){g=1;t=-3402823466385288598117041.0e14;x=3402823466385288598117041.0e14;q=-3402823466385288598117041.0e14;w=3402823466385288598117041.0e14;o=-3402823466385288598117041.0e14;v=3402823466385288598117041.0e14}else{C=3402823466385288598117041.0e14;x=3402823466385288598117041.0e14;F=-3402823466385288598117041.0e14;t=-3402823466385288598117041.0e14;H=3402823466385288598117041.0e14;w=3402823466385288598117041.0e14;I=-3402823466385288598117041.0e14;q=-3402823466385288598117041.0e14;K=3402823466385288598117041.0e14;v=3402823466385288598117041.0e14;L=-3402823466385288598117041.0e14;o=-3402823466385288598117041.0e14;u=0;while(1){B=+f[X+(u<<4)>>2];i=BF;t=p?B:t;G=+f[X+(u<<4)+4>>2];g=GI;q=j?G:q;J=+f[X+(u<<4)+8>>2];h=JL;o=k?J:o;u=u+1|0;if((u|0)==(M|0))break;else{C=i?B:C;F=p?B:F;H=g?G:H;I=j?G:I;K=h?J:K;L=k?J:L}}g=M>>>0<3}t=t-x;C=q-w;o=o-v;if(!(g|(t<9.999999974752427e-07|C<9.999999974752427e-07|o<9.999999974752427e-07))){if(!y){U=M;W=57;break}break}B=x+t*.5;x=w+C*.5;w=v+o*.5;v=t>=9.999999974752427e-07&t<3402823466385288598117041.0e14?t:3402823466385288598117041.0e14;v=C>=9.999999974752427e-07&C=9.999999974752427e-07&o>2]=J;f[X+4>>2]=H;f[X+8>>2]=G;f[X+16>>2]=I;f[X+20>>2]=H;f[X+24>>2]=G;f[X+32>>2]=I;f[X+36>>2]=K;f[X+40>>2]=G;f[X+48>>2]=J;f[X+52>>2]=K;f[X+56>>2]=G;f[X+64>>2]=J;f[X+68>>2]=H;f[X+72>>2]=L;f[X+80>>2]=I;f[X+84>>2]=H;f[X+88>>2]=L;f[X+96>>2]=I;f[X+100>>2]=K;f[X+104>>2]=L;f[X+112>>2]=J;f[X+116>>2]=K;f[X+120>>2]=L;U=8;W=57}while(0);if((W|0)==57){g=0;do{V=X+(g<<4)|0;f[V>>2]=n*+f[V>>2];V=X+(g<<4)+4|0;f[V>>2]=m*+f[V>>2];V=X+(g<<4)+8|0;f[V>>2]=l*+f[V>>2];g=g+1|0}while(g>>>0>>0);O=c[d+20>>2]|0;if((U|0)>=4){l=+f[X>>2];o=+f[X+4>>2];m=+f[X+8>>2];V=U<<2;c[6747]=(c[6747]|0)+1;g=kb((V|3)+16|0)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}a[Z+52+16>>0]=1;R=Z+52+12|0;c[R>>2]=0;c[Z+52+4>>2]=0;E=Z+52+8|0;c[E>>2]=0;c[6747]=(c[6747]|0)+1;h=kb((V|3)+16|0)|0;if(h){c[(h+4+15&-16)+-4>>2]=h;g=c[R>>2]|0;if(!g){g=h+4+15&-16;W=63}else{c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);a[Z+52+16>>0]=1;c[R>>2]=h+4+15&-16;c[E>>2]=U;D=R}}else{g=0;W=63}if((W|0)==63){a[Z+52+16>>0]=1;c[R>>2]=g;c[E>>2]=U;D=R}g=0;A=i;y=i;j=U;v=l;w=m;n=o;q=l;l=m;t=o;k=U;p=i;u=0;while(1){if((g|0)==(j|0)?(T=(g|0)==0?1:g<<1,(g|0)<(T|0)):0){if((T|0)!=0?(c[6747]=(c[6747]|0)+1,N=kb((T<<2|3)+16|0)|0,(N|0)!=0):0){c[(N+4+15&-16)+-4>>2]=N;j=N+4+15&-16}else j=0;i=c[R>>2]|0;if((g|0)<=0){if(i)W=75}else{h=0;do{c[j+(h<<2)>>2]=c[i+(h<<2)>>2];h=h+1|0}while((h|0)!=(g|0));W=75}if((W|0)==75){W=0;c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);c[R>>2]=0;g=c[Z+52+4>>2]|0}c[D>>2]=j;c[E>>2]=T}c[(c[R>>2]|0)+(g<<2)>>2]=1;c[Z+52+4>>2]=g+1;do if((u|0)==(k|0)){g=(u|0)==0;h=g?1:u<<1;if((u|0)<(h|0)){if((h|0)!=0?(c[6747]=(c[6747]|0)+1,S=kb((h<<2|3)+16|0)|0,(S|0)!=0):0){c[(S+4+15&-16)+-4>>2]=S;i=S+4+15&-16}else i=0;if(g){if(!p){Q=i;j=i;h=1;P=i;break}}else{g=0;do{c[i+(g<<2)>>2]=c[p+(g<<2)>>2];g=g+1|0}while((g|0)!=(u|0))}if(!A){Q=i;j=i;P=i}else{c[6748]=(c[6748]|0)+1;uc(c[A+-4>>2]|0);Q=i;j=i;P=i}}else{Q=y;j=A;h=u;P=p}}else{Q=y;j=A;h=k;P=p}while(0);c[P+(u<<2)>>2]=0;i=u+1|0;m=+f[X+(u<<4)>>2];q=m>2];t=K>2];o=L=(U|0))break;g=c[Z+52+4>>2]|0;A=j;y=Q;j=c[E>>2]|0;v=m;w=l;l=o;k=h;p=P;u=i}a[Z+52+16>>0]=1;F=+s(+((m-q)*(m-q)+(n-t)*(n-t)+(l-o)*(l-o)))*1.0000000474974513e-03;c[Z>>2]=1008981770;c[Z+4>>2]=1017370378;c[Z+8>>2]=1065353216;f[Z+12>>2]=0.0;M=Od(X,U,Z,Z+52|0)|0;f[Z+72>>2]=-.009999999776482582;f[Z+72+4>>2]=-.019999999552965164;f[Z+72+8>>2]=-1.0;f[Z+72+12>>2]=0.0;N=Od(X,U,Z+72|0,Z+52|0)|0;p=X+(M<<4)|0;A=X+(N<<4)|0;q=+f[p>>2]-+f[A>>2];D=X+(M<<4)+4|0;E=X+(N<<4)+4|0;v=+f[D>>2]-+f[E>>2];u=X+(M<<4)+8|0;y=X+(N<<4)+8|0;t=+f[u>>2]-+f[y>>2];f[Z>>2]=q;f[Z+4>>2]=v;f[Z+8>>2]=t;f[Z+12>>2]=0.0;a:do if((M|0)!=(N|0)?!(t==0.0&v==0.0&q==0.0):0){l=t*.019999999552965164-v*0.0;f[Z+16>>2]=l;f[Z+20>>2]=q*0.0-t;f[Z+24>>2]=v-q*.019999999552965164;f[Z+28>>2]=0.0;f[Z+32>>2]=t-v*0.0;f[Z+36>>2]=t*.019999999552965164+q*0.0;f[Z+40>>2]=v*-.019999999552965164-q;f[Z+44>>2]=0.0;m=+s(+(l*l+(q*0.0-t)*(q*0.0-t)+(v-q*.019999999552965164)*(v-q*.019999999552965164)));if(m>+s(+((t-v*0.0)*(t-v*0.0)+(t*.019999999552965164+q*0.0)*(t*.019999999552965164+q*0.0)+(v*-.019999999552965164-q)*(v*-.019999999552965164-q)))){f[Z+16>>2]=l*(1.0/m);f[Z+20>>2]=(q*0.0-t)*(1.0/m);o=(v-q*.019999999552965164)*(1.0/m);n=l*(1.0/m);l=(q*0.0-t)*(1.0/m)}else{c[Z+16>>2]=c[Z+32>>2];c[Z+16+4>>2]=c[Z+32+4>>2];c[Z+16+8>>2]=c[Z+32+8>>2];c[Z+16+12>>2]=c[Z+32+12>>2];n=+f[Z+16>>2];L=+f[Z+20>>2];o=+f[Z+24>>2];l=1.0/+s(+(n*n+L*L+o*o));f[Z+16>>2]=n*l;f[Z+20>>2]=L*l;o=o*l;n=n*l;l=L*l}f[Z+24>>2]=o;g=Od(X,U,Z+16|0,Z+52|0)|0;if((g|0)==(M|0)|(g|0)==(N|0)){f[Z+72>>2]=-n;f[Z+72+4>>2]=-l;f[Z+72+8>>2]=-o;f[Z+72+12>>2]=0.0;k=Od(X,U,Z+72|0,Z+52|0)|0}else k=g;if(!((k|0)==(M|0)|(k|0)==(N|0))){h=X+(k<<4)|0;m=+f[h>>2]-+f[p>>2];j=X+(k<<4)+4|0;o=+f[j>>2]-+f[D>>2];i=X+(k<<4)+8|0;n=+f[i>>2]-+f[u>>2];f[Z+16>>2]=m;f[Z+20>>2]=o;f[Z+24>>2]=n;f[Z+28>>2]=0.0;l=1.0/+s(+((v*m-o*q)*(v*m-o*q)+((o*t-n*v)*(o*t-n*v)+(n*q-t*m)*(n*q-t*m))));f[Z+32>>2]=(o*t-n*v)*l;f[Z+36>>2]=(n*q-t*m)*l;f[Z+40>>2]=(v*m-o*q)*l;c[Z+44>>2]=0;g=Od(X,U,Z+32|0,Z+52|0)|0;if((g|0)==(k|0)|((g|0)==(M|0)|(g|0)==(N|0))){f[Z+72>>2]=-((o*t-n*v)*l);f[Z+72+4>>2]=-((n*q-t*m)*l);f[Z+72+8>>2]=-((v*m-o*q)*l);f[Z+72+12>>2]=0.0;g=Od(X,U,Z+72|0,Z+52|0)|0}if(!((g|0)==(k|0)|((g|0)==(M|0)|(g|0)==(N|0)))){B=+f[p>>2];H=+f[D>>2];x=+f[u>>2];K=+f[A>>2]-B;C=+f[E>>2]-H;I=+f[y>>2]-x;J=+f[h>>2]-B;G=+f[j>>2]-H;L=+f[i>>2]-x;T=(+f[X+(g<<4)+8>>2]-x)*(K*G-C*J)+((+f[X+(g<<4)>>2]-B)*(C*L-I*G)+(+f[X+(g<<4)+4>>2]-H)*(I*J-K*L))<0.0;h=T?k:g;g=T?g:k;if((M|0)!=-1){x=(+f[X+(M<<4)>>2]+ +f[X+(N<<4)>>2]+ +f[X+(g<<4)>>2]+ +f[X+(h<<4)>>2])*.25;B=(+f[X+(M<<4)+4>>2]+ +f[X+(N<<4)+4>>2]+ +f[X+(g<<4)+4>>2]+ +f[X+(h<<4)+4>>2])*.25;C=(+f[X+(M<<4)+8>>2]+ +f[X+(N<<4)+8>>2]+ +f[X+(g<<4)+8>>2]+ +f[X+(h<<4)+8>>2])*.25;T=Vg(b,g,h,N)|0;c[T+12>>2]=2;c[T+16>>2]=3;c[T+20>>2]=1;T=Vg(b,h,g,M)|0;c[T+12>>2]=3;c[T+16>>2]=2;c[T+20>>2]=0;T=Vg(b,M,N,h)|0;c[T+12>>2]=0;c[T+16>>2]=1;c[T+20>>2]=3;T=Vg(b,N,M,g)|0;c[T+12>>2]=1;c[T+16>>2]=0;c[T+20>>2]=2;c[P+(h<<2)>>2]=1;c[P+(g<<2)>>2]=1;c[P+(N<<2)>>2]=1;c[P+(M<<2)>>2]=1;g=c[b+4>>2]|0;if((g|0)>0){h=0;do{g=c[(c[b+12>>2]|0)+(h<<2)>>2]|0;S=c[g>>2]|0;N=c[g+4>>2]|0;T=c[g+8>>2]|0;q=+f[X+(N<<4)>>2];o=q-+f[X+(S<<4)>>2];v=+f[X+(N<<4)+4>>2];t=v-+f[X+(S<<4)+4>>2];m=+f[X+(N<<4)+8>>2];l=m-+f[X+(S<<4)+8>>2];q=+f[X+(T<<4)>>2]-q;v=+f[X+(T<<4)+4>>2]-v;m=+f[X+(T<<4)+8>>2]-m;n=+s(+((o*v-t*q)*(o*v-t*q)+((t*m-l*v)*(t*m-l*v)+(l*q-o*m)*(l*q-o*m))));if(n==0.0){c[Z>>2]=1065353216;c[Z+4>>2]=0;c[Z+8>>2]=0;w=1.0;m=0.0;l=0.0}else{f[Z>>2]=(t*m-l*v)*(1.0/n);f[Z+4>>2]=(l*q-o*m)*(1.0/n);f[Z+8>>2]=(o*v-t*q)*(1.0/n);w=(t*m-l*v)*(1.0/n);m=(l*q-o*m)*(1.0/n);l=(o*v-t*q)*(1.0/n)}f[Z+12>>2]=0.0;S=Od(X,U,Z,Z+52|0)|0;c[g+28>>2]=S;T=c[g>>2]|0;f[g+32>>2]=(+f[X+(S<<4)>>2]-+f[X+(T<<4)>>2])*w+(+f[X+(S<<4)+4>>2]-+f[X+(T<<4)+4>>2])*m+(+f[X+(S<<4)+8>>2]-+f[X+(T<<4)+8>>2])*l;h=h+1|0;g=c[b+4>>2]|0}while((h|0)<(g|0))}h=(O|0)==0?999999996:O+-4|0;if((h|0)>0)while(1){y=c[b+12>>2]|0;k=0;j=0;while(1){i=c[y+(k<<2)>>2]|0;do if(j){if(!i){i=j;break}if(!(+f[j+32>>2]<+f[i+32>>2]))i=j;else W=115}else W=115;while(0);if((W|0)==115)W=0;k=k+1|0;if((k|0)>=(g|0))break;else j=i}if((i|0)==0?1:!(+f[i+32>>2]>F)){h=1;break a}A=c[i+28>>2]|0;c[P+(A<<2)>>2]=1;g=c[b+4>>2]|0;b:do if(g|0){k=X+(A<<4)|0;u=X+(A<<4)+4|0;p=X+(A<<4)+8|0;j=y;while(1){i=g+-1|0;g=c[j+(i<<2)>>2]|0;do if(g|0){S=c[g>>2]|0;O=c[g+4>>2]|0;T=c[g+8>>2]|0;I=+f[X+(O<<4)>>2];J=+f[X+(S<<4)>>2];q=+f[X+(O<<4)+4>>2];v=+f[X+(S<<4)+4>>2];w=+f[X+(O<<4)+8>>2];G=+f[X+(S<<4)+8>>2];H=+f[X+(T<<4)>>2]-I;t=+f[X+(T<<4)+4>>2]-q;K=+f[X+(T<<4)+8>>2]-w;L=+s(+(((I-J)*t-(q-v)*H)*((I-J)*t-(q-v)*H)+(((q-v)*K-(w-G)*t)*((q-v)*K-(w-G)*t)+((w-G)*H-(I-J)*K)*((w-G)*H-(I-J)*K))));if(!((+f[p>>2]-G)*(L==0.0?0.0:((I-J)*t-(q-v)*H)*(1.0/L))+((+f[k>>2]-J)*(L==0.0?1.0:((q-v)*K-(w-G)*t)*(1.0/L))+(+f[u>>2]-v)*(L==0.0?0.0:((w-G)*H-(I-J)*K)*(1.0/L)))>F*.009999999776482582))break;dd(b,g,A)}while(0);if(!i)break;j=c[b+12>>2]|0;g=i}i=c[b+4>>2]|0;if(!i)break;g=i;c:do{i=i+-1|0;k=c[b+12>>2]|0;p=c[k+(i<<2)>>2]|0;do if(p){u=c[p>>2]|0;do if((u|0)!=(A|0)){j=c[p+4>>2]|0;if((j|0)==(A|0)){j=A;break}if((c[p+8>>2]|0)!=(A|0))break c}else j=c[p+4>>2]|0;while(0);T=c[p+8>>2]|0;I=+f[X+(j<<4)>>2];J=+f[X+(u<<4)>>2];q=+f[X+(j<<4)+4>>2];v=+f[X+(u<<4)+4>>2];w=+f[X+(j<<4)+8>>2];G=+f[X+(u<<4)+8>>2];H=+f[X+(T<<4)>>2]-I;t=+f[X+(T<<4)+4>>2]-q;K=+f[X+(T<<4)+8>>2]-w;L=+s(+(((I-J)*t-(q-v)*H)*((I-J)*t-(q-v)*H)+(((q-v)*K-(w-G)*t)*((q-v)*K-(w-G)*t)+((w-G)*H-(I-J)*K)*((w-G)*H-(I-J)*K))));if(!(LF*.009999999776482582))break;dd(b,c[k+(c[p+12>>2]<<2)>>2]|0,A);i=c[b+4>>2]|0;g=i}while(0)}while((i|0)!=0);if(!g)break;do{g=g+-1|0;j=c[(c[b+12>>2]|0)+(g<<2)>>2]|0;if(j|0){if((c[j+28>>2]|0)>-1)break b;S=c[j>>2]|0;O=c[j+4>>2]|0;T=c[j+8>>2]|0;q=+f[X+(O<<4)>>2];o=q-+f[X+(S<<4)>>2];v=+f[X+(O<<4)+4>>2];t=v-+f[X+(S<<4)+4>>2];m=+f[X+(O<<4)+8>>2];l=m-+f[X+(S<<4)+8>>2];q=+f[X+(T<<4)>>2]-q;v=+f[X+(T<<4)+4>>2]-v;m=+f[X+(T<<4)+8>>2]-m;n=+s(+((o*v-t*q)*(o*v-t*q)+((t*m-l*v)*(t*m-l*v)+(l*q-o*m)*(l*q-o*m))));if(n==0.0){c[Z>>2]=1065353216;c[Z+4>>2]=0;c[Z+8>>2]=0;w=1.0;m=0.0;l=0.0}else{f[Z>>2]=(t*m-l*v)*(1.0/n);f[Z+4>>2]=(l*q-o*m)*(1.0/n);f[Z+8>>2]=(o*v-t*q)*(1.0/n);w=(t*m-l*v)*(1.0/n);m=(l*q-o*m)*(1.0/n);l=(o*v-t*q)*(1.0/n)}f[Z+12>>2]=0.0;i=Od(X,U,Z,Z+52|0)|0;c[j+28>>2]=i;if(!(c[P+(i<<2)>>2]|0)){T=c[j>>2]|0;f[j+32>>2]=(+f[X+(i<<4)>>2]-+f[X+(T<<4)>>2])*w+(+f[X+(i<<4)+4>>2]-+f[X+(T<<4)+4>>2])*m+(+f[X+(i<<4)+8>>2]-+f[X+(T<<4)+8>>2])*l}else c[j+28>>2]=-1}}while((g|0)!=0)}while(0);if((h|0)<=1){h=1;break a}g=c[b+4>>2]|0;h=h+-1|0}else h=1}else h=0}else W=101}else W=101}else W=101;while(0);if((W|0)==101)h=0;g=c[R>>2]|0;if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);c[R>>2]=0}if(!((P|0)==0|(Q|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[Q+-4>>2]|0)}if(h){g=c[b+4>>2]|0;if((g|0)>0){h=0;k=0;E=0;y=0;j=0;D=0;while(1){u=c[(c[b+12>>2]|0)+(E<<2)>>2]|0;if(!u){p=y;i=D}else{do if((D|0)==(y|0)){p=(y|0)==0?1:y<<1;if((y|0)>=(p|0)){p=y;break}do if(!p)i=0;else{c[6747]=(c[6747]|0)+1;g=kb((p<<2|3)+16|0)|0;if(!g){i=0;break}c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}while(0);if((y|0)>0){g=0;do{c[i+(g<<2)>>2]=c[j+(g<<2)>>2];g=g+1|0}while((g|0)!=(y|0));if(!h){h=i;k=i;j=i;break}}else if((j|0)==0|(h|0)==0){h=i;k=i;j=i;break}c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);h=i;k=i;j=i}else p=y;while(0);c[j+(D<<2)>>2]=c[u>>2];A=D+1|0;y=(c[(c[b+12>>2]|0)+(E<<2)>>2]|0)+4|0;do if((A|0)==(p|0)){u=(p|0)==0?1:p<<1;if((p|0)>=(u|0))break;do if(!u)i=0;else{c[6747]=(c[6747]|0)+1;g=kb((u<<2|3)+16|0)|0;if(!g){i=0;break}c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}while(0);if((p|0)>0){g=0;do{c[i+(g<<2)>>2]=c[j+(g<<2)>>2];g=g+1|0}while((g|0)!=(p|0));if(!h){h=i;k=i;p=u;j=i;break}}else if((j|0)==0|(h|0)==0){h=i;k=i;p=u;j=i;break}c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);h=i;k=i;p=u;j=i}while(0);c[j+(A<<2)>>2]=c[y>>2];A=D+2|0;y=(c[(c[b+12>>2]|0)+(E<<2)>>2]|0)+8|0;do if((A|0)==(p|0)){u=(p|0)==0?1:p<<1;if((p|0)>=(u|0))break;do if(!u)i=0;else{c[6747]=(c[6747]|0)+1;g=kb((u<<2|3)+16|0)|0;if(!g){i=0;break}c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}while(0);if((p|0)>0){g=0;do{c[i+(g<<2)>>2]=c[j+(g<<2)>>2];g=g+1|0}while((g|0)!=(p|0));if(!h){k=i;h=i;p=u;j=i;break}}else if((j|0)==0|(h|0)==0){k=i;h=i;p=u;j=i;break}c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);k=i;h=i;p=u;j=i}while(0);c[j+(A<<2)>>2]=c[y>>2];T=c[b+12>>2]|0;g=c[T+(E<<2)>>2]|0;c[T+(c[g+24>>2]<<2)>>2]=0;if(g|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}g=c[b+4>>2]|0;i=D+3|0}E=E+1|0;if((E|0)>=(g|0)){p=i;break}else{y=p;D=i}}c[Z+48>>2]=(p|0)/3|0;if((p|0)>0){c[6747]=(c[6747]|0)+1;g=kb((p<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}hk(h|0,0,p<<2|0)|0;g=0;do{c[h+(g<<2)>>2]=c[j+(g<<2)>>2];g=g+1|0}while((g|0)!=(p|0));i=h;g=h}else{i=0;g=0}h=c[b+4>>2]|0;M=i;Q=p}else{c[Z+48>>2]=0;k=0;h=g;M=0;g=0;j=0;Q=0}if((h|0)<0){if((c[b+8>>2]|0)<0){i=c[b+12>>2]|0;if(i|0){if(a[b+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+12>>2]=0}a[b+16>>0]=1;c[b+12>>2]=0;c[b+8>>2]=0}do{c[(c[b+12>>2]|0)+(h<<2)>>2]=0;h=h+1|0}while((h|0)!=0)}c[b+4>>2]=0;if(!((j|0)==0|(k|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}P=c[Z+48>>2]|0;k=(U|0)>0;if(k){c[6747]=(c[6747]|0)+1;h=kb((U<<4|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=0;do{T=i+(h<<4)|0;c[T>>2]=c[Z>>2];c[T+4>>2]=c[Z+4>>2];c[T+8>>2]=c[Z+8>>2];c[T+12>>2]=c[Z+12>>2];h=h+1|0}while((h|0)!=(U|0));O=i;N=i}else{O=0;N=0}i=c[b+24>>2]|0;do if((i|0)>0){c[6747]=(c[6747]|0)+1;h=kb((i<<2|3)+16|0)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}hk(j|0,0,i<<2|0)|0;if((c[b+24>>2]|0)<=0){E=j;D=j;break}h=c[b+32>>2]|0;i=0;do{c[j+(i<<2)>>2]=c[h+(i<<2)>>2];i=i+1|0}while((i|0)<(c[b+24>>2]|0));E=j;D=j}else{E=0;D=0}while(0);if(k){c[6747]=(c[6747]|0)+1;h=kb((V|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}hk(h|0,0,V|0)|0;A=h;y=h}else{A=0;y=0}hk(A|0,0,V|0)|0;if((P|0)<=0)if(!y)u=0;else{h=0;W=241}else{u=0;h=0;do{j=g+(u<<2)|0;k=c[j>>2]|0;p=y+(k<<2)|0;i=c[p>>2]|0;if(!i){c[j>>2]=h;c[N+(h<<4)>>2]=c[Y+(k<<4)>>2];c[N+(h<<4)+4>>2]=c[Y+(k<<4)+4>>2];c[N+(h<<4)+8>>2]=c[Y+(k<<4)+8>>2];i=c[b+24>>2]|0;if((i|0)>0){j=0;do{if((c[D+(j<<2)>>2]|0)==(k|0)){c[(c[b+32>>2]|0)+(j<<2)>>2]=h;i=c[b+24>>2]|0}j=j+1|0}while((j|0)<(i|0))}h=h+1|0;c[p>>2]=h}else c[j>>2]=i+-1;u=u+1|0}while((u|0)!=(P*3|0));W=241}do if((W|0)==241){if(!A){u=h;break}c[6748]=(c[6748]|0)+1;uc(c[A+-4>>2]|0);u=h}while(0);if(!((D|0)==0|(E|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[E+-4>>2]|0)}do if(!(c[d>>2]&1)){a[e>>0]=1;c[e+4>>2]=u;k=c[e+12>>2]|0;if((k|0)<(u|0)){if((c[e+16>>2]|0)<(u|0)){if(!u){i=k;j=0}else{c[6747]=(c[6747]|0)+1;h=kb((u<<4|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[e+12>>2]|0;j=h}if((i|0)>0){h=0;do{b=j+(h<<4)|0;W=(c[e+20>>2]|0)+(h<<4)|0;c[b>>2]=c[W>>2];c[b+4>>2]=c[W+4>>2];c[b+8>>2]=c[W+8>>2];c[b+12>>2]=c[W+12>>2];h=h+1|0}while((h|0)!=(i|0))}h=c[e+20>>2]|0;if(h|0){if(a[e+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[e+20>>2]=0}a[e+24>>0]=1;c[e+20>>2]=j;c[e+16>>2]=u;i=e+20|0}else i=e+20|0;h=k;do{b=(c[i>>2]|0)+(h<<4)|0;c[b>>2]=c[Z>>2];c[b+4>>2]=c[Z+4>>2];c[b+8>>2]=c[Z+8>>2];c[b+12>>2]=c[Z+12>>2];h=h+1|0}while((h|0)!=(u|0))}c[e+12>>2]=u;c[e+28>>2]=P;c[e+32>>2]=P<<2;p=c[e+40>>2]|0;if((P<<2|0)>(p|0)){d:do if((c[e+44>>2]|0)<(P<<2|0)){if(!(P<<2)){k=p;h=0}else{c[6747]=(c[6747]|0)+1;h=kb((P<<4|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}k=c[e+40>>2]|0}i=c[e+48>>2]|0;do if((k|0)>0){j=0;do{c[h+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(k|0))}else{if(i|0)break;a[e+52>>0]=1;c[e+48>>2]=h;c[e+44>>2]=P<<2;break d}while(0);if(a[e+52>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[e+52>>0]=1;c[e+48>>2]=h;c[e+44>>2]=P<<2}else h=c[e+48>>2]|0;while(0);hk(h+(p<<2)|0,0,(P<<2)-p<<2|0)|0}c[e+40>>2]=P<<2;vh(c[e+20>>2]|0,O|0,u<<4|0)|0;if(!P)break;i=c[e+48>>2]|0;j=0;k=g;while(1){c[i>>2]=3;if(!(c[d>>2]&2)){c[i+4>>2]=c[k>>2];h=k+8|0}else{c[i+4>>2]=c[k+8>>2];h=k}c[i+8>>2]=c[k+4>>2];c[i+12>>2]=c[h>>2];j=j+1|0;if((j|0)==(P|0))break;else{i=i+16|0;k=k+12|0}}}else{a[e>>0]=0;c[e+4>>2]=u;k=c[e+12>>2]|0;if((k|0)<(u|0)){if((c[e+16>>2]|0)<(u|0)){if(!u){i=k;j=0}else{c[6747]=(c[6747]|0)+1;h=kb((u<<4|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}i=c[e+12>>2]|0;j=h}if((i|0)>0){h=0;do{b=j+(h<<4)|0;W=(c[e+20>>2]|0)+(h<<4)|0;c[b>>2]=c[W>>2];c[b+4>>2]=c[W+4>>2];c[b+8>>2]=c[W+8>>2];c[b+12>>2]=c[W+12>>2];h=h+1|0}while((h|0)!=(i|0))}h=c[e+20>>2]|0;if(h|0){if(a[e+24>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[e+20>>2]=0}a[e+24>>0]=1;c[e+20>>2]=j;c[e+16>>2]=u;i=e+20|0}else i=e+20|0;h=k;do{b=(c[i>>2]|0)+(h<<4)|0;c[b>>2]=c[Z>>2];c[b+4>>2]=c[Z+4>>2];c[b+8>>2]=c[Z+8>>2];c[b+12>>2]=c[Z+12>>2];h=h+1|0}while((h|0)!=(u|0))}c[e+12>>2]=u;c[e+28>>2]=P;c[e+32>>2]=P*3;p=c[e+40>>2]|0;if((p|0)<(P*3|0)){e:do if((c[e+44>>2]|0)<(P*3|0)){if(!P){k=p;h=0}else{c[6747]=(c[6747]|0)+1;h=kb((P*12|3)+16|0)|0;if(!h)h=0;else{c[(h+4+15&-16)+-4>>2]=h;h=h+4+15&-16}k=c[e+40>>2]|0}i=c[e+48>>2]|0;do if((k|0)>0){j=0;do{c[h+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(k|0))}else{if(i|0)break;a[e+52>>0]=1;c[e+48>>2]=h;c[e+44>>2]=P*3;break e}while(0);if(a[e+52>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}a[e+52>>0]=1;c[e+48>>2]=h;c[e+44>>2]=P*3}else h=c[e+48>>2]|0;while(0);hk(h+(p<<2)|0,0,(P*12|0)-(p<<2)|0)|0}c[e+40>>2]=P*3;vh(c[e+20>>2]|0,O|0,u<<4|0)|0;if(!(c[d>>2]&2)){vh(c[e+48>>2]|0,M|0,P*12|0)|0;break}if(!P)break;h=c[e+48>>2]|0;i=0;j=g;while(1){c[h>>2]=c[j+8>>2];c[h+4>>2]=c[j+4>>2];c[h+8>>2]=c[j>>2];i=i+1|0;if((i|0)==(P|0))break;else{h=h+12|0;j=j+12|0}}}while(0);do if(Q){if(!g){g=0;break}c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);g=0}while(0);if((N|0)==0|(O|0)==0){h=0;break}c[6748]=(c[6748]|0)+1;uc(c[O+-4>>2]|0);h=0;break}}}g=0;h=1}while(0);if(!((X|0)==0|(Y|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[Y+-4>>2]|0)}if(!g){ea=Z;return h|0}c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);ea=Z;return h|0}function bb(b,d,e){b=b|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0.0,P=0.0,Q=0.0;M=ea;ea=ea+16|0;g=c[b+1112>>2]|0;a:do if((g|0)>0)while(1){l=c[c[b+1120>>2]>>2]|0;g=c[l+348>>2]|0;if(g|0){jg(b+1048|0,g)|0;h=c[b+1052>>2]|0;if(h|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[b+1052>>2]=g;c[b+1060>>2]=(c[b+1060>>2]|0)+-1}g=c[l+52>>2]|0;if(g|0){if(a[l+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[l+52>>2]=0}a[l+56>>0]=1;c[l+52>>2]=0;c[l+44>>2]=0;c[l+48>>2]=0;g=c[l+32>>2]|0;if(g|0){if(a[l+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[l+32>>2]=0}a[l+36>>0]=1;c[l+32>>2]=0;c[l+24>>2]=0;c[l+28>>2]=0;g=c[l+12>>2]|0;if(g|0){if(a[l+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[l+12>>2]=0}a[l+16>>0]=1;c[l+12>>2]=0;c[l+4>>2]=0;c[l+8>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[l+-4>>2]|0);g=c[b+1112>>2]|0;if((g|0)<=0){l=g;break a}j=c[b+1120>>2]|0;h=0;do{i=j+(h<<2)|0;if((c[i>>2]|0)==(l|0)){L=23;break}h=h+1|0}while((h|0)<(g|0));if((L|0)==23){L=0;if((h|0)<(g|0)){c[i>>2]=c[j+(g+-1<<2)>>2];c[(c[b+1120>>2]|0)+(g+-1<<2)>>2]=l;c[b+1112>>2]=g+-1;g=g+-1|0}}if((g|0)<=0){l=g;break}}else l=g;while(0);g=c[b+712>>2]|0;g=(g|0)>(d|0)?d:g;if((l|0)<(g|0)){if((c[b+1116>>2]|0)<(g|0)){if(g){c[6747]=(c[6747]|0)+1;h=kb((g<<2|3)+16|0)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}h=c[b+1112>>2]|0;if((h|0)>0){i=0;do{c[j+(i<<2)>>2]=c[(c[b+1120>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(h|0));i=b+1120|0}else i=b+1120|0}else{i=b+1120|0;j=0}h=c[i>>2]|0;if(h|0){if(a[b+1124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[i>>2]=0}a[b+1124>>0]=1;c[i>>2]=j;c[b+1116>>2]=g}else i=b+1120|0;h=l;do{c[(c[i>>2]|0)+(h<<2)>>2]=0;h=h+1|0}while((h|0)!=(g|0))}c[b+1112>>2]=g;if((g|0)>0){h=0;do{c[6747]=(c[6747]|0)+1;g=kb(403)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}a[g+16>>0]=1;c[g+12>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;a[g+36>>0]=1;c[g+32>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;a[g+56>>0]=1;c[g+52>>2]=0;c[g+44>>2]=0;c[g+48>>2]=0;i=g+348|0;c[i>>2]=0;c[i+4>>2]=0;c[i+8>>2]=0;c[i+12>>2]=0;c[i+16>>2]=0;f[g+368>>2]=100.0;f[g+372>>2]=.009999999776482582;a[g+376>>0]=0;c[(c[b+1120>>2]|0)+(h<<2)>>2]=g;i=c[b+1120>>2]|0;a[(c[i+(h<<2)>>2]|0)+377>>0]=1;h=h+1|0;g=c[b+1112>>2]|0}while((h|0)<(g|0));if((g|0)>0){h=c[b+712>>2]|0;if((h|0)>0){m=0.0;n=0.0;k=0.0;l=g;p=0;while(1){d=c[b+720>>2]|0;m=m+ +f[d+(p*104|0)+8>>2];n=n+ +f[d+(p*104|0)+12>>2];o=k+ +f[d+(p*104|0)+16>>2];l=c[i+(((p*29873|0)%(l|0)|0)<<2)>>2]|0;d=d+(p*104|0)|0;i=c[l+24>>2]|0;if((i|0)==(c[l+28>>2]|0)?(q=(i|0)==0?1:i<<1,(i|0)<(q|0)):0){if(!q){h=i;i=0}else{c[6747]=(c[6747]|0)+1;h=kb((q<<2|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[l+24>>2]|0}if((h|0)>0){j=0;do{c[i+(j<<2)>>2]=c[(c[l+32>>2]|0)+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0))}j=c[l+32>>2]|0;if(j){if(a[l+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);h=c[l+24>>2]|0}c[l+32>>2]=0}a[l+36>>0]=1;c[l+32>>2]=i;c[l+28>>2]=q;i=h;h=c[b+712>>2]|0}c[(c[l+32>>2]|0)+(i<<2)>>2]=d;c[l+24>>2]=i+1;j=p+1|0;if((j|0)>=(h|0))break;k=o;l=c[b+1112>>2]|0;i=c[b+1120>>2]|0;p=j}k=1.0/+(h|0);if((g|0)>=0)if(!g){m=m*k;n=n*k;k=o*k;i=0;L=72}else{m=m*k;n=n*k;k=o*k;L=70}else{H=0;G=0;D=b+720|0}}else{m=1.0/+(h|0)*0.0;n=1.0/+(h|0)*0.0;k=1.0/+(h|0)*0.0;L=70}if((L|0)==70){c[6747]=(c[6747]|0)+1;h=kb((g<<4|3)+16|0)|0;if(!h){i=0;L=72}else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16;L=72}}if((L|0)==72){h=0;do{f[i+(h<<4)>>2]=m;f[i+(h<<4)+4>>2]=n;f[i+(h<<4)+8>>2]=k;f[i+(h<<4)+12>>2]=0.0;h=h+1|0}while((h|0)!=(g|0));H=i;G=i;D=b+720|0}t=G+4|0;u=G+8|0;v=0;do{A=+(v|0)*.0625;A=2.0-(A>1.0?1.0:A);l=0;d=0;while(1){h=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;j=c[h+24>>2]|0;if((j|0)>0){i=c[h+32>>2]|0;L=c[i>>2]|0;n=+f[L+8>>2]+0.0;m=+f[L+12>>2]+0.0;k=+f[L+16>>2]+0.0;if((j|0)==1)L=82;else{h=1;do{L=c[i+(h<<2)>>2]|0;n=n+ +f[L+8>>2];m=m+ +f[L+12>>2];k=k+ +f[L+16>>2];h=h+1|0}while((h|0)<(j|0));L=80}}else{k=0.0;m=0.0;n=0.0;L=80}if((L|0)==80){L=0;if(!j)s=l;else L=82}if((L|0)==82){L=0;s=G+(d<<4)|0;x=+f[s>>2];w=G+(d<<4)+4|0;y=+f[w>>2];h=G+(d<<4)+8|0;o=+f[h>>2];n=x+A*(n*(1.0/+(j|0))-x);m=y+A*(m*(1.0/+(j|0))-y);k=o+A*(k*(1.0/+(j|0))-o);f[s>>2]=n;f[w>>2]=m;f[h>>2]=k;f[G+(d<<4)+12>>2]=0.0;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;h=c[j+24>>2]|0;if((h|0)<0){if((c[j+28>>2]|0)<0){i=c[j+32>>2]|0;if(i|0){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=0;c[j+28>>2]=0}do{c[(c[j+32>>2]|0)+(h<<2)>>2]=0;h=h+1|0}while((h|0)!=0)}c[j+24>>2]=0;s=l|(n-x)*(n-x)+(m-y)*(m-y)+(k-o)*(k-o)>1.1920928955078125e-07}d=d+1|0;if((d|0)>=(g|0))break;else l=s}v=v+1|0;h=c[b+712>>2]|0;b:do if((h|0)>0){if((g|0)<=1){p=0;while(1){l=c[c[b+1120>>2]>>2]|0;d=(c[D>>2]|0)+(p*104|0)|0;i=c[l+24>>2]|0;if((i|0)==(c[l+28>>2]|0)?(E=(i|0)==0?1:i<<1,(i|0)<(E|0)):0){if(!E){h=i;i=0}else{c[6747]=(c[6747]|0)+1;h=kb((E<<2|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[l+24>>2]|0}if((h|0)>0){j=0;do{c[i+(j<<2)>>2]=c[(c[l+32>>2]|0)+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0))}j=c[l+32>>2]|0;if(j){if(a[l+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);h=c[l+24>>2]|0}c[l+32>>2]=0}a[l+36>>0]=1;c[l+32>>2]=i;c[l+28>>2]=E;i=h;h=c[b+712>>2]|0}c[(c[l+32>>2]|0)+(i<<2)>>2]=d;c[l+24>>2]=i+1;p=p+1|0;if((p|0)>=(h|0))break b}}q=0;do{d=c[D>>2]|0;n=+f[d+(q*104|0)+8>>2];o=+f[d+(q*104|0)+12>>2];x=+f[d+(q*104|0)+16>>2];j=1;l=0;m=+r(+(+f[G>>2]-n))+ +r(+(+f[t>>2]-o))+ +r(+(+f[u>>2]-x));while(1){k=+r(+(+f[G+(j<<4)>>2]-n))+ +r(+(+f[G+(j<<4)+4>>2]-o))+ +r(+(+f[G+(j<<4)+8>>2]-x));i=k>2]|0)+(l<<2)>>2]|0;l=d+(q*104|0)|0;i=c[p+24>>2]|0;if((i|0)==(c[p+28>>2]|0)?(F=(i|0)==0?1:i<<1,(i|0)<(F|0)):0){if(!F){h=i;i=0}else{c[6747]=(c[6747]|0)+1;h=kb((F<<2|3)+16|0)|0;if(!h)i=0;else{c[(h+4+15&-16)+-4>>2]=h;i=h+4+15&-16}h=c[p+24>>2]|0}if((h|0)>0){j=0;do{c[i+(j<<2)>>2]=c[(c[p+32>>2]|0)+(j<<2)>>2];j=j+1|0}while((j|0)!=(h|0))}j=c[p+32>>2]|0;if(j){if(a[p+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[j+-4>>2]|0);h=c[p+24>>2]|0}c[p+32>>2]=0}a[p+36>>0]=1;c[p+32>>2]=i;c[p+28>>2]=F;i=h;h=c[b+712>>2]|0}c[(c[p+32>>2]|0)+(i<<2)>>2]=l;c[p+24>>2]=i+1;q=q+1|0}while((q|0)<(h|0))}while(0)}while((v|0)<(e|0)&s);if((h|0)>0){h=h<<2;c[6747]=(c[6747]|0)+1;g=kb((h|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}hk(g|0,-1,h|0)|0;w=g;v=g}else{w=0;v=0}g=c[b+1112>>2]|0;if((g|0)>0){d=c[b+1120>>2]|0;l=0;do{j=c[d+(l<<2)>>2]|0;if((c[j+24>>2]|0)>0){g=c[D>>2]|0;h=c[j+32>>2]|0;c[v+((((c[h>>2]|0)-g|0)/104|0)<<2)>>2]=l;if((c[j+24>>2]|0)>1){i=1;do{c[v+((((c[h+(i<<2)>>2]|0)-g|0)/104|0)<<2)>>2]=l;i=i+1|0}while((i|0)<(c[j+24>>2]|0))}g=c[b+1112>>2]|0}l=l+1|0}while((l|0)<(g|0))}if((c[b+752>>2]|0)>0){s=0;do{e=c[b+760>>2]|0;p=c[D>>2]|0;g=((c[e+(s*44|0)+8>>2]|0)-p|0)/104|0;c[M>>2]=g;c[M+4>>2]=((c[e+(s*44|0)+12>>2]|0)-p|0)/104|0;c[M+8>>2]=((c[e+(s*44|0)+16>>2]|0)-p|0)/104|0;p=0;while(1){d=c[v+(g<<2)>>2]|0;q=p+1|0;g=c[M+(((q|0)==3?0:q)<<2)>>2]|0;c:do if((c[v+(g<<2)>>2]|0)!=(d|0)){l=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;j=(c[D>>2]|0)+(g*104|0)|0;g=c[l+24>>2]|0;d:do if((g|0)>0){i=c[l+32>>2]|0;h=0;while(1){if((c[i+(h<<2)>>2]|0)==(j|0))break;h=h+1|0;if((h|0)>=(g|0))break d}if((h|0)!=(g|0))break c}while(0);if((g|0)==(c[l+28>>2]|0)?(I=(g|0)==0?1:g<<1,(g|0)<(I|0)):0){if(!I)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((I<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[l+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[l+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[l+32>>2]|0;if(i){if(a[l+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[l+24>>2]|0}c[l+32>>2]=0}a[l+36>>0]=1;c[l+32>>2]=h;c[l+28>>2]=I}c[(c[l+32>>2]|0)+(g<<2)>>2]=j;c[l+24>>2]=g+1}while(0);g=c[M+((((p+2|0)>>>0)%3|0)<<2)>>2]|0;e:do if((c[v+(g<<2)>>2]|0)!=(d|0)){l=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;j=(c[D>>2]|0)+(g*104|0)|0;g=c[l+24>>2]|0;f:do if((g|0)>0){i=c[l+32>>2]|0;h=0;while(1){if((c[i+(h<<2)>>2]|0)==(j|0))break;h=h+1|0;if((h|0)>=(g|0))break f}if((h|0)!=(g|0))break e}while(0);if((g|0)==(c[l+28>>2]|0)?(J=(g|0)==0?1:g<<1,(g|0)<(J|0)):0){if(!J)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((J<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[l+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[l+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[l+32>>2]|0;if(i){if(a[l+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[l+24>>2]|0}c[l+32>>2]=0}a[l+36>>0]=1;c[l+32>>2]=h;c[l+28>>2]=J}c[(c[l+32>>2]|0)+(g<<2)>>2]=j;c[l+24>>2]=g+1}while(0);if(q>>>0>=3)break;g=c[M+(q<<2)>>2]|0;p=q}s=s+1|0}while((s|0)<(c[b+752>>2]|0));g=c[b+1112>>2]|0}if((g|0)>1){c[6747]=(c[6747]|0)+1;g=kb(403)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}a[g+16>>0]=1;c[g+12>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;p=g+36|0;a[p>>0]=1;s=g+32|0;c[s>>2]=0;t=g+24|0;c[t>>2]=0;q=g+28|0;c[q>>2]=0;a[g+56>>0]=1;c[g+52>>2]=0;c[g+44>>2]=0;c[g+48>>2]=0;u=g+348|0;c[u>>2]=0;c[u+4>>2]=0;c[u+8>>2]=0;c[u+12>>2]=0;c[u+16>>2]=0;f[g+368>>2]=100.0;f[g+372>>2]=.009999999776482582;a[g+376>>0]=0;u=g;a[g+377>>0]=0;j=c[b+712>>2]|0;if((j|0)>0){c[6747]=(c[6747]|0)+1;g=kb((j<<2|3)+16|0)|0;if(!g)i=0;else{c[(g+4+15&-16)+-4>>2]=g;i=g+4+15&-16}g=c[t>>2]|0;if((g|0)>0){h=0;do{c[i+(h<<2)>>2]=c[(c[s>>2]|0)+(h<<2)>>2];h=h+1|0}while((h|0)!=(g|0))}g=c[s>>2]|0;if(g|0){if(a[p>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[s>>2]=0}a[p>>0]=1;c[s>>2]=i;c[q>>2]=j;g=c[b+712>>2]|0;if((g|0)>0){i=c[t>>2]|0;h=j;d=0;do{l=(c[D>>2]|0)+(d*104|0)|0;do if((i|0)==(h|0)){j=(h|0)==0?1:h<<1;if((h|0)>=(j|0)){i=h;break}if(!j){g=h;h=0}else{c[6747]=(c[6747]|0)+1;g=kb((j<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[t>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[s>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[s>>2]|0;if(i){if(a[p>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[t>>2]|0}c[s>>2]=0}a[p>>0]=1;c[s>>2]=h;c[q>>2]=j;i=g;g=c[b+712>>2]|0;h=j}while(0);c[(c[s>>2]|0)+(i<<2)>>2]=l;i=i+1|0;c[t>>2]=i;d=d+1|0}while((d|0)<(g|0))}}g=c[b+1112>>2]|0;if((g|0)==(c[b+1116>>2]|0)?(K=(g|0)==0?1:g<<1,(g|0)<(K|0)):0){if(!K)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((K<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[b+1112>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[b+1120>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[b+1120>>2]|0;if(i){if(a[b+1124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[b+1112>>2]|0}c[b+1120>>2]=0}a[b+1124>>0]=1;c[b+1120>>2]=h;c[b+1116>>2]=K}c[(c[b+1120>>2]|0)+(g<<2)>>2]=u;K=g+1|0;c[b+1112>>2]=K;I=c[b+1120>>2]|0;g=I+(g<<2)|0;J=c[I>>2]|0;c[I>>2]=c[g>>2];c[g>>2]=J;g=K}if((g|0)>0){h=0;do{d=c[(c[b+1120>>2]|0)+(h<<2)>>2]|0;g:do if(!(c[d+24>>2]|0)){h=h+-1|0;g=c[d+348>>2]|0;if(g|0){jg(b+1048|0,g)|0;i=c[b+1052>>2]|0;if(i|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+1052>>2]=g;c[b+1060>>2]=(c[b+1060>>2]|0)+-1}g=c[d+52>>2]|0;if(g|0){if(a[d+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+52>>2]=0}a[d+56>>0]=1;c[d+52>>2]=0;c[d+44>>2]=0;c[d+48>>2]=0;g=c[d+32>>2]|0;if(g|0){if(a[d+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+32>>2]=0}a[d+36>>0]=1;c[d+32>>2]=0;c[d+24>>2]=0;c[d+28>>2]=0;g=c[d+12>>2]|0;if(g|0){if(a[d+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[d+12>>2]=0}a[d+16>>0]=1;c[d+12>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0);g=c[b+1112>>2]|0;if((g|0)>0){l=c[b+1120>>2]|0;i=0;while(1){j=l+(i<<2)|0;if((c[j>>2]|0)==(d|0))break;i=i+1|0;if((i|0)>=(g|0))break g}if((i|0)>=(g|0))break;c[j>>2]=c[l+(g+-1<<2)>>2];c[(c[b+1120>>2]|0)+(g+-1<<2)>>2]=d;c[b+1112>>2]=g+-1;g=g+-1|0}}while(0);h=h+1|0}while((h|0)<(g|0))}if(!((v|0)==0|(w|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[w+-4>>2]|0)}if(!((G|0)==0|(H|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[H+-4>>2]|0)}}else L=244}else L=244;h:do if((L|0)==244){l=c[b+772>>2]|0;if(!l){d=c[b+752>>2]|0;if((g|0)<(d|0)){if((c[b+1116>>2]|0)<(d|0)){if(d){c[6747]=(c[6747]|0)+1;h=kb((d<<2|3)+16|0)|0;if(!h)l=0;else{c[(h+4+15&-16)+-4>>2]=h;l=h+4+15&-16}h=c[b+1112>>2]|0;if((h|0)>0){i=0;do{c[l+(i<<2)>>2]=c[(c[b+1120>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(h|0));j=b+1120|0;i=l}else{j=b+1120|0;i=l}}else{j=b+1120|0;i=0}h=c[j>>2]|0;if(h|0){if(a[b+1124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[j>>2]=0}a[b+1124>>0]=1;c[j>>2]=i;c[b+1116>>2]=d}do{c[(c[b+1120>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(d|0))}c[b+1112>>2]=d;if((d|0)>0){h=0;do{c[6747]=(c[6747]|0)+1;g=kb(403)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}a[g+16>>0]=1;c[g+12>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;a[g+36>>0]=1;c[g+32>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;a[g+56>>0]=1;c[g+52>>2]=0;c[g+44>>2]=0;c[g+48>>2]=0;L=g+348|0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[L+16>>2]=0;f[g+368>>2]=100.0;f[g+372>>2]=.009999999776482582;a[g+376>>0]=0;c[(c[b+1120>>2]|0)+(h<<2)>>2]=g;a[(c[(c[b+1120>>2]|0)+(h<<2)>>2]|0)+377>>0]=1;h=h+1|0}while((h|0)<(c[b+1112>>2]|0))}if((c[b+752>>2]|0)<=0)break;d=0;while(1){j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+760>>2]|0)+(d*44|0)+8|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(p=(g|0)==0?1:g<<1,(g|0)<(p|0)):0){if(!p)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((p<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=p}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+760>>2]|0)+(d*44|0)+12|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(s=(g|0)==0?1:g<<1,(g|0)<(s|0)):0){if(!s)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((s<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=s}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+760>>2]|0)+(d*44|0)+16|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(t=(g|0)==0?1:g<<1,(g|0)<(t|0)):0){if(!t)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((t<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=t}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;d=d+1|0;if((d|0)>=(c[b+752>>2]|0))break h}}if((g|0)<(l|0)){if((c[b+1116>>2]|0)<(l|0)){c[6747]=(c[6747]|0)+1;h=kb((l<<2|3)+16|0)|0;if(!h)j=0;else{c[(h+4+15&-16)+-4>>2]=h;j=h+4+15&-16}h=c[b+1112>>2]|0;if((h|0)>0){i=0;do{c[j+(i<<2)>>2]=c[(c[b+1120>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(h|0))}h=c[b+1120>>2]|0;if(h|0){if(a[b+1124>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}c[b+1120>>2]=0}a[b+1124>>0]=1;c[b+1120>>2]=j;c[b+1116>>2]=l;h=b+1120|0}else h=b+1120|0;do{c[(c[h>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(l|0))}c[b+1112>>2]=l;if((l|0)>0){h=0;do{c[6747]=(c[6747]|0)+1;g=kb(403)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}a[g+16>>0]=1;c[g+12>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;a[g+36>>0]=1;c[g+32>>2]=0;c[g+24>>2]=0;c[g+28>>2]=0;a[g+56>>0]=1;c[g+52>>2]=0;c[g+44>>2]=0;c[g+48>>2]=0;L=g+348|0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[L+16>>2]=0;f[g+368>>2]=100.0;f[g+372>>2]=.009999999776482582;a[g+376>>0]=0;c[(c[b+1120>>2]|0)+(h<<2)>>2]=g;a[(c[(c[b+1120>>2]|0)+(h<<2)>>2]|0)+377>>0]=1;h=h+1|0}while((h|0)<(c[b+1112>>2]|0))}if((c[b+772>>2]|0)>0){d=0;do{j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+780>>2]|0)+(d*104|0)+8|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(u=(g|0)==0?1:g<<1,(g|0)<(u|0)):0){if(!u)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((u<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=u}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+780>>2]|0)+(d*104|0)+12|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(v=(g|0)==0?1:g<<1,(g|0)<(v|0)):0){if(!v)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((v<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=v}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+780>>2]|0)+(d*104|0)+16|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(w=(g|0)==0?1:g<<1,(g|0)<(w|0)):0){if(!w)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((w<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=w}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;j=c[(c[b+1120>>2]|0)+(d<<2)>>2]|0;l=(c[b+780>>2]|0)+(d*104|0)+20|0;g=c[j+24>>2]|0;if((g|0)==(c[j+28>>2]|0)?(D=(g|0)==0?1:g<<1,(g|0)<(D|0)):0){if(!D)h=0;else{c[6747]=(c[6747]|0)+1;g=kb((D<<2|3)+16|0)|0;if(!g)h=0;else{c[(g+4+15&-16)+-4>>2]=g;h=g+4+15&-16}g=c[j+24>>2]|0}if((g|0)>0){i=0;do{c[h+(i<<2)>>2]=c[(c[j+32>>2]|0)+(i<<2)>>2];i=i+1|0}while((i|0)!=(g|0))}i=c[j+32>>2]|0;if(i){if(a[j+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);g=c[j+24>>2]|0}c[j+32>>2]=0}a[j+36>>0]=1;c[j+32>>2]=h;c[j+28>>2]=D}c[(c[j+32>>2]|0)+(g<<2)>>2]=c[l>>2];c[j+24>>2]=g+1;d=d+1|0}while((d|0)<(c[b+772>>2]|0))}}while(0);g=c[b+1112>>2]|0;if(!g){b=0;ea=M;return b|0}if((g|0)>0){s=0;do{q=c[(c[b+1120>>2]|0)+(s<<2)>>2]|0;f[q+128>>2]=0.0;d=c[q+24>>2]|0;l=c[q+4>>2]|0;if((d|0)>(l|0)){do if((c[q+8>>2]|0)<(d|0)){if(!d){j=l;g=0}else{c[6747]=(c[6747]|0)+1;g=kb((d<<2|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}j=c[q+4>>2]|0}h=c[q+12>>2]|0;if((j|0)<=0){if(!h){a[q+16>>0]=1;c[q+12>>2]=g;c[q+8>>2]=d;break}}else{i=0;do{c[g+(i<<2)>>2]=c[h+(i<<2)>>2];i=i+1|0}while((i|0)!=(j|0))}if(a[q+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}a[q+16>>0]=1;c[q+12>>2]=g;c[q+8>>2]=d}else g=c[q+12>>2]|0;while(0);hk(g+(l<<2)|0,0,d-l<<2|0)|0;p=c[q+24>>2]|0}else p=d;c[q+4>>2]=d;l=(p|0)>0;if(l){h=c[q+32>>2]|0;i=c[q+12>>2]|0;g=0;do{k=+f[(c[h+(g<<2)>>2]|0)+88>>2];if(k==0.0){a[q+376>>0]=1;k=999999984306749440.0}else k=1.0/k;f[i+(g<<2)>>2]=k;m=k+ +f[q+128>>2];f[q+128>>2]=m;g=g+1|0}while((g|0)!=(p|0));f[q+128>>2]=1.0/m;k=0.0;n=0.0;o=0.0;g=0;do{L=c[h+(g<<2)>>2]|0;C=+f[i+(g<<2)>>2];k=k+ +f[L+8>>2]*C;n=n+C*+f[L+12>>2];o=o+C*+f[L+16>>2];g=g+1|0}while((g|0)!=(p|0));m=1.0/m}else{m=1.0/+f[q+128>>2];f[q+128>>2]=m;o=0.0;n=0.0;k=0.0}C=m*k;B=m*n;A=m*o;f[q+228>>2]=C;f[q+232>>2]=B;f[q+236>>2]=A;f[q+240>>2]=0.0;g=q+316|0;h=g+36|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(h|0));g=q+132|0;h=g+48|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(h|0));if(l){g=c[q+32>>2]|0;h=c[q+12>>2]|0;k=0.0;n=0.0;m=0.0;o=0.0;x=0.0;y=0.0;i=0;do{L=c[g+(i<<2)>>2]|0;Q=+f[L+8>>2]-C;O=+f[L+12>>2]-B;P=+f[L+16>>2]-A;N=+f[h+(i<<2)>>2];k=k+N*(O*O+P*P);f[q+132>>2]=k;n=N*(Q*Q+P*P)+n;f[q+152>>2]=n;m=(Q*Q+O*O)*N+m;f[q+172>>2]=m;o=o-O*(Q*N);f[q+136>>2]=o;x=x-P*(Q*N);f[q+140>>2]=x;y=y-P*(O*N);f[q+156>>2]=y;i=i+1|0}while((i|0)!=(p|0));g=q+136|0;h=q+140|0;i=q+156|0;j=q+152|0}else{y=0.0;x=0.0;o=0.0;n=0.0;m=0.0;k=0.0;g=q+136|0;h=q+140|0;i=q+156|0;j=q+152|0}C=n*m-y*y;N=y*x-m*o;O=y*o-n*x;Q=1.0/(C*k+o*N+O*x);P=(o*x-y*k)*Q;f[q+132>>2]=C*Q;f[g>>2]=N*Q;f[h>>2]=O*Q;f[q+144>>2]=0.0;f[q+148>>2]=N*Q;f[j>>2]=(m*k-x*x)*Q;f[i>>2]=P;f[q+160>>2]=0.0;f[q+164>>2]=O*Q;f[q+168>>2]=P;f[q+172>>2]=(n*k-o*o)*Q;f[q+176>>2]=0.0;c[q+60>>2]=1065353216;c[q+64>>2]=0;c[q+64+4>>2]=0;c[q+64+8>>2]=0;c[q+64+12>>2]=0;c[q+80>>2]=1065353216;c[q+84>>2]=0;c[q+84+4>>2]=0;c[q+84+8>>2]=0;c[q+84+12>>2]=0;c[q+100>>2]=1065353216;c[q+104>>2]=0;c[q+108>>2]=c[q+228>>2];c[q+108+4>>2]=c[q+228+4>>2];c[q+108+8>>2]=c[q+228+8>>2];c[q+108+12>>2]=c[q+228+12>>2];j=c[q+44>>2]|0;if((j|0)<(p|0)){if((c[q+48>>2]|0)<(p|0)){if(!p){h=j;i=0}else{c[6747]=(c[6747]|0)+1;g=kb((p<<4|3)+16|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}h=c[q+44>>2]|0;i=g}if((h|0)>0){g=0;do{L=i+(g<<4)|0;K=(c[q+52>>2]|0)+(g<<4)|0;c[L>>2]=c[K>>2];c[L+4>>2]=c[K+4>>2];c[L+8>>2]=c[K+8>>2];c[L+12>>2]=c[K+12>>2];g=g+1|0}while((g|0)!=(h|0))}g=c[q+52>>2]|0;if(g|0){if(a[q+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[q+52>>2]=0}a[q+56>>0]=1;c[q+52>>2]=i;c[q+48>>2]=p;h=q+52|0}else h=q+52|0;g=j;do{L=(c[h>>2]|0)+(g<<4)|0;c[L>>2]=c[M>>2];c[L+4>>2]=c[M+4>>2];c[L+8>>2]=c[M+8>>2];c[L+12>>2]=c[M+12>>2];g=g+1|0}while((g|0)!=(p|0))}c[q+44>>2]=p;if(l){g=0;do{K=c[(c[q+32>>2]|0)+(g<<2)>>2]|0;P=+f[K+12>>2]-+f[q+232>>2];Q=+f[K+16>>2]-+f[q+236>>2];L=c[q+52>>2]|0;f[L+(g<<4)>>2]=+f[K+8>>2]-+f[q+228>>2];f[L+(g<<4)+4>>2]=P;f[L+(g<<4)+8>>2]=Q;f[L+(g<<4)+12>>2]=0.0;g=g+1|0}while((g|0)<(c[q+44>>2]|0))}s=s+1|0}while((s|0)<(c[b+1112>>2]|0))}Kb(b);g=c[b+1112>>2]|0;d=z(g,g)|0;l=c[b+1132>>2]|0;if((d|0)>(l|0)){do if((c[b+1136>>2]|0)<(d|0)){if(!d){j=l;g=0}else{c[6747]=(c[6747]|0)+1;g=kb(d+19|0)|0;if(!g)g=0;else{c[(g+4+15&-16)+-4>>2]=g;g=g+4+15&-16}j=c[b+1132>>2]|0}h=c[b+1140>>2]|0;if((j|0)<=0){if(!h){a[b+1144>>0]=1;c[b+1140>>2]=g;c[b+1136>>2]=d;break}}else{i=0;do{a[g+i>>0]=a[h+i>>0]|0;i=i+1|0}while((i|0)!=(j|0))}if(a[b+1144>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0)}a[b+1144>>0]=1;c[b+1140>>2]=g;c[b+1136>>2]=d}else g=c[b+1140>>2]|0;while(0);hk(g+l|0,0,d-l|0)|0;g=c[b+1112>>2]|0}c[b+1132>>2]=d;if((g|0)<=0){b=g;ea=M;return b|0}w=c[b+1120>>2]|0;q=c[b+1140>>2]|0;u=0;do{s=c[w+(u<<2)>>2]|0;c[s+380>>2]=u;t=c[s+24>>2]|0;v=0;do{d=c[w+(v<<2)>>2]|0;p=0;while(1){if((p|0)>=(t|0)){h=0;break}h=c[d+24>>2]|0;i:do if((h|0)>0){i=c[(c[s+32>>2]|0)+(p<<2)>>2]|0;j=c[d+32>>2]|0;l=0;while(1){if((i|0)==(c[j+(l<<2)>>2]|0)){h=1;break i}l=l+1|0;if((l|0)>=(h|0)){h=0;break}}}else h=0;while(0);if(h){h=1;break}else p=p+1|0}a[q+((z(v,g)|0)+u)>>0]=h;v=v+1|0}while((v|0)!=(g|0));u=u+1|0}while((u|0)!=(g|0));ea=M;return g|0}function cb(b){b=b|0;var d=0,e=0,g=0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.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.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,fa=0.0;U=ea;ea=ea+176|0;eb(b);if(!(ra[c[(c[b>>2]|0)+20>>2]&127](b)|0)){ea=U;return}if((c[b+328>>2]|0)<=0){ea=U;return}S=U+96+32|0;T=U+96+52|0;R=0;do{P=c[(c[b+336>>2]|0)+(R<<2)>>2]|0;if(ra[c[(c[b>>2]|0)+20>>2]&127](b)|0?(K=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,(ra[c[(c[K>>2]|0)+48>>2]&127](K)|0)&1|0):0){d=c[b+72>>2]|0;if(!(a[P+473>>0]|0))K=d;else{c[U+80>>2]=c[P+520>>2];c[U+80+4>>2]=c[P+520+4>>2];c[U+80+8>>2]=c[P+520+8>>2];c[U+80+12>>2]=c[P+520+12>>2];h=+f[P+584>>2];i=+f[P+536>>2];j=+f[P+600>>2];q=+f[P+540>>2];r=+f[P+616>>2];t=+f[P+544>>2];u=+f[P+588>>2];v=+f[P+604>>2];w=+f[P+620>>2];x=+f[P+592>>2];y=+f[P+608>>2];z=+f[P+624>>2];A=+f[P+552>>2];B=+f[P+556>>2];C=+f[P+560>>2];D=+f[P+568>>2];E=+f[P+572>>2];F=+f[P+576>>2];fa=h*i+j*q+r*t+(i*u+q*v+t*w)*0.0+(i*x+q*y+t*z)*0.0;ca=(x*A+y*B+z*C)*0.0+(h*A+j*B+r*C+(u*A+v*B+w*C)*0.0);ba=(x*D+y*E+z*F)*0.0+(h*D+j*E+r*F+(u*D+v*E+w*F)*0.0);da=1.0/+s(+(fa*fa+ca*ca+ba*ba));aa=(h*i+j*q+r*t)*0.0+(i*u+q*v+t*w)+(i*x+q*y+t*z)*0.0;_=(x*A+y*B+z*C)*0.0+(u*A+v*B+w*C+(h*A+j*B+r*C)*0.0);Z=(x*D+y*E+z*F)*0.0+(u*D+v*E+w*F+(h*D+j*E+r*F)*0.0);$=1.0/+s(+(aa*aa+_*_+Z*Z));Y=(h*i+j*q+r*t)*0.0+(i*u+q*v+t*w)*0.0+(i*x+q*y+t*z);W=x*A+y*B+z*C+((h*A+j*B+r*C)*0.0+(u*A+v*B+w*C)*0.0);V=x*D+y*E+z*F+((h*D+j*E+r*F)*0.0+(u*D+v*E+w*F)*0.0);X=1.0/+s(+(Y*Y+W*W+V*V));K=c[(c[d>>2]|0)+8>>2]|0;ca=+f[U+80+4>>2]+ca*da*10.0;ba=+f[U+80+8>>2]+ba*da*10.0;f[U+160>>2]=+f[U+80>>2]+fa*da*10.0;f[U+160+4>>2]=ca;f[U+160+8>>2]=ba;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=0;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Pa[K&127](d,U+80|0,U+160|0,U+96|0);K=c[(c[d>>2]|0)+8>>2]|0;_=_*$*10.0+ +f[U+80+4>>2];Z=Z*$*10.0+ +f[U+80+8>>2];f[U+160>>2]=aa*$*10.0+ +f[U+80>>2];f[U+160+4>>2]=_;f[U+160+8>>2]=Z;f[U+160+12>>2]=0.0;c[U+96>>2]=0;c[U+96+4>>2]=1065353216;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Pa[K&127](d,U+80|0,U+160|0,U+96|0);K=c[(c[d>>2]|0)+8>>2]|0;W=W*X*10.0+ +f[U+80+4>>2];V=V*X*10.0+ +f[U+80+8>>2];f[U+160>>2]=Y*X*10.0+ +f[U+80>>2];f[U+160+4>>2]=W;f[U+160+8>>2]=V;f[U+160+12>>2]=0.0;c[U+96>>2]=0;c[U+96+4>>2]=0;c[U+96+8>>2]=1065353216;f[U+96+12>>2]=0.0;Pa[K&127](d,U+80|0,U+160|0,U+96|0);if((c[P+484>>2]|0)>0){e=0;do{K=c[P+492>>2]|0;aa=+f[K+(e<<4)>>2];ba=+f[K+(e<<4)+4>>2];fa=+f[K+(e<<4)+8>>2];ca=+f[U+80>>2]+((h*i+j*q+r*t)*aa+(i*u+q*v+t*w)*ba+(i*x+q*y+t*z)*fa);da=+f[U+80+4>>2]+((h*A+j*B+r*C)*aa+(u*A+v*B+w*C)*ba+(x*A+y*B+z*C)*fa);fa=(h*D+j*E+r*F)*aa+(u*D+v*E+w*F)*ba+(x*D+y*E+z*F)*fa+ +f[U+80+8>>2];c[U+64>>2]=1065353216;c[U+64+4>>2]=0;c[U+64+8>>2]=1065353216;f[U+64+12>>2]=0.0;K=c[(c[d>>2]|0)+8>>2]|0;f[U+160>>2]=ca+-.10000000149011612;f[U+160+4>>2]=da;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+.10000000149011612;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[K&127](d,U+160|0,U+96|0,U+64|0);K=c[(c[d>>2]|0)+8>>2]|0;f[U+160>>2]=ca;f[U+160+4>>2]=da+-.10000000149011612;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+.10000000149011612;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[K&127](d,U+160|0,U+96|0,U+64|0);K=c[(c[d>>2]|0)+8>>2]|0;f[U+160>>2]=ca;f[U+160+4>>2]=da;f[U+160+8>>2]=fa+-.10000000149011612;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+.10000000149011612;f[U+96+12>>2]=0.0;Pa[K&127](d,U+160|0,U+96|0,U+64|0);e=e+1|0}while((e|0)<(c[P+484>>2]|0))}K=c[b+72>>2]|0}J=c[b+344>>2]|0;c[U+80>>2]=0;c[U+80+4>>2]=0;c[U+80+8>>2]=0;c[U+80+12>>2]=0;c[U+64>>2]=1065353216;c[U+64+4>>2]=1065353216;c[U+64+8>>2]=1065353216;f[U+64+12>>2]=0.0;c[U+48>>2]=1065353216;c[U+48+4>>2]=0;c[U+48+8>>2]=0;f[U+48+12>>2]=0.0;if(!(J&256)){if(J&1|0?(Q=c[P+712>>2]|0,(Q|0)>0):0){d=Q;g=0;do{e=c[P+720>>2]|0;if(c[(c[e+(g*104|0)+4>>2]|0)+16>>2]&1){d=c[(c[K>>2]|0)+8>>2]|0;I=e+(g*104|0)+8|0;G=e+(g*104|0)+12|0;o=c[G>>2]|0;H=e+(g*104|0)+16|0;p=c[H>>2]|0;f[U+160>>2]=+f[I>>2]+-.10000000149011612;c[U+160+4>>2]=o;c[U+160+8>>2]=p;f[U+160+12>>2]=0.0;da=+f[G>>2]+0.0;fa=+f[H>>2]+0.0;f[U+96>>2]=+f[I>>2]+.10000000149011612;f[U+96+4>>2]=da;f[U+96+8>>2]=fa;f[U+96+12>>2]=0.0;c[U+32>>2]=1065353216;c[U+32+4>>2]=0;c[U+32+8>>2]=0;f[U+32+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[(c[K>>2]|0)+8>>2]|0;fa=+f[G>>2]+-.10000000149011612;p=c[H>>2]|0;c[U+160>>2]=c[I>>2];f[U+160+4>>2]=fa;c[U+160+8>>2]=p;f[U+160+12>>2]=0.0;fa=+f[G>>2]+.10000000149011612;da=+f[H>>2]+0.0;f[U+96>>2]=+f[I>>2]+0.0;f[U+96+4>>2]=fa;f[U+96+8>>2]=da;f[U+96+12>>2]=0.0;c[U+32>>2]=0;c[U+32+4>>2]=1065353216;c[U+32+8>>2]=0;f[U+32+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[(c[K>>2]|0)+8>>2]|0;p=c[G>>2]|0;da=+f[H>>2]+-.10000000149011612;c[U+160>>2]=c[I>>2];c[U+160+4>>2]=p;f[U+160+8>>2]=da;f[U+160+12>>2]=0.0;da=+f[G>>2]+0.0;fa=+f[H>>2]+.10000000149011612;f[U+96>>2]=+f[I>>2]+0.0;f[U+96+4>>2]=da;f[U+96+8>>2]=fa;f[U+96+12>>2]=0.0;c[U+32>>2]=0;c[U+32+4>>2]=0;c[U+32+8>>2]=1065353216;f[U+32+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[P+712>>2]|0}g=g+1|0}while((g|0)<(d|0))}if(J&2|0?(L=c[P+732>>2]|0,(L|0)>0):0){d=L;g=0;do{e=c[P+740>>2]|0;if(c[(c[e+(g*52|0)+4>>2]|0)+16>>2]&1){Pa[c[(c[K>>2]|0)+8>>2]&127](K,(c[e+(g*52|0)+8>>2]|0)+8|0,(c[e+(g*52|0)+12>>2]|0)+8|0,U+80|0);d=c[P+732>>2]|0}g=g+1|0}while((g|0)<(d|0))}if(J&16|0?(M=c[P+712>>2]|0,(M|0)>0):0){d=M;g=0;do{e=c[P+720>>2]|0;if(c[(c[e+(g*104|0)+4>>2]|0)+16>>2]&1){ca=+f[e+(g*104|0)+72>>2]*.5;fa=+f[e+(g*104|0)+76>>2]*.5;da=+f[e+(g*104|0)+80>>2]*.5;I=c[(c[K>>2]|0)+8>>2]|0;d=e+(g*104|0)+8|0;G=e+(g*104|0)+12|0;aa=fa+ +f[G>>2];H=e+(g*104|0)+16|0;ba=da+ +f[H>>2];f[U+160>>2]=ca+ +f[d>>2];f[U+160+4>>2]=aa;f[U+160+8>>2]=ba;f[U+160+12>>2]=0.0;Pa[I&127](K,d,U+160|0,U+64|0);I=c[(c[K>>2]|0)+8>>2]|0;fa=+f[G>>2]-fa;da=+f[H>>2]-da;f[U+160>>2]=+f[d>>2]-ca;f[U+160+4>>2]=fa;f[U+160+8>>2]=da;f[U+160+12>>2]=0.0;da=+f[U+64+4>>2]*.5;fa=+f[U+64+8>>2]*.5;f[U+96>>2]=+f[U+64>>2]*.5;f[U+96+4>>2]=da;f[U+96+8>>2]=fa;f[U+96+12>>2]=0.0;Pa[I&127](K,d,U+160|0,U+96|0);d=c[P+712>>2]|0}g=g+1|0}while((g|0)<(d|0))}if(J&32|0){if((a[24936]|0)==0?DC(24936)|0:0){c[5628]=1065353216;c[5629]=0;c[5630]=0;c[5631]=0;c[5632]=0;c[5633]=1065353216;c[5634]=0;c[5635]=0;c[5636]=0;c[5637]=0;c[5638]=1065353216;f[5639]=0.0;PB(24936)}if((c[P+812>>2]|0)>0){d=0;do{I=c[P+820>>2]|0;G=c[I+(d*104|0)+24>>2]|0;A=+f[G+8>>2];H=I+(d*104|0)+4|0;B=+f[H>>2];C=+f[G+12>>2];p=I+(d*104|0)+8|0;D=+f[p>>2];V=+f[G+16>>2];G=I+(d*104|0)+12|0;W=+f[G>>2];X=+f[I+(d*104|0)+20>>2]+(A*B+C*D+V*W);f[U+160>>2]=A-B*X;f[U+160+4>>2]=C-D*X;f[U+160+8>>2]=V-W*X;f[U+160+12>>2]=0.0;Y=+f[H>>2];da=+f[p>>2];E=+f[G>>2];I=Y>2];Z=+f[22512+(I<<4)+4>>2];ba=+f[22512+(I<<4)>>2];$=1.0/+s(+((Y*Z-da*ba)*(Y*Z-da*ba)+((da*F-E*Z)*(da*F-E*Z)+(E*ba-Y*F)*(E*ba-Y*F))));_=E*((E*ba-Y*F)*$)-da*((Y*Z-da*ba)*$);aa=Y*((Y*Z-da*ba)*$)-E*((da*F-E*Z)*$);ca=da*((da*F-E*Z)*$)-Y*((E*ba-Y*F)*$);fa=1.0/+s(+(ca*ca+(_*_+aa*aa)));I=c[(c[K>>2]|0)+8>>2]|0;f[U+96>>2]=A-B*X-(da*F-E*Z)*$*.5;f[U+96+4>>2]=C-D*X-(E*ba-Y*F)*$*.5;f[U+96+8>>2]=V-W*X-(Y*Z-da*ba)*$*.5;f[U+96+12>>2]=0.0;f[U+32>>2]=A-B*X+(da*F-E*Z)*$*.5;f[U+32+4>>2]=C-D*X+(E*ba-Y*F)*$*.5;f[U+32+8>>2]=V-W*X+(Y*Z-da*ba)*$*.5;f[U+32+12>>2]=0.0;Pa[I&127](K,U+96|0,U+32|0,U+48|0);I=c[(c[K>>2]|0)+8>>2]|0;$=+f[U+160>>2];ba=+f[U+160+4>>2];da=+f[U+160+8>>2];f[U+96>>2]=$-_*fa*.5;f[U+96+4>>2]=ba-aa*fa*.5;f[U+96+8>>2]=da-ca*fa*.5;f[U+96+12>>2]=0.0;f[U+32>>2]=_*fa*.5+$;f[U+32+4>>2]=aa*fa*.5+ba;f[U+32+8>>2]=ca*fa*.5+da;f[U+32+12>>2]=0.0;Pa[I&127](K,U+96|0,U+32|0,U+48|0);I=c[(c[K>>2]|0)+8>>2]|0;da=+f[p>>2]*.5*3.0+ +f[U+160+4>>2];fa=+f[G>>2]*.5*3.0+ +f[U+160+8>>2];f[U+96>>2]=+f[H>>2]*.5*3.0+ +f[U+160>>2];f[U+96+4>>2]=da;f[U+96+8>>2]=fa;f[U+96+12>>2]=0.0;c[U+32>>2]=1065353216;c[U+32+4>>2]=1065353216;c[U+32+8>>2]=0;f[U+32+12>>2]=0.0;Pa[I&127](K,U+160|0,U+96|0,U+32|0);d=d+1|0}while((d|0)<(c[P+812>>2]|0))}}if(J&4|0?(c[U+160>>2]=0,c[U+160+4>>2]=1060320051,c[U+160+8>>2]=0,f[U+160+12>>2]=0.0,N=c[P+752>>2]|0,(N|0)>0):0){d=N;g=0;do{e=c[P+760>>2]|0;if(c[(c[e+(g*44|0)+4>>2]|0)+16>>2]&1){d=c[e+(g*44|0)+8>>2]|0;Y=+f[d+8>>2];$=+f[d+12>>2];ca=+f[d+16>>2];d=c[e+(g*44|0)+12>>2]|0;Z=+f[d+8>>2];aa=+f[d+12>>2];da=+f[d+16>>2];d=c[e+(g*44|0)+16>>2]|0;_=+f[d+8>>2];ba=+f[d+12>>2];fa=+f[d+16>>2];d=c[(c[K>>2]|0)+28>>2]|0;f[U+96>>2]=(Y+Z+_)*.3333333432674408+(Y-(Y+Z+_)*.3333333432674408)*.800000011920929;f[U+96+4>>2]=($+aa+ba)*.3333333432674408+($-($+aa+ba)*.3333333432674408)*.800000011920929;f[U+96+8>>2]=(ca+da+fa)*.3333333432674408+(ca-(ca+da+fa)*.3333333432674408)*.800000011920929;f[U+96+12>>2]=0.0;f[U+32>>2]=(Y+Z+_)*.3333333432674408+(Z-(Y+Z+_)*.3333333432674408)*.800000011920929;f[U+32+4>>2]=($+aa+ba)*.3333333432674408+(aa-($+aa+ba)*.3333333432674408)*.800000011920929;f[U+32+8>>2]=(ca+da+fa)*.3333333432674408+(da-(ca+da+fa)*.3333333432674408)*.800000011920929;f[U+32+12>>2]=0.0;f[U+16>>2]=(Y+Z+_)*.3333333432674408+(_-(Y+Z+_)*.3333333432674408)*.800000011920929;f[U+16+4>>2]=($+aa+ba)*.3333333432674408+(ba-($+aa+ba)*.3333333432674408)*.800000011920929;f[U+16+8>>2]=(ca+da+fa)*.3333333432674408+(fa-(ca+da+fa)*.3333333432674408)*.800000011920929;f[U+16+12>>2]=0.0;Ua[d&1](K,U+96|0,U+32|0,U+16|0,U+160|0,1.0);d=c[P+752>>2]|0}g=g+1|0}while((g|0)<(d|0))}if(J&8|0?(c[U+160>>2]=1050253722,c[U+160+4>>2]=1050253722,c[U+160+8>>2]=1060320051,f[U+160+12>>2]=0.0,O=c[P+772>>2]|0,(O|0)>0):0){d=O;g=0;do{e=c[P+780>>2]|0;if(c[(c[e+(g*104|0)+4>>2]|0)+16>>2]&1){d=c[e+(g*104|0)+8>>2]|0;x=+f[d+8>>2];A=+f[d+12>>2];D=+f[d+16>>2];d=c[e+(g*104|0)+12>>2]|0;y=+f[d+8>>2];B=+f[d+12>>2];E=+f[d+16>>2];d=c[e+(g*104|0)+16>>2]|0;z=+f[d+8>>2];C=+f[d+12>>2];F=+f[d+16>>2];d=c[e+(g*104|0)+20>>2]|0;ca=+f[d+8>>2];da=+f[d+12>>2];fa=+f[d+16>>2];d=c[(c[K>>2]|0)+28>>2]|0;$=(x+y+z+ca)*.25+(x-(x+y+z+ca)*.25)*.800000011920929;aa=(A+B+C+da)*.25+(A-(A+B+C+da)*.25)*.800000011920929;ba=(D+E+F+fa)*.25+(D-(D+E+F+fa)*.25)*.800000011920929;f[U+96>>2]=$;f[U+96+4>>2]=aa;f[U+96+8>>2]=ba;f[U+96+12>>2]=0.0;V=(x+y+z+ca)*.25+(y-(x+y+z+ca)*.25)*.800000011920929;W=(A+B+C+da)*.25+(B-(A+B+C+da)*.25)*.800000011920929;X=(D+E+F+fa)*.25+(E-(D+E+F+fa)*.25)*.800000011920929;f[U+32>>2]=V;f[U+32+4>>2]=W;f[U+32+8>>2]=X;f[U+32+12>>2]=0.0;Y=(x+y+z+ca)*.25+(z-(x+y+z+ca)*.25)*.800000011920929;Z=(A+B+C+da)*.25+(C-(A+B+C+da)*.25)*.800000011920929;_=(D+E+F+fa)*.25+(F-(D+E+F+fa)*.25)*.800000011920929;f[U+16>>2]=Y;f[U+16+4>>2]=Z;f[U+16+8>>2]=_;f[U+16+12>>2]=0.0;Ua[d&1](K,U+96|0,U+32|0,U+16|0,U+160|0,1.0);d=c[(c[K>>2]|0)+28>>2]|0;f[U+96>>2]=$;f[U+96+4>>2]=aa;f[U+96+8>>2]=ba;f[U+96+12>>2]=0.0;f[U+32>>2]=V;f[U+32+4>>2]=W;f[U+32+8>>2]=X;f[U+32+12>>2]=0.0;ca=(x+y+z+ca)*.25+(ca-(x+y+z+ca)*.25)*.800000011920929;da=(A+B+C+da)*.25+(da-(A+B+C+da)*.25)*.800000011920929;fa=(D+E+F+fa)*.25+(fa-(D+E+F+fa)*.25)*.800000011920929;f[U+16>>2]=ca;f[U+16+4>>2]=da;f[U+16+8>>2]=fa;f[U+16+12>>2]=0.0;Ua[d&1](K,U+96|0,U+32|0,U+16|0,U+160|0,1.0);d=c[(c[K>>2]|0)+28>>2]|0;f[U+96>>2]=V;f[U+96+4>>2]=W;f[U+96+8>>2]=X;f[U+96+12>>2]=0.0;f[U+32>>2]=Y;f[U+32+4>>2]=Z;f[U+32+8>>2]=_;f[U+32+12>>2]=0.0;f[U+16>>2]=ca;f[U+16+4>>2]=da;f[U+16+8>>2]=fa;f[U+16+12>>2]=0.0;Ua[d&1](K,U+96|0,U+32|0,U+16|0,U+160|0,1.0);d=c[(c[K>>2]|0)+28>>2]|0;f[U+96>>2]=Y;f[U+96+4>>2]=Z;f[U+96+8>>2]=_;f[U+96+12>>2]=0.0;f[U+32>>2]=$;f[U+32+4>>2]=aa;f[U+32+8>>2]=ba;f[U+32+12>>2]=0.0;f[U+16>>2]=ca;f[U+16+4>>2]=da;f[U+16+8>>2]=fa;f[U+16+12>>2]=0.0;Ua[d&1](K,U+96|0,U+32|0,U+16|0,U+160|0,1.0);d=c[P+772>>2]|0}g=g+1|0}while((g|0)<(d|0))}}else{pJ();d=c[P+1112>>2]|0;if((d|0)>0){I=0;do{if(a[(c[(c[P+1120>>2]|0)+(I<<2)>>2]|0)+377>>0]|0){ba=+(Rq()|0)*4.656612873077393e-10;ca=+(Rq()|0)*4.656612873077393e-10;da=+(Rq()|0)*4.656612873077393e-10;fa=1.0/+s(+(da*da+(ba*ba+ca*ca)));f[U+160>>2]=ba*fa*.75;f[U+160+4>>2]=ca*fa*.75;f[U+160+8>>2]=da*fa*.75;f[U+160+12>>2]=0.0;g=c[(c[(c[P+1120>>2]|0)+(I<<2)>>2]|0)+24>>2]|0;if((g|0)>0){c[6747]=(c[6747]|0)+1;d=kb((g<<4|3)+16|0)|0;if(!d)e=0;else{c[(d+4+15&-16)+-4>>2]=d;e=d+4+15&-16}d=0;do{H=e+(d<<4)|0;c[H>>2]=c[U+96>>2];c[H+4>>2]=c[U+96+4>>2];c[H+8>>2]=c[U+96+8>>2];c[H+12>>2]=c[U+96+12>>2];d=d+1|0}while((d|0)!=(g|0));d=0;do{G=(c[(c[(c[(c[P+1120>>2]|0)+(I<<2)>>2]|0)+32>>2]|0)+(d<<2)>>2]|0)+8|0;H=e+(d<<4)|0;c[H>>2]=c[G>>2];c[H+4>>2]=c[G+4>>2];c[H+8>>2]=c[G+8>>2];c[H+12>>2]=c[G+12>>2];d=d+1|0}while((d|0)!=(g|0));H=e;G=e}else{H=0;G=0}a[U+96+16>>0]=1;c[U+96+12>>2]=0;c[U+96+4>>2]=0;c[U+96+8>>2]=0;a[U+96+36>>0]=1;c[S>>2]=0;c[U+96+24>>2]=0;c[U+96+28>>2]=0;a[U+96+56>>0]=1;c[T>>2]=0;c[U+96+44>>2]=0;c[U+96+48>>2]=0;mb(U+96|0,H,g);n=c[U+96+44>>2]|0;if((n|0)>0){l=c[S>>2]|0;p=0;do{o=c[(c[T>>2]|0)+(p<<2)>>2]|0;e=c[l+(o*12|0)+4>>2]|0;d=l+(o*12|0)+(e*12|0)+((c[l+(o*12|0)+(e*12|0)>>2]|0)*12|0)|0;if((d|0)!=(l+(o*12|0)|0)){m=c[U+96+12>>2]|0;g=c[l+(o*12|0)+(e*12|0)+8>>2]|0;k=c[l+(o*12|0)+8>>2]|0;while(1){e=c[d+8>>2]|0;Ua[c[(c[K>>2]|0)+28>>2]&1](K,m+(g<<4)|0,m+(k<<4)|0,m+(e<<4)|0,U+160|0,1.0);g=d+((c[d+4>>2]|0)*12|0)|0;d=g+((c[g>>2]|0)*12|0)|0;if((d|0)==(l+(o*12|0)|0))break;else{g=k;k=e}}}p=p+1|0}while((p|0)<(n|0))}d=c[T>>2]|0;if(d|0){if(a[U+96+56>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[T>>2]=0}a[U+96+56>>0]=1;c[T>>2]=0;c[U+96+44>>2]=0;c[U+96+48>>2]=0;d=c[S>>2]|0;if(d|0){if(a[U+96+36>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[S>>2]=0}a[U+96+36>>0]=1;c[S>>2]=0;c[U+96+24>>2]=0;c[U+96+28>>2]=0;d=c[U+96+12>>2]|0;if(d|0){if(a[U+96+16>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[d+-4>>2]|0)}c[U+96+12>>2]=0}if(!((G|0)==0|(H|0)==0)){c[6748]=(c[6748]|0)+1;uc(c[H+-4>>2]|0)}d=c[P+1112>>2]|0}I=I+1|0}while((I|0)<(d|0))}}if(J&64|0){if((c[P+792>>2]|0)>0){d=0;do{I=c[P+800>>2]|0;G=c[I+(d*96|0)+20>>2]|0;aa=+f[I+(d*96|0)+4>>2];ba=+f[I+(d*96|0)+8>>2];ca=+f[I+(d*96|0)+12>>2];da=aa*+f[G+20>>2]+ba*+f[G+24>>2]+ca*+f[G+28>>2]+ +f[G+56>>2];fa=aa*+f[G+36>>2]+ba*+f[G+40>>2]+ca*+f[G+44>>2]+ +f[G+60>>2];f[U+32>>2]=aa*+f[G+4>>2]+ba*+f[G+8>>2]+ca*+f[G+12>>2]+ +f[G+52>>2];f[U+32+4>>2]=da;f[U+32+8>>2]=fa;f[U+32+12>>2]=0.0;I=I+(d*96|0)|0;G=c[I>>2]|0;c[U+16>>2]=1065353216;c[U+16+4>>2]=0;c[U+16+8>>2]=0;f[U+16+12>>2]=0.0;H=c[(c[K>>2]|0)+8>>2]|0;fa=+f[G+8>>2];da=+f[G+12>>2];ca=+f[G+16>>2];f[U+160>>2]=fa+-.25;f[U+160+4>>2]=da;f[U+160+8>>2]=ca;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+.25;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=ca+0.0;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);H=c[(c[K>>2]|0)+8>>2]|0;ca=+f[G+8>>2];da=+f[G+12>>2];fa=+f[G+16>>2];f[U+160>>2]=ca;f[U+160+4>>2]=da+-.25;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+.25;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);H=c[(c[K>>2]|0)+8>>2]|0;fa=+f[G+8>>2];da=+f[G+12>>2];ca=+f[G+16>>2];f[U+160>>2]=fa;f[U+160+4>>2]=da;f[U+160+8>>2]=ca+-.25;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=ca+.25;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);c[U+16>>2]=0;c[U+16+4>>2]=1065353216;c[U+16+8>>2]=0;f[U+16+12>>2]=0.0;H=c[(c[K>>2]|0)+8>>2]|0;ca=+f[U+32>>2];da=+f[U+32+4>>2];fa=+f[U+32+8>>2];f[U+160>>2]=ca+-.25;f[U+160+4>>2]=da;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+.25;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);H=c[(c[K>>2]|0)+8>>2]|0;fa=+f[U+32>>2];da=+f[U+32+4>>2];ca=+f[U+32+8>>2];f[U+160>>2]=fa;f[U+160+4>>2]=da+-.25;f[U+160+8>>2]=ca;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+0.0;f[U+96+4>>2]=da+.25;f[U+96+8>>2]=ca+0.0;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);H=c[(c[K>>2]|0)+8>>2]|0;ca=+f[U+32>>2];da=+f[U+32+4>>2];fa=+f[U+32+8>>2];f[U+160>>2]=ca;f[U+160+4>>2]=da;f[U+160+8>>2]=fa+-.25;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+.25;f[U+96+12>>2]=0.0;Pa[H&127](K,U+160|0,U+96|0,U+16|0);H=c[(c[K>>2]|0)+8>>2]|0;I=(c[I>>2]|0)+8|0;c[U+160>>2]=1065353216;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;Pa[H&127](K,I,U+32|0,U+160|0);d=d+1|0}while((d|0)<(c[P+792>>2]|0))}d=c[P+712>>2]|0;if((d|0)>0){g=0;do{e=c[P+720>>2]|0;if((c[(c[e+(g*104|0)+4>>2]|0)+16>>2]&1|0)!=0?+f[e+(g*104|0)+88>>2]<=0.0:0){c[U+32>>2]=1065353216;c[U+32+4>>2]=0;c[U+32+8>>2]=0;f[U+32+12>>2]=0.0;d=c[(c[K>>2]|0)+8>>2]|0;G=e+(g*104|0)+8|0;ca=+f[G>>2];H=e+(g*104|0)+12|0;da=+f[H>>2];I=e+(g*104|0)+16|0;fa=+f[I>>2];f[U+160>>2]=ca+-.25;f[U+160+4>>2]=da;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+.25;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[(c[K>>2]|0)+8>>2]|0;fa=+f[G>>2];da=+f[H>>2];ca=+f[I>>2];f[U+160>>2]=fa;f[U+160+4>>2]=da+-.25;f[U+160+8>>2]=ca;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+0.0;f[U+96+4>>2]=da+.25;f[U+96+8>>2]=ca+0.0;f[U+96+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[(c[K>>2]|0)+8>>2]|0;ca=+f[G>>2];da=+f[H>>2];fa=+f[I>>2];f[U+160>>2]=ca;f[U+160+4>>2]=da;f[U+160+8>>2]=fa+-.25;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+.25;f[U+96+12>>2]=0.0;Pa[d&127](K,U+160|0,U+96|0,U+32|0);d=c[P+712>>2]|0}g=g+1|0}while((g|0)<(d|0))}}if(J&128|0?(c[P+692>>2]|0)>0:0){g=0;do{d=c[P+700>>2]|0;e=d+(g*60|0)+8|0;c[U+160>>2]=c[e>>2];c[U+160+4>>2]=c[e+4>>2];c[U+160+8>>2]=c[e+8>>2];c[U+160+12>>2]=c[e+12>>2];e=c[d+(g*60|0)+24>>2]|0;if((e|0)>0){h=+f[U+160+8>>2];i=+f[U+160>>2];j=+f[U+160+4>>2];k=0;do{I=c[d+(g*60|0)+28+(k<<2)>>2]|0;fa=+f[d+(g*60|0)+44+(k<<2)>>2];i=+f[I+8>>2]*fa+i;j=fa*+f[I+12>>2]+j;h=fa*+f[I+16>>2]+h;f[U+160+8>>2]=h;k=k+1|0}while((k|0)!=(e|0));f[U+160>>2]=i;f[U+160+4>>2]=j}Ma[c[(c[K>>2]|0)+40>>2]&127](K,U+160|0,c[d+(g*60|0)+4>>2]|0);g=g+1|0}while((g|0)<(c[P+692>>2]|0))}if(J&512|0){I=c[P+928>>2]|0;c[U+160>>2]=1065353216;c[U+160+4>>2]=0;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=1065353216;c[U+96+8>>2]=1065353216;f[U+96+12>>2]=0.0;Ne(K,I,0,U+160|0,U+96|0)}if(J&1024|0){I=c[P+988>>2]|0;c[U+160>>2]=0;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=0;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=0;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Ne(K,I,0,U+160|0,U+96|0)}if(J&2048|0){I=c[P+1048>>2]|0;c[U+160>>2]=0;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=0;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Ne(K,I,0,U+160|0,U+96|0)}a:do if(J&4096|0?(c[P+852>>2]|0)>0:0){e=0;while(1){d=c[(c[P+860>>2]|0)+(e<<2)>>2]|0;switch(ra[c[(c[d>>2]|0)+20>>2]&127](d)|0){case 0:{J=wh(d+4|0)|0;fa=+f[d+28>>2];da=+f[d+32>>2];ca=+f[d+36>>2];ba=fa*+f[J+16>>2]+da*+f[J+20>>2]+ca*+f[J+24>>2]+ +f[J+52>>2];aa=fa*+f[J+32>>2]+da*+f[J+36>>2]+ca*+f[J+40>>2]+ +f[J+56>>2];f[U+32>>2]=fa*+f[J>>2]+da*+f[J+4>>2]+ca*+f[J+8>>2]+ +f[J+48>>2];f[U+32+4>>2]=ba;f[U+32+8>>2]=aa;f[U+32+12>>2]=0.0;J=wh(d+16|0)|0;aa=+f[d+44>>2];ba=+f[d+48>>2];ca=+f[d+52>>2];da=aa*+f[J+16>>2]+ba*+f[J+20>>2]+ca*+f[J+24>>2]+ +f[J+52>>2];fa=aa*+f[J+32>>2]+ba*+f[J+36>>2]+ca*+f[J+40>>2]+ +f[J+56>>2];f[U+16>>2]=aa*+f[J>>2]+ba*+f[J+4>>2]+ca*+f[J+8>>2]+ +f[J+48>>2];f[U+16+4>>2]=da;f[U+16+8>>2]=fa;f[U+16+12>>2]=0.0;J=c[(c[K>>2]|0)+8>>2]|0;I=(wh(d+4|0)|0)+48|0;c[U+160>>2]=1065353216;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=0;f[U+160+12>>2]=0.0;Pa[J&127](K,I,U+32|0,U+160|0);I=c[(c[K>>2]|0)+8>>2]|0;J=(wh(d+16|0)|0)+48|0;c[U+160>>2]=0;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;Pa[I&127](K,J,U+16|0,U+160|0);c[U>>2]=1065353216;c[U+4>>2]=1065353216;c[U+8>>2]=0;f[U+12>>2]=0.0;J=c[(c[K>>2]|0)+8>>2]|0;fa=+f[U+32>>2];da=+f[U+32+4>>2];ca=+f[U+32+8>>2];f[U+160>>2]=fa+-.25;f[U+160+4>>2]=da;f[U+160+8>>2]=ca;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+.25;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=ca+0.0;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);J=c[(c[K>>2]|0)+8>>2]|0;ca=+f[U+32>>2];da=+f[U+32+4>>2];fa=+f[U+32+8>>2];f[U+160>>2]=ca;f[U+160+4>>2]=da+-.25;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+.25;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);J=c[(c[K>>2]|0)+8>>2]|0;fa=+f[U+32>>2];da=+f[U+32+4>>2];ca=+f[U+32+8>>2];f[U+160>>2]=fa;f[U+160+4>>2]=da;f[U+160+8>>2]=ca+-.25;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=ca+.25;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);c[U>>2]=0;c[U+4>>2]=1065353216;c[U+8>>2]=1065353216;f[U+12>>2]=0.0;J=c[(c[K>>2]|0)+8>>2]|0;ca=+f[U+16>>2];da=+f[U+16+4>>2];fa=+f[U+16+8>>2];f[U+160>>2]=ca+-.25;f[U+160+4>>2]=da;f[U+160+8>>2]=fa;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+.25;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+0.0;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);J=c[(c[K>>2]|0)+8>>2]|0;fa=+f[U+16>>2];da=+f[U+16+4>>2];ca=+f[U+16+8>>2];f[U+160>>2]=fa;f[U+160+4>>2]=da+-.25;f[U+160+8>>2]=ca;f[U+160+12>>2]=0.0;f[U+96>>2]=fa+0.0;f[U+96+4>>2]=da+.25;f[U+96+8>>2]=ca+0.0;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);J=c[(c[K>>2]|0)+8>>2]|0;ca=+f[U+16>>2];da=+f[U+16+4>>2];fa=+f[U+16+8>>2];f[U+160>>2]=ca;f[U+160+4>>2]=da;f[U+160+8>>2]=fa+-.25;f[U+160+12>>2]=0.0;f[U+96>>2]=ca+0.0;f[U+96+4>>2]=da+0.0;f[U+96+8>>2]=fa+.25;f[U+96+12>>2]=0.0;Pa[J&127](K,U+160|0,U+96|0,U);break}case 1:{J=(wh(d+4|0)|0)+48|0;c[U+160>>2]=c[J>>2];c[U+160+4>>2]=c[J+4>>2];c[U+160+8>>2]=c[J+8>>2];c[U+160+12>>2]=c[J+12>>2];J=(wh(d+16|0)|0)+48|0;c[U+96>>2]=c[J>>2];c[U+96+4>>2]=c[J+4>>2];c[U+96+8>>2]=c[J+8>>2];c[U+96+12>>2]=c[J+12>>2];J=wh(d+4|0)|0;_=+f[d+28>>2];Z=+f[d+32>>2];ba=+f[d+36>>2];$=+f[J>>2]*_+ +f[J+4>>2]*Z+ +f[J+8>>2]*ba;aa=_*+f[J+16>>2]+Z*+f[J+20>>2]+ba*+f[J+24>>2];ba=_*+f[J+32>>2]+Z*+f[J+36>>2]+ba*+f[J+40>>2];J=wh(d+16|0)|0;Z=+f[d+44>>2];_=+f[d+48>>2];fa=+f[d+52>>2];ca=+f[J>>2]*Z+ +f[J+4>>2]*_+ +f[J+8>>2]*fa;da=Z*+f[J+16>>2]+_*+f[J+20>>2]+fa*+f[J+24>>2];fa=Z*+f[J+32>>2]+_*+f[J+36>>2]+fa*+f[J+40>>2];J=c[(c[K>>2]|0)+8>>2]|0;_=aa*10.0+ +f[U+160+4>>2];Z=ba*10.0+ +f[U+160+8>>2];f[U+32>>2]=$*10.0+ +f[U+160>>2];f[U+32+4>>2]=_;f[U+32+8>>2]=Z;f[U+32+12>>2]=0.0;c[U+16>>2]=1065353216;c[U+16+4>>2]=1065353216;c[U+16+8>>2]=0;f[U+16+12>>2]=0.0;Pa[J&127](K,U+160|0,U+32|0,U+16|0);J=c[(c[K>>2]|0)+8>>2]|0;Z=da*10.0+ +f[U+160+4>>2];_=fa*10.0+ +f[U+160+8>>2];f[U+32>>2]=ca*10.0+ +f[U+160>>2];f[U+32+4>>2]=Z;f[U+32+8>>2]=_;f[U+32+12>>2]=0.0;c[U+16>>2]=1065353216;c[U+16+4>>2]=1065353216;c[U+16+8>>2]=0;f[U+16+12>>2]=0.0;Pa[J&127](K,U+160|0,U+32|0,U+16|0);J=c[(c[K>>2]|0)+8>>2]|0;aa=aa*10.0+ +f[U+96+4>>2];ba=ba*10.0+ +f[U+96+8>>2];f[U+32>>2]=$*10.0+ +f[U+96>>2];f[U+32+4>>2]=aa;f[U+32+8>>2]=ba;f[U+32+12>>2]=0.0;c[U+16>>2]=0;c[U+16+4>>2]=1065353216;c[U+16+8>>2]=1065353216;f[U+16+12>>2]=0.0;Pa[J&127](K,U+96|0,U+32|0,U+16|0);J=c[(c[K>>2]|0)+8>>2]|0;da=da*10.0+ +f[U+96+4>>2];fa=fa*10.0+ +f[U+96+8>>2];f[U+32>>2]=ca*10.0+ +f[U+96>>2];f[U+32+4>>2]=da;f[U+32+8>>2]=fa;f[U+32+12>>2]=0.0;c[U+16>>2]=0;c[U+16+4>>2]=1065353216;c[U+16+8>>2]=1065353216;f[U+16+12>>2]=0.0;Pa[J&127](K,U+96|0,U+32|0,U+16|0);break}default:{}}e=e+1|0;if((e|0)>=(c[P+852>>2]|0))break a}}while(0)}d=c[b+72>>2]|0;if(d|0?(ra[c[(c[d>>2]|0)+48>>2]&127](d)|0)&2|0:0){if(a[b+348>>0]|0){J=c[b+72>>2]|0;K=c[P+928>>2]|0;c[U+160>>2]=1065353216;c[U+160+4>>2]=0;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=1065353216;c[U+96+8>>2]=1065353216;f[U+96+12>>2]=0.0;Ne(J,K,0,U+160|0,U+96|0)}if(a[b+349>>0]|0){J=c[b+72>>2]|0;K=c[P+988>>2]|0;c[U+160>>2]=0;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=0;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=0;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Ne(J,K,0,U+160|0,U+96|0)}if(a[b+350>>0]|0){K=c[b+72>>2]|0;P=c[P+1048>>2]|0;c[U+160>>2]=0;c[U+160+4>>2]=1065353216;c[U+160+8>>2]=1065353216;f[U+160+12>>2]=0.0;c[U+96>>2]=1065353216;c[U+96+4>>2]=0;c[U+96+8>>2]=0;f[U+96+12>>2]=0.0;Ne(K,P,0,U+160|0,U+96|0)}}R=R+1|0}while((R|0)<(c[b+328>>2]|0));ea=U;return}function db(b,d,e,g){b=b|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.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.0;ca=ea;ea=ea+80|0;if((e|0)<=0){ea=ca;return}$=0;do{T=c[d+($<<2)>>2]|0;V=c[T+740>>2]|0;W=c[T+744>>2]|0;Y=Kc(b,V,+f[g+12>>2])|0;Z=Kc(b,W,+f[g+12>>2])|0;X=c[b+16>>2]|0;if(!(((((+f[X+(Y*244|0)+128>>2]==0.0?+f[X+(Y*244|0)+132>>2]==0.0:0)?+f[X+(Y*244|0)+136>>2]==0.0:0)?+f[X+(Z*244|0)+128>>2]==0.0:0)?+f[X+(Z*244|0)+132>>2]==0.0:0)?+f[X+(Z*244|0)+136>>2]==0.0:0))ba=9;if((ba|0)==9?(ba=0,U=c[T+748>>2]|0,(U|0)>0):0){i=U;aa=0;h=1;do{R=T+4+(aa*184|0)|0;m=T+4+(aa*184|0)+80|0;if(+f[m>>2]<=+f[T+756>>2]){S=c[b+28>>2]|0;if((S|0)==(c[b+32>>2]|0)?(_=(S|0)==0?1:S<<1,(S|0)<(_|0)):0){if(!_){k=S;l=0}else{c[6747]=(c[6747]|0)+1;i=kb((_*152|3)+16|0)|0;if(!i)i=0;else{c[(i+4+15&-16)+-4>>2]=i;i=i+4+15&-16}k=c[b+28>>2]|0;l=i}if((k|0)>0){i=0;do{vh(l+(i*152|0)|0,(c[b+36>>2]|0)+(i*152|0)|0,152)|0;i=i+1|0}while((i|0)!=(k|0))}i=c[b+36>>2]|0;if(i|0){if(a[b+40>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}c[b+36>>2]=0}a[b+40>>0]=1;c[b+36>>2]=l;c[b+32>>2]=_;i=c[b+28>>2]|0}else i=S;c[b+28>>2]=i+1;Q=c[b+36>>2]|0;n=(c[V+236>>2]&2|0)==0?0:V;o=(c[W+236>>2]&2|0)==0?0:W;c[Q+(S*152|0)+144>>2]=Y;c[Q+(S*152|0)+148>>2]=Z;c[Q+(S*152|0)+132>>2]=R;A=+f[T+4+(aa*184|0)+48>>2]-+f[V+52>>2];B=+f[T+4+(aa*184|0)+52>>2]-+f[V+56>>2];z=+f[T+4+(aa*184|0)+56>>2]-+f[V+60>>2];f[ca+64>>2]=A;f[ca+64+4>>2]=B;f[ca+64+8>>2]=z;f[ca+64+12>>2]=0.0;E=+f[T+4+(aa*184|0)+32>>2]-+f[W+52>>2];F=+f[T+4+(aa*184|0)+36>>2]-+f[W+56>>2];D=+f[T+4+(aa*184|0)+40>>2]-+f[W+60>>2];f[ca+48>>2]=E;f[ca+48+4>>2]=F;f[ca+48+8>>2]=D;f[ca+48+12>>2]=0.0;if(!(c[X+(Y*244|0)+240>>2]|0)){j=0.0;q=0.0;u=0.0}else{M=+f[X+(Y*244|0)+192>>2]+ +f[X+(Y*244|0)+224>>2];u=+f[X+(Y*244|0)+196>>2]+ +f[X+(Y*244|0)+228>>2];q=+f[X+(Y*244|0)+200>>2]+ +f[X+(Y*244|0)+232>>2];j=+f[X+(Y*244|0)+176>>2]+ +f[X+(Y*244|0)+208>>2]+(z*u-B*q);q=+f[X+(Y*244|0)+180>>2]+ +f[X+(Y*244|0)+212>>2]+(A*q-z*M);u=+f[X+(Y*244|0)+184>>2]+ +f[X+(Y*244|0)+216>>2]+(B*M-A*u)}if(!(c[X+(Z*244|0)+240>>2]|0)){p=0.0;t=0.0;v=0.0}else{M=+f[X+(Z*244|0)+192>>2]+ +f[X+(Z*244|0)+224>>2];v=+f[X+(Z*244|0)+196>>2]+ +f[X+(Z*244|0)+228>>2];t=+f[X+(Z*244|0)+200>>2]+ +f[X+(Z*244|0)+232>>2];p=+f[X+(Z*244|0)+176>>2]+ +f[X+(Z*244|0)+208>>2]+(D*v-F*t);t=+f[X+(Z*244|0)+180>>2]+ +f[X+(Z*244|0)+212>>2]+(E*t-D*M);v=+f[X+(Z*244|0)+184>>2]+ +f[X+(Z*244|0)+216>>2]+(F*M-E*v)}M=j-p;L=q-t;K=u-v;P=T+4+(aa*184|0)+64|0;H=+f[P>>2];O=T+4+(aa*184|0)+68|0;I=+f[O>>2];N=T+4+(aa*184|0)+72|0;J=+f[N>>2];l=c[b+16>>2]|0;i=c[l+(Y*244|0)+240>>2]|0;k=c[l+(Z*244|0)+240>>2]|0;if(i|0){j=((B*J-z*I)*+f[i+264>>2]+(z*H-J*A)*+f[i+268>>2]+(I*A-B*H)*+f[i+272>>2])*+f[i+544>>2];p=((B*J-z*I)*+f[i+280>>2]+(z*H-J*A)*+f[i+284>>2]+(I*A-B*H)*+f[i+288>>2])*+f[i+548>>2];q=((B*J-z*I)*+f[i+296>>2]+(z*H-J*A)*+f[i+300>>2]+(I*A-B*H)*+f[i+304>>2])*+f[i+552>>2]}else{j=0.0;p=0.0;q=0.0}f[Q+(S*152|0)+64>>2]=j;f[Q+(S*152|0)+68>>2]=p;f[Q+(S*152|0)+72>>2]=q;f[Q+(S*152|0)+76>>2]=0.0;w=+f[N>>2];x=+f[O>>2];y=+f[P>>2];if(k|0){t=(+f[k+264>>2]*-(F*w-D*x)+ +f[k+268>>2]*-(D*y-w*E)+ +f[k+272>>2]*-(x*E-F*y))*+f[k+544>>2];u=(+f[k+280>>2]*-(F*w-D*x)+ +f[k+284>>2]*-(D*y-w*E)+ +f[k+288>>2]*-(x*E-F*y))*+f[k+548>>2];v=(+f[k+296>>2]*-(F*w-D*x)+ +f[k+300>>2]*-(D*y-w*E)+ +f[k+304>>2]*-(x*E-F*y))*+f[k+552>>2]}else{t=0.0;u=0.0;v=0.0}f[Q+(S*152|0)+80>>2]=t;f[Q+(S*152|0)+84>>2]=u;f[Q+(S*152|0)+88>>2]=v;f[Q+(S*152|0)+92>>2]=0.0;if(i|0)p=+f[i+344>>2]+((p*z-q*B)*+f[P>>2]+(q*A-z*j)*+f[O>>2]+(B*j-p*A)*+f[N>>2]);else p=0.0;if(k|0){G=-t;j=-u;v=-v;j=+f[k+344>>2]+((D*j-F*v)*+f[P>>2]+(E*v-D*G)*+f[O>>2]+(F*G-E*j)*+f[N>>2])}else j=0.0;f[Q+(S*152|0)+108>>2]=1.0/(p+j);if(i|0){c[Q+(S*152|0)+16>>2]=c[P>>2];c[Q+(S*152|0)+16+4>>2]=c[P+4>>2];c[Q+(S*152|0)+16+8>>2]=c[P+8>>2];c[Q+(S*152|0)+16+12>>2]=c[P+12>>2];f[Q+(S*152|0)>>2]=B*J-z*I;f[Q+(S*152|0)+4>>2]=z*H-J*A;f[Q+(S*152|0)+8>>2]=I*A-B*H;f[Q+(S*152|0)+12>>2]=0.0}else{c[Q+(S*152|0)>>2]=0;c[Q+(S*152|0)+4>>2]=0;c[Q+(S*152|0)+8>>2]=0;c[Q+(S*152|0)+12>>2]=0;c[Q+(S*152|0)+16>>2]=0;c[Q+(S*152|0)+20>>2]=0;c[Q+(S*152|0)+24>>2]=0;c[Q+(S*152|0)+28>>2]=0}if(k|0){v=-+f[O>>2];G=-+f[N>>2];f[Q+(S*152|0)+48>>2]=-+f[P>>2];f[Q+(S*152|0)+52>>2]=v;f[Q+(S*152|0)+56>>2]=G;f[Q+(S*152|0)+60>>2]=0.0;f[Q+(S*152|0)+32>>2]=-(F*w-D*x);f[Q+(S*152|0)+36>>2]=-(D*y-w*E);f[Q+(S*152|0)+40>>2]=-(x*E-F*y);f[Q+(S*152|0)+44>>2]=0.0}else{c[Q+(S*152|0)+32>>2]=0;c[Q+(S*152|0)+32+4>>2]=0;c[Q+(S*152|0)+32+8>>2]=0;c[Q+(S*152|0)+32+12>>2]=0;c[Q+(S*152|0)+32+16>>2]=0;c[Q+(S*152|0)+32+20>>2]=0;c[Q+(S*152|0)+32+24>>2]=0;c[Q+(S*152|0)+32+28>>2]=0}G=+f[m>>2]+ +f[g+56>>2];if(i|0){t=+f[i+332>>2];u=+f[i+336>>2];y=+f[i+328>>2];v=t*z-u*B+ +f[i+312>>2];u=+f[i+316>>2]+(u*A-z*y);t=B*y-t*A+ +f[i+320>>2]}else{v=0.0;u=0.0;t=0.0}if(k|0){j=+f[k+332>>2];p=+f[k+336>>2];B=+f[k+328>>2];q=j*D-p*F+ +f[k+312>>2];p=+f[k+316>>2]+(p*E-D*B);j=F*B-j*E+ +f[k+320>>2]}else{q=0.0;p=0.0;j=0.0}D=(v-q)*+f[P>>2]+(u-p)*+f[O>>2]+(t-j)*+f[N>>2];c[Q+(S*152|0)+104>>2]=c[T+4+(aa*184|0)+84>>2];D=D*+f[T+4+(aa*184|0)+92>>2];D=D>=-0.0?0.0:-D;do if(!(c[g+64>>2]&4))f[Q+(S*152|0)+100>>2]=0.0;else{j=+f[T+4+(aa*184|0)+120>>2]*+f[g+60>>2];f[Q+(S*152|0)+100>>2]=j;do if(i|0){if(!(c[l+(Y*244|0)+240>>2]|0))break;F=j*(+f[Q+(S*152|0)+20>>2]*+f[l+(Y*244|0)+132>>2]*+f[i+352>>2])*+f[l+(Y*244|0)+116>>2];E=j*(+f[Q+(S*152|0)+24>>2]*+f[l+(Y*244|0)+136>>2]*+f[i+356>>2])*+f[l+(Y*244|0)+120>>2];f[l+(Y*244|0)+64>>2]=+f[l+(Y*244|0)+112>>2]*(j*(+f[Q+(S*152|0)+16>>2]*+f[l+(Y*244|0)+128>>2]*+f[i+348>>2]))+ +f[l+(Y*244|0)+64>>2];f[l+(Y*244|0)+68>>2]=F+ +f[l+(Y*244|0)+68>>2];f[l+(Y*244|0)+72>>2]=E+ +f[l+(Y*244|0)+72>>2];E=j*+f[l+(Y*244|0)+100>>2]*+f[Q+(S*152|0)+68>>2];F=j*+f[l+(Y*244|0)+104>>2]*+f[Q+(S*152|0)+72>>2];f[l+(Y*244|0)+80>>2]=j*+f[l+(Y*244|0)+96>>2]*+f[Q+(S*152|0)+64>>2]+ +f[l+(Y*244|0)+80>>2];f[l+(Y*244|0)+84>>2]=E+ +f[l+(Y*244|0)+84>>2];f[l+(Y*244|0)+88>>2]=F+ +f[l+(Y*244|0)+88>>2]}while(0);if(!k)break;j=+f[Q+(S*152|0)+100>>2];if(!(c[l+(Z*244|0)+240>>2]|0))break;F=+f[Q+(S*152|0)+88>>2];E=+f[Q+(S*152|0)+84>>2];B=+f[Q+(S*152|0)+80>>2];z=j*(+f[Q+(S*152|0)+52>>2]*+f[l+(Z*244|0)+132>>2]*+f[k+352>>2])*+f[l+(Z*244|0)+116>>2];A=j*(+f[Q+(S*152|0)+56>>2]*+f[l+(Z*244|0)+136>>2]*+f[k+356>>2])*+f[l+(Z*244|0)+120>>2];f[l+(Z*244|0)+64>>2]=+f[l+(Z*244|0)+112>>2]*(j*(+f[Q+(S*152|0)+48>>2]*+f[l+(Z*244|0)+128>>2]*+f[k+348>>2]))+ +f[l+(Z*244|0)+64>>2];f[l+(Z*244|0)+68>>2]=z+ +f[l+(Z*244|0)+68>>2];f[l+(Z*244|0)+72>>2]=A+ +f[l+(Z*244|0)+72>>2];E=E*(+f[l+(Z*244|0)+100>>2]*-j);F=F*(+f[l+(Z*244|0)+104>>2]*-j);f[l+(Z*244|0)+80>>2]=+f[l+(Z*244|0)+80>>2]-B*(+f[l+(Z*244|0)+96>>2]*-j);f[l+(Z*244|0)+84>>2]=+f[l+(Z*244|0)+84>>2]-E;f[l+(Z*244|0)+88>>2]=+f[l+(Z*244|0)+88>>2]-F}while(0);f[Q+(S*152|0)+96>>2]=0.0;if(!(c[l+(Y*244|0)+240>>2]|0)){j=0.0;p=0.0;q=0.0;t=0.0;u=0.0;v=0.0}else{j=+f[l+(Y*244|0)+208>>2];p=+f[l+(Y*244|0)+212>>2];q=+f[l+(Y*244|0)+216>>2];t=+f[l+(Y*244|0)+224>>2];u=+f[l+(Y*244|0)+228>>2];v=+f[l+(Y*244|0)+232>>2]}if(!(c[l+(Z*244|0)+240>>2]|0)){w=0.0;x=0.0;y=0.0;z=0.0;A=0.0;B=0.0}else{w=+f[l+(Z*244|0)+208>>2];x=+f[l+(Z*244|0)+212>>2];y=+f[l+(Z*244|0)+216>>2];z=+f[l+(Z*244|0)+224>>2];A=+f[l+(Z*244|0)+228>>2];B=+f[l+(Z*244|0)+232>>2]}j=D-((j+ +f[l+(Y*244|0)+176>>2])*+f[Q+(S*152|0)+16>>2]+(p+ +f[l+(Y*244|0)+180>>2])*+f[Q+(S*152|0)+20>>2]+(q+ +f[l+(Y*244|0)+184>>2])*+f[Q+(S*152|0)+24>>2]+((t+ +f[l+(Y*244|0)+192>>2])*+f[Q+(S*152|0)>>2]+(u+ +f[l+(Y*244|0)+196>>2])*+f[Q+(S*152|0)+4>>2]+(v+ +f[l+(Y*244|0)+200>>2])*+f[Q+(S*152|0)+8>>2])+((w+ +f[l+(Z*244|0)+176>>2])*+f[Q+(S*152|0)+48>>2]+(x+ +f[l+(Z*244|0)+180>>2])*+f[Q+(S*152|0)+52>>2]+(y+ +f[l+(Z*244|0)+184>>2])*+f[Q+(S*152|0)+56>>2]+((z+ +f[l+(Z*244|0)+192>>2])*+f[Q+(S*152|0)+32>>2]+(A+ +f[l+(Z*244|0)+196>>2])*+f[Q+(S*152|0)+36>>2]+(B+ +f[l+(Z*244|0)+200>>2])*+f[Q+(S*152|0)+40>>2])));i=(c[g+44>>2]|0)==0;if(G>0.0){p=0.0;j=j-G/+f[g+12>>2]}else p=-(G*(i|G>+f[g+48>>2]?+f[g+32>>2]:+f[g+36>>2]))/+f[g+12>>2];E=+f[Q+(S*152|0)+108>>2];F=p*E;E=j*E;C=i|G>+f[g+48>>2];f[Q+(S*152|0)+112>>2]=C?F+E:E;f[Q+(S*152|0)+128>>2]=C?0.0:F;f[Q+(S*152|0)+116>>2]=0.0;f[Q+(S*152|0)+120>>2]=0.0;f[Q+(S*152|0)+124>>2]=1.0e10;c[Q+(S*152|0)+140>>2]=c[b+68>>2];if(!n){p=0.0;u=0.0;v=0.0}else{p=+f[n+328>>2];u=+f[n+332>>2];v=+f[n+336>>2]}if(!o){j=0.0;q=0.0;t=0.0}else{j=+f[o+328>>2];q=+f[o+332>>2];t=+f[o+336>>2]}w=j-p;p=q-u;t=t-v;f[ca+32>>2]=w;f[ca+32+4>>2]=p;f[ca+32+8>>2]=t;f[ca+32+12>>2]=0.0;do if((h|0)>0?+f[T+4+(aa*184|0)+88>>2]>0.0:0){h=h+-1|0;j=+s(+(w*w+p*p+t*t));if(j>+f[g+80>>2]){f[ca+32>>2]=w*(1.0/j);f[ca+32+4>>2]=p*(1.0/j);f[ca+32+8>>2]=t*(1.0/j);if(!(c[V+180>>2]&2)){q=w*(1.0/j);p=p*(1.0/j);j=t*(1.0/j)}else{v=+f[V+4>>2];y=+f[V+20>>2];B=+f[V+36>>2];x=+f[V+8>>2];z=+f[V+24>>2];E=+f[V+40>>2];q=+f[V+12>>2];A=+f[V+28>>2];G=+f[V+44>>2];D=(w*(1.0/j)*v+p*(1.0/j)*y+t*(1.0/j)*B)*+f[V+164>>2];F=(w*(1.0/j)*x+p*(1.0/j)*z+t*(1.0/j)*E)*+f[V+168>>2];j=(w*(1.0/j)*q+p*(1.0/j)*A+t*(1.0/j)*G)*+f[V+172>>2];f[ca+32>>2]=v*D+x*F+q*j;f[ca+32+4>>2]=y*D+z*F+A*j;f[ca+32+8>>2]=B*D+E*F+G*j;f[ca+32+12>>2]=0.0;q=v*D+x*F+q*j;p=y*D+z*F+A*j;j=B*D+E*F+G*j}if(c[W+180>>2]&2){v=+f[W+4>>2];y=+f[W+20>>2];B=+f[W+36>>2];w=+f[W+8>>2];z=+f[W+24>>2];E=+f[W+40>>2];x=+f[W+12>>2];A=+f[W+28>>2];G=+f[W+44>>2];D=(v*q+y*p+B*j)*+f[W+164>>2];F=(q*w+p*z+j*E)*+f[W+168>>2];j=(q*x+p*A+j*G)*+f[W+172>>2];f[ca+32>>2]=v*D+w*F+x*j;f[ca+32+4>>2]=y*D+z*F+A*j;f[ca+32+8>>2]=B*D+E*F+G*j;f[ca+32+12>>2]=0.0;q=v*D+w*F+x*j;p=y*D+z*F+A*j;j=B*D+E*F+G*j}if(!(+s(+(q*q+p*p+j*j))>.001))break;Bc(b,ca+32|0,Y,Z,S,R);break}Bc(b,P,Y,Z,S,R);j=+f[N>>2];if(+r(+j)>.7071067690849304){p=+f[O>>2];G=1.0/+s(+(j*j+p*p));f[ca+16>>2]=0.0;f[ca+16+4>>2]=-(j*G);f[ca+16+8>>2]=p*G;f[ca>>2]=(j*j+p*p)*G;F=+f[P>>2];f[ca+4>>2]=-(F*(p*G));q=0.0;u=-(j*G);v=p*G;t=(j*j+p*p)*G;p=-(F*(p*G));j=F*-(j*G)}else{E=+f[P>>2];F=+f[O>>2];G=1.0/+s(+(E*E+F*F));f[ca+16>>2]=-(F*G);f[ca+16+4>>2]=E*G;f[ca+16+8>>2]=0.0;f[ca>>2]=-(j*(E*G));f[ca+4>>2]=j*-(F*G);q=-(F*G);u=E*G;v=0.0;t=-(j*(E*G));p=j*-(F*G);j=(E*E+F*F)*G}f[ca+8>>2]=j;k=(c[V+180>>2]&2|0)==0;if(!k){da=+f[V+4>>2];y=+f[V+20>>2];B=+f[V+36>>2];w=+f[V+8>>2];z=+f[V+24>>2];E=+f[V+40>>2];x=+f[V+12>>2];A=+f[V+28>>2];G=+f[V+44>>2];D=(da*q+y*u+B*v)*+f[V+164>>2];F=(q*w+u*z+v*E)*+f[V+168>>2];v=(q*x+u*A+v*G)*+f[V+172>>2];f[ca+16>>2]=da*D+w*F+x*v;f[ca+16+4>>2]=y*D+z*F+A*v;f[ca+16+8>>2]=B*D+E*F+G*v;f[ca+16+12>>2]=0.0;q=da*D+w*F+x*v;u=y*D+z*F+A*v;v=B*D+E*F+G*v}i=(c[W+180>>2]&2|0)==0;if(!i){w=+f[W+4>>2];z=+f[W+20>>2];D=+f[W+36>>2];x=+f[W+8>>2];A=+f[W+24>>2];F=+f[W+40>>2];y=+f[W+12>>2];B=+f[W+28>>2];da=+f[W+44>>2];E=(w*q+z*u+D*v)*+f[W+164>>2];G=(q*x+u*A+v*F)*+f[W+168>>2];v=(q*y+u*B+v*da)*+f[W+172>>2];f[ca+16>>2]=w*E+x*G+y*v;f[ca+16+4>>2]=z*E+A*G+B*v;f[ca+16+8>>2]=D*E+F*G+da*v;f[ca+16+12>>2]=0.0;q=w*E+x*G+y*v;u=z*E+A*G+B*v;v=D*E+F*G+da*v}if(!k){w=+f[V+4>>2];z=+f[V+20>>2];D=+f[V+36>>2];x=+f[V+8>>2];A=+f[V+24>>2];F=+f[V+40>>2];y=+f[V+12>>2];B=+f[V+28>>2];da=+f[V+44>>2];E=(w*t+z*p+j*D)*+f[V+164>>2];G=(t*x+p*A+j*F)*+f[V+168>>2];j=(t*y+p*B+j*da)*+f[V+172>>2];f[ca>>2]=w*E+x*G+y*j;f[ca+4>>2]=z*E+A*G+B*j;f[ca+8>>2]=D*E+F*G+da*j;f[ca+12>>2]=0.0;t=w*E+x*G+y*j;p=z*E+A*G+B*j;j=D*E+F*G+da*j}if(!i){w=+f[W+4>>2];z=+f[W+20>>2];D=+f[W+36>>2];x=+f[W+8>>2];A=+f[W+24>>2];F=+f[W+40>>2];y=+f[W+12>>2];B=+f[W+28>>2];da=+f[W+44>>2];E=(w*t+z*p+D*j)*+f[W+164>>2];G=(t*x+p*A+j*F)*+f[W+168>>2];j=(t*y+p*B+j*da)*+f[W+172>>2];f[ca>>2]=w*E+x*G+y*j;f[ca+4>>2]=z*E+A*G+B*j;f[ca+8>>2]=D*E+F*G+da*j;f[ca+12>>2]=0.0;t=w*E+x*G+y*j;p=z*E+A*G+B*j;j=D*E+F*G+da*j}if(+s(+(q*q+u*u+v*v))>.001)Bc(b,ca+16|0,Y,Z,S,R);if(+s(+(t*t+p*p+j*j))>.001)Bc(b,ca,Y,Z,S,R)}while(0);do if(!(c[g+64>>2]&32))ba=93;else{if(!(a[T+4+(aa*184|0)+116>>0]|0)){ba=93;break}ec(b,T+4+(aa*184|0)+152|0,Y,Z,S,R,ca+64|0,ca+48|0,1.0,+f[T+4+(aa*184|0)+132>>2],+f[T+4+(aa*184|0)+140>>2]);if(!(c[g+64>>2]&16))break;ec(b,T+4+(aa*184|0)+168|0,Y,Z,S,R,ca+64|0,ca+48|0,1.0,+f[T+4+(aa*184|0)+136>>2],+f[T+4+(aa*184|0)+144>>2])}while(0);do if((ba|0)==93){ba=0;w=+f[P>>2];x=+f[O>>2];y=+f[N>>2];p=M-(M*H+L*I+K*J)*w;u=L-(M*H+L*I+K*J)*x;t=K-(M*H+L*I+K*J)*y;i=T+4+(aa*184|0)+152|0;f[T+4+(aa*184|0)+152>>2]=p;n=T+4+(aa*184|0)+156|0;f[n>>2]=u;o=T+4+(aa*184|0)+160|0;f[o>>2]=t;C=T+4+(aa*184|0)+164|0;f[C>>2]=0.0;if((c[g+64>>2]&64|0)==0?p*p+u*u+t*t>1.1920928955078125e-07:0){j=1.0/+s(+(p*p+u*u+t*t));f[i>>2]=p*j;f[n>>2]=u*j;f[o>>2]=t*j;if(!(c[V+180>>2]&1)){q=p*j;p=u*j;j=t*j}else{E=+f[V+4>>2];G=+f[V+20>>2];J=+f[V+36>>2];F=+f[V+8>>2];H=+f[V+24>>2];L=+f[V+40>>2];q=+f[V+12>>2];I=+f[V+28>>2];da=+f[V+44>>2];K=(p*j*E+u*j*G+t*j*J)*+f[V+164>>2];M=(p*j*F+u*j*H+t*j*L)*+f[V+168>>2];j=(p*j*q+u*j*I+t*j*da)*+f[V+172>>2];f[i>>2]=E*K+F*M+q*j;f[n>>2]=G*K+H*M+I*j;f[o>>2]=J*K+L*M+da*j;f[C>>2]=0.0;q=E*K+F*M+q*j;p=G*K+H*M+I*j;j=J*K+L*M+da*j}if(c[W+180>>2]&1|0){B=+f[W+4>>2];F=+f[W+20>>2];I=+f[W+36>>2];D=+f[W+8>>2];G=+f[W+24>>2];K=+f[W+40>>2];E=+f[W+12>>2];H=+f[W+28>>2];M=+f[W+44>>2];J=(B*q+F*p+I*j)*+f[W+164>>2];L=(q*D+p*G+j*K)*+f[W+168>>2];da=(q*E+p*H+j*M)*+f[W+172>>2];f[i>>2]=B*J+D*L+E*da;f[n>>2]=F*J+G*L+H*da;f[o>>2]=I*J+K*L+M*da;f[C>>2]=0.0}ec(b,i,Y,Z,S,R,ca+64|0,ca+48|0,1.0,0.0,0.0);if(!(c[g+64>>2]&16))break;M=+f[n>>2];q=+f[N>>2];J=+f[o>>2];K=+f[O>>2];da=+f[P>>2];L=+f[i>>2];i=T+4+(aa*184|0)+168|0;f[T+4+(aa*184|0)+168>>2]=M*q-J*K;k=T+4+(aa*184|0)+172|0;l=T+4+(aa*184|0)+176|0;m=T+4+(aa*184|0)+180|0;f[m>>2]=0.0;j=1.0/+s(+((M*q-J*K)*(M*q-J*K)+(J*da-q*L)*(J*da-q*L)+(K*L-M*da)*(K*L-M*da)));p=(M*q-J*K)*j;f[i>>2]=p;q=(J*da-q*L)*j;f[k>>2]=q;j=(K*L-M*da)*j;f[l>>2]=j;if(c[V+180>>2]&1){D=+f[V+4>>2];G=+f[V+20>>2];J=+f[V+36>>2];E=+f[V+8>>2];H=+f[V+24>>2];L=+f[V+40>>2];F=+f[V+12>>2];I=+f[V+28>>2];da=+f[V+44>>2];K=(p*D+q*G+j*J)*+f[V+164>>2];M=(p*E+q*H+j*L)*+f[V+168>>2];j=(p*F+q*I+j*da)*+f[V+172>>2];f[i>>2]=D*K+E*M+F*j;f[k>>2]=G*K+H*M+I*j;f[l>>2]=J*K+L*M+da*j;f[m>>2]=0.0;p=D*K+E*M+F*j;q=G*K+H*M+I*j;j=J*K+L*M+da*j}if(c[W+180>>2]&1|0){B=+f[W+4>>2];F=+f[W+20>>2];I=+f[W+36>>2];D=+f[W+8>>2];G=+f[W+24>>2];K=+f[W+40>>2];E=+f[W+12>>2];H=+f[W+28>>2];M=+f[W+44>>2];J=(B*p+F*q+I*j)*+f[W+164>>2];L=(p*D+q*G+j*K)*+f[W+168>>2];da=(p*E+q*H+j*M)*+f[W+172>>2];f[i>>2]=B*J+D*L+E*da;f[k>>2]=F*J+G*L+H*da;f[l>>2]=I*J+K*L+M*da;f[m>>2]=0.0}ec(b,i,Y,Z,S,R,ca+64|0,ca+48|0,1.0,0.0,0.0);break}m=T+4+(aa*184|0)+168|0;if(+r(+y)>.7071067690849304){t=1.0/+s(+(x*x+y*y));f[i>>2]=0.0;f[n>>2]=-(y*t);f[o>>2]=x*t;q=0.0;p=-(y*t);j=x*t;u=(x*x+y*y)*t;v=-(w*(x*t));t=w*-(y*t)}else{t=1.0/+s(+(w*w+x*x));f[i>>2]=-(x*t);f[n>>2]=w*t;f[o>>2]=0.0;q=-(x*t);p=w*t;j=0.0;u=-(y*(w*t));v=y*-(x*t);t=(w*w+x*x)*t}f[m>>2]=u;l=T+4+(aa*184|0)+172|0;f[l>>2]=v;k=T+4+(aa*184|0)+176|0;f[k>>2]=t;if(c[V+180>>2]&1){D=+f[V+4>>2];G=+f[V+20>>2];J=+f[V+36>>2];E=+f[V+8>>2];H=+f[V+24>>2];L=+f[V+40>>2];F=+f[V+12>>2];I=+f[V+28>>2];da=+f[V+44>>2];K=(D*q+G*p+J*j)*+f[V+164>>2];M=(q*E+p*H+j*L)*+f[V+168>>2];j=(q*F+p*I+j*da)*+f[V+172>>2];f[i>>2]=D*K+E*M+F*j;f[n>>2]=G*K+H*M+I*j;f[o>>2]=J*K+L*M+da*j;f[C>>2]=0.0;q=D*K+E*M+F*j;p=G*K+H*M+I*j;j=J*K+L*M+da*j}if(c[W+180>>2]&1|0){B=+f[W+4>>2];F=+f[W+20>>2];I=+f[W+36>>2];D=+f[W+8>>2];G=+f[W+24>>2];K=+f[W+40>>2];E=+f[W+12>>2];H=+f[W+28>>2];M=+f[W+44>>2];J=(B*q+F*p+I*j)*+f[W+164>>2];L=(q*D+p*G+j*K)*+f[W+168>>2];da=(q*E+p*H+j*M)*+f[W+172>>2];f[i>>2]=B*J+D*L+E*da;f[n>>2]=F*J+G*L+H*da;f[o>>2]=I*J+K*L+M*da;f[C>>2]=0.0}ec(b,i,Y,Z,S,R,ca+64|0,ca+48|0,1.0,0.0,0.0);i=c[g+64>>2]|0;if(i&16){if(c[V+180>>2]&1|0){B=+f[V+4>>2];z=+f[m>>2];F=+f[V+20>>2];A=+f[l>>2];I=+f[V+36>>2];da=+f[k>>2];D=+f[V+8>>2];G=+f[V+24>>2];K=+f[V+40>>2];E=+f[V+12>>2];H=+f[V+28>>2];M=+f[V+44>>2];J=(B*z+F*A+I*da)*+f[V+164>>2];L=(z*D+A*G+da*K)*+f[V+168>>2];da=(z*E+A*H+da*M)*+f[V+172>>2];f[m>>2]=B*J+D*L+E*da;f[l>>2]=F*J+G*L+H*da;f[k>>2]=I*J+K*L+M*da;f[T+4+(aa*184|0)+180>>2]=0.0}if(c[W+180>>2]&1|0){B=+f[W+4>>2];z=+f[m>>2];F=+f[W+20>>2];A=+f[l>>2];I=+f[W+36>>2];da=+f[k>>2];D=+f[W+8>>2];G=+f[W+24>>2];K=+f[W+40>>2];E=+f[W+12>>2];H=+f[W+28>>2];M=+f[W+44>>2];J=(B*z+F*A+I*da)*+f[W+164>>2];L=(z*D+A*G+da*K)*+f[W+168>>2];da=(z*E+A*H+da*M)*+f[W+172>>2];f[m>>2]=B*J+D*L+E*da;f[l>>2]=F*J+G*L+H*da;f[k>>2]=I*J+K*L+M*da;f[T+4+(aa*184|0)+180>>2]=0.0}ec(b,m,Y,Z,S,R,ca+64|0,ca+48|0,1.0,0.0,0.0);i=c[g+64>>2]|0}if((i&80|0)!=80)break;a[T+4+(aa*184|0)+116>>0]=1}while(0);m=c[b+16>>2]|0;n=c[m+(Y*244|0)+240>>2]|0;o=c[m+(Z*244|0)+240>>2]|0;k=c[Q+(S*152|0)+140>>2]|0;l=c[b+76>>2]|0;i=c[g+64>>2]|0;do if(!(i&4))f[l+(k*152|0)+100>>2]=0.0;else{j=+f[T+4+(aa*184|0)+124>>2]*+f[g+60>>2];f[l+(k*152|0)+100>>2]=j;if(n|0){L=+f[n+344>>2];da=j*(L*+f[l+(k*152|0)+20>>2]*+f[n+352>>2])*+f[m+(Y*244|0)+116>>2];M=j*(L*+f[l+(k*152|0)+24>>2]*+f[n+356>>2])*+f[m+(Y*244|0)+120>>2];f[m+(Y*244|0)+64>>2]=j*(L*+f[l+(k*152|0)+16>>2]*+f[n+348>>2])*+f[m+(Y*244|0)+112>>2]+ +f[m+(Y*244|0)+64>>2];f[m+(Y*244|0)+68>>2]=da+ +f[m+(Y*244|0)+68>>2];f[m+(Y*244|0)+72>>2]=M+ +f[m+(Y*244|0)+72>>2];M=j*+f[m+(Y*244|0)+100>>2]*+f[l+(k*152|0)+68>>2];da=j*+f[m+(Y*244|0)+104>>2]*+f[l+(k*152|0)+72>>2];f[m+(Y*244|0)+80>>2]=j*+f[m+(Y*244|0)+96>>2]*+f[l+(k*152|0)+64>>2]+ +f[m+(Y*244|0)+80>>2];f[m+(Y*244|0)+84>>2]=M+ +f[m+(Y*244|0)+84>>2];f[m+(Y*244|0)+88>>2]=da+ +f[m+(Y*244|0)+88>>2]}if(!o)break;H=+f[o+344>>2];K=+f[l+(k*152|0)+80>>2];M=+f[l+(k*152|0)+84>>2];da=+f[l+(k*152|0)+88>>2];L=+f[l+(k*152|0)+100>>2];I=+f[l+(k*152|0)+52>>2]*H*+f[o+352>>2]*L*+f[m+(Z*244|0)+116>>2];J=+f[l+(k*152|0)+56>>2]*H*+f[o+356>>2]*L*+f[m+(Z*244|0)+120>>2];f[m+(Z*244|0)+64>>2]=+f[l+(k*152|0)+48>>2]*H*+f[o+348>>2]*L*+f[m+(Z*244|0)+112>>2]+ +f[m+(Z*244|0)+64>>2];f[m+(Z*244|0)+68>>2]=I+ +f[m+(Z*244|0)+68>>2];f[m+(Z*244|0)+72>>2]=J+ +f[m+(Z*244|0)+72>>2];M=M*(+f[m+(Z*244|0)+100>>2]*-L);da=da*(+f[m+(Z*244|0)+104>>2]*-L);f[m+(Z*244|0)+80>>2]=+f[m+(Z*244|0)+80>>2]-K*(+f[m+(Z*244|0)+96>>2]*-L);f[m+(Z*244|0)+84>>2]=+f[m+(Z*244|0)+84>>2]-M;f[m+(Z*244|0)+88>>2]=+f[m+(Z*244|0)+88>>2]-da}while(0);do if(i&16|0){if(!(i&4)){f[l+((k+1|0)*152|0)+100>>2]=0.0;break}j=+f[T+4+(aa*184|0)+128>>2]*+f[g+60>>2];f[l+((k+1|0)*152|0)+100>>2]=j;if(n|0){L=+f[n+344>>2];da=j*(L*+f[l+((k+1|0)*152|0)+20>>2])*+f[m+(Y*244|0)+116>>2];M=j*(L*+f[l+((k+1|0)*152|0)+24>>2])*+f[m+(Y*244|0)+120>>2];f[m+(Y*244|0)+64>>2]=j*(L*+f[l+((k+1|0)*152|0)+16>>2])*+f[m+(Y*244|0)+112>>2]+ +f[m+(Y*244|0)+64>>2];f[m+(Y*244|0)+68>>2]=da+ +f[m+(Y*244|0)+68>>2];f[m+(Y*244|0)+72>>2]=M+ +f[m+(Y*244|0)+72>>2];M=j*+f[m+(Y*244|0)+100>>2]*+f[l+((k+1|0)*152|0)+68>>2];da=j*+f[m+(Y*244|0)+104>>2]*+f[l+((k+1|0)*152|0)+72>>2];f[m+(Y*244|0)+80>>2]=j*+f[m+(Y*244|0)+96>>2]*+f[l+((k+1|0)*152|0)+64>>2]+ +f[m+(Y*244|0)+80>>2];f[m+(Y*244|0)+84>>2]=M+ +f[m+(Y*244|0)+84>>2];f[m+(Y*244|0)+88>>2]=da+ +f[m+(Y*244|0)+88>>2]}if(!o)break;H=+f[o+344>>2];K=+f[l+((k+1|0)*152|0)+80>>2];M=+f[l+((k+1|0)*152|0)+84>>2];da=+f[l+((k+1|0)*152|0)+88>>2];L=+f[l+((k+1|0)*152|0)+100>>2];I=+f[l+((k+1|0)*152|0)+52>>2]*H*L*+f[m+(Z*244|0)+116>>2];J=+f[l+((k+1|0)*152|0)+56>>2]*H*L*+f[m+(Z*244|0)+120>>2];f[m+(Z*244|0)+64>>2]=+f[l+((k+1|0)*152|0)+48>>2]*H*L*+f[m+(Z*244|0)+112>>2]+ +f[m+(Z*244|0)+64>>2];f[m+(Z*244|0)+68>>2]=I+ +f[m+(Z*244|0)+68>>2];f[m+(Z*244|0)+72>>2]=J+ +f[m+(Z*244|0)+72>>2];M=M*(+f[m+(Z*244|0)+100>>2]*-L);da=da*(+f[m+(Z*244|0)+104>>2]*-L);f[m+(Z*244|0)+80>>2]=+f[m+(Z*244|0)+80>>2]-K*(+f[m+(Z*244|0)+96>>2]*-L);f[m+(Z*244|0)+84>>2]=+f[m+(Z*244|0)+84>>2]-M;f[m+(Z*244|0)+88>>2]=+f[m+(Z*244|0)+88>>2]-da}while(0);i=c[T+748>>2]|0}aa=aa+1|0}while((aa|0)<(i|0))}$=$+1|0}while(($|0)!=(e|0));ea=ca;return}function eb(b){b=b|0;var d=0,e=0,g=0.0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.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,Z=0,_=0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0,ma=0,na=0;_=ea;ea=ea+176|0;Fi(14918);cd(b);if((ra[c[(c[b>>2]|0)+20>>2]&127](b)|0?(Z=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,(ra[c[(c[Z>>2]|0)+48>>2]&127](Z)|0)&6144|0):0)?(d=ra[c[(c[b>>2]|0)+104>>2]&127](b)|0,(d|0)>0):0){H=_+112+44|0;S=_+112+4|0;T=_+112+8|0;U=_+112+16|0;V=_+112+20|0;O=_+112+24|0;P=_+112+32|0;Q=_+112+36|0;R=_+112+40|0;W=_+112+48|0;X=_+112+52|0;Z=_+112+56|0;J=_+112+16|0;G=_+112+32|0;M=_+112+48|0;I=_+112+16|0;F=_+112+32|0;L=_+112+48|0;N=_+112+48|0;do{E=d;d=d+-1|0;o=ta[c[(c[b>>2]|0)+108>>2]&31](b,d)|0;e=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;e=((ra[c[(c[e>>2]|0)+48>>2]&127](e)|0)&2048|0)!=0;n=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=((ra[c[(c[n>>2]|0)+48>>2]&127](n)|0)&4096|0)!=0;D=+f[o+40>>2];a:do if(!(D<=0.0))switch(c[o+4>>2]|0){case 3:{c[_+112>>2]=1065353216;c[_+112+4>>2]=0;c[_+112+4+4>>2]=0;c[_+112+4+8>>2]=0;c[_+112+4+12>>2]=0;c[_+112+20>>2]=1065353216;c[_+112+24>>2]=0;c[_+112+24+4>>2]=0;c[_+112+24+8>>2]=0;c[_+112+24+12>>2]=0;c[_+112+40>>2]=1065353216;c[H>>2]=0;c[H+4>>2]=0;c[H+8>>2]=0;c[H+12>>2]=0;c[H+16>>2]=0;C=+f[o+300>>2];B=+f[o+304>>2];A=+f[o+308>>2];n=c[o+28>>2]|0;z=C*+f[n+20>>2]+B*+f[n+24>>2]+A*+f[n+28>>2]+ +f[n+56>>2];y=C*+f[n+36>>2]+B*+f[n+40>>2]+A*+f[n+44>>2]+ +f[n+60>>2];f[_+112+48>>2]=C*+f[n+4>>2]+B*+f[n+8>>2]+A*+f[n+12>>2]+ +f[n+52>>2];f[_+112+52>>2]=z;f[_+112+56>>2]=y;f[_+112+60>>2]=0.0;n=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[n>>2]|0)+56>>2]&7](n,_+112|0,D);y=+f[o+316>>2];z=+f[o+320>>2];A=+f[o+324>>2];o=c[o+32>>2]|0;B=y*+f[o+20>>2]+z*+f[o+24>>2]+A*+f[o+28>>2]+ +f[o+56>>2];C=y*+f[o+36>>2]+z*+f[o+40>>2]+A*+f[o+44>>2]+ +f[o+60>>2];f[_+112+48>>2]=y*+f[o+4>>2]+z*+f[o+8>>2]+A*+f[o+12>>2]+ +f[o+52>>2];f[_+112+52>>2]=B;f[_+112+56>>2]=C;f[_+112+60>>2]=0.0;if(e){o=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[o>>2]|0)+56>>2]&7](o,_+112|0,D)}break a}case 4:{m=c[o+28>>2]|0;g=+f[o+552>>2];fa=+f[m+4>>2];i=+f[o+552+16>>2];da=+f[m+8>>2];j=+f[o+552+32>>2];ca=+f[m+12>>2];p=+f[o+552+4>>2];q=+f[o+552+20>>2];r=+f[o+552+36>>2];s=+f[o+552+8>>2];w=+f[o+552+24>>2];y=+f[o+552+40>>2];ba=+f[m+20>>2];aa=+f[m+24>>2];$=+f[m+28>>2];t=+f[m+36>>2];x=+f[m+40>>2];z=+f[m+44>>2];ha=+f[o+552+48>>2];ga=+f[o+552+52>>2];C=+f[o+552+56>>2];A=+f[m+52>>2]+(fa*ha+da*ga+ca*C);B=ba*ha+aa*ga+$*C+ +f[m+56>>2];C=t*ha+x*ga+z*C+ +f[m+60>>2];f[_+112>>2]=g*fa+i*da+j*ca;f[_+112+4>>2]=fa*p+da*q+ca*r;f[_+112+8>>2]=fa*s+da*w+ca*y;f[_+112+12>>2]=0.0;f[_+112+16>>2]=g*ba+i*aa+j*$;f[_+112+20>>2]=p*ba+q*aa+r*$;f[_+112+24>>2]=s*ba+w*aa+y*$;f[_+112+28>>2]=0.0;f[_+112+32>>2]=g*t+i*x+j*z;f[_+112+36>>2]=p*t+q*x+r*z;f[_+112+40>>2]=s*t+w*x+y*z;f[_+112+44>>2]=0.0;f[_+112+48>>2]=A;f[_+112+52>>2]=B;f[_+112+56>>2]=C;f[_+112+60>>2]=0.0;if(e){m=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[m>>2]|0)+56>>2]&7](m,_+112|0,D);m=c[o+32>>2]|0;w=+f[o+616>>2];j=+f[m+4>>2];x=+f[o+616+16>>2];p=+f[m+8>>2];y=+f[o+616+32>>2];q=+f[m+12>>2];z=+f[o+616+4>>2];A=+f[o+616+20>>2];B=+f[o+616+36>>2];C=+f[o+616+8>>2];aa=+f[o+616+24>>2];ca=+f[o+616+40>>2];r=+f[m+20>>2];s=+f[m+24>>2];t=+f[m+28>>2];$=+f[m+36>>2];ba=+f[m+40>>2];da=+f[m+44>>2];g=+f[o+616+48>>2];i=+f[o+616+52>>2];ha=+f[o+616+56>>2];fa=+f[m+52>>2]+(j*g+p*i+q*ha);ga=r*g+s*i+t*ha+ +f[m+56>>2];ha=$*g+ba*i+da*ha+ +f[m+60>>2];f[_+112>>2]=w*j+x*p+y*q;f[_+112+4>>2]=j*z+p*A+q*B;f[_+112+8>>2]=j*C+p*aa+q*ca;f[_+112+12>>2]=0.0;f[_+112+16>>2]=w*r+x*s+y*t;f[_+112+20>>2]=z*r+A*s+B*t;f[_+112+24>>2]=C*r+aa*s+ca*t;f[_+112+28>>2]=0.0;f[_+112+32>>2]=w*$+x*ba+y*da;f[_+112+36>>2]=z*$+A*ba+B*da;f[_+112+40>>2]=C*$+aa*ba+ca*da;f[_+112+44>>2]=0.0;f[_+112+48>>2]=fa;f[_+112+52>>2]=ga;f[_+112+56>>2]=ha;f[_+112+60>>2]=0.0;m=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[m>>2]|0)+56>>2]&7](m,_+112|0,D)}else{m=c[o+32>>2]|0;w=+f[o+616>>2];j=+f[m+4>>2];x=+f[o+616+16>>2];p=+f[m+8>>2];y=+f[o+616+32>>2];q=+f[m+12>>2];z=+f[o+616+4>>2];A=+f[o+616+20>>2];B=+f[o+616+36>>2];C=+f[o+616+8>>2];aa=+f[o+616+24>>2];ca=+f[o+616+40>>2];r=+f[m+20>>2];s=+f[m+24>>2];t=+f[m+28>>2];$=+f[m+36>>2];ba=+f[m+40>>2];da=+f[m+44>>2];g=+f[o+616+48>>2];i=+f[o+616+52>>2];ha=+f[o+616+56>>2];fa=+f[m+52>>2]+(j*g+p*i+q*ha);ga=r*g+s*i+t*ha+ +f[m+56>>2];ha=$*g+ba*i+da*ha+ +f[m+60>>2];f[_+112>>2]=w*j+x*p+y*q;f[_+112+4>>2]=j*z+p*A+q*B;f[_+112+8>>2]=j*C+p*aa+q*ca;f[_+112+12>>2]=0.0;f[_+112+16>>2]=w*r+x*s+y*t;f[_+112+20>>2]=z*r+A*s+B*t;f[_+112+24>>2]=C*r+aa*s+ca*t;f[_+112+28>>2]=0.0;f[_+112+32>>2]=w*$+x*ba+y*da;f[_+112+36>>2]=z*$+A*ba+B*da;f[_+112+40>>2]=C*$+aa*ba+ca*da;f[_+112+44>>2]=0.0;f[_+112+48>>2]=fa;f[_+112+52>>2]=ga;f[_+112+56>>2]=ha;f[_+112+60>>2]=0.0}i=+f[o+688>>2];g=+f[o+688+4>>2];if(!((i-g)%6.2831854820251465<-3.1415927410125732))if((i-g)%6.2831854820251465>3.1415927410125732)j=(i-g)%6.2831854820251465+-6.2831854820251465;else j=(i-g)%6.2831854820251465;else j=(i-g)%6.2831854820251465+6.2831854820251465;if(!((i+g)%6.2831854820251465<-3.1415927410125732))if((i+g)%6.2831854820251465>3.1415927410125732)g=(i+g)%6.2831854820251465+-6.2831854820251465;else g=(i+g)%6.2831854820251465;else g=(i+g)%6.2831854820251465+6.2831854820251465;if(!(j==g)?(K=j>g,n):0){c[_+96>>2]=c[_+112+8>>2];c[_+96+4>>2]=c[_+112+24>>2];c[_+96+8>>2]=c[_+112+40>>2];f[_+96+12>>2]=0.0;c[_+80>>2]=c[_+112>>2];c[_+80+4>>2]=c[_+112+16>>2];c[_+80+8>>2]=c[_+112+32>>2];f[_+80+12>>2]=0.0;o=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=c[(c[o>>2]|0)+60>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;Sa[n&1](o,_+112+48|0,_+96|0,_+80|0,D,D,K?0.0:j,K?6.2831854820251465:g,_+64|0,K^1,10.0)}break a}case 5:{m=c[o+28>>2]|0;w=+f[o+300>>2];j=+f[m+4>>2];x=+f[o+300+16>>2];p=+f[m+8>>2];y=+f[o+300+32>>2];q=+f[m+12>>2];z=+f[o+300+4>>2];A=+f[o+300+20>>2];B=+f[o+300+36>>2];C=+f[o+300+8>>2];aa=+f[o+300+24>>2];ca=+f[o+300+40>>2];r=+f[m+20>>2];s=+f[m+24>>2];t=+f[m+28>>2];$=+f[m+36>>2];ba=+f[m+40>>2];da=+f[m+44>>2];g=+f[o+300+48>>2];i=+f[o+300+52>>2];ha=+f[o+300+56>>2];fa=+f[m+52>>2]+(j*g+p*i+q*ha);ga=r*g+s*i+t*ha+ +f[m+56>>2];ha=$*g+ba*i+da*ha+ +f[m+60>>2];f[_+112>>2]=w*j+x*p+y*q;f[S>>2]=j*z+p*A+q*B;f[T>>2]=j*C+p*aa+q*ca;f[_+112+12>>2]=0.0;f[U>>2]=w*r+x*s+y*t;f[V>>2]=z*r+A*s+B*t;f[O>>2]=C*r+aa*s+ca*t;f[_+112+28>>2]=0.0;f[P>>2]=w*$+x*ba+y*da;f[Q>>2]=z*$+A*ba+B*da;f[R>>2]=C*$+aa*ba+ca*da;f[_+112+44>>2]=0.0;f[W>>2]=fa;f[X>>2]=ga;f[Z>>2]=ha;f[_+112+60>>2]=0.0;if(e){m=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[m>>2]|0)+56>>2]&7](m,_+112|0,D);m=c[o+32>>2]|0;w=+f[o+364>>2];j=+f[m+4>>2];x=+f[o+364+16>>2];p=+f[m+8>>2];y=+f[o+364+32>>2];q=+f[m+12>>2];z=+f[o+364+4>>2];A=+f[o+364+20>>2];B=+f[o+364+36>>2];C=+f[o+364+8>>2];aa=+f[o+364+24>>2];ca=+f[o+364+40>>2];r=+f[m+20>>2];s=+f[m+24>>2];t=+f[m+28>>2];$=+f[m+36>>2];ba=+f[m+40>>2];da=+f[m+44>>2];g=+f[o+364+48>>2];i=+f[o+364+52>>2];ha=+f[o+364+56>>2];fa=+f[m+52>>2]+(j*g+p*i+q*ha);ga=r*g+s*i+t*ha+ +f[m+56>>2];ha=$*g+ba*i+da*ha+ +f[m+60>>2];f[_+112>>2]=w*j+x*p+y*q;f[S>>2]=j*z+p*A+q*B;f[T>>2]=j*C+p*aa+q*ca;f[_+112+12>>2]=0.0;f[U>>2]=w*r+x*s+y*t;f[V>>2]=z*r+A*s+B*t;f[O>>2]=C*r+aa*s+ca*t;f[_+112+28>>2]=0.0;f[P>>2]=w*$+x*ba+y*da;f[Q>>2]=z*$+A*ba+B*da;f[R>>2]=C*$+aa*ba+ca*da;f[_+112+44>>2]=0.0;f[W>>2]=fa;f[X>>2]=ga;f[Z>>2]=ha;f[_+112+60>>2]=0.0;m=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[m>>2]|0)+56>>2]&7](m,_+112|0,D)}else{m=c[o+32>>2]|0;w=+f[o+364>>2];j=+f[m+4>>2];x=+f[o+364+16>>2];p=+f[m+8>>2];y=+f[o+364+32>>2];q=+f[m+12>>2];z=+f[o+364+4>>2];A=+f[o+364+20>>2];B=+f[o+364+36>>2];C=+f[o+364+8>>2];aa=+f[o+364+24>>2];ca=+f[o+364+40>>2];r=+f[m+20>>2];s=+f[m+24>>2];t=+f[m+28>>2];$=+f[m+36>>2];ba=+f[m+40>>2];da=+f[m+44>>2];g=+f[o+364+48>>2];i=+f[o+364+52>>2];ha=+f[o+364+56>>2];fa=+f[m+52>>2]+(j*g+p*i+q*ha);ga=r*g+s*i+t*ha+ +f[m+56>>2];ha=$*g+ba*i+da*ha+ +f[m+60>>2];f[_+112>>2]=w*j+x*p+y*q;f[S>>2]=j*z+p*A+q*B;f[T>>2]=j*C+p*aa+q*ca;f[_+112+12>>2]=0.0;f[U>>2]=w*r+x*s+y*t;f[V>>2]=z*r+A*s+B*t;f[O>>2]=C*r+aa*s+ca*t;f[_+112+28>>2]=0.0;f[P>>2]=w*$+x*ba+y*da;f[Q>>2]=z*$+A*ba+B*da;f[R>>2]=C*$+aa*ba+ca*da;f[_+112+44>>2]=0.0;f[W>>2]=fa;f[X>>2]=ga;f[Z>>2]=ha;f[_+112+60>>2]=0.0}if(n){Qj(_+96|0,o,6.0868353843688965,D);ca=+f[_+96>>2];da=+f[_+96+4>>2];fa=+f[_+96+8>>2];ga=ca*+f[U>>2]+da*+f[V>>2]+fa*+f[O>>2]+ +f[X>>2];ha=ca*+f[P>>2]+da*+f[Q>>2]+fa*+f[R>>2]+ +f[Z>>2];f[_+96>>2]=ca*+f[_+112>>2]+da*+f[S>>2]+fa*+f[T>>2]+ +f[W>>2];f[_+96+4>>2]=ga;f[_+96+8>>2]=ha;f[_+96+12>>2]=0.0;e=0;do{Qj(_+80|0,o,+(e|0)*6.283185005187988*.03125,D);ca=+f[_+80>>2];da=+f[_+80+4>>2];fa=+f[_+80+8>>2];ga=ca*+f[U>>2]+da*+f[V>>2]+fa*+f[O>>2]+ +f[X>>2];ha=ca*+f[P>>2]+da*+f[Q>>2]+fa*+f[R>>2]+ +f[Z>>2];f[_+80>>2]=ca*+f[_+112>>2]+da*+f[S>>2]+fa*+f[T>>2]+ +f[W>>2];f[_+80+4>>2]=ga;f[_+80+8>>2]=ha;f[_+80+12>>2]=0.0;n=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;m=c[(c[n>>2]|0)+8>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;Pa[m&127](n,_+96|0,_+80|0,_+64|0);if(!(e&3)){n=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;m=c[(c[n>>2]|0)+8>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;Pa[m&127](n,N,_+80|0,_+64|0)}c[_+96>>2]=c[_+80>>2];c[_+96+4>>2]=c[_+80+4>>2];c[_+96+8>>2]=c[_+80+8>>2];c[_+96+12>>2]=c[_+80+12>>2];e=e+1|0}while((e|0)!=32);B=+f[o+452>>2];C=+f[o+512>>2];e=c[o+32>>2]|0;if(+f[e+344>>2]>0.0){ca=+f[o+364>>2];da=+f[e+4>>2];fa=+f[o+364+16>>2];ga=+f[e+8>>2];ha=+f[o+364+32>>2];A=+f[e+12>>2];aa=+f[o+364+4>>2];ba=+f[o+364+20>>2];z=+f[o+364+36>>2];ia=+f[o+364+8>>2];$=+f[o+364+24>>2];y=+f[o+364+40>>2];ka=+f[e+20>>2];ja=+f[e+24>>2];x=+f[e+28>>2];w=+f[e+36>>2];t=+f[e+40>>2];s=+f[e+44>>2];q=+f[o+364+48>>2];j=+f[o+364+52>>2];p=+f[o+364+56>>2];g=w*q+t*j;i=da*q+ga*j+A*p;j=ka*q+ja*j+x*p;p=s*p;q=ia*w+$*t+y*s;r=aa*w+ba*t+z*s;s=ca*w+fa*t+ha*s;t=ia*ka+$*ja+y*x;w=aa*ka+ba*ja+z*x;x=ca*ka+fa*ja+ha*x;y=da*ia+ga*$+A*y;z=da*aa+ga*ba+A*z;A=ca*da+fa*ga+ha*A}else{e=c[o+28>>2]|0;ga=+f[o+300>>2];ha=+f[e+4>>2];ia=+f[o+300+16>>2];ja=+f[e+8>>2];ka=+f[o+300+32>>2];A=+f[e+12>>2];da=+f[o+300+4>>2];fa=+f[o+300+20>>2];z=+f[o+300+36>>2];ba=+f[o+300+8>>2];ca=+f[o+300+24>>2];y=+f[o+300+40>>2];$=+f[e+20>>2];aa=+f[e+24>>2];x=+f[e+28>>2];w=+f[e+36>>2];t=+f[e+40>>2];s=+f[e+44>>2];q=+f[o+300+48>>2];j=+f[o+300+52>>2];p=+f[o+300+56>>2];g=w*q+t*j;i=ha*q+ja*j+A*p;j=$*q+aa*j+x*p;p=s*p;q=ba*w+ca*t+y*s;r=da*w+fa*t+z*s;s=ga*w+ia*t+ka*s;t=ba*$+ca*aa+y*x;w=da*$+fa*aa+z*x;x=ga*$+ia*aa+ka*x;y=ha*ba+ja*ca+A*y;z=ha*da+ja*fa+A*z;A=ga*ha+ia*ja+ka*A}ia=+f[e+52>>2]+i;ja=j+ +f[e+56>>2];ka=g+p+ +f[e+60>>2];f[_+112>>2]=A;f[S>>2]=z;f[T>>2]=y;f[_+112+12>>2]=0.0;f[U>>2]=x;f[V>>2]=w;f[O>>2]=t;f[_+112+28>>2]=0.0;f[P>>2]=s;f[Q>>2]=r;f[R>>2]=q;f[_+112+44>>2]=0.0;f[W>>2]=ia;f[X>>2]=ja;f[Z>>2]=ka;f[_+112+60>>2]=0.0;c[_+80>>2]=c[N>>2];c[_+80+4>>2]=c[N+4>>2];c[_+80+8>>2]=c[N+8>>2];c[_+80+12>>2]=c[N+12>>2];f[_+64>>2]=A;f[_+64+4>>2]=x;f[_+64+8>>2]=s;f[_+64+12>>2]=0.0;f[_+48>>2]=z;f[_+48+4>>2]=w;f[_+48+8>>2]=r;f[_+48+12>>2]=0.0;o=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=c[(c[o>>2]|0)+60>>2]|0;c[_+32>>2]=0;c[_+32+4>>2]=0;c[_+32+8>>2]=0;c[_+32+12>>2]=0;Sa[n&1](o,_+80|0,_+64|0,_+48|0,D,D,-C-B,B-C,_+32|0,1,10.0)}break a}case 6:case 9:{c[_+112>>2]=c[o+1064>>2];c[_+112+4>>2]=c[o+1064+4>>2];c[_+112+8>>2]=c[o+1064+8>>2];c[_+112+12>>2]=c[o+1064+12>>2];l=o+1064+16|0;c[J>>2]=c[l>>2];c[J+4>>2]=c[l+4>>2];c[J+8>>2]=c[l+8>>2];c[J+12>>2]=c[l+12>>2];k=o+1064+32|0;c[G>>2]=c[k>>2];c[G+4>>2]=c[k+4>>2];c[G+8>>2]=c[k+8>>2];c[G+12>>2]=c[k+12>>2];m=o+1064+48|0;c[M>>2]=c[m>>2];c[M+4>>2]=c[m+4>>2];c[M+8>>2]=c[m+8>>2];c[M+12>>2]=c[m+12>>2];if(e){e=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[e>>2]|0)+56>>2]&7](e,_+112|0,D);c[_+112>>2]=c[o+1128>>2];c[_+112+4>>2]=c[o+1128+4>>2];c[_+112+8>>2]=c[o+1128+8>>2];c[_+112+12>>2]=c[o+1128+12>>2];c[J>>2]=c[o+1128+16>>2];c[J+4>>2]=c[o+1128+16+4>>2];c[J+8>>2]=c[o+1128+16+8>>2];c[J+12>>2]=c[o+1128+16+12>>2];c[G>>2]=c[o+1128+32>>2];c[G+4>>2]=c[o+1128+32+4>>2];c[G+8>>2]=c[o+1128+32+8>>2];c[G+12>>2]=c[o+1128+32+12>>2];c[M>>2]=c[o+1128+48>>2];c[M+4>>2]=c[o+1128+48+4>>2];c[M+8>>2]=c[o+1128+48+8>>2];c[M+12>>2]=c[o+1128+48+12>>2];e=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[e>>2]|0)+56>>2]&7](e,_+112|0,D)}else{c[_+112>>2]=c[o+1128>>2];c[_+112+4>>2]=c[o+1128+4>>2];c[_+112+8>>2]=c[o+1128+8>>2];c[_+112+12>>2]=c[o+1128+12>>2];c[J>>2]=c[o+1128+16>>2];c[J+4>>2]=c[o+1128+16+4>>2];c[J+8>>2]=c[o+1128+16+8>>2];c[J+12>>2]=c[o+1128+16+12>>2];c[G>>2]=c[o+1128+32>>2];c[G+4>>2]=c[o+1128+32+4>>2];c[G+8>>2]=c[o+1128+32+8>>2];c[G+12>>2]=c[o+1128+32+12>>2];c[M>>2]=c[o+1128+48>>2];c[M+4>>2]=c[o+1128+48+4>>2];c[M+8>>2]=c[o+1128+48+8>>2];c[M+12>>2]=c[o+1128+48+12>>2]}if(n){c[_+112>>2]=c[o+1064>>2];c[_+112+4>>2]=c[o+1064+4>>2];c[_+112+8>>2]=c[o+1064+8>>2];c[_+112+12>>2]=c[o+1064+12>>2];c[J>>2]=c[l>>2];c[J+4>>2]=c[l+4>>2];c[J+8>>2]=c[l+8>>2];c[J+12>>2]=c[l+12>>2];c[G>>2]=c[k>>2];c[G+4>>2]=c[k+4>>2];c[G+8>>2]=c[k+8>>2];c[G+12>>2]=c[k+12>>2];c[M>>2]=c[m>>2];c[M+4>>2]=c[m+4>>2];c[M+8>>2]=c[m+8>>2];c[M+12>>2]=c[m+12>>2];e=o+1128+48|0;c[_+96>>2]=c[_+112+8>>2];c[_+96+4>>2]=c[_+112+24>>2];c[_+96+8>>2]=c[_+112+40>>2];f[_+96+12>>2]=0.0;c[_+80>>2]=c[_+112>>2];c[_+80+4>>2]=c[_+112+16>>2];c[_+80+8>>2]=c[_+112+32>>2];f[_+80+12>>2]=0.0;ga=+f[o+932>>2];g=+f[o+932+4>>2];ja=+f[o+996>>2];ia=+f[o+996+4>>2];la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=c[(c[la>>2]|0)+64>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;Ra[n&1](la,e,_+96|0,_+80|0,D*.8999999761581421,ga,g,ja,ia,_+64|0,10.0,1);la=c[_+112+20>>2]|0;n=c[_+112+36>>2]|0;c[_+80>>2]=c[_+112+4>>2];c[_+80+4>>2]=la;c[_+80+8>>2]=n;f[_+80+12>>2]=0.0;ia=+f[o+1196>>2];ja=+f[o+1200>>2];g=+u(+ia);ia=+v(+ia);ga=+u(+ja);ja=+v(+ja);ha=+f[_+80>>2];ka=+f[_+80+4>>2];i=+f[_+80+8>>2];f[_+64>>2]=g*ga*ha+g*ja*ka-ia*i;f[_+64+4>>2]=ga*ka-ja*ha;f[_+64+8>>2]=ia*ga*ha+ia*ja*ka+g*i;c[_+112>>2]=c[o+1128>>2];c[_+112+4>>2]=c[o+1128+4>>2];c[_+112+8>>2]=c[o+1128+8>>2];c[_+112+12>>2]=c[o+1128+12>>2];c[J>>2]=c[o+1128+16>>2];c[J+4>>2]=c[o+1128+16+4>>2];c[J+8>>2]=c[o+1128+16+8>>2];c[J+12>>2]=c[o+1128+16+12>>2];c[G>>2]=c[o+1128+32>>2];c[G+4>>2]=c[o+1128+32+4>>2];c[G+8>>2]=c[o+1128+32+8>>2];c[G+12>>2]=c[o+1128+32+12>>2];c[M>>2]=c[e>>2];c[M+4>>2]=c[e+4>>2];c[M+8>>2]=c[e+8>>2];c[M+12>>2]=c[e+12>>2];i=-+f[_+112+16>>2];g=-+f[_+112+32>>2];f[_+48>>2]=-+f[_+112>>2];f[_+48+4>>2]=i;f[_+48+8>>2]=g;f[_+48+12>>2]=0.0;g=+f[o+868>>2];i=+f[o+868+4>>2];if(!(g>i)){if(g>2]|0)+20>>2]&127](b)|0;n=c[(c[la>>2]|0)+60>>2]|0;c[_+32>>2]=0;c[_+32+4>>2]=0;c[_+32+8>>2]=0;c[_+32+12>>2]=0;Sa[n&1](la,e,_+48|0,_+64|0,D,D,g,i,_+32|0,1,10.0)}}else{la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=c[(c[la>>2]|0)+60>>2]|0;c[_+32>>2]=0;c[_+32+4>>2]=0;c[_+32+8>>2]=0;c[_+32+12>>2]=0;Sa[n&1](la,e,_+48|0,_+64|0,D,D,-3.1415927410125732,3.1415927410125732,_+32|0,0,10.0)}c[_+112>>2]=c[o+1064>>2];c[_+112+4>>2]=c[o+1064+4>>2];c[_+112+8>>2]=c[o+1064+8>>2];c[_+112+12>>2]=c[o+1064+12>>2];c[J>>2]=c[l>>2];c[J+4>>2]=c[l+4>>2];c[J+8>>2]=c[l+8>>2];c[J+12>>2]=c[l+12>>2];c[G>>2]=c[k>>2];c[G+4>>2]=c[k+4>>2];c[G+8>>2]=c[k+8>>2];c[G+12>>2]=c[k+12>>2];c[M>>2]=c[m>>2];c[M+4>>2]=c[m+4>>2];c[M+8>>2]=c[m+8>>2];c[M+12>>2]=c[m+12>>2];c[_+32>>2]=c[o+680>>2];c[_+32+4>>2]=c[o+680+4>>2];c[_+32+8>>2]=c[o+680+8>>2];c[_+32+12>>2]=c[o+680+12>>2];c[_+16>>2]=c[o+680+16>>2];c[_+16+4>>2]=c[o+680+16+4>>2];c[_+16+8>>2]=c[o+680+16+8>>2];c[_+16+12>>2]=c[o+680+16+12>>2];la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;o=c[(c[la>>2]|0)+72>>2]|0;c[_>>2]=0;c[_+4>>2]=0;c[_+8>>2]=0;c[_+12>>2]=0;Ta[o&31](la,_+32|0,_+16|0,_+112|0,_)}break a}case 7:{c[_+112>>2]=c[o+824>>2];c[_+112+4>>2]=c[o+824+4>>2];c[_+112+8>>2]=c[o+824+8>>2];c[_+112+12>>2]=c[o+824+12>>2];c[I>>2]=c[o+824+16>>2];c[I+4>>2]=c[o+824+16+4>>2];c[I+8>>2]=c[o+824+16+8>>2];c[I+12>>2]=c[o+824+16+12>>2];c[F>>2]=c[o+824+32>>2];c[F+4>>2]=c[o+824+32+4>>2];c[F+8>>2]=c[o+824+32+8>>2];c[F+12>>2]=c[o+824+32+12>>2];c[L>>2]=c[o+824+48>>2];c[L+4>>2]=c[o+824+48+4>>2];c[L+8>>2]=c[o+824+48+8>>2];c[L+12>>2]=c[o+824+48+12>>2];if(e){la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[la>>2]|0)+56>>2]&7](la,_+112|0,D);c[_+112>>2]=c[o+888>>2];c[_+112+4>>2]=c[o+888+4>>2];c[_+112+8>>2]=c[o+888+8>>2];c[_+112+12>>2]=c[o+888+12>>2];c[I>>2]=c[o+888+16>>2];c[I+4>>2]=c[o+888+16+4>>2];c[I+8>>2]=c[o+888+16+8>>2];c[I+12>>2]=c[o+888+16+12>>2];c[F>>2]=c[o+888+32>>2];c[F+4>>2]=c[o+888+32+4>>2];c[F+8>>2]=c[o+888+32+8>>2];c[F+12>>2]=c[o+888+32+12>>2];c[L>>2]=c[o+888+48>>2];c[L+4>>2]=c[o+888+48+4>>2];c[L+8>>2]=c[o+888+48+8>>2];c[L+12>>2]=c[o+888+48+12>>2];la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;Ja[c[(c[la>>2]|0)+56>>2]&7](la,_+112|0,D)}else{c[_+112>>2]=c[o+888>>2];c[_+112+4>>2]=c[o+888+4>>2];c[_+112+8>>2]=c[o+888+8>>2];c[_+112+12>>2]=c[o+888+12>>2];c[I>>2]=c[o+888+16>>2];c[I+4>>2]=c[o+888+16+4>>2];c[I+8>>2]=c[o+888+16+8>>2];c[I+12>>2]=c[o+888+16+12>>2];c[F>>2]=c[o+888+32>>2];c[F+4>>2]=c[o+888+32+4>>2];c[F+8>>2]=c[o+888+32+8>>2];c[F+12>>2]=c[o+888+32+12>>2];c[L>>2]=c[o+888+48>>2];c[L+4>>2]=c[o+888+48+4>>2];c[L+8>>2]=c[o+888+48+8>>2];c[L+12>>2]=c[o+888+48+12>>2]}if(n){ma=(a[o+180>>0]|0)==0?o+888|0:o+824|0;e=c[ma>>2]|0;m=c[ma+4>>2]|0;k=c[ma+16>>2]|0;n=c[ma+20>>2]|0;l=c[ma+32>>2]|0;la=c[ma+36>>2]|0;B=+f[ma+48>>2];ba=+f[ma+52>>2];ga=+f[ma+56>>2];ka=+f[o+184>>2];aa=(c[h>>2]=e,+f[h>>2]);$=(c[h>>2]=m,+f[h>>2])*0.0;C=+f[ma+8>>2]*0.0;fa=(c[h>>2]=k,+f[h>>2]);da=(c[h>>2]=n,+f[h>>2])*0.0;ca=+f[ma+24>>2]*0.0;ja=(c[h>>2]=l,+f[h>>2]);ia=(c[h>>2]=la,+f[h>>2])*0.0;ha=+f[ma+40>>2]*0.0;f[_+96>>2]=B+(C+($+ka*aa));f[_+96+4>>2]=ba+(ca+(da+ka*fa));f[_+96+8>>2]=ga+(ha+(ia+ka*ja));f[_+96+12>>2]=0.0;ka=+f[o+188>>2];f[_+80>>2]=B+(C+($+ka*aa));f[_+80+4>>2]=ba+(ca+(da+ka*fa));f[_+80+8>>2]=ga+(ha+(ia+ka*ja));f[_+80+12>>2]=0.0;ma=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;na=c[(c[ma>>2]|0)+8>>2]|0;c[_+64>>2]=0;c[_+64+4>>2]=0;c[_+64+8>>2]=0;c[_+64+12>>2]=0;Pa[na&127](ma,_+96|0,_+80|0,_+64|0);c[_+64>>2]=e;c[_+64+4>>2]=k;c[_+64+8>>2]=l;f[_+64+12>>2]=0.0;c[_+48>>2]=m;c[_+48+4>>2]=n;c[_+48+8>>2]=la;f[_+48+12>>2]=0.0;ja=+f[o+192>>2];ka=+f[o+196>>2];la=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0;n=c[(c[la>>2]|0)+60>>2]|0;c[_+32>>2]=0;c[_+32+4>>2]=0;c[_+32+8>>2]=0;c[_+32+12>>2]=0;Sa[n&1](la,o+888+48|0,_+64|0,_+48|0,D,D,ja,ka,_+32|0,1,10.0)}break a}default:break a}while(0)}while((E|0)>1)}if((((ra[c[(c[b>>2]|0)+20>>2]&127](b)|0?(na=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,(ra[c[(c[na>>2]|0)+48>>2]&127](na)|0)&16387|0):0)?ra[c[(c[b>>2]|0)+20>>2]&127](b)|0:0)?(na=ra[c[(c[b>>2]|0)+20>>2]&127](b)|0,ra[c[(c[na>>2]|0)+48>>2]&127](na)|0):0)?(c[b+280>>2]|0)>0:0){d=0;do{na=c[(c[b+288>>2]|0)+(d<<2)>>2]|0;Ia[c[(c[na>>2]|0)+12>>2]&127](na,c[b+72>>2]|0);d=d+1|0}while((d|0)<(c[b+280>>2]|0))}d=c[2685]|0;na=(c[d+16>>2]|0)+-1|0;c[d+16>>2]=na;if(na|0){ea=_;return}do if(c[d+4>>2]|0){Y(_+112|0,0)|0;na=c[6746]|0;f[d+8>>2]=+f[d+8>>2]+ +(((c[_+112+4>>2]|0)-(c[na+4>>2]|0)+(((c[_+112>>2]|0)-(c[na>>2]|0)|0)*1e6|0)-(c[d+12>>2]|0)|0)>>>0)/1.0e3;if(!(c[d+16>>2]|0)){d=c[2685]|0;break}else{ea=_;return}}while(0);c[2685]=c[d+20>>2];ea=_;return}function fb(b,d){b=b|0;d=+d;var e=0,g=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0.0,V=0.0,W=0.0,X=0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,fa=0.0,ga=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0;X=ea;ea=ea+240|0;e=c[b+24>>2]|0;if((e|0)<=0){ea=X;return}T=X+128+76|0;R=X+80+16|0;S=X+80+32|0;G=0;do{F=c[(c[b+32>>2]|0)+(G<<2)>>2]|0;switch(c[F+216>>2]|0){case 2:case 5:break;default:{if(a[F+924>>0]|0){a[F+924>>0]=0;g=c[F+732>>2]|0;if((g|0)>0){i=c[F+740>>2]|0;e=0;do{z=c[i+(e*52|0)+8>>2]|0;A=c[i+(e*52|0)+12>>2]|0;C=+f[z+8>>2]-+f[A+8>>2];D=+f[z+12>>2]-+f[A+12>>2];E=+f[z+16>>2]-+f[A+16>>2];E=+s(+(C*C+D*D+E*E));f[i+(e*52|0)+16>>2]=E;f[i+(e*52|0)+28>>2]=E*E;e=e+1|0}while((e|0)!=(g|0));e=0;do{f[i+(e*52|0)+24>>2]=(+f[(c[i+(e*52|0)+8>>2]|0)+88>>2]+ +f[(c[i+(e*52|0)+12>>2]|0)+88>>2])/+f[(c[i+(e*52|0)+4>>2]|0)+4>>2];e=e+1|0}while((e|0)!=(g|0))}Ze(F);e=c[F+988>>2]|0;if(e|0)Hm(F+988|0,e);e=c[F+992>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[F+992>>2]=0;c[F+996>>2]=-1;e=c[F+1020>>2]|0;if(e|0){if(a[F+1024>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[F+1020>>2]=0}a[F+1024>>0]=1;c[F+1020>>2]=0;c[F+1012>>2]=0;c[F+1016>>2]=0;c[F+1004>>2]=0;if(c[F+388>>2]&16|0){e=c[F+988>>2]|0;if(e|0)Hm(F+988|0,e);e=c[F+992>>2]|0;if(e|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[F+992>>2]=0;c[F+996>>2]=-1;e=c[F+1020>>2]|0;if(e|0){if(a[F+1024>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[e+-4>>2]|0)}c[F+1020>>2]=0}a[F+1024>>0]=1;c[F+1020>>2]=0;c[F+1012>>2]=0;c[F+1016>>2]=0;c[F+1004>>2]=0;if((c[F+752>>2]|0)>0){v=0;do{g=c[F+760>>2]|0;i=g+(v*44|0)|0;z=c[g+(v*44|0)+8>>2]|0;A=c[g+(v*44|0)+12>>2]|0;e=c[g+(v*44|0)+16>>2]|0;j=+f[z+8>>2];l=+f[z+12>>2];k=+f[z+16>>2];p=+f[z+20>>2];B=+f[A+8>>2];m=B>2];q=E>2];n=D>2];o=C>2];m=C>2];q=D>2];n=E>2];o=B>2]|0;if(!e){c[6747]=(c[6747]|0)+1;e=kb(63)|0;if(!e)e=0;else{c[(e+4+15&-16)+-4>>2]=e;e=e+4+15&-16}y=e;z=y+44|0;do{c[y>>2]=0;y=y+4|0}while((y|0)<(z|0))}else c[F+992>>2]=0;c[e+32>>2]=0;c[e+36>>2]=i;c[e+40>>2]=0;f[e>>2]=m;f[e+4>>2]=q;f[e+8>>2]=n;f[e+12>>2]=o;f[e+16>>2]=j;f[e+20>>2]=l;f[e+24>>2]=k;f[e+28>>2]=p;je(F+988|0,c[F+988>>2]|0,e);c[F+1e3>>2]=(c[F+1e3>>2]|0)+1;c[g+(v*44|0)+40>>2]=e;v=v+1|0}while((v|0)<(c[F+752>>2]|0))}}}l=+f[F+368>>2]*d;f[F+452>>2]=l;f[F+456>>2]=1.0/l;f[F+460>>2]=l*3.0;e=c[F+192>>2]|0;l=+ha[c[(c[e>>2]|0)+48>>2]&15](e);f[F+464>>2]=l;f[F+468>>2]=l*.25;e=c[F+684>>2]|0;l=+f[F+452>>2];j=+f[e+40>>2]*l;k=l*+f[e+44>>2];l=l*+f[e+48>>2];e=c[F+712>>2]|0;if((e|0)>0){g=c[F+720>>2]|0;i=0;do{if(+f[g+(i*104|0)+88>>2]>0.0){A=g+(i*104|0)+40|0;f[A>>2]=j+ +f[A>>2];A=g+(i*104|0)+44|0;f[A>>2]=k+ +f[A>>2];A=g+(i*104|0)+48|0;f[A>>2]=l+ +f[A>>2]}i=i+1|0}while((i|0)!=(e|0))}Fi(13669);n=+f[F+308>>2];o=+f[F+312>>2];v=+f[F+304>>2]>0.0?1:+f[F+300>>2]>0.0;y=c[F+712>>2]|0;if(n!=0.0|o>0.0){if((y|0)>0){e=c[F+720>>2]|0;k=+f[e+8>>2];l=+f[e+12>>2];m=+f[e+16>>2];e=c[F+752>>2]|0;if((e|0)>0){g=c[F+760>>2]|0;i=0;j=0.0;do{A=c[g+(i*44|0)+8>>2]|0;z=c[g+(i*44|0)+12>>2]|0;D=+f[z+8>>2]-k;w=+f[z+12>>2]-l;B=+f[z+16>>2]-m;z=c[g+(i*44|0)+16>>2]|0;C=+f[z+8>>2]-k;x=+f[z+12>>2]-l;E=+f[z+16>>2]-m;j=j+((+f[A+16>>2]-m)*(D*x-w*C)+((+f[A+8>>2]-k)*(w*E-B*x)+(+f[A+12>>2]-l)*(B*C-D*E)));i=i+1|0}while((i|0)!=(e|0))}else j=0.0;j=j/6.0}else j=0.0;k=n*(1.0/+r(+j));j=o*(+f[F+476>>2]-j)}else{j=0.0;k=0.0}if((y|0)>0)if(v){g=0;do{e=c[F+720>>2]|0;if(+f[e+(g*104|0)+88>>2]>0.0){Jd(F,F+1212|0,g);if(n!=0.0){C=k*+f[e+(g*104|0)+92>>2];D=C*+f[e+(g*104|0)+76>>2];E=C*+f[e+(g*104|0)+80>>2];A=e+(g*104|0)+56|0;f[A>>2]=+f[e+(g*104|0)+72>>2]*C+ +f[A>>2];A=e+(g*104|0)+60|0;f[A>>2]=D+ +f[A>>2];A=e+(g*104|0)+64|0;f[A>>2]=E+ +f[A>>2]}if(o>0.0){C=j*+f[e+(g*104|0)+92>>2];D=C*+f[e+(g*104|0)+76>>2];E=C*+f[e+(g*104|0)+80>>2];A=e+(g*104|0)+56|0;f[A>>2]=+f[e+(g*104|0)+72>>2]*C+ +f[A>>2];A=e+(g*104|0)+60|0;f[A>>2]=D+ +f[A>>2];A=e+(g*104|0)+64|0;f[A>>2]=E+ +f[A>>2]}}g=g+1|0}while((g|0)!=(y|0))}else{e=c[F+720>>2]|0;g=0;do{if(+f[e+(g*104|0)+88>>2]>0.0){if(n!=0.0){C=k*+f[e+(g*104|0)+92>>2];D=C*+f[e+(g*104|0)+76>>2];E=C*+f[e+(g*104|0)+80>>2];A=e+(g*104|0)+56|0;f[A>>2]=+f[e+(g*104|0)+72>>2]*C+ +f[A>>2];A=e+(g*104|0)+60|0;f[A>>2]=D+ +f[A>>2];A=e+(g*104|0)+64|0;f[A>>2]=E+ +f[A>>2]}if(o>0.0){C=j*+f[e+(g*104|0)+92>>2];D=C*+f[e+(g*104|0)+76>>2];E=C*+f[e+(g*104|0)+80>>2];A=e+(g*104|0)+56|0;f[A>>2]=+f[e+(g*104|0)+72>>2]*C+ +f[A>>2];A=e+(g*104|0)+60|0;f[A>>2]=D+ +f[A>>2];A=e+(g*104|0)+64|0;f[A>>2]=E+ +f[A>>2]}}g=g+1|0}while((g|0)!=(y|0))}e=c[F+752>>2]|0;if((e|0)>0){g=0;do{B=+f[F+452>>2];o=+f[F+304>>2];m=+f[F+300>>2];a:do if((o>0.0|m>0.0?(H=c[F+288>>2]|0,(H|0)>3):0)?(I=c[F+760>>2]|0,J=c[I+(g*44|0)+8>>2]|0,K=c[I+(g*44|0)+12>>2]|0,L=+f[J+40>>2],M=+f[J+44>>2],N=+f[J+48>>2],O=c[I+(g*44|0)+16>>2]|0,P=c[c[F+684>>2]>>2]|0,U=(L+ +f[K+40>>2]+ +f[O+40>>2])*.3333333432674408-+f[F+1212>>2],W=(M+ +f[K+44>>2]+ +f[O+44>>2])*.3333333432674408-+f[F+1216>>2],V=(N+ +f[K+48>>2]+ +f[O+48>>2])*.3333333432674408-+f[F+1220>>2],Q=+s(+(U*U+W*W+V*V)),U*U+W*W+V*V>1.1920928955078125e-07):0){u=U*(1.0/Q);w=W*(1.0/Q);x=V*(1.0/Q);p=+f[I+(g*44|0)+20>>2];q=+f[I+(g*44|0)+24>>2];t=+f[I+(g*44|0)+28>>2];switch(H|0){case 5:break;case 4:case 6:{j=U*p+W*q+V*t<0.0?-1.0:1.0;if(!(V*(t*j)+(U*(p*j)+W*(q*j))>0.0))break a;n=-((U*U+W*W+V*V)*((V*(t*j)+(U*(p*j)+W*(q*j)))*+f[I+(g*44|0)+36>>2])*(c[h>>2]=P,+f[h>>2]));u=(u*(m*n)+(p*j*(o*n)+0.0))*.3333333432674408;p=(w*(m*n)+(q*j*(o*n)+0.0))*.3333333432674408;o=(x*(m*n)+(t*j*(o*n)+0.0))*.3333333432674408;n=1.0/+s(+(o*o+(u*u+p*p)));j=B*+f[J+88>>2];if(o*j*(o*j)+(u*j*(u*j)+p*j*(p*j))>L*L+M*M+N*N){f[J+56>>2]=+f[J+56>>2]-1.0/j*(u*n*(u*n*L+p*n*M+o*n*N));f[J+60>>2]=+f[J+60>>2]-1.0/j*(p*n*(u*n*L+p*n*M+o*n*N));f[J+64>>2]=+f[J+64>>2]-1.0/j*(o*n*(u*n*L+p*n*M+o*n*N))}else{f[J+56>>2]=u+ +f[J+56>>2];f[J+60>>2]=p+ +f[J+60>>2];f[J+64>>2]=o+ +f[J+64>>2]}m=B*+f[K+88>>2];j=+f[K+40>>2];k=+f[K+44>>2];l=+f[K+48>>2];if(o*m*(o*m)+(u*m*(u*m)+p*m*(p*m))>j*j+k*k+l*l){f[K+56>>2]=+f[K+56>>2]-1.0/m*(u*n*(u*n*j+p*n*k+o*n*l));f[K+60>>2]=+f[K+60>>2]-1.0/m*(p*n*(u*n*j+p*n*k+o*n*l));f[K+64>>2]=+f[K+64>>2]-1.0/m*(o*n*(u*n*j+p*n*k+o*n*l))}else{f[K+56>>2]=u+ +f[K+56>>2];f[K+60>>2]=p+ +f[K+60>>2];f[K+64>>2]=o+ +f[K+64>>2]}m=B*+f[O+88>>2];j=+f[O+40>>2];k=+f[O+44>>2];l=+f[O+48>>2];if(o*m*(o*m)+(u*m*(u*m)+p*m*(p*m))>j*j+k*k+l*l){f[O+56>>2]=+f[O+56>>2]-1.0/m*(u*n*(u*n*j+p*n*k+o*n*l));f[O+60>>2]=+f[O+60>>2]-1.0/m*(p*n*(u*n*j+p*n*k+o*n*l));f[O+64>>2]=+f[O+64>>2]-1.0/m*(o*n*(u*n*j+p*n*k+o*n*l));break a}else{f[O+56>>2]=u+ +f[O+56>>2];f[O+60>>2]=p+ +f[O+60>>2];f[O+64>>2]=o+ +f[O+64>>2];break a}}default:break a}n=U*p+W*q+V*t<0.0?-1.0:1.0;k=x*(t*n)+(u*(p*n)+w*(q*n));l=+f[I+(g*44|0)+36>>2]*.5;j=(c[h>>2]=P,+f[h>>2]);m=k*((U*U+W*W+V*V)*(m*.5*j)*l);if(k>0.0&k<.9847999811172485){C=+s(+(1.0-k*k))*(o*.5*j*Q*l);D=(x*(u*(t*n)-x*(p*n))-w*(w*(p*n)-u*(q*n)))*C*.3333333432674408;E=(u*(w*(p*n)-u*(q*n))-x*(x*(q*n)-w*(t*n)))*C*.3333333432674408;C=(w*(x*(q*n)-w*(t*n))-u*(u*(t*n)-x*(p*n)))*C*.3333333432674408}else{D=0.0;E=0.0;C=0.0}j=+f[J+88>>2];if(j>0.0){j=x*m*-.3333333432674408*j*B*(x*m*-.3333333432674408*j*B)+(u*m*-.3333333432674408*j*B*(u*m*-.3333333432674408*j*B)+w*m*-.3333333432674408*j*B*(w*m*-.3333333432674408*j*B));if(j>0.0?j>=L*L+M*M+N*N:0){j=+s(+(L*L+M*M+N*N))/+s(+j)*.800000011920929;l=u*m*-.3333333432674408*j;k=w*m*-.3333333432674408*j;j=x*m*-.3333333432674408*j}else{l=u*m*-.3333333432674408;k=w*m*-.3333333432674408;j=x*m*-.3333333432674408}x=k+ +f[J+60>>2];B=j+ +f[J+64>>2];f[J+56>>2]=D+(l+ +f[J+56>>2]);f[J+60>>2]=E+x;f[J+64>>2]=C+B}else{l=u*m*-.3333333432674408;k=w*m*-.3333333432674408;j=x*m*-.3333333432674408}m=+f[K+88>>2];if(m>0.0){p=+f[F+452>>2];q=l*m*p;t=k*m*p;p=j*m*p;m=+f[K+40>>2];n=+f[K+44>>2];o=+f[K+48>>2];if(p*p+(q*q+t*t)>0.0?p*p+(q*q+t*t)>=m*m+n*n+o*o:0){B=+s(+(m*m+n*n+o*o))/+s(+(p*p+(q*q+t*t)))*.800000011920929;l=l*B;k=k*B;j=j*B}x=k+ +f[K+60>>2];B=j+ +f[K+64>>2];f[K+56>>2]=D+(l+ +f[K+56>>2]);f[K+60>>2]=E+x;f[K+64>>2]=C+B}m=+f[O+88>>2];if(m>0.0){p=+f[F+452>>2];q=l*m*p;t=k*m*p;p=j*m*p;m=+f[O+40>>2];n=+f[O+44>>2];o=+f[O+48>>2];if(p*p+(q*q+t*t)>0.0?p*p+(q*q+t*t)>=m*m+n*n+o*o:0){B=+s(+(m*m+n*n+o*o))/+s(+(p*p+(q*q+t*t)))*.800000011920929;l=l*B;k=k*B;j=j*B}x=k+ +f[O+60>>2];B=j+ +f[O+64>>2];f[O+56>>2]=D+(l+ +f[O+56>>2]);f[O+60>>2]=E+x;f[O+64>>2]=C+B}}while(0);g=g+1|0}while((g|0)!=(e|0))}e=c[2685]|0;A=(c[e+16>>2]|0)+-1|0;c[e+16>>2]=A;do if(!A){if(c[e+4>>2]|0){Y(X+128|0,0)|0;A=c[6746]|0;f[e+8>>2]=+f[e+8>>2]+ +(((c[X+128+4>>2]|0)-(c[A+4>>2]|0)+(((c[X+128>>2]|0)-(c[A>>2]|0)|0)*1e6|0)-(c[e+12>>2]|0)|0)>>>0)/1.0e3;if(c[e+16>>2]|0)break;e=c[2685]|0}c[2685]=c[e+20>>2]}while(0);e=c[F+712>>2]|0;if((e|0)>0){g=0;do{z=c[F+720>>2]|0;y=z+(g*104|0)+8|0;A=z+(g*104|0)+24|0;c[A>>2]=c[y>>2];c[A+4>>2]=c[y+4>>2];c[A+8>>2]=c[y+8>>2];c[A+12>>2]=c[y+12>>2];A=z+(g*104|0)+56|0;D=+f[z+(g*104|0)+88>>2];E=+f[F+452>>2];B=+f[A>>2]*D*E;C=D*+f[z+(g*104|0)+60>>2]*E;D=E*(D*+f[z+(g*104|0)+64>>2]);E=+f[(c[F+684>>2]|0)+12>>2]/E;B=B>E?E:B;C=C>E?E:C;D=D>E?E:D;v=z+(g*104|0)+40|0;B=(B<-E?-E:B)+ +f[v>>2];f[v>>2]=B;v=z+(g*104|0)+44|0;C=(C<-E?-E:C)+ +f[v>>2];f[v>>2]=C;v=z+(g*104|0)+48|0;D=(D<-E?-E:D)+ +f[v>>2];f[v>>2]=D;E=+f[F+452>>2];f[y>>2]=B*E+ +f[y>>2];y=z+(g*104|0)+12|0;f[y>>2]=C*E+ +f[y>>2];z=z+(g*104|0)+16|0;f[z>>2]=D*E+ +f[z>>2];c[A>>2]=0;c[A+4>>2]=0;c[A+8>>2]=0;c[A+12>>2]=0;g=g+1|0}while((g|0)!=(e|0))}Kb(F);e=c[F+928>>2]|0;if(e){A=c[F+192>>2]|0;C=+ha[c[(c[A>>2]|0)+48>>2]&15](A);E=+f[e+4>>2]-C;D=+f[e+8>>2]-C;f[F+892>>2]=+f[e>>2]-C;f[F+896>>2]=E;f[F+900>>2]=D;f[F+904>>2]=0.0;D=C+ +f[e+20>>2];E=C+ +f[e+24>>2];f[F+908>>2]=C+ +f[e+16>>2];f[F+912>>2]=D;f[F+916>>2]=E;f[F+920>>2]=0.0;e=c[F+188>>2]|0;if(e|0){A=c[F+684>>2]|0;z=c[A+32>>2]|0;Ta[c[(c[z>>2]|0)+16>>2]&31](z,e,F+892|0,F+908|0,c[A+36>>2]|0)}}else{c[F+892>>2]=0;c[F+892+4>>2]=0;c[F+892+8>>2]=0;c[F+892+12>>2]=0;c[F+892+16>>2]=0;c[F+892+20>>2]=0;c[F+892+24>>2]=0;c[F+892+28>>2]=0}e=c[F+712>>2]|0;if((e|0)>0){g=0;do{z=c[F+720>>2]|0;D=+f[F+464>>2];B=+f[z+(g*104|0)+8>>2];E=+f[z+(g*104|0)+12>>2];C=+f[z+(g*104|0)+16>>2];f[X>>2]=B-D;f[X+4>>2]=E-D;f[X+8>>2]=C-D;f[X+12>>2]=0.0;f[X+16>>2]=D+B;f[X+20>>2]=D+E;f[X+24>>2]=D+C;f[X+28>>2]=0.0;A=c[z+(g*104|0)+96>>2]|0;C=+f[F+460>>2];D=C*+f[z+(g*104|0)+44>>2];E=C*+f[z+(g*104|0)+48>>2];f[X+128>>2]=+f[z+(g*104|0)+40>>2]*C;f[X+128+4>>2]=D;f[X+128+8>>2]=E;f[X+128+12>>2]=0.0;rg(F+928|0,A,X,X+128|0,+f[F+468>>2])|0;g=g+1|0}while((g|0)!=(e|0))}if(c[F+988>>2]|0?(c[F+752>>2]|0)>0:0){e=0;do{A=c[F+760>>2]|0;v=c[A+(e*44|0)+8>>2]|0;y=c[A+(e*44|0)+12>>2]|0;z=c[A+(e*44|0)+16>>2]|0;B=(+f[v+40>>2]+ +f[y+40>>2]+ +f[z+40>>2])*.3333333432674408;C=(+f[v+44>>2]+ +f[y+44>>2]+ +f[z+44>>2])*.3333333432674408;D=(+f[v+48>>2]+ +f[y+48>>2]+ +f[z+48>>2])*.3333333432674408;t=+f[F+464>>2];o=+f[v+8>>2];q=+f[v+12>>2];w=+f[v+16>>2];E=+f[v+20>>2];x=+f[y+8>>2];j=x>2];k=u>2];l=p>2];m=n>2];p=+f[z+12>>2];u=+f[z+16>>2];x=+f[z+20>>2];f[X>>2]=(n>2]=(p>2]=(u>2]=x>2]=t+(o>2]=t+(q>2]=t+(w>2]=E>2]|0;E=+f[F+460>>2];f[X+128>>2]=B*E;f[X+128+4>>2]=C*E;f[X+128+8>>2]=D*E;f[X+128+12>>2]=0.0;rg(F+988|0,A,X,X+128|0,+f[F+468>>2])|0;e=e+1|0}while((e|0)<(c[F+752>>2]|0))}do if(a[F+473>>0]|0){A=c[F+712>>2]|0;if((A|0)>0){e=c[F+720>>2]|0;g=c[F+512>>2]|0;k=0.0;l=0.0;j=0.0;i=0;do{E=+f[g+(i<<2)>>2];j=j+ +f[e+(i*104|0)+8>>2]*E;k=k+E*+f[e+(i*104|0)+12>>2];l=l+E*+f[e+(i*104|0)+16>>2];i=i+1|0}while((i|0)!=(A|0))}else{j=0.0;k=0.0;l=0.0}f[F+520>>2]=j;f[F+524>>2]=k;f[F+528>>2]=l;f[F+532>>2]=0.0;y=X+128+4|0;z=y+44|0;do{c[y>>2]=0;y=y+4|0}while((y|0)<(z|0));f[X+128>>2]=1.1920928955078125e-07;f[X+128+20>>2]=2.384185791015625e-07;f[X+128+40>>2]=3.5762786865234375e-07;if((A|0)>0){e=c[F+512>>2]|0;g=c[F+720>>2]|0;i=c[F+492>>2]|0;m=1.1920928955078125e-07;n=0.0;o=0.0;p=0.0;q=2.384185791015625e-07;t=0.0;u=0.0;w=0.0;x=3.5762786865234375e-07;v=0;do{D=+f[e+(v<<2)>>2];_=(+f[g+(v*104|0)+8>>2]-j)*D;Z=(+f[g+(v*104|0)+12>>2]-k)*D;D=D*(+f[g+(v*104|0)+16>>2]-l);B=+f[i+(v<<4)>>2];C=+f[i+(v<<4)+4>>2];E=+f[i+(v<<4)+8>>2];m=_*B+m;n=_*C+n;o=_*E+o;p=Z*B+p;q=Z*C+q;t=Z*E+t;u=D*B+u;w=D*C+w;x=D*E+x;v=v+1|0}while((v|0)!=(A|0));f[X+128>>2]=m;f[X+128+4>>2]=n;f[X+128+8>>2]=o;f[X+128+16>>2]=p;f[X+128+20>>2]=q;f[X+128+24>>2]=t;f[X+128+32>>2]=u;f[X+128+36>>2]=w;f[X+128+40>>2]=x}if((a[24920]|0)==0?DC(24920)|0:0){f[6392]=9.999999747378752e-05;c[6393]=16;PB(24920)}bc(X+128|0,X+80|0,X+32|0);c[F+536>>2]=c[X+80>>2];c[F+536+4>>2]=c[X+80+4>>2];c[F+536+8>>2]=c[X+80+8>>2];c[F+536+12>>2]=c[X+80+12>>2];c[F+552>>2]=c[R>>2];c[F+552+4>>2]=c[R+4>>2];c[F+552+8>>2]=c[R+8>>2];c[F+552+12>>2]=c[R+12>>2];c[F+568>>2]=c[S>>2];c[F+568+4>>2]=c[S+4>>2];c[F+568+8>>2]=c[S+8>>2];c[F+568+12>>2]=c[S+12>>2];da=+f[X+80>>2];$=+f[R>>2];C=+f[S>>2];ca=+f[X+80+4>>2];w=+f[X+80+20>>2];E=+f[X+80+36>>2];ba=+f[X+80+8>>2];x=+f[X+80+24>>2];_=+f[X+80+40>>2];q=+f[F+632>>2];t=+f[F+636>>2];u=+f[F+640>>2];la=+f[F+648>>2];ka=+f[F+652>>2];p=+f[F+656>>2];D=+f[F+664>>2];Z=+f[F+668>>2];j=+f[F+672>>2];ja=+f[X+128>>2];ia=+f[X+128+16>>2];o=+f[X+128+32>>2];m=(da*q+ca*t+ba*u)*ja+($*q+w*t+x*u)*ia+(C*q+E*t+_*u)*o;ga=+f[X+128+4>>2];fa=+f[X+128+20>>2];n=+f[X+128+36>>2];l=(da*q+ca*t+ba*u)*ga+($*q+w*t+x*u)*fa+(C*q+E*t+_*u)*n;aa=+f[X+128+8>>2];B=+f[X+128+24>>2];k=+f[X+128+40>>2];u=(da*q+ca*t+ba*u)*aa+($*q+w*t+x*u)*B+(C*q+E*t+_*u)*k;t=(da*la+ca*ka+ba*p)*ja+($*la+w*ka+x*p)*ia+(C*la+E*ka+_*p)*o;q=(da*la+ca*ka+ba*p)*ga+($*la+w*ka+x*p)*fa+(C*la+E*ka+_*p)*n;p=(da*la+ca*ka+ba*p)*aa+($*la+w*ka+x*p)*B+(C*la+E*ka+_*p)*k;o=ja*(da*D+ca*Z+ba*j)+ia*($*D+w*Z+x*j)+(C*D+E*Z+_*j)*o;n=(da*D+ca*Z+ba*j)*ga+($*D+w*Z+x*j)*fa+(C*D+E*Z+_*j)*n;k=(da*D+ca*Z+ba*j)*aa+($*D+w*Z+x*j)*B+(C*D+E*Z+_*j)*k;f[F+584>>2]=m;f[F+588>>2]=l;f[F+592>>2]=u;f[F+596>>2]=0.0;f[F+600>>2]=t;f[F+604>>2]=q;f[F+608>>2]=p;f[F+612>>2]=0.0;f[F+616>>2]=o;f[F+620>>2]=n;f[F+624>>2]=k;f[F+628>>2]=0.0;j=+f[F+364>>2];if(j>1.0){la=1.0/(u*(n*t-q*o)+(m*(q*k-p*n)+l*(p*o-k*t)))<1.0?1.0:j<1.0/(u*(n*t-q*o)+(m*(q*k-p*n)+l*(p*o-k*t)))?j:1.0/(u*(n*t-q*o)+(m*(q*k-p*n)+l*(p*o-k*t)));f[F+584>>2]=m*la;f[F+588>>2]=l*la;f[F+592>>2]=u*la;f[F+596>>2]=0.0;f[F+600>>2]=t*la;f[F+604>>2]=q*la;f[F+608>>2]=p*la;f[F+612>>2]=0.0;f[F+616>>2]=o*la;f[F+620>>2]=n*la;f[F+624>>2]=k*la;f[F+628>>2]=0.0}if(a[F+473>>0]|0){if(!(+f[F+320>>2]>0.0))break;j=+f[F+536>>2];n=+f[F+540>>2];o=+f[F+544>>2];p=+f[F+552>>2];q=+f[F+556>>2];t=+f[F+560>>2];k=+f[F+568>>2];l=+f[F+572>>2];m=+f[F+576>>2];e=c[F+712>>2]|0;if((e|0)<=0)break;i=0;do{g=c[F+720>>2]|0;if(+f[g+(i*104|0)+88>>2]>0.0){y=c[F+492>>2]|0;fa=+f[y+(i<<4)>>2];ga=+f[y+(i<<4)+4>>2];ia=+f[y+(i<<4)+8>>2];da=+f[F+320>>2];y=g+(i*104|0)+8|0;ja=+f[y>>2];z=g+(i*104|0)+12|0;ka=+f[z>>2];A=g+(i*104|0)+16|0;la=+f[A>>2];ka=ka+da*(p*fa+q*ga+t*ia+ +f[F+524>>2]-ka);la=la+da*(k*fa+l*ga+m*ia+ +f[F+528>>2]-la);f[y>>2]=ja+da*(+f[F+520>>2]+(j*fa+n*ga+o*ia)-ja);f[z>>2]=ka;f[A>>2]=la;f[g+(i*104|0)+20>>2]=0.0}i=i+1|0}while((i|0)!=(e|0))}}while(0);y=X+128|0;z=y+104|0;do{c[y>>2]=0;y=y+4|0}while((y|0)<(z|0));e=c[F+812>>2]|0;if((e|0)<0){if((c[F+816>>2]|0)<0){g=c[F+820>>2]|0;if(g|0){if(a[F+824>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[F+820>>2]=0}a[F+824>>0]=1;c[F+820>>2]=0;c[F+816>>2]=0}do{A=c[F+820>>2]|0;z=A+(e*104|0)|0;c[z>>2]=c[X+128>>2];c[z+4>>2]=c[X+128+4>>2];c[z+8>>2]=c[X+128+8>>2];c[z+12>>2]=c[X+128+12>>2];c[z+16>>2]=c[X+128+16>>2];c[z+20>>2]=c[X+128+20>>2];c[z+24>>2]=c[X+128+24>>2];z=A+(e*104|0)+28|0;c[z>>2]=c[X+128+28>>2];c[z+4>>2]=c[X+128+28+4>>2];c[z+8>>2]=c[X+128+28+8>>2];c[z+12>>2]=c[X+128+28+12>>2];z=A+(e*104|0)+44|0;c[z>>2]=c[X+128+44>>2];c[z+4>>2]=c[X+128+44+4>>2];c[z+8>>2]=c[X+128+44+8>>2];c[z+12>>2]=c[X+128+44+12>>2];z=A+(e*104|0)+60|0;c[z>>2]=c[X+128+60>>2];c[z+4>>2]=c[X+128+60+4>>2];c[z+8>>2]=c[X+128+60+8>>2];c[z+12>>2]=c[X+128+60+12>>2];A=A+(e*104|0)+76|0;c[A>>2]=c[T>>2];c[A+4>>2]=c[T+4>>2];c[A+8>>2]=c[T+8>>2];c[A+12>>2]=c[T+12>>2];c[A+16>>2]=c[T+16>>2];c[A+20>>2]=c[T+20>>2];c[A+24>>2]=c[T+24>>2];e=e+1|0}while((e|0)!=0)}c[F+812>>2]=0;y=X+128|0;z=y+56|0;do{c[y>>2]=0;y=y+4|0}while((y|0)<(z|0));e=c[F+832>>2]|0;if((e|0)<0){if((c[F+836>>2]|0)<0){g=c[F+840>>2]|0;if(g|0){if(a[F+844>>0]|0){c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0)}c[F+840>>2]=0}a[F+844>>0]=1;c[F+840>>2]=0;c[F+836>>2]=0}do{y=(c[F+840>>2]|0)+(e*56|0)|0;g=X+128|0;z=y+56|0;do{c[y>>2]=c[g>>2];y=y+4|0;g=g+4|0}while((y|0)<(z|0));e=e+1|0}while((e|0)!=0)}c[F+832>>2]=0;lf(F+928|0,1);lf(F+988|0,1);lf(F+1048|0,1);e=c[b+24>>2]|0}}G=G+1|0}while((G|0)<(e|0));ea=X;return}function gb(b,e,f){b=b|0;e=e|0;f=f|0;var 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,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;ie(b,e,f)|0;F=c[b+872>>2]|0;c[e+292>>2]=F;if(F){F=ta[c[(c[f>>2]|0)+28>>2]&31](f,b+868|0)|0;c[e+260>>2]=F;if(F|0){h=c[e+292>>2]|0;m=va[c[(c[f>>2]|0)+16>>2]&63](f,4,h)|0;if((h|0)>0){k=0;l=c[m+8>>2]|0;while(1){i=c[(c[b+880>>2]|0)+(k<<2)>>2]|0;if(!i){g=0;j=0}else{g=i;j=ta[c[(c[f>>2]|0)+28>>2]&31](f,i)|0}c[l>>2]=j;if(!(ta[c[(c[f>>2]|0)+24>>2]&31](f,g)|0)){F=va[c[(c[f>>2]|0)+16>>2]&63](f,16,1)|0;E=c[F+8>>2]|0;c[E+12>>2]=c[i+16>>2];c[E+4>>2]=c[i+8>>2];c[E>>2]=c[i+4>>2];c[E+8>>2]=c[i+12>>2];Ta[c[(c[f>>2]|0)+20>>2]&31](f,F,13324,1414349395,g)}k=k+1|0;if((k|0)>=(h|0)){g=f;break}else l=l+4|0}}else g=f;Ta[c[(c[g>>2]|0)+20>>2]&31](f,m,13324,1497453121,b+868|0)}}else c[e+260>>2]=0;F=c[b+712>>2]|0;c[e+296>>2]=F;if(F){F=ta[c[(c[f>>2]|0)+28>>2]&31](f,b+708|0)|0;c[e+264>>2]=F;if(!F){x=0;h=0;i=0;j=0;k=0}else{C=c[e+296>>2]|0;F=va[c[(c[f>>2]|0)+16>>2]&63](f,100,C)|0;if((C|0)>0){n=0;u=0;D=0;p=0;t=0;s=0;g=0;h=0;A=0;y=0;x=0;i=0;B=0;j=0;k=0;E=c[F+8>>2]|0;while(1){l=c[b+720>>2]|0;c[E+52>>2]=c[l+(D*104|0)+56>>2];c[E+56>>2]=c[l+(D*104|0)+60>>2];c[E+60>>2]=c[l+(D*104|0)+64>>2];c[E+64>>2]=c[l+(D*104|0)+68>>2];c[E+88>>2]=c[l+(D*104|0)+92>>2];m=a[l+(D*104|0)+100>>0]<<7&255;c[E+92>>2]=(7?m<<24>>24>>7:m<<24>>24)<<24>>24;c[E+84>>2]=c[l+(D*104|0)+88>>2];m=c[l+(D*104|0)+4>>2]|0;if(!m)m=0;else{m=ta[c[(c[f>>2]|0)+28>>2]&31](f,m)|0;l=c[b+720>>2]|0}c[E>>2]=m;r=l+(D*104|0)|0;c[E+68>>2]=c[l+(D*104|0)+72>>2];c[E+72>>2]=c[l+(D*104|0)+76>>2];c[E+76>>2]=c[l+(D*104|0)+80>>2];c[E+80>>2]=c[l+(D*104|0)+84>>2];c[E+4>>2]=c[l+(D*104|0)+8>>2];c[E+8>>2]=c[l+(D*104|0)+12>>2];c[E+12>>2]=c[l+(D*104|0)+16>>2];c[E+16>>2]=c[l+(D*104|0)+20>>2];c[E+20>>2]=c[l+(D*104|0)+24>>2];c[E+24>>2]=c[l+(D*104|0)+28>>2];c[E+28>>2]=c[l+(D*104|0)+32>>2];c[E+32>>2]=c[l+(D*104|0)+36>>2];c[E+36>>2]=c[l+(D*104|0)+40>>2];c[E+40>>2]=c[l+(D*104|0)+44>>2];c[E+44>>2]=c[l+(D*104|0)+48>>2];c[E+48>>2]=c[l+(D*104|0)+52>>2];v=((10?r+~(r<<15)>>10:r+~(r<<15)|0)^r+~(r<<15))*9|0;v=(6?v>>6:v)^v;v=(16?v+~(v<<11)>>16:v+~(v<<11)|0)^v+~(v<<11);q=v&j+-1;a:do if(q>>>0>>0?(I=c[h+(q<<2)>>2]|0,(I|0)!=-1):0){l=I;while(1){if((c[g+(l<<3)>>2]|0)==(r|0))break;l=c[i+(l<<2)>>2]|0;if((l|0)==-1){J=27;break a}}c[k+(l<<2)>>2]=D;o=u;r=A;l=y;m=x;q=B}else J=27;while(0);if((J|0)==27){J=0;do if((B|0)==(j|0)){m=(j|0)==0?1:j<<1;if((j|0)<(m|0)){if((m|0)!=0?(c[6747]=(c[6747]|0)+1,G=kb((m<<2|3)+16|0)|0,(G|0)!=0):0){c[(G+4+15&-16)+-4>>2]=G;o=G+4+15&-16}else o=0;if((j|0)<=0){if(!k){l=j;z=m;k=o;break}}else{l=0;do{c[o+(l<<2)>>2]=c[k+(l<<2)>>2];l=l+1|0}while((l|0)!=(j|0))}c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0);l=j;z=m;k=o}else{l=j;z=j}}else{l=B;z=j}while(0);c[k+(l<<2)>>2]=D;w=B+1|0;do if((t|0)==(s|0)){l=(t|0)==0?1:t<<1;if((t|0)<(l|0)){if((l|0)!=0?(c[6747]=(c[6747]|0)+1,H=kb((l<<3|3)+16|0)|0,(H|0)!=0):0){c[(H+4+15&-16)+-4>>2]=H;o=H+4+15&-16}else o=0;if((t|0)<=0){if(!g){s=l;g=o;break}}else{m=0;do{L=g+(m<<3)|0;K=c[L+4>>2]|0;s=o+(m<<3)|0;c[s>>2]=c[L>>2];c[s+4>>2]=K;m=m+1|0}while((m|0)!=(t|0))}c[6748]=(c[6748]|0)+1;uc(c[g+-4>>2]|0);s=l;g=o}else s=t}while(0);c[g+(t<<3)>>2]=r;t=t+1|0;if((j|0)<(z|0)){if((A|0)<(z|0)){do if((p|0)<(z|0)){do if(!z)l=0;else{c[6747]=(c[6747]|0)+1;j=kb((z<<2|3)+16|0)|0;if(!j){l=0;break}c[(j+4+15&-16)+-4>>2]=j;l=j+4+15&-16}while(0);if((A|0)<=0){if(!h){q=l;p=z;h=l;break}}else{j=0;do{c[l+(j<<2)>>2]=c[h+(j<<2)>>2];j=j+1|0}while((j|0)!=(A|0))}c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);q=l;p=z;h=l}else q=u;while(0);o=z<<2;hk(h+(A<<2)|0,0,o-(A<<2)|0)|0;if((y|0)<(z|0)){do if((x|0)<(z|0)){do if(!z)l=0;else{c[6747]=(c[6747]|0)+1;j=kb((o|3)+16|0)|0;if(!j){l=0;break}c[(j+4+15&-16)+-4>>2]=j;l=j+4+15&-16}while(0);if((y|0)<=0){if(!i){j=l;m=z;i=l;break}}else{j=0;do{c[l+(j<<2)>>2]=c[i+(j<<2)>>2];j=j+1|0}while((j|0)!=(y|0))}c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0);j=l;m=z;i=l}else{j=n;m=x}while(0);hk(i+(y<<2)|0,0,o-(y<<2)|0)|0;n=j}else m=x;if((z|0)>0){hk(q|0,-1,o|0)|0;hk(n|0,-1,o|0)|0}if((A|0)>0){l=z+-1|0;j=0;do{L=c[g+(j<<3)>>2]|0;L=((10?L+~(L<<15)>>10:L+~(L<<15)|0)^L+~(L<<15))*9|0;L=(6?L>>6:L)^L;L=h+((((16?L+~(L<<11)>>16:L+~(L<<11)|0)^L+~(L<<11))&l)<<2)|0;c[i+(j<<2)>>2]=c[L>>2];c[L>>2]=j;j=j+1|0}while((j|0)!=(A|0));o=q;j=z;l=z}else{o=q;j=z;l=z}}else{o=u;j=A;l=y;m=x}q=v&z+-1}else{o=u;j=A;l=y;m=x}r=h+(q<<2)|0;c[i+(B<<2)>>2]=c[r>>2];c[r>>2]=B;r=j;q=w;j=z}D=D+1|0;if((D|0)>=(C|0))break;else{u=o;A=r;y=l;x=m;B=q;E=E+100|0}}}else{g=0;h=0;i=0;j=0;k=0}Ta[c[(c[f>>2]|0)+20>>2]&31](f,F,13345,1145979475,b+708|0);x=g}}else{c[e+264>>2]=0;x=0;h=0;i=0;j=0;k=0}L=c[b+732>>2]|0;c[e+300>>2]=L;if(L){L=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[b+740>>2]|0)|0;c[e+268>>2]=L;if(L|0){n=c[e+300>>2]|0;q=va[c[(c[f>>2]|0)+16>>2]&63](f,20,n)|0;if((n|0)>0){g=c[b+740>>2]|0;m=g;o=0;p=c[q+8>>2]|0;while(1){l=a[m+(o*52|0)+20>>0]<<7&255;c[p+16>>2]=(7?l<<24>>24>>7:l<<24>>24)<<24>>24;l=c[m+(o*52|0)+4>>2]|0;if(!l)l=0;else{l=ta[c[(c[f>>2]|0)+28>>2]&31](f,l)|0;g=c[b+740>>2]|0;m=g}c[p>>2]=l;l=c[m+(o*52|0)+8>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+4>>2]=l;l=c[m+(o*52|0)+12>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+8>>2]=l;c[p+12>>2]=c[m+(o*52|0)+16>>2];o=o+1|0;if((o|0)>=(n|0))break;else p=p+20|0}}else g=c[b+740>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,q,13362,1497453121,g)}}else c[e+268>>2]=0;L=c[b+752>>2]|0;c[e+304>>2]=L;if(L){L=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[b+760>>2]|0)|0;c[e+272>>2]=L;if(L|0){n=c[e+304>>2]|0;q=va[c[(c[f>>2]|0)+16>>2]&63](f,36,n)|0;if((n|0)>0){g=c[b+760>>2]|0;m=g;o=0;p=c[q+8>>2]|0;while(1){l=c[m+(o*44|0)+4>>2]|0;if(!l)l=0;else{l=ta[c[(c[f>>2]|0)+28>>2]&31](f,l)|0;g=c[b+760>>2]|0;m=g}c[p+16>>2]=l;c[p>>2]=c[m+(o*44|0)+20>>2];c[p+4>>2]=c[m+(o*44|0)+24>>2];c[p+8>>2]=c[m+(o*44|0)+28>>2];c[p+12>>2]=c[m+(o*44|0)+32>>2];l=c[m+(o*44|0)+8>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+20>>2]=l;l=c[m+(o*44|0)+12>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+24>>2]=l;l=c[m+(o*44|0)+16>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+28>>2]=l;c[p+32>>2]=c[m+(o*44|0)+36>>2];o=o+1|0;if((o|0)>=(n|0))break;else p=p+36|0}}else g=c[b+760>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,q,13379,1497453121,g)}}else c[e+272>>2]=0;L=c[b+772>>2]|0;c[e+308>>2]=L;if(L){L=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[b+780>>2]|0)|0;c[e+276>>2]=L;if(L|0){n=c[e+308>>2]|0;q=va[c[(c[f>>2]|0)+16>>2]&63](f,100,n)|0;if((n|0)>0){g=c[b+780>>2]|0;m=g;o=0;p=c[q+8>>2]|0;while(1){c[p>>2]=c[m+(o*104|0)+32>>2];c[p+4>>2]=c[m+(o*104|0)+36>>2];c[p+8>>2]=c[m+(o*104|0)+40>>2];c[p+12>>2]=c[m+(o*104|0)+44>>2];l=c[m+8>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+68>>2]=l;c[p+16>>2]=c[m+(o*104|0)+48>>2];c[p+20>>2]=c[m+(o*104|0)+52>>2];c[p+24>>2]=c[m+(o*104|0)+56>>2];c[p+28>>2]=c[m+(o*104|0)+60>>2];l=c[m+116>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+72>>2]=l;c[p+32>>2]=c[m+(o*104|0)+64>>2];c[p+36>>2]=c[m+(o*104|0)+68>>2];c[p+40>>2]=c[m+(o*104|0)+72>>2];c[p+44>>2]=c[m+(o*104|0)+76>>2];l=c[m+224>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+76>>2]=l;c[p+48>>2]=c[m+(o*104|0)+80>>2];c[p+52>>2]=c[m+(o*104|0)+84>>2];c[p+56>>2]=c[m+(o*104|0)+88>>2];c[p+60>>2]=c[m+(o*104|0)+92>>2];l=c[m+332>>2]|0;if(!l)l=-1;else l=(l-(c[b+720>>2]|0)|0)/104|0;c[p+80>>2]=l;c[p+88>>2]=c[m+(o*104|0)+96>>2];c[p+92>>2]=c[m+(o*104|0)+100>>2];l=c[m+(o*104|0)+4>>2]|0;if(!l)l=0;else{l=ta[c[(c[f>>2]|0)+28>>2]&31](f,l)|0;g=c[b+780>>2]|0;m=g}c[p+64>>2]=l;c[p+84>>2]=c[m+(o*104|0)+24>>2];o=o+1|0;if((o|0)>=(n|0))break;else p=p+100|0}}else g=c[b+780>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,q,13396,1497453121,g)}}else c[e+276>>2]=0;L=c[b+792>>2]|0;c[e+312>>2]=L;if(L){L=ta[c[(c[f>>2]|0)+28>>2]&31](f,c[b+800>>2]|0)|0;c[e+280>>2]=L;if(!L)w=f;else{m=c[e+312>>2]|0;n=va[c[(c[f>>2]|0)+16>>2]&63](f,92,m)|0;if((m|0)>0){o=0;p=c[n+8>>2]|0;while(1){l=c[b+800>>2]|0;c[p>>2]=c[l+(o*96|0)+28>>2];c[p+4>>2]=c[l+(o*96|0)+32>>2];c[p+8>>2]=c[l+(o*96|0)+36>>2];c[p+12>>2]=c[l+(o*96|0)+40>>2];c[p+16>>2]=c[l+(o*96|0)+44>>2];c[p+20>>2]=c[l+(o*96|0)+48>>2];c[p+24>>2]=c[l+(o*96|0)+52>>2];c[p+28>>2]=c[l+(o*96|0)+56>>2];c[p+32>>2]=c[l+(o*96|0)+60>>2];c[p+36>>2]=c[l+(o*96|0)+64>>2];c[p+40>>2]=c[l+(o*96|0)+68>>2];c[p+44>>2]=c[l+(o*96|0)+72>>2];c[p+48>>2]=c[l+(o*96|0)+76>>2];c[p+52>>2]=c[l+(o*96|0)+80>>2];c[p+56>>2]=c[l+(o*96|0)+84>>2];c[p+60>>2]=c[l+(o*96|0)+88>>2];c[p+88>>2]=c[l+(o*96|0)+92>>2];c[p+64>>2]=c[l+(o*96|0)+4>>2];c[p+68>>2]=c[l+(o*96|0)+8>>2];c[p+72>>2]=c[l+(o*96|0)+12>>2];c[p+76>>2]=c[l+(o*96|0)+16>>2];g=c[l+(o*96|0)>>2]|0;if(!g)g=-1;else g=(g-(c[b+720>>2]|0)|0)/104|0;c[p+84>>2]=g;g=c[l+(o*96|0)+20>>2]|0;if(!g)g=0;else g=ta[c[(c[f>>2]|0)+28>>2]&31](f,g)|0;c[p+80>>2]=g;o=o+1|0;if((o|0)>=(m|0))break;else p=p+92|0}}Ta[c[(c[f>>2]|0)+20>>2]&31](f,n,13414,1497453121,c[b+800>>2]|0);w=f}}else{c[e+280>>2]=0;w=f}c[e+352>>2]=c[b+316>>2];c[e+328>>2]=c[b+292>>2];c[e+344>>2]=c[b+308>>2];c[e+324>>2]=c[b+288>>2];c[e+340>>2]=c[b+304>>2];c[e+336>>2]=c[b+300>>2];c[e+412>>2]=c[b+376>>2];c[e+416>>2]=c[b+380>>2];c[e+420>>2]=c[b+384>>2];c[e+408>>2]=c[b+372>>2];q=c[b+364>>2]|0;c[e+332>>2]=c[b+296>>2];c[e+356>>2]=c[b+320>>2];c[e+424>>2]=c[b+388>>2];c[e+348>>2]=c[b+312>>2];c[e+360>>2]=c[b+324>>2];c[e+364>>2]=c[b+328>>2];c[e+368>>2]=c[b+332>>2];c[e+372>>2]=c[b+336>>2];c[e+404>>2]=c[b+368>>2];c[e+400>>2]=q;c[e+376>>2]=c[b+340>>2];c[e+380>>2]=c[b+344>>2];c[e+384>>2]=c[b+348>>2];c[e+388>>2]=c[b+352>>2];c[e+392>>2]=c[b+356>>2];c[e+396>>2]=c[b+360>>2];c[e+256>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,b+472|0)|0;q=va[c[(c[f>>2]|0)+16>>2]&63](f,192,1)|0;p=c[q+8>>2]|0;c[p+96>>2]=c[b+632>>2];c[p+100>>2]=c[b+636>>2];c[p+104>>2]=c[b+640>>2];c[p+108>>2]=c[b+644>>2];c[p+112>>2]=c[b+648>>2];c[p+116>>2]=c[b+652>>2];c[p+120>>2]=c[b+656>>2];c[p+124>>2]=c[b+660>>2];c[p+128>>2]=c[b+664>>2];c[p+132>>2]=c[b+668>>2];c[p+136>>2]=c[b+672>>2];c[p+140>>2]=c[b+676>>2];c[p+180>>2]=d[b+473>>0];c[p+176>>2]=d[b+472>>0];c[p+144>>2]=c[b+520>>2];c[p+148>>2]=c[b+524>>2];c[p+152>>2]=c[b+528>>2];c[p+156>>2]=c[b+532>>2];L=c[b+484>>2]|0;c[p+168>>2]=L;if(L){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[b+492>>2]|0)|0;l=c[p+168>>2]|0;c[p+160>>2]=L;if(l|0){o=va[c[(c[f>>2]|0)+16>>2]&63](f,16,l)|0;if((l|0)>0){g=c[b+492>>2]|0;m=0;n=c[o+8>>2]|0;while(1){c[n>>2]=c[g+(m<<4)>>2];c[n+4>>2]=c[g+(m<<4)+4>>2];c[n+8>>2]=c[g+(m<<4)+8>>2];c[n+12>>2]=c[g+(m<<4)+12>>2];m=m+1|0;if((m|0)==(l|0))break;else n=n+16|0}}else g=c[b+492>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,o,22049,1497453121,g)}}else c[p+160>>2]=0;c[p+184>>2]=c[b+476>>2];c[p>>2]=c[b+536>>2];c[p+4>>2]=c[b+540>>2];c[p+8>>2]=c[b+544>>2];c[p+12>>2]=c[b+548>>2];c[p+16>>2]=c[b+552>>2];c[p+20>>2]=c[b+556>>2];c[p+24>>2]=c[b+560>>2];c[p+28>>2]=c[b+564>>2];c[p+32>>2]=c[b+568>>2];c[p+36>>2]=c[b+572>>2];c[p+40>>2]=c[b+576>>2];c[p+44>>2]=c[b+580>>2];c[p+48>>2]=c[b+584>>2];c[p+52>>2]=c[b+588>>2];c[p+56>>2]=c[b+592>>2];c[p+60>>2]=c[b+596>>2];c[p+64>>2]=c[b+600>>2];c[p+68>>2]=c[b+604>>2];c[p+72>>2]=c[b+608>>2];c[p+76>>2]=c[b+612>>2];c[p+80>>2]=c[b+616>>2];c[p+84>>2]=c[b+620>>2];c[p+88>>2]=c[b+624>>2];c[p+92>>2]=c[b+628>>2];L=c[b+504>>2]|0;c[p+172>>2]=L;if(L){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[b+512>>2]|0)|0;n=c[p+172>>2]|0;c[p+164>>2]=L;if(n|0){o=va[c[(c[f>>2]|0)+16>>2]&63](f,4,n)|0;if((n|0)>0){g=c[b+512>>2]|0;l=0;m=c[o+8>>2]|0;while(1){c[m>>2]=c[g+(l<<2)>>2];l=l+1|0;if((l|0)==(n|0))break;else m=m+4|0}}else g=c[b+512>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,o,22387,1497453121,g)}}else c[p+164>>2]=0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,q,13434,1497453121,b+472|0);L=c[b+1112>>2]|0;c[e+316>>2]=L;if(L){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[c[b+1120>>2]>>2]|0)|0;u=c[e+316>>2]|0;c[e+284>>2]=L;if(u|0){v=va[c[(c[f>>2]|0)+16>>2]&63](f,348,u)|0;if((u|0)>0){t=j+-1|0;r=0;s=c[v+8>>2]|0;while(1){g=c[(c[b+1120>>2]|0)+(r<<2)>>2]|0;L=s+320|0;c[L>>2]=c[g+360>>2];c[s+256>>2]=c[g+332>>2];c[s+260>>2]=c[g+336>>2];c[s+264>>2]=c[g+340>>2];c[s+268>>2]=c[g+344>>2];c[s+344>>2]=c[g+380>>2];c[s+340>>2]=d[g+377>>0];c[s+160>>2]=c[g+228>>2];c[s+164>>2]=c[g+232>>2];c[s+168>>2]=c[g+236>>2];c[s+172>>2]=c[g+240>>2];c[s+336>>2]=d[g+376>>0];c[s+208>>2]=c[g+276>>2];c[s+212>>2]=c[g+280>>2];c[s+216>>2]=c[g+284>>2];c[s+220>>2]=c[g+288>>2];c[s+224>>2]=c[g+292>>2];c[s+228>>2]=c[g+296>>2];c[s+232>>2]=c[g+300>>2];c[s+236>>2]=c[g+304>>2];c[s>>2]=c[g+60>>2];c[s+4>>2]=c[g+64>>2];c[s+8>>2]=c[g+68>>2];c[s+12>>2]=c[g+72>>2];c[s+16>>2]=c[g+76>>2];c[s+20>>2]=c[g+80>>2];c[s+24>>2]=c[g+84>>2];c[s+28>>2]=c[g+88>>2];c[s+32>>2]=c[g+92>>2];c[s+36>>2]=c[g+96>>2];c[s+40>>2]=c[g+100>>2];c[s+44>>2]=c[g+104>>2];c[s+48>>2]=c[g+108>>2];c[s+52>>2]=c[g+112>>2];c[s+56>>2]=c[g+116>>2];c[s+60>>2]=c[g+120>>2];c[s+296>>2]=c[g+124>>2];c[s+300>>2]=c[g+128>>2];c[s+112>>2]=c[g+180>>2];c[s+116>>2]=c[g+184>>2];c[s+120>>2]=c[g+188>>2];c[s+124>>2]=c[g+192>>2];c[s+128>>2]=c[g+196>>2];c[s+132>>2]=c[g+200>>2];c[s+136>>2]=c[g+204>>2];c[s+140>>2]=c[g+208>>2];c[s+144>>2]=c[g+212>>2];c[s+148>>2]=c[g+216>>2];c[s+152>>2]=c[g+220>>2];c[s+156>>2]=c[g+224>>2];j=s+316|0;c[j>>2]=c[g+356>>2];c[s+64>>2]=c[g+132>>2];c[s+68>>2]=c[g+136>>2];c[s+72>>2]=c[g+140>>2];c[s+76>>2]=c[g+144>>2];c[s+80>>2]=c[g+148>>2];c[s+84>>2]=c[g+152>>2];c[s+88>>2]=c[g+156>>2];c[s+92>>2]=c[g+160>>2];c[s+96>>2]=c[g+164>>2];c[s+100>>2]=c[g+168>>2];c[s+104>>2]=c[g+172>>2];c[s+108>>2]=c[g+176>>2];c[s+240>>2]=c[g+316>>2];c[s+244>>2]=c[g+320>>2];c[s+248>>2]=c[g+324>>2];c[s+252>>2]=c[g+328>>2];c[s+324>>2]=c[g+364>>2];c[s+328>>2]=c[g+368>>2];c[s+312>>2]=c[g+352>>2];c[j>>2]=c[g+356>>2];c[L>>2]=c[g+360>>2];c[s+332>>2]=c[g+372>>2];L=c[g+44>>2]|0;j=s+284|0;c[j>>2]=L;p=s+292|0;c[p>>2]=c[g+4>>2];q=s+288|0;c[q>>2]=c[g+24>>2];c[s+304>>2]=c[g+308>>2];c[s+176>>2]=c[g+244>>2];c[s+180>>2]=c[g+248>>2];c[s+184>>2]=c[g+252>>2];c[s+188>>2]=c[g+256>>2];c[s+192>>2]=c[g+260>>2];c[s+196>>2]=c[g+264>>2];c[s+200>>2]=c[g+268>>2];c[s+204>>2]=c[g+272>>2];c[s+308>>2]=c[g+312>>2];if(L){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[g+52>>2]|0)|0;c[s+272>>2]=L;if(L|0){j=c[j>>2]|0;o=va[c[(c[f>>2]|0)+16>>2]&63](f,16,j)|0;if((j|0)>0){g=(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+52|0;l=c[g>>2]|0;m=0;n=c[o+8>>2]|0;while(1){c[n>>2]=c[l+(m<<4)>>2];c[n+4>>2]=c[l+(m<<4)+4>>2];c[n+8>>2]=c[l+(m<<4)+8>>2];c[n+12>>2]=c[l+(m<<4)+12>>2];m=m+1|0;if((m|0)==(j|0))break;else n=n+16|0}}else g=(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+52|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,o,22049,1497453121,c[g>>2]|0)}}else c[s+272>>2]=0;if(c[p>>2]|0){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+12>>2]|0)|0;c[s+280>>2]=L;if(L|0){j=c[p>>2]|0;o=va[c[(c[f>>2]|0)+16>>2]&63](f,4,j)|0;if((j|0)>0){g=(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+12|0;l=c[g>>2]|0;m=0;n=c[o+8>>2]|0;while(1){c[n>>2]=c[l+(m<<2)>>2];m=m+1|0;if((m|0)==(j|0))break;else n=n+4|0}}else g=(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+12|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,o,22387,1497453121,c[g>>2]|0)}}else c[s+280>>2]=0;if(c[q>>2]|0){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,(c[(c[b+1120>>2]|0)+(r<<2)>>2]|0)+20|0)|0;c[s+276>>2]=L;if(L|0){n=c[p>>2]|0;q=va[c[(c[f>>2]|0)+16>>2]&63](f,4,n)|0;if((n|0)>0){g=c[(c[b+1120>>2]|0)+(r<<2)>>2]|0;m=c[g+32>>2]|0;o=0;p=c[q+8>>2]|0;while(1){l=c[m+(o<<2)>>2]|0;j=((10?~(l<<15)+l>>10:~(l<<15)+l|0)^~(l<<15)+l)*9|0;j=(6?j>>6:j)^j;j=c[h+((((16?j+~(j<<11)>>16:j+~(j<<11)|0)^j+~(j<<11))&t)<<2)>>2]|0;if((c[x+(j<<3)>>2]|0)!=(l|0))do j=c[i+(j<<2)>>2]|0;while((c[x+(j<<3)>>2]|0)!=(l|0));c[p>>2]=c[k+(j<<2)>>2];o=o+1|0;if((o|0)==(n|0))break;else p=p+4|0}}else g=c[(c[b+1120>>2]|0)+(r<<2)>>2]|0;Ta[c[(c[f>>2]|0)+20>>2]&31](f,q,22383,1497453121,g+20|0)}}else c[s+276>>2]=0;r=r+1|0;if((r|0)>=(u|0))break;else s=s+348|0}}Ta[c[(c[f>>2]|0)+20>>2]&31](f,v,13451,1497453121,c[c[b+1120>>2]>>2]|0)}}else c[e+284>>2]=0;L=c[b+852>>2]|0;c[e+320>>2]=L;if(L){L=ta[c[(c[w>>2]|0)+28>>2]&31](f,c[b+860>>2]|0)|0;c[e+288>>2]=L;if(L|0){l=c[b+852>>2]|0;m=va[c[(c[f>>2]|0)+16>>2]&63](f,104,l)|0;if((l|0)>0){n=0;p=c[m+8>>2]|0;while(1){g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0;c[p+96>>2]=ra[c[(c[g>>2]|0)+20>>2]&127](g)|0;g=(c[b+860>>2]|0)+(n<<2)|0;L=c[g>>2]|0;c[p+8>>2]=c[L+28>>2];c[p+12>>2]=c[L+32>>2];c[p+16>>2]=c[L+36>>2];c[p+20>>2]=c[L+40>>2];c[p+24>>2]=c[L+44>>2];c[p+28>>2]=c[L+48>>2];c[p+32>>2]=c[L+52>>2];c[p+36>>2]=c[L+56>>2];c[p+40>>2]=c[L+60>>2];c[p+44>>2]=c[L+64>>2];c[p+48>>2]=c[L+68>>2];c[p+52>>2]=d[L+152>>0];L=p+56|0;c[p>>2]=0;o=p+4|0;c[o>>2]=0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[L+16>>2]=0;c[L+20>>2]=0;c[L+24>>2]=0;c[L+28>>2]=0;g=c[(c[g>>2]|0)+4>>2]|0;if(g|0){c[p+88>>2]=1;c[p>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,g)|0}g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0;j=c[g+12>>2]|0;if(j){c[p+88>>2]=3;c[p>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,j)|0;g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0}j=c[g+8>>2]|0;if(j){c[p+88>>2]=2;c[p>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,j)|0;g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0}j=c[g+16>>2]|0;if(j){c[p+92>>2]=1;c[o>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,j)|0;g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0}j=c[g+24>>2]|0;if(j){c[p+92>>2]=3;c[o>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,j)|0;g=c[(c[b+860>>2]|0)+(n<<2)>>2]|0}g=c[g+20>>2]|0;if(g|0){c[p+92>>2]=2;c[o>>2]=ta[c[(c[w>>2]|0)+28>>2]&31](f,g)|0}n=n+1|0;if((n|0)>=(l|0))break;else p=p+104|0}}Ta[c[(c[f>>2]|0)+20>>2]&31](f,m,13471,1497453121,c[b+860>>2]|0)}}else c[e+288>>2]=0;if(x|0){c[6748]=(c[6748]|0)+1;uc(c[x+-4>>2]|0)}if(k|0){c[6748]=(c[6748]|0)+1;uc(c[k+-4>>2]|0)}if(i|0){c[6748]=(c[6748]|0)+1;uc(c[i+-4>>2]|0)}if(!h)return 13491;c[6748]=(c[6748]|0)+1;uc(c[h+-4>>2]|0);return 13491}function hb(a,b,d,e){a=a|0;b=b|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,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,A=0,B=0,C=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;L=ea;ea=ea+144|0;a:do switch(d-b|0){case 0:{c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;ea=L;return}case 2:{f=c[(c[a+92>>2]|0)+(b<<2)>>2]|0;i=c[f+88>>2]|0;j=c[f+200>>2]|0;h=c[f+92>>2]|0;g=c[f+204>>2]|0;if((i|0)==(j|0)&(h|0)==(g|0))if((c[f+96>>2]|0)==(c[f+208>>2]|0))break a;else g=h;g=h-g|0;do if(g|i-j){c[f>>2]=f+112;c[f+4>>2]=f+112;c[f+112>>2]=f;c[f+116>>2]=f;K=(i-j|0)<0|(i-j|0)==0&(g|0)<0;c[e>>2]=K?f:f+112|0;c[e+4>>2]=K?f+112|0:f;if((g|0)<0|(i-j|0)<0&(g|0)==0){c[e+8>>2]=f;g=f+112|0;h=f;f=f+112|0;break}else{c[e+8>>2]=f+112;g=f;h=f;f=f+112|0;break}}else{K=(c[f+96>>2]|0)>(c[f+208>>2]|0);h=K?f+112|0:f;c[h>>2]=h;c[h+4>>2]=h;c[e>>2]=h;c[e+4>>2]=h;c[e+8>>2]=h;g=h;f=K?f:f+112|0}while(0);c[e+12>>2]=g;a=Ue(a,h,f)|0;c[a>>2]=a;c[a+4>>2]=a;c[h+8>>2]=a;a=c[a+8>>2]|0;c[a>>2]=a;c[a+4>>2]=a;c[f+8>>2]=a;ea=L;return}case 1:{f=c[(c[a+92>>2]|0)+(b<<2)>>2]|0;break}default:{m=((d-b|0)/2|0)+b|0;h=c[a+92>>2]|0;l=c[h+(m+-1<<2)>>2]|0;i=c[l+88>>2]|0;k=c[l+92>>2]|0;l=c[l+96>>2]|0;b:do if((m|0)<(d|0)){f=m;do{g=c[h+(f<<2)>>2]|0;if((c[g+88>>2]|0)!=(i|0))break b;if((c[g+92>>2]|0)!=(k|0))break b;if((c[g+96>>2]|0)!=(l|0))break b;f=f+1|0}while((f|0)<(d|0))}else f=m;while(0);hb(a,b,m,e);c[L+96>>2]=0;c[L+96+4>>2]=0;c[L+96+8>>2]=0;c[L+96+12>>2]=0;hb(a,f,d,L+96|0);k=c[L+96+4>>2]|0;c:do if(k|0){B=c[e+4>>2]|0;if(!B){c[e>>2]=c[L+96>>2];c[e+4>>2]=c[L+96+4>>2];c[e+8>>2]=c[L+96+8>>2];c[e+12>>2]=c[L+96+12>>2];break}c[a+100>>2]=(c[a+100>>2]|0)+-1;h=c[e+12>>2]|0;m=c[L+96+8>>2]|0;i=c[h+88>>2]|0;d:do if((i|0)==(c[m+88>>2]|0)?(j=c[h+92>>2]|0,(j|0)==(c[m+92>>2]|0)):0){l=c[m+4>>2]|0;if((l|0)==(m|0)){f=c[m+8>>2]|0;if(!f)f=m;else{f=c[f+12>>2]|0;i=c[f+88>>2]|0;j=c[f+92>>2]|0}g=h;l=f;m=f;b=i+1|0;d=c[f+96>>2]|0;break}h=c[m>>2]|0;c[l>>2]=h;c[h+4>>2]=l;if((m|0)==(c[L+96>>2]|0)){f=c[h+88>>2]|0;g=c[l+88>>2]|0;do if((f|0)<(g|0))f=h;else{if((f|0)==(g|0)?(c[h+92>>2]|0)<(c[l+92>>2]|0):0){f=h;break}f=l}while(0);c[L+96>>2]=f}if((m|0)==(k|0)){f=c[h+88>>2]|0;g=c[l+88>>2]|0;do if((f|0)<=(g|0)){if((f|0)==(g|0)?(c[h+92>>2]|0)>(c[l+92>>2]|0):0)break;c[L+96+4>>2]=l;h=l;I=39;break d}while(0);c[L+96+4>>2]=h;I=39}else{h=k;I=39}}else{h=k;I=39}while(0);if((I|0)==39){w=c[e>>2]|0;x=c[L+96>>2]|0;y=0;A=1;b=B;g=0;n=h;l=0;while(1){f=c[n+88>>2]|0;d=c[b+88>>2]|0;k=z(f-d|0,A)|0;e:do if((k|0)<=0){if((k|0)<0){v=(y|0)!=0;m=c[b+92>>2]|0;d=f;u=c[n+92>>2]|0;j=b;f=n;while(1){s=c[(v?f+4|0:f)>>2]|0;r=(s|0)==(f|0);t=f+88|0;while(1){i=j+88|0;q=u-m|0;if(!r?(C=c[s+88>>2]|0,F=z(C-d|0,A)|0,E=c[s+92>>2]|0,G=E-u|0,(G|0)>-1):0){if(!F)break;if((F|0)<0?(z(G,k)|0)<=(z(F,q)|0):0)break}p=c[(v?j+4|0:j)>>2]|0;if((p|0)==(j|0))break e;o=c[p+88>>2]|0;n=z(o-(c[i>>2]|0)|0,A)|0;b=c[p+92>>2]|0;i=b-m|0;d=c[t>>2]|0;o=z(d-o|0,A)|0;if(!((i|0)>0&(o|0)<0))break e;if(n|0){if((n|0)>=0)break e;if((z(i,k)|0)>=(z(n,q)|0))break e}m=b;k=o;j=p}d=C;u=E;k=z(C-(c[i>>2]|0)|0,A)|0;f=s}}j=c[b+92>>2]|0;m=(y|0)!=0;f=c[(m?b:b+4|0)>>2]|0;f:do if((f|0)!=(b|0))if(m){i=b;while(1){if((c[f+88>>2]|0)!=(d|0)){k=i;break f}H=j;j=c[f+92>>2]|0;if((j|0)>(H|0)){k=i;break f}i=c[f>>2]|0;if((i|0)==(b|0)){k=f;break}else{H=f;f=i;i=H}}}else{i=b;while(1){if((c[f+88>>2]|0)!=(d|0)){k=i;break f}H=j;j=c[f+92>>2]|0;if((j|0)>(H|0)){k=i;break f}i=c[f+4>>2]|0;if((i|0)==(b|0)){k=f;break}else{H=f;f=i;i=H}}}else k=b;while(0);j=c[n+92>>2]|0;f=c[(m?n+4|0:n)>>2]|0;if((f|0)!=(n|0))if(m){i=n;while(1){if((c[f+88>>2]|0)!=(d|0)){j=k;f=i;break e}H=j;j=c[f+92>>2]|0;if((j|0)<(H|0)){j=k;f=i;break e}i=c[f+4>>2]|0;if((i|0)==(n|0)){j=k;break}else{H=f;f=i;i=H}}}else{i=n;while(1){if((c[f+88>>2]|0)!=(d|0)){j=k;f=i;break e}H=j;j=c[f+92>>2]|0;if((j|0)<(H|0)){j=k;f=i;break e}i=c[f>>2]|0;if((i|0)==(n|0)){j=k;break}else{H=f;f=i;i=H}}}else{j=k;f=n}}else{s=(y|0)!=0;r=c[n+92>>2]|0;i=b;f=n;while(1){o=f+88|0;n=c[i+92>>2]|0;q=k;j=i;while(1){p=r-n|0;d=c[(s?j:j+4|0)>>2]|0;if((d|0)==(j|0))break;k=c[d+88>>2]|0;b=z(k-(c[j+88>>2]|0)|0,A)|0;m=c[d+92>>2]|0;i=m-n|0;if((i|0)>=1)break;if(b|0){if((b|0)>=0)break;if((z(i,q)|0)>(z(b,p)|0))break}n=m;q=z((c[o>>2]|0)-k|0,A)|0;j=d}b=c[(s?f:f+4|0)>>2]|0;if((b|0)==(f|0))break e;d=c[b+88>>2]|0;m=z(d-(c[o>>2]|0)|0,A)|0;k=c[b+92>>2]|0;i=k-r|0;d=z(d-(c[j+88>>2]|0)|0,A)|0;if(!((i|0)<0&(d|0)>0))break e;if(m|0){if((m|0)>=0)break e;if((z(i,q)|0)>=(z(m,p)|0))break e}r=k;k=d;i=j;f=b}}while(0);i=(y|0)==0;l=i?f:l;g=i?j:g;n=i?x:f;b=i?w:j;y=y+1|0;if((y|0)==2)break;else A=i?-1:A}c[b+4>>2]=n;c[n>>2]=b;c[g>>2]=l;c[l+4>>2]=g;if((c[x+88>>2]|0)<(c[w+88>>2]|0))c[e>>2]=x;if((c[h+88>>2]|0)>=(c[B+88>>2]|0))c[e+4>>2]=h;c[e+12>>2]=c[L+96+12>>2];h=g;H=l;i=l+88|0;B=c[i>>2]|0;r=c[g+88>>2]|0;k=l+92|0;C=c[k>>2]|0;E=c[g+92>>2]|0;j=l+96|0;F=c[j>>2]|0;s=c[g+96>>2]|0;G=((C-E|0)<0)<<31>>31;e=0-(B-r)|0;u=tv(0,0,e|0,((e|0)<0)<<31>>31|0)|0;u=Yr(u|0,D()|0,F-s|0,((F-s|0)<0)<<31>>31|0)|0;v=D()|0;w=Yr(F-s|0,((F-s|0)<0)<<31>>31|0,C-E|0,G|0)|0;x=D()|0;o=Yr(e|0,((e|0)<0)<<31>>31|0,B-r|0,((B-r|0)<0)<<31>>31|0)|0;A=D()|0;y=Yr(C-E|0,G|0,C-E|0,G|0)|0;y=tv(o|0,A|0,y|0,D()|0)|0;A=D()|0;o=c[g+8>>2]|0;c[L+120>>2]=0;if(!o)r=0;else{p=tv(0,0,C-E|0,G|0)|0;q=D()|0;t=o;f=0;do{b=c[t+12>>2]|0;m=c[b+88>>2]|0;d=c[b+92>>2]|0;b=c[b+96>>2]|0;N=Yr(d-E|0,((d-E|0)<0)<<31>>31|0,e|0,((e|0)<0)<<31>>31|0)|0;n=D()|0;M=Yr(p|0,q|0,m-r|0,((m-r|0)<0)<<31>>31|0)|0;g:do if((N|0)==(M|0)&(n|0)==(D()|0)?(M=Yr(u|0,v|0,m-r|0,((m-r|0)<0)<<31>>31|0)|0,n=D()|0,N=Yr(w|0,x|0,d-E|0,((d-E|0)<0)<<31>>31|0)|0,n=Lv(N|0,D()|0,M|0,n|0)|0,M=D()|0,N=Yr(y|0,A|0,b-s|0,((b-s|0)<0)<<31>>31|0)|0,N=Lv(n|0,M|0,N|0,D()|0)|0,M=D()|0,(M|0)>0|(M|0)==0&N>>>0>0):0){do if(f|0){n=(c[f+4>>2]|0)==(t|0);if((c[f>>2]|0)!=(t|0))if(n)break;else break g;if(!n)break g;M=c[f+12>>2]|0;O=c[(c[t+8>>2]|0)+12>>2]|0;N=c[O+88>>2]|0;n=c[O+92>>2]|0;O=c[O+96>>2]|0;P=(c[M+96>>2]|0)-O|0;n=(z(b-O|0,(c[M+92>>2]|0)-n|0)|0)-(z(P,d-n|0)|0)|0;N=(z(P,m-N|0)|0)-(z(b-O|0,(c[M+88>>2]|0)-N|0)|0)|0;n=Yr(n|0,((n|0)<0)<<31>>31|0,C-E|0,G|0)|0;M=D()|0;N=Yr(N|0,((N|0)<0)<<31>>31|0,e|0,((e|0)<0)<<31>>31|0)|0;N=Lv(n|0,M|0,N|0,D()|0)|0;M=D()|0;if((M|0)>0|(M|0)==0&N>>>0>0)break g}while(0);f=t}while(0);t=c[t>>2]|0}while((t|0)!=(o|0));c[L+120>>2]=f;r=f}n=c[l+8>>2]|0;c[L+72>>2]=0;if(!n)f=0;else{o=tv(0,0,C-E|0,G|0)|0;p=D()|0;q=n;f=0;do{b=c[q+12>>2]|0;m=c[b+88>>2]|0;d=c[b+92>>2]|0;b=c[b+96>>2]|0;N=Yr(d-C|0,((d-C|0)<0)<<31>>31|0,e|0,((e|0)<0)<<31>>31|0)|0;P=D()|0;O=Yr(o|0,p|0,m-B|0,((m-B|0)<0)<<31>>31|0)|0;do if((N|0)==(O|0)&(P|0)==(D()|0)?(O=Yr(u|0,v|0,m-B|0,((m-B|0)<0)<<31>>31|0)|0,N=D()|0,P=Yr(w|0,x|0,d-C|0,((d-C|0)<0)<<31>>31|0)|0,N=Lv(P|0,D()|0,O|0,N|0)|0,O=D()|0,P=Yr(y|0,A|0,b-F|0,((b-F|0)<0)<<31>>31|0)|0,P=Lv(N|0,O|0,P|0,D()|0)|0,O=D()|0,(O|0)>0|(O|0)==0&P>>>0>0):0){if(f|0){if((c[f>>2]|0)!=(q|0))break;if((c[f+4>>2]|0)==(q|0)?(O=c[f+12>>2]|0,M=c[(c[q+8>>2]|0)+12>>2]|0,P=c[M+88>>2]|0,N=c[M+92>>2]|0,M=c[M+96>>2]|0,t=(c[O+96>>2]|0)-M|0,N=(z(b-M|0,(c[O+92>>2]|0)-N|0)|0)-(z(t,d-N|0)|0)|0,P=(z(t,m-P|0)|0)-(z(b-M|0,(c[O+88>>2]|0)-P|0)|0)|0,N=Yr(N|0,((N|0)<0)<<31>>31|0,C-E|0,G|0)|0,O=D()|0,P=Yr(P|0,((P|0)<0)<<31>>31|0,e|0,((e|0)<0)<<31>>31|0)|0,P=Lv(N|0,O|0,P|0,D()|0)|0,O=D()|0,!((O|0)>0|(O|0)==0&P>>>0>0)):0)break}f=q}while(0);q=c[q>>2]|0}while((q|0)!=(n|0));c[L+72>>2]=f}if((r|0)!=0|(f|0)!=0){lb(a,g,l,L+120|0,L+72|0);f=c[L+120>>2]|0;if(f){h=c[f+12>>2]|0;g=h}f=c[L+72>>2]|0;if(!f)f=H;else{k=c[f+12>>2]|0;l=k;f=k;i=k+88|0;j=k+96|0;k=k+92|0}}else f=H;m=f;b=c[i>>2]|0;d=(c[j>>2]|0)+1|0;j=c[k>>2]|0}w=l;y=g;f=0;E=0;e=1;i=0;k=0;A=0;B=0;C=d;x=0;G=0;while(1){P=c[y+88>>2]|0;H=(c[w+88>>2]|0)-P|0;O=c[y+92>>2]|0;v=(c[w+92>>2]|0)-O|0;F=c[y+96>>2]|0;t=(c[w+96>>2]|0)-F|0;c[L+120>>2]=H;c[L+120+4>>2]=v;c[L+120+8>>2]=t;c[L+120+12>>2]=-1;P=b-P|0;O=j-O|0;F=C-F|0;u=(z(O,t)|0)-(z(F,v)|0)|0;F=(z(F,H)|0)-(z(P,t)|0)|0;O=(z(P,v)|0)-(z(O,H)|0)|0;c[L+72>>2]=u;c[L+72+4>>2]=((u|0)<0)<<31>>31;c[L+72+8>>2]=F;c[L+72+8+4>>2]=((F|0)<0)<<31>>31;c[L+72+16>>2]=O;c[L+72+16+4>>2]=((O|0)<0)<<31>>31;P=Yr(O|0,((O|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0;N=D()|0;M=Yr(F|0,((F|0)<0)<<31>>31|0,t|0,((t|0)<0)<<31>>31|0)|0;M=tv(P|0,N|0,M|0,D()|0)|0;N=D()|0;t=Yr(u|0,((u|0)<0)<<31>>31|0,t|0,((t|0)<0)<<31>>31|0)|0;P=D()|0;O=Yr(O|0,((O|0)<0)<<31>>31|0,H|0,((H|0)<0)<<31>>31|0)|0;O=tv(t|0,P|0,O|0,D()|0)|0;P=D()|0;H=Yr(F|0,((F|0)<0)<<31>>31|0,H|0,((H|0)<0)<<31>>31|0)|0;F=D()|0;v=Yr(u|0,((u|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0;v=tv(H|0,F|0,v|0,D()|0)|0;F=D()|0;c[L+48>>2]=M;c[L+48+4>>2]=N;c[L+48+8>>2]=O;c[L+48+8+4>>2]=P;c[L+48+16>>2]=v;c[L+48+16+4>>2]=F;c[L+24>>2]=0;c[L+24+4>>2]=0;c[L+24+8>>2]=0;c[L+24+12>>2]=0;c[L+24+16>>2]=0;F=vc(a,0,y,L+120|0,L+72|0,L+48|0,L+24|0)|0;c[L>>2]=0;c[L+4>>2]=0;c[L+8>>2]=0;c[L+12>>2]=0;c[L+16>>2]=0;v=vc(a,1,w,L+120|0,L+72|0,L+48|0,L)|0;do if((F|0)!=0|(v|0)!=0){d=F|0?-1:1;do if((F|0)!=0&(v|0)!=0){u=c[L+24+16>>2]|0;d=c[L+16>>2]|0;if((u|0)!=(d|0)){q=u-d|0;break}if(!u)q=0;else{P=c[L+24>>2]|0;s=c[L+24+4>>2]|0;o=c[L+8>>2]|0;N=c[L+8+4>>2]|0;n=Yr(o|0,0,P|0,0)|0;d=D()|0;P=Yr(N|0,0,P|0,0)|0;O=D()|0;o=Yr(o|0,0,s|0,0)|0;p=D()|0;s=Yr(N|0,0,s|0,0)|0;N=D()|0;o=Lv(P|0,0,o|0,0)|0;P=D()|0;N=Lv(O|0,0,s|0,N|0)|0;p=Lv(N|0,D()|0,p|0,0)|0;P=Lv(p|0,D()|0,P|0,0)|0;p=D()|0;d=Lv(0,o|0,n|0,d|0)|0;n=D()|0;o=Lv(P|0,p|0,(n>>>0>>0|(n|0)==(o|0)&d>>>0<0)&1|0,0)|0;p=D()|0;P=c[L+24+8>>2]|0;N=c[L+24+8+4>>2]|0;s=c[L>>2]|0;O=c[L+4>>2]|0;r=Yr(s|0,0,P|0,0)|0;q=D()|0;P=Yr(O|0,0,P|0,0)|0;M=D()|0;s=Yr(s|0,0,N|0,0)|0;t=D()|0;N=Yr(O|0,0,N|0,0)|0;O=D()|0;s=Lv(P|0,0,s|0,0)|0;P=D()|0;O=Lv(M|0,0,N|0,O|0)|0;t=Lv(O|0,D()|0,t|0,0)|0;P=Lv(t|0,D()|0,P|0,0)|0;t=D()|0;q=Lv(0,s|0,r|0,q|0)|0;r=D()|0;s=Lv(P|0,t|0,(r>>>0>>0|(r|0)==(s|0)&q>>>0<0)&1|0,0)|0;t=D()|0;if(p>>>0>>0|(p|0)==(t|0)&o>>>0>>0)d=-1;else d=p>>>0>t>>>0|(p|0)==(t|0)&o>>>0>s>>>0?1:n>>>0>>0|(n|0)==(r|0)&d>>>0>>0?-1:(n>>>0>r>>>0|(n|0)==(r|0)&d>>>0>q>>>0)&1;q=z(d,u)|0}}else q=d;while(0);do if(!e)if((q|0)>-1)if((c[L+16>>2]|0)<0&((c[L+8>>2]|0)==0?(c[L+8+4>>2]|0)==0:0)){u=A;p=B;break}else{I=139;break}else if((c[L+24+16>>2]|0)<0&((c[L+24+8>>2]|0)==0?(c[L+24+8+4>>2]|0)==0:0)){u=A;p=B;break}else{I=139;break}else I=139;while(0);if((I|0)==139){I=0;n=Ue(a,y,w)|0;if(!A)i=n;else c[A+4>>2]=n;c[n>>2]=A;d=c[n+8>>2]|0;if(!B)k=d;else c[B>>2]=d;c[d+4>>2]=B;u=n;p=d}c[L+116>>2]=F;c[L+112>>2]=v;if(!q){lb(a,h,m,L+116|0,L+112|0);d=c[L+112>>2]|0}else d=v;if((q|0)>-1&(d|0)!=0){o=(G|0)!=0;if(o?(J=c[G>>2]|0,(J|0)!=(v|0)):0){b=J;do{n=b;b=c[b>>2]|0;d=c[n+8>>2]|0;if((b|0)==(n|0))j=0;else{c[b+4>>2]=c[n+4>>2];c[c[n+4>>2]>>2]=b;j=b}c[(c[d+12>>2]|0)+8>>2]=j;j=c[d>>2]|0;if((j|0)==(d|0)){c[(c[n+12>>2]|0)+8>>2]=0;j=d+4|0}else{c[j+4>>2]=c[d+4>>2];c[c[d+4>>2]>>2]=j;c[(c[n+12>>2]|0)+8>>2]=j;j=d+4|0}c[n+4>>2]=0;c[n+4+4>>2]=0;c[n+4+8>>2]=0;c[n+4+12>>2]=0;c[n>>2]=c[a+56>>2];c[a+56>>2]=n;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[d>>2]=c[a+56>>2];c[a+56>>2]=d;c[a+116>>2]=(c[a+116>>2]|0)+-1}while((b|0)!=(v|0))}do if(p)if(o){c[G>>2]=k;c[k+4>>2]=G;c[p>>2]=v;c[v+4>>2]=p;j=E;k=0;break}else{j=c[v+4>>2]|0;c[j>>2]=k;c[k+4>>2]=j;c[p>>2]=v;c[v+4>>2]=p;j=k;k=0;break}else j=o?E:v;while(0);P=m;A=c[L+112>>2]|0;m=c[A+12>>2]|0;s=j;y=0;b=c[P+88>>2]|0;d=c[P+96>>2]|0;j=c[P+92>>2]|0;A=c[A+8>>2]|0}else{s=E;y=p;d=C;A=G}if((q|0)<1&(c[L+116>>2]|0)!=0){p=(x|0)!=0;if(p?(K=c[x+4>>2]|0,(K|0)!=(F|0)):0){b=K;do{o=b+4|0;n=b;b=c[o>>2]|0;j=c[n>>2]|0;d=c[n+8>>2]|0;if((j|0)==(n|0))j=0;else{c[j+4>>2]=b;c[c[o>>2]>>2]=j}c[(c[d+12>>2]|0)+8>>2]=j;j=c[d>>2]|0;if((j|0)==(d|0)){c[(c[n+12>>2]|0)+8>>2]=0;j=d+4|0}else{c[j+4>>2]=c[d+4>>2];c[c[d+4>>2]>>2]=j;c[(c[n+12>>2]|0)+8>>2]=j;j=d+4|0}c[o>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;c[o+12>>2]=0;c[n>>2]=c[a+56>>2];c[a+56>>2]=n;c[j>>2]=0;c[j+4>>2]=0;c[j+8>>2]=0;c[j+12>>2]=0;c[d>>2]=c[a+56>>2];c[a+56>>2]=d;c[a+116>>2]=(c[a+116>>2]|0)+-1}while((b|0)!=(F|0))}do if(u)if(p){c[i>>2]=x;c[x+4>>2]=i;c[F>>2]=u;c[u+4>>2]=F;i=0;break}else{f=c[F>>2]|0;c[i>>2]=f;c[f+4>>2]=i;c[F>>2]=u;c[u+4>>2]=F;f=i;i=0;break}else f=p?f:F;while(0);j=h;x=c[L+116>>2]|0;h=c[x+12>>2]|0;u=0;v=c[j+88>>2]|0;w=c[j+96>>2]|0;j=c[j+92>>2]|0;x=c[x+8>>2]|0}else{v=b;w=d}if((g|0)==(h|0)&(l|0)==(m|0)){if(x){q=x+4|0;d=c[q>>2]|0;if((d|0)!=(f|0))do{p=d+4|0;o=d;d=c[p>>2]|0;b=c[o>>2]|0;n=c[o+8>>2]|0;if((b|0)==(o|0))b=0;else{c[b+4>>2]=d;c[c[p>>2]>>2]=b}c[(c[n+12>>2]|0)+8>>2]=b;b=c[n>>2]|0;if((b|0)==(n|0)){c[(c[o+12>>2]|0)+8>>2]=0;b=n+4|0}else{c[b+4>>2]=c[n+4>>2];c[c[n+4>>2]>>2]=b;c[(c[o+12>>2]|0)+8>>2]=b;b=n+4|0}c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[o>>2]=c[a+56>>2];c[a+56>>2]=o;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[n>>2]=c[a+56>>2];c[a+56>>2]=n;c[a+116>>2]=(c[a+116>>2]|0)+-1}while((d|0)!=(f|0));if(u|0){c[i>>2]=x;c[q>>2]=i;c[f>>2]=u;c[u+4>>2]=f}}else{c[i>>2]=u;c[u+4>>2]=i;c[h+8>>2]=u}if(!A){c[y>>2]=k;c[k+4>>2]=y;c[l+8>>2]=y;r=0;t=e;q=u;p=y;b=v;o=w;n=x;d=0;break}d=c[A>>2]|0;if((d|0)!=(s|0))do{o=d;d=c[d>>2]|0;n=c[o+8>>2]|0;if((d|0)==(o|0))b=0;else{c[d+4>>2]=c[o+4>>2];c[c[o+4>>2]>>2]=d;b=d}c[(c[n+12>>2]|0)+8>>2]=b;b=c[n>>2]|0;if((b|0)==(n|0)){c[(c[o+12>>2]|0)+8>>2]=0;b=n+4|0}else{c[b+4>>2]=c[n+4>>2];c[c[n+4>>2]>>2]=b;c[(c[o+12>>2]|0)+8>>2]=b;b=n+4|0}c[o+4>>2]=0;c[o+4+4>>2]=0;c[o+4+8>>2]=0;c[o+4+12>>2]=0;c[o>>2]=c[a+56>>2];c[a+56>>2]=o;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[n>>2]=c[a+56>>2];c[a+56>>2]=n;c[a+116>>2]=(c[a+116>>2]|0)+-1}while((d|0)!=(s|0));if(!y){r=0;t=e;q=u;p=0;b=v;o=w;n=x;d=A}else{c[A>>2]=k;c[k+4>>2]=A;c[y>>2]=s;c[s+4>>2]=y;r=0;t=e;q=u;p=y;b=v;o=w;n=x;d=A}}else{r=1;t=0;q=u;p=y;b=v;o=w;n=x;d=A}}else{r=Ue(a,y,w)|0;c[r>>2]=r;c[r+4>>2]=r;c[y+8>>2]=r;r=c[r+8>>2]|0;c[r>>2]=r;c[r+4>>2]=r;c[w+8>>2]=r;r=0;s=E;t=e;q=A;p=B;o=C;n=x;d=G}while(0);if(!r)break c;w=m;y=h;E=s;e=t;A=q;B=p;C=o;x=n;G=d}}while(0);ea=L;return}}while(0);c[f+8>>2]=0;c[f>>2]=f;c[f+4>>2]=f;c[e>>2]=f;c[e+4>>2]=f;c[e+8>>2]=f;c[e+12>>2]=f;ea=L;return} +function gH(a){a=a|0;return +(+f[a+72>>2])}function hH(a,b){a=a|0;b=+b;f[a>>2]=b;return}function iH(a){a=a|0;c[a>>2]=3760;return}function jH(a){a=a|0;c[a>>2]=9372;return}function kH(a){a=a|0;QH(a+56|0);return}function lH(a){a=a|0;aI(a);return}function mH(a){a=a|0;return +(+f[a+24>>2])}function nH(a){a=a|0;return +(+f[a+4>>2])}function oH(a){a=a|0;return +(+f[a+20>>2])}function pH(a){a=a|0;return +(+f[a+32>>2])}function qH(a){a=a|0;return +(+f[a+16>>2])}function rH(a){a=a|0;return +(+f[a+12>>2])}function sH(a){a=a|0;return +(+f[a+28>>2])}function tH(a){a=a|0;return 52}function uH(a){a=a|0;return 68}function vH(a){a=a|0;return 84}function wH(a,b){a=a|0;b=b|0;return a+(b<<4)|0}function xH(a){a=a|0;return a+352|0}function yH(a){a=a|0;return NJ(a)|0}function zH(a){a=a|0;return a+868|0}function AH(a){a=a|0;return +(+f[a+88>>2])}function BH(a){a=a|0;return +(+f[a+8>>2])}function CH(a){a=a|0;return a+316|0}function DH(a){a=a|0;return a+300|0}function EH(a,b){a=a|0;b=b|0;Ca[a&511](b|0)}function FH(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;B(32)}function GH(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;B(29)}function HH(a,b,c,d){a=a|0;b=+b;c=c|0;d=d|0;B(26)}function IH(a){a=a|0;return a+32|0}function JH(a){a=a|0;return 24}function KH(a,b){a=a|0;b=+b;return}function LH(a){a=a|0;return a+788|0}function MH(a){a=a|0;return c[a>>2]|0}function NH(a){a=a|0;return a+68|0}function OH(a){a=a|0;uy(a);return}function PH(a){a=a|0;LJ(a+-4|0);return}function QH(a){a=a|0;uF(a);return}function RH(a){a=a|0;CF(a);return}function SH(a){a=a|0;Bh(a);return}function TH(a){a=a|0;return a+708|0}function UH(){return (AI()|0)>0|0}function VH(a){a=a|0;return 488}function WH(a,b,c){a=a|0;b=b|0;c=c|0;B(14);return 0}function XH(a){a=a|0;return 32}function YH(a){a=a|0;return a+328|0}function ZH(a){a=a|0;return 60}function _H(a){a=a|0;return 428}function $H(a){a=a|0;c[a>>2]=3664;return}function aI(a){a=a|0;NI(a);return}function bI(a,b,c){a=a|0;b=b|0;c=c|0;B(3);return 0.0}function cI(a){a=a|0;return a+288|0}function dI(){return GI(1)|0}function eI(a){a=a|0;return (a>>>0>4294963200?-1:a)|0}function fI(a){a=+a;return +(+jB(a)*2.0)}function gI(a){a=a|0;return a+312|0}function hI(a){a=a|0;c[a>>2]=5660;return}function iI(a){a=a|0;c[a>>2]=6120;return}function jI(a){a=a|0;return (a&255)<<8|a>>8&255|0}function kI(a){a=a|0;return a+544|0}function lI(a,b,c){a=a|0;b=b|0;c=+c;B(13);return 0}function mI(a){a=a|0;return 13730}function nI(a){a=a|0;return a+348|0}function oI(a){a=a|0;return a+92|0}function pI(a){a=a|0;return 4}function qI(a){a=a|0;return 20570}function rI(a){a=a|0;return 20286}function sI(a){a=a|0;c[a>>2]=3708;return}function tI(){return dt()|0}function uI(a){a=a|0;return 13618}function vI(a){a=a|0;c[a>>2]=3960;return}function wI(a){a=a|0;return a+76|0}function xI(a){a=a|0;return a+28|0}function yI(a){a=a|0;return 19397}function zI(a){a=a|0;return a+380|0}function AI(){return G()|0}function BI(a){a=a|0;return a+40|0}function CI(a){a=a|0;return a+24|0}function DI(a){a=a|0;return a+72|0}function EI(a){a=a|0;return a+56|0}function FI(a,b,c){a=a|0;b=b|0;c=c|0;B(31)}function GI(a){a=a|0;return kb((a|0)==0?1:a)|0}function HI(a){a=a|0;return 19781}function II(a){a=a|0;return 0}function JI(){return GI(64)|0}function KI(a){a=a|0;return 19839}function LI(a){a=a|0;return 19183}function MI(a){a=a|0;return a+48|0}function NI(a){a=a|0;c[a>>2]=0;return}function OI(a){a=a|0;return 20072}function PI(a){a=a|0;return 1}function QI(a,b,c){a=a|0;b=b|0;c=+c;B(28)}function RI(a,b,c){a=a|0;b=+b;c=c|0;B(25)}function SI(a){a=a|0;return 20687}function TI(a){a=a|0;return 20658}function UI(a){a=a|0;return 3}function VI(a){a=a|0;return (a+-48|0)>>>0<10|0}function WI(a){a=a|0;return 13997}function XI(a){a=+a;return +a}function YI(a){a=a|0;return 20630}function ZI(a){a=a|0;return 19036}function _I(a){a=a|0;return 20230}function $I(a){a=a|0;return 20203}function aJ(a){a=a|0;return 20173}function bJ(a){a=a|0;return 8}function cJ(a){a=+a;return +(a%6.2831854820251465)}function dJ(a,b,c){a=a|0;b=+b;c=+c;B(23)}function eJ(a){a=a|0;return 19216}function fJ(a,b){a=a|0;b=b|0;B(12);return 0}function gJ(a){a=a|0;return 19098}function hJ(a){a=a|0;return 19119}function iJ(a){a=a|0;return 6}function jJ(a){a=a|0;return 12}function kJ(){return 4}function lJ(a){a=a|0;return 19079}function mJ(a){a=a|0;return 2}function nJ(a){a=a|0;return 20345}function oJ(a,b){a=a|0;b=+b;B(1);return 0.0}function pJ(){c[6250]=1805;c[6251]=0;return}function qJ(a){a=a|0;return a+12|0}function rJ(a){a=a|0;return a+8|0}function sJ(a){a=a|0;return a+4|0}function tJ(a){a=a|0;Ba[a&3]()}function uJ(){return 2}function vJ(a){a=a|0;Z()}function wJ(){return 5}function xJ(){return 3}function yJ(){return 0}function zJ(){F()}function AJ(a){a=+a;return +(+s(+a))}function BJ(a){a=+a;return +(+r(+a))}function CJ(a){a=+a;return +(+v(+a))}function DJ(a){a=+a;return +(+u(+a))}function EJ(a,b){a=a|0;b=b|0;B(27)}function FJ(a,b){a=a|0;b=+b;B(22)}function GJ(a){a=a|0;return GI(a)|0}function HJ(a){a=a|0;LJ(a);return}function IJ(a){a=a|0;return}function JJ(){dy(2)}function KJ(a){a=a|0;ea=a}function LJ(a){a=a|0;uc(a);return}function MJ(a){a=a|0;B(10);return 0}function NJ(a){a=a|0;return a|0}function OJ(a){a=a|0;B(0);return 0.0}function PJ(){return ea|0}function QJ(a){a=a|0;B(21)}function RJ(){return 1}function SJ(){B(20)} + +// EMSCRIPTEN_END_FUNCS +var ha=[OJ,oo,rH,oA,$G,gH,vE,Xp,Wp,Xp,OJ,OJ,OJ,OJ,OJ,OJ];var ia=[oJ,Cw];var ja=[dE,vj,vj,dE];var ka=[bI,uj,Lj,Ri,Fh,JF,mk,Ln,jj,am,Om,Qg,_l,Pl,El,bI];var la=[oB,Jj,Ij,oB];var ma=[bG,Qb];var na=[zD,pu,hd,pu,pu,id,pu,pu,Te,te,tt,pu,pu,zD,zD,zD];var oa=[Qw,Cp];var pa=[sv,ob,Sh,sv];var qa=[vu,li,Ob,vu];var ra=[MJ,RF,II,PI,rG,cF,cF,EG,AF,_H,mJ,pq,uI,jJ,qJ,mI,tH,II,XH,WI,mJ,UI,UI,PI,CG,iF,sF,pI,VH,mJ,tH,wG,YF,vH,WG,KG,eH,PI,Oz,pv,fH,ZF,Zu,VE,VE,wI,ZI,JH,lJ,ZH,gJ,hJ,LI,dH,eJ,PE,yI,ZH,HI,NH,KI,tH,OI,uH,LG,LG,II,aJ,ZH,$I,_I,ZD,rI,II,II,II,nJ,iJ,bJ,jJ,iJ,vH,JG,qI,YI,ZH,TI,SI,AF,SD,BG,uG,uG,EG,EG,sJ,II,PI,EG,EG,sJ,cF,II,MF,MF,EG,Ss,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ,MJ];var sa=[yG,Cf];var ta=[fJ,_q,gr,Zq,RG,RG,RG,_a,mz,mz,Wb,sl,rm,fy,jn,Ts,Ek,rq,Kp,bk,Lh,Sn,oq,fJ,fJ,fJ,fJ,fJ,fJ,fJ,fJ,fJ];var ua=[lI,Ce,EE,EE,im,lI,lI,lI];var va=[WH,dn,Qh,gb,Yn,Gk,rf,ch,ng,Be,Cm,ah,Ug,we,ie,ze,Bm,eq,tj,Ke,wk,fh,Nf,Ik,ph,vk,Gd,tk,Hc,TC,TC,qe,mj,wf,Lf,Gh,ek,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH,WH];var wa=[_F,xm,Jo,_n,Hj,Fj,hh,Pm,Rk,Pk,il,vf,fl,Wo,bm,el,_k,bi,ml,Ib,zv,rx,ue,tm,_F,_F,_F,_F,_F,_F,_F,_F];var xa=[PA,dc,yc,Rc];var ya=[Gy];var za=[nv,jc,Qe,nv];var Aa=[ru,Jb,wg,ru];var Ba=[SJ,zJ,UB,SJ];var Ca=[QJ,IJ,HJ,IJ,vJ,dr,Ky,IJ,vJ,IJ,vJ,IJ,OH,IJ,vJ,IJ,HJ,IJ,vJ,IJ,HJ,IJ,HJ,IJ,vJ,IJ,HJ,IJ,vJ,Ro,dq,tn,Wi,az,IJ,HJ,HJ,HJ,HJ,tc,Rv,IJ,HJ,IJ,HJ,IJ,uy,HJ,HJ,IJ,uy,HJ,HJ,IJ,HJ,fz,Gx,IJ,HJ,IJ,HJ,Ap,So,ii,MC,nj,ku,qi,dk,cb,Zg,mf,Wm,zd,Uk,IJ,HJ,IJ,HJ,yo,In,Vf,tu,eb,HJ,Cj,pC,hI,qv,IJ,hI,qv,pe,om,qv,qv,Nd,vJ,qv,qv,ic,qv,Cb,qf,ft,tF,Dh,SF,HJ,Eo,Pn,Rs,HJ,IJ,HJ,iI,rv,vo,Fn,Tk,lu,Vo,jq,IJ,HJ,ge,xB,HJ,HJ,HJ,HJ,HJ,HJ,HJ,HJ,HJ,HJ,Dj,XC,mq,ep,Qo,Do,HJ,Ep,sp,uq,lp,IJ,HJ,Zi,UF,cd,HJ,HJ,HJ,HJ,HJ,IJ,HJ,IJ,PH,HJ,HJ,HJ,HJ,HJ,HJ,gq,cp,IJ,HJ,xq,op,HJ,HJ,HJ,Xj,ZB,HJ,Ti,eA,HJ,wl,_u,si,uy,uy,uy,Sk,nl,uy,hp,xo,IJ,HJ,HJ,HJ,IJ,uy,HJ,IJ,HJ,IJ,uy,vJ,vJ,Ll,yl,uy,uy,uy,So,HJ,So,SH,iv,HJ,HJ,jH,Vu,uy,uy,uy,Ah,hv,Ki,Ru,IJ,Ru,$o,sq,Bj,YB,HJ,HJ,Mo,TF,IJ,HJ,HJ,HJ,Bh,iv,vJ,IJ,HJ,HJ,HJ,HJ,HJ,HJ,IJ,HJ,IJ,HJ,iq,dp,HJ,HJ,Ej,TD,zh,Pu,No,Rn,IJ,HJ,IJ,IJ,HJ,HJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ,QJ];var Da=[FJ,fb,Tb,mm,pG,NF,KH,NF,Uj,Vb,ff,bh,yf,pj,he,Lb,wd,Ab,wF,NF,Xk,Xk,Xk,zi,FJ,FJ,FJ,FJ,FJ,FJ,FJ,FJ];var Ea=[dJ,_c,Kf,Li,hf,Re,dJ,dJ];var Fa=[aD,_d,Wd,Dc];var Ga=[RI,bg,JB,uB,Qt,fj,ci,Qm,Go,Qt,Qt,xi,yk,hl,ut,kj];var Ha=[HH,Gj];var Ia=[EJ,kq,Nr,zA,AB,XG,fC,OB,XG,wn,jk,XG,Qs,yn,zb,ld,pp,XG,XG,XG,JE,KB,Bf,xf,Hg,gj,Vl,$i,Gr,ug,Vh,Uo,Dw,Bv,vx,Zw,Eb,XG,ti,Gt,nn,Dp,ih,ix,Mc,ki,sj,Jg,Mt,se,ke,tb,gk,kc,aj,qb,ei,XG,Hk,Rj,ck,al,cB,Sj,nm,Tm,cj,ti,Ei,ti,Oj,Nq,rp,ti,ui,$m,Fq,sm,ed,Km,Kk,Wt,Tt,Ut,eo,Ig,em,cm,dg,Er,Ip,fk,_r,To,fk,sc,oc,hr,fk,_r,XG,XG,Rg,Tg,nd,Zm,XG,XG,XG,$x,KB,ye,hc,jh,Xt,Ct,Ct,XG,ti,XG,XG,EJ,EJ,EJ,EJ,EJ,EJ,EJ];var Ja=[QI,Df,bw,bv,Cr,lk,sb,QI];var Ka=[GH,qp,UD,xj,ko,fi,dm,um];var La=[EF,vg];var Ma=[FI,vF,ax,Kh,Fd,Pv,yh,Jn,vF,Mi,_i,st,vF,Nc,qc,vF,kk,dl,Yj,Sp,ni,ne,qh,vF,vF,Wh,xh,$d,qx,px,wE,wE,wE,wE,zc,oh,ej,fg,Mj,bt,Kg,Lt,fe,td,td,yg,kk,ij,Zn,Lg,kk,nh,vF,ul,Nn,Bl,gl,Qk,hj,hm,km,gm,cn,sn,pc,xn,vF,vF,vF,vF,gp,so,wo,Hl,Xi,rh,lo,wE,wE,wE,wE,Mh,Ac,lh,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI,FI];var Na=[FH,Bz,jb,Pc,Ad,ws,Qi,xd,Dl,lm,FH,FH,FH,FH,FH,FH];var Oa=[GC,ks];var Pa=[YG,Yu,jf,Je,le,vB,Ey,Jv,Xe,Pe,vt,Tj,Pq,bu,Wj,Fb,xb,ee,Ys,Bg,Le,db,cu,Rl,Bk,po,Pe,ce,Tf,$e,Bd,gt,os,Hf,Eg,vt,Ch,Xg,Of,$k,Ks,Dg,Wc,jl,Ii,Pi,Lo,tf,$f,Wg,Th,ak,vB,dh,Uf,Hh,vB,vB,Di,Hi,vl,Vj,wj,kd,vd,Eh,yb,Hi,Ck,zk,Ak,ac,gn,Oi,gn,Lk,Bp,Dn,pk,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG,YG];var Qa=[DF,gv];var Ra=[It,sd];var Sa=[Bu,cf];var Ta=[YE,it,Tc,eg,Zk,nf,bp,Mb,be,Ye,Se,$a,$b,wb,Id,ad,Hb,qu,Af,ib,Sc,qk,Uh,oe,YE,YE,YE,YE,YE,YE,YE,YE];var Ua=[FC,ro];var Va=[_B,Xc,Ok,Jl,Io,Vm,eh,_B];var Wa=[Zz,cg];var Xa=[tw,vq];var Ya=[iw,Sg];var Za=[Qu,xl,xl,Qu];return{__GLOBAL__sub_I_btQuickprof_cpp:aq,__ZSt18uncaught_exceptionv:UH,___cxa_can_catch:Zp,___cxa_is_pointer_type:_y,___muldi3:Yr,___udivdi3:GB,_bitshift64Lshr:Ft,_bitshift64Shl:pt,_emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2:Xs,_emscripten_bind_AllHitsRayResultCallback___destroy___0:Bw,_emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0:nH,_emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0:CD,_emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0:MD,_emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0:cF,_emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0:oG,_emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0:IF,_emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0:DI,_emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0:oI,_emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0:BI,_emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0:EI,_emscripten_bind_AllHitsRayResultCallback_hasHit_0:Vy,_emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1:OG,_emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1:FA,_emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1:OA,_emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1:OB,_emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1:ov,_emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1:wx,_emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1:qw,_emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1:xw,_emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1:Ur,_emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1:Xr,_emscripten_bind_Anchor___destroy___0:nE,_emscripten_bind_Anchor_get_m_body_0:VG,_emscripten_bind_Anchor_get_m_c0_0:xI,_emscripten_bind_Anchor_get_m_c1_0:wI,_emscripten_bind_Anchor_get_m_c2_0:_G,_emscripten_bind_Anchor_get_m_influence_0:mH,_emscripten_bind_Anchor_get_m_local_0:sJ,_emscripten_bind_Anchor_get_m_node_0:MH,_emscripten_bind_Anchor_set_m_body_1:DE,_emscripten_bind_Anchor_set_m_c0_1:gC,_emscripten_bind_Anchor_set_m_c1_1:Qr,_emscripten_bind_Anchor_set_m_c2_1:dF,_emscripten_bind_Anchor_set_m_influence_1:mF,_emscripten_bind_Anchor_set_m_local_1:Rr,_emscripten_bind_Anchor_set_m_node_1:rF,_emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2:Cs,_emscripten_bind_ClosestConvexResultCallback___destroy___0:Bw,_emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0:nH,_emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0:mD,_emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0:lD,_emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0:qJ,_emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0:xI,_emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0:TE,_emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0:hF,_emscripten_bind_ClosestConvexResultCallback_hasHit_0:ty,_emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1:OG,_emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1:qA,_emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1:pA,_emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1:Xq,_emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1:cr,_emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1:Yq,_emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1:br,_emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2:at,_emscripten_bind_ClosestRayResultCallback___destroy___0:Bw,_emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0:nH,_emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0:CD,_emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0:MD,_emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0:cF,_emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0:zG,_emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0:NH,_emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0:oG,_emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0:ZG,_emscripten_bind_ClosestRayResultCallback_hasHit_0:Vy,_emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1:OG,_emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1:FA,_emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1:OA,_emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1:OB,_emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1:xr,_emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1:Er,_emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1:kr,_emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1:Fr,_emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0:Bt,_emscripten_bind_ConcreteContactResultCallback___destroy___0:Bw,_emscripten_bind_ConcreteContactResultCallback_addSingleResult_7:Jq,_emscripten_bind_Config___destroy___0:uz,_emscripten_bind_Config_get_citerations_0:LG,_emscripten_bind_Config_get_collisions_0:vG,_emscripten_bind_Config_get_diterations_0:uG,_emscripten_bind_Config_get_kAHR_0:cH,_emscripten_bind_Config_get_kCHR_0:bH,_emscripten_bind_Config_get_kDF_0:sH,_emscripten_bind_Config_get_kDG_0:rH,_emscripten_bind_Config_get_kDP_0:BH,_emscripten_bind_Config_get_kKHR_0:aH,_emscripten_bind_Config_get_kLF_0:qH,_emscripten_bind_Config_get_kMT_0:pH,_emscripten_bind_Config_get_kPR_0:oH,_emscripten_bind_Config_get_kSHR_0:$G,_emscripten_bind_Config_get_kSKHR_CL_0:IG,_emscripten_bind_Config_get_kSK_SPLT_CL_0:mG,_emscripten_bind_Config_get_kSRHR_CL_0:HG,_emscripten_bind_Config_get_kSR_SPLT_CL_0:lG,_emscripten_bind_Config_get_kSSHR_CL_0:GG,_emscripten_bind_Config_get_kSS_SPLT_CL_0:gH,_emscripten_bind_Config_get_kVCF_0:nH,_emscripten_bind_Config_get_kVC_0:mH,_emscripten_bind_Config_get_maxvolume_0:FG,_emscripten_bind_Config_get_piterations_0:tG,_emscripten_bind_Config_get_timescale_0:AG,_emscripten_bind_Config_get_viterations_0:sG,_emscripten_bind_Config_set_citerations_1:RD,_emscripten_bind_Config_set_collisions_1:QD,_emscripten_bind_Config_set_diterations_1:PD,_emscripten_bind_Config_set_kAHR_1:gF,_emscripten_bind_Config_set_kCHR_1:fF,_emscripten_bind_Config_set_kDF_1:qF,_emscripten_bind_Config_set_kDG_1:pG,_emscripten_bind_Config_set_kDP_1:NG,_emscripten_bind_Config_set_kKHR_1:eF,_emscripten_bind_Config_set_kLF_1:pF,_emscripten_bind_Config_set_kMT_1:oF,_emscripten_bind_Config_set_kPR_1:nF,_emscripten_bind_Config_set_kSHR_1:NF,_emscripten_bind_Config_set_kSKHR_CL_1:CE,_emscripten_bind_Config_set_kSK_SPLT_CL_1:kE,_emscripten_bind_Config_set_kSRHR_CL_1:BE,_emscripten_bind_Config_set_kSR_SPLT_CL_1:jE,_emscripten_bind_Config_set_kSSHR_CL_1:AE,_emscripten_bind_Config_set_kSS_SPLT_CL_1:wF,_emscripten_bind_Config_set_kVCF_1:OG,_emscripten_bind_Config_set_kVC_1:mF,_emscripten_bind_Config_set_maxvolume_1:uE,_emscripten_bind_Config_set_piterations_1:OD,_emscripten_bind_Config_set_timescale_1:tE,_emscripten_bind_Config_set_viterations_1:ND,_emscripten_bind_ContactResultCallback___destroy___0:Bw,_emscripten_bind_ContactResultCallback_addSingleResult_7:Jq,_emscripten_bind_ConvexResultCallback___destroy___0:Bw,_emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0:nH,_emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0:mD,_emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0:lD,_emscripten_bind_ConvexResultCallback_hasHit_0:ty,_emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1:OG,_emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1:qA,_emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1:pA,_emscripten_bind_DebugDrawer_DebugDrawer_0:Kz,_emscripten_bind_DebugDrawer___destroy___0:Bw,_emscripten_bind_DebugDrawer_draw3dText_2:Dv,_emscripten_bind_DebugDrawer_drawContactPoint_5:is,_emscripten_bind_DebugDrawer_drawLine_3:Au,_emscripten_bind_DebugDrawer_getDebugMode_0:Oz,_emscripten_bind_DebugDrawer_reportErrorWarning_1:Ow,_emscripten_bind_DebugDrawer_setDebugMode_1:Bx,_emscripten_bind_LocalConvexResult_LocalConvexResult_5:Bq,_emscripten_bind_LocalConvexResult___destroy___0:nE,_emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0:MH,_emscripten_bind_LocalConvexResult_get_m_hitFraction_0:aH,_emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0:rJ,_emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0:CI,_emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0:rG,_emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1:rF,_emscripten_bind_LocalConvexResult_set_m_hitFraction_1:eF,_emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1:$r,_emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1:Vr,_emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1:fC,_emscripten_bind_LocalShapeInfo___destroy___0:nE,_emscripten_bind_LocalShapeInfo_get_m_shapePart_0:MH,_emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0:rG,_emscripten_bind_LocalShapeInfo_set_m_shapePart_1:rF,_emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1:fC,_emscripten_bind_Material___destroy___0:nE,_emscripten_bind_Material_get_m_flags_0:EG,_emscripten_bind_Material_get_m_kAST_0:BH,_emscripten_bind_Material_get_m_kLST_0:nH,_emscripten_bind_Material_get_m_kVST_0:rH,_emscripten_bind_Material_set_m_flags_1:iE,_emscripten_bind_Material_set_m_kAST_1:NG,_emscripten_bind_Material_set_m_kLST_1:OG,_emscripten_bind_Material_set_m_kVST_1:pG,_emscripten_bind_Node___destroy___0:nE,_emscripten_bind_Node_get_m_area_0:_G,_emscripten_bind_Node_get_m_f_0:EI,_emscripten_bind_Node_get_m_im_0:AH,_emscripten_bind_Node_get_m_n_0:DI,_emscripten_bind_Node_get_m_q_0:CI,_emscripten_bind_Node_get_m_v_0:BI,_emscripten_bind_Node_get_m_x_0:rJ,_emscripten_bind_Node_set_m_area_1:dF,_emscripten_bind_Node_set_m_f_1:Xr,_emscripten_bind_Node_set_m_im_1:zF,_emscripten_bind_Node_set_m_n_1:Wr,_emscripten_bind_Node_set_m_q_1:Vr,_emscripten_bind_Node_set_m_v_1:Ur,_emscripten_bind_Node_set_m_x_1:$r,_emscripten_bind_RayResultCallback___destroy___0:Bw,_emscripten_bind_RayResultCallback_get_m_closestHitFraction_0:nH,_emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0:CD,_emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0:MD,_emscripten_bind_RayResultCallback_get_m_collisionObject_0:cF,_emscripten_bind_RayResultCallback_hasHit_0:Vy,_emscripten_bind_RayResultCallback_set_m_closestHitFraction_1:OG,_emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1:FA,_emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1:OA,_emscripten_bind_RayResultCallback_set_m_collisionObject_1:OB,_emscripten_bind_RaycastInfo___destroy___0:nE,_emscripten_bind_RaycastInfo_get_m_contactNormalWS_0:NJ,_emscripten_bind_RaycastInfo_get_m_contactPointWS_0:PG,_emscripten_bind_RaycastInfo_get_m_groundObject_0:tG,_emscripten_bind_RaycastInfo_get_m_hardPointWS_0:ZG,_emscripten_bind_RaycastInfo_get_m_isInContact_0:sE,_emscripten_bind_RaycastInfo_get_m_suspensionLength_0:pH,_emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0:NH,_emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0:zG,_emscripten_bind_RaycastInfo_set_m_contactNormalWS_1:Sr,_emscripten_bind_RaycastInfo_set_m_contactPointWS_1:Br,_emscripten_bind_RaycastInfo_set_m_groundObject_1:OD,_emscripten_bind_RaycastInfo_set_m_hardPointWS_1:Fr,_emscripten_bind_RaycastInfo_set_m_isInContact_1:XB,_emscripten_bind_RaycastInfo_set_m_suspensionLength_1:oF,_emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1:Er,_emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1:xr,_emscripten_bind_VoidPtr___destroy___0:nE,_emscripten_bind_btActionInterface___destroy___0:Bw,_emscripten_bind_btActionInterface_updateAction_2:xv,_emscripten_bind_btAxisSweep3___destroy___0:Bw,_emscripten_bind_btAxisSweep3_btAxisSweep3_2:ys,_emscripten_bind_btAxisSweep3_btAxisSweep3_3:Pr,_emscripten_bind_btAxisSweep3_btAxisSweep3_4:vr,_emscripten_bind_btAxisSweep3_btAxisSweep3_5:Tq,_emscripten_bind_btBoxShape___destroy___0:Bw,_emscripten_bind_btBoxShape_btBoxShape_1:Zh,_emscripten_bind_btBoxShape_calculateLocalInertia_2:fv,_emscripten_bind_btBoxShape_getLocalScaling_0:Hz,_emscripten_bind_btBoxShape_getMargin_0:oA,_emscripten_bind_btBoxShape_setLocalScaling_1:nx,_emscripten_bind_btBoxShape_setMargin_1:qy,_emscripten_bind_btBroadphaseInterface___destroy___0:Bw,_emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0:rA,_emscripten_bind_btBroadphaseProxy___destroy___0:DB,_emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0:LD,_emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0:YD,_emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1:NA,_emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1:UA,_emscripten_bind_btBvhTriangleMeshShape___destroy___0:Bw,_emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2:Ns,_emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3:cs,_emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2:fv,_emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0:Hz,_emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1:nx,_emscripten_bind_btCapsuleShapeX___destroy___0:Bw,_emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2:Mm,_emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2:fv,_emscripten_bind_btCapsuleShapeX_getHalfHeight_0:CC,_emscripten_bind_btCapsuleShapeX_getLocalScaling_0:Hz,_emscripten_bind_btCapsuleShapeX_getMargin_0:oA,_emscripten_bind_btCapsuleShapeX_getRadius_0:hE,_emscripten_bind_btCapsuleShapeX_getUpAxis_0:mE,_emscripten_bind_btCapsuleShapeX_setLocalScaling_1:nx,_emscripten_bind_btCapsuleShapeX_setMargin_1:qy,_emscripten_bind_btCapsuleShapeZ___destroy___0:Bw,_emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2:Lm,_emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2:fv,_emscripten_bind_btCapsuleShapeZ_getHalfHeight_0:CC,_emscripten_bind_btCapsuleShapeZ_getLocalScaling_0:Hz,_emscripten_bind_btCapsuleShapeZ_getMargin_0:oA,_emscripten_bind_btCapsuleShapeZ_getRadius_0:hE,_emscripten_bind_btCapsuleShapeZ_getUpAxis_0:mE,_emscripten_bind_btCapsuleShapeZ_setLocalScaling_1:nx,_emscripten_bind_btCapsuleShapeZ_setMargin_1:qy,_emscripten_bind_btCapsuleShape___destroy___0:Bw,_emscripten_bind_btCapsuleShape_btCapsuleShape_2:Nm,_emscripten_bind_btCapsuleShape_calculateLocalInertia_2:fv,_emscripten_bind_btCapsuleShape_getHalfHeight_0:CC,_emscripten_bind_btCapsuleShape_getLocalScaling_0:Hz,_emscripten_bind_btCapsuleShape_getMargin_0:oA,_emscripten_bind_btCapsuleShape_getRadius_0:hE,_emscripten_bind_btCapsuleShape_getUpAxis_0:mE,_emscripten_bind_btCapsuleShape_setLocalScaling_1:nx,_emscripten_bind_btCapsuleShape_setMargin_1:qy,_emscripten_bind_btCollisionConfiguration___destroy___0:Bw,_emscripten_bind_btCollisionDispatcher___destroy___0:Bw,_emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1:sk,_emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1:$v,_emscripten_bind_btCollisionDispatcher_getNumManifolds_0:rA,_emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0:zB,_emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0:PF,_emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0:UE,_emscripten_bind_btCollisionObject___destroy___0:zw,_emscripten_bind_btCollisionObject_activate_0:zt,_emscripten_bind_btCollisionObject_activate_1:ns,_emscripten_bind_btCollisionObject_forceActivationState_1:VB,_emscripten_bind_btCollisionObject_getBroadphaseHandle_0:VC,_emscripten_bind_btCollisionObject_getCollisionFlags_0:sD,_emscripten_bind_btCollisionObject_getCollisionShape_0:rD,_emscripten_bind_btCollisionObject_getFriction_0:IA,_emscripten_bind_btCollisionObject_getRestitution_0:lA,_emscripten_bind_btCollisionObject_getRollingFriction_0:Tz,_emscripten_bind_btCollisionObject_getUserIndex_0:UC,_emscripten_bind_btCollisionObject_getUserPointer_0:WD,_emscripten_bind_btCollisionObject_getWorldTransform_0:GF,_emscripten_bind_btCollisionObject_isActive_0:gB,_emscripten_bind_btCollisionObject_isKinematicObject_0:Ly,_emscripten_bind_btCollisionObject_isStaticObject_0:Cz,_emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0:cx,_emscripten_bind_btCollisionObject_setActivationState_1:Vv,_emscripten_bind_btCollisionObject_setAnisotropicFriction_2:cv,_emscripten_bind_btCollisionObject_setCcdMotionThreshold_1:Hy,_emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1:ny,_emscripten_bind_btCollisionObject_setCollisionFlags_1:pz,_emscripten_bind_btCollisionObject_setCollisionShape_1:Vw,_emscripten_bind_btCollisionObject_setContactProcessingThreshold_1:Oy,_emscripten_bind_btCollisionObject_setFriction_1:fB,_emscripten_bind_btCollisionObject_setRestitution_1:kA,_emscripten_bind_btCollisionObject_setRollingFriction_1:xz,_emscripten_bind_btCollisionObject_setUserIndex_1:vA,_emscripten_bind_btCollisionObject_setUserPointer_1:Sz,_emscripten_bind_btCollisionObject_setWorldTransform_1:Qx,_emscripten_bind_btCollisionShape___destroy___0:Bw,_emscripten_bind_btCollisionShape_calculateLocalInertia_2:fv,_emscripten_bind_btCollisionShape_getLocalScaling_0:Hz,_emscripten_bind_btCollisionShape_getMargin_0:oA,_emscripten_bind_btCollisionShape_setLocalScaling_1:nx,_emscripten_bind_btCollisionShape_setMargin_1:qy,_emscripten_bind_btCollisionWorld___destroy___0:Bw,_emscripten_bind_btCollisionWorld_addCollisionObject_1:Ov,_emscripten_bind_btCollisionWorld_addCollisionObject_2:Ju,_emscripten_bind_btCollisionWorld_addCollisionObject_3:Ot,_emscripten_bind_btCollisionWorld_contactPairTest_3:bj,_emscripten_bind_btCollisionWorld_contactTest_2:ym,_emscripten_bind_btCollisionWorld_convexSweepTest_5:nr,_emscripten_bind_btCollisionWorld_debugDrawObject_3:Vt,_emscripten_bind_btCollisionWorld_debugDrawWorld_0:sz,_emscripten_bind_btCollisionWorld_getBroadphase_0:uD,_emscripten_bind_btCollisionWorld_getDebugDrawer_0:dz,_emscripten_bind_btCollisionWorld_getDispatchInfo_0:KC,_emscripten_bind_btCollisionWorld_getDispatcher_0:tD,_emscripten_bind_btCollisionWorld_getPairCache_0:Nz,_emscripten_bind_btCollisionWorld_rayTest_3:su,_emscripten_bind_btCollisionWorld_removeCollisionObject_1:jw,_emscripten_bind_btCollisionWorld_setDebugDrawer_1:Nw,_emscripten_bind_btCollisionWorld_updateSingleAabb_1:Yw,_emscripten_bind_btCompoundShape___destroy___0:Bw,_emscripten_bind_btCompoundShape_addChildShape_2:Oc,_emscripten_bind_btCompoundShape_btCompoundShape_0:Ni,_emscripten_bind_btCompoundShape_btCompoundShape_1:Gi,_emscripten_bind_btCompoundShape_calculateLocalInertia_2:fv,_emscripten_bind_btCompoundShape_getChildShape_1:Jz,_emscripten_bind_btCompoundShape_getLocalScaling_0:Hz,_emscripten_bind_btCompoundShape_getMargin_0:oA,_emscripten_bind_btCompoundShape_getNumChildShapes_0:nB,_emscripten_bind_btCompoundShape_removeChildShapeByIndex_1:Nx,_emscripten_bind_btCompoundShape_removeChildShape_1:Dw,_emscripten_bind_btCompoundShape_setLocalScaling_1:nx,_emscripten_bind_btCompoundShape_setMargin_1:qy,_emscripten_bind_btCompoundShape_updateChildTransform_2:bf,_emscripten_bind_btCompoundShape_updateChildTransform_3:ef,_emscripten_bind_btConcaveShape___destroy___0:Bw,_emscripten_bind_btConcaveShape_calculateLocalInertia_2:fv,_emscripten_bind_btConcaveShape_getLocalScaling_0:Hz,_emscripten_bind_btConcaveShape_setLocalScaling_1:nx,_emscripten_bind_btConeShapeX___destroy___0:Bw,_emscripten_bind_btConeShapeX_btConeShapeX_2:Al,_emscripten_bind_btConeShapeX_calculateLocalInertia_2:fv,_emscripten_bind_btConeShapeX_getLocalScaling_0:Hz,_emscripten_bind_btConeShapeX_setLocalScaling_1:nx,_emscripten_bind_btConeShapeZ___destroy___0:Bw,_emscripten_bind_btConeShapeZ_btConeShapeZ_2:zl,_emscripten_bind_btConeShapeZ_calculateLocalInertia_2:fv,_emscripten_bind_btConeShapeZ_getLocalScaling_0:Hz,_emscripten_bind_btConeShapeZ_setLocalScaling_1:nx,_emscripten_bind_btConeShape___destroy___0:Bw,_emscripten_bind_btConeShape_btConeShape_2:Ol,_emscripten_bind_btConeShape_calculateLocalInertia_2:fv,_emscripten_bind_btConeShape_getLocalScaling_0:Hz,_emscripten_bind_btConeShape_setLocalScaling_1:nx,_emscripten_bind_btConeTwistConstraint___destroy___0:Bw,_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2:zf,_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4:Gf,_emscripten_bind_btConeTwistConstraint_enableFeedback_1:gz,_emscripten_bind_btConeTwistConstraint_enableMotor_1:Zy,_emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btConeTwistConstraint_getParam_2:jv,_emscripten_bind_btConeTwistConstraint_setAngularOnly_1:py,_emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btConeTwistConstraint_setDamping_1:Gz,_emscripten_bind_btConeTwistConstraint_setLimit_2:Fx,_emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1:Zv,_emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1:Sx,_emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1:zu,_emscripten_bind_btConeTwistConstraint_setMotorTarget_1:sh,_emscripten_bind_btConeTwistConstraint_setParam_3:yu,_emscripten_bind_btConstCollisionObjectArray___destroy___0:hy,_emscripten_bind_btConstCollisionObjectArray_at_1:ux,_emscripten_bind_btConstCollisionObjectArray_size_0:PF,_emscripten_bind_btConstraintSetting___destroy___0:nE,_emscripten_bind_btConstraintSetting_btConstraintSetting_0:tz,_emscripten_bind_btConstraintSetting_get_m_damping_0:nH,_emscripten_bind_btConstraintSetting_get_m_impulseClamp_0:BH,_emscripten_bind_btConstraintSetting_get_m_tau_0:gG,_emscripten_bind_btConstraintSetting_set_m_damping_1:OG,_emscripten_bind_btConstraintSetting_set_m_impulseClamp_1:NG,_emscripten_bind_btConstraintSetting_set_m_tau_1:hH,_emscripten_bind_btConstraintSolver___destroy___0:Bw,_emscripten_bind_btContactSolverInfo___destroy___0:nE,_emscripten_bind_btContactSolverInfo_get_m_numIterations_0:VG,_emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0:bB,_emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0:LC,_emscripten_bind_btContactSolverInfo_set_m_numIterations_1:DE,_emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1:cy,_emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1:TA,_emscripten_bind_btConvexHullShape___destroy___0:Bw,_emscripten_bind_btConvexHullShape_addPoint_1:Yy,_emscripten_bind_btConvexHullShape_addPoint_2:Sw,_emscripten_bind_btConvexHullShape_btConvexHullShape_0:ww,_emscripten_bind_btConvexHullShape_btConvexHullShape_1:ev,_emscripten_bind_btConvexHullShape_btConvexHullShape_2:ou,_emscripten_bind_btConvexHullShape_calculateLocalInertia_2:fv,_emscripten_bind_btConvexHullShape_getConvexPolyhedron_0:mE,_emscripten_bind_btConvexHullShape_getLocalScaling_0:Hz,_emscripten_bind_btConvexHullShape_getMargin_0:oA,_emscripten_bind_btConvexHullShape_getNumVertices_0:Uy,_emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1:wv,_emscripten_bind_btConvexHullShape_recalcLocalAabb_0:Fz,_emscripten_bind_btConvexHullShape_setLocalScaling_1:nx,_emscripten_bind_btConvexHullShape_setMargin_1:qy,_emscripten_bind_btConvexPolyhedron___destroy___0:Bw,_emscripten_bind_btConvexPolyhedron_get_m_faces_0:CI,_emscripten_bind_btConvexPolyhedron_get_m_vertices_0:sJ,_emscripten_bind_btConvexPolyhedron_set_m_faces_1:ky,_emscripten_bind_btConvexPolyhedron_set_m_vertices_1:Mx,_emscripten_bind_btConvexShape___destroy___0:Bw,_emscripten_bind_btConvexShape_calculateLocalInertia_2:fv,_emscripten_bind_btConvexShape_getLocalScaling_0:Hz,_emscripten_bind_btConvexShape_getMargin_0:oA,_emscripten_bind_btConvexShape_setLocalScaling_1:nx,_emscripten_bind_btConvexShape_setMargin_1:qy,_emscripten_bind_btConvexTriangleMeshShape___destroy___0:Bw,_emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1:Wk,_emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2:Dk,_emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2:fv,_emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0:Hz,_emscripten_bind_btConvexTriangleMeshShape_getMargin_0:oA,_emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1:nx,_emscripten_bind_btConvexTriangleMeshShape_setMargin_1:qy,_emscripten_bind_btCylinderShapeX___destroy___0:Bw,_emscripten_bind_btCylinderShapeX_btCylinderShapeX_1:kt,_emscripten_bind_btCylinderShapeX_calculateLocalInertia_2:fv,_emscripten_bind_btCylinderShapeX_getLocalScaling_0:Hz,_emscripten_bind_btCylinderShapeX_getMargin_0:oA,_emscripten_bind_btCylinderShapeX_setLocalScaling_1:nx,_emscripten_bind_btCylinderShapeX_setMargin_1:qy,_emscripten_bind_btCylinderShapeZ___destroy___0:Bw,_emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1:jt,_emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2:fv,_emscripten_bind_btCylinderShapeZ_getLocalScaling_0:Hz,_emscripten_bind_btCylinderShapeZ_getMargin_0:oA,_emscripten_bind_btCylinderShapeZ_setLocalScaling_1:nx,_emscripten_bind_btCylinderShapeZ_setMargin_1:qy,_emscripten_bind_btCylinderShape___destroy___0:Bw,_emscripten_bind_btCylinderShape_btCylinderShape_1:hw,_emscripten_bind_btCylinderShape_calculateLocalInertia_2:fv,_emscripten_bind_btCylinderShape_getLocalScaling_0:Hz,_emscripten_bind_btCylinderShape_getMargin_0:oA,_emscripten_bind_btCylinderShape_setLocalScaling_1:nx,_emscripten_bind_btCylinderShape_setMargin_1:qy,_emscripten_bind_btDbvtBroadphase___destroy___0:Bw,_emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0:mx,_emscripten_bind_btDefaultCollisionConfiguration___destroy___0:Bw,_emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0:Rp,_emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1:Ps,_emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0:nE,_emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0:av,_emscripten_bind_btDefaultMotionState___destroy___0:Bw,_emscripten_bind_btDefaultMotionState_btDefaultMotionState_0:Ir,_emscripten_bind_btDefaultMotionState_btDefaultMotionState_1:ls,_emscripten_bind_btDefaultMotionState_btDefaultMotionState_2:ot,_emscripten_bind_btDefaultMotionState_getWorldTransform_1:Mw,_emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0:sJ,_emscripten_bind_btDefaultMotionState_setWorldTransform_1:Hw,_emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1:Jy,_emscripten_bind_btDefaultSoftBodySolver___destroy___0:Bw,_emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0:Fp,_emscripten_bind_btDefaultVehicleRaycaster___destroy___0:Bw,_emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1:Mu,_emscripten_bind_btDefaultVehicleRaycaster_castRay_3:du,_emscripten_bind_btDiscreteDynamicsWorld___destroy___0:Bw,_emscripten_bind_btDiscreteDynamicsWorld_addAction_1:vx,_emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1:dv,_emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2:nu,_emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3:Ot,_emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1:Yv,_emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2:Nu,_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1:nw,_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3:Kt,_emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4:cq,_emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3:bj,_emscripten_bind_btDiscreteDynamicsWorld_contactTest_2:ym,_emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5:nr,_emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3:Vt,_emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0:sz,_emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0:uD,_emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0:dz,_emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0:KC,_emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0:tD,_emscripten_bind_btDiscreteDynamicsWorld_getGravity_0:Mn,_emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0:Nz,_emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0:nC,_emscripten_bind_btDiscreteDynamicsWorld_rayTest_3:su,_emscripten_bind_btDiscreteDynamicsWorld_removeAction_1:Zw,_emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1:jw,_emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1:aw,_emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1:cw,_emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1:vw,_emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1:Tv,_emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1:Sv,_emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1:Nw,_emscripten_bind_btDiscreteDynamicsWorld_setGravity_1:uw,_emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1:Lu,_emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2:Pt,_emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3:St,_emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1:Yw,_emscripten_bind_btDispatcherInfo___destroy___0:nE,_emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0:sH,_emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0:bH,_emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0:cF,_emscripten_bind_btDispatcherInfo_get_m_enableSPU_0:XD,_emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0:RC,_emscripten_bind_btDispatcherInfo_get_m_stepCount_0:rG,_emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0:rH,_emscripten_bind_btDispatcherInfo_get_m_timeStep_0:gG,_emscripten_bind_btDispatcherInfo_get_m_useContinuous_0:kD,_emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0:xA,_emscripten_bind_btDispatcherInfo_get_m_useEpa_0:rE,_emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1:qF,_emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1:fF,_emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1:OB,_emscripten_bind_btDispatcherInfo_set_m_enableSPU_1:IB,_emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1:aB,_emscripten_bind_btDispatcherInfo_set_m_stepCount_1:fC,_emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1:pG,_emscripten_bind_btDispatcherInfo_set_m_timeStep_1:hH,_emscripten_bind_btDispatcherInfo_set_m_useContinuous_1:mB,_emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1:Ty,_emscripten_bind_btDispatcherInfo_set_m_useEpa_1:WB,_emscripten_bind_btDispatcher___destroy___0:Bw,_emscripten_bind_btDispatcher_getManifoldByIndexInternal_1:$v,_emscripten_bind_btDispatcher_getNumManifolds_0:rA,_emscripten_bind_btDynamicsWorld___destroy___0:Bw,_emscripten_bind_btDynamicsWorld_addAction_1:vx,_emscripten_bind_btDynamicsWorld_addCollisionObject_1:Ov,_emscripten_bind_btDynamicsWorld_addCollisionObject_2:Ju,_emscripten_bind_btDynamicsWorld_addCollisionObject_3:Ot,_emscripten_bind_btDynamicsWorld_contactPairTest_3:bj,_emscripten_bind_btDynamicsWorld_contactTest_2:ym,_emscripten_bind_btDynamicsWorld_convexSweepTest_5:nr,_emscripten_bind_btDynamicsWorld_debugDrawObject_3:Vt,_emscripten_bind_btDynamicsWorld_debugDrawWorld_0:sz,_emscripten_bind_btDynamicsWorld_getBroadphase_0:uD,_emscripten_bind_btDynamicsWorld_getDebugDrawer_0:dz,_emscripten_bind_btDynamicsWorld_getDispatchInfo_0:KC,_emscripten_bind_btDynamicsWorld_getDispatcher_0:tD,_emscripten_bind_btDynamicsWorld_getPairCache_0:Nz,_emscripten_bind_btDynamicsWorld_getSolverInfo_0:nC,_emscripten_bind_btDynamicsWorld_rayTest_3:su,_emscripten_bind_btDynamicsWorld_removeAction_1:Zw,_emscripten_bind_btDynamicsWorld_removeCollisionObject_1:jw,_emscripten_bind_btDynamicsWorld_setDebugDrawer_1:Nw,_emscripten_bind_btDynamicsWorld_updateSingleAabb_1:Yw,_emscripten_bind_btFaceArray___destroy___0:Ax,_emscripten_bind_btFaceArray_at_1:Dy,_emscripten_bind_btFaceArray_size_0:PF,_emscripten_bind_btFace___destroy___0:MA,_emscripten_bind_btFace_get_m_indices_0:NJ,_emscripten_bind_btFace_get_m_plane_1:JC,_emscripten_bind_btFace_set_m_indices_1:hB,_emscripten_bind_btFace_set_m_plane_2:nA,_emscripten_bind_btFixedConstraint___destroy___0:Bw,_emscripten_bind_btFixedConstraint_btFixedConstraint_4:uh,_emscripten_bind_btFixedConstraint_enableFeedback_1:gz,_emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btFixedConstraint_getParam_2:jv,_emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btFixedConstraint_setParam_3:yu,_emscripten_bind_btGeneric6DofConstraint___destroy___0:Bw,_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3:Hr,_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5:qq,_emscripten_bind_btGeneric6DofConstraint_enableFeedback_1:gz,_emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0:aF,_emscripten_bind_btGeneric6DofConstraint_getParam_2:jv,_emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1:Nv,_emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1:Mv,_emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1:Xv,_emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1:Wv,_emscripten_bind_btGeneric6DofConstraint_setParam_3:yu,_emscripten_bind_btGeneric6DofSpringConstraint___destroy___0:Bw,_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3:Yk,_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5:Fk,_emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1:gz,_emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2:fr,_emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0:aF,_emscripten_bind_btGeneric6DofSpringConstraint_getParam_2:jv,_emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1:Nv,_emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1:Mv,_emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2:Lx,_emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0:Ym,_emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1:_o,_emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2:Iw,_emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1:Xv,_emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1:Wv,_emscripten_bind_btGeneric6DofSpringConstraint_setParam_3:yu,_emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2:zx,_emscripten_bind_btGhostObject___destroy___0:zw,_emscripten_bind_btGhostObject_activate_0:zt,_emscripten_bind_btGhostObject_activate_1:ns,_emscripten_bind_btGhostObject_btGhostObject_0:di,_emscripten_bind_btGhostObject_forceActivationState_1:VB,_emscripten_bind_btGhostObject_getBroadphaseHandle_0:VC,_emscripten_bind_btGhostObject_getCollisionFlags_0:sD,_emscripten_bind_btGhostObject_getCollisionShape_0:rD,_emscripten_bind_btGhostObject_getFriction_0:IA,_emscripten_bind_btGhostObject_getNumOverlappingObjects_0:$z,_emscripten_bind_btGhostObject_getOverlappingObject_1:xy,_emscripten_bind_btGhostObject_getRestitution_0:lA,_emscripten_bind_btGhostObject_getRollingFriction_0:Tz,_emscripten_bind_btGhostObject_getUserIndex_0:UC,_emscripten_bind_btGhostObject_getUserPointer_0:WD,_emscripten_bind_btGhostObject_getWorldTransform_0:GF,_emscripten_bind_btGhostObject_isActive_0:gB,_emscripten_bind_btGhostObject_isKinematicObject_0:Ly,_emscripten_bind_btGhostObject_isStaticObject_0:Cz,_emscripten_bind_btGhostObject_isStaticOrKinematicObject_0:cx,_emscripten_bind_btGhostObject_setActivationState_1:Vv,_emscripten_bind_btGhostObject_setAnisotropicFriction_2:cv,_emscripten_bind_btGhostObject_setCcdMotionThreshold_1:Hy,_emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1:ny,_emscripten_bind_btGhostObject_setCollisionFlags_1:pz,_emscripten_bind_btGhostObject_setCollisionShape_1:Vw,_emscripten_bind_btGhostObject_setContactProcessingThreshold_1:Oy,_emscripten_bind_btGhostObject_setFriction_1:fB,_emscripten_bind_btGhostObject_setRestitution_1:kA,_emscripten_bind_btGhostObject_setRollingFriction_1:xz,_emscripten_bind_btGhostObject_setUserIndex_1:vA,_emscripten_bind_btGhostObject_setUserPointer_1:Sz,_emscripten_bind_btGhostObject_setWorldTransform_1:Qx,_emscripten_bind_btGhostPairCallback___destroy___0:Bw,_emscripten_bind_btGhostPairCallback_btGhostPairCallback_0:Az,_emscripten_bind_btHeightfieldTerrainShape___destroy___0:Bw,_emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9:Wf,_emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2:fv,_emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0:Hz,_emscripten_bind_btHeightfieldTerrainShape_getMargin_0:oA,_emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1:nx,_emscripten_bind_btHeightfieldTerrainShape_setMargin_1:qy,_emscripten_bind_btHingeConstraint___destroy___0:Bw,_emscripten_bind_btHingeConstraint_btHingeConstraint_2:Ie,_emscripten_bind_btHingeConstraint_btHingeConstraint_3:Ge,_emscripten_bind_btHingeConstraint_btHingeConstraint_4:Pf,_emscripten_bind_btHingeConstraint_btHingeConstraint_5:Mf,_emscripten_bind_btHingeConstraint_btHingeConstraint_6:lq,_emscripten_bind_btHingeConstraint_btHingeConstraint_7:Np,_emscripten_bind_btHingeConstraint_enableAngularMotor_3:Uu,_emscripten_bind_btHingeConstraint_enableFeedback_1:gz,_emscripten_bind_btHingeConstraint_enableMotor_1:Xz,_emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btHingeConstraint_getParam_2:jv,_emscripten_bind_btHingeConstraint_setAngularOnly_1:lz,_emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btHingeConstraint_setLimit_4:Su,_emscripten_bind_btHingeConstraint_setLimit_5:ju,_emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1:Cy,_emscripten_bind_btHingeConstraint_setMotorTarget_2:ai,_emscripten_bind_btHingeConstraint_setParam_3:yu,_emscripten_bind_btIDebugDraw___destroy___0:Bw,_emscripten_bind_btIDebugDraw_draw3dText_2:Dv,_emscripten_bind_btIDebugDraw_drawContactPoint_5:is,_emscripten_bind_btIDebugDraw_drawLine_3:Au,_emscripten_bind_btIDebugDraw_getDebugMode_0:Oz,_emscripten_bind_btIDebugDraw_reportErrorWarning_1:Ow,_emscripten_bind_btIDebugDraw_setDebugMode_1:Bx,_emscripten_bind_btIndexedMeshArray___destroy___0:hy,_emscripten_bind_btIndexedMeshArray_at_1:Xw,_emscripten_bind_btIndexedMeshArray_size_0:PF,_emscripten_bind_btIndexedMesh___destroy___0:DB,_emscripten_bind_btIndexedMesh_get_m_numTriangles_0:MH,_emscripten_bind_btIndexedMesh_set_m_numTriangles_1:rF,_emscripten_bind_btIntArray___destroy___0:hy,_emscripten_bind_btIntArray_at_1:ux,_emscripten_bind_btIntArray_size_0:PF,_emscripten_bind_btKinematicCharacterController___destroy___0:Bw,_emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3:yj,_emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4:qj,_emscripten_bind_btKinematicCharacterController_canJump_0:jy,_emscripten_bind_btKinematicCharacterController_getGhostObject_0:cF,_emscripten_bind_btKinematicCharacterController_getGravity_0:$G,_emscripten_bind_btKinematicCharacterController_getMaxSlope_0:bH,_emscripten_bind_btKinematicCharacterController_jump_0:Iy,_emscripten_bind_btKinematicCharacterController_onGround_0:Oz,_emscripten_bind_btKinematicCharacterController_playerStep_2:Ou,_emscripten_bind_btKinematicCharacterController_preStep_1:gw,_emscripten_bind_btKinematicCharacterController_setFallSpeed_1:mF,_emscripten_bind_btKinematicCharacterController_setGravity_1:NF,_emscripten_bind_btKinematicCharacterController_setJumpSpeed_1:qF,_emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1:oF,_emscripten_bind_btKinematicCharacterController_setMaxSlope_1:Aw,_emscripten_bind_btKinematicCharacterController_setUpAxis_1:Ex,_emscripten_bind_btKinematicCharacterController_setUpInterpolate_1:vv,_emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1:yv,_emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2:au,_emscripten_bind_btKinematicCharacterController_setWalkDirection_1:uv,_emscripten_bind_btKinematicCharacterController_updateAction_2:xv,_emscripten_bind_btKinematicCharacterController_warp_1:pw,_emscripten_bind_btManifoldPoint___destroy___0:nE,_emscripten_bind_btManifoldPoint_getAppliedImpulse_0:zz,_emscripten_bind_btManifoldPoint_getDistance_0:gA,_emscripten_bind_btManifoldPoint_getPositionWorldOnA_0:aF,_emscripten_bind_btManifoldPoint_getPositionWorldOnB_0:LA,_emscripten_bind_btManifoldPoint_get_m_localPointA_0:NJ,_emscripten_bind_btManifoldPoint_get_m_localPointB_0:PG,_emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0:kG,_emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0:MI,_emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0:IH,_emscripten_bind_btManifoldPoint_get_m_userPersistentData_0:gE,_emscripten_bind_btManifoldPoint_set_m_localPointA_1:Sr,_emscripten_bind_btManifoldPoint_set_m_localPointB_1:Br,_emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1:ur,_emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1:Kr,_emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1:qr,_emscripten_bind_btManifoldPoint_set_m_userPersistentData_1:$A,_emscripten_bind_btMatrix3x3___destroy___0:nE,_emscripten_bind_btMatrix3x3_getRotation_1:Ez,_emscripten_bind_btMatrix3x3_getRow_1:jp,_emscripten_bind_btMatrix3x3_setEulerZYX_3:fx,_emscripten_bind_btMotionState___destroy___0:Bw,_emscripten_bind_btMotionState_getWorldTransform_1:Mw,_emscripten_bind_btMotionState_setWorldTransform_1:Hw,_emscripten_bind_btMultiSphereShape___destroy___0:Bw,_emscripten_bind_btMultiSphereShape_btMultiSphereShape_3:Td,_emscripten_bind_btMultiSphereShape_calculateLocalInertia_2:fv,_emscripten_bind_btMultiSphereShape_getLocalScaling_0:Hz,_emscripten_bind_btMultiSphereShape_setLocalScaling_1:nx,_emscripten_bind_btOverlappingPairCache___destroy___0:Bw,_emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0:Lw,_emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1:aw,_emscripten_bind_btOverlappingPairCallback___destroy___0:Bw,_emscripten_bind_btPairCachingGhostObject___destroy___0:zw,_emscripten_bind_btPairCachingGhostObject_activate_0:zt,_emscripten_bind_btPairCachingGhostObject_activate_1:ns,_emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0:gh,_emscripten_bind_btPairCachingGhostObject_forceActivationState_1:VB,_emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0:VC,_emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0:sD,_emscripten_bind_btPairCachingGhostObject_getCollisionShape_0:rD,_emscripten_bind_btPairCachingGhostObject_getFriction_0:IA,_emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0:$z,_emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1:xy,_emscripten_bind_btPairCachingGhostObject_getRestitution_0:lA,_emscripten_bind_btPairCachingGhostObject_getRollingFriction_0:Tz,_emscripten_bind_btPairCachingGhostObject_getUserIndex_0:UC,_emscripten_bind_btPairCachingGhostObject_getUserPointer_0:WD,_emscripten_bind_btPairCachingGhostObject_getWorldTransform_0:GF,_emscripten_bind_btPairCachingGhostObject_isActive_0:gB,_emscripten_bind_btPairCachingGhostObject_isKinematicObject_0:Ly,_emscripten_bind_btPairCachingGhostObject_isStaticObject_0:Cz,_emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0:cx,_emscripten_bind_btPairCachingGhostObject_setActivationState_1:Vv,_emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2:cv,_emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1:Hy,_emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1:ny,_emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1:pz,_emscripten_bind_btPairCachingGhostObject_setCollisionShape_1:Vw,_emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1:Oy,_emscripten_bind_btPairCachingGhostObject_setFriction_1:fB,_emscripten_bind_btPairCachingGhostObject_setRestitution_1:kA,_emscripten_bind_btPairCachingGhostObject_setRollingFriction_1:xz,_emscripten_bind_btPairCachingGhostObject_setUserIndex_1:vA,_emscripten_bind_btPairCachingGhostObject_setUserPointer_1:Sz,_emscripten_bind_btPairCachingGhostObject_setWorldTransform_1:Qx,_emscripten_bind_btPersistentManifold___destroy___0:DB,_emscripten_bind_btPersistentManifold_btPersistentManifold_0:hi,_emscripten_bind_btPersistentManifold_getBody0_0:jD,_emscripten_bind_btPersistentManifold_getBody1_0:iD,_emscripten_bind_btPersistentManifold_getContactPoint_1:by,_emscripten_bind_btPersistentManifold_getNumContacts_0:eC,_emscripten_bind_btPoint2PointConstraint___destroy___0:Bw,_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2:Yh,_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4:Aj,_emscripten_bind_btPoint2PointConstraint_enableFeedback_1:gz,_emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btPoint2PointConstraint_getParam_2:jv,_emscripten_bind_btPoint2PointConstraint_getPivotInA_0:KA,_emscripten_bind_btPoint2PointConstraint_getPivotInB_0:JA,_emscripten_bind_btPoint2PointConstraint_get_m_setting_0:nI,_emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btPoint2PointConstraint_setParam_3:yu,_emscripten_bind_btPoint2PointConstraint_setPivotA_1:_x,_emscripten_bind_btPoint2PointConstraint_setPivotB_1:Zx,_emscripten_bind_btPoint2PointConstraint_set_m_setting_1:Js,_emscripten_bind_btQuadWord___destroy___0:nE,_emscripten_bind_btQuadWord_setW_1:qE,_emscripten_bind_btQuadWord_setX_1:ME,_emscripten_bind_btQuadWord_setY_1:LE,_emscripten_bind_btQuadWord_setZ_1:KE,_emscripten_bind_btQuadWord_w_0:$E,_emscripten_bind_btQuadWord_x_0:fG,_emscripten_bind_btQuadWord_y_0:_E,_emscripten_bind_btQuadWord_z_0:ZE,_emscripten_bind_btQuaternion___destroy___0:nE,_emscripten_bind_btQuaternion_angleShortestPath_1:Xy,_emscripten_bind_btQuaternion_angle_1:SB,_emscripten_bind_btQuaternion_btQuaternion_4:Bo,_emscripten_bind_btQuaternion_dot_1:BC,_emscripten_bind_btQuaternion_getAngleShortestPath_0:lB,_emscripten_bind_btQuaternion_getAngle_0:NB,_emscripten_bind_btQuaternion_getAxis_0:no,_emscripten_bind_btQuaternion_inverse_0:mo,_emscripten_bind_btQuaternion_length2_0:lF,_emscripten_bind_btQuaternion_length_0:HF,_emscripten_bind_btQuaternion_normalize_0:bF,_emscripten_bind_btQuaternion_normalized_0:jo,_emscripten_bind_btQuaternion_op_add_1:AC,_emscripten_bind_btQuaternion_op_div_1:hD,_emscripten_bind_btQuaternion_op_mul_1:nt,_emscripten_bind_btQuaternion_op_mulq_1:mC,_emscripten_bind_btQuaternion_op_sub_1:zC,_emscripten_bind_btQuaternion_setEulerZYX_3:ow,_emscripten_bind_btQuaternion_setRotation_2:tx,_emscripten_bind_btQuaternion_setValue_4:ap,_emscripten_bind_btQuaternion_setW_1:qE,_emscripten_bind_btQuaternion_setX_1:ME,_emscripten_bind_btQuaternion_setY_1:LE,_emscripten_bind_btQuaternion_setZ_1:KE,_emscripten_bind_btQuaternion_w_0:$E,_emscripten_bind_btQuaternion_x_0:fG,_emscripten_bind_btQuaternion_y_0:_E,_emscripten_bind_btQuaternion_z_0:ZE,_emscripten_bind_btRaycastVehicle___destroy___0:Bw,_emscripten_bind_btRaycastVehicle_addWheel_7:Vc,_emscripten_bind_btRaycastVehicle_applyEngineForce_2:Iv,_emscripten_bind_btRaycastVehicle_btRaycastVehicle_3:rk,_emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0:dC,_emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0:Sy,_emscripten_bind_btRaycastVehicle_getForwardAxis_0:QC,_emscripten_bind_btRaycastVehicle_getForwardVector_0:mn,_emscripten_bind_btRaycastVehicle_getNumWheels_0:cC,_emscripten_bind_btRaycastVehicle_getRightAxis_0:gD,_emscripten_bind_btRaycastVehicle_getRigidBody_0:fD,_emscripten_bind_btRaycastVehicle_getSteeringValue_1:lx,_emscripten_bind_btRaycastVehicle_getUpAxis_0:KD,_emscripten_bind_btRaycastVehicle_getUserConstraintId_0:bC,_emscripten_bind_btRaycastVehicle_getUserConstraintType_0:RB,_emscripten_bind_btRaycastVehicle_getWheelInfo_1:Wz,_emscripten_bind_btRaycastVehicle_getWheelTransformWS_1:wy,_emscripten_bind_btRaycastVehicle_rayCast_1:yz,_emscripten_bind_btRaycastVehicle_resetSuspension_0:cl,_emscripten_bind_btRaycastVehicle_setBrake_2:mw,_emscripten_bind_btRaycastVehicle_setCoordinateSystem_3:Jt,_emscripten_bind_btRaycastVehicle_setPitchControl_1:Dz,_emscripten_bind_btRaycastVehicle_setSteeringValue_2:Hv,_emscripten_bind_btRaycastVehicle_setUserConstraintId_1:oy,_emscripten_bind_btRaycastVehicle_setUserConstraintType_1:Yx,_emscripten_bind_btRaycastVehicle_updateAction_2:xv,_emscripten_bind_btRaycastVehicle_updateFriction_1:ex,_emscripten_bind_btRaycastVehicle_updateSuspension_1:Nk,_emscripten_bind_btRaycastVehicle_updateVehicle_1:kx,_emscripten_bind_btRaycastVehicle_updateWheelTransform_2:mt,_emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1:Cu,_emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2:Et,_emscripten_bind_btRigidBodyConstructionInfo___destroy___0:nE,_emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3:fn,_emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4:Iq,_emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0:wA,_emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0:Mz,_emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0:tB,_emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0:_A,_emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0:Vz,_emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0:IC,_emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0:kB,_emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0:BD,_emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0:_G,_emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0:sB,_emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0:WC,_emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0:lC,_emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1:sy,_emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1:Rx,_emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1:kz,_emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1:rz,_emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1:Xx,_emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1:mA,_emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1:cz,_emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1:ZA,_emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1:dF,_emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1:jz,_emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1:EA,_emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1:aE,_emscripten_bind_btRigidBody___destroy___0:zw,_emscripten_bind_btRigidBody_activate_0:zt,_emscripten_bind_btRigidBody_activate_1:ns,_emscripten_bind_btRigidBody_applyCentralForce_1:eu,_emscripten_bind_btRigidBody_applyCentralImpulse_1:Rt,_emscripten_bind_btRigidBody_applyCentralLocalForce_1:At,_emscripten_bind_btRigidBody_applyForce_2:yx,_emscripten_bind_btRigidBody_applyGravity_0:Xn,_emscripten_bind_btRigidBody_applyImpulse_2:Ww,_emscripten_bind_btRigidBody_applyLocalTorque_1:iu,_emscripten_bind_btRigidBody_applyTorqueImpulse_1:_t,_emscripten_bind_btRigidBody_applyTorque_1:Iu,_emscripten_bind_btRigidBody_btRigidBody_1:Rh,_emscripten_bind_btRigidBody_forceActivationState_1:VB,_emscripten_bind_btRigidBody_getAabb_2:Os,_emscripten_bind_btRigidBody_getAngularDamping_0:Uz,_emscripten_bind_btRigidBody_getAngularFactor_0:yC,_emscripten_bind_btRigidBody_getAngularVelocity_0:QB,_emscripten_bind_btRigidBody_getBroadphaseHandle_0:VC,_emscripten_bind_btRigidBody_getBroadphaseProxy_0:VC,_emscripten_bind_btRigidBody_getCenterOfMassTransform_0:GF,_emscripten_bind_btRigidBody_getCollisionFlags_0:sD,_emscripten_bind_btRigidBody_getCollisionShape_0:rD,_emscripten_bind_btRigidBody_getFriction_0:IA,_emscripten_bind_btRigidBody_getGravity_0:zE,_emscripten_bind_btRigidBody_getLinearDamping_0:_z,_emscripten_bind_btRigidBody_getLinearFactor_0:PC,_emscripten_bind_btRigidBody_getLinearVelocity_0:aC,_emscripten_bind_btRigidBody_getMotionState_0:JD,_emscripten_bind_btRigidBody_getRestitution_0:lA,_emscripten_bind_btRigidBody_getRollingFriction_0:Tz,_emscripten_bind_btRigidBody_getUserIndex_0:UC,_emscripten_bind_btRigidBody_getUserPointer_0:WD,_emscripten_bind_btRigidBody_getWorldTransform_0:GF,_emscripten_bind_btRigidBody_isActive_0:gB,_emscripten_bind_btRigidBody_isKinematicObject_0:Ly,_emscripten_bind_btRigidBody_isStaticObject_0:Cz,_emscripten_bind_btRigidBody_isStaticOrKinematicObject_0:cx,_emscripten_bind_btRigidBody_setActivationState_1:Vv,_emscripten_bind_btRigidBody_setAngularFactor_1:Ry,_emscripten_bind_btRigidBody_setAngularVelocity_1:ry,_emscripten_bind_btRigidBody_setAnisotropicFriction_2:cv,_emscripten_bind_btRigidBody_setCcdMotionThreshold_1:Hy,_emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1:ny,_emscripten_bind_btRigidBody_setCenterOfMassTransform_1:Kw,_emscripten_bind_btRigidBody_setCollisionFlags_1:pz,_emscripten_bind_btRigidBody_setCollisionShape_1:Vw,_emscripten_bind_btRigidBody_setContactProcessingThreshold_1:Oy,_emscripten_bind_btRigidBody_setDamping_2:ln,_emscripten_bind_btRigidBody_setFriction_1:fB,_emscripten_bind_btRigidBody_setGravity_1:pm,_emscripten_bind_btRigidBody_setLinearFactor_1:bz,_emscripten_bind_btRigidBody_setLinearVelocity_1:By,_emscripten_bind_btRigidBody_setMassProps_2:dj,_emscripten_bind_btRigidBody_setMotionState_1:Qy,_emscripten_bind_btRigidBody_setRestitution_1:kA,_emscripten_bind_btRigidBody_setRollingFriction_1:xz,_emscripten_bind_btRigidBody_setSleepingThresholds_2:dx,_emscripten_bind_btRigidBody_setUserIndex_1:vA,_emscripten_bind_btRigidBody_setUserPointer_1:Sz,_emscripten_bind_btRigidBody_setWorldTransform_1:Qx,_emscripten_bind_btRigidBody_upcast_1:DA,_emscripten_bind_btRigidBody_updateInertiaTensor_0:Yi,_emscripten_bind_btScalarArray___destroy___0:hy,_emscripten_bind_btScalarArray_at_1:Rw,_emscripten_bind_btScalarArray_size_0:PF,_emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0:Bw,_emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0:lj,_emscripten_bind_btShapeHull___destroy___0:Ng,_emscripten_bind_btShapeHull_btShapeHull_1:Yo,_emscripten_bind_btShapeHull_buildHull_1:rc,_emscripten_bind_btShapeHull_getVertexPointer_0:xC,_emscripten_bind_btShapeHull_numVertices_0:rG,_emscripten_bind_btSliderConstraint___destroy___0:Bw,_emscripten_bind_btSliderConstraint_btSliderConstraint_3:Kd,_emscripten_bind_btSliderConstraint_btSliderConstraint_5:xe,_emscripten_bind_btSliderConstraint_enableFeedback_1:gz,_emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btSliderConstraint_getParam_2:jv,_emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btSliderConstraint_setLowerAngLimit_1:Py,_emscripten_bind_btSliderConstraint_setLowerLinLimit_1:Oy,_emscripten_bind_btSliderConstraint_setParam_3:yu,_emscripten_bind_btSliderConstraint_setUpperAngLimit_1:Ny,_emscripten_bind_btSliderConstraint_setUpperLinLimit_1:My,_emscripten_bind_btSoftBodyArray___destroy___0:hy,_emscripten_bind_btSoftBodyArray_at_1:ux,_emscripten_bind_btSoftBodyArray_size_0:PF,_emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4:lg,_emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4:ds,_emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5:Jc,_emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10:fc,_emscripten_bind_btSoftBodyHelpers_CreatePatch_9:lc,_emscripten_bind_btSoftBodyHelpers_CreateRope_5:Rf,_emscripten_bind_btSoftBodyHelpers___destroy___0:nE,_emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0:dI,_emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0:Bw,_emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0:np,_emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1:Or,_emscripten_bind_btSoftBodySolver___destroy___0:Bw,_emscripten_bind_btSoftBodyWorldInfo___destroy___0:Kx,_emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0:iz,_emscripten_bind_btSoftBodyWorldInfo_get_air_density_0:gG,_emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0:OE,_emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0:NE,_emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0:BI,_emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0:rH,_emscripten_bind_btSoftBodyWorldInfo_get_water_density_0:nH,_emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0:PG,_emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0:BH,_emscripten_bind_btSoftBodyWorldInfo_set_air_density_1:hH,_emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1:FB,_emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1:EB,_emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1:Ur,_emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1:pG,_emscripten_bind_btSoftBodyWorldInfo_set_water_density_1:OG,_emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1:Br,_emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1:NG,_emscripten_bind_btSoftBody___destroy___0:zw,_emscripten_bind_btSoftBody_activate_0:zt,_emscripten_bind_btSoftBody_activate_1:ns,_emscripten_bind_btSoftBody_addAeroForceToNode_2:lw,_emscripten_bind_btSoftBody_addForce_1:Xl,_emscripten_bind_btSoftBody_addForce_2:kn,_emscripten_bind_btSoftBody_appendAnchor_4:_e,_emscripten_bind_btSoftBody_appendFace_4:xu,_emscripten_bind_btSoftBody_appendLink_4:wu,_emscripten_bind_btSoftBody_appendMaterial_0:ID,_emscripten_bind_btSoftBody_appendNode_2:Xb,_emscripten_bind_btSoftBody_appendTetra_5:Oe,_emscripten_bind_btSoftBody_btSoftBody_4:Tr,_emscripten_bind_btSoftBody_checkFace_3:Zj,_emscripten_bind_btSoftBody_checkLink_2:bl,_emscripten_bind_btSoftBody_forceActivationState_1:VB,_emscripten_bind_btSoftBody_generateBendingConstraints_2:Ub,_emscripten_bind_btSoftBody_generateClusters_1:qz,_emscripten_bind_btSoftBody_generateClusters_2:Dx,_emscripten_bind_btSoftBody_getBroadphaseHandle_0:VC,_emscripten_bind_btSoftBody_getCollisionFlags_0:sD,_emscripten_bind_btSoftBody_getCollisionShape_0:rD,_emscripten_bind_btSoftBody_getFriction_0:IA,_emscripten_bind_btSoftBody_getRestitution_0:lA,_emscripten_bind_btSoftBody_getRollingFriction_0:Tz,_emscripten_bind_btSoftBody_getTotalMass_0:Co,_emscripten_bind_btSoftBody_getUserIndex_0:UC,_emscripten_bind_btSoftBody_getUserPointer_0:WD,_emscripten_bind_btSoftBody_getWorldTransform_0:GF,_emscripten_bind_btSoftBody_get_m_anchors_0:LH,_emscripten_bind_btSoftBody_get_m_cfg_0:cI,_emscripten_bind_btSoftBody_get_m_materials_0:zH,_emscripten_bind_btSoftBody_get_m_nodes_0:TH,_emscripten_bind_btSoftBody_isActive_0:gB,_emscripten_bind_btSoftBody_isKinematicObject_0:Ly,_emscripten_bind_btSoftBody_isStaticObject_0:Cz,_emscripten_bind_btSoftBody_isStaticOrKinematicObject_0:cx,_emscripten_bind_btSoftBody_rotate_1:oj,_emscripten_bind_btSoftBody_scale_1:Xd,_emscripten_bind_btSoftBody_setActivationState_1:Vv,_emscripten_bind_btSoftBody_setAnisotropicFriction_2:cv,_emscripten_bind_btSoftBody_setCcdMotionThreshold_1:Hy,_emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1:ny,_emscripten_bind_btSoftBody_setCollisionFlags_1:pz,_emscripten_bind_btSoftBody_setCollisionShape_1:Vw,_emscripten_bind_btSoftBody_setContactProcessingThreshold_1:Oy,_emscripten_bind_btSoftBody_setFriction_1:fB,_emscripten_bind_btSoftBody_setMass_2:$t,_emscripten_bind_btSoftBody_setRestitution_1:kA,_emscripten_bind_btSoftBody_setRollingFriction_1:xz,_emscripten_bind_btSoftBody_setTotalMass_2:tg,_emscripten_bind_btSoftBody_setUserIndex_1:vA,_emscripten_bind_btSoftBody_setUserPointer_1:Sz,_emscripten_bind_btSoftBody_setWorldTransform_1:Qx,_emscripten_bind_btSoftBody_set_m_anchors_1:jx,_emscripten_bind_btSoftBody_set_m_cfg_1:CA,_emscripten_bind_btSoftBody_set_m_materials_1:Gw,_emscripten_bind_btSoftBody_set_m_nodes_1:Jx,_emscripten_bind_btSoftBody_transform_1:uA,_emscripten_bind_btSoftBody_translate_1:pl,_emscripten_bind_btSoftBody_upcast_1:SA,_emscripten_bind_btSoftRigidDynamicsWorld___destroy___0:Bw,_emscripten_bind_btSoftRigidDynamicsWorld_addAction_1:vx,_emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1:dv,_emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2:nu,_emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3:Ot,_emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1:Yv,_emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2:Nu,_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1:nw,_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3:Kt,_emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3:Ai,_emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5:Ae,_emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3:bj,_emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2:ym,_emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5:nr,_emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3:Vt,_emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0:sz,_emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0:uD,_emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0:dz,_emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0:KC,_emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0:tD,_emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0:Kn,_emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0:Nz,_emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0:wz,_emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0:nC,_emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0:jA,_emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3:su,_emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1:Zw,_emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1:jw,_emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1:aw,_emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1:cw,_emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1:Xh,_emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1:vw,_emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1:Tv,_emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1:Sv,_emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1:Nw,_emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1:uw,_emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1:Lu,_emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2:Pt,_emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3:St,_emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1:Yw,_emscripten_bind_btSphereShape___destroy___0:Bw,_emscripten_bind_btSphereShape_btSphereShape_1:Px,_emscripten_bind_btSphereShape_calculateLocalInertia_2:fv,_emscripten_bind_btSphereShape_getLocalScaling_0:Hz,_emscripten_bind_btSphereShape_getMargin_0:oA,_emscripten_bind_btSphereShape_setLocalScaling_1:nx,_emscripten_bind_btSphereShape_setMargin_1:qy,_emscripten_bind_btStaticPlaneShape___destroy___0:Bw,_emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2:ll,_emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2:fv,_emscripten_bind_btStaticPlaneShape_getLocalScaling_0:Hz,_emscripten_bind_btStaticPlaneShape_setLocalScaling_1:nx,_emscripten_bind_btStridingMeshInterface___destroy___0:Bw,_emscripten_bind_btStridingMeshInterface_setScaling_1:tA,_emscripten_bind_btTransform___destroy___0:nE,_emscripten_bind_btTransform_btTransform_0:JI,_emscripten_bind_btTransform_btTransform_2:$u,_emscripten_bind_btTransform_getBasis_0:yH,_emscripten_bind_btTransform_getOrigin_0:aF,_emscripten_bind_btTransform_getRotation_0:io,_emscripten_bind_btTransform_inverse_0:nq,_emscripten_bind_btTransform_op_mul_1:OC,_emscripten_bind_btTransform_setFromOpenGLMatrix_1:hz,_emscripten_bind_btTransform_setIdentity_0:GE,_emscripten_bind_btTransform_setOrigin_1:BA,_emscripten_bind_btTransform_setRotation_1:RA,_emscripten_bind_btTriangleMeshShape___destroy___0:Bw,_emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2:fv,_emscripten_bind_btTriangleMeshShape_getLocalScaling_0:Hz,_emscripten_bind_btTriangleMeshShape_setLocalScaling_1:nx,_emscripten_bind_btTriangleMesh___destroy___0:Bw,_emscripten_bind_btTriangleMesh_addIndex_1:yB,_emscripten_bind_btTriangleMesh_addTriangle_3:bn,_emscripten_bind_btTriangleMesh_addTriangle_4:Im,_emscripten_bind_btTriangleMesh_btTriangleMesh_0:bx,_emscripten_bind_btTriangleMesh_btTriangleMesh_1:Gv,_emscripten_bind_btTriangleMesh_btTriangleMesh_2:Gu,_emscripten_bind_btTriangleMesh_findOrAddVertex_2:_v,_emscripten_bind_btTriangleMesh_getIndexedMeshArray_0:Iz,_emscripten_bind_btTriangleMesh_setScaling_1:tA,_emscripten_bind_btTypedConstraint___destroy___0:Bw,_emscripten_bind_btTypedConstraint_enableFeedback_1:gz,_emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0:iy,_emscripten_bind_btTypedConstraint_getParam_2:jv,_emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1:Fw,_emscripten_bind_btTypedConstraint_setParam_3:yu,_emscripten_bind_btVector3Array___destroy___0:hy,_emscripten_bind_btVector3Array_at_1:iA,_emscripten_bind_btVector3Array_size_0:PF,_emscripten_bind_btVector3___destroy___0:DB,_emscripten_bind_btVector3_btVector3_0:tI,_emscripten_bind_btVector3_btVector3_3:Hp,_emscripten_bind_btVector3_dot_1:$s,_emscripten_bind_btVector3_length_0:my,_emscripten_bind_btVector3_normalize_0:$F,_emscripten_bind_btVector3_op_add_1:HD,_emscripten_bind_btVector3_op_mul_1:yt,_emscripten_bind_btVector3_op_sub_1:GD,_emscripten_bind_btVector3_rotate_2:Wn,_emscripten_bind_btVector3_setValue_3:tq,_emscripten_bind_btVector3_setX_1:ME,_emscripten_bind_btVector3_setY_1:LE,_emscripten_bind_btVector3_setZ_1:KE,_emscripten_bind_btVector3_x_0:fG,_emscripten_bind_btVector3_y_0:_E,_emscripten_bind_btVector3_z_0:ZE,_emscripten_bind_btVector4___destroy___0:DB,_emscripten_bind_btVector4_btVector4_0:tI,_emscripten_bind_btVector4_btVector4_4:Ao,_emscripten_bind_btVector4_dot_1:$s,_emscripten_bind_btVector4_length_0:my,_emscripten_bind_btVector4_normalize_0:$F,_emscripten_bind_btVector4_op_add_1:HD,_emscripten_bind_btVector4_op_mul_1:yt,_emscripten_bind_btVector4_op_sub_1:GD,_emscripten_bind_btVector4_rotate_2:Vn,_emscripten_bind_btVector4_setValue_4:ap,_emscripten_bind_btVector4_setX_1:ME,_emscripten_bind_btVector4_setY_1:LE,_emscripten_bind_btVector4_setZ_1:KE,_emscripten_bind_btVector4_w_0:$E,_emscripten_bind_btVector4_x_0:fG,_emscripten_bind_btVector4_y_0:_E,_emscripten_bind_btVector4_z_0:ZE,_emscripten_bind_btVehicleRaycasterResult___destroy___0:nE,_emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0:pH,_emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0:PG,_emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0:NJ,_emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1:oF,_emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1:Br,_emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1:Sr,_emscripten_bind_btVehicleRaycaster___destroy___0:Bw,_emscripten_bind_btVehicleRaycaster_castRay_3:du,_emscripten_bind_btVehicleTuning_btVehicleTuning_0:Ay,_emscripten_bind_btVehicleTuning_get_m_frictionSlip_0:qH,_emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0:oH,_emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0:rH,_emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0:nH,_emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0:BH,_emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0:gG,_emscripten_bind_btVehicleTuning_set_m_frictionSlip_1:pF,_emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1:nF,_emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1:pG,_emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1:OG,_emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1:NG,_emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1:hH,_emscripten_bind_btWheelInfoConstructionInfo___destroy___0:nE,_emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0:CB,_emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0:NJ,_emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0:gH,_emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0:FG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0:HG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0:cH,_emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0:GG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0:IH,_emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0:PG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0:IG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0:lG,_emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0:mG,_emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1:Rz,_emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1:Sr,_emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1:wF,_emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1:uE,_emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1:BE,_emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1:gF,_emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1:AE,_emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1:qr,_emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1:Br,_emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1:CE,_emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1:jE,_emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1:kE,_emscripten_bind_btWheelInfo___destroy___0:nE,_emscripten_bind_btWheelInfo_btWheelInfo_1:yw,_emscripten_bind_btWheelInfo_getSuspensionRestLength_0:FE,_emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0:VD,_emscripten_bind_btWheelInfo_get_m_brake_0:eG,_emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0:QF,_emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0:wC,_emscripten_bind_btWheelInfo_get_m_deltaRotation_0:kF,_emscripten_bind_btWheelInfo_get_m_engineForce_0:FF,_emscripten_bind_btWheelInfo_get_m_frictionSlip_0:yF,_emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0:yE,_emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0:fE,_emscripten_bind_btWheelInfo_get_m_raycastInfo_0:NJ,_emscripten_bind_btWheelInfo_get_m_rollInfluence_0:jF,_emscripten_bind_btWheelInfo_get_m_rotation_0:XF,_emscripten_bind_btWheelInfo_get_m_skidInfo_0:WF,_emscripten_bind_btWheelInfo_get_m_steering_0:VF,_emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0:eD,_emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0:FE,_emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0:pE,_emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0:UG,_emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0:qG,_emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0:AD,_emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0:FD,_emscripten_bind_btWheelInfo_get_m_wheelsRadius_0:xF,_emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0:eE,_emscripten_bind_btWheelInfo_get_m_worldTransform_0:oI,_emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1:HB,_emscripten_bind_btWheelInfo_set_m_brake_1:ED,_emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1:er,_emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1:fA,_emscripten_bind_btWheelInfo_set_m_deltaRotation_1:kC,_emscripten_bind_btWheelInfo_set_m_engineForce_1:HC,_emscripten_bind_btWheelInfo_set_m_frictionSlip_1:vC,_emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1:tC,_emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1:rB,_emscripten_bind_btWheelInfo_set_m_raycastInfo_1:Ws,_emscripten_bind_btWheelInfo_set_m_rollInfluence_1:jC,_emscripten_bind_btWheelInfo_set_m_rotation_1:dD,_emscripten_bind_btWheelInfo_set_m_skidInfo_1:cD,_emscripten_bind_btWheelInfo_set_m_steering_1:bD,_emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1:HA,_emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1:qB,_emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1:BB,_emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1:yr,_emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1:pr,_emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1:YA,_emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1:eB,_emscripten_bind_btWheelInfo_set_m_wheelsRadius_1:uC,_emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1:pB,_emscripten_bind_btWheelInfo_set_m_worldTransform_1:dA,_emscripten_bind_btWheelInfo_updateWheel_2:ji,_emscripten_bind_tAnchorArray___destroy___0:hy,_emscripten_bind_tAnchorArray_at_1:Lq,_emscripten_bind_tAnchorArray_clear_0:uF,_emscripten_bind_tAnchorArray_pop_back_0:QA,_emscripten_bind_tAnchorArray_push_back_1:Ix,_emscripten_bind_tAnchorArray_size_0:PF,_emscripten_bind_tMaterialArray___destroy___0:hy,_emscripten_bind_tMaterialArray_at_1:ux,_emscripten_bind_tMaterialArray_size_0:PF,_emscripten_bind_tNodeArray___destroy___0:hy,_emscripten_bind_tNodeArray_at_1:xx,_emscripten_bind_tNodeArray_size_0:PF,_emscripten_enum_PHY_ScalarType_PHY_DOUBLE:RJ,_emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88:kJ,_emscripten_enum_PHY_ScalarType_PHY_FLOAT:yJ,_emscripten_enum_PHY_ScalarType_PHY_INTEGER:uJ,_emscripten_enum_PHY_ScalarType_PHY_SHORT:xJ,_emscripten_enum_PHY_ScalarType_PHY_UCHAR:wJ,_emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM:xJ,_emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP:RJ,_emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM:kJ,_emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP:uJ,_free:uc,_i64Add:Lv,_i64Subtract:tv,_llvm_bswap_i16:jI,_llvm_bswap_i32:$B,_malloc:kb,_memcpy:vh,_memmove:mp,_memset:hk,_sbrk:bo,dynCall_di:DG,dynCall_did:cE,dynCall_diidii:Tu,dynCall_diii:oz,dynCall_diiidii:xt,dynCall_diiii:sw,dynCall_diiiii:Fu,dynCall_diiiiiiii:Ar,dynCall_diiiiiiiii:Gq,dynCall_diiiiiiiiii:Mp,dynCall_ii:iG,dynCall_iidid:sx,dynCall_iii:iC,dynCall_iiid:Lz,dynCall_iiii:Wy,dynCall_iiiii:fw,dynCall_iiiiiii:et,dynCall_iiiiiiii:bs,dynCall_iiiiiiiiii:Aq,dynCall_iiiiiiiiiii:Jp,dynCall_v:tJ,dynCall_vi:EH,dynCall_vid:XE,dynCall_vidd:MB,dynCall_viddiii:mu,dynCall_vidi:WA,dynCall_vidii:Wx,dynCall_vii:bE,dynCall_viid:dB,dynCall_viidi:Vx,dynCall_viidii:mv,dynCall_viii:cA,dynCall_viiid:Ox,dynCall_viiidii:Zt,dynCall_viiii:Uw,dynCall_viiiid:lv,dynCall_viiiidddddidi:tp,dynCall_viiiiddddiid:Vp,dynCall_viiiii:Xu,dynCall_viiiiid:Yt,dynCall_viiiiii:Ht,dynCall_viiiiiii:ts,dynCall_viiiiiiiid:Wq,dynCall_viiiiiiiii:Oq,dynCall_viiiiiiiiii:Yp,establishStackSpace:TG,stackAlloc:sA,stackRestore:KJ,stackSave:PJ}}) + + +// EMSCRIPTEN_END_ASM +(gb,ib,buffer),Sa=d.__GLOBAL__sub_I_btQuickprof_cpp=g.__GLOBAL__sub_I_btQuickprof_cpp,hb=d.__ZSt18uncaught_exceptionv=g.__ZSt18uncaught_exceptionv;d.___cxa_can_catch=g.___cxa_can_catch;d.___cxa_is_pointer_type=g.___cxa_is_pointer_type;d.___muldi3=g.___muldi3;d.___udivdi3=g.___udivdi3;d._bitshift64Lshr=g._bitshift64Lshr;d._bitshift64Shl=g._bitshift64Shl; +var jb=d._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=g._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2,kb=d._emscripten_bind_AllHitsRayResultCallback___destroy___0=g._emscripten_bind_AllHitsRayResultCallback___destroy___0,lb=d._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0,mb=d._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0, +nb=d._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0,ob=d._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0,pb=d._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0,qb=d._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0, +rb=d._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0,sb=d._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0,tb=d._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0,ub=d._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=g._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0, +vb=d._emscripten_bind_AllHitsRayResultCallback_hasHit_0=g._emscripten_bind_AllHitsRayResultCallback_hasHit_0,wb=d._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1,xb=d._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1,yb=d._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1, +zb=d._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1,Ab=d._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1,Bb=d._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1,Cb=d._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1, +Db=d._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1,Eb=d._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1,Fb=d._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=g._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1,Gb=d._emscripten_bind_Anchor___destroy___0=g._emscripten_bind_Anchor___destroy___0,Hb=d._emscripten_bind_Anchor_get_m_body_0= +g._emscripten_bind_Anchor_get_m_body_0,Ib=d._emscripten_bind_Anchor_get_m_c0_0=g._emscripten_bind_Anchor_get_m_c0_0,Jb=d._emscripten_bind_Anchor_get_m_c1_0=g._emscripten_bind_Anchor_get_m_c1_0,Kb=d._emscripten_bind_Anchor_get_m_c2_0=g._emscripten_bind_Anchor_get_m_c2_0,Lb=d._emscripten_bind_Anchor_get_m_influence_0=g._emscripten_bind_Anchor_get_m_influence_0,Mb=d._emscripten_bind_Anchor_get_m_local_0=g._emscripten_bind_Anchor_get_m_local_0,Nb=d._emscripten_bind_Anchor_get_m_node_0=g._emscripten_bind_Anchor_get_m_node_0, +Ob=d._emscripten_bind_Anchor_set_m_body_1=g._emscripten_bind_Anchor_set_m_body_1,Pb=d._emscripten_bind_Anchor_set_m_c0_1=g._emscripten_bind_Anchor_set_m_c0_1,Qb=d._emscripten_bind_Anchor_set_m_c1_1=g._emscripten_bind_Anchor_set_m_c1_1,Sb=d._emscripten_bind_Anchor_set_m_c2_1=g._emscripten_bind_Anchor_set_m_c2_1,Tb=d._emscripten_bind_Anchor_set_m_influence_1=g._emscripten_bind_Anchor_set_m_influence_1,Ub=d._emscripten_bind_Anchor_set_m_local_1=g._emscripten_bind_Anchor_set_m_local_1,Vb=d._emscripten_bind_Anchor_set_m_node_1= +g._emscripten_bind_Anchor_set_m_node_1,Wb=d._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=g._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2,Xb=d._emscripten_bind_ClosestConvexResultCallback___destroy___0=g._emscripten_bind_ClosestConvexResultCallback___destroy___0,Yb=d._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0,Zb=d._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0= +g._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0,$b=d._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0,ac=d._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0,bc=d._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0, +cc=d._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0,dc=d._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=g._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0,ec=d._emscripten_bind_ClosestConvexResultCallback_hasHit_0=g._emscripten_bind_ClosestConvexResultCallback_hasHit_0,fc=d._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1, +hc=d._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1,ic=d._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1,jc=d._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1,kc=d._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1= +g._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1,lc=d._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1,mc=d._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=g._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1,nc=d._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=g._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2,oc= +d._emscripten_bind_ClosestRayResultCallback___destroy___0=g._emscripten_bind_ClosestRayResultCallback___destroy___0,pc=d._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=g._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0,qc=d._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=g._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0,rc=d._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=g._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0, +sc=d._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=g._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0,tc=d._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=g._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0,uc=d._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=g._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0,vc=d._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=g._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0, +wc=d._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=g._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0,xc=d._emscripten_bind_ClosestRayResultCallback_hasHit_0=g._emscripten_bind_ClosestRayResultCallback_hasHit_0,yc=d._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=g._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1,zc=d._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=g._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1, +Ac=d._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=g._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1,Bc=d._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=g._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1,Cc=d._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=g._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1,Dc=d._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=g._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1, +Ec=d._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=g._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1,Fc=d._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=g._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1,Gc=d._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=g._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0,Hc=d._emscripten_bind_ConcreteContactResultCallback___destroy___0=g._emscripten_bind_ConcreteContactResultCallback___destroy___0, +Ic=d._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=g._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7,Jc=d._emscripten_bind_Config___destroy___0=g._emscripten_bind_Config___destroy___0,Kc=d._emscripten_bind_Config_get_citerations_0=g._emscripten_bind_Config_get_citerations_0,Lc=d._emscripten_bind_Config_get_collisions_0=g._emscripten_bind_Config_get_collisions_0,Mc=d._emscripten_bind_Config_get_diterations_0=g._emscripten_bind_Config_get_diterations_0,Nc=d._emscripten_bind_Config_get_kAHR_0= +g._emscripten_bind_Config_get_kAHR_0,Oc=d._emscripten_bind_Config_get_kCHR_0=g._emscripten_bind_Config_get_kCHR_0,Pc=d._emscripten_bind_Config_get_kDF_0=g._emscripten_bind_Config_get_kDF_0,Qc=d._emscripten_bind_Config_get_kDG_0=g._emscripten_bind_Config_get_kDG_0,Rc=d._emscripten_bind_Config_get_kDP_0=g._emscripten_bind_Config_get_kDP_0,Sc=d._emscripten_bind_Config_get_kKHR_0=g._emscripten_bind_Config_get_kKHR_0,Tc=d._emscripten_bind_Config_get_kLF_0=g._emscripten_bind_Config_get_kLF_0,Uc=d._emscripten_bind_Config_get_kMT_0= +g._emscripten_bind_Config_get_kMT_0,Vc=d._emscripten_bind_Config_get_kPR_0=g._emscripten_bind_Config_get_kPR_0,Wc=d._emscripten_bind_Config_get_kSHR_0=g._emscripten_bind_Config_get_kSHR_0,Xc=d._emscripten_bind_Config_get_kSKHR_CL_0=g._emscripten_bind_Config_get_kSKHR_CL_0,Yc=d._emscripten_bind_Config_get_kSK_SPLT_CL_0=g._emscripten_bind_Config_get_kSK_SPLT_CL_0,Zc=d._emscripten_bind_Config_get_kSRHR_CL_0=g._emscripten_bind_Config_get_kSRHR_CL_0,$c=d._emscripten_bind_Config_get_kSR_SPLT_CL_0=g._emscripten_bind_Config_get_kSR_SPLT_CL_0, +ad=d._emscripten_bind_Config_get_kSSHR_CL_0=g._emscripten_bind_Config_get_kSSHR_CL_0,bd=d._emscripten_bind_Config_get_kSS_SPLT_CL_0=g._emscripten_bind_Config_get_kSS_SPLT_CL_0,cd=d._emscripten_bind_Config_get_kVCF_0=g._emscripten_bind_Config_get_kVCF_0,dd=d._emscripten_bind_Config_get_kVC_0=g._emscripten_bind_Config_get_kVC_0,ed=d._emscripten_bind_Config_get_maxvolume_0=g._emscripten_bind_Config_get_maxvolume_0,fd=d._emscripten_bind_Config_get_piterations_0=g._emscripten_bind_Config_get_piterations_0, +gd=d._emscripten_bind_Config_get_timescale_0=g._emscripten_bind_Config_get_timescale_0,hd=d._emscripten_bind_Config_get_viterations_0=g._emscripten_bind_Config_get_viterations_0,id=d._emscripten_bind_Config_set_citerations_1=g._emscripten_bind_Config_set_citerations_1,jd=d._emscripten_bind_Config_set_collisions_1=g._emscripten_bind_Config_set_collisions_1,kd=d._emscripten_bind_Config_set_diterations_1=g._emscripten_bind_Config_set_diterations_1,ld=d._emscripten_bind_Config_set_kAHR_1=g._emscripten_bind_Config_set_kAHR_1, +md=d._emscripten_bind_Config_set_kCHR_1=g._emscripten_bind_Config_set_kCHR_1,nd=d._emscripten_bind_Config_set_kDF_1=g._emscripten_bind_Config_set_kDF_1,od=d._emscripten_bind_Config_set_kDG_1=g._emscripten_bind_Config_set_kDG_1,pd=d._emscripten_bind_Config_set_kDP_1=g._emscripten_bind_Config_set_kDP_1,qd=d._emscripten_bind_Config_set_kKHR_1=g._emscripten_bind_Config_set_kKHR_1,rd=d._emscripten_bind_Config_set_kLF_1=g._emscripten_bind_Config_set_kLF_1,sd=d._emscripten_bind_Config_set_kMT_1=g._emscripten_bind_Config_set_kMT_1, +td=d._emscripten_bind_Config_set_kPR_1=g._emscripten_bind_Config_set_kPR_1,ud=d._emscripten_bind_Config_set_kSHR_1=g._emscripten_bind_Config_set_kSHR_1,vd=d._emscripten_bind_Config_set_kSKHR_CL_1=g._emscripten_bind_Config_set_kSKHR_CL_1,wd=d._emscripten_bind_Config_set_kSK_SPLT_CL_1=g._emscripten_bind_Config_set_kSK_SPLT_CL_1,xd=d._emscripten_bind_Config_set_kSRHR_CL_1=g._emscripten_bind_Config_set_kSRHR_CL_1,yd=d._emscripten_bind_Config_set_kSR_SPLT_CL_1=g._emscripten_bind_Config_set_kSR_SPLT_CL_1, +zd=d._emscripten_bind_Config_set_kSSHR_CL_1=g._emscripten_bind_Config_set_kSSHR_CL_1,Ad=d._emscripten_bind_Config_set_kSS_SPLT_CL_1=g._emscripten_bind_Config_set_kSS_SPLT_CL_1,Bd=d._emscripten_bind_Config_set_kVCF_1=g._emscripten_bind_Config_set_kVCF_1,Cd=d._emscripten_bind_Config_set_kVC_1=g._emscripten_bind_Config_set_kVC_1,Dd=d._emscripten_bind_Config_set_maxvolume_1=g._emscripten_bind_Config_set_maxvolume_1,Ed=d._emscripten_bind_Config_set_piterations_1=g._emscripten_bind_Config_set_piterations_1, +Fd=d._emscripten_bind_Config_set_timescale_1=g._emscripten_bind_Config_set_timescale_1,Gd=d._emscripten_bind_Config_set_viterations_1=g._emscripten_bind_Config_set_viterations_1,Hd=d._emscripten_bind_ContactResultCallback___destroy___0=g._emscripten_bind_ContactResultCallback___destroy___0,Id=d._emscripten_bind_ContactResultCallback_addSingleResult_7=g._emscripten_bind_ContactResultCallback_addSingleResult_7,Jd=d._emscripten_bind_ConvexResultCallback___destroy___0=g._emscripten_bind_ConvexResultCallback___destroy___0, +Kd=d._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=g._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0,Ld=d._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=g._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0,Md=d._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=g._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0,Nd=d._emscripten_bind_ConvexResultCallback_hasHit_0=g._emscripten_bind_ConvexResultCallback_hasHit_0, +Od=d._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=g._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1,Pd=d._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=g._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1,Qd=d._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=g._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1,Rd=d._emscripten_bind_DebugDrawer_DebugDrawer_0=g._emscripten_bind_DebugDrawer_DebugDrawer_0, +Sd=d._emscripten_bind_DebugDrawer___destroy___0=g._emscripten_bind_DebugDrawer___destroy___0,Td=d._emscripten_bind_DebugDrawer_draw3dText_2=g._emscripten_bind_DebugDrawer_draw3dText_2,Ud=d._emscripten_bind_DebugDrawer_drawContactPoint_5=g._emscripten_bind_DebugDrawer_drawContactPoint_5,Vd=d._emscripten_bind_DebugDrawer_drawLine_3=g._emscripten_bind_DebugDrawer_drawLine_3,Wd=d._emscripten_bind_DebugDrawer_getDebugMode_0=g._emscripten_bind_DebugDrawer_getDebugMode_0,Xd=d._emscripten_bind_DebugDrawer_reportErrorWarning_1= +g._emscripten_bind_DebugDrawer_reportErrorWarning_1,Yd=d._emscripten_bind_DebugDrawer_setDebugMode_1=g._emscripten_bind_DebugDrawer_setDebugMode_1,Zd=d._emscripten_bind_LocalConvexResult_LocalConvexResult_5=g._emscripten_bind_LocalConvexResult_LocalConvexResult_5,$d=d._emscripten_bind_LocalConvexResult___destroy___0=g._emscripten_bind_LocalConvexResult___destroy___0,ae=d._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=g._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0,be= +d._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=g._emscripten_bind_LocalConvexResult_get_m_hitFraction_0,ce=d._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=g._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0,de=d._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=g._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0,ee=d._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=g._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0,fe=d._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1= +g._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1,ge=d._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=g._emscripten_bind_LocalConvexResult_set_m_hitFraction_1,he=d._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=g._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1,ie=d._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=g._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1,je=d._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=g._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1, +ke=d._emscripten_bind_LocalShapeInfo___destroy___0=g._emscripten_bind_LocalShapeInfo___destroy___0,le=d._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=g._emscripten_bind_LocalShapeInfo_get_m_shapePart_0,me=d._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=g._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0,ne=d._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=g._emscripten_bind_LocalShapeInfo_set_m_shapePart_1,oe=d._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=g._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1, +pe=d._emscripten_bind_Material___destroy___0=g._emscripten_bind_Material___destroy___0,qe=d._emscripten_bind_Material_get_m_flags_0=g._emscripten_bind_Material_get_m_flags_0,re=d._emscripten_bind_Material_get_m_kAST_0=g._emscripten_bind_Material_get_m_kAST_0,se=d._emscripten_bind_Material_get_m_kLST_0=g._emscripten_bind_Material_get_m_kLST_0,te=d._emscripten_bind_Material_get_m_kVST_0=g._emscripten_bind_Material_get_m_kVST_0,ue=d._emscripten_bind_Material_set_m_flags_1=g._emscripten_bind_Material_set_m_flags_1, +ve=d._emscripten_bind_Material_set_m_kAST_1=g._emscripten_bind_Material_set_m_kAST_1,we=d._emscripten_bind_Material_set_m_kLST_1=g._emscripten_bind_Material_set_m_kLST_1,xe=d._emscripten_bind_Material_set_m_kVST_1=g._emscripten_bind_Material_set_m_kVST_1,ye=d._emscripten_bind_Node___destroy___0=g._emscripten_bind_Node___destroy___0,ze=d._emscripten_bind_Node_get_m_area_0=g._emscripten_bind_Node_get_m_area_0,Ae=d._emscripten_bind_Node_get_m_f_0=g._emscripten_bind_Node_get_m_f_0,Be=d._emscripten_bind_Node_get_m_im_0= +g._emscripten_bind_Node_get_m_im_0,Ce=d._emscripten_bind_Node_get_m_n_0=g._emscripten_bind_Node_get_m_n_0,De=d._emscripten_bind_Node_get_m_q_0=g._emscripten_bind_Node_get_m_q_0,Ee=d._emscripten_bind_Node_get_m_v_0=g._emscripten_bind_Node_get_m_v_0,Fe=d._emscripten_bind_Node_get_m_x_0=g._emscripten_bind_Node_get_m_x_0,Ge=d._emscripten_bind_Node_set_m_area_1=g._emscripten_bind_Node_set_m_area_1,He=d._emscripten_bind_Node_set_m_f_1=g._emscripten_bind_Node_set_m_f_1,Ie=d._emscripten_bind_Node_set_m_im_1= +g._emscripten_bind_Node_set_m_im_1,Je=d._emscripten_bind_Node_set_m_n_1=g._emscripten_bind_Node_set_m_n_1,Ke=d._emscripten_bind_Node_set_m_q_1=g._emscripten_bind_Node_set_m_q_1,Le=d._emscripten_bind_Node_set_m_v_1=g._emscripten_bind_Node_set_m_v_1,Me=d._emscripten_bind_Node_set_m_x_1=g._emscripten_bind_Node_set_m_x_1,Ne=d._emscripten_bind_RayResultCallback___destroy___0=g._emscripten_bind_RayResultCallback___destroy___0,Oe=d._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=g._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0, +Pe=d._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=g._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0,Qe=d._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=g._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0,Re=d._emscripten_bind_RayResultCallback_get_m_collisionObject_0=g._emscripten_bind_RayResultCallback_get_m_collisionObject_0,Se=d._emscripten_bind_RayResultCallback_hasHit_0=g._emscripten_bind_RayResultCallback_hasHit_0,Te=d._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1= +g._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1,Ue=d._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=g._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1,Ve=d._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=g._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1,We=d._emscripten_bind_RayResultCallback_set_m_collisionObject_1=g._emscripten_bind_RayResultCallback_set_m_collisionObject_1,Xe=d._emscripten_bind_RaycastInfo___destroy___0= +g._emscripten_bind_RaycastInfo___destroy___0,Ye=d._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=g._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0,Ze=d._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=g._emscripten_bind_RaycastInfo_get_m_contactPointWS_0,$e=d._emscripten_bind_RaycastInfo_get_m_groundObject_0=g._emscripten_bind_RaycastInfo_get_m_groundObject_0,af=d._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=g._emscripten_bind_RaycastInfo_get_m_hardPointWS_0,bf=d._emscripten_bind_RaycastInfo_get_m_isInContact_0= +g._emscripten_bind_RaycastInfo_get_m_isInContact_0,cf=d._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=g._emscripten_bind_RaycastInfo_get_m_suspensionLength_0,df=d._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=g._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0,ef=d._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=g._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0,ff=d._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=g._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1,gf= +d._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=g._emscripten_bind_RaycastInfo_set_m_contactPointWS_1,hf=d._emscripten_bind_RaycastInfo_set_m_groundObject_1=g._emscripten_bind_RaycastInfo_set_m_groundObject_1,jf=d._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=g._emscripten_bind_RaycastInfo_set_m_hardPointWS_1,kf=d._emscripten_bind_RaycastInfo_set_m_isInContact_1=g._emscripten_bind_RaycastInfo_set_m_isInContact_1,lf=d._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=g._emscripten_bind_RaycastInfo_set_m_suspensionLength_1, +mf=d._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=g._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1,nf=d._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=g._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1,of=d._emscripten_bind_VoidPtr___destroy___0=g._emscripten_bind_VoidPtr___destroy___0,pf=d._emscripten_bind_btActionInterface___destroy___0=g._emscripten_bind_btActionInterface___destroy___0,qf=d._emscripten_bind_btActionInterface_updateAction_2=g._emscripten_bind_btActionInterface_updateAction_2, +rf=d._emscripten_bind_btAxisSweep3___destroy___0=g._emscripten_bind_btAxisSweep3___destroy___0,sf=d._emscripten_bind_btAxisSweep3_btAxisSweep3_2=g._emscripten_bind_btAxisSweep3_btAxisSweep3_2,tf=d._emscripten_bind_btAxisSweep3_btAxisSweep3_3=g._emscripten_bind_btAxisSweep3_btAxisSweep3_3,uf=d._emscripten_bind_btAxisSweep3_btAxisSweep3_4=g._emscripten_bind_btAxisSweep3_btAxisSweep3_4,vf=d._emscripten_bind_btAxisSweep3_btAxisSweep3_5=g._emscripten_bind_btAxisSweep3_btAxisSweep3_5,wf=d._emscripten_bind_btBoxShape___destroy___0= +g._emscripten_bind_btBoxShape___destroy___0,xf=d._emscripten_bind_btBoxShape_btBoxShape_1=g._emscripten_bind_btBoxShape_btBoxShape_1,yf=d._emscripten_bind_btBoxShape_calculateLocalInertia_2=g._emscripten_bind_btBoxShape_calculateLocalInertia_2,zf=d._emscripten_bind_btBoxShape_getLocalScaling_0=g._emscripten_bind_btBoxShape_getLocalScaling_0,Af=d._emscripten_bind_btBoxShape_getMargin_0=g._emscripten_bind_btBoxShape_getMargin_0,Bf=d._emscripten_bind_btBoxShape_setLocalScaling_1=g._emscripten_bind_btBoxShape_setLocalScaling_1, +Cf=d._emscripten_bind_btBoxShape_setMargin_1=g._emscripten_bind_btBoxShape_setMargin_1,Df=d._emscripten_bind_btBroadphaseInterface___destroy___0=g._emscripten_bind_btBroadphaseInterface___destroy___0,Ef=d._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=g._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0,Ff=d._emscripten_bind_btBroadphaseProxy___destroy___0=g._emscripten_bind_btBroadphaseProxy___destroy___0,Gf=d._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0= +g._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0,Hf=d._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=g._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0,If=d._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=g._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1,Jf=d._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=g._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1,Kf=d._emscripten_bind_btBvhTriangleMeshShape___destroy___0= +g._emscripten_bind_btBvhTriangleMeshShape___destroy___0,Lf=d._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=g._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2,Mf=d._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=g._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3,Nf=d._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=g._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2,Of=d._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0= +g._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0,Pf=d._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=g._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1,Qf=d._emscripten_bind_btCapsuleShapeX___destroy___0=g._emscripten_bind_btCapsuleShapeX___destroy___0,Rf=d._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=g._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2,Sf=d._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=g._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2, +Tf=d._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=g._emscripten_bind_btCapsuleShapeX_getHalfHeight_0,Uf=d._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=g._emscripten_bind_btCapsuleShapeX_getLocalScaling_0,Vf=d._emscripten_bind_btCapsuleShapeX_getMargin_0=g._emscripten_bind_btCapsuleShapeX_getMargin_0,Wf=d._emscripten_bind_btCapsuleShapeX_getRadius_0=g._emscripten_bind_btCapsuleShapeX_getRadius_0,Xf=d._emscripten_bind_btCapsuleShapeX_getUpAxis_0=g._emscripten_bind_btCapsuleShapeX_getUpAxis_0, +Yf=d._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=g._emscripten_bind_btCapsuleShapeX_setLocalScaling_1,Zf=d._emscripten_bind_btCapsuleShapeX_setMargin_1=g._emscripten_bind_btCapsuleShapeX_setMargin_1,$f=d._emscripten_bind_btCapsuleShapeZ___destroy___0=g._emscripten_bind_btCapsuleShapeZ___destroy___0,ag=d._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=g._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2,bg=d._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=g._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2, +cg=d._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=g._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0,dg=d._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=g._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0,eg=d._emscripten_bind_btCapsuleShapeZ_getMargin_0=g._emscripten_bind_btCapsuleShapeZ_getMargin_0,fg=d._emscripten_bind_btCapsuleShapeZ_getRadius_0=g._emscripten_bind_btCapsuleShapeZ_getRadius_0,gg=d._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=g._emscripten_bind_btCapsuleShapeZ_getUpAxis_0, +hg=d._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=g._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1,ig=d._emscripten_bind_btCapsuleShapeZ_setMargin_1=g._emscripten_bind_btCapsuleShapeZ_setMargin_1,jg=d._emscripten_bind_btCapsuleShape___destroy___0=g._emscripten_bind_btCapsuleShape___destroy___0,kg=d._emscripten_bind_btCapsuleShape_btCapsuleShape_2=g._emscripten_bind_btCapsuleShape_btCapsuleShape_2,lg=d._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=g._emscripten_bind_btCapsuleShape_calculateLocalInertia_2, +mg=d._emscripten_bind_btCapsuleShape_getHalfHeight_0=g._emscripten_bind_btCapsuleShape_getHalfHeight_0,ng=d._emscripten_bind_btCapsuleShape_getLocalScaling_0=g._emscripten_bind_btCapsuleShape_getLocalScaling_0,og=d._emscripten_bind_btCapsuleShape_getMargin_0=g._emscripten_bind_btCapsuleShape_getMargin_0,pg=d._emscripten_bind_btCapsuleShape_getRadius_0=g._emscripten_bind_btCapsuleShape_getRadius_0,qg=d._emscripten_bind_btCapsuleShape_getUpAxis_0=g._emscripten_bind_btCapsuleShape_getUpAxis_0,rg=d._emscripten_bind_btCapsuleShape_setLocalScaling_1= +g._emscripten_bind_btCapsuleShape_setLocalScaling_1,sg=d._emscripten_bind_btCapsuleShape_setMargin_1=g._emscripten_bind_btCapsuleShape_setMargin_1,tg=d._emscripten_bind_btCollisionConfiguration___destroy___0=g._emscripten_bind_btCollisionConfiguration___destroy___0,ug=d._emscripten_bind_btCollisionDispatcher___destroy___0=g._emscripten_bind_btCollisionDispatcher___destroy___0,vg=d._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=g._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1, +wg=d._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=g._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1,xg=d._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=g._emscripten_bind_btCollisionDispatcher_getNumManifolds_0,yg=d._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=g._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0,zg=d._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=g._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0, +Ag=d._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=g._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0,Bg=d._emscripten_bind_btCollisionObject___destroy___0=g._emscripten_bind_btCollisionObject___destroy___0,Cg=d._emscripten_bind_btCollisionObject_activate_0=g._emscripten_bind_btCollisionObject_activate_0,Dg=d._emscripten_bind_btCollisionObject_activate_1=g._emscripten_bind_btCollisionObject_activate_1,Eg=d._emscripten_bind_btCollisionObject_forceActivationState_1=g._emscripten_bind_btCollisionObject_forceActivationState_1, +Fg=d._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=g._emscripten_bind_btCollisionObject_getBroadphaseHandle_0,Gg=d._emscripten_bind_btCollisionObject_getCollisionFlags_0=g._emscripten_bind_btCollisionObject_getCollisionFlags_0,Hg=d._emscripten_bind_btCollisionObject_getCollisionShape_0=g._emscripten_bind_btCollisionObject_getCollisionShape_0,Ig=d._emscripten_bind_btCollisionObject_getFriction_0=g._emscripten_bind_btCollisionObject_getFriction_0,Jg=d._emscripten_bind_btCollisionObject_getRestitution_0= +g._emscripten_bind_btCollisionObject_getRestitution_0,Kg=d._emscripten_bind_btCollisionObject_getRollingFriction_0=g._emscripten_bind_btCollisionObject_getRollingFriction_0,Lg=d._emscripten_bind_btCollisionObject_getUserIndex_0=g._emscripten_bind_btCollisionObject_getUserIndex_0,Mg=d._emscripten_bind_btCollisionObject_getUserPointer_0=g._emscripten_bind_btCollisionObject_getUserPointer_0,Ng=d._emscripten_bind_btCollisionObject_getWorldTransform_0=g._emscripten_bind_btCollisionObject_getWorldTransform_0, +Og=d._emscripten_bind_btCollisionObject_isActive_0=g._emscripten_bind_btCollisionObject_isActive_0,Pg=d._emscripten_bind_btCollisionObject_isKinematicObject_0=g._emscripten_bind_btCollisionObject_isKinematicObject_0,Qg=d._emscripten_bind_btCollisionObject_isStaticObject_0=g._emscripten_bind_btCollisionObject_isStaticObject_0,Rg=d._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=g._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0,Sg=d._emscripten_bind_btCollisionObject_setActivationState_1= +g._emscripten_bind_btCollisionObject_setActivationState_1,Tg=d._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=g._emscripten_bind_btCollisionObject_setAnisotropicFriction_2,Ug=d._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=g._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1,Vg=d._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=g._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1,Wg=d._emscripten_bind_btCollisionObject_setCollisionFlags_1=g._emscripten_bind_btCollisionObject_setCollisionFlags_1, +Xg=d._emscripten_bind_btCollisionObject_setCollisionShape_1=g._emscripten_bind_btCollisionObject_setCollisionShape_1,Yg=d._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=g._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1,Zg=d._emscripten_bind_btCollisionObject_setFriction_1=g._emscripten_bind_btCollisionObject_setFriction_1,$g=d._emscripten_bind_btCollisionObject_setRestitution_1=g._emscripten_bind_btCollisionObject_setRestitution_1,ah=d._emscripten_bind_btCollisionObject_setRollingFriction_1= +g._emscripten_bind_btCollisionObject_setRollingFriction_1,bh=d._emscripten_bind_btCollisionObject_setUserIndex_1=g._emscripten_bind_btCollisionObject_setUserIndex_1,ch=d._emscripten_bind_btCollisionObject_setUserPointer_1=g._emscripten_bind_btCollisionObject_setUserPointer_1,dh=d._emscripten_bind_btCollisionObject_setWorldTransform_1=g._emscripten_bind_btCollisionObject_setWorldTransform_1,eh=d._emscripten_bind_btCollisionShape___destroy___0=g._emscripten_bind_btCollisionShape___destroy___0,fh=d._emscripten_bind_btCollisionShape_calculateLocalInertia_2= +g._emscripten_bind_btCollisionShape_calculateLocalInertia_2,gh=d._emscripten_bind_btCollisionShape_getLocalScaling_0=g._emscripten_bind_btCollisionShape_getLocalScaling_0,hh=d._emscripten_bind_btCollisionShape_getMargin_0=g._emscripten_bind_btCollisionShape_getMargin_0,ih=d._emscripten_bind_btCollisionShape_setLocalScaling_1=g._emscripten_bind_btCollisionShape_setLocalScaling_1,jh=d._emscripten_bind_btCollisionShape_setMargin_1=g._emscripten_bind_btCollisionShape_setMargin_1,kh=d._emscripten_bind_btCollisionWorld___destroy___0= +g._emscripten_bind_btCollisionWorld___destroy___0,lh=d._emscripten_bind_btCollisionWorld_addCollisionObject_1=g._emscripten_bind_btCollisionWorld_addCollisionObject_1,mh=d._emscripten_bind_btCollisionWorld_addCollisionObject_2=g._emscripten_bind_btCollisionWorld_addCollisionObject_2,nh=d._emscripten_bind_btCollisionWorld_addCollisionObject_3=g._emscripten_bind_btCollisionWorld_addCollisionObject_3,oh=d._emscripten_bind_btCollisionWorld_contactPairTest_3=g._emscripten_bind_btCollisionWorld_contactPairTest_3, +ph=d._emscripten_bind_btCollisionWorld_contactTest_2=g._emscripten_bind_btCollisionWorld_contactTest_2,qh=d._emscripten_bind_btCollisionWorld_convexSweepTest_5=g._emscripten_bind_btCollisionWorld_convexSweepTest_5,rh=d._emscripten_bind_btCollisionWorld_debugDrawObject_3=g._emscripten_bind_btCollisionWorld_debugDrawObject_3,sh=d._emscripten_bind_btCollisionWorld_debugDrawWorld_0=g._emscripten_bind_btCollisionWorld_debugDrawWorld_0,th=d._emscripten_bind_btCollisionWorld_getBroadphase_0=g._emscripten_bind_btCollisionWorld_getBroadphase_0, +uh=d._emscripten_bind_btCollisionWorld_getDebugDrawer_0=g._emscripten_bind_btCollisionWorld_getDebugDrawer_0,vh=d._emscripten_bind_btCollisionWorld_getDispatchInfo_0=g._emscripten_bind_btCollisionWorld_getDispatchInfo_0,wh=d._emscripten_bind_btCollisionWorld_getDispatcher_0=g._emscripten_bind_btCollisionWorld_getDispatcher_0,xh=d._emscripten_bind_btCollisionWorld_getPairCache_0=g._emscripten_bind_btCollisionWorld_getPairCache_0,yh=d._emscripten_bind_btCollisionWorld_rayTest_3=g._emscripten_bind_btCollisionWorld_rayTest_3, +zh=d._emscripten_bind_btCollisionWorld_removeCollisionObject_1=g._emscripten_bind_btCollisionWorld_removeCollisionObject_1,Ah=d._emscripten_bind_btCollisionWorld_setDebugDrawer_1=g._emscripten_bind_btCollisionWorld_setDebugDrawer_1,Bh=d._emscripten_bind_btCollisionWorld_updateSingleAabb_1=g._emscripten_bind_btCollisionWorld_updateSingleAabb_1,Ch=d._emscripten_bind_btCompoundShape___destroy___0=g._emscripten_bind_btCompoundShape___destroy___0,Dh=d._emscripten_bind_btCompoundShape_addChildShape_2=g._emscripten_bind_btCompoundShape_addChildShape_2, +Eh=d._emscripten_bind_btCompoundShape_btCompoundShape_0=g._emscripten_bind_btCompoundShape_btCompoundShape_0,Fh=d._emscripten_bind_btCompoundShape_btCompoundShape_1=g._emscripten_bind_btCompoundShape_btCompoundShape_1,Gh=d._emscripten_bind_btCompoundShape_calculateLocalInertia_2=g._emscripten_bind_btCompoundShape_calculateLocalInertia_2,Hh=d._emscripten_bind_btCompoundShape_getChildShape_1=g._emscripten_bind_btCompoundShape_getChildShape_1,Ih=d._emscripten_bind_btCompoundShape_getLocalScaling_0=g._emscripten_bind_btCompoundShape_getLocalScaling_0, +Jh=d._emscripten_bind_btCompoundShape_getMargin_0=g._emscripten_bind_btCompoundShape_getMargin_0,Kh=d._emscripten_bind_btCompoundShape_getNumChildShapes_0=g._emscripten_bind_btCompoundShape_getNumChildShapes_0,Lh=d._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=g._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1,Mh=d._emscripten_bind_btCompoundShape_removeChildShape_1=g._emscripten_bind_btCompoundShape_removeChildShape_1,Nh=d._emscripten_bind_btCompoundShape_setLocalScaling_1= +g._emscripten_bind_btCompoundShape_setLocalScaling_1,Oh=d._emscripten_bind_btCompoundShape_setMargin_1=g._emscripten_bind_btCompoundShape_setMargin_1,Ph=d._emscripten_bind_btCompoundShape_updateChildTransform_2=g._emscripten_bind_btCompoundShape_updateChildTransform_2,Qh=d._emscripten_bind_btCompoundShape_updateChildTransform_3=g._emscripten_bind_btCompoundShape_updateChildTransform_3,Rh=d._emscripten_bind_btConcaveShape___destroy___0=g._emscripten_bind_btConcaveShape___destroy___0,Sh=d._emscripten_bind_btConcaveShape_calculateLocalInertia_2= +g._emscripten_bind_btConcaveShape_calculateLocalInertia_2,Th=d._emscripten_bind_btConcaveShape_getLocalScaling_0=g._emscripten_bind_btConcaveShape_getLocalScaling_0,Uh=d._emscripten_bind_btConcaveShape_setLocalScaling_1=g._emscripten_bind_btConcaveShape_setLocalScaling_1,Vh=d._emscripten_bind_btConeShapeX___destroy___0=g._emscripten_bind_btConeShapeX___destroy___0,Wh=d._emscripten_bind_btConeShapeX_btConeShapeX_2=g._emscripten_bind_btConeShapeX_btConeShapeX_2,Xh=d._emscripten_bind_btConeShapeX_calculateLocalInertia_2= +g._emscripten_bind_btConeShapeX_calculateLocalInertia_2,Yh=d._emscripten_bind_btConeShapeX_getLocalScaling_0=g._emscripten_bind_btConeShapeX_getLocalScaling_0,Zh=d._emscripten_bind_btConeShapeX_setLocalScaling_1=g._emscripten_bind_btConeShapeX_setLocalScaling_1,$h=d._emscripten_bind_btConeShapeZ___destroy___0=g._emscripten_bind_btConeShapeZ___destroy___0,ai=d._emscripten_bind_btConeShapeZ_btConeShapeZ_2=g._emscripten_bind_btConeShapeZ_btConeShapeZ_2,bi=d._emscripten_bind_btConeShapeZ_calculateLocalInertia_2= +g._emscripten_bind_btConeShapeZ_calculateLocalInertia_2,ci=d._emscripten_bind_btConeShapeZ_getLocalScaling_0=g._emscripten_bind_btConeShapeZ_getLocalScaling_0,di=d._emscripten_bind_btConeShapeZ_setLocalScaling_1=g._emscripten_bind_btConeShapeZ_setLocalScaling_1,ei=d._emscripten_bind_btConeShape___destroy___0=g._emscripten_bind_btConeShape___destroy___0,fi=d._emscripten_bind_btConeShape_btConeShape_2=g._emscripten_bind_btConeShape_btConeShape_2,gi=d._emscripten_bind_btConeShape_calculateLocalInertia_2= +g._emscripten_bind_btConeShape_calculateLocalInertia_2,hi=d._emscripten_bind_btConeShape_getLocalScaling_0=g._emscripten_bind_btConeShape_getLocalScaling_0,ii=d._emscripten_bind_btConeShape_setLocalScaling_1=g._emscripten_bind_btConeShape_setLocalScaling_1,ji=d._emscripten_bind_btConeTwistConstraint___destroy___0=g._emscripten_bind_btConeTwistConstraint___destroy___0,ki=d._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=g._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2, +li=d._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=g._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4,mi=d._emscripten_bind_btConeTwistConstraint_enableFeedback_1=g._emscripten_bind_btConeTwistConstraint_enableFeedback_1,ni=d._emscripten_bind_btConeTwistConstraint_enableMotor_1=g._emscripten_bind_btConeTwistConstraint_enableMotor_1,oi=d._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0, +pi=d._emscripten_bind_btConeTwistConstraint_getParam_2=g._emscripten_bind_btConeTwistConstraint_getParam_2,qi=d._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=g._emscripten_bind_btConeTwistConstraint_setAngularOnly_1,ri=d._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1,si=d._emscripten_bind_btConeTwistConstraint_setDamping_1=g._emscripten_bind_btConeTwistConstraint_setDamping_1,ti=d._emscripten_bind_btConeTwistConstraint_setLimit_2= +g._emscripten_bind_btConeTwistConstraint_setLimit_2,ui=d._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=g._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1,vi=d._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=g._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1,wi=d._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=g._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1,xi=d._emscripten_bind_btConeTwistConstraint_setMotorTarget_1= +g._emscripten_bind_btConeTwistConstraint_setMotorTarget_1,yi=d._emscripten_bind_btConeTwistConstraint_setParam_3=g._emscripten_bind_btConeTwistConstraint_setParam_3,zi=d._emscripten_bind_btConstCollisionObjectArray___destroy___0=g._emscripten_bind_btConstCollisionObjectArray___destroy___0,Ai=d._emscripten_bind_btConstCollisionObjectArray_at_1=g._emscripten_bind_btConstCollisionObjectArray_at_1,Bi=d._emscripten_bind_btConstCollisionObjectArray_size_0=g._emscripten_bind_btConstCollisionObjectArray_size_0, +Ci=d._emscripten_bind_btConstraintSetting___destroy___0=g._emscripten_bind_btConstraintSetting___destroy___0,Di=d._emscripten_bind_btConstraintSetting_btConstraintSetting_0=g._emscripten_bind_btConstraintSetting_btConstraintSetting_0,Ei=d._emscripten_bind_btConstraintSetting_get_m_damping_0=g._emscripten_bind_btConstraintSetting_get_m_damping_0,Fi=d._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=g._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0,Gi=d._emscripten_bind_btConstraintSetting_get_m_tau_0= +g._emscripten_bind_btConstraintSetting_get_m_tau_0,Hi=d._emscripten_bind_btConstraintSetting_set_m_damping_1=g._emscripten_bind_btConstraintSetting_set_m_damping_1,Ii=d._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=g._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1,Ji=d._emscripten_bind_btConstraintSetting_set_m_tau_1=g._emscripten_bind_btConstraintSetting_set_m_tau_1,Ki=d._emscripten_bind_btConstraintSolver___destroy___0=g._emscripten_bind_btConstraintSolver___destroy___0,Li= +d._emscripten_bind_btContactSolverInfo___destroy___0=g._emscripten_bind_btContactSolverInfo___destroy___0,Mi=d._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=g._emscripten_bind_btContactSolverInfo_get_m_numIterations_0,Ni=d._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=g._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0,Oi=d._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=g._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0, +Pi=d._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=g._emscripten_bind_btContactSolverInfo_set_m_numIterations_1,Qi=d._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=g._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1,Ri=d._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=g._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1,Si=d._emscripten_bind_btConvexHullShape___destroy___0=g._emscripten_bind_btConvexHullShape___destroy___0, +Ti=d._emscripten_bind_btConvexHullShape_addPoint_1=g._emscripten_bind_btConvexHullShape_addPoint_1,Ui=d._emscripten_bind_btConvexHullShape_addPoint_2=g._emscripten_bind_btConvexHullShape_addPoint_2,Vi=d._emscripten_bind_btConvexHullShape_btConvexHullShape_0=g._emscripten_bind_btConvexHullShape_btConvexHullShape_0,Wi=d._emscripten_bind_btConvexHullShape_btConvexHullShape_1=g._emscripten_bind_btConvexHullShape_btConvexHullShape_1,Xi=d._emscripten_bind_btConvexHullShape_btConvexHullShape_2=g._emscripten_bind_btConvexHullShape_btConvexHullShape_2, +Yi=d._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=g._emscripten_bind_btConvexHullShape_calculateLocalInertia_2,Zi=d._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=g._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0,$i=d._emscripten_bind_btConvexHullShape_getLocalScaling_0=g._emscripten_bind_btConvexHullShape_getLocalScaling_0,aj=d._emscripten_bind_btConvexHullShape_getMargin_0=g._emscripten_bind_btConvexHullShape_getMargin_0,bj=d._emscripten_bind_btConvexHullShape_getNumVertices_0= +g._emscripten_bind_btConvexHullShape_getNumVertices_0,cj=d._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=g._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1,dj=d._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=g._emscripten_bind_btConvexHullShape_recalcLocalAabb_0,ej=d._emscripten_bind_btConvexHullShape_setLocalScaling_1=g._emscripten_bind_btConvexHullShape_setLocalScaling_1,fj=d._emscripten_bind_btConvexHullShape_setMargin_1=g._emscripten_bind_btConvexHullShape_setMargin_1, +gj=d._emscripten_bind_btConvexPolyhedron___destroy___0=g._emscripten_bind_btConvexPolyhedron___destroy___0,hj=d._emscripten_bind_btConvexPolyhedron_get_m_faces_0=g._emscripten_bind_btConvexPolyhedron_get_m_faces_0,ij=d._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=g._emscripten_bind_btConvexPolyhedron_get_m_vertices_0,jj=d._emscripten_bind_btConvexPolyhedron_set_m_faces_1=g._emscripten_bind_btConvexPolyhedron_set_m_faces_1,kj=d._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=g._emscripten_bind_btConvexPolyhedron_set_m_vertices_1, +lj=d._emscripten_bind_btConvexShape___destroy___0=g._emscripten_bind_btConvexShape___destroy___0,mj=d._emscripten_bind_btConvexShape_calculateLocalInertia_2=g._emscripten_bind_btConvexShape_calculateLocalInertia_2,nj=d._emscripten_bind_btConvexShape_getLocalScaling_0=g._emscripten_bind_btConvexShape_getLocalScaling_0,oj=d._emscripten_bind_btConvexShape_getMargin_0=g._emscripten_bind_btConvexShape_getMargin_0,pj=d._emscripten_bind_btConvexShape_setLocalScaling_1=g._emscripten_bind_btConvexShape_setLocalScaling_1, +qj=d._emscripten_bind_btConvexShape_setMargin_1=g._emscripten_bind_btConvexShape_setMargin_1,rj=d._emscripten_bind_btConvexTriangleMeshShape___destroy___0=g._emscripten_bind_btConvexTriangleMeshShape___destroy___0,sj=d._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=g._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1,tj=d._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=g._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2, +uj=d._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=g._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2,vj=d._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=g._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0,wj=d._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=g._emscripten_bind_btConvexTriangleMeshShape_getMargin_0,xj=d._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=g._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1, +yj=d._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=g._emscripten_bind_btConvexTriangleMeshShape_setMargin_1,zj=d._emscripten_bind_btCylinderShapeX___destroy___0=g._emscripten_bind_btCylinderShapeX___destroy___0,Aj=d._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=g._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1,Bj=d._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=g._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2,Cj=d._emscripten_bind_btCylinderShapeX_getLocalScaling_0= +g._emscripten_bind_btCylinderShapeX_getLocalScaling_0,Dj=d._emscripten_bind_btCylinderShapeX_getMargin_0=g._emscripten_bind_btCylinderShapeX_getMargin_0,Ej=d._emscripten_bind_btCylinderShapeX_setLocalScaling_1=g._emscripten_bind_btCylinderShapeX_setLocalScaling_1,Fj=d._emscripten_bind_btCylinderShapeX_setMargin_1=g._emscripten_bind_btCylinderShapeX_setMargin_1,Gj=d._emscripten_bind_btCylinderShapeZ___destroy___0=g._emscripten_bind_btCylinderShapeZ___destroy___0,Hj=d._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1= +g._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1,Ij=d._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=g._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2,Jj=d._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=g._emscripten_bind_btCylinderShapeZ_getLocalScaling_0,Kj=d._emscripten_bind_btCylinderShapeZ_getMargin_0=g._emscripten_bind_btCylinderShapeZ_getMargin_0,Lj=d._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=g._emscripten_bind_btCylinderShapeZ_setLocalScaling_1,Mj= +d._emscripten_bind_btCylinderShapeZ_setMargin_1=g._emscripten_bind_btCylinderShapeZ_setMargin_1,Nj=d._emscripten_bind_btCylinderShape___destroy___0=g._emscripten_bind_btCylinderShape___destroy___0,Oj=d._emscripten_bind_btCylinderShape_btCylinderShape_1=g._emscripten_bind_btCylinderShape_btCylinderShape_1,Pj=d._emscripten_bind_btCylinderShape_calculateLocalInertia_2=g._emscripten_bind_btCylinderShape_calculateLocalInertia_2,Qj=d._emscripten_bind_btCylinderShape_getLocalScaling_0=g._emscripten_bind_btCylinderShape_getLocalScaling_0, +Rj=d._emscripten_bind_btCylinderShape_getMargin_0=g._emscripten_bind_btCylinderShape_getMargin_0,Sj=d._emscripten_bind_btCylinderShape_setLocalScaling_1=g._emscripten_bind_btCylinderShape_setLocalScaling_1,Tj=d._emscripten_bind_btCylinderShape_setMargin_1=g._emscripten_bind_btCylinderShape_setMargin_1,Uj=d._emscripten_bind_btDbvtBroadphase___destroy___0=g._emscripten_bind_btDbvtBroadphase___destroy___0,Vj=d._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=g._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0, +Wj=d._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=g._emscripten_bind_btDefaultCollisionConfiguration___destroy___0,Xj=d._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=g._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0,Yj=d._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=g._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1,Zj=d._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0= +g._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0,ak=d._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=g._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0,bk=d._emscripten_bind_btDefaultMotionState___destroy___0=g._emscripten_bind_btDefaultMotionState___destroy___0,ck=d._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=g._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0,dk=d._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1= +g._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1,ek=d._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=g._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2,fk=d._emscripten_bind_btDefaultMotionState_getWorldTransform_1=g._emscripten_bind_btDefaultMotionState_getWorldTransform_1,gk=d._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=g._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0,hk=d._emscripten_bind_btDefaultMotionState_setWorldTransform_1= +g._emscripten_bind_btDefaultMotionState_setWorldTransform_1,ik=d._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=g._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1,jk=d._emscripten_bind_btDefaultSoftBodySolver___destroy___0=g._emscripten_bind_btDefaultSoftBodySolver___destroy___0,kk=d._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=g._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0,lk=d._emscripten_bind_btDefaultVehicleRaycaster___destroy___0= +g._emscripten_bind_btDefaultVehicleRaycaster___destroy___0,mk=d._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=g._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1,nk=d._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=g._emscripten_bind_btDefaultVehicleRaycaster_castRay_3,ok=d._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=g._emscripten_bind_btDiscreteDynamicsWorld___destroy___0,pk=d._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=g._emscripten_bind_btDiscreteDynamicsWorld_addAction_1, +qk=d._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=g._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1,rk=d._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=g._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2,sk=d._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=g._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3,tk=d._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=g._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1, +uk=d._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=g._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2,vk=d._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=g._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1,wk=d._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=g._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3,xk=d._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=g._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4,yk= +d._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=g._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3,zk=d._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=g._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2,Ak=d._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=g._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5,Bk=d._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=g._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3,Ck=d._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0= +g._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0,Dk=d._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=g._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0,Ek=d._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=g._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0,Fk=d._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=g._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0,Gk=d._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=g._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0, +Hk=d._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=g._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0,Ik=d._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=g._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0,Jk=d._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=g._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0,Kk=d._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=g._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3,Lk=d._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1= +g._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1,Mk=d._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=g._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1,Nk=d._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=g._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1,Ok=d._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=g._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1,Pk=d._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1= +g._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1,Qk=d._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=g._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1,Rk=d._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=g._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1,Sk=d._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=g._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1,Tk=d._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1= +g._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1,Uk=d._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=g._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1,Vk=d._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=g._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2,Wk=d._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=g._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3,Xk=d._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=g._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1, +Yk=d._emscripten_bind_btDispatcherInfo___destroy___0=g._emscripten_bind_btDispatcherInfo___destroy___0,Zk=d._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=g._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0,$k=d._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=g._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0,al=d._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=g._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0, +bl=d._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=g._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0,cl=d._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=g._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0,dl=d._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=g._emscripten_bind_btDispatcherInfo_get_m_stepCount_0,el=d._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=g._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0,fl=d._emscripten_bind_btDispatcherInfo_get_m_timeStep_0= +g._emscripten_bind_btDispatcherInfo_get_m_timeStep_0,gl=d._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=g._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0,hl=d._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=g._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0,il=d._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=g._emscripten_bind_btDispatcherInfo_get_m_useEpa_0,jl=d._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1= +g._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1,kl=d._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=g._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1,ll=d._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=g._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1,ml=d._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=g._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1,nl=d._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1= +g._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1,ol=d._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=g._emscripten_bind_btDispatcherInfo_set_m_stepCount_1,pl=d._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=g._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1,ql=d._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=g._emscripten_bind_btDispatcherInfo_set_m_timeStep_1,rl=d._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=g._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1, +sl=d._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=g._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1,tl=d._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=g._emscripten_bind_btDispatcherInfo_set_m_useEpa_1,ul=d._emscripten_bind_btDispatcher___destroy___0=g._emscripten_bind_btDispatcher___destroy___0,vl=d._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=g._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1,wl=d._emscripten_bind_btDispatcher_getNumManifolds_0= +g._emscripten_bind_btDispatcher_getNumManifolds_0,xl=d._emscripten_bind_btDynamicsWorld___destroy___0=g._emscripten_bind_btDynamicsWorld___destroy___0,yl=d._emscripten_bind_btDynamicsWorld_addAction_1=g._emscripten_bind_btDynamicsWorld_addAction_1,zl=d._emscripten_bind_btDynamicsWorld_addCollisionObject_1=g._emscripten_bind_btDynamicsWorld_addCollisionObject_1,Al=d._emscripten_bind_btDynamicsWorld_addCollisionObject_2=g._emscripten_bind_btDynamicsWorld_addCollisionObject_2,Bl=d._emscripten_bind_btDynamicsWorld_addCollisionObject_3= +g._emscripten_bind_btDynamicsWorld_addCollisionObject_3,Cl=d._emscripten_bind_btDynamicsWorld_contactPairTest_3=g._emscripten_bind_btDynamicsWorld_contactPairTest_3,Dl=d._emscripten_bind_btDynamicsWorld_contactTest_2=g._emscripten_bind_btDynamicsWorld_contactTest_2,El=d._emscripten_bind_btDynamicsWorld_convexSweepTest_5=g._emscripten_bind_btDynamicsWorld_convexSweepTest_5,Fl=d._emscripten_bind_btDynamicsWorld_debugDrawObject_3=g._emscripten_bind_btDynamicsWorld_debugDrawObject_3,Gl=d._emscripten_bind_btDynamicsWorld_debugDrawWorld_0= +g._emscripten_bind_btDynamicsWorld_debugDrawWorld_0,Hl=d._emscripten_bind_btDynamicsWorld_getBroadphase_0=g._emscripten_bind_btDynamicsWorld_getBroadphase_0,Il=d._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=g._emscripten_bind_btDynamicsWorld_getDebugDrawer_0,Jl=d._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=g._emscripten_bind_btDynamicsWorld_getDispatchInfo_0,Kl=d._emscripten_bind_btDynamicsWorld_getDispatcher_0=g._emscripten_bind_btDynamicsWorld_getDispatcher_0,Ll=d._emscripten_bind_btDynamicsWorld_getPairCache_0= +g._emscripten_bind_btDynamicsWorld_getPairCache_0,Ml=d._emscripten_bind_btDynamicsWorld_getSolverInfo_0=g._emscripten_bind_btDynamicsWorld_getSolverInfo_0,Nl=d._emscripten_bind_btDynamicsWorld_rayTest_3=g._emscripten_bind_btDynamicsWorld_rayTest_3,Ol=d._emscripten_bind_btDynamicsWorld_removeAction_1=g._emscripten_bind_btDynamicsWorld_removeAction_1,Pl=d._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=g._emscripten_bind_btDynamicsWorld_removeCollisionObject_1,Ql=d._emscripten_bind_btDynamicsWorld_setDebugDrawer_1= +g._emscripten_bind_btDynamicsWorld_setDebugDrawer_1,Rl=d._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=g._emscripten_bind_btDynamicsWorld_updateSingleAabb_1,Sl=d._emscripten_bind_btFaceArray___destroy___0=g._emscripten_bind_btFaceArray___destroy___0,Tl=d._emscripten_bind_btFaceArray_at_1=g._emscripten_bind_btFaceArray_at_1,Ul=d._emscripten_bind_btFaceArray_size_0=g._emscripten_bind_btFaceArray_size_0,Vl=d._emscripten_bind_btFace___destroy___0=g._emscripten_bind_btFace___destroy___0,Wl=d._emscripten_bind_btFace_get_m_indices_0= +g._emscripten_bind_btFace_get_m_indices_0,Xl=d._emscripten_bind_btFace_get_m_plane_1=g._emscripten_bind_btFace_get_m_plane_1,Yl=d._emscripten_bind_btFace_set_m_indices_1=g._emscripten_bind_btFace_set_m_indices_1,Zl=d._emscripten_bind_btFace_set_m_plane_2=g._emscripten_bind_btFace_set_m_plane_2,$l=d._emscripten_bind_btFixedConstraint___destroy___0=g._emscripten_bind_btFixedConstraint___destroy___0,am=d._emscripten_bind_btFixedConstraint_btFixedConstraint_4=g._emscripten_bind_btFixedConstraint_btFixedConstraint_4, +bm=d._emscripten_bind_btFixedConstraint_enableFeedback_1=g._emscripten_bind_btFixedConstraint_enableFeedback_1,cm=d._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0,dm=d._emscripten_bind_btFixedConstraint_getParam_2=g._emscripten_bind_btFixedConstraint_getParam_2,em=d._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1,fm=d._emscripten_bind_btFixedConstraint_setParam_3= +g._emscripten_bind_btFixedConstraint_setParam_3,gm=d._emscripten_bind_btGeneric6DofConstraint___destroy___0=g._emscripten_bind_btGeneric6DofConstraint___destroy___0,hm=d._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=g._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3,im=d._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=g._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5,jm=d._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1= +g._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1,km=d._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0,lm=d._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=g._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0,mm=d._emscripten_bind_btGeneric6DofConstraint_getParam_2=g._emscripten_bind_btGeneric6DofConstraint_getParam_2,nm=d._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1= +g._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1,om=d._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=g._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1,pm=d._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1,qm=d._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=g._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1,rm=d._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1= +g._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1,sm=d._emscripten_bind_btGeneric6DofConstraint_setParam_3=g._emscripten_bind_btGeneric6DofConstraint_setParam_3,tm=d._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=g._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0,um=d._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=g._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3,wm=d._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5= +g._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5,xm=d._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=g._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1,ym=d._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=g._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2,zm=d._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0, +Am=d._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=g._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0,Bm=d._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=g._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2,Cm=d._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=g._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1,Dm=d._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=g._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1, +Em=d._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1,Fm=d._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=g._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2,Gm=d._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=g._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0,Hm=d._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1= +g._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1,Im=d._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=g._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2,Jm=d._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=g._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1,Km=d._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=g._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1, +Lm=d._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=g._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3,Mm=d._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=g._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2,Nm=d._emscripten_bind_btGhostObject___destroy___0=g._emscripten_bind_btGhostObject___destroy___0,Om=d._emscripten_bind_btGhostObject_activate_0=g._emscripten_bind_btGhostObject_activate_0,Pm=d._emscripten_bind_btGhostObject_activate_1=g._emscripten_bind_btGhostObject_activate_1, +Qm=d._emscripten_bind_btGhostObject_btGhostObject_0=g._emscripten_bind_btGhostObject_btGhostObject_0,Rm=d._emscripten_bind_btGhostObject_forceActivationState_1=g._emscripten_bind_btGhostObject_forceActivationState_1,Sm=d._emscripten_bind_btGhostObject_getBroadphaseHandle_0=g._emscripten_bind_btGhostObject_getBroadphaseHandle_0,Tm=d._emscripten_bind_btGhostObject_getCollisionFlags_0=g._emscripten_bind_btGhostObject_getCollisionFlags_0,Um=d._emscripten_bind_btGhostObject_getCollisionShape_0=g._emscripten_bind_btGhostObject_getCollisionShape_0, +Vm=d._emscripten_bind_btGhostObject_getFriction_0=g._emscripten_bind_btGhostObject_getFriction_0,Wm=d._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=g._emscripten_bind_btGhostObject_getNumOverlappingObjects_0,Xm=d._emscripten_bind_btGhostObject_getOverlappingObject_1=g._emscripten_bind_btGhostObject_getOverlappingObject_1,Ym=d._emscripten_bind_btGhostObject_getRestitution_0=g._emscripten_bind_btGhostObject_getRestitution_0,Zm=d._emscripten_bind_btGhostObject_getRollingFriction_0=g._emscripten_bind_btGhostObject_getRollingFriction_0, +$m=d._emscripten_bind_btGhostObject_getUserIndex_0=g._emscripten_bind_btGhostObject_getUserIndex_0,an=d._emscripten_bind_btGhostObject_getUserPointer_0=g._emscripten_bind_btGhostObject_getUserPointer_0,bn=d._emscripten_bind_btGhostObject_getWorldTransform_0=g._emscripten_bind_btGhostObject_getWorldTransform_0,cn=d._emscripten_bind_btGhostObject_isActive_0=g._emscripten_bind_btGhostObject_isActive_0,dn=d._emscripten_bind_btGhostObject_isKinematicObject_0=g._emscripten_bind_btGhostObject_isKinematicObject_0, +en=d._emscripten_bind_btGhostObject_isStaticObject_0=g._emscripten_bind_btGhostObject_isStaticObject_0,fn=d._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=g._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0,gn=d._emscripten_bind_btGhostObject_setActivationState_1=g._emscripten_bind_btGhostObject_setActivationState_1,hn=d._emscripten_bind_btGhostObject_setAnisotropicFriction_2=g._emscripten_bind_btGhostObject_setAnisotropicFriction_2,jn=d._emscripten_bind_btGhostObject_setCcdMotionThreshold_1= +g._emscripten_bind_btGhostObject_setCcdMotionThreshold_1,kn=d._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=g._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1,ln=d._emscripten_bind_btGhostObject_setCollisionFlags_1=g._emscripten_bind_btGhostObject_setCollisionFlags_1,mn=d._emscripten_bind_btGhostObject_setCollisionShape_1=g._emscripten_bind_btGhostObject_setCollisionShape_1,nn=d._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=g._emscripten_bind_btGhostObject_setContactProcessingThreshold_1, +on=d._emscripten_bind_btGhostObject_setFriction_1=g._emscripten_bind_btGhostObject_setFriction_1,pn=d._emscripten_bind_btGhostObject_setRestitution_1=g._emscripten_bind_btGhostObject_setRestitution_1,qn=d._emscripten_bind_btGhostObject_setRollingFriction_1=g._emscripten_bind_btGhostObject_setRollingFriction_1,rn=d._emscripten_bind_btGhostObject_setUserIndex_1=g._emscripten_bind_btGhostObject_setUserIndex_1,sn=d._emscripten_bind_btGhostObject_setUserPointer_1=g._emscripten_bind_btGhostObject_setUserPointer_1, +tn=d._emscripten_bind_btGhostObject_setWorldTransform_1=g._emscripten_bind_btGhostObject_setWorldTransform_1,un=d._emscripten_bind_btGhostPairCallback___destroy___0=g._emscripten_bind_btGhostPairCallback___destroy___0,vn=d._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=g._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0,wn=d._emscripten_bind_btHeightfieldTerrainShape___destroy___0=g._emscripten_bind_btHeightfieldTerrainShape___destroy___0,xn=d._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9= +g._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9,yn=d._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=g._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2,zn=d._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=g._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0,An=d._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=g._emscripten_bind_btHeightfieldTerrainShape_getMargin_0,Bn=d._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1= +g._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1,Cn=d._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=g._emscripten_bind_btHeightfieldTerrainShape_setMargin_1,Dn=d._emscripten_bind_btHingeConstraint___destroy___0=g._emscripten_bind_btHingeConstraint___destroy___0,En=d._emscripten_bind_btHingeConstraint_btHingeConstraint_2=g._emscripten_bind_btHingeConstraint_btHingeConstraint_2,Fn=d._emscripten_bind_btHingeConstraint_btHingeConstraint_3=g._emscripten_bind_btHingeConstraint_btHingeConstraint_3, +Gn=d._emscripten_bind_btHingeConstraint_btHingeConstraint_4=g._emscripten_bind_btHingeConstraint_btHingeConstraint_4,Hn=d._emscripten_bind_btHingeConstraint_btHingeConstraint_5=g._emscripten_bind_btHingeConstraint_btHingeConstraint_5,In=d._emscripten_bind_btHingeConstraint_btHingeConstraint_6=g._emscripten_bind_btHingeConstraint_btHingeConstraint_6,Jn=d._emscripten_bind_btHingeConstraint_btHingeConstraint_7=g._emscripten_bind_btHingeConstraint_btHingeConstraint_7,Kn=d._emscripten_bind_btHingeConstraint_enableAngularMotor_3= +g._emscripten_bind_btHingeConstraint_enableAngularMotor_3,Ln=d._emscripten_bind_btHingeConstraint_enableFeedback_1=g._emscripten_bind_btHingeConstraint_enableFeedback_1,Mn=d._emscripten_bind_btHingeConstraint_enableMotor_1=g._emscripten_bind_btHingeConstraint_enableMotor_1,Nn=d._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0,On=d._emscripten_bind_btHingeConstraint_getParam_2=g._emscripten_bind_btHingeConstraint_getParam_2, +Pn=d._emscripten_bind_btHingeConstraint_setAngularOnly_1=g._emscripten_bind_btHingeConstraint_setAngularOnly_1,Qn=d._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1,Rn=d._emscripten_bind_btHingeConstraint_setLimit_4=g._emscripten_bind_btHingeConstraint_setLimit_4,Sn=d._emscripten_bind_btHingeConstraint_setLimit_5=g._emscripten_bind_btHingeConstraint_setLimit_5,Tn=d._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1= +g._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1,Un=d._emscripten_bind_btHingeConstraint_setMotorTarget_2=g._emscripten_bind_btHingeConstraint_setMotorTarget_2,Vn=d._emscripten_bind_btHingeConstraint_setParam_3=g._emscripten_bind_btHingeConstraint_setParam_3,Wn=d._emscripten_bind_btIDebugDraw___destroy___0=g._emscripten_bind_btIDebugDraw___destroy___0,Xn=d._emscripten_bind_btIDebugDraw_draw3dText_2=g._emscripten_bind_btIDebugDraw_draw3dText_2,Yn=d._emscripten_bind_btIDebugDraw_drawContactPoint_5= +g._emscripten_bind_btIDebugDraw_drawContactPoint_5,Zn=d._emscripten_bind_btIDebugDraw_drawLine_3=g._emscripten_bind_btIDebugDraw_drawLine_3,$n=d._emscripten_bind_btIDebugDraw_getDebugMode_0=g._emscripten_bind_btIDebugDraw_getDebugMode_0,ao=d._emscripten_bind_btIDebugDraw_reportErrorWarning_1=g._emscripten_bind_btIDebugDraw_reportErrorWarning_1,bo=d._emscripten_bind_btIDebugDraw_setDebugMode_1=g._emscripten_bind_btIDebugDraw_setDebugMode_1,co=d._emscripten_bind_btIndexedMeshArray___destroy___0=g._emscripten_bind_btIndexedMeshArray___destroy___0, +eo=d._emscripten_bind_btIndexedMeshArray_at_1=g._emscripten_bind_btIndexedMeshArray_at_1,fo=d._emscripten_bind_btIndexedMeshArray_size_0=g._emscripten_bind_btIndexedMeshArray_size_0,go=d._emscripten_bind_btIndexedMesh___destroy___0=g._emscripten_bind_btIndexedMesh___destroy___0,ho=d._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=g._emscripten_bind_btIndexedMesh_get_m_numTriangles_0,io=d._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=g._emscripten_bind_btIndexedMesh_set_m_numTriangles_1, +jo=d._emscripten_bind_btIntArray___destroy___0=g._emscripten_bind_btIntArray___destroy___0,ko=d._emscripten_bind_btIntArray_at_1=g._emscripten_bind_btIntArray_at_1,lo=d._emscripten_bind_btIntArray_size_0=g._emscripten_bind_btIntArray_size_0,mo=d._emscripten_bind_btKinematicCharacterController___destroy___0=g._emscripten_bind_btKinematicCharacterController___destroy___0,no=d._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=g._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3, +oo=d._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=g._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4,po=d._emscripten_bind_btKinematicCharacterController_canJump_0=g._emscripten_bind_btKinematicCharacterController_canJump_0,qo=d._emscripten_bind_btKinematicCharacterController_getGhostObject_0=g._emscripten_bind_btKinematicCharacterController_getGhostObject_0,ro=d._emscripten_bind_btKinematicCharacterController_getGravity_0=g._emscripten_bind_btKinematicCharacterController_getGravity_0, +so=d._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=g._emscripten_bind_btKinematicCharacterController_getMaxSlope_0,to=d._emscripten_bind_btKinematicCharacterController_jump_0=g._emscripten_bind_btKinematicCharacterController_jump_0,uo=d._emscripten_bind_btKinematicCharacterController_onGround_0=g._emscripten_bind_btKinematicCharacterController_onGround_0,vo=d._emscripten_bind_btKinematicCharacterController_playerStep_2=g._emscripten_bind_btKinematicCharacterController_playerStep_2, +wo=d._emscripten_bind_btKinematicCharacterController_preStep_1=g._emscripten_bind_btKinematicCharacterController_preStep_1,xo=d._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=g._emscripten_bind_btKinematicCharacterController_setFallSpeed_1,yo=d._emscripten_bind_btKinematicCharacterController_setGravity_1=g._emscripten_bind_btKinematicCharacterController_setGravity_1,zo=d._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=g._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1, +Ao=d._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=g._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1,Bo=d._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=g._emscripten_bind_btKinematicCharacterController_setMaxSlope_1,Co=d._emscripten_bind_btKinematicCharacterController_setUpAxis_1=g._emscripten_bind_btKinematicCharacterController_setUpAxis_1,Do=d._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=g._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1, +Eo=d._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=g._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1,Fo=d._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=g._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2,Go=d._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=g._emscripten_bind_btKinematicCharacterController_setWalkDirection_1,Ho=d._emscripten_bind_btKinematicCharacterController_updateAction_2= +g._emscripten_bind_btKinematicCharacterController_updateAction_2,Io=d._emscripten_bind_btKinematicCharacterController_warp_1=g._emscripten_bind_btKinematicCharacterController_warp_1,Jo=d._emscripten_bind_btManifoldPoint___destroy___0=g._emscripten_bind_btManifoldPoint___destroy___0,Ko=d._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=g._emscripten_bind_btManifoldPoint_getAppliedImpulse_0,Lo=d._emscripten_bind_btManifoldPoint_getDistance_0=g._emscripten_bind_btManifoldPoint_getDistance_0,Mo=d._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0= +g._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0,No=d._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=g._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0,Oo=d._emscripten_bind_btManifoldPoint_get_m_localPointA_0=g._emscripten_bind_btManifoldPoint_get_m_localPointA_0,Po=d._emscripten_bind_btManifoldPoint_get_m_localPointB_0=g._emscripten_bind_btManifoldPoint_get_m_localPointB_0,Qo=d._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=g._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0, +Ro=d._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=g._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0,So=d._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=g._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0,To=d._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=g._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0,Uo=d._emscripten_bind_btManifoldPoint_set_m_localPointA_1=g._emscripten_bind_btManifoldPoint_set_m_localPointA_1,Vo=d._emscripten_bind_btManifoldPoint_set_m_localPointB_1= +g._emscripten_bind_btManifoldPoint_set_m_localPointB_1,Wo=d._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=g._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1,Xo=d._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=g._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1,Yo=d._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=g._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1,Zo=d._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=g._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1, +$o=d._emscripten_bind_btMatrix3x3___destroy___0=g._emscripten_bind_btMatrix3x3___destroy___0,ap=d._emscripten_bind_btMatrix3x3_getRotation_1=g._emscripten_bind_btMatrix3x3_getRotation_1,bp=d._emscripten_bind_btMatrix3x3_getRow_1=g._emscripten_bind_btMatrix3x3_getRow_1,cp=d._emscripten_bind_btMatrix3x3_setEulerZYX_3=g._emscripten_bind_btMatrix3x3_setEulerZYX_3,dp=d._emscripten_bind_btMotionState___destroy___0=g._emscripten_bind_btMotionState___destroy___0,ep=d._emscripten_bind_btMotionState_getWorldTransform_1= +g._emscripten_bind_btMotionState_getWorldTransform_1,fp=d._emscripten_bind_btMotionState_setWorldTransform_1=g._emscripten_bind_btMotionState_setWorldTransform_1,gp=d._emscripten_bind_btMultiSphereShape___destroy___0=g._emscripten_bind_btMultiSphereShape___destroy___0,hp=d._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=g._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3,ip=d._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=g._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2, +jp=d._emscripten_bind_btMultiSphereShape_getLocalScaling_0=g._emscripten_bind_btMultiSphereShape_getLocalScaling_0,kp=d._emscripten_bind_btMultiSphereShape_setLocalScaling_1=g._emscripten_bind_btMultiSphereShape_setLocalScaling_1,lp=d._emscripten_bind_btOverlappingPairCache___destroy___0=g._emscripten_bind_btOverlappingPairCache___destroy___0,mp=d._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=g._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0,np=d._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1= +g._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1,op=d._emscripten_bind_btOverlappingPairCallback___destroy___0=g._emscripten_bind_btOverlappingPairCallback___destroy___0,pp=d._emscripten_bind_btPairCachingGhostObject___destroy___0=g._emscripten_bind_btPairCachingGhostObject___destroy___0,qp=d._emscripten_bind_btPairCachingGhostObject_activate_0=g._emscripten_bind_btPairCachingGhostObject_activate_0,rp=d._emscripten_bind_btPairCachingGhostObject_activate_1=g._emscripten_bind_btPairCachingGhostObject_activate_1, +sp=d._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=g._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0,tp=d._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=g._emscripten_bind_btPairCachingGhostObject_forceActivationState_1,up=d._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=g._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0,vp=d._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=g._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0, +wp=d._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=g._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0,xp=d._emscripten_bind_btPairCachingGhostObject_getFriction_0=g._emscripten_bind_btPairCachingGhostObject_getFriction_0,yp=d._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=g._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0,zp=d._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=g._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1, +Ap=d._emscripten_bind_btPairCachingGhostObject_getRestitution_0=g._emscripten_bind_btPairCachingGhostObject_getRestitution_0,Bp=d._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=g._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0,Cp=d._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=g._emscripten_bind_btPairCachingGhostObject_getUserIndex_0,Dp=d._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=g._emscripten_bind_btPairCachingGhostObject_getUserPointer_0, +Ep=d._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=g._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0,Fp=d._emscripten_bind_btPairCachingGhostObject_isActive_0=g._emscripten_bind_btPairCachingGhostObject_isActive_0,Gp=d._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=g._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0,Hp=d._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=g._emscripten_bind_btPairCachingGhostObject_isStaticObject_0,Ip= +d._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=g._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0,Jp=d._emscripten_bind_btPairCachingGhostObject_setActivationState_1=g._emscripten_bind_btPairCachingGhostObject_setActivationState_1,Kp=d._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=g._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2,Lp=d._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=g._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1, +Mp=d._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=g._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1,Np=d._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=g._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1,Op=d._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=g._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1,Pp=d._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=g._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1, +Qp=d._emscripten_bind_btPairCachingGhostObject_setFriction_1=g._emscripten_bind_btPairCachingGhostObject_setFriction_1,Rp=d._emscripten_bind_btPairCachingGhostObject_setRestitution_1=g._emscripten_bind_btPairCachingGhostObject_setRestitution_1,Sp=d._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=g._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1,Tp=d._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=g._emscripten_bind_btPairCachingGhostObject_setUserIndex_1,Up= +d._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=g._emscripten_bind_btPairCachingGhostObject_setUserPointer_1,Vp=d._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=g._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1,Wp=d._emscripten_bind_btPersistentManifold___destroy___0=g._emscripten_bind_btPersistentManifold___destroy___0,Xp=d._emscripten_bind_btPersistentManifold_btPersistentManifold_0=g._emscripten_bind_btPersistentManifold_btPersistentManifold_0,Yp=d._emscripten_bind_btPersistentManifold_getBody0_0= +g._emscripten_bind_btPersistentManifold_getBody0_0,Zp=d._emscripten_bind_btPersistentManifold_getBody1_0=g._emscripten_bind_btPersistentManifold_getBody1_0,$p=d._emscripten_bind_btPersistentManifold_getContactPoint_1=g._emscripten_bind_btPersistentManifold_getContactPoint_1,aq=d._emscripten_bind_btPersistentManifold_getNumContacts_0=g._emscripten_bind_btPersistentManifold_getNumContacts_0,bq=d._emscripten_bind_btPoint2PointConstraint___destroy___0=g._emscripten_bind_btPoint2PointConstraint___destroy___0, +cq=d._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=g._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2,dq=d._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=g._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4,eq=d._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=g._emscripten_bind_btPoint2PointConstraint_enableFeedback_1,fq=d._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0, +gq=d._emscripten_bind_btPoint2PointConstraint_getParam_2=g._emscripten_bind_btPoint2PointConstraint_getParam_2,hq=d._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=g._emscripten_bind_btPoint2PointConstraint_getPivotInA_0,iq=d._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=g._emscripten_bind_btPoint2PointConstraint_getPivotInB_0,jq=d._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=g._emscripten_bind_btPoint2PointConstraint_get_m_setting_0,kq=d._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1= +g._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1,lq=d._emscripten_bind_btPoint2PointConstraint_setParam_3=g._emscripten_bind_btPoint2PointConstraint_setParam_3,mq=d._emscripten_bind_btPoint2PointConstraint_setPivotA_1=g._emscripten_bind_btPoint2PointConstraint_setPivotA_1,nq=d._emscripten_bind_btPoint2PointConstraint_setPivotB_1=g._emscripten_bind_btPoint2PointConstraint_setPivotB_1,oq=d._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=g._emscripten_bind_btPoint2PointConstraint_set_m_setting_1, +pq=d._emscripten_bind_btQuadWord___destroy___0=g._emscripten_bind_btQuadWord___destroy___0,qq=d._emscripten_bind_btQuadWord_setW_1=g._emscripten_bind_btQuadWord_setW_1,rq=d._emscripten_bind_btQuadWord_setX_1=g._emscripten_bind_btQuadWord_setX_1,sq=d._emscripten_bind_btQuadWord_setY_1=g._emscripten_bind_btQuadWord_setY_1,tq=d._emscripten_bind_btQuadWord_setZ_1=g._emscripten_bind_btQuadWord_setZ_1,uq=d._emscripten_bind_btQuadWord_w_0=g._emscripten_bind_btQuadWord_w_0,vq=d._emscripten_bind_btQuadWord_x_0= +g._emscripten_bind_btQuadWord_x_0,wq=d._emscripten_bind_btQuadWord_y_0=g._emscripten_bind_btQuadWord_y_0,xq=d._emscripten_bind_btQuadWord_z_0=g._emscripten_bind_btQuadWord_z_0,yq=d._emscripten_bind_btQuaternion___destroy___0=g._emscripten_bind_btQuaternion___destroy___0,zq=d._emscripten_bind_btQuaternion_angleShortestPath_1=g._emscripten_bind_btQuaternion_angleShortestPath_1,Aq=d._emscripten_bind_btQuaternion_angle_1=g._emscripten_bind_btQuaternion_angle_1,Bq=d._emscripten_bind_btQuaternion_btQuaternion_4= +g._emscripten_bind_btQuaternion_btQuaternion_4,Cq=d._emscripten_bind_btQuaternion_dot_1=g._emscripten_bind_btQuaternion_dot_1,Dq=d._emscripten_bind_btQuaternion_getAngleShortestPath_0=g._emscripten_bind_btQuaternion_getAngleShortestPath_0,Eq=d._emscripten_bind_btQuaternion_getAngle_0=g._emscripten_bind_btQuaternion_getAngle_0,Fq=d._emscripten_bind_btQuaternion_getAxis_0=g._emscripten_bind_btQuaternion_getAxis_0,Gq=d._emscripten_bind_btQuaternion_inverse_0=g._emscripten_bind_btQuaternion_inverse_0, +Hq=d._emscripten_bind_btQuaternion_length2_0=g._emscripten_bind_btQuaternion_length2_0,Iq=d._emscripten_bind_btQuaternion_length_0=g._emscripten_bind_btQuaternion_length_0,Jq=d._emscripten_bind_btQuaternion_normalize_0=g._emscripten_bind_btQuaternion_normalize_0,Kq=d._emscripten_bind_btQuaternion_normalized_0=g._emscripten_bind_btQuaternion_normalized_0,Lq=d._emscripten_bind_btQuaternion_op_add_1=g._emscripten_bind_btQuaternion_op_add_1,Mq=d._emscripten_bind_btQuaternion_op_div_1=g._emscripten_bind_btQuaternion_op_div_1, +Nq=d._emscripten_bind_btQuaternion_op_mul_1=g._emscripten_bind_btQuaternion_op_mul_1,Oq=d._emscripten_bind_btQuaternion_op_mulq_1=g._emscripten_bind_btQuaternion_op_mulq_1,Pq=d._emscripten_bind_btQuaternion_op_sub_1=g._emscripten_bind_btQuaternion_op_sub_1,Qq=d._emscripten_bind_btQuaternion_setEulerZYX_3=g._emscripten_bind_btQuaternion_setEulerZYX_3,Rq=d._emscripten_bind_btQuaternion_setRotation_2=g._emscripten_bind_btQuaternion_setRotation_2,Sq=d._emscripten_bind_btQuaternion_setValue_4=g._emscripten_bind_btQuaternion_setValue_4, +Tq=d._emscripten_bind_btQuaternion_setW_1=g._emscripten_bind_btQuaternion_setW_1,Uq=d._emscripten_bind_btQuaternion_setX_1=g._emscripten_bind_btQuaternion_setX_1,Vq=d._emscripten_bind_btQuaternion_setY_1=g._emscripten_bind_btQuaternion_setY_1,Wq=d._emscripten_bind_btQuaternion_setZ_1=g._emscripten_bind_btQuaternion_setZ_1,Xq=d._emscripten_bind_btQuaternion_w_0=g._emscripten_bind_btQuaternion_w_0,Yq=d._emscripten_bind_btQuaternion_x_0=g._emscripten_bind_btQuaternion_x_0,Zq=d._emscripten_bind_btQuaternion_y_0= +g._emscripten_bind_btQuaternion_y_0,$q=d._emscripten_bind_btQuaternion_z_0=g._emscripten_bind_btQuaternion_z_0,ar=d._emscripten_bind_btRaycastVehicle___destroy___0=g._emscripten_bind_btRaycastVehicle___destroy___0,br=d._emscripten_bind_btRaycastVehicle_addWheel_7=g._emscripten_bind_btRaycastVehicle_addWheel_7,cr=d._emscripten_bind_btRaycastVehicle_applyEngineForce_2=g._emscripten_bind_btRaycastVehicle_applyEngineForce_2,dr=d._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=g._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3, +er=d._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=g._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0,fr=d._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=g._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0,gr=d._emscripten_bind_btRaycastVehicle_getForwardAxis_0=g._emscripten_bind_btRaycastVehicle_getForwardAxis_0,hr=d._emscripten_bind_btRaycastVehicle_getForwardVector_0=g._emscripten_bind_btRaycastVehicle_getForwardVector_0,ir=d._emscripten_bind_btRaycastVehicle_getNumWheels_0= +g._emscripten_bind_btRaycastVehicle_getNumWheels_0,jr=d._emscripten_bind_btRaycastVehicle_getRightAxis_0=g._emscripten_bind_btRaycastVehicle_getRightAxis_0,kr=d._emscripten_bind_btRaycastVehicle_getRigidBody_0=g._emscripten_bind_btRaycastVehicle_getRigidBody_0,lr=d._emscripten_bind_btRaycastVehicle_getSteeringValue_1=g._emscripten_bind_btRaycastVehicle_getSteeringValue_1,mr=d._emscripten_bind_btRaycastVehicle_getUpAxis_0=g._emscripten_bind_btRaycastVehicle_getUpAxis_0,nr=d._emscripten_bind_btRaycastVehicle_getUserConstraintId_0= +g._emscripten_bind_btRaycastVehicle_getUserConstraintId_0,or=d._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=g._emscripten_bind_btRaycastVehicle_getUserConstraintType_0,pr=d._emscripten_bind_btRaycastVehicle_getWheelInfo_1=g._emscripten_bind_btRaycastVehicle_getWheelInfo_1,qr=d._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=g._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1,rr=d._emscripten_bind_btRaycastVehicle_rayCast_1=g._emscripten_bind_btRaycastVehicle_rayCast_1,sr= +d._emscripten_bind_btRaycastVehicle_resetSuspension_0=g._emscripten_bind_btRaycastVehicle_resetSuspension_0,tr=d._emscripten_bind_btRaycastVehicle_setBrake_2=g._emscripten_bind_btRaycastVehicle_setBrake_2,ur=d._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=g._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3,vr=d._emscripten_bind_btRaycastVehicle_setPitchControl_1=g._emscripten_bind_btRaycastVehicle_setPitchControl_1,wr=d._emscripten_bind_btRaycastVehicle_setSteeringValue_2=g._emscripten_bind_btRaycastVehicle_setSteeringValue_2, +xr=d._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=g._emscripten_bind_btRaycastVehicle_setUserConstraintId_1,yr=d._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=g._emscripten_bind_btRaycastVehicle_setUserConstraintType_1,zr=d._emscripten_bind_btRaycastVehicle_updateAction_2=g._emscripten_bind_btRaycastVehicle_updateAction_2,Ar=d._emscripten_bind_btRaycastVehicle_updateFriction_1=g._emscripten_bind_btRaycastVehicle_updateFriction_1,Br=d._emscripten_bind_btRaycastVehicle_updateSuspension_1= +g._emscripten_bind_btRaycastVehicle_updateSuspension_1,Cr=d._emscripten_bind_btRaycastVehicle_updateVehicle_1=g._emscripten_bind_btRaycastVehicle_updateVehicle_1,Dr=d._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=g._emscripten_bind_btRaycastVehicle_updateWheelTransform_2,Er=d._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=g._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1,Fr=d._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=g._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2, +Gr=d._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=g._emscripten_bind_btRigidBodyConstructionInfo___destroy___0,Hr=d._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=g._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3,Ir=d._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=g._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4,Jr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0= +g._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0,Kr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0,Lr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0,Mr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0= +g._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0,Nr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0,Or=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0,Pr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0, +Qr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0,Rr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0,Sr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0,Tr=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0= +g._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0,Ur=d._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=g._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0,Vr=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1,Wr=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1, +Xr=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1,Yr=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1,Zr=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1,$r=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1= +g._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1,as=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1,bs=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1,cs=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1, +ds=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1,es=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1,gs=d._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=g._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1,hs=d._emscripten_bind_btRigidBody___destroy___0=g._emscripten_bind_btRigidBody___destroy___0, +is=d._emscripten_bind_btRigidBody_activate_0=g._emscripten_bind_btRigidBody_activate_0,js=d._emscripten_bind_btRigidBody_activate_1=g._emscripten_bind_btRigidBody_activate_1,ks=d._emscripten_bind_btRigidBody_applyCentralForce_1=g._emscripten_bind_btRigidBody_applyCentralForce_1,ls=d._emscripten_bind_btRigidBody_applyCentralImpulse_1=g._emscripten_bind_btRigidBody_applyCentralImpulse_1,ms=d._emscripten_bind_btRigidBody_applyCentralLocalForce_1=g._emscripten_bind_btRigidBody_applyCentralLocalForce_1, +ns=d._emscripten_bind_btRigidBody_applyForce_2=g._emscripten_bind_btRigidBody_applyForce_2,ps=d._emscripten_bind_btRigidBody_applyGravity_0=g._emscripten_bind_btRigidBody_applyGravity_0,qs=d._emscripten_bind_btRigidBody_applyImpulse_2=g._emscripten_bind_btRigidBody_applyImpulse_2,rs=d._emscripten_bind_btRigidBody_applyLocalTorque_1=g._emscripten_bind_btRigidBody_applyLocalTorque_1,ss=d._emscripten_bind_btRigidBody_applyTorqueImpulse_1=g._emscripten_bind_btRigidBody_applyTorqueImpulse_1,ts=d._emscripten_bind_btRigidBody_applyTorque_1= +g._emscripten_bind_btRigidBody_applyTorque_1,us=d._emscripten_bind_btRigidBody_btRigidBody_1=g._emscripten_bind_btRigidBody_btRigidBody_1,vs=d._emscripten_bind_btRigidBody_forceActivationState_1=g._emscripten_bind_btRigidBody_forceActivationState_1,xs=d._emscripten_bind_btRigidBody_getAabb_2=g._emscripten_bind_btRigidBody_getAabb_2,ys=d._emscripten_bind_btRigidBody_getAngularDamping_0=g._emscripten_bind_btRigidBody_getAngularDamping_0,zs=d._emscripten_bind_btRigidBody_getAngularFactor_0=g._emscripten_bind_btRigidBody_getAngularFactor_0, +As=d._emscripten_bind_btRigidBody_getAngularVelocity_0=g._emscripten_bind_btRigidBody_getAngularVelocity_0,Bs=d._emscripten_bind_btRigidBody_getBroadphaseHandle_0=g._emscripten_bind_btRigidBody_getBroadphaseHandle_0,Cs=d._emscripten_bind_btRigidBody_getBroadphaseProxy_0=g._emscripten_bind_btRigidBody_getBroadphaseProxy_0,Ds=d._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=g._emscripten_bind_btRigidBody_getCenterOfMassTransform_0,Es=d._emscripten_bind_btRigidBody_getCollisionFlags_0=g._emscripten_bind_btRigidBody_getCollisionFlags_0, +Fs=d._emscripten_bind_btRigidBody_getCollisionShape_0=g._emscripten_bind_btRigidBody_getCollisionShape_0,Gs=d._emscripten_bind_btRigidBody_getFriction_0=g._emscripten_bind_btRigidBody_getFriction_0,Hs=d._emscripten_bind_btRigidBody_getGravity_0=g._emscripten_bind_btRigidBody_getGravity_0,Is=d._emscripten_bind_btRigidBody_getLinearDamping_0=g._emscripten_bind_btRigidBody_getLinearDamping_0,Js=d._emscripten_bind_btRigidBody_getLinearFactor_0=g._emscripten_bind_btRigidBody_getLinearFactor_0,Ks=d._emscripten_bind_btRigidBody_getLinearVelocity_0= +g._emscripten_bind_btRigidBody_getLinearVelocity_0,Ls=d._emscripten_bind_btRigidBody_getMotionState_0=g._emscripten_bind_btRigidBody_getMotionState_0,Ms=d._emscripten_bind_btRigidBody_getRestitution_0=g._emscripten_bind_btRigidBody_getRestitution_0,Ns=d._emscripten_bind_btRigidBody_getRollingFriction_0=g._emscripten_bind_btRigidBody_getRollingFriction_0,Os=d._emscripten_bind_btRigidBody_getUserIndex_0=g._emscripten_bind_btRigidBody_getUserIndex_0,Ps=d._emscripten_bind_btRigidBody_getUserPointer_0= +g._emscripten_bind_btRigidBody_getUserPointer_0,Qs=d._emscripten_bind_btRigidBody_getWorldTransform_0=g._emscripten_bind_btRigidBody_getWorldTransform_0,Rs=d._emscripten_bind_btRigidBody_isActive_0=g._emscripten_bind_btRigidBody_isActive_0,Ss=d._emscripten_bind_btRigidBody_isKinematicObject_0=g._emscripten_bind_btRigidBody_isKinematicObject_0,Ts=d._emscripten_bind_btRigidBody_isStaticObject_0=g._emscripten_bind_btRigidBody_isStaticObject_0,Us=d._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0= +g._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0,Vs=d._emscripten_bind_btRigidBody_setActivationState_1=g._emscripten_bind_btRigidBody_setActivationState_1,Ws=d._emscripten_bind_btRigidBody_setAngularFactor_1=g._emscripten_bind_btRigidBody_setAngularFactor_1,Xs=d._emscripten_bind_btRigidBody_setAngularVelocity_1=g._emscripten_bind_btRigidBody_setAngularVelocity_1,Ys=d._emscripten_bind_btRigidBody_setAnisotropicFriction_2=g._emscripten_bind_btRigidBody_setAnisotropicFriction_2,Zs=d._emscripten_bind_btRigidBody_setCcdMotionThreshold_1= +g._emscripten_bind_btRigidBody_setCcdMotionThreshold_1,$s=d._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=g._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1,at=d._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=g._emscripten_bind_btRigidBody_setCenterOfMassTransform_1,bt=d._emscripten_bind_btRigidBody_setCollisionFlags_1=g._emscripten_bind_btRigidBody_setCollisionFlags_1,ct=d._emscripten_bind_btRigidBody_setCollisionShape_1=g._emscripten_bind_btRigidBody_setCollisionShape_1, +dt=d._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=g._emscripten_bind_btRigidBody_setContactProcessingThreshold_1,et=d._emscripten_bind_btRigidBody_setDamping_2=g._emscripten_bind_btRigidBody_setDamping_2,ft=d._emscripten_bind_btRigidBody_setFriction_1=g._emscripten_bind_btRigidBody_setFriction_1,gt=d._emscripten_bind_btRigidBody_setGravity_1=g._emscripten_bind_btRigidBody_setGravity_1,ht=d._emscripten_bind_btRigidBody_setLinearFactor_1=g._emscripten_bind_btRigidBody_setLinearFactor_1, +it=d._emscripten_bind_btRigidBody_setLinearVelocity_1=g._emscripten_bind_btRigidBody_setLinearVelocity_1,jt=d._emscripten_bind_btRigidBody_setMassProps_2=g._emscripten_bind_btRigidBody_setMassProps_2,kt=d._emscripten_bind_btRigidBody_setMotionState_1=g._emscripten_bind_btRigidBody_setMotionState_1,lt=d._emscripten_bind_btRigidBody_setRestitution_1=g._emscripten_bind_btRigidBody_setRestitution_1,mt=d._emscripten_bind_btRigidBody_setRollingFriction_1=g._emscripten_bind_btRigidBody_setRollingFriction_1, +nt=d._emscripten_bind_btRigidBody_setSleepingThresholds_2=g._emscripten_bind_btRigidBody_setSleepingThresholds_2,ot=d._emscripten_bind_btRigidBody_setUserIndex_1=g._emscripten_bind_btRigidBody_setUserIndex_1,pt=d._emscripten_bind_btRigidBody_setUserPointer_1=g._emscripten_bind_btRigidBody_setUserPointer_1,qt=d._emscripten_bind_btRigidBody_setWorldTransform_1=g._emscripten_bind_btRigidBody_setWorldTransform_1,rt=d._emscripten_bind_btRigidBody_upcast_1=g._emscripten_bind_btRigidBody_upcast_1,st=d._emscripten_bind_btRigidBody_updateInertiaTensor_0= +g._emscripten_bind_btRigidBody_updateInertiaTensor_0,tt=d._emscripten_bind_btScalarArray___destroy___0=g._emscripten_bind_btScalarArray___destroy___0,ut=d._emscripten_bind_btScalarArray_at_1=g._emscripten_bind_btScalarArray_at_1,vt=d._emscripten_bind_btScalarArray_size_0=g._emscripten_bind_btScalarArray_size_0,wt=d._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=g._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0,xt=d._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0= +g._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0,yt=d._emscripten_bind_btShapeHull___destroy___0=g._emscripten_bind_btShapeHull___destroy___0,zt=d._emscripten_bind_btShapeHull_btShapeHull_1=g._emscripten_bind_btShapeHull_btShapeHull_1,At=d._emscripten_bind_btShapeHull_buildHull_1=g._emscripten_bind_btShapeHull_buildHull_1,Bt=d._emscripten_bind_btShapeHull_getVertexPointer_0=g._emscripten_bind_btShapeHull_getVertexPointer_0,Ct=d._emscripten_bind_btShapeHull_numVertices_0= +g._emscripten_bind_btShapeHull_numVertices_0,Dt=d._emscripten_bind_btSliderConstraint___destroy___0=g._emscripten_bind_btSliderConstraint___destroy___0,Et=d._emscripten_bind_btSliderConstraint_btSliderConstraint_3=g._emscripten_bind_btSliderConstraint_btSliderConstraint_3,Ft=d._emscripten_bind_btSliderConstraint_btSliderConstraint_5=g._emscripten_bind_btSliderConstraint_btSliderConstraint_5,Gt=d._emscripten_bind_btSliderConstraint_enableFeedback_1=g._emscripten_bind_btSliderConstraint_enableFeedback_1, +Ht=d._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0,It=d._emscripten_bind_btSliderConstraint_getParam_2=g._emscripten_bind_btSliderConstraint_getParam_2,Jt=d._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1,Kt=d._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=g._emscripten_bind_btSliderConstraint_setLowerAngLimit_1,Lt=d._emscripten_bind_btSliderConstraint_setLowerLinLimit_1= +g._emscripten_bind_btSliderConstraint_setLowerLinLimit_1,Mt=d._emscripten_bind_btSliderConstraint_setParam_3=g._emscripten_bind_btSliderConstraint_setParam_3,Nt=d._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=g._emscripten_bind_btSliderConstraint_setUpperAngLimit_1,Ot=d._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=g._emscripten_bind_btSliderConstraint_setUpperLinLimit_1,Pt=d._emscripten_bind_btSoftBodyArray___destroy___0=g._emscripten_bind_btSoftBodyArray___destroy___0,Qt=d._emscripten_bind_btSoftBodyArray_at_1= +g._emscripten_bind_btSoftBodyArray_at_1,Rt=d._emscripten_bind_btSoftBodyArray_size_0=g._emscripten_bind_btSoftBodyArray_size_0,St=d._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=g._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4,Tt=d._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=g._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4,Ut=d._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=g._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5,Vt=d._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10= +g._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10,Wt=d._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=g._emscripten_bind_btSoftBodyHelpers_CreatePatch_9,Xt=d._emscripten_bind_btSoftBodyHelpers_CreateRope_5=g._emscripten_bind_btSoftBodyHelpers_CreateRope_5,Yt=d._emscripten_bind_btSoftBodyHelpers___destroy___0=g._emscripten_bind_btSoftBodyHelpers___destroy___0,Zt=d._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=g._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0,$t=d._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0= +g._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0,au=d._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=g._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0,bu=d._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=g._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1, +cu=d._emscripten_bind_btSoftBodySolver___destroy___0=g._emscripten_bind_btSoftBodySolver___destroy___0,du=d._emscripten_bind_btSoftBodyWorldInfo___destroy___0=g._emscripten_bind_btSoftBodyWorldInfo___destroy___0,eu=d._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=g._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0,fu=d._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=g._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0,gu=d._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0= +g._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0,hu=d._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=g._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0,iu=d._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=g._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0,ju=d._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=g._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0,ku=d._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=g._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0, +lu=d._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=g._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0,mu=d._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=g._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0,nu=d._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=g._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1,ou=d._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=g._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1,pu=d._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1= +g._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1,qu=d._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=g._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1,ru=d._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=g._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1,su=d._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=g._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1,tu=d._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=g._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1, +uu=d._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=g._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1,vu=d._emscripten_bind_btSoftBody___destroy___0=g._emscripten_bind_btSoftBody___destroy___0,wu=d._emscripten_bind_btSoftBody_activate_0=g._emscripten_bind_btSoftBody_activate_0,xu=d._emscripten_bind_btSoftBody_activate_1=g._emscripten_bind_btSoftBody_activate_1,yu=d._emscripten_bind_btSoftBody_addAeroForceToNode_2=g._emscripten_bind_btSoftBody_addAeroForceToNode_2,zu=d._emscripten_bind_btSoftBody_addForce_1= +g._emscripten_bind_btSoftBody_addForce_1,Au=d._emscripten_bind_btSoftBody_addForce_2=g._emscripten_bind_btSoftBody_addForce_2,Bu=d._emscripten_bind_btSoftBody_appendAnchor_4=g._emscripten_bind_btSoftBody_appendAnchor_4,Cu=d._emscripten_bind_btSoftBody_appendFace_4=g._emscripten_bind_btSoftBody_appendFace_4,Du=d._emscripten_bind_btSoftBody_appendLink_4=g._emscripten_bind_btSoftBody_appendLink_4,Eu=d._emscripten_bind_btSoftBody_appendMaterial_0=g._emscripten_bind_btSoftBody_appendMaterial_0,Fu=d._emscripten_bind_btSoftBody_appendNode_2= +g._emscripten_bind_btSoftBody_appendNode_2,Gu=d._emscripten_bind_btSoftBody_appendTetra_5=g._emscripten_bind_btSoftBody_appendTetra_5,Hu=d._emscripten_bind_btSoftBody_btSoftBody_4=g._emscripten_bind_btSoftBody_btSoftBody_4,Iu=d._emscripten_bind_btSoftBody_checkFace_3=g._emscripten_bind_btSoftBody_checkFace_3,Ju=d._emscripten_bind_btSoftBody_checkLink_2=g._emscripten_bind_btSoftBody_checkLink_2,Ku=d._emscripten_bind_btSoftBody_forceActivationState_1=g._emscripten_bind_btSoftBody_forceActivationState_1, +Lu=d._emscripten_bind_btSoftBody_generateBendingConstraints_2=g._emscripten_bind_btSoftBody_generateBendingConstraints_2,Mu=d._emscripten_bind_btSoftBody_generateClusters_1=g._emscripten_bind_btSoftBody_generateClusters_1,Nu=d._emscripten_bind_btSoftBody_generateClusters_2=g._emscripten_bind_btSoftBody_generateClusters_2,Ou=d._emscripten_bind_btSoftBody_getBroadphaseHandle_0=g._emscripten_bind_btSoftBody_getBroadphaseHandle_0,Pu=d._emscripten_bind_btSoftBody_getCollisionFlags_0=g._emscripten_bind_btSoftBody_getCollisionFlags_0, +Qu=d._emscripten_bind_btSoftBody_getCollisionShape_0=g._emscripten_bind_btSoftBody_getCollisionShape_0,Ru=d._emscripten_bind_btSoftBody_getFriction_0=g._emscripten_bind_btSoftBody_getFriction_0,Su=d._emscripten_bind_btSoftBody_getRestitution_0=g._emscripten_bind_btSoftBody_getRestitution_0,Tu=d._emscripten_bind_btSoftBody_getRollingFriction_0=g._emscripten_bind_btSoftBody_getRollingFriction_0,Uu=d._emscripten_bind_btSoftBody_getTotalMass_0=g._emscripten_bind_btSoftBody_getTotalMass_0,Vu=d._emscripten_bind_btSoftBody_getUserIndex_0= +g._emscripten_bind_btSoftBody_getUserIndex_0,Wu=d._emscripten_bind_btSoftBody_getUserPointer_0=g._emscripten_bind_btSoftBody_getUserPointer_0,Xu=d._emscripten_bind_btSoftBody_getWorldTransform_0=g._emscripten_bind_btSoftBody_getWorldTransform_0,Yu=d._emscripten_bind_btSoftBody_get_m_anchors_0=g._emscripten_bind_btSoftBody_get_m_anchors_0,Zu=d._emscripten_bind_btSoftBody_get_m_cfg_0=g._emscripten_bind_btSoftBody_get_m_cfg_0,$u=d._emscripten_bind_btSoftBody_get_m_materials_0=g._emscripten_bind_btSoftBody_get_m_materials_0, +av=d._emscripten_bind_btSoftBody_get_m_nodes_0=g._emscripten_bind_btSoftBody_get_m_nodes_0,bv=d._emscripten_bind_btSoftBody_isActive_0=g._emscripten_bind_btSoftBody_isActive_0,cv=d._emscripten_bind_btSoftBody_isKinematicObject_0=g._emscripten_bind_btSoftBody_isKinematicObject_0,dv=d._emscripten_bind_btSoftBody_isStaticObject_0=g._emscripten_bind_btSoftBody_isStaticObject_0,ev=d._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=g._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0,fv=d._emscripten_bind_btSoftBody_rotate_1= +g._emscripten_bind_btSoftBody_rotate_1,gv=d._emscripten_bind_btSoftBody_scale_1=g._emscripten_bind_btSoftBody_scale_1,hv=d._emscripten_bind_btSoftBody_setActivationState_1=g._emscripten_bind_btSoftBody_setActivationState_1,iv=d._emscripten_bind_btSoftBody_setAnisotropicFriction_2=g._emscripten_bind_btSoftBody_setAnisotropicFriction_2,jv=d._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=g._emscripten_bind_btSoftBody_setCcdMotionThreshold_1,kv=d._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1= +g._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1,lv=d._emscripten_bind_btSoftBody_setCollisionFlags_1=g._emscripten_bind_btSoftBody_setCollisionFlags_1,mv=d._emscripten_bind_btSoftBody_setCollisionShape_1=g._emscripten_bind_btSoftBody_setCollisionShape_1,nv=d._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=g._emscripten_bind_btSoftBody_setContactProcessingThreshold_1,ov=d._emscripten_bind_btSoftBody_setFriction_1=g._emscripten_bind_btSoftBody_setFriction_1,pv=d._emscripten_bind_btSoftBody_setMass_2= +g._emscripten_bind_btSoftBody_setMass_2,qv=d._emscripten_bind_btSoftBody_setRestitution_1=g._emscripten_bind_btSoftBody_setRestitution_1,rv=d._emscripten_bind_btSoftBody_setRollingFriction_1=g._emscripten_bind_btSoftBody_setRollingFriction_1,sv=d._emscripten_bind_btSoftBody_setTotalMass_2=g._emscripten_bind_btSoftBody_setTotalMass_2,tv=d._emscripten_bind_btSoftBody_setUserIndex_1=g._emscripten_bind_btSoftBody_setUserIndex_1,uv=d._emscripten_bind_btSoftBody_setUserPointer_1=g._emscripten_bind_btSoftBody_setUserPointer_1, +vv=d._emscripten_bind_btSoftBody_setWorldTransform_1=g._emscripten_bind_btSoftBody_setWorldTransform_1,wv=d._emscripten_bind_btSoftBody_set_m_anchors_1=g._emscripten_bind_btSoftBody_set_m_anchors_1,xv=d._emscripten_bind_btSoftBody_set_m_cfg_1=g._emscripten_bind_btSoftBody_set_m_cfg_1,yv=d._emscripten_bind_btSoftBody_set_m_materials_1=g._emscripten_bind_btSoftBody_set_m_materials_1,zv=d._emscripten_bind_btSoftBody_set_m_nodes_1=g._emscripten_bind_btSoftBody_set_m_nodes_1,Av=d._emscripten_bind_btSoftBody_transform_1= +g._emscripten_bind_btSoftBody_transform_1,Bv=d._emscripten_bind_btSoftBody_translate_1=g._emscripten_bind_btSoftBody_translate_1,Cv=d._emscripten_bind_btSoftBody_upcast_1=g._emscripten_bind_btSoftBody_upcast_1,Dv=d._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=g._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0,Ev=d._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=g._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1,Fv=d._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1= +g._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1,Gv=d._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=g._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2,Hv=d._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=g._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3,Iv=d._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=g._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1,Jv=d._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2= +g._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2,Kv=d._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=g._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1,Lv=d._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=g._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3,Mv=d._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=g._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3,Nv=d._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=g._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5, +Ov=d._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=g._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3,Pv=d._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=g._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2,Qv=d._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=g._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5,Rv=d._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=g._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3,Sv= +d._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=g._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0,Tv=d._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0,Uv=d._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0,Vv=d._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0,Wv=d._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0= +g._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0,Xv=d._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0,Yv=d._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0,Zv=d._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0,$v=d._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0, +aw=d._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=g._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0,bw=d._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=g._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3,cw=d._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=g._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1,dw=d._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=g._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1,ew=d._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1= +g._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1,fw=d._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=g._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1,gw=d._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=g._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1,hw=d._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=g._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1,iw=d._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1= +g._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1,jw=d._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=g._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1,kw=d._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=g._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1,lw=d._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=g._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1,mw=d._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1= +g._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1,nw=d._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=g._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2,ow=d._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=g._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3,pw=d._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=g._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1,qw=d._emscripten_bind_btSphereShape___destroy___0=g._emscripten_bind_btSphereShape___destroy___0, +rw=d._emscripten_bind_btSphereShape_btSphereShape_1=g._emscripten_bind_btSphereShape_btSphereShape_1,sw=d._emscripten_bind_btSphereShape_calculateLocalInertia_2=g._emscripten_bind_btSphereShape_calculateLocalInertia_2,tw=d._emscripten_bind_btSphereShape_getLocalScaling_0=g._emscripten_bind_btSphereShape_getLocalScaling_0,uw=d._emscripten_bind_btSphereShape_getMargin_0=g._emscripten_bind_btSphereShape_getMargin_0,vw=d._emscripten_bind_btSphereShape_setLocalScaling_1=g._emscripten_bind_btSphereShape_setLocalScaling_1, +ww=d._emscripten_bind_btSphereShape_setMargin_1=g._emscripten_bind_btSphereShape_setMargin_1,xw=d._emscripten_bind_btStaticPlaneShape___destroy___0=g._emscripten_bind_btStaticPlaneShape___destroy___0,yw=d._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=g._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2,zw=d._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=g._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2,Aw=d._emscripten_bind_btStaticPlaneShape_getLocalScaling_0= +g._emscripten_bind_btStaticPlaneShape_getLocalScaling_0,Bw=d._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=g._emscripten_bind_btStaticPlaneShape_setLocalScaling_1,Cw=d._emscripten_bind_btStridingMeshInterface___destroy___0=g._emscripten_bind_btStridingMeshInterface___destroy___0,Dw=d._emscripten_bind_btStridingMeshInterface_setScaling_1=g._emscripten_bind_btStridingMeshInterface_setScaling_1,Ew=d._emscripten_bind_btTransform___destroy___0=g._emscripten_bind_btTransform___destroy___0,Fw=d._emscripten_bind_btTransform_btTransform_0= +g._emscripten_bind_btTransform_btTransform_0,Gw=d._emscripten_bind_btTransform_btTransform_2=g._emscripten_bind_btTransform_btTransform_2,Hw=d._emscripten_bind_btTransform_getBasis_0=g._emscripten_bind_btTransform_getBasis_0,Iw=d._emscripten_bind_btTransform_getOrigin_0=g._emscripten_bind_btTransform_getOrigin_0,Jw=d._emscripten_bind_btTransform_getRotation_0=g._emscripten_bind_btTransform_getRotation_0,Kw=d._emscripten_bind_btTransform_inverse_0=g._emscripten_bind_btTransform_inverse_0,Lw=d._emscripten_bind_btTransform_op_mul_1= +g._emscripten_bind_btTransform_op_mul_1,Mw=d._emscripten_bind_btTransform_setFromOpenGLMatrix_1=g._emscripten_bind_btTransform_setFromOpenGLMatrix_1,Nw=d._emscripten_bind_btTransform_setIdentity_0=g._emscripten_bind_btTransform_setIdentity_0,Ow=d._emscripten_bind_btTransform_setOrigin_1=g._emscripten_bind_btTransform_setOrigin_1,Pw=d._emscripten_bind_btTransform_setRotation_1=g._emscripten_bind_btTransform_setRotation_1,Qw=d._emscripten_bind_btTriangleMeshShape___destroy___0=g._emscripten_bind_btTriangleMeshShape___destroy___0, +Rw=d._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=g._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2,Sw=d._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=g._emscripten_bind_btTriangleMeshShape_getLocalScaling_0,Tw=d._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=g._emscripten_bind_btTriangleMeshShape_setLocalScaling_1,Uw=d._emscripten_bind_btTriangleMesh___destroy___0=g._emscripten_bind_btTriangleMesh___destroy___0,Vw=d._emscripten_bind_btTriangleMesh_addIndex_1= +g._emscripten_bind_btTriangleMesh_addIndex_1,Ww=d._emscripten_bind_btTriangleMesh_addTriangle_3=g._emscripten_bind_btTriangleMesh_addTriangle_3,Xw=d._emscripten_bind_btTriangleMesh_addTriangle_4=g._emscripten_bind_btTriangleMesh_addTriangle_4,Yw=d._emscripten_bind_btTriangleMesh_btTriangleMesh_0=g._emscripten_bind_btTriangleMesh_btTriangleMesh_0,Zw=d._emscripten_bind_btTriangleMesh_btTriangleMesh_1=g._emscripten_bind_btTriangleMesh_btTriangleMesh_1,$w=d._emscripten_bind_btTriangleMesh_btTriangleMesh_2= +g._emscripten_bind_btTriangleMesh_btTriangleMesh_2,ax=d._emscripten_bind_btTriangleMesh_findOrAddVertex_2=g._emscripten_bind_btTriangleMesh_findOrAddVertex_2,bx=d._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=g._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0,cx=d._emscripten_bind_btTriangleMesh_setScaling_1=g._emscripten_bind_btTriangleMesh_setScaling_1,dx=d._emscripten_bind_btTypedConstraint___destroy___0=g._emscripten_bind_btTypedConstraint___destroy___0,ex=d._emscripten_bind_btTypedConstraint_enableFeedback_1= +g._emscripten_bind_btTypedConstraint_enableFeedback_1,fx=d._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=g._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0,gx=d._emscripten_bind_btTypedConstraint_getParam_2=g._emscripten_bind_btTypedConstraint_getParam_2,hx=d._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=g._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1,ix=d._emscripten_bind_btTypedConstraint_setParam_3=g._emscripten_bind_btTypedConstraint_setParam_3, +jx=d._emscripten_bind_btVector3Array___destroy___0=g._emscripten_bind_btVector3Array___destroy___0,kx=d._emscripten_bind_btVector3Array_at_1=g._emscripten_bind_btVector3Array_at_1,lx=d._emscripten_bind_btVector3Array_size_0=g._emscripten_bind_btVector3Array_size_0,mx=d._emscripten_bind_btVector3___destroy___0=g._emscripten_bind_btVector3___destroy___0,nx=d._emscripten_bind_btVector3_btVector3_0=g._emscripten_bind_btVector3_btVector3_0,ox=d._emscripten_bind_btVector3_btVector3_3=g._emscripten_bind_btVector3_btVector3_3, +px=d._emscripten_bind_btVector3_dot_1=g._emscripten_bind_btVector3_dot_1,qx=d._emscripten_bind_btVector3_length_0=g._emscripten_bind_btVector3_length_0,rx=d._emscripten_bind_btVector3_normalize_0=g._emscripten_bind_btVector3_normalize_0,sx=d._emscripten_bind_btVector3_op_add_1=g._emscripten_bind_btVector3_op_add_1,tx=d._emscripten_bind_btVector3_op_mul_1=g._emscripten_bind_btVector3_op_mul_1,ux=d._emscripten_bind_btVector3_op_sub_1=g._emscripten_bind_btVector3_op_sub_1,vx=d._emscripten_bind_btVector3_rotate_2= +g._emscripten_bind_btVector3_rotate_2,wx=d._emscripten_bind_btVector3_setValue_3=g._emscripten_bind_btVector3_setValue_3,xx=d._emscripten_bind_btVector3_setX_1=g._emscripten_bind_btVector3_setX_1,yx=d._emscripten_bind_btVector3_setY_1=g._emscripten_bind_btVector3_setY_1,zx=d._emscripten_bind_btVector3_setZ_1=g._emscripten_bind_btVector3_setZ_1,Ax=d._emscripten_bind_btVector3_x_0=g._emscripten_bind_btVector3_x_0,Bx=d._emscripten_bind_btVector3_y_0=g._emscripten_bind_btVector3_y_0,Cx=d._emscripten_bind_btVector3_z_0= +g._emscripten_bind_btVector3_z_0,Dx=d._emscripten_bind_btVector4___destroy___0=g._emscripten_bind_btVector4___destroy___0,Ex=d._emscripten_bind_btVector4_btVector4_0=g._emscripten_bind_btVector4_btVector4_0,Fx=d._emscripten_bind_btVector4_btVector4_4=g._emscripten_bind_btVector4_btVector4_4,Gx=d._emscripten_bind_btVector4_dot_1=g._emscripten_bind_btVector4_dot_1,Hx=d._emscripten_bind_btVector4_length_0=g._emscripten_bind_btVector4_length_0,Ix=d._emscripten_bind_btVector4_normalize_0=g._emscripten_bind_btVector4_normalize_0, +Jx=d._emscripten_bind_btVector4_op_add_1=g._emscripten_bind_btVector4_op_add_1,Kx=d._emscripten_bind_btVector4_op_mul_1=g._emscripten_bind_btVector4_op_mul_1,Lx=d._emscripten_bind_btVector4_op_sub_1=g._emscripten_bind_btVector4_op_sub_1,Mx=d._emscripten_bind_btVector4_rotate_2=g._emscripten_bind_btVector4_rotate_2,Nx=d._emscripten_bind_btVector4_setValue_4=g._emscripten_bind_btVector4_setValue_4,Ox=d._emscripten_bind_btVector4_setX_1=g._emscripten_bind_btVector4_setX_1,Px=d._emscripten_bind_btVector4_setY_1= +g._emscripten_bind_btVector4_setY_1,Qx=d._emscripten_bind_btVector4_setZ_1=g._emscripten_bind_btVector4_setZ_1,Rx=d._emscripten_bind_btVector4_w_0=g._emscripten_bind_btVector4_w_0,Sx=d._emscripten_bind_btVector4_x_0=g._emscripten_bind_btVector4_x_0,Tx=d._emscripten_bind_btVector4_y_0=g._emscripten_bind_btVector4_y_0,Ux=d._emscripten_bind_btVector4_z_0=g._emscripten_bind_btVector4_z_0,Vx=d._emscripten_bind_btVehicleRaycasterResult___destroy___0=g._emscripten_bind_btVehicleRaycasterResult___destroy___0, +Wx=d._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=g._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0,Xx=d._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=g._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0,Yx=d._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=g._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0,Zx=d._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=g._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1, +$x=d._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=g._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1,ay=d._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=g._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1,by=d._emscripten_bind_btVehicleRaycaster___destroy___0=g._emscripten_bind_btVehicleRaycaster___destroy___0,cy=d._emscripten_bind_btVehicleRaycaster_castRay_3=g._emscripten_bind_btVehicleRaycaster_castRay_3,dy=d._emscripten_bind_btVehicleTuning_btVehicleTuning_0= +g._emscripten_bind_btVehicleTuning_btVehicleTuning_0,ey=d._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=g._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0,fy=d._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=g._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0,gy=d._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=g._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0,hy=d._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=g._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0, +iy=d._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=g._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0,jy=d._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=g._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0,ky=d._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=g._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1,ly=d._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=g._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1,my=d._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1= +g._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1,ny=d._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=g._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1,oy=d._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=g._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1,py=d._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=g._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1,qy=d._emscripten_bind_btWheelInfoConstructionInfo___destroy___0= +g._emscripten_bind_btWheelInfoConstructionInfo___destroy___0,ry=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0,sy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0,ty=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0,uy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0= +g._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0,vy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0,wy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0,xy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0, +yy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0,zy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0,Ay=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0,By=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0= +g._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0,Cy=d._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=g._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0,Dy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1,Ey=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1, +Fy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1,Gy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1,Hy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1,Iy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1= +g._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1,Jy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1,Ky=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1,Ly=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1, +My=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1,Ny=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1,Oy=d._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=g._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1,Py=d._emscripten_bind_btWheelInfo___destroy___0= +g._emscripten_bind_btWheelInfo___destroy___0,Qy=d._emscripten_bind_btWheelInfo_btWheelInfo_1=g._emscripten_bind_btWheelInfo_btWheelInfo_1,Ry=d._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=g._emscripten_bind_btWheelInfo_getSuspensionRestLength_0,Sy=d._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=g._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0,Ty=d._emscripten_bind_btWheelInfo_get_m_brake_0=g._emscripten_bind_btWheelInfo_get_m_brake_0,Uy=d._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0= +g._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0,Vy=d._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=g._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0,Wy=d._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=g._emscripten_bind_btWheelInfo_get_m_deltaRotation_0,Xy=d._emscripten_bind_btWheelInfo_get_m_engineForce_0=g._emscripten_bind_btWheelInfo_get_m_engineForce_0,Yy=d._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=g._emscripten_bind_btWheelInfo_get_m_frictionSlip_0, +Zy=d._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=g._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0,$y=d._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=g._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0,az=d._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=g._emscripten_bind_btWheelInfo_get_m_raycastInfo_0,bz=d._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=g._emscripten_bind_btWheelInfo_get_m_rollInfluence_0,cz=d._emscripten_bind_btWheelInfo_get_m_rotation_0= +g._emscripten_bind_btWheelInfo_get_m_rotation_0,dz=d._emscripten_bind_btWheelInfo_get_m_skidInfo_0=g._emscripten_bind_btWheelInfo_get_m_skidInfo_0,ez=d._emscripten_bind_btWheelInfo_get_m_steering_0=g._emscripten_bind_btWheelInfo_get_m_steering_0,fz=d._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=g._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0,gz=d._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=g._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0, +hz=d._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=g._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0,iz=d._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=g._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0,jz=d._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=g._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0,kz=d._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=g._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0,lz=d._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0= +g._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0,mz=d._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=g._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0,nz=d._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=g._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0,oz=d._emscripten_bind_btWheelInfo_get_m_worldTransform_0=g._emscripten_bind_btWheelInfo_get_m_worldTransform_0,pz=d._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=g._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1, +qz=d._emscripten_bind_btWheelInfo_set_m_brake_1=g._emscripten_bind_btWheelInfo_set_m_brake_1,rz=d._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=g._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1,sz=d._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=g._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1,tz=d._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=g._emscripten_bind_btWheelInfo_set_m_deltaRotation_1,uz=d._emscripten_bind_btWheelInfo_set_m_engineForce_1= +g._emscripten_bind_btWheelInfo_set_m_engineForce_1,vz=d._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=g._emscripten_bind_btWheelInfo_set_m_frictionSlip_1,wz=d._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=g._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1,xz=d._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=g._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1,yz=d._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=g._emscripten_bind_btWheelInfo_set_m_raycastInfo_1, +zz=d._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=g._emscripten_bind_btWheelInfo_set_m_rollInfluence_1,Az=d._emscripten_bind_btWheelInfo_set_m_rotation_1=g._emscripten_bind_btWheelInfo_set_m_rotation_1,Bz=d._emscripten_bind_btWheelInfo_set_m_skidInfo_1=g._emscripten_bind_btWheelInfo_set_m_skidInfo_1,Cz=d._emscripten_bind_btWheelInfo_set_m_steering_1=g._emscripten_bind_btWheelInfo_set_m_steering_1,Dz=d._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=g._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1, +Ez=d._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=g._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1,Fz=d._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=g._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1,Gz=d._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=g._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1,Hz=d._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=g._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1,Iz=d._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1= +g._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1,Jz=d._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=g._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1,Kz=d._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=g._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1,Lz=d._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=g._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1,Mz=d._emscripten_bind_btWheelInfo_set_m_worldTransform_1=g._emscripten_bind_btWheelInfo_set_m_worldTransform_1, +Nz=d._emscripten_bind_btWheelInfo_updateWheel_2=g._emscripten_bind_btWheelInfo_updateWheel_2,Oz=d._emscripten_bind_tAnchorArray___destroy___0=g._emscripten_bind_tAnchorArray___destroy___0,Pz=d._emscripten_bind_tAnchorArray_at_1=g._emscripten_bind_tAnchorArray_at_1,Qz=d._emscripten_bind_tAnchorArray_clear_0=g._emscripten_bind_tAnchorArray_clear_0,Rz=d._emscripten_bind_tAnchorArray_pop_back_0=g._emscripten_bind_tAnchorArray_pop_back_0,Sz=d._emscripten_bind_tAnchorArray_push_back_1=g._emscripten_bind_tAnchorArray_push_back_1, +Tz=d._emscripten_bind_tAnchorArray_size_0=g._emscripten_bind_tAnchorArray_size_0,Uz=d._emscripten_bind_tMaterialArray___destroy___0=g._emscripten_bind_tMaterialArray___destroy___0,Vz=d._emscripten_bind_tMaterialArray_at_1=g._emscripten_bind_tMaterialArray_at_1,Wz=d._emscripten_bind_tMaterialArray_size_0=g._emscripten_bind_tMaterialArray_size_0,Xz=d._emscripten_bind_tNodeArray___destroy___0=g._emscripten_bind_tNodeArray___destroy___0,Yz=d._emscripten_bind_tNodeArray_at_1=g._emscripten_bind_tNodeArray_at_1, +Zz=d._emscripten_bind_tNodeArray_size_0=g._emscripten_bind_tNodeArray_size_0,$z=d._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=g._emscripten_enum_PHY_ScalarType_PHY_DOUBLE,aA=d._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=g._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88,bA=d._emscripten_enum_PHY_ScalarType_PHY_FLOAT=g._emscripten_enum_PHY_ScalarType_PHY_FLOAT,cA=d._emscripten_enum_PHY_ScalarType_PHY_INTEGER=g._emscripten_enum_PHY_ScalarType_PHY_INTEGER,dA=d._emscripten_enum_PHY_ScalarType_PHY_SHORT= +g._emscripten_enum_PHY_ScalarType_PHY_SHORT,eA=d._emscripten_enum_PHY_ScalarType_PHY_UCHAR=g._emscripten_enum_PHY_ScalarType_PHY_UCHAR,fA=d._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=g._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM,gA=d._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=g._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP,hA=d._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=g._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM,iA=d._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP= +g._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP;d._free=g._free;d._i64Add=g._i64Add;d._i64Subtract=g._i64Subtract;d._llvm_bswap_i16=g._llvm_bswap_i16;d._llvm_bswap_i32=g._llvm_bswap_i32;d._malloc=g._malloc;d._memcpy=g._memcpy;d._memmove=g._memmove;d._memset=g._memset;d._sbrk=g._sbrk;d.establishStackSpace=g.establishStackSpace;d.stackAlloc=g.stackAlloc;d.stackRestore=g.stackRestore;d.stackSave=g.stackSave;d.dynCall_di=g.dynCall_di;d.dynCall_did=g.dynCall_did;d.dynCall_diidii=g.dynCall_diidii; +d.dynCall_diii=g.dynCall_diii;d.dynCall_diiidii=g.dynCall_diiidii;d.dynCall_diiii=g.dynCall_diiii;d.dynCall_diiiii=g.dynCall_diiiii;d.dynCall_diiiiiiii=g.dynCall_diiiiiiii;d.dynCall_diiiiiiiii=g.dynCall_diiiiiiiii;d.dynCall_diiiiiiiiii=g.dynCall_diiiiiiiiii;d.dynCall_ii=g.dynCall_ii;d.dynCall_iidid=g.dynCall_iidid;d.dynCall_iii=g.dynCall_iii;d.dynCall_iiid=g.dynCall_iiid;d.dynCall_iiii=g.dynCall_iiii;d.dynCall_iiiii=g.dynCall_iiiii;d.dynCall_iiiiiii=g.dynCall_iiiiiii;d.dynCall_iiiiiiii=g.dynCall_iiiiiiii; +d.dynCall_iiiiiiiiii=g.dynCall_iiiiiiiiii;d.dynCall_iiiiiiiiiii=g.dynCall_iiiiiiiiiii;d.dynCall_v=g.dynCall_v;d.dynCall_vi=g.dynCall_vi;d.dynCall_vid=g.dynCall_vid;d.dynCall_vidd=g.dynCall_vidd;d.dynCall_viddiii=g.dynCall_viddiii;d.dynCall_vidi=g.dynCall_vidi;d.dynCall_vidii=g.dynCall_vidii;d.dynCall_vii=g.dynCall_vii;d.dynCall_viid=g.dynCall_viid;d.dynCall_viidi=g.dynCall_viidi;d.dynCall_viidii=g.dynCall_viidii;d.dynCall_viii=g.dynCall_viii;d.dynCall_viiid=g.dynCall_viiid;d.dynCall_viiidii=g.dynCall_viiidii; +d.dynCall_viiii=g.dynCall_viiii;d.dynCall_viiiid=g.dynCall_viiiid;d.dynCall_viiiidddddidi=g.dynCall_viiiidddddidi;d.dynCall_viiiiddddiid=g.dynCall_viiiiddddiid;d.dynCall_viiiii=g.dynCall_viiiii;d.dynCall_viiiiid=g.dynCall_viiiiid;d.dynCall_viiiiii=g.dynCall_viiiiii;d.dynCall_viiiiiii=g.dynCall_viiiiiii;d.dynCall_viiiiiiiid=g.dynCall_viiiiiiiid;d.dynCall_viiiiiiiii=g.dynCall_viiiiiiiii;d.dynCall_viiiiiiiiii=g.dynCall_viiiiiiiiii;d.asm=g;d.UTF8ToString=function(a,b){return a?za(Ba,a,b):""}; +if(sa){if(String.prototype.startsWith?!sa.startsWith(Qa):0!==sa.indexOf(Qa)){var jA=sa;sa=d.locateFile?d.locateFile(jA,ia):ia+jA}if(ea||ha){var kA=ma(sa);Ba.set(kA,8)}else{Na++;d.monitorRunDependencies&&d.monitorRunDependencies(Na);var ta=function(a){a.byteLength&&(a=new Uint8Array(a));Ba.set(a,8);d.memoryInitializerRequest&&delete d.memoryInitializerRequest.response;Na--;d.monitorRunDependencies&&d.monitorRunDependencies(Na);0==Na&&(null!==Oa&&(clearInterval(Oa),Oa=null),Pa&&(a=Pa,Pa=null,a()))}, +lA=function(){la(function(){throw"could not load memory initializer "+sa;})},mA=pa(sa);if(mA)ta(mA.buffer);else if(d.memoryInitializerRequest){var nA=function(){var a=d.memoryInitializerRequest,b=a.response;if(200!==a.status&&0!==a.status)if(b=pa(d.memoryInitializerRequestURL))b=b.buffer;else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+a.status+", retrying "+sa);lA();return}ta(b)};d.memoryInitializerRequest.response?setTimeout(nA,0):d.memoryInitializerRequest.addEventListener("load", +nA)}else lA()}}var oA;d.then=function(a){if(oA)a(d);else{var b=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){b&&b();a(d)}}return d};Pa=function pA(){oA||qA();oA||(Pa=pA)}; +function qA(){function a(){if(!oA&&(oA=!0,!xa)){La=!0;Ga(Ia);Ga(Ja);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var a=d.postRun.shift();Ka.unshift(a)}Ga(Ka)}}if(!(0=c.size?(assert(0>=1;break;case 4:e>>=2;break;case 8:e>>= +3}for(var f=0;f=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++e)&1023);127>=f?++b:b=2047>=f?b+2:65535>=f?b+3:b+4}b=Array(b+1);f=b.length;e=0;if(0=n){var B=a.charCodeAt(++h);n=65536+((n&1023)<<10)|B&1023}if(127>=n){if(e>=f)break;b[e++]=n}else{if(2047>=n){if(e+1>=f)break;b[e++]=192|n>>6}else{if(65535>=n){if(e+2>=f)break;b[e++]=224| +n>>12}else{if(e+3>=f)break;b[e++]=240|n>>18;b[e++]=128|n>>12&63}b[e++]=128|n>>6&63}b[e++]=128|n&63}}b[e]=0}a=c.ja(b,Aa);c.copy(b,Aa,a)}return a}function sA(a){if("object"===typeof a){var b=c.ja(a,Da);c.copy(a,Da,b);return b}return a}function tA(){throw"cannot construct a btCollisionWorld, no constructor in IDL";}tA.prototype=Object.create(k.prototype);tA.prototype.constructor=tA;tA.prototype.I=tA;tA.J={};d.btCollisionWorld=tA;tA.prototype.getDispatcher=function(){return m(wh(this.H),uA)}; +tA.prototype.rayTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);yh(f,a,b,e)};tA.prototype.getPairCache=function(){return m(xh(this.H),vA)};tA.prototype.getDispatchInfo=function(){return m(vh(this.H),p)};tA.prototype.addCollisionObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?lh(f,a):void 0===e?mh(f,a,b):nh(f,a,b,e)}; +tA.prototype.removeCollisionObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zh(b,a)};tA.prototype.getBroadphase=function(){return m(th(this.H),wA)};tA.prototype.convexSweepTest=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);qh(n,a,b,e,f,h)}; +tA.prototype.contactPairTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);oh(f,a,b,e)};tA.prototype.contactTest=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);ph(e,a,b)};tA.prototype.updateSingleAabb=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bh(b,a)};tA.prototype.setDebugDrawer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ah(b,a)}; +tA.prototype.getDebugDrawer=function(){return m(uh(this.H),xA)};tA.prototype.debugDrawWorld=function(){sh(this.H)};tA.prototype.debugDrawObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);rh(f,a,b,e)};tA.prototype.__destroy__=function(){kh(this.H)};function q(){throw"cannot construct a btCollisionShape, no constructor in IDL";}q.prototype=Object.create(k.prototype);q.prototype.constructor=q;q.prototype.I=q;q.J={}; +d.btCollisionShape=q;q.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ih(b,a)};q.prototype.getLocalScaling=function(){return m(gh(this.H),r)};q.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);fh(e,a,b)};q.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jh(b,a)};q.prototype.getMargin=function(){return hh(this.H)};q.prototype.__destroy__=function(){eh(this.H)}; +function t(){throw"cannot construct a btCollisionObject, no constructor in IDL";}t.prototype=Object.create(k.prototype);t.prototype.constructor=t;t.prototype.I=t;t.J={};d.btCollisionObject=t;t.prototype.setAnisotropicFriction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Tg(e,a,b)};t.prototype.getCollisionShape=function(){return m(Hg(this.H),q)};t.prototype.setContactProcessingThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yg(b,a)}; +t.prototype.setActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sg(b,a)};t.prototype.forceActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Eg(b,a)};t.prototype.activate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);void 0===a?Cg(b):Dg(b,a)};t.prototype.isActive=function(){return!!Og(this.H)};t.prototype.isKinematicObject=function(){return!!Pg(this.H)};t.prototype.isStaticObject=function(){return!!Qg(this.H)}; +t.prototype.isStaticOrKinematicObject=function(){return!!Rg(this.H)};t.prototype.getRestitution=function(){return Jg(this.H)};t.prototype.getFriction=function(){return Ig(this.H)};t.prototype.getRollingFriction=function(){return Kg(this.H)};t.prototype.setRestitution=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);$g(b,a)};t.prototype.setFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zg(b,a)}; +t.prototype.setRollingFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ah(b,a)};t.prototype.getWorldTransform=function(){return m(Ng(this.H),u)};t.prototype.getCollisionFlags=function(){return Gg(this.H)};t.prototype.setCollisionFlags=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Wg(b,a)};t.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);dh(b,a)}; +t.prototype.setCollisionShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Xg(b,a)};t.prototype.setCcdMotionThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ug(b,a)};t.prototype.setCcdSweptSphereRadius=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vg(b,a)};t.prototype.getUserIndex=function(){return Lg(this.H)};t.prototype.setUserIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);bh(b,a)}; +t.prototype.getUserPointer=function(){return m(Mg(this.H),yA)};t.prototype.setUserPointer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ch(b,a)};t.prototype.getBroadphaseHandle=function(){return m(Fg(this.H),zA)};t.prototype.__destroy__=function(){Bg(this.H)};function AA(){throw"cannot construct a btDynamicsWorld, no constructor in IDL";}AA.prototype=Object.create(tA.prototype);AA.prototype.constructor=AA;AA.prototype.I=AA;AA.J={};d.btDynamicsWorld=AA; +AA.prototype.addAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yl(b,a)};AA.prototype.removeAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ol(b,a)};AA.prototype.getSolverInfo=function(){return m(Ml(this.H),v)};AA.prototype.getDispatcher=function(){return m(Kl(this.H),uA)};AA.prototype.rayTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Nl(f,a,b,e)}; +AA.prototype.getPairCache=function(){return m(Ll(this.H),vA)};AA.prototype.getDispatchInfo=function(){return m(Jl(this.H),p)};AA.prototype.addCollisionObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?zl(f,a):void 0===e?Al(f,a,b):Bl(f,a,b,e)};AA.prototype.removeCollisionObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pl(b,a)};AA.prototype.getBroadphase=function(){return m(Hl(this.H),wA)}; +AA.prototype.convexSweepTest=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);El(n,a,b,e,f,h)};AA.prototype.contactPairTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Cl(f,a,b,e)}; +AA.prototype.contactTest=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Dl(e,a,b)};AA.prototype.updateSingleAabb=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Rl(b,a)};AA.prototype.setDebugDrawer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ql(b,a)};AA.prototype.getDebugDrawer=function(){return m(Il(this.H),xA)};AA.prototype.debugDrawWorld=function(){Gl(this.H)}; +AA.prototype.debugDrawObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Fl(f,a,b,e)};AA.prototype.__destroy__=function(){xl(this.H)};function BA(){throw"cannot construct a btTypedConstraint, no constructor in IDL";}BA.prototype=Object.create(k.prototype);BA.prototype.constructor=BA;BA.prototype.I=BA;BA.J={};d.btTypedConstraint=BA; +BA.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ex(b,a)};BA.prototype.getBreakingImpulseThreshold=function(){return fx(this.H)};BA.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hx(b,a)};BA.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return gx(e,a,b)}; +BA.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);ix(f,a,b,e)};BA.prototype.__destroy__=function(){dx(this.H)};function CA(){throw"cannot construct a btConcaveShape, no constructor in IDL";}CA.prototype=Object.create(q.prototype);CA.prototype.constructor=CA;CA.prototype.I=CA;CA.J={};d.btConcaveShape=CA;CA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Uh(b,a)}; +CA.prototype.getLocalScaling=function(){return m(Th(this.H),r)};CA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Sh(e,a,b)};CA.prototype.__destroy__=function(){Rh(this.H)};function DA(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=kg(a,b);l(DA)[this.H]=this}DA.prototype=Object.create(q.prototype);DA.prototype.constructor=DA;DA.prototype.I=DA;DA.J={};d.btCapsuleShape=DA; +DA.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sg(b,a)};DA.prototype.getMargin=function(){return og(this.H)};DA.prototype.getUpAxis=function(){return qg(this.H)};DA.prototype.getRadius=function(){return pg(this.H)};DA.prototype.getHalfHeight=function(){return mg(this.H)};DA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rg(b,a)};DA.prototype.getLocalScaling=function(){return m(ng(this.H),r)}; +DA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);lg(e,a,b)};DA.prototype.__destroy__=function(){jg(this.H)};function xA(){throw"cannot construct a btIDebugDraw, no constructor in IDL";}xA.prototype=Object.create(k.prototype);xA.prototype.constructor=xA;xA.prototype.I=xA;xA.J={};d.btIDebugDraw=xA; +xA.prototype.drawLine=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Zn(f,a,b,e)};xA.prototype.drawContactPoint=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);Yn(n,a,b,e,f,h)}; +xA.prototype.reportErrorWarning=function(a){var b=this.H;c.M();a=a&&"object"===typeof a?a.H:rA(a);ao(b,a)};xA.prototype.draw3dText=function(a,b){var e=this.H;c.M();a&&"object"===typeof a&&(a=a.H);b=b&&"object"===typeof b?b.H:rA(b);Xn(e,a,b)};xA.prototype.setDebugMode=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);bo(b,a)};xA.prototype.getDebugMode=function(){return $n(this.H)};xA.prototype.__destroy__=function(){Wn(this.H)}; +function EA(a){a&&"object"===typeof a&&(a=a.H);this.H=void 0===a?Xj():Yj(a);l(EA)[this.H]=this}EA.prototype=Object.create(k.prototype);EA.prototype.constructor=EA;EA.prototype.I=EA;EA.J={};d.btDefaultCollisionConfiguration=EA;EA.prototype.__destroy__=function(){Wj(this.H)};function FA(){throw"cannot construct a btTriangleMeshShape, no constructor in IDL";}FA.prototype=Object.create(CA.prototype);FA.prototype.constructor=FA;FA.prototype.I=FA;FA.J={};d.btTriangleMeshShape=FA; +FA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tw(b,a)};FA.prototype.getLocalScaling=function(){return m(Sw(this.H),r)};FA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Rw(e,a,b)};FA.prototype.__destroy__=function(){Qw(this.H)};function w(){this.H=Qm();l(w)[this.H]=this}w.prototype=Object.create(t.prototype);w.prototype.constructor=w;w.prototype.I=w;w.J={};d.btGhostObject=w; +w.prototype.getNumOverlappingObjects=function(){return Wm(this.H)};w.prototype.getOverlappingObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Xm(b,a),t)};w.prototype.setAnisotropicFriction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);hn(e,a,b)};w.prototype.getCollisionShape=function(){return m(Um(this.H),q)};w.prototype.setContactProcessingThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nn(b,a)}; +w.prototype.setActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gn(b,a)};w.prototype.forceActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Rm(b,a)};w.prototype.activate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);void 0===a?Om(b):Pm(b,a)};w.prototype.isActive=function(){return!!cn(this.H)};w.prototype.isKinematicObject=function(){return!!dn(this.H)};w.prototype.isStaticObject=function(){return!!en(this.H)}; +w.prototype.isStaticOrKinematicObject=function(){return!!fn(this.H)};w.prototype.getRestitution=function(){return Ym(this.H)};w.prototype.getFriction=function(){return Vm(this.H)};w.prototype.getRollingFriction=function(){return Zm(this.H)};w.prototype.setRestitution=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pn(b,a)};w.prototype.setFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);on(b,a)}; +w.prototype.setRollingFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qn(b,a)};w.prototype.getWorldTransform=function(){return m(bn(this.H),u)};w.prototype.getCollisionFlags=function(){return Tm(this.H)};w.prototype.setCollisionFlags=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ln(b,a)};w.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tn(b,a)}; +w.prototype.setCollisionShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mn(b,a)};w.prototype.setCcdMotionThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jn(b,a)};w.prototype.setCcdSweptSphereRadius=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kn(b,a)};w.prototype.getUserIndex=function(){return $m(this.H)};w.prototype.setUserIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rn(b,a)}; +w.prototype.getUserPointer=function(){return m(an(this.H),yA)};w.prototype.setUserPointer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sn(b,a)};w.prototype.getBroadphaseHandle=function(){return m(Sm(this.H),zA)};w.prototype.__destroy__=function(){Nm(this.H)};function GA(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=fi(a,b);l(GA)[this.H]=this}GA.prototype=Object.create(q.prototype);GA.prototype.constructor=GA;GA.prototype.I=GA;GA.J={};d.btConeShape=GA; +GA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ii(b,a)};GA.prototype.getLocalScaling=function(){return m(hi(this.H),r)};GA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);gi(e,a,b)};GA.prototype.__destroy__=function(){ei(this.H)};function HA(){throw"cannot construct a btActionInterface, no constructor in IDL";}HA.prototype=Object.create(k.prototype);HA.prototype.constructor=HA; +HA.prototype.I=HA;HA.J={};d.btActionInterface=HA;HA.prototype.updateAction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);qf(e,a,b)};HA.prototype.__destroy__=function(){pf(this.H)};function r(a,b,e){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);this.H=void 0===a?nx():void 0===b?_emscripten_bind_btVector3_btVector3_1(a):void 0===e?_emscripten_bind_btVector3_btVector3_2(a,b):ox(a,b,e);l(r)[this.H]=this} +r.prototype=Object.create(k.prototype);r.prototype.constructor=r;r.prototype.I=r;r.J={};d.btVector3=r;r.prototype.length=r.prototype.length=function(){return qx(this.H)};r.prototype.x=r.prototype.x=function(){return Ax(this.H)};r.prototype.y=r.prototype.y=function(){return Bx(this.H)};r.prototype.z=r.prototype.z=function(){return Cx(this.H)};r.prototype.setX=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xx(b,a)}; +r.prototype.setY=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yx(b,a)};r.prototype.setZ=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zx(b,a)};r.prototype.setValue=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);wx(f,a,b,e)};r.prototype.normalize=r.prototype.normalize=function(){rx(this.H)}; +r.prototype.rotate=r.prototype.rotate=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return m(vx(e,a,b),r)};r.prototype.dot=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return px(b,a)};r.prototype.op_mul=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(tx(b,a),r)};r.prototype.op_add=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(sx(b,a),r)}; +r.prototype.op_sub=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(ux(b,a),r)};r.prototype.__destroy__=function(){mx(this.H)};function IA(){throw"cannot construct a btVehicleRaycaster, no constructor in IDL";}IA.prototype=Object.create(k.prototype);IA.prototype.constructor=IA;IA.prototype.I=IA;IA.J={};d.btVehicleRaycaster=IA;IA.prototype.castRay=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);cy(f,a,b,e)}; +IA.prototype.__destroy__=function(){by(this.H)};function JA(){throw"cannot construct a btQuadWord, no constructor in IDL";}JA.prototype=Object.create(k.prototype);JA.prototype.constructor=JA;JA.prototype.I=JA;JA.J={};d.btQuadWord=JA;JA.prototype.x=JA.prototype.x=function(){return vq(this.H)};JA.prototype.y=JA.prototype.y=function(){return wq(this.H)};JA.prototype.z=JA.prototype.z=function(){return xq(this.H)};JA.prototype.w=JA.prototype.Aa=function(){return uq(this.H)}; +JA.prototype.setX=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rq(b,a)};JA.prototype.setY=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sq(b,a)};JA.prototype.setZ=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tq(b,a)};JA.prototype.setW=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qq(b,a)};JA.prototype.__destroy__=function(){pq(this.H)};function KA(a){a&&"object"===typeof a&&(a=a.H);this.H=Oj(a);l(KA)[this.H]=this}KA.prototype=Object.create(q.prototype); +KA.prototype.constructor=KA;KA.prototype.I=KA;KA.J={};d.btCylinderShape=KA;KA.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tj(b,a)};KA.prototype.getMargin=function(){return Rj(this.H)};KA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sj(b,a)};KA.prototype.getLocalScaling=function(){return m(Qj(this.H),r)}; +KA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Pj(e,a,b)};KA.prototype.__destroy__=function(){Nj(this.H)};function x(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=xk(a,b,e,f);l(x)[this.H]=this}x.prototype=Object.create(AA.prototype);x.prototype.constructor=x;x.prototype.I=x;x.J={};d.btDiscreteDynamicsWorld=x; +x.prototype.setGravity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tk(b,a)};x.prototype.getGravity=function(){return m(Hk(this.H),r)};x.prototype.addRigidBody=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?vk(f,a):void 0===e?_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(f,a,b):wk(f,a,b,e)};x.prototype.removeRigidBody=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ok(b,a)}; +x.prototype.addConstraint=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===b?tk(e,a):uk(e,a,b)};x.prototype.removeConstraint=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Nk(b,a)};x.prototype.stepSimulation=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);return void 0===b?Uk(f,a):void 0===e?Vk(f,a,b):Wk(f,a,b,e)}; +x.prototype.setContactAddedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pk(b,a)};x.prototype.setContactProcessedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Rk(b,a)};x.prototype.setContactDestroyedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qk(b,a)};x.prototype.getDispatcher=function(){return m(Gk(this.H),uA)}; +x.prototype.rayTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Kk(f,a,b,e)};x.prototype.getPairCache=function(){return m(Ik(this.H),vA)};x.prototype.getDispatchInfo=function(){return m(Fk(this.H),p)};x.prototype.addCollisionObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?qk(f,a):void 0===e?rk(f,a,b):sk(f,a,b,e)}; +x.prototype.removeCollisionObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mk(b,a)};x.prototype.getBroadphase=function(){return m(Dk(this.H),wA)};x.prototype.convexSweepTest=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);Ak(n,a,b,e,f,h)}; +x.prototype.contactPairTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);yk(f,a,b,e)};x.prototype.contactTest=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);zk(e,a,b)};x.prototype.updateSingleAabb=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Xk(b,a)};x.prototype.setDebugDrawer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sk(b,a)}; +x.prototype.getDebugDrawer=function(){return m(Ek(this.H),xA)};x.prototype.debugDrawWorld=function(){Ck(this.H)};x.prototype.debugDrawObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Bk(f,a,b,e)};x.prototype.addAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pk(b,a)};x.prototype.removeAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lk(b,a)}; +x.prototype.getSolverInfo=function(){return m(Jk(this.H),v)};x.prototype.__destroy__=function(){ok(this.H)};function LA(){throw"cannot construct a btConvexShape, no constructor in IDL";}LA.prototype=Object.create(q.prototype);LA.prototype.constructor=LA;LA.prototype.I=LA;LA.J={};d.btConvexShape=LA;LA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pj(b,a)};LA.prototype.getLocalScaling=function(){return m(nj(this.H),r)}; +LA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);mj(e,a,b)};LA.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qj(b,a)};LA.prototype.getMargin=function(){return oj(this.H)};LA.prototype.__destroy__=function(){lj(this.H)};function uA(){throw"cannot construct a btDispatcher, no constructor in IDL";}uA.prototype=Object.create(k.prototype);uA.prototype.constructor=uA;uA.prototype.I=uA;uA.J={}; +d.btDispatcher=uA;uA.prototype.getNumManifolds=function(){return wl(this.H)};uA.prototype.getManifoldByIndexInternal=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(vl(b,a),MA)};uA.prototype.__destroy__=function(){ul(this.H)}; +function NA(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=void 0===f?hm(a,b,e):void 0===h?_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a,b,e,f):im(a,b,e,f,h);l(NA)[this.H]=this}NA.prototype=Object.create(BA.prototype);NA.prototype.constructor=NA;NA.prototype.I=NA;NA.J={};d.btGeneric6DofConstraint=NA; +NA.prototype.setLinearLowerLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qm(b,a)};NA.prototype.setLinearUpperLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rm(b,a)};NA.prototype.setAngularLowerLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nm(b,a)};NA.prototype.setAngularUpperLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);om(b,a)};NA.prototype.getFrameOffsetA=function(){return m(lm(this.H),u)}; +NA.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jm(b,a)};NA.prototype.getBreakingImpulseThreshold=function(){return km(this.H)};NA.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pm(b,a)};NA.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return mm(e,a,b)}; +NA.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);sm(f,a,b,e)};NA.prototype.__destroy__=function(){gm(this.H)};function OA(){throw"cannot construct a btStridingMeshInterface, no constructor in IDL";}OA.prototype=Object.create(k.prototype);OA.prototype.constructor=OA;OA.prototype.I=OA;OA.J={};d.btStridingMeshInterface=OA; +OA.prototype.setScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dw(b,a)};OA.prototype.__destroy__=function(){Cw(this.H)};function PA(){throw"cannot construct a btMotionState, no constructor in IDL";}PA.prototype=Object.create(k.prototype);PA.prototype.constructor=PA;PA.prototype.I=PA;PA.J={};d.btMotionState=PA;PA.prototype.getWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ep(b,a)}; +PA.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fp(b,a)};PA.prototype.__destroy__=function(){dp(this.H)};function y(){throw"cannot construct a ConvexResultCallback, no constructor in IDL";}y.prototype=Object.create(k.prototype);y.prototype.constructor=y;y.prototype.I=y;y.J={};d.ConvexResultCallback=y;y.prototype.hasHit=function(){return!!Nd(this.H)};y.prototype.get_m_collisionFilterGroup=y.prototype.K=function(){return Ld(this.H)}; +y.prototype.set_m_collisionFilterGroup=y.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pd(b,a)};Object.defineProperty(y.prototype,"m_collisionFilterGroup",{get:y.prototype.K,set:y.prototype.N});y.prototype.get_m_collisionFilterMask=y.prototype.L=function(){return Md(this.H)};y.prototype.set_m_collisionFilterMask=y.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qd(b,a)};Object.defineProperty(y.prototype,"m_collisionFilterMask",{get:y.prototype.L,set:y.prototype.O}); +y.prototype.get_m_closestHitFraction=y.prototype.P=function(){return Kd(this.H)};y.prototype.set_m_closestHitFraction=y.prototype.R=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Od(b,a)};Object.defineProperty(y.prototype,"m_closestHitFraction",{get:y.prototype.P,set:y.prototype.R});y.prototype.__destroy__=function(){Jd(this.H)};function QA(){throw"cannot construct a ContactResultCallback, no constructor in IDL";}QA.prototype=Object.create(k.prototype);QA.prototype.constructor=QA; +QA.prototype.I=QA;QA.J={};d.ContactResultCallback=QA;QA.prototype.addSingleResult=function(a,b,e,f,h,n,B){var S=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);return Id(S,a,b,e,f,h,n,B)};QA.prototype.__destroy__=function(){Hd(this.H)};function RA(){throw"cannot construct a btSoftBodySolver, no constructor in IDL";} +RA.prototype=Object.create(k.prototype);RA.prototype.constructor=RA;RA.prototype.I=RA;RA.J={};d.btSoftBodySolver=RA;RA.prototype.__destroy__=function(){cu(this.H)};function z(){throw"cannot construct a RayResultCallback, no constructor in IDL";}z.prototype=Object.create(k.prototype);z.prototype.constructor=z;z.prototype.I=z;z.J={};d.RayResultCallback=z;z.prototype.hasHit=function(){return!!Se(this.H)};z.prototype.get_m_collisionFilterGroup=z.prototype.K=function(){return Pe(this.H)}; +z.prototype.set_m_collisionFilterGroup=z.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ue(b,a)};Object.defineProperty(z.prototype,"m_collisionFilterGroup",{get:z.prototype.K,set:z.prototype.N});z.prototype.get_m_collisionFilterMask=z.prototype.L=function(){return Qe(this.H)};z.prototype.set_m_collisionFilterMask=z.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ve(b,a)};Object.defineProperty(z.prototype,"m_collisionFilterMask",{get:z.prototype.L,set:z.prototype.O}); +z.prototype.get_m_closestHitFraction=z.prototype.P=function(){return Oe(this.H)};z.prototype.set_m_closestHitFraction=z.prototype.R=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Te(b,a)};Object.defineProperty(z.prototype,"m_closestHitFraction",{get:z.prototype.P,set:z.prototype.R});z.prototype.get_m_collisionObject=z.prototype.S=function(){return m(Re(this.H),t)};z.prototype.set_m_collisionObject=z.prototype.aa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);We(b,a)}; +Object.defineProperty(z.prototype,"m_collisionObject",{get:z.prototype.S,set:z.prototype.aa});z.prototype.__destroy__=function(){Ne(this.H)};function SA(){throw"cannot construct a btMatrix3x3, no constructor in IDL";}SA.prototype=Object.create(k.prototype);SA.prototype.constructor=SA;SA.prototype.I=SA;SA.J={};d.btMatrix3x3=SA;SA.prototype.setEulerZYX=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);cp(f,a,b,e)}; +SA.prototype.getRotation=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ap(b,a)};SA.prototype.getRow=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(bp(b,a),r)};SA.prototype.__destroy__=function(){$o(this.H)};function TA(){throw"cannot construct a btScalarArray, no constructor in IDL";}TA.prototype=Object.create(k.prototype);TA.prototype.constructor=TA;TA.prototype.I=TA;TA.J={};d.btScalarArray=TA;TA.prototype.size=TA.prototype.size=function(){return vt(this.H)}; +TA.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return ut(b,a)};TA.prototype.__destroy__=function(){tt(this.H)};function A(){throw"cannot construct a Material, no constructor in IDL";}A.prototype=Object.create(k.prototype);A.prototype.constructor=A;A.prototype.I=A;A.J={};d.Material=A;A.prototype.get_m_kLST=A.prototype.cc=function(){return se(this.H)};A.prototype.set_m_kLST=A.prototype.Me=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);we(b,a)}; +Object.defineProperty(A.prototype,"m_kLST",{get:A.prototype.cc,set:A.prototype.Me});A.prototype.get_m_kAST=A.prototype.bc=function(){return re(this.H)};A.prototype.set_m_kAST=A.prototype.Le=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ve(b,a)};Object.defineProperty(A.prototype,"m_kAST",{get:A.prototype.bc,set:A.prototype.Le});A.prototype.get_m_kVST=A.prototype.dc=function(){return te(this.H)}; +A.prototype.set_m_kVST=A.prototype.Ne=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xe(b,a)};Object.defineProperty(A.prototype,"m_kVST",{get:A.prototype.dc,set:A.prototype.Ne});A.prototype.get_m_flags=A.prototype.Kb=function(){return qe(this.H)};A.prototype.set_m_flags=A.prototype.te=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ue(b,a)};Object.defineProperty(A.prototype,"m_flags",{get:A.prototype.Kb,set:A.prototype.te});A.prototype.__destroy__=function(){pe(this.H)}; +function p(){throw"cannot construct a btDispatcherInfo, no constructor in IDL";}p.prototype=Object.create(k.prototype);p.prototype.constructor=p;p.prototype.I=p;p.J={};d.btDispatcherInfo=p;p.prototype.get_m_timeStep=p.prototype.Rc=function(){return fl(this.H)};p.prototype.set_m_timeStep=p.prototype.Bf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ql(b,a)};Object.defineProperty(p.prototype,"m_timeStep",{get:p.prototype.Rc,set:p.prototype.Bf});p.prototype.get_m_stepCount=p.prototype.Ic=function(){return dl(this.H)}; +p.prototype.set_m_stepCount=p.prototype.sf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ol(b,a)};Object.defineProperty(p.prototype,"m_stepCount",{get:p.prototype.Ic,set:p.prototype.sf});p.prototype.get_m_dispatchFunc=p.prototype.Cb=function(){return al(this.H)};p.prototype.set_m_dispatchFunc=p.prototype.le=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ll(b,a)};Object.defineProperty(p.prototype,"m_dispatchFunc",{get:p.prototype.Cb,set:p.prototype.le}); +p.prototype.get_m_timeOfImpact=p.prototype.Qc=function(){return el(this.H)};p.prototype.set_m_timeOfImpact=p.prototype.Af=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pl(b,a)};Object.defineProperty(p.prototype,"m_timeOfImpact",{get:p.prototype.Qc,set:p.prototype.Af});p.prototype.get_m_useContinuous=p.prototype.Tc=function(){return!!gl(this.H)};p.prototype.set_m_useContinuous=p.prototype.Df=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rl(b,a)}; +Object.defineProperty(p.prototype,"m_useContinuous",{get:p.prototype.Tc,set:p.prototype.Df});p.prototype.get_m_enableSatConvex=p.prototype.Gb=function(){return!!cl(this.H)};p.prototype.set_m_enableSatConvex=p.prototype.pe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nl(b,a)};Object.defineProperty(p.prototype,"m_enableSatConvex",{get:p.prototype.Gb,set:p.prototype.pe});p.prototype.get_m_enableSPU=p.prototype.Fb=function(){return!!bl(this.H)}; +p.prototype.set_m_enableSPU=p.prototype.oe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ml(b,a)};Object.defineProperty(p.prototype,"m_enableSPU",{get:p.prototype.Fb,set:p.prototype.oe});p.prototype.get_m_useEpa=p.prototype.Vc=function(){return!!il(this.H)};p.prototype.set_m_useEpa=p.prototype.Ff=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tl(b,a)};Object.defineProperty(p.prototype,"m_useEpa",{get:p.prototype.Vc,set:p.prototype.Ff}); +p.prototype.get_m_allowedCcdPenetration=p.prototype.fb=function(){return Zk(this.H)};p.prototype.set_m_allowedCcdPenetration=p.prototype.Pd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jl(b,a)};Object.defineProperty(p.prototype,"m_allowedCcdPenetration",{get:p.prototype.fb,set:p.prototype.Pd});p.prototype.get_m_useConvexConservativeDistanceUtil=p.prototype.Uc=function(){return!!hl(this.H)}; +p.prototype.set_m_useConvexConservativeDistanceUtil=p.prototype.Ef=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sl(b,a)};Object.defineProperty(p.prototype,"m_useConvexConservativeDistanceUtil",{get:p.prototype.Uc,set:p.prototype.Ef});p.prototype.get_m_convexConservativeDistanceThreshold=p.prototype.xb=function(){return $k(this.H)};p.prototype.set_m_convexConservativeDistanceThreshold=p.prototype.ge=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kl(b,a)}; +Object.defineProperty(p.prototype,"m_convexConservativeDistanceThreshold",{get:p.prototype.xb,set:p.prototype.ge});p.prototype.__destroy__=function(){Yk(this.H)};function C(){throw"cannot construct a btWheelInfoConstructionInfo, no constructor in IDL";}C.prototype=Object.create(k.prototype);C.prototype.constructor=C;C.prototype.I=C;C.J={};d.btWheelInfoConstructionInfo=C;C.prototype.get_m_chassisConnectionCS=C.prototype.rb=function(){return m(sy(this.H),r)}; +C.prototype.set_m_chassisConnectionCS=C.prototype.ae=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ey(b,a)};Object.defineProperty(C.prototype,"m_chassisConnectionCS",{get:C.prototype.rb,set:C.prototype.ae});C.prototype.get_m_wheelDirectionCS=C.prototype.pa=function(){return m(zy(this.H),r)};C.prototype.set_m_wheelDirectionCS=C.prototype.wa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ly(b,a)};Object.defineProperty(C.prototype,"m_wheelDirectionCS",{get:C.prototype.pa,set:C.prototype.wa}); +C.prototype.get_m_wheelAxleCS=C.prototype.oa=function(){return m(yy(this.H),r)};C.prototype.set_m_wheelAxleCS=C.prototype.va=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ky(b,a)};Object.defineProperty(C.prototype,"m_wheelAxleCS",{get:C.prototype.oa,set:C.prototype.va});C.prototype.get_m_suspensionRestLength=C.prototype.Nc=function(){return wy(this.H)};C.prototype.set_m_suspensionRestLength=C.prototype.xf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Iy(b,a)}; +Object.defineProperty(C.prototype,"m_suspensionRestLength",{get:C.prototype.Nc,set:C.prototype.xf});C.prototype.get_m_maxSuspensionTravelCm=C.prototype.X=function(){return vy(this.H)};C.prototype.set_m_maxSuspensionTravelCm=C.prototype.ga=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Hy(b,a)};Object.defineProperty(C.prototype,"m_maxSuspensionTravelCm",{get:C.prototype.X,set:C.prototype.ga});C.prototype.get_m_wheelRadius=C.prototype.ad=function(){return Ay(this.H)}; +C.prototype.set_m_wheelRadius=C.prototype.Lf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);My(b,a)};Object.defineProperty(C.prototype,"m_wheelRadius",{get:C.prototype.ad,set:C.prototype.Lf});C.prototype.get_m_suspensionStiffness=C.prototype.Y=function(){return xy(this.H)};C.prototype.set_m_suspensionStiffness=C.prototype.ha=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jy(b,a)};Object.defineProperty(C.prototype,"m_suspensionStiffness",{get:C.prototype.Y,set:C.prototype.ha}); +C.prototype.get_m_wheelsDampingCompression=C.prototype.qa=function(){return By(this.H)};C.prototype.set_m_wheelsDampingCompression=C.prototype.xa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ny(b,a)};Object.defineProperty(C.prototype,"m_wheelsDampingCompression",{get:C.prototype.qa,set:C.prototype.xa});C.prototype.get_m_wheelsDampingRelaxation=C.prototype.ra=function(){return Cy(this.H)}; +C.prototype.set_m_wheelsDampingRelaxation=C.prototype.ya=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Oy(b,a)};Object.defineProperty(C.prototype,"m_wheelsDampingRelaxation",{get:C.prototype.ra,set:C.prototype.ya});C.prototype.get_m_frictionSlip=C.prototype.T=function(){return ty(this.H)};C.prototype.set_m_frictionSlip=C.prototype.ba=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fy(b,a)};Object.defineProperty(C.prototype,"m_frictionSlip",{get:C.prototype.T,set:C.prototype.ba}); +C.prototype.get_m_maxSuspensionForce=C.prototype.W=function(){return uy(this.H)};C.prototype.set_m_maxSuspensionForce=C.prototype.fa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Gy(b,a)};Object.defineProperty(C.prototype,"m_maxSuspensionForce",{get:C.prototype.W,set:C.prototype.fa});C.prototype.get_m_bIsFrontWheel=C.prototype.la=function(){return!!ry(this.H)};C.prototype.set_m_bIsFrontWheel=C.prototype.sa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dy(b,a)}; +Object.defineProperty(C.prototype,"m_bIsFrontWheel",{get:C.prototype.la,set:C.prototype.sa});C.prototype.__destroy__=function(){qy(this.H)};function UA(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=void 0===b?sj(a):tj(a,b);l(UA)[this.H]=this}UA.prototype=Object.create(LA.prototype);UA.prototype.constructor=UA;UA.prototype.I=UA;UA.J={};d.btConvexTriangleMeshShape=UA;UA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xj(b,a)}; +UA.prototype.getLocalScaling=function(){return m(vj(this.H),r)};UA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);uj(e,a,b)};UA.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yj(b,a)};UA.prototype.getMargin=function(){return wj(this.H)};UA.prototype.__destroy__=function(){rj(this.H)};function wA(){throw"cannot construct a btBroadphaseInterface, no constructor in IDL";}wA.prototype=Object.create(k.prototype); +wA.prototype.constructor=wA;wA.prototype.I=wA;wA.J={};d.btBroadphaseInterface=wA;wA.prototype.getOverlappingPairCache=function(){return m(Ef(this.H),vA)};wA.prototype.__destroy__=function(){Df(this.H)};function D(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=void 0===f?Hr(a,b,e):Ir(a,b,e,f);l(D)[this.H]=this}D.prototype=Object.create(k.prototype);D.prototype.constructor=D;D.prototype.I=D;D.J={}; +d.btRigidBodyConstructionInfo=D;D.prototype.get_m_linearDamping=D.prototype.ec=function(){return Rr(this.H)};D.prototype.set_m_linearDamping=D.prototype.Oe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);cs(b,a)};Object.defineProperty(D.prototype,"m_linearDamping",{get:D.prototype.ec,set:D.prototype.Oe});D.prototype.get_m_angularDamping=D.prototype.hb=function(){return Or(this.H)}; +D.prototype.set_m_angularDamping=D.prototype.Rd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);$r(b,a)};Object.defineProperty(D.prototype,"m_angularDamping",{get:D.prototype.hb,set:D.prototype.Rd});D.prototype.get_m_friction=D.prototype.Lb=function(){return Qr(this.H)};D.prototype.set_m_friction=D.prototype.ue=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);bs(b,a)};Object.defineProperty(D.prototype,"m_friction",{get:D.prototype.Lb,set:D.prototype.ue}); +D.prototype.get_m_rollingFriction=D.prototype.Ac=function(){return Ur(this.H)};D.prototype.set_m_rollingFriction=D.prototype.jf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gs(b,a)};Object.defineProperty(D.prototype,"m_rollingFriction",{get:D.prototype.Ac,set:D.prototype.jf});D.prototype.get_m_restitution=D.prototype.yc=function(){return Tr(this.H)};D.prototype.set_m_restitution=D.prototype.gf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);es(b,a)}; +Object.defineProperty(D.prototype,"m_restitution",{get:D.prototype.yc,set:D.prototype.gf});D.prototype.get_m_linearSleepingThreshold=D.prototype.fc=function(){return Sr(this.H)};D.prototype.set_m_linearSleepingThreshold=D.prototype.Pe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ds(b,a)};Object.defineProperty(D.prototype,"m_linearSleepingThreshold",{get:D.prototype.fc,set:D.prototype.Pe});D.prototype.get_m_angularSleepingThreshold=D.prototype.ib=function(){return Pr(this.H)}; +D.prototype.set_m_angularSleepingThreshold=D.prototype.Sd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);as(b,a)};Object.defineProperty(D.prototype,"m_angularSleepingThreshold",{get:D.prototype.ib,set:D.prototype.Sd});D.prototype.get_m_additionalDamping=D.prototype.bb=function(){return!!Mr(this.H)};D.prototype.set_m_additionalDamping=D.prototype.Md=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yr(b,a)}; +Object.defineProperty(D.prototype,"m_additionalDamping",{get:D.prototype.bb,set:D.prototype.Md});D.prototype.get_m_additionalDampingFactor=D.prototype.cb=function(){return Lr(this.H)};D.prototype.set_m_additionalDampingFactor=D.prototype.Nd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Xr(b,a)};Object.defineProperty(D.prototype,"m_additionalDampingFactor",{get:D.prototype.cb,set:D.prototype.Nd});D.prototype.get_m_additionalLinearDampingThresholdSqr=D.prototype.eb=function(){return Nr(this.H)}; +D.prototype.set_m_additionalLinearDampingThresholdSqr=D.prototype.Od=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zr(b,a)};Object.defineProperty(D.prototype,"m_additionalLinearDampingThresholdSqr",{get:D.prototype.eb,set:D.prototype.Od});D.prototype.get_m_additionalAngularDampingThresholdSqr=D.prototype.ab=function(){return Kr(this.H)};D.prototype.set_m_additionalAngularDampingThresholdSqr=D.prototype.Ld=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Wr(b,a)}; +Object.defineProperty(D.prototype,"m_additionalAngularDampingThresholdSqr",{get:D.prototype.ab,set:D.prototype.Ld});D.prototype.get_m_additionalAngularDampingFactor=D.prototype.$a=function(){return Jr(this.H)};D.prototype.set_m_additionalAngularDampingFactor=D.prototype.Kd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vr(b,a)};Object.defineProperty(D.prototype,"m_additionalAngularDampingFactor",{get:D.prototype.$a,set:D.prototype.Kd});D.prototype.__destroy__=function(){Gr(this.H)}; +function VA(){throw"cannot construct a btCollisionConfiguration, no constructor in IDL";}VA.prototype=Object.create(k.prototype);VA.prototype.constructor=VA;VA.prototype.I=VA;VA.J={};d.btCollisionConfiguration=VA;VA.prototype.__destroy__=function(){tg(this.H)};function MA(){this.H=Xp();l(MA)[this.H]=this}MA.prototype=Object.create(k.prototype);MA.prototype.constructor=MA;MA.prototype.I=MA;MA.J={};d.btPersistentManifold=MA;MA.prototype.getBody0=function(){return m(Yp(this.H),t)}; +MA.prototype.getBody1=function(){return m(Zp(this.H),t)};MA.prototype.getNumContacts=function(){return aq(this.H)};MA.prototype.getContactPoint=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m($p(b,a),E)};MA.prototype.__destroy__=function(){Wp(this.H)};function WA(a){a&&"object"===typeof a&&(a=a.H);this.H=void 0===a?Eh():Fh(a);l(WA)[this.H]=this}WA.prototype=Object.create(q.prototype);WA.prototype.constructor=WA;WA.prototype.I=WA;WA.J={};d.btCompoundShape=WA; +WA.prototype.addChildShape=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Dh(e,a,b)};WA.prototype.removeChildShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mh(b,a)};WA.prototype.removeChildShapeByIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lh(b,a)};WA.prototype.getNumChildShapes=function(){return Kh(this.H)};WA.prototype.getChildShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Hh(b,a),q)}; +WA.prototype.updateChildTransform=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===e?Ph(f,a,b):Qh(f,a,b,e)};WA.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Oh(b,a)};WA.prototype.getMargin=function(){return Jh(this.H)};WA.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Nh(b,a)};WA.prototype.getLocalScaling=function(){return m(Ih(this.H),r)}; +WA.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Gh(e,a,b)};WA.prototype.__destroy__=function(){Ch(this.H)};function F(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=Wb(a,b);l(F)[this.H]=this}F.prototype=Object.create(y.prototype);F.prototype.constructor=F;F.prototype.I=F;F.J={};d.ClosestConvexResultCallback=F;F.prototype.hasHit=function(){return!!ec(this.H)}; +F.prototype.get_m_convexFromWorld=F.prototype.yb=function(){return m(ac(this.H),r)};F.prototype.set_m_convexFromWorld=F.prototype.he=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jc(b,a)};Object.defineProperty(F.prototype,"m_convexFromWorld",{get:F.prototype.yb,set:F.prototype.he});F.prototype.get_m_convexToWorld=F.prototype.zb=function(){return m(bc(this.H),r)};F.prototype.set_m_convexToWorld=F.prototype.ie=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kc(b,a)}; +Object.defineProperty(F.prototype,"m_convexToWorld",{get:F.prototype.zb,set:F.prototype.ie});F.prototype.get_m_hitNormalWorld=F.prototype.U=function(){return m(cc(this.H),r)};F.prototype.set_m_hitNormalWorld=F.prototype.da=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);lc(b,a)};Object.defineProperty(F.prototype,"m_hitNormalWorld",{get:F.prototype.U,set:F.prototype.da});F.prototype.get_m_hitPointWorld=F.prototype.V=function(){return m(dc(this.H),r)}; +F.prototype.set_m_hitPointWorld=F.prototype.ea=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mc(b,a)};Object.defineProperty(F.prototype,"m_hitPointWorld",{get:F.prototype.V,set:F.prototype.ea});F.prototype.get_m_collisionFilterGroup=F.prototype.K=function(){return Zb(this.H)};F.prototype.set_m_collisionFilterGroup=F.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hc(b,a)};Object.defineProperty(F.prototype,"m_collisionFilterGroup",{get:F.prototype.K,set:F.prototype.N}); +F.prototype.get_m_collisionFilterMask=F.prototype.L=function(){return $b(this.H)};F.prototype.set_m_collisionFilterMask=F.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ic(b,a)};Object.defineProperty(F.prototype,"m_collisionFilterMask",{get:F.prototype.L,set:F.prototype.O});F.prototype.get_m_closestHitFraction=F.prototype.P=function(){return Yb(this.H)};F.prototype.set_m_closestHitFraction=F.prototype.R=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fc(b,a)}; +Object.defineProperty(F.prototype,"m_closestHitFraction",{get:F.prototype.P,set:F.prototype.R});F.prototype.__destroy__=function(){Xb(this.H)};function G(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=jb(a,b);l(G)[this.H]=this}G.prototype=Object.create(z.prototype);G.prototype.constructor=G;G.prototype.I=G;G.J={};d.AllHitsRayResultCallback=G;G.prototype.hasHit=function(){return!!vb(this.H)}; +G.prototype.get_m_collisionObjects=G.prototype.ub=function(){return m(pb(this.H),XA)};G.prototype.set_m_collisionObjects=G.prototype.de=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ab(b,a)};Object.defineProperty(G.prototype,"m_collisionObjects",{get:G.prototype.ub,set:G.prototype.de});G.prototype.get_m_rayFromWorld=G.prototype.ma=function(){return m(tb(this.H),r)};G.prototype.set_m_rayFromWorld=G.prototype.ta=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Eb(b,a)}; +Object.defineProperty(G.prototype,"m_rayFromWorld",{get:G.prototype.ma,set:G.prototype.ta});G.prototype.get_m_rayToWorld=G.prototype.na=function(){return m(ub(this.H),r)};G.prototype.set_m_rayToWorld=G.prototype.ua=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fb(b,a)};Object.defineProperty(G.prototype,"m_rayToWorld",{get:G.prototype.na,set:G.prototype.ua});G.prototype.get_m_hitNormalWorld=G.prototype.U=function(){return m(rb(this.H),YA)}; +G.prototype.set_m_hitNormalWorld=G.prototype.da=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cb(b,a)};Object.defineProperty(G.prototype,"m_hitNormalWorld",{get:G.prototype.U,set:G.prototype.da});G.prototype.get_m_hitPointWorld=G.prototype.V=function(){return m(sb(this.H),YA)};G.prototype.set_m_hitPointWorld=G.prototype.ea=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Db(b,a)};Object.defineProperty(G.prototype,"m_hitPointWorld",{get:G.prototype.V,set:G.prototype.ea}); +G.prototype.get_m_hitFractions=G.prototype.Sb=function(){return m(qb(this.H),TA)};G.prototype.set_m_hitFractions=G.prototype.Be=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bb(b,a)};Object.defineProperty(G.prototype,"m_hitFractions",{get:G.prototype.Sb,set:G.prototype.Be});G.prototype.get_m_collisionFilterGroup=G.prototype.K=function(){return mb(this.H)};G.prototype.set_m_collisionFilterGroup=G.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xb(b,a)}; +Object.defineProperty(G.prototype,"m_collisionFilterGroup",{get:G.prototype.K,set:G.prototype.N});G.prototype.get_m_collisionFilterMask=G.prototype.L=function(){return nb(this.H)};G.prototype.set_m_collisionFilterMask=G.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yb(b,a)};Object.defineProperty(G.prototype,"m_collisionFilterMask",{get:G.prototype.L,set:G.prototype.O});G.prototype.get_m_closestHitFraction=G.prototype.P=function(){return lb(this.H)}; +G.prototype.set_m_closestHitFraction=G.prototype.R=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wb(b,a)};Object.defineProperty(G.prototype,"m_closestHitFraction",{get:G.prototype.P,set:G.prototype.R});G.prototype.get_m_collisionObject=G.prototype.S=function(){return m(ob(this.H),t)};G.prototype.set_m_collisionObject=G.prototype.aa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zb(b,a)};Object.defineProperty(G.prototype,"m_collisionObject",{get:G.prototype.S,set:G.prototype.aa}); +G.prototype.__destroy__=function(){kb(this.H)};function ZA(){throw"cannot construct a tMaterialArray, no constructor in IDL";}ZA.prototype=Object.create(k.prototype);ZA.prototype.constructor=ZA;ZA.prototype.I=ZA;ZA.J={};d.tMaterialArray=ZA;ZA.prototype.size=ZA.prototype.size=function(){return Wz(this.H)};ZA.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Vz(b,a),A)};ZA.prototype.__destroy__=function(){Uz(this.H)}; +function $A(a){a&&"object"===typeof a&&(a=a.H);this.H=mk(a);l($A)[this.H]=this}$A.prototype=Object.create(IA.prototype);$A.prototype.constructor=$A;$A.prototype.I=$A;$A.J={};d.btDefaultVehicleRaycaster=$A;$A.prototype.castRay=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);nk(f,a,b,e)};$A.prototype.__destroy__=function(){lk(this.H)};function H(){this.H=Di();l(H)[this.H]=this}H.prototype=Object.create(k.prototype); +H.prototype.constructor=H;H.prototype.I=H;H.J={};d.btConstraintSetting=H;H.prototype.get_m_tau=H.prototype.Pc=function(){return Gi(this.H)};H.prototype.set_m_tau=H.prototype.zf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ji(b,a)};Object.defineProperty(H.prototype,"m_tau",{get:H.prototype.Pc,set:H.prototype.zf});H.prototype.get_m_damping=H.prototype.Ab=function(){return Ei(this.H)};H.prototype.set_m_damping=H.prototype.je=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Hi(b,a)}; +Object.defineProperty(H.prototype,"m_damping",{get:H.prototype.Ab,set:H.prototype.je});H.prototype.get_m_impulseClamp=H.prototype.Yb=function(){return Fi(this.H)};H.prototype.set_m_impulseClamp=H.prototype.He=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ii(b,a)};Object.defineProperty(H.prototype,"m_impulseClamp",{get:H.prototype.Yb,set:H.prototype.He});H.prototype.__destroy__=function(){Ci(this.H)};function aB(){throw"cannot construct a LocalShapeInfo, no constructor in IDL";} +aB.prototype=Object.create(k.prototype);aB.prototype.constructor=aB;aB.prototype.I=aB;aB.J={};d.LocalShapeInfo=aB;aB.prototype.get_m_shapePart=aB.prototype.Dc=function(){return le(this.H)};aB.prototype.set_m_shapePart=aB.prototype.mf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ne(b,a)};Object.defineProperty(aB.prototype,"m_shapePart",{get:aB.prototype.Dc,set:aB.prototype.mf});aB.prototype.get_m_triangleIndex=aB.prototype.Sc=function(){return me(this.H)}; +aB.prototype.set_m_triangleIndex=aB.prototype.Cf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);oe(b,a)};Object.defineProperty(aB.prototype,"m_triangleIndex",{get:aB.prototype.Sc,set:aB.prototype.Cf});aB.prototype.__destroy__=function(){ke(this.H)};function I(a){a&&"object"===typeof a&&(a=a.H);this.H=us(a);l(I)[this.H]=this}I.prototype=Object.create(t.prototype);I.prototype.constructor=I;I.prototype.I=I;I.J={};d.btRigidBody=I; +I.prototype.getCenterOfMassTransform=function(){return m(Ds(this.H),u)};I.prototype.setCenterOfMassTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);at(b,a)};I.prototype.setSleepingThresholds=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);nt(e,a,b)};I.prototype.getLinearDamping=function(){return Is(this.H)};I.prototype.getAngularDamping=function(){return ys(this.H)}; +I.prototype.setDamping=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);et(e,a,b)};I.prototype.setMassProps=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);jt(e,a,b)};I.prototype.getLinearFactor=function(){return m(Js(this.H),r)};I.prototype.setLinearFactor=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ht(b,a)};I.prototype.applyTorque=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ts(b,a)}; +I.prototype.applyLocalTorque=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rs(b,a)};I.prototype.applyForce=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);ns(e,a,b)};I.prototype.applyCentralForce=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ks(b,a)};I.prototype.applyCentralLocalForce=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ms(b,a)}; +I.prototype.applyTorqueImpulse=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ss(b,a)};I.prototype.applyImpulse=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);qs(e,a,b)};I.prototype.applyCentralImpulse=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ls(b,a)};I.prototype.updateInertiaTensor=function(){st(this.H)};I.prototype.getLinearVelocity=function(){return m(Ks(this.H),r)}; +I.prototype.getAngularVelocity=function(){return m(As(this.H),r)};I.prototype.setLinearVelocity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);it(b,a)};I.prototype.setAngularVelocity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Xs(b,a)};I.prototype.getMotionState=function(){return m(Ls(this.H),PA)};I.prototype.setMotionState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kt(b,a)};I.prototype.getAngularFactor=function(){return m(zs(this.H),r)}; +I.prototype.setAngularFactor=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ws(b,a)};I.prototype.upcast=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(rt(b,a),I)};I.prototype.getAabb=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);xs(e,a,b)};I.prototype.applyGravity=function(){ps(this.H)};I.prototype.getGravity=function(){return m(Hs(this.H),r)}; +I.prototype.setGravity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gt(b,a)};I.prototype.getBroadphaseProxy=function(){return m(Cs(this.H),zA)};I.prototype.setAnisotropicFriction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Ys(e,a,b)};I.prototype.getCollisionShape=function(){return m(Fs(this.H),q)};I.prototype.setContactProcessingThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);dt(b,a)}; +I.prototype.setActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vs(b,a)};I.prototype.forceActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vs(b,a)};I.prototype.activate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);void 0===a?is(b):js(b,a)};I.prototype.isActive=function(){return!!Rs(this.H)};I.prototype.isKinematicObject=function(){return!!Ss(this.H)};I.prototype.isStaticObject=function(){return!!Ts(this.H)}; +I.prototype.isStaticOrKinematicObject=function(){return!!Us(this.H)};I.prototype.getRestitution=function(){return Ms(this.H)};I.prototype.getFriction=function(){return Gs(this.H)};I.prototype.getRollingFriction=function(){return Ns(this.H)};I.prototype.setRestitution=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);lt(b,a)};I.prototype.setFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ft(b,a)}; +I.prototype.setRollingFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mt(b,a)};I.prototype.getWorldTransform=function(){return m(Qs(this.H),u)};I.prototype.getCollisionFlags=function(){return Es(this.H)};I.prototype.setCollisionFlags=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);bt(b,a)};I.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qt(b,a)}; +I.prototype.setCollisionShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ct(b,a)};I.prototype.setCcdMotionThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zs(b,a)};I.prototype.setCcdSweptSphereRadius=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);$s(b,a)};I.prototype.getUserIndex=function(){return Os(this.H)};I.prototype.setUserIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ot(b,a)}; +I.prototype.getUserPointer=function(){return m(Ps(this.H),yA)};I.prototype.setUserPointer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pt(b,a)};I.prototype.getBroadphaseHandle=function(){return m(Bs(this.H),zA)};I.prototype.__destroy__=function(){hs(this.H)};function bB(){throw"cannot construct a btIndexedMeshArray, no constructor in IDL";}bB.prototype=Object.create(k.prototype);bB.prototype.constructor=bB;bB.prototype.I=bB;bB.J={};d.btIndexedMeshArray=bB; +bB.prototype.size=bB.prototype.size=function(){return fo(this.H)};bB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(eo(b,a),cB)};bB.prototype.__destroy__=function(){co(this.H)};function dB(){this.H=Vj();l(dB)[this.H]=this}dB.prototype=Object.create(k.prototype);dB.prototype.constructor=dB;dB.prototype.I=dB;dB.J={};d.btDbvtBroadphase=dB;dB.prototype.__destroy__=function(){Uj(this.H)}; +function eB(a,b,e,f,h,n,B,S,ja){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);S&&"object"===typeof S&&(S=S.H);ja&&"object"===typeof ja&&(ja=ja.H);this.H=xn(a,b,e,f,h,n,B,S,ja);l(eB)[this.H]=this}eB.prototype=Object.create(CA.prototype);eB.prototype.constructor=eB;eB.prototype.I=eB;eB.J={};d.btHeightfieldTerrainShape=eB; +eB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cn(b,a)};eB.prototype.getMargin=function(){return An(this.H)};eB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bn(b,a)};eB.prototype.getLocalScaling=function(){return m(zn(this.H),r)};eB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);yn(e,a,b)};eB.prototype.__destroy__=function(){wn(this.H)}; +function fB(){this.H=kk();l(fB)[this.H]=this}fB.prototype=Object.create(RA.prototype);fB.prototype.constructor=fB;fB.prototype.I=fB;fB.J={};d.btDefaultSoftBodySolver=fB;fB.prototype.__destroy__=function(){jk(this.H)};function gB(a){a&&"object"===typeof a&&(a=a.H);this.H=vg(a);l(gB)[this.H]=this}gB.prototype=Object.create(uA.prototype);gB.prototype.constructor=gB;gB.prototype.I=gB;gB.J={};d.btCollisionDispatcher=gB;gB.prototype.getNumManifolds=function(){return xg(this.H)}; +gB.prototype.getManifoldByIndexInternal=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(wg(b,a),MA)};gB.prototype.__destroy__=function(){ug(this.H)};function hB(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=void 0===e?sf(a,b):void 0===f?tf(a,b,e):void 0===h?uf(a,b,e,f):vf(a,b,e,f,h);l(hB)[this.H]=this}hB.prototype=Object.create(k.prototype); +hB.prototype.constructor=hB;hB.prototype.I=hB;hB.J={};d.btAxisSweep3=hB;hB.prototype.__destroy__=function(){rf(this.H)};function yA(){throw"cannot construct a VoidPtr, no constructor in IDL";}yA.prototype=Object.create(k.prototype);yA.prototype.constructor=yA;yA.prototype.I=yA;yA.J={};d.VoidPtr=yA;yA.prototype.__destroy__=function(){of(this.H)};function J(){this.H=eu();l(J)[this.H]=this}J.prototype=Object.create(k.prototype);J.prototype.constructor=J;J.prototype.I=J;J.J={};d.btSoftBodyWorldInfo=J; +J.prototype.get_air_density=J.prototype.Ea=function(){return fu(this.H)};J.prototype.set_air_density=J.prototype.od=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nu(b,a)};Object.defineProperty(J.prototype,"air_density",{get:J.prototype.Ea,set:J.prototype.od});J.prototype.get_water_density=J.prototype.ld=function(){return ku(this.H)};J.prototype.set_water_density=J.prototype.Uf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);su(b,a)}; +Object.defineProperty(J.prototype,"water_density",{get:J.prototype.ld,set:J.prototype.Uf});J.prototype.get_water_offset=J.prototype.nd=function(){return mu(this.H)};J.prototype.set_water_offset=J.prototype.Wf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);uu(b,a)};Object.defineProperty(J.prototype,"water_offset",{get:J.prototype.nd,set:J.prototype.Wf});J.prototype.get_m_maxDisplacement=J.prototype.mc=function(){return ju(this.H)}; +J.prototype.set_m_maxDisplacement=J.prototype.Ve=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ru(b,a)};Object.defineProperty(J.prototype,"m_maxDisplacement",{get:J.prototype.mc,set:J.prototype.Ve});J.prototype.get_water_normal=J.prototype.md=function(){return m(lu(this.H),r)};J.prototype.set_water_normal=J.prototype.Vf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tu(b,a)};Object.defineProperty(J.prototype,"water_normal",{get:J.prototype.md,set:J.prototype.Vf}); +J.prototype.get_m_broadphase=J.prototype.mb=function(){return m(gu(this.H),wA)};J.prototype.set_m_broadphase=J.prototype.Wd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ou(b,a)};Object.defineProperty(J.prototype,"m_broadphase",{get:J.prototype.mb,set:J.prototype.Wd});J.prototype.get_m_dispatcher=J.prototype.Db=function(){return m(hu(this.H),uA)};J.prototype.set_m_dispatcher=J.prototype.me=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pu(b,a)}; +Object.defineProperty(J.prototype,"m_dispatcher",{get:J.prototype.Db,set:J.prototype.me});J.prototype.get_m_gravity=J.prototype.Nb=function(){return m(iu(this.H),r)};J.prototype.set_m_gravity=J.prototype.we=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qu(b,a)};Object.defineProperty(J.prototype,"m_gravity",{get:J.prototype.Nb,set:J.prototype.we});J.prototype.__destroy__=function(){du(this.H)}; +function iB(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=void 0===e?ki(a,b):void 0===f?_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a,b,e):li(a,b,e,f);l(iB)[this.H]=this}iB.prototype=Object.create(BA.prototype);iB.prototype.constructor=iB;iB.prototype.I=iB;iB.J={};d.btConeTwistConstraint=iB; +iB.prototype.setLimit=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);ti(e,a,b)};iB.prototype.setAngularOnly=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qi(b,a)};iB.prototype.setDamping=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);si(b,a)};iB.prototype.enableMotor=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ni(b,a)};iB.prototype.setMaxMotorImpulse=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vi(b,a)}; +iB.prototype.setMaxMotorImpulseNormalized=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ui(b,a)};iB.prototype.setMotorTarget=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xi(b,a)};iB.prototype.setMotorTargetInConstraintSpace=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wi(b,a)};iB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mi(b,a)};iB.prototype.getBreakingImpulseThreshold=function(){return oi(this.H)}; +iB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ri(b,a)};iB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return pi(e,a,b)};iB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);yi(f,a,b,e)};iB.prototype.__destroy__=function(){ji(this.H)}; +function jB(a,b,e,f,h,n,B){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);this.H=void 0===e?En(a,b):void 0===f?Fn(a,b,e):void 0===h?Gn(a,b,e,f):void 0===n?Hn(a,b,e,f,h):void 0===B?In(a,b,e,f,h,n):Jn(a,b,e,f,h,n,B);l(jB)[this.H]=this}jB.prototype=Object.create(BA.prototype);jB.prototype.constructor=jB;jB.prototype.I=jB; +jB.J={};d.btHingeConstraint=jB;jB.prototype.setLimit=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);void 0===h?Rn(n,a,b,e,f):Sn(n,a,b,e,f,h)};jB.prototype.enableAngularMotor=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Kn(f,a,b,e)}; +jB.prototype.setAngularOnly=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pn(b,a)};jB.prototype.enableMotor=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mn(b,a)};jB.prototype.setMaxMotorImpulse=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tn(b,a)};jB.prototype.setMotorTarget=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Un(e,a,b)}; +jB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ln(b,a)};jB.prototype.getBreakingImpulseThreshold=function(){return Nn(this.H)};jB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qn(b,a)};jB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return On(e,a,b)}; +jB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Vn(f,a,b,e)};jB.prototype.__destroy__=function(){Dn(this.H)};function kB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=ai(a,b);l(kB)[this.H]=this}kB.prototype=Object.create(GA.prototype);kB.prototype.constructor=kB;kB.prototype.I=kB;kB.J={};d.btConeShapeZ=kB; +kB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);di(b,a)};kB.prototype.getLocalScaling=function(){return m(ci(this.H),r)};kB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);bi(e,a,b)};kB.prototype.__destroy__=function(){$h(this.H)};function lB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=Wh(a,b);l(lB)[this.H]=this}lB.prototype=Object.create(GA.prototype); +lB.prototype.constructor=lB;lB.prototype.I=lB;lB.J={};d.btConeShapeX=lB;lB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zh(b,a)};lB.prototype.getLocalScaling=function(){return m(Yh(this.H),r)};lB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Xh(e,a,b)};lB.prototype.__destroy__=function(){Vh(this.H)}; +function mB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=void 0===a?Yw():void 0===b?Zw(a):$w(a,b);l(mB)[this.H]=this}mB.prototype=Object.create(OA.prototype);mB.prototype.constructor=mB;mB.prototype.I=mB;mB.J={};d.btTriangleMesh=mB;mB.prototype.addTriangle=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);void 0===f?Ww(h,a,b,e):Xw(h,a,b,e,f)}; +mB.prototype.findOrAddVertex=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return ax(e,a,b)};mB.prototype.addIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vw(b,a)};mB.prototype.getIndexedMeshArray=function(){return m(bx(this.H),bB)};mB.prototype.setScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);cx(b,a)};mB.prototype.__destroy__=function(){Uw(this.H)}; +function nB(a,b){c.M();"object"==typeof a&&(a=sA(a));b&&"object"===typeof b&&(b=b.H);this.H=void 0===a?Vi():void 0===b?Wi(a):Xi(a,b);l(nB)[this.H]=this}nB.prototype=Object.create(q.prototype);nB.prototype.constructor=nB;nB.prototype.I=nB;nB.J={};d.btConvexHullShape=nB;nB.prototype.addPoint=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===b?Ti(e,a):Ui(e,a,b)};nB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fj(b,a)}; +nB.prototype.getMargin=function(){return aj(this.H)};nB.prototype.getNumVertices=function(){return bj(this.H)};nB.prototype.initializePolyhedralFeatures=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return!!cj(b,a)};nB.prototype.recalcLocalAabb=function(){dj(this.H)};nB.prototype.getConvexPolyhedron=function(){return m(Zi(this.H),oB)};nB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ej(b,a)}; +nB.prototype.getLocalScaling=function(){return m($i(this.H),r)};nB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Yi(e,a,b)};nB.prototype.__destroy__=function(){Si(this.H)};function K(){this.H=dy();l(K)[this.H]=this}K.prototype=Object.create(k.prototype);K.prototype.constructor=K;K.prototype.I=K;K.J={};d.btVehicleTuning=K;K.prototype.get_m_suspensionStiffness=K.prototype.Y=function(){return jy(this.H)}; +K.prototype.set_m_suspensionStiffness=K.prototype.ha=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);py(b,a)};Object.defineProperty(K.prototype,"m_suspensionStiffness",{get:K.prototype.Y,set:K.prototype.ha});K.prototype.get_m_suspensionCompression=K.prototype.Jc=function(){return hy(this.H)};K.prototype.set_m_suspensionCompression=K.prototype.tf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ny(b,a)}; +Object.defineProperty(K.prototype,"m_suspensionCompression",{get:K.prototype.Jc,set:K.prototype.tf});K.prototype.get_m_suspensionDamping=K.prototype.Kc=function(){return iy(this.H)};K.prototype.set_m_suspensionDamping=K.prototype.uf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);oy(b,a)};Object.defineProperty(K.prototype,"m_suspensionDamping",{get:K.prototype.Kc,set:K.prototype.uf});K.prototype.get_m_maxSuspensionTravelCm=K.prototype.X=function(){return gy(this.H)}; +K.prototype.set_m_maxSuspensionTravelCm=K.prototype.ga=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);my(b,a)};Object.defineProperty(K.prototype,"m_maxSuspensionTravelCm",{get:K.prototype.X,set:K.prototype.ga});K.prototype.get_m_frictionSlip=K.prototype.T=function(){return ey(this.H)};K.prototype.set_m_frictionSlip=K.prototype.ba=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ky(b,a)};Object.defineProperty(K.prototype,"m_frictionSlip",{get:K.prototype.T,set:K.prototype.ba}); +K.prototype.get_m_maxSuspensionForce=K.prototype.W=function(){return fy(this.H)};K.prototype.set_m_maxSuspensionForce=K.prototype.fa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ly(b,a)};Object.defineProperty(K.prototype,"m_maxSuspensionForce",{get:K.prototype.W,set:K.prototype.fa});function pB(){throw"cannot construct a btCollisionObjectWrapper, no constructor in IDL";}pB.prototype=Object.create(k.prototype);pB.prototype.constructor=pB;pB.prototype.I=pB;pB.J={}; +d.btCollisionObjectWrapper=pB;pB.prototype.getWorldTransform=function(){return m(Ag(this.H),u)};pB.prototype.getCollisionObject=function(){return m(yg(this.H),t)};pB.prototype.getCollisionShape=function(){return m(zg(this.H),q)};function qB(a){a&&"object"===typeof a&&(a=a.H);this.H=zt(a);l(qB)[this.H]=this}qB.prototype=Object.create(k.prototype);qB.prototype.constructor=qB;qB.prototype.I=qB;qB.J={};d.btShapeHull=qB; +qB.prototype.buildHull=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return!!At(b,a)};qB.prototype.numVertices=function(){return Ct(this.H)};qB.prototype.getVertexPointer=function(){return m(Bt(this.H),r)};qB.prototype.__destroy__=function(){yt(this.H)};function rB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=void 0===a?ck():void 0===b?dk(a):ek(a,b);l(rB)[this.H]=this}rB.prototype=Object.create(PA.prototype);rB.prototype.constructor=rB;rB.prototype.I=rB; +rB.J={};d.btDefaultMotionState=rB;rB.prototype.getWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fk(b,a)};rB.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hk(b,a)};rB.prototype.get_m_graphicsWorldTrans=rB.prototype.Mb=function(){return m(gk(this.H),u)};rB.prototype.set_m_graphicsWorldTrans=rB.prototype.ve=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ik(b,a)}; +Object.defineProperty(rB.prototype,"m_graphicsWorldTrans",{get:rB.prototype.Mb,set:rB.prototype.ve});rB.prototype.__destroy__=function(){bk(this.H)};function L(a){a&&"object"===typeof a&&(a=a.H);this.H=Qy(a);l(L)[this.H]=this}L.prototype=Object.create(k.prototype);L.prototype.constructor=L;L.prototype.I=L;L.J={};d.btWheelInfo=L;L.prototype.getSuspensionRestLength=function(){return Ry(this.H)}; +L.prototype.updateWheel=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Nz(e,a,b)};L.prototype.get_m_suspensionStiffness=L.prototype.Y=function(){return hz(this.H)};L.prototype.set_m_suspensionStiffness=L.prototype.ha=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fz(b,a)};Object.defineProperty(L.prototype,"m_suspensionStiffness",{get:L.prototype.Y,set:L.prototype.ha});L.prototype.get_m_frictionSlip=L.prototype.T=function(){return Yy(this.H)}; +L.prototype.set_m_frictionSlip=L.prototype.ba=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vz(b,a)};Object.defineProperty(L.prototype,"m_frictionSlip",{get:L.prototype.T,set:L.prototype.ba});L.prototype.get_m_engineForce=L.prototype.Hb=function(){return Xy(this.H)};L.prototype.set_m_engineForce=L.prototype.qe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);uz(b,a)};Object.defineProperty(L.prototype,"m_engineForce",{get:L.prototype.Hb,set:L.prototype.qe}); +L.prototype.get_m_rollInfluence=L.prototype.zc=function(){return bz(this.H)};L.prototype.set_m_rollInfluence=L.prototype.hf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zz(b,a)};Object.defineProperty(L.prototype,"m_rollInfluence",{get:L.prototype.zc,set:L.prototype.hf});L.prototype.get_m_suspensionRestLength1=L.prototype.Oc=function(){return gz(this.H)};L.prototype.set_m_suspensionRestLength1=L.prototype.yf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ez(b,a)}; +Object.defineProperty(L.prototype,"m_suspensionRestLength1",{get:L.prototype.Oc,set:L.prototype.yf});L.prototype.get_m_wheelsRadius=L.prototype.bd=function(){return mz(this.H)};L.prototype.set_m_wheelsRadius=L.prototype.Mf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Kz(b,a)};Object.defineProperty(L.prototype,"m_wheelsRadius",{get:L.prototype.bd,set:L.prototype.Mf});L.prototype.get_m_wheelsDampingCompression=L.prototype.qa=function(){return kz(this.H)}; +L.prototype.set_m_wheelsDampingCompression=L.prototype.xa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Iz(b,a)};Object.defineProperty(L.prototype,"m_wheelsDampingCompression",{get:L.prototype.qa,set:L.prototype.xa});L.prototype.get_m_wheelsDampingRelaxation=L.prototype.ra=function(){return lz(this.H)};L.prototype.set_m_wheelsDampingRelaxation=L.prototype.ya=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jz(b,a)}; +Object.defineProperty(L.prototype,"m_wheelsDampingRelaxation",{get:L.prototype.ra,set:L.prototype.ya});L.prototype.get_m_steering=L.prototype.Hc=function(){return ez(this.H)};L.prototype.set_m_steering=L.prototype.rf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cz(b,a)};Object.defineProperty(L.prototype,"m_steering",{get:L.prototype.Hc,set:L.prototype.rf});L.prototype.get_m_maxSuspensionForce=L.prototype.W=function(){return Zy(this.H)}; +L.prototype.set_m_maxSuspensionForce=L.prototype.fa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wz(b,a)};Object.defineProperty(L.prototype,"m_maxSuspensionForce",{get:L.prototype.W,set:L.prototype.fa});L.prototype.get_m_maxSuspensionTravelCm=L.prototype.X=function(){return $y(this.H)};L.prototype.set_m_maxSuspensionTravelCm=L.prototype.ga=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xz(b,a)};Object.defineProperty(L.prototype,"m_maxSuspensionTravelCm",{get:L.prototype.X,set:L.prototype.ga}); +L.prototype.get_m_wheelsSuspensionForce=L.prototype.cd=function(){return nz(this.H)};L.prototype.set_m_wheelsSuspensionForce=L.prototype.Nf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lz(b,a)};Object.defineProperty(L.prototype,"m_wheelsSuspensionForce",{get:L.prototype.cd,set:L.prototype.Nf});L.prototype.get_m_bIsFrontWheel=L.prototype.la=function(){return!!Sy(this.H)};L.prototype.set_m_bIsFrontWheel=L.prototype.sa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pz(b,a)}; +Object.defineProperty(L.prototype,"m_bIsFrontWheel",{get:L.prototype.la,set:L.prototype.sa});L.prototype.get_m_raycastInfo=L.prototype.xc=function(){return m(az(this.H),M)};L.prototype.set_m_raycastInfo=L.prototype.ff=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yz(b,a)};Object.defineProperty(L.prototype,"m_raycastInfo",{get:L.prototype.xc,set:L.prototype.ff});L.prototype.get_m_chassisConnectionPointCS=L.prototype.sb=function(){return m(Uy(this.H),r)}; +L.prototype.set_m_chassisConnectionPointCS=L.prototype.be=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rz(b,a)};Object.defineProperty(L.prototype,"m_chassisConnectionPointCS",{get:L.prototype.sb,set:L.prototype.be});L.prototype.get_m_worldTransform=L.prototype.dd=function(){return m(oz(this.H),u)};L.prototype.set_m_worldTransform=L.prototype.Of=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mz(b,a)};Object.defineProperty(L.prototype,"m_worldTransform",{get:L.prototype.dd,set:L.prototype.Of}); +L.prototype.get_m_wheelDirectionCS=L.prototype.pa=function(){return m(jz(this.H),r)};L.prototype.set_m_wheelDirectionCS=L.prototype.wa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Hz(b,a)};Object.defineProperty(L.prototype,"m_wheelDirectionCS",{get:L.prototype.pa,set:L.prototype.wa});L.prototype.get_m_wheelAxleCS=L.prototype.oa=function(){return m(iz(this.H),r)};L.prototype.set_m_wheelAxleCS=L.prototype.va=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Gz(b,a)}; +Object.defineProperty(L.prototype,"m_wheelAxleCS",{get:L.prototype.oa,set:L.prototype.va});L.prototype.get_m_rotation=L.prototype.Bc=function(){return cz(this.H)};L.prototype.set_m_rotation=L.prototype.kf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Az(b,a)};Object.defineProperty(L.prototype,"m_rotation",{get:L.prototype.Bc,set:L.prototype.kf});L.prototype.get_m_deltaRotation=L.prototype.Bb=function(){return Wy(this.H)}; +L.prototype.set_m_deltaRotation=L.prototype.ke=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tz(b,a)};Object.defineProperty(L.prototype,"m_deltaRotation",{get:L.prototype.Bb,set:L.prototype.ke});L.prototype.get_m_brake=L.prototype.lb=function(){return Ty(this.H)};L.prototype.set_m_brake=L.prototype.Vd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qz(b,a)};Object.defineProperty(L.prototype,"m_brake",{get:L.prototype.lb,set:L.prototype.Vd}); +L.prototype.get_m_clippedInvContactDotSuspension=L.prototype.tb=function(){return Vy(this.H)};L.prototype.set_m_clippedInvContactDotSuspension=L.prototype.ce=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sz(b,a)};Object.defineProperty(L.prototype,"m_clippedInvContactDotSuspension",{get:L.prototype.tb,set:L.prototype.ce});L.prototype.get_m_suspensionRelativeVelocity=L.prototype.Mc=function(){return fz(this.H)}; +L.prototype.set_m_suspensionRelativeVelocity=L.prototype.wf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dz(b,a)};Object.defineProperty(L.prototype,"m_suspensionRelativeVelocity",{get:L.prototype.Mc,set:L.prototype.wf});L.prototype.get_m_skidInfo=L.prototype.Ec=function(){return dz(this.H)};L.prototype.set_m_skidInfo=L.prototype.nf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bz(b,a)};Object.defineProperty(L.prototype,"m_skidInfo",{get:L.prototype.Ec,set:L.prototype.nf}); +L.prototype.__destroy__=function(){Py(this.H)};function N(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=void 0===a?Ex():void 0===b?_emscripten_bind_btVector4_btVector4_1(a):void 0===e?_emscripten_bind_btVector4_btVector4_2(a,b):void 0===f?_emscripten_bind_btVector4_btVector4_3(a,b,e):Fx(a,b,e,f);l(N)[this.H]=this}N.prototype=Object.create(r.prototype);N.prototype.constructor=N;N.prototype.I=N;N.J={}; +d.btVector4=N;N.prototype.w=N.prototype.Aa=function(){return Rx(this.H)};N.prototype.setValue=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);Nx(h,a,b,e,f)};N.prototype.length=N.prototype.length=function(){return Hx(this.H)};N.prototype.x=N.prototype.x=function(){return Sx(this.H)};N.prototype.y=N.prototype.y=function(){return Tx(this.H)};N.prototype.z=N.prototype.z=function(){return Ux(this.H)}; +N.prototype.setX=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ox(b,a)};N.prototype.setY=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Px(b,a)};N.prototype.setZ=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qx(b,a)};N.prototype.normalize=N.prototype.normalize=function(){Ix(this.H)};N.prototype.rotate=N.prototype.rotate=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return m(Mx(e,a,b),r)}; +N.prototype.dot=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return Gx(b,a)};N.prototype.op_mul=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Kx(b,a),r)};N.prototype.op_add=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Jx(b,a),r)};N.prototype.op_sub=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Lx(b,a),r)};N.prototype.__destroy__=function(){Dx(this.H)};function sB(){this.H=ak();l(sB)[this.H]=this}sB.prototype=Object.create(k.prototype); +sB.prototype.constructor=sB;sB.prototype.I=sB;sB.J={};d.btDefaultCollisionConstructionInfo=sB;sB.prototype.__destroy__=function(){Zj(this.H)};function O(){throw"cannot construct a Anchor, no constructor in IDL";}O.prototype=Object.create(k.prototype);O.prototype.constructor=O;O.prototype.I=O;O.J={};d.Anchor=O;O.prototype.get_m_node=O.prototype.oc=function(){return m(Nb(this.H),Node)};O.prototype.set_m_node=O.prototype.Xe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vb(b,a)}; +Object.defineProperty(O.prototype,"m_node",{get:O.prototype.oc,set:O.prototype.Xe});O.prototype.get_m_local=O.prototype.hc=function(){return m(Mb(this.H),r)};O.prototype.set_m_local=O.prototype.Qe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ub(b,a)};Object.defineProperty(O.prototype,"m_local",{get:O.prototype.hc,set:O.prototype.Qe});O.prototype.get_m_body=O.prototype.kb=function(){return m(Hb(this.H),I)}; +O.prototype.set_m_body=O.prototype.Ud=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ob(b,a)};Object.defineProperty(O.prototype,"m_body",{get:O.prototype.kb,set:O.prototype.Ud});O.prototype.get_m_influence=O.prototype.$b=function(){return Lb(this.H)};O.prototype.set_m_influence=O.prototype.Je=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tb(b,a)};Object.defineProperty(O.prototype,"m_influence",{get:O.prototype.$b,set:O.prototype.Je}); +O.prototype.get_m_c0=O.prototype.nb=function(){return m(Ib(this.H),SA)};O.prototype.set_m_c0=O.prototype.Xd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pb(b,a)};Object.defineProperty(O.prototype,"m_c0",{get:O.prototype.nb,set:O.prototype.Xd});O.prototype.get_m_c1=O.prototype.ob=function(){return m(Jb(this.H),r)};O.prototype.set_m_c1=O.prototype.Yd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qb(b,a)};Object.defineProperty(O.prototype,"m_c1",{get:O.prototype.ob,set:O.prototype.Yd}); +O.prototype.get_m_c2=O.prototype.pb=function(){return Kb(this.H)};O.prototype.set_m_c2=O.prototype.Zd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sb(b,a)};Object.defineProperty(O.prototype,"m_c2",{get:O.prototype.pb,set:O.prototype.Zd});O.prototype.__destroy__=function(){Gb(this.H)};function P(){throw"cannot construct a btVehicleRaycasterResult, no constructor in IDL";}P.prototype=Object.create(k.prototype);P.prototype.constructor=P;P.prototype.I=P;P.J={};d.btVehicleRaycasterResult=P; +P.prototype.get_m_hitPointInWorld=P.prototype.Vb=function(){return m(Yx(this.H),r)};P.prototype.set_m_hitPointInWorld=P.prototype.Ee=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ay(b,a)};Object.defineProperty(P.prototype,"m_hitPointInWorld",{get:P.prototype.Vb,set:P.prototype.Ee});P.prototype.get_m_hitNormalInWorld=P.prototype.Tb=function(){return m(Xx(this.H),r)};P.prototype.set_m_hitNormalInWorld=P.prototype.Ce=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);$x(b,a)}; +Object.defineProperty(P.prototype,"m_hitNormalInWorld",{get:P.prototype.Tb,set:P.prototype.Ce});P.prototype.get_m_distFraction=P.prototype.Eb=function(){return Wx(this.H)};P.prototype.set_m_distFraction=P.prototype.ne=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zx(b,a)};Object.defineProperty(P.prototype,"m_distFraction",{get:P.prototype.Eb,set:P.prototype.ne});P.prototype.__destroy__=function(){Vx(this.H)}; +function YA(){throw"cannot construct a btVector3Array, no constructor in IDL";}YA.prototype=Object.create(k.prototype);YA.prototype.constructor=YA;YA.prototype.I=YA;YA.J={};d.btVector3Array=YA;YA.prototype.size=YA.prototype.size=function(){return lx(this.H)};YA.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(kx(b,a),r)};YA.prototype.__destroy__=function(){jx(this.H)};function tB(){throw"cannot construct a btConstraintSolver, no constructor in IDL";}tB.prototype=Object.create(k.prototype); +tB.prototype.constructor=tB;tB.prototype.I=tB;tB.J={};d.btConstraintSolver=tB;tB.prototype.__destroy__=function(){Ki(this.H)};function Q(a,b,e){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);this.H=dr(a,b,e);l(Q)[this.H]=this}Q.prototype=Object.create(HA.prototype);Q.prototype.constructor=Q;Q.prototype.I=Q;Q.J={};d.btRaycastVehicle=Q; +Q.prototype.applyEngineForce=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);cr(e,a,b)};Q.prototype.setSteeringValue=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);wr(e,a,b)};Q.prototype.getWheelTransformWS=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(qr(b,a),u)}; +Q.prototype.updateWheelTransform=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Dr(e,a,b)};Q.prototype.addWheel=function(a,b,e,f,h,n,B){var S=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);return m(br(S,a,b,e,f,h,n,B),L)};Q.prototype.getNumWheels=function(){return ir(this.H)}; +Q.prototype.getRigidBody=function(){return m(kr(this.H),I)};Q.prototype.getWheelInfo=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(pr(b,a),L)};Q.prototype.setBrake=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);tr(e,a,b)};Q.prototype.setCoordinateSystem=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);ur(f,a,b,e)};Q.prototype.getCurrentSpeedKmHour=function(){return fr(this.H)}; +Q.prototype.getChassisWorldTransform=function(){return m(er(this.H),u)};Q.prototype.rayCast=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return rr(b,a)};Q.prototype.updateVehicle=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cr(b,a)};Q.prototype.resetSuspension=function(){sr(this.H)};Q.prototype.getSteeringValue=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return lr(b,a)}; +Q.prototype.updateWheelTransformsWS=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===b?Er(e,a):Fr(e,a,b)};Q.prototype.setPitchControl=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vr(b,a)};Q.prototype.updateSuspension=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Br(b,a)};Q.prototype.updateFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ar(b,a)};Q.prototype.getRightAxis=function(){return jr(this.H)}; +Q.prototype.getUpAxis=function(){return mr(this.H)};Q.prototype.getForwardAxis=function(){return gr(this.H)};Q.prototype.getForwardVector=function(){return m(hr(this.H),r)};Q.prototype.getUserConstraintType=function(){return or(this.H)};Q.prototype.setUserConstraintType=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yr(b,a)};Q.prototype.setUserConstraintId=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xr(b,a)};Q.prototype.getUserConstraintId=function(){return nr(this.H)}; +Q.prototype.updateAction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);zr(e,a,b)};Q.prototype.__destroy__=function(){ar(this.H)};function uB(a){a&&"object"===typeof a&&(a=a.H);this.H=Aj(a);l(uB)[this.H]=this}uB.prototype=Object.create(KA.prototype);uB.prototype.constructor=uB;uB.prototype.I=uB;uB.J={};d.btCylinderShapeX=uB;uB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fj(b,a)};uB.prototype.getMargin=function(){return Dj(this.H)}; +uB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ej(b,a)};uB.prototype.getLocalScaling=function(){return m(Cj(this.H),r)};uB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Bj(e,a,b)};uB.prototype.__destroy__=function(){zj(this.H)};function vB(a){a&&"object"===typeof a&&(a=a.H);this.H=Hj(a);l(vB)[this.H]=this}vB.prototype=Object.create(KA.prototype);vB.prototype.constructor=vB; +vB.prototype.I=vB;vB.J={};d.btCylinderShapeZ=vB;vB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mj(b,a)};vB.prototype.getMargin=function(){return Kj(this.H)};vB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lj(b,a)};vB.prototype.getLocalScaling=function(){return m(Jj(this.H),r)};vB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Ij(e,a,b)}; +vB.prototype.__destroy__=function(){Gj(this.H)};function oB(){throw"cannot construct a btConvexPolyhedron, no constructor in IDL";}oB.prototype=Object.create(k.prototype);oB.prototype.constructor=oB;oB.prototype.I=oB;oB.J={};d.btConvexPolyhedron=oB;oB.prototype.get_m_vertices=oB.prototype.Yc=function(){return m(ij(this.H),YA)};oB.prototype.set_m_vertices=oB.prototype.If=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kj(b,a)}; +Object.defineProperty(oB.prototype,"m_vertices",{get:oB.prototype.Yc,set:oB.prototype.If});oB.prototype.get_m_faces=oB.prototype.Jb=function(){return m(hj(this.H),wB)};oB.prototype.set_m_faces=oB.prototype.se=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jj(b,a)};Object.defineProperty(oB.prototype,"m_faces",{get:oB.prototype.Jb,set:oB.prototype.se});oB.prototype.__destroy__=function(){gj(this.H)};function xB(){this.H=xt();l(xB)[this.H]=this}xB.prototype=Object.create(k.prototype); +xB.prototype.constructor=xB;xB.prototype.I=xB;xB.J={};d.btSequentialImpulseConstraintSolver=xB;xB.prototype.__destroy__=function(){wt(this.H)};function yB(){throw"cannot construct a tAnchorArray, no constructor in IDL";}yB.prototype=Object.create(k.prototype);yB.prototype.constructor=yB;yB.prototype.I=yB;yB.J={};d.tAnchorArray=yB;yB.prototype.size=yB.prototype.size=function(){return Tz(this.H)};yB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Pz(b,a),O)}; +yB.prototype.clear=yB.prototype.clear=function(){Qz(this.H)};yB.prototype.push_back=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sz(b,a)};yB.prototype.pop_back=function(){Rz(this.H)};yB.prototype.__destroy__=function(){Oz(this.H)};function M(){throw"cannot construct a RaycastInfo, no constructor in IDL";}M.prototype=Object.create(k.prototype);M.prototype.constructor=M;M.prototype.I=M;M.J={};d.RaycastInfo=M; +M.prototype.get_m_contactNormalWS=M.prototype.vb=function(){return m(Ye(this.H),r)};M.prototype.set_m_contactNormalWS=M.prototype.ee=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ff(b,a)};Object.defineProperty(M.prototype,"m_contactNormalWS",{get:M.prototype.vb,set:M.prototype.ee});M.prototype.get_m_contactPointWS=M.prototype.wb=function(){return m(Ze(this.H),r)};M.prototype.set_m_contactPointWS=M.prototype.fe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gf(b,a)}; +Object.defineProperty(M.prototype,"m_contactPointWS",{get:M.prototype.wb,set:M.prototype.fe});M.prototype.get_m_suspensionLength=M.prototype.Lc=function(){return cf(this.H)};M.prototype.set_m_suspensionLength=M.prototype.vf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);lf(b,a)};Object.defineProperty(M.prototype,"m_suspensionLength",{get:M.prototype.Lc,set:M.prototype.vf});M.prototype.get_m_hardPointWS=M.prototype.Pb=function(){return m(af(this.H),r)}; +M.prototype.set_m_hardPointWS=M.prototype.ye=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jf(b,a)};Object.defineProperty(M.prototype,"m_hardPointWS",{get:M.prototype.Pb,set:M.prototype.ye});M.prototype.get_m_wheelDirectionWS=M.prototype.$c=function(){return m(ef(this.H),r)};M.prototype.set_m_wheelDirectionWS=M.prototype.Kf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nf(b,a)};Object.defineProperty(M.prototype,"m_wheelDirectionWS",{get:M.prototype.$c,set:M.prototype.Kf}); +M.prototype.get_m_wheelAxleWS=M.prototype.Zc=function(){return m(df(this.H),r)};M.prototype.set_m_wheelAxleWS=M.prototype.Jf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mf(b,a)};Object.defineProperty(M.prototype,"m_wheelAxleWS",{get:M.prototype.Zc,set:M.prototype.Jf});M.prototype.get_m_isInContact=M.prototype.ac=function(){return!!bf(this.H)};M.prototype.set_m_isInContact=M.prototype.Ke=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kf(b,a)}; +Object.defineProperty(M.prototype,"m_isInContact",{get:M.prototype.ac,set:M.prototype.Ke});M.prototype.get_m_groundObject=M.prototype.Ob=function(){return $e(this.H)};M.prototype.set_m_groundObject=M.prototype.xe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hf(b,a)};Object.defineProperty(M.prototype,"m_groundObject",{get:M.prototype.Ob,set:M.prototype.xe});M.prototype.__destroy__=function(){Xe(this.H)}; +function zB(a,b,e){c.M();a&&"object"===typeof a&&(a=a.H);"object"==typeof b&&(b=sA(b));e&&"object"===typeof e&&(e=e.H);this.H=hp(a,b,e);l(zB)[this.H]=this}zB.prototype=Object.create(q.prototype);zB.prototype.constructor=zB;zB.prototype.I=zB;zB.J={};d.btMultiSphereShape=zB;zB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kp(b,a)};zB.prototype.getLocalScaling=function(){return m(jp(this.H),r)}; +zB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);ip(e,a,b)};zB.prototype.__destroy__=function(){gp(this.H)};function R(a,b,e,f){c.M();a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);"object"==typeof f&&(f=sA(f));this.H=Hu(a,b,e,f);l(R)[this.H]=this}R.prototype=Object.create(t.prototype);R.prototype.constructor=R;R.prototype.I=R;R.J={};d.btSoftBody=R; +R.prototype.checkLink=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return!!Ju(e,a,b)};R.prototype.checkFace=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);return!!Iu(f,a,b,e)};R.prototype.appendMaterial=function(){return m(Eu(this.H),A)};R.prototype.appendNode=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Fu(e,a,b)}; +R.prototype.appendLink=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);Du(h,a,b,e,f)};R.prototype.appendFace=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);Cu(h,a,b,e,f)}; +R.prototype.appendTetra=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);Gu(n,a,b,e,f,h)};R.prototype.appendAnchor=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);Bu(h,a,b,e,f)}; +R.prototype.addForce=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===b?zu(e,a):Au(e,a,b)};R.prototype.addAeroForceToNode=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);yu(e,a,b)};R.prototype.getTotalMass=function(){return Uu(this.H)};R.prototype.setTotalMass=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);sv(e,a,b)}; +R.prototype.setMass=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);pv(e,a,b)};R.prototype.transform=R.prototype.transform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Av(b,a)};R.prototype.translate=R.prototype.translate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bv(b,a)};R.prototype.rotate=R.prototype.rotate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fv(b,a)}; +R.prototype.scale=R.prototype.scale=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gv(b,a)};R.prototype.generateClusters=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return void 0===b?Mu(e,a):Nu(e,a,b)};R.prototype.generateBendingConstraints=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return Lu(e,a,b)};R.prototype.upcast=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Cv(b,a),R)}; +R.prototype.setAnisotropicFriction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);iv(e,a,b)};R.prototype.getCollisionShape=function(){return m(Qu(this.H),q)};R.prototype.setContactProcessingThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nv(b,a)};R.prototype.setActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hv(b,a)}; +R.prototype.forceActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ku(b,a)};R.prototype.activate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);void 0===a?wu(b):xu(b,a)};R.prototype.isActive=function(){return!!bv(this.H)};R.prototype.isKinematicObject=function(){return!!cv(this.H)};R.prototype.isStaticObject=function(){return!!dv(this.H)};R.prototype.isStaticOrKinematicObject=function(){return!!ev(this.H)};R.prototype.getRestitution=function(){return Su(this.H)}; +R.prototype.getFriction=function(){return Ru(this.H)};R.prototype.getRollingFriction=function(){return Tu(this.H)};R.prototype.setRestitution=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qv(b,a)};R.prototype.setFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ov(b,a)};R.prototype.setRollingFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rv(b,a)};R.prototype.getWorldTransform=function(){return m(Xu(this.H),u)};R.prototype.getCollisionFlags=function(){return Pu(this.H)}; +R.prototype.setCollisionFlags=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);lv(b,a)};R.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vv(b,a)};R.prototype.setCollisionShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mv(b,a)};R.prototype.setCcdMotionThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jv(b,a)};R.prototype.setCcdSweptSphereRadius=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kv(b,a)}; +R.prototype.getUserIndex=function(){return Vu(this.H)};R.prototype.setUserIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tv(b,a)};R.prototype.getUserPointer=function(){return m(Wu(this.H),yA)};R.prototype.setUserPointer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);uv(b,a)};R.prototype.getBroadphaseHandle=function(){return m(Ou(this.H),zA)};R.prototype.get_m_cfg=R.prototype.qb=function(){return m(Zu(this.H),T)}; +R.prototype.set_m_cfg=R.prototype.$d=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xv(b,a)};Object.defineProperty(R.prototype,"m_cfg",{get:R.prototype.qb,set:R.prototype.$d});R.prototype.get_m_nodes=R.prototype.pc=function(){return m(av(this.H),AB)};R.prototype.set_m_nodes=R.prototype.Ye=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zv(b,a)};Object.defineProperty(R.prototype,"m_nodes",{get:R.prototype.pc,set:R.prototype.Ye}); +R.prototype.get_m_materials=R.prototype.lc=function(){return m($u(this.H),ZA)};R.prototype.set_m_materials=R.prototype.Ue=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yv(b,a)};Object.defineProperty(R.prototype,"m_materials",{get:R.prototype.lc,set:R.prototype.Ue});R.prototype.get_m_anchors=R.prototype.gb=function(){return m(Yu(this.H),yB)};R.prototype.set_m_anchors=R.prototype.Qd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wv(b,a)}; +Object.defineProperty(R.prototype,"m_anchors",{get:R.prototype.gb,set:R.prototype.Qd});R.prototype.__destroy__=function(){vu(this.H)};function BB(){throw"cannot construct a btIntArray, no constructor in IDL";}BB.prototype=Object.create(k.prototype);BB.prototype.constructor=BB;BB.prototype.I=BB;BB.J={};d.btIntArray=BB;BB.prototype.size=BB.prototype.size=function(){return lo(this.H)};BB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return ko(b,a)};BB.prototype.__destroy__=function(){jo(this.H)}; +function T(){throw"cannot construct a Config, no constructor in IDL";}T.prototype=Object.create(k.prototype);T.prototype.constructor=T;T.prototype.I=T;T.J={};d.Config=T;T.prototype.get_kVCF=T.prototype.Za=function(){return cd(this.H)};T.prototype.set_kVCF=T.prototype.Jd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bd(b,a)};Object.defineProperty(T.prototype,"kVCF",{get:T.prototype.Za,set:T.prototype.Jd});T.prototype.get_kDP=T.prototype.Ma=function(){return Rc(this.H)}; +T.prototype.set_kDP=T.prototype.wd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pd(b,a)};Object.defineProperty(T.prototype,"kDP",{get:T.prototype.Ma,set:T.prototype.wd});T.prototype.get_kDG=T.prototype.La=function(){return Qc(this.H)};T.prototype.set_kDG=T.prototype.vd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);od(b,a)};Object.defineProperty(T.prototype,"kDG",{get:T.prototype.La,set:T.prototype.vd});T.prototype.get_kLF=T.prototype.Oa=function(){return Tc(this.H)}; +T.prototype.set_kLF=T.prototype.yd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);rd(b,a)};Object.defineProperty(T.prototype,"kLF",{get:T.prototype.Oa,set:T.prototype.yd});T.prototype.get_kPR=T.prototype.Qa=function(){return Vc(this.H)};T.prototype.set_kPR=T.prototype.Ad=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);td(b,a)};Object.defineProperty(T.prototype,"kPR",{get:T.prototype.Qa,set:T.prototype.Ad});T.prototype.get_kVC=T.prototype.Ya=function(){return dd(this.H)}; +T.prototype.set_kVC=T.prototype.Id=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cd(b,a)};Object.defineProperty(T.prototype,"kVC",{get:T.prototype.Ya,set:T.prototype.Id});T.prototype.get_kDF=T.prototype.Ka=function(){return Pc(this.H)};T.prototype.set_kDF=T.prototype.ud=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nd(b,a)};Object.defineProperty(T.prototype,"kDF",{get:T.prototype.Ka,set:T.prototype.ud});T.prototype.get_kMT=T.prototype.Pa=function(){return Uc(this.H)}; +T.prototype.set_kMT=T.prototype.zd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);sd(b,a)};Object.defineProperty(T.prototype,"kMT",{get:T.prototype.Pa,set:T.prototype.zd});T.prototype.get_kCHR=T.prototype.Ja=function(){return Oc(this.H)};T.prototype.set_kCHR=T.prototype.td=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);md(b,a)};Object.defineProperty(T.prototype,"kCHR",{get:T.prototype.Ja,set:T.prototype.td});T.prototype.get_kKHR=T.prototype.Na=function(){return Sc(this.H)}; +T.prototype.set_kKHR=T.prototype.xd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);qd(b,a)};Object.defineProperty(T.prototype,"kKHR",{get:T.prototype.Na,set:T.prototype.xd});T.prototype.get_kSHR=T.prototype.Ra=function(){return Wc(this.H)};T.prototype.set_kSHR=T.prototype.Bd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ud(b,a)};Object.defineProperty(T.prototype,"kSHR",{get:T.prototype.Ra,set:T.prototype.Bd});T.prototype.get_kAHR=T.prototype.Ia=function(){return Nc(this.H)}; +T.prototype.set_kAHR=T.prototype.sd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ld(b,a)};Object.defineProperty(T.prototype,"kAHR",{get:T.prototype.Ia,set:T.prototype.sd});T.prototype.get_kSRHR_CL=T.prototype.Ua=function(){return Zc(this.H)};T.prototype.set_kSRHR_CL=T.prototype.Ed=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xd(b,a)};Object.defineProperty(T.prototype,"kSRHR_CL",{get:T.prototype.Ua,set:T.prototype.Ed});T.prototype.get_kSKHR_CL=T.prototype.Sa=function(){return Xc(this.H)}; +T.prototype.set_kSKHR_CL=T.prototype.Cd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vd(b,a)};Object.defineProperty(T.prototype,"kSKHR_CL",{get:T.prototype.Sa,set:T.prototype.Cd});T.prototype.get_kSSHR_CL=T.prototype.Wa=function(){return ad(this.H)};T.prototype.set_kSSHR_CL=T.prototype.Gd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zd(b,a)};Object.defineProperty(T.prototype,"kSSHR_CL",{get:T.prototype.Wa,set:T.prototype.Gd});T.prototype.get_kSR_SPLT_CL=T.prototype.Va=function(){return $c(this.H)}; +T.prototype.set_kSR_SPLT_CL=T.prototype.Fd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yd(b,a)};Object.defineProperty(T.prototype,"kSR_SPLT_CL",{get:T.prototype.Va,set:T.prototype.Fd});T.prototype.get_kSK_SPLT_CL=T.prototype.Ta=function(){return Yc(this.H)};T.prototype.set_kSK_SPLT_CL=T.prototype.Dd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wd(b,a)};Object.defineProperty(T.prototype,"kSK_SPLT_CL",{get:T.prototype.Ta,set:T.prototype.Dd}); +T.prototype.get_kSS_SPLT_CL=T.prototype.Xa=function(){return bd(this.H)};T.prototype.set_kSS_SPLT_CL=T.prototype.Hd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ad(b,a)};Object.defineProperty(T.prototype,"kSS_SPLT_CL",{get:T.prototype.Xa,set:T.prototype.Hd});T.prototype.get_maxvolume=T.prototype.gd=function(){return ed(this.H)};T.prototype.set_maxvolume=T.prototype.Qf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dd(b,a)}; +Object.defineProperty(T.prototype,"maxvolume",{get:T.prototype.gd,set:T.prototype.Qf});T.prototype.get_timescale=T.prototype.jd=function(){return gd(this.H)};T.prototype.set_timescale=T.prototype.Sf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fd(b,a)};Object.defineProperty(T.prototype,"timescale",{get:T.prototype.jd,set:T.prototype.Sf});T.prototype.get_viterations=T.prototype.kd=function(){return hd(this.H)}; +T.prototype.set_viterations=T.prototype.Tf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Gd(b,a)};Object.defineProperty(T.prototype,"viterations",{get:T.prototype.kd,set:T.prototype.Tf});T.prototype.get_piterations=T.prototype.hd=function(){return fd(this.H)};T.prototype.set_piterations=T.prototype.Rf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ed(b,a)};Object.defineProperty(T.prototype,"piterations",{get:T.prototype.hd,set:T.prototype.Rf}); +T.prototype.get_diterations=T.prototype.Ha=function(){return Mc(this.H)};T.prototype.set_diterations=T.prototype.rd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kd(b,a)};Object.defineProperty(T.prototype,"diterations",{get:T.prototype.Ha,set:T.prototype.rd});T.prototype.get_citerations=T.prototype.Fa=function(){return Kc(this.H)};T.prototype.set_citerations=T.prototype.pd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);id(b,a)}; +Object.defineProperty(T.prototype,"citerations",{get:T.prototype.Fa,set:T.prototype.pd});T.prototype.get_collisions=T.prototype.Ga=function(){return Lc(this.H)};T.prototype.set_collisions=T.prototype.qd=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jd(b,a)};Object.defineProperty(T.prototype,"collisions",{get:T.prototype.Ga,set:T.prototype.qd});T.prototype.__destroy__=function(){Jc(this.H)};function Node(){throw"cannot construct a Node, no constructor in IDL";}Node.prototype=Object.create(k.prototype); +Node.prototype.constructor=Node;Node.prototype.I=Node;Node.J={};d.Node=Node;Node.prototype.get_m_x=Node.prototype.ed=function(){return m(Fe(this.H),r)};Node.prototype.set_m_x=Node.prototype.Pf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Me(b,a)};Object.defineProperty(Node.prototype,"m_x",{get:Node.prototype.ed,set:Node.prototype.Pf});Node.prototype.get_m_q=Node.prototype.wc=function(){return m(De(this.H),r)}; +Node.prototype.set_m_q=Node.prototype.ef=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ke(b,a)};Object.defineProperty(Node.prototype,"m_q",{get:Node.prototype.wc,set:Node.prototype.ef});Node.prototype.get_m_v=Node.prototype.Xc=function(){return m(Ee(this.H),r)};Node.prototype.set_m_v=Node.prototype.Hf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Le(b,a)};Object.defineProperty(Node.prototype,"m_v",{get:Node.prototype.Xc,set:Node.prototype.Hf}); +Node.prototype.get_m_f=Node.prototype.Ib=function(){return m(Ae(this.H),r)};Node.prototype.set_m_f=Node.prototype.re=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);He(b,a)};Object.defineProperty(Node.prototype,"m_f",{get:Node.prototype.Ib,set:Node.prototype.re});Node.prototype.get_m_n=Node.prototype.nc=function(){return m(Ce(this.H),r)};Node.prototype.set_m_n=Node.prototype.We=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Je(b,a)}; +Object.defineProperty(Node.prototype,"m_n",{get:Node.prototype.nc,set:Node.prototype.We});Node.prototype.get_m_im=Node.prototype.Xb=function(){return Be(this.H)};Node.prototype.set_m_im=Node.prototype.Ge=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ie(b,a)};Object.defineProperty(Node.prototype,"m_im",{get:Node.prototype.Xb,set:Node.prototype.Ge});Node.prototype.get_m_area=Node.prototype.jb=function(){return ze(this.H)}; +Node.prototype.set_m_area=Node.prototype.Td=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ge(b,a)};Object.defineProperty(Node.prototype,"m_area",{get:Node.prototype.jb,set:Node.prototype.Td});Node.prototype.__destroy__=function(){ye(this.H)};function CB(){this.H=vn();l(CB)[this.H]=this}CB.prototype=Object.create(k.prototype);CB.prototype.constructor=CB;CB.prototype.I=CB;CB.J={};d.btGhostPairCallback=CB;CB.prototype.__destroy__=function(){un(this.H)}; +function DB(){throw"cannot construct a btOverlappingPairCallback, no constructor in IDL";}DB.prototype=Object.create(k.prototype);DB.prototype.constructor=DB;DB.prototype.I=DB;DB.J={};d.btOverlappingPairCallback=DB;DB.prototype.__destroy__=function(){op(this.H)};function U(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=void 0===f?no(a,b,e):oo(a,b,e,f);l(U)[this.H]=this}U.prototype=Object.create(HA.prototype); +U.prototype.constructor=U;U.prototype.I=U;U.J={};d.btKinematicCharacterController=U;U.prototype.setUpAxis=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Co(b,a)};U.prototype.setWalkDirection=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Go(b,a)};U.prototype.setVelocityForTimeInterval=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Fo(e,a,b)};U.prototype.warp=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Io(b,a)}; +U.prototype.preStep=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);wo(b,a)};U.prototype.playerStep=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);vo(e,a,b)};U.prototype.setFallSpeed=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xo(b,a)};U.prototype.setJumpSpeed=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zo(b,a)};U.prototype.setMaxJumpHeight=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ao(b,a)}; +U.prototype.canJump=function(){return!!po(this.H)};U.prototype.jump=function(){to(this.H)};U.prototype.setGravity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yo(b,a)};U.prototype.getGravity=function(){return ro(this.H)};U.prototype.setMaxSlope=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bo(b,a)};U.prototype.getMaxSlope=function(){return so(this.H)};U.prototype.getGhostObject=function(){return m(qo(this.H),V)}; +U.prototype.setUseGhostSweepTest=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Eo(b,a)};U.prototype.onGround=function(){return!!uo(this.H)};U.prototype.setUpInterpolate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Do(b,a)};U.prototype.updateAction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Ho(e,a,b)};U.prototype.__destroy__=function(){mo(this.H)};function EB(){throw"cannot construct a btSoftBodyArray, no constructor in IDL";} +EB.prototype=Object.create(k.prototype);EB.prototype.constructor=EB;EB.prototype.I=EB;EB.J={};d.btSoftBodyArray=EB;EB.prototype.size=EB.prototype.size=function(){return Rt(this.H)};EB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Qt(b,a),R)};EB.prototype.__destroy__=function(){Pt(this.H)};function wB(){throw"cannot construct a btFaceArray, no constructor in IDL";}wB.prototype=Object.create(k.prototype);wB.prototype.constructor=wB;wB.prototype.I=wB;wB.J={}; +d.btFaceArray=wB;wB.prototype.size=wB.prototype.size=function(){return Ul(this.H)};wB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Tl(b,a),FB)};wB.prototype.__destroy__=function(){Sl(this.H)};function GB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=yw(a,b);l(GB)[this.H]=this}GB.prototype=Object.create(CA.prototype);GB.prototype.constructor=GB;GB.prototype.I=GB;GB.J={};d.btStaticPlaneShape=GB; +GB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bw(b,a)};GB.prototype.getLocalScaling=function(){return m(Aw(this.H),r)};GB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);zw(e,a,b)};GB.prototype.__destroy__=function(){xw(this.H)};function vA(){throw"cannot construct a btOverlappingPairCache, no constructor in IDL";}vA.prototype=Object.create(k.prototype);vA.prototype.constructor=vA; +vA.prototype.I=vA;vA.J={};d.btOverlappingPairCache=vA;vA.prototype.setInternalGhostPairCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);np(b,a)};vA.prototype.getNumOverlappingPairs=function(){return mp(this.H)};vA.prototype.__destroy__=function(){lp(this.H)};function cB(){throw"cannot construct a btIndexedMesh, no constructor in IDL";}cB.prototype=Object.create(k.prototype);cB.prototype.constructor=cB;cB.prototype.I=cB;cB.J={};d.btIndexedMesh=cB; +cB.prototype.get_m_numTriangles=cB.prototype.sc=function(){return ho(this.H)};cB.prototype.set_m_numTriangles=cB.prototype.af=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);io(b,a)};Object.defineProperty(cB.prototype,"m_numTriangles",{get:cB.prototype.sc,set:cB.prototype.af});cB.prototype.__destroy__=function(){go(this.H)}; +function W(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=Nv(a,b,e,f,h);l(W)[this.H]=this}W.prototype=Object.create(x.prototype);W.prototype.constructor=W;W.prototype.I=W;W.J={};d.btSoftRigidDynamicsWorld=W;W.prototype.addSoftBody=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Mv(f,a,b,e)}; +W.prototype.removeSoftBody=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);gw(b,a)};W.prototype.removeCollisionObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);dw(b,a)};W.prototype.getWorldInfo=function(){return m(aw(this.H),J)};W.prototype.getSoftBodyArray=function(){return m(Zv(this.H),EB)};W.prototype.getDispatcher=function(){return m(Wv(this.H),uA)}; +W.prototype.rayTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);bw(f,a,b,e)};W.prototype.getPairCache=function(){return m(Yv(this.H),vA)};W.prototype.getDispatchInfo=function(){return m(Vv(this.H),p)};W.prototype.addCollisionObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?Fv(f,a):void 0===e?Gv(f,a,b):Hv(f,a,b,e)}; +W.prototype.getBroadphase=function(){return m(Tv(this.H),wA)};W.prototype.convexSweepTest=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);Qv(n,a,b,e,f,h)};W.prototype.contactPairTest=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Ov(f,a,b,e)}; +W.prototype.contactTest=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Pv(e,a,b)};W.prototype.updateSingleAabb=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);pw(b,a)};W.prototype.setDebugDrawer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kw(b,a)};W.prototype.getDebugDrawer=function(){return m(Uv(this.H),xA)};W.prototype.debugDrawWorld=function(){Sv(this.H)}; +W.prototype.debugDrawObject=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Rv(f,a,b,e)};W.prototype.setGravity=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);lw(b,a)};W.prototype.getGravity=function(){return m(Xv(this.H),r)}; +W.prototype.addRigidBody=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);void 0===b?Kv(f,a):void 0===e?_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(f,a,b):Lv(f,a,b,e)};W.prototype.removeRigidBody=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fw(b,a)};W.prototype.addConstraint=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===b?Iv(e,a):Jv(e,a,b)}; +W.prototype.removeConstraint=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ew(b,a)};W.prototype.stepSimulation=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);return void 0===b?mw(f,a):void 0===e?nw(f,a,b):ow(f,a,b,e)};W.prototype.setContactAddedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hw(b,a)}; +W.prototype.setContactProcessedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);jw(b,a)};W.prototype.setContactDestroyedCallback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);iw(b,a)};W.prototype.addAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ev(b,a)};W.prototype.removeAction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);cw(b,a)};W.prototype.getSolverInfo=function(){return m($v(this.H),v)};W.prototype.__destroy__=function(){Dv(this.H)}; +function HB(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=am(a,b,e,f);l(HB)[this.H]=this}HB.prototype=Object.create(BA.prototype);HB.prototype.constructor=HB;HB.prototype.I=HB;HB.J={};d.btFixedConstraint=HB;HB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);bm(b,a)};HB.prototype.getBreakingImpulseThreshold=function(){return cm(this.H)}; +HB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);em(b,a)};HB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return dm(e,a,b)};HB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);fm(f,a,b,e)};HB.prototype.__destroy__=function(){$l(this.H)}; +function u(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=void 0===a?Fw():void 0===b?_emscripten_bind_btTransform_btTransform_1(a):Gw(a,b);l(u)[this.H]=this}u.prototype=Object.create(k.prototype);u.prototype.constructor=u;u.prototype.I=u;u.J={};d.btTransform=u;u.prototype.setIdentity=function(){Nw(this.H)};u.prototype.setOrigin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ow(b,a)}; +u.prototype.setRotation=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pw(b,a)};u.prototype.getOrigin=function(){return m(Iw(this.H),r)};u.prototype.getRotation=function(){return m(Jw(this.H),X)};u.prototype.getBasis=function(){return m(Hw(this.H),SA)};u.prototype.setFromOpenGLMatrix=function(a){var b=this.H;c.M();"object"==typeof a&&(a=sA(a));Mw(b,a)};u.prototype.inverse=u.prototype.inverse=function(){return m(Kw(this.H),u)}; +u.prototype.op_mul=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Lw(b,a),u)};u.prototype.__destroy__=function(){Ew(this.H)};function Y(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=nc(a,b);l(Y)[this.H]=this}Y.prototype=Object.create(z.prototype);Y.prototype.constructor=Y;Y.prototype.I=Y;Y.J={};d.ClosestRayResultCallback=Y;Y.prototype.hasHit=function(){return!!xc(this.H)}; +Y.prototype.get_m_rayFromWorld=Y.prototype.ma=function(){return m(vc(this.H),r)};Y.prototype.set_m_rayFromWorld=Y.prototype.ta=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ec(b,a)};Object.defineProperty(Y.prototype,"m_rayFromWorld",{get:Y.prototype.ma,set:Y.prototype.ta});Y.prototype.get_m_rayToWorld=Y.prototype.na=function(){return m(wc(this.H),r)};Y.prototype.set_m_rayToWorld=Y.prototype.ua=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Fc(b,a)}; +Object.defineProperty(Y.prototype,"m_rayToWorld",{get:Y.prototype.na,set:Y.prototype.ua});Y.prototype.get_m_hitNormalWorld=Y.prototype.U=function(){return m(tc(this.H),r)};Y.prototype.set_m_hitNormalWorld=Y.prototype.da=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cc(b,a)};Object.defineProperty(Y.prototype,"m_hitNormalWorld",{get:Y.prototype.U,set:Y.prototype.da});Y.prototype.get_m_hitPointWorld=Y.prototype.V=function(){return m(uc(this.H),r)}; +Y.prototype.set_m_hitPointWorld=Y.prototype.ea=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dc(b,a)};Object.defineProperty(Y.prototype,"m_hitPointWorld",{get:Y.prototype.V,set:Y.prototype.ea});Y.prototype.get_m_collisionFilterGroup=Y.prototype.K=function(){return qc(this.H)};Y.prototype.set_m_collisionFilterGroup=Y.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);zc(b,a)};Object.defineProperty(Y.prototype,"m_collisionFilterGroup",{get:Y.prototype.K,set:Y.prototype.N}); +Y.prototype.get_m_collisionFilterMask=Y.prototype.L=function(){return rc(this.H)};Y.prototype.set_m_collisionFilterMask=Y.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ac(b,a)};Object.defineProperty(Y.prototype,"m_collisionFilterMask",{get:Y.prototype.L,set:Y.prototype.O});Y.prototype.get_m_closestHitFraction=Y.prototype.P=function(){return pc(this.H)};Y.prototype.set_m_closestHitFraction=Y.prototype.R=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);yc(b,a)}; +Object.defineProperty(Y.prototype,"m_closestHitFraction",{get:Y.prototype.P,set:Y.prototype.R});Y.prototype.get_m_collisionObject=Y.prototype.S=function(){return m(sc(this.H),t)};Y.prototype.set_m_collisionObject=Y.prototype.aa=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bc(b,a)};Object.defineProperty(Y.prototype,"m_collisionObject",{get:Y.prototype.S,set:Y.prototype.aa});Y.prototype.__destroy__=function(){oc(this.H)}; +function IB(a){a&&"object"===typeof a&&(a=a.H);this.H=void 0===a?au():bu(a);l(IB)[this.H]=this}IB.prototype=Object.create(EA.prototype);IB.prototype.constructor=IB;IB.prototype.I=IB;IB.J={};d.btSoftBodyRigidBodyCollisionConfiguration=IB;IB.prototype.__destroy__=function(){$t(this.H)};function JB(){this.H=Gc();l(JB)[this.H]=this}JB.prototype=Object.create(QA.prototype);JB.prototype.constructor=JB;JB.prototype.I=JB;JB.J={};d.ConcreteContactResultCallback=JB; +JB.prototype.addSingleResult=function(a,b,e,f,h,n,B){var S=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);return Ic(S,a,b,e,f,h,n,B)};JB.prototype.__destroy__=function(){Hc(this.H)}; +function KB(a,b,e){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);this.H=void 0===e?Lf(a,b):Mf(a,b,e);l(KB)[this.H]=this}KB.prototype=Object.create(FA.prototype);KB.prototype.constructor=KB;KB.prototype.I=KB;KB.J={};d.btBvhTriangleMeshShape=KB;KB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pf(b,a)};KB.prototype.getLocalScaling=function(){return m(Of(this.H),r)}; +KB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Nf(e,a,b)};KB.prototype.__destroy__=function(){Kf(this.H)};function XA(){throw"cannot construct a btConstCollisionObjectArray, no constructor in IDL";}XA.prototype=Object.create(k.prototype);XA.prototype.constructor=XA;XA.prototype.I=XA;XA.J={};d.btConstCollisionObjectArray=XA;XA.prototype.size=XA.prototype.size=function(){return Bi(this.H)}; +XA.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Ai(b,a),t)};XA.prototype.__destroy__=function(){zi(this.H)};function LB(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=void 0===f?Et(a,b,e):void 0===h?_emscripten_bind_btSliderConstraint_btSliderConstraint_4(a,b,e,f):Ft(a,b,e,f,h);l(LB)[this.H]=this}LB.prototype=Object.create(BA.prototype); +LB.prototype.constructor=LB;LB.prototype.I=LB;LB.J={};d.btSliderConstraint=LB;LB.prototype.setLowerLinLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lt(b,a)};LB.prototype.setUpperLinLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ot(b,a)};LB.prototype.setLowerAngLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Kt(b,a)};LB.prototype.setUpperAngLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Nt(b,a)}; +LB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Gt(b,a)};LB.prototype.getBreakingImpulseThreshold=function(){return Ht(this.H)};LB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jt(b,a)};LB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return It(e,a,b)}; +LB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Mt(f,a,b,e)};LB.prototype.__destroy__=function(){Dt(this.H)};function V(){this.H=sp();l(V)[this.H]=this}V.prototype=Object.create(w.prototype);V.prototype.constructor=V;V.prototype.I=V;V.J={};d.btPairCachingGhostObject=V; +V.prototype.setAnisotropicFriction=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Kp(e,a,b)};V.prototype.getCollisionShape=function(){return m(wp(this.H),q)};V.prototype.setContactProcessingThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pp(b,a)};V.prototype.setActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jp(b,a)}; +V.prototype.forceActivationState=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);tp(b,a)};V.prototype.activate=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);void 0===a?qp(b):rp(b,a)};V.prototype.isActive=function(){return!!Fp(this.H)};V.prototype.isKinematicObject=function(){return!!Gp(this.H)};V.prototype.isStaticObject=function(){return!!Hp(this.H)};V.prototype.isStaticOrKinematicObject=function(){return!!Ip(this.H)};V.prototype.getRestitution=function(){return Ap(this.H)}; +V.prototype.getFriction=function(){return xp(this.H)};V.prototype.getRollingFriction=function(){return Bp(this.H)};V.prototype.setRestitution=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Rp(b,a)};V.prototype.setFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qp(b,a)};V.prototype.setRollingFriction=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Sp(b,a)};V.prototype.getWorldTransform=function(){return m(Ep(this.H),u)};V.prototype.getCollisionFlags=function(){return vp(this.H)}; +V.prototype.setCollisionFlags=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Np(b,a)};V.prototype.setWorldTransform=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vp(b,a)};V.prototype.setCollisionShape=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Op(b,a)};V.prototype.setCcdMotionThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Lp(b,a)};V.prototype.setCcdSweptSphereRadius=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Mp(b,a)}; +V.prototype.getUserIndex=function(){return Cp(this.H)};V.prototype.setUserIndex=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tp(b,a)};V.prototype.getUserPointer=function(){return m(Dp(this.H),yA)};V.prototype.setUserPointer=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Up(b,a)};V.prototype.getBroadphaseHandle=function(){return m(up(this.H),zA)};V.prototype.getNumOverlappingObjects=function(){return yp(this.H)}; +V.prototype.getOverlappingObject=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(zp(b,a),t)};V.prototype.__destroy__=function(){pp(this.H)};function E(){throw"cannot construct a btManifoldPoint, no constructor in IDL";}E.prototype=Object.create(k.prototype);E.prototype.constructor=E;E.prototype.I=E;E.J={};d.btManifoldPoint=E;E.prototype.getPositionWorldOnA=function(){return m(Mo(this.H),r)};E.prototype.getPositionWorldOnB=function(){return m(No(this.H),r)}; +E.prototype.getAppliedImpulse=function(){return Ko(this.H)};E.prototype.getDistance=function(){return Lo(this.H)};E.prototype.get_m_localPointA=E.prototype.ic=function(){return m(Oo(this.H),r)};E.prototype.set_m_localPointA=E.prototype.Re=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Uo(b,a)};Object.defineProperty(E.prototype,"m_localPointA",{get:E.prototype.ic,set:E.prototype.Re});E.prototype.get_m_localPointB=E.prototype.jc=function(){return m(Po(this.H),r)}; +E.prototype.set_m_localPointB=E.prototype.Se=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vo(b,a)};Object.defineProperty(E.prototype,"m_localPointB",{get:E.prototype.jc,set:E.prototype.Se});E.prototype.get_m_positionWorldOnB=E.prototype.vc=function(){return m(So(this.H),r)};E.prototype.set_m_positionWorldOnB=E.prototype.df=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yo(b,a)};Object.defineProperty(E.prototype,"m_positionWorldOnB",{get:E.prototype.vc,set:E.prototype.df}); +E.prototype.get_m_positionWorldOnA=E.prototype.uc=function(){return m(Ro(this.H),r)};E.prototype.set_m_positionWorldOnA=E.prototype.cf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Xo(b,a)};Object.defineProperty(E.prototype,"m_positionWorldOnA",{get:E.prototype.uc,set:E.prototype.cf});E.prototype.get_m_normalWorldOnB=E.prototype.qc=function(){return m(Qo(this.H),r)};E.prototype.set_m_normalWorldOnB=E.prototype.Ze=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Wo(b,a)}; +Object.defineProperty(E.prototype,"m_normalWorldOnB",{get:E.prototype.qc,set:E.prototype.Ze});E.prototype.get_m_userPersistentData=E.prototype.Wc=function(){return To(this.H)};E.prototype.set_m_userPersistentData=E.prototype.Gf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zo(b,a)};Object.defineProperty(E.prototype,"m_userPersistentData",{get:E.prototype.Wc,set:E.prototype.Gf});E.prototype.__destroy__=function(){Jo(this.H)}; +function MB(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=void 0===e?cq(a,b):void 0===f?_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a,b,e):dq(a,b,e,f);l(MB)[this.H]=this}MB.prototype=Object.create(BA.prototype);MB.prototype.constructor=MB;MB.prototype.I=MB;MB.J={};d.btPoint2PointConstraint=MB;MB.prototype.setPivotA=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);mq(b,a)}; +MB.prototype.setPivotB=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);nq(b,a)};MB.prototype.getPivotInA=function(){return m(hq(this.H),r)};MB.prototype.getPivotInB=function(){return m(iq(this.H),r)};MB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);eq(b,a)};MB.prototype.getBreakingImpulseThreshold=function(){return fq(this.H)};MB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);kq(b,a)}; +MB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return gq(e,a,b)};MB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);lq(f,a,b,e)};MB.prototype.get_m_setting=MB.prototype.Cc=function(){return m(jq(this.H),H)};MB.prototype.set_m_setting=MB.prototype.lf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);oq(b,a)}; +Object.defineProperty(MB.prototype,"m_setting",{get:MB.prototype.Cc,set:MB.prototype.lf});MB.prototype.__destroy__=function(){bq(this.H)};function NB(){this.H=Zt();l(NB)[this.H]=this}NB.prototype=Object.create(k.prototype);NB.prototype.constructor=NB;NB.prototype.I=NB;NB.J={};d.btSoftBodyHelpers=NB; +NB.prototype.CreateRope=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);return m(Xt(n,a,b,e,f,h),R)}; +NB.prototype.CreatePatch=function(a,b,e,f,h,n,B,S,ja){var Rb=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);S&&"object"===typeof S&&(S=S.H);ja&&"object"===typeof ja&&(ja=ja.H);return m(Wt(Rb,a,b,e,f,h,n,B,S,ja),R)}; +NB.prototype.CreatePatchUV=function(a,b,e,f,h,n,B,S,ja,Rb){var UB=this.H;c.M();a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);n&&"object"===typeof n&&(n=n.H);B&&"object"===typeof B&&(B=B.H);S&&"object"===typeof S&&(S=S.H);ja&&"object"===typeof ja&&(ja=ja.H);"object"==typeof Rb&&(Rb=sA(Rb));return m(Vt(UB,a,b,e,f,h,n,B,S,ja,Rb),R)}; +NB.prototype.CreateEllipsoid=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);return m(St(h,a,b,e,f),R)}; +NB.prototype.CreateFromTriMesh=function(a,b,e,f,h){var n=this.H;c.M();a&&"object"===typeof a&&(a=a.H);"object"==typeof b&&(b=sA(b));if("object"==typeof e&&"object"===typeof e){var B=c.ja(e,Ca);c.copy(e,Ca,B);e=B}f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);return m(Ut(n,a,b,e,f,h),R)}; +NB.prototype.CreateFromConvexHull=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);return m(Tt(h,a,b,e,f),R)};NB.prototype.__destroy__=function(){Yt(this.H)};function zA(){throw"cannot construct a btBroadphaseProxy, no constructor in IDL";}zA.prototype=Object.create(k.prototype);zA.prototype.constructor=zA;zA.prototype.I=zA;zA.J={};d.btBroadphaseProxy=zA; +zA.prototype.get_m_collisionFilterGroup=zA.prototype.K=function(){return Gf(this.H)};zA.prototype.set_m_collisionFilterGroup=zA.prototype.N=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);If(b,a)};Object.defineProperty(zA.prototype,"m_collisionFilterGroup",{get:zA.prototype.K,set:zA.prototype.N});zA.prototype.get_m_collisionFilterMask=zA.prototype.L=function(){return Hf(this.H)}; +zA.prototype.set_m_collisionFilterMask=zA.prototype.O=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jf(b,a)};Object.defineProperty(zA.prototype,"m_collisionFilterMask",{get:zA.prototype.L,set:zA.prototype.O});zA.prototype.__destroy__=function(){Ff(this.H)};function AB(){throw"cannot construct a tNodeArray, no constructor in IDL";}AB.prototype=Object.create(k.prototype);AB.prototype.constructor=AB;AB.prototype.I=AB;AB.J={};d.tNodeArray=AB;AB.prototype.size=AB.prototype.size=function(){return Zz(this.H)}; +AB.prototype.at=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Yz(b,a),Node)};AB.prototype.__destroy__=function(){Xz(this.H)};function OB(a){a&&"object"===typeof a&&(a=a.H);this.H=xf(a);l(OB)[this.H]=this}OB.prototype=Object.create(q.prototype);OB.prototype.constructor=OB;OB.prototype.I=OB;OB.J={};d.btBoxShape=OB;OB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cf(b,a)};OB.prototype.getMargin=function(){return Af(this.H)}; +OB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Bf(b,a)};OB.prototype.getLocalScaling=function(){return m(zf(this.H),r)};OB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);yf(e,a,b)};OB.prototype.__destroy__=function(){wf(this.H)};function FB(){throw"cannot construct a btFace, no constructor in IDL";}FB.prototype=Object.create(k.prototype);FB.prototype.constructor=FB;FB.prototype.I=FB; +FB.J={};d.btFace=FB;FB.prototype.get_m_indices=FB.prototype.Zb=function(){return m(Wl(this.H),BB)};FB.prototype.set_m_indices=FB.prototype.Ie=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yl(b,a)};Object.defineProperty(FB.prototype,"m_indices",{get:FB.prototype.Zb,set:FB.prototype.Ie});FB.prototype.get_m_plane=FB.prototype.tc=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return Xl(b,a)}; +FB.prototype.set_m_plane=FB.prototype.bf=function(a,b){var e=this.H;c.M();a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Zl(e,a,b)};Object.defineProperty(FB.prototype,"m_plane",{get:FB.prototype.tc,set:FB.prototype.bf});FB.prototype.__destroy__=function(){Vl(this.H)};function PB(){this.H=Rd();l(PB)[this.H]=this}PB.prototype=Object.create(xA.prototype);PB.prototype.constructor=PB;PB.prototype.I=PB;PB.J={};d.DebugDrawer=PB; +PB.prototype.drawLine=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Vd(f,a,b,e)};PB.prototype.drawContactPoint=function(a,b,e,f,h){var n=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);Ud(n,a,b,e,f,h)}; +PB.prototype.reportErrorWarning=function(a){var b=this.H;c.M();a=a&&"object"===typeof a?a.H:rA(a);Xd(b,a)};PB.prototype.draw3dText=function(a,b){var e=this.H;c.M();a&&"object"===typeof a&&(a=a.H);b=b&&"object"===typeof b?b.H:rA(b);Td(e,a,b)};PB.prototype.setDebugMode=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yd(b,a)};PB.prototype.getDebugMode=function(){return Wd(this.H)};PB.prototype.__destroy__=function(){Sd(this.H)}; +function QB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=Rf(a,b);l(QB)[this.H]=this}QB.prototype=Object.create(DA.prototype);QB.prototype.constructor=QB;QB.prototype.I=QB;QB.J={};d.btCapsuleShapeX=QB;QB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Zf(b,a)};QB.prototype.getMargin=function(){return Vf(this.H)};QB.prototype.getUpAxis=function(){return Xf(this.H)};QB.prototype.getRadius=function(){return Wf(this.H)}; +QB.prototype.getHalfHeight=function(){return Tf(this.H)};QB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Yf(b,a)};QB.prototype.getLocalScaling=function(){return m(Uf(this.H),r)};QB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Sf(e,a,b)};QB.prototype.__destroy__=function(){Qf(this.H)}; +function X(a,b,e,f){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);this.H=Bq(a,b,e,f);l(X)[this.H]=this}X.prototype=Object.create(JA.prototype);X.prototype.constructor=X;X.prototype.I=X;X.J={};d.btQuaternion=X;X.prototype.setValue=function(a,b,e,f){var h=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);Sq(h,a,b,e,f)}; +X.prototype.setEulerZYX=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Qq(f,a,b,e)};X.prototype.setRotation=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Rq(e,a,b)};X.prototype.normalize=X.prototype.normalize=function(){Jq(this.H)};X.prototype.length2=function(){return Hq(this.H)};X.prototype.length=X.prototype.length=function(){return Iq(this.H)}; +X.prototype.dot=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return Cq(b,a)};X.prototype.normalized=function(){return m(Kq(this.H),X)};X.prototype.getAxis=function(){return m(Fq(this.H),r)};X.prototype.inverse=X.prototype.inverse=function(){return m(Gq(this.H),X)};X.prototype.getAngle=function(){return Eq(this.H)};X.prototype.getAngleShortestPath=function(){return Dq(this.H)};X.prototype.angle=X.prototype.angle=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return Aq(b,a)}; +X.prototype.angleShortestPath=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return zq(b,a)};X.prototype.op_add=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Lq(b,a),X)};X.prototype.op_sub=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Pq(b,a),X)};X.prototype.op_mul=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Nq(b,a),X)};X.prototype.op_mulq=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Oq(b,a),X)}; +X.prototype.op_div=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);return m(Mq(b,a),X)};X.prototype.x=X.prototype.x=function(){return Yq(this.H)};X.prototype.y=X.prototype.y=function(){return Zq(this.H)};X.prototype.z=X.prototype.z=function(){return $q(this.H)};X.prototype.w=X.prototype.Aa=function(){return Xq(this.H)};X.prototype.setX=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Uq(b,a)};X.prototype.setY=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Vq(b,a)}; +X.prototype.setZ=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Wq(b,a)};X.prototype.setW=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Tq(b,a)};X.prototype.__destroy__=function(){yq(this.H)};function RB(a,b){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);this.H=ag(a,b);l(RB)[this.H]=this}RB.prototype=Object.create(DA.prototype);RB.prototype.constructor=RB;RB.prototype.I=RB;RB.J={};d.btCapsuleShapeZ=RB; +RB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ig(b,a)};RB.prototype.getMargin=function(){return eg(this.H)};RB.prototype.getUpAxis=function(){return gg(this.H)};RB.prototype.getRadius=function(){return fg(this.H)};RB.prototype.getHalfHeight=function(){return cg(this.H)};RB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);hg(b,a)};RB.prototype.getLocalScaling=function(){return m(dg(this.H),r)}; +RB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);bg(e,a,b)};RB.prototype.__destroy__=function(){$f(this.H)};function v(){throw"cannot construct a btContactSolverInfo, no constructor in IDL";}v.prototype=Object.create(k.prototype);v.prototype.constructor=v;v.prototype.I=v;v.J={};d.btContactSolverInfo=v;v.prototype.get_m_splitImpulse=v.prototype.Fc=function(){return!!Oi(this.H)}; +v.prototype.set_m_splitImpulse=v.prototype.pf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Ri(b,a)};Object.defineProperty(v.prototype,"m_splitImpulse",{get:v.prototype.Fc,set:v.prototype.pf});v.prototype.get_m_splitImpulsePenetrationThreshold=v.prototype.Gc=function(){return Ni(this.H)};v.prototype.set_m_splitImpulsePenetrationThreshold=v.prototype.qf=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Qi(b,a)}; +Object.defineProperty(v.prototype,"m_splitImpulsePenetrationThreshold",{get:v.prototype.Gc,set:v.prototype.qf});v.prototype.get_m_numIterations=v.prototype.rc=function(){return Mi(this.H)};v.prototype.set_m_numIterations=v.prototype.$e=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Pi(b,a)};Object.defineProperty(v.prototype,"m_numIterations",{get:v.prototype.rc,set:v.prototype.$e});v.prototype.__destroy__=function(){Li(this.H)}; +function SB(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=void 0===f?um(a,b,e):void 0===h?_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a,b,e,f):wm(a,b,e,f,h);l(SB)[this.H]=this}SB.prototype=Object.create(NA.prototype);SB.prototype.constructor=SB;SB.prototype.I=SB;SB.J={};d.btGeneric6DofSpringConstraint=SB; +SB.prototype.enableSpring=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);ym(e,a,b)};SB.prototype.setStiffness=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Mm(e,a,b)};SB.prototype.setDamping=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);Fm(e,a,b)}; +SB.prototype.setEquilibriumPoint=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);void 0===a?Gm(e):void 0===b?Hm(e,a):Im(e,a,b)};SB.prototype.setLinearLowerLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Jm(b,a)};SB.prototype.setLinearUpperLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Km(b,a)};SB.prototype.setAngularLowerLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Cm(b,a)}; +SB.prototype.setAngularUpperLimit=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Dm(b,a)};SB.prototype.getFrameOffsetA=function(){return m(Am(this.H),u)};SB.prototype.enableFeedback=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);xm(b,a)};SB.prototype.getBreakingImpulseThreshold=function(){return zm(this.H)};SB.prototype.setBreakingImpulseThreshold=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);Em(b,a)}; +SB.prototype.getParam=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);return Bm(e,a,b)};SB.prototype.setParam=function(a,b,e){var f=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);Lm(f,a,b,e)};SB.prototype.__destroy__=function(){tm(this.H)};function TB(a){a&&"object"===typeof a&&(a=a.H);this.H=rw(a);l(TB)[this.H]=this}TB.prototype=Object.create(q.prototype);TB.prototype.constructor=TB; +TB.prototype.I=TB;TB.J={};d.btSphereShape=TB;TB.prototype.setMargin=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ww(b,a)};TB.prototype.getMargin=function(){return uw(this.H)};TB.prototype.setLocalScaling=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);vw(b,a)};TB.prototype.getLocalScaling=function(){return m(tw(this.H),r)};TB.prototype.calculateLocalInertia=function(a,b){var e=this.H;a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);sw(e,a,b)}; +TB.prototype.__destroy__=function(){qw(this.H)};function Z(a,b,e,f,h){a&&"object"===typeof a&&(a=a.H);b&&"object"===typeof b&&(b=b.H);e&&"object"===typeof e&&(e=e.H);f&&"object"===typeof f&&(f=f.H);h&&"object"===typeof h&&(h=h.H);this.H=Zd(a,b,e,f,h);l(Z)[this.H]=this}Z.prototype=Object.create(k.prototype);Z.prototype.constructor=Z;Z.prototype.I=Z;Z.J={};d.LocalConvexResult=Z;Z.prototype.get_m_hitCollisionObject=Z.prototype.Qb=function(){return m(ae(this.H),t)}; +Z.prototype.set_m_hitCollisionObject=Z.prototype.ze=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);fe(b,a)};Object.defineProperty(Z.prototype,"m_hitCollisionObject",{get:Z.prototype.Qb,set:Z.prototype.ze});Z.prototype.get_m_localShapeInfo=Z.prototype.kc=function(){return m(ee(this.H),aB)};Z.prototype.set_m_localShapeInfo=Z.prototype.Te=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);je(b,a)};Object.defineProperty(Z.prototype,"m_localShapeInfo",{get:Z.prototype.kc,set:Z.prototype.Te}); +Z.prototype.get_m_hitNormalLocal=Z.prototype.Ub=function(){return m(ce(this.H),r)};Z.prototype.set_m_hitNormalLocal=Z.prototype.De=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);he(b,a)};Object.defineProperty(Z.prototype,"m_hitNormalLocal",{get:Z.prototype.Ub,set:Z.prototype.De});Z.prototype.get_m_hitPointLocal=Z.prototype.Wb=function(){return m(de(this.H),r)};Z.prototype.set_m_hitPointLocal=Z.prototype.Fe=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ie(b,a)}; +Object.defineProperty(Z.prototype,"m_hitPointLocal",{get:Z.prototype.Wb,set:Z.prototype.Fe});Z.prototype.get_m_hitFraction=Z.prototype.Rb=function(){return be(this.H)};Z.prototype.set_m_hitFraction=Z.prototype.Ae=function(a){var b=this.H;a&&"object"===typeof a&&(a=a.H);ge(b,a)};Object.defineProperty(Z.prototype,"m_hitFraction",{get:Z.prototype.Rb,set:Z.prototype.Ae});Z.prototype.__destroy__=function(){$d(this.H)}; +(function(){function a(){d.BT_CONSTRAINT_ERP=gA();d.BT_CONSTRAINT_STOP_ERP=iA();d.BT_CONSTRAINT_CFM=fA();d.BT_CONSTRAINT_STOP_CFM=hA();d.PHY_FLOAT=bA();d.PHY_DOUBLE=$z();d.PHY_INTEGER=cA();d.PHY_SHORT=dA();d.PHY_FIXEDPOINT88=aA();d.PHY_UCHAR=eA()}La?a():Ja.unshift(a)})();this.Ammo=d; + + + + return Ammo +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = Ammo; + else if (typeof define === 'function' && define['amd']) + define([], function() { return Ammo; }); + else if (typeof exports === 'object') + exports["Ammo"] = Ammo; + \ No newline at end of file diff --git a/lib/ammo.wasm.js b/lib/ammo.wasm.js new file mode 100644 index 0000000..a6a332c --- /dev/null +++ b/lib/ammo.wasm.js @@ -0,0 +1,662 @@ + + // This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed. + +var Ammo = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + return ( +function(Ammo) { + Ammo = Ammo || {}; + +var b;var f;f||(f=typeof Ammo !== 'undefined' ? Ammo : {});var aa={},ba;for(ba in f)f.hasOwnProperty(ba)&&(aa[ba]=f[ba]);var ca=!1,ea=!1,fa=!1,ha=!1,ia=!1;ca="object"===typeof window;ea="function"===typeof importScripts;fa=(ha="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node)&&!ca&&!ea;ia=!ca&&!fa&&!ea;var ja="",ka,la; +if(fa){ja=__dirname+"/";var ma,na;ka=function(a,c){ma||(ma=require("fs"));na||(na=require("path"));a=na.normalize(a);a=ma.readFileSync(a);return c?a:a.toString()};la=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1=e);)++d;if(16g?e+=String.fromCharCode(g):(g-=65536,e+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else e+=String.fromCharCode(g)}return e}"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le"); +var buffer,xa,ya,za,Aa,Ba=f.TOTAL_MEMORY||67108864;if(ta=f.wasmMemory?f.wasmMemory:new WebAssembly.Memory({initial:Ba/65536,maximum:Ba/65536}))buffer=ta.buffer;Ba=buffer.byteLength;var Ca=buffer;buffer=Ca;f.HEAP8=xa=new Int8Array(Ca);f.HEAP16=new Int16Array(Ca);f.HEAP32=za=new Int32Array(Ca);f.HEAPU8=ya=new Uint8Array(Ca);f.HEAPU16=new Uint16Array(Ca);f.HEAPU32=new Uint32Array(Ca);f.HEAPF32=Aa=new Float32Array(Ca);f.HEAPF64=new Float64Array(Ca);za[7540]=5273072; +function Da(a){for(;0>2]}var $a={};function ab(){oa("OOM")} +var bb=f.asm({},{b:oa,v:function(){ua=!0;throw"Pure virtual function called!";},f:function(a){f.___errno_location&&(za[f.___errno_location()>>2]=a);return a},l:function(a,c){Ya=c;try{return $a.Py(),Za(),Za(),Za(),Za(),0}catch(d){return oa(d),-d.Ny}},e:function(a,c){Ya=c;try{var d=Za(),e=Za(),g=Za();for(c=a=0;c>2],A=za[e+(8*c+4)>>2],S=0;S>2]=c/1E3|0;za[a+4>>2]=c%1E3*1E3|0;return 0},o:Ka,n:La,d:function(){oa("trap!")},m:ab,a:30160},buffer);f.asm=bb; +var Wa=f.__GLOBAL__sub_I_btQuickprof_cpp=function(){return f.asm.w.apply(null,arguments)},cb=f._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=function(){return f.asm.x.apply(null,arguments)},db=f._emscripten_bind_AllHitsRayResultCallback___destroy___0=function(){return f.asm.y.apply(null,arguments)},eb=f._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=function(){return f.asm.z.apply(null,arguments)},fb=f._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0= +function(){return f.asm.A.apply(null,arguments)},gb=f._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=function(){return f.asm.B.apply(null,arguments)},hb=f._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=function(){return f.asm.C.apply(null,arguments)},ib=f._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=function(){return f.asm.D.apply(null,arguments)},jb=f._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=function(){return f.asm.E.apply(null, +arguments)},kb=f._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=function(){return f.asm.F.apply(null,arguments)},lb=f._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=function(){return f.asm.G.apply(null,arguments)},mb=f._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=function(){return f.asm.H.apply(null,arguments)},ob=f._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=function(){return f.asm.I.apply(null,arguments)},pb=f._emscripten_bind_AllHitsRayResultCallback_hasHit_0= +function(){return f.asm.J.apply(null,arguments)},qb=f._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=function(){return f.asm.K.apply(null,arguments)},rb=f._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=function(){return f.asm.L.apply(null,arguments)},sb=f._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=function(){return f.asm.M.apply(null,arguments)},tb=f._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=function(){return f.asm.N.apply(null, +arguments)},ub=f._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=function(){return f.asm.O.apply(null,arguments)},vb=f._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=function(){return f.asm.P.apply(null,arguments)},wb=f._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=function(){return f.asm.Q.apply(null,arguments)},xb=f._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=function(){return f.asm.R.apply(null,arguments)},yb=f._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1= +function(){return f.asm.S.apply(null,arguments)},zb=f._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=function(){return f.asm.T.apply(null,arguments)},Ab=f._emscripten_bind_Anchor___destroy___0=function(){return f.asm.U.apply(null,arguments)},Bb=f._emscripten_bind_Anchor_get_m_body_0=function(){return f.asm.V.apply(null,arguments)},Cb=f._emscripten_bind_Anchor_get_m_c0_0=function(){return f.asm.W.apply(null,arguments)},Db=f._emscripten_bind_Anchor_get_m_c1_0=function(){return f.asm.X.apply(null, +arguments)},Eb=f._emscripten_bind_Anchor_get_m_c2_0=function(){return f.asm.Y.apply(null,arguments)},Fb=f._emscripten_bind_Anchor_get_m_influence_0=function(){return f.asm.Z.apply(null,arguments)},Gb=f._emscripten_bind_Anchor_get_m_local_0=function(){return f.asm._.apply(null,arguments)},Hb=f._emscripten_bind_Anchor_get_m_node_0=function(){return f.asm.$.apply(null,arguments)},Ib=f._emscripten_bind_Anchor_set_m_body_1=function(){return f.asm.aa.apply(null,arguments)},Jb=f._emscripten_bind_Anchor_set_m_c0_1= +function(){return f.asm.ba.apply(null,arguments)},Kb=f._emscripten_bind_Anchor_set_m_c1_1=function(){return f.asm.ca.apply(null,arguments)},Lb=f._emscripten_bind_Anchor_set_m_c2_1=function(){return f.asm.da.apply(null,arguments)},Mb=f._emscripten_bind_Anchor_set_m_influence_1=function(){return f.asm.ea.apply(null,arguments)},Nb=f._emscripten_bind_Anchor_set_m_local_1=function(){return f.asm.fa.apply(null,arguments)},Ob=f._emscripten_bind_Anchor_set_m_node_1=function(){return f.asm.ga.apply(null,arguments)}, +Pb=f._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=function(){return f.asm.ha.apply(null,arguments)},Qb=f._emscripten_bind_ClosestConvexResultCallback___destroy___0=function(){return f.asm.ia.apply(null,arguments)},Rb=f._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=function(){return f.asm.ja.apply(null,arguments)},Sb=f._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=function(){return f.asm.ka.apply(null,arguments)},Tb= +f._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=function(){return f.asm.la.apply(null,arguments)},Ub=f._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=function(){return f.asm.ma.apply(null,arguments)},Vb=f._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=function(){return f.asm.na.apply(null,arguments)},Wb=f._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=function(){return f.asm.oa.apply(null,arguments)},Xb=f._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0= +function(){return f.asm.pa.apply(null,arguments)},Yb=f._emscripten_bind_ClosestConvexResultCallback_hasHit_0=function(){return f.asm.qa.apply(null,arguments)},Zb=f._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=function(){return f.asm.ra.apply(null,arguments)},ac=f._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=function(){return f.asm.sa.apply(null,arguments)},bc=f._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=function(){return f.asm.ta.apply(null, +arguments)},cc=f._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=function(){return f.asm.ua.apply(null,arguments)},dc=f._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=function(){return f.asm.va.apply(null,arguments)},ec=f._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=function(){return f.asm.wa.apply(null,arguments)},fc=f._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=function(){return f.asm.xa.apply(null,arguments)}, +hc=f._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=function(){return f.asm.ya.apply(null,arguments)},ic=f._emscripten_bind_ClosestRayResultCallback___destroy___0=function(){return f.asm.za.apply(null,arguments)},jc=f._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=function(){return f.asm.Aa.apply(null,arguments)},kc=f._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=function(){return f.asm.Ba.apply(null,arguments)},lc=f._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0= +function(){return f.asm.Ca.apply(null,arguments)},mc=f._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=function(){return f.asm.Da.apply(null,arguments)},nc=f._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=function(){return f.asm.Ea.apply(null,arguments)},oc=f._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=function(){return f.asm.Fa.apply(null,arguments)},pc=f._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=function(){return f.asm.Ga.apply(null, +arguments)},qc=f._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=function(){return f.asm.Ha.apply(null,arguments)},rc=f._emscripten_bind_ClosestRayResultCallback_hasHit_0=function(){return f.asm.Ia.apply(null,arguments)},sc=f._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=function(){return f.asm.Ja.apply(null,arguments)},tc=f._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=function(){return f.asm.Ka.apply(null,arguments)},uc=f._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1= +function(){return f.asm.La.apply(null,arguments)},vc=f._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=function(){return f.asm.Ma.apply(null,arguments)},wc=f._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=function(){return f.asm.Na.apply(null,arguments)},xc=f._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=function(){return f.asm.Oa.apply(null,arguments)},yc=f._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=function(){return f.asm.Pa.apply(null, +arguments)},zc=f._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=function(){return f.asm.Qa.apply(null,arguments)},Ac=f._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=function(){return f.asm.Ra.apply(null,arguments)},Bc=f._emscripten_bind_ConcreteContactResultCallback___destroy___0=function(){return f.asm.Sa.apply(null,arguments)},Cc=f._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=function(){return f.asm.Ta.apply(null,arguments)},Dc= +f._emscripten_bind_Config___destroy___0=function(){return f.asm.Ua.apply(null,arguments)},Ec=f._emscripten_bind_Config_get_citerations_0=function(){return f.asm.Va.apply(null,arguments)},Fc=f._emscripten_bind_Config_get_collisions_0=function(){return f.asm.Wa.apply(null,arguments)},Gc=f._emscripten_bind_Config_get_diterations_0=function(){return f.asm.Xa.apply(null,arguments)},Hc=f._emscripten_bind_Config_get_kAHR_0=function(){return f.asm.Ya.apply(null,arguments)},Ic=f._emscripten_bind_Config_get_kCHR_0= +function(){return f.asm.Za.apply(null,arguments)},Jc=f._emscripten_bind_Config_get_kDF_0=function(){return f.asm._a.apply(null,arguments)},Kc=f._emscripten_bind_Config_get_kDG_0=function(){return f.asm.$a.apply(null,arguments)},Lc=f._emscripten_bind_Config_get_kDP_0=function(){return f.asm.ab.apply(null,arguments)},Mc=f._emscripten_bind_Config_get_kKHR_0=function(){return f.asm.bb.apply(null,arguments)},Nc=f._emscripten_bind_Config_get_kLF_0=function(){return f.asm.cb.apply(null,arguments)},Oc=f._emscripten_bind_Config_get_kMT_0= +function(){return f.asm.db.apply(null,arguments)},Pc=f._emscripten_bind_Config_get_kPR_0=function(){return f.asm.eb.apply(null,arguments)},Qc=f._emscripten_bind_Config_get_kSHR_0=function(){return f.asm.fb.apply(null,arguments)},Rc=f._emscripten_bind_Config_get_kSKHR_CL_0=function(){return f.asm.gb.apply(null,arguments)},Sc=f._emscripten_bind_Config_get_kSK_SPLT_CL_0=function(){return f.asm.hb.apply(null,arguments)},Tc=f._emscripten_bind_Config_get_kSRHR_CL_0=function(){return f.asm.ib.apply(null, +arguments)},Uc=f._emscripten_bind_Config_get_kSR_SPLT_CL_0=function(){return f.asm.jb.apply(null,arguments)},Vc=f._emscripten_bind_Config_get_kSSHR_CL_0=function(){return f.asm.kb.apply(null,arguments)},Wc=f._emscripten_bind_Config_get_kSS_SPLT_CL_0=function(){return f.asm.lb.apply(null,arguments)},Xc=f._emscripten_bind_Config_get_kVCF_0=function(){return f.asm.mb.apply(null,arguments)},Yc=f._emscripten_bind_Config_get_kVC_0=function(){return f.asm.nb.apply(null,arguments)},Zc=f._emscripten_bind_Config_get_maxvolume_0= +function(){return f.asm.ob.apply(null,arguments)},$c=f._emscripten_bind_Config_get_piterations_0=function(){return f.asm.pb.apply(null,arguments)},ad=f._emscripten_bind_Config_get_timescale_0=function(){return f.asm.qb.apply(null,arguments)},bd=f._emscripten_bind_Config_get_viterations_0=function(){return f.asm.rb.apply(null,arguments)},cd=f._emscripten_bind_Config_set_citerations_1=function(){return f.asm.sb.apply(null,arguments)},dd=f._emscripten_bind_Config_set_collisions_1=function(){return f.asm.tb.apply(null, +arguments)},ed=f._emscripten_bind_Config_set_diterations_1=function(){return f.asm.ub.apply(null,arguments)},fd=f._emscripten_bind_Config_set_kAHR_1=function(){return f.asm.vb.apply(null,arguments)},gd=f._emscripten_bind_Config_set_kCHR_1=function(){return f.asm.wb.apply(null,arguments)},hd=f._emscripten_bind_Config_set_kDF_1=function(){return f.asm.xb.apply(null,arguments)},id=f._emscripten_bind_Config_set_kDG_1=function(){return f.asm.yb.apply(null,arguments)},jd=f._emscripten_bind_Config_set_kDP_1= +function(){return f.asm.zb.apply(null,arguments)},kd=f._emscripten_bind_Config_set_kKHR_1=function(){return f.asm.Ab.apply(null,arguments)},ld=f._emscripten_bind_Config_set_kLF_1=function(){return f.asm.Bb.apply(null,arguments)},md=f._emscripten_bind_Config_set_kMT_1=function(){return f.asm.Cb.apply(null,arguments)},nd=f._emscripten_bind_Config_set_kPR_1=function(){return f.asm.Db.apply(null,arguments)},od=f._emscripten_bind_Config_set_kSHR_1=function(){return f.asm.Eb.apply(null,arguments)},pd=f._emscripten_bind_Config_set_kSKHR_CL_1= +function(){return f.asm.Fb.apply(null,arguments)},qd=f._emscripten_bind_Config_set_kSK_SPLT_CL_1=function(){return f.asm.Gb.apply(null,arguments)},rd=f._emscripten_bind_Config_set_kSRHR_CL_1=function(){return f.asm.Hb.apply(null,arguments)},sd=f._emscripten_bind_Config_set_kSR_SPLT_CL_1=function(){return f.asm.Ib.apply(null,arguments)},td=f._emscripten_bind_Config_set_kSSHR_CL_1=function(){return f.asm.Jb.apply(null,arguments)},ud=f._emscripten_bind_Config_set_kSS_SPLT_CL_1=function(){return f.asm.Kb.apply(null, +arguments)},vd=f._emscripten_bind_Config_set_kVCF_1=function(){return f.asm.Lb.apply(null,arguments)},wd=f._emscripten_bind_Config_set_kVC_1=function(){return f.asm.Mb.apply(null,arguments)},xd=f._emscripten_bind_Config_set_maxvolume_1=function(){return f.asm.Nb.apply(null,arguments)},yd=f._emscripten_bind_Config_set_piterations_1=function(){return f.asm.Ob.apply(null,arguments)},zd=f._emscripten_bind_Config_set_timescale_1=function(){return f.asm.Pb.apply(null,arguments)},Ad=f._emscripten_bind_Config_set_viterations_1= +function(){return f.asm.Qb.apply(null,arguments)},Bd=f._emscripten_bind_ContactResultCallback___destroy___0=function(){return f.asm.Rb.apply(null,arguments)},Cd=f._emscripten_bind_ContactResultCallback_addSingleResult_7=function(){return f.asm.Sb.apply(null,arguments)},Dd=f._emscripten_bind_ConvexResultCallback___destroy___0=function(){return f.asm.Tb.apply(null,arguments)},Ed=f._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=function(){return f.asm.Ub.apply(null,arguments)},Fd=f._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0= +function(){return f.asm.Vb.apply(null,arguments)},Gd=f._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=function(){return f.asm.Wb.apply(null,arguments)},Hd=f._emscripten_bind_ConvexResultCallback_hasHit_0=function(){return f.asm.Xb.apply(null,arguments)},Id=f._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=function(){return f.asm.Yb.apply(null,arguments)},Jd=f._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=function(){return f.asm.Zb.apply(null, +arguments)},Kd=f._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=function(){return f.asm._b.apply(null,arguments)},Ld=f._emscripten_bind_DebugDrawer_DebugDrawer_0=function(){return f.asm.$b.apply(null,arguments)},Md=f._emscripten_bind_DebugDrawer___destroy___0=function(){return f.asm.ac.apply(null,arguments)},Nd=f._emscripten_bind_DebugDrawer_draw3dText_2=function(){return f.asm.bc.apply(null,arguments)},Od=f._emscripten_bind_DebugDrawer_drawContactPoint_5=function(){return f.asm.cc.apply(null, +arguments)},Pd=f._emscripten_bind_DebugDrawer_drawLine_3=function(){return f.asm.dc.apply(null,arguments)},Qd=f._emscripten_bind_DebugDrawer_getDebugMode_0=function(){return f.asm.ec.apply(null,arguments)},Rd=f._emscripten_bind_DebugDrawer_reportErrorWarning_1=function(){return f.asm.fc.apply(null,arguments)},Sd=f._emscripten_bind_DebugDrawer_setDebugMode_1=function(){return f.asm.gc.apply(null,arguments)},Td=f._emscripten_bind_LocalConvexResult_LocalConvexResult_5=function(){return f.asm.hc.apply(null, +arguments)},Ud=f._emscripten_bind_LocalConvexResult___destroy___0=function(){return f.asm.ic.apply(null,arguments)},Vd=f._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=function(){return f.asm.jc.apply(null,arguments)},Wd=f._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=function(){return f.asm.kc.apply(null,arguments)},Xd=f._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=function(){return f.asm.lc.apply(null,arguments)},Yd=f._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0= +function(){return f.asm.mc.apply(null,arguments)},Zd=f._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=function(){return f.asm.nc.apply(null,arguments)},$d=f._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=function(){return f.asm.oc.apply(null,arguments)},ae=f._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=function(){return f.asm.pc.apply(null,arguments)},be=f._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=function(){return f.asm.qc.apply(null,arguments)}, +ce=f._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=function(){return f.asm.rc.apply(null,arguments)},de=f._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=function(){return f.asm.sc.apply(null,arguments)},ee=f._emscripten_bind_LocalShapeInfo___destroy___0=function(){return f.asm.tc.apply(null,arguments)},fe=f._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=function(){return f.asm.uc.apply(null,arguments)},ge=f._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=function(){return f.asm.vc.apply(null, +arguments)},he=f._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=function(){return f.asm.wc.apply(null,arguments)},ie=f._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=function(){return f.asm.xc.apply(null,arguments)},je=f._emscripten_bind_Material___destroy___0=function(){return f.asm.yc.apply(null,arguments)},ke=f._emscripten_bind_Material_get_m_flags_0=function(){return f.asm.zc.apply(null,arguments)},le=f._emscripten_bind_Material_get_m_kAST_0=function(){return f.asm.Ac.apply(null,arguments)}, +me=f._emscripten_bind_Material_get_m_kLST_0=function(){return f.asm.Bc.apply(null,arguments)},ne=f._emscripten_bind_Material_get_m_kVST_0=function(){return f.asm.Cc.apply(null,arguments)},oe=f._emscripten_bind_Material_set_m_flags_1=function(){return f.asm.Dc.apply(null,arguments)},pe=f._emscripten_bind_Material_set_m_kAST_1=function(){return f.asm.Ec.apply(null,arguments)},qe=f._emscripten_bind_Material_set_m_kLST_1=function(){return f.asm.Fc.apply(null,arguments)},re=f._emscripten_bind_Material_set_m_kVST_1= +function(){return f.asm.Gc.apply(null,arguments)},se=f._emscripten_bind_Node___destroy___0=function(){return f.asm.Hc.apply(null,arguments)},te=f._emscripten_bind_Node_get_m_area_0=function(){return f.asm.Ic.apply(null,arguments)},ue=f._emscripten_bind_Node_get_m_f_0=function(){return f.asm.Jc.apply(null,arguments)},ve=f._emscripten_bind_Node_get_m_im_0=function(){return f.asm.Kc.apply(null,arguments)},we=f._emscripten_bind_Node_get_m_n_0=function(){return f.asm.Lc.apply(null,arguments)},xe=f._emscripten_bind_Node_get_m_q_0= +function(){return f.asm.Mc.apply(null,arguments)},ye=f._emscripten_bind_Node_get_m_v_0=function(){return f.asm.Nc.apply(null,arguments)},ze=f._emscripten_bind_Node_get_m_x_0=function(){return f.asm.Oc.apply(null,arguments)},Ae=f._emscripten_bind_Node_set_m_area_1=function(){return f.asm.Pc.apply(null,arguments)},Be=f._emscripten_bind_Node_set_m_f_1=function(){return f.asm.Qc.apply(null,arguments)},Ce=f._emscripten_bind_Node_set_m_im_1=function(){return f.asm.Rc.apply(null,arguments)},De=f._emscripten_bind_Node_set_m_n_1= +function(){return f.asm.Sc.apply(null,arguments)},Ee=f._emscripten_bind_Node_set_m_q_1=function(){return f.asm.Tc.apply(null,arguments)},Fe=f._emscripten_bind_Node_set_m_v_1=function(){return f.asm.Uc.apply(null,arguments)},Ge=f._emscripten_bind_Node_set_m_x_1=function(){return f.asm.Vc.apply(null,arguments)},He=f._emscripten_bind_RayResultCallback___destroy___0=function(){return f.asm.Wc.apply(null,arguments)},Ie=f._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=function(){return f.asm.Xc.apply(null, +arguments)},Je=f._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=function(){return f.asm.Yc.apply(null,arguments)},Ke=f._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=function(){return f.asm.Zc.apply(null,arguments)},Le=f._emscripten_bind_RayResultCallback_get_m_collisionObject_0=function(){return f.asm._c.apply(null,arguments)},Me=f._emscripten_bind_RayResultCallback_hasHit_0=function(){return f.asm.$c.apply(null,arguments)},Ne=f._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1= +function(){return f.asm.ad.apply(null,arguments)},Oe=f._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=function(){return f.asm.bd.apply(null,arguments)},Pe=f._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=function(){return f.asm.cd.apply(null,arguments)},Qe=f._emscripten_bind_RayResultCallback_set_m_collisionObject_1=function(){return f.asm.dd.apply(null,arguments)},Re=f._emscripten_bind_RaycastInfo___destroy___0=function(){return f.asm.ed.apply(null,arguments)},Se= +f._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=function(){return f.asm.fd.apply(null,arguments)},Te=f._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=function(){return f.asm.gd.apply(null,arguments)},Ue=f._emscripten_bind_RaycastInfo_get_m_groundObject_0=function(){return f.asm.hd.apply(null,arguments)},Ve=f._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=function(){return f.asm.id.apply(null,arguments)},We=f._emscripten_bind_RaycastInfo_get_m_isInContact_0=function(){return f.asm.jd.apply(null, +arguments)},Xe=f._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=function(){return f.asm.kd.apply(null,arguments)},Ye=f._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=function(){return f.asm.ld.apply(null,arguments)},Ze=f._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=function(){return f.asm.md.apply(null,arguments)},$e=f._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=function(){return f.asm.nd.apply(null,arguments)},af=f._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=function(){return f.asm.od.apply(null, +arguments)},bf=f._emscripten_bind_RaycastInfo_set_m_groundObject_1=function(){return f.asm.pd.apply(null,arguments)},cf=f._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=function(){return f.asm.qd.apply(null,arguments)},df=f._emscripten_bind_RaycastInfo_set_m_isInContact_1=function(){return f.asm.rd.apply(null,arguments)},ef=f._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=function(){return f.asm.sd.apply(null,arguments)},ff=f._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=function(){return f.asm.td.apply(null, +arguments)},gf=f._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=function(){return f.asm.ud.apply(null,arguments)},hf=f._emscripten_bind_VoidPtr___destroy___0=function(){return f.asm.vd.apply(null,arguments)},jf=f._emscripten_bind_btActionInterface___destroy___0=function(){return f.asm.wd.apply(null,arguments)},kf=f._emscripten_bind_btActionInterface_updateAction_2=function(){return f.asm.xd.apply(null,arguments)},lf=f._emscripten_bind_btAxisSweep3___destroy___0=function(){return f.asm.yd.apply(null, +arguments)},mf=f._emscripten_bind_btAxisSweep3_btAxisSweep3_2=function(){return f.asm.zd.apply(null,arguments)},nf=f._emscripten_bind_btAxisSweep3_btAxisSweep3_3=function(){return f.asm.Ad.apply(null,arguments)},of=f._emscripten_bind_btAxisSweep3_btAxisSweep3_4=function(){return f.asm.Bd.apply(null,arguments)},pf=f._emscripten_bind_btAxisSweep3_btAxisSweep3_5=function(){return f.asm.Cd.apply(null,arguments)},qf=f._emscripten_bind_btBoxShape___destroy___0=function(){return f.asm.Dd.apply(null,arguments)}, +rf=f._emscripten_bind_btBoxShape_btBoxShape_1=function(){return f.asm.Ed.apply(null,arguments)},sf=f._emscripten_bind_btBoxShape_calculateLocalInertia_2=function(){return f.asm.Fd.apply(null,arguments)},tf=f._emscripten_bind_btBoxShape_getLocalScaling_0=function(){return f.asm.Gd.apply(null,arguments)},uf=f._emscripten_bind_btBoxShape_getMargin_0=function(){return f.asm.Hd.apply(null,arguments)},vf=f._emscripten_bind_btBoxShape_setLocalScaling_1=function(){return f.asm.Id.apply(null,arguments)},wf= +f._emscripten_bind_btBoxShape_setMargin_1=function(){return f.asm.Jd.apply(null,arguments)},xf=f._emscripten_bind_btBroadphaseInterface___destroy___0=function(){return f.asm.Kd.apply(null,arguments)},yf=f._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=function(){return f.asm.Ld.apply(null,arguments)},zf=f._emscripten_bind_btBroadphaseProxy___destroy___0=function(){return f.asm.Md.apply(null,arguments)},Af=f._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=function(){return f.asm.Nd.apply(null, +arguments)},Bf=f._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=function(){return f.asm.Od.apply(null,arguments)},Cf=f._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=function(){return f.asm.Pd.apply(null,arguments)},Df=f._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=function(){return f.asm.Qd.apply(null,arguments)},Ef=f._emscripten_bind_btBvhTriangleMeshShape___destroy___0=function(){return f.asm.Rd.apply(null,arguments)},Ff=f._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2= +function(){return f.asm.Sd.apply(null,arguments)},Gf=f._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=function(){return f.asm.Td.apply(null,arguments)},Hf=f._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=function(){return f.asm.Ud.apply(null,arguments)},If=f._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=function(){return f.asm.Vd.apply(null,arguments)},Jf=f._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=function(){return f.asm.Wd.apply(null, +arguments)},Kf=f._emscripten_bind_btCapsuleShapeX___destroy___0=function(){return f.asm.Xd.apply(null,arguments)},Lf=f._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=function(){return f.asm.Yd.apply(null,arguments)},Mf=f._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=function(){return f.asm.Zd.apply(null,arguments)},Nf=f._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=function(){return f.asm._d.apply(null,arguments)},Of=f._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=function(){return f.asm.$d.apply(null, +arguments)},Pf=f._emscripten_bind_btCapsuleShapeX_getMargin_0=function(){return f.asm.ae.apply(null,arguments)},Qf=f._emscripten_bind_btCapsuleShapeX_getRadius_0=function(){return f.asm.be.apply(null,arguments)},Rf=f._emscripten_bind_btCapsuleShapeX_getUpAxis_0=function(){return f.asm.ce.apply(null,arguments)},Sf=f._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=function(){return f.asm.de.apply(null,arguments)},Tf=f._emscripten_bind_btCapsuleShapeX_setMargin_1=function(){return f.asm.ee.apply(null, +arguments)},Uf=f._emscripten_bind_btCapsuleShapeZ___destroy___0=function(){return f.asm.fe.apply(null,arguments)},Vf=f._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=function(){return f.asm.ge.apply(null,arguments)},Wf=f._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=function(){return f.asm.he.apply(null,arguments)},Xf=f._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=function(){return f.asm.ie.apply(null,arguments)},Yf=f._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=function(){return f.asm.je.apply(null, +arguments)},Zf=f._emscripten_bind_btCapsuleShapeZ_getMargin_0=function(){return f.asm.ke.apply(null,arguments)},$f=f._emscripten_bind_btCapsuleShapeZ_getRadius_0=function(){return f.asm.le.apply(null,arguments)},ag=f._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=function(){return f.asm.me.apply(null,arguments)},bg=f._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=function(){return f.asm.ne.apply(null,arguments)},cg=f._emscripten_bind_btCapsuleShapeZ_setMargin_1=function(){return f.asm.oe.apply(null, +arguments)},dg=f._emscripten_bind_btCapsuleShape___destroy___0=function(){return f.asm.pe.apply(null,arguments)},eg=f._emscripten_bind_btCapsuleShape_btCapsuleShape_2=function(){return f.asm.qe.apply(null,arguments)},fg=f._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=function(){return f.asm.re.apply(null,arguments)},gg=f._emscripten_bind_btCapsuleShape_getHalfHeight_0=function(){return f.asm.se.apply(null,arguments)},hg=f._emscripten_bind_btCapsuleShape_getLocalScaling_0=function(){return f.asm.te.apply(null, +arguments)},ig=f._emscripten_bind_btCapsuleShape_getMargin_0=function(){return f.asm.ue.apply(null,arguments)},jg=f._emscripten_bind_btCapsuleShape_getRadius_0=function(){return f.asm.ve.apply(null,arguments)},kg=f._emscripten_bind_btCapsuleShape_getUpAxis_0=function(){return f.asm.we.apply(null,arguments)},lg=f._emscripten_bind_btCapsuleShape_setLocalScaling_1=function(){return f.asm.xe.apply(null,arguments)},mg=f._emscripten_bind_btCapsuleShape_setMargin_1=function(){return f.asm.ye.apply(null, +arguments)},ng=f._emscripten_bind_btCollisionConfiguration___destroy___0=function(){return f.asm.ze.apply(null,arguments)},og=f._emscripten_bind_btCollisionDispatcher___destroy___0=function(){return f.asm.Ae.apply(null,arguments)},pg=f._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=function(){return f.asm.Be.apply(null,arguments)},qg=f._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=function(){return f.asm.Ce.apply(null,arguments)},rg=f._emscripten_bind_btCollisionDispatcher_getNumManifolds_0= +function(){return f.asm.De.apply(null,arguments)},sg=f._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=function(){return f.asm.Ee.apply(null,arguments)},tg=f._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=function(){return f.asm.Fe.apply(null,arguments)},ug=f._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=function(){return f.asm.Ge.apply(null,arguments)},vg=f._emscripten_bind_btCollisionObject___destroy___0=function(){return f.asm.He.apply(null,arguments)}, +wg=f._emscripten_bind_btCollisionObject_activate_0=function(){return f.asm.Ie.apply(null,arguments)},xg=f._emscripten_bind_btCollisionObject_activate_1=function(){return f.asm.Je.apply(null,arguments)},yg=f._emscripten_bind_btCollisionObject_forceActivationState_1=function(){return f.asm.Ke.apply(null,arguments)},zg=f._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=function(){return f.asm.Le.apply(null,arguments)},Ag=f._emscripten_bind_btCollisionObject_getCollisionFlags_0=function(){return f.asm.Me.apply(null, +arguments)},Bg=f._emscripten_bind_btCollisionObject_getCollisionShape_0=function(){return f.asm.Ne.apply(null,arguments)},Cg=f._emscripten_bind_btCollisionObject_getFriction_0=function(){return f.asm.Oe.apply(null,arguments)},Dg=f._emscripten_bind_btCollisionObject_getRestitution_0=function(){return f.asm.Pe.apply(null,arguments)},Eg=f._emscripten_bind_btCollisionObject_getRollingFriction_0=function(){return f.asm.Qe.apply(null,arguments)},Fg=f._emscripten_bind_btCollisionObject_getUserIndex_0=function(){return f.asm.Re.apply(null, +arguments)},Gg=f._emscripten_bind_btCollisionObject_getUserPointer_0=function(){return f.asm.Se.apply(null,arguments)},Hg=f._emscripten_bind_btCollisionObject_getWorldTransform_0=function(){return f.asm.Te.apply(null,arguments)},Ig=f._emscripten_bind_btCollisionObject_isActive_0=function(){return f.asm.Ue.apply(null,arguments)},Jg=f._emscripten_bind_btCollisionObject_isKinematicObject_0=function(){return f.asm.Ve.apply(null,arguments)},Kg=f._emscripten_bind_btCollisionObject_isStaticObject_0=function(){return f.asm.We.apply(null, +arguments)},Lg=f._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=function(){return f.asm.Xe.apply(null,arguments)},Mg=f._emscripten_bind_btCollisionObject_setActivationState_1=function(){return f.asm.Ye.apply(null,arguments)},Ng=f._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=function(){return f.asm.Ze.apply(null,arguments)},Og=f._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=function(){return f.asm._e.apply(null,arguments)},Pg=f._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1= +function(){return f.asm.$e.apply(null,arguments)},Qg=f._emscripten_bind_btCollisionObject_setCollisionFlags_1=function(){return f.asm.af.apply(null,arguments)},Rg=f._emscripten_bind_btCollisionObject_setCollisionShape_1=function(){return f.asm.bf.apply(null,arguments)},Sg=f._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=function(){return f.asm.cf.apply(null,arguments)},Tg=f._emscripten_bind_btCollisionObject_setFriction_1=function(){return f.asm.df.apply(null,arguments)},Ug=f._emscripten_bind_btCollisionObject_setRestitution_1= +function(){return f.asm.ef.apply(null,arguments)},Vg=f._emscripten_bind_btCollisionObject_setRollingFriction_1=function(){return f.asm.ff.apply(null,arguments)},Wg=f._emscripten_bind_btCollisionObject_setUserIndex_1=function(){return f.asm.gf.apply(null,arguments)},Xg=f._emscripten_bind_btCollisionObject_setUserPointer_1=function(){return f.asm.hf.apply(null,arguments)},Yg=f._emscripten_bind_btCollisionObject_setWorldTransform_1=function(){return f.asm.jf.apply(null,arguments)},Zg=f._emscripten_bind_btCollisionShape___destroy___0= +function(){return f.asm.kf.apply(null,arguments)},$g=f._emscripten_bind_btCollisionShape_calculateLocalInertia_2=function(){return f.asm.lf.apply(null,arguments)},ah=f._emscripten_bind_btCollisionShape_getLocalScaling_0=function(){return f.asm.mf.apply(null,arguments)},bh=f._emscripten_bind_btCollisionShape_getMargin_0=function(){return f.asm.nf.apply(null,arguments)},ch=f._emscripten_bind_btCollisionShape_setLocalScaling_1=function(){return f.asm.of.apply(null,arguments)},dh=f._emscripten_bind_btCollisionShape_setMargin_1= +function(){return f.asm.pf.apply(null,arguments)},eh=f._emscripten_bind_btCollisionWorld___destroy___0=function(){return f.asm.qf.apply(null,arguments)},fh=f._emscripten_bind_btCollisionWorld_addCollisionObject_1=function(){return f.asm.rf.apply(null,arguments)},gh=f._emscripten_bind_btCollisionWorld_addCollisionObject_2=function(){return f.asm.sf.apply(null,arguments)},hh=f._emscripten_bind_btCollisionWorld_addCollisionObject_3=function(){return f.asm.tf.apply(null,arguments)},ih=f._emscripten_bind_btCollisionWorld_contactPairTest_3= +function(){return f.asm.uf.apply(null,arguments)},jh=f._emscripten_bind_btCollisionWorld_contactTest_2=function(){return f.asm.vf.apply(null,arguments)},kh=f._emscripten_bind_btCollisionWorld_convexSweepTest_5=function(){return f.asm.wf.apply(null,arguments)},lh=f._emscripten_bind_btCollisionWorld_debugDrawObject_3=function(){return f.asm.xf.apply(null,arguments)},mh=f._emscripten_bind_btCollisionWorld_debugDrawWorld_0=function(){return f.asm.yf.apply(null,arguments)},nh=f._emscripten_bind_btCollisionWorld_getBroadphase_0= +function(){return f.asm.zf.apply(null,arguments)},oh=f._emscripten_bind_btCollisionWorld_getDebugDrawer_0=function(){return f.asm.Af.apply(null,arguments)},ph=f._emscripten_bind_btCollisionWorld_getDispatchInfo_0=function(){return f.asm.Bf.apply(null,arguments)},qh=f._emscripten_bind_btCollisionWorld_getDispatcher_0=function(){return f.asm.Cf.apply(null,arguments)},rh=f._emscripten_bind_btCollisionWorld_getPairCache_0=function(){return f.asm.Df.apply(null,arguments)},sh=f._emscripten_bind_btCollisionWorld_rayTest_3= +function(){return f.asm.Ef.apply(null,arguments)},th=f._emscripten_bind_btCollisionWorld_removeCollisionObject_1=function(){return f.asm.Ff.apply(null,arguments)},uh=f._emscripten_bind_btCollisionWorld_setDebugDrawer_1=function(){return f.asm.Gf.apply(null,arguments)},vh=f._emscripten_bind_btCollisionWorld_updateSingleAabb_1=function(){return f.asm.Hf.apply(null,arguments)},wh=f._emscripten_bind_btCompoundShape___destroy___0=function(){return f.asm.If.apply(null,arguments)},xh=f._emscripten_bind_btCompoundShape_addChildShape_2= +function(){return f.asm.Jf.apply(null,arguments)},yh=f._emscripten_bind_btCompoundShape_btCompoundShape_0=function(){return f.asm.Kf.apply(null,arguments)},zh=f._emscripten_bind_btCompoundShape_btCompoundShape_1=function(){return f.asm.Lf.apply(null,arguments)},Ah=f._emscripten_bind_btCompoundShape_calculateLocalInertia_2=function(){return f.asm.Mf.apply(null,arguments)},Bh=f._emscripten_bind_btCompoundShape_getChildShape_1=function(){return f.asm.Nf.apply(null,arguments)},Ch=f._emscripten_bind_btCompoundShape_getLocalScaling_0= +function(){return f.asm.Of.apply(null,arguments)},Dh=f._emscripten_bind_btCompoundShape_getMargin_0=function(){return f.asm.Pf.apply(null,arguments)},Eh=f._emscripten_bind_btCompoundShape_getNumChildShapes_0=function(){return f.asm.Qf.apply(null,arguments)},Fh=f._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=function(){return f.asm.Rf.apply(null,arguments)},Gh=f._emscripten_bind_btCompoundShape_removeChildShape_1=function(){return f.asm.Sf.apply(null,arguments)},Hh=f._emscripten_bind_btCompoundShape_setLocalScaling_1= +function(){return f.asm.Tf.apply(null,arguments)},Ih=f._emscripten_bind_btCompoundShape_setMargin_1=function(){return f.asm.Uf.apply(null,arguments)},Jh=f._emscripten_bind_btCompoundShape_updateChildTransform_2=function(){return f.asm.Vf.apply(null,arguments)},Kh=f._emscripten_bind_btCompoundShape_updateChildTransform_3=function(){return f.asm.Wf.apply(null,arguments)},Lh=f._emscripten_bind_btConcaveShape___destroy___0=function(){return f.asm.Xf.apply(null,arguments)},Mh=f._emscripten_bind_btConcaveShape_calculateLocalInertia_2= +function(){return f.asm.Yf.apply(null,arguments)},Nh=f._emscripten_bind_btConcaveShape_getLocalScaling_0=function(){return f.asm.Zf.apply(null,arguments)},Oh=f._emscripten_bind_btConcaveShape_setLocalScaling_1=function(){return f.asm._f.apply(null,arguments)},Ph=f._emscripten_bind_btConeShapeX___destroy___0=function(){return f.asm.$f.apply(null,arguments)},Qh=f._emscripten_bind_btConeShapeX_btConeShapeX_2=function(){return f.asm.ag.apply(null,arguments)},Rh=f._emscripten_bind_btConeShapeX_calculateLocalInertia_2= +function(){return f.asm.bg.apply(null,arguments)},Sh=f._emscripten_bind_btConeShapeX_getLocalScaling_0=function(){return f.asm.cg.apply(null,arguments)},Th=f._emscripten_bind_btConeShapeX_setLocalScaling_1=function(){return f.asm.dg.apply(null,arguments)},Uh=f._emscripten_bind_btConeShapeZ___destroy___0=function(){return f.asm.eg.apply(null,arguments)},Vh=f._emscripten_bind_btConeShapeZ_btConeShapeZ_2=function(){return f.asm.fg.apply(null,arguments)},Wh=f._emscripten_bind_btConeShapeZ_calculateLocalInertia_2= +function(){return f.asm.gg.apply(null,arguments)},Xh=f._emscripten_bind_btConeShapeZ_getLocalScaling_0=function(){return f.asm.hg.apply(null,arguments)},Yh=f._emscripten_bind_btConeShapeZ_setLocalScaling_1=function(){return f.asm.ig.apply(null,arguments)},Zh=f._emscripten_bind_btConeShape___destroy___0=function(){return f.asm.jg.apply(null,arguments)},$h=f._emscripten_bind_btConeShape_btConeShape_2=function(){return f.asm.kg.apply(null,arguments)},ai=f._emscripten_bind_btConeShape_calculateLocalInertia_2= +function(){return f.asm.lg.apply(null,arguments)},bi=f._emscripten_bind_btConeShape_getLocalScaling_0=function(){return f.asm.mg.apply(null,arguments)},ci=f._emscripten_bind_btConeShape_setLocalScaling_1=function(){return f.asm.ng.apply(null,arguments)},di=f._emscripten_bind_btConeTwistConstraint___destroy___0=function(){return f.asm.og.apply(null,arguments)},ei=f._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=function(){return f.asm.pg.apply(null,arguments)},fi=f._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4= +function(){return f.asm.qg.apply(null,arguments)},gi=f._emscripten_bind_btConeTwistConstraint_enableFeedback_1=function(){return f.asm.rg.apply(null,arguments)},hi=f._emscripten_bind_btConeTwistConstraint_enableMotor_1=function(){return f.asm.sg.apply(null,arguments)},ii=f._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.tg.apply(null,arguments)},ji=f._emscripten_bind_btConeTwistConstraint_getParam_2=function(){return f.asm.ug.apply(null,arguments)},ki= +f._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=function(){return f.asm.vg.apply(null,arguments)},li=f._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.wg.apply(null,arguments)},mi=f._emscripten_bind_btConeTwistConstraint_setDamping_1=function(){return f.asm.xg.apply(null,arguments)},ni=f._emscripten_bind_btConeTwistConstraint_setLimit_2=function(){return f.asm.yg.apply(null,arguments)},oi=f._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1= +function(){return f.asm.zg.apply(null,arguments)},pi=f._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=function(){return f.asm.Ag.apply(null,arguments)},qi=f._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=function(){return f.asm.Bg.apply(null,arguments)},ri=f._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=function(){return f.asm.Cg.apply(null,arguments)},si=f._emscripten_bind_btConeTwistConstraint_setParam_3=function(){return f.asm.Dg.apply(null,arguments)}, +ti=f._emscripten_bind_btConstCollisionObjectArray___destroy___0=function(){return f.asm.Eg.apply(null,arguments)},ui=f._emscripten_bind_btConstCollisionObjectArray_at_1=function(){return f.asm.Fg.apply(null,arguments)},vi=f._emscripten_bind_btConstCollisionObjectArray_size_0=function(){return f.asm.Gg.apply(null,arguments)},wi=f._emscripten_bind_btConstraintSetting___destroy___0=function(){return f.asm.Hg.apply(null,arguments)},xi=f._emscripten_bind_btConstraintSetting_btConstraintSetting_0=function(){return f.asm.Ig.apply(null, +arguments)},yi=f._emscripten_bind_btConstraintSetting_get_m_damping_0=function(){return f.asm.Jg.apply(null,arguments)},zi=f._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=function(){return f.asm.Kg.apply(null,arguments)},Ai=f._emscripten_bind_btConstraintSetting_get_m_tau_0=function(){return f.asm.Lg.apply(null,arguments)},Bi=f._emscripten_bind_btConstraintSetting_set_m_damping_1=function(){return f.asm.Mg.apply(null,arguments)},Ci=f._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1= +function(){return f.asm.Ng.apply(null,arguments)},Di=f._emscripten_bind_btConstraintSetting_set_m_tau_1=function(){return f.asm.Og.apply(null,arguments)},Ei=f._emscripten_bind_btConstraintSolver___destroy___0=function(){return f.asm.Pg.apply(null,arguments)},Fi=f._emscripten_bind_btContactSolverInfo___destroy___0=function(){return f.asm.Qg.apply(null,arguments)},Gi=f._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=function(){return f.asm.Rg.apply(null,arguments)},Hi=f._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0= +function(){return f.asm.Sg.apply(null,arguments)},Ii=f._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=function(){return f.asm.Tg.apply(null,arguments)},Ji=f._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=function(){return f.asm.Ug.apply(null,arguments)},Ki=f._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=function(){return f.asm.Vg.apply(null,arguments)},Li=f._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=function(){return f.asm.Wg.apply(null, +arguments)},Mi=f._emscripten_bind_btConvexHullShape___destroy___0=function(){return f.asm.Xg.apply(null,arguments)},Ni=f._emscripten_bind_btConvexHullShape_addPoint_1=function(){return f.asm.Yg.apply(null,arguments)},Oi=f._emscripten_bind_btConvexHullShape_addPoint_2=function(){return f.asm.Zg.apply(null,arguments)},Pi=f._emscripten_bind_btConvexHullShape_btConvexHullShape_0=function(){return f.asm._g.apply(null,arguments)},Qi=f._emscripten_bind_btConvexHullShape_btConvexHullShape_1=function(){return f.asm.$g.apply(null, +arguments)},Ri=f._emscripten_bind_btConvexHullShape_btConvexHullShape_2=function(){return f.asm.ah.apply(null,arguments)},Si=f._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=function(){return f.asm.bh.apply(null,arguments)},Ti=f._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=function(){return f.asm.ch.apply(null,arguments)},Ui=f._emscripten_bind_btConvexHullShape_getLocalScaling_0=function(){return f.asm.dh.apply(null,arguments)},Vi=f._emscripten_bind_btConvexHullShape_getMargin_0= +function(){return f.asm.eh.apply(null,arguments)},Wi=f._emscripten_bind_btConvexHullShape_getNumVertices_0=function(){return f.asm.fh.apply(null,arguments)},Xi=f._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=function(){return f.asm.gh.apply(null,arguments)},Yi=f._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=function(){return f.asm.hh.apply(null,arguments)},Zi=f._emscripten_bind_btConvexHullShape_setLocalScaling_1=function(){return f.asm.ih.apply(null,arguments)},$i=f._emscripten_bind_btConvexHullShape_setMargin_1= +function(){return f.asm.jh.apply(null,arguments)},aj=f._emscripten_bind_btConvexPolyhedron___destroy___0=function(){return f.asm.kh.apply(null,arguments)},bj=f._emscripten_bind_btConvexPolyhedron_get_m_faces_0=function(){return f.asm.lh.apply(null,arguments)},cj=f._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=function(){return f.asm.mh.apply(null,arguments)},dj=f._emscripten_bind_btConvexPolyhedron_set_m_faces_1=function(){return f.asm.nh.apply(null,arguments)},ej=f._emscripten_bind_btConvexPolyhedron_set_m_vertices_1= +function(){return f.asm.oh.apply(null,arguments)},fj=f._emscripten_bind_btConvexShape___destroy___0=function(){return f.asm.ph.apply(null,arguments)},gj=f._emscripten_bind_btConvexShape_calculateLocalInertia_2=function(){return f.asm.qh.apply(null,arguments)},hj=f._emscripten_bind_btConvexShape_getLocalScaling_0=function(){return f.asm.rh.apply(null,arguments)},ij=f._emscripten_bind_btConvexShape_getMargin_0=function(){return f.asm.sh.apply(null,arguments)},jj=f._emscripten_bind_btConvexShape_setLocalScaling_1= +function(){return f.asm.th.apply(null,arguments)},kj=f._emscripten_bind_btConvexShape_setMargin_1=function(){return f.asm.uh.apply(null,arguments)},lj=f._emscripten_bind_btConvexTriangleMeshShape___destroy___0=function(){return f.asm.vh.apply(null,arguments)},mj=f._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=function(){return f.asm.wh.apply(null,arguments)},nj=f._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=function(){return f.asm.xh.apply(null,arguments)}, +oj=f._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=function(){return f.asm.yh.apply(null,arguments)},pj=f._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=function(){return f.asm.zh.apply(null,arguments)},qj=f._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=function(){return f.asm.Ah.apply(null,arguments)},rj=f._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=function(){return f.asm.Bh.apply(null,arguments)},sj=f._emscripten_bind_btConvexTriangleMeshShape_setMargin_1= +function(){return f.asm.Ch.apply(null,arguments)},tj=f._emscripten_bind_btCylinderShapeX___destroy___0=function(){return f.asm.Dh.apply(null,arguments)},uj=f._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=function(){return f.asm.Eh.apply(null,arguments)},vj=f._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=function(){return f.asm.Fh.apply(null,arguments)},wj=f._emscripten_bind_btCylinderShapeX_getLocalScaling_0=function(){return f.asm.Gh.apply(null,arguments)},xj=f._emscripten_bind_btCylinderShapeX_getMargin_0= +function(){return f.asm.Hh.apply(null,arguments)},yj=f._emscripten_bind_btCylinderShapeX_setLocalScaling_1=function(){return f.asm.Ih.apply(null,arguments)},zj=f._emscripten_bind_btCylinderShapeX_setMargin_1=function(){return f.asm.Jh.apply(null,arguments)},Aj=f._emscripten_bind_btCylinderShapeZ___destroy___0=function(){return f.asm.Kh.apply(null,arguments)},Bj=f._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=function(){return f.asm.Lh.apply(null,arguments)},Cj=f._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2= +function(){return f.asm.Mh.apply(null,arguments)},Dj=f._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=function(){return f.asm.Nh.apply(null,arguments)},Ej=f._emscripten_bind_btCylinderShapeZ_getMargin_0=function(){return f.asm.Oh.apply(null,arguments)},Fj=f._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=function(){return f.asm.Ph.apply(null,arguments)},Gj=f._emscripten_bind_btCylinderShapeZ_setMargin_1=function(){return f.asm.Qh.apply(null,arguments)},Hj=f._emscripten_bind_btCylinderShape___destroy___0= +function(){return f.asm.Rh.apply(null,arguments)},Ij=f._emscripten_bind_btCylinderShape_btCylinderShape_1=function(){return f.asm.Sh.apply(null,arguments)},Jj=f._emscripten_bind_btCylinderShape_calculateLocalInertia_2=function(){return f.asm.Th.apply(null,arguments)},Kj=f._emscripten_bind_btCylinderShape_getLocalScaling_0=function(){return f.asm.Uh.apply(null,arguments)},Lj=f._emscripten_bind_btCylinderShape_getMargin_0=function(){return f.asm.Vh.apply(null,arguments)},Mj=f._emscripten_bind_btCylinderShape_setLocalScaling_1= +function(){return f.asm.Wh.apply(null,arguments)},Nj=f._emscripten_bind_btCylinderShape_setMargin_1=function(){return f.asm.Xh.apply(null,arguments)},Oj=f._emscripten_bind_btDbvtBroadphase___destroy___0=function(){return f.asm.Yh.apply(null,arguments)},Pj=f._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=function(){return f.asm.Zh.apply(null,arguments)},Qj=f._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=function(){return f.asm._h.apply(null,arguments)},Rj=f._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0= +function(){return f.asm.$h.apply(null,arguments)},Sj=f._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=function(){return f.asm.ai.apply(null,arguments)},Tj=f._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=function(){return f.asm.bi.apply(null,arguments)},Uj=f._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=function(){return f.asm.ci.apply(null,arguments)},Vj=f._emscripten_bind_btDefaultMotionState___destroy___0= +function(){return f.asm.di.apply(null,arguments)},Wj=f._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=function(){return f.asm.ei.apply(null,arguments)},Xj=f._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=function(){return f.asm.fi.apply(null,arguments)},Yj=f._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=function(){return f.asm.gi.apply(null,arguments)},Zj=f._emscripten_bind_btDefaultMotionState_getWorldTransform_1=function(){return f.asm.hi.apply(null,arguments)}, +ak=f._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=function(){return f.asm.ii.apply(null,arguments)},bk=f._emscripten_bind_btDefaultMotionState_setWorldTransform_1=function(){return f.asm.ji.apply(null,arguments)},ck=f._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=function(){return f.asm.ki.apply(null,arguments)},dk=f._emscripten_bind_btDefaultSoftBodySolver___destroy___0=function(){return f.asm.li.apply(null,arguments)},ek=f._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0= +function(){return f.asm.mi.apply(null,arguments)},fk=f._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=function(){return f.asm.ni.apply(null,arguments)},gk=f._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=function(){return f.asm.oi.apply(null,arguments)},hk=f._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=function(){return f.asm.pi.apply(null,arguments)},ik=f._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=function(){return f.asm.qi.apply(null,arguments)}, +jk=f._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=function(){return f.asm.ri.apply(null,arguments)},kk=f._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=function(){return f.asm.si.apply(null,arguments)},lk=f._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=function(){return f.asm.ti.apply(null,arguments)},mk=f._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=function(){return f.asm.ui.apply(null,arguments)},nk=f._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1= +function(){return f.asm.vi.apply(null,arguments)},ok=f._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=function(){return f.asm.wi.apply(null,arguments)},pk=f._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=function(){return f.asm.xi.apply(null,arguments)},qk=f._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=function(){return f.asm.yi.apply(null,arguments)},rk=f._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=function(){return f.asm.zi.apply(null,arguments)}, +sk=f._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=function(){return f.asm.Ai.apply(null,arguments)},tk=f._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=function(){return f.asm.Bi.apply(null,arguments)},uk=f._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=function(){return f.asm.Ci.apply(null,arguments)},vk=f._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=function(){return f.asm.Di.apply(null,arguments)},wk=f._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0= +function(){return f.asm.Ei.apply(null,arguments)},xk=f._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=function(){return f.asm.Fi.apply(null,arguments)},yk=f._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=function(){return f.asm.Gi.apply(null,arguments)},zk=f._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=function(){return f.asm.Hi.apply(null,arguments)},Ak=f._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=function(){return f.asm.Ii.apply(null,arguments)}, +Bk=f._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=function(){return f.asm.Ji.apply(null,arguments)},Ck=f._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=function(){return f.asm.Ki.apply(null,arguments)},Dk=f._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=function(){return f.asm.Li.apply(null,arguments)},Ek=f._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=function(){return f.asm.Mi.apply(null,arguments)},Fk=f._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=function(){return f.asm.Ni.apply(null, +arguments)},Gk=f._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=function(){return f.asm.Oi.apply(null,arguments)},Hk=f._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=function(){return f.asm.Pi.apply(null,arguments)},Ik=f._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=function(){return f.asm.Qi.apply(null,arguments)},Jk=f._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=function(){return f.asm.Ri.apply(null,arguments)},Kk=f._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1= +function(){return f.asm.Si.apply(null,arguments)},Lk=f._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=function(){return f.asm.Ti.apply(null,arguments)},Mk=f._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=function(){return f.asm.Ui.apply(null,arguments)},Nk=f._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=function(){return f.asm.Vi.apply(null,arguments)},Ok=f._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=function(){return f.asm.Wi.apply(null,arguments)}, +Pk=f._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=function(){return f.asm.Xi.apply(null,arguments)},Qk=f._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=function(){return f.asm.Yi.apply(null,arguments)},Rk=f._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=function(){return f.asm.Zi.apply(null,arguments)},Sk=f._emscripten_bind_btDispatcherInfo___destroy___0=function(){return f.asm._i.apply(null,arguments)},Tk=f._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0= +function(){return f.asm.$i.apply(null,arguments)},Uk=f._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=function(){return f.asm.aj.apply(null,arguments)},Vk=f._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=function(){return f.asm.bj.apply(null,arguments)},Wk=f._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=function(){return f.asm.cj.apply(null,arguments)},Xk=f._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=function(){return f.asm.dj.apply(null, +arguments)},Yk=f._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=function(){return f.asm.ej.apply(null,arguments)},Zk=f._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=function(){return f.asm.fj.apply(null,arguments)},$k=f._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=function(){return f.asm.gj.apply(null,arguments)},al=f._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=function(){return f.asm.hj.apply(null,arguments)},bl=f._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0= +function(){return f.asm.ij.apply(null,arguments)},cl=f._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=function(){return f.asm.jj.apply(null,arguments)},dl=f._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=function(){return f.asm.kj.apply(null,arguments)},el=f._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=function(){return f.asm.lj.apply(null,arguments)},fl=f._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=function(){return f.asm.mj.apply(null, +arguments)},gl=f._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=function(){return f.asm.nj.apply(null,arguments)},hl=f._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=function(){return f.asm.oj.apply(null,arguments)},il=f._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=function(){return f.asm.pj.apply(null,arguments)},jl=f._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=function(){return f.asm.qj.apply(null,arguments)},kl=f._emscripten_bind_btDispatcherInfo_set_m_timeStep_1= +function(){return f.asm.rj.apply(null,arguments)},ll=f._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=function(){return f.asm.sj.apply(null,arguments)},ml=f._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=function(){return f.asm.tj.apply(null,arguments)},nl=f._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=function(){return f.asm.uj.apply(null,arguments)},ol=f._emscripten_bind_btDispatcher___destroy___0=function(){return f.asm.vj.apply(null,arguments)},pl=f._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1= +function(){return f.asm.wj.apply(null,arguments)},ql=f._emscripten_bind_btDispatcher_getNumManifolds_0=function(){return f.asm.xj.apply(null,arguments)},rl=f._emscripten_bind_btDynamicsWorld___destroy___0=function(){return f.asm.yj.apply(null,arguments)},sl=f._emscripten_bind_btDynamicsWorld_addAction_1=function(){return f.asm.zj.apply(null,arguments)},tl=f._emscripten_bind_btDynamicsWorld_addCollisionObject_1=function(){return f.asm.Aj.apply(null,arguments)},ul=f._emscripten_bind_btDynamicsWorld_addCollisionObject_2= +function(){return f.asm.Bj.apply(null,arguments)},vl=f._emscripten_bind_btDynamicsWorld_addCollisionObject_3=function(){return f.asm.Cj.apply(null,arguments)},wl=f._emscripten_bind_btDynamicsWorld_contactPairTest_3=function(){return f.asm.Dj.apply(null,arguments)},xl=f._emscripten_bind_btDynamicsWorld_contactTest_2=function(){return f.asm.Ej.apply(null,arguments)},yl=f._emscripten_bind_btDynamicsWorld_convexSweepTest_5=function(){return f.asm.Fj.apply(null,arguments)},zl=f._emscripten_bind_btDynamicsWorld_debugDrawObject_3= +function(){return f.asm.Gj.apply(null,arguments)},Al=f._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=function(){return f.asm.Hj.apply(null,arguments)},Bl=f._emscripten_bind_btDynamicsWorld_getBroadphase_0=function(){return f.asm.Ij.apply(null,arguments)},Cl=f._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=function(){return f.asm.Jj.apply(null,arguments)},Dl=f._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=function(){return f.asm.Kj.apply(null,arguments)},El=f._emscripten_bind_btDynamicsWorld_getDispatcher_0= +function(){return f.asm.Lj.apply(null,arguments)},Fl=f._emscripten_bind_btDynamicsWorld_getPairCache_0=function(){return f.asm.Mj.apply(null,arguments)},Gl=f._emscripten_bind_btDynamicsWorld_getSolverInfo_0=function(){return f.asm.Nj.apply(null,arguments)},Hl=f._emscripten_bind_btDynamicsWorld_rayTest_3=function(){return f.asm.Oj.apply(null,arguments)},Il=f._emscripten_bind_btDynamicsWorld_removeAction_1=function(){return f.asm.Pj.apply(null,arguments)},Jl=f._emscripten_bind_btDynamicsWorld_removeCollisionObject_1= +function(){return f.asm.Qj.apply(null,arguments)},Kl=f._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=function(){return f.asm.Rj.apply(null,arguments)},Ll=f._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=function(){return f.asm.Sj.apply(null,arguments)},Ml=f._emscripten_bind_btFaceArray___destroy___0=function(){return f.asm.Tj.apply(null,arguments)},Nl=f._emscripten_bind_btFaceArray_at_1=function(){return f.asm.Uj.apply(null,arguments)},Ol=f._emscripten_bind_btFaceArray_size_0=function(){return f.asm.Vj.apply(null, +arguments)},Pl=f._emscripten_bind_btFace___destroy___0=function(){return f.asm.Wj.apply(null,arguments)},Ql=f._emscripten_bind_btFace_get_m_indices_0=function(){return f.asm.Xj.apply(null,arguments)},Rl=f._emscripten_bind_btFace_get_m_plane_1=function(){return f.asm.Yj.apply(null,arguments)},Sl=f._emscripten_bind_btFace_set_m_indices_1=function(){return f.asm.Zj.apply(null,arguments)},Tl=f._emscripten_bind_btFace_set_m_plane_2=function(){return f.asm._j.apply(null,arguments)},Ul=f._emscripten_bind_btFixedConstraint___destroy___0= +function(){return f.asm.$j.apply(null,arguments)},Vl=f._emscripten_bind_btFixedConstraint_btFixedConstraint_4=function(){return f.asm.ak.apply(null,arguments)},Wl=f._emscripten_bind_btFixedConstraint_enableFeedback_1=function(){return f.asm.bk.apply(null,arguments)},Xl=f._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.ck.apply(null,arguments)},Yl=f._emscripten_bind_btFixedConstraint_getParam_2=function(){return f.asm.dk.apply(null,arguments)},Zl=f._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1= +function(){return f.asm.ek.apply(null,arguments)},$l=f._emscripten_bind_btFixedConstraint_setParam_3=function(){return f.asm.fk.apply(null,arguments)},am=f._emscripten_bind_btGeneric6DofConstraint___destroy___0=function(){return f.asm.gk.apply(null,arguments)},bm=f._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=function(){return f.asm.hk.apply(null,arguments)},cm=f._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=function(){return f.asm.ik.apply(null,arguments)}, +dm=f._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=function(){return f.asm.jk.apply(null,arguments)},em=f._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.kk.apply(null,arguments)},fm=f._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=function(){return f.asm.lk.apply(null,arguments)},gm=f._emscripten_bind_btGeneric6DofConstraint_getParam_2=function(){return f.asm.mk.apply(null,arguments)},hm=f._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1= +function(){return f.asm.nk.apply(null,arguments)},im=f._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=function(){return f.asm.ok.apply(null,arguments)},jm=f._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.pk.apply(null,arguments)},km=f._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=function(){return f.asm.qk.apply(null,arguments)},lm=f._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=function(){return f.asm.rk.apply(null, +arguments)},mm=f._emscripten_bind_btGeneric6DofConstraint_setParam_3=function(){return f.asm.sk.apply(null,arguments)},nm=f._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=function(){return f.asm.tk.apply(null,arguments)},om=f._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=function(){return f.asm.uk.apply(null,arguments)},pm=f._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=function(){return f.asm.vk.apply(null,arguments)}, +qm=f._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=function(){return f.asm.wk.apply(null,arguments)},rm=f._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=function(){return f.asm.xk.apply(null,arguments)},sm=f._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.yk.apply(null,arguments)},tm=f._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=function(){return f.asm.zk.apply(null,arguments)},um=f._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2= +function(){return f.asm.Ak.apply(null,arguments)},wm=f._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=function(){return f.asm.Bk.apply(null,arguments)},xm=f._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=function(){return f.asm.Ck.apply(null,arguments)},ym=f._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.Dk.apply(null,arguments)},zm=f._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=function(){return f.asm.Ek.apply(null, +arguments)},Am=f._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=function(){return f.asm.Fk.apply(null,arguments)},Bm=f._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=function(){return f.asm.Gk.apply(null,arguments)},Cm=f._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=function(){return f.asm.Hk.apply(null,arguments)},Dm=f._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=function(){return f.asm.Ik.apply(null,arguments)}, +Em=f._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=function(){return f.asm.Jk.apply(null,arguments)},Fm=f._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=function(){return f.asm.Kk.apply(null,arguments)},Gm=f._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=function(){return f.asm.Lk.apply(null,arguments)},Hm=f._emscripten_bind_btGhostObject___destroy___0=function(){return f.asm.Mk.apply(null,arguments)},Im=f._emscripten_bind_btGhostObject_activate_0= +function(){return f.asm.Nk.apply(null,arguments)},Jm=f._emscripten_bind_btGhostObject_activate_1=function(){return f.asm.Ok.apply(null,arguments)},Km=f._emscripten_bind_btGhostObject_btGhostObject_0=function(){return f.asm.Pk.apply(null,arguments)},Lm=f._emscripten_bind_btGhostObject_forceActivationState_1=function(){return f.asm.Qk.apply(null,arguments)},Mm=f._emscripten_bind_btGhostObject_getBroadphaseHandle_0=function(){return f.asm.Rk.apply(null,arguments)},Nm=f._emscripten_bind_btGhostObject_getCollisionFlags_0= +function(){return f.asm.Sk.apply(null,arguments)},Om=f._emscripten_bind_btGhostObject_getCollisionShape_0=function(){return f.asm.Tk.apply(null,arguments)},Pm=f._emscripten_bind_btGhostObject_getFriction_0=function(){return f.asm.Uk.apply(null,arguments)},Qm=f._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=function(){return f.asm.Vk.apply(null,arguments)},Rm=f._emscripten_bind_btGhostObject_getOverlappingObject_1=function(){return f.asm.Wk.apply(null,arguments)},Sm=f._emscripten_bind_btGhostObject_getRestitution_0= +function(){return f.asm.Xk.apply(null,arguments)},Tm=f._emscripten_bind_btGhostObject_getRollingFriction_0=function(){return f.asm.Yk.apply(null,arguments)},Um=f._emscripten_bind_btGhostObject_getUserIndex_0=function(){return f.asm.Zk.apply(null,arguments)},Vm=f._emscripten_bind_btGhostObject_getUserPointer_0=function(){return f.asm._k.apply(null,arguments)},Wm=f._emscripten_bind_btGhostObject_getWorldTransform_0=function(){return f.asm.$k.apply(null,arguments)},Xm=f._emscripten_bind_btGhostObject_isActive_0= +function(){return f.asm.al.apply(null,arguments)},Ym=f._emscripten_bind_btGhostObject_isKinematicObject_0=function(){return f.asm.bl.apply(null,arguments)},Zm=f._emscripten_bind_btGhostObject_isStaticObject_0=function(){return f.asm.cl.apply(null,arguments)},$m=f._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=function(){return f.asm.dl.apply(null,arguments)},an=f._emscripten_bind_btGhostObject_setActivationState_1=function(){return f.asm.el.apply(null,arguments)},bn=f._emscripten_bind_btGhostObject_setAnisotropicFriction_2= +function(){return f.asm.fl.apply(null,arguments)},cn=f._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=function(){return f.asm.gl.apply(null,arguments)},dn=f._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=function(){return f.asm.hl.apply(null,arguments)},en=f._emscripten_bind_btGhostObject_setCollisionFlags_1=function(){return f.asm.il.apply(null,arguments)},fn=f._emscripten_bind_btGhostObject_setCollisionShape_1=function(){return f.asm.jl.apply(null,arguments)},gn=f._emscripten_bind_btGhostObject_setContactProcessingThreshold_1= +function(){return f.asm.kl.apply(null,arguments)},hn=f._emscripten_bind_btGhostObject_setFriction_1=function(){return f.asm.ll.apply(null,arguments)},jn=f._emscripten_bind_btGhostObject_setRestitution_1=function(){return f.asm.ml.apply(null,arguments)},kn=f._emscripten_bind_btGhostObject_setRollingFriction_1=function(){return f.asm.nl.apply(null,arguments)},ln=f._emscripten_bind_btGhostObject_setUserIndex_1=function(){return f.asm.ol.apply(null,arguments)},mn=f._emscripten_bind_btGhostObject_setUserPointer_1= +function(){return f.asm.pl.apply(null,arguments)},nn=f._emscripten_bind_btGhostObject_setWorldTransform_1=function(){return f.asm.ql.apply(null,arguments)},on=f._emscripten_bind_btGhostPairCallback___destroy___0=function(){return f.asm.rl.apply(null,arguments)},pn=f._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=function(){return f.asm.sl.apply(null,arguments)},qn=f._emscripten_bind_btHeightfieldTerrainShape___destroy___0=function(){return f.asm.tl.apply(null,arguments)},rn=f._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9= +function(){return f.asm.ul.apply(null,arguments)},sn=f._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=function(){return f.asm.vl.apply(null,arguments)},tn=f._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=function(){return f.asm.wl.apply(null,arguments)},un=f._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=function(){return f.asm.xl.apply(null,arguments)},vn=f._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=function(){return f.asm.yl.apply(null, +arguments)},wn=f._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=function(){return f.asm.zl.apply(null,arguments)},xn=f._emscripten_bind_btHingeConstraint___destroy___0=function(){return f.asm.Al.apply(null,arguments)},yn=f._emscripten_bind_btHingeConstraint_btHingeConstraint_2=function(){return f.asm.Bl.apply(null,arguments)},zn=f._emscripten_bind_btHingeConstraint_btHingeConstraint_3=function(){return f.asm.Cl.apply(null,arguments)},An=f._emscripten_bind_btHingeConstraint_btHingeConstraint_4= +function(){return f.asm.Dl.apply(null,arguments)},Bn=f._emscripten_bind_btHingeConstraint_btHingeConstraint_5=function(){return f.asm.El.apply(null,arguments)},Cn=f._emscripten_bind_btHingeConstraint_btHingeConstraint_6=function(){return f.asm.Fl.apply(null,arguments)},Dn=f._emscripten_bind_btHingeConstraint_btHingeConstraint_7=function(){return f.asm.Gl.apply(null,arguments)},En=f._emscripten_bind_btHingeConstraint_enableAngularMotor_3=function(){return f.asm.Hl.apply(null,arguments)},Fn=f._emscripten_bind_btHingeConstraint_enableFeedback_1= +function(){return f.asm.Il.apply(null,arguments)},Gn=f._emscripten_bind_btHingeConstraint_enableMotor_1=function(){return f.asm.Jl.apply(null,arguments)},Hn=f._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.Kl.apply(null,arguments)},In=f._emscripten_bind_btHingeConstraint_getParam_2=function(){return f.asm.Ll.apply(null,arguments)},Jn=f._emscripten_bind_btHingeConstraint_setAngularOnly_1=function(){return f.asm.Ml.apply(null,arguments)},Kn=f._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1= +function(){return f.asm.Nl.apply(null,arguments)},Ln=f._emscripten_bind_btHingeConstraint_setLimit_4=function(){return f.asm.Ol.apply(null,arguments)},Mn=f._emscripten_bind_btHingeConstraint_setLimit_5=function(){return f.asm.Pl.apply(null,arguments)},Nn=f._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=function(){return f.asm.Ql.apply(null,arguments)},On=f._emscripten_bind_btHingeConstraint_setMotorTarget_2=function(){return f.asm.Rl.apply(null,arguments)},Pn=f._emscripten_bind_btHingeConstraint_setParam_3= +function(){return f.asm.Sl.apply(null,arguments)},Qn=f._emscripten_bind_btIDebugDraw___destroy___0=function(){return f.asm.Tl.apply(null,arguments)},Rn=f._emscripten_bind_btIDebugDraw_draw3dText_2=function(){return f.asm.Ul.apply(null,arguments)},Sn=f._emscripten_bind_btIDebugDraw_drawContactPoint_5=function(){return f.asm.Vl.apply(null,arguments)},Tn=f._emscripten_bind_btIDebugDraw_drawLine_3=function(){return f.asm.Wl.apply(null,arguments)},Un=f._emscripten_bind_btIDebugDraw_getDebugMode_0=function(){return f.asm.Xl.apply(null, +arguments)},Vn=f._emscripten_bind_btIDebugDraw_reportErrorWarning_1=function(){return f.asm.Yl.apply(null,arguments)},Wn=f._emscripten_bind_btIDebugDraw_setDebugMode_1=function(){return f.asm.Zl.apply(null,arguments)},Xn=f._emscripten_bind_btIndexedMeshArray___destroy___0=function(){return f.asm._l.apply(null,arguments)},Yn=f._emscripten_bind_btIndexedMeshArray_at_1=function(){return f.asm.$l.apply(null,arguments)},Zn=f._emscripten_bind_btIndexedMeshArray_size_0=function(){return f.asm.am.apply(null, +arguments)},$n=f._emscripten_bind_btIndexedMesh___destroy___0=function(){return f.asm.bm.apply(null,arguments)},ao=f._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=function(){return f.asm.cm.apply(null,arguments)},bo=f._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=function(){return f.asm.dm.apply(null,arguments)},co=f._emscripten_bind_btIntArray___destroy___0=function(){return f.asm.em.apply(null,arguments)},eo=f._emscripten_bind_btIntArray_at_1=function(){return f.asm.fm.apply(null,arguments)}, +fo=f._emscripten_bind_btIntArray_size_0=function(){return f.asm.gm.apply(null,arguments)},go=f._emscripten_bind_btKinematicCharacterController___destroy___0=function(){return f.asm.hm.apply(null,arguments)},ho=f._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=function(){return f.asm.im.apply(null,arguments)},io=f._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=function(){return f.asm.jm.apply(null,arguments)},jo=f._emscripten_bind_btKinematicCharacterController_canJump_0= +function(){return f.asm.km.apply(null,arguments)},ko=f._emscripten_bind_btKinematicCharacterController_getGhostObject_0=function(){return f.asm.lm.apply(null,arguments)},lo=f._emscripten_bind_btKinematicCharacterController_getGravity_0=function(){return f.asm.mm.apply(null,arguments)},mo=f._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=function(){return f.asm.nm.apply(null,arguments)},no=f._emscripten_bind_btKinematicCharacterController_jump_0=function(){return f.asm.om.apply(null, +arguments)},oo=f._emscripten_bind_btKinematicCharacterController_onGround_0=function(){return f.asm.pm.apply(null,arguments)},po=f._emscripten_bind_btKinematicCharacterController_playerStep_2=function(){return f.asm.qm.apply(null,arguments)},qo=f._emscripten_bind_btKinematicCharacterController_preStep_1=function(){return f.asm.rm.apply(null,arguments)},ro=f._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=function(){return f.asm.sm.apply(null,arguments)},so=f._emscripten_bind_btKinematicCharacterController_setGravity_1= +function(){return f.asm.tm.apply(null,arguments)},to=f._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=function(){return f.asm.um.apply(null,arguments)},uo=f._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=function(){return f.asm.vm.apply(null,arguments)},vo=f._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=function(){return f.asm.wm.apply(null,arguments)},wo=f._emscripten_bind_btKinematicCharacterController_setUpAxis_1=function(){return f.asm.xm.apply(null, +arguments)},xo=f._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=function(){return f.asm.ym.apply(null,arguments)},yo=f._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=function(){return f.asm.zm.apply(null,arguments)},zo=f._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=function(){return f.asm.Am.apply(null,arguments)},Ao=f._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=function(){return f.asm.Bm.apply(null, +arguments)},Bo=f._emscripten_bind_btKinematicCharacterController_updateAction_2=function(){return f.asm.Cm.apply(null,arguments)},Co=f._emscripten_bind_btKinematicCharacterController_warp_1=function(){return f.asm.Dm.apply(null,arguments)},Do=f._emscripten_bind_btManifoldPoint___destroy___0=function(){return f.asm.Em.apply(null,arguments)},Eo=f._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=function(){return f.asm.Fm.apply(null,arguments)},Fo=f._emscripten_bind_btManifoldPoint_getDistance_0= +function(){return f.asm.Gm.apply(null,arguments)},Go=f._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=function(){return f.asm.Hm.apply(null,arguments)},Ho=f._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=function(){return f.asm.Im.apply(null,arguments)},Io=f._emscripten_bind_btManifoldPoint_get_m_localPointA_0=function(){return f.asm.Jm.apply(null,arguments)},Jo=f._emscripten_bind_btManifoldPoint_get_m_localPointB_0=function(){return f.asm.Km.apply(null,arguments)},Ko=f._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0= +function(){return f.asm.Lm.apply(null,arguments)},Lo=f._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=function(){return f.asm.Mm.apply(null,arguments)},Mo=f._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=function(){return f.asm.Nm.apply(null,arguments)},No=f._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=function(){return f.asm.Om.apply(null,arguments)},Oo=f._emscripten_bind_btManifoldPoint_set_m_localPointA_1=function(){return f.asm.Pm.apply(null,arguments)},Po= +f._emscripten_bind_btManifoldPoint_set_m_localPointB_1=function(){return f.asm.Qm.apply(null,arguments)},Qo=f._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=function(){return f.asm.Rm.apply(null,arguments)},Ro=f._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=function(){return f.asm.Sm.apply(null,arguments)},So=f._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=function(){return f.asm.Tm.apply(null,arguments)},To=f._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1= +function(){return f.asm.Um.apply(null,arguments)},Uo=f._emscripten_bind_btMatrix3x3___destroy___0=function(){return f.asm.Vm.apply(null,arguments)},Vo=f._emscripten_bind_btMatrix3x3_getRotation_1=function(){return f.asm.Wm.apply(null,arguments)},Wo=f._emscripten_bind_btMatrix3x3_getRow_1=function(){return f.asm.Xm.apply(null,arguments)},Xo=f._emscripten_bind_btMatrix3x3_setEulerZYX_3=function(){return f.asm.Ym.apply(null,arguments)},Yo=f._emscripten_bind_btMotionState___destroy___0=function(){return f.asm.Zm.apply(null, +arguments)},Zo=f._emscripten_bind_btMotionState_getWorldTransform_1=function(){return f.asm._m.apply(null,arguments)},$o=f._emscripten_bind_btMotionState_setWorldTransform_1=function(){return f.asm.$m.apply(null,arguments)},ap=f._emscripten_bind_btMultiSphereShape___destroy___0=function(){return f.asm.an.apply(null,arguments)},bp=f._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=function(){return f.asm.bn.apply(null,arguments)},cp=f._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2= +function(){return f.asm.cn.apply(null,arguments)},dp=f._emscripten_bind_btMultiSphereShape_getLocalScaling_0=function(){return f.asm.dn.apply(null,arguments)},ep=f._emscripten_bind_btMultiSphereShape_setLocalScaling_1=function(){return f.asm.en.apply(null,arguments)},fp=f._emscripten_bind_btOverlappingPairCache___destroy___0=function(){return f.asm.fn.apply(null,arguments)},gp=f._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=function(){return f.asm.gn.apply(null,arguments)},hp=f._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1= +function(){return f.asm.hn.apply(null,arguments)},ip=f._emscripten_bind_btOverlappingPairCallback___destroy___0=function(){return f.asm.jn.apply(null,arguments)},jp=f._emscripten_bind_btPairCachingGhostObject___destroy___0=function(){return f.asm.kn.apply(null,arguments)},kp=f._emscripten_bind_btPairCachingGhostObject_activate_0=function(){return f.asm.ln.apply(null,arguments)},lp=f._emscripten_bind_btPairCachingGhostObject_activate_1=function(){return f.asm.mn.apply(null,arguments)},mp=f._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0= +function(){return f.asm.nn.apply(null,arguments)},np=f._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=function(){return f.asm.on.apply(null,arguments)},op=f._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=function(){return f.asm.pn.apply(null,arguments)},pp=f._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=function(){return f.asm.qn.apply(null,arguments)},qp=f._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=function(){return f.asm.rn.apply(null, +arguments)},rp=f._emscripten_bind_btPairCachingGhostObject_getFriction_0=function(){return f.asm.sn.apply(null,arguments)},sp=f._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=function(){return f.asm.tn.apply(null,arguments)},tp=f._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=function(){return f.asm.un.apply(null,arguments)},up=f._emscripten_bind_btPairCachingGhostObject_getRestitution_0=function(){return f.asm.vn.apply(null,arguments)},vp=f._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0= +function(){return f.asm.wn.apply(null,arguments)},wp=f._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=function(){return f.asm.xn.apply(null,arguments)},xp=f._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=function(){return f.asm.yn.apply(null,arguments)},yp=f._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=function(){return f.asm.zn.apply(null,arguments)},zp=f._emscripten_bind_btPairCachingGhostObject_isActive_0=function(){return f.asm.An.apply(null,arguments)}, +Ap=f._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=function(){return f.asm.Bn.apply(null,arguments)},Bp=f._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=function(){return f.asm.Cn.apply(null,arguments)},Cp=f._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=function(){return f.asm.Dn.apply(null,arguments)},Dp=f._emscripten_bind_btPairCachingGhostObject_setActivationState_1=function(){return f.asm.En.apply(null,arguments)},Ep=f._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2= +function(){return f.asm.Fn.apply(null,arguments)},Fp=f._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=function(){return f.asm.Gn.apply(null,arguments)},Gp=f._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=function(){return f.asm.Hn.apply(null,arguments)},Hp=f._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=function(){return f.asm.In.apply(null,arguments)},Ip=f._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=function(){return f.asm.Jn.apply(null, +arguments)},Jp=f._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=function(){return f.asm.Kn.apply(null,arguments)},Kp=f._emscripten_bind_btPairCachingGhostObject_setFriction_1=function(){return f.asm.Ln.apply(null,arguments)},Lp=f._emscripten_bind_btPairCachingGhostObject_setRestitution_1=function(){return f.asm.Mn.apply(null,arguments)},Mp=f._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=function(){return f.asm.Nn.apply(null,arguments)},Np=f._emscripten_bind_btPairCachingGhostObject_setUserIndex_1= +function(){return f.asm.On.apply(null,arguments)},Op=f._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=function(){return f.asm.Pn.apply(null,arguments)},Pp=f._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=function(){return f.asm.Qn.apply(null,arguments)},Qp=f._emscripten_bind_btPersistentManifold___destroy___0=function(){return f.asm.Rn.apply(null,arguments)},Rp=f._emscripten_bind_btPersistentManifold_btPersistentManifold_0=function(){return f.asm.Sn.apply(null,arguments)}, +Sp=f._emscripten_bind_btPersistentManifold_getBody0_0=function(){return f.asm.Tn.apply(null,arguments)},Tp=f._emscripten_bind_btPersistentManifold_getBody1_0=function(){return f.asm.Un.apply(null,arguments)},Up=f._emscripten_bind_btPersistentManifold_getContactPoint_1=function(){return f.asm.Vn.apply(null,arguments)},Vp=f._emscripten_bind_btPersistentManifold_getNumContacts_0=function(){return f.asm.Wn.apply(null,arguments)},Wp=f._emscripten_bind_btPoint2PointConstraint___destroy___0=function(){return f.asm.Xn.apply(null, +arguments)},Xp=f._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=function(){return f.asm.Yn.apply(null,arguments)},Yp=f._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=function(){return f.asm.Zn.apply(null,arguments)},Zp=f._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=function(){return f.asm._n.apply(null,arguments)},$p=f._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.$n.apply(null,arguments)},aq=f._emscripten_bind_btPoint2PointConstraint_getParam_2= +function(){return f.asm.ao.apply(null,arguments)},bq=f._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=function(){return f.asm.bo.apply(null,arguments)},cq=f._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=function(){return f.asm.co.apply(null,arguments)},dq=f._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=function(){return f.asm.eo.apply(null,arguments)},eq=f._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.fo.apply(null,arguments)}, +fq=f._emscripten_bind_btPoint2PointConstraint_setParam_3=function(){return f.asm.go.apply(null,arguments)},gq=f._emscripten_bind_btPoint2PointConstraint_setPivotA_1=function(){return f.asm.ho.apply(null,arguments)},hq=f._emscripten_bind_btPoint2PointConstraint_setPivotB_1=function(){return f.asm.io.apply(null,arguments)},iq=f._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=function(){return f.asm.jo.apply(null,arguments)},jq=f._emscripten_bind_btQuadWord___destroy___0=function(){return f.asm.ko.apply(null, +arguments)},kq=f._emscripten_bind_btQuadWord_setW_1=function(){return f.asm.lo.apply(null,arguments)},lq=f._emscripten_bind_btQuadWord_setX_1=function(){return f.asm.mo.apply(null,arguments)},mq=f._emscripten_bind_btQuadWord_setY_1=function(){return f.asm.no.apply(null,arguments)},nq=f._emscripten_bind_btQuadWord_setZ_1=function(){return f.asm.oo.apply(null,arguments)},oq=f._emscripten_bind_btQuadWord_w_0=function(){return f.asm.po.apply(null,arguments)},pq=f._emscripten_bind_btQuadWord_x_0=function(){return f.asm.qo.apply(null, +arguments)},qq=f._emscripten_bind_btQuadWord_y_0=function(){return f.asm.ro.apply(null,arguments)},rq=f._emscripten_bind_btQuadWord_z_0=function(){return f.asm.so.apply(null,arguments)},sq=f._emscripten_bind_btQuaternion___destroy___0=function(){return f.asm.to.apply(null,arguments)},tq=f._emscripten_bind_btQuaternion_angleShortestPath_1=function(){return f.asm.uo.apply(null,arguments)},uq=f._emscripten_bind_btQuaternion_angle_1=function(){return f.asm.vo.apply(null,arguments)},vq=f._emscripten_bind_btQuaternion_btQuaternion_4= +function(){return f.asm.wo.apply(null,arguments)},wq=f._emscripten_bind_btQuaternion_dot_1=function(){return f.asm.xo.apply(null,arguments)},xq=f._emscripten_bind_btQuaternion_getAngleShortestPath_0=function(){return f.asm.yo.apply(null,arguments)},yq=f._emscripten_bind_btQuaternion_getAngle_0=function(){return f.asm.zo.apply(null,arguments)},zq=f._emscripten_bind_btQuaternion_getAxis_0=function(){return f.asm.Ao.apply(null,arguments)},Aq=f._emscripten_bind_btQuaternion_inverse_0=function(){return f.asm.Bo.apply(null, +arguments)},Bq=f._emscripten_bind_btQuaternion_length2_0=function(){return f.asm.Co.apply(null,arguments)},Cq=f._emscripten_bind_btQuaternion_length_0=function(){return f.asm.Do.apply(null,arguments)},Dq=f._emscripten_bind_btQuaternion_normalize_0=function(){return f.asm.Eo.apply(null,arguments)},Eq=f._emscripten_bind_btQuaternion_normalized_0=function(){return f.asm.Fo.apply(null,arguments)},Fq=f._emscripten_bind_btQuaternion_op_add_1=function(){return f.asm.Go.apply(null,arguments)},Gq=f._emscripten_bind_btQuaternion_op_div_1= +function(){return f.asm.Ho.apply(null,arguments)},Hq=f._emscripten_bind_btQuaternion_op_mul_1=function(){return f.asm.Io.apply(null,arguments)},Iq=f._emscripten_bind_btQuaternion_op_mulq_1=function(){return f.asm.Jo.apply(null,arguments)},Jq=f._emscripten_bind_btQuaternion_op_sub_1=function(){return f.asm.Ko.apply(null,arguments)},Kq=f._emscripten_bind_btQuaternion_setEulerZYX_3=function(){return f.asm.Lo.apply(null,arguments)},Lq=f._emscripten_bind_btQuaternion_setRotation_2=function(){return f.asm.Mo.apply(null, +arguments)},Mq=f._emscripten_bind_btQuaternion_setValue_4=function(){return f.asm.No.apply(null,arguments)},Nq=f._emscripten_bind_btQuaternion_setW_1=function(){return f.asm.Oo.apply(null,arguments)},Oq=f._emscripten_bind_btQuaternion_setX_1=function(){return f.asm.Po.apply(null,arguments)},Pq=f._emscripten_bind_btQuaternion_setY_1=function(){return f.asm.Qo.apply(null,arguments)},Qq=f._emscripten_bind_btQuaternion_setZ_1=function(){return f.asm.Ro.apply(null,arguments)},Rq=f._emscripten_bind_btQuaternion_w_0= +function(){return f.asm.So.apply(null,arguments)},Sq=f._emscripten_bind_btQuaternion_x_0=function(){return f.asm.To.apply(null,arguments)},Tq=f._emscripten_bind_btQuaternion_y_0=function(){return f.asm.Uo.apply(null,arguments)},Uq=f._emscripten_bind_btQuaternion_z_0=function(){return f.asm.Vo.apply(null,arguments)},Vq=f._emscripten_bind_btRaycastVehicle___destroy___0=function(){return f.asm.Wo.apply(null,arguments)},Wq=f._emscripten_bind_btRaycastVehicle_addWheel_7=function(){return f.asm.Xo.apply(null, +arguments)},Xq=f._emscripten_bind_btRaycastVehicle_applyEngineForce_2=function(){return f.asm.Yo.apply(null,arguments)},Yq=f._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=function(){return f.asm.Zo.apply(null,arguments)},Zq=f._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=function(){return f.asm._o.apply(null,arguments)},$q=f._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=function(){return f.asm.$o.apply(null,arguments)},ar=f._emscripten_bind_btRaycastVehicle_getForwardAxis_0= +function(){return f.asm.ap.apply(null,arguments)},br=f._emscripten_bind_btRaycastVehicle_getForwardVector_0=function(){return f.asm.bp.apply(null,arguments)},cr=f._emscripten_bind_btRaycastVehicle_getNumWheels_0=function(){return f.asm.cp.apply(null,arguments)},dr=f._emscripten_bind_btRaycastVehicle_getRightAxis_0=function(){return f.asm.dp.apply(null,arguments)},er=f._emscripten_bind_btRaycastVehicle_getRigidBody_0=function(){return f.asm.ep.apply(null,arguments)},fr=f._emscripten_bind_btRaycastVehicle_getSteeringValue_1= +function(){return f.asm.fp.apply(null,arguments)},gr=f._emscripten_bind_btRaycastVehicle_getUpAxis_0=function(){return f.asm.gp.apply(null,arguments)},hr=f._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=function(){return f.asm.hp.apply(null,arguments)},ir=f._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=function(){return f.asm.ip.apply(null,arguments)},jr=f._emscripten_bind_btRaycastVehicle_getWheelInfo_1=function(){return f.asm.jp.apply(null,arguments)},kr=f._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1= +function(){return f.asm.kp.apply(null,arguments)},lr=f._emscripten_bind_btRaycastVehicle_rayCast_1=function(){return f.asm.lp.apply(null,arguments)},mr=f._emscripten_bind_btRaycastVehicle_resetSuspension_0=function(){return f.asm.mp.apply(null,arguments)},nr=f._emscripten_bind_btRaycastVehicle_setBrake_2=function(){return f.asm.np.apply(null,arguments)},or=f._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=function(){return f.asm.op.apply(null,arguments)},pr=f._emscripten_bind_btRaycastVehicle_setPitchControl_1= +function(){return f.asm.pp.apply(null,arguments)},qr=f._emscripten_bind_btRaycastVehicle_setSteeringValue_2=function(){return f.asm.qp.apply(null,arguments)},rr=f._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=function(){return f.asm.rp.apply(null,arguments)},sr=f._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=function(){return f.asm.sp.apply(null,arguments)},tr=f._emscripten_bind_btRaycastVehicle_updateAction_2=function(){return f.asm.tp.apply(null,arguments)},ur=f._emscripten_bind_btRaycastVehicle_updateFriction_1= +function(){return f.asm.up.apply(null,arguments)},vr=f._emscripten_bind_btRaycastVehicle_updateSuspension_1=function(){return f.asm.vp.apply(null,arguments)},wr=f._emscripten_bind_btRaycastVehicle_updateVehicle_1=function(){return f.asm.wp.apply(null,arguments)},xr=f._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=function(){return f.asm.xp.apply(null,arguments)},yr=f._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=function(){return f.asm.yp.apply(null,arguments)},zr=f._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2= +function(){return f.asm.zp.apply(null,arguments)},Ar=f._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=function(){return f.asm.Ap.apply(null,arguments)},Br=f._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=function(){return f.asm.Bp.apply(null,arguments)},Cr=f._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=function(){return f.asm.Cp.apply(null,arguments)},Dr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0= +function(){return f.asm.Dp.apply(null,arguments)},Er=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=function(){return f.asm.Ep.apply(null,arguments)},Fr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=function(){return f.asm.Fp.apply(null,arguments)},Gr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=function(){return f.asm.Gp.apply(null,arguments)},Hr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0= +function(){return f.asm.Hp.apply(null,arguments)},Ir=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=function(){return f.asm.Ip.apply(null,arguments)},Jr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=function(){return f.asm.Jp.apply(null,arguments)},Kr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=function(){return f.asm.Kp.apply(null,arguments)},Lr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=function(){return f.asm.Lp.apply(null, +arguments)},Mr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=function(){return f.asm.Mp.apply(null,arguments)},Nr=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=function(){return f.asm.Np.apply(null,arguments)},Or=f._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=function(){return f.asm.Op.apply(null,arguments)},Pr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=function(){return f.asm.Pp.apply(null, +arguments)},Qr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=function(){return f.asm.Qp.apply(null,arguments)},Rr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=function(){return f.asm.Rp.apply(null,arguments)},Sr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=function(){return f.asm.Sp.apply(null,arguments)},Tr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1= +function(){return f.asm.Tp.apply(null,arguments)},Ur=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=function(){return f.asm.Up.apply(null,arguments)},Vr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=function(){return f.asm.Vp.apply(null,arguments)},Wr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=function(){return f.asm.Wp.apply(null,arguments)},Xr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=function(){return f.asm.Xp.apply(null, +arguments)},Yr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=function(){return f.asm.Yp.apply(null,arguments)},Zr=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=function(){return f.asm.Zp.apply(null,arguments)},$r=f._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=function(){return f.asm._p.apply(null,arguments)},as=f._emscripten_bind_btRigidBody___destroy___0=function(){return f.asm.$p.apply(null,arguments)},bs=f._emscripten_bind_btRigidBody_activate_0= +function(){return f.asm.aq.apply(null,arguments)},cs=f._emscripten_bind_btRigidBody_activate_1=function(){return f.asm.bq.apply(null,arguments)},ds=f._emscripten_bind_btRigidBody_applyCentralForce_1=function(){return f.asm.cq.apply(null,arguments)},es=f._emscripten_bind_btRigidBody_applyCentralImpulse_1=function(){return f.asm.dq.apply(null,arguments)},gs=f._emscripten_bind_btRigidBody_applyCentralLocalForce_1=function(){return f.asm.eq.apply(null,arguments)},hs=f._emscripten_bind_btRigidBody_applyForce_2= +function(){return f.asm.fq.apply(null,arguments)},is=f._emscripten_bind_btRigidBody_applyGravity_0=function(){return f.asm.gq.apply(null,arguments)},js=f._emscripten_bind_btRigidBody_applyImpulse_2=function(){return f.asm.hq.apply(null,arguments)},ks=f._emscripten_bind_btRigidBody_applyLocalTorque_1=function(){return f.asm.iq.apply(null,arguments)},ls=f._emscripten_bind_btRigidBody_applyTorqueImpulse_1=function(){return f.asm.jq.apply(null,arguments)},ms=f._emscripten_bind_btRigidBody_applyTorque_1= +function(){return f.asm.kq.apply(null,arguments)},ns=f._emscripten_bind_btRigidBody_btRigidBody_1=function(){return f.asm.lq.apply(null,arguments)},ps=f._emscripten_bind_btRigidBody_forceActivationState_1=function(){return f.asm.mq.apply(null,arguments)},qs=f._emscripten_bind_btRigidBody_getAabb_2=function(){return f.asm.nq.apply(null,arguments)},rs=f._emscripten_bind_btRigidBody_getAngularDamping_0=function(){return f.asm.oq.apply(null,arguments)},ss=f._emscripten_bind_btRigidBody_getAngularFactor_0= +function(){return f.asm.pq.apply(null,arguments)},ts=f._emscripten_bind_btRigidBody_getAngularVelocity_0=function(){return f.asm.qq.apply(null,arguments)},us=f._emscripten_bind_btRigidBody_getBroadphaseHandle_0=function(){return f.asm.rq.apply(null,arguments)},vs=f._emscripten_bind_btRigidBody_getBroadphaseProxy_0=function(){return f.asm.sq.apply(null,arguments)},xs=f._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=function(){return f.asm.tq.apply(null,arguments)},ys=f._emscripten_bind_btRigidBody_getCollisionFlags_0= +function(){return f.asm.uq.apply(null,arguments)},zs=f._emscripten_bind_btRigidBody_getCollisionShape_0=function(){return f.asm.vq.apply(null,arguments)},As=f._emscripten_bind_btRigidBody_getFriction_0=function(){return f.asm.wq.apply(null,arguments)},Bs=f._emscripten_bind_btRigidBody_getGravity_0=function(){return f.asm.xq.apply(null,arguments)},Cs=f._emscripten_bind_btRigidBody_getLinearDamping_0=function(){return f.asm.yq.apply(null,arguments)},Ds=f._emscripten_bind_btRigidBody_getLinearFactor_0= +function(){return f.asm.zq.apply(null,arguments)},Es=f._emscripten_bind_btRigidBody_getLinearVelocity_0=function(){return f.asm.Aq.apply(null,arguments)},Fs=f._emscripten_bind_btRigidBody_getMotionState_0=function(){return f.asm.Bq.apply(null,arguments)},Gs=f._emscripten_bind_btRigidBody_getRestitution_0=function(){return f.asm.Cq.apply(null,arguments)},Hs=f._emscripten_bind_btRigidBody_getRollingFriction_0=function(){return f.asm.Dq.apply(null,arguments)},Is=f._emscripten_bind_btRigidBody_getUserIndex_0= +function(){return f.asm.Eq.apply(null,arguments)},Js=f._emscripten_bind_btRigidBody_getUserPointer_0=function(){return f.asm.Fq.apply(null,arguments)},Ks=f._emscripten_bind_btRigidBody_getWorldTransform_0=function(){return f.asm.Gq.apply(null,arguments)},Ls=f._emscripten_bind_btRigidBody_isActive_0=function(){return f.asm.Hq.apply(null,arguments)},Ms=f._emscripten_bind_btRigidBody_isKinematicObject_0=function(){return f.asm.Iq.apply(null,arguments)},Ns=f._emscripten_bind_btRigidBody_isStaticObject_0= +function(){return f.asm.Jq.apply(null,arguments)},Os=f._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=function(){return f.asm.Kq.apply(null,arguments)},Ps=f._emscripten_bind_btRigidBody_setActivationState_1=function(){return f.asm.Lq.apply(null,arguments)},Qs=f._emscripten_bind_btRigidBody_setAngularFactor_1=function(){return f.asm.Mq.apply(null,arguments)},Rs=f._emscripten_bind_btRigidBody_setAngularVelocity_1=function(){return f.asm.Nq.apply(null,arguments)},Ss=f._emscripten_bind_btRigidBody_setAnisotropicFriction_2= +function(){return f.asm.Oq.apply(null,arguments)},Ts=f._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=function(){return f.asm.Pq.apply(null,arguments)},Us=f._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=function(){return f.asm.Qq.apply(null,arguments)},Vs=f._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=function(){return f.asm.Rq.apply(null,arguments)},Ws=f._emscripten_bind_btRigidBody_setCollisionFlags_1=function(){return f.asm.Sq.apply(null,arguments)},Xs=f._emscripten_bind_btRigidBody_setCollisionShape_1= +function(){return f.asm.Tq.apply(null,arguments)},Ys=f._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=function(){return f.asm.Uq.apply(null,arguments)},Zs=f._emscripten_bind_btRigidBody_setDamping_2=function(){return f.asm.Vq.apply(null,arguments)},$s=f._emscripten_bind_btRigidBody_setFriction_1=function(){return f.asm.Wq.apply(null,arguments)},at=f._emscripten_bind_btRigidBody_setGravity_1=function(){return f.asm.Xq.apply(null,arguments)},bt=f._emscripten_bind_btRigidBody_setLinearFactor_1= +function(){return f.asm.Yq.apply(null,arguments)},ct=f._emscripten_bind_btRigidBody_setLinearVelocity_1=function(){return f.asm.Zq.apply(null,arguments)},dt=f._emscripten_bind_btRigidBody_setMassProps_2=function(){return f.asm._q.apply(null,arguments)},et=f._emscripten_bind_btRigidBody_setMotionState_1=function(){return f.asm.$q.apply(null,arguments)},ft=f._emscripten_bind_btRigidBody_setRestitution_1=function(){return f.asm.ar.apply(null,arguments)},gt=f._emscripten_bind_btRigidBody_setRollingFriction_1= +function(){return f.asm.br.apply(null,arguments)},ht=f._emscripten_bind_btRigidBody_setSleepingThresholds_2=function(){return f.asm.cr.apply(null,arguments)},it=f._emscripten_bind_btRigidBody_setUserIndex_1=function(){return f.asm.dr.apply(null,arguments)},jt=f._emscripten_bind_btRigidBody_setUserPointer_1=function(){return f.asm.er.apply(null,arguments)},kt=f._emscripten_bind_btRigidBody_setWorldTransform_1=function(){return f.asm.fr.apply(null,arguments)},lt=f._emscripten_bind_btRigidBody_upcast_1= +function(){return f.asm.gr.apply(null,arguments)},mt=f._emscripten_bind_btRigidBody_updateInertiaTensor_0=function(){return f.asm.hr.apply(null,arguments)},nt=f._emscripten_bind_btScalarArray___destroy___0=function(){return f.asm.ir.apply(null,arguments)},ot=f._emscripten_bind_btScalarArray_at_1=function(){return f.asm.jr.apply(null,arguments)},pt=f._emscripten_bind_btScalarArray_size_0=function(){return f.asm.kr.apply(null,arguments)},qt=f._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0= +function(){return f.asm.lr.apply(null,arguments)},rt=f._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=function(){return f.asm.mr.apply(null,arguments)},st=f._emscripten_bind_btShapeHull___destroy___0=function(){return f.asm.nr.apply(null,arguments)},tt=f._emscripten_bind_btShapeHull_btShapeHull_1=function(){return f.asm.or.apply(null,arguments)},ut=f._emscripten_bind_btShapeHull_buildHull_1=function(){return f.asm.pr.apply(null,arguments)},vt=f._emscripten_bind_btShapeHull_getVertexPointer_0= +function(){return f.asm.qr.apply(null,arguments)},wt=f._emscripten_bind_btShapeHull_numVertices_0=function(){return f.asm.rr.apply(null,arguments)},xt=f._emscripten_bind_btSliderConstraint___destroy___0=function(){return f.asm.sr.apply(null,arguments)},yt=f._emscripten_bind_btSliderConstraint_btSliderConstraint_3=function(){return f.asm.tr.apply(null,arguments)},zt=f._emscripten_bind_btSliderConstraint_btSliderConstraint_5=function(){return f.asm.ur.apply(null,arguments)},At=f._emscripten_bind_btSliderConstraint_enableFeedback_1= +function(){return f.asm.vr.apply(null,arguments)},Bt=f._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.wr.apply(null,arguments)},Ct=f._emscripten_bind_btSliderConstraint_getParam_2=function(){return f.asm.xr.apply(null,arguments)},Dt=f._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.yr.apply(null,arguments)},Et=f._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=function(){return f.asm.zr.apply(null,arguments)}, +Ft=f._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=function(){return f.asm.Ar.apply(null,arguments)},Gt=f._emscripten_bind_btSliderConstraint_setParam_3=function(){return f.asm.Br.apply(null,arguments)},Ht=f._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=function(){return f.asm.Cr.apply(null,arguments)},It=f._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=function(){return f.asm.Dr.apply(null,arguments)},Jt=f._emscripten_bind_btSoftBodyArray___destroy___0=function(){return f.asm.Er.apply(null, +arguments)},Kt=f._emscripten_bind_btSoftBodyArray_at_1=function(){return f.asm.Fr.apply(null,arguments)},Lt=f._emscripten_bind_btSoftBodyArray_size_0=function(){return f.asm.Gr.apply(null,arguments)},Mt=f._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=function(){return f.asm.Hr.apply(null,arguments)},Nt=f._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=function(){return f.asm.Ir.apply(null,arguments)},Ot=f._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=function(){return f.asm.Jr.apply(null, +arguments)},Pt=f._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=function(){return f.asm.Kr.apply(null,arguments)},Qt=f._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=function(){return f.asm.Lr.apply(null,arguments)},Rt=f._emscripten_bind_btSoftBodyHelpers_CreateRope_5=function(){return f.asm.Mr.apply(null,arguments)},St=f._emscripten_bind_btSoftBodyHelpers___destroy___0=function(){return f.asm.Nr.apply(null,arguments)},Tt=f._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=function(){return f.asm.Or.apply(null, +arguments)},Ut=f._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=function(){return f.asm.Pr.apply(null,arguments)},Vt=f._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=function(){return f.asm.Qr.apply(null,arguments)},Wt=f._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=function(){return f.asm.Rr.apply(null,arguments)},Xt=f._emscripten_bind_btSoftBodySolver___destroy___0= +function(){return f.asm.Sr.apply(null,arguments)},Yt=f._emscripten_bind_btSoftBodyWorldInfo___destroy___0=function(){return f.asm.Tr.apply(null,arguments)},Zt=f._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=function(){return f.asm.Ur.apply(null,arguments)},$t=f._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=function(){return f.asm.Vr.apply(null,arguments)},au=f._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=function(){return f.asm.Wr.apply(null,arguments)},bu=f._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0= +function(){return f.asm.Xr.apply(null,arguments)},cu=f._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=function(){return f.asm.Yr.apply(null,arguments)},du=f._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=function(){return f.asm.Zr.apply(null,arguments)},eu=f._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=function(){return f.asm._r.apply(null,arguments)},fu=f._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=function(){return f.asm.$r.apply(null,arguments)},gu=f._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0= +function(){return f.asm.as.apply(null,arguments)},hu=f._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=function(){return f.asm.bs.apply(null,arguments)},iu=f._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=function(){return f.asm.cs.apply(null,arguments)},ju=f._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=function(){return f.asm.ds.apply(null,arguments)},ku=f._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=function(){return f.asm.es.apply(null,arguments)},lu=f._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1= +function(){return f.asm.fs.apply(null,arguments)},mu=f._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=function(){return f.asm.gs.apply(null,arguments)},nu=f._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=function(){return f.asm.hs.apply(null,arguments)},ou=f._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=function(){return f.asm.is.apply(null,arguments)},pu=f._emscripten_bind_btSoftBody___destroy___0=function(){return f.asm.js.apply(null,arguments)},qu=f._emscripten_bind_btSoftBody_activate_0= +function(){return f.asm.ks.apply(null,arguments)},ru=f._emscripten_bind_btSoftBody_activate_1=function(){return f.asm.ls.apply(null,arguments)},su=f._emscripten_bind_btSoftBody_addAeroForceToNode_2=function(){return f.asm.ms.apply(null,arguments)},tu=f._emscripten_bind_btSoftBody_addForce_1=function(){return f.asm.ns.apply(null,arguments)},uu=f._emscripten_bind_btSoftBody_addForce_2=function(){return f.asm.os.apply(null,arguments)},vu=f._emscripten_bind_btSoftBody_appendAnchor_4=function(){return f.asm.ps.apply(null, +arguments)},wu=f._emscripten_bind_btSoftBody_appendFace_4=function(){return f.asm.qs.apply(null,arguments)},xu=f._emscripten_bind_btSoftBody_appendLink_4=function(){return f.asm.rs.apply(null,arguments)},yu=f._emscripten_bind_btSoftBody_appendMaterial_0=function(){return f.asm.ss.apply(null,arguments)},zu=f._emscripten_bind_btSoftBody_appendNode_2=function(){return f.asm.ts.apply(null,arguments)},Au=f._emscripten_bind_btSoftBody_appendTetra_5=function(){return f.asm.us.apply(null,arguments)},Bu=f._emscripten_bind_btSoftBody_btSoftBody_4= +function(){return f.asm.vs.apply(null,arguments)},Cu=f._emscripten_bind_btSoftBody_checkFace_3=function(){return f.asm.ws.apply(null,arguments)},Du=f._emscripten_bind_btSoftBody_checkLink_2=function(){return f.asm.xs.apply(null,arguments)},Eu=f._emscripten_bind_btSoftBody_forceActivationState_1=function(){return f.asm.ys.apply(null,arguments)},Fu=f._emscripten_bind_btSoftBody_generateBendingConstraints_2=function(){return f.asm.zs.apply(null,arguments)},Gu=f._emscripten_bind_btSoftBody_generateClusters_1= +function(){return f.asm.As.apply(null,arguments)},Hu=f._emscripten_bind_btSoftBody_generateClusters_2=function(){return f.asm.Bs.apply(null,arguments)},Iu=f._emscripten_bind_btSoftBody_getBroadphaseHandle_0=function(){return f.asm.Cs.apply(null,arguments)},Ju=f._emscripten_bind_btSoftBody_getCollisionFlags_0=function(){return f.asm.Ds.apply(null,arguments)},Ku=f._emscripten_bind_btSoftBody_getCollisionShape_0=function(){return f.asm.Es.apply(null,arguments)},Lu=f._emscripten_bind_btSoftBody_getFriction_0= +function(){return f.asm.Fs.apply(null,arguments)},Mu=f._emscripten_bind_btSoftBody_getRestitution_0=function(){return f.asm.Gs.apply(null,arguments)},Nu=f._emscripten_bind_btSoftBody_getRollingFriction_0=function(){return f.asm.Hs.apply(null,arguments)},Ou=f._emscripten_bind_btSoftBody_getTotalMass_0=function(){return f.asm.Is.apply(null,arguments)},Pu=f._emscripten_bind_btSoftBody_getUserIndex_0=function(){return f.asm.Js.apply(null,arguments)},Qu=f._emscripten_bind_btSoftBody_getUserPointer_0=function(){return f.asm.Ks.apply(null, +arguments)},Ru=f._emscripten_bind_btSoftBody_getWorldTransform_0=function(){return f.asm.Ls.apply(null,arguments)},Su=f._emscripten_bind_btSoftBody_get_m_anchors_0=function(){return f.asm.Ms.apply(null,arguments)},Tu=f._emscripten_bind_btSoftBody_get_m_cfg_0=function(){return f.asm.Ns.apply(null,arguments)},Uu=f._emscripten_bind_btSoftBody_get_m_materials_0=function(){return f.asm.Os.apply(null,arguments)},Vu=f._emscripten_bind_btSoftBody_get_m_nodes_0=function(){return f.asm.Ps.apply(null,arguments)}, +Wu=f._emscripten_bind_btSoftBody_isActive_0=function(){return f.asm.Qs.apply(null,arguments)},Xu=f._emscripten_bind_btSoftBody_isKinematicObject_0=function(){return f.asm.Rs.apply(null,arguments)},Yu=f._emscripten_bind_btSoftBody_isStaticObject_0=function(){return f.asm.Ss.apply(null,arguments)},Zu=f._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=function(){return f.asm.Ts.apply(null,arguments)},$u=f._emscripten_bind_btSoftBody_rotate_1=function(){return f.asm.Us.apply(null,arguments)},av= +f._emscripten_bind_btSoftBody_scale_1=function(){return f.asm.Vs.apply(null,arguments)},bv=f._emscripten_bind_btSoftBody_setActivationState_1=function(){return f.asm.Ws.apply(null,arguments)},cv=f._emscripten_bind_btSoftBody_setAnisotropicFriction_2=function(){return f.asm.Xs.apply(null,arguments)},dv=f._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=function(){return f.asm.Ys.apply(null,arguments)},ev=f._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=function(){return f.asm.Zs.apply(null, +arguments)},fv=f._emscripten_bind_btSoftBody_setCollisionFlags_1=function(){return f.asm._s.apply(null,arguments)},gv=f._emscripten_bind_btSoftBody_setCollisionShape_1=function(){return f.asm.$s.apply(null,arguments)},hv=f._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=function(){return f.asm.at.apply(null,arguments)},iv=f._emscripten_bind_btSoftBody_setFriction_1=function(){return f.asm.bt.apply(null,arguments)},jv=f._emscripten_bind_btSoftBody_setMass_2=function(){return f.asm.ct.apply(null, +arguments)},kv=f._emscripten_bind_btSoftBody_setRestitution_1=function(){return f.asm.dt.apply(null,arguments)},lv=f._emscripten_bind_btSoftBody_setRollingFriction_1=function(){return f.asm.et.apply(null,arguments)},mv=f._emscripten_bind_btSoftBody_setTotalMass_2=function(){return f.asm.ft.apply(null,arguments)},nv=f._emscripten_bind_btSoftBody_setUserIndex_1=function(){return f.asm.gt.apply(null,arguments)},ov=f._emscripten_bind_btSoftBody_setUserPointer_1=function(){return f.asm.ht.apply(null,arguments)}, +pv=f._emscripten_bind_btSoftBody_setWorldTransform_1=function(){return f.asm.it.apply(null,arguments)},qv=f._emscripten_bind_btSoftBody_set_m_anchors_1=function(){return f.asm.jt.apply(null,arguments)},rv=f._emscripten_bind_btSoftBody_set_m_cfg_1=function(){return f.asm.kt.apply(null,arguments)},sv=f._emscripten_bind_btSoftBody_set_m_materials_1=function(){return f.asm.lt.apply(null,arguments)},tv=f._emscripten_bind_btSoftBody_set_m_nodes_1=function(){return f.asm.mt.apply(null,arguments)},uv=f._emscripten_bind_btSoftBody_transform_1= +function(){return f.asm.nt.apply(null,arguments)},vv=f._emscripten_bind_btSoftBody_translate_1=function(){return f.asm.ot.apply(null,arguments)},wv=f._emscripten_bind_btSoftBody_upcast_1=function(){return f.asm.pt.apply(null,arguments)},xv=f._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=function(){return f.asm.qt.apply(null,arguments)},yv=f._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=function(){return f.asm.rt.apply(null,arguments)},zv=f._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1= +function(){return f.asm.st.apply(null,arguments)},Av=f._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=function(){return f.asm.tt.apply(null,arguments)},Bv=f._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=function(){return f.asm.ut.apply(null,arguments)},Cv=f._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=function(){return f.asm.vt.apply(null,arguments)},Dv=f._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=function(){return f.asm.wt.apply(null,arguments)}, +Ev=f._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=function(){return f.asm.xt.apply(null,arguments)},Fv=f._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=function(){return f.asm.yt.apply(null,arguments)},Gv=f._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=function(){return f.asm.zt.apply(null,arguments)},Hv=f._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=function(){return f.asm.At.apply(null,arguments)},Iv=f._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3= +function(){return f.asm.Bt.apply(null,arguments)},Jv=f._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=function(){return f.asm.Ct.apply(null,arguments)},Kv=f._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=function(){return f.asm.Dt.apply(null,arguments)},Lv=f._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=function(){return f.asm.Et.apply(null,arguments)},Mv=f._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=function(){return f.asm.Ft.apply(null,arguments)}, +Nv=f._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=function(){return f.asm.Gt.apply(null,arguments)},Ov=f._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=function(){return f.asm.Ht.apply(null,arguments)},Pv=f._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=function(){return f.asm.It.apply(null,arguments)},Qv=f._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=function(){return f.asm.Jt.apply(null,arguments)},Rv=f._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0= +function(){return f.asm.Kt.apply(null,arguments)},Sv=f._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=function(){return f.asm.Lt.apply(null,arguments)},Tv=f._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=function(){return f.asm.Mt.apply(null,arguments)},Uv=f._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=function(){return f.asm.Nt.apply(null,arguments)},Vv=f._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=function(){return f.asm.Ot.apply(null,arguments)}, +Wv=f._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=function(){return f.asm.Pt.apply(null,arguments)},Xv=f._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=function(){return f.asm.Qt.apply(null,arguments)},Yv=f._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=function(){return f.asm.Rt.apply(null,arguments)},Zv=f._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=function(){return f.asm.St.apply(null,arguments)},$v=f._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1= +function(){return f.asm.Tt.apply(null,arguments)},aw=f._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=function(){return f.asm.Ut.apply(null,arguments)},bw=f._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=function(){return f.asm.Vt.apply(null,arguments)},cw=f._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=function(){return f.asm.Wt.apply(null,arguments)},dw=f._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=function(){return f.asm.Xt.apply(null, +arguments)},ew=f._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=function(){return f.asm.Yt.apply(null,arguments)},fw=f._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=function(){return f.asm.Zt.apply(null,arguments)},gw=f._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=function(){return f.asm._t.apply(null,arguments)},hw=f._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=function(){return f.asm.$t.apply(null,arguments)},iw=f._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3= +function(){return f.asm.au.apply(null,arguments)},jw=f._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=function(){return f.asm.bu.apply(null,arguments)},kw=f._emscripten_bind_btSphereShape___destroy___0=function(){return f.asm.cu.apply(null,arguments)},lw=f._emscripten_bind_btSphereShape_btSphereShape_1=function(){return f.asm.du.apply(null,arguments)},mw=f._emscripten_bind_btSphereShape_calculateLocalInertia_2=function(){return f.asm.eu.apply(null,arguments)},nw=f._emscripten_bind_btSphereShape_getLocalScaling_0= +function(){return f.asm.fu.apply(null,arguments)},ow=f._emscripten_bind_btSphereShape_getMargin_0=function(){return f.asm.gu.apply(null,arguments)},pw=f._emscripten_bind_btSphereShape_setLocalScaling_1=function(){return f.asm.hu.apply(null,arguments)},qw=f._emscripten_bind_btSphereShape_setMargin_1=function(){return f.asm.iu.apply(null,arguments)},rw=f._emscripten_bind_btStaticPlaneShape___destroy___0=function(){return f.asm.ju.apply(null,arguments)},sw=f._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2= +function(){return f.asm.ku.apply(null,arguments)},tw=f._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=function(){return f.asm.lu.apply(null,arguments)},uw=f._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=function(){return f.asm.mu.apply(null,arguments)},vw=f._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=function(){return f.asm.nu.apply(null,arguments)},ww=f._emscripten_bind_btStridingMeshInterface___destroy___0=function(){return f.asm.ou.apply(null,arguments)},xw=f._emscripten_bind_btStridingMeshInterface_setScaling_1= +function(){return f.asm.pu.apply(null,arguments)},yw=f._emscripten_bind_btTransform___destroy___0=function(){return f.asm.qu.apply(null,arguments)},zw=f._emscripten_bind_btTransform_btTransform_0=function(){return f.asm.ru.apply(null,arguments)},Aw=f._emscripten_bind_btTransform_btTransform_2=function(){return f.asm.su.apply(null,arguments)},Bw=f._emscripten_bind_btTransform_getBasis_0=function(){return f.asm.tu.apply(null,arguments)},Cw=f._emscripten_bind_btTransform_getOrigin_0=function(){return f.asm.uu.apply(null, +arguments)},Dw=f._emscripten_bind_btTransform_getRotation_0=function(){return f.asm.vu.apply(null,arguments)},Ew=f._emscripten_bind_btTransform_inverse_0=function(){return f.asm.wu.apply(null,arguments)},Fw=f._emscripten_bind_btTransform_op_mul_1=function(){return f.asm.xu.apply(null,arguments)},Gw=f._emscripten_bind_btTransform_setFromOpenGLMatrix_1=function(){return f.asm.yu.apply(null,arguments)},Hw=f._emscripten_bind_btTransform_setIdentity_0=function(){return f.asm.zu.apply(null,arguments)}, +Iw=f._emscripten_bind_btTransform_setOrigin_1=function(){return f.asm.Au.apply(null,arguments)},Jw=f._emscripten_bind_btTransform_setRotation_1=function(){return f.asm.Bu.apply(null,arguments)},Kw=f._emscripten_bind_btTriangleMeshShape___destroy___0=function(){return f.asm.Cu.apply(null,arguments)},Lw=f._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=function(){return f.asm.Du.apply(null,arguments)},Mw=f._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=function(){return f.asm.Eu.apply(null, +arguments)},Nw=f._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=function(){return f.asm.Fu.apply(null,arguments)},Ow=f._emscripten_bind_btTriangleMesh___destroy___0=function(){return f.asm.Gu.apply(null,arguments)},Pw=f._emscripten_bind_btTriangleMesh_addIndex_1=function(){return f.asm.Hu.apply(null,arguments)},Qw=f._emscripten_bind_btTriangleMesh_addTriangle_3=function(){return f.asm.Iu.apply(null,arguments)},Rw=f._emscripten_bind_btTriangleMesh_addTriangle_4=function(){return f.asm.Ju.apply(null, +arguments)},Sw=f._emscripten_bind_btTriangleMesh_btTriangleMesh_0=function(){return f.asm.Ku.apply(null,arguments)},Tw=f._emscripten_bind_btTriangleMesh_btTriangleMesh_1=function(){return f.asm.Lu.apply(null,arguments)},Uw=f._emscripten_bind_btTriangleMesh_btTriangleMesh_2=function(){return f.asm.Mu.apply(null,arguments)},Vw=f._emscripten_bind_btTriangleMesh_findOrAddVertex_2=function(){return f.asm.Nu.apply(null,arguments)},Ww=f._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=function(){return f.asm.Ou.apply(null, +arguments)},Xw=f._emscripten_bind_btTriangleMesh_setScaling_1=function(){return f.asm.Pu.apply(null,arguments)},Yw=f._emscripten_bind_btTypedConstraint___destroy___0=function(){return f.asm.Qu.apply(null,arguments)},Zw=f._emscripten_bind_btTypedConstraint_enableFeedback_1=function(){return f.asm.Ru.apply(null,arguments)},$w=f._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=function(){return f.asm.Su.apply(null,arguments)},ax=f._emscripten_bind_btTypedConstraint_getParam_2=function(){return f.asm.Tu.apply(null, +arguments)},bx=f._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=function(){return f.asm.Uu.apply(null,arguments)},cx=f._emscripten_bind_btTypedConstraint_setParam_3=function(){return f.asm.Vu.apply(null,arguments)},dx=f._emscripten_bind_btVector3Array___destroy___0=function(){return f.asm.Wu.apply(null,arguments)},ex=f._emscripten_bind_btVector3Array_at_1=function(){return f.asm.Xu.apply(null,arguments)},fx=f._emscripten_bind_btVector3Array_size_0=function(){return f.asm.Yu.apply(null, +arguments)},gx=f._emscripten_bind_btVector3___destroy___0=function(){return f.asm.Zu.apply(null,arguments)},hx=f._emscripten_bind_btVector3_btVector3_0=function(){return f.asm._u.apply(null,arguments)},ix=f._emscripten_bind_btVector3_btVector3_3=function(){return f.asm.$u.apply(null,arguments)},jx=f._emscripten_bind_btVector3_dot_1=function(){return f.asm.av.apply(null,arguments)},kx=f._emscripten_bind_btVector3_length_0=function(){return f.asm.bv.apply(null,arguments)},lx=f._emscripten_bind_btVector3_normalize_0= +function(){return f.asm.cv.apply(null,arguments)},mx=f._emscripten_bind_btVector3_op_add_1=function(){return f.asm.dv.apply(null,arguments)},nx=f._emscripten_bind_btVector3_op_mul_1=function(){return f.asm.ev.apply(null,arguments)},ox=f._emscripten_bind_btVector3_op_sub_1=function(){return f.asm.fv.apply(null,arguments)},px=f._emscripten_bind_btVector3_rotate_2=function(){return f.asm.gv.apply(null,arguments)},qx=f._emscripten_bind_btVector3_setValue_3=function(){return f.asm.hv.apply(null,arguments)}, +rx=f._emscripten_bind_btVector3_setX_1=function(){return f.asm.iv.apply(null,arguments)},sx=f._emscripten_bind_btVector3_setY_1=function(){return f.asm.jv.apply(null,arguments)},tx=f._emscripten_bind_btVector3_setZ_1=function(){return f.asm.kv.apply(null,arguments)},ux=f._emscripten_bind_btVector3_x_0=function(){return f.asm.lv.apply(null,arguments)},vx=f._emscripten_bind_btVector3_y_0=function(){return f.asm.mv.apply(null,arguments)},wx=f._emscripten_bind_btVector3_z_0=function(){return f.asm.nv.apply(null, +arguments)},xx=f._emscripten_bind_btVector4___destroy___0=function(){return f.asm.ov.apply(null,arguments)},yx=f._emscripten_bind_btVector4_btVector4_0=function(){return f.asm.pv.apply(null,arguments)},zx=f._emscripten_bind_btVector4_btVector4_4=function(){return f.asm.qv.apply(null,arguments)},Ax=f._emscripten_bind_btVector4_dot_1=function(){return f.asm.rv.apply(null,arguments)},Bx=f._emscripten_bind_btVector4_length_0=function(){return f.asm.sv.apply(null,arguments)},Cx=f._emscripten_bind_btVector4_normalize_0= +function(){return f.asm.tv.apply(null,arguments)},Dx=f._emscripten_bind_btVector4_op_add_1=function(){return f.asm.uv.apply(null,arguments)},Ex=f._emscripten_bind_btVector4_op_mul_1=function(){return f.asm.vv.apply(null,arguments)},Fx=f._emscripten_bind_btVector4_op_sub_1=function(){return f.asm.wv.apply(null,arguments)},Gx=f._emscripten_bind_btVector4_rotate_2=function(){return f.asm.xv.apply(null,arguments)},Hx=f._emscripten_bind_btVector4_setValue_4=function(){return f.asm.yv.apply(null,arguments)}, +Ix=f._emscripten_bind_btVector4_setX_1=function(){return f.asm.zv.apply(null,arguments)},Jx=f._emscripten_bind_btVector4_setY_1=function(){return f.asm.Av.apply(null,arguments)},Kx=f._emscripten_bind_btVector4_setZ_1=function(){return f.asm.Bv.apply(null,arguments)},Lx=f._emscripten_bind_btVector4_w_0=function(){return f.asm.Cv.apply(null,arguments)},Mx=f._emscripten_bind_btVector4_x_0=function(){return f.asm.Dv.apply(null,arguments)},Nx=f._emscripten_bind_btVector4_y_0=function(){return f.asm.Ev.apply(null, +arguments)},Ox=f._emscripten_bind_btVector4_z_0=function(){return f.asm.Fv.apply(null,arguments)},Px=f._emscripten_bind_btVehicleRaycasterResult___destroy___0=function(){return f.asm.Gv.apply(null,arguments)},Qx=f._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=function(){return f.asm.Hv.apply(null,arguments)},Rx=f._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=function(){return f.asm.Iv.apply(null,arguments)},Sx=f._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0= +function(){return f.asm.Jv.apply(null,arguments)},Tx=f._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=function(){return f.asm.Kv.apply(null,arguments)},Ux=f._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=function(){return f.asm.Lv.apply(null,arguments)},Vx=f._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=function(){return f.asm.Mv.apply(null,arguments)},Wx=f._emscripten_bind_btVehicleRaycaster___destroy___0=function(){return f.asm.Nv.apply(null, +arguments)},Xx=f._emscripten_bind_btVehicleRaycaster_castRay_3=function(){return f.asm.Ov.apply(null,arguments)},Yx=f._emscripten_bind_btVehicleTuning_btVehicleTuning_0=function(){return f.asm.Pv.apply(null,arguments)},Zx=f._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=function(){return f.asm.Qv.apply(null,arguments)},$x=f._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=function(){return f.asm.Rv.apply(null,arguments)},ay=f._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0= +function(){return f.asm.Sv.apply(null,arguments)},by=f._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=function(){return f.asm.Tv.apply(null,arguments)},cy=f._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=function(){return f.asm.Uv.apply(null,arguments)},dy=f._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=function(){return f.asm.Vv.apply(null,arguments)},ey=f._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=function(){return f.asm.Wv.apply(null,arguments)}, +fy=f._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=function(){return f.asm.Xv.apply(null,arguments)},gy=f._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=function(){return f.asm.Yv.apply(null,arguments)},hy=f._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=function(){return f.asm.Zv.apply(null,arguments)},iy=f._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=function(){return f.asm._v.apply(null,arguments)},jy=f._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1= +function(){return f.asm.$v.apply(null,arguments)},ky=f._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=function(){return f.asm.aw.apply(null,arguments)},ly=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=function(){return f.asm.bw.apply(null,arguments)},my=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=function(){return f.asm.cw.apply(null,arguments)},ny=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=function(){return f.asm.dw.apply(null, +arguments)},oy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=function(){return f.asm.ew.apply(null,arguments)},py=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=function(){return f.asm.fw.apply(null,arguments)},qy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=function(){return f.asm.gw.apply(null,arguments)},ry=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=function(){return f.asm.hw.apply(null, +arguments)},sy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=function(){return f.asm.iw.apply(null,arguments)},ty=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=function(){return f.asm.jw.apply(null,arguments)},uy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=function(){return f.asm.kw.apply(null,arguments)},vy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=function(){return f.asm.lw.apply(null,arguments)}, +wy=f._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=function(){return f.asm.mw.apply(null,arguments)},xy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=function(){return f.asm.nw.apply(null,arguments)},yy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=function(){return f.asm.ow.apply(null,arguments)},zy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=function(){return f.asm.pw.apply(null,arguments)}, +Ay=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=function(){return f.asm.qw.apply(null,arguments)},By=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=function(){return f.asm.rw.apply(null,arguments)},Cy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=function(){return f.asm.sw.apply(null,arguments)},Dy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=function(){return f.asm.tw.apply(null, +arguments)},Ey=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=function(){return f.asm.uw.apply(null,arguments)},Fy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=function(){return f.asm.vw.apply(null,arguments)},Gy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=function(){return f.asm.ww.apply(null,arguments)},Hy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=function(){return f.asm.xw.apply(null,arguments)}, +Iy=f._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=function(){return f.asm.yw.apply(null,arguments)},Jy=f._emscripten_bind_btWheelInfo___destroy___0=function(){return f.asm.zw.apply(null,arguments)},Ky=f._emscripten_bind_btWheelInfo_btWheelInfo_1=function(){return f.asm.Aw.apply(null,arguments)},Ly=f._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=function(){return f.asm.Bw.apply(null,arguments)},My=f._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=function(){return f.asm.Cw.apply(null, +arguments)},Ny=f._emscripten_bind_btWheelInfo_get_m_brake_0=function(){return f.asm.Dw.apply(null,arguments)},Oy=f._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=function(){return f.asm.Ew.apply(null,arguments)},Py=f._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=function(){return f.asm.Fw.apply(null,arguments)},Qy=f._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=function(){return f.asm.Gw.apply(null,arguments)},Ry=f._emscripten_bind_btWheelInfo_get_m_engineForce_0= +function(){return f.asm.Hw.apply(null,arguments)},Sy=f._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=function(){return f.asm.Iw.apply(null,arguments)},Ty=f._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=function(){return f.asm.Jw.apply(null,arguments)},Uy=f._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=function(){return f.asm.Kw.apply(null,arguments)},Vy=f._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=function(){return f.asm.Lw.apply(null,arguments)},Wy=f._emscripten_bind_btWheelInfo_get_m_rollInfluence_0= +function(){return f.asm.Mw.apply(null,arguments)},Xy=f._emscripten_bind_btWheelInfo_get_m_rotation_0=function(){return f.asm.Nw.apply(null,arguments)},Yy=f._emscripten_bind_btWheelInfo_get_m_skidInfo_0=function(){return f.asm.Ow.apply(null,arguments)},Zy=f._emscripten_bind_btWheelInfo_get_m_steering_0=function(){return f.asm.Pw.apply(null,arguments)},$y=f._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=function(){return f.asm.Qw.apply(null,arguments)},az=f._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0= +function(){return f.asm.Rw.apply(null,arguments)},bz=f._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=function(){return f.asm.Sw.apply(null,arguments)},cz=f._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=function(){return f.asm.Tw.apply(null,arguments)},dz=f._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=function(){return f.asm.Uw.apply(null,arguments)},ez=f._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=function(){return f.asm.Vw.apply(null,arguments)},fz=f._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0= +function(){return f.asm.Ww.apply(null,arguments)},gz=f._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=function(){return f.asm.Xw.apply(null,arguments)},hz=f._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=function(){return f.asm.Yw.apply(null,arguments)},iz=f._emscripten_bind_btWheelInfo_get_m_worldTransform_0=function(){return f.asm.Zw.apply(null,arguments)},jz=f._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=function(){return f.asm._w.apply(null,arguments)},kz=f._emscripten_bind_btWheelInfo_set_m_brake_1= +function(){return f.asm.$w.apply(null,arguments)},lz=f._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=function(){return f.asm.ax.apply(null,arguments)},mz=f._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=function(){return f.asm.bx.apply(null,arguments)},nz=f._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=function(){return f.asm.cx.apply(null,arguments)},oz=f._emscripten_bind_btWheelInfo_set_m_engineForce_1=function(){return f.asm.dx.apply(null,arguments)},pz= +f._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=function(){return f.asm.ex.apply(null,arguments)},qz=f._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=function(){return f.asm.fx.apply(null,arguments)},rz=f._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=function(){return f.asm.gx.apply(null,arguments)},sz=f._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=function(){return f.asm.hx.apply(null,arguments)},tz=f._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=function(){return f.asm.ix.apply(null, +arguments)},uz=f._emscripten_bind_btWheelInfo_set_m_rotation_1=function(){return f.asm.jx.apply(null,arguments)},vz=f._emscripten_bind_btWheelInfo_set_m_skidInfo_1=function(){return f.asm.kx.apply(null,arguments)},wz=f._emscripten_bind_btWheelInfo_set_m_steering_1=function(){return f.asm.lx.apply(null,arguments)},xz=f._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=function(){return f.asm.mx.apply(null,arguments)},yz=f._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=function(){return f.asm.nx.apply(null, +arguments)},zz=f._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=function(){return f.asm.ox.apply(null,arguments)},Az=f._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=function(){return f.asm.px.apply(null,arguments)},Bz=f._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=function(){return f.asm.qx.apply(null,arguments)},Cz=f._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=function(){return f.asm.rx.apply(null,arguments)},Dz=f._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1= +function(){return f.asm.sx.apply(null,arguments)},Ez=f._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=function(){return f.asm.tx.apply(null,arguments)},Fz=f._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=function(){return f.asm.ux.apply(null,arguments)},Gz=f._emscripten_bind_btWheelInfo_set_m_worldTransform_1=function(){return f.asm.vx.apply(null,arguments)},Hz=f._emscripten_bind_btWheelInfo_updateWheel_2=function(){return f.asm.wx.apply(null,arguments)},Iz=f._emscripten_bind_tAnchorArray___destroy___0= +function(){return f.asm.xx.apply(null,arguments)},Jz=f._emscripten_bind_tAnchorArray_at_1=function(){return f.asm.yx.apply(null,arguments)},Kz=f._emscripten_bind_tAnchorArray_clear_0=function(){return f.asm.zx.apply(null,arguments)},Lz=f._emscripten_bind_tAnchorArray_pop_back_0=function(){return f.asm.Ax.apply(null,arguments)},Mz=f._emscripten_bind_tAnchorArray_push_back_1=function(){return f.asm.Bx.apply(null,arguments)},Nz=f._emscripten_bind_tAnchorArray_size_0=function(){return f.asm.Cx.apply(null, +arguments)},Oz=f._emscripten_bind_tMaterialArray___destroy___0=function(){return f.asm.Dx.apply(null,arguments)},Pz=f._emscripten_bind_tMaterialArray_at_1=function(){return f.asm.Ex.apply(null,arguments)},Qz=f._emscripten_bind_tMaterialArray_size_0=function(){return f.asm.Fx.apply(null,arguments)},Rz=f._emscripten_bind_tNodeArray___destroy___0=function(){return f.asm.Gx.apply(null,arguments)},Sz=f._emscripten_bind_tNodeArray_at_1=function(){return f.asm.Hx.apply(null,arguments)},Tz=f._emscripten_bind_tNodeArray_size_0= +function(){return f.asm.Ix.apply(null,arguments)},Uz=f._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=function(){return f.asm.Jx.apply(null,arguments)},Vz=f._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=function(){return f.asm.Kx.apply(null,arguments)},Wz=f._emscripten_enum_PHY_ScalarType_PHY_FLOAT=function(){return f.asm.Lx.apply(null,arguments)},Xz=f._emscripten_enum_PHY_ScalarType_PHY_INTEGER=function(){return f.asm.Mx.apply(null,arguments)},Yz=f._emscripten_enum_PHY_ScalarType_PHY_SHORT=function(){return f.asm.Nx.apply(null, +arguments)},Zz=f._emscripten_enum_PHY_ScalarType_PHY_UCHAR=function(){return f.asm.Ox.apply(null,arguments)},$z=f._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=function(){return f.asm.Px.apply(null,arguments)},aA=f._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=function(){return f.asm.Qx.apply(null,arguments)},bA=f._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=function(){return f.asm.Rx.apply(null,arguments)},cA=f._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP= +function(){return f.asm.Sx.apply(null,arguments)};f._free=function(){return f.asm.Tx.apply(null,arguments)};f._malloc=function(){return f.asm.Ux.apply(null,arguments)};f.dynCall_v=function(){return f.asm.Vx.apply(null,arguments)};f.dynCall_vi=function(){return f.asm.Wx.apply(null,arguments)};f.asm=bb;f.UTF8ToString=function(a,c){return a?wa(ya,a,c):""};var dA;f.then=function(a){if(dA)a(f);else{var c=f.onRuntimeInitialized;f.onRuntimeInitialized=function(){c&&c();a(f)}}return f}; +Oa=function eA(){dA||fA();dA||(Oa=eA)}; +function fA(){function a(){if(!dA&&(dA=!0,!ua)){Ia=!0;Da(Fa);Da(Ga);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;){var a=f.postRun.shift();Ha.unshift(a)}Da(Ha)}}if(!(0=b.size?(assert(0>=1;break;case 4:d>>=2;break; +case 8:d>>=3}for(var e=0;e=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4}c=Array(c+1);e=c.length;d=0;if(0=n){var A=a.charCodeAt(++g);n=65536+((n&1023)<<10)|A&1023}if(127>=n){if(d>=e)break;c[d++]=n}else{if(2047>=n){if(d+1>=e)break;c[d++]=192|n>>6}else{if(65535>=n){if(d+2>=e)break;c[d++]=224| +n>>12}else{if(d+3>=e)break;c[d++]=240|n>>18;c[d++]=128|n>>12&63}c[d++]=128|n>>6&63}c[d++]=128|n&63}}c[d]=0}a=b.xy(c,xa);b.copy(c,xa,a)}return a}function hA(a){if("object"===typeof a){var c=b.xy(a,Aa);b.copy(a,Aa,c);return c}return a}function iA(){throw"cannot construct a btCollisionWorld, no constructor in IDL";}iA.prototype=Object.create(h.prototype);iA.prototype.constructor=iA;iA.prototype.Yx=iA;iA.Zx={};f.btCollisionWorld=iA;iA.prototype.getDispatcher=function(){return l(qh(this.Xx),jA)}; +iA.prototype.rayTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);sh(e,a,c,d)};iA.prototype.getPairCache=function(){return l(rh(this.Xx),kA)};iA.prototype.getDispatchInfo=function(){return l(ph(this.Xx),m)}; +iA.prototype.addCollisionObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?fh(e,a):void 0===d?gh(e,a,c):hh(e,a,c,d)};iA.prototype.removeCollisionObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);th(c,a)};iA.prototype.getBroadphase=function(){return l(nh(this.Xx),lA)}; +iA.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);kh(n,a,c,d,e,g)};iA.prototype.contactPairTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);ih(e,a,c,d)}; +iA.prototype.contactTest=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);jh(d,a,c)};iA.prototype.updateSingleAabb=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vh(c,a)};iA.prototype.setDebugDrawer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);uh(c,a)};iA.prototype.getDebugDrawer=function(){return l(oh(this.Xx),mA)};iA.prototype.debugDrawWorld=function(){mh(this.Xx)}; +iA.prototype.debugDrawObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);lh(e,a,c,d)};iA.prototype.__destroy__=function(){eh(this.Xx)};function p(){throw"cannot construct a btCollisionShape, no constructor in IDL";}p.prototype=Object.create(h.prototype);p.prototype.constructor=p;p.prototype.Yx=p;p.Zx={};f.btCollisionShape=p; +p.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ch(c,a)};p.prototype.getLocalScaling=function(){return l(ah(this.Xx),q)};p.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);$g(d,a,c)};p.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dh(c,a)};p.prototype.getMargin=function(){return bh(this.Xx)};p.prototype.__destroy__=function(){Zg(this.Xx)}; +function r(){throw"cannot construct a btCollisionObject, no constructor in IDL";}r.prototype=Object.create(h.prototype);r.prototype.constructor=r;r.prototype.Yx=r;r.Zx={};f.btCollisionObject=r;r.prototype.setAnisotropicFriction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Ng(d,a,c)};r.prototype.getCollisionShape=function(){return l(Bg(this.Xx),p)}; +r.prototype.setContactProcessingThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Sg(c,a)};r.prototype.setActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mg(c,a)};r.prototype.forceActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yg(c,a)};r.prototype.activate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);void 0===a?wg(c):xg(c,a)};r.prototype.isActive=function(){return!!Ig(this.Xx)};r.prototype.isKinematicObject=function(){return!!Jg(this.Xx)}; +r.prototype.isStaticObject=function(){return!!Kg(this.Xx)};r.prototype.isStaticOrKinematicObject=function(){return!!Lg(this.Xx)};r.prototype.getRestitution=function(){return Dg(this.Xx)};r.prototype.getFriction=function(){return Cg(this.Xx)};r.prototype.getRollingFriction=function(){return Eg(this.Xx)};r.prototype.setRestitution=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ug(c,a)};r.prototype.setFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Tg(c,a)}; +r.prototype.setRollingFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Vg(c,a)};r.prototype.getWorldTransform=function(){return l(Hg(this.Xx),t)};r.prototype.getCollisionFlags=function(){return Ag(this.Xx)};r.prototype.setCollisionFlags=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qg(c,a)};r.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Yg(c,a)}; +r.prototype.setCollisionShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Rg(c,a)};r.prototype.setCcdMotionThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Og(c,a)};r.prototype.setCcdSweptSphereRadius=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pg(c,a)};r.prototype.getUserIndex=function(){return Fg(this.Xx)};r.prototype.setUserIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Wg(c,a)}; +r.prototype.getUserPointer=function(){return l(Gg(this.Xx),nA)};r.prototype.setUserPointer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Xg(c,a)};r.prototype.getBroadphaseHandle=function(){return l(zg(this.Xx),u)};r.prototype.__destroy__=function(){vg(this.Xx)};function oA(){throw"cannot construct a btDynamicsWorld, no constructor in IDL";}oA.prototype=Object.create(iA.prototype);oA.prototype.constructor=oA;oA.prototype.Yx=oA;oA.Zx={};f.btDynamicsWorld=oA; +oA.prototype.addAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sl(c,a)};oA.prototype.removeAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Il(c,a)};oA.prototype.getSolverInfo=function(){return l(Gl(this.Xx),v)};oA.prototype.getDispatcher=function(){return l(El(this.Xx),jA)};oA.prototype.rayTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Hl(e,a,c,d)}; +oA.prototype.getPairCache=function(){return l(Fl(this.Xx),kA)};oA.prototype.getDispatchInfo=function(){return l(Dl(this.Xx),m)};oA.prototype.addCollisionObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?tl(e,a):void 0===d?ul(e,a,c):vl(e,a,c,d)};oA.prototype.removeCollisionObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jl(c,a)}; +oA.prototype.getBroadphase=function(){return l(Bl(this.Xx),lA)};oA.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);yl(n,a,c,d,e,g)};oA.prototype.contactPairTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);wl(e,a,c,d)}; +oA.prototype.contactTest=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);xl(d,a,c)};oA.prototype.updateSingleAabb=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ll(c,a)};oA.prototype.setDebugDrawer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kl(c,a)};oA.prototype.getDebugDrawer=function(){return l(Cl(this.Xx),mA)};oA.prototype.debugDrawWorld=function(){Al(this.Xx)}; +oA.prototype.debugDrawObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);zl(e,a,c,d)};oA.prototype.__destroy__=function(){rl(this.Xx)};function pA(){throw"cannot construct a btTypedConstraint, no constructor in IDL";}pA.prototype=Object.create(h.prototype);pA.prototype.constructor=pA;pA.prototype.Yx=pA;pA.Zx={};f.btTypedConstraint=pA; +pA.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zw(c,a)};pA.prototype.getBreakingImpulseThreshold=function(){return $w(this.Xx)};pA.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bx(c,a)};pA.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return ax(d,a,c)}; +pA.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);cx(e,a,c,d)};pA.prototype.__destroy__=function(){Yw(this.Xx)};function qA(){throw"cannot construct a btConcaveShape, no constructor in IDL";}qA.prototype=Object.create(p.prototype);qA.prototype.constructor=qA;qA.prototype.Yx=qA;qA.Zx={};f.btConcaveShape=qA; +qA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Oh(c,a)};qA.prototype.getLocalScaling=function(){return l(Nh(this.Xx),q)};qA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Mh(d,a,c)};qA.prototype.__destroy__=function(){Lh(this.Xx)};function rA(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=eg(a,c);k(rA)[this.Xx]=this}rA.prototype=Object.create(p.prototype); +rA.prototype.constructor=rA;rA.prototype.Yx=rA;rA.Zx={};f.btCapsuleShape=rA;rA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mg(c,a)};rA.prototype.getMargin=function(){return ig(this.Xx)};rA.prototype.getUpAxis=function(){return kg(this.Xx)};rA.prototype.getRadius=function(){return jg(this.Xx)};rA.prototype.getHalfHeight=function(){return gg(this.Xx)};rA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lg(c,a)}; +rA.prototype.getLocalScaling=function(){return l(hg(this.Xx),q)};rA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);fg(d,a,c)};rA.prototype.__destroy__=function(){dg(this.Xx)};function mA(){throw"cannot construct a btIDebugDraw, no constructor in IDL";}mA.prototype=Object.create(h.prototype);mA.prototype.constructor=mA;mA.prototype.Yx=mA;mA.Zx={};f.btIDebugDraw=mA; +mA.prototype.drawLine=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Tn(e,a,c,d)};mA.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);Sn(n,a,c,d,e,g)}; +mA.prototype.reportErrorWarning=function(a){var c=this.Xx;b.by();a=a&&"object"===typeof a?a.Xx:gA(a);Vn(c,a)};mA.prototype.draw3dText=function(a,c){var d=this.Xx;b.by();a&&"object"===typeof a&&(a=a.Xx);c=c&&"object"===typeof c?c.Xx:gA(c);Rn(d,a,c)};mA.prototype.setDebugMode=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Wn(c,a)};mA.prototype.getDebugMode=function(){return Un(this.Xx)};mA.prototype.__destroy__=function(){Qn(this.Xx)}; +function sA(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=void 0===a?Rj():Sj(a);k(sA)[this.Xx]=this}sA.prototype=Object.create(h.prototype);sA.prototype.constructor=sA;sA.prototype.Yx=sA;sA.Zx={};f.btDefaultCollisionConfiguration=sA;sA.prototype.__destroy__=function(){Qj(this.Xx)};function tA(){throw"cannot construct a btTriangleMeshShape, no constructor in IDL";}tA.prototype=Object.create(qA.prototype);tA.prototype.constructor=tA;tA.prototype.Yx=tA;tA.Zx={};f.btTriangleMeshShape=tA; +tA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nw(c,a)};tA.prototype.getLocalScaling=function(){return l(Mw(this.Xx),q)};tA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Lw(d,a,c)};tA.prototype.__destroy__=function(){Kw(this.Xx)};function w(){this.Xx=Km();k(w)[this.Xx]=this}w.prototype=Object.create(r.prototype);w.prototype.constructor=w;w.prototype.Yx=w;w.Zx={}; +f.btGhostObject=w;w.prototype.getNumOverlappingObjects=function(){return Qm(this.Xx)};w.prototype.getOverlappingObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Rm(c,a),r)};w.prototype.setAnisotropicFriction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);bn(d,a,c)};w.prototype.getCollisionShape=function(){return l(Om(this.Xx),p)}; +w.prototype.setContactProcessingThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gn(c,a)};w.prototype.setActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);an(c,a)};w.prototype.forceActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Lm(c,a)};w.prototype.activate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);void 0===a?Im(c):Jm(c,a)};w.prototype.isActive=function(){return!!Xm(this.Xx)};w.prototype.isKinematicObject=function(){return!!Ym(this.Xx)}; +w.prototype.isStaticObject=function(){return!!Zm(this.Xx)};w.prototype.isStaticOrKinematicObject=function(){return!!$m(this.Xx)};w.prototype.getRestitution=function(){return Sm(this.Xx)};w.prototype.getFriction=function(){return Pm(this.Xx)};w.prototype.getRollingFriction=function(){return Tm(this.Xx)};w.prototype.setRestitution=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jn(c,a)};w.prototype.setFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hn(c,a)}; +w.prototype.setRollingFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kn(c,a)};w.prototype.getWorldTransform=function(){return l(Wm(this.Xx),t)};w.prototype.getCollisionFlags=function(){return Nm(this.Xx)};w.prototype.setCollisionFlags=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);en(c,a)};w.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nn(c,a)}; +w.prototype.setCollisionShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fn(c,a)};w.prototype.setCcdMotionThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cn(c,a)};w.prototype.setCcdSweptSphereRadius=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dn(c,a)};w.prototype.getUserIndex=function(){return Um(this.Xx)};w.prototype.setUserIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ln(c,a)}; +w.prototype.getUserPointer=function(){return l(Vm(this.Xx),nA)};w.prototype.setUserPointer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mn(c,a)};w.prototype.getBroadphaseHandle=function(){return l(Mm(this.Xx),u)};w.prototype.__destroy__=function(){Hm(this.Xx)};function uA(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=$h(a,c);k(uA)[this.Xx]=this}uA.prototype=Object.create(p.prototype);uA.prototype.constructor=uA;uA.prototype.Yx=uA;uA.Zx={}; +f.btConeShape=uA;uA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ci(c,a)};uA.prototype.getLocalScaling=function(){return l(bi(this.Xx),q)};uA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);ai(d,a,c)};uA.prototype.__destroy__=function(){Zh(this.Xx)};function vA(){throw"cannot construct a btActionInterface, no constructor in IDL";}vA.prototype=Object.create(h.prototype); +vA.prototype.constructor=vA;vA.prototype.Yx=vA;vA.Zx={};f.btActionInterface=vA;vA.prototype.updateAction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);kf(d,a,c)};vA.prototype.__destroy__=function(){jf(this.Xx)}; +function q(a,c,d){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);this.Xx=void 0===a?hx():void 0===c?_emscripten_bind_btVector3_btVector3_1(a):void 0===d?_emscripten_bind_btVector3_btVector3_2(a,c):ix(a,c,d);k(q)[this.Xx]=this}q.prototype=Object.create(h.prototype);q.prototype.constructor=q;q.prototype.Yx=q;q.Zx={};f.btVector3=q;q.prototype.length=q.prototype.length=function(){return kx(this.Xx)};q.prototype.x=q.prototype.x=function(){return ux(this.Xx)}; +q.prototype.y=q.prototype.y=function(){return vx(this.Xx)};q.prototype.z=q.prototype.z=function(){return wx(this.Xx)};q.prototype.setX=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rx(c,a)};q.prototype.setY=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sx(c,a)};q.prototype.setZ=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);tx(c,a)}; +q.prototype.setValue=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);qx(e,a,c,d)};q.prototype.normalize=q.prototype.normalize=function(){lx(this.Xx)};q.prototype.rotate=q.prototype.rotate=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return l(px(d,a,c),q)};q.prototype.dot=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return jx(c,a)}; +q.prototype.op_mul=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(nx(c,a),q)};q.prototype.op_add=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(mx(c,a),q)};q.prototype.op_sub=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(ox(c,a),q)};q.prototype.__destroy__=function(){gx(this.Xx)};function wA(){throw"cannot construct a btVehicleRaycaster, no constructor in IDL";}wA.prototype=Object.create(h.prototype);wA.prototype.constructor=wA; +wA.prototype.Yx=wA;wA.Zx={};f.btVehicleRaycaster=wA;wA.prototype.castRay=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Xx(e,a,c,d)};wA.prototype.__destroy__=function(){Wx(this.Xx)};function xA(){throw"cannot construct a btQuadWord, no constructor in IDL";}xA.prototype=Object.create(h.prototype);xA.prototype.constructor=xA;xA.prototype.Yx=xA;xA.Zx={};f.btQuadWord=xA;xA.prototype.x=xA.prototype.x=function(){return pq(this.Xx)}; +xA.prototype.y=xA.prototype.y=function(){return qq(this.Xx)};xA.prototype.z=xA.prototype.z=function(){return rq(this.Xx)};xA.prototype.w=function(){return oq(this.Xx)};xA.prototype.setX=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lq(c,a)};xA.prototype.setY=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mq(c,a)};xA.prototype.setZ=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nq(c,a)}; +xA.prototype.setW=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kq(c,a)};xA.prototype.__destroy__=function(){jq(this.Xx)};function yA(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=Ij(a);k(yA)[this.Xx]=this}yA.prototype=Object.create(p.prototype);yA.prototype.constructor=yA;yA.prototype.Yx=yA;yA.Zx={};f.btCylinderShape=yA;yA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nj(c,a)};yA.prototype.getMargin=function(){return Lj(this.Xx)}; +yA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mj(c,a)};yA.prototype.getLocalScaling=function(){return l(Kj(this.Xx),q)};yA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Jj(d,a,c)};yA.prototype.__destroy__=function(){Hj(this.Xx)}; +function x(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=rk(a,c,d,e);k(x)[this.Xx]=this}x.prototype=Object.create(oA.prototype);x.prototype.constructor=x;x.prototype.Yx=x;x.Zx={};f.btDiscreteDynamicsWorld=x;x.prototype.setGravity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nk(c,a)};x.prototype.getGravity=function(){return l(Bk(this.Xx),q)}; +x.prototype.addRigidBody=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?pk(e,a):void 0===d?_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(e,a,c):qk(e,a,c,d)};x.prototype.removeRigidBody=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ik(c,a)}; +x.prototype.addConstraint=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===c?nk(d,a):ok(d,a,c)};x.prototype.removeConstraint=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Hk(c,a)};x.prototype.stepSimulation=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);return void 0===c?Ok(e,a):void 0===d?Pk(e,a,c):Qk(e,a,c,d)}; +x.prototype.setContactAddedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jk(c,a)};x.prototype.setContactProcessedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Lk(c,a)};x.prototype.setContactDestroyedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kk(c,a)};x.prototype.getDispatcher=function(){return l(Ak(this.Xx),jA)}; +x.prototype.rayTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Ek(e,a,c,d)};x.prototype.getPairCache=function(){return l(Ck(this.Xx),kA)};x.prototype.getDispatchInfo=function(){return l(zk(this.Xx),m)};x.prototype.addCollisionObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?kk(e,a):void 0===d?lk(e,a,c):mk(e,a,c,d)}; +x.prototype.removeCollisionObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gk(c,a)};x.prototype.getBroadphase=function(){return l(xk(this.Xx),lA)};x.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);uk(n,a,c,d,e,g)}; +x.prototype.contactPairTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);sk(e,a,c,d)};x.prototype.contactTest=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);tk(d,a,c)};x.prototype.updateSingleAabb=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Rk(c,a)};x.prototype.setDebugDrawer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mk(c,a)}; +x.prototype.getDebugDrawer=function(){return l(yk(this.Xx),mA)};x.prototype.debugDrawWorld=function(){wk(this.Xx)};x.prototype.debugDrawObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);vk(e,a,c,d)};x.prototype.addAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jk(c,a)};x.prototype.removeAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fk(c,a)}; +x.prototype.getSolverInfo=function(){return l(Dk(this.Xx),v)};x.prototype.__destroy__=function(){ik(this.Xx)};function zA(){throw"cannot construct a btConvexShape, no constructor in IDL";}zA.prototype=Object.create(p.prototype);zA.prototype.constructor=zA;zA.prototype.Yx=zA;zA.Zx={};f.btConvexShape=zA;zA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jj(c,a)};zA.prototype.getLocalScaling=function(){return l(hj(this.Xx),q)}; +zA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);gj(d,a,c)};zA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kj(c,a)};zA.prototype.getMargin=function(){return ij(this.Xx)};zA.prototype.__destroy__=function(){fj(this.Xx)};function jA(){throw"cannot construct a btDispatcher, no constructor in IDL";}jA.prototype=Object.create(h.prototype);jA.prototype.constructor=jA;jA.prototype.Yx=jA; +jA.Zx={};f.btDispatcher=jA;jA.prototype.getNumManifolds=function(){return ql(this.Xx)};jA.prototype.getManifoldByIndexInternal=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(pl(c,a),AA)};jA.prototype.__destroy__=function(){ol(this.Xx)}; +function BA(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=void 0===e?bm(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a,c,d,e):cm(a,c,d,e,g);k(BA)[this.Xx]=this}BA.prototype=Object.create(pA.prototype);BA.prototype.constructor=BA;BA.prototype.Yx=BA;BA.Zx={};f.btGeneric6DofConstraint=BA; +BA.prototype.setLinearLowerLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);km(c,a)};BA.prototype.setLinearUpperLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lm(c,a)};BA.prototype.setAngularLowerLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hm(c,a)};BA.prototype.setAngularUpperLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);im(c,a)};BA.prototype.getFrameOffsetA=function(){return l(fm(this.Xx),t)}; +BA.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dm(c,a)};BA.prototype.getBreakingImpulseThreshold=function(){return em(this.Xx)};BA.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jm(c,a)};BA.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return gm(d,a,c)}; +BA.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);mm(e,a,c,d)};BA.prototype.__destroy__=function(){am(this.Xx)};function CA(){throw"cannot construct a btStridingMeshInterface, no constructor in IDL";}CA.prototype=Object.create(h.prototype);CA.prototype.constructor=CA;CA.prototype.Yx=CA;CA.Zx={};f.btStridingMeshInterface=CA; +CA.prototype.setScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xw(c,a)};CA.prototype.__destroy__=function(){ww(this.Xx)};function DA(){throw"cannot construct a btMotionState, no constructor in IDL";}DA.prototype=Object.create(h.prototype);DA.prototype.constructor=DA;DA.prototype.Yx=DA;DA.Zx={};f.btMotionState=DA;DA.prototype.getWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zo(c,a)}; +DA.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$o(c,a)};DA.prototype.__destroy__=function(){Yo(this.Xx)};function y(){throw"cannot construct a ConvexResultCallback, no constructor in IDL";}y.prototype=Object.create(h.prototype);y.prototype.constructor=y;y.prototype.Yx=y;y.Zx={};f.ConvexResultCallback=y;y.prototype.hasHit=function(){return!!Hd(this.Xx)};y.prototype.get_m_collisionFilterGroup=y.prototype.$x=function(){return Fd(this.Xx)}; +y.prototype.set_m_collisionFilterGroup=y.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jd(c,a)};Object.defineProperty(y.prototype,"m_collisionFilterGroup",{get:y.prototype.$x,set:y.prototype.cy});y.prototype.get_m_collisionFilterMask=y.prototype.ay=function(){return Gd(this.Xx)};y.prototype.set_m_collisionFilterMask=y.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kd(c,a)}; +Object.defineProperty(y.prototype,"m_collisionFilterMask",{get:y.prototype.ay,set:y.prototype.dy});y.prototype.get_m_closestHitFraction=y.prototype.ey=function(){return Ed(this.Xx)};y.prototype.set_m_closestHitFraction=y.prototype.fy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Id(c,a)};Object.defineProperty(y.prototype,"m_closestHitFraction",{get:y.prototype.ey,set:y.prototype.fy});y.prototype.__destroy__=function(){Dd(this.Xx)}; +function EA(){throw"cannot construct a ContactResultCallback, no constructor in IDL";}EA.prototype=Object.create(h.prototype);EA.prototype.constructor=EA;EA.prototype.Yx=EA;EA.Zx={};f.ContactResultCallback=EA; +EA.prototype.addSingleResult=function(a,c,d,e,g,n,A){var S=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);return Cd(S,a,c,d,e,g,n,A)};EA.prototype.__destroy__=function(){Bd(this.Xx)};function FA(){throw"cannot construct a btSoftBodySolver, no constructor in IDL";}FA.prototype=Object.create(h.prototype); +FA.prototype.constructor=FA;FA.prototype.Yx=FA;FA.Zx={};f.btSoftBodySolver=FA;FA.prototype.__destroy__=function(){Xt(this.Xx)};function z(){throw"cannot construct a RayResultCallback, no constructor in IDL";}z.prototype=Object.create(h.prototype);z.prototype.constructor=z;z.prototype.Yx=z;z.Zx={};f.RayResultCallback=z;z.prototype.hasHit=function(){return!!Me(this.Xx)};z.prototype.get_m_collisionFilterGroup=z.prototype.$x=function(){return Je(this.Xx)}; +z.prototype.set_m_collisionFilterGroup=z.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Oe(c,a)};Object.defineProperty(z.prototype,"m_collisionFilterGroup",{get:z.prototype.$x,set:z.prototype.cy});z.prototype.get_m_collisionFilterMask=z.prototype.ay=function(){return Ke(this.Xx)};z.prototype.set_m_collisionFilterMask=z.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pe(c,a)}; +Object.defineProperty(z.prototype,"m_collisionFilterMask",{get:z.prototype.ay,set:z.prototype.dy});z.prototype.get_m_closestHitFraction=z.prototype.ey=function(){return Ie(this.Xx)};z.prototype.set_m_closestHitFraction=z.prototype.fy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ne(c,a)};Object.defineProperty(z.prototype,"m_closestHitFraction",{get:z.prototype.ey,set:z.prototype.fy});z.prototype.get_m_collisionObject=z.prototype.gy=function(){return l(Le(this.Xx),r)}; +z.prototype.set_m_collisionObject=z.prototype.py=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qe(c,a)};Object.defineProperty(z.prototype,"m_collisionObject",{get:z.prototype.gy,set:z.prototype.py});z.prototype.__destroy__=function(){He(this.Xx)};function GA(){throw"cannot construct a btMatrix3x3, no constructor in IDL";}GA.prototype=Object.create(h.prototype);GA.prototype.constructor=GA;GA.prototype.Yx=GA;GA.Zx={};f.btMatrix3x3=GA; +GA.prototype.setEulerZYX=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Xo(e,a,c,d)};GA.prototype.getRotation=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Vo(c,a)};GA.prototype.getRow=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Wo(c,a),q)};GA.prototype.__destroy__=function(){Uo(this.Xx)};function HA(){throw"cannot construct a btScalarArray, no constructor in IDL";}HA.prototype=Object.create(h.prototype); +HA.prototype.constructor=HA;HA.prototype.Yx=HA;HA.Zx={};f.btScalarArray=HA;HA.prototype.size=HA.prototype.size=function(){return pt(this.Xx)};HA.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return ot(c,a)};HA.prototype.__destroy__=function(){nt(this.Xx)};function B(){throw"cannot construct a Material, no constructor in IDL";}B.prototype=Object.create(h.prototype);B.prototype.constructor=B;B.prototype.Yx=B;B.Zx={};f.Material=B;B.prototype.get_m_kLST=B.prototype.oA=function(){return me(this.Xx)}; +B.prototype.set_m_kLST=B.prototype.VC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qe(c,a)};Object.defineProperty(B.prototype,"m_kLST",{get:B.prototype.oA,set:B.prototype.VC});B.prototype.get_m_kAST=B.prototype.nA=function(){return le(this.Xx)};B.prototype.set_m_kAST=B.prototype.UC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pe(c,a)};Object.defineProperty(B.prototype,"m_kAST",{get:B.prototype.nA,set:B.prototype.UC});B.prototype.get_m_kVST=B.prototype.pA=function(){return ne(this.Xx)}; +B.prototype.set_m_kVST=B.prototype.WC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);re(c,a)};Object.defineProperty(B.prototype,"m_kVST",{get:B.prototype.pA,set:B.prototype.WC});B.prototype.get_m_flags=B.prototype.Wz=function(){return ke(this.Xx)};B.prototype.set_m_flags=B.prototype.CC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);oe(c,a)};Object.defineProperty(B.prototype,"m_flags",{get:B.prototype.Wz,set:B.prototype.CC});B.prototype.__destroy__=function(){je(this.Xx)}; +function m(){throw"cannot construct a btDispatcherInfo, no constructor in IDL";}m.prototype=Object.create(h.prototype);m.prototype.constructor=m;m.prototype.Yx=m;m.Zx={};f.btDispatcherInfo=m;m.prototype.get_m_timeStep=m.prototype.bB=function(){return $k(this.Xx)};m.prototype.set_m_timeStep=m.prototype.ID=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kl(c,a)};Object.defineProperty(m.prototype,"m_timeStep",{get:m.prototype.bB,set:m.prototype.ID}); +m.prototype.get_m_stepCount=m.prototype.TA=function(){return Yk(this.Xx)};m.prototype.set_m_stepCount=m.prototype.zD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);il(c,a)};Object.defineProperty(m.prototype,"m_stepCount",{get:m.prototype.TA,set:m.prototype.zD});m.prototype.get_m_dispatchFunc=m.prototype.Oz=function(){return Vk(this.Xx)};m.prototype.set_m_dispatchFunc=m.prototype.uC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fl(c,a)}; +Object.defineProperty(m.prototype,"m_dispatchFunc",{get:m.prototype.Oz,set:m.prototype.uC});m.prototype.get_m_timeOfImpact=m.prototype.aB=function(){return Zk(this.Xx)};m.prototype.set_m_timeOfImpact=m.prototype.HD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jl(c,a)};Object.defineProperty(m.prototype,"m_timeOfImpact",{get:m.prototype.aB,set:m.prototype.HD});m.prototype.get_m_useContinuous=m.prototype.dB=function(){return!!al(this.Xx)}; +m.prototype.set_m_useContinuous=m.prototype.KD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ll(c,a)};Object.defineProperty(m.prototype,"m_useContinuous",{get:m.prototype.dB,set:m.prototype.KD});m.prototype.get_m_enableSatConvex=m.prototype.Sz=function(){return!!Xk(this.Xx)};m.prototype.set_m_enableSatConvex=m.prototype.yC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hl(c,a)};Object.defineProperty(m.prototype,"m_enableSatConvex",{get:m.prototype.Sz,set:m.prototype.yC}); +m.prototype.get_m_enableSPU=m.prototype.Rz=function(){return!!Wk(this.Xx)};m.prototype.set_m_enableSPU=m.prototype.xC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gl(c,a)};Object.defineProperty(m.prototype,"m_enableSPU",{get:m.prototype.Rz,set:m.prototype.xC});m.prototype.get_m_useEpa=m.prototype.fB=function(){return!!cl(this.Xx)};m.prototype.set_m_useEpa=m.prototype.MD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nl(c,a)}; +Object.defineProperty(m.prototype,"m_useEpa",{get:m.prototype.fB,set:m.prototype.MD});m.prototype.get_m_allowedCcdPenetration=m.prototype.qz=function(){return Tk(this.Xx)};m.prototype.set_m_allowedCcdPenetration=m.prototype.YB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dl(c,a)};Object.defineProperty(m.prototype,"m_allowedCcdPenetration",{get:m.prototype.qz,set:m.prototype.YB});m.prototype.get_m_useConvexConservativeDistanceUtil=m.prototype.eB=function(){return!!bl(this.Xx)}; +m.prototype.set_m_useConvexConservativeDistanceUtil=m.prototype.LD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ml(c,a)};Object.defineProperty(m.prototype,"m_useConvexConservativeDistanceUtil",{get:m.prototype.eB,set:m.prototype.LD});m.prototype.get_m_convexConservativeDistanceThreshold=m.prototype.Jz=function(){return Uk(this.Xx)};m.prototype.set_m_convexConservativeDistanceThreshold=m.prototype.pC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);el(c,a)}; +Object.defineProperty(m.prototype,"m_convexConservativeDistanceThreshold",{get:m.prototype.Jz,set:m.prototype.pC});m.prototype.__destroy__=function(){Sk(this.Xx)};function C(){throw"cannot construct a btWheelInfoConstructionInfo, no constructor in IDL";}C.prototype=Object.create(h.prototype);C.prototype.constructor=C;C.prototype.Yx=C;C.Zx={};f.btWheelInfoConstructionInfo=C;C.prototype.get_m_chassisConnectionCS=C.prototype.Dz=function(){return l(my(this.Xx),q)}; +C.prototype.set_m_chassisConnectionCS=C.prototype.jC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yy(c,a)};Object.defineProperty(C.prototype,"m_chassisConnectionCS",{get:C.prototype.Dz,set:C.prototype.jC});C.prototype.get_m_wheelDirectionCS=C.prototype.Dy=function(){return l(ty(this.Xx),q)};C.prototype.set_m_wheelDirectionCS=C.prototype.Ky=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fy(c,a)};Object.defineProperty(C.prototype,"m_wheelDirectionCS",{get:C.prototype.Dy,set:C.prototype.Ky}); +C.prototype.get_m_wheelAxleCS=C.prototype.Cy=function(){return l(sy(this.Xx),q)};C.prototype.set_m_wheelAxleCS=C.prototype.Jy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ey(c,a)};Object.defineProperty(C.prototype,"m_wheelAxleCS",{get:C.prototype.Cy,set:C.prototype.Jy});C.prototype.get_m_suspensionRestLength=C.prototype.YA=function(){return qy(this.Xx)};C.prototype.set_m_suspensionRestLength=C.prototype.ED=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Cy(c,a)}; +Object.defineProperty(C.prototype,"m_suspensionRestLength",{get:C.prototype.YA,set:C.prototype.ED});C.prototype.get_m_maxSuspensionTravelCm=C.prototype.ly=function(){return py(this.Xx)};C.prototype.set_m_maxSuspensionTravelCm=C.prototype.uy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);By(c,a)};Object.defineProperty(C.prototype,"m_maxSuspensionTravelCm",{get:C.prototype.ly,set:C.prototype.uy});C.prototype.get_m_wheelRadius=C.prototype.lB=function(){return uy(this.Xx)}; +C.prototype.set_m_wheelRadius=C.prototype.SD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gy(c,a)};Object.defineProperty(C.prototype,"m_wheelRadius",{get:C.prototype.lB,set:C.prototype.SD});C.prototype.get_m_suspensionStiffness=C.prototype.my=function(){return ry(this.Xx)};C.prototype.set_m_suspensionStiffness=C.prototype.vy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Dy(c,a)};Object.defineProperty(C.prototype,"m_suspensionStiffness",{get:C.prototype.my,set:C.prototype.vy}); +C.prototype.get_m_wheelsDampingCompression=C.prototype.Ey=function(){return vy(this.Xx)};C.prototype.set_m_wheelsDampingCompression=C.prototype.Ly=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Hy(c,a)};Object.defineProperty(C.prototype,"m_wheelsDampingCompression",{get:C.prototype.Ey,set:C.prototype.Ly});C.prototype.get_m_wheelsDampingRelaxation=C.prototype.Fy=function(){return wy(this.Xx)}; +C.prototype.set_m_wheelsDampingRelaxation=C.prototype.My=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Iy(c,a)};Object.defineProperty(C.prototype,"m_wheelsDampingRelaxation",{get:C.prototype.Fy,set:C.prototype.My});C.prototype.get_m_frictionSlip=C.prototype.hy=function(){return ny(this.Xx)};C.prototype.set_m_frictionSlip=C.prototype.qy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zy(c,a)};Object.defineProperty(C.prototype,"m_frictionSlip",{get:C.prototype.hy,set:C.prototype.qy}); +C.prototype.get_m_maxSuspensionForce=C.prototype.ky=function(){return oy(this.Xx)};C.prototype.set_m_maxSuspensionForce=C.prototype.ty=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ay(c,a)};Object.defineProperty(C.prototype,"m_maxSuspensionForce",{get:C.prototype.ky,set:C.prototype.ty});C.prototype.get_m_bIsFrontWheel=C.prototype.zy=function(){return!!ly(this.Xx)};C.prototype.set_m_bIsFrontWheel=C.prototype.Gy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xy(c,a)}; +Object.defineProperty(C.prototype,"m_bIsFrontWheel",{get:C.prototype.zy,set:C.prototype.Gy});C.prototype.__destroy__=function(){ky(this.Xx)};function IA(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=void 0===c?mj(a):nj(a,c);k(IA)[this.Xx]=this}IA.prototype=Object.create(zA.prototype);IA.prototype.constructor=IA;IA.prototype.Yx=IA;IA.Zx={};f.btConvexTriangleMeshShape=IA;IA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rj(c,a)}; +IA.prototype.getLocalScaling=function(){return l(pj(this.Xx),q)};IA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);oj(d,a,c)};IA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sj(c,a)};IA.prototype.getMargin=function(){return qj(this.Xx)};IA.prototype.__destroy__=function(){lj(this.Xx)};function lA(){throw"cannot construct a btBroadphaseInterface, no constructor in IDL";}lA.prototype=Object.create(h.prototype); +lA.prototype.constructor=lA;lA.prototype.Yx=lA;lA.Zx={};f.btBroadphaseInterface=lA;lA.prototype.getOverlappingPairCache=function(){return l(yf(this.Xx),kA)};lA.prototype.__destroy__=function(){xf(this.Xx)};function D(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=void 0===e?Br(a,c,d):Cr(a,c,d,e);k(D)[this.Xx]=this}D.prototype=Object.create(h.prototype);D.prototype.constructor=D;D.prototype.Yx=D; +D.Zx={};f.btRigidBodyConstructionInfo=D;D.prototype.get_m_linearDamping=D.prototype.qA=function(){return Lr(this.Xx)};D.prototype.set_m_linearDamping=D.prototype.XC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Xr(c,a)};Object.defineProperty(D.prototype,"m_linearDamping",{get:D.prototype.qA,set:D.prototype.XC});D.prototype.get_m_angularDamping=D.prototype.sz=function(){return Ir(this.Xx)}; +D.prototype.set_m_angularDamping=D.prototype.$B=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ur(c,a)};Object.defineProperty(D.prototype,"m_angularDamping",{get:D.prototype.sz,set:D.prototype.$B});D.prototype.get_m_friction=D.prototype.Xz=function(){return Kr(this.Xx)};D.prototype.set_m_friction=D.prototype.DC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Wr(c,a)};Object.defineProperty(D.prototype,"m_friction",{get:D.prototype.Xz,set:D.prototype.DC}); +D.prototype.get_m_rollingFriction=D.prototype.LA=function(){return Or(this.Xx)};D.prototype.set_m_rollingFriction=D.prototype.rD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$r(c,a)};Object.defineProperty(D.prototype,"m_rollingFriction",{get:D.prototype.LA,set:D.prototype.rD});D.prototype.get_m_restitution=D.prototype.JA=function(){return Nr(this.Xx)};D.prototype.set_m_restitution=D.prototype.pD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zr(c,a)}; +Object.defineProperty(D.prototype,"m_restitution",{get:D.prototype.JA,set:D.prototype.pD});D.prototype.get_m_linearSleepingThreshold=D.prototype.rA=function(){return Mr(this.Xx)};D.prototype.set_m_linearSleepingThreshold=D.prototype.YC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Yr(c,a)};Object.defineProperty(D.prototype,"m_linearSleepingThreshold",{get:D.prototype.rA,set:D.prototype.YC});D.prototype.get_m_angularSleepingThreshold=D.prototype.uz=function(){return Jr(this.Xx)}; +D.prototype.set_m_angularSleepingThreshold=D.prototype.aC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Vr(c,a)};Object.defineProperty(D.prototype,"m_angularSleepingThreshold",{get:D.prototype.uz,set:D.prototype.aC});D.prototype.get_m_additionalDamping=D.prototype.nz=function(){return!!Gr(this.Xx)};D.prototype.set_m_additionalDamping=D.prototype.VB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Sr(c,a)}; +Object.defineProperty(D.prototype,"m_additionalDamping",{get:D.prototype.nz,set:D.prototype.VB});D.prototype.get_m_additionalDampingFactor=D.prototype.oz=function(){return Fr(this.Xx)};D.prototype.set_m_additionalDampingFactor=D.prototype.WB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Rr(c,a)};Object.defineProperty(D.prototype,"m_additionalDampingFactor",{get:D.prototype.oz,set:D.prototype.WB});D.prototype.get_m_additionalLinearDampingThresholdSqr=D.prototype.pz=function(){return Hr(this.Xx)}; +D.prototype.set_m_additionalLinearDampingThresholdSqr=D.prototype.XB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Tr(c,a)};Object.defineProperty(D.prototype,"m_additionalLinearDampingThresholdSqr",{get:D.prototype.pz,set:D.prototype.XB});D.prototype.get_m_additionalAngularDampingThresholdSqr=D.prototype.mz=function(){return Er(this.Xx)};D.prototype.set_m_additionalAngularDampingThresholdSqr=D.prototype.UB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qr(c,a)}; +Object.defineProperty(D.prototype,"m_additionalAngularDampingThresholdSqr",{get:D.prototype.mz,set:D.prototype.UB});D.prototype.get_m_additionalAngularDampingFactor=D.prototype.lz=function(){return Dr(this.Xx)};D.prototype.set_m_additionalAngularDampingFactor=D.prototype.TB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pr(c,a)};Object.defineProperty(D.prototype,"m_additionalAngularDampingFactor",{get:D.prototype.lz,set:D.prototype.TB});D.prototype.__destroy__=function(){Ar(this.Xx)}; +function JA(){throw"cannot construct a btCollisionConfiguration, no constructor in IDL";}JA.prototype=Object.create(h.prototype);JA.prototype.constructor=JA;JA.prototype.Yx=JA;JA.Zx={};f.btCollisionConfiguration=JA;JA.prototype.__destroy__=function(){ng(this.Xx)};function AA(){this.Xx=Rp();k(AA)[this.Xx]=this}AA.prototype=Object.create(h.prototype);AA.prototype.constructor=AA;AA.prototype.Yx=AA;AA.Zx={};f.btPersistentManifold=AA;AA.prototype.getBody0=function(){return l(Sp(this.Xx),r)}; +AA.prototype.getBody1=function(){return l(Tp(this.Xx),r)};AA.prototype.getNumContacts=function(){return Vp(this.Xx)};AA.prototype.getContactPoint=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Up(c,a),E)};AA.prototype.__destroy__=function(){Qp(this.Xx)};function KA(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=void 0===a?yh():zh(a);k(KA)[this.Xx]=this}KA.prototype=Object.create(p.prototype);KA.prototype.constructor=KA;KA.prototype.Yx=KA;KA.Zx={};f.btCompoundShape=KA; +KA.prototype.addChildShape=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);xh(d,a,c)};KA.prototype.removeChildShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gh(c,a)};KA.prototype.removeChildShapeByIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fh(c,a)};KA.prototype.getNumChildShapes=function(){return Eh(this.Xx)};KA.prototype.getChildShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Bh(c,a),p)}; +KA.prototype.updateChildTransform=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===d?Jh(e,a,c):Kh(e,a,c,d)};KA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ih(c,a)};KA.prototype.getMargin=function(){return Dh(this.Xx)};KA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Hh(c,a)};KA.prototype.getLocalScaling=function(){return l(Ch(this.Xx),q)}; +KA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Ah(d,a,c)};KA.prototype.__destroy__=function(){wh(this.Xx)};function F(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=Pb(a,c);k(F)[this.Xx]=this}F.prototype=Object.create(y.prototype);F.prototype.constructor=F;F.prototype.Yx=F;F.Zx={};f.ClosestConvexResultCallback=F;F.prototype.hasHit=function(){return!!Yb(this.Xx)}; +F.prototype.get_m_convexFromWorld=F.prototype.Kz=function(){return l(Ub(this.Xx),q)};F.prototype.set_m_convexFromWorld=F.prototype.qC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cc(c,a)};Object.defineProperty(F.prototype,"m_convexFromWorld",{get:F.prototype.Kz,set:F.prototype.qC});F.prototype.get_m_convexToWorld=F.prototype.Lz=function(){return l(Vb(this.Xx),q)};F.prototype.set_m_convexToWorld=F.prototype.rC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dc(c,a)}; +Object.defineProperty(F.prototype,"m_convexToWorld",{get:F.prototype.Lz,set:F.prototype.rC});F.prototype.get_m_hitNormalWorld=F.prototype.iy=function(){return l(Wb(this.Xx),q)};F.prototype.set_m_hitNormalWorld=F.prototype.ry=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ec(c,a)};Object.defineProperty(F.prototype,"m_hitNormalWorld",{get:F.prototype.iy,set:F.prototype.ry});F.prototype.get_m_hitPointWorld=F.prototype.jy=function(){return l(Xb(this.Xx),q)}; +F.prototype.set_m_hitPointWorld=F.prototype.sy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fc(c,a)};Object.defineProperty(F.prototype,"m_hitPointWorld",{get:F.prototype.jy,set:F.prototype.sy});F.prototype.get_m_collisionFilterGroup=F.prototype.$x=function(){return Sb(this.Xx)};F.prototype.set_m_collisionFilterGroup=F.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ac(c,a)};Object.defineProperty(F.prototype,"m_collisionFilterGroup",{get:F.prototype.$x,set:F.prototype.cy}); +F.prototype.get_m_collisionFilterMask=F.prototype.ay=function(){return Tb(this.Xx)};F.prototype.set_m_collisionFilterMask=F.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bc(c,a)};Object.defineProperty(F.prototype,"m_collisionFilterMask",{get:F.prototype.ay,set:F.prototype.dy});F.prototype.get_m_closestHitFraction=F.prototype.ey=function(){return Rb(this.Xx)}; +F.prototype.set_m_closestHitFraction=F.prototype.fy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zb(c,a)};Object.defineProperty(F.prototype,"m_closestHitFraction",{get:F.prototype.ey,set:F.prototype.fy});F.prototype.__destroy__=function(){Qb(this.Xx)};function G(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=cb(a,c);k(G)[this.Xx]=this}G.prototype=Object.create(z.prototype);G.prototype.constructor=G;G.prototype.Yx=G;G.Zx={};f.AllHitsRayResultCallback=G; +G.prototype.hasHit=function(){return!!pb(this.Xx)};G.prototype.get_m_collisionObjects=G.prototype.Gz=function(){return l(ib(this.Xx),LA)};G.prototype.set_m_collisionObjects=G.prototype.mC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ub(c,a)};Object.defineProperty(G.prototype,"m_collisionObjects",{get:G.prototype.Gz,set:G.prototype.mC});G.prototype.get_m_rayFromWorld=G.prototype.Ay=function(){return l(mb(this.Xx),q)}; +G.prototype.set_m_rayFromWorld=G.prototype.Hy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yb(c,a)};Object.defineProperty(G.prototype,"m_rayFromWorld",{get:G.prototype.Ay,set:G.prototype.Hy});G.prototype.get_m_rayToWorld=G.prototype.By=function(){return l(ob(this.Xx),q)};G.prototype.set_m_rayToWorld=G.prototype.Iy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zb(c,a)};Object.defineProperty(G.prototype,"m_rayToWorld",{get:G.prototype.By,set:G.prototype.Iy}); +G.prototype.get_m_hitNormalWorld=G.prototype.iy=function(){return l(kb(this.Xx),MA)};G.prototype.set_m_hitNormalWorld=G.prototype.ry=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wb(c,a)};Object.defineProperty(G.prototype,"m_hitNormalWorld",{get:G.prototype.iy,set:G.prototype.ry});G.prototype.get_m_hitPointWorld=G.prototype.jy=function(){return l(lb(this.Xx),MA)};G.prototype.set_m_hitPointWorld=G.prototype.sy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xb(c,a)}; +Object.defineProperty(G.prototype,"m_hitPointWorld",{get:G.prototype.jy,set:G.prototype.sy});G.prototype.get_m_hitFractions=G.prototype.dA=function(){return l(jb(this.Xx),HA)};G.prototype.set_m_hitFractions=G.prototype.KC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vb(c,a)};Object.defineProperty(G.prototype,"m_hitFractions",{get:G.prototype.dA,set:G.prototype.KC});G.prototype.get_m_collisionFilterGroup=G.prototype.$x=function(){return fb(this.Xx)}; +G.prototype.set_m_collisionFilterGroup=G.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rb(c,a)};Object.defineProperty(G.prototype,"m_collisionFilterGroup",{get:G.prototype.$x,set:G.prototype.cy});G.prototype.get_m_collisionFilterMask=G.prototype.ay=function(){return gb(this.Xx)};G.prototype.set_m_collisionFilterMask=G.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sb(c,a)}; +Object.defineProperty(G.prototype,"m_collisionFilterMask",{get:G.prototype.ay,set:G.prototype.dy});G.prototype.get_m_closestHitFraction=G.prototype.ey=function(){return eb(this.Xx)};G.prototype.set_m_closestHitFraction=G.prototype.fy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qb(c,a)};Object.defineProperty(G.prototype,"m_closestHitFraction",{get:G.prototype.ey,set:G.prototype.fy});G.prototype.get_m_collisionObject=G.prototype.gy=function(){return l(hb(this.Xx),r)}; +G.prototype.set_m_collisionObject=G.prototype.py=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);tb(c,a)};Object.defineProperty(G.prototype,"m_collisionObject",{get:G.prototype.gy,set:G.prototype.py});G.prototype.__destroy__=function(){db(this.Xx)};function NA(){throw"cannot construct a tMaterialArray, no constructor in IDL";}NA.prototype=Object.create(h.prototype);NA.prototype.constructor=NA;NA.prototype.Yx=NA;NA.Zx={};f.tMaterialArray=NA;NA.prototype.size=NA.prototype.size=function(){return Qz(this.Xx)}; +NA.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Pz(c,a),B)};NA.prototype.__destroy__=function(){Oz(this.Xx)};function OA(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=gk(a);k(OA)[this.Xx]=this}OA.prototype=Object.create(wA.prototype);OA.prototype.constructor=OA;OA.prototype.Yx=OA;OA.Zx={};f.btDefaultVehicleRaycaster=OA; +OA.prototype.castRay=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);hk(e,a,c,d)};OA.prototype.__destroy__=function(){fk(this.Xx)};function H(){this.Xx=xi();k(H)[this.Xx]=this}H.prototype=Object.create(h.prototype);H.prototype.constructor=H;H.prototype.Yx=H;H.Zx={};f.btConstraintSetting=H;H.prototype.get_m_tau=H.prototype.$A=function(){return Ai(this.Xx)}; +H.prototype.set_m_tau=H.prototype.GD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Di(c,a)};Object.defineProperty(H.prototype,"m_tau",{get:H.prototype.$A,set:H.prototype.GD});H.prototype.get_m_damping=H.prototype.Mz=function(){return yi(this.Xx)};H.prototype.set_m_damping=H.prototype.sC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Bi(c,a)};Object.defineProperty(H.prototype,"m_damping",{get:H.prototype.Mz,set:H.prototype.sC}); +H.prototype.get_m_impulseClamp=H.prototype.jA=function(){return zi(this.Xx)};H.prototype.set_m_impulseClamp=H.prototype.QC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ci(c,a)};Object.defineProperty(H.prototype,"m_impulseClamp",{get:H.prototype.jA,set:H.prototype.QC});H.prototype.__destroy__=function(){wi(this.Xx)};function PA(){throw"cannot construct a LocalShapeInfo, no constructor in IDL";}PA.prototype=Object.create(h.prototype);PA.prototype.constructor=PA;PA.prototype.Yx=PA; +PA.Zx={};f.LocalShapeInfo=PA;PA.prototype.get_m_shapePart=PA.prototype.OA=function(){return fe(this.Xx)};PA.prototype.set_m_shapePart=PA.prototype.uD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);he(c,a)};Object.defineProperty(PA.prototype,"m_shapePart",{get:PA.prototype.OA,set:PA.prototype.uD});PA.prototype.get_m_triangleIndex=PA.prototype.cB=function(){return ge(this.Xx)}; +PA.prototype.set_m_triangleIndex=PA.prototype.JD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ie(c,a)};Object.defineProperty(PA.prototype,"m_triangleIndex",{get:PA.prototype.cB,set:PA.prototype.JD});PA.prototype.__destroy__=function(){ee(this.Xx)};function I(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=ns(a);k(I)[this.Xx]=this}I.prototype=Object.create(r.prototype);I.prototype.constructor=I;I.prototype.Yx=I;I.Zx={};f.btRigidBody=I; +I.prototype.getCenterOfMassTransform=function(){return l(xs(this.Xx),t)};I.prototype.setCenterOfMassTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Vs(c,a)};I.prototype.setSleepingThresholds=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);ht(d,a,c)};I.prototype.getLinearDamping=function(){return Cs(this.Xx)};I.prototype.getAngularDamping=function(){return rs(this.Xx)}; +I.prototype.setDamping=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Zs(d,a,c)};I.prototype.setMassProps=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);dt(d,a,c)};I.prototype.getLinearFactor=function(){return l(Ds(this.Xx),q)};I.prototype.setLinearFactor=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bt(c,a)}; +I.prototype.applyTorque=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ms(c,a)};I.prototype.applyLocalTorque=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ks(c,a)};I.prototype.applyForce=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);hs(d,a,c)};I.prototype.applyCentralForce=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ds(c,a)}; +I.prototype.applyCentralLocalForce=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gs(c,a)};I.prototype.applyTorqueImpulse=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ls(c,a)};I.prototype.applyImpulse=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);js(d,a,c)};I.prototype.applyCentralImpulse=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);es(c,a)};I.prototype.updateInertiaTensor=function(){mt(this.Xx)}; +I.prototype.getLinearVelocity=function(){return l(Es(this.Xx),q)};I.prototype.getAngularVelocity=function(){return l(ts(this.Xx),q)};I.prototype.setLinearVelocity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ct(c,a)};I.prototype.setAngularVelocity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Rs(c,a)};I.prototype.getMotionState=function(){return l(Fs(this.Xx),DA)};I.prototype.setMotionState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);et(c,a)}; +I.prototype.getAngularFactor=function(){return l(ss(this.Xx),q)};I.prototype.setAngularFactor=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qs(c,a)};I.prototype.upcast=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(lt(c,a),I)};I.prototype.getAabb=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);qs(d,a,c)};I.prototype.applyGravity=function(){is(this.Xx)};I.prototype.getGravity=function(){return l(Bs(this.Xx),q)}; +I.prototype.setGravity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);at(c,a)};I.prototype.getBroadphaseProxy=function(){return l(vs(this.Xx),u)};I.prototype.setAnisotropicFriction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Ss(d,a,c)};I.prototype.getCollisionShape=function(){return l(zs(this.Xx),p)};I.prototype.setContactProcessingThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ys(c,a)}; +I.prototype.setActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ps(c,a)};I.prototype.forceActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ps(c,a)};I.prototype.activate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);void 0===a?bs(c):cs(c,a)};I.prototype.isActive=function(){return!!Ls(this.Xx)};I.prototype.isKinematicObject=function(){return!!Ms(this.Xx)};I.prototype.isStaticObject=function(){return!!Ns(this.Xx)}; +I.prototype.isStaticOrKinematicObject=function(){return!!Os(this.Xx)};I.prototype.getRestitution=function(){return Gs(this.Xx)};I.prototype.getFriction=function(){return As(this.Xx)};I.prototype.getRollingFriction=function(){return Hs(this.Xx)};I.prototype.setRestitution=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ft(c,a)};I.prototype.setFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$s(c,a)}; +I.prototype.setRollingFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gt(c,a)};I.prototype.getWorldTransform=function(){return l(Ks(this.Xx),t)};I.prototype.getCollisionFlags=function(){return ys(this.Xx)};I.prototype.setCollisionFlags=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ws(c,a)};I.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kt(c,a)}; +I.prototype.setCollisionShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Xs(c,a)};I.prototype.setCcdMotionThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ts(c,a)};I.prototype.setCcdSweptSphereRadius=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Us(c,a)};I.prototype.getUserIndex=function(){return Is(this.Xx)};I.prototype.setUserIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);it(c,a)}; +I.prototype.getUserPointer=function(){return l(Js(this.Xx),nA)};I.prototype.setUserPointer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jt(c,a)};I.prototype.getBroadphaseHandle=function(){return l(us(this.Xx),u)};I.prototype.__destroy__=function(){as(this.Xx)};function QA(){throw"cannot construct a btIndexedMeshArray, no constructor in IDL";}QA.prototype=Object.create(h.prototype);QA.prototype.constructor=QA;QA.prototype.Yx=QA;QA.Zx={};f.btIndexedMeshArray=QA; +QA.prototype.size=QA.prototype.size=function(){return Zn(this.Xx)};QA.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Yn(c,a),RA)};QA.prototype.__destroy__=function(){Xn(this.Xx)};function SA(){this.Xx=Pj();k(SA)[this.Xx]=this}SA.prototype=Object.create(h.prototype);SA.prototype.constructor=SA;SA.prototype.Yx=SA;SA.Zx={};f.btDbvtBroadphase=SA;SA.prototype.__destroy__=function(){Oj(this.Xx)}; +function TA(a,c,d,e,g,n,A,S,da){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);S&&"object"===typeof S&&(S=S.Xx);da&&"object"===typeof da&&(da=da.Xx);this.Xx=rn(a,c,d,e,g,n,A,S,da);k(TA)[this.Xx]=this}TA.prototype=Object.create(qA.prototype);TA.prototype.constructor=TA;TA.prototype.Yx=TA;TA.Zx={}; +f.btHeightfieldTerrainShape=TA;TA.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wn(c,a)};TA.prototype.getMargin=function(){return un(this.Xx)};TA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vn(c,a)};TA.prototype.getLocalScaling=function(){return l(tn(this.Xx),q)};TA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);sn(d,a,c)}; +TA.prototype.__destroy__=function(){qn(this.Xx)};function UA(){this.Xx=ek();k(UA)[this.Xx]=this}UA.prototype=Object.create(FA.prototype);UA.prototype.constructor=UA;UA.prototype.Yx=UA;UA.Zx={};f.btDefaultSoftBodySolver=UA;UA.prototype.__destroy__=function(){dk(this.Xx)};function VA(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=pg(a);k(VA)[this.Xx]=this}VA.prototype=Object.create(jA.prototype);VA.prototype.constructor=VA;VA.prototype.Yx=VA;VA.Zx={};f.btCollisionDispatcher=VA; +VA.prototype.getNumManifolds=function(){return rg(this.Xx)};VA.prototype.getManifoldByIndexInternal=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(qg(c,a),AA)};VA.prototype.__destroy__=function(){og(this.Xx)}; +function WA(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=void 0===d?mf(a,c):void 0===e?nf(a,c,d):void 0===g?of(a,c,d,e):pf(a,c,d,e,g);k(WA)[this.Xx]=this}WA.prototype=Object.create(h.prototype);WA.prototype.constructor=WA;WA.prototype.Yx=WA;WA.Zx={};f.btAxisSweep3=WA;WA.prototype.__destroy__=function(){lf(this.Xx)}; +function nA(){throw"cannot construct a VoidPtr, no constructor in IDL";}nA.prototype=Object.create(h.prototype);nA.prototype.constructor=nA;nA.prototype.Yx=nA;nA.Zx={};f.VoidPtr=nA;nA.prototype.__destroy__=function(){hf(this.Xx)};function J(){this.Xx=Zt();k(J)[this.Xx]=this}J.prototype=Object.create(h.prototype);J.prototype.constructor=J;J.prototype.Yx=J;J.Zx={};f.btSoftBodyWorldInfo=J;J.prototype.get_air_density=J.prototype.Qy=function(){return $t(this.Xx)}; +J.prototype.set_air_density=J.prototype.xB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hu(c,a)};Object.defineProperty(J.prototype,"air_density",{get:J.prototype.Qy,set:J.prototype.xB});J.prototype.get_water_density=J.prototype.uB=function(){return eu(this.Xx)};J.prototype.set_water_density=J.prototype.aE=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mu(c,a)};Object.defineProperty(J.prototype,"water_density",{get:J.prototype.uB,set:J.prototype.aE}); +J.prototype.get_water_offset=J.prototype.wB=function(){return gu(this.Xx)};J.prototype.set_water_offset=J.prototype.cE=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ou(c,a)};Object.defineProperty(J.prototype,"water_offset",{get:J.prototype.wB,set:J.prototype.cE});J.prototype.get_m_maxDisplacement=J.prototype.xA=function(){return du(this.Xx)};J.prototype.set_m_maxDisplacement=J.prototype.dD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lu(c,a)}; +Object.defineProperty(J.prototype,"m_maxDisplacement",{get:J.prototype.xA,set:J.prototype.dD});J.prototype.get_water_normal=J.prototype.vB=function(){return l(fu(this.Xx),q)};J.prototype.set_water_normal=J.prototype.bE=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nu(c,a)};Object.defineProperty(J.prototype,"water_normal",{get:J.prototype.vB,set:J.prototype.bE});J.prototype.get_m_broadphase=J.prototype.yz=function(){return l(au(this.Xx),lA)}; +J.prototype.set_m_broadphase=J.prototype.eC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);iu(c,a)};Object.defineProperty(J.prototype,"m_broadphase",{get:J.prototype.yz,set:J.prototype.eC});J.prototype.get_m_dispatcher=J.prototype.Pz=function(){return l(bu(this.Xx),jA)};J.prototype.set_m_dispatcher=J.prototype.vC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ju(c,a)};Object.defineProperty(J.prototype,"m_dispatcher",{get:J.prototype.Pz,set:J.prototype.vC}); +J.prototype.get_m_gravity=J.prototype.Zz=function(){return l(cu(this.Xx),q)};J.prototype.set_m_gravity=J.prototype.FC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ku(c,a)};Object.defineProperty(J.prototype,"m_gravity",{get:J.prototype.Zz,set:J.prototype.FC});J.prototype.__destroy__=function(){Yt(this.Xx)}; +function XA(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=void 0===d?ei(a,c):void 0===e?_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a,c,d):fi(a,c,d,e);k(XA)[this.Xx]=this}XA.prototype=Object.create(pA.prototype);XA.prototype.constructor=XA;XA.prototype.Yx=XA;XA.Zx={};f.btConeTwistConstraint=XA; +XA.prototype.setLimit=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);ni(d,a,c)};XA.prototype.setAngularOnly=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ki(c,a)};XA.prototype.setDamping=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mi(c,a)};XA.prototype.enableMotor=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hi(c,a)}; +XA.prototype.setMaxMotorImpulse=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pi(c,a)};XA.prototype.setMaxMotorImpulseNormalized=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);oi(c,a)};XA.prototype.setMotorTarget=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ri(c,a)};XA.prototype.setMotorTargetInConstraintSpace=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qi(c,a)}; +XA.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gi(c,a)};XA.prototype.getBreakingImpulseThreshold=function(){return ii(this.Xx)};XA.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);li(c,a)};XA.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return ji(d,a,c)}; +XA.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);si(e,a,c,d)};XA.prototype.__destroy__=function(){di(this.Xx)}; +function YA(a,c,d,e,g,n,A){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);this.Xx=void 0===d?yn(a,c):void 0===e?zn(a,c,d):void 0===g?An(a,c,d,e):void 0===n?Bn(a,c,d,e,g):void 0===A?Cn(a,c,d,e,g,n):Dn(a,c,d,e,g,n,A);k(YA)[this.Xx]=this}YA.prototype=Object.create(pA.prototype);YA.prototype.constructor=YA; +YA.prototype.Yx=YA;YA.Zx={};f.btHingeConstraint=YA;YA.prototype.setLimit=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);void 0===g?Ln(n,a,c,d,e):Mn(n,a,c,d,e,g)};YA.prototype.enableAngularMotor=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);En(e,a,c,d)}; +YA.prototype.setAngularOnly=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jn(c,a)};YA.prototype.enableMotor=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gn(c,a)};YA.prototype.setMaxMotorImpulse=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nn(c,a)};YA.prototype.setMotorTarget=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);On(d,a,c)}; +YA.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fn(c,a)};YA.prototype.getBreakingImpulseThreshold=function(){return Hn(this.Xx)};YA.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kn(c,a)};YA.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return In(d,a,c)}; +YA.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Pn(e,a,c,d)};YA.prototype.__destroy__=function(){xn(this.Xx)};function ZA(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=Vh(a,c);k(ZA)[this.Xx]=this}ZA.prototype=Object.create(uA.prototype);ZA.prototype.constructor=ZA;ZA.prototype.Yx=ZA;ZA.Zx={};f.btConeShapeZ=ZA; +ZA.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Yh(c,a)};ZA.prototype.getLocalScaling=function(){return l(Xh(this.Xx),q)};ZA.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Wh(d,a,c)};ZA.prototype.__destroy__=function(){Uh(this.Xx)};function $A(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=Qh(a,c);k($A)[this.Xx]=this}$A.prototype=Object.create(uA.prototype); +$A.prototype.constructor=$A;$A.prototype.Yx=$A;$A.Zx={};f.btConeShapeX=$A;$A.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Th(c,a)};$A.prototype.getLocalScaling=function(){return l(Sh(this.Xx),q)};$A.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Rh(d,a,c)};$A.prototype.__destroy__=function(){Ph(this.Xx)}; +function aB(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=void 0===a?Sw():void 0===c?Tw(a):Uw(a,c);k(aB)[this.Xx]=this}aB.prototype=Object.create(CA.prototype);aB.prototype.constructor=aB;aB.prototype.Yx=aB;aB.Zx={};f.btTriangleMesh=aB;aB.prototype.addTriangle=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);void 0===e?Qw(g,a,c,d):Rw(g,a,c,d,e)}; +aB.prototype.findOrAddVertex=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return Vw(d,a,c)};aB.prototype.addIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pw(c,a)};aB.prototype.getIndexedMeshArray=function(){return l(Ww(this.Xx),QA)};aB.prototype.setScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Xw(c,a)};aB.prototype.__destroy__=function(){Ow(this.Xx)}; +function bB(a,c){b.by();"object"==typeof a&&(a=hA(a));c&&"object"===typeof c&&(c=c.Xx);this.Xx=void 0===a?Pi():void 0===c?Qi(a):Ri(a,c);k(bB)[this.Xx]=this}bB.prototype=Object.create(p.prototype);bB.prototype.constructor=bB;bB.prototype.Yx=bB;bB.Zx={};f.btConvexHullShape=bB;bB.prototype.addPoint=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===c?Ni(d,a):Oi(d,a,c)}; +bB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$i(c,a)};bB.prototype.getMargin=function(){return Vi(this.Xx)};bB.prototype.getNumVertices=function(){return Wi(this.Xx)};bB.prototype.initializePolyhedralFeatures=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return!!Xi(c,a)};bB.prototype.recalcLocalAabb=function(){Yi(this.Xx)};bB.prototype.getConvexPolyhedron=function(){return l(Ti(this.Xx),cB)}; +bB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zi(c,a)};bB.prototype.getLocalScaling=function(){return l(Ui(this.Xx),q)};bB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Si(d,a,c)};bB.prototype.__destroy__=function(){Mi(this.Xx)};function K(){this.Xx=Yx();k(K)[this.Xx]=this}K.prototype=Object.create(h.prototype);K.prototype.constructor=K;K.prototype.Yx=K;K.Zx={}; +f.btVehicleTuning=K;K.prototype.get_m_suspensionStiffness=K.prototype.my=function(){return dy(this.Xx)};K.prototype.set_m_suspensionStiffness=K.prototype.vy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jy(c,a)};Object.defineProperty(K.prototype,"m_suspensionStiffness",{get:K.prototype.my,set:K.prototype.vy});K.prototype.get_m_suspensionCompression=K.prototype.UA=function(){return by(this.Xx)}; +K.prototype.set_m_suspensionCompression=K.prototype.AD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hy(c,a)};Object.defineProperty(K.prototype,"m_suspensionCompression",{get:K.prototype.UA,set:K.prototype.AD});K.prototype.get_m_suspensionDamping=K.prototype.VA=function(){return cy(this.Xx)};K.prototype.set_m_suspensionDamping=K.prototype.BD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);iy(c,a)}; +Object.defineProperty(K.prototype,"m_suspensionDamping",{get:K.prototype.VA,set:K.prototype.BD});K.prototype.get_m_maxSuspensionTravelCm=K.prototype.ly=function(){return ay(this.Xx)};K.prototype.set_m_maxSuspensionTravelCm=K.prototype.uy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gy(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionTravelCm",{get:K.prototype.ly,set:K.prototype.uy});K.prototype.get_m_frictionSlip=K.prototype.hy=function(){return Zx(this.Xx)}; +K.prototype.set_m_frictionSlip=K.prototype.qy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ey(c,a)};Object.defineProperty(K.prototype,"m_frictionSlip",{get:K.prototype.hy,set:K.prototype.qy});K.prototype.get_m_maxSuspensionForce=K.prototype.ky=function(){return $x(this.Xx)};K.prototype.set_m_maxSuspensionForce=K.prototype.ty=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fy(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionForce",{get:K.prototype.ky,set:K.prototype.ty}); +function dB(){throw"cannot construct a btCollisionObjectWrapper, no constructor in IDL";}dB.prototype=Object.create(h.prototype);dB.prototype.constructor=dB;dB.prototype.Yx=dB;dB.Zx={};f.btCollisionObjectWrapper=dB;dB.prototype.getWorldTransform=function(){return l(ug(this.Xx),t)};dB.prototype.getCollisionObject=function(){return l(sg(this.Xx),r)};dB.prototype.getCollisionShape=function(){return l(tg(this.Xx),p)};function eB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=tt(a);k(eB)[this.Xx]=this} +eB.prototype=Object.create(h.prototype);eB.prototype.constructor=eB;eB.prototype.Yx=eB;eB.Zx={};f.btShapeHull=eB;eB.prototype.buildHull=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return!!ut(c,a)};eB.prototype.numVertices=function(){return wt(this.Xx)};eB.prototype.getVertexPointer=function(){return l(vt(this.Xx),q)};eB.prototype.__destroy__=function(){st(this.Xx)}; +function fB(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=void 0===a?Wj():void 0===c?Xj(a):Yj(a,c);k(fB)[this.Xx]=this}fB.prototype=Object.create(DA.prototype);fB.prototype.constructor=fB;fB.prototype.Yx=fB;fB.Zx={};f.btDefaultMotionState=fB;fB.prototype.getWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zj(c,a)};fB.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bk(c,a)}; +fB.prototype.get_m_graphicsWorldTrans=fB.prototype.Yz=function(){return l(ak(this.Xx),t)};fB.prototype.set_m_graphicsWorldTrans=fB.prototype.EC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ck(c,a)};Object.defineProperty(fB.prototype,"m_graphicsWorldTrans",{get:fB.prototype.Yz,set:fB.prototype.EC});fB.prototype.__destroy__=function(){Vj(this.Xx)};function L(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=Ky(a);k(L)[this.Xx]=this}L.prototype=Object.create(h.prototype); +L.prototype.constructor=L;L.prototype.Yx=L;L.Zx={};f.btWheelInfo=L;L.prototype.getSuspensionRestLength=function(){return Ly(this.Xx)};L.prototype.updateWheel=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Hz(d,a,c)};L.prototype.get_m_suspensionStiffness=L.prototype.my=function(){return bz(this.Xx)};L.prototype.set_m_suspensionStiffness=L.prototype.vy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zz(c,a)}; +Object.defineProperty(L.prototype,"m_suspensionStiffness",{get:L.prototype.my,set:L.prototype.vy});L.prototype.get_m_frictionSlip=L.prototype.hy=function(){return Sy(this.Xx)};L.prototype.set_m_frictionSlip=L.prototype.qy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pz(c,a)};Object.defineProperty(L.prototype,"m_frictionSlip",{get:L.prototype.hy,set:L.prototype.qy});L.prototype.get_m_engineForce=L.prototype.Tz=function(){return Ry(this.Xx)}; +L.prototype.set_m_engineForce=L.prototype.zC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);oz(c,a)};Object.defineProperty(L.prototype,"m_engineForce",{get:L.prototype.Tz,set:L.prototype.zC});L.prototype.get_m_rollInfluence=L.prototype.KA=function(){return Wy(this.Xx)};L.prototype.set_m_rollInfluence=L.prototype.qD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);tz(c,a)};Object.defineProperty(L.prototype,"m_rollInfluence",{get:L.prototype.KA,set:L.prototype.qD}); +L.prototype.get_m_suspensionRestLength1=L.prototype.ZA=function(){return az(this.Xx)};L.prototype.set_m_suspensionRestLength1=L.prototype.FD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yz(c,a)};Object.defineProperty(L.prototype,"m_suspensionRestLength1",{get:L.prototype.ZA,set:L.prototype.FD});L.prototype.get_m_wheelsRadius=L.prototype.mB=function(){return gz(this.Xx)};L.prototype.set_m_wheelsRadius=L.prototype.TD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ez(c,a)}; +Object.defineProperty(L.prototype,"m_wheelsRadius",{get:L.prototype.mB,set:L.prototype.TD});L.prototype.get_m_wheelsDampingCompression=L.prototype.Ey=function(){return ez(this.Xx)};L.prototype.set_m_wheelsDampingCompression=L.prototype.Ly=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Cz(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingCompression",{get:L.prototype.Ey,set:L.prototype.Ly});L.prototype.get_m_wheelsDampingRelaxation=L.prototype.Fy=function(){return fz(this.Xx)}; +L.prototype.set_m_wheelsDampingRelaxation=L.prototype.My=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Dz(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingRelaxation",{get:L.prototype.Fy,set:L.prototype.My});L.prototype.get_m_steering=L.prototype.SA=function(){return Zy(this.Xx)};L.prototype.set_m_steering=L.prototype.yD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wz(c,a)};Object.defineProperty(L.prototype,"m_steering",{get:L.prototype.SA,set:L.prototype.yD}); +L.prototype.get_m_maxSuspensionForce=L.prototype.ky=function(){return Ty(this.Xx)};L.prototype.set_m_maxSuspensionForce=L.prototype.ty=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qz(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionForce",{get:L.prototype.ky,set:L.prototype.ty});L.prototype.get_m_maxSuspensionTravelCm=L.prototype.ly=function(){return Uy(this.Xx)}; +L.prototype.set_m_maxSuspensionTravelCm=L.prototype.uy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rz(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionTravelCm",{get:L.prototype.ly,set:L.prototype.uy});L.prototype.get_m_wheelsSuspensionForce=L.prototype.nB=function(){return hz(this.Xx)};L.prototype.set_m_wheelsSuspensionForce=L.prototype.UD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fz(c,a)}; +Object.defineProperty(L.prototype,"m_wheelsSuspensionForce",{get:L.prototype.nB,set:L.prototype.UD});L.prototype.get_m_bIsFrontWheel=L.prototype.zy=function(){return!!My(this.Xx)};L.prototype.set_m_bIsFrontWheel=L.prototype.Gy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jz(c,a)};Object.defineProperty(L.prototype,"m_bIsFrontWheel",{get:L.prototype.zy,set:L.prototype.Gy});L.prototype.get_m_raycastInfo=L.prototype.IA=function(){return l(Vy(this.Xx),M)}; +L.prototype.set_m_raycastInfo=L.prototype.oD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sz(c,a)};Object.defineProperty(L.prototype,"m_raycastInfo",{get:L.prototype.IA,set:L.prototype.oD});L.prototype.get_m_chassisConnectionPointCS=L.prototype.Ez=function(){return l(Oy(this.Xx),q)};L.prototype.set_m_chassisConnectionPointCS=L.prototype.kC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lz(c,a)}; +Object.defineProperty(L.prototype,"m_chassisConnectionPointCS",{get:L.prototype.Ez,set:L.prototype.kC});L.prototype.get_m_worldTransform=L.prototype.oB=function(){return l(iz(this.Xx),t)};L.prototype.set_m_worldTransform=L.prototype.VD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gz(c,a)};Object.defineProperty(L.prototype,"m_worldTransform",{get:L.prototype.oB,set:L.prototype.VD});L.prototype.get_m_wheelDirectionCS=L.prototype.Dy=function(){return l(dz(this.Xx),q)}; +L.prototype.set_m_wheelDirectionCS=L.prototype.Ky=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Bz(c,a)};Object.defineProperty(L.prototype,"m_wheelDirectionCS",{get:L.prototype.Dy,set:L.prototype.Ky});L.prototype.get_m_wheelAxleCS=L.prototype.Cy=function(){return l(cz(this.Xx),q)};L.prototype.set_m_wheelAxleCS=L.prototype.Jy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Az(c,a)};Object.defineProperty(L.prototype,"m_wheelAxleCS",{get:L.prototype.Cy,set:L.prototype.Jy}); +L.prototype.get_m_rotation=L.prototype.MA=function(){return Xy(this.Xx)};L.prototype.set_m_rotation=L.prototype.sD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);uz(c,a)};Object.defineProperty(L.prototype,"m_rotation",{get:L.prototype.MA,set:L.prototype.sD});L.prototype.get_m_deltaRotation=L.prototype.Nz=function(){return Qy(this.Xx)};L.prototype.set_m_deltaRotation=L.prototype.tC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nz(c,a)}; +Object.defineProperty(L.prototype,"m_deltaRotation",{get:L.prototype.Nz,set:L.prototype.tC});L.prototype.get_m_brake=L.prototype.xz=function(){return Ny(this.Xx)};L.prototype.set_m_brake=L.prototype.dC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kz(c,a)};Object.defineProperty(L.prototype,"m_brake",{get:L.prototype.xz,set:L.prototype.dC});L.prototype.get_m_clippedInvContactDotSuspension=L.prototype.Fz=function(){return Py(this.Xx)}; +L.prototype.set_m_clippedInvContactDotSuspension=L.prototype.lC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);mz(c,a)};Object.defineProperty(L.prototype,"m_clippedInvContactDotSuspension",{get:L.prototype.Fz,set:L.prototype.lC});L.prototype.get_m_suspensionRelativeVelocity=L.prototype.XA=function(){return $y(this.Xx)};L.prototype.set_m_suspensionRelativeVelocity=L.prototype.DD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xz(c,a)}; +Object.defineProperty(L.prototype,"m_suspensionRelativeVelocity",{get:L.prototype.XA,set:L.prototype.DD});L.prototype.get_m_skidInfo=L.prototype.PA=function(){return Yy(this.Xx)};L.prototype.set_m_skidInfo=L.prototype.vD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vz(c,a)};Object.defineProperty(L.prototype,"m_skidInfo",{get:L.prototype.PA,set:L.prototype.vD});L.prototype.__destroy__=function(){Jy(this.Xx)}; +function N(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=void 0===a?yx():void 0===c?_emscripten_bind_btVector4_btVector4_1(a):void 0===d?_emscripten_bind_btVector4_btVector4_2(a,c):void 0===e?_emscripten_bind_btVector4_btVector4_3(a,c,d):zx(a,c,d,e);k(N)[this.Xx]=this}N.prototype=Object.create(q.prototype);N.prototype.constructor=N;N.prototype.Yx=N;N.Zx={};f.btVector4=N;N.prototype.w=function(){return Lx(this.Xx)}; +N.prototype.setValue=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);Hx(g,a,c,d,e)};N.prototype.length=N.prototype.length=function(){return Bx(this.Xx)};N.prototype.x=N.prototype.x=function(){return Mx(this.Xx)};N.prototype.y=N.prototype.y=function(){return Nx(this.Xx)};N.prototype.z=N.prototype.z=function(){return Ox(this.Xx)}; +N.prototype.setX=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ix(c,a)};N.prototype.setY=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jx(c,a)};N.prototype.setZ=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kx(c,a)};N.prototype.normalize=N.prototype.normalize=function(){Cx(this.Xx)};N.prototype.rotate=N.prototype.rotate=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return l(Gx(d,a,c),q)}; +N.prototype.dot=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return Ax(c,a)};N.prototype.op_mul=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Ex(c,a),q)};N.prototype.op_add=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Dx(c,a),q)};N.prototype.op_sub=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Fx(c,a),q)};N.prototype.__destroy__=function(){xx(this.Xx)};function gB(){this.Xx=Uj();k(gB)[this.Xx]=this}gB.prototype=Object.create(h.prototype); +gB.prototype.constructor=gB;gB.prototype.Yx=gB;gB.Zx={};f.btDefaultCollisionConstructionInfo=gB;gB.prototype.__destroy__=function(){Tj(this.Xx)};function O(){throw"cannot construct a Anchor, no constructor in IDL";}O.prototype=Object.create(h.prototype);O.prototype.constructor=O;O.prototype.Yx=O;O.Zx={};f.Anchor=O;O.prototype.get_m_node=O.prototype.zA=function(){return l(Hb(this.Xx),Node)};O.prototype.set_m_node=O.prototype.fD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ob(c,a)}; +Object.defineProperty(O.prototype,"m_node",{get:O.prototype.zA,set:O.prototype.fD});O.prototype.get_m_local=O.prototype.sA=function(){return l(Gb(this.Xx),q)};O.prototype.set_m_local=O.prototype.ZC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nb(c,a)};Object.defineProperty(O.prototype,"m_local",{get:O.prototype.sA,set:O.prototype.ZC});O.prototype.get_m_body=O.prototype.wz=function(){return l(Bb(this.Xx),I)}; +O.prototype.set_m_body=O.prototype.cC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ib(c,a)};Object.defineProperty(O.prototype,"m_body",{get:O.prototype.wz,set:O.prototype.cC});O.prototype.get_m_influence=O.prototype.lA=function(){return Fb(this.Xx)};O.prototype.set_m_influence=O.prototype.SC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mb(c,a)};Object.defineProperty(O.prototype,"m_influence",{get:O.prototype.lA,set:O.prototype.SC}); +O.prototype.get_m_c0=O.prototype.zz=function(){return l(Cb(this.Xx),GA)};O.prototype.set_m_c0=O.prototype.fC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jb(c,a)};Object.defineProperty(O.prototype,"m_c0",{get:O.prototype.zz,set:O.prototype.fC});O.prototype.get_m_c1=O.prototype.Az=function(){return l(Db(this.Xx),q)};O.prototype.set_m_c1=O.prototype.gC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kb(c,a)};Object.defineProperty(O.prototype,"m_c1",{get:O.prototype.Az,set:O.prototype.gC}); +O.prototype.get_m_c2=O.prototype.Bz=function(){return Eb(this.Xx)};O.prototype.set_m_c2=O.prototype.hC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Lb(c,a)};Object.defineProperty(O.prototype,"m_c2",{get:O.prototype.Bz,set:O.prototype.hC});O.prototype.__destroy__=function(){Ab(this.Xx)};function P(){throw"cannot construct a btVehicleRaycasterResult, no constructor in IDL";}P.prototype=Object.create(h.prototype);P.prototype.constructor=P;P.prototype.Yx=P;P.Zx={}; +f.btVehicleRaycasterResult=P;P.prototype.get_m_hitPointInWorld=P.prototype.gA=function(){return l(Sx(this.Xx),q)};P.prototype.set_m_hitPointInWorld=P.prototype.NC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Vx(c,a)};Object.defineProperty(P.prototype,"m_hitPointInWorld",{get:P.prototype.gA,set:P.prototype.NC});P.prototype.get_m_hitNormalInWorld=P.prototype.eA=function(){return l(Rx(this.Xx),q)}; +P.prototype.set_m_hitNormalInWorld=P.prototype.LC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ux(c,a)};Object.defineProperty(P.prototype,"m_hitNormalInWorld",{get:P.prototype.eA,set:P.prototype.LC});P.prototype.get_m_distFraction=P.prototype.Qz=function(){return Qx(this.Xx)};P.prototype.set_m_distFraction=P.prototype.wC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Tx(c,a)};Object.defineProperty(P.prototype,"m_distFraction",{get:P.prototype.Qz,set:P.prototype.wC}); +P.prototype.__destroy__=function(){Px(this.Xx)};function MA(){throw"cannot construct a btVector3Array, no constructor in IDL";}MA.prototype=Object.create(h.prototype);MA.prototype.constructor=MA;MA.prototype.Yx=MA;MA.Zx={};f.btVector3Array=MA;MA.prototype.size=MA.prototype.size=function(){return fx(this.Xx)};MA.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(ex(c,a),q)};MA.prototype.__destroy__=function(){dx(this.Xx)}; +function hB(){throw"cannot construct a btConstraintSolver, no constructor in IDL";}hB.prototype=Object.create(h.prototype);hB.prototype.constructor=hB;hB.prototype.Yx=hB;hB.Zx={};f.btConstraintSolver=hB;hB.prototype.__destroy__=function(){Ei(this.Xx)};function Q(a,c,d){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);this.Xx=Yq(a,c,d);k(Q)[this.Xx]=this}Q.prototype=Object.create(vA.prototype);Q.prototype.constructor=Q;Q.prototype.Yx=Q;Q.Zx={}; +f.btRaycastVehicle=Q;Q.prototype.applyEngineForce=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Xq(d,a,c)};Q.prototype.setSteeringValue=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);qr(d,a,c)};Q.prototype.getWheelTransformWS=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(kr(c,a),t)}; +Q.prototype.updateWheelTransform=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);xr(d,a,c)};Q.prototype.addWheel=function(a,c,d,e,g,n,A){var S=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);return l(Wq(S,a,c,d,e,g,n,A),L)};Q.prototype.getNumWheels=function(){return cr(this.Xx)}; +Q.prototype.getRigidBody=function(){return l(er(this.Xx),I)};Q.prototype.getWheelInfo=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(jr(c,a),L)};Q.prototype.setBrake=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);nr(d,a,c)};Q.prototype.setCoordinateSystem=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);or(e,a,c,d)};Q.prototype.getCurrentSpeedKmHour=function(){return $q(this.Xx)}; +Q.prototype.getChassisWorldTransform=function(){return l(Zq(this.Xx),t)};Q.prototype.rayCast=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return lr(c,a)};Q.prototype.updateVehicle=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wr(c,a)};Q.prototype.resetSuspension=function(){mr(this.Xx)};Q.prototype.getSteeringValue=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return fr(c,a)}; +Q.prototype.updateWheelTransformsWS=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===c?yr(d,a):zr(d,a,c)};Q.prototype.setPitchControl=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pr(c,a)};Q.prototype.updateSuspension=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vr(c,a)};Q.prototype.updateFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ur(c,a)};Q.prototype.getRightAxis=function(){return dr(this.Xx)}; +Q.prototype.getUpAxis=function(){return gr(this.Xx)};Q.prototype.getForwardAxis=function(){return ar(this.Xx)};Q.prototype.getForwardVector=function(){return l(br(this.Xx),q)};Q.prototype.getUserConstraintType=function(){return ir(this.Xx)};Q.prototype.setUserConstraintType=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sr(c,a)};Q.prototype.setUserConstraintId=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rr(c,a)};Q.prototype.getUserConstraintId=function(){return hr(this.Xx)}; +Q.prototype.updateAction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);tr(d,a,c)};Q.prototype.__destroy__=function(){Vq(this.Xx)};function iB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=uj(a);k(iB)[this.Xx]=this}iB.prototype=Object.create(yA.prototype);iB.prototype.constructor=iB;iB.prototype.Yx=iB;iB.Zx={};f.btCylinderShapeX=iB;iB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zj(c,a)};iB.prototype.getMargin=function(){return xj(this.Xx)}; +iB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yj(c,a)};iB.prototype.getLocalScaling=function(){return l(wj(this.Xx),q)};iB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);vj(d,a,c)};iB.prototype.__destroy__=function(){tj(this.Xx)};function jB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=Bj(a);k(jB)[this.Xx]=this}jB.prototype=Object.create(yA.prototype);jB.prototype.constructor=jB; +jB.prototype.Yx=jB;jB.Zx={};f.btCylinderShapeZ=jB;jB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gj(c,a)};jB.prototype.getMargin=function(){return Ej(this.Xx)};jB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fj(c,a)};jB.prototype.getLocalScaling=function(){return l(Dj(this.Xx),q)};jB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Cj(d,a,c)}; +jB.prototype.__destroy__=function(){Aj(this.Xx)};function cB(){throw"cannot construct a btConvexPolyhedron, no constructor in IDL";}cB.prototype=Object.create(h.prototype);cB.prototype.constructor=cB;cB.prototype.Yx=cB;cB.Zx={};f.btConvexPolyhedron=cB;cB.prototype.get_m_vertices=cB.prototype.iB=function(){return l(cj(this.Xx),MA)};cB.prototype.set_m_vertices=cB.prototype.PD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ej(c,a)}; +Object.defineProperty(cB.prototype,"m_vertices",{get:cB.prototype.iB,set:cB.prototype.PD});cB.prototype.get_m_faces=cB.prototype.Vz=function(){return l(bj(this.Xx),kB)};cB.prototype.set_m_faces=cB.prototype.BC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dj(c,a)};Object.defineProperty(cB.prototype,"m_faces",{get:cB.prototype.Vz,set:cB.prototype.BC});cB.prototype.__destroy__=function(){aj(this.Xx)};function lB(){this.Xx=rt();k(lB)[this.Xx]=this}lB.prototype=Object.create(h.prototype); +lB.prototype.constructor=lB;lB.prototype.Yx=lB;lB.Zx={};f.btSequentialImpulseConstraintSolver=lB;lB.prototype.__destroy__=function(){qt(this.Xx)};function mB(){throw"cannot construct a tAnchorArray, no constructor in IDL";}mB.prototype=Object.create(h.prototype);mB.prototype.constructor=mB;mB.prototype.Yx=mB;mB.Zx={};f.tAnchorArray=mB;mB.prototype.size=mB.prototype.size=function(){return Nz(this.Xx)};mB.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Jz(c,a),O)}; +mB.prototype.clear=mB.prototype.clear=function(){Kz(this.Xx)};mB.prototype.push_back=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mz(c,a)};mB.prototype.pop_back=function(){Lz(this.Xx)};mB.prototype.__destroy__=function(){Iz(this.Xx)};function M(){throw"cannot construct a RaycastInfo, no constructor in IDL";}M.prototype=Object.create(h.prototype);M.prototype.constructor=M;M.prototype.Yx=M;M.Zx={};f.RaycastInfo=M; +M.prototype.get_m_contactNormalWS=M.prototype.Hz=function(){return l(Se(this.Xx),q)};M.prototype.set_m_contactNormalWS=M.prototype.nC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$e(c,a)};Object.defineProperty(M.prototype,"m_contactNormalWS",{get:M.prototype.Hz,set:M.prototype.nC});M.prototype.get_m_contactPointWS=M.prototype.Iz=function(){return l(Te(this.Xx),q)};M.prototype.set_m_contactPointWS=M.prototype.oC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);af(c,a)}; +Object.defineProperty(M.prototype,"m_contactPointWS",{get:M.prototype.Iz,set:M.prototype.oC});M.prototype.get_m_suspensionLength=M.prototype.WA=function(){return Xe(this.Xx)};M.prototype.set_m_suspensionLength=M.prototype.CD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ef(c,a)};Object.defineProperty(M.prototype,"m_suspensionLength",{get:M.prototype.WA,set:M.prototype.CD});M.prototype.get_m_hardPointWS=M.prototype.aA=function(){return l(Ve(this.Xx),q)}; +M.prototype.set_m_hardPointWS=M.prototype.HC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cf(c,a)};Object.defineProperty(M.prototype,"m_hardPointWS",{get:M.prototype.aA,set:M.prototype.HC});M.prototype.get_m_wheelDirectionWS=M.prototype.kB=function(){return l(Ze(this.Xx),q)};M.prototype.set_m_wheelDirectionWS=M.prototype.RD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gf(c,a)};Object.defineProperty(M.prototype,"m_wheelDirectionWS",{get:M.prototype.kB,set:M.prototype.RD}); +M.prototype.get_m_wheelAxleWS=M.prototype.jB=function(){return l(Ye(this.Xx),q)};M.prototype.set_m_wheelAxleWS=M.prototype.QD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ff(c,a)};Object.defineProperty(M.prototype,"m_wheelAxleWS",{get:M.prototype.jB,set:M.prototype.QD});M.prototype.get_m_isInContact=M.prototype.mA=function(){return!!We(this.Xx)};M.prototype.set_m_isInContact=M.prototype.TC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);df(c,a)}; +Object.defineProperty(M.prototype,"m_isInContact",{get:M.prototype.mA,set:M.prototype.TC});M.prototype.get_m_groundObject=M.prototype.$z=function(){return Ue(this.Xx)};M.prototype.set_m_groundObject=M.prototype.GC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bf(c,a)};Object.defineProperty(M.prototype,"m_groundObject",{get:M.prototype.$z,set:M.prototype.GC});M.prototype.__destroy__=function(){Re(this.Xx)}; +function nB(a,c,d){b.by();a&&"object"===typeof a&&(a=a.Xx);"object"==typeof c&&(c=hA(c));d&&"object"===typeof d&&(d=d.Xx);this.Xx=bp(a,c,d);k(nB)[this.Xx]=this}nB.prototype=Object.create(p.prototype);nB.prototype.constructor=nB;nB.prototype.Yx=nB;nB.Zx={};f.btMultiSphereShape=nB;nB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ep(c,a)};nB.prototype.getLocalScaling=function(){return l(dp(this.Xx),q)}; +nB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);cp(d,a,c)};nB.prototype.__destroy__=function(){ap(this.Xx)};function R(a,c,d,e){b.by();a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);"object"==typeof e&&(e=hA(e));this.Xx=Bu(a,c,d,e);k(R)[this.Xx]=this}R.prototype=Object.create(r.prototype);R.prototype.constructor=R;R.prototype.Yx=R;R.Zx={};f.btSoftBody=R; +R.prototype.checkLink=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return!!Du(d,a,c)};R.prototype.checkFace=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);return!!Cu(e,a,c,d)};R.prototype.appendMaterial=function(){return l(yu(this.Xx),B)};R.prototype.appendNode=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);zu(d,a,c)}; +R.prototype.appendLink=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);xu(g,a,c,d,e)};R.prototype.appendFace=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);wu(g,a,c,d,e)}; +R.prototype.appendTetra=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);Au(n,a,c,d,e,g)};R.prototype.appendAnchor=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);vu(g,a,c,d,e)}; +R.prototype.addForce=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===c?tu(d,a):uu(d,a,c)};R.prototype.addAeroForceToNode=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);su(d,a,c)};R.prototype.getTotalMass=function(){return Ou(this.Xx)};R.prototype.setTotalMass=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);mv(d,a,c)}; +R.prototype.setMass=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);jv(d,a,c)};R.prototype.transform=R.prototype.transform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);uv(c,a)};R.prototype.translate=R.prototype.translate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vv(c,a)};R.prototype.rotate=R.prototype.rotate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$u(c,a)}; +R.prototype.scale=R.prototype.scale=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);av(c,a)};R.prototype.generateClusters=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return void 0===c?Gu(d,a):Hu(d,a,c)};R.prototype.generateBendingConstraints=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return Fu(d,a,c)}; +R.prototype.upcast=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(wv(c,a),R)};R.prototype.setAnisotropicFriction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);cv(d,a,c)};R.prototype.getCollisionShape=function(){return l(Ku(this.Xx),p)};R.prototype.setContactProcessingThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hv(c,a)}; +R.prototype.setActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bv(c,a)};R.prototype.forceActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Eu(c,a)};R.prototype.activate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);void 0===a?qu(c):ru(c,a)};R.prototype.isActive=function(){return!!Wu(this.Xx)};R.prototype.isKinematicObject=function(){return!!Xu(this.Xx)};R.prototype.isStaticObject=function(){return!!Yu(this.Xx)}; +R.prototype.isStaticOrKinematicObject=function(){return!!Zu(this.Xx)};R.prototype.getRestitution=function(){return Mu(this.Xx)};R.prototype.getFriction=function(){return Lu(this.Xx)};R.prototype.getRollingFriction=function(){return Nu(this.Xx)};R.prototype.setRestitution=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kv(c,a)};R.prototype.setFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);iv(c,a)}; +R.prototype.setRollingFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);lv(c,a)};R.prototype.getWorldTransform=function(){return l(Ru(this.Xx),t)};R.prototype.getCollisionFlags=function(){return Ju(this.Xx)};R.prototype.setCollisionFlags=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fv(c,a)};R.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pv(c,a)}; +R.prototype.setCollisionShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gv(c,a)};R.prototype.setCcdMotionThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dv(c,a)};R.prototype.setCcdSweptSphereRadius=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ev(c,a)};R.prototype.getUserIndex=function(){return Pu(this.Xx)};R.prototype.setUserIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nv(c,a)}; +R.prototype.getUserPointer=function(){return l(Qu(this.Xx),nA)};R.prototype.setUserPointer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ov(c,a)};R.prototype.getBroadphaseHandle=function(){return l(Iu(this.Xx),u)};R.prototype.get_m_cfg=R.prototype.Cz=function(){return l(Tu(this.Xx),T)};R.prototype.set_m_cfg=R.prototype.iC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rv(c,a)};Object.defineProperty(R.prototype,"m_cfg",{get:R.prototype.Cz,set:R.prototype.iC}); +R.prototype.get_m_nodes=R.prototype.AA=function(){return l(Vu(this.Xx),oB)};R.prototype.set_m_nodes=R.prototype.gD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);tv(c,a)};Object.defineProperty(R.prototype,"m_nodes",{get:R.prototype.AA,set:R.prototype.gD});R.prototype.get_m_materials=R.prototype.wA=function(){return l(Uu(this.Xx),NA)};R.prototype.set_m_materials=R.prototype.cD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sv(c,a)}; +Object.defineProperty(R.prototype,"m_materials",{get:R.prototype.wA,set:R.prototype.cD});R.prototype.get_m_anchors=R.prototype.rz=function(){return l(Su(this.Xx),mB)};R.prototype.set_m_anchors=R.prototype.ZB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qv(c,a)};Object.defineProperty(R.prototype,"m_anchors",{get:R.prototype.rz,set:R.prototype.ZB});R.prototype.__destroy__=function(){pu(this.Xx)};function pB(){throw"cannot construct a btIntArray, no constructor in IDL";}pB.prototype=Object.create(h.prototype); +pB.prototype.constructor=pB;pB.prototype.Yx=pB;pB.Zx={};f.btIntArray=pB;pB.prototype.size=pB.prototype.size=function(){return fo(this.Xx)};pB.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return eo(c,a)};pB.prototype.__destroy__=function(){co(this.Xx)};function T(){throw"cannot construct a Config, no constructor in IDL";}T.prototype=Object.create(h.prototype);T.prototype.constructor=T;T.prototype.Yx=T;T.Zx={};f.Config=T;T.prototype.get_kVCF=T.prototype.kz=function(){return Xc(this.Xx)}; +T.prototype.set_kVCF=T.prototype.SB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vd(c,a)};Object.defineProperty(T.prototype,"kVCF",{get:T.prototype.kz,set:T.prototype.SB});T.prototype.get_kDP=T.prototype.Yy=function(){return Lc(this.Xx)};T.prototype.set_kDP=T.prototype.FB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jd(c,a)};Object.defineProperty(T.prototype,"kDP",{get:T.prototype.Yy,set:T.prototype.FB});T.prototype.get_kDG=T.prototype.Xy=function(){return Kc(this.Xx)}; +T.prototype.set_kDG=T.prototype.EB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);id(c,a)};Object.defineProperty(T.prototype,"kDG",{get:T.prototype.Xy,set:T.prototype.EB});T.prototype.get_kLF=T.prototype.$y=function(){return Nc(this.Xx)};T.prototype.set_kLF=T.prototype.HB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ld(c,a)};Object.defineProperty(T.prototype,"kLF",{get:T.prototype.$y,set:T.prototype.HB});T.prototype.get_kPR=T.prototype.bz=function(){return Pc(this.Xx)}; +T.prototype.set_kPR=T.prototype.JB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);nd(c,a)};Object.defineProperty(T.prototype,"kPR",{get:T.prototype.bz,set:T.prototype.JB});T.prototype.get_kVC=T.prototype.jz=function(){return Yc(this.Xx)};T.prototype.set_kVC=T.prototype.RB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wd(c,a)};Object.defineProperty(T.prototype,"kVC",{get:T.prototype.jz,set:T.prototype.RB});T.prototype.get_kDF=T.prototype.Wy=function(){return Jc(this.Xx)}; +T.prototype.set_kDF=T.prototype.DB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hd(c,a)};Object.defineProperty(T.prototype,"kDF",{get:T.prototype.Wy,set:T.prototype.DB});T.prototype.get_kMT=T.prototype.az=function(){return Oc(this.Xx)};T.prototype.set_kMT=T.prototype.IB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);md(c,a)};Object.defineProperty(T.prototype,"kMT",{get:T.prototype.az,set:T.prototype.IB});T.prototype.get_kCHR=T.prototype.Vy=function(){return Ic(this.Xx)}; +T.prototype.set_kCHR=T.prototype.CB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gd(c,a)};Object.defineProperty(T.prototype,"kCHR",{get:T.prototype.Vy,set:T.prototype.CB});T.prototype.get_kKHR=T.prototype.Zy=function(){return Mc(this.Xx)};T.prototype.set_kKHR=T.prototype.GB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);kd(c,a)};Object.defineProperty(T.prototype,"kKHR",{get:T.prototype.Zy,set:T.prototype.GB});T.prototype.get_kSHR=T.prototype.cz=function(){return Qc(this.Xx)}; +T.prototype.set_kSHR=T.prototype.KB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);od(c,a)};Object.defineProperty(T.prototype,"kSHR",{get:T.prototype.cz,set:T.prototype.KB});T.prototype.get_kAHR=T.prototype.Uy=function(){return Hc(this.Xx)};T.prototype.set_kAHR=T.prototype.BB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fd(c,a)};Object.defineProperty(T.prototype,"kAHR",{get:T.prototype.Uy,set:T.prototype.BB});T.prototype.get_kSRHR_CL=T.prototype.fz=function(){return Tc(this.Xx)}; +T.prototype.set_kSRHR_CL=T.prototype.NB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);rd(c,a)};Object.defineProperty(T.prototype,"kSRHR_CL",{get:T.prototype.fz,set:T.prototype.NB});T.prototype.get_kSKHR_CL=T.prototype.dz=function(){return Rc(this.Xx)};T.prototype.set_kSKHR_CL=T.prototype.LB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pd(c,a)};Object.defineProperty(T.prototype,"kSKHR_CL",{get:T.prototype.dz,set:T.prototype.LB});T.prototype.get_kSSHR_CL=T.prototype.hz=function(){return Vc(this.Xx)}; +T.prototype.set_kSSHR_CL=T.prototype.PB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);td(c,a)};Object.defineProperty(T.prototype,"kSSHR_CL",{get:T.prototype.hz,set:T.prototype.PB});T.prototype.get_kSR_SPLT_CL=T.prototype.gz=function(){return Uc(this.Xx)};T.prototype.set_kSR_SPLT_CL=T.prototype.OB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sd(c,a)};Object.defineProperty(T.prototype,"kSR_SPLT_CL",{get:T.prototype.gz,set:T.prototype.OB}); +T.prototype.get_kSK_SPLT_CL=T.prototype.ez=function(){return Sc(this.Xx)};T.prototype.set_kSK_SPLT_CL=T.prototype.MB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qd(c,a)};Object.defineProperty(T.prototype,"kSK_SPLT_CL",{get:T.prototype.ez,set:T.prototype.MB});T.prototype.get_kSS_SPLT_CL=T.prototype.iz=function(){return Wc(this.Xx)};T.prototype.set_kSS_SPLT_CL=T.prototype.QB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ud(c,a)}; +Object.defineProperty(T.prototype,"kSS_SPLT_CL",{get:T.prototype.iz,set:T.prototype.QB});T.prototype.get_maxvolume=T.prototype.qB=function(){return Zc(this.Xx)};T.prototype.set_maxvolume=T.prototype.XD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xd(c,a)};Object.defineProperty(T.prototype,"maxvolume",{get:T.prototype.qB,set:T.prototype.XD});T.prototype.get_timescale=T.prototype.sB=function(){return ad(this.Xx)}; +T.prototype.set_timescale=T.prototype.ZD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zd(c,a)};Object.defineProperty(T.prototype,"timescale",{get:T.prototype.sB,set:T.prototype.ZD});T.prototype.get_viterations=T.prototype.tB=function(){return bd(this.Xx)};T.prototype.set_viterations=T.prototype.$D=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ad(c,a)};Object.defineProperty(T.prototype,"viterations",{get:T.prototype.tB,set:T.prototype.$D}); +T.prototype.get_piterations=T.prototype.rB=function(){return $c(this.Xx)};T.prototype.set_piterations=T.prototype.YD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yd(c,a)};Object.defineProperty(T.prototype,"piterations",{get:T.prototype.rB,set:T.prototype.YD});T.prototype.get_diterations=T.prototype.Ty=function(){return Gc(this.Xx)};T.prototype.set_diterations=T.prototype.AB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ed(c,a)}; +Object.defineProperty(T.prototype,"diterations",{get:T.prototype.Ty,set:T.prototype.AB});T.prototype.get_citerations=T.prototype.Ry=function(){return Ec(this.Xx)};T.prototype.set_citerations=T.prototype.yB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cd(c,a)};Object.defineProperty(T.prototype,"citerations",{get:T.prototype.Ry,set:T.prototype.yB});T.prototype.get_collisions=T.prototype.Sy=function(){return Fc(this.Xx)}; +T.prototype.set_collisions=T.prototype.zB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dd(c,a)};Object.defineProperty(T.prototype,"collisions",{get:T.prototype.Sy,set:T.prototype.zB});T.prototype.__destroy__=function(){Dc(this.Xx)};function Node(){throw"cannot construct a Node, no constructor in IDL";}Node.prototype=Object.create(h.prototype);Node.prototype.constructor=Node;Node.prototype.Yx=Node;Node.Zx={};f.Node=Node; +Node.prototype.get_m_x=Node.prototype.pB=function(){return l(ze(this.Xx),q)};Node.prototype.set_m_x=Node.prototype.WD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ge(c,a)};Object.defineProperty(Node.prototype,"m_x",{get:Node.prototype.pB,set:Node.prototype.WD});Node.prototype.get_m_q=Node.prototype.HA=function(){return l(xe(this.Xx),q)};Node.prototype.set_m_q=Node.prototype.nD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ee(c,a)}; +Object.defineProperty(Node.prototype,"m_q",{get:Node.prototype.HA,set:Node.prototype.nD});Node.prototype.get_m_v=Node.prototype.hB=function(){return l(ye(this.Xx),q)};Node.prototype.set_m_v=Node.prototype.OD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fe(c,a)};Object.defineProperty(Node.prototype,"m_v",{get:Node.prototype.hB,set:Node.prototype.OD});Node.prototype.get_m_f=Node.prototype.Uz=function(){return l(ue(this.Xx),q)}; +Node.prototype.set_m_f=Node.prototype.AC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Be(c,a)};Object.defineProperty(Node.prototype,"m_f",{get:Node.prototype.Uz,set:Node.prototype.AC});Node.prototype.get_m_n=Node.prototype.yA=function(){return l(we(this.Xx),q)};Node.prototype.set_m_n=Node.prototype.eD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);De(c,a)};Object.defineProperty(Node.prototype,"m_n",{get:Node.prototype.yA,set:Node.prototype.eD}); +Node.prototype.get_m_im=Node.prototype.iA=function(){return ve(this.Xx)};Node.prototype.set_m_im=Node.prototype.PC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ce(c,a)};Object.defineProperty(Node.prototype,"m_im",{get:Node.prototype.iA,set:Node.prototype.PC});Node.prototype.get_m_area=Node.prototype.vz=function(){return te(this.Xx)};Node.prototype.set_m_area=Node.prototype.bC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ae(c,a)}; +Object.defineProperty(Node.prototype,"m_area",{get:Node.prototype.vz,set:Node.prototype.bC});Node.prototype.__destroy__=function(){se(this.Xx)};function qB(){this.Xx=pn();k(qB)[this.Xx]=this}qB.prototype=Object.create(h.prototype);qB.prototype.constructor=qB;qB.prototype.Yx=qB;qB.Zx={};f.btGhostPairCallback=qB;qB.prototype.__destroy__=function(){on(this.Xx)};function rB(){throw"cannot construct a btOverlappingPairCallback, no constructor in IDL";}rB.prototype=Object.create(h.prototype); +rB.prototype.constructor=rB;rB.prototype.Yx=rB;rB.Zx={};f.btOverlappingPairCallback=rB;rB.prototype.__destroy__=function(){ip(this.Xx)};function U(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=void 0===e?ho(a,c,d):io(a,c,d,e);k(U)[this.Xx]=this}U.prototype=Object.create(vA.prototype);U.prototype.constructor=U;U.prototype.Yx=U;U.Zx={};f.btKinematicCharacterController=U; +U.prototype.setUpAxis=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wo(c,a)};U.prototype.setWalkDirection=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ao(c,a)};U.prototype.setVelocityForTimeInterval=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);zo(d,a,c)};U.prototype.warp=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Co(c,a)};U.prototype.preStep=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qo(c,a)}; +U.prototype.playerStep=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);po(d,a,c)};U.prototype.setFallSpeed=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ro(c,a)};U.prototype.setJumpSpeed=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);to(c,a)};U.prototype.setMaxJumpHeight=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);uo(c,a)};U.prototype.canJump=function(){return!!jo(this.Xx)};U.prototype.jump=function(){no(this.Xx)}; +U.prototype.setGravity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);so(c,a)};U.prototype.getGravity=function(){return lo(this.Xx)};U.prototype.setMaxSlope=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vo(c,a)};U.prototype.getMaxSlope=function(){return mo(this.Xx)};U.prototype.getGhostObject=function(){return l(ko(this.Xx),V)};U.prototype.setUseGhostSweepTest=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yo(c,a)};U.prototype.onGround=function(){return!!oo(this.Xx)}; +U.prototype.setUpInterpolate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xo(c,a)};U.prototype.updateAction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Bo(d,a,c)};U.prototype.__destroy__=function(){go(this.Xx)};function sB(){throw"cannot construct a btSoftBodyArray, no constructor in IDL";}sB.prototype=Object.create(h.prototype);sB.prototype.constructor=sB;sB.prototype.Yx=sB;sB.Zx={};f.btSoftBodyArray=sB; +sB.prototype.size=sB.prototype.size=function(){return Lt(this.Xx)};sB.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Kt(c,a),R)};sB.prototype.__destroy__=function(){Jt(this.Xx)};function kB(){throw"cannot construct a btFaceArray, no constructor in IDL";}kB.prototype=Object.create(h.prototype);kB.prototype.constructor=kB;kB.prototype.Yx=kB;kB.Zx={};f.btFaceArray=kB;kB.prototype.size=kB.prototype.size=function(){return Ol(this.Xx)}; +kB.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Nl(c,a),tB)};kB.prototype.__destroy__=function(){Ml(this.Xx)};function uB(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=sw(a,c);k(uB)[this.Xx]=this}uB.prototype=Object.create(qA.prototype);uB.prototype.constructor=uB;uB.prototype.Yx=uB;uB.Zx={};f.btStaticPlaneShape=uB;uB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vw(c,a)}; +uB.prototype.getLocalScaling=function(){return l(uw(this.Xx),q)};uB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);tw(d,a,c)};uB.prototype.__destroy__=function(){rw(this.Xx)};function kA(){throw"cannot construct a btOverlappingPairCache, no constructor in IDL";}kA.prototype=Object.create(h.prototype);kA.prototype.constructor=kA;kA.prototype.Yx=kA;kA.Zx={};f.btOverlappingPairCache=kA; +kA.prototype.setInternalGhostPairCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hp(c,a)};kA.prototype.getNumOverlappingPairs=function(){return gp(this.Xx)};kA.prototype.__destroy__=function(){fp(this.Xx)};function RA(){throw"cannot construct a btIndexedMesh, no constructor in IDL";}RA.prototype=Object.create(h.prototype);RA.prototype.constructor=RA;RA.prototype.Yx=RA;RA.Zx={};f.btIndexedMesh=RA;RA.prototype.get_m_numTriangles=RA.prototype.DA=function(){return ao(this.Xx)}; +RA.prototype.set_m_numTriangles=RA.prototype.jD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bo(c,a)};Object.defineProperty(RA.prototype,"m_numTriangles",{get:RA.prototype.DA,set:RA.prototype.jD});RA.prototype.__destroy__=function(){$n(this.Xx)};function W(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=Hv(a,c,d,e,g);k(W)[this.Xx]=this}W.prototype=Object.create(x.prototype); +W.prototype.constructor=W;W.prototype.Yx=W;W.Zx={};f.btSoftRigidDynamicsWorld=W;W.prototype.addSoftBody=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Gv(e,a,c,d)};W.prototype.removeSoftBody=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);aw(c,a)};W.prototype.removeCollisionObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Yv(c,a)};W.prototype.getWorldInfo=function(){return l(Vv(this.Xx),J)}; +W.prototype.getSoftBodyArray=function(){return l(Tv(this.Xx),sB)};W.prototype.getDispatcher=function(){return l(Qv(this.Xx),jA)};W.prototype.rayTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Wv(e,a,c,d)};W.prototype.getPairCache=function(){return l(Sv(this.Xx),kA)};W.prototype.getDispatchInfo=function(){return l(Pv(this.Xx),m)}; +W.prototype.addCollisionObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?zv(e,a):void 0===d?Av(e,a,c):Bv(e,a,c,d)};W.prototype.getBroadphase=function(){return l(Nv(this.Xx),lA)}; +W.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);Kv(n,a,c,d,e,g)};W.prototype.contactPairTest=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Iv(e,a,c,d)}; +W.prototype.contactTest=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Jv(d,a,c)};W.prototype.updateSingleAabb=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);jw(c,a)};W.prototype.setDebugDrawer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ew(c,a)};W.prototype.getDebugDrawer=function(){return l(Ov(this.Xx),mA)};W.prototype.debugDrawWorld=function(){Mv(this.Xx)}; +W.prototype.debugDrawObject=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Lv(e,a,c,d)};W.prototype.setGravity=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);fw(c,a)};W.prototype.getGravity=function(){return l(Rv(this.Xx),q)}; +W.prototype.addRigidBody=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);void 0===c?Ev(e,a):void 0===d?_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(e,a,c):Fv(e,a,c,d)};W.prototype.removeRigidBody=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$v(c,a)}; +W.prototype.addConstraint=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===c?Cv(d,a):Dv(d,a,c)};W.prototype.removeConstraint=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zv(c,a)};W.prototype.stepSimulation=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);return void 0===c?gw(e,a):void 0===d?hw(e,a,c):iw(e,a,c,d)}; +W.prototype.setContactAddedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bw(c,a)};W.prototype.setContactProcessedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);dw(c,a)};W.prototype.setContactDestroyedCallback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cw(c,a)};W.prototype.addAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yv(c,a)};W.prototype.removeAction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Xv(c,a)}; +W.prototype.getSolverInfo=function(){return l(Uv(this.Xx),v)};W.prototype.__destroy__=function(){xv(this.Xx)};function vB(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=Vl(a,c,d,e);k(vB)[this.Xx]=this}vB.prototype=Object.create(pA.prototype);vB.prototype.constructor=vB;vB.prototype.Yx=vB;vB.Zx={};f.btFixedConstraint=vB; +vB.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Wl(c,a)};vB.prototype.getBreakingImpulseThreshold=function(){return Xl(this.Xx)};vB.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zl(c,a)};vB.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return Yl(d,a,c)}; +vB.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);$l(e,a,c,d)};vB.prototype.__destroy__=function(){Ul(this.Xx)};function t(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=void 0===a?zw():void 0===c?_emscripten_bind_btTransform_btTransform_1(a):Aw(a,c);k(t)[this.Xx]=this}t.prototype=Object.create(h.prototype);t.prototype.constructor=t;t.prototype.Yx=t;t.Zx={}; +f.btTransform=t;t.prototype.setIdentity=function(){Hw(this.Xx)};t.prototype.setOrigin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Iw(c,a)};t.prototype.setRotation=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jw(c,a)};t.prototype.getOrigin=function(){return l(Cw(this.Xx),q)};t.prototype.getRotation=function(){return l(Dw(this.Xx),X)};t.prototype.getBasis=function(){return l(Bw(this.Xx),GA)}; +t.prototype.setFromOpenGLMatrix=function(a){var c=this.Xx;b.by();"object"==typeof a&&(a=hA(a));Gw(c,a)};t.prototype.inverse=t.prototype.inverse=function(){return l(Ew(this.Xx),t)};t.prototype.op_mul=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Fw(c,a),t)};t.prototype.__destroy__=function(){yw(this.Xx)};function Y(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=hc(a,c);k(Y)[this.Xx]=this}Y.prototype=Object.create(z.prototype); +Y.prototype.constructor=Y;Y.prototype.Yx=Y;Y.Zx={};f.ClosestRayResultCallback=Y;Y.prototype.hasHit=function(){return!!rc(this.Xx)};Y.prototype.get_m_rayFromWorld=Y.prototype.Ay=function(){return l(pc(this.Xx),q)};Y.prototype.set_m_rayFromWorld=Y.prototype.Hy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);yc(c,a)};Object.defineProperty(Y.prototype,"m_rayFromWorld",{get:Y.prototype.Ay,set:Y.prototype.Hy});Y.prototype.get_m_rayToWorld=Y.prototype.By=function(){return l(qc(this.Xx),q)}; +Y.prototype.set_m_rayToWorld=Y.prototype.Iy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);zc(c,a)};Object.defineProperty(Y.prototype,"m_rayToWorld",{get:Y.prototype.By,set:Y.prototype.Iy});Y.prototype.get_m_hitNormalWorld=Y.prototype.iy=function(){return l(nc(this.Xx),q)};Y.prototype.set_m_hitNormalWorld=Y.prototype.ry=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wc(c,a)};Object.defineProperty(Y.prototype,"m_hitNormalWorld",{get:Y.prototype.iy,set:Y.prototype.ry}); +Y.prototype.get_m_hitPointWorld=Y.prototype.jy=function(){return l(oc(this.Xx),q)};Y.prototype.set_m_hitPointWorld=Y.prototype.sy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xc(c,a)};Object.defineProperty(Y.prototype,"m_hitPointWorld",{get:Y.prototype.jy,set:Y.prototype.sy});Y.prototype.get_m_collisionFilterGroup=Y.prototype.$x=function(){return kc(this.Xx)};Y.prototype.set_m_collisionFilterGroup=Y.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);tc(c,a)}; +Object.defineProperty(Y.prototype,"m_collisionFilterGroup",{get:Y.prototype.$x,set:Y.prototype.cy});Y.prototype.get_m_collisionFilterMask=Y.prototype.ay=function(){return lc(this.Xx)};Y.prototype.set_m_collisionFilterMask=Y.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);uc(c,a)};Object.defineProperty(Y.prototype,"m_collisionFilterMask",{get:Y.prototype.ay,set:Y.prototype.dy});Y.prototype.get_m_closestHitFraction=Y.prototype.ey=function(){return jc(this.Xx)}; +Y.prototype.set_m_closestHitFraction=Y.prototype.fy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);sc(c,a)};Object.defineProperty(Y.prototype,"m_closestHitFraction",{get:Y.prototype.ey,set:Y.prototype.fy});Y.prototype.get_m_collisionObject=Y.prototype.gy=function(){return l(mc(this.Xx),r)};Y.prototype.set_m_collisionObject=Y.prototype.py=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vc(c,a)};Object.defineProperty(Y.prototype,"m_collisionObject",{get:Y.prototype.gy,set:Y.prototype.py}); +Y.prototype.__destroy__=function(){ic(this.Xx)};function wB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=void 0===a?Vt():Wt(a);k(wB)[this.Xx]=this}wB.prototype=Object.create(sA.prototype);wB.prototype.constructor=wB;wB.prototype.Yx=wB;wB.Zx={};f.btSoftBodyRigidBodyCollisionConfiguration=wB;wB.prototype.__destroy__=function(){Ut(this.Xx)};function xB(){this.Xx=Ac();k(xB)[this.Xx]=this}xB.prototype=Object.create(EA.prototype);xB.prototype.constructor=xB;xB.prototype.Yx=xB;xB.Zx={}; +f.ConcreteContactResultCallback=xB;xB.prototype.addSingleResult=function(a,c,d,e,g,n,A){var S=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);return Cc(S,a,c,d,e,g,n,A)};xB.prototype.__destroy__=function(){Bc(this.Xx)}; +function yB(a,c,d){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);this.Xx=void 0===d?Ff(a,c):Gf(a,c,d);k(yB)[this.Xx]=this}yB.prototype=Object.create(tA.prototype);yB.prototype.constructor=yB;yB.prototype.Yx=yB;yB.Zx={};f.btBvhTriangleMeshShape=yB;yB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jf(c,a)};yB.prototype.getLocalScaling=function(){return l(If(this.Xx),q)}; +yB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Hf(d,a,c)};yB.prototype.__destroy__=function(){Ef(this.Xx)};function LA(){throw"cannot construct a btConstCollisionObjectArray, no constructor in IDL";}LA.prototype=Object.create(h.prototype);LA.prototype.constructor=LA;LA.prototype.Yx=LA;LA.Zx={};f.btConstCollisionObjectArray=LA;LA.prototype.size=LA.prototype.size=function(){return vi(this.Xx)}; +LA.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(ui(c,a),r)};LA.prototype.__destroy__=function(){ti(this.Xx)};function zB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=void 0===e?yt(a,c,d):void 0===g?_emscripten_bind_btSliderConstraint_btSliderConstraint_4(a,c,d,e):zt(a,c,d,e,g);k(zB)[this.Xx]=this}zB.prototype=Object.create(pA.prototype); +zB.prototype.constructor=zB;zB.prototype.Yx=zB;zB.Zx={};f.btSliderConstraint=zB;zB.prototype.setLowerLinLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ft(c,a)};zB.prototype.setUpperLinLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);It(c,a)};zB.prototype.setLowerAngLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Et(c,a)};zB.prototype.setUpperAngLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ht(c,a)}; +zB.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);At(c,a)};zB.prototype.getBreakingImpulseThreshold=function(){return Bt(this.Xx)};zB.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Dt(c,a)};zB.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return Ct(d,a,c)}; +zB.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Gt(e,a,c,d)};zB.prototype.__destroy__=function(){xt(this.Xx)};function V(){this.Xx=mp();k(V)[this.Xx]=this}V.prototype=Object.create(w.prototype);V.prototype.constructor=V;V.prototype.Yx=V;V.Zx={};f.btPairCachingGhostObject=V; +V.prototype.setAnisotropicFriction=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Ep(d,a,c)};V.prototype.getCollisionShape=function(){return l(qp(this.Xx),p)};V.prototype.setContactProcessingThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Jp(c,a)};V.prototype.setActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Dp(c,a)}; +V.prototype.forceActivationState=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);np(c,a)};V.prototype.activate=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);void 0===a?kp(c):lp(c,a)};V.prototype.isActive=function(){return!!zp(this.Xx)};V.prototype.isKinematicObject=function(){return!!Ap(this.Xx)};V.prototype.isStaticObject=function(){return!!Bp(this.Xx)};V.prototype.isStaticOrKinematicObject=function(){return!!Cp(this.Xx)};V.prototype.getRestitution=function(){return up(this.Xx)}; +V.prototype.getFriction=function(){return rp(this.Xx)};V.prototype.getRollingFriction=function(){return vp(this.Xx)};V.prototype.setRestitution=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Lp(c,a)};V.prototype.setFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Kp(c,a)};V.prototype.setRollingFriction=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Mp(c,a)};V.prototype.getWorldTransform=function(){return l(yp(this.Xx),t)};V.prototype.getCollisionFlags=function(){return pp(this.Xx)}; +V.prototype.setCollisionFlags=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Hp(c,a)};V.prototype.setWorldTransform=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pp(c,a)};V.prototype.setCollisionShape=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ip(c,a)};V.prototype.setCcdMotionThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Fp(c,a)};V.prototype.setCcdSweptSphereRadius=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Gp(c,a)}; +V.prototype.getUserIndex=function(){return wp(this.Xx)};V.prototype.setUserIndex=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Np(c,a)};V.prototype.getUserPointer=function(){return l(xp(this.Xx),nA)};V.prototype.setUserPointer=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Op(c,a)};V.prototype.getBroadphaseHandle=function(){return l(op(this.Xx),u)};V.prototype.getNumOverlappingObjects=function(){return sp(this.Xx)}; +V.prototype.getOverlappingObject=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(tp(c,a),r)};V.prototype.__destroy__=function(){jp(this.Xx)};function E(){throw"cannot construct a btManifoldPoint, no constructor in IDL";}E.prototype=Object.create(h.prototype);E.prototype.constructor=E;E.prototype.Yx=E;E.Zx={};f.btManifoldPoint=E;E.prototype.getPositionWorldOnA=function(){return l(Go(this.Xx),q)};E.prototype.getPositionWorldOnB=function(){return l(Ho(this.Xx),q)}; +E.prototype.getAppliedImpulse=function(){return Eo(this.Xx)};E.prototype.getDistance=function(){return Fo(this.Xx)};E.prototype.get_m_localPointA=E.prototype.tA=function(){return l(Io(this.Xx),q)};E.prototype.set_m_localPointA=E.prototype.$C=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Oo(c,a)};Object.defineProperty(E.prototype,"m_localPointA",{get:E.prototype.tA,set:E.prototype.$C});E.prototype.get_m_localPointB=E.prototype.uA=function(){return l(Jo(this.Xx),q)}; +E.prototype.set_m_localPointB=E.prototype.aD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Po(c,a)};Object.defineProperty(E.prototype,"m_localPointB",{get:E.prototype.uA,set:E.prototype.aD});E.prototype.get_m_positionWorldOnB=E.prototype.GA=function(){return l(Mo(this.Xx),q)};E.prototype.set_m_positionWorldOnB=E.prototype.mD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);So(c,a)};Object.defineProperty(E.prototype,"m_positionWorldOnB",{get:E.prototype.GA,set:E.prototype.mD}); +E.prototype.get_m_positionWorldOnA=E.prototype.FA=function(){return l(Lo(this.Xx),q)};E.prototype.set_m_positionWorldOnA=E.prototype.lD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ro(c,a)};Object.defineProperty(E.prototype,"m_positionWorldOnA",{get:E.prototype.FA,set:E.prototype.lD});E.prototype.get_m_normalWorldOnB=E.prototype.BA=function(){return l(Ko(this.Xx),q)};E.prototype.set_m_normalWorldOnB=E.prototype.hD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qo(c,a)}; +Object.defineProperty(E.prototype,"m_normalWorldOnB",{get:E.prototype.BA,set:E.prototype.hD});E.prototype.get_m_userPersistentData=E.prototype.gB=function(){return No(this.Xx)};E.prototype.set_m_userPersistentData=E.prototype.ND=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);To(c,a)};Object.defineProperty(E.prototype,"m_userPersistentData",{get:E.prototype.gB,set:E.prototype.ND});E.prototype.__destroy__=function(){Do(this.Xx)}; +function AB(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=void 0===d?Xp(a,c):void 0===e?_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a,c,d):Yp(a,c,d,e);k(AB)[this.Xx]=this}AB.prototype=Object.create(pA.prototype);AB.prototype.constructor=AB;AB.prototype.Yx=AB;AB.Zx={};f.btPoint2PointConstraint=AB; +AB.prototype.setPivotA=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);gq(c,a)};AB.prototype.setPivotB=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);hq(c,a)};AB.prototype.getPivotInA=function(){return l(bq(this.Xx),q)};AB.prototype.getPivotInB=function(){return l(cq(this.Xx),q)};AB.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Zp(c,a)};AB.prototype.getBreakingImpulseThreshold=function(){return $p(this.Xx)}; +AB.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);eq(c,a)};AB.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return aq(d,a,c)};AB.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);fq(e,a,c,d)};AB.prototype.get_m_setting=AB.prototype.NA=function(){return l(dq(this.Xx),H)}; +AB.prototype.set_m_setting=AB.prototype.tD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);iq(c,a)};Object.defineProperty(AB.prototype,"m_setting",{get:AB.prototype.NA,set:AB.prototype.tD});AB.prototype.__destroy__=function(){Wp(this.Xx)};function BB(){this.Xx=Tt();k(BB)[this.Xx]=this}BB.prototype=Object.create(h.prototype);BB.prototype.constructor=BB;BB.prototype.Yx=BB;BB.Zx={};f.btSoftBodyHelpers=BB; +BB.prototype.CreateRope=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);return l(Rt(n,a,c,d,e,g),R)}; +BB.prototype.CreatePatch=function(a,c,d,e,g,n,A,S,da){var nb=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);S&&"object"===typeof S&&(S=S.Xx);da&&"object"===typeof da&&(da=da.Xx);return l(Qt(nb,a,c,d,e,g,n,A,S,da),R)}; +BB.prototype.CreatePatchUV=function(a,c,d,e,g,n,A,S,da,nb){var $b=this.Xx;b.by();a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);n&&"object"===typeof n&&(n=n.Xx);A&&"object"===typeof A&&(A=A.Xx);S&&"object"===typeof S&&(S=S.Xx);da&&"object"===typeof da&&(da=da.Xx);"object"==typeof nb&&(nb=hA(nb));return l(Pt($b,a,c,d,e,g,n,A,S,da,nb),R)}; +BB.prototype.CreateEllipsoid=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);return l(Mt(g,a,c,d,e),R)}; +BB.prototype.CreateFromTriMesh=function(a,c,d,e,g){var n=this.Xx;b.by();a&&"object"===typeof a&&(a=a.Xx);"object"==typeof c&&(c=hA(c));if("object"==typeof d&&"object"===typeof d){var A=b.xy(d,za);b.copy(d,za,A);d=A}e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);return l(Ot(n,a,c,d,e,g),R)}; +BB.prototype.CreateFromConvexHull=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);return l(Nt(g,a,c,d,e),R)};BB.prototype.__destroy__=function(){St(this.Xx)};function u(){throw"cannot construct a btBroadphaseProxy, no constructor in IDL";}u.prototype=Object.create(h.prototype);u.prototype.constructor=u;u.prototype.Yx=u;u.Zx={};f.btBroadphaseProxy=u; +u.prototype.get_m_collisionFilterGroup=u.prototype.$x=function(){return Af(this.Xx)};u.prototype.set_m_collisionFilterGroup=u.prototype.cy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Cf(c,a)};Object.defineProperty(u.prototype,"m_collisionFilterGroup",{get:u.prototype.$x,set:u.prototype.cy});u.prototype.get_m_collisionFilterMask=u.prototype.ay=function(){return Bf(this.Xx)}; +u.prototype.set_m_collisionFilterMask=u.prototype.dy=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Df(c,a)};Object.defineProperty(u.prototype,"m_collisionFilterMask",{get:u.prototype.ay,set:u.prototype.dy});u.prototype.__destroy__=function(){zf(this.Xx)};function oB(){throw"cannot construct a tNodeArray, no constructor in IDL";}oB.prototype=Object.create(h.prototype);oB.prototype.constructor=oB;oB.prototype.Yx=oB;oB.Zx={};f.tNodeArray=oB;oB.prototype.size=oB.prototype.size=function(){return Tz(this.Xx)}; +oB.prototype.at=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Sz(c,a),Node)};oB.prototype.__destroy__=function(){Rz(this.Xx)};function CB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=rf(a);k(CB)[this.Xx]=this}CB.prototype=Object.create(p.prototype);CB.prototype.constructor=CB;CB.prototype.Yx=CB;CB.Zx={};f.btBoxShape=CB;CB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wf(c,a)};CB.prototype.getMargin=function(){return uf(this.Xx)}; +CB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);vf(c,a)};CB.prototype.getLocalScaling=function(){return l(tf(this.Xx),q)};CB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);sf(d,a,c)};CB.prototype.__destroy__=function(){qf(this.Xx)};function tB(){throw"cannot construct a btFace, no constructor in IDL";}tB.prototype=Object.create(h.prototype);tB.prototype.constructor=tB; +tB.prototype.Yx=tB;tB.Zx={};f.btFace=tB;tB.prototype.get_m_indices=tB.prototype.kA=function(){return l(Ql(this.Xx),pB)};tB.prototype.set_m_indices=tB.prototype.RC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Sl(c,a)};Object.defineProperty(tB.prototype,"m_indices",{get:tB.prototype.kA,set:tB.prototype.RC});tB.prototype.get_m_plane=tB.prototype.EA=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return Rl(c,a)}; +tB.prototype.set_m_plane=tB.prototype.kD=function(a,c){var d=this.Xx;b.by();a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Tl(d,a,c)};Object.defineProperty(tB.prototype,"m_plane",{get:tB.prototype.EA,set:tB.prototype.kD});tB.prototype.__destroy__=function(){Pl(this.Xx)};function DB(){this.Xx=Ld();k(DB)[this.Xx]=this}DB.prototype=Object.create(mA.prototype);DB.prototype.constructor=DB;DB.prototype.Yx=DB;DB.Zx={};f.DebugDrawer=DB; +DB.prototype.drawLine=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Pd(e,a,c,d)};DB.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);Od(n,a,c,d,e,g)}; +DB.prototype.reportErrorWarning=function(a){var c=this.Xx;b.by();a=a&&"object"===typeof a?a.Xx:gA(a);Rd(c,a)};DB.prototype.draw3dText=function(a,c){var d=this.Xx;b.by();a&&"object"===typeof a&&(a=a.Xx);c=c&&"object"===typeof c?c.Xx:gA(c);Nd(d,a,c)};DB.prototype.setDebugMode=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Sd(c,a)};DB.prototype.getDebugMode=function(){return Qd(this.Xx)};DB.prototype.__destroy__=function(){Md(this.Xx)}; +function EB(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=Lf(a,c);k(EB)[this.Xx]=this}EB.prototype=Object.create(rA.prototype);EB.prototype.constructor=EB;EB.prototype.Yx=EB;EB.Zx={};f.btCapsuleShapeX=EB;EB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Tf(c,a)};EB.prototype.getMargin=function(){return Pf(this.Xx)};EB.prototype.getUpAxis=function(){return Rf(this.Xx)};EB.prototype.getRadius=function(){return Qf(this.Xx)}; +EB.prototype.getHalfHeight=function(){return Nf(this.Xx)};EB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Sf(c,a)};EB.prototype.getLocalScaling=function(){return l(Of(this.Xx),q)};EB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Mf(d,a,c)};EB.prototype.__destroy__=function(){Kf(this.Xx)}; +function X(a,c,d,e){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);this.Xx=vq(a,c,d,e);k(X)[this.Xx]=this}X.prototype=Object.create(xA.prototype);X.prototype.constructor=X;X.prototype.Yx=X;X.Zx={};f.btQuaternion=X;X.prototype.setValue=function(a,c,d,e){var g=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);Mq(g,a,c,d,e)}; +X.prototype.setEulerZYX=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Kq(e,a,c,d)};X.prototype.setRotation=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Lq(d,a,c)};X.prototype.normalize=X.prototype.normalize=function(){Dq(this.Xx)};X.prototype.length2=function(){return Bq(this.Xx)};X.prototype.length=X.prototype.length=function(){return Cq(this.Xx)}; +X.prototype.dot=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return wq(c,a)};X.prototype.normalized=function(){return l(Eq(this.Xx),X)};X.prototype.getAxis=function(){return l(zq(this.Xx),q)};X.prototype.inverse=X.prototype.inverse=function(){return l(Aq(this.Xx),X)};X.prototype.getAngle=function(){return yq(this.Xx)};X.prototype.getAngleShortestPath=function(){return xq(this.Xx)}; +X.prototype.angle=X.prototype.angle=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return uq(c,a)};X.prototype.angleShortestPath=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return tq(c,a)};X.prototype.op_add=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Fq(c,a),X)};X.prototype.op_sub=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Jq(c,a),X)}; +X.prototype.op_mul=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Hq(c,a),X)};X.prototype.op_mulq=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Iq(c,a),X)};X.prototype.op_div=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);return l(Gq(c,a),X)};X.prototype.x=X.prototype.x=function(){return Sq(this.Xx)};X.prototype.y=X.prototype.y=function(){return Tq(this.Xx)};X.prototype.z=X.prototype.z=function(){return Uq(this.Xx)};X.prototype.w=function(){return Rq(this.Xx)}; +X.prototype.setX=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Oq(c,a)};X.prototype.setY=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Pq(c,a)};X.prototype.setZ=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Qq(c,a)};X.prototype.setW=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Nq(c,a)};X.prototype.__destroy__=function(){sq(this.Xx)}; +function FB(a,c){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);this.Xx=Vf(a,c);k(FB)[this.Xx]=this}FB.prototype=Object.create(rA.prototype);FB.prototype.constructor=FB;FB.prototype.Yx=FB;FB.Zx={};f.btCapsuleShapeZ=FB;FB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);cg(c,a)};FB.prototype.getMargin=function(){return Zf(this.Xx)};FB.prototype.getUpAxis=function(){return ag(this.Xx)};FB.prototype.getRadius=function(){return $f(this.Xx)}; +FB.prototype.getHalfHeight=function(){return Xf(this.Xx)};FB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);bg(c,a)};FB.prototype.getLocalScaling=function(){return l(Yf(this.Xx),q)};FB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Wf(d,a,c)};FB.prototype.__destroy__=function(){Uf(this.Xx)};function v(){throw"cannot construct a btContactSolverInfo, no constructor in IDL";} +v.prototype=Object.create(h.prototype);v.prototype.constructor=v;v.prototype.Yx=v;v.Zx={};f.btContactSolverInfo=v;v.prototype.get_m_splitImpulse=v.prototype.QA=function(){return!!Ii(this.Xx)};v.prototype.set_m_splitImpulse=v.prototype.wD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Li(c,a)};Object.defineProperty(v.prototype,"m_splitImpulse",{get:v.prototype.QA,set:v.prototype.wD});v.prototype.get_m_splitImpulsePenetrationThreshold=v.prototype.RA=function(){return Hi(this.Xx)}; +v.prototype.set_m_splitImpulsePenetrationThreshold=v.prototype.xD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ki(c,a)};Object.defineProperty(v.prototype,"m_splitImpulsePenetrationThreshold",{get:v.prototype.RA,set:v.prototype.xD});v.prototype.get_m_numIterations=v.prototype.CA=function(){return Gi(this.Xx)};v.prototype.set_m_numIterations=v.prototype.iD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Ji(c,a)}; +Object.defineProperty(v.prototype,"m_numIterations",{get:v.prototype.CA,set:v.prototype.iD});v.prototype.__destroy__=function(){Fi(this.Xx)};function GB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=void 0===e?om(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a,c,d,e):pm(a,c,d,e,g);k(GB)[this.Xx]=this} +GB.prototype=Object.create(BA.prototype);GB.prototype.constructor=GB;GB.prototype.Yx=GB;GB.Zx={};f.btGeneric6DofSpringConstraint=GB;GB.prototype.enableSpring=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);rm(d,a,c)};GB.prototype.setStiffness=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);Gm(d,a,c)}; +GB.prototype.setDamping=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);zm(d,a,c)};GB.prototype.setEquilibriumPoint=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);void 0===a?Am(d):void 0===c?Bm(d,a):Cm(d,a,c)};GB.prototype.setLinearLowerLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Dm(c,a)}; +GB.prototype.setLinearUpperLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);Em(c,a)};GB.prototype.setAngularLowerLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);wm(c,a)};GB.prototype.setAngularUpperLimit=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);xm(c,a)};GB.prototype.getFrameOffsetA=function(){return l(tm(this.Xx),t)};GB.prototype.enableFeedback=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qm(c,a)}; +GB.prototype.getBreakingImpulseThreshold=function(){return sm(this.Xx)};GB.prototype.setBreakingImpulseThreshold=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ym(c,a)};GB.prototype.getParam=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);return um(d,a,c)};GB.prototype.setParam=function(a,c,d){var e=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);Fm(e,a,c,d)}; +GB.prototype.__destroy__=function(){nm(this.Xx)};function HB(a){a&&"object"===typeof a&&(a=a.Xx);this.Xx=lw(a);k(HB)[this.Xx]=this}HB.prototype=Object.create(p.prototype);HB.prototype.constructor=HB;HB.prototype.Yx=HB;HB.Zx={};f.btSphereShape=HB;HB.prototype.setMargin=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);qw(c,a)};HB.prototype.getMargin=function(){return ow(this.Xx)};HB.prototype.setLocalScaling=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);pw(c,a)}; +HB.prototype.getLocalScaling=function(){return l(nw(this.Xx),q)};HB.prototype.calculateLocalInertia=function(a,c){var d=this.Xx;a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);mw(d,a,c)};HB.prototype.__destroy__=function(){kw(this.Xx)};function Z(a,c,d,e,g){a&&"object"===typeof a&&(a=a.Xx);c&&"object"===typeof c&&(c=c.Xx);d&&"object"===typeof d&&(d=d.Xx);e&&"object"===typeof e&&(e=e.Xx);g&&"object"===typeof g&&(g=g.Xx);this.Xx=Td(a,c,d,e,g);k(Z)[this.Xx]=this}Z.prototype=Object.create(h.prototype); +Z.prototype.constructor=Z;Z.prototype.Yx=Z;Z.Zx={};f.LocalConvexResult=Z;Z.prototype.get_m_hitCollisionObject=Z.prototype.bA=function(){return l(Vd(this.Xx),r)};Z.prototype.set_m_hitCollisionObject=Z.prototype.IC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);$d(c,a)};Object.defineProperty(Z.prototype,"m_hitCollisionObject",{get:Z.prototype.bA,set:Z.prototype.IC});Z.prototype.get_m_localShapeInfo=Z.prototype.vA=function(){return l(Zd(this.Xx),PA)}; +Z.prototype.set_m_localShapeInfo=Z.prototype.bD=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);de(c,a)};Object.defineProperty(Z.prototype,"m_localShapeInfo",{get:Z.prototype.vA,set:Z.prototype.bD});Z.prototype.get_m_hitNormalLocal=Z.prototype.fA=function(){return l(Xd(this.Xx),q)};Z.prototype.set_m_hitNormalLocal=Z.prototype.MC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);be(c,a)};Object.defineProperty(Z.prototype,"m_hitNormalLocal",{get:Z.prototype.fA,set:Z.prototype.MC}); +Z.prototype.get_m_hitPointLocal=Z.prototype.hA=function(){return l(Yd(this.Xx),q)};Z.prototype.set_m_hitPointLocal=Z.prototype.OC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ce(c,a)};Object.defineProperty(Z.prototype,"m_hitPointLocal",{get:Z.prototype.hA,set:Z.prototype.OC});Z.prototype.get_m_hitFraction=Z.prototype.cA=function(){return Wd(this.Xx)};Z.prototype.set_m_hitFraction=Z.prototype.JC=function(a){var c=this.Xx;a&&"object"===typeof a&&(a=a.Xx);ae(c,a)}; +Object.defineProperty(Z.prototype,"m_hitFraction",{get:Z.prototype.cA,set:Z.prototype.JC});Z.prototype.__destroy__=function(){Ud(this.Xx)};(function(){function a(){f.BT_CONSTRAINT_ERP=aA();f.BT_CONSTRAINT_STOP_ERP=cA();f.BT_CONSTRAINT_CFM=$z();f.BT_CONSTRAINT_STOP_CFM=bA();f.PHY_FLOAT=Wz();f.PHY_DOUBLE=Uz();f.PHY_INTEGER=Xz();f.PHY_SHORT=Yz();f.PHY_FIXEDPOINT88=Vz();f.PHY_UCHAR=Zz()}Ia?a():Ga.unshift(a)})();this.Ammo=f; + + + return Ammo +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = Ammo; + else if (typeof define === 'function' && define['amd']) + define([], function() { return Ammo; }); + else if (typeof exports === 'object') + exports["Ammo"] = Ammo; + \ No newline at end of file diff --git a/lib/ammo.wasm.wasm b/lib/ammo.wasm.wasm new file mode 100644 index 0000000..4563e14 Binary files /dev/null and b/lib/ammo.wasm.wasm differ diff --git a/lib/enable3d.0.0.11.main.min.js b/lib/enable3d.0.0.11.main.min.js new file mode 100644 index 0000000..04c0ce7 --- /dev/null +++ b/lib/enable3d.0.0.11.main.min.js @@ -0,0 +1,93 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ENABLE3D=t():e.ENABLE3D=t()}(window,(function(){return function(e){function t(t){for(var n,i,a=t[0],o=t[1],s=0,l=[];sn?n:e},t={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:a,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==a(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==a(e[t])?e[t].toLowerCase():null},PI:o,TWOPI:2*o,PITHIRD:o/3,DEG2RAD:o/180,RAD2DEG:180/o},c={format:{},autodetect:[]},l=s.last,h=s.clip_rgb,u=s.type,p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===u(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=l(e),i=!1;if(!r){i=!0,c.sorted||(c.autodetect=c.autodetect.sort((function(e,t){return t.p-e.p})),c.sorted=!0);for(var a=0,o=c.autodetect;a4?e[4]:1;return 1===a?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-a),r>=1?0:255*(1-r)*(1-a),i>=1?0:255*(1-i)*(1-a),o]},w=s.unpack,_=s.type;d.prototype.cmyk=function(){return y(this._rgb)},m.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["cmyk"])))},c.format.cmyk=b,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=w(e,"cmyk"),"array"===_(e)&&4===e.length)return"cmyk"}});var M=s.unpack,T=s.last,E=function(e){return Math.round(100*e)/100},S=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=M(e,"hsla"),r=T(e)||"lsa";return n[0]=E(n[0]||0),n[1]=E(100*n[1])+"%",n[2]=E(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},A=s.unpack,L=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=A(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var a,o,s=Math.min(n,r,i),c=Math.max(n,r,i),l=(c+s)/2;return c===s?(a=0,o=Number.NaN):a=l<.5?(c-s)/(c+s):(c-s)/(2-c-s),n==c?o=(r-i)/(c-s):r==c?o=2+(i-n)/(c-s):i==c&&(o=4+(n-r)/(c-s)),(o*=60)<0&&(o+=360),e.length>3&&void 0!==e[3]?[o,a,l,e[3]]:[o,a,l]},R=s.unpack,P=s.last,C=Math.round,O=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=R(e,"rgba"),r=P(e)||"rgb";return"hsl"==r.substr(0,3)?S(L(n),r):(n[0]=C(n[0]),n[1]=C(n[1]),n[2]=C(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},I=s.unpack,N=Math.round,D=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,a,o=(t=I(t,"hsl"))[0],s=t[1],c=t[2];if(0===s)r=i=a=255*c;else{var l=[0,0,0],h=[0,0,0],u=c<.5?c*(1+s):c+s-c*s,p=2*c-u,d=o/360;l[0]=d+1/3,l[1]=d,l[2]=d-1/3;for(var f=0;f<3;f++)l[f]<0&&(l[f]+=1),l[f]>1&&(l[f]-=1),6*l[f]<1?h[f]=p+6*(u-p)*l[f]:2*l[f]<1?h[f]=u:3*l[f]<2?h[f]=p+(u-p)*(2/3-l[f])*6:h[f]=p;r=(e=[N(255*h[0]),N(255*h[1]),N(255*h[2])])[0],i=e[1],a=e[2]}return t.length>3?[r,i,a,t[3]]:[r,i,a,1]},F=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,U=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,z=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,B=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,G=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,k=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,H=Math.round,V=function(e){var t;if(e=e.toLowerCase().trim(),c.format.named)try{return c.format.named(e)}catch(e){}if(t=e.match(F)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(U)){for(var i=t.slice(1,5),a=0;a<4;a++)i[a]=+i[a];return i}if(t=e.match(z)){for(var o=t.slice(1,4),s=0;s<3;s++)o[s]=H(2.55*o[s]);return o[3]=1,o}if(t=e.match(B)){for(var l=t.slice(1,5),h=0;h<3;h++)l[h]=H(2.55*l[h]);return l[3]=+l[3],l}if(t=e.match(G)){var u=t.slice(1,4);u[1]*=.01,u[2]*=.01;var p=D(u);return p[3]=1,p}if(t=e.match(k)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=D(d);return f[3]=+t[4],f}};V.test=function(e){return F.test(e)||U.test(e)||z.test(e)||B.test(e)||G.test(e)||k.test(e)};var j=V,W=s.type;d.prototype.css=function(e){return O(this._rgb,e)},m.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["css"])))},c.format.css=j,c.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===W(e)&&j.test(e))return"css"}});var X=s.unpack;c.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=X(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},m.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["gl"])))},d.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var q=s.unpack,Y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=q(e,"rgb"),i=r[0],a=r[1],o=r[2],s=Math.min(i,a,o),c=Math.max(i,a,o),l=c-s,h=100*l/255,u=s/(255-l)*100;return 0===l?n=Number.NaN:(i===c&&(n=(a-o)/l),a===c&&(n=2+(o-i)/l),o===c&&(n=4+(i-a)/l),(n*=60)<0&&(n+=360)),[n,h,u]},Z=s.unpack,J=Math.floor,K=function(){for(var e,t,n,r,i,a,o=[],s=arguments.length;s--;)o[s]=arguments[s];var c,l,h,u=(o=Z(o,"hcg"))[0],p=o[1],d=o[2];d*=255;var f=255*p;if(0===p)c=l=h=d;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var m=J(u/=60),v=u-m,g=d*(1-p),y=g+f*(1-v),x=g+f*v,b=g+f;switch(m){case 0:c=(e=[b,x,g])[0],l=e[1],h=e[2];break;case 1:c=(t=[y,b,g])[0],l=t[1],h=t[2];break;case 2:c=(n=[g,b,x])[0],l=n[1],h=n[2];break;case 3:c=(r=[g,y,b])[0],l=r[1],h=r[2];break;case 4:c=(i=[x,g,b])[0],l=i[1],h=i[2];break;case 5:c=(a=[b,g,y])[0],l=a[1],h=a[2]}}return[c,l,h,o.length>3?o[3]:1]},Q=s.unpack,$=s.type;d.prototype.hcg=function(){return Y(this._rgb)},m.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcg"])))},c.format.hcg=K,c.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Q(e,"hcg"),"array"===$(e)&&3===e.length)return"hcg"}});var ee=s.unpack,te=s.last,ne=Math.round,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),r=n[0],i=n[1],a=n[2],o=n[3],s=te(e)||"auto";void 0===o&&(o=1),"auto"===s&&(s=o<1?"rgba":"rgb");var c=(r=ne(r))<<16|(i=ne(i))<<8|(a=ne(a)),l="000000"+c.toString(16);l=l.substr(l.length-6);var h="0"+ne(255*o).toString(16);switch(h=h.substr(h.length-2),s.toLowerCase()){case"rgba":return"#"+l+h;case"argb":return"#"+h+l;default:return"#"+l}},ie=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ae=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,oe=function(e){if(e.match(ie)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ae)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},se=s.type;d.prototype.hex=function(e){return re(this._rgb,e)},m.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hex"])))},c.format.hex=oe,c.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===se(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ce=s.unpack,le=s.TWOPI,he=Math.min,ue=Math.sqrt,pe=Math.acos,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=ce(e,"rgb"),i=r[0],a=r[1],o=r[2],s=he(i/=255,a/=255,o/=255),c=(i+a+o)/3,l=c>0?1-s/c:0;return 0===l?n=NaN:(n=(i-a+(i-o))/2,n/=ue((i-a)*(i-a)+(i-o)*(a-o)),n=pe(n),o>a&&(n=le-n),n/=le),[360*n,l,c]},fe=s.unpack,me=s.limit,ve=s.TWOPI,ge=s.PITHIRD,ye=Math.cos,xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=fe(e,"hsi"))[0],o=e[1],s=e[2];return isNaN(a)&&(a=0),isNaN(o)&&(o=0),a>360&&(a-=360),a<0&&(a+=360),(a/=360)<1/3?r=1-((i=(1-o)/3)+(n=(1+o*ye(ve*a)/ye(ge-ve*a))/3)):a<2/3?i=1-((n=(1-o)/3)+(r=(1+o*ye(ve*(a-=1/3))/ye(ge-ve*a))/3)):n=1-((r=(1-o)/3)+(i=(1+o*ye(ve*(a-=2/3))/ye(ge-ve*a))/3)),[255*(n=me(s*n*3)),255*(r=me(s*r*3)),255*(i=me(s*i*3)),e.length>3?e[3]:1]},be=s.unpack,we=s.type;d.prototype.hsi=function(){return de(this._rgb)},m.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsi"])))},c.format.hsi=xe,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=be(e,"hsi"),"array"===we(e)&&3===e.length)return"hsi"}});var _e=s.unpack,Me=s.type;d.prototype.hsl=function(){return L(this._rgb)},m.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsl"])))},c.format.hsl=D,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=_e(e,"hsl"),"array"===Me(e)&&3===e.length)return"hsl"}});var Te=s.unpack,Ee=Math.min,Se=Math.max,Ae=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=Te(e,"rgb"))[0],o=e[1],s=e[2],c=Ee(a,o,s),l=Se(a,o,s),h=l-c;return i=l/255,0===l?(n=Number.NaN,r=0):(r=h/l,a===l&&(n=(o-s)/h),o===l&&(n=2+(s-a)/h),s===l&&(n=4+(a-o)/h),(n*=60)<0&&(n+=360)),[n,r,i]},Le=s.unpack,Re=Math.floor,Pe=function(){for(var e,t,n,r,i,a,o=[],s=arguments.length;s--;)o[s]=arguments[s];var c,l,h,u=(o=Le(o,"hsv"))[0],p=o[1],d=o[2];if(d*=255,0===p)c=l=h=d;else{360===u&&(u=0),u>360&&(u-=360),u<0&&(u+=360);var f=Re(u/=60),m=u-f,v=d*(1-p),g=d*(1-p*m),y=d*(1-p*(1-m));switch(f){case 0:c=(e=[d,y,v])[0],l=e[1],h=e[2];break;case 1:c=(t=[g,d,v])[0],l=t[1],h=t[2];break;case 2:c=(n=[v,d,y])[0],l=n[1],h=n[2];break;case 3:c=(r=[v,g,d])[0],l=r[1],h=r[2];break;case 4:c=(i=[y,v,d])[0],l=i[1],h=i[2];break;case 5:c=(a=[d,v,g])[0],l=a[1],h=a[2]}}return[c,l,h,o.length>3?o[3]:1]},Ce=s.unpack,Oe=s.type;d.prototype.hsv=function(){return Ae(this._rgb)},m.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsv"])))},c.format.hsv=Pe,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ce(e,"hsv"),"array"===Oe(e)&&3===e.length)return"hsv"}});var Ie=18,Ne=.95047,De=1,Fe=1.08883,Ue=.137931034,ze=.206896552,Be=.12841855,Ge=.008856452,ke=s.unpack,He=Math.pow,Ve=function(e){return(e/=255)<=.04045?e/12.92:He((e+.055)/1.055,2.4)},je=function(e){return e>Ge?He(e,1/3):e/Be+Ue},We=function(e,t,n){return e=Ve(e),t=Ve(t),n=Ve(n),[je((.4124564*e+.3575761*t+.1804375*n)/Ne),je((.2126729*e+.7151522*t+.072175*n)/De),je((.0193339*e+.119192*t+.9503041*n)/Fe)]},Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ke(e,"rgb"),r=n[0],i=n[1],a=n[2],o=We(r,i,a),s=o[0],c=o[1],l=o[2],h=116*c-16;return[h<0?0:h,500*(s-c),200*(c-l)]},qe=s.unpack,Ye=Math.pow,Ze=function(e){return 255*(e<=.00304?12.92*e:1.055*Ye(e,1/2.4)-.055)},Je=function(e){return e>ze?e*e*e:Be*(e-Ue)},Ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=qe(e,"lab"))[0],o=e[1],s=e[2];return r=(a+16)/116,n=isNaN(o)?r:r+o/500,i=isNaN(s)?r:r-s/200,r=De*Je(r),n=Ne*Je(n),i=Fe*Je(i),[Ze(3.2404542*n-1.5371385*r-.4985314*i),Ze(-.969266*n+1.8760108*r+.041556*i),Ze(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Qe=s.unpack,$e=s.type;d.prototype.lab=function(){return Xe(this._rgb)},m.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["lab"])))},c.format.lab=Ke,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===$e(e)&&3===e.length)return"lab"}});var et=s.unpack,tt=s.RAD2DEG,nt=Math.sqrt,rt=Math.atan2,it=Math.round,at=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),r=n[0],i=n[1],a=n[2],o=nt(i*i+a*a),s=(rt(a,i)*tt+360)%360;return 0===it(1e4*o)&&(s=Number.NaN),[r,o,s]},ot=s.unpack,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ot(e,"rgb"),r=n[0],i=n[1],a=n[2],o=Xe(r,i,a),s=o[0],c=o[1],l=o[2];return at(s,c,l)},ct=s.unpack,lt=s.DEG2RAD,ht=Math.sin,ut=Math.cos,pt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ct(e,"lch"),r=n[0],i=n[1],a=n[2];return isNaN(a)&&(a=0),[r,ut(a*=lt)*i,ht(a)*i]},dt=s.unpack,ft=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=dt(e,"lch"))[0],r=e[1],i=e[2],a=pt(n,r,i),o=a[0],s=a[1],c=a[2],l=Ke(o,s,c),h=l[0],u=l[1],p=l[2];return[h,u,p,e.length>3?e[3]:1]},mt=s.unpack,vt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=mt(e,"hcl").reverse();return ft.apply(void 0,n)},gt=s.unpack,yt=s.type;d.prototype.lch=function(){return st(this._rgb)},d.prototype.hcl=function(){return st(this._rgb).reverse()},m.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["lch"])))},m.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcl"])))},c.format.lch=ft,c.format.hcl=vt,["lch","hcl"].forEach((function(e){return c.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=gt(t,e),"array"===yt(t)&&3===t.length)return e}})}));var xt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},bt=s.type;d.prototype.name=function(){for(var e=re(this._rgb,"rgb"),t=0,n=Object.keys(xt);t0;)t[n]=arguments[n+1];if(!t.length&&"string"===bt(e)&&xt[e.toLowerCase()])return"named"}});var wt=s.unpack,_t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=wt(e,"rgb"),r=n[0],i=n[1],a=n[2];return(r<<16)+(i<<8)+a},Mt=s.type,Tt=function(e){if("number"==Mt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},Et=s.type;d.prototype.num=function(){return _t(this._rgb)},m.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["num"])))},c.format.num=Tt,c.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Et(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var St=s.unpack,At=s.type,Lt=Math.round;d.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Lt)},d.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:Lt(t):t}))},m.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["rgb"])))},c.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=St(e,"rgba");return void 0===n[3]&&(n[3]=1),n},c.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=St(e,"rgba"),"array"===At(e)&&(3===e.length||4===e.length&&"number"==At(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Rt=Math.log,Pt=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*Rt(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*Rt(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*Rt(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*Rt(n),r=255),[t,n,r,1]},Ct=s.unpack,Ot=Math.round,It=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Ct(e,"rgb"),i=r[0],a=r[2],o=1e3,s=4e4,c=.4;s-o>c;){var l=Pt(n=.5*(s+o));l[2]/l[0]>=a/i?s=n:o=n}return Ot(n)};d.prototype.temp=d.prototype.kelvin=d.prototype.temperature=function(){return It(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(d,[null].concat(e,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=Pt;var Nt=s.type;d.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Nt(e)?t?(this._rgb[3]=e,this):new d([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},d.prototype.clipped=function(){return this._rgb._clipped||!1},d.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Ie*e,new d(t,"lab").alpha(this.alpha(),!0)},d.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},d.prototype.darker=d.prototype.darken,d.prototype.brighter=d.prototype.brighten,d.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var a=n.indexOf(r);if(a>-1)return i[a];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Dt=s.type,Ft=Math.pow;d.prototype.luminance=function(e){if(void 0!==e&&"number"===Dt(e)){if(0===e)return new d([0,0,0,this._rgb[3]],"rgb");if(1===e)return new d([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var a=t.interpolate(i,.5,"rgb"),o=a.luminance();return Math.abs(e-o)<1e-7||!n--?a:o>e?r(t,a):r(a,i)},i=(t>e?r(new d([0,0,0]),this):r(this,new d([255,255,255]))).rgb();return new d(i.concat([this._rgb[3]]))}return Ut.apply(void 0,this._rgb.slice(0,3))};var Ut=function(e,t,n){return.2126*(e=zt(e))+.7152*(t=zt(t))+.0722*(n=zt(n))},zt=function(e){return(e/=255)<=.03928?e/12.92:Ft((e+.055)/1.055,2.4)},Bt={},Gt=s.type,kt=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var a=r[0]||"lrgb";if(Bt[a]||r.length||(a=Object.keys(Bt)[0]),!Bt[a])throw new Error("interpolation mode "+a+" is not defined");return"object"!==Gt(e)&&(e=new d(e)),"object"!==Gt(t)&&(t=new d(t)),Bt[a](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};d.prototype.mix=d.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return kt.apply(void 0,[this,e,t].concat(n))},d.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new d([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},d.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Ie*e,t[1]<0&&(t[1]=0),new d(t,"lch").alpha(this.alpha(),!0)},d.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Ht=s.type;d.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],a=r[1],o=this[i]();if(a){var s=i.indexOf(a);if(s>-1){if("string"==Ht(t))switch(t.charAt(0)){case"+":case"-":o[s]+=+t;break;case"*":o[s]*=+t.substr(1);break;case"/":o[s]/=+t.substr(1);break;default:o[s]=+t}else{if("number"!==Ht(t))throw new Error("unsupported value for Color.set");o[s]=t}var c=new d(o,i);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+a+" in mode "+i)}return o},Bt.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Vt=Math.sqrt,jt=Math.pow;Bt.lrgb=function(e,t,n){var r=e._rgb,i=r[0],a=r[1],o=r[2],s=t._rgb,c=s[0],l=s[1],h=s[2];return new d(Vt(jt(i,2)*(1-n)+jt(c,2)*n),Vt(jt(a,2)*(1-n)+jt(l,2)*n),Vt(jt(o,2)*(1-n)+jt(h,2)*n),"rgb")},Bt.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var Wt=function(e,t,n,r){var i,a,o,s,c,l,h,u,p,f,m,v;return"hsl"===r?(o=e.hsl(),s=t.hsl()):"hsv"===r?(o=e.hsv(),s=t.hsv()):"hcg"===r?(o=e.hcg(),s=t.hcg()):"hsi"===r?(o=e.hsi(),s=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",o=e.hcl(),s=t.hcl()),"h"===r.substr(0,1)&&(c=(i=o)[0],h=i[1],p=i[2],l=(a=s)[0],u=a[1],f=a[2]),isNaN(c)||isNaN(l)?isNaN(c)?isNaN(l)?v=Number.NaN:(v=l,1!=p&&0!=p||"hsv"==r||(m=u)):(v=c,1!=f&&0!=f||"hsv"==r||(m=h)):v=c+n*(l>c&&l-c>180?l-(c+360):l180?l+360-c:l-c),void 0===m&&(m=h+n*(u-h)),new d([v,m,p+n*(f-p)],r)},Xt=function(e,t,n){return Wt(e,t,n,"lch")};Bt.lch=Xt,Bt.hcl=Xt,Bt.num=function(e,t,n){var r=e.num(),i=t.num();return new d(r+n*(i-r),"num")},Bt.hcg=function(e,t,n){return Wt(e,t,n,"hcg")},Bt.hsi=function(e,t,n){return Wt(e,t,n,"hsi")},Bt.hsl=function(e,t,n){return Wt(e,t,n,"hsl")},Bt.hsv=function(e,t,n){return Wt(e,t,n,"hsv")};var qt=s.clip_rgb,Yt=Math.pow,Zt=Math.sqrt,Jt=Math.PI,Kt=Math.cos,Qt=Math.sin,$t=Math.atan2,en=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new d(qt(r))},tn=s.type,nn=Math.pow,rn=function(e){var t="rgb",n=m("#ccc"),r=0,i=[0,1],a=[],o=[0,0],s=!1,c=[],l=!1,h=0,u=1,p=!1,d={},f=!0,v=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===tn(e)&&m.brewer&&m.brewer[e.toLowerCase()]&&(e=m.brewer[e.toLowerCase()]),"array"===tn(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=s){for(var t=s.length-1,n=0;n=s[n];)n++;return n-1}return 0}(e)/(s.length-2):u!==h?(e-h)/(u-h):1,l=x(l),r||(l=y(l)),1!==v&&(l=nn(l,v)),l=o[0]+l*(1-o[0]-o[1]),l=Math.min(1,Math.max(0,l));var p=Math.floor(1e4*l);if(f&&d[p])i=d[p];else{if("array"===tn(c))for(var g=0;g=b&&g===a.length-1){i=c[g];break}if(l>b&&l2){var l=e.map((function(t,n){return n/(e.length-1)})),p=e.map((function(e){return(e-h)/(u-h)}));p.every((function(e,t){return l[t]===e}))||(x=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=p[t+1];)t++;var n=(e-p[t])/(p[t+1]-p[t]);return l[t]+n*(l[t+1]-l[t])})}}return i=[h,u],_},_.mode=function(e){return arguments.length?(t=e,w(),_):t},_.range=function(e,t){return g(e),_},_.out=function(e){return l=e,_},_.spread=function(e){return arguments.length?(r=e,_):r},_.correctLightness=function(e){return null==e&&(e=!0),p=e,w(),y=p?function(e){for(var t=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=t>n,i=b(e,!0).lab()[0],a=t+(n-t)*e,o=i-a,s=0,c=1,l=20;Math.abs(o)>.01&&l-- >0;)r&&(o*=-1),o<0?(s=e,e+=.5*(c-e)):(c=e,e+=.5*(s-e)),i=b(e,!0).lab()[0],o=i-a;return e}:function(e){return e},_},_.padding=function(e){return null!=e?("number"===tn(e)&&(e=[e,e]),o=e,_):o},_.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=c.slice(0);else if(1===t)r=[_(.5)];else if(t>1){var a=i[0],o=i[1]-a;r=an(0,t,!1).map((function(e){return _(a+e/(t-1)*o)}))}else{e=[];var l=[];if(s&&s.length>2)for(var h=1,u=s.length,p=1<=u;p?hu;p?h++:h--)l.push(.5*(s[h-1]+s[h]));else l=i;r=l.map((function(e){return _(e)}))}return m[n]&&(r=r.map((function(e){return e[n]()}))),r},_.cache=function(e){return null!=e?(f=e,_):f},_.gamma=function(e){return null!=e?(v=e,_):v},_.nodata=function(e){return null!=e?(n=m(e),_):n},_};function an(e,t,n){for(var r=[],i=ea;i?o++:o--)r.push(o);return r}var on=function(e){var t,n,r,i,a,o,s;if(2===(e=e.map((function(e){return new d(e)}))).length)t=e.map((function(e){return e.lab()})),a=t[0],o=t[1],i=function(e){var t=[0,1,2].map((function(t){return a[t]+e*(o[t]-a[t])}));return new d(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),a=n[0],o=n[1],s=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*a[t]+2*(1-e)*e*o[t]+e*e*s[t]}));return new d(t,"lab")};else if(4===e.length){var c;r=e.map((function(e){return e.lab()})),a=r[0],o=r[1],s=r[2],c=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*o[t]+3*(1-e)*e*e*s[t]+e*e*e*c[t]}));return new d(t,"lab")}}else if(5===e.length){var l=on(e.slice(0,3)),h=on(e.slice(2,5));i=function(e){return e<.5?l(2*e):h(2*(e-.5))}}return i},sn=function(e,t,n){if(!sn[n])throw new Error("unknown blend mode "+n);return sn[n](e,t)},cn=function(e){return function(t,n){var r=m(n).rgb(),i=m(t).rgb();return m.rgb(e(r,i))}},ln=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};sn.normal=cn(ln((function(e){return e}))),sn.multiply=cn(ln((function(e,t){return e*t/255}))),sn.screen=cn(ln((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),sn.overlay=cn(ln((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),sn.darken=cn(ln((function(e,t){return e>t?t:e}))),sn.lighten=cn(ln((function(e,t){return e>t?e:t}))),sn.dodge=cn(ln((function(e,t){return 255===e?255:(e=t/255*255/(1-e/255))>255?255:e}))),sn.burn=cn(ln((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var hn=sn,un=s.type,pn=s.clip_rgb,dn=s.TWOPI,fn=Math.pow,mn=Math.sin,vn=Math.cos,gn=Math.floor,yn=Math.random,xn=Math.log,bn=Math.pow,wn=Math.floor,_n=Math.abs,Mn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===a(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===a(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,en.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Tn(n,e,t)},n},Tn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==a(e)&&(e=Mn(e));var r=e.min,i=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var s=[];if("c"===t.substr(0,1)&&(s.push(r),s.push(i)),"e"===t.substr(0,1)){s.push(r);for(var c=1;c 0");var l=Math.LOG10E*xn(r),h=Math.LOG10E*xn(i);s.push(r);for(var u=1;u200&&(b=!1)}for(var F={},U=0;U=360;)m-=360;o[f]=m}else o[f]=o[f]/s[f];return p/=r,new d(o,t).alpha(p>.99999?1:p,!0)},m.bezier=function(e){var t=on(e);return t.scale=function(){return rn(t)},t},m.blend=hn,m.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var a,o=0;"array"===un(i)?a=i[1]-i[0]:(a=0,i=[i,i]);var s=function(s){var c=dn*((e+120)/360+t*s),l=fn(i[0]+a*s,r),h=(0!==o?n[0]+s*o:n)*l*(1-l)/2,u=vn(c),p=mn(c);return m(pn([255*(l+h*(-.14861*u+1.78277*p)),255*(l+h*(-.29227*u-.90649*p)),255*(l+h*(1.97294*u)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?r:(r=e,s)},s.hue=function(e){return null==e?n:("array"===un(n=e)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,s)},s.lightness=function(e){return null==e?i:("array"===un(e)?(i=e,a=e[1]-e[0]):(i=[e,e],a=0),s)},s.scale=function(){return m.scale(s)},s.hue(n),s},m.mix=m.interpolate=kt,m.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(gn(16*yn()));return new d(e,"hex")},m.scale=rn,m.analyze=En.analyze,m.contrast=function(e,t){e=new d(e),t=new d(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},m.deltaE=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new d(e),t=new d(t);for(var i=Array.from(e.lab()),a=i[0],o=i[1],s=i[2],c=Array.from(t.lab()),l=c[0],h=c[1],u=c[2],p=Sn(o*o+s*s),f=Sn(h*h+u*u),m=a<16?.511:.040975*a/(1+.01765*a),v=.0638*p/(1+.0131*p)+.638,g=p<1e-6?0:180*An(s,o)/Pn;g<0;)g+=360;for(;g>=360;)g-=360;var y=g>=164&&g<=345?.56+Ln(.2*Rn(Pn*(g+168)/180)):.36+Ln(.4*Rn(Pn*(g+35)/180)),x=p*p*p*p,b=Sn(x/(x+1900)),w=v*(b*y+1-b),_=p-f,M=o-h,T=s-u,E=(a-l)/(n*m),S=_/(r*v);return Sn(E*E+S*S+(M*M+T*T-_*_)/(w*w))},m.distance=function(e,t,n){void 0===n&&(n="lab"),e=new d(e),t=new d(t);var r=e.get(n),i=t.get(n),a=0;for(var o in r){var s=(r[o]||0)-(i[o]||0);a+=s*s}return Math.sqrt(a)},m.limits=En.limits,m.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(d,[null].concat(e))),!0}catch(e){return!1}},m.scales=Cn,m.colors=xt,m.brewer=Fn,m}()},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new A(r||[]);return a._invoke=function(e,t,n){var r=h;return function(i,a){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw a;return R()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=T(o,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?d:u,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(e,n,o),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h="suspendedStart",u="suspendedYield",p="executing",d="completed",f={};function m(){}function v(){}function g(){}var y={};y[a]=function(){return this};var x=Object.getPrototypeOf,b=x&&x(x(L([])));b&&b!==n&&r.call(b,a)&&(y=b);var w=g.prototype=m.prototype=Object.create(y);function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function M(e){var t;this._invoke=function(n,i){function a(){return new Promise((function(t,a){!function t(n,i,a,o){var s=l(e[n],e,i);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==typeof h&&r.call(h,"__await")?Promise.resolve(h.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,o)}))}o(s.arg)}(n,i,t,a)}))}return t=t?t.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,f;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:e>0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n0?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>8&255]+Ct[e>>16&255]+Ct[e>>24&255]+"-"+Ct[255&t]+Ct[t>>8&255]+"-"+Ct[t>>16&15|64]+Ct[t>>24&255]+"-"+Ct[63&n|128]+Ct[n>>8&255]+"-"+Ct[n>>16&255]+Ct[n>>24&255]+Ct[255&r]+Ct[r>>8&255]+Ct[r>>16&255]+Ct[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*It.DEG2RAD},radToDeg:function(e){return e*It.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function Nt(e,t){this.x=e||0,this.y=t||0}function Dt(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}Object.defineProperties(Nt.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(Nt.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}}),Object.assign(Dt,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,a,o){var s=n[r+0],c=n[r+1],l=n[r+2],h=n[r+3],u=i[a+0],p=i[a+1],d=i[a+2],f=i[a+3];if(h!==f||s!==u||c!==p||l!==d){var m=1-o,v=s*u+c*p+l*d+h*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),b=Math.atan2(x,v*g);m=Math.sin(m*b)/x,o=Math.sin(o*b)/x}var w=o*g;if(s=s*m+u*w,c=c*m+p*w,l=l*m+d*w,h=h*m+f*w,m===1-o){var _=1/Math.sqrt(s*s+c*c+l*l+h*h);s*=_,c*=_,l*=_,h*=_}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=h}}),Object.defineProperties(Dt.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),Object.assign(Dt.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),h=o(i/2),u=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"YXZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"ZXY"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"ZYX"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"YZX"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h-u*p*d):"XZY"===a&&(this._x=u*l*h-c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h+u*p*d),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],c=n[9],l=n[2],h=n[6],u=n[10],p=r+s+u;return p>0?(t=.5/Math.sqrt(p+1),this._w=.25/t,this._x=(h-c)*t,this._y=(a-l)*t,this._z=(o-i)*t):r>s&&r>u?(t=2*Math.sqrt(1+r-s-u),this._w=(h-c)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(a+l)/t):s>u?(t=2*Math.sqrt(1+s-r-u),this._w=(a-l)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(c+h)/t):(t=2*Math.sqrt(1+u-r-s),this._w=(o-i)/t,this._x=(a+l)/t,this._y=(c+h)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(It.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;var s=1-o*o;if(s<=Number.EPSILON){var c=1-t;return this._w=c*a+t*this._w,this._x=c*n+t*this._x,this._y=c*r+t*this._y,this._z=c*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var l=Math.sqrt(s),h=Math.atan2(l,o),u=Math.sin((1-t)*h)/l,p=Math.sin(t*h)/l;return this._w=a*u+this._w*p,this._x=n*u+this._x*p,this._y=r*u+this._y*p,this._z=i*u+this._z*p,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var Ft=new zt,Ut=new Dt;function zt(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}Object.assign(zt.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Ut.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(Ut.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=s*t+a*r-o*n,l=s*n+o*t-i*r,h=s*r+i*n-a*t,u=-i*t-a*n-o*r;return this.x=c*s+u*-i+l*-o-h*-a,this.y=l*s+u*-a+h*-i-c*-o,this.z=h*s+u*-o+c*-a-l*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(e){return Ft.copy(this).projectOnVector(e),this.sub(Ft)},reflect:function(e){return this.sub(Ft.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());0===t&&console.error("THREE.Vector3: angleTo() can't handle zero length vectors.");var n=this.dot(e)/t;return Math.acos(It.clamp(n,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}});var Bt,Gt=new zt;function kt(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.assign(kt.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,a,o,s,c){var l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(e){for(var t=0,n=e.count;t2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},Vt=0;function jt(e,t,n,r,i,a,o,s,c,l){Object.defineProperty(this,"id",{value:Vt++}),this.uuid=It.generateUUID(),this.name="",this.image=void 0!==e?e:jt.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:jt.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:de,this.wrapT=void 0!==r?r:de,this.magFilter=void 0!==i?i:ye,this.minFilter=void 0!==a?a:be,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:De,this.type=void 0!==s?s:we,this.offset=new Nt(0,0),this.repeat=new Nt(1,1),this.center=new Nt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new kt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:mt,this.version=0,this.onUpdate=null}function Wt(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function Xt(e,t,n){this.width=e,this.height=t,this.scissor=new Wt(0,0,e,t),this.scissorTest=!1,this.viewport=new Wt(0,0,e,t),n=n||{},this.texture=new jt(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ye,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function qt(e,t,n){Xt.call(this,e,t,n),this.samples=4}jt.DEFAULT_IMAGE=void 0,jt.DEFAULT_MAPPING=300,jt.prototype=Object.assign(Object.create(Pt.prototype),{constructor:jt,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=It.generateUUID()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var a=0,o=r.length;a1)switch(this.wrapS){case pe:e.x=e.x-Math.floor(e.x);break;case de:e.x=e.x<0?0:1;break;case fe:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case pe:e.y=e.y-Math.floor(e.y);break;case de:e.y=e.y<0?0:1;break;case fe:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(jt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.defineProperties(Wt.prototype,{width:{get:function(){return this.z},set:function(e){this.z=e}},height:{get:function(){return this.w},set:function(e){this.w=e}}}),Object.assign(Wt.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,a=e.elements,o=a[0],s=a[4],c=a[8],l=a[1],h=a[5],u=a[9],p=a[2],d=a[6],f=a[10];if(Math.abs(s-l)<.01&&Math.abs(c-p)<.01&&Math.abs(u-d)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+p)<.1&&Math.abs(u+d)<.1&&Math.abs(o+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(o+1)/2,v=(h+1)/2,g=(f+1)/2,y=(s+l)/4,x=(c+p)/4,b=(u+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=x/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=b/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=x/(i=Math.sqrt(g)),r=b/i),this.set(n,r,i,t),this}var w=Math.sqrt((d-u)*(d-u)+(c-p)*(c-p)+(l-s)*(l-s));return Math.abs(w)<.001&&(w=1),this.x=(d-u)/w,this.y=(c-p)/w,this.z=(l-s)/w,this.w=Math.acos((o+h+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),Xt.prototype=Object.assign(Object.create(Pt.prototype),{constructor:Xt,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),qt.prototype=Object.assign(Object.create(Xt.prototype),{constructor:qt,isWebGLMultisampleRenderTarget:!0,copy:function(e){return Xt.prototype.copy.call(this,e),this.samples=e.samples,this}});var Yt=new zt,Zt=new tn,Jt=new zt(0,0,0),Kt=new zt(1,1,1),Qt=new zt,$t=new zt,en=new zt;function tn(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}Object.assign(tn.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,a,o,s,c,l,h,u,p,d,f,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=n,v[12]=r,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=c,v[6]=l,v[10]=h,v[14]=u,v[3]=p,v[7]=d,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new tn).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(e){var t=this.elements,n=e.elements,r=1/Yt.setFromMatrixColumn(e,0).length(),i=1/Yt.setFromMatrixColumn(e,1).length(),a=1/Yt.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){var u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=-s*h,t[8]=c,t[1]=p+d*c,t[5]=u-f*c,t[9]=-o*s,t[2]=f-u*c,t[6]=d+p*c,t[10]=a*s}else if("YXZ"===e.order){var m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m+y*o,t[4]=g*o-v,t[8]=a*c,t[1]=a*h,t[5]=a*l,t[9]=-o,t[2]=v*o-g,t[6]=y+m*o,t[10]=a*s}else if("ZXY"===e.order){m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m-y*o,t[4]=-a*h,t[8]=g+v*o,t[1]=v+g*o,t[5]=a*l,t[9]=y-m*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=d*c-p,t[8]=u*c+f,t[1]=s*h,t[5]=f*c+u,t[9]=p*c-d,t[2]=-c,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var x=a*s,b=a*c,w=o*s,_=o*c;t[0]=s*l,t[4]=_-x*h,t[8]=w*h+b,t[1]=h,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=b*h+w,t[10]=x-_*h}else if("XZY"===e.order){x=a*s,b=a*c,w=o*s,_=o*c;t[0]=s*l,t[4]=-h,t[8]=c*l,t[1]=x*h+_,t[5]=a*l,t[9]=b*h-w,t[2]=w*h-b,t[6]=o*l,t[10]=_*h+x}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){return this.compose(Jt,e,Kt)},lookAt:function(e,t,n){var r=this.elements;return en.subVectors(e,t),0===en.lengthSq()&&(en.z=1),en.normalize(),Qt.crossVectors(n,en),0===Qt.lengthSq()&&(1===Math.abs(n.z)?en.x+=1e-4:en.z+=1e-4,en.normalize(),Qt.crossVectors(n,en)),Qt.normalize(),$t.crossVectors(en,Qt),r[0]=Qt.x,r[4]=$t.x,r[8]=en.x,r[1]=Qt.y,r[5]=$t.y,r[9]=en.y,r[2]=Qt.z,r[6]=$t.z,r[10]=en.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],h=n[5],u=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],x=n[11],b=n[15],w=r[0],_=r[4],M=r[8],T=r[12],E=r[1],S=r[5],A=r[9],L=r[13],R=r[2],P=r[6],C=r[10],O=r[14],I=r[3],N=r[7],D=r[11],F=r[15];return i[0]=a*w+o*E+s*R+c*I,i[4]=a*_+o*S+s*P+c*N,i[8]=a*M+o*A+s*C+c*D,i[12]=a*T+o*L+s*O+c*F,i[1]=l*w+h*E+u*R+p*I,i[5]=l*_+h*S+u*P+p*N,i[9]=l*M+h*A+u*C+p*D,i[13]=l*T+h*L+u*O+p*F,i[2]=d*w+f*E+m*R+v*I,i[6]=d*_+f*S+m*P+v*N,i[10]=d*M+f*A+m*C+v*D,i[14]=d*T+f*L+m*O+v*F,i[3]=g*w+y*E+x*R+b*I,i[7]=g*_+y*S+x*P+b*N,i[11]=g*M+y*A+x*C+b*D,i[15]=g*T+y*L+x*O+b*F,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(e){for(var t=0,n=e.count;t1){for(var t=0;t1){for(var t=0;t0){r.children=[];for(s=0;s0&&(n.geometries=u),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),o.length>0&&(n.shapes=o)}return n.object=r,n;function m(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;ns)return!1}return!0}Object.assign(Dn.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.length;si&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.count;si&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new zt),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectsSphere:function(e){return this.clampPoint(e.center,Mn),Mn.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},intersectsTriangle:function(e){if(this.isEmpty())return!1;this.getCenter(Cn),On.subVectors(this.max,Cn),En.subVectors(e.a,Cn),Sn.subVectors(e.b,Cn),An.subVectors(e.c,Cn),Ln.subVectors(Sn,En),Rn.subVectors(An,Sn),Pn.subVectors(En,An);var t=[0,-Ln.z,Ln.y,0,-Rn.z,Rn.y,0,-Pn.z,Pn.y,Ln.z,0,-Ln.x,Rn.z,0,-Rn.x,Pn.z,0,-Pn.x,-Ln.y,Ln.x,0,-Rn.y,Rn.x,0,-Pn.y,Pn.x,0];return!!Fn(t,En,Sn,An,On)&&(!!Fn(t=[1,0,0,0,1,0,0,0,1],En,Sn,An,On)&&(In.crossVectors(Ln,Rn),Fn(t=[In.x,In.y,In.z],En,Sn,An,On)))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new zt),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return Mn.copy(e).clamp(this.min,this.max).sub(e).length()},getBoundingSphere:function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(Mn).length(),e},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){return this.isEmpty()?this:(_n[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_n[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_n[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_n[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_n[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_n[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_n[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_n[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_n),this)},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var Un=new Dn;function zn(e,t){this.center=void 0!==e?e:new zt,this.radius=void 0!==t?t:0}Object.assign(zn.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var n=this.center;void 0!==t?n.copy(t):Un.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new Dn),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}});var Bn=new zt,Gn=new zt,kn=new zt,Hn=new zt,Vn=new zt,jn=new zt,Wn=new zt;function Xn(e,t){this.origin=void 0!==e?e:new zt,this.direction=void 0!==t?t:new zt(0,0,-1)}Object.assign(Xn.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new zt),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(e){return this.origin.copy(this.at(e,Bn)),this},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new zt),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=Bn.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Bn.copy(this.direction).multiplyScalar(t).add(this.origin),Bn.distanceToSquared(e))},distanceSqToSegment:function(e,t,n,r){Gn.copy(e).add(t).multiplyScalar(.5),kn.copy(t).sub(e).normalize(),Hn.copy(this.origin).sub(Gn);var i,a,o,s,c=.5*e.distanceTo(t),l=-this.direction.dot(kn),h=Hn.dot(this.direction),u=-Hn.dot(kn),p=Hn.lengthSq(),d=Math.abs(1-l*l);if(d>0)if(a=l*h-u,s=c*d,(i=l*u-h)>=0)if(a>=-s)if(a<=s){var f=1/d;o=(i*=f)*(i+l*(a*=f)+2*h)+a*(l*i+a+2*u)+p}else a=c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a=-c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a<=-s?o=-(i=Math.max(0,-(-l*c+h)))*i+(a=i>0?-c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p:a<=s?(i=0,o=(a=Math.min(Math.max(-c,-u),c))*(a+2*u)+p):o=-(i=Math.max(0,-(l*c+h)))*i+(a=i>0?c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p;else a=l>0?-c:c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(kn).multiplyScalar(a).add(Gn),o},intersectSphere:function(e,t){Bn.subVectors(e.center,this.origin);var n=Bn.dot(this.direction),r=Bn.dot(Bn)-n*n,i=e.radius*e.radius;if(r>i)return null;var a=Math.sqrt(i-r),o=n-a,s=n+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,t)},intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,r=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,r=(e.min.x-u.x)*c),l>=0?(i=(e.min.y-u.y)*l,a=(e.max.y-u.y)*l):(i=(e.max.y-u.y)*l,a=(e.min.y-u.y)*l),n>a||i>r?null:((i>n||n!=n)&&(n=i),(a=0?(o=(e.min.z-u.z)*h,s=(e.max.z-u.z)*h):(o=(e.max.z-u.z)*h,s=(e.min.z-u.z)*h),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s=0?n:r,t)))},intersectsBox:function(e){return null!==this.intersectBox(e,Bn)},intersectTriangle:function(e,t,n,r,i){Vn.subVectors(t,e),jn.subVectors(n,e),Wn.crossVectors(Vn,jn);var a,o=this.direction.dot(Wn);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Hn.subVectors(this.origin,e);var s=a*this.direction.dot(jn.crossVectors(Hn,jn));if(s<0)return null;var c=a*this.direction.dot(Vn.cross(Hn));if(c<0)return null;if(s+c>o)return null;var l=-a*Hn.dot(Wn);return l<0?null:this.at(l/o,i)},applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}});var qn=new zt,Yn=new zt,Zn=new kt;function Jn(e,t){this.normal=void 0!==e?e:new zt(1,0,0),this.constant=void 0!==t?t:0}Object.assign(Jn.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(e,t,n){var r=qn.subVectors(n,t).cross(Yn.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new zt),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new zt);var n=e.delta(qn),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?void 0:t.copy(n).multiplyScalar(i).add(e.start)},intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new zt),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(e,t){var n=t||Zn.getNormalMatrix(e),r=this.coplanarPoint(qn).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this},translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}});var Kn=new zt,Qn=new zt,$n=new zt,er=new zt,tr=new zt,nr=new zt,rr=new zt,ir=new zt,ar=new zt,or=new zt;function sr(e,t,n){this.a=void 0!==e?e:new zt,this.b=void 0!==t?t:new zt,this.c=void 0!==n?n:new zt}Object.assign(sr,{getNormal:function(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new zt),r.subVectors(n,t),Kn.subVectors(e,t),r.cross(Kn);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)},getBarycoord:function(e,t,n,r,i){Kn.subVectors(r,t),Qn.subVectors(n,t),$n.subVectors(e,t);var a=Kn.dot(Kn),o=Kn.dot(Qn),s=Kn.dot($n),c=Qn.dot(Qn),l=Qn.dot($n),h=a*c-o*o;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new zt),0===h)return i.set(-2,-1,-1);var u=1/h,p=(c*s-o*l)*u,d=(a*l-o*s)*u;return i.set(1-p-d,d,p)},containsPoint:function(e,t,n,r){return sr.getBarycoord(e,t,n,r,er),er.x>=0&&er.y>=0&&er.x+er.y<=1},getUV:function(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,er),s.set(0,0),s.addScaledVector(i,er.x),s.addScaledVector(a,er.y),s.addScaledVector(o,er.z),s},isFrontFacing:function(e,t,n,r){return Kn.subVectors(n,t),Qn.subVectors(e,t),Kn.cross(Qn).dot(r)<0}}),Object.assign(sr.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){return Kn.subVectors(this.c,this.b),Qn.subVectors(this.a,this.b),.5*Kn.cross(Qn).length()},getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new zt),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return sr.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Jn),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return sr.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,n,r,i){return sr.getUV(e,this.a,this.b,this.c,t,n,r,i)},containsPoint:function(e){return sr.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return sr.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new zt);var n,r,i=this.a,a=this.b,o=this.c;tr.subVectors(a,i),nr.subVectors(o,i),ir.subVectors(e,i);var s=tr.dot(ir),c=nr.dot(ir);if(s<=0&&c<=0)return t.copy(i);ar.subVectors(e,a);var l=tr.dot(ar),h=nr.dot(ar);if(l>=0&&h<=l)return t.copy(a);var u=s*h-l*c;if(u<=0&&s>=0&&l<=0)return n=s/(s-l),t.copy(i).addScaledVector(tr,n);or.subVectors(e,o);var p=tr.dot(or),d=nr.dot(or);if(d>=0&&p<=d)return t.copy(o);var f=p*c-s*d;if(f<=0&&c>=0&&d<=0)return r=c/(c-d),t.copy(i).addScaledVector(nr,r);var m=l*d-p*h;if(m<=0&&h-l>=0&&p-d>=0)return rr.subVectors(o,a),r=(h-l)/(h-l+(p-d)),t.copy(a).addScaledVector(rr,r);var v=1/(m+f+u);return n=f*v,r=u*v,t.copy(i).addScaledVector(tr,n).addScaledVector(nr,r)},equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var cr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lr={h:0,s:0,l:0},hr={h:0,s:0,l:0};function ur(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function pr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function dr(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function fr(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function mr(e,t,n,r,i,a){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new zt,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new ur,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==a?a:0}Object.assign(ur.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(e,t,n){if(e=It.euclideanModulo(e,1),t=It.clamp(t,0,1),n=It.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=pr(i,r,e+1/3),this.g=pr(i,r,e),this.b=pr(i,r,e-1/3)}return this},setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,i=n[1],a=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(o,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=n[1],h=l.length;if(3===h)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},setColorName:function(e){var t=cr[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(e){return this.r=dr(e.r),this.g=dr(e.g),this.b=dr(e.b),this},copyLinearToSRGB:function(e){return this.r=fr(e.r),this.g=fr(e.g),this.b=fr(e.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,a=this.b,o=Math.max(r,i,a),s=Math.min(r,i,a),c=(s+o)/2;if(s===o)t=0,n=0;else{var l=o-s;switch(n=c<=.5?l/(o+s):l/(2-o-s),o){case r:t=(i-a)/l+(it&&(t=e[n]);return t}gr.prototype=Object.assign(Object.create(Pt.prototype),{constructor:gr,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==w&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==f&&(n.side=this.side),this.vertexColors!==g&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),a=r(e.images);i.length>0&&(n.textures=i),a.length>0&&(n.images=a)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(gr.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),yr.prototype=Object.create(gr.prototype),yr.prototype.constructor=yr,yr.prototype.isMeshBasicMaterial=!0,yr.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},Object.defineProperty(xr.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(xr.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r0,o=i[1]&&i[1].length>0,s=e.morphTargets,c=s.length;if(c>0){t=[];for(var l=0;l0){h=[];for(l=0;l0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(l=0;l65535?Sr:Tr)(e,1):this.index=e},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new kt).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);var r=this.attributes.tangent;void 0!==r&&((new kt).getNormalMatrix(e).applyToBufferAttribute(r),r.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return Or.makeRotationX(e),this.applyMatrix(Or),this},rotateY:function(e){return Or.makeRotationY(e),this.applyMatrix(Or),this},rotateZ:function(e){return Or.makeRotationZ(e),this.applyMatrix(Or),this},translate:function(e,t,n){return Or.makeTranslation(e,t,n),this.applyMatrix(Or),this},scale:function(e,t,n){return Or.makeScale(e,t,n),this.applyMatrix(Or),this},lookAt:function(e){return Ir.lookAt(e),Ir.updateMatrix(),this.applyMatrix(Ir.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Nr).negate(),this.translate(Nr.x,Nr.y,Nr.z),this},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new Ar(3*t.vertices.length,3),r=new Ar(3*t.colors.length,3);if(this.setAttribute("position",n.copyVector3sArray(t.vertices)),this.setAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new Ar(t.lineDistances.length,1);this.setAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n0){var n=new Float32Array(3*e.normals.length);this.setAttribute("normal",new xr(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.setAttribute("color",new xr(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.setAttribute("uv",new xr(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.setAttribute("uv2",new xr(a,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var s=[],c=e.morphTargets[o],l=0,h=c.length;l0){var d=new Ar(4*e.skinIndices.length,4);this.setAttribute("skinIndex",d.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var f=new Ar(4*e.skinWeights.length,4);this.setAttribute("skinWeight",f.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Dn);var e=this.attributes.position,t=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var n in i){var a=(p=i[n]).toJSON();""!==p.name&&(a.name=p.name),e.data.attributes[n]=a}var o={},s=!1;for(var n in this.morphAttributes){for(var c=this.morphAttributes[n],l=[],h=0,u=c.length;h0&&(o[n]=l,s=!0)}s&&(e.data.morphAttributes=o,e.data.morphTargetsRelative=this.morphTargetsRelative);var d=this.groups;d.length>0&&(e.data.groups=JSON.parse(JSON.stringify(d)));var f=this.boundingSphere;return null!==f&&(e.data.boundingSphere={center:f.center.toArray(),radius:f.radius}),e},clone:function(){return(new zr).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var a=e.attributes;for(t in a){var o=a[t];this.setAttribute(t,o.clone())}var s=e.morphAttributes;for(t in s){var c=[],l=s[t];for(n=0,r=l.length;nn.far?null:{distance:c,point:ti.clone(),object:e}}function ii(e,t,n,r,i,a,o,s,c,l,h,u){Hr.fromBufferAttribute(i,l),Vr.fromBufferAttribute(i,h),jr.fromBufferAttribute(i,u);var p=e.morphTargetInfluences;if(t.morphTargets&&a&&p){Yr.set(0,0,0),Zr.set(0,0,0),Jr.set(0,0,0);for(var d=0,f=a.length;d0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var n,r=this.geometry,i=this.material,a=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),kr.copy(r.boundingSphere),kr.applyMatrix4(a),!1!==e.ray.intersectsSphere(kr)&&(Br.getInverse(a),Gr.copy(e.ray).applyMatrix4(Br),null===r.boundingBox||!1!==Gr.intersectsBox(r.boundingBox))))if(this.drawMode===pt){if(r.isBufferGeometry){var o,s,c,l,h,u,p,d,f,m=r.index,v=r.attributes.position,g=r.morphAttributes.position,y=r.morphTargetsRelative,x=r.attributes.uv,b=r.attributes.uv2,w=r.groups,_=r.drawRange;if(null!==m)if(Array.isArray(i))for(l=0,u=w.length;l0&&(S=P);for(var C=0,O=R.length;C0)for(l=0;l0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n=0;n--){var f=p[n];for(this.faces.splice(f,1),o=0,s=this.faceVertexUvs.length;o0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,x=0;if(x=M(x,0,0),x=M(x,1,!0),x=M(x,2,!1),x=M(x,3,f),x=M(x,4,m),x=M(x,5,v),x=M(x,6,g),x=M(x,7,y),o.push(x),o.push(d.a,d.b,d.c),o.push(d.materialIndex),f){var b=this.faceVertexUvs[0][i];o.push(S(b[0]),S(b[1]),S(b[2]))}if(m&&o.push(T(d.normal)),v){var w=d.vertexNormals;o.push(T(w[0]),T(w[1]),T(w[2]))}if(g&&o.push(E(d.color)),y){var _=d.vertexColors;o.push(E(_[0]),E(_[1]),E(_[2]))}}function M(e,t,n){return n?e|1<0&&(e.data.colors=l),u.length>0&&(e.data.uvs=[u]),e.data.faces=o,e},clone:function(){return(new li).copy(this)},copy:function(e){var t,n,r,i,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t0?1:-1,l.push(R.x,R.y,R.z),h.push(y/m),h.push(1-x/v),A+=1}}for(x=0;x0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var a in this.extensions)!0===this.extensions[a]&&(i[a]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},yi.prototype=Object.assign(Object.create(bn.prototype),{constructor:yi,isCamera:!0,copy:function(e,t){return bn.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new zt),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){bn.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),xi.prototype=Object.assign(Object.create(yi.prototype),{constructor:xi,isPerspectiveCamera:!0,copy:function(e,t){return yi.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*It.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*It.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*It.RAD2DEG*Math.atan(Math.tan(.5*It.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*It.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/o,t-=a.offsetY*n/s,r*=a.width/o,n*=a.height/s}var c=this.filmOffset;0!==c&&(i+=e*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=bn.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}});var bi=90,wi=1;function _i(e,t,n,r){bn.call(this),this.type="CubeCamera";var i=new xi(bi,wi,e,t);i.up.set(0,-1,0),i.lookAt(new zt(1,0,0)),this.add(i);var a=new xi(bi,wi,e,t);a.up.set(0,-1,0),a.lookAt(new zt(-1,0,0)),this.add(a);var o=new xi(bi,wi,e,t);o.up.set(0,0,1),o.lookAt(new zt(0,1,0)),this.add(o);var s=new xi(bi,wi,e,t);s.up.set(0,0,-1),s.lookAt(new zt(0,-1,0)),this.add(s);var c=new xi(bi,wi,e,t);c.up.set(0,-1,0),c.lookAt(new zt(0,0,1)),this.add(c);var l=new xi(bi,wi,e,t);l.up.set(0,-1,0),l.lookAt(new zt(0,0,-1)),this.add(l),r=r||{format:Ne,magFilter:ye,minFilter:ye},this.renderTarget=new Mi(n,n,r),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=e.getRenderTarget(),r=this.renderTarget,h=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,i),e.setRenderTarget(r,1),e.render(t,a),e.setRenderTarget(r,2),e.render(t,o),e.setRenderTarget(r,3),e.render(t,s),e.setRenderTarget(r,4),e.render(t,c),r.texture.generateMipmaps=h,e.setRenderTarget(r,5),e.render(t,l),e.setRenderTarget(n)},this.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),a=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(a,o),e.clear(t,n,r);e.setRenderTarget(i)}}function Mi(e,t,n){Xt.call(this,e,t,n)}function Ti(e,t,n,r,i,a,o,s,c,l,h,u){jt.call(this,null,a,o,s,c,l,r,i,h,u),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==c?c:me,this.minFilter=void 0!==l?l:me,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}_i.prototype=Object.create(bn.prototype),_i.prototype.constructor=_i,Mi.prototype=Object.create(Xt.prototype),Mi.prototype.constructor=Mi,Mi.prototype.isWebGLRenderTargetCube=!0,Mi.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var n=new wn,r={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},i=new gi({type:"CubemapFromEquirect",uniforms:pi(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:m,blending:b});i.uniforms.tEquirect.value=t;var a=new ni(new ui(5,5,5),i);n.add(a);var o=new _i(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,n),a.geometry.dispose(),a.material.dispose(),this},Ti.prototype=Object.create(jt.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isDataTexture=!0;var Ei=new zn,Si=new zt;function Ai(e,t,n,r,i,a){this.planes=[void 0!==e?e:new Jn,void 0!==t?t:new Jn,void 0!==n?n:new Jn,void 0!==r?r:new Jn,void 0!==i?i:new Jn,void 0!==a?a:new Jn]}Object.assign(Ai.prototype,{set:function(e,t,n,r,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],h=n[7],u=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return t[0].setComponents(o-r,h-s,f-u,y-m).normalize(),t[1].setComponents(o+r,h+s,f+u,y+m).normalize(),t[2].setComponents(o+i,h+c,f+p,y+v).normalize(),t[3].setComponents(o-i,h-c,f-p,y-v).normalize(),t[4].setComponents(o-a,h-l,f-d,y-g).normalize(),t[5].setComponents(o+a,h+l,f+d,y+g).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Ei.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Ei)},intersectsSprite:function(e){return Ei.center.set(0,0,0),Ei.radius=.7071067811865476,Ei.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ei)},intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)0?e.max.x:e.min.x,Si.y=r.normal.y>0?e.max.y:e.min.y,Si.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Si)<0)return!1}return!0},containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}});var Li={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\ttransformedNormal = mat3( instanceMatrix ) * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = normalMatrix * objectTangent;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatRoughness = clamp( clearcoatRoughness, 0.04, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_normalmap_pars_fragment:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpack2HalfToRGBA( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpack2HalfToRGBA( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = ( floor( uv * size - 0.5 ) + 0.5 ) * texelSize;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"},Ri={common:{diffuse:{value:new ur(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new kt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Nt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ur(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new ur(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new kt}},sprite:{diffuse:{value:new ur(15658734)},opacity:{value:1},center:{value:new Nt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new kt}}},Pi={basic:{uniforms:di([Ri.common,Ri.specularmap,Ri.envmap,Ri.aomap,Ri.lightmap,Ri.fog]),vertexShader:Li.meshbasic_vert,fragmentShader:Li.meshbasic_frag},lambert:{uniforms:di([Ri.common,Ri.specularmap,Ri.envmap,Ri.aomap,Ri.lightmap,Ri.emissivemap,Ri.fog,Ri.lights,{emissive:{value:new ur(0)}}]),vertexShader:Li.meshlambert_vert,fragmentShader:Li.meshlambert_frag},phong:{uniforms:di([Ri.common,Ri.specularmap,Ri.envmap,Ri.aomap,Ri.lightmap,Ri.emissivemap,Ri.bumpmap,Ri.normalmap,Ri.displacementmap,Ri.gradientmap,Ri.fog,Ri.lights,{emissive:{value:new ur(0)},specular:{value:new ur(1118481)},shininess:{value:30}}]),vertexShader:Li.meshphong_vert,fragmentShader:Li.meshphong_frag},standard:{uniforms:di([Ri.common,Ri.envmap,Ri.aomap,Ri.lightmap,Ri.emissivemap,Ri.bumpmap,Ri.normalmap,Ri.displacementmap,Ri.roughnessmap,Ri.metalnessmap,Ri.fog,Ri.lights,{emissive:{value:new ur(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Li.meshphysical_vert,fragmentShader:Li.meshphysical_frag},matcap:{uniforms:di([Ri.common,Ri.bumpmap,Ri.normalmap,Ri.displacementmap,Ri.fog,{matcap:{value:null}}]),vertexShader:Li.meshmatcap_vert,fragmentShader:Li.meshmatcap_frag},points:{uniforms:di([Ri.points,Ri.fog]),vertexShader:Li.points_vert,fragmentShader:Li.points_frag},dashed:{uniforms:di([Ri.common,Ri.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Li.linedashed_vert,fragmentShader:Li.linedashed_frag},depth:{uniforms:di([Ri.common,Ri.displacementmap]),vertexShader:Li.depth_vert,fragmentShader:Li.depth_frag},normal:{uniforms:di([Ri.common,Ri.bumpmap,Ri.normalmap,Ri.displacementmap,{opacity:{value:1}}]),vertexShader:Li.normal_vert,fragmentShader:Li.normal_frag},sprite:{uniforms:di([Ri.sprite,Ri.fog]),vertexShader:Li.sprite_vert,fragmentShader:Li.sprite_frag},background:{uniforms:{uvTransform:{value:new kt},t2D:{value:null}},vertexShader:Li.background_vert,fragmentShader:Li.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Li.cube_vert,fragmentShader:Li.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Li.equirect_vert,fragmentShader:Li.equirect_frag},distanceRGBA:{uniforms:di([Ri.common,Ri.displacementmap,{referencePosition:{value:new zt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Li.distanceRGBA_vert,fragmentShader:Li.distanceRGBA_frag},shadow:{uniforms:di([Ri.lights,Ri.fog,{color:{value:new ur(0)},opacity:{value:1}}]),vertexShader:Li.shadow_vert,fragmentShader:Li.shadow_frag}};function Ci(){var e=null,t=!1,n=null;function r(i,a){!1!==t&&(n(i,a),e.requestAnimationFrame(r))}return{start:function(){!0!==t&&null!==n&&(e.requestAnimationFrame(r),t=!0)},stop:function(){t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Oi(e){var t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=t.get(n);void 0===i?t.set(n,function(t,n){var r=t.array,i=t.usage,a=e.createBuffer();e.bindBuffer(n,a),e.bufferData(n,r,i),t.onUploadCallback();var o=5126;return r instanceof Float32Array?o=5126:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?o=5123:r instanceof Int16Array?o=5122:r instanceof Uint32Array?o=5125:r instanceof Int32Array?o=5124:r instanceof Int8Array?o=5120:r instanceof Uint8Array&&(o=5121),{buffer:a,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(n,r)):i.version0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,o=void 0!==n.precision?n.precision:"highp",s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var c=!0===n.logarithmicDepthBuffer,l=e.getParameter(34930),h=e.getParameter(35660),u=e.getParameter(3379),p=e.getParameter(34076),d=e.getParameter(34921),f=e.getParameter(36347),m=e.getParameter(36348),v=e.getParameter(36349),g=h>0,y=a||!!t.get("OES_texture_float");return{isWebGL2:a,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:c,maxTextures:l,maxVertexTextures:h,maxTextureSize:u,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y,maxSamples:a?e.getParameter(36183):0}}function zi(){var e=this,t=null,n=0,r=!1,i=!1,a=new Jn,o=new kt,s={value:null,needsUpdate:!1};function c(){s.value!==t&&(s.value=t,s.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function l(t,n,r,i){var c=null!==t?t.length:0,l=null;if(0!==c){if(l=s.value,!0!==i||null===l){var h=r+4*c,u=n.matrixWorldInverse;o.getNormalMatrix(u),(null===l||l.length65535?Sr:Tr)(n,1);d.version=o,t.update(d,34963);var f=i.get(e);f&&t.remove(f),i.set(e,d)}return{get:function(e,t){var i=r.get(t);return i||(t.addEventListener("dispose",a),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new zr).setFromObject(e)),i=t._bufferGeometry),r.set(t,i),n.memory.geometries++,i)},update:function(e){var n=e.index,r=e.attributes;for(var i in null!==n&&t.update(n,34963),r)t.update(r[i],34962);var a=e.morphAttributes;for(var i in a)for(var o=a[i],s=0,c=o.length;s0)return e;var i=t*n,a=$i[i];if(void 0===a&&(a=new Float32Array(i),$i[i]=a),0!==t){r.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=n,e[o].toArray(a,s)}return a}function aa(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n/gm;function $a(e){return e.replace(Qa,eo)}function eo(e,t){var n=Li[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return $a(n)}var to=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function no(e){return e.replace(to,ro)}function ro(e,t,n,r){for(var i="",a=parseInt(t);a0?e.gammaFactor:1,M=a.isWebGL2?"":function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Za).join("\n")}(r.extensions,a,t),T=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(m),E=f.createProgram(),S=a.numMultiviewViews;if(r.isRawShaderMaterial?((o=[T].filter(Za).join("\n")).length>0&&(o+="\n"),(s=[M,T].filter(Za).join("\n")).length>0&&(s+="\n")):(o=[io(a),"#define SHADER_NAME "+i.name,T,a.instancing?"#define USE_INSTANCING":"",a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+_,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+b:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+y:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Za).join("\n"),s=[M,io(a),"#define SHADER_NAME "+i.name,T,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+_,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+x:"",a.envMap?"#define "+b:"",a.envMap?"#define "+w:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.sheen?"#define USE_SHEEN":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+y:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensions&&r.extensions.shaderTextureLOD||a.envMap)&&(a.isWebGL2||t.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",a.toneMapping!==$?"#define TONE_MAPPING":"",a.toneMapping!==$?Li.tonemapping_pars_fragment:"",a.toneMapping!==$?Ya("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.matcapEncoding||a.envMapEncoding||a.emissiveMapEncoding?Li.encodings_pars_fragment:"",a.mapEncoding?qa("mapTexelToLinear",a.mapEncoding):"",a.matcapEncoding?qa("matcapTexelToLinear",a.matcapEncoding):"",a.envMapEncoding?qa("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?qa("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(c="linearToOutputTexel",l=a.outputEncoding,h=Wa(l),"vec4 "+c+"( vec4 value ) { return LinearTo"+h[0]+h[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Za).join("\n")),v=Ka(v=Ja(v=$a(v),a),a),g=Ka(g=Ja(g=$a(g),a),a),v=no(v),g=no(g),a.isWebGL2&&!r.isRawShaderMaterial){var A=!1,L=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==v.match(L)&&null!==g.match(L)&&(A=!0,v=v.replace(L,""),g=g.replace(L,"")),o=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+o,s=["#version 300 es\n","#define varying in",A?"":"out highp vec4 pc_fragColor;",A?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+s,S>0&&(o=(o=o.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","layout(num_views = "+S+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace(["uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;"].join("\n"),["uniform mat4 modelViewMatrices["+S+"];","uniform mat4 projectionMatrices["+S+"];","uniform mat4 viewMatrices["+S+"];","uniform mat3 normalMatrices["+S+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]","#define projectionMatrix projectionMatrices[VIEW_ID]","#define viewMatrix viewMatrices[VIEW_ID]","#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),s=(s=s.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+S+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n")))}var R,P,C=s+g,O=Va(f,35633,o+v),I=Va(f,35632,C);if(f.attachShader(E,O),f.attachShader(E,I),void 0!==r.index0AttributeName?f.bindAttribLocation(E,0,r.index0AttributeName):!0===a.morphTargets&&f.bindAttribLocation(E,0,"position"),f.linkProgram(E),e.debug.checkShaderErrors){var N=f.getProgramInfoLog(E).trim(),D=f.getShaderInfoLog(O).trim(),F=f.getShaderInfoLog(I).trim(),U=!0,z=!0;if(!1===f.getProgramParameter(E,35714)){U=!1;var B=Xa(f,O,"vertex"),G=Xa(f,I,"fragment");console.error("THREE.WebGLProgram: shader error: ",f.getError(),"35715",f.getProgramParameter(E,35715),"gl.getProgramInfoLog",N,B,G)}else""!==N?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",N):""!==D&&""!==F||(z=!1);z&&(this.diagnostics={runnable:U,material:r,programLog:N,vertexShader:{log:D,prefix:o},fragmentShader:{log:F,prefix:s}})}return f.deleteShader(O),f.deleteShader(I),this.getUniforms=function(){return void 0===R&&(R=new Ha(f,E)),R},this.getAttributes=function(){return void 0===P&&(P=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i0,maxBones:b,useVertexTexture:o,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numDirLightShadows:r.directionalShadowMap.length,numPointLightShadows:r.pointShadowMap.length,numSpotLightShadows:r.spotShadowMap.length,numClippingPlanes:f,numClipIntersection:g,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:t.toneMapped?e.toneMapping:$,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:t.side===v,flipSided:t.side===m,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCacheKey=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var a=0;a1&&n.sort(co),r.length>1&&r.sort(lo)}}}function uo(){var e=new WeakMap;function t(n){var r=n.target;r.removeEventListener("dispose",t),e.delete(r)}return{get:function(n,r){var i,a=e.get(n);return void 0===a?(i=new ho,e.set(n,new WeakMap),e.get(n).set(r,i),n.addEventListener("dispose",t)):void 0===(i=a.get(r))&&(i=new ho,a.set(r,i)),i},dispose:function(){e=new WeakMap}}}function po(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new zt,color:new ur,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"SpotLight":n={position:new zt,direction:new zt,color:new ur,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Nt};break;case"PointLight":n={position:new zt,color:new ur,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Nt,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new zt,skyColor:new ur,groundColor:new ur};break;case"RectAreaLight":n={color:new ur,position:new zt,halfWidth:new zt,halfHeight:new zt}}return e[t.id]=n,n}}}var fo=0;function mo(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function vo(){for(var e=new po,t={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},n=0;n<9;n++)t.probe.push(new zt);var r=new zt,i=new tn,a=new tn;return{setup:function(n,o,s){for(var c=0,l=0,h=0,u=0;u<9;u++)t.probe[u].set(0,0,0);var p=0,d=0,f=0,m=0,v=0,g=0,y=0,x=0,b=s.matrixWorldInverse;n.sort(mo),u=0;for(var w=n.length;u0:!0===s.isGeometry&&(f=s.morphTargets&&s.morphTargets.length>0));var m=!1;!0===t.isSkinnedMesh&&(!0===n.skinning?m=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),c=u(f,m,!0===t.isInstancedMesh)}else c=p;if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var v=c.uuid,g=n.uuid,y=l[v];void 0===y&&(y={},l[v]=y);var x=y[g];void 0===x&&(x=c.clone(),y[g]=x),c=x}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=o===d?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,!0===r.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(r.matrixWorld),c.nearDistance=i,c.farDistance=a),c}function S(n,i,a,o,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===d)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var c=t.update(n),l=n.material;if(Array.isArray(l))for(var h=c.groups,u=0,p=h.length;un||i.y>n)&&(console.warn("THREE.WebGLShadowMap:",v,"has shadow exceeding max texture size, reducing"),i.x>n&&(a.x=Math.floor(n/y.x),i.x=a.x*y.x,g.mapSize.x=a.x),i.y>n&&(a.y=Math.floor(n/y.y),i.y=a.y*y.y,g.mapSize.y=a.y)),null===g.map&&!g.isPointLightShadow&&this.type===d){var x={minFilter:ye,magFilter:ye,format:De};g.map=new Xt(i.x,i.y,x),g.map.texture.name=v.name+".shadowMap",g.mapPass=new Xt(i.x,i.y,x),g.camera.updateProjectionMatrix()}if(null===g.map){x={minFilter:me,magFilter:me,format:De};g.map=new Xt(i.x,i.y,x),g.map.texture.name=v.name+".shadowMap",g.camera.updateProjectionMatrix()}e.setRenderTarget(g.map),e.clear();for(var M=g.getViewportCount(),T=0;T=1):-1!==ue.indexOf("OpenGL ES")&&(he=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(ue)[1]),le=he>=2);var pe=null,de={},fe=new Wt,me=new Wt;function ve(t,n,r){var i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var o=0;or||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?It.floorPowerOfTwo:Math.floor,o=a(i*e.width),c=a(i*e.height);void 0===s&&(s=m(o,c));var l=n?m(o,c):s;return l.width=o,l.height=c,l.getContext("2d").drawImage(e,0,0,o,c),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+c+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function g(e){return It.isPowerOfTwo(e.width)&&It.isPowerOfTwo(e.height)}function y(e,t){return e.generateMipmaps&&t&&e.minFilter!==me&&e.minFilter!==ye}function x(t,n,i,a){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,a))*Math.LOG2E}function b(e,n){if(!1===c)return e;var r=e;return 6403===e&&(5126===n&&(r=33326),5131===n&&(r=33325),5121===n&&(r=33321)),6407===e&&(5126===n&&(r=34837),5131===n&&(r=34843),5121===n&&(r=32849)),6408===e&&(5126===n&&(r=34836),5131===n&&(r=34842),5121===n&&(r=32856)),33325===r||33326===r||34842===r||34836===r?t.get("EXT_color_buffer_float"):34843!==r&&34837!==r||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),r}function w(e){return e===me||e===ve||e===ge?9728:9729}function _(t){var n=t.target;n.removeEventListener("dispose",_),function(t){var n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&d.delete(n),o.memory.textures--}function M(t){var n=t.target;n.removeEventListener("dispose",M),function(t){var n=r.get(t),i=r.get(t.texture);if(!t)return;void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var a=0;a<6;a++)e.deleteFramebuffer(n.__webglFramebuffer[a]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[a]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);if(t.isWebGLMultiviewRenderTarget){e.deleteTexture(n.__webglColorTexture),e.deleteTexture(n.__webglDepthStencilTexture),o.memory.textures-=2;a=0;for(var s=n.__webglViewFramebuffers.length;a0&&i.__version!==e.version){var a=e.image;if(void 0===a)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==a.complete)return void O(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function S(t,i){if(6===t.image.length){var o=r.get(t);if(t.version>0&&o.__version!==t.version){C(o,t),n.activeTexture(33984+i),n.bindTexture(34067,o.__webglTexture),e.pixelStorei(37440,t.flipY);for(var s=t&&t.isCompressedTexture,l=t.image[0]&&t.image[0].isDataTexture,u=[],p=0;p<6;p++)u[p]=s||l?l?t.image[p].image:t.image[p]:v(t.image[p],!1,!0,h);var d,f=u[0],m=g(f)||c,w=a.convert(t.format),_=a.convert(t.type),M=b(w,_);if(P(34067,t,m),s){for(p=0;p<6;p++){d=u[p].mipmaps;for(var T=0;T1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function C(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",_),t.__webglTexture=e.createTexture(),o.memory.textures++)}function O(t,r,i){var o=3553;r.isDataTexture2DArray&&(o=35866),r.isDataTexture3D&&(o=32879),C(t,r),n.activeTexture(33984+i),n.bindTexture(o,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);var s=function(e){return!c&&(e.wrapS!==de||e.wrapT!==de||e.minFilter!==me&&e.minFilter!==ye)}(r)&&!1===g(r.image),l=v(r.image,s,!1,u),h=g(l)||c,p=a.convert(r.format),d=a.convert(r.type),f=b(p,d);P(o,r,h);var m,w=r.mipmaps;if(r.isDepthTexture){if(f=6402,r.type===Ae){if(!1===c)throw new Error("Float Depth Texture only supported in WebGL2.0");f=36012}else c&&(f=33189);r.format===ze&&6402===f&&r.type!==Te&&r.type!==Se&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Te,d=a.convert(r.type)),r.format===Be&&(f=34041,r.type!==Oe&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Oe,d=a.convert(r.type))),n.texImage2D(3553,0,f,l.width,l.height,0,p,d,null)}else if(r.isDataTexture)if(w.length>0&&h){for(var _=0,M=w.length;_0&&h){for(_=0,M=w.length;_=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=E,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?O(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?O(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=S,this.setTextureCubeDynamic=A,this.setupRenderTarget=function(i){var s=r.get(i),l=r.get(i.texture);i.addEventListener("dispose",M),l.__webglTexture=e.createTexture(),o.memory.textures++;var h=!0===i.isWebGLRenderTargetCube,u=!0===i.isWebGLMultisampleRenderTarget,p=!0===i.isWebGLMultiviewRenderTarget,d=g(i)||c;if(h){s.__webglFramebuffer=[];for(var f=0;f<6;f++)s.__webglFramebuffer[f]=e.createFramebuffer()}else if(s.__webglFramebuffer=e.createFramebuffer(),u)if(c){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,s.__webglColorRenderbuffer);var m=b(a.convert(i.texture.format),a.convert(i.texture.type)),v=F(i);e.renderbufferStorageMultisample(36161,v,m,i.width,i.height),e.bindFramebuffer(36160,s.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,s.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),i.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),N(s.__webglDepthRenderbuffer,i,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");else if(p){var w=i.width,_=i.height,T=i.numViews;e.bindFramebuffer(36160,s.__webglFramebuffer);var E=t.get("OVR_multiview2");o.memory.textures+=2;var S=e.createTexture();e.bindTexture(35866,S),e.texParameteri(35866,10240,9728),e.texParameteri(35866,10241,9728),e.texImage3D(35866,0,32856,w,_,T,0,6408,5121,null),E.framebufferTextureMultiviewOVR(36160,36064,S,0,0,T);var A=e.createTexture();e.bindTexture(35866,A),e.texParameteri(35866,10240,9728),e.texParameteri(35866,10241,9728),e.texImage3D(35866,0,35056,w,_,T,0,34041,34042,null),E.framebufferTextureMultiviewOVR(36160,33306,A,0,0,T);var L=new Array(T);for(f=0;fp)return!1;for(var n=1,r=t.length;n=0){var l=i[s];if(void 0!==l){var h=l.normalized,u=l.itemSize;if(void 0===(M=w.get(l)))continue;var p=M.buffer,m=M.type,y=M.bytesPerElement;if(l.isInterleavedBufferAttribute){var x=l.data,b=x.stride,_=l.offset;x&&x.isInstancedInterleavedBuffer?(g.enableAttributeAndDivisor(c,x.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=x.meshPerAttribute*x.count)):g.enableAttribute(c),d.bindBuffer(34962,p),d.vertexAttribPointer(c,u,m,h,b*y,_*y)}else l.isInstancedBufferAttribute?(g.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=l.meshPerAttribute*l.count)):g.enableAttribute(c),d.bindBuffer(34962,p),d.vertexAttribPointer(c,u,m,h,0,0)}else if("instanceMatrix"===s){var M;if(void 0===(M=w.get(e.instanceMatrix)))continue;p=M.buffer,m=M.type;g.enableAttributeAndDivisor(c+0,1),g.enableAttributeAndDivisor(c+1,1),g.enableAttributeAndDivisor(c+2,1),g.enableAttributeAndDivisor(c+3,1),d.bindBuffer(34962,p),d.vertexAttribPointer(c+0,4,m,!1,64,0),d.vertexAttribPointer(c+1,4,m,!1,64,16),d.vertexAttribPointer(c+2,4,m,!1,64,32),d.vertexAttribPointer(c+3,4,m,!1,64,48)}else if(void 0!==o){var T=o[s];if(void 0!==T)switch(T.length){case 2:d.vertexAttrib2fv(c,T);break;case 3:d.vertexAttrib3fv(c,T);break;case 4:d.vertexAttrib4fv(c,T);break;default:d.vertexAttrib1fv(c,T)}}}}g.disableUnusedAttributes()}(i,n,r,s),null!==l&&d.bindBuffer(34963,u.buffer));var y=1/0;null!==l?y=l.count:void 0!==h&&(y=h.count);var x=n.drawRange.start*p,b=n.drawRange.count*p,M=null!==a?a.start*p:0,T=null!==a?a.count*p:1/0,E=Math.max(x,M),S=Math.min(y,x+b,M+T)-1,A=Math.max(0,S-E+1);if(0!==A){if(i.isMesh)if(!0===r.wireframe)g.setLineWidth(r.wireframeLinewidth*ae()),m.setMode(1);else switch(i.drawMode){case pt:m.setMode(4);break;case dt:m.setMode(5);break;case ft:m.setMode(6)}else if(i.isLine){var C=r.linewidth;void 0===C&&(C=1),g.setLineWidth(C*ae()),i.isLineSegments?m.setMode(1):i.isLineLoop?m.setMode(2):m.setMode(3)}else i.isPoints?m.setMode(0):i.isSprite&&m.setMode(4);i.isInstancedMesh?m.renderInstances(n,E,A,i.count):n.isInstancedBufferGeometry?m.renderInstances(n,E,A,n.maxInstancedCount):m.render(E,A)}}},this.compile=function(e,t){(p=S.get(e,t)).init(),e.traverse((function(e){e.isLight&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(t),e.traverse((function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(f=0;f=0&&e.numSupportedMorphNormals++}var m=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=$.numPlanes,r.numIntersection=$.numIntersection,m.clippingPlanes=$.uniform),r.fog=t,r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=o,r.needsLights&&(m.ambientLightColor.value=i.state.ambient,m.lightProbe.value=i.state.probe,m.directionalLights.value=i.state.directional,m.spotLights.value=i.state.spot,m.rectAreaLights.value=i.state.rectArea,m.pointLights.value=i.state.point,m.hemisphereLights.value=i.state.hemi,m.directionalShadowMap.value=i.state.directionalShadowMap,m.directionalShadowMatrix.value=i.state.directionalShadowMatrix,m.spotShadowMap.value=i.state.spotShadowMap,m.spotShadowMatrix.value=i.state.spotShadowMatrix,m.pointShadowMap.value=i.state.pointShadowMap,m.pointShadowMatrix.value=i.state.pointShadowMatrix);var v=r.program.getUniforms(),g=Ha.seqWithValue(v.seq,m);r.uniformsList=g}function _e(e,t,n,r){b.resetTextureUnits();var i=x.get(n),a=p.state.lights;if(te&&(ne||e!==k)){var o=e===k&&n.id===B;$.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,o)}n.version===i.__version&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==t?n.needsUpdate=!0:i.needsLights&&i.lightsStateVersion!==a.state.version?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===$.numPlanes&&i.numIntersection===$.numIntersection||(n.needsUpdate=!0)),n.version!==i.__version&&(be(n,t,r),i.__version=n.version);var s,c,l=!1,h=!1,u=!1,f=i.program,y=f.getUniforms(),w=i.shader.uniforms;if(g.useProgram(f.program)&&(l=!0,h=!0,u=!0),n.id!==B&&(B=n.id,h=!0),l||k!==e){if(f.numMultiviewViews>0?le.updateCameraProjectionMatricesUniform(e,y):y.setValue(d,"projectionMatrix",e.projectionMatrix),v.logarithmicDepthBuffer&&y.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),k!==e&&(k=e,h=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var _=y.map.cameraPosition;void 0!==_&&_.setValue(d,ie.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(d,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&(f.numMultiviewViews>0?le.updateCameraViewMatricesUniform(e,y):y.setValue(d,"viewMatrix",e.matrixWorldInverse))}if(n.skinning){y.setOptional(d,r,"bindMatrix"),y.setOptional(d,r,"bindMatrixInverse");var M=r.skeleton;if(M){var T=M.bones;if(v.floatVertexTextures){if(void 0===M.boneTexture){var E=Math.sqrt(4*T.length);E=It.ceilPowerOfTwo(E),E=Math.max(E,4);var S=new Float32Array(E*E*4);S.set(M.boneMatrices);var A=new Ti(S,E,E,De,Ae);M.boneMatrices=S,M.boneTexture=A,M.boneTextureSize=E}y.setValue(d,"boneTexture",M.boneTexture,b),y.setValue(d,"boneTextureSize",M.boneTextureSize)}else y.setOptional(d,M,"boneMatrices")}}return(h||i.receiveShadow!==r.receiveShadow)&&(i.receiveShadow=r.receiveShadow,y.setValue(d,"receiveShadow",r.receiveShadow)),h&&(y.setValue(d,"toneMappingExposure",O.toneMappingExposure),y.setValue(d,"toneMappingWhitePoint",O.toneMappingWhitePoint),i.needsLights&&(c=u,(s=w).ambientLightColor.needsUpdate=c,s.lightProbe.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),t&&n.fog&&function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(w,t),n.isMeshBasicMaterial?Me(w,n):n.isMeshLambertMaterial?(Me(w,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(w,n)):n.isMeshPhongMaterial?(Me(w,n),n.isMeshToonMaterial?function(e,t){Te(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(w,n):Te(w,n)):n.isMeshStandardMaterial?(Me(w,n),n.isMeshPhysicalMaterial?function(e,t){Ee(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===m&&e.clearcoatNormalScale.value.negate());e.transparency.value=t.transparency}(w,n):Ee(w,n)):n.isMeshMatcapMaterial?(Me(w,n),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(w,n)):n.isMeshDepthMaterial?(Me(w,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(w,n)):n.isMeshDistanceMaterial?(Me(w,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(w,n)):n.isMeshNormalMaterial?(Me(w,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(w,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(w,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(w,n)):n.isPointsMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*Y,e.scale.value=.5*q,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);var n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(w,n):n.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);var n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(w,n):n.isShadowMaterial&&(w.color.value.copy(n.color),w.opacity.value=n.opacity),void 0!==w.ltc_1&&(w.ltc_1.value=Ri.LTC_1),void 0!==w.ltc_2&&(w.ltc_2.value=Ri.LTC_2),Ha.upload(d,i.uniformsList,w,b),n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Ha.upload(d,i.uniformsList,w,b),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(d,"center",r.center),f.numMultiviewViews>0?le.updateObjectMatricesUniforms(r,e,y):(y.setValue(d,"modelViewMatrix",r.modelViewMatrix),y.setValue(d,"normalMatrix",r.normalMatrix)),y.setValue(d,"modelMatrix",r.matrixWorld),f}function Me(e,t){var n;e.opacity.value=t.opacity,t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=x.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function Te(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function Ee(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===m&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===m&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}ve.setAnimationLoop((function(e){ce.isPresenting()||me&&me(e)})),"undefined"!=typeof window&&ve.setContext(window),this.setAnimationLoop=function(e){me=e,ce.setAnimationLoop(e),ve.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),t&&t.isCamera){if(!I){G.geometry=null,G.program=null,G.wireframe=!1,B=-1,k=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ce.enabled&&ce.isPresenting()&&(t=ce.getCamera(t)),(p=S.get(e,t)).init(),e.onBeforeRender(O,e,t,n||U),re.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Q.setFromMatrix(re),ne=this.localClippingEnabled,te=$.init(this.clippingPlanes,ne,t),(u=E.get(e,t)).init(),ge(e,t,0,O.sortObjects),!0===O.sortObjects&&u.sort(),te&&$.beginShadows();var i=p.state.shadowsArray;he.render(i,e,t),p.setupLights(t),te&&$.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),ce.enabled&&le.isAvailable()&&le.attachCamera(t),A.render(u,e,t,r);var a=u.opaque,o=u.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;a.length&&ye(a,e,t,s),o.length&&ye(o,e,t,s)}else a.length&&ye(a,e,t),o.length&&ye(o,e,t);e.onAfterRender(O,e,t),null!==U&&(b.updateRenderTargetMipmap(U),b.updateMultisampleRenderTarget(U)),g.buffers.depth.setTest(!0),g.buffers.depth.setMask(!0),g.buffers.color.setMask(!0),g.setPolygonOffset(!1),ce.enabled&&(le.isAvailable()&&le.detachCamera(t),ce.submitFrame()),u=null,p=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){N!==e&&null===U&&d.bindFramebuffer(36160,e),N=e},this.getActiveCubeFace=function(){return D},this.getActiveMipmapLevel=function(){return F},this.getRenderTarget=function(){return U},this.setRenderTarget=function(e,t,n){U=e,D=t,F=n,e&&void 0===x.get(e).__webglFramebuffer&&b.setupRenderTarget(e);var r=N,i=!1;if(e){var a=x.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(r=a[t||0],i=!0):r=e.isWebGLMultisampleRenderTarget?x.get(e).__webglMultisampledFramebuffer:a,V.copy(e.viewport),j.copy(e.scissor),W=e.scissorTest}else V.copy(Z).multiplyScalar(Y).floor(),j.copy(J).multiplyScalar(Y).floor(),W=K;if(z!==r&&(d.bindFramebuffer(36160,r),z=r),g.viewport(V),g.scissor(j),g.setScissorTest(W),i){var o=x.get(e.texture);d.framebufferTexture2D(36160,36064,34069+(t||0),o.__webglTexture,n||0)}},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(e&&e.isWebGLRenderTarget){var s=x.get(e).__webglFramebuffer;if(e.isWebGLRenderTargetCube&&void 0!==o&&(s=s[o]),s){var c=!1;s!==z&&(d.bindFramebuffer(36160,s),c=!0);try{var l=e.texture,h=l.format,u=l.type;if(h!==De&&C.convert(h)!==d.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(u===we||C.convert(u)===d.getParameter(35738)||u===Ae&&(v.isWebGL2||f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||u===Le&&(v.isWebGL2?f.get("EXT_color_buffer_float"):f.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===d.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&d.readPixels(t,n,r,i,C.convert(h),C.convert(u),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{c&&d.bindFramebuffer(36160,z)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r),o=C.convert(t.format);b.setTexture2D(t,0),d.copyTexImage2D(3553,n,o,e.x,e.y,i,a,0),g.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){var i=t.image.width,a=t.image.height,o=C.convert(n.format),s=C.convert(n.type);b.setTexture2D(n,0),t.isDataTexture?d.texSubImage2D(3553,r||0,e.x,e.y,i,a,o,s,t.image.data):d.texSubImage2D(3553,r||0,e.x,e.y,o,s,t.image),g.unbindTexture()},this.initTexture=function(e){b.setTexture2D(e,0),g.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function zo(e,t){this.name="",this.color=new ur(e),this.density=void 0!==t?t:25e-5}function Bo(e,t,n){this.name="",this.color=new ur(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function Go(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Rt,this.updateRange={offset:0,count:-1},this.version=0}function ko(e,t,n,r){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function Ho(e){gr.call(this),this.type="SpriteMaterial",this.color=new ur(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.assign(Do.prototype,Pt.prototype),Object.assign(Fo.prototype,Pt.prototype),Object.assign(zo.prototype,{isFogExp2:!0,clone:function(){return new zo(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(Bo.prototype,{isFog:!0,clone:function(){return new Bo(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty(Go.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Go.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;re.far||t.push({distance:s,point:Vo.clone(),uv:sr.getUV(Vo,Zo,Jo,Ko,Qo,$o,es,new Nt),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return bn.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var rs=new zt,is=new zt;function as(){bn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function os(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),ni.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new tn,this.bindMatrixInverse=new tn}as.prototype=Object.assign(Object.create(bn.prototype),{constructor:as,isLOD:!0,copy:function(e){bn.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n0){for(var n=1,r=t.length;n0){rs.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(rs);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){rs.setFromMatrixPosition(e.matrixWorld),is.setFromMatrixPosition(this.matrixWorld);var n=rs.distanceTo(is);t[0].object.visible=!0;for(var r=1,i=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(;r0&&(ds[0].instanceId=i,ds[0].object=this,t.push(ds[0]),ds.length=0)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){}}),vs.prototype=Object.create(gr.prototype),vs.prototype.constructor=vs,vs.prototype.isLineBasicMaterial=!0,vs.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this};var gs=new zt,ys=new zt,xs=new tn,bs=new Xn,ws=new zn;function _s(e,t,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),bn.call(this),this.type="Line",this.geometry=void 0!==e?e:new zr,this.material=void 0!==t?t:new vs({color:16777215*Math.random()})}_s.prototype=Object.assign(Object.create(bn.prototype),{constructor:_s,isLine:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;ro))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}else for(m=0,v=d.length/3-1;mo))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else if(r.isGeometry){var x=r.vertices,b=x.length;for(m=0;mo))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Ms=new zt,Ts=new zt;function Es(e,t){_s.call(this,e,t),this.type="LineSegments"}function Ss(e,t){_s.call(this,e,t),this.type="LineLoop"}function As(e){gr.call(this),this.type="PointsMaterial",this.color=new ur(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}Es.prototype=Object.assign(Object.create(_s.prototype),{constructor:Es,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;ri.far)return;a.push({distance:l,distanceToRay:Math.sqrt(s),point:c,index:t,face:null,object:o})}}function Ns(e,t,n,r,i,a,o,s,c){jt.call(this,e,t,n,r,i,a,o,s,c),this.format=void 0!==o?o:Ne,this.minFilter=void 0!==a?a:ye,this.magFilter=void 0!==i?i:ye,this.generateMipmaps=!1}function Ds(e,t,n,r,i,a,o,s,c,l,h,u){jt.call(this,null,a,o,s,c,l,r,i,h,u),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function Fs(e,t,n,r,i,a,o,s,c){jt.call(this,e,t,n,r,i,a,o,s,c),this.needsUpdate=!0}function Us(e,t,n,r,i,a,o,s,c,l){if((l=void 0!==l?l:ze)!==ze&&l!==Be)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===ze&&(n=Te),void 0===n&&l===Be&&(n=Oe),jt.call(this,null,r,i,a,o,s,l,n,c),this.image={width:e,height:t},this.magFilter=void 0!==o?o:me,this.minFilter=void 0!==s?s:me,this.flipY=!1,this.generateMipmaps=!1}function zs(e){zr.call(this),this.type="WireframeGeometry";var t,n,r,i,a,o,s,c,l,h,u=[],p=[0,0],d={},f=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,r=m.length;t=0?(e(v-1e-5,m,u),p.subVectors(h,u)):(e(v+1e-5,m,u),p.subVectors(u,h)),m-1e-5>=0?(e(v,m-1e-5,u),d.subVectors(h,u)):(e(v,m+1e-5,u),d.subVectors(u,h)),l.crossVectors(p,d).normalize(),s.push(l.x,l.y,l.z),c.push(v,m)}}for(r=0;r.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new Ar(i,3)),this.setAttribute("normal",new Ar(i.slice(),3)),this.setAttribute("uv",new Ar(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function Vs(e,t){li.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new js(e,t)),this.mergeVertices()}function js(e,t){Hs.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Ws(e,t){li.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Xs(e,t)),this.mergeVertices()}function Xs(e,t){Hs.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function qs(e,t){li.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ys(e,t)),this.mergeVertices()}function Ys(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];Hs.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Zs(e,t){li.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Js(e,t)),this.mergeVertices()}function Js(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];Hs.call(this,i,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Ks(e,t,n,r,i,a){li.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new Qs(e,t,n,r,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function Qs(e,t,n,r,i){zr.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},t=t||64,n=n||1,r=r||8,i=i||!1;var a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,c=new zt,l=new zt,h=new Nt,u=new zt,p=[],d=[],f=[],m=[];function v(i){u=e.getPointAt(i/t,u);var o=a.normals[i],h=a.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);l.x=v*o.x+m*h.x,l.y=v*o.y+m*h.y,l.z=v*o.z+m*h.z,l.normalize(),d.push(l.x,l.y,l.z),c.x=u.x+n*l.x,c.y=u.y+n*l.y,c.z=u.z+n*l.z,p.push(c.x,c.y,c.z)}}!function(){for(o=0;o0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Ns.prototype=Object.assign(Object.create(jt.prototype),{constructor:Ns,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),Ds.prototype=Object.create(jt.prototype),Ds.prototype.constructor=Ds,Ds.prototype.isCompressedTexture=!0,Fs.prototype=Object.create(jt.prototype),Fs.prototype.constructor=Fs,Fs.prototype.isCanvasTexture=!0,Us.prototype=Object.create(jt.prototype),Us.prototype.constructor=Us,Us.prototype.isDepthTexture=!0,zs.prototype=Object.create(zr.prototype),zs.prototype.constructor=zs,Bs.prototype=Object.create(li.prototype),Bs.prototype.constructor=Bs,Gs.prototype=Object.create(zr.prototype),Gs.prototype.constructor=Gs,ks.prototype=Object.create(li.prototype),ks.prototype.constructor=ks,Hs.prototype=Object.create(zr.prototype),Hs.prototype.constructor=Hs,Vs.prototype=Object.create(li.prototype),Vs.prototype.constructor=Vs,js.prototype=Object.create(Hs.prototype),js.prototype.constructor=js,Ws.prototype=Object.create(li.prototype),Ws.prototype.constructor=Ws,Xs.prototype=Object.create(Hs.prototype),Xs.prototype.constructor=Xs,qs.prototype=Object.create(li.prototype),qs.prototype.constructor=qs,Ys.prototype=Object.create(Hs.prototype),Ys.prototype.constructor=Ys,Zs.prototype=Object.create(li.prototype),Zs.prototype.constructor=Zs,Js.prototype=Object.create(Hs.prototype),Js.prototype.constructor=Js,Ks.prototype=Object.create(li.prototype),Ks.prototype.constructor=Ks,Qs.prototype=Object.create(zr.prototype),Qs.prototype.constructor=Qs,Qs.prototype.toJSON=function(){var e=zr.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},$s.prototype=Object.create(li.prototype),$s.prototype.constructor=$s,ec.prototype=Object.create(zr.prototype),ec.prototype.constructor=ec,tc.prototype=Object.create(li.prototype),tc.prototype.constructor=tc,nc.prototype=Object.create(zr.prototype),nc.prototype.constructor=nc;var rc=function(e,t,n){n=n||2;var r,i,a,o,s,c,l,h=t&&t.length,u=h?t[0]*n:e.length,p=ic(e,0,u,n,!0),d=[];if(!p||p.next===p.prev)return d;if(h&&(p=function(e,t,n,r){var i,a,o,s,c,l=[];for(i=0,a=t.length;i80*n){r=a=e[0],i=o=e[1];for(var f=n;fa&&(a=s),c>o&&(o=c);l=0!==(l=Math.max(a-r,o-i))?1/l:0}return oc(p,d,n,r,i,l),d};function ic(e,t,n,r,i){var a,o;if(i===function(e,t,n,r){for(var i=0,a=t,o=n-r;a0)for(a=t;a=t;a-=r)o=_c(a,e[a],e[a+1],o);return o&&yc(o,o.next)&&(Mc(o),o=o.next),o}function ac(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!yc(r,r.next)&&0!==gc(r.prev,r,r.next))r=r.next;else{if(Mc(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function oc(e,t,n,r,i,a,o){if(e){!o&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=dc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1)}(i)}(e,r,i,a);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,a?cc(e,r,i,a):sc(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),Mc(e),e=c.next,l=c.next;else if((e=c)===l){o?1===o?oc(e=lc(e,t,n),t,n,r,i,a,2):2===o&&hc(e,t,n,r,i,a):oc(ac(e),t,n,r,i,a,1);break}}}function sc(e){var t=e.prev,n=e,r=e.next;if(gc(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(mc(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&gc(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function cc(e,t,n,r){var i=e.prev,a=e,o=e.next;if(gc(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=dc(s,c,t,n,r),p=dc(l,h,t,n,r),d=e.prevZ,f=e.nextZ;d&&d.z>=u&&f&&f.z<=p;){if(d!==e.prev&&d!==e.next&&mc(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&gc(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&mc(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&gc(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&mc(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&gc(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=p;){if(f!==e.prev&&f!==e.next&&mc(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&gc(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function lc(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!yc(i,a)&&xc(i,r,r.next,a)&&bc(i,a)&&bc(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Mc(r),Mc(r.next),r=e=a),r=r.next}while(r!==e);return r}function hc(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&vc(o,s)){var c=wc(o,s);return o=ac(o,o.next),c=ac(c,c.next),oc(o,t,n,r,i,a),void oc(c,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function uc(e,t){return e.x-t.x}function pc(e,t){if(t=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x=r.x&&r.x>=h&&i!==r.x&&mc(an.x)&&bc(r,e)&&(n=r,p=c),r=r.next;return n}(e,t)){var n=wc(t,e);ac(n,n.next)}}function dc(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function fc(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function vc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&xc(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&bc(e,t)&&bc(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function gc(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function yc(e,t){return e.x===t.x&&e.y===t.y}function xc(e,t,n,r){return!!(yc(e,n)&&yc(t,r)||yc(e,r)&&yc(n,t))||gc(e,t,n)>0!=gc(e,t,r)>0&&gc(n,r,e)>0!=gc(n,r,t)>0}function bc(e,t){return gc(e.prev,e,e.next)<0?gc(e,t,e.next)>=0&&gc(e,e.prev,t)>=0:gc(e,t,e.prev)<0||gc(e,e.next,t)<0}function wc(e,t){var n=new Tc(e.i,e.x,e.y),r=new Tc(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function _c(e,t,n,r){var i=new Tc(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Mc(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Tc(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Ec={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function Ac(e,t){for(var n=0;nNumber.EPSILON){var p=Math.sqrt(h),d=Math.sqrt(c*c+l*l),f=t.x-s/p,m=t.y+o/p,v=((n.x-l/d-f)*l-(n.y+c/d-m)*c)/(o*l-s*c),g=(r=f+o*v-e.x)*r+(i=m+s*v-e.y)*i;if(g<=2)return new Nt(r,i);a=Math.sqrt(g/2)}else{var y=!1;o>Number.EPSILON?c>Number.EPSILON&&(y=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(l)&&(y=!0),y?(r=-s,i=o,a=Math.sqrt(h)):(r=o,i=s,a=Math.sqrt(h/2))}return new Nt(r/a,i/a)}for(var G=[],k=0,H=R.length,V=H-1,j=k+1;k=0;C--){for(I=C/d,N=h*Math.cos(I*Math.PI/2),O=u*Math.sin(I*Math.PI/2)+p,k=0,H=R.length;k=0;){n=k,(r=k-1)<0&&(r=e.length-1);var i=0,a=s+2*d;for(i=0;i0)&&f.push(_,M,E),(c!==n-1||l0&&g(!0),t>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new Ar(h,3)),this.setAttribute("normal",new Ar(u,3)),this.setAttribute("uv",new Ar(p,2))}function Xc(e,t,n,r,i,a,o){jc.call(this,0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function qc(e,t,n,r,i,a,o){Wc.call(this,0,e,t,n,r,i,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function Yc(e,t,n,r){li.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new Zc(e,t,n,r)),this.mergeVertices()}function Zc(e,t,n,r){zr.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,a,o=[],s=[],c=[],l=[],h=new zt,u=new Nt;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),a=0,i=3;a<=t;a++,i+=3){var p=n+a/t*r;h.x=e*Math.cos(p),h.y=e*Math.sin(p),s.push(h.x,h.y,h.z),c.push(0,0,1),u.x=(s[i]/e+1)/2,u.y=(s[i+1]/e+1)/2,l.push(u.x,u.y)}for(i=1;i<=t;i++)o.push(i,i+1,0);this.setIndex(o),this.setAttribute("position",new Ar(s,3)),this.setAttribute("normal",new Ar(c,3)),this.setAttribute("uv",new Ar(l,2))}Oc.prototype=Object.create(li.prototype),Oc.prototype.constructor=Oc,Ic.prototype=Object.create(Rc.prototype),Ic.prototype.constructor=Ic,Nc.prototype=Object.create(li.prototype),Nc.prototype.constructor=Nc,Dc.prototype=Object.create(zr.prototype),Dc.prototype.constructor=Dc,Fc.prototype=Object.create(li.prototype),Fc.prototype.constructor=Fc,Uc.prototype=Object.create(zr.prototype),Uc.prototype.constructor=Uc,zc.prototype=Object.create(li.prototype),zc.prototype.constructor=zc,Bc.prototype=Object.create(zr.prototype),Bc.prototype.constructor=Bc,Gc.prototype=Object.create(li.prototype),Gc.prototype.constructor=Gc,Gc.prototype.toJSON=function(){var e=li.prototype.toJSON.call(this);return Hc(this.parameters.shapes,e)},kc.prototype=Object.create(zr.prototype),kc.prototype.constructor=kc,kc.prototype.toJSON=function(){var e=zr.prototype.toJSON.call(this);return Hc(this.parameters.shapes,e)},Vc.prototype=Object.create(zr.prototype),Vc.prototype.constructor=Vc,jc.prototype=Object.create(li.prototype),jc.prototype.constructor=jc,Wc.prototype=Object.create(zr.prototype),Wc.prototype.constructor=Wc,Xc.prototype=Object.create(jc.prototype),Xc.prototype.constructor=Xc,qc.prototype=Object.create(Wc.prototype),qc.prototype.constructor=qc,Yc.prototype=Object.create(li.prototype),Yc.prototype.constructor=Yc,Zc.prototype=Object.create(zr.prototype),Zc.prototype.constructor=Zc;var Jc=Object.freeze({__proto__:null,WireframeGeometry:zs,ParametricGeometry:Bs,ParametricBufferGeometry:Gs,TetrahedronGeometry:Vs,TetrahedronBufferGeometry:js,OctahedronGeometry:Ws,OctahedronBufferGeometry:Xs,IcosahedronGeometry:qs,IcosahedronBufferGeometry:Ys,DodecahedronGeometry:Zs,DodecahedronBufferGeometry:Js,PolyhedronGeometry:ks,PolyhedronBufferGeometry:Hs,TubeGeometry:Ks,TubeBufferGeometry:Qs,TorusKnotGeometry:$s,TorusKnotBufferGeometry:ec,TorusGeometry:tc,TorusBufferGeometry:nc,TextGeometry:Oc,TextBufferGeometry:Ic,SphereGeometry:Nc,SphereBufferGeometry:Dc,RingGeometry:Fc,RingBufferGeometry:Uc,PlaneGeometry:Ii,PlaneBufferGeometry:Ni,LatheGeometry:zc,LatheBufferGeometry:Bc,ShapeGeometry:Gc,ShapeBufferGeometry:kc,ExtrudeGeometry:Lc,ExtrudeBufferGeometry:Rc,EdgesGeometry:Vc,ConeGeometry:Xc,ConeBufferGeometry:qc,CylinderGeometry:jc,CylinderBufferGeometry:Wc,CircleGeometry:Yc,CircleBufferGeometry:Zc,BoxGeometry:hi,BoxBufferGeometry:ui});function Kc(e){gr.call(this),this.type="ShadowMaterial",this.color=new ur(0),this.transparent=!0,this.setValues(e)}function Qc(e){gi.call(this,e),this.type="RawShaderMaterial"}function $c(e){gr.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ur(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ur(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Et,this.normalScale=new Nt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function el(e){$c.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearcoat=0,this.clearcoatRoughness=0,this.sheen=null,this.clearcoatNormalScale=new Nt(1,1),this.clearcoatNormalMap=null,this.transparency=0,this.setValues(e)}function tl(e){gr.call(this),this.type="MeshPhongMaterial",this.color=new ur(16777215),this.specular=new ur(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ur(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Et,this.normalScale=new Nt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=J,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function nl(e){tl.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function rl(e){gr.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Et,this.normalScale=new Nt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function il(e){gr.call(this),this.type="MeshLambertMaterial",this.color=new ur(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ur(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=J,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function al(e){gr.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ur(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Et,this.normalScale=new Nt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function ol(e){vs.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Kc.prototype=Object.create(gr.prototype),Kc.prototype.constructor=Kc,Kc.prototype.isShadowMaterial=!0,Kc.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.color.copy(e.color),this},Qc.prototype=Object.create(gi.prototype),Qc.prototype.constructor=Qc,Qc.prototype.isRawShaderMaterial=!0,$c.prototype=Object.create(gr.prototype),$c.prototype.constructor=$c,$c.prototype.isMeshStandardMaterial=!0,$c.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},el.prototype=Object.create($c.prototype),el.prototype.constructor=el,el.prototype.isMeshPhysicalMaterial=!0,el.prototype.copy=function(e){return $c.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearcoat=e.clearcoat,this.clearcoatRoughness=e.clearcoatRoughness,e.sheen?this.sheen=(this.sheen||new ur).copy(e.sheen):this.sheen=null,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.transparency=e.transparency,this},tl.prototype=Object.create(gr.prototype),tl.prototype.constructor=tl,tl.prototype.isMeshPhongMaterial=!0,tl.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},nl.prototype=Object.create(tl.prototype),nl.prototype.constructor=nl,nl.prototype.isMeshToonMaterial=!0,nl.prototype.copy=function(e){return tl.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},rl.prototype=Object.create(gr.prototype),rl.prototype.constructor=rl,rl.prototype.isMeshNormalMaterial=!0,rl.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},il.prototype=Object.create(gr.prototype),il.prototype.constructor=il,il.prototype.isMeshLambertMaterial=!0,il.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},al.prototype=Object.create(gr.prototype),al.prototype.constructor=al,al.prototype.isMeshMatcapMaterial=!0,al.prototype.copy=function(e){return gr.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},ol.prototype=Object.create(vs.prototype),ol.prototype.constructor=ol,ol.prototype.isLineDashedMaterial=!0,ol.prototype.copy=function(e){return vs.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var sl=Object.freeze({__proto__:null,ShadowMaterial:Kc,SpriteMaterial:Ho,RawShaderMaterial:Qc,ShaderMaterial:gi,PointsMaterial:As,MeshPhysicalMaterial:el,MeshStandardMaterial:$c,MeshPhongMaterial:tl,MeshToonMaterial:nl,MeshNormalMaterial:rl,MeshLambertMaterial:il,MeshDepthMaterial:xo,MeshDistanceMaterial:bo,MeshBasicMaterial:yr,MeshMatcapMaterial:al,LineDashedMaterial:ol,LineBasicMaterial:vs,Material:gr}),cl={arraySlice:function(e,t,n){return cl.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),a=0,o=0;o!==r;++a)for(var s=n[a]*t,c=0;c!==t;++c)i[o++]=e[s+c];return i},flattenJSON:function(e,t,n,r){for(var i=1,a=e[0];void 0!==a&&void 0===a[r];)a=e[i++];if(void 0!==a){var o=a[r];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[r])&&(t.push(a.time),n.push.apply(n,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[r])&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{void 0!==(o=a[r])&&(t.push(a.time),n.push(o)),a=e[i++]}while(void 0!==a)}},subclip:function(e,t,n,r,i){i=i||30;var a=e.clone();a.name=t;for(var o=[],s=0;s=r)){h.push(c.times[p]);for(var f=0;fa.tracks[s].times[0]&&(m=a.tracks[s].times[0]);for(s=0;s=i)break e;var s=t[1];e=(i=t[--n-1]))break t}a=n,n=0}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=cl.arraySlice(n,i,a),this.values=cl.arraySlice(this.values,i*o,a*o)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==r&&cl.isTypedArray(r)){o=0;for(var c=r.length;o!==c;++o){var l=r[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=2302===this.getInterpolation(),i=1,a=e.length-1,o=1;o0){e[i]=e[a];for(f=a*n,m=i*n,p=0;p!==n;++p)t[m+p]=t[f+p];++i}return i!==e.length&&(this.times=cl.arraySlice(e,0,i),this.values=cl.arraySlice(t,0,i*n)),this},clone:function(){var e=cl.arraySlice(this.times,0),t=cl.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),fl.prototype=Object.assign(Object.create(dl.prototype),{constructor:fl,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ml.prototype=Object.assign(Object.create(dl.prototype),{constructor:ml,ValueTypeName:"color"}),vl.prototype=Object.assign(Object.create(dl.prototype),{constructor:vl,ValueTypeName:"number"}),gl.prototype=Object.assign(Object.create(ll.prototype),{constructor:gl,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=(n-t)/(r-t),l=s+o;s!==l;s+=4)Dt.slerpFlat(i,0,a,s-o,a,s,c);return i}}),yl.prototype=Object.assign(Object.create(dl.prototype),{constructor:yl,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new gl(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),xl.prototype=Object.assign(Object.create(dl.prototype),{constructor:xl,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),bl.prototype=Object.assign(Object.create(dl.prototype),{constructor:bl,ValueTypeName:"vector"}),Object.assign(wl,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,a=n.length;i!==a;++i)t.push(_l(n[i]).scale(r));return new wl(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},i=0,a=n.length;i!==a;++i)t.push(dl.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,a=[],o=0;o1){var l=r[u=c[1]];l||(r[u]=l=[]),l.push(s)}}var h=[];for(var u in r)h.push(wl.CreateFromMorphTargetSequence(u,r[u],t,n));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var a=[],o=[];cl.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],c=0;c0||0===e.search(/^data\:image\/jpeg/);i.format=r?Ne:De,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(Dl.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)a+=(t=this.getPoint(n/e)).distanceTo(i),r.push(a),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(o>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(a-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(a-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,a=new zt,o=[],s=[],c=[],l=new zt,h=new tn;for(n=0;n<=e;n++)r=n/e,o[n]=this.getTangentAt(r),o[n].normalize();s[0]=new zt,c[0]=new zt;var u=Number.MAX_VALUE,p=Math.abs(o[0].x),d=Math.abs(o[0].y),f=Math.abs(o[0].z);for(p<=u&&(u=p,a.set(1,0,0)),d<=u&&(u=d,a.set(0,1,0)),f<=u&&a.set(0,0,1),l.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],l),c[0].crossVectors(o[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(o[n-1],o[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(It.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(h.makeRotationAxis(l,i))),c[n].crossVectors(o[n],s[n]);if(!0===t)for(i=Math.acos(It.clamp(s[0].dot(s[e]),-1,1)),i/=e,o[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(h.makeRotationAxis(o[n],i*n)),c[n].crossVectors(o[n],s[n]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),Fl.prototype=Object.create(Dl.prototype),Fl.prototype.constructor=Fl,Fl.prototype.isEllipseCurve=!0,Fl.prototype.getPoint=function(e,t){for(var n=t||new Nt,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(h)/c)+1)*c:0===u&&h===c-1&&(h=c-2,u=1),this.closed||h>0?n=s[(h-1)%c]:(Bl.subVectors(s[0],s[1]).add(s[0]),n=Bl),r=s[h%c],i=s[(h+1)%c],this.closed||h+2r.length-2?r.length-1:a+1],h=r[a>r.length-3?r.length-1:a+2];return n.set(jl(o,s.x,c.x,l.x,h.x),jl(o,s.y,c.y,l.y,h.y)),n},$l.prototype.copy=function(e){Dl.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){Dl.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var h=c.getPoint(1);return this.currentPoint.copy(h),this},copy:function(e){return th.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=th.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return th.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),rh.prototype=Object.assign(Object.create(nh.prototype),{constructor:rh,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n0){var a=new Ol(new Tl(t));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o0?new os(o,s):new ni(o,s);break;case"InstancedMesh":o=i(e.geometry),s=a(e.material);var c=e.count,l=e.instanceMatrix;(r=new ms(o,s,c)).instanceMatrix=new xr(new Float32Array(l.array),16);break;case"LOD":r=new as;break;case"Line":r=new _s(i(e.geometry),a(e.material),e.mode);break;case"LineLoop":r=new Ss(i(e.geometry),a(e.material));break;case"LineSegments":r=new Es(i(e.geometry),a(e.material));break;case"PointCloud":case"Points":r=new Os(i(e.geometry),a(e.material));break;case"Sprite":r=new ts(a(e.material));break;case"Group":r=new Ro;break;default:r=new bn}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(r.matrixAutoUpdate=e.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.layers&&(r.layers.mask=e.layers),void 0!==e.drawMode&&r.setDrawMode(e.drawMode),void 0!==e.children)for(var h=e.children,u=0;uNumber.EPSILON){if(l<0&&(o=t[a],c=-c,s=t[i],l=-l),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=l*(e.x-o.x)-c*(e.y-o.y);if(0===h)return!0;if(h<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return r}var i=Ec.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,c,l=[];if(1===a.length)return s=a[0],(c=new rh).curves=s.curves,l.push(c),l;var h=!i(a[0].getPoints());h=e?!h:h;var u,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=a.length;g1){for(var x=!1,b=[],w=0,_=f.length;w<_;w++)d[w]=[];for(w=0,_=f.length;w<_;w++)for(var M=m[w],T=0;T0&&(x||(m=d))}g=0;for(var L=f.length;g0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e=.5)for(var a=0;a!==i;++a)e[t+a]=e[n+a]},_slerp:function(e,t,n,r){Dt.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var a=1-r,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*r}}});var eu=new RegExp("[\\[\\]\\.:\\/]","g"),tu="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",nu=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),ru=/(WCOD+)?/.source.replace("WCOD",tu),iu=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),au=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ou=new RegExp("^"+nu+ru+iu+au+"$"),su=["material","materials","bones"];function cu(e,t,n){var r=n||lu.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function lu(e,t,n){this.path=t,this.parsedPath=n||lu.parseTrackName(t),this.node=lu.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function hu(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,a=new Array(i),o={endingStart:ut,endingEnd:ut},s=0;s!==i;++s){var c=r[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=ht,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function uu(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function pu(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function du(e,t,n){Go.call(this,e,t),this.meshPerAttribute=n||1}function fu(e,t){return e.distance-t.distance}function mu(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var i=e.children,a=0,o=i.length;a=t){var h=t++,u=e[h];n[u.uuid]=l,e[l]=u,n[c]=h,e[h]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[h],v=f[l];f[l]=m,f[h]=v}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],l=c.uuid,h=r[l];if(void 0!==h)if(delete r[l],h0)for(var c=this._interpolants,l=this._propertyBindings,h=0,u=c.length;h!==u;++h)c[h].evaluate(o),l[h].accumulate(r,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,r=this.loop,i=this._loopCount,a=2202===r;if(0===e)return-1===i?t:a&&1==(1&i)?n-t:t;if(2200===r){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&1==(1&i))return n-t}return t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:ut:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:ut:2402)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}),uu.prototype=Object.assign(Object.create(Pt.prototype),{constructor:uu,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var h=0;h!==i;++h){var u=r[h],p=u.name,d=l[p];if(void 0!==d)a[h]=d;else{if(void 0!==(d=a[h])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=t&&t._propertyBindings[h].binding.parsedPath;++(d=new $h(lu.create(n,p,f),u.ValueTypeName,u.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),a[h]=d}o[h].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&tthis.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Nt),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Nt),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return gu.copy(e).clamp(this.min,this.max).sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var xu=new zt,bu=new zt;function wu(e,t){this.start=void 0!==e?e:new zt,this.end=void 0!==t?t:new zt}function _u(e){bn.call(this),this.material=e,this.render=function(){}}Object.assign(wu.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new zt),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new zt),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new zt),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){xu.subVectors(e,this.start),bu.subVectors(this.end,this.start);var n=bu.dot(bu),r=bu.dot(xu)/n;return t&&(r=It.clamp(r,0,1)),r},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new zt),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),_u.prototype=Object.create(bn.prototype),_u.prototype.constructor=_u,_u.prototype.isImmediateRenderObject=!0;var Mu=new zt,Tu=new zt,Eu=new kt,Su=["a","b","c"];function Au(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,a=void 0!==r?r:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new zr,l=new Ar(2*o*3,3);c.setAttribute("position",l),Es.call(this,c,new vs({color:i,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}Au.prototype=Object.create(Es.prototype),Au.prototype.constructor=Au,Au.prototype.update=function(){this.object.updateMatrixWorld(!0),Eu.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,i=n.faces,a=0,o=0,s=i.length;o1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},Du.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()};var Fu=new zt,Uu=new ur,zu=new ur;function Bu(e,t,n){bn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new Xs(t);r.rotateY(.5*Math.PI),this.material=new yr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=x);var i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new xr(a,3)),this.add(new ni(r,this.material)),this.update()}function Gu(e,t){this.lightProbe=e,this.size=t;var n={GAMMA_OUTPUT:""},r=new gi({defines:n,uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","vec3 linearToOutput( in vec3 a ) {","\t#ifdef GAMMA_OUTPUT","\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );","\t#else","\t\treturn a;","\t#endif","}","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\toutgoingLight = linearToOutput( outgoingLight );","\tgl_FragColor = vec4( outgoingLight, 1.0 );","}"].join("\n")}),i=new Dc(1,32,16);ni.call(this,i,r),this.onBeforeRender()}function ku(e,t,n,r){e=e||10,t=t||10,n=new ur(void 0!==n?n:4473924),r=new ur(void 0!==r?r:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],c=[],l=0,h=0,u=-o;l<=t;l++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var p=l===i?n:r;p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3}var d=new zr;d.setAttribute("position",new Ar(s,3)),d.setAttribute("color",new Ar(c,3));var f=new vs({vertexColors:x});Es.call(this,d,f)}function Hu(e,t,n,r,i,a){e=e||10,t=t||16,n=n||8,r=r||64,i=new ur(void 0!==i?i:4473924),a=new ur(void 0!==a?a:8947848);var o,s,c,l,h,u,p,d=[],f=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),o=Math.sin(c)*e,s=Math.cos(c)*e,d.push(0,0,0),d.push(o,0,s),p=1&l?i:a,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(l=0;l<=n;l++)for(p=1&l?i:a,u=e-e/n*l,h=0;h.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{cp.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(cp,t)}},lp.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},lp.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},lp.prototype.copy=function(e){return bn.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},lp.prototype.clone=function(){return(new this.constructor).copy(this)},hp.prototype=Object.create(Es.prototype),hp.prototype.constructor=hp;function up(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Vl.call(this,e),this.type="catmullrom"}Dl.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Dl.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(th.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new li,n=0,r=e.length;nm||8*(1-c.dot(l.object.quaternion))>m)&&(l.dispatchEvent(h),a.copy(l.object.position),c.copy(l.object.quaternion),b=!1,!0)}),this.dispose=function(){l.domElement.removeEventListener("contextmenu",te,!1),l.domElement.removeEventListener("mousedown",q,!1),l.domElement.removeEventListener("wheel",J,!1),l.domElement.removeEventListener("touchstart",Q,!1),l.domElement.removeEventListener("touchend",ee,!1),l.domElement.removeEventListener("touchmove",$,!1),document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",Z,!1),l.domElement.removeEventListener("keydown",K,!1)};var l=this,h={type:"change"},u={type:"start"},p={type:"end"},d={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},f=d.NONE,m=1e-6,v=new vu,g=new vu,y=1,x=new zt,b=!1,w=new Nt,_=new Nt,M=new Nt,T=new Nt,E=new Nt,S=new Nt,A=new Nt,L=new Nt,R=new Nt;function P(){return Math.pow(.95,l.zoomSpeed)}function C(e){g.theta-=e}function O(e){g.phi-=e}var I,N=(I=new zt,function(e,t){I.setFromMatrixColumn(t,0),I.multiplyScalar(-e),x.add(I)}),D=function(){var e=new zt;return function(t,n){!0===l.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(l.object.up,e)),e.multiplyScalar(t),x.add(e)}}(),F=function(){var e=new zt;return function(t,n){var r=l.domElement;if(l.object.isPerspectiveCamera){var i=l.object.position;e.copy(i).sub(l.target);var a=e.length();a*=Math.tan(l.object.fov/2*Math.PI/180),N(2*t*a/r.clientHeight,l.object.matrix),D(2*n*a/r.clientHeight,l.object.matrix)}else l.object.isOrthographicCamera?(N(t*(l.object.right-l.object.left)/l.object.zoom/r.clientWidth,l.object.matrix),D(n*(l.object.top-l.object.bottom)/l.object.zoom/r.clientHeight,l.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),l.enablePan=!1)}}();function U(e){l.object.isPerspectiveCamera?y/=e:l.object.isOrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom*e)),l.object.updateProjectionMatrix(),b=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function z(e){l.object.isPerspectiveCamera?y*=e:l.object.isOrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom/e)),l.object.updateProjectionMatrix(),b=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function B(e){w.set(e.clientX,e.clientY)}function G(e){T.set(e.clientX,e.clientY)}function k(e){if(1==e.touches.length)w.set(e.touches[0].pageX,e.touches[0].pageY);else{var t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);w.set(t,n)}}function H(e){if(1==e.touches.length)T.set(e.touches[0].pageX,e.touches[0].pageY);else{var t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);T.set(t,n)}}function V(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);A.set(0,r)}function j(e){if(1==e.touches.length)_.set(e.touches[0].pageX,e.touches[0].pageY);else{var t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);_.set(t,n)}M.subVectors(_,w).multiplyScalar(l.rotateSpeed);var r=l.domElement;C(2*Math.PI*M.x/r.clientHeight),O(2*Math.PI*M.y/r.clientHeight),w.copy(_)}function W(e){if(1==e.touches.length)E.set(e.touches[0].pageX,e.touches[0].pageY);else{var t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);E.set(t,n)}S.subVectors(E,T).multiplyScalar(l.panSpeed),F(S.x,S.y),T.copy(E)}function X(e){var t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);L.set(0,r),R.set(0,Math.pow(L.y/A.y,l.zoomSpeed)),U(R.y),A.copy(L)}function q(e){if(!1!==l.enabled){switch(e.preventDefault(),l.domElement.focus?l.domElement.focus():window.focus(),e.button){case 0:switch(l.mouseButtons.LEFT){case o.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===l.enablePan)return;G(e),f=d.PAN}else{if(!1===l.enableRotate)return;B(e),f=d.ROTATE}break;case o.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===l.enableRotate)return;B(e),f=d.ROTATE}else{if(!1===l.enablePan)return;G(e),f=d.PAN}break;default:f=d.NONE}break;case 1:switch(l.mouseButtons.MIDDLE){case o.DOLLY:if(!1===l.enableZoom)return;!function(e){A.set(e.clientX,e.clientY)}(e),f=d.DOLLY;break;default:f=d.NONE}break;case 2:switch(l.mouseButtons.RIGHT){case o.ROTATE:if(!1===l.enableRotate)return;B(e),f=d.ROTATE;break;case o.PAN:if(!1===l.enablePan)return;G(e),f=d.PAN;break;default:f=d.NONE}}f!==d.NONE&&(document.addEventListener("mousemove",Y,!1),document.addEventListener("mouseup",Z,!1),l.dispatchEvent(u))}}function Y(e){if(!1!==l.enabled)switch(e.preventDefault(),f){case d.ROTATE:if(!1===l.enableRotate)return;!function(e){_.set(e.clientX,e.clientY),M.subVectors(_,w).multiplyScalar(l.rotateSpeed);var t=l.domElement;C(2*Math.PI*M.x/t.clientHeight),O(2*Math.PI*M.y/t.clientHeight),w.copy(_),l.update()}(e);break;case d.DOLLY:if(!1===l.enableZoom)return;!function(e){L.set(e.clientX,e.clientY),R.subVectors(L,A),R.y>0?U(P()):R.y<0&&z(P()),A.copy(L),l.update()}(e);break;case d.PAN:if(!1===l.enablePan)return;!function(e){E.set(e.clientX,e.clientY),S.subVectors(E,T).multiplyScalar(l.panSpeed),F(S.x,S.y),T.copy(E),l.update()}(e)}}function Z(e){!1!==l.enabled&&(document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",Z,!1),l.dispatchEvent(p),f=d.NONE)}function J(e){!1===l.enabled||!1===l.enableZoom||f!==d.NONE&&f!==d.ROTATE||(e.preventDefault(),e.stopPropagation(),l.dispatchEvent(u),function(e){e.deltaY<0?z(P()):e.deltaY>0&&U(P()),l.update()}(e),l.dispatchEvent(p))}function K(e){!1!==l.enabled&&!1!==l.enableKeys&&!1!==l.enablePan&&function(e){var t=!1;switch(e.keyCode){case l.keys.UP:F(0,l.keyPanSpeed),t=!0;break;case l.keys.BOTTOM:F(0,-l.keyPanSpeed),t=!0;break;case l.keys.LEFT:F(l.keyPanSpeed,0),t=!0;break;case l.keys.RIGHT:F(-l.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),l.update())}(e)}function Q(e){if(!1!==l.enabled){switch(e.preventDefault(),e.touches.length){case 1:switch(l.touches.ONE){case s.ROTATE:if(!1===l.enableRotate)return;k(e),f=d.TOUCH_ROTATE;break;case s.PAN:if(!1===l.enablePan)return;H(e),f=d.TOUCH_PAN;break;default:f=d.NONE}break;case 2:switch(l.touches.TWO){case s.DOLLY_PAN:if(!1===l.enableZoom&&!1===l.enablePan)return;!function(e){l.enableZoom&&V(e),l.enablePan&&H(e)}(e),f=d.TOUCH_DOLLY_PAN;break;case s.DOLLY_ROTATE:if(!1===l.enableZoom&&!1===l.enableRotate)return;!function(e){l.enableZoom&&V(e),l.enableRotate&&k(e)}(e),f=d.TOUCH_DOLLY_ROTATE;break;default:f=d.NONE}break;default:f=d.NONE}f!==d.NONE&&l.dispatchEvent(u)}}function $(e){if(!1!==l.enabled)switch(e.preventDefault(),e.stopPropagation(),f){case d.TOUCH_ROTATE:if(!1===l.enableRotate)return;j(e),l.update();break;case d.TOUCH_PAN:if(!1===l.enablePan)return;W(e),l.update();break;case d.TOUCH_DOLLY_PAN:if(!1===l.enableZoom&&!1===l.enablePan)return;!function(e){l.enableZoom&&X(e),l.enablePan&&W(e)}(e),l.update();break;case d.TOUCH_DOLLY_ROTATE:if(!1===l.enableZoom&&!1===l.enableRotate)return;!function(e){l.enableZoom&&X(e),l.enableRotate&&j(e)}(e),l.update();break;default:f=d.NONE}}function ee(e){!1!==l.enabled&&(l.dispatchEvent(p),f=d.NONE)}function te(e){!1!==l.enabled&&e.preventDefault()}l.domElement.addEventListener("contextmenu",te,!1),l.domElement.addEventListener("mousedown",q,!1),l.domElement.addEventListener("wheel",J,!1),l.domElement.addEventListener("touchstart",Q,!1),l.domElement.addEventListener("touchend",ee,!1),l.domElement.addEventListener("touchmove",$,!1),l.domElement.addEventListener("keydown",K,!1),-1===l.domElement.tabIndex&&(l.domElement.tabIndex=0),this.update()};(pp.prototype=Object.create(Pt.prototype)).constructor=pp;var dp=function(e,t){pp.call(this,e,t),this.mouseButtons.LEFT=o.PAN,this.mouseButtons.RIGHT=o.ROTATE,this.touches.ONE=s.PAN,this.touches.TWO=s.DOLLY_ROTATE};(dp.prototype=Object.create(Pt.prototype)).constructor=dp;var fp,mp,vp,gp,yp,xp,bp,wp,_p,Mp,Tp,Ep,Sp,Ap,Lp,Rp,Pp,Cp=function(e){Sl.call(this,e)};Cp.prototype=Object.assign(Object.create(Sl.prototype),{constructor:Cp,load:function(e,t,n,r){var i=this,a=new Ll(i.manager);a.setPath(i.path),a.load(e,(function(e){t(i.parse(e))}),n,r)},parse:function(e){function t(e,t,r,i,a,o,s,c){i=i*Math.PI/180,t=Math.abs(t),r=Math.abs(r);var l=(s.x-c.x)/2,h=(s.y-c.y)/2,u=Math.cos(i)*l+Math.sin(i)*h,p=-Math.sin(i)*l+Math.cos(i)*h,d=t*t,f=r*r,m=u*u,v=p*p,g=m/d+v/f;if(g>1){var y=Math.sqrt(g);d=(t*=y)*t,f=(r*=y)*r}var x=d*v+f*m,b=(d*f-x)/x,w=Math.sqrt(Math.max(0,b));a===o&&(w=-w);var _=w*t*p/r,M=-w*r*u/t,T=Math.cos(i)*_-Math.sin(i)*M+(s.x+c.x)/2,E=Math.sin(i)*_+Math.cos(i)*M+(s.y+c.y)/2,S=n(1,0,(u-_)/t,(p-M)/r),A=n((u-_)/t,(p-M)/r,(-u-_)/t,(-p-M)/r)%(2*Math.PI);e.currentPath.absellipse(T,E,t,r,S,S+A,0===o,i)}function n(e,t,n,r){var i=e*n+t*r,a=Math.sqrt(e*e+t*t)*Math.sqrt(n*n+r*r),o=Math.acos(Math.max(-1,Math.min(1,i/a)));return e*r-t*n<0&&(o=-o),o}function r(e,t){function n(n,r,i){void 0===i&&(i=function(e){return e}),e.hasAttribute(n)&&(t[r]=i(e.getAttribute(n))),""!==e.style[n]&&(t[r]=i(e.style[n]))}function r(e){return Math.max(0,Math.min(1,parseFloat(e)))}function i(e){return Math.max(0,parseFloat(e))}return t=Object.assign({},t),n("fill","fill"),n("fill-opacity","fillOpacity",r),n("stroke","stroke"),n("stroke-opacity","strokeOpacity",r),n("stroke-width","strokeWidth",i),n("stroke-linejoin","strokeLineJoin"),n("stroke-linecap","strokeLineCap"),n("stroke-miterlimit","strokeMiterLimit",i),t}function i(e,t){return e-(t-e)}function a(e){for(var t=e.split(/[\s,]+|(?=\s?[+\-])/),n=0;n=0;i--){var o=r[i].trim();if(""!==o){var s=o.indexOf("("),c=o.length;if(s>0&&s=1){var m=f[0],v=m;f.length>=2&&(v=f[1]),n.translate(m,v)}break;case"rotate":if(f.length>=1){var g,y=0,x=0;g=-f[0]*Math.PI/180,f.length>=3&&(y=f[1],x=f[2]),u.identity().translate(-y,-x),p.identity().rotate(g),d.multiplyMatrices(p,u),u.identity().translate(y,x),n.multiplyMatrices(u,d)}break;case"scale":if(f.length>=1){var b=f[0],w=b;f.length>=2&&(w=f[1]),n.scale(b,w)}break;case"skewX":1===f.length&&n.set(1,Math.tan(f[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":1===f.length&&n.set(1,0,0,Math.tan(f[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":6===f.length&&n.set(f[0],f[2],f[4],f[1],f[3],f[5],0,0,1)}}t.premultiply(n)}}return t}(e);l.length>0&&t.premultiply(l[l.length-1]);return v.copy(t),l.push(t),t}(n),x=null;switch(n.nodeName){case"svg":break;case"g":g=r(n,g);break;case"path":g=r(n,g),n.hasAttribute("d")&&(x=function(e){for(var n=new Lh,r=new Nt,o=new Nt,s=new Nt,c=!0,l=!1,h=e.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi),u=0,p=h.length;u0&&(r.copy(s),n.currentPath.currentPoint.copy(r),c=!0);break;default:console.warn(d)}l=!1}return n}(n));break;case"rect":g=r(n,g),x=function(e){var t=parseFloat(e.getAttribute("x")||0),n=parseFloat(e.getAttribute("y")||0),r=parseFloat(e.getAttribute("rx")||0),i=parseFloat(e.getAttribute("ry")||0),a=parseFloat(e.getAttribute("width")),o=parseFloat(e.getAttribute("height")),s=new Lh;s.moveTo(t+2*r,n),s.lineTo(t+a-2*r,n),(0!==r||0!==i)&&s.bezierCurveTo(t+a,n,t+a,n,t+a,n+2*i);s.lineTo(t+a,n+o-2*i),(0!==r||0!==i)&&s.bezierCurveTo(t+a,n+o,t+a,n+o,t+a-2*r,n+o);s.lineTo(t+2*r,n+o),(0!==r||0!==i)&&s.bezierCurveTo(t,n+o,t,n+o,t,n+o-2*i);s.lineTo(t,n+2*i),(0!==r||0!==i)&&s.bezierCurveTo(t,n,t,n,t+2*r,n);return s}(n);break;case"polygon":g=r(n,g),x=function(e){var t=new Lh,n=0;return e.getAttribute("points").replace(/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,(function(e,r,i){var a=parseFloat(r),o=parseFloat(i);0===n?t.moveTo(a,o):t.lineTo(a,o);n++})),t.currentPath.autoClose=!0,t}(n);break;case"polyline":g=r(n,g),x=function(e){var t=new Lh,n=0;return e.getAttribute("points").replace(/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,(function(e,r,i){var a=parseFloat(r),o=parseFloat(i);0===n?t.moveTo(a,o):t.lineTo(a,o);n++})),t.currentPath.autoClose=!1,t}(n);break;case"circle":g=r(n,g),x=function(e){var t=parseFloat(e.getAttribute("cx")),n=parseFloat(e.getAttribute("cy")),r=parseFloat(e.getAttribute("r")),i=new nh;i.absarc(t,n,r,0,2*Math.PI);var a=new Lh;return a.subPaths.push(i),a}(n);break;case"ellipse":g=r(n,g),x=function(e){var t=parseFloat(e.getAttribute("cx")),n=parseFloat(e.getAttribute("cy")),r=parseFloat(e.getAttribute("rx")),i=parseFloat(e.getAttribute("ry")),a=new nh;a.absellipse(t,n,r,i,0,2*Math.PI);var o=new Lh;return o.subPaths.push(a),o}(n);break;case"line":g=r(n,g),x=function(e){var t=parseFloat(e.getAttribute("x1")),n=parseFloat(e.getAttribute("y1")),r=parseFloat(e.getAttribute("x2")),i=parseFloat(e.getAttribute("y2")),a=new Lh;return a.moveTo(t,n),a.lineTo(r,i),a.currentPath.autoClose=!1,a}(n);break;default:console.log(n)}x&&(void 0!==g.fill&&"none"!==g.fill&&x.color.setStyle(g.fill),function(e,t){function n(e){m.set(e.x,e.y,1).applyMatrix3(t),e.set(m.x,m.y)}for(var r=function(e){return 0!==e.elements[1]||0!==e.elements[3]}(t),i=e.subPaths,a=0,c=i.length;a0?v.copy(l[l.length-1]):v.identity())}}(g.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4});var y={paths:c,xml:g.documentElement};return console.timeEnd("THREE.SVGLoader: Parse"),y}}),Cp.getStrokeStyle=function(e,t,n,r,i){return{strokeColor:t=void 0!==t?t:"#000",strokeWidth:e=void 0!==e?e:1,strokeLineJoin:n=void 0!==n?n:"miter",strokeLineCap:r=void 0!==r?r:"butt",strokeMiterLimit:i=void 0!==i?i:4}},Cp.pointsToStroke=function(e,t,n,r){var i=[],a=[],o=[];if(0===Cp.pointsToStrokeWithBuffers(e,t,n,r,i,a,o))return null;var s=new zr;return s.setAttribute("position",new Ar(i,3)),s.setAttribute("normal",new Ar(a,3)),s.setAttribute("uv",new Ar(o,2)),s},Cp.pointsToStrokeWithBuffers=(fp=new Nt,mp=new Nt,vp=new Nt,gp=new Nt,yp=new Nt,xp=new Nt,bp=new Nt,wp=new Nt,_p=new Nt,Mp=new Nt,Tp=new Nt,Ep=new Nt,Sp=new Nt,Ap=new Nt,Lp=new Nt,Rp=new Nt,Pp=new Nt,function(e,t,n,r,i,a,o,s){n=void 0!==n?n:12,r=void 0!==r?r:.001,s=void 0!==s?s:0;var c=(e=function(e){for(var t=!1,n=1,i=e.length-1;n=r&&a.push(e[n]);return a.push(e[e.length-1]),a}(e)).length;if(c<2)return 0;var l,h,u,p,d,f=e[0].equals(e[c-1]),m=e[0],v=t.strokeWidth/2,g=1/(c-1),y=0,x=!1,b=0,w=3*s,_=2*s;N(e[0],e[1],fp).multiplyScalar(v),wp.copy(e[0]).sub(fp),_p.copy(e[0]).add(fp),Mp.copy(wp),Tp.copy(_p);for(var M=1;M0?n(e[0]):i()})).catch(i),o;var s=document.createElement("a");return s.href="https://immersive-web.github.io/webxr/",s.innerHTML="WEBXR NOT SUPPORTED",s.style.left="calc(50% - 90px)",s.style.width="180px",s.style.textDecoration="none",a(s),s}},Ip=(n(3),0),Np=1,Dp=2,Fp=1,Up=2,zp=3,Bp=0,Gp=1,kp=2,Hp=0,Vp=1,jp=2,Wp=0,Xp=1,qp=2,Yp=3,Zp=4,Jp=5,Kp=100,Qp=101,$p=102,ed=103,td=104,nd=200,rd=201,id=202,ad=203,od=204,sd=205,cd=206,ld=207,hd=208,ud=209,pd=210,dd=0,fd=1,md=2,vd=3,gd=4,yd=5,xd=6,bd=7,wd=0,_d=1,Md=2,Td=0,Ed=1,Sd=2,Ad=3,Ld=4,Rd=5,Pd=301,Cd=302,Od=303,Id=304,Nd=305,Dd=306,Fd=307,Ud=1e3,zd=1001,Bd=1002,Gd=1003,kd=1004,Hd=1005,Vd=1006,jd=1007,Wd=1008,Xd=1009,qd=1010,Yd=1011,Zd=1012,Jd=1013,Kd=1014,Qd=1015,$d=1016,ef=1017,tf=1018,nf=1019,rf=1020,af=1021,of=1022,sf=1023,cf=1024,lf=1025,hf=1026,uf=1027,pf=1028,df=33776,ff=33777,mf=33778,vf=33779,gf=35840,yf=35841,xf=35842,bf=35843,wf=36196,_f=37808,Mf=37809,Tf=37810,Ef=37811,Sf=37812,Af=37813,Lf=37814,Rf=37815,Pf=37816,Cf=37817,Of=37818,If=37819,Nf=37820,Df=37821,Ff=2201,Uf=2400,zf=0,Bf=1,Gf=2,kf=3e3,Hf=3001,Vf=3007,jf=3002,Wf=3003,Xf=3004,qf=3005,Yf=3006,Zf=3200,Jf=3201,Kf=0,Qf=1,$f=7680,em=519,tm=35044;function nm(){}Object.assign(nm.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var n=this._listeners[e];if(void 0!==n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var n=t.slice(0),r=0,i=n.length;r>8&255]+rm[e>>16&255]+rm[e>>24&255]+"-"+rm[255&t]+rm[t>>8&255]+"-"+rm[t>>16&15|64]+rm[t>>24&255]+"-"+rm[63&n|128]+rm[n>>8&255]+"-"+rm[n>>16&255]+rm[n>>24&255]+rm[255&r]+rm[r>>8&255]+rm[r>>16&255]+rm[r>>24&255]).toUpperCase()},clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},lerp:function(e,t,n){return(1-n)*e+n*t},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*am.DEG2RAD},radToDeg:function(e){return e*am.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function om(e,t){this.x=e||0,this.y=t||0}function sm(e,t,n,r){this._x=e||0,this._y=t||0,this._z=n||0,this._w=void 0!==r?r:1}Object.defineProperties(om.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(om.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},cross:function(e){return this.x*e.y-this.y*e.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}}),Object.assign(sm,{slerp:function(e,t,n,r){return n.copy(e).slerp(t,r)},slerpFlat:function(e,t,n,r,i,a,o){var s=n[r+0],c=n[r+1],l=n[r+2],h=n[r+3],u=i[a+0],p=i[a+1],d=i[a+2],f=i[a+3];if(h!==f||s!==u||c!==p||l!==d){var m=1-o,v=s*u+c*p+l*d+h*f,g=v>=0?1:-1,y=1-v*v;if(y>Number.EPSILON){var x=Math.sqrt(y),b=Math.atan2(x,v*g);m=Math.sin(m*b)/x,o=Math.sin(o*b)/x}var w=o*g;if(s=s*m+u*w,c=c*m+p*w,l=l*m+d*w,h=h*m+f*w,m===1-o){var _=1/Math.sqrt(s*s+c*c+l*l+h*h);s*=_,c*=_,l*=_,h*=_}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=h}}),Object.defineProperties(sm.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}}),Object.assign(sm.prototype,{isQuaternion:!0,set:function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var n=e._x,r=e._y,i=e._z,a=e.order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),h=o(i/2),u=s(n/2),p=s(r/2),d=s(i/2);return"XYZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"YXZ"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"ZXY"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h-u*p*d):"ZYX"===a?(this._x=u*l*h-c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h+u*p*d):"YZX"===a?(this._x=u*l*h+c*p*d,this._y=c*p*h+u*l*d,this._z=c*l*d-u*p*h,this._w=c*l*h-u*p*d):"XZY"===a&&(this._x=u*l*h-c*p*d,this._y=c*p*h-u*l*d,this._z=c*l*d+u*p*h,this._w=c*l*h+u*p*d),!1!==t&&this._onChangeCallback(),this},setFromAxisAngle:function(e,t){var n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this},setFromRotationMatrix:function(e){var t,n=e.elements,r=n[0],i=n[4],a=n[8],o=n[1],s=n[5],c=n[9],l=n[2],h=n[6],u=n[10],p=r+s+u;return p>0?(t=.5/Math.sqrt(p+1),this._w=.25/t,this._x=(h-c)*t,this._y=(a-l)*t,this._z=(o-i)*t):r>s&&r>u?(t=2*Math.sqrt(1+r-s-u),this._w=(h-c)/t,this._x=.25*t,this._y=(i+o)/t,this._z=(a+l)/t):s>u?(t=2*Math.sqrt(1+s-r-u),this._w=(a-l)/t,this._x=(i+o)/t,this._y=.25*t,this._z=(c+h)/t):(t=2*Math.sqrt(1+u-r-s),this._w=(o-i)/t,this._x=(a+l)/t,this._y=(c+h)/t,this._z=.25*t),this._onChangeCallback(),this},setFromUnitVectors:function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},angleTo:function(e){return 2*Math.acos(Math.abs(am.clamp(this.dot(e),-1,1)))},rotateTowards:function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var n=this._x,r=this._y,i=this._z,a=this._w,o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;var s=1-o*o;if(s<=Number.EPSILON){var c=1-t;return this._w=c*a+t*this._w,this._x=c*n+t*this._x,this._y=c*r+t*this._y,this._z=c*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var l=Math.sqrt(s),h=Math.atan2(l,o),u=Math.sin((1-t)*h)/l,p=Math.sin(t*h)/l;return this._w=a*u+this._w*p,this._x=n*u+this._x*p,this._y=r*u+this._y*p,this._z=i*u+this._z*p,this._onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},_onChange:function(e){return this._onChangeCallback=e,this},_onChangeCallback:function(){}});var cm=new hm,lm=new sm;function hm(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0}Object.assign(hm.prototype,{isVector3:!0,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(lm.setFromEuler(e))},applyAxisAngle:function(e,t){return this.applyQuaternion(lm.setFromAxisAngle(e,t))},applyMatrix3:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this},applyNormalMatrix:function(e){return this.applyMatrix3(e).normalize()},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this},applyQuaternion:function(e){var t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=s*t+a*r-o*n,l=s*n+o*t-i*r,h=s*r+i*n-a*t,u=-i*t-a*n-o*r;return this.x=c*s+u*-i+l*-o-h*-a,this.y=l*s+u*-a+h*-i-c*-o,this.z=h*s+u*-o+c*-a-l*-i,this},project:function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},unproject:function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},transformDirection:function(e){var t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:function(e){return cm.copy(this).projectOnVector(e),this.sub(cm)},reflect:function(e){return this.sub(cm.copy(e).multiplyScalar(2*this.dot(e)))},angleTo:function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());0===t&&console.error("THREE.Vector3: angleTo() can't handle zero length vectors.");var n=this.dot(e)/t;return Math.acos(am.clamp(n,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},setFromSphericalCoords:function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},setFromCylindrical:function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},setFromCylindricalCoords:function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}});var um,pm=new hm;function dm(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.assign(dm.prototype,{isMatrix3:!0,set:function(e,t,n,r,i,a,o,s,c){var l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:function(e){for(var t=0,n=e.count;t2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},mm=0;function vm(e,t,n,r,i,a,o,s,c,l){Object.defineProperty(this,"id",{value:mm++}),this.uuid=am.generateUUID(),this.name="",this.image=void 0!==e?e:vm.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:vm.DEFAULT_MAPPING,this.wrapS=void 0!==n?n:zd,this.wrapT=void 0!==r?r:zd,this.magFilter=void 0!==i?i:Vd,this.minFilter=void 0!==a?a:Wd,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:sf,this.type=void 0!==s?s:Xd,this.offset=new om(0,0),this.repeat=new om(1,1),this.center=new om(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new dm,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==l?l:kf,this.version=0,this.onUpdate=null}function gm(e,t,n,r){this.x=e||0,this.y=t||0,this.z=n||0,this.w=void 0!==r?r:1}function ym(e,t,n){this.width=e,this.height=t,this.scissor=new gm(0,0,e,t),this.scissorTest=!1,this.viewport=new gm(0,0,e,t),n=n||{},this.texture=new vm(void 0,void 0,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={},this.texture.image.width=e,this.texture.image.height=t,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:Vd,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0===n.stencilBuffer||n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null}function xm(e,t,n){ym.call(this,e,t,n),this.samples=4}vm.DEFAULT_IMAGE=void 0,vm.DEFAULT_MAPPING=300,vm.prototype=Object.assign(Object.create(nm.prototype),{constructor:vm,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=am.generateUUID()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var a=0,o=r.length;a1)switch(this.wrapS){case Ud:e.x=e.x-Math.floor(e.x);break;case zd:e.x=e.x<0?0:1;break;case Bd:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case Ud:e.y=e.y-Math.floor(e.y);break;case zd:e.y=e.y<0?0:1;break;case Bd:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(vm.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.defineProperties(gm.prototype,{width:{get:function(){return this.z},set:function(e){this.z=e}},height:{get:function(){return this.w},set:function(e){this.w=e}}}),Object.assign(gm.prototype,{isVector4:!0,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,n,r,i,a=e.elements,o=a[0],s=a[4],c=a[8],l=a[1],h=a[5],u=a[9],p=a[2],d=a[6],f=a[10];if(Math.abs(s-l)<.01&&Math.abs(c-p)<.01&&Math.abs(u-d)<.01){if(Math.abs(s+l)<.1&&Math.abs(c+p)<.1&&Math.abs(u+d)<.1&&Math.abs(o+h+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(o+1)/2,v=(h+1)/2,g=(f+1)/2,y=(s+l)/4,x=(c+p)/4,b=(u+d)/4;return m>v&&m>g?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=x/n):v>g?v<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(v)),i=b/r):g<.01?(n=.707106781,r=.707106781,i=0):(n=x/(i=Math.sqrt(g)),r=b/i),this.set(n,r,i,t),this}var w=Math.sqrt((d-u)*(d-u)+(c-p)*(c-p)+(l-s)*(l-s));return Math.abs(w)<.001&&(w=1),this.x=(d-u)/w,this.y=(c-p)/w,this.z=(l-s)/w,this.w=Math.acos((o+h+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},clampLength:function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,n){return this.subVectors(t,e).multiplyScalar(n).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),ym.prototype=Object.assign(Object.create(nm.prototype),{constructor:ym,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),xm.prototype=Object.assign(Object.create(ym.prototype),{constructor:xm,isWebGLMultisampleRenderTarget:!0,copy:function(e){return ym.prototype.copy.call(this,e),this.samples=e.samples,this}});var bm=new hm,wm=new Am,_m=new hm(0,0,0),Mm=new hm(1,1,1),Tm=new hm,Em=new hm,Sm=new hm;function Am(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}Object.assign(Am.prototype,{isMatrix4:!0,set:function(e,t,n,r,i,a,o,s,c,l,h,u,p,d,f,m){var v=this.elements;return v[0]=e,v[4]=t,v[8]=n,v[12]=r,v[1]=i,v[5]=a,v[9]=o,v[13]=s,v[2]=c,v[6]=l,v[10]=h,v[14]=u,v[3]=p,v[7]=d,v[11]=f,v[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new Am).fromArray(this.elements)},copy:function(e){var t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this},copyPosition:function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},extractBasis:function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this},extractRotation:function(e){var t=this.elements,n=e.elements,r=1/bm.setFromMatrixColumn(e,0).length(),i=1/bm.setFromMatrixColumn(e,1).length(),a=1/bm.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){var u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=-s*h,t[8]=c,t[1]=p+d*c,t[5]=u-f*c,t[9]=-o*s,t[2]=f-u*c,t[6]=d+p*c,t[10]=a*s}else if("YXZ"===e.order){var m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m+y*o,t[4]=g*o-v,t[8]=a*c,t[1]=a*h,t[5]=a*l,t[9]=-o,t[2]=v*o-g,t[6]=y+m*o,t[10]=a*s}else if("ZXY"===e.order){m=s*l,v=s*h,g=c*l,y=c*h;t[0]=m-y*o,t[4]=-a*h,t[8]=g+v*o,t[1]=v+g*o,t[5]=a*l,t[9]=y-m*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){u=a*l,p=a*h,d=o*l,f=o*h;t[0]=s*l,t[4]=d*c-p,t[8]=u*c+f,t[1]=s*h,t[5]=f*c+u,t[9]=p*c-d,t[2]=-c,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){var x=a*s,b=a*c,w=o*s,_=o*c;t[0]=s*l,t[4]=_-x*h,t[8]=w*h+b,t[1]=h,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=b*h+w,t[10]=x-_*h}else if("XZY"===e.order){x=a*s,b=a*c,w=o*s,_=o*c;t[0]=s*l,t[4]=-h,t[8]=c*l,t[1]=x*h+_,t[5]=a*l,t[9]=b*h-w,t[2]=w*h-b,t[6]=o*l,t[10]=_*h+x}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:function(e){return this.compose(_m,e,Mm)},lookAt:function(e,t,n){var r=this.elements;return Sm.subVectors(e,t),0===Sm.lengthSq()&&(Sm.z=1),Sm.normalize(),Tm.crossVectors(n,Sm),0===Tm.lengthSq()&&(1===Math.abs(n.z)?Sm.x+=1e-4:Sm.z+=1e-4,Sm.normalize(),Tm.crossVectors(n,Sm)),Tm.normalize(),Em.crossVectors(Sm,Tm),r[0]=Tm.x,r[4]=Em.x,r[8]=Sm.x,r[1]=Tm.y,r[5]=Em.y,r[9]=Sm.y,r[2]=Tm.z,r[6]=Em.z,r[10]=Sm.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],h=n[5],u=n[9],p=n[13],d=n[2],f=n[6],m=n[10],v=n[14],g=n[3],y=n[7],x=n[11],b=n[15],w=r[0],_=r[4],M=r[8],T=r[12],E=r[1],S=r[5],A=r[9],L=r[13],R=r[2],P=r[6],C=r[10],O=r[14],I=r[3],N=r[7],D=r[11],F=r[15];return i[0]=a*w+o*E+s*R+c*I,i[4]=a*_+o*S+s*P+c*N,i[8]=a*M+o*A+s*C+c*D,i[12]=a*T+o*L+s*O+c*F,i[1]=l*w+h*E+u*R+p*I,i[5]=l*_+h*S+u*P+p*N,i[9]=l*M+h*A+u*C+p*D,i[13]=l*T+h*L+u*O+p*F,i[2]=d*w+f*E+m*R+v*I,i[6]=d*_+f*S+m*P+v*N,i[10]=d*M+f*A+m*C+v*D,i[14]=d*T+f*L+m*O+v*F,i[3]=g*w+y*E+x*R+b*I,i[7]=g*_+y*S+x*P+b*N,i[11]=g*M+y*A+x*C+b*D,i[15]=g*T+y*L+x*O+b*F,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:function(e){for(var t=0,n=e.count;t1){for(var t=0;t1){for(var t=0;t0){r.children=[];for(s=0;s0&&(n.geometries=u),p.length>0&&(n.materials=p),d.length>0&&(n.textures=d),f.length>0&&(n.images=f),o.length>0&&(n.shapes=o)}return n.object=r,n;function m(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var n=0;ns)return!1}return!0}Object.assign(ov.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.length;si&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromBufferAttribute:function(e){for(var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=0,c=e.count;si&&(i=l),h>a&&(a=h),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new hm),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)},intersectsSphere:function(e){return this.clampPoint(e.center,Ym),Ym.distanceToSquared(e.center)<=e.radius*e.radius},intersectsPlane:function(e){var t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant},intersectsTriangle:function(e){if(this.isEmpty())return!1;this.getCenter(nv),rv.subVectors(this.max,nv),Jm.subVectors(e.a,nv),Km.subVectors(e.b,nv),Qm.subVectors(e.c,nv),$m.subVectors(Km,Jm),ev.subVectors(Qm,Km),tv.subVectors(Jm,Qm);var t=[0,-$m.z,$m.y,0,-ev.z,ev.y,0,-tv.z,tv.y,$m.z,0,-$m.x,ev.z,0,-ev.x,tv.z,0,-tv.x,-$m.y,$m.x,0,-ev.y,ev.x,0,-tv.y,tv.x,0];return!!sv(t,Jm,Km,Qm,rv)&&(!!sv(t=[1,0,0,0,1,0,0,0,1],Jm,Km,Qm,rv)&&(iv.crossVectors($m,ev),sv(t=[iv.x,iv.y,iv.z],Jm,Km,Qm,rv)))},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new hm),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return Ym.copy(e).clamp(this.min,this.max).sub(e).length()},getBoundingSphere:function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(Ym).length(),e},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){return this.isEmpty()?this:(qm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),qm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),qm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),qm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),qm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),qm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),qm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),qm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(qm),this)},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var cv=new ov;function lv(e,t){this.center=void 0!==e?e:new hm,this.radius=void 0!==t?t:0}Object.assign(lv.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:function(e,t){var n=this.center;void 0!==t?n.copy(t):cv.setFromPoints(e).getCenter(n);for(var r=0,i=0,a=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new ov),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}});var hv=new hm,uv=new hm,pv=new hm,dv=new hm,fv=new hm,mv=new hm,vv=new hm;function gv(e,t){this.origin=void 0!==e?e:new hm,this.direction=void 0!==t?t:new hm(0,0,-1)}Object.assign(gv.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new hm),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:function(e){return this.origin.copy(this.at(e,hv)),this},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new hm),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:function(e){var t=hv.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(hv.copy(this.direction).multiplyScalar(t).add(this.origin),hv.distanceToSquared(e))},distanceSqToSegment:function(e,t,n,r){uv.copy(e).add(t).multiplyScalar(.5),pv.copy(t).sub(e).normalize(),dv.copy(this.origin).sub(uv);var i,a,o,s,c=.5*e.distanceTo(t),l=-this.direction.dot(pv),h=dv.dot(this.direction),u=-dv.dot(pv),p=dv.lengthSq(),d=Math.abs(1-l*l);if(d>0)if(a=l*h-u,s=c*d,(i=l*u-h)>=0)if(a>=-s)if(a<=s){var f=1/d;o=(i*=f)*(i+l*(a*=f)+2*h)+a*(l*i+a+2*u)+p}else a=c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a=-c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;else a<=-s?o=-(i=Math.max(0,-(-l*c+h)))*i+(a=i>0?-c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p:a<=s?(i=0,o=(a=Math.min(Math.max(-c,-u),c))*(a+2*u)+p):o=-(i=Math.max(0,-(l*c+h)))*i+(a=i>0?c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p;else a=l>0?-c:c,o=-(i=Math.max(0,-(l*a+h)))*i+a*(a+2*u)+p;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(pv).multiplyScalar(a).add(uv),o},intersectSphere:function(e,t){hv.subVectors(e.center,this.origin);var n=hv.dot(this.direction),r=hv.dot(hv)-n*n,i=e.radius*e.radius;if(r>i)return null;var a=Math.sqrt(i-r),o=n-a,s=n+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,t)},intersectsSphere:function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null},intersectPlane:function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(n=(e.min.x-u.x)*c,r=(e.max.x-u.x)*c):(n=(e.max.x-u.x)*c,r=(e.min.x-u.x)*c),l>=0?(i=(e.min.y-u.y)*l,a=(e.max.y-u.y)*l):(i=(e.max.y-u.y)*l,a=(e.min.y-u.y)*l),n>a||i>r?null:((i>n||n!=n)&&(n=i),(a=0?(o=(e.min.z-u.z)*h,s=(e.max.z-u.z)*h):(o=(e.max.z-u.z)*h,s=(e.min.z-u.z)*h),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s=0?n:r,t)))},intersectsBox:function(e){return null!==this.intersectBox(e,hv)},intersectTriangle:function(e,t,n,r,i){fv.subVectors(t,e),mv.subVectors(n,e),vv.crossVectors(fv,mv);var a,o=this.direction.dot(vv);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}dv.subVectors(this.origin,e);var s=a*this.direction.dot(mv.crossVectors(dv,mv));if(s<0)return null;var c=a*this.direction.dot(fv.cross(dv));if(c<0)return null;if(s+c>o)return null;var l=-a*dv.dot(vv);return l<0?null:this.at(l/o,i)},applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}});var yv=new hm,xv=new hm,bv=new dm;function wv(e,t){this.normal=void 0!==e?e:new hm(1,0,0),this.constant=void 0!==t?t:0}Object.assign(wv.prototype,{isPlane:!0,set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:function(e,t,n){var r=yv.subVectors(n,t).cross(xv.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new hm),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new hm);var n=e.delta(yv),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?void 0:t.copy(n).multiplyScalar(i).add(e.start)},intersectsLine:function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new hm),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(e,t){var n=t||bv.getNormalMatrix(e),r=this.coplanarPoint(yv).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this},translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}});var _v=new hm,Mv=new hm,Tv=new hm,Ev=new hm,Sv=new hm,Av=new hm,Lv=new hm,Rv=new hm,Pv=new hm,Cv=new hm;function Ov(e,t,n){this.a=void 0!==e?e:new hm,this.b=void 0!==t?t:new hm,this.c=void 0!==n?n:new hm}Object.assign(Ov,{getNormal:function(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new hm),r.subVectors(n,t),_v.subVectors(e,t),r.cross(_v);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)},getBarycoord:function(e,t,n,r,i){_v.subVectors(r,t),Mv.subVectors(n,t),Tv.subVectors(e,t);var a=_v.dot(_v),o=_v.dot(Mv),s=_v.dot(Tv),c=Mv.dot(Mv),l=Mv.dot(Tv),h=a*c-o*o;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new hm),0===h)return i.set(-2,-1,-1);var u=1/h,p=(c*s-o*l)*u,d=(a*l-o*s)*u;return i.set(1-p-d,d,p)},containsPoint:function(e,t,n,r){return Ov.getBarycoord(e,t,n,r,Ev),Ev.x>=0&&Ev.y>=0&&Ev.x+Ev.y<=1},getUV:function(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,Ev),s.set(0,0),s.addScaledVector(i,Ev.x),s.addScaledVector(a,Ev.y),s.addScaledVector(o,Ev.z),s},isFrontFacing:function(e,t,n,r){return _v.subVectors(n,t),Mv.subVectors(e,t),_v.cross(Mv).dot(r)<0}}),Object.assign(Ov.prototype,{set:function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},setFromPointsAndIndices:function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:function(){return _v.subVectors(this.c,this.b),Mv.subVectors(this.a,this.b),.5*_v.cross(Mv).length()},getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new hm),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return Ov.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new wv),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return Ov.getBarycoord(e,this.a,this.b,this.c,t)},getUV:function(e,t,n,r,i){return Ov.getUV(e,this.a,this.b,this.c,t,n,r,i)},containsPoint:function(e){return Ov.containsPoint(e,this.a,this.b,this.c)},isFrontFacing:function(e){return Ov.isFrontFacing(this.a,this.b,this.c,e)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new hm);var n,r,i=this.a,a=this.b,o=this.c;Sv.subVectors(a,i),Av.subVectors(o,i),Rv.subVectors(e,i);var s=Sv.dot(Rv),c=Av.dot(Rv);if(s<=0&&c<=0)return t.copy(i);Pv.subVectors(e,a);var l=Sv.dot(Pv),h=Av.dot(Pv);if(l>=0&&h<=l)return t.copy(a);var u=s*h-l*c;if(u<=0&&s>=0&&l<=0)return n=s/(s-l),t.copy(i).addScaledVector(Sv,n);Cv.subVectors(e,o);var p=Sv.dot(Cv),d=Av.dot(Cv);if(d>=0&&p<=d)return t.copy(o);var f=p*c-s*d;if(f<=0&&c>=0&&d<=0)return r=c/(c-d),t.copy(i).addScaledVector(Av,r);var m=l*d-p*h;if(m<=0&&h-l>=0&&p-d>=0)return Lv.subVectors(o,a),r=(h-l)/(h-l+(p-d)),t.copy(a).addScaledVector(Lv,r);var v=1/(m+f+u);return n=f*v,r=u*v,t.copy(i).addScaledVector(Sv,n).addScaledVector(Av,r)},equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}});var Iv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Nv={h:0,s:0,l:0},Dv={h:0,s:0,l:0};function Fv(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}function Uv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function zv(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Bv(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function Gv(e,t,n,r,i,a){this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new hm,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new Fv,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=void 0!==a?a:0}Object.assign(Fv.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,n){return this.r=e,this.g=t,this.b=n,this},setHSL:function(e,t,n){if(e=am.euclideanModulo(e,1),t=am.clamp(t,0,1),n=am.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Uv(i,r,e+1/3),this.g=Uv(i,r,e),this.b=Uv(i,r,e-1/3)}return this},setStyle:function(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}var n;if(n=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(e)){var r,i=n[1],a=n[2];switch(i){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,t(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,t(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,c=parseInt(r[3],10)/100;return t(r[5]),this.setHSL(o,s,c)}}}else if(n=/^\#([A-Fa-f0-9]+)$/.exec(e)){var l=n[1],h=l.length;if(3===h)return this.r=parseInt(l.charAt(0)+l.charAt(0),16)/255,this.g=parseInt(l.charAt(1)+l.charAt(1),16)/255,this.b=parseInt(l.charAt(2)+l.charAt(2),16)/255,this;if(6===h)return this.r=parseInt(l.charAt(0)+l.charAt(1),16)/255,this.g=parseInt(l.charAt(2)+l.charAt(3),16)/255,this.b=parseInt(l.charAt(4)+l.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},setColorName:function(e){var t=Iv[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},copySRGBToLinear:function(e){return this.r=zv(e.r),this.g=zv(e.g),this.b=zv(e.b),this},copyLinearToSRGB:function(e){return this.r=Bv(e.r),this.g=Bv(e.g),this.b=Bv(e.b),this},convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,a=this.b,o=Math.max(r,i,a),s=Math.min(r,i,a),c=(s+o)/2;if(s===o)t=0,n=0;else{var l=o-s;switch(n=c<=.5?l/(o+s):l/(2-o-s),o){case r:t=(i-a)/l+(it&&(t=e[n]);return t}Hv.prototype=Object.assign(Object.create(nm.prototype),{constructor:Hv,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var n=e[t];if(void 0!==n)if("shading"!==t){var r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){var t=[];for(var n in e){var r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,n.reflectivity=this.reflectivity,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(n.size=this.size),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Xp&&(n.blending=this.blending),!0===this.flatShading&&(n.flatShading=this.flatShading),this.side!==Bp&&(n.side=this.side),this.vertexColors!==Hp&&(n.vertexColors=this.vertexColors),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){var i=r(e.textures),a=r(e.images);i.length>0&&(n.textures=i),a.length>0&&(n.images=a)}return n},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;var t=e.clippingPlanes,n=null;if(null!==t){var r=t.length;n=new Array(r);for(var i=0;i!==r;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Hv.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Vv.prototype=Object.create(Hv.prototype),Vv.prototype.constructor=Vv,Vv.prototype.isMeshBasicMaterial=!0,Vv.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},Object.defineProperty(jv.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(jv.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.itemSize,n*=t.itemSize;for(var r=0,i=this.itemSize;r0,o=i[1]&&i[1].length>0,s=e.morphTargets,c=s.length;if(c>0){t=[];for(var l=0;l0){h=[];for(l=0;l0&&0===n.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(l=0;l65535?Kv:Zv)(e,1):this.index=e},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,n){this.groups.push({start:e,count:t,materialIndex:void 0!==n?n:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var n=this.attributes.normal;void 0!==n&&((new dm).getNormalMatrix(e).applyToBufferAttribute(n),n.needsUpdate=!0);var r=this.attributes.tangent;void 0!==r&&((new dm).getNormalMatrix(e).applyToBufferAttribute(r),r.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return rg.makeRotationX(e),this.applyMatrix(rg),this},rotateY:function(e){return rg.makeRotationY(e),this.applyMatrix(rg),this},rotateZ:function(e){return rg.makeRotationZ(e),this.applyMatrix(rg),this},translate:function(e,t,n){return rg.makeTranslation(e,t,n),this.applyMatrix(rg),this},scale:function(e,t,n){return rg.makeScale(e,t,n),this.applyMatrix(rg),this},lookAt:function(e){return ig.lookAt(e),ig.updateMatrix(),this.applyMatrix(ig.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(ag).negate(),this.translate(ag.x,ag.y,ag.z),this},setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var n=new Qv(3*t.vertices.length,3),r=new Qv(3*t.colors.length,3);if(this.setAttribute("position",n.copyVector3sArray(t.vertices)),this.setAttribute("color",r.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var i=new Qv(t.lineDistances.length,1);this.setAttribute("lineDistance",i.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],n=0,r=e.length;n0){var n=new Float32Array(3*e.normals.length);this.setAttribute("normal",new jv(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){var r=new Float32Array(3*e.colors.length);this.setAttribute("color",new jv(r,3).copyColorsArray(e.colors))}if(e.uvs.length>0){var i=new Float32Array(2*e.uvs.length);this.setAttribute("uv",new jv(i,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){var a=new Float32Array(2*e.uvs2.length);this.setAttribute("uv2",new jv(a,2).copyVector2sArray(e.uvs2))}for(var o in this.groups=e.groups,e.morphTargets){for(var s=[],c=e.morphTargets[o],l=0,h=c.length;l0){var d=new Qv(4*e.skinIndices.length,4);this.setAttribute("skinIndex",d.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){var f=new Qv(4*e.skinWeights.length,4);this.setAttribute("skinWeight",f.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new ov);var e=this.attributes.position,t=this.morphAttributes.position;if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n0&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};var r=this.index;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var n in i){var a=(p=i[n]).toJSON();""!==p.name&&(a.name=p.name),e.data.attributes[n]=a}var o={},s=!1;for(var n in this.morphAttributes){for(var c=this.morphAttributes[n],l=[],h=0,u=c.length;h0&&(o[n]=l,s=!0)}s&&(e.data.morphAttributes=o,e.data.morphTargetsRelative=this.morphTargetsRelative);var d=this.groups;d.length>0&&(e.data.groups=JSON.parse(JSON.stringify(d)));var f=this.boundingSphere;return null!==f&&(e.data.boundingSphere={center:f.center.toArray(),radius:f.radius}),e},clone:function(){return(new lg).copy(this)},copy:function(e){var t,n,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var i=e.index;null!==i&&this.setIndex(i.clone());var a=e.attributes;for(t in a){var o=a[t];this.setAttribute(t,o.clone())}var s=e.morphAttributes;for(t in s){var c=[],l=s[t];for(n=0,r=l.length;nn.far?null:{distance:c,point:Sg.clone(),object:e}}function Rg(e,t,n,r,i,a,o,s,c,l,h,u){dg.fromBufferAttribute(i,l),fg.fromBufferAttribute(i,h),mg.fromBufferAttribute(i,u);var p=e.morphTargetInfluences;if(t.morphTargets&&a&&p){xg.set(0,0,0),bg.set(0,0,0),wg.set(0,0,0);for(var d=0,f=a.length;d0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var n,r=this.geometry,i=this.material,a=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),pg.copy(r.boundingSphere),pg.applyMatrix4(a),!1!==e.ray.intersectsSphere(pg)&&(hg.getInverse(a),ug.copy(e.ray).applyMatrix4(hg),null===r.boundingBox||!1!==ug.intersectsBox(r.boundingBox))))if(this.drawMode===zf){if(r.isBufferGeometry){var o,s,c,l,h,u,p,d,f,m=r.index,v=r.attributes.position,g=r.morphAttributes.position,y=r.morphTargetsRelative,x=r.attributes.uv,b=r.attributes.uv2,w=r.groups,_=r.drawRange;if(null!==m)if(Array.isArray(i))for(l=0,u=w.length;l0&&(S=P);for(var C=0,O=R.length;C0)for(l=0;l0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,n;for(this.computeFaceNormals(),e=0,t=this.faces.length;e0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,n,r,i;for(n=0,r=this.faces.length;n=0;n--){var f=p[n];for(this.faces.splice(f,1),o=0,s=this.faceVertexUvs.length;o0,v=d.vertexNormals.length>0,g=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,x=0;if(x=M(x,0,0),x=M(x,1,!0),x=M(x,2,!1),x=M(x,3,f),x=M(x,4,m),x=M(x,5,v),x=M(x,6,g),x=M(x,7,y),o.push(x),o.push(d.a,d.b,d.c),o.push(d.materialIndex),f){var b=this.faceVertexUvs[0][i];o.push(S(b[0]),S(b[1]),S(b[2]))}if(m&&o.push(T(d.normal)),v){var w=d.vertexNormals;o.push(T(w[0]),T(w[1]),T(w[2]))}if(g&&o.push(E(d.color)),y){var _=d.vertexColors;o.push(E(_[0]),E(_[1]),E(_[2]))}}function M(e,t,n){return n?e|1<0&&(e.data.colors=l),u.length>0&&(e.data.uvs=[u]),e.data.faces=o,e},clone:function(){return(new Ng).copy(this)},copy:function(e){var t,n,r,i,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var s=e.vertices;for(t=0,n=s.length;t0?1:-1,l.push(R.x,R.y,R.z),h.push(y/m),h.push(1-x/v),A+=1}}for(x=0;x0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var a in this.extensions)!0===this.extensions[a]&&(i[a]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},Hg.prototype=Object.assign(Object.create(Wm.prototype),{constructor:Hg,isCamera:!0,copy:function(e,t){return Wm.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new hm),this.updateMatrixWorld(!0);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){Wm.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),Vg.prototype=Object.assign(Object.create(Hg.prototype),{constructor:Vg,isPerspectiveCamera:!0,copy:function(e,t){return Hg.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*am.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*am.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*am.RAD2DEG*Math.atan(Math.tan(.5*am.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*am.DEG2RAD*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/o,t-=a.offsetY*n/s,r*=a.width/o,n*=a.height/s}var c=this.filmOffset;0!==c&&(i+=e*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(e){var t=Wm.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}});var jg=90,Wg=1;function Xg(e,t,n,r){Wm.call(this),this.type="CubeCamera";var i=new Vg(jg,Wg,e,t);i.up.set(0,-1,0),i.lookAt(new hm(1,0,0)),this.add(i);var a=new Vg(jg,Wg,e,t);a.up.set(0,-1,0),a.lookAt(new hm(-1,0,0)),this.add(a);var o=new Vg(jg,Wg,e,t);o.up.set(0,0,1),o.lookAt(new hm(0,1,0)),this.add(o);var s=new Vg(jg,Wg,e,t);s.up.set(0,0,-1),s.lookAt(new hm(0,-1,0)),this.add(s);var c=new Vg(jg,Wg,e,t);c.up.set(0,-1,0),c.lookAt(new hm(0,0,1)),this.add(c);var l=new Vg(jg,Wg,e,t);l.up.set(0,-1,0),l.lookAt(new hm(0,0,-1)),this.add(l),r=r||{format:of,magFilter:Vd,minFilter:Vd},this.renderTarget=new qg(n,n,r),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var n=e.getRenderTarget(),r=this.renderTarget,h=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(t,i),e.setRenderTarget(r,1),e.render(t,a),e.setRenderTarget(r,2),e.render(t,o),e.setRenderTarget(r,3),e.render(t,s),e.setRenderTarget(r,4),e.render(t,c),r.texture.generateMipmaps=h,e.setRenderTarget(r,5),e.render(t,l),e.setRenderTarget(n)},this.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),a=this.renderTarget,o=0;o<6;o++)e.setRenderTarget(a,o),e.clear(t,n,r);e.setRenderTarget(i)}}function qg(e,t,n){ym.call(this,e,t,n)}function Yg(e,t,n,r,i,a,o,s,c,l,h,u){vm.call(this,null,a,o,s,c,l,r,i,h,u),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==c?c:Gd,this.minFilter=void 0!==l?l:Gd,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Xg.prototype=Object.create(Wm.prototype),Xg.prototype.constructor=Xg,qg.prototype=Object.create(ym.prototype),qg.prototype.constructor=qg,qg.prototype.isWebGLRenderTargetCube=!0,qg.prototype.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=t.format,this.texture.encoding=t.encoding;var n=new Xm,r={uniforms:{tEquirect:{value:null}},vertexShader:["varying vec3 vWorldDirection;","vec3 transformDirection( in vec3 dir, in mat4 matrix ) {","\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );","}","void main() {","\tvWorldDirection = transformDirection( position, modelMatrix );","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;","varying vec3 vWorldDirection;","#define RECIPROCAL_PI 0.31830988618","#define RECIPROCAL_PI2 0.15915494","void main() {","\tvec3 direction = normalize( vWorldDirection );","\tvec2 sampleUV;","\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;","\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;","\tgl_FragColor = texture2D( tEquirect, sampleUV );","}"].join("\n")},i=new kg({type:"CubemapFromEquirect",uniforms:Ug(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Gp,blending:Wp});i.uniforms.tEquirect.value=t;var a=new Ag(new Fg(5,5,5),i);n.add(a);var o=new Xg(1,10,1);return o.renderTarget=this,o.renderTarget.texture.name="CubeCameraTexture",o.update(e,n),a.geometry.dispose(),a.material.dispose(),this},Yg.prototype=Object.create(vm.prototype),Yg.prototype.constructor=Yg,Yg.prototype.isDataTexture=!0;var Zg=new lv,Jg=new hm;function Kg(e,t,n,r,i,a){this.planes=[void 0!==e?e:new wv,void 0!==t?t:new wv,void 0!==n?n:new wv,void 0!==r?r:new wv,void 0!==i?i:new wv,void 0!==a?a:new wv]}Object.assign(Kg.prototype,{set:function(e,t,n,r,i,a){var o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},setFromMatrix:function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],h=n[7],u=n[8],p=n[9],d=n[10],f=n[11],m=n[12],v=n[13],g=n[14],y=n[15];return t[0].setComponents(o-r,h-s,f-u,y-m).normalize(),t[1].setComponents(o+r,h+s,f+u,y+m).normalize(),t[2].setComponents(o+i,h+c,f+p,y+v).normalize(),t[3].setComponents(o-i,h-c,f-p,y-v).normalize(),t[4].setComponents(o-a,h-l,f-d,y-g).normalize(),t[5].setComponents(o+a,h+l,f+d,y+g).normalize(),this},intersectsObject:function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Zg.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Zg)},intersectsSprite:function(e){return Zg.center.set(0,0,0),Zg.radius=.7071067811865476,Zg.applyMatrix4(e.matrixWorld),this.intersectsSphere(Zg)},intersectsSphere:function(e){for(var t=this.planes,n=e.center,r=-e.radius,i=0;i<6;i++){if(t[i].distanceToPoint(n)0?e.max.x:e.min.x,Jg.y=r.normal.y>0?e.max.y:e.min.y,Jg.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Jg)<0)return!1}return!0},containsPoint:function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}});var Qg={alphamap_fragment:"\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n\n#endif\n",alphamap_pars_fragment:"\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n",alphatest_fragment:"\n#ifdef ALPHATEST\n\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n\n#endif\n",aomap_fragment:"\n#ifdef USE_AOMAP\n\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\n\t#endif\n\n#endif\n",aomap_pars_fragment:"\n#ifdef USE_AOMAP\n\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n\n#endif\n",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n\n#ifdef USE_TANGENT\n\n\tvec3 objectTangent = vec3( tangent.xyz );\n\n#endif\n",bsdfs:'\n\n// Analytical approximation of the DFG LUT, one half of the\n// split-sum approximation used in indirect specular lighting.\n// via \'environmentBRDF\' from "Physically Based Shading on Mobile"\n// https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\nvec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\n\tvec4 r = roughness * c0 + c1;\n\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n\n}\n\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\n\t// based upon Frostbite 3 Moving to Physically-based Rendering\n\t// page 32, equation 26: E[window1]\n\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t// this is intended to be used on spot and point lights who are represented as luminous intensity\n\t// but who must be converted to luminous irradiance for surface lighting calculation\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\n\tif( cutoffDistance > 0.0 ) {\n\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\n\t}\n\n\treturn distanceFalloff;\n\n#else\n\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\n\t}\n\n\treturn 1.0;\n\n#endif\n\n}\n\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\n\treturn RECIPROCAL_PI * diffuseColor;\n\n} // validated\n\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\n\t// Original approximation by Christophe Schlick \'94\n\t// float fresnel = pow( 1.0 - dotLH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH \'13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n\n} // validated\n\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\n\t// See F_Schlick\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\n\treturn Fr * fresnel + F0;\n\n}\n\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (34)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is "roughness squared" in Disney’s reparameterization\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\t// geometry term (normalized) = G(l)⋅G(v) / 4(n⋅l)(n⋅v)\n\t// also see #12151\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\n\treturn 1.0 / ( gl * gv );\n\n} // validated\n\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\tfloat a2 = pow2( alpha );\n\n\t// dotNL and dotNV are explicitly swapped. This is not a mistake.\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\n\treturn 0.5 / max( gv + gl, EPSILON );\n\n}\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is "roughness squared" in Disney’s reparameterization\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\n\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n\n}\n\n// GGX Distribution, Schlick Fresnel, GGX-Smith Visibility\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\n\tfloat alpha = pow2( roughness ); // UE4\'s roughness\n\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\tfloat D = D_GGX( alpha, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n// Rect Area Light\n\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\n// code: https://github.com/selfshadow/ltc_code/\n\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\tfloat dotNV = saturate( dot( N, V ) );\n\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\treturn uv;\n\n}\n\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\n\t// An approximation of the form factor of a horizon-clipped rectangle.\n\n\tfloat l = length( f );\n\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n\n}\n\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\n\tfloat x = dot( v1, v2 );\n\n\tfloat y = abs( x );\n\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\n\treturn cross( v1, v2 ) * theta_sintheta;\n\n}\n\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\n\t// bail if point is on back side of plane of light\n\t// assumes ccw winding order of light vertices\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\n\t// construct orthonormal basis around N\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\n\n\t// compute transform\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\n\t// transform rect\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\n\t// project rect onto sphere\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\n\t// calculate vector form factor\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\n\t// adjust for horizon clipping\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\n/*\n\t// alternate method of adjusting for horizon clipping (see referece)\n\t// refactoring required\n\tfloat len = length( vectorFormFactor );\n\tfloat z = vectorFormFactor.z / len;\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\t// tabulated horizon-clipped sphere, apparently...\n\tvec2 uv = vec2( z * 0.5 + 0.5, len );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\tfloat scale = texture2D( ltc_2, uv ).w;\n\n\tfloat result = len * scale;\n*/\n\n\treturn vec3( result );\n\n}\n\n// End Rect Area Light\n\n// ref: https://www.unrealengine.com/blog/physically-based-shading-on-mobile - environmentBRDF for GGX on mobile\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\n\treturn specularColor * brdf.x + brdf.y;\n\n} // validated\n\n// Fdez-Agüera\'s "Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting"\n// Approximates multiscattering in order to preserve energy.\n// http://www.jcgt.org/published/0008/01/03/\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; // 1/21\n\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n\n}\n\nfloat G_BlinnPhong_Implicit( /* const in float dotNL, const in float dotNV */ ) {\n\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\n\treturn 0.25;\n\n}\n\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n\n}\n\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\n\t//float dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\t//float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\n\tfloat G = G_BlinnPhong_Implicit( /* dotNL, dotNV */ );\n\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n// source: http://simonstechblog.blogspot.ca/2011/12/microfacet-brdf.html\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\n\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n\n#if defined( USE_SHEEN )\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs#L94\nfloat D_Charlie(float roughness, float NoH) {\n\t// Estevez and Kulla 2017, "Production Friendly Microfacet Sheen BRDF"\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125); // 2^(-14/2), so sin2h^2 > 0 in fp16\n\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs#L136\nfloat V_Neubelt(float NoV, float NoL) {\n\t// Neubelt and Pettineo 2013, "Crafting a Next-gen Material Pipeline for The Order: 1886"\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\n\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n\n}\n\n#endif\n',bumpmap_pars_fragment:"\n#ifdef USE_BUMPMAP\n\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\n\t// Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen\n\t// http://api.unrealengine.com/attachments/Engine/Rendering/LightingAndShadows/BumpMappingWithoutTangentSpace/mm_sfgrad_bump.pdf\n\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\n\n\tvec2 dHdxy_fwd() {\n\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\n\t\treturn vec2( dBx, dBy );\n\n\t}\n\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\n\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\t\t// normalized\n\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\n\t}\n\n#endif\n",clipping_planes_fragment:"\n#if NUM_CLIPPING_PLANES > 0\n\n\tvec4 plane;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\n\t}\n\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\tbool clipped = true;\n\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\n\t\t}\n\n\t\tif ( clipped ) discard;\n\n\t#endif\n\n#endif\n",clipping_planes_pars_fragment:"\n#if NUM_CLIPPING_PLANES > 0\n\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n\n#endif\n",clipping_planes_pars_vertex:"\n#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"\n#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"\n#ifdef USE_COLOR\n\n\tdiffuseColor.rgb *= vColor;\n\n#endif\n",color_pars_fragment:"\n#ifdef USE_COLOR\n\n\tvarying vec3 vColor;\n\n#endif\n",color_pars_vertex:"\n#ifdef USE_COLOR\n\n\tvarying vec3 vColor;\n\n#endif\n",color_vertex:"\n#ifdef USE_COLOR\n\n\tvColor.xyz = color.xyz;\n\n#endif\n",common:"\n#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n\n#ifndef saturate\n// may have defined saturate() already\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\n\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\n\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\n\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\n\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n}\n\n// http://en.wikibooks.org/wiki/GLSL_Programming/Applying_Matrix_Transformations\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n\n}\n\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\n\treturn - distance * planeNormal + point;\n\n}\n\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n\n}\n\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n\n}\n\nmat3 transposeMat3( const in mat3 m ) {\n\n\tmat3 tmp;\n\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\n\treturn tmp;\n\n}\n\n// https://en.wikipedia.org/wiki/Relative_luminance\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\n\treturn dot( weights, color.rgb );\n\n}\n\nbool isPerspectiveMatrix( mat4 m ) {\n\n return m[ 2 ][ 3 ] == - 1.0;\n\n}\n",cube_uv_reflection_fragment:"\n#ifdef ENVMAP_TYPE_CUBE_UV\n\n#define cubeUV_textureSize (1024.0)\n\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\n\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\t// Clamp the value to the max mip level counts. hard coded to 6 mips\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\n\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\t// float powScale = exp2(roughnessLevel + mipLevel);\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\t// float scale = 1.0 / exp2(roughnessLevel + 2.0 + mipLevel);\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\t// float mipOffset = 0.75*(1.0 - 1.0/exp2(mipLevel))/exp2(roughnessLevel);\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\n\tfloat rcpPowScale = 1.0 / powScale;\n\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\n\nvec4 textureCubeUV( sampler2D envMap, vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\n\t// round to nearest mipmap if we are not interpolating.\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\n\t// Tri linear interpolation.\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\n\tvec4 result = mix(color10, color20, t);\n\n\treturn vec4(result.rgb, 1.0);\n}\n\n#endif\n",defaultnormal_vertex:"\nvec3 transformedNormal = objectNormal;\n\n#ifdef USE_INSTANCING\n\n\ttransformedNormal = mat3( instanceMatrix ) * transformedNormal;\n\n#endif\n\ntransformedNormal = normalMatrix * transformedNormal;\n\n#ifdef FLIP_SIDED\n\n\ttransformedNormal = - transformedNormal;\n\n#endif\n\n#ifdef USE_TANGENT\n\n\tvec3 transformedTangent = normalMatrix * objectTangent;\n\n\t#ifdef FLIP_SIDED\n\n\t\ttransformedTangent = - transformedTangent;\n\n\t#endif\n\n#endif\n",displacementmap_pars_vertex:"\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n\n#endif\n",displacementmap_vertex:"\n#ifdef USE_DISPLACEMENTMAP\n\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n\n#endif\n",emissivemap_fragment:"\n#ifdef USE_EMISSIVEMAP\n\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n\n#endif\n",emissivemap_pars_fragment:"\n#ifdef USE_EMISSIVEMAP\n\n\tuniform sampler2D emissiveMap;\n\n#endif\n",encodings_fragment:"\ngl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\n// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/\n\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\n\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\n\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\n\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\n\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\n\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\n\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );\n}\n\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\n\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\n\n// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\n\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\n\n// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html\n\n// M matrix, for encoding\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\n\n// Inverse M matrix, for decoding\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}\n",envmap_fragment:"\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\n\t\t}\n\n\t\t// Transforming Normal Vectors with the Inverse Transformation\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\n\t\t#else\n\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#else\n\n\t\tvec3 reflectVec = vReflect;\n\n\t#endif\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\n\t\tvec2 sampleUV;\n\n\t\treflectVec = normalize( reflectVec );\n\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\n\t\treflectVec = normalize( reflectVec );\n\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\n\t#else\n\n\t\tvec4 envColor = vec4( 0.0 );\n\n\t#endif\n\n\tenvColor = envMapTexelToLinear( envColor );\n\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\n\t#endif\n\n#endif\n",envmap_common_pars_fragment:"\n#ifdef USE_ENVMAP\n\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif\n",envmap_pars_fragment:"\n#ifdef USE_ENVMAP\n\n\tuniform float reflectivity;\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n\n#endif\n",envmap_pars_vertex:"\n#ifdef USE_ENVMAP\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\n\t#else\n\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\n\t#endif\n\n#endif\n",envmap_physical_pars_fragment:"\n#if defined( USE_ENVMAP )\n\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\n\tvec3 getLightProbeIndirectIrradiance( /*const in SpecularLightProbe specularLightProbe,*/ const in GeometricContext geometry, const in int maxMIPLevel ) {\n\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\n\t\t\t// TODO: replace with properly filtered cubemaps and access the irradiance LOD level, be it the last LOD level\n\t\t\t// of a specular cubemap, or just the default level of a specially created irradiance cubemap.\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\n\t\t\t#else\n\n\t\t\t\t// force the bias high to get the last LOD level as it is the most blurred.\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\n\t\t#else\n\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\n\t\t#endif\n\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\n\t}\n\n\t// Trowbridge-Reitz distribution to Mip level, following the logic of http://casual-effects.blogspot.ca/2011/08/plausible-environment-lighting-in-two.html\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\n\t\t// clamp to allowable LOD ranges.\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\n\t}\n\n\tvec3 getLightProbeIndirectRadiance( /*const in SpecularLightProbe specularLightProbe,*/ const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\n\t\t // Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\n\t\t#else\n\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\n\t\t#endif\n\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\n\t\t\t#else\n\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, roughness );\n\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\n\t\t\t#else\n\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\n\t\t\t#else\n\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\n\t\t\t#endif\n\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\n\t\t#endif\n\n\t\treturn envMapColor.rgb * envMapIntensity;\n\n\t}\n\n#endif\n",envmap_vertex:"\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvWorldPosition = worldPosition.xyz;\n\n\t#else\n\n\t\tvec3 cameraToVertex;\n\n\t\tif ( isOrthographic ) { \n\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\n\t\t}\n\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\n\t\t#else\n\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\n\n\tfogDepth = -mvPosition.z;\n\n#endif\n",fog_pars_vertex:"\n#ifdef USE_FOG\n\n\tvarying float fogDepth;\n\n#endif\n",fog_fragment:"\n#ifdef USE_FOG\n\n\t#ifdef FOG_EXP2\n\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\n\t#else\n\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\n\t#endif\n\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\n#endif\n",fog_pars_fragment:"\n#ifdef USE_FOG\n\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\n\t#ifdef FOG_EXP2\n\n\t\tuniform float fogDensity;\n\n\t#else\n\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\n\t#endif\n\n#endif\n",gradientmap_pars_fragment:"\n#ifdef TOON\n\n\tuniform sampler2D gradientMap;\n\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\n\t\t// dotNL will be from -1.0 to 1.0\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\n\t\t#ifdef USE_GRADIENTMAP\n\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\n\t\t#else\n\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\n\t\t#endif\n\n\n\t}\n\n#endif\n",lightmap_fragment:"\n#ifdef USE_LIGHTMAP\n\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage\n\n#endif\n",lightmap_pars_fragment:"\n#ifdef USE_LIGHTMAP\n\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n\n#endif\n",lights_lambert_vertex:"\nvec3 diffuse = vec3( 1.0 );\n\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\n\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\n\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\n\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n\n#if NUM_POINT_LIGHTS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\n\t}\n\n#endif\n\n#if NUM_SPOT_LIGHTS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\t}\n\n#endif\n\n/*\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\t// TODO (abelnation): implement\n\n\t}\n\n#endif\n*/\n\n#if NUM_DIR_LIGHTS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\n\t\t#endif\n\n\t}\n\n#endif\n\n#if NUM_HEMI_LIGHTS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\n\t\t#endif\n\n\t}\n\n#endif\n",lights_pars_begin:"\nuniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\n\n// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\n\t// normal is assumed to have unit length\n\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\n\treturn result;\n\n}\n\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\n\treturn irradiance;\n\n}\n\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\n\tvec3 irradiance = ambientLightColor;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI;\n\n\t#endif\n\n\treturn irradiance;\n\n}\n\n#if NUM_DIR_LIGHTS > 0\n\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\n\t}\n\n#endif\n\n\n#if NUM_POINT_LIGHTS > 0\n\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n\n#if NUM_SPOT_LIGHTS > 0\n\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\n\t// directLight is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\n\t\tif ( angleCos > spotLight.coneCos ) {\n\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\n\t\t} else {\n\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\n\t\t}\n\t}\n\n#endif\n\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\n\t// BRDF approximation Texture is 64x64\n\tuniform sampler2D ltc_1; // RGBA Float\n\tuniform sampler2D ltc_2; // RGBA Float\n\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n\n#endif\n\n\n#if NUM_HEMI_LIGHTS > 0\n\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tirradiance *= PI;\n\n\t\t#endif\n\n\t\treturn irradiance;\n\n\t}\n\n#endif\n",lights_phong_fragment:"\nBlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n\nstruct BlinnPhongMaterial {\n\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n\n};\n\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\t#ifdef TOON\n\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\n\t#else\n\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\n\t#endif\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI; // punctual light\n\n\t#endif\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n\n}\n\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"\nPhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n\n#ifdef REFLECTIVITY\n\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\n#else\n\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n\n#endif\n\n#ifdef CLEARCOAT\n\n\tmaterial.clearcoat = saturate( clearcoat ); // Burley clearcoat model\n\tmaterial.clearcoatRoughness = clamp( clearcoatRoughness, 0.04, 1.0 );\n\n#endif\n#ifdef USE_SHEEN\n\n\tmaterial.sheenColor = sheen;\n\n#endif\n",lights_physical_pars_fragment:"\nstruct PhysicalMaterial {\n\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n\n};\n\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\n\n// Clear coat directional hemishperical reflectance (this approximation should be improved)\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n\n}\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction\n\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\n\t\t// LTC Fresnel Approximation by Stephen Hill\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\n\t}\n\n#endif\n\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\n\tvec3 irradiance = dotNL * directLight.color;\n\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\tirradiance *= PI; // punctual light\n\n\t#endif\n\n\t#ifdef CLEARCOAT\n\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tccIrradiance *= PI; // punctual light\n\n\t\t#endif\n\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\n\t#else\n\n\t\tfloat clearcoatDHR = 0.0;\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\n\t#ifdef CLEARCOAT\n\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\n\t#else\n\n\t\tfloat clearcoatDHR = 0.0;\n\n\t#endif\n\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\n\t// Both indirect specular and indirect diffuse light accumulate here\n\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n\n}\n",lights_fragment_begin:"\n/**\n * This is a template that can be used to light a material, it uses pluggable\n * RenderEquations (RE)for specific lighting scenarios.\n *\n * Instructions for use:\n * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined\n * - If you have defined an RE_IndirectSpecular, you need to also provide a Material_LightProbeLOD. <---- ???\n * - Create a material parameter that is to be passed as the third parameter to your lighting functions.\n *\n * TODO:\n * - Add area light support.\n * - Add sphere light support.\n * - Add diffuse light probe (irradiance cubemap) support.\n */\n\nGeometricContext geometry;\n\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n#ifdef CLEARCOAT\n\n\tgeometry.clearcoatNormal = clearcoatNormal;\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tDirectionalLight directionalLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n\t}\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\n\t\t}\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n",lights_fragment_maps:"\n#if defined( RE_IndirectDiffuse )\n\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\n\t\t\tlightMapIrradiance *= PI; // factor of PI should not be present; included here to prevent breakage\n\n\t\t#endif\n\n\t\tirradiance += lightMapIrradiance;\n\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( /*lightProbe,*/ geometry, maxMipLevel );\n\n\t#endif\n\n#endif\n\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\n\tradiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\n\t#ifdef CLEARCOAT\n\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( /*specularLightProbe,*/ geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\n\t#endif\n\n#endif\n",lights_fragment_end:"\n#if defined( RE_IndirectDiffuse )\n\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n\n#endif\n",logdepthbuf_fragment:"\n#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\n\t// Doing a strict comparison with == 1.0 can cause noise artifacts\n\t// on some platforms. See issue #17623.\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n\n#endif\n",logdepthbuf_pars_fragment:"\n#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n",logdepthbuf_pars_vertex:"\n#ifdef USE_LOGDEPTHBUF\n\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\n\t#else\n\n\t\tuniform float logDepthBufFC;\n\n\t#endif\n\n#endif\n",logdepthbuf_vertex:"\n#ifdef USE_LOGDEPTHBUF\n\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\n\t#else\n\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\n\t\t\tgl_Position.z *= gl_Position.w;\n\n\t\t}\n\n\t#endif\n\n#endif\n",map_fragment:"\n#ifdef USE_MAP\n\n\tvec4 texelColor = texture2D( map, vUv );\n\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n\n#endif\n",map_pars_fragment:"\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n",map_particle_fragment:"\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\n#endif\n\n#ifdef USE_MAP\n\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n\n#endif\n",map_particle_pars_fragment:"\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\tuniform mat3 uvTransform;\n\n#endif\n\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n",metalnessmap_fragment:"\nfloat metalnessFactor = metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n",metalnessmap_pars_fragment:"\n#ifdef USE_METALNESSMAP\n\n\tuniform sampler2D metalnessMap;\n\n#endif\n",morphnormal_vertex:"\n#ifdef USE_MORPHNORMALS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\n#endif\n",morphtarget_pars_vertex:"\n#ifdef USE_MORPHTARGETS\n\n\tuniform float morphTargetBaseInfluence;\n\n\t#ifndef USE_MORPHNORMALS\n\n\tuniform float morphTargetInfluences[ 8 ];\n\n\t#else\n\n\tuniform float morphTargetInfluences[ 4 ];\n\n\t#endif\n\n#endif\n",morphtarget_vertex:"\n#ifdef USE_MORPHTARGETS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in position = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\n\t#ifndef USE_MORPHNORMALS\n\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\n\t#endif\n\n#endif\n",normal_fragment_begin:"\n#ifdef FLAT_SHADED\n\n\t// Workaround for Adreno/Nexus5 not able able to do dFdx( vViewPosition ) ...\n\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n\n#else\n\n\tvec3 normal = normalize( vNormal );\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\n\t#endif\n\n\t#ifdef USE_TANGENT\n\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\n\t\t#ifdef DOUBLE_SIDED\n\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\n\t\t#endif\n\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n\n// non perturbed normal for clearcoat among others\n\nvec3 geometryNormal = normal;\n\n",normal_fragment_maps:"\n\n#ifdef OBJECTSPACE_NORMALMAP\n\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals\n\n\t#ifdef FLIP_SIDED\n\n\t\tnormal = - normal;\n\n\t#endif\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\n\t#endif\n\n\tnormal = normalize( normalMatrix * normal );\n\n#elif defined( TANGENTSPACE_NORMALMAP )\n\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\n\t#ifdef USE_TANGENT\n\n\t\tnormal = normalize( vTBN * mapN );\n\n\t#else\n\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\n\t#endif\n\n#elif defined( USE_BUMPMAP )\n\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n\n#endif\n",normalmap_pars_fragment:"\n#ifdef USE_NORMALMAP\n\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\n#endif\n\n#ifdef OBJECTSPACE_NORMALMAP\n\n\tuniform mat3 normalMatrix;\n\n#endif\n\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\n\t// Per-Pixel Tangent Space Normal Mapping\n\t// http://hacksoflife.blogspot.ch/2009/11/per-pixel-tangent-space-normal-mapping.html\n\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\n\t\t// Workaround for Adreno 3XX dFd*( vec3 ) bug. See #9988\n\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s ); // we do not care about the magnitude\n\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\n\t\tmat3 tsn = mat3( S, T, N );\n\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\n\t\treturn normalize( tsn * mapN );\n\n\t}\n\n#endif\n",clearcoat_normal_fragment_begin:"\n#ifdef CLEARCOAT\n\n\tvec3 clearcoatNormal = geometryNormal;\n\n#endif\n",clearcoat_normal_fragment_maps:"\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\n\t#ifdef USE_TANGENT\n\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\n\t#else\n\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\n\t#endif\n\n#endif\n",clearcoat_normalmap_pars_fragment:"\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n\n#endif\n",packing:"\nvec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\n\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\n\nconst float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1)\nconst float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1)\n\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\n\nconst float ShiftRight8 = 1. / 256.;\n\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8; // tidy overflow\n\treturn r * PackUpscale;\n}\n\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\n\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpack2HalfToRGBA( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\n\n// NOTE: viewZ/eyeZ is < 0 when in front of the camera per OpenGL conventions\n\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\n\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"\n#ifdef PREMULTIPLIED_ALPHA\n\n\t// Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation.\n\tgl_FragColor.rgb *= gl_FragColor.a;\n\n#endif\n",project_vertex:"\nvec4 mvPosition = vec4( transformed, 1.0 );\n\n#ifdef USE_INSTANCING\n\n\tmvPosition = instanceMatrix * mvPosition;\n\n#endif\n\nmvPosition = modelViewMatrix * mvPosition;\n\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"\n#ifdef DITHERING\n\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n\n#endif\n",dithering_pars_fragment:"\n#ifdef DITHERING\n\n\t// based on https://www.shadertoy.com/view/MslGR8\n\tvec3 dithering( vec3 color ) {\n\t\t//Calculate grid position\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\n\t\t//modify shift acording to grid position.\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\n\t\t//shift the color by dither_shift\n\t\treturn color + dither_shift_RGB;\n\t}\n\n#endif\n",roughnessmap_fragment:"\nfloat roughnessFactor = roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n",roughnessmap_pars_fragment:"\n#ifdef USE_ROUGHNESSMAP\n\n\tuniform sampler2D roughnessMap;\n\n#endif\n",shadowmap_pars_fragment:"\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): create uniforms for area light shadows\n\n\t#endif\n\t*/\n\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\n\t}\n\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\n\t\treturn unpack2HalfToRGBA( texture2D( shadow, uv ) );\n\n\t}\n\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\n\t\tfloat occlusion = 1.0;\n\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\n\t\tfloat hard_shadow = step( compare , distribution.x ); // Hard Shadow\n\n\t\tif (hard_shadow != 1.0 ) {\n\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance ); // Chebeyshevs inequality\n\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); // 0.3 reduces light bleed\n\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\n\t\t}\n\t\treturn occlusion;\n\n\t}\n\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = ( floor( uv * size - 0.5 ) + 0.5 ) * texelSize;\n\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\n\t\tvec2 f = fract( uv * size + 0.5 );\n\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\n\t\treturn c;\n\n\t}\n\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\tfloat shadow = 1.0;\n\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\n\t\t// if ( something && something ) breaks ATI OpenGL shader compiler\n\t\t// if ( all( something, something ) ) using this instead\n\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\n\t\tbool frustumTest = all( frustumTestVec );\n\n\t\tif ( frustumTest ) {\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\n\t\t#else // no percentage-closer filtering:\n\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\n\t\t#endif\n\n\t\t}\n\n\t\treturn shadow;\n\n\t}\n\n\t// cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D\n\t// vector suitable for 2D texture mapping. This code uses the following layout for the\n\t// 2D texture:\n\t//\n\t// xzXZ\n\t// y Y\n\t//\n\t// Y - Positive y direction\n\t// y - Negative y direction\n\t// X - Positive x direction\n\t// x - Negative x direction\n\t// Z - Positive z direction\n\t// z - Negative z direction\n\t//\n\t// Source and test bed:\n\t// https://gist.github.com/tschw/da10c43c467ce8afd0c4\n\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\n\t\t// Number of texels to avoid at the edge of each square\n\n\t\tvec3 absV = abs( v );\n\n\t\t// Intersect unit cube\n\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\n\t\t// Apply scale to avoid seams\n\n\t\t// two texels less per square (one texel will do for NEAREST)\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\n\t\t// Unwrap\n\n\t\t// space: -1 ... 1 range for each square\n\t\t//\n\t\t// #X##\t\tdim := ( 4 , 2 )\n\t\t// # #\t\tcenter := ( 1 , 1 )\n\n\t\tvec2 planar = v.xy;\n\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\n\t\tif ( absV.z >= almostOne ) {\n\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\n\t\t} else if ( absV.x >= almostOne ) {\n\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\n\t\t} else if ( absV.y >= almostOne ) {\n\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\n\t\t}\n\n\t\t// Transform to UV space\n\n\t\t// scale := 0.5 / dim\n\t\t// translate := ( center + 0.5 ) / dim\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\n\t}\n\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\n\t\t// the vector from the light to the world-space position of the fragment.\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\n\t\t// dp = normalized distance from light to fragment position\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); // need to clamp?\n\t\tdp += shadowBias;\n\n\t\t// bd3D = base direction 3D\n\t\tvec3 bd3D = normalize( lightToPosition );\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\n\t\t#else // no percentage-closer filtering\n\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\n\t\t#endif\n\n\t}\n\n#endif\n",shadowmap_pars_vertex:"\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): uniforms for area light shadows\n\n\t#endif\n\t*/\n\n#endif\n",shadowmap_vertex:"\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\n\t}\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update vAreaShadowCoord with area light info\n\n\t#endif\n\t*/\n\n#endif\n",shadowmask_pars_fragment:"\nfloat getShadowMask() {\n\n\tfloat shadow = 1.0;\n\n\t#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\tDirectionalLight directionalLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t}\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\tSpotLight spotLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\n\t}\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\tPointLight pointLight;\n\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\n\t}\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update shadow for Area light\n\n\t#endif\n\t*/\n\n\t#endif\n\n\treturn shadow;\n\n}\n",skinbase_vertex:"\n#ifdef USE_SKINNING\n\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n\n#endif\n",skinning_pars_vertex:"\n#ifdef USE_SKINNING\n\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\n\t#ifdef BONE_TEXTURE\n\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\n\t\tmat4 getBoneMatrix( const in float i ) {\n\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\n\t\t\ty = dy * ( y + 0.5 );\n\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\n\t\t\treturn bone;\n\n\t\t}\n\n\t#else\n\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\n\t\tmat4 getBoneMatrix( const in float i ) {\n\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\n\t\t}\n\n\t#endif\n\n#endif\n",skinning_vertex:"\n#ifdef USE_SKINNING\n\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n\n#endif\n",skinnormal_vertex:"\n#ifdef USE_SKINNING\n\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\n\t#ifdef USE_TANGENT\n\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\n\t#endif\n\n#endif\n",specularmap_fragment:"\nfloat specularStrength;\n\n#ifdef USE_SPECULARMAP\n\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n\n#else\n\n\tspecularStrength = 1.0;\n\n#endif\n",specularmap_pars_fragment:"\n#ifdef USE_SPECULARMAP\n\n\tuniform sampler2D specularMap;\n\n#endif\n",tonemapping_fragment:"\n#if defined( TONE_MAPPING )\n\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n\n#endif\n",tonemapping_pars_fragment:"\n#ifndef saturate\n// may have defined saturate() already\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\n\n// exposure only\nvec3 LinearToneMapping( vec3 color ) {\n\n\treturn toneMappingExposure * color;\n\n}\n\n// source: https://www.cs.utah.edu/~reinhard/cdrom/\nvec3 ReinhardToneMapping( vec3 color ) {\n\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n\n}\n\n// source: http://filmicgames.com/archives/75\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\n\t// John Hable's filmic operator from Uncharted 2 video game\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n\n}\n\n// source: http://filmicgames.com/archives/75\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\n\t// optimized filmic operator by Jim Hejl and Richard Burgess-Dawson\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n\n}\n\n// source: https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n\n}\n",uv_pars_fragment:"\n#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\n\tvarying vec2 vUv;\n\n#endif\n",uv_pars_vertex:"\n#ifdef USE_UV\n\n\t#ifdef UVS_VERTEX_ONLY\n\n\t\tvec2 vUv;\n\n\t#else\n\n\t\tvarying vec2 vUv;\n\n\t#endif\n\n\tuniform mat3 uvTransform;\n\n#endif\n",uv_vertex:"\n#ifdef USE_UV\n\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n#endif\n",uv2_pars_fragment:"\n#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\n\tvarying vec2 vUv2;\n\n#endif\n",uv2_pars_vertex:"\n#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\n#endif\n",uv2_vertex:"\n#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\n\tvUv2 = uv2;\n\n#endif\n",worldpos_vertex:"\n#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\n\t#ifdef USE_INSTANCING\n\n\t\tworldPosition = instanceMatrix * worldPosition;\n\n\t#endif\n\n\tworldPosition = modelMatrix * worldPosition;\n\n#endif\n",background_frag:"\nuniform sampler2D t2D;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n\tvec4 texColor = texture2D( t2D, vUv );\n\n\tgl_FragColor = mapTexelToLinear( texColor );\n\n\t#include \n\t#include \n\n}\n",background_vert:"\nvarying vec2 vUv;\nuniform mat3 uvTransform;\n\nvoid main() {\n\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n\n}\n",cube_frag:"\nuniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\n\nvarying vec3 vWorldDirection;\n\nvoid main() {\n\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\n\tgl_FragColor = mapTexelToLinear( texColor );\n\tgl_FragColor.a *= opacity;\n\n\t#include \n\t#include \n\n}\n",cube_vert:"\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n}\n",depth_frag:"\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\n\t#include \n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\n\t#endif\n\n}\n",depth_vert:"\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",distanceRGBA_frag:"\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main () {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include \n\t#include \n\t#include \n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n",distanceRGBA_vert:"\n#define DISTANCE\n\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvWorldPosition = worldPosition.xyz;\n\n}\n",equirect_frag:"\nuniform sampler2D tEquirect;\n\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvec3 direction = normalize( vWorldDirection );\n\n\tvec2 sampleUV;\n\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\n\tgl_FragColor = mapTexelToLinear( texColor );\n\n\t#include \n\t#include \n\n}\n",equirect_vert:"\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n}\n",linedashed_frag:"\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n\t\tdiscard;\n\n\t}\n\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb; // simple shader\n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",linedashed_vert:"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvLineDistance = scale * lineDistance;\n\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\n\t#include \n\t#include \n\t#include \n\n}\n",meshbasic_frag:"\nuniform vec3 diffuse;\nuniform float opacity;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\n\t// accumulation (baked indirect lighting only)\n\t#ifdef USE_LIGHTMAP\n\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\n\t#endif\n\n\t// modulation\n\t#include \n\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\n\t#include \n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshbasic_vert:"\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#ifdef USE_ENVMAP\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshlambert_frag:"\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\n\t#ifdef DOUBLE_SIDED\n\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\n\t#endif\n\n\t#include \n\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\n\t#ifdef DOUBLE_SIDED\n\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\n\t#else\n\n\t\treflectedLight.directDiffuse = vLightFront;\n\n\t#endif\n\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n\t#include \n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshlambert_vert:"\n#define LAMBERT\n\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}\n",meshmatcap_frag:"\n#define MATCAP\n\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks\n\n\t#ifdef USE_MATCAP\n\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\n\t#else\n\n\t\tvec4 matcapColor = vec4( 1.0 );\n\n\t#endif\n\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshmatcap_vert:"\n#define MATCAP\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\n\n\t\tvNormal = normalize( transformedNormal );\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n}\n",meshphong_frag:"\n#define PHONG\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\n\t#include \n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshphong_vert:"\n#define PHONG\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\n\n\tvNormal = normalize( transformedNormal );\n\n#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshphysical_frag:"\n#define STANDARD\n\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\n\t// this is a stub for the transparency model\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",meshphysical_vert:"\n#define STANDARD\n\nvarying vec3 vViewPosition;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\n\n\tvNormal = normalize( transformedNormal );\n\n\t#ifdef USE_TANGENT\n\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\n\t#endif\n\n#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\n}\n",normal_frag:"\n#define NORMAL\n\nuniform float opacity;\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\n}\n",normal_vert:"\n#define NORMAL\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#ifndef FLAT_SHADED // Normal computed with derivatives when FLAT_SHADED\n\n\tvNormal = normalize( transformedNormal );\n\n\t#ifdef USE_TANGENT\n\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\n\t#endif\n\n#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\n\tvViewPosition = - mvPosition.xyz;\n\n#endif\n\n}\n",points_frag:"\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",points_vert:"\nuniform float size;\nuniform float scale;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_PointSize = size;\n\n\t#ifdef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",shadow_frag:"\nuniform vec3 color;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\n\t#include \n\n}\n",shadow_vert:"\n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n",sprite_frag:"\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\n\t#include \n\t#include \n\t#include \n\n}\n",sprite_vert:"\nuniform float rotation;\nuniform vec2 center;\n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\n\t#ifndef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\n\t#endif\n\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\n\tmvPosition.xy += rotatedPosition;\n\n\tgl_Position = projectionMatrix * mvPosition;\n\n\t#include \n\t#include \n\t#include \n\n}\n"},$g={common:{diffuse:{value:new Fv(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new dm},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new om(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fv(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new Fv(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new dm}},sprite:{diffuse:{value:new Fv(15658734)},opacity:{value:1},center:{value:new om(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new dm}}},ey={basic:{uniforms:zg([$g.common,$g.specularmap,$g.envmap,$g.aomap,$g.lightmap,$g.fog]),vertexShader:Qg.meshbasic_vert,fragmentShader:Qg.meshbasic_frag},lambert:{uniforms:zg([$g.common,$g.specularmap,$g.envmap,$g.aomap,$g.lightmap,$g.emissivemap,$g.fog,$g.lights,{emissive:{value:new Fv(0)}}]),vertexShader:Qg.meshlambert_vert,fragmentShader:Qg.meshlambert_frag},phong:{uniforms:zg([$g.common,$g.specularmap,$g.envmap,$g.aomap,$g.lightmap,$g.emissivemap,$g.bumpmap,$g.normalmap,$g.displacementmap,$g.gradientmap,$g.fog,$g.lights,{emissive:{value:new Fv(0)},specular:{value:new Fv(1118481)},shininess:{value:30}}]),vertexShader:Qg.meshphong_vert,fragmentShader:Qg.meshphong_frag},standard:{uniforms:zg([$g.common,$g.envmap,$g.aomap,$g.lightmap,$g.emissivemap,$g.bumpmap,$g.normalmap,$g.displacementmap,$g.roughnessmap,$g.metalnessmap,$g.fog,$g.lights,{emissive:{value:new Fv(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:Qg.meshphysical_vert,fragmentShader:Qg.meshphysical_frag},matcap:{uniforms:zg([$g.common,$g.bumpmap,$g.normalmap,$g.displacementmap,$g.fog,{matcap:{value:null}}]),vertexShader:Qg.meshmatcap_vert,fragmentShader:Qg.meshmatcap_frag},points:{uniforms:zg([$g.points,$g.fog]),vertexShader:Qg.points_vert,fragmentShader:Qg.points_frag},dashed:{uniforms:zg([$g.common,$g.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Qg.linedashed_vert,fragmentShader:Qg.linedashed_frag},depth:{uniforms:zg([$g.common,$g.displacementmap]),vertexShader:Qg.depth_vert,fragmentShader:Qg.depth_frag},normal:{uniforms:zg([$g.common,$g.bumpmap,$g.normalmap,$g.displacementmap,{opacity:{value:1}}]),vertexShader:Qg.normal_vert,fragmentShader:Qg.normal_frag},sprite:{uniforms:zg([$g.sprite,$g.fog]),vertexShader:Qg.sprite_vert,fragmentShader:Qg.sprite_frag},background:{uniforms:{uvTransform:{value:new dm},t2D:{value:null}},vertexShader:Qg.background_vert,fragmentShader:Qg.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Qg.cube_vert,fragmentShader:Qg.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Qg.equirect_vert,fragmentShader:Qg.equirect_frag},distanceRGBA:{uniforms:zg([$g.common,$g.displacementmap,{referencePosition:{value:new hm},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Qg.distanceRGBA_vert,fragmentShader:Qg.distanceRGBA_frag},shadow:{uniforms:zg([$g.lights,$g.fog,{color:{value:new Fv(0)},opacity:{value:1}}]),vertexShader:Qg.shadow_vert,fragmentShader:Qg.shadow_frag}};function ty(){var e=null,t=!1,n=null;function r(i,a){!1!==t&&(n(i,a),e.requestAnimationFrame(r))}return{start:function(){!0!==t&&null!==n&&(e.requestAnimationFrame(r),t=!0)},stop:function(){t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function ny(e){var t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);var r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))},update:function(n,r){n.isInterleavedBufferAttribute&&(n=n.data);var i=t.get(n);void 0===i?t.set(n,function(t,n){var r=t.array,i=t.usage,a=e.createBuffer();e.bindBuffer(n,a),e.bufferData(n,r,i),t.onUploadCallback();var o=e.FLOAT;return r instanceof Float32Array?o=e.FLOAT:r instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):r instanceof Uint16Array?o=e.UNSIGNED_SHORT:r instanceof Int16Array?o=e.SHORT:r instanceof Uint32Array?o=e.UNSIGNED_INT:r instanceof Int32Array?o=e.INT:r instanceof Int8Array?o=e.BYTE:r instanceof Uint8Array&&(o=e.UNSIGNED_BYTE),{buffer:a,type:o,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version}}(n,r)):i.version0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,o=void 0!==n.precision?n.precision:"highp",s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);var c=!0===n.logarithmicDepthBuffer,l=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),d=e.getParameter(e.MAX_VERTEX_ATTRIBS),f=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),m=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),g=h>0,y=a||!!t.get("OES_texture_float");return{isWebGL2:a,getMaxAnisotropy:function(){if(void 0!==r)return r;var n=t.get("EXT_texture_filter_anisotropic");return r=null!==n?e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:c,maxTextures:l,maxVertexTextures:h,maxTextureSize:u,maxCubemapSize:p,maxAttributes:d,maxVertexUniforms:f,maxVaryings:m,maxFragmentUniforms:v,vertexTextures:g,floatFragmentTextures:y,floatVertexTextures:g&&y,maxSamples:a?e.getParameter(e.MAX_SAMPLES):0}}function cy(){var e=this,t=null,n=0,r=!1,i=!1,a=new wv,o=new dm,s={value:null,needsUpdate:!1};function c(){s.value!==t&&(s.value=t,s.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function l(t,n,r,i){var c=null!==t?t.length:0,l=null;if(0!==c){if(l=s.value,!0!==i||null===l){var h=r+4*c,u=n.matrixWorldInverse;o.getNormalMatrix(u),(null===l||l.length65535?Kv:Zv)(r,1);f.version=s,t.update(f,e.ELEMENT_ARRAY_BUFFER);var m=i.get(n);m&&t.remove(m),i.set(n,f)}return{get:function(e,t){var i=r.get(t);return i||(t.addEventListener("dispose",a),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new lg).setFromObject(e)),i=t._bufferGeometry),r.set(t,i),n.memory.geometries++,i)},update:function(n){var r=n.index,i=n.attributes;for(var a in null!==r&&t.update(r,e.ELEMENT_ARRAY_BUFFER),i)t.update(i[a],e.ARRAY_BUFFER);var o=n.morphAttributes;for(var a in o)for(var s=o[a],c=0,l=s.length;c0)return e;var i=t*n,a=My[i];if(void 0===a&&(a=new Float32Array(i),My[i]=a),0!==t){r.toArray(a,0);for(var o=1,s=0;o!==t;++o)s+=n,e[o].toArray(a,s)}return a}function Ry(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n/gm;function Mx(e){return e.replace(_x,Tx)}function Tx(e,t){var n=Qg[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Mx(n)}var Ex=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function Sx(e){return e.replace(Ex,Ax)}function Ax(e,t,n,r){for(var i="",a=parseInt(t);a0?e.gammaFactor:1,b=a.isWebGL2?"":function(e,t,n){return[(e=e||{}).derivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(e.fragDepth||t.logarithmicDepthBuffer)&&n.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",e.drawBuffers&&n.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(e.shaderTextureLOD||t.envMap)&&n.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(xx).join("\n")}(r.extensions,a,t),w=function(e){var t=[];for(var n in e){var r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(p),_=u.createProgram(),M=a.numMultiviewViews;if(r.isRawShaderMaterial?((o=[w].filter(xx).join("\n")).length>0&&(o+="\n"),(s=[b,w].filter(xx).join("\n")).length>0&&(s+="\n")):(o=[Lx(a),"#define SHADER_NAME "+i.name,w,a.instancing?"#define USE_INSTANCING":"",a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+x,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+g:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+m:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(xx).join("\n"),s=[b,Lx(a),"#define SHADER_NAME "+i.name,w,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+x,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+v:"",a.envMap?"#define "+g:"",a.envMap?"#define "+y:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.sheen?"#define USE_SHEEN":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+m:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||t.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensions&&r.extensions.shaderTextureLOD||a.envMap)&&(a.isWebGL2||t.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",a.toneMapping!==Td?"#define TONE_MAPPING":"",a.toneMapping!==Td?Qg.tonemapping_pars_fragment:"",a.toneMapping!==Td?yx("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.matcapEncoding||a.envMapEncoding||a.emissiveMapEncoding?Qg.encodings_pars_fragment:"",a.mapEncoding?gx("mapTexelToLinear",a.mapEncoding):"",a.matcapEncoding?gx("matcapTexelToLinear",a.matcapEncoding):"",a.envMapEncoding?gx("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?gx("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(c="linearToOutputTexel",l=a.outputEncoding,h=mx(l),"vec4 "+c+"( vec4 value ) { return LinearTo"+h[0]+h[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(xx).join("\n")),d=wx(d=bx(d=Mx(d),a),a),f=wx(f=bx(f=Mx(f),a),a),d=Sx(d),f=Sx(f),a.isWebGL2&&!r.isRawShaderMaterial){var T=!1,E=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==d.match(E)&&null!==f.match(E)&&(T=!0,d=d.replace(E,""),f=f.replace(E,"")),o=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+o,s=["#version 300 es\n","#define varying in",T?"":"out highp vec4 pc_fragColor;",T?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+s,M>0&&(o=(o=o.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","layout(num_views = "+M+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace(["uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;"].join("\n"),["uniform mat4 modelViewMatrices["+M+"];","uniform mat4 projectionMatrices["+M+"];","uniform mat4 viewMatrices["+M+"];","uniform mat3 normalMatrices["+M+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]","#define projectionMatrix projectionMatrices[VIEW_ID]","#define viewMatrix viewMatrices[VIEW_ID]","#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),s=(s=s.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+M+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n")))}var S,A,L=o+d,R=s+f,P=dx(u,u.VERTEX_SHADER,L),C=dx(u,u.FRAGMENT_SHADER,R);if(u.attachShader(_,P),u.attachShader(_,C),void 0!==r.index0AttributeName?u.bindAttribLocation(_,0,r.index0AttributeName):!0===a.morphTargets&&u.bindAttribLocation(_,0,"position"),u.linkProgram(_),e.debug.checkShaderErrors){var O=u.getProgramInfoLog(_).trim(),I=u.getShaderInfoLog(P).trim(),N=u.getShaderInfoLog(C).trim(),D=!0,F=!0;if(!1===u.getProgramParameter(_,u.LINK_STATUS)){D=!1;var U=vx(u,P,"vertex"),z=vx(u,C,"fragment");console.error("THREE.WebGLProgram: shader error: ",u.getError(),"gl.VALIDATE_STATUS",u.getProgramParameter(_,u.VALIDATE_STATUS),"gl.getProgramInfoLog",O,U,z)}else""!==O?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",O):""!==I&&""!==N||(F=!1);F&&(this.diagnostics={runnable:D,material:r,programLog:O,vertexShader:{log:I,prefix:o},fragmentShader:{log:N,prefix:s}})}return u.deleteShader(P),u.deleteShader(C),this.getUniforms=function(){return void 0===S&&(S=new px(u,_)),S},this.getAttributes=function(){return void 0===A&&(A=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i0,maxBones:y,useVertexTexture:o,morphTargets:t.morphTargets,morphNormals:t.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numDirLightShadows:r.directionalShadowMap.length,numPointLightShadows:r.pointShadowMap.length,numSpotLightShadows:r.spotShadowMap.length,numClippingPlanes:f,numClipIntersection:m,dithering:t.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:t.toneMapped?e.toneMapping:Td,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:t.premultipliedAlpha,alphaTest:t.alphaTest,doubleSided:t.side===kp,flipSided:t.side===Gp,depthPacking:void 0!==t.depthPacking&&t.depthPacking}},this.getProgramCacheKey=function(t,n){var r=[];if(n.shaderID?r.push(n.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var a=0;a1&&n.sort(Ox),r.length>1&&r.sort(Ix)}}}function Dx(){var e=new WeakMap;function t(n){var r=n.target;r.removeEventListener("dispose",t),e.delete(r)}return{get:function(n,r){var i,a=e.get(n);return void 0===a?(i=new Nx,e.set(n,new WeakMap),e.get(n).set(r,i),n.addEventListener("dispose",t)):void 0===(i=a.get(r))&&(i=new Nx,a.set(r,i)),i},dispose:function(){e=new WeakMap}}}function Fx(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":n={direction:new hm,color:new Fv,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new om};break;case"SpotLight":n={position:new hm,direction:new hm,color:new Fv,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new om};break;case"PointLight":n={position:new hm,color:new Fv,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new om,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":n={direction:new hm,skyColor:new Fv,groundColor:new Fv};break;case"RectAreaLight":n={color:new Fv,position:new hm,halfWidth:new hm,halfHeight:new hm}}return e[t.id]=n,n}}}var Ux=0;function zx(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Bx(){for(var e=new Fx,t={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},n=0;n<9;n++)t.probe.push(new hm);var r=new hm,i=new Am,a=new Am;return{setup:function(n,o,s){for(var c=0,l=0,h=0,u=0;u<9;u++)t.probe[u].set(0,0,0);var p=0,d=0,f=0,m=0,v=0,g=0,y=0,x=0,b=s.matrixWorldInverse;n.sort(zx),u=0;for(var w=n.length;u0:!0===s.isGeometry&&(d=s.morphTargets&&s.morphTargets.length>0));var f=!1;!0===t.isSkinnedMesh&&(!0===n.skinning?f=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),c=u(d,f,!0===t.isInstancedMesh)}else c=p;if(e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length){var m=c.uuid,v=n.uuid,x=l[m];void 0===x&&(x={},l[m]=x);var b=x[v];void 0===b&&(b=c.clone(),x[v]=b),c=b}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=o===zp?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,!0===r.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(r.matrixWorld),c.nearDistance=i,c.farDistance=a),c}function b(n,i,a,o,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===zp)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);var c=t.update(n),l=n.material;if(Array.isArray(l))for(var h=c.groups,u=0,p=h.length;un||i.y>n)&&(console.warn("THREE.WebGLShadowMap:",g,"has shadow exceeding max texture size, reducing"),i.x>n&&(a.x=Math.floor(n/x.x),i.x=a.x*x.x,y.mapSize.x=a.x),i.y>n&&(a.y=Math.floor(n/x.y),i.y=a.y*x.y,y.mapSize.y=a.y)),null===y.map&&!y.isPointLightShadow&&this.type===zp){var w={minFilter:Vd,magFilter:Vd,format:sf};y.map=new ym(i.x,i.y,w),y.map.texture.name=g.name+".shadowMap",y.mapPass=new ym(i.x,i.y,w),y.camera.updateProjectionMatrix()}if(null===y.map){w={minFilter:Gd,magFilter:Gd,format:sf};y.map=new ym(i.x,i.y,w),y.map.texture.name=g.name+".shadowMap",y.camera.updateProjectionMatrix()}e.setRenderTarget(y.map),e.clear();for(var _=y.getViewportCount(),M=0;M<_;M++){var T=y.getViewport(M);o.set(a.x*T.x,a.y*T.y,a.x*T.z,a.y*T.w),p.viewport(o),y.updateMatrices(g,M),r=y.getFrustum(),b(s,c,y.camera,g,this.type)}y.isPointLightShadow||this.type!==zp||v(y,c)}else console.warn("THREE.WebGLShadowMap:",g,"has no shadow.")}m.needsUpdate=!1,e.setRenderTarget(l,h,u)}}}function qx(e,t,n){var r=n.isWebGL2;var i=new function(){var t=!1,n=new gm,r=null,i=new gm(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,o,s){!0===s&&(t*=o,r*=o,a*=o),n.set(t,r,a,o),!1===i.equals(n)&&(e.clearColor(t,r,a,o),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},a=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(t){t?z(e.DEPTH_TEST):B(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){if(t)switch(t){case dd:e.depthFunc(e.NEVER);break;case fd:e.depthFunc(e.ALWAYS);break;case md:e.depthFunc(e.LESS);break;case vd:e.depthFunc(e.LEQUAL);break;case gd:e.depthFunc(e.EQUAL);break;case yd:e.depthFunc(e.GEQUAL);break;case xd:e.depthFunc(e.GREATER);break;case bd:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},o=new function(){var t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null;return{setTest:function(n){t||(n?z(e.STENCIL_TEST):B(e.STENCIL_TEST))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,o){r===t&&i===n&&a===o||(e.stencilFunc(t,n,o),r=t,i=n,a=o)},setOp:function(t,n,r){o===t&&s===n&&c===r||(e.stencilOp(t,n,r),o=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null}}},s=e.getParameter(e.MAX_VERTEX_ATTRIBS),c=new Uint8Array(s),l=new Uint8Array(s),h=new Uint8Array(s),u={},p=null,d=null,f=null,m=null,v=null,g=null,y=null,x=null,b=null,w=!1,_=null,M=null,T=null,E=null,S=null,A=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),L=!1,R=0,P=e.getParameter(e.VERSION);-1!==P.indexOf("WebGL")?(R=parseFloat(/^WebGL\ ([0-9])/.exec(P)[1]),L=R>=1):-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(P)[1]),L=R>=2);var C=null,O={},I=new gm,N=new gm;function D(t,n,r){var i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(var o=0;or||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){var a=t?am.floorPowerOfTwo:Math.floor,o=a(i*e.width),c=a(i*e.height);void 0===s&&(s=m(o,c));var l=n?m(o,c):s;return l.width=o,l.height=c,l.getContext("2d").drawImage(e,0,0,o,c),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+c+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function g(e){return am.isPowerOfTwo(e.width)&&am.isPowerOfTwo(e.height)}function y(e,t){return e.generateMipmaps&&t&&e.minFilter!==Gd&&e.minFilter!==Vd}function x(t,n,i,a){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,a))*Math.LOG2E}function b(n,r){if(!1===c)return n;var i=n;return n===e.RED&&(r===e.FLOAT&&(i=e.R32F),r===e.HALF_FLOAT&&(i=e.R16F),r===e.UNSIGNED_BYTE&&(i=e.R8)),n===e.RGB&&(r===e.FLOAT&&(i=e.RGB32F),r===e.HALF_FLOAT&&(i=e.RGB16F),r===e.UNSIGNED_BYTE&&(i=e.RGB8)),n===e.RGBA&&(r===e.FLOAT&&(i=e.RGBA32F),r===e.HALF_FLOAT&&(i=e.RGBA16F),r===e.UNSIGNED_BYTE&&(i=e.RGBA8)),i===e.R16F||i===e.R32F||i===e.RGBA16F||i===e.RGBA32F?t.get("EXT_color_buffer_float"):i!==e.RGB16F&&i!==e.RGB32F||console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."),i}function w(t){return t===Gd||t===kd||t===Hd?e.NEAREST:e.LINEAR}function _(t){var n=t.target;n.removeEventListener("dispose",_),function(t){var n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&d.delete(n),o.memory.textures--}function M(t){var n=t.target;n.removeEventListener("dispose",M),function(t){var n=r.get(t),i=r.get(t.texture);if(!t)return;void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLRenderTargetCube)for(var a=0;a<6;a++)e.deleteFramebuffer(n.__webglFramebuffer[a]),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[a]);else e.deleteFramebuffer(n.__webglFramebuffer),n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer);if(t.isWebGLMultiviewRenderTarget){e.deleteTexture(n.__webglColorTexture),e.deleteTexture(n.__webglDepthStencilTexture),o.memory.textures-=2;a=0;for(var s=n.__webglViewFramebuffers.length;a0&&a.__version!==t.version){var s=t.image;if(void 0===s)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==s.complete)return void O(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_2D,a.__webglTexture)}function S(t,i){if(6===t.image.length){var o=r.get(t);if(t.version>0&&o.__version!==t.version){C(o,t),n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var s=t&&t.isCompressedTexture,l=t.image[0]&&t.image[0].isDataTexture,u=[],p=0;p<6;p++)u[p]=s||l?l?t.image[p].image:t.image[p]:v(t.image[p],!1,!0,h);var d,f=u[0],m=g(f)||c,w=a.convert(t.format),_=a.convert(t.type),M=b(w,_);if(P(e.TEXTURE_CUBE_MAP,t,m),s){for(p=0;p<6;p++){d=u[p].mipmaps;for(var T=0;T1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function C(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",_),t.__webglTexture=e.createTexture(),o.memory.textures++)}function O(t,r,i){var o=e.TEXTURE_2D;r.isDataTexture2DArray&&(o=e.TEXTURE_2D_ARRAY),r.isDataTexture3D&&(o=e.TEXTURE_3D),C(t,r),n.activeTexture(e.TEXTURE0+i),n.bindTexture(o,t.__webglTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,r.unpackAlignment);var s=function(e){return!c&&(e.wrapS!==zd||e.wrapT!==zd||e.minFilter!==Gd&&e.minFilter!==Vd)}(r)&&!1===g(r.image),l=v(r.image,s,!1,u),h=g(l)||c,p=a.convert(r.format),d=a.convert(r.type),f=b(p,d);P(o,r,h);var m,w=r.mipmaps;if(r.isDepthTexture){if(f=e.DEPTH_COMPONENT,r.type===Qd){if(!1===c)throw new Error("Float Depth Texture only supported in WebGL2.0");f=e.DEPTH_COMPONENT32F}else c&&(f=e.DEPTH_COMPONENT16);r.format===hf&&f===e.DEPTH_COMPONENT&&r.type!==Zd&&r.type!==Kd&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Zd,d=a.convert(r.type)),r.format===uf&&(f=e.DEPTH_STENCIL,r.type!==rf&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=rf,d=a.convert(r.type))),n.texImage2D(e.TEXTURE_2D,0,f,l.width,l.height,0,p,d,null)}else if(r.isDataTexture)if(w.length>0&&h){for(var _=0,M=w.length;_0&&h){for(_=0,M=w.length;_=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=E,this.setTexture2DArray=function(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?O(a,t,i):(n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture))},this.setTexture3D=function(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?O(a,t,i):(n.activeTexture(e.TEXTURE0+i),n.bindTexture(e.TEXTURE_3D,a.__webglTexture))},this.setTextureCube=S,this.setTextureCubeDynamic=A,this.setupRenderTarget=function(i){var s=r.get(i),l=r.get(i.texture);i.addEventListener("dispose",M),l.__webglTexture=e.createTexture(),o.memory.textures++;var h=!0===i.isWebGLRenderTargetCube,u=!0===i.isWebGLMultisampleRenderTarget,p=!0===i.isWebGLMultiviewRenderTarget,d=g(i)||c;if(h){s.__webglFramebuffer=[];for(var f=0;f<6;f++)s.__webglFramebuffer[f]=e.createFramebuffer()}else if(s.__webglFramebuffer=e.createFramebuffer(),u)if(c){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,s.__webglColorRenderbuffer);var m=b(a.convert(i.texture.format),a.convert(i.texture.type)),v=F(i);e.renderbufferStorageMultisample(e.RENDERBUFFER,v,m,i.width,i.height),e.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,s.__webglColorRenderbuffer),e.bindRenderbuffer(e.RENDERBUFFER,null),i.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),N(s.__webglDepthRenderbuffer,i,!0)),e.bindFramebuffer(e.FRAMEBUFFER,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");else if(p){var w=i.width,_=i.height,T=i.numViews;e.bindFramebuffer(e.FRAMEBUFFER,s.__webglFramebuffer);var E=t.get("OVR_multiview2");o.memory.textures+=2;var S=e.createTexture();e.bindTexture(e.TEXTURE_2D_ARRAY,S),e.texParameteri(e.TEXTURE_2D_ARRAY,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D_ARRAY,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texImage3D(e.TEXTURE_2D_ARRAY,0,e.RGBA8,w,_,T,0,e.RGBA,e.UNSIGNED_BYTE,null),E.framebufferTextureMultiviewOVR(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,S,0,0,T);var A=e.createTexture();e.bindTexture(e.TEXTURE_2D_ARRAY,A),e.texParameteri(e.TEXTURE_2D_ARRAY,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D_ARRAY,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texImage3D(e.TEXTURE_2D_ARRAY,0,e.DEPTH24_STENCIL8,w,_,T,0,e.DEPTH_STENCIL,e.UNSIGNED_INT_24_8,null),E.framebufferTextureMultiviewOVR(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,A,0,0,T);var L=new Array(T);for(f=0;fp)return!1;for(var n=1,r=t.length;n=0){var l=i[s];if(void 0!==l){var h=l.normalized,u=l.itemSize;if(void 0===(M=b.get(l)))continue;var p=M.buffer,g=M.type,y=M.bytesPerElement;if(l.isInterleavedBufferAttribute){var x=l.data,w=x.stride,_=l.offset;x&&x.isInstancedInterleavedBuffer?(v.enableAttributeAndDivisor(c,x.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=x.meshPerAttribute*x.count)):v.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,p),d.vertexAttribPointer(c,u,g,h,w*y,_*y)}else l.isInstancedBufferAttribute?(v.enableAttributeAndDivisor(c,l.meshPerAttribute),void 0===t.maxInstancedCount&&(t.maxInstancedCount=l.meshPerAttribute*l.count)):v.enableAttribute(c),d.bindBuffer(d.ARRAY_BUFFER,p),d.vertexAttribPointer(c,u,g,h,0,0)}else if("instanceMatrix"===s){var M;if(void 0===(M=b.get(e.instanceMatrix)))continue;p=M.buffer,g=M.type;v.enableAttributeAndDivisor(c+0,1),v.enableAttributeAndDivisor(c+1,1),v.enableAttributeAndDivisor(c+2,1),v.enableAttributeAndDivisor(c+3,1),d.bindBuffer(d.ARRAY_BUFFER,p),d.vertexAttribPointer(c+0,4,g,!1,64,0),d.vertexAttribPointer(c+1,4,g,!1,64,16),d.vertexAttribPointer(c+2,4,g,!1,64,32),d.vertexAttribPointer(c+3,4,g,!1,64,48)}else if(void 0!==o){var T=o[s];if(void 0!==T)switch(T.length){case 2:d.vertexAttrib2fv(c,T);break;case 3:d.vertexAttrib3fv(c,T);break;case 4:d.vertexAttrib4fv(c,T);break;default:d.vertexAttrib1fv(c,T)}}}}v.disableUnusedAttributes()}(i,n,r,s),null!==l&&d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,u.buffer));var y=1/0;null!==l?y=l.count:void 0!==h&&(y=h.count);var x=n.drawRange.start*p,_=n.drawRange.count*p,M=null!==a?a.start*p:0,T=null!==a?a.count*p:1/0,E=Math.max(x,M),S=Math.min(y,x+_,M+T)-1,P=Math.max(0,S-E+1);if(0!==P){if(i.isMesh)if(!0===r.wireframe)v.setLineWidth(r.wireframeLinewidth*re()),g.setMode(d.LINES);else switch(i.drawMode){case zf:g.setMode(d.TRIANGLES);break;case Bf:g.setMode(d.TRIANGLE_STRIP);break;case Gf:g.setMode(d.TRIANGLE_FAN)}else if(i.isLine){var C=r.linewidth;void 0===C&&(C=1),v.setLineWidth(C*re()),i.isLineSegments?g.setMode(d.LINES):i.isLineLoop?g.setMode(d.LINE_LOOP):g.setMode(d.LINE_STRIP)}else i.isPoints?g.setMode(d.POINTS):i.isSprite&&g.setMode(d.TRIANGLES);i.isInstancedMesh?g.renderInstances(n,E,P,i.count):n.isInstancedBufferGeometry?g.renderInstances(n,E,P,n.maxInstancedCount):g.render(E,P)}}},this.compile=function(e,t){(p=E.get(e,t)).init(),e.traverse((function(e){e.isLight&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(t),e.traverse((function(t){if(t.material)if(Array.isArray(t.material))for(var n=0;n=0&&e.numSupportedMorphTargets++}if(e.morphNormals){e.numSupportedMorphNormals=0;for(f=0;f=0&&e.numSupportedMorphNormals++}var m=r.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=Q.numPlanes,r.numIntersection=Q.numIntersection,m.clippingPlanes=Q.uniform),r.fog=t,r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=o,r.needsLights&&(m.ambientLightColor.value=i.state.ambient,m.lightProbe.value=i.state.probe,m.directionalLights.value=i.state.directional,m.spotLights.value=i.state.spot,m.rectAreaLights.value=i.state.rectArea,m.pointLights.value=i.state.point,m.hemisphereLights.value=i.state.hemi,m.directionalShadowMap.value=i.state.directionalShadowMap,m.directionalShadowMatrix.value=i.state.directionalShadowMatrix,m.spotShadowMap.value=i.state.spotShadowMap,m.spotShadowMatrix.value=i.state.spotShadowMatrix,m.pointShadowMap.value=i.state.pointShadowMap,m.pointShadowMatrix.value=i.state.pointShadowMatrix);var v=r.program.getUniforms(),g=px.seqWithValue(v.seq,m);r.uniformsList=g}function xe(e,t,n,r){x.resetTextureUnits();var i=y.get(n),a=p.state.lights;if($&&(ee||e!==G)){var o=e===G&&n.id===z;Q.setState(n.clippingPlanes,n.clipIntersection,n.clipShadows,e,i,o)}n.version===i.__version&&(void 0===i.program?n.needsUpdate=!0:n.fog&&i.fog!==t?n.needsUpdate=!0:i.needsLights&&i.lightsStateVersion!==a.state.version?n.needsUpdate=!0:void 0===i.numClippingPlanes||i.numClippingPlanes===Q.numPlanes&&i.numIntersection===Q.numIntersection||(n.needsUpdate=!0)),n.version!==i.__version&&(ye(n,t,r),i.__version=n.version);var s,c,l=!1,h=!1,u=!1,f=i.program,g=f.getUniforms(),b=i.shader.uniforms;if(v.useProgram(f.program)&&(l=!0,h=!0,u=!0),n.id!==z&&(z=n.id,h=!0),l||G!==e){if(f.numMultiviewViews>0?se.updateCameraProjectionMatricesUniform(e,g):g.setValue(d,"projectionMatrix",e.projectionMatrix),m.logarithmicDepthBuffer&&g.setValue(d,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),G!==e&&(G=e,h=!0,u=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.envMap){var w=g.map.cameraPosition;void 0!==w&&w.setValue(d,ne.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&g.setValue(d,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.skinning)&&(f.numMultiviewViews>0?se.updateCameraViewMatricesUniform(e,g):g.setValue(d,"viewMatrix",e.matrixWorldInverse))}if(n.skinning){g.setOptional(d,r,"bindMatrix"),g.setOptional(d,r,"bindMatrixInverse");var _=r.skeleton;if(_){var M=_.bones;if(m.floatVertexTextures){if(void 0===_.boneTexture){var T=Math.sqrt(4*M.length);T=am.ceilPowerOfTwo(T),T=Math.max(T,4);var E=new Float32Array(T*T*4);E.set(_.boneMatrices);var S=new Yg(E,T,T,sf,Qd);_.boneMatrices=E,_.boneTexture=S,_.boneTextureSize=T}g.setValue(d,"boneTexture",_.boneTexture,x),g.setValue(d,"boneTextureSize",_.boneTextureSize)}else g.setOptional(d,_,"boneMatrices")}}return(h||i.receiveShadow!==r.receiveShadow)&&(i.receiveShadow=r.receiveShadow,g.setValue(d,"receiveShadow",r.receiveShadow)),h&&(g.setValue(d,"toneMappingExposure",C.toneMappingExposure),g.setValue(d,"toneMappingWhitePoint",C.toneMappingWhitePoint),i.needsLights&&(c=u,(s=b).ambientLightColor.needsUpdate=c,s.lightProbe.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),t&&n.fog&&function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)}(b,t),n.isMeshBasicMaterial?be(b,n):n.isMeshLambertMaterial?(be(b,n),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(b,n)):n.isMeshPhongMaterial?(be(b,n),n.isMeshToonMaterial?function(e,t){we(e,t),t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(b,n):we(b,n)):n.isMeshStandardMaterial?(be(b,n),n.isMeshPhysicalMaterial?function(e,t){_e(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===Gp&&e.clearcoatNormalScale.value.negate());e.transparency.value=t.transparency}(b,n):_e(b,n)):n.isMeshMatcapMaterial?(be(b,n),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Gp&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Gp&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isMeshDepthMaterial?(be(b,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isMeshDistanceMaterial?(be(b,n),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(b,n)):n.isMeshNormalMaterial?(be(b,n),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Gp&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Gp&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(b,n)):n.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(b,n),n.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(b,n)):n.isPointsMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*q,e.scale.value=.5*X,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);var n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(b,n):n.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);var n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(b,n):n.isShadowMaterial&&(b.color.value.copy(n.color),b.opacity.value=n.opacity),void 0!==b.ltc_1&&(b.ltc_1.value=$g.LTC_1),void 0!==b.ltc_2&&(b.ltc_2.value=$g.LTC_2),px.upload(d,i.uniformsList,b,x),n.isShaderMaterial&&(n.uniformsNeedUpdate=!1)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(px.upload(d,i.uniformsList,b,x),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&g.setValue(d,"center",r.center),f.numMultiviewViews>0?se.updateObjectMatricesUniforms(r,e,g):(g.setValue(d,"modelViewMatrix",r.modelViewMatrix),g.setValue(d,"normalMatrix",r.normalMatrix)),g.setValue(d,"modelMatrix",r.matrixWorld),f}function be(e,t){var n;e.opacity.value=t.opacity,t.color&&e.diffuse.value.copy(t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=y.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.aoMapIntensity.value=t.aoMapIntensity),t.map?n=t.map:t.specularMap?n=t.specularMap:t.displacementMap?n=t.displacementMap:t.normalMap?n=t.normalMap:t.bumpMap?n=t.bumpMap:t.roughnessMap?n=t.roughnessMap:t.metalnessMap?n=t.metalnessMap:t.alphaMap?n=t.alphaMap:t.emissiveMap&&(n=t.emissiveMap),void 0!==n&&(n.isWebGLRenderTarget&&(n=n.texture),!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}function we(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Gp&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Gp&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function _e(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Gp&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Gp&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}fe.setAnimationLoop((function(e){oe.isPresenting()||de&&de(e)})),"undefined"!=typeof window&&fe.setContext(window),this.setAnimationLoop=function(e){de=e,oe.setAnimationLoop(e),fe.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),t&&t.isCamera){if(!O){B.geometry=null,B.program=null,B.wireframe=!1,z=-1,G=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),oe.enabled&&oe.isPresenting()&&(t=oe.getCamera(t)),(p=E.get(e,t)).init(),e.onBeforeRender(C,e,t,n||F),te.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),K.setFromMatrix(te),ee=this.localClippingEnabled,$=Q.init(this.clippingPlanes,ee,t),(u=T.get(e,t)).init(),me(e,t,0,C.sortObjects),!0===C.sortObjects&&u.sort(),$&&Q.beginShadows();var i=p.state.shadowsArray;ce.render(i,e,t),p.setupLights(t),$&&Q.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),oe.enabled&&se.isAvailable()&&se.attachCamera(t),S.render(u,e,t,r);var a=u.opaque,o=u.transparent;if(e.overrideMaterial){var s=e.overrideMaterial;a.length&&ve(a,e,t,s),o.length&&ve(o,e,t,s)}else a.length&&ve(a,e,t),o.length&&ve(o,e,t);e.onAfterRender(C,e,t),null!==F&&(x.updateRenderTargetMipmap(F),x.updateMultisampleRenderTarget(F)),v.buffers.depth.setTest(!0),v.buffers.depth.setMask(!0),v.buffers.color.setMask(!0),v.setPolygonOffset(!1),oe.enabled&&(se.isAvailable()&&se.detachCamera(t),oe.submitFrame()),u=null,p=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setFramebuffer=function(e){I!==e&&null===F&&d.bindFramebuffer(d.FRAMEBUFFER,e),I=e},this.getActiveCubeFace=function(){return N},this.getActiveMipmapLevel=function(){return D},this.getRenderTarget=function(){return F},this.setRenderTarget=function(e,t,n){F=e,N=t,D=n,e&&void 0===y.get(e).__webglFramebuffer&&x.setupRenderTarget(e);var r=I,i=!1;if(e){var a=y.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(r=a[t||0],i=!0):r=e.isWebGLMultisampleRenderTarget?y.get(e).__webglMultisampledFramebuffer:a,H.copy(e.viewport),V.copy(e.scissor),j=e.scissorTest}else H.copy(Y).multiplyScalar(q).floor(),V.copy(Z).multiplyScalar(q).floor(),j=J;if(U!==r&&(d.bindFramebuffer(d.FRAMEBUFFER,r),U=r),v.viewport(H),v.scissor(V),v.setScissorTest(j),i){var o=y.get(e.texture);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+(t||0),o.__webglTexture,n||0)}},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(e&&e.isWebGLRenderTarget){var s=y.get(e).__webglFramebuffer;if(e.isWebGLRenderTargetCube&&void 0!==o&&(s=s[o]),s){var c=!1;s!==U&&(d.bindFramebuffer(d.FRAMEBUFFER,s),c=!0);try{var l=e.texture,h=l.format,u=l.type;if(h!==sf&&P.convert(h)!==d.getParameter(d.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(u===Xd||P.convert(u)===d.getParameter(d.IMPLEMENTATION_COLOR_READ_TYPE)||u===Qd&&(m.isWebGL2||f.get("OES_texture_float")||f.get("WEBGL_color_buffer_float"))||u===$d&&(m.isWebGL2?f.get("EXT_color_buffer_float"):f.get("EXT_color_buffer_half_float"))))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");d.checkFramebufferStatus(d.FRAMEBUFFER)===d.FRAMEBUFFER_COMPLETE?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&d.readPixels(t,n,r,i,P.convert(h),P.convert(u),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{c&&d.bindFramebuffer(d.FRAMEBUFFER,U)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r),o=P.convert(t.format);x.setTexture2D(t,0),d.copyTexImage2D(d.TEXTURE_2D,n,o,e.x,e.y,i,a,0),v.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){var i=t.image.width,a=t.image.height,o=P.convert(n.format),s=P.convert(n.type);x.setTexture2D(n,0),t.isDataTexture?d.texSubImage2D(d.TEXTURE_2D,r||0,e.x,e.y,i,a,o,s,t.image.data):d.texSubImage2D(d.TEXTURE_2D,r||0,e.x,e.y,o,s,t.image),v.unbindTexture()},this.initTexture=function(e){x.setTexture2D(e,0),v.unbindTexture()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function sb(e,t){this.name="",this.color=new Fv(e),this.density=void 0!==t?t:25e-5}function cb(e,t,n){this.name="",this.color=new Fv(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}function lb(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=tm,this.updateRange={offset:0,count:-1},this.version=0}function hb(e,t,n,r){this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function ub(e){Hv.call(this),this.type="SpriteMaterial",this.color=new Fv(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.assign(ib.prototype,nm.prototype),Object.assign(ab.prototype,nm.prototype),Object.assign(sb.prototype,{isFogExp2:!0,clone:function(){return new sb(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}),Object.assign(cb.prototype,{isFog:!0,clone:function(){return new cb(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}),Object.defineProperty(lb.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(lb.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;re.far||t.push({distance:s,point:pb.clone(),uv:Ov.getUV(pb,yb,xb,bb,wb,_b,Mb,new om),face:null,object:this})}},clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return Wm.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}});var Sb=new hm,Ab=new hm;function Lb(){Wm.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}function Rb(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),Ag.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Am,this.bindMatrixInverse=new Am}Lb.prototype=Object.assign(Object.create(Wm.prototype),{constructor:Lb,isLOD:!0,copy:function(e){Wm.prototype.copy.call(this,e,!1);for(var t=e.levels,n=0,r=t.length;n0){for(var n=1,r=t.length;n0){Sb.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(Sb);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){Sb.setFromMatrixPosition(e.matrixWorld),Ab.setFromMatrixPosition(this.matrixWorld);var n=Sb.distanceTo(Ab);t[0].object.visible=!0;for(var r=1,i=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(;r0&&(Fb[0].instanceId=i,Fb[0].object=this,t.push(Fb[0]),Fb.length=0)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){}}),Bb.prototype=Object.create(Hv.prototype),Bb.prototype.constructor=Bb,Bb.prototype.isLineBasicMaterial=!0,Bb.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this};var Gb=new hm,kb=new hm,Hb=new Am,Vb=new gv,jb=new lv;function Wb(e,t,n){1===n&&console.error("THREE.Line: parameter THREE.LinePieces no longer supported. Use THREE.LineSegments instead."),Wm.call(this),this.type="Line",this.geometry=void 0!==e?e:new lg,this.material=void 0!==t?t:new Bb({color:16777215*Math.random()})}Wb.prototype=Object.assign(Object.create(Wm.prototype),{constructor:Wb,isLine:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[0],r=1,i=t.count;ro))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}else for(m=0,v=d.length/3-1;mo))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else if(r.isGeometry){var x=r.vertices,b=x.length;for(m=0;mo))h.applyMatrix4(this.matrixWorld),(w=e.ray.origin.distanceTo(h))e.far||t.push({distance:w,point:l.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}});var Xb=new hm,qb=new hm;function Yb(e,t){Wb.call(this,e,t),this.type="LineSegments"}function Zb(e,t){Wb.call(this,e,t),this.type="LineLoop"}function Jb(e){Hv.call(this),this.type="PointsMaterial",this.color=new Fv(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}Yb.prototype=Object.assign(Object.create(Wb.prototype),{constructor:Yb,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;ri.far)return;a.push({distance:l,distanceToRay:Math.sqrt(s),point:c,index:t,face:null,object:o})}}function rw(e,t,n,r,i,a,o,s,c){vm.call(this,e,t,n,r,i,a,o,s,c),this.format=void 0!==o?o:of,this.minFilter=void 0!==a?a:Vd,this.magFilter=void 0!==i?i:Vd,this.generateMipmaps=!1}function iw(e,t,n,r,i,a,o,s,c,l,h,u){vm.call(this,null,a,o,s,c,l,r,i,h,u),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function aw(e,t,n,r,i,a,o,s,c){vm.call(this,e,t,n,r,i,a,o,s,c),this.needsUpdate=!0}function ow(e,t,n,r,i,a,o,s,c,l){if((l=void 0!==l?l:hf)!==hf&&l!==uf)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===hf&&(n=Zd),void 0===n&&l===uf&&(n=rf),vm.call(this,null,r,i,a,o,s,l,n,c),this.image={width:e,height:t},this.magFilter=void 0!==o?o:Gd,this.minFilter=void 0!==s?s:Gd,this.flipY=!1,this.generateMipmaps=!1}function sw(e){lg.call(this),this.type="WireframeGeometry";var t,n,r,i,a,o,s,c,l,h,u=[],p=[0,0],d={},f=["a","b","c"];if(e&&e.isGeometry){var m=e.faces;for(t=0,r=m.length;t=0?(e(v-1e-5,m,u),p.subVectors(h,u)):(e(v+1e-5,m,u),p.subVectors(u,h)),m-1e-5>=0?(e(v,m-1e-5,u),d.subVectors(h,u)):(e(v,m+1e-5,u),d.subVectors(u,h)),l.crossVectors(p,d).normalize(),s.push(l.x,l.y,l.z),c.push(v,m)}}for(r=0;r.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new Qv(i,3)),this.setAttribute("normal",new Qv(i.slice(),3)),this.setAttribute("uv",new Qv(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}function pw(e,t){Ng.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new dw(e,t)),this.mergeVertices()}function dw(e,t){uw.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function fw(e,t){Ng.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new mw(e,t)),this.mergeVertices()}function mw(e,t){uw.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function vw(e,t){Ng.call(this),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new gw(e,t)),this.mergeVertices()}function gw(e,t){var n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1];uw.call(this,r,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function yw(e,t){Ng.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new xw(e,t)),this.mergeVertices()}function xw(e,t){var n=(1+Math.sqrt(5))/2,r=1/n,i=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r];uw.call(this,i,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function bw(e,t,n,r,i,a){Ng.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new ww(e,t,n,r,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function ww(e,t,n,r,i){lg.call(this),this.type="TubeBufferGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i},t=t||64,n=n||1,r=r||8,i=i||!1;var a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,c=new hm,l=new hm,h=new om,u=new hm,p=[],d=[],f=[],m=[];function v(i){u=e.getPointAt(i/t,u);var o=a.normals[i],h=a.binormals[i];for(s=0;s<=r;s++){var f=s/r*Math.PI*2,m=Math.sin(f),v=-Math.cos(f);l.x=v*o.x+m*h.x,l.y=v*o.y+m*h.y,l.z=v*o.z+m*h.z,l.normalize(),d.push(l.x,l.y,l.z),c.x=u.x+n*l.x,c.y=u.y+n*l.y,c.z=u.z+n*l.z,p.push(c.x,c.y,c.z)}}!function(){for(o=0;o0){var o=i[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),rw.prototype=Object.assign(Object.create(vm.prototype),{constructor:rw,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),iw.prototype=Object.create(vm.prototype),iw.prototype.constructor=iw,iw.prototype.isCompressedTexture=!0,aw.prototype=Object.create(vm.prototype),aw.prototype.constructor=aw,aw.prototype.isCanvasTexture=!0,ow.prototype=Object.create(vm.prototype),ow.prototype.constructor=ow,ow.prototype.isDepthTexture=!0,sw.prototype=Object.create(lg.prototype),sw.prototype.constructor=sw,cw.prototype=Object.create(Ng.prototype),cw.prototype.constructor=cw,lw.prototype=Object.create(lg.prototype),lw.prototype.constructor=lw,hw.prototype=Object.create(Ng.prototype),hw.prototype.constructor=hw,uw.prototype=Object.create(lg.prototype),uw.prototype.constructor=uw,pw.prototype=Object.create(Ng.prototype),pw.prototype.constructor=pw,dw.prototype=Object.create(uw.prototype),dw.prototype.constructor=dw,fw.prototype=Object.create(Ng.prototype),fw.prototype.constructor=fw,mw.prototype=Object.create(uw.prototype),mw.prototype.constructor=mw,vw.prototype=Object.create(Ng.prototype),vw.prototype.constructor=vw,gw.prototype=Object.create(uw.prototype),gw.prototype.constructor=gw,yw.prototype=Object.create(Ng.prototype),yw.prototype.constructor=yw,xw.prototype=Object.create(uw.prototype),xw.prototype.constructor=xw,bw.prototype=Object.create(Ng.prototype),bw.prototype.constructor=bw,ww.prototype=Object.create(lg.prototype),ww.prototype.constructor=ww,ww.prototype.toJSON=function(){var e=lg.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},_w.prototype=Object.create(Ng.prototype),_w.prototype.constructor=_w,Mw.prototype=Object.create(lg.prototype),Mw.prototype.constructor=Mw,Tw.prototype=Object.create(Ng.prototype),Tw.prototype.constructor=Tw,Ew.prototype=Object.create(lg.prototype),Ew.prototype.constructor=Ew;var Sw=function(e,t,n){n=n||2;var r,i,a,o,s,c,l,h=t&&t.length,u=h?t[0]*n:e.length,p=Aw(e,0,u,n,!0),d=[];if(!p||p.next===p.prev)return d;if(h&&(p=function(e,t,n,r){var i,a,o,s,c,l=[];for(i=0,a=t.length;i80*n){r=a=e[0],i=o=e[1];for(var f=n;fa&&(a=s),c>o&&(o=c);l=0!==(l=Math.max(a-r,o-i))?1/l:0}return Rw(p,d,n,r,i,l),d};function Aw(e,t,n,r,i){var a,o;if(i===function(e,t,n,r){for(var i=0,a=t,o=n-r;a0)for(a=t;a=t;a-=r)o=Ww(a,e[a],e[a+1],o);return o&&kw(o,o.next)&&(Xw(o),o=o.next),o}function Lw(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!kw(r,r.next)&&0!==Gw(r.prev,r,r.next))r=r.next;else{if(Xw(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function Rw(e,t,n,r,i,a,o){if(e){!o&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=Fw(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,o,s,c,l=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t0||c>0&&r;)0!==s&&(0===c||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,l*=2}while(o>1)}(i)}(e,r,i,a);for(var s,c,l=e;e.prev!==e.next;)if(s=e.prev,c=e.next,a?Cw(e,r,i,a):Pw(e))t.push(s.i/n),t.push(e.i/n),t.push(c.i/n),Xw(e),e=c.next,l=c.next;else if((e=c)===l){o?1===o?Rw(e=Ow(e,t,n),t,n,r,i,a,2):2===o&&Iw(e,t,n,r,i,a):Rw(Lw(e),t,n,r,i,a,1);break}}}function Pw(e){var t=e.prev,n=e,r=e.next;if(Gw(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(zw(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Gw(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Cw(e,t,n,r){var i=e.prev,a=e,o=e.next;if(Gw(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,h=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,u=Fw(s,c,t,n,r),p=Fw(l,h,t,n,r),d=e.prevZ,f=e.nextZ;d&&d.z>=u&&f&&f.z<=p;){if(d!==e.prev&&d!==e.next&&zw(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Gw(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,f!==e.prev&&f!==e.next&&zw(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Gw(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&zw(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Gw(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;f&&f.z<=p;){if(f!==e.prev&&f!==e.next&&zw(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Gw(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Ow(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!kw(i,a)&&Hw(i,r,r.next,a)&&Vw(i,a)&&Vw(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Xw(r),Xw(r.next),r=e=a),r=r.next}while(r!==e);return r}function Iw(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Bw(o,s)){var c=jw(o,s);return o=Lw(o,o.next),c=Lw(c,c.next),Rw(o,t,n,r,i,a),void Rw(c,t,n,r,i,a)}s=s.next}o=o.next}while(o!==e)}function Nw(e,t){return e.x-t.x}function Dw(e,t){if(t=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x=r.x&&r.x>=h&&i!==r.x&&zw(an.x)&&Vw(r,e)&&(n=r,p=c),r=r.next;return n}(e,t)){var n=jw(t,e);Lw(n,n.next)}}function Fw(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Uw(e){var t=e,n=e;do{(t.x=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function Bw(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Hw(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&Vw(e,t)&&Vw(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)}function Gw(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function kw(e,t){return e.x===t.x&&e.y===t.y}function Hw(e,t,n,r){return!!(kw(e,n)&&kw(t,r)||kw(e,r)&&kw(n,t))||Gw(e,t,n)>0!=Gw(e,t,r)>0&&Gw(n,r,e)>0!=Gw(n,r,t)>0}function Vw(e,t){return Gw(e.prev,e,e.next)<0?Gw(e,t,e.next)>=0&&Gw(e,e.prev,t)>=0:Gw(e,t,e.prev)<0||Gw(e,e.next,t)<0}function jw(e,t){var n=new qw(e.i,e.x,e.y),r=new qw(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function Ww(e,t,n,r){var i=new qw(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Xw(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function qw(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Yw={area:function(e){for(var t=e.length,n=0,r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function Jw(e,t){for(var n=0;nNumber.EPSILON){var p=Math.sqrt(h),d=Math.sqrt(c*c+l*l),f=t.x-s/p,m=t.y+o/p,v=((n.x-l/d-f)*l-(n.y+c/d-m)*c)/(o*l-s*c),g=(r=f+o*v-e.x)*r+(i=m+s*v-e.y)*i;if(g<=2)return new om(r,i);a=Math.sqrt(g/2)}else{var y=!1;o>Number.EPSILON?c>Number.EPSILON&&(y=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(l)&&(y=!0),y?(r=-s,i=o,a=Math.sqrt(h)):(r=o,i=s,a=Math.sqrt(h/2))}return new om(r/a,i/a)}for(var G=[],k=0,H=R.length,V=H-1,j=k+1;k=0;C--){for(I=C/d,N=h*Math.cos(I*Math.PI/2),O=u*Math.sin(I*Math.PI/2)+p,k=0,H=R.length;k=0;){n=k,(r=k-1)<0&&(r=e.length-1);var i=0,a=s+2*d;for(i=0;i0)&&f.push(_,M,E),(c!==n-1||l0&&g(!0),t>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new Qv(h,3)),this.setAttribute("normal",new Qv(u,3)),this.setAttribute("uv",new Qv(p,2))}function m_(e,t,n,r,i,a,o){d_.call(this,0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function v_(e,t,n,r,i,a,o){f_.call(this,0,e,t,n,r,i,a,o),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}function g_(e,t,n,r){Ng.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},this.fromBufferGeometry(new y_(e,t,n,r)),this.mergeVertices()}function y_(e,t,n,r){lg.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},e=e||1,t=void 0!==t?Math.max(3,t):8,n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var i,a,o=[],s=[],c=[],l=[],h=new hm,u=new om;for(s.push(0,0,0),c.push(0,0,1),l.push(.5,.5),a=0,i=3;a<=t;a++,i+=3){var p=n+a/t*r;h.x=e*Math.cos(p),h.y=e*Math.sin(p),s.push(h.x,h.y,h.z),c.push(0,0,1),u.x=(s[i]/e+1)/2,u.y=(s[i+1]/e+1)/2,l.push(u.x,u.y)}for(i=1;i<=t;i++)o.push(i,i+1,0);this.setIndex(o),this.setAttribute("position",new Qv(s,3)),this.setAttribute("normal",new Qv(c,3)),this.setAttribute("uv",new Qv(l,2))}function x_(e){Hv.call(this),this.type="ShadowMaterial",this.color=new Fv(0),this.transparent=!0,this.setValues(e)}function b_(e){kg.call(this,e),this.type="RawShaderMaterial"}function w_(e){Hv.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Fv(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kf,this.normalScale=new om(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function __(e){w_.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearcoat=0,this.clearcoatRoughness=0,this.sheen=null,this.clearcoatNormalScale=new om(1,1),this.clearcoatNormalMap=null,this.transparency=0,this.setValues(e)}function M_(e){Hv.call(this),this.type="MeshPhongMaterial",this.color=new Fv(16777215),this.specular=new Fv(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kf,this.normalScale=new om(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=wd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function T_(e){M_.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function E_(e){Hv.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kf,this.normalScale=new om(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function S_(e){Hv.call(this),this.type="MeshLambertMaterial",this.color=new Fv(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=wd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function A_(e){Hv.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Fv(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Kf,this.normalScale=new om(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function L_(e){Bb.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}t_.prototype=Object.create(Ng.prototype),t_.prototype.constructor=t_,n_.prototype=Object.create(Qw.prototype),n_.prototype.constructor=n_,r_.prototype=Object.create(Ng.prototype),r_.prototype.constructor=r_,i_.prototype=Object.create(lg.prototype),i_.prototype.constructor=i_,a_.prototype=Object.create(Ng.prototype),a_.prototype.constructor=a_,o_.prototype=Object.create(lg.prototype),o_.prototype.constructor=o_,s_.prototype=Object.create(Ng.prototype),s_.prototype.constructor=s_,c_.prototype=Object.create(lg.prototype),c_.prototype.constructor=c_,l_.prototype=Object.create(Ng.prototype),l_.prototype.constructor=l_,l_.prototype.toJSON=function(){var e=Ng.prototype.toJSON.call(this);return u_(this.parameters.shapes,e)},h_.prototype=Object.create(lg.prototype),h_.prototype.constructor=h_,h_.prototype.toJSON=function(){var e=lg.prototype.toJSON.call(this);return u_(this.parameters.shapes,e)},p_.prototype=Object.create(lg.prototype),p_.prototype.constructor=p_,d_.prototype=Object.create(Ng.prototype),d_.prototype.constructor=d_,f_.prototype=Object.create(lg.prototype),f_.prototype.constructor=f_,m_.prototype=Object.create(d_.prototype),m_.prototype.constructor=m_,v_.prototype=Object.create(f_.prototype),v_.prototype.constructor=v_,g_.prototype=Object.create(Ng.prototype),g_.prototype.constructor=g_,y_.prototype=Object.create(lg.prototype),y_.prototype.constructor=y_,x_.prototype=Object.create(Hv.prototype),x_.prototype.constructor=x_,x_.prototype.isShadowMaterial=!0,x_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.color.copy(e.color),this},b_.prototype=Object.create(kg.prototype),b_.prototype.constructor=b_,b_.prototype.isRawShaderMaterial=!0,w_.prototype=Object.create(Hv.prototype),w_.prototype.constructor=w_,w_.prototype.isMeshStandardMaterial=!0,w_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},__.prototype=Object.create(w_.prototype),__.prototype.constructor=__,__.prototype.isMeshPhysicalMaterial=!0,__.prototype.copy=function(e){return w_.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearcoat=e.clearcoat,this.clearcoatRoughness=e.clearcoatRoughness,e.sheen?this.sheen=(this.sheen||new Fv).copy(e.sheen):this.sheen=null,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.transparency=e.transparency,this},M_.prototype=Object.create(Hv.prototype),M_.prototype.constructor=M_,M_.prototype.isMeshPhongMaterial=!0,M_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},T_.prototype=Object.create(M_.prototype),T_.prototype.constructor=T_,T_.prototype.isMeshToonMaterial=!0,T_.prototype.copy=function(e){return M_.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},E_.prototype=Object.create(Hv.prototype),E_.prototype.constructor=E_,E_.prototype.isMeshNormalMaterial=!0,E_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},S_.prototype=Object.create(Hv.prototype),S_.prototype.constructor=S_,S_.prototype.isMeshLambertMaterial=!0,S_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},A_.prototype=Object.create(Hv.prototype),A_.prototype.constructor=A_,A_.prototype.isMeshMatcapMaterial=!0,A_.prototype.copy=function(e){return Hv.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},L_.prototype=Object.create(Bb.prototype),L_.prototype.constructor=L_,L_.prototype.isLineDashedMaterial=!0,L_.prototype.copy=function(e){return Bb.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var R_={arraySlice:function(e,t,n){return R_.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){for(var t=e.length,n=new Array(t),r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){for(var r=e.length,i=new e.constructor(r),a=0,o=0;o!==r;++a)for(var s=n[a]*t,c=0;c!==t;++c)i[o++]=e[s+c];return i},flattenJSON:function(e,t,n,r){for(var i=1,a=e[0];void 0!==a&&void 0===a[r];)a=e[i++];if(void 0!==a){var o=a[r];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[r])&&(t.push(a.time),n.push.apply(n,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[r])&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{void 0!==(o=a[r])&&(t.push(a.time),n.push(o)),a=e[i++]}while(void 0!==a)}},subclip:function(e,t,n,r,i){i=i||30;var a=e.clone();a.name=t;for(var o=[],s=0;s=r)){h.push(c.times[p]);for(var f=0;fa.tracks[s].times[0]&&(m=a.tracks[s].times[0]);for(s=0;s=i)break e;var s=t[1];e=(i=t[--n-1]))break t}a=n,n=0}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(i=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=R_.arraySlice(n,i,a),this.values=R_.arraySlice(this.values,i*o,a*o)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,o=0;o!==i;o++){var s=n[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),e=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),e=!1;break}a=s}if(void 0!==r&&R_.isTypedArray(r)){o=0;for(var c=r.length;o!==c;++o){var l=r[o];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,l),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,n=this.getValueSize(),r=2302===this.getInterpolation(),i=1,a=e.length-1,o=1;o0){e[i]=e[a];for(f=a*n,m=i*n,p=0;p!==n;++p)t[m+p]=t[f+p];++i}return i!==e.length&&(this.times=R_.arraySlice(e,0,i),this.values=R_.arraySlice(t,0,i*n)),this},clone:function(){var e=R_.arraySlice(this.times,0),t=R_.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),D_.prototype=Object.assign(Object.create(N_.prototype),{constructor:D_,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),F_.prototype=Object.assign(Object.create(N_.prototype),{constructor:F_,ValueTypeName:"color"}),U_.prototype=Object.assign(Object.create(N_.prototype),{constructor:U_,ValueTypeName:"number"}),z_.prototype=Object.assign(Object.create(P_.prototype),{constructor:z_,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=(n-t)/(r-t),l=s+o;s!==l;s+=4)sm.slerpFlat(i,0,a,s-o,a,s,c);return i}}),B_.prototype=Object.assign(Object.create(N_.prototype),{constructor:B_,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new z_(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),G_.prototype=Object.assign(Object.create(N_.prototype),{constructor:G_,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),k_.prototype=Object.assign(Object.create(N_.prototype),{constructor:k_,ValueTypeName:"vector"}),Object.assign(H_,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,a=n.length;i!==a;++i)t.push(V_(n[i]).scale(r));return new H_(e.name,e.duration,t)},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},i=0,a=n.length;i!==a;++i)t.push(N_.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,a=[],o=0;o1){var l=r[u=c[1]];l||(r[u]=l=[]),l.push(s)}}var h=[];for(var u in r)h.push(H_.CreateFromMorphTargetSequence(u,r[u],t,n));return h},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var n=function(e,t,n,r,i){if(0!==n.length){var a=[],o=[];R_.flattenJSON(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.length||-1,o=e.fps||30,s=e.hierarchy||[],c=0;c0||0===e.search(/^data\:image\/jpeg/);i.format=r?of:sf,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(nM.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var n=this.getUtoTmapping(e);return this.getPoint(n,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPoint(n/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)a+=(t=this.getPoint(n/e)).distanceTo(i),r.push(a),i=t;return this.cacheArcLengths=r,r},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var n,r=this.getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=r[i=Math.floor(s+(c-s)/2)]-n)<0)s=i+1;else{if(!(o>0)){c=i;break}c=i-1}if(r[i=c]===n)return i/(a-1);var l=r[i];return(i+(n-l)/(r[i+1]-l))/(a-1)},getTangent:function(e){var t=e-1e-4,n=e+1e-4;t<0&&(t=0),n>1&&(n=1);var r=this.getPoint(t);return this.getPoint(n).clone().sub(r).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var n,r,i,a=new hm,o=[],s=[],c=[],l=new hm,h=new Am;for(n=0;n<=e;n++)r=n/e,o[n]=this.getTangentAt(r),o[n].normalize();s[0]=new hm,c[0]=new hm;var u=Number.MAX_VALUE,p=Math.abs(o[0].x),d=Math.abs(o[0].y),f=Math.abs(o[0].z);for(p<=u&&(u=p,a.set(1,0,0)),d<=u&&(u=d,a.set(0,1,0)),f<=u&&a.set(0,0,1),l.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],l),c[0].crossVectors(o[0],s[0]),n=1;n<=e;n++)s[n]=s[n-1].clone(),c[n]=c[n-1].clone(),l.crossVectors(o[n-1],o[n]),l.length()>Number.EPSILON&&(l.normalize(),i=Math.acos(am.clamp(o[n-1].dot(o[n]),-1,1)),s[n].applyMatrix4(h.makeRotationAxis(l,i))),c[n].crossVectors(o[n],s[n]);if(!0===t)for(i=Math.acos(am.clamp(s[0].dot(s[e]),-1,1)),i/=e,o[0].dot(l.crossVectors(s[0],s[e]))>0&&(i=-i),n=1;n<=e;n++)s[n].applyMatrix4(h.makeRotationAxis(o[n],i*n)),c[n].crossVectors(o[n],s[n]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),rM.prototype=Object.create(nM.prototype),rM.prototype.constructor=rM,rM.prototype.isEllipseCurve=!0,rM.prototype.getPoint=function(e,t){for(var n=t||new om,r=2*Math.PI,i=this.aEndAngle-this.aStartAngle,a=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(h)/c)+1)*c:0===u&&h===c-1&&(h=c-2,u=1),this.closed||h>0?n=s[(h-1)%c]:(oM.subVectors(s[0],s[1]).add(s[0]),n=oM),r=s[h%c],i=s[(h+1)%c],this.closed||h+2r.length-2?r.length-1:a+1],h=r[a>r.length-3?r.length-1:a+2];return n.set(uM(o,s.x,c.x,l.x,h.x),uM(o,s.y,c.y,l.y,h.y)),n},bM.prototype.copy=function(e){nM.prototype.copy.call(this,e),this.points=[];for(var t=0,n=e.points.length;t=t){var i=n[r]-t,a=this.curves[r],o=a.getLength(),s=0===o?0:1-i/o;return a.getPointAt(s)}r++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,n=0,r=this.curves.length;n1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){nM.prototype.copy.call(this,e),this.curves=[];for(var t=0,n=e.curves.length;t0){var l=c.getPoint(0);l.equals(this.currentPoint)||this.lineTo(l.x,l.y)}this.curves.push(c);var h=c.getPoint(1);return this.currentPoint.copy(h),this},copy:function(e){return wM.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=wM.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return wM.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),MM.prototype=Object.assign(Object.create(_M.prototype),{constructor:MM,getPointsHoles:function(e){for(var t=[],n=0,r=this.holes.length;n0){var a=new $_(new W_(t));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=e.length;o0?new Rb(o,s):new Ag(o,s);break;case"InstancedMesh":o=i(e.geometry),s=a(e.material);var c=e.count,l=e.instanceMatrix;(r=new zb(o,s,c)).instanceMatrix=new jv(new Float32Array(l.array),16);break;case"LOD":r=new Lb;break;case"Line":r=new Wb(i(e.geometry),a(e.material),e.mode);break;case"LineLoop":r=new Zb(i(e.geometry),a(e.material));break;case"LineSegments":r=new Yb(i(e.geometry),a(e.material));break;case"PointCloud":case"Points":r=new tw(i(e.geometry),a(e.material));break;case"Sprite":r=new Tb(a(e.material));break;case"Group":r=new Qx;break;default:r=new Wm}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(r.matrixAutoUpdate=e.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.layers&&(r.layers.mask=e.layers),void 0!==e.drawMode&&r.setDrawMode(e.drawMode),void 0!==e.children)for(var h=e.children,u=0;uNumber.EPSILON){if(l<0&&(o=t[a],c=-c,s=t[i],l=-l),e.ys.y)continue;if(e.y===o.y){if(e.x===o.x)return!0}else{var h=l*(e.x-o.x)-c*(e.y-o.y);if(0===h)return!0;if(h<0)continue;r=!r}}else{if(e.y!==o.y)continue;if(s.x<=e.x&&e.x<=o.x||o.x<=e.x&&e.x<=s.x)return!0}}return r}var i=Yw.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return n(a);var o,s,c,l=[];if(1===a.length)return s=a[0],(c=new MM).curves=s.curves,l.push(c),l;var h=!i(a[0].getPoints());h=e?!h:h;var u,p,d=[],f=[],m=[],v=0;f[v]=void 0,m[v]=[];for(var g=0,y=a.length;g1){for(var x=!1,b=[],w=0,_=f.length;w<_;w++)d[w]=[];for(w=0,_=f.length;w<_;w++)for(var M=m[w],T=0;T0&&(x||(m=d))}g=0;for(var L=f.length;g0){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e=.5)for(var a=0;a!==i;++a)e[t+a]=e[n+a]},_slerp:function(e,t,n,r){sm.slerpFlat(e,t,e,t,e,n,r)},_lerp:function(e,t,n,r,i){for(var a=1-r,o=0;o!==i;++o){var s=t+o;e[s]=e[s]*a+e[n+o]*r}}});var bT=new RegExp("[\\[\\]\\.:\\/]","g"),wT="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",_T=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),MT=/(WCOD+)?/.source.replace("WCOD",wT),TT=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ET=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ST=new RegExp("^"+_T+MT+TT+ET+"$"),AT=["material","materials","bones"];function LT(e,t,n){var r=n||RT.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function RT(e,t,n){this.path=t,this.parsedPath=n||RT.parseTrackName(t),this.node=RT.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function PT(e,t,n){this._mixer=e,this._clip=t,this._localRoot=n||null;for(var r=t.tracks,i=r.length,a=new Array(i),o={endingStart:Uf,endingEnd:Uf},s=0;s!==i;++s){var c=r[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(i),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ff,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function CT(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function OT(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function IT(e,t,n){lb.call(this,e,t),this.meshPerAttribute=n||1}function NT(e,t,n,r){this.ray=new gv(e,t),this.near=n||0,this.far=r||1/0,this.camera=null,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function DT(e,t){return e.distance-t.distance}function FT(e,t,n,r){if(!1!==e.visible&&(e.raycast(t,n),!0===r))for(var i=e.children,a=0,o=i.length;a=t){var h=t++,u=e[h];n[u.uuid]=l,e[l]=u,n[c]=h,e[h]=s;for(var p=0,d=i;p!==d;++p){var f=r[p],m=f[h],v=f[l];f[l]=m,f[h]=v}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,n=this.nCachedObjects_,r=this._indicesByUUID,i=this._bindings,a=i.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],l=c.uuid,h=r[l];if(void 0!==h)if(delete r[l],h0)for(var c=this._interpolants,l=this._propertyBindings,h=0,u=c.length;h!==u;++h)c[h].evaluate(o),l[h].accumulate(r,s)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;if(null!==n)t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t,t},_updateTime:function(e){var t=this.time+e,n=this._clip.duration,r=this.loop,i=this._loopCount,a=2202===r;if(0===e)return-1===i?t:a&&1==(1&i)?n-t:t;if(2200===r){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(t>=n)t=n;else{if(!(t<0)){this.time=t;break e}t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),t>=n||t<0){var o=Math.floor(t/n);t-=n*o,i+=Math.abs(o);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=e>0?n:0,this.time=t,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=t,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=t;if(a&&1==(1&i))return n-t}return t},_setEndings:function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:Uf:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:Uf:2402)},_scheduleFading:function(e,t,n){var r=this._mixer,i=r.time,a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}),CT.prototype=Object.assign(Object.create(nm.prototype),{constructor:CT,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,c=this._bindingsByRootAndName,l=c[s];void 0===l&&(l={},c[s]=l);for(var h=0;h!==i;++h){var u=r[h],p=u.name,d=l[p];if(void 0!==d)a[h]=d;else{if(void 0!==(d=a[h])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=t&&t._propertyBindings[h].binding.parsedPath;++(d=new xT(RT.create(n,p,f),u.ValueTypeName,u.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),a[h]=d}o[h].resultBuffer=d.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,a=0,o=i.length;a!==o;++a){var s=i[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&tthis.max.x||e.ythis.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new om),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new om),t.copy(e).clamp(this.min,this.max)},distanceToPoint:function(e){return UT.copy(e).clamp(this.min,this.max).sub(e).length()},intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}});var BT=new hm,GT=new hm;function kT(e,t){this.start=void 0!==e?e:new hm,this.end=void 0!==t?t:new hm}function HT(e){Wm.call(this),this.material=e,this.render=function(){}}Object.assign(kT.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new hm),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new hm),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new hm),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:function(e,t){BT.subVectors(e,this.start),GT.subVectors(this.end,this.start);var n=GT.dot(GT),r=GT.dot(BT)/n;return t&&(r=am.clamp(r,0,1)),r},closestPointToPoint:function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new hm),this.delta(n).multiplyScalar(r).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),HT.prototype=Object.create(Wm.prototype),HT.prototype.constructor=HT,HT.prototype.isImmediateRenderObject=!0;var VT=new hm,jT=new hm,WT=new dm,XT=["a","b","c"];function qT(e,t,n,r){this.object=e,this.size=void 0!==t?t:1;var i=void 0!==n?n:16711680,a=void 0!==r?r:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new lg,l=new Qv(2*o*3,3);c.setAttribute("position",l),Yb.call(this,c,new Bb({color:i,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}qT.prototype=Object.create(Yb.prototype),qT.prototype.constructor=qT,qT.prototype.update=function(){this.object.updateMatrixWorld(!0),WT.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,i=n.faces,a=0,o=0,s=i.length;o1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}},tE.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()};var nE=new hm,rE=new Fv,iE=new Fv;function aE(e,t,n){Wm.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;var r=new mw(t);r.rotateY(.5*Math.PI),this.material=new Vv({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=jp);var i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new jv(a,3)),this.add(new Ag(r,this.material)),this.update()}function oE(e,t){this.lightProbe=e,this.size=t;var n={GAMMA_OUTPUT:""},r=new kg({defines:n,uniforms:{sh:{value:this.lightProbe.sh.coefficients},intensity:{value:this.lightProbe.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","vec3 linearToOutput( in vec3 a ) {","\t#ifdef GAMMA_OUTPUT","\t\treturn pow( a, vec3( 1.0 / float( GAMMA_FACTOR ) ) );","\t#else","\t\treturn a;","\t#endif","}","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\toutgoingLight = linearToOutput( outgoingLight );","\tgl_FragColor = vec4( outgoingLight, 1.0 );","}"].join("\n")}),i=new i_(1,32,16);Ag.call(this,i,r),this.onBeforeRender()}function sE(e,t,n,r){e=e||10,t=t||10,n=new Fv(void 0!==n?n:4473924),r=new Fv(void 0!==r?r:8947848);for(var i=t/2,a=e/t,o=e/2,s=[],c=[],l=0,h=0,u=-o;l<=t;l++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var p=l===i?n:r;p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3,p.toArray(c,h),h+=3}var d=new lg;d.setAttribute("position",new Qv(s,3)),d.setAttribute("color",new Qv(c,3));var f=new Bb({vertexColors:jp});Yb.call(this,d,f)}function cE(e,t,n,r,i,a){e=e||10,t=t||16,n=n||8,r=r||64,i=new Fv(void 0!==i?i:4473924),a=new Fv(void 0!==a?a:8947848);var o,s,c,l,h,u,p,d=[],f=[];for(l=0;l<=t;l++)c=l/t*(2*Math.PI),o=Math.sin(c)*e,s=Math.cos(c)*e,d.push(0,0,0),d.push(o,0,s),p=1&l?i:a,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(l=0;l<=n;l++)for(p=1&l?i:a,u=e-e/n*l,h=0;h.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{LE.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(LE,t)}},RE.prototype.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},RE.prototype.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},RE.prototype.copy=function(e){return Wm.prototype.copy.call(this,e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this},RE.prototype.clone=function(){return(new this.constructor).copy(this)},PE.prototype=Object.create(Yb.prototype),PE.prototype.constructor=PE;function CE(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),hM.call(this,e),this.type="catmullrom"}nM.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(nM.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(wM.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new Ng,n=0,r=e.length;n=2.0 are supported."));else{if(v.extensionsUsed)for(var g=0;g=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}new H(v,m,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse(s,c)}}});var n={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function r(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");this.name=n.MSFT_TEXTURE_DDS,this.ddsLoader=e}function i(e){this.name=n.KHR_LIGHTS_PUNCTUAL;var t=e.extensions&&e.extensions[n.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=t.lights||[]}function a(){this.name=n.KHR_MATERIALS_UNLIT}i.prototype.loadLight=function(e){var t,n=this.lightDefs[e],r=new ur(16777215);void 0!==n.color&&r.fromArray(n.color);var i=void 0!==n.range?n.range:0;switch(n.type){case"directional":(t=new dh(r)).target.position.set(0,0,-1),t.add(t.target);break;case"point":(t=new hh(r)).distance=i;break;case"spot":(t=new ch(r)).distance=i,n.spot=n.spot||{},n.spot.innerConeAngle=void 0!==n.spot.innerConeAngle?n.spot.innerConeAngle:0,n.spot.outerConeAngle=void 0!==n.spot.outerConeAngle?n.spot.outerConeAngle:Math.PI/4,t.angle=n.spot.outerConeAngle,t.penumbra=1-n.spot.innerConeAngle/n.spot.outerConeAngle,t.target.position.set(0,0,-1),t.add(t.target);break;default:throw new Error('THREE.GLTFLoader: Unexpected light type, "'+n.type+'".')}return t.position.set(0,0,0),t.decay=2,void 0!==n.intensity&&(t.intensity=n.intensity),t.name=n.name||"light_"+e,Promise.resolve(t)},a.prototype.getMaterialType=function(){return yr},a.prototype.extendParams=function(e,t,n){var r=[];e.color=new ur(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var a=i.baseColorFactor;e.color.fromArray(a),e.opacity=a[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture))}return Promise.all(r)};var o="glTF",s=12,c={JSON:1313821514,BIN:5130562};function l(e){this.name=n.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,s);if(this.header={magic:gh.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==o)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var r=new DataView(e,s),i=0;i",o).replace("#include ",s).replace("#include ",c).replace("#include ",l).replace("#include ",h);delete a.roughness,delete a.metalness,delete a.roughnessMap,delete a.metalnessMap,a.specular={value:(new ur).setHex(1118481)},a.glossiness={value:.5},a.specularMap={value:null},a.glossinessMap={value:null},e.vertexShader=i.vertexShader,e.fragmentShader=u,e.uniforms=a,e.defines={STANDARD:""},e.color=new ur(1,1,1),e.opacity=1;var p=[];if(Array.isArray(r.diffuseFactor)){var d=r.diffuseFactor;e.color.fromArray(d),e.opacity=d[3]}if(void 0!==r.diffuseTexture&&p.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new ur(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new ur(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var f=r.specularGlossinessTexture;p.push(n.assignTexture(e,"glossinessMap",f)),p.push(n.assignTexture(e,"specularMap",f))}return Promise.all(p)},createMaterial:function(e){var t=new gi({defines:e.defines,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,fog:!0,lights:!0,opacity:e.opacity,transparent:e.transparent});return t.isGLTFSpecularGlossinessMaterial=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t.extensions.derivatives=!0,t},cloneMaterial:function(e){var t=e.clone();t.isGLTFSpecularGlossinessMaterial=!0;for(var n=this.specularGlossinessParams,r=0,i=n.length;r=2&&i.setY(T,w[_*o+1]),o>=3&&i.setZ(T,w[_*o+2]),o>=4&&i.setW(T,w[_*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return i}))},H.prototype.loadTexture=function(e){var t,r=this,i=this.json,a=this.options,o=this.textureLoader,s=window.URL||window.webkitURL,c=i.textures[e],l=c.extensions||{},h=(t=l[n.MSFT_TEXTURE_DDS]?i.images[l[n.MSFT_TEXTURE_DDS].source]:i.images[c.source]).uri,u=!1;return void 0!==t.bufferView&&(h=r.getDependency("bufferView",t.bufferView).then((function(e){u=!0;var n=new Blob([e],{type:t.mimeType});return h=s.createObjectURL(n)}))),Promise.resolve(h).then((function(e){var t=a.manager.getHandler(e);return t||(t=l[n.MSFT_TEXTURE_DDS]?r.extensions[n.MSFT_TEXTURE_DDS].ddsLoader:o),new Promise((function(n,r){t.load(U(e,a.path),n,void 0,r)}))})).then((function(e){!0===u&&s.revokeObjectURL(h),e.flipY=!1,void 0!==c.name&&(e.name=c.name),t.mimeType in F&&(e.format=F[t.mimeType]);var n=(i.samplers||{})[c.sampler]||{};return e.magFilter=A[n.magFilter]||ye,e.minFilter=A[n.minFilter]||be,e.wrapS=L[n.wrapS]||pe,e.wrapT=L[n.wrapT]||pe,e}))},H.prototype.assignTexture=function(e,t,r){var i=this;return this.getDependency("texture",r.index).then((function(a){if(!a.isCompressedTexture)switch(t){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=Ne}if(i.extensions[n.KHR_TEXTURE_TRANSFORM]){var o=void 0!==r.extensions?r.extensions[n.KHR_TEXTURE_TRANSFORM]:void 0;o&&(a=i.extensions[n.KHR_TEXTURE_TRANSFORM].extendTexture(a,o))}e[t]=a}))},H.prototype.assignFinalMaterial=function(e){var t=e.geometry,r=e.material,i=this.extensions,a=void 0!==t.attributes.tangent,o=void 0!==t.attributes.color,s=void 0===t.attributes.normal,c=!0===e.isSkinnedMesh,l=Object.keys(t.morphAttributes).length>0,h=l&&void 0!==t.morphAttributes.normal;if(e.isPoints){var u="PointsMaterial:"+r.uuid,p=this.cache.get(u);p||(p=new As,gr.prototype.copy.call(p,r),p.color.copy(r.color),p.map=r.map,p.sizeAttenuation=!1,this.cache.add(u,p)),r=p}else if(e.isLine){u="LineBasicMaterial:"+r.uuid;var d=this.cache.get(u);d||(d=new vs,gr.prototype.copy.call(d,r),d.color.copy(r.color),this.cache.add(u,d)),r=d}if(a||o||s||c||l){u="ClonedMaterial:"+r.uuid+":";r.isGLTFSpecularGlossinessMaterial&&(u+="specular-glossiness:"),c&&(u+="skinning:"),a&&(u+="vertex-tangents:"),o&&(u+="vertex-colors:"),s&&(u+="flat-shading:"),l&&(u+="morph-targets:"),h&&(u+="morph-normals:");var f=this.cache.get(u);f||(f=r.isGLTFSpecularGlossinessMaterial?i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(r):r.clone(),c&&(f.skinning=!0),a&&(f.vertexTangents=!0),o&&(f.vertexColors=x),s&&(f.flatShading=!0),l&&(f.morphTargets=!0),h&&(f.morphNormals=!0),this.cache.add(u,f)),r=f}r.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),t.setAttribute("uv2",new xr(t.attributes.uv.array,2))),r.isGLTFSpecularGlossinessMaterial&&(e.onBeforeRender=i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),e.material=r},H.prototype.loadMaterial=function(e){var t,r=this.json,i=this.extensions,a=r.materials[e],o={},s=a.extensions||{},c=[];if(s[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var l=i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];t=l.getMaterialType(),c.push(l.extendParams(o,a,this))}else if(s[n.KHR_MATERIALS_UNLIT]){var h=i[n.KHR_MATERIALS_UNLIT];t=h.getMaterialType(),c.push(h.extendParams(o,a,this))}else{t=$c;var u=a.pbrMetallicRoughness||{};if(o.color=new ur(1,1,1),o.opacity=1,Array.isArray(u.baseColorFactor)){var p=u.baseColorFactor;o.color.fromArray(p),o.opacity=p[3]}void 0!==u.baseColorTexture&&c.push(this.assignTexture(o,"map",u.baseColorTexture)),o.metalness=void 0!==u.metallicFactor?u.metallicFactor:1,o.roughness=void 0!==u.roughnessFactor?u.roughnessFactor:1,void 0!==u.metallicRoughnessTexture&&(c.push(this.assignTexture(o,"metalnessMap",u.metallicRoughnessTexture)),c.push(this.assignTexture(o,"roughnessMap",u.metallicRoughnessTexture)))}!0===a.doubleSided&&(o.side=v);var d=a.alphaMode||I;return d===D?o.transparent=!0:(o.transparent=!1,d===N&&(o.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==yr&&(c.push(this.assignTexture(o,"normalMap",a.normalTexture)),o.normalScale=new Nt(1,1),void 0!==a.normalTexture.scale&&o.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),void 0!==a.occlusionTexture&&t!==yr&&(c.push(this.assignTexture(o,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(o.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==yr&&(o.emissive=(new ur).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&t!==yr&&c.push(this.assignTexture(o,"emissiveMap",a.emissiveTexture)),Promise.all(c).then((function(){var e;return e=t===gi?i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new t(o),void 0!==a.name&&(e.name=a.name),e.map&&(e.map.encoding=vt),e.emissiveMap&&(e.emissiveMap.encoding=vt),e.specularMap&&(e.specularMap.encoding=vt),B(e,a),a.extensions&&z(i,e,a),e}))},H.prototype.loadGeometries=function(e){var t=this,r=this.extensions,i=this.primitiveCache;function a(e){return r[n.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return V(n,e,t)}))}for(var o,s,c=[],l=0,h=e.length;l0&&G(l,n),l.name=n.name||"mesh_"+e,a.length>1&&(l.name+="_"+s),B(l,n),t.assignFinalMaterial(l),o.push(l)}if(1===o.length)return o[0];var d=new Ro;for(s=0,c=o.length;s1){var n=s[c.mesh]++;(t=e.clone()).name+="_instance_"+n,t.onBeforeRender=e.onBeforeRender;for(var r=0,i=t.children.length;r1?new Ro:1===e.length?e[0]:new bn)!==e[0])for(var n=0,r=e.length;np&&(p=e[c]),e[c]>=1;for(h=r<<16|c,l=o;l>>=1){case 0:var t=this.input,n=this.a,r=this.c,i=this.b,a=t.length,o=BE,s=r.length,c=BE;if(this.d=this.f=0,n+1>=a)throw Error("invalid uncompressed block header: LEN");if(o=t[n++]|t[n++]<<8,n+1>=a)throw Error("invalid uncompressed block header: NLEN");if(o===~(t[n++]|t[n++]<<8))throw Error("invalid uncompressed block header: length verify");if(n+o>t.length)throw Error("input buffer is broken");switch(this.i){case WE:for(;i+o>r.length;){if(o-=c=s-i,HE)r.set(t.subarray(n,n+c),i),i+=c,n+=c;else for(;c--;)r[i++]=t[n++];this.b=i,r=this.e(),i=this.b}break;case XE:for(;i+o>r.length;)r=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(HE)r.set(t.subarray(n,n+o),i),i+=o,n+=o;else for(;o--;)r[i++]=t[n++];this.a=n,this.b=i,this.c=r;break;case 1:this.j(lS,uS);break;case 2:var l,h,u,p,d=pS(this,5)+257,f=pS(this,5)+1,m=pS(this,4)+4,v=new(HE?Uint8Array:Array)(KE.length),g=BE,y=BE,x=BE,b=BE,w=BE;for(w=0;w=YE?8:255>=YE?9:279>=YE?7:8;var sS,cS,lS=VE(oS),hS=new(HE?Uint8Array:Array)(30);for(sS=0,cS=hS.length;sS=s)throw Error("input buffer is broken");r|=a[o++]<>>t,e.d=i-t,e.a=o,n}function dS(e,t){for(var n,r,i=e.f,a=e.d,o=e.input,s=e.a,c=o.length,l=t[0],h=t[1];a=c);)i|=o[s++]<>>16)>a)throw Error("invalid code length: "+r);return e.f=i>>r,e.d=a-r,e.a=s,65535&n}function fS(e,t){var n,r;switch(this.input=e,this.a=0,!t&&(t={})||(t.index&&(this.a=t.index),t.verify&&(this.A=t.verify)),n=e[this.a++],r=e[this.a++],15&n){case mS:this.method=mS;break;default:throw Error("unsupported compression method")}if(0!=((n<<8)+r)%31)throw Error("invalid fcheck flag:"+((n<<8)+r)%31);if(32&r)throw Error("fdict flag is not supported");this.q=new jE(e,{index:this.a,bufferSize:t.bufferSize,bufferType:t.bufferType,resize:t.resize})}jE.prototype.j=function(e,t){var n=this.c,r=this.b;this.o=e;for(var i,a,o,s,c=n.length-258;256!==(i=dS(this,e));)if(256>i)r>=c&&(this.b=r,n=this.e(),r=this.b),n[r++]=i;else for(s=$E[a=i-257],0=c&&(this.b=r,n=this.e(),r=this.b);s--;)n[r]=n[r++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},jE.prototype.w=function(e,t){var n=this.c,r=this.b;this.o=e;for(var i,a,o,s,c=n.length;256!==(i=dS(this,e));)if(256>i)r>=c&&(c=(n=this.e()).length),n[r++]=i;else for(s=$E[a=i-257],0c&&(c=(n=this.e()).length);s--;)n[r]=n[r++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=r},jE.prototype.e=function(){var e,t,n=new(HE?Uint8Array:Array)(this.b-32768),r=this.b-32768,i=this.c;if(HE)n.set(i.subarray(32768,n.length));else for(e=0,t=n.length;ee;++e)i[e]=i[r+e];return this.b=32768,i},jE.prototype.z=function(e){var t,n,r,i=this.input.length/this.a+1|0,a=this.input,o=this.c;return e&&("number"==typeof e.p&&(i=e.p),"number"==typeof e.u&&(i+=e.u)),2>i?n=(r=(a.length-this.a)/this.o[2]/2*258|0)t&&(this.c.length=t),e=this.c),this.buffer=e},fS.prototype.k=function(){var e,t,n=this.input;if(e=this.q.k(),this.a=this.q.a,this.A){t=(n[this.a++]<<24|n[this.a++]<<16|n[this.a++]<<8|n[this.a++])>>>0;var r=e;if("string"==typeof r){var i,a,o=r.split("");for(i=0,a=o.length;i>>0;r=o}for(var s,c=1,l=0,h=r.length,u=0;0>>0)throw Error("invalid adler-32 checksum")}return e};var mS=8;kE("Zlib.Inflate",fS),kE("Zlib.Inflate.prototype.decompress",fS.prototype.k);var vS,gS,yS,xS,bS={ADAPTIVE:qE.s,BLOCK:qE.t};if(Object.keys)vS=Object.keys(bS);else for(gS in vS=[],yS=0,bS)vS[yS++]=gS;for(yS=0,xS=vS.length;yS=n[r])return r-1;if(t<=n[e])return e;for(var i=e,a=r,o=Math.floor((i+a)/2);t=n[o+1];)t=b&&(x[y][0]=x[g][0]/c[M+1][_],w=x[y][0]*c[_][M]);var T=d-1<=M?b-1:n-d;for(u=_>=-1?1:-_;u<=T;++u)x[y][u]=(x[g][u]-x[g][u-1])/c[M+1][_+u],w+=x[y][u]*c[_+u][M];d<=M&&(x[y][b]=-x[g][b-1]/c[M+1][d],w+=x[y][b]*c[d][M]),s[b][d]=w;u=g;g=y,y=u}}for(d=n,b=1;b<=r;++b){for(u=0;u<=n;++u)s[b][u]*=d;d*=n-b}return s},calcBSplineDerivatives:function(e,t,n,r,i){for(var a=i=o.length&&o===w(a,0,o.length))e=(new c).parse(t);else{var r=w(t);if(!function(e){var t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],n=0;for(var r=0;r0,s="string"==typeof a.Content&&""!==a.Content;if(o||s){var c=this.parseImage(r[i]);n[a.RelativeFilename||a.Filename]=c}}}}for(var l in t){var h=t[l];void 0!==n[h]?t[l]=n[h]:t[l]=t[l].split("\\").pop()}return t},parseImage:function(e){var t,n=e.Content,r=e.RelativeFilename||e.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",r),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"==typeof n)return"data:"+t+";base64,"+n;var a=new Uint8Array(n);return window.URL.createObjectURL(new Blob([a],{type:t}))},parseTextures:function(t){var n=new Map;if("Texture"in e.Objects){var r=e.Objects.Texture;for(var i in r){var a=this.parseTexture(r[i],t);n.set(parseInt(i),a)}}return n},parseTexture:function(e,t){var n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;var r=e.WrapModeU,i=e.WrapModeV,a=void 0!==r?r.value:0,o=void 0!==i?i.value:0;if(n.wrapS=0===a?pe:de,n.wrapT=0===o?pe:de,"Scaling"in e){var s=e.Scaling.value;n.repeat.x=s[0],n.repeat.y=s[1]}return n},loadTexture:function(e,n){var r,i,a=this.textureLoader.path,o=t.get(e.id).children;void 0!==o&&o.length>0&&void 0!==n[o[0].ID]&&(0!==(r=n[o[0].ID]).indexOf("blob:")&&0!==r.indexOf("data:")||this.textureLoader.setPath(void 0));var s=e.FileName.slice(-3).toLowerCase();if("tga"===s){var c=this.manager.getHandler(".tga");null===c?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),i=new jt):i=c.load(r)}else"psd"===s?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),i=new jt):i=this.textureLoader.load(r);return this.textureLoader.setPath(a),i},parseMaterials:function(t){var n=new Map;if("Material"in e.Objects){var r=e.Objects.Material;for(var i in r){var a=this.parseMaterial(r[i],t);null!==a&&n.set(parseInt(i),a)}}return n},parseMaterial:function(e,n){var r=e.id,i=e.attrName,a=e.ShadingModel;if("object"==typeof a&&(a=a.value),!t.has(r))return null;var o,s=this.parseParameters(e,n,r);switch(a.toLowerCase()){case"phong":o=new tl;break;case"lambert":o=new il;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',a),o=new tl}return o.setValues(s),o.name=i,o},parseParameters:function(e,n,r){var i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new ur).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(i.color=(new ur).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new ur).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(i.emissive=(new ur).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new ur).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new ur).fromArray(e.SpecularColor.value));var a=this;return t.get(r).children.forEach((function(e){var t=e.relationship;switch(t){case"Bump":i.bumpMap=a.getTexture(n,e.ID);break;case"Maya|TEX_ao_map":i.aoMap=a.getTexture(n,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":i.map=a.getTexture(n,e.ID),i.map.encoding=vt;break;case"DisplacementColor":i.displacementMap=a.getTexture(n,e.ID);break;case"EmissiveColor":i.emissiveMap=a.getTexture(n,e.ID),i.emissiveMap.encoding=vt;break;case"NormalMap":case"Maya|TEX_normal_map":i.normalMap=a.getTexture(n,e.ID);break;case"ReflectionColor":i.envMap=a.getTexture(n,e.ID),i.envMap.mapping=se,i.envMap.encoding=vt;break;case"SpecularColor":i.specularMap=a.getTexture(n,e.ID),i.specularMap.encoding=vt;break;case"TransparentColor":i.alphaMap=a.getTexture(n,e.ID),i.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",t)}})),i},getTexture:function(n,r){return"LayeredTexture"in e.Objects&&r in e.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),r=t.get(r).children[0].ID),n.get(r)},parseDeformers:function(){var n={},r={};if("Deformer"in e.Objects){var i=e.Objects.Deformer;for(var a in i){var o=i[a],s=t.get(parseInt(a));if("Skin"===o.attrType){var c=this.parseSkeleton(s,i);c.ID=a,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),c.geometryID=s.parents[0].ID,n[a]=c}else if("BlendShape"===o.attrType){var l={id:a};l.rawTargets=this.parseMorphTargets(s,i),l.id=a,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),r[a]=l}}}return{skeletons:n,morphTargets:r}},parseSkeleton:function(e,t){var n=[];return e.children.forEach((function(e){var r=t[e.ID];if("Cluster"===r.attrType){var i={ID:e.ID,indices:[],weights:[],transformLink:(new tn).fromArray(r.TransformLink.a)};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}})),{rawBones:n,bones:[]}},parseMorphTargets:function(e,n){for(var r=[],i=0;i1?a=o:o.length>0?a=o[0]:(a=new tl({color:13421772}),o.push(a)),"color"in i.attributes&&o.forEach((function(e){e.vertexColors=x})),i.FBX_Deformer?(o.forEach((function(e){e.skinning=!0})),(r=new os(i,a)).normalizeSkinWeights()):r=new ni(i,a),r},createCurve:function(e,t){return new _s(e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),new vs({color:3342591,linewidth:1}))},getTransformData:function(e,t){var n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?y(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n},setLookAtProperties:function(r,i){"LookAtProperty"in i&&t.get(r.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){var i=e.Objects.Model[t.ID];if("Lcl_Translation"in i){var a=i.Lcl_Translation.value;void 0!==r.target?(r.target.position.fromArray(a),n.add(r.target)):r.lookAt((new zt).fromArray(a))}}}))},bindSkeleton:function(e,n,r){var i=this.parsePoseNodes();for(var a in e){var o=e[a];t.get(parseInt(o.ID)).parents.forEach((function(e){if(n.has(e.ID)){var a=e.ID;t.get(a).parents.forEach((function(e){r.has(e.ID)&&r.get(e.ID).bind(new ls(o.bones),i[e.ID])}))}}))}},parsePoseNodes:function(){var t={};if("Pose"in e.Objects){var n=e.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach((function(e){t[e.Node]=(new tn).fromArray(e.Matrix.a)})):t[i.Node]=(new tn).fromArray(i.Matrix.a)}}return t},createAmbientLight:function(){if("GlobalSettings"in e&&"AmbientColor"in e.GlobalSettings){var t=e.GlobalSettings.AmbientColor.value,r=t[0],i=t[1],a=t[2];if(0!==r||0!==i||0!==a){var o=new ur(r,i,a);n.add(new fh(o,1))}}},setupMorphMaterials:function(){var e=this;n.traverse((function(t){t.isMesh&&t.geometry.morphAttributes.position&&t.geometry.morphAttributes.position.length&&(Array.isArray(t.material)?t.material.forEach((function(n,r){e.setupMorphMaterial(t,n,r)})):e.setupMorphMaterial(t,t.material))}))},setupMorphMaterial:function(e,t,r){var i=e.uuid,a=t.uuid,o=!1;if(n.traverse((function(e){e.isMesh&&(Array.isArray(e.material)?e.material.forEach((function(t){t.uuid===a&&e.uuid!==i&&(o=!0)})):e.material.uuid===a&&e.uuid!==i&&(o=!0))})),!0===o){var s=t.clone();s.morphTargets=!0,void 0===r?e.material=s:e.material[r]=s}else t.morphTargets=!0}},a.prototype={constructor:a,parse:function(n){var r=new Map;if("Geometry"in e.Objects){var i=e.Objects.Geometry;for(var a in i){var o=t.get(parseInt(a)),s=this.parseGeometry(o,i[a],n);r.set(parseInt(a),s)}}return r},parseGeometry:function(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}},parseMeshGeometry:function(t,n,r){var i=r.skeletons,a=[],o=t.parents.map((function(t){return e.Objects.Model[t.ID]}));if(0!==o.length){var s=t.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null);t.children.forEach((function(e){void 0!==r.morphTargets[e.ID]&&a.push(r.morphTargets[e.ID])}));var c=o[0],l={};"RotationOrder"in c&&(l.eulerOrder=y(c.RotationOrder.value)),"InheritType"in c&&(l.inheritType=parseInt(c.InheritType.value)),"GeometricTranslation"in c&&(l.translation=c.GeometricTranslation.value),"GeometricRotation"in c&&(l.rotation=c.GeometricRotation.value),"GeometricScaling"in c&&(l.scale=c.GeometricScaling.value);var h=g(l);return this.genGeometry(n,s,a,h)}},genGeometry:function(e,t,n,r){var i=new zr;e.attrName&&(i.name=e.attrName);var a=this.parseGeoNode(e,t),o=this.genBuffers(a),s=new Ar(o.vertex,3);if(r.applyToBufferAttribute(s),i.setAttribute("position",s),o.colors.length>0&&i.setAttribute("color",new Ar(o.colors,3)),t&&(i.setAttribute("skinIndex",new Tr(o.weightsIndices,4)),i.setAttribute("skinWeight",new Ar(o.vertexWeights,4)),i.FBX_Deformer=t),o.normal.length>0){var c=new Ar(o.normal,3);(new kt).getNormalMatrix(r).applyToBufferAttribute(c),i.setAttribute("normal",c)}if(o.uvs.forEach((function(e,t){var n="uv"+(t+1).toString();0===t&&(n="uv"),i.setAttribute(n,new Ar(o.uvs[t],2))})),a.material&&"AllSame"!==a.material.mappingType){var l=o.materialIndex[0],h=0;if(o.materialIndex.forEach((function(e,t){e!==l&&(i.addGroup(h,t-h,l),l=e,h=t)})),i.groups.length>0){var u=i.groups[i.groups.length-1],p=u.start+u.count;p!==o.materialIndex.length&&i.addGroup(p,o.materialIndex.length-p,l)}0===i.groups.length&&i.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(i,e,n,r),i},parseGeoNode:function(e,t){var n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];for(var r=0;e.LayerElementUV[r];)n.uv.push(this.parseUVs(e.LayerElementUV[r])),r++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n},genBuffers:function(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,a=[],o=[],s=[],c=[],l=[],h=[],u=this;return e.vertexIndices.forEach((function(p,d){var m=!1;p<0&&(p^=-1,m=!0);var v=[],g=[];if(a.push(3*p,3*p+1,3*p+2),e.color){var y=f(d,n,p,e.color);s.push(y[0],y[1],y[2])}if(e.skeleton){if(void 0!==e.weightTable[p]&&e.weightTable[p].forEach((function(e){g.push(e.weight),v.push(e.id)})),g.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var x=[0,0,0,0],b=[0,0,0,0];g.forEach((function(e,t){var n=e,r=v[t];b.forEach((function(e,t,i){if(n>e){i[t]=n,n=e;var a=x[t];x[t]=r,r=a}}))})),v=x,g=b}for(;g.length<4;)g.push(0),v.push(0);for(var w=0;w<4;++w)l.push(g[w]),h.push(v[w])}if(e.normal){y=f(d,n,p,e.normal);o.push(y[0],y[1],y[2])}if(e.material&&"AllSame"!==e.material.mappingType)var _=f(d,n,p,e.material)[0];e.uv&&e.uv.forEach((function(e,t){var r=f(d,n,p,e);void 0===c[t]&&(c[t]=[]),c[t].push(r[0]),c[t].push(r[1])})),r++,m&&(u.genFace(t,e,a,_,o,s,c,l,h,r),n++,r=0,a=[],o=[],s=[],c=[],l=[],h=[])})),t},genFace:function(e,t,n,r,i,a,o,s,c,l){for(var h=2;h1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(o[0].ID);i[a]={name:r[a].attrName,layer:s}}return i},addClip:function(e){var t=[],n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new wl(e.name,-1,t)},generateTracks:function(e){var t=[],n=new zt,r=new Dt,i=new zt;if(e.transform&&e.transform.decompose(n,r,i),n=n.toArray(),r=(new an).setFromQuaternion(r,e.eulerOrder).toArray(),i=i.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){var a=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==a&&t.push(a)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var o=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotation,e.postRotation,e.eulerOrder);void 0!==o&&t.push(o)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var s=this.generateVectorTrack(e.modelName,e.S.curves,i,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){var c=this.generateMorphTrack(e);void 0!==c&&t.push(c)}return t},generateVectorTrack:function(e,t,n,r){var i=this.getTimesForAllAxes(t);return new bl(e+"."+r,i,this.getKeyframeTrackValues(i,t,n))},generateRotationTrack:function(e,t,n,r,i,a){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(It.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(It.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(It.degToRad));var o=this.getTimesForAllAxes(t),s=this.getKeyframeTrackValues(o,t,n);void 0!==r&&((r=r.map(It.degToRad)).push(a),r=(new an).fromArray(r),r=(new Dt).setFromEuler(r)),void 0!==i&&((i=i.map(It.degToRad)).push(a),i=(new an).fromArray(i),i=(new Dt).setFromEuler(i).inverse());for(var c=new Dt,l=new an,h=[],u=0;u=180){for(var a=i/180,o=r/a,s=n+o,c=e.times[t-1],l=(e.times[t]-c)/a,h=c+l,u=[],p=[];h1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}},parseNodeProperty:function(e,t,n){var r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var a=this.getCurrentNode();if("Properties70"!==a.name){if("C"===r){var o=i.split(",").slice(1),s=parseInt(o[0]),c=parseInt(o[1]),l=i.split(",").slice(3);r="connections",function(e,t){for(var n=0,r=e.length,i=t.length;n=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32(),a=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),o=e.getString(a);if(0===r)return null;for(var s=[],c=0;c0?s[0]:"",h=s.length>1?s[1]:"",u=s.length>2?s[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){var p=this.parseNode(e,t);null!==p&&this.parseSubNode(o,n,p)}return n.propertyList=s,"number"==typeof l&&(n.id=l),""!==h&&(n.attrName=h),""!==u&&(n.attrType=u),""!==o&&(n.name=o),n},parseSubNode:function(e,t,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(t[n.name]=n,n.a=r):t[n.name]=r}else if("Connections"===e&&"C"===n.name){var i=[];n.propertyList.forEach((function(e,t){0!==t&&i.push(e)})),void 0===t.connections&&(t.connections=[]),t.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){var a,o=n.propertyList[0],s=n.propertyList[1],c=n.propertyList[2],l=n.propertyList[3];0===o.indexOf("Lcl ")&&(o=o.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),a="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[o]={type:s,type2:c,flag:l,value:a}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":var n=e.getUint32();return e.getArrayBuffer(n);case"S":n=e.getUint32();return e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=e.getUint32(),i=e.getUint32(),a=e.getUint32();if(0===i)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}void 0===wS&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var o=new l(new wS.Inflate(new Uint8Array(e.getArrayBuffer(a))).decompress().buffer);switch(t){case"b":case"c":return o.getBooleanArray(r);case"d":return o.getFloat64Array(r);case"f":return o.getFloat32Array(r);case"i":return o.getInt32Array(r);case"l":return o.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},l.prototype={constructor:l,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],n=0;n=0&&(t=t.slice(0,r)),gh.decodeText(new Uint8Array(t))}},h.prototype={constructor:h,add:function(e,t){this[e]=t}};var d=[];function f(e,t,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var a=i*r.dataSize,o=a+r.dataSize;return function(e,t,n,r){for(var i=n,a=0;ie.EPSILON?1:0;o|=u,s.push(u)}switch(o){case 0:(this.normal.dot(t.plane.normal)>0?n:r).push(t);break;case 1:i.push(t);break;case 2:a.push(t);break;case 3:for(var p=[],d=[],f=0;f=3&&i.push(new GS(p,t.shared)),d.length>=3&&a.push(new GS(d,t.shared))}},e.EPSILON=1e-5,e}(),GS=function(){function e(e,t){void 0===t&&(t=null),this.vertices=e,this.shared=t,this.plane=BS.fromPoints(e[0].pos,e[1].pos,e[2].pos)}return e.prototype.clone=function(){return new e(this.vertices.map((function(e){return e.clone()})),this.shared)},e.prototype.flip=function(){this.vertices.reverse().map((function(e){e.flip()})),this.plane.flip()},e}(),kS=function(){function e(e){delete this.plane,delete this.front,delete this.back,this.polygons=[],e&&this.build(e)}return e.prototype.clone=function(){var t=new e;return t.plane=this.plane&&this.plane.clone(),t.front=this.front&&this.front.clone(),t.back=this.back&&this.back.clone(),t.polygons=this.polygons.map((function(e){return e.clone()})),t},e.prototype.invert=function(){for(var e=0,t=this.polygons;ei){var p=Math.sqrt(u);l/=p,h/=p,l*=r,h*=r}n.style.top=h+n.clientHeight/2+"px",n.style.left=l+n.clientWidth/2+"px";var d=-(h-a.top+n.clientHeight/2)/r,f=(l-a.left+n.clientWidth/2)/r;this.emit("axis_onmove_"+s,{top:d,right:f})},t.prototype.up=function(e){var t=e.domElement,n=e.origin,r=e.id;"ontouchstart"in window?(document.ontouchmove=null,document.touchend=null):(document.onmousemove=null,document.onmouseup=null),t.style.top=n.top+"px",t.style.left=n.left+"px",this.emit("axis_onmove_"+r,{top:0,right:0})},t.prototype.getMousePosition=function(e){return{x:e.targetTouches?e.targetTouches[0].pageX:e.clientX,y:e.targetTouches?e.targetTouches[0].pageY:e.clientY}},t}(VS.a),XS=function(){function e(e,t,n){var r=this;this.scene=e,this.target=t,this.config=n;var i=n.offset,a=void 0===i?this.scene.third.new.vector3(0,0,0):i,o=n.sensitivity,s=void 0===o?this.scene.third.new.vector2(1,1):o,c=n.radius,l=void 0===c?8:c,h=n.targetRadius,u=void 0===h?10:h,p=n.interpolationFactor,d=void 0===p?.05:p,f=n.pointerLock,m=void 0===f||f,v=n.autoUpdate,g=void 0===v||v;this.offset=a,this.sensitivity=s,this.radius=l,this.targetRadius=u,this.interpolationFactor=d,this.theta=0,this.phi=0,m&&(e.input.on("pointerdown",(function(){e.input.mouse.requestPointerLock()})),e.input.on("pointermove",(function(t){e.input.mouse.locked&&r.update(t.movementX,t.movementY)}))),g&&e.events.on("update",(function(){r.update(0,0)}))}return e.prototype.update=function(e,t){var n=this.target.position.clone().add(this.offset);this.theta-=e*(this.sensitivity.x/2),this.theta%=360,this.phi+=t*(this.sensitivity.y/2),this.phi=Math.min(85,Math.max(-85,this.phi)),this.radius=It.lerp(this.radius,this.targetRadius,this.interpolationFactor),this.scene.third.camera.position.x=n.x+this.radius*Math.sin(this.theta*Math.PI/180)*Math.cos(this.phi*Math.PI/180),this.scene.third.camera.position.y=n.y+this.radius*Math.sin(this.phi*Math.PI/180),this.scene.third.camera.position.z=n.z+this.radius*Math.cos(this.theta*Math.PI/180)*Math.cos(this.phi*Math.PI/180),this.scene.third.camera.updateMatrix(),this.scene.third.camera.lookAt(n)},e}(),qS=function(){function e(){}return e.prototype.addXRCamera=function(){this.cameraObject=this.add.sphere({radius:.1,y:5,z:2},{standard:{transparent:!0,opacity:.5,color:16711680}}),this.cameraObject.add(this.camera)},Object.defineProperty(e.prototype,"xr",{get:function(){var e=this;return{getController:function(t){return e.renderer.vr.getController(t)},camera:this.WebXRCamera}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"WebXRCamera",{get:function(){var e,t=this;return{object3D:this.cameraObject,position:null===(e=this.cameraObject)||void 0===e?void 0:e.position,rotation:this.renderer.vr.getCamera(this.camera).rotation,getWorldDirection:function(e){return t.renderer.vr.getCamera(t.camera).getWorldDirection(e)}}},enumerable:!0,configurable:!0}),e}(),YS=function(){return(YS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)){v.reflect(h).negate(),v.add(u),d.extractRotation(r.matrixWorld),f.set(0,0,-1),f.applyMatrix4(d),f.add(p),g.subVectors(u,f),g.reflect(h).negate(),g.add(u),b.position.copy(v),b.up.set(0,1,0),b.up.applyMatrix4(d),b.up.reflect(h),b.lookAt(g),b.far=r.far,b.updateMatrixWorld(),b.projectionMatrix.copy(r.projectionMatrix),b.userData.recursion=0,x.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),x.multiply(b.projectionMatrix),x.multiply(b.matrixWorldInverse),x.multiply(n.matrixWorld),l.setFromNormalAndCoplanarPoint(h,u),l.applyMatrix4(b.matrixWorldInverse),m.set(l.normal.x,l.normal.y,l.normal.z,l.constant);var i=b.projectionMatrix;y.x=(Math.sign(m.x)+i.elements[8])/i.elements[0],y.y=(Math.sign(m.y)+i.elements[9])/i.elements[5],y.z=-1,y.w=(1+i.elements[10])/i.elements[14],m.multiplyScalar(2/m.dot(y)),i.elements[2]=m.x,i.elements[6]=m.y,i.elements[10]=m.z+1-o,i.elements[14]=m.w,n.visible=!1;var a=e.getRenderTarget(),s=e.vr.enabled,_=e.shadowMap.autoUpdate;e.vr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(w),e.clear(),e.render(t,b),e.vr.enabled=s,e.shadowMap.autoUpdate=_,e.setRenderTarget(a);var M=r.viewport;void 0!==M&&e.state.viewport(M),n.visible=!0}},this.getRenderTarget=function(){return w}};$S.prototype=Object.create(ni.prototype),$S.prototype.constructor=$S,$S.ReflectorShader={uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:["uniform mat4 textureMatrix;","varying vec4 vUv;","void main() {","\tvUv = textureMatrix * vec4( position, 1.0 );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform sampler2D tDiffuse;","varying vec4 vUv;","float blendOverlay( float base, float blend ) {","\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );","}","vec3 blendOverlay( vec3 base, vec3 blend ) {","\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );","}","void main() {","\tvec4 base = texture2DProj( tDiffuse, vUv );","\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );","}"].join("\n")};var eA=function(e,t){ni.call(this,e),this.type="Refractor";var n=this,r=void 0!==(t=t||{}).color?new ur(t.color):new ur(8355711),i=t.textureWidth||512,a=t.textureHeight||512,o=t.clipBias||0,s=t.shader||eA.RefractorShader,c=new xi;c.matrixAutoUpdate=!1,c.userData.refractor=!0;var l=new Jn,h=new tn,u=new Xt(i,a,{minFilter:ye,magFilter:ye,format:Ne,stencilBuffer:!1});It.isPowerOfTwo(i)&&It.isPowerOfTwo(a)||(u.texture.generateMipmaps=!1),this.material=new gi({uniforms:fi.clone(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,transparent:!0}),this.material.uniforms.color.value=r,this.material.uniforms.tDiffuse.value=u.texture,this.material.uniforms.textureMatrix.value=h;var p,d,f,m,v,g,y,x,b=(p=new zt,d=new zt,f=new tn,m=new zt,v=new zt,function(e){return p.setFromMatrixPosition(n.matrixWorld),d.setFromMatrixPosition(e.matrixWorld),m.subVectors(p,d),f.extractRotation(n.matrixWorld),v.set(0,0,1),v.applyMatrix4(f),m.dot(v)<0}),w=function(){var e=new zt,t=new zt,r=new Dt,i=new zt;return function(){n.matrixWorld.decompose(t,r,i),e.set(0,0,1).applyQuaternion(r).normalize(),e.negate(),l.setFromNormalAndCoplanarPoint(e,t)}}(),_=(g=new Jn,y=new Wt,x=new Wt,function(e){c.matrixWorld.copy(e.matrixWorld),c.matrixWorldInverse.getInverse(c.matrixWorld),c.projectionMatrix.copy(e.projectionMatrix),c.far=e.far,g.copy(l),g.applyMatrix4(c.matrixWorldInverse),y.set(g.normal.x,g.normal.y,g.normal.z,g.constant);var t=c.projectionMatrix;x.x=(Math.sign(y.x)+t.elements[8])/t.elements[0],x.y=(Math.sign(y.y)+t.elements[9])/t.elements[5],x.z=-1,x.w=(1+t.elements[10])/t.elements[14],y.multiplyScalar(2/y.dot(x)),t.elements[2]=y.x,t.elements[6]=y.y,t.elements[10]=y.z+1-o,t.elements[14]=y.w});this.onBeforeRender=function(e,t,r){!0!==r.userData.refractor&&!0!=!b(r)&&(w(),function(e){h.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),h.multiply(e.projectionMatrix),h.multiply(e.matrixWorldInverse),h.multiply(n.matrixWorld)}(r),_(r),function(e,t,r){n.visible=!1;var i=e.getRenderTarget(),a=e.vr.enabled,o=e.shadowMap.autoUpdate;e.vr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(u),e.clear(),e.render(t,c),e.vr.enabled=a,e.shadowMap.autoUpdate=o,e.setRenderTarget(i);var s=r.viewport;void 0!==s&&e.state.viewport(s),n.visible=!0}(e,t,r))},this.getRenderTarget=function(){return u}};eA.prototype=Object.create(ni.prototype),eA.prototype.constructor=eA,eA.RefractorShader={uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:["uniform mat4 textureMatrix;","varying vec4 vUv;","void main() {","\tvUv = textureMatrix * vec4( position, 1.0 );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform sampler2D tDiffuse;","varying vec4 vUv;","float blendOverlay( float base, float blend ) {","\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );","}","vec3 blendOverlay( vec3 base, vec3 blend ) {","\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );","}","void main() {","\tvec4 base = texture2DProj( tDiffuse, vUv );","\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );","}"].join("\n")};var tA=function(e,t){ni.call(this,e),this.type="Water";var n=this,r=void 0!==(t=t||{}).color?new ur(t.color):new ur(16777215),i=t.textureWidth||512,a=t.textureHeight||512,o=t.clipBias||0,s=t.flowDirection||new Nt(1,0),c=t.flowSpeed||.03,l=t.reflectivity||.02,h=t.scale||1,u=t.shader||tA.WaterShader,p=new Nl,d=t.flowMap||void 0,f=t.normalMap0||p.load("textures/water/Water_1_M_Normal.jpg"),m=t.normalMap1||p.load("textures/water/Water_2_M_Normal.jpg"),v=.15,g=.5*v,y=new tn,x=new Gh;if(void 0!==$S)if(void 0!==eA){var b=new $S(e,{textureWidth:i,textureHeight:a,clipBias:o}),w=new eA(e,{textureWidth:i,textureHeight:a,clipBias:o});b.matrixAutoUpdate=!1,w.matrixAutoUpdate=!1,this.material=new gi({uniforms:fi.merge([Ri.fog,u.uniforms]),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,transparent:!0,fog:!0}),void 0!==d?(this.material.defines.USE_FLOWMAP="",this.material.uniforms.tFlowMap={type:"t",value:d}):this.material.uniforms.flowDirection={type:"v2",value:s},f.wrapS=f.wrapT=pe,m.wrapS=m.wrapT=pe,this.material.uniforms.tReflectionMap.value=b.getRenderTarget().texture,this.material.uniforms.tRefractionMap.value=w.getRenderTarget().texture,this.material.uniforms.tNormalMap0.value=f,this.material.uniforms.tNormalMap1.value=m,this.material.uniforms.color.value=r,this.material.uniforms.reflectivity.value=l,this.material.uniforms.textureMatrix.value=y,this.material.uniforms.config.value.x=0,this.material.uniforms.config.value.y=g,this.material.uniforms.config.value.z=g,this.material.uniforms.config.value.w=h,this.onBeforeRender=function(e,t,r){var i,a;!function(e){y.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),y.multiply(e.projectionMatrix),y.multiply(e.matrixWorldInverse),y.multiply(n.matrixWorld)}(r),i=x.getDelta(),(a=n.material.uniforms.config).value.x+=c*i,a.value.y=a.value.x+g,a.value.x>=v?(a.value.x=0,a.value.y=g):a.value.y>=v&&(a.value.y=a.value.y-v),n.visible=!1,b.matrixWorld.copy(n.matrixWorld),w.matrixWorld.copy(n.matrixWorld),b.onBeforeRender(e,t,r),w.onBeforeRender(e,t,r),n.visible=!0}}else console.error("THREE.Water: Required component Refractor not found.");else console.error("THREE.Water: Required component Reflector not found.")};tA.prototype=Object.create(ni.prototype),tA.prototype.constructor=tA,tA.WaterShader={uniforms:{color:{type:"c",value:null},reflectivity:{type:"f",value:0},tReflectionMap:{type:"t",value:null},tRefractionMap:{type:"t",value:null},tNormalMap0:{type:"t",value:null},tNormalMap1:{type:"t",value:null},textureMatrix:{type:"m4",value:null},config:{type:"v4",value:new Wt}},vertexShader:["#include ","#include ","uniform mat4 textureMatrix;","varying vec4 vCoord;","varying vec2 vUv;","varying vec3 vToEye;","void main() {","\tvUv = uv;","\tvCoord = textureMatrix * vec4( position, 1.0 );","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tvToEye = cameraPosition - worldPosition.xyz;","\tvec4 mvPosition = viewMatrix * worldPosition;","\tgl_Position = projectionMatrix * mvPosition;","\t#include ","\t#include ","}"].join("\n"),fragmentShader:["#include ","#include ","#include ","uniform sampler2D tReflectionMap;","uniform sampler2D tRefractionMap;","uniform sampler2D tNormalMap0;","uniform sampler2D tNormalMap1;","#ifdef USE_FLOWMAP","\tuniform sampler2D tFlowMap;","#else","\tuniform vec2 flowDirection;","#endif","uniform vec3 color;","uniform float reflectivity;","uniform vec4 config;","varying vec4 vCoord;","varying vec2 vUv;","varying vec3 vToEye;","void main() {","\t#include ","\tfloat flowMapOffset0 = config.x;","\tfloat flowMapOffset1 = config.y;","\tfloat halfCycle = config.z;","\tfloat scale = config.w;","\tvec3 toEye = normalize( vToEye );","\tvec2 flow;","\t#ifdef USE_FLOWMAP","\t\tflow = texture2D( tFlowMap, vUv ).rg * 2.0 - 1.0;","\t#else","\t\tflow = flowDirection;","\t#endif","\tflow.x *= - 1.0;","\tvec4 normalColor0 = texture2D( tNormalMap0, ( vUv * scale ) + flow * flowMapOffset0 );","\tvec4 normalColor1 = texture2D( tNormalMap1, ( vUv * scale ) + flow * flowMapOffset1 );","\tfloat flowLerp = abs( halfCycle - flowMapOffset0 ) / halfCycle;","\tvec4 normalColor = mix( normalColor0, normalColor1, flowLerp );","\tvec3 normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );","\tfloat theta = max( dot( toEye, normal ), 0.0 );","\tfloat reflectance = reflectivity + ( 1.0 - reflectivity ) * pow( ( 1.0 - theta ), 5.0 );","\tvec3 coord = vCoord.xyz / vCoord.w;","\tvec2 uv = coord.xy + coord.z * normal.xz * 0.05;","\tvec4 reflectColor = texture2D( tReflectionMap, vec2( 1.0 - uv.x, uv.y ) );","\tvec4 refractColor = texture2D( tRefractionMap, uv );","\tgl_FragColor = vec4( color, 1.0 ) * mix( refractColor, reflectColor, reflectance );","\t#include ","\t#include ","\t#include ","}"].join("\n")};var nA=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},rA=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]this.tolerance)return!1}return!0},intersectRay:function(e,t){for(var n=this.faces,r=-1/0,i=1/0,a=0,o=n.length;a0&&l>=0)return null;var h=0!==l?-c/l:0;if(!(h<=0)&&(l>0?i=Math.min(h,i):r=Math.max(h,r),r>i))return null}return r!==-1/0?e.at(r,t):e.at(i,t),t},intersectsRay:function(e){return null!==this.intersectRay(e,a)},makeEmpty:function(){return this.faces=[],this.vertices=[],this},addVertexToFace:function(e,t){return e.face=t,null===t.outside?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this},removeVertexFromFace:function(e,t){return e===t.outside&&(null!==e.next&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this},removeAllVerticesFromFace:function(e){if(null!==e.outside){for(var t=e.outside,n=e.outside;null!==n.next&&n.next.face===e;)n=n.next;return this.assigned.removeSubList(t,n),t.prev=n.next=null,e.outside=null,t}},deleteFaceVertices:function(e,t){var n=this.removeAllVerticesFromFace(e);if(void 0!==n)if(void 0===t)this.unassigned.appendChain(n);else{var r=n;do{var i=r.next;t.distanceToPoint(r.point)>this.tolerance?this.addVertexToFace(r,t):this.unassigned.append(r),r=i}while(null!==r)}return this},resolveUnassignedPoints:function(e){if(!1===this.unassigned.isEmpty()){var t=this.unassigned.first();do{for(var n=t.next,r=this.tolerance,a=null,o=0;or&&(r=c,a=s),r>1e3*this.tolerance)break}}null!==a&&this.addVertexToFace(t,a),t=n}while(null!==t)}return this},computeExtremes:function(){var e,t,n,r=new zt,i=new zt,a=[],o=[];for(e=0;e<3;e++)a[e]=o[e]=this.vertices[0];for(r.copy(this.vertices[0].point),i.copy(this.vertices[0].point),e=0,t=this.vertices.length;ei.getComponent(n)&&(i.setComponent(n,c.getComponent(n)),o[n]=s)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(r.x),Math.abs(i.x))+Math.max(Math.abs(r.y),Math.abs(i.y))+Math.max(Math.abs(r.z),Math.abs(i.z))),{min:a,max:o}},computeInitialHull:function(){void 0===e&&(e=new wu,t=new Jn,n=new zt);var r,i,a,o,c,l,h,u,p,d=this.vertices,f=this.computeExtremes(),m=f.min,v=f.max,g=0,y=0;for(l=0;l<3;l++)(p=v[l].point.getComponent(l)-m[l].point.getComponent(l))>g&&(g=p,y=l);for(i=m[y],a=v[y],g=0,e.set(i.point,a.point),l=0,h=this.vertices.length;lg&&(g=p,o=r));for(g=-1,t.setFromCoplanarPoints(i.point,a.point,o.point),l=0,h=this.vertices.length;lg&&(g=p,c=r);var x=[];if(t.distanceToPoint(c.point)<0)for(x.push(s.create(i,a,o),s.create(c,a,i),s.create(c,o,a),s.create(c,i,o)),l=0;l<3;l++)u=(l+1)%3,x[l+1].getEdge(2).setTwin(x[0].getEdge(u)),x[l+1].getEdge(1).setTwin(x[u+1].getEdge(0));else for(x.push(s.create(i,o,a),s.create(c,i,a),s.create(c,a,o),s.create(c,o,i)),l=0;l<3;l++)u=(l+1)%3,x[l+1].getEdge(2).setTwin(x[0].getEdge((3-l)%3)),x[l+1].getEdge(0).setTwin(x[u+1].getEdge(1));for(l=0;l<4;l++)this.faces.push(x[l]);for(l=0,h=d.length;lg&&(g=p,b=this.faces[u]);null!==b&&this.addVertexToFace(r,b)}return this},reindexFaces:function(){for(var e=[],t=0;tt&&(t=i,e=r),r=r.next}while(null!==r&&r.face===n);return e}},computeHorizon:function(e,t,n,r){var a;this.deleteFaceVertices(n),n.mark=1,a=null===t?t=n.getEdge(0):t.next;do{var o=a.twin,s=o.face;s.mark===i&&(s.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,o,s,r):r.push(a)),a=a.next}while(a!==t);return this},addAdjoiningFace:function(e,t){var n=s.create(e,t.tail(),t.head());return this.faces.push(n),n.getEdge(-1).setTwin(t.twin),n.getEdge(0)},addNewFaces:function(e,t){this.newFaces=[];for(var n=null,r=null,i=0;i0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t},compute:function(){void 0===r&&(r=new sr);var e=this.edge.tail(),t=this.edge.head(),n=this.edge.next.head();return r.set(e.point,t.point,n.point),r.getNormal(this.normal),r.getMidpoint(this.midpoint),this.area=r.getArea(),this.constant=this.normal.dot(this.midpoint),this},distanceToPoint:function(e){return this.normal.dot(e)-this.constant}}),Object.assign(c.prototype,{head:function(){return this.vertex},tail:function(){return this.prev?this.prev.vertex:null},length:function(){var e=this.head(),t=this.tail();return null!==t?t.point.distanceTo(e.point):-1},lengthSquared:function(){var e=this.head(),t=this.tail();return null!==t?t.point.distanceToSquared(e.point):-1},setTwin:function(e){return this.twin=e,e.twin=this,this}}),Object.assign(h.prototype,{first:function(){return this.head},last:function(){return this.tail},clear:function(){return this.head=this.tail=null,this},insertBefore:function(e,t){return t.prev=e.prev,t.next=e,null===t.prev?this.head=t:t.prev.next=t,e.prev=t,this},insertAfter:function(e,t){return t.prev=e,t.next=e.next,null===t.next?this.tail=t:t.next.prev=t,e.next=t,this},append:function(e){return null===this.head?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this},appendChain:function(e){for(null===this.head?this.head=e:this.tail.next=e,e.prev=this.tail;null!==e.next;)e=e.next;return this.tail=e,this},remove:function(e){return null===e.prev?this.head=e.next:e.prev.next=e.next,null===e.next?this.tail=e.prev:e.next.prev=e.prev,this},removeSubList:function(e,t){return null===e.prev?this.head=t.next:e.prev.next=t.next,null===t.next?this.tail=e.prev:t.next.prev=e.prev,this},isEmpty:function(){return null===this.head}}),o}(),fA=function(e){li.call(this),this.fromBufferGeometry(new mA(e)),this.mergeVertices()}; +/** + * @author Yannick Deubel (https://github.com/yandeu) + * @copyright Copyright (c) 2019 Yannick Deubel; Project Url: https://github.com/yandeu/enable3d + * @license {@link https://github.com/yandeu/enable3d/blob/master/LICENSE|GNU GPLv3} + */(fA.prototype=Object.create(li.prototype)).constructor=fA;var mA=function(e){zr.call(this);var t=[],n=[];void 0===dA&&console.error("THREE.ConvexBufferGeometry: ConvexBufferGeometry relies on ConvexHull");for(var r=(new dA).setFromPoints(e).faces,i=0;ic)a.push(h);else{var f=Math.PI;0===d?(s.normal.copy(o.normal),s.constant=o.constant):d<=r?(f=(p-u)*(.2+.6*Math.random())+u,l.tempVector3_2.copy(e.position).sub(t).applyAxisAngle(n,f).add(t),s.setFromCoplanarPoints(t,l.tempVector3,l.tempVector3_2)):(f=(.5*(1&d)+.2*(2-Math.random()))*Math.PI,l.tempVector3_2.copy(t).sub(h.position).applyAxisAngle(n,f).add(h.position),l.tempVector3_3.copy(n).add(h.position),s.setFromCoplanarPoints(h.position,l.tempVector3_3,l.tempVector3_2)),l.cutByPlane(h,s,l.tempResultObjects);var m=l.tempResultObjects.object1,v=l.tempResultObjects.object2;m&&i(m,u,f,d+1),v&&i(v,f,p,d+1)}}(e,0,2*Math.PI,0),a},cutByPlane:function(e,t,n){var r=e.geometry,i=r.attributes.position.array,a=r.attributes.normal.array,o=i.length/3,s=o/3,c=r.getIndex();function l(e,t){var n=3*e+t;return c?c[n]:n}c&&(s=(c=c.array).length/3);for(var h=[],u=[],p=this.smallDelta,d=o*o,f=0;fp?(I=2,u.push(m.clone())):N<-p?(I=1,h.push(m.clone())):(I=3,h.push(m.clone()),u.push(m.clone()));var N,D=0;if((N=S.distanceToPoint(v))>p?(D=2,u.push(v.clone())):N<-p?(D=1,h.push(v.clone())):(D=3,h.push(v.clone()),u.push(v.clone())),1===I&&2===D||2===I&&1===D){this.tempLine1.start.copy(m),this.tempLine1.end.copy(v);var F=new zt;if(void 0===(F=S.intersectLine(this.tempLine1,F)))return console.error("Internal error: segment does not intersect plane."),n.segmentedObject1=null,n.segmentedObject2=null,0;h.push(F),u.push(F.clone())}}}var U=.5*e.userData.mass;this.tempCM1.set(0,0,0);var z=0,B=h.length;if(B>0){for(f=0;f0){for(f=0;f4)try{(V=new ni(new mA(h),e.material)).position.copy(this.tempCM1),V.quaternion.copy(e.quaternion),this.prepareBreakableObject(V,U,e.userData.velocity,e.userData.angularVelocity,2*z>this.minSizeForBreak),W++}catch(e){console.warn(e.message)}if(k>4)try{(j=new ni(new mA(u),e.material)).position.copy(this.tempCM2),j.quaternion.copy(e.quaternion),this.prepareBreakableObject(j,U,e.userData.velocity,e.userData.angularVelocity,2*G>this.minSizeForBreak),W++}catch(e){console.warn(e.message)}return n.object1=V,n.object2=j,W}},gA.transformFreeVector=function(e,t){var n=e.x,r=e.y,i=e.z,a=t.elements;return e.x=a[0]*n+a[4]*r+a[8]*i,e.y=a[1]*n+a[5]*r+a[9]*i,e.z=a[2]*n+a[6]*r+a[10]*i,e},gA.transformFreeVectorInverse=function(e,t){var n=e.x,r=e.y,i=e.z,a=t.elements;return e.x=a[0]*n+a[1]*r+a[2]*i,e.y=a[4]*n+a[5]*r+a[6]*i,e.z=a[8]*n+a[9]*r+a[10]*i,e},gA.transformTiedVectorInverse=function(e,t){var n=e.x,r=e.y,i=e.z,a=t.elements;return e.x=a[0]*n+a[1]*r+a[2]*i-a[12],e.y=a[4]*n+a[5]*r+a[6]*i-a[13],e.z=a[8]*n+a[9]*r+a[10]*i-a[14],e},gA.transformPlaneToLocalSpace=(vA=new zt,function(e,t,n){n.normal.copy(e.normal),n.constant=e.constant;var r=gA.transformTiedVectorInverse(e.coplanarPoint(vA),t);gA.transformFreeVectorInverse(n.normal,t),n.constant=-r.dot(n.normal)}); +/** + * @author Yannick Deubel (https://github.com/yandeu) + * @copyright Copyright (c) 2019 Yannick Deubel; Project Url: https://github.com/yandeu/enable3d + * @license {@link https://github.com/yandeu/enable3d/blob/master/LICENSE|GNU GPLv3} + */ +var yA=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xA=function(){for(var e=0,t=0,n=arguments.length;tR&&(R=f,m=d.get_m_positionWorldOnB(),v=d.get_m_normalWorldOnB(),n.set(m.x(),m.y(),m.z()),r.set(v.x(),v.y(),v.z()));break}if(!L)return"continue";var O=new zt(0,0,0);if(h.userData={mass:1,velocity:O,angularVelocity:O,breakable:T,physicsBody:a},u.userData={mass:1,velocity:O,angularVelocity:O,breakable:E,physicsBody:s},void 0===h.fragmentDepth&&(h.fragmentDepth=0),void 0===u.fragmentDepth&&(u.fragmentDepth=0),T&&!S&&R>5&&h.fragmentDepth<2){g=M.convexBreaker.subdivideByImpact(h,n,r,1,2),y=g.length;for(P=0;P5&&u.fragmentDepth<2){g=M.convexBreaker.subdivideByImpact(u,n,r,1,2),y=g.length;for(P=0;P0&&h.setActivationState(4),i.rigidBodies.push(e),i.physicsWorld.addRigidBody(h);var u=Object.values(h)[0];h.name=e.name,e.body=new oA(i,h),e.hasBody=!0,e.ptr=u,i.objectsAmmo[u]=e},i.gravity=r.gravity||{x:0,y:-9.81,z:0},i.start(),i}return wA(t,e),Object.defineProperty(t.prototype,"debug",{get:function(){var e=this;return{enable:function(){e.debugDrawer.enable()},mode:function(t){void 0===t&&(t=1),e.debugDrawer.setDebugMode(t)},disable:function(){e.debugDrawer.disable()}}},enumerable:!0,configurable:!0}),t.prototype.start=function(){var e=this;"undefined"!=typeof Ammo?"function"==typeof Ammo?Ammo().then((function(){e.setup()})):this.setup():IE("Are you sure you included ammo.js?")},Object.defineProperty(t.prototype,"add",{get:function(){var e=this;return{collider:function(t,n,r){return e.addCollider(t,n,r)},constraints:this.addConstraints,existing:function(t,n){return e.addExisting(t,n)},sphere:function(t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.addSphere(t,n)},ground:function(t,n){return void 0===n&&(n={}),e.addGround(_A(_A({},t),{mass:0}),n)},box:function(t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.addBox(t,n)},cylinder:function(t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.addCylinder(t,n)},extrude:function(t,n){return void 0===n&&(n={}),e.addExtrude(t,n)}}},enumerable:!0,configurable:!0}),t.prototype.addExisting=function(e,t){var n,r;void 0===t&&(t={});var i=e.position,a=e.quaternion,o=e.shape,s=e.hasBody,c=t.width,l=void 0===c?1:c,h=t.height,u=void 0===h?1:h,p=t.depth,d=void 0===p?1:p,f=t.autoCenter,m=void 0===f||f,v=t.offset,g=void 0===v?void 0:v,y=null===(r=null===(n=e)||void 0===n?void 0:n.geometry)||void 0===r?void 0:r.parameters,x=e.hasOwnProperty("shape"),b=t.mass,w=void 0===b?1:b,_=function(){return new Ammo.btBoxShape(new Ammo.btVector3(l/2,u/2,d/2))};if(s)IE('Object "'+e.name+'" already has a physical body!');else{var M;if(!m||"convex"!==o&&"concave"!==o||e.geometry.center(),x)switch(o){case"box":M=new Ammo.btBoxShape(new Ammo.btVector3(y.width/2,y.height/2,y.depth/2));break;case"sphere":M=new Ammo.btSphereShape(y.radius);break;case"convex":case"concave":M=this.addTriMeshShape(e,t);break;case"hull":M=this.addHullShape(e,t);break;default:M=_()}else M=_();if(M.setMargin(.05),this.addRigidBody(e,M,w,i,a),this.addBodyProperties(e,t),!x){var T={x:0,y:0,z:0};e.body.offset=_A(_A({},T),g||{y:-u/2})}}},t}(VS.a);FE(MA,[bA,cA,sA,hA]);var TA=MA,EA=function(){var e=EA.SkyShader,t=new gi({fragmentShader:e.fragmentShader,vertexShader:e.vertexShader,uniforms:fi.clone(e.uniforms),side:m});ni.call(this,new ui(1,1,1),t)};EA.prototype=Object.create(ni.prototype),EA.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new zt},up:{value:new zt(0,1,0)}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","uniform vec3 up;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {","\tzenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );","\treturn EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {","\tfloat c = ( 0.2 * T ) * 10E-18;","\treturn 0.434 * c * MieConst;","}","void main() {","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tvWorldPosition = worldPosition.xyz;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","\tgl_Position.z = gl_Position.w;","\tvSunDirection = normalize( sunPosition );","\tvSunE = sunIntensity( dot( vSunDirection, up ) );","\tvSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );","\tfloat rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );","\tvBetaR = totalRayleigh * rayleighCoefficient;","\tvBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join("\n"),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","uniform vec3 up;","const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {","\treturn THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {","\tfloat g2 = pow( g, 2.0 );","\tfloat inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );","\treturn ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {","\treturn ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {","\tfloat zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );","\tfloat inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );","\tfloat sR = rayleighZenithLength * inverse;","\tfloat sM = mieZenithLength * inverse;","\tvec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );","\tfloat cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );","\tfloat rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );","\tvec3 betaRTheta = vBetaR * rPhase;","\tfloat mPhase = hgPhase( cosTheta, mieDirectionalG );","\tvec3 betaMTheta = vBetaM * mPhase;","\tvec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );","\tLin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );","\tvec3 direction = normalize( vWorldPosition - cameraPos );","\tfloat theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]","\tfloat phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]","\tvec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );","\tvec3 L0 = vec3( 0.1 ) * Fex;","\tfloat sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );","\tL0 += ( vSunE * 19000.0 * Fex ) * sundisk;","\tvec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );","\tvec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );","\tvec3 color = curr * whiteScale;","\tvec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );","\tgl_FragColor = vec4( retColor, 1.0 );","}"].join("\n")}; +/** + * @author Yannick Deubel (https://github.com/yandeu) + * @copyright Copyright (c) 2019 Yannick Deubel; Project Url: https://github.com/yandeu/enable3d + * @license {@link https://github.com/yandeu/enable3d/blob/master/LICENSE|GNU GPLv3} + */ +var SA=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),AA=function(e){function t(t,n){var r=e.call(this,t,n)||this;return window.__loadPhysics&&(r.physics=new TA(r,t,n)),t.events.once("shutdown",(function(){t.events.removeListener("update")})),r}return SA(t,e),t.prototype.haveSomeFun=function(e){var t,n;if(void 0===e&&(e=20),window.__loadPhysics)for(var r=0;r.5?this.physics.add.box({x:Phaser.Math.Between(-10,10),y:Phaser.Math.Between(10,20),z:Phaser.Math.Between(-10,10),width:Phaser.Math.Between(1,2)/10,height:Phaser.Math.Between(1,2)/10,depth:Phaser.Math.Between(1,2)/10,mass:1},(t={},t[Phaser.Math.RND.pick(i)]={color:Math.floor(16777215*Math.random())},t)).body.setRestitution(Math.floor(10*Math.random())/20):this.physics.add.sphere({x:Phaser.Math.Between(-10,10),y:Phaser.Math.Between(10,20),z:Phaser.Math.Between(-10,10),radius:Phaser.Math.Between(1,2)/10,mass:1},(n={},n[Phaser.Math.RND.pick(i)]={color:Math.floor(16777215*Math.random())},n)).body.setRestitution(Math.floor(10*Math.random())/20)}else IE("There is not much fun without physics enabled!")},t.prototype.warpSpeed=function(){for(var e=[],n=0;n0;if((0===e.length||i)&&(e=["light","camera","lookAtCenter","ground","grid","orbitControls","fog","sky"]),i){var a=r.map((function(e){return e.substr(1)}));a.forEach((function(t){var n=e.indexOf(t);e.splice(n,1)}))}if(e.includes("fog"),e.includes("sky")){var o=new EA;o.scale.setScalar(45e4),this.scene.add(o);var s=new ni(new Dc(2e4,16,8),new yr({color:16777215}));s.position.y=-7e5,s.visible=!1,this.scene.add(s);var c={turbidity:10,rayleigh:2,mieCoefficient:.005,mieDirectionalG:.8,luminance:1,inclination:.25,azimuth:.25,sun:!1},l=4e5,h=o.material.uniforms;h.turbidity.value=c.turbidity,h.rayleigh.value=c.rayleigh,h.mieCoefficient.value=c.mieCoefficient,h.mieDirectionalG.value=c.mieDirectionalG,h.luminance.value=c.luminance;var u=Math.PI*(c.inclination-.5),p=2*Math.PI*(c.azimuth-.5);s.position.x=l*Math.cos(p),s.position.y=l*Math.sin(p)*Math.sin(u),s.position.z=l*Math.sin(p)*Math.cos(u),s.visible=c.sun,h.sunPosition.value.copy(s.position)}if(e.includes("camera")&&this.camera.position.set(5,5,10),e.includes("light")){this.add.ambientLight({color:7368816});var d=this.add.directionalLight({skyColor:16777215,intensity:.8,x:-10,y:18,z:5}),f=20;d.shadow.camera.top=f,d.shadow.camera.bottom=-f,d.shadow.camera.left=-f,d.shadow.camera.right=f,d.shadow.mapSize.set(1024,1024)}if(e.includes("lookAtCenter")&&this.camera.lookAt(this.scene.position),e.includes("ground")){var m=e.includes("grid"),v="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOnAAADusBZ+q87AAAAJtJREFUeJzt0EENwDAAxLDbNP6UOxh+NEYQ5dl2drFv286598GrA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAa4AO0BqgA7QG6ACtATpAu37AD8eaBH5JQdVbAAAAAElFTkSuQmCC",g=this.load.texture(v);g.wrapS=g.wrapT=pe,g.repeat.set(21,21),this.ground=this.physics.add.ground({name:"ground",width:21,height:21,depth:1,y:-.5},{phong:{map:m?g:null,transparent:!0,opacity:.8,color:16777215}}),this.ground.receiveShadow=!0,this.ground.body.setRestitution(1)}e.includes("orbitControls")&&t.OrbitControls(this.camera,this.root.scale.parent)},t.OrbitControls=function(e,t){return aA.OrbitControls(e,t)},Object.defineProperty(t.prototype,"on",{get:function(){var e=this;return{collision:function(t){e.physics.on("collision",(function(e){t(e)}))}}},enumerable:!0,configurable:!0}),t}(aA);function LA(e){return(LA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var RA=function(){try{if("object"===("undefined"==typeof WebAssembly?"undefined":LA(WebAssembly))&&"function"==typeof WebAssembly.instantiate){var e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}return!1}(),PA=function(e,t){var n=document.createElement("script");n.onload=function(){t()},n.onerror=function(){throw new Error("failed to load "+e)},n.async=!0,n.src=e,document.head.appendChild(n)},CA=function(e,t){PA(RA?e+"/ammo.wasm.js":e+"/ammo.js",(function(){return t()}))},OA=function(){try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}},IA=function(){return(IA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},function(t,e,i){var n=i(0),s=i(46),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectFactory",o,"add"),t.exports=o},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=i,o=0;o>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},getComponentCount:function(t,e){for(var i=0,n=0;n=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e,i){t.exports={Alpha:i(252),Animation:i(484),BlendMode:i(255),ComputedSize:i(527),Crop:i(528),Depth:i(256),Flip:i(529),GetBounds:i(530),Mask:i(260),Origin:i(547),PathFollower:i(548),Pipeline:i(151),ScrollFactor:i(263),Size:i(549),Texture:i(550),TextureCrop:i(551),Tint:i(552),ToJSON:i(264),Transform:i(265),TransformMatrix:i(32),Visible:i(266)}},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e,i){var n=i(0),s=i(264),r=i(111),o=i(9),a=i(90),h=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e,i){var n=i(166),s=i(6);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){var n=i(0),s=i(21),r=i(22),o=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.displayList,this.updateList,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},s.register("GameObjectCreator",o,"make"),t.exports=o},function(t,e,i){var n=i(7),s=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){t.exports={BOOT:i(681),CREATE:i(682),DESTROY:i(683),PAUSE:i(684),POST_UPDATE:i(685),PRE_UPDATE:i(686),READY:i(687),RENDER:i(688),RESUME:i(689),SHUTDOWN:i(690),SLEEP:i(691),START:i(692),TRANSITION_COMPLETE:i(693),TRANSITION_INIT:i(694),TRANSITION_OUT:i(695),TRANSITION_START:i(696),TRANSITION_WAKE:i(697),UPDATE:i(698),WAKE:i(699)}},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n=i(2);t.exports=function(t,e,i,s,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===s&&(s=o.height);var a=n(r,"isNotEmpty",!1),h=n(r,"isColliding",!1),l=n(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+s>o.height&&(s=Math.max(o.height-e,0));for(var u=[],c=e;c=0;o--)t[o][e]=i+a*n,a++;return t}},function(t,e,i){var n,s,r,o=i(29),a=i(162),h=[],l=!1;t.exports={create2D:function(t,e,i){return n(t,e,i,o.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=o.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3];return n[0]=s*i+o*e,n[1]=r*i+a*e,n[2]=s*-e+o*i,n[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],g=n[5],v=void 0===e?this:e;return v.a=u*s+c*o,v.b=u*r+c*a,v.c=d*s+f*o,v.d=d*r+f*a,v.e=p*s+g*o+h,v.f=p*r+g*a+l,v},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=e*r+i*a+n[4],u=e*o+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],g=s[4],v=s[5];return n[0]=c*r+d*a,n[1]=c*o+d*h,n[2]=f*r+p*a,n[3]=f*o+p*h,n[4]=g*r+v*a+l,n[5]=g*o+v*h+u,this},transform:function(t,e,i,n,s,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=s*a+r*l+c,o[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*s+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=e*s-i*n;return t[0]=s/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-s*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=s,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*n,r[1]=o*n,r[2]=-o*s,r[3]=a*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=s*c*e+-o*c*t+(-u*s+l*o)*c,i},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=o},function(t,e,i){var n=i(0),s=i(160),r=i(278),o=i(161),a=i(279),h=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,n)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=n,this._locked=!1,this.update(s)},setGLTo:function(t,e,i,n){return void 0===n&&(n=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=n,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,n=this.b,o=this.a;return this._color=s(e,i,n),this._color32=r(e,i,n,o),this._rgba="rgba("+e+","+i+","+n+","+o/255+")",t&&a(e,i,n,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t));return this.setTo(i,n,s)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,n=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),n=Math.max(0,Math.min(255,n-Math.round(-t/100*255))),this.setTo(e,i,n)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},function(t,e){t.exports=function(t,e,i,n,s,r){var o;void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=s;o=0;o--)t[o][e]+=i+a*n,a++;return t}},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e,i){(function(e){var i={};t.exports=i,function(){i._nextId=0,i._seed=0,i._nowStartTime=+new Date,i.extend=function(t,e){var n,s;"boolean"==typeof e?(n=2,s=e):(n=1,s=!0);for(var r=n;r0;e--){var n=Math.floor(i.random()*(e+1)),s=t[e];t[e]=t[n],t[n]=s}return t},i.choose=function(t){return t[Math.floor(i.random()*t.length)]},i.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},i.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i.isFunction=function(t){return"function"==typeof t},i.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},i.isString=function(t){return"[object String]"===toString.call(t)},i.clamp=function(t,e,i){return ti?i:t},i.sign=function(t){return t<0?-1:1},i.now=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return new Date-i._nowStartTime},i.random=function(e,i){return e=void 0!==e?e:0,i=void 0!==i?i:1,e+t()*(i-e)};var t=function(){return i._seed=(9301*i._seed+49297)%233280,i._seed/233280};i.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},i.logLevel=1,i.log=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.info=function(){console&&i.logLevel>0&&i.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.warn=function(){console&&i.logLevel>0&&i.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},i.nextId=function(){return i._nextId++},i.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i=e&&t.y<=i&&t.y+t.height>=i}},function(t,e,i){t.exports={DESTROY:i(622),FADE_IN_COMPLETE:i(623),FADE_IN_START:i(624),FADE_OUT_COMPLETE:i(625),FADE_OUT_START:i(626),FLASH_COMPLETE:i(627),FLASH_START:i(628),PAN_COMPLETE:i(629),PAN_START:i(630),POST_RENDER:i(631),PRE_RENDER:i(632),SHAKE_COMPLETE:i(633),SHAKE_START:i(634),ZOOM_COMPLETE:i(635),ZOOM_START:i(636)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},function(t,e,i){var n=i(137),s=i(24);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=s(t,e,i,r,null,o),d=0;d0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},function(t,e,i){var n=i(0),s=i(258),r=i(148),o=i(46),a=i(149),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e,i){t.exports={COMPLETE:i(871),DECODED:i(872),DECODED_ALL:i(873),DESTROY:i(874),DETUNE:i(875),GLOBAL_DETUNE:i(876),GLOBAL_MUTE:i(877),GLOBAL_RATE:i(878),GLOBAL_VOLUME:i(879),LOOP:i(880),LOOPED:i(881),MUTE:i(882),PAUSE_ALL:i(883),PAUSE:i(884),PLAY:i(885),RATE:i(886),RESUME_ALL:i(887),RESUME:i(888),SEEK:i(889),STOP_ALL:i(890),STOP:i(891),UNLOCKED:i(892),VOLUME:i(893)}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(6),l=i(7),u=new n({Extends:r,initialize:function(t,e,i,n,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;var t=JSON.parse(this.xhrLoader.responseText),e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s0&&(o.angle+=t.angularVelocity,r.rotateAbout(o.position,i,t.position,o.position))}},n.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},n.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},n.translate=function(t,e){n.setPosition(t,r.add(t.position,e))},n.rotate=function(t,e,i){if(i){var s=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;n.setPosition(t,{x:i.x+(o*s-a*r),y:i.y+(o*r+a*s)}),n.setAngle(t,t.angle+e)}else n.setAngle(t,t.angle+e)},n.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(n.setMass(t,t.density*o),n.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},n.update=function(t,e,i,n){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*n+t.force.x/t.mass*o,t.velocity.y=c*a*n+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*n+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(f.position.x+=t.velocity.x,f.position.y+=t.velocity.y),0!==t.angularVelocity&&(s.rotate(f.vertices,t.angularVelocity,t.position),l.rotate(f.axes,t.angularVelocity),d>0&&r.rotateAbout(f.position,t.angularVelocity,t.position,f.position)),h.update(f.bounds,f.vertices,t.velocity)}},n.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var n=e.x-t.position.x,s=e.y-t.position.y;t.torque+=n*i.y-s*i.x},n._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i80*i){n=h=t[0],a=l=t[1];for(var T=i;Th&&(h=u),f>l&&(l=f);g=0!==(g=Math.max(h-n,l-a))?1/g:0}return o(y,x,i,n,a,g),x}function s(t,e,i,n,s){var r,o;if(s===A(t,e,i,n)>0)for(r=e;r=e;r-=n)o=b(r,t[r],t[r+1],o);return o&&y(o,o.next)&&(E(o),o=o.next),o}function r(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!y(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(E(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function o(t,e,i,n,s,c,d){if(t){!d&&c&&function(t,e,i,n){var s=t;do{null===s.z&&(s.z=f(s.x,s.y,e,i,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,function(t){var e,i,n,s,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||h>0&&n;)0!==a&&(0===h||!n||i.z<=n.z)?(s=i,i=i.nextZ,a--):(s=n,n=n.nextZ,h--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;i=n}r.nextZ=null,l*=2}while(o>1)}(s)}(t,n,s,c);for(var p,g,v=t;t.prev!==t.next;)if(p=t.prev,g=t.next,c?h(t,n,s,c):a(t))e.push(p.i/i),e.push(t.i/i),e.push(g.i/i),E(t),t=g.next,v=g.next;else if((t=g)===v){d?1===d?o(t=l(t,e,i),e,i,n,s,c,2):2===d&&u(t,e,i,n,s,c):o(r(t),e,i,n,s,c,1);break}}}function a(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var s=t.next.next;s!==t.prev;){if(g(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&m(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function h(t,e,i,n){var s=t.prev,r=t,o=t.next;if(m(s,r,o)>=0)return!1;for(var a=s.xr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=f(a,h,e,i,n),d=f(l,u,e,i,n),p=t.prevZ,v=t.nextZ;p&&p.z>=c&&v&&v.z<=d;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;p&&p.z>=c;){if(p!==t.prev&&p!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&m(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&g(s.x,s.y,r.x,r.y,o.x,o.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function l(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!y(s,r)&&x(s,n,n.next,r)&&T(s,r)&&T(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),E(n),E(n.next),n=t=r),n=n.next}while(n!==t);return n}function u(t,e,i,n,s,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=w(h,l);return h=r(h,h.next),u=r(u,u.next),o(h,e,i,n,s,a),void o(u,e,i,n,s,a)}l=l.next}h=h.next}while(h!==t)}function c(t,e){return t.x-e.x}function d(t,e){if(e=function(t,e){var i,n=e,s=t.x,r=t.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&a>o){if(o=a,a===s){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x=n.x&&n.x>=u&&s!==n.x&&g(ri.x)&&T(n,t)&&(i=n,d=h),n=n.next;return i}(t,e)){var i=w(e,t);r(i,i.next)}}function f(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{e.x=0&&(t-o)*(n-a)-(i-o)*(e-a)>=0&&(i-o)*(r-a)-(s-o)*(n-a)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&x(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function x(t,e,i,n){return!!(y(t,e)&&y(i,n)||y(t,n)&&y(i,e))||m(t,e,i)>0!=m(t,e,n)>0&&m(i,n,t)>0!=m(i,n,e)>0}function T(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function w(t,e){var i=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=s,s.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function b(t,e,i,n){var s=new S(t,e,i);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,i,n){for(var s=0,r=e,o=i-n;r0&&(n+=t[s-1].length,i.holes.push(n))}return i}},function(t,e){t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s||e+i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(949),a=new n({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,o],initialize:function(t,e,i,n,o){r.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s.Animation(this),this.setTexture(n,o),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=t.strokeTint,a=n.getTintAppendFloatAlphaAndSwap(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-s,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=new n({Extends:r,initialize:function t(e,i,n,s,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),n=a(c,"url"),l=a(c,"normalMap"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:o};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,o);f.type="normalMap",this.setLink(f),e.addFile(f)}},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});o.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=t.properties,this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldX(this.x,t):this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=o},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;si&&(e=i/2);var n=Math.max(1,Math.round(i/e));return s(this.getSpacedPoints(n),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],n=this.getPoint(0,this._tmpVec2A),s=0;i.push(0);for(var r=1;r<=t;r++)s+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(n),i.push(s),n.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var n=0;n<=t;n++)i.push(this.getPoint(n/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=this.defaultDivisions);for(var e=[],i=0;i<=t;i++){var n=this.getUtoTmapping(i/t,null,t);e.push(this.getPoint(n))}return e},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=t-1e-4,n=t+1e-4;return i<0&&(i=0),n>1&&(n=1),this.getPoint(i,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var n,s=this.getLengths(i),r=0,o=s.length;n=e?Math.min(e,s[o-1]):t*s[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=s[r=Math.floor(h+(l-h)/2)]-n)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(s[r=l]===n)return r/(o-1);var u=s[r];return(r+(n-u)/(s[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},function(t,e,i){t.exports={ADD:i(850),COMPLETE:i(851),FILE_COMPLETE:i(852),FILE_KEY_COMPLETE:i(853),FILE_LOAD_ERROR:i(854),FILE_LOAD:i(855),FILE_PROGRESS:i(856),POST_PROCESS:i(857),PROGRESS:i(858),START:i(859)}},function(t,e,i){var n=i(164),s=i(178);t.exports=function(t,e){var i=n.Power0;if("string"==typeof t)if(n.hasOwnProperty(t))i=n[t];else{var r="";t.indexOf(".")&&("in"===(r=t.substr(t.indexOf(".")+1)).toLowerCase()?r="easeIn":"out"===r.toLowerCase()?r="easeOut":"inout"===r.toLowerCase()&&(r="easeInOut")),t=s(t.substr(0,t.indexOf(".")+1)+r),n.hasOwnProperty(t)&&(i=n[t])}else"function"==typeof t?i=t:Array.isArray(t)&&t.length;if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},function(t,e){t.exports=function(t,e,i){var n=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=n*n+s*s,u=n*r+s*o,c=n*a+s*h,d=r*r+o*o,f=r*a+o*h,p=l*d-u*u,g=0===p?0:1/p,v=(d*c-u*f)*g,m=(l*f-u*c)*g;return v>=0&&m>=0&&v+m<1}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.x1,r=t.y1,o=t.x2,a=t.y2,h=e.x1,l=e.y1,u=e.x2,c=e.y2,d=(u-h)*(r-l)-(c-l)*(s-h),f=(o-s)*(r-l)-(a-r)*(s-h),p=(c-l)*(o-s)-(u-h)*(a-r);if(0===p)return!1;var g=d/p,v=f/p;return g>=0&&g<=1&&v>=0&&v<=1&&(i.x=s+g*(o-s),i.y=r+g*(a-r),!0)}},function(t,e){t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.create=function(t,e){for(var i=[],n=0;n0)return!1}return!0},n.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||n.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},n.hull=function(t){var e,i,n=[],r=[];for((t=t.slice(0)).sort(function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y}),i=0;i=2&&s.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];n.length>=2&&s.cross3(n[n.length-2],n[n.length-1],e)<=0;)n.pop();n.push(e)}return n.pop(),r.pop(),n.concat(r)}},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){t.exports={DESTROY:i(557),VIDEO_COMPLETE:i(558),VIDEO_CREATED:i(559),VIDEO_ERROR:i(560),VIDEO_LOOP:i(561),VIDEO_PLAY:i(562),VIDEO_SEEKED:i(563),VIDEO_SEEKING:i(564),VIDEO_STOP:i(565),VIDEO_TIMEOUT:i(566),VIDEO_UNLOCKED:i(567)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(9),a=i(48),h=i(11),l=i(32),u=i(159),c=i(3),d=new n({Extends:o,Mixins:[s.Alpha,s.Visible],initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.resolution=1,this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._cx=0,this._cy=0,this._cw=0,this._ch=0,this._width=i,this._height=n,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoom=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,n/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var n=.5*this.width,s=.5*this.height;return i.x=t-n,i.y=e-s,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],n=e[1],s=e[2],r=e[3],o=i*r-n*s;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.culledObjects,p=t.length;o=1/o,f.length=0;for(var g=0;gC&&wA&&b<_&&f.push(v)}else f.push(v)}return f},getWorldPoint:function(t,e,i){void 0===i&&(i=new c);var n=this.matrix.matrix,s=n[0],r=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=s*a-r*o;if(!u)return i.x=t,i.y=e,i;var d=a*(u=1/u),f=-r*u,p=-o*u,g=s*u,v=(o*l-a*h)*u,m=(r*h-s*l)*u,y=Math.cos(this.rotation),x=Math.sin(this.rotation),T=this.zoom,w=this.resolution,b=this.scrollX,E=this.scrollY,S=t+(b*y-E*x)*T,A=e+(b*x+E*y)*T;return i.x=(S*d+A*p)*w+v,i.y=(S*f+A*g)*w+m,i},ignore:function(t){var e=this.id;Array.isArray(t)||(t=[t]);for(var i=0;is&&(t=s),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,n=e.y+(i-this.height)/2,s=Math.max(n,n+e.height-i);return ts&&(t=s),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,n,s){return void 0===s&&(s=!1),this._bounds.setTo(t,e,i,n),this.dirty=!0,this.useBounds=!0,s?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t){this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t;var e=t.sys;this.sceneManager=e.game.scene,this.scaleManager=e.scale,this.cameraManager=e.cameras;var i=this.scaleManager.resolution;return this.resolution=i,this._cx=this._x*i,this._cy=this._y*i,this._cw=this._width*i,this._ch=this._height*i,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setZoom:function(t){return void 0===t&&(t=1),0===t&&(t=.001),this.zoom=t,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},updateSystem:function(){if(this.scaleManager){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this._cx=t*this.resolution,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this._cy=t*this.resolution,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this._cw=t*this.resolution,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this._ch=t*this.resolution,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){this._scrollX=t,this.dirty=!0}},scrollY:{get:function(){return this._scrollY},set:function(t){this._scrollY=t,this.dirty=!0}},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoom}},displayHeight:{get:function(){return this.height/this.zoom}}});t.exports=d},function(t,e,i){t.exports={ENTER_FULLSCREEN:i(675),FULLSCREEN_FAILED:i(676),FULLSCREEN_UNSUPPORTED:i(677),LEAVE_FULLSCREEN:i(678),ORIENTATION_CHANGE:i(679),RESIZE:i(680)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=i(0),s=i(23),r=i(17),o=new n({initialize:function(t,e,i,n,s,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var o=s.drawImage;return o.x=i,o.y=n,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=n,a.w=s,a.h=r,a.r=i+s,a.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),g=l+(i=s(i,0,f)),v=n=s(n,0,d-e),m=r=s(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(n=s(n,0,u-e)),w=i+(r=s(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;v=S,m=A,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,n=S,r=A}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/_),t.v1=Math.min(1,(g+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=v,t.ch=m,t.width=n,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+n)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},function(t,e,i){var n=i(0),s=i(96),r=i(376),o=i(377),a=i(46),h=i(152),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var n=i(237),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(370),u=i(107),c=i(69),d=new s({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?h(e[0])&&(i=e,e=null):h(e)&&(i=e,e=null),this.scene=t,this.children=new u(e),this.isParent=!0,this.type="Group",this.classType=o(i,"classType",c),this.name=o(i,"name",""),this.active=o(i,"active",!0),this.maxSize=o(i,"maxSize",-1),this.defaultKey=o(i,"defaultKey",null),this.defaultFrame=o(i,"defaultFrame",null),this.runChildUpdate=o(i,"runChildUpdate",!1),this.createCallback=o(i,"createCallback",null),this.removeCallback=o(i,"removeCallback",null),this.createMultipleCallback=o(i,"createMultipleCallback",null),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof s&&(l.x=s),"number"==typeof r&&(l.y=r),l):n?this.create(s,r,o,a,h):null},get:function(t,e,i,n,s){return this.getFirst(!1,!0,t,e,i,n,s)},getFirstAlive:function(t,e,i,n,s,r){return this.getFirst(!0,t,e,i,n,s,r)},getFirstDead:function(t,e,i,n,s,r){return this.getFirst(!1,t,e,i,n,s,r)},playAnimation:function(t,e){return n.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},i.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+n}},function(t,e){t.exports=function(t,e,i){return t>=0&&t=0&&e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new n;return t.entries.forEach(function(t){e.set(t)}),this.entries.forEach(function(t){e.set(t)}),e},intersect:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)&&e.set(i)}),e},difference:function(t){var e=new n;return this.entries.forEach(function(i){t.contains(i)||e.set(i)}),e},size:{get:function(){return this.entries.length},set:function(t){return t0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e,i){(function(e){var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),void 0!==window.cordova&&(i.cordova=!0),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),void 0!==window.ejecta&&(i.ejecta=!0),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(701))},function(t,e,i){var n,s=i(114),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0};t.exports=(n=navigator.userAgent,/Edge\/\d+/.test(n)?r.edge=!0:/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10)):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10)):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(n)?r.opera=!0:/Safari/.test(n)&&!s.windowsPhone?r.safari=!0:/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e){t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e,i){t.exports={ADD:i(748),ERROR:i(749),LOAD:i(750),READY:i(751),REMOVE:i(752)}},function(t,e){t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement)return t;return i||(i=document.body),i.appendChild(t),t}},function(t,e,i){var n=i(79);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var o=e.length-1;o>=0;){var a=e[o];-1!==(r=t.indexOf(a))?(n(t,r),i&&i.call(s,a)):e.pop(),o--}return e}},function(t,e){t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},function(t,e){t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},function(t,e,i){var n=i(0),s=i(67),r=i(9),o=i(59),a=i(18),h=i(1),l=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,function(){this.pauseOnBlur&&this.onBlur()},this),t.events.on(a.FOCUS,function(){this.pauseOnBlur&&this.onFocus()},this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var n in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(n)){var r=s(e),o=i.spritemap[n];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:n,start:o.start,duration:o.end-o.start,config:r})}return i},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var n=this.addAudioSprite(t);return n.once(o.COMPLETE,n.destroy,n),n.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var n=this.sounds[i];n.key===t&&(n.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(o.STOP_ALL,this)},unlock:h,onBlur:h,onFocus:h,update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach(function(i){i.update(t,e)})},destroy:function(){this.removeAllListeners(),this.forEachActiveSound(function(t){t.destroy()}),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach(function(n,s){n&&!n.pendingRemove&&t.call(e||i,n,s,i.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=l},function(t,e,i){var n=i(0),s=i(9),r=i(59),o=i(17),a=i(1),h=new n({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.pendingRemove=!0,this.manager=null,this.key="",this.removeAllListeners(),this.isPlaying=!1,this.isPaused=!1,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},function(t,e,i){var n=i(180),s=i(0),r=i(1),o=i(126),a=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o.inplace(this.list,e),this):this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){for(var i=[null],n=2;n0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},function(t,e,i){var n=i(181),s=i(368);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;il&&(r=l),o>l&&(o=l),a=s,h=r;;)if(a0&&o.length0&&a.lengthe.right||t.y>e.bottom)}},function(t,e,i){var n=i(6),s={},r={register:function(t,e,i,n,r){s[t]={plugin:e,mapping:i,settingsKey:n,configKey:r}},getPlugin:function(t){return s[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in s){var a=s[o].plugin,h=s[o].mapping,l=s[o].settingsKey,u=s[o].configKey;n(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){s.hasOwnProperty(t)&&delete s[t]}};t.exports=r},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1192),ANY_KEY_UP:i(1193),COMBO_MATCH:i(1194),DOWN:i(1195),KEY_DOWN:i(1196),KEY_UP:i(1197),UP:i(1198)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),{responseType:t,async:e,user:i,password:n,timeout:s,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e,i){var n=i(0),s=i(213),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(37),o=i(62),a=i(102),h=i(101),l=i(1365);n.rectangle=function(t,e,i,n,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:s.fromPath("L 0 0 L "+i+" 0 L "+i+" "+n+" L 0 "+n)};if(a.chamfer){var l=a.chamfer;h.vertices=s.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},n.trapezoid=function(t,e,i,n,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-n+" L "+c+" "+-n+" L "+d+" 0":"L 0 0 L "+c+" "+-n+" L "+d+" 0";var f={label:"Trapezoid Body",position:{x:t,y:e},vertices:s.fromPath(l)};if(h.chamfer){var p=h.chamfer;f.vertices=s.chamfer(f.vertices,p.radius,p.quality,p.qualityMin,p.qualityMax),delete h.chamfer}return o.create(r.extend({},f,h))},n.circle=function(t,e,i,s,o){s=s||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),n.polygon(t,e,h,i,r.extend({},a,s))},n.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return n.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&s.area(S)1?(f=o.create(r.extend({parts:p.slice(0)},n)),o.setPosition(f,{x:t,y:e}),f):p[0]}},function(t,e,i){t.exports={CalculateFacesAt:i(216),CalculateFacesWithin:i(51),Copy:i(1286),CreateFromTiles:i(1287),CullTiles:i(1288),Fill:i(1289),FilterTiles:i(1290),FindByIndex:i(1291),FindTile:i(1292),ForEachTile:i(1293),GetTileAt:i(137),GetTileAtWorldXY:i(1294),GetTilesWithin:i(24),GetTilesWithinShape:i(1295),GetTilesWithinWorldXY:i(1296),HasTileAt:i(456),HasTileAtWorldXY:i(1297),IsInLayerBounds:i(103),PutTileAt:i(217),PutTileAtWorldXY:i(1298),PutTilesAt:i(1299),Randomize:i(1300),RemoveTileAt:i(457),RemoveTileAtWorldXY:i(1301),RenderDebug:i(1302),ReplaceByIndex:i(455),SetCollision:i(1303),SetCollisionBetween:i(1304),SetCollisionByExclusion:i(1305),SetCollisionByProperty:i(1306),SetCollisionFromCollisionGroup:i(1307),SetTileIndexCallback:i(1308),SetTileLocationCallback:i(1309),Shuffle:i(1310),SwapByIndex:i(1311),TileToWorldX:i(138),TileToWorldXY:i(1312),TileToWorldY:i(139),WeightedRandomize:i(1313),WorldToTileX:i(63),WorldToTileXY:i(1314),WorldToTileY:i(64)}},function(t,e,i){var n=i(103);t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),n(t,e,s)){var r=s.data[e][t]||null;return null===r?null:-1===r.index?i?r:null:r}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o,a){(void 0===i||i<=0)&&(i=32),(void 0===n||n<=0)&&(n=32),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=n,this.tileMargin=s,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t1?2-s:s,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},function(t,e,i){var n=i(23),s=i(0),r=i(9),o=i(109),a=i(253),h=i(254),l=i(6),u=new s({Extends:r,initialize:function(t,e,i){r.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,l(i,"frames",[]),l(i,"defaultTextureKey",null)),this.frameRate=l(i,"frameRate",null),this.duration=l(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=l(i,"skipMissedFrames",!0),this.delay=l(i,"delay",0),this.repeat=l(i,"repeat",0),this.repeatDelay=l(i,"repeatDelay",0),this.yoyo=l(i,"yoyo",!1),this.showOnStart=l(i,"showOnStart",!1),this.hideOnComplete=l(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var n=this.frames.slice(0,t),s=this.frames.slice(t);this.frames=n.concat(i,s)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){s.isLast=!0,s.nextFrame=a[0],a[0].prevFrame=s;var v=1/(a.length-1);for(r=0;r=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):t.repeatCounter>0?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t._reverse===!e&&t.repeatCounter>0)return t.forward=e,void this.repeatAnimation(t);if(t._reverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?t._reverse&&!t.forward?(t.currentFrame=this.getLastFrame(),this.repeatAnimation(t)):(t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);if(t._repeatDelay>0&&!1===t.pendingRepeat)t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay;else if(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying){this.getNextTick(t),t.pendingRepeat=!1;var e=t.currentFrame,i=t.parent;this.emit(o.ANIMATION_REPEAT,this,e),i.emit(o.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,i),i.emit(o.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,i)}},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(e){t.frames.push(e.toJSON())}),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),n=0;n1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[n-1],t.nextFrame=this.frames[n+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=n(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(s*a+o*h),e}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(277),s=i(280),r=i(282),o=i(283);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):n(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var n=i(160);t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1);var r=Math.floor(6*t),o=6*t-r,a=Math.floor(i*(1-e)*255),h=Math.floor(i*(1-o*e)*255),l=Math.floor(i*(1-(1-o)*e)*255),u=i=Math.floor(i*=255),c=i,d=i,f=r%6;return 0===f?(c=l,d=a):1===f?(u=h,d=a):2===f?(u=a,d=l):3===f?(u=a,c=h):4===f?(u=l,c=a):5===f&&(c=a,d=h),s?s.setTo?s.setTo(u,c,d,s.alpha,!1):(s.r=u,s.g=c,s.b=d,s.color=n(u,c,d),s):{r:u,g:c,b:d,color:n(u,c,d)}}},function(t,e){var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z;return this.x=i*o-n*r,this.y=n*s-e*o,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],o=e*s[1]+i*s[5]+n*s[9]+s[13],a=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],g=s[10],v=s[11],m=s[12],y=s[13],x=s[14],T=1/(e*h+i*d+n*v+s[15]);return this.x=(e*r+i*l+n*f+m)*T,this.y=(e*o+i*u+n*p+y)*T,this.z=(e*a+i*c+n*g+x)*T,this},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,o=this.x-i,a=r-this.y-1-n,h=this.z;return this.x=2*o/s-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},function(t,e,i){var n=i(11),s=i(13);t.exports=function(t,e){if(void 0===e&&(e=new n),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=s.MIN_SAFE_INTEGER,u=s.MIN_SAFE_INTEGER,c=0;c0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){t&&(this.settings.data=t),this.settings.status=s.START,this.settings.active=!0,this.settings.visible=!0,this.events.emit(o.START,this),this.events.emit(o.READY,this,t)},shutdown:function(t){this.events.off(o.TRANSITION_INIT),this.events.off(o.TRANSITION_START),this.events.off(o.TRANSITION_COMPLETE),this.events.off(o.TRANSITION_OUT),this.settings.status=s.SHUTDOWN,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.SHUTDOWN,this,t)},destroy:function(){this.settings.status=s.DESTROYED,this.settings.active=!1,this.settings.visible=!1,this.events.emit(o.DESTROY,this),this.events.removeAllListeners();for(var t=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],e=0;e0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},function(t,e,i){var n=i(180),s=i(52),r=i(0),o=i(12),a=i(90),h=i(14),l=i(11),u=i(936),c=i(372),d=i(3),f=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.list.length>0)for(var e=this.list,i=new l,n=0;n-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=f},function(t,e,i){var n=i(127),s=i(0),r=i(941),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a){n.call(this,t,e,i,s,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},function(t,e,i){var n=i(91),s=i(0),r=i(189),o=i(252),a=i(255),h=i(256),l=i(260),u=i(151),c=i(265),d=i(266),f=i(263),p=i(32),g=i(95),v=i(14),m=i(2),y=i(6),x=i(13),T=i(947),w=new s({Extends:v,Mixins:[o,a,h,l,u,c,d,f,T],initialize:function(t,e){var i=y(e,"x",0),n=y(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,n),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.setDefaultStyles(e)},setDefaultStyles:function(t){return y(t,"lineStyle",null)&&(this.defaultStrokeWidth=y(t,"lineStyle.width",1),this.defaultStrokeColor=y(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=y(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),y(t,"fillStyle",null)&&(this.defaultFillColor=y(t,"fillStyle.color",16777215),this.defaultFillAlpha=y(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,n,s){return void 0===s&&(s=1),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,s,t,e,i,n),this},lineGradientStyle:function(t,e,i,n,s,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,n,s),this},setTexture:function(t,e,i){if(void 0===i&&(i=0),void 0===t)this.commandBuffer.push(r.CLEAR_TEXTURE);else{var n=this.scene.sys.textures.getFrame(t,e);n&&(2===i&&(i=3),this.commandBuffer.push(r.SET_TEXTURE,n,i))}return this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,x.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,n){return this.commandBuffer.push(r.FILL_RECT,t,e,i,n),this},strokeRect:function(t,e,i,n){var s=this._lineWidth/2,r=t-s,o=t+s;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+n),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+n),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+n),this.lineTo(o+i,e+n),this.strokePath(),this},fillRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,n,s){void 0===s&&(s=20);var r=s,o=s,a=s,h=s;return"number"!=typeof s&&(r=m(s,"tl",20),o=m(s,"tr",20),a=m(s,"bl",20),h=m(s,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-x.TAU,0),this.lineTo(t+i,e+n-h),this.arc(t+i-h,e+n-h,h,0,x.TAU),this.lineTo(t+a,e+n),this.arc(t+a,e+n-a,a,x.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-x.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,n,s,o),this},strokeTriangle:function(t,e,i,n,s,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,n,s,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,n){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,n),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var s=1;s-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var n,s,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),w.TargetCamera.setScene(this.scene),w.TargetCamera.setViewport(0,0,e,i),w.TargetCamera.scrollX=this.x,w.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(n=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(s=a.getContext("2d"))}else s=(n=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(s=t.getContext("2d"));return s&&(this.renderCanvas(o,this,0,w.TargetCamera,null,s,!1),n&&n.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});w.TargetCamera=new n,t.exports=w},function(t,e){t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,SET_TEXTURE:19,CLEAR_TEXTURE:20,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=t.width/2,r=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},function(t,e,i){var n=i(0),s=i(12),r=i(14),o=i(380),a=i(124),h=i(382),l=i(957),u=new n({Extends:r,Mixins:[s.Depth,s.Mask,s.Pipeline,s.Transform,s.Visible,l],initialize:function(t,e,i,n){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(n=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),n){Array.isArray(n)||(n=[n]);for(var s=0;s0?e.defaultFrame=i[0]:e.defaultFrame=this.defaultFrame,this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var n=this.emitters.list,s=0;ss.width&&(t=s.width-this.frame.cutX),this.frame.cutY+e>s.height&&(e=s.height-this.frame.cutY),this.frame.setSize(t,e,this.frame.cutX,this.frame.cutY)}this.updateDisplayOrigin();var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=t,r.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o=255&(t>>16|0),a=255&(t>>8|0),h=255&(0|t),l=this.gl,u=this.frame;if(this.camera.preRender(1,1),l){var c=this.camera._cx,f=this.camera._cy,p=this.camera._cw,g=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(c,f,p,g,g);var v=this.pipeline;v.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),v.drawFillRect(i,n,s,r,d.getTintFromFloats(o/255,a/255,h/255,1),e),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),v.projOrtho(0,v.width,v.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.context.fillStyle="rgba("+o+","+a+","+h+","+e+")",this.context.fillRect(i+u.cutX,n+u.cutY,s,r),this.renderer.setContext();return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.gl;if(t){var e=this.renderer;e.setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)}else{var i=this.context;i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()}this.dirty=!1}return this},erase:function(t,e,i){this._eraseMode=!0;var s=this.renderer.currentBlendMode;return this.renderer.setBlendMode(n.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(s),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r=this.gl;if(this.camera.preRender(1,1),r){var o=this.camera._cx,a=this.camera._cy,h=this.camera._cw,l=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(o,a,h,l,l);var u=this.pipeline;u.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),u.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),u.projOrtho(0,u.width,u.height,0,-1e3,1e3)}else this.renderer.setContext(this.context),this.batchList(t,e,i,n,s),this.renderer.setContext();return this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o=this.gl,a=this.textureManager.getFrame(t,e);if(a){if(this.camera.preRender(1,1),o){var h=this.camera._cx,l=this.camera._cy,u=this.camera._cw,c=this.camera._ch;this.renderer.setFramebuffer(this.framebuffer,!1),this.renderer.pushScissor(h,l,u,c,c);var d=this.pipeline;d.projOrtho(0,this.texture.width,0,this.texture.height,-1e3,1e3),d.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,r,s,this.camera.matrix,null),d.flush(),this.renderer.setFramebuffer(null,!1),this.renderer.popScissor(),d.projOrtho(0,d.width,d.height,0,-1e3,1e3)}else this.batchTextureFrame(a,i+this.frame.cutX,n+this.frame.cutY,s,r);this.dirty=!0}return this},batchList:function(t,e,i,n,s){for(var r=0;rl){if(0===c){for(var g=f;g.length&&(g=g.slice(0,-1),!((p=e.measureText(g).width)<=l)););if(!g.length)throw new Error("This text's wordWrapWidth setting is less than a single character!");var v=d.substr(g.length);u[c]=v,h+=g}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");s[o+1]=y+" "+(s[o+1]||""),r=s.length;break}h+=f,l-=p}n+=h.replace(/[ \n]*$/gi,"")+"\n"}}return n=n.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var n="",s=t.split(this.splitRegExp),r=0;ro?(h>0&&(n+="\n"),n+=a[h]+" ",o=i-l):(o-=l,n+=a[h],h0&&(d+=h.lineSpacing*g),i.rtl)c=f-c;else if("right"===i.align)c+=o-h.lineWidths[g];else if("center"===i.align)c+=(o-h.lineWidths[g])/2;else if("justify"===i.align){if(h.lineWidths[g]/h.width>=.85){var v=h.width-h.lineWidths[g],m=e.measureText(" ").width,y=a[g].trim(),x=y.split(" ");v+=(a[g].length-y.length)*m;for(var T=Math.floor(v/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[g]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(this.style.syncShadow(e,i.shadowStroke),e.strokeText(a[g],c,d)),i.color&&(this.style.syncShadow(e,i.shadowFill),e.fillText(a[g],c,d))}e.restore(),this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&c(this.canvas),s.remove(this.canvas),this.texture.destroy()}});t.exports=p},function(t,e,i){var n=i(26),s=i(0),r=i(12),o=i(18),a=i(14),h=i(310),l=i(162),u=i(973),c=i(3),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,u],initialize:function(t,e,i,s,r,l,u){var d=t.sys.game.renderer;a.call(this,t,"TileSprite");var f=t.sys.textures.get(l),p=f.get(u);s&&r?(s=Math.floor(s),r=Math.floor(r)):(s=p.width,r=p.height),this._tilePosition=new c,this._tileScale=new c(1,1),this.dirty=!1,this.renderer=d,this.canvas=n.create(this,s,r),this.context=this.canvas.getContext("2d"),this.displayTexture=f,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=h(p.width),this.potHeight=h(p.height),this.fillCanvas=n.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,r),this.setFrame(u),this.setOriginFromFrame(),this.initPipeline(),t.sys.game.events.on(o.CONTEXT_RESTORED,function(t){var e=t.gl;this.dirty=!0,this.fillPattern=null,this.fillPattern=t.createTexture2D(0,e.LINEAR,e.LINEAR,e.REPEAT,e.REPEAT,e.RGBA,this.fillCanvas,this.potWidth,this.potHeight)},this)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=h(e.width),this.potHeight=h(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,n=this.potWidth,s=this.potHeight;this.renderer.gl||(n=t.cutWidth,s=t.cutHeight),e.clearRect(0,0,n,s),i.width=n,i.height=s,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,n,s),this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||l.disable(e);var i=this._tileScale.x,n=this._tileScale.y,s=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,n),e.translate(-s,-r),e.fillStyle=this.fillPattern,e.fillRect(s,r,this.width/i,this.height/n),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),n.remove(this.canvas),n.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=d},function(t,e,i){var n=i(0),s=i(23),r=i(12),o=i(90),a=i(18),h=i(14),l=i(59),u=i(193),c=i(976),d=i(13),f=new n({Extends:h,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,n){h.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=u(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=d.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.initPipeline(),n&&this.changeSource(n,!1);var s=t.sys.game.events;s.on(a.PAUSE,this.globalPause,this),s.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(l.GLOBAL_MUTE,this.globalMute,this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var n=this.video;if(!n)return console.warn("Video not loaded"),this;void 0===t&&(t=n.loop);var s=this.scene.sys.sound;s&&s.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),n.loop=t;var r=this._callbacks,o=n.play();return void 0!==o?o.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(n.addEventListener("playing",r.play,!0),n.readyState<2&&(this.retry=this.retryLimit,this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),n.addEventListener("ended",r.end,!0),n.addEventListener("timeupdate",r.time,!0),n.addEventListener("seeking",r.seeking,!0),n.addEventListener("seeked",r.seeked,!0),this},changeSource:function(t,e,i,n,s){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,n,s)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,n,s,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=this.height),void 0===s&&(s=i),void 0===r&&(r=n);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(s,r),o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)):(a=this.scene.sys.textures.createCanvas(u(),s,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,n,0,0,s,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.addEventListener("error",this._callbacks.error,!0),n.src=t,n.load(),this.video=n,this},playPromiseSuccessHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){this.scene.sys.input.once("pointerdown",this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.video.play(),this.emit(o.VIDEO_PLAY,this)},completeHandler:function(){this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var n=this.videoTextureSource;n.source!==t&&(n.source=t,n.width=e,n.height=i),n.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var n=i*t;this.setCurrentTime(n)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],n=parseFloat(t.substr(1));"+"===i?t=e.currentTime+n:"-"===i&&(t=e.currentTime-n)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.video.play()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&e.play()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i],!0);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(l.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},function(t,e,i){var n=i(0),s=i(198),r=i(397),o=i(46),a=new n({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return s(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,n=0;no||r>a)return!1;if(s<=i||r<=n)return!0;var h=s-i,l=r-n;return h*h+l*l<=t.radius*t.radius}},function(t,e,i){var n=i(4),s=i(204);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-a,g=u-h,v=a-c,m=h-d,y=p*p+g*g,x=2*(p*v+g*m),T=x*x-4*y*(v*v+m*m-f*f);if(0===T){var w=-x/(2*y);r=a+w*p,o=h+w*g,w>=0&&w<=1&&i.push(new n(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*p,o=h+b*g,b>=0&&b<=1&&i.push(new n(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*p,o=h+E*g,E>=0&&E<=1&&i.push(new n(r,o))}}return i}},function(t,e,i){var n=i(54),s=new(i(4));t.exports=function(t,e,i){if(void 0===i&&(i=s),n(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(n(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&n(e,i.x,i.y)}},function(t,e,i){var n=i(4),s=i(84),r=i(410);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new n,new n,new n,new n],c=[s(o,t,u[0]),s(a,t,u[1]),s(h,t,u[2]),s(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=[]);for(var s,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,g=u*d+c*f,v=d*d+f*f,m=p*v-g*g,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&s+r<1&&(n.push({x:e[w].x,y:e[w].y}),i)));w++);return n}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,t}},function(t,e){t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),o=t.x1-e,a=t.y1-i;return t.x1=o*s-a*r+e,t.y1=o*r+a*s+i,o=t.x2-e,a=t.y2-i,t.x2=o*s-a*r+e,t.y2=o*r+a*s+i,o=t.x3-e,a=t.y3-i,t.x3=o*s-a*r+e,t.y3=o*r+a*s+i,t}},function(t,e,i){t.exports={BUTTON_DOWN:i(1178),BUTTON_UP:i(1179),CONNECTED:i(1180),DISCONNECTED:i(1181),GAMEPAD_BUTTON_DOWN:i(1182),GAMEPAD_BUTTON_UP:i(1183)}},function(t,e,i){var n=i(17),s=i(133);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e,i){var n=i(0),s=i(19),r=i(20),o=i(8),a=i(2),h=i(7),l=i(344),u=new n({Extends:r,initialize:function(t,e,i,n){var s="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),n=a(o,"xhrSettings"),s=a(o,"extension",s)}var l={type:"xml",cache:t.cacheManager.xml,extension:s,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,l)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():(console.warn("Invalid XMLFile: "+this.key),this.onProcessError())}});o.register("xml",function(t,e,i){if(Array.isArray(t))for(var n=0;n0&&(s.totalDuration+=s.t2*s.repeat),s.totalDuration>t&&(t=s.totalDuration),s.delay0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay,this.startDelay=e},init:function(){if(this.paused&&!this.parentIsTimeline)return this.state=h.PENDING_ADD,this._pausedState=h.INIT,!1;for(var t=this.data,e=this.totalTargets,i=0;i0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=h.LOOP_DELAY):(this.state=h.ACTIVE,this.dispatchTweenEvent(r.TWEEN_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=h.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=h.PENDING_REMOVE,this.dispatchTweenEvent(r.TWEEN_COMPLETE,this.callbacks.onComplete))},pause:function(){return this.state===h.PAUSED?this:(this.paused=!0,this._pausedState=this.state,this.state=h.PAUSED,this)},play:function(t){void 0===t&&(t=!1);var e=this.state;return e!==h.INIT||this.parentIsTimeline?e===h.ACTIVE||e===h.PENDING_ADD&&this._pausedState===h.PENDING_ADD?this:this.parentIsTimeline||e!==h.PENDING_REMOVE&&e!==h.REMOVED?(this.parentIsTimeline?(this.resetTweenData(t),0===this.calculatedOffset?this.state=h.ACTIVE:(this.countdown=this.calculatedOffset,this.state=h.OFFSET_DELAY)):this.paused?(this.paused=!1,this.makeActive()):(this.resetTweenData(t),this.state=h.ACTIVE,this.makeActive()),this):(this.seek(0),this.parent.makeActive(this),this):(this.resetTweenData(!1),this.state=h.ACTIVE,this)},resetTweenData:function(t){for(var e=this.data,i=this.totalData,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY),r.getActiveValue&&(o[a]=r.getActiveValue(r.target,r.key,r.start))}},resume:function(){return this.state===h.PAUSED?(this.paused=!1,this.state=this._pausedState):this.play(),this},seek:function(t,e){if(void 0===e&&(e=16.6),this.totalDuration>=36e5)return console.warn("Tween.seek duration too long"),this;this.state===h.REMOVED&&this.makeActive(),this.elapsed=0,this.progress=0,this.totalElapsed=0,this.totalProgress=0;for(var i=this.data,n=this.totalTargets,s=0;s0&&(r.elapsed=r.delay,r.state=h.DELAY)}this.calcDuration();var c=!1;this.state===h.PAUSED&&(c=!0,this.state=h.ACTIVE),this.isSeeking=!0;do{this.update(0,e)}while(this.totalProgress0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.start=e.getStartValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},setStateFromStart:function(t,e,i){return e.repeatCounter>0?(e.repeatCounter--,e.elapsed=i,e.progress=i/e.duration,e.flipX&&e.target.toggleFlipX(),e.flipY&&e.target.toggleFlipY(),e.end=e.getEndValue(e.target,e.key,e.start,e.index,t.totalTargets,t),e.repeatDelay>0?(e.elapsed=e.repeatDelay-i,e.current=e.start,e.target[e.key]=e.current,h.REPEAT_DELAY):(this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e),h.PLAYING_FORWARD)):h.COMPLETE},updateTweenData:function(t,e,i){var n=e.target;switch(e.state){case h.PLAYING_FORWARD:case h.PLAYING_BACKWARD:if(!n){e.state=h.COMPLETE;break}var s=e.elapsed,o=e.duration,a=0;(s+=i)>o&&(a=s-o,s=o);var l=e.state===h.PLAYING_FORWARD,u=s/o;if(e.elapsed=s,e.progress=u,1===u)l?(e.current=e.end,n[e.key]=e.end,e.hold>0?(e.elapsed=e.hold-a,e.state=h.HOLD_DELAY):e.state=this.setStateFromEnd(t,e,a)):(e.current=e.start,n[e.key]=e.start,e.state=this.setStateFromStart(t,e,a));else{var c=l?e.ease(u):e.ease(1-u);e.current=e.start+(e.end-e.start)*c,n[e.key]=e.current}this.dispatchTweenDataEvent(r.TWEEN_UPDATE,t.callbacks.onUpdate,e);break;case h.DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PENDING_RENDER);break;case h.REPEAT_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.elapsed=Math.abs(e.elapsed),e.state=h.PLAYING_FORWARD,this.dispatchTweenDataEvent(r.TWEEN_REPEAT,t.callbacks.onRepeat,e));break;case h.HOLD_DELAY:e.elapsed-=i,e.elapsed<=0&&(e.state=this.setStateFromEnd(t,e,Math.abs(e.elapsed)));break;case h.PENDING_RENDER:n?(e.start=e.getStartValue(n,e.key,n[e.key],e.index,t.totalTargets,t),e.end=e.getEndValue(n,e.key,e.start,e.index,t.totalTargets,t),e.current=e.start,n[e.key]=e.start,e.state=h.PLAYING_FORWARD):e.state=h.COMPLETE}return e.state!==h.COMPLETE}});u.TYPES=["onActive","onComplete","onLoop","onRepeat","onStart","onUpdate","onYoyo"],a.register("tween",function(t){return this.scene.sys.tweens.add(t)}),o.register("tween",function(t){return this.scene.sys.tweens.create(t)}),t.exports=u},function(t,e,i){t.exports={TIMELINE_COMPLETE:i(1331),TIMELINE_LOOP:i(1332),TIMELINE_PAUSE:i(1333),TIMELINE_RESUME:i(1334),TIMELINE_START:i(1335),TIMELINE_UPDATE:i(1336),TWEEN_ACTIVE:i(1337),TWEEN_COMPLETE:i(1338),TWEEN_LOOP:i(1339),TWEEN_REPEAT:i(1340),TWEEN_START:i(1341),TWEEN_UPDATE:i(1342),TWEEN_YOYO:i(1343)}},function(t,e){t.exports=function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p){return{target:t,index:e,key:i,getActiveValue:r,getEndValue:n,getStartValue:s,ease:o,duration:0,totalDuration:0,delay:0,yoyo:l,hold:0,repeat:0,repeatDelay:0,flipX:f,flipY:p,progress:0,elapsed:0,repeatCounter:0,start:0,current:0,end:0,t1:0,t2:0,gen:{delay:a,duration:h,hold:u,repeat:c,repeatDelay:d},state:0}}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(57);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(0),s=i(10),r=new n({initialize:function(t){this.name="WebGLPipeline",this.game=t.game,this.view=t.game.canvas,this.resolution=1,this.width=0,this.height=0,this.gl=t.gl,this.vertexCount=0,this.vertexCapacity=t.vertexCapacity,this.renderer=t.renderer,this.vertexData=t.vertices?t.vertices:new ArrayBuffer(t.vertexCapacity*t.vertexSize),this.vertexBuffer=this.renderer.createVertexBuffer(t.vertices?t.vertices:this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=this.renderer.createProgram(t.vertShader,t.fragShader),this.attributes=t.attributes,this.vertexSize=t.vertexSize,this.topology=t.topology,this.bytes=new Uint8Array(this.vertexData),this.vertexComponentCount=s.getComponentCount(t.attributes,this.gl),this.flushLocked=!1,this.active=!1},boot:function(){},addAttribute:function(t,e,i,n,r){return this.attributes.push({name:t,size:e,type:this.renderer.glFormats[i],normalized:n,offset:r}),this.vertexComponentCount=s.getComponentCount(this.attributes,this.gl),this},shouldFlush:function(){return this.vertexCount>=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.gl,e=this.vertexBuffer,i=this.attributes,n=this.program,s=this.renderer,r=this.vertexSize;s.setProgram(n),s.setVertexBuffer(e);for(var o=0;o=0?(t.enableVertexAttribArray(h),t.vertexAttribPointer(h,a.size,a.type,a.normalized,r,a.offset)):-1!==h&&t.disableVertexAttribArray(h)}return this},onBind:function(){return this},onPreRender:function(){return this},onRender:function(){return this},onPostRender:function(){return this},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t=this.gl,e=this.vertexCount,i=this.topology,n=this.vertexSize;if(0!==e)return t.bufferSubData(t.ARRAY_BUFFER,0,this.bytes.subarray(0,e*n)),t.drawArrays(i,0,e),this.vertexCount=0,this.flushLocked=!1,this;this.flushLocked=!1},destroy:function(){var t=this.gl;return t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),delete this.program,delete this.vertexBuffer,delete this.gl,this},setFloat1:function(t,e){return this.renderer.setFloat1(this.program,t,e),this},setFloat2:function(t,e,i){return this.renderer.setFloat2(this.program,t,e,i),this},setFloat3:function(t,e,i,n){return this.renderer.setFloat3(this.program,t,e,i,n),this},setFloat4:function(t,e,i,n,s){return this.renderer.setFloat4(this.program,t,e,i,n,s),this},setFloat1v:function(t,e){return this.renderer.setFloat1v(this.program,t,e),this},setFloat2v:function(t,e){return this.renderer.setFloat2v(this.program,t,e),this},setFloat3v:function(t,e){return this.renderer.setFloat3v(this.program,t,e),this},setFloat4v:function(t,e){return this.renderer.setFloat4v(this.program,t,e),this},setInt1:function(t,e){return this.renderer.setInt1(this.program,t,e),this},setInt2:function(t,e,i){return this.renderer.setInt2(this.program,t,e,i),this},setInt3:function(t,e,i,n){return this.renderer.setInt3(this.program,t,e,i,n),this},setInt4:function(t,e,i,n,s){return this.renderer.setInt4(this.program,t,e,i,n,s),this},setMatrix2:function(t,e,i){return this.renderer.setMatrix2(this.program,t,e,i),this},setMatrix3:function(t,e,i){return this.renderer.setMatrix3(this.program,t,e,i),this},setMatrix4:function(t,e,i){return this.renderer.setMatrix4(this.program,t,e,i),this}});t.exports=r},function(t,e,i){var n=i(0),s=i(66),r=i(2),o=i(492),a=i(756),h=i(757),l=i(32),u=i(10),c=i(233),d=new n({Extends:c,Mixins:[o],initialize:function(t){var e=t.renderer.config;c.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:r(t,"topology",t.renderer.gl.TRIANGLES),vertShader:r(t,"vertShader",h),fragShader:r(t,"fragShader",a),vertexCapacity:r(t,"vertexCapacity",6*e.batchSize),vertexSize:r(t,"vertexSize",5*Float32Array.BYTES_PER_ELEMENT+4*Uint8Array.BYTES_PER_ELEMENT),attributes:[{name:"inPosition",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:0},{name:"inTexCoord",size:2,type:t.renderer.gl.FLOAT,normalized:!1,offset:2*Float32Array.BYTES_PER_ELEMENT},{name:"inTintEffect",size:1,type:t.renderer.gl.FLOAT,normalized:!1,offset:4*Float32Array.BYTES_PER_ELEMENT},{name:"inTint",size:4,type:t.renderer.gl.UNSIGNED_BYTE,normalized:!0,offset:5*Float32Array.BYTES_PER_ELEMENT}]}),this.vertexViewF32=new Float32Array(this.vertexData),this.vertexViewU32=new Uint32Array(this.vertexData),this.maxQuads=e.batchSize,this.batches=[],this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.tintEffect=2,this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[],this.mvpInit()},onBind:function(){return c.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return c.prototype.resize.call(this,t,e,i),this.projOrtho(0,this.width,this.height,0,-1e3,1e3),this},setTexture2D:function(t,e){return void 0===t&&(t=this.renderer.blankTexture.glTexture),void 0===e&&(e=0),this.requireTextureBatch(t,e)&&this.pushBatch(t,e),this},requireTextureBatch:function(t,e){var i=this.batches,n=i.length;return!(n>0)||!((e>0?i[n-1].textures[e-1]:i[n-1].texture)===t)},pushBatch:function(t,e){if(0===e)this.batches.push({first:this.vertexCount,texture:t,textures:[]});else{var i=[];i[e-1]=t,this.batches.push({first:this.vertexCount,texture:null,textures:i})}},flush:function(){if(this.flushLocked)return this;this.flushLocked=!0;var t,e,i,n=this.gl,s=this.vertexCount,r=this.topology,o=this.vertexSize,a=this.renderer,h=this.batches,l=h.length,u=0,c=null;if(0===l||0===s)return this.flushLocked=!1,this;n.bufferSubData(n.ARRAY_BUFFER,0,this.bytes.subarray(0,s*o));for(var d=0;d0){for(e=0;e0){for(e=0;e0&&(a.setTexture2D(c.texture,0,!1),n.drawArrays(r,c.first,u)),this.vertexCount=0,h.length=0,this.flushLocked=!1,this},batchSprite:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix1,s=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,c=o.u1,d=o.v1,f=o.x,p=o.y,g=o.cutWidth,v=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,l=b.v0,c=b.u1,d=b.v1,g=b.width,v=b.height,T=-y+(f=b.x),w=-x+(p=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1),s.applyITRS(t.x,t.y,t.rotation,t.scaleX*E,t.scaleY*S),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),s.e=t.x,s.f=t.y,n.multiply(s,r)):(s.e-=e.scrollX*t.scrollFactorX,s.f-=e.scrollY*t.scrollFactorY,n.multiply(s,r));var A=T+g,_=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,_),O=r.getY(T,_),R=r.getX(A,_),L=r.getY(A,_),D=r.getX(A,w),k=r.getY(A,w),F=u.getTintAppendFloatAlpha(t._tintTL,e.alpha*t._alphaTL),I=u.getTintAppendFloatAlpha(t._tintTR,e.alpha*t._alphaTR),B=u.getTintAppendFloatAlpha(t._tintBL,e.alpha*t._alphaBL),N=u.getTintAppendFloatAlpha(t._tintBR,e.alpha*t._alphaBR);e.roundPixels&&(C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O),R=Math.round(R),L=Math.round(L),D=Math.round(D),k=Math.round(k)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,k,h,l,c,d,F,I,B,N,Y,a,0)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,this.setTexture2D(m,y));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),this.setTexture2D(p,g),v=!0);var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,A,_,C,M,P,O){this.renderer.setPipeline(this,t);var R=this._tempMatrix1,L=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,F=y/n+C,I=(m+x)/i+_,B=(y+T)/n+C,N=o,Y=a,X=-g,z=-v;if(t.isCropped){var U=t._crop;N=U.width,Y=U.height,o=U.width,a=U.height;var G=m=U.x,W=y=U.y;c&&(G=x-U.x-U.width),d&&!e.isRenderTexture&&(W=T-U.y-U.height),k=G/i+_,F=W/n+C,I=(G+U.width)/i+_,B=(W+U.height)/n+C,X=-g+m,z=-v+y}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,z+=a);var V=X+N,H=z+Y;L.applyITRS(s,r,u,h,l),R.copyFrom(M.matrix),P?(R.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),L.e=s,L.f=r,R.multiply(L,D)):(L.e-=M.scrollX*f,L.f-=M.scrollY*p,R.multiply(L,D));var j=D.getX(X,z),q=D.getY(X,z),K=D.getX(X,H),J=D.getY(X,H),Z=D.getX(V,H),Q=D.getY(V,H),$=D.getX(V,z),tt=D.getY(V,z);M.roundPixels&&(j=Math.round(j),q=Math.round(q),K=Math.round(K),J=Math.round(J),Z=Math.round(Z),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt)),this.setTexture2D(e,0),this.batchQuad(j,q,K,J,Z,Q,$,tt,k,F,I,B,w,b,E,S,A,e,0)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,c=i+t.height;o?a.multiply(o,h):h=a;var d=h.getX(e,i),f=h.getY(e,i),p=h.getX(e,c),g=h.getY(e,c),v=h.getX(l,c),m=h.getY(l,c),y=h.getX(l,i),x=h.getY(l,i);this.setTexture2D(t.glTexture,0),n=u.getTintAppendFloatAlpha(n,s),this.batchQuad(d,f,p,g,v,m,y,x,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,0)},drawFillRect:function(t,e,i,n,s,r){var o=t+i,a=e+n;this.setTexture2D();var h=u.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,h,h,h,h,2)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.fillTint.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=n,l[1].width=o,l[2].x=s,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=this.tintEffect,f=0;f0&&H[4]?this.batchQuad(D,k,P,O,H[0],H[1],H[2],H[3],U,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=k,j[2]=P,j[3]=O,j[4]=1),h&&j[4]?this.batchQuad(C,M,R,L,j[0],j[1],j[2],j[3],U,G,W,V,B,N,Y,X,I):(H[0]=C,H[1]=M,H[2]=R,H[3]=L,H[4]=1)}}});t.exports=d},function(t,e,i){var n={};t.exports=n;var s=i(37);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r0){i||(i={}),n=e.split(" ");for(var l=0;l0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,lineWidth:2,strokeStyle:"#ffffff",type:"line",anchors:!0};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},n.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(s.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=n._warming,l.x*=n._warming,l.y*=n._warming}}}},function(t,e,i){t.exports={Angle:i(504),Call:i(505),GetFirst:i(506),GetLast:i(507),GridAlign:i(508),IncAlpha:i(568),IncX:i(569),IncXY:i(570),IncY:i(571),PlaceOnCircle:i(572),PlaceOnEllipse:i(573),PlaceOnLine:i(574),PlaceOnRectangle:i(575),PlaceOnTriangle:i(576),PlayAnimation:i(577),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(578),RandomEllipse:i(579),RandomLine:i(580),RandomRectangle:i(581),RandomTriangle:i(582),Rotate:i(583),RotateAround:i(584),RotateAroundDistance:i(585),ScaleX:i(586),ScaleXY:i(587),ScaleY:i(588),SetAlpha:i(589),SetBlendMode:i(590),SetDepth:i(591),SetHitArea:i(592),SetOrigin:i(593),SetRotation:i(594),SetScale:i(595),SetScaleX:i(596),SetScaleY:i(597),SetScrollFactor:i(598),SetScrollFactorX:i(599),SetScrollFactorY:i(600),SetTint:i(601),SetVisible:i(602),SetX:i(603),SetXY:i(604),SetY:i(605),ShiftPosition:i(606),Shuffle:i(607),SmootherStep:i(608),SmoothStep:i(609),Spread:i(610),ToggleVisible:i(611),WrapInRectangle:i(612)}},function(t,e,i){var n=i(143),s=[];s[n.BOTTOM_CENTER]=i(239),s[n.BOTTOM_LEFT]=i(240),s[n.BOTTOM_RIGHT]=i(241),s[n.CENTER]=i(242),s[n.LEFT_CENTER]=i(244),s[n.RIGHT_CENTER]=i(245),s[n.TOP_CENTER]=i(246),s[n.TOP_LEFT]=i(247),s[n.TOP_RIGHT]=i(248);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(38),s=i(75),r=i(39),o=i(76);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(40),r=i(39),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(38),s=i(42),r=i(39),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(243),s=i(75),r=i(78);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),n(t,s(e)+i,r(e)+o),t}},function(t,e,i){var n=i(76),s=i(77);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(78),s=i(40),r=i(77),o=i(41);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)+a),t}},function(t,e,i){var n=i(78),s=i(42),r=i(77),o=i(43);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)+a),t}},function(t,e,i){var n=i(75),s=i(44),r=i(76),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(40),s=i(44),r=i(41),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)-a),t}},function(t,e,i){var n=i(42),s=i(44),r=i(43),o=i(45);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)-a),t}},function(t,e,i){var n=i(144),s=i(87),r=i(13),o=i(4);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=s(e,0,r.PI2);return n(t,a,i)}},function(t,e,i){var n=i(251),s=i(144),r=i(87),o=i(13);t.exports=function(t,e,i,a){void 0===a&&(a=[]),e||(e=n(t)/i);for(var h=0;he.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(52),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var n=i(147),s=i(110);t.exports=function(t,e,i,r){void 0===r&&(r=[]),e||(e=s(t)/i);for(var o=0;o=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n-h&&(c-=h,n+=l),fd.right&&(f=u(f,f+(g-d.right),this.lerp.x)),vd.bottom&&(p=u(p,p+(v-d.bottom),this.lerp.y))):(f=u(f,g-h,this.lerp.x),p=u(p,v-l,this.lerp.y))}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(h=Math.round(h),l=Math.round(l)),this.scrollX=f,this.scrollY=p;var m=f+n,y=p+s;this.midPoint.set(m,y);var x=e/o,T=i/o;this.worldView.setTo(m-x/2,y-T/2,x,T),a.applyITRS(this.x+h,this.y+l,this.rotation,o,o),a.translate(-h,-l),this.shakeEffect.preRender()},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=o(i,0,1),n=o(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var a=this.width/2,h=this.height/2,l=t.x-s,u=t.y-r;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.clearRenderToTexture(),this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var s=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(s,r,o)}return e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},function(t,e,i){var n=i(33);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(33);t.exports=function(t){var e=new n,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var s=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(s,r,o,255*a)}return e}},function(t,e,i){t.exports={Fade:i(637),Flash:i(638),Pan:i(639),Shake:i(672),Zoom:i(673)}},function(t,e,i){t.exports={In:i(640),Out:i(641),InOut:i(642)}},function(t,e,i){t.exports={In:i(643),Out:i(644),InOut:i(645)}},function(t,e,i){t.exports={In:i(646),Out:i(647),InOut:i(648)}},function(t,e,i){t.exports={In:i(649),Out:i(650),InOut:i(651)}},function(t,e,i){t.exports={In:i(652),Out:i(653),InOut:i(654)}},function(t,e,i){t.exports={In:i(655),Out:i(656),InOut:i(657)}},function(t,e,i){t.exports=i(658)},function(t,e,i){t.exports={In:i(659),Out:i(660),InOut:i(661)}},function(t,e,i){t.exports={In:i(662),Out:i(663),InOut:i(664)}},function(t,e,i){t.exports={In:i(665),Out:i(666),InOut:i(667)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports=i(671)},function(t,e,i){var n=i(0),s=i(29),r=i(298),o=i(2),a=i(6),h=i(7),l=i(166),u=i(1),c=i(172),d=i(159),f=new n({initialize:function(t){void 0===t&&(t={});this.width=a(t,"width",1024),this.height=a(t,"height",768),this.zoom=a(t,"zoom",1),this.resolution=a(t,"resolution",1),this.parent=a(t,"parent",void 0),this.scaleMode=a(t,"scaleMode",0),this.expandParent=a(t,"expandParent",!0),this.autoRound=a(t,"autoRound",!1),this.autoCenter=a(t,"autoCenter",0),this.resizeInterval=a(t,"resizeInterval",500),this.fullscreenTarget=a(t,"fullscreenTarget",null),this.minWidth=a(t,"minWidth",0),this.maxWidth=a(t,"maxWidth",0),this.minHeight=a(t,"minHeight",0),this.maxHeight=a(t,"maxHeight",0);var e=a(t,"scale",null);e&&(this.width=a(e,"width",this.width),this.height=a(e,"height",this.height),this.zoom=a(e,"zoom",this.zoom),this.resolution=a(e,"resolution",this.resolution),this.parent=a(e,"parent",this.parent),this.scaleMode=a(e,"mode",this.scaleMode),this.expandParent=a(e,"expandParent",this.expandParent),this.autoRound=a(e,"autoRound",this.autoRound),this.autoCenter=a(e,"autoCenter",this.autoCenter),this.resizeInterval=a(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=a(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=a(e,"min.width",this.minWidth),this.maxWidth=a(e,"max.width",this.maxWidth),this.minHeight=a(e,"min.height",this.minHeight),this.maxHeight=a(e,"max.height",this.maxHeight)),this.renderType=a(t,"type",s.AUTO),this.canvas=a(t,"canvas",null),this.context=a(t,"context",null),this.canvasStyle=a(t,"canvasStyle",null),this.customEnvironment=a(t,"customEnvironment",!1),this.sceneConfig=a(t,"scene",null),this.seed=a(t,"seed",[(Date.now()*Math.random()).toString()]),l.RND=new l.RandomDataGenerator(this.seed),this.gameTitle=a(t,"title",""),this.gameURL=a(t,"url","https://phaser.io"),this.gameVersion=a(t,"version",""),this.autoFocus=a(t,"autoFocus",!0),this.domCreateContainer=a(t,"dom.createContainer",!1),this.domBehindCanvas=a(t,"dom.behindCanvas",!1),this.inputKeyboard=a(t,"input.keyboard",!0),this.inputKeyboardEventTarget=a(t,"input.keyboard.target",window),this.inputKeyboardCapture=a(t,"input.keyboard.capture",[]),this.inputMouse=a(t,"input.mouse",!0),this.inputMouseEventTarget=a(t,"input.mouse.target",null),this.inputMouseCapture=a(t,"input.mouse.capture",!0),this.inputTouch=a(t,"input.touch",r.input.touch),this.inputTouchEventTarget=a(t,"input.touch.target",null),this.inputTouchCapture=a(t,"input.touch.capture",!0),this.inputActivePointers=a(t,"input.activePointers",1),this.inputSmoothFactor=a(t,"input.smoothFactor",0),this.inputWindowEvents=a(t,"input.windowEvents",!0),this.inputGamepad=a(t,"input.gamepad",!1),this.inputGamepadEventTarget=a(t,"input.gamepad.target",window),this.disableContextMenu=a(t,"disableContextMenu",!1),this.audio=a(t,"audio"),this.hideBanner=!1===a(t,"banner",null),this.hidePhaser=a(t,"banner.hidePhaser",!1),this.bannerTextColor=a(t,"banner.text","#ffffff"),this.bannerBackgroundColor=a(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=a(t,"fps",null);var i=a(t,"render",t);this.antialias=a(i,"antialias",!0),this.antialiasGL=a(i,"antialiasGL",!0),this.mipmapFilter=a(i,"mipmapFilter","LINEAR"),this.desynchronized=a(i,"desynchronized",!1),this.roundPixels=a(i,"roundPixels",!1),this.pixelArt=a(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=a(i,"transparent",!1),this.clearBeforeRender=a(i,"clearBeforeRender",!0),this.premultipliedAlpha=a(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=a(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=a(i,"powerPreference","default"),this.batchSize=a(i,"batchSize",2e3),this.maxLights=a(i,"maxLights",10);var n=a(t,"backgroundColor",0);this.backgroundColor=d(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=a(t,"callbacks.preBoot",u),this.postBoot=a(t,"callbacks.postBoot",u),this.physics=a(t,"physics",{}),this.defaultPhysicsSystem=a(this.physics,"default",!1),this.loaderBaseURL=a(t,"loader.baseURL",""),this.loaderPath=a(t,"loader.path",""),this.loaderMaxParallelDownloads=a(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=a(t,"loader.crossOrigin",void 0),this.loaderResponseType=a(t,"loader.responseType",""),this.loaderAsync=a(t,"loader.async",!0),this.loaderUser=a(t,"loader.user",""),this.loaderPassword=a(t,"loader.password",""),this.loaderTimeout=a(t,"loader.timeout",0),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=a(t,"plugins",null),p=c.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:h(f)&&(this.installGlobalPlugins=o(f,"global",[]),this.installScenePlugins=o(f,"scene",[]),Array.isArray(f.default)?p=f.default:Array.isArray(f.defaultMerge)&&(p=p.concat(f.defaultMerge)))),this.defaultPlugins=p;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=a(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=a(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=s.WEBGL:window.FORCE_CANVAS&&(this.renderType=s.CANVAS))}});t.exports=f},function(t,e,i){t.exports={os:i(114),browser:i(115),features:i(165),input:i(702),audio:i(703),video:i(704),fullscreen:i(705),canvasFeatures:i(299)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create(t,6,1).getContext("2d");if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t0?Math.ceil(t):Math.floor(t)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i,s,r,o,a,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,f=-l*a,p=u*a,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(s*f-i*p)*g,h.y=c*g*e+-d*g*t+(-s*c+i*d)*g,h}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*n-o*i,l=a*i+o*e-s*n,u=a*n+s*i-r*e,c=-s*e-r*i-o*n;return this.x=h*a+c*-s+l*-o-u*-r,this.y=l*a+c*-r+u*-s-h*-o,this.z=u*a+c*-o+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*s+o*a,d=h*s-r*a,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(o*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*a)*f,t[5]=(-o*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*a)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*r,t[3]=o*a-s*l,t[4]=e*l-n*a,t[5]=n*s-e*o,t[6]=s*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*s+o*a)+n*(h*s-r*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],v=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*o+p*l,e[2]=d*s+f*a+p*u,e[3]=g*i+v*r+m*h,e[4]=g*n+v*o+m*l,e[5]=g*s+v*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*n+x*o+T*l,e[8]=y*s+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*o,e[2]=l*s+h*a,e[3]=l*r-h*i,e[4]=l*o-h*n,e[5]=l*a-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,o=i+i,a=n+n,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,f=n*a,p=s*r,g=s*o,v=s*a,m=this.val;return m[0]=1-(c+f),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+f),m[7]=d+p,m[2]=u+g,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],x=n*h-s*a,T=n*l-r*a,w=n*u-o*a,b=s*l-r*h,E=s*u-o*h,S=r*u-o*l,A=c*v-d*g,_=c*m-f*g,C=c*y-p*g,M=d*m-f*v,P=d*y-p*v,O=f*y-p*m,R=x*O-T*P+w*M+b*C-E*_+S*A;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*_)*R,i[2]=(a*P-h*C+u*A)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*_)*R,i[5]=(s*C-n*P-o*A)*R,i[6]=(v*S-m*E+y*b)*R,i[7]=(m*w-g*S-y*T)*R,i[8]=(g*E-v*w+y*x)*R,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],m=e*o-i*r,y=e*a-n*r,x=e*h-s*r,T=i*a-n*o,w=i*h-s*o,b=n*h-s*a,E=l*p-u*f,S=l*g-c*f,A=l*v-d*f,_=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=m*M-y*C+x*_+T*A-w*S+b*E;return P?(P=1/P,t[0]=(o*M-a*C+h*_)*P,t[1]=(n*C-i*M-s*_)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*A-r*M-h*S)*P,t[5]=(e*M-n*A+s*S)*P,t[6]=(g*x-f*b-v*y)*P,t[7]=(l*b-c*x+d*y)*P,t[8]=(r*C-o*A+h*E)*P,t[9]=(i*A-e*C-s*E)*P,t[10]=(f*w-p*x+v*m)*P,t[11]=(u*x-l*w-d*m)*P,t[12]=(o*S-r*_-a*E)*P,t[13]=(e*_-i*S+n*E)*P,t[14]=(p*y-f*T-g*m)*P,t[15]=(l*T-u*y+c*m)*P,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return t[0]=o*(c*v-d*g)-u*(a*v-h*g)+p*(a*d-h*c),t[1]=-(i*(c*v-d*g)-u*(n*v-s*g)+p*(n*d-s*c)),t[2]=i*(a*v-h*g)-o*(n*v-s*g)+p*(n*h-s*a),t[3]=-(i*(a*d-h*c)-o*(n*d-s*c)+u*(n*h-s*a)),t[4]=-(r*(c*v-d*g)-l*(a*v-h*g)+f*(a*d-h*c)),t[5]=e*(c*v-d*g)-l*(n*v-s*g)+f*(n*d-s*c),t[6]=-(e*(a*v-h*g)-r*(n*v-s*g)+f*(n*h-s*a)),t[7]=e*(a*d-h*c)-r*(n*d-s*c)+l*(n*h-s*a),t[8]=r*(u*v-d*p)-l*(o*v-h*p)+f*(o*d-h*u),t[9]=-(e*(u*v-d*p)-l*(i*v-s*p)+f*(i*d-s*u)),t[10]=e*(o*v-h*p)-r*(i*v-s*p)+f*(i*h-s*o),t[11]=-(e*(o*d-h*u)-r*(i*d-s*u)+l*(i*h-s*o)),t[12]=-(r*(u*g-c*p)-l*(o*g-a*p)+f*(o*c-a*u)),t[13]=e*(u*g-c*p)-l*(i*g-n*p)+f*(i*c-n*u),t[14]=-(e*(o*g-a*p)-r*(i*g-n*p)+f*(i*a-n*o)),t[15]=e*(o*c-a*u)-r*(i*c-n*u)+l*(i*a-n*o),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return(e*o-i*r)*(c*v-d*g)-(e*a-n*r)*(u*v-d*p)+(e*h-s*r)*(u*g-c*p)+(i*a-n*o)*(l*v-d*f)-(i*h-s*o)*(l*g-c*f)+(n*h-s*a)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*p,e[1]=x*n+T*a+w*c+b*g,e[2]=x*s+T*h+w*d+b*v,e[3]=x*r+T*l+w*f+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*p,e[5]=x*n+T*a+w*c+b*g,e[6]=x*s+T*h+w*d+b*v,e[7]=x*r+T*l+w*f+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*p,e[9]=x*n+T*a+w*c+b*g,e[10]=x*s+T*h+w*d+b*v,e[11]=x*r+T*l+w*f+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*p,e[13]=x*n+T*a+w*c+b*g,e[14]=x*s+T*h+w*d+b*v,e[15]=x*r+T*l+w*f+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[12]=s[0]*e+s[4]*i+s[8]*n+s[12],s[13]=s[1]*e+s[5]*i+s[9]*n+s[13],s[14]=s[2]*e+s[6]*i+s[10]*n+s[14],s[15]=s[3]*e+s[7]*i+s[11]*n+s[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,s=this.val;return s[0]=s[0]*e,s[1]=s[1]*e,s[2]=s[2]*e,s[3]=s[3]*e,s[4]=s[4]*i,s[5]=s[5]*i,s[6]=s[6]*i,s[7]=s[7]*i,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,o=t.y,a=t.z,h=s*r,l=s*o;return this.fromArray([h*r+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*r,0,h*a-n*o,l*a+n*r,s*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,o=Math.sqrt(n*n+s*s+r*r);if(Math.abs(o)<1e-6)return null;n*=o=1/o,s*=o,r*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],g=i[5],v=i[6],m=i[7],y=i[8],x=i[9],T=i[10],w=i[11],b=n*n*l+h,E=s*n*l+r*a,S=r*n*l-s*a,A=n*s*l-r*a,_=s*s*l+h,C=r*s*l+n*a,M=n*r*l+s*a,P=s*r*l-n*a,O=r*r*l+h;return i[0]=u*b+p*E+y*S,i[1]=c*b+g*E+x*S,i[2]=d*b+v*E+T*S,i[3]=f*b+m*E+w*S,i[4]=u*A+p*_+y*C,i[5]=c*A+g*_+x*C,i[6]=d*A+v*_+T*C,i[7]=f*A+m*_+w*C,i[8]=u*M+p*P+y*O,i[9]=c*M+g*P+x*O,i[10]=d*M+v*P+T*O,i[11]=f*M+m*P+w*O,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,s=t.y,r=t.z,o=t.w,a=n+n,h=s+s,l=r+r,u=n*a,c=n*h,d=n*l,f=s*h,p=s*l,g=r*l,v=o*a,m=o*h,y=o*l;return i[0]=1-(f+g),i[1]=c+y,i[2]=d-m,i[3]=0,i[4]=c-y,i[5]=1-(u+g),i[6]=p+v,i[7]=0,i[8]=d+m,i[9]=p-v,i[10]=1-(u+f),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,s=t.z,r=t.w,o=i+i,a=n+n,h=s+s,l=i*o,u=i*a,c=i*h,d=n*a,f=n*h,p=s*h,g=r*o,v=r*a,m=r*h;return e[0]=1-(d+p),e[1]=u+m,e[2]=c-v,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=f+g,e[7]=0,e[8]=c+v,e[9]=f-g,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,s,r){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(s-r);return o[0]=2*s*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*s*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(r+s)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=r*s*2*l,o[15]=0,this},perspective:function(t,e,i,n){var s=this.val,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this},perspectiveLH:function(t,e,i,n){var s=this.val;return s[0]=2*i/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/e,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(i-n),s[11]=1,s[12]=0,s[13]=0,s[14]=i*n/(i-n),s[15]=0,this},ortho:function(t,e,i,n,s,r){var o=this.val,a=t-e,h=i-n,l=s-r;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,s=t.x,r=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,d=e.z;if(Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=s-u,p=r-c,g=o-d,v=1/Math.sqrt(f*f+p*p+g*g),m=h*(g*=v)-l*(p*=v),y=l*(f*=v)-a*g,x=a*p-h*f;(v=Math.sqrt(m*m+y*y+x*x))?(m*=v=1/v,y*=v,x*=v):(m=0,y=0,x=0);var T=p*x-g*y,w=g*m-f*x,b=f*y-p*m;return(v=Math.sqrt(T*T+w*w+b*b))?(T*=v=1/v,w*=v,b*=v):(T=0,w=0,b=0),n[0]=m,n[1]=T,n[2]=f,n[3]=0,n[4]=y,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=g,n[11]=0,n[12]=-(m*s+y*r+x*o),n[13]=-(T*s+w*r+b*o),n[14]=-(f*s+p*r+g*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),s.zero(),r.zero();var n=this.val,o=s.val,a=r.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(i.x,i.y,i.z),r.xyz(e.x,e.y,e.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),s=new n,r=new n;t.exports=n},function(t,e,i){var n=i(0),s=i(171),r=i(317),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new s(1,0,0),l=new s(0,1,0),u=new s,c=new r,d=new n({initialize:function(t,e,i,n){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+s*r+i*a-n*o,this.y=i*h+s*o+n*r-e*a,this.z=n*h+s*a+e*o-i*r,this.w=s*h-e*r-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+s*h+r*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.x=c*i+d*o,this.y=c*n+d*a,this.z=c*s+d*h,this.w=c*r+d*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-e*r,this.z=-i*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+s*r,this.y=i*o+n*r,this.z=n*o-i*r,this.w=s*o-e*r,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*r,this.y=i*o+s*r,this.z=n*o+e*r,this.w=s*o-i*r,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*r,this.y=i*o-e*r,this.z=n*o+s*r,this.w=s*o-n*r,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],h=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*h+h]+1),a[s]=.5*e,e=.5/e,a[r]=(i[3*r+s]+i[3*s+r])*e,a[h]=(i[3*h+s]+i[3*s+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+r]-i[3*r+h])*e}return this}});t.exports=d},function(t,e,i){var n=i(321),s=i(26),r=i(29),o=i(165);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.CANVAS||e.renderType!==r.CANVAS&&!o.webGL){if(!o.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=r.CANVAS}else e.renderType=r.WEBGL;e.antialias||s.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=s.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||n.setCrisp(t.canvas),e.renderType!==r.HEADLESS&&(a=i(485),h=i(488),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(e){t.style["image-rendering"]=e}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var n=i(29);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===n.CANVAS?i="Canvas":e.renderType===n.HEADLESS&&(i="Headless");var s,r=e.audio,o=t.device.audio;if(s=!o.webAudio||r&&r.disableWebAudio?r&&r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+n.VERSION+" / https://phaser.io");else{var a,h="",l=[h];Array.isArray(e.bannerBackgroundColor)?(e.bannerBackgroundColor.forEach(function(t){h=h.concat("%c "),l.push("background: "+t),a=t}),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a):(h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor)),l.push("background: #fff"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / "))),e.hidePhaser||(h=h.concat("Phaser v"+n.VERSION+" ("+i+" | "+s+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(324),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=s(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,r=Math.min(r,this._target)),r>this._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var o=0,a=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running?this.sleep():t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step()},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var t=this;this.step=function e(){var i=window.performance.now();t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.requestAnimationFrame(e)},this.stepTimeout=function e(){var i=Date.now(),n=Math.min(Math.max(2*t.target+t.tick-i,0),t.target);t.lastTime=t.tick,t.tick=i,t.callback(i),t.timeOutID=window.setTimeout(e,n)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=s}});t.exports=r},function(t,e,i){var n=i(18);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")});e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var n=i(327),s=i(26),r=i(6);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",n),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*a)),p=Math.floor(Math.abs(e.length*h));i||(i=s.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var g=i.getContext("2d");u&&g.clearRect(0,0,f,p),c&&c(i,g);for(var v=0;vi;)n-=i;ni.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(n(a,h.x,l.x,u.x,c.x),n(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},function(t,e,i){var n=i(114);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?n.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},function(t,e,i){var n=i(174);t.exports=function(t,e){var i=window.screen,s=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);if(s&&"string"==typeof s.type)return s.type;if("string"==typeof s)return s;if(i)return i.height>i.width?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return n.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return n.ORIENTATION.LANDSCAPE}return e>t?n.ORIENTATION.PORTRAIT:n.ORIENTATION.LANDSCAPE}},function(t,e){t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},function(t,e){t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},function(t,e){t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},function(t,e){t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},function(t,e){t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},function(t,e){t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},function(t,e,i){var n=i(0),s=i(176),r=i(9),o=i(53),a=i(18),h=i(346),l=i(347),u=i(348),c=i(349),d=i(32),f=i(315),p=new n({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var n=new u(this,i);n.smoothFactor=e.inputSmoothFactor,this.pointers.push(n)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){this.canvas=this.game.canvas,this.scaleManager=this.game.scale,this.events.emit(o.MANAGER_BOOT),this.game.events.on(a.PRE_RENDER,this.preRender,this),this.game.events.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var n=0;n10&&(t=10-this.pointersTotal);for(var i=0;i-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.useQueue||t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},function(t,e,i){var n=i(0),s=i(165),r=i(53),o=i(0),a=new n({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.capture=t.inputMouseCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return document.body.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){if(s.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){s.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this,e=this.manager.canvas,i=window&&window.focus&&this.manager.game.config.autoFocus;this.onMouseMove=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseMove(e),t.capture&&e.preventDefault())},this.onMouseDown=function(n){i&&window.focus(),!n.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseDown(n),t.capture&&n.target===e&&n.preventDefault())},this.onMouseDownWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseDown(i)},this.onMouseUp=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&(t.manager.onMouseUp(i),t.capture&&i.target===e&&i.preventDefault())},this.onMouseUpWindow=function(i){!i.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&i.target!==e&&t.manager.onMouseUp(i)},this.onMouseOver=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOver(e)},this.onMouseOut=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.setCanvasOut(e)},this.onMouseWheel=function(e){!e.defaultPrevented&&t.enabled&&t.manager&&t.manager.enabled&&t.manager.onMouseWheel(e)};var n=this.target;if(n){var r={passive:!0},o={passive:!1};n.addEventListener("mousemove",this.onMouseMove,this.capture?o:r),n.addEventListener("mousedown",this.onMouseDown,this.capture?o:r),n.addEventListener("mouseup",this.onMouseUp,this.capture?o:r),n.addEventListener("mouseover",this.onMouseOver,this.capture?o:r),n.addEventListener("mouseout",this.onMouseOut,this.capture?o:r),n.addEventListener("wheel",this.onMouseWheel,this.capture?o:r),window&&this.manager.game.config.inputWindowEvents&&(window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o)),s.pointerLock&&(this.pointerLockChange=function(e){var i=t.target;t.locked=document.pointerLockElement===i||document.mozPointerLockElement===i||document.webkitPointerLockElement===i,t.manager.onPointerLockChange(e)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&(window.removeEventListener("mousedown",this.onMouseDownWindow),window.removeEventListener("mouseup",this.onMouseUpWindow)),s.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},function(t,e,i){var n=i(300),s=i(0),r=i(58),o=i(167),a=i(309),h=i(3),l=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=this.x,i=this.y;1!==t.resolution&&(e+=t._x,i+=t._y);var n=t.getWorldPoint(e,i);return this.worldX=n.x,this.worldY=n.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,s=this.midPoint.y;if(t!==i||e!==s){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,s,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=n(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=t.timeStamp),this.isDown=!1,this.wasTouch=!1},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=t.timeStamp),this.isDown=!0,this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,n=this.prevPosition.y,s=this.position.x,r=this.position.y,o=0;o0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,s=t.scaleMode,r=t.resolution,o=t.zoom,a=t.autoRound;if("string"==typeof e){var h=this.parentSize.width;0===h&&(h=window.innerWidth);var l=parseInt(e,10)/100;e=Math.floor(h*l)}if("string"==typeof i){var c=this.parentSize.height;0===c&&(c=window.innerHeight);var d=parseInt(i,10)/100;i=Math.floor(c*d)}this.resolution=1,this.scaleMode=s,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),o===n.ZOOM.MAX_ZOOM&&(o=this.getMaxZoom()),this.zoom=o,1!==o&&(this._resetZoom=!0),this.baseSize.setSize(e*r,i*r),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*o,t.minHeight*o),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*o,t.maxHeight*o),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==n.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=this.resolution,n=e.width*i,s=e.height*i;return(t.width!==n||t.height!==s)&&(t.setSize(n,s),!0)},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e(t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound,n=this.resolution;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,r=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t,e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,r)},resize:function(t,e){var i=this.zoom,n=this.resolution,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var r=this.width,o=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t*n,e*n),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i*n,e*i*n),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,h=t*i,l=e*i;return s&&(h=Math.floor(h),l=Math.floor(l)),h===t&&l===e||(a.width=h+"px",a.height=l+"px"),this.refresh(r,o)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var n=this.canvas.style,s=i.style;s.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",s.marginLeft=n.marginLeft,s.marginTop=n.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,this.resolution,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,s=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===n.SCALE_MODE.NONE?(this.displaySize.setSize(s*o*1,r*o*1),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===n.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(1*this.displaySize.width,1*this.displaySize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width/1,e=this.displaySize.height/1,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==n.CENTER.NO_CENTER){var e=this.canvas,i=e.style,s=e.getBoundingClientRect(),r=s.width,o=s.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===n.CENTER.CENTER_HORIZONTALLY?h=0:t===n.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i,n=this.getFullscreenTarget();this._requestedFullscreenChange=!0,(i=e.keyboard?n[e.request](Element.ALLOW_KEYBOARD_INPUT):n[e.request](t))?i.then(this.fullscreenSuccessHandler.bind(this)).catch(this.fullscreenErrorHandler.bind(this)):e.active?this.fullscreenSuccessHandler():this.fullscreenErrorHandler()}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&(this._requestedFullscreenChange=!0,document[t.cancel]()),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.listeners;if(e.orientationChange=function(){t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach(function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){this._requestedFullscreenChange||this.stopFullscreen(),this._requestedFullscreenChange=!1},onFullScreenError:function(){this.removeFullscreenTarget()},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.listeners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach(function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===n.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===n.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(23),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=n(t,0,this.maxWidth),this.minHeight=n(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=n(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatio0&&(t=(e=r(e,n.y))*this.aspectRatio)):(i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,n.x>0&&(e=(t=r(t,n.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},function(t,e,i){var n=i(0),s=i(121),r=i(22),o=i(18),a=i(6),h=i(81),l=i(1),u=i(354),c=i(177),d=new n({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[n],this.scenes.splice(i,1),this._start.indexOf(n)>-1&&(i=this._start.indexOf(n),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,n=i.settings;t.init&&(t.init.call(t,n.data),n.status=s.INIT,n.isTransition&&i.events.emit(r.TRANSITION_INIT,n.transitionFrom,n.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),0===e.list.size?this.create(t):(n.status=s.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start())):this.create(t)},loadComplete:function(t){var e=t.scene;this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(e)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var n=this.scenes[i].sys;n.settings.status>s.START&&n.settings.status<=s.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=s.LOADING&&i.settings.status0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,n=this.getScene(t),s=this.getAt(i);this.scenes[e]=s,this.scenes[i]=n}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e=r.x&&t=r.y&&e=r.x&&t=r.y&&e-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=n,o.data[2]=s,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,n,s,r,o){return void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,n,s,r,o),this},getData:function(t,e,i,n){return t=s(Math.floor(t),0,this.width-1),e=s(Math.floor(e),0,this.height-1),i=s(i,1,this.width-t),n=s(n,1,this.height-e),this.context.getImageData(t,e,i,n)},getPixel:function(t,e,i){i||(i=new r);var n=this.getIndex(t,e);if(n>-1){var s=this.data,o=s[n+0],a=s[n+1],h=s[n+2],l=s[n+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===n&&(n=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=s(t,0,this.width),a=s(t+i,0,this.width),h=s(e,0,this.height),l=s(e+n,0,this.height),u=new r,c=[],d=h;d0)&&(!!n.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!n.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!n.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s=n)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){n.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=this.currentConfig.volume*this.manager.volume)},calculateRate:function(){n.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this}});t.exports=o},function(t,e,i){var n=i(122),s=i(0),r=i(9),o=i(364),a=i(1),h=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return n.prototype.remove.call(this,t)},removeByKey:function(t){return n.prototype.removeByKey.call(this,t)},pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,forEachActiveSound:function(t,e){n.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){n.prototype.destroy.call(this)}});t.exports=h},function(t,e,i){var n=i(123),s=i(0),r=i(9),o=i(17),a=new s({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!1},updateMarker:function(t){return!1},removeMarker:function(t){return null},play:function(t,e){return!1},pause:function(){return!1},resume:function(){return!1},stop:function(){return!1},destroy:function(){this.manager.remove(this),n.prototype.destroy.call(this)}});t.exports=a},function(t,e,i){var n=i(366),s=i(122),r=i(0),o=i(59),a=i(367),h=new r({Extends:s,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),s.call(this,t),this.locked&&this.unlock()},createAudioContext:function(t){var e=t.config.audio;return e&&e.context?(e.context.resume(),e.context):new AudioContext},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var s=this.game.cache.audio,r=i.length,a=0;a>4,u[h++]=(15&i)<<4|s>>2,u[h++]=(3&s)<<6|63&r;return l}},function(t,e,i){var n=i(123),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),this.audioBuffer?(this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)):console.warn("Audio cache entry missing: "+e)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=n);o>r;){if(o-r>600){var h=o-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(o,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,a)}var g=t[e],v=r,m=o;for(i(t,r,e),a(t[o],g)>0&&i(t,r,o);v0;)m--}0===a(t[r],g)?i(t,r,m):i(t,++m,o),m<=e&&(r=m+1),e<=m&&(o=m-1)}};t.exports=s},function(t,e,i){var n=i(6),s=i(112),r=function(t,e,i){for(var n=[],s=0;s0?s.delayedPlay(d,r,o):s.load(r)}return t}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-s,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,o,a)}},function(t,e,i){var n=i(0),s=i(12),r=i(939),o=i(14),a=i(7),h=i(175),l=i(316),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Origin,s.ScrollFactor,s.Transform,s.Visible,r],initialize:function(t,e,i,n,s,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,this.rotate3dAngle="deg",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof n?"#"===n[0]?this.setElement(n.substr(1),s,r):this.createElement(n,s,r):n&&this.setElement(n,s,r)},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e>>16,y=(65280&p)>>>8,x=255&p,c.strokeStyle="rgba("+m+","+y+","+x+","+d+")",c.lineWidth=v,T+=3;break;case n.FILL_STYLE:g=l[T+1],f=l[T+2],m=(16711680&g)>>>16,y=(65280&g)>>>8,x=255&g,c.fillStyle="rgba("+m+","+y+","+x+","+f+")",T+=2;break;case n.BEGIN_PATH:c.beginPath();break;case n.CLOSE_PATH:c.closePath();break;case n.FILL_PATH:h||c.fill();break;case n.STROKE_PATH:h||c.stroke();break;case n.FILL_RECT:h?c.rect(l[T+1],l[T+2],l[T+3],l[T+4]):c.fillRect(l[T+1],l[T+2],l[T+3],l[T+4]),T+=4;break;case n.FILL_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.fill(),T+=6;break;case n.STROKE_TRIANGLE:c.beginPath(),c.moveTo(l[T+1],l[T+2]),c.lineTo(l[T+3],l[T+4]),c.lineTo(l[T+5],l[T+6]),c.closePath(),h||c.stroke(),T+=6;break;case n.LINE_TO:c.lineTo(l[T+1],l[T+2]),T+=2;break;case n.MOVE_TO:c.moveTo(l[T+1],l[T+2]),T+=2;break;case n.LINE_FX_TO:c.lineTo(l[T+1],l[T+2]),T+=5;break;case n.MOVE_FX_TO:c.moveTo(l[T+1],l[T+2]),T+=5;break;case n.SAVE:c.save();break;case n.RESTORE:c.restore();break;case n.TRANSLATE:c.translate(l[T+1],l[T+2]),T+=2;break;case n.SCALE:c.scale(l[T+1],l[T+2]),T+=2;break;case n.ROTATE:c.rotate(l[T+1]),T+=1;break;case n.GRADIENT_FILL_STYLE:T+=5;break;case n.GRADIENT_LINE_STYLE:T+=6;break;case n.SET_TEXTURE:T+=2}c.restore()}}},function(t,e,i){var n=i(0),s=i(2),r=new n({initialize:function(t,e,i,n,r){if("object"==typeof t){var o=t;t=s(o,"x",0),e=s(o,"y",0),i=s(o,"power",0),n=s(o,"epsilon",100),r=s(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i=this.x-t.x,n=this.y-t.y,s=i*i+n*n;if(0!==s){var r=Math.sqrt(s);s0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;this.frame=i.getFrame(),i.emitZone&&i.emitZone.getPoint(this),void 0===t?(i.follow&&(this.x+=i.follow.x+i.followOffset.x),this.x+=i.x.onEmit(this,"x")):this.x+=t,void 0===e?(i.follow&&(this.y+=i.follow.y+i.followOffset.y),this.y+=i.y.onEmit(this,"y")):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var n=i.speedX.onEmit(this,"speedX"),o=i.speedY?i.speedY.onEmit(this,"speedY"):n;if(i.radial){var a=s(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(n),this.velocityY=Math.sin(a)*Math.abs(o)}else if(i.moveTo){var h=i.moveToX.onEmit(this,"moveToX"),l=i.moveToY?i.moveToY.onEmit(this,"moveToY"):h,u=Math.atan2(l-this.y,h-this.x),c=r(this.x,this.y,h,l)/(this.life/1e3);this.velocityX=Math.cos(u)*c,this.velocityY=Math.sin(u)*c}else this.velocityX=n,this.velocityY=o;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY?i.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,n){var s=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;s+=t.gravityX*i,r+=t.gravityY*i,o&&(s+=o*i),a&&(r+=a*i),s>h?s=h:s<-h&&(s=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=s,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var n=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(n,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,n.bounds&&this.checkBounds(n),n.deathZone&&n.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=n.scaleX.onUpdate(this,"scaleX",r,this.scaleX),n.scaleY?this.scaleY=n.scaleY.onUpdate(this,"scaleY",r,this.scaleY):this.scaleY=this.scaleX,this.angle=n.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=s(this.angle),this.alpha=n.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=n.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=o},function(t,e,i){var n=i(52),s=i(0),r=i(12),o=i(383),a=i(384),h=i(956),l=i(2),u=i(182),c=i(385),d=i(99),f=i(381),p=i(386),g=i(11),v=i(126),m=i(3),y=i(57),x=new s({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",0,!0),this.moveToY=new h(e,"moveToY",0,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",4294967295),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=n.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()===this.maxParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,n=i.length,s=0;s0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];s.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}this.on&&(0===this.frequency?this.emitParticle():this.frequency>0&&(this._counter-=e,this._counter<=0&&(this.emitParticle(),this._counter=this.frequency-Math.abs(this._counter))))},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s){void 0===n&&(n=!1),void 0===s&&(s=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=n,this.counter=-1,this.seamless=s,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=n},function(t,e){t.exports=function(t,e){for(var i=0;i0&&(s=-h.PI2+s%h.PI2):s>h.PI2?s=h.PI2:s<0&&(s=h.PI2+s%h.PI2);for(var u,c=[a+Math.cos(n)*i,l+Math.sin(n)*i];e<1;)u=s*e+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=s+n,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(n)*i,l+Math.sin(n)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},function(t,e,i){var n=i(0),s=i(982),r=i(66),o=i(11),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],n=this.geom.getPoints(e),s=0;sc+v)){var m=g.getPoint((u-c)/v);o.push(m);break}c+=v}return o}},function(t,e,i){var n=i(56),s=i(55);t.exports=function(t){for(var e=t.points,i=0,r=0;r0&&r.push(i([0,0],n[0])),e=0;e1&&r.push(i([0,0],n[n.length-1])),t.setTo(r)}},function(t,e,i){var n=i(0),s=i(11),r=i(30),o=i(1003),a=new n({Extends:r,Mixins:[o],initialize:function(t,e,i,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new s(0,0,n,o)),this.setPosition(e,i),this.setSize(n,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},function(t,e,i){var n=i(1006),s=i(0),r=i(66),o=i(30),a=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,n,s,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=5),void 0===s&&(s=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=n,this._innerRadius=s,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,n=this._outerRadius,s=Math.PI/2*3,o=Math.PI/e,a=n,h=n;t.push(a,h+-n);for(var l=0;l=1)return i.x=r.x1,i.y=r.y1,i;var h=s(r),l=s(o),u=s(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},function(t,e,i){var n=i(56),s=i(4);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=n(o),u=n(a),c=n(h),d=l+u+c;e||(e=d/i);for(var f=0;fl+u?(g=(p-=l+u)/c,v.x=h.x1+(h.x2-h.x1)*g,v.y=h.y1+(h.y2-h.y1)*g):(g=(p-=l)/u,v.x=a.x1+(a.x2-a.x1)*g,v.y=a.y1+(a.y2-a.y1)*g),r.push(v)}return r}},function(t,e){t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var n=e.split("."),s=t,r=t,o=0;o0?(h=this.lightPool.pop()).set(t,e,i,a[0],a[1],a[2],o):h=new s(t,e,i,a[0],a[1],a[2],o),this.lights.push(h),h},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&(this.lightPool.push(t),this.lights.splice(e,1)),this},shutdown:function(){for(;this.lights.length>0;)this.lightPool.push(this.lights.pop());this.ambientColor={r:.1,g:.1,b:.1},this.culledLights.length=0,this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=o},function(t,e,i){var n=i(46),s=i(17),r={Circle:i(1067),Ellipse:i(1077),Intersects:i(409),Line:i(1096),Point:i(1117),Polygon:i(1131),Rectangle:i(422),Triangle:i(1161)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(201),CircleToRectangle:i(202),GetCircleToCircle:i(1087),GetCircleToRectangle:i(1088),GetLineToCircle:i(203),GetLineToRectangle:i(205),GetRectangleIntersection:i(1089),GetRectangleToRectangle:i(1090),GetRectangleToTriangle:i(1091),GetTriangleToCircle:i(1092),GetTriangleToLine:i(414),GetTriangleToTriangle:i(1093),LineToCircle:i(204),LineToLine:i(84),LineToRectangle:i(410),PointToLine:i(418),PointToLineSegment:i(1094),RectangleToRectangle:i(129),RectangleToTriangle:i(411),RectangleToValues:i(1095),TriangleToCircle:i(413),TriangleToLine:i(415),TriangleToTriangle:i(416)}},function(t,e){t.exports=function(t,e){var i=t.x1,n=t.y1,s=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&n>=a&&n<=l||s>=o&&s<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=n+(r-n)*(o-i)/(s-i))>a&&u<=l)return!0}else if(i>h&&s<=h&&(u=n+(r-n)*(h-i)/(s-i))>=a&&u<=l)return!0;if(n=a){if((u=i+(s-i)*(a-n)/(r-n))>=o&&u<=h)return!0}else if(n>l&&r<=l&&(u=i+(s-i)*(l-n)/(r-n))>=o&&u<=h)return!0;return!1}},function(t,e,i){var n=i(84),s=i(47),r=i(206),o=i(412);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},function(t,e,i){var n=i(204),s=i(83);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottom0||(c=s(e),(d=n(t,c,!0)).length>0)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},function(t,e){t.exports=function(t,e,i){void 0===i&&(i=1);var n=e.x1,s=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-n)*(r-n)+(o-s)*(o-s);if(0===l)return!1;var u=((a-n)*(r-n)+(h-s)*(o-s))/l;if(u<0)return Math.sqrt((n-a)*(n-a)+(s-h)*(s-h))<=i;if(u>=0&&u<=1){var c=((s-h)*(r-n)-(n-a)*(o-s))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},function(t,e,i){var n=i(13),s=i(57),r=i(85);t.exports=function(t){var e=r(t)-n.TAU;return s(e,-Math.PI,Math.PI)}},function(t,e){t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},function(t,e){t.exports=function(t){return t.x*t.x+t.y*t.y}},function(t,e,i){var n=i(11);n.Area=i(1136),n.Ceil=i(1137),n.CeilAll=i(1138),n.CenterOn=i(163),n.Clone=i(1139),n.Contains=i(47),n.ContainsPoint=i(1140),n.ContainsRect=i(423),n.CopyFrom=i(1141),n.Decompose=i(412),n.Equals=i(1142),n.FitInside=i(1143),n.FitOutside=i(1144),n.Floor=i(1145),n.FloorAll=i(1146),n.FromPoints=i(173),n.GetAspectRatio=i(208),n.GetCenter=i(1147),n.GetPoint=i(147),n.GetPoints=i(257),n.GetSize=i(1148),n.Inflate=i(1149),n.Intersection=i(1150),n.MarchingAnts=i(268),n.MergePoints=i(1151),n.MergeRect=i(1152),n.MergeXY=i(1153),n.Offset=i(1154),n.OffsetPoint=i(1155),n.Overlaps=i(1156),n.Perimeter=i(110),n.PerimeterPoint=i(1157),n.Random=i(150),n.RandomOutside=i(1158),n.SameDimensions=i(1159),n.Scale=i(1160),n.Union=i(372),t.exports=n},function(t,e){t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var n=i(428),s=i(429),r=i(0),o=i(9),a=i(3),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),s>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t=r;for(i=0;i=r;)this._elapsed-=r,this.step(s)}},step:function(t){var e,i,n=this.bodies.entries,s=n.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(n=(i=h.entries).length,t=0;t-1&&p>g&&(t.velocity.normalize().scale(g),p=g),t.speed=p},separate:function(t,e,i,n,s){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(n,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,s);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,s)}var l=!1,c=!1;this.forceX||Math.abs(this.gravity.y+t.gravity.y)r.right&&(s=h(o.x,o.y,r.right,r.y)-o.radius):o.y>r.bottom&&(o.xr.right&&(s=h(o.x,o.y,r.right,r.bottom)-o.radius)),s*=-1}else s=t.halfWidth+e.halfWidth-h(t.center.x,t.center.y,e.center.x,e.center.y);if(i||0===s||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==s&&(t.onOverlap||e.onOverlap)&&this.emit(u.OVERLAP,t.gameObject,e.gameObject,t,e),0!==s;var a=t.center.x-e.center.x,l=t.center.y-e.center.y,c=Math.sqrt(Math.pow(a,2)+Math.pow(l,2)),d=(e.center.x-t.center.x)/c||0,f=(e.center.y-t.center.y)/c||0,v=2*(t.velocity.x*d+t.velocity.y*f-e.velocity.x*d-e.velocity.y*f)/(t.mass+e.mass);t.immovable||(t.velocity.x=t.velocity.x-v*t.mass*d,t.velocity.y=t.velocity.y-v*t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+v*e.mass*d,e.velocity.y=e.velocity.y+v*e.mass*f);var m=e.velocity.x-t.velocity.x,y=e.velocity.y-t.velocity.y,x=Math.atan2(y,m),T=this._frameTime;return t.immovable||e.immovable||(s/=2),t.immovable||(t.x+=t.velocity.x*T-s*Math.cos(x),t.y+=t.velocity.y*T-s*Math.sin(x)),e.immovable||(e.x+=e.velocity.x*T+s*Math.cos(x),e.y+=e.velocity.y*T+s*Math.sin(x)),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(u.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?h(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=s(t.center.x,e.left,e.right),n=s(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o,a;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,n,s,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,n,s,r);if(!t||!e)return!1;if(t.body){if(e.body)return this.collideSpriteVsSprite(t,e,i,n,s,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,n,s,r)}else if(t.isParent){if(e.body)return this.collideSpriteVsGroup(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,n,s,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,n,s,r)}else if(t.isTilemap){if(e.body)return this.collideSpriteVsTilemapLayer(e,t,i,n,s,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,n,s,r)}},collideSpriteVsSprite:function(t,e,i,n,s,r){return!(!t.body||!e.body)&&(this.separate(t.body,e.body,n,s,r)&&(i&&i.call(s,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,n,s,r){var o,h,l,u=t.body;if(0!==e.length&&u&&u.enable)if(this.useTree){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===a.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(h=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(a,h,l,u);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,c={left:0,right:0,top:0,bottom:0},d=!1,f=0;f0&&t>i&&(t=i)),0!==n&&0!==e&&(e<0&&e<-n?e=-n:e>0&&e>n&&(e=n)),this.gameObject.x+=t,this.gameObject.y+=e}t<0?this.facing=s.FACING_LEFT:t>0&&(this.facing=s.FACING_RIGHT),e<0?this.facing=s.FACING_UP:e>0&&(this.facing=s.FACING_DOWN),this.allowRotation&&(this.gameObject.angle+=this.deltaZ())},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,n=this.worldBounce?-this.worldBounce.x:-this.bounce.x,s=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.offset.set(s-this.halfWidth,r-this.halfHeight)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i.setPosition(t,e),i.getTopLeft?i.getTopLeft(this.position):this.position.set(t,e),this.prev.copy(this.position),this.prevFrame.copy(this.position),this.rotation=i.angle,this.preRotation=i.angle,this.updateBounds(),this.updateCenter()},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,n,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,n,i+this.velocity.x/2,n+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,s=void 0!==i;return(n||s)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),s&&(this.worldBounce.y=i)),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){this.velocity.x=t;var e=t,i=this.velocity.y;return this.speed=Math.sqrt(e*e+i*i),this},setVelocityY:function(t){this.velocity.y=t;var e=this.velocity.x,i=t;return this.speed=Math.sqrt(e*e+i*i),this},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n,s,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=n,this.collideCallback=s,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=n},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.left=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},function(t,e,i){var n=i(50);t.exports=function(t,e,i,s){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType===n.STATIC_BODY&&(t.blocked.none=!1,t.blocked.up=!0),t.physicsType===n.STATIC_BODY&&(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},function(t,e,i){var n=i(369);function s(t){if(!(this instanceof s))return new s(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=s||(o=e+Math.ceil((i-e)/s/2)*s,n(t,o,e,i,r),a.push(e,o,o,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!p(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),a=g(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,s,r,o,h,l,u,d,f,p,g,v,m,y;for(l=u=1/0,n=e;n<=i-e;n++)s=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),f=s,p=r,void 0,void 0,void 0,void 0,g=Math.max(f.minX,p.minX),v=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),o=Math.max(0,m-g)*Math.max(0,y-v),h=c(s)+c(r),o=e;s--)r=t.children[s],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=s},function(t,e){t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(54),s=i(0),r=i(50),o=i(47),a=i(3),h=new s({initialize:function(t,e){var i=e.width?e.width:64,n=e.height?e.height:64;this.world=t,this.gameObject=e,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-e.displayOriginX,e.y-e.displayOriginY),this.width=i,this.height=n,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(e.x+this.halfWidth,e.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n=this.gameObject;if(!t&&n.frame&&(t=n.frame.realWidth),!e&&n.frame&&(e=n.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&n.getCenter){var s=n.displayWidth/2,r=n.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?n(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,n=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,n,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},function(t,e){t.exports={NEVER:0,LITE:1,PASSIVE:2,ACTIVE:4,FIXED:8}},function(t,e){t.exports={NONE:0,A:1,B:2,BOTH:3}},function(t,e,i){var n={};t.exports=n;var s=i(235);n._motionWakeThreshold=.18,n._motionSleepThreshold=.08,n._minBias=.9,n.update=function(t,e){for(var i=e*e*e,s=0;s0&&r.motion=r.sleepThreshold&&n.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else n.set(r,!1)}},n.afterCollisions=function(t,e){for(var i=e*e*e,s=0;sn._motionWakeThreshold*i&&n.set(l,!1)}}}},n.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){var n=i(24);t.exports=function(t,e,i,s,r,o,a){for(var h=n(i,s,r,o,null,a),l=0;l-1}return!1}},function(t,e,i){var n=i(74),s=i(103),r=i(216);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!1),void 0===o&&(o=!0),!s(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new n(a,-1,t,e,h.width,h.height),o&&h&&h.collides&&r(t,e,a),h):null}},function(t,e,i){var n=i(31),s=i(219),r=i(459),o=i(460),a=i(471);t.exports=function(t,e,i,h,l,u){var c;switch(e){case n.ARRAY_2D:c=s(t,i,h,l,u);break;case n.CSV:c=r(t,i,h,l,u);break;case n.TILED_JSON:c=o(t,i,u);break;case n.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},function(t,e,i){var n=i(31),s=i(219);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map(function(t){return t.split(",")}),h=s(t,a,i,r,o);return h.format=n.CSV,h}},function(t,e,i){var n=i(31),s=i(105),r=i(461),o=i(463),a=i(464),h=i(467),l=i(469),u=i(470);t.exports=function(t,e,i){if("orthogonal"!==e.orientation)return console.warn("Only orthogonal map types are supported in this version of Phaser"),null;var c=new s({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:e.orientation,format:n.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite});c.layers=r(e,i),c.images=o(e);var d=a(e);return c.tilesets=d.tilesets,c.imageCollections=d.imageCollections,c.objects=h(e),c.tiles=l(c),u(c),c}},function(t,e,i){var n=i(462),s=i(2),r=i(104),o=i(220),a=i(74),h=i(221);t.exports=function(t,e){for(var i=s(t,"infinite",!1),l=[],u=[],c=h(t);c.i0;)if(c.i>=c.layers.length){if(u.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}c=u.pop()}else{var d=c.layers[c.i];if(c.i++,"tilelayer"===d.type)if(d.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+d.name+"'");else{if(d.encoding&&"base64"===d.encoding){if(d.chunks)for(var f=0;f0?((v=new a(p,g.gid,O,R,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,y[R][O]=v):(m=e?null:new a(p,-1,O,R,t.tilewidth,t.tileheight),y[R][O]=m),++x===S.width&&(C++,x=0)}}else{p=new r({name:c.name+d.name,x:c.x+s(d,"offsetx",0)+d.x,y:c.y+s(d,"offsety",0)+d.y,width:d.width,height:d.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:c.opacity*d.opacity,visible:c.visible&&d.visible,properties:s(d,"properties",{})});for(var L=[],D=0,k=d.data.length;D0?((v=new a(p,g.gid,x,y.length,t.tilewidth,t.tileheight)).rotation=g.rotation,v.flipX=g.flipped,L.push(v)):(m=e?null:new a(p,-1,x,y.length,t.tilewidth,t.tileheight),L.push(m)),++x===d.width&&(y.push(L),x=0,L=[])}p.data=y,l.push(p)}else if("group"===d.type){var F=h(t,d,c);u.push(c),c=F}}return l}},function(t,e){t.exports=function(t){for(var e=window.atob(t),i=e.length,n=new Array(i/4),s=0;s>>0;return n}},function(t,e,i){var n=i(2),s=i(221);t.exports=function(t){for(var e=[],i=[],r=s(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=n(o,"offsetx",0)+n(o,"startx",0),h=n(o,"offsety",0)+n(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:n(o,"properties",{})})}else if("group"===o.type){var l=s(t,o,r);i.push(r),r=l}}return e}},function(t,e,i){var n=i(140),s=i(465),r=i(222);t.exports=function(t){for(var e,i=[],o=[],a=null,h=0;h1){if(Array.isArray(l.tiles)){for(var c={},d={},f=0;f=this.firstgid&&t0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+n(h,"startx",0)+n(h,"offsetx",0),u=a.y+n(h,"starty",0)+n(h,"offsety",0),c=[],d=0;da&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new s({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:n.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},function(t,e,i){var n=i(104),s=i(74);t.exports=function(t,e){for(var i=[],r=0;r-1?new s(a,f,c,u,o.tilesize,o.tilesize):e?null:new s(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},function(t,e,i){var n=i(140);t.exports=function(t){for(var e=[],i=[],s=0;s-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,n,s,r,o){if(void 0===t)return null;if(void 0!==e&&null!==e||(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===a.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,n),u.setSpacing(s,r),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===n&&(n=this.tileHeight),void 0===s&&(s=0),void 0===r&&(r=0),void 0===o&&(o=0),(u=new p(t,o,i,n,s,r)).setImage(h),this.tilesets.push(u),u)},convertLayerToStatic:function(t){if(null===(t=this.getLayer(t)))return null;var e=t.tilemapLayer;if(!(e&&e instanceof r))return null;var i=new c(e.scene,e.tilemap,e.layerIndex,e.tileset,e.x,e.y);return this.scene.sys.displayList.add(i),e.destroy(),i},copy:function(t,e,i,n,s,r,o,a){return a=this.getLayer(a),this._isStaticCall(a,"copy")?this:null!==a?(f.Copy(t,e,i,n,s,r,o,a),this):null},createBlankDynamicLayer:function(t,e,i,n,s,o,a,l){if(void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.width),void 0===o&&(o=this.height),void 0===a&&(a=this.tileWidth),void 0===l&&(l=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var u,c=new h({name:t,tileWidth:a,tileHeight:l,width:s,height:o}),f=0;f-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return n},removeTileAt:function(t,e,i,n,s){return s=this.getLayer(s),this._isStaticCall(s,"removeTileAt")?null:null===s?null:f.RemoveTileAt(t,e,i,n,s)},removeTileAtWorldXY:function(t,e,i,n,s,r){return r=this.getLayer(r),this._isStaticCall(r,"removeTileAtWorldXY")?null:null===r?null:f.RemoveTileAtWorldXY(t,e,i,n,s,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,n){return a.CalculateFacesWithin(t,e,i,n,this.layer),this},createFromTiles:function(t,e,i,n,s){return a.CreateFromTiles(t,e,i,n,s,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,n,s,r,o){return a.Copy(t,e,i,n,s,r,o,this.layer),this},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))},fill:function(t,e,i,n,s,r){return a.Fill(t,e,i,n,s,r,this.layer),this},filterTiles:function(t,e,i,n,s,r,o){return a.FilterTiles(t,e,i,n,s,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,n,s,r,o){return a.FindTile(t,e,i,n,s,r,o,this.layer)},forEachTile:function(t,e,i,n,s,r,o){return a.ForEachTile(t,e,i,n,s,r,o,this.layer),this},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,n){return a.GetTileAtWorldXY(t,e,i,n,this.layer)},getTilesWithin:function(t,e,i,n,s){return a.GetTilesWithin(t,e,i,n,s,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,n,s,r){return a.GetTilesWithinWorldXY(t,e,i,n,s,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,n){return a.PutTileAt(t,e,i,n,this.layer)},putTileAtWorldXY:function(t,e,i,n,s){return a.PutTileAtWorldXY(t,e,i,n,s,this.layer)},putTilesAt:function(t,e,i,n){return a.PutTilesAt(t,e,i,n,this.layer),this},randomize:function(t,e,i,n,s){return a.Randomize(t,e,i,n,s,this.layer),this},removeTileAt:function(t,e,i,n){return a.RemoveTileAt(t,e,i,n,this.layer)},removeTileAtWorldXY:function(t,e,i,n,s){return a.RemoveTileAtWorldXY(t,e,i,n,s,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,n,s,r){return a.ReplaceByIndex(t,e,i,n,s,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,n){return a.SetCollision(t,e,i,this.layer,n),this},setCollisionBetween:function(t,e,i,n){return a.SetCollisionBetween(t,e,i,n,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,n,s,r){return a.SetTileLocationCallback(t,e,i,n,s,r,this.layer),this},shuffle:function(t,e,i,n){return a.Shuffle(t,e,i,n,this.layer),this},swapByIndex:function(t,e,i,n,s,r){return a.SwapByIndex(t,e,i,n,s,r,this.layer),this},tileToWorldX:function(t,e){return a.TileToWorldX(t,e,this.layer)},tileToWorldY:function(t,e){return a.TileToWorldY(t,e,this.layer)},tileToWorldXY:function(t,e,i,n){return a.TileToWorldXY(t,e,i,n,this.layer)},weightedRandomize:function(t,e,i,n,s){return a.WeightedRandomize(t,e,i,n,s,this.layer),this},worldToTileX:function(t,e,i){return a.WorldToTileX(t,e,i,this.layer)},worldToTileY:function(t,e,i){return a.WorldToTileY(t,e,i,this.layer)},worldToTileXY:function(t,e,i,n,s){return a.WorldToTileXY(t,e,i,n,s,this.layer)}});t.exports=h},function(t,e,i){var n=i(0),s=i(12),r=i(18),o=i(14),a=i(1321),h=i(136),l=i(32),u=i(10),c=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Depth,s.Flip,s.GetBounds,s.Origin,s.Pipeline,s.Transform,s.Visible,s.ScrollFactor,a],initialize:function(t,e,i,n,s,a){o.call(this,t,"StaticTilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.culledTiles=[],this.skipCull=!1,this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.CullTiles,this.renderer=t.sys.game.renderer,this.vertexBuffer=[],this.bufferData=[],this.vertexViewF32=[],this.vertexViewU32=[],this.dirty=[],this.vertexCount=[],this._renderOrder=0,this._tempMatrix=new l,this.gidMap=[],this.setTilesets(n),this.setAlpha(this.layer.alpha),this.setPosition(s,a),this.setOrigin(),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.updateVBOData(),this.initPipeline("TextureTintPipeline"),t.sys.game.events.on(r.CONTEXT_RESTORED,function(){this.updateVBOData()},this)},setTilesets:function(t){var e=[],i=[],n=this.tilemap;Array.isArray(t)||(t=[t]);for(var s=0;sv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(1===p)for(o=0;o=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(2===p)for(o=u-1;o>=0;o--)for(a=0;av||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));else if(3===p)for(o=u-1;o>=0;o--)for(a=l-1;a>=0;a--)!(r=f[o][a])||r.indexv||!r.visible||(x=this.batchTile(x,r,h,c,d,t,e));this.dirty[e]=!1,null===m?(m=i.createVertexBuffer(y,n.STATIC_DRAW),this.vertexBuffer[e]=m):(i.setVertexBuffer(m),n.bufferSubData(n.ARRAY_BUFFER,0,y))}return this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,c=h/2,d=l/2,f=a.x/n,p=a.y/s,g=(a.x+h)/n,v=(a.y+l)/s,m=this._tempMatrix,y=-c,x=-d;e.flipX&&(h*=-1,y+=i.tileWidth),e.flipY&&(l*=-1,x+=i.tileHeight);var T=y+h,w=x+l;m.applyITRS(c+e.pixelX,d+e.pixelY,e.rotation,1,1);var b=u.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=m.getX(y,x),S=m.getY(y,x),A=m.getX(y,w),_=m.getY(y,w),C=m.getX(T,w),M=m.getY(T,w),P=m.getX(T,x),O=m.getY(T,x);r.roundPixels&&(E=Math.round(E),S=Math.round(S),A=Math.round(A),_=Math.round(_),C=Math.round(C),M=Math.round(M),P=Math.round(P),O=Math.round(O));var R=this.vertexViewF32[o],L=this.vertexViewU32[o];return R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=A,R[++t]=_,R[++t]=f,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=E,R[++t]=S,R[++t]=f,R[++t]=p,R[++t]=0,L[++t]=b,R[++t]=C,R[++t]=M,R[++t]=g,R[++t]=v,R[++t]=0,L[++t]=b,R[++t]=P,R[++t]=O,R[++t]=g,R[++t]=p,R[++t]=0,L[++t]=b,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),t>=0&&t<4){this._renderOrder=t;for(var e=0;e0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},function(t,e,i){var n=i(1330);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substr(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===n.indexOf(e)&&"_"!==e.substr(0,1)&&i.push({key:e,value:t[e]});return i}},function(t,e,i){var n=i(6);t.exports=function(t){var e=n(t,"tweens",null);return null===e?[]:("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e]),e)}},function(t,e,i){var n=i(226),s=i(15),r=i(88),o=i(82),a=i(141),h=i(6),l=i(225),u=i(227),c=i(229);t.exports=function(t,e,i){void 0===i&&(i=n);var d=h(e,"from",0),f=h(e,"to",1),p=[{value:d}],g=a(e,"delay",i.delay),v=a(e,"duration",i.duration),m=h(e,"easeParams",i.easeParams),y=o(h(e,"ease",i.ease),m),x=a(e,"hold",i.hold),T=a(e,"repeat",i.repeat),w=a(e,"repeatDelay",i.repeatDelay),b=r(e,"yoyo",i.yoyo),E=[],S=l("value",f),A=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,y,g,v,b,x,T,w,!1,!1);A.start=d,A.current=d,A.to=f,E.push(A);var _=new u(t,E,p);_.offset=s(e,"offset",null),_.completeDelay=s(e,"completeDelay",0),_.loop=Math.round(s(e,"loop",0)),_.loopDelay=Math.round(s(e,"loopDelay",0)),_.paused=r(e,"paused",!1),_.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",_),M=[_,null],P=u.TYPES,O=0;O0?Math.floor(v/p.length):h(e,"duration",g.duration),g.delay=h(e,"delay",g.delay),g.easeParams=c(e,"easeParams",g.easeParams),g.ease=a(c(e,"ease",g.ease),g.easeParams),g.hold=h(e,"hold",g.hold),g.repeat=h(e,"repeat",g.repeat),g.repeatDelay=h(e,"repeatDelay",g.repeatDelay),g.yoyo=o(e,"yoyo",g.yoyo),g.flipX=o(e,"flipX",g.flipX),g.flipY=o(e,"flipY",g.flipY);for(var m=0;m0?this.totalDuration=this.duration+this.completeDelay+(this.duration+this.loopDelay)*this.loopCounter:this.totalDuration=this.duration+this.completeDelay},init:function(){return this.calcDuration(),this.progress=0,this.totalProgress=0,!this.paused||(this.state=a.PAUSED,!1)},resetTweens:function(t){for(var e=0;e0?(this.elapsed=0,this.progress=0,this.loopCounter--,this.resetTweens(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.state=a.LOOP_DELAY):(this.state=a.ACTIVE,this.dispatchTimelineEvent(r.TIMELINE_LOOP,this.callbacks.onLoop))):this.completeDelay>0?(this.state=a.COMPLETE_DELAY,this.countdown=this.completeDelay):(this.state=a.PENDING_REMOVE,this.dispatchTimelineEvent(r.TIMELINE_COMPLETE,this.callbacks.onComplete))},update:function(t,e){if(this.state!==a.PAUSED){switch(this.useFrames&&(e=1*this.manager.timeScale),e*=this.timeScale,this.elapsed+=e,this.progress=Math.min(this.elapsed/this.duration,1),this.totalElapsed+=e,this.totalProgress=Math.min(this.totalElapsed/this.totalDuration,1),this.state){case a.ACTIVE:for(var i=this.totalData,n=0;n=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin(),e},updateFrame:function(t){var e=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(e.alpha=t.alpha);var i=this.currentAnim;e.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,e),e.emit(r.SPRITE_ANIMATION_UPDATE,i,t,e),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var n=i(486),s=i(48),r=i(0),o=i(29),a=i(487),h=i(92),l=i(32),u=new r({initialize:function(t){this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=a(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this._tempMatrix4=new l,this.init()},init:function(){this.game.scale.on(h.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var r=e.list,o=r.length,a=n._cx,h=n._cy,l=n._cw,u=n._ch,c=n.renderToTexture?n.context:t.sys.context;c.save(),this.game.scene.customViewports&&(c.beginPath(),c.rect(a,h,l,u),c.clip()),this.currentContext=c;var d=n.mask;d&&d.preRenderCanvas(this,null,n._maskCamera),n.transparent||(c.fillStyle=n.backgroundColor.rgba,c.fillRect(a,h,l,u)),c.globalAlpha=n.alpha,c.globalCompositeOperation="source-over",this.drawCount+=r.length,n.renderToTexture&&n.emit(s.PRE_RENDER,n),n.matrix.copyToContext(c);for(var f=0;f=0?y=-(y+d):y<0&&(y=Math.abs(y)-d)),t.flipY&&(x>=0?x=-(x+f):x<0&&(x=Math.abs(x)-f))}var w=1,b=1;t.flipX&&(p||(y+=-e.realWidth+2*v),w=-1),t.flipY&&(p||(x+=-e.realHeight+2*m),b=-1),a.applyITRS(t.x,t.y,t.rotation,t.scaleX*w,t.scaleY*b),o.copyFrom(i.matrix),n?(o.multiplyWithOffset(n,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=t.x,a.f=t.y,o.multiply(a,h)):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY,o.multiply(a,h)),r.save(),h.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=s,r.imageSmoothingEnabled=!(!this.antialias||e.source.scaleMode),r.drawImage(e.source.image,u,c,d,f,y,x,d/g,f/g),r.restore()}},destroy:function(){this.gameCanvas=null,this.gameContext=null,this.game=null}});t.exports=u},function(t,e,i){var n=i(26),s=i(33),r=i(2);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=r(e,"width",t.width),c=r(e,"height",t.height);if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new s(d[0],d[1],d[2],d[3]/255))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=n.createWebGL(this,u,c);f.getContext("2d").drawImage(t,h,l,u,c,0,0,u,c);var p=new Image;p.onerror=function(){i.call(null),n.remove(f)},p.onload=function(){i.call(null,p),n.remove(f)},p.src=f.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},function(t,e,i){var n=i(52),s=i(299);t.exports=function(){var t=[],e=s.supportNewBlendModes,i="source-over";return t[n.NORMAL]=i,t[n.ADD]="lighter",t[n.MULTIPLY]=e?"multiply":i,t[n.SCREEN]=e?"screen":i,t[n.OVERLAY]=e?"overlay":i,t[n.DARKEN]=e?"darken":i,t[n.LIGHTEN]=e?"lighten":i,t[n.COLOR_DODGE]=e?"color-dodge":i,t[n.COLOR_BURN]=e?"color-burn":i,t[n.HARD_LIGHT]=e?"hard-light":i,t[n.SOFT_LIGHT]=e?"soft-light":i,t[n.DIFFERENCE]=e?"difference":i,t[n.EXCLUSION]=e?"exclusion":i,t[n.HUE]=e?"hue":i,t[n.SATURATION]=e?"saturation":i,t[n.COLOR]=e?"color":i,t[n.LUMINOSITY]=e?"luminosity":i,t[n.ERASE]="destination-out",t[n.SOURCE_IN]="source-in",t[n.SOURCE_OUT]="source-out",t[n.SOURCE_ATOP]="source-atop",t[n.DESTINATION_OVER]="destination-over",t[n.DESTINATION_IN]="destination-in",t[n.DESTINATION_OUT]="destination-out",t[n.DESTINATION_ATOP]="destination-atop",t[n.LIGHTER]="lighter",t[n.COPY]="copy",t[n.XOR]="xor",t}},function(t,e,i){var n=i(91),s=i(48),r=i(0),o=i(29),a=i(18),h=i(116),l=i(1),u=i(92),c=i(79),d=i(117),f=i(32),p=i(10),g=i(489),v=i(490),m=i(491),y=i(234),x=new r({initialize:function(t){var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,resolution:e.resolution,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.nativeTextures=[],this.contextLost=!1,this.pipelines=null,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.currentActiveTextureUnit=0,this.currentTextures=new Array(16),this.currentFramebuffer=null,this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.extensions={},this.glFormats=[],this.compression={ETC1:!1,PVRTC:!1,S3TC:!1},this.drawingBufferHeight=0,this.blankTexture=null,this.defaultCamera=new n(0,0,0,0),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this._tempMatrix4=new f,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.mipmapFilter=null,this.init(this.config)},init:function(t){var e,i=this.game,n=this.canvas,s=t.backgroundColor;if(!(e=i.config.context?i.config.context:n.getContext("webgl",t.contextCreation)||n.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,r.game.events.emit(a.CONTEXT_LOST,r),t.preventDefault()},this.contextRestoredHandler=function(){r.contextLost=!1,r.init(r.config),r.game.events.emit(a.CONTEXT_RESTORED,r)},n.addEventListener("webglcontextlost",this.contextLostHandler,!1),n.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),i.context=e;for(var h=0;h<=27;h++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats[0]=e.BYTE,this.glFormats[1]=e.SHORT,this.glFormats[2]=e.UNSIGNED_BYTE,this.glFormats[3]=e.UNSIGNED_SHORT,this.glFormats[4]=e.FLOAT,this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var l=e.getSupportedExtensions();t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE));var u="WEBGL_compressed_texture_",c="WEBKIT_"+u;this.compression.ETC1=e.getExtension(u+"etc1")||e.getExtension(c+"etc1"),this.compression.PVRTC=e.getExtension(u+"pvrtc")||e.getExtension(c+"pvrtc"),this.compression.S3TC=e.getExtension(u+"s3tc")||e.getExtension(c+"s3tc"),this.supportedExtensions=l,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(s.redGL,s.greenGL,s.blueGL,s.alphaGL),this.mipmapFilter=e[t.mipmapFilter];for(var f=0;f0&&n>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==n}a&&(this.flush(),r.scissor(t,s-e-n,i,n))},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},setPipeline:function(t,e){return this.currentPipeline===t&&this.currentPipeline.vertexBuffer===this.currentVertexBuffer&&this.currentPipeline.program===this.currentProgram||(this.flush(),this.currentPipeline=t,this.currentPipeline.bind()),this.currentPipeline.onBind(e),this.currentPipeline},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},rebindPipeline:function(t){var e=this.gl;e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),this.hasActiveStencilMask()?e.clear(e.DEPTH_BUFFER_BIT):(e.disable(e.STENCIL_TEST),e.clear(e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT)),e.viewport(0,0,this.width,this.height),this.setBlendMode(0,!0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.blankTexture.glTexture),this.currentActiveTextureUnit=0,this.currentTextures[0]=this.blankTexture.glTexture,this.currentPipeline=t,this.currentPipeline.bind(),this.currentPipeline.onBind()},clearPipeline:function(){this.flush(),this.currentPipeline=null,this.currentProgram=null,this.currentVertexBuffer=null,this.currentIndexBuffer=null,this.setBlendMode(0,!0)},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(n.equation),n.func.length>2?i.blendFuncSeparate(n.func[0],n.func[1],n.func[2],n.func[3]):i.blendFunc(n.func[0],n.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},setBlankTexture:function(t){void 0===t&&(t=!1),!t&&0===this.currentActiveTextureUnit&&this.currentTextures[0]||this.setTexture2D(this.blankTexture.glTexture,0)},setTexture2D:function(t,e,i){void 0===i&&(i=!0);var n=this.gl;return t!==this.currentTextures[e]&&(i&&this.flush(),this.currentActiveTextureUnit!==e&&(n.activeTexture(n.TEXTURE0+e),this.currentActiveTextureUnit=e),n.bindTexture(n.TEXTURE_2D,t),this.currentTextures[e]=t),this},setFramebuffer:function(t,e){void 0===e&&(e=!1);var i=this.gl,n=this.width,s=this.height;return t!==this.currentFramebuffer&&(t&&t.renderTexture?(n=t.renderTexture.width,s=t.renderTexture.height):this.flush(),i.bindFramebuffer(i.FRAMEBUFFER,t),i.viewport(0,0,n,s),e&&(t?(this.drawingBufferHeight=s,this.pushScissor(0,0,n,s)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t),this},setProgram:function(t){var e=this.gl;return t!==this.currentProgram&&(this.flush(),e.useProgram(t),this.currentProgram=t),this},setVertexBuffer:function(t){var e=this.gl;return t!==this.currentVertexBuffer&&(this.flush(),e.bindBuffer(e.ARRAY_BUFFER,t),this.currentVertexBuffer=t),this},setIndexBuffer:function(t){var e=this.gl;return t!==this.currentIndexBuffer&&(this.flush(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.currentIndexBuffer=t),this},createTextureFromSource:function(t,e,i,n){var s=this.gl,r=s.NEAREST,a=s.NEAREST,l=s.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var u=h(e,i);return u&&(l=s.REPEAT),n===o.ScaleModes.LINEAR&&this.config.antialias&&(r=u?this.mipmapFilter:s.LINEAR,a=s.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,r,a,l,l,s.RGBA,t):this.createTexture2D(0,r,a,l,l,s.RGBA,null,e,i)},createTexture2D:function(t,e,i,n,s,r,o,a,l,u,c,d){u=void 0===u||null===u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();return this.setTexture2D(p,0),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,s),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,n),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,d),null===o||void 0===o?f.texImage2D(f.TEXTURE_2D,t,r,a,l,0,r,f.UNSIGNED_BYTE,null):(c||(a=o.width,l=o.height),f.texImage2D(f.TEXTURE_2D,t,r,r,f.UNSIGNED_BYTE,o)),h(a,l)&&f.generateMipmap(f.TEXTURE_2D),this.setTexture2D(null,0),p.isAlphaPremultiplied=u,p.isRenderTexture=!1,p.width=a,p.height=l,this.nativeTextures.push(p),p},createFramebuffer:function(t,e,i,n){var s,r=this.gl,o=r.createFramebuffer();if(this.setFramebuffer(o),n){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}if(i.isRenderTexture=!0,i.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0),(s=r.checkFramebufferStatus(r.FRAMEBUFFER))!==r.FRAMEBUFFER_COMPLETE){throw new Error("Framebuffer incomplete. Framebuffer status: "+{36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"}[s])}return o.renderTexture=i,this.setFramebuffer(null),o},createProgram:function(t,e){var i=this.gl,n=i.createProgram(),s=i.createShader(i.VERTEX_SHADER),r=i.createShader(i.FRAGMENT_SHADER);if(i.shaderSource(s,t),i.shaderSource(r,e),i.compileShader(s),i.compileShader(r),!i.getShaderParameter(s,i.COMPILE_STATUS))throw new Error("Failed to compile Vertex Shader:\n"+i.getShaderInfoLog(s));if(!i.getShaderParameter(r,i.COMPILE_STATUS))throw new Error("Failed to compile Fragment Shader:\n"+i.getShaderInfoLog(r));if(i.attachShader(n,s),i.attachShader(n,r),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS))throw new Error("Failed to link program:\n"+i.getProgramInfoLog(n));return n},createVertexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setVertexBuffer(n),i.bufferData(i.ARRAY_BUFFER,t,e),this.setVertexBuffer(null),n},createIndexBuffer:function(t,e){var i=this.gl,n=i.createBuffer();return this.setIndexBuffer(n),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t,e),this.setIndexBuffer(null),n},deleteTexture:function(t){var e=this.nativeTextures.indexOf(t);return-1!==e&&c(this.nativeTextures,e),this.gl.deleteTexture(t),this.currentTextures[0]!==t||this.game.pendingDestroy||this.setBlankTexture(!0),this},deleteFramebuffer:function(t){return this.gl.deleteFramebuffer(t),this},deleteProgram:function(t){return this.gl.deleteProgram(t),this},deleteBuffer:function(t){return this.gl.deleteBuffer(t),this},preRenderCamera:function(t){var e=t._cx,i=t._cy,n=t._cw,r=t._ch,o=this.pipelines.TextureTintPipeline,a=t.backgroundColor;if(t.renderToTexture){this.flush(),this.pushScissor(e,i,n,-r),this.setFramebuffer(t.framebuffer);var h=this.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT),o.projOrtho(e,n+e,i,r+i,-1e3,1e3),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n+e,r+i,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL),t.emit(s.PRE_RENDER,t)}else this.pushScissor(e,i,n,r),t.mask&&(this.currentCameraMask.mask=t.mask,this.currentCameraMask.camera=t._maskCamera,t.mask.preRenderWebGL(this,t,t._maskCamera)),a.alphaGL>0&&o.drawFillRect(e,i,n,r,p.getTintFromFloats(a.redGL,a.greenGL,a.blueGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=this.pipelines.TextureTintPipeline;if(t.flashEffect.postRenderWebGL(e,p.getTintFromFloats),t.fadeEffect.postRenderWebGL(e,p.getTintFromFloats),t.dirty=!1,this.popScissor(),t.renderToTexture){e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),e.projOrtho(0,e.width,e.height,0,-1e3,1e3);var i=p.getTintAppendFloatAlpha;(t.pipeline?t.pipeline:e).batchTexture(t,t.glTexture,t.width,t.height,t.x,t.y,t.width,t.height,t.zoom,t.zoom,t.rotation,t.flipX,!t.flipY,1,1,0,0,0,0,t.width,t.height,i(t._tintTL,t._alphaTL),i(t._tintTR,t._alphaTR),i(t._tintBL,t._alphaBL),i(t._tintBR,t._alphaBR),t._isTinted&&t.tintFill,0,0,this.defaultCamera,null),this.setBlankTexture(!0)}t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera))},preRender:function(){if(!this.contextLost){var t=this.gl,e=this.pipelines;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var i=this.config.backgroundColor;t.clearColor(i.redGL,i.greenGL,i.blueGL,i.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}for(var n in t.enable(t.SCISSOR_TEST),e)e[n].onPreRender();this.currentScissor=[0,0,this.width,this.height],this.scissorStack=[this.currentScissor],this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.setPipeline(this.pipelines.TextureTintPipeline)}},render:function(t,e,i,n){if(!this.contextLost){var s=e.list,r=s.length,a=this.pipelines;for(var h in a)a[h].onRender(t,n);if(this.preRenderCamera(n),0===r)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(n);this.currentType="";for(var l=this.currentMask,u=0;u0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=this.gl,s=n.NEAREST,r=n.NEAREST,o=t.videoWidth,a=t.videoHeight,l=n.CLAMP_TO_EDGE,u=h(o,a);return!e&&u&&(l=n.REPEAT),this.config.antialias&&(s=u?this.mipmapFilter:n.LINEAR,r=n.LINEAR),this.createTexture2D(0,s,r,l,l,n.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var n=this.gl,s=t.videoWidth,r=t.videoHeight;return s>0&&r>0&&(this.setTexture2D(e,0),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.width=s,e.height=r,this.setTexture2D(null,0)),e},setTextureFilter:function(t,e){var i=this.gl,n=[i.LINEAR,i.NEAREST][e];return this.setTexture2D(t,0),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n),this.setTexture2D(null,0),this},setFloat1:function(t,e,i){return this.setProgram(t),this.gl.uniform1f(this.gl.getUniformLocation(t,e),i),this},setFloat2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2f(this.gl.getUniformLocation(t,e),i,n),this},setFloat3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3f(this.gl.getUniformLocation(t,e),i,n,s),this},setFloat4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4f(this.gl.getUniformLocation(t,e),i,n,s,r),this},setFloat1v:function(t,e,i){return this.setProgram(t),this.gl.uniform1fv(this.gl.getUniformLocation(t,e),i),this},setFloat2v:function(t,e,i){return this.setProgram(t),this.gl.uniform2fv(this.gl.getUniformLocation(t,e),i),this},setFloat3v:function(t,e,i){return this.setProgram(t),this.gl.uniform3fv(this.gl.getUniformLocation(t,e),i),this},setFloat4v:function(t,e,i){return this.setProgram(t),this.gl.uniform4fv(this.gl.getUniformLocation(t,e),i),this},setInt1:function(t,e,i){return this.setProgram(t),this.gl.uniform1i(this.gl.getUniformLocation(t,e),i),this},setInt2:function(t,e,i,n){return this.setProgram(t),this.gl.uniform2i(this.gl.getUniformLocation(t,e),i,n),this},setInt3:function(t,e,i,n,s){return this.setProgram(t),this.gl.uniform3i(this.gl.getUniformLocation(t,e),i,n,s),this},setInt4:function(t,e,i,n,s,r){return this.setProgram(t),this.gl.uniform4i(this.gl.getUniformLocation(t,e),i,n,s,r),this},setMatrix2:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix2fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix3:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix3fv(this.gl.getUniformLocation(t,e),i,n),this},setMatrix4:function(t,e,i,n){return this.setProgram(t),this.gl.uniformMatrix4fv(this.gl.getUniformLocation(t,e),i,n),this},getMaxTextures:function(){return this.config.maxTextures},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){for(var t=0;t0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,n=Math.cos(i),s=Math.sin(i);e[1]=s,e[3]=-s,e[0]=e[4]=n}else e[0]=e[4]=1,e[1]=e[3]=0;this.renderer.setMatrix3(this.program,"uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},batchSprite:function(t,e,i){if(this.active){var n=t.texture.dataSource[t.frame.sourceIndex];n&&(this.renderer.setPipeline(this),this.setTexture2D(n.glTexture,1),this.setNormalMapRotation(t.rotation),r.prototype.batchSprite.call(this,t,e,i))}}});a.LIGHT_COUNT=o,t.exports=a},function(t,e){var i={modelMatrixDirty:!1,viewMatrixDirty:!1,projectionMatrixDirty:!1,modelMatrix:null,viewMatrix:null,projectionMatrix:null,mvpInit:function(){return this.modelMatrixDirty=!0,this.viewMatrixDirty=!0,this.projectionMatrixDirty=!0,this.modelMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},mvpUpdate:function(){var t=this.program;return this.modelMatrixDirty&&(this.renderer.setMatrix4(t,"uModelMatrix",!1,this.modelMatrix),this.modelMatrixDirty=!1),this.viewMatrixDirty&&(this.renderer.setMatrix4(t,"uViewMatrix",!1,this.viewMatrix),this.viewMatrixDirty=!1),this.projectionMatrixDirty&&(this.renderer.setMatrix4(t,"uProjectionMatrix",!1,this.projectionMatrix),this.projectionMatrixDirty=!1),this},modelIdentity:function(){var t=this.modelMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.modelMatrixDirty=!0,this},modelScale:function(t,e,i){var n=this.modelMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.modelMatrixDirty=!0,this},modelTranslate:function(t,e,i){var n=this.modelMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.modelMatrixDirty=!0,this},modelRotateX:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.modelMatrixDirty=!0,this},modelRotateY:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.modelMatrixDirty=!0,this},modelRotateZ:function(t){var e=this.modelMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.modelMatrixDirty=!0,this},viewIdentity:function(){var t=this.viewMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.viewMatrixDirty=!0,this},viewScale:function(t,e,i){var n=this.viewMatrix;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this.viewMatrixDirty=!0,this},viewTranslate:function(t,e,i){var n=this.viewMatrix;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this.viewMatrixDirty=!0,this},viewRotateX:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this.viewMatrixDirty=!0,this},viewRotateY:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this.viewMatrixDirty=!0,this},viewRotateZ:function(t){var e=this.viewMatrix,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this.viewMatrixDirty=!0,this},viewLoad2D:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=0,e[4]=t[2],e[5]=t[3],e[6]=0,e[7]=0,e[8]=t[4],e[9]=t[5],e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this.viewMatrixDirty=!0,this},viewLoad:function(t){var e=this.viewMatrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this.viewMatrixDirty=!0,this},projIdentity:function(){var t=this.projectionMatrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this.projectionMatrixDirty=!0,this},projOrtho:function(t,e,i,n,s,r){var o=this.projectionMatrix,a=1/(t-e),h=1/(i-n),l=1/(s-r);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(r+s)*l,o[15]=1,this.projectionMatrixDirty=!0,this},projPersp:function(t,e,i,n){var s=this.projectionMatrix,r=1/Math.tan(t/2),o=1/(i-n);return s[0]=r/e,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+i)*o,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*i*o,s[15]=0,this.projectionMatrixDirty=!0,this}};t.exports=i},function(t,e,i){t.exports={Bounce:i(1403),Collision:i(1404),Force:i(1405),Friction:i(1406),Gravity:i(1407),Mass:i(1408),Static:i(1409),Sensor:i(1410),SetBody:i(1411),Sleep:i(1412),Transform:i(1425),Velocity:i(1426)}},function(t,e){var i={};t.exports=i,i.create=function(t,e){var n=t.bodyA,s=t.bodyB,r={id:i.id(n,s),bodyA:n,bodyB:s,activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,collision:null,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return i.update(r,t,e),r},i.update=function(t,e,n){if(t.collision=e,e.collided){var s=e.supports,r=t.activeContacts,o=e.parentA,a=e.parentB;t.inverseMass=o.inverseMass+a.inverseMass,t.friction=Math.min(o.friction,a.friction),t.frictionStatic=Math.max(o.frictionStatic,a.frictionStatic),t.restitution=Math.max(o.restitution,a.restitution),t.slop=Math.max(o.slop,a.slop);for(var h=0;h>>0;if("function"!=typeof t)throw new TypeError;for(var n=arguments.length>=2?arguments[1]:void 0,s=0;s>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,n=t,s=t),this._tintTL=i(t),this._tintTR=i(e),this._tintBL=i(n),this._tintBR=i(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=i(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=i(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=i(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=i(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e){t.exports="destroy"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"alpha",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"x",e,i,s,r)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r,o,a){return void 0!==i&&null!==i||(i=e),n(t,"x",e,s,o,a),n(t,"y",i,r,o,a)}},function(t,e,i){var n=i(34);t.exports=function(t,e,i,s,r){return n(t,"y",e,i,s,r)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=6.28);for(var s=i,r=(n-i)/t.length,o=0;o0?s(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a1)if(0===s){var d=t.length-1;for(o=t[d].x,a=t[d].y,h=d-1;h>=0;h--)l=(c=t[h]).x,u=c.y,c.x=o,c.y=a,o=l,a=u;t[d].x=e,t[d].y=i}else{for(o=t[0].x,a=t[0].y,h=1;h0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoom<.001&&(e.zoom=.001))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},function(t,e,i){t.exports={Camera:i(276),BaseCamera:i(91),CameraManager:i(674),Effects:i(284),Events:i(48)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed=1?1:1/e*(1+(e*t|0))}},function(t,e,i){var n=i(23),s=i(0),r=i(48),o=i(3),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===n&&(n=null),void 0===s&&(s=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=n,this._onUpdateScope=s,this.camera.emit(r.SHAKE_START,this.camera,this,t,e),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed0&&(o.preRender(1),t.render(n,e,i,o))}},resetAll:function(){for(var t=0;t1)for(var i=1;i=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll"),s)},function(t,e,i){var n=i(115),s={audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e&&(t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"")&&(s.ogg=!0),(t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")||t.canPlayType("audio/opus;").replace(/^no$/,""))&&(s.opus=!0),t.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.mp3=!0),t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"")&&(s.wav=!0),(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;").replace(/^no$/,""))&&(s.m4a=!0),t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")&&(s.webm=!0),""!==t.canPlayType('audio/mp4;codecs="ec-3"')))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),r=parseInt(RegExp.$2,10);(10===i&&r>=11||i>10)&&(s.dolby=!0)}}catch(t){}return s}()},function(t,e){var i={h264:!1,hls:!1,mp4:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){var t=document.createElement("video"),e=!!t.canPlayType;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;tMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(301);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e?t:(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e,i){var n=i(155);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(310),IsSize:i(116),IsValue:i(726)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(311),Floor:i(93),To:i(728)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],o=0;o0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t,s.set(r,o)),s}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=i(171),s=i(318),r=i(319),o=new s,a=new r,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="addtexture"},function(t,e){t.exports="onerror"},function(t,e){t.exports="onload"},function(t,e){t.exports="ready"},function(t,e){t.exports="removetexture"},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," float alpha = mainColor.a;",""," if (!uInvertMaskAlpha)"," {"," alpha *= (maskColor.a);"," }"," else"," {"," alpha *= (1.0 - maskColor.a);"," }",""," gl_FragColor = vec4(mainColor.rgb * alpha, alpha);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","","varying vec2 outTexCoord;","varying vec4 outTint;","","void main()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 color = texture2D(uMainSampler, outTexCoord) * vec4(outTint.rgb * outTint.a, outTint.a);"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);"," vec4 color = texture;",""," if (outTintEffect == 0.0)"," {"," // Multiply texture tint"," color = texture * texel;"," }"," else if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);"," color.a = texture.a * texel.a;"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},function(t,e){t.exports=["#define SHADER_NAME PHASER_TEXTURE_TINT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform mat4 uModelMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}","",""].join("\n")},function(t,e,i){t.exports={GenerateTexture:i(326),Palettes:i(759)}},function(t,e,i){t.exports={ARNE16:i(327),C64:i(760),CGA:i(761),JMP:i(762),MSX:i(763)}},function(t,e){t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},function(t,e){t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},function(t,e){t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},function(t,e,i){t.exports={Path:i(765),CubicBezier:i(328),Curve:i(80),Ellipse:i(329),Line:i(330),QuadraticBezier:i(331),Spline:i(332)}},function(t,e,i){var n=i(0),s=i(328),r=i(329),o=i(5),a=i(330),h=i(766),l=i(331),u=i(11),c=i(332),d=i(3),f=i(13),p=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,n,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,n),h=new d(r,o),l=new d(t,e)),this.add(new s(u,a,h,l))},quadraticBezierTo:function(t,e,i,n){var s,r,o=this.getEndPoint();return t instanceof d?(s=t,r=e):(s=new d(i,n),r=new d(t,e)),this.add(new l(o,s,r))},draw:function(t,e){for(var i=0;i0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),n=this.getCurveLengths(),s=0;s=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},function(t,e,i){var n=i(33),s=i(336);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=s(l,h,t+1/3),o=s(l,h,t),a=s(l,h,t-1/3)}return(new n).setGLTo(r,o,a,1)}},function(t,e,i){var n=i(161);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},function(t,e,i){var n=i(113),s=function(t,e,i,s,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:n(t,s,l),g:n(e,r,l),b:n(i,o,l)}};t.exports={RGBWithRGB:s,ColorWithRGB:function(t,e,i,n,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),s(t.r,t.g,t.b,e,i,n,r,o)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),s(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(169),s=i(33);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var n=i(335);t.exports=function(t,e,i,s,r){return void 0===s&&(s=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+n(s)+n(t)+n(e)+n(i)}},function(t,e,i){t.exports={BitmapMask:i(261),GeometryMask:i(262)}},function(t,e,i){var n={AddToDOM:i(118),DOMContentLoaded:i(337),GetScreenOrientation:i(338),GetTarget:i(343),ParseXML:i(344),RemoveFromDOM:i(175),RequestAnimationFrame:i(324)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(800)}},function(t,e,i){var n=i(0),s=i(9),r=i(21),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(118),s=i(272),r=i(275),o=i(26),a=i(0),h=i(297),l=i(802),u=i(320),c=i(111),d=i(322),f=i(298),p=i(337),g=i(9),v=i(18),m=i(345),y=i(21),x=i(350),T=i(351),w=i(353),b=i(117),E=i(356),S=i(323),A=i(325),_=i(360),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new s(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.events.emit(v.DESTROY),this.events.removeAllListeners(),this.scene.destroy(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},function(t,e,i){var n=i(118);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,n(i,e.parent)}}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var n=i(2),s=i(178);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=n(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(s(e+"Physics")),i)for(var o in i)o=s(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s,r=i.getElementsByTagName("SubTexture"),o=0;og||c<-g)&&(c=0),c<0&&(c=g+c),-1!==d&&(g=c+(d+1));for(var v=f,m=f,y=0,x=0,T=0;Tr&&(y=w-r),b>o&&(x=b-o),t.add(T,e,i+v,s+m,h-y,l-x),(v+=h+p)+h>r&&(v=f,m+=l+p)}return t}},function(t,e,i){var n=i(2);t.exports=function(t,e,i){var s=n(i,"frameWidth",null),r=n(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=n(i,"startFrame",0),l=n(i,"endFrame",-1),u=n(i,"margin",0),c=n(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,g=e.cutHeight,v=e.realWidth,m=e.realHeight,y=Math.floor((v-u+c)/(s+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=s-w,E=s-(v-p-w),S=e.y,A=r-S,_=r-(m-g-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,P=0,O=e.sourceIndex,R=0;R0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a0){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;n>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&it.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var o=i-e,a=t.splice(e,o);if(s)for(var h=0;h0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var n=i(68);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var o=s;o0&&i.maxWidth!==l){for(n=0;nl||U-N>l?(Y.push(X.i-1),X.cr?(Y.push(X.i+X.word.length),N=0,B=null):B=X):X.cr&&(Y.push(X.i+X.word.length),N=0,B=null)}for(n=Y.length-1;n>=0;n--)s=a,r=Y[n],o="\n",a=s.substr(0,r)+o+s.substr(r+1);i.maxWidth=l,i.wrappedText=a,h=a.length,k=[],F=null}for(n=0;nb&&(c=b),d>E&&(d=E);var W=b+w.xAdvance,V=E+v;fR&&(R=D),DR&&(R=D),D0&&(a=(o=z.wrappedText).length);var U=e._bounds.lines;1===N?X=(U.longest-U.lengths[0])/2:2===N&&(X=U.longest-U.lengths[0]);for(var G=s.roundPixels,W=0;W0&&(a=(o=L.wrappedText).length);var D=e._bounds.lines;1===P?R=(D.longest-D.lengths[0])/2:2===P&&(R=D.longest-D.lengths[0]),h.translate(-e.displayOriginX,-e.displayOriginY);for(var k=s.roundPixels,F=0;F0!=t>0,this._alpha=t}}});t.exports=r},function(t,e,i){var n=i(1),s=i(1);n=i(937),s=i(938),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){var r=e.list;if(0!==r.length){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alphaTopLeft,l=e.alphaTopRight,u=e.alphaBottomLeft,c=e.alphaBottomRight,d=e.scrollFactorX,f=e.scrollFactorY,p=r,g=r.length,v=0;v0||e.cropHeight>0;l&&(h.flush(),t.pushScissor(e.x,e.y,e.cropWidth*e.scaleX,e.cropHeight*e.scaleY));var u=h._tempMatrix1,c=h._tempMatrix2,d=h._tempMatrix3,f=h._tempMatrix4;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(s.matrix),r?(u.multiplyWithOffset(r,-s.scrollX*e.scrollFactorX,-s.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d)):(c.e-=s.scrollX*e.scrollFactorX,c.f-=s.scrollY*e.scrollFactorY,u.multiply(c,d));var p=e.frame,g=p.glTexture,v=p.cutX,m=p.cutY,y=g.width,x=g.height,T=e._isTinted&&e.tintFill,w=n.getTintAppendFloatAlpha(e._tintTL,s.alpha*e._alphaTL),b=n.getTintAppendFloatAlpha(e._tintTR,s.alpha*e._alphaTR),E=n.getTintAppendFloatAlpha(e._tintBL,s.alpha*e._alphaBL),S=n.getTintAppendFloatAlpha(e._tintBR,s.alpha*e._alphaBR);h.setTexture2D(g,0);var A,_,C=0,M=0,P=0,O=0,R=e.letterSpacing,L=0,D=0,k=0,F=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,z=e.fontSize/N.size,U=0,G=e._align,W=0,V=0;e.getTextBounds(!1);var H=e._bounds.lines;1===G?V=(H.longest-H.lengths[0])/2:2===G&&(V=H.longest-H.lengths[0]);for(var j=s.roundPixels,q=e.displayCallback,K=e.callbackData,J=0;J0&&e.cropHeight>0&&(h.beginPath(),h.rect(0,0,e.cropWidth,e.cropHeight),h.clip());for(var N=0;N0&&(Y=Y%b-b):Y>b?Y=b:Y<0&&(Y=b+Y%b),null===_&&(_=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(_),k+=.01);k<1+z;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v));break;case n.FILL_RECT:u.setTexture2D(M),u.batchFillRect(p[++P],p[++P],p[++P],p[++P],f,c);break;case n.FILL_TRIANGLE:u.setTexture2D(M),u.batchFillTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],f,c);break;case n.STROKE_TRIANGLE:u.setTexture2D(M),u.batchStrokeTriangle(p[++P],p[++P],p[++P],p[++P],p[++P],p[++P],v,f,c);break;case n.LINE_TO:null!==_?_.points.push(new r(p[++P],p[++P],v)):(_=new o(p[++P],p[++P],v),E.push(_));break;case n.MOVE_TO:_=new o(p[++P],p[++P],v),E.push(_);break;case n.SAVE:a.push(f.copyToArray());break;case n.RESTORE:f.copyFromArray(a.pop());break;case n.TRANSLATE:F=p[++P],I=p[++P],f.translate(F,I);break;case n.SCALE:F=p[++P],I=p[++P],f.scale(F,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var U=p[++P],G=p[++P];u.currentFrame=U,u.setTexture2D(U.glTexture,0),u.tintEffect=G,M=U.glTexture;break;case n.CLEAR_TEXTURE:u.currentFrame=t.blankTexture,u.tintEffect=2,M=t.blankTexture.glTexture}}}},function(t,e,i){var n=i(1),s=i(1);n=i(950),s=i(951),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(1),s=i(1);n=i(953),s=i(954),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n,s){this.pipeline.batchSprite(e,n,s)}},function(t,e){t.exports=function(t,e,i,n,s){t.batchSprite(e,e.frame,n,s)}},function(t,e,i){t.exports={GravityWell:i(380),Particle:i(381),ParticleEmitter:i(382),ParticleEmitterManager:i(191),Zones:i(960)}},function(t,e,i){var n=i(0),s=i(312),r=i(82),o=i(2),a=i(57),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=n,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&(this.has(t,"random")||this.hasBoth(t,"start","end")||this.hasBoth(t,"min","max"))){this.start=this.has(t,"start")?t.start:t.min,this.end=this.has(t,"end")?t.end:t.max;var i=this.hasBoth(t,"min","max")||!!t.random;if(i){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}if(this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,n){return n},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(1),s=i(1);n=i(958),s=i(959),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){var o=e.emitters.list,a=o.length;if(0!==a){var h=this.pipeline,l=h._tempMatrix1.copyFrom(s.matrix),u=h._tempMatrix2,c=h._tempMatrix3,d=h._tempMatrix4.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);l.multiply(d),t.setPipeline(h);var f=s.roundPixels,p=e.defaultFrame.glTexture,g=n.getTintAppendFloatAlphaAndSwap;h.setTexture2D(p,0);for(var v=0;v?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},function(t,e,i){var n=i(6);t.exports=function(t,e){var i=e.width,s=e.height,r=Math.floor(i/2),o=Math.floor(s/2),a=n(e,"chars","");if(""!==a){var h=n(e,"image",""),l=n(e,"offset.x",0),u=n(e,"offset.y",0),c=n(e,"spacing.x",0),d=n(e,"spacing.y",0),f=n(e,"lineSpacing",0),p=n(e,"charsPerRow",null);null===p&&(p=t.sys.textures.getFrame(h).width/i)>a.length&&(p=a.length);for(var g=l,v=u,m={retroFont:!0,font:h,size:i,lineHeight:s+f,chars:{}},y=0,x=0;x0&&r.maxLines1&&(d+=f*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:f,lineHeight:c}}},function(t,e,i){var n=i(1),s=i(1);n=i(969),s=i(970),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,s,r){if(0!==e.width&&0!==e.height){var o=e.frame,a=o.width,h=o.height,l=n.getTintAppendFloatAlpha;this.pipeline.batchTexture(e,o.glTexture,a,h,e.x,e.y,a/e.style.resolution,h/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,a,h,l(e._tintTL,s.alpha*e._alphaTL),l(e._tintTR,s.alpha*e._alphaTR),l(e._tintBL,s.alpha*e._alphaBL),l(e._tintBR,s.alpha*e._alphaBR),e._isTinted&&e.tintFill,0,0,s,r)}}},function(t,e){t.exports=function(t,e,i,n,s){0!==e.width&&0!==e.height&&t.batchSprite(e,e.frame,n,s)}},function(t,e,i){var n=i(0),s=i(15),r=i(6),o=i(972),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new n({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this._font,this.setStyle(e,!1,!0);var i=r(e,"metrics",!1);this.metrics=i?{ascent:r(i,"ascent",0),descent:r(i,"descent",0),fontSize:r(i,"fontSize",0)}:o(this)},setStyle:function(t,e,i){for(var n in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var o=i?a[n][1]:this[n];this[n]="wordWrapCallback"===n||"wordWrapCallbackScope"===n?r(t,a[n][0],o):s(t,a[n][0],o)}var h=r(t,"font",null);null!==h&&this.setFont(h,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var l=r(t,"fill",null);return null!==l&&(this.color=l),e?this.update(!0):this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,n="",s="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),n=r(t,"fontSize","16px"),s=r(t,"fontStyle","");else{var o=t.split(" "),a=0;s=o.length>2?o[a++]:"",n=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&n===this.fontSize&&s===this.fontStyle||(this.fontFamily=i,this.fontSize=n,this.fontStyle=s,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,n,s,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===n&&(n=0),void 0===s&&(s=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=n,this.shadowStroke=s,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},function(t,e,i){var n=i(26);t.exports=function(t){var e=n.create(this),i=e.getContext("2d");t.syncFont(e,i);var s=Math.ceil(i.measureText(t.testString).width*t.baselineX),r=s,o=2*r;r=r*t.baselineY|0,e.width=s,e.height=o,i.fillStyle="#f00",i.fillRect(0,0,s,o),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,r);var a={ascent:0,descent:0,fontSize:0};if(!i.getImageData(0,0,s,o))return a.ascent=r,a.descent=r+6,a.fontSize=a.ascent+a.descent,n.remove(e),a;var h,l,u=i.getImageData(0,0,s,o).data,c=u.length,d=4*s,f=0,p=!1;for(h=0;hr;h--){for(l=0;l0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.fillColor,e.fillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0)for(u=o.fillTint,c=n.getTintAppendFloatAlphaAndSwap(e.altFillColor,e.altFillAlpha*d),u.TL=c,u.TR=c,u.BL=c,u.BR=c,C=0;C0){var R=o.strokeTint,L=n.getTintAppendFloatAlphaAndSwap(e.outlineFillColor,e.outlineFillAlpha*d);for(R.TL=L,R.TR=L,R.BL=L,R.BR=L,_=1;_0)for(n(h,e),_=0;_0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),_=0;_0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),A=1;Ao.vertexCapacity&&o.flush(),o.setTexture2D(u,0);for(var m=o.vertexViewF32,y=o.vertexViewU32,x=o.vertexCount*o.vertexComponentCount-1,T=0,w=e.tintFill,b=0;b0?Math.PI*t.radius*t.radius:0}},function(t,e,i){var n=i(65);t.exports=function(t){return new n(t.x,t.y,t.radius)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(54);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(95);n.Area=i(1078),n.Circumference=i(378),n.CircumferencePoint=i(190),n.Clone=i(1079),n.Contains=i(96),n.ContainsPoint=i(1080),n.ContainsRect=i(1081),n.CopyFrom=i(1082),n.Equals=i(1083),n.GetBounds=i(1084),n.GetPoint=i(376),n.GetPoints=i(377),n.Offset=i(1085),n.OffsetPoint=i(1086),n.Random=i(152),t.exports=n},function(t,e){t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},function(t,e,i){var n=i(95);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(96);t.exports=function(t,e){return n(t,e.x,e.y)&&n(t,e.right,e.y)&&n(t,e.x,e.bottom)&&n(t,e.right,e.bottom)}},function(t,e){t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},function(t,e){t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},function(t,e,i){var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},function(t,e){t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},function(t,e){t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},function(t,e,i){var n=i(4),s=i(201);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0==(a=(o=-2*f)*o-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new n(h,-o/(2*r))):a>0&&(i.push(new n(h,(-o+Math.sqrt(a))/(2*r))),i.push(new n(h,(-o-Math.sqrt(a))/(2*r))));else{var g=(l-d)/(u-f),v=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0==(a=(o=2*u*g-2*v*g-2*l)*o-4*(r=g*g+1)*(l*l+u*u+v*v-c*c-2*u*v))?(h=-o/(2*r),i.push(new n(h,v-h*g))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)),h=(-o-Math.sqrt(a))/(2*r),i.push(new n(h,v-h*g)))}}return i}},function(t,e,i){var n=i(203),s=i(202);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();n(r,t,i),n(o,t,i),n(a,t,i),n(h,t,i)}return i}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},function(t,e,i){var n=i(205),s=i(129);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();n(r,e,i),n(o,e,i),n(a,e,i),n(h,e,i)}return i}},function(t,e,i){var n=i(411),s=i(205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(r,t,i),s(o,t,i),s(a,t,i)}return i}},function(t,e,i){var n=i(203),s=i(413);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();n(r,e,i),n(o,e,i),n(a,e,i)}return i}},function(t,e,i){var n=i(416),s=i(414);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();s(t,r,i),s(t,o,i),s(t,a,i)}return i}},function(t,e,i){var n=i(418);t.exports=function(t,e){if(!n(t,e))return!1;var i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=s&&t.y>=r&&t.y<=o}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||si&&(i=h.x),h.xr&&(r=h.y),h.yn(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var n=i(163);t.exports=function(t,e,i){var s=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),n(t,s,r)}},function(t,e,i){var n=i(11),s=i(129);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var n=i(4),s=i(35);t.exports=function(t,e,i){void 0===i&&(i=new n),e=s(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r)-1&&(s.splice(a,1),this.clear(o,!0))}t.length=0,this._pendingRemoval.length=0,this._list=s.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.isActive()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,n=this.manager,s=n.pointers,r=n.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,n=!1,s=0;s0&&(n=!0)}return this._updatedThisFrame=!0,n},clear:function(t,e){void 0===e&&(e=!1);var i=t.input;if(i){e||this.queueForRemoval(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,this.manager.resetCursor(i),t.input=null;var n=this._draggable.indexOf(t);return n>-1&&this._draggable.splice(n,1),(n=this._drag[0].indexOf(t))>-1&&this._drag[0].splice(n,1),(n=this._over[0].indexOf(t))>-1&&this._over[0].splice(n,1),t}},disable:function(t){t.input.enabled=!1},enable:function(t,e,i,n){return void 0===n&&(n=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&n&&!t.input.dropZone&&(t.input.dropZone=n),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=n,s}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,n=this._eventData,s=this._eventContainer;n.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=s?i=!0:n>0&&e>=t.downTime+n&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],n=0;n0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.x-a.dragStartXGlobal,c=t.y-a.dragStartYGlobal,f=o.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),g=c*Math.cos(f)-u*Math.sin(f);p*=1/o.parentContainer.scaleX,g*=1/o.parentContainer.scaleY,s=p+a.dragStartX,r=g+a.dragStartY}else s=t.x-a.dragX,r=t.y-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,s,r),this.emit(d.DRAG,t,o,s,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var s=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e);for(var h=0;h0){for(this.sortGameObjects(s),e=0;e0){for(this.sortGameObjects(r),e=0;e-1&&this._draggable.splice(s,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var n=!1,s=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),n=p(u,"draggable",!1),s=p(u,"dropZone",!1),r=p(u,"cursor",!1),o=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d=e}}},function(t,e,i){t.exports={Events:i(131),KeyboardManager:i(346),KeyboardPlugin:i(1199),Key:i(431),KeyCodes:i(120),KeyCombo:i(432),JustDown:i(1204),JustUp:i(1205),DownDuration:i(1206),UpDuration:i(1207)}},function(t,e){t.exports="keydown"},function(t,e){t.exports="keyup"},function(t,e){t.exports="keycombomatch"},function(t,e){t.exports="down"},function(t,e){t.exports="keydown-"},function(t,e){t.exports="keyup-"},function(t,e){t.exports="up"},function(t,e,i){var n=i(0),s=i(9),r=i(131),o=i(18),a=i(6),h=i(53),l=i(130),u=i(431),c=i(120),d=i(432),f=i(1203),p=i(93),g=new n({Extends:s,initialize:function(t){s.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.useQueue?this.sceneInputPlugin.pluginEvents.on(h.UPDATE,this.update,this):this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var n={};if("string"==typeof t){t=t.split(",");for(var s=0;s-1?n[s]=t:n[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),n[t]||(n[t]=new u(this,t),e&&this.addCapture(t),n[t].setEmitOnRepeat(i)),n[t]},removeKey:function(t,e){void 0===e&&(e=!1);var i,n=this.keys;if(t instanceof u){var s=n.indexOf(t);s>-1&&(i=this.keys[s],this.keys[s]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(i=n[t],n[t]=void 0),i&&(i.plugin=null,e&&i.destroy()),this},createCombo:function(t,e){return new d(this,t,e)},checkDown:function(t,e){if(this.enabled&&t.isDown){var i=p(this.time-t.timeDown,e);if(i>t._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,n=0;n0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(s=!0,i=n(t,e))}else s=!0,i=n(t,e);return!s&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},function(t,e){t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},function(t,e){t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},function(t,e,i){var n=i(120),s={};for(var r in n)s[n[r]]=r;t.exports=s},function(t,e){t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},function(t,e){t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],o=this;try{var a=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=s.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});o.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r0},isLoading:function(){return this.state===s.LOADER_LOADING||this.state===s.LOADER_PROCESSING},isReady:function(){return this.state===s.LOADER_IDLE||this.state===s.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=s.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(c.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===s.LOADER_LOADING&&this.list.size>0&&this.inflight.sizei&&(n=l,i=c)}}return n},moveTo:function(t,e,i,n,s){void 0===n&&(n=60),void 0===s&&(s=0);var o=Math.atan2(i-t.y,e-t.x);return s>0&&(n=r(t.x,t.y,e,i)/(s/1e3)),t.body.velocity.setToPolar(o,n),o},moveToObject:function(t,e,i,n){return this.moveTo(t,e.x,e.y,i,n)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(s(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,n,s,r){return c(this.world,t,e,i,n,s,r)},overlapCirc:function(t,e,i,n,s){return u(this.world,t,e,i,n,s)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",v,"arcadePhysics"),t.exports=v},function(t,e){t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},function(t,e){t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},function(t,e){t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i){return this.body.setCollideWorldBounds(t,e,i),this}}},function(t,e){t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},function(t,e){t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},function(t,e){var i={enableBody:function(t,e,i,n,s){return t&&this.body.reset(e,i),n&&(this.body.gameObject.active=!0),s&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=i},function(t,e){t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},function(t,e){t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},function(t,e){var i={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=i},function(t,e){t.exports={setMass:function(t){return this.body.mass=t,this}}},function(t,e){t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},function(t,e){t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},function(t,e,i){var n=i(442),s=i(65),r=i(201),o=i(202);t.exports=function(t,e,i,a,h,l){var u=n(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new s(e,i,a),d=new s,f=[],p=0;pe.deltaAbsY()?y=-1:e.deltaAbsX()0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},function(t,e,i){var n=i(1264);t.exports=function(t,e,i,s,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:n(t,a)),a}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},function(t,e,i){var n=i(446);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.x,a=e.velocity.x;if(t.immovable||e.immovable)t.immovable?(e.x+=r,e.velocity.x=o-a*e.bounce.x,t.moves&&(e.y+=(t.y-t.prev.y)*t.friction.y)):(t.x-=r,t.velocity.x=a-o*t.bounce.x,e.moves&&(t.y+=(e.y-e.prev.y)*e.friction.y));else{r*=.5,t.x-=r,e.x+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.x=u+h*t.bounce.x,e.velocity.x=u+l*e.bounce.x}return!0}},function(t,e,i){var n=i(447);t.exports=function(t,e,i,s){var r=n(t,e,i,s);if(i||0===r||t.immovable&&e.immovable||t.customSeparateY||e.customSeparateY)return 0!==r||t.embedded&&e.embedded;var o=t.velocity.y,a=e.velocity.y;if(t.immovable||e.immovable)t.immovable?(e.y+=r,e.velocity.y=o-a*e.bounce.y,t.moves&&(e.x+=(t.x-t.prev.x)*t.friction.x)):(t.y-=r,t.velocity.y=a-o*t.bounce.y,e.moves&&(t.x+=(e.x-e.prev.x)*e.friction.x));else{r*=.5,t.y-=r,e.y+=r;var h=Math.sqrt(a*a*e.mass/t.mass)*(a>0?1:-1),l=Math.sqrt(o*o*t.mass/e.mass)*(o>0?1:-1),u=.5*(h+l);h-=u,l-=u,t.velocity.y=u+h*t.bounce.y,e.velocity.y=u+l*e.bounce.y}return!0}},function(t,e,i){t.exports={COLLIDE:i(1381),PAUSE:i(1382),RESUME:i(1383)}},function(t,e,i){t.exports={Acceleration:i(1385),BodyScale:i(1386),BodyType:i(1387),Bounce:i(1388),CheckAgainst:i(1389),Collides:i(1390),Debug:i(1391),Friction:i(1392),Gravity:i(1393),Offset:i(1394),SetGameObject:i(1395),Velocity:i(1396)}},function(t,e,i){var n={};t.exports=n;var s=i(101),r=i(37);n.fromVertices=function(t){for(var e={},i=0;i0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,s=e.y+e.height/2,r=n.rectangle(i,s,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),h(t,"isStatic")||(t.isStatic=!0),h(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),u=this.tile.getCollisionGroup(),c=a(u,"objects",[]),d=[],f=0;f1&&(t.parts=d,this.setBody(s.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(1273),r=i(494),o=i(102);n.collisions=function(t,e){for(var i=[],a=e.pairs.table,h=e.metrics,l=0;l1?1:0;d1?1:0;p0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)}},function(t,e,i){var n={};t.exports=n;var s=i(86),r=i(101);n.collides=function(t,e,i){var o,a,h,l,u=!1;if(i){var c=t.parent,d=e.parent,f=c.speed*c.speed+c.angularSpeed*c.angularSpeed+d.speed*d.speed+d.angularSpeed*d.angularSpeed;u=i&&i.collided&&f<.2,l=i}else l={collided:!1,bodyA:t,bodyB:e};if(i&&u){var p=l.axisBody,g=p===t?e:t,v=[p.axes[i.axisNumber]];if(h=n._overlapAxes(p.vertices,g.vertices,v),l.reused=!0,h.overlap<=0)return l.collided=!1,l}else{if((o=n._overlapAxes(t.vertices,e.vertices,t.axes)).overlap<=0)return l.collided=!1,l;if((a=n._overlapAxes(e.vertices,t.vertices,e.axes)).overlap<=0)return l.collided=!1,l;o.overlaps?s=a:a=0?o.index-1:u.length-1],l.x=s.x-c.x,l.y=s.y-c.y,h=-r.dot(i,l),a=s,s=u[(o.index+1)%u.length],l.x=s.x-c.x,l.y=s.y-c.y,(n=-r.dot(i,l))r?(s.warn("Plugin.register:",n.toString(e),"was upgraded to",n.toString(t)),n._registry[t.name]=t):i-1},n.isFor=function(t,e){var i=t.for&&n.dependencyParse(t.for);return!t.for||e.name===i.name&&n.versionSatisfies(e.version,i.range)},n.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=n.dependencies(t),r=s.topologicalSort(i),o=[],a=0;a0&&!h.silent&&s.info(o.join(" "))}else s.warn("Plugin.use:",n.toString(t),"does not specify any dependencies to install.")},n.dependencies=function(t,e){var i=n.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=n.resolve(t)||t,e[r]=s.map(t.uses||[],function(e){n.isPlugin(e)&&n.register(e);var r=n.dependencyParse(e),o=n.resolve(e);return o&&!n.versionSatisfies(o.version,r.range)?(s.warn("Plugin.dependencies:",n.toString(o),"does not satisfy",n.toString(r),"used by",n.toString(i)+"."),o._warned=!0,t._warned=!0):o||(s.warn("Plugin.dependencies:",n.toString(e),"used by",n.toString(i),"could not be resolved."),t._warned=!0),r.name});for(var o=0;o=s[2];if("^"===i.operator)return s[0]>0?o[0]===s[0]&&r.number>=i.number:s[1]>0?o[1]===s[1]&&o[2]>=s[2]:o[2]===s[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(215),r=(i(236),i(37));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){t.exports={BasePlugin:i(454),DefaultPlugins:i(172),PluginCache:i(21),PluginManager:i(350),ScenePlugin:i(1278)}},function(t,e,i){var n=i(454),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=i(17),s=i(174),r={Center:i(339),Events:i(92),Orientation:i(340),ScaleManager:i(351),ScaleModes:i(341),Zoom:i(342)};r=n(!1,r=n(!1,r=n(!1,r=n(!1,r,s.CENTER),s.ORIENTATION),s.SCALE_MODE),s.ZOOM),t.exports=r},function(t,e,i){var n=i(121),s=i(17),r={Events:i(22),SceneManager:i(353),ScenePlugin:i(1281),Settings:i(355),Systems:i(177)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(23),s=i(0),r=i(22),o=i(2),a=i(21),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var s=o(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;return h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=n,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake():this.manager.start(e,o(t,"data")),this.systems.events.emit(r.TRANSITION_OUT,i,n),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=n(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,n){return this.manager.add(t,e,i,n)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var n=this.manager.getScene(e);return n&&n.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},function(t,e,i){t.exports={List:i(124),Map:i(157),ProcessQueue:i(183),RTree:i(448),Set:i(107),Size:i(352)}},function(t,e,i){var n=i(17),s=i(1284),r={CanvasTexture:i(357),Events:i(117),FilterMode:s,Frame:i(94),Parsers:i(359),Texture:i(179),TextureManager:i(356),TextureSource:i(358)};r=n(!1,r,s),t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(136),Parsers:i(1315),Formats:i(31),ImageCollection:i(465),ParseToTilemap:i(223),Tile:i(74),Tilemap:i(474),TilemapCreator:i(1324),TilemapFactory:i(1325),Tileset:i(140),LayerData:i(104),MapData:i(105),ObjectLayer:i(468),DynamicTilemapLayer:i(475),StaticTilemapLayer:i(476)}},function(t,e,i){var n=i(24),s=i(51);t.exports=function(t,e,i,r,o,a,h,l){t<0&&(t=0),e<0&&(e=0),void 0===h&&(h=!0);for(var u=n(t,e,i,r,null,l),c=o-t,d=a-e,f=0;f=0&&p=0&&g=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);else if(2===r)for(a=x;a>=y;a--)for(o=v;c[a]&&o=y;a--)for(o=m;c[a]&&o>=v;o--)(h=c[a][o])&&-1!==h.index&&h.visible&&0!==h.alpha&&i.push(h);return u.tilesDrawn=i.length,u.tilesTotal=d*f,i}},function(t,e,i){var n=i(24),s=i(51),r=i(73);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=n(e,i,o,a,null,l),d=0;d=0;r--)for(s=n.width-1;s>=0;s--)if((o=n.data[r][s])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;re)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&n(d,i)}o&&s(0,0,a.width,a.height,a)}}},function(t,e,i){var n=i(73),s=i(51),r=i(218);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a0&&n(a,t)}}e&&s(0,0,i.width,i.height,i)}},function(t,e){t.exports=function(t,e,i,n){if("number"==typeof t)n.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var s=0,r=t.length;s1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f0&&(t.currentPipeline&&t.currentPipeline.vertexCount>0&&t.flush(),r.vertexBuffer=e.vertexBuffer[a],t.setPipeline(r),t.setTexture2D(s[a].glTexture,0),t.gl.drawArrays(r.topology,0,e.vertexCount[a]));r.vertexBuffer=o,r.viewIdentity(),r.modelIdentity()}},function(t,e){t.exports=function(t,e,i,n,s){e.cull(n);var r=e.culledTiles,o=r.length;if(0!==o){var a=t._tempMatrix1,h=t._tempMatrix2,l=t._tempMatrix3;h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(n.matrix);var u=t.currentContext,c=e.gidMap;u.save(),s?(a.multiplyWithOffset(s,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l.copyToContext(u)):(h.e-=n.scrollX*e.scrollFactorX,h.f-=n.scrollY*e.scrollFactorY,h.copyToContext(u));var d=n.alpha*e.alpha;(!t.antialias||e.scaleX>1||e.scaleY>1)&&(u.imageSmoothingEnabled=!1);for(var f=0;f-1&&this._active.splice(s,1),n.destroy()}for(i=0;i=n.delay)){var s=n.elapsed-n.delay;n.elapsed=n.delay,!n.hasDispatched&&n.callback&&(n.hasDispatched=!0,n.callback.apply(n.callbackScope,n.args)),n.repeatCount>0?(n.repeatCount--,n.elapsed=s,n.hasDispatched=!1):this._pendingRemoval.push(n)}}}},shutdown:function(){var t;for(t=0;t-1&&(e.state=u.REMOVED,s.splice(r,1)):(e.state=u.REMOVED,n.splice(r,1))}for(i.length=0,i=this._add,t=0;tS&&(S=C),E[A][_]=C}}}var M=o?n(o):null;return a?function(t,e,n,s){var r,o=0,a=s%m,h=Math.floor(s/m);if(a>=0&&a=0&&h>2],r+=i[(3&n[o])<<4|n[o+1]>>4],r+=i[(15&n[o+1])<<2|n[o+2]>>6],r+=i[63&n[o+2]];return s%3==2?r=r.substring(0,r.length-1)+"=":s%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},function(t,e,i){t.exports={Clone:i(67),Extend:i(17),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1350),GetValue:i(6),HasAll:i(1351),HasAny:i(385),HasValue:i(99),IsPlainObject:i(7),Merge:i(106),MergeRight:i(1352),Pick:i(466),SetValue:i(405)}},function(t,e,i){var n=i(6),s=i(23);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=n(t,e,o);return s(a,i,r)}},function(t,e){t.exports=function(t,e){for(var i=0;i=t.pos.x+t.size.x||this.pos.x+this.size.x<=t.pos.x||this.pos.y>=t.pos.y+t.size.y||this.pos.y+this.size.y<=t.pos.y)},resetSize:function(t,e,i,n){return this.pos.x=t,this.pos.y=e,this.size.x=i,this.size.y=n,this},toJSON:function(){return{name:this.name,size:{x:this.size.x,y:this.size.y},pos:{x:this.pos.x,y:this.pos.y},vel:{x:this.vel.x,y:this.vel.y},accel:{x:this.accel.x,y:this.accel.y},friction:{x:this.friction.x,y:this.friction.y},maxVel:{x:this.maxVel.x,y:this.maxVel.y},gravityFactor:this.gravityFactor,bounciness:this.bounciness,minBounceVelocity:this.minBounceVelocity,type:this.type,checkAgainst:this.checkAgainst,collides:this.collides}},fromJSON:function(){},check:function(){},collideWith:function(t,e){this.parent&&this.parent._collideCallback&&this.parent._collideCallback.call(this.parent._callbackScope,this,t,e)},handleMovementTrace:function(){return!0},destroy:function(){this.world.remove(this),this.enabled=!1,this.world=null,this.gameObject=null,this.parent=null}});t.exports=h},function(t,e,i){var n=i(0),s=i(1384),r=new n({initialize:function(t,e){void 0===t&&(t=32),this.tilesize=t,this.data=Array.isArray(e)?e:[],this.width=Array.isArray(e)?e[0].length:0,this.height=Array.isArray(e)?e.length:0,this.lastSlope=55,this.tiledef=s},trace:function(t,e,i,n,s,r){var o={collision:{x:!1,y:!1,slope:!1},pos:{x:t+i,y:e+n},tile:{x:0,y:0}};if(!this.data)return o;var a=Math.ceil(Math.max(Math.abs(i),Math.abs(n))/this.tilesize);if(a>1)for(var h=i/a,l=n/a,u=0;u0?r:0,m=n<0?f:0,y=Math.max(Math.floor(i/f),0),x=Math.min(Math.ceil((i+o)/f),g);u=Math.floor((t.pos.x+v)/f);var T=Math.floor((e+v)/f);if((l>0||u===T||T<0||T>=p)&&(T=-1),u>=0&&u1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,T,c));c++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.x=!0,t.tile.x=d,t.pos.x=u*f-v+m,e=t.pos.x,a=0;break}}if(s){var w=s>0?o:0,b=s<0?f:0,E=Math.max(Math.floor(t.pos.x/f),0),S=Math.min(Math.ceil((t.pos.x+r)/f),p);c=Math.floor((t.pos.y+w)/f);var A=Math.floor((i+w)/f);if((l>0||c===A||A<0||A>=g)&&(A=-1),c>=0&&c1&&d<=this.lastSlope&&this.checkDef(t,d,e,i,a,h,r,o,u,A));u++)if(1===(d=this.data[c][u])||d>this.lastSlope||d>1&&this.checkDef(t,d,e,i,a,h,r,o,u,c)){if(d>1&&d<=this.lastSlope&&t.collision.slope)break;t.collision.y=!0,t.tile.y=d,t.pos.y=c*f-w+b;break}}},checkDef:function(t,e,i,n,s,r,o,a,h,l){var u=this.tiledef[e];if(!u)return!1;var c=this.tilesize,d=(h+u[0])*c,f=(l+u[1])*c,p=(u[2]-u[0])*c,g=(u[3]-u[1])*c,v=u[4],m=i+s+(g<0?o:0)-d,y=n+r+(p>0?a:0)-f;if(p*y-g*m>0){if(s*-g+r*p<0)return v;var x=Math.sqrt(p*p+g*g),T=g/x,w=-p/x,b=m*T+y*w,E=T*b,S=w*b;return E*E+S*S>=s*s+r*r?v||p*(y-r)-g*(m-s)<.5:(t.pos.x=i+s-E,t.pos.y=n+r-S,t.collision.slope={x:p,y:g,nx:T,ny:w},!0)}return!1}});t.exports=r},function(t,e,i){var n=i(0),s=i(1360),r=i(1361),o=i(1362),a=new n({initialize:function(t){this.world=t,this.sys=t.scene.sys},body:function(t,e,i,n){return new s(this.world,t,e,i,n)},existing:function(t){var e=t.x-t.frame.centerX,i=t.y-t.frame.centerY,n=t.width,s=t.height;return t.body=this.world.create(e,i,n,s),t.body.parent=t,t.body.gameObject=t,t},image:function(t,e,i,n){var s=new r(this.world,t,e,i,n);return this.sys.displayList.add(s),s},sprite:function(t,e,i,n){var s=new o(this.world,t,e,i,n);return this.sys.displayList.add(s),this.sys.updateList.add(s),s},destroy:function(){this.world=null,this.sys=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1268),r=new n({Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){this.body=t.create(e,i,n,s),this.body.parent=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=r},function(t,e,i){var n=i(0),s=i(1268),r=i(98),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(0),s=i(1268),r=i(69),o=new n({Extends:r,Mixins:[s.Acceleration,s.BodyScale,s.BodyType,s.Bounce,s.CheckAgainst,s.Collides,s.Debug,s.Friction,s.Gravity,s.Offset,s.SetGameObject,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t.scene,e,i,n,s),this.body=t.create(e-this.frame.centerX,i-this.frame.centerY,this.width,this.height),this.body.parent=this,this.body.gameObject=this,this.size=this.body.size,this.offset=this.body.offset,this.vel=this.body.vel,this.accel=this.body.accel,this.friction=this.body.friction,this.maxVel=this.body.maxVel}});t.exports=o},function(t,e,i){var n=i(1357),s=i(0),r=i(451),o=i(1358),a=i(9),h=i(1267),l=i(2),u=i(99),c=i(107),d=i(1398),f=i(31),p=i(452),g=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.bodies=new c,this.gravity=l(e,"gravity",0),this.cellSize=l(e,"cellSize",64),this.collisionMap=new o,this.timeScale=l(e,"timeScale",1),this.maxStep=l(e,"maxStep",.05),this.enabled=!0,this.drawDebug=l(e,"debug",!1),this.debugGraphic;var i=l(e,"maxVelocity",100);if(this.defaults={debugShowBody:l(e,"debugShowBody",!0),debugShowVelocity:l(e,"debugShowVelocity",!0),bodyDebugColor:l(e,"debugBodyColor",16711935),velocityDebugColor:l(e,"debugVelocityColor",65280),maxVelocityX:l(e,"maxVelocityX",i),maxVelocityY:l(e,"maxVelocityY",i),minBounceVelocity:l(e,"minBounceVelocity",40),gravityFactor:l(e,"gravityFactor",1),bounciness:l(e,"bounciness",0)},this.walls={left:null,right:null,top:null,bottom:null},this.delta=0,this._lastId=0,l(e,"setBounds",!1)){var n=e.setBounds;if("boolean"==typeof n)this.setBounds();else{var s=l(n,"x",0),r=l(n,"y",0),h=l(n,"width",t.sys.scale.width),u=l(n,"height",t.sys.scale.height),d=l(n,"thickness",64),f=l(n,"left",!0),p=l(n,"right",!0),g=l(n,"top",!0),v=l(n,"bottom",!0);this.setBounds(s,r,h,u,d,f,p,g,v)}}this.drawDebug&&this.createDebugGraphic()},setCollisionMap:function(t,e){if("string"==typeof t){var i=this.scene.cache.tilemap.get(t);if(!i||i.format!==f.WELTMEISTER)return console.warn("The specified key does not correspond to a Weltmeister tilemap: "+t),null;for(var n,s=i.data.layer,r=0;rr.ACTIVE&&d(this,t,e))},setCollidesNever:function(t){for(var e=0;e=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function r(t,e,i){return s(t,e,i)>0}function o(t,e,i){return s(t,e,i)>=0}function a(t,e,i){return s(t,e,i)<0}function h(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=function t(e){var i=[],n=[],s=[],r=[];var o=Number.MAX_VALUE;for(var a=0;a0?function t(e,i){if(0===i.length)return[e];if(i instanceof Array&&i.length&&i[0]instanceof Array&&2===i[0].length&&i[0][0]instanceof Array){for(var n=[e],s=0;su)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A<_)return i;for(var D=_;D<=A;++D)o(f(O,L-1),f(O,L),f(O,D))&&h(f(O,L+1),f(O,L),f(O,D))&&(E=d(f(O,L),f(O,D)))3&&n>=0;--n)c(f(t,n-1),f(t,n),f(t,n+1),e)&&(t.splice(n%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var n=t[i],s=i-1;s>=0;--s)E(n,t[s],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,n=1;ni[e][0])&&(e=n);return!r(f(t,e-1),f(t,e),f(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(var n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var l=[],u=[];function c(t,e,i,n){if(n){var r=l,o=u;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],h=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(h*c))g&&(g=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,s.addBody(u,m),l=m,f+=1}else c+=r}d+=g+o,c=t}return u},n.chain=function(t,e,i,n,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=f[l-1+(h-1)*e],s.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),n&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*f,y:0}),h(t+(u?o*f:0)+o*r,n,o,l,u,c)})},n.newtonsCradle=function(t,e,i,n,o){for(var a=s.create({label:"Newtons Cradle"}),l=0;lu.bounds.max.x||p.bounds.max.yu.bounds.max.y)){var g=n._getRegion(t,p);if(!p.region||g.id!==p.region.id||s){f.broadphaseTests+=1,p.region&&!s||(p.region=g);var v=n._regionUnion(g,p.region);for(o=v.startCol;o<=v.endCol;o++)for(a=v.startRow;a<=v.endRow;a++){h=c[l=n._getBucketId(o,a)];var m=o>=g.startCol&&o<=g.endCol&&a>=g.startRow&&a<=g.endRow,y=o>=p.region.startCol&&o<=p.region.endCol&&a>=p.region.startRow&&a<=p.region.endRow;!m&&y&&y&&h&&n._bucketRemoveBody(t,h,p),(p.region===g||m&&!y||s)&&(h||(h=n._createBucket(c,l)),n._bucketAddBody(t,h,p))}p.region=g,d=!0}}}d&&(t.pairsList=n._createActivePairsList(t))},n.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},n._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),s=Math.max(t.endCol,e.endCol),r=Math.min(t.startRow,e.startRow),o=Math.max(t.endRow,e.endRow);return n._createRegion(i,s,r,o)},n._getRegion=function(t,e){var i=e.bounds,s=Math.floor(i.min.x/t.bucketWidth),r=Math.floor(i.max.x/t.bucketWidth),o=Math.floor(i.min.y/t.bucketHeight),a=Math.floor(i.max.y/t.bucketHeight);return n._createRegion(s,r,o,a)},n._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},n._getBucketId=function(t,e){return"C"+t+"R"+e},n._createBucket=function(t,e){return t[e]=[]},n._bucketAddBody=function(t,e,i){for(var n=0;n0?n.push(i):delete t.pairs[e[s]];return n}},function(t,e,i){var n={};t.exports=n;var s=i(494),r=i(37);n._pairMaxIdleLife=1e3,n.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},n.update=function(t,e,i){var n,r,o,a,h=t.list,l=t.table,u=t.collisionStart,c=t.collisionEnd,d=t.collisionActive;for(u.length=0,c.length=0,d.length=0,a=0;an._pairMaxIdleLife&&l.push(o);for(o=0;of.friction*f.frictionStatic*k*i&&(I=R,F=o.clamp(f.friction*L*i,-I,I));var B=r.cross(S,m),N=r.cross(A,m),Y=T/(g.inverseMass+v.inverseMass+g.inverseInertia*B*B+v.inverseInertia*N*N);if(D*=Y,F*=Y,P<0&&P*P>n._restingThresh*i)b.normalImpulse=0;else{var X=b.normalImpulse;b.normalImpulse=Math.min(b.normalImpulse+D,0),D=b.normalImpulse-X}if(O*O>n._restingThreshTangent*i)b.tangentImpulse=0;else{var z=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-z}s.x=m.x*D+y.x*F,s.y=m.y*D+y.y*F,g.isStatic||g.isSleeping||(g.positionPrev.x+=s.x*g.inverseMass,g.positionPrev.y+=s.y*g.inverseMass,g.anglePrev+=r.cross(S,s)*g.inverseInertia),v.isStatic||v.isSleeping||(v.positionPrev.x-=s.x*v.inverseMass,v.positionPrev.y-=s.y*v.inverseMass,v.anglePrev-=r.cross(A,s)*v.inverseInertia)}}}}},function(t,e,i){var n={};t.exports=n;var s=i(1276),r=i(453),o=i(1373),a=i(1372),h=i(1429),l=i(1371),u=i(235),c=i(215),d=i(236),f=i(37),p=i(62);n.create=function(t,e){e=f.isElement(t)?e:t,t=f.isElement(t)?t:null,e=e||{},(t||e.render)&&f.warn("Engine.create: engine.render is deprecated (see docs)");var i={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},timing:{timestamp:0,timeScale:1},broadphase:{controller:l}},n=f.extend(i,e);if(t||n.render){var r={element:t,controller:Render};n.render=f.extend(r,n.render)}return n.render&&n.render.controller&&(n.render=n.render.controller.create(n.render)),n.render&&(n.render.engine=n),n.world=e.world||s.create(n.world),n.pairs=a.create(),n.broadphase=n.broadphase.controller.create(n.broadphase),n.metrics=n.metrics||{extended:!1},n.metrics=h.create(n.metrics),n},n.update=function(t,e,i){e=e||1e3/60,i=i||1;var s,l=t.world,f=t.timing,p=t.broadphase,g=[];f.timestamp+=e*f.timeScale;var v={timestamp:f.timestamp};u.trigger(t,"beforeUpdate",v);var m=c.allBodies(l),y=c.allConstraints(l);for(h.reset(t.metrics),t.enableSleeping&&r.update(m,f.timeScale),n._bodiesApplyGravity(m,l.gravity),n._bodiesUpdate(m,e,f.timeScale,i,l.bounds),d.preSolveAll(m),s=0;s0&&u.trigger(t,"collisionStart",{pairs:T.collisionStart}),o.preSolvePosition(T.list),s=0;s0&&u.trigger(t,"collisionActive",{pairs:T.collisionActive}),T.collisionEnd.length>0&&u.trigger(t,"collisionEnd",{pairs:T.collisionEnd}),h.update(t.metrics,t),n._bodiesClearForces(m),u.trigger(t,"afterUpdate",v),t},n.merge=function(t,e){if(f.extend(t,e),e.world){t.world=e.world,n.clear(t);for(var i=c.allBodies(t.world),s=0;s0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_START,e,i,n)}),p.on(e,"collisionActive",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,n)}),p.on(e,"collisionEnd",function(e){var i,n,s=e.pairs;s.length>0&&(i=s[0].bodyA,n=s[0].bodyB),t.emit(u.COLLISION_END,e,i,n)})},setBounds:function(t,e,i,n,s,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===s&&(s=128),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-s,e-s,s,n+2*s),this.updateWall(o,"right",t+i,e-s,s,n+2*s),this.updateWall(a,"top",t,e-s,i,s),this.updateWall(h,"bottom",t,e+n,i,s),this},updateWall:function(t,e,i,n,s,r){var o=this.walls[e];t?(o&&v.remove(this.localWorld,o),i+=s/2,n+=r/2,this.walls[e]=this.create(i,n,s,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&v.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return v.add(this.localWorld,o),o},add:function(t){return v.add(this.localWorld,t),this},remove:function(t,e){var i=t.body?t.body:t;return a.remove(this.localWorld,i,e),this},removeConstraint:function(t,e){return a.remove(this.localWorld,t,e),this},convertTilemapLayer:function(t,e){var i=t.layer,n=t.getTilesWithin(0,0,i.width,i.height,{isColliding:!0});return this.convertTiles(n,e),this},convertTiles:function(t,e){if(0===t.length)return this;for(var i=0;i1?1:0;r1?1:0;s0?e-o:e+o<0?e+o:0}return n(e,-r,r)}},function(t,e){t.exports=function(t,e){if(t.standing=!1,e.collision.y&&(t.bounciness>0&&Math.abs(t.vel.y)>t.minBounceVelocity?t.vel.y*=-t.bounciness:(t.vel.y>0&&(t.standing=!0),t.vel.y=0)),e.collision.x&&(t.bounciness>0&&Math.abs(t.vel.x)>t.minBounceVelocity?t.vel.x*=-t.bounciness:t.vel.x=0),e.collision.slope){var i=e.collision.slope;if(t.bounciness>0){var n=t.vel.x*i.nx+t.vel.y*i.ny;t.vel.x=(t.vel.x-i.nx*n*2)*t.bounciness,t.vel.y=(t.vel.y-i.ny*n*2)*t.bounciness}else{var s=i.x*i.x+i.y*i.y,r=(t.vel.x*i.x+t.vel.y*i.y)/s;t.vel.x=i.x*r,t.vel.y=i.y*r;var o=Math.atan2(i.x,i.y);o>t.slopeStanding.min&&oi.last.x&&e.last.xi.last.y&&e.last.y0))r=t.collisionMap.trace(e.pos.x,e.pos.y,0,-(e.pos.y+e.size.y-i.pos.y),e.size.x,e.size.y),e.pos.y=r.pos.y,e.bounciness>0&&e.vel.y>e.minBounceVelocity?e.vel.y*=-e.bounciness:(e.standing=!0,e.vel.y=0);else{var l=(e.vel.y-i.vel.y)/2;e.vel.y=-l,i.vel.y=l,s=i.vel.x*t.delta,r=t.collisionMap.trace(e.pos.x,e.pos.y,s,-o/2,e.size.x,e.size.y),e.pos.y=r.pos.y;var u=t.collisionMap.trace(i.pos.x,i.pos.y,0,o/2,i.size.x,i.size.y);i.pos.y=u.pos.y}}},function(t,e,i){t.exports={Factory:i(1364),Image:i(1368),Matter:i(1274),MatterPhysics:i(1431),PolyDecomp:i(1365),Sprite:i(1369),TileBody:i(1271),PhysicsEditorParser:i(1367),World:i(1375)}},function(t,e,i){var n=i(493),s=i(2),r=i(3);t.exports=function(t,e,i){void 0===i&&(i={});var o=e.x,a=e.y;if(e.body={temp:!0,position:{x:o,y:a}},[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity].forEach(function(t){for(var i in t)(n=t[i]).get&&"function"==typeof n.get||n.set&&"function"==typeof n.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var n}),e.world=t,e._tempVec2=new r(o,a),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,!0);else{var h=s(i,"shape",null);h||(h="rectangle"),e.setBody(h,i)}return e}},function(t,e){t.exports={setBounce:function(t){return this.body.restitution=t,this}}},function(t,e){var i={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i1?1:0;n1;if(!d||t!=d.x||e!=d.y){d&&n?(f=d.x,p=d.y):(f=0,p=0);var s={x:f+t,y:p+e};!n&&d||(d=s),g.push(s),m=f+t,y=p+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(n._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i0)for(var a=s+1;ae.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.yk)return!1}return!0}function qb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Wb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Ta(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== +b?b:0}function ma(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function y(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function bg(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function cg(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function dg(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Dc(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&& +d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new y;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function L(){Object.defineProperty(this,"id",{value:oj++});this.uuid=O.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha= +this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha= +!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Oa(a){L.call(this);this.type="MeshBasicMaterial";this.color=new y(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphTargets=this.skinning=!1;this.setValues(a)} +function K(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Ad(a,b,c){K.call(this,new Int8Array(a),b,c)}function Bd(a,b,c){K.call(this,new Uint8Array(a),b,c)}function Cd(a,b,c){K.call(this,new Uint8ClampedArray(a),b,c)}function Dd(a,b,c){K.call(this,new Int16Array(a), +b,c)}function Xb(a,b,c){K.call(this,new Uint16Array(a),b,c)}function Ed(a,b,c){K.call(this,new Int32Array(a),b,c)}function Yb(a,b,c){K.call(this,new Uint32Array(a),b,c)}function C(a,b,c){K.call(this,new Float32Array(a),b,c)}function Fd(a,b,c){K.call(this,new Float64Array(a),b,c)}function vh(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate= +this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function wh(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function G(){Object.defineProperty(this,"id",{value:pj+=2});this.uuid=O.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}; +this.userData={}}function ca(a,b){D.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new G;this.material=void 0!==b?b:new Oa({color:16777215*Math.random()});this.updateMorphTargets()}function xh(a,b,c,d,e,f,g,k){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,k):d.intersectTriangle(e,f,g,2!==b.side,k)))return null;Je.copy(k);Je.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Je);return bc.far?null:{distance:b,point:Je.clone(),object:a}}function Ke(a,b,c,d,e,f,g,k,l,m,v,p){Zb.fromBufferAttribute(e, +m);$b.fromBufferAttribute(e,v);ac.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Le.set(0,0,0);Me.set(0,0,0);Ne.set(0,0,0);for(var q=0,t=f.length;qg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function Eb(a,b,c){va.call(this,a,b,c)}function cc(a,b,c,d,e,f,g,k,l,m,v,p){T.call(this,null,f,g,k,l,m,d,e,v,p);this.image={data:a||null,width:b||1,height:c||1};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Hd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ta,void 0!==b?b:new Ta,void 0!==c?c:new Ta,void 0!== +d?d:new Ta,void 0!==e?e:new Ta,void 0!==f?f:new Ta]}function yh(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function rj(a){function b(b,c){var d=b.array,e=b.usage,k=a.createBuffer();a.bindBuffer(c,k);a.bufferData(c,d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array? +console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:k,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&& +(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.versionm;m++){if(p=d[m])if(l=p[0],p=p[1]){v&&e.setAttribute("morphTarget"+m,v[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=p;k+=p;continue}c[m]=0}e=e.morphTargetsRelative?1:1-k;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Cj(a,b,c,d){var e={};return{update:function(a){var f=d.render.frame,k=a.geometry,l=b.get(a,k);e[l.id]!==f&&(k.isGeometry&&l.updateFromObject(a),b.update(l),e[l.id]=f);a.isInstancedMesh&& +c.update(a.instanceMatrix,34962);return l},dispose:function(){e={}}}}function rb(a,b,c,d,e,f,g,k,l,m){a=void 0!==a?a:[];T.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,k,l,m);this.flipY=!1}function Ic(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Jc(a,b,c,d){T.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1}; +this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Kc(a,b,c){var d=a[0];if(0>=d||0");return a.replace(jg,ig)}function Oh(a,b,c,d){a="";for(b=parseInt(b);bc;c++)b.probe.push(new n);var d=new n,e=new P,f=new P;return{setup:function(c,k,l){for(var g=0,v=0,p=0,h=0;9>h;h++)b.probe[h].set(0,0,0);var t=k=0,r=0, +u=0,n=0,w=0,B=0,U=0;l=l.matrixWorldInverse;c.sort(Ak);h=0;for(var wa=c.length;hqa;qa++)b.probe[qa].addScaledVector(A.sh.coefficients[qa],xa);else if(A.isDirectionalLight){var F=a.get(A);F.color.copy(A.color).multiplyScalar(A.intensity);F.direction.setFromMatrixPosition(A.matrixWorld);d.setFromMatrixPosition(A.target.matrixWorld); +F.direction.sub(d);F.direction.transformDirection(l);if(F.shadow=A.castShadow)xa=A.shadow,F.shadowBias=xa.bias,F.shadowRadius=xa.radius,F.shadowMapSize=xa.mapSize,b.directionalShadowMap[k]=qa,b.directionalShadowMatrix[k]=A.shadow.matrix,w++;b.directional[k]=F;k++}else if(A.isSpotLight){F=a.get(A);F.position.setFromMatrixPosition(A.matrixWorld);F.position.applyMatrix4(l);F.color.copy(aa).multiplyScalar(xa);F.distance=x;F.direction.setFromMatrixPosition(A.matrixWorld);d.setFromMatrixPosition(A.target.matrixWorld); +F.direction.sub(d);F.direction.transformDirection(l);F.coneCos=Math.cos(A.angle);F.penumbraCos=Math.cos(A.angle*(1-A.penumbra));F.decay=A.decay;if(F.shadow=A.castShadow)xa=A.shadow,F.shadowBias=xa.bias,F.shadowRadius=xa.radius,F.shadowMapSize=xa.mapSize,b.spotShadowMap[r]=qa,b.spotShadowMatrix[r]=A.shadow.matrix,U++;b.spot[r]=F;r++}else if(A.isRectAreaLight)F=a.get(A),F.color.copy(aa).multiplyScalar(xa),F.position.setFromMatrixPosition(A.matrixWorld),F.position.applyMatrix4(l),f.identity(),e.copy(A.matrixWorld), +e.premultiply(l),f.extractRotation(e),F.halfWidth.set(.5*A.width,0,0),F.halfHeight.set(0,.5*A.height,0),F.halfWidth.applyMatrix4(f),F.halfHeight.applyMatrix4(f),b.rectArea[u]=F,u++;else if(A.isPointLight){F=a.get(A);F.position.setFromMatrixPosition(A.matrixWorld);F.position.applyMatrix4(l);F.color.copy(A.color).multiplyScalar(A.intensity);F.distance=A.distance;F.decay=A.decay;if(F.shadow=A.castShadow)xa=A.shadow,F.shadowBias=xa.bias,F.shadowRadius=xa.radius,F.shadowMapSize=xa.mapSize,F.shadowCameraNear= +xa.camera.near,F.shadowCameraFar=xa.camera.far,b.pointShadowMap[t]=qa,b.pointShadowMatrix[t]=A.shadow.matrix,B++;b.point[t]=F;t++}else A.isHemisphereLight&&(F=a.get(A),F.direction.setFromMatrixPosition(A.matrixWorld),F.direction.transformDirection(l),F.direction.normalize(),F.skyColor.copy(A.color).multiplyScalar(xa),F.groundColor.copy(A.groundColor).multiplyScalar(xa),b.hemi[n]=F,n++)}b.ambient[0]=g;b.ambient[1]=v;b.ambient[2]=p;c=b.hash;if(c.directionalLength!==k||c.pointLength!==t||c.spotLength!== +r||c.rectAreaLength!==u||c.hemiLength!==n||c.numDirectionalShadows!==w||c.numPointShadows!==B||c.numSpotShadows!==U)b.directional.length=k,b.spot.length=r,b.rectArea.length=u,b.point.length=t,b.hemi.length=n,b.directionalShadowMap.length=w,b.pointShadowMap.length=B,b.spotShadowMap.length=U,b.directionalShadowMatrix.length=w,b.pointShadowMatrix.length=B,b.spotShadowMatrix.length=U,c.directionalLength=k,c.pointLength=t,c.spotLength=r,c.rectAreaLength=u,c.hemiLength=n,c.numDirectionalShadows=w,c.numPointShadows= +B,c.numSpotShadows=U,b.version=Ck++},state:b}}function Sh(){var a=new Bk,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function Dk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){if(!1===b.has(c)){var e=new Sh;b.set(c,new WeakMap);b.get(c).set(d,e);c.addEventListener("dispose", +a)}else!1===b.get(c).has(d)?(e=new Sh,b.get(c).set(d,e)):e=b.get(c).get(d);return e},dispose:function(){b=new WeakMap}}}function Gb(a){L.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.fog=!1;this.setValues(a)}function Hb(a){L.call(this);this.type="MeshDistanceMaterial";this.referencePosition=new n;this.nearDistance= +1;this.farDistance=1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(a)}function Th(a,b,c){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=p[c];void 0===d&&(d=new Gb({depthPacking:3201,morphTargets:a,skinning:b}),p[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=h[c];void 0===d&&(d=new Hb({morphTargets:a,skinning:b}),h[c]=d);return d}function f(b,c,f,g,k,l){var m=b.geometry,p=d,v=b.customDepthMaterial; +!0===f.isPointLight&&(p=e,v=b.customDistanceMaterial);void 0===v?(v=!1,!0===c.morphTargets&&(!0===m.isBufferGeometry?v=m.morphAttributes&&m.morphAttributes.position&&0\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}), +n=u.clone();n.defines.HORIZONAL_PASS=1;var w=new G;w.setAttribute("position",new K(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var B=new ca(w,u),U=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==U.enabled&&(!1!==U.autoUpdate||!1!==U.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),h=a.getActiveCubeFace(),q=a.getActiveMipmapLevel(),r=a.state;r.setBlending(0);r.buffers.color.setClear(1,1,1,1);r.buffers.depth.setTest(!0);r.setScissorTest(!1); +for(var t=0,z=d.length;tc||l.y>c)console.warn("THREE.WebGLShadowMap:",w,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/aa.x),l.x=m.x*aa.x,A.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/aa.y),l.y=m.y*aa.y,A.mapSize.y=m.y);null!==A.map||A.isPointLightShadow||3!==this.type||(aa={minFilter:1006, +magFilter:1006,format:1023},A.map=new va(l.x,l.y,aa),A.map.texture.name=w.name+".shadowMap",A.mapPass=new va(l.x,l.y,aa),A.camera.updateProjectionMatrix());null===A.map&&(aa={minFilter:1003,magFilter:1003,format:1023},A.map=new va(l.x,l.y,aa),A.map.texture.name=w.name+".shadowMap",A.camera.updateProjectionMatrix());a.setRenderTarget(A.map);a.clear();aa=A.getViewportCount();for(var wa=0;wad||a.height>d)e=d/Math.max(a.width,a.height);if(1>e||!0===b){if("undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&a instanceof ImageBitmap)return d=b?O.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===I&&(I=k(b,e)),c=c?k(b,e):I,c.width=b,c.height=e, +c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return O.isPowerOfTwo(a.width)&&O.isPowerOfTwo(a.height)}function v(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function p(b,c,e,f){a.generateMipmap(b);d.get(c).__maxMipLevel=Math.log(Math.max(e, +f))*Math.LOG2E}function h(c,d,e){if(!1===qa)return d;if(null!==c){if(void 0!==a[c])return a[c];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+c+"'")}c=d;6403===d&&(5126===e&&(c=33326),5131===e&&(c=33325),5121===e&&(c=33321));6407===d&&(5126===e&&(c=34837),5131===e&&(c=34843),5121===e&&(c=32849));6408===d&&(5126===e&&(c=34836),5131===e&&(c=34842),5121===e&&(c=32856));33325===c||33326===c||34842===c||34836===c?b.get("EXT_color_buffer_float"):(34843===c||34837=== +c)&&console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return c}function t(a){return 1003===a||1004===a||1005===a?9728:9729}function r(b){b=b.target;b.removeEventListener("dispose",r);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&G.delete(b);g.memory.textures--}function u(b){b=b.target;b.removeEventListener("dispose",u);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&& +a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);if(b.isWebGLMultiviewRenderTarget){a.deleteTexture(c.__webglColorTexture);a.deleteTexture(c.__webglDepthStencilTexture);g.memory.textures-=2;e=0;for(var f=c.__webglViewFramebuffers.length;e< +f;e++)a.deleteFramebuffer(c.__webglViewFramebuffers[e])}d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);if(a.isVideoTexture){var f=g.render.frame;G.get(a)!==f&&(G.set(a,f),a.update())}if(0q;q++)r[q]=k||e?e?b.image[q].image:b.image[q]:l(b.image[q],!1,!0,E);var t=r[0],u=m(t)||qa,n=f.convert(b.format),A=f.convert(b.type),w=h(b.internalFormat,n,A);U(34067,b,u);if(k){for(q= +0;6>q;q++){var z=r[q].mipmaps;for(k=0;kq;q++)if(e)for(c.texImage2D(34069+q,0,w,r[q].width,r[q].height,0,n,A,r[q].data),k=0;k=F&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+F);K+=1;return a};this.resetTextureUnits=function(){K=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e= +d.get(a);0A;A++)k.__webglFramebuffer[A]=a.createFramebuffer()}else if(k.__webglFramebuffer=a.createFramebuffer(),r)if(qa){k.__webglMultisampledFramebuffer=a.createFramebuffer();k.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,k.__webglColorRenderbuffer);r=f.convert(e.texture.format);var w=f.convert(e.texture.type);r=h(e.texture.internalFormat,r,w);w= +C(e);a.renderbufferStorageMultisample(36161,w,r,e.width,e.height);a.bindFramebuffer(36160,k.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,k.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);e.depthBuffer&&(k.__webglDepthRenderbuffer=a.createRenderbuffer(),x(k.__webglDepthRenderbuffer,e,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");else if(t){A=e.width;var B=e.height;r=e.numViews; +a.bindFramebuffer(36160,k.__webglFramebuffer);var wa=b.get("OVR_multiview2");g.memory.textures+=2;w=a.createTexture();a.bindTexture(35866,w);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,32856,A,B,r,0,6408,5121,null);wa.framebufferTextureMultiviewOVR(36160,36064,w,0,0,r);var F=a.createTexture();a.bindTexture(35866,F);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,35056,A,B,r,0,34041,34042,null);wa.framebufferTextureMultiviewOVR(36160, +33306,F,0,0,r);B=Array(r);for(A=0;AA;A++)aa(k.__webglFramebuffer[A],e,36064,34069+A);v(e.texture,z)&&p(34067,e.texture,e.width,e.height);c.bindTexture(34067,null)}else t||(c.bindTexture(3553, +l.__webglTexture),U(3553,e.texture,z),aa(k.__webglFramebuffer,e,36064,3553),v(e.texture,z)&&p(3553,e.texture,e.width,e.height),c.bindTexture(3553,null));if(e.depthBuffer){k=d.get(e);l=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(l)throw Error("target.depthTexture not supported in Cube render targets");if(e&&e.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,k.__webglFramebuffer);if(!e.depthTexture||!e.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture"); +d.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0);n(e.depthTexture,0);k=d.get(e.depthTexture).__webglTexture;if(1026===e.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,k,0);else if(1027===e.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,k,0);else throw Error("Unknown depthTexture format");}else if(l)for(k.__webglDepthbuffer= +[],l=0;6>l;l++)a.bindFramebuffer(36160,k.__webglFramebuffer[l]),k.__webglDepthbuffer[l]=a.createRenderbuffer(),x(k.__webglDepthbuffer[l],e);else a.bindFramebuffer(36160,k.__webglFramebuffer),k.__webglDepthbuffer=a.createRenderbuffer(),x(k.__webglDepthbuffer,e);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=m(a)||qa;if(v(b,e)){e=a.isWebGLRenderTargetCube?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);p(e,b,a.width,a.height);c.bindTexture(e, +null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(qa){var c=d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var e=b.height,f=16384;b.depthBuffer&&(f|=256);b.stencilBuffer&&(f|=1024);a.blitFramebuffer(0,0,c,e,0,0,c,e,f,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&& +(!1===ha&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ha=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),P=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?w(a,b):B(a,b)}}function Vh(a,b,c){var d= +c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410; +if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(1029===a)return 36244;if(1030===a)return 33319;if(1031===a)return 33320;if(1032===a)return 36248;if(1033===a)return 36249;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null; +if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37808===a||37809===a||37810===a||37811===a||37812===a||37813=== +a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function og(a,b,c,d){va.call(this,a,b,d);this.stencilBuffer=this.depthBuffer=!1;this.numViews=c}function Gk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;v[0]=a;return v}function d(a){if(void 0===a.isArrayCamera)return!0;a=a.cameras; +if(a.length>t)return!1;for(var b=1,c=a.length;bf.matrixWorld.determinant(),l=h(a,c,e,f);Z.setMaterial(e,k);var m=!1;if(b!==d.id||da!==l.id||ha!==(!0===e.wireframe))b=d.id,da=l.id,ha=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)Aa.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position; +if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=za.getWireframeAttribute(d),p=2);k=Ba;if(null!==a){var v=ma.get(a);k=Da;k.setIndex(v)}if(m){if(!1!==Ha.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){Z.initAttributes();m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(x in l){var r=l[x];if(0<=r){var t=m[x];if(void 0!==t){var n=t.normalized,u=t.itemSize,z=ma.get(t);if(void 0!== +z){var w=z.buffer,A=z.type;z=z.bytesPerElement;if(t.isInterleavedBufferAttribute){var B=t.data,U=B.stride;t=t.offset;B&&B.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(r,B.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=B.meshPerAttribute*B.count)):Z.enableAttribute(r);H.bindBuffer(34962,w);H.vertexAttribPointer(r,u,A,n,U*z,t*z)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute* +t.count)):Z.enableAttribute(r),H.bindBuffer(34962,w),H.vertexAttribPointer(r,u,A,n,0,0)}}else if("instanceMatrix"===x)z=ma.get(f.instanceMatrix),void 0!==z&&(w=z.buffer,A=z.type,Z.enableAttributeAndDivisor(r+0,1),Z.enableAttributeAndDivisor(r+1,1),Z.enableAttributeAndDivisor(r+2,1),Z.enableAttributeAndDivisor(r+3,1),H.bindBuffer(34962,w),H.vertexAttribPointer(r+0,4,A,!1,64,0),H.vertexAttribPointer(r+1,4,A,!1,64,16),H.vertexAttribPointer(r+2,4,A,!1,64,32),H.vertexAttribPointer(r+3,4,A,!1,64,48));else if(void 0!== +q&&(n=q[x],void 0!==n))switch(n.length){case 2:H.vertexAttrib2fv(r,n);break;case 3:H.vertexAttrib3fv(r,n);break;case 4:H.vertexAttrib4fv(r,n);break;default:H.vertexAttrib1fv(r,n)}}}Z.disableUnusedAttributes()}null!==a&&H.bindBuffer(34963,v.buffer)}var x=d.drawRange.start*p;m=null!==g?g.start*p:0;v=Math.max(x,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,x+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-v+1);0!==g&&(f.isMesh?!0===e.wireframe?(Z.setLineWidth(e.wireframeLinewidth*(null=== +N?R:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Z.setLineWidth(e*(null===N?R:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&&k.setMode(4),f.isInstancedMesh?k.renderInstances(d,v,g,f.count):d.isInstancedBufferGeometry?k.renderInstances(d,v,g,d.maxInstancedCount):k.render(v,g))};this.compile=function(a,b){F=va.get(a,b);F.init();a.traverse(function(a){a.isLight&&(F.pushLight(a),a.castShadow&&F.pushShadow(a))}); +F.setupLights(b);a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var c=0;ce.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))} +function tg(a,b,c,d,e,f,g,k,l){T.call(this,a,b,c,d,e,f,g,k,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Pc(a,b,c,d,e,f,g,k,l,m,h,p){T.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Ud(a,b,c,d,e,f,g,k,l){T.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Vd(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat"); +void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);T.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter=void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Qc(a){G.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;mc;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+ +","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2],b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;ac;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+ +f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l,m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;mc;c++)g=3*m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new C(b,3))}function Wd(a,b,c){M.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b, +stacks:c};this.fromBufferGeometry(new Rc(a,b,c));this.mergeVertices()}function Rc(a,b,c){G.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var z=t/b;a(z,u,l);e.push(l.x,l.y,l.z);0<=z-1E-5?(a(z-1E-5,u,m),h.subVectors(l,m)):(a(z+ +1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(z,u-1E-5,m),p.subVectors(l,m)):(a(z,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y,k.z);g.push(z,u)}}for(q=0;qd&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}G.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;ke&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+=1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new C(k,3));this.setAttribute("normal",new C(k.slice(),3));this.setAttribute("uv",new C(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Yd(a,b){M.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Sc(a,b));this.mergeVertices()} +function Sc(a,b){Ga.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Zd(a,b){M.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){Ga.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters= +{radius:a,detail:b}}function $d(a,b){M.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(a,b){var c=(1+Math.sqrt(5))/2;Ga.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters= +{radius:a,detail:b}}function ae(a,b){M.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Uc(a,b));this.mergeVertices()}function Uc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ga.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2, +6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function be(a,b,c,d,e,f){M.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new fc(a,b,c,d,e);this.tangents=a.tangents;this.normals= +a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function fc(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e];e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}G.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d, +closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n,l=new n,m=new x,h=new n,p,q,t=[],r=[],u=[],z=[];for(p=0;p=b;e-=d)f=$h(e,a[e],a[e+1],f);f&&gc(f,f.next)&&(ee(f),f=f.next);return f}function fe(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!gc(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{ee(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function ge(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=ug(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ= +l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;mn!==r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=bi(g,k);g=fe(g,g.next);a=fe(a,a.next);ge(g,b,c,d,e,f);ge(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Hk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x? +e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=ug(e.x=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Xc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Xc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Xc(e.x,e.y,a.x,a.y, +f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Xc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Ik(a,b){return a.x-b.x}function Jk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x=c.x&&c.x>=g&&d!==c.x&&Xc(ek.x)&&he(c,a)&&(k=c,m=h)}c=c.next}return k}function ug(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Kk(a){var b=a,c=a;do{if(b.xta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)|| +0>ta(a,a.next,b)}function bi(a,b){var c=new vg(a.i,a.x,a.y),d=new vg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function $h(a,b,c,d){a=new vg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function ee(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function vg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next= +this.prev=null;this.steiner=!1}function ci(a){var b=a.length;2Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new x(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new x(f/e,d/e)}function k(a,b){for(J=a.length;0<= +--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=B+2*C;for(g=0;gh;h++){var p= +m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2||g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new C(c,3))}function lc(a,b,c,d,e,f,g,k){M.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e, +openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new ub(a,b,c,d,e,f,g,k));this.mergeVertices()}function ub(a,b,c,d,e,f,g,k){function l(c){var e,f=new x,l=new n,v=0,u=!0===c?a:b,B=!0===c?1:-1;var y=r;for(e=1;e<=d;e++)p.push(0,z*B,0),q.push(0,B,0),t.push(.5,.5),r++;var F=r;for(e=0;e<=d;e++){var C=e/d*k+g,G=Math.cos(C);C=Math.sin(C);l.x=u*C;l.y=z*B;l.z=u*G;p.push(l.x,l.y,l.z);q.push(0,B,0);f.x=.5*G+.5;f.y=.5*C*B+.5;t.push(f.x,f.y);r++}for(e=0;ethis.duration&&this.resetDuration()}function Mk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return cd;case "vector":case "vector2":case "vector3":case "vector4":return dd; +case "color":return Ze;case "quaternion":return qe;case "bool":case "boolean":return Ye;case "string":return af}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Nk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Mk(a.type);if(void 0===a.times){var c=[],d=[];ea.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function wg(a,b,c){var d=this,e= +!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()};this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=a;return this};this.addHandler=function(a,b){l.push(a,b);return this}; +this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;ba;a++)this.coefficients.push(new n)}function ab(a,b){ba.call(this,void 0,b);this.sh=void 0!==a?a:new tf}function Fg(a,b,c){ab.call(this,void 0,c);a=(new y).set(a);c=(new y).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b); +c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Gg(a,b){ab.call(this,void 0,b);a=(new y).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))}function ii(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new pa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new pa;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate= +!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Hg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ig(){D.call(this);this.type="AudioListener";this.context=Jg.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Hg}function hd(a){D.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain= +this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt=this._startedAt=0;this.filters=[]}function Kg(a){hd.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Lg(a,b){this.analyser=a.context.createAnalyser(); +this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Mg(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a=Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function ji(a,b,c){c=c||Ba.parseTrackName(b);this._targetGroup=a;this._bindings= +a.subscribe_(b,c)}function Ba(a,b,c){this.path=b;this.parsedPath=c||Ba.parseTrackName(b);this.node=Ba.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ki(){this.uuid=O.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_=0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length}, +get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function li(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400},e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop= +2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart=!0}function Ng(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function uf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Og(a,b,c){sb.call(this, +a,b);this.meshPerAttribute=c||1}function mi(a,b,c,d){this.ray=new Wb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function ni(a,b){return a.distance-b.distance}function Pg(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e= +a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new C(b,3));b=new ja({fog:!1});this.cone=new la(a,b);this.add(this.cone);this.update()}function qi(a){var b=[];a&&a.isBone&&b.push(a);for(var c= +0;cr;++r)e=r/h,e=Math.exp(-e*e/2),q.push(e),0==r?n+=e:r\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"} +function Ci(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom";this.closed=!0}function Di(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom"}function Zg(a){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.");Aa.call(this,a);this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2, +-52));void 0===Number.isInteger&&(Number.isInteger=function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0ze;ze++)ya[ze]=(16>ze?"0":"")+ze.toString(16);var O={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var a=4294967295*Math.random()|0,b=4294967295*Math.random()|0,c=4294967295*Math.random()| +0,d=4294967295*Math.random()|0;return(ya[a&255]+ya[a>>8&255]+ya[a>>16&255]+ya[a>>24&255]+"-"+ya[b&255]+ya[b>>8&255]+"-"+ya[b>>16&15|64]+ya[b>>24&255]+"-"+ya[c&63|128]+ya[c>>8&255]+"-"+ya[c>>16&255]+ya[c>>24&255]+ya[d&255]+ya[d>>8&255]+ya[d>>16&255]+ya[d>>24&255]).toUpperCase()},clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a, +b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*O.DEG2RAD},radToDeg:function(a){return a*O.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2, +Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))}};Object.defineProperties(x.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(x.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this}, +setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."), +this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this}, +subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},applyMatrix3:function(a){var b=this.x,c=this.y;a=a.elements;this.x=a[0]*b+a[3]*c+a[6];this.y=a[1]*b+a[4]*c+a[7];return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);return this}, +max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b,this.y));return this},clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y); +return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lengthSq:function(){return this.x* +this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+ +Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a, +b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(Da,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var k=c[d+0],l=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var h=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||k!==d||l!==h||m!== +p){f=1-g;var q=k*d+l*h+m*p+c*e,n=0<=q?1:-1,r=1-q*q;r>Number.EPSILON&&(r=Math.sqrt(r),q=Math.atan2(r,q*n),f=Math.sin(f*q)/r,g=Math.sin(g*q)/r);n*=g;k=k*f+d*n;l=l*f+h*n;m=m*f+p*n;c=c*f+e*n;f===1-g&&(g=1/Math.sqrt(k*k+l*l+m*m+c*c),k*=g,l*=g,m*=g,c*=g)}a[b]=k;a[b+1]=l;a[b+2]=m;a[b+3]=c}});Object.defineProperties(Da.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z}, +set:function(a){this._z=a;this._onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this._onChangeCallback()}}});Object.assign(Da.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this._onChangeCallback();return this},setFromEuler:function(a,b){if(!a|| +!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,k=f(c/2),l=f(d/2);f=f(e/2);c=g(c/2);d=g(d/2);e=g(e/2);"XYZ"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f-c*l*e,this._z=k*l*e+c*d*f,this._w=k*l*f-c*d*e):"YXZ"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f-c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f+c*d*e):"ZXY"===a?(this._x=c*l*f-k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e+c*d*f,this._w= +k*l*f-c*d*e):"ZYX"===a?(this._x=c*l*f-k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f+c*d*e):"YZX"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f-c*d*e):"XZY"===a&&(this._x=c*l*f-k*d*e,this._y=k*d*f-c*l*e,this._z=k*l*e+c*d*f,this._w=k*l*f+c*d*e);!1!==b&&this._onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this._onChangeCallback();return this},setFromRotationMatrix:function(a){var b= +a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],k=b[2],l=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+c-f-b),this._w=(l-g)/c,this._x=.25*c,this._y=(a+e)/c,this._z=(d+k)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this._w=(d-k)/c,this._x=(a+e)/c,this._y=.25*c,this._z=(g+l)/c):(c=2*Math.sqrt(1+b-c-f),this._w=(e-a)/c,this._x=(d+k)/c,this._y=(g+l)/c,this._z=.25*c);this._onChangeCallback();return this},setFromUnitVectors:function(a, +b){var c=a.dot(b)+1;1E-6>c?(c=0,Math.abs(a.x)>Math.abs(a.z)?(this._x=-a.y,this._y=a.x,this._z=0):(this._x=0,this._y=-a.z,this._z=a.y)):(this._x=a.y*b.z-a.z*b.y,this._y=a.z*b.x-a.x*b.z,this._z=a.x*b.y-a.y*b.x);this._w=c;return this.normalize()},angleTo:function(a){return 2*Math.acos(Math.abs(O.clamp(this.dot(a),-1,1)))},rotateTowards:function(a,b){var c=this.angleTo(a);if(0===c)return this;this.slerp(a,Math.min(1,b/c));return this},inverse:function(){return this.conjugate()},conjugate:function(){this._x*= +-1;this._y*=-1;this._z*=-1;this._onChangeCallback();return this},dot:function(a){return this._x*a._x+this._y*a._y+this._z*a._z+this._w*a._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this._onChangeCallback();return this}, +multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,k=b._z;b=b._w;this._x=c*b+a*f+d*k-e*g;this._y=d*b+a*g+e*f-c*k;this._z=e*b+a*k+c*g-d*f;this._w=a*b-c*f-d*g-e*k;this._onChangeCallback(); +return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x=-a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize(),this._onChangeCallback(),this;a=Math.sqrt(a);var k=Math.atan2(a, +g);g=Math.sin((1-b)*k)/a;b=Math.sin(b*k)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this._onChangeCallback();return this},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+ +3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var $g=new n,Ei=new Da;Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z= +b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a, +b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-= +a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this}, +applyEuler:function(a){a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(Ei.setFromEuler(a))},applyAxisAngle:function(a,b){return this.applyQuaternion(Ei.setFromAxisAngle(a,b))},applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyNormalMatrix:function(a){return this.applyMatrix3(a).normalize()}, +applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var k=a*b+f*d-g*c,l=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=k*a+b*-e+l*-g-m*-f;this.y=l*a+b*-f+m*-e-k*-g;this.z=m*a+b*-g+k*-f-l*-e;return this},project:function(a){return this.applyMatrix4(a.matrixWorldInverse).applyMatrix4(a.projectionMatrix)}, +unproject:function(a){return this.applyMatrix4(a.projectionMatrixInverse).applyMatrix4(a.matrixWorld)},transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z, +a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b,this.y));this.z=Math.max(a,Math.min(b,this.z));return this},clampLength:function(a,b){var c=this.length();return this.divideScalar(c|| +1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z= +0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)}, +lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this}, +projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(a){$g.copy(this).projectOnVector(a);return this.sub($g)},reflect:function(a){return this.sub($g.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){var b=Math.sqrt(this.lengthSq()*a.lengthSq());0===b&&console.error("THREE.Vector3: angleTo() can't handle zero length vectors.");a=this.dot(a)/b;return Math.acos(O.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))}, +distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta, +a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a=a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},equals:function(a){return a.x=== +this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var tc=new n;Object.assign(za.prototype,{isMatrix3:!0,set:function(a, +b,c,d,e,f,g,k,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=k;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this}, +applyToBufferAttribute:function(a){for(var b=0,c=a.count;bc;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];return a}});var nd,Mb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===nd&&(nd=document.createElementNS("http://www.w3.org/1999/xhtml", +"canvas"));nd.width=a.width;nd.height=a.height;var b=nd.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=nd}return 2048a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0> +a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(T.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(S.prototype,{width:{get:function(){return this.z},set:function(a){this.z=a}},height:{get:function(){return this.w},set:function(a){this.w=a}}});Object.assign(S.prototype, +{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x; +case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this}, +addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subScalar:function(a){this.x-= +a;this.y-=a;this.z-=a;this.w-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w;a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){return this.multiplyScalar(1/ +a)},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y=a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){a=a.elements;var b=a[0];var c=a[4];var d=a[8],e=a[1],f=a[5],g=a[9];var k=a[2];var l=a[6];var m=a[10];if(.01>Math.abs(c-e)&&.01>Math.abs(d-k)&&.01>Math.abs(g-l)){if(.1>Math.abs(c+e)&&.1>Math.abs(d+k)&&.1>Math.abs(g+l)&&.1>Math.abs(b+f+m-3))return this.set(1,0,0,0),this;a=Math.PI; +b=(b+1)/2;f=(f+1)/2;m=(m+1)/2;c=(c+e)/4;d=(d+k)/4;g=(g+l)/4;b>f&&b>m?.01>b?(l=0,c=k=.707106781):(l=Math.sqrt(b),k=c/l,c=d/l):f>m?.01>f?(l=.707106781,k=0,c=.707106781):(k=Math.sqrt(f),l=c/k,c=g/k):.01>m?(k=l=.707106781,c=0):(c=Math.sqrt(m),l=d/c,k=g/c);this.set(l,k,c,a);return this}a=Math.sqrt((l-g)*(l-g)+(d-k)*(d-k)+(e-c)*(e-c));.001>Math.abs(a)&&(a=1);this.x=(l-g)/a;this.y=(d-k)/a;this.z=(e-c)/a;this.w=Math.acos((b+f+m-1)/2);return this},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, +a.y);this.z=Math.min(this.z,a.z);this.w=Math.min(this.w,a.w);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);this.w=Math.max(this.w,a.w);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));this.w=Math.max(a.w,Math.min(b.w,this.w));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b, +this.y));this.z=Math.max(a,Math.min(b,this.z));this.w=Math.max(a,Math.min(b,this.w));return this},clampLength:function(a,b){var c=this.length();return this.divideScalar(c||1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);this.w=Math.floor(this.w);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x= +Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z* +a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z- +this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."); +this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});va.prototype=Object.assign(Object.create(Fa.prototype),{constructor:va,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport); +this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Zf.prototype=Object.assign(Object.create(va.prototype),{constructor:Zf,isWebGLMultisampleRenderTarget:!0,copy:function(a){va.prototype.copy.call(this,a);this.samples=a.samples;return this}});var Ma=new n,W=new P,Ok=new n(0,0,0),Pk=new n(1,1,1),Nb=new n,Cf=new n,ka=new n;Object.assign(P.prototype,{isMatrix4:!0, +set:function(a,b,c,d,e,f,g,k,l,m,h,p,q,n,r,u){var v=this.elements;v[0]=a;v[4]=b;v[8]=c;v[12]=d;v[1]=e;v[5]=f;v[9]=g;v[13]=k;v[2]=l;v[6]=m;v[10]=h;v[14]=p;v[3]=q;v[7]=n;v[11]=r;v[15]=u;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new P).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11]; +b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(a){var b=this.elements,c=a.elements,d=1/Ma.setFromMatrixColumn(a,0).length(), +e=1/Ma.setFromMatrixColumn(a,1).length();a=1/Ma.setFromMatrixColumn(a,2).length();b[0]=c[0]*d;b[1]=c[1]*d;b[2]=c[2]*d;b[3]=0;b[4]=c[4]*e;b[5]=c[5]*e;b[6]=c[6]*e;b[7]=0;b[8]=c[8]*a;b[9]=c[9]*a;b[10]=c[10]*a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d); +d=Math.sin(d);var k=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*k;var l=f*e,m=c*k,h=c*e;b[0]=g*k;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-h*d;b[9]=-c*g;b[2]=h-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*k,l=g*e,m=d*k,h=d*e,b[0]=a+h*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*k,b[9]=-c,b[2]=l*c-m,b[6]=h+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*k,l=g*e,m=d*k,h=d*e,b[0]=a-h*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*k,b[9]=h-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*k,l=f*e,m=c*k,h=c*e,b[0]=g*k, +b[4]=m*d-l,b[8]=a*d+h,b[1]=g*e,b[5]=h*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=h-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*k,b[9]=-c*k,b[2]=-d*k,b[6]=l*e+m,b[10]=a-h*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=-e,b[8]=d*k,b[1]=a*e+h,b[5]=f*k,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*k,b[10]=h*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){return this.compose(Ok,a,Pk)},lookAt:function(a,b, +c){var d=this.elements;ka.subVectors(a,b);0===ka.lengthSq()&&(ka.z=1);ka.normalize();Nb.crossVectors(c,ka);0===Nb.lengthSq()&&(1===Math.abs(c.z)?ka.x+=1E-4:ka.z+=1E-4,ka.normalize(),Nb.crossVectors(c,ka));Nb.normalize();Cf.crossVectors(ka,Nb);d[0]=Nb.x;d[4]=Cf.x;d[8]=ka.x;d[1]=Nb.y;d[5]=Cf.y;d[9]=ka.y;d[2]=Nb.z;d[6]=Cf.z;d[10]=ka.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), +this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],k=c[1],l=c[5],m=c[9],h=c[13],p=c[2],q=c[6],n=c[10],r=c[14],u=c[3],z=c[7],w=c[11];c=c[15];var B=d[0],x=d[4],y=d[8],A=d[12],C=d[1],G=d[5],D=d[9],E=d[13],F=d[2],I=d[6],K=d[10],L=d[14],M=d[3],N=d[7],O=d[11];d=d[15];b[0]=a*B+e*C+f*F+g*M;b[4]=a*x+e*G+f*I+g*N;b[8]=a*y+e*D+f*K+ +g*O;b[12]=a*A+e*E+f*L+g*d;b[1]=k*B+l*C+m*F+h*M;b[5]=k*x+l*G+m*I+h*N;b[9]=k*y+l*D+m*K+h*O;b[13]=k*A+l*E+m*L+h*d;b[2]=p*B+q*C+n*F+r*M;b[6]=p*x+q*G+n*I+r*N;b[10]=p*y+q*D+n*K+r*O;b[14]=p*A+q*E+n*L+r*d;b[3]=u*B+z*C+w*F+c*M;b[7]=u*x+z*G+w*I+c*N;b[11]=u*y+z*D+w*K+c*O;b[15]=u*A+z*E+w*L+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(a){for(var b= +0,c=a.count;bthis.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];W.copy(this);a=1/e;d=1/f;var k=1/g;W.elements[0]*=a;W.elements[1]*=a;W.elements[2]*=a;W.elements[4]*=d;W.elements[5]*=d;W.elements[6]*=d;W.elements[8]*=k;W.elements[9]*=k;W.elements[10]*=k;b.setFromRotationMatrix(W);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs."); +var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,k=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*k;g[4]=0;g[8]=0;g[12]=-((b+a)*k);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements; +a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var Fi=new P,Gi=new Da;Ub.RotationOrders= +"XYZ YZX ZXY XZY YXZ ZYX".split(" ");Ub.DefaultOrder="XYZ";Object.defineProperties(Ub.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this._onChangeCallback()}}});Object.assign(Ub.prototype,{isEuler:!0,set:function(a, +b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x=a._x;this._y=a._y;this._z=a._z;this._order=a._order;this._onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=O.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],k=e[1],l=e[5],m=e[9],h=e[2],p=e[6];e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.9999999>Math.abs(g)? +(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.9999999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(k,l)):(this._y=Math.atan2(-h,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.9999999>Math.abs(p)?(this._y=Math.atan2(-h,e),this._z=Math.atan2(-f,l)):(this._y=0,this._z=Math.atan2(k,a))):"ZYX"===b?(this._y=Math.asin(-d(h,-1,1)),.9999999>Math.abs(h)?(this._x=Math.atan2(p,e),this._z=Math.atan2(k,a)): +(this._x=0,this._z=Math.atan2(-f,l))):"YZX"===b?(this._z=Math.asin(d(k,-1,1)),.9999999>Math.abs(k)?(this._x=Math.atan2(-m,l),this._y=Math.atan2(-h,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.9999999>Math.abs(f)?(this._x=Math.atan2(p,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;!1!==c&&this._onChangeCallback();return this},setFromQuaternion:function(a, +b,c){Fi.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(Fi,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){Gi.setFromEuler(this);return this.setFromQuaternion(Gi,a)},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a= +[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new n(this._x,this._y,this._z)},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});Object.assign($f.prototype,{set:function(a){this.mask=1<e&&(e=m);h>f&&(f=h);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,k=0,l=a.count;ke&&(e=h);n>f&&(f=n);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"), +b=new n);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(a){this.clampPoint(a.center,Be);return Be.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(Ce);Ff.subVectors(this.max,Ce);pd.subVectors(a.a,Ce);qd.subVectors(a.b,Ce);rd.subVectors(a.c, +Ce);Ob.subVectors(qd,pd);Pb.subVectors(rd,qd);uc.subVectors(pd,rd);a=[0,-Ob.z,Ob.y,0,-Pb.z,Pb.y,0,-uc.z,uc.y,Ob.z,0,-Ob.x,Pb.z,0,-Pb.x,uc.z,0,-uc.x,-Ob.y,Ob.x,0,-Pb.y,Pb.x,0,-uc.y,uc.x,0];if(!ag(a,pd,qd,rd,Ff))return!1;a=[1,0,0,0,1,0,0,0,1];if(!ag(a,pd,qd,rd,Ff))return!1;Gf.crossVectors(Ob,Pb);a=[Gf.x,Gf.y,Gf.z];return ag(a,pd,qd,rd,Ff)},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new n);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Be.copy(a).clamp(this.min, +this.max).sub(a).length()},getBoundingSphere:function(a){void 0===a&&console.error("THREE.Box3: .getBoundingSphere() target is now required");this.getCenter(a.center);a.radius=.5*this.getSize(Be).length();return a},intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;Ab[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a); +Ab[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a);Ab[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);Ab[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(a);Ab[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);Ab[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);Ab[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);Ab[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(Ab);return this},translate:function(a){this.min.add(a);this.max.add(a); +return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Uk=new Sa;Object.assign(qb.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(a,b){var c=this.center;void 0!==b?c.copy(b):Uk.setFromPoints(a).getCenter(c);for(var d=b=0,e=a.length;d=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a, +b){var c=this.center.distanceToSquared(a);void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new n);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Sa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a); +this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});var Bb=new n,ah=new n,Hf=new n,Qb=new n,bh=new n,If=new n,ch=new n;Object.assign(Wb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this}, +at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"),b=new n);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(a){this.origin.copy(this.at(a,Bb));return this},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),b=new n);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a? +b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(a){var b=Bb.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);Bb.copy(this.direction).multiplyScalar(b).add(this.origin);return Bb.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){ah.copy(a).add(b).multiplyScalar(.5);Hf.copy(b).sub(a).normalize();Qb.copy(this.origin).sub(ah); +var e=.5*a.distanceTo(b),f=-this.direction.dot(Hf),g=Qb.dot(this.direction),k=-Qb.dot(Hf),l=Qb.lengthSq(),h=Math.abs(1-f*f);if(0=-n?b<=n?(e=1/h,a*=e,b*=e,f=a*(a+f*b+2*g)+b*(f*a+b+2*k)+l):(b=e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):(b=-e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):b<=-n?(a=Math.max(0,-(-f*e+g)),b=0a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius* +a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z, +f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var k=(a.min.y-f.y)*d;d*=a.max.y-f.y}else k=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||k>c)return null;if(k>g||g!==g)g=k;if(da||k>c)return null;if(k>g||g!==g)g=k;if(ac?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,Bb)},intersectTriangle:function(a, +b,c,d,e){bh.subVectors(b,a);If.subVectors(c,a);ch.crossVectors(bh,If);b=this.direction.dot(ch);if(0b)d=-1,b=-b;else return null;Qb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Qb,If));if(0>a)return null;c=d*this.direction.dot(bh.cross(Qb));if(0>c||a+c>b)return null;a=-d*Qb.dot(ch);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&& +a.direction.equals(this.direction)}});var dh=new n,Vk=new n,Wk=new za;Object.assign(Ta.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=dh.subVectors(c,b).cross(Vk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b, +a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a, +b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(dh),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||1b&&0a&&0=Db.x+Db.y},getUV:function(a,b,c,d,e,f,g,k){this.getBarycoord(a,b,c,d,Db);k.set(0,0);k.addScaledVector(e,Db.x);k.addScaledVector(f,Db.y);k.addScaledVector(g,Db.z);return k},isFrontFacing:function(a,b,c,d){bb.subVectors(c,b);Cb.subVectors(a,b);return 0>bb.cross(Cb).dot(d)?!0:!1}});Object.assign(ma.prototype,{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]); +return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){bb.subVectors(this.c,this.b);Cb.subVectors(this.a,this.b);return.5*bb.cross(Cb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return ma.getNormal(this.a,this.b, +this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Ta);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return ma.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return ma.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return ma.containsPoint(a,this.a,this.b,this.c)},isFrontFacing:function(a){return ma.isFrontFacing(this.a,this.b,this.c,a)},intersectsBox:function(a){return a.intersectsTriangle(this)}, +closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new n);var c=this.a,d=this.b,e=this.c;sd.subVectors(d,c);td.subVectors(e,c);fh.subVectors(a,c);var f=sd.dot(fh),g=td.dot(fh);if(0>=f&&0>=g)return b.copy(c);gh.subVectors(a,d);var k=sd.dot(gh),l=td.dot(gh);if(0<=k&&l<=k)return b.copy(d);var h=f*l-k*g;if(0>=h&&0<=f&&0>=k)return d=f/(f-k),b.copy(c).addScaledVector(sd,d);hh.subVectors(a,e);a=sd.dot(hh);var v=td.dot(hh);if(0<= +v&&a<=v)return b.copy(e);f=a*g-f*v;if(0>=f&&0<=g&&0>=v)return h=g/(g-v),b.copy(c).addScaledVector(td,h);g=k*v-a*l;if(0>=g&&0<=l-k&&0<=a-v)return Li.subVectors(e,d),h=(l-k)/(l-k+(a-v)),b.copy(d).addScaledVector(Li,h);e=1/(g+f+h);d=f*e;h*=e;return b.copy(c).addScaledVector(sd,d).addScaledVector(td,h)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Mi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244, +black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347, +darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365, +lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683, +mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910, +purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}, +Ca={h:0,s:0,l:0},Jf={h:0,s:0,l:0};Object.assign(y.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){a=O.euclideanModulo(a,1);b=O.clamp(b, +0,1);c=O.clamp(c,0,1);0===b?this.r=this.g=this.b=c:(b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=bg(c,b,a+1/3),this.g=bg(c,b,a),this.b=bg(c,b,a-1/3));return this},setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1], +10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/360;var e=parseInt(c[2], +10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return a&&0=k?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;d.stencilWrite=this.stencilWrite;d.stencilWriteMask=this.stencilWriteMask;d.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef; +d.stencilFuncMask=this.stencilFuncMask;d.stencilFail=this.stencilFail;d.stencilZFail=this.stencilZFail;d.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize); +void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c\n\t#include \n}", +fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}",side:1,blending:0});d.uniforms.tEquirect.value=b;b=new ca(new Jd(5, +5,5),d);c.add(b);d=new Hc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};cc.prototype=Object.create(T.prototype);cc.prototype.constructor=cc;cc.prototype.isDataTexture=!0;var vd=new qb,Lf=new n;Object.assign(Hd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)}, +copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],k=c[5],h=c[6],m=c[7],n=c[8],p=c[9],q=c[10],t=c[11],r=c[12],u=c[13],z=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-n,c-r).normalize();b[1].setComponents(f+a,m+g,t+n,c+r).normalize();b[2].setComponents(f+d,m+k,t+p,c+u).normalize();b[3].setComponents(f-d,m-k,t-p,c-u).normalize();b[4].setComponents(f-e,m-h,t-q,c-z).normalize(); +b[5].setComponents(f+e,m+h,t+q,c+z).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();vd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(vd)},intersectsSprite:function(a){vd.center.set(0,0,0);vd.radius=.7071067811865476;vd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(vd)},intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)< +a)return!1;return!0},intersectsBox:function(a){for(var b=this.planes,c=0;6>c;c++){var d=b[c];Lf.x=0d.distanceToPoint(Lf))return!1}return!0},containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var N={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif", +alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif", +aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", +bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif", +clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif", +clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif", +color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}", +cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_maxMipLevel 8.0\n#define cubeUV_minMipLevel 4.0\n#define cubeUV_maxTileSize 256.0\n#define cubeUV_minTileSize 16.0\nfloat getFace(vec3 direction) {\n vec3 absDirection = abs(direction);\n float face = -1.0;\n if (absDirection.x > absDirection.z) {\n if (absDirection.x > absDirection.y)\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if (absDirection.z > absDirection.y)\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n}\nvec2 getUV(vec3 direction, float face) {\n vec2 uv;\n if (face == 0.0) {\n uv = vec2(-direction.z, direction.y) / abs(direction.x);\n } else if (face == 1.0) {\n uv = vec2(direction.x, -direction.z) / abs(direction.y);\n } else if (face == 2.0) {\n uv = direction.xy / abs(direction.z);\n } else if (face == 3.0) {\n uv = vec2(direction.z, direction.y) / abs(direction.x);\n } else if (face == 4.0) {\n uv = direction.xz / abs(direction.y);\n } else {\n uv = vec2(-direction.x, direction.y) / abs(direction.z);\n }\n return 0.5 * (uv + 1.0);\n}\nvec3 bilinearCubeUV(sampler2D envMap, vec3 direction, float mipInt) {\n float face = getFace(direction);\n float filterInt = max(cubeUV_minMipLevel - mipInt, 0.0);\n mipInt = max(mipInt, cubeUV_minMipLevel);\n float faceSize = exp2(mipInt);\n float texelSize = 1.0 / (3.0 * cubeUV_maxTileSize);\n vec2 uv = getUV(direction, face) * (faceSize - 1.0);\n vec2 f = fract(uv);\n uv += 0.5 - f;\n if (face > 2.0) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if(mipInt < cubeUV_maxMipLevel){\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max(0.0, cubeUV_maxTileSize - 2.0 * faceSize);\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear(texture2D(envMap, uv)).rgb;\n vec3 tm = mix(tl, tr, f.x);\n vec3 bm = mix(bl, br, f.x);\n return mix(tm, bm, f.y);\n}\n#define r0 1.0\n#define v0 0.339\n#define m0 -2.0\n#define r1 0.8\n#define v1 0.276\n#define m1 -1.0\n#define r4 0.4\n#define v4 0.046\n#define m4 2.0\n#define r5 0.305\n#define v5 0.016\n#define m5 3.0\n#define r6 0.21\n#define v6 0.0038\n#define m6 4.0\nfloat roughnessToMip(float roughness) {\n float mip = 0.0;\n if (roughness >= r1) {\n mip = (r0 - roughness) * (m1 - m0) / (r0 - r1) + m0;\n } else if (roughness >= r4) {\n mip = (r1 - roughness) * (m4 - m1) / (r1 - r4) + m1;\n } else if (roughness >= r5) {\n mip = (r4 - roughness) * (m5 - m4) / (r4 - r5) + m4;\n } else if (roughness >= r6) {\n mip = (r5 - roughness) * (m6 - m5) / (r5 - r6) + m5;\n } else {\n mip = -2.0 * log2(1.16 * roughness); }\n return mip;\n}\nvec4 textureCubeUV(sampler2D envMap, vec3 sampleDir, float roughness) {\n float mip = clamp(roughnessToMip(roughness), m0, cubeUV_maxMipLevel);\n float mipF = fract(mip);\n float mipInt = floor(mip);\n vec3 color0 = bilinearCubeUV(envMap, sampleDir, mipInt);\n if (mipF == 0.0) {\n return vec4(color0, 1.0);\n } else {\n vec3 color1 = bilinearCubeUV(envMap, sampleDir, mipInt + 1.0);\n return vec4(mix(color0, color1, mipF), 1.0);\n }\n}\n#endif", +defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\ttransformedNormal = mat3( instanceMatrix ) * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif", +displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif", +encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}", +envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ), 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif", +envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif", +envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, queryReflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif", +envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif", +fog_vertex:"#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif", +gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif", +lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif", +lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif", +lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)", +lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)", +lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatRoughness = max( clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif", +lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}", +lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif", +lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif", +lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif", +logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif", +map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif", +map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif", +morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", +morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif", +normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;", +normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif", +normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif", +clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_normalmap_pars_fragment:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif", +packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}", +premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif", +roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = ( floor( uv * size - 0.5 ) + 0.5 ) * texelSize;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif", +shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif", +shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif", +shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}", +skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif", +skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif", +specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}", +uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif", +uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}", +background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}", +cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}", +depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}", +distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}", +equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}", +equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}", +linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}", +meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}", +meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}", +meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}", +normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}", +normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}", +points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}", +points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}", +shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", +sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}", +sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"}, +E={common:{diffuse:{value:new y(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new za},uv2Transform:{value:new za},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null}, +bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new x(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new y(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{}, +color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{}, +shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new y(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new za}},sprite:{diffuse:{value:new y(15658734)},opacity:{value:1},center:{value:new x(.5,.5)},rotation:{value:0},map:{value:null}, +alphaMap:{value:null},uvTransform:{value:new za}}},eb={basic:{uniforms:na([E.common,E.specularmap,E.envmap,E.aomap,E.lightmap,E.fog]),vertexShader:N.meshbasic_vert,fragmentShader:N.meshbasic_frag},lambert:{uniforms:na([E.common,E.specularmap,E.envmap,E.aomap,E.lightmap,E.emissivemap,E.fog,E.lights,{emissive:{value:new y(0)}}]),vertexShader:N.meshlambert_vert,fragmentShader:N.meshlambert_frag},phong:{uniforms:na([E.common,E.specularmap,E.envmap,E.aomap,E.lightmap,E.emissivemap,E.bumpmap,E.normalmap, +E.displacementmap,E.fog,E.lights,{emissive:{value:new y(0)},specular:{value:new y(1118481)},shininess:{value:30}}]),vertexShader:N.meshphong_vert,fragmentShader:N.meshphong_frag},standard:{uniforms:na([E.common,E.envmap,E.aomap,E.lightmap,E.emissivemap,E.bumpmap,E.normalmap,E.displacementmap,E.roughnessmap,E.metalnessmap,E.fog,E.lights,{emissive:{value:new y(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag}, +toon:{uniforms:na([E.common,E.specularmap,E.aomap,E.lightmap,E.emissivemap,E.bumpmap,E.normalmap,E.displacementmap,E.gradientmap,E.fog,E.lights,{emissive:{value:new y(0)},specular:{value:new y(1118481)},shininess:{value:30}}]),vertexShader:N.meshtoon_vert,fragmentShader:N.meshtoon_frag},matcap:{uniforms:na([E.common,E.bumpmap,E.normalmap,E.displacementmap,E.fog,{matcap:{value:null}}]),vertexShader:N.meshmatcap_vert,fragmentShader:N.meshmatcap_frag},points:{uniforms:na([E.points,E.fog]),vertexShader:N.points_vert, +fragmentShader:N.points_frag},dashed:{uniforms:na([E.common,E.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:N.linedashed_vert,fragmentShader:N.linedashed_frag},depth:{uniforms:na([E.common,E.displacementmap]),vertexShader:N.depth_vert,fragmentShader:N.depth_frag},normal:{uniforms:na([E.common,E.bumpmap,E.normalmap,E.displacementmap,{opacity:{value:1}}]),vertexShader:N.normal_vert,fragmentShader:N.normal_frag},sprite:{uniforms:na([E.sprite,E.fog]),vertexShader:N.sprite_vert, +fragmentShader:N.sprite_frag},background:{uniforms:{uvTransform:{value:new za},t2D:{value:null}},vertexShader:N.background_vert,fragmentShader:N.background_frag},cube:{uniforms:na([E.envmap,{opacity:{value:1}}]),vertexShader:N.cube_vert,fragmentShader:N.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:N.equirect_vert,fragmentShader:N.equirect_frag},distanceRGBA:{uniforms:na([E.common,E.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]), +vertexShader:N.distanceRGBA_vert,fragmentShader:N.distanceRGBA_frag},shadow:{uniforms:na([E.lights,E.fog,{color:{value:new y(0)},opacity:{value:1}}]),vertexShader:N.shadow_vert,fragmentShader:N.shadow_frag}};eb.physical={uniforms:na([eb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new y(0)},clearcoatNormalScale:{value:new x(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:N.meshphysical_vert,fragmentShader:N.meshphysical_frag};Id.prototype= +Object.create(M.prototype);Id.prototype.constructor=Id;dc.prototype=Object.create(G.prototype);dc.prototype.constructor=dc;rb.prototype=Object.create(T.prototype);rb.prototype.constructor=rb;rb.prototype.isCubeTexture=!0;Object.defineProperty(rb.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Ic.prototype=Object.create(T.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDataTexture2DArray=!0;Jc.prototype=Object.create(T.prototype);Jc.prototype.constructor= +Jc;Jc.prototype.isDataTexture3D=!0;var Fh=new T,Mj=new Ic,Oj=new Jc,Gh=new rb,zh=[],Bh=[],Eh=new Float32Array(16),Dh=new Float32Array(9),Ch=new Float32Array(4);Hh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ia(b,a)};Ih.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var hg=/([\w\d_]+)(\])?(\[|\.)?/g;Fb.prototype.setValue=function(a,b,c, +d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Fb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Fb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],k=c[g.id];!1!==k.needsUpdate&&g.setValue(a,k.value,d)}};Fb.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var tk=0,jg=/^[ \t]*#include +<([\w\d./]+)>/gm,Qh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g, +Ck=0;Gb.prototype=Object.create(L.prototype);Gb.prototype.constructor=Gb;Gb.prototype.isMeshDepthMaterial=!0;Gb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this}; +Hb.prototype=Object.create(L.prototype);Hb.prototype.constructor=Hb;Hb.prototype.isMeshDistanceMaterial=!0;Hb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance=a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias; +return this};og.prototype=Object.assign(Object.create(va.prototype),{constructor:og,isWebGLMultiviewRenderTarget:!0,copy:function(a){va.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose());return this}});Pe.prototype=Object.assign(Object.create(pa.prototype),{constructor:Pe,isArrayCamera:!0});Od.prototype=Object.assign(Object.create(D.prototype),{constructor:Od,isGroup:!0});Object.assign(Wh.prototype,Fa.prototype); +Object.assign(Qe.prototype,{isFogExp2:!0,clone:function(){return new Qe(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Re.prototype,{isFog:!0,clone:function(){return new Re(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(sb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(sb.prototype, +{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;da.far||b.push({distance:e,point:Ee.clone(),uv:ma.getUV(Ee,Mf,Fe,Nf,Oi,mh,Pi,new x),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){D.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}}); +var Of=new n,Qi=new n;Sd.prototype=Object.assign(Object.create(D.prototype),{constructor:Sd,isLOD:!0,copy:function(a){D.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c=b[c].distance)b[c- +1].object.visible=!1,b[c].object.visible=!0;else break;for(;cc||(k.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}}else for(d=0,p=v.length/3-1;dc||(k.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null, +object:this}))}else if(d.isGeometry)for(f=d.vertices,g=f.length,d=0;dc||(k.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this}))}},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Qf=new n,Rf=new n;la.prototype=Object.assign(Object.create(Ja.prototype),{constructor:la, +isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[],d=0,e=b.count;d= +a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Pc.prototype=Object.create(T.prototype);Pc.prototype.constructor=Pc;Pc.prototype.isCompressedTexture=!0;Ud.prototype=Object.create(T.prototype);Ud.prototype.constructor=Ud;Ud.prototype.isCanvasTexture=!0;Vd.prototype=Object.create(T.prototype);Vd.prototype.constructor=Vd;Vd.prototype.isDepthTexture=!0;Qc.prototype=Object.create(G.prototype);Qc.prototype.constructor=Qc;Wd.prototype=Object.create(M.prototype);Wd.prototype.constructor=Wd;Rc.prototype=Object.create(G.prototype); +Rc.prototype.constructor=Rc;Xd.prototype=Object.create(M.prototype);Xd.prototype.constructor=Xd;Ga.prototype=Object.create(G.prototype);Ga.prototype.constructor=Ga;Yd.prototype=Object.create(M.prototype);Yd.prototype.constructor=Yd;Sc.prototype=Object.create(Ga.prototype);Sc.prototype.constructor=Sc;Zd.prototype=Object.create(M.prototype);Zd.prototype.constructor=Zd;ec.prototype=Object.create(Ga.prototype);ec.prototype.constructor=ec;$d.prototype=Object.create(M.prototype);$d.prototype.constructor= +$d;Tc.prototype=Object.create(Ga.prototype);Tc.prototype.constructor=Tc;ae.prototype=Object.create(M.prototype);ae.prototype.constructor=ae;Uc.prototype=Object.create(Ga.prototype);Uc.prototype.constructor=Uc;be.prototype=Object.create(M.prototype);be.prototype.constructor=be;fc.prototype=Object.create(G.prototype);fc.prototype.constructor=fc;fc.prototype.toJSON=function(){var a=G.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};ce.prototype=Object.create(M.prototype);ce.prototype.constructor= +ce;Vc.prototype=Object.create(G.prototype);Vc.prototype.constructor=Vc;de.prototype=Object.create(M.prototype);de.prototype.constructor=de;Wc.prototype=Object.create(G.prototype);Wc.prototype.constructor=Wc;var Zk={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=Zh(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var k;if(d){var h=c;d=[];var m;var n=0;for(m=b.length;n80*c){var t=k=a[0];var r=d=a[1];for(h=c;hk&&(k=n),b>d&&(d=b);k=Math.max(k-t,d-r);k=0!==k?1/k:0}ge(f,g,c,t,r,k);return g}},tb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;etb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];ci(a);di(c,a);var f=a.length;b.forEach(ci); +for(a=0;aMath.abs(g-h)?[new x(a,1-c),new x(k,1-d),new x(m,1-e),new x(p,1-b)]:[new x(g,1-c),new x(h,1-d),new x(n,1-e),new x(q,1-b)]}};ie.prototype=Object.create(M.prototype); +ie.prototype.constructor=ie;Yc.prototype=Object.create(gb.prototype);Yc.prototype.constructor=Yc;je.prototype=Object.create(M.prototype);je.prototype.constructor=je;ic.prototype=Object.create(G.prototype);ic.prototype.constructor=ic;ke.prototype=Object.create(M.prototype);ke.prototype.constructor=ke;Zc.prototype=Object.create(G.prototype);Zc.prototype.constructor=Zc;le.prototype=Object.create(M.prototype);le.prototype.constructor=le;$c.prototype=Object.create(G.prototype);$c.prototype.constructor= +$c;jc.prototype=Object.create(M.prototype);jc.prototype.constructor=jc;jc.prototype.toJSON=function(){var a=M.prototype.toJSON.call(this);return fi(this.parameters.shapes,a)};kc.prototype=Object.create(G.prototype);kc.prototype.constructor=kc;kc.prototype.toJSON=function(){var a=G.prototype.toJSON.call(this);return fi(this.parameters.shapes,a)};ad.prototype=Object.create(G.prototype);ad.prototype.constructor=ad;lc.prototype=Object.create(M.prototype);lc.prototype.constructor=lc;ub.prototype=Object.create(G.prototype); +ub.prototype.constructor=ub;me.prototype=Object.create(lc.prototype);me.prototype.constructor=me;ne.prototype=Object.create(ub.prototype);ne.prototype.constructor=ne;oe.prototype=Object.create(M.prototype);oe.prototype.constructor=oe;bd.prototype=Object.create(G.prototype);bd.prototype.constructor=bd;var ua=Object.freeze({__proto__:null,WireframeGeometry:Qc,ParametricGeometry:Wd,ParametricBufferGeometry:Rc,TetrahedronGeometry:Yd,TetrahedronBufferGeometry:Sc,OctahedronGeometry:Zd,OctahedronBufferGeometry:ec, +IcosahedronGeometry:$d,IcosahedronBufferGeometry:Tc,DodecahedronGeometry:ae,DodecahedronBufferGeometry:Uc,PolyhedronGeometry:Xd,PolyhedronBufferGeometry:Ga,TubeGeometry:be,TubeBufferGeometry:fc,TorusKnotGeometry:ce,TorusKnotBufferGeometry:Vc,TorusGeometry:de,TorusBufferGeometry:Wc,TextGeometry:ie,TextBufferGeometry:Yc,SphereGeometry:je,SphereBufferGeometry:ic,RingGeometry:ke,RingBufferGeometry:Zc,PlaneGeometry:Id,PlaneBufferGeometry:dc,LatheGeometry:le,LatheBufferGeometry:$c,ShapeGeometry:jc,ShapeBufferGeometry:kc, +ExtrudeGeometry:hc,ExtrudeBufferGeometry:gb,EdgesGeometry:ad,ConeGeometry:me,ConeBufferGeometry:ne,CylinderGeometry:lc,CylinderBufferGeometry:ub,CircleGeometry:oe,CircleBufferGeometry:bd,BoxGeometry:lh,BoxBufferGeometry:Jd});mc.prototype=Object.create(L.prototype);mc.prototype.constructor=mc;mc.prototype.isShadowMaterial=!0;mc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);return this};vb.prototype=Object.create(oa.prototype);vb.prototype.constructor=vb;vb.prototype.isRawShaderMaterial= +!0;hb.prototype=Object.create(L.prototype);hb.prototype.constructor=hb;hb.prototype.isMeshStandardMaterial=!0;hb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity; +this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth= +a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nc.prototype=Object.create(hb.prototype);nc.prototype.constructor=nc;nc.prototype.isMeshPhysicalMaterial=!0;nc.prototype.copy=function(a){hb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness= +a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen||new y).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency;return this};Kb.prototype=Object.create(L.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isMeshPhongMaterial=!0;Kb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap= +a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap= +a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};oc.prototype=Object.create(L.prototype);oc.prototype.constructor=oc;oc.prototype.isMeshToonMaterial= +!0;oc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.gradientMap=a.gradientMap;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType= +a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pc.prototype= +Object.create(L.prototype);pc.prototype.constructor=pc;pc.prototype.isMeshNormalMaterial=!0;pc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning= +a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};qc.prototype=Object.create(L.prototype);qc.prototype.constructor=qc;qc.prototype.isMeshLambertMaterial=!0;qc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity= +a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};rc.prototype=Object.create(L.prototype);rc.prototype.constructor= +rc;rc.prototype.isMeshMatcapMaterial=!0;rc.prototype.copy=function(a){L.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning; +this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};sc.prototype=Object.create(ja.prototype);sc.prototype.constructor=sc;sc.prototype.isLineDashedMaterial=!0;sc.prototype.copy=function(a){ja.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var $k=Object.freeze({__proto__:null,ShadowMaterial:mc,SpriteMaterial:Jb,RawShaderMaterial:vb,ShaderMaterial:oa,PointsMaterial:Va,MeshPhysicalMaterial:nc,MeshStandardMaterial:hb, +MeshPhongMaterial:Kb,MeshToonMaterial:oc,MeshNormalMaterial:pc,MeshLambertMaterial:qc,MeshDepthMaterial:Gb,MeshDistanceMaterial:Hb,MeshBasicMaterial:Oa,MeshMatcapMaterial:rc,LineDashedMaterial:sc,LineBasicMaterial:ja,Material:L}),ea={arraySlice:function(a,b,c){return ea.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&& +!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!==b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)), +f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}},subclip:function(a,b,c,d,e){e=e||30;a=a.clone();a.name=b;var f=[];for(b=0;b=d))for(h.push(g.times[n]),p=0;pa.tracks[b].times[0]&&(c=a.tracks[b].times[0]);for(b=0;b=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ea.arraySlice(c,e,f),this.values=ea.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.", +this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ea.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values, +c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(O.clamp(d[h-1].dot(d[h]),-1,1)),e[h].applyMatrix4(k.makeRotationAxis(g,c))),f[h].crossVectors(d[h],e[h]);if(!0===b)for(c=Math.acos(O.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);nh.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);oh.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);ph.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&(nh.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),oh.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),ph.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(nh.calc(a),oh.calc(a),ph.calc(a));return b};Aa.prototype.copy=function(a){I.prototype.copy.call(this, +a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(hi(d,e.x,f.x,g.x,c.x),hi(d,e.y,f.y,g.y,c.y));return b};Za.prototype.copy=function(a){I.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()}, +getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;cNumber.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d} +var e=tb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new Lb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var m=[],n=[],p=0;m[p]=void 0;n[p]=[];for(var q=0,t=f.length;qb;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095); +b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086* +d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0}, +copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(tf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d; +b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});ab.prototype=Object.assign(Object.create(ba.prototype),{constructor:ab,isLightProbe:!0,copy:function(a){ba.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return ba.prototype.toJSON.call(this,a)}});Fg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Fg,isHemisphereLightProbe:!0,copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this, +a)}});Gg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Gg,isAmbientLightProbe:!0,copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this,a)}});var $i=new P,aj=new P;Object.assign(ii.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect; +b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(O.DEG2RAD*b.fov*.5)/b.zoom;aj.elements[12]=-d;$i.elements[12]=d;d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(aj); +this.cameraR.matrixWorld.copy(a.matrixWorld).multiply($i)}});Object.assign(Hg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance? +Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});var yc=new n,bj=new Da,bl=new n,zc=new n;Ig.prototype=Object.assign(Object.create(D.prototype),{constructor:Ig,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this},getFilter:function(){return this.filter},setFilter:function(a){null!== +this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(a){D.prototype.updateMatrixWorld.call(this,a);a=this.context.listener; +var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(yc,bj,bl);zc.set(0,0,-1).applyQuaternion(bj);if(a.positionX){var c=this.context.currentTime+this.timeDelta;a.positionX.linearRampToValueAtTime(yc.x,c);a.positionY.linearRampToValueAtTime(yc.y,c);a.positionZ.linearRampToValueAtTime(yc.z,c);a.forwardX.linearRampToValueAtTime(zc.x,c);a.forwardY.linearRampToValueAtTime(zc.y,c);a.forwardZ.linearRampToValueAtTime(zc.z,c);a.upX.linearRampToValueAtTime(b.x,c);a.upY.linearRampToValueAtTime(b.y, +c);a.upZ.linearRampToValueAtTime(b.z,c)}else a.setPosition(yc.x,yc.y,yc.z),a.setOrientation(zc.x,zc.y,zc.z,b.x,b.y,b.z)}});hd.prototype=Object.assign(Object.create(D.prototype),{constructor:hd,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect(); +return this},setMediaStreamSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(a){void 0===a&&(a=0);if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); +else return this._startedAt=this.context.currentTime+a,a=this.context.createBufferSource(),a.buffer=this.buffer,a.loop=this.loop,a.loopStart=this.loopStart,a.loopEnd=this.loopEnd,a.onended=this.onEnded.bind(this),a.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=a,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); +else return!0===this.isPlaying&&(this._pausedAt=(this.context.currentTime-this._startedAt)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this},connect:function(){if(0d&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]= +a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){Da.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});var dl=/[\[\]\.:\/]/g,el="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",fl=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),gl=/(WCOD+)?/.source.replace("WCOD",el), +hl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),il=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),jl=new RegExp("^"+fl+gl+hl+il+"$"),kl=["material","materials","bones"];Object.assign(ji.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a= +this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(Ba,{Composite:ji,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new Ba.Composite(a,b,c):new Ba(a,b,c)},sanitizeNodeName:function(a){return a.replace(/\s/g,"_").replace(dl,"")},parseTrackName:function(a){var b=jl.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+ +a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==kl.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+a);return b},findNode:function(a,b){if(!b||""===b||"root"===b||"."===b||-1===b||b===a.name||b===a.uuid)return a; +if(a.skeleton){var c=a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var n=b++,p=a[n];c[p.uuid]=m;a[m]=p;c[l]=n;a[n]=h;h=0;for(l=e;h!==l;++h){p=d[h];var q=p[m];p[m]=p[n];p[n]=q}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var l= +arguments[g].uuid,m=d[l];if(void 0!==m)if(delete d[l],mb||0===c)return;this._startTime=null;b*=c}b*=this._updateTimeScale(a);c=this._updateTime(b);a=this._updateWeight(a);if(0c.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1=== +e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else{this.time=b;break a}this.clampWhenFinished?this.paused=!0:this.enabled=!1;this.time=b;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished? +this.paused=!0:this.enabled=!1,this.time=b=0a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this.time=b,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}else this.time=b;if(f&&1===(e&1))return c-b}return b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd= +b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});Ng.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ng,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName, +l=h[g];void 0===l&&(l={},h[g]=l);for(h=0;h!==e;++h){var m=d[h],n=m.name,p=l[n];if(void 0===p){p=f[h];if(void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,g,n));continue}p=new Mg(Ba.create(c,n,b&&b._propertyBindings[h].binding.parsedPath),m.ValueTypeName,m.getValueSize());++p.referenceCount;this._addInactiveBinding(p,g,n)}f[h]=p;a[h].resultBuffer=p.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid, +c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions= +[];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}}, +_isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new x);return b.set((a.x-this.min.x)/(this.max.x-this.min.x), +(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new x);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return dj.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min); +this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var ej=new n,Vf=new n;Object.assign(Rg.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"), +a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a, +b){ej.subVectors(a,this.start);Vf.subVectors(this.end,this.start);a=Vf.dot(Vf);a=Vf.dot(ej)/a;b&&(a=O.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}}); +te.prototype=Object.create(D.prototype);te.prototype.constructor=te;te.prototype.isImmediateRenderObject=!0;var fj=new n;id.prototype=Object.create(D.prototype);id.prototype.constructor=id;id.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};id.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);fj.setFromMatrixPosition(this.light.target.matrixWorld); +this.cone.lookAt(fj);void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Rb=new n,Wf=new P,th=new P;jd.prototype=Object.create(la.prototype);jd.prototype.constructor=jd;jd.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");th.getInverse(this.root.matrixWorld);for(var e=0,f=0;eMath.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);D.prototype.updateMatrixWorld.call(this,a)};var kj=new n,yf,Sg;yb.prototype=Object.create(D.prototype);yb.prototype.constructor=yb;yb.prototype.setDirection=function(a){.99999a.y?this.quaternion.set(1,0,0,0):(kj.set(a.z, +0,-a.x).normalize(),this.quaternion.setFromAxisAngle(kj,Math.acos(a.y)))};yb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};yb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};yb.prototype.copy=function(a){D.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone); +return this};yb.prototype.clone=function(){return(new this.constructor).copy(this)};xe.prototype=Object.create(la.prototype);xe.prototype.constructor=xe;var lb=Math.pow(2,8),lj=[.125,.215,.35,.446,.526,.582],vi=5+lj.length,mb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},Vg=new gd,zf=function(a){var b=new Float32Array(a),c=new n(0,1,0);a=new vb({defines:{n:a},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:b},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:c}, +inputEncoding:{value:mb[3E3]},outputEncoding:{value:mb[3E3]}},vertexShader:Xg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Yg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include \n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t\t\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t", +blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";return a}(20),Sb=null,Tb=null,uh=function(){for(var a=[],b=[],c=[],d=8,e=0;em;m++){var n=m%3*2/3-1,p=2p;p++)q=p%3,0==q?(c.up.set(0,d[p],0),c.lookAt(f[p],0,0)):1==q?(c.up.set(0,0,d[p]),c.lookAt(0,f[p],0)):(c.up.set(0,d[p],0),c.lookAt(0,0,f[p])),Wg(q*lb,2=0.5.1" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "fsevents": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1", + "node-pre-gyp": "*" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "3.2.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.9.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.13", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.1.1", + "bundled": true, + "dev": true + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "http-auth": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/http-auth/-/http-auth-3.1.3.tgz", + "integrity": "sha1-lFz63WZSHq+PfISRPTd9exXyTjE=", + "dev": true, + "requires": { + "apache-crypt": "^1.1.2", + "apache-md5": "^1.0.6", + "bcryptjs": "^2.3.0", + "uuid": "^3.0.0" + } + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-parser-js": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "dev": true + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "live-server": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/live-server/-/live-server-1.2.1.tgz", + "integrity": "sha512-Yn2XCVjErTkqnM3FfTmM7/kWy3zP7+cEtC7x6u+wUzlQ+1UW3zEYbbyJrc0jNDwiMDZI0m4a0i3dxlGHVyXczw==", + "dev": true, + "requires": { + "chokidar": "^2.0.4", + "colors": "^1.4.0", + "connect": "^3.6.6", + "cors": "^2.8.5", + "event-stream": "3.3.4", + "faye-websocket": "0.11.x", + "http-auth": "3.1.x", + "morgan": "^1.9.1", + "object-assign": "^4.1.1", + "opn": "^6.0.0", + "proxy-middleware": "^0.15.0", + "send": "^0.17.1", + "serve-index": "^1.9.1" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "dev": true, + "requires": { + "mime-db": "1.43.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "dev": true, + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "opn": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-6.0.0.tgz", + "integrity": "sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ==", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "dev": true, + "requires": { + "through": "~2.3" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "proxy-middleware": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz", + "integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=", + "dev": true + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "dev": true, + "requires": { + "duplexer": "~0.1.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unix-crypt-td-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz", + "integrity": "sha512-8rMeVYWSIyccIJscb9NdCfZKSRBKYTeVnwmiRYT2ulE3qd1RaDQ0xQDP+rI3ccIWbhu/zuo5cgN8z73belNZgw==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "websocket-driver": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", + "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0 <0.4.11", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ef19cff --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "enable3d-website", + "version": "1.0.0", + "description": "", + "main": "index.js", + "directories": { + "example": "examples", + "lib": "lib" + }, + "scripts": { + "start": "live-server", + "format": "prettier --write examples/**/*.html index.html examples.html" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/yandeu/enable3d-website.git" + }, + "author": "Yannick Deubel", + "license": "MIT", + "bugs": { + "url": "https://github.com/yandeu/enable3d-website/issues" + }, + "homepage": "https://github.com/yandeu/enable3d-website#readme", + "dependencies": {}, + "devDependencies": { + "live-server": "^1.2.1", + "prettier": "^1.19.1" + } +}